geospec 0.1.0-beta.7 → 0.1.0-beta.9

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 (80) hide show
  1. package/README.md +41 -8
  2. package/agent/geospec-authoring/SKILL.md +12 -11
  3. package/agent/geospec-authoring/api-functions.md +1 -16
  4. package/agent/geospec-authoring/api-index.md +53 -46
  5. package/agent/geospec-authoring/api-types-2.md +85 -0
  6. package/agent/geospec-authoring/api-types.md +189 -251
  7. package/agent/geospec-authoring/public-api-functions.md +71 -23
  8. package/agent/geospec-authoring/public-api-index.md +243 -191
  9. package/agent/geospec-authoring/public-api-types-2.md +295 -401
  10. package/agent/geospec-authoring/public-api-types-3.md +412 -119
  11. package/agent/geospec-authoring/public-api-types.md +237 -126
  12. package/agent/resources.js +13 -12
  13. package/agent/skills.json +3 -2
  14. package/dist/assertion-client/client.d.mts +3 -1
  15. package/dist/cli/cli.d.mts +48 -0
  16. package/dist/cli/cli.mjs +30 -0
  17. package/dist/cli/index.d.mts +3 -0
  18. package/dist/cli/index.mjs +1 -0
  19. package/dist/cli/main.d.mts +1 -0
  20. package/dist/cli/main.mjs +2 -0
  21. package/dist/cli/node-host.d.mts +26 -0
  22. package/dist/cli/node-host.mjs +1 -0
  23. package/dist/cli/wire-value.mjs +1 -0
  24. package/dist/config/define-config.d.mts +15 -0
  25. package/dist/config/define-config.mjs +2 -0
  26. package/dist/config/index.d.mts +4 -3
  27. package/dist/config/index.mjs +1 -1
  28. package/dist/config/node/load.d.mts +2 -1
  29. package/dist/config/node/load.mjs +1 -1
  30. package/dist/config/read-geospec-config.d.mts +47 -0
  31. package/dist/config/read-geospec-config.mjs +3 -0
  32. package/dist/config/types.d.mts +11 -25
  33. package/dist/config/validate.mjs +1 -1
  34. package/dist/engine/client.d.mts +3 -1
  35. package/dist/mesh/index.d.mts +2 -2
  36. package/dist/model/index.d.mts +3 -3
  37. package/dist/model/index.mjs +1 -1
  38. package/dist/model/mesh-evidence-matchers.d.mts +12 -0
  39. package/dist/model/mesh-evidence-matchers.mjs +1 -0
  40. package/dist/model/native-model-loader.d.mts +8 -8
  41. package/dist/model/native-model-loader.mjs +1 -1
  42. package/dist/model/node/command-exporter.d.mts +33 -0
  43. package/dist/model/node/command-exporter.mjs +1 -0
  44. package/dist/model/node/index.d.mts +2 -0
  45. package/dist/model/node/index.mjs +1 -0
  46. package/dist/model/types.d.mts +111 -63
  47. package/dist/runner/collector.d.mts +0 -2
  48. package/dist/runner/index.d.mts +1 -1
  49. package/dist/runner/native/index.mjs +1 -1
  50. package/dist/runner/native/native-serial-runner.mjs +1 -1
  51. package/dist/runner/node/engine.d.mts +40 -0
  52. package/dist/runner/node/engine.mjs +1 -0
  53. package/dist/runner/node/index.d.mts +5 -0
  54. package/dist/runner/node/index.mjs +1 -0
  55. package/dist/runner/node/node-vm-filesystem.d.mts +22 -0
  56. package/dist/runner/node/node-vm-filesystem.mjs +1 -0
  57. package/dist/runner/node/pool-runner.d.mts +67 -0
  58. package/dist/runner/node/pool-runner.mjs +1 -0
  59. package/dist/runner/node/pool-worker-entry.d.mts +43 -0
  60. package/dist/runner/node/pool-worker-entry.mjs +1 -0
  61. package/dist/runner/pool/events.mjs +1 -0
  62. package/dist/runner/pool/pool-messages.d.mts +2 -10
  63. package/dist/runner/pool/pool.d.mts +36 -0
  64. package/dist/runner/pool/pool.mjs +1 -0
  65. package/dist/runner/pool/shard-planner.mjs +1 -0
  66. package/dist/runner/pool/shard-timings.d.mts +36 -0
  67. package/dist/runner/pool/transport.mjs +1 -0
  68. package/dist/runner/pool/worker-host.d.mts +36 -0
  69. package/dist/runner/pool/worker-host.mjs +1 -0
  70. package/dist/runner/run-geospec-module.mjs +7 -7
  71. package/dist/runner/types.d.mts +9 -10
  72. package/dist/runner/worker/index.d.mts +5 -2
  73. package/dist/runner/worker/index.mjs +1 -1
  74. package/dist/runner/worker/runner-types.d.mts +2 -14
  75. package/dist/runner/worker/serial-runner.mjs +1 -1
  76. package/package.json +28 -5
  77. package/dist/config/tau-project-artifact.d.mts +0 -54
  78. package/dist/config/tau-project-artifact.mjs +0 -3
  79. package/dist/model/export-intent.d.mts +0 -79
  80. package/dist/model/export-intent.mjs +0 -1
