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.
Files changed (95) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +244 -0
  3. package/agent/doctrine.md +47 -0
  4. package/agent/geospec-authoring/SKILL.md +496 -0
  5. package/agent/geospec-authoring/api-classes.md +13 -0
  6. package/agent/geospec-authoring/api-constants.md +6 -0
  7. package/agent/geospec-authoring/api-functions.md +49 -0
  8. package/agent/geospec-authoring/api-index.md +362 -0
  9. package/agent/geospec-authoring/api-types.md +1700 -0
  10. package/agent/geospec-authoring/public-api-classes.md +22 -0
  11. package/agent/geospec-authoring/public-api-constants.md +19 -0
  12. package/agent/geospec-authoring/public-api-functions.md +196 -0
  13. package/agent/geospec-authoring/public-api-index.md +856 -0
  14. package/agent/geospec-authoring/public-api-types-2.md +1513 -0
  15. package/agent/geospec-authoring/public-api-types.md +2048 -0
  16. package/agent/resources.d.ts +19 -0
  17. package/agent/resources.js +26 -0
  18. package/agent/skills.d.cts +13 -0
  19. package/agent/skills.json +27 -0
  20. package/dist/assertion-client/client.d.mts +124 -0
  21. package/dist/assertion-client/client.mjs +2 -0
  22. package/dist/assertion-client/index.d.mts +5 -0
  23. package/dist/assertion-client/index.mjs +1 -0
  24. package/dist/config/index.d.mts +3 -0
  25. package/dist/config/index.mjs +1 -0
  26. package/dist/config/node/index.d.mts +3 -0
  27. package/dist/config/node/index.mjs +1 -0
  28. package/dist/config/node/load.d.mts +19 -0
  29. package/dist/config/node/load.mjs +1 -0
  30. package/dist/config/tau-project-artifact.d.mts +54 -0
  31. package/dist/config/tau-project-artifact.mjs +3 -0
  32. package/dist/config/types.d.mts +57 -0
  33. package/dist/config/validate.mjs +1 -0
  34. package/dist/create-geospec.d.mts +49 -0
  35. package/dist/create-geospec.mjs +1 -0
  36. package/dist/engine/client.d.mts +93 -0
  37. package/dist/engine/client.mjs +1 -0
  38. package/dist/engine/index.d.mts +3 -0
  39. package/dist/engine/index.mjs +1 -0
  40. package/dist/engine/matchers.d.mts +70 -0
  41. package/dist/engine/matchers.mjs +1 -0
  42. package/dist/engine/pmi.types.d.mts +78 -0
  43. package/dist/engine/protocol.d.mts +20 -0
  44. package/dist/engine/protocol.mjs +1 -0
  45. package/dist/geometry-unit.d.mts +12 -0
  46. package/dist/index.d.mts +6 -0
  47. package/dist/index.mjs +1 -0
  48. package/dist/mesh/index.d.mts +4 -0
  49. package/dist/mesh/index.mjs +1 -0
  50. package/dist/mesh/types.d.mts +575 -0
  51. package/dist/model/errors.d.mts +20 -0
  52. package/dist/model/errors.mjs +2 -0
  53. package/dist/model/export-intent.d.mts +63 -0
  54. package/dist/model/export-intent.mjs +1 -0
  55. package/dist/model/index.d.mts +6 -0
  56. package/dist/model/index.mjs +1 -0
  57. package/dist/model/load-model.d.mts +25 -0
  58. package/dist/model/load-model.mjs +1 -0
  59. package/dist/model/native-model-loader.d.mts +119 -0
  60. package/dist/model/native-model-loader.mjs +1 -0
  61. package/dist/model/subject-assertions.mjs +1 -0
  62. package/dist/model/subject.d.mts +11 -0
  63. package/dist/model/subject.mjs +1 -0
  64. package/dist/model/types.d.mts +207 -0
  65. package/dist/runner/collector.d.mts +62 -0
  66. package/dist/runner/collector.mjs +2 -0
  67. package/dist/runner/discovery.d.mts +93 -0
  68. package/dist/runner/discovery.mjs +1 -0
  69. package/dist/runner/filter.d.mts +50 -0
  70. package/dist/runner/filter.mjs +1 -0
  71. package/dist/runner/index.d.mts +6 -0
  72. package/dist/runner/index.mjs +1 -0
  73. package/dist/runner/native/index.d.mts +4 -0
  74. package/dist/runner/native/index.mjs +1 -0
  75. package/dist/runner/native/native-pool-grants.d.mts +21 -0
  76. package/dist/runner/native/native-pool-grants.mjs +1 -0
  77. package/dist/runner/native/native-serial-runner.d.mts +29 -0
  78. package/dist/runner/native/native-serial-runner.mjs +1 -0
  79. package/dist/runner/pool/pool-messages.d.mts +94 -0
  80. package/dist/runner/run-geospec-module.d.mts +13 -0
  81. package/dist/runner/run-geospec-module.mjs +47 -0
  82. package/dist/runner/types.d.mts +743 -0
  83. package/dist/runner/worker/index.d.mts +4 -0
  84. package/dist/runner/worker/index.mjs +1 -0
  85. package/dist/runner/worker/no-matching-tests-issue.d.mts +12 -0
  86. package/dist/runner/worker/no-matching-tests-issue.mjs +1 -0
  87. package/dist/runner/worker/runner-types.d.mts +146 -0
  88. package/dist/runner/worker/serial-runner.mjs +1 -0
  89. package/dist/selector/types.d.mts +271 -0
  90. package/dist/step/types.d.mts +134 -0
  91. package/dist/vitest/adapter.d.mts +56 -0
  92. package/dist/vitest/adapter.mjs +3 -0
  93. package/dist/vitest/index.d.mts +4 -0
  94. package/dist/vitest/index.mjs +1 -0
  95. package/package.json +114 -5
