Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
196 commits
Select commit Hold shift + click to select a range
10fbca5
docs: start ACP layer from certified native foundation
lidge-jun Sep 5, 2026
c389f23
feat(runtime): add bounded ACP duplex transport and fix peer ID colli…
lidge-jun Sep 5, 2026
d1864cb
docs: define native request callback and API ownership
lidge-jun Sep 5, 2026
2d4541d
feat(runtime): add exact-bound native decisions and ACP callbacks
lidge-jun Sep 5, 2026
71e1703
docs: revalidate Cursor native session and message boundaries
lidge-jun Sep 5, 2026
45d4d56
docs: lock audited native session boundary and downstream activation
lidge-jun Sep 5, 2026
2c20f3c
feat(runtime): implement Cursor ACP session ownership and scoped pooling
lidge-jun Sep 5, 2026
2975db1
fix(runtime): fence ACP pool admission and v1 terminal reasons
lidge-jun Sep 5, 2026
4cca13e
docs: checkpoint Grok native runtime plan
lidge-jun Sep 5, 2026
d5b9310
docs(native): checkpoint live session proof and parallel work map
lidge-jun Sep 5, 2026
d77f5ac
feat(runtime): define dedicated Grok ACP launch policy
lidge-jun Sep 5, 2026
1c09f24
feat(runtime): create persistent Grok ACP sessions with advertised mo…
lidge-jun Sep 5, 2026
16a7c14
feat(acp): expose isolated authentication and model setup controls
lidge-jun Sep 5, 2026
c4f1484
fix(grok): preserve advertised defaults on alias selection
lidge-jun Sep 5, 2026
952814c
fix(grok): await child reaping after startup abort
lidge-jun Sep 5, 2026
1a82fc0
test(runtime): cover ACP session and reaper boundary composition
lidge-jun Sep 5, 2026
ef7520b
docs: checkpoint verified Grok ACP session evidence
lidge-jun Sep 5, 2026
9356a94
feat(grok): project original-response usage and fence completion exte…
lidge-jun Sep 5, 2026
9b25b92
fix(runtime): reap Cursor child after post-spawn abort
lidge-jun Sep 5, 2026
a1081ce
test(grok): capture native read-file output and prompt usage fixture
lidge-jun Sep 5, 2026
7335600
docs(native): close verified Cursor protocol phase
lidge-jun Sep 5, 2026
a4cc933
fix(grok): block unverified restrictive native policies before spawn
lidge-jun Sep 5, 2026
b95ae50
docs: checkpoint Grok native permission safety evidence
lidge-jun Sep 5, 2026
10ce158
docs: preserve shared native runtime evidence ancestry
lidge-jun Sep 5, 2026
9a66530
merge: integrate verified Cursor ACP foundation
lidge-jun Sep 5, 2026
e87aaf5
feat(acp): map protocol segments through shared runtime projection
lidge-jun Sep 5, 2026
35be690
fix(acp): preserve final candidates across retired tool replays
lidge-jun Sep 5, 2026
35a901e
docs: bind shared ACP projection verification evidence
lidge-jun Sep 5, 2026
0cfd4e9
docs: update shared projection source receipt metadata
lidge-jun Sep 5, 2026
ad3caf6
docs: align API inventory counts with inherited routes
lidge-jun Sep 5, 2026
f42c984
feat(grok): serialize cancel-and-reprompt with fatal dispatch fencing
lidge-jun Sep 5, 2026
2dc3932
feat(acp): expose guarded local prompt dispatch observation
lidge-jun Sep 5, 2026
20dc743
test(acp): prove dispatch observer rejection is consumed
lidge-jun Sep 5, 2026
9e73261
test(acp): isolate pure projection from default SQLite imports
lidge-jun Sep 5, 2026
a6fd4e7
Merge commit 'ad3caf6f58329a3b1866385c068ae29187eeb1b8' into codex/na…
lidge-jun Sep 5, 2026
c5ac3e1
docs(native): bind audited main-runtime integration packet
lidge-jun Sep 5, 2026
2b53775
test(grok): capture native read-file output and prompt usage fixture
lidge-jun Sep 5, 2026
6d50085
feat(acp): map protocol segments through shared runtime projection
lidge-jun Sep 5, 2026
30613f8
fix(acp): preserve final candidates across retired tool replays
lidge-jun Sep 5, 2026
e609e06
feat: expose existing trace identity allocator
lidge-jun Sep 5, 2026
09d6a9a
docs: bind Grok native control and context verification
lidge-jun Sep 5, 2026
e741e9f
feat(cursor): connect native ACP main turns to shared lifecycle
lidge-jun Sep 5, 2026
2901e75
docs: preserve native integration dependency ancestry
lidge-jun Sep 5, 2026
620e040
merge: consume shared native main runtime foundation
lidge-jun Sep 5, 2026
fb45f78
fix(cursor): wake queued follow-ups after native failures
lidge-jun Sep 5, 2026
aad1453
fix(cursor): wake queued follow-ups after native failures
lidge-jun Sep 5, 2026
d39305a
docs: bind verified Cursor main integration evidence
lidge-jun Sep 5, 2026
c774a5c
refactor(acp): expose provider-neutral replacement controller
lidge-jun Sep 5, 2026
1f96bcd
feat(acp): add optional replacement turn coordination
lidge-jun Sep 5, 2026
4b158d4
feat(agent): route native replacement through a typed main hook
lidge-jun Sep 5, 2026
4060949
refactor(grok): reuse the common ACP replacement controller
lidge-jun Sep 5, 2026
93d138f
feat(grok): acquire isolated native sessions through the ACP pool
lidge-jun Sep 5, 2026
cbb8b70
feat(grok): activate native main runs with cancel and replacement
lidge-jun Sep 5, 2026
4c6b8be
docs: synchronize native main implementation counts
lidge-jun Sep 5, 2026
c1a490f
test(agent): verify provider-neutral main replacement routing
lidge-jun Sep 5, 2026
685ec6d
test(grok): verify native main steering and lifecycle boundaries
lidge-jun Sep 5, 2026
64d2b89
feat(acp): observe guarded local prompt dispatch
lidge-jun Sep 5, 2026
8609fca
refactor(acp): expose provider-neutral replacement controller
lidge-jun Sep 5, 2026
032b467
feat(acp): add optional replacement turn coordination
lidge-jun Sep 5, 2026
7fb319c
feat(agent): route native replacement through a typed main hook
lidge-jun Sep 5, 2026
8c74dd7
test(agent): verify provider-neutral main replacement routing
lidge-jun Sep 5, 2026
93a2a76
fix(acp): fence replacement input commits by current ownership
lidge-jun Sep 5, 2026
3c90998
fix(agent): reject replacement input commits from retired main owners
lidge-jun Sep 5, 2026
51b5ea6
fix(acp): fence replacement input commits by current ownership
lidge-jun Sep 5, 2026
c415b2f
fix(agent): preserve replacement callback results for async rejection
lidge-jun Sep 5, 2026
18a7a70
fix(agent): observe canonical resets before replacement input commits
lidge-jun Sep 5, 2026
4204e94
docs: refresh replacement ownership implementation counts
lidge-jun Sep 5, 2026
0759cdb
test(agent): replace fragile legacy routing checks with behavior
lidge-jun Sep 5, 2026
363ca77
test(agent): replace fragile legacy routing checks with behavior
lidge-jun Sep 5, 2026
7ba400e
docs(grok): document native main activation and replacement limits
lidge-jun Sep 5, 2026
c80e547
docs: retain Grok main HTTP and verification evidence
lidge-jun Sep 5, 2026
2a75cbd
feat(cursor): compose context-aware native replacement input
lidge-jun Sep 5, 2026
b3d965b
fix(agent): reject replacement input commits from retired main owners
lidge-jun Sep 5, 2026
5b2a8a2
fix(agent): preserve replacement callback results for async rejection
lidge-jun Sep 5, 2026
c333542
fix(agent): observe canonical resets before replacement input commits
lidge-jun Sep 5, 2026
5bca71f
docs: bind Cursor control checkpoint and synchronize counts
lidge-jun Sep 5, 2026
21debba
test(slack): preserve canonical scope exports in slash fixtures
lidge-jun Sep 5, 2026
72485e1
test(agent): refresh native fixtures and exercise gated stop behavior
lidge-jun Sep 5, 2026
6af669a
fix(types): constrain native execution metadata inputs
lidge-jun Sep 5, 2026
5f131a5
test(slack): preserve canonical scope exports in slash fixtures
lidge-jun Sep 5, 2026
8aecd28
test(agent): refresh native fixtures and exercise gated stop behavior
lidge-jun Sep 5, 2026
0b591d4
fix(types): constrain native execution metadata inputs
lidge-jun Sep 5, 2026
7cd697e
docs: retain final Grok runtime verification evidence
lidge-jun Sep 5, 2026
e1e816a
test(cursor): exercise replacement over real stdio and slash routes
lidge-jun Sep 5, 2026
9c61993
fix(runtime): overwrite stale scope hints at pipeline ingress
lidge-jun Sep 5, 2026
3d8dc97
docs: retain corrected Grok scope verification
lidge-jun Sep 5, 2026
9d3b605
fix(runtime): overwrite stale scope hints at pipeline ingress
lidge-jun Sep 5, 2026
22a1bef
fix(runtime): keep stopped native redirects out of the queue
lidge-jun Sep 5, 2026
8a5578b
fix(agent): fence delayed steer fallbacks through scoped Stop
lidge-jun Sep 5, 2026
2c3dd0f
docs(runtime): describe native Cursor control and pending-input cance…
lidge-jun Sep 5, 2026
aa3a235
Merge published native parent while preserving Grok control behavior
lidge-jun Sep 5, 2026
ef1fb23
test(gateway): verify steer delegation through actual outcomes
lidge-jun Sep 5, 2026
96ed05e
docs(grok): distinguish native cancellation from print steering
lidge-jun Sep 5, 2026
78a650b
test(grok): cover Stop across pending and busy input ingress
lidge-jun Sep 5, 2026
b161d20
Merge published parent gateway regression followup
lidge-jun Sep 5, 2026
4c0795f
docs: retain Grok parent cascade verification evidence
lidge-jun Sep 5, 2026
123b428
feat(runtime): integrate Grok ACP factory and advertised setup controls
lidge-jun Sep 5, 2026
d0501b7
chore: checkpoint native integration evidence
lidge-jun Sep 5, 2026
b8e2f02
chore: retain Grok factory check evidence
lidge-jun Sep 5, 2026
1ac170b
feat(runtime): integrate Grok aggregate usage without extension finality
lidge-jun Sep 5, 2026
f4e6499
test(runtime): assert complete Grok turn and tool retention
lidge-jun Sep 5, 2026
d05e563
chore: checkpoint Grok telemetry evidence
lidge-jun Sep 5, 2026
aa8c82a
chore: retain Grok telemetry verification
lidge-jun Sep 5, 2026
783aa3d
chore: bind Grok application integration plan
lidge-jun Sep 6, 2026
f551969
merge: integrate verified Grok native main and control
lidge-jun Sep 6, 2026
dc66e99
chore: bind merged Grok evidence separately
lidge-jun Sep 6, 2026
ebb8aba
chore: retain completed Grok integration review
lidge-jun Sep 6, 2026
830c9d8
chore: bind Claude core integration plan
lidge-jun Sep 6, 2026
2f36529
feat(runtime): add bounded persistent Claude SDK core
lidge-jun Sep 6, 2026
f66c697
chore: record Claude core verification evidence
lidge-jun Sep 6, 2026
d6c24fb
chore: close Claude core verification checkpoint
lidge-jun Sep 6, 2026
9563ed2
chore: bind Claude mapper integration plan
lidge-jun Sep 6, 2026
63f3348
feat(runtime): map Claude parent activity and preserve terminal tools
lidge-jun Sep 6, 2026
1f979da
test(runtime): isolate injected Claude projection recorders
lidge-jun Sep 6, 2026
347e57a
chore: record Claude mapper verification checkpoint
lidge-jun Sep 6, 2026
424c62f
chore: close Claude mapper verification checkpoint
lidge-jun Sep 6, 2026
313c7fc
chore: bind Claude main integration plan
lidge-jun Sep 6, 2026
3563d26
feat(runtime): connect Claude pool and deferred terminal ownership
lidge-jun Sep 6, 2026
8e61f79
chore: preserve worktree cleanup incident record
lidge-jun Sep 6, 2026
8bfbda2
feat(runtime): activate Claude native main with scoped Stop settlement
lidge-jun Sep 6, 2026
9d5496c
test(runtime): prove Claude fallback recording and interrupted salvage
lidge-jun Sep 6, 2026
fae3c7d
test(runtime): bind exceptional Claude trace closure to running policy
lidge-jun Sep 6, 2026
4920763
chore: record Claude main verification progress
lidge-jun Sep 6, 2026
74b7885
test(runtime): keep Codex fixture closed to Claude acquisition
lidge-jun Sep 6, 2026
af4801b
chore: record Claude main regression checkpoint
lidge-jun Sep 6, 2026
dfdfdaf
fix(runtime): keep unfinished Claude tools from false completion
lidge-jun Sep 6, 2026
804a1d2
chore: record final Claude tool-state verification
lidge-jun Sep 6, 2026
fe17092
chore: bind Claude main full build review
lidge-jun Sep 6, 2026
32be878
chore: close Claude native main verification checkpoint
lidge-jun Sep 6, 2026
d12c5f9
docs: checkpoint native parity and Electron QA plans
lidge-jun Sep 6, 2026
f2ea407
docs: checkpoint native decision audit corrections
lidge-jun Sep 6, 2026
3f360a6
feat: connect native Claude decisions workers and live request UI
lidge-jun Sep 6, 2026
02c17d5
docs: checkpoint native SDK parity evidence
lidge-jun Sep 6, 2026
6930d05
fix(web): preserve decision drafts and bound identity recovery
lidge-jun Sep 6, 2026
6235726
fix(web): hydrate tool-backed finals in fresh virtual chats
lidge-jun Sep 6, 2026
12b6fcc
chore(native): checkpoint wp19 verification evidence
lidge-jun Sep 6, 2026
3f50cef
chore(native): checkpoint real-provider validation
lidge-jun Sep 6, 2026
cc5b17f
chore(native): finish wp19 and begin journal integration
lidge-jun Sep 6, 2026
b6ef919
feat(runtime): persist owner-bound Activity journal and replay
lidge-jun Sep 6, 2026
51774d7
test(runtime): keep projection fixtures isolated with owned journal s…
lidge-jun Sep 6, 2026
77523e2
docs: record verified Activity journal checkpoint
lidge-jun Sep 6, 2026
547585a
docs: bind current print Activity implementation plan
lidge-jun Sep 6, 2026
bffec50
feat(runtime): project print Activity and reconcile latest tools
lidge-jun Sep 6, 2026
40e30c5
test(runtime): prove Activity bypasses existing channel forwarders
lidge-jun Sep 6, 2026
31321cf
docs: record print Activity verification checkpoint
lidge-jun Sep 6, 2026
a59392a
docs: record completed print Activity checkpoint
lidge-jun Sep 6, 2026
ee2571e
feat(settings): default Activity preference with reversible Legacy di…
lidge-jun Sep 6, 2026
245b49d
fix(settings): derive presentation draft from dirty store on discard
lidge-jun Sep 6, 2026
1fb625c
docs: bind presentation preference verification evidence
lidge-jun Sep 6, 2026
2377e0b
docs: record completed presentation preference checkpoint
lidge-jun Sep 6, 2026
3614f8f
docs: checkpoint live Activity integration plan
lidge-jun Sep 6, 2026
7f91f77
feat(web): render bounded live Activity with run-owned final answers
lidge-jun Sep 6, 2026
1a8b358
test(cursor): create durable chat owner for ACP steer fixtures
lidge-jun Sep 6, 2026
4ca0d52
docs: bind live Activity verification artifacts
lidge-jun Sep 6, 2026
c425129
docs: finalize Activity verification record
lidge-jun Sep 6, 2026
c4d61ea
docs: record completed live Activity checkpoint
lidge-jun Sep 6, 2026
a29b72c
docs: checkpoint Activity history integration plan
lidge-jun Sep 6, 2026
c318e4f
feat(history): add bounded saved-answer and Activity recovery pipeline
lidge-jun Sep 6, 2026
2f6099c
fix(web): bound history recovery and guard retained activity hosts
lidge-jun Sep 6, 2026
a9dc1d6
fix(web): retain scoped answers when activity recording is unavailable
lidge-jun Sep 6, 2026
1e31763
docs: synchronize retained Activity and exact saved-answer contracts
lidge-jun Sep 6, 2026
dcbd4c4
fix(web): preserve recoverable history hosts across cancellation and …
lidge-jun Sep 6, 2026
acf20cf
docs: sync Activity recovery verification checkpoint
lidge-jun Sep 6, 2026
df53433
chore: checkpoint verified Activity history delivery
lidge-jun Sep 6, 2026
bfeac68
docs: checkpoint Manager runtime integration plan
lidge-jun Sep 6, 2026
1ccafd1
docs: checkpoint audited Manager integration scope
lidge-jun Sep 6, 2026
833a8b4
feat(manager): add explicit native runtime preference with scoped saves
lidge-jun Sep 6, 2026
b3691b5
fix(manager): reconcile admitted Pi registration across page saves
lidge-jun Sep 6, 2026
685550d
docs(manager): describe native preference and save ownership
lidge-jun Sep 6, 2026
0925b2a
fix(settings): preserve admitted runs for next-run preferences
lidge-jun Sep 6, 2026
246ecf6
fix(ui): preserve live rows and clarify runtime request states
lidge-jun Sep 6, 2026
8aac9ad
chore: checkpoint verified Manager and Electron integration
lidge-jun Sep 6, 2026
ac5d641
feat(tui): integrate scoped Activity and exact saved answers
lidge-jun Sep 6, 2026
329b1eb
fix(a11y): keep composer action names in sync
lidge-jun Sep 6, 2026
7930a0c
perf(tui): bound saved history rendering and prove scrollback
lidge-jun Sep 6, 2026
b18dc7f
chore: checkpoint completed TUI verification
lidge-jun Sep 6, 2026
fed06b1
fix(a11y): keep Pi settings modal visible and keyboard contained
lidge-jun Sep 6, 2026
48daa30
fix(ui): contain Activity search and Trace controls
lidge-jun Sep 6, 2026
6eeded5
docs: checkpoint audited native dev merge plan
lidge-jun Sep 6, 2026
8356501
docs: record initial native foundation dev landing
lidge-jun Sep 6, 2026
f5da4d0
fix(runtime): preserve ACP failure admission and trace settlement
lidge-jun Sep 6, 2026
7ce8743
fix(pi): preserve native finality and owned lifecycle settlement
lidge-jun Sep 6, 2026
bc2707e
docs: synchronize native runtime integration counts
lidge-jun Sep 6, 2026
f4ff171
docs: preserve ACP repair CI continuation evidence
lidge-jun Sep 6, 2026
ad30739
fix(manager): retain Pi registration response metadata
lidge-jun Sep 6, 2026
6adcab8
fix(ui): distinguish configured policy from editor drafts
lidge-jun Sep 6, 2026
3b34ed1
docs: checkpoint repaired native prefix landing
lidge-jun Sep 6, 2026
5efff43
test(runtime): verify stop delivery and repeated cleanup contracts
lidge-jun Sep 6, 2026
36eb075
merge: reconcile dev ACP fixes with native Activity integration
lidge-jun Sep 6, 2026
5a7d74c
test: reconcile runtime settings and projection regression oracles
lidge-jun Sep 7, 2026
d15b1c0
docs: checkpoint asynchronous native activity delivery
lidge-jun Sep 7, 2026
106ab9f
test(web): verify final rendering and structured history hydration
lidge-jun Sep 7, 2026
26d0d05
test(web): reconcile stale rendering and refresh oracles
lidge-jun Sep 7, 2026
9712b3d
test(web): await real reconnect readiness in baseline fixtures
lidge-jun Sep 7, 2026
e3af038
test(web): bind remaining live fixtures to reconnect completion
lidge-jun Sep 7, 2026
20104b1
fix(web): finish disconnect cleanup before new turn ownership
lidge-jun Sep 7, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 32 additions & 4 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,9 @@ git add devlog && git commit -m "chore: update devlog ref" && git push

