@orkestrel/probe 0.0.12 → 0.0.13

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.
@@ -1,10 +1,10 @@
1
1
  import { ArrayShape } from '@orkestrel/contract';
2
- import { EmitterErrorHandler } from '@orkestrel/emitter';
3
- import { EmitterHooks } from '@orkestrel/emitter';
4
- import { EmitterInterface } from '@orkestrel/emitter';
5
- import { Guard } from '@orkestrel/contract';
2
+ import type { EmitterErrorHandler } from '@orkestrel/emitter';
3
+ import type { EmitterHooks } from '@orkestrel/emitter';
4
+ import type { EmitterInterface } from '@orkestrel/emitter';
5
+ import type { Guard } from '@orkestrel/contract';
6
6
  import { LiteralShape } from '@orkestrel/contract';
7
- import { LSPRange } from '@orkestrel/lsp';
7
+ import type { LSPRange } from '@orkestrel/lsp';
8
8
  import { ObjectShape } from '@orkestrel/contract';
9
9
  import { StringShape } from '@orkestrel/contract';
10
10
 
@@ -20,10 +20,15 @@ import { StringShape } from '@orkestrel/contract';
20
20
  * @example
21
21
  * ```ts
22
22
  * const subject: Case = {
23
- * files: [{ path: 'src/core/greeting.ts', text: "export const GREETING = 'hi'\n" }],
23
+ * files: [
24
+ * {
25
+ * path: 'src/core/factories.ts',
26
+ * text: "export function createGreeting(): string {\n\treturn 'hi'\n}\n",
27
+ * },
28
+ * ],
24
29
  * test: {
25
30
  * path: 'tmp/probe/greeting.test.ts',
26
- * text: "import { expect, test } from 'vitest'\nimport { GREETING } from '../../src/core/greeting.js'\ntest('greets', () => expect(GREETING).toBe('hi'))\n",
31
+ * text: "import { expect, test } from 'vitest'\nimport { createGreeting } from '../../src/core/factories.js'\ntest('greets', () => expect(createGreeting()).toBe('hi'))\n",
27
32
  * },
28
33
  * }
29
34
  * ```