@@ -1,6 +1,6 @@
1
1
  # geospec — Functions
2
2
 
3
- 36 top-level symbols. Signatures are verbatim typescript.
3
+ 46 top-level symbols. Signatures are verbatim typescript.
4
4
 
5
5
  // GeoSpec suite helper used inside VM-executed test modules
6
6
  // describe (function)
@@ -67,20 +67,11 @@ export declare function createModelLoader(defaults: CreateModelLoaderOptions): M
67
67
  export declare function loadModel<Code extends Record<string, string> = Record<string, string>>(_options: LoadModelOptions<Code>): Promise<GeoSpecSubject>;
68
68
  // _options: Source, code, or file model load options
69
69
 
70
- // resolveRuntimeExportIntent (function)
71
- export declare function resolveRuntimeExportIntent(options: {
72
- runtime: GeoSpecRuntimeClient;
73
- format: RuntimeBackedModelFormat;
74
- meshLinearTolerance?: number;
75
- meshAngularToleranceDegrees?: number;
76
- /**
77
- * The kernel that evaluates this source, when the host knows it. Routes are
78
- * then chosen among that kernel's own, so a mesh-only kernel is told its
79
- * BRep matchers are unsupported instead of being sent to another kernel's
80
- * STEP route.
81
- */
82
- kernelId?: string;
83
- }): RuntimeExportIntent | RuntimeExportIntentFailure;
70
+ // Create a model exporter that runs a command speaking GeoSpec subprocess protocol 1
71
+ // Throws: TypeError when the options are incomplete or declare `inlineSources`.
72
+ // commandExporter (function)
73
+ export declare function commandExporter(options: CommandExporterOptions): GeoSpecModelExporter;
74
+ // options: The exporter's identity, command and declared capabilities
84
75
 
85
76
  // clearCollectorGlobals (function)
86
77
  export declare function clearCollectorGlobals(): void;
