Commit Graph

3863 Commits

Author SHA1 Message Date
Peter Steinberger 797bcd5bdb fix: propagate ClickClack toolsAllow through replies
Propagate ClickClack account-level runtime tool allowlists through inbound reply dispatch so restricted ClickClack accounts keep their tool policy when model/agent replies are generated.

This threads `toolsAllow` through shared dispatch, provider wrappers, embedded agent execution, and ACP hook events. ACP-bound sessions now fail closed for restrictive runtime allowlists because ACPX cannot enforce per-turn tool allowlists on reused persistent sessions.

Verification:
- Live ClickClack E2E on Crabbox AWS `run_6a0472ed7e71`, provider `aws`, id `cbx_dace25addcaa`.
- `node scripts/run-vitest.mjs run src/auto-reply/reply/dispatch-acp.test.ts src/plugin-sdk/acp-runtime.test.ts src/auto-reply/reply/dispatch-from-config.reply-dispatch.test.ts src/auto-reply/dispatch.test.ts src/auto-reply/reply/agent-runner-execution.test.ts src/auto-reply/reply/provider-dispatcher.test.ts extensions/clickclack/src/inbound.test.ts --reporter=verbose`
- Crabbox changed gate `run_d32af37fb265`, provider `aws`, id `cbx_8236876017c9`: `corepack pnpm check:changed`
- Autoreview clean: `.agents/skills/autoreview/scripts/autoreview --mode branch --base origin/main`

Supersedes #89500.

