geospec 0.0.0 → 0.1.0-beta.3

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 (100) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +244 -0
  3. package/agent/doctrine.md +55 -0
  4. package/agent/geospec-authoring/SKILL.md +495 -0
  5. package/agent/geospec-authoring/api-classes.md +13 -0
  6. package/agent/geospec-authoring/api-constants.md +16 -0
  7. package/agent/geospec-authoring/api-functions.md +57 -0
  8. package/agent/geospec-authoring/api-index.md +377 -0
  9. package/agent/geospec-authoring/api-types.md +1788 -0
  10. package/agent/geospec-authoring/public-api-classes.md +22 -0
  11. package/agent/geospec-authoring/public-api-constants.md +51 -0
  12. package/agent/geospec-authoring/public-api-functions.md +215 -0
  13. package/agent/geospec-authoring/public-api-index.md +893 -0
  14. package/agent/geospec-authoring/public-api-types-2.md +1560 -0
  15. package/agent/geospec-authoring/public-api-types-3.md +217 -0
  16. package/agent/geospec-authoring/public-api-types.md +1948 -0
  17. package/agent/resources.d.ts +19 -0
  18. package/agent/resources.js +27 -0
  19. package/agent/skills.d.cts +13 -0
  20. package/agent/skills.json +28 -0
  21. package/dist/assertion-client/client.d.mts +134 -0
  22. package/dist/assertion-client/client.mjs +2 -0
  23. package/dist/assertion-client/index.d.mts +5 -0
  24. package/dist/assertion-client/index.mjs +1 -0
  25. package/dist/config/index.d.mts +3 -0
  26. package/dist/config/index.mjs +1 -0
  27. package/dist/config/node/index.d.mts +3 -0
  28. package/dist/config/node/index.mjs +1 -0
  29. package/dist/config/node/load.d.mts +19 -0
  30. package/dist/config/node/load.mjs +1 -0
  31. package/dist/config/tau-project-artifact.d.mts +54 -0
  32. package/dist/config/tau-project-artifact.mjs +3 -0
  33. package/dist/config/types.d.mts +57 -0
  34. package/dist/config/validate.mjs +1 -0
  35. package/dist/create-geospec.d.mts +50 -0
  36. package/dist/create-geospec.mjs +1 -0
  37. package/dist/engine/client.d.mts +113 -0
  38. package/dist/engine/client.mjs +1 -0
  39. package/dist/engine/index.d.mts +3 -0
  40. package/dist/engine/index.mjs +1 -0
  41. package/dist/engine/matchers.d.mts +70 -0
  42. package/dist/engine/matchers.mjs +1 -0
  43. package/dist/engine/pmi.types.d.mts +78 -0
  44. package/dist/engine/protocol.d.mts +20 -0
  45. package/dist/engine/protocol.mjs +1 -0
  46. package/dist/geometry-unit.d.mts +12 -0
  47. package/dist/index.d.mts +6 -0
  48. package/dist/index.mjs +1 -0
  49. package/dist/mesh/index.d.mts +4 -0
  50. package/dist/mesh/index.mjs +1 -0
  51. package/dist/mesh/types.d.mts +575 -0
  52. package/dist/model/errors.d.mts +20 -0
  53. package/dist/model/errors.mjs +2 -0
  54. package/dist/model/export-intent.d.mts +79 -0
  55. package/dist/model/export-intent.mjs +1 -0
  56. package/dist/model/index.d.mts +7 -0
  57. package/dist/model/index.mjs +1 -0
  58. package/dist/model/load-model.d.mts +25 -0
  59. package/dist/model/load-model.mjs +1 -0
  60. package/dist/model/native-model-loader.d.mts +142 -0
  61. package/dist/model/native-model-loader.mjs +1 -0
  62. package/dist/model/region-scope.d.mts +23 -0
  63. package/dist/model/region-scope.mjs +1 -0
  64. package/dist/model/subject-assertions.mjs +1 -0
  65. package/dist/model/subject.d.mts +11 -0
  66. package/dist/model/subject.mjs +1 -0
  67. package/dist/model/types.d.mts +254 -0
  68. package/dist/runner/collector.d.mts +64 -0
  69. package/dist/runner/collector.mjs +2 -0
  70. package/dist/runner/discovery.d.mts +93 -0
  71. package/dist/runner/discovery.mjs +1 -0
  72. package/dist/runner/filter.d.mts +50 -0
  73. package/dist/runner/filter.mjs +1 -0
  74. package/dist/runner/index.d.mts +7 -0
  75. package/dist/runner/index.mjs +1 -0
  76. package/dist/runner/native/index.d.mts +4 -0
  77. package/dist/runner/native/index.mjs +1 -0
  78. package/dist/runner/native/native-pool-grants.d.mts +21 -0
  79. package/dist/runner/native/native-pool-grants.mjs +1 -0
  80. package/dist/runner/native/native-serial-runner.d.mts +29 -0
  81. package/dist/runner/native/native-serial-runner.mjs +1 -0
  82. package/dist/runner/pool/pool-messages.d.mts +94 -0
  83. package/dist/runner/run-geospec-module.d.mts +13 -0
  84. package/dist/runner/run-geospec-module.mjs +47 -0
  85. package/dist/runner/timeout-codes.d.mts +45 -0
  86. package/dist/runner/timeout-codes.mjs +1 -0
  87. package/dist/runner/types.d.mts +776 -0
  88. package/dist/runner/worker/index.d.mts +4 -0
  89. package/dist/runner/worker/index.mjs +1 -0
  90. package/dist/runner/worker/no-matching-tests-issue.d.mts +12 -0
  91. package/dist/runner/worker/no-matching-tests-issue.mjs +1 -0
  92. package/dist/runner/worker/runner-types.d.mts +167 -0
  93. package/dist/runner/worker/serial-runner.mjs +1 -0
  94. package/dist/selector/types.d.mts +271 -0
  95. package/dist/step/types.d.mts +134 -0
  96. package/dist/vitest/adapter.d.mts +56 -0
  97. package/dist/vitest/adapter.mjs +3 -0
  98. package/dist/vitest/index.d.mts +4 -0
  99. package/dist/vitest/index.mjs +1 -0
  100. package/package.json +114 -5
