geospec 0.1.0-beta.6 → 0.1.0-beta.7

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.
@@ -1 +1 @@
1
- import{geoSpecAuthoredWorkUnitLimitProblem as e,resolveGeoSpecMaximumWorkUnitLimit as t}from"../engine/client.mjs";import{bindRawSubjectResidency as n}from"./subject.mjs";import{GeoSpecModelLoadError as r}from"./errors.mjs";import{resolveRuntimeExportIntent as i}from"./export-intent.mjs";import{sha256Bytes as a}from"@taucad/runtime/kernel";const o={canonicalProfile:`geospec-jcs-v1`,protocolVersion:3,registryVersion:5},s=new TextEncoder,c=new TextDecoder(`utf-8`,{fatal:!0}),l=new Set([`glb`,`step`,`stp`]),u=new WeakMap,d=16777216,f=e=>e instanceof Error&&`code`in e&&e.code===`limit-exceeded`&&e.message===`Engine exceeds the configured retained subject count.`,p=e=>{let t=u.get(e);if(t!==void 0)return t;let n=y(e.processRequest(_({...o,method:`initialize`,requestId:`configuration`})),`initialize response`),r=v(n.result,`initialize result`);if(n.requestId!==`configuration`||r.protocolVersion!==3||r.registryVersion!==5||r.canonicalProfile!==`geospec-jcs-v1`)throw TypeError(`Native GeoSpec residency requires a compatible initialize profile.`);let i=v(r.configuration,`initialize configuration`),a=v(i.binaryAdmissionLimits,`binary admission limits`),s=[a.maxSubjectBytes,a.maxTotalBinaryBytes].map(e=>{if(typeof e!=`number`||!Number.isSafeInteger(e)||e<=0)throw TypeError(`Native GeoSpec residency requires safe positive binary admission limits.`);return e}),c={inputs:new Map,resident:new Map,binaryLimit:Math.max(...s),binaryBytes:0,descriptorBytes:0};return u.set(e,c),c},m=e=>new r(e),h=e=>({code:e.code,severity:`error`,message:e.message,suggestion:e.suggestion,...e.details===void 0?{}:{details:e.details}}),g=e=>({code:e.code,severity:e.severity,message:e.message,suggestion:`Fix the model source or its Runtime export route, then retry the native run.`}),_=e=>s.encode(JSON.stringify(e)),v=(e,t)=>{if(typeof e!=`object`||!e||Array.isArray(e))throw TypeError(`Native GeoSpec returned a non-object ${t}.`);return e},y=(e,t)=>v(JSON.parse(c.decode(e)),t),b=async(e,t)=>{if(e instanceof Uint8Array)return Uint8Array.from(e);if(e instanceof ArrayBuffer)return Uint8Array.from(new Uint8Array(e));if(typeof Blob<`u`&&e instanceof Blob)return new Uint8Array(await e.arrayBuffer());if(t!==void 0)try{return await t(e)}catch(t){throw m([h({code:`GEOSPEC_NATIVE_SOURCE_READ_FAILED`,message:`The host source reader could not read ${typeof e==`string`?e:`this source`}: ${t instanceof Error?t.message:String(t)}`,suggestion:`Check that the source exists at a project-rooted path and is readable, then retry the load.`,...typeof e==`string`?{details:{source:e}}:{}})])}throw m([h({code:`GEOSPEC_NATIVE_SOURCE_READER_UNAVAILABLE`,message:`The native model loader cannot read this source form without a host source reader.`,suggestion:`Pass in-memory bytes or configure readSource on createGeoSpecNativeModelLoader().`})])},x=e=>`code`in e?{files:e.code,entry:e.file}:{path:e.file},S=(e,t)=>{let n=e.format??t??`glb`;if(!l.has(n))throw m([h({code:`GEOSPEC_NATIVE_MODEL_FORMAT_UNSUPPORTED`,message:`The native model host does not admit '${n}' models.`,suggestion:`Use 'step', 'stp', or 'glb' for native model assertions.`,details:{format:n}})]);return n},C=(e,t)=>{let{routesFor:n,bestRouteFor:r}=e;if(typeof n==`function`)return n.call(e,t);let i=typeof r==`function`?r.call(e,t):void 0;return i===void 0?[]:[i]},w=async(e,t)=>{if(typeof e.describe==`function`)try{let{kernelId:n}=await e.describe({source:x(t)});return typeof n==`string`&&n.length>0?n:void 0}catch{return}},T=e=>{if(e===null||typeof e==`boolean`||typeof e==`string`)return JSON.stringify(e);if(typeof e==`number`)return Number.isFinite(e)?JSON.stringify(e):void 0;if(Array.isArray(e)){let t=e.map(e=>T(e));return t.includes(void 0)?void 0:`[${t.join(`,`)}]`}if(typeof e==`object`&&Object.getPrototypeOf(e)===Object.prototype){let t=Object.entries(e).filter(([,e])=>e!==void 0).sort(([e],[t])=>e<t?-1:1).map(([e,t])=>[e,T(t)]);return t.some(([,e])=>e===void 0)?void 0:`{${t.map(([e,t])=>`${JSON.stringify(e)}:${t}`).join(`,`)}}`}},E=e=>Array.isArray(e)&&e.length===3&&e.every(e=>typeof e==`number`&&Number.isFinite(e)),D=e=>{if(e===void 0)return;let t=typeof e==`object`&&e?e:{},{min:n,max:r}=t;return E(n)&&E(r)&&Object.keys(t).every(e=>e===`min`||e===`max`)&&n.every((e,t)=>e<r[t])?void 0:m([h({code:`GEOSPEC_MODEL_OPTION_INVALID`,message:`loadModel region must be { min: [x, y, z], max: [x, y, z] } in millimetres with every min axis below its max axis.`,suggestion:`Pass finite millimetre corners of the box to check, for example { min: [0, 0, 0], max: [40, 40, 60] }.`,details:{option:`region`,region:structuredClone(e)}})])},O=({min:e,max:t})=>({min:[e[0],e[1],e[2]],max:[t[0],t[1],t[2]]}),k=(e,t)=>{let n=t.sourceRevision?.files??Object.fromEntries(t.data.files.map(({path:e,sha256:t})=>[e,`sha256:${t}`]));return(t.sourceRevision?.entry??t.data.entryPath)===e.entry&&Object.entries(n).every(([t,n])=>n===`missing`||e.files[t]===n)&&Object.entries(e.files).every(([e,t])=>t===`missing`?n[e]===void 0||n[e]===`missing`:n[e]===t)},A=r=>{let s=0,c=t(r.maximumWorkUnitLimit),l=new Map,E=new Map,A=0,j=new Set,M=new Map,N=new Set,P=new Map,F=e=>(s+=1,`geospec-native-model:${e}:${s}`),I=e=>(e.sourceAdapters??r.sourceAdapters)?.find(t=>t.extensions.some(t=>e.file.endsWith(t))),L=async e=>{let t=e.runtime??r.runtime;if(typeof t==`function`){let e=P.get(t);e===void 0&&(e=t(),P.set(t,e));let n=await e;return N.add(n),n}if(t!==void 0)return t;let n=I(e);if(n!==void 0){let t=await n.createRuntime({file:e.file,...(e.projectPath??r.projectPath)===void 0?{}:{projectPath:e.projectPath??r.projectPath}});return N.add(t),t}throw m([h({code:`GEOSPEC_NATIVE_RUNTIME_UNAVAILABLE`,message:`No Tau Runtime is configured to export '${e.file}' for native GeoSpec.`,suggestion:`Pass a Runtime client/factory or a matching source adapter to the native runner.`,details:{file:e.file}})])},R=e=>{r.engine.releaseSubject(_({...o,method:`releaseSubject`,requestId:F(`release`),subjectHandle:e}))},z=(e,t)=>{let n=u.get(r.engine),i=n?.inputs.get(e);if(n!==void 0&&i!==void 0&&(i.cleanupPending?.(),delete i.cleanupPending,i.owners.has(t))){if(i.owners.size>1){i.owners.delete(t);return}i.handle!==void 0&&(R(i.handle),delete i.handle),i.owners.delete(t),n.resident.delete(e),n.inputs.delete(e),n.binaryBytes-=i.resources.reduce((e,t)=>e+t.byteLength,i.primary.byteLength),n.descriptorBytes-=i.request.byteLength}},B=e=>{for(let[t,n]of e.inputs)n.cleanupPending!==void 0&&(n.cleanupPending(),delete n.cleanupPending,delete n.handle,e.resident.delete(t))},V=()=>[...r.carried??[]].filter(([e])=>!l.has(e)),H=(e,t)=>{let n=e.format===`stp`?`step`:e.format,i=p(r.engine);B(i);let a=_({...o,method:`ingestSubject`,requestId:F(`ingest`),format:n,frame:{coordinateSystem:`z-up`,sourceUnit:n===`step`?`auto`:e.sourceUnit??`m`,outputUnit:`mm`},ingestOptions:e.ingestOptions??{},...e.diagnostics===void 0||e.diagnostics.length===0?{}:{diagnostics:e.diagnostics},primaryByteLength:e.primary.byteLength,resources:e.resources.map(({name:e,bytes:t})=>({name:e,byteLength:t.byteLength}))}),s=e.resources.reduce((e,{bytes:t})=>e+t.byteLength,e.primary.byteLength);if(!Number.isSafeInteger(s)||s>i.binaryLimit||a.byteLength>d)throw Object.assign(RangeError(`GeoSpec retained admission input exceeds its byte limit.`),{code:`limit-exceeded`});let c=(e,t)=>e.length===t.length&&e.every((e,n)=>e===t[n]),u={...y(a,`admission request`),requestId:``},m=[...i.inputs.values()].find(t=>{let n={...y(t.request,`retained request`),requestId:``};return JSON.stringify(n)===JSON.stringify(u)&&c(t.primary,e.primary)&&t.resources.length===e.resources.length&&t.resources.every((t,n)=>c(t,e.resources[n].bytes))});if(m===void 0&&(s>i.binaryLimit-i.binaryBytes||a.byteLength>d-i.descriptorBytes))throw Object.assign(RangeError(`GeoSpec live admission snapshots exceed their retained input byte limit.`),{code:`limit-exceeded`});let h=m??{request:Uint8Array.from(a),primary:Uint8Array.from(e.primary),resources:e.resources.map(({bytes:e})=>Uint8Array.from(e)),owners:new Set},g=()=>r.engine.ingestSubject(a,e.primary,e.resources.map(({bytes:e})=>e)),b;try{b=g()}catch(e){let t=V();if(!f(e))throw e;let n=!1;for(let[e,a]of t){let t=i.inputs.get(e);if(t===void 0)R(a),n=!0;else{let i=t.owners.size===1&&t.handle!==void 0;z(e,r.carried),n||=i}r.carried?.delete(e)}if(!n){let t=i.resident.entries().next().value;if(t===void 0)throw e;R(t[1].handle),delete t[1].handle,i.resident.delete(t[0])}b=g()}let x=y(b,`admission response`),S=v(x.result,`admission result`),{subjectHash:C}=v(S.subject,`admitted subject`);if(typeof C!=`string`||!/^[0-9a-f]{64}$/u.test(C))throw TypeError(`Native GeoSpec admission did not return a valid subjectHash.`);let w=y(r.engine.subjectHandle(_({...o,method:`subjectHandle`,requestId:F(`handle`),subjectHash:C})),`subject-handle response`),T=v(w.result,`subject-handle result`).subjectHandle;if(T===void 0)throw TypeError(`Native GeoSpec did not return a subject handle.`);let D=i.inputs.get(C),O=D??h;D===void 0&&(i.inputs.set(C,O),i.binaryBytes+=s,i.descriptorBytes+=O.request.byteLength);for(let e of t)O.owners.add(e),E.set(e,C);return O.handle=T,i.resident.delete(C),i.resident.set(C,O),l.set(C,O),{subjectHash:C}},U=e=>{let t=l.get(e);if(t===void 0)throw TypeError(`This subject is not admitted by the active GeoSpec host.`);let n=p(r.engine);if(B(n),t.handle===void 0){let i=()=>r.engine.ingestSubject(t.request,t.primary,t.resources),a;try{a=i()}catch(e){let t=n.resident.entries().next().value;if(!f(e)||t===void 0)throw e;R(t[1].handle),delete t[1].handle,n.resident.delete(t[0]),a=i()}let s=()=>{let t=v(y(r.engine.subjectHandle(_({...o,method:`subjectHandle`,requestId:F(`restore-handle`),subjectHash:e})),`restored handle`).result,`restored handle result`),n=v(t.subjectHandle,`restored subject handle`);if(n.subjectHash!==e)throw TypeError(`Native GeoSpec restored handle changed its subject identity.`);return n};try{if(v(v(y(a,`restored admission`).result,`restored result`).subject,`restored subject`).subjectHash!==e)throw TypeError(`Native GeoSpec restored admission changed its subject identity.`);t.handle=s()}catch(e){throw t.cleanupPending=()=>{try{R(s())}catch(t){throw AggregateError([e,t],`Native GeoSpec restored admission failed and cleanup remains pending.`,{cause:e})}},t.cleanupPending(),delete t.cleanupPending,e}}n.resident.delete(e),n.resident.set(e,t)},W=async(e,t)=>{let n=S(e,r.format),i=await b(e.source,r.readSource),o=await Promise.all((e.resources??[]).map(async({name:e,source:t})=>({name:e,bytes:await b(t,r.readSource),...typeof t==`string`?{sourcePath:t}:{}}))),s=await Promise.all([{name:e.path??e.name??`primary`,bytes:i,...typeof e.source==`string`?{sourcePath:e.source}:{}},...o].map(async({name:e,bytes:t,sourcePath:n})=>({name:e,sha256:await a(t),byteLength:t.byteLength,...n===void 0?{}:{sourcePath:n}})));return{...H({format:n,primary:i,resources:o,...e.ingestOptions===void 0?{}:{ingestOptions:e.ingestOptions},...e.sourceUnit===void 0?{}:{sourceUnit:e.sourceUnit}},t),load:{loadId:``,status:`complete`,format:n,parameters:e.parameters??{},ingestOptions:e.ingestOptions??{},...typeof e.source==`string`?{sourcePath:e.source}:{},...e.workUnitLimit===void 0?{}:{workUnitLimit:e.workUnitLimit},artifacts:s}}},G=async(e,t)=>{for(let t of[`sourceUnit`,`unit`,`scale`,`coordinateSystem`])if(t in e)throw m([h({code:`GEOSPEC_NATIVE_RUNTIME_FRAME_OVERRIDE`,message:`Native Runtime model loading rejects '${t}': the Runtime export intent owns the frame.`,suggestion:`Remove the frame override and let GeoSpec request canonical Z-up millimetre evidence.`,details:{key:t}})]);let n=S(e,r.format),o=n===`stp`?`step`:n,s=await L(e);await s.connect();let c=await w(s,e),l={runtime:s,format:o,...c===void 0?{}:{kernelId:c},...e.meshLinearTolerance===void 0?{}:{meshLinearTolerance:e.meshLinearTolerance},...e.meshAngularToleranceDegrees===void 0?{}:{meshAngularToleranceDegrees:e.meshAngularToleranceDegrees}},u=i(l);if(`success`in u)throw m(u.diagnostics);let d=e.region===void 0?void 0:O(e.region);if(d!==void 0){let t=C(s,o).filter(e=>c===void 0||e.kernelId===c);if(!t.some(e=>e.transcoderId===void 0&&`region`in(e.exportOptions?.schema.properties??{}))){let n=[...new Set(t.flatMap(e=>e.kernelId===void 0?[]:[e.kernelId]))];throw m([h({code:`GEOSPEC_MODEL_REGION_UNSUPPORTED`,message:`No direct ${o.toUpperCase()} export of this Runtime${n.length===0?``:` (${n.join(`, `)})`} declares a region option, so GeoSpec cannot crop '${e.file}' before admission.`,suggestion:`Load the whole model; if it exceeds a host limit, provision more resources and report the claim as not decided at this capacity. A region load needs a kernel whose GLB export crops, such as PicoVoxel, and only scopes a separate claim to that region.`,details:{file:e.file,format:o,region:d,kernelIds:n}})])}}let f={...structuredClone(u.options),...d===void 0?{}:{region:{min:[...d.min],max:[...d.max]}}},p=s.open({source:x(e),...e.parameters===void 0?{}:{parameters:e.parameters},watch:!1}),_=await(async()=>{try{return await p.export(o,{options:structuredClone(f)})}finally{p.close()}})();if(!_.success)throw m(_.issues.map(g));if(d!==void 0&&!_.issues.some(e=>{let{details:t}=e,n=typeof t==`object`&&t&&`region`in t?t.region:void 0;return typeof n==`object`&&!!n&&T(n)===T({min:[...d.min],max:[...d.max]})}))throw m([h({code:`GEOSPEC_MODEL_REGION_NOT_HONORED`,message:`The Runtime export of '${e.file}' did not confirm the requested region crop, so its bytes may be the whole model.`,suggestion:`Load the whole model, or update the kernel so its export reports the region it cropped.`,details:{file:e.file,format:o,region:d}})]);let v=[..._.files],[y,...b]=v;if(y===void 0)throw m([h({code:`GEOSPEC_NATIVE_MODEL_EXPORT_EMPTY`,message:`The Tau Runtime exported no ${o.toUpperCase()} artifact for '${e.file}'.`,suggestion:`Check that the selected source exports geometry in the requested format.`,details:{file:e.file,format:o}})]);let E=i(l);if(`success`in E)throw m(E.diagnostics);let D=await Promise.all(v.map(async({name:e,bytes:t})=>({name:e,sha256:await a(t),byteLength:t.byteLength}))),k=_.sourceRevision===void 0?void 0:structuredClone(_.sourceRevision),A=k!==void 0&&/^sha256:[0-9a-f]{64}$/u.test(k.files[k.entry]??``)&&Object.values(k.files).every(e=>e===`missing`||/^sha256:[0-9a-f]{64}$/u.test(e));return{...H({format:o,primary:y.bytes,resources:b,sourceUnit:E.sourceUnit,diagnostics:_.issues.map(g),...e.ingestOptions===void 0?{}:{ingestOptions:e.ingestOptions}},t),load:{loadId:``,status:A?`complete`:`unavailable`,format:o,parameters:e.parameters??{},exportOptions:f,ingestOptions:e.ingestOptions??{},...k===void 0?{}:{sourceRevision:k},...e.workUnitLimit===void 0?{}:{workUnitLimit:e.workUnitLimit},...d===void 0?{}:{region:d},artifacts:D}}},K=(e,t)=>{let n=u.get(r.engine)?.inputs.get(e);return n===void 0||n.owners.size===0?!1:(n.owners.add(t),E.set(t,e),l.set(e,n),!0)},q=async(e,t)=>{let n=t.status===`complete`?t.sourceRevision:void 0;if(n===void 0)return!1;let r=await L(e);if(r.snapshotSource===void 0)return!1;try{let t=await r.snapshotSource({source:{path:e.file}});return t.success&&k(n,t)}catch{return!1}},J=async(e,t)=>{let n=e.runtime??r.runtime,i=`code`in e,a=i&&Object.values(e.code).every(e=>typeof e==`string`)?e.code:void 0,o=n===void 0||i&&a===void 0||[`sourceUnit`,`unit`,`scale`,`coordinateSystem`].some(t=>t in e)?void 0:T({file:e.file,code:a,projectPath:e.projectPath??r.projectPath,format:e.format??r.format??`glb`,meshLinearTolerance:e.meshLinearTolerance,meshAngularToleranceDegrees:e.meshAngularToleranceDegrees,parameters:e.parameters,ingestOptions:e.ingestOptions,region:e.region});if(n===void 0||o===void 0)return G(e,new Set([t]));let s=M.get(n);s===void 0&&(s=new Map,M.set(n,s));let c=s.get(o);if(c!==void 0){c.owners?.add(t);let n=await c.pending;if((c.owners!==void 0||await q(e,n.load))&&K(n.subjectHash,t)){let{workUnitLimit:t,...r}=n.load;return{subjectHash:n.subjectHash,load:{...r,...e.workUnitLimit===void 0?{}:{workUnitLimit:e.workUnitLimit},reused:!0}}}}let l=new Set([t]),u=G(e,l),d={pending:u,...a===void 0?{}:{owners:l}};return s.set(o,d),u.then(void 0,()=>{s.delete(o)}),u};return Object.assign(t=>{let i={},a=F(`load`),o={...t,...`code`in t?{code:Object.fromEntries(Object.entries(t.code))}:{},...t.parameters===void 0?{}:{parameters:structuredClone(t.parameters)},...t.ingestOptions===void 0?{}:{ingestOptions:structuredClone(t.ingestOptions)},...`region`in t&&t.region!==void 0?{region:structuredClone(t.region)}:{}},s=t.format??r.format??`glb`,u=[`stepStreaming`,...t.mesh===!1&&(s===`step`||s===`stp`)?[]:[`mesh`],...`source`in t?[`meshLinearTolerance`,`meshAngularToleranceDegrees`,`region`,...s===`step`||s===`stp`?[`sourceUnit`]:[]]:[],...s===`step`||s===`stp`?[`region`]:[]].find(e=>e in t&&(e!==`region`||t[e]!==void 0));if(u!==void 0)return Promise.reject(m([h({code:`GEOSPEC_MODEL_OPTION_UNSUPPORTED`,message:`This GeoSpec host cannot honor model option '${u}'.`,suggestion:`Remove this option or configure a host that supports its declared behavior.`,details:{option:u}})]));let d=e(t.workUnitLimit,`loadModel workUnitLimit`,c);if(d!==void 0)return Promise.reject(m([h({code:`GEOSPEC_MODEL_OPTION_INVALID`,message:d,suggestion:`Pass a positive integer workUnitLimit within the stated bound, or omit it for the engine default.`,details:{option:`workUnitLimit`}})]));let f=`source`in t?void 0:D(t.region);if(f!==void 0)return Promise.reject(f);let p=`source`in t?W(o,new Set([i])):J(o,i),g=(async()=>{let e=await p,t={...e,...e.load===void 0?{}:{load:{...e.load,loadId:a}}},r=A,o=!1;return n(t,{ensureResident(){if(r!==A||!E.has(i))throw TypeError(`This subject is not admitted by the active GeoSpec host.`);U(e.subjectHash)},dispose(){if(!(o||!E.has(i))){o=!0;try{z(e.subjectHash,i),E.delete(i),[...E.values()].includes(e.subjectHash)||l.delete(e.subjectHash)}finally{o=!1}}}}),t})();return j.add(g),g},{async releaseAll(){do{let e=[...j];await Promise.allSettled(e);for(let t of e)j.delete(t)}while(j.size>0);let e=[],{carried:t}=r;if(A+=1,M.clear(),t!==void 0){for(let[n,i]of V())try{u.get(r.engine)?.inputs.has(n)?z(n,t):R(i),t.delete(n)}catch(t){e.push(t)}for(let[e,n]of l)n.handle===void 0?(n.owners.delete(t),t.delete(e)):(n.owners.add(t),t.set(e,n.handle))}for(let[t,n]of[...E].reverse())try{z(n,t),E.delete(t),[...E.values()].includes(n)||l.delete(n)}catch(t){e.push(t)}for(let t of N)try{t.shutdown?await t.shutdown():t.terminate()}catch(t){e.push(t)}if(N.clear(),P.clear(),e.length>0)throw AggregateError(e,`Native GeoSpec model cleanup failed.`)}})};export{A as createGeoSpecNativeModelLoader};
1
+ import{geoSpecAuthoredWorkUnitLimitProblem as e,resolveGeoSpecMaximumWorkUnitLimit as t}from"../engine/client.mjs";import{bindRawSubjectResidency as n}from"./subject.mjs";import{GeoSpecModelLoadError as r}from"./errors.mjs";import{resolveRuntimeExportIntent as i}from"./export-intent.mjs";import{assertRootedPath as a,isNotFoundError as o,joinRelativePath as s,sha256Bytes as c}from"@taucad/runtime/kernel";const l={canonicalProfile:`geospec-jcs-v1`,protocolVersion:3,registryVersion:5},u=new TextEncoder,d=new TextDecoder(`utf-8`,{fatal:!0}),f=new Set([`glb`,`step`,`stp`]),p=new WeakMap,m=16777216,h=e=>e instanceof Error&&`code`in e&&e.code===`limit-exceeded`&&`capacity`in e&&typeof e.capacity==`object`&&e.capacity!==null&&`unit`in e.capacity&&e.capacity.unit===`retained subjects`,g=(e,t)=>Object.assign(RangeError(e),{code:`limit-exceeded`,capacity:{code:`GEOSPEC_RESOURCE_LIMIT`,limitClass:`admission`,unit:`bytes`,...t,source:`host`}}),_=e=>{let t=p.get(e);if(t!==void 0)return t;let n=C(e.processRequest(x({...l,method:`initialize`,requestId:`configuration`})),`initialize response`),r=S(n.result,`initialize result`);if(n.requestId!==`configuration`||r.protocolVersion!==3||r.registryVersion!==5||r.canonicalProfile!==`geospec-jcs-v1`)throw TypeError(`Native GeoSpec residency requires a compatible initialize profile.`);let i=S(r.configuration,`initialize configuration`),a=S(i.binaryAdmissionLimits,`binary admission limits`),o=[a.maxSubjectBytes,a.maxTotalBinaryBytes].map(e=>{if(typeof e!=`number`||!Number.isSafeInteger(e)||e<=0)throw TypeError(`Native GeoSpec residency requires safe positive binary admission limits.`);return e}),s={inputs:new Map,resident:new Map,binaryLimit:Math.max(...o),binaryBytes:0,descriptorBytes:0};return p.set(e,s),s},v=e=>new r(e),y=e=>({code:e.code,severity:`error`,message:e.message,suggestion:e.suggestion,...e.details===void 0?{}:{details:e.details}}),b=e=>({code:e.code,severity:e.severity,message:e.message,suggestion:`Fix the model source or its Runtime export route, then retry the native run.`}),x=e=>u.encode(JSON.stringify(e)),S=(e,t)=>{if(typeof e!=`object`||!e||Array.isArray(e))throw TypeError(`Native GeoSpec returned a non-object ${t}.`);return e},C=(e,t)=>S(JSON.parse(d.decode(e)),t),w=/^(?:\/|[A-Za-z][A-Za-z0-9+.-]*:)/u,T=(e,t)=>e===void 0||w.test(t)?t:s(e,t),E=e=>{try{return a(e),!0}catch{return!1}},D=(e,t)=>`code`in e?{}:`source`in e?{...typeof e.source==`string`?{source:T(t,e.source)}:{},...e.resources===void 0?{}:{resources:e.resources.map(e=>typeof e.source==`string`?{...e,source:T(t,e.source)}:e)}}:{file:T(t,e.file)},O=(e,t)=>`${e.replace(/[/\\]+$/u,``)}/${t}`,k=e=>{let{path:t,projectPath:n,rootDir:r}=e;return y({code:`GEOSPEC_MODEL_SOURCE_NOT_FOUND`,message:`loadModel found no file '${t}'${r===void 0?``:` (rootDir '${r}')`} in the project root${n===void 0?``:` ${n}, looking for ${O(n,t)}`}.`,suggestion:`loadModel({ file }) resolves against the project root, the same root as every tool's targetFile: name the model by its path from that root, or pass rootDir with the project-relative folder it is in, as in loadModel({ file: 'main.ts', rootDir: 'parts/gear' }).`,details:{path:t,...r===void 0?{}:{rootDir:r},...n===void 0?{}:{projectRoot:n}}})},A=async(e,t,n={})=>{if(e instanceof Uint8Array)return Uint8Array.from(e);if(e instanceof ArrayBuffer)return Uint8Array.from(new Uint8Array(e));if(typeof Blob<`u`&&e instanceof Blob)return new Uint8Array(await e.arrayBuffer());if(t!==void 0)try{return await t(e)}catch(t){let{projectPath:r,rootDir:i}=n,a=typeof e==`string`&&r!==void 0&&!w.test(e);throw v([y({code:`GEOSPEC_NATIVE_SOURCE_READ_FAILED`,message:`The host source reader could not read ${typeof e==`string`?e:`this source`}${a?` at ${O(r,e)} in the project root ${r}${i===void 0?``:` (rootDir '${i}')`}`:``}: ${t instanceof Error?t.message:String(t)}`,suggestion:`Check that the source exists at its path from the project root, or pass rootDir with the project-relative folder it is in, and that it is readable, then retry the load.`,...typeof e==`string`?{details:{source:e,...i===void 0?{}:{rootDir:i},...a?{projectRoot:r}:{}}}:{}})])}throw v([y({code:`GEOSPEC_NATIVE_SOURCE_READER_UNAVAILABLE`,message:`The native model loader cannot read this source form without a host source reader.`,suggestion:`Pass in-memory bytes or configure readSource on createGeoSpecNativeModelLoader().`})])},j=e=>`code`in e?{files:e.code,entry:e.file}:{path:e.file},M=(e,t)=>{let n=e.format??t??`glb`;if(!f.has(n))throw v([y({code:`GEOSPEC_NATIVE_MODEL_FORMAT_UNSUPPORTED`,message:`The native model host does not admit '${n}' models.`,suggestion:`Use 'step', 'stp', or 'glb' for native model assertions.`,details:{format:n}})]);return n},N=(e,t)=>{let{routesFor:n,bestRouteFor:r}=e;if(typeof n==`function`)return n.call(e,t);let i=typeof r==`function`?r.call(e,t):void 0;return i===void 0?[]:[i]},P=async(e,t)=>{if(typeof e.describe==`function`)try{let{kernelId:n}=await e.describe({source:j(t)});return typeof n==`string`&&n.length>0?n:void 0}catch{return}},F=e=>{if(e===null||typeof e==`boolean`||typeof e==`string`)return JSON.stringify(e);if(typeof e==`number`)return Number.isFinite(e)?JSON.stringify(e):void 0;if(Array.isArray(e)){let t=e.map(e=>F(e));return t.includes(void 0)?void 0:`[${t.join(`,`)}]`}if(typeof e==`object`&&Object.getPrototypeOf(e)===Object.prototype){let t=Object.entries(e).filter(([,e])=>e!==void 0).sort(([e],[t])=>e<t?-1:1).map(([e,t])=>[e,F(t)]);return t.some(([,e])=>e===void 0)?void 0:`{${t.map(([e,t])=>`${JSON.stringify(e)}:${t}`).join(`,`)}}`}},I=e=>Array.isArray(e)&&e.length===3&&e.every(e=>typeof e==`number`&&Number.isFinite(e)),L=e=>{if(e===void 0)return;let t=typeof e==`object`&&e?e:{},{min:n,max:r}=t;return I(n)&&I(r)&&Object.keys(t).every(e=>e===`min`||e===`max`)&&n.every((e,t)=>e<r[t])?void 0:v([y({code:`GEOSPEC_MODEL_OPTION_INVALID`,message:`loadModel region must be { min: [x, y, z], max: [x, y, z] } in millimetres with every min axis below its max axis.`,suggestion:`Pass finite millimetre corners of the box to check, for example { min: [0, 0, 0], max: [40, 40, 60] }.`,details:{option:`region`,region:structuredClone(e)}})])},R=({min:e,max:t})=>({min:[e[0],e[1],e[2]],max:[t[0],t[1],t[2]]}),z=(e,t)=>{let n=t.sourceRevision?.files??Object.fromEntries(t.data.files.map(({path:e,sha256:t})=>[e,`sha256:${t}`]));return(t.sourceRevision?.entry??t.data.entryPath)===e.entry&&Object.entries(n).every(([t,n])=>n===`missing`||e.files[t]===n)&&Object.entries(e.files).every(([e,t])=>t===`missing`?n[e]===void 0||n[e]===`missing`:n[e]===t)},B=r=>{let a=0,s=t(r.maximumWorkUnitLimit),u=new Map,d=new Map,f=0,w=new Set,T=new Map,O=new Set,I=new Map,B=e=>(a+=1,`geospec-native-model:${e}:${a}`),V=e=>(e.sourceAdapters??r.sourceAdapters)?.find(t=>t.extensions.some(t=>e.file.endsWith(t))),H=async e=>{let t=e.runtime??r.runtime;if(typeof t==`function`){let e=I.get(t);e===void 0&&(e=t(),I.set(t,e));let n=await e;return O.add(n),n}if(t!==void 0)return t;let n=V(e);if(n!==void 0){let t=await n.createRuntime({file:e.file,...(e.projectPath??r.projectPath)===void 0?{}:{projectPath:e.projectPath??r.projectPath}});return O.add(t),t}throw v([y({code:`GEOSPEC_NATIVE_RUNTIME_UNAVAILABLE`,message:`No Tau Runtime is configured to export '${e.file}' for native GeoSpec.`,suggestion:`Pass a Runtime client/factory or a matching source adapter to the native runner.`,details:{file:e.file}})])},U=e=>{r.engine.releaseSubject(x({...l,method:`releaseSubject`,requestId:B(`release`),subjectHandle:e}))},W=(e,t)=>{let n=p.get(r.engine),i=n?.inputs.get(e);if(n!==void 0&&i!==void 0&&(i.cleanupPending?.(),delete i.cleanupPending,i.owners.has(t))){if(i.owners.size>1){i.owners.delete(t);return}i.handle!==void 0&&(U(i.handle),delete i.handle),i.owners.delete(t),n.resident.delete(e),n.inputs.delete(e),n.binaryBytes-=i.resources.reduce((e,t)=>e+t.byteLength,i.primary.byteLength),n.descriptorBytes-=i.request.byteLength}},G=e=>{for(let[t,n]of e.inputs)n.cleanupPending!==void 0&&(n.cleanupPending(),delete n.cleanupPending,delete n.handle,e.resident.delete(t))},K=()=>[...r.carried??[]].filter(([e])=>!u.has(e)),q=(e,t)=>{let n=e.format===`stp`?`step`:e.format,i=_(r.engine);G(i);let a=x({...l,method:`ingestSubject`,requestId:B(`ingest`),format:n,frame:{coordinateSystem:`z-up`,sourceUnit:n===`step`?`auto`:e.sourceUnit??`m`,outputUnit:`mm`},ingestOptions:e.ingestOptions??{},...e.diagnostics===void 0||e.diagnostics.length===0?{}:{diagnostics:e.diagnostics},primaryByteLength:e.primary.byteLength,resources:e.resources.map(({name:e,bytes:t})=>({name:e,byteLength:t.byteLength}))}),o=e.resources.reduce((e,{bytes:t})=>e+t.byteLength,e.primary.byteLength);if(!Number.isSafeInteger(o)||o>i.binaryLimit)throw g(`GeoSpec retained admission input exceeds its byte limit.`,{name:`maxTotalBinaryBytes`,limit:i.binaryLimit,required:o});if(a.byteLength>m)throw g(`GeoSpec retained admission input exceeds its byte limit.`,{name:`descriptorBytes`,limit:m,required:a.byteLength});let s=(e,t)=>e.length===t.length&&e.every((e,n)=>e===t[n]),c={...C(a,`admission request`),requestId:``},f=[...i.inputs.values()].find(t=>{let n={...C(t.request,`retained request`),requestId:``};return JSON.stringify(n)===JSON.stringify(c)&&s(t.primary,e.primary)&&t.resources.length===e.resources.length&&t.resources.every((t,n)=>s(t,e.resources[n].bytes))});if(f===void 0&&o>i.binaryLimit-i.binaryBytes)throw g(`GeoSpec live admission snapshots exceed their retained input byte limit.`,{name:`maxTotalBinaryBytes`,limit:i.binaryLimit,required:i.binaryBytes+o});if(f===void 0&&a.byteLength>m-i.descriptorBytes)throw g(`GeoSpec live admission snapshots exceed their retained input byte limit.`,{name:`descriptorBytes`,limit:m,required:i.descriptorBytes+a.byteLength});let p=f??{request:Uint8Array.from(a),primary:Uint8Array.from(e.primary),resources:e.resources.map(({bytes:e})=>Uint8Array.from(e)),owners:new Set},v=()=>r.engine.ingestSubject(a,e.primary,e.resources.map(({bytes:e})=>e)),y;try{y=v()}catch(e){let t=K();if(!h(e))throw e;let n=!1;for(let[e,a]of t){let t=i.inputs.get(e);if(t===void 0)U(a),n=!0;else{let i=t.owners.size===1&&t.handle!==void 0;W(e,r.carried),n||=i}r.carried?.delete(e)}if(!n){let t=i.resident.entries().next().value;if(t===void 0)throw e;U(t[1].handle),delete t[1].handle,i.resident.delete(t[0])}y=v()}let b=C(y,`admission response`),w=S(b.result,`admission result`),{subjectHash:T}=S(w.subject,`admitted subject`);if(typeof T!=`string`||!/^[0-9a-f]{64}$/u.test(T))throw TypeError(`Native GeoSpec admission did not return a valid subjectHash.`);let E=C(r.engine.subjectHandle(x({...l,method:`subjectHandle`,requestId:B(`handle`),subjectHash:T})),`subject-handle response`),D=S(E.result,`subject-handle result`).subjectHandle;if(D===void 0)throw TypeError(`Native GeoSpec did not return a subject handle.`);let O=i.inputs.get(T),k=O??p;O===void 0&&(i.inputs.set(T,k),i.binaryBytes+=o,i.descriptorBytes+=k.request.byteLength);for(let e of t)k.owners.add(e),d.set(e,T);return k.handle=D,i.resident.delete(T),i.resident.set(T,k),u.set(T,k),{subjectHash:T}},J=e=>{let t=u.get(e);if(t===void 0)throw TypeError(`This subject is not admitted by the active GeoSpec host.`);let n=_(r.engine);if(G(n),t.handle===void 0){let i=()=>r.engine.ingestSubject(t.request,t.primary,t.resources),a;try{a=i()}catch(e){let t=n.resident.entries().next().value;if(!h(e)||t===void 0)throw e;U(t[1].handle),delete t[1].handle,n.resident.delete(t[0]),a=i()}let o=()=>{let t=S(C(r.engine.subjectHandle(x({...l,method:`subjectHandle`,requestId:B(`restore-handle`),subjectHash:e})),`restored handle`).result,`restored handle result`),n=S(t.subjectHandle,`restored subject handle`);if(n.subjectHash!==e)throw TypeError(`Native GeoSpec restored handle changed its subject identity.`);return n};try{if(S(S(C(a,`restored admission`).result,`restored result`).subject,`restored subject`).subjectHash!==e)throw TypeError(`Native GeoSpec restored admission changed its subject identity.`);t.handle=o()}catch(e){throw t.cleanupPending=()=>{try{U(o())}catch(t){throw AggregateError([e,t],`Native GeoSpec restored admission failed and cleanup remains pending.`,{cause:e})}},t.cleanupPending(),delete t.cleanupPending,e}}n.resident.delete(e),n.resident.set(e,t)},Y=async e=>{if(r.readSource===void 0)return!1;try{return await r.readSource(e),!1}catch(e){return o(e)}},X=async(e,t)=>!(`code`in e)&&await Y(e.file)?[k({path:e.file,projectPath:r.projectPath,rootDir:e.rootDir})]:t.map(e=>b(e)),Z=async(e,t)=>{let n=M(e,r.format),i={projectPath:r.projectPath,rootDir:e.rootDir},a=await A(e.source,r.readSource,i),o=await Promise.all((e.resources??[]).map(async({name:e,source:t})=>({name:e,bytes:await A(t,r.readSource,i),...typeof t==`string`?{sourcePath:t}:{}}))),s=await Promise.all([{name:e.path??e.name??`primary`,bytes:a,...typeof e.source==`string`?{sourcePath:e.source}:{}},...o].map(async({name:e,bytes:t,sourcePath:n})=>({name:e,sha256:await c(t),byteLength:t.byteLength,...n===void 0?{}:{sourcePath:n}})));return{...q({format:n,primary:a,resources:o,...e.ingestOptions===void 0?{}:{ingestOptions:e.ingestOptions},...e.sourceUnit===void 0?{}:{sourceUnit:e.sourceUnit}},t),load:{loadId:``,status:`complete`,format:n,parameters:e.parameters??{},ingestOptions:e.ingestOptions??{},...typeof e.source==`string`?{sourcePath:e.source}:{},...e.rootDir===void 0?{}:{rootDir:e.rootDir},...e.workUnitLimit===void 0?{}:{workUnitLimit:e.workUnitLimit},artifacts:s}}},Q=async(e,t)=>{for(let t of[`sourceUnit`,`unit`,`scale`,`coordinateSystem`])if(t in e)throw v([y({code:`GEOSPEC_NATIVE_RUNTIME_FRAME_OVERRIDE`,message:`Native Runtime model loading rejects '${t}': the Runtime export intent owns the frame.`,suggestion:`Remove the frame override and let GeoSpec request canonical Z-up millimetre evidence.`,details:{key:t}})]);let n=M(e,r.format),a=n===`stp`?`step`:n,o=await H(e);await o.connect();let s=await P(o,e),l={runtime:o,format:a,...s===void 0?{}:{kernelId:s},...e.meshLinearTolerance===void 0?{}:{meshLinearTolerance:e.meshLinearTolerance},...e.meshAngularToleranceDegrees===void 0?{}:{meshAngularToleranceDegrees:e.meshAngularToleranceDegrees}},u=i(l);if(`success`in u)throw v(u.diagnostics);let d=e.region===void 0?void 0:R(e.region);if(d!==void 0){let t=N(o,a).filter(e=>s===void 0||e.kernelId===s);if(!t.some(e=>e.transcoderId===void 0&&`region`in(e.exportOptions?.schema.properties??{}))){let n=[...new Set(t.flatMap(e=>e.kernelId===void 0?[]:[e.kernelId]))];throw v([y({code:`GEOSPEC_MODEL_REGION_UNSUPPORTED`,message:`No direct ${a.toUpperCase()} export of this Runtime${n.length===0?``:` (${n.join(`, `)})`} declares a region option, so GeoSpec cannot crop '${e.file}' before admission.`,suggestion:`Load the whole model; if it exceeds a host limit, report the claim as not decided at this capacity. A region load needs a kernel whose GLB export crops, such as PicoVoxel, and only scopes a separate claim to that region.`,details:{file:e.file,format:a,region:d,kernelIds:n}})])}}let f={...structuredClone(u.options),...d===void 0?{}:{region:{min:[...d.min],max:[...d.max]}}},p=o.open({source:j(e),...e.parameters===void 0?{}:{parameters:e.parameters},watch:!1}),m=await(async()=>{try{return await p.export(a,{options:structuredClone(f)})}finally{p.close()}})();if(!m.success)throw v(await X(e,m.issues));if(d!==void 0&&!m.issues.some(e=>{let{details:t}=e,n=typeof t==`object`&&t&&`region`in t?t.region:void 0;return typeof n==`object`&&!!n&&F(n)===F({min:[...d.min],max:[...d.max]})}))throw v([y({code:`GEOSPEC_MODEL_REGION_NOT_HONORED`,message:`The Runtime export of '${e.file}' did not confirm the requested region crop, so its bytes may be the whole model.`,suggestion:`Load the whole model, or update the kernel so its export reports the region it cropped.`,details:{file:e.file,format:a,region:d}})]);let h=[...m.files],[g,..._]=h;if(g===void 0)throw v([y({code:`GEOSPEC_NATIVE_MODEL_EXPORT_EMPTY`,message:`The Tau Runtime exported no ${a.toUpperCase()} artifact for '${e.file}'.`,suggestion:`Check that the selected source exports geometry in the requested format.`,details:{file:e.file,format:a}})]);let x=i(l);if(`success`in x)throw v(x.diagnostics);let S=await Promise.all(h.map(async({name:e,bytes:t})=>({name:e,sha256:await c(t),byteLength:t.byteLength}))),C=m.sourceRevision===void 0?void 0:structuredClone(m.sourceRevision),w=C!==void 0&&/^sha256:[0-9a-f]{64}$/u.test(C.files[C.entry]??``)&&Object.values(C.files).every(e=>e===`missing`||/^sha256:[0-9a-f]{64}$/u.test(e));return{...q({format:a,primary:g.bytes,resources:_,sourceUnit:x.sourceUnit,diagnostics:m.issues.map(b),...e.ingestOptions===void 0?{}:{ingestOptions:e.ingestOptions}},t),load:{loadId:``,status:w?`complete`:`unavailable`,format:a,parameters:e.parameters??{},exportOptions:f,ingestOptions:e.ingestOptions??{},...C===void 0?{}:{sourceRevision:C},...`rootDir`in e&&e.rootDir!==void 0?{rootDir:e.rootDir}:{},...e.workUnitLimit===void 0?{}:{workUnitLimit:e.workUnitLimit},...d===void 0?{}:{region:d},artifacts:S}}},$=(e,t)=>{let n=p.get(r.engine)?.inputs.get(e);return n===void 0||n.owners.size===0?!1:(n.owners.add(t),d.set(t,e),u.set(e,n),!0)},ee=async(e,t)=>{let n=t.status===`complete`?t.sourceRevision:void 0;if(n===void 0)return!1;let r=await H(e);if(r.snapshotSource===void 0)return!1;try{let t=await r.snapshotSource({source:{path:e.file}});return t.success&&z(n,t)}catch{return!1}},te=async(e,t)=>{let n=e.runtime??r.runtime,i=`code`in e,a=i&&Object.values(e.code).every(e=>typeof e==`string`)?e.code:void 0,o=n===void 0||i&&a===void 0||[`sourceUnit`,`unit`,`scale`,`coordinateSystem`].some(t=>t in e)?void 0:F({file:e.file,code:a,projectPath:e.projectPath??r.projectPath,format:e.format??r.format??`glb`,meshLinearTolerance:e.meshLinearTolerance,meshAngularToleranceDegrees:e.meshAngularToleranceDegrees,parameters:e.parameters,ingestOptions:e.ingestOptions,region:e.region});if(n===void 0||o===void 0)return Q(e,new Set([t]));let s=T.get(n);s===void 0&&(s=new Map,T.set(n,s));let c=s.get(o);if(c!==void 0){c.owners?.add(t);let n=await c.pending;if((c.owners!==void 0||await ee(e,n.load))&&$(n.subjectHash,t)){let{workUnitLimit:t,rootDir:r,...i}=n.load;return{subjectHash:n.subjectHash,load:{...i,...`rootDir`in e&&e.rootDir!==void 0?{rootDir:e.rootDir}:{},...e.workUnitLimit===void 0?{}:{workUnitLimit:e.workUnitLimit},reused:!0}}}}let l=new Set([t]),u=Q(e,l),d={pending:u,...a===void 0?{}:{owners:l}};return s.set(o,d),u.then(void 0,()=>{s.delete(o)}),u};return Object.assign(t=>{let i={},a=B(`load`),o=`rootDir`in t?t.rootDir:void 0,c={...t,...`code`in t?{code:Object.fromEntries(Object.entries(t.code))}:{},...t.parameters===void 0?{}:{parameters:structuredClone(t.parameters)},...t.ingestOptions===void 0?{}:{ingestOptions:structuredClone(t.ingestOptions)},...`region`in t&&t.region!==void 0?{region:structuredClone(t.region)}:{},...typeof o==`string`&&E(o)?D(t,o):{}},l=t.format??r.format??`glb`,p=[`stepStreaming`,...`code`in t?[`rootDir`]:[],...t.mesh===!1&&(l===`step`||l===`stp`)?[]:[`mesh`],...`source`in t?[`meshLinearTolerance`,`meshAngularToleranceDegrees`,`region`,...l===`step`||l===`stp`?[`sourceUnit`]:[]]:[],...l===`step`||l===`stp`?[`region`]:[]].find(e=>e in t&&(e!==`region`&&e!==`rootDir`||t[e]!==void 0));if(p!==void 0)return Promise.reject(v([y({code:`GEOSPEC_MODEL_OPTION_UNSUPPORTED`,message:`This GeoSpec host cannot honor model option '${p}'.`,suggestion:`Remove this option or configure a host that supports its declared behavior.`,details:{option:p}})]));let m=e(t.workUnitLimit,`loadModel workUnitLimit`,s);if(m!==void 0)return Promise.reject(v([y({code:`GEOSPEC_MODEL_OPTION_INVALID`,message:m,suggestion:`Pass a positive integer workUnitLimit within the stated bound, or omit it for the engine default.`,details:{option:`workUnitLimit`}})]));let h=`source`in t?void 0:L(t.region);if(h!==void 0)return Promise.reject(h);if(o!==void 0&&!(typeof o==`string`&&E(o)))return Promise.reject(v([y({code:`GEOSPEC_MODEL_OPTION_INVALID`,message:`loadModel rootDir must be a project-relative folder in canonical form, such as 'parts/gear': no leading or trailing '/', and no '.' or '..' segments.`,suggestion:`Pass the folder the model is in, from the project root, as in rootDir: 'parts/gear', or name the file by its path from the project root.`,details:{option:`rootDir`,...typeof o==`string`?{rootDir:o}:{}}})]));let g=`source`in t?Z(c,new Set([i])):te(c,i),_=(async()=>{let e=await g,t={...e,...e.load===void 0?{}:{load:{...e.load,loadId:a}}},r=f,o=!1;return n(t,{ensureResident(){if(r!==f||!d.has(i))throw TypeError(`This subject is not admitted by the active GeoSpec host.`);J(e.subjectHash)},dispose(){if(!(o||!d.has(i))){o=!0;try{W(e.subjectHash,i),d.delete(i),[...d.values()].includes(e.subjectHash)||u.delete(e.subjectHash)}finally{o=!1}}}}),t})();return w.add(_),_},{async releaseAll(){do{let e=[...w];await Promise.allSettled(e);for(let t of e)w.delete(t)}while(w.size>0);let e=[],{carried:t}=r;if(f+=1,T.clear(),t!==void 0){for(let[n,i]of K())try{p.get(r.engine)?.inputs.has(n)?W(n,t):U(i),t.delete(n)}catch(t){e.push(t)}for(let[e,n]of u)n.handle===void 0?(n.owners.delete(t),t.delete(e)):(n.owners.add(t),t.set(e,n.handle))}for(let[t,n]of[...d].reverse())try{W(n,t),d.delete(t),[...d.values()].includes(n)||u.delete(n)}catch(t){e.push(t)}for(let t of O)try{t.shutdown?await t.shutdown():t.terminate()}catch(t){e.push(t)}if(O.clear(),I.clear(),e.length>0)throw AggregateError(e,`Native GeoSpec model cleanup failed.`)}})};export{B as createGeoSpecNativeModelLoader};
@@ -1 +1 @@
1
- const e=new Set([`boundingBox`,`volume`,`surfaceArea`,`mass`,`centerOfMass`]),t=`GEOSPEC_REGION_WHOLE_MODEL_CLAIM`,n=(n,r)=>n===void 0||e.has(r)?void 0:{code:t,severity:`error`,message:`A '${r}' claim is about the whole model, and this subject is cropped to the region min [${n.min.join(`, `)}] max [${n.max.join(`, `)}] mm, so the claim cannot be decided on it.`,suggestion:`Keep the claim and make it on a whole-model load (loadModel without region). If the whole model exceeds a host limit, provision more resources (host admission limits or workUnitLimit) and report the claim as not decided at this capacity. A region load answers only bounding box, volume, surface area, mass and center of mass of that region.`,details:{kind:r,region:{min:[...n.min],max:[...n.max]},regionScopedKinds:[...e]}};export{e as geoSpecRegionScopedKinds,t as geoSpecRegionWholeModelClaimCode,n as regionScopeRefusal};
1
+ const e=new Set([`boundingBox`,`volume`,`surfaceArea`,`mass`,`centerOfMass`]),t=`GEOSPEC_REGION_WHOLE_MODEL_CLAIM`,n=(n,r)=>n===void 0||e.has(r)?void 0:{code:t,severity:`error`,message:`A '${r}' claim is about the whole model, and this subject is cropped to the region min [${n.min.join(`, `)}] max [${n.max.join(`, `)}] mm, so the claim cannot be decided on it.`,suggestion:`Keep the claim and make it on a whole-model load (loadModel without region). If the whole model exceeds a host limit, report the claim as not decided at this capacity. A region load answers only bounding box, volume, surface area, mass and center of mass of that region.`,details:{kind:r,region:{min:[...n.min],max:[...n.max]},regionScopedKinds:[...e]}};export{e as geoSpecRegionScopedKinds,t as geoSpecRegionWholeModelClaimCode,n as regionScopeRefusal};
@@ -95,6 +95,11 @@ type LoadModelSourceOptions = {
95
95
  readonly name: string;
96
96
  readonly source: MeshSource | StepSource;
97
97
  }>;
