Commit Graph

976 Commits

Author SHA1 Message Date
sallyom
a859638cc2 fix: preserve node exec approvals for control ui
Signed-off-by: sallyom <somalley@redhat.com>
2026-05-06 22:59:53 -04:00
sallyom
bf2511098f fix: persist rotated gateway session files
Signed-off-by: sallyom <somalley@redhat.com>
2026-05-06 21:41:03 -04:00
Shakker
f011d6bc0a Fix repeated Codex native approval prompts after allow-always (#78234)
* fix: reuse codex native approvals

* fix: scope native approval reuse by session

* fix: let codex guardian own native permission approvals

* fix: refresh plugin approval protocol models

---------

Co-authored-by: pashpashpash <nik@vault77.ai>
2026-05-07 05:55:38 +09:00
Shakker
61223a74a4 chore: add coarse agent turn timeline spans 2026-05-06 17:33:46 +01:00
Jesse Merhi
1c42c77433 feat: add user input blocking lifecycle gates (#75035)
Summary:
- The PR adds a `before_agent_run` plugin hook with pass/block decisions, redacted blocked-turn persistence, diagnostics/docs/changelog updates, and focused runner, gateway, session, and plugin tests.
- Reproducibility: not applicable. as a feature PR rather than a current-main bug report. Current main lacks ` ... un`, while the PR head adds source coverage and copied live Gateway/WebChat log proof for the new behavior.

Automerge notes:
- PR branch already contained follow-up commit before automerge: fix: trim before agent hook PR scope
- PR branch already contained follow-up commit before automerge: fix: keep before-agent blocks redacted
- PR branch already contained follow-up commit before automerge: fix: keep runtime context out of model prompt
- PR branch already contained follow-up commit before automerge: docs: refresh config baseline after rebase
- PR branch already contained follow-up commit before automerge: fix: align blocked turn clients with redacted content
- PR branch already contained follow-up commit before automerge: fix: remove out-of-scope client block UI changes

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

Prepared head SHA: 767e46fde8
Review: https://github.com/openclaw/openclaw/pull/75035#issuecomment-4351843275

Co-authored-by: Jesse Merhi <jessejmerhi@gmail.com>
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-06 11:41:04 +00:00
Vincent Koc
7fd7f6f355 fix(gateway): mark chat slash commands as text 2026-05-06 03:24:59 -07:00
Peter Steinberger
b85b1c68d1 Refactor file access to use fs-safe primitives (#78255)
* refactor: use fs-safe primitives across file access

* fix: preserve invalid managed npm manifests

* fix: keep fs seams for startup metadata
2026-05-06 05:03:11 +01:00
Val Alexander
60171e8638 Keep Control UI responsive under slow status and history loads 2026-05-05 22:07:39 -05:00
Val Alexander
49c4a13231 fix(sessions): restore Control UI /new hooks
Fixes #76957.

Restores the Control UI /new hook lifecycle through an explicit sessions.create emitCommandHooks opt-in, preserving hook-free defaults for programmatic parent-session creates.

Validation:
- pnpm protocol:check
- pnpm test src/gateway/server.sessions.reset-hooks.test.ts ui/src/ui/app-render.helpers.node.test.ts
- pnpm exec oxlint on touched TS files
- pnpm exec oxfmt --check --threads=1 on touched files
- git diff --check
- OPENCLAW_LOCAL_CHECK=1 OPENCLAW_LOCAL_CHECK_MODE=throttled env NODE_OPTIONS=--max-old-space-size=4096 pnpm check:changed
- GitHub PR checks green on 3a446ec78e
- ClawSweeper re-review completed with no blocking findings and security cleared

Duplicate triage:
- #77376, #77004, and #76967 were superseded closed attempts for #76957
- #77562 is a closed duplicate issue
- #77880 mentions #76957 but is not a duplicate of this hook fix
2026-05-05 21:57:22 -05:00
Val Alexander
3110c621df fix(gateway): preserve mixed assistant history text
Preserve visible assistant text from mixed text/tool-use transcript turns in chat.history while keeping commentary-only assistant turns hidden.

Fixes #77374.

Verification:
- pnpm test src/gateway/server-methods/server-methods.test.ts src/gateway/server.chat.gateway-server-chat-b.test.ts
- pnpm exec oxfmt --check --threads=1 src/gateway/chat-display-projection.ts src/gateway/server-methods/server-methods.test.ts src/gateway/server.chat.gateway-server-chat-b.test.ts
- git diff --check
- pnpm changed:lanes --json
- PR CI passed on 048266c5a5
2026-05-05 21:56:56 -05:00
Peter Steinberger
e02ddf71af fix: guard managed talk room control 2026-05-06 02:39:15 +01:00
Peter Steinberger
f1636d5e28 refactor: unify talk session runtime 2026-05-06 02:39:15 +01:00
Peter Steinberger
466f718320 feat: wire talk handoff into native nodes 2026-05-06 02:39:15 +01:00
Peter Steinberger
c434d7720b feat: add unified talk gateway sessions 2026-05-06 02:39:15 +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
Frank Yang
1ddc2650c6 Fix WebChat display for Codex-generated local media (#77889)
* fix: stage webchat codex media before display

* fix: avoid staging sensitive webchat media

* fix: preserve webchat inline media replies

* fix: normalize mixed webchat media replies

* fix: suppress mixed media false warnings

* fix(gateway): preserve webchat audio media display
2026-05-06 08:48:34 +08:00
Peter Steinberger
2ead1502c9 feat: route outbound sends through durable lifecycle 2026-05-06 01:46:42 +01:00
Peter Steinberger
35da7d2c99 refactor: remove legacy agent dir resolver 2026-05-05 20:07:49 +01:00
Peter Steinberger
7188e4f4ad refactor: centralize agent run pending status 2026-05-05 18:21:58 +01:00
NVIDIAN
63de304102 feat(gateway): add SDK environment discovery RPCs (#74867) thanks @ai-hpc
Co-authored-by: ai-hpc <183861985+ai-hpc@users.noreply.github.com>
Co-authored-by: BunsDev <68980965+BunsDev@users.noreply.github.com>
2026-05-05 08:59:03 -05:00
Vincent Koc
b8f9137d31 test(gateway): preserve dispatch timers in waiter 2026-05-05 00:07:42 -07:00
Vincent Koc
e2eb5649d1 test(gateway): keep startup context timer live 2026-05-05 00:04:02 -07:00
clawsweeper[bot]
cd66854b66 feat(cron): add agentId filtering to cron list (#77602)
Summary:
- This PR adds optional `agentId` filtering to `cron.list`, auto-fills it for agent tool calls, exposes `openclaw cron list --agent`, updates generated protocol clients, docs, changelog, tests, and prompt fixtures.
- Reproducibility: yes. The motivating behavior is source-reproducible on current main because cron tool, CLI, ... e list paths do not accept or apply `agentId`; the PR diff adds that path with focused regression coverage.

Automerge notes:
- Ran the ClawSweeper repair loop before final review.
- Included post-review commit in the final squash: chore: regenerate protocol schema after adding agentId to CronListParams
- Included post-review commit in the final squash: feat(cron): add agentId filtering to cron list

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

Prepared head SHA: 35b692bc97
Review: https://github.com/openclaw/openclaw/pull/77602#issuecomment-4375631700

Co-authored-by: zhanggttry <zhanggttry@163.com>
Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
2026-05-05 06:06:24 +00:00
Satoshi F.
103cdd9d96 fix(gateway): add safe restart coordinator (#76923)
Add a safe restart coordinator that preflights active Gateway work before restart.

- expose gateway.restart.preflight and gateway.restart.request RPC methods
- add explicit openclaw gateway restart --safe / openclaw daemon restart --safe path
- narrow restart blockers to running non-ended tasks so queued records no longer block indefinitely
- keep existing restart behavior unchanged; --force remains the immediate override

Co-authored-by: NikolaFC <54186359+NikolaFC@users.noreply.github.com>
Co-authored-by: galiniliev <5711535+galiniliev@users.noreply.github.com>
2026-05-04 10:58:36 -07:00
Pavan Kumar Gondhi
0e702f1063 fix(gateway): clamp unbound websocket auth scopes [AI] (#77413)
* fix: clamp unapproved trusted proxy websocket scopes

* addressing claude review

* addressing claude review

* addressing ci

* addressing ci

* docs: add changelog entry for PR merge
2026-05-04 23:16:07 +05:30
Kevin Lin
89db1e5440 feat(cron): surface run diagnostics in status (#75928)
* feat(cron): surface run diagnostics in status

* docs: add cron diagnostics changelog

* fix(cron): preserve latest run diagnostics

* test(cron): update diagnostics regression deps
2026-05-04 07:05:28 -07:00
Peter Steinberger
66267b5435 docs: clarify Pi transcript ownership 2026-05-04 06:10:33 +01:00
Peter Steinberger
0fcf2c64c0 fix: prevent persisted turn replay 2026-05-04 06:00:01 +01:00
Peter Steinberger
7d26fb32a7 fix: preserve sudo shell carrier commands 2026-05-04 05:53:03 +01:00
Peter Steinberger
419bcd26f0 docs: clarify webchat transcript persistence 2026-05-04 01:40:48 +01:00
Peter Steinberger
c3f5c20f2c fix(cli): retry admin device approval after ownership denial 2026-05-04 00:41:55 +01:00
Val Alexander
bd2f8560fe fix(gateway): dedupe active WebChat sends
Collapse duplicate in-flight internal WebChat text sends onto the active Gateway run so rapid repeat submits do not start fresh `agent:main:main` dispatches.

- Add active-run scoped internal text-send dedupe in `chat.send`.
- Exclude slash commands, attachments, explicit delivery routes, non-internal origins, and completed runs.
- Cover the behavior with a Gateway chat regression test.
- Credit both the reporter and BunsDev in the Unreleased changelog entry.

Validation:
- `pnpm docs:list`
- `git diff --check`
- `pnpm check:changelog-attributions`
- `pnpm exec oxfmt --check --threads=1 src/gateway/server-methods/chat.ts src/gateway/server.chat.gateway-server-chat-b.test.ts`
- `pnpm test src/gateway/server.chat.gateway-server-chat-b.test.ts -t "duplicate WebChat" -- --reporter=dot`
- Blacksmith Testbox `OPENCLAW_TESTBOX=1 pnpm check:changed`
- GitHub PR security/stability checks for head `6884240414997228a136f0fbb85b73a8db4b7fae`

Fixes #75737.
2026-05-03 16:30:17 -05:00
Marvinthebored
a64b30705f fix(usage): serve usage from durable transcript aggregate cache
Serve usage.cost and sessions.usage from a durable transcript aggregate cache with guarded refreshes, cache-status UI localization, and regression coverage. Thanks @Marvinthebored.
2026-05-03 20:04:26 +01:00
Peter Steinberger
bd0e10a2f6 refactor: route inline eval through command analysis 2026-05-03 18:06:10 +01:00
Peter Steinberger
3f7e6eebc2 refactor: unify command analysis for exec approvals 2026-05-03 18:06:10 +01:00
Peter Steinberger
928c70fb6b perf(gateway): trim startup watcher imports 2026-05-03 14:30:36 +01:00
Craig
baf8b8effe fix: continue update runs after restart (#74362) (thanks @100menotu001) 2026-05-03 18:13:25 +05:30
Vincent Koc
b74401074b fix(gateway): keep models list read-only fast
Fixes https://github.com/openclaw/openclaw/issues/76382
2026-05-03 00:10:54 -07:00
Marvinthebored
73a95d3af4 fix(gateway): read-only persisted fast path for models.list catalog (#76406)
* fix(gateway): read-only fast path for models.list catalog loading

The gateway model catalog refresh calls loadModelCatalog without
readOnly, triggering ensureOpenClawModelsJson (60-70s), full PI SDK
registry instantiation, auth storage discovery, and live provider
plugin augmentation on every Control UI list/refresh. None of this
is needed for a read-only UI listing.

Three changes:

1. Gateway catalog refresh now passes readOnly: true to loadModelCatalog.
2. In readOnly mode, skip augmentModelCatalogWithProviderPlugins — live
   provider discovery is explicit admin/background work, not a UI list
   operation.
3. Add a persisted models.json fast path: when readOnly is true, first
   try reading the existing models.json directly and converting
   providers.<provider>.models[] to catalog rows. Falls back to the
   full PI registry path if the file is missing or unreadable.

Observed improvement on a production install:
  loadGatewayModelCatalog: 967 entries / 4651ms → 89 entries / 8ms
  Live models.list during startup: ~18s → ~2s

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(gateway): preserve full model catalog view

* fix(agents): preserve read-only catalog defaults

* fix(agents): preserve provider catalog defaults

---------

Co-authored-by: Marvinthebored <peter@lindsey.jp>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-05-02 22:48:55 -07:00
Josh Avant
ba31afb099 fix(discord): surface stalled transport health (#76327)
* fix(discord): surface stalled transport health

* fix(discord): surface stalled transport health

* fix(discord): surface stalled transport health

---------

Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
2026-05-02 22:33:19 -05:00
clawsweeper[bot]
c149046c45 fix(gateway,agent): only enforce session sendPolicy=deny when delivering (#76317)
Summary:
- This PR gates gateway `agent` send-policy rejection on `request.deliver === true`, adds denied non-delivery  ... plicit-delivery regression coverage, updates a gateway chat expectation, and adds a #73381 changelog entry.
- Reproducibility: yes. from source inspection: current main resolves `sendPolicy` and rejects before delivery ... agent` request with `deliver` omitted or false. I did not run local tests because this review is read-only.

Automerge notes:
- PR branch already contained follow-up commit before automerge: fix(gateway,agent): only enforce session sendPolicy=deny when delivering

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

Prepared head SHA: 5cfcb1c584
Review: https://github.com/openclaw/openclaw/pull/76317#issuecomment-4364987993

Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
Co-authored-by: wenxu007 <270593229+wenxu007@users.noreply.github.com>
2026-05-03 02:05:23 +00:00
clawsweeper[bot]
00de585574 fix(gateway): preserve err.stack when chat.send/agent attachment parsing fails (#76351)
Summary:
- Adds stack-preserving gateway error logging for `chat.send` and agent attachment parse/stage failures, focused tests, and an Unreleased changelog entry.
- Reproducibility: yes. for the diagnostic gap: current main shows both affected catches returning `String(err ... g `Error` or `MediaOffloadError` values. I did not reproduce the separate iPad/Tailscale RangeError itself.

Automerge notes:
- PR branch already contained follow-up commit before automerge: fix(gateway): preserve err.stack when chat.send/agent attachment pars…

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

Prepared head SHA: 0e9bd18b31
Review: https://github.com/openclaw/openclaw/pull/76351#issuecomment-4365116612

Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
Co-authored-by: keen0206 <233564226+keen0206@users.noreply.github.com>
2026-05-03 01:40:27 +00:00
Val Alexander
05c9492bff fix: reduce WebUI session latency churn (#76277) thanks @BunsDev
Reduce WebUI/Gateway latency churn by avoiding redundant session reloads, carrying session keys through transcript update events, and deferring explicit media provider discovery. Includes changelog attribution and closes the referenced runtime latency issues.
2026-05-02 18:39:06 -05:00
Peter Steinberger
68359cacbf feat(webchat): add server-side dictation (#76021)
Summary:
- This PR adds WebChat server-side dictation through a new authenticated `chat.transcribeAudio` Gateway RPC, MediaRecorder composer controls, docs/changelog updates, and focused gateway/UI tests.
- Reproducibility: yes. Current main reproduces the missing feature by inspection: the Gateway method list, write scopes, docs, and WebChat voice-control test have no `chat.transcribeAudio` server-dictation path.

ClawSweeper fixups:
- Included follow-up commit: feat(webchat): add server-side dictation
- Included follow-up commit: fix(clawsweeper): address review for automerge-openclaw-openclaw-7602…

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

Prepared head SHA: 850571380a
Review: https://github.com/openclaw/openclaw/pull/76021#issuecomment-4363514226

Co-authored-by: Peter Steinberger <steipete@gmail.com>
Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
2026-05-02 23:09:23 +00:00
Peter Steinberger
43de6ae725 perf(gateway): avoid extra session-list store work 2026-05-02 17:01:44 +01:00
Val Alexander
4532e5d858 fix(control-ui): preserve Stop after reconnect
Fixes #70991.

Adds authenticated Gateway WebSocket protocol pings, exposes active session-run state to Control UI, and keeps session-scoped Stop available after reconnect or reload when the browser lost the local run id.

Validation:
- pnpm test ui/src/ui/app-chat.test.ts ui/src/ui/app-gateway.node.test.ts src/gateway/server.sessions.list-changed.test.ts src/gateway/server/ws-connection.test.ts
- OPENCLAW_LOCAL_CHECK=1 OPENCLAW_LOCAL_CHECK_MODE=throttled pnpm check:changed
- GitHub CI and high-signal security checks passed on head 1f4c8728c8
2026-05-02 10:41:27 -05:00
Peter Steinberger
1d5c77c443 fix(gateway): include active plugin tools in catalog 2026-05-02 15:15:52 +01:00
Peter Steinberger
f7ed29e118 fix: thread session write-lock timeout config 2026-05-02 14:54:54 +01:00
Peter Steinberger
afbc395dda fix(gateway): load plugin tools for catalog 2026-05-02 14:52:27 +01:00
Peter Steinberger
0ea28ddb16 fix: speed up exact session lookups 2026-05-02 14:29:36 +01:00