@intentius/chant 0.89.0 → 0.91.0

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.
Files changed (194) hide show
  1. package/dist/cli/handlers/components.d.ts +8 -0
  2. package/dist/cli/handlers/components.d.ts.map +1 -1
  3. package/dist/cli/handlers/operator.d.ts +14 -0
  4. package/dist/cli/handlers/operator.d.ts.map +1 -1
  5. package/dist/cli/handlers/run.d.ts.map +1 -1
  6. package/dist/cli/handlers/serve.d.ts.map +1 -1
  7. package/dist/cli/main.d.ts.map +1 -1
  8. package/dist/cli/mcp/server.d.ts +10 -5
  9. package/dist/cli/mcp/server.d.ts.map +1 -1
  10. package/dist/cli/mcp/types.d.ts +13 -5
  11. package/dist/cli/mcp/types.d.ts.map +1 -1
  12. package/dist/cli/mcp/workspace-tools.d.ts +55 -0
  13. package/dist/cli/mcp/workspace-tools.d.ts.map +1 -0
  14. package/dist/cli/registry.d.ts +31 -0
  15. package/dist/cli/registry.d.ts.map +1 -1
  16. package/dist/components/verbs/vuln-scan.d.ts +72 -0
  17. package/dist/components/verbs/vuln-scan.d.ts.map +1 -1
  18. package/dist/lifecycle/git.d.ts +40 -5
  19. package/dist/lifecycle/git.d.ts.map +1 -1
  20. package/dist/lifecycle/lease.d.ts +72 -16
  21. package/dist/lifecycle/lease.d.ts.map +1 -1
  22. package/dist/lifecycle/member-ledger.d.ts +3 -2
  23. package/dist/lifecycle/member-ledger.d.ts.map +1 -1
  24. package/dist/lifecycle/plan-ledger.d.ts +114 -0
  25. package/dist/lifecycle/plan-ledger.d.ts.map +1 -0
  26. package/dist/lifecycle/work-lease.d.ts +140 -0
  27. package/dist/lifecycle/work-lease.d.ts.map +1 -0
  28. package/dist/op/activities/activity-contracts.d.ts +2 -2
  29. package/dist/op/builders.d.ts.map +1 -1
  30. package/dist/op/discover.d.ts +25 -0
  31. package/dist/op/discover.d.ts.map +1 -1
  32. package/dist/op/index.d.ts +9 -3
  33. package/dist/op/index.d.ts.map +1 -1
  34. package/dist/op/lifecycle-receipt-store.d.ts +34 -0
  35. package/dist/op/lifecycle-receipt-store.d.ts.map +1 -0
  36. package/dist/op/local-executor.d.ts +19 -0
  37. package/dist/op/local-executor.d.ts.map +1 -1
  38. package/dist/op/local-output.d.ts.map +1 -1
  39. package/dist/op/op-ir.d.ts +10 -1
  40. package/dist/op/op-ir.d.ts.map +1 -1
  41. package/dist/op/op-verb-class.d.ts.map +1 -1
  42. package/dist/op/operator.d.ts +29 -0
  43. package/dist/op/operator.d.ts.map +1 -1
  44. package/dist/op/runtime.d.ts +9 -0
  45. package/dist/op/runtime.d.ts.map +1 -1
  46. package/dist/op/runtimes/local.d.ts.map +1 -1
  47. package/dist/op/step-output-ref.d.ts +2 -2
  48. package/dist/op/step-output-ref.d.ts.map +1 -1
  49. package/dist/op/steward.d.ts +140 -0
  50. package/dist/op/steward.d.ts.map +1 -0
  51. package/dist/op/types.d.ts +51 -0
  52. package/dist/op/types.d.ts.map +1 -1
  53. package/dist/op/work-lease-decl.d.ts +18 -0
  54. package/dist/op/work-lease-decl.d.ts.map +1 -0
  55. package/dist/op/work-lease-run.d.ts +173 -0
  56. package/dist/op/work-lease-run.d.ts.map +1 -0
  57. package/dist/workspace/box-isolation.d.ts +99 -0
  58. package/dist/workspace/box-isolation.d.ts.map +1 -0
  59. package/dist/workspace/checks/box-isolation.d.ts +18 -0
  60. package/dist/workspace/checks/box-isolation.d.ts.map +1 -0
  61. package/dist/workspace/checks/boxes.d.ts +71 -0
  62. package/dist/workspace/checks/boxes.d.ts.map +1 -0
  63. package/dist/workspace/checks/records.d.ts +1 -0
  64. package/dist/workspace/checks/records.d.ts.map +1 -1
  65. package/dist/workspace/checks.d.ts +10 -1
  66. package/dist/workspace/checks.d.ts.map +1 -1
  67. package/dist/workspace/conformance/index.d.ts +42 -2
  68. package/dist/workspace/conformance/index.d.ts.map +1 -1
  69. package/dist/workspace/conformance/vitest.d.ts.map +1 -1
  70. package/dist/workspace/decide.d.ts +184 -0
  71. package/dist/workspace/decide.d.ts.map +1 -0
  72. package/dist/workspace/decision-points.schema.json +137 -0
  73. package/dist/workspace/declaration.d.ts +51 -0
  74. package/dist/workspace/declaration.d.ts.map +1 -1
  75. package/dist/workspace/declaration.schema.json +172 -0
  76. package/dist/workspace/declared-kinds.d.ts +12 -0
  77. package/dist/workspace/declared-kinds.d.ts.map +1 -1
  78. package/dist/workspace/points-cli.d.ts +113 -0
  79. package/dist/workspace/points-cli.d.ts.map +1 -0
  80. package/dist/workspace/points.d.ts +320 -0
  81. package/dist/workspace/points.d.ts.map +1 -0
  82. package/dist/workspace/reason-codes.d.ts +29 -0
  83. package/dist/workspace/reason-codes.d.ts.map +1 -1
  84. package/dist/workspace/record-assets.d.ts.map +1 -1
  85. package/dist/workspace/records-cli.d.ts +12 -0
  86. package/dist/workspace/records-cli.d.ts.map +1 -1
  87. package/dist/workspace/records-write.d.ts +35 -3
  88. package/dist/workspace/records-write.d.ts.map +1 -1
  89. package/dist/workspace/records.d.ts +12 -3
  90. package/dist/workspace/records.d.ts.map +1 -1
  91. package/dist/workspace/source-block.d.ts +85 -0
  92. package/dist/workspace/source-block.d.ts.map +1 -0
  93. package/dist/workspace/status-stewards.d.ts +121 -0
  94. package/dist/workspace/status-stewards.d.ts.map +1 -0
  95. package/dist/workspace/status.d.ts +52 -1
  96. package/dist/workspace/status.d.ts.map +1 -1
  97. package/dist/workspace/work-cli.d.ts +78 -0
  98. package/dist/workspace/work-cli.d.ts.map +1 -0
  99. package/package.json +1 -1
  100. package/src/cli/handlers/components.test.ts +93 -0
  101. package/src/cli/handlers/components.ts +44 -3
  102. package/src/cli/handlers/operator.ts +107 -2
  103. package/src/cli/handlers/run.test.ts +19 -0
  104. package/src/cli/handlers/run.ts +53 -1
  105. package/src/cli/handlers/serve.ts +2 -1
  106. package/src/cli/main.test.ts +40 -0
  107. package/src/cli/main.ts +78 -2
  108. package/src/cli/mcp/docs-parity.test.ts +20 -2
  109. package/src/cli/mcp/server.ts +23 -6
  110. package/src/cli/mcp/types.ts +15 -2
  111. package/src/cli/mcp/workspace-tools.test.ts +211 -0
  112. package/src/cli/mcp/workspace-tools.ts +449 -0
  113. package/src/cli/registry.ts +31 -0
  114. package/src/components/verbs/vuln-scan.test.ts +124 -1
  115. package/src/components/verbs/vuln-scan.ts +142 -1
  116. package/src/lifecycle/git.ts +65 -15
  117. package/src/lifecycle/lease.test.ts +22 -0
  118. package/src/lifecycle/lease.ts +133 -29
  119. package/src/lifecycle/member-ledger.ts +3 -2
  120. package/src/lifecycle/plan-ledger.test.ts +148 -0
  121. package/src/lifecycle/plan-ledger.ts +158 -0
  122. package/src/lifecycle/work-lease.test.ts +236 -0
  123. package/src/lifecycle/work-lease.ts +426 -0
  124. package/src/op/builders.ts +5 -0
  125. package/src/op/discover.ts +71 -0
  126. package/src/op/index.ts +16 -3
  127. package/src/op/lifecycle-receipt-store.test.ts +60 -0
  128. package/src/op/lifecycle-receipt-store.ts +61 -0
  129. package/src/op/local-executor.ts +216 -18
  130. package/src/op/local-output.ts +13 -0
  131. package/src/op/op-ir.ts +14 -0
  132. package/src/op/op-verb-class.ts +6 -0
  133. package/src/op/operator.ts +75 -4
  134. package/src/op/runtime.ts +6 -0
  135. package/src/op/runtimes/local.ts +3 -0
  136. package/src/op/step-output-ref.ts +6 -2
  137. package/src/op/steward.test.ts +212 -0
  138. package/src/op/steward.ts +253 -0
  139. package/src/op/types.ts +53 -0
  140. package/src/op/work-lease-decl.ts +80 -0
  141. package/src/op/work-lease-run.test.ts +326 -0
  142. package/src/op/work-lease-run.ts +395 -0
  143. package/src/workspace/box-isolation.test.ts +261 -0
  144. package/src/workspace/box-isolation.ts +205 -0
  145. package/src/workspace/check-contract.test.ts +3 -1
  146. package/src/workspace/check.schema.json +15 -7
  147. package/src/workspace/checks/box-isolation.ts +68 -0
  148. package/src/workspace/checks/boxes.test.ts +197 -0
  149. package/src/workspace/checks/boxes.ts +307 -0
  150. package/src/workspace/checks/records.ts +25 -0
  151. package/src/workspace/checks.test.ts +7 -0
  152. package/src/workspace/checks.ts +19 -2
  153. package/src/workspace/conformance/__fixture__/decisions/decision.kind.mjs +4 -0
  154. package/src/workspace/conformance/__fixture__/decisions/decision.schema.json +100 -6
  155. package/src/workspace/conformance/index.mjs +3 -0
  156. package/src/workspace/conformance/index.ts +185 -7
  157. package/src/workspace/conformance/vitest.ts +17 -8
  158. package/src/workspace/decide.test.ts +224 -0
  159. package/src/workspace/decide.ts +576 -0
  160. package/src/workspace/decision-points.schema.json +137 -0
  161. package/src/workspace/declaration.schema.json +172 -0
  162. package/src/workspace/declaration.ts +137 -0
  163. package/src/workspace/declared-kinds.ts +25 -2
  164. package/src/workspace/intent.schema.json +4 -1
  165. package/src/workspace/point-answer.schema.json +95 -0
  166. package/src/workspace/points-cli.ts +273 -0
  167. package/src/workspace/points-write.schema.json +489 -0
  168. package/src/workspace/points.schema.json +710 -0
  169. package/src/workspace/points.test.ts +264 -0
  170. package/src/workspace/points.ts +564 -0
  171. package/src/workspace/read-contract.test.ts +18 -1
  172. package/src/workspace/reason-codes.test.ts +14 -1
  173. package/src/workspace/reason-codes.ts +36 -0
  174. package/src/workspace/record-assets.test.ts +3 -2
  175. package/src/workspace/record-assets.ts +4 -1
  176. package/src/workspace/records-amend.schema.json +2 -1
  177. package/src/workspace/records-cli.ts +15 -2
  178. package/src/workspace/records-close.schema.json +2 -1
  179. package/src/workspace/records-contract.test.ts +3 -2
  180. package/src/workspace/records-new.schema.json +4 -1
  181. package/src/workspace/records-review.schema.json +2 -1
  182. package/src/workspace/records-write.ts +85 -7
  183. package/src/workspace/records.schema.json +18 -0
  184. package/src/workspace/records.ts +61 -3
  185. package/src/workspace/source-block.test.ts +167 -0
  186. package/src/workspace/source-block.ts +129 -0
  187. package/src/workspace/status-contract.test.ts +178 -0
  188. package/src/workspace/status-stewards.ts +225 -0
  189. package/src/workspace/status.schema.json +230 -4
  190. package/src/workspace/status.ts +106 -5
  191. package/src/workspace/work-cli.test.ts +180 -0
  192. package/src/workspace/work-cli.ts +246 -0
  193. package/src/workspace/work-lease.schema.json +233 -0
  194. package/src/workspace/work-readiness-chud.test.ts +145 -0