@@ -0,0 +1,496 @@
1
+ ---
2
+ name: geospec-authoring
3
+ description: Guides canonical GeoSpec geometry tests in TypeScript or JavaScript for every Tau kernel. Use for *.geospec.ts and *.geospec.js tests.
4
+ ---
5
+
6
+ # GeoSpec authoring
7
+
8
+ Write tests before implementation; assert deterministic, measurable properties.
9
+
10
+ ## Test shape
11
+
12
+ - Use `*.geospec.ts` or `*.geospec.js`. Import `describe`, `it` and `expectGeo` from `geospec`, and `loadModel` from `geospec/model`.
13
+ - Await `loadModel`, then assert synchronously with `expectGeo(model)`. The host supplies the compiled binding; authoring does not select an engine.
14
+ - Await or return the complete model-load chain from the test callback; detached future loads are not part of a completed test.
15
+ - Omit `parameters` for model-code defaults; use `{ file, parameters }` for variants. Loaded subjects are opaque.
16
+
17
+ Canonical TypeScript authoring:
18
+
19
+ ```ts
20
+ import { describe, expectGeo, it } from 'geospec';
21
+ import { loadModel } from 'geospec/model';
22
+
23
+ describe('main geometry', () => {
24
+ it('has the intended envelope', async () => {
25
+ const model = await loadModel({ file: 'main.ts', parameters: { width: 120 } });
26
+ expectGeo(model).toHaveBoundingBox({ size: { x: 120 }, tolerance: 1 });
27
+ });
28
+ });
29
+ ```
30
+
31
+ Specs are always TypeScript or JavaScript, whatever the model's kernel: `loadModel({ file })` evaluates `main.ts`, `main.tsx`, `main.py`, `main.scad`, `main.kcl` or `main.cs` through Tau's runtime. `test_model` discovers `*.geospec.ts` and `*.geospec.js` only.
32
+
33
+ Every matcher takes one expectation object:
34
+
35
+ - Wrong: `expectGeo(model).toHaveVolume(5000, { tolerance: 5 })`. Correct: `expectGeo(model).toHaveVolume({ value: 5000, tolerance: 5 })`.
36
+ - Wrong: `await expectGeo(model)…`. Correct: await `loadModel`, then assert synchronously.
37
+ - Wrong: exact-feature matchers on a mesh kernel (Manifold, JSCAD, OpenSCAD, PicoGK, PicoVoxel). Correct: `toBeValidBrep`, `toHaveTopologyCounts`, the face, hole, pattern, chamfer, fillet and wall-thickness matchers, `toHaveStepUnits`, `toHaveProductStructure` and `toHaveVoidContinuity` need STEP BRep evidence and report unsupported on meshes; assert meshes with bounds, volume, surface area, connected components and `toBeWatertight`.
38
+
39
+ ## Coverage
40
+
41
+ Bounds and physical properties are insufficient. Cover major components, named features, variants, dimensions/positions, disjoint counts, closure, interference and supported exact features. Explicitly report unsupported requirements; proxies cannot fulfill them.
42
+
43
+ - `toHaveBoundingBox`: size/position.
44
+ - `toHaveConnectedComponents`: qualified material connectivity; visual touching cannot justify tolerance changes.
45
+ - `toBeWatertight`: closed edge incidence, not manifold validity, fusion or material connectivity. Bounds prove none of these. Missing evidence is unsupported.
46
+ - `toHaveSurfaceArea`, `toHaveVolume`, `toHaveCenterOfMass`, `toHaveMass`: physical measurements.
47
+ - `toHaveNoComponentInterference`: overlap; allow deliberate press fits.
48
+ - `loadModel({ file, format: 'step' })`: use BRep evidence for supported topology and feature assertions. Missing occurrence, interference, clearance, containment, lumen, wall, section or motion evidence is unsupported, not a pass or an envelope substitute.
49
+
50
+ Test assemblies and independent units; preserve sibling coverage when adding files. Non-top-level geometry needs kernel export/invocation, not test removal.
51
+
52
+ Fix geometry at its root; never weaken tolerances, delete assertions, or reduce detail to pass.
53
+
54
+ `public-api-index.md` covers the host and framework API; authoring needs only the Core API below and `api-*` files.
55
+
56
+ ## Core API
57
+
58
+ The symbols real Tau models use most, as verbatim declarations. Anything not shown is in the API reference below.
59
+
60
+ ### Functions
61
+
62
+ ```ts
63
+ // Start a geometry assertion chain
64
+ export declare function expectGeo(subject: GeoSpecSubject): GeoSpecMatcher;
65
+
66
+ // A model admitted by one live GeoSpec host scope
67
+ GeoSpecSubject: {
68
+ readonly [subjectBrand]: true
69
+ }
70
+
71
+ // Load a CAD model into GeoSpec evidence
72
+ export declare function loadModel<Code extends Record<string, string> = Record<string, string>>(_options: LoadModelOptions<Code>): Promise<GeoSpecSubject>;
73
+
74
+ // Options accepted by {@link import ('./load-model.js').loadModel}
75
+ LoadModelOptions: LoadModelSourceOptions | LoadModelCodeOptions<Code> | LoadModelFileOptions
76
+ // Geometry format to export
77
+ format?: GeoSpecModelFormat
78
+ // Explicit parameters passed to the runtime
79
+ parameters?: Record<string, unknown>
80
+ // STEP reader strategy used for STEP exports
81
+ stepStreaming?: StepStreamingMode
82
+ // Whether STEP loading should also produce mesh evidence
83
+ mesh?: boolean
84
+ // Linear tolerance used while meshing exact BRep evidence
85
+ meshLinearTolerance?: number
86
+ // Angular tolerance in degrees used while meshing exact BRep evidence
87
+ meshAngularToleranceDegrees?: number
88
+
89
+ // Geometry formats accepted by {@link import ('./load-model.js').loadModel}
90
+ GeoSpecModelFormat: MeshFileFormat | 'step' | 'stp'
91
+ ```
92
+
93
+ ### Types
94
+
95
+ ```ts
96
+ // Assertion chain returned by `expectGeo(subject)`
97
+ GeoSpecMatcher: {
98
+ // Core-owned negation
99
+ readonly not: Omit<GeoSpecMatcher, 'not'>
100
+ // Assert the fixed rational plate contract
101
+ toSatisfyRationalPlate(): GeoSpecAssertion;
102
+ // Assert the fixed parallel-plane distance contract
103
+ toSatisfyParallelPlaneDistance(): GeoSpecAssertion;
104
+ // Assert axis-aligned bounds, size, or center for a loaded geometry subject
105
+ toHaveBoundingBox(first: Vec3 | GeoSpecBoundingBoxExpectation, second?: Vec3): GeoSpecAssertion;
106
+ // Assert how many spatially disjoint chunks the mesh contains
107
+ toHaveConnectedComponents(expected: GeoSpecConnectedComponentsExpectation): GeoSpecAssertion;
108
+ // Assert closed mesh edge incidence
109
+ toBeWatertight(): GeoSpecAssertion;
110
+ // Assert that separate assembly components do not occupy the same solid volume
111
+ toHaveNoComponentInterference(expected?: GeoSpecComponentInterferenceExpectation): GeoSpecAssertion;
112
+ // Assert that named assembly occurrences exist with expected counts and bounds
113
+ toHaveAssemblyOccurrences(expected: GeoSpecAssemblyOccurrencesExpectation): GeoSpecAssertion;
114
+ // Assert that selected entities satisfy declared spatial relationships
115
+ toHaveSpatialRelationships(expected: GeoSpecSpatialRelationshipsExpectation): GeoSpecAssertion;
116
+ // Assert rendered mesh evidence is internally trustworthy for downstream checks
117
+ toHaveMeshIntegrity(expected: GeoSpecMeshIntegrityExpectation): GeoSpecAssertion;
118
+ // Assert that the subject carries no diagnostics at the rejected severities
119
+ toHaveNoDiagnostics(expected?: GeoSpecNoDiagnosticsExpectation): GeoSpecAssertion;
120
+ // Assert total surface area, preferring exact BRep mass properties when available
121
+ toHaveSurfaceArea(expected: GeoSpecSurfaceAreaExpectation): GeoSpecAssertion;
122
+ // Assert enclosed volume, preferring exact BRep mass properties when available
123
+ toHaveVolume(expected: GeoSpecVolumeExpectation): GeoSpecAssertion;
124
+ // Assert mass derived from exact mass properties or volume times density
125
+ toHaveMass(expected: GeoSpecMassExpectation): GeoSpecAssertion;
126
+ // Assert the center of mass or mesh-derived centroid for a closed subject
127
+ toHaveCenterOfMass(expected: GeoSpecCenterOfMassExpectation): GeoSpecAssertion;
128
+ // Assert that exact BRep evidence reports a valid shape
129
+ toBeValidBrep(expected?: GeoSpecValidBrepExpectation): GeoSpecAssertion;
130
+ // Assert exact BRep topology counts
131
+ toHaveTopologyCounts(expected: GeoSpecTopologyCountsExpectation): GeoSpecAssertion;
132
+ // Assert the STEP unit evidence
133
+ toHaveStepUnits(expected: GeoSpecStepUnitsExpectation): GeoSpecAssertion;
134
+ // Assert STEP product-structure evidence
135
+ toHaveProductStructure(expected: GeoSpecProductStructureExpectation): GeoSpecAssertion;
136
+ // Assert that BRep evidence contains a planar face matching the requested constraints
137
+ toHavePlanarFace(expected: GeoSpecPlanarFaceExpectation): GeoSpecAssertion;
138
+ // Assert that BRep evidence contains a cylindrical face with the requested radius and axis
139
+ toHaveCylindricalFace(expected: GeoSpecCylindricalFaceExpectation): GeoSpecAssertion;
140
+ // Assert that BRep evidence contains a circular hole matching diameter, center, and axis
141
+ toHaveCircularHole(expected: GeoSpecCircularHoleExpectation): GeoSpecAssertion;
142
+ // Assert that BRep evidence contains a repeated circular-hole pattern
143
+ toHaveCircularHolePattern(expected: GeoSpecCircularHolePatternExpectation): GeoSpecAssertion;
144
+ // Assert that BRep evidence contains a chamfer feature with the requested distance
145
+ toHaveChamferFeature(expected: GeoSpecChamferFeatureExpectation): GeoSpecAssertion;
146
+ // Assert that BRep evidence contains a fillet feature with the requested radius
147
+ toHaveFilletFeature(expected: GeoSpecFilletFeatureExpectation): GeoSpecAssertion;
148
+ // Assert that BRep evidence reports a minimum wall thickness satisfying the expectation
149
+ toHaveMinimumWallThickness(expected: GeoSpecMinimumWallThicknessExpectation): GeoSpecAssertion;
150
+ // Assert that the declared waypoints share one connected void, stay isolated from the declared…
151
+ toHaveVoidContinuity(expected: GeoSpecVoidContinuityExpectation): GeoSpecAssertion;
152
+ }
153
+
154
+ // Numeric 3D vector
155
+ Vec3: readonly [number, number, number]
156
+
157
+ // Bounding-box expectation accepted by `expectGeo(...).toHaveBoundingBox(...)`
158
+ GeoSpecBoundingBoxExpectation: {
159
+ min?: Vec3 | Partial<Record<keyof GeoSpecAxisExpectation, GeoSpecNumericExpectation>>
160
+ max?: Vec3 | Partial<Record<keyof GeoSpecAxisExpectation, GeoSpecNumericExpectation>>
161
+ size?: Vec3 | Partial<Record<keyof GeoSpecAxisExpectation, GeoSpecNumericExpectation>>
162
+ center?: Vec3 | Partial<Record<keyof GeoSpecAxisExpectation, GeoSpecNumericExpectation>>
163
+ tolerance?: number
164
+ }
165
+
166
+ // Connected-components expectation accepted by `expectGeo(...).toHaveConnectedComponents(...)`
167
+ GeoSpecConnectedComponentsExpectation: {
168
+ count: number
169
+ tolerance?: number
170
+ toleranceMm?: number
171
+ }
172
+
173
+ // Component-interference expectation accepted by `expectGeo(...).toHaveNoComponentInterference(...)`
174
+ GeoSpecComponentInterferenceExpectation: {
175
+ tolerance?: number
176
+ pairs?: GeoSpecComponentInterferencePairExpectation[]
177
+ allowances?: GeoSpecComponentInterferenceAllowance[]
178
+ }
179
+
180
+ // Assembly occurrence expectation accepted by `expectGeo(...).toHaveAssemblyOccurrences(...)`
181
+ GeoSpecAssemblyOccurrencesExpectation: {
182
+ occurrences: GeoSpecAssemblyOccurrenceExpectation[]
183
+ uniqueNames?: boolean
184
+ }
185
+
186
+ // Spatial relationship expectation accepted by `expectGeo(...).toHaveSpatialRelationships(...)`
187
+ GeoSpecSpatialRelationshipsExpectation: {
188
+ relationships: GeoSpecSpatialRelationshipExpectation[]
189
+ }
190
+
191
+ // Mesh integrity expectation accepted by `expectGeo(...).toHaveMeshIntegrity(...)`
192
+ GeoSpecMeshIntegrityExpectation: {
193
+ finitePositions?: boolean
194
+ degenerateTriangles?: {
195
+ count?: number;
196
+ maxCount?: number;
197
+ areaTolerance?: number;
198
+ }
199
+ duplicateFaces?: {
200
+ count?: number;
201
+ maxCount?: number;
202
+ }
203
+ watertight?: boolean
204
+ triangleCount?: GeoSpecNumericExpectation
205
+ }
206
+
207
+ // Diagnostic severities rejected by `expectGeo(...).toHaveNoDiagnostics(...)`
208
+ GeoSpecNoDiagnosticsExpectation: {
209
+ severities?: Array<GeometryDiagnostic['severity']>
210
+ }
211
+
212
+ // Surface-area expectation accepted by `expectGeo(...).toHaveSurfaceArea(...)`
213
+ GeoSpecSurfaceAreaExpectation: {
214
+ value: number | GeoSpecNumericExpectation
215
+ tolerance?: number
216
+ }
217
+
218
+ // Volume expectation accepted by `expectGeo(...).toHaveVolume(...)`
219
+ GeoSpecVolumeExpectation: {
220
+ value: number | GeoSpecNumericExpectation
221
+ tolerance?: number
222
+ }
223
+
224
+ // Mass expectation accepted by `expectGeo(...).toHaveMass(...)`
225
+ GeoSpecMassExpectation: {
226
+ value: number | GeoSpecNumericExpectation
227
+ density?: number
228
+ tolerance?: number
229
+ }
230
+
231
+ // Center-of-mass expectation accepted by `expectGeo(...).toHaveCenterOfMass(...)`
232
+ GeoSpecCenterOfMassExpectation: {
233
+ point: GeoSpecPointExpectation
234
+ tolerance?: number
235
+ }
236
+
237
+ // Exact BRep validity expectation accepted by `expectGeo(...).toBeValidBrep(...)`
238
+ GeoSpecValidBrepExpectation: {
239
+ maxTolerance?: number
240
+ freeBounds?: {
241
+ count?: GeoSpecNumericExpectation;
242
+ }
243
+ minEdgeLength?: number
244
+ sameParameter?: boolean
245
+ closedShells?: boolean
246
+ closedWires?: boolean
247
+ }
248
+
249
+ // Topology-count expectation accepted by `expectGeo(...).toHaveTopologyCounts(...)`
250
+ GeoSpecTopologyCountsExpectation: {
251
+ vertices?: GeoSpecNumericExpectation
252
+ edges?: GeoSpecNumericExpectation
253
+ wires?: GeoSpecNumericExpectation
254
+ faces?: GeoSpecNumericExpectation
255
+ shells?: GeoSpecNumericExpectation
256
+ solids?: GeoSpecNumericExpectation
257
+ compounds?: GeoSpecNumericExpectation
258
+ tolerance?: number
259
+ }
260
+
261
+ // STEP unit expectation accepted by `expectGeo(...).toHaveStepUnits(...)`
262
+ GeoSpecStepUnitsExpectation: {
263
+ unit: string
264
+ }
265
+
266
+ // Product-structure expectation accepted by `expectGeo(...).toHaveProductStructure(...)`
267
+ GeoSpecProductStructureExpectation: {
268
+ names?: string[]
269
+ count?: GeoSpecNumericExpectation
270
+ }
271
+
272
+ // Planar-face expectation accepted by `expectGeo(...).toHavePlanarFace(...)`
273
+ GeoSpecPlanarFaceExpectation: {
274
+ normal: GeoSpecPointExpectation
275
+ offset: number
276
+ area?: GeoSpecNumericExpectation
277
+ tolerance?: number
278
+ }
279
+
280
+ // Cylindrical-face expectation accepted by `expectGeo(...).toHaveCylindricalFace(...)`
281
+ GeoSpecCylindricalFaceExpectation: {
282
+ radius: number
283
+ axis: 'x' | 'y' | 'z'
284
+ tolerance?: number
285
+ }
286
+
287
+ // Circular-hole expectation accepted by `expectGeo(...).toHaveCircularHole(...)`
288
+ GeoSpecCircularHoleExpectation: {
289
+ diameter: number
290
+ through?: boolean
291
+ axis?: 'x' | 'y' | 'z'
292
+ center?: GeoSpecPointExpectation
293
+ tolerance?: number
294
+ }
295
+
296
+ // Circular-hole-pattern expectation accepted by `expectGeo(...).toHaveCircularHolePattern(...)`
297
+ GeoSpecCircularHolePatternExpectation: {
298
+ count: number
299
+ holeDiameter: number
300
+ boltCircleDiameter?: number
301
+ axis?: 'x' | 'y' | 'z'
302
+ center?: GeoSpecPointExpectation
303
+ tolerance?: number
304
+ }
305
+
306
+ // Chamfer-feature expectation accepted by `expectGeo(...).toHaveChamferFeature(...)`
307
+ GeoSpecChamferFeatureExpectation: {
308
+ distance: number
309
+ selection?: string
310
+ tolerance?: number
311
+ }
312
+
313
+ // Fillet-feature expectation accepted by `expectGeo(...).toHaveFilletFeature(...)`
314
+ GeoSpecFilletFeatureExpectation: {
315
+ radius: number
316
+ selection?: string
317
+ tolerance?: number
318
+ }
319
+
320
+ // Minimum-wall-thickness expectation accepted by `expectGeo(...).toHaveMinimumWallThickness(...)`
321
+ GeoSpecMinimumWallThicknessExpectation: {
322
+ value: GeoSpecNumericExpectation
323
+ tolerance?: number
324
+ }
325
+
326
+ // Void-continuity expectation accepted by `expectGeo(...).toHaveVoidContinuity(...)`
327
+ GeoSpecVoidContinuityExpectation: {
328
+ // Ordered waypoints (>= 1) known to lie in the void being proven
329
+ path: GeoSpecVoidWaypoint[]
330
+ // Occurrence names whose solids bound the void
331
+ material?: string[]
332
+ // Minimum required bottleneck cross-section (mm²), sampled
333
+ minCrossSection?: number
334
+ // Points that must NOT be reachable from the path void (isolation claim)
335
+ isolatedFrom?: Vec3[]
336
+ // Region bounded for the proof (subject frame)
337
+ bounds?: {
338
+ min: Vec3;
339
+ max: Vec3;
340
+ }
341
+ }
342
+
343
+ // Axis-keyed numeric expectation used by high-level geometry matchers
344
+ GeoSpecAxisExpectation: {
345
+ x?: number
346
+ y?: number
347
+ z?: number
348
+ }
349
+
350
+ // Shared scalar expectation used by geometry measurements
351
+ GeoSpecNumericExpectation: number | {
352
+ value?: number;
353
+ greaterThan?: number;
354
+ greaterThanOrEqual?: number;
355
+ lessThan?: number;
356
+ lessThanOrEqual?: number;
357
+ }
358
+
359
+ // A pair-specific component-interference check accepted by `expectGeo(...).toHaveNoComponentInterference(...)`
360
+ GeoSpecComponentInterferencePairExpectation: {
361
+ left: GeoSpecComponentSelector
362
+ right: GeoSpecComponentSelector
363
+ }
364
+
365
+ // Intentional component interference allowance accepted by `expectGeo(...).toHaveNoComponentInterference(...)`
366
+ GeoSpecComponentInterferenceAllowance: {
367
+ kind?: 'intentionalInterference'
368
+ left: GeoSpecComponentSelector
369
+ right: GeoSpecComponentSelector
370
+ maxVolume?: number
371
+ reason: string
372
+ }
373
+
374
+ // Assembly occurrence rule accepted by `expectGeo(...).toHaveAssemblyOccurrences(...)`
375
+ GeoSpecAssemblyOccurrenceExpectation: {
376
+ name: GeoSpecComponentSelector
377
+ count?: GeoSpecNumericExpectation
378
+ bounds?: {
379
+ within?: GeoSpecComponentSelector;
380
+ min?: Vec3 | GeoSpecAxisExpectation;
381
+ max?: Vec3 | GeoSpecAxisExpectation;
382
+ center?: GeoSpecPointExpectation;
383
+ tolerance?: number;
384
+ }
385
+ }
386
+
387
+ // One spatial relationship accepted by `expectGeo(...).toHaveSpatialRelationships(...)`
388
+ GeoSpecSpatialRelationshipExpectation: {
389
+ id?: string
390
+ kind: 'contact' | 'clearance' | 'coaxial' | 'concentric' | 'coplanar' | 'parallel' | 'perpendicular' | 'angle' | 'containment' | 'insertion' | 'interference'
391
+ subject: GeoSpecGeometrySelector
392
+ target: GeoSpecGeometrySelector
393
+ tolerance?: number
394
+ angularToleranceDegrees?: number
395
+ // Expected angle in degrees for `kind
396
+ angleDegrees?: number
397
+ // Declared insertion axis (subject-frame direction) for `kind
398
+ axis?: Vec3
399
+ min?: number
400
+ max?: number
401
+ minVolume?: number
402
+ maxVolume?: number
403
+ reason?: string
404
+ }
405
+
406
+ // Shared scalar expectation used by geometry measurements
407
+ GeoSpecNumericExpectation: number | {
408
+ value?: number;
409
+ greaterThan?: number;
410
+ greaterThanOrEqual?: number;
411
+ lessThan?: number;
412
+ lessThanOrEqual?: number;
413
+ }
414
+
415
+ // Diagnostic emitted by GeoSpec loaders, analyzers, and matchers
416
+ GeometryDiagnostic: {
417
+ code: KernelIssueCode | (string & {})
418
+ severity: 'error' | 'warning' | 'info'
419
+ message: string
420
+ suggestion?: string
421
+ spatial?: {
422
+ min?: Vec3;
423
+ max?: Vec3;
424
+ center?: Vec3;
425
+ }
426
+ details?: unknown
427
+ }
428
+
429
+ // Shared scalar expectation used by geometry measurements
430
+ GeoSpecNumericExpectation: number | {
431
+ value?: number;
432
+ greaterThan?: number;
433
+ greaterThanOrEqual?: number;
434
+ lessThan?: number;
435
+ lessThanOrEqual?: number;
436
+ }
437
+
438
+ // Shared scalar expectation used by geometry measurements
439
+ GeoSpecNumericExpectation: number | {
440
+ value?: number;
441
+ greaterThan?: number;
442
+ greaterThanOrEqual?: number;
443
+ lessThan?: number;
444
+ lessThanOrEqual?: number;
445
+ }
446
+
447
+ // Shared scalar expectation used by geometry measurements
448
+ GeoSpecNumericExpectation: number | {
449
+ value?: number;
450
+ greaterThan?: number;
451
+ greaterThanOrEqual?: number;
452
+ lessThan?: number;
453
+ lessThanOrEqual?: number;
454
+ }
455
+
456
+ // Point expectation accepted by center and feature matchers
457
+ GeoSpecPointExpectation: Vec3 | GeoSpecAxisExpectation
458
+
459
+ // Shared scalar expectation used by geometry measurements
460
+ GeoSpecNumericExpectation: number | {
461
+ value?: number;
462
+ greaterThan?: number;
463
+ greaterThanOrEqual?: number;
464
+ lessThan?: number;
465
+ lessThanOrEqual?: number;
466
+ }
467
+
468
+ // Shared scalar expectation used by geometry measurements
469
+ GeoSpecNumericExpectation: number | {
470
+ value?: number;
471
+ greaterThan?: number;
472
+ greaterThanOrEqual?: number;
473
+ lessThan?: number;
474
+ lessThanOrEqual?: number;
475
+ }
476
+
477
+ // Shared scalar expectation used by geometry measurements
478
+ GeoSpecNumericExpectation: number | {
479
+ value?: number;
480
+ greaterThan?: number;
481
+ greaterThanOrEqual?: number;
482
+ lessThan?: number;
483
+ lessThanOrEqual?: number;
484
+ }
485
+ ```
486
+
487
+ ## API reference
488
+
489
+ To read any other signature, grep the skill directory for the name followed by `(` (or the bare type name): each hit is the declaration line and names its file; read a few lines around it for overloads and parameter notes. `api-index.md` lists all 345 symbols by file.
490
+
491
+ - `api-functions.md` — Functions
492
+ - `api-constants.md` — Constants
493
+ - `api-types.md` — Types
494
+ - `api-classes.md` — Classes
495
+
496
+ Read ranges, not whole files. Never copy a reference into a source file.
@@ -0,0 +1,13 @@
1
+ # geospec — Classes
2
+
3
+ 1 top-level symbols. Signatures are verbatim typescript.
4
+
5
+ // Error thrown by {@link import ('./load-model.js').loadModel} when geometry cannot be loaded
6
+ GeoSpecModelLoadError: export declare class GeoSpecModelLoadError extends Error
7
+
8
+ // Structured diagnostics explaining why model loading failed
9
+ readonly diagnostics: readonly GeometryDiagnostic[]
10
+
11
+ // GeoSpecModelLoadError.constructor (constructor)
12
+ constructor(diagnostics: readonly GeometryDiagnostic[]);
13
+ // diagnostics: Geometry diagnostics to expose to callers
@@ -0,0 +1,6 @@
1
+ # geospec — Constants
2
+
3
+ 1 top-level symbols. Signatures are verbatim typescript.
4
+
5
+ // Every matcher name exposed by {@link expectGeo}, derived from the live matcher surface so it can never drift from the real implementation
6
+ geoSpecMatcherNames: readonly string[]
@@ -0,0 +1,49 @@
1
+ # geospec — Functions
2
+
3
+ 7 top-level symbols. Signatures are verbatim typescript.
4
+
5
+ // GeoSpec suite helper used inside VM-executed test modules
6
+ // describe (function)
7
+ export declare function describe(name: string, function_: GeoSpecTestCallback): void;
8
+
9
+ // describe.skip (method)
10
+ skip(name: string, function_?: GeoSpecTestCallback): void;
11
+
12
+ // Start a geometry assertion chain
13
+ // expectGeo (function)
14
+ export declare function expectGeo(subject: GeoSpecSubject): GeoSpecMatcher;
15
+ // subject: geometry subject under test
16
+
17
+ // GeoSpec test helper used inside VM-executed test modules
18
+ // it (function)
19
+ export declare function it(name: string, function_: GeoSpecTestCallback): void;
20
+
21
+ // it.skip (method)
22
+ skip(name: string, function_?: GeoSpecTestCallback): void;
23
+
24
+ // Alias for {@link it}
25
+ // test (function)
26
+ export declare function test(name: string, function_: GeoSpecTestCallback): void;
27
+
28
+ // test.skip (method)
29
+ skip(name: string, function_?: GeoSpecTestCallback): void;
30
+
31
+ // Create a {@link loadModel} function over a host-supplied compiled engine
32
+ // createModelLoader (function)
33
+ export declare function createModelLoader(defaults: CreateModelLoaderOptions): ManagedGeoSpecModelLoader;
34
+ // defaults: The compiled engine plus model loading defaults
35
+
36
+ // Load a CAD model into GeoSpec evidence
37
+ // Remarks: This is the authoring declaration: a GeoSpec runner replaces it with the host's native model loader. Called outside a runner it always throws.
38
+ // Throws: {@link GeoSpecModelLoadError} with `GEOSPEC_MODEL_LOADER_UNAVAILABLE` when no runner is active.
39
+ // loadModel (function)
40
+ export declare function loadModel<Code extends Record<string, string> = Record<string, string>>(_options: LoadModelOptions<Code>): Promise<GeoSpecSubject>;
41
+ // _options: Source, code, or file model load options
42
+
43
+ // resolveRuntimeExportIntent (function)
44
+ export declare function resolveRuntimeExportIntent(options: {
45
+ runtime: GeoSpecRuntimeClient;
46
+ format: RuntimeBackedModelFormat;
47
+ meshLinearTolerance?: number;
48
+ meshAngularToleranceDegrees?: number;
49
+ }): RuntimeExportIntent | RuntimeExportIntentFailure;