geospec 0.1.0-beta.6 → 0.1.0-beta.8

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 (58) hide show
  1. package/agent/doctrine.md +17 -2
  2. package/agent/geospec-authoring/SKILL.md +47 -47
  3. package/agent/geospec-authoring/api-functions.md +1 -16
  4. package/agent/geospec-authoring/api-index.md +119 -111
  5. package/agent/geospec-authoring/api-types.md +218 -170
  6. package/agent/geospec-authoring/public-api-functions.md +29 -22
  7. package/agent/geospec-authoring/public-api-index.md +294 -276
  8. package/agent/geospec-authoring/public-api-types-2.md +222 -287
  9. package/agent/geospec-authoring/public-api-types-3.md +176 -99
  10. package/agent/geospec-authoring/public-api-types.md +236 -125
  11. package/agent/resources.js +12 -12
  12. package/agent/skills.json +2 -2
  13. package/dist/assertion-client/client.d.mts +1 -1
  14. package/dist/assertion-client/client.mjs +1 -1
  15. package/dist/config/index.d.mts +1 -2
  16. package/dist/config/index.mjs +1 -1
  17. package/dist/config/types.d.mts +0 -3
  18. package/dist/config/validate.mjs +1 -1
  19. package/dist/engine/client.mjs +1 -1
  20. package/dist/mesh/index.d.mts +2 -2
  21. package/dist/model/index.d.mts +3 -3
  22. package/dist/model/index.mjs +1 -1
  23. package/dist/model/mesh-evidence-matchers.d.mts +12 -0
  24. package/dist/model/mesh-evidence-matchers.mjs +1 -0
  25. package/dist/model/native-model-loader.d.mts +10 -8
  26. package/dist/model/native-model-loader.mjs +1 -1
  27. package/dist/model/node/command-exporter.d.mts +31 -0
  28. package/dist/model/node/command-exporter.mjs +1 -0
  29. package/dist/model/node/index.d.mts +2 -0
  30. package/dist/model/node/index.mjs +1 -0
  31. package/dist/model/region-scope.mjs +1 -1
  32. package/dist/model/types.d.mts +132 -68
  33. package/dist/runner/collector.d.mts +0 -2
  34. package/dist/runner/collector.mjs +1 -1
  35. package/dist/runner/node/index.d.mts +2 -0
  36. package/dist/runner/node/index.mjs +1 -0
  37. package/dist/runner/node/node-vm-filesystem.d.mts +22 -0
  38. package/dist/runner/node/node-vm-filesystem.mjs +1 -0
  39. package/dist/runner/pool/events.mjs +1 -0
  40. package/dist/runner/pool/pool-messages.d.mts +0 -10
  41. package/dist/runner/pool/pool.d.mts +36 -0
  42. package/dist/runner/pool/pool.mjs +1 -0
  43. package/dist/runner/pool/shard-planner.mjs +1 -0
  44. package/dist/runner/pool/shard-timings.d.mts +36 -0
  45. package/dist/runner/pool/transport.mjs +1 -0
  46. package/dist/runner/pool/worker-host.d.mts +36 -0
  47. package/dist/runner/pool/worker-host.mjs +1 -0
  48. package/dist/runner/run-geospec-module.mjs +1 -1
  49. package/dist/runner/types.d.mts +0 -4
  50. package/dist/runner/worker/index.d.mts +7 -2
  51. package/dist/runner/worker/index.mjs +1 -1
  52. package/dist/runner/worker/runner-types.d.mts +2 -14
  53. package/dist/runner/worker/serial-runner.mjs +1 -1
  54. package/package.json +14 -4
  55. package/dist/config/tau-project-artifact.d.mts +0 -54
  56. package/dist/config/tau-project-artifact.mjs +0 -3
  57. package/dist/model/export-intent.d.mts +0 -79
  58. package/dist/model/export-intent.mjs +0 -1
package/agent/doctrine.md CHANGED
@@ -6,6 +6,7 @@ Write tests before implementation; assert deterministic, measurable properties.
6
6
  - Await `loadModel`, then assert synchronously with `expectGeo(model)`. The host supplies the compiled binding; authoring does not select an engine.