### Architecture Docs Sync

- Native event foundation: `src/shared/runtime-contract.ts` + `src/agent/runtime/*` own canonical Codex/Pi projections and optional explicit outcomes. `agent_runtime`/`agent_runtime_gap` publish directly to SSE, bypassing messaging listeners. Native compatibility terminals carry only finality/status and existing trace identity; no public partial/outcome object. Preserve legacy final selection when outcome is absent, and interrupted MESSAGE salvage before exit settlement. See `structure/runtime-integration.md` and `structure/stream-events.md`; Activity layout/default settings are separate follow-on work.
- Native event foundation: `src/shared/runtime-contract.ts` + `src/agent/runtime/*` own canonical Codex/Pi projections and optional explicit outcomes. `agent_runtime`/`agent_runtime_gap` publish directly to SSE, bypassing messaging listeners. Native compatibility terminals carry only finality/status and existing trace identity; no public partial/outcome object. Preserve legacy final selection when outcome is absent, and interrupted MESSAGE salvage before exit settlement. See `structure/runtime-integration.md` and `structure/stream-events.md`; Classic live Activity and its default preference are implemented separately from this event foundation; Classic history has its own bounded restoration owner; Interactive TUI has its own scoped consumer described below.
- Runtime selection: only Cursor/Grok/Claude accept `perCli.<cli>.transport`; existing absence stays print before defaults merge. Native switchable keys prefix the whole legacy bucket with `native-v1:` and never overwrite the print singleton. Capture transport/bucket once, forward through lifecycle persistence/compact, and keep scoped resets exact. Unsupported main/worker native adapters fail before print/fallback work; compiled support in `/api/cli-status` is separate from cached auth/binary readiness. Codex App/Pi keys remain unchanged.
- Claude native: the optional SDK, shared pool/host and existing lifecycle own sequential main turns, fresh worker assignments, immutable terminal claims, hard Stop and interrupted MESSAGE before exit-settle. Default steer remains kill/resume, never advertised as in-band. Auto/safe decisions use live requests; deny/unknown profiles fail before preparation, including the memory extractor. Images are bounded and child activity is foreground-only. Child declarations reconcile from both parent/child frames; their ID ownership survives child completion and is not the same as live permission eligibility. Pre-start failure/Stop use one cached fallback before compatibility output; `onlyIfRunning` preserves finished trace headers.

