Commit Graph

25302 Commits

Author SHA1 Message Date
Peter Steinberger
c6b07d2f32 test: tighten acp session cwd assertions 2026-05-08 07:00:54 +01:00
Peter Steinberger
6e67a6374b test: dedupe model resolution assertions 2026-05-08 06:59:08 +01:00
Jesse Merhi
a9377fe667 Harden browser download output writes (#78780)
Summary:
- The PR exports `ensureAbsoluteDirectory` through the fs-safe/SDK runtime facades and routes browser download ... through safe output directory/file helpers with focused tests, a changelog entry, and SDK API hash updates.
- Reproducibility: yes. at source level: current main creates browser download/output roots with raw recursive ... jection coverage for that path. I did not run a live browser runtime reproduction in this read-only review.

Automerge notes:
- PR branch already contained follow-up commit before automerge: fix(browser): use fs-safe output directory helper
- PR branch already contained follow-up commit before automerge: docs(changelog): mention browser fs-safe hardening
- PR branch already contained follow-up commit before automerge: fix(browser): harden download output writes

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

Prepared head SHA: a9c9570f66
Review: https://github.com/openclaw/openclaw/pull/78780#issuecomment-4394146682

Co-authored-by: jesse-merhi <79823012+jesse-merhi@users.noreply.github.com>
Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
2026-05-08 05:57:23 +00:00
Peter Steinberger
ab192eb3f0 test: tighten helper assertion guards 2026-05-08 06:56:38 +01:00
Peter Steinberger
c9053ff208 fix(pairing): preserve narrowed token scopes on upgrade (#79206)
* fix(pairing): preserve narrowed token scopes on upgrade

* fix(pairing): require pending scopes for approval

* fix(pairing): type approval scope merge
2026-05-08 06:54:07 +01:00
sallyom
07e8aecb39 fix: speed up status json channel detection
Signed-off-by: sallyom <somalley@redhat.com>
2026-05-08 01:51:01 -04:00
Peter Steinberger
fc1d238909 fix: normalize gemini 3.1 config refs 2026-05-08 06:48:36 +01:00
Peter Steinberger
e7391fc2b6 fix(gateway): ignore malformed node catalog capabilities (#79205) 2026-05-08 06:47:36 +01:00
sallyom
eebbe41da2 fix(gateway): allow no-auth backend self-pairing
Signed-off-by: sallyom <somalley@redhat.com>
2026-05-08 01:42:46 -04:00
Ava Daigo
f29efde73a fix(gateway): scoped no-auth local backend bypass (#75781)
When gateway.auth.mode is 'none', the local backend self-pairing skip was
gated on sharedAuthOk, which stays false for no-auth mode. The missing-device
handler still rejected with 1008: device identity required.

Fix: shouldSkipLocalBackendSelfPairing now bypasses sharedAuthOk entirely
when authMethod is 'none' and the connection is local (direct_local or
shared_secret_loopback_local) without browser origin. Remote and
browser-originated connections still require proper device auth.

ClawSweeper P1: Make the none-auth backend bypass reachable
ClawSweeper P2: Test the reachable none-auth connect state

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-05-08 01:42:46 -04:00
Peter Steinberger
089dd91d69 test: tighten remaining defined assertions 2026-05-08 06:40:27 +01:00
Peter Steinberger
bd3f09e969 fix(doctor): avoid duplicate gateway runtime warnings (#79203) 2026-05-08 06:39:44 +01:00
Peter Steinberger
a360aa3c8c fix(gateway): require owner auth for managed image media (#79204) 2026-05-08 06:34:11 +01:00
Peter Steinberger
6eae017dd6 fix(agents): route pi default streams through transport (#79201) 2026-05-08 06:27:46 +01:00
Peter Steinberger
03c41eac2d test: invoke auth and reply callbacks 2026-05-08 06:26:42 +01:00
Gio Della-Libera
bc735f4fde feat(workspace): oc-path addressing substrate + openclaw path CLI (md/jsonc/jsonl/yaml) (#78678)
Implements #78051 — oc:// addressing substrate for workspace files.

New src/oc-path/ substrate (parser/formatter, per-kind parse+emit for
md/jsonc/jsonl/yaml, universal resolveOcPath/setOcPath/findOcPaths verbs,
sentinel emit guard) + openclaw path resolve|find|set|validate|emit CLI +
docs/cli/path.md reference page + CHANGELOG entry.

Co-authored-by: giodl73-repo <235387111+giodl73-repo@users.noreply.github.com>
Co-authored-by: galiniliev <5711535+galiniliev@users.noreply.github.com>
2026-05-07 22:26:28 -07:00
Peter Steinberger
11d0c5e42a test: invoke captured test callbacks 2026-05-08 06:23:20 +01:00
Peter Steinberger
41c5990d13 fix(auto-reply): resolve scp from path for media staging (#79202) 2026-05-08 06:20:37 +01:00
Peter Steinberger
8af475d9be test: tighten function-shape assertions 2026-05-08 06:19:37 +01:00
Peter Steinberger
87f9d5dbae test: align media temp path assertions 2026-05-08 06:10:06 +01:00
Peter Steinberger
d4eb40248a fix: normalize gemini 3 pro preview config 2026-05-08 06:08:58 +01:00
Peter Steinberger
8fc53e7937 fix: satisfy shell inline lint 2026-05-08 06:03:24 +01:00
Peter Steinberger
c659590d22 fix: restore external file write helper 2026-05-08 06:01:23 +01:00
sallyom
397cf2b9ff fix: clarify gateway version mismatch warnings 2026-05-08 00:59:42 -04:00
Peter Steinberger
9e58cc82c8 test: fix strict CI gates 2026-05-08 05:56:38 +01:00
Pavan Kumar Gondhi
fc065b2693 Harden macOS shell wrapper allowlist parsing [AI] (#78518)
* fix: harden shell wrapper allowlist parsing

* fix: harden shell wrapper approval binding

* docs: add changelog entry for PR merge

---------

Co-authored-by: Ishaan <ishaan@Ishaans-Mac-mini.local>
2026-05-08 10:18:41 +05:30
Peter Steinberger
eabae023eb perf: lazy load memory embedding runtime 2026-05-08 05:39:13 +01:00
Peter Steinberger
1f88cb2ce5 fix(gateway): persist macOS stop disable after bootout
Summary:
- carry forward #78412's macOS LaunchAgent bootout-by-default stop behavior and repair guard
- fix the remaining `gateway stop --disable` tail when the service is already not loaded after bootout
- add lifecycle regressions, docs, and changelog

Verification:
- pnpm install
- pnpm test src/cli/daemon-cli/lifecycle-core.test.ts src/cli/daemon-cli/lifecycle.test.ts src/daemon/launchd.test.ts
- pnpm exec oxfmt --check --threads=1 CHANGELOG.md src/cli/daemon-cli/lifecycle-core.ts src/cli/daemon-cli/lifecycle.ts src/cli/daemon-cli/lifecycle-core.test.ts src/cli/daemon-cli/lifecycle.test.ts docs/cli/gateway.md docs/gateway/index.md src/daemon/launchd.ts src/daemon/launchd.test.ts src/cli/daemon-cli/register-service-commands.ts src/cli/daemon-cli/types.ts src/daemon/service-types.ts
- git diff --check origin/main...HEAD
- pnpm build
- Parallels macOS Tahoe VM reproduce/fix proof in PR body
- PR checks green: Real behavior proof, auto-response, dispatch, label, label-issues

Co-authored-by: wdeveloper16 <25180374+wdeveloper16@users.noreply.github.com>
2026-05-08 05:35:21 +01:00
Peter Steinberger
fe79d85ae0 feat(imessage): add native imsg message actions
Adds native iMessage private-API message actions, lightweight message-tool discovery, bridge capability cache sharing, execution-time action gates, target alias coverage, and regression tests.
2026-05-08 05:34:22 +01:00
samzong
1819e41d26 fix(gateway): preserve node reconnect state (#78351)
Preserve node registry ownership across same-node WebSocket reconnect races so stale old-socket closes cannot clear the replacement session or complete the wrong pending invoke.

Thanks @samzong.
2026-05-08 12:32:18 +08:00
Peter Steinberger
9ef37d1907 test: tighten assertions and harness coverage 2026-05-08 05:28:12 +01:00
Alex Knight
b1eedb2fc8 Add ACP session load event ledger (#79093)
* Add ACP session load event ledger

* Record ACP prompts after send acceptance

* Support ACP ledger replay by session key

* Harden ACP ledger replay completeness

* Harden ACP ledger review gaps

* Fix ACP canonical session key handling

---------

Co-authored-by: Alex Knight <15041791+amknight@users.noreply.github.com>
2026-05-08 13:54:08 +10:00
Val Alexander
d12c92c216 fix(usage): roll up session lineage history
Summary:
- Roll up transcript-backed session usage across logical session lineage.
- Preserve lineage through /new and /reset rotations.
- Add Control UI usage scope controls with legacy gateway fallback.
- Refresh generated protocol and Control UI locale fallback surfaces.

Verification:
- pnpm test src/auto-reply/reply/session.test.ts ui/src/ui/controllers/usage.node.test.ts src/gateway/server-methods/usage.sessions-usage.test.ts
- pnpm protocol:check
- pnpm ui:i18n:check
- pnpm ui:build
- git diff --check
- PR CI green on 10f10850ee

Closes #50701.
2026-05-07 22:38:11 -05:00
Jerry-Xin
6ec4e5cf4a fix: check effective UID (geteuid) in root guard
assertNotRoot only checked process.getuid(), so the guard was bypassed
when the CLI was launched with a non-root real UID but an effective UID
of 0 (e.g. via a setuid-root wrapper). In that context the process still
has root write privileges and can cause the same state/config corruption
the guard was added to prevent.

Now checks both getuid() and geteuid() — either being 0 triggers the
guard. Added three tests covering setuid-root scenarios.
2026-05-07 23:31:03 -04:00
Jerry-Xin
ad461c74cc fix: narrow container bypass to require container hint
OPENCLAW_CLI_CONTAINER_BYPASS alone is an internal recursion sentinel,
not a user-facing opt-in. Require OPENCLAW_CONTAINER_HINT to also be
present — this combination only occurs in the container-forwarding flow
(container-target.ts), so inherited or accidental env vars can no
longer silently skip the root guard.
2026-05-07 23:31:03 -04:00
Jerry-Xin
5986c2d013 fix: enforce root guard unconditionally on legacy entrypoint
Remove the --help/--version exemption from the legacy entrypoint
(src/index.ts). Unlike src/entry.ts which has fast-path exits before
startup work, the legacy path always calls runCli() which runs dotenv
loading and debug capture initialization before rendering output. The
assertNotRoot() error message already shows the OPENCLAW_ALLOW_ROOT=1
escape hatch, so users can still discover the override.
2026-05-07 23:31:03 -04:00
Jerry-Xin
690c7aa263 fix: apply root guard to legacy CLI entrypoint in src/index.ts
runLegacyCliEntry now calls assertNotRoot() before runCli, matching
the protection already present in src/entry.ts. Help and version
invocations are exempted so users can still discover OPENCLAW_ALLOW_ROOT.
2026-05-07 23:31:03 -04:00
Jerry-Xin
a5f6668a5c fix: skip root guard for container-forwarded CLI
The container forwarder sets OPENCLAW_CLI_CONTAINER_BYPASS=1 but not
OPENCLAW_ALLOW_ROOT. When the child CLI inside a root-based container
hits assertNotRoot(), it would exit before command handling. Exempt
container-forwarded invocations from the root guard.
2026-05-07 23:31:03 -04:00
Jerry-Xin
225339abc8 test: use static import in root-guard tests
Replace dynamic import helper with a static import since root-guard.ts
has no module-level mutable state and vi.resetModules() is not used,
making the dynamic import unnecessary.
2026-05-07 23:31:03 -04:00
忻役
ca8121d22b fix: add root guard to prevent CLI execution as root (#67478)
Block openclaw CLI from running as root (uid 0) to prevent:
- Separate state directory at /root/.openclaw/
- Conflicting systemd user services racing on port 18789
- Root-owned files in the service user state dir (EACCES)

The guard runs early in src/entry.ts before any state/config operations.
Root-level --help and --version bypass the guard so users can discover
the OPENCLAW_ALLOW_ROOT=1 override. Subcommand help paths still enforce
the guard since they enter runCli() and resolve state directories.

Closes #67478
2026-05-07 23:31:03 -04:00
Val Alexander
4e983aa57b fix: hide retired google gemini chat models
Summary:
- Hide retired and non-public Google Gemini model IDs from Control UI/chat model catalogs.
- Route the bare gemini-3-pro alias to gemini-3.1-pro-preview.
- Keep models.list fallback rows filtered by manifest suppressions and update stale pricing-cache expectations.

Verification:
- pnpm test src/commands/models/list.list-command.forward-compat.test.ts src/commands/models/list.rows.test.ts extensions/google/manifest.test.ts extensions/google/model-id.test.ts extensions/google/provider-models.test.ts extensions/google/provider-policy-api.test.ts extensions/google/media-understanding-provider.video.test.ts src/plugin-sdk/provider-model-id-normalize.test.ts src/plugins/manifest-model-suppression.test.ts src/gateway/server-methods/models.test.ts ui/src/ui/chat-model-select-state.test.ts ui/src/ui/chat-model-ref.test.ts
- pnpm test src/gateway/model-pricing-cache.test.ts
- pnpm --silent openclaw models list --all --json --provider google / google-vertex hidden-row probe
- Testbox pnpm check:changed: https://github.com/openclaw/openclaw/actions/runs/25534551033
2026-05-07 22:20:07 -05:00
pashpashpash
fb106fb9ae fix codex harness service tiers (#79152) 2026-05-08 12:10:41 +09:00
sallyom
cbc69d9a96 fix: surface gateway version skew
Signed-off-by: sallyom <somalley@redhat.com>
2026-05-07 22:58:14 -04:00
Daev Mithran
9e1e59717f feat(plugin-sdk): add LLM completion API to plugin (#64294) 2026-05-07 19:27:48 -07:00
Omar Shahine
e259751ec9 feat(imessage): private-API support via imsg JSON-RPC [AI-assisted] (#78317)
Merged via squash.

Prepared head SHA: b7d336b296
Co-authored-by: omarshahine <10343873+omarshahine@users.noreply.github.com>
Co-authored-by: omarshahine <10343873+omarshahine@users.noreply.github.com>
Reviewed-by: @omarshahine
2026-05-07 19:20:18 -07:00
Peter Steinberger
bee3a7372e fix(cli): dispose agent harnesses on exit 2026-05-08 02:58:12 +01:00
Peter Steinberger
22657861c8 fix(agents): enable codex for openai overrides 2026-05-08 02:57:55 +01:00
Peter Steinberger
f463d471d3 fix(gateway): scope explicit live model registry 2026-05-08 02:57:30 +01:00
Josh Avant
83aad863fd Clarify exec filesystem policy drift (#79153)
* docs: clarify exec filesystem policy

* fix: warn on exec filesystem policy drift

* docs: clarify exec filesystem mutation surface
2026-05-07 20:05:19 -05:00
Peter Steinberger
e0cc5c0eee fix: preserve progress draft tool titles 2026-05-08 02:03:12 +01:00