Commit Graph

32643 Commits

Author SHA1 Message Date
Peter Steinberger
45b5f876dd fix: reject blank cron payloads 2026-05-31 23:20:04 -04:00
Vincent Koc
aab1e727c6 refactor: share chat abort authorization helpers 2026-06-01 05:16:37 +02:00
Vincent Koc
a46d331723 fix(ci): reword durable final alias comment 2026-06-01 04:12:46 +01:00
Vincent Koc
9dd7f04b71 fix(ci): repair phone control and cron schema gates 2026-06-01 04:06:25 +01:00
Vincent Koc
6e985931de refactor: share models list test helper 2026-06-01 05:05:20 +02:00
Vincent Koc
dc1cfcc28d refactor: share tasks handler test helpers 2026-06-01 05:05:20 +02:00
Peter Steinberger
ee6373aa5f fix: preserve cron failure destination clears 2026-05-31 23:04:31 -04:00
Peter Steinberger
6deded6698 fix: raise bootstrap file default limit 2026-06-01 04:02:51 +01:00
Vincent Koc
f42cf9059e fix(ci): repair phone control and cron schema gates 2026-06-01 04:00:18 +01:00
Vincent Koc
be967545c5 fix(plugins): fail closed on trusted policy errors
Fail closed when bundled trusted tool policy registry, registration, owner id, evaluation, or decision reads fail, so malformed trusted-policy state cannot crash diagnostics or accidentally allow a tool call.

Route before-tool-call diagnostics through guarded trusted-policy readers and keep healthy no-op policy behavior unchanged.

Add focused host-hook contract and before-tool-call e2e coverage for the new fail-closed paths.