7
7
  - Await or return the complete model-load chain from the test callback; detached future loads are not part of a completed test.
8
8
  - Omit `parameters` for model-code defaults; use `{ file, parameters }` for variants. Loaded subjects are opaque.
9
+ - `loadModel({ file })` resolves `file` against the project root, the same root as every tool's `targetFile`; the result names that root as `projectRoot` where the host reports it, as `tau mcp` does. A suite in a subfolder names the model by its path from that root, or passes `rootDir`, the project-relative folder the model is in: `loadModel({ file: 'main.ts', rootDir: 'parts/gear' })` loads `parts/gear/main.ts`. A file the root does not hold refuses with `GEOSPEC_MODEL_SOURCE_NOT_FOUND`, which names the root and the path it looked for.
9
10
 
10
11
  Canonical TypeScript authoring:
11
12
 
@@ -32,11 +33,25 @@ Every matcher takes one expectation object:
32
33
  ## Loads and budgets
33
34
 
34
35
  - GeoSpec has no `beforeAll`. Write each `loadModel` inside its own `it`: within one run, identical loads (same file or code, parameters, format, tolerances and region) share one export and one admission. Each load keeps its own `loadId` and records `reused: true`, and a file is reused only while its source closure is unchanged.
35
- - `loadModel({ file, workUnitLimit })` sets the default claim budget for that subject, and `expectGeo(model, { workUnitLimit })` overrides it for one chain. The budget is a positive integer no greater than 512000000. A `MATCHER_TIMEOUT` refusal reports `details.limit` and, when measured, `details.used`; raise the budget within the bound or simplify the model, and never treat the refusal as a pass.
36
+ - `loadModel({ file, workUnitLimit })` sets the default claim budget for that subject, and `expectGeo(model, { workUnitLimit })` overrides it for one chain. The budget is a positive integer no greater than 512000000. A `MATCHER_TIMEOUT` refusal reports `details.limit` and, when measured, `details.used`; its `test_model` row (category `work-budget`) names in `limit.retry` the one `workUnitLimit` that can decide the claim, or `null` at the host maximum. Never treat the refusal as a pass.
36
37
  - `loadModel({ file, region: { min: [x, y, z], max: [x, y, z] } })` makes a separate claim about one millimetre box, never a stand-in for a whole-model claim. The kernel crops before export (PicoVoxel trims Voxels parts), and other kernels, STEP loads and unconfirmed crops refuse with a typed diagnostic. A cropped subject answers only bounding box, volume, surface area, mass and center of mass of its region, and its assertions record the region. Every other matcher on it refuses with `GEOSPEC_REGION_WHOLE_MODEL_CLAIM`. Name the region in the test, and keep whole-model claims on whole-model loads.
37
- - A host or engine limit leaves a claim undecided, never false. Keep the model as designed: never coarsen, shrink or crop it to fit. Raise `workUnitLimit` or `testTimeout` within the host's maximum, which the host can raise, or report the claim as not decided at this capacity.
38
+ - A host or engine limit leaves a claim undecided, never false: `test_model` reports it as inconclusive with category `analysis-limit`, `resource-limit` or `work-budget` and a typed `limit` naming the limit and its numbers. Keep the model as designed: never coarsen, shrink or crop it to fit. Only a `work-budget` row's `limit.retry` is a retry, and `testTimeout` only answers a `timeout` row; report every other limit row as not decided at this capacity.
38
39
  - `toHaveCenterOfMass({ point, tolerance })` takes an exact point. Per-axis ranges such as `{ y: { greaterThan: 1 } }` are refused.
39
40
 
