geospec 0.1.0-beta.7 → 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.
- package/agent/geospec-authoring/SKILL.md +11 -11
- package/agent/geospec-authoring/api-functions.md +1 -16
- package/agent/geospec-authoring/api-index.md +50 -46
- package/agent/geospec-authoring/api-types.md +188 -168
- package/agent/geospec-authoring/public-api-functions.md +29 -22
- package/agent/geospec-authoring/public-api-index.md +196 -183
- package/agent/geospec-authoring/public-api-types-2.md +188 -220
- package/agent/geospec-authoring/public-api-types-3.md +112 -99
- package/agent/geospec-authoring/public-api-types.md +236 -125
- package/agent/resources.js +12 -12
- package/agent/skills.json +2 -2
- package/dist/config/index.d.mts +1 -2
- package/dist/config/index.mjs +1 -1
- package/dist/config/types.d.mts +0 -3
- package/dist/config/validate.mjs +1 -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 +31 -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/node/index.d.mts +2 -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/pool/events.mjs +1 -0
- package/dist/runner/pool/pool-messages.d.mts +0 -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 +1 -1
- package/dist/runner/types.d.mts +0 -4
- 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 +14 -4
- 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,117 @@
|
|
|
1
1
|
# geospec — Types (3)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
17 top-level symbols. Signatures are verbatim typescript.
|
|
4
|
+
|
|
5
|
+
// One ordered role reference, including incomplete source/transfer evidence
|
|
6
|
+
GeoSpecPmiShapeReference: {
|
|
7
|
+
readonly sourceAspectId: number | null;
|
|
8
|
+
readonly sourceUsageIds: readonly number[];
|
|
9
|
+
readonly sourceItemIds: readonly number[];
|
|
10
|
+
readonly requestedRoute: GeoSpecPmiField<readonly number[]>;
|
|
11
|
+
readonly associations: GeoSpecPmiField<readonly GeoSpecPmiFaceAssociation[]>;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
readonly sourceAspectId: number | null
|
|
15
|
+
|
|
16
|
+
readonly sourceUsageIds: readonly number[]
|
|
17
|
+
|
|
18
|
+
readonly sourceItemIds: readonly number[]
|
|
19
|
+
|
|
20
|
+
readonly requestedRoute: GeoSpecPmiField<readonly number[]>
|
|
21
|
+
|
|
22
|
+
readonly associations: GeoSpecPmiField<readonly GeoSpecPmiFaceAssociation[]>
|
|
23
|
+
|
|
24
|
+
// Normalized authored limits
|
|
25
|
+
GeoSpecPmiLimits: {
|
|
26
|
+
readonly lowerMillimetres: string;
|
|
27
|
+
readonly upperMillimetres: string;
|
|
28
|
+
readonly basis: 'authored-limits' | 'nominal-plus-minus';
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
readonly lowerMillimetres: string
|
|
32
|
+
|
|
33
|
+
readonly upperMillimetres: string
|
|
34
|
+
|
|
35
|
+
readonly basis: 'authored-limits' | 'nominal-plus-minus'
|
|
36
|
+
|
|
37
|
+
// Source record preserving semantic/presentation separation and ordered roles
|
|
38
|
+
GeoSpecPmiRecord: {
|
|
39
|
+
readonly sourceId: number;
|
|
40
|
+
readonly family: 'dimension' | 'datum' | 'tolerance' | 'presentation';
|
|
41
|
+
readonly channel: 'semantic' | 'presentation';
|
|
42
|
+
readonly kind: string;
|
|
43
|
+
readonly name: GeoSpecPmiField<string>;
|
|
44
|
+
readonly first: readonly GeoSpecPmiShapeReference[];
|
|
45
|
+
readonly second: readonly GeoSpecPmiShapeReference[];
|
|
46
|
+
readonly numbers: GeoSpecPmiField<readonly GeoSpecPmiNumber[]>;
|
|
47
|
+
readonly limits: GeoSpecPmiField<GeoSpecPmiLimits>;
|
|
48
|
+
readonly interpretation: GeoSpecPmiField<string>;
|
|
49
|
+
readonly raw: readonly GeoSpecPmiRawEntity[];
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
readonly sourceId: number
|
|
53
|
+
|
|
54
|
+
readonly family: 'dimension' | 'datum' | 'tolerance' | 'presentation'
|
|
55
|
+
|
|
56
|
+
readonly channel: 'semantic' | 'presentation'
|
|
57
|
+
|
|
58
|
+
readonly kind: string
|
|
59
|
+
|
|
60
|
+
readonly name: GeoSpecPmiField<string>
|
|
61
|
+
|
|
62
|
+
readonly first: readonly GeoSpecPmiShapeReference[]
|
|
63
|
+
|
|
64
|
+
readonly second: readonly GeoSpecPmiShapeReference[]
|
|
65
|
+
|
|
66
|
+
readonly numbers: GeoSpecPmiField<readonly GeoSpecPmiNumber[]>
|
|
67
|
+
|
|
68
|
+
readonly limits: GeoSpecPmiField<GeoSpecPmiLimits>
|
|
69
|
+
|
|
70
|
+
readonly interpretation: GeoSpecPmiField<string>
|
|
71
|
+
|
|
72
|
+
readonly raw: readonly GeoSpecPmiRawEntity[]
|
|
73
|
+
|
|
74
|
+
// Positive-only inventory value inside the ordinary canonical query report
|
|
75
|
+
GeoSpecPmiInventory: {
|
|
76
|
+
readonly contract: 'geospec.pmi.inventory/v1';
|
|
77
|
+
readonly status: 'semantic' | 'graphical-only' | 'empty';
|
|
78
|
+
readonly fileSchema: string;
|
|
79
|
+
readonly editionValidation: 'not-validated';
|
|
80
|
+
readonly records: readonly GeoSpecPmiRecord[];
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
readonly contract: 'geospec.pmi.inventory/v1'
|
|
84
|
+
|
|
85
|
+
readonly status: 'semantic' | 'graphical-only' | 'empty'
|
|
86
|
+
|
|
87
|
+
readonly fileSchema: string
|
|
88
|
+
|
|
89
|
+
readonly editionValidation: 'not-validated'
|
|
90
|
+
|
|
91
|
+
readonly records: readonly GeoSpecPmiRecord[]
|
|
92
|
+
|
|
93
|
+
// Strict inventory output limits
|
|
94
|
+
GeoSpecPmiQueryPayload: {
|
|
95
|
+
readonly maxRecords?: number;
|
|
96
|
+
readonly maxOutputBytes?: number;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
readonly maxRecords?: number
|
|
100
|
+
|
|
101
|
+
readonly maxOutputBytes?: number
|
|
102
|
+
|
|
103
|
+
// Complete inventory value
|
|
104
|
+
GeoSpecPmiQueryValue: {
|
|
105
|
+
readonly inventory: GeoSpecPmiInventory;
|
|
106
|
+
readonly subjectHash: string;
|
|
107
|
+
readonly provenance: Readonly<Record<string, unknown>>;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
readonly inventory: GeoSpecPmiInventory
|
|
111
|
+
|
|
112
|
+
readonly subjectHash: string
|
|
113
|
+
|
|
114
|
+
readonly provenance: Readonly<Record<string, unknown>>
|
|
4
115
|
|
|
5
116
|
// Full native assertion result with the exact core-owned bytes retained
|
|
6
117
|
GeoSpecCanonicalClaimReport: {
|
|
@@ -100,96 +211,6 @@ GeoSpecVitestAdapter: {
|
|
|
100
211
|
// GeoSpecVitestAdapter.flush (method)
|
|
101
212
|
flush(): Promise<void>;
|
|
102
213
|
|
|
103
|
-
// Input for exporting one validated Tau project descriptor
|
|
104
|
-
ExportTauProjectArtifactOptions: {
|
|
105
|
-
readonly descriptor: GeoSpecTauProjectDescriptor;
|
|
106
|
-
/** Called twice so source discovery and export use separate runtime lifetimes. */
|
|
107
|
-
readonly createRuntime: () => GeoSpecTauProjectRuntime | Promise<GeoSpecTauProjectRuntime>;
|
|
108
|
-
readonly signal?: AbortSignal;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
readonly descriptor: GeoSpecTauProjectDescriptor
|
|
112
|
-
|
|
113
|
-
// Called twice so source discovery and export use separate runtime lifetimes
|
|
114
|
-
readonly createRuntime: () => GeoSpecTauProjectRuntime | Promise<GeoSpecTauProjectRuntime>
|
|
115
|
-
|
|
116
|
-
readonly signal?: AbortSignal
|
|
117
|
-
|
|
118
|
-
// Finalized geometry bytes and the exact source/export metadata that produced them
|
|
119
|
-
GeoSpecTauProjectArtifact: {
|
|
120
|
-
readonly format: 'step' | 'glb';
|
|
121
|
-
readonly name: string;
|
|
122
|
-
readonly mimeType: string;
|
|
123
|
-
readonly bytes: Uint8Array<ArrayBuffer>;
|
|
124
|
-
readonly frame: {
|
|
125
|
-
readonly coordinateSystem: 'z-up';
|
|
126
|
-
readonly lengthUnit: 'millimeter';
|
|
127
|
-
readonly sourceUnit: 'mm';
|
|
128
|
-
};
|
|
129
|
-
readonly source: {
|
|
130
|
-
readonly manifestPath: string;
|
|
131
|
-
readonly manifestBytes: Uint8Array<ArrayBuffer>;
|
|
132
|
-
readonly manifest: ProjectManifest;
|
|
133
|
-
readonly projectEntryPath: string;
|
|
134
|
-
readonly entryPath: string;
|
|
135
|
-
readonly kernelId: string;
|
|
136
|
-
readonly files: readonly RuntimeSourceSnapshotFile[];
|
|
137
|
-
};
|
|
138
|
-
readonly export: {
|
|
139
|
-
readonly options: Readonly<Record<string, unknown>>;
|
|
140
|
-
readonly route: NonNullable<GeometryExportIntent['route']>;
|
|
141
|
-
};
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
readonly format: 'step' | 'glb'
|
|
145
|
-
|
|
146
|
-
readonly name: string
|
|
147
|
-
|
|
148
|
-
readonly mimeType: string
|
|
149
|
-
|
|
150
|
-
readonly bytes: Uint8Array<ArrayBuffer>
|
|
151
|
-
|
|
152
|
-
readonly frame: {
|
|
153
|
-
readonly coordinateSystem: 'z-up';
|
|
154
|
-
readonly lengthUnit: 'millimeter';
|
|
155
|
-
readonly sourceUnit: 'mm';
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
readonly source: {
|
|
159
|
-
readonly manifestPath: string;
|
|
160
|
-
readonly manifestBytes: Uint8Array<ArrayBuffer>;
|
|
161
|
-
readonly manifest: ProjectManifest;
|
|
162
|
-
readonly projectEntryPath: string;
|
|
163
|
-
readonly entryPath: string;
|
|
164
|
-
readonly kernelId: string;
|
|
165
|
-
readonly files: readonly RuntimeSourceSnapshotFile[];
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
readonly export: {
|
|
169
|
-
readonly options: Readonly<Record<string, unknown>>;
|
|
170
|
-
readonly route: NonNullable<GeometryExportIntent['route']>;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
// Runtime surface required to snapshot and export one Tau project
|
|
174
|
-
GeoSpecTauProjectRuntime: RuntimeClientWithRoutes & Pick<RuntimeClient, 'shutdown' | 'snapshotSource'>
|
|
175
|
-
|
|
176
|
-
open: (input: Pick<Parameters<RuntimeClient['open']>[0], 'source' | 'parameters' | 'stage' | 'watch' | 'signal'>) => Pick<ReturnType<RuntimeClient['open']>, 'export' | 'close'>
|
|
177
|
-
|
|
178
|
-
// GeoSpecTauProjectRuntime.on (method)
|
|
179
|
-
on?(event: 'telemetry', handler: (batch: {
|
|
180
|
-
readonly entries: ReadonlyArray<{
|
|
181
|
-
name: string;
|
|
182
|
-
duration: number;
|
|
183
|
-
startTime: number;
|
|
184
|
-
workerTimeOrigin: number;
|
|
185
|
-
}>;
|
|
186
|
-
}) => void): () => void;
|
|
187
|
-
|
|
188
|
-
// GeoSpecTauProjectRuntime.bestRouteFor (method)
|
|
189
|
-
bestRouteFor(format: string, options?: {
|
|
190
|
-
readonly kernelId?: string;
|
|
191
|
-
}): GeoSpecExportRoute | undefined;
|
|
192
|
-
|
|
193
214
|
// Trusted project configuration using existing discovery and runner options
|
|
194
215
|
// Remarks: Omitted values keep their existing owner's defaults. Defined overrides replace whole fields, including empty arrays, false and the subjects map. Existing discovery currently treats an absent or empty include array as its default pattern. Preserving [] here does not change that consumer behavior. This is configuration data, not a canonical engine plan or a geometry result.
|
|
195
216
|
GeoSpecConfig: {
|
|
@@ -198,10 +219,7 @@ GeoSpecConfig: {
|
|
|
198
219
|
testNamePattern?: string;
|
|
199
220
|
/** Positive finite milliseconds; the runner owns its default. */
|
|
200
221
|
testTimeout?: number;
|
|
201
|
-
/** Positive finite milliseconds; does not define a geometry verdict. */
|
|
202
|
-
matcherWallBackstop?: number;
|
|
203
222
|
bail?: boolean;
|
|
204
|
-
forensic?: boolean;
|
|
205
223
|
cache?: boolean;
|
|
206
224
|
/** Requested cache location only; loading configuration creates no store. */
|
|
207
225
|
cacheDirectory?: string;
|
|
@@ -217,13 +235,8 @@ GeoSpecConfig: {
|
|
|
217
235
|
// Positive finite milliseconds
|
|
218
236
|
testTimeout?: number
|
|
219
237
|
|
|
220
|
-
// Positive finite milliseconds
|
|
221
|
-
matcherWallBackstop?: number
|
|
222
|
-
|
|
223
238
|
bail?: boolean
|
|
224
239
|
|
|
225
|
-
forensic?: boolean
|
|
226
|
-
|
|
227
240
|
cache?: boolean
|
|
228
241
|
|
|
229
242
|
// Requested cache location only
|
|
@@ -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: {
|
|
@@ -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
|
+
}>
|