PR: #88394
2026-05-31 22:57:38 -04:00
Vincent Koc
c5eddadd9d refactor: share channel start test helpers 2026-06-01 04:40:21 +02:00
Vincent Koc
98b8e85beb refactor: share agent wait dedupe test helpers 2026-06-01 04:35:37 +02:00
Peter Steinberger
1e7510ae10 docs: continue inline comment pass (#88849)
Adds broad inline comments and JSDoc for CLI, cron, outbound/channel, plugin SDK, ACP, shared helpers, net policy, and related utility contracts. Proof: git diff --check on latest exact head plus focused cron tests passed; CI had no failing checks observed before merge attempt.
2026-05-31 22:32:28 -04:00
Vincent Koc
822864c539 refactor: share channel status test helpers 2026-06-01 04:24:57 +02:00
Vincent Koc
a7ae3f6707 refactor: share usage session test state setup 2026-06-01 04:24:57 +02:00
Peter Steinberger
44765cfabe fix(acpx): seed Codex ACP auth from API key 2026-05-31 22:24:29 -04:00
Andy Ye
921598442a fix(hooks): expose inbound reply metadata before dispatch
Fixes #88521.

Expose finalized inbound reply metadata on plugin-visible hook payloads so before_dispatch and message hooks can implement reply-aware behavior without channel-specific workarounds.
2026-05-31 22:15:17 -04:00
Peter Steinberger
e72def6983 Persist Discord thread bindings in SQLite (#88866)
* refactor: persist discord thread bindings in sqlite

* test: read discord thread bindings from sqlite smoke
2026-05-31 22:10:30 -04:00
ksj3421
45bdaa2f7b fix(agents): return schema lookup misses in-band
Return unknown config.schema.lookup paths as an in-band agent gateway tool result instead of throwing into channel warning surfaces.

The direct gateway RPC still reports INVALID_REQUEST, preserving the existing protocol contract, while the agent-facing gateway tool returns schema_path_not_found for exploratory misses.

Fixes #88813.
Thanks @ksj3421.
Reported by @cjalden.
2026-05-31 22:10:02 -04:00
Vincent Koc
91ca036717 test(agents): use neutral tool schema fixtures (#88848) 2026-05-31 22:09:48 -04:00
Ted Li
c002887223 fix(memory): rehydrate daily list promotions
* fix(memory): rehydrate daily list promotions

* fix(memory): preserve multi-line daily list promotions

* fix(memory): preserve daily list promotion context

* fix(memory): rehydrate capped daily list promotions

* test(memory): cover capped daily list promotion

* test(agents): update model selection mocks

* ci: ignore lazy three dependency

* fix(memory): skip heading-only rehydration

* fix(memory): preserve list rehydration mode

* fix(memory): match capped renamed heading bodies

* fix(memory): avoid duplicate tail heading matches

* fix(microsoft-foundry): satisfy provider lint

* perf(memory): precompute promotion heading context

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-05-31 22:08:35 -04:00
Peter Steinberger
912ea4897f fix: scope global in-flight history to default agent 2026-06-01 03:08:29 +01:00
Peter Steinberger
6ad73e173b fix: keep hidden runs out of visible chat state 2026-06-01 03:08:29 +01:00
Dallin Romney
4b56c44c02 test: consolidate plugin registration contracts (#88824) 2026-05-31 19:04:53 -07:00
Peter Steinberger
d86b6da012 fix: allow cron delivery clears 2026-05-31 22:04:25 -04:00
Vincent Koc
d2c5ad2b36 refactor: share commands test helpers 2026-06-01 04:01:02 +02:00
Vincent Koc
207359a056 fix(ci): repair current main checks
Summary:
- Guard child-session candidate lookup when the session store is absent.
- Refresh Talk UI and compaction rotation tests for current main.
- Clean up Microsoft Foundry provider lint that blocked the refreshed CI lane.

Verification:
- node scripts/run-vitest.mjs src/gateway/session-utils.test.ts ui/src/ui/views/chat.test.ts src/agents/agent-command.compaction-rotation.test.ts --reporter=dot
- node scripts/run-vitest.mjs extensions/microsoft-foundry/index.test.ts --reporter=dot
- node_modules/.bin/oxfmt --check --threads=1 extensions/microsoft-foundry/provider.ts src/gateway/session-utils.ts ui/src/ui/views/chat.test.ts src/agents/agent-command.compaction-rotation.test.ts
- node scripts/run-oxlint.mjs extensions/microsoft-foundry/provider.ts src/gateway/session-utils.ts ui/src/ui/views/chat.test.ts src/agents/agent-command.compaction-rotation.test.ts
- pnpm lint --threads=8
- autoreview clean
- GitHub checks on f96270ed7e: 135 success, 29 skipped, 1 neutral, 0 pending/failing

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-05-31 21:57:07 -04:00
Vincent Koc
be1273182e refactor: share models auth status test helpers 2026-06-01 03:49:46 +02:00
Peter Steinberger
0369672691 feat(minimax): add m3 model support (#88860) 2026-05-31 21:47:47 -04:00
Vincent Koc
9919e4601f refactor: share skills clawhub test helpers 2026-06-01 03:38:39 +02:00
Vincent Koc
b6bac3cc2b test(agents): include Ollama in small live model matrix (#87838)
* test(agents): include Ollama in small live model matrix

* test: avoid Ollama cloud key in local live runs

* test: recognize Ollama env secret refs

* test: type Ollama live key fixtures

* test: prevent Ollama cloud auth in local live probes

* test: preserve equivalent Ollama live credentials

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-05-31 21:38:31 -04:00
Peter Steinberger
72bc9ae952 fix: keep cron update delivery validation scoped 2026-05-31 21:32:23 -04:00
Peter Steinberger
d2f1c0eac8 fix: harden cron validation and restart state 2026-05-31 21:32:23 -04:00
Vincent Koc
dbc83b4213 refactor: share chat reply media test helpers 2026-06-01 03:29:30 +02:00
Peter Steinberger
fb64546d9e fix: preserve no-policy native hook fallback
Keep selected no-policy Codex PreToolUse relay hooks installed with an explicit unavailable no-op marker, while unknown unavailable PreToolUse and PermissionRequest still fail closed.

Refs #87543.
Replaces #88620.

Verification:
- pnpm test extensions/codex/src/app-server/native-hook-relay.test.ts src/agents/harness/native-hook-relay.test.ts src/cli/native-hook-relay-cli.test.ts
- pnpm lint --threads=8
- autoreview --mode branch --base origin/main
- GitHub CI run 26729700996, Real behavior proof 26729874455, OpenGrep 26729701010, CodeQL high 26729701003

Co-authored-by: woodym-dotcom <266261448+woodym-dotcom@users.noreply.github.com>
2026-05-31 21:24:09 -04:00
William Liu AI
8eeb9300df fix: restore in-flight TUI run switch-back
Restore TUI switch-back adoption for backgrounded visible chat-send runs by surfacing a bounded `chat.history.inFlightRun` snapshot.

The snapshot keeps the run id even when buffered text is empty or over budget, filters live text through the same projection path as streaming chat, scopes bare global history to the default agent, and excludes hidden internal agent runs.

Proof:
- node scripts/run-vitest.mjs run src/gateway/chat-abort.test.ts src/tui/tui-session-actions.test.ts
- node scripts/run-tsgo.mjs -p tsconfig.core.json
- pnpm --silent exec oxfmt --check src/gateway/chat-abort.ts src/gateway/chat-abort.test.ts src/gateway/server-methods/chat.ts src/tui/tui-session-actions.ts src/tui/tui-session-actions.test.ts
- .agents/skills/autoreview/scripts/autoreview --mode branch --base origin/main
- CI: Real behavior proof, TUI PTY, dependency guard, OpenGrep precise diff, workflow sanity passed on PR head 2b8bf5f214.

Co-authored-by: William Liu <william@williamliu.ai>
2026-05-31 21:22:52 -04:00
Vincent Koc
52c809a759 fix(infra): bridge WSL clipboard through shell
* fix(infra): bridge WSL2 clipboard through shell

* test(infra): assert wsl clipboard argv stays token-free

* fix(infra): keep wsl clipboard timeout ownership
2026-05-31 21:22:08 -04:00
elfka toruviel
f22e39823d fix(doctor): respect explicit PI runtime policy
Respect explicit PI/OpenClaw runtime policy when deciding whether Codex plugin diagnostics are actionable.

Diagnostics now use the resolved OpenAI route: intentional PI and custom OpenAI-compatible routes suppress only the missing `plugins.entries.codex` noise, while enabled/stale Codex policy still warns.

Proof: focused doctor/config/agent routing Vitest coverage, full lint, test types, dependency checks, isolated live doctor configs, autoreview clean, and GitHub CI green at c5a84de4ca.

Fixes #88706.

Co-authored-by: Elfka Toruviel <aeb31988340aa87b@toruviel.online>
2026-05-31 21:21:11 -04:00
Vincent Koc
30bde29893 refactor: share config auth test helpers 2026-06-01 03:20:04 +02:00
Peter Steinberger
6b940ed3ca perf: streamline chat startup metadata (#88825)
* perf: streamline chat startup metadata

* fix: defer global queued agent selection

* style: format gateway startup refresh
2026-05-31 21:18:41 -04:00
Andy Ye
1b10739d60 fix(agents): guard vanished workspaces
Fixes #88333

Preserves contributor workspace contents when an attested workspace disappears or is partially regenerated, and clears OpenClaw-owned attestation state on delete/reset/uninstall.

Co-authored-by: Andy Ye <35905412+TurboTheTurtle@users.noreply.github.com>
2026-05-31 21:14:54 -04:00
Peter Steinberger
1d4277b071 refactor: persist openrouter model cache in sqlite (#88851) 2026-05-31 21:12:43 -04:00
Vincent Koc
b029634bd6 refactor: share cron validation test helpers 2026-06-01 03:08:54 +02:00
Vincent Koc
af927038cc test(gateway): fail strict codex subagent timeouts 2026-06-01 03:08:02 +02:00
Vincent Koc
570e2db252 fix(plugins): isolate cached tool runtime siblings 2026-05-31 21:05:23 -04:00
Vincent Koc
53990d5bbf fix(plugins): isolate web provider factory failures (#88807) 2026-05-31 21:04:18 -04:00
NVIDIAN
37169697d7 fix(status): resolve gateway auth secrets for deep audit
Resolve gateway auth SecretRef targets in status deep audit.

The static secret target coverage now includes gateway auth and remote token/password keys for both status and security audit scans. Focused status/secret-target tests passed, Auto Review reported no actionable findings, and CI is running on rebased head 41b052a181.

Fixes #87815
2026-05-31 21:02:11 -04:00
Alix-007
909c24e3b7 fix(config): skip state-dir dotenv values that are unresolved shell references (#88288)
* fix(config): skip state-dir dotenv values that are unresolved shell references

readStateDirDotEnvVarsFromStateDir accepted any non-empty value from the
state-dir .env file and passed it into the managed service env. When a value
contains an unresolved shell variable reference such as "${SUPERMEMORY_KEY}"
or "$MY_VAR", dotenv preserves the literal string. The value then reaches
the LaunchAgent/systemd wrapper as a single-quoted literal, so the credential
is never resolved.

Add containsUnresolvedShellReference() and skip any value matching
$IDENTIFIER, ${...}, or $(...) in parseStateDirDotEnvContent(). Real credential
values (e.g. "sm_abc123") are unaffected.

Fixes #88274

* fix(config): narrow shell-reference detector to whole-value patterns only

The previous /$[\w{(]/ regex matched any value containing $ followed by
a word character, which would incorrectly drop real credentials that merely
contain a dollar sign (e.g. a password like abc$2!xyz).

Replace with isUnresolvedShellReference() that only matches values whose
ENTIRE content is a recognised reference form:
  - $VAR_NAME (simple reference)
  - ${VAR_NAME} (brace-form reference)
  - $(command) (command substitution)

Add a regression test that verifies dollar-bearing real secrets are kept.

* fix(config): use letter/underscore-anchored pattern to avoid matching dollar-numbers

$100, $2, etc. are NOT shell variable references — shell variable names must
begin with a letter or underscore. The previous /^$[\w_]/ would match them.

Change to /^$[A-Za-z_]\w*$/ so only genuine named-variable references like
$MY_VAR are rejected. Dollar-number sequences are now preserved.

* fix(daemon): drop stale systemd env-file refs for skipped state-dir dotenv keys

When a state-dir .env value is an unresolved shell reference ($VAR/${VAR}/$(cmd))
the parser skips it from the managed environment. A prior install could have
written that literal reference into gateway.systemd.env; because the skipped key
no longer appeared in the incoming env or the managed-key removal sets, the stale
literal survived re-stage and could override fresh inline Environment= values.

Surface the skipped shell-reference keys from the state-dir dotenv parser and add
them to the systemd env-file managed-key removal set so re-staging strips the
obsolete literal while preserving operator-only secrets that were never managed
via state-dir .env. launchd regenerates its env file wholesale, so it is
unaffected.

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

* fix(config): skip quoted shell parameter dotenv refs

* fix(config): preserve lowercase dollar-prefixed dotenv literals

* fix(daemon): clear stale unresolved systemd env refs

* fix(daemon): avoid re-staging unresolved file env refs

* fix(daemon): drop unresolved file env refs inline

* fix(daemon): drop inline-and-file unresolved env refs

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-05-31 21:01:33 -04:00
Brian
fda5254e99 fix: preserve npm plugin root on blocked install (#77237)
Preserve the active per-plugin managed npm project when npm-backed install validation blocks a candidate after npm has already mutated local state.

This snapshots package.json, package-lock.json, and node_modules before managed npm installs, restores that exact project state on failed validation, and rolls back staged npm-pack archives so blocked pack installs do not leave candidate debris.

Validation:
- OPENCLAW_VITEST_MAX_WORKERS=1 node scripts/run-vitest.mjs src/plugins/install.npm-spec.test.ts
- pnpm tsgo:core && pnpm tsgo:core:test
- node scripts/run-oxlint.mjs src/plugins/install.ts src/plugins/install.npm-spec.test.ts
- .agents/skills/autoreview/scripts/autoreview --mode local
- GitHub CI 26729255950
- Crabbox run_26e9f9f7591c

Thanks @zhuisDEV.

Co-authored-by: Brian <95547369+zhuisDEV@users.noreply.github.com>
2026-05-31 20:59:32 -04:00
Vincent Koc
9da4835cdf refactor: share artifacts test helpers 2026-06-01 02:57:01 +02:00