- Cursor native main: explicit native/auto only; restrictive permissions and unsupported workers fail before `regenerateB`, bucket/bootstrap/snapshot, detection or pool work. `AcpRuntimeSession` keeps raw final/partial independent of bounded Activity and claims an immutable logical result before lifecycle; passive finalization survives main-map removal. Native run cleanup holds the exact lease through application settlement and uses captured exit-barrier identity. Server-explicit scope/chat bindings survive multi-session off; private identity-only I/O liveness keeps the owning collector alive without messaging content. Preserve legacy/manual compact while excluding print-era automatic compact/count heuristics from explicit native outcomes.
- `structure/` is the current architecture-doc hub; do not point new docs at `devlog/structure/`.
Expand All @@ -192,9 +193,36 @@ git add devlog && git commit -m "chore: update devlog ref" && git push
Canonical: dev-pabcd §10, dev-testing §9.5; injected via orchestration template and goal continuation.
- `structure/` reading map: start at `structure/INDEX.md`; depth — `telegram.md` (Hub), `prompt_flow.md` (attest/hooks/bounded search), `stream-events.md` (pause gate/SSE), `infra.md` (test scripts), `commands.md` + `server_api.md` (slash/API surfaces). Concurrent inbound gateway docs: `structure/INDEX.md` §gateway, `structure/infra.md` §`src/messaging/`, `structure/telegram.md` §common messaging layer; legacy `settings.channel` is a deprecated read-only alias for one major version.

