Commit Graph

2006 Commits

Author SHA1 Message Date
Peter Steinberger
6b4f6ca20c fix(plugins): avoid plugin sdk alias rewrite races 2026-04-24 18:22:24 +01:00
Peter Steinberger
f6dcf968ca fix: honor disabled plugin runtime deps 2026-04-24 17:46:35 +01:00
Vincent Koc
4d1ee3a73e fix(plugins): warn on install source package drift
Warn when provider or channel catalog package identity drifts from openclaw.install.npmSpec while keeping compatible catalogs non-fatal.
2026-04-24 09:31:40 -07:00
Peter Steinberger
f7a426d516 fix: stage WhatsApp runtime deps before setup login 2026-04-24 17:04:31 +01:00
Vincent Koc
bbe0234720 fix(plugins): warn on orphan install integrity (#71163) 2026-04-24 09:01:15 -07:00
Vincent Koc
5dfc1b90e1 fix(plugins): warn on invalid install default choice (#71011) 2026-04-24 08:56:42 -07:00
Peter Steinberger
f3bcea8732 build: preserve staged plugin runtime deps 2026-04-24 16:18:26 +01:00
EVA
c138368040 feat: add Codex harness extension seams
Co-authored-by: Eva <100yenadmin@users.noreply.github.com>
2026-04-24 09:32:27 +01:00
EVA
40be5ad581 fix: harden GPT-5 runtime paths
Co-authored-by: EVA <100yenadmin@users.noreply.github.com>
2026-04-24 08:55:52 +01:00
Vincent Koc
1e8dc2389e feat(plugins): record local onboarding installs
Record onboarding plugin install source metadata for npm and local paths, while keeping local path install records portable and preserving uninstall cleanup for relative source paths.
2026-04-24 00:27:09 -07:00
Peter Steinberger
661f11b947 test: align codex auth hint expectation 2026-04-24 08:25:07 +01:00
Vincent Koc
bcdacfa1b3 feat(diagnostics): carry trace context through hooks
Pass immutable diagnostic trace contexts through agent and tool hook surfaces, emit model usage with the run trace, and parent OTEL spans/logs from validated trace context without retained global state.\n\nThanks @vincentkoc.
2026-04-24 00:24:32 -07:00
Peter Steinberger
33c0cd1378 fix: improve codex model discovery 2026-04-24 08:17:01 +01:00
Vincent Koc
cb4fc58547 feat(plugins): move Bonjour discovery into bundled plugin
* fix(deps): detect constant dynamic imports in ownership audit

* feat(plugins): move bonjour discovery into bundled plugin

* test(plugins): remove moved bonjour core tests

* fix(plugins): harden bonjour disable and console restore

* fix(plugins): split gateway discovery ids from services

* fix(plugins): harden bonjour advertiser shutdown

* fix(plugins): clean up bonjour split lint
2026-04-23 23:29:51 -07:00
Vincent Koc
37c37eecfb feat(plugins): expose install source facts
* feat(plugins): expose install source facts

* fix(plugins): normalize install integrity facts

* fix(plugins): guard install source string fields

* fix(plugins): keep install source facts additive
2026-04-23 23:21:43 -07:00
Peter Steinberger
73288c20bd fix(channels): defer setup runtime deps until login 2026-04-24 06:40:25 +01:00
Patrick Erichsen
aca92b2906 memory/dreaming: decouple managed cron from heartbeat (#70737)
* Revert "fix(memory/dreaming): surface blocked status when heartbeat is disabled for main (#69875)"

This reverts commit 529577e045.

Making way for the dreaming-vs-heartbeat decoupling from Josh's
josh/dreaming-isolated-cron-fix branch, which moves the managed dreaming
cron to isolated agent turns (sessionTarget: "isolated") so dreaming no
longer requires heartbeat to fire. Once the cron no longer rides the
heartbeat path, the blocked-reason observability has nothing left to
report — removing it cleanly here before the cherry-picks land.

* openclaw-3ba.1: move managed dreaming cron to isolated agent turns

* openclaw-46d: claim cron runs before embedded attempts

* openclaw-575: disable managed dreaming cron delivery

* openclaw-575: accept wrapped dreaming cron tokens

* openclaw-ccd: filter cron and wrapper transcript noise from dreaming corpus

* openclaw-cd9: filter archived, cron, and heartbeat transcript noise from dreaming corpus

* openclaw-cd9: suppress role-label reflection tags in rem dreaming

* openclaw-b49: stop narrative timeouts from blocking dreaming cron

* openclaw-b49: keep managed dreaming cron out of diary subagents

* openclaw-ff9: restore cron dream diary generation without serial waits

* openclaw-ff9: run dreaming narratives with lightweight isolated subagent lanes

* openclaw-ff9: detach cron dream diary generation from run completion

* openclaw-ff9: defer cron diary task startup until after cron completion

* doctor/cron: migrate stale managed dreaming jobs to isolated agent turns

After the dreaming cron moved off the heartbeat path to sessionTarget:
"isolated" + payload.kind: "agentTurn" (see the preceding memory-core
changes), users with existing ~/.openclaw/cron/jobs.json entries in the
old sessionTarget: "main" + payload.kind: "systemEvent" shape still
carry stale jobs until the gateway restart reconcile rewrites them.

Add a dreaming-specific cron migration to the existing
maybeRepairLegacyCronStore doctor path so "openclaw doctor" (and
"openclaw doctor --fix") rewrites those jobs without needing a gateway
restart. Match lives in a new doctor-cron-dreaming-payload-migration
helper alongside the existing legacy-delivery and store-migration files.

The matching uses the memory-core managed-job name and description tag
plus the short-term-promotion payload token. Constants are mirrored
from extensions/memory-core/src/dreaming.ts and commented so a future
rename in memory-core is a visible drift point here too.

* memory/dreaming: tighten cron-token match to known wrapper, not substring

The previous match relaxed the line check from 'trimmed line equals token'
to 'line contains token anywhere as a substring' to accept the
`[cron:<id>] <token>` wrapper that isolated-cron turns add. Substring
matching also let any user message embedding the token mid-sentence
trigger the dream-promotion hook, and was flagged by both Greptile and
Aisle on PR #70737.

Replace it with strip-the-known-prefix-then-exact-match: keep the
`[cron:<id>]` wrapper case working, reject every other variant. Add
focused unit coverage that the bare token, the wrapped token, and bare
multiline cases match while embedded / code-fenced / arbitrarily-wrapped
variants do not.

* memory/dreaming: drop assistant followup only on assistant-side signals

Per PR #70737 review (aisle-research-bot, Medium): the previous logic
suppressed the next assistant message whenever the prior user message
matched a 'generated prompt' pattern (`[cron:...]`,
`System (untrusted): ...`, heartbeat prompts, exec-completion events).
Real users can type those same patterns, which let a user exfiltrate
real assistant replies from the dreaming corpus by prefixing their own
prompt — the assistant's reply would be silently dropped.

Remove the cross-message coupling. Assistant-side machinery (silent
replies, system wrappers) is already dropped by sanitizeSessionText,
which is the right layer for that filter. Add an explicit assistant-side
HEARTBEAT_TOKEN check to keep the legitimate `HEARTBEAT_OK` ack drop
working without depending on the prior user message. Add a regression
test exercising the spoofing scenario.

* doctor/cron: assert mirrored dreaming constants stay in sync

Per PR #70737 review (greptile-apps): the doctor migration mirrors three
constants (MANAGED_DREAMING_CRON_NAME, MANAGED_DREAMING_CRON_TAG,
DREAMING_SYSTEM_EVENT_TEXT) from extensions/memory-core/src/dreaming.ts.
A future rename in either file would silently break the migration.

Add a vitest unit that reads both files and asserts the literals match.
Manually verified the assertion fires with a clear error when one side
diverges. Adds no runtime cost; sits in the regular test pipeline.

* fix(memory): stabilize dreaming CI checks

* memory/dreaming: skip eager narrative session cleanup when detached

Per PR #70737 review (chatgpt-codex-connector, P2): runDreamingSweepPhases
called deleteNarrativeSessionBestEffort synchronously right after each
phase. Once narrative generation moved to detached mode (queued via
queueMicrotask), the eager cleanup races the writer: the session is
deleted before the queued subagent run reads it, silently dropping cron
diary entries.

Skip the eager cleanup branch when params.detachNarratives is true.
generateAndAppendDreamNarrative still runs its own deleteSession in the
finally{} block, so the cleanup intent is preserved without the race.
Heartbeat-driven (non-detached) runs keep the original eager-cleanup
behavior.

* fix(plugin-sdk): restore heartbeat-summary re-export

Per PR #70737 review (chatgpt-codex-connector, P1): the revert of
PR #69875 dropped the `heartbeat-summary` re-export from
`openclaw/plugin-sdk/infra-runtime`. That subpath shipped publicly two
days earlier, so removing it is technically a breaking change to a
public SDK surface — third-party plugins importing
`isHeartbeatEnabledForAgent` / `resolveHeartbeatIntervalMs` from this
path would fail with no replacement contract introduced.

Restore the re-export. Costs nothing to keep; the helpers are already
public via `../infra/heartbeat-summary.ts`. SDK additions are by
default backwards-compatible (CLAUDE.md), so removing within days of
introduction violates that intent.

* changelog: note dreaming decoupling from heartbeat

Refs PR #70737.

---------

Co-authored-by: Josh Lehman <josh@martian.engineering>
2026-04-23 22:23:19 -07:00
Vincent Koc
799a42bd13 feat(plugins): expose activation plan reasons (#70943) 2026-04-23 22:06:07 -07:00
Peter Steinberger
bfa6708c03 perf: narrow gateway runtime reset imports 2026-04-24 05:48:32 +01:00
Shakker
da6c29b3d9 fix: bound unscoped provider discovery fallback 2026-04-24 05:46:25 +01:00
Shakker
2e45218ae8 fix: keep live catalog providers on registry path 2026-04-24 05:46:25 +01:00
Shakker
6f04eee2a1 fix: keep static provider entries out of live discovery 2026-04-24 05:46:25 +01:00
Shakker
4737a86071 fix: preserve provider filtered catalog correctness 2026-04-24 05:46:25 +01:00
Peter Steinberger
569290c36d feat: add Google Meet paired-node Chrome transport 2026-04-24 05:31:32 +01:00
Vincent Koc
7acaebeaac Revert "refactor(plugins): track activation compat hints"
This reverts commit b1d0c14d38.
2026-04-23 21:01:53 -07:00
Vincent Koc
b1d0c14d38 refactor(plugins): track activation compat hints 2026-04-23 20:59:34 -07:00
Peter Steinberger
b5779b992f fix(plugins): mirror SDK alias for staged sidecars 2026-04-24 04:24:58 +01:00
Peter Steinberger
5d0887574b feat(plugin-sdk): add conversation binding hooks 2026-04-24 04:24:07 +01:00
Peter Steinberger
04066d246a feat: add browser realtime talk 2026-04-24 03:33:36 +01:00
Peter Steinberger
0daf51d645 fix(plugins): mirror sdk alias for external bundled deps 2026-04-24 03:27:04 +01:00
Peter Steinberger
b0244f613e fix(plugins): clean bundled runtime install stage 2026-04-24 03:27:04 +01:00
simonemacario
02a9dd0ddc fix(plugins): stage bundled-plugin runtime-dep install outside the plugin root
When a packaged bundled plugin's `pluginRoot` is used directly as the npm
execution cwd, `npm install <specs>` resolves the plugin's own
`package.json` as the project manifest and fails with
`EUNSUPPORTEDPROTOCOL: Unsupported URL Type "workspace:": workspace:*`
whenever that manifest declares a `workspace:` runtime dep (e.g.
`"@openclaw/plugin-sdk": "workspace:*"`). This takes out every plugin
with any runtime deps at gateway startup.

`ensureBundledPluginRuntimeDeps` already filters `workspace:` specs from
the CLI arguments, but npm's own resolver reads the cwd manifest
regardless, so the filter alone is not enough. The existing isolated
execution-root + `replaceNodeModulesDir` machinery handles this exact
problem for source-checkout + cache-hit installs. This change activates
the same staging path for the packaged case: when `installRoot ===
pluginRoot` and we are not in the source-checkout cache path, stage the
install inside `<pluginRoot>/.openclaw-install-stage` (which has a
minimal generated `package.json`) and move the produced `node_modules/`
back to the plugin root as before.

- Add regression test `stages plugin-root install when the plugin's own
  package.json declares workspace:* deps` covering the Docker scenario
  (mixed `workspace:*` + concrete runtime dep, e.g. anthropic-style
  `@openclaw/plugin-sdk` + `@anthropic-ai/sdk`).
- Update existing plugin-root-install expectations (`installs
  plugin-local runtime deps when one is missing`, `skips workspace-only
  runtime deps before npm install`, `installs deps that are only present
  in the package root`, `does not trust runtime deps that only resolve
  from the package root`, `does not treat sibling extension runtime deps
  as satisfying a plugin`) to assert the new `installExecutionRoot`.

Reported in #70844; same root cause as #70701, #70756, #70773, #70818,
#70839 which see the downstream "Cannot find package 'openclaw' from
plugin-runtime-deps" symptom because their
`resolveBundledRuntimeDependencyInstallRoot` resolves to an external
stage dir (clean manifest) so the install succeeds but the resulting
node_modules tree cannot satisfy the filtered-out workspace packages at
ESM import time.

## AI assistance

This PR was AI-assisted with Claude Code.

Testing degree: fully tested for the touched `bundled-runtime-deps`
install staging surface.

- `pnpm exec vitest run --config test/vitest/vitest.plugins.config.ts src/plugins/bundled-runtime-deps.test.ts` (31/31)
- `pnpm exec vitest run --config test/vitest/vitest.plugins.config.ts src/plugins/` (43/43 across 8 files)
- `pnpm exec tsgo --noEmit -p tsconfig.core.json`, `pnpm exec tsgo --noEmit -p tsconfig.core.test.json` (clean)
- `pnpm exec oxlint src/plugins/bundled-runtime-deps.ts src/plugins/bundled-runtime-deps.test.ts` (0 warnings, 0 errors)
- `node scripts/check-src-extension-import-boundary.mjs --json` and `node scripts/check-sdk-package-extension-import-boundary.mjs --json` (both `[]`)

I understand the code path changed here: packaged bundled plugins now
stage their runtime-dep install one directory below `pluginRoot` so npm
never reads the plugin's `workspace:*`-containing manifest during
install; after install completes, the produced `node_modules/` is moved
back to `pluginRoot` via the existing `replaceNodeModulesDir` helper.

Signed-off-by: Simone Macario <simone@sharly.ai>
2026-04-24 03:27:04 +01:00
Peter Steinberger
59a8afe6fa feat: add Google Meet participant plugin 2026-04-24 02:15:53 +01:00
Peter Steinberger
f04a3dced0 build: update Pi model dependencies 2026-04-24 01:24:46 +01:00
Peter Steinberger
f523bbfcd1 fix: align claude cli permissions with exec policy
Derive Claude CLI bypass mode from OpenClaw exec YOLO policy, preserve raw Claude permission-mode overrides, update docs/changelog, and cover global/per-agent policy behavior.
2026-04-23 23:11:34 +01:00
Vincent Koc
51f9f94cc3 fix(hooks): harden cli transcript loading (#70786) 2026-04-23 14:25:27 -07:00
Peter Steinberger
f6336c5521 fix(openai): retire removed Codex Spark model 2026-04-23 21:16:46 +01:00
Vincent Koc
ea25d7ed5b fix(qr): replace qrcode-terminal with qrcode-tui
Replace legacy qrcode-terminal usage with shared qrcode-tui media helpers, bound QR PNG rendering options, and raise bundled plugin host floors for the new SDK runtime surface.
2026-04-23 13:06:14 -07:00
Peter Steinberger
058e6f588a fix(openai): align Codex fallback with GPT-5.5 2026-04-23 21:03:26 +01:00
Peter Steinberger
ff56a9d41b test(openai): prefer canonical GPT refs 2026-04-23 20:47:39 +01:00
Peter Steinberger
384eb6bc66 feat(openai): use canonical GPT refs for Codex OAuth 2026-04-23 20:47:38 +01:00
Peter Steinberger
e93b3f60fa fix: harden openclaw peer dependency installs (#70462) 2026-04-23 20:28:02 +01:00
Anish Kataria
44820f859e fix(plugin-sdk): scan dependency tree before materialising openclaw symlink
The dependency-tree security scan rejects node_modules symlinks whose
targets resolve outside the install root. Our trusted host-to-plugin
symlink violates that rule by design, so running the scan AFTER
linkOpenClawPeerDependencies would fail every install with
SECURITY_SCAN_FAILED.

Reorder afterInstall so the scan runs first (walking only the plugin's
own staged source, catching any pre-existing malicious openclaw-named
symlink a source might smuggle in), then the trusted link is
materialised on the now-safe tree.

Also use braces on guard clauses in the new unit tests to satisfy the
oxlint no-unreachable-single-statement-if rule.
2026-04-23 20:28:02 +01:00
Anish Kataria
56dd249a07 test(plugin-sdk): add unit tests for linkOpenClawPeerDependencies
Tests three cases via installPluginFromDir:
- symlink created when peerDependencies declares openclaw
- no symlink when peer list is empty
- idempotent re-install replaces existing symlink
- warns and skips when host root cannot be resolved

Also removes the single-element Set in favour of a direct name
comparison (peerName === "openclaw"), and adds Closes #54428 to
address the same root cause in the weixin connector.

Closes #54428
2026-04-23 20:28:02 +01:00
anish k
2e9c1faef6 fix(plugin-sdk): symlink openclaw peerDependencies after plugin install
## Summary

Signed-off-by: anish k <ak8686@princeton.edu>
2026-04-23 20:28:02 +01:00
Peter Steinberger
cd5bc2fc93 test(openai): cover GPT-5.5 defaults 2026-04-23 20:19:15 +01:00
Peter Steinberger
a36903b94c feat(openai): default to GPT-5.5 2026-04-23 20:19:15 +01:00
Devin Robison
4c09f4a812 test(plugins): place shadow setup-api where the old cwd-fallback would actually resolve it 2026-04-23 20:17:21 +01:00
Devin Robison
993781e6e6 fix(plugins): ignore cwd setup-api fallback 2026-04-23 20:17:21 +01:00
YDYK
61e9e86d69 fix(plugins): use module path for bundled jiti loads 2026-04-23 20:13:13 +01:00