41
+ ## Ceilings
42
+
43
+ Fixed in this release; design within them, and report a claim that meets one as not decided.
44
+
45
+ | Ceiling | Value | Where an agent meets it |
46
+ | ------------------------------------- | -------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
47
+ | `maxSubjectBytes`, `maxResourceBytes` | 64 MiB each | A mesh `loadModel({ file })` exports about 72 bytes per triangle, so admission refuses near 930,000 triangles (`resource-limit`). |
48
+ | `maxTotalBinaryBytes` | 128 MiB | All subjects of one load together. |
49
+ | `maxTriangles`, `maxVertices` | 4,000,000, 2,000,000 | A decoded mesh. |
50
+ | `continuousEvidenceBytes` | 32 MiB | `toHaveNoComponentInterference` on a large assembly (`analysis-limit`). |
51
+ | `workUnitLimit` | 512000000 at most | Any claim; the only limit an argument raises. |
52
+
53
+ Load `format: 'step'` only for the exact-BRep matchers above; every other matcher answers on the cheaper mesh.
54
+
40
55
  ## Coverage
41
56
 
42
57
  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.
@@ -13,6 +13,7 @@ Write tests before implementation; assert deterministic, measurable properties.
13
13
  - Await `loadModel`, then assert synchronously with `expectGeo(model)`. The host supplies the compiled binding; authoring does not select an engine.
14
14
  - Await or return the complete model-load chain from the test callback; detached future loads are not part of a completed test.
15
15
  - Omit `parameters` for model-code defaults; use `{ file, parameters }` for variants. Loaded subjects are opaque.
16
+ - `loadModel({ file })` resolves `file` against the project root, the same root as every tool's `targetFile`; the result names that root as `projectRoot` where the host reports it, as `tau mcp` does. A suite in a subfolder names the model by its path from that root, or passes `rootDir`, the project-relative folder the model is in: `loadModel({ file: 'main.ts', rootDir: 'parts/gear' })` loads `parts/gear/main.ts`. A file the root does not hold refuses with `GEOSPEC_MODEL_SOURCE_NOT_FOUND`, which names the root and the path it looked for.
16
17
 
17
18
  Canonical TypeScript authoring:
18
19
 
@@ -39,11 +40,25 @@ Every matcher takes one expectation object:
39
40
  ## Loads and budgets
40
41
 
41
42
  - GeoSpec has no `beforeAll`. Write each `loadModel` inside its own `it`: within one run, identical loads (same file or code, parameters, format, tolerances and region) share one export and one admission. Each load keeps its own `loadId` and records `reused: true`, and a file is reused only while its source closure is unchanged.
42
- - `loadModel({ file, workUnitLimit })` sets the default claim budget for that subject, and `expectGeo(model, { workUnitLimit })` overrides it for one chain. The budget is a positive integer no greater than 512000000. A `MATCHER_TIMEOUT` refusal reports `details.limit` and, when measured, `details.used`; raise the budget within the bound or simplify the model, and never treat the refusal as a pass.
43
+ - `loadModel({ file, workUnitLimit })` sets the default claim budget for that subject, and `expectGeo(model, { workUnitLimit })` overrides it for one chain. The budget is a positive integer no greater than 512000000. A `MATCHER_TIMEOUT` refusal reports `details.limit` and, when measured, `details.used`; its `test_model` row (category `work-budget`) names in `limit.retry` the one `workUnitLimit` that can decide the claim, or `null` at the host maximum. Never treat the refusal as a pass.
43
44
  - `loadModel({ file, region: { min: [x, y, z], max: [x, y, z] } })` makes a separate claim about one millimetre box, never a stand-in for a whole-model claim. The kernel crops before export (PicoVoxel trims Voxels parts), and other kernels, STEP loads and unconfirmed crops refuse with a typed diagnostic. A cropped subject answers only bounding box, volume, surface area, mass and center of mass of its region, and its assertions record the region. Every other matcher on it refuses with `GEOSPEC_REGION_WHOLE_MODEL_CLAIM`. Name the region in the test, and keep whole-model claims on whole-model loads.