- Grok main native ACP requires literal auto, existing advertised authentication/model/effort, and no leader. Its optional common replacement strategy waits for original cancellation and drain, preserves one logical final, commits input only after local dispatch with current ownership, and never queues fatal failures. Restrictive policies and workers fail before preparation. Sync `structure/runtime-integration.md`.

### Native decisions

`src/agent/runtime/requests.ts` and `acp/callbacks.ts` own bounded pending decisions, opaque native-option mapping and cancellation latches. `GET /api/runtime/requests?sessionId=...` and `POST /api/runtime/requests/:id` use the existing instance auth policy (including loopback/LAN bypass), never a current-session fallback. Match run/session/scope/turn and current ownership before answering. Canonical sanitization and the32KiB event preflight precede insertion; global128/120s and per-connection32 bounds apply. An admitted selected write cannot be retracted: cancellation during dispatch retires the connection. Provider activation, approval UI and messaging changes are not implied. Sync `structure/runtime-integration.md` and `structure/server_api.md`.
Interactive TUI Activity is implemented in `src/cli/tui/activity*.ts` and
`bin/commands/tui/activity*.ts`. Default Activity/explicit Legacy is independent of
transport. Snapshot owns live admission; F6 is read-only history, never a message/
Stop target selector. Journal text is redacted, not final: exact saved MESSAGE wins
over compatibility and preserves null/empty/whitespace. Keep missing-journal receipt
binding shared by live and replay, bounded GET/queue lifetime, native-absent diagnostic
separation, newer-run cleanup guards and draft-preserving late line output. Release
payload only after actual scrollback flush; raw/simple paths receive no new reads.
Sync commands/frontend/stream/tui-scrollback docs; broader visual/cross-runtime and
final integrated Electron QA have separate owners and are not implied by TUI tests.