Co-authored-by: Michael Appel <mappel@nvidia.com>
2026-06-05 08:40:35 -07:00
Marcus Castro dd2083c7ec fix(whastapp): bound connection startup waits (#90486)
* fix: add timeout to waitForWaConnection to prevent indefinite hangs

If Baileys fails to emit a 'connection.update' event with either 'open'
or 'close' status (e.g. due to network issues or internal errors), the
waitForWaConnection promise hangs forever, blocking the entire monitor
loop.

Add a configurable timeout (default 60s) that rejects the promise and
cleans up the event listener if no connection state is received in time.
The timeout is backward-compatible as an optional parameter with a
sensible default.

* test: add coverage for waitForWaConnection timeout path

- Test that promise rejects with descriptive error after timeout
- Test that event listener is cleaned up after timeout
- Test that timer is cleared when connection opens before timeout

* fix: default timeoutMs to 0 to preserve QR login behavior

The 60s default broke the QR login flow in login-qr.ts, which calls
waitForWaConnection without a timeout and expects to wait up to 3 minutes
while the user scans. Change the default to 0 (wait forever, matching
original behavior) and pass the 60s timeout explicitly at the monitor
callsite where it's actually needed.

* fix: bound whatsapp connection startup waits

* fix: align web channel wait contract

* fix: retry whatsapp setup timeouts

* fix: satisfy whatsapp status lint

* fix: preserve whatsapp wait compatibility

---------

Co-authored-by: MMMMSSSS8899 <praelovk@gmail.com>
2026-06-04 21:45:43 -03:00
Peter Steinberger 725ddd11cc docs: document remaining plugin runtime files 2026-06-04 19:54:07 -04:00
Peter Steinberger d2d14d5793 docs: document plugin contract tests 2026-06-04 19:52:26 -04:00
Peter Steinberger f25c246f6b docs: document plugin runtime helpers 2026-06-04 19:48:26 -04:00
Shakker 6bb91b2971 test: fence embedding provider secrets env 2026-06-04 23:06:33 +01:00
Shakker 1a4732410a test: scope host hook contract state 2026-06-04 22:49:01 +01:00
Shakker 9932ba7359 test: wrap session projection stores 2026-06-04 21:06:04 +01:00
Mason Huang 8b29ff5f16 fix(ci): scope PR merge diff checks to first parent (#90287)
Summary:
- This PR adds opt-in first-parent merge-head diff-base handling for CI changed-scope, changed-lanes, and OpenGrep PR scans, plus synthetic merge coverage and small lint/type cleanups.
- PR surface: Source +6, Tests +204, Config +1, Other +179. Total +390 across 15 files.
- Reproducibility: yes. The synthetic merge tests and PR body live-ref proof show the stale payload-base path can include main-only files, and first-parent mode narrows it to PR-owned paths.

Automerge notes:
- PR branch already contained follow-up commit before automerge: fix(ci): update workflow guard expectations
- PR branch already contained follow-up commit before automerge: fix(ci): resolve plugin guardrail lint failures
- PR branch already contained follow-up commit before automerge: fix(ci): preserve plugin run context typing
- PR branch already contained follow-up commit before automerge: fix(ci): scope PR merge diff checks to first parent

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

Prepared head SHA: 40235e8c3d
Review: https://github.com/openclaw/openclaw/pull/90287#issuecomment-4621155576

Co-authored-by: Mason Huang <masonxhuang@tencent.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: hxy91819
Co-authored-by: hxy91819 <8814856+hxy91819@users.noreply.github.com>
2026-06-04 17:24:03 +00:00
Vincent Koc 59777971d2 fix(plugins): remove stale run context generic 2026-06-04 15:00:21 +02:00
Peter Steinberger 0135a0a780 docs: document image generation runtime 2026-06-04 05:00:21 -04:00
Peter Steinberger f4d2748ca5 docs: document plugin metadata utilities 2026-06-04 04:57:48 -04:00
Peter Steinberger 7c1deea5fa docs: document plugin setup state 2026-06-04 04:54:37 -04:00
Peter Steinberger f875b519e5 docs: document plugin host contracts 2026-06-04 04:51:24 -04:00
Peter Steinberger 040ebadfc5 docs: document plugin runtime contracts 2026-06-04 04:48:42 -04:00
Peter Steinberger f91fab8b18 docs: document plugin manifest helpers 2026-06-04 04:46:27 -04:00
Peter Steinberger a77f20a6d6 docs: document plugin registry helpers 2026-06-04 04:44:12 -04:00
Peter Steinberger 4d54d196c9 docs: document plugin discovery helpers 2026-06-04 04:41:47 -04:00
Peter Steinberger fffd72f36d docs: document plugin compatibility helpers 2026-06-04 04:38:31 -04:00
Peter Steinberger 21572415c8 docs: document plugin lifecycle helpers 2026-06-04 04:36:44 -04:00
Peter Steinberger f6049db20f docs: document plugin discovery helpers 2026-06-04 04:34:19 -04:00
Peter Steinberger 6de517cbcb docs: document plugin registry helpers 2026-06-04 04:31:52 -04:00
Peter Steinberger 507e237d8c docs: document plugin command helpers 2026-06-04 04:29:53 -04:00
Peter Steinberger 6082f01b97 docs: document plugin loader helpers 2026-06-04 04:27:23 -04:00
Peter Steinberger d33664aef0 docs: document plugin provider helpers 2026-06-04 04:25:18 -04:00
Peter Steinberger 8975f75c8b docs: document plugin public surface helpers 2026-06-04 04:22:45 -04:00
Peter Steinberger 463e9f2704 docs: document plugin install metadata helpers 2026-06-04 04:21:07 -04:00
Peter Steinberger ee282c6de5 docs: document plugin auth helpers 2026-06-04 04:19:03 -04:00
Peter Steinberger 6d6aba2be5 docs: document plugin runtime helpers 2026-06-04 04:17:40 -04:00
Peter Steinberger a6d084113a docs: document plugin install helpers 2026-06-04 04:15:33 -04:00
Peter Steinberger 6a2b1b2198 docs: document plugin metadata helpers 2026-06-04 04:14:06 -04:00
Peter Steinberger e8e6c684bb docs: document tui and plugin helpers 2026-06-04 04:12:38 -04:00
Vincent Koc 474be452a7 test: align dependency override guard with workspace metadata 2026-06-04 04:07:15 +02:00
Vincent Koc c286f56167 test: align e2e fixtures with current runtime stores 2026-06-04 03:29:37 +02:00
Peter Steinberger 179ff9b423 docs: document plugin registry helper APIs 2026-06-03 21:03:43 -04:00
Peter Steinberger 9b6cd2ea75 docs: document plugin security channel helpers 2026-06-03 21:01:33 -04:00
Brian 7b5f75eb98 Pin official npm plugin install records (#88585)
* fix(plugins): pin official npm install records

* fix(infra): tolerate equivalent plugin install migrations

* fix(plugins): preserve manual exact plugin pins

* fix(infra): remove stale migration imports

* chore: unblock ci guards

* fix: preserve official sync integrity checks

* fix: avoid prerelease integrity carryover

* fix: preserve manual official npm specs

* fix: preserve beta fallback integrity checks

* fix: preserve trusted prerelease fallback integrity

* fix: preserve prerelease-only integrity checks

* fix: pin unchanged official npm records

* fix: allow official compatible fallback updates

* fix: preserve fallback integrity after prerelease resolution

* fix: skip incompatible fallback integrity pins

* fix: preserve pin-only install provenance

* fix: check integrity when repairing missing official pins

---------

Co-authored-by: Lilac <lilac@Lilacs-iMac.local>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-06-03 17:58:09 -07:00
Peter Steinberger d1fef1d50d docs: document plugin runtime config helpers 2026-06-03 20:54:08 -04:00
Vincent Koc 392af2e612 fix(deps): keep managed overrides in workspace metadata 2026-06-03 17:43:09 -07:00
Peter Steinberger 69c8097dd1 docs: document plugin overlay memory helpers 2026-06-03 20:41:35 -04:00
Peter Steinberger fd5dc5bb3a docs: document plugin catalog install helpers 2026-06-03 20:39:16 -04:00
Peter Steinberger f6aa2c02d1 docs: document plugin runtime load context 2026-06-03 20:36:52 -04:00
Peter Steinberger 7b4d14f786 docs: document plugin runtime helper APIs 2026-06-03 20:34:17 -04:00
Peter Steinberger 58f7d7e5f8 docs: document plugin scope state helpers 2026-06-03 20:30:38 -04:00
Peter Steinberger 0ad13b714e docs: document plugin manifest install helpers 2026-06-03 20:28:45 -04:00
Peter Steinberger bb8192ff7c docs: document plugin hook provider helpers 2026-06-03 20:26:18 -04:00
Peter Steinberger c5d52bf2a7 docs: document plugin runtime utilities 2026-06-03 20:22:56 -04:00
Peter Steinberger 06ad1d0d74 docs: document plugin public artifact helpers 2026-06-03 20:21:16 -04:00
Peter Steinberger 27b1d05a1d docs: document plugin runtime status helpers 2026-06-03 20:19:17 -04:00
Peter Steinberger 02c6630f11 docs: document plugin install helpers 2026-06-03 20:17:55 -04:00