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.
- package/README.md +41 -8
- package/agent/geospec-authoring/SKILL.md +12 -11
- package/agent/geospec-authoring/api-functions.md +1 -16
- package/agent/geospec-authoring/api-index.md +53 -46
- package/agent/geospec-authoring/api-types-2.md +85 -0
- package/agent/geospec-authoring/api-types.md +189 -251
- package/agent/geospec-authoring/public-api-functions.md +71 -23
- package/agent/geospec-authoring/public-api-index.md +243 -191
- package/agent/geospec-authoring/public-api-types-2.md +295 -401
- package/agent/geospec-authoring/public-api-types-3.md +412 -119
- package/agent/geospec-authoring/public-api-types.md +237 -126
- package/agent/resources.js +13 -12
- package/agent/skills.json +3 -2
- package/dist/assertion-client/client.d.mts +3 -1
- package/dist/cli/cli.d.mts +48 -0
- package/dist/cli/cli.mjs +30 -0
- package/dist/cli/index.d.mts +3 -0
- package/dist/cli/index.mjs +1 -0
- package/dist/cli/main.d.mts +1 -0
- package/dist/cli/main.mjs +2 -0
- package/dist/cli/node-host.d.mts +26 -0
- package/dist/cli/node-host.mjs +1 -0
- package/dist/cli/wire-value.mjs +1 -0
- package/dist/config/define-config.d.mts +15 -0
- package/dist/config/define-config.mjs +2 -0
- package/dist/config/index.d.mts +4 -3
- package/dist/config/index.mjs +1 -1
- package/dist/config/node/load.d.mts +2 -1
- package/dist/config/node/load.mjs +1 -1
- package/dist/config/read-geospec-config.d.mts +47 -0
- package/dist/config/read-geospec-config.mjs +3 -0
- package/dist/config/types.d.mts +11 -25
- package/dist/config/validate.mjs +1 -1
- package/dist/engine/client.d.mts +3 -1
- package/dist/mesh/index.d.mts +2 -2
- package/dist/model/index.d.mts +3 -3
- package/dist/model/index.mjs +1 -1
- package/dist/model/mesh-evidence-matchers.d.mts +12 -0
- package/dist/model/mesh-evidence-matchers.mjs +1 -0
- package/dist/model/native-model-loader.d.mts +8 -8
- package/dist/model/native-model-loader.mjs +1 -1
- package/dist/model/node/command-exporter.d.mts +33 -0
- package/dist/model/node/command-exporter.mjs +1 -0
- package/dist/model/node/index.d.mts +2 -0
- package/dist/model/node/index.mjs +1 -0
- package/dist/model/types.d.mts +111 -63
- package/dist/runner/collector.d.mts +0 -2
- package/dist/runner/index.d.mts +1 -1
- package/dist/runner/native/index.mjs +1 -1
- package/dist/runner/native/native-serial-runner.mjs +1 -1
- package/dist/runner/node/engine.d.mts +40 -0
- package/dist/runner/node/engine.mjs +1 -0
- package/dist/runner/node/index.d.mts +5 -0
- package/dist/runner/node/index.mjs +1 -0
- package/dist/runner/node/node-vm-filesystem.d.mts +22 -0
- package/dist/runner/node/node-vm-filesystem.mjs +1 -0
- package/dist/runner/node/pool-runner.d.mts +67 -0
- package/dist/runner/node/pool-runner.mjs +1 -0
- package/dist/runner/node/pool-worker-entry.d.mts +43 -0
- package/dist/runner/node/pool-worker-entry.mjs +1 -0
- package/dist/runner/pool/events.mjs +1 -0
- package/dist/runner/pool/pool-messages.d.mts +2 -10
- package/dist/runner/pool/pool.d.mts +36 -0
- package/dist/runner/pool/pool.mjs +1 -0
- package/dist/runner/pool/shard-planner.mjs +1 -0
- package/dist/runner/pool/shard-timings.d.mts +36 -0
- package/dist/runner/pool/transport.mjs +1 -0
- package/dist/runner/pool/worker-host.d.mts +36 -0
- package/dist/runner/pool/worker-host.mjs +1 -0
- package/dist/runner/run-geospec-module.mjs +7 -7
- package/dist/runner/types.d.mts +9 -10
- package/dist/runner/worker/index.d.mts +5 -2
- package/dist/runner/worker/index.mjs +1 -1
- package/dist/runner/worker/runner-types.d.mts +2 -14
- package/dist/runner/worker/serial-runner.mjs +1 -1
- package/package.json +28 -5
- package/dist/config/tau-project-artifact.d.mts +0 -54
- package/dist/config/tau-project-artifact.mjs +0 -3
- package/dist/model/export-intent.d.mts +0 -79
- package/dist/model/export-intent.mjs +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# geospec — Types
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
89 top-level symbols. Signatures are verbatim typescript.
|
|
4
4
|
|
|
5
5
|
// A model admitted by one live GeoSpec host scope
|
|
6
6
|
GeoSpecSubject: {
|
|
@@ -648,7 +648,7 @@ GeoSpecProductStructureExpectation: {
|
|
|
648
648
|
count?: GeoSpecNumericExpectation
|
|
649
649
|
|
|
650
650
|
// One spatial relationship accepted by `expectGeo(...).toHaveSpatialRelationships(...)`
|
|
651
|
-
// Remarks:
|
|
651
|
+
// Remarks: Each kind admits narrow geometry and refuses outside it, never falling back to an estimate (D3). On STEP, `clearance`, `contact`, `insertion` and `interference` take complete box-shaped occurrences (`insertion` also a Cartesian `axis`); `coaxial`, `concentric`, `coplanar`, `parallel`, `perpendicular` and `angle` take one analytic face, axis or plane per endpoint; `containment` takes closed solids. On glTF/GLB, `body` endpoints admit `contact`, `clearance`, `containment` and `interference` over closed shells. Shared volume for `interference` must lie in `[minVolume, maxVolume]`.
|
|
652
652
|
GeoSpecSpatialRelationshipExpectation: {
|
|
653
653
|
id?: string;
|
|
654
654
|
kind: 'contact' | 'clearance' | 'coaxial' | 'concentric' | 'coplanar' | 'parallel' | 'perpendicular' | 'angle' | 'containment' | 'insertion' | 'interference';
|
|
@@ -1558,6 +1558,75 @@ ConnectedComponentsResult: {
|
|
|
1558
1558
|
|
|
1559
1559
|
gaps: ClusterGap[]
|
|
1560
1560
|
|
|
1561
|
+
// Runtime export intent recorded when GeoSpec obtains evidence from a CAD runtime instead of a direct geometry file
|
|
1562
|
+
GeometryExportIntent: {
|
|
1563
|
+
requested: {
|
|
1564
|
+
format: GeometryFileFormat;
|
|
1565
|
+
coordinateSystem?: 'y-up' | 'z-up';
|
|
1566
|
+
unit?: {
|
|
1567
|
+
length?: 'meter' | 'millimeter';
|
|
1568
|
+
};
|
|
1569
|
+
tessellation?: {
|
|
1570
|
+
linearTolerance?: number;
|
|
1571
|
+
angularToleranceDegrees?: number;
|
|
1572
|
+
};
|
|
1573
|
+
};
|
|
1574
|
+
honored?: {
|
|
1575
|
+
format: GeometryFileFormat;
|
|
1576
|
+
coordinateSystem?: 'y-up' | 'z-up';
|
|
1577
|
+
unit?: {
|
|
1578
|
+
length?: 'meter' | 'millimeter';
|
|
1579
|
+
};
|
|
1580
|
+
tessellation?: {
|
|
1581
|
+
linearTolerance?: number;
|
|
1582
|
+
angularToleranceDegrees?: number;
|
|
1583
|
+
};
|
|
1584
|
+
sourceUnit?: GeoSpecUnit;
|
|
1585
|
+
};
|
|
1586
|
+
route?: {
|
|
1587
|
+
kernelId?: string;
|
|
1588
|
+
sourceFormat?: string;
|
|
1589
|
+
targetFormat?: string;
|
|
1590
|
+
transcoderId?: string;
|
|
1591
|
+
fidelity?: 'mesh' | 'brep' | (string & {});
|
|
1592
|
+
direct: boolean;
|
|
1593
|
+
};
|
|
1594
|
+
}
|
|
1595
|
+
|
|
1596
|
+
requested: {
|
|
1597
|
+
format: GeometryFileFormat;
|
|
1598
|
+
coordinateSystem?: 'y-up' | 'z-up';
|
|
1599
|
+
unit?: {
|
|
1600
|
+
length?: 'meter' | 'millimeter';
|
|
1601
|
+
};
|
|
1602
|
+
tessellation?: {
|
|
1603
|
+
linearTolerance?: number;
|
|
1604
|
+
angularToleranceDegrees?: number;
|
|
1605
|
+
};
|
|
1606
|
+
}
|
|
1607
|
+
|
|
1608
|
+
honored?: {
|
|
1609
|
+
format: GeometryFileFormat;
|
|
1610
|
+
coordinateSystem?: 'y-up' | 'z-up';
|
|
1611
|
+
unit?: {
|
|
1612
|
+
length?: 'meter' | 'millimeter';
|
|
1613
|
+
};
|
|
1614
|
+
tessellation?: {
|
|
1615
|
+
linearTolerance?: number;
|
|
1616
|
+
angularToleranceDegrees?: number;
|
|
1617
|
+
};
|
|
1618
|
+
sourceUnit?: GeoSpecUnit;
|
|
1619
|
+
}
|
|
1620
|
+
|
|
1621
|
+
route?: {
|
|
1622
|
+
kernelId?: string;
|
|
1623
|
+
sourceFormat?: string;
|
|
1624
|
+
targetFormat?: string;
|
|
1625
|
+
transcoderId?: string;
|
|
1626
|
+
fidelity?: 'mesh' | 'brep' | (string & {});
|
|
1627
|
+
direct: boolean;
|
|
1628
|
+
}
|
|
1629
|
+
|
|
1561
1630
|
// Diagnostic form permitted inside a wire-safe subject snapshot
|
|
1562
1631
|
GeometryEvidenceDiagnostic: Omit<GeometryDiagnostic, 'details'> & {
|
|
1563
1632
|
details?: JSONValue;
|
|
@@ -1756,70 +1825,6 @@ WatertightResult: {
|
|
|
1756
1825
|
|
|
1757
1826
|
perPrimitive: WatertightPrimitiveBreakdown[]
|
|
1758
1827
|
|
|
1759
|
-
// Runtime route metadata used to decide whether a runtime export can honor GeoSpec evidence requirements
|
|
1760
|
-
GeoSpecExportRoute: Partial<ExportRoute> & {
|
|
1761
|
-
kernelId?: string;
|
|
1762
|
-
sourceFormat?: string;
|
|
1763
|
-
targetFormat?: string;
|
|
1764
|
-
transcoderId?: string;
|
|
1765
|
-
fidelity?: string;
|
|
1766
|
-
exportOptions?: {
|
|
1767
|
-
schema?: {
|
|
1768
|
-
properties?: Record<string, unknown>;
|
|
1769
|
-
};
|
|
1770
|
-
defaults?: Record<string, unknown>;
|
|
1771
|
-
};
|
|
1772
|
-
}
|
|
1773
|
-
|
|
1774
|
-
RuntimeBackedModelFormat: Exclude<GeoSpecModelFormat, 'mesh-buffer'>
|
|
1775
|
-
|
|
1776
|
-
// Runtime client shape for route-aware Tau runtimes
|
|
1777
|
-
RuntimeClientWithRoutes: GeoSpecRuntimeClient & {
|
|
1778
|
-
bestRouteFor(format: string, options?: {
|
|
1779
|
-
readonly kernelId?: string;
|
|
1780
|
-
}): GeoSpecExportRoute | undefined;
|
|
1781
|
-
}
|
|
1782
|
-
|
|
1783
|
-
open: (input: Pick<Parameters<RuntimeClient['open']>[0], 'source' | 'parameters' | 'stage' | 'watch' | 'signal'>) => Pick<ReturnType<RuntimeClient['open']>, 'export' | 'close'>
|
|
1784
|
-
|
|
1785
|
-
// RuntimeClientWithRoutes.on (method)
|
|
1786
|
-
on?(event: 'telemetry', handler: (batch: {
|
|
1787
|
-
readonly entries: ReadonlyArray<{
|
|
1788
|
-
name: string;
|
|
1789
|
-
duration: number;
|
|
1790
|
-
startTime: number;
|
|
1791
|
-
workerTimeOrigin: number;
|
|
1792
|
-
}>;
|
|
1793
|
-
}) => void): () => void;
|
|
1794
|
-
|
|
1795
|
-
// RuntimeClientWithRoutes.bestRouteFor (method)
|
|
1796
|
-
bestRouteFor(format: string, options?: {
|
|
1797
|
-
readonly kernelId?: string;
|
|
1798
|
-
}): GeoSpecExportRoute | undefined;
|
|
1799
|
-
|
|
1800
|
-
// Resolved runtime export request and provenance for a GeoSpec model load
|
|
1801
|
-
RuntimeExportIntent: {
|
|
1802
|
-
options: Record<string, unknown>;
|
|
1803
|
-
provenance: GeometryExportIntent;
|
|
1804
|
-
sourceUnit: GeoSpecUnit;
|
|
1805
|
-
}
|
|
1806
|
-
|
|
1807
|
-
options: Record<string, unknown>
|
|
1808
|
-
|
|
1809
|
-
provenance: GeometryExportIntent
|
|
1810
|
-
|
|
1811
|
-
sourceUnit: GeoSpecUnit
|
|
1812
|
-
|
|
1813
|
-
// Structured failure returned when a runtime cannot provide the requested GeoSpec evidence
|
|
1814
|
-
RuntimeExportIntentFailure: {
|
|
1815
|
-
success: false;
|
|
1816
|
-
diagnostics: GeometryDiagnostic[];
|
|
1817
|
-
}
|
|
1818
|
-
|
|
1819
|
-
success: false
|
|
1820
|
-
|
|
1821
|
-
diagnostics: GeometryDiagnostic[]
|
|
1822
|
-
|
|
1823
1828
|
// Defaults accepted by {@link import ('./load-model.js').createModelLoader}
|
|
1824
1829
|
CreateModelLoaderOptions: {
|
|
1825
1830
|
/** Initialized compiled engine supplied by the host, never selected by an authored spec. */
|
|
@@ -1828,11 +1833,9 @@ CreateModelLoaderOptions: {
|
|
|
1828
1833
|
readSource?: GeoSpecNativeSourceReader;
|
|
1829
1834
|
/** Geometry format to export when an individual call does not specify one. */
|
|
1830
1835
|
format?: GeoSpecModelFormat;
|
|
1831
|
-
/**
|
|
1832
|
-
|
|
1833
|
-
/**
|
|
1834
|
-
sourceAdapters?: readonly GeoSpecRuntimeSourceAdapter[];
|
|
1835
|
-
/** Project root used by runtime integrations. */
|
|
1836
|
+
/** Model exporters for source-kind files; the first whose `extensions` claim the file exports it. */
|
|
1837
|
+
exporters?: readonly GeoSpecModelExporter[];
|
|
1838
|
+
/** Absolute project root passed to the exporter. */
|
|
1836
1839
|
projectPath?: string;
|
|
1837
1840
|
/** STEP reader strategy used for STEP sources or exports. */
|
|
1838
1841
|
stepStreaming?: StepStreamingMode;
|
|
@@ -1853,13 +1856,10 @@ CreateModelLoaderOptions: {
|
|
|
1853
1856
|
// Geometry format to export when an individual call does not specify one
|
|
1854
1857
|
format?: GeoSpecModelFormat
|
|
1855
1858
|
|
|
1856
|
-
//
|
|
1857
|
-
|
|
1859
|
+
// Model exporters for source-kind files
|
|
1860
|
+
exporters?: readonly GeoSpecModelExporter[]
|
|
1858
1861
|
|
|
1859
|
-
//
|
|
1860
|
-
sourceAdapters?: readonly GeoSpecRuntimeSourceAdapter[]
|
|
1861
|
-
|
|
1862
|
-
// Project root used by runtime integrations
|
|
1862
|
+
// Absolute project root passed to the exporter
|
|
1863
1863
|
projectPath?: string
|
|
1864
1864
|
|
|
1865
1865
|
// STEP reader strategy used for STEP sources or exports
|
|
@@ -1874,6 +1874,33 @@ CreateModelLoaderOptions: {
|
|
|
1874
1874
|
// Angular tolerance in degrees used while meshing exact BRep evidence
|
|
1875
1875
|
meshAngularToleranceDegrees?: number
|
|
1876
1876
|
|
|
1877
|
+
// What a {@link GeoSpecModelExporter} declares it can do
|
|
1878
|
+
GeoSpecExporterCapabilities: {
|
|
1879
|
+
/** The formats `export` produces; at least one. A GLB-only exporter refuses STEP loads up front. */
|
|
1880
|
+
readonly formats: readonly GeoSpecExportFormat[];
|
|
1881
|
+
/** Accepts `parameters`. Without it, a load that passes parameters refuses. */
|
|
1882
|
+
readonly parameters?: boolean;
|
|
1883
|
+
/** Crops to `region` (an axis-aligned millimetre box) before export. Without it, a region load refuses. */
|
|
1884
|
+
readonly region?: boolean;
|
|
1885
|
+
/** Accepts `inline` sources, which back `loadModel({ code })`. Without it, an inline load refuses. */
|
|
1886
|
+
readonly inlineSources?: boolean;
|
|
1887
|
+
}
|
|
1888
|
+
|
|
1889
|
+
// The formats `export` produces
|
|
1890
|
+
readonly formats: readonly GeoSpecExportFormat[]
|
|
1891
|
+
|
|
1892
|
+
// Accepts `parameters`
|
|
1893
|
+
readonly parameters?: boolean
|
|
1894
|
+
|
|
1895
|
+
// Crops to `region` (an axis-aligned millimetre box) before export
|
|
1896
|
+
readonly region?: boolean
|
|
1897
|
+
|
|
1898
|
+
// Accepts `inline` sources, which back `loadModel({ code })`
|
|
1899
|
+
readonly inlineSources?: boolean
|
|
1900
|
+
|
|
1901
|
+
// Formats a {@link GeoSpecModelExporter} may produce from a source-kind file
|
|
1902
|
+
GeoSpecExportFormat: Extract<GeoSpecModelFormat, 'glb' | 'step'>
|
|
1903
|
+
|
|
1877
1904
|
// Axis-aligned crop box in canonical Z-up millimetres
|
|
1878
1905
|
GeoSpecLoadRegion: {
|
|
1879
1906
|
readonly min: readonly [number, number, number];
|
|
@@ -1884,65 +1911,149 @@ GeoSpecLoadRegion: {
|
|
|
1884
1911
|
|
|
1885
1912
|
readonly max: readonly [number, number, number]
|
|
1886
1913
|
|
|
1887
|
-
//
|
|
1888
|
-
|
|
1914
|
+
// The bytes an exporter returns, in the canonical Z-up millimetre frame
|
|
1915
|
+
GeoSpecModelArtifact: {
|
|
1916
|
+
readonly bytes: Uint8Array<ArrayBuffer>;
|
|
1917
|
+
readonly format: GeoSpecExportFormat;
|
|
1918
|
+
/** Unit of raw GLB coordinates; defaults to `'mm'`. STEP carries its own unit. */
|
|
1919
|
+
readonly sourceUnit?: GeoSpecUnit;
|
|
1920
|
+
/** External resources the primary bytes reference, by name. */
|
|
1921
|
+
readonly resources?: ReadonlyArray<{
|
|
1922
|
+
readonly name: string;
|
|
1923
|
+
readonly bytes: Uint8Array<ArrayBuffer>;
|
|
1924
|
+
}>;
|
|
1925
|
+
/**
|
|
1926
|
+
* Every source file the export read, as a path from the project root with its SHA-256 (64 hex digits,
|
|
1927
|
+
* optionally prefixed `sha256:`), or `'missing'` for a file the export looked for and did not find. The
|
|
1928
|
+
* load records it as the subject's source revision.
|
|
1929
|
+
*/
|
|
1930
|
+
readonly consumedSources?: GeoSpecConsumedSources;
|
|
1931
|
+
/** Notices from a successful export, admitted with the subject so its evidence keeps them. */
|
|
1932
|
+
readonly diagnostics?: readonly GeometryDiagnostic[];
|
|
1933
|
+
/** The export options the exporter applied, recorded in the load evidence beside the exporter id. */
|
|
1934
|
+
readonly exportOptions?: Readonly<Record<string, unknown>>;
|
|
1935
|
+
}
|
|
1889
1936
|
|
|
1890
|
-
|
|
1891
|
-
GeoSpecModelLoader: <Code extends Record<string, string> = Record<string, string>>(options: LoadModelOptions<Code>) => Promise<GeoSpecSubject>
|
|
1937
|
+
readonly bytes: Uint8Array<ArrayBuffer>
|
|
1892
1938
|
|
|
1893
|
-
|
|
1894
|
-
ManagedGeoSpecModelLoader: GeoSpecModelLoader & {
|
|
1895
|
-
dispose(): Promise<void>;
|
|
1896
|
-
}
|
|
1939
|
+
readonly format: GeoSpecExportFormat
|
|
1897
1940
|
|
|
1898
|
-
//
|
|
1899
|
-
|
|
1941
|
+
// Unit of raw GLB coordinates
|
|
1942
|
+
readonly sourceUnit?: GeoSpecUnit
|
|
1900
1943
|
|
|
1901
|
-
//
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1944
|
+
// External resources the primary bytes reference, by name
|
|
1945
|
+
readonly resources?: ReadonlyArray<{
|
|
1946
|
+
readonly name: string;
|
|
1947
|
+
readonly bytes: Uint8Array<ArrayBuffer>;
|
|
1948
|
+
}>
|
|
1949
|
+
|
|
1950
|
+
// Every source file the export read, as a path from the project root with its SHA-256 (64 hex digits, optionally prefixed `sha256:`), or `'missing'` for a file the export looked for and did not find
|
|
1951
|
+
readonly consumedSources?: GeoSpecConsumedSources
|
|
1952
|
+
|
|
1953
|
+
// Notices from a successful export, admitted with the subject so its evidence keeps them
|
|
1954
|
+
readonly diagnostics?: readonly GeometryDiagnostic[]
|
|
1955
|
+
|
|
1956
|
+
// The export options the exporter applied, recorded in the load evidence beside the exporter id
|
|
1957
|
+
readonly exportOptions?: Readonly<Record<string, unknown>>
|
|
1958
|
+
|
|
1959
|
+
// Turns a source-kind model file into GLB or STEP bytes for GeoSpec
|
|
1960
|
+
GeoSpecModelExporter: {
|
|
1961
|
+
readonly id: string;
|
|
1962
|
+
readonly extensions: readonly string[];
|
|
1963
|
+
readonly capabilities: GeoSpecExporterCapabilities;
|
|
1964
|
+
export(request: GeoSpecModelExportRequest): Promise<GeoSpecModelArtifact>;
|
|
1965
|
+
/**
|
|
1966
|
+
* The sources an export of `file` would read now, without exporting. With it, the loader reuses an
|
|
1967
|
+
* earlier identical load in the same scope when every digest still matches; without it, every file
|
|
1968
|
+
* load exports afresh.
|
|
1969
|
+
*/
|
|
1970
|
+
revision?(request: Pick<GeoSpecModelExportRequest, 'file' | 'projectPath'>): Promise<GeoSpecConsumedSources | undefined>;
|
|
1971
|
+
/**
|
|
1972
|
+
* Releases what the exporter created for one scope. The loader calls it from `releaseAll` for every
|
|
1973
|
+
* exporter it exported through in that scope; the exporter stays usable for the next one.
|
|
1974
|
+
*/
|
|
1975
|
+
close?(): Promise<void>;
|
|
1913
1976
|
}
|
|
1914
1977
|
|
|
1915
|
-
|
|
1978
|
+
readonly id: string
|
|
1916
1979
|
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
name: string;
|
|
1921
|
-
duration: number;
|
|
1922
|
-
startTime: number;
|
|
1923
|
-
workerTimeOrigin: number;
|
|
1924
|
-
}>;
|
|
1925
|
-
}) => void): () => void;
|
|
1980
|
+
readonly extensions: readonly string[]
|
|
1981
|
+
|
|
1982
|
+
readonly capabilities: GeoSpecExporterCapabilities
|
|
1926
1983
|
|
|
1927
|
-
//
|
|
1928
|
-
|
|
1984
|
+
// GeoSpecModelExporter.export (method)
|
|
1985
|
+
export(request: GeoSpecModelExportRequest): Promise<GeoSpecModelArtifact>;
|
|
1929
1986
|
|
|
1930
|
-
//
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1987
|
+
// The sources an export of `file` would read now, without exporting
|
|
1988
|
+
// GeoSpecModelExporter.revision (method)
|
|
1989
|
+
revision?(request: Pick<GeoSpecModelExportRequest, 'file' | 'projectPath'>): Promise<GeoSpecConsumedSources | undefined>;
|
|
1990
|
+
|
|
1991
|
+
// Releases what the exporter created for one scope
|
|
1992
|
+
// GeoSpecModelExporter.close (method)
|
|
1993
|
+
close?(): Promise<void>;
|
|
1994
|
+
|
|
1995
|
+
// One export request
|
|
1996
|
+
GeoSpecModelExportRequest: {
|
|
1997
|
+
/** Entry file, as a path from the project root. */
|
|
1998
|
+
readonly file: string;
|
|
1999
|
+
/** Absolute project root the exporter resolves `file` and its imports against, when the host has one. */
|
|
2000
|
+
readonly projectPath?: string;
|
|
2001
|
+
readonly format: GeoSpecExportFormat;
|
|
2002
|
+
/** JSON-serialisable parameter values; present only when the exporter declares `parameters`. */
|
|
2003
|
+
readonly parameters?: Readonly<Record<string, unknown>>;
|
|
2004
|
+
/** Tessellation tolerances for a mesh export. */
|
|
2005
|
+
readonly mesh?: {
|
|
2006
|
+
readonly linearTolerance?: number;
|
|
2007
|
+
readonly angularToleranceDegrees?: number;
|
|
2008
|
+
};
|
|
2009
|
+
/** Millimetre crop box; present only when the exporter declares `region`. */
|
|
2010
|
+
readonly region?: GeoSpecLoadRegion;
|
|
2011
|
+
/** Source text keyed by project-relative path; present only when the exporter declares `inlineSources`. */
|
|
2012
|
+
readonly inline?: Readonly<Record<string, string>>;
|
|
2013
|
+
readonly signal?: AbortSignal;
|
|
1938
2014
|
}
|
|
1939
2015
|
|
|
1940
|
-
|
|
2016
|
+
// Entry file, as a path from the project root
|
|
2017
|
+
readonly file: string
|
|
2018
|
+
|
|
2019
|
+
// Absolute project root the exporter resolves `file` and its imports against, when the host has one
|
|
2020
|
+
readonly projectPath?: string
|
|
2021
|
+
|
|
2022
|
+
readonly format: GeoSpecExportFormat
|
|
2023
|
+
|
|
2024
|
+
// JSON-serialisable parameter values
|
|
2025
|
+
readonly parameters?: Readonly<Record<string, unknown>>
|
|
2026
|
+
|
|
2027
|
+
// Tessellation tolerances for a mesh export
|
|
2028
|
+
readonly mesh?: {
|
|
2029
|
+
readonly linearTolerance?: number;
|
|
2030
|
+
readonly angularToleranceDegrees?: number;
|
|
2031
|
+
}
|
|
2032
|
+
|
|
2033
|
+
// Millimetre crop box
|
|
2034
|
+
readonly region?: GeoSpecLoadRegion
|
|
2035
|
+
|
|
2036
|
+
// Source text keyed by project-relative path
|
|
2037
|
+
readonly inline?: Readonly<Record<string, string>>
|
|
2038
|
+
|
|
2039
|
+
readonly signal?: AbortSignal
|
|
2040
|
+
|
|
2041
|
+
// Geometry formats accepted by {@link import ('./load-model.js').loadModel}
|
|
2042
|
+
GeoSpecModelFormat: MeshFileFormat | 'step' | 'stp'
|
|
2043
|
+
|
|
2044
|
+
// Function shape used by GeoSpec runners to provide model loading inside VM executed test files
|
|
2045
|
+
GeoSpecModelLoader: <Code extends Record<string, string> = Record<string, string>>(options: LoadModelOptions<Code>) => Promise<GeoSpecSubject>
|
|
2046
|
+
|
|
2047
|
+
// A configured loader whose admissions can be released with its owner
|
|
2048
|
+
ManagedGeoSpecModelLoader: GeoSpecModelLoader & {
|
|
2049
|
+
dispose(): Promise<void>;
|
|
2050
|
+
}
|
|
1941
2051
|
|
|
1942
|
-
|
|
2052
|
+
// ManagedGeoSpecModelLoader.dispose (method)
|
|
2053
|
+
dispose(): Promise<void>;
|
|
1943
2054
|
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
2055
|
+
// The source files one export read, each with its SHA-256 or `'missing'`
|
|
2056
|
+
GeoSpecConsumedSources: ReadonlyArray<{
|
|
2057
|
+
readonly path: string;
|
|
2058
|
+
readonly sha256: string;
|
|
2059
|
+
}>
|
package/agent/resources.js
CHANGED
|
@@ -4,23 +4,24 @@ export default Object.freeze([
|
|
|
4
4
|
slug: "geospec-authoring",
|
|
5
5
|
name: "GeoSpec authoring",
|
|
6
6
|
description: "Guides canonical GeoSpec geometry tests in TypeScript or JavaScript for every Tau kernel. Use for *.geospec.ts and *.geospec.js tests.",
|
|
7
|
-
version: "0.1.0-beta.
|
|
7
|
+
version: "0.1.0-beta.9",
|
|
8
8
|
whenToUse: "Use before creating or editing *.geospec.ts or *.geospec.js tests, for a model in any kernel.",
|
|
9
|
-
body: "---\nname: geospec-authoring\ndescription: Guides canonical GeoSpec geometry tests in TypeScript or JavaScript for every Tau kernel. Use for *.geospec.ts and *.geospec.js tests.\n---\n\n# GeoSpec authoring\n\nWrite tests before implementation; assert deterministic, measurable properties.\n\n## Test shape\n\n- Use `*.geospec.ts` or `*.geospec.js`. Import `describe`, `it` and `expectGeo` from `geospec`, and `loadModel` from `geospec/model`.\n- Await `loadModel`, then assert synchronously with `expectGeo(model)`. The host supplies the compiled binding; authoring does not select an engine.\n- Await or return the complete model-load chain from the test callback; detached future loads are not part of a completed test.\n- Omit `parameters` for model-code defaults; use `{ file, parameters }` for variants. Loaded subjects are opaque.\n- `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.\n\nCanonical TypeScript authoring:\n\n```ts\nimport { describe, expectGeo, it } from 'geospec';\nimport { loadModel } from 'geospec/model';\n\ndescribe('main geometry', () => {\n it('has the intended envelope', async () => {\n const model = await loadModel({ file: 'main.ts', parameters: { width: 120 } });\n expectGeo(model).toHaveBoundingBox({ size: { x: 120 }, tolerance: 1 });\n });\n});\n```\n\nSpecs 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.\n\nEvery matcher takes one expectation object:\n\n- Wrong: `expectGeo(model).toHaveVolume(5000, { tolerance: 5 })`. Correct: `expectGeo(model).toHaveVolume({ value: 5000, tolerance: 5 })`.\n- Wrong: `await expectGeo(model)…`. Correct: await `loadModel`, then assert synchronously.\n- 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`.\n\n## Loads and budgets\n\n- 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.\n- `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.\n- `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.\n- 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.\n- `toHaveCenterOfMass({ point, tolerance })` takes an exact point. Per-axis ranges such as `{ y: { greaterThan: 1 } }` are refused.\n\n## Ceilings\n\nFixed in this release; design within them, and report a claim that meets one as not decided.\n\n| Ceiling | Value | Where an agent meets it |\n| ------------------------------------- | -------------------- | --------------------------------------------------------------------------------------------------------------------------------- |\n| `maxSubjectBytes`, `maxResourceBytes` | 64 MiB each | A mesh `loadModel({ file })` exports about 72 bytes per triangle, so admission refuses near 930,000 triangles (`resource-limit`). |\n| `maxTotalBinaryBytes` | 128 MiB | All subjects of one load together. |\n| `maxTriangles`, `maxVertices` | 4,000,000, 2,000,000 | A decoded mesh. |\n| `continuousEvidenceBytes` | 32 MiB | `toHaveNoComponentInterference` on a large assembly (`analysis-limit`). |\n| `workUnitLimit` | 512000000 at most | Any claim; the only limit an argument raises. |\n\nLoad `format: 'step'` only for the exact-BRep matchers above; every other matcher answers on the cheaper mesh.\n\n## Coverage\n\nBounds 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.\n\n- `toHaveBoundingBox`: size/position.\n- `toHaveConnectedComponents`: qualified material connectivity; visual touching cannot justify tolerance changes.\n- `toBeWatertight`: closed edge incidence, not manifold validity, fusion or material connectivity. Bounds prove none of these. Missing evidence is unsupported.\n- `toHaveSurfaceArea`, `toHaveVolume`, `toHaveCenterOfMass`, `toHaveMass`: physical measurements.\n- `toHaveNoComponentInterference`: overlap; allow deliberate press fits.\n- `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.\n\nTest assemblies and independent units; preserve sibling coverage when adding files. Non-top-level geometry needs kernel export/invocation, not test removal.\n\nFix geometry at its root; never weaken tolerances, delete assertions, or reduce detail to pass.\n\n`public-api-index.md` covers the host and framework API; authoring needs only the Core API below and `api-*` files.\n\n## Core API\n\nThe symbols real Tau models use most, as verbatim declarations. Anything not shown is in the API reference below.\n\n### Functions\n\n```ts\n// Start a geometry assertion chain\nexport declare function expectGeo(subject: GeoSpecSubject, options?: GeoSpecExpectOptions): GeoSpecMatcher;\n\n// A model admitted by one live GeoSpec host scope\nGeoSpecSubject: {\n readonly [subjectBrand]: true\n}\n\n// Per-chain options accepted by `expectGeo(subject, options)`\nGeoSpecExpectOptions: {\n // Deterministic work-unit budget for every claim in this chain\n readonly workUnitLimit?: number\n}\n\n// Load a CAD model into GeoSpec evidence\nexport declare function loadModel<Code extends Record<string, string> = Record<string, string>>(_options: LoadModelOptions<Code>): Promise<GeoSpecSubject>;\n\n// Options accepted by {@link import ('./load-model.js').loadModel}\nLoadModelOptions: LoadModelSourceOptions | LoadModelCodeOptions<Code> | LoadModelFileOptions\n // Project-relative folder `file` resolves in, for a suite that loads from somewhere other than…\n rootDir?: string\n // Geometry format to export\n format?: GeoSpecModelFormat\n // Explicit parameters passed to the runtime\n parameters?: Record<string, unknown>\n // STEP reader strategy used for STEP exports\n stepStreaming?: StepStreamingMode\n // Whether STEP loading should also produce mesh evidence\n mesh?: boolean\n // Linear tolerance used while meshing exact BRep evidence\n meshLinearTolerance?: number\n // Angular tolerance in degrees used while meshing exact BRep evidence\n meshAngularToleranceDegrees?: number\n // Default work-unit budget for every claim on this subject\n workUnitLimit?: number\n\n// Geometry formats accepted by {@link import ('./load-model.js').loadModel}\nGeoSpecModelFormat: MeshFileFormat | 'step' | 'stp'\n\n// GeoSpec test helper used inside VM-executed test modules\nexport declare function it(name: string, function_: GeoSpecTestCallback): void;\n skip(name: string, function_?: GeoSpecTestCallback): void;\n\n// GeoSpec suite helper used inside VM-executed test modules\nexport declare function describe(name: string, function_: GeoSpecTestCallback): void;\n skip(name: string, function_?: GeoSpecTestCallback): void;\n```\n\n### Types\n\n```ts\n// Assertion chain returned by `expectGeo(subject)`\nGeoSpecMatcher: {\n // Core-owned negation\n readonly not: Omit<GeoSpecMatcher, 'not'>\n // Assert the fixed rational plate contract\n toSatisfyRationalPlate(): GeoSpecAssertion;\n // Assert the fixed parallel-plane distance contract\n toSatisfyParallelPlaneDistance(): GeoSpecAssertion;\n // Assert axis-aligned bounds, size, or center for a loaded geometry subject\n toHaveBoundingBox(first: Vec3 | GeoSpecBoundingBoxExpectation, second?: Vec3): GeoSpecAssertion;\n // Assert how many spatially disjoint chunks the mesh contains\n toHaveConnectedComponents(expected: GeoSpecConnectedComponentsExpectation): GeoSpecAssertion;\n // Assert closed mesh edge incidence\n toBeWatertight(): GeoSpecAssertion;\n // Assert that separate assembly components do not occupy the same solid volume\n toHaveNoComponentInterference(expected?: GeoSpecComponentInterferenceExpectation): GeoSpecAssertion;\n // Assert that named assembly occurrences exist with expected counts and bounds\n toHaveAssemblyOccurrences(expected: GeoSpecAssemblyOccurrencesExpectation): GeoSpecAssertion;\n // Assert that selected entities satisfy declared spatial relationships\n toHaveSpatialRelationships(expected: GeoSpecSpatialRelationshipsExpectation): GeoSpecAssertion;\n // Assert rendered mesh evidence is internally trustworthy for downstream checks\n toHaveMeshIntegrity(expected: GeoSpecMeshIntegrityExpectation): GeoSpecAssertion;\n // Assert that the subject carries no diagnostics at the rejected severities\n toHaveNoDiagnostics(expected?: GeoSpecNoDiagnosticsExpectation): GeoSpecAssertion;\n // Assert total surface area, preferring exact BRep mass properties when available\n toHaveSurfaceArea(expected: GeoSpecSurfaceAreaExpectation): GeoSpecAssertion;\n // Assert enclosed volume, preferring exact BRep mass properties when available\n toHaveVolume(expected: GeoSpecVolumeExpectation): GeoSpecAssertion;\n // Assert mass derived from exact mass properties or volume times density\n toHaveMass(expected: GeoSpecMassExpectation): GeoSpecAssertion;\n // Assert the center of mass or mesh-derived centroid for a closed subject\n toHaveCenterOfMass(expected: GeoSpecCenterOfMassExpectation): GeoSpecAssertion;\n // Assert that exact BRep evidence reports a valid shape\n toBeValidBrep(expected?: GeoSpecValidBrepExpectation): GeoSpecAssertion;\n // Assert exact BRep topology counts\n toHaveTopologyCounts(expected: GeoSpecTopologyCountsExpectation): GeoSpecAssertion;\n // Assert the STEP unit evidence\n toHaveStepUnits(expected: GeoSpecStepUnitsExpectation): GeoSpecAssertion;\n // Assert STEP product-structure evidence\n toHaveProductStructure(expected: GeoSpecProductStructureExpectation): GeoSpecAssertion;\n // Assert that BRep evidence contains a planar face matching the requested constraints\n toHavePlanarFace(expected: GeoSpecPlanarFaceExpectation): GeoSpecAssertion;\n // Assert that BRep evidence contains a cylindrical face with the requested radius and axis\n toHaveCylindricalFace(expected: GeoSpecCylindricalFaceExpectation): GeoSpecAssertion;\n // Assert that BRep evidence contains a circular hole matching diameter, center, and axis\n toHaveCircularHole(expected: GeoSpecCircularHoleExpectation): GeoSpecAssertion;\n // Assert that BRep evidence contains a repeated circular-hole pattern\n toHaveCircularHolePattern(expected: GeoSpecCircularHolePatternExpectation): GeoSpecAssertion;\n // Assert that BRep evidence contains a chamfer feature with the requested distance\n toHaveChamferFeature(expected: GeoSpecChamferFeatureExpectation): GeoSpecAssertion;\n // Assert that BRep evidence contains a fillet feature with the requested radius\n toHaveFilletFeature(expected: GeoSpecFilletFeatureExpectation): GeoSpecAssertion;\n // Assert that BRep evidence reports a minimum wall thickness satisfying the expectation\n toHaveMinimumWallThickness(expected: GeoSpecMinimumWallThicknessExpectation): GeoSpecAssertion;\n // Assert that the declared waypoints share one connected void, stay isolated from the declared…\n toHaveVoidContinuity(expected: GeoSpecVoidContinuityExpectation): GeoSpecAssertion;\n}\n\n// Numeric 3D vector\nVec3: readonly [number, number, number]\n\n// Bounding-box expectation accepted by `expectGeo(...).toHaveBoundingBox(...)`\nGeoSpecBoundingBoxExpectation: {\n min?: Vec3 | Partial<Record<keyof GeoSpecAxisExpectation, GeoSpecNumericExpectation>>\n max?: Vec3 | Partial<Record<keyof GeoSpecAxisExpectation, GeoSpecNumericExpectation>>\n size?: Vec3 | Partial<Record<keyof GeoSpecAxisExpectation, GeoSpecNumericExpectation>>\n center?: Vec3 | Partial<Record<keyof GeoSpecAxisExpectation, GeoSpecNumericExpectation>>\n tolerance?: number\n}\n\n// Connected-components expectation accepted by `expectGeo(...).toHaveConnectedComponents(...)`\nGeoSpecConnectedComponentsExpectation: {\n count: number\n tolerance?: number\n toleranceMm?: number\n}\n\n// Component-interference expectation accepted by `expectGeo(...).toHaveNoComponentInterference(...)`\nGeoSpecComponentInterferenceExpectation: {\n tolerance?: number\n pairs?: GeoSpecComponentInterferencePairExpectation[]\n allowances?: GeoSpecComponentInterferenceAllowance[]\n}\n\n// Assembly occurrence expectation accepted by `expectGeo(...).toHaveAssemblyOccurrences(...)`\nGeoSpecAssemblyOccurrencesExpectation: {\n occurrences: GeoSpecAssemblyOccurrenceExpectation[]\n uniqueNames?: boolean\n}\n\n// Spatial relationship expectation accepted by `expectGeo(...).toHaveSpatialRelationships(...)`\nGeoSpecSpatialRelationshipsExpectation: {\n relationships: GeoSpecSpatialRelationshipExpectation[]\n}\n\n// Mesh integrity expectation accepted by `expectGeo(...).toHaveMeshIntegrity(...)`\nGeoSpecMeshIntegrityExpectation: {\n finitePositions?: boolean\n degenerateTriangles?: {\n count?: number;\n maxCount?: number;\n areaTolerance?: number;\n }\n duplicateFaces?: {\n count?: number;\n maxCount?: number;\n }\n watertight?: boolean\n triangleCount?: GeoSpecNumericExpectation\n}\n\n// Diagnostic severities rejected by `expectGeo(...).toHaveNoDiagnostics(...)`\nGeoSpecNoDiagnosticsExpectation: {\n severities?: Array<GeometryDiagnostic['severity']>\n}\n\n// Surface-area expectation accepted by `expectGeo(...).toHaveSurfaceArea(...)`\nGeoSpecSurfaceAreaExpectation: {\n value: number | GeoSpecNumericExpectation\n tolerance?: number\n}\n\n// Volume expectation accepted by `expectGeo(...).toHaveVolume(...)`\nGeoSpecVolumeExpectation: {\n value: number | GeoSpecNumericExpectation\n tolerance?: number\n}\n\n// Mass expectation accepted by `expectGeo(...).toHaveMass(...)`\nGeoSpecMassExpectation: {\n value: number | GeoSpecNumericExpectation\n density?: number\n tolerance?: number\n}\n\n// Center-of-mass expectation accepted by `expectGeo(...).toHaveCenterOfMass(...)`\nGeoSpecCenterOfMassExpectation: {\n // Exact expected point in millimetres\n point: GeoSpecPointExpectation\n tolerance?: number\n}\n\n// Exact BRep validity expectation accepted by `expectGeo(...).toBeValidBrep(...)`\nGeoSpecValidBrepExpectation: {\n maxTolerance?: number\n freeBounds?: {\n count?: GeoSpecNumericExpectation;\n }\n minEdgeLength?: number\n sameParameter?: boolean\n closedShells?: boolean\n closedWires?: boolean\n}\n\n// Topology-count expectation accepted by `expectGeo(...).toHaveTopologyCounts(...)`\nGeoSpecTopologyCountsExpectation: {\n vertices?: GeoSpecNumericExpectation\n edges?: GeoSpecNumericExpectation\n wires?: GeoSpecNumericExpectation\n faces?: GeoSpecNumericExpectation\n shells?: GeoSpecNumericExpectation\n solids?: GeoSpecNumericExpectation\n compounds?: GeoSpecNumericExpectation\n tolerance?: number\n}\n\n// STEP unit expectation accepted by `expectGeo(...).toHaveStepUnits(...)`\nGeoSpecStepUnitsExpectation: {\n unit: string\n}\n\n// Product-structure expectation accepted by `expectGeo(...).toHaveProductStructure(...)`\nGeoSpecProductStructureExpectation: {\n names?: string[]\n count?: GeoSpecNumericExpectation\n}\n\n// Planar-face expectation accepted by `expectGeo(...).toHavePlanarFace(...)`\nGeoSpecPlanarFaceExpectation: {\n normal: GeoSpecPointExpectation\n offset: number\n area?: GeoSpecNumericExpectation\n tolerance?: number\n}\n\n// Cylindrical-face expectation accepted by `expectGeo(...).toHaveCylindricalFace(...)`\nGeoSpecCylindricalFaceExpectation: {\n radius: number\n axis: 'x' | 'y' | 'z'\n tolerance?: number\n}\n\n// Circular-hole expectation accepted by `expectGeo(...).toHaveCircularHole(...)`\nGeoSpecCircularHoleExpectation: {\n diameter: number\n through?: boolean\n axis?: 'x' | 'y' | 'z'\n center?: GeoSpecPointExpectation\n tolerance?: number\n}\n\n// Circular-hole-pattern expectation accepted by `expectGeo(...).toHaveCircularHolePattern(...)`\nGeoSpecCircularHolePatternExpectation: {\n count: number\n holeDiameter: number\n boltCircleDiameter?: number\n axis?: 'x' | 'y' | 'z'\n center?: GeoSpecPointExpectation\n tolerance?: number\n}\n\n// Chamfer-feature expectation accepted by `expectGeo(...).toHaveChamferFeature(...)`\nGeoSpecChamferFeatureExpectation: {\n distance: number\n selection?: string\n tolerance?: number\n}\n\n// Fillet-feature expectation accepted by `expectGeo(...).toHaveFilletFeature(...)`\nGeoSpecFilletFeatureExpectation: {\n radius: number\n selection?: string\n tolerance?: number\n}\n\n// Minimum-wall-thickness expectation accepted by `expectGeo(...).toHaveMinimumWallThickness(...)`\nGeoSpecMinimumWallThicknessExpectation: {\n value: GeoSpecNumericExpectation\n tolerance?: number\n}\n\n// Void-continuity expectation accepted by `expectGeo(...).toHaveVoidContinuity(...)`\nGeoSpecVoidContinuityExpectation: {\n // Ordered waypoints (>= 1) known to lie in the void being proven\n path: GeoSpecVoidWaypoint[]\n // Occurrence names whose solids bound the void\n material?: string[]\n // Minimum required bottleneck cross-section (mm²), sampled\n minCrossSection?: number\n // Points that must NOT be reachable from the path void (isolation claim)\n isolatedFrom?: Vec3[]\n // Region bounded for the proof (subject frame)\n bounds?: {\n min: Vec3;\n max: Vec3;\n }\n}\n\n// Axis-keyed numeric expectation used by high-level geometry matchers\nGeoSpecAxisExpectation: {\n x?: number\n y?: number\n z?: number\n}\n\n// Shared scalar expectation used by geometry measurements\nGeoSpecNumericExpectation: number | {\n value?: number;\n greaterThan?: number;\n greaterThanOrEqual?: number;\n lessThan?: number;\n lessThanOrEqual?: number;\n}\n\n// A pair-specific component-interference check accepted by `expectGeo(...).toHaveNoComponentInterference(...)`\nGeoSpecComponentInterferencePairExpectation: {\n left: GeoSpecComponentSelector\n right: GeoSpecComponentSelector\n}\n\n// Intentional component interference allowance accepted by `expectGeo(...).toHaveNoComponentInterference(...)`\nGeoSpecComponentInterferenceAllowance: {\n kind?: 'intentionalInterference'\n left: GeoSpecComponentSelector\n right: GeoSpecComponentSelector\n maxVolume?: number\n reason: string\n}\n\n// Assembly occurrence rule accepted by `expectGeo(...).toHaveAssemblyOccurrences(...)`\nGeoSpecAssemblyOccurrenceExpectation: {\n name: GeoSpecComponentSelector\n count?: GeoSpecNumericExpectation\n bounds?: {\n within?: GeoSpecComponentSelector;\n min?: Vec3 | GeoSpecAxisExpectation;\n max?: Vec3 | GeoSpecAxisExpectation;\n center?: GeoSpecPointExpectation;\n tolerance?: number;\n }\n}\n\n// One spatial relationship accepted by `expectGeo(...).toHaveSpatialRelationships(...)`\nGeoSpecSpatialRelationshipExpectation: {\n id?: string\n kind: 'contact' | 'clearance' | 'coaxial' | 'concentric' | 'coplanar' | 'parallel' | 'perpendicular' | 'angle' | 'containment' | 'insertion' | 'interference'\n subject: GeoSpecGeometrySelector\n target: GeoSpecGeometrySelector\n tolerance?: number\n angularToleranceDegrees?: number\n // Expected angle in degrees for `kind\n angleDegrees?: number\n // Declared insertion axis (subject-frame direction) for `kind\n axis?: Vec3\n min?: number\n max?: number\n minVolume?: number\n maxVolume?: number\n reason?: string\n}\n\n// Diagnostic emitted by GeoSpec loaders, analyzers, and matchers\nGeometryDiagnostic: {\n code: KernelIssueCode | (string & {})\n severity: 'error' | 'warning' | 'info'\n message: string\n suggestion?: string\n spatial?: {\n min?: Vec3;\n max?: Vec3;\n center?: Vec3;\n }\n details?: unknown\n}\n\n// Point expectation accepted by center and feature matchers\nGeoSpecPointExpectation: Vec3 | GeoSpecAxisExpectation\n\n// One void-continuity waypoint\nGeoSpecVoidWaypoint: Vec3 | {\n occurrence: string;\n}\n\n// Inline code-CAD model load options\nLoadModelCodeOptions: {\n // Source files keyed by project-relative path\n code: Code\n // Geometry format to export\n format?: GeoSpecModelFormat\n // Explicit parameters passed to the runtime\n parameters?: Record<string, unknown>\n // Whether STEP loading should also produce mesh evidence\n mesh?: boolean\n // … 10 more members in the API reference: file, rootDir, runtime, sourceAdapters, projectPath, stepStreaming, meshLinearTolerance, meshAngularToleranceDegrees, workUnitLimit, region\n}\n\nRuntimeBackedModelFormat: Exclude<GeoSpecModelFormat, 'mesh-buffer'>\n```\n\n## API reference\n\nTo read any other signature, find its name in `api-index.md`, which lists all 364 symbols by file with the lines that hold each, and read that range of the named file.\n\n- `api-functions.md` — Functions\n- `api-constants.md` — Constants\n- `api-types.md` — Types\n- `api-classes.md` — Classes\n\nRead ranges, not whole files. Never copy a reference into a source file.\n",
|
|
10
|
-
fingerprint: "
|
|
9
|
+
body: "---\nname: geospec-authoring\ndescription: Guides canonical GeoSpec geometry tests in TypeScript or JavaScript for every Tau kernel. Use for *.geospec.ts and *.geospec.js tests.\n---\n\n# GeoSpec authoring\n\nWrite tests before implementation; assert deterministic, measurable properties.\n\n## Test shape\n\n- Use `*.geospec.ts` or `*.geospec.js`. Import `describe`, `it` and `expectGeo` from `geospec`, and `loadModel` from `geospec/model`.\n- Await `loadModel`, then assert synchronously with `expectGeo(model)`. The host supplies the compiled binding; authoring does not select an engine.\n- Await or return the complete model-load chain from the test callback; detached future loads are not part of a completed test.\n- Omit `parameters` for model-code defaults; use `{ file, parameters }` for variants. Loaded subjects are opaque.\n- `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.\n\nCanonical TypeScript authoring:\n\n```ts\nimport { describe, expectGeo, it } from 'geospec';\nimport { loadModel } from 'geospec/model';\n\ndescribe('main geometry', () => {\n it('has the intended envelope', async () => {\n const model = await loadModel({ file: 'main.ts', parameters: { width: 120 } });\n expectGeo(model).toHaveBoundingBox({ size: { x: 120 }, tolerance: 1 });\n });\n});\n```\n\nSpecs 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.\n\nEvery matcher takes one expectation object:\n\n- Wrong: `expectGeo(model).toHaveVolume(5000, { tolerance: 5 })`. Correct: `expectGeo(model).toHaveVolume({ value: 5000, tolerance: 5 })`.\n- Wrong: `await expectGeo(model)…`. Correct: await `loadModel`, then assert synchronously.\n- 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`.\n\n## Loads and budgets\n\n- 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.\n- `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.\n- `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.\n- 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.\n- `toHaveCenterOfMass({ point, tolerance })` takes an exact point. Per-axis ranges such as `{ y: { greaterThan: 1 } }` are refused.\n\n## Ceilings\n\nFixed in this release; design within them, and report a claim that meets one as not decided.\n\n| Ceiling | Value | Where an agent meets it |\n| ------------------------------------- | -------------------- | --------------------------------------------------------------------------------------------------------------------------------- |\n| `maxSubjectBytes`, `maxResourceBytes` | 64 MiB each | A mesh `loadModel({ file })` exports about 72 bytes per triangle, so admission refuses near 930,000 triangles (`resource-limit`). |\n| `maxTotalBinaryBytes` | 128 MiB | All subjects of one load together. |\n| `maxTriangles`, `maxVertices` | 4,000,000, 2,000,000 | A decoded mesh. |\n| `continuousEvidenceBytes` | 32 MiB | `toHaveNoComponentInterference` on a large assembly (`analysis-limit`). |\n| `workUnitLimit` | 512000000 at most | Any claim; the only limit an argument raises. |\n\nLoad `format: 'step'` only for the exact-BRep matchers above; every other matcher answers on the cheaper mesh.\n\n## Coverage\n\nBounds 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.\n\n- `toHaveBoundingBox`: size/position.\n- `toHaveConnectedComponents`: qualified material connectivity; visual touching cannot justify tolerance changes.\n- `toBeWatertight`: closed edge incidence, not manifold validity, fusion or material connectivity. Bounds prove none of these. Missing evidence is unsupported.\n- `toHaveSurfaceArea`, `toHaveVolume`, `toHaveCenterOfMass`, `toHaveMass`: physical measurements.\n- `toHaveNoComponentInterference`: overlap; allow deliberate press fits.\n- `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.\n\nTest assemblies and independent units; preserve sibling coverage when adding files. Non-top-level geometry needs kernel export/invocation, not test removal.\n\nFix geometry at its root; never weaken tolerances, delete assertions, or reduce detail to pass.\n\n`public-api-index.md` covers the host and framework API; authoring needs only the Core API below and `api-*` files.\n\n## Core API\n\nThe symbols real Tau models use most, as verbatim declarations. Anything not shown is in the API reference below.\n\n### Functions\n\n```ts\n// Start a geometry assertion chain\nexport declare function expectGeo(subject: GeoSpecSubject, options?: GeoSpecExpectOptions): GeoSpecMatcher;\n\n// A model admitted by one live GeoSpec host scope\nGeoSpecSubject: {\n readonly [subjectBrand]: true\n}\n\n// Per-chain options accepted by `expectGeo(subject, options)`\nGeoSpecExpectOptions: {\n // Deterministic work-unit budget for every claim in this chain\n readonly workUnitLimit?: number\n}\n\n// Load a CAD model into GeoSpec evidence\nexport declare function loadModel<Code extends Record<string, string> = Record<string, string>>(_options: LoadModelOptions<Code>): Promise<GeoSpecSubject>;\n\n// Options accepted by {@link import ('./load-model.js').loadModel}\nLoadModelOptions: LoadModelSourceOptions | LoadModelCodeOptions<Code> | LoadModelFileOptions\n // Project-relative folder `file` resolves in, for a suite that loads from somewhere other than…\n rootDir?: string\n // Geometry format to export\n format?: GeoSpecModelFormat\n // Explicit parameters passed to the exporter\n parameters?: Record<string, unknown>\n // STEP reader strategy used for STEP exports\n stepStreaming?: StepStreamingMode\n // Whether STEP loading should also produce mesh evidence\n mesh?: boolean\n // Linear tolerance used while meshing exact BRep evidence\n meshLinearTolerance?: number\n // Angular tolerance in degrees used while meshing exact BRep evidence\n meshAngularToleranceDegrees?: number\n // Default work-unit budget for every claim on this subject\n workUnitLimit?: number\n\n// Geometry formats accepted by {@link import ('./load-model.js').loadModel}\nGeoSpecModelFormat: MeshFileFormat | 'step' | 'stp'\n\n// GeoSpec test helper used inside VM-executed test modules\nexport declare function it(name: string, function_: GeoSpecTestCallback): void;\n skip(name: string, function_?: GeoSpecTestCallback): void;\n\n// GeoSpec suite helper used inside VM-executed test modules\nexport declare function describe(name: string, function_: GeoSpecTestCallback): void;\n skip(name: string, function_?: GeoSpecTestCallback): void;\n\n// Alias for {@link it}\nexport declare function test(name: string, function_: GeoSpecTestCallback): void;\n skip(name: string, function_?: GeoSpecTestCallback): void;\n```\n\n### Types\n\n```ts\n// Assertion chain returned by `expectGeo(subject)`\nGeoSpecMatcher: {\n // Core-owned negation\n readonly not: Omit<GeoSpecMatcher, 'not'>\n // Assert the fixed rational plate contract\n toSatisfyRationalPlate(): GeoSpecAssertion;\n // Assert the fixed parallel-plane distance contract\n toSatisfyParallelPlaneDistance(): GeoSpecAssertion;\n // Assert axis-aligned bounds, size, or center for a loaded geometry subject\n toHaveBoundingBox(first: Vec3 | GeoSpecBoundingBoxExpectation, second?: Vec3): GeoSpecAssertion;\n // Assert how many spatially disjoint chunks the mesh contains\n toHaveConnectedComponents(expected: GeoSpecConnectedComponentsExpectation): GeoSpecAssertion;\n // Assert closed mesh edge incidence\n toBeWatertight(): GeoSpecAssertion;\n // Assert that separate assembly components do not occupy the same solid volume\n toHaveNoComponentInterference(expected?: GeoSpecComponentInterferenceExpectation): GeoSpecAssertion;\n // Assert that named assembly occurrences exist with expected counts and bounds\n toHaveAssemblyOccurrences(expected: GeoSpecAssemblyOccurrencesExpectation): GeoSpecAssertion;\n // Assert that selected entities satisfy declared spatial relationships\n toHaveSpatialRelationships(expected: GeoSpecSpatialRelationshipsExpectation): GeoSpecAssertion;\n // Assert rendered mesh evidence is internally trustworthy for downstream checks\n toHaveMeshIntegrity(expected: GeoSpecMeshIntegrityExpectation): GeoSpecAssertion;\n // Assert that the subject carries no diagnostics at the rejected severities\n toHaveNoDiagnostics(expected?: GeoSpecNoDiagnosticsExpectation): GeoSpecAssertion;\n // Assert total surface area, preferring exact BRep mass properties when available\n toHaveSurfaceArea(expected: GeoSpecSurfaceAreaExpectation): GeoSpecAssertion;\n // Assert enclosed volume, preferring exact BRep mass properties when available\n toHaveVolume(expected: GeoSpecVolumeExpectation): GeoSpecAssertion;\n // Assert mass derived from exact mass properties or volume times density\n toHaveMass(expected: GeoSpecMassExpectation): GeoSpecAssertion;\n // Assert the center of mass or mesh-derived centroid for a closed subject\n toHaveCenterOfMass(expected: GeoSpecCenterOfMassExpectation): GeoSpecAssertion;\n // Assert that exact BRep evidence reports a valid shape\n toBeValidBrep(expected?: GeoSpecValidBrepExpectation): GeoSpecAssertion;\n // Assert exact BRep topology counts\n toHaveTopologyCounts(expected: GeoSpecTopologyCountsExpectation): GeoSpecAssertion;\n // Assert the STEP unit evidence\n toHaveStepUnits(expected: GeoSpecStepUnitsExpectation): GeoSpecAssertion;\n // Assert STEP product-structure evidence\n toHaveProductStructure(expected: GeoSpecProductStructureExpectation): GeoSpecAssertion;\n // Assert that BRep evidence contains a planar face matching the requested constraints\n toHavePlanarFace(expected: GeoSpecPlanarFaceExpectation): GeoSpecAssertion;\n // Assert that BRep evidence contains a cylindrical face with the requested radius and axis\n toHaveCylindricalFace(expected: GeoSpecCylindricalFaceExpectation): GeoSpecAssertion;\n // Assert that BRep evidence contains a circular hole matching diameter, center, and axis\n toHaveCircularHole(expected: GeoSpecCircularHoleExpectation): GeoSpecAssertion;\n // Assert that BRep evidence contains a repeated circular-hole pattern\n toHaveCircularHolePattern(expected: GeoSpecCircularHolePatternExpectation): GeoSpecAssertion;\n // Assert that BRep evidence contains a chamfer feature with the requested distance\n toHaveChamferFeature(expected: GeoSpecChamferFeatureExpectation): GeoSpecAssertion;\n // Assert that BRep evidence contains a fillet feature with the requested radius\n toHaveFilletFeature(expected: GeoSpecFilletFeatureExpectation): GeoSpecAssertion;\n // Assert that BRep evidence reports a minimum wall thickness satisfying the expectation\n toHaveMinimumWallThickness(expected: GeoSpecMinimumWallThicknessExpectation): GeoSpecAssertion;\n // Assert that the declared waypoints share one connected void, stay isolated from the declared…\n toHaveVoidContinuity(expected: GeoSpecVoidContinuityExpectation): GeoSpecAssertion;\n}\n\n// Numeric 3D vector\nVec3: readonly [number, number, number]\n\n// Bounding-box expectation accepted by `expectGeo(...).toHaveBoundingBox(...)`\nGeoSpecBoundingBoxExpectation: {\n min?: Vec3 | Partial<Record<keyof GeoSpecAxisExpectation, GeoSpecNumericExpectation>>\n max?: Vec3 | Partial<Record<keyof GeoSpecAxisExpectation, GeoSpecNumericExpectation>>\n size?: Vec3 | Partial<Record<keyof GeoSpecAxisExpectation, GeoSpecNumericExpectation>>\n center?: Vec3 | Partial<Record<keyof GeoSpecAxisExpectation, GeoSpecNumericExpectation>>\n tolerance?: number\n}\n\n// Connected-components expectation accepted by `expectGeo(...).toHaveConnectedComponents(...)`\nGeoSpecConnectedComponentsExpectation: {\n count: number\n tolerance?: number\n toleranceMm?: number\n}\n\n// Component-interference expectation accepted by `expectGeo(...).toHaveNoComponentInterference(...)`\nGeoSpecComponentInterferenceExpectation: {\n tolerance?: number\n pairs?: GeoSpecComponentInterferencePairExpectation[]\n allowances?: GeoSpecComponentInterferenceAllowance[]\n}\n\n// Assembly occurrence expectation accepted by `expectGeo(...).toHaveAssemblyOccurrences(...)`\nGeoSpecAssemblyOccurrencesExpectation: {\n occurrences: GeoSpecAssemblyOccurrenceExpectation[]\n uniqueNames?: boolean\n}\n\n// Spatial relationship expectation accepted by `expectGeo(...).toHaveSpatialRelationships(...)`\nGeoSpecSpatialRelationshipsExpectation: {\n relationships: GeoSpecSpatialRelationshipExpectation[]\n}\n\n// Mesh integrity expectation accepted by `expectGeo(...).toHaveMeshIntegrity(...)`\nGeoSpecMeshIntegrityExpectation: {\n finitePositions?: boolean\n degenerateTriangles?: {\n count?: number;\n maxCount?: number;\n areaTolerance?: number;\n }\n duplicateFaces?: {\n count?: number;\n maxCount?: number;\n }\n watertight?: boolean\n triangleCount?: GeoSpecNumericExpectation\n}\n\n// Diagnostic severities rejected by `expectGeo(...).toHaveNoDiagnostics(...)`\nGeoSpecNoDiagnosticsExpectation: {\n severities?: Array<GeometryDiagnostic['severity']>\n}\n\n// Surface-area expectation accepted by `expectGeo(...).toHaveSurfaceArea(...)`\nGeoSpecSurfaceAreaExpectation: {\n value: number | GeoSpecNumericExpectation\n tolerance?: number\n}\n\n// Volume expectation accepted by `expectGeo(...).toHaveVolume(...)`\nGeoSpecVolumeExpectation: {\n value: number | GeoSpecNumericExpectation\n tolerance?: number\n}\n\n// Mass expectation accepted by `expectGeo(...).toHaveMass(...)`\nGeoSpecMassExpectation: {\n value: number | GeoSpecNumericExpectation\n density?: number\n tolerance?: number\n}\n\n// Center-of-mass expectation accepted by `expectGeo(...).toHaveCenterOfMass(...)`\nGeoSpecCenterOfMassExpectation: {\n // Exact expected point in millimetres\n point: GeoSpecPointExpectation\n tolerance?: number\n}\n\n// Exact BRep validity expectation accepted by `expectGeo(...).toBeValidBrep(...)`\nGeoSpecValidBrepExpectation: {\n maxTolerance?: number\n freeBounds?: {\n count?: GeoSpecNumericExpectation;\n }\n minEdgeLength?: number\n sameParameter?: boolean\n closedShells?: boolean\n closedWires?: boolean\n}\n\n// Topology-count expectation accepted by `expectGeo(...).toHaveTopologyCounts(...)`\nGeoSpecTopologyCountsExpectation: {\n vertices?: GeoSpecNumericExpectation\n edges?: GeoSpecNumericExpectation\n wires?: GeoSpecNumericExpectation\n faces?: GeoSpecNumericExpectation\n shells?: GeoSpecNumericExpectation\n solids?: GeoSpecNumericExpectation\n compounds?: GeoSpecNumericExpectation\n tolerance?: number\n}\n\n// STEP unit expectation accepted by `expectGeo(...).toHaveStepUnits(...)`\nGeoSpecStepUnitsExpectation: {\n unit: string\n}\n\n// Product-structure expectation accepted by `expectGeo(...).toHaveProductStructure(...)`\nGeoSpecProductStructureExpectation: {\n names?: string[]\n count?: GeoSpecNumericExpectation\n}\n\n// Planar-face expectation accepted by `expectGeo(...).toHavePlanarFace(...)`\nGeoSpecPlanarFaceExpectation: {\n normal: GeoSpecPointExpectation\n offset: number\n area?: GeoSpecNumericExpectation\n tolerance?: number\n}\n\n// Cylindrical-face expectation accepted by `expectGeo(...).toHaveCylindricalFace(...)`\nGeoSpecCylindricalFaceExpectation: {\n radius: number\n axis: 'x' | 'y' | 'z'\n tolerance?: number\n}\n\n// Circular-hole expectation accepted by `expectGeo(...).toHaveCircularHole(...)`\nGeoSpecCircularHoleExpectation: {\n diameter: number\n through?: boolean\n axis?: 'x' | 'y' | 'z'\n center?: GeoSpecPointExpectation\n tolerance?: number\n}\n\n// Circular-hole-pattern expectation accepted by `expectGeo(...).toHaveCircularHolePattern(...)`\nGeoSpecCircularHolePatternExpectation: {\n count: number\n holeDiameter: number\n boltCircleDiameter?: number\n axis?: 'x' | 'y' | 'z'\n center?: GeoSpecPointExpectation\n tolerance?: number\n}\n\n// Chamfer-feature expectation accepted by `expectGeo(...).toHaveChamferFeature(...)`\nGeoSpecChamferFeatureExpectation: {\n distance: number\n selection?: string\n tolerance?: number\n}\n\n// Fillet-feature expectation accepted by `expectGeo(...).toHaveFilletFeature(...)`\nGeoSpecFilletFeatureExpectation: {\n radius: number\n selection?: string\n tolerance?: number\n}\n\n// Minimum-wall-thickness expectation accepted by `expectGeo(...).toHaveMinimumWallThickness(...)`\nGeoSpecMinimumWallThicknessExpectation: {\n value: GeoSpecNumericExpectation\n tolerance?: number\n}\n\n// Void-continuity expectation accepted by `expectGeo(...).toHaveVoidContinuity(...)`\nGeoSpecVoidContinuityExpectation: {\n // Ordered waypoints (>= 1) known to lie in the void being proven\n path: GeoSpecVoidWaypoint[]\n // Occurrence names whose solids bound the void\n material?: string[]\n // Minimum required bottleneck cross-section (mm²), sampled\n minCrossSection?: number\n // Points that must NOT be reachable from the path void (isolation claim)\n isolatedFrom?: Vec3[]\n // Region bounded for the proof (subject frame)\n bounds?: {\n min: Vec3;\n max: Vec3;\n }\n}\n\n// Axis-keyed numeric expectation used by high-level geometry matchers\nGeoSpecAxisExpectation: {\n x?: number\n y?: number\n z?: number\n}\n\n// Shared scalar expectation used by geometry measurements\nGeoSpecNumericExpectation: number | {\n value?: number;\n greaterThan?: number;\n greaterThanOrEqual?: number;\n lessThan?: number;\n lessThanOrEqual?: number;\n}\n\n// A pair-specific component-interference check accepted by `expectGeo(...).toHaveNoComponentInterference(...)`\nGeoSpecComponentInterferencePairExpectation: {\n left: GeoSpecComponentSelector\n right: GeoSpecComponentSelector\n}\n\n// Intentional component interference allowance accepted by `expectGeo(...).toHaveNoComponentInterference(...)`\nGeoSpecComponentInterferenceAllowance: {\n kind?: 'intentionalInterference'\n left: GeoSpecComponentSelector\n right: GeoSpecComponentSelector\n maxVolume?: number\n reason: string\n}\n\n// Assembly occurrence rule accepted by `expectGeo(...).toHaveAssemblyOccurrences(...)`\nGeoSpecAssemblyOccurrenceExpectation: {\n name: GeoSpecComponentSelector\n count?: GeoSpecNumericExpectation\n bounds?: {\n within?: GeoSpecComponentSelector;\n min?: Vec3 | GeoSpecAxisExpectation;\n max?: Vec3 | GeoSpecAxisExpectation;\n center?: GeoSpecPointExpectation;\n tolerance?: number;\n }\n}\n\n// One spatial relationship accepted by `expectGeo(...).toHaveSpatialRelationships(...)`\nGeoSpecSpatialRelationshipExpectation: {\n id?: string\n kind: 'contact' | 'clearance' | 'coaxial' | 'concentric' | 'coplanar' | 'parallel' | 'perpendicular' | 'angle' | 'containment' | 'insertion' | 'interference'\n subject: GeoSpecGeometrySelector\n target: GeoSpecGeometrySelector\n tolerance?: number\n angularToleranceDegrees?: number\n // Expected angle in degrees for `kind\n angleDegrees?: number\n // Declared insertion axis (subject-frame direction) for `kind\n axis?: Vec3\n min?: number\n max?: number\n minVolume?: number\n maxVolume?: number\n reason?: string\n}\n\n// Diagnostic emitted by GeoSpec loaders, analyzers, and matchers\nGeometryDiagnostic: {\n code: KernelIssueCode | (string & {})\n severity: 'error' | 'warning' | 'info'\n message: string\n suggestion?: string\n spatial?: {\n min?: Vec3;\n max?: Vec3;\n center?: Vec3;\n }\n details?: unknown\n}\n\n// Point expectation accepted by center and feature matchers\nGeoSpecPointExpectation: Vec3 | GeoSpecAxisExpectation\n\n// One void-continuity waypoint\nGeoSpecVoidWaypoint: Vec3 | {\n occurrence: string;\n}\n\n// Direct geometry-source model load options\nLoadModelSourceOptions: {\n // Source geometry format\n format?: GeoSpecModelFormat\n // Explicit parameters recorded in provenance\n parameters?: Record<string, unknown>\n // Whether STEP loading should also produce mesh evidence\n mesh?: boolean\n // … 10 more members in the API reference: source, resources, rootDir, path, name, sourceUnit, stepStreaming, meshLinearTolerance, meshAngularToleranceDegrees, workUnitLimit\n}\n```\n\n## API reference\n\nTo 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.\n\n- `api-functions.md` — Functions\n- `api-constants.md` — Constants\n- `api-types.md` — Types\n- `api-types-2.md` — Types (2)\n- `api-classes.md` — Classes\n\nRead ranges, not whole files. Never copy a reference into a source file.\n",
|
|
10
|
+
fingerprint: "5e704f16193aa6d01335dee5374f0fec90037d4651613996896c78d3a2e303ff",
|
|
11
11
|
files: Object.freeze([
|
|
12
|
-
Object.freeze({ path: "SKILL.md", url: new URL("./geospec-authoring/SKILL.md", import.meta.url).href, byteLength:
|
|
13
|
-
Object.freeze({ path: "api-index.md", url: new URL("./geospec-authoring/api-index.md", import.meta.url).href, byteLength:
|
|
14
|
-
Object.freeze({ path: "api-functions.md", url: new URL("./geospec-authoring/api-functions.md", import.meta.url).href, byteLength:
|
|
12
|
+
Object.freeze({ path: "SKILL.md", url: new URL("./geospec-authoring/SKILL.md", import.meta.url).href, byteLength: 23657, lineCount: 497, contentKind: 'text', mediaType: 'text/markdown', sha256: "484351daa87c73bc14adbe04ee2ffc961b3c28fd388658cd2174e89d884fea5b" }),
|
|
13
|
+
Object.freeze({ path: "api-index.md", url: new URL("./geospec-authoring/api-index.md", import.meta.url).href, byteLength: 30670, lineCount: 389, contentKind: 'text', mediaType: 'text/markdown', sha256: "3b5405c4c680c1e5d97f519f59c00683ab9702adc17be9f518426674469734e9" }),
|
|
14
|
+
Object.freeze({ path: "api-functions.md", url: new URL("./geospec-authoring/api-functions.md", import.meta.url).href, byteLength: 1946, lineCount: 43, contentKind: 'text', mediaType: 'text/markdown', sha256: "b8c0ce6fb9a274b59795b7ca4254d68296cd04d6c7e8124d21f74feb071e960b" }),
|
|
15
15
|
Object.freeze({ path: "api-constants.md", url: new URL("./geospec-authoring/api-constants.md", import.meta.url).href, byteLength: 1057, lineCount: 17, contentKind: 'text', mediaType: 'text/markdown', sha256: "42c29ab127efb592c0cd7c4d2024d6e2aea8315bec78e476f972166c1b8c1c6b" }),
|
|
16
|
-
Object.freeze({ path: "api-types.md", url: new URL("./geospec-authoring/api-types.md", import.meta.url).href, byteLength:
|
|
16
|
+
Object.freeze({ path: "api-types.md", url: new URL("./geospec-authoring/api-types.md", import.meta.url).href, byteLength: 59196, lineCount: 1755, contentKind: 'text', mediaType: 'text/markdown', sha256: "5a7248985515201bb7029f89f7373b1de74f65078a01c6119e526582b4f64085" }),
|
|
17
|
+
Object.freeze({ path: "api-types-2.md", url: new URL("./geospec-authoring/api-types-2.md", import.meta.url).href, byteLength: 3210, lineCount: 86, contentKind: 'text', mediaType: 'text/markdown', sha256: "6d75581152c13419ec617081b0b7cd87abd1ffbaf4e8c5567cb3b225a7d35e04" }),
|
|
17
18
|
Object.freeze({ path: "api-classes.md", url: new URL("./geospec-authoring/api-classes.md", import.meta.url).href, byteLength: 550, lineCount: 14, contentKind: 'text', mediaType: 'text/markdown', sha256: "d34a48498cfd33aca05e2c5c1059ca3e2d1bec86046fbc75928d16b375fcae30" }),
|
|
18
|
-
Object.freeze({ path: "public-api-index.md", url: new URL("./geospec-authoring/public-api-index.md", import.meta.url).href, byteLength:
|
|
19
|
-
Object.freeze({ path: "public-api-functions.md", url: new URL("./geospec-authoring/public-api-functions.md", import.meta.url).href, byteLength:
|
|
19
|
+
Object.freeze({ path: "public-api-index.md", url: new URL("./geospec-authoring/public-api-index.md", import.meta.url).href, byteLength: 73854, lineCount: 951, contentKind: 'text', mediaType: 'text/markdown', sha256: "ce02af19387c7de09717c6754d4fc17ef6429c509ef803493a2866e28d39b66f" }),
|
|
20
|
+
Object.freeze({ path: "public-api-functions.md", url: new URL("./geospec-authoring/public-api-functions.md", import.meta.url).href, byteLength: 15034, lineCount: 264, contentKind: 'text', mediaType: 'text/markdown', sha256: "d24f96454d432789ebff1b73278e790a25df6cd7db87f407f0e6ca7fa3a26d88" }),
|
|
20
21
|
Object.freeze({ path: "public-api-constants.md", url: new URL("./geospec-authoring/public-api-constants.md", import.meta.url).href, byteLength: 2521, lineCount: 52, contentKind: 'text', mediaType: 'text/markdown', sha256: "8d7ecd06cd47616d81d6b5ad0315eee3cb1ed980d6527d6e2edf40c44231d871" }),
|
|
21
|
-
Object.freeze({ path: "public-api-types.md", url: new URL("./geospec-authoring/public-api-types.md", import.meta.url).href, byteLength:
|
|
22
|
-
Object.freeze({ path: "public-api-types-2.md", url: new URL("./geospec-authoring/public-api-types-2.md", import.meta.url).href, byteLength:
|
|
23
|
-
Object.freeze({ path: "public-api-types-3.md", url: new URL("./geospec-authoring/public-api-types-3.md", import.meta.url).href, byteLength:
|
|
22
|
+
Object.freeze({ path: "public-api-types.md", url: new URL("./geospec-authoring/public-api-types.md", import.meta.url).href, byteLength: 63658, lineCount: 2060, contentKind: 'text', mediaType: 'text/markdown', sha256: "f80b75d3f3b7edca2245e3d549030125477f8ba404875ee8e4a7b9edf90c18f4" }),
|
|
23
|
+
Object.freeze({ path: "public-api-types-2.md", url: new URL("./geospec-authoring/public-api-types-2.md", import.meta.url).href, byteLength: 53802, lineCount: 1422, contentKind: 'text', mediaType: 'text/markdown', sha256: "69965c3798878d951f1c52224e6e26712f8d4dbd88e4e911ca6ccd70a6bcd8b6" }),
|
|
24
|
+
Object.freeze({ path: "public-api-types-3.md", url: new URL("./geospec-authoring/public-api-types-3.md", import.meta.url).href, byteLength: 18307, lineCount: 575, contentKind: 'text', mediaType: 'text/markdown', sha256: "e241bc2a741661c4f12698f0a351336999f7526a15bb5e117ab45ce4c34b254a" }),
|
|
24
25
|
Object.freeze({ path: "public-api-classes.md", url: new URL("./geospec-authoring/public-api-classes.md", import.meta.url).href, byteLength: 1024, lineCount: 23, contentKind: 'text', mediaType: 'text/markdown', sha256: "569639b75b3a3fae86e3bcbe3dc61a746ddd67cb4dec7ccb6374556d419d02a9" })
|
|
25
26
|
]),
|
|
26
27
|
}),
|