Commit Graph

45549 Commits

Author SHA1 Message Date
Peter Steinberger 345cfde43d refactor(agents): deduplicate tool display definitions (#129306) 2026-08-25 20:43:58 -07:00
Peter Steinberger 20b453f155 fix(agents): reject forged plugin owner authority (#104872)
* fix(security): bind channel owner authority to trusted runtime

* fix(plugins): preserve untrusted channel guest ingress

* fix(plugins): snapshot channel ingress authority once
2026-08-25 20:36:05 -07:00
Peter Steinberger 5dd6371d7a fix(cron): reject generic timeouts for script payloads (#129407) 2026-08-25 20:34:52 -07:00
Peter Steinberger d0e492df66 fix(models): avoid retired automatic auth-probe models (#129798)
Co-authored-by: Finn763 <165816600+Finn763@users.noreply.github.com>
2026-08-25 20:31:51 -07:00
Peter Steinberger 73713d1a4f test(heartbeat): remove duplicate event wake case (#129821)
Amp-Thread-ID: https://ampcode.com/threads/T-01a037b5-3918-749f-90bd-5c9ac1dced16

Co-authored-by: Amp <amp@ampcode.com>
2026-08-25 20:31:35 -07:00
Peter Steinberger 7131e5114a fix(gateway): deliver queued WebChat replies after source completion (#116649) 2026-08-25 20:27:34 -07:00
Peter Steinberger b951bb8223 fix(cron): preserve watched commands across gateway hot reload (#115761)
Co-authored-by: Andy Ye <35905412+TurboTheTurtle@users.noreply.github.com>
2026-08-25 20:22:30 -07:00
Peter Steinberger cb6c508fe3 fix(runtime): isolate workspace, provider, and streaming lifecycles (#116650) 2026-08-25 20:19:58 -07:00
Peter Steinberger 37b00d0c60 fix(gateway): rank project picker GitHub search by relevance (#129752)
* fix(gateway): rank project picker GitHub search by relevance

The Control UI project picker searched /search/repositories with
sort=updated, so a query like openclaw/openclaw surfaced whichever of
~68k tokenized matches was pushed most recently instead of the repo the
user typed; a local updatedAt re-sort destroyed relevance a second time.

Use GitHub best-match ordering for the global lane, preserve API order,
and resolve exact owner/name queries directly via GET /repos/{owner}/{name}
ranked first (404 degrades to search). Deletes candidateSort and the
SearchCandidate wrapper.

* fix(gateway): degrade optional search lanes on transport failure

ClawSweeper P2: the exact-repo and affiliated lanes only swallowed
ControlUiGitHubError, so a transport rejection (network failure, abort
timeout) escaped Promise.all and failed the whole picker search even
when global search succeeded. Optional enrichment lanes now degrade to
search-only results on any failure.
2026-08-25 20:15:33 -07:00
Peter Steinberger 6b02b00e23 fix(gateway): scope crash loop channel recovery hints (#129697) 2026-08-25 20:14:25 -07:00
Peter Steinberger 422d6818e4 refactor(workers): unify cloud bootstrap lifecycle (#129719)
* refactor(workers): unify cloud bootstrap lifecycle

* fix(workers): preserve cloud setup and repair qa fixtures
2026-08-25 20:11:33 -07:00
Peter Steinberger 316c341756 fix(process): await process-tree cleanup before cancellation settles (#98539)
* fix(process): await process-tree cleanup before cancellation settles

* fix(process): remove unused process-tree options re-export
2026-08-25 20:05:35 -07:00
Peter Steinberger a1a277fb52 test(cron): remove duplicate session override coverage (#129736)
Amp-Thread-ID: https://ampcode.com/threads/T-01a037b5-3918-749f-90bd-5c9ac1dced16

Co-authored-by: Amp <amp@ampcode.com>
2026-08-25 20:05:19 -07:00
NIO 7aef033657 fix(agents): bound stalled binary provider response reads (#109067) 2026-08-25 20:02:39 -07:00
Dallin Romney 3d09235b0f test(plugins): restore metadata lifecycle contract (#129742) 2026-08-26 11:00:09 +08:00
Peter Steinberger 1c1eeedb96 fix(gateway): unblock GitHub publication on hooksPath checkouts and auto-retry deferred requests (#129772)
* fix(gateway): unblock GitHub publication on hooksPath checkouts and auto-retry deferred requests

Every publication on a checkout with core.hooksPath configured (which
pnpm install sets in every OpenClaw checkout via prepare-git-hooks.mjs)
failed terminally as workspace_changed: the unsafe-transport assertion
rejected the config before the snapshot could be captured, and the agent
was told to retry forever.

Neutralize instead of reject: the executor pins core.hooksPath=/dev/null
via GIT_CONFIG_* env on every publication git command, so repo-authored
hooks can never run under Gateway publication privilege, and the unsafe
regex drops core.hookspath.

Replace the three model-facing dead ends with a durable deferred queue:
cloud publishes without a live claim queue a claim-less session request,
orphaned claim rows defer instead of terminally failing, preparation
failures defer, and authority loss requeues. Deferred rows publish
automatically at the next accepted reconciliation or quiescent sweep;
persistent failures terminalize with an accurate code and are reported
to the session transcript.

* test(gateway): move publication deferral test to boundaries suite

Keeps github-publication.test.ts under the max-lines gate.
2026-08-25 19:55:53 -07:00
Peter Steinberger 4a7f49d39c fix(agents): keep streamed code blocks within message limits (#129487)
* fix(agents): honor fenced streaming chunk budgets

* fix(agents): preserve unfinished fenced stream content
2026-08-25 19:48:36 -07:00
Peter Steinberger 6f2409b680 fix(nodes): validate photo payloads before publishing captures (#116927) 2026-08-25 19:48:11 -07:00
Peter Steinberger e5173eddd4 fix(parallels): macOS dev upgrade needlessly rebuilds the checkout (#129444)
* fix(parallels): skip packaging for macOS dev upgrades

* fix(test): sanitize compile cache for all vitest children

* test(node-host): honor disabled worker compile-cache fixtures
2026-08-25 19:39:31 -07:00
Peter Steinberger 3caf21bdd4 refactor(gateway): consolidate pairing approval ownership (#129744)
The approval plan now owns the whole trusted-proxy auto-approval
decision — eligibility and the capped grant — returning
trustedProxyAutoApproveScopes/trustedProxyUser instead of a bare flag
that requirePairing re-derived from config. One failPairingHandshake
helper replaces three hand-rolled failure blocks, and the bootstrap
retry block in connect-existing-device flattens its guard pyramid and
computes scopes only where used. Behavior-neutral; net -20 production
LOC.
2026-08-25 19:38:59 -07:00
Peter Steinberger a9303f27e9 fix(workboard): preserve unassigned worker ownership (#115119)
* fix(workboard): preserve unassigned worker ownership

* fix(plugins): defer session config until ownership resolution

* test(workboard): keep claimed default workers unassigned
2026-08-25 19:34:43 -07:00
sashankh 93573e8fdf fix(models): --agent is silently ignored by models aliases and models scan (#126864)
* fix(models): reject --agent on aliases and scan instead of ignoring it

models aliases list/add/remove and models scan never read the parent
--agent option, so an operator scoping one of them to an agent got no
feedback that the flag did nothing, and a typo'd or nonexistent agent id
was never validated. They only read or write agents.defaults.*, so there
is no agent-scoped path for the flag to feed.

Reuse the existing set/set-image guard rather than inventing a new
mechanism: rename it to rejectAgentScopedModelCommand, give each
global-only command an accurate scope phrase, and call it before the
command runs. fallbacks/image-fallbacks are deliberately untouched;
they are tracked separately in #106346.

Fixes #126597

* fix(models): drop release-owned changelog entry

* fix(models): simplify global-only scope message

Review flagged the production LOC delta. Collapse the runtime scope map
into a type-only union and one accurate message covering both the read
(aliases list) and write commands; net production delta is now +20.

* fix(models): state the guard scope accurately for scan

Review finding: the shared message claimed every guarded command 'only
reads or writes global model config', but models scan --no-probe prints
the catalog and returns before any config update (scan.ts:283).

Say what is true of all six instead: they are global and never
agent-scoped. Docs line updated to match.

---------

Co-authored-by: sashankh <saisashankhd@microsoft.com>
2026-08-25 19:24:25 -07:00
Peter Steinberger 637da87a5d fix(gateway): tools.invoke must carry the caller's host-minted role authority (#129725)
* fix(gateway): tools.invoke must carry the caller's host-minted role authority

The connect handshake resolves each connection's authority once and stores it
server-side (shared-secret operator owners mint system authority there).
tools.invoke discarded that fact and re-derived ownership from scopes, so a
shared-secret caller with no durable profile resolved to the deny-by-default
role and was refused dispatch on its own agents — while the same connection
could still mutate sessions directly.

Carry client.internal.operatorRoleActor into the synthetic dispatch client and
keep the scope-derived fallback for callers that have no connection actor
(HTTP). Regression test fails pre-fix with the FORBIDDEN agent-allowlist error.

* test(opencode): close the fake CLI before exec to stop ETXTBSY flakes

The catalog suite wrote the fake opencode executable and spawned it
immediately. Under parallel CI shards the write handle could still be open
at exec time, so the launch failed with ETXTBSY and failed the shard.

Write through an explicit file handle with an fsync before close so the
binary is fully durable before the first spawn.

* fix(ci): repair red main type and lint gates

Two gates were failing on main independently of this branch:

- extensions/qa-lab cleanup tests still built OpenClawCrablineChannelDriverSelection
  with the retired smokeArtifactPath and a stale capabilityMatrixPath, so
  check:test-types failed after the readiness-artifact change (#124189).
  Align both fixtures with the current type and its pinned constants.
- scripts/github/release-validation-campaign.d.mts declared the Actions Octokit
  client as any (#129726), tripping no-explicit-any. Declare the structural
  subset the publisher actually calls instead of suppressing the rule.

Verified failing on clean origin/main before the fix.
2026-08-25 19:15:01 -07:00
Voidra 3be24fe714 fix(plugins): report missing manifest instead of misleading id mismatch on install (#128527)
* fix(plugins): report missing manifest instead of misleading id mismatch on install

Added comments to clarify error handling for missing or invalid plugin manifests.

* fix/comfy-manifest-mismatch-error

* fix(plugins): require manifests for trusted npm installs

Co-authored-by: Voidra <151359367+NirvanJain@users.noreply.github.com>

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-08-25 18:53:27 -07:00
RoboClaw e5e90fb629 fix(gateway): make restart recovery state authoritative (#129316)
* fix(gateway): make restart recovery state authoritative

Fixes #129285 and #129300.

Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>

* fix(gateway): preserve restart recovery terminal fence

Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>

* fix(gateway): cancel rootless work during restart

Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>

* fix(gateway): keep restart abort lifecycle-scoped

Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>

---------

Co-authored-by: roboclaw-bot <309084314+roboclaw-bot@users.noreply.github.com>
Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
2026-08-25 18:48:19 -07:00
Masato Hoshino 9c30c920fe fix(doctor): surface the resume failure cause for interrupted auth-profile archives (#123459)
maybeMigrateAuthProfileJsonStoresToSqlite discarded the error from
resumePendingAuthProfileMigrationArchives entirely, so the warning was always
the same generic string regardless of which of 5 distinct causes fired
(invalid receipt, target verification failure, lock failure, SQLite failure,
corrupt JSON). PR #123164 fixed the identical defect class in the sibling
shared-OAuth catch block 20 lines below in this same function, explicitly
modeling the fix on the third, already-correct sibling. This was the
unaddressed third catch block in that same family.
2026-08-25 18:27:48 -07:00
Josh Avant 1c37c8cdc7 fix(exec): scope reusable approvals to their working directory (#129636)
* fix(exec): bind durable approvals to working directory

* chore(apps): refresh native string inventory

* test(node-host): preserve prepared working directory

* fix(exec): use shared path safety facade

* fix(exec): revalidate approved directory identity
2026-08-25 18:24:14 -07:00
Peter Steinberger 4c4152e71d fix(channels): honor supported group history limits (#129710)
Co-authored-by: ayaangazali <ayaangazali.work@gmail.com>
2026-08-25 18:23:07 -07:00
Peter Steinberger 3d0df74b0f fix(openshell): sandbox cleanup, workspace sync, and gateway setup failures (#129641)
* fix(openshell): harden sandbox lifecycle and workspace sync

* fix(openshell): preserve shipped workspace root layouts

* test(gateway): reset shared agent harness state between cases

* test(qa): measure channel health startup grace directly

* chore(release): leave changelog updates to release automation
2026-08-25 18:08:55 -07:00
Vincent Koc 2d465c2d75 fix(sqlite): replace synthetic stable migration fixture (#129695) 2026-08-26 09:08:21 +08:00
RoboClaw d6510fa961 fix(ui): show delegated work on selected threads (#129328)
Fixes #129318

Co-authored-by: roboclaw-bot <309084314+roboclaw-bot@users.noreply.github.com>
Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
2026-08-25 18:07:10 -07:00
Peter Steinberger 91cc37b788 fix(gateway): stop fabricating scope-upgrade requests on trusted-proxy reconnects (#129563)
* fix(gateway): stop fabricating scope-upgrade requests on trusted-proxy reconnects

Same-key trusted-proxy reconnects whose auto-approvable scopes are already
covered by the paired grant now narrow the session in place instead of
running the pairing request/approve machinery: no pending-store writes and
no false 'device access upgrade requested' / 'auto-approved' security-audit
warns on every Control UI page load. The upgrade audit warn moved into
requirePairing so it fires only when a pairing request is materialized.
Durable widening (broadened deviceAutoApprove.scopes) and key-mismatch
repairs keep the existing lanes.

* fix(gateway): revalidate the live paired grant in the reconnect fast path

Address ClawSweeper P1: the narrowing decision now rereads the
authoritative paired row as the last await before returning, so a
concurrent revoke, key replacement, or grant reduction fails closed into
the pairing lane instead of riding the pre-plan snapshot. Extract the
pairing approval-plan resolver into connect-pairing-approval-plan.ts to
keep the authorization owner under the 700-line lint boundary.
2026-08-25 17:59:51 -07:00
Peter Steinberger 5ce9b61ceb fix(doctor): preserve managed container services (#129527)
* fix(doctor): preserve managed container services

* fix(doctor): scope linger checks to user services

* fix(doctor): limit container repair to user services

---------

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-08-25 17:48:32 -07:00
Peter Steinberger 16858a42f5 fix(cron): recover reminders missed across spring-forward gaps (#129478) 2026-08-25 17:42:20 -07:00
Erick Kinnee cbdfedee84 fix(plugins): scope runtime catalog discovery by provider (#129624)
* fix: scope provider catalog discovery by selected identities

* fix(plugins): enforce agent-scoped live catalog discovery

Co-authored-by: Erick Kinnee <ekinnee@gmail.com>

* chore: keep provider release notes in pull request context

---------

Co-authored-by: Erick Kinnee <ekinnee@gmail.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-08-25 17:37:31 -07:00
Peter Steinberger 6f61184d1e fix(telegram): support polls lasting up to seven days (#129461) 2026-08-25 17:36:11 -07:00
Peter Steinberger 68e7942ffc fix(node-host): drain all workers before shutdown failures (#129699) 2026-08-25 17:35:56 -07:00
Josh Avant 49f4240118 fix: keep session catalog mirroring within isolated profiles (#129638)
* fix: bind catalog HOME policy in active facade

* fix: report isolated catalog mirroring
2026-08-25 17:31:38 -07:00
Peter Steinberger 6a246f70d1 refactor(state): retire six dead shared-state tables at schema v10 (#129626)
* refactor(state): retire six dead shared-state tables at schema v10

agent_model_catalogs, android_notification_recent_packages,
command_log_entries, diagnostic_stability_bundles, media_blobs, and
model_capability_cache landed with the database-first squash but their
runtime writers never reached main; every stable since v2026.6.10 created
them empty (agent_model_catalogs held only rebuildable catalog cache rows
until #111173 removed its writer). State schema 10 drops all six tables
and seven indexes through both the runtime-open and doctor migration
paths, records the retirements, bumps the native reader ceiling, and
corrects stale database-first doc claims that still named these tables
as canonical stores.

* test: move cross-lane schema-version pins to v10

The v10 retirement missed current-version pins outside src/state: the
native guard vitest wrapper, placement-move and node-worker-launch
same-version assertions, and the audit outbound-progress tripwire. The
pinned pre-C04 audit reader is a v9-era build that now refuses v10
databases by the version contract, so the test projects the file back to
the exact v9 shape with the documented 10-to-9 downgrade fixture before
the reader proof; the shared fixture also seeds the v10 retirement
regression.

* test: keep only the used downgrade fixture export
2026-08-25 17:31:32 -07:00
RoboClaw 37a32708c3 fix: agent-created automations appear under the session creator (#129371)
* fix: attribute agent-created automations to session creator

* fix: preserve session creator through spawn context

---------

Co-authored-by: roboclaw-bot <309084314+roboclaw-bot@users.noreply.github.com>
2026-08-25 17:29:05 -07:00
Josh Lehman 2dbaeef693 fix(ui): keep active commentary after session navigation (#129640)
* fix(ui): restore active commentary after navigation

* test(ui): wait for responsive activity layout
2026-08-26 00:27:41 +00:00
Peter Steinberger 3c022b8479 refactor(progress-card): remove limit constant forwarders (#129687)
Amp-Thread-ID: https://ampcode.com/threads/T-01a037b7-6475-7130-8be6-39147410914b

Co-authored-by: Amp <amp@ampcode.com>
2026-08-25 17:24:22 -07:00
Peter Steinberger c1bab399ab refactor(cli): consolidate image option validation (#129463) 2026-08-25 17:19:09 -07:00
Peter Steinberger 1bce4d3d24 fix(cron): deliver auto-disable warnings when heartbeats are disabled (#129560)
* fix(cron): deliver auto-disable warnings without heartbeat cadence

* test(cron): recognize canonical auto-disable notification wakes

* test(cron): pair auto-disable wakes with deferred notices
2026-08-25 17:18:52 -07:00
Peter Steinberger 66a939526e fix(skills): bound installer downloads (#129630)
* fix(skills): bound installer downloads

Direct skill dependency response bodies are capped at 256 MiB while streaming, preventing headerless or broken endpoints from consuming unbounded staging disk while preserving supported bundled artifacts.

Refs #81817

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
Co-authored-by: Andrii Furmanets <furmanets.andriy@gmail.com>

* fix(skills): reject oversized declared downloads

Cancel trustworthy identity Content-Length values above the shared 256 MiB
ceiling before opening the staging writer. Keep encoded or malformed
declarations on the authoritative decoded-stream byte cap.

Refs #81817

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
Co-authored-by: Andrii Furmanets <furmanets.andriy@gmail.com>

---------

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
Co-authored-by: Andrii Furmanets <furmanets.andriy@gmail.com>
2026-08-25 17:17:35 -07:00
Peter Steinberger df962dd559 fix(cli): emit JSON failures when existing config is invalid (#129578)
* fix(cli): preserve invalid-config failures in JSON output

* test(cli): assert structured invalid-config process failures
2026-08-25 17:17:26 -07:00
Peter Steinberger 94b73083bf fix(cli): honor prefixed channel targets when creating threads (#129671) 2026-08-25 17:17:13 -07:00
Peter Steinberger d3c5d8e33a fix(gateway): point admin auto-approve warnings at identityScopes (#129538)
The startup SECURITY WARNING and the critical security-audit remediation for
gateway.auth.trustedProxy.deviceAutoApprove.scopes containing operator.admin
still told operators to wait "until per-identity roles are available".
Per-identity admin grants shipped as gateway.auth.identityScopes and the
trusted-proxy docs already recommend them; the runtime guidance now names
that shipped fix instead of a nonexistent future feature.
2026-08-25 17:13:38 -07:00
Peter Steinberger c07d0e495f fix(tui): fence stale session actions and preserve tool output (#129681) 2026-08-25 17:06:27 -07:00
Peter Steinberger c28d11f780 fix(gateway): allow managed publication with repo hooks (#129576) 2026-08-25 17:05:30 -07:00