mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-26 18:31:34 +01:00
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>
5.0 KiB
5.0 KiB
Native Runner Tutorials
The tutorials are cumulative and are always run from the repository root. Each tutorial starts with an explanation of what the phase is and what the phase proves.
Implemented phases
- Phase 0: standalone tracer — install the workspace, validate its Rust/TypeScript boundary and knowledge bundle, then run the deterministic Rust mock-core path and cross-language parity check.
- Phase 1: static PRP replay — validate the shared schema/fixture corpus, reduce a fixture in the CLI, and inspect the same final snapshot in the standalone browser page.
- Phase 2: local runner and fake harness — run a supervised Rust process, exercise scripted live scenarios, resolve requests, interrupt a turn, and confirm live/replay parity.
- Phase 3: break recovery on purpose — lose an ACK, drop the socket, restart the runner side, replay durable events, and inspect recovery diagnostics.
- Phase 4: run the skillless Codex driver — run a safe real-model task, inspect the exact context boundary, steer or interrupt it, and confirm one replay-safe result.
- Phase 4b: run the protocol demo server — exercise the server-only Codex boundary, canonical replay, typed controls, and reconnect with
curl. - Phase 4b: run the live Codex protocol console — chat with a live session in the browser, steer it, stop it three ways, answer its requests, change its goal, break its connection, and replay the record.
- Phase 5: run the SDK console and mini consumer — exercise the versioned public browser/React surface in two independent consumers against fake and real drivers.
- Phase 6: run the thin Paperclip adapter — prove mock/real conformance, run one feature-flagged local task, inspect replay/finalization, disable the kill switch, and verify legacy fallback.
- Phase 7: explore the capability contract and scenario explorer — prove the 106-case conformance suite, open the read-only browser explorer over the mock control plane, and run the focused verification set, all from a clean checkout with no Paperclip service or external eval repository.
- Phase 7I: chat with the mock control plane — send prompts to a Phase 7 scenario and watch the mock Paperclip activity for every turn: exposure, typed calls, denials, control-plane-owned actions, state diffs, wakes, and per-turn parity.
- Cumulative end-to-end tutorial — the shortest complete workflow available at the current phase.
Reference
- Architecture and dependency boundary
- PRP compatibility and versioning policy
- Phase 2 local protocol and supervision
- Phase 3 durable transport and recovery
- Phase 4 skillless Codex driver
- Phase 4b protocol and demo server
- Phase 4b live console
- Phase 5 browser SDK and reference console
- Phase 6 thin Paperclip adapter
- Phase 7 capability contract (generated)
- Phase 7 capability disposition
- Phase 7 mock ControlPlanePort
- Phase 7 semantic tool catalog
- Phase 7 authorization and exposure
- Phase 7 eval-derived conformance
- Phase 7 browser scenario explorer
- Phase 7I interactive scenario chat
- Phase 7 future binding boundary (Phase 8 / ACPX)
- Phase 7 verification commands
- Phase 7 scenario explorer UX interaction map
- Phase 7I mobile chat UX interaction map
- Engineering journal guide
- Dated shadcn/ui and AI Elements compatibility note
- Phase 4b live-console interaction map
- Phase 4b component decision record (shadcn/ui, AI Elements)
- Phase 5 component and SDK surface plan
- Phase 5 SDK extraction decision record
- Phase 6 thin Paperclip adapter boundary
- Package README
Phase 6 is implemented as a default-off server integration at the public package boundary. Production Paperclip UI integration remains deferred.