Classic retained Activity uses `activity-history.ts`/`activity-discovery.ts` and the
shared fixed-through reader. Preserve original stored scope, bounded per-run replay,
focus-aware eviction and rejection of nested copied host keys. MESSAGE loading opts
into `withSession=1`; `/api/messages/by-trace/:runId?session=...` returns a unique
exact saved answer (16MiB,409 ambiguity), never grants source Trace access to forks.
Cache/VS IDs are not server MESSAGE IDs. Keep raw Trace at80 rows with paging and
honor denied/unverified actions. See frontend/API docs; TUI request records remain read-only.

`presentation.mode` accepts only activity/legacy; absence defaultsActivity for fresh/upgraded homes, explicitLegacy survives reload, and perCli.transport is independent. Explicit known mode and/or eligible transport-only API patches preserve admitted-run ownership and skip fallback reset/singleton sync/JWC rewrite. Keep legacy presentation-subtree skips separately, and retain serialization, persistence rollback and messaging dispatch. Mixed execution-changing/unknown/empty leaves retain invalidation; external-file transport edits still invalidate while API self-write echoes are ignored. Classic preference refresh uses the existing bounded reader and shared load/event generation; never replace native-request-bridge with the old Web donor. Manager Display owns singleflight, disabled/guarded edits, captured dirty acknowledgement and client/port epochs. Classic live and retained Activity consume the canonical stream and journal; Manager and TUI have separate instance and input lifecycle owners. Keep bounded views, current-run final ownership and independent request controls.

