You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 49e3d0f
Browse filesBrowse the repository at this point in the historyBrowse files
refactor(move): move every daemon file into its layer folder
Daemon-root-relative mapping applied by codemod (git mv plus every
importer repo-wide, package-subpath and vi.mock specifiers, the
package exports map, markdown docs, and repo-path literals
included), with the repository-wide format sweep the rewritten lines
require. The folder under the daemon root becomes the layer
declaration; the manifest still carries the claim until the gate
commit retires it.
655 moves over 665 tracked package files (10 cross-layer test-support
leaves stay identity in the top-level __tests__/support/), 2,884
relative-spec rewrites in 581 files, 539 repo-path literal rewrites,
634 package-subpath rewrites, 16 exports-map keys, and markdown
retargets confined to paths whose files exist at head.
// @agent-device/maestro owns the source import, while the published root
@@ -243,7 +243,7 @@
243
243
},
244
244
{
245
245
// The interaction facade exposes #2178's named route inputs and deferred handlers, plus the existing ref mutation response consumed by help conformance. Fallow's production graph cannot follow the request-handler-chain dynamic imports, so this exact list is the facade contract.
// #1458: getSessionCommandKind's former production consumer (the session.ts if-chain) was replaced by SESSION_COMMAND_HANDLER_IMPLS, which encodes command-kind groupings directly via shared handler references instead of a kind lookup. The accessor and its SessionCommandKind classification remain covered by daemon-command-registry.test.ts, a test-tree file outside --production analysis.
// packages/daemon/src/__tests__/request-runtime-binding.test.ts drives the daemon's exact bind through the recovery authority, whose cancellation race is what rejects; production reaches it only through finishRecoveredDurableCapture and recoverDurableCaptureResource in the same package.
383
+
// packages/daemon/src/core/__tests__/request-runtime-binding.test.ts drives the daemon's exact bind through the recovery authority, whose cancellation race is what rejects; production reaches it only through finishRecoveredDurableCapture and recoverDurableCaptureResource in the same package.
Copy file name to clipboardExpand all lines: docs/adr/0012-interactive-replay.md
+15-15Lines changed: 15 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -730,7 +730,7 @@ path — no text editing, no silent similarity-heal.
730
730
731
731
**Core mechanism — the healed script IS `session.actions`.** No new splice engine. `session.actions`
732
732
already accumulates every executed action for the session's lifetime
733
-
(`packages/daemon/src/session-action-recorder.ts:37`, unconditional push), and the divergence refusal is
733
+
(`packages/daemon/src/core/session-action-recorder.ts:37`, unconditional push), and the divergence refusal is
734
734
pre-dispatch (target verification refuses before the device action, decision 3), so a divergent step is
735
735
never pushed. Across a repair session: original steps that verified and dispatched land in
736
736
`session.actions`; the divergent step is absent (refused pre-dispatch, never recorded); the agent's
@@ -766,7 +766,7 @@ works" and "healed scripts are always valid":
766
766
steps are re-executed during the repair replay; only if recording is armed from the start do they land
767
767
in `session.actions` with fresh `target-v1` evidence. Arming late yields a hybrid healed script (an
768
768
annotated corrective step glued to a bare, unannotated prefix) that re-diverges on its own next replay
769
-
(`packages/daemon/src/interaction/internal/interaction-common.ts:64-65` attaches evidence only when `recordSession` was
769
+
(`packages/daemon/src/execution/interaction/internal/interaction-common.ts:64-65` attaches evidence only when `recordSession` was
770
770
true when the step ran).
771
771
-**R2 — `--from` continuation only; never re-run the full replay on the same session.** After a
772
772
divergence at step N and the corrective action, the agent must continue with `replay --from k
@@ -808,8 +808,8 @@ works" and "healed scripts are always valid":
808
808
instead of leaving it to agent judgment.
809
809
-**R4 — corrective actions must materialize to selector form; the writer fails loudly on a bare `@ref`
810
810
cross-session export.** A `press @e12` normally resolves a `selectorChain` at runtime
811
-
(`packages/daemon/src/interaction/internal/interaction-touch-targets.ts`), which `buildOptimizedActions`
812
-
(`packages/daemon/src/session-script-writer.ts:69-83`) rewrites to a selector line. If no `selectorChain` was
811
+
(`packages/daemon/src/execution/interaction/internal/interaction-touch-targets.ts`), which `buildOptimizedActions`
812
+
(`packages/daemon/src/core/session-script-writer.ts:69-83`) rewrites to a selector line. If no `selectorChain` was
813
813
captured, the writer must refuse to emit a bare `@ref` line into a persisted `.ad` — a session-bound
814
814
ref will not resolve in a fresh run. It **fails loudly**: an error surfaced to the user with a non-zero
815
815
exit, never a swallowed or silently-dropped line (existing session-write paths swallow such failures;
@@ -893,7 +893,7 @@ by construction. The healed `.ad` is written only when the repair ends (below) a
893
893
- The healed `.ad` is published when a teardown commits the transaction at state `COMPLETE` — normally the
894
894
agent's own `close`/`close --save-script <out>`, but any teardown of a completed transaction commits
895
895
(see the commit state machine below) — reusing the existing `session.actions` serializer
896
-
(`SessionScriptWriter.write`, `packages/daemon/src/session-script-writer.ts:30-52`) over the post-watermark slice
896
+
(`SessionScriptWriter.write`, `packages/daemon/src/core/session-script-writer.ts:30-52`) over the post-watermark slice
897
897
only (R6). When no
898
898
`<out>` path is given, the default is the **`<original-stem>.healed.ad` sibling**: the original script's
899
899
path with its `.ad` extension replaced by `.healed.ad` (e.g. `flows/login.ad` → `flows/login.healed.ad`),
@@ -943,7 +943,7 @@ a separate naming change, not part of this decision.
943
943
944
944
**Scope: this refusal is uniform across repair AND ordinary recording, not repair-only.** Everything
945
945
above is written in the context of decision 6's repair-armed heal, but `publishHealedScriptAtomically`
946
-
(`packages/daemon/src/session-script-writer.ts`) is the single publish primitive `SessionScriptWriter.write` calls
946
+
(`packages/daemon/src/core/session-script-writer.ts`) is the single publish primitive `SessionScriptWriter.write` calls
947
947
for every `--save-script` target, with no repair-armed-vs-ordinary branch — a repair-armed heal
948
948
(`saveScriptBoundary` set) and an ordinary, non-repair `open --save-script`/`close --save-script`
949
949
recording (`saveScriptBoundary` absent) publish through the exact same exclusive `linkSync`. Before this
@@ -1002,10 +1002,10 @@ The tombstone itself expires after its bounded window, after which the key is fu
1002
1002
> Provenance travels as `internal.replayPlanStep`, stamped by `invokeResolvedReplayAction`
1003
1003
> (`src/daemon/handlers/session-replay-action-runtime.ts`) — the single point every plan step is
1004
1004
> dispatched, so the marker covers annotated and unannotated steps alike. `internal` is a daemon-only
1005
-
> channel (`toDaemonRequest`, `packages/daemon/src/server/http-rpc-methods.ts`, never copies it off the wire), so
1005
+
> channel (`toDaemonRequest`, `packages/daemon/src/server/server/http-rpc-methods.ts`, never copies it off the wire), so
1006
1006
> authored provenance cannot be spoofed by a client; this is the same channel `replayTargetGuard` and
1007
1007
> `findResolvedTarget` already use. The rule is written once, in `isInteractiveObservation`
1008
-
> (`packages/daemon/src/session-action-recorder.ts`), and both recording call sites consume it.
1008
+
> (`packages/daemon/src/core/session-action-recorder.ts`), and both recording call sites consume it.
1009
1009
>
1010
1010
> **2. The corrective-read trap: why even out-of-band reads need an opt-in.** Excluding every out-of-band
1011
1011
> read is still not safe on its own: a divergence's **correction** can itself be a read. In the wave-3 E3 drift, the diverged step **was** a `get`, so its corrective replacement is a
@@ -1044,11 +1044,11 @@ The tombstone itself expires after its bounded window, after which the key is fu
1044
1044
>
1045
1045
> **4. How the rule projects across CLI/Node/MCP surfaces.** The exclusion is enforced at a single
1046
1046
> daemon-side choke point — `isExcludedRepairSegmentObservation` in `recordActionEntry`
1047
-
> (`packages/daemon/src/session-action-recorder.ts`), gated on `session.saveScriptBoundary !== undefined` (set ONLY
1047
+
> (`packages/daemon/src/core/session-action-recorder.ts`), gated on `session.saveScriptBoundary !== undefined` (set ONLY
1048
1048
> by a repair-armed `replay --save-script`; an ordinary, non-repair `open --save-script`/`close --save-script`
1049
1049
> authoring recording never sets it — see decision 6's "Scope" note above) and on the entry's
1050
1050
> `interactiveObservation` marker, which both recording call sites
1051
-
> (`packages/daemon/src/selector-recording.ts` for `get`/`is`/read-only `find`, `packages/daemon/src/snapshot-runtime.ts` for
1051
+
> (`packages/daemon/src/core/selector-recording.ts` for `get`/`is`/read-only `find`, `packages/daemon/src/sessions/snapshot-runtime.ts` for
1052
1052
> `snapshot`) compute from the shared `isInteractiveObservation` predicate rather than each re-deriving it.
1053
1053
> Every surface reaches this same function because every surface's request reaches the same daemon.
1054
1054
>
@@ -1159,8 +1159,8 @@ above and the gates they name are the authoritative record of current behavior.
1159
1159
1160
1160
At acceptance, replay was deterministic. `.ad` scripts were plain text — one action per line, `#`
1161
1161
comments, and a `context platform=... device=... theme=...` header (`src/replay/script.ts`) — recorded
1162
-
via `open --save-script` (`packages/daemon/src/session-action-recorder.ts`,
1163
-
`packages/daemon/src/session-script-writer.ts`) or hand-written, and executed step-by-step by
1162
+
via `open --save-script` (`packages/daemon/src/core/session-action-recorder.ts`,
1163
+
`packages/daemon/src/core/session-script-writer.ts`) or hand-written, and executed step-by-step by
1164
1164
`runReplayScriptFile`
1165
1165
(`src/daemon/handlers/session-replay-runtime.ts`) under the daemon's `replay`/`test` commands
1166
1166
(`src/daemon/handlers/session-replay.ts`). Recorded touch/fill/get targets are selector chains with
@@ -1289,15 +1289,15 @@ both `.ad` and Maestro paths) grounds the same conclusions from the caller's sea
1289
1289
"Retry with --debug and inspect diagnostics log for details." (`defaultHintForCode`,
1290
1290
`src/kernel/errors.ts:253-254`).
1291
1291
-**Recordings contain zero verification steps.** The script writer strips every recorded `snapshot`
0 commit comments