geospec 0.1.0-beta.9 → 0.4.1-next.331

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. package/README.md +34 -9
  2. package/agent/doctrine.md +2 -1
  3. package/agent/geospec-authoring/SKILL.md +3 -3
  4. package/agent/geospec-authoring/api-index.md +20 -92
  5. package/agent/geospec-authoring/api-types.md +85 -480
  6. package/agent/geospec-authoring/public-api-functions.md +21 -1
  7. package/agent/geospec-authoring/public-api-index.md +215 -319
  8. package/agent/geospec-authoring/public-api-types-2.md +480 -352
  9. package/agent/geospec-authoring/public-api-types-3.md +79 -215
  10. package/agent/geospec-authoring/public-api-types.md +334 -849
  11. package/agent/resources.js +12 -13
  12. package/agent/skills.json +2 -3
  13. package/dist/assertion-client/client.d.mts +14 -15
  14. package/dist/assertion-client/client.mjs +1 -1
  15. package/dist/cli/check.mjs +2 -0
  16. package/dist/cli/cli.d.mts +5 -5
  17. package/dist/cli/cli.mjs +20 -3
  18. package/dist/cli/node-host.d.mts +5 -4
  19. package/dist/cli/node-host.mjs +1 -1
  20. package/dist/cli/wire-value.mjs +1 -1
  21. package/dist/config/define-config.d.mts +2 -3
  22. package/dist/config/node/index.mjs +1 -1
  23. package/dist/config/node/load.d.mts +2 -3
  24. package/dist/config/node/load.mjs +1 -1
  25. package/dist/config/read-geospec-config.d.mts +10 -6
  26. package/dist/config/read-geospec-config.mjs +1 -1
  27. package/dist/config/types.d.mts +6 -7
  28. package/dist/create-geospec.d.mts +7 -6
  29. package/dist/engine/client.d.mts +15 -15
  30. package/dist/engine/client.mjs +1 -1
  31. package/dist/engine/matchers.d.mts +10 -11
  32. package/dist/engine/pmi.types.d.mts +11 -12
  33. package/dist/engine/protocol.d.mts +7 -8
  34. package/dist/engine/protocol.mjs +1 -1
  35. package/dist/geometry-unit.d.mts +2 -3
  36. package/dist/index.d.mts +2 -2
  37. package/dist/index.mjs +1 -1
  38. package/dist/mesh/index.d.mts +2 -2
  39. package/dist/mesh/types.d.mts +8 -505
  40. package/dist/model/errors.d.mts +2 -3
  41. package/dist/model/load-model.d.mts +3 -4
  42. package/dist/model/mesh-evidence-matchers.d.mts +2 -3
  43. package/dist/model/native-model-loader.d.mts +14 -17
  44. package/dist/model/native-model-loader.mjs +1 -1
  45. package/dist/model/node/command-exporter.d.mts +3 -4
  46. package/dist/model/node/command-exporter.mjs +1 -1
  47. package/dist/model/node/index.mjs +1 -1
  48. package/dist/model/region-scope.d.mts +3 -6
  49. package/dist/model/region-scope.mjs +1 -1
  50. package/dist/model/subject.d.mts +2 -5
  51. package/dist/model/subject.mjs +1 -1
  52. package/dist/model/types.d.mts +19 -20
  53. package/dist/runner/collector.d.mts +7 -8
  54. package/dist/runner/collector.mjs +3 -1
  55. package/dist/runner/discovery.d.mts +10 -11
  56. package/dist/runner/discovery.mjs +5 -1
  57. package/dist/runner/filter.d.mts +6 -7
  58. package/dist/runner/filter.mjs +3 -1
  59. package/dist/runner/index.d.mts +3 -1
  60. package/dist/runner/index.mjs +1 -1
  61. package/dist/runner/native/native-pool-grants.d.mts +2 -3
  62. package/dist/runner/native/native-serial-runner.d.mts +4 -7
  63. package/dist/runner/native/native-serial-runner.mjs +1 -1
  64. package/dist/runner/node/engine.d.mts +5 -6
  65. package/dist/runner/node/index.mjs +1 -1
  66. package/dist/runner/node/node-vm-filesystem.d.mts +4 -5
  67. package/dist/runner/node/node-vm-filesystem.mjs +1 -1
  68. package/dist/runner/node/pool-runner.d.mts +15 -6
  69. package/dist/runner/node/pool-runner.mjs +1 -1
  70. package/dist/runner/node/pool-worker-entry.d.mts +9 -6
  71. package/dist/runner/node/pool-worker-entry.mjs +1 -1
  72. package/dist/runner/pool/events.mjs +1 -1
  73. package/dist/runner/pool/pool-messages.d.mts +8 -9
  74. package/dist/runner/pool/pool.d.mts +4 -6
  75. package/dist/runner/pool/pool.mjs +1 -1
  76. package/dist/runner/pool/shard-timings.d.mts +3 -4
  77. package/dist/runner/pool/worker-host.d.mts +6 -5
  78. package/dist/runner/pool/worker-host.mjs +1 -1
  79. package/dist/runner/run-geospec-module.d.mts +2 -3
  80. package/dist/runner/run-geospec-module.mjs +2 -2
  81. package/dist/runner/timeout-codes.d.mts +6 -8
  82. package/dist/runner/types.d.mts +56 -53
  83. package/dist/runner/worker/no-matching-tests-issue.d.mts +3 -4
  84. package/dist/runner/worker/runner-types.d.mts +17 -16
  85. package/dist/runner/worker/serial-runner.mjs +1 -1
  86. package/dist/selector/types.d.mts +22 -23
  87. package/dist/step/types.d.mts +4 -119
  88. package/dist/support/filesystem-errors.mjs +1 -0
  89. package/dist/support/hash.mjs +1 -0
  90. package/dist/support/path.mjs +1 -0
  91. package/dist/support/sha256.mjs +1 -0
  92. package/dist/support/types.d.mts +38 -0
  93. package/dist/vitest/adapter.d.mts +5 -6
  94. package/dist/vitest/adapter.mjs +1 -1
  95. package/dist/vitest/index.d.mts +0 -1
  96. package/dist/vitest/index.mjs +1 -1
  97. package/dist/vitest/node/index.d.mts +2 -0
  98. package/dist/vitest/node/index.mjs +1 -0
  99. package/dist/vitest/node/setup-project.d.mts +60 -0
  100. package/dist/vitest/node/setup-project.mjs +1 -0
  101. package/dist/vm/plain-module-vm.d.mts +13 -0
  102. package/dist/vm/plain-module-vm.mjs +8 -0
  103. package/dist/vm/types.d.mts +142 -0
  104. package/package.json +17 -9
  105. package/agent/geospec-authoring/api-types-2.md +0 -85
