fix(runner): integrate consolidated Phase 7 tracks

Preserve the existing explorer while wiring the accepted mock, semantic, live, and issue-thread surfaces together. Keep fixture-only command capabilities separate from model-visible grants and split browser-safe exports from Node transports.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
DottaandPaperclip committed 2026-08-10 12:30:41 +00:00
1 parent c6d99430ee
commit fe231fbb7e
16 files changed
+119 -59

No files matched your search

+1
View File
@@ -3,3 +3,4 @@
/playwright-report/
/test-results/
/dist-phase7/
/dist-issue-thread/
+11
View File
@@ -118,6 +118,14 @@ and JSON content; see the protocol-server tutorial for direct `curl` examples.
| `test:phase5` | Run targeted browser-client, reducer-projection, and React component contract tests. |
| `test:browser:phase5` | Exercise both consumers with the fake driver, keyboard/a11y checks, reconnect/replay, measurements, and screenshots. |
| `record:phase5:codex` | Run both public consumers against a safe real Codex session and capture live screenshots. |
| `check:phase-07-contract` | Verify the generated capability, legacy MCP, and eval traceability contract. |
| `check:semantic-contracts` | Verify the provider-neutral semantic tool contract is current. |
| `trace:phase7` | Run the real runnerd/Codex semantic loop against the mock control plane. |
| `demo:phase7` | Start the Phase 7 scenario explorer over the mock control plane on `127.0.0.1:4183`. |
| `console:issue-thread` | Start the Paperclip-style issue thread on `127.0.0.1:4184`. |
| `test:phase7` | Run the scenario index, run-artifact, parity, explorer component, and route tests. |
| `test:browser:phase7` | Exercise both the scenario explorer and issue-thread browser contracts. |
| `record:phase7` | Record the twelve-route screenshot acceptance set at both viewports. |
| `browser:dev` | Start the standalone live/replay/recovery browser devtool. |
| `test:browser` | Exercise static replay and live scenarios, then capture temporary screenshots under ignored test output. |
| `verify` | Run the complete deterministic Phase 0 through Phase 5 acceptance sequence. |
@@ -142,6 +150,9 @@ and JSON content; see the protocol-server tutorial for direct `curl` examples.
- [Phase 5 SDK console tutorial](docs/tutorials/phase-05-sdk-console.md)
- [Phase 5 browser SDK reference](docs/phase-05-sdk.md)
- [Phase 5 component decision record](docs/design/phase-5-component-decisions.md)
- [Phase 7 semantic catalog and authorization](docs/phase-07-semantic-catalog.md)
- [Phase 7 live runnerd/Codex loop](docs/phase-07-live-runnerd-codex.md)
- [Phase 7 issue-thread UI](docs/phase-07-issue-thread-ui.md)
- [PRP compatibility/versioning policy](docs/protocol-compatibility.md)
- [Cumulative end-to-end tutorial](docs/tutorials/end-to-end.md)
- [Journal guide](docs/journal.md)
@@ -85,7 +85,7 @@ owns it.
```sh
# Deterministic fake-mode app (no provider process)
pnpm --filter @paperclipai/paperclip-runner console:phase7
pnpm --filter @paperclipai/paperclip-runner console:issue-thread
# Focused browser suite, including the axe gate on all 12 slugs × 2 viewports
pnpm --filter @paperclipai/paperclip-runner test:browser:phase7
+17 -4
View File
@@ -26,24 +26,30 @@
"README.md"
],
"scripts": {
"build": "pnpm run build:typescript && pnpm run build:rust && pnpm run build:browser && pnpm run build:phase5 && pnpm run build:phase7",
"build": "pnpm run build:typescript && pnpm run build:rust && pnpm run build:browser && pnpm run build:phase5 && pnpm run build:phase7 && pnpm run build:issue-thread",
"build:typescript": "pnpm run generate:protocol-types && tsc -p tsconfig.json",
"build:rust": "cargo build --manifest-path runner/Cargo.toml --locked --workspace",
"build:browser": "vite build --config vite.config.ts",
"build:phase5": "vite build --config vite.phase5.config.ts",
"build:phase7": "vite build --config vite.phase7.config.ts && node scripts/check-phase7-csp-bundle.mjs",
"build:issue-thread": "vite build --config vite.issue-thread.config.ts",
"generate:phase-07-contract": "node scripts/generate-phase-07-contract.mjs",
"check:phase-07-contract": "node scripts/generate-phase-07-contract.mjs --check",
"generate:semantic-contracts": "pnpm run build:typescript && node scripts/generate-semantic-contracts.mjs",
"check:semantic-contracts": "pnpm run build:typescript && node scripts/generate-semantic-contracts.mjs --check",
"typecheck": "pnpm run typecheck:typescript && pnpm run typecheck:rust && pnpm run typecheck:browser",
"typecheck:typescript": "pnpm run check:protocol-types && tsc -p tsconfig.json --noEmit",
"typecheck:rust": "cargo check --manifest-path runner/Cargo.toml --locked --workspace",
"typecheck:browser": "tsc -p tsconfig.browser.json --noEmit",
"test": "pnpm run build:phase2-binaries && pnpm run test:typescript && pnpm run test:rust && node --test scripts/check-forbidden-imports.test.mjs scripts/record-phase4-evidence.test.mjs scripts/validate-doc-links.test.mjs",
"test": "pnpm run build:phase2-binaries && pnpm run test:typescript && pnpm run test:rust && node --test scripts/check-forbidden-imports.test.mjs scripts/record-phase4-evidence.test.mjs scripts/validate-doc-links.test.mjs test/capability-contract.test.mjs",
"test:typescript": "vitest run",
"test:rust": "cargo test --manifest-path runner/Cargo.toml --locked --workspace",
"test:browser": "pnpm run build:typescript && pnpm run build:phase2-binaries && pnpm run build:browser && playwright test --config devtools/browser/playwright.config.ts",
"test:phase5": "vitest run src/browser/client.test.ts src/browser/transcript-model.test.ts src/react/public-contract.test.tsx",
"test:phase7": "vitest run src/phase7 examples/phase7-explorer",
"test:phase7": "vitest run src/phase7 src/semantic-tools/semantic-tools.test.ts src/mock-core/phase7-mock-control-plane-adapter.test.ts src/issue-thread/issue-thread.test.ts examples/phase7-explorer",
"test:browser:phase5": "pnpm run build:typescript && playwright test --config examples/playwright.config.ts",
"test:browser:phase7": "playwright test --config examples/playwright.phase7.config.ts",
"test:browser:phase7": "playwright test --config examples/playwright.phase7.config.ts && pnpm run test:browser:issue-thread",
"test:browser:issue-thread": "pnpm run build:typescript && pnpm run build:issue-thread && playwright test --config devtools/issue-thread/playwright.config.ts",
"record:phase5:codex": "pnpm run build:typescript && playwright test --config examples/playwright.real.config.ts",
"build:phase2-binaries": "cargo build --manifest-path runner/Cargo.toml --locked --workspace --bins",
"generate:protocol-types": "node scripts/generate-protocol-schema-module.mjs",
@@ -69,11 +75,17 @@
"trace:phase3": "pnpm run build:typescript && pnpm run build:phase2-binaries && node dist/cli/phase3-recovery.js",
"trace:phase4": "pnpm run build:typescript && node dist/cli/phase4-codex.js",
"trace:phase6": "pnpm run build:typescript && node dist/cli/phase6-paperclip.js",
"trace:phase7": "pnpm run build:typescript && cargo build --manifest-path runner/Cargo.toml --locked -p paperclip-runner-core --bin paperclip-runnerd && node dist/cli/phase7-live.js",
"console:issue-thread": "pnpm run build:typescript && vite --config vite.issue-thread.config.ts --host 127.0.0.1 --port 4184",
"demo:phase4b": "pnpm run build:typescript && node scripts/phase4b-demo-server.mjs",
"record:phase4b": "pnpm run build:typescript && node scripts/record-phase4b-evidence.mjs",
"record:phase4": "pnpm run build:typescript && node scripts/record-phase4-evidence.mjs",
"record:phase7": "node scripts/record-phase7-evidence.mjs",
"record:phase7i": "node scripts/record-phase7i-evidence.mjs",
"record:phase7:ui": "pnpm run build:typescript && pnpm run build:issue-thread && node scripts/record-phase7-ui-evidence.mjs",
"check:phase7:ui": "pnpm run build:typescript && pnpm run build:issue-thread && node scripts/record-phase7-ui-evidence.mjs --check",
"smoke:phase7:ui": "pnpm run build:typescript && cargo build --manifest-path runner/Cargo.toml --locked -p paperclip-runner-core --bin paperclip-runnerd && node scripts/phase7-issue-thread-smoke.mjs",
"record:phase7:ui:live": "pnpm run build:typescript && pnpm run build:issue-thread && cargo build --manifest-path runner/Cargo.toml --locked -p paperclip-runner-core --bin paperclip-runnerd && node scripts/record-phase7-ui-live-evidence.mjs",
"diagnose:phase3": "pnpm run trace:phase3",
"record:phase3": "pnpm run build:typescript && pnpm run build:phase2-binaries && node scripts/record-phase3-evidence.mjs",
"record:phase3:lost-ack": "pnpm run trace:phase3 -- --fault lost-ack --output knowledge/evidence/phase-03-lost-ack.json",
@@ -96,6 +108,7 @@
"@types/react-dom": "^19.2.3",
"@vitejs/plugin-react": "^4.7.0",
"ajv": "^8.20.0",
"axe-core": "^4.12.1",
"json-schema-to-ts": "^3.1.1",
"react": "^19.2.7",
"react-dom": "^19.2.7",
@@ -5,6 +5,7 @@ import { Phase7MockControlPlaneAdapter } from "../mock-core/phase7-mock-control-
import type { Phase7FixtureSeed, Phase7JsonValue } from "../mock-core/phase7-control-plane-types.js";
import { Phase7SemanticToolRuntime } from "../tools/phase7-semantic-tool-runtime.js";
import { Phase7CodexToolBinding, Phase7FakeAgentToolBinding } from "../tools/phase7-tool-bindings.js";
import { phase7FixtureRunCapabilities } from "../phase7/fixture-run-capabilities.js";
const GENERATED_HEADER = "# GENERATED FILE — DO NOT EDIT. Run pnpm generate:phase7-inventory.\n";
const PACKAGE_ROOT = resolve(import.meta.dirname, "../..");
@@ -230,6 +231,7 @@ async function runtimeFor(actorGrants: string[] = []) {
},
backendKind: "mock",
sourceInstanceId: "phase7-eval-suite",
capabilities: phase7FixtureRunCapabilities(actorGrants),
});
return {
adapter,
+7
View File
@@ -13,6 +13,8 @@ export * from "./native-session-runtime.js";
export * from "./drivers/codex/app-server-transport.js";
export * from "./drivers/codex/codex-app-server-driver.js";
export * from "./mock-core/mock-control-plane-adapter.js";
export * from "./mock-core/phase7-control-plane-types.js";
export * from "./mock-core/phase7-mock-control-plane-adapter.js";
export * from "./mock-core/phase4-codex-runner.js";
export * from "./mock-core/phase4b-demo-server.js";
export * from "./mock-core/phase4b-demo-manifests.js";
@@ -28,3 +30,8 @@ export * from "./tracer/phase0-runner.js";
export * from "./tracer/phase1-replay.js";
export * from "./tracer/phase2-live.js";
export * from "./tools/index.js";
export * as acceptedPhase7SemanticTools from "./semantic-tools/index.js";
export * from "./phase7/live-session.js";
export * from "./phase7/runnerd-codex-transport.js";
export { projectPhase7IssueThread } from "./issue-thread/live-projection.js";
export * as phase7IssueThread from "./issue-thread/index.js";
@@ -0,0 +1,49 @@
export * from "./scenario-explorer-types.js";
export type {
Phase7AuthorizationRecord,
Phase7SemanticToolDescriptor,
Phase7ToolTaskMode,
} from "../tools/phase7-semantic-tool-types.js";
export {
buildPhase7ScenarioIndex,
phase7ScenarioEntry,
phase7ScenarioProfile,
phase7ScenarioProfileCoverage,
type Phase7ScenarioProfile as Phase7ScenarioProfileShape,
type Phase7SeedKind,
} from "./scenario-index.js";
export {
phase7ScenarioFixture,
PHASE7_FIXTURE_ACTOR_ID,
PHASE7_FIXTURE_EPOCH_MS,
PHASE7_FIXTURE_PEER_ACTOR_ID,
PHASE7_FIXTURE_TASK_ID,
type Phase7ScenarioFixture,
} from "./scenario-fixtures.js";
export {
phase7ScenarioPlan,
CREATED_TASK_REF,
CREATED_TASK_REF_PATTERN,
type Phase7PlanStep,
type Phase7ScenarioPlan,
} from "./scenario-plan.js";
export { phase7RunScenario, type Phase7RunScenarioOptions } from "./scenario-runner.js";
export {
phase7ChatScript,
type Phase7ChatScript,
type Phase7ChatScriptTurn,
} from "./chat-script.js";
export {
phase7ReplayChatSession,
Phase7ChatSession,
type Phase7ChatSessionOptions,
} from "./chat-session.js";
export { phase7StateDiff } from "./state-diff.js";
export {
phase7EvalSuiteLookup,
phase7ScenarioParity,
phase7TurnParity,
type Phase7EvalSuiteCaseResult,
type Phase7EvalSuiteLookup,
} from "./scenario-parity.js";
export * from "./fixture-run-capabilities.js";
@@ -123,7 +123,7 @@ const AUTHORED_CHAT_SCRIPTS: Record<string, ChatScriptFactory> = {
command: {
kind: "resolve_human_input",
interactionId: CREATED_INTERACTION_REF(1),
outcome: "answered",
outcome: "accepted",
result: { selectedOptionIds: ["scope-a", "scope-c"] },
},
summary:
@@ -16,6 +16,7 @@ import {
snapshotOf,
} from "./scenario-execution.js";
import { phase7ContinuationWakePayload } from "./scenario-runner.js";
import { phase7FixtureRunCapabilities } from "./fixture-run-capabilities.js";
import {
phase7ScenarioParity,
phase7TurnParity,
@@ -143,7 +144,7 @@ export class Phase7ChatSession {
reason: entry.wakeReason,
payload: phase7ContinuationWakePayload(entry, fixture, mode),
},
capabilities: entry.scenarioClaims,
capabilities: phase7FixtureRunCapabilities(entry.scenarioClaims),
});
const runtime = new Phase7SemanticToolRuntime({
@@ -0,0 +1,17 @@
import { PHASE7_COMMAND_REQUIRED_CLAIMS } from "../mock-core/phase7-control-plane-types.js";
const PHASE7_FIXTURE_ADAPTER_CLAIMS = Object.freeze(
[...new Set(Object.values(PHASE7_COMMAND_REQUIRED_CLAIMS).flat())].sort(),
);
/**
* Gives package-owned Phase 7 fixtures the adapter claims needed to exercise
* the accepted mock control plane. Model-visible semantic grants remain the
* scenario claims; this union does not widen the tool catalog exposed to the
* fake agent or Codex.
*/
export function phase7FixtureRunCapabilities(
scenarioClaims: readonly string[],
): string[] {
return [...new Set([...scenarioClaims, ...PHASE7_FIXTURE_ADAPTER_CLAIMS])].sort();
}
+1 -48
View File
@@ -1,50 +1,3 @@
export * from "./scenario-explorer-types.js";
export type {
Phase7AuthorizationRecord,
Phase7SemanticToolDescriptor,
Phase7ToolTaskMode,
} from "../tools/phase7-semantic-tool-types.js";
export {
buildPhase7ScenarioIndex,
phase7ScenarioEntry,
phase7ScenarioProfile,
phase7ScenarioProfileCoverage,
type Phase7ScenarioProfile as Phase7ScenarioProfileShape,
type Phase7SeedKind,
} from "./scenario-index.js";
export {
phase7ScenarioFixture,
PHASE7_FIXTURE_ACTOR_ID,
PHASE7_FIXTURE_EPOCH_MS,
PHASE7_FIXTURE_PEER_ACTOR_ID,
PHASE7_FIXTURE_TASK_ID,
type Phase7ScenarioFixture,
} from "./scenario-fixtures.js";
export {
phase7ScenarioPlan,
CREATED_TASK_REF,
CREATED_TASK_REF_PATTERN,
type Phase7PlanStep,
type Phase7ScenarioPlan,
} from "./scenario-plan.js";
export { phase7RunScenario, type Phase7RunScenarioOptions } from "./scenario-runner.js";
export {
phase7ChatScript,
type Phase7ChatScript,
type Phase7ChatScriptTurn,
} from "./chat-script.js";
export {
phase7ReplayChatSession,
Phase7ChatSession,
type Phase7ChatSessionOptions,
} from "./chat-session.js";
export { phase7StateDiff } from "./state-diff.js";
export {
phase7EvalSuiteLookup,
phase7ScenarioParity,
phase7TurnParity,
type Phase7EvalSuiteCaseResult,
type Phase7EvalSuiteLookup,
} from "./scenario-parity.js";
export * from "./browser-index.js";
export * from "./live-session.js";
export * from "./runnerd-codex-transport.js";
@@ -20,6 +20,7 @@ import {
} from "./scenario-execution.js";
import { phase7StateDiff } from "./state-diff.js";
import { phase7ScenarioParity, type Phase7EvalSuiteLookup } from "./scenario-parity.js";
import { phase7FixtureRunCapabilities } from "./fixture-run-capabilities.js";
/**
* Executes one scenario against the Phase 7C mock control plane and the Phase
@@ -72,7 +73,7 @@ export async function phase7RunScenario(
reason: entry.wakeReason,
payload: phase7ContinuationWakePayload(entry, fixture, mode),
},
capabilities: entry.scenarioClaims,
capabilities: phase7FixtureRunCapabilities(entry.scenarioClaims),
});
const runtime = new Phase7SemanticToolRuntime({
@@ -12,12 +12,14 @@
"@paperclipai/paperclip-runner/browser": ["src/browser/index.ts"],
"@paperclipai/paperclip-runner/react": ["src/react/index.ts"],
"@paperclipai/paperclip-runner/styles.css": ["styles.css"],
"@paperclip-runner-local/phase7": ["src/phase7/index.ts"]
"@paperclip-runner-local/phase7": ["src/phase7/browser-index.ts"]
}
},
"include": [
"devtools/browser/src/**/*.ts",
"devtools/browser/src/**/*.tsx",
"devtools/issue-thread/src/**/*.ts",
"devtools/issue-thread/src/**/*.tsx",
"examples/*/src/**/*.ts",
"examples/*/src/**/*.tsx"
],
@@ -32,7 +32,7 @@ export default defineConfig({
},
{
find: "@paperclip-runner-local/phase7",
replacement: resolve(packageRoot, "src/phase7/index.ts"),
replacement: resolve(packageRoot, "src/phase7/browser-index.ts"),
},
],
},
+1 -1
View File
@@ -9,7 +9,7 @@ export default defineConfig({
resolve: {
alias: [
{ find: "@paperclipai/paperclip-runner/react", replacement: resolve(packageRoot, "src/react/index.ts") },
{ find: "@paperclip-runner-local/phase7", replacement: resolve(packageRoot, "src/phase7/index.ts") },
{ find: "@paperclip-runner-local/phase7", replacement: resolve(packageRoot, "src/phase7/browser-index.ts") },
],
},
test: {
+3
View File
@@ -444,6 +444,9 @@ importers:
ajv:
specifier: ^8.20.0
version: 8.20.0
axe-core:
specifier: ^4.12.1
version: 4.12.1
json-schema-to-ts:
specifier: ^3.1.1
version: 3.1.1