Commit graph

584 commits

Author SHA1 Message Date
Peter Steinberger
f85b541ed4
fix(runtime): preserve Node worker dependencies and cleanup diagnostics (#155292)
* fix(bun): preserve Node worker dependencies and spawn diagnostics

* fix(models): preserve nested catalog cleanup diagnostics

* test(gateway): own pending embeddings provider cleanup

* test(bench): retain subprocess failure diagnostics

Include status, signal, stdout, and stderr when the history benchmark subprocess fails. Keep both profiles, every assertion, and the existing 30-second child and 35-second test deadlines unchanged. This exposes the failing phase without claiming to fix the timeout.

* chore: reconcile Bun compatibility with current main

Preserve the independently reviewed c134c8d7 tree while adopting the canonical embeddings cleanup and history benchmark repairs from main. Retain the existing PR ancestry for GitHub head synchronization.

* fix(runtime): preserve Bun diagnostics after owner extraction

Resolve the mainline diagnostics extraction by keeping spawn-diagnostics.ts as the sole owner and retaining the Bun family classification and existing regression assertions. The other compatibility changes are unchanged. Independent P0-P2 review and targeted formatting passed; refreshed hosted CI is required before landing.

* chore: adopt canonical PR wrapper inventory repair

Merge main including 3a4bbc6882, which restores the SQLite reader context and spawn diagnostics to the extracted PR wrapper source inventory. The eight-file Bun compatibility patch retains identical stable patch ID 43645b39aa8a317656d1047afccfa79137314e66 and its existing reviews. Refresh hosted CI before landing.

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-09-22 16:14:05 -07:00
Peter Steinberger
824ab3fead
fix(mcp): recover expired SSE sessions and speed up parsing (#155497) 2026-09-22 09:13:30 -07:00
Dallin Romney
8aefa9e43c
fix: preserve the invoked launcher when restarting Node (#147621)
* fix(update): preserve replaced clone directories

* fix(update): verify linked Git runtime before rollback

* test(update): retain linked runtime fixture tuple types

* fix: preserve the invoked launcher when restarting Node

* test: preserve real cancellation coverage during main integration

* fix(config): import finite-number validator from value-tree

* fix: remove unused config mutation validator import

* test: join cleanup anchor retirement before teardown assertions

* test(node): join retirement close within runner lifetime

* test(node): make prepared workspace fixture owner private

* fix: distinguish imported CLI entries during cache respawn

* test(pr): preserve private-store binding in native provisioning fixtures

Compose the no-config preload with the private handoff preload, witness
its installation, and verify every cold helper including failure paths.
The exact two CI failures reproduce before and pass after this repair;
all native Git, hook, lock-loss, and APFS regressions remain.

Co-authored-by: Dallin Romney <6581799+RomneyDa@users.noreply.github.com>

---------

Co-authored-by: Jason (Json) <263060202+fuller-stack-dev@users.noreply.github.com>
Co-authored-by: Dallin Romney <6581799+RomneyDa@users.noreply.github.com>
2026-09-22 10:00:04 -06:00
RoboClaw
bb2d479926
feat(browser): unify local Chrome setup across desktop and terminal (#152057)
* feat(browser): unify local Chrome setup across desktop and terminal

Co-authored-by: fuller-stack-dev <263060202+fuller-stack-dev@users.noreply.github.com>

* feat(browser): unify local Chrome setup across desktop and terminal

OpenClaw-Publication: d19e865e-b5a0-4c70-8876-c1662f6e7ef2

Co-authored-by: fuller-stack-dev <263060202+fuller-stack-dev@users.noreply.github.com>

* chore(linux): format Chrome setup fixture

Co-authored-by: fuller-stack-dev <263060202+fuller-stack-dev@users.noreply.github.com>

* feat(browser): keep desktop Chrome setup local and preserve pairing

Delegate Windows registration to the shared native management owner, preserve
released native bridge compatibility and saved launcher profiles, and integrate
serialized desktop setup through isolated local runtimes.

Co-authored-by: fuller-stack-dev <263060202+fuller-stack-dev@users.noreply.github.com>
Co-authored-by: steipete <58493+steipete@users.noreply.github.com>

* fix(browser): repair native setup CI contracts

Keep Windows installer dependencies acyclic, validate Unicode within the
package library target, and remove unused private exports. Require all
eight packaged native-host proof cases and update lazy CLI inventory.
Apply native Swift formatter diagnostics without changing behavior.

Co-authored-by: fuller-stack-dev <263060202+fuller-stack-dev@users.noreply.github.com>
Co-authored-by: steipete <58493+steipete@users.noreply.github.com>

* test(cli): account for plugin-owned browser extension catalog

Keep the core-only registration invariant aligned with the Browser plugin
owner already exercised by its lazy registration tests.

Co-authored-by: fuller-stack-dev <263060202+fuller-stack-dev@users.noreply.github.com>
Co-authored-by: steipete <58493+steipete@users.noreply.github.com>

* test(macos): retain released Chrome bridge request expectation

Align the native bridge test with the shipped contract1 request retained
by the canonical setup owner, and reject extra legacy payload fields.

Co-authored-by: fuller-stack-dev <263060202+fuller-stack-dev@users.noreply.github.com>
Co-authored-by: steipete <58493+steipete@users.noreply.github.com>

* test(tui): give command handler harness a unique export

Rename the shared TUI test helper and both consumers to avoid the
Gateway placement harness export collision. No alias or guard waiver.

Co-authored-by: fuller-stack-dev <263060202+fuller-stack-dev@users.noreply.github.com>
Co-authored-by: steipete <58493+steipete@users.noreply.github.com>

* chore(sdk): allow canonical browser config path resolver

Apply the approved single public-export and callable allowance for
resolveConfigPath. Preserve canonical pre-config path ownership and
all other SDK surface checks.

Co-authored-by: fuller-stack-dev <263060202+fuller-stack-dev@users.noreply.github.com>
Co-authored-by: steipete <58493+steipete@users.noreply.github.com>

* fix(browser): preserve desktop setup selection and supported actions

Keep native automatic setup selector-free and resolve saved local browser
selection through the canonical setup owner before installation. Respect
Mac action advertisements and the released legacy install projection in
the Apps card, and document the public config-path resolver contract.

Co-authored-by: fuller-stack-dev <263060202+fuller-stack-dev@users.noreply.github.com>
Co-authored-by: steipete <58493+steipete@users.noreply.github.com>

* fix(auth): retry model selection after concurrent credential refresh

Adopt upstream PR #152426, commit 32298b10f6, without changing its five source files.

Co-authored-by: fuller-stack-dev <263060202+fuller-stack-dev@users.noreply.github.com>
Co-authored-by: steipete <58493+steipete@users.noreply.github.com>

* test: preserve native setup selection and await dashboard document

Match the selector-free native CLI arguments exactly and preserve a saved work-profile result. Wait through the existing document-readiness owner only at the quota test browser-proof boundary, after auth assertions.

Co-authored-by: fuller-stack-dev <263060202+fuller-stack-dev@users.noreply.github.com>
Co-authored-by: steipete <58493+steipete@users.noreply.github.com>

* fix(ui): avoid preloading already imported modules

Remove exact direct static JavaScript imports from lazy preload tables using the emitted build graph. Preserve HTML, lazy-only JavaScript, CSS, and locale hints. Source-exact CI merge reproduction drops startup gzip from 363283 to 362968 bytes without changing budgets. Add a real emitted-bundle regression.

Apply rustfmt layout to the native Chrome selector-free expected arguments.

Co-authored-by: fuller-stack-dev <263060202+fuller-stack-dev@users.noreply.github.com>
Co-authored-by: steipete <58493+steipete@users.noreply.github.com>

* fix: preserve Chrome profiles and attachment follow-up branch binding

Let the TUI canonical setup controller retain its saved browser profile and project only a bounded returned name. Align both native first-run fixture expectations with selector-free setup.

Join pending chat history before the composer task handoff can expose an admitted attachment to restored-outbox delivery. Preserve idempotency, attachment custody, restored delivery semantics, and all existing assertions and timeouts. Add a deterministic regression reproduced on the exact failed CI merge and its main parent.

Co-authored-by: fuller-stack-dev <263060202+fuller-stack-dev@users.noreply.github.com>
Co-authored-by: steipete <58493+steipete@users.noreply.github.com>

* test(state): adopt canonical worker-custody fixture repair

Adopt src/plugin-state/plugin-state-worker.test.ts byte-for-byte from upstream bfec65a2a0 (#152456).

The former fixture held its late competing owner until after awaiting off-thread acquisition. Preserve that overlap, assert continued host authority checks and noncompletion, release custody, then assert the original result and persisted state. No production locking, guard, deadline or outcome assertion is relaxed.

Both prior failures reproduced on the exact CI main parent with independently installed frozen dependencies and Node 24.19.0. All 12 repaired file tests, selected state-logging types, scoped typed lint and fresh P0-P2 review passed.

Co-authored-by: fuller-stack-dev <263060202+fuller-stack-dev@users.noreply.github.com>
Co-authored-by: steipete <58493+steipete@users.noreply.github.com>

* fix(browser): retain saved Windows setup profiles

Recover configured extension profiles through bounded serial read-only C# inspection. Select only independently validated current matching descriptors, confirm the selected generation before effects, and leave the single mutation under the existing C# owner. Preserve POSIX behavior, existing manual relay verification and explicit same-profile repair.

Missing descriptors, runtime/origin drift and unknown or changing observations fail closed without automatic mutation. Keep raw management facts private and populate the existing browserProfile field only from validated binding metadata. No ABI, schema, SDK, configuration flag or registry/activation owner change.

29 actual CLI/controller/Windows-adapter boundary cases plus sibling coverage: 94 tests pass. Canonical changed checks, full production build and fresh independent P0-P2 review passed. Actual C# native proof remains separately coordinated.

Co-authored-by: fuller-stack-dev <263060202+fuller-stack-dev@users.noreply.github.com>
Co-authored-by: steipete <58493+steipete@users.noreply.github.com>

* fix(browser): preserve saved profiles after POSIX bundle relocation

Separate validated native registration ownership from supported origin-migration readiness. Recover the profile only after full private manifest and exact launcher validation; preserve the existing one-slot migration rule and all unsupported-origin, ACL and foreign-host refusals. Fail closed before selector-free installation when the saved selection cannot be proved.

Extract the unchanged shared origin helpers into a cohesive sibling to satisfy the existing line-cap guard without waivers. Windows admission, ABI and selector behavior remain unchanged.

Actual Linux/Darwin CLI-to-filesystem relocation regressions: 18 failures on original production, all 22 cases repaired. Preserve the private relay key and inode, config, Chrome preferences, work relay19444 and explicit-profile intent. 137 focused tests, eight real POSIX native-host E2E cases, canonical changed checks, full production build and fresh P0-P2 review passed.

Co-authored-by: fuller-stack-dev <263060202+fuller-stack-dev@users.noreply.github.com>
Co-authored-by: steipete <58493+steipete@users.noreply.github.com>

* fix(ui): retain input handoff through the shared outbox owner

Remove the superseded pending-history no-yield workaround after main introduced foreground submission custody in the shared outbox owner. Restore chat-submit-guard.ts exactly to pinned main cc7 rather than retaining competing timing policies. Keep passive drains fenced while the input task yields.

Preserve the retained history regression with explicit MessageChannel admission, no passive send before resume, and the same terminal leaf, idempotency key, attachment bytes and exactly-once assertions after completion. Original composed source fails all five focused cases; the repair passes 67 handoff/attachment cases and 20 real Chromium cases in the canonical secretless network-none runner. Canonical checks, UI build/performance and fresh P0-P2 review pass. No assertion, timeout, origin or proxy-policy weakening.

Browser POSIX/Windows repairs remain byte-identical to accepted255f. The failed e40e CI receipts remain preserved; fresh exact-head CI and parent handoff are still required.

Co-authored-by: fuller-stack-dev <263060202+fuller-stack-dev@users.noreply.github.com>
Co-authored-by: steipete <58493+steipete@users.noreply.github.com>

* fix(tasks): preserve reads across native event finalization

Hand joined event publication to its exact native successor after the native
flow and observer publication frame completes. Keep worker settlement and
cleanup, reversible claim transfer, current-authority and ABA checks, and
post-commit delivery in their existing owners without replaying writes.

Cover pre-result and readback finalization, native and reentrant successor
chains, rollback, failed publication, delivery, and terminal activity cleanup.

Co-authored-by: fuller-stack-dev <263060202+fuller-stack-dev@users.noreply.github.com>
Co-authored-by: steipete <58493+steipete@users.noreply.github.com>

* test(ui): retain rail baseline geometry on readiness failure

Keep the exact existing readiness predicate, fixtures, case inventory, assertion and timeout. When the predicate is false, retain synthetic marker identity and numeric geometry so hosted CI can distinguish scroll, visibility and viewport failures.

This is diagnostic evidence, not a repair or waiver of the unresolved rail failure. Local rootless browser infrastructure is unavailable; the existing hosted CI lane will verify the reviewed task-publication repair and collect meaningful rail evidence. Canonical changed checks and P0-P2 diagnostic review pass.

Co-authored-by: fuller-stack-dev <263060202+fuller-stack-dev@users.noreply.github.com>
Co-authored-by: steipete <58493+steipete@users.noreply.github.com>

* docs(linux): describe saved-profile Chrome setup selection

Match the selector-free adapter argument vector and its regression test. Address the fresh P3 review finding without changing runtime behavior. Markdown syntax and diff checks pass; the generic formatter excludes this subtree.

Co-authored-by: fuller-stack-dev <263060202+fuller-stack-dev@users.noreply.github.com>
Co-authored-by: steipete <58493+steipete@users.noreply.github.com>

* test(transcripts): join configured startup before cleanup faults

Observe and await the real startTranscripts promise through a narrow call-through spy while retaining the configured service entry point and real SQLite/provider work. Bind the await to the existing test lifetime instead of charging startup to the subsequent short active-map poll.

Gate provider return after persisted utterance to prove readiness does not settle early; retain both missing/unreadable row injections and all cleanup, private-source, lifecycle-token and summary assertions. Cover real startup rejection explicitly. No production change, timeout increase, retries or broad module/storage mocks.

The deterministic ordering boundary fails with the old fire-and-forget readiness and passes with the real promise join. Final 39 tests across 3 files, canonical changed checks and full-owner P0-P2 review pass. This does not recover whether the historical CI startup was late or rejected.

Co-authored-by: fuller-stack-dev <263060202+fuller-stack-dev@users.noreply.github.com>
Co-authored-by: steipete <58493+steipete@users.noreply.github.com>

* fix(browser): preserve automatic desktop status inspection

Restore read-only Device-page inspection for current and released Mac bridges while keeping installation and verification explicit. Preserve the native filesystem prerequisite proof, split installer repair tests within the existing line cap, and remove the superseded constant export.

* fix(browser): preserve registered setup configuration

Require canonical setup to match an owned launcher's effective state and
config selection before installation or relay access. Preserve equivalent
implicit/explicit default selections and the saved launch context. Recheck
automatic profile selection before effects and the current manifest before
publication through the existing registration owner. Keep manual install
and relocation repair contracts unchanged.

Cover mismatched configs, legacy selectors, equivalent defaults, selection
drift, and actual bootstrap after refused setup. Restore the missing Command
import in the existing Unix-only companion CLI test.

Focused tests, types, lint, fresh review, clean package build and sealed Mac
ARM64 runtime proof pass. The separate historical clock-jump CI failure has
bounded replay evidence and remains documented without a speculative fix.

Co-authored-by: fuller-stack-dev <263060202+fuller-stack-dev@users.noreply.github.com>

* fix(browser): keep setup registration types acyclic

Move the private registration status contract beside its context policy and
point both consumers at that owner. Remove the publication-module back-edge
without keeping an unused compatibility export.

The full architecture gate, extension production/test types, typed lint and
fresh independent review pass. Node's transformed JavaScript is byte-identical
for all three affected modules, so the existing runtime proof remains valid.

Co-authored-by: fuller-stack-dev <263060202+fuller-stack-dev@users.noreply.github.com>

* test(linux): handle Chrome setup in desktop sharing fixture

Recognize the exact automatic Chrome setup invocation and require its native
no-respawn flag. Keep unknown-command rejection, selected-auth validation,
process-group ownership and joined teardown assertions unchanged.

The original fixture reproduces the CI rejection against the real Linux app.
The repaired fixture passes all nine checks against that same binary, with
five Chrome setup calls and five node starts and joined stops. Fresh review
is clean; production app behavior is unchanged.

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>
Co-authored-by: steipete <58493+steipete@users.noreply.github.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-09-22 06:28:29 -07:00
Peter Steinberger
6a1bac354e
fix(node-host): prevent early cleanup and redirected transfer writes (#155101)
* fix(node-host): retain upload snapshots until HTTP writes settle

Scope response consumption, upload writer cancellation, and request cleanup
under one HTTP owner so early responses cannot retire active snapshot files.

Use fs-safe scoped temporary workspaces and root-bound snapshot reads while
preserving source size, digest, identity, hardlink, and literal-path contracts.

* chore: integrate upstream SQLite reclamation repair

Merge bef4401 so post-commit page maintenance waits for the parent's
commit-settlement probe to release its writer lock.

The authored worker upload patch is unchanged against the refreshed main.
Focused reclamation and upload proof passes. Original CI and replay failures
remain recorded; the original CI schedule was not independently observed.

* chore: merge main into worker upload snapshot cleanup

Incorporate the landed commentary-media fixture repair and released fs-safe 0.18.0 while preserving the worker-upload patch.

* Merge commit '473d38b61b' into codex/fs-safe-worker-upload-snapshot

* fix(node-host): confine transfer staging and settle failed writers

* chore: incorporate verified shared main repairs

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-09-22 04:44:16 -07:00
Peter Steinberger
ff90bc7fb2
feat(crabbox): run native CUA in macOS and Windows cloud desktops (#152060)
Add native computer use and Browser/Terminal launchers for prepared macOS and Windows cloud workers through Crabbox's existing authenticated transport, placement, and teardown.

Launch the separately signed Mac Cloud Worker app through LaunchServices and let it own Node/CUA, desktop permissions, and the renewable idle assertion. Bind Windows enrollment and replay to the worker's interactive account and session. Preserve uncertain launch evidence for reprovisioning, and require confirmed lease teardown before downgrading readers of newer desktop metadata.

Preserve chat end-follow during coalesced composer and goal resizing by carrying the actual scroll correction through the existing resize event and offset owner. Retain the canonical rail, progress, and approval lifecycle implementations.

Validation: exact-head CI passed 165 jobs with seven skips; 142 focused approval cases passed locally. Historical native platform proof and the remaining current-driver, lock/account-loss, enrollment, and downgrade qualification limits are recorded in #152060 under the requested best-effort testing scope.

Refs #152060.

Co-authored-by: steipete <58493+steipete@users.noreply.github.com>
2026-09-21 15:31:06 -07:00
Peter Steinberger
1fab25b37f
refactor: move selected device identity lookups to the shared worker (#150313)
Move node identity output, local node ID resolution, approval requester
preparation, the Gateway identity RPC, and worker-environment startup onto
the existing shared-state worker. Keep key creation and validation with the
identity owner, including legacy refusal before cold database bootstrap,
first-writer convergence, process-lifetime caching, and noncreating reads.

Keep current worker admission and runtime preparation, account for serialized
opening preparation, and drain affected fixtures before state cleanup. Preserve
the current pairing worker migration and its zero-host-query proof.

Identity output, stored keys, schema, permissions, and update behavior are
unchanged. Synchronous constructor, Doctor, and other callers remain outside
this selected cut. Follow-up to #150313; related to #144592.

Validation: focused identity and Gateway/startup tests, actual caller and
opening-budget source red/green proof, routing/closure coverage with its
obsolete build expectation repaired, full changed-file checks, final focused
checks, and independent P2 review. Exact-commit build and compiled CLI proof
are performed after this private commit; historical CI causes remain unknown.
2026-09-21 15:00:00 -07:00
Peter Steinberger
6fadd372c0
fix(test): await recorded completion in worker recovery fixtures (#154800)
Wait for the matching journal finish before child readiness and keep the launch receipt protocol unchanged. Await initialization and close directly, and synchronize initial capacity from its callback.

Proof: original-order affected shard 5/5 red before and 5/5 green after; check:changed and P1 autoreview pass.
2026-09-21 12:31:23 +00:00
Peter Steinberger
090ef49c73
test(node-host): await launch publication before invoke cancellation (#154439) 2026-09-21 12:03:19 +00:00
Peter Steinberger
69dbf1a137
perf(node): reuse launch rows during terminal settlement (#154596)
* perf(node): reuse launch rows during terminal settlement

* test(channels): stop idle deadline when ingress drains
2026-09-21 10:09:15 +00:00
Peter Steinberger
19ff46fde2
improve(node-host): reduce worker turn receipt reads (#154564) 2026-09-21 10:00:59 +00:00
Peter Steinberger
057492fa6d test(node-host): await cleanup before comparing replay receipts
A completed turn can precede its worker lineage-settled publication. Wait for the existing physical cleanup barrier before capturing the receipt used for the exact idempotent replay assertion, and always close the fixture supervisor.
2026-09-21 00:19:59 -07:00
Peter Steinberger
1a45e66235
fix(macos): worker fails with saved desktop-sharing preference (#154436)
* fix(macos): preserve desktop-sharing options in private worker

* test(macos): avoid shadowing worker proof options
2026-09-20 23:45:09 -07:00
Peter Steinberger
5beff9c33c test: await worker launch handoff before invocation cancellation 2026-09-20 22:09:35 -07:00
Peter Steinberger
ac638483c7
refactor(node-host): move launch and turn journal SQL off the event loop (#149517)
* feat(process): support awaited stdout consumers

* refactor(node-host): move launch and turn journals to the state worker

Preserve journal transactions and live-owner checks while retaining result persistence and native settlement. Carry the existing shared admission component from #148623; process consumption remains in the #149442 parent.

* fix(node-host): preserve receipt reads after supervisor shutdown

* test(node-host): await worker inventory reconciliation

* test(node-host): route prepared journal fixture through broker owner

* test(node-host): route background worker cleanup through SQLite broker

* refactor(node-host): clarify async pause and output loop contracts
2026-09-20 20:46:34 -07:00
Dallin Romney
af00d16e35
fix(macos): shrink universal app downloads by pruning the node worker (#150773)
* fix(macos): prune bundled node worker runtime

* fix(macos): retain lazy worker capabilities

* fix(macos): retain internal package dependencies

* test(macos): prove app-gated computer commands

* refactor(macos): reuse runtime entrypoint owner

* fix(macos): register worker build entry

* test(macos): stage worker pruner fixture

* fix(macos): retain sqlite worker runtime

* fix(macos): validate pruned elevation worker

* fix(macos): retain descriptor-launched workers

* fix(macos): finalize private node worker exits

Use the shared CLI finalizer so completed workers and startup failures exit even when plugin-owned handles remain. Cover normal shutdown, signal exit status, and startup failure through the private entry.

Co-authored-by: steipete <58493+steipete@users.noreply.github.com>

---------

Co-authored-by: steipete <58493+steipete@users.noreply.github.com>
2026-09-20 14:41:35 -07:00
Peter Steinberger
516ea8325a
fix(update): preserve failed step identities in reports (#153425)
Keep failed update operations identifiable in reports and issue titles while preserving redaction of private command arguments, paths, and diagnostic text. Separate stable step identifiers from command text in package, Git, candidate-validation, and CLI producers, and clear stale diagnostics after a successful retry.

Use one released-key adapter for ledger writes, restart sentinels, and report joins so restored readers retain exact package/fetch keys and measured exit codes. Preserve authoritative recovery keys and existing update admission, execution, rollback, schemas, defaults, and operator options.

Related: #153230, #152193. Thanks to @marcio-absmartly for identifying the indistinguishable failure reports.

Validation: scoped-clean recorded Codex review; green exact-head CI; 196 Gateway run-loop and 100 package recovery tests; changed-file gates; published 2026.9.4 reader replay against unchanged production bytes. Historical installed-runtime evidence covers upgrade, rollback, retry, and rerun at its recorded source head.
2026-09-20 10:10:29 -07:00
Peter Steinberger
7d4725621e
feat: enable desktop sharing by default with Mac and Tauri settings (#153359)
* feat: enable paired desktop sharing with a Mac settings control

Offer authenticated desktop streams by default on supported persistent nodes while preserving explicit opt-outs, pairing approval, and Gateway deny policy. Add a native Desktop sharing control that reconnects the node and reflects the worker’s resolved configuration.

* feat: add desktop sharing to the Tauri companion

Give the Tauri companion the same persistent desktop-sharing control as the native Mac app, backed by an app-owned desktop-only node for its Primary Gateway. Preserve explicit node opt-outs and require interactive reapproval for legacy desktop grants when the old allowlist was removed.

Keep node authority in the existing CLI and pairing owners. Join owned process trees on preference changes, Primary changes, and Quit; reject stale native setting snapshots.

* test: format launcher shutdown cases

* test: align desktop sharing proof fixtures

* test: clean up desktop sharing lint findings

* test: keep desktop sharing proof reports in order

* test: verify retired dashboard sharing authority

* test: drain shared state before harness fixture cleanup

* test: extract harness transcript fixtures

* test(ui): wait for rendered theme toggle state

* test: adopt main harness cleanup owner

* test: observe Windows wrapper child readiness
2026-09-20 06:34:59 -07:00
Peter Steinberger
fdec2faaef
fix: resolve Cloudflare OIDC sign-ins by verified email (#153556)
* fix: resolve Cloudflare OIDC sign-ins by verified email

* test: make portal refusal fixture deterministic
2026-09-20 03:08:28 -07:00
Vincent Koc
6f04272066
fix(config): preserve authored snapshot provenance (#147051)
* fix(config): preserve references across plugin owner migrations

* fix(config): keep authored provenance out of config responses

Keep include-expanded authored snapshots internal across valid, invalid, and cached config reads. Cover read-scoped root/include responses while preserving the paired internal trees.

Defer alias migration helpers and their direct resolved-source API tests to the first consumer layer; preserve existing env-reference entrypoint coverage here.

* test(config): invalidate cached provenance fixtures

* test(models): keep native auth refresh fixture passive

* test(node): keep prepared workspace fixture owner private

Create the fixture owner root with the same private permissions as project
preparation so permissive host umasks cannot invalidate transfer tests.

* refactor(config): split authored env-reference accounting

Move unchanged authored-reference helpers and private snapshot tests into
coherent siblings so the provenance change satisfies the line-cap ratchet.

* fix(tooling): include authored env helper in PR wrapper archive

Keep the extracted wrapper source inventory complete after the config
helper extraction; preserve eager-import closure and provisioning guards.

---------

Co-authored-by: Jason (Json) <263060202+fuller-stack-dev@users.noreply.github.com>
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-09-20 02:51:35 -06:00
Peter Steinberger
9eaea55e8f
test(nodes): await recovered worker cleanup before assertions (#153398) 2026-09-19 22:04:53 -07:00
Peter Steinberger
9571320578
test: create private prepared-workspace fixtures (#153413) 2026-09-19 21:45:13 -07:00
Peter Steinberger
ad3fc06d64
perf(sessions): move placement evidence reads into workers (#152901)
* perf(projects): move durable listings to retained workers

* perf(sessions): move placement evidence reads into workers

* refactor(state): remove placement reader type cycles

* refactor(state): query registry schema through Kysely

* fix(ci): align status timeout fixture with shared auth

* test(gateway): adopt timeout persistence synchronization

Carry the exact reviewed test-only fix from #153342. Await the captured
terminal persistence owner before advancing the abandoned producer's grace.
Preserve all original deadlines, clock steps, receipt, removal, and retry
assertions. No production changes or diagnostic delay are included.

The patch and relevant lifecycle owners match the donor's 35-test,
selected-check, and independent review evidence byte-for-byte.

* test(outbound): retain live claim during ACK fixture cleanup
2026-09-19 21:08:59 -07:00
Peter Steinberger
0537b888cd
fix: reject child follow-ups when task registration fails (#153358)
* fix: reject child follow-ups when task registration fails

* refactor: isolate Gateway admission type contracts

* test: respect worker claim and cleanup completion
2026-09-19 20:29:32 -07:00
Kimi Yu
fd46f38cf0
feat: transfer file bytes through the existing node channel (#152640) 2026-09-19 18:52:53 -07:00
Peter Steinberger
24518cf42b
refactor: simplify worker placement and node execution (#153019)
* refactor: simplify worker placement and node execution

* chore: retire worker inference line-limit exception

* fix: break worker type cycles and await fixture cleanup

* fix: preserve shipped plugin worker creation calls

* test: rebalance Gateway test type roots

Move worker environment tests into the existing Gateway server graph while preserving root coverage, shard limits, and compiler concurrency.
2026-09-19 14:33:43 -07:00
gennadyclaw
6f36619571
fix(imessage): keep queued answers attached to their questions (#150626)
* fix(imessage): keep queued answers attached to their questions

* fix(imessage): keep queued reply targets with correct provenance

* test(agents): isolate CLI image capability discovery

* test: await asynchronous owner completion

* test(cron): await deferred session cleanup

* test: await lifecycle settlement in CI fixtures

* test(codex): compile catalog workers before fixture requests

* test(codex): keep worker declarations out of root builds

* test: use Git transport for wrapper fixture clones

---------

Co-authored-by: gennadyclaw <275141878+gennadyclaw@users.noreply.github.com>
Co-authored-by: Jason (Json) <263060202+fuller-stack-dev@users.noreply.github.com>
2026-09-19 13:50:15 -06:00
Peter Steinberger
56d20ff42f
fix(nodes): finish worker cleanup when stopping environments (#152896)
* fix(nodes): finish worker cleanup when stopping environments

Continue matching cleanup after preview or initialization failures, join retained recovery before releasing the environment stop fence, and keep capacity unavailable until startup recovery succeeds.

* test(nodes): keep worker fixture source constants private

* test(nodes): resolve fixture dependencies in test entry points
2026-09-19 07:48:36 -07:00
Alix-007
d88e10a752
fix(exec): distinguish preparation refusals from user denials (#144869)
Related: #141559. Adjacent execution-stage guidance: #130972.

## What Problem This Solves

Fixes approval-preparation refusals that look like a human denied execution, even though the command could not be prepared and no approval request was created.

## User Impact

The error now distinguishes an unsupported command shape from an operator decision and gives recovery guidance specific to the execution path. Node callers are directed toward supported single-executable commands, without promising that nested interpreter scripts can run. Native CLI callers can retry supported direct executable/script forms with explicit paths.

Unsupported commands remain denied. Binding checks, approval decisions, revalidation, error codes, and public protocol fields are unchanged. This does not enable currently unsupported node interpreter execution or resolve the broader error-classification concerns in the linked issue.

## Why This Change Was Made

The binding owner now carries an internal failure classification instead of making callers identify that failure from diagnostic prose. The two existing preparation presentation sites explain the phase and their different capabilities. The internal classification is removed at the opaque harness boundary; it is not a new SDK or wire field.

## Evidence

Baseline `acbeb3a071` and candidate `d83eff8ac3b5` were exercised through an isolated real Gateway:

| Entry and control | Observed result |
| --- | --- |
| `chat.send → exec(host=node) → paired headless node`, unsupported command | Baseline returned only the binding refusal. Candidate explains that no approval request was created; both create zero approval records and leave the workload marker absent. |
| Node shell chain rewritten as one supported absolute-path executable | An ordinary exec approval is created; `allow-once` executes it. An explicit `deny` does not. |
| Registered Anthropic CLI backend and permission callback, unsupported Perl lookup form | Candidate explains the preparation refusal without claiming a user denial; no approval or command execution occurs. |
| Same Perl runtime using an absolute script path on the native CLI path | An ordinary plugin approval is created; `allow-once` executes the script. Explicit denial and script changes after preparation remain rejected without execution. |

The native transport peer and loopback model responses were synthetic; Gateway routing, the registered plugin/callback, approval records, CLI resolution, binder, filesystem, and permitted local commands were real. No vendor authentication or paid model request is claimed.

A node absolute-script retry remains unsupported, so the contributor's blanket script-file advice is not included. Gateway and node state were task-owned, and OS sandboxing restricted network traffic to loopback.

After colocating the existing Perl option and node preparation helpers with their owners, candidate `1e5fee5d0ccf` repeated both registered preparation-refusal paths with the same diagnostics, zero approval records, and no execution. All 356 focused binding, node-host, native-approval, and Codex-bridge tests passed again, and the changed-source line-cap ratchet passed. Existing rejection tests now assert structured outcomes instead of pinning prose. Full static and matrix validation remain in hosted CI.

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-09-19 19:49:06 +05:30
Peter Steinberger
8277325ccf
fix(nodes): prevent orphaned work and incompatible launches (#149158)
* fix(nodes): prevent orphaned work after cancellation and crashes

Keep hosted-worker capacity occupied until the process owner confirms descendant cleanup. Preserve completed turn results, peer isolation, and recoverable cleanup ownership when a replacement node host shuts down.

Allow the exact cancelled worker to settle its finishing acknowledgment without recreating publication or execution authority. Carry private lineage descriptors through the existing worker-start channel and package the sealed relay and anchor with the worker bundle.

* fix(nodes): preserve compatible starts across fleet upgrades

Keep released workers on their supported type-only startup and detached process-group owner. Select stronger relay ownership from the worker build capability.

Negotiate captured exec-policy support separately at node inventory so unsupported hosts show the existing update-required outcome before OpenClaw worker dispatch. Preserve remote-exec eligibility, current-authority checks, and cleanup operations.

Validated with released-worker startup and termination proof, registered inventory and dispatch regressions, focused sibling tests, changed checks, and independent review.

* test(nodes): keep current-worker fixtures eligible

Declare captured exec-policy support on the five current-node fixtures that exercise prepared dispatch, replay, authority revocation, and admission. Forward execution mode through the prepared fixture currentness callback independently of slot consumption.

Preserve assertions and deliberate legacy and remote-exec fixtures. All16 reproduced failures are fixed;243 tests across16 files and selected checks pass. Production, build, and dependency inputs are unchanged from97fe.

* ci: refresh node lifecycle merge validation

* fix(node-host): preserve cleanup evidence during worker recovery

Restore released process-group recovery after the leader exits. Record the selected transport before admission and retain exact-anchor root/lineage completion in a journal-owned companion table before releasing capacity after restart.

Use existing-file completion transactions so late cleanup cannot recreate removed state. Preserve public receipts, schema version and terminal retention; drain active modern workers before rollback to an older writer.

* fix(node-host): keep schema DDL annotation beside its call

Preserve the existing canonical first-use schema exception at the leading callsite recognized by the SQL guard. No SQL, guard rule or runtime behavior changes.

* fix(node-host): load journal writer before source helper cleanup

* test(macos): gate readiness recovery after owner failure

Hold the failed startup owner beyond an explicit waiter budget, then require a fresh health request and cleared failure state. Preserve the owner deadline and join cancellation cleanup. Production inputs are unchanged by this commit; disposable native proof runs on a separate task branch.

* fix(nodes): keep free capacity available during recovery

Bound observation of an unfinished cleanup anchor without releasing its reservation or escalating against it. Reconcile retained physical owners through status even when their requested turn has completed, preserving the turn outcome and requiring both lineage completion and tree extinction before freeing capacity.

* fix(nodes): recover capacity after bounded restart observation

Retain exact cleanup observation in the node supervisor after startup returns, publish freed capacity automatically after verified cleanup, and stop and join observation on shutdown. Share cancellation intent and preserve completed turn results.
2026-09-19 05:34:17 -07:00
Peter Steinberger
4e665b1d7a
fix(nodes): restore workspace transfers on group-writable umasks (#152717)
Restore node-host workspace downloads on hosts using umask 0002. The runtime, contained-directory, and seed-cache owners now create directories at 0700 and repair existing 0775 ancestry through the shared descriptor-based permission helpers. Filesystem safety validation and transferred payload permissions remain unchanged.

Cover fresh private-directory creation and legacy reopening through a child process and real HTTP workspace transfer. Give related test fixtures explicit private modes and document recovery without changing the host umask.

Validation: 30 transfer/startup tests under umask 0002, 28 seed/retention tests, 32 shared-state tests, hosted Testbox 70 passed, selected changed-file gates, and scoped-clean Codex review. Exact-head CI verified by the campaign lead.

Related: #152120
2026-09-19 03:35:18 -07:00
Peter Steinberger
6b16949e8c
fix(codex): keep catalog actions bound to their source (#151854)
* fix(codex): keep catalog actions on the selected native session

Keep stop and steer on the active client, settle native fork ownership under
the binding lease, and retain canceled resume reservations until cleanup has
settled. Preserve ordered inbound images and confirm native thread absence
through an authoritative read.

Require current source support for node catalog continuation, scope resume
reservations by canonical store and thread, and preserve source identity
through terminal routing. Older nodes retain readable catalogs and unqualified
slash-command bindings; catalog continuation requires the upgraded capability.

Production delta: +95 net lines. Focused proof: 1,200 passing cases across 27
files with one Windows-specific skip. Official P2 review 5 covers the original
67-file snapshot; review 7 covers the exact final five-file follow-up. Both are
scoped-clean. The unchanged CLI test-support core-lint error is recorded in the
handoff; final composed CI, live proof, and screenshot publication remain with
the integration owner.

* fix(codex): keep captured homes stable across alias changes

Capture the physical agent directory and Codex home once per config
generation, including missing home leaves, and carry that prepared path
through native startup and bound CLI resume. A client restart cannot
follow a retargeted alias under an older source-home identity.

Preserve requested home ownership while aligning cache and fence keys,
native config reads, skill isolation, and binding rotation with the
captured path. Configuration reload remains the invalidation boundary.

Validation: four intended original-code failures; 503 focused and
sibling cases pass across ten files. Extension types, changed lint,
formatting, line caps, and independent scoped P2 review pass.

* test(codex): align integration fixtures with runtime contracts

Load Codex metadata through the core manifest owner in the broker
cancellation integration test, preserving the core/plugin boundary.

Match refreshed quota-fixture lifetime to its existing fixed JWT expiry
so the healthy-status assertion respects the CLI warning window.
Resolve the Swift TLS retry endpoint from its updated stored pin.

Preserve behavioral assertions, production thresholds, and timeouts.
Validation: 11 boundary/broker cases, test-root types/lint, formatting,
line caps, and scoped P2 review pass. All three quota UI replay cases
pass on the verified integration runtime; native Swift CI remains the
execution proof for the final candidate.

* fix(plugins): preserve reactivated registries during retirement

Recheck registry liveness after asynchronous command draining before
marking a no-host-cleanup registry retired. A temporary registry can
restore the previous one while displaced cleanup is still pending.

Also collect widget dropdown rows and computed fonts in one browser
evaluation so a removed loading row cannot corrupt the typography
assertion. Keep the existing full-font equality assertion unchanged.

Validation: scoped P2 reviews, physical core production types, targeted
core test graph types, 28 catalog registry/broker cases, 37 registry
owner/sibling cases, 43 original-order QA/prompt/Copilot cases, and
4 normal plus 15 bounded timing browser cases pass.

* refactor(ui): deduplicate catalog key parsing

Normalize catalog URL fields together and keep empty-component rejection in the decoded key validation. Preserve routing and source-home identity while reducing the startup bundle without changing performance limits.
2026-09-19 02:32:25 -07:00
Peter Steinberger
cb71a09047
test: run preview processes with the selected runtime (#152359) 2026-09-18 23:48:03 -07:00
Peter Steinberger
1f51c7e18b
fix(crabbox): allow native desktop workers on macOS and Windows (#152273)
* fix(crabbox): support native cloud desktop viewers

Use native Screen Sharing and VNC for macOS and Windows instead of applying Linux desktop setup to every target. Keep managed account credentials on the node/Gateway path, honor native display resize restrictions, and provision non-Linux targets cold when a shared profile enables warm images.

* test(workers): cover native desktop teardown before downgrade
2026-09-18 19:45:31 -07:00
Peter Steinberger
b9940f3bd0
fix(node-host): avoid blocking configuration reads (#151411)
Connection, runner startup, and node-only status awaited configuration loaders that still performed SQLite queries on the calling thread. Delegate both loaders to the existing shared-state read worker through a fixed nodeHost.config command and the canonical metadata query kernel.

Preserve missing-store noncreation, JSON and timestamp validation, retired-file refusal, captured state-root identity, existing-schema admission, drift refusal without repair, and joined cleanup. Derive reply rows from the generated database schema to avoid a type-import cycle. Configuration replacement retains its existing synchronous transaction.

Validation: 38 focused configuration and reader tests, core/test types, architecture checks, formatting, normal builds, and scoped review passed. Fully compiled Node and Bun proof each recorded zero parent SQL across 17 required read and cleanup stages, including fresh/cached managed-schema reads and drift refusal. Exact-head CI and the required aggregate gate passed after a documented retry of one idle, unassigned shard. Bootstrap, explicit snapshot preparation, configuration writes, live operator state, and stalled-child testing are outside the zero-SQL claim.
2026-09-18 18:34:56 -07:00
Peter Steinberger
4d62efeccf
feat: open Crabbox apps beside the conversation (#152094)
* feat: open Crabbox apps beside the conversation

Attach temporary cloud environments without moving the session's primary workspace. Reuse private node transports for managed app processes, CUA, desktop observation, and web portals; let screen open the exact preview in the requesting browser. Preserve conversation lifecycle authority, one-shot command approvals, manual desktop control, and cleanup across reconnects.

* feat: show Crabbox startup before provisioning

* test: type Crabbox desktop startup fixture

* refactor: isolate worker environment summaries

* refactor: make partial computer action dispatch explicit

* fix: complete Crabbox preview integration

* test: rebalance agent runtime typecheck roots

* fix: preserve desktop control when showing its source again

* fix: fence Crabbox allocation at provider commands

* test(crabbox): move allocation authority proof to plugin owner

* fix(crabbox): keep allocation authority type internal

* test: fix preview validation assertions

* test(ui): exercise inventory recovery after reopening

* build: regenerate Workboard assets after main refresh
2026-09-18 17:12:51 -07:00
Peter Steinberger
6d7144de35
fix(gateway): avoid event-loop stalls during device-token storage (#151926)
* fix(gateway): avoid event-loop stalls during device-token storage

* fix: prevent shared-state writes timing out behind native writers

* fix(clickclack): finish SQLite cleanup between persistence tests

* test: bind shared-state admission probes to real instances

* test(gateway): align cron build admission with worker owner
2026-09-18 14:53:26 -07:00
Peter Steinberger
ab46acdcd2
refactor: reuse fs-safe and fix Windows asset retention (#151932)
* refactor: reuse fs-safe transfers and directory walks

Replace caller-owned copy, hashing, and traversal loops with the pinned fs-safe operations. Preserve source verification, publication, and cancellation ownership. Refs #151928.

* test: register plugin-owned fs-safe inventory helpers

* fix: reuse verified Windows asset publication winners
2026-09-18 11:04:15 -07:00
Peter Steinberger
16341cdf46
fix(process): confirm Windows stdio cleanup after parent exit (#151443)
Windows owned stdio children now use the existing retained Job owner to confirm descendant cleanup after the parent exits, preserving interactive input and worker IPC.

Keep native support optional: unavailable or failed Job setup falls back to ordinary command startup and reports typed uncertainty. Tree-required cleanup retains state locks and temporary artifacts until extinction is certified; transport-only cleanup remains independent. Claude prompt and skill artifacts are retained with a warning when cleanup is uncertain.

Related: #151325, #150427, #150244.

Validation: exact-head CI run 35354835669 is green, including both Windows node-test jobs; 243 focused tests passed locally on macOS with six native Windows skips. The P1 review is scoped-clean, and all 13 reviewed commits are preserved by a semantic-equivalent rebase. Hosted Windows proof and the capability matrix satisfy the maintainer's compatibility-proof ruling.
2026-09-18 08:32:42 -07:00
Peter Steinberger
3c4c111b0f
feat: automatically update idle headless nodes (#151545)
* feat(node): update headless runtimes automatically when idle

Stage private packaged node runtimes and activate only after all owned work
and cleanup settle. Preserve pairing and launch options, keep automatic
activations at least 12 hours apart, and leave shared-state migration and
Gateway installation ownership with the normal updater.

Document defaults, opt-outs, runtime version discovery, and recovery.
Support recoverable Windows selector replacement across service restarts.

Refs #151462

* fix(node): complete auto-update integration and settings defaults

Capture the launcher in compiled test runtimes and trusted wrapper inventories, register the package update proof, and use the canonical Kysely read path. Preserve the inherited enabled state in the config UI and align caller tests with the node shutdown lifecycle.

* fix(node): preserve retained plugin work during automatic updates

Require an explicit idle result from plugin commands, preserve older-plugin work, and connect bundled lifetime owners to automatic node updates. Join canceled inference and failed terminal cleanup before command settlement; keep historical state repair with Doctor. Document compatibility and extend installed-package proof for retained legacy plugin work.

* test(browser): align idle-work fixtures with runtime exports

* test(browser): extract proxy request fixtures

* test(node): retain idle assertions across native cleanup
2026-09-18 06:20:27 -07:00
Peter Steinberger
f4e3e07434
refactor(infra): remove machine model test injection (#150590)
Keep platform probing and cache ownership in the production modules.
Use typed module mocks for the existing hardware-model and node-host
identity cases instead of private dependency override parameters.
2026-09-17 11:09:10 -07:00
Peter Steinberger
146e7c8d03
refactor(node-host): extract command execution owner (#150434)
Move runCommand into the production-used execution module and remove the
VITEST-only Symbol publication, test bridge, and publication registry entry.
Keep cwd diagnostics private and exercise them through command results.

Preserve launch-policy callbacks, cancellation, output bounds, and stdin
closure. Retain the original lifecycle timeout and diagnostic evidence;
this extraction does not claim a timeout or performance fix.
2026-09-17 01:56:29 -07:00
Peter Steinberger
37971f560b
refactor(storage): extract device token SQL kernels (#150346) 2026-09-16 21:18:08 -07:00
Peter Steinberger
54dc4a8988
fix(process): preserve output during private input delivery (#149311) 2026-09-15 12:46:48 -07:00
Peter Steinberger
3161c7759c
fix(nodes): preserve cancelled turns when workers reject terminal events (#148181)
* fix(nodes): preserve cancelled turns when workers reject terminal events

Keep an accepted node turn cancellation separate from the physical worker failure when no result frame arrives. Preserve failure diagnostics, exact ownership, journal retry, and process cleanup before returning capacity.

Report standalone worker failures with the shared redacted CLI formatter and bounded output drain so Node does not dump bundled source or leave a failed worker alive with open handles.

* test(worker): isolate caught runtime entry exits
2026-09-14 07:23:45 -07:00
Peter Steinberger
bd463dc1fe
fix: preserve node worker failures during startup (#147798) 2026-09-13 20:45:58 -07:00
Peter Steinberger
f9dc685d71
improve: keep large workspace transfers responsive (#147626)
* perf(workspace): offload inventory and manifest processing

Keep the Gateway and paired nodes responsive during large workspace transfers with bounded computation workers. Hosts retain session authority, Git processes, file writes, durable acceptance, and cleanup.

Use transferable UTF-8 payloads for supported Unicode inventories, preserve independent errors during cancellation, and compare already-decoded manifests without copying their object graphs between threads.

* test(workspace): finish manifest fixture ownership

* refactor(workspace): distinguish stage input implementation

* test: register workspace benchmark and honor system Bash
2026-09-13 19:35:25 -07:00
Peter Steinberger
8b917bc499
fix: stop node workspace cleanup after cancellation (#147616) 2026-09-13 18:13:32 -07:00
Peter Steinberger
791124ac5e
feat(computer): control Gateway desktops without paired nodes (#147275)
* feat(computer): control Gateway desktops without paired nodes

* fix(computer): preserve remote nodes and cancel revoked executions
2026-09-13 12:58:42 -07:00
Peter Steinberger
0f3cab7d2b
fix: guard workspace mutations and bound file transfers (#147138)
* fix: guard workspace mutations and bound file transfers

* fix: route workspace path resolution through policy facade
2026-09-13 10:03:41 -07:00