Commit Graph

1913 Commits

Author SHA1 Message Date
Vincent Koc
d0bf9cc19e test(plugins): pin bundled hook registration surfaces 2026-04-22 12:20:21 -07:00
Vincent Koc
e1341941d5 test(plugins): guard legacy bundled hook regressions 2026-04-22 12:18:27 -07:00
Peter Steinberger
4b2b261367 fix(plugins): preserve source activation config 2026-04-22 19:26:12 +01:00
Vincent Koc
6d003cbcee fix(hooks): expose typed gateway startup context 2026-04-22 11:22:51 -07:00
Peter Steinberger
03846d63ec refactor: use memory slot defaults in core paths 2026-04-22 19:18:18 +01:00
Peter Steinberger
80a16339e1 refactor: declare channel add flags in manifests 2026-04-22 19:13:51 +01:00
Peter Steinberger
86667d670e refactor: move doctor capabilities to channel manifests 2026-04-22 19:05:53 +01:00
Vincent Koc
e593122465 fix(hooks): standardize outbound routing metadata 2026-04-22 10:53:44 -07:00
Peter Steinberger
9d66a900e5 fix(plugins): harden bundled runtime dep staging 2026-04-22 18:49:13 +01:00
Peter Steinberger
e9d16cbd8c test: keep loader fixture inside plugin boundary 2026-04-22 18:46:57 +01:00
Peter Steinberger
9d27d09d47 fix: add plugin load debug shape 2026-04-22 18:31:37 +01:00
Peter Steinberger
a2512f0243 fix: load staged dist-runtime plugins in docker 2026-04-22 18:22:39 +01:00
Tak Hoffman
f328c21046 feat: Add /models add hot-reload model registration (#70211)
* feat(models): add chat model registration with hot reload

* docs(changelog): add models entry for pr 70211

* fix(models): harden add flow follow-ups

* fix models add review follow-ups

* harden models add config writes

* tighten plugin boundary invariant

* move models add adapters behind sdk facades

* avoid ollama-specific core facade
2026-04-22 12:00:30 -05:00
Peter Steinberger
0f4ec84a2c fix: fail closed on plugin integrity drift 2026-04-22 14:59:52 +01:00
Nimrod Gutman
8778521167 fix(plugins): avoid doctor crash on legacy interactive state (#70135)
* fix(plugins): hydrate legacy interactive state

* fix(plugins): avoid doctor crash on legacy interactive state (#70135) (thanks @ngutman)
2026-04-22 14:17:09 +03:00
Vincent Koc
91ac485246 feat(tokenjuice): bundle the native adapter (#69946)
* feat(plugins): register embedded extension factories

* feat(tokenjuice): bundle the native adapter

* fix(tokenjuice): gate the bundled embedded extension seam

* fix(tokenjuice): refresh runtime sidecar baseline

* fix(plugins): harden bundled embedded extensions

* fix(plugins): install source bundled runtime deps

* fix(tokenjuice): sync lockfile importer

* fix(plugins): validate reused runtime dep versions

* fix(plugins): restore tokenjuice CI contract

* fix(plugins): remove tokenjuice dts bridge

* fix(tokenjuice): repair openclaw type shim

* fix(plugins): harden bundled runtime deps

* fix(plugins): keep source checkout runtime deps local

* fix(plugins): isolate bundled runtime dep installs

* fix(cli): keep plugin startup registration non-activating

* fix(cli): keep loader overrides out of plugin cli options
2026-04-21 23:58:37 -07:00
Alex Knight
201385548c perf(slack): narrow runtime-setter + lazy-load 4 modules + narrow 2 SDK surfaces (#69317)
Lazy load modules showing a ~50% gateway startup performance improvement
2026-04-22 16:42:43 +10:00
Peter Steinberger
053147451b docs: generalize plugin runtime comments 2026-04-22 07:13:15 +01:00
Peter Steinberger
4fbd314e1f refactor: gate setup promotion by manifest feature 2026-04-22 07:07:08 +01:00
Peter Steinberger
b70531bf24 docs: generalize core channel examples 2026-04-22 06:47:41 +01:00
Vincent Koc
6d6845ea9d fix(googlechat): harden google auth transport (#69812)
* fix(googlechat): localize google auth gaxios compat

* fix(googlechat): declare undici for staged runtime deps

* fix(googlechat): harden google auth transport

* fix(googlechat): narrow credential file reads

* fix(googlechat): preserve auth proxy transport

* fix(googlechat): allow symlinked auth files

* fix(googlechat): atomically load auth files

* fix(googlechat): eagerly buffer auth responses

* fix(googlechat): cap auth response buffering

* fix(googlechat): pin staged auth runtime deps

* fix(googlechat): buffer auth responses as array buffers

* Update CHANGELOG.md

* fix(googlechat): reject unstreamed auth responses

* fix(googlechat): use ambient fetch for auth transport

* fix(googlechat): keep guarded auth fetch on runtime path

* fix(googlechat): align staged zod range

* chore(lockfile): sync googlechat zod spec
2026-04-21 22:40:57 -07:00
Peter Steinberger
0285afe86f fix: stabilize testbox test suite 2026-04-22 06:29:13 +01:00
Peter Steinberger
7189b49f81 refactor: move media defaults into plugin manifests 2026-04-22 06:11:49 +01:00
Peter Steinberger
a99490fba4 fix(plugins): support root-owned bundled runtime deps 2026-04-22 05:02:35 +01:00
Shakker
3528a17b67 fix: scope static catalog discovery fallback 2026-04-22 04:51:38 +01:00
Shakker
754125947a fix: include partial provider discovery fallbacks 2026-04-22 04:51:38 +01:00
Shakker
d6c7b468ea fix: honor provider hook aliases in catalog filters 2026-04-22 04:51:38 +01:00
Shakker
f9bac5038c fix: harden static provider catalog path 2026-04-22 04:51:38 +01:00
Shakker
d73c31110b fix: harden static provider catalog listing 2026-04-22 04:51:38 +01:00
Shakker
04ecf284fc fix: use static provider catalogs for model listing 2026-04-22 04:51:38 +01:00
Peter Steinberger
e8f18f95d5 test(docker): cover slack bundled runtime deps 2026-04-22 03:40:37 +01:00
Peter Steinberger
f9b20c7d17 fix(plugins): repair bundled runtime deps during doctor 2026-04-22 03:40:37 +01:00
Peter Steinberger
0f4dc42767 build: update pi packages to 0.68.1 2026-04-22 03:35:15 +01:00
Peter Steinberger
de6f548a7c fix: suppress disabled channel read-only presence 2026-04-22 03:21:07 +01:00
Aaron U'Ren
8d021ee7bf perf(plugins): prefer native jiti for bundled plugin dist modules (#69925)
Merged via squash.

Prepared head SHA: 1b2da10865
Co-authored-by: aauren <1392295+aauren@users.noreply.github.com>
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Reviewed-by: @gumadeiras
2026-04-21 22:18:35 -04:00
Gustavo Madeira Santana
f4478a142a Fix channel presence gating for disabled plugins (#69862)
Merged via squash.

Prepared head SHA: f76f6212b2
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Reviewed-by: @gumadeiras
2026-04-21 20:51:09 -04:00
Gustavo Madeira Santana
819d15481d fix: validate plugin source entries before runtime inference (#69868)
Merged via squash.

Prepared head SHA: b67644cdda
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Reviewed-by: @gumadeiras
2026-04-21 20:12:19 -04:00
Gustavo Madeira Santana
66add9fcd9 perf(cli): lazy-load doctor plugin paths (#69840)
Merged via squash.

Prepared head SHA: ebf93ad913
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Reviewed-by: @gumadeiras
2026-04-21 18:17:19 -04:00
Peter Steinberger
aa94501f5f feat(openai): default images to gpt-image-2 2026-04-21 21:49:16 +01:00
Peter Steinberger
d7a173e60e feat(plugin-sdk): add presentation and skills runtime contracts 2026-04-21 21:29:44 +01:00
Gustavo Madeira Santana
6b185e2849 perf: speed up discord channel registration (#69791)
Merged via squash.

Prepared head SHA: 231d8763b4
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Reviewed-by: @gumadeiras
2026-04-21 15:48:08 -04:00
Peter Steinberger
0a6ce260ed fix(deps): keep qqbot connector plugin-local 2026-04-21 20:33:16 +01:00
Peter Steinberger
61564147f3 fix: break provider thinking import cycle 2026-04-21 19:19:03 +01:00
Peter Steinberger
bcfa781a1b fix: remap thinking levels on model switch 2026-04-21 18:53:49 +01:00
Gustavo Madeira Santana
24db09a19b fix(cli): keep channel status checks off plugin runtimes (#69479)
Merged via squash.

Prepared head SHA: 63f6e416a9
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Reviewed-by: @gumadeiras
2026-04-21 13:53:08 -04:00
Gustavo Madeira Santana
ddc1d9aa54 perf: speed up telegram channel registration (#69786)
Merged via squash.

Prepared head SHA: ac03f96e0d
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Reviewed-by: @gumadeiras
2026-04-21 13:24:28 -04:00
Gustavo Madeira Santana
13636c4521 perf(matrix): narrow register-time runtime surface (#69782)
Merged via squash.

Prepared head SHA: ec32828b52
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Reviewed-by: @gumadeiras
2026-04-21 12:50:53 -04:00
Alex Knight
4407df6c03 perf(plugin-sdk): per-phase + per-jiti-call probes for bundled channel entries (#69537)
* perf(plugin-sdk): per-phase + per-jiti-call probes for bundled channel entries

Extends the existing OPENCLAW_PLUGIN_LOAD_PROFILE infrastructure (see
src/plugins/loader.ts `profilePluginLoaderSync` and src/plugins/source-loader.ts)
with two new probe sites inside src/plugin-sdk/channel-entry-contract.ts:

1. `bundled-register:<phase>` — wraps each phase of `defineBundledChannelEntry`'s
   register() callback (`setChannelRuntime`, `loadChannelPlugin`, `registerChannel`,
   `registerCliMetadata`, `registerFull`). Lets us pinpoint which phase of plugin
   registration is responsible for cold-start cost on a per-plugin basis.

2. `bundled-entry-module-load` — instruments `loadBundledEntryModuleSync` and
   reports `getJitiMs` (jiti loader factory) vs `jitiCallMs` (actual graph walk
   + transpile + ESM linking) separately. Lets us distinguish alias-map / loader
   setup overhead from import-graph traversal cost on a per-module basis.

Both probes are gated on OPENCLAW_PLUGIN_LOAD_PROFILE=1 and have zero overhead
when the env flag is unset (early return before any `performance.now()` call).
Log format matches the existing `[plugin-load-profile]` line shape so existing
log scrapers continue to work.

The helper is a file-local mirror of `profilePluginLoaderSync` rather than a
new SDK export — keeps the SDK boundary narrow per src/plugin-sdk/AGENTS.md
and avoids cross-importing host internals.

Used to validate PR #69317 (slack startup perf) — measurements showed slack
`setChannelRuntime` dropping from 13183ms to 67ms after barrel narrowing,
which would have been undiagnosable without these per-phase probes.

* perf(plugins): per-plugin register() probe in plugin loader

Adds a `phase=${registrationMode}:register` probe wrapping each call to
`runPluginRegisterSync(register, api)` in src/plugins/loader.ts. Emits the
established `[plugin-load-profile]` line shape via `profilePluginLoaderSync`,
gated on OPENCLAW_PLUGIN_LOAD_PROFILE=1.

Two call sites are wrapped:
- The main load path (registrationMode is dynamic: "snapshot", "validate",
  "full") at the post-snapshot register block. Emits e.g.
  `phase=full:register plugin=slack elapsedMs=14102.1 source=...`
- The cli-metadata-only path (registrationMode hardcoded to "cli-metadata")
  for fast `--metadata` boot flows.

Together with the existing `phase=full` (entire load) and `phase=source-loader`
probes plus the `bundled-register:*` and `bundled-entry-module-load` probes
added in the previous commit, this gives a full breakdown:

- `phase=full plugin=slack` — total cost from import through register return
- `phase=full:register plugin=slack` — just the register() callback (NEW)
- `phase=bundled-register:setChannelRuntime plugin=slack` — sub-phase
- `phase=bundled-register:loadChannelPlugin plugin=slack` — sub-phase
- `phase=bundled-entry-module-load plugin=(bundled-entry)` — per-module load

Lets you `sort -k4 -n -r` the log output to find the slowest plugin's
register() call across all bundled+third-party plugins, then drill in via
the sub-phase probes for bundled entries.

* perf(plugins): consolidate plugin-load-profile primitives in shared module

Extracts the previously duplicated `shouldProfilePluginLoader` /
`profilePluginLoaderSync` helpers into a new `src/plugins/plugin-load-profile.ts`
module. Removes 3 file-local copies of the same env-flag check and 2
near-duplicate `try { run() } finally { console.error(...) }` wrappers.

Files updated:
- NEW src/plugins/plugin-load-profile.ts — sole owner of:
    shouldProfilePluginLoader()
    profilePluginLoaderSync<T>({phase, pluginId?, source, run, extras?})
    formatPluginLoadProfileLine({phase, pluginId?, source, elapsedMs, extras?})
- src/plugins/loader.ts — drop file-local copies, import shared helper
  (existing 4 + new 2 call sites unchanged in shape)
- src/plugins/source-loader.ts — drop renamed local copy
  (`shouldProfilePluginSourceLoader`), use shared helper with
  `pluginId: "(direct)"` to preserve the existing `plugin=(direct)` field
- src/plugin-sdk/channel-entry-contract.ts — drop file-local copies and
  inline `profileStep` closure; use shared `profilePluginLoaderSync` directly
  at all 5 `bundled-register:*` call sites; dual-timing
  `bundled-entry-module-load` probe uses `formatPluginLoadProfileLine` with
  ordered `extras` for `getJitiMs`/`jitiCallMs`

Log line format is byte-for-byte identical to before (validated against
3 cases: standard, with pluginId, dual-timing). The `extras` API is
intentionally an ordered tuple list (not a record) so that scrapers see
deterministic field order between `elapsedMs=` and `source=`.

Net: +155/-87 lines across 4 files, removing ~60 lines of duplication
while exposing a stable, documented probe surface.

Verified:
- pnpm tsgo (core) — 0 errors
- pnpm lint on all 4 files — 0 warnings, 0 errors
- pnpm test src/plugins/loader.test.ts — 102/102
- pnpm test src/plugins/contracts/plugin-entry-guardrails.test.ts — 7/7
- pnpm test src/plugin-sdk/channel-entry-contract.test.ts — 4/4
- Standalone formatter smoke test — output matches existing format byte-for-byte

* refactor(plugins): rename profilePluginLoaderSync to withProfile and bind scope at register sites

* fix(plugin-sdk): zero jiti sub-step timings on Win32 nodeRequire fast-path
2026-04-21 22:06:13 +10:00
Pavan Kumar Gondhi
31160dc069 fix(agents): enforce subagent envelope inheritance on ACP child sessions [AI-assisted] (#69383)
* fix: address issue

* fix: address review feedback

* fix: finalize issue changes

* fix: address PR review feedback

* address build faiure

* fix: address PR review feedback

* fix: address PR review feedback

* fix: address PR review feedback

* fix: address PR review feedback

* fix: address PR review feedback

* fix: address PR review feedback

* fix: address PR review feedback

* fix: address PR review feedback

* fix: address PR review feedback

* fix: address PR review feedback

* fix: address PR review feedback
2026-04-21 17:25:25 +05:30
Peter Steinberger
f1805ab54d fix: centralize provider thinking profiles 2026-04-21 09:13:35 +01:00