geospec 0.1.0-beta.2 → 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.
- package/agent/doctrine.md +8 -0
- package/agent/geospec-authoring/SKILL.md +19 -20
- package/agent/geospec-authoring/api-constants.md +11 -1
- package/agent/geospec-authoring/api-functions.md +9 -1
- package/agent/geospec-authoring/api-index.md +22 -7
- package/agent/geospec-authoring/api-types.md +91 -3
- package/agent/geospec-authoring/public-api-constants.md +33 -1
- package/agent/geospec-authoring/public-api-functions.md +21 -2
- package/agent/geospec-authoring/public-api-index.md +57 -20
- package/agent/geospec-authoring/public-api-types-2.md +267 -220
- package/agent/geospec-authoring/public-api-types-3.md +217 -0
- package/agent/geospec-authoring/public-api-types.md +37 -137
- package/agent/resources.js +14 -13
- package/agent/skills.json +3 -2
- package/dist/assertion-client/client.d.mts +12 -2
- package/dist/assertion-client/client.mjs +2 -2
- package/dist/assertion-client/index.d.mts +2 -2
- package/dist/assertion-client/index.mjs +1 -1
- package/dist/config/tau-project-artifact.mjs +1 -1
- package/dist/create-geospec.d.mts +3 -2
- package/dist/create-geospec.mjs +1 -1
- package/dist/engine/client.d.mts +21 -1
- package/dist/engine/client.mjs +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/model/export-intent.d.mts +17 -1
- package/dist/model/export-intent.mjs +1 -1
- package/dist/model/index.d.mts +4 -3
- package/dist/model/index.mjs +1 -1
- package/dist/model/native-model-loader.d.mts +30 -7
- package/dist/model/native-model-loader.mjs +1 -1
- package/dist/model/region-scope.d.mts +23 -0
- package/dist/model/region-scope.mjs +1 -0
- package/dist/model/subject-assertions.mjs +1 -1
- package/dist/model/types.d.mts +50 -3
- package/dist/runner/collector.d.mts +4 -2
- package/dist/runner/collector.mjs +2 -2
- package/dist/runner/index.d.mts +3 -2
- package/dist/runner/index.mjs +1 -1
- package/dist/runner/native/native-serial-runner.mjs +1 -1
- package/dist/runner/run-geospec-module.mjs +2 -2
- package/dist/runner/timeout-codes.d.mts +45 -0
- package/dist/runner/timeout-codes.mjs +1 -0
- package/dist/runner/types.d.mts +34 -1
- package/dist/runner/worker/runner-types.d.mts +24 -3
- package/dist/runner/worker/serial-runner.mjs +1 -1
- package/package.json +4 -4
|
@@ -1,6 +1,185 @@
|
|
|
1
1
|
# geospec — Types (2)
|
|
2
2
|
|
|
3
|
-
|
|
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
|
|
4
183
|
|
|
5
184
|
// Direct geometry-source model load options
|
|
6
185
|
LoadModelSourceOptions: {
|
|
@@ -29,6 +208,12 @@ LoadModelSourceOptions: {
|
|
|
29
208
|
meshLinearTolerance?: number;
|
|
30
209
|
/** Angular tolerance in degrees used while meshing exact BRep evidence. */
|
|
31
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;
|
|
32
217
|
}
|
|
33
218
|
|
|
34
219
|
// Geometry bytes, path, browser file/blob, or in-memory mesh buffer
|
|
@@ -67,6 +252,9 @@ LoadModelSourceOptions: {
|
|
|
67
252
|
// Angular tolerance in degrees used while meshing exact BRep evidence
|
|
68
253
|
meshAngularToleranceDegrees?: number
|
|
69
254
|
|
|
255
|
+
// Default work-unit budget for every claim on this subject
|
|
256
|
+
workUnitLimit?: number
|
|
257
|
+
|
|
70
258
|
// Collects suites, tests, assertions, and async completion state for one GeoSpec module execution
|
|
71
259
|
GeoSpecCollector: {
|
|
72
260
|
tests: GeoSpecTestCase[];
|
|
@@ -74,7 +262,7 @@ GeoSpecCollector: {
|
|
|
74
262
|
describeSkip(name: string, _function?: GeoSpecTestFunction): void;
|
|
75
263
|
it(name: string, function_: GeoSpecTestFunction): void;
|
|
76
264
|
itSkip(name: string, _function?: GeoSpecTestFunction): void;
|
|
77
|
-
expectGeo(subject: unknown): GeoSpecMatcher;
|
|
265
|
+
expectGeo(subject: unknown, options?: GeoSpecExpectOptions): GeoSpecMatcher;
|
|
78
266
|
waitForCompletion(testTimeout?: number, testNamePattern?: GeoSpecTestNamePattern): Promise<void>;
|
|
79
267
|
}
|
|
80
268
|
|
|
@@ -93,7 +281,7 @@ GeoSpecCollector: {
|
|
|
93
281
|
itSkip(name: string, _function?: GeoSpecTestFunction): void;
|
|
94
282
|
|
|
95
283
|
// GeoSpecCollector.expectGeo (method)
|
|
96
|
-
expectGeo(subject: unknown): GeoSpecMatcher;
|
|
284
|
+
expectGeo(subject: unknown, options?: GeoSpecExpectOptions): GeoSpecMatcher;
|
|
97
285
|
|
|
98
286
|
// GeoSpecCollector.waitForCompletion (method)
|
|
99
287
|
waitForCompletion(testTimeout?: number, testNamePattern?: GeoSpecTestNamePattern): Promise<void>;
|
|
@@ -103,6 +291,8 @@ GeoSpecCollectorOptions: {
|
|
|
103
291
|
matcherWallBackstop?: number;
|
|
104
292
|
forensic?: boolean;
|
|
105
293
|
nativeAssertions: GeoSpecAssertionClientOptions;
|
|
294
|
+
/** Observes each selected test as it starts and settles, for host progress reporting. */
|
|
295
|
+
onTestEvent?: (event: GeoSpecTestEvent) => void;
|
|
106
296
|
}
|
|
107
297
|
|
|
108
298
|
matcherWallBackstop?: number
|
|
@@ -111,9 +301,15 @@ GeoSpecCollectorOptions: {
|
|
|
111
301
|
|
|
112
302
|
nativeAssertions: GeoSpecAssertionClientOptions
|
|
113
303
|
|
|
304
|
+
// Observes each selected test as it starts and settles, for host progress reporting
|
|
305
|
+
onTestEvent?: (event: GeoSpecTestEvent) => void
|
|
306
|
+
|
|
114
307
|
// Compiled Vitest-style test-name pattern used by a GeoSpec run
|
|
115
308
|
GeoSpecTestNamePattern: RegExp
|
|
116
309
|
|
|
310
|
+
// One GeoSpec timeout code
|
|
311
|
+
GeoSpecTimeoutCode: (typeof geoSpecTimeoutCode)[keyof typeof geoSpecTimeoutCode]
|
|
312
|
+
|
|
117
313
|
// Options for recursive GeoSpec test discovery
|
|
118
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.
|
|
119
315
|
DiscoverGeoSpecFilesOptions: {
|
|
@@ -291,6 +487,16 @@ GeoSpecTestCase: {
|
|
|
291
487
|
// Wall-clock cost of the test body plus its pending assertions, in milliseconds (R1)
|
|
292
488
|
durationMs?: number
|
|
293
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
|
+
|
|
294
500
|
// Test case status after runner collection
|
|
295
501
|
GeoSpecTestStatus: 'passed' | 'failed' | 'unsupported' | 'inconclusive' | 'not-run' | 'skipped'
|
|
296
502
|
|
|
@@ -308,6 +514,8 @@ RunGeoSpecModuleOptions: {
|
|
|
308
514
|
matcherWallBackstop?: number;
|
|
309
515
|
/** Emit structured forensic events for this run. */
|
|
310
516
|
forensic?: boolean;
|
|
517
|
+
/** Observes each selected test as it starts and settles, for host progress reporting. */
|
|
518
|
+
onTestEvent?: (event: GeoSpecTestEvent) => void;
|
|
311
519
|
/**
|
|
312
520
|
* Host-provided protocol-3 compiled assertion client. The host owns engine and
|
|
313
521
|
* admitted subject lifetimes and supplies bindings through builtinModules;
|
|
@@ -349,6 +557,9 @@ RunGeoSpecModuleOptions: {
|
|
|
349
557
|
// Emit structured forensic events for this run
|
|
350
558
|
forensic?: boolean
|
|
351
559
|
|
|
560
|
+
// Observes each selected test as it starts and settles, for host progress reporting
|
|
561
|
+
onTestEvent?: (event: GeoSpecTestEvent) => void
|
|
562
|
+
|
|
352
563
|
// Host-provided protocol-3 compiled assertion client
|
|
353
564
|
nativeAssertions: GeoSpecAssertionClientOptions
|
|
354
565
|
|
|
@@ -380,6 +591,9 @@ GeoSpecNativeRunnerAssertions: Omit<GeoSpecAssertionClientOptions, 'engine'> & {
|
|
|
380
591
|
|
|
381
592
|
readonly workUnitLimit?: number
|
|
382
593
|
|
|
594
|
+
// The largest `workUnitLimit` a spec may author in `loadModel` or `expectGeo` options
|
|
595
|
+
readonly maximumWorkUnitLimit?: number
|
|
596
|
+
|
|
383
597
|
readonly engine: GeoSpecNativeModelEngine
|
|
384
598
|
|
|
385
599
|
// Options for the native serial runner
|
|
@@ -423,6 +637,11 @@ CreateGeoSpecNativeModelLoaderOptions: {
|
|
|
423
637
|
* scopes one at a time: a scope's release touches only subjects whose scope has settled.
|
|
424
638
|
*/
|
|
425
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;
|
|
426
645
|
}
|
|
427
646
|
|
|
428
647
|
readonly engine: GeoSpecNativeModelEngine
|
|
@@ -440,6 +659,9 @@ CreateGeoSpecNativeModelLoaderOptions: {
|
|
|
440
659
|
// Subject handles carried between the release scopes of loaders that share one engine, keyed by subjectHash
|
|
441
660
|
readonly carried?: Map<string, unknown>
|
|
442
661
|
|
|
662
|
+
// The largest `loadModel` `workUnitLimit` a spec may author
|
|
663
|
+
readonly maximumWorkUnitLimit?: number
|
|
664
|
+
|
|
443
665
|
// Native additions accepted by the injected `geospec/runner/native` loader
|
|
444
666
|
GeoSpecNativeLoadModelOptions: LoadModelOptions<Code> & {
|
|
445
667
|
/** Ordered external resource payloads declared to the native admission request. */
|
|
@@ -466,6 +688,9 @@ GeoSpecNativeLoadModelOptions: LoadModelOptions<Code> & {
|
|
|
466
688
|
// Angular tolerance in degrees used while meshing exact BRep evidence
|
|
467
689
|
meshAngularToleranceDegrees?: number
|
|
468
690
|
|
|
691
|
+
// Default work-unit budget for every claim on this subject
|
|
692
|
+
workUnitLimit?: number
|
|
693
|
+
|
|
469
694
|
// Ordered external resource payloads declared to the native admission request
|
|
470
695
|
readonly resources?: readonly GeoSpecNativeModelResource[]
|
|
471
696
|
|
|
@@ -495,7 +720,7 @@ GeoSpecNativeModelEngine: GeoSpecNativeEngine & {
|
|
|
495
720
|
releaseSubject(request: Uint8Array<ArrayBuffer>): Uint8Array<ArrayBuffer>;
|
|
496
721
|
|
|
497
722
|
// Model loader injected into native VM runs
|
|
498
|
-
// Remarks:
|
|
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.
|
|
499
724
|
GeoSpecNativeModelLoader: <Code extends Record<string, string> = Record<string, string>>(options: GeoSpecNativeLoadModelOptions<Code>) => Promise<GeoSpecNativeModelSubject>
|
|
500
725
|
|
|
501
726
|
// Subject identity returned by native STEP/GLB admission
|
|
@@ -720,6 +945,14 @@ GeoSpecRunnerEvent: {
|
|
|
720
945
|
} | {
|
|
721
946
|
type: 'file-start';
|
|
722
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;
|
|
723
956
|
} | {
|
|
724
957
|
type: 'file-complete';
|
|
725
958
|
file: string;
|
|
@@ -851,6 +1084,12 @@ GeoSpecRunnerRunOptions: {
|
|
|
851
1084
|
testTimeout?: number;
|
|
852
1085
|
/** Non-verdict matcher wall backstop. Milliseconds. */
|
|
853
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;
|
|
854
1093
|
/** Emit structured forensic measurements for this run. */
|
|
855
1094
|
forensic?: boolean;
|
|
856
1095
|
/**
|
|
@@ -872,6 +1111,9 @@ GeoSpecRunnerRunOptions: {
|
|
|
872
1111
|
// Non-verdict matcher wall backstop
|
|
873
1112
|
matcherWallBackstop?: number
|
|
874
1113
|
|
|
1114
|
+
// Engine work-unit budget for this run's claims, replacing the runner's `nativeAssertions.workUnitLimit`
|
|
1115
|
+
workUnitLimit?: number
|
|
1116
|
+
|
|
875
1117
|
// Emit structured forensic measurements for this run
|
|
876
1118
|
forensic?: boolean
|
|
877
1119
|
|
|
@@ -880,13 +1122,18 @@ GeoSpecRunnerRunOptions: {
|
|
|
880
1122
|
|
|
881
1123
|
// Runner-independent native assertion client
|
|
882
1124
|
GeoSpecAssertionClient: {
|
|
883
|
-
|
|
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;
|
|
884
1130
|
query(options: MinimumDistanceQuery): Promise<MinimumDistanceResult>;
|
|
885
1131
|
query(options: GeoSpecQueryOptions): Promise<GeoSpecCanonicalClaimReport>;
|
|
886
1132
|
}
|
|
887
1133
|
|
|
1134
|
+
// Start a chain
|
|
888
1135
|
// GeoSpecAssertionClient.expectGeo (method)
|
|
889
|
-
expectGeo(subject: GeoSpecNativeSubject | GeoSpecSubject): GeoSpecAssertionMatchers;
|
|
1136
|
+
expectGeo(subject: GeoSpecNativeSubject | GeoSpecSubject, options?: GeoSpecExpectOptions): GeoSpecAssertionMatchers;
|
|
890
1137
|
|
|
891
1138
|
// GeoSpecAssertionClient.query (method)
|
|
892
1139
|
query(options: MinimumDistanceQuery): Promise<MinimumDistanceResult>;
|
|
@@ -900,6 +1147,12 @@ GeoSpecAssertionClientOptions: {
|
|
|
900
1147
|
readonly evidenceProfile?: GeoSpecNativeEvidenceProfile;
|
|
901
1148
|
readonly subjectSlot?: string;
|
|
902
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;
|
|
903
1156
|
}
|
|
904
1157
|
|
|
905
1158
|
readonly claimId?: (matcher: GeoSpecMatcherName, sequence: number) => string
|
|
@@ -913,6 +1166,9 @@ GeoSpecAssertionClientOptions: {
|
|
|
913
1166
|
|
|
914
1167
|
readonly workUnitLimit?: number
|
|
915
1168
|
|
|
1169
|
+
// The largest `workUnitLimit` a spec may author in `loadModel` or `expectGeo` options
|
|
1170
|
+
readonly maximumWorkUnitLimit?: number
|
|
1171
|
+
|
|
916
1172
|
// Standalone native matcher chain, including core-owned negation
|
|
917
1173
|
GeoSpecAssertionMatchers: GeoSpecMatcherMethods<GeoSpecCanonicalClaimReport> & {
|
|
918
1174
|
readonly not: GeoSpecMatcherMethods<GeoSpecCanonicalClaimReport>;
|
|
@@ -1052,6 +1308,9 @@ GeoSpecNativeQueryOptions: Omit<GeoSpecNativeClaimOptions, 'arguments' | 'capabi
|
|
|
1052
1308
|
|
|
1053
1309
|
readonly workUnitLimit: number
|
|
1054
1310
|
|
|
1311
|
+
// The host's largest authored budget, reported as `details.maximumLimit` on `MATCHER_TIMEOUT`
|
|
1312
|
+
readonly maximumWorkUnitLimit?: number
|
|
1313
|
+
|
|
1055
1314
|
readonly subject: GeoSpecNativeSubject
|
|
1056
1315
|
|
|
1057
1316
|
readonly capability: GeoSpecQueryCapability | 'minimumDistance'
|
|
@@ -1243,6 +1502,7 @@ GeoSpecCanonicalClaimReport: {
|
|
|
1243
1502
|
readonly canonicalResult: Uint8Array<ArrayBuffer>;
|
|
1244
1503
|
readonly claim: Readonly<Record<string, JSONValue>>;
|
|
1245
1504
|
readonly claimId: string;
|
|
1505
|
+
/** Engine diagnostics; a `MATCHER_TIMEOUT` row also carries `details.limit`, `details.used` and `details.maximumLimit`. */
|
|
1246
1506
|
readonly diagnostics: readonly JSONValue[];
|
|
1247
1507
|
readonly evidence?: JSONValue;
|
|
1248
1508
|
readonly polarity: GeoSpecClaimPolarity;
|
|
@@ -1260,6 +1520,7 @@ GeoSpecCanonicalClaimReport: {
|
|
|
1260
1520
|
|
|
1261
1521
|
readonly claimId: string
|
|
1262
1522
|
|
|
1523
|
+
// Engine diagnostics
|
|
1263
1524
|
readonly diagnostics: readonly JSONValue[]
|
|
1264
1525
|
|
|
1265
1526
|
readonly evidence?: JSONValue
|
|
@@ -1297,217 +1558,3 @@ GeoSpecNativeEngine: {
|
|
|
1297
1558
|
|
|
1298
1559
|
// Success-evidence profile a product selects for its plans (PERF-OUTPUT-01)
|
|
1299
1560
|
GeoSpecNativeEvidenceProfile: 'bounded' | 'complete'
|
|
1300
|
-
|
|
1301
|
-
// Content-addressed subject accepted by a protocol-3 assertion plan
|
|
1302
|
-
GeoSpecNativeSubject: {
|
|
1303
|
-
readonly contentHash?: string;
|
|
1304
|
-
readonly subjectHash?: string;
|
|
1305
|
-
}
|
|
1306
|
-
|
|
1307
|
-
readonly contentHash?: string
|
|
1308
|
-
|
|
1309
|
-
readonly subjectHash?: string
|
|
1310
|
-
|
|
1311
|
-
// A canonical fixed-contract matcher
|
|
1312
|
-
GeoSpecFixedMatcherDescriptor: {
|
|
1313
|
-
readonly contract: 'geospec.plate-two-windows/v1' | 'geospec.pmi.parallel-plane-distance/v1';
|
|
1314
|
-
readonly expected: 'true';
|
|
1315
|
-
readonly mode: 'sync';
|
|
1316
|
-
}
|
|
1317
|
-
|
|
1318
|
-
readonly contract: 'geospec.plate-two-windows/v1' | 'geospec.pmi.parallel-plane-distance/v1'
|
|
1319
|
-
|
|
1320
|
-
readonly expected: 'true'
|
|
1321
|
-
|
|
1322
|
-
readonly mode: 'sync'
|
|
1323
|
-
|
|
1324
|
-
// Installed Vitest matcher map and lifecycle settlement hook
|
|
1325
|
-
GeoSpecVitestAdapter: {
|
|
1326
|
-
readonly matchers: GeoSpecVitestMatcherMap;
|
|
1327
|
-
flush(): Promise<void>;
|
|
1328
|
-
}
|
|
1329
|
-
|
|
1330
|
-
readonly matchers: GeoSpecVitestMatcherMap
|
|
1331
|
-
|
|
1332
|
-
// GeoSpecVitestAdapter.flush (method)
|
|
1333
|
-
flush(): Promise<void>;
|
|
1334
|
-
|
|
1335
|
-
// Input for exporting one validated Tau project descriptor
|
|
1336
|
-
ExportTauProjectArtifactOptions: {
|
|
1337
|
-
readonly descriptor: GeoSpecTauProjectDescriptor;
|
|
1338
|
-
/** Called twice so source discovery and export use separate runtime lifetimes. */
|
|
1339
|
-
readonly createRuntime: () => GeoSpecTauProjectRuntime | Promise<GeoSpecTauProjectRuntime>;
|
|
1340
|
-
readonly signal?: AbortSignal;
|
|
1341
|
-
}
|
|
1342
|
-
|
|
1343
|
-
readonly descriptor: GeoSpecTauProjectDescriptor
|
|
1344
|
-
|
|
1345
|
-
// Called twice so source discovery and export use separate runtime lifetimes
|
|
1346
|
-
readonly createRuntime: () => GeoSpecTauProjectRuntime | Promise<GeoSpecTauProjectRuntime>
|
|
1347
|
-
|
|
1348
|
-
readonly signal?: AbortSignal
|
|
1349
|
-
|
|
1350
|
-
// Finalized geometry bytes and the exact source/export metadata that produced them
|
|
1351
|
-
GeoSpecTauProjectArtifact: {
|
|
1352
|
-
readonly format: 'step' | 'glb';
|
|
1353
|
-
readonly name: string;
|
|
1354
|
-
readonly mimeType: string;
|
|
1355
|
-
readonly bytes: Uint8Array<ArrayBuffer>;
|
|
1356
|
-
readonly frame: {
|
|
1357
|
-
readonly coordinateSystem: 'z-up';
|
|
1358
|
-
readonly lengthUnit: 'millimeter';
|
|
1359
|
-
readonly sourceUnit: 'mm';
|
|
1360
|
-
};
|
|
1361
|
-
readonly source: {
|
|
1362
|
-
readonly manifestPath: string;
|
|
1363
|
-
readonly manifestBytes: Uint8Array<ArrayBuffer>;
|
|
1364
|
-
readonly manifest: ProjectManifest;
|
|
1365
|
-
readonly projectEntryPath: string;
|
|
1366
|
-
readonly entryPath: string;
|
|
1367
|
-
readonly kernelId: string;
|
|
1368
|
-
readonly files: readonly RuntimeSourceSnapshotFile[];
|
|
1369
|
-
};
|
|
1370
|
-
readonly export: {
|
|
1371
|
-
readonly options: Readonly<Record<string, unknown>>;
|
|
1372
|
-
readonly route: NonNullable<GeometryExportIntent['route']>;
|
|
1373
|
-
};
|
|
1374
|
-
}
|
|
1375
|
-
|
|
1376
|
-
readonly format: 'step' | 'glb'
|
|
1377
|
-
|
|
1378
|
-
readonly name: string
|
|
1379
|
-
|
|
1380
|
-
readonly mimeType: string
|
|
1381
|
-
|
|
1382
|
-
readonly bytes: Uint8Array<ArrayBuffer>
|
|
1383
|
-
|
|
1384
|
-
readonly frame: {
|
|
1385
|
-
readonly coordinateSystem: 'z-up';
|
|
1386
|
-
readonly lengthUnit: 'millimeter';
|
|
1387
|
-
readonly sourceUnit: 'mm';
|
|
1388
|
-
}
|
|
1389
|
-
|
|
1390
|
-
readonly source: {
|
|
1391
|
-
readonly manifestPath: string;
|
|
1392
|
-
readonly manifestBytes: Uint8Array<ArrayBuffer>;
|
|
1393
|
-
readonly manifest: ProjectManifest;
|
|
1394
|
-
readonly projectEntryPath: string;
|
|
1395
|
-
readonly entryPath: string;
|
|
1396
|
-
readonly kernelId: string;
|
|
1397
|
-
readonly files: readonly RuntimeSourceSnapshotFile[];
|
|
1398
|
-
}
|
|
1399
|
-
|
|
1400
|
-
readonly export: {
|
|
1401
|
-
readonly options: Readonly<Record<string, unknown>>;
|
|
1402
|
-
readonly route: NonNullable<GeometryExportIntent['route']>;
|
|
1403
|
-
}
|
|
1404
|
-
|
|
1405
|
-
// Runtime surface required to snapshot and export one Tau project
|
|
1406
|
-
GeoSpecTauProjectRuntime: RuntimeClientWithRoutes & Pick<RuntimeClient, 'shutdown' | 'snapshotSource'>
|
|
1407
|
-
|
|
1408
|
-
open: (input: Pick<Parameters<RuntimeClient['open']>[0], 'source' | 'parameters' | 'stage' | 'watch' | 'signal'>) => Pick<ReturnType<RuntimeClient['open']>, 'export' | 'close'>
|
|
1409
|
-
|
|
1410
|
-
// GeoSpecTauProjectRuntime.on (method)
|
|
1411
|
-
on?(event: 'telemetry', handler: (batch: {
|
|
1412
|
-
readonly entries: ReadonlyArray<{
|
|
1413
|
-
name: string;
|
|
1414
|
-
duration: number;
|
|
1415
|
-
startTime: number;
|
|
1416
|
-
workerTimeOrigin: number;
|
|
1417
|
-
}>;
|
|
1418
|
-
}) => void): () => void;
|
|
1419
|
-
|
|
1420
|
-
// GeoSpecTauProjectRuntime.bestRouteFor (method)
|
|
1421
|
-
bestRouteFor(format: string, options?: {
|
|
1422
|
-
readonly kernelId?: string;
|
|
1423
|
-
}): GeoSpecExportRoute | undefined;
|
|
1424
|
-
|
|
1425
|
-
// Trusted project configuration using existing discovery and runner options
|
|
1426
|
-
// Remarks: Omitted values keep their existing owner's defaults. Defined overrides replace whole fields, including empty arrays, false and the subjects map. Existing discovery currently treats an absent or empty include array as its default pattern. Preserving [] here does not change that consumer behavior. This is configuration data, not a canonical engine plan or a geometry result.
|
|
1427
|
-
GeoSpecConfig: {
|
|
1428
|
-
include?: readonly string[];
|
|
1429
|
-
exclude?: readonly string[];
|
|
1430
|
-
testNamePattern?: string;
|
|
1431
|
-
/** Positive finite milliseconds; the runner owns its default. */
|
|
1432
|
-
testTimeout?: number;
|
|
1433
|
-
/** Positive finite milliseconds; does not define a geometry verdict. */
|
|
1434
|
-
matcherWallBackstop?: number;
|
|
1435
|
-
bail?: boolean;
|
|
1436
|
-
forensic?: boolean;
|
|
1437
|
-
cache?: boolean;
|
|
1438
|
-
/** Requested cache location only; loading configuration creates no store. */
|
|
1439
|
-
cacheDirectory?: string;
|
|
1440
|
-
subjects?: Readonly<Record<string, GeoSpecTauProjectDescriptor>>;
|
|
1441
|
-
}
|
|
1442
|
-
|
|
1443
|
-
include?: readonly string[]
|
|
1444
|
-
|
|
1445
|
-
exclude?: readonly string[]
|
|
1446
|
-
|
|
1447
|
-
testNamePattern?: string
|
|
1448
|
-
|
|
1449
|
-
// Positive finite milliseconds
|
|
1450
|
-
testTimeout?: number
|
|
1451
|
-
|
|
1452
|
-
// Positive finite milliseconds
|
|
1453
|
-
matcherWallBackstop?: number
|
|
1454
|
-
|
|
1455
|
-
bail?: boolean
|
|
1456
|
-
|
|
1457
|
-
forensic?: boolean
|
|
1458
|
-
|
|
1459
|
-
cache?: boolean
|
|
1460
|
-
|
|
1461
|
-
// Requested cache location only
|
|
1462
|
-
cacheDirectory?: string
|
|
1463
|
-
|
|
1464
|
-
subjects?: Readonly<Record<string, GeoSpecTauProjectDescriptor>>
|
|
1465
|
-
|
|
1466
|
-
// Imported Tau project data for later host resolution
|
|
1467
|
-
// Remarks: This descriptor does not validate the original manifest bytes or its schema, admit an asset, export geometry, or establish finalized-artifact provenance.
|
|
1468
|
-
GeoSpecTauProjectDescriptor: {
|
|
1469
|
-
readonly kind: 'tau-project';
|
|
1470
|
-
/** Normalized project-relative POSIX path identifying the imported manifest. */
|
|
1471
|
-
readonly manifestPath: string;
|
|
1472
|
-
readonly manifest: Readonly<Record<string, JSONValue>>;
|
|
1473
|
-
readonly format: 'step' | 'glb';
|
|
1474
|
-
readonly parameters?: Readonly<Record<string, JSONValue>>;
|
|
1475
|
-
}
|
|
1476
|
-
|
|
1477
|
-
readonly kind: 'tau-project'
|
|
1478
|
-
|
|
1479
|
-
// Normalized project-relative POSIX path identifying the imported manifest
|
|
1480
|
-
readonly manifestPath: string
|
|
1481
|
-
|
|
1482
|
-
readonly manifest: Readonly<Record<string, JSONValue>>
|
|
1483
|
-
|
|
1484
|
-
readonly format: 'step' | 'glb'
|
|
1485
|
-
|
|
1486
|
-
readonly parameters?: Readonly<Record<string, JSONValue>>
|
|
1487
|
-
|
|
1488
|
-
// Resolved file identity and validated configuration data
|
|
1489
|
-
LoadedGeoSpecConfig: {
|
|
1490
|
-
readonly configPath?: string;
|
|
1491
|
-
readonly options: GeoSpecConfig;
|
|
1492
|
-
}
|
|
1493
|
-
|
|
1494
|
-
readonly configPath?: string
|
|
1495
|
-
|
|
1496
|
-
readonly options: GeoSpecConfig
|
|
1497
|
-
|
|
1498
|
-
// Options for one trusted Node configuration load
|
|
1499
|
-
LoadGeoSpecConfigOptions: {
|
|
1500
|
-
readonly projectPath: string;
|
|
1501
|
-
/** Explicit file, resolved relative to the project unless absolute. */
|
|
1502
|
-
readonly configPath?: string;
|
|
1503
|
-
/** Own defined fields override configuration without deep merging. */
|
|
1504
|
-
readonly overrides?: GeoSpecConfig;
|
|
1505
|
-
}
|
|
1506
|
-
|
|
1507
|
-
readonly projectPath: string
|
|
1508
|
-
|
|
1509
|
-
// Explicit file, resolved relative to the project unless absolute
|
|
1510
|
-
readonly configPath?: string
|
|
1511
|
-
|
|
1512
|
-
// Own defined fields override configuration without deep merging
|
|
1513
|
-
readonly overrides?: GeoSpecConfig
|