mirror of
https://github.com/openclaw/openclaw.git
synced 2026-11-16 13:08:44 +00:00
1774 commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
a4bc5c6f0b
|
feat: restrict model automation administration through Gateway policy (#174580)
* feat(gateway): enforce required model tool and action policy * fix(gateway): accept unvalidated tool descriptors in policy helpers * test(gateway): qualify tool policy fixtures and config schema * test(gateway): type the action rewrite fixture * refactor(agents): keep final tool policy assembly together * feat: restrict model automation administration through Gateway policy * fix(worker): retain prepared prompt report in turn results * fix(gateway): admit caller-owned automation mutations * fix(cron): avoid host auth capture for required workers * fix(worker): preserve Gateway tool errors across proxy calls * fix(cron): use selected Harness authentication for schedules * refactor(gateway): scope tool policy to deployments * refactor(gateway): simplify policy wrappers and coverage * fix(agents): preserve publication scope under gateway tool policy * refactor(agents): separate delegation policy from tool availability * refactor(agents): clarify tool assembly and child policy capture * fix(tools): preserve structured worker failures * fix(agents): narrow explicit tool error results before validation * test(cron): cover command-only deployment policy fallback * fix: refresh automation baseline and simplify tool descriptions * refactor: separate scheduling authentication from Gateway automation policy --------- Co-authored-by: stevenlee-oai <213687449+stevenlee-oai@users.noreply.github.com> |
||
|
|
ec5d369a6f
|
feat(automations): migrate heartbeat jobs through Doctor (#179387)
* feat(automations): migrate heartbeat jobs through Doctor Migrate heartbeat state, scratch, execution policy, and monitor ownership into ordinary editable Automations. Preserve Doctor backups and a once-only migration notice, controller settlement, retained source authority, and revision-owned scratch. * fix(automations): retain implicit owner task enablement Separate legacy enrollment from migration discovery so stored tasks retain implicit ambient cadence without provisioning jobs on empty installations. Preserve explicit monitor and task disables. * fix(automations): preserve migration and execution contracts * test(automations): prepare migrated wake fixtures * test(automations): adapt imported presence cases to the request fixture Keep the five native Mac presence identity assertions on the existing S3 options-based fixture. The merged cases still referenced their predecessor helper names, breaking the Gateway-methods test type graph and runtime shard. Validation: 21 focused cases, Gateway-methods test type graph, typed lint, formatting, and scoped review pass. * fix(automations): preserve main-session delivery controls Keep announce and owner delivery available for main-session agent turns in the CLI and editor. Preserve unflagged main delivery defaults and system-event/script restrictions. * fix(automations): retain one-shot jobs outside active hours |
||
|
|
c6b63fd8ec
|
Add shared enterprise-managed authorization for MCP (#178726)
* feat(mcp): add guarded enterprise ID-JAG transport * feat(mcp): add enterprise SSO CLI lifecycle and guidance * refactor(mcp): keep enterprise capability helpers private * fix(mcp): fence enterprise event and OIDC credential effects * fix(mcp): adapt OIDC fetch body for production types * test(mcp): prove enterprise event effects stop on logout * test(mcp): verify stable OAuth rows survive enterprise upgrade * test(mcp): prove signed event callback revocation * test(mcp): expose local enterprise authority fixtures to plugin tests * fix(mcp): fence enterprise exchanges at every network effect * chore(mcp): refresh generated baselines after main rebase * fix(mcp): fence enterprise requests at final HTTP dispatch * fix(mcp): reject malformed enterprise URLs without throwing * fix(mcp): retain enterprise authority through bearer retry * test(mcp): prove real enterprise revocation at guarded dispatch * fix(mcp): skip enterprise auth on node hosts * test(mcp): satisfy typed lint in authority fixtures * fix(doctor): preserve repair receiver under progress wrapper * refactor(mcp): keep capability builder internal * test(matrix): match prepared approval target contract |
||
|
|
76ce4df44e
|
fix: restore the illustrated Community sidebar card (#178978)
* fix: restore dismissible Community sidebar card * fix(ui): restore Community artwork and theme surfaces * fix(ui): keep Community dismiss control compact * fix(ui): align Community dismiss control to card corner * test(ui): wait for Community drawer before measuring |
||
|
|
29ce97ac8d
|
fix(agents): restore saved history for fresh Claude CLI sessions on a native login (#164796)
* fix(agents): restore saved history for fresh Claude CLI sessions on a native login
A Claude CLI conversation on a native login with no forwarded credential
had no history owner, so saved history was refused whenever its Claude
session was replaced. The owner is now the account Anthropic's OAuth
profile endpoint attests for the exact access token the child Claude
would use, rechecked synchronously at every spawn, prompt send and
coverage commit against an in-process attestation cache.
Rebased onto main as one commit. On main a resumed turn also receives
durable reference context and interrupted inputs, so any native turn
whose writer replays history now refuses an unattested credential at
spawn and send, and a turn that runs without saved history receives no
interrupted inputs. SessionManager appends committed by the metadata
worker take the host's live owner check on their transaction admission,
and a writer that needs the check never advances coverage on a path
that cannot ask for it.
Co-authored-by: xydigitLybnnnn <280613588+xydigitLybnnnn@users.noreply.github.com>
* fix(anthropic): withhold prompt hook context when the owner check fails
- The UserPromptSubmit hook response that carries the turn's private
context now takes the full account-bound check at its final write,
not only the stream check.
- If that check fails, Claude receives an empty hook response and the
saved context is withheld.
- Docs: the prompt hook is listed among the points where the native
login is rechecked.
* fix(anthropic): require an explicit opt-in for native login attestation
- Native Claude login attestation now runs only when
plugins.entries.anthropic.config.historyRecovery.attestNativeLogin
is true. It is off by default, and while it is off history recovery
never reads or sends the native token, so a native login keeps the
current refusal.
- The anthropic plugin manifest declares the setting with a default of
false and a UI hint naming the endpoint the token is sent to.
- The stream check for control requests is no longer part of the
plugin SDK CliBackendExecuteContext type. The host passes it to the
bundled Claude runtime the way it passes auth credentials.
- Config baseline: the plugin surface grows by these two keys (budget
4527 to 4529).
- Removed a duplicate Keychain read test.
- Docs: the native login clause names the opt-in and its default.
* fix(cli-runner): port native history owner onto main's boundary design
- adopt main's async assertReadable and transport-side private history checks
- keep the attestNativeLogin opt-in and the in-transaction owner probe
- split the private-input runtime tests into cli-runtime.private-input.test.ts
- regenerate the config baseline hash
* simplify: drop duplicate Keychain readers and same-path native-login tests
Folds the two added Keychain readers into the existing ones, removes duplicate and same-path test cases, fixes a prepared-backend leak in prepare-native-history.test.ts, and restores the fresh-recovery-turn, non-native auth env and split secure-storage guards. Production code is unchanged except the reader fold.
* refactor(cli-runner): own the native owner-check failure in one place
- readNativeOwner treats a login lookup that throws as no owner, so the
coverage check (worker probe and host actor memory) keeps rows uncovered
and a turn without saved history runs on instead of failing
- answerCliHistoryOwnerProbe drops its now-redundant catch
- writer exposes checkNativeLoginBoundary directly instead of a forwarder
- planCliHistoryBoundary keeps main's inline provider normalization
- resolveCliChildEnv comment names the installation target layer too
- helper-only cli-history-owner-probe.test.ts replaced by a real
SessionManager and boundary case in the native-login suite
* test(cli-runner): prove native-login paths found untested by mutation
- Add an incognito session case: the host actor path covers a native-login
row only while the attested login holds (no test failed when its owner
check was removed, trusted or dropped).
- Assert a refresh-due turn reads no interrupted inputs; a same-login turn
still does (no test failed when the turn read them).
- Use a parseable Keychain payload without a usable login in the
unusable-payload case, so it pins the readable-but-unusable branch.
- Drop four native-login cases and one prepare case whose every caught
mutation is caught by a kept case on the same path, and the HTTP 500
row that repeats the HTTP 401 row.
* refactor(cli-runner): drop the child env base parameter no caller passes
resolveCliChildEnv always reads the Gateway process env; the extraction is now a pure move of the executor's lines.
* fix(agents): send a compaction continuation once after it is persisted
- #177050 (
|
||
|
|
1bd22b28d6
|
feat(gateway): add deployment-scoped tool and action policy (#174547)
Add an optional deployment-wide Gateway tool and action policy after ordinary tool and plugin grants. Filter advertised tools and authorize final arguments before execution. Policy changes activate through restart or replacement. Preserve existing behavior when no policy is configured, trusted human Gateway administration, and Codex native tools. |
||
|
|
de8de9c569
|
feat: add Bifrost gateway setup and model discovery (#175509)
* feat(providers): add Bifrost provider and allow anonymous self-hosted gateways Bifrost is an OpenAI-compatible LLM gateway that unifies 20+ providers, but OpenClaw had no bundled provider for it, so operators configured it by hand. Add extensions/bifrost following the LiteLLM provider shape: interactive setup asks for the gateway base URL, optionally for a virtual key, then lists the models served by the gateway's /openai/v1/models endpoint and defaults to the first. Discovery failures name the reason before falling back to manual entry, and a config change during discovery aborts before credentials are sent. Point providers at Bifrost's OpenAI-compatible surface (http://localhost:8080/openai) rather than the core /v1 API, so discovery and chat completions share one base URL. Bifrost advertises provider-qualified model IDs such as openai/gpt-4o-mini, which resolve as bifrost/openai/gpt-4o-mini. A gateway started without authentication needs no credential, so setup records auth: "none" instead of storing a key that resolves to nothing. That reuses the existing explicit-no-auth owner rather than adding a second mechanism, and re-running setup for a URL change keeps an already configured key. The shared self-hosted setup helper forced a non-empty API key, which pushed SGLang and vLLM users toward a placeholder value for servers that accept anonymous requests. Accept an empty key there and record the provider as auth: "none", matching what the config already models. * feat(providers): add Bifrost provider icons Bifrost shipped without artwork, so it was the only user-facing provider with no assets/icon.png or assets/activity.svg and the only bundled provider still falling back to a letter avatar in the model picker. - assets/icon.png: 512x512 inversion of the official Apache-2.0 mark, dark-on-white to match the other bundled provider icons. - assets/activity.svg and ProviderIcon-bifrost.svg: OpenClaw-authored gateway glyph (many upstreams converging on one endpoint), registered in PROVIDER_ICON_NAMES so the model picker stops falling back. - ATTRIBUTION.md: documents both, pinning the upstream commit. * fix(providers): narrow anonymous-provider assertion and raise config budget - provider-self-hosted-setup.interactive.test.ts reached through result.configPatch.models.providers.fixture, but configPatch, models and providers are all optional, so strict null checking rejected it. Bind the provider entry to a local and assert on that instead of a non-null cast. - The Bifrost plugin schema grows the plugin config surface 4693 -> 4714. Regenerate the baseline hash and raise the budget deliberately. * fix(providers): stop Bifrost onboarding from discarding a supplied key ClawSweeper flagged two authentication defects, both confirmed against source. resolveExplicitProviderNoAuth treats auth:"none" as terminal and strips the Authorization header, so a stale anonymous marker silently defeats a credential. applyBifrostConnection merged ...existing and only ever added the marker, so re-running interactive setup against a gateway that now has a virtual key inherited auth:"none" through the merge and through applyBifrostModelConfig. An authenticated gateway then rejected inference although setup accepted the key. The keyed branch now clears the marker, matching how omlx and llama-cpp drop anonymous state once a credential exists. runNonInteractive inferred anonymity from --bifrost-api-key and the inline provider apiKey only, while the delegated method resolves BIFROST_VIRTUAL_KEY and existing profiles too. A key in either of those made the wrapper write auth:"none", which the delegate then preserved while saving the key it had resolved. The ad-hoc check is gone: the delegated method owns the decision and returns null when no credential resolves, so this path always applies one and must clear the marker. Replaces the catalog shape test with coverage of the Bifrost-owned decision it guarded, the single join of the version segment for /openai and /openai/v1. Docs no longer describe merge and replace mode as though interactive onboarding left the model list empty; only the non-interactive preset does. Base-fail/head-pass: both new transition tests fail against 4d2478c4a6 and pass here. tsgo:extensions, tsgo:extensions:test, oxlint, oxfmt and docs:check-links are clean. * fix(providers): clear anonymous mode when no URL flag is supplied Third instance of the same defect, in the one branch the previous fix left alone: runNonInteractive returned the delegate the original config whenever --custom-base-url was absent, so applyBifrostConnection never ran and an earlier auth:"none" survived. The delegate then saved the key while applyProviderConfigWithDefaultModelsPreset spread existingProviderRest through, leaving resolveExplicitProviderNoAuth terminal and stripping Authorization. This path always applies a credential, so a gateway already on file counts as configured. The base URL now resolves from the flag or the existing row, and either way the credentialed connection update runs and clears the marker. Base-fail/head-pass against 838b5e17cc: 1 failed / 18 passed -> 19 passed. Live proof on an enforcing Bifrost gateway: config carrying auth:"none" plus an active bifrost:default profile, re-authenticated with the key and no URL flag. auth clears, then winnerProvider: "bifrost" authMode: "auth-profile" fallbackUsed: false finalAssistantMessageRawText: "REAUTH_OK" 106 tests across the 9 Bifrost/SGLang/vLLM/shared-setup files; tsgo:extensions, tsgo:extensions:test, oxlint and oxfmt clean. * docs(providers): state which Bifrost authentication modes are supported The guide said supplying a virtual key handles deployments that enforce authentication, which is true for modern keys with Bifrost HTTP auth off and false otherwise. Two configurations complete setup and then fail at inference, so operators hit it as a 401 during a session rather than at configuration: - a legacy key without the sk-bf- prefix, honored only via x-bf-vk - auth_config.is_enabled, which consumes Authorization for HTTP auth Adds a support matrix and the x-bf-vk provider-row configuration, verified against a local listener to send both x-bf-vk and Authorization. Warns that the env reference must be set: unset, OpenClaw sends the literal text ${BIFROST_VIRTUAL_KEY} and Bifrost rejects the request with 401 while ignoring the valid Authorization on the same request. docs:check-links 15647 links, 0 broken. docs:check-links:anchors unchanged at 5 pre-existing failures, none in this file. oxfmt clean. * docs(providers): separate dashboard auth from inference auth ClawSweeper's Revision 4 review found the new support matrix conflated the two layers: Bifrost keeps dashboard HTTP authentication (Authorization = user creds) and inference virtual-key governance (x-bf-vk) as independent boundaries. Enabling auth_config.is_enabled does not consume Authorization for the virtual key; it requires separate HTTP credentials. Rewrote the matrix to qualify each setup by its actual behavior, and the x-bf-vk fallback configuration now clearly applies only to legacy keys or inference-auth deployments. docs:check-links 15647 links, 0 broken; docs:check-links:anchors unchanged at 5 pre-existing failures (none bifrost or secret-placeholder); oxfmt clean; markdown not in oxlint scope. * fix(bifrost): preserve explicit credential and catalog scope * fix(bifrost): preserve catalog routing and report setup failures * style(bifrost): use a type-only setup import --------- Co-authored-by: Peter Steinberger <steipete@gmail.com> |
||
|
|
6a3d528f6e
|
fix(memory): wrong-size vectors indexed when an OpenAI-compatible server ignores dimensions (#175658)
* fix(memory): reject OpenAI-compatible embeddings that ignore requested dimensions When `memory.search.outputDimensionality` (or the gateway `dimensions` field) is set, the OpenAI-compatible embedding transport sends it as `dimensions` and records it in the provider identity. Some servers ignore that field and return the model's native vector size, so the vectors were indexed under an identity that claimed the requested size. Check every returned vector against the requested size and fail with INVALID_EMBEDDING_RESPONSE, which memory-core treats as terminal (no retry or batch split). Behavior is unchanged when no dimensions are requested. The managed local llama.cpp provider no longer forwards `dimensions` to its llama-server, which ignores the field, so existing local setups keep their current vectors instead of failing the new check. * fix(gateway): report ignored embedding dimensions as a client error The OpenAI-compatible embedding transport now rejects vectors whose size differs from the requested `dimensions`, but `/v1/embeddings` mapped that failure to `500 api_error` with "internal error", so callers could not tell what went wrong. The transport error now carries the requested and returned sizes. The Gateway maps only that error to `400 invalid_request_error` with code `embedding_dimensions_mismatch` and a message built from the two sizes, so provider URLs and backend response text stay in the Gateway log. A 4xx fits because retrying the same request cannot succeed. * fix(memory): keep dimension checks within owner contracts * test(memory): fix cache regression server teardown lint --------- Co-authored-by: Peter Steinberger <steipete@gmail.com> |
||
|
|
f1689ee0c6
|
revert: compact at useful task boundaries and before cache expiry (#178021) (#178425)
This reverts commit
|
||
|
|
68efa3d998
|
feat: compact at useful task boundaries and before cache expiry (#178021)
* feat: compact at useful task boundaries and before cache expiry Co-authored-by: VACInc <3279061+VACInc@users.noreply.github.com> * feat: compact at useful task boundaries and before cache expiry Worked on by: - @VACInc Co-authored-by: VACInc <3279061+VACInc@users.noreply.github.com> OpenClaw-Publication: cabd1eb8-7cdd-4522-a0a5-042ad4e95f2b * test: prove compaction capability retirement during an active run Co-authored-by: VACInc <3279061+VACInc@users.noreply.github.com> * Publish openclaw/self-compaction-cache-expiry Worked on by: - @VACInc Co-authored-by: VACInc <3279061+VACInc@users.noreply.github.com> OpenClaw-Publication: b80c0191-135e-4d2f-9dcd-6a228badcc82 * Publish openclaw/self-compaction-cache-expiry Worked on by: - @VACInc Co-authored-by: VACInc <3279061+VACInc@users.noreply.github.com> OpenClaw-Publication: 0926a3ae-bc63-4a08-9407-abacc4b45137 * test: align compaction fixtures with prepared runtime state Co-authored-by: VACInc <3279061+VACInc@users.noreply.github.com> * Publish openclaw/self-compaction-cache-expiry Worked on by: - @VACInc Co-authored-by: VACInc <3279061+VACInc@users.noreply.github.com> OpenClaw-Publication: f2b38c57-608a-405f-8fc5-20188ba12b52 * test: preserve config exports in compaction fixtures Co-authored-by: VACInc <3279061+VACInc@users.noreply.github.com> * Publish openclaw/self-compaction-cache-expiry Worked on by: - @VACInc Co-authored-by: VACInc <3279061+VACInc@users.noreply.github.com> OpenClaw-Publication: 2e785763-9c85-42f6-8a0f-59b5f3c118b8 --------- Co-authored-by: roboclaw-bot <309084314+roboclaw-bot@users.noreply.github.com> Co-authored-by: VACInc <3279061+VACInc@users.noreply.github.com> |
||
|
|
e604de4c24
|
refactor(plugins): retire 13 top-level SDK methods (#177829)
* refactor(plugins): retire 13 top-level SDK methods * chore(plugins): remove retirement leftovers and stale suppression entry * docs(plugins): preserve SDK retirement section links * test: align dreaming cleanup and Tlon shutdown assertions * test(ui): honor sidebar preview settings in observer flows |
||
|
|
63b8eec1e3
|
fix: qualify PostgreSQL majors and repair stable adoption (#178005)
## What Problem This Solves Fixes the published-stable SQLite → current → PostgreSQL adoption path, which could duplicate aliased stores, silently omit the port source, reject a valid lazy journal column, or leave local credentials bound to the old database. Qualifies PostgreSQL 16–18 with recorded full conformance runs. ## User Impact Existing 2026.10.5 users can update through their installed updater, port their populated stores to PostgreSQL, and start the Gateway with their agents, sessions, memory, and local credentials intact. The docs state the tested scope: foreground macOS acceptance, no live inference without provider keys, and service activation covered separately by the signed-Mac/Parallels lane. Published 2026.10.5 has no PostgreSQL configuration schema, so a native stable-PG upgrade is not applicable. ## Why This Change Was Made Use physical identity to deduplicate supplemental updater discovery while preserving explicit registry spellings. Take the port's canonical state root from its existing owner. Complete the lazy deletion-journal column only in the private migration copy. Capture credential receipt metadata with the existing port artifacts and rebind it through the credential owner after durable port completion, preserving the local credential rows and provenance. No new schema, migration protocol, or readiness bypass. The simplification pass retained the existing owners and removed duplicate alias discovery. Delta: +249/−29 production lines, +326/−17 test lines, +128/−50 documentation lines. PostgreSQL 18 rejects malformed JSON before its CHECK constraint in one catalog probe; accept either rejection while retaining strict row-rejection assertions. No CI matrix was added. A weekly sequential PG16/PG18 conformance job is recommended to catch future major-version differences without adding per-PR cost. ## Evidence - Final-head [CI run 39366445588](https://github.com/openclaw/openclaw/actions/runs/39366445588): all three PostgreSQL conformance shards and `openclaw/ci-gate` passed on `50e01a442f95b9c75baca485e4b352d7b2427079`. - `PGQUAL-MAJORS-UPGRADE`, local Homebrew PostgreSQL 16.15_1 / 17.11_1 / 18.6_1, unaccent 1.1, pg_trgm 1.6, pgvector 0.8.7. Full unsharded CI entry point on 16 and 18. Counts, source heads, bottle/source SHA256s, lock sizing, and the retained initial failures are in [the qualification record](docs/gateway/postgresql.md#server-major-qualification). - PG16 full: 948 passed / 2 failed / 37 skipped; the three affected files passed once on PG16 and PG17 (10 tests each). PG18 full: 947 passed / 3 failed / 37 skipped; failed files passed on PG17 (9 tests) and PG18 with port/recovery (43 tests). Further PG18 journal regression: 25/25. Initial timeout/cleanup failures are not represented as clean full runs. - Published stable installed-updater run `d3b04126-11d3-4f28-9dd0-146f9fe914b5`: exited 0 and activated the exact packed build `b1d415c2448f`. PostgreSQL port `aae1aaff-ec7e-4dac-afe6-7b46f8589867`: two populated stores, retained SQLite captures, foreground Gateway readiness, agent/session/memory continuity, Doctor/status. Unreachable-DSN Doctor returned exit 2 and `ok: false`. Matching pre-upgrade backup + exact stable package rollback passed the same continuity checks. [Cell table](docs/gateway/postgresql.md#published-stable-upgrade-qualification). - Regressions reproduced before their fixes. Final PG17 credential/port/recovery/restore run: 46/46. Final PG18 credential/port/recovery run on integrated head `50e01a442f95`: 40/40, including all five credential cases. Core and scripts typechecks, targeted infrastructure/updater test typechecks, lint/format, docs checks, and independent P0–P2 review recorded locally. Full test-graph selection encountered pre-existing 725/726-root budgets in unchanged Gateway/plugin shards; all 29 compiler graphs passed, and the targeted graphs passed independently. Main integration changed only the generated config fingerprint conflict; the runtime patch remained unchanged. The queued Testbox lease was canceled; no remote workload or local Docker ran. Temporary Gateways use isolated state and foreground processes, with no LaunchAgent or Keychain changes. Local clusters and task-owned large artifacts are cleaned up after validation; installed Homebrew formulas and external-volume worktrees are retained. |
||
|
|
b5bab41b16
|
feat(memory): support evergreen extra paths (#151915)
* feat(memory): support evergreen extra paths * test(memory): prove evergreen policy on persisted indexes * fix(memory): preserve evergreen policy across current retrieval paths * style(config): format memory search label import * fix(config): regenerate evergreen baseline after main integration --------- Co-authored-by: esqandil <243999297+esqandil@users.noreply.github.com> Co-authored-by: Jason (Json) <263060202+fuller-stack-dev@users.noreply.github.com> |
||
|
|
bbc5e3a7c7
|
fix(postgres): qualify support claims by proven surface (#177922) | ||
|
|
c33a7f6324
|
feat: add native Levanto Sage decision provider (#157433)
* feat: describe decision capabilities in model catalogs Keep task, protocol, modalities, reasoning, grounding, probability semantics, abstention and route billing distinct without changing chat Model types. Co-authored-by: steipete <58493+steipete@users.noreply.github.com> Co-authored-by: vincentkoc <25068+vincentkoc@users.noreply.github.com> * fix: apply shared plugin model policy to decisions Co-authored-by: steipete <58493+steipete@users.noreply.github.com> Co-authored-by: vincentkoc <25068+vincentkoc@users.noreply.github.com> * feat: support plugin-owned model credentials Co-authored-by: steipete <58493+steipete@users.noreply.github.com> Co-authored-by: vincentkoc <25068+vincentkoc@users.noreply.github.com> * feat(decisions): preserve richer answers with versioned data codecs Co-authored-by: steipete <58493+steipete@users.noreply.github.com> Co-authored-by: vincentkoc <25068+vincentkoc@users.noreply.github.com> * feat(decisions): run typed tasks with prepared model credentials Preserve V1 while moving typed decision execution, both bundled engines, catalog projection and physical credential ownership onto the shared runtime. Co-authored-by: steipete <58493+steipete@users.noreply.github.com> Co-authored-by: vincentkoc <25068+vincentkoc@users.noreply.github.com> * feat: add native Levanto Sage decision provider Co-authored-by: Peter Steinberger <58493+steipete@users.noreply.github.com> Co-authored-by: Vincent Koc <25068+vincentkoc@users.noreply.github.com> * chore(sdk): record approved Decision V2 data allowance Apply only the +14 exports / +6 callables for the existing decisions data contract. Peter Steinberger explicitly approved the complete +18/+6 stack allowance on 2026-09-26; the remaining four execution types belong to the dependent PR. No additional API or guard exception. Co-authored-by: steipete <58493+steipete@users.noreply.github.com> * fix(models): include inference metadata in extracted tooling * fix(decisions): preserve explicit owner-agent selection * fix(decisions): resolve V2 credentials for the operation agent * fix(decisions): preserve prepared route and auth facts * test(decisions): handle optional normalized catalog providers * chore(decisions): satisfy scoped runtime lint * test(levanto): type the guarded DNS fixture * test(levanto): resolve the guarded transport fixture * fix(decisions): authorize model identity independently of auth profile * fix(auth): retain plugin credential authority through dispatch * fix(decisions): retain credential authority through prepared dispatch * refactor(decisions): assert resolved credential authority directly * test(auth): preserve health probe exports in lifecycle fixture * fix(decisions): distinguish plain record validation * fix(decisions): repair v2 CI integration * fix(levanto): align package metadata and document V2 compatibility * test(levanto): add opt-in native decision validation * fix(levanto): align validator and config baseline checks * test(levanto): prove host credential retirement before dispatch * test(levanto): use canonical agent roster in authority proof * test(levanto): cover unsupported boxes and native image contracts Keep the question translator exhaustive for the V2 Box variant while preserving unsupported behavior. Prove registered-host rejection before credential resolution and transport, retain a supported-image control, and extend opt-in native qualification across Tags, Sort, PNG, JPEG and WebP without requiring optional vendor usage. * docs(levanto): describe five paid live qualification requests * docs(plugins): refresh composed Sage inventory counts * docs(levanto): correct prepared decision SDK anchor --------- Co-authored-by: steipete <58493+steipete@users.noreply.github.com> Co-authored-by: vincentkoc <25068+vincentkoc@users.noreply.github.com> Co-authored-by: Vincent Koc <vincentkoc@ieee.org> Co-authored-by: Peter Steinberger <58493+steipete@users.noreply.github.com> Co-authored-by: Vincent Koc <25068+vincentkoc@users.noreply.github.com> |
||
|
|
0139852293
|
fix(deepgram): send array provider options as repeated query params (#176781)
Accept string-array media provider options and send each element as its own query parameter in Deepgram batch and Flux requests. Preserve scalar handling and document repeated keyterm parameters. Refs: #176740, #176781 Co-authored-by: Peter Steinberger <steipete@gmail.com> Co-authored-by: SunnyShu0925 <shu.zongyu@xydigit.com> |
||
|
|
be0c50ad03
|
perf(skills): avoid polling unchanged skill directories (#176905)
Replace minute discovery polling with shared directory observations and a 30-minute safety rescan. Watch canonical sources and admitted physical symlink targets; exclude generated plugin links to avoid a rescan feedback loop. Five unchanged minutes produce zero discovery worker requests instead of five. Exact-head CI passed all four embedded-entry and fifteen discovery cases plus types, lint, source contracts, architecture and ratchets. Missed native events and repaired external symlink targets can wait for the safety rescan; full-workload savings remain unmeasured. |
||
|
|
fd2a6caa89
|
fix(sessions): preserve requester identity at execution admission (#157806)
* fix(sessions): preserve requester identity at execution admission * test(agents): preserve requester in Claude steering fixture * fix(sessions): close requester admission and recovery gaps * refactor(gateway): narrow MCP prepared policy imports * fix(ci): route reply E2E tests through prepared owners * fix(sessions): restore requester authority on peer recovery * test(sessions): validate cold recovery in the proof tier * test(agents): verify requester custody through recovery * fix(sessions): preserve live work beyond recovery bounds * fix(gateway): preserve recovered authority through compaction * test(gateway): retain system custody in settle continuation * fix(test): repair provenance fixtures and wrapper inventory * test: isolate followup admission recovery fixture * feat(messages): allow collaborative steering by default * test(messages): retain explicit personal tool selection * fix(doctor): retain original backup when persisting queue default * test(gateway): retain steering and cleanup failure details * fix(messages): queue unavailable collaborative steering * test(config): use supported queue persistence fixture * fix(config): retain resolved gateway mode for write auditing * fix(config): accept readonly paths in config accessors * test(gateway): configure destination policy before startup * test(gateway): await steering admission before releasing incumbent * test(gateway): observe steering admission receipt * test(gateway): report stalled provenance proof phase * test: use lint-compatible proof diagnostic bindings * test(gateway): create collaborative delegation destinations * test(gateway): cover collaborative steering cancellation * test(gateway): separate collaborative cancellation scenarios * test(gateway): respect this-free authority projection contract * fix(agents): queue collaborative input after incumbent cancellation * fix(queue): preserve followup when a queued steer loses its target * test(queue): identify the failing cancellation schedule * test(queue): retain the injection owner symbol type * test(gateway): cover requester restoration during recovery retries * fix(queue): refuse disabled collaboration and add explicit followup * test: reconcile requester fixtures after rebase * perf(sessions): omit prior requester metadata without deletion * test(sessions): prove linked requester revocation at delivery * fix(reply): announce followup start before streamed output * test(queue): preserve collected cancellation coverage after rebase * fix(sessions): reconcile admission and recovery after rebase * fix(messages): disable collaborative steering by default * refactor: reduce requester provenance churn * fix(sessions): reconcile ownership and recovery after rebase * test(sessions): simplify provenance and admission fixtures * fix(sessions): preserve selected authority and truthful attribution * style(tests): format rebase resolutions * refactor(sessions): simplify rebase option forwarding * test(sessions): consolidate requester authority coverage * fix: preserve accepted work and message outcomes * test: align admission fixtures with configured defaults * chore: refresh generated artifacts after rebase * style: format rebased session controller integration * fix(sessions): reconcile controller integration and source limits * fix(cron): use extracted recovery source codec * fix(sessions): reconcile controller admission and cancellation cleanup * fix(sessions): reconcile admitted channel recovery receipts * test(ci): separate selected capacity from inventory packing * fix(sessions): preserve admission rejection after cleanup * chore(config): regenerate baseline after provider rebase * fix(reply): admit explicit followups to the busy queue * fix(sessions): preserve admitted source across native attachment * fix(reply): reconcile steering authority after rebase * fix(sessions): preserve cron recovery boundaries after rebase |
||
|
|
d5125f703c
|
feat: use SubQ Snap for typed decisions (#171965)
* feat: add SubQ Snap decision provider * fix(subq): satisfy provider validation guards * fix(subq): preserve answer keys and external packaging * test(subq): make JSON serialization assertion explicit * test(subq): prove operator and consumer authority before dispatch * test(subq): verify credential changes fence final dispatch Exercise direct core calls without a caller predicate through the real prepared-secret owner and registered SubQ transport. Prove replacement and removal during DNS preparation send no request; preserve allowed and consumer-policy controls. Shared production enforcement comes from the integrated canonical host fix. --------- Co-authored-by: vincentkoc <25068+vincentkoc@users.noreply.github.com> Co-authored-by: Vincent Koc <vincentkoc@ieee.org> |
||
|
|
b1066a5c49
|
fix(discord): hide tool activity in default progress messages (#176470)
* fix(discord): hide tool activity in default progress messages Keep editable authored work updates while requiring explicit toolProgress opt-in for tool and delegated-task lifecycle rows. Co-authored-by: steipete <58493+steipete@users.noreply.github.com> * test(discord): use valid completed tool activity Co-authored-by: steipete <58493+steipete@users.noreply.github.com> --------- Co-authored-by: steipete <58493+steipete@users.noreply.github.com> |
||
|
|
51aa1b76d5
|
feat(deepseek): search the web with the standalone Search API (#175729)
Co-authored-by: obviyus <22031114+obviyus@users.noreply.github.com> |
||
|
|
6db8577c78
|
fix(codex): avoid repeated host compaction on native turns (#175256)
Related: #158044, #126171, #115514, #167916 ## What Problem This Solves Fixes repeated host summarization on ordinary Codex turns, including the turn after native `/compact`, when OpenClaw's transcript mirror exceeds its byte limit. ## User Impact Healthy native Codex threads continue without a host byte-summary request or a following native compaction. OpenClaw bounds the mirror only when it must seed a fresh native thread, attempting one host compaction only if the bounded seed would omit history not already covered by a host summary. The full stored transcript remains available to history, search, export, backups, cold storage, and memory indexing. Native rollout-size/token fuses, manual native compaction, built-in/CLI behavior, and explicit context-engine ownership are preserved. Fresh seeds can still omit oversized history after the single attempt; an existing bounded-context notice tells the user when history is omitted. This does not add a native SQLite replay boundary or change `memoryFlush.forceFlushTranscriptBytes` (#126171). ## Why This Change Was Made The guard introduced in #115514 protects fresh-thread bootstrap size, but ran on every turn. Native compaction deliberately produces a display-only note, not a host compaction boundary, so it cannot clear that trigger. The bound and conditional host compaction now live at fresh-thread seed consumption instead. Thanks to @scotthuang for diagnosing the repeated post-`/compact` work in #158044; this implements the maintainer's [lazy-seed direction](https://github.com/openclaw/openclaw/pull/158044#issuecomment-6230255672), not host-first manual compaction. Removed: the Codex byte-preflight branch, its private WeakMap authority/claim module, projected compaction configuration, queued special-authority handling, post-maintenance latch callback, byte-triggered native follow-up, and tests of those retired paths. Owning engines retain engine-first compaction and their native follow-up. The existing compactor and atomic summary/count writer are reused; #167916's bounded summarization remains unchanged. **Accepted compatibility boundary:** Ayaan, the SDK and security owner, approved the optional additive `AgentHarnessHostCapabilities.prepareBoundedSeed({ assertCurrent, signal, tokenBudget? }): Promise<readonly AgentMessage[]>` capability on 2026-10-17, including the narrowing-only delivery allowance. The host captures session, configuration, source, byte budget, cancellation, and writer fences; callers cannot select another target or widen the captured token budget. Older hosts keep bounded selection without a plugin-side summary request. Explicit context engines retain their projections. The required main integration now supplies the canonical nullable-latch writer contract unchanged: seed commits pass explicit `null` to clear prior suppression. No schema, stored-row shape, external protocol, or config key changes. Stored Codex latches are ignored on ordinary turns; non-Codex latch behavior is retained. ## Evidence **Complete:** 57 paired result rows, seven reduced paid-confirmation turns, and supporting manual-compaction/harness-switch campaigns. The final report records no unresolved regressions or coverage gaps. Full local evidence is retained in `codex-mirror-lazy-seed/results.md` and `results.json`; private transcript contents and credentials are not published here. BEFORE executed ` |
||
|
|
38f411fbe7
|
feat(openshell): run brokered inference on sandboxed nodes (#168458)
Provision dedicated broker-attached native workers through OpenShell and bind optional canonical agent files through the existing File Transfer owner. Preserve explicit policy restrictions, private pairing, and required-worker failure behavior with focused CLI/bootstrap and runtime authority coverage. OpenClaw-Publication: 5588eb80-4e62-4b2c-9142-7a6d4aff5d77 Co-authored-by: sallyom <11166065+sallyom@users.noreply.github.com> |
||
|
|
139b998d0b
|
perf(database): retire redundant write indexes in one schema bundle (#174638)
Bundle agent v29 and state v27 migrations to retire redundant write indexes and narrow the lease-owner index while preserving historical recovery and PostgreSQL port contracts. Upgrade existing PostgreSQL navigation CHECK functions to STRICT with a fixed pg_catalog search path. Release shared-state writer custody during uncommitted agent migration work so maintenance heartbeats can progress; retain final authority and native-COMMIT fencing. The optional model-byte columns are omitted because their SQLite upgrade requires unbounded table scans. |
||
|
|
22dd373b2e
|
improve(advisor): steer agents back on course with a much simpler plugin (#174568)
## What Problem This Solves
Advisor almost never interjects when an agent goes off course. Corrections waited until every tool call settled, then passed through a second verifier fork, and the verifier rejected most real corrections, so in practice the agent kept looping, polling or drifting without hearing anything.
## User Impact
With Advisor enabled, an agent that repeats a failing step, polls finished work, works around a blocker it could fix, or drifts beyond the request gets one short correction in its active run, before its next step. Advisor stays off by default and its config keys are unchanged.
## Why This Change Was Made
Advisor is now one review and one steer, using primitives core already has:
- Count tool calls in user-triggered runs. When `everyToolCalls` or `everyMinutes` is due, fork the session (`forkSession`) and ask whether the agent is on track.
- On `CORRECTION`, steer the active run (`steerActiveRun`). The advice joins the requester's own run, so its permissions and sender restrictions still apply. If the run already ended, or steering is refused (for example `hooks.allowPromptInjection=false`), nothing is delivered. The run ending also cancels a review still in flight.
- The plugin reference now documents the single-pass review.
- A due review forks only once every running tool call has its real result (Codex native tools: their item completion; outer Code Mode calls: their recorded output; a raw call and a native child that share an ID settle separately). The original dispatch-time recheck is kept: a review queued before another call starts stands down and stays due until that call's result, because a live unfinished-call fork once produced synthetic aborted results and false retry advice., because Codex fills a missing output with a synthetic `aborted` result in forks.
- Removed: the verifier stage, the old settlement bookkeeping, Codex item bookkeeping, the next-turn injection fallback and the reply parser's word and token rules. The model decides; code only reads the `NO_CHANGE`/`CORRECTION` shape.
- The default instructions say plainly what "off course" means.
The plugin drops from about 1,600 to about 420 lines including tests (+339/−1617 overall).
## Evidence
- Focused tests: `pnpm vitest run extensions/advisor` (12 passed; the outer-call, shared-ID receipt and dispatch-recheck cases each fail without their fix) and `src/plugins/contracts/boundary-invariants.test.ts` (12 passed). `ui:i18n:verify` and the config-doc baseline check pass.
- Live, isolated Gateway, `openai/gpt-6.1-sol` on the Codex harness, Advisor at `everyToolCalls: 3`. Task: poll a check script whose config has a typo. Rows 18–20: the third identical failure. Row 21: the Advisor steer, stored after the tool result with `sourceTool: plugin:advisor`. Row 22: the agent switches from re-running to inspecting the config, fixes the key, and reports READY. Gateway log: `advisor: steered active run`.
- Built-in OpenClaw runtime (`agentRuntime.id: "openclaw"`), same setup with the Control UI: reviews fork with a warm cache (17–25k cached input tokens, 75 uncached), and corrections are stored between tool calls while the run keeps going.
- Steer-only head, built-in runtime, test-only `reviewInstructions` that force a correction: the steer is stored at row 26 directly after a tool result (`sourceTool: plugin:advisor`), the run continues at row 28, and the log shows `advisor: steered active run`. No other turn is started.
- Codex harness, three 15-second commands in a row with `everyToolCalls: 1`: each review forked within 1 ms of the command's `commandExecution` item completing (10:00:51.3, 10:01:08.1) and never while a command was running.
- Codex Code Mode, one outer call that runs a command, waits 15 seconds, then runs another (`everyToolCalls: 1`): the child command finished at 10:21:48.3 while the outer call stayed open; the review forked only after the outer call recorded its output at 10:22:06.5.
- Permission boundary, isolated Gateway: with `hooks.allowPromptInjection=false` and test-only `reviewInstructions` that force a correction, every correction logged `correction not delivered (blocked by plugins.entries.advisor.hooks.allowPromptInjection=false)`.
- Replay of a real 4-hour coding session (62 review points at the default 10-tool-call trigger, real transcript history): Advisor proposed the same course change the user later asked for about 20 minutes earlier in two of four user interventions ("stop debugging unrelated Gateway startup and implement the fix"; "stop expanding the evidence bundle").
Labs description on this branch:

**Merge danger:** two-way door. A revert restores the previous plugin entirely; nothing migrates and no state is written. Blast radius is limited to users who turned on the Advisor lab: their agents can receive one short steered correction per review while a run is active.
Co-authored-by: Ayaan Zaidi <hi@obviy.us>
|
||
|
|
8a2935fbfe
|
feat(database): family-scoped port, backup and update for mixed engines (#174387)
* feat(database): support family-scoped mixed-engine operations * fix(database): align mixed-engine CLI metadata and test contracts Keep root help consistent with the registered database command, place physical observation types with their inspection owner, and preserve the concrete database fixture type for strict test checks. * test(database): migrate Matrix fixtures before porting * fix(database): reconcile mixed-engine operations with current admission * fix(database): prepare cold PostgreSQL metadata before scoped port * fix(database): preserve online snapshots and remove doctor import cycle * fix(database): compose scoped lifecycle with mixed-agent admission * test(database): arrange mixed port fixtures in suite hooks |
||
|
|
3e55551264
|
feat(database): admit mixed state/agent engine pairs (#174623)
Prove all four state/agent pairs through config-driven boot, auth and reader transports, leases, native binding settlement, retirement, commit uncertainty, and reopen. Fix cold owner discovery and retained reader pinning, and admit compensation only with fresh live authority. Preserve separate commit receipts and agent-to-shared lock ordering. |
||
|
|
bcf9b16177
|
perf: reduce database write amplification with bundled layouts (#174036)
Bundle agent schema v28 and shared-state schema v26 through the existing migration and recovery owners. Retire the redundant transcript parent index, narrow the conversation index, and rebuild memory origins and session heads WITHOUT ROWID on SQLite. PostgreSQL receives the matching index DDL and retains ordinary table layouts. Preserve the admitted data and extension columns, scoped recovery, v27 PostgreSQL rollback, and schema fingerprints. Synthetic qualification reduces append/window/origin/head WAL with unchanged warmed statement and request counts. See the PR for measurements, accepted read/write tradeoffs, migration timing, and final CI dispositions. |
||
|
|
4579af08ce
|
feat(github): admit GitHub Enterprise session reads through repository-scoped App tokens (#173668)
* feat(identity): support configurable Enterprise GitHub coauthor credit Co-authored-by: galiniliev <5711535+galiniliev@users.noreply.github.com> * fix(identity): preserve enterprise credit consent across profile merges Keep enterprise credit preferences through chained profile merges, explain host-selected credit independently of the displayed primary account, and separate worker writes from identity readers. Co-authored-by: galiniliev <5711535+galiniliev@users.noreply.github.com> * refactor(identity): name Enterprise GitHub coauthor support consistently Rename the feature, internal types, worker operations and source files to Enterprise GitHub while retaining the deployed proxy header names. Carry enterprise identities through the resident profile catalog introduced on main, using the same identity projection as direct reads. Co-authored-by: galiniliev <5711535+galiniliev@users.noreply.github.com> * feat(control-ui): scope opted-in link readers to pane sessions (cherry picked from commit d14e9c16b230d425eb9aca5622bef039b8d493df) * fix(control-ui): preserve keyboard previews in session panes * feat(github): admit foreground session reads through the selected App * fix(github): retain Factory actor authority through session reads * fix(github): keep App credentials scoped to foreground reads * test(github): use an explicit synthetic App profile identifier * test(control-ui): mount chat panes with their application context * fix(github): complete Factory admission integration contracts * fix(identity): preserve issuer scope and editable coauthor consent Co-authored-by: galiniliev <5711535+galiniliev@users.noreply.github.com> * fix(github): isolate App keys and narrow admitted repository reads Co-authored-by: galiniliev <5711535+galiniliev@users.noreply.github.com> * chore(github): regenerate integrated App config documentation Canonical config docs generator and verification passed in secretless isolation, with focused admission, exec and preview regression suites plus core/plugin typechecks and lint. Co-authored-by: galiniliev <5711535+galiniliev@users.noreply.github.com> * fix(github): export the admitted Enterprise account resolver The session admission caller introduced here needs the helper that main made private while it had only same-module consumers. Restore only the required export; keep metadata resolution private. Build, 72 focused tests, and core types pass. Co-authored-by: galiniliev <5711535+galiniliev@users.noreply.github.com> * test(gateway): prepare canonical config for native session controls The native row in the actor/native fixture uses the storage accessor runtime snapshot, not the mocked config/io getter. Install the fixture config before each case and clear it afterward. The exact pinned Bun regression fails before this setup and all nine tests pass after it; assertions and production behavior are unchanged. Co-authored-by: galiniliev <5711535+galiniliev@users.noreply.github.com> --------- Co-authored-by: galiniliev <5711535+galiniliev@users.noreply.github.com> |
||
|
|
28f5f250e1
|
feat: use oMLX for local chat and memory embeddings (#173327)
* feat(omlx): support local chat and memory embeddings * docs(omlx): clarify inference catalog model selection * docs(omlx): register provider configuration baseline * fix(omlx): preserve credentials when rerunning setup * fix(omlx): share request authentication with embeddings * test(omlx): use a literal request header fixture * fix(omlx): normalize noninteractive setup options * refactor(omlx): clarify type imports and request fixtures * fix(omlx): preserve credential boundaries across setup and embeddings * chore: align environment variable budget with main * fix(omlx): honor effective inference authentication * fix(omlx): preserve explicit local authorization headers * fix(agents): apply prepared auth to local request headers * test(omlx): align auth fixtures with prepared credentials * fix(omlx): honor header-only chat authentication * fix(auth): preserve non-secret provider auth in direct chat * fix(omlx): honor memory header overrides before resolving secrets * fix(embeddings): exclude declared auth headers from cache identity * fix(memory): preserve legacy compatible embedding index identities * docs(plugins): refresh generated inventory totals * fix(setup): replace saved provider snapshots on activation * docs(plugins): refresh generated reference total * test(setup): compare normalized provider snapshots * fix(setup): retain selected credentials for provider requests * fix(omlx): resolve profile bindings during setup discovery * test(omlx): use isolated default profile state * fix(auth): honor explicit catalog credentials before ambient keys * fix(omlx): keep discovery bound to configured credentials * fix(agents): accept prepared keys in no-auth header helper * fix(setup): preserve no-auth markers when binding saved profiles * fix(omlx): honor custom auth with saved profiles * fix(omlx): respect model-level auth overrides * test(omlx): type resolved request override fixtures * fix(omlx): replace saved auth when credentials change * fix(omlx): preserve saved auth when setup key is omitted * fix(omlx): keep configured catalog credentials authoritative * fix(plugins): preserve the narrow CLI migration patch type * fix(plugins): apply authoring auth patches through their owner * fix(plugins): carry auth patch types through remaining callers * chore(plugin-sdk): account for shared auth patch operation * chore: shrink auth result assertion allowance * fix(omlx): bind generated setup to its saved credential * fix(omlx): retain agent scope when reusing setup auth * fix(omlx): preserve selected setup secret references * fix(omlx): retain explicit setup and memory credentials |
||
|
|
6861671cda
|
feat: add independent utility model fallback chains (#173906)
* feat: support independent utility model fallback chains * fix: validate utility harnesses after runtime admission * test: cover implicit utility labels and admitted harness output * test: fix utility fallback matchers and preload onboarding runtime * fix: preserve permitted Side chat recovery with utility fallbacks * fix: avoid replaying completed utility inference * refactor: simplify utility retry validation fixes |
||
|
|
d942bc5b1f
|
feat(agents): compaction safety timeout bounds stalls when progress is reported (#130973)
* feat(agents): compaction safety timeout bounds stalls when progress is reported The compaction safety timeout is an aggregate wall clock: a healthy summarization stream that merely needs minutes (reasoning-mode models on large contexts) is killed mid-flight, and no fixed total budget fixes that — the budget scales with total work instead of health. compactWithSafetyTimeout now hands its wrapped callback an optional progress function; each call re-arms the timer, so a reporting compaction is bounded by maximum silence instead of total time. Callers that ignore it keep the exact aggregate-budget behavior of today. Plugin context engines receive onProgress in their compact() params alongside the existing abortSignal cooperation contract. Grounded in DeepSeek Harness (MIT), which bounds summarization with a per-read idle watchdog and no aggregate budget at all. * fix: satisfy prefer-const on timeoutListener * fix: register onProgress as a declared host param ClawSweeper finding: onProgress is host-injected like the other compact lifecycle fields, so it belongs in CONTEXT_ENGINE_HOST_PARAMS — engines with a declared acceptedHostParams list now opt in explicitly (undclared engines keep receiving everything). Guide + projection coverage updated to match. * fix: absolute compaction ceiling + timeout-abort listener cleanup ClawSweeper P1: the stall timer was the only bound and progress re-arms it, so a faulty engine reporting progress forever could defer compaction indefinitely. An independent absolute ceiling (10x the stall budget, not re-armable, no new configuration surface) now bounds that case. ClawSweeper P2: the timeoutAbortPromise abort listener was never removed when compaction won the race; stored and removed in the same finally as the other listeners. * fix: prefer-const on absoluteTimer * fix: satisfy probe-engine param typing in onProgress tests The three tests added with host-param registration omit the required assembleCalls capture array, and index capture arrays without guarding noUncheckedIndexedAccess. Pass explicit empty captures (matching every other call site) and use optional chaining where a missing call must still fail the assertion. * fix: re-clamp absolute compaction ceiling through the timer bound The 10x absolute ceiling passed the multiplied delay to setTimeout without the shared Node-safe clamp; a stall budget already at the timer maximum would overflow the delay bound and abort immediately. Resolve the product through resolveTimerTimeoutMs and cover the maximum input with a regression test. Document the changed contract: timeoutSeconds is a total-duration bound without progress, a silence budget for reporting engines, always capped by the 10x ceiling. * fix: timeout rejection outranks cancellation-driven completion The rejection listener is now the first observer of the timeout signal, registered before the cancel hook and the composed abort signal. A cooperative compaction that settles synchronously from onCancel (the production activeSession.abortCompaction path) could previously queue its fulfillment ahead of the timeout rejection and fulfill the race after the deadline. Regression test proven failing on the prior ordering. Docs now state the absolute ceiling is timer-clamped. --------- Co-authored-by: Elharony Claw <elharonyclaw@users.noreply.github.com> |
||
|
|
995a9ae021
|
feat(database): per-family database engine selection (#173755)
* feat(database): prototype per-family engine selection Draft prototype only. Config approval and family-aware recovery remain pending. * feat(database): guard mixed-engine lifecycle operations * test(database): carry family selection in maintenance fixtures * fix(database): preserve backup and plugin loading boundaries * fix(database): preserve default resolver and lazy CLI preparation * fix(database): close homogeneous lifecycle admission gaps * fix(database): integrate mixed selections with scoped workers * fix(database): decouple engine registry config types |
||
|
|
574479aa5f
|
fix: custom endpoint setup fails auth-less servers outside loopback, leaving half-applied provider config (#172152)
* fix(models): support explicit no-auth custom endpoints The custom endpoint wizard promises "API Key (leave blank if not required)", but a blank key only works for loopback/RFC1918 base URLs: synthetic no-auth credentials are gated on local host classification, so auth-less servers on tailnet/VPN hosts (e.g. Tailscale Serve) fail the setup live check and leave a half-applied state - an auth profile for a provider whose `models.providers` registration was reverted. Add an explicit `auth: "none"` provider mode as an operator declaration: - config: accept `auth: "none"` on `models.providers.<id>` and widen the model-registry provider auth schema - auth resolution: mint the no-auth marker for `auth: "none"` routes with any reachable host, bypassing only the locality heuristic - wizard: a blank API key now confirms no-auth mode and persists `auth: "none"` instead of silently producing a broken provider - non-interactive: `--custom-no-auth` (rejects `--custom-api-key` conflicts) and applyCustomApiConfig key/auth-mode clearing on re-onboard between keyed and no-auth setups - docs: document `auth: "none"` for auth-less custom endpoints * fix(models): make no-auth authoritative and scope it to openai-completions Review follow-ups (ClawSweeper #172152): - auth resolution: `auth: "none"` is now an authoritative operator declaration enforced at the top of the provider credential selection, so stored profiles, pinned credentials, env keys, and inline keys are never handed to a host explicitly marked keyless - adapter scope: no-auth synthesis and setup (wizard, parse, and apply) are restricted to openai-completions, the only transport that suppresses the Authorization header for the synthetic marker; the wizard re-prompts for a key when a non-openai compatibility was selected after a blank-key no-auth confirmation - reset preflight: --custom-no-auth + --custom-api-key conflicts are detected before --reset moves existing state to Trash - non-interactive no-auth no longer resolves or serializes ambient CUSTOM_API_KEY credentials (previously crashed the replacement branch with an empty profile set) - tests: resolver precedence over stored profiles, adapter restriction, reset preflight conflict, env-skip, wizard compat fallback * fix(models): let explicit auth none outrank retained inline provider keys A provider entry hand-authored with both auth: "none" and a stale apiKey previously fell through to inline-key selection, egressing the key to a host declared keyless. The no-auth declaration now outranks inline keys the same way it outranks stored profiles and env credentials; verified wire-level (capture server saw no Authorization header and no key material with both inline and env keys present). * test: move explicit no-auth coverage into focused suite * fix: enforce no-auth at final request and setup boundaries * fix: preserve no-auth adapter types and reset validation * chore: shrink stale environment variable count budget --------- Co-authored-by: Peter Steinberger <steipete@gmail.com> |
||
|
|
24ed521600
|
feat: run sandbox Auto Review with a restricted host reviewer (#173455)
Add an optional sandboxed code-review tool that preserves caller permissions and returns canonical validated reports through a restricted host reviewer. Refs #173636 and #173761. |
||
|
|
123cfae70a
|
fix(x): keep failed requests out of public X replies (#173701)
Automatic X replies now post only when the agent declares [[x_success]]. Declared failures, untagged replies, and error finals are withheld and optionally reported through channels.x.failureRoute; NO_REPLY and empty finals are dropped. Co-authored-by: Kimiyu-186 <202845257+Kimiyu-186@users.noreply.github.com> Co-authored-by: steipete <58493+steipete@users.noreply.github.com> |
||
|
|
2afa400a0d
|
feat(nextcloud-talk): support inbound attachments (#135895)
Some checks are pending
Native App Locale Refresh / Refresh native de (push) Blocked by required conditions
Native App Locale Refresh / Refresh native es (push) Blocked by required conditions
Native App Locale Refresh / Refresh native fa (push) Blocked by required conditions
Native App Locale Refresh / Refresh native fr (push) Blocked by required conditions
Native App Locale Refresh / Refresh native hi (push) Blocked by required conditions
Native App Locale Refresh / Refresh native id (push) Blocked by required conditions
Native App Locale Refresh / Refresh native it (push) Blocked by required conditions
Native App Locale Refresh / Refresh native ja-JP (push) Blocked by required conditions
Native App Locale Refresh / Refresh native ko (push) Blocked by required conditions
Native App Locale Refresh / Refresh native nl (push) Blocked by required conditions
Node Runtime Conformance / scope (push) Waiting to run
Node Runtime Conformance / TypeScript contracts (push) Blocked by required conditions
Node Runtime Conformance / Rust workspace (push) Blocked by required conditions
OpenClaw Stable Main Closeout / Resolve stable release closeout inputs (push) Waiting to run
OpenClaw Stable Main Closeout / Verify stable main closeout (push) Blocked by required conditions
Plugin Init Scaffold Validation / scope (push) Waiting to run
Plugin Init Scaffold Validation / Validate provider scaffold (push) Blocked by required conditions
Plugin NPM Release / preview_plugins_npm (push) Waiting to run
Plugin NPM Release / Validate release publish approval (push) Blocked by required conditions
Plugin NPM Release / preview_plugin_pack (push) Blocked by required conditions
Plugin NPM Release / Preflight plugin npm package () (push) Blocked by required conditions
Plugin NPM Release / Seal prepared plugin npm release (push) Blocked by required conditions
Plugin NPM Release / Trusted publisher OIDC exchange (push) Blocked by required conditions
Plugin NPM Release / approve_plugins_npm_release (push) Blocked by required conditions
Plugin NPM Release / Publish plugin npm package () (push) Blocked by required conditions
Plugin NPM Release / verify_plugins_npm (push) Blocked by required conditions
Vitest Cache Warm / warm (push) Waiting to run
Vitest Cache Warm / dependencies (push) Waiting to run
Workflow Sanity / actionlint (push) Waiting to run
Workflow Sanity / generated-doc-baselines (push) Waiting to run
* feat(nextcloud-talk): support inbound attachments
* test(nextcloud-talk): avoid credential-shaped URL fixture
* fix(nextcloud-talk): drop denied attachment-only turns
* fix(nextcloud-talk): revalidate access after media I/O
* fix(nextcloud-talk): guard credentialed media staging
* test(matrix): avoid runtime mock assertion
* fix(nextcloud-talk): cancel retired media claims
* fix(nextcloud-talk): preserve native voice media semantics
* refactor(test): extract plugin runtime media mock
* test(nextcloud-talk): import authorization fixture types
* fix(nextcloud-talk): accept authenticated short file links
* fix(nextcloud-talk): accept numeric file-share sizes
* test(nextcloud-talk): preserve send module mock exports
* test(gateway): separate recovery wait budgets
Carry the fixture-only correction from upstream
|
||
|
|
e4433bd4d5
|
feat(plugins): add optional agent-guidance plugin (#173602)
* feat(plugins): add optional agent-guidance plugin * fix(agent-guidance): reject empty instruction configuration * improve(agent-guidance): clarify setup and use shared plugin artwork * fix(agent-guidance): validate config with the existing SDK record guard Replace the unchecked Record cast flagged by checks-fast-baseline-ratchets with the existing isRecord type guard. Preserve accepted values and error behavior without expanding the SDK. --------- Co-authored-by: Gio Della-Libera <giodl73-repo@users.noreply.github.com> Co-authored-by: Patrick Erichsen <patrick.a.erichsen@gmail.com> |
||
|
|
81662c56b6
|
feat: add Claws as ordinary agents and resources (#171623)
* Provision ordinary agents and resources with one-way Claw Add * test(claws): prove add consent at Gateway effect boundary * fix(claws): include Add worker contract in PR wrapper * fix(claws): align cron removal contract with Add lifecycle * test(claws): align Add fixtures with current main APIs * fix(skills): retain incomplete ClawHub recovery status * fix(lobster): preserve invocation authority across approval resume * fix(claws): handle double-digit copies and async deletion journals * fix(claws): keep legacy inventory reads cycle-free * refactor(exec): remove unused private child control hook * test(claws): align retained contracts after main integration * docs(config): refresh generated baseline for Claw Add * test(claws): use owned completion signals and meet ratchets * refactor(claws): remove stale inventory re-exports * chore(claws): shrink assertion baseline after reader split * chore(claws): isolate Lobster changes from Add * test(claws): use generic plugin fixtures * test(claws): keep schema conformance below line cap * chore(claws): align environment budget with main * test(claws): remove retired policy test from worker inventory * test(claws): drop unrelated process signal case * fix(claws): serialize agent allocation for repeated Adds * fix(claws): roll back unpublished shared requirements * test(gateway): isolate plugin approval routing fixtures * fix(process): drop stale Windows shim polling * test(claws): give plugin batch fixture an agent manifest * test(ci): stabilize gateway runtime placement admission fixture * fix(claws): compensate plugin install after batch failure * test(claws): verify chat session after re-adding deleted agent * refactor(claws): split package rollback and install contracts * docs(claws): refresh worker inventory after main integration * test(cron): allow cold gateway startup in integration fixture |
||
|
|
c47f8037cc
|
fix: community banner crowds mobile session navigation (#173195)
* fix(ui): community banner crowds mobile session navigation Replace the promotion with a compact on-demand Community entry and native mobile sheet or desktop dialog. Preserve deployment and branding gates and remove the retired dismissal lifecycle. Co-authored-by: vincentkoc <25068+vincentkoc@users.noreply.github.com> * fix: repair community UI regression checks Scope the pointer cursor to the actual anchor, preserve the optional modal registry contract, and use the private jsdom Window receiver for serialized mock listeners under Bun. Co-authored-by: vincentkoc <25068+vincentkoc@users.noreply.github.com> * fix(ui): start diagnostics when lazy connection pages bind Use the page binding lifetime rather than detached DOM state so diagnostics start before lazy-route insertion. Preserve request epochs, visibility, offline device recovery, and disposal; cover the delayed-module entry path. Co-authored-by: vincentkoc <25068+vincentkoc@users.noreply.github.com> * docs(ui): align Community settings with compact entry Retire dismissal wording in the canonical settings help, label, schema comment, and proof guidance. Regenerate the intentional configuration-copy hash; configuration shape and defaults are unchanged. Co-authored-by: vincentkoc <25068+vincentkoc@users.noreply.github.com> --------- Co-authored-by: vincentkoc <25068+vincentkoc@users.noreply.github.com> |
||
|
|
3f9822434a
|
feat(typesafe): support custom decision servers through provider settings (#173101)
* feat(typesafe): support opted-in remote HTTPS decision servers Co-authored-by: jacobtomlinson <1610850+jacobtomlinson@users.noreply.github.com> * feat(typesafe): reuse standard provider connection settings Replace the unpublished plugin-specific network and auth switches with models.providers.typesafe and the shared request policy. Fail closed for empty explicitly selected auth in the shared owner. Co-authored-by: jacobtomlinson <1610850+jacobtomlinson@users.noreply.github.com> * fix(typesafe): prevent reflected request credentials in decisions Reuse the shared auth-aware response redactor for prefixed custom authentication headers as well as arbitrary header reflection checks. Co-authored-by: jacobtomlinson <1610850+jacobtomlinson@users.noreply.github.com> * fix(typesafe): check decoded responses for reflected credentials Check canonical decoded JSON as well as raw wire text. Reuse the shared exact-value matcher for auth-aware redaction so custom header credentials retain JSON and URL representation coverage. Co-authored-by: jacobtomlinson <1610850+jacobtomlinson@users.noreply.github.com> * fix(typesafe): preserve valid rubric text during credential checks Separate exact active-credential matching from diagnostic redaction. Share credential representations and normalized provider lookup with existing owners, keep lookup imports lightweight, and honor shared missing-secret classification. Co-authored-by: jacobtomlinson <1610850+jacobtomlinson@users.noreply.github.com> * fix(typesafe): reject reflected configured header credentials Check final transmitted values of configured provider and request headers without treating automatic transport defaults as credentials. Co-authored-by: jacobtomlinson <1610850+jacobtomlinson@users.noreply.github.com> * feat(typesafe): support custom decision servers through provider settings Worked on by: - @jacobtomlinson Co-authored-by: jacobtomlinson <1610850+jacobtomlinson@users.noreply.github.com> OpenClaw-Publication: af3464f2-4221-47ef-af34-b04d8037a187 * docs(typesafe): use Kev in custom provider examples Keep arbitrary router model IDs supported while showing the declared Kev alias in user-facing setup examples. Co-authored-by: jacobtomlinson <1610850+jacobtomlinson@users.noreply.github.com> * test(typesafe): reconcile provider help and mock exports Regenerate the config documentation hash for the two intentional TypeSafe help changes, with unchanged schema counts. Preserve real SDK exports in the guarded HTTPS fixture mock. Co-authored-by: jacobtomlinson <1610850+jacobtomlinson@users.noreply.github.com> * test(typesafe): initialize transport before response assertions Separate cold loader and shared policy initialization from response-contract test deadlines. Keep the one-second budget and explicit cold-import, expiry, and remaining-budget tests unchanged. Co-authored-by: jacobtomlinson <1610850+jacobtomlinson@users.noreply.github.com> * fix(typesafe): respect shared request authentication precedence Apply configured provider headers as defaults before request-level header and authentication overrides. Cover stale bearer, custom-header replacement, and request-header precedence through the registered HTTPS adapter. Co-authored-by: jacobtomlinson <1610850+jacobtomlinson@users.noreply.github.com> * test(typesafe): prepare policy before admission timing Keep real shared-policy initialization outside the prefilter admission budget, matching existing client preparation. Preserve the 500 ms deadline, suspended import, real HTTP path, and all final-I/O revocation assertions. Co-authored-by: jacobtomlinson <1610850+jacobtomlinson@users.noreply.github.com> --------- Co-authored-by: jacobtomlinson <1610850+jacobtomlinson@users.noreply.github.com> |
||
|
|
03af81024d
|
improve(browser): default managed Chromium to efficient headless launches (#154607)
* refactor(browser): share engine adapters for Chromium and Lightpanda Refresh signed stack identities without changing any source tree. Previous signed head: |
||
|
|
8f1a499eb5
|
feat(agents): remember native runtime consent per agent (#172607)
## Problem
Every new chat that used a host-native runtime such as Muse Code asked again: "Use Muse Code's native permissions?" The owner wants to approve this once and not see it again.
## Solution
- New agent-scoped config `agents.entries.<agentId>.nativeRuntimeConsent: string[]` (harness IDs). Helpers live in `src/config/native-runtime-consent.ts`.
- Core evaluates the list at every turn (`assertAgentHarnessExecutionEnvironment`). The usual gates still apply: current session identity, Full Access, sandbox off, no tool allowlist, no `disableTools`, no swarm collector. Required sandbox or workspace-only restrictions still refuse. Remembered consent is never copied onto the session, so removing a harness from the list revokes it on the next turn.
- When an admin selects a remembered harness (model selection or `sessions.create`), the session is raised to Full Access with sandbox off. Only admins: non-admin callers keep today's refusal.
- In chat, a remembered harness recovers silently. Other harnesses still get the existing two-choice prompt.
- Revoke from Settings → config: "Remembered native runtime permissions".
- Schema, help/labels, docs (`docs/gateway/config-agents/entries-and-multi-agent.md`) and the generated config baseline are updated. The key is new and optional, so no migration.
## Evidence
Live run on an isolated Gateway (real `muse` 1.3.0, real Meta sign-in):
- With `muse` remembered for `main`, a second new chat with Muse Spark 1.3 replied with no permissions prompt (screenshot).
- After removing `muse` from the list in Settings, the next new chat showed the prompt again. `chat.send` over RPC to an unconsented session returned `INVALID_REQUEST`, and `chat.history` stayed empty.

Tests: `execution-environment.worker.test.ts` (remembered consent admits; removal refuses with no session patch; forbidden states refuse), `sessions-patch-native-recovery.test.ts`, `sessions-create.native-consent.test.ts` (admin, non-admin, and admin without a profile-bound authority), `chat-model-restriction-recovery.test.ts`.
Note: the `check:max-lines-ratchet` env-name budget reports 455 > 454 on this branch. This branch adds no `OPENCLAW_*` names (added and removed sets are empty), so the overage comes from main.
### Review follow-up (`79e67a17ffa`, rebased on main)
- **Implicit promotion uses the permission owners.** A model-only `sessions.patch` or a `sessions.create` that promotes to Full/sandbox-off goes through the same sandbox validator and permission-change preparation/acknowledgement as an explicit `permissionMode` patch, so an active run refuses it the same way.
- **Revocation before native I/O.** Right before native `runAttempt`, core rechecks admission against the live config (`readRuntimeConfig()`), not the prepared snapshot.
- **Provenance (b46c38cfa732).** That commit set up runtime-selection preparation inside the existing session mutation lane, keeping worker-placement validation, commit-time authority checks and the post-commit queued-selection refresh. This change keeps those owners and sends implicit permission promotions through the existing containment and permission lifecycle, instead of treating them as plain model-field assignments.
Live proof: isolated Gateway on this head, real `muse` 1.3.0, `tools.profile=full`, `tools.deny=["browser"]`. `main` remembers `muse`; `other` does not. With no OpenClaw restriction, Muse may run without consent by design; consent is only required when OpenClaw has a restriction Muse cannot enforce.
1. Non-admin caller is refused:
```text
connect granted: role=operator scopes=[operator.read, operator.write]
sessions.create(model=meta/muse-spark-1.3): agentRuntimeOverride=muse; permissionMode/sandboxMode unset (no promotion)
chat.send -> INVALID_REQUEST code=AGENT_RUNTIME_RESTRICTED reason=tool-policy
"Muse Code uses its own tools and cannot enforce this chat's OpenClaw tool restrictions."
sessions.patch(model=meta/muse-spark-1.3) -> same restriction; chat.send -> same restriction
chat.history: messages=[] ; native turn/start count unchanged (9)
```
2. An agent without the consent entry is refused:
```text
connect granted operator.admin/read/write; agent:other:<id>
sessions.create(model=meta/muse-spark-1.3): no permission promotion
chat.send -> INVALID_REQUEST code=AGENT_RUNTIME_RESTRICTED reason=tool-policy recovery.action=use-native-permissions
chat.history: messages=[] ; native turn/start count unchanged (9)
```
3. Revocation stops already-queued work:
```text
sessions.create: permissionMode=full sandboxMode=off
00:22:01.543Z first native dispatch: turn/start count 8 -> 9
00:22:01.565Z second chat.send accepted; queueDepth=2 sessionState=processing
00:22:02.190Z config.patch nativeRuntimeConsent=[]
00:22:40.343Z first turn completed
00:22:40.427Z queued drain refused: "Muse Code cannot run with this chat's tool restrictions."
00:23:12.193Z native turn/start count still 9 (no second Muse turn)
```
4. Upgrade cell: state written by the previous main build `
|
||
|
|
aeeb4e813c
|
feat: suggest follow-up drafts in the chat composer (#172543)
* feat: suggest follow-up drafts in the chat composer Co-authored-by: fuller-stack-dev <263060202+fuller-stack-dev@users.noreply.github.com> * docs: record composer prediction configuration surface Refresh the generated config baseline for the optional composerPredictions object, enabled flag, and model choice. Channel and plugin surfaces are unchanged. Co-authored-by: fuller-stack-dev <263060202+fuller-stack-dev@users.noreply.github.com> * test: keep composer cleanup callback void Lit render returns a RootPart; the Vitest cleanup callback must return void. The UI chat test typecheck and all 15 prediction tests pass. Co-authored-by: fuller-stack-dev <263060202+fuller-stack-dev@users.noreply.github.com> * test: honor composer prediction fixture contracts Use the session updater callback contract and explain inference-runtime mock isolation. Gateway-method test types and all seven registered prediction cases pass. Co-authored-by: fuller-stack-dev <263060202+fuller-stack-dev@users.noreply.github.com> --------- Co-authored-by: fuller-stack-dev <263060202+fuller-stack-dev@users.noreply.github.com> |
||
|
|
a96d6ec668
|
improve: simplify Settings and configuration help (#168703)
* improve: simplify settings, configuration help, and control ui docs * test(ui): record Layout selection failure context |
||
|
|
e210870acf
|
feat: trigger automations from MCP events (#165399)
* feat: trigger automations from MCP events Co-authored-by: steipete <58493+steipete@users.noreply.github.com> * feat: trigger automations from MCP events Worked on by: - @steipete Co-authored-by: steipete <58493+steipete@users.noreply.github.com> OpenClaw-Publication: 18b8c78b-d141-44b4-9c38-3b05bb10abc0 * docs: clarify MCP event downgrade compatibility Removing event jobs does not reverse inherited database schema upgrades. Require target-release preflight and a compatible pre-upgrade backup when the older release refuses upgraded state. Co-authored-by: steipete <58493+steipete@users.noreply.github.com> * feat: trigger automations from MCP events Worked on by: - @steipete Co-authored-by: steipete <58493+steipete@users.noreply.github.com> OpenClaw-Publication: b55549d5-44b2-4066-a96e-12f8af1dba48 * chore(workboard): refresh generated event schedule assets Co-authored-by: steipete <58493+steipete@users.noreply.github.com> * fix: keep MCP authorization available on first use Publish newly enrolled file identity through its existing owner. Preserve append-only method contracts, close wrapper runtime inputs, regenerate authorized config/tool metadata, and keep receipt publication and request encoding with coherent owners. Co-authored-by: steipete <58493+steipete@users.noreply.github.com> --------- Co-authored-by: steipete <58493+steipete@users.noreply.github.com> |
||
|
|
e3b8a28276
|
feat(database): PostgreSQL migrations, capability admission and exact schema-drift checks (#172265)
Add atomic PostgreSQL forward migrations, reject unsupported version/encoding capabilities, and admit only exact schema facts. Final-head PostgreSQL CI passed 444 tests, including all 11 acceptance cases. SQLite conformance preserved 316 byte-identical operations. Land under the operator-authorized causal-path exception for failures in unchanged SQLite session-fact and managed npm installation paths. Full qualification and evidence: https://github.com/openclaw/openclaw/pull/172265 |
||
|
|
a77bf04780
|
feat(labs): add experimental Advisor that steers agents off avoidable work (#169564)
Some checks are pending
Native App Locale Refresh / Refresh native pt-BR (push) Blocked by required conditions
Native App Locale Refresh / Refresh native ru (push) Blocked by required conditions
Native App Locale Refresh / Refresh native sv (push) Blocked by required conditions
Native App Locale Refresh / Refresh native th (push) Blocked by required conditions
Native App Locale Refresh / Refresh native tr (push) Blocked by required conditions
Native App Locale Refresh / Refresh native uk (push) Blocked by required conditions
Native App Locale Refresh / Refresh native vi (push) Blocked by required conditions
Native App Locale Refresh / Refresh native zh-CN (push) Blocked by required conditions
Native App Locale Refresh / Refresh native zh-TW (push) Blocked by required conditions
Native App Locale Refresh / Commit native locale refresh (push) Blocked by required conditions
Node Runtime Conformance / scope (push) Waiting to run
Node Runtime Conformance / TypeScript contracts (push) Blocked by required conditions
Node Runtime Conformance / Rust workspace (push) Blocked by required conditions
OpenClaw Stable Main Closeout / Resolve stable release closeout inputs (push) Waiting to run
OpenClaw Stable Main Closeout / Verify stable main closeout (push) Blocked by required conditions
Plugin Init Scaffold Validation / Validate provider scaffold (push) Blocked by required conditions
Plugin Init Scaffold Validation / scope (push) Waiting to run
Plugin NPM Release / preview_plugins_npm (push) Waiting to run
Plugin NPM Release / Validate release publish approval (push) Blocked by required conditions
Plugin NPM Release / preview_plugin_pack (push) Blocked by required conditions
Plugin NPM Release / Preflight plugin npm package () (push) Blocked by required conditions
Plugin NPM Release / Seal prepared plugin npm release (push) Blocked by required conditions
Plugin NPM Release / Trusted publisher OIDC exchange (push) Blocked by required conditions
Plugin NPM Release / approve_plugins_npm_release (push) Blocked by required conditions
Plugin NPM Release / Publish plugin npm package () (push) Blocked by required conditions
Plugin NPM Release / verify_plugins_npm (push) Blocked by required conditions
Vitest Cache Warm / dependencies (push) Waiting to run
Vitest Cache Warm / warm (push) Waiting to run
Workflow Sanity / actionlint (push) Waiting to run
Workflow Sanity / generated-doc-baselines (push) Waiting to run
Built on #170146 (`forkSession`), #170152 (`steerActiveRun`), #171307 (shared `api.runContext`), #171534 (event `phases`), #171580 (forks show in-flight calls as pending) and #171610 (`payload: "metadata"`), #171651 (internal skill-workshop reviews are not user turns) and #171661 (Codex outer tool-call lifecycle), all on `main`. Related: #169558. ## What Problem This Solves Agents sometimes spend turns on work nobody asked for, repeat failing or stalled tool calls, or report results the tools do not support. Nothing notices until the user does. ## User Impact Operators can turn on **Settings → Agents & Tools → Labs → Advisor** (default off). While the agent works, Advisor reviews the conversation every few tool calls or minutes, on the session's own model. If it finds avoidable work, it steers the running turn with one short correction, or queues the correction for the next turn when steering is unavailable. Otherwise nothing happens. It never runs tools, delays, stops or approves anything. **Configure** beside the switch opens the plugin settings page: - `everyToolCalls` (default 10) and `everyMinutes` (default 20); `0` turns a trigger off. - **Review instructions** (`reviewInstructions`, optional, at most 4,000 characters): edits what Advisor looks for and when it stays quiet. A blank field uses the evaluated built-in guidance, which is shown as placeholder text. Changes apply on the next review without a restart. The output format, the safety rules and the verify step stay fixed, so custom guidance cannot bypass fail-closed parsing or verification. Custom guidance is not covered by the evaluation below. ## Why This Change Was Made A default-off bundled plugin (`advisor`) built only on public SDK seams: - **Admission:** the history-free `before_agent_reply` hook (`eligibleTriggers: ["user"]`) records each user-triggered run in `api.runContext` and never claims the turn. Advisor does not subscribe to `llm_input`, `agent_end` or `after_tool_call`, because subscribing makes the host copy the conversation history or tool results on every turn. - **Trigger:** the service's single subscription to the agent-event stream counts `tool` starts, so stalled and backgrounded commands count too. Every N tool starts or M minutes, a review becomes due. It uses `phases` and `payload: "metadata"`, so the host never clones tool results, updates or arguments for Advisor. - **Safe boundary:** a due review (and its verify step) dispatches only when no tool call is in flight. Built-in calls settle on their `result` event; Codex calls settle on native item completion (`codex_app_server.item` `completed`, which fires after codex-rs records the output), including outer code-mode calls. Run end is always a safe boundary. Forking mid-call would show the open call as `aborted` (codex-rs normalization). Live, before this rule, that led to a false "retry it" correction that made an agent repeat successful commands. Run timing starts at lifecycle start, and end or error closes the run. - **Review, stage 1:** `api.runtime.subagent.forkSession` runs on the plugin service scheduler. The review sees the full live context at cached-input prices and runs no tools. The reply's first line must be `NO_CHANGE` or `CORRECTION`. - **Verify, stage 2:** runs only after a `CORRECTION`. A second fork of the same cached context checks the draft against the conversation. The problem must be shown by tool results or user messages, not by pending work. The advice must keep every user requirement (prohibitions, scope, ordering, timing, environment), and its next step must be cheaper and still complete the request. The fork replies `APPROVE` (with the final text) or `REJECT`. - **Fail closed:** both replies are parsed structurally. A malformed reply, a reserved decision word inside the body, a timeout or an error means no steering. The warning is bounded and content-free; it never contains model or provider text. - **Delivery:** `api.session.workflow.steerActiveRun`, falling back to `enqueueNextTurnInjection` (24 h TTL). - One review in flight per session, covering both stages under one deadline. Reviews are cancelled on reset, disable and service stop. The interval counter restarts when a review finishes. Tool events from channel runs, which carry no `sessionKey`, are routed through the admitted run's key. An earlier version reviewed a bounded text excerpt with a separately configured model. In a real-API evaluation it made 2 false corrections in 5 runs: it misread polled background commands as extra launches. The full-context fork made none, so the excerpt reviewer and the model setting were removed. Settings UI: a new generic, optional `multiline` hint in plugin manifest `uiHints` (manifest types, normalizer, and an additive optional field in the Gateway protocol config schema) renders a string field as a textarea in the existing config form. Fields without the hint render exactly as before. Advisor is its first user. Labs: **Configure** follows the settings-row control slot (a ghost action beside the switch), through a new optional `actions` slot on `SettingsToggleRow`. The shared toggle-row click handler now ignores clicks on links, buttons and fields. Before, clicking a Labs "Documentation" link also toggled the lab; a regression test fails on the old handler. ## Evidence Labs before (current `main`, no Advisor row):  Labs after, with Advisor enabled:  Plugin settings page opened by **Configure**, with the multiline **Review instructions** field:  Ordinary-turn overhead, with Advisor enabled and no review due. Clones were counted per call site with an instrumented `structuredClone` across 10 real Gateway turns per workload, in a pinned Linux container (mock provider). The table shows serialized bytes the host clones for Advisor per turn: | Workload | Before this change (`llm_input` + unfiltered events) | This PR | Advisor disabled | |---|---:|---:|---:| | Short turn | 2,988 | 1,375 | 0 | | 200 KiB history | 209,377 | 1,380 | 0 | | 1 MiB history | 1,053,153 | 1,380 | 0 | | 5 tools × 256 KiB results | 1,326,523 | 2,899 | 0 | Hot-path CPU, measured as interleaved microbenchmarks (median per turn): the history copy at 1 MiB costs 0.28 ms before and 0 ms now; the event dispatch on a tool-heavy turn costs 0.90 ms before and 0.14 ms now. Latency on whole turns was not resolvable on the shared host: block drift reached 35%. That pilot is recorded as exploratory and makes no p95 claim. A review itself (two forks at most) runs only when a trigger fires. Review-decision evaluation, real APIs. Each scenario's conversation is replayed in the provider's native format (tool calls, tool results, tool schemas with `tool_choice: none`), with the review message appended, as the fork sends it. Corrections were graded by a model judge with a written rubric: evidence, a cheaper step that still completes the request, user instructions kept, at most 120 words. Final numbers come from a **blind holdout**: 40 new scenarios written by a separate agent that never saw the prompt, frozen before the run, 3 runs per model. | Model | Variant | False corrections | Recall | Correction quality | |---|---|---|---|---| | `gpt-5.6-luna` | single pass | 3/60 | 60/60 | 87.3% | | `gpt-5.6-luna` | **with verify step** | **0/60** | 60/60 | **95.0%** | | `gpt-6.1-sol` (Codex default) | with verify step | 0/60 | 60/60 | 95.0% | | `claude-sonnet-5-5` | with verify step | 3/60 (one scenario) | 60/60 | 84.1% | The original prompt corrected 9–16 of 24 legitimate runs per model on the first scenario set. Its live failure: told an agent to run a requested wait loop in parallel. The verify step costs about 1.4–2.1 s and well under a cent, and it runs only when stage 1 proposes a correction. Live on this branch (isolated Gateway, Codex and built-in luna, review every 3 tool calls): - **Requested polling** (8 checks, 2 s apart): Codex reviewed 4 times, `NO_CHANGE` each time (4.2–5.3 s, about 15–16k cached tokens, input 75). Luna drafted 2 corrections; stage 2 rejected both. No steering, and every requested check ran. - **Search task:** both agents broadened the search after one miss, so there was no waste to correct. Codex said `NO_CHANGE`; luna drafted a correction and stage 2 rejected it. - **Steering delivery:** shown live on an earlier head of this branch (luna, `steered: true`, guidance in the next provider request, the agent changed course). On this head, the approve-then-steer path is covered by the tests below. Known limits: - `claude-sonnet-5-5` falsely corrects one hard negative scenario in all 3 runs, and its correction quality is below 95%. - On Codex with a restricted tool profile (for example `tools.profile: coding`), the existing `/btw` native-tool rule refuses forks, so Advisor cannot review those sessions. It logs the refusal once per review interval. Tests: - Plugin: 46 tests. The default guidance composes to the byte-identical evaluated prompt; custom guidance replaces only the guidance part; whitespace-only means default; the verify message is unaffected; config edits apply on the next review. Earlier coverage: through the real plugin API surface. They cover: hook and service as separate registrations; channel tool events without `sessionKey`; approve then steer and the next-turn fallback; reject, malformed, conflicting-token, empty and timed-out stage 1 or 2 replies, each with zero deliveries and one bounded, content-free warning; the interval restarting after a slow or failed review; cancellation on reset, disable and stop. - Config form: the textarea renders and edits save for `multiline` fields; manifest hint normalization is tested. - Labs page: 65 tests, covering on/off writes, the Configure link and in-app navigation under a base path, and no toggle on link click. **Merge danger:** two-way door; default off. A revert removes the plugin, its Labs row and the Configure link. A saved `plugins.entries.advisor` entry would remain in config. Co-authored-by: Ayaan Zaidi <hi@obviy.us> |
||
|
|
0916839746
|
fix(moonshot): Kimi web search stops working when Moonshot retires $web_search (#171835)
* fix(moonshot): use Kimi search endpoint before $web_search retirement Fixes #169072. Replace chat-completions builtin replay with one POST to /tools/search. Return wrapped structured results, honor count or configured maxResults as limit, and key the cache by query, base URL, and resolved count. Preserve endpoint routing, HTTP errors, missing-key guidance, cache TTL, and caller cancellation. Coordinator live evidence on 2026-10-13 against https://api.moonshot.ai/v1: POST /tools/search with bearer authentication and {"text_query":"<query>","limit":<n>} returned HTTP 200 with search_results containing title, url, site_name, snippet, date, icon, authority, mime, and text fields. Sending query instead of text_query returned HTTP 400 with "text_query is required". The builtin retires on 2026-10-20. Remove the obsolete model prompt and synthesized-answer path. Keep webSearch.model schema-compatible but deprecate and ignore it. Moonshot has no plugin-owned Doctor repair hook; document manual key removal without adding repair infrastructure. Update the provider boundary tests, existing live-search assertions, and Kimi/Moonshot/web-search docs. * fix(moonshot): keep Kimi result metadata out of untrusted fields Derive siteName from the result URL and accept only YYYY-MM-DD dates, so page-controlled site_name/date text cannot sit outside the wrapped untrusted-content boundary (same policy as the Brave provider). * chore(moonshot): refresh config docs and assertion baselines for Kimi search |
||
|
|
42d45b1b08
|
feat(team-reports): allow pausing automatic collection (#171840)
* feat(team-reports): allow pausing automatic collection * chore(team-reports): refresh scheduling config baseline |