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