@@ -1,44 +1,31 @@
1
+ import { KernelIssueCode } from "../support/types.mjs";
1
2
  import { GeoSpecUnit } from "../geometry-unit.mjs";
2
- import { XdeReadResult } from "../step/types.mjs";
3
- import { JSONValue, KernelIssueCode } from "@taucad/runtime/types";
4
3
  //#region src/mesh/types.d.ts
5
4
  /**
6
5
  * Numeric 3D vector.
7
6
  *
8
7
  * @public
9
8
  */
10
- type Vec3 = readonly [number, number, number];
9
+ export type Vec3 = readonly [number, number, number];
11
10
  /**
12
11
  * Geometry file formats supported by the P0 mesh loader.
13
12
  *
14
13
  * @public
15
14
  */
16
- type MeshFileFormat = 'glb' | 'gltf' | 'mesh-buffer';
15
+ export type MeshFileFormat = 'glb' | 'gltf' | 'mesh-buffer';
17
16
  /**
18
- * Geometry file formats understood by GeoSpec provenance.
17
+ * Geometry file formats a GeoSpec export intent can name.
19
18
  *
20
19
  * @public
21
20
  */
22
- type GeometryFileFormat = MeshFileFormat | 'step' | 'stp';
23
- /**
24
- * Source metadata for a loaded geometry subject.
25
- *
26
- * @public
27
- */
28
- type GeometrySource = {
29
- kind: 'bytes' | 'array-buffer' | 'blob' | 'file' | 'path' | 'url' | 'mesh-buffer' | 'readable-stream' | 'async-iterable';
30
- format: GeometryFileFormat;
31
- path?: string;
32
- name?: string;
33
- byteLength?: number;
34
- };
21
+ export type GeometryFileFormat = MeshFileFormat | 'step' | 'stp';
35
22
  /**
36
23
  * Runtime export intent recorded when GeoSpec obtains evidence from a CAD
37
24
  * runtime instead of a direct geometry file.
38
25
  *
39
26
  * @public
40
27
  */