@@ -0,0 +1,173 @@
1
+ /**
2
+ * An Op run under a work item's lease (#2748, the Steward's gap 4 in #2731).
3
+ *
4
+ * An Op that declares `workLease` (`./types.ts`) runs its steps under the work
5
+ * lease of one work item (`../lifecycle/work-lease.ts`, ws-055). The local
6
+ * executor (`./local-executor.ts`) drives the {@link RunWorkLease} here:
7
+ *
8
+ * - Claim. Before the first step when the item is a literal or named by the
9
+ * run (`chant run <op> --work <id>`); right after the producing step when
10
+ * the item is a reference to a step's output. A list of candidates is tried
11
+ * in order and the first one nobody holds is taken. When nothing can be
12
+ * claimed the run ends `ok` with its remaining steps skipped, and the claim's
13
+ * record carries the refusal, which names who holds the item.
14
+ * - Heartbeat. While the steps run, the lease is renewed every third of its
15
+ * time to live, keeping its fencing token. A renewal the lease refuses (it
16
+ * ran out and someone else claimed it, or it was released) means the lease
17
+ * is lost: the in-flight step's abort signal fires, no further step starts,
18
+ * and the run fails with `lease-lost`. A renewal that fails for any other
19
+ * reason (the remote didn't answer) is retried at the next beat; if that
20
+ * goes on past the expiry, the next renewal is refused and the lease is lost
21
+ * then. These are the semantics of chud's dispatcher
22
+ * (packages/runtime/src/dispatch.mjs), which this replaces.
23
+ * - Fence. Before the run's record is written, one last renewal checks that
24
+ * the lease is still this run's, with the same token. Refused, the run is
25
+ * recorded as failed with `lease-lost`, never as done.
26
+ * - Release. When the run ends, the lease is given back with the run's
27
+ * outcome (`done`, `not_done`, `gated`, or the Op's own `outcome`), which
28
+ * lands on `_leases/<id>.jsonl`. A lost lease is not released: it isn't
29
+ * this run's to give back.
30
+ *
31
+ * Steps read the lease through {@link workLeaseOutput}: its item, holder,
32
+ * token and expiry, and for an Op that changes the checkout, the worktree and
33
+ * branch it works in. An activity that writes somewhere a token can fence
34
+ * (another ledger, a remote) passes the token along.
35
+ *
36
+ * ## Changing the checkout
37
+ *
38
+ * An Op with `changesCheckout` (applying a build, `chant workspace upgrade`)
39
+ * must declare `workLease`, and its leased steps get a git worktree of their
40
+ * own: `chant/work/<item>` checked out under the repository's git directory,
41
+ * from the checkout's HEAD, or from the branch as an earlier run left it. The
42
+ * worktree is removed when the run ends and the branch keeps whatever the
43
+ * steps committed, for the runner to deliver. The checkout a coding agent is
44
+ * editing, its index and its uncommitted files, are never touched.
45
+ */
46
+ import { type StepOutputRef } from "./step-output-ref.js";
47
+ import { type OpConfig } from "./types.js";
48
+ export { WORK_LEASE_STEP_ID } from "./types.js";
49
+ export { workLeaseProblems, workLeaseNeedsRunItem } from "./work-lease-decl.js";
50
+ /** Why a run under a work lease failed when the lease was lost: chud's reason, kept. */
51
+ export declare const LEASE_LOST = "lease-lost";
52
+ /** The branch prefix an Op that changes the checkout works on. */
53
+ export declare const WORK_BRANCH_PREFIX = "chant/work/";
54
+ /** What a run's steps read about its work lease, via {@link workLeaseOutput}. */
55
+ export interface WorkLeaseOutput {
56
+ item: string;
57
+ holder: string;
58
+ /** The fencing token: the same for the whole run unless the lease is lost. */
59
+ token: string;
60
+ acquiredAt: string;
61
+ expiresAt: string;
62
+ /** The lease ref. */
63
+ ref: string;
64
+ /** For an Op that changes the checkout: the worktree its steps work in. Otherwise null. */
65
+ worktree: string | null;
66
+ /** For an Op that changes the checkout: the worktree's branch. Otherwise null. */
67
+ branch: string | null;
68
+ }
69
+ /** How a run's work lease ended, on `OpRunResult.workLease`. */
70
+ export interface WorkLeaseRunResult {
71
+ /** The item claimed, or null when the run claimed nothing. */
72
+ item: string | null;
73
+ holder: string;
74
+ token: string | null;
75
+ /** The branch an Op that changes the checkout worked on, or null. */
76
+ branch: string | null;
77
+ /** Whether the lease was given back. False when it was lost, or never claimed. */
78
+ released: boolean;
79
+ /** The outcome the release recorded, or null when there was no release. */
80
+ outcome: string | null;
81
+ /** Why the lease was lost, or null when it wasn't. */
82
+ lost: string | null;
83
+ /** Why nothing was claimed, or null when something was. */
84
+ refusal: string | null;
85
+ }
86
+ /**
87
+ * A reference to the run's work lease, for a step's args:
88
+ * `workLeaseOutput("token")`, `workLeaseOutput("worktree")`, or the whole
89
+ * {@link WorkLeaseOutput} with no path.
90
+ */
91
+ export declare function workLeaseOutput(path?: keyof WorkLeaseOutput): StepOutputRef;
92
+ /**
93
+ * The holder a steward's turn claims work leases as:
94
+ * `<steward>/<op>@<process>`. `chant workspace status --json` reads it back
95
+ * to show the lease a steward's current turn holds beside its Ops.
96
+ */
97
+ export declare function stewardWorkHolder(steward: string, op: string, process?: string): string;
98
+ /** What a claim attempt came to, for the executor to record. */
99
+ export type WorkClaimOutcome = {
100
+ kind: "claimed";
101
+ lease: WorkLeaseOutput;
102
+ tried: string[];
103
+ }
104
+ /** Nothing to claim, or every candidate is held. `refusal` says which. */
105
+ | {
106
+ kind: "unclaimed";
107
+ refusal: string;
108
+ tried: string[];
109
+ };
110
+ export interface RunWorkLeaseOptions {
111
+ /** The project directory: where the run's ledger is, and what `workLease.kind` is relative to. */
112
+ cwd: string;
113
+ holder?: string;
114
+ /** The item the run names (`--work`), which takes the place of the Op's own. */
115
+ item?: string;
116
+ /** Called with a renewal's error that didn't lose the lease, which the next beat retries. */
117
+ onRenewError?: (message: string) => void;
118
+ }
119
+ /** One run's hold on one work item's lease. Created by the executor for an Op with `workLease`. */
120
+ export declare class RunWorkLease {
121
+ private readonly config;
122
+ private readonly opts;
123
+ readonly holder: string;
124
+ readonly ttlMs: number;
125
+ /** Aborts when the lease is lost, so the step in flight stops. */
126
+ readonly lostSignal: AbortSignal;
127
+ /** Set once the claim was made or given up on. */
128
+ attempted: boolean;
129
+ lease: WorkLeaseOutput | undefined;
130
+ refusal: string | undefined;
131
+ lost: string | undefined;
132
+ private readonly spec;
133
+ private readonly abort;
134
+ private timer;
135
+ private beat;
136
+ constructor(config: Pick<OpConfig, "name" | "workLease" | "changesCheckout">, opts: RunWorkLeaseOptions);
137
+ /** The directory whose ledger holds the lease: the kind file's, or the project's. */
138
+ private get ledgerCwd();
139
+ /** Whether the claim is due at a step boundary, given the results so far. */
140
+ due(resultsById: ReadonlyMap<string, unknown>): boolean;
141
+ /** The candidate ids, in order. Empty when the reference resolved to nothing. */
142
+ private candidates;
143
+ /**
144
+ * Claim the first candidate nobody holds. On a claim, the heartbeat starts,
145
+ * and for an Op that changes the checkout its worktree is made. Throws when
146
+ * the claim could not be made for a reason other than someone holding it
147
+ * (git failed): the run fails, as for any failing step.
148
+ */
149
+ claim(resultsById: ReadonlyMap<string, unknown>): Promise<WorkClaimOutcome>;
150
+ /**
151
+ * A worktree for `id` on `chant/work/[<member>/]<id>`, under the git
152
+ * directory so the checkout's own `git status` never lists it. Starts from
153
+ * the branch when an earlier run left it, from HEAD otherwise.
154
+ */
155
+ private makeWorktree;
156
+ private lose;
157
+ /** One renewal. Refused, the lease is lost; failed otherwise, the next beat retries. */
158
+ private renew;
159
+ private startHeartbeat;
160
+ private stopHeartbeat;
161
+ /**
162
+ * The last renewal before the run's record is written, after the heartbeat
163
+ * stops. Returns whether the lease is still this run's.
164
+ */
165
+ fence(): Promise<boolean>;
166
+ /**
167
+ * End the run's hold: stop the heartbeat, remove the worktree (the branch
168
+ * keeps what was committed), and give the lease back with the outcome
169
+ * unless it was lost.
170
+ */
171
+ finish(status: "ok" | "fail" | "gated", resultsById: ReadonlyMap<string, unknown>): Promise<WorkLeaseRunResult>;
172
+ }
173
+ //# sourceMappingURL=work-lease-run.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"work-lease-run.d.ts","sourceRoot":"","sources":["../../src/op/work-lease-run.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AAiBH,OAAO,EAA+B,KAAK,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACpF,OAAO,EAAsB,KAAK,QAAQ,EAAE,MAAM,SAAS,CAAC;AAE5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC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AKpB;IAED,6EAA6E;IAC7E,GAAG,CAAC,WAAW,EAAE,WAAW,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO;IAOvD,iFAAiF;IACjF,OAAO,CAAC,UAAU;IAclB;;;;;OAKG;IACG,KAAK,CAAC,WAAW,EAAE,WAAW,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAwCjF;;;;OAIG;YACW,YAAY;IAqB1B,OAAO,CAAC,IAAI;IAOZ,wFAAwF;YAC1E,KAAK;IAyBnB,OAAO,CAAC,cAAc;IAWtB,OAAO,CAAC,aAAa;IAKrB;;;OAGG;IACG,KAAK,IAAI,OAAO,CAAC,OAAO,CAAC;IAgB/B;;;;OAIG;IACG,MAAM,CAAC,MAAM,EAAE,IAAI,GAAG,MAAM,GAAG,OAAO,EAAE,WAAW,EAAE,WAAW,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,kBAAkB,CAAC;CAkCtH"}
@@ -0,0 +1,99 @@
1
+ /**
2
+ * Box isolation (#2727): the ports, state paths and cookie names each box
3
+ * uses, derived from its identity and its host, never chosen by a runtime.
4
+ *
5
+ * A box is a member with a `box` block (#2726), and its name is the
6
+ * member's. A box's identity is its host, its name and its slot, from the
7
+ * block's `host` and `slot`. Everything else
8
+ * follows from those and the host's declaration, and nothing else goes in:
9
+ *
10
+ * - port `p` is `host.ports.from + slot * host.ports.perBox + offset(p)`;
11
+ * - the state directory is `<host.stateRoot>/<box name>`, and state entry
12
+ * `k` is that directory joined with the entry's relative path;
13
+ * - cookie `c` is `<c>_<box name>`.
14
+ *
15
+ * So the same declaration gives the same values on every machine and every
16
+ * run, and adding or removing a box changes no other box's values. The state
17
+ * paths keep their environment reference (`${XDG_STATE_HOME}` by default):
18
+ * the runtime that sets them expands it on its machine, and chant never
19
+ * reads the machine.
20
+ *
21
+ * Distinct names on one host give distinct state paths and cookie names by
22
+ * construction (a member name has no `_`, so `<c>_<box>` splits one way).
23
+ * Ports are the only value two boxes can share: two boxes on one host with
24
+ * the same slot, or two ports in one box at the same offset. `chant
25
+ * workspace check` compares every value anyway (WSP123), so an entry whose
26
+ * path escapes its directory is caught too.
27
+ */
28
+ import { type BoxIsolationDeclaration, type Declaration, type Host, type Member } from "./declaration.js";
29
+ /** A box's isolation, resolved: what `chant workspace status --json` prints in the member's box block. */
30
+ export interface ResolvedIsolation {
31
+ host: string;
32
+ slot: number;
33
+ /** The box's block of its host's range, inclusive. */
34
+ portRange: {
35
+ from: number;
36
+ to: number;
37
+ };
38
+ /** Each declared port's number, in file order. */
39
+ ports: Record<string, number>;
40
+ /** `<stateRoot>/<box name>`, with the environment reference unexpanded. */
41
+ stateDir: string;
42
+ /** Each declared state entry's path, under `stateDir`. */
43
+ state: Record<string, string>;
44
+ /** Each declared cookie's name for this box. */
45
+ cookies: Record<string, string>;
46
+ }
47
+ /** The host's state root as written, or the default. */
48
+ export declare function stateRootOf(host: Host): string;
49
+ /** Resolve the isolation of the box named `name` on its host. */
50
+ export declare function resolveIsolation(name: string, box: BoxIsolationDeclaration, host: Host): ResolvedIsolation;
51
+ /** A member whose box block declares its isolation, with it resolved. */
52
+ export interface IsolatedBox {
53
+ member: Member;
54
+ isolation: ResolvedIsolation;
55
+ }
56
+ /** Every box that declares its isolation, resolved, in member order. The declaration read already checked each box's host exists. */
57
+ export declare function resolveBoxes(declaration: Declaration): IsolatedBox[];
58
+ /**
59
+ * Why a host's `stateRoot` is a literal machine path, or undefined when it is
60
+ * not. A state root starts with an environment reference the runtime expands,
61
+ * and that reference is not `$HOME`: a path under a home directory names one
62
+ * person's machine layout (`${HOME}/<user>/...`), where `${XDG_STATE_HOME}`
63
+ * names the place the machine keeps state.
64
+ */
65
+ export declare function stateRootLiteral(root: string): string | undefined;
66
+ /**
67
+ * Why a state entry's path is not one relative to the box's state directory,
68
+ * or undefined when it is: absolute, home-relative, starting with an
69
+ * environment reference, a Windows drive path, or with a `..` segment.
70
+ */
71
+ export declare function statePathLiteral(path: string): string | undefined;
72
+ export interface BoxLiteral {
73
+ /** The box, or null for a host's state root. */
74
+ box: string | null;
75
+ message: string;
76
+ pointer: string;
77
+ }
78
+ /** Every literal machine path in the hosts and boxes. */
79
+ export declare function boxLiterals(declaration: Declaration): BoxLiteral[];
80
+ export interface BoxCollision {
81
+ host: string;
82
+ what: "port" | "state" | "cookie";
83
+ /** The shared value. */
84
+ value: string;
85
+ /** Each holder as `<box>.<name>`, in declaration order. */
86
+ holders: {
87
+ box: string;
88
+ name: string;
89
+ pointer: string;
90
+ }[];
91
+ }
92
+ /**
93
+ * Every value two holders on one host resolve to. Ports collide within a box
94
+ * too, since two listeners can't share a port; state entries in one box may
95
+ * name one file on purpose (a runtime and the door both reading hud's
96
+ * identity), and cookies are unique in a box by the schema.
97
+ */
98
+ export declare function boxCollisions(declaration: Declaration): BoxCollision[];
99
+ //# sourceMappingURL=box-isolation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"box-isolation.d.ts","sourceRoot":"","sources":["../../src/workspace/box-isolation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EAAsB,KAAK,uBAAuB,EAAE,KAAK,WAAW,EAAE,KAAK,IAAI,EAAE,KAAK,MAAM,EAAE,MAAM,eAAe,CAAC;AAG3H,0GAA0G;AAC1G,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,sDAAsD;IACtD,SAAS,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC;IACxC,kDAAkD;IAClD,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9B,2EAA2E;IAC3E,QAAQ,EAAE,MAAM,CAAC;IACjB,0DAA0D;IAC1D,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC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AAC,WAAW,EAAE,WAAW,GAAG,YAAY,EAAE,CA2BtE"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * The box isolation checks, WSP123 and WSP124 (#2727).
3
+ *
4
+ * | Id | Code | Fails when |
5
+ * |---|---|---|
6
+ * | WSP123 | `box-isolation-collision` | two boxes on one host, or two ports in one box, resolve to the same port, state path or cookie name |
7
+ * | WSP124 | `box-isolation-literal` | a host's state root or a box's state entry is a literal machine path |
8
+ *
9
+ * Both are fixed errors. A collision means one box signs another's people out
10
+ * or reads another's identity (arugula-salad/studio#39), and a literal path
11
+ * means the declaration only holds on one machine. Neither has a case where
12
+ * turning the check down is the fix.
13
+ */
14
+ import type { WorkspaceCheck } from "../checks.js";
15
+ export declare const WSP_BOX_COLLISION = "WSP123";
16
+ export declare const WSP_BOX_LITERAL = "WSP124";
17
+ export declare const BOX_ISOLATION_CHECKS: readonly WorkspaceCheck[];
18
+ //# sourceMappingURL=box-isolation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"box-isolation.d.ts","sourceRoot":"","sources":["../../../src/workspace/checks/box-isolation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAGhD,eAAO,MAAM,iBAAiB,WAAW,CAAC;AAC1C,eAAO,MAAM,eAAe,WAAW,CAAC;AAIxC,eAAO,MAAM,oBAAoB,EAAE,SAAS,cAAc,EA6CzD,CAAC"}
@@ -0,0 +1,71 @@
1
+ /**
2
+ * The box checks, WSP121 and WSP122 (#2726).
3
+ *
4
+ * A member whose entry has a `box` block is a box, or holds a box's
5
+ * declarations. A box holds no credential: each capability it needs outside
6
+ * itself (inference, Fountain, a third-party API) is reached through a
7
+ * broker, a runtime such as a lobby or a door, which holds the credential
8
+ * and enforces the scope the block declares. chant only states and checks
9
+ * this; it never runs a broker (ws-052).
10
+ *
11
+ * | Id | Code | Fails when |
12
+ * |---|---|---|
13
+ * | WSP121 | `box-credential-declared` | a file in the box member's directory carries a literal secret (fixed) |
14
+ * | WSP122 | `box-capability-unbrokered` | a capability in the block names no broker |
15
+ *
16
+ * WSP121 reads the member's files from the tree checked, so it works under
17
+ * `--at`, and runs no member code. A literal secret is either a value with a
18
+ * well-known credential shape (an AWS key id, a GitHub or Slack token, an
19
+ * `sk-` key, private key material), wherever it sits, or a literal string
20
+ * where a credential goes: under a key named like one (`API_KEY`, `token`,
21
+ * `credential`, `password`, ...), or the `value` of a `{ key, value }` vault
22
+ * secret. A reference is never one: `${VAR}` and `$VAR`, a secret-manager
23
+ * reference (`op://`, `bws://`, `infisical://`), a `{{...}}` template
24
+ * placeholder, and any expression, such as `process.env.X`, that is not a
25
+ * string literal. WSP121 is fixed: a credential in a box's files is in git.
26
+ *
27
+ * WSP123 and WSP124, box isolation (#2727), are in `./box-isolation.ts` and
28
+ * listed here after these two.
29
+ */
30
+ import * as ts from "typescript";
31
+ import type { WorkspaceCheck } from "../checks.js";
32
+ /** The read contract's codes for the box findings, carried as `code` on each. */
33
+ export declare const BOX_FINDING_CODES: readonly ["box-credential-declared", "box-capability-unbrokered", "box-isolation-collision", "box-isolation-literal"];
34
+ export declare const WSP_BOX_CREDENTIAL = "WSP121";
35
+ export declare const WSP_BOX_UNBROKERED = "WSP122";
36
+ /** Values whose shape alone says they are a credential. The list FTN001 uses, plus Anthropic keys. */
37
+ export declare const CREDENTIAL_SHAPES: readonly {
38
+ pattern: RegExp;
39
+ label: string;
40
+ }[];
41
+ /** Secret-manager references a value may be instead of the secret. */
42
+ export declare const SECRET_REFERENCE_SCHEMES: readonly ["op://", "bws://", "infisical://"];
43
+ /** Whether `key` names a credential. Exported for tests. */
44
+ export declare function isCredentialKey(key: string): boolean;
45
+ /** Whether `value` refers to a secret rather than being one. Exported for tests. */
46
+ export declare function isSecretReference(value: string): boolean;
47
+ /** The credential shape `value` has, or undefined. */
48
+ export declare function credentialShape(value: string): string | undefined;
49
+ /** One literal secret found in a file. */
50
+ export interface LiteralSecret {
51
+ /** 1-based. */
52
+ line: number;
53
+ column: number;
54
+ /** What was found, for the message: never the value itself. */
55
+ what: string;
56
+ }
57
+ /**
58
+ * The literal secrets in a TypeScript, JavaScript or JSON file, read as
59
+ * syntax and never run.
60
+ */
61
+ export declare function literalSecretsInCode(text: string, file: string, kind: ts.ScriptKind): LiteralSecret[];
62
+ /**
63
+ * The literal secrets in any other text file, such as a shell script, an
64
+ * env file or YAML: a credential shape anywhere, or a line assigning a
65
+ * literal to a credential-named key.
66
+ */
67
+ export declare function literalSecretsInText(text: string, assignments?: boolean): LiteralSecret[];
68
+ /** The literal secrets in one file, or none when the file is binary or too large. */
69
+ export declare function literalSecretsInFile(text: string, path: string): LiteralSecret[];
70
+ export declare const BOX_CHECKS: readonly WorkspaceCheck[];
71
+ //# sourceMappingURL=boxes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"boxes.d.ts","sourceRoot":"","sources":["../../../src/workspace/checks/boxes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,KAAK,EAAE,cAAc,EAA8C,MAAM,WAAW,CAAC;AAM5F,iFAAiF;AACjF,eAAO,MAAM,iBAAiB,uHAAwJ,CAAC;AAEvL,eAAO,MAAM,kBAAkB,WAAW,CAAC;AAC3C,eAAO,MAAM,kBAAkB,WAAW,CAAC;AAE3C,sGAAsG;AACtG,eAAO,MAAM,iBAAiB,EAAE,SAAS;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,EAS1E,CAAC;AAEF,sEAAsE;AACtE,eAAO,MAAM,wBAAwB,8CAA+C,CAAC;AASrF,4DAA4D;AAC5D,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAEpD;AAED,oFAAoF;AACpF,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAQxD;AAYD,sDAAsD;AACtD,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAEjE;AAED,0CAA0C;AAC1C,MAAM,WAAW,aAAa;IAC5B,eAAe;IACf,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,+DAA+D;IAC/D,IAAI,EAAE,MAAM,CAAC;CACd;AA4BD;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,CAAC,UAAU,GAAG,aAAa,EAAE,CAkCrG;AAkBD;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE,WAAW,UAAO,GAAG,aAAa,EAAE,CAgBtF;AAQD,qFAAqF;AACrF,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,aAAa,EAAE,CAMhF;AAmBD,eAAO,MAAM,UAAU,EAAE,SAAS,cAAc,EAgE/C,CAAC"}
@@ -14,6 +14,7 @@
14
14
  * | WSP113 | a pinned file that a superseding record pins at the old hash: the artifact did not follow the decision |