44
- - A host or engine limit leaves a claim undecided, never false. Keep the model as designed: never coarsen, shrink or crop it to fit. Raise `workUnitLimit` or `testTimeout` within the host's maximum, which the host can raise, or report the claim as not decided at this capacity.
45
+ - A host or engine limit leaves a claim undecided, never false: `test_model` reports it as inconclusive with category `analysis-limit`, `resource-limit` or `work-budget` and a typed `limit` naming the limit and its numbers. Keep the model as designed: never coarsen, shrink or crop it to fit. Only a `work-budget` row's `limit.retry` is a retry, and `testTimeout` only answers a `timeout` row; report every other limit row as not decided at this capacity.
45
46
  - `toHaveCenterOfMass({ point, tolerance })` takes an exact point. Per-axis ranges such as `{ y: { greaterThan: 1 } }` are refused.
46
47
 
48
+ ## Ceilings
49
+
50
+ Fixed in this release; design within them, and report a claim that meets one as not decided.
51
+
52
+ | Ceiling | Value | Where an agent meets it |
53
+ | ------------------------------------- | -------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
54
+ | `maxSubjectBytes`, `maxResourceBytes` | 64 MiB each | A mesh `loadModel({ file })` exports about 72 bytes per triangle, so admission refuses near 930,000 triangles (`resource-limit`). |
55
+ | `maxTotalBinaryBytes` | 128 MiB | All subjects of one load together. |
56
+ | `maxTriangles`, `maxVertices` | 4,000,000, 2,000,000 | A decoded mesh. |
57
+ | `continuousEvidenceBytes` | 32 MiB | `toHaveNoComponentInterference` on a large assembly (`analysis-limit`). |
58
+ | `workUnitLimit` | 512000000 at most | Any claim; the only limit an argument raises. |
59
+
60
+ Load `format: 'step'` only for the exact-BRep matchers above; every other matcher answers on the cheaper mesh.
61
+
47
62
  ## Coverage
48
63
 
49
64
  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.
@@ -87,9 +102,11 @@ export declare function loadModel<Code extends Record<string, string> = Record<s
87
102
 
88
103
  // Options accepted by {@link import ('./load-model.js').loadModel}
89
104
  LoadModelOptions: LoadModelSourceOptions | LoadModelCodeOptions<Code> | LoadModelFileOptions
105
+ // Project-relative folder `file` resolves in, for a suite that loads from somewhere other than…
106
+ rootDir?: string
90
107
  // Geometry format to export
91
108
  format?: GeoSpecModelFormat
92
- // Explicit parameters passed to the runtime
109
+ // Explicit parameters passed to the exporter
93
110
  parameters?: Record<string, unknown>
94
111
  // STEP reader strategy used for STEP exports
95
112
  stepStreaming?: StepStreamingMode
@@ -104,6 +121,18 @@ LoadModelOptions: LoadModelSourceOptions | LoadModelCodeOptions<Code> | LoadMode
104
121
 
105
122
  // Geometry formats accepted by {@link import ('./load-model.js').loadModel}
106
123
  GeoSpecModelFormat: MeshFileFormat | 'step' | 'stp'
