Commit Graph

69 Commits

Author SHA1 Message Date
Peter Steinberger 4d872fbfbc feat(nodes): expose installed worker bundle status (#124640)
* feat(nodes): expose installed worker bundle status

* perf(nodes): defer bundle status validation

* fix(nodes): tighten bundle status type contracts

* docs(gateway): document node worker bundle status

* refactor(gateway): split runner inventory runtime

* test(ui): keep healthy device status quiet

* fix(ui): preserve steer target ordering

* test(ui): isolate catalog handoff lifecycle
2026-08-16 10:04:46 -07:00
Peter Steinberger 18d130fc1b fix(workers): bound node bundle retention (#124590)
* fix(workers): bound node bundle retention

* docs(runners): track bundle retention
2026-08-16 06:25:05 -07:00
Peter Steinberger dbad5e385d refactor(workers): separate runner consent from capacity (#124356)
* refactor(workers): separate runner inventory state

* docs(runners): track inventory cleanup

* test(workers): use bundle-only launch wire

* test(workers): update optional inventory fixture

* test(workers): validate prewarm inventory capability

* fix(workers): version runner inventory cutover
2026-08-16 04:46:38 -07:00
Peter Steinberger fff38795e4 docs(plan): W5-REF landed (#124374) (#124403) 2026-08-15 21:24:46 -07:00
Peter Steinberger 527d155055 docs(plan): mark wave-5 computer-use rows landed (#124155)
* docs(plan): mark wave-5 rows landed and record Linux as partial

* docs(plan): record trust-model, tool-split, ref-convergence, and rig root cause

* docs(plan): carry wave-4 rows forward, define partial status, order rows by wave
2026-08-15 20:24:52 -07:00
Peter Steinberger 78502eda6d feat(workers): run device sessions from Gateway bundles (#124037)
* feat(workers): run device sessions from Gateway bundles

Install the current Gateway bundle before a device environment becomes ready, verify it at attach and tunnel boundaries, launch only from the immutable namespaced bundle directory, and retire stale environments for idempotent reprovisioning. Remove the local execution mode and preserve the node-local build claim only as temporary inventory metadata for the final projection/cleanup slice.

* docs(runners): record Gateway bundle cutover

* test(ci): repair runner validation fixtures

# Conflicts:
#	src/scripts/test-projects.test.ts

* fix(workers): surface outdated node recovery

Keep legacy runner inventory diagnostic-only while exposing the update-and-reconnect action through node, environment, provider, placement, and Control UI surfaces.

* fix(workers): reject legacy inventory with recovery

* fix(workers): bundle worker deploy closure

* test(workers): close bundle cutover gates

* fix(workers): compose browser runtime at build

* fix(workers): satisfy bundle cutover gates

* fix(workers): route temp runtime through infra

* docs(workers): align bundle host guidance

* fix(ui): fence outdated session destinations
2026-08-15 17:46:44 -07:00
Peter Steinberger 6d9ea63a87 docs: correct computer use inventory counts (#124074) 2026-08-15 00:13:16 -07:00
Peter Steinberger a8f1a0d345 test(computer-use): live end-to-end gate for both macOS providers (#123991)
* fix(computer-use): preserve semantic click observations

* fix(cua-computer): isolate desktop and window sessions

* fix(cua-computer): route cursor reads through desktop scope

* test(computer-use): add isolated macOS live proof rig

* style(cua-computer): format driver sessions

* fix(cua-computer): forward lazy desktop tools

* fix(computer-use): narrow live proof artifact path

* test(computer-use): split schema contract coverage

* refactor(cua-computer): unify session start state

* build(computer-use): register live proof entrypoint

* style(computer-use): satisfy full lint contract

* fix(computer-use): harden live proof authority

* fix(cua-computer): keep window authority immutable

* fix(computer-use): close partial sessions safely
2026-08-14 23:37:53 -07:00
Peter Steinberger 53074ae91a feat(workers): install Gateway bundles on nodes (#123985)
* feat(workers): install Gateway bundles on nodes

Add a private paired-channel install command backed by a one-use Gateway HTTP capability, bounded archive validation, script-disabled dependency materialization, and atomic gateway-namespaced publication. Existing device provisioning remains on the local-build path until the next cutover slice.

* docs(runners): record node bundle installer
2026-08-14 20:52:39 -07:00
Peter Steinberger 399f5a32e5 fix(workers): bound Gateway bundle cache growth (#123901)
* fix(workers): bound gateway bundle cache

* docs(plan): record Gateway bundle cache cleanup

* fix(workers): exclude terminal bundle diagnostics
2026-08-14 18:27:08 -07:00
Peter Steinberger d913796112 fix(runners): preserve node workspaces across restarts (#123889)
* fix(runners): retain node workspaces from gateway state

* docs(plan): record authoritative node retention
2026-08-14 16:59:19 -07:00
Peter Steinberger 628056b0ba docs(plan): W2-PKB landed (#123801) (#123838) 2026-08-14 14:26:18 -07:00
Peter Steinberger 3c5e2ff296 fix(gateway): retire worker placements without sessions (#123785)
* fix(gateway): retire placements without sessions

* fix(gateway): preserve unreadable placement evidence

* fix(gateway): drain placement retirement on shutdown

* test(sessions): auto-clean identity probe temp dirs

* fix(gateway): join placement sidecar shutdown
2026-08-14 14:07:24 -07:00
Peter Steinberger c6b3394602 docs(plan): computer-use campaign plan (CUA + Peekaboo behind computer.act v2) (#123464)
* docs(plan): computer-use campaign plan — two-provider background computer use (CUA + Peekaboo) behind computer.act v2

* docs(plan): resolve W0-PIN — pinned 0.19.3 already contains inherited IPC and consent adapter

* docs(plan): W0 complete — parity fixtures landed (#123469)

* docs(plan): W1-SEAM landed (#123509)

* docs(plan): W1 complete — v2 contract landed (#123544)

* docs(plan): W2-CUA landed (#123604)

* docs(plan): W2-MAC landed (#123635)

* docs(plan): note picker screenshot evidence belongs to W2-UX

* docs(plan): avoid inline-html placeholder in tracker note
2026-08-14 11:37:11 -07:00
Peter Steinberger e44dde218f fix(gateway): revoke device workers when pairing is removed (#123696)
* fix(gateway): revoke device workers on unpair

* refactor(backup): split sqlite verification

* refactor(backup): narrow sqlite verifier exports

* test(gateway): track worker startup temp state

* refactor(backup): preserve sqlite architecture boundary

* test(gateway): follow worker startup logger binding

* fix(gateway): revoke workers during pairing pruning
2026-08-14 10:10:12 -07:00
Peter Steinberger d9211bf14d fix(runners): bound node workspace disk growth (#123700)
* fix(runners): prune superseded node workspaces

* docs(plan): record node retention progress

* fix(runners): drain workspace retention backlogs

* test(runners): await workspace retention cleanup
2026-08-14 08:27:59 -07:00
Peter Steinberger 7d8f066b81 feat(runners): expire dormant device leases (#123673) 2026-08-14 06:53:29 -07:00
Peter Steinberger 4ac9f4c5ec refactor(runners): prune terminal environments (#123665) 2026-08-14 06:27:49 -07:00
Peter Steinberger bbca520108 refactor(runners): prune terminal launch receipts (#123641)
* refactor(runners): prune terminal launch receipts

* perf(runners): index launch receipt expiry
2026-08-14 05:49:55 -07:00
Peter Steinberger 38379a9a2e feat(runners): enforce node worker capacity (#123612)
* feat(runners): enforce node worker capacity

* test(node-host): mock supervisor initialization

* fix(runners): surface capacity exhaustion
2026-08-14 04:49:47 -07:00
Peter Steinberger 7aac8ee04b fix: preserve device sessions while runner is offline (#123477)
* fix(runners): recover offline device placements

* test(runners): model reclaimed launch dispatch

* ci: serialize macOS Swift test retries

* test: wait for steering subscription readiness

* fix(gateway): restore authority-safe steering

* test(gateway): align authority projector fixture

* fix(gateway): dispatch leaf authority mismatches

* refactor: keep authority overlay contract leaf-only

* test(ui): close place popover before details
2026-08-14 03:31:19 -07:00
Peter Steinberger 860aeed8f6 feat(gateway): transfer node worker workspaces (#123280)
* feat(gateway): transfer node worker workspaces

* fix(gateway): harden node workspace transfer

* fix(gateway): isolate transfer HTTP contract

* fix(gateway): trim transfer HTTP exports
2026-08-13 21:00:44 -07:00
Peter Steinberger 438d035885 feat(gateway): launch workers on paired nodes (#123157)
* feat(gateway): launch workers on paired nodes

* docs(plan): track node worker launch wire

* fix(runners): restore node workspace ownership

Rehydrate durable workspace bindings after Gateway restart, fence timed-out node tunnel starts, and refuse incomplete clone fallback for submodule and Git LFS workspaces.

* test(runners): isolate node launch fixtures
2026-08-13 18:02:18 -07:00
Peter Steinberger 2dcd47d4f4 feat(runners): remember offline devices (#123198)
* feat(runners): remember offline devices

Persist exact node connection end timestamps and keep execution-capable offline devices visible with quiet lifecycle history in the session picker.

* test(ui): keep offline devices disabled
2026-08-13 13:49:00 -07:00
Peter Steinberger 6c9916a48a feat(runners): publish atomic device runner inventory (#123094)
* feat(runners): publish atomic node inventory

# Conflicts:
#	docs/.generated/plugin-sdk-api-baseline/agent-harness-runtime.json
#	src/gateway/server-methods/environments.ts
#	src/gateway/worker-environments/device-provider.test.ts

* fix(runners): refresh topology on inventory removal

* fix(runners): resolve session host type overlap

* fix(protocol): document mobile runner inventory event

* fix(runners): project authoritative session host state

* docs(nodes): clarify prepared session host status
2026-08-13 04:54:26 -07:00
Peter Steinberger 7a4b5a0a41 feat(gateway): provision paired node session hosts (#122966)
* feat(gateway): provision paired node worker installs

* docs: record node local-install PR chain

* chore(protocol): regenerate node worker manifest models

* fix(gateway): resolve node worker build through the device runtime

Repairs a rebase artifact: startup referenced a stale deviceNodeRegistry
binding; the device runtime now owns the connected-node lookup via
resolveWorkerBuild.
2026-08-13 01:56:19 -07:00
Peter Steinberger 5bdfa69e82 feat(worker): add durable node launch adapter (#123033)
* feat(worker): add durable node launch adapter

* docs(plan): track durable node launch adapter
2026-08-12 23:29:29 -07:00
Peter Steinberger 3f4d89505a feat(worker): expose supervised terminal outcomes (#123013)
* feat(worker): expose supervised terminal outcomes

* docs(plan): track supervisor terminal outcomes
2026-08-12 22:19:49 -07:00
Peter Steinberger 5e67beb02e feat(node-host): add negotiated private worker controls (#122939)
* feat(node-host): add private worker supervisor controls

* refactor(node-host): harden private worker controls

* refactor(node-host): simplify private worker controls

* docs(plan): track private worker controls

* fix(node-host): satisfy private control CI guards

* test(gateway): follow worker service construction boundary

* test(gateway): register private control release train

* fix(gateway): retain worker dialect across reapproval
2026-08-12 21:27:01 -07:00
Peter Steinberger cba8aff63f feat(ui): show useful environment facts in the picker (#122923)
* feat(ui): show environment facts in Where picker

Preserve environment platform, trust, session-host, and capability metadata through new-session discovery while keeping placement availability tied to live executable nodes. Render bounded quiet device/cloud facts and add mocked browser coverage for task #33.

* docs(plan): track picker environment facts

* refactor(ui): split place browser rendering
2026-08-12 19:32:34 -07:00
Peter Steinberger 08b134324f feat: continue web sessions in the terminal (#122870)
* feat: continue sessions in terminal

Add a credential-free Control UI continuation command and allow openclaw resume to reuse current-profile authentication only for byte-exact configured Gateway targets.

* fix(gateway): separate public origin TLS ownership

Allow exact public-origin resume targets to reuse local authentication without inheriting the direct local listener certificate fingerprint.

* fix(gateway): scope exact targets to gateway mode

Prevent remote profiles from reusing dormant local Gateway authentication for explicit loopback or public-origin targets.

* fix(cli): encode terminal resume handoffs

Replace shell-specific quoting with a strict credential-free base64url handoff, gate configured auth reuse to validated handoffs, and skip unused session discovery.

* fix(gateway): isolate handoff auth identity

Suppress ambient Gateway auth fallback for validated handoffs while preserving explicit credentials, configured SecretRefs, stored device auth, and exact-target TLS ownership.

* fix(cli): harden terminal resume handoffs

* fix(cli): parse terminal handoff outcomes

* fix(cli): bind handoffs to resolved agent

* test(ui): align terminal continuation proof

* docs(plan): track terminal continuation

* refactor(ui): keep terminal handoff result local
2026-08-12 17:07:48 -07:00
Peter Steinberger 7c7c7524ad feat: add paired-device worker provider foundation (#122769)
* feat(worker-provider): add core device lease foundation

* feat(gateway): dispatch sessions to paired devices

* test(gateway): cover node-ready lifecycle edge

* fix(gateway): defer device worker installation prep

* chore(plugin-sdk): refresh API baseline

* test(gateway): isolate worker turn state database

* docs(runners): refresh milestone table format

* test(gateway): track device dispatch temp state
2026-08-12 16:50:09 -07:00
Peter Steinberger 6b9bea84f0 feat(node-host): supervise durable worker launches (#122829)
* feat(node-host): add worker launch supervision

* fix(node-host): harden worker lifecycle ownership

* fix(node-host): harden worker execution boundary

* fix(node-host): preserve worker trust settings

* chore(plugin-sdk): refresh worker lifecycle baselines

* docs(plan): track runner implementation slices

* test(node-host): await runtime shutdown owner
2026-08-12 15:24:05 -07:00
Peter Steinberger 522f06ffc6 feat(worker): support direct Gateway connections (#122683)
* feat(worker): support direct gateway connections

* docs(plan): link node worker provider PR
2026-08-12 09:59:29 -07:00
Peter Steinberger 7179d21d97 feat(gateway): expose public worker ingress (#122643)
* feat(gateway): expose public worker ingress

* docs(plan): mark public worker ingress in progress

* fix(gateway): harden worker ingress provenance

* fix(gateway): preserve disabled worker ingress response
2026-08-12 09:41:45 -07:00
Peter Steinberger ad8f803311 feat(ui): connect machines from the Where picker (#122635)
* feat(ui): add connect machine dialog

* docs(plan): track connect machine picker

* fix(ui): harden connect-machine dialog lifecycle
2026-08-12 07:51:37 -07:00
Peter Steinberger 6e71e9b156 feat(gateway): expose public worker ingress (#122578)
* feat(gateway): expose public worker ingress

* docs(plan): link public worker ingress PR
2026-08-12 07:20:02 -07:00
Peter Steinberger ade3456dd4 feat: add one-paste node onboarding (#122499)
* feat(pairing): add short join onboarding

* fix(gateway): isolate device join routing tests
2026-08-12 06:17:39 -07:00
Peter Steinberger 40cb6f0e3b feat(ui): keep Where picker destinations live (#122531)
* feat(gateway): enrich environment summaries

* chore(sdk): refresh plugin API surface

surface drift approved: additive EnvironmentSummary enrichment (runners plan rev 2, milestone 4)

* feat(ui): keep where picker destinations live

* docs: link picker liveness milestone PR

* fix(ui): deduplicate picker locale keys

* test(ui): update picker section expectations

* fix(ssrf): narrow lookup resolver contract

* fix(gateway): publish authoritative environment facts
2026-08-12 05:11:46 -07:00
Peter Steinberger 0de17482ae feat(gateway,ui): quiet Where picker, placement chip, and projects read model (#120804)
* feat(gateway): projects.list groups known checkouts by repo identity

Implements docs/plan/runners.md milestone 4 derived projects read model.

* feat(ui): regroup the Where picker by gateway, devices, and cloud

* feat(ui): placement chip shows where a session runs with reclaim

Implements docs/plan/runners.md milestone 4 placement display and reclaim.
2026-08-12 00:21:23 -07:00
Peter Steinberger 127facd39f docs(plan): runners plan revision 2 — everything is a node (#122454)
* docs(plan): rewrite runners plan as revision 2 — everything is a node

Operator-decided direction change: paired nodes host full agent sessions
through the worker admission path; openclaw worker becomes a node-supervised
child; SSH is deleted as the device transport in favor of an outbound-only
two-connection shape (node control channel + direct-dial worker connection).
Folds in verified code reads (admission/tunnel/sync/node-channel/scopes), an
industry survey, an Amp CLI teardown, and a fresh adversarial review; scopes
milestone 6 honestly (transport/sync net-new, admission/placement reused) and
bounds v1 trust to admin-paired shared infrastructure.

* docs(plan): record revision-2 PR number in milestone table
2026-08-11 22:56:54 -07:00
Peter Steinberger 8ab7ac54e2 docs: align prompt-overlay, truncation, and pruning docs with shipped behavior (#121324)
* fix(openai): describe personality as the canonical GPT-5 style toggle

The shipped config-schema description told operators and models to prefer
agents.defaults.promptOverlays.gpt5.personality, a retired key that config
validation rejects and doctor deletes. plugins.entries.openai.config.personality
is the only live reader (src/agents/gpt5-prompt-overlay.ts).

* docs: align prompt-overlay, truncation-notice, and pruning docs with shipped behavior

- teach plugins.entries.openai.config.personality as canonical; retired
  agents.defaults.promptOverlays noted as rejected/migrated
- replace nonexistent agents.defaults.bootstrapPromptTruncationWarning with
  prose describing the built-in always-on notice
- reword session-pruning internal constants as built-in behavior, name the
  real contextPruning config surface
- delete stale/orphan pages (path3 harness for a never-committed script,
  superseded swarms plan, landed path3 artifact-family scoping note)
- fix dead paths in reference/test.md and concepts/typebox.md

* docs: describe the embedded truncation notice as compact

The embedded runtime injects buildBootstrapPromptWarningNotice, which
deliberately omits file names and sizes; per-file diagnostics stay in
/context, status, and logs. Addresses ClawSweeper P2 on #121324.

* docs: doctor migrates the retired personality key instead of removing it

Main landed #121346 mid-flight: doctor --fix now moves
agents.defaults.promptOverlays.gpt5.personality into
plugins.entries.openai.config.personality when unset.
2026-08-09 21:41:43 -07:00
Peter Steinberger 8430fc0e3b refactor(agents): move spawn family into subagents/spawn (#121350)
* refactor(agents): move spawn family into subagents/spawn

* refactor(agents): keep spawn imports within lint budget
2026-08-09 19:51:29 -07:00
Peter Steinberger 917fd92686 feat(cli): openclaw resume attaches the TUI to a recent session (#120664)
* feat(cli): openclaw resume attaches the TUI to a recent session

Implements docs/plan/runners.md milestone 2.

* fix(cli): resume covers global sessions and preflights TTY

* fix(cli): require a terminal before resume

* fix(cli): adapt resume gateway disconnect state

* fix(cli): preserve global resume ownership

* test(cli): prove qualified global resume crosses the gateway boundary
2026-08-09 02:52:06 -07:00
Peter Steinberger 5e66d9ee66 docs: runners plan — one placement model for sessions, devices, and cloud (#120657)
* docs: runners plan — one placement model for sessions, devices, and cloud

Proposal for unifying where sessions run: gateway/devices/cloud as runners
behind the existing worker admission stack; session-continuation ergonomics;
one-paste device pairing; derived projects read model; naming rulings
(session, devices); deletion ledger. Encodes the adversarial-review
kill-list as non-goals with code evidence.

* docs: unwrap PR refs so markdownlint MD018 passes
2026-08-08 11:29:08 -07:00
Peter Steinberger c440ae3e86 refactor(sessions): collapse legacy JSON store (#113075)
* refactor(sessions): collapse legacy JSON store

* chore(sessions): ratchet legacy importer boundary

* fix(sessions): align cleanup checks
2026-07-23 09:36:48 -07:00
Peter Steinberger 46b9a3e12d docs: Swarm user guide (#110325) (#111384) 2026-07-19 05:33:00 -07:00
Peter Steinberger ccb147518c feat(agents): Swarm core — collector spawn, agents_wait, structured output, caps (gated) (#110932)
* docs: add Swarm implementation spec

* feat(agents): Swarm core — collector spawn, agents_wait, structured output, fastMode, caps

Implements docs/plan/swarms.md §4-6: tools.swarm config gate (default off),
collector-mode sessions_spawn (collect/outputSchema/fastMode/groupId), fail-closed
child approvals, agents_wait race-semantics tool, per-group FIFO scheduler with
maxConcurrent/maxChildrenPerGroup/maxTotalPerGroup caps, additive registry and
state-schema columns (no schema-version bump), and colocated tests.

Part of #110325

* fix(agents): rebase reconciliation — preserve swarm state columns

* fix(agents): O(1) collector session index, cheap-first preflight, collector start lifecycle hooks

Autoreview findings: replace the per-request full registry scan with an
index-maintaining run map and gate the persisted-store fallback behind
isSubagentSessionKey; emit subagent_progress/subagent_spawned from the swarm
scheduler start callback so collector children produce balanced plugin
lifecycle events.

* chore(protocol): regenerate Swift gateway models for swarm fields

* fix(agents): lint cleanup — typed catch, explicit microtask flush, no executor return

* fix(agents): knip/test-support/max-lines cleanup for swarm surfaces

* fix(agents): keep tool-catalog ui-safe — callers pass prepared swarmEnabled fact

resolveSwarmConfig value-import in tool-catalog dragged the server graph into
the Control UI bundle via tool-policy-shared (UNLOADABLE_DEPENDENCY on
subpath aliases). Catalog stays pure; the gateway tools-catalog handler
resolves the gate and passes the boolean.

* fix(agents): reconcile swarm spawn pipeline

* fix(agents): refresh swarm tool metadata

* fix(apps): sync swarm tool localization

* style(agents): compact tool display metadata

* fix(plugin-sdk): account for swarm config surface
2026-07-18 23:30:11 -07:00
Josh Lehman 0a8e3604ba refactor: flip sessions and transcripts to sqlite storage (#98236)
* refactor(sessions): migrate runtime storage to sqlite

* test(sessions): fix sqlite CI regressions

* test(sessions): align remaining sqlite fixtures

* fix(codex): require sqlite trajectory recorder

* test(sessions): align orphan recovery sqlite fixture

* test(sessions): align sqlite rebase fixtures

* fix(sessions): finish current-main integration of the sqlite flip

Resolve the whole-store SDK removal across its owner boundary: drop the
loadSessionStore re-export and the registry whole-store wrappers, wire
hasTrackedActiveSessionRun into gateway chat, complete the
preserveLockedHarnessIds cleanup contract, flip the codex thread-history
import to storePath targets, and port remaining main-side tests from
file-store helpers to session accessor reads.

* chore: drop committed pebbles log, revert plugin-inspector bump, refresh generated docs

Remove the 1.8k-line .pebbles/events.jsonl work log from the branch, restore
the plugin-inspector advisory lane to main's pinned 0.3.10 so the supply-chain
bump gets its own review, and regenerate docs_map, the plugin SDK API baseline,
and the export-surface ratchet for the merged tree.

* feat(sessions): keep archived transcripts by default with zstd cold storage

Codex-style retention: deleting or resetting a session archives its
transcript as a zstd-compressed JSONL artifact (plain when the runtime
lacks node:zlib zstd) and keeps it until the disk budget evicts oldest
first. resetArchiveRetention now governs both deleted and reset archives
and defaults to keep; maxDiskBytes defaults to 2gb so retention stays
bounded, with archives evicted before live sessions. The cron reaper
follows the same knob instead of deleting archives on its own timer.

* fix(state): converge agent DB migration lineages and bound database growth

Merge coherence: run both structure-gated legacy memory-schema repairs
(flip-lineage drop, main-lineage identity rebuild) before the flip
migration so pre-flip v1/v2 and pre-merge flip v1/v4 databases all
converge, and hoist foreign_keys=OFF outside the schema transaction
where the pragma was silently ignored and the v1 sessions rebuild
cascade-deleted session_entries.

Growth guards: fresh agent DBs enable auto_vacuum=INCREMENTAL, WAL
maintenance releases freed pages in bounded passes (never a blocking
full VACUUM), and doctor reports state/agent DB bloat from freelist
stats.

* fix(codex): resolve the store path for thread-history import via the SDK

The supervision catalog passed the legacy sessionFile locator to the
storePath-targeted transcript mirror; resolve the agent store path with
the session-store SDK helper instead of a runtime-object seam so test
fakes and headless callers need no extra surface. Drop the obsolete
missing-session-id preprocessing case: sessions rows are NOT NULL on
session_id and upsert repairs id-less patches at write time.

* fix(sessions): fail safe on malformed disk-budget config and doctor stat errors

A malformed explicit maxDiskBytes disables the budget instead of
falling back to the destructive 2gb default the user never chose, and
the doctor bloat check skips databases whose paths stat-fail instead of
aborting doctor.

* fix(sessions): complete sqlite conflict translations

* test(sqlite): align hardening checks with maintenance

* test(sessions): inspect compressed transcript archives

* fix(tests): await session seeds and drop unused helpers flagged by CI lint

The five unawaited writeSessionStoreSeed calls raced their SQLite seeds
against the assertions, failing compact shards; the bloat probe drops a
useless initializer and the merged tests drop now-unused helpers.

* test(sessions): type legacy proof events directly

* test(sessions): align hardening contracts

* perf(sessions): read usage transcript sizes from SQL aggregates

Usage/cost scans walked every session and materialized every transcript
event just to re-stringify it for a byte estimate — the #86718 stall
class reborn on the DB. readTranscriptStatsSync sums stored JSON bytes
in SQLite without loading a single row.

* fix(sessions): re-root foreign-root transcript paths onto the current sessions dir

Restored backups, moved OPENCLAW_STATE_DIR, and rehearsal copies carry
absolute sessionFile paths from the old root; the containment fallback
kept those foreign paths, so migration read (and would archive) files in
the original root and reported local copies missing. Re-root the
canonical agents/<id>/sessions suffix onto the current dir when the file
exists there; genuine cross-root layouts still fall through unchanged.

* test(agents): seed harness admission through sqlite

* fix(sqlite): close agent db on pragma setup failure

* fix(doctor): compact and retrofit incremental auto-vacuum after session import

The migration is the sanctioned offline window: post-import compact
reclaims import churn and applies auto_vacuum=INCREMENTAL to databases
created before the fresh-DB pragma existed, so runtime maintenance can
release pages in bounded passes on every install.

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-11 14:50:37 -07:00
Peter Steinberger 5ca46a6554 feat(cloud-workers): pinned SSH tunnel runtime and provider-owned key resolution (#104553)
* feat(cloud-workers): add pinned SSH tunnel runtime

* feat(crabbox): resolve cloud worker SSH identities

* docs(cloud-workers): document SSH tunnel contracts
2026-07-11 09:26:08 -07:00