@@ -0,0 +1,1560 @@
1
+ # geospec — Types (2)
2
+
3
+ 67 top-level symbols. Signatures are verbatim typescript.
4
+
5
+ // Inline code-CAD model load options
6
+ LoadModelCodeOptions: {
7
+ /** Source files keyed by project-relative path. */
8
+ code: Code;
9
+ /** Entry path to render from {@link code}. */
10
+ file: keyof Code & string;
11
+ /** Geometry format to export. Defaults to `glb`. */
12
+ format?: GeoSpecModelFormat;
13
+ /** Explicit parameters passed to the runtime. */
14
+ parameters?: Record<string, unknown>;
15
+ /** Runtime client or lazy runtime factory. */
16
+ runtime?: GeoSpecRuntimeClient | GeoSpecRuntimeClientFactory;
17
+ /** Source-specific runtime adapters, e.g. host-provided GPL-isolated kernels. */
18
+ sourceAdapters?: readonly GeoSpecRuntimeSourceAdapter[];
19
+ /** Project root used by runtime integrations. */
20
+ projectPath?: string;
21
+ /** STEP reader strategy used for STEP exports. */
22
+ stepStreaming?: StepStreamingMode;
23
+ /** Whether STEP loading should also produce mesh evidence. Defaults to true. */
24
+ mesh?: boolean;
25
+ /** Linear tolerance used while meshing exact BRep evidence. */
26
+ meshLinearTolerance?: number;
27
+ /** Angular tolerance in degrees used while meshing exact BRep evidence. */
28
+ meshAngularToleranceDegrees?: number;
29
+ /**
30
+ * Default work-unit budget for every claim on this subject: a positive integer no greater than
31
+ * the host's maximum (default `geoSpecMaximumWorkUnitLimit`, 512 000 000). `expectGeo(subject, { workUnitLimit })` overrides
32
+ * it per chain. Recorded in the load evidence; it never changes the exported or admitted bytes.
33
+ */
34
+ workUnitLimit?: number;
35
+ /**
36
+ * Axis-aligned millimetre box the kernel crops the model to before export, so a large mesh model
37
+ * can be checked region by region. Only kernels whose direct GLB export declares a `region` option
38
+ * honor it; any other kernel, a STEP load or a crop the kernel does not confirm refuses with a typed
39
+ * diagnostic instead of loading the whole model. The cropped subject is a different subject: its
40
+ * admission carries the kernel's crop notice and its load evidence records `region`, so a claim on
41
+ * it never stands for the whole model.
42
+ */
43
+ region?: GeoSpecLoadRegion;
44
+ }
45
+
46
+ // Source files keyed by project-relative path
47
+ code: Code
48
+
49
+ // Entry path to render from {@link code }
50
+ file: keyof Code & string
51
+
52
+ // Geometry format to export
53
+ format?: GeoSpecModelFormat
54
+
55
+ // Explicit parameters passed to the runtime
56
+ parameters?: Record<string, unknown>
57
+
58
+ // Runtime client or lazy runtime factory
59
+ runtime?: GeoSpecRuntimeClient | GeoSpecRuntimeClientFactory
60
+
61
+ // Source-specific runtime adapters, e.g
62
+ sourceAdapters?: readonly GeoSpecRuntimeSourceAdapter[]
63
+
64
+ // Project root used by runtime integrations
65
+ projectPath?: string
66
+
67
+ // STEP reader strategy used for STEP exports
68
+ stepStreaming?: StepStreamingMode
69
+
70
+ // Whether STEP loading should also produce mesh evidence
71
+ mesh?: boolean
72
+
73
+ // Linear tolerance used while meshing exact BRep evidence
74
+ meshLinearTolerance?: number
75
+
76
+ // Angular tolerance in degrees used while meshing exact BRep evidence
77
+ meshAngularToleranceDegrees?: number
78
+
79
+ // Default work-unit budget for every claim on this subject
80
+ workUnitLimit?: number
81
+
82
+ // Axis-aligned millimetre box the kernel crops the model to before export, so a large mesh model can be checked region by region
83
+ region?: GeoSpecLoadRegion
84
+
85
+ // Filesystem-backed model load options
86
+ LoadModelFileOptions: {
87
+ /** Project-relative model file to render. */
88
+ file: string;
89
+ /** Project root used by runtime integrations. */
90
+ projectPath?: string;
91
+ /** Geometry format to export. Defaults to `glb`. */
92
+ format?: GeoSpecModelFormat;
93
+ /** Explicit parameters passed to the runtime. */
94
+ parameters?: Record<string, unknown>;
95
+ /** Runtime client or lazy runtime factory. */
96
+ runtime?: GeoSpecRuntimeClient | GeoSpecRuntimeClientFactory;
97
+ /** Source-specific runtime adapters, e.g. host-provided GPL-isolated kernels. */
98
+ sourceAdapters?: readonly GeoSpecRuntimeSourceAdapter[];
99
+ /** STEP reader strategy used for STEP exports. */
100
+ stepStreaming?: StepStreamingMode;
101
+ /** Whether STEP loading should also produce mesh evidence. Defaults to true. */
102
+ mesh?: boolean;
103
+ /** Linear tolerance used while meshing exact BRep evidence. */
104
+ meshLinearTolerance?: number;
105
+ /** Angular tolerance in degrees used while meshing exact BRep evidence. */
106
+ meshAngularToleranceDegrees?: number;
107
+ /**
108
+ * Default work-unit budget for every claim on this subject: a positive integer no greater than
109
+ * the host's maximum (default `geoSpecMaximumWorkUnitLimit`, 512 000 000). `expectGeo(subject, { workUnitLimit })` overrides
110
+ * it per chain. Recorded in the load evidence; it never changes the exported or admitted bytes.
111
+ */
112
+ workUnitLimit?: number;
113
+ /**
114
+ * Axis-aligned millimetre box the kernel crops the model to before export, so a large mesh model
115
+ * can be checked region by region. Only kernels whose direct GLB export declares a `region` option
116
+ * honor it; any other kernel, a STEP load or a crop the kernel does not confirm refuses with a typed
117
+ * diagnostic instead of loading the whole model. The cropped subject is a different subject: its
118
+ * admission carries the kernel's crop notice and its load evidence records `region`, so a claim on
119
+ * it never stands for the whole model.
120
+ */
121
+ region?: GeoSpecLoadRegion;
122
+ }
123
+
124
+ // Project-relative model file to render
125
+ file: string
126
+
127
+ // Project root used by runtime integrations
128
+ projectPath?: string
129
+
130
+ // Geometry format to export
131
+ format?: GeoSpecModelFormat
132
+
133
+ // Explicit parameters passed to the runtime
134
+ parameters?: Record<string, unknown>
135
+
136
+ // Runtime client or lazy runtime factory
137
+ runtime?: GeoSpecRuntimeClient | GeoSpecRuntimeClientFactory
138
+
139
+ // Source-specific runtime adapters, e.g
140
+ sourceAdapters?: readonly GeoSpecRuntimeSourceAdapter[]
141
+
142
+ // STEP reader strategy used for STEP exports
143
+ stepStreaming?: StepStreamingMode
144
+
145
+ // Whether STEP loading should also produce mesh evidence
146
+ mesh?: boolean
147
+
148
+ // Linear tolerance used while meshing exact BRep evidence
149
+ meshLinearTolerance?: number
150
+
151
+ // Angular tolerance in degrees used while meshing exact BRep evidence
152
+ meshAngularToleranceDegrees?: number
153
+
154
+ // Default work-unit budget for every claim on this subject
155
+ workUnitLimit?: number
156
+
157
+ // Axis-aligned millimetre box the kernel crops the model to before export, so a large mesh model can be checked region by region
158
+ region?: GeoSpecLoadRegion
159
+
160
+ // Options accepted by {@link import ('./load-model.js').loadModel}
161
+ LoadModelOptions: LoadModelSourceOptions | LoadModelCodeOptions<Code> | LoadModelFileOptions
162
+
163
+ // Geometry format to export
164
+ format?: GeoSpecModelFormat
165
+
166
+ // Explicit parameters passed to the runtime
167
+ parameters?: Record<string, unknown>
168
+
169
+ // STEP reader strategy used for STEP exports
170
+ stepStreaming?: StepStreamingMode
171
+
172
+ // Whether STEP loading should also produce mesh evidence
173
+ mesh?: boolean
174
+
175
+ // Linear tolerance used while meshing exact BRep evidence
176
+ meshLinearTolerance?: number
177
+
178
+ // Angular tolerance in degrees used while meshing exact BRep evidence
179
+ meshAngularToleranceDegrees?: number
180
+
181
+ // Default work-unit budget for every claim on this subject
182
+ workUnitLimit?: number
183
+
184
+ // Direct geometry-source model load options
185
+ LoadModelSourceOptions: {
186
+ /** Geometry bytes, path, browser file/blob, or in-memory mesh buffer. */
187
+ source: MeshSource | StepSource;
188
+ /** Named external resources consumed alongside the direct geometry bytes. */
189
+ resources?: ReadonlyArray<{
190
+ readonly name: string;
191
+ readonly source: MeshSource | StepSource;
192
+ }>;
193
+ /** Source geometry format. Defaults to `glb`. */
194
+ format?: GeoSpecModelFormat;
195
+ /** Source path recorded in provenance. */
196
+ path?: string;
197
+ /** Human-readable source name recorded in provenance. */
198
+ name?: string;
199
+ /** Coordinate unit of raw GLB/glTF or mesh-buffer data before canonical millimetre normalization. */
200
+ sourceUnit?: GeoSpecUnit;
201
+ /** Explicit parameters recorded in provenance. */
202
+ parameters?: Record<string, unknown>;
203
+ /** STEP reader strategy used for STEP sources. */
204
+ stepStreaming?: StepStreamingMode;
205
+ /** Whether STEP loading should also produce mesh evidence. Defaults to true. */
206
+ mesh?: boolean;
207
+ /** Linear tolerance used while meshing exact BRep evidence. */
208
+ meshLinearTolerance?: number;
209
+ /** Angular tolerance in degrees used while meshing exact BRep evidence. */
210
+ meshAngularToleranceDegrees?: number;
211
+ /**
212
+ * Default work-unit budget for every claim on this subject: a positive integer no greater than
213
+ * the host's maximum (default `geoSpecMaximumWorkUnitLimit`, 512 000 000). `expectGeo(subject, { workUnitLimit })` overrides
214
+ * it per chain. Recorded in the load evidence; it never changes the exported or admitted bytes.
215
+ */
216
+ workUnitLimit?: number;
217
+ }
218
+
219
+ // Geometry bytes, path, browser file/blob, or in-memory mesh buffer
220
+ source: MeshSource | StepSource
221
+
222
+ // Named external resources consumed alongside the direct geometry bytes
223
+ resources?: ReadonlyArray<{
224
+ readonly name: string;
225
+ readonly source: MeshSource | StepSource;
226
+ }>
227
+
228
+ // Source geometry format
229
+ format?: GeoSpecModelFormat
230
+
231
+ // Source path recorded in provenance
232
+ path?: string
233
+
234
+ // Human-readable source name recorded in provenance
235
+ name?: string
236
+
237
+ // Coordinate unit of raw GLB/glTF or mesh-buffer data before canonical millimetre normalization
238
+ sourceUnit?: GeoSpecUnit
239
+
240
+ // Explicit parameters recorded in provenance
241
+ parameters?: Record<string, unknown>
242
+
243
+ // STEP reader strategy used for STEP sources
244
+ stepStreaming?: StepStreamingMode
245
+
246
+ // Whether STEP loading should also produce mesh evidence
247
+ mesh?: boolean
248
+
249
+ // Linear tolerance used while meshing exact BRep evidence
250
+ meshLinearTolerance?: number
251
+
252
+ // Angular tolerance in degrees used while meshing exact BRep evidence
253
+ meshAngularToleranceDegrees?: number
254
+
255
+ // Default work-unit budget for every claim on this subject
256
+ workUnitLimit?: number
257
+
258
+ // Collects suites, tests, assertions, and async completion state for one GeoSpec module execution
259
+ GeoSpecCollector: {
260
+ tests: GeoSpecTestCase[];
261
+ describe(name: string, function_: GeoSpecTestFunction): void;
262
+ describeSkip(name: string, _function?: GeoSpecTestFunction): void;
263
+ it(name: string, function_: GeoSpecTestFunction): void;
264
+ itSkip(name: string, _function?: GeoSpecTestFunction): void;
265
+ expectGeo(subject: unknown, options?: GeoSpecExpectOptions): GeoSpecMatcher;
266
+ waitForCompletion(testTimeout?: number, testNamePattern?: GeoSpecTestNamePattern): Promise<void>;
267
+ }
268
+
269
+ tests: GeoSpecTestCase[]
270
+
271
+ // GeoSpecCollector.describe (method)
272
+ describe(name: string, function_: GeoSpecTestFunction): void;
273
+
274
+ // GeoSpecCollector.describeSkip (method)
275
+ describeSkip(name: string, _function?: GeoSpecTestFunction): void;
276
+
277
+ // GeoSpecCollector.it (method)
278
+ it(name: string, function_: GeoSpecTestFunction): void;
279
+
280
+ // GeoSpecCollector.itSkip (method)
281
+ itSkip(name: string, _function?: GeoSpecTestFunction): void;
282
+
283
+ // GeoSpecCollector.expectGeo (method)
284
+ expectGeo(subject: unknown, options?: GeoSpecExpectOptions): GeoSpecMatcher;
285
+
286
+ // GeoSpecCollector.waitForCompletion (method)
287
+ waitForCompletion(testTimeout?: number, testNamePattern?: GeoSpecTestNamePattern): Promise<void>;
288
+
289
+ // Per-module collector configuration
290
+ GeoSpecCollectorOptions: {
291
+ matcherWallBackstop?: number;
292
+ forensic?: boolean;
293
+ nativeAssertions: GeoSpecAssertionClientOptions;
294
+ /** Observes each selected test as it starts and settles, for host progress reporting. */
295
+ onTestEvent?: (event: GeoSpecTestEvent) => void;
296
+ }
297
+
298
+ matcherWallBackstop?: number
299
+
300
+ forensic?: boolean
301
+
302
+ nativeAssertions: GeoSpecAssertionClientOptions
303
+
304
+ // Observes each selected test as it starts and settles, for host progress reporting
305
+ onTestEvent?: (event: GeoSpecTestEvent) => void
306
+
307
+ // Compiled Vitest-style test-name pattern used by a GeoSpec run
308
+ GeoSpecTestNamePattern: RegExp
309
+
310
+ // One GeoSpec timeout code
311
+ GeoSpecTimeoutCode: (typeof geoSpecTimeoutCode)[keyof typeof geoSpecTimeoutCode]
312
+
313
+ // Options for recursive GeoSpec test discovery
314
+ // Remarks: `files` accepts either exact `*.geospec.ts` / `*.geospec.js` files or directory roots. When omitted, discovery starts at `projectPath`. `include` and `exclude` are Vitest-style file globs applied to project-relative GeoSpec paths after `files` roots have been expanded.
315
+ DiscoverGeoSpecFilesOptions: {
316
+ filesystem: GeoSpecDiscoveryFileSystem;
317
+ projectPath: string;
318
+ files?: readonly string[];
319
+ include?: readonly string[];
320
+ exclude?: readonly string[];
321
+ ignoredDirectories?: readonly string[];
322
+ }
323
+
324
+ filesystem: GeoSpecDiscoveryFileSystem
325
+
326
+ projectPath: string
327
+
328
+ files?: readonly string[]
329
+
330
+ include?: readonly string[]
331
+
332
+ exclude?: readonly string[]
333
+
334
+ ignoredDirectories?: readonly string[]
335
+
336
+ // File kind returned by a GeoSpec discovery filesystem
337
+ GeoSpecDiscoveryFileKind: 'file' | 'directory'
338
+
339
+ // Minimal stat object required for recursive GeoSpec test discovery
340
+ GeoSpecDiscoveryFileStat: {
341
+ kind: GeoSpecDiscoveryFileKind;
342
+ }
343
+
344
+ kind: GeoSpecDiscoveryFileKind
345
+
346
+ // Minimal filesystem contract used by GeoSpec test discovery
347
+ // Remarks: Browser workers, Node CLI hosts, and embedded runners adapt their native filesystem APIs to this shape so discovery has one shared behavior.
348
+ GeoSpecDiscoveryFileSystem: {
349
+ readdir(path: string): Promise<readonly string[]>;
350
+ stat(path: string): Promise<GeoSpecDiscoveryFileStat>;
351
+ }
352
+
353
+ // GeoSpecDiscoveryFileSystem.readdir (method)
354
+ readdir(path: string): Promise<readonly string[]>;
355
+
356
+ // GeoSpecDiscoveryFileSystem.stat (method)
357
+ stat(path: string): Promise<GeoSpecDiscoveryFileStat>;
358
+
359
+ // Result returned by recursive GeoSpec test discovery
360
+ // Remarks: `files` are project-relative, sorted, and de-duplicated. `unmatchedRoots` contains requested file or directory roots that did not select any GeoSpec files.
361
+ GeoSpecDiscoveryResult: {
362
+ files: string[];
363
+ unmatchedRoots: string[];
364
+ }
365
+
366
+ files: string[]
367
+
368
+ unmatchedRoots: string[]
369
+
370
+ // Worker-local cache for successful GeoSpec bundles
371
+ // Remarks: The cache is internal runner infrastructure. Each invocation still creates a fresh collector, run token and host binding, so runs that reuse one entry stay isolated. An entry is reused only while every read its bundle was built from still returns the answer the bundler got.
372
+ GeoSpecModuleBundleCache: Map<string, {
373
+ builtinIdentity: string;
374
+ /** The run token embedded in `bundle.code`; a reuse executes a copy under its own run's token. */
375
+ runToken: string;
376
+ bundle: BundleResult;
377
+ /**
378
+ * Each filesystem read the bundler made while building `bundle`, with the
379
+ * answer it got. Existence probes are reads too: they decide which file an
380
+ * import resolves to.
381
+ */
382
+ bundlerReads: ReadonlyArray<{
383
+ question: 'exists' | 'utf8' | 'bytes';
384
+ path: string;
385
+ answer: boolean | string | Uint8Array<ArrayBuffer>;
386
+ }>;
387
+ }>
388
+
389
+ // Failed GeoSpec run result
390
+ GeoSpecRunFailure: {
391
+ success: false;
392
+ issues: VmIssue[];
393
+ bundle?: BundleResult;
394
+ accounting?: GeoSpecTestAccounting;
395
+ lineage?: GeoSpecRunLineage;
396
+ /** Tests registered before a module execution failure, including their retained assertions. */
397
+ tests?: GeoSpecTestCase[];
398
+ }
399
+
400
+ success: false
401
+
402
+ issues: VmIssue[]
403
+
404
+ bundle?: BundleResult
405
+
406
+ accounting?: GeoSpecTestAccounting
407
+
408
+ lineage?: GeoSpecRunLineage
409
+
410
+ // Tests registered before a module execution failure, including their retained assertions
411
+ tests?: GeoSpecTestCase[]
412
+
413
+ // Result returned by {@link import ('./run-geospec-module.js').runGeoSpecModule}
414
+ GeoSpecRunResult: GeoSpecRunSuccess | GeoSpecRunFailure
415
+
416
+ success: false
417
+
418
+ bundle?: BundleResult
419
+
420
+ accounting?: GeoSpecTestAccounting
421
+
422
+ lineage?: GeoSpecRunLineage
423
+
424
+ // Tests registered before a module execution failure, including their retained assertions
425
+ tests?: GeoSpecTestCase[]
426
+
427
+ // Successful GeoSpec run result
428
+ GeoSpecRunSuccess: {
429
+ success: true;
430
+ /** True only when selected tests completed successfully with coherent available lineage. */
431
+ passed: boolean;
432
+ tests: GeoSpecTestCase[];
433
+ bundle: BundleResult;
434
+ accounting?: GeoSpecTestAccounting;
435
+ lineage?: GeoSpecRunLineage;
436
+ }
437
+
438
+ success: true
439
+
440
+ // True only when selected tests completed successfully with coherent available lineage
441
+ passed: boolean
442
+
443
+ tests: GeoSpecTestCase[]
444
+
445
+ bundle: BundleResult
446
+
447
+ accounting?: GeoSpecTestAccounting
448
+
449
+ lineage?: GeoSpecRunLineage
450
+
451
+ // A collected GeoSpec test case
452
+ GeoSpecTestCase: {
453
+ /** Registration ordinal before filtering, scoped to the source module's collection. */
454
+ ordinal?: number;
455
+ /** Hierarchical suite path. */
456
+ suite: string[];
457
+ /** Test case name. */
458
+ name: string;
459
+ /** Assertions produced by the test callback. */
460
+ assertions: GeoSpecAssertion[];
461
+ /** Final test status. */
462
+ status: GeoSpecTestStatus;
463
+ /** Structured diagnostics emitted by test execution. */
464
+ diagnostics: GeometryDiagnostic[];
465
+ /** Wall-clock cost of the test body plus its pending assertions, in milliseconds (R1). */
466
+ durationMs?: number;
467
+ }
468
+
469
+ // Registration ordinal before filtering, scoped to the source module's collection
470
+ ordinal?: number
471
+
472
+ // Hierarchical suite path
473
+ suite: string[]
474
+
475
+ // Test case name
476
+ name: string
477
+
478
+ // Assertions produced by the test callback
479
+ assertions: GeoSpecAssertion[]
480
+
481
+ // Final test status
482
+ status: GeoSpecTestStatus
483
+
484
+ // Structured diagnostics emitted by test execution
485
+ diagnostics: GeometryDiagnostic[]
486
+
487
+ // Wall-clock cost of the test body plus its pending assertions, in milliseconds (R1)
488
+ durationMs?: number
489
+
490
+ // A selected test starting or settling inside a module run
491
+ GeoSpecTestEvent: {
492
+ readonly type: 'test-start' | 'test-complete';
493
+ readonly test: GeoSpecTestCase;
494
+ }
495
+
496
+ readonly type: 'test-start' | 'test-complete'
497
+
498
+ readonly test: GeoSpecTestCase
499
+
500
+ // Test case status after runner collection
501
+ GeoSpecTestStatus: 'passed' | 'failed' | 'unsupported' | 'inconclusive' | 'not-run' | 'skipped'
502
+
503
+ // Options for executing a GeoSpec ESM test module
504
+ RunGeoSpecModuleOptions: {
505
+ /** Filesystem containing the test module and its project imports. */
506
+ filesystem: VmFileSystem;
507
+ /** Filesystem-root-relative ESM test entry path. */
508
+ entryPath: string;
509
+ /** JavaScript regular expression matched against full `suite > test` names. */
510
+ testNamePattern?: string | RegExp;
511
+ /** Timeout for async test callbacks, in milliseconds. */
512
+ testTimeout?: number;
513
+ /** Milliseconds. Non-verdict matcher infrastructure backstop. */
514
+ matcherWallBackstop?: number;
515
+ /** Emit structured forensic events for this run. */
516
+ forensic?: boolean;
517
+ /** Observes each selected test as it starts and settles, for host progress reporting. */
518
+ onTestEvent?: (event: GeoSpecTestEvent) => void;
519
+ /**
520
+ * Host-provided protocol-3 compiled assertion client. The host owns engine and
521
+ * admitted subject lifetimes and supplies bindings through builtinModules;
522
+ * authored tests use the canonical GeoSpec API, not a separate native dialect.
523
+ */
524
+ nativeAssertions: GeoSpecAssertionClientOptions;
525
+ /** Host-composed identity loader; authored tests use the canonical `geospec/model` API. */
526
+ nativeModelLoader?: (options: Parameters<GeoSpecNativeModelLoader>[0]) => Promise<GeoSpecNativeSubject & {
527
+ readonly load?: GeoSpecModelLoadEvidence;
528
+ }>;
529
+ /** Additional in-memory modules made available to the VM. */
530
+ builtinModules?: Record<string, BuiltinModule>;
531
+ /** Successful bundle cache owned by a serial runner worker. @internal */
532
+ bundleCache?: GeoSpecModuleBundleCache;
533
+ /**
534
+ * List-only collection pass (R3 shard splitting): execute the module to
535
+ * REGISTER tests, skip every body, and return all registered tests as
536
+ * `skipped` in registration order. Used by the pool to split heavy files
537
+ * into per-test shards.
538
+ */
539
+ collectOnly?: boolean;
540
+ }
541
+
542
+ // Filesystem containing the test module and its project imports
543
+ filesystem: VmFileSystem
544
+
545
+ // Filesystem-root-relative ESM test entry path
546
+ entryPath: string
547
+
548
+ // JavaScript regular expression matched against full `suite > test` names
549
+ testNamePattern?: string | RegExp
550
+
551
+ // Timeout for async test callbacks, in milliseconds
552
+ testTimeout?: number
553
+
554
+ // Milliseconds
555
+ matcherWallBackstop?: number
556
+
557
+ // Emit structured forensic events for this run
558
+ forensic?: boolean
559
+
560
+ // Observes each selected test as it starts and settles, for host progress reporting
561
+ onTestEvent?: (event: GeoSpecTestEvent) => void
562
+
563
+ // Host-provided protocol-3 compiled assertion client
564
+ nativeAssertions: GeoSpecAssertionClientOptions
565
+
566
+ // Host-composed identity loader
567
+ nativeModelLoader?: (options: Parameters<GeoSpecNativeModelLoader>[0]) => Promise<GeoSpecNativeSubject & {
568
+ readonly load?: GeoSpecModelLoadEvidence;
569
+ }>
570
+
571
+ // Additional in-memory modules made available to the VM
572
+ builtinModules?: Record<string, BuiltinModule>
573
+
574
+ // Successful bundle cache owned by a serial runner worker
575
+ bundleCache?: GeoSpecModuleBundleCache
576
+
577
+ // List-only collection pass (R3 shard splitting)
578
+ collectOnly?: boolean
579
+
580
+ // Native assertion options whose engine can also admit and release subjects
581
+ GeoSpecNativeRunnerAssertions: Omit<GeoSpecAssertionClientOptions, 'engine'> & {
582
+ readonly engine: GeoSpecNativeModelEngine;
583
+ }
584
+
585
+ readonly claimId?: (matcher: GeoSpecMatcherName, sequence: number) => string
586
+
587
+ // Success-evidence profile of every claim and query
588
+ readonly evidenceProfile?: GeoSpecNativeEvidenceProfile
589
+
590
+ readonly subjectSlot?: string
591
+
592
+ readonly workUnitLimit?: number
593
+
594
+ // The largest `workUnitLimit` a spec may author in `loadModel` or `expectGeo` options
595
+ readonly maximumWorkUnitLimit?: number
596
+
597
+ readonly engine: GeoSpecNativeModelEngine
598
+
599
+ // Options for the native serial runner
600
+ GeoSpecNativeRunnerOptions: Omit<GeoSpecRunnerOptions, 'nativeAssertions' | 'nativeModelLoader'> & {
601
+ /** Actual protocol-3 engine used by authored assertions. */
602
+ readonly nativeAssertions: GeoSpecNativeRunnerAssertions;
603
+ /** Optional managed loader; the runner releases its subjects after every run. */
604
+ readonly nativeModelLoader?: ManagedGeoSpecNativeModelLoader;
605
+ /** Defaults used when the runner constructs its own native loader. */
606
+ readonly model?: Omit<CreateGeoSpecNativeModelLoaderOptions, 'engine'>;
607
+ }
608
+
609
+ // Filesystem containing the project and test modules
610
+ filesystem: VmFileSystem
611
+
612
+ // Additional in-memory modules made available to the VM
613
+ builtinModules?: RunGeoSpecModuleOptions['builtinModules']
614
+
615
+ // Actual protocol-3 engine used by authored assertions
616
+ readonly nativeAssertions: GeoSpecNativeRunnerAssertions
617
+
618
+ // Optional managed loader
619
+ readonly nativeModelLoader?: ManagedGeoSpecNativeModelLoader
620
+
621
+ // Defaults used when the runner constructs its own native loader
622
+ readonly model?: Omit<CreateGeoSpecNativeModelLoaderOptions, 'engine'>
623
+
624
+ // Defaults and host dependencies for a managed native model loader
625
+ CreateGeoSpecNativeModelLoaderOptions: {
626
+ readonly engine: GeoSpecNativeModelEngine;
627
+ readonly format?: Extract<GeoSpecModelFormat, 'glb' | 'step' | 'stp'>;
628
+ readonly projectPath?: string;
629
+ readonly readSource?: GeoSpecNativeSourceReader;
630
+ readonly runtime?: GeoSpecRuntimeClient | GeoSpecRuntimeClientFactory;
631
+ readonly sourceAdapters?: readonly GeoSpecRuntimeSourceAdapter[];
632
+ /**
633
+ * Subject handles carried between the release scopes of loaders that share one engine, keyed by
634
+ * subjectHash. With a carrier, `releaseAll` keeps this scope's subjects for the next scope and
635
+ * releases only the previous scope's subjects this scope did not load again, so reloading
636
+ * unchanged bytes in the next scope is digest-only. Share one carrier per engine and run its
637
+ * scopes one at a time: a scope's release touches only subjects whose scope has settled.
638
+ */
639
+ readonly carried?: Map<string, unknown>;
640
+ /**
641
+ * The largest `loadModel` `workUnitLimit` a spec may author. Host policy: omitted uses
642
+ * `geoSpecMaximumWorkUnitLimit`, and a host provisioned for larger claims raises it.
643
+ */
644
+ readonly maximumWorkUnitLimit?: number;
645
+ }
646
+
647
+ readonly engine: GeoSpecNativeModelEngine
648
+
649
+ readonly format?: Extract<GeoSpecModelFormat, 'glb' | 'step' | 'stp'>
650
+
651
+ readonly projectPath?: string
652
+
653
+ readonly readSource?: GeoSpecNativeSourceReader
654
+
655
+ readonly runtime?: GeoSpecRuntimeClient | GeoSpecRuntimeClientFactory
656
+
657
+ readonly sourceAdapters?: readonly GeoSpecRuntimeSourceAdapter[]
658
+
659
+ // Subject handles carried between the release scopes of loaders that share one engine, keyed by subjectHash
660
+ readonly carried?: Map<string, unknown>
661
+
662
+ // The largest `loadModel` `workUnitLimit` a spec may author
663
+ readonly maximumWorkUnitLimit?: number
664
+
665
+ // Native additions accepted by the injected `geospec/runner/native` loader
666
+ GeoSpecNativeLoadModelOptions: LoadModelOptions<Code> & {
667
+ /** Ordered external resource payloads declared to the native admission request. */
668
+ readonly resources?: readonly GeoSpecNativeModelResource[];
669
+ /** Format-specific native ingest options. */
670
+ readonly ingestOptions?: Readonly<Record<string, unknown>>;
671
+ }
672
+
673
+ // Geometry format to export
674
+ format?: GeoSpecModelFormat
675
+
676
+ // Explicit parameters passed to the runtime
677
+ parameters?: Record<string, unknown>
678
+
679
+ // STEP reader strategy used for STEP exports
680
+ stepStreaming?: StepStreamingMode
681
+
682
+ // Whether STEP loading should also produce mesh evidence
683
+ mesh?: boolean
684
+
685
+ // Linear tolerance used while meshing exact BRep evidence
686
+ meshLinearTolerance?: number
687
+
688
+ // Angular tolerance in degrees used while meshing exact BRep evidence
689
+ meshAngularToleranceDegrees?: number
690
+
691
+ // Default work-unit budget for every claim on this subject
692
+ workUnitLimit?: number
693
+
694
+ // Ordered external resource payloads declared to the native admission request
695
+ readonly resources?: readonly GeoSpecNativeModelResource[]
696
+
697
+ // Format-specific native ingest options
698
+ readonly ingestOptions?: Readonly<Record<string, unknown>>
699
+
700
+ // Native engine operations required for model admission and run-level cleanup
701
+ GeoSpecNativeModelEngine: GeoSpecNativeEngine & {
702
+ ingestSubject(request: Uint8Array<ArrayBuffer>, primary: Uint8Array<ArrayBuffer>, resources: ReadonlyArray<Uint8Array<ArrayBuffer>>): Uint8Array<ArrayBuffer>;
703
+ subjectHandle(request: Uint8Array<ArrayBuffer>): Uint8Array<ArrayBuffer>;
704
+ releaseSubject(request: Uint8Array<ArrayBuffer>): Uint8Array<ArrayBuffer>;
705
+ }
706
+
707
+ // GeoSpecNativeModelEngine.evaluateClaim (method)
708
+ evaluateClaim(request: Uint8Array<ArrayBuffer>): GeoSpecNativeClaimEvaluation;
709
+
710
+ // GeoSpecNativeModelEngine.processRequest (method)
711
+ processRequest(request: Uint8Array<ArrayBuffer>): Uint8Array<ArrayBuffer>;
712
+
713
+ // GeoSpecNativeModelEngine.ingestSubject (method)
714
+ ingestSubject(request: Uint8Array<ArrayBuffer>, primary: Uint8Array<ArrayBuffer>, resources: ReadonlyArray<Uint8Array<ArrayBuffer>>): Uint8Array<ArrayBuffer>;
715
+
716
+ // GeoSpecNativeModelEngine.subjectHandle (method)
717
+ subjectHandle(request: Uint8Array<ArrayBuffer>): Uint8Array<ArrayBuffer>;
718
+
719
+ // GeoSpecNativeModelEngine.releaseSubject (method)
720
+ releaseSubject(request: Uint8Array<ArrayBuffer>): Uint8Array<ArrayBuffer>;
721
+
722
+ // Model loader injected into native VM runs
723
+ // Remarks: Direct `source` loads read their source again on every call and the engine digests those exact bytes; bytes equal to an admitted subject's reuse that subject by digest, length and descriptor, and edited bytes admit a new subject. Runtime loads are coalesced per release scope (one run): a load whose file, inline code, project path, parameters, format, tolerances, region and ingest options equal an earlier successful load's reuses that admission without exporting or ingesting again. A file load is reused only while a Runtime source snapshot still matches the earlier load's complete source revision; otherwise, or when every owner of the earlier admission has released it, the load exports afresh. Failures are never reused.
724
+ GeoSpecNativeModelLoader: <Code extends Record<string, string> = Record<string, string>>(options: GeoSpecNativeLoadModelOptions<Code>) => Promise<GeoSpecNativeModelSubject>
725
+
726
+ // Subject identity returned by native STEP/GLB admission
727
+ GeoSpecNativeModelSubject: GeoSpecNativeSubject & {
728
+ readonly subjectHash: string;
729
+ /** Exact successful-load evidence retained by the admitting host, when available. */
730
+ readonly load?: GeoSpecModelLoadEvidence;
731
+ }
732
+
733
+ readonly contentHash?: string
734
+
735
+ readonly subjectHash?: string
736
+
737
+ // Exact successful-load evidence retained by the admitting host, when available
738
+ readonly load?: GeoSpecModelLoadEvidence
739
+
740
+ // One named external resource referenced by a direct glTF-family source
741
+ GeoSpecNativeModelResource: {
742
+ readonly name: string;
743
+ readonly source: LoadModelSourceOptions['source'];
744
+ }
745
+
746
+ readonly name: string
747
+
748
+ readonly source: LoadModelSourceOptions['source']
749
+
750
+ // Resolve a non-memory source into ordinary ArrayBuffer-backed bytes
751
+ // Remarks: The loader takes ownership of the returned bytes and admits them without a copy, so a reader must return bytes that nothing mutates afterwards (a fresh read, not a view of a shared or reused buffer).
752
+ GeoSpecNativeSourceReader: (source: LoadModelSourceOptions['source']) => Promise<Uint8Array<ArrayBuffer>>
753
+
754
+ // Reusable native model loader whose admitted subjects can be released as one run
755
+ ManagedGeoSpecNativeModelLoader: GeoSpecNativeModelLoader & {
756
+ /**
757
+ * Drain registered admissions, including additions while drainage awaits,
758
+ * then release this scope's subjects (with a carrier: the previous scope's
759
+ * subjects this scope did not load again) and owned Runtime clients.
760
+ *
761
+ * Await the intended complete load chain before final release, and await
762
+ * this method before closing the caller-owned engine. Calls after it returns
763
+ * start a new scope requiring another release; future detached loads are not
764
+ * part of the completed scope.
765
+ *
766
+ * @returns Completion of the current scope's admission drain and release.
767
+ */
768
+ releaseAll(): Promise<void>;
769
+ }
770
+
771
+ // Drain registered admissions, including additions while drainage awaits, then release this scope's subjects (with a carrier
772
+ // Remarks: Await the intended complete load chain before final release, and await this method before closing the caller-owned engine. Calls after it returns start a new scope requiring another release; future detached loads are not part of the completed scope.
773
+ // ManagedGeoSpecNativeModelLoader.releaseAll (method)
774
+ releaseAll(): Promise<void>;
775
+
776
+ GeoSpecPoolHostMessage: {
777
+ type: 'initialize';
778
+ } | {
779
+ type: 'run-shard';
780
+ shard: GeoSpecPoolShard;
781
+ testNamePattern?: string;
782
+ testTimeout?: number;
783
+ matcherWallBackstop?: number;
784
+ forensic?: boolean;
785
+ } | {
786
+ /** List-only collection pass: register tests, run no bodies (R3 splitting). */
787
+ type: 'list-tests';
788
+ shardId: number;
789
+ file: string;
790
+ testTimeout?: number;
791
+ matcherWallBackstop?: number;
792
+ forensic?: boolean;
793
+ } | {
794
+ type: 'shutdown';
795
+ }
796
+
797
+ type: 'initialize'
798
+
799
+ // One schedulable work unit
800
+ GeoSpecPoolShard: {
801
+ /** Stable shard id, unique within one pool run. */
802
+ id: number;
803
+ /** GeoSpec file this shard executes. */
804
+ file: string;
805
+ /** Exact-test pattern for split shards (R3: `(file, testNamePattern)` work units). */
806
+ testNamePattern?: string;
807
+ }
808
+
809
+ // Stable shard id, unique within one pool run
810
+ id: number
811
+
812
+ // GeoSpec file this shard executes
813
+ file: string
814
+
815
+ // Exact-test pattern for split shards (R3
816
+ testNamePattern?: string
817
+
818
+ GeoSpecPoolWorkerHandle: {
819
+ postMessage(message: GeoSpecPoolHostMessage): void;
820
+ onMessage(listener: (message: GeoSpecPoolWorkerMessage) => void): void;
821
+ onExit(listener: (details: {
822
+ unexpected: boolean;
823
+ message?: string;
824
+ }) => void): void;
825
+ /** Hard-stop the worker thread (R11 watchdog primitive). */
826
+ terminate(): Promise<void> | void;
827
+ }
828
+
829
+ // GeoSpecPoolWorkerHandle.postMessage (method)
830
+ postMessage(message: GeoSpecPoolHostMessage): void;
831
+
832
+ // GeoSpecPoolWorkerHandle.onMessage (method)
833
+ onMessage(listener: (message: GeoSpecPoolWorkerMessage) => void): void;
834
+
835
+ // GeoSpecPoolWorkerHandle.onExit (method)
836
+ onExit(listener: (details: {
837
+ unexpected: boolean;
838
+ message?: string;
839
+ }) => void): void;
840
+
841
+ // Hard-stop the worker thread (R11 watchdog primitive)
842
+ // GeoSpecPoolWorkerHandle.terminate (method)
843
+ terminate(): Promise<void> | void;
844
+
845
+ GeoSpecPoolWorkerMessage: {
846
+ type: 'ready';
847
+ } | {
848
+ type: 'initialized';
849
+ } | {
850
+ type: 'initialization-error';
851
+ message: string;
852
+ } | {
853
+ type: 'file-start';
854
+ shardId: number;
855
+ file: string;
856
+ } | {
857
+ type: 'forensic';
858
+ shardId: number;
859
+ name: string;
860
+ value: number;
861
+ unit: 'milliseconds' | 'count';
862
+ } | {
863
+ type: 'tests-listed';
864
+ shardId: number;
865
+ file: string;
866
+ names: string[];
867
+ } | {
868
+ type: 'list-error';
869
+ shardId: number;
870
+ file: string;
871
+ message: string;
872
+ } | {
873
+ type: 'shard-complete';
874
+ shardId: number;
875
+ file: string;
876
+ result: GeoSpecRunResult;
877
+ durationMs: number;
878
+ primaryLoadKey?: string;
879
+ /** Worker-isolate resident memory at completion (heap + external), bytes. */
880
+ workerMemoryBytes?: number;
881
+ } | {
882
+ type: 'shard-error';
883
+ shardId: number;
884
+ file: string;
885
+ message: string;
886
+ }
887
+
888
+ type: 'ready'
889
+
890
+ // One structured forensic measurement emitted by a runner
891
+ GeoSpecForensicEvent: {
892
+ type: 'forensic';
893
+ name: string;
894
+ value: number;
895
+ unit: 'milliseconds' | 'count';
896
+ shardId?: number;
897
+ }
898
+
899
+ type: 'forensic'
900
+
901
+ name: string
902
+
903
+ value: number
904
+
905
+ unit: 'milliseconds' | 'count'
906
+
907
+ shardId?: number
908
+
909
+ // Public GeoSpec runner lifecycle surface
910
+ GeoSpecRunner: {
911
+ /** Execute GeoSpec files and return a compact aggregate result. */
912
+ run(options: GeoSpecRunnerRunOptions): Promise<GeoSpecRunnerResult>;
913
+ /** Subscribe to one lifecycle event type. */
914
+ on<Type extends GeoSpecRunnerEvent['type']>(event: Type, handler: (event: Extract<GeoSpecRunnerEvent, {
915
+ type: Type;
916
+ }>) => void): () => void;
917
+ /** Request cooperative abort before the next file starts. */
918
+ abort(reason?: string): void;
919
+ /** Close the runner and release owned resources. */
920
+ close(): Promise<void>;
921
+ }
922
+
923
+ // Execute GeoSpec files and return a compact aggregate result
924
+ // GeoSpecRunner.run (method)
925
+ run(options: GeoSpecRunnerRunOptions): Promise<GeoSpecRunnerResult>;
926
+
927
+ // Subscribe to one lifecycle event type
928
+ // GeoSpecRunner.on (method)
929
+ on<Type extends GeoSpecRunnerEvent['type']>(event: Type, handler: (event: Extract<GeoSpecRunnerEvent, {
930
+ type: Type;
931
+ }>) => void): () => void;
932
+
933
+ // Request cooperative abort before the next file starts
934
+ // GeoSpecRunner.abort (method)
935
+ abort(reason?: string): void;
936
+
937
+ // Close the runner and release owned resources
938
+ // GeoSpecRunner.close (method)
939
+ close(): Promise<void>;
940
+
941
+ // Lifecycle event emitted by GeoSpec worker-style runners
942
+ GeoSpecRunnerEvent: {
943
+ type: 'run-start';
944
+ files: readonly string[];
945
+ } | {
946
+ type: 'file-start';
947
+ file: string;
948
+ } | {
949
+ type: 'test-start';
950
+ file: string;
951
+ test: GeoSpecRunnerTestRef;
952
+ } | {
953
+ type: 'test-complete';
954
+ file: string;
955
+ test: GeoSpecTestCase;
956
+ } | {
957
+ type: 'file-complete';
958
+ file: string;
959
+ result: GeoSpecRunResult;
960
+ durationMs?: number;
961
+ primaryLoadKey?: string;
962
+ workerMemoryBytes?: number;
963
+ } | {
964
+ type: 'run-complete';
965
+ result: GeoSpecRunnerResult;
966
+ } | GeoSpecForensicEvent | {
967
+ type: 'abort';
968
+ reason?: string;
969
+ } | {
970
+ type: 'close';
971
+ }
972
+
973
+ type: 'forensic'
974
+
975
+ // One GeoSpec test file executed by a worker-style runner
976
+ GeoSpecRunnerFileResult: {
977
+ /** Absolute or project-relative GeoSpec test file path supplied to the runner. */
978
+ file: string;
979
+ /** Low-level module execution result for this file. */
980
+ result: GeoSpecRunResult;
981
+ /** Wall-clock cost of executing this file, in milliseconds (R1). */
982
+ durationMs?: number;
983
+ /** First deterministic model-load cache key observed in this file (R9 affinity telemetry). */
984
+ primaryLoadKey?: string;
985
+ /** Executing worker's isolate-resident memory at file completion, in bytes (R15 memory-class telemetry). */
986
+ workerMemoryBytes?: number;
987
+ }
988
+
989
+ // Absolute or project-relative GeoSpec test file path supplied to the runner
990
+ file: string
991
+
992
+ // Low-level module execution result for this file
993
+ result: GeoSpecRunResult
994
+
995
+ // Wall-clock cost of executing this file, in milliseconds (R1)
996
+ durationMs?: number
997
+
998
+ // First deterministic model-load cache key observed in this file (R9 affinity telemetry)
999
+ primaryLoadKey?: string
1000
+
1001
+ // Executing worker's isolate-resident memory at file completion, in bytes (R15 memory-class telemetry)
1002
+ workerMemoryBytes?: number
1003
+
1004
+ // Shared options for GeoSpec runner factories
1005
+ GeoSpecRunnerOptions: {
1006
+ /** Filesystem containing the project and test modules. */
1007
+ filesystem: VmFileSystem;
1008
+ /** Protocol-3 assertion client shared by every authored assertion and model admission. */
1009
+ nativeAssertions: RunGeoSpecModuleOptions['nativeAssertions'];
1010
+ /** Managed native model loader released after each settled run. */
1011
+ nativeModelLoader?: ManagedGeoSpecNativeModelLoader;
1012
+ /** Additional in-memory modules made available to the VM. */
1013
+ builtinModules?: RunGeoSpecModuleOptions['builtinModules'];
1014
+ }
1015
+
1016
+ // Filesystem containing the project and test modules
1017
+ filesystem: VmFileSystem
1018
+
1019
+ // Protocol-3 assertion client shared by every authored assertion and model admission
1020
+ nativeAssertions: RunGeoSpecModuleOptions['nativeAssertions']
1021
+
1022
+ // Managed native model loader released after each settled run
1023
+ nativeModelLoader?: ManagedGeoSpecNativeModelLoader
1024
+
1025
+ // Additional in-memory modules made available to the VM
1026
+ builtinModules?: RunGeoSpecModuleOptions['builtinModules']
1027
+
1028
+ // Aggregate result returned by GeoSpec worker-style runners
1029
+ GeoSpecRunnerResult: {
1030
+ /** True when no files or tests failed and at least one test was selected. */
1031
+ success: boolean;
1032
+ /** Number of non-skipped tests that passed. */
1033
+ passed: number;
1034
+ /** Number of file-level or test-level failures. */
1035
+ failed: number;
1036
+ /** Number of collected tests after filters were applied. */
1037
+ selectedTests: number;
1038
+ /** Per-file module execution results. */
1039
+ files: GeoSpecRunnerFileResult[];
1040
+ /** Run-level issues such as aborts or empty filter selections. */
1041
+ issues?: VmIssue[];
1042
+ /** Wall-clock cost of the whole run, in milliseconds (R1). */
1043
+ durationMs?: number;
1044
+ /** Complete requested-file accounting; discovery may remain unknown in unstarted or broken modules. */
1045
+ accounting?: GeoSpecRunnerAccounting;
1046
+ /** Coherence of the consumed source graphs, not a geometry verdict. */
1047
+ lineageStatus?: 'complete' | 'unavailable' | 'mixed';
1048
+ }
1049
+
1050
+ // True when no files or tests failed and at least one test was selected
1051
+ success: boolean
1052
+
1053
+ // Number of non-skipped tests that passed
1054
+ passed: number
1055
+
1056
+ // Number of file-level or test-level failures
1057
+ failed: number
1058
+
1059
+ // Number of collected tests after filters were applied
1060
+ selectedTests: number
1061
+
1062
+ // Per-file module execution results
1063
+ files: GeoSpecRunnerFileResult[]
1064
+
1065
+ // Run-level issues such as aborts or empty filter selections
1066
+ issues?: VmIssue[]
1067
+
1068
+ // Wall-clock cost of the whole run, in milliseconds (R1)
1069
+ durationMs?: number
1070
+
1071
+ // Complete requested-file accounting
1072
+ accounting?: GeoSpecRunnerAccounting
1073
+
1074
+ // Coherence of the consumed source graphs, not a geometry verdict
1075
+ lineageStatus?: 'complete' | 'unavailable' | 'mixed'
1076
+
1077
+ // Options accepted by a GeoSpec worker-style runner run
1078
+ GeoSpecRunnerRunOptions: {
1079
+ /** GeoSpec test files to execute. Files run serially by default. */
1080
+ files: readonly string[];
1081
+ /** JavaScript regular expression matched against full `suite > test` names. */
1082
+ testNamePattern?: string | RegExp;
1083
+ /** Timeout for each async test callback, in milliseconds. */
1084
+ testTimeout?: number;
1085
+ /** Non-verdict matcher wall backstop. Milliseconds. */
1086
+ matcherWallBackstop?: number;
1087
+ /**
1088
+ * Engine work-unit budget for this run's claims, replacing the runner's
1089
+ * `nativeAssertions.workUnitLimit`. A `loadModel` or `expectGeo` budget still
1090
+ * wins for its own claims.
1091
+ */
1092
+ workUnitLimit?: number;
1093
+ /** Emit structured forensic measurements for this run. */
1094
+ forensic?: boolean;
1095
+ /**
1096
+ * Stop after the first failing file (R1). Interactive fail-fast only —
1097
+ * never the default for reward runs, which want the complete red set.
1098
+ */
1099
+ bail?: boolean;
1100
+ }
1101
+
1102
+ // GeoSpec test files to execute
1103
+ files: readonly string[]
1104
+
1105
+ // JavaScript regular expression matched against full `suite > test` names
1106
+ testNamePattern?: string | RegExp
1107
+
1108
+ // Timeout for each async test callback, in milliseconds
1109
+ testTimeout?: number
1110
+
1111
+ // Non-verdict matcher wall backstop
1112
+ matcherWallBackstop?: number
1113
+
1114
+ // Engine work-unit budget for this run's claims, replacing the runner's `nativeAssertions.workUnitLimit`
1115
+ workUnitLimit?: number
1116
+
1117
+ // Emit structured forensic measurements for this run
1118
+ forensic?: boolean
1119
+
1120
+ // Stop after the first failing file (R1)
1121
+ bail?: boolean
1122
+
1123
+ // Runner-independent native assertion client
1124
+ GeoSpecAssertionClient: {
1125
+ /**
1126
+ * Start a chain; `options.workUnitLimit` overrides the client budget for its claims.
1127
+ * Without one, a loaded subject's `loadModel` budget applies, then the client's.
1128
+ */
1129
+ expectGeo(subject: GeoSpecNativeSubject | GeoSpecSubject, options?: GeoSpecExpectOptions): GeoSpecAssertionMatchers;
1130
+ query(options: MinimumDistanceQuery): Promise<MinimumDistanceResult>;
1131
+ query(options: GeoSpecQueryOptions): Promise<GeoSpecCanonicalClaimReport>;
1132
+ }
1133
+
1134
+ // Start a chain
1135
+ // GeoSpecAssertionClient.expectGeo (method)
1136
+ expectGeo(subject: GeoSpecNativeSubject | GeoSpecSubject, options?: GeoSpecExpectOptions): GeoSpecAssertionMatchers;
1137
+
1138
+ // GeoSpecAssertionClient.query (method)
1139
+ query(options: MinimumDistanceQuery): Promise<MinimumDistanceResult>;
1140
+ query(options: GeoSpecQueryOptions): Promise<GeoSpecCanonicalClaimReport>;
1141
+
1142
+ // Flat construction options for a runner-independent native assertion client
1143
+ GeoSpecAssertionClientOptions: {
1144
+ readonly claimId?: (matcher: GeoSpecMatcherName, sequence: number) => string;
1145
+ readonly engine: GeoSpecNativeEngine;
1146
+ /** Success-evidence profile of every claim and query; omitted means `complete`. */
1147
+ readonly evidenceProfile?: GeoSpecNativeEvidenceProfile;
1148
+ readonly subjectSlot?: string;
1149
+ readonly workUnitLimit?: number;
1150
+ /**
1151
+ * The largest `workUnitLimit` a spec may author in `loadModel` or `expectGeo` options. Host
1152
+ * policy: omitted uses `geoSpecMaximumWorkUnitLimit`, and a host provisioned for larger claims
1153
+ * raises it. Must be a positive safe integer.
1154
+ */
1155
+ readonly maximumWorkUnitLimit?: number;
1156
+ }
1157
+
1158
+ readonly claimId?: (matcher: GeoSpecMatcherName, sequence: number) => string
1159
+
1160
+ readonly engine: GeoSpecNativeEngine
1161
+
1162
+ // Success-evidence profile of every claim and query
1163
+ readonly evidenceProfile?: GeoSpecNativeEvidenceProfile
1164
+
1165
+ readonly subjectSlot?: string
1166
+
1167
+ readonly workUnitLimit?: number
1168
+
1169
+ // The largest `workUnitLimit` a spec may author in `loadModel` or `expectGeo` options
1170
+ readonly maximumWorkUnitLimit?: number
1171
+
1172
+ // Standalone native matcher chain, including core-owned negation
1173
+ GeoSpecAssertionMatchers: GeoSpecMatcherMethods<GeoSpecCanonicalClaimReport> & {
1174
+ readonly not: GeoSpecMatcherMethods<GeoSpecCanonicalClaimReport>;
1175
+ }
1176
+
1177
+ readonly not: GeoSpecMatcherMethods<GeoSpecCanonicalClaimReport>
1178
+
1179
+ // One authored call shared by the collector and native assertion client
1180
+ GeoSpecAuthoringInvocation: {
1181
+ readonly arguments: readonly unknown[];
1182
+ readonly expected: unknown;
1183
+ readonly kind: GeoSpecAssertion['kind'];
1184
+ readonly matcher: GeoSpecMatcherName;
1185
+ readonly polarity: GeoSpecClaimPolarity;
1186
+ readonly subject: unknown;
1187
+ }
1188
+
1189
+ readonly arguments: readonly unknown[]
1190
+
1191
+ readonly expected: unknown
1192
+
1193
+ readonly kind: GeoSpecAssertion['kind']
1194
+
1195
+ readonly matcher: GeoSpecMatcherName
1196
+
1197
+ readonly polarity: GeoSpecClaimPolarity
1198
+
1199
+ readonly subject: unknown
1200
+
1201
+ // Matcher methods derived mechanically from the existing GeoSpec registry
1202
+ GeoSpecMatcherMethods: {
1203
+ [Name in GeoSpecMatcherName]: (...arguments_: Parameters<GeoSpecMatcher[Name]>) => Result;
1204
+ }
1205
+
1206
+ // One positive-only ancillary query
1207
+ // Remarks: An explicit claimId leaves the automatic sequence unchanged. Queries return full reports, including failed/refused reports, without assertion errors.
1208
+ GeoSpecQueryOptions: {
1209
+ readonly capability: GeoSpecQueryCapability;
1210
+ readonly claimId?: string;
1211
+ readonly payload?: unknown;
1212
+ readonly subject: GeoSpecNativeSubject;
1213
+ }
1214
+
1215
+ readonly capability: GeoSpecQueryCapability
1216
+
1217
+ readonly claimId?: string
1218
+
1219
+ readonly payload?: unknown
1220
+
1221
+ readonly subject: GeoSpecNativeSubject
1222
+
1223
+ // Complete native minimum and ordered finite witnesses in canonical millimetres/Z-up
1224
+ MinimumDistanceFact: {
1225
+ readonly source: 'ap242';
1226
+ readonly assurance: 'exact-brep';
1227
+ readonly unit: 'mm';
1228
+ readonly coordinateSystem: 'z-up';
1229
+ readonly subjectHash: string;
1230
+ readonly algorithmProfile: 'geospec-minimum-distance-v1';
1231
+ readonly occurrences: readonly [string, string];
1232
+ readonly distance: number;
1233
+ readonly points: readonly [readonly [number, number, number], readonly [number, number, number]];
1234
+ }
1235
+
1236
+ readonly source: 'ap242'
1237
+
1238
+ readonly assurance: 'exact-brep'
1239
+
1240
+ readonly unit: 'mm'
1241
+
1242
+ readonly coordinateSystem: 'z-up'
1243
+
1244
+ readonly subjectHash: string
1245
+
1246
+ readonly algorithmProfile: 'geospec-minimum-distance-v1'
1247
+
1248
+ readonly occurrences: readonly [string, string]
1249
+
1250
+ readonly distance: number
1251
+
1252
+ readonly points: readonly [readonly [number, number, number], readonly [number, number, number]]
1253
+
1254
+ // Complete AP242 minimum over two subject-bound occurrence paths
1255
+ MinimumDistanceQuery: {
1256
+ readonly capability: 'minimumDistance';
1257
+ readonly subject: GeoSpecNativeSubject;
1258
+ readonly payload: {
1259
+ readonly pair: readonly [{
1260
+ readonly occurrencePath: string;
1261
+ }, {
1262
+ readonly occurrencePath: string;
1263
+ }];
1264
+ };
1265
+ }
1266
+
1267
+ readonly capability: 'minimumDistance'
1268
+
1269
+ readonly subject: GeoSpecNativeSubject
1270
+
1271
+ readonly payload: {
1272
+ readonly pair: readonly [{
1273
+ readonly occurrencePath: string;
1274
+ }, {
1275
+ readonly occurrencePath: string;
1276
+ }];
1277
+ }
1278
+
1279
+ // Geometry refusal and infrastructure interruption never masquerade as facts
1280
+ MinimumDistanceResult: {
1281
+ readonly status: 'complete';
1282
+ readonly fact: MinimumDistanceFact;
1283
+ } | {
1284
+ readonly status: 'refused';
1285
+ readonly code: 'unsupported-evidence' | 'invalid-selection' | 'work-limit';
1286
+ readonly message: string;
1287
+ } | {
1288
+ readonly status: 'interrupted';
1289
+ readonly code: 'cancelled' | 'executor-exited' | 'deadline' | 'engine-error';
1290
+ readonly message: string;
1291
+ }
1292
+
1293
+ readonly status: 'complete'
1294
+
1295
+ // Flat native query transport options
1296
+ GeoSpecNativeQueryOptions: Omit<GeoSpecNativeClaimOptions, 'arguments' | 'capability' | 'kind' | 'polarity'> & {
1297
+ readonly capability: GeoSpecQueryCapability | 'minimumDistance';
1298
+ readonly payload?: unknown;
1299
+ }
1300
+
1301
+ readonly engine: GeoSpecNativeEngine
1302
+
1303
+ readonly claimId: string
1304
+
1305
+ readonly evidenceProfile?: GeoSpecNativeEvidenceProfile
1306
+
1307
+ readonly subjectSlot: string
1308
+
1309
+ readonly workUnitLimit: number
1310
+
1311
+ // The host's largest authored budget, reported as `details.maximumLimit` on `MATCHER_TIMEOUT`
1312
+ readonly maximumWorkUnitLimit?: number
1313
+
1314
+ readonly subject: GeoSpecNativeSubject
1315
+
1316
+ readonly capability: GeoSpecQueryCapability | 'minimumDistance'
1317
+
1318
+ readonly payload?: unknown
1319
+
1320
+ // Existing positive-only ancillary operations owned by the native core
1321
+ GeoSpecQueryCapability: Exclude<(typeof geoSpecQueryCapabilities)[number], 'minimumDistance'>
1322
+
1323
+ // Explicit support state for one source-attributed inventory field
1324
+ GeoSpecPmiField: {
1325
+ readonly status: 'supported' | 'missing' | 'invalid' | 'ambiguous' | 'unsupported';
1326
+ readonly value: Value | null;
1327
+ readonly reason: string | null;
1328
+ }
1329
+
1330
+ readonly status: 'supported' | 'missing' | 'invalid' | 'ambiguous' | 'unsupported'
1331
+
1332
+ readonly value: Value | null
1333
+
1334
+ readonly reason: string | null
1335
+
1336
+ // Original Part21 entity ID and exact source argument tokens
1337
+ GeoSpecPmiRawEntity: {
1338
+ readonly sourceId: number;
1339
+ readonly kind: string;
1340
+ readonly arguments: readonly string[];
1341
+ }
1342
+
1343
+ readonly sourceId: number
1344
+
1345
+ readonly kind: string
1346
+
1347
+ readonly arguments: readonly string[]
1348
+
1349
+ // Source-authored scalar and Rust-normalized reduced rational millimetres
1350
+ GeoSpecPmiNumber: {
1351
+ readonly sourceId: number;
1352
+ readonly authoredText: string;
1353
+ readonly unitId: number;
1354
+ readonly unitRecords: readonly GeoSpecPmiRawEntity[];
1355
+ readonly millimetres: string;
1356
+ readonly name: string;
1357
+ }
1358
+
1359
+ readonly sourceId: number
1360
+
1361
+ readonly authoredText: string
1362
+
1363
+ readonly unitId: number
1364
+
1365
+ readonly unitRecords: readonly GeoSpecPmiRawEntity[]
1366
+
1367
+ readonly millimetres: string
1368
+
1369
+ readonly name: string
1370
+
1371
+ // A uniquely forward-transferred face
1372
+ GeoSpecPmiFaceAssociation: {
1373
+ readonly sourceFaceId: number;
1374
+ readonly occurrenceRoute: readonly number[];
1375
+ readonly occurrence: number | null;
1376
+ readonly publicFaceOrdinal: number;
1377
+ }
1378
+
1379
+ readonly sourceFaceId: number
1380
+
1381
+ readonly occurrenceRoute: readonly number[]
1382
+
1383
+ readonly occurrence: number | null
1384
+
1385
+ readonly publicFaceOrdinal: number
1386
+
1387
+ // One ordered role reference, including incomplete source/transfer evidence
1388
+ GeoSpecPmiShapeReference: {
1389
+ readonly sourceAspectId: number | null;
1390
+ readonly sourceUsageIds: readonly number[];
1391
+ readonly sourceItemIds: readonly number[];
1392
+ readonly requestedRoute: GeoSpecPmiField<readonly number[]>;
1393
+ readonly associations: GeoSpecPmiField<readonly GeoSpecPmiFaceAssociation[]>;
1394
+ }
1395
+
1396
+ readonly sourceAspectId: number | null
1397
+
1398
+ readonly sourceUsageIds: readonly number[]
1399
+
1400
+ readonly sourceItemIds: readonly number[]
1401
+
1402
+ readonly requestedRoute: GeoSpecPmiField<readonly number[]>
1403
+
1404
+ readonly associations: GeoSpecPmiField<readonly GeoSpecPmiFaceAssociation[]>
1405
+
1406
+ // Normalized authored limits
1407
+ GeoSpecPmiLimits: {
1408
+ readonly lowerMillimetres: string;
1409
+ readonly upperMillimetres: string;
1410
+ readonly basis: 'authored-limits' | 'nominal-plus-minus';
1411
+ }
1412
+
1413
+ readonly lowerMillimetres: string
1414
+
1415
+ readonly upperMillimetres: string
1416
+
1417
+ readonly basis: 'authored-limits' | 'nominal-plus-minus'
1418
+
1419
+ // Source record preserving semantic/presentation separation and ordered roles
1420
+ GeoSpecPmiRecord: {
1421
+ readonly sourceId: number;
1422
+ readonly family: 'dimension' | 'datum' | 'tolerance' | 'presentation';
1423
+ readonly channel: 'semantic' | 'presentation';
1424
+ readonly kind: string;
1425
+ readonly name: GeoSpecPmiField<string>;
1426
+ readonly first: readonly GeoSpecPmiShapeReference[];
1427
+ readonly second: readonly GeoSpecPmiShapeReference[];
1428
+ readonly numbers: GeoSpecPmiField<readonly GeoSpecPmiNumber[]>;
1429
+ readonly limits: GeoSpecPmiField<GeoSpecPmiLimits>;
1430
+ readonly interpretation: GeoSpecPmiField<string>;
1431
+ readonly raw: readonly GeoSpecPmiRawEntity[];
1432
+ }
1433
+
1434
+ readonly sourceId: number
1435
+
1436
+ readonly family: 'dimension' | 'datum' | 'tolerance' | 'presentation'
1437
+
1438
+ readonly channel: 'semantic' | 'presentation'
1439
+
1440
+ readonly kind: string
1441
+
1442
+ readonly name: GeoSpecPmiField<string>
1443
+
1444
+ readonly first: readonly GeoSpecPmiShapeReference[]
1445
+
1446
+ readonly second: readonly GeoSpecPmiShapeReference[]
1447
+
1448
+ readonly numbers: GeoSpecPmiField<readonly GeoSpecPmiNumber[]>
1449
+
1450
+ readonly limits: GeoSpecPmiField<GeoSpecPmiLimits>
1451
+
1452
+ readonly interpretation: GeoSpecPmiField<string>
1453
+
1454
+ readonly raw: readonly GeoSpecPmiRawEntity[]
1455
+
1456
+ // Positive-only inventory value inside the ordinary canonical query report
1457
+ GeoSpecPmiInventory: {
1458
+ readonly contract: 'geospec.pmi.inventory/v1';
1459
+ readonly status: 'semantic' | 'graphical-only' | 'empty';
1460
+ readonly fileSchema: string;
1461
+ readonly editionValidation: 'not-validated';
1462
+ readonly records: readonly GeoSpecPmiRecord[];
1463
+ }
1464
+
1465
+ readonly contract: 'geospec.pmi.inventory/v1'
1466
+
1467
+ readonly status: 'semantic' | 'graphical-only' | 'empty'
1468
+
1469
+ readonly fileSchema: string
1470
+
1471
+ readonly editionValidation: 'not-validated'
1472
+
1473
+ readonly records: readonly GeoSpecPmiRecord[]
1474
+
1475
+ // Strict inventory output limits
1476
+ GeoSpecPmiQueryPayload: {
1477
+ readonly maxRecords?: number;
1478
+ readonly maxOutputBytes?: number;
1479
+ }
1480
+
1481
+ readonly maxRecords?: number
1482
+
1483
+ readonly maxOutputBytes?: number
1484
+
1485
+ // Complete inventory value
1486
+ GeoSpecPmiQueryValue: {
1487
+ readonly inventory: GeoSpecPmiInventory;
1488
+ readonly subjectHash: string;
1489
+ readonly provenance: Readonly<Record<string, unknown>>;
1490
+ }
1491
+
1492
+ readonly inventory: GeoSpecPmiInventory
1493
+
1494
+ readonly subjectHash: string
1495
+
1496
+ readonly provenance: Readonly<Record<string, unknown>>
1497
+
1498
+ // Full native assertion result with the exact core-owned bytes retained
1499
+ GeoSpecCanonicalClaimReport: {
1500
+ readonly canonicalClaim: Uint8Array<ArrayBuffer>;
1501
+ readonly canonicalPlan: Uint8Array<ArrayBuffer>;
1502
+ readonly canonicalResult: Uint8Array<ArrayBuffer>;
1503
+ readonly claim: Readonly<Record<string, JSONValue>>;
1504
+ readonly claimId: string;
1505
+ /** Engine diagnostics; a `MATCHER_TIMEOUT` row also carries `details.limit`, `details.used` and `details.maximumLimit`. */
1506
+ readonly diagnostics: readonly JSONValue[];
1507
+ readonly evidence?: JSONValue;
1508
+ readonly polarity: GeoSpecClaimPolarity;
1509
+ readonly result: Readonly<Record<string, JSONValue>>;
1510
+ readonly status: GeoSpecCanonicalClaimStatus;
1511
+ }
1512
+
1513
+ readonly canonicalClaim: Uint8Array<ArrayBuffer>
1514
+
1515
+ readonly canonicalPlan: Uint8Array<ArrayBuffer>
1516
+
1517
+ readonly canonicalResult: Uint8Array<ArrayBuffer>
1518
+
1519
+ readonly claim: Readonly<Record<string, JSONValue>>
1520
+
1521
+ readonly claimId: string
1522
+
1523
+ // Engine diagnostics
1524
+ readonly diagnostics: readonly JSONValue[]
1525
+
1526
+ readonly evidence?: JSONValue
1527
+
1528
+ readonly polarity: GeoSpecClaimPolarity
1529
+
1530
+ readonly result: Readonly<Record<string, JSONValue>>
1531
+
1532
+ readonly status: GeoSpecCanonicalClaimStatus
1533
+
1534
+ // Exact core bytes of one claim evaluated in one engine call
1535
+ GeoSpecNativeClaimEvaluation: {
1536
+ readonly canonicalClaim: Uint8Array<ArrayBuffer>;
1537
+ readonly canonicalPlan: Uint8Array<ArrayBuffer>;
1538
+ readonly canonicalResult: Uint8Array<ArrayBuffer>;
1539
+ }
1540
+
1541
+ readonly canonicalClaim: Uint8Array<ArrayBuffer>
1542
+
1543
+ readonly canonicalPlan: Uint8Array<ArrayBuffer>
1544
+
1545
+ readonly canonicalResult: Uint8Array<ArrayBuffer>
1546
+
1547
+ // Byte-only engine surface consumed by the runner-independent assertion client
1548
+ GeoSpecNativeEngine: {
1549
+ evaluateClaim(request: Uint8Array<ArrayBuffer>): GeoSpecNativeClaimEvaluation;
1550
+ processRequest(request: Uint8Array<ArrayBuffer>): Uint8Array<ArrayBuffer>;
1551
+ }
1552
+
1553
+ // GeoSpecNativeEngine.evaluateClaim (method)
1554
+ evaluateClaim(request: Uint8Array<ArrayBuffer>): GeoSpecNativeClaimEvaluation;
1555
+
1556
+ // GeoSpecNativeEngine.processRequest (method)
1557
+ processRequest(request: Uint8Array<ArrayBuffer>): Uint8Array<ArrayBuffer>;
1558
+
1559
+ // Success-evidence profile a product selects for its plans (PERF-OUTPUT-01)
1560
+ GeoSpecNativeEvidenceProfile: 'bounded' | 'complete'