Print Activity uses `runtime/print-projection.ts` and `print-activity.ts` as observers, never final selectors. Only accepted parser text enters; stderr/control output stays raw. Lifecycle supplies the application-final and existing bypass/retry paths close once. `merge-tool-log.ts` reconciles exact run/ref or run/seq identities; unknown workers never borrow boss identity. Bounded snapshot hydration retains known RAM omission with the sanitizer's explicit max-overlap option; default append/storage counting is unchanged. Only print opts into terminal tool refresh; native default freeze/enrichment, Claude pending-worker cancellation and Slack final/ACK/queue owners remain intact.

Activity journal: `src/trace/activity-{journal,control,retention}.ts` owns bounded immutable runtime rows and private control metadata. Capture durable chat/scope on all trace starts; internal append is allowed, public replay is not. Session discovery/replay and owned raw routes require the explicit original session under existing instance auth. Only original message links backfill owners; forks cannot acquire source traces. Keep `onlyIfRunning` close ordering, first-loss metadata, whole-prefix retention and final/Slack independence. Sync `structure/runtime-integration.md`, `server_api.md`, `stream-events.md`; timeline/default/print presentation are separate layers.

`src/agent/runtime/requests.ts` and `acp/callbacks.ts` own bounded pending decisions, opaque native-option mapping and cancellation latches. `GET /api/runtime/requests?sessionId=...` and `POST /api/runtime/requests/:id` use the existing instance auth policy (including loopback/LAN bypass), never a current-session fallback. Match run/session/scope/turn and current ownership before answering. Canonical sanitization and the32KiB event preflight precede insertion; global128/120s and per-connection32 bounds apply. An admitted ACP selected write cannot be retracted: cancellation during dispatch retires the connection. Route-owned `agent_runtime_requests_changed` is an SSE-only metadata hint: its scope routes to the captured chat's presentation surface, while live GET/POST retain original execution scope. The Classic request panel keeps stream health separate from manual REST freshness and never retries POST automatically. Do not broadcast notices to messaging or infer Activity defaults/history from this panel. Sync `structure/runtime-integration.md` and `structure/server_api.md`.