@@ -44,15 +49,15 @@ export declare interface Case {
44
49
  * compileGuard(CASE_SHAPE)({ files: [], test }) // true
45
50
  * ```
46
51
  */
47
- export declare const CASE_SHAPE: ObjectShape<{
48
- files: ArrayShape<ObjectShape<{
49
- path: StringShape;
50
- text: StringShape;
51
- }, false>>;
52
- test: ObjectShape<{
53
- path: StringShape;
54
- text: StringShape;
55
- }, false>;
52
+ export declare const CASE_SHAPE: ObjectShape< {
53
+ files: ArrayShape<ObjectShape< {
54
+ path: StringShape;
55
+ text: StringShape;
56
+ }, false>>;
57
+ test: ObjectShape< {
58
+ path: StringShape;
59
+ text: StringShape;
60
+ }, false>;
56
61
  }, false>;
57
62
 
58
63
  /**
@@ -95,20 +100,30 @@ export declare interface Check {
95
100
  * const claim: Claim = {
96
101
  * project: 'configs/src/tsconfig.core.json',
97
102
  * case: {
98
- * files: [{ path: 'src/core/greeting.ts', text: "export const GREETING = 'hi'\n" }],
103
+ * files: [
104
+ * {
105
+ * path: 'src/core/factories.ts',
106
+ * text: "export function createGreeting(): string {\n\treturn 'hi'\n}\n",
107
+ * },
108
+ * ],
99
109
  * test: {
100
110
  * path: 'tmp/probe/greeting.test.ts',
101
- * text: "import { expect, test } from 'vitest'\nimport { GREETING } from '../../src/core/greeting.js'\ntest('greets', () => expect(GREETING).toBe('hi'))\n",
111
+ * text: "import { expect, test } from 'vitest'\nimport { createGreeting } from '../../src/core/factories.js'\ntest('greets', () => expect(createGreeting()).toBe('hi'))\n",
102
112
  * },
103
113
  * },
104
114
  * control: {
105
- * files: [{ path: 'src/core/greeting.ts', text: "export const GREETING: number = 'hi'\n" }],
115
+ * files: [
116
+ * {
117
+ * path: 'src/core/factories.ts',
118
+ * text: "export function createGreeting(): number {\n\treturn 'hi'\n}\n",
119
+ * },
120
+ * ],
106
121
  * test: {
107
122
  * path: 'tmp/probe/greeting.test.ts',
108
- * text: "import { expect, test } from 'vitest'\nimport { GREETING } from '../../src/core/greeting.js'\ntest('greets', () => expect(GREETING).toBe('hi'))\n",
123
+ * text: "import { expect, test } from 'vitest'\nimport { createGreeting } from '../../src/core/factories.js'\ntest('greets', () => expect(createGreeting()).toBe('hi'))\n",
109
124
  * },
110
125
  * stage: 'type',
111
- * reason: 'a string literal assigned to a number must not compile',
126
+ * reason: 'a string returned as a number must not compile',
112
127
  * },
113
128
  * }
114
129
  * ```
@@ -144,30 +159,30 @@ export declare interface Claim {
144
159
  * admits({ project: 'tsconfig.json' }) // false
145
160
  * ```
146
161
  */
147
- export declare const CLAIM_SHAPE: ObjectShape<{
148
- project: StringShape;
149
- case: ObjectShape<{
150
- files: ArrayShape<ObjectShape<{
151
- path: StringShape;
152
- text: StringShape;
153
- }, false>>;
154
- test: ObjectShape<{
155
- path: StringShape;
156
- text: StringShape;
157
- }, false>;
158
- }, false>;
159
- control: ObjectShape<{
160
- stage: LiteralShape<readonly ["type", "lint", "runtime"]>;
161
- reason: StringShape;
162
- files: ArrayShape<ObjectShape<{
163
- path: StringShape;
164
- text: StringShape;
165
- }, false>>;
166
- test: ObjectShape<{
167
- path: StringShape;
168
- text: StringShape;
169
- }, false>;
170
- }, false>;
162
+ export declare const CLAIM_SHAPE: ObjectShape< {
163
+ project: StringShape;
164
+ case: ObjectShape< {
165
+ files: ArrayShape<ObjectShape< {
166
+ path: StringShape;
167
+ text: StringShape;
168
+ }, false>>;
169
+ test: ObjectShape< {
170
+ path: StringShape;
171
+ text: StringShape;
172
+ }, false>;
173
+ }, false>;
174
+ control: ObjectShape< {
175
+ stage: LiteralShape<readonly ["type", "lint", "runtime"]>;
176
+ reason: StringShape;
177
+ files: ArrayShape<ObjectShape< {
178
+ path: StringShape;
179
+ text: StringShape;
180
+ }, false>>;
181
+ test: ObjectShape< {
182
+ path: StringShape;
183
+ text: StringShape;
184
+ }, false>;
185
+ }, false>;
171
186
  }, false>;
172
187
 
173
188
  /**
@@ -208,7 +223,7 @@ export declare const CLAIM_SHAPE: ObjectShape<{
208
223
  * @example
209
224
  * ```ts
210
225
  * computeReceipt(proven, 'type')
211
- * // 'probe:6ca20c3bff623031d3955b9d1a76d71d:type:typescript@6.0.3:oxlint@1.79.0:vitest@4.1.11:configs/src/tsconfig.core.json@3b674fdf121c85efb9ed1bab25ceeec8'
226
+ * // 'probe:6ca20c3bff623031d3955b9d1a76d71d:type:typescript@6.0.3:oxlint@1.79.0:vitest@4.1.11:configs/src/tsconfig.core.json@d61f11b52460b1c6707cfac2c6078d59'
212
227
  * computeReceipt(proven, 'lint') // undefined
213
228
  * ```
214
229
  */
@@ -225,13 +240,18 @@ export declare function computeReceipt(verdict: Verdict, stage: Stage): string |
225
240
  * @example
226
241
  * ```ts
227
242
  * const control: Control = {
228
- * files: [{ path: 'src/core/greeting.ts', text: "export const GREETING: number = 'hi'\n" }],
243
+ * files: [
244
+ * {
245
+ * path: 'src/core/factories.ts',
246
+ * text: "export function createGreeting(): number {\n\treturn 'hi'\n}\n",
247
+ * },
248
+ * ],
229
249
  * test: {
230
250
  * path: 'tmp/probe/greeting.test.ts',
231
- * text: "import { expect, test } from 'vitest'\nimport { GREETING } from '../../src/core/greeting.js'\ntest('greets', () => expect(GREETING).toBe('hi'))\n",
251
+ * text: "import { expect, test } from 'vitest'\nimport { createGreeting } from '../../src/core/factories.js'\ntest('greets', () => expect(createGreeting()).toBe('hi'))\n",
232
252
  * },
233
253
  * stage: 'type',
234
- * reason: 'a string literal assigned to a number must not compile',
254
+ * reason: 'a string returned as a number must not compile',
235
255
  * }
236
256
  * ```
237
257
  */
@@ -255,17 +275,17 @@ export declare interface Control extends Case {
255
275
  * compileGuard(CONTROL_SHAPE)({ files: [], test, stage: 'type', reason: 'must not compile' }) // true
256
276
  * ```
257
277
  */
258
- export declare const CONTROL_SHAPE: ObjectShape<{
259
- stage: LiteralShape<readonly ["type", "lint", "runtime"]>;
260
- reason: StringShape;
261
- files: ArrayShape<ObjectShape<{
262
- path: StringShape;
263
- text: StringShape;
264
- }, false>>;
265
- test: ObjectShape<{
266
- path: StringShape;
267
- text: StringShape;
268
- }, false>;
278
+ export declare const CONTROL_SHAPE: ObjectShape< {
279
+ stage: LiteralShape<readonly ["type", "lint", "runtime"]>;
280
+ reason: StringShape;
281
+ files: ArrayShape<ObjectShape< {
282
+ path: StringShape;
283
+ text: StringShape;
284
+ }, false>>;
285
+ test: ObjectShape< {
286
+ path: StringShape;
287
+ text: StringShape;
288
+ }, false>;
269
289
  }, false>;
270
290
 
271
291
  /**
@@ -297,7 +317,10 @@ export declare function createDestroyedError(subject: string): ProbeError;
297
317
  *
298
318
  * @example
299
319
  * ```ts
300
- * const draft: Draft = { path: 'src/core/greeting.ts', text: "export const GREETING = 'hi'\n" }
320
+ * const draft: Draft = {
321
+ * path: 'src/core/factories.ts',
322
+ * text: "export function createGreeting(): string {\n\treturn 'hi'\n}\n",
323
+ * }
301
324
  * ```
302
325
  */
303
326
  export declare interface Draft {
@@ -323,9 +346,9 @@ export declare interface Draft {
323
346
  * compileGuard(DRAFT_SHAPE)({ path: 'src/core/greeting.ts', text: '' }) // true
324
347
  * ```
325
348
  */
326
- export declare const DRAFT_SHAPE: ObjectShape<{
327
- path: StringShape;
328
- text: StringShape;
349
+ export declare const DRAFT_SHAPE: ObjectShape< {
350
+ path: StringShape;
351
+ text: StringShape;
329
352
  }, false>;
330
353
 
331
354
  /**
@@ -390,7 +413,7 @@ export declare function formatIssue(issue: Issue): string;
390
413
  * @example
391
414
  * ```ts
392
415
  * formatProof(proven)
393
- * // 'receipt probe:6ca20c3bff623031d3955b9d1a76d71d:type:typescript@6.0.3:oxlint@1.79.0:vitest@4.1.11:configs/src/tsconfig.core.json@3b674fdf121c85efb9ed1bab25ceeec8'
416
+ * // 'receipt probe:6ca20c3bff623031d3955b9d1a76d71d:type:typescript@6.0.3:oxlint@1.79.0:vitest@4.1.11:configs/src/tsconfig.core.json@d61f11b52460b1c6707cfac2c6078d59'
394
417
  * formatProof(disproven) // 'no receipt'
395
418
  * ```
396
419
  */
@@ -547,9 +570,10 @@ export declare const isControl: Guard<Control>;
547
570
  *
548
571
  * @example
549
572
  * ```ts
550
- * isDraft({ path: 'src/core/greeting.ts', text: 'export const GREETING = "hi"\n' }) // true
573
+ * const text = "export function createGreeting(): string {\n\treturn 'hi'\n}\n"
574
+ * isDraft({ path: 'src/core/factories.ts', text }) // true
551
575
  * isDraft({ path: '../../etc/hosts', text: '' }) // false
552
- * isDraft({ path: 'src/core/greeting.ts' }) // false
576
+ * isDraft({ path: 'src/core/factories.ts' }) // false
553
577
  * ```
554
578
  */
555
579
  export declare const isDraft: Guard<Draft>;
@@ -665,10 +689,11 @@ export declare const isStage: Guard<Stage>;
665
689
  * reported no location, which happens for a whole-file diagnostic. A runtime failure is not one of
666
690
  * those: a failure Vitest reported at a stack frame carries that frame's position.
667
691
  *
668
- * Each stage supplies the extent its own tool gives it. The type stage spans the diagnostic's
669
- * reported length, and the lint stage carries the span the language server published. A tool that
670
- * reports a point rather than a span, as a stack frame does, produces a zero-width range at that
671
- * point, which is the same value a span of no width would carry.
692
+ * Each stage supplies the extent its own tool gives it. The lint stage carries the span the language
693
+ * server published. A tool that reports a point rather than a span produces a zero-width range at
694
+ * that point, which is the same value a span of no width would carry, and the type stage and the
695
+ * runtime stage both report one: the compiler's plain-text output names a start position and no
696
+ * extent, and a stack frame names a position.
672
697
  *
673
698
  * `formatIssue` renders `start.line` one-based, because that is the numbering an editor shows.
674
699
  *
@@ -676,9 +701,9 @@ export declare const isStage: Guard<Stage>;
676
701
  * ```ts
677
702
  * const issue: Issue = {
678
703
  * origin: 'claimant',
679
- * path: 'src/core/greeting.ts',
704
+ * path: 'src/core/factories.ts',
680
705
  * message: "Type 'string' is not assignable to type 'number'.",
681
- * range: { start: { line: 0, character: 6 }, end: { line: 0, character: 13 } },
706
+ * range: { start: { line: 0, character: 6 }, end: { line: 0, character: 6 } },
682
707
  * }
683
708
  * ```
684
709
  */
@@ -730,8 +755,8 @@ export declare const isToolchain: Guard<Toolchain>;
730
755
  export declare const isVerdict: Guard<Verdict>;
731
756
 
732
757
  /**
733
- * Names the bound the lint stage holds over the lifecycle exchanges the protocol leaves to the
734
- * server: the `initialize` reply warming waits for and the `shutdown` reply ending waits for.
758
+ * Names the 2,000 ms bound the lint stage holds over the lifecycle exchanges the protocol leaves
759
+ * to the server: the `initialize` reply warming waits for and the `shutdown` reply ending waits for.
735
760
  *
736
761
  * @remarks
737
762
  * It does not reach the diagnostics an inspection waits for, which the caller's own signal bounds.
@@ -782,7 +807,8 @@ export declare function matchesSpecification(text: string, revision: string): bo
782
807
  export declare type Party = (typeof PROBE_PARTIES)[number];
783
808
 
784
809
  /**
785
- * Names the default inspection deadline a `Probe` applies when its construction omits one.
810
+ * Names the default inspection deadline a `Probe` applies when its construction omits one,
811
+ * 30,000 ms.
786
812
  *
787
813
  * @remarks
788
814
  * `ProbeOptions.deadline` overrides this value per instance.
@@ -795,7 +821,8 @@ export declare type Party = (typeof PROBE_PARTIES)[number];
795
821
  export declare const PROBE_DEADLINE = 30000;
796
822
 
797
823
  /**
798
- * Lists the conditions that can end a probe operation.
824
+ * Lists the conditions that can end a probe operation:
825
+ * `['refused', 'missing', 'malformed', 'destroyed', 'deadline']`.
799
826
  *
800
827
  * @remarks
801
828
  * One list feeds the code union and the error guard, so a condition cannot be constructed by one
@@ -811,7 +838,7 @@ export declare const PROBE_ERROR_CODES: readonly ["refused", "missing", "malform
811
838
 
812
839
  /**
813
840
  * Names the total enumerable key bound `ProbeServer` applies to inbound metadata and to produced
814
- * tool content alike.
841
+ * tool content alike, 4096.
815
842
  *
816
843
  * @remarks
817
844
  * `@orkestrel/mcp`'s default leaf is sized for metadata: a verdict costs 38 keys empty and 11 more
@@ -829,7 +856,8 @@ export declare const PROBE_ERROR_CODES: readonly ["refused", "missing", "malform
829
856
  export declare const PROBE_KEYS = 4096;
830
857
 
831
858
  /**
832
- * Lists the parties that can own action on an issue or probe failure.
859
+ * Lists the parties that can own action on an issue or probe failure:
860
+ * `['claimant', 'workspace', 'instrument']`.
833
861
  *
834
862
  * @remarks
835
863
  * One list feeds the `Party` type and its guard, so a party cannot be admitted by one and refused
@@ -843,7 +871,8 @@ export declare const PROBE_KEYS = 4096;
843
871
  export declare const PROBE_PARTIES: readonly ["claimant", "workspace", "instrument"];
844
872
 
845
873
  /**
846
- * Names the specification lifetime the runtime stage replaces its resident Vitest service at.
874
+ * Names the specification lifetime the runtime stage replaces its resident Vitest service at,
875
+ * 64 specifications.
847
876
  *
848
877
  * @remarks
849
878
  * Vite retains one unresolved URL for every fresh specification path, so an inspection that writes
@@ -863,7 +892,8 @@ export declare const PROBE_PARTIES: readonly ["claimant", "workspace", "instrume
863
892
  export declare const PROBE_SPECIFICATIONS = 64;
864
893
 
865
894
  /**
866
- * Lists the stages a claim passes through, in the order a verdict reports them.
895
+ * Lists the stages a claim passes through, in the order a verdict reports them:
896
+ * `['type', 'lint', 'runtime']`.
867
897
  *
868
898
  * @remarks
869
899
  * One list feeds the `Stage` type, the wire shape, the stage guard, and the receipt computation, so
@@ -1028,9 +1058,9 @@ export declare type ProbeEventMap = {
1028
1058
  * the process and a restart is a new process rather than a second lifecycle.
1029
1059
  *
1030
1060
  * `prove` re-reads the target workspace before it answers, so a file edited since the last call is
1031
- * judged as it stands on disk rather than as a warm service remembers it. The resident readers key
1032
- * that sweep differently: the runtime stage compares each workspace module's contents, and the type
1033
- * stage versions a disk file by its modification time.
1061
+ * judged as it stands on disk rather than as a warm service remembers it. Each stage keys that
1062
+ * sweep by content: the runtime stage compares each workspace module's contents, and the type stage
1063
+ * refreshes its mirror of the workspace by content digest.
1034
1064
  *
1035
1065
  * @example
1036
1066
  * ```ts
@@ -1050,7 +1080,7 @@ export declare interface ProbeInterface {
1050
1080
  * @remarks
1051
1081
  * A control carrying the case's files and the case's test byte for byte is refused at admission,
1052
1082
  * with `origin: 'claimant'` and `code: 'refused'`. No stage inspects such a claim: the refusal
1053
- * answers before the resident stages are awaited, so it reads the same in every workspace state.
1083
+ * answers before any stage is awaited, so it reads the same in every workspace state.
1054
1084
  * Such a control can only break by nondeterminism, so the receipt it would earn attests a
1055
1085
  * falsification that never happened, and a flake-earned receipt is the worst answer this package
1056
1086
  * can return. The refusal compares the bytes of each side's files and test rather than the digest
@@ -1066,9 +1096,9 @@ export declare interface ProbeInterface {
1066
1096
  */
1067
1097
  prove(claim: Claim): Promise<Verdict>;
1068
1098
  /**
1069
- * Tears down the resident engines and releases the processes they hold.
1099
+ * Tears down every stage and releases the processes and the mirror they hold.
1070
1100
  *
1071
- * @returns A promise that settles when every engine has released its resources
1101
+ * @returns A promise that settles after every stage has released its resources
1072
1102
  */
1073
1103
  destroy(): Promise<void>;
1074
1104
  }
@@ -1113,13 +1143,15 @@ export declare interface ProbeOptions {
1113
1143
  * under one project and fails under another, so a verdict that omits the project states less than
1114
1144
  * it appears to. `path` names which project file, in the resolved workspace-relative spelling
1115
1145
  * rather than the caller's. `digest` names what that project contained, because a receipt travels
1116
- * away from the workspace that minted it and a path alone is a claim about a name.
1146
+ * away from the workspace that minted it and a path alone is a claim about a name. The digest reads
1147
+ * the compiler's own printed configuration for the workspace's copy of that project, so a claim's
1148
+ * drafts cannot move it.
1117
1149
  *
1118
1150
  * @example
1119
1151
  * ```ts
1120
1152
  * const project: Project = {
1121
1153
  * path: 'configs/src/tsconfig.core.json',
1122
- * digest: '3b674fdf121c85efb9ed1bab25ceeec8',
1154
+ * digest: 'd61f11b52460b1c6707cfac2c6078d59',
1123
1155
  * }
1124
1156
  * ```
1125
1157
  */
@@ -1134,7 +1166,7 @@ export declare interface Project {
1134
1166
  }
1135
1167
 
1136
1168
  /**
1137
- * Names the leading token every receipt carries.
1169
+ * Names the leading token every receipt carries, `'probe'`.
1138
1170
  *
1139
1171
  * @remarks
1140
1172
  * A receipt travels away from the verdict that minted it — an agent pastes it into the promotion
@@ -1143,14 +1175,14 @@ export declare interface Project {
1143
1175
  * @example
1144
1176
  * ```ts
1145
1177
  * const receipt =
1146
- * 'probe:6ca20c3bff623031d3955b9d1a76d71d:type:typescript@6.0.3:oxlint@1.79.0:vitest@4.1.11:configs/src/tsconfig.core.json@3b674fdf121c85efb9ed1bab25ceeec8'
1178
+ * 'probe:6ca20c3bff623031d3955b9d1a76d71d:type:typescript@6.0.3:oxlint@1.79.0:vitest@4.1.11:configs/src/tsconfig.core.json@d61f11b52460b1c6707cfac2c6078d59'
1147
1179
  * receipt.startsWith(RECEIPT_PREFIX) // true
1148
1180
  * ```
1149
1181
  */
1150
1182
  export declare const RECEIPT_PREFIX = "probe";
1151
1183
 
1152
1184
  /**
1153
- * Names the character joining a receipt's tokens.
1185
+ * Names the character joining a receipt's tokens, `':'`.
1154
1186
  *
1155
1187
  * @remarks
1156
1188
  * A project path can contain this character, so the project field goes last and a reader rejoins
@@ -1159,14 +1191,15 @@ export declare const RECEIPT_PREFIX = "probe";
1159
1191
  * @example
1160
1192
  * ```ts
1161
1193
  * const receipt =
1162
- * 'probe:6ca20c3bff623031d3955b9d1a76d71d:type:typescript@6.0.3:oxlint@1.79.0:vitest@4.1.11:configs/src/tsconfig.core.json@3b674fdf121c85efb9ed1bab25ceeec8'
1194
+ * 'probe:6ca20c3bff623031d3955b9d1a76d71d:type:typescript@6.0.3:oxlint@1.79.0:vitest@4.1.11:configs/src/tsconfig.core.json@d61f11b52460b1c6707cfac2c6078d59'
1163
1195
  * receipt.split(RECEIPT_SEPARATOR).length // 7
1164
1196
  * ```
1165
1197
  */
1166
1198
  export declare const RECEIPT_SEPARATOR = ":";
1167
1199
 
1168
1200
  /**
1169
- * Names the Vite plugin the runtime stage installs into a target workspace's Vitest configuration.
1201
+ * Names the Vite plugin the runtime stage installs into a target workspace's Vitest
1202
+ * configuration, `'orkestrel-runtime-overlay'`.
1170
1203
  *
1171
1204
  * @remarks
1172
1205
  * The stage declares the plugin under this name and reads a configured project's plugin list for
@@ -1216,6 +1249,25 @@ export declare interface Toolchain {
1216
1249
  readonly vitest: string;
1217
1250
  }
1218
1251
 
1252
+ /**
1253
+ * Names the workspace-relative directory the type stage keeps its workspace mirror under,
1254
+ * `'tmp/type'`.
1255
+ *
1256
+ * @remarks
1257
+ * Each stage owns one directory beneath this one, named for the writing host's process id and a
1258
+ * fresh UUID, and deletes it at teardown. The directory sits under `tmp/` so nothing the stage
1259
+ * writes reaches a version-controlled path, and beside `tmp/probe/` rather than inside it because
1260
+ * the workbench Vitest project collects `tmp/probe/**` and would otherwise collect a mirrored test.
1261
+ * A target that runs its own `check`, `lint:check`, or `format:check` while a probe is resident
1262
+ * reads whatever it does not exclude, so exclude this directory there.
1263
+ *
1264
+ * @example
1265
+ * ```ts
1266
+ * TYPE_MIRROR // 'tmp/type'
1267
+ * ```
1268
+ */
1269
+ export declare const TYPE_MIRROR = "tmp/type";
1270
+
1219
1271
  /**
1220
1272
  * Carries the full result of one claim: every stage, for both the case and its control.
1221
1273
  *
@@ -1257,7 +1309,7 @@ export declare interface Toolchain {
1257
1309
  * toolchain: { typescript: '6.0.3', oxlint: '1.79.0', vitest: '4.1.11' },
1258
1310
  * project: {
1259
1311
  * path: 'configs/src/tsconfig.core.json',
1260
- * digest: '3b674fdf121c85efb9ed1bab25ceeec8',
1312
+ * digest: 'd61f11b52460b1c6707cfac2c6078d59',
1261
1313
  * },
1262
1314
  * reason: 'a number annotation must reject the string literal beside it',
1263
1315
  * case: [
@@ -1272,7 +1324,7 @@ export declare interface Toolchain {
1272
1324
  * ],
1273
1325
  * elapsed: 549,
1274
1326
  * receipt:
1275
- * 'probe:6ca20c3bff623031d3955b9d1a76d71d:type:typescript@6.0.3:oxlint@1.79.0:vitest@4.1.11:configs/src/tsconfig.core.json@3b674fdf121c85efb9ed1bab25ceeec8',
1327
+ * 'probe:6ca20c3bff623031d3955b9d1a76d71d:type:typescript@6.0.3:oxlint@1.79.0:vitest@4.1.11:configs/src/tsconfig.core.json@d61f11b52460b1c6707cfac2c6078d59',
1276
1328
  * }
1277
1329
  * ```
1278
1330
  */
@@ -2,7 +2,8 @@ import { andOf, arrayOf, arrayShape, holds, isError, isNonEmptyString, isNumber,
2
2
  import { isLSPRange } from "@orkestrel/lsp";
3
3
  //#region src/core/constants.ts
4
4
  /**
5
- * Lists the stages a claim passes through, in the order a verdict reports them.
5
+ * Lists the stages a claim passes through, in the order a verdict reports them:
6
+ * `['type', 'lint', 'runtime']`.
6
7
  *
7
8
  * @remarks
8
9
  * One list feeds the `Stage` type, the wire shape, the stage guard, and the receipt computation, so
@@ -20,7 +21,8 @@ var PROBE_STAGES = Object.freeze([
20
21
  "runtime"
21
22
  ]);
22
23
  /**
23
- * Lists the parties that can own action on an issue or probe failure.
24
+ * Lists the parties that can own action on an issue or probe failure:
25
+ * `['claimant', 'workspace', 'instrument']`.
24
26
  *
25
27
  * @remarks
26
28
  * One list feeds the `Party` type and its guard, so a party cannot be admitted by one and refused
@@ -37,7 +39,8 @@ var PROBE_PARTIES = Object.freeze([
37
39
  "instrument"
38
40
  ]);
39
41
  /**
40
- * Lists the conditions that can end a probe operation.
42
+ * Lists the conditions that can end a probe operation:
43
+ * `['refused', 'missing', 'malformed', 'destroyed', 'deadline']`.
41
44
  *
42
45
  * @remarks
43
46
  * One list feeds the code union and the error guard, so a condition cannot be constructed by one
@@ -57,7 +60,7 @@ var PROBE_ERROR_CODES = Object.freeze([
57
60
  "deadline"
58
61
  ]);
59
62
  /**
60
- * Names the leading token every receipt carries.
63
+ * Names the leading token every receipt carries, `'probe'`.
61
64
  *
62
65
  * @remarks
63
66
  * A receipt travels away from the verdict that minted it — an agent pastes it into the promotion
@@ -66,13 +69,13 @@ var PROBE_ERROR_CODES = Object.freeze([
66
69
  * @example
67
70
  * ```ts
68
71
  * const receipt =
69
- * 'probe:6ca20c3bff623031d3955b9d1a76d71d:type:typescript@6.0.3:oxlint@1.79.0:vitest@4.1.11:configs/src/tsconfig.core.json@3b674fdf121c85efb9ed1bab25ceeec8'
72
+ * 'probe:6ca20c3bff623031d3955b9d1a76d71d:type:typescript@6.0.3:oxlint@1.79.0:vitest@4.1.11:configs/src/tsconfig.core.json@d61f11b52460b1c6707cfac2c6078d59'
70
73
  * receipt.startsWith(RECEIPT_PREFIX) // true
71
74
  * ```
72
75
  */
73
76
  var RECEIPT_PREFIX = "probe";
74
77
  /**
75
- * Names the character joining a receipt's tokens.
78
+ * Names the character joining a receipt's tokens, `':'`.
76
79
  *
77
80
  * @remarks
78
81
  * A project path can contain this character, so the project field goes last and a reader rejoins
@@ -81,13 +84,14 @@ var RECEIPT_PREFIX = "probe";
81
84
  * @example
82
85
  * ```ts
83
86
  * const receipt =
84
- * 'probe:6ca20c3bff623031d3955b9d1a76d71d:type:typescript@6.0.3:oxlint@1.79.0:vitest@4.1.11:configs/src/tsconfig.core.json@3b674fdf121c85efb9ed1bab25ceeec8'
87
+ * 'probe:6ca20c3bff623031d3955b9d1a76d71d:type:typescript@6.0.3:oxlint@1.79.0:vitest@4.1.11:configs/src/tsconfig.core.json@d61f11b52460b1c6707cfac2c6078d59'
85
88
  * receipt.split(RECEIPT_SEPARATOR).length // 7
86
89
  * ```
87
90
  */
88
91
  var RECEIPT_SEPARATOR = ":";
89
92
  /**
90
- * Names the default inspection deadline a `Probe` applies when its construction omits one.
93
+ * Names the default inspection deadline a `Probe` applies when its construction omits one,
94
+ * 30,000 ms.
91
95
  *
92
96
  * @remarks
93
97
  * `ProbeOptions.deadline` overrides this value per instance.
@@ -99,8 +103,8 @@ var RECEIPT_SEPARATOR = ":";
99
103
  */
100
104
  var PROBE_DEADLINE = 3e4;
101
105
  /**
102
- * Names the bound the lint stage holds over the lifecycle exchanges the protocol leaves to the
103
- * server: the `initialize` reply warming waits for and the `shutdown` reply ending waits for.
106
+ * Names the 2,000 ms bound the lint stage holds over the lifecycle exchanges the protocol leaves
107
+ * to the server: the `initialize` reply warming waits for and the `shutdown` reply ending waits for.
104
108
  *
105
109
  * @remarks
106
110
  * It does not reach the diagnostics an inspection waits for, which the caller's own signal bounds.
@@ -117,7 +121,7 @@ var PROBE_DEADLINE = 3e4;
117
121
  var LINT_DEADLINE = 2e3;
118
122
  /**
119
123
  * Names the total enumerable key bound `ProbeServer` applies to inbound metadata and to produced
120
- * tool content alike.
124
+ * tool content alike, 4096.
121
125
  *
122
126
  * @remarks
123
127
  * `@orkestrel/mcp`'s default leaf is sized for metadata: a verdict costs 38 keys empty and 11 more
@@ -134,7 +138,8 @@ var LINT_DEADLINE = 2e3;
134
138
  */
135
139
  var PROBE_KEYS = 4096;
136
140
  /**
137
- * Names the specification lifetime the runtime stage replaces its resident Vitest service at.
141
+ * Names the specification lifetime the runtime stage replaces its resident Vitest service at,
142
+ * 64 specifications.
138
143
  *
139
144
  * @remarks
140
145
  * Vite retains one unresolved URL for every fresh specification path, so an inspection that writes
@@ -153,7 +158,8 @@ var PROBE_KEYS = 4096;
153
158
  */
154
159
  var PROBE_SPECIFICATIONS = 64;
155
160
  /**
156
- * Names the Vite plugin the runtime stage installs into a target workspace's Vitest configuration.
161
+ * Names the Vite plugin the runtime stage installs into a target workspace's Vitest
162
+ * configuration, `'orkestrel-runtime-overlay'`.
157
163
  *
158
164
  * @remarks
159
165
  * The stage declares the plugin under this name and reads a configured project's plugin list for
@@ -166,6 +172,24 @@ var PROBE_SPECIFICATIONS = 64;
166
172
  * ```
167
173
  */
168
174
  var RUNTIME_PLUGIN = "orkestrel-runtime-overlay";
175
+ /**
176
+ * Names the workspace-relative directory the type stage keeps its workspace mirror under,
177
+ * `'tmp/type'`.
178
+ *
179
+ * @remarks
180
+ * Each stage owns one directory beneath this one, named for the writing host's process id and a
181
+ * fresh UUID, and deletes it at teardown. The directory sits under `tmp/` so nothing the stage
182
+ * writes reaches a version-controlled path, and beside `tmp/probe/` rather than inside it because
183
+ * the workbench Vitest project collects `tmp/probe/**` and would otherwise collect a mirrored test.
184
+ * A target that runs its own `check`, `lint:check`, or `format:check` while a probe is resident
185
+ * reads whatever it does not exclude, so exclude this directory there.
186
+ *
187
+ * @example
188
+ * ```ts
189
+ * TYPE_MIRROR // 'tmp/type'
190
+ * ```
191
+ */
192
+ var TYPE_MIRROR = "tmp/type";
169
193
  //#endregion
170
194
  //#region src/core/errors.ts
171
195
  /**
@@ -295,9 +319,10 @@ var isStage = literalOf(PROBE_STAGES);
295
319
  *
296
320
  * @example
297
321
  * ```ts
298
- * isDraft({ path: 'src/core/greeting.ts', text: 'export const GREETING = "hi"\n' }) // true
322
+ * const text = "export function createGreeting(): string {\n\treturn 'hi'\n}\n"
323
+ * isDraft({ path: 'src/core/factories.ts', text }) // true
299
324
  * isDraft({ path: '../../etc/hosts', text: '' }) // false
300
- * isDraft({ path: 'src/core/greeting.ts' }) // false
325
+ * isDraft({ path: 'src/core/factories.ts' }) // false
301
326
  * ```
302
327
  */
303
328
  var isDraft = recordOf({
@@ -570,7 +595,7 @@ function formatCheck(check) {
570
595
  * @example
571
596
  * ```ts
572
597
  * formatProof(proven)
573
- * // 'receipt probe:6ca20c3bff623031d3955b9d1a76d71d:type:typescript@6.0.3:oxlint@1.79.0:vitest@4.1.11:configs/src/tsconfig.core.json@3b674fdf121c85efb9ed1bab25ceeec8'
598
+ * // 'receipt probe:6ca20c3bff623031d3955b9d1a76d71d:type:typescript@6.0.3:oxlint@1.79.0:vitest@4.1.11:configs/src/tsconfig.core.json@d61f11b52460b1c6707cfac2c6078d59'
574
599
  * formatProof(disproven) // 'no receipt'
575
600
  * ```
576
601
  */
@@ -682,7 +707,7 @@ function formatVerdict(verdict) {
682
707
  * @example
683
708
  * ```ts
684
709
  * computeReceipt(proven, 'type')
685
- * // 'probe:6ca20c3bff623031d3955b9d1a76d71d:type:typescript@6.0.3:oxlint@1.79.0:vitest@4.1.11:configs/src/tsconfig.core.json@3b674fdf121c85efb9ed1bab25ceeec8'
710
+ * // 'probe:6ca20c3bff623031d3955b9d1a76d71d:type:typescript@6.0.3:oxlint@1.79.0:vitest@4.1.11:configs/src/tsconfig.core.json@d61f11b52460b1c6707cfac2c6078d59'
686
711
  * computeReceipt(proven, 'lint') // undefined
687
712
  * ```
688
713
  */
@@ -836,6 +861,6 @@ var CLAIM_SHAPE = objectShape({
836
861
  control: CONTROL_SHAPE
837
862
  }, { description: "One claim: the project, the case, and the control that must break." });
838
863
  //#endregion
839
- export { CASE_SHAPE, CLAIM_SHAPE, CONTROL_SHAPE, DRAFT_SHAPE, LINT_DEADLINE, PROBE_DEADLINE, PROBE_ERROR_CODES, PROBE_KEYS, PROBE_PARTIES, PROBE_SPECIFICATIONS, PROBE_STAGES, ProbeError, RECEIPT_PREFIX, RECEIPT_SEPARATOR, RUNTIME_PLUGIN, computeReceipt, createDestroyedError, formatCheck, formatIssue, formatProof, formatReceipt, formatSpecification, formatVerdict, isCase, isCheck, isClaim, isControl, isDraft, isIssue, isParty, isProbeError, isProject, isStage, isToolchain, isVerdict, matchesSpecification };
864
+ export { CASE_SHAPE, CLAIM_SHAPE, CONTROL_SHAPE, DRAFT_SHAPE, LINT_DEADLINE, PROBE_DEADLINE, PROBE_ERROR_CODES, PROBE_KEYS, PROBE_PARTIES, PROBE_SPECIFICATIONS, PROBE_STAGES, ProbeError, RECEIPT_PREFIX, RECEIPT_SEPARATOR, RUNTIME_PLUGIN, TYPE_MIRROR, computeReceipt, createDestroyedError, formatCheck, formatIssue, formatProof, formatReceipt, formatSpecification, formatVerdict, isCase, isCheck, isClaim, isControl, isDraft, isIssue, isParty, isProbeError, isProject, isStage, isToolchain, isVerdict, matchesSpecification };
840
865
 
841
866
  //# sourceMappingURL=index.js.map