Commit Graph

10676 Commits

Author SHA1 Message Date
Peter Steinberger 50026f1031 refactor(core): canonicalize record guards on normalization-core (#121331)
* refactor(core): canonicalize record guards on normalization-core

* chore(plugin-sdk): refresh API baseline
2026-08-09 19:05:13 -07:00
Sarah Fortune 732108d973 feat(slack): add workspace routing for Enterprise Grid actions and events (#121014)
* fix(slack): preserve team scope for deferred actions

* refactor(slack): use typed Bolt team context

* refactor(slack): preserve deferred action IDs

* refactor(slack): treat team IDs as opaque

* refactor(slack): keep deferred action diff focused

* fix(slack): enable scoped enterprise interactions

* fix(slack): keep event scope at listener boundary

* test(slack): model Bolt enterprise interaction context

* refactor(slack): normalize listener team context

* refactor(slack): pass modal event scope directly

* test(slack): preserve interaction harness argument types

* refactor(slack): pass shortcut event scope directly

* refactor(slack): pass action event scope directly

* fix(slack): scope enterprise slash commands

* test(slack): disambiguate slash harness scope

* fix(slack): type slash block suggestions

* fix(slack): preserve option text literal

* fix(slack): keep scope helpers private

* fix(slack): fall back from slash response URLs

* fix(slack): clarify Web API post message call

* fix(slack): scope post message lint suppression

* fix(slack): preserve event scope export after rebase

* fix(slack): preserve team-bound modal session routing

* fix(slack): retain modal direct-message routing

* fix(slack): preserve modal delivery compatibility

* docs(slack): mark enterprise tool actions supported

* docs(slack): align enterprise support with runtime

* test(slack): align enterprise interaction registration

* fix(slack): support Grid channel create and rename events

---------

Co-authored-by: Sarah Fortune <sarah.fortune@gmail.com>
2026-08-10 02:02:15 +00:00
Peter Steinberger 9066ba948a fix(gateway): accept tls_certificate in worker-live fallback reason schema (#121285)
* fix(gateway): accept tls_certificate in worker-live fallback reason schema

* chore(gateway): refresh plugin SDK API baseline

* test(gateway): move worker-live failover conformance guard
2026-08-09 18:21:29 -07:00
Peter Steinberger ada95a20c1 docs(concepts): add session synchronization and attachment guide (#121091)
* docs(concepts): add session synchronization and attachment guide

* docs: mark session attachment page schema

* docs: distinguish gateway and local TUI sessions
2026-08-09 18:06:18 -07:00
Jason (Json) 0b663e7a62 fix(plugins): preserve legacy runtime-doctor imports (#121220)
* fix(plugins): preserve legacy runtime doctor imports

* fix(plugins): map legacy doctor package types
2026-08-09 19:01:49 -06:00
Peter Steinberger d7cdb2e60b fix(sessions): fence lifecycle transcript writers (#121284) 2026-08-09 17:55:56 -07:00
Peter Steinberger c71c29ecae fix: preserve exec completion identity across poll and heartbeat (#120575)
* fix(agents): bind terminal polls to exact process

UUID-owned completion receipts and ProcessSession-bound finished snapshots prevent same-slug successor consumption.

* chore(plugin-sdk): refresh API baseline

Refresh declaration-closure hashes for the internal system-event receipt boundary.
2026-08-09 17:18:32 -07:00
Peter Steinberger 08507909ed fix(cli): guard remaining embedded state writers (#121282) 2026-08-09 17:09:35 -07:00
Sarah Fortune 6efd013c25 fix(slack): support Grid reaction and pin event listeners (#120944)
* fix(slack): support Grid reaction and pin events

* refactor(slack): isolate system event routing

* test(slack): align Grid event scope fixture

* refactor(slack): pass optional event scope directly

* fix(slack): support Grid member events

---------

Co-authored-by: Sarah Fortune <sarah.fortune@gmail.com>
2026-08-09 17:07:25 -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
Peter Steinberger 1b2920a520 improve(agents): avoid plugin registry rebuilds on auth refresh (#121250)
* perf(agents): reuse prepared plugin generation

* test(agents): verify plugin generation reuse

* test(agents): tighten plugin generation proof

* style(agents): format prepared runtime integration

* chore(plugin-sdk): refresh prepared runtime API baseline
2026-08-09 16:13:28 -07:00
Peter Steinberger 0efd5b4bc9 refactor(channels): move owner policy into plugins (#121257)
* refactor(channels): move owner policy into plugins

* test(plugin-sdk): lower surface budget after export removal
2026-08-09 15:46:18 -07:00
Peter Steinberger 42283cb609 fix: completed tasks no longer block gateway suspension (#121267)
* fix(gateway): close task terminals at run end

* refactor(agents): keep terminal task ownership internal

* test(gateway): type task-owned terminal fixtures

* test(infra): split agent run task ownership coverage
2026-08-09 15:45:44 -07:00
Vyctor H. Brzezowski 95fdce7049 fix(ui): confirm disruptive Control UI updates before they start (#121234)
* fix(ui): confirm disruptive Control UI updates before dispatch

Every Control UI update affordance dispatched `update.run` (or the macOS
bridge `start-update` message) on the first click, so a misclick could
install new code, restart the Gateway, and interrupt active work.

Add one canonical confirmation gate in the Control UI owner boundary and
route the sidebar/settings-sidebar/floating update card and the
Settings -> Updates row through it. The gate owns the copy, the versions,
the restart consequence, the action-specific confirm label, and the
choice between the macOS bridge and `update.run`, so the bridge fork no
longer lives in the card and no surface can drift.

CLI, API, automation, agent-driven paths, automatic update campaigns, and
the `update.run` contract are unchanged.

Addresses the Control UI portion of #117178.

* style(ui): apply oxfmt to update confirmation sources

* perf(ui): load the update confirmation lazily and share its impact copy

Keeps the Control UI startup bundle under its 317 KiB gzip ceiling: the
confirmation dialog only loads when an operator opens it.

* test(ui): drive the update confirmation in sidebar and shell wiring tests
2026-08-09 19:40:06 -03:00
Peter Steinberger ce53f7e82e refactor(agents)!: remove the session write lease (#121113)
* refactor(agents): remove session write lease

* refactor(plugin-sdk): deprecate session write lease

* refactor(doctor): remove session lock checks

* test(agents): remove session lease fixtures

* test(agents): align writer rebound assertion

* refactor(infra): remove retired session lock exports

* test(tooling): preserve embedded abort race shard
2026-08-09 15:30:48 -07:00
Peter Steinberger 096b2764e0 refactor(tests): simplify internal test-only seams (#121243)
* refactor(tests): simplify internal test-only seams

* chore(plugin-sdk): refresh API baseline
2026-08-09 15:14:55 -07:00
Peter Steinberger 6ee409ca7b refactor(commands): share native plugin command merging (#120972) 2026-08-09 14:57:45 -07:00
Peter Steinberger 0ef798d28d fix(gateway): keep hello authorization aligned with RPC access (#120888)
* fix(gateway): separate socket and device token scopes

* chore(i18n): refresh native source baseline

* style(ios): keep gateway channel within lint limit

* refactor(gateway): simplify scope metadata decoding

* ci(ui): isolate real-gateway e2e suites

* docs(ci): align runner table formatting

* chore(plugin-sdk): refresh api baseline

* ci(ui): route real-gateway retries to hosted runners

* chore(plugin-sdk): repair generated api baseline

* test(ui): select Labs toggles by title

* fix(gateway): preserve stored scopes without wire metadata
2026-08-09 14:50:07 -07:00
Peter Steinberger 59ec48439e fix(telegram): preserve topic routing for reactions and poll answers (#121231) 2026-08-09 14:23:19 -07:00
Peter Steinberger f31d9d8fa9 fix: prevent externally supervised state schema drift (#121069)
* fix: prevent externally supervised state schema drift

* refactor: isolate schema ownership support code

* test: follow canonical additive column order

* test: keep older schema fixture valid

* fix: preserve additive schema compatibility

* chore: remove release-owned changelog entry

* test: follow schema compatibility owner

* style: format schema compatibility test

* refactor: split sqlite schema sql helpers

* fix: preserve desktop schema compatibility

* fix: preserve ownership gates across platforms

* fix: preserve detached updater long paths

* fix: close external state ownership races

* chore: refresh plugin sdk api baseline
2026-08-09 14:04:40 -07:00
Peter Steinberger bff0494f33 refactor(gateway): typed internal agent turn path for recovery (#121223)
* refactor(gateway): add typed internal agent turn path

* chore(plugin-sdk): refresh API baseline
2026-08-09 13:34:40 -07:00
Peter Steinberger c37b53868d feat(memory): enable MMR diversity by default (#121224)
Apply deterministic relevance-biased diversity ordering to builtin hybrid recall and preserve distinct non-tokenized snippets.
2026-08-09 13:30:18 -07:00
Peter Steinberger 8dbd30ba74 feat(memory): per-entry glob patterns for extraPaths (#121209)
* feat(memory): support globbed extra paths

Allow root-relative glob patterns on existing memory.search.extraPaths entries across discovery, watching, reindex identity, and QMD migration.

* fix(memory): drop stale lease type import

* fix(memory): enforce extra path glob scope
2026-08-09 13:05:24 -07:00
Peter Steinberger dd1d151300 fix(cli): keep model status JSON clean under concurrent access (#113953)
* fix(cli): route parent model status aliases

* refactor(cli): trim model status route plumbing

* refactor(cli): break parent path descriptor cycle

* fix(cli): align model status startup checks

* chore(cli): refresh plugin SDK API baseline
2026-08-09 12:50:06 -07:00
Sarah Fortune 66dee798b5 Revert "fix: enable Slack native approvals for Enterprise Grid installs (#120…" (#121219)
This reverts commit 96798953b2.
2026-08-09 19:49:35 +00:00
Shakker b8b2046c08 chore: refresh bot admission contract baselines (#119278) 2026-08-09 20:33:03 +01:00
Shakker cddb6971af fix: bound bot loop retry state 2026-08-09 20:33:03 +01:00
Shakker b3d71c754f fix(clickclack): ignore agent activity inbound events 2026-08-09 20:33:03 +01:00
Shakker 564bdae462 docs: document ClickClack bot loop retry semantics 2026-08-09 20:33:03 +01:00
Shakker 3d80a2f6f2 fix(clickclack): isolate bot loop budgets by thread 2026-08-09 20:33:03 +01:00
Jacqueline Henriksen 762fa6e428 feat(clickclack): allow opt-in bot-to-bot inbound dispatch 2026-08-09 20:33:03 +01: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
Sarah Fortune 96798953b2 fix: enable Slack native approvals for Enterprise Grid installs (#120874)
* fix(slack): scope Grid native approvals by team

* fix(slack): type action middleware context

* fix(slack): secure Grid native approvals

Co-authored-by: Sarah Fortune <sarah.fortune@gmail.com>

---------

Co-authored-by: Sarah Fortune <sarah.fortune@gmail.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-08-09 12:09:59 -07:00
Peter Steinberger 26e74d8d18 feat(memory): expand conversational recall queries (#121196)
Supplement thin strict FTS candidate pools with bounded keyword probes while keeping embedding calls unchanged.
2026-08-09 11:55:57 -07:00
Peter Steinberger 05cd389cac fix(cloud-workers): make Crabbox provisioning idempotent (#121019)
* fix(cloud-workers): make Crabbox provisioning idempotent

* fix(crabbox): preserve desktop fixed-id warmups
2026-08-09 11:51:34 -07:00
Peter Steinberger 40dbc7a65a test(plugin-sdk): remove repo-local test helper fossils (#121190) 2026-08-09 11:44:18 -07:00
Peter Steinberger f68f68bc43 refactor(agents): unify prepared reply dispatch publication (#121089)
* refactor(agents): unify prepared reply dispatch publication

* fix(agents): scope prepared reply runtime at dispatch

* fix(agents): keep reply context runner private

* test(agents): read prepared config from dispatch scope
2026-08-09 11:40:07 -07:00
Peter Steinberger 9809375fda refactor(plugins)!: remove the plugin state lease API (#121140)
* refactor(plugins)!: remove plugin state lease API

* docs(plugins): document state lease removal
2026-08-09 11:16:07 -07:00
Peter Steinberger 72283e440e fix: steering misses the next tool boundary after ACK (#120964)
* fix(steering): wait for queue acceptance before ack

* fix(steering): preserve session steer call contract

* fix(steering): close runtime ownership gaps

* fix(ci): refresh plugin SDK API baseline
2026-08-09 10:46:09 -07:00
Peter Steinberger 8fdf7570a1 feat(gateway): live Desktop observer for cloud workers (Labs) (#120727)
* feat(gateway): live desktop observer for cloud workers

Adds live observation for cloud worker desktops through the gateway and Crabbox plugin, including desktop provisioning, persisted desktop metadata, tunneled WebSocket proxying, and the worker.desktop.observe protocol method.

The gateway, Crabbox plugin, and gateway protocol surfaces remain off by default behind the cloudWorkers.desktop Labs flag.

* feat(ui): Desktop panel for cloud worker observation

* docs(gateway): document cloud worker desktop lab

* fix(ci): regenerate contract baselines after rebase

* fix(protocol): regenerate Android gateway methods

* fix(ci): align rebased SDK and lint baselines

* fix(gateway): enforce view-only RFB boundary and fence desktop teardown

* fix(gateway): tighten RFB filter surface

* fix(state): keep pre-desktop databases readable and harden view-only RFB

* fix(gateway): fence desktop observer upgrades behind work admission

* fix(gateway): bind desktop observer tokens to their owner epoch

* fix(ci): regenerate config and SDK baselines after rebase

* fix(ci): regenerate native protocol and SDK baselines

* fix(ci): regenerate contracts after main rebase

* fix(state): register desktop metadata as lazy additive

* fix(ci): regenerate SDK baseline after final direct-merge rebase
2026-08-09 09:37:01 -07:00
Ayaan Zaidi be6f4c3d6a fix(telegram): make expired Codex automation alerts actionable (#121067)
* fix(cron): make Codex auth alerts actionable
* fix(telegram): authorize Codex login callbacks centrally
* fix(telegram): make callback outcomes explicit
* fix(telegram): use typed callback result
* test(cron): assert typed delivery payloads
* test(cron): require captured reply payload
* test(cron): require captured reply text
* fix(telegram): authorize login callbacks as commands
* chore(plugin-sdk): refresh API baseline

---------

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-08-09 21:52:23 +05:30
Peter Steinberger b4104e29b5 fix(sessions): stop active runs before archiving (#120892)
* fix(sessions): stop active runs before archiving

Archive now fences the exact session, stops and drains active work before commit, preserves main/global-main/unknown protections and Delete behavior, and keeps patchMany per-target ordering.

* test(gateway): provide archive lifecycle context

* test(ui): expect active sessions to remain archivable

* refactor(gateway): keep archive drains internal

* fix(gateway): keep abort lifecycle contract acyclic

* fix(sessions): fence sharing across archive drains

* test(gateway): type archive lifecycle responses

* fix(sessions): reclaim cloud workers before archive

* fix(sessions): align archive request integration

* test(gateway): omit default deferred type

* docs(sessions): clarify cloud archive retries
2026-08-09 09:03:20 -07:00
Peter Steinberger 081a565cba perf(doctor): restore telegram doctor repairs dropped on source-run hosts (#120954)
* perf(doctor): keep telegram doctor enumeration off the runtime graph

Telegram's built doctor artifact reached execa through dist chunking, so a
source-run host (pnpm dev, tsx CLI, vitest) could not require it and silently
dropped all 9 telegram legacy config rules plus its state migration. The
artifact also pulled telegram's runtime stores, making it a 674-chunk outlier
that dominated doctor enumeration.

Root cause: `src/token.ts` took the broad `plugin-sdk/provider-auth` barrel for
`resolveDefaultSecretProviderAlias`, dragging the auth-profile store, provider
runtime, and plugin install graph (execa, kysely, commander) into the closure.
The alias now has a narrow `plugin-sdk/secret-provider-alias` leaf, and
provider-auth re-exports it so its runtime surface is unchanged.

Thread-binding, sent-message, and sticker-cache row shapes, keys, and legacy
sidecar readers move to `*.legacy-state.ts` leaves. The doctor closure keeps
the rows and drops the ACP, session-binding, send, logger, and plugin-runtime
graphs the stores also load.

The postbuild control-plane verifier only required each artifact in a plain
Node child, the one host where these graphs resolve fine, so it proved nothing
about the invariant that broke. It now also walks each built doctor artifact's
static import closure and fails when it reaches the process-spawn graph, which
is the dist-level analogue of the source closure guard.

Guard rules added for provider-auth, acp-runtime, and conversation-runtime; the
telegram boundary test became a real closure assertion instead of a string grep.

* fix(doctor): drop dead export surface from the telegram legacy-state split

Knip and oxlint caught leftovers from the split: the leaves exported helpers
only they use, the store modules re-exported constants nobody imports from them
anymore, and thread-bindings kept a `testing` barrel whose last production
caller was the migration path that now reads the leaf directly. Tests import the
constants from the leaf that owns them, and the reset helper directly.

The closure gate's failure message still interpolated a `host` field left over
from a probe-host approach that was reverted before commit; the existing verifier
test caught it. The gate now has its own coverage: a transitive chunk edge to a
forbidden dependency is reported, while dynamic imports and non-doctor contract
surfaces are not.

* fix(doctor): adopt the upstream telegram thread-binding store split

`main` landed an equivalent thread-binding leaf as `thread-bindings-store.ts`
while this branch was open, so the branch-local `thread-bindings.legacy-state.ts`
is dropped rather than kept as a second path for the same rows.

`state-migrations.ts` now reaches token.js through the lazy import `main` added,
so `token.ts` is no longer in the doctor closure at all. The narrow
`secret-provider-alias` leaf still matters: telegram's contract-api closure
reaches `provider-auth` through `token.ts` on current `main`, which is the same
execa/kysely/commander graph, so the barrel is repaired at its source instead of
being deferred a second time.

* fix(scripts): type the built doctor closure gate for the TypeScript migration

The gate was authored against the `.mjs` script and landed in the `.mts` file
`main` migrated to, so its parameters were implicitly `any` and `check:test-types`
failed. Adds the explicit signatures plus the violation type.

Regenerates the plugin-sdk API baseline: `provider-auth` re-exports the default
secret-provider alias from the new leaf, so its module hash moves while its
runtime export surface stays identical.
2026-08-09 08:50:03 -07:00
Peter Steinberger a3e79236aa fix(state): preserve rollback across additive columns (#121075)
* fix(state): tolerate compatible additive columns

Preserve same-version rollback compatibility for bare nullable SQLite columns while continuing to reject constrained schema drift. Treat the historical shared_host CHECK definition as a named compatibility boundary.\n\nRefs #121061

* fix(state): keep additive registry internal

* test(state): keep constrained preflight fixture
2026-08-09 08:29:19 -07:00
Peter Steinberger 9a96375e60 feat(gateway): session-catalog terminal start plans behind cliAgents gate (#121020)
* feat(gateway): add session-catalog terminal start plans

* refactor(gateway): split catalog terminal start handler

* fix(gateway): enforce catalog terminal start eligibility

* test(gateway): split session catalog snapshot coverage
2026-08-09 08:13:39 -07:00
Peter Steinberger c70aee247e refactor(scripts): migrate JavaScript tools to TypeScript (#121005)
* refactor(scripts): migrate JavaScript tools to TypeScript

* fix(ci): keep changed-scope preflight zero-install

* fix(ci): preserve zero-install script owners

* fix(ci): complete script migration follow-through

* fix(release): keep stable closeout zero-install

* fix(scripts): preserve standalone execution boundaries

* fix(scripts): repair standalone loader boundaries

* fix(scripts): normalize gateway observation ids

* fix(scripts): keep Docker packager standalone

* test(scripts): preserve rebase cleanup helpers

* test(sessions): use tracked temp directory
2026-08-09 07:21:35 -07:00
Ayaan Zaidi 409fb7abca fix(telegram): enforce direct-message tool policies
Enforce configured Telegram direct-message tool policies across queued runs and native harnesses. Unsupported restricted harnesses now refuse visibly; turns without explicit policy keep existing tool access.

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-08-09 19:32:30 +05:30
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 4fec524243 fix: new session finds models after fresh gateway start (#121057)
* fix(gateway): align chat metadata with prepared auth

* fix(gateway): complete prepared auth mode contract

* fix(agents): canonicalize prepared auth aliases

* test(sessions): finish temp-dir helper migration
2026-08-09 06:40:25 -07:00
Peter Steinberger cb50289e28 fix(agents): keep removed background processes alive until exit (#113860)
* fix(agents): keep removed processes live until exit

* test(agents): isolate process registry lifecycle coverage

* chore(plugin-sdk): refresh API closure baseline
2026-08-09 06:04:40 -07:00