98
+ /**
99
+ * Project-relative folder a path `source` and each resource path resolve in. Omitted, they resolve against the
100
+ * project root. Recorded in the load evidence.
101
+ */
102
+ rootDir?: string;
98
103
  /** Source geometry format. Defaults to `glb`. */
99
104
  format?: GeoSpecModelFormat;
100
105
  /** Source path recorded in provenance. */
@@ -130,6 +135,8 @@ type LoadModelCodeOptions<Code extends Record<string, string> = Record<string, s
130
135
  code: Code;
131
136
  /** Entry path to render from {@link code}. */
132
137
  file: keyof Code & string;
138
+ /** Not accepted: inline code has no project folder to resolve in, and a load naming one is refused. */
139
+ rootDir?: never;
133
140
  /** Geometry format to export. Defaults to `glb`. */
134
141
  format?: GeoSpecModelFormat;
135
142
  /** Explicit parameters passed to the runtime. */
@@ -170,8 +177,17 @@ type LoadModelCodeOptions<Code extends Record<string, string> = Record<string, s
170
177
  * @public
171
178
  */
172
179
  type LoadModelFileOptions = {
173
- /** Project-relative model file to render. */
180
+ /**
181
+ * Model file to render, as a path from the project root: the same root every tool's `targetFile` resolves
182
+ * against, which the result names as `projectRoot` where the host reports it, as `tau mcp` does.
183
+ */
174
184
  file: string;
185
+ /**
186
+ * Project-relative folder `file` resolves in, for a suite that loads from somewhere other than the project root:
187
+ * `loadModel({ file: 'main.ts', rootDir: 'parts/gear' })` loads `parts/gear/main.ts`. Recorded in the load
188
+ * evidence.
189
+ */
190
+ rootDir?: string;
175
191
  /** Project root used by runtime integrations. */
176
192
  projectPath?: string;
177
193
  /** Geometry format to export. Defaults to `glb`. */
@@ -1,2 +1,2 @@
1
1
  import{assertGeoSpecAuthoredWorkUnitLimit as e}from"../engine/client.mjs";import{resolveGeoSpecSubject as t}from"../model/subject.mjs";import{GeoSpecAssertionError as n,createGeoSpecAssertionClient as r,createGeoSpecMatcherMethods as i}from"../assertion-client/client.mjs";import{diagnosticForTransport as a,geometryDiagnosticSchema as o}from"../model/errors.mjs";import{matchesGeoSpecTestName as s}from"./filter.mjs";import{geoSpecTimeoutCode as c}from"./timeout-codes.mjs";import{regionScopeRefusal as l}from"../model/region-scope.mjs";const u=`__GEOSPEC_COLLECTOR__`,d=globalThis,f=e=>typeof e==`object`&&!!e&&`then`in e&&typeof e.then==`function`;var p=class extends Error{diagnostics;constructor(e){super(e.map(e=>e.message).join(`
2
- `)||`GeoSpec assertion failed.`),this.name=`GeoSpecAssertionError`,this.diagnostics=Object.freeze([...e])}},m=class extends Error{testTimeout;constructor(e){super(`GeoSpec test timed out after ${e}ms.`),this.name=`GeoSpecTestTimeoutError`,this.testTimeout=e}};const h=e=>{if(e instanceof p)return[...e.diagnostics];if(e instanceof m)return[{code:c.test,severity:`error`,message:`${e.message} The test still ran to completion before the run moved on; this is a wall-clock timeout, not a geometry verdict.`,suggestion:`Keep the assertion and the model as designed. Raise testTimeout (CLI --test-timeout) so the requirement can finish; if this host cannot give it the time, report it as not decided at this capacity.`,details:{testTimeout:e.testTimeout}}];if(typeof e==`object`&&e&&Reflect.get(e,`name`)===`GeoSpecModelLoadError`){let t=Reflect.get(e,`diagnostics`);if(Array.isArray(t)&&t.length>0)try{return t.map(e=>a(g(e)))}catch{}}let t=typeof e==`object`&&e&&typeof Reflect.get(e,`message`)==`string`?String(Reflect.get(e,`message`)):String(e),{details:n}=a({code:`TEST_FAILED`,severity:`error`,message:t,details:e});return t.includes(`model.volume is not a function`)?[{code:`GEOSPEC_SUBJECT_API_MISUSE`,severity:`error`,message:`GeoSpec GeometrySubject does not expose model.volume().`,suggestion:`Use expectGeo(model).toHaveVolume({ value, tolerance }) instead of reading model.volume().`,details:n}]:/Cannot read properties of undefined \(reading 'bounds'\)/u.test(t)?[{code:`GEOSPEC_SUBJECT_API_MISUSE`,severity:`error`,message:`GeoSpec GeometrySubject does not expose model.boundingBox.bounds.`,suggestion:`Use expectGeo(model).toHaveBoundingBox({ min, max, size, center, tolerance }) instead of reading model.boundingBox.`,details:n}]:[{code:`TEST_FAILED`,severity:`error`,message:t,details:n}]},g=e=>o.parse(e),_=(e,t)=>{if(e.passed=t.length===0,e.diagnostics=t,t.length>0)throw new p(t);return e},v=async(e,t)=>{if(t===void 0)return e;let n;try{return await Promise.race([e,new Promise((e,r)=>{n=setTimeout(()=>{r(new m(t))},t)})])}finally{n!==void 0&&clearTimeout(n)}},y=(e,t)=>{for(let n of e)n.status===`rejected`&&t(n.reason)},b=()=>{let e=d[u];if(!x(e))throw Error(`GeoSpec collector is not active. Run the module through runGeoSpecModule().`);return e},x=e=>typeof e==`object`&&!!e&&`describe`in e&&`it`in e&&`expectGeo`in e&&`tests`in e,S=e=>typeof e==`object`&&!!e&&`suite`in e&&`name`in e&&`assertions`in e;function C(o){let c=r(o.nativeAssertions),u=[],d=[],m=[],b=[],x=new WeakSet,C,w=!1,T=(e,t)=>{try{o.onTestEvent?.({type:e,test:t})}catch{}},E=(e,t)=>{m.push((async()=>{try{await e}catch(e){t.onError(e)}finally{t.onFinally()}})())},D=e=>{d.push({ordinal:d.length,suite:[...u],name:e,assertions:[],status:`skipped`,diagnostics:[]})},O=(e,r)=>{if(!S(C))throw Error(`expectGeo() must be called inside it().`);let i={kind:e.kind,subject:null,expected:e.expected};C.assertions.push(i);let s=performance.now();try{let s=t(e.subject,o.nativeAssertions.engine);i.subject=s.identity,s.load!==void 0&&(i.loadId=s.load.loadId);let u=s.load?.region;u!==void 0&&(i.region={min:[...u.min],max:[...u.max]});let d=l(u,e.kind);if(d!==void 0)return _(i,[d]);let f=r?.workUnitLimit??s.load?.workUnitLimit,p=c.expectGeo(s.identity,f===void 0?void 0:{workUnitLimit:f}),m=(e.polarity===`negative`?p.not:p)[e.matcher],h;try{h=m(...e.arguments)}catch(e){if(!(e instanceof n))throw e;h=e.report}if(i.report=h,h.status===`passed`)return _(i,[]);let v=h.diagnostics.map(e=>a(g(e)));return _(i,v.length>0?v:[{code:`GEOSPEC_NATIVE_ASSERTION_FAILED`,severity:`error`,message:`Native claim '${h.claimId}' ended with status '${h.status}'.`,details:{claimId:h.claimId,status:h.status}}])}catch(e){throw e instanceof p&&i.report!==void 0&&x.add(e),i.passed=!1,i.diagnostics??=h(e),e}finally{i.durationMs=performance.now()-s}};return{describe(e,t){u.push(e);try{let n=t();if(f(n)){let t=[...u];E(n,{onError(n){d.push({ordinal:d.length,suite:t,name:e,assertions:[],status:`failed`,diagnostics:h(n)})},onFinally(){u.pop()}});return}}catch(t){d.push({ordinal:d.length,suite:[...u],name:e,assertions:[],status:`failed`,diagnostics:h(t)})}u.pop()},describeSkip(e){D(e)},it(e,t){let n={ordinal:d.length,suite:[...u],name:e,assertions:[],status:`not-run`,diagnostics:[]};d.push(n),b.push({test:n,function_:t})},itSkip(e){D(e)},expectGeo(t,n){e(n?.workUnitLimit,`expectGeo workUnitLimit`,o.nativeAssertions.maximumWorkUnitLimit);let r=e=>O(e,n);return Object.assign(i({invoke:r,polarity:`positive`,subject:t}),{not:i({invoke:r,polarity:`negative`,subject:t})})},async waitForCompletion(e,t){if(w)return;w=!0;let n=Promise.allSettled(m);try{await v(n,e)}catch(e){throw await n,e}for(let n of b){if(!s(n.test,t))continue;let r=C;C=n.test,n.test.status=`passed`,T(`test-start`,n.test);let i=performance.now(),a=[],o=e=>{a.some(t=>Object.is(t,e))||a.push(e)};try{let t;try{t=Promise.resolve(n.function_()),await v(t,e)}catch(e){o(e)}if(t!==void 0&&y(await Promise.allSettled([t]),o),a.length>0||n.test.assertions.some(e=>e.passed===!1)){n.test.status=`failed`;for(let e of a)n.test.diagnostics.push(...h(e));let{assertions:e}=n.test;if(!(a.some(e=>!(e instanceof p)||!x.has(e))||e.some(e=>e.passed===!1&&(e.report===void 0||e.report.status===`invalid`||e.report.status===`engine-error`)))){let t=e.map(e=>e.report?.status);n.test.status=t.includes(`failed`)?`failed`:t.some(e=>e!==void 0&&e!==`passed`&&e!==`unsupported`)?`inconclusive`:t.includes(`unsupported`)?`unsupported`:`failed`}}}finally{C=r,n.test.durationMs=performance.now()-i,T(`test-complete`,n.test)}}},tests:d}}const w=()=>{Reflect.deleteProperty(d,u)},T=e=>{d[u]=e};export{p as GeoSpecAssertionError,w as clearCollectorGlobals,u as collectorGlobalKey,C as createCollector,b as getCollector,T as installCollector};
2
+ `)||`GeoSpec assertion failed.`),this.name=`GeoSpecAssertionError`,this.diagnostics=Object.freeze([...e])}},m=class extends Error{testTimeout;constructor(e){super(`GeoSpec test timed out after ${e}ms.`),this.name=`GeoSpecTestTimeoutError`,this.testTimeout=e}};const h=e=>typeof e==`object`&&!!e&&Reflect.get(e,`code`)===`limit-exceeded`,g=e=>{let{message:t,name:n}=e,r=typeof t==`string`?t:`GeoSpec ran out of room for this claim.`;return{code:`TEST_FAILED`,severity:`error`,message:r,details:{name:typeof n==`string`?n:`Error`,message:r}}},_=e=>{let{capacity:t,message:n}=e,{code:r,...i}=typeof t==`object`&&t?{...t}:{};return a({code:typeof r==`string`?r:`GEOSPEC_RESOURCE_LIMIT`,severity:`error`,message:typeof n==`string`?n:`GeoSpec refused to admit this load.`,...Object.keys(i).length===0?{}:{details:i}})},v=e=>{if(e instanceof p)return[...e.diagnostics];if(h(e))return[_(e)];if(e instanceof m)return[{code:c.test,severity:`error`,message:`${e.message} The test still ran to completion before the run moved on; this is a wall-clock timeout, not a geometry verdict.`,suggestion:`Keep the assertion and the model as designed. Raise testTimeout (CLI --test-timeout) so the requirement can finish; if this host cannot give it the time, report it as not decided at this capacity.`,details:{testTimeout:e.testTimeout}}];if(typeof e==`object`&&e&&Reflect.get(e,`name`)===`GeoSpecModelLoadError`){let t=Reflect.get(e,`diagnostics`);if(Array.isArray(t)&&t.length>0)try{return t.map(e=>a(y(e)))}catch{}}let t=typeof e==`object`&&e&&typeof Reflect.get(e,`message`)==`string`?String(Reflect.get(e,`message`)):String(e),{details:n}=a({code:`TEST_FAILED`,severity:`error`,message:t,details:e});return t.includes(`model.volume is not a function`)?[{code:`GEOSPEC_SUBJECT_API_MISUSE`,severity:`error`,message:`GeoSpec GeometrySubject does not expose model.volume().`,suggestion:`Use expectGeo(model).toHaveVolume({ value, tolerance }) instead of reading model.volume().`,details:n}]:/Cannot read properties of undefined \(reading 'bounds'\)/u.test(t)?[{code:`GEOSPEC_SUBJECT_API_MISUSE`,severity:`error`,message:`GeoSpec GeometrySubject does not expose model.boundingBox.bounds.`,suggestion:`Use expectGeo(model).toHaveBoundingBox({ min, max, size, center, tolerance }) instead of reading model.boundingBox.`,details:n}]:[{code:`TEST_FAILED`,severity:`error`,message:t,details:n}]},y=e=>o.parse(e),b=(e,t)=>{if(e.passed=t.length===0,e.diagnostics=t,t.length>0)throw new p(t);return e},x=async(e,t)=>{if(t===void 0)return e;let n;try{return await Promise.race([e,new Promise((e,r)=>{n=setTimeout(()=>{r(new m(t))},t)})])}finally{n!==void 0&&clearTimeout(n)}},S=(e,t)=>{for(let n of e)n.status===`rejected`&&t(n.reason)},C=()=>{let e=d[u];if(!w(e))throw Error(`GeoSpec collector is not active. Run the module through runGeoSpecModule().`);return e},w=e=>typeof e==`object`&&!!e&&`describe`in e&&`it`in e&&`expectGeo`in e&&`tests`in e,T=e=>typeof e==`object`&&!!e&&`suite`in e&&`name`in e&&`assertions`in e;function E(o){let c=r(o.nativeAssertions),u=[],d=[],m=[],_=[],C=new WeakSet,w,E=!1,D=(e,t)=>{try{o.onTestEvent?.({type:e,test:t})}catch{}},O=(e,t)=>{m.push((async()=>{try{await e}catch(e){t.onError(e)}finally{t.onFinally()}})())},k=e=>{d.push({ordinal:d.length,suite:[...u],name:e,assertions:[],status:`skipped`,diagnostics:[]})},A=(e,r)=>{if(!T(w))throw Error(`expectGeo() must be called inside it().`);let i={kind:e.kind,subject:null,expected:e.expected};w.assertions.push(i);let s=performance.now();try{let s=t(e.subject,o.nativeAssertions.engine);i.subject=s.identity,s.load!==void 0&&(i.loadId=s.load.loadId);let u=s.load?.region;u!==void 0&&(i.region={min:[...u.min],max:[...u.max]});let d=l(u,e.kind);if(d!==void 0)return b(i,[d]);let f=r?.workUnitLimit??s.load?.workUnitLimit,p=c.expectGeo(s.identity,f===void 0?void 0:{workUnitLimit:f}),m=(e.polarity===`negative`?p.not:p)[e.matcher],h;try{h=m(...e.arguments)}catch(e){if(!(e instanceof n))throw e;h=e.report}if(i.report=h,h.status===`passed`)return b(i,[]);let g=h.diagnostics.map(e=>a(y(e)));return b(i,g.length>0?g:[{code:`GEOSPEC_NATIVE_ASSERTION_FAILED`,severity:`error`,message:`Native claim '${h.claimId}' ended with status '${h.status}'.`,details:{claimId:h.claimId,status:h.status}}])}catch(e){if(e instanceof p&&i.report!==void 0&&C.add(e),h(e))return b(i,[g(e)]);throw i.passed=!1,i.diagnostics??=v(e),e}finally{i.durationMs=performance.now()-s}};return{describe(e,t){u.push(e);try{let n=t();if(f(n)){let t=[...u];O(n,{onError(n){d.push({ordinal:d.length,suite:t,name:e,assertions:[],status:h(n)?`inconclusive`:`failed`,diagnostics:v(n)})},onFinally(){u.pop()}});return}}catch(t){d.push({ordinal:d.length,suite:[...u],name:e,assertions:[],status:h(t)?`inconclusive`:`failed`,diagnostics:v(t)})}u.pop()},describeSkip(e){k(e)},it(e,t){let n={ordinal:d.length,suite:[...u],name:e,assertions:[],status:`not-run`,diagnostics:[]};d.push(n),_.push({test:n,function_:t})},itSkip(e){k(e)},expectGeo(t,n){e(n?.workUnitLimit,`expectGeo workUnitLimit`,o.nativeAssertions.maximumWorkUnitLimit);let r=e=>A(e,n);return Object.assign(i({invoke:r,polarity:`positive`,subject:t}),{not:i({invoke:r,polarity:`negative`,subject:t})})},async waitForCompletion(e,t){if(E)return;E=!0;let n=Promise.allSettled(m);try{await x(n,e)}catch(e){throw await n,e}for(let n of _){if(!s(n.test,t))continue;let r=w;w=n.test,n.test.status=`passed`,D(`test-start`,n.test);let i=performance.now(),a=[],o=e=>{a.some(t=>Object.is(t,e))||a.push(e)};try{let t;try{t=Promise.resolve(n.function_()),await x(t,e)}catch(e){o(e)}if(t!==void 0&&S(await Promise.allSettled([t]),o),a.length>0||n.test.assertions.some(e=>e.passed===!1)){n.test.status=`failed`;for(let e of a)n.test.diagnostics.push(...v(e));let{assertions:e}=n.test;if(!(a.some(e=>!h(e)&&(!(e instanceof p)||!C.has(e)))||e.some(e=>e.passed===!1&&(e.report===void 0||e.report.status===`invalid`||e.report.status===`engine-error`)))){let t=e.map(e=>e.report?.status);n.test.status=t.includes(`failed`)?`failed`:a.some(e=>h(e))||t.some(e=>e!==void 0&&e!==`passed`&&e!==`unsupported`)?`inconclusive`:t.includes(`unsupported`)?`unsupported`:`failed`}}}finally{w=r,n.test.durationMs=performance.now()-i,D(`test-complete`,n.test)}}},tests:d}}const D=()=>{Reflect.deleteProperty(d,u)},O=e=>{d[u]=e};export{p as GeoSpecAssertionError,D as clearCollectorGlobals,u as collectorGlobalKey,E as createCollector,C as getCollector,O as installCollector};
@@ -1,4 +1,6 @@
1
+ import { DiscoverGeoSpecFilesOptions, GeoSpecDiscoveryFileSystem, GeoSpecDiscoveryResult, discoverGeoSpecFiles } from "../discovery.mjs";
2
+ import { GeoSpecTimeoutCode, geoSpecTimeoutCode, isGeoSpecTimeoutCode } from "../timeout-codes.mjs";
1
3
  import { createNoMatchingGeoSpecTestsIssue } from "./no-matching-tests-issue.mjs";
2
4
  import { GeoSpecPoolHostMessage, GeoSpecPoolShard, GeoSpecPoolWorkerHandle, GeoSpecPoolWorkerMessage } from "../pool/pool-messages.mjs";
3
5
  import { GeoSpecForensicEvent, GeoSpecRunner, GeoSpecRunnerEvent, GeoSpecRunnerFileResult, GeoSpecRunnerOptions, GeoSpecRunnerResult, GeoSpecRunnerRunOptions } from "./runner-types.mjs";
4
- export { type GeoSpecForensicEvent, type GeoSpecPoolHostMessage, type GeoSpecPoolShard, type GeoSpecPoolWorkerHandle, type GeoSpecPoolWorkerMessage, type GeoSpecRunner, type GeoSpecRunnerEvent, type GeoSpecRunnerFileResult, type GeoSpecRunnerOptions, type GeoSpecRunnerResult, type GeoSpecRunnerRunOptions, createNoMatchingGeoSpecTestsIssue };
6
+ export { type DiscoverGeoSpecFilesOptions, type GeoSpecDiscoveryFileSystem, type GeoSpecDiscoveryResult, type GeoSpecForensicEvent, type GeoSpecPoolHostMessage, type GeoSpecPoolShard, type GeoSpecPoolWorkerHandle, type GeoSpecPoolWorkerMessage, type GeoSpecRunner, type GeoSpecRunnerEvent, type GeoSpecRunnerFileResult, type GeoSpecRunnerOptions, type GeoSpecRunnerResult, type GeoSpecRunnerRunOptions, type GeoSpecTimeoutCode, createNoMatchingGeoSpecTestsIssue, discoverGeoSpecFiles, geoSpecTimeoutCode, isGeoSpecTimeoutCode };
@@ -1 +1 @@
1
- import{createNoMatchingGeoSpecTestsIssue as e}from"./no-matching-tests-issue.mjs";export{e as createNoMatchingGeoSpecTestsIssue};
1
+ import{geoSpecTimeoutCode as e,isGeoSpecTimeoutCode as t}from"../timeout-codes.mjs";import{discoverGeoSpecFiles as n}from"../discovery.mjs";import{createNoMatchingGeoSpecTestsIssue as r}from"./no-matching-tests-issue.mjs";export{r as createNoMatchingGeoSpecTestsIssue,n as discoverGeoSpecFiles,e as geoSpecTimeoutCode,t as isGeoSpecTimeoutCode};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "geospec",
3
- "version": "0.1.0-beta.6",
3
+ "version": "0.1.0-beta.7",
4
4
  "description": "Geometry specification API for CAD models: DSL, selector language, diagnostics schema, and the native runner integration",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -96,9 +96,9 @@
96
96
  "imports": {},
97
97
  "dependencies": {
98
98
  "zod": "4.4.3",
99
- "@taucad/esbuild": "0.1.0-beta.6",
100
- "@taucad/project-core": "0.1.0-beta.6",
101
- "@taucad/runtime": "0.1.0-beta.6"
99
+ "@taucad/esbuild": "0.1.0-beta.7",
100
+ "@taucad/runtime": "0.1.0-beta.7",
101
+ "@taucad/project-core": "0.1.0-beta.7"
102
102
  },
103
103
  "devDependencies": {
104
104
  "@gltf-transform/core": "^4.5.1"