@orkestrel/scaffold 0.0.131 → 0.0.133

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/bin/main.js CHANGED
@@ -10,7 +10,7 @@ import { readdirSync } from "node:fs";
10
10
  import { parseArgs } from "node:util";
11
11
  var package_default = {
12
12
  name: "@orkestrel/scaffold",
13
- version: "0.0.131",
13
+ version: "0.0.133",
14
14
  description: "Scaffold workspaces with commands: new, audit, surface, repair, catalog, and overwrite.",
15
15
  keywords: [
16
16
  "audit",
@@ -102,27 +102,27 @@ var package_default = {
102
102
  "prepublishOnly": "npm run format:check && npm run lint:check && npm run check && npm run build && npm test && npm run test:templates && npm run test:distribution -- --mode release"
103
103
  },
104
104
  dependencies: {
105
- "@orkestrel/console": "^0.0.19",
106
- "@orkestrel/contract": "^0.0.22",
107
- "@orkestrel/emitter": "^0.0.15",
108
- "@orkestrel/markdown": "^0.0.20",
109
- "@orkestrel/process": "^0.0.18",
110
- "@orkestrel/template": "^0.0.13"
105
+ "@orkestrel/console": "^0.0.20",
106
+ "@orkestrel/contract": "^0.0.23",
107
+ "@orkestrel/emitter": "^0.0.16",
108
+ "@orkestrel/markdown": "^0.0.21",
109
+ "@orkestrel/process": "^0.0.19",
110
+ "@orkestrel/template": "^0.0.14"
111
111
  },
112
112
  devDependencies: {
113
113
  "@microsoft/api-extractor": "^7.60.1",
114
- "@orkestrel/browser": "^0.0.32",
115
- "@orkestrel/guide": "^0.0.30",
116
- "@orkestrel/html": "^0.0.15",
117
- "@orkestrel/probe": "^0.0.29",
118
- "@orkestrel/test": "^0.0.33",
114
+ "@orkestrel/browser": "^0.0.33",
115
+ "@orkestrel/guide": "^0.0.31",
116
+ "@orkestrel/html": "^0.0.16",
117
+ "@orkestrel/probe": "^0.0.30",
118
+ "@orkestrel/test": "^0.0.36",
119
119
  "@types/node": "^24.19.2",
120
120
  "@vitest/browser-playwright": "^5.1.0",
121
121
  "oxfmt": "^0.78.0",
122
122
  "oxlint": "^1.93.0",
123
123
  "playwright": "^1.64.1",
124
124
  "typescript": "^7.0.2",
125
- "vite": "^8.3.7",
125
+ "vite": "^8.3.8",
126
126
  "vitest": "^5.1.0"
127
127
  },
128
128
  engines: { "node": ">=22.18.0" }
@@ -91,18 +91,18 @@ The harness's own engine orchestrates: Claude Fable 5.2 or Claude Opus 5.5 in Cl
91
91
  - When no acceptance check reads a run's result anymore, stop the run.
92
92
  - When a verifier lane fails in its harness rather than in the gate, run the gate once yourself and read its exit code; write no comparator, snapshot, or retry chain to obtain evidence.
93
93
  - Keep valid receipts. Re-run a check only when a change to its inputs, configuration, environment, or claim could alter what it proved, and then run the narrowest check that covers the change. Never repeat a passing check to collect another receipt or to have every suite pass in one command; name the receipt that covers each check a brief does not rerun.
94
- - Ask the user only for a decision that is theirs: scope, the spend ceiling and stop line § Hold the plan names, a conflicting ruling, a credential, publication, or a commit or push the law reserves. Decide routine matters yourself, such as time and lane allowances, retries, and order, and report them, with time in whole minutes.
94
+ - Ask the user only for a decision that is theirs: scope, a product decision, a conflicting ruling, a credential, publication, or a commit or push the law reserves. Never ask the user to agree an estimate, a spend ceiling, a stop line, or a time allowance. Decide those yourself, with time and lane allowances, retries, and order, and report them in status, with time in whole minutes.
95
95
  - Never end a turn with work pending and nothing that will wake the session: run the work as a tracked background command or a child whose completion notifies, or schedule a wake. While a lane runs, continue independent work.
96
96
  - When nobody is awake to answer and a session waits on a child, arm a keep-alive and a limit on the wait, and name a peer session as the watchdog.
97
97
 
98
98
  ## Hold the plan
99
99
 
100
- - Open with the goal and acceptance criteria per `AGENTS.md` § Work loop, then estimate the scope: the units, the review and evidence each needs, and what stays out. When the estimate is large, agree with the user the estimate, the spend ceiling, and the stop line: how much lane time the work can take, and the point at which work stops and reports. Derive an estimate or a process cap from a measurement of the same command, execution shape, and toolchain, and state that measurement beside the figure, or state that none exists.
100
+ - Open with the goal and acceptance criteria per `AGENTS.md` § Work loop, then estimate the scope: the units, the review and evidence each needs, and what stays out. When the estimate is large, set the spend ceiling and the stop line yourself, sized to what the work's quality and performance need: how much lane time the work can take, and the point at which work stops and reports. Report all three in status. Derive an estimate or a process cap from a measurement of the same command, execution shape, and toolchain, and state that measurement beside the figure, or state that none exists.
101
101
  - When a measurement has more than one arm, price each arm in lane hours before ruling it in, and put that table first in the report that asks for the ruling.
102
102
  - Before each unit, name the plan step it serves. Cut a unit no step needs; set an unplanned idea aside in the plan and return to the step.
103
103
  - Add a tracked file only where the request, the plan, or a rule names it.
104
104
  - After every unit return, unexpected result, or user message, compare the work with the plan: mark what is done, restate the next step, and set aside what no longer serves the goal.
105
- - When the work outgrows its estimate, stop, re-estimate, and bring the user the choice to cut, defer, or extend before continuing.
105
+ - When the work outgrows its estimate, re-estimate, then cut, defer, or extend by what the goal's quality and performance need, and report the choice in status.
106
106
  - When the user questions the plan, test it against the evidence in hand: reopen it where the evidence disagrees and report what changed; where the evidence holds, answer with that evidence.
107
107
  - Answer a status question before dispatching more work, and close every report the same way: the goal, what is done against it, what is measured, what remains, and the next step.
108
108
 
@@ -110,6 +110,8 @@ The harness's own engine orchestrates: Claude Fable 5.2 or Claude Opus 5.5 in Cl
110
110
 
111
111
  - Size the effort to the task before spending: a lookup takes one lane, routed per § Routing, and only open-ended work with independent, high-value parts fans out, per § Parallelism.
112
112
  - Locate the evidence with short broad probes before any deep pass: a run of the shipped command, a census, a search. Go deep only on a defect or gap a run has shown, in one lane, with the narrowest instrument that answers it: a counting probe or a mutation.
113
+ - When work is experimental or its viability is open, settle viability first with throwaway probes and a thin end-to-end prototype under `tmp/probes/`, breadth-first, before any design's deep phase, any long measured run, or any build. Write each probe and prototype so its cases and assertions carry into the test, study, or journey it would become. A probe takes whatever leeway its question needs. When a unit adopts one, keep its cases and assertions and rewrite everything else to the rules, never copying it: names, placement, kind files, shared fixtures, and the test, study, or journey conventions. Review judges promoted code as it judges any other. A probe that answers no opens a design question before anything builds on it.
114
+ - When evidence needs a model's or a service's response, take it from a seeded `@orkestrel/study` scenario. Record the live run once, reach each trial and goal the question needs through `study execute` with `--seed <result>:<trial>:<goal>`, `--trial`, and `--goals`, replay it offline with `--replay` under `--prefix` or `--roles`, and drive a scripted provider where no recording holds the response. Start a live run only for a response no recording holds.
113
115
  - When a defect class can recur across packages, census the class across every package before a review of any one: a script lists the whole population, `scout` marks each listed row against the brief's explicit criteria, and `analyst` or the Orchestrator rules each marked row once and fixes it at its cause. A list made by hand is no population.
114
116
  - Define a class in a census by what the code does, never by how it spells it. Where a baseline build exists, run a seeded differential against it over the repair's input domain, and report a search's hits as a floor, never as the class.
115
117
  - Set every stop with what reopens it, and record both in the plan. At a re-examination, hold the stop unless a proposal names the condition it meets; a stop that names no condition passes only on the user's ruling. Before a continuation, record whether its unit repairs an admitted row or reopens the stopped seam.
@@ -41,60 +41,60 @@ Treat generated package identifiers, versions, layers, and dependency ranges as
41
41
 
42
42
  <!-- orkestrel:catalog -->
43
43
 
44
- | Package | Version | Layer | Runtime dependencies | Peer dependencies |
45
- | ----------------------- | --------- | ----- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
46
- | `@orkestrel/abort` | `0.0.16` | L1 | `@orkestrel/contract` `^0.0.22` | |
47
- | `@orkestrel/agent` | `0.0.40` | L5 | `@orkestrel/tool` `^0.0.22`, `@orkestrel/abort` `^0.0.16`, `@orkestrel/queue` `^0.0.21`, `@orkestrel/budget` `^0.0.17`, `@orkestrel/ndjson` `^0.0.16`, `@orkestrel/emitter` `^0.0.15`, `@orkestrel/timeout` `^0.0.16`, `@orkestrel/contract` `^0.0.22`, `@orkestrel/database` `^0.0.22`, `@orkestrel/workflow` `^0.0.27`, `@orkestrel/workspace` `^0.0.16` | |
48
- | `@orkestrel/brief` | `0.0.17` | L4 | `@orkestrel/reason` `^0.0.17`, `@orkestrel/emitter` `^0.0.15`, `@orkestrel/contract` `^0.0.22`, `@orkestrel/interpret` `^0.0.22` | |
49
- | `@orkestrel/browser` | `0.0.32` | L5 | `@orkestrel/mcp` `^0.0.42`, `@orkestrel/html` `^0.0.15`, `@orkestrel/pool` `^0.0.20`, `@orkestrel/tool` `^0.0.22`, `@orkestrel/codec` `^0.0.9`, `@orkestrel/router` `^0.0.20`, `@orkestrel/server` `^0.0.26`, `@orkestrel/emitter` `^0.0.15`, `@orkestrel/process` `^0.0.18`, `@orkestrel/contract` `^0.0.22`, `@orkestrel/markdown` `^0.0.20`, `@orkestrel/websocket` `^0.0.18` | |
50
- | `@orkestrel/budget` | `0.0.17` | L1 | `@orkestrel/contract` `^0.0.22` | |
51
- | `@orkestrel/capture` | `0.0.6` | L3 | `@orkestrel/process` `^0.0.18`, `@orkestrel/timeout` `^0.0.16`, `@orkestrel/contract` `^0.0.22` | `vite` `^8.3.7`, `vitest` `^4.1.12 \|\| ^5.1.0`, `playwright` `^1.61.0`, `@vitest/browser-playwright` `^4.1.12 \|\| ^5.0.5` |
52
- | `@orkestrel/codec` | `0.0.9` | L1 | `@orkestrel/contract` `^0.0.22` | |
53
- | `@orkestrel/console` | `0.0.19` | L2 | `@orkestrel/emitter` `^0.0.15`, `@orkestrel/contract` `^0.0.22` | |
54
- | `@orkestrel/contract` | `0.0.22` | L0 | | |
55
- | `@orkestrel/csv` | `0.0.13` | L2 | `@orkestrel/codec` `^0.0.9`, `@orkestrel/contract` `^0.0.22` | |
56
- | `@orkestrel/database` | `0.0.22` | L2 | `@orkestrel/sqlite` `^0.0.17`, `@orkestrel/emitter` `^0.0.15`, `@orkestrel/contract` `^0.0.22`, `@orkestrel/indexeddb` `^0.0.17` | |
57
- | `@orkestrel/emitter` | `0.0.15` | L1 | `@orkestrel/contract` `^0.0.22` | |
58
- | `@orkestrel/form` | `0.0.16` | L2 | `@orkestrel/emitter` `^0.0.15`, `@orkestrel/contract` `^0.0.22` | |
59
- | `@orkestrel/guide` | `0.0.30` | L3 | `@orkestrel/contract` `^0.0.22`, `@orkestrel/markdown` `^0.0.20` | |
60
- | `@orkestrel/html` | `0.0.15` | L1 | `@orkestrel/contract` `^0.0.22` | |
61
- | `@orkestrel/indexeddb` | `0.0.17` | L1 | `@orkestrel/contract` `^0.0.22` | |
62
- | `@orkestrel/interpret` | `0.0.22` | L3 | `@orkestrel/reason` `^0.0.17`, `@orkestrel/emitter` `^0.0.15`, `@orkestrel/contract` `^0.0.22`, `@orkestrel/template` `^0.0.13` | |
63
- | `@orkestrel/jsonrpc` | `0.0.2` | L1 | `@orkestrel/contract` `^0.0.22` | |
64
- | `@orkestrel/lsp` | `0.0.14` | L3 | `@orkestrel/emitter` `^0.0.15`, `@orkestrel/jsonrpc` `^0.0.2`, `@orkestrel/process` `^0.0.18`, `@orkestrel/contract` `^0.0.22` | |
65
- | `@orkestrel/markdown` | `0.0.20` | L2 | `@orkestrel/html` `^0.0.15`, `@orkestrel/contract` `^0.0.22` | |
66
- | `@orkestrel/mcp` | `0.0.42` | L4 | `@orkestrel/sse` `^0.0.13`, `@orkestrel/tool` `^0.0.22`, `@orkestrel/codec` `^0.0.9`, `@orkestrel/emitter` `^0.0.15`, `@orkestrel/jsonrpc` `^0.0.2`, `@orkestrel/process` `^0.0.18`, `@orkestrel/contract` `^0.0.22`, `@orkestrel/websocket` `^0.0.18` | `@orkestrel/router` `^0.0.20`, `@orkestrel/server` `^0.0.26` |
67
- | `@orkestrel/middleware` | `0.0.30` | L4 | `@orkestrel/abort` `^0.0.16`, `@orkestrel/budget` `^0.0.17`, `@orkestrel/timeout` `^0.0.16`, `@orkestrel/contract` `^0.0.22` | `@orkestrel/server` `^0.0.26`, `@orkestrel/database` `^0.0.22` |
68
- | `@orkestrel/msg` | `0.0.16` | L2 | `@orkestrel/codec` `^0.0.9`, `@orkestrel/contract` `^0.0.22` | |
69
- | `@orkestrel/ndjson` | `0.0.16` | L1 | `@orkestrel/contract` `^0.0.22` | |
70
- | `@orkestrel/ollama` | `0.0.34` | L6 | `@orkestrel/tool` `^0.0.22`, `@orkestrel/agent` `^0.0.40`, `@orkestrel/budget` `^0.0.17`, `@orkestrel/ndjson` `^0.0.16`, `@orkestrel/emitter` `^0.0.15`, `@orkestrel/process` `^0.0.18`, `@orkestrel/contract` `^0.0.22` | |
71
- | `@orkestrel/pool` | `0.0.20` | L2 | `@orkestrel/emitter` `^0.0.15`, `@orkestrel/contract` `^0.0.22` | |
72
- | `@orkestrel/probe` | `0.0.29` | L5 | `@orkestrel/lsp` `^0.0.14`, `@orkestrel/mcp` `^0.0.42`, `@orkestrel/pool` `^0.0.20`, `@orkestrel/tool` `^0.0.22`, `@orkestrel/emitter` `^0.0.15`, `@orkestrel/process` `^0.0.18`, `@orkestrel/timeout` `^0.0.16`, `@orkestrel/contract` `^0.0.22` | `vitest` `^4.1.12 \|\| ^5.1.0`, `typescript` `^6.0.3 \|\| ^7.0.2` |
73
- | `@orkestrel/process` | `0.0.18` | L2 | `@orkestrel/emitter` `^0.0.15`, `@orkestrel/contract` `^0.0.22` | |
74
- | `@orkestrel/program` | `0.0.20` | L4 | `@orkestrel/rater` `^0.0.21`, `@orkestrel/reason` `^0.0.17`, `@orkestrel/emitter` `^0.0.15`, `@orkestrel/contract` `^0.0.22`, `@orkestrel/qualifier` `^0.0.21` | |
75
- | `@orkestrel/qualifier` | `0.0.21` | L3 | `@orkestrel/reason` `^0.0.17`, `@orkestrel/emitter` `^0.0.15`, `@orkestrel/contract` `^0.0.22` | |
76
- | `@orkestrel/queue` | `0.0.21` | L3 | `@orkestrel/abort` `^0.0.16`, `@orkestrel/emitter` `^0.0.15`, `@orkestrel/timeout` `^0.0.16`, `@orkestrel/contract` `^0.0.22`, `@orkestrel/database` `^0.0.22` | |
77
- | `@orkestrel/rater` | `0.0.21` | L3 | `@orkestrel/reason` `^0.0.17`, `@orkestrel/emitter` `^0.0.15`, `@orkestrel/contract` `^0.0.22` | |
78
- | `@orkestrel/reason` | `0.0.17` | L2 | `@orkestrel/emitter` `^0.0.15`, `@orkestrel/contract` `^0.0.22` | |
79
- | `@orkestrel/relation` | `0.0.20` | L3 | `@orkestrel/emitter` `^0.0.15`, `@orkestrel/contract` `^0.0.22`, `@orkestrel/database` `^0.0.22` | |
80
- | `@orkestrel/router` | `0.0.20` | L2 | `@orkestrel/abort` `^0.0.16`, `@orkestrel/emitter` `^0.0.15`, `@orkestrel/contract` `^0.0.22` | |
81
- | `@orkestrel/scaffold` | `0.0.130` | L3 | `@orkestrel/console` `^0.0.19`, `@orkestrel/emitter` `^0.0.15`, `@orkestrel/process` `^0.0.18`, `@orkestrel/contract` `^0.0.22`, `@orkestrel/markdown` `^0.0.20`, `@orkestrel/template` `^0.0.13` | |
82
- | `@orkestrel/sea` | `0.0.22` | L3 | `@orkestrel/emitter` `^0.0.15`, `@orkestrel/process` `^0.0.18`, `@orkestrel/contract` `^0.0.22` | |
83
- | `@orkestrel/server` | `0.0.26` | L3 | `@orkestrel/abort` `^0.0.16`, `@orkestrel/codec` `^0.0.9`, `@orkestrel/router` `^0.0.20`, `@orkestrel/emitter` `^0.0.15`, `@orkestrel/timeout` `^0.0.16`, `@orkestrel/contract` `^0.0.22` | |
84
- | `@orkestrel/sqlite` | `0.0.17` | L1 | `@orkestrel/contract` `^0.0.22` | |
85
- | `@orkestrel/sse` | `0.0.13` | L2 | `@orkestrel/codec` `^0.0.9`, `@orkestrel/contract` `^0.0.22` | |
86
- | `@orkestrel/study` | `0.0.17` | L7 | `@orkestrel/tool` `^0.0.22`, `@orkestrel/abort` `^0.0.16`, `@orkestrel/agent` `^0.0.40`, `@orkestrel/budget` `^0.0.17`, `@orkestrel/ollama` `^0.0.34`, `@orkestrel/timeout` `^0.0.16`, `@orkestrel/contract` `^0.0.22` | |
87
- | `@orkestrel/table` | `0.0.15` | L2 | `@orkestrel/emitter` `^0.0.15`, `@orkestrel/contract` `^0.0.22` | |
88
- | `@orkestrel/template` | `0.0.13` | L2 | `@orkestrel/emitter` `^0.0.15`, `@orkestrel/contract` `^0.0.22` | |
89
- | `@orkestrel/terminal` | `0.0.24` | L3 | `@orkestrel/sse` `^0.0.13`, `@orkestrel/form` `^0.0.16`, `@orkestrel/console` `^0.0.19`, `@orkestrel/emitter` `^0.0.15`, `@orkestrel/contract` `^0.0.22`, `@orkestrel/database` `^0.0.22` | |
90
- | `@orkestrel/test` | `0.0.33` | L1 | `@orkestrel/contract` `^0.0.22` | `vitest` `^4.1.12 \|\| ^5.1.0`, `playwright` `^1.64.1` |
91
- | `@orkestrel/timeout` | `0.0.16` | L1 | `@orkestrel/contract` `^0.0.22` | |
92
- | `@orkestrel/tool` | `0.0.22` | L2 | `@orkestrel/emitter` `^0.0.15`, `@orkestrel/contract` `^0.0.22` | |
93
- | `@orkestrel/toolbox` | `0.0.29` | L6 | `@orkestrel/form` `^0.0.16`, `@orkestrel/tool` `^0.0.22`, `@orkestrel/agent` `^0.0.40`, `@orkestrel/server` `^0.0.26`, `@orkestrel/contract` `^0.0.22`, `@orkestrel/database` `^0.0.22`, `@orkestrel/relation` `^0.0.20`, `@orkestrel/terminal` `^0.0.24`, `@orkestrel/workflow` `^0.0.27`, `@orkestrel/workspace` `^0.0.16` | |
94
- | `@orkestrel/websocket` | `0.0.18` | L2 | `@orkestrel/emitter` `^0.0.15`, `@orkestrel/contract` `^0.0.22` | |
95
- | `@orkestrel/worker` | `0.0.21` | L4 | `@orkestrel/pool` `^0.0.20`, `@orkestrel/queue` `^0.0.21`, `@orkestrel/emitter` `^0.0.15`, `@orkestrel/contract` `^0.0.22`, `@orkestrel/database` `^0.0.22` | |
96
- | `@orkestrel/workflow` | `0.0.27` | L4 | `@orkestrel/abort` `^0.0.16`, `@orkestrel/queue` `^0.0.21`, `@orkestrel/budget` `^0.0.17`, `@orkestrel/emitter` `^0.0.15`, `@orkestrel/timeout` `^0.0.16`, `@orkestrel/contract` `^0.0.22`, `@orkestrel/database` `^0.0.22` | |
97
- | `@orkestrel/workspace` | `0.0.16` | L3 | `@orkestrel/emitter` `^0.0.15`, `@orkestrel/contract` `^0.0.22`, `@orkestrel/database` `^0.0.22` | |
44
+ | Package | Version | Layer | Runtime dependencies | Peer dependencies |
45
+ | ----------------------- | --------- | ----- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
46
+ | `@orkestrel/abort` | `0.0.17` | L1 | `@orkestrel/contract` `^0.0.23` | |
47
+ | `@orkestrel/agent` | `0.0.41` | L5 | `@orkestrel/tool` `^0.0.23`, `@orkestrel/abort` `^0.0.17`, `@orkestrel/queue` `^0.0.22`, `@orkestrel/budget` `^0.0.18`, `@orkestrel/ndjson` `^0.0.17`, `@orkestrel/emitter` `^0.0.16`, `@orkestrel/timeout` `^0.0.17`, `@orkestrel/contract` `^0.0.23`, `@orkestrel/database` `^0.0.23`, `@orkestrel/workflow` `^0.0.28`, `@orkestrel/workspace` `^0.0.17` | |
48
+ | `@orkestrel/brief` | `0.0.18` | L4 | `@orkestrel/reason` `^0.0.18`, `@orkestrel/emitter` `^0.0.16`, `@orkestrel/contract` `^0.0.23`, `@orkestrel/interpret` `^0.0.23` | |
49
+ | `@orkestrel/browser` | `0.0.33` | L5 | `@orkestrel/mcp` `^0.0.43`, `@orkestrel/html` `^0.0.16`, `@orkestrel/pool` `^0.0.21`, `@orkestrel/tool` `^0.0.23`, `@orkestrel/codec` `^0.0.10`, `@orkestrel/router` `^0.0.21`, `@orkestrel/server` `^0.0.27`, `@orkestrel/emitter` `^0.0.16`, `@orkestrel/process` `^0.0.19`, `@orkestrel/contract` `^0.0.23`, `@orkestrel/markdown` `^0.0.21`, `@orkestrel/websocket` `^0.0.19` | |
50
+ | `@orkestrel/budget` | `0.0.18` | L1 | `@orkestrel/contract` `^0.0.23` | |
51
+ | `@orkestrel/capture` | `0.0.7` | L3 | `@orkestrel/process` `^0.0.19`, `@orkestrel/timeout` `^0.0.17`, `@orkestrel/contract` `^0.0.23` | `vite` `^8.3.8`, `vitest` `^4.1.12 \|\| ^5.1.0`, `playwright` `^1.61.0`, `@vitest/browser-playwright` `^4.1.12 \|\| ^5.0.5` |
52
+ | `@orkestrel/codec` | `0.0.10` | L1 | `@orkestrel/contract` `^0.0.23` | |
53
+ | `@orkestrel/console` | `0.0.20` | L2 | `@orkestrel/emitter` `^0.0.16`, `@orkestrel/contract` `^0.0.23` | |
54
+ | `@orkestrel/contract` | `0.0.23` | L0 | | |
55
+ | `@orkestrel/csv` | `0.0.14` | L2 | `@orkestrel/codec` `^0.0.10`, `@orkestrel/contract` `^0.0.23` | |
56
+ | `@orkestrel/database` | `0.0.23` | L2 | `@orkestrel/sqlite` `^0.0.18`, `@orkestrel/emitter` `^0.0.16`, `@orkestrel/contract` `^0.0.23`, `@orkestrel/indexeddb` `^0.0.18` | |
57
+ | `@orkestrel/emitter` | `0.0.16` | L1 | `@orkestrel/contract` `^0.0.23` | |
58
+ | `@orkestrel/form` | `0.0.17` | L2 | `@orkestrel/emitter` `^0.0.16`, `@orkestrel/contract` `^0.0.23` | |
59
+ | `@orkestrel/guide` | `0.0.31` | L3 | `@orkestrel/contract` `^0.0.23`, `@orkestrel/markdown` `^0.0.21` | |
60
+ | `@orkestrel/html` | `0.0.16` | L1 | `@orkestrel/contract` `^0.0.23` | |
61
+ | `@orkestrel/indexeddb` | `0.0.18` | L1 | `@orkestrel/contract` `^0.0.23` | |
62
+ | `@orkestrel/interpret` | `0.0.23` | L3 | `@orkestrel/reason` `^0.0.18`, `@orkestrel/emitter` `^0.0.16`, `@orkestrel/contract` `^0.0.23`, `@orkestrel/template` `^0.0.14` | |
63
+ | `@orkestrel/jsonrpc` | `0.0.3` | L1 | `@orkestrel/contract` `^0.0.23` | |
64
+ | `@orkestrel/lsp` | `0.0.15` | L3 | `@orkestrel/emitter` `^0.0.16`, `@orkestrel/jsonrpc` `^0.0.3`, `@orkestrel/process` `^0.0.19`, `@orkestrel/contract` `^0.0.23` | |
65
+ | `@orkestrel/markdown` | `0.0.21` | L2 | `@orkestrel/html` `^0.0.16`, `@orkestrel/contract` `^0.0.23` | |
66
+ | `@orkestrel/mcp` | `0.0.43` | L4 | `@orkestrel/sse` `^0.0.14`, `@orkestrel/tool` `^0.0.23`, `@orkestrel/codec` `^0.0.10`, `@orkestrel/emitter` `^0.0.16`, `@orkestrel/jsonrpc` `^0.0.3`, `@orkestrel/process` `^0.0.19`, `@orkestrel/contract` `^0.0.23`, `@orkestrel/websocket` `^0.0.19` | `@orkestrel/router` `^0.0.21`, `@orkestrel/server` `^0.0.27` |
67
+ | `@orkestrel/middleware` | `0.0.31` | L4 | `@orkestrel/abort` `^0.0.17`, `@orkestrel/budget` `^0.0.18`, `@orkestrel/timeout` `^0.0.17`, `@orkestrel/contract` `^0.0.23` | `@orkestrel/server` `^0.0.27`, `@orkestrel/database` `^0.0.23` |
68
+ | `@orkestrel/msg` | `0.0.17` | L2 | `@orkestrel/codec` `^0.0.10`, `@orkestrel/contract` `^0.0.23` | |
69
+ | `@orkestrel/ndjson` | `0.0.17` | L1 | `@orkestrel/contract` `^0.0.23` | |
70
+ | `@orkestrel/ollama` | `0.0.35` | L6 | `@orkestrel/tool` `^0.0.23`, `@orkestrel/agent` `^0.0.41`, `@orkestrel/budget` `^0.0.18`, `@orkestrel/ndjson` `^0.0.17`, `@orkestrel/emitter` `^0.0.16`, `@orkestrel/process` `^0.0.19`, `@orkestrel/contract` `^0.0.23` | |
71
+ | `@orkestrel/pool` | `0.0.21` | L2 | `@orkestrel/emitter` `^0.0.16`, `@orkestrel/contract` `^0.0.23` | |
72
+ | `@orkestrel/probe` | `0.0.30` | L5 | `@orkestrel/lsp` `^0.0.15`, `@orkestrel/mcp` `^0.0.43`, `@orkestrel/pool` `^0.0.21`, `@orkestrel/tool` `^0.0.23`, `@orkestrel/emitter` `^0.0.16`, `@orkestrel/process` `^0.0.19`, `@orkestrel/timeout` `^0.0.17`, `@orkestrel/contract` `^0.0.23` | `vitest` `^4.1.12 \|\| ^5.1.0`, `typescript` `^6.0.3 \|\| ^7.0.2` |
73
+ | `@orkestrel/process` | `0.0.19` | L2 | `@orkestrel/emitter` `^0.0.16`, `@orkestrel/contract` `^0.0.23` | |
74
+ | `@orkestrel/program` | `0.0.21` | L4 | `@orkestrel/rater` `^0.0.22`, `@orkestrel/reason` `^0.0.18`, `@orkestrel/emitter` `^0.0.16`, `@orkestrel/contract` `^0.0.23`, `@orkestrel/qualifier` `^0.0.22` | |
75
+ | `@orkestrel/qualifier` | `0.0.22` | L3 | `@orkestrel/reason` `^0.0.18`, `@orkestrel/emitter` `^0.0.16`, `@orkestrel/contract` `^0.0.23` | |
76
+ | `@orkestrel/queue` | `0.0.22` | L3 | `@orkestrel/abort` `^0.0.17`, `@orkestrel/emitter` `^0.0.16`, `@orkestrel/timeout` `^0.0.17`, `@orkestrel/contract` `^0.0.23`, `@orkestrel/database` `^0.0.23` | |
77
+ | `@orkestrel/rater` | `0.0.22` | L3 | `@orkestrel/reason` `^0.0.18`, `@orkestrel/emitter` `^0.0.16`, `@orkestrel/contract` `^0.0.23` | |
78
+ | `@orkestrel/reason` | `0.0.18` | L2 | `@orkestrel/emitter` `^0.0.16`, `@orkestrel/contract` `^0.0.23` | |
79
+ | `@orkestrel/relation` | `0.0.21` | L3 | `@orkestrel/emitter` `^0.0.16`, `@orkestrel/contract` `^0.0.23`, `@orkestrel/database` `^0.0.23` | |
80
+ | `@orkestrel/router` | `0.0.21` | L2 | `@orkestrel/abort` `^0.0.17`, `@orkestrel/emitter` `^0.0.16`, `@orkestrel/contract` `^0.0.23` | |
81
+ | `@orkestrel/scaffold` | `0.0.132` | L3 | `@orkestrel/console` `^0.0.20`, `@orkestrel/emitter` `^0.0.16`, `@orkestrel/process` `^0.0.19`, `@orkestrel/contract` `^0.0.23`, `@orkestrel/markdown` `^0.0.21`, `@orkestrel/template` `^0.0.14` | |
82
+ | `@orkestrel/sea` | `0.0.23` | L3 | `@orkestrel/emitter` `^0.0.16`, `@orkestrel/process` `^0.0.19`, `@orkestrel/contract` `^0.0.23` | |
83
+ | `@orkestrel/server` | `0.0.27` | L3 | `@orkestrel/abort` `^0.0.17`, `@orkestrel/codec` `^0.0.10`, `@orkestrel/router` `^0.0.21`, `@orkestrel/emitter` `^0.0.16`, `@orkestrel/timeout` `^0.0.17`, `@orkestrel/contract` `^0.0.23` | |
84
+ | `@orkestrel/sqlite` | `0.0.18` | L1 | `@orkestrel/contract` `^0.0.23` | |
85
+ | `@orkestrel/sse` | `0.0.14` | L2 | `@orkestrel/codec` `^0.0.10`, `@orkestrel/contract` `^0.0.23` | |
86
+ | `@orkestrel/study` | `0.0.18` | L7 | `@orkestrel/tool` `^0.0.23`, `@orkestrel/abort` `^0.0.17`, `@orkestrel/agent` `^0.0.41`, `@orkestrel/budget` `^0.0.18`, `@orkestrel/ollama` `^0.0.35`, `@orkestrel/timeout` `^0.0.17`, `@orkestrel/contract` `^0.0.23` | |
87
+ | `@orkestrel/table` | `0.0.16` | L2 | `@orkestrel/emitter` `^0.0.16`, `@orkestrel/contract` `^0.0.23` | |
88
+ | `@orkestrel/template` | `0.0.14` | L2 | `@orkestrel/emitter` `^0.0.16`, `@orkestrel/contract` `^0.0.23` | |
89
+ | `@orkestrel/terminal` | `0.0.25` | L3 | `@orkestrel/sse` `^0.0.14`, `@orkestrel/form` `^0.0.17`, `@orkestrel/console` `^0.0.20`, `@orkestrel/emitter` `^0.0.16`, `@orkestrel/contract` `^0.0.23`, `@orkestrel/database` `^0.0.23` | |
90
+ | `@orkestrel/test` | `0.0.36` | L1 | `@orkestrel/contract` `^0.0.23` | `vitest` `^4.1.12 \|\| ^5.1.0`, `playwright` `^1.65.0` |
91
+ | `@orkestrel/timeout` | `0.0.17` | L1 | `@orkestrel/contract` `^0.0.23` | |
92
+ | `@orkestrel/tool` | `0.0.23` | L2 | `@orkestrel/emitter` `^0.0.16`, `@orkestrel/contract` `^0.0.23` | |
93
+ | `@orkestrel/toolbox` | `0.0.30` | L6 | `@orkestrel/form` `^0.0.17`, `@orkestrel/tool` `^0.0.23`, `@orkestrel/agent` `^0.0.41`, `@orkestrel/server` `^0.0.27`, `@orkestrel/contract` `^0.0.23`, `@orkestrel/database` `^0.0.23`, `@orkestrel/relation` `^0.0.21`, `@orkestrel/terminal` `^0.0.25`, `@orkestrel/workflow` `^0.0.28`, `@orkestrel/workspace` `^0.0.17` | |
94
+ | `@orkestrel/websocket` | `0.0.19` | L2 | `@orkestrel/emitter` `^0.0.16`, `@orkestrel/contract` `^0.0.23` | |
95
+ | `@orkestrel/worker` | `0.0.22` | L4 | `@orkestrel/pool` `^0.0.21`, `@orkestrel/queue` `^0.0.22`, `@orkestrel/emitter` `^0.0.16`, `@orkestrel/contract` `^0.0.23`, `@orkestrel/database` `^0.0.23` | |
96
+ | `@orkestrel/workflow` | `0.0.28` | L4 | `@orkestrel/abort` `^0.0.17`, `@orkestrel/queue` `^0.0.22`, `@orkestrel/budget` `^0.0.18`, `@orkestrel/emitter` `^0.0.16`, `@orkestrel/timeout` `^0.0.17`, `@orkestrel/contract` `^0.0.23`, `@orkestrel/database` `^0.0.23` | |
97
+ | `@orkestrel/workspace` | `0.0.17` | L3 | `@orkestrel/emitter` `^0.0.16`, `@orkestrel/contract` `^0.0.23`, `@orkestrel/database` `^0.0.23` | |
98
98
 
99
99
  <!-- /orkestrel:catalog -->
100
100
 
@@ -180,6 +180,11 @@ A test that spawns a process, packs, installs, or drives a real build is a proof
180
180
  `.claude/rules/workspace.md` § Test project matrix places.
181
181
  - Keep a study's developmental selection and its untouched confirmation as separate evidence
182
182
  populations, and withhold expected outputs and population membership from the run.
183
+ - Keep the `studies` project short enough to run with every unit that touches a study: drive it from
184
+ seeded, replayed, or scripted runs, and move a full-schedule rehearsal out of it into an on-demand
185
+ script outside every chain, per `.claude/rules/quality.md` § Performance.
186
+ - In a study test file, record each sealed result once, before its cases, and read it from every
187
+ case that needs it; never record a result per case.
183
188
  - Put in `studies` only the proofs the `@orkestrel/study` engine drives. Place a slow end-to-end proof of
184
189
  the package's own features that no study engine drives, such as its built executable run against
185
190
  a fixture workspace, as an integration test under § Cross-cutting proofs. Place it by the scope it
@@ -21,7 +21,7 @@ import {
21
21
  } from 'node:fs'
22
22
  import { dirname, isAbsolute, join, relative, resolve as resolvePath, sep } from 'node:path'
23
23
 
24
- export function hasAsciiUrlControl(value: string): boolean {
24
+ export function hasASCIIURLControl(value: string): boolean {
25
25
  for (const character of value) {
26
26
  const code = character.codePointAt(0)
27
27
  if (code !== undefined && (code <= 0x1f || code === 0x7f)) return true
@@ -468,7 +468,7 @@ export function environmentPathError(owner: string, target: string): string | un
468
468
 
469
469
  export function environmentSourceError(owner: string, source: string): string | undefined {
470
470
  const normalizedSource = source.replaceAll('\\', '/')
471
- if (hasAsciiUrlControl(normalizedSource)) {
471
+ if (hasASCIIURLControl(normalizedSource)) {
472
472
  return 'Environment module URLs cannot contain ASCII controls'
473
473
  }
474
474
  const [sourcePath] = normalizedSource.split(/[?#]/)
@@ -273,7 +273,7 @@ The core supplies the entities a browser session and an agent use. Its host-spec
273
273
  | `BROWSER_DEFAULT_VIEWPORT_HEIGHT` | const | `720` | Sets the default viewport height, `720` pixels. |
274
274
  | `BROWSER_DEFAULT_VIEWPORT_WIDTH` | const | `1280` | Sets the default viewport width, `1280` pixels. |
275
275
  | `BROWSER_FRAME_WORLD_NAME` | const | `"__orkestrelBrowserFrame"` | Names the isolated world used for iframe evaluation, `'__orkestrelBrowserFrame'`. |
276
- | `BROWSER_HAR_CREATOR` | const | `Readonly<{ name: "@orkestrel/browser"; version: "0.0.32"; }>` | Names the tool identity embedded in HAR 1.2 documents. |
276
+ | `BROWSER_HAR_CREATOR` | const | `Readonly<{ name: "@orkestrel/browser"; version: "0.0.33"; }>` | Names the tool identity embedded in HAR 1.2 documents. |
277
277
  | `BROWSER_KEY_MODIFIERS` | const | `Readonly<Record<string, number>>` | Maps a canonical modifier name to its CDP Input modifier bit value. |
278
278
  | `BROWSER_MOUSE_BUTTON_MASKS` | const | `Readonly<Record<BrowserMouseButton, number>>` | Maps each public mouse button to its CDP Input pressed-button bit value. |
279
279
  | `BROWSER_NAVIGATION_REASONS` | const | `readonly BrowserNavigationReason[]` | Lists every CDP `Page.ClientNavigationReason` value a page accepts as a navigation's reason, as of Chromium 141; a page reads any other reason as undefined. |
@@ -521,6 +521,7 @@ Declarative constructors for the `ContractShape` union (`src/core/shapers.ts`).
521
521
  | `stringShape` | function | `(options?: StringShapeOptions) => StringShape` | Builds a string `StringShape`. |
522
522
  | `numberShape` | function | `(options?: NumberShapeOptions) => NumberShape` | Builds a numeric `NumberShape`. |
523
523
  | `integerShape` | function | `(options?: Omit<NumberShapeOptions, 'integer'>) => NumberShape` | Builds an integer `NumberShape` — forces `integer: true`. |
524
+ | `dateShape` | function | `(options?: Omit<StringShapeOptions, 'date' \| 'pattern'>) => StringShape` | Builds a calendar-date `StringShape` — forces `date: true`. |
524
525
  | `booleanShape` | function | `(options?: BooleanShapeOptions) => BooleanShape` | Builds a `BooleanShape`. |
525
526
  | `nullShape` | function | `(options?: NullShapeOptions) => NullShape` | Builds a `NullShape`. |
526
527
  | `literalShape` | function | `<const T extends readonly LiteralValue[]>(values: T, options?: LiteralShapeOptions) => LiteralShape<Readonly<T>>` | Builds a literal shape from a fixed set of primitive values. |
@@ -541,6 +542,23 @@ An ordinary `oneOfShape` parser returns the input itself when exactly one arm ac
541
542
 
542
543
  **String bounds count code points.** `min` and `max` on a string count what the `minLength` and `maxLength` the shape emits count, so one astral character has a length of one and a lone surrogate counts as one. `stringOf` and the two reports share `matchesStringLength`, which decides from `.length` where it can: a string holds at most `.length` code points and at least half that. Only where a bound sits between those two figures does it call `computeSurrogatePairs`, which stops as soon as the pairs it has found settle the bound.
543
544
 
545
+ **Calendar dates.** `dateShape` builds a string shape whose guard and parser admit exactly a calendar-valid `YYYY-MM-DD` and coerce nothing, so `2026-02-30`, `2026-1-10`, a date-time, and a `Date` object all refuse. A refused date reports a `'constraint'` fault with `expected: 'date'` and `constraint: 'date'`, as a fraction against `integerShape` reports `'integer'`, and the emitted schema carries `format: 'date'` with no `pattern`. A strict `schemaToShape` reads that schema back as the date shape; a lenient one keeps `format` an annotation and builds a plain string shape. A string shape that declares both `date` and `pattern`, or bounds that exclude length 10, refuses at build.
546
+
547
+ This compiles a date field and shows what it admits, refuses, reports, and emits.
548
+
549
+ ```ts
550
+ import { createContract, dateShape, objectShape } from '@orkestrel/contract'
551
+
552
+ const booking = createContract(objectShape({ arrival: dateShape() }))
553
+
554
+ booking.is({ arrival: '2024-02-29' }) // true
555
+ booking.is({ arrival: '2026-02-29' }) // false — 2026 is not a leap year
556
+ booking.parse({ arrival: '2026-1-10' }) // undefined
557
+ booking.audit({ arrival: '2026-02-30' })
558
+ // [{ reason: 'constraint', path: ['arrival'], expected: 'date', constraint: 'date', received: '"2026-02-30"' }]
559
+ booking.schema.properties?.arrival // { type: 'string', format: 'date' }
560
+ ```
561
+
544
562
  **Field defaults.** `optionalShape(inner, { default })` lets a declaration state what an absent field reads as. The compiled parser fills the default where the property is absent or `undefined`, through the inner parser, on a fresh copy when the default is a container, so nested defaults apply and two parses share no tree. A default on a `jsonShape`, a `rawShape`, or a union inner reaches you as a frozen copy, because those parsers return their input by identity. `is`, `audit`, `explain`, and `generate` do not read a default: an absent optional stays canonical, so `is({})` is `true`, and `generate` keeps omitting the key or drawing from `inner`. The emitted property schema carries the keyword. `null` is a value and fills; a present `undefined` is a `structure` refusal, because absence is not a value.
545
563
 
546
564
  The builder and `cloneShape` own a frozen copy of a value that passes `isJSONValue`, so a stored shape survives a JSON round trip. Every compiler refuses a default its `inner` guard refuses, refinements included, with code `structure` at `[…path, 'default']`: a restored declaration never met a builder, and `validateShape` judges structure only. A shape holding a default builds the guard family for that check whichever artifact you read first; a shape holding none builds what it always built.
@@ -578,7 +596,7 @@ The precedence below assumes a readable node and a lenient conversion. A readabl
578
596
 
579
597
  A lenient conversion carries a property's `default` when the key is not in `required`, the object is closed with no union ancestor, and the value is one the property's primitive or literal guard accepts. It drops every other `default`, because a carried default that cannot compile would end the conversion's totality.
580
598
 
581
- **Strict conversion.** `schemaToShape(schema, { strict: true })` is the door for a foreign schema. It refuses, with code `structure` and the keyword's path, what the lenient walk would widen or read past: every node the walk would widen to `rawShape` (an empty schema, a `type` typo at any depth, a non-record child, an array with no `items`, exhausted depth, and a cycle), a keyword outside `STRICT_SCHEMA_KEYWORDS` (`$ref`, `$defs`, `definitions`, `const`, `allOf`, `$anchor`, `$dynamicAnchor`, the `content*` keywords, `nullable`, `discriminator`, `example`, `patternProperties`, `propertyNames`, and `prefixItems`), `pattern` and `format`, which no compiled shape asserts, a malformed keyword value or annotation, a boolean schema, an `enum` entry that is neither a finite primitive nor `null`, a contradictory or malformed bound, a keyword the node's type never reads, a `type` beside a union, a pair of keywords only one of which the walk would keep, an enum member its `type` contradicts, a `required` name not in `properties`, breadth past `INFER_BREADTH_LIMIT`, and a `default` with no optional property to fill or one its schema refuses. `oneOf` keeps exactly-one here, because this walk reads every keyword that could keep two arms apart. An object with no `additionalProperties` closes, unlike JSON Schema's own default, because a misspelled key at a foreign door must reach `audit`; an explicit `true` or schema value stays open. Below a `oneOf` it refuses instead, at any depth, because closing it could change which arms match: two arms declaring optional `a` and `b` both match `{ a: 'x' }` as written, and only one does once closed. It accepts the annotations a schema generator emits, which assert nothing and which the shape drops: `title`, `$schema`, `$id`, and `$comment` when strings, `examples` when an array, and `deprecated`, `readOnly`, and `writeOnly` when booleans. A default under a union or on an open object refuses with `placement` at its path in the schema, ending `properties`, the key, and `default`.
599
+ **Strict conversion.** `schemaToShape(schema, { strict: true })` is the door for a foreign schema. It refuses, with code `structure` and the keyword's path, what the lenient walk would widen or read past: every node the walk would widen to `rawShape` (an empty schema, a `type` typo at any depth, a non-record child, an array with no `items`, exhausted depth, and a cycle), a keyword outside `STRICT_SCHEMA_KEYWORDS` (`$ref`, `$defs`, `definitions`, `const`, `allOf`, `$anchor`, `$dynamicAnchor`, the `content*` keywords, `nullable`, `discriminator`, `example`, `patternProperties`, `propertyNames`, and `prefixItems`), `pattern` and every `format` but `'date'` on a string node, which no compiled shape asserts, a `format: 'date'` whose length bounds exclude length 10, a malformed keyword value or annotation, a boolean schema, an `enum` entry that is neither a finite primitive nor `null`, a contradictory or malformed bound, a keyword the node's type never reads, a `type` beside a union, a pair of keywords only one of which the walk would keep, an enum member its `type` contradicts, a `required` name not in `properties`, breadth past `INFER_BREADTH_LIMIT`, and a `default` with no optional property to fill or one its schema refuses. `oneOf` keeps exactly-one here, because this walk reads every keyword that could keep two arms apart. An object with no `additionalProperties` closes, unlike JSON Schema's own default, because a misspelled key at a foreign door must reach `audit`; an explicit `true` or schema value stays open. Below a `oneOf` it refuses instead, at any depth, because closing it could change which arms match: two arms declaring optional `a` and `b` both match `{ a: 'x' }` as written, and only one does once closed. It accepts the annotations a schema generator emits, which assert nothing and which the shape drops: `title`, `$schema`, `$id`, and `$comment` when strings, `examples` when an array, and `deprecated`, `readOnly`, and `writeOnly` when booleans. A default under a union or on an open object refuses with `placement` at its path in the schema, ending `properties`, the key, and `default`.
582
600
 
583
601
  **Round-trip law:** for any READABLE value `v` — including `NaN`, `±Infinity`, a `Map`, a `Set`, a class instance, a function, a symbol, a bigint, and readable cyclic hosts — `compileGuard(schemaToShape(valueToSchema(v)))(v) === true`, with widening as the ONLY source of looseness, never narrowing. An unreadable host is refused before the law produces a schema. The law otherwise retains its three limits: JSON absence, `Date` serialization, and unstable reads between inference and validation. A widened node cannot be auto-generated: `createContract(schemaToShape(x)).generate()` throws when the conversion widened anywhere; its parser returns `undefined` for readable invalid input and propagates the shared coded refusal when a required read fails.
584
602
 
@@ -602,7 +620,7 @@ what the resolution produces.
602
620
  | Name | Kind | Signature | Summary |
603
621
  | ---------------------- | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
604
622
  | `ContractShape` | type | `StringShape \| NumberShape \| BooleanShape \| NullShape \| LiteralShape \| ArrayShape \| ObjectShape \| UnionShape \| OptionalShape \| NullableShape \| JSONShape \| ShapeShape \| RawShape` | Describes a value declaratively — a declaration the shape builders build and the compilers turn into a guard, a parser, a JSON Schema, and a generator. |
605
- | `StringShape` | interface | `{ category, min?, max?, pattern?, description? }` | Describes a string with optional length and pattern constraints. |
623
+ | `StringShape` | interface | `{ category, min?, max?, pattern?, date?, description? }` | Describes a string with optional length, pattern, and calendar-date constraints. |
606
624
  | `NumberShape` | interface | `{ category, min?, max?, integer?, description? }` | Describes a number with optional bounds; `integer` restricts to whole numbers. |
607
625
  | `BooleanShape` | interface | `{ category, description? }` | Describes a boolean — accepts only `true` or `false`. |
608
626
  | `NullShape` | interface | `{ category, description? }` | Describes a null value — accepts only `null`. |
@@ -620,7 +638,7 @@ what the resolution produces.
620
638
  | `InferOpenIndex` | type | `[A] extends [false] ? unknown : [A] extends [true] ? { readonly [k: string]: unknown; } : [A] extends [ContractShape] ? { readonly [k: string]: unknown; } : unknown` | Computes the index-signature contribution of a MIXED object shape's `additionalProperties` — one with both fixed `properties` and an open tail. |
621
639
  | `InferMutable` | type | `{ -readonly [K in keyof Infer<S>]: Infer<S>[K]; }` | Strips the TOP-LEVEL `readonly` modifiers from `Infer` (a shallow strip — nested object/array properties stay readonly) — for consumers writing the parsed value's own fields. |
622
640
  | `InferUnion` | type | `V extends ReadonlyArray<infer U> ? (U extends ContractShape ? Infer<U> : never) : never` | Resolves `Infer` of a union shape's `variants` — the union of each variant's inferred type. |
623
- | `StringShapeOptions` | interface | `{ min?, max?, pattern?, description? }` | Groups the options for `StringShape` (through `stringShape`). |
641
+ | `StringShapeOptions` | interface | `{ min?, max?, pattern?, date?, description? }` | Groups the options for `StringShape` (through `stringShape`). |
624
642
  | `NumberShapeOptions` | interface | `{ min?, max?, integer?, description? }` | Groups the options for `NumberShape` (through `numberShape` / `integerShape`). |
625
643
  | `BooleanShapeOptions` | interface | `{ description? }` | Groups the options for `BooleanShape` (through `booleanShape`). |
626
644
  | `NullShapeOptions` | interface | `{ description? }` | Groups the options for `NullShape` (through `nullShape`). |
@@ -718,6 +736,8 @@ The canonicalization leaves (`canonicalStringify`, `encodeLeaf`) and the format-
718
736
  | `classifyFormat` | function | `(value: string) => SchemaFormat \| undefined` | Classifies an already-bounded string against the pattern-only and calendar-checked `SchemaFormat` vocabulary. |
719
737
  | `samplesToFormat` | function | `(values: readonly unknown[]) => SchemaFormat \| undefined` | Classifies a list of sample values against the `SchemaFormat` vocabulary, requiring unanimity. |
720
738
  | `matchesISOInstant` | function | `(value: string) => boolean` | Checks whether a supported ISO-8601 date or date-time names a real instant. |
739
+ | `matchesCalendarDate` | function | `(value: string) => boolean` | Checks whether a string is exactly a calendar-valid `YYYY-MM-DD` date. |
740
+ | `computeMonthLength` | function | `(year: number, month: number) => number` | Computes the number of days in a month of the Gregorian calendar. |
721
741
  | `ValueToSchemaOptions` | interface | `{ limits?, closed?, format?, enum? }` | Groups the options for `valueToSchema` / `samplesToSchema`. |
722
742
  | `ValueToSchemaLimits` | interface | `{ depth?, properties? }` | Holds the per-walk budgets `ValueToSchemaOptions` groups under `limits`. |
723
743
  | `SampleMemo` | interface | `{ rows, schemas }` | Holds the per-walk memo the multi-sample walk behind `samplesToSchema` owns, keyed by the ORDERED identities of the rows a slot collected. |
@@ -728,6 +748,7 @@ The canonicalization leaves (`canonicalStringify`, `encodeLeaf`) and the format-
728
748
  | `INFER_ENUM_LIMIT` | const | `12` | Caps by default at `12` the number of distinct values a multi-sample slot may hold before enum inference gives up and falls back to a bare `type`, frozen. |
729
749
  | `FORMAT_MAX_LENGTH` | const | `128` | Caps at `128` the string length `stringToFormat` attempts to classify, frozen. |
730
750
  | `FORMAT_PATTERNS` | const | `Readonly<Record<'uuid' \| 'email' \| 'uri', RegExp>>` | Holds the pure-regex matchers backing `stringToFormat`'s pattern-only formats (`uuid` / `email` / `uri`), frozen as data. |
751
+ | `DATE_LENGTH` | const | `10` | Holds `10`, the length of every `YYYY-MM-DD` date a date string shape admits. |
731
752
 
732
753
  Canonicalization classifies every non-null object at the read boundary before choosing a traversal. Arrays retain the dense indexed path; the shared realm-neutral `matchesRecordBrand` rule selects sorted own keys for ordinary, null-prototype, and foreign-realm plain records; every other readable exotic object — including a class whose prototype a caller reparented to `null` — keeps the existing `JSON.stringify` fallback. A failed prototype inspection is unreadable structure, reported as `canonicalStringify: value could not be read`.
733
754
 
@@ -774,8 +795,8 @@ One diagnostic for each artifact that answers yes-or-no. `compileReporter` is th
774
795
  | `Fault` | type | `{ readonly reason: 'type'; readonly path: FieldPath; readonly expected: FaultKind; readonly received: string; } \| { readonly reason: 'missing'; readonly path: FieldPath; readonly expected: FaultKind; } \| { readonly reason: 'constraint'; readonly path: FieldPath; readonly expected: FaultKind; readonly constraint: FaultConstraint; readonly limit?: number \| string; readonly received: string; } \| { readonly reason: 'variant'; readonly path: FieldPath; readonly variants: number; readonly key?: string; readonly expected?: readonly LiteralValue[]; } \| { readonly reason: 'oneOf'; readonly path: FieldPath; readonly matched: number; readonly key?: string; readonly expected?: readonly LiteralValue[]; }` | Represents a single structured parse-failure diagnostic — one entry of an `ContractInterface.explain` report. |
775
796
  | `ExtraFault` | interface | `{ reason, path }` | Represents a key present on a value that its closed object shape does not declare. |
776
797
  | `AuditFault` | type | `Fault \| ExtraFault` | Covers every fault an audit reports — the parse faults plus undeclared keys. |
777
- | `FaultKind` | type | `'string' \| 'number' \| 'integer' \| 'boolean' \| 'null' \| 'literal' \| 'array' \| 'object' \| 'union' \| 'json' \| 'shape'` | Names the kind of value a `Fault` expected — the shape-projected counterpart of a `ContractShape`'s `category`. |
778
- | `FaultConstraint` | type | `'min' \| 'max' \| 'pattern' \| 'integer'` | Names the refinement a `Fault` of reason `'constraint'` violates. |
798
+ | `FaultKind` | type | `'string' \| 'date' \| 'number' \| 'integer' \| 'boolean' \| 'null' \| 'literal' \| 'array' \| 'object' \| 'union' \| 'json' \| 'shape'` | Names the kind of value a `Fault` expected — the shape-projected counterpart of a `ContractShape`'s `category`. |
799
+ | `FaultConstraint` | type | `'min' \| 'max' \| 'pattern' \| 'date' \| 'integer'` | Names the refinement a `Fault` of reason `'constraint'` violates. |
779
800
 
780
801
  #### How a union is audited and reported
781
802