41
- type GeometryExportIntent = {
28
+ export type GeometryExportIntent = {
42
29
  requested: {
43
30
  format: GeometryFileFormat;
44
31
  coordinateSystem?: 'y-up' | 'z-up';
@@ -71,45 +58,12 @@ type GeometryExportIntent = {
71
58
  direct: boolean;
72
59
  };
73
60
  };
74
- /**
75
- * Provenance recorded by GeoSpec loaders. Tau runtime still emits geometry
76
- * bytes/files; GeoSpec records how those bytes were consumed.
77
- *
78
- * @public
79
- */
80
- type GeometryProvenance = {
81
- source: GeometrySource;
82
- unit: GeoSpecUnit;
83
- loader: 'gltf-transform' | 'in-memory' | 'opencascade-step';
84
- contentHash?: string;
85
- parameters?: Record<string, JSONValue>;
86
- exportIntent?: GeometryExportIntent;
87
- };
88
- /**
89
- * Capability exposed by a loaded subject.
90
- *
91
- * @public
92
- */
93
- type GeometryCapability = {
94
- kind: 'mesh';
95
- feature: 'triangles' | 'bounding-box' | 'connected-components' | 'watertightness' | 'surface-area' | 'volume' | 'center-of-mass' | 'distance' | 'component-overlap';
96
- } | {
97
- kind: 'brep';
98
- feature: 'validity' | 'topology-counts' | 'bounding-box' | 'mass-properties' | 'planar-faces' | 'cylindrical-faces' | 'circular-holes' | 'circular-hole-patterns' | 'chamfer-features' | 'fillet-features' | 'wall-thickness';
99
- } | {
100
- kind: 'step';
101
- feature: 'schema' | 'units' | 'product-structure' | 'reader-provenance';
102
- } | {
103
- kind: 'unsupported';
104
- feature: string;
105
- reason: string;
106
- };
107
61
  /**
108
62
  * Diagnostic emitted by GeoSpec loaders, analyzers, and matchers.
109
63
  *
110
64
  * @public
111
65
  */
112
- type GeometryDiagnostic = {
66
+ export type GeometryDiagnostic = {
113
67
  code: KernelIssueCode | (string & {});
114
68
  severity: 'error' | 'warning' | 'info';
115
69
  message: string;
@@ -121,455 +75,4 @@ type GeometryDiagnostic = {
121
75
  };
122
76
  details?: unknown;
123
77
  };
124
- /** Diagnostic form permitted inside a wire-safe subject snapshot. @public */
125
- type GeometryEvidenceDiagnostic = Omit<GeometryDiagnostic, 'details'> & {
126
- details?: JSONValue;
127
- };
128
- /**
129
- * Mesh evidence loaded from geometry bytes or buffers.
130
- *
131
- * @public
132
- */
133
- type MeshEvidence = {
134
- format: MeshFileFormat;
135
- stats: GeometryStats;
136
- };
137
- /** Wire-safe mesh summary carried by an opaque geometry subject. @public */
138
- type GeometrySubjectMeshEvidence = {
139
- format: MeshFileFormat;
140
- stats: Pick<GeometryStats, 'vertexCount' | 'meshCount' | 'triangleCount'>;
141
- };
142
- /**
143
- * One triangle from mesh evidence, in geometry document coordinates.
144
- *
145
- * @public
146
- */
147
- type MeshTriangle = {
148
- primitive: string;
149
- triangleIndex: number;
150
- a: [number, number, number];
151
- b: [number, number, number];
152
- c: [number, number, number];
153
- center: [number, number, number];
154
- area: number;
155
- };
156
- /**
157
- * Basic exact or topology-derived BRep evidence consumed by early feature
158
- * matchers. Loaders may provide any subset; matchers report unsupported
159
- * diagnostics when the required evidence is absent.
160
- *
161
- * @public
162
- */
163
- type BrepEvidence = {
164
- validity?: {
165
- valid: boolean;
166
- checks?: Array<{
167
- shape: string;
168
- status: string;
169
- }>;
170
- maxTolerance?: number;
171
- freeBounds?: {
172
- count: number;
173
- };
174
- smallEdges?: Array<{
175
- length: number;
176
- shape?: string;
177
- location?: Vec3;
178
- }>;
179
- sameParameter?: boolean;
180
- closedShells?: boolean;
181
- closedSolids?: boolean;
182
- solidCount?: number;
183
- invalidSolidCount?: number;
184
- openEdgeCount?: number;
185
- reason?: string;
186
- closedWires?: boolean;
187
- };
188
- topologyCounts?: {
189
- vertices?: number;
190
- edges?: number;
191
- wires?: number;
192
- faces?: number;
193
- shells?: number;
194
- solids?: number;
195
- compounds?: number;
196
- };
197
- boundingBox?: {
198
- min: Vec3;
199
- max: Vec3;
200
- size: Vec3;
201
- center: Vec3;
202
- };
203
- massProperties?: {
204
- surfaceArea?: number;
205
- volume?: number;
206
- centerOfMass?: Vec3;
207
- mass?: number;
208
- };
209
- planarFaces?: Array<{
210
- normal: Vec3;
211
- offset: number;
212
- area?: number;
213
- center?: Vec3;
214
- }>;
215
- cylindricalFaces?: Array<{
216
- radius: number;
217
- axis: 'x' | 'y' | 'z';
218
- center?: Vec3;
219
- axisRange?: {
220
- min: number;
221
- max: number;
222
- };
223
- }>;
224
- circularHoles?: Array<{
225
- diameter: number;
226
- through: boolean;
227
- axis: 'x' | 'y' | 'z';
228
- center?: Vec3;
229
- axisRange?: {
230
- min: number;
231
- max: number;
232
- };
233
- }>;
234
- circularHolePatterns?: Array<{
235
- count: number;
236
- holeDiameter: number;
237
- boltCircleDiameter: number;
238
- axis: 'x' | 'y' | 'z';
239
- center?: Vec3;
240
- }>;
241
- chamferFeatures?: Array<{
242
- distance: number;
243
- selection?: string;
244
- }>;
245
- filletFeatures?: Array<{
246
- radius: number;
247
- selection?: string;
248
- }>;
249
- minimumWallThickness?: {
250
- value: number;
251
- location?: Vec3;
252
- pointA?: Vec3;
253
- pointB?: Vec3;
254
- solidIndex?: number;
255
- tieCount?: number;
256
- algorithm?: string;
257
- tolerance?: number;
258
- supportA?: {
259
- faceIndex?: number;
260
- surfaceType?: string;
261
- supportType?: string;
262
- };
263
- supportB?: {
264
- faceIndex?: number;
265
- surfaceType?: string;
266
- supportType?: string;
267
- };
268
- rejections?: Record<string, number>;
269
- };
270
- };
271
- /**
272
- * STEP/XDE evidence extracted while loading a STEP subject.
273
- *
274
- * @public
275
- */
276
- type StepEvidence = {
277
- schema?: string;
278
- unit?: GeoSpecUnit;
279
- productStructure?: Array<{
280
- name: string;
281
- path: string;
282
- transform?: number[];
283
- }>;
284
- readStrategy: {
285
- strategy: 'native-stream' | 'filesystem';
286
- inputKind: GeometrySource['kind'];
287
- bytesRead: number;
288
- nativeReadStream: boolean;
289
- copiedToEmscriptenFs: boolean;
290
- };
291
- capabilities: Array<{
292
- feature: string;
293
- supported: boolean;
294
- reason?: string;
295
- }>;
296
- /** Structured AP242 XDE read result (occurrences, subshape names, datum placements). */
297
- xde?: XdeReadResult;
298
- };
299
- /**
300
- * Canonical P0 object under test for GeoSpec.
301
- *
302
- * This is intentionally a GeoSpec-loaded subject rather than a Tau runtime
303
- * contract. Runtime integrations pass GLB/glTF bytes or files into loaders.
304
- *
305
- * @public
306
- */
307
- type GeometrySubject = {
308
- kind: 'geometry-subject';
309
- /** Opaque engine-owned identifier used by every protocol claim. */
310
- subjectId: string;
311
- mesh: GeometrySubjectMeshEvidence;
312
- brep?: BrepEvidence;
313
- step?: StepEvidence;
314
- provenance: GeometryProvenance;
315
- capabilities: GeometryCapability[];
316
- diagnostics: GeometryEvidenceDiagnostic[];
317
- };
318
- /**
319
- * Axis-aligned bounding box in glTF document units (meters).
320
- * @public
321
- */
322
- type AabbMeters = {
323
- min: [number, number, number];
324
- max: [number, number, number];
325
- };
326
- /**
327
- * One TRIANGLES primitive with identity for spatial-test feedback.
328
- * @public
329
- */
330
- type PrimitiveRecord = {
331
- /** The glTF node / mesh name (from kernel ShapeConfig.name when present). */
332
- name: string;
333
- color?: string;
334
- vertices: number;
335
- aabb: AabbMeters;
336
- };
337
- /**
338
- * One spatial cluster from AABB overlap grouping.
339
- * @public
340
- */
341
- type ClusterReport = {
342
- label: string;
343
- primitives: PrimitiveRecord[];
344
- aabb: AabbMeters;
345
- centroid: [number, number, number];
346
- totalVertices: number;
347
- };
348
- /**
349
- * Smallest clearance between two clusters along the dominant separation axis.
350
- * @public
351
- */
352
- type ClusterGap = {
353
- fromLabel: string;
354
- toLabel: string;
355
- axis: 'x' | 'y' | 'z';
356
- /** Millimetres — clearance between the two named primitives' AABBs. */
357
- gapMm: number;
358
- fromPrimitive: string;
359
- toPrimitive: string;
360
- };
361
- /**
362
- * Structured payload when `connectedComponents` fails.
363
- * @public
364
- */
365
- type ConnectedComponentsFailure = {
366
- expected: number;
367
- got: number;
368
- toleranceMm: number;
369
- clusters: ClusterReport[];
370
- gaps: ClusterGap[];
371
- };
372
- /**
373
- * Dominant primitive on an axis extremum for `boundingBox` failures.
374
- * @public
375
- */
376
- type BoundingBoxAxisExtremum = {
377
- name: string;
378
- aabb: AabbMeters;
379
- value: number;
380
- };
381
- /**
382
- * One axis failure for `boundingBox` checks.
383
- * @public
384
- */
385
- type BoundingBoxAxisFailure = {
386
- axis: 'x' | 'y' | 'z';
387
- field: 'size' | 'center';
388
- expected: number;
389
- actual: number;
390
- tolerance: number;
391
- minExtremum?: BoundingBoxAxisExtremum;
392
- maxExtremum?: BoundingBoxAxisExtremum;
393
- };
394
- /**
395
- * Structured payload when `boundingBox` fails.
396
- * @public
397
- */
398
- type BoundingBoxFailure = {
399
- axisFailures: BoundingBoxAxisFailure[];
400
- };
401
- /**
402
- * Per-primitive watertight diagnostic (local tessellation only).
403
- * @public
404
- */
405
- type WatertightPrimitiveBreakdown = {
406
- name: string;
407
- boundaryEdges: number;
408
- loopCentroid: [number, number, number];
409
- };
410
- /**
411
- * Class of irregular mesh edge found during watertight analysis.
412
- * @public
413
- */
414
- type WatertightIrregularEdgeKind = 'open-boundary' | 'non-manifold';
415
- /**
416
- * Representative irregular edge, in glTF document coordinates.
417
- * @public
418
- */
419
- type WatertightIrregularEdgeSample = {
420
- start: Vec3;
421
- end: Vec3;
422
- center: Vec3;
423
- incidentTriangleCount: number;
424
- primitives: string[];
425
- color?: string;
426
- };
427
- /**
428
- * Spatial cluster of related irregular edges.
429
- * @public
430
- */
431
- type WatertightIrregularEdgeCluster = {
432
- kind: WatertightIrregularEdgeKind;
433
- edgeCount: number;
434
- aabb: {
435
- min: Vec3;
436
- max: Vec3;
437
- center: Vec3;
438
- };
439
- samples: WatertightIrregularEdgeSample[];
440
- };
441
- /**
442
- * Structured payload when `watertight` fails.
443
- * @public
444
- */
445
- type WatertightFailure = {
446
- /** Edges with incidence ≠ 2 (open or non-manifold). */
447
- irregularEdges: number;
448
- /** Edges shared by exactly one triangle (open boundary). */
449
- openBoundaryEdges: number;
450
- /** Edges shared by more than two triangles (over-adjacent/non-manifold). */
451
- nonManifoldEdges: number;
452
- irregularEdgeKindCounts: {
453
- openBoundary: number;
454
- nonManifold: number;
455
- };
456
- irregularEdgeClusters: WatertightIrregularEdgeCluster[];
457
- irregularEdgeFraction: number;
458
- perPrimitive: WatertightPrimitiveBreakdown[];
459
- };
460
- /**
461
- * Full connected-components analysis at one tolerance.
462
- * @public
463
- */
464
- type ConnectedComponentsResult = {
465
- count: number;
466
- clusters: ClusterReport[];
467
- gaps: ClusterGap[];
468
- };
469
- /**
470
- * Full watertight analysis (global + per-primitive breakdown).
471
- * @public
472
- */
473
- type WatertightResult = {
474
- watertight: boolean;
475
- irregularEdges: number;
476
- openBoundaryEdges: number;
477
- nonManifoldEdges: number;
478
- irregularEdgeKindCounts: {
479
- openBoundary: number;
480
- nonManifold: number;
481
- };
482
- irregularEdgeClusters: WatertightIrregularEdgeCluster[];
483
- totalEdges: number;
484
- irregularEdgeFraction: number;
485
- perPrimitive: WatertightPrimitiveBreakdown[];
486
- };
487
- /**
488
- * Triangle quality and scalar mesh metrics used by P0 GeoSpec matchers.
489
- *
490
- * Values are reported in the glTF document coordinate units.
491
- *
492
- * @public
493
- */
494
- type MeshQualityStats = {
495
- triangleCount: number;
496
- nonFiniteVertices: Array<{
497
- primitive: string;
498
- vertexIndex: number;
499
- position: [number, number, number];
500
- }>;
501
- degenerateTriangles: Array<{
502
- primitive: string;
503
- triangleIndex: number;
504
- area: number;
505
- center: [number, number, number];
506
- }>;
507
- duplicateFaces: Array<{
508
- primitive: string;
509
- triangleIndex: number;
510
- firstTriangleIndex: number;
511
- }>;
512
- triangles: MeshTriangle[];
513
- surfaceArea: number;
514
- signedVolume: number;
515
- centerOfMass?: Vec3;
516
- };
517
- /**
518
- * Scene bounding box with per-primitive contributors in the subject's unit and frame.
519
- * @public
520
- */
521
- type BoundingBoxStats = {
522
- size: [number, number, number];
523
- center: [number, number, number];
524
- primitives: PrimitiveRecord[];
525
- };
526
- /**
527
- * Statistics about a parsed GLB geometry.
528
- *
529
- * `vertexCount` and `meshCount` are kept on the type for internal diagnostic
530
- * use (and for the kernel-author Vitest harness in
531
- * `kernel-geometry-testing.utils.ts`); they are no longer exposed via the
532
- * agent-facing requirement schema.
533
- *
534
- * @public
535
- */
536
- type GeometryStats = {
537
- vertexCount: number;
538
- meshCount: number;
539
- triangleCount: number;
540
- meshQuality: MeshQualityStats;
541
- watertight: boolean;
542
- boundingBox?: BoundingBoxStats;
543
- };
544
- /**
545
- * Result of evaluating a single test requirement against geometry stats.
546
- * @public
547
- */
548
- type CheckResult = {
549
- passed: true;
550
- } | {
551
- passed: false;
552
- check: 'boundingBox';
553
- reason: string;
554
- suggestion: string;
555
- failure: BoundingBoxFailure;
556
- } | {
557
- passed: false;
558
- check: 'connectedComponents';
559
- reason: string;
560
- suggestion: string;
561
- failure: ConnectedComponentsFailure;
562
- } | {
563
- passed: false;
564
- check: 'watertight';
565
- reason: string;
566
- suggestion: string;
567
- failure: WatertightFailure;
568
- } | {
569
- passed: false;
570
- check: 'invalid';
571
- reason: string;
572
- suggestion: string;
573
- };
574
- //#endregion
575
- export { AabbMeters, BoundingBoxAxisExtremum, BoundingBoxAxisFailure, BoundingBoxFailure, BoundingBoxStats, BrepEvidence, CheckResult, ClusterGap, ClusterReport, ConnectedComponentsFailure, ConnectedComponentsResult, GeometryCapability, GeometryDiagnostic, GeometryEvidenceDiagnostic, GeometryExportIntent, GeometryFileFormat, GeometryProvenance, GeometrySource, GeometryStats, GeometrySubject, GeometrySubjectMeshEvidence, MeshEvidence, MeshFileFormat, MeshQualityStats, MeshTriangle, PrimitiveRecord, StepEvidence, Vec3, WatertightFailure, WatertightIrregularEdgeCluster, WatertightIrregularEdgeKind, WatertightIrregularEdgeSample, WatertightPrimitiveBreakdown, WatertightResult };
78
+ //#endregion
@@ -6,7 +6,7 @@ import { z } from "zod";
6
6
  *
7
7
  * @public
8
8
  */
9
- declare class GeoSpecModelLoadError extends Error {
9
+ export declare class GeoSpecModelLoadError extends Error {
10
10
  /** Structured diagnostics explaining why model loading failed. */
11
11
  readonly diagnostics: readonly GeometryDiagnostic[];
12
12
  /**
@@ -16,5 +16,4 @@ declare class GeoSpecModelLoadError extends Error {
16
16
  */
17
17
  constructor(diagnostics: readonly GeometryDiagnostic[]);
18
18
  }
19
- //#endregion
20
- export { GeoSpecModelLoadError };
19
+ //#endregion
@@ -12,7 +12,7 @@ import { CreateModelLoaderOptions, LoadModelOptions, ManagedGeoSpecModelLoader }
12
12
  * @throws {@link GeoSpecModelLoadError} with `GEOSPEC_MODEL_LOADER_UNAVAILABLE` when no runner is active.
13
13
  * @public
14
14
  */
15
- declare function loadModel<Code extends Record<string, string> = Record<string, string>>(_options: LoadModelOptions<Code>): Promise<GeoSpecSubject>;
15
+ export declare function loadModel<Code extends Record<string, string> = Record<string, string>>(_options: LoadModelOptions<Code>): Promise<GeoSpecSubject>;
16
16
  /**
17
17
  * Create a {@link loadModel} function over a host-supplied compiled engine.
18
18
  *
@@ -20,6 +20,5 @@ declare function loadModel<Code extends Record<string, string> = Record<string,
20
20
  * @returns A configured model loader whose subjects are released by `dispose()`.
21
21
  * @public
22
22
  */
23
- declare const createModelLoader: (defaults: CreateModelLoaderOptions) => ManagedGeoSpecModelLoader;
24
- //#endregion
25
- export { createModelLoader, loadModel };
23
+ export declare const createModelLoader: (defaults: CreateModelLoaderOptions) => ManagedGeoSpecModelLoader;
24
+ //#endregion
@@ -7,6 +7,5 @@
7
7
  *
8
8
  * @public
9
9
  */
10
- declare const geoSpecMeshEvidenceMatchers: readonly ["toHaveBoundingBox", "toHaveVolume", "toHaveSurfaceArea", "toHaveConnectedComponents", "toBeWatertight"];
11
- //#endregion
12
- export { geoSpecMeshEvidenceMatchers };
10
+ export declare const geoSpecMeshEvidenceMatchers: readonly ["toHaveBoundingBox", "toHaveVolume", "toHaveSurfaceArea", "toHaveConnectedComponents", "toBeWatertight"];
11
+ //#endregion
@@ -1,34 +1,33 @@
1
+ import { SourceRevision } from "../support/types.mjs";
1
2
  import { GeoSpecLoadRegion, GeoSpecModelExporter, GeoSpecModelFormat, LoadModelOptions, LoadModelSourceOptions } from "./types.mjs";
2
3
  import { GeoSpecNativeEngine, GeoSpecNativeSubject } from "../engine/client.mjs";
3
- import "../assertion-client/index.mjs";
4
- import { SourceRevision } from "@taucad/runtime/types";
5
4
  //#region src/model/native-model-loader.d.ts
6
5
  /** Native engine operations required for model admission and run-level cleanup. @public */
7
- type GeoSpecNativeModelEngine = GeoSpecNativeEngine & {
6
+ export type GeoSpecNativeModelEngine = GeoSpecNativeEngine & {
8
7
  ingestSubject(request: Uint8Array<ArrayBuffer>, primary: Uint8Array<ArrayBuffer>, resources: ReadonlyArray<Uint8Array<ArrayBuffer>>): Uint8Array<ArrayBuffer>;
9
8
  subjectHandle(request: Uint8Array<ArrayBuffer>): Uint8Array<ArrayBuffer>;
10
9
  releaseSubject(request: Uint8Array<ArrayBuffer>): Uint8Array<ArrayBuffer>;
11
10
  };
12
11
  /** One named external resource referenced by a direct glTF-family source. @public */
13
- type GeoSpecNativeModelResource = {
12
+ export type GeoSpecNativeModelResource = {
14
13
  readonly name: string;
15
14
  readonly source: LoadModelSourceOptions['source'];
16
15
  };
17
16
  /** Native additions accepted by the injected `geospec/runner/native` loader. @public */
18
- type GeoSpecNativeLoadModelOptions<Code extends Record<string, string> = Record<string, string>> = LoadModelOptions<Code> & {
17
+ export type GeoSpecNativeLoadModelOptions<Code extends Record<string, string> = Record<string, string>> = LoadModelOptions<Code> & {
19
18
  /** Ordered external resource payloads declared to the native admission request. */
20
19
  readonly resources?: readonly GeoSpecNativeModelResource[];
21
20
  /** Format-specific native ingest options. */
22
21
  readonly ingestOptions?: Readonly<Record<string, unknown>>;
23
22
  };
24
23
  /** Subject identity returned by native STEP/GLB admission. @public */
25
- type GeoSpecNativeModelSubject = GeoSpecNativeSubject & {
24
+ export type GeoSpecNativeModelSubject = GeoSpecNativeSubject & {
26
25
  readonly subjectHash: string;
27
26
  /** Exact successful-load evidence retained by the admitting host, when available. */
28
27
  readonly load?: GeoSpecModelLoadEvidence;
29
28
  };
30
29
  /** Immutable identity of the inputs and artifacts consumed by one model load. @public */
31
- type GeoSpecModelLoadEvidence = {
30
+ export type GeoSpecModelLoadEvidence = {
32
31
  readonly loadId: string;
33
32
  readonly status: 'complete' | 'unavailable';
34
33
  readonly format: string;
@@ -71,9 +70,9 @@ type GeoSpecModelLoadEvidence = {
71
70
  *
72
71
  * @public
73
72
  */
74
- type GeoSpecNativeSourceReader = (source: LoadModelSourceOptions['source']) => Promise<Uint8Array<ArrayBuffer>>;
73
+ export type GeoSpecNativeSourceReader = (source: LoadModelSourceOptions['source']) => Promise<Uint8Array<ArrayBuffer>>;
75
74
  /** Defaults and host dependencies for a managed native model loader. @public */
76
- type CreateGeoSpecNativeModelLoaderOptions = {
75
+ export type CreateGeoSpecNativeModelLoaderOptions = {
77
76
  readonly engine: GeoSpecNativeModelEngine;
78
77
  readonly format?: Extract<GeoSpecModelFormat, 'glb' | 'step' | 'stp'>;
79
78
  readonly projectPath?: string;
@@ -101,22 +100,21 @@ type CreateGeoSpecNativeModelLoaderOptions = {
101
100
  * digests those exact bytes; bytes equal to an admitted subject's reuse that
102
101
  * subject by digest, length and descriptor, and edited bytes admit a new
103
102
  * subject. Exported loads are coalesced per release scope (one run): a load
104
- * whose file, inline code, project path, parameters, format, tolerances,
105
- * region and ingest options equal an earlier successful load's reuses that
106
- * admission without exporting or ingesting again. A file load is reused only
103
+ * whose options all equal an earlier successful load's (file, code, project
104
+ * path, parameters, format, tolerances, region, ingest) reuses that admission. A file load is reused only
107
105
  * while the exporter's `revision` still matches the earlier load's complete
108
106
  * source revision; otherwise, or when every owner of the earlier admission has
109
107
  * released it, the load exports afresh. Failures are never reused.
110
108
  *
111
109
  * @public
112
110
  */
113
- type GeoSpecNativeModelLoader = <Code extends Record<string, string> = Record<string, string>>(options: GeoSpecNativeLoadModelOptions<Code>) => Promise<GeoSpecNativeModelSubject>;
111
+ export type GeoSpecNativeModelLoader = <Code extends Record<string, string> = Record<string, string>>(options: GeoSpecNativeLoadModelOptions<Code>) => Promise<GeoSpecNativeModelSubject>;
114
112
  /**
115
113
  * Reusable native model loader whose admitted subjects can be released as one run.
116
114
  * The caller owns the engine and the boundaries between load scopes.
117
115
  * @public
118
116
  */
119
- type ManagedGeoSpecNativeModelLoader = GeoSpecNativeModelLoader & {
117
+ export type ManagedGeoSpecNativeModelLoader = GeoSpecNativeModelLoader & {
120
118
  /**
121
119
  * Drain registered admissions, including additions while drainage awaits,
122
120
  * then release this scope's subjects (with a carrier: the previous scope's
@@ -139,6 +137,5 @@ type ManagedGeoSpecNativeModelLoader = GeoSpecNativeModelLoader & {
139
137
  * @returns A loader plus run-level cleanup operation.
140
138
  * @public
141
139
  */
142
- declare const createGeoSpecNativeModelLoader: (defaults: CreateGeoSpecNativeModelLoaderOptions) => ManagedGeoSpecNativeModelLoader;
143
- //#endregion
144
- export { CreateGeoSpecNativeModelLoaderOptions, GeoSpecModelLoadEvidence, GeoSpecNativeLoadModelOptions, GeoSpecNativeModelEngine, GeoSpecNativeModelLoader, GeoSpecNativeModelResource, GeoSpecNativeModelSubject, GeoSpecNativeSourceReader, ManagedGeoSpecNativeModelLoader, createGeoSpecNativeModelLoader };
140
+ export declare const createGeoSpecNativeModelLoader: (defaults: CreateGeoSpecNativeModelLoaderOptions) => ManagedGeoSpecNativeModelLoader;
141
+ //#endregion