Adds a chat surface to the Phase 7 browser explorer where the board sends
prompts to a scenario and sees exactly how the mock Paperclip control plane
was used on every turn — the point of the phase is that the activity stays
visible rather than hidden behind the conversation (PAP-16916).
Runtime owns the turn model, so the UI derives nothing:
- `Phase7ChatSession` keeps one long-lived mock core across turns, so the
state a turn changes is still there for the next one. Turn 0 is the
control-plane seed (checkout, wake routing, exposure) that exists before
anyone can type.
- Timeline entries gain a `turn`; the artifact gains `turns[]` with per-turn
exposure, authorization records, state diff, reconciliation events, counts,
and a turn-scoped verdict. A new `user_message` kind joins the five
existing ones.
- `phase7TurnParity` judges a turn on what that turn did. A session-level
expectation about work nobody has asked for yet would read as a failure of
turn 1 rather than as work still to come.
- Recording machinery moves to `scenario-execution.ts`, shared with the 7F
single-shot runner so a scenario reads the same either way.
Two scenarios carry authored multi-turn scripts: `ap-mcp-gate-01` (allowed
turn, then a denied one) and `ix-checkbox-01` (open an interaction, then the
board answers it — a control-plane-owned action with no agent tool, which is
what makes the control plane schedule the continuation wake). Every other
corpus scenario falls back to its 7F plan as one scripted turn.
The surface implements the approved 7I interaction map: turn strips bridging
each turn to its evidence, the six-section activity stream, the mobile
Chat/Activity segments with a deny count chip, reset and scenario-switch
confirmation, and deterministic deep links including a staged streaming hold.
Deviations taken during implementation are recorded in §11a of the map rather
than left for a reviewer to find.
No ACPX implementation, no real control-plane integration, no credential in
the browser: Codex mode stays disabled with a named reason and scripted mode
drives the same in-page mock core offline.
Tests: 30 new runtime/component tests and 18 browser tests; 79 phase-7 unit
and 43 phase-7 browser tests pass. Ten §11 screenshots recorded by
`record:phase7i`, which fails the run on any horizontal page scroll.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Implements the standalone, package-local Phase 7 scenario explorer against the
approved interaction map (docs/design/phase-7-scenario-explorer-ux.md).
Scenario runtime (src/phase7, no DOM, no network):
- Scenario index over all 106 eval cases and 16 groups, with actor role, task
mode, fixture seed, and catalog claims declared in a profile table rather
than inferred from case prose. Claims that cannot unlock an operation in a
scenario's task mode or for its actor role are dropped, so no scenario shows
a grant that unlocks nothing.
- Deterministic fixture seeds and fake-agent plans: twelve authored plans for
the UX acceptance scenarios, derived plans for the rest. Derived plans only
invoke operations the run actually exposes, so any denial in a derived
transcript is a real policy result, not a scripting artefact.
- A run-artifact builder that executes each plan against the Phase 7C mock
control plane through the Phase 7D authorization engine and records the
ordered timeline (both channels), tool exposure, authorization records, an
immutable ten-domain state diff, and a parity verdict. Descriptor redaction
rules are applied at the artifact boundary so no raw secret can reach a
rendered record.
- Parity is judged in the runtime, never in a component. Phase 7E's per-case
result is carried through verbatim in its own labelled block and renders
"Not run" when no report is bundled.
Explorer (examples/phase7-explorer):
- Read-only surface over the frozen SDK: hash routing, scenario picker with
faceted filters, agent and control-plane transcript channels, and Context,
Authorization, State diff, and Parity inspector tabs. Tokens only; the
0.1.2 export surface is unchanged and the runtime is reached through the
deliberately package-local @paperclip-runner-local/phase7 alias.
- Checked-in inputs arrive as declared virtual modules, so the example
consumer keeps its boundary and fake mode does no network I/O.
Verification: 45 unit tests (index, plans, all-scenario runs and parity,
components, routes), 19 Playwright tests (route determinism, evidence routes,
credential boundary, keyboard paths, responsive), and the 24-image screenshot
acceptance set.
Fixes found while building: SDK badges overflowed at 390px inside disclosure
summaries; SDK badge capitalisation broke the label vocabulary; hash-change
deep links left the wrong mobile segment; screenshot capture leaked run state
between shots. All recorded as revisions in the interaction map.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>