Commit Graph

660 Commits

Author SHA1 Message Date
Peter Steinberger c23d66e3b5 refactor: consolidate coercion ownership (#122692)
* refactor: consolidate coercion ownership

* test: align shard check with weighted planning

* chore: refresh plugin SDK API baseline
2026-08-12 09:25:28 -07:00
Peter Steinberger b080dd1e76 refactor: consolidate coercion contracts (#122458)
* refactor: consolidate coercion contracts

Centralize exact string, record, numeric, date, Boolean, argument, and structured-error coercions while preserving call-site semantics.

Migrate canonical-name collisions and deprecated internal SDK bypasses, deleting 55 net production/tooling lines. Expand declaration ownership enforcement to 101 allowed helpers and add a narrow export-completeness audit.

* fix: preserve standalone script coercions

Keep copied Control UI tooling self-contained and retain the trusted release harness module-relative source seam when the harness runs against an old target cwd.
2026-08-11 23:26:37 -07:00
Peter Steinberger f6fff4f7fd refactor: canonicalize aliases and classify test suites (#122407)
* refactor: use canonical re-export names

* fix(test): classify suite support as test source

* fix(agents): retarget gateway stub session-entry import

* test(gateway): retarget session-utils mock keys after alias removal
2026-08-11 21:18:34 -07:00
Peter Steinberger a5420dfd91 fix(windows): launch npm-installed native session CLIs (#122334)
* fix(windows): resolve runnable npm launchers

* fix(windows): preserve npm shim argv in terminal sessions
2026-08-11 18:41:35 -07:00
Peter Steinberger 3d76246792 refactor: eliminate final export name collisions (#122083)
* refactor: resolve final export name collisions

* refactor: update remaining collision rename consumers

* style: format rebased auth helpers

* test: update remaining session entry mocks

* test: update remaining runtime mock exports

* test: update delivery info path mock

* refactor: reconcile combined collision sweeps

* chore: regenerate collision and sdk baselines
2026-08-11 11:18:24 -07:00
Peter Steinberger ebb2770000 refactor: eliminate export name collisions (#122084)
* refactor: eliminate export name collisions

* chore(scripts): burn resolved collision baselines

* refactor: narrow legacy session load options

* chore: refresh SDK and session debt baselines

* refactor: adopt upstream secrets collision fix

* test(plugin-sdk): mock renamed session store core

* fix(scripts): track renamed session accessor core
2026-08-11 10:41:50 -07:00
Peter Steinberger e390781534 refactor: burn cross-directory export name collisions (#121893)
* refactor: name subsystem logger exports

* refactor(test): distinguish exported test doubles

* refactor: consolidate canonical owner helpers

* refactor: give cross-domain helpers distinct names

* chore(lint): ratchet collision debt baselines

* fix(test): complete collision rename consumers

* fix(test): update remaining collision mock consumers

* fix(test): update transcript reader mock export

* refactor: keep embedded logger name at its owner

* fix(test): align embedded logger mock with owner

* refactor: name shared assistant phase extraction

* fix(ui): update assistant phase extractor import

* chore(generated): refresh collision and SDK baselines

* style(test): format merged plugin mocks

* chore(sdk): refresh API content hashes
2026-08-11 06:50:22 -07:00
Peter Steinberger 02e8470bb8 refactor: burn SDK export collision debt (#121888)
* refactor: burn SDK export collision debt

* chore: regenerate collision debt baselines

* fix: update durable delivery core import

* fix: remove stale channel metadata type import

* fix: preserve config write SDK parameter type

* fix: preserve chat metadata SDK return type

* chore: refresh plugin SDK API baseline

* test: update plugin enable mock import

* fix: remove duplicate status helper re-export

* fix: preserve strict QA runtime availability errors
2026-08-11 05:06:11 -07:00
Peter Steinberger fa03d9b913 refactor: consolidate coercion helpers (#121366)
* refactor: consolidate coercion helpers

* fix: remove duplicate coercion imports

* fix: preserve serialized coercion guard

* chore: ratchet coercion helper carve-outs

* fix(test): keep gauntlet subprocess startup lean

* fix: preserve imported session timestamp semantics

* fix: preserve catalog timestamp string semantics

* chore: align plugin SDK surface ratchet

* fix: preserve trajectory and SDK string contracts

* fix(test): preserve QA record assertion semantics

* fix: complete standalone record guard rename

* refactor(cron): use canonical string coercion

* fix(acpx): preserve Pi timestamp parsing

* test(channels): adapt custody test harnesses

* test(telegram): classify media harness as test support

* test(acpx): split timestamp contract coverage

* test(channels): support generated custody contracts

* chore: ban the full coercion helper name set

Extends the declaration guard to all eleven consolidated helper names and
renames the cron schedule-identity readNumber wrapper to readScheduleInteger
so the banned generic name cannot regrow.

* fix(scripts): repair release-validation guard drift and lint cause

Restores the renamed isJsonRecord guard in assertTrustedWorkflowHarness after
main added isRecord call sites in parallel, and attaches the caught YAML error
as the thrown error cause (preserve-caught-error was red on main).

* fix: preserve Claude timestamp string semantics

* fix: preserve persisted timestamp string semantics

* fix: preserve date-first timestamp contracts

* fix(openai): harden delegation failure formatting

* chore: close coercion helper guard gaps

* test(openai): model non-error delegation rejection

* chore: refresh plugin SDK API contract

* fix(tasks): use canonical string field reader

* fix(ai): use canonical provider error field coercion

* fix(browser): migrate native bootstrap coercion

* docs(plugin-sdk): clarify text record export compatibility

* fix(gateway): normalize approval execution identity

* test(outbound): isolate message action poll harness
2026-08-11 00:02:18 -07:00
Peter Steinberger a770218518 refactor: consolidate duplicate helpers (#121431)
* refactor(agents): consolidate session slug creation

* refactor(commands): consolidate config validation

* refactor(infra): consolidate stale pid termination

* refactor(tui): reuse canonical sleep helper

* chore(scripts): burn resolved entries from collision baseline

* fix(refactor): preserve cross-platform helper contracts

* fix(plugin-sdk): keep approval helper private

* chore(scripts): burn resolved wrapper shadowing entry

* chore(scripts): refresh wrapper shadowing baseline

* test(agents): target canonical session slug helper

* chore(plugin-sdk): refresh API baseline
2026-08-10 15:57:24 -07:00
Peter Steinberger 97bd54ded7 fix(sessions): prevent failures and stale state under rapid use (#121680)
* fix(sessions): harden lifecycle reliability and listing speed

Amp-Thread-ID: https://ampcode.com/threads/T-019febfb-f949-77cd-b15b-d31d0b42d2fb

* test: repair strict type fixtures

Amp-Thread-ID: https://ampcode.com/threads/T-019febfb-f949-77cd-b15b-d31d0b42d2fb

* chore(plugin-sdk): refresh current main API baseline

Amp-Thread-ID: https://ampcode.com/threads/T-019febfb-f949-77cd-b15b-d31d0b42d2fb

* fix(ci): repair current-main validation blockers

Amp-Thread-ID: https://ampcode.com/threads/T-019febfb-f949-77cd-b15b-d31d0b42d2fb

* test(cron): preserve upstream assertion order

Amp-Thread-ID: https://ampcode.com/threads/T-019febfb-f949-77cd-b15b-d31d0b42d2fb

* fix(gateway): settle setup admission test sessions

Amp-Thread-ID: https://ampcode.com/threads/T-019febfb-f949-77cd-b15b-d31d0b42d2fb

* test(ui): sample wizard action geometry atomically

Amp-Thread-ID: https://ampcode.com/threads/T-019febfb-f949-77cd-b15b-d31d0b42d2fb

---------

Co-authored-by: Amp <amp@ampcode.com>
2026-08-10 12:58:59 -07:00
Ayaan Zaidi 4c951398ef fix(messages): keep runtime details out of chat alerts (#121600)
Keep raw commands, paths, and provider errors out of ordinary chat while preserving explicit raw diagnostics and structured admin history.

Default command progress is status-only; `/verbose full` and `commandText: "raw"` retain diagnostic detail.

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-08-10 21:37:48 +05:30
Peter Steinberger b54fafa272 fix(codex): preserve operator input request ownership (#121171) 2026-08-10 02:32:13 -07:00
Peter Steinberger aba6f26be3 refactor: eliminate wrapper export shadowing hazards (#121388)
* refactor(queue): rename core resolveQueueSettings to resolveQueueSettingsCore

* refactor(channels): make configured binding registry canonical

* refactor(gateway): disambiguate node pending handlers

* refactor(acp): rename gateway session key resolver

* chore(scripts): burn resolved entries from collision baseline
2026-08-09 21:36:46 -07:00
Peter Steinberger 578e92d333 fix(sessions): single patches no longer scan the whole store (#121349)
* perf(sessions): avoid full-store single patches

Single-session non-label patches no longer materialize the whole session store. Label uniqueness remains store-wide, and stale aliases created while queued are still rejected.

* fix(build): refresh plugin SDK API baseline

Current main's generated manifest lagged merged Plugin SDK surface changes; canonical refresh restores the baseline check.
2026-08-09 20:16:15 -07:00
Peter Steinberger 08507909ed fix(cli): guard remaining embedded state writers (#121282) 2026-08-09 17:09:35 -07:00
Peter Steinberger 055a2dc6ce feat: continue dashboard sessions from CLI URLs (#120893)
* feat(cli): ingest session targets

* refactor(ui): remove gateway scope shim

* docs(cli): document session targets

* fix(cli): classify session target failures

* fix(cli): keep session target result private

* fix(cli): simplify timeout option warning

* build: declare session URL contract dependency

* fix(cli): parse bare session URL options symmetrically

* fix(cli): preserve command-owned URL arguments

* build: keep session URL contract build-only

* fix: address session URL review findings

* test: preserve session key mock exports

* fix: keep session URL helpers internal

* fix(tui): preserve URL agent for global sessions

* fix(tui): keep URL agent input internal

* fix(gateway): reconcile websocket protocol owner

* fix(attach): preserve global session agent ownership

* fix(attach): enforce global owner at grant boundary
2026-08-09 16:44:25 -07:00
Vincent Koc 2e4683ba7f fix(qa): finish aggregate suites without shared cache races (#120816)
* fix(qa): bound parallel aggregate script runs

Punchcard-Session: amber-workshop-workshop-36
Co-authored-by: Dallin Romney <6581799+RomneyDa@users.noreply.github.com>

* test(tui): wait for adopted session frame

Punchcard-Session: amber-workshop-workshop-36

---------

Co-authored-by: Dallin Romney <6581799+RomneyDa@users.noreply.github.com>
2026-08-10 03:32:04 +08:00
Peter Steinberger d3c84674e8 feat(gateway): task-suggestion acceptance modes with compact split-button card (#121173)
* feat(gateway): task-suggestion acceptance modes with compact split-button card

- taskSuggestions.accept gains additive mode (worktree default | local | cloud | session) + cloudProfileId; operator.admin unchanged; worktree requests stay {taskId}-only for older gateways
- local reuses the plain-cwd create; cloud mirrors the Control UI create-empty -> sessions.dispatch -> send sequence with pre-claim profile validation and full rollback; session delivers the prompt into the source session (steer single active run, plain turn when idle, ambiguous refused) and can only cancel the chip on failure, never touch the source session
- Control UI card redesigned per owner reference: repo-basename eyebrow, clamped summary, instructions expander, split button with per-profile cloud items or a disabled "No cloud environment configured" hint
- TUI gains the same modes as selector rows with capability gating and double-Enter arming

Release-note context: operators now choose where an accepted follow-up runs — isolated worktree (default), the project checkout, a configured cloud worker, or as the next instruction in the current session — from a compact suggestion card.

* fix(gateway): negotiate task-suggestion acceptance modes and enforce steerable-run invariant

- Gate non-worktree task-suggestion actions on the negotiated Gateway capability.
- Require exactly one steerable run ID before delivering into an active source session.
2026-08-09 12:21:21 -07:00
Peter Steinberger 52a76313e8 refactor(gateway): consolidate interactive connection resolution (#120865)
* refactor(gateway): consolidate interactive connection resolution

* test(gateway): remove superseded auth surface coverage

* chore(plugin-sdk): refresh API baseline

* fix(tui): preserve in-process exit fallback
2026-08-09 06:57:22 -07:00
Peter Steinberger 8616c0c374 refactor: finish shared test helper migrations (#120996)
* test: finish shared helper migrations

* test: fix helper migration CI

* style: fix test import ordering

* test(acpx): restore deferred void types

* test: fix helper migrations after rebase
2026-08-09 06:00:06 -07:00
Peter Steinberger 2d33a15e3e refactor(sessions): consolidate batch patch mutation ownership (#121017)
* refactor(sessions): consolidate batch patch mutation ownership

Related to #120873.

* refactor(sessions): preserve SDK contracts in shared mutation owner

Related to #120873.
2026-08-09 05:20:52 -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 4b7454bb1c fix(sessions): batch archives no longer repeat full-store work (#120873)
* perf(sessions): batch session patch storage work

Batch archive patches now share store projection, persistence, cron scanning, and direct audit appends so multi-session archives complete without repeated full-store work.

Refs #120871

* fix(ci): remove unused batch archive exports

* test(sessions): inject failures through append-only audit path
2026-08-08 22:12:08 -07:00
Peter Steinberger c8cd98cf52 refactor(gateway): centralize connect failure classification (#120505)
* refactor(gateway): centralize connect failure classification

* fix(gateway): project connect failure into status JSON

* fix(protocol): restore remote-auth context in pairing remediation

* fix(gateway): classify generic probe failures by close reason

* fix(gateway): keep transport closes unreachable

* fix(gateway): preserve rate-limit diagnostics

* fix(gateway): preserve typed rate-limit failures
2026-08-08 18:34:01 -07:00
Peter Steinberger 47fd629c8d feat(gateway): persist per-origin device auth (#120533)
* feat(gateway): add per-origin device auth

* fix(ui): remove unused gateway scope alias

* test(tui): split gateway chat coverage

* test(tui): update connection test routing

* fix(auth): preserve legacy device auth migration guard
2026-08-08 13:53:31 -07:00
Peter Steinberger e7a9f33d89 refactor(core): adopt normalization-core leaf helpers across production (#120350)
* refactor(core): adopt normalization-core leaf helpers across production

* fix(ci): keep plugin contract source-resolvable

* fix(errors): preserve adapter-owned error fields

* fix(errors): short-circuit existing errors before stringifying

* fix(errors): skip throwing structured getters

* ci: retrigger checks on current base

* fix(errors): guard structured error enumeration

* fix: harden error detail copying
2026-08-08 12:00:49 -07:00
Peter Steinberger dcb125d202 fix: remove retired insecure auth guidance (#120295) 2026-08-07 09:45:48 -07:00
Peter Steinberger 01cc71060d test(tui): gate built CLI PTY cases (#120221) 2026-08-07 04:25:47 -07:00
Peter Steinberger f87d8bb72d refactor(test): compress repetitive fixtures in mega-tests, batch 2 (#120124)
* refactor(test): compress incomplete-turn fixtures

* refactor(test): compress Discord voice fixtures

* refactor(test): compress restart recovery fixtures

* refactor(test): compress CLI attempt fixtures

* refactor(test): compress subagent registry fixtures

* refactor(test): compress workboard fixtures

* refactor(test): compress TUI event fixtures

* refactor(test): compress Codex turn-watch fixtures

* fix(test): tighten CLI attempt fixture types

* fix(test): widen restart transcript fixture content

* fix(test): preserve workboard status fixture type
2026-08-06 20:50:20 -07:00
Jason (Json) 25401e4758 fix(tui): avoid repeated runtime rebuilds in local sessions (#120051)
* fix(tui): reuse prepared runtime in local mode

* fix(tui): preserve prepared runtime coalescing

* test(tui): type prepared runtime mock
2026-08-06 19:06:23 -06:00
ml12580 ae41dcef54 fix: auto-reply gateway stalls in a zero-work drain loop after a queue drop policy change (#119331)
* fix(auto-reply): preserve pending overflow summaries

Co-authored-by: ml12580 <long.xinyuan3@xydigit.com>

* fix(auto-reply): record queue cap outcomes

* fix(auto-reply): align summary lines with sources

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-08-04 22:19:19 -07:00
Vincent Koc a1d20ae31b test(tui): cover session lifecycle and resume (#119465)
Punchcard-Session: ember-workshop-lantern-bs
2026-08-05 12:16:06 +08:00
Vincent Koc 17ef7771a6 fix(ci): stabilize TUI PTY proof ownership (#119420)
* fix(ci): stabilize TUI PTY proof ownership

Punchcard-Session: cobalt-brook-meadow-m9

* fix(test): align TUI PTY event typings

Punchcard-Session: cobalt-brook-meadow-m9
2026-08-05 11:08:56 +08:00
Vincent Koc bfcce12e6b fix(tui): restore provider auth in installed local mode (#119283)
* test(tui): cover local recovery and auth flows

* fix(tui): restore installed local auth

* test(qa): allow TUI scenario teardown margin

Punchcard-Session: ember-workshop-lantern-bs

* fix(tui): constrain local CLI launcher ownership

Punchcard-Session: ember-workshop-lantern-bs

* fix(tui): satisfy local auth validation gates

Punchcard-Session: ember-workshop-lantern-bs

* fix(tui): strip inspector flags from auth child

Punchcard-Session: ember-workshop-lantern-bs
2026-08-05 05:40:13 +08:00
Vincent Koc c1a2f4dde7 fix(tui): keep whitespace-prefixed bang input in chat (#119245)
* chore: start T06 local shell proof

* fix(tui): preserve whitespace before bang submits

* fix(tui): defer paste expansion until submit

* fix(tui): preserve bang spacing across blocked retry

* fix(tui): keep whitespace bang chat out of history

* fix(tui): preserve bang routing across trim
2026-08-05 00:19:53 +08:00
Vincent Koc cdd0856f4d test(tui): prove streaming and tool card rendering (#119251) 2026-08-04 23:32:59 +08:00
Vincent Koc 52954a1fa8 chore(tui): add Gateway boundary PTY coverage (#119191)
* test(tui): prove gateway boundary flows

* test(tui): tighten gateway boundary assertions

* test(tui): satisfy gateway boundary lint

* test(tui): harden gateway boundary PTY proof

* test(tui): strengthen gateway lifecycle proof

* test(tui): validate gateway history metadata

* test(tui): isolate gateway model proof

* test(tui): isolate gateway model replies

* test(tui): isolate gateway boundary fixtures

* test(tui): settle gateway session adoption
2026-08-04 21:25:02 +08:00
Vincent Koc 121c6c1042 test(tui): prove command surfaces through PTY (#119165) 2026-08-04 18:08:53 +08:00
Vincent Koc 4bdf9ca789 fix(tui): block terminal controls in system messages (#118998)
* fix(tui): sanitize rendered system messages

* test(tui): keep PTY safety proof within lint budget

* test(tui): clarify terminal safety PTY proof

* test(tui): de-churn terminal safety harness

* fix(tui): sanitize connection status output

* test(tui): split PTY harness support

* fix(tui): sanitize selector and footer output

* fix(tui): harden terminal display boundaries

* fix(tui): harden terminal display boundaries

* fix(tui): harden terminal output boundaries

* test(tui): repair terminal safety proof

* test(tui): harden terminal safety oracle

* test(tui): type OSC terminator candidates

* fix(tui): authenticate current terminal rendering

* fix(tui): harden terminal output safety evidence

* test(tui): keep PTY cell type internal

* test(tui): reject literal tabs in PTY oracle

* test(tui): reject literal backspace in PTY oracle
2026-08-04 16:35:41 +08:00
Vincent Koc 85af36dbf6 improve(tui): prove CLI entrypoints under real PTY (#118990)
* test(tui): cover CLI entrypoints under PTY

* test(tui): require built CLI in PTY evidence
2026-08-04 08:07:17 +08:00
Vincent Koc 57a1cbbeee test(tui): prove editor input through PTY (#118982) 2026-08-04 06:18:38 +08:00
Peter Steinberger 5a65c96fc7 test(tui): route PTY gateway scenarios through explicit models (#118802) 2026-08-03 11:43:33 -07:00
Peter Steinberger dfb1378043 chore(tui): stabilize queued-turn admission in Gateway PTY test (#118638)
* test(tui): wait for queued turn admission before releasing parent

* test(tui): clarify queued admission event ordering
2026-08-03 05:04:05 -07:00
Peter Steinberger a6f9da8bdb refactor: centralize cron, doctor, and TUI ownership (#118515)
* refactor(cron): centralize queued run activation

* refactor(doctor): share session SQLite report scaffolding

* refactor(tui): unify slash command registry

* fix(tui): satisfy command registry lint

* fix(tui): align shared command usage help

* fix(btw): preserve outbound usage placeholder
2026-08-03 04:08:54 -07:00
Peter Steinberger 2923ee40c4 test(tui): reuse real gateway PTY fixture (#118567)
* test(tui): reuse real gateway PTY fixture

* test(tui): share gateway mock model

---------

Co-authored-by: Peter Steinberger <steipete@mac-studio-sf2.local>
2026-08-03 01:53:26 -07:00
Nikolai Melekhin f153cf3a92 fix(agents): answer /btw side questions on gateway-hosted sessions (#118396)
/btw resolved its prepared model runtime without allowGatewaySubagentBinding,
but that flag became part of the prepared-runtime owner identity in #117587,
and gateway startup publishes configured owners with it set. The request
therefore matched no published owner, and standalone activation is refused
while the gateway lifecycle owns configured identities - so every
gateway-hosted /btw failed with 'prepared model runtime owner was not
published' before any side-question work was dispatched. The embedded TUI
path has no gateway lifecycle and kept working.

Thread the flag from the gateway-originated caller instead of granting it in
the shared helper: runBtwSideQuestion takes an explicit optional
allowGatewaySubagentBinding param, the /btw command handler
(auto-reply/reply/commands-btw.ts) opts in the way its sibling handlers
commands-compact.ts and commands-system-prompt.ts already do at the same
layer, and the embedded TUI call site stays unset so local side questions
keep the local-runtime boundary and cannot borrow the active registry's
subagent and node capabilities.

Pins: the gateway request input and the helper's no-grant default in
btw.test.ts, the TUI call-site absence in embedded-backend.test.ts, and the
owner-keying constraint in prepared-model-runtime.owner-selection.test.ts.
2026-08-02 22:36:35 -07:00
Peter Steinberger c1cbcf047b fix(tui): report one terminal outcome for local shell failures (#118452)
Co-authored-by: Peter Steinberger <steipete@macos.shared>
2026-08-02 21:38:30 -07:00
Peter Steinberger 3a555d5956 refactor(agents): centralize terminal lifecycle outcomes (#118254)
* refactor(agents): centralize terminal lifecycle outcomes

* fix(agents): preserve terminal projection contracts

* refactor(agents): split terminal error boundary

* test(gateway): align stale lifecycle projection
2026-08-02 19:17:30 -07:00
Peter Steinberger 75aa8306f7 fix: canonicalize single-flight promise caching (#118245)
* fix: canonicalize promise single-flight caches

* fix: make TUI refresh outcome explicit

* fix: satisfy single-flight lint contracts
2026-08-02 16:33:25 -07:00