Commit Graph

92 Commits

Author SHA1 Message Date
samzong
316fd5b625 [Fix] Warm provider auth off main thread (#86281)
* fix(agents): warm provider auth off main thread

Signed-off-by: samzong <samzong.lu@gmail.com>

* fix(agents): keep provider auth warm read-only

* fix(ci): unblock provider auth landing

* ci: serialize gateway watch artifact check

* fix(ci): stabilize diffs viewer asset generation

* fix(agents): avoid stale plugin auth warm results

* fix(agents): keep partial auth warm cache

---------

Signed-off-by: samzong <samzong.lu@gmail.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-05-27 23:24:55 +01:00
Peter Steinberger
bb46b79d3c refactor: internalize OpenClaw agent runtime (#85341)
* refactor: extract agent core package

Introduce packages/agent-core as the OpenClaw-owned home for reusable agent loop, harness, session, prompt, and runtime dependency contracts.

* refactor: extract shared llm runtime

Move provider model registries, stream wrappers, OAuth helpers, and LLM utilities into src/llm with plugin-sdk barrels instead of depending on the old embedded runtime layout.

* refactor: remove pi runtime internals

Rename remaining Pi-shaped agent surfaces to OpenClaw agent runtime names, delete obsolete Pi docs and package graph checks, and add the third-party notice for incorporated code.

* refactor: tighten agent session runtime

Make agent-core/runtime dependencies explicit, consolidate compaction and session transcript helpers, and move model/session helpers behind OpenClaw-owned contracts.

* refactor: remove static model and pi auth paths

Drop static model catalogs and Pi auth bridges, move model/provider facts to manifest-owned runtime contracts, and harden internal embedded-agent utilities.

* refactor: remove legacy provider compat paths

* docs: remove agent parity notes

* fix: skip provider wildcard metadata parsing

* refactor: share session extension sdk loading

* refactor: inline acpx proxy error formatter

* refactor: fold edit recovery into edit tool

* fix: accept extension batch separator

* test: align startup provider plugin expectations

* fix: restore provider-scoped release discovery

* test: align static asset packaging expectations

* fix: run static provider catalogs during scoped discovery

* fix: add provider entry catalogs for scoped live discovery

* fix: load lightweight provider catalog entries

* fix: refresh provider-scoped plugin metadata

* fix: keep provider catalog entries on release live path

* fix: keep static manifest models in release live checks

* fix: harden release model discovery

* fix: reduce OpenAI live cache probe reasoning

* fix: disable OpenAI cache probe reasoning

* ci: extend OpenAI gateway live timeout

* fix: extend live gateway model budget

* fix: stabilize release validation regressions

* fix: honor provider aliases in model rows

* fix: stabilize release validation lanes

* fix: stabilize release memory qa

* ci: stabilize release validation lanes

* ci: prefer ipv4 for live docker node calls

* fix: restore shared tool-call stream wrapper

* ci: remove legacy pi test shard alias

* fix: clean up embedded agent test drift

* fix: stabilize runtime alias status

* fix: clean up embedded agent ci drift

* fix: restore release ci invariants

* fix: clean up post-rebase runtime drift

* fix: restore release ci checks

* fix: restore release ci after rebase

* fix: remove stale pi runtime path

* test: align compaction runtime expectations

* test: update plugin prerelease expectations

* fix: handle claude live tool approvals

* fix: stabilize release validation gates

* fix: finish agent runtime import

* test: finish post-rebase agent runtime mocks

* fix: keep codex compaction native

* fix: stabilize codex app-server hook tests

* test: isolate codex diagnostic active run

* test: remove codex diagnostic completion race

# Conflicts:
#	extensions/codex/src/app-server/run-attempt.test.ts

* ci: fix full release manifest performance run id

* refactor: narrow llm plugin sdk boundary

* chore: drop generated google boundary stamps

* fix: repair rebase fallout

* fix: clean up rebased runtime references

* fix: decode codex jwt payloads as base64url

* fix: preserve shipped pi runtime alias

* fix: add scoped sdk virtual modules

* fix: decode llm codex oauth jwt as base64url

* fix: avoid stale vertex adc negative cache

* fix: harden tool arg decoding and codeql path

* fix: keep vertex adc negative checks live

* refactor: consolidate codex jwt and edit helpers

* fix: await codex oauth node runtime imports

* fix: preserve sdk tool and notice contracts

* fix: preserve shipped compat config boundaries

* fix: align codex oauth callback host

* fix: terminate agent-core loop streams on failure

* fix: keep codex oauth callback alive during fallback

* ci: include session tools in critical codeql scans

* fix: keep Cloudflare Anthropic provider auth header

* docs: redirect legacy pi runtime pages

* fix: honor bundled web provider compat discovery

* fix: protect session output spill files

* fix: keep legacy agent dir env blocked

* fix: contain auto-discovered skill symlinks

* fix: harden agent core sdk proxy surfaces

* fix: restore approval reaction sdk compat

* fix: keep live docker runs bounded

* fix: keep codex oauth redirect host aligned

* fix: resolve post-rebase agent runtime drift

* fix: redact anthropic oauth parse failures

* fix: preserve responses strict tool shaping

* fix: repair agent runtime rebase cleanup

* docs: redirect retired parity pages

* fix: bound auto-discovered resources to roots

* fix: repair post-rebase agent test drift

* fix: preserve bundled provider allowlist migration

* fix: preserve manifest-owned provider aliases

* fix: declare photon image dependency

* fix: keep provider headers out of proxy body

* fix: preserve shipped env aliases

* fix: refresh control ui i18n generated state

* fix: quote read fallback paths

* fix: preview edits through configured backend

* test: satisfy core test typecheck

* fix: preserve ZAI usage auth fallback

* test: repair codex diagnostic test

* fix: repair agent runtime rebase drift

* test: finish embedded runner import rename

* fix: repair agent runtime rebase integrations

* test: align compaction oauth fallback expectations

* fix: allow sdk-auth session models

* fix: update doctor tool schema import

* fix: preserve bedrock plugin region

* fix: stream harmony-like prose immediately

* ci: include session runtime in codeql shards

* fix: repair latest rebase integrations

* fix: honor explicit codex websocket transport

* fix: keep openai-compatible credentials provider-scoped

* fix: refresh sdk api baseline after rebase

* fix: route cli runtime aliases through openclaw harness

* test: rename stale harness mock expectation

* test: rename embedded agent overflow calls

* test: clean embedded auth test wording

* test: use openclaw stream types in deepinfra cache test

* fix: refresh sdk api baseline on latest main

* fix: honor bundled discovery compat allowlists

* fix: refresh sdk api baseline after latest rebase

* fix: remove stale rebase imports

* test: rename stale model catalog mock

* test: mock renamed doctor runtime modules

* fix: map canonical kimi env auth

* fix: use internal model registry in bench script

* fix: migrate deepinfra provider catalog entry

* fix: enforce builtin tool suppression

* fix: route compaction auth and proxy payloads safely

* refactor: prune unused llm registry leftovers

* test: update codex hooks session import

* test: fix model picker ci coverage

* test: align model picker auth mock types
2026-05-27 19:24:04 +01:00
clawsweeper[bot]
3d0659433e fix(build): pin synthetic auth runtime dist entry (#86714)
Summary:
- Adds `plugins/synthetic-auth.runtime` as an explicit tsdown dist entry and adds a regression test tying PI model-discovery synthetic-auth imports to that stable entry.
- PR surface: Tests +22, Other +1. Total +23 across 2 files.
- Reproducibility: yes. as a source-reproducible package-build path: current main imports synthetic-auth from  ... y. The PR proof covers emitted production `dist/` imports, though it did not run a live scheduled cron job.

Automerge notes:
- PR branch already contained follow-up commit before automerge: fix(build): pin synthetic auth runtime dist entry

Validation:
- ClawSweeper review passed for head cb99947919.
- Required merge gates passed before the squash merge.

Prepared head SHA: cb99947919
Review: https://github.com/openclaw/openclaw/pull/86714#issuecomment-4538919657

Co-authored-by: Andy Ye <35905412+TurboTheTurtle@users.noreply.github.com>
Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com>
Approved-by: takhoffman
Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
2026-05-26 01:51:50 +00:00
Onur Solmaz
7ff29a9e6d Fix local embedding worker safety (#85348)
Summary:
- The PR routes local GGUF memory embeddings through a bundled worker sidecar, adds structured degradation and fallback handling, updates memory tests/build output, and keeps the local config contract unchanged.
- PR surface: Source +831, Tests +503, Docs +1, Other +2. Total +1337 across 23 files.
- Reproducibility: Do we have a high-confidence way to reproduce the issue? Source and report evidence are str ... cludes native crash logs; the exact Metal teardown abort was not reproduced in this review or the PR proof.

Automerge notes:
- PR branch already contained follow-up commit before automerge: fix(memory): keep local embedding config unchanged
- PR branch already contained follow-up commit before automerge: fix(memory): type local embedding degradation
- PR branch already contained follow-up commit before automerge: fix(memory): refresh keywords after embedding fallback
- PR branch already contained follow-up commit before automerge: fix(memory): keep worker errors internal
- PR branch already contained follow-up commit before automerge: test: satisfy memory provider lifecycle harnesses
- PR branch already contained follow-up commit before automerge: fix: harden local embedding worker fallback

Validation:
- ClawSweeper review passed for head 1d1fe41c4e.
- Required merge gates passed before the squash merge.

Prepared head SHA: 1d1fe41c4e
Review: https://github.com/openclaw/openclaw/pull/85348#issuecomment-4518516047

Co-authored-by: Onur Solmaz <onur@Onurs-MacBook-Pro.local>
Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com>
Approved-by: osolmaz
Co-authored-by: osolmaz <2453968+osolmaz@users.noreply.github.com>
2026-05-25 11:03:04 +00:00
Bryan P
f9d35dc681 fix(codex): deliver native subagent completions
Deliver Codex-native subagent completions through the generic plugin harness task runtime.

Proof:
- Autoreview clean on final branch.
- Testbox changed gate: tbx_01ks80eqs7d2e3jq3p99zbm4wd, pnpm check:changed, exit 0.
- Live Codex harness: tbx_01ks80p4ky32sqv2ksan2p0w0q, codex/gpt-5.5 API-key auth, native parent/child bridge tokens observed, exit 0.

Co-authored-by: bryanpearson <bryanmpearson@gmail.com>
2026-05-22 15:28:46 +01:00
Dallin Romney
d391434f4e perf: skip dts for local launcher builds (#85142) 2026-05-21 17:58:48 -07:00
Dallin Romney
cd019cfa41 build: suppress rolldown-plugin-dts CommonJS dts warnings from bundled zod locales (#84592)
* build: suppress rolldown-plugin-dts CommonJS dts warnings from bundled zod locales

After bumping rolldown-plugin-dts to 0.25.1 (94ac563399), every
`pnpm build` emits a 'CommonJS dts' warning per zod `v4/locales/*.d.cts`
file because zod is intentionally inlined for global pnpm install
resolution (#78515) and tsdown's external option cannot be scoped to the
dts pass only. Filter the warning in the existing onLog suppression list
(same pattern as PLUGIN_TIMINGS / UNRESOLVED_IMPORT / EVAL) so other
rolldown-plugin-dts warnings remain visible.

* docs(changelog): move rolldown-dts entry into 2026.5.20 fixes
2026-05-20 17:20:47 -07:00
Gavin Zeng
ea72414e1c fix(build): bundle zod inline to fix pnpm global install resolution (#78515)
Merged via squash.

Prepared head SHA: c925d1afab
Co-authored-by: ggzeng <20488795+ggzeng@users.noreply.github.com>
Co-authored-by: altaywtf <9790196+altaywtf@users.noreply.github.com>
Reviewed-by: @altaywtf
2026-05-17 19:20:42 +03:00
Vincent Koc
89a9b4e75a fix(plugins): preserve host package during managed peer repair 2026-05-16 09:48:28 +08:00
Peter Steinberger
f06e9f6358 fix(release): keep TypeScript compiler external 2026-05-15 12:32:33 +01:00
Peter Steinberger
f1deb53d43 fix(release): unblock full validation 2026-05-15 06:55:03 +01:00
Peter Steinberger
0844e771a8 feat: add generic code mode runtime 2026-05-15 04:16:07 +01:00
Vincent Koc
1b77553115 fix(build): keep externalized plugins out of root dist 2026-05-14 19:34:15 +08:00
joshavant
8ba7927f6e fix telegram ingress worker dist entry 2026-05-14 04:55:39 -05:00
Peter Steinberger
bfc798bd0b fix(ci): restore main build 2026-05-14 08:38:49 +01:00
Peter Steinberger
11017c93cf build: keep external provider deps out of core dist 2026-05-14 08:29:10 +01:00
Peter Steinberger
8a406528b4 fix(codex): project user MCP servers into app-server threads
Fixes #80814.

Co-authored-by: kinjitakabe <273844887+kinjitakabe@users.noreply.github.com>
2026-05-13 20:07:10 +01:00
Mariano
8c75ed3eaa Mirror Codex native subagents into task registry (#79512)
Merged via squash.

Prepared head SHA: 75bc96ad74
Co-authored-by: mbelinky <mbelinky@users.noreply.github.com>
Co-authored-by: marianobelinky <63976030+marianobelinky@users.noreply.github.com>
Reviewed-by: @pashpashpash
2026-05-11 20:52:41 +02:00
Peter Steinberger
88943e14f9 fix: keep legacy lazy chunks importable after updates (#80478) 2026-05-11 02:10:19 +01:00
Peter Steinberger
5131c3d677 build: clean tsdown declaration warnings 2026-05-10 02:14:40 +01:00
Peter Steinberger
538605ff44 [codex] Extract filesystem safety primitives (#77918)
* refactor: extract filesystem safety primitives

* refactor: use fs-safe for file access helpers

* refactor: reuse fs-safe for media reads

* refactor: use fs-safe for image reads

* refactor: reuse fs-safe in qqbot media opener

* refactor: reuse fs-safe for local media checks

* refactor: consume cleaner fs-safe api

* refactor: align fs-safe json option names

* fix: preserve fs-safe migration contracts

* refactor: use fs-safe primitive subpaths

* refactor: use grouped fs-safe subpaths

* refactor: align fs-safe api usage

* refactor: adapt private state store api

* chore: refresh proof gate

* refactor: follow fs-safe json api split

* refactor: follow reduced fs-safe surface

* build: default fs-safe python helper off

* fix: preserve fs-safe plugin sdk aliases

* refactor: consolidate fs-safe usage

* refactor: unify fs-safe store usage

* refactor: trim fs-safe temp workspace usage

* refactor: hide low-level fs-safe primitives

* build: use published fs-safe package

* fix: preserve outbound recovery durability after rebase

* chore: refresh pr checks
2026-05-06 02:15:17 +01:00
Andrew Porter
9abf01faf0 feat(DX): Add Out-of-the-Box Support for Debugging in VSCode-Based IDEs (#45710)
Merged via squash.

Prepared head SHA: dd5c0c59f2
Co-authored-by: SwissArmyBud <7257907+SwissArmyBud@users.noreply.github.com>
Co-authored-by: jalehman <550978+jalehman@users.noreply.github.com>
Reviewed-by: @jalehman
2026-05-05 12:41:28 -07:00
Peter Steinberger
585ce38015 fix(telegram): stabilize topic dispatch runtime 2026-05-04 08:25:09 +01:00
Val Alexander
21ac476904 fix(telegram): stabilize reply dispatch runtime
Summary:
- Add a stable provider-dispatcher dist entry and legacy alias coverage for stale reply-dispatch chunks.
- Make Telegram reasoning stream previews transient after final delivery and harden visible-send reasoning sanitization.
- Document transient /reasoning stream behavior and credit @BunsDev in the changelog.

Verification:
- pnpm test src/agents/tools/message-tool.test.ts src/infra/tsdown-config.test.ts test/scripts/runtime-postbuild.test.ts extensions/telegram/src/bot-message-dispatch.test.ts src/plugin-sdk/channel-streaming.test.ts src/plugin-sdk/channel-entry-contract.test.ts
- OPENCLAW_VITEST_MAX_WORKERS=1 pnpm test src/channels/plugins/module-loader.test.ts src/plugin-sdk/channel-entry-contract.test.ts
- pnpm exec oxfmt --check --threads=1 <changed files>
- git diff --check
- pnpm build
- GitHub PR checks for b8b7a91834
2026-05-04 01:07:57 -05:00
Peter Steinberger
bc0b54e844 fix: keep gateway shutdown runtime stable across updates 2026-05-04 06:46:45 +01:00
Chris Zhang
cb7b2850e4 fix(build): externalize Feishu Lark SDK
Externalize @larksuiteoapi/node-sdk from the bundled Feishu ESM runtime so packaged startup loads the SDK as a plugin-local runtime dependency instead of inlining the SDK's ESM __dirname path.

Adds changelog credit and a tsdown-config regression assertion.

Fixes #76291.
Fixes #76494.

Co-authored-by: Chris Zhang <4436110+zqchris@users.noreply.github.com>
2026-05-02 23:27:13 -07:00
Vincent Koc
cb88d751b8 fix(build): externalize qrcode terminal 2026-05-02 10:51:02 -07:00
Peter Steinberger
a0d5372613 build(release): keep qrcode terminal external 2026-05-02 17:39:25 +01:00
Peter Steinberger
ed8f50f240 refactor: simplify plugin dependency handling
Simplify plugin installation and runtime loading around package-manager-owned dependencies, with Jiti reserved for local/TS fallback paths.

Also scans npm plugin install roots so hoisted transitive dependencies are covered by dependency denylist and node_modules symlink checks.
2026-05-01 21:32:22 +01:00
Peter Steinberger
569e1ea070 fix(release): preserve Docker package runtime deps 2026-05-01 21:05:42 +01:00
Peter Steinberger
6863694a22 fix(status): resolve packaged channel setup loader 2026-04-30 01:58:02 +01:00
Peter Steinberger
616f24fd49 refactor(gateway): consolidate lifecycle lazy boundary (#74105)
* refactor(gateway): consolidate lifecycle lazy boundary

* test(gateway): cover quoted lifecycle imports
2026-04-29 16:45:51 +01:00
Peter Steinberger
955b4df093 fix(ci): stabilize full release validation 2026-04-28 23:54:43 +01:00
Peter Steinberger
f7e942f571 fix(tasks): ship task registry control runtime 2026-04-28 06:18:30 +01:00
Peter Steinberger
1fbe83d09f fix: keep link understanding from dropping replies 2026-04-27 13:45:05 +01:00
Peter Steinberger
7ca2f9fed5 test(docker): align package harness image 2026-04-27 01:22:58 +01:00
Vincent Koc
d7cf803705 fix(plugins): preflight registry install migration 2026-04-25 04:59:52 -07:00
Vincent Koc
81aefb9a18 feat(plugins): migrate plugin registry on install 2026-04-25 04:59:52 -07:00
Peter Steinberger
229eb72cf6 build: exclude private QA from npm package 2026-04-15 09:39:51 -07:00
Vincent Koc
c727388f93 fix(plugins): localize bundled runtime deps to extensions (#67099)
* fix(plugins): localize bundled runtime deps to extensions

* fix(plugins): move staged runtime deps out of root

* fix(packaging): harden prepack and runtime dep staging

* fix(packaging): preserve optional runtime dep staging

* Update CHANGELOG.md

* fix(packaging): harden runtime staging filesystem writes

* fix(docker): ship preinstall warning in bootstrap layers

* fix(packaging): exclude staged plugin node_modules from npm pack
2026-04-15 12:04:31 +01:00
Ayaan Zaidi
aa0dc118f1 fix: preserve subagent registry runtime import path across source and dist (#66420)
* fix(build): correct subagent registry runtime import path

* fix: correct subagent registry runtime import path (#66420)

* fix: preserve subagent registry runtime import path across source and dist (#66420)
2026-04-14 13:52:24 +05:30
yongqiang li
6a5ff83b24 fix(build): include subagent-registry.runtime.js in dist output (#66205)
* fix: ensure subagent-registry.runtime.js is included in dist output

* fix(build): ship subagent registry runtime

* Update CHANGELOG.md

---------

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-04-14 09:00:40 +01:00
Peter Steinberger
b41091ac7f fix: quiet extension unresolved import warnings 2026-04-11 21:25:24 +01:00
Peter Steinberger
b3e7858051 build: stage nostr runtime dependencies 2026-04-08 20:05:55 +01:00
Peter Steinberger
cdbef11809 Build: include facade runtime sidecars 2026-04-07 07:57:58 +01:00
Peter Steinberger
0a69b3558a fix(build): stabilize lazy runtime entrypoints 2026-04-04 15:09:50 +01:00
Peter Steinberger
f59d0eac68 refactor(plugin-runtime): remove plugin-specific core seams 2026-04-03 13:08:39 +01:00
Peter Steinberger
e1da91791a build: externalize bundled plugin runtime deps 2026-03-31 15:22:08 +01:00
Peter Steinberger
9857d40923 fix(runtime): stabilize image generation auth/runtime loading 2026-03-30 01:14:29 +01:00
khhjoe
5f628c0bf8 build: copy acpx mcp-proxy.mjs to dist in runtime-postbuild 2026-03-30 05:09:59 +09:00