@@ -155,12 +146,52 @@ export declare function allocateNativePoolGrants(options: {
155
146
  // Create a native model loader that admits actual STEP/GLB bytes and retains generation-checked handles until the owning runner finishes
156
147
  // createGeoSpecNativeModelLoader (function)
157
148
  export declare function createGeoSpecNativeModelLoader(defaults: CreateGeoSpecNativeModelLoaderOptions): ManagedGeoSpecNativeModelLoader;
158
- // defaults: Native engine, Runtime defaults, and optional source reader
149
+ // defaults: Native engine, exporters, and optional source reader
150
+
151
+ // Create a Node `VmFileSystem` rooted at `root`
152
+ // createNodeVmFileSystem (function)
153
+ export declare function createNodeVmFileSystem(root: string): VmFileSystem;
154
+ // root: Absolute project root path
155
+
156
+ // Resolve one VM path to a real path under the root
157
+ // Throws: Error when the path escapes the root.
158
+ // resolveUnderRoot (function)
159
+ export declare function resolveUnderRoot(root: string, path: string): string;
160
+ // root: The project root
161
+ // path: A canonical path rooted by the supplied project capability
162
+
163
+ // Create a GeoSpec engine for this process
164
+ // Throws: Error when the native addon is installed but cannot load, or the permits are invalid.
165
+ // createNodeGeoSpecEngine (function)
166
+ export declare function createNodeGeoSpecEngine(options?: CreateNodeGeoSpecEngineOptions): Promise<NodeGeoSpecEngine>;
167
+ // options: CPU permits for the native addon
168
+
169
+ // Create a pool with one engine and one set of exporters constructed inside each worker
170
+ // Remarks: Workers are threads of this process and share one OCCT library instance and pool width, so inner parallelism is all-or-nothing: either several workers with one permit each, or one worker holding the whole budget. A budget above the worker count with more than one worker is refused before any worker starts rather than silently run serial.
171
+ // Throws: RangeError When the budget is invalid, exceeds the host cap, or gives any of several in-process workers more than one permit.
172
+ // createGeoSpecNodePoolRunner (function)
173
+ export declare function createGeoSpecNodePoolRunner(options: GeoSpecNodePoolOptions): GeoSpecRunner;
174
+ // options: Project, config, exporter modules, outer workers and caller-inclusive CPU budget
175
+
176
+ // Adapt a Node worker thread to the pool's host-agnostic handle
177
+ // createNodeWorkerHandle (function)
178
+ export declare function createNodeWorkerHandle(worker: NodeWorkerLike): GeoSpecPoolWorkerHandle;
179
+ // worker: The spawned worker
159
180
 
160
181
  // Create a run-level issue when filters select no tests
161
182
  // createNoMatchingGeoSpecTestsIssue (function)
162
183
  export declare function createNoMatchingGeoSpecTestsIssue(): VmIssue;
163
184
 
185
+ // Create the host-agnostic pool runner
186
+ // createGeoSpecPoolRunner (function)
187
+ export declare function createGeoSpecPoolRunner(options: GeoSpecPoolOptions): GeoSpecRunner;
188
+ // options: Worker factory, worker count, telemetry and event hook
189
+
190
+ // Serve shards until the host says shutdown
191
+ // startGeoSpecPoolWorkerHost (function)
192
+ export declare function startGeoSpecPoolWorkerHost(options: GeoSpecPoolWorkerHostOptions): void;
193
+ // options: Worker filesystem, native engine, and message plumbing
194
+
164
195
  // Create a standalone native GeoSpec assertion client
165
196
  // createGeoSpecAssertionClient (function)
166
197
  export declare function createGeoSpecAssertionClient(options: GeoSpecAssertionClientOptions): GeoSpecAssertionClient;
@@ -176,7 +207,7 @@ export declare function createGeoSpecMatcherMethods<Result>(options: {
176
207
  // options: Subject, polarity and host invocation function
177
208
 
178
209
  // Submit an ancillary query with positive polarity through the native core
179
- // Remarks: Queries return full reports even when failed or refused. Protocol errors propagate unchanged. Rust owns defaults, validation and canonical encoding.
210
+ // Remarks: A query asserts nothing, so it never fails: when the evidence it reads is missing or cannot decide it returns a full refused report whose diagnostic names the reason, such as `GEOSPEC_UNSUPPORTED_EVIDENCE`. Protocol errors propagate unchanged. Rust owns defaults, validation and canonical encoding.
180
211
  // evaluateGeoSpecNativeQuery (function)
181
212
  export declare function evaluateGeoSpecNativeQuery(options: GeoSpecNativeQueryOptions): GeoSpecCanonicalClaimReport;
182
213
  // options: Query identity, subject and authored payload
@@ -187,6 +218,17 @@ export declare function evaluateGeoSpecNativeQuery(options: GeoSpecNativeQueryOp
187
218
  export declare function resolveGeoSpecMaximumWorkUnitLimit(maximum?: number): number;
188
219
  // maximum: The host's configured maximum, when it sets one
189
220
 
221
+ // Run the CLI
222
+ // runGeoSpecCli (function)
223
+ export declare function runGeoSpecCli(argv: readonly string[], host: GeoSpecCliHost): Promise<number>;
224
+ // argv: Arguments after the executable and script
225
+ // host: The injected platform
226
+
227
+ // Build the Node CLI host
228
+ // createNodeGeoSpecCliHost (function)
229
+ export declare function createNodeGeoSpecCliHost(options?: NodeGeoSpecCliHostOptions): GeoSpecCliHost;
230
+ // options: Report sink and host-supplied exporter modules
231
+
190
232
  // Create Vitest matchers over an existing runner-independent client
191
233
  // createGeoSpecVitestAdapter (function)
192
234
  export declare function createGeoSpecVitestAdapter(client: GeoSpecAssertionClient): GeoSpecVitestAdapter;
@@ -202,14 +244,20 @@ export declare function installGeoSpecVitest(client: GeoSpecAssertionClient): Ge
202
244
  export declare function setupGeoSpecVitest(options: GeoSpecAssertionClientOptions): GeoSpecVitestAdapter;
203
245
  // options: Flat native assertion-client options
204
246
 
205
- // Export one Tau project from Runtime's coherent source snapshot
206
- // Remarks: This helper preserves finalized bytes and provenance metadata. It does not certify mathematical geometry or grant the runtime trusted-evaluator authority.
207
- // exportTauProjectArtifact (function)
208
- export declare function exportTauProjectArtifact(options: ExportTauProjectArtifactOptions): Promise<KernelResult<GeoSpecTauProjectArtifact>>;
209
- // options: Descriptor, fresh-runtime factory, and optional cancellation signal
247
+ // Type a `geospec.config.*` default export
248
+ // Remarks: An identity at runtime. The parameter is not generic, so an object literal gets the excess-property and contextual checks `satisfies GeoSpecConfig` gives, in `.ts` and `.js` alike.
249
+ // defineConfig (function)
250
+ export declare function defineConfig(config: GeoSpecConfig): GeoSpecConfig;
251
+ // config: The project configuration
252
+
253
+ // Read a project's `geospec.config.*` data fields through the spec VM, the same way on every host
254
+ // Remarks: Discovery is `loadGeoSpecConfig`'s: exactly one of `geospec.config.{ts,mts,js,mjs}`. The config may import `geospec/config` (for `defineConfig`) and project files, nothing from `node_modules`: imports are detected first, without a network call, so a config with exporters is `not-applied` rather than fetched. `exporters` are never returned; a host that reads the config holds its own.
255
+ // readGeoSpecConfig (function)
256
+ export declare function readGeoSpecConfig(options: ReadGeoSpecConfigOptions): Promise<ReadGeoSpecConfigResult>;
257
+ // options: The project filesystem and the rooted project directory
210
258
 
211
259
  // Load one trusted project config using Node's native module loader
212
- // Remarks: Explicit selection or exactly one geospec.config.js/.mjs/.ts/.mts is allowed. TypeScript must use erasable syntax; JSON imports use standard attributes. Executable config/imports are trusted developer code, not sandboxed code. Node's same-process module cache is unchanged: load once per run and use a fresh process when fresh executable imports are required. No reload guarantee or transitive-source identity is supplied here.
260
+ // Remarks: Explicit selection or exactly one geospec.config.js/.mjs/.ts/.mts is allowed. A config's `geospec/config` import resolves to this copy when the project has no install of its own. TypeScript must use erasable syntax; JSON imports use standard attributes. Executable config/imports are trusted developer code, not sandboxed code. Node's same-process module cache is unchanged: load once per run and use a fresh process when fresh executable imports are required. No reload guarantee or transitive-source identity is supplied here.
213
261
  // loadGeoSpecConfig (function)
214
262
  export declare function loadGeoSpecConfig(options: LoadGeoSpecConfigOptions): Promise<LoadedGeoSpecConfig>;
215
263
  // options: Project, optional explicit config and defined option overrides