Skip to content
Myr

Merge build/109-one-as-tester: one test principal at @repo/protocol/testing

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by oscabriel · committed by oscabriel · parents b8af4b1, e88697b · Browse files · 6 files+28 added−22 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

6 files+28 added−22 removed

  • tests:+6 added−21 removed
  • other:+22 added−1 removed

6 files+28 added−22 removed

modified:apps/cli/test/stdio.ts+1 added-9 removed
added:packages/protocol/src/testing.ts+20 added
modified:packages/protocol/test/cli.test.ts+2 added-1 removed
8 unmodified lines
9import { toCommand } from "../src/cli.ts";10import { Client, Contracts, ListAsks, SubmitAnswer } from "../src/contracts.ts";11import { CommitSha } from "../src/ids.ts";12import { StaleBase } from "../src/refusal.ts";13import { asTester, ask, base, main, path } from "./examples.ts";13import { asTester } from "../src/testing.ts";14import { ask, base, main, path } from "./examples.ts";1516const head = CommitSha.make("3333333333333333333333333333333333333333");1718/** Handlers that never refuse; `listAsks` echoes its project as the territory. */
139 unmodified lines
modified:packages/protocol/test/examples.ts+2 added-10 removed
modified:packages/protocol/test/mcp.ts+1 added-1 removed
4 unmodified lines
5import { RpcTest } from "effect/rpc";67import { Client, Contracts } from "../src/contracts.ts";8import { toToolkit } from "../src/mcp.ts";9import { asTester } from "./examples.ts";9import { asTester } from "../src/testing.ts";1011const endpoint = "http://localhost/mcp";1213const protocol = McpProtocol.v2026_07_28;
101 unmodified lines
modified:packages/protocol/package.json+2 added-1 removed
8 unmodified lines
9 "./mcp": "./src/mcp.ts",10 "./posture": "./src/posture.ts",11 "./principal": "./src/principal.ts",12 "./refusal": "./src/refusal.ts",13 "./render": "./src/render.ts"13 "./render": "./src/render.ts",14 "./testing": "./src/testing.ts"15 },16 "scripts": {17 "typecheck": "tsc --noEmit -p tsconfig.json",18 "test": "vitest run"
14 unmodified lines