15
15
  * | WSP114 | the records of `--kind` can't be read (fixed) |
16
16
  * | WSP115 | a record kind the declaration names is missing or does not load as one (fixed, #2680) |
17
+ * | WSP116 | an answer kind's decision points file is missing or not valid (fixed, ws-058, #2738) |
17
18
  */
18
19
  import type { WorkspaceCheck } from "../checks.js";
19
20
  import type { ReadErrorCode, RecordEntry } from "../records.js";
@@ -1 +1 @@
1
- {"version":3,"file":"records.d.ts","sourceRoot":"","sources":["../../../src/workspace/checks/records.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAuB,MAAM,WAAW,CAAC;AACrE,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE7D,sEAAsE;AACtE,MAAM,MAAM,WAAW,GACnB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,SAAS,CAAC,WAAW,GAAG;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,EAAE,CAAA;CAAE,GACtE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE;QAAE,IAAI,EAAE,aAAa,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,CAAC;AAgBtE,eAAO,MAAM,aAAa,EAAE,SAAS,cAAc,EA6DlD,CAAC"}
1
+ {"version":3,"file":"records.d.ts","sourceRoot":"","sources":["../../../src/workspace/checks/records.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAuB,MAAM,WAAW,CAAC;AACrE,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE7D,sEAAsE;AACtE,MAAM,MAAM,WAAW,GACnB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,SAAS,CAAC,WAAW,GAAG;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,EAAE,CAAA;CAAE,GACtE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE;QAAE,IAAI,EAAE,aAAa,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,CAAC;AAgBtE,eAAO,MAAM,aAAa,EAAE,SAAS,cAAc,EAqFlD,CAAC"}
@@ -28,6 +28,9 @@
28
28
  * | WSP101 to WSP106 | generated files |
29
29
  * | WSP111 to WSP114 | records read with `--kind` (#2549) |
30
30
  * | WSP115 | the record kinds the declaration names (#2680) |
31
+ * | WSP116 | the decision points file of each declared answer kind (ws-058) |
32
+ * | WSP121, WSP122 | boxes: no literal credential, every capability brokered (#2726) |
33
+ * | WSP123, WSP124 | box isolation: no shared port, state path or cookie, no literal machine path (#2727) |
31
34
  */
32
35
  import type { LintDiagnostic, LintRule, Severity } from "../lint/rule.js";
33
36
  import type { PostSynthDiagnostic } from "../lint/post-synth.js";
@@ -79,6 +82,12 @@ export interface WorkspaceDiagnostic extends PostSynthDiagnostic {
79
82
  pointer: string;
80
83
  /** An absolute path, for a finding about a file other than the declaration, such as a record (#2549). It is reported at its first line. */
81
84
  file?: string;
85
+ /** A path in the tree checked, relative to the workspace root, for a finding about a file there (#2726). It is reported at `line` and `column`. */
86
+ treeFile?: string;
87
+ line?: number;
88
+ column?: number;
89
+ /** The read contract's code for the finding, when it has one (#2726). */
90
+ code?: ReasonCode;
82
91
  }
83
92
  export interface WorkspaceCheck {
84
93
  /** `WSP` and three digits. Public once shipped. */
@@ -94,7 +103,7 @@ export interface WorkspaceCheck {
94
103
  /** A diagnostic ready for lint's reporters, with the entry it is about. */
95
104
  export interface WorkspaceFinding extends LintDiagnostic {
96
105
  entity?: string;
97
- /** The read contract's reason code, for a WSP001 finding: why the declaration can't be read (#2536). */
106
+ /** The read contract's reason code: for a WSP001 finding, why the declaration can't be read (#2536); for a box check, its finding code (#2726). */
98
107
  code?: ReasonCode;
99
108
  }
100
109
  export interface SuppressedFinding extends WorkspaceFinding {
@@ -1 +1 @@
1
- {"version":3,"file":"checks.d.ts","sourceRoot":"","sources":["../../src/workspace/checks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAIH,OAAO,KAAK,EAAE,cAAc,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACvE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAsD,KAAK,WAAW,EAAkC,KAAK,aAAa,EAAE,MAAM,eAAe,CAAC;AACzJ,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEjD,OAAO,EAA4C,KAAK,eAAe,EAAE,KAAK,YAAY,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C,mBAAmB,GAAG;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,EAAE,CAAA;CAAE,CAkB7F;AAED,MAAM,WAAW,uBAAuB;IACtC;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,sHAAsH;IACtH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,8FAA8F;IAC9F,OAAO,CAAC,EAAE,WAAW,CAAC;CACvB;AAED;;;;;;GAMG;AACH,wBAAsB,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,WAAW,EAAE,OAAO,GAAE;IAAE,aAAa,CAAC,EAAE,OAAO,CAAA;CAAO,GAAG,OAAO,CAAC,cAAc,CAAC,CASrJ;AAUD;;;;;;;;GAQG;AACH,wBAAsB,oBAAoB,CACxC,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAiB,EAC5C,OAAO,GAAE,uBAA4B,GACpC,OAAO,CAAC,sBAAsB,CAAC,CAsDjC"}
@@ -88,6 +88,14 @@ export interface WorkspaceReaderConformanceOptions {
88
88
  chantCommand?: string[];
89
89
  /** How long one chant run may take, in milliseconds. Default 120000. */
90
90
  timeoutMs?: number;
91
+ /**
92
+ * How the reader's chant calls reach chant (#2707). `cli`, the default,
93
+ * runs the command. `mcp` answers each call with the matching tool of one
94
+ * `chant serve mcp` session started in the workspace, and also runs the
95
+ * command, so the suite holds the tool's document to the command's: they
96
+ * must be equal. `check` has no tool and is not applicable over MCP.
97
+ */
98
+ over?: "cli" | "mcp";
91
99
  }
92
100
  export interface WorkspaceReaderConformanceConfig extends WorkspaceReaderConformanceOptions {
93
101
  /** Short label, used in the suite name. */
@@ -149,10 +157,39 @@ export declare function readerCallProblems(command: ReadContractCommand, args: s
149
157
  */
150
158
  export declare function checkReaderRead(command: ReadContractCommand, args: string[], calls: string[][], printed: ChantRun[], doc: unknown): string[];
151
159
  /** The commands to exercise and the ones skipped, from `commands`. Throws on a name that is not a contract command. */
152
- export declare function selectCommands(commands?: readonly ReadContractCommand[]): {
160
+ export declare function selectCommands(commands?: readonly ReadContractCommand[], over?: "cli" | "mcp"): {
153
161
  checked: ReadContractCommand[];
154
162
  skipped: ReadContractCommand[];
155
163
  };
164
+ /** The `chant serve mcp` tool that answers each read-contract command. `check` has none. */
165
+ export declare const MCP_READ_TOOLS: Partial<Record<ReadContractCommand, string>>;
166
+ /**
167
+ * The tool call that answers `chant <argv>`, a read-contract command with its
168
+ * arguments and JSON flag, or undefined when no tool does. Flags map to the
169
+ * tool's arguments of the same meaning; the JSON flag is dropped, since a tool
170
+ * always returns the document.
171
+ */
172
+ export declare function mcpToolCall(argv: readonly string[]): {
173
+ name: string;
174
+ arguments: Record<string, unknown>;
175
+ } | undefined;
176
+ /** One `chant serve mcp` session over stdio: JSON-RPC lines in, one response line per request out. */
177
+ export interface McpSession {
178
+ /** Call a tool and return its structured result, or reject with the error the server gave. */
179
+ call(name: string, args: Record<string, unknown>): Promise<unknown>;
180
+ close(): void;
181
+ }
182
+ /**
183
+ * Start `chant serve mcp` in `cwd` and initialize it as `clientInfo`. The
184
+ * server speaks over stdio only (ws-052): nothing here opens a port.
185
+ */
186
+ export declare function startMcpSession(command: string[], cwd: string, options?: {
187
+ clientInfo?: {
188
+ name: string;
189
+ version?: string;
190
+ };
191
+ timeoutMs?: number;
192
+ }): Promise<McpSession>;
156
193
  /** A workspace generated for a conformance run, and how to remove it. */
157
194
  export interface ConformanceWorkspace {
158
195
  dir: string;
@@ -182,11 +219,14 @@ export declare function conformanceTarget(options?: WorkspaceReaderConformanceOp
182
219
  export declare function recordingTransport(target: () => {
183
220
  workspaceDir: string;
184
221
  chantCommand: string[];
185
- }, timeoutMs?: number): {
222
+ }, timeoutMs?: number, over?: "cli" | "mcp"): {
186
223
  transport: ChantTransport;
187
224
  calls: string[][];
188
225
  printed: ChantRun[];
226
+ problems: string[];
189
227
  reset(): void;
228
+ /** Stop the MCP session, when one was started. */
229
+ close(): Promise<void>;
190
230
  };
191
231
  /** Make one read through a recording transport and check it. A reader that throws is a problem, not an error. */
192
232
  export declare function readAndCheck(reader: WorkspaceReader, recorder: ReturnType<typeof recordingTransport>, command: ReadContractCommand): Promise<ReaderReadResult>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/workspace/conformance/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAYH,0DAA0D;AAC1D,eAAO,MAAM,sBAAsB,gGAAiG,CAAC;AACrI,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE1E;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,mBAAmB,EAAE,MAAM,CAQrE,CAAC;AAEF,0GAA0G;AAC1G,eAAO,MAAM,wBAAwB,EAAE,MAAM,CAAC,mBAAmB,EAAE,SAAS,CAAC,SAAS,MAAM,EAAE,CAAC,EAAE,CAQhG,CAAC;AAEF,iGAAiG;AACjG,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,mBAAmB,EAAE,MAAM,EAAE,CAQjE,CAAC;AAEF,uEAAuE;AACvE,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,yFAAyF;AACzF,MAAM,WAAW,cAAc;IAC7B,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;CACxC;AAED,MAAM,WAAW,eAAe;IAC9B,sFAAsF;IACtF,IAAI,CAAC,OAAO,EAAE,mBAAmB,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,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AAC,MAAM,EAAE,gCAAgC,GAAG,IAAI,CAsCjG;AAED,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"vitest.d.ts","sourceRoot":"","sources":["../../../src/workspace/conformance/vitest.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAUL,KAAK,gCAAgC,EACtC,MAAM,SAAS,CAAC;AAEjB,wBAAgB,kCAAkC,CAAC,MAAM,EAAE,gCAAgC,GAAG,IAAI,CA8CjG;AAED,cAAc,SAAS,CAAC"}