124
+
125
+ // GeoSpec test helper used inside VM-executed test modules
126
+ export declare function it(name: string, function_: GeoSpecTestCallback): void;
127
+ skip(name: string, function_?: GeoSpecTestCallback): void;
128
+
129
+ // GeoSpec suite helper used inside VM-executed test modules
130
+ export declare function describe(name: string, function_: GeoSpecTestCallback): void;
131
+ skip(name: string, function_?: GeoSpecTestCallback): void;
132
+
133
+ // Alias for {@link it}
134
+ export declare function test(name: string, function_: GeoSpecTestCallback): void;
135
+ skip(name: string, function_?: GeoSpecTestCallback): void;
107
136
  ```
108
137
 
109
138
  ### Types
@@ -420,15 +449,6 @@ GeoSpecSpatialRelationshipExpectation: {
420
449
  reason?: string
421
450
  }
422
451
 
423
- // Shared scalar expectation used by geometry measurements
424
- GeoSpecNumericExpectation: number | {
425
- value?: number;
426
- greaterThan?: number;
427
- greaterThanOrEqual?: number;
428
- lessThan?: number;
429
- lessThanOrEqual?: number;
430
- }
431
-
432
452
  // Diagnostic emitted by GeoSpec loaders, analyzers, and matchers
433
453
  GeometryDiagnostic: {
434
454
  code: KernelIssueCode | (string & {})
@@ -443,49 +463,29 @@ GeometryDiagnostic: {
443
463
  details?: unknown
444
464
  }
445
465
 
446
- // Shared scalar expectation used by geometry measurements
447
- GeoSpecNumericExpectation: number | {
448
- value?: number;
449
- greaterThan?: number;
450
- greaterThanOrEqual?: number;
451
- lessThan?: number;
452
- lessThanOrEqual?: number;
453
- }
454
-
455
- // Shared scalar expectation used by geometry measurements
456
- GeoSpecNumericExpectation: number | {
457
- value?: number;
458
- greaterThan?: number;
459
- greaterThanOrEqual?: number;
460
- lessThan?: number;
461
- lessThanOrEqual?: number;
462
- }
463
-
464
- // Shared scalar expectation used by geometry measurements
465
- GeoSpecNumericExpectation: number | {
466
- value?: number;
467
- greaterThan?: number;
468
- greaterThanOrEqual?: number;
469
- lessThan?: number;
470
- lessThanOrEqual?: number;
471
- }
472
-
473
466
  // Point expectation accepted by center and feature matchers
474
467
  GeoSpecPointExpectation: Vec3 | GeoSpecAxisExpectation
475
468
 
476
- // Shared scalar expectation used by geometry measurements
477
- GeoSpecNumericExpectation: number | {
478
- value?: number;
479
- greaterThan?: number;
480
- greaterThanOrEqual?: number;
481
- lessThan?: number;
482
- lessThanOrEqual?: number;
469
+ // One void-continuity waypoint
470
+ GeoSpecVoidWaypoint: Vec3 | {
471
+ occurrence: string;
472
+ }
473
+
474
+ // Direct geometry-source model load options
475
+ LoadModelSourceOptions: {
476
+ // Source geometry format
477
+ format?: GeoSpecModelFormat
478
+ // Explicit parameters recorded in provenance
479
+ parameters?: Record<string, unknown>
480
+ // Whether STEP loading should also produce mesh evidence
481
+ mesh?: boolean
482
+ // … 10 more members in the API reference: source, resources, rootDir, path, name, sourceUnit, stepStreaming, meshLinearTolerance, meshAngularToleranceDegrees, workUnitLimit
483
483
  }
484
484
  ```
485
485
 
486
486
  ## API reference
487
487
 
488
- 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 360 symbols by file.
488
+ To read any other signature, find its name in `api-index.md`, which lists all 368 symbols by file with the lines that hold each, and read that range of the named file.
489
489
 
490
490
  - `api-functions.md` — Functions
491
491
  - `api-constants.md` — Constants
@@ -1,6 +1,6 @@
1
1
  # geospec — Functions
2
2
 
3
- 7 top-level symbols. Signatures are verbatim typescript.
3
+ 6 top-level symbols. Signatures are verbatim typescript.
4
4
 
5
5
  // GeoSpec suite helper used inside VM-executed test modules
6
6
  // describe (function)
@@ -40,18 +40,3 @@ export declare function createModelLoader(defaults: CreateModelLoaderOptions): M
40
40
  // loadModel (function)
41
41
  export declare function loadModel<Code extends Record<string, string> = Record<string, string>>(_options: LoadModelOptions<Code>): Promise<GeoSpecSubject>;
42
42
  // _options: Source, code, or file model load options
43
-
44
- // resolveRuntimeExportIntent (function)
45
- export declare function resolveRuntimeExportIntent(options: {
46
- runtime: GeoSpecRuntimeClient;
47
- format: RuntimeBackedModelFormat;
48
- meshLinearTolerance?: number;
49
- meshAngularToleranceDegrees?: number;
50
- /**
51
- * The kernel that evaluates this source, when the host knows it. Routes are
52
- * then chosen among that kernel's own, so a mesh-only kernel is told its
53
- * BRep matchers are unsupported instead of being sent to another kernel's
54
- * STEP route.
55
- */
56
- kernelId?: string;
57
- }): RuntimeExportIntent | RuntimeExportIntentFailure;