### Concurrent inbound gateway (M1)

Expand All @@ -206,8 +234,8 @@ git add devlog && git commit -m "chore: update devlog ref" && git push

### Mid-run steer (기본 정책)

- `multiSession.midRunPolicy` 기본값은 `'steer'`다. JWC와 steer 가능한 Codex App turn은 in-band 입력을 받는다. Native Cursor는 `replaceTurn` 훅으로 원래 prompt 취소 응답·업데이트·callback을 모두 처리한 뒤 같은 native session에 다시 요청한다. 이는 `cancel-reprompt`이며 native-input이 아니다. 원래 요청·수락된 추가 지시·제한된 부분 출력은 읽기 전용 문맥으로, 현재 운영 지침은 활성 지침으로 복원한다.
- Native Cursor는 전송 완료 뒤에도 main 객체·세대·정규 소유권을 재검사하고 입력을 한 번만 기록한다. 진행 중인 replacement의 후속 입력은 큐로 갈 수 있지만, 취소·전송·기록 실패는 자동 재시도하지 않는다. 나머지 런타임의 기존 in-band/kill-steer 동작과 `followup`/`collect` 대기는 유지한다.
- `multiSession.midRunPolicy` 기본값은 `'steer'`다. JWC와 steer 가능한 Codex App turn은 in-band 입력을 받는다. Native Cursor와 Grok은 `replaceTurn` 훅으로 원래 prompt 취소 응답·업데이트·callback을 모두 처리한 뒤 같은 native session에 다시 요청한다. 이는 `cancel-reprompt`이며 native-input이 아니다. Cursor는 원래 요청·수락된 추가 지시·제한된 부분 출력을 읽기 전용 문맥으로, 현재 운영 지침을 활성 지침으로 복원한다. Grok에는 이 재주입을 적용하지 않는다.
- Native Cursor와 Grok은 전송 완료 뒤에도 main 객체·세대·정규 소유권을 재검사하고 입력을 한 번만 기록한다. 진행 중인 replacement의 후속 입력은 큐로 갈 수 있지만, 취소·전송·기록 실패는 자동 재시도하지 않는다. Stop으로 무효화된 입력은 실제 enqueue까지 보호하고 `cancelled`로 끝내며, 이후 새 입력은 받을 수 있다. 나머지 런타임의 기존 in-band/kill-steer 동작과 `followup`/`collect` 대기는 유지한다.
- `/steer`는 런타임 훅을 사용한다. 별도 `/queue steer <n>`은 기존 항목을 중단 후 우선 실행하는 동작을 유지한다. Kill 경로의 제한된 부분 출력은 pre-kill MAX(id)와 정확한 exit-settle 배리어 뒤 `withSteerContext`로 복원한다. 전체 과거 맥락 보존을 보장하지 않는다. 정책 표는 `structure/prompt_flow.md`를 참고한다.

### Korean Content Skill Routing
Expand Down
Loading
Loading