Commit Graph

78472 Commits

Author SHA1 Message Date
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
Ayaan Zaidi d2825c70a5 refactor(telegram): consolidate bot handlers into named modules (#122174)
The bot-handlers family was 22 files behind a 22-line fan-out: six files holding one callback switch, four holding one inbound pipeline, every interface a derived ReturnType, processMessage taking 8 positional args, and its params type declared inside bot-native-commands.ts. Three named coordinators (inbound pipeline, callback router, event bindings) now sit behind the same registerTelegramHandlers entry with hand-written leaf contracts; the factory graph, 16 slice/barrel files, and the type shim are deleted. Behavior-neutral: bot.test.ts and the ingress e2e byte-identical to main (SHA-256-pinned) and green; +185 production LOC accepted as the written-contract tradeoff.

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-08-11 18:18:16 +00:00
Vincent Koc 5bc7efe746 fix(test): keep CLI process suites in owner lane (#122160) 2026-08-12 02:07:51 +08:00
Vyctor H. Brzezowski 2c636dda0c fix(ui): hide unavailable session changes action (#122152) 2026-08-11 15:02:58 -03:00
Peter Steinberger 063ebec5a9 test(cli): stabilize run-main fault injection (#122173) 2026-08-11 11:01:59 -07:00
Peter Steinberger 86bc5aa726 test(plugins): remove stale test plumbing (#122175) 2026-08-11 11:01:05 -07:00
Vincent Koc 0e52f4c4ce fix(update): avoid duplicate configured plugin installs (#122161)
Make updater doctor phases explicit so only post-plugin finalization marks post-core convergence, and strip ambient convergence state from fresh child environments.

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-08-12 01:56:40 +08:00
WhatsSkiLL d9766c3d57 fix(wizard): honor remote password auth in probes (#118134)
* fix(wizard): honor remote password auth in probes

* fix(wizard): preserve remote probe auth policy

* test(wizard): keep remote probe coverage focused

* fix(gateway): preserve remote probe secret refs

* fix(gateway): isolate remote probe credentials

* fix(wizard): authenticate remote health checks

* fix(gateway): unify remote probe auth precedence

* test(gateway): align remote probe auth coverage

* fix(gateway): preserve disabled exec-ref guard

* fix(gateway): block failed remote ref fallback

* test(gateway): follow consolidated probe coverage

* fix(wizard): stop health after unresolved remote auth

* fix(gateway): preserve configured sibling probe auth

* fix(wizard): bind remote health target

* docs(gateway): clarify remote probe auth precedence

---------

Co-authored-by: IWhatsskill <284122573+IWhatsskill@users.noreply.github.com>
Co-authored-by: Dallin Romney <dallinromney@gmail.com>
2026-08-12 00:46:25 +07:00
Peter Steinberger b3369840b1 refactor(agents): unify CLI spawn/live failure policy lanes (#122164) 2026-08-11 10:46:14 -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
Vincent Koc 653ab3b2aa fix(ci): restore duplicate scans with jscpd 5 (#122124) 2026-08-12 01:39:40 +08:00
wanyongstar 90dbede056 fix(browser): bound snapshot tree rendering depth (#119217)
Both snapshot renderers walked accessibility trees recursively with no
default depth bound: the chrome-mcp builder only honored maxDepth when
callers passed one, and the CDP renderRoleTree had no limit at all. A
pathologically nested page could overflow the call stack and grow
indent output quadratically before any output truncation ran. Add a
generous hard depth bound (100) to both traversal paths.
2026-08-12 00:38:29 +07:00
Peter Steinberger 0855e491de fix(agents): report copied auth profiles accurately (#122162) 2026-08-11 10:35:33 -07:00
Vincent Koc 80435aa0de refactor(state): centralize keyed audit record mutations (#122116) 2026-08-12 01:27:25 +08:00
Peter Steinberger eef860d972 feat(ui): unify system notices in chat with a minimal line family (#122144)
* feat(ui): unify system notices in chat with a minimal line family

Class A (model-facing system turns: restart recovery, gateway restarted,
generic internal_system fallback) and class B (lifecycle facts: compaction)
now share one hairline+icon+label rendering; known kinds show operator
summaries instead of raw injected prompts. Core producers share one
formatSystemTurnPrompt owner for the [System] prefix; subagent resume copy
unified from "gateway reload" to "gateway restart". No protocol, channel,
or marker changes.

* fix(ui): keep system-turn prompt helper out of the plugin SDK surface

Relocate formatSystemTurnPrompt to src/sessions/system-turn-prompt.ts so the
core-internal [System] convention does not widen the SDK API baseline; drop
the unused prefix/type exports; use var(--cursor-action) per cursor policy.
2026-08-11 10:24:38 -07:00
Vincent Koc 1fb715853c fix(qa): resolve Docker harness script entrypoints (#121548)
Punchcard-Session: amber-workshop-workshop-36
2026-08-12 01:23:20 +08:00
Peter Steinberger cad77fb39c refactor: consolidate remaining coercion helpers (#122020) 2026-08-11 10:22:01 -07:00
Vyctor H. Brzezowski 24bbb416b5 fix(ui): align menu selection checks to the right (#122158)
Aligns selector menu checks to the trailing rail so icons and labels remain stable across Control UI menus and New Session place selection.

Refs #122156.
Prepared head SHA: b1b60d1e15
Co-authored-by: Vyctor H. Brzezowski <51521767+vyctorbrzezowski@users.noreply.github.com>
Co-authored-by: Shakker <165377636+shakkernerd@users.noreply.github.com>
Reviewed-by: @shakkernerd
2026-08-11 18:17:46 +01:00
Peter Steinberger 5c81ed5883 refactor(ui): split runtime config into layered modules (#122117)
* refactor(ui): split runtime config into layered modules

* refactor(ui): delete redundant config wrappers

* chore(lint): ratchet max-lines baseline after ui config split
2026-08-11 10:17:00 -07:00
Peter Steinberger e7ceb5aeb0 improve(ui): speed up large Markdown session switches (#122150)
Amp-Thread-ID: https://ampcode.com/threads/T-019fe957-0e49-707f-859f-9600ef536125

Co-authored-by: Amp <amp@ampcode.com>
2026-08-11 10:14:22 -07:00
Peter Steinberger 76ab9a751a fix(agents): treat observed CLI activity as replay-unsafe for whole-turn retries (#122153) 2026-08-11 10:13:52 -07:00
Peter Steinberger 7fb18bf2cf test(ai): remove stale completions compat bridge (#122154) 2026-08-11 10:10:39 -07:00
Peter Steinberger 3a55867ea1 fix(gateway): bound stalled session subscriptions (#121164) 2026-08-11 10:10:20 -07:00
Peter Steinberger 8fa897a3f1 improve(ui): align transient menu chrome with design-system geometry (#122109)
* improve(ui): align transient menu chrome with design-system geometry

Use one shared transient-menu recipe across Control UI panels and items.

Match the carapace reference: 6px item radius plus 4px inset yields a 10px panel radius, with restrained motion for fixed menus.

* test(ui): align gateway picker menu expectations

* test(cli): keep benign sqlite diagnostics out of ACP exit stderr assertions

* fix(ui): restore 44px menu touch targets on coarse pointers
2026-08-11 10:08:53 -07:00
Peter Steinberger cc9119e22a refactor(agent-runner): split run leaf ownership (#122148)
* refactor(agent-runner): split payload warning ownership

* refactor(agent-runner): split model diagnostic ownership
2026-08-11 10:08:21 -07:00
Peter Steinberger a580c2afa1 fix(windows): parse tasklist CSV for port hints (#122126) 2026-08-11 10:08:08 -07:00
Peter Steinberger 2d69e39796 fix(ui): scope Desktop panel to cloud sessions (#122145) 2026-08-11 10:06:40 -07:00
Ayaan Zaidi 1bfd12674c test(telegram): provision keyed store in ingress coalescing fixture
The command-menu locale ledger reads state.openKeyedStore during
hydration; the fixture's partial runtime stub lacked it, so the
degrade warning broke both claim-watchdog cancellation tests on main.
Provision it like the dispatch harness does. Surfaced by #122091's
follow-up work; suite runs locally only (see #122029 decision).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-11 19:01:16 +02:00
Peter Steinberger 6792921dea refactor: finish commitments retirement bookkeeping (#122143)
* refactor(commitments): remove remaining retired references

* refactor(state): track schema retirements
2026-08-11 09:59:11 -07:00
Ayaan Zaidi 82ba647673 fix(media): record per-attachment media dispositions and render bounded skip markers (#122098)
Inbound image, audio, and video attachments could vanish with no recorded outcome and no model-visible explanation: attachments dropped by first-only selection, disabled or unconfigured capabilities, stage failures, URL-only images, and ACP-undelivered images all left the model unaware the media existed. Fixes #122044; completes the outcome custody started for documents in #122025.

Media capabilities now record one closed disposition per pre-truncation candidate at the decision site that owns the reason, with a memoized lazy native-vision probe (fires only when a marker could render; failure yields unknown and never alters outcomes; explicit image models never pay a catalog lookup). One late reader renders bounded, actionable markers from recorded facts only: native-vision and ACP-delivered images suppress per verified index, recorded failures always render, and document plus media markers share one five-marker budget with a reason-neutral overflow summary. The shipped SDK decision type stays additive (optional dispositions map).

Proof: 906 + 103 focused tests including nine adversarial-review regressions, ClawSweeper local review clean (round 9, zero findings, security cleared), live Telegram image drive showing ref preservation with no false marker.

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-08-11 16:52:32 +00:00
Vyctor H. Brzezowski e7ba2e1f6b fix(ui): give the Gateway update a visible, truthful outcome (#121686)
* fix(ui): give the Gateway update a visible, truthful outcome

Confirming an update in the Control UI could end in nothing the operator
could see. The sidebar card only knew `updateRunning`, which clears as soon
as `update.run` answers, so a dev-channel handoff — git pull, install, full
build, restart — spent minutes back on the stale "N commits behind" call to
action. A verified install then published a null banner, so success was
never announced at all, and the reload that a verified install triggers
would have destroyed any in-memory notice anyway.

The lifecycle was already recorded; nothing rendered it. Feed the sidebar
the reconciliation fact the settings page already uses, narrate the wait in
the shell callout that survives the restart, and record the verified result
so it outlives the reload it causes.

Failures now name their cause. The updater already stores the failing step
and its captured output in the restart sentinel and `update.status` returns
it whole, so a disk-full install reads "The update failed at install:
ENOSPC: no space left on device" instead of a reason slug plus "see the
gateway logs". Missing handoff-reason guidance is filled in, and the
duplicate post-restart banner resolver is folded into the shared one.

Also fixes a callout clipped by the fixed shell chrome controls, and the
"Available 246 commits behind" double framing in the confirmation.

* fix(ui): report the Gateway update in the dialog that starts it

Follow-up to the first pass: the shell-top callout was the wrong surface for
this. The dialog the operator clicked is now the one that reports the whole
update, and the ambient surfaces are the fallback for anyone who leaves it.

Confirming no longer closes the dialog. It becomes stateful — the danger
button turns into a disabled "Updating…" with a spinner, and the body
narrates the phases in place: installing, then "The Gateway is restarting.
This page disconnects and reconnects on its own." The dialog is mounted on
document.body, outside the shell, so losing the connection cannot unmount
the only surface still reporting. A request the Gateway never accepts stops
spinning after a bounded grace and says so.

A failure lands in the dialog with its recorded cause and next step. Success
still arrives after the reload a verified install triggers, so it stays a
toast — no dialog exists by then.

The shell-top status callout is gone. The same outcome now renders beside
the sidebar update card that started the update, and stays hidden while the
dialog owns the report so the two surfaces never duplicate each other.

Splits the wire-payload readers out of update-overlay-helpers into
update-schedule-dto and moves update.run answer classification next to them,
keeping both owners under the file-size budget.

* fix(ui): keep the update dialog open through the install in E2E and use a defined warn token

* refactor(ui): wire the update progress stream into the floating card and drop unused video capture

* fix(ui): report the current update, not the previous failure

The dialog subscribed to progress before starting the update. Producers
replay their current snapshot synchronously on subscribe, so a retry
still carrying the previous attempt's failure banner painted that old
error as this update's outcome.

Start the request first, and treat a failure present on the subscribe
emit as the previous attempt's: an accepted run clears the banner before
its first await, so a failure that survives means the request was
refused, which the accept timer already reports truthfully.

* fix(ui): keep update helpers internal

* chore(perf): raise startup-JS budget to 350 KiB

Approved by maintainer Vyctor on 2026-08-11.

Trigger: after #121734, main measured 326650 B—6 B below the prior 319 KiB hard ceiling. Current main subsequently moved the ceiling to 320 KiB; this records the authorized final 350 KiB decision for #121686.

* fix(ui): announce update success without session storage

Show the verified install identity directly when the current document does not reload, so denied session storage cannot suppress the operator-visible outcome.

* test(ui): isolate update toast in overlay tests

The Node-only overlay suite now reaches the direct non-reload success toast. Mock the DOM-owned toast boundary so reconciliation assertions can complete without a browser document.
2026-08-11 13:49:12 -03:00
Peter Steinberger fe4cff7a6b refactor(ai): split completions transport into concept modules (#122122)
* refactor(ai): split completions transport into concept modules

* refactor(ai): delete duplicated transport helpers

* chore(lint): ratchet max-lines baseline after transport split

* test(scripts): update prefix expansion expectation
2026-08-11 09:47:52 -07:00
Peter Steinberger db7eda0146 test(ui): stabilize session archive e2e lanes (#122068) 2026-08-11 09:46:46 -07:00
Peter Steinberger 3f427fb63c test(sessions): remove tail polling hook (#122127) 2026-08-11 09:45:15 -07:00
Peter Steinberger a496fd148e fix(gateway): report all-failed Web Push tests (#122080)
Return UNAVAILABLE with per-subscription results when every Web Push test delivery fails, while preserving partial-success and empty-subscription behavior.\n\nRefs #122062.
2026-08-11 09:41:40 -07:00
Peter Steinberger 18f126326a test(onboarding): remove formatter bridges (#122120) 2026-08-11 09:40:27 -07:00
Peter Steinberger 1dcac5b15f fix: open terminals no longer delay gateway updates (#121601)
* fix(gateway): allow updates with open terminals

* fix(updater): support terminal policy upgrades

* chore(plugin-sdk): refresh API baseline
2026-08-11 09:37:58 -07:00
emma300es b45ddf2754 fix(heartbeat): keep failed work pending after alerts (#118488)
* fix(heartbeat): keep failed work pending after alerts

Treat visible runner-failure notices as failed heartbeat turns, preserving queued cron and exec events plus prior heartbeat dedupe state for a later successful run.

Co-authored-by: Emma <297947720+emma300es@users.noreply.github.com>

* fix(heartbeat): narrow failure reply payload

* fix(heartbeat): preserve failure reply privacy

* fix(heartbeat): isolate suppressed failure payloads

* refactor(heartbeat): keep terminal failure type private

* fix(heartbeat): consume terminal failure type

* refactor(heartbeat): keep terminal status internal

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
Co-authored-by: Emma <297947720+emma300es@users.noreply.github.com>
2026-08-11 09:28:42 -07:00
Ayaan Zaidi 93f686f681 fix(mcp): preserve authorized sessions during login (#122129)
Follow-up to #122115: startMcpOAuthAuthorization suppressed stored tokens
unconditionally, forcing a browser authorization on every mcp login even with a
valid session. Suppression is again gated on a recorded authorization-required
challenge; start returns a closed authorized|redirect result and the CLI
early-returns the already-logged-in outcome.

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-08-11 16:23:23 +00:00
Shakker 0a406faefc test: remove duplicate tab reorder coverage (#122128) 2026-08-11 18:20:37 +02:00
Shakker 4bb7077538 fix: clear stale queued navigation recovery 2026-08-11 18:20:37 +02:00
Shakker e45ec90b17 fix: reject rollback while navigation is pending 2026-08-11 18:20:37 +02:00
Shakker eeffd6153d fix: preserve shadow-root tab focus 2026-08-11 18:20:37 +02:00
Shakker c402b41eb3 fix: bound browser navigation ownership 2026-08-11 18:20:37 +02:00
Shakker bd55bb39f4 fix: preserve keyboard close focus intent 2026-08-11 18:20:37 +02:00
Shakker e5adfc3565 fix: settle tab hosts before focus recovery 2026-08-11 18:20:37 +02:00
Shakker 6c0c9155f0 fix: wait for tab host settlement before focus 2026-08-11 18:20:37 +02:00
Shakker 17ddf4f52d fix: resolve close focus from the render root 2026-08-11 18:20:37 +02:00
Shakker 0f14a1412d fix: recover focus after async tab close 2026-08-11 18:20:37 +02:00
Shakker 7f5bf7f1f3 fix: restore tab focus after component settlement 2026-08-11 18:20:37 +02:00