feat: add candidate FreeCAD naming SDK and attachment oracles
Some checks failed
real-verification / chrome (push) Has been cancelled
real-verification / freecad-oracle (push) Has been cancelled
real-verification / wasm (push) Has been cancelled

Build and verify the candidate-only FreeCAD naming bridge and OCCT worker path, including three-stage StringHasher restoration. Add Datum, ShapeBinder, attachment-mode, and PartDesign structure oracles plus offline SDK build plans and CI boundary checks.
This commit is contained in:
2026-08-13 17:16:07 -04:00
parent 58c0807219
commit f97eae4153
79 changed files with 7936 additions and 77 deletions

View File

@@ -33,6 +33,12 @@ export type NativeFreeCadNamingAbiModule = {
freecadNamingEvidenceJson?(requestJson: string): string
}
type FreeCadPrivateNamingAbiError = {
schemaVersion: 1
status: 'error'
error: string
}
export type FreeCadPrivateNamingAbiRequest = {
schemaVersion: 1
requestId: string
@@ -124,7 +130,12 @@ export const captureFreeCadPrivateNamingEvidence = (
const responseBytes = encoder.encode(responseJson).byteLength
const responseLimit = boundedLimit(probe.descriptor.maxResponseBytes, FREECAD_PRIVATE_NAMING_MAX_RESPONSE_BYTES)
if (responseBytes > responseLimit) throw new RangeError(`FreeCAD naming ABI response exceeds ${responseLimit} bytes.`)
const evidence = assertNativeNamingEvidence(JSON.parse(responseJson) as NativeStageNamingEvidence)
const parsed = JSON.parse(responseJson) as NativeStageNamingEvidence | FreeCadPrivateNamingAbiError
if (parsed && parsed.status === 'error') {
if (parsed.schemaVersion !== FREECAD_PRIVATE_NAMING_ABI_VERSION || typeof parsed.error !== 'string' || !parsed.error.trim()) throw new TypeError('FreeCAD naming ABI returned a malformed error response.')
throw new Error(`FreeCAD naming ABI failed: ${parsed.error}`)
}
const evidence = assertNativeNamingEvidence(parsed)
if (evidence.stageId !== request.stageId || evidence.resultObjectId !== request.resultObjectId) throw new RangeError('FreeCAD naming ABI response does not match its stage and result object context.')
if (evidence.status !== 'native-evidence' && evidence.status !== 'ambiguous') throw new TypeError(`FreeCAD naming ABI cannot return non-native status '${evidence.status}'.`)
if (!evidence.stringHasher || !evidence.elementMap2) throw new TypeError('FreeCAD naming ABI response requires both StringHasher and ElementMap2 evidence.')