@holoscript/core 8.0.12 → 8.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (166) hide show
  1. package/README.md +14 -0
  2. package/bin/holo-decision.mjs +133 -0
  3. package/dist/{GLTFPipeline-L76YTXKA.js → GLTFPipeline-6LS3UDYX.js} +6 -6
  4. package/dist/{GLTFPipeline-ZWJN7GI6.cjs → GLTFPipeline-VTI6PRRQ.cjs} +10 -10
  5. package/dist/{HoloCompositionParser-FLBZKFD3.js → HoloCompositionParser-GILABNN3.js} +5 -5
  6. package/dist/{HoloCompositionParser-3XEC7IJC.cjs → HoloCompositionParser-ZVRYVEA5.cjs} +12 -12
  7. package/dist/{HoloScriptPlusParser-RNUCHOAJ.cjs → HoloScriptPlusParser-WTPRPRPR.cjs} +8 -8
  8. package/dist/{HoloScriptPlusParser-55AY4MUF.js → HoloScriptPlusParser-ZP53ECSL.js} +5 -5
  9. package/dist/{SceneIRCompiler-KWUFHZ4O.cjs → SceneIRCompiler-7KQ5NKAU.cjs} +11 -11
  10. package/dist/{SceneIRCompiler-63KA3M2F.js → SceneIRCompiler-VX75RB6H.js} +6 -6
  11. package/dist/{chunk-EM2OGPYE.js → chunk-2GKF7JQ6.js} +3 -3
  12. package/dist/{chunk-HVX7QQYK.js → chunk-3KHRZTNW.js} +3 -3
  13. package/dist/{chunk-UTUD6GJI.js → chunk-42Z3SVHQ.js} +3 -3
  14. package/dist/{chunk-Z4IUBW46.js → chunk-47XZ62KM.js} +112 -55
  15. package/dist/{chunk-GGR7QUKK.cjs → chunk-4CRMVEON.cjs} +37 -37
  16. package/dist/{chunk-QBY7LRN2.js → chunk-4NEPHK2K.js} +3 -3
  17. package/dist/{chunk-65S62L4D.cjs → chunk-5B2AJKA5.cjs} +20 -20
  18. package/dist/{chunk-PJFTTSKE.js → chunk-5T6BWIB7.js} +4 -4
  19. package/dist/{chunk-KFVNCW4Q.js → chunk-62OYZT6Q.js} +3 -3
  20. package/dist/{chunk-3KMANSQJ.cjs → chunk-645EWDZW.cjs} +4 -4
  21. package/dist/{chunk-BP4KTMLY.js → chunk-6FCNMTL5.js} +4 -4
  22. package/dist/{chunk-77QI552M.js → chunk-73EDVY5D.js} +3 -3
  23. package/dist/{chunk-7IDJDMPU.cjs → chunk-7FYSSI3C.cjs} +27 -2
  24. package/dist/{chunk-WNYXT4TE.cjs → chunk-7ITJP33Q.cjs} +3 -3
  25. package/dist/chunk-7ZKQ32XK.js +1571 -0
  26. package/dist/{chunk-P7JEKJTZ.cjs → chunk-B6JHTTMR.cjs} +25 -14
  27. package/dist/{chunk-FG6PYGIZ.js → chunk-BLCWQ225.js} +4 -4
  28. package/dist/{chunk-7NPZZZD7.js → chunk-C73GVAYC.js} +16 -9
  29. package/dist/{chunk-RMOEL2GD.cjs → chunk-CESMPUEZ.cjs} +3794 -1137
  30. package/dist/{chunk-SQXAZHDG.js → chunk-CHIZSMWD.js} +3 -3
  31. package/dist/{chunk-G35CAQ7I.cjs → chunk-D44CEFY4.cjs} +5 -5
  32. package/dist/chunk-ERYKKPHW.cjs +1884 -0
  33. package/dist/{chunk-TYNRXRHF.js → chunk-EYHPTJ3F.js} +3695 -1045
  34. package/dist/{chunk-J3UHV5T4.cjs → chunk-FGXJPJ3W.cjs} +4 -4
  35. package/dist/{chunk-IJU6AS67.cjs → chunk-FHR2AVMA.cjs} +23 -23
  36. package/dist/{chunk-LMB555QB.cjs → chunk-FOM36K5I.cjs} +18 -18
  37. package/dist/{chunk-JBYBMBMW.js → chunk-FWKEY4LD.js} +3 -2
  38. package/dist/{chunk-ZRPALBQB.cjs → chunk-GGH3ZYDB.cjs} +5 -5
  39. package/dist/{chunk-2BYAUHBO.js → chunk-GI5YYZH6.js} +3 -3
  40. package/dist/{chunk-VTEXJOSD.cjs → chunk-GYJLP4BO.cjs} +30 -30
  41. package/dist/{chunk-OC6GV5QH.cjs → chunk-HCONR4J6.cjs} +38 -38
  42. package/dist/{chunk-B3CWTCK2.js → chunk-IA7FCSRY.js} +27 -2
  43. package/dist/{chunk-5FYMCVBY.js → chunk-IXFNA5TT.js} +4 -4
  44. package/dist/{chunk-G6KACNMO.js → chunk-JCVSCKUH.js} +4 -4
  45. package/dist/{chunk-FHVPN7BN.js → chunk-JQCXLKAU.js} +3 -3
  46. package/dist/{chunk-F3YT6GUF.cjs → chunk-KLM6QD6D.cjs} +14 -14
  47. package/dist/{chunk-UGQ3QNV6.js → chunk-KOGPVAP6.js} +24 -8
  48. package/dist/{chunk-CKV5NYAE.js → chunk-KYJD2UMV.js} +4 -4
  49. package/dist/{chunk-LB3ZZMKT.cjs → chunk-L4DBUX3N.cjs} +10 -10
  50. package/dist/{chunk-RXQNRZ5F.js → chunk-LGRKBTPM.js} +3 -3
  51. package/dist/{chunk-OMNHTCS4.cjs → chunk-LHUDAJQT.cjs} +3 -2
  52. package/dist/{chunk-PDXX5UI4.cjs → chunk-LQNL3IYV.cjs} +38 -38
  53. package/dist/{chunk-WWNCM473.js → chunk-M7XR3F53.js} +4 -4
  54. package/dist/{chunk-IFW5IW4L.cjs → chunk-ML4V5PVU.cjs} +670 -627
  55. package/dist/{chunk-656IAS7B.cjs → chunk-N7IYRAFG.cjs} +21 -14
  56. package/dist/chunk-N7MIIDLI.cjs +1605 -0
  57. package/dist/{chunk-USOUXQYD.js → chunk-NWKARJM2.js} +130 -22
  58. package/dist/{chunk-VVAAZITA.cjs → chunk-OOP4S3GU.cjs} +5 -5
  59. package/dist/{chunk-TX6ZBIF4.js → chunk-ORBVCOTC.js} +3 -3
  60. package/dist/{chunk-RRQIAJLQ.cjs → chunk-OSKGCXAQ.cjs} +5 -5
  61. package/dist/{chunk-QEDMOGF3.cjs → chunk-P65OIMJT.cjs} +7 -7
  62. package/dist/{chunk-QM7FJB5W.js → chunk-PSWCJQS4.js} +4 -4
  63. package/dist/{chunk-7N63JHUN.cjs → chunk-PZ46WRHX.cjs} +8 -8
  64. package/dist/{chunk-AATYYLYK.js → chunk-Q4J2K7FI.js} +16 -5
  65. package/dist/chunk-QLPRI3QW.js +1875 -0
  66. package/dist/{chunk-WTH23ISI.js → chunk-R5VKLUMR.js} +4 -4
  67. package/dist/{chunk-NQN5LFN4.cjs → chunk-REN3LHO6.cjs} +19 -19
  68. package/dist/{chunk-JEJ7TT54.js → chunk-RVN7OPCP.js} +4 -4
  69. package/dist/{chunk-ZK7KX5CD.cjs → chunk-SE2Y5BSL.cjs} +6 -6
  70. package/dist/{chunk-2X3IPCBK.cjs → chunk-SKVBUGMC.cjs} +7 -7
  71. package/dist/{chunk-GZPUA2TL.cjs → chunk-SNMQUWIO.cjs} +10 -10
  72. package/dist/{chunk-OIBRWLPY.cjs → chunk-TKDDIE3T.cjs} +54 -3
  73. package/dist/{chunk-5H5GFBMG.cjs → chunk-TMNAKNV2.cjs} +112 -55
  74. package/dist/{chunk-5LVFTGKH.js → chunk-TZQKJOPC.js} +3 -3
  75. package/dist/{chunk-TSTFYGGX.js → chunk-UKEK2NZJ.js} +3 -3
  76. package/dist/{chunk-3IUHTGDD.cjs → chunk-VA7THINF.cjs} +38 -38
  77. package/dist/{chunk-Z557DVYN.js → chunk-VMCR5QVI.js} +4 -4
  78. package/dist/{chunk-IS7NTKY5.cjs → chunk-VTFLKSJL.cjs} +14 -14
  79. package/dist/{chunk-VO52AJD5.js → chunk-VXHB6ZHY.js} +4 -4
  80. package/dist/{chunk-S4O7CFHQ.cjs → chunk-VZI7S7P6.cjs} +7 -7
  81. package/dist/{chunk-BQJ3YBF3.js → chunk-W4AJMMQR.js} +667 -628
  82. package/dist/{chunk-2KKOYZYI.cjs → chunk-XZC75AJ4.cjs} +5 -5
  83. package/dist/{chunk-FWCHPCD4.js → chunk-Y2OCKXVD.js} +4 -4
  84. package/dist/{chunk-EI5G5JLY.cjs → chunk-YBM34FUJ.cjs} +134 -22
  85. package/dist/{chunk-DUG3OQAS.js → chunk-YDSNDCV3.js} +3 -3
  86. package/dist/{chunk-566ZB4LZ.cjs → chunk-YM7UUYR5.cjs} +5 -5
  87. package/dist/{chunk-BCP4E7MD.cjs → chunk-YMI3ED3B.cjs} +26 -10
  88. package/dist/{chunk-CP7V3ATL.js → chunk-Z7NUL73U.js} +51 -4
  89. package/dist/cli/holoscript-runner.cjs +11 -11
  90. package/dist/cli/holoscript-runner.js +4 -4
  91. package/dist/compiler/agent-inference.cjs +8 -8
  92. package/dist/compiler/agent-inference.js +4 -4
  93. package/dist/compiler/android-xr.cjs +7 -7
  94. package/dist/compiler/android-xr.js +5 -5
  95. package/dist/compiler/android.cjs +6 -6
  96. package/dist/compiler/android.js +4 -4
  97. package/dist/compiler/context.cjs +6 -6
  98. package/dist/compiler/context.js +3 -3
  99. package/dist/compiler/daimon-seed.cjs +9 -9
  100. package/dist/compiler/daimon-seed.js +4 -4
  101. package/dist/compiler/domain-block-utils.cjs +165 -165
  102. package/dist/compiler/domain-block-utils.js +4 -4
  103. package/dist/compiler/dtdl.cjs +7 -7
  104. package/dist/compiler/dtdl.js +4 -4
  105. package/dist/compiler/gltf-pipeline.cjs +8 -8
  106. package/dist/compiler/gltf-pipeline.js +1 -1
  107. package/dist/compiler/godot.cjs +6 -6
  108. package/dist/compiler/godot.js +5 -5
  109. package/dist/compiler/incremental.cjs +8 -8
  110. package/dist/compiler/incremental.js +3 -3
  111. package/dist/compiler/index.cjs +871 -207
  112. package/dist/compiler/index.d.ts +21 -1
  113. package/dist/compiler/index.js +696 -60
  114. package/dist/compiler/ios.cjs +6 -6
  115. package/dist/compiler/ios.js +4 -4
  116. package/dist/compiler/llm-provider-capabilities.cjs +6 -6
  117. package/dist/compiler/llm-provider-capabilities.js +3 -3
  118. package/dist/compiler/openxr.cjs +6 -6
  119. package/dist/compiler/openxr.js +5 -5
  120. package/dist/compiler/sdf.cjs +7 -7
  121. package/dist/compiler/sdf.js +5 -5
  122. package/dist/compiler/state.cjs +6 -6
  123. package/dist/compiler/state.js +4 -4
  124. package/dist/compiler/trait-composition.cjs +7 -7
  125. package/dist/compiler/trait-composition.js +3 -3
  126. package/dist/compiler/unity.cjs +6 -6
  127. package/dist/compiler/unity.js +5 -5
  128. package/dist/compiler/unreal.cjs +7 -7
  129. package/dist/compiler/unreal.js +5 -5
  130. package/dist/compiler/urdf.cjs +14 -14
  131. package/dist/compiler/urdf.js +5 -5
  132. package/dist/compiler/usd-physics.cjs +7 -7
  133. package/dist/compiler/usd-physics.js +4 -4
  134. package/dist/compiler/visionos.cjs +6 -6
  135. package/dist/compiler/visionos.js +5 -5
  136. package/dist/compiler/vrchat.cjs +7 -7
  137. package/dist/compiler/vrchat.js +5 -5
  138. package/dist/compiler/wasm.cjs +10 -10
  139. package/dist/compiler/wasm.js +5 -5
  140. package/dist/compiler/webgpu.cjs +6 -6
  141. package/dist/compiler/webgpu.js +5 -5
  142. package/dist/constants.cjs +3 -3
  143. package/dist/constants.js +1 -1
  144. package/dist/entries/scripting.cjs +6 -6
  145. package/dist/entries/scripting.js +2 -2
  146. package/dist/evolution/index.cjs +21 -17
  147. package/dist/evolution/index.d.ts +9 -0
  148. package/dist/evolution/index.js +6 -6
  149. package/dist/index.cjs +930 -703
  150. package/dist/index.d.ts +70 -5
  151. package/dist/index.js +192 -109
  152. package/dist/parser.cjs +19 -19
  153. package/dist/parser.js +5 -5
  154. package/dist/reconstruction/index.cjs +127 -38
  155. package/dist/reconstruction/index.d.ts +159 -0
  156. package/dist/reconstruction/index.js +11 -2
  157. package/dist/runtime.d.ts +1 -0
  158. package/dist/traitDocs/traitDocs.cjs +8 -8
  159. package/dist/traitDocs/traitDocs.js +2 -2
  160. package/dist/traits/index.cjs +566 -471
  161. package/dist/traits/index.js +93 -11
  162. package/package.json +25 -41
  163. package/dist/chunk-G3BM3CT4.cjs +0 -639
  164. package/dist/chunk-KEYG7HGY.js +0 -1062
  165. package/dist/chunk-QX34ELJ7.js +0 -625
  166. package/dist/chunk-W2GA3EQB.cjs +0 -1065
@@ -1,5 +1,5 @@
1
- import { parseHolo } from './chunk-FHVPN7BN.js';
2
- import { parse } from './chunk-7NPZZZD7.js';
1
+ import { parseHolo } from './chunk-JQCXLKAU.js';
2
+ import { parse } from './chunk-C73GVAYC.js';
3
3
 
4
4
  // src/evolution/EvolveProgramBackend.ts
5
5
  async function sha256Hex(s) {
@@ -7,6 +7,24 @@ async function sha256Hex(s) {
7
7
  const digest = await globalThis.crypto.subtle.digest("SHA-256", bytes);
8
8
  return Array.from(new Uint8Array(digest)).map((b) => b.toString(16).padStart(2, "0")).join("");
9
9
  }
10
+ function buildProposerPrompt(parentCode, goal) {
11
+ return `You are improving a program toward a goal. GOAL: ${goal}
12
+
13
+ Return ONLY the full revised program - no prose, no explanation, no markdown code fences.
14
+
15
+ --- CURRENT PROGRAM ---
16
+ ${parentCode}
17
+ --- END ---`;
18
+ }
19
+ function stripMarkdownFences(text) {
20
+ return text.trim().replace(/^```[a-z]*\n?/i, "").replace(/\n?```$/i, "").trim();
21
+ }
22
+ function openAICompatibleChatUrl(endpoint) {
23
+ const base = endpoint.replace(/\/+$/, "");
24
+ if (/\/chat\/completions$/i.test(base)) return base;
25
+ if (/\/v1$/i.test(base)) return `${base}/chat/completions`;
26
+ return `${base}/v1/chat/completions`;
27
+ }
10
28
  async function runEvolution(seedCode, policy, io) {
11
29
  const now = io.now ?? (() => (/* @__PURE__ */ new Date()).toISOString());
12
30
  const trace = [];
@@ -130,13 +148,7 @@ async function runEvolution(seedCode, policy, io) {
130
148
  function makeOllamaProposer(endpoint, model) {
131
149
  const base = endpoint.replace(/\/+$/, "");
132
150
  return async (parentCode, goal) => {
133
- const prompt = `You are improving a program toward a goal. GOAL: ${goal}
134
-
135
- Return ONLY the full revised program \u2014 no prose, no explanation, no markdown code fences.
136
-
137
- --- CURRENT PROGRAM ---
138
- ${parentCode}
139
- --- END ---`;
151
+ const prompt = buildProposerPrompt(parentCode, goal);
140
152
  const res = await fetch(`${base}/api/generate`, {
141
153
  method: "POST",
142
154
  headers: { "content-type": "application/json" },
@@ -144,7 +156,44 @@ ${parentCode}
144
156
  });
145
157
  if (!res.ok) throw new Error(`ollama ${res.status}`);
146
158
  const body = await res.json();
147
- return (body.response ?? "").trim().replace(/^```[a-z]*\n?/i, "").replace(/\n?```$/i, "").trim();
159
+ return stripMarkdownFences(body.response ?? "");
160
+ };
161
+ }
162
+ function makeOpenAICompatibleProposer(endpoint, model, opts = {}) {
163
+ const fetchImpl = opts.fetchImpl ?? fetch;
164
+ const temperature = opts.temperature ?? 0.7;
165
+ return async (parentCode, goal) => {
166
+ const headers = { "content-type": "application/json" };
167
+ if (opts.apiKey) headers.authorization = `Bearer ${opts.apiKey}`;
168
+ const res = await fetchImpl(openAICompatibleChatUrl(endpoint), {
169
+ method: "POST",
170
+ headers,
171
+ body: JSON.stringify({
172
+ model,
173
+ stream: false,
174
+ temperature,
175
+ ...opts.maxTokens == null ? {} : { max_tokens: opts.maxTokens },
176
+ messages: [
177
+ {
178
+ role: "system",
179
+ content: "You are a HoloScript program-evolution proposer. Return only the full revised program."
180
+ },
181
+ { role: "user", content: buildProposerPrompt(parentCode, goal) }
182
+ ]
183
+ })
184
+ });
185
+ const raw = await res.text();
186
+ if (!res.ok) throw new Error(`openai-compatible ${res.status}: ${raw.slice(0, 160)}`);
187
+ let body;
188
+ try {
189
+ body = JSON.parse(raw);
190
+ } catch {
191
+ throw new Error("openai-compatible invalid JSON response");
192
+ }
193
+ const content = body.choices?.[0]?.message?.content ?? body.choices?.[0]?.text ?? "";
194
+ const code = stripMarkdownFences(content);
195
+ if (!code) throw new Error("openai-compatible empty response");
196
+ return code;
148
197
  };
149
198
  }
150
199
  function toGradedTraceRow(rec, opts) {
@@ -208,7 +257,8 @@ var CORPUS_PORTFOLIO = [
208
257
  " }",
209
258
  "}"
210
259
  ].join("\n"),
211
- preserved: [/PatrolBot/, /\bidle\b/, /\bchasing\b/]
260
+ preserved: [/PatrolBot/, /\bidle\b/, /\bchasing\b/],
261
+ semanticCheck: stateMachineSemanticCheck
212
262
  },
213
263
  {
214
264
  name: "mini-scene",
@@ -282,7 +332,8 @@ var CORPUS_PORTFOLIO = [
282
332
  " }",
283
333
  "}"
284
334
  ].join("\n"),
285
- preserved: [/SmartDoor/, /\bclosed\b/, /\bopening\b/, /\bopen\b/]
335
+ preserved: [/SmartDoor/, /\bclosed\b/, /\bopening\b/, /\bopen\b/],
336
+ semanticCheck: stateMachineSemanticCheck
286
337
  },
287
338
  {
288
339
  name: "trafficlight-statemachine",
@@ -301,7 +352,8 @@ var CORPUS_PORTFOLIO = [
301
352
  " }",
302
353
  "}"
303
354
  ].join("\n"),
304
- preserved: [/TrafficLight/, /\bred\b/, /\bgreen\b/, /\byellow\b/]
355
+ preserved: [/TrafficLight/, /\bred\b/, /\bgreen\b/, /\byellow\b/],
356
+ semanticCheck: stateMachineSemanticCheck
305
357
  },
306
358
  {
307
359
  name: "room-scene",
@@ -349,17 +401,73 @@ function parsesClean(src, format) {
349
401
  return false;
350
402
  }
351
403
  }
404
+ function findStateMachineConfig(node) {
405
+ if (!node || typeof node !== "object") return null;
406
+ const obj = node;
407
+ if (obj.name === "state_machine" && obj.config && typeof obj.config === "object") {
408
+ const cfg = obj.config;
409
+ if (cfg.states && typeof cfg.states === "object") return cfg;
410
+ }
411
+ for (const v of Object.values(obj)) {
412
+ if (Array.isArray(v)) {
413
+ for (const e of v) {
414
+ const f = findStateMachineConfig(e);
415
+ if (f) return f;
416
+ }
417
+ } else if (v && typeof v === "object") {
418
+ const f = findStateMachineConfig(v);
419
+ if (f) return f;
420
+ }
421
+ }
422
+ return null;
423
+ }
424
+ function extractStateMachine(ast) {
425
+ const cfg = findStateMachineConfig(ast);
426
+ if (!cfg) return null;
427
+ const statesObj = cfg.states;
428
+ const states = Object.keys(statesObj);
429
+ const transitions = [];
430
+ for (const from of states) {
431
+ const events = statesObj[from];
432
+ if (!events || typeof events !== "object") continue;
433
+ for (const event of Object.keys(events)) {
434
+ const t = events[event];
435
+ if (t && typeof t.target === "string") transitions.push({ from, event, target: t.target });
436
+ }
437
+ }
438
+ return { states, initial: typeof cfg.initial === "string" ? cfg.initial : "", transitions };
439
+ }
440
+ function stateMachineWellFormed(ast) {
441
+ const sm = extractStateMachine(ast);
442
+ if (!sm) return false;
443
+ const defined = new Set(sm.states);
444
+ return defined.has(sm.initial) && sm.transitions.every((t) => defined.has(t.target));
445
+ }
446
+ function stateMachineSemanticCheck(_candidate, ast) {
447
+ const sm = extractStateMachine(ast);
448
+ if (!sm) return { ok: false, reason: "no_state_machine" };
449
+ const defined = new Set(sm.states);
450
+ if (!defined.has(sm.initial)) return { ok: false, reason: `initial_undefined:${sm.initial}` };
451
+ const dangling = sm.transitions.filter((t) => !defined.has(t.target));
452
+ if (dangling.length) {
453
+ return { ok: false, reason: `dangling_transition:${dangling.map((d) => `${d.from}-${d.event}->${d.target}`).join(",")}` };
454
+ }
455
+ return { ok: true };
456
+ }
352
457
  function makeSeedGate(seed) {
353
- return async (candidate) => ({
354
- passed: parsesClean(candidate, seed.format) && seed.preserved.every((re) => re.test(candidate)),
355
- score: candidate.length
356
- });
458
+ return async (candidate) => {
459
+ const r = seed.format === "holo" ? parseHolo(candidate) : parse(candidate);
460
+ const clean = Boolean(r.success && r.ast) && (r.errors?.length ?? 0) === 0;
461
+ const preservedOk = clean && seed.preserved.every((re) => re.test(candidate));
462
+ const passed = preservedOk && (!seed.semanticCheck || seed.semanticCheck(candidate, r.ast).ok);
463
+ return { passed, score: candidate.length };
464
+ };
357
465
  }
358
466
  async function accrueOneStep(opts) {
359
467
  const seed = opts.seed ?? CORPUS_PORTFOLIO[(opts.tick ?? 0) % CORPUS_PORTFOLIO.length];
360
468
  const now = opts.now ?? (() => (/* @__PURE__ */ new Date()).toISOString());
361
469
  const rows = [];
362
- await runEvolution(
470
+ const { receipt } = await runEvolution(
363
471
  seed.source,
364
472
  { goal: seed.goal, generations: 1, population: 1, archiveSize: 4, proposerModel: "sovereign-local" },
365
473
  {
@@ -368,7 +476,7 @@ async function accrueOneStep(opts) {
368
476
  onCandidate: (rec) => rows.push(toGradedTraceRow(rec, { agentId: opts.agentId, ts: now(), source: `evolve-corpus:${seed.name}` }))
369
477
  }
370
478
  );
371
- return { target: seed.name, rows };
479
+ return { target: seed.name, rows, receipt };
372
480
  }
373
481
  function dedupRows(existingCorpus, rows) {
374
482
  const seen = /* @__PURE__ */ new Set();
@@ -485,6 +593,6 @@ function makeWasmCompilerFitnessGate(compileCandidate, opts = {}) {
485
593
  };
486
594
  }
487
595
 
488
- export { CORPUS_PORTFOLIO, accrueOneStep, dedupRows, makeOllamaProposer, makeSeedGate, makeWasmCompilerFitnessGate, parsesClean, runEvolution, scoreWasmCompilerArtifact, toGradedTraceRow, wasmFitnessBaselineFromScenario };
489
- //# sourceMappingURL=chunk-USOUXQYD.js.map
490
- //# sourceMappingURL=chunk-USOUXQYD.js.map
596
+ export { CORPUS_PORTFOLIO, accrueOneStep, dedupRows, extractStateMachine, makeOllamaProposer, makeOpenAICompatibleProposer, makeSeedGate, makeWasmCompilerFitnessGate, parsesClean, runEvolution, scoreWasmCompilerArtifact, stateMachineSemanticCheck, stateMachineWellFormed, toGradedTraceRow, wasmFitnessBaselineFromScenario };
597
+ //# sourceMappingURL=chunk-NWKARJM2.js.map
598
+ //# sourceMappingURL=chunk-NWKARJM2.js.map
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var chunk356N4NPM_cjs = require('./chunk-356N4NPM.cjs');
4
- var chunkZK7KX5CD_cjs = require('./chunk-ZK7KX5CD.cjs');
4
+ var chunkSE2Y5BSL_cjs = require('./chunk-SE2Y5BSL.cjs');
5
5
  var chunkZHPMP447_cjs = require('./chunk-ZHPMP447.cjs');
6
6
  var crypto = require('crypto');
7
7
  var ans = require('@holoscript/core-types/ans');
@@ -149,7 +149,7 @@ function createDaimonSeedCompiler(options) {
149
149
  var SCHEMA_VERSION, DEFAULT_THRESHOLD_FACTS, DEFAULT_THRESHOLD_FN; exports.DaimonSeedCompiler = void 0; exports.DaimonSeedCompiler_default = void 0;
150
150
  var init_DaimonSeedCompiler = chunkZHPMP447_cjs.__esm({
151
151
  "src/compiler/DaimonSeedCompiler.ts"() {
152
- chunkZK7KX5CD_cjs.init_CompilerBase();
152
+ chunkSE2Y5BSL_cjs.init_CompilerBase();
153
153
  chunk356N4NPM_cjs.init_jsonLogic();
154
154
  SCHEMA_VERSION = "holoscript.daimon-seed.v0.1.0";
155
155
  DEFAULT_THRESHOLD_FACTS = {
@@ -164,7 +164,7 @@ var init_DaimonSeedCompiler = chunkZHPMP447_cjs.__esm({
164
164
  { ">=": [{ var: "measuredValueIndependence" }, 0.5] }
165
165
  ]
166
166
  };
167
- exports.DaimonSeedCompiler = class extends chunkZK7KX5CD_cjs.CompilerBase {
167
+ exports.DaimonSeedCompiler = class extends chunkSE2Y5BSL_cjs.CompilerBase {
168
168
  constructor(options = {}) {
169
169
  super();
170
170
  this.compilerName = "DaimonSeedCompiler";
@@ -283,5 +283,5 @@ exports.computeExportFidelity = computeExportFidelity;
283
283
  exports.createDaimonSeedCompiler = createDaimonSeedCompiler;
284
284
  exports.init_DaimonSeedCompiler = init_DaimonSeedCompiler;
285
285
  exports.runHysteresisExp2 = runHysteresisExp2;
286
- //# sourceMappingURL=chunk-VVAAZITA.cjs.map
287
- //# sourceMappingURL=chunk-VVAAZITA.cjs.map
286
+ //# sourceMappingURL=chunk-OOP4S3GU.cjs.map
287
+ //# sourceMappingURL=chunk-OOP4S3GU.cjs.map
@@ -1,4 +1,4 @@
1
- import { HoloScriptPlusParser } from './chunk-7NPZZZD7.js';
1
+ import { HoloScriptPlusParser } from './chunk-C73GVAYC.js';
2
2
 
3
3
  // src/parser/HsplusGrammar.ts
4
4
  function normalizeHsplusGrammarErrors(errors) {
@@ -124,5 +124,5 @@ var GrammarModuleRegistryImpl = class {
124
124
  var GrammarModuleRegistry = new GrammarModuleRegistryImpl();
125
125
 
126
126
  export { GrammarModuleRegistry, TypeScriptHsplusGrammar, normalizeHsplusGrammarErrors };
127
- //# sourceMappingURL=chunk-TX6ZBIF4.js.map
128
- //# sourceMappingURL=chunk-TX6ZBIF4.js.map
127
+ //# sourceMappingURL=chunk-ORBVCOTC.js.map
128
+ //# sourceMappingURL=chunk-ORBVCOTC.js.map
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkZK7KX5CD_cjs = require('./chunk-ZK7KX5CD.cjs');
3
+ var chunkSE2Y5BSL_cjs = require('./chunk-SE2Y5BSL.cjs');
4
4
  var chunkZHPMP447_cjs = require('./chunk-ZHPMP447.cjs');
5
5
  var ans = require('@holoscript/core-types/ans');
6
6
 
@@ -14,8 +14,8 @@ chunkZHPMP447_cjs.__export(DTDLCompiler_exports, {
14
14
  exports.DTDLCompiler = void 0; exports.DTDL_TRAIT_COMPONENTS = void 0; exports.DTDLCompiler_default = void 0;
15
15
  var init_DTDLCompiler = chunkZHPMP447_cjs.__esm({
16
16
  "src/compiler/DTDLCompiler.ts"() {
17
- chunkZK7KX5CD_cjs.init_CompilerBase();
18
- exports.DTDLCompiler = class extends chunkZK7KX5CD_cjs.CompilerBase {
17
+ chunkSE2Y5BSL_cjs.init_CompilerBase();
18
+ exports.DTDLCompiler = class extends chunkSE2Y5BSL_cjs.CompilerBase {
19
19
  constructor(options = {}) {
20
20
  super();
21
21
  this.compilerName = "DTDLCompiler";
@@ -420,5 +420,5 @@ var init_DTDLCompiler = chunkZHPMP447_cjs.__esm({
420
420
 
421
421
  exports.DTDLCompiler_exports = DTDLCompiler_exports;
422
422
  exports.init_DTDLCompiler = init_DTDLCompiler;
423
- //# sourceMappingURL=chunk-RRQIAJLQ.cjs.map
424
- //# sourceMappingURL=chunk-RRQIAJLQ.cjs.map
423
+ //# sourceMappingURL=chunk-OSKGCXAQ.cjs.map
424
+ //# sourceMappingURL=chunk-OSKGCXAQ.cjs.map
@@ -1,12 +1,12 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkVHORVGCG_cjs = require('./chunk-VHORVGCG.cjs');
4
- var chunkZK7KX5CD_cjs = require('./chunk-ZK7KX5CD.cjs');
4
+ var chunkSE2Y5BSL_cjs = require('./chunk-SE2Y5BSL.cjs');
5
5
  var chunkZHPMP447_cjs = require('./chunk-ZHPMP447.cjs');
6
6
 
7
7
  // src/compiler/DomainBlockCompilerMixin.ts
8
8
  function esc(value, target) {
9
- return chunkZK7KX5CD_cjs.escapeStringValue(value, target);
9
+ return chunkSE2Y5BSL_cjs.escapeStringValue(value, target);
10
10
  }
11
11
  function isPhysicalMaterial(mat) {
12
12
  return PHYSICAL_MATERIAL_KEYS.some((k) => mat[k] !== void 0);
@@ -4647,13 +4647,13 @@ function hexToRGBA(hex, alpha) {
4647
4647
  ];
4648
4648
  }
4649
4649
  function getRequiredCapability() {
4650
- return chunkZK7KX5CD_cjs.ANSCapabilityPath.DOMAIN_BLOCK;
4650
+ return chunkSE2Y5BSL_cjs.ANSCapabilityPath.DOMAIN_BLOCK;
4651
4651
  }
4652
4652
  var PHYSICAL_MATERIAL_KEYS, mgToVec3, mgToF32; exports.DOMAIN_BLOCK_COMPILER_MIXIN_CAPABILITY = void 0;
4653
4653
  var init_DomainBlockCompilerMixin = chunkZHPMP447_cjs.__esm({
4654
4654
  "src/compiler/DomainBlockCompilerMixin.ts"() {
4655
- chunkZK7KX5CD_cjs.init_CompilerBase();
4656
- chunkZK7KX5CD_cjs.init_ANSNamespace();
4655
+ chunkSE2Y5BSL_cjs.init_CompilerBase();
4656
+ chunkSE2Y5BSL_cjs.init_ANSNamespace();
4657
4657
  chunkVHORVGCG_cjs.init_PerceptualColorPass();
4658
4658
  PHYSICAL_MATERIAL_KEYS = [
4659
4659
  "clearcoat",
@@ -4835,5 +4835,5 @@ exports.web3ToR3F = web3ToR3F;
4835
4835
  exports.web3ToUSDA = web3ToUSDA;
4836
4836
  exports.web3ToUnity = web3ToUnity;
4837
4837
  exports.web3ToVRChat = web3ToVRChat;
4838
- //# sourceMappingURL=chunk-QEDMOGF3.cjs.map
4839
- //# sourceMappingURL=chunk-QEDMOGF3.cjs.map
4838
+ //# sourceMappingURL=chunk-P65OIMJT.cjs.map
4839
+ //# sourceMappingURL=chunk-P65OIMJT.cjs.map
@@ -4,9 +4,9 @@ import { TraitVisualRegistry, TraitCompositor } from './chunk-ZVQMKUGJ.js';
4
4
  import { createBotanicalLotusRenderProfile, buildLotusPetalMaterialSpec, LOTUS_PETAL_UNIFORM_BINDINGS, buildLotusPetalGeometryData, lotusPetalGeometryParamsFromProfile, buildLotusFlowerPlacements, buildLotusSceneScaffold } from './chunk-VKCTYLDN.js';
5
5
  import { ProvenanceSemiring } from './chunk-DQRJ5RJG.js';
6
6
  import { init_PlatformConditionalCompilerMixin, createPlatformTarget, PlatformConditionalCompilerMixin } from './chunk-DJNH4HFW.js';
7
- import { init_DomainBlockCompilerMixin, compileDomainBlocks, compileSimulationBlock, simulationToR3F, compileWeatherBlock, weatherToR3F, compileAudioSourceBlock, audioSourceToR3F, compilePostProcessingBlock, postProcessingToR3F, compileParticleBlock, particlesToR3F, compilePhysicsBlock, physicsToR3F, compileMaterialBlock, materialToR3F, compileProceduralBlock } from './chunk-5LVFTGKH.js';
7
+ import { init_DomainBlockCompilerMixin, compileDomainBlocks, compileSimulationBlock, simulationToR3F, compileWeatherBlock, weatherToR3F, compileAudioSourceBlock, audioSourceToR3F, compilePostProcessingBlock, postProcessingToR3F, compileParticleBlock, particlesToR3F, compilePhysicsBlock, physicsToR3F, compileMaterialBlock, materialToR3F, compileProceduralBlock } from './chunk-TZQKJOPC.js';
8
8
  import { init_PerceptualColorPass, applyPerceptualColorPass } from './chunk-UCVZXQ63.js';
9
- import { init_AgentRBAC, init_CompilerBase, getRBAC, UnauthorizedCompilerAccessError, escapeStringValue } from './chunk-DUG3OQAS.js';
9
+ import { init_AgentRBAC, init_CompilerBase, getRBAC, UnauthorizedCompilerAccessError, escapeStringValue } from './chunk-YDSNDCV3.js';
10
10
  import { mulberry32 } from './chunk-GLEJ2TLS.js';
11
11
 
12
12
  // src/compiler/SceneIRCompiler.ts
@@ -4713,5 +4713,5 @@ var SceneIRCompiler = class {
4713
4713
  };
4714
4714
 
4715
4715
  export { ENVIRONMENT_PRESETS, MATERIAL_PRESETS, QUALITY_TIER_SCALES, SceneIRCompiler, UI_COMPONENT_PRESETS, registerAllPresets };
4716
- //# sourceMappingURL=chunk-QM7FJB5W.js.map
4717
- //# sourceMappingURL=chunk-QM7FJB5W.js.map
4716
+ //# sourceMappingURL=chunk-PSWCJQS4.js.map
4717
+ //# sourceMappingURL=chunk-PSWCJQS4.js.map
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkR75BSDH7_cjs = require('./chunk-R75BSDH7.cjs');
4
- var chunkZK7KX5CD_cjs = require('./chunk-ZK7KX5CD.cjs');
4
+ var chunkSE2Y5BSL_cjs = require('./chunk-SE2Y5BSL.cjs');
5
5
  var chunkQ47JEE2C_cjs = require('./chunk-Q47JEE2C.cjs');
6
6
  var crypto = require('crypto');
7
7
 
@@ -727,7 +727,7 @@ var ImportResolver = class {
727
727
  throw new Error(`File not found: '${canonicalPath}' (imported from '${importedBy}')`);
728
728
  }
729
729
  }
730
- const { HoloScriptPlusParser } = await import('./HoloScriptPlusParser-RNUCHOAJ.cjs');
730
+ const { HoloScriptPlusParser } = await import('./HoloScriptPlusParser-WTPRPRPR.cjs');
731
731
  const parser = new HoloScriptPlusParser({ enableTypeScriptImports: true });
732
732
  const result = parser.parse(source);
733
733
  if (!result.success && result.errors.length > 0) {
@@ -1268,8 +1268,8 @@ function createSemanticCache(options) {
1268
1268
  }
1269
1269
 
1270
1270
  // src/compiler/IncrementalCompiler.ts
1271
- chunkZK7KX5CD_cjs.init_AgentRBAC();
1272
- chunkZK7KX5CD_cjs.init_CompilerBase();
1271
+ chunkSE2Y5BSL_cjs.init_AgentRBAC();
1272
+ chunkSE2Y5BSL_cjs.init_CompilerBase();
1273
1273
  chunkQ47JEE2C_cjs.init_safeJsonParse();
1274
1274
  function hashContent(content) {
1275
1275
  let hash = 0;
@@ -1772,7 +1772,7 @@ var IncrementalCompiler = class _IncrementalCompiler {
1772
1772
  */
1773
1773
  validateAccess(agentToken) {
1774
1774
  if (!agentToken) return;
1775
- const rbac = chunkZK7KX5CD_cjs.getRBAC();
1775
+ const rbac = chunkSE2Y5BSL_cjs.getRBAC();
1776
1776
  const decision = rbac.checkAccess({
1777
1777
  token: agentToken,
1778
1778
  resourceType: "ast" /* AST */,
@@ -1997,7 +1997,7 @@ function deserializeCache(json) {
1997
1997
  }
1998
1998
  return compiler;
1999
1999
  }
2000
- var UnauthorizedIncrementalCompilerAccessError = class extends chunkZK7KX5CD_cjs.UnauthorizedCompilerAccessError {
2000
+ var UnauthorizedIncrementalCompilerAccessError = class extends chunkSE2Y5BSL_cjs.UnauthorizedCompilerAccessError {
2001
2001
  constructor(decision, compilerName) {
2002
2002
  super(decision, "incremental compilation", compilerName);
2003
2003
  this.name = "UnauthorizedIncrementalCompilerAccessError";
@@ -2011,5 +2011,5 @@ exports.createIncrementalCompiler = createIncrementalCompiler;
2011
2011
  exports.deserializeCache = deserializeCache;
2012
2012
  exports.globalTraitGraph = globalTraitGraph;
2013
2013
  exports.serializeCache = serializeCache;
2014
- //# sourceMappingURL=chunk-7N63JHUN.cjs.map
2015
- //# sourceMappingURL=chunk-7N63JHUN.cjs.map
2014
+ //# sourceMappingURL=chunk-PZ46WRHX.cjs.map
2015
+ //# sourceMappingURL=chunk-PZ46WRHX.cjs.map
@@ -1,5 +1,5 @@
1
- import { init_DomainBlockCompilerMixin, compileDomainBlocks, compileWeatherBlock, compileAudioSourceBlock, compilePhysicsBlock, physicsToURDF, compileMaterialBlock } from './chunk-5LVFTGKH.js';
2
- import { init_CompilerBase, CompilerBase } from './chunk-DUG3OQAS.js';
1
+ import { init_DomainBlockCompilerMixin, compileDomainBlocks, compileWeatherBlock, compileAudioSourceBlock, compilePhysicsBlock, physicsToURDF, compileMaterialBlock } from './chunk-TZQKJOPC.js';
2
+ import { init_CompilerBase, CompilerBase } from './chunk-YDSNDCV3.js';
3
3
  import { __export, __esm } from './chunk-W4GABFCR.js';
4
4
  import { ANSCapabilityPath } from '@holoscript/core-types/ans';
5
5
 
@@ -775,17 +775,28 @@ var init_URDFCompiler = __esm({
775
775
  inertia: { ixx: 1e-3, ixy: 0, ixz: 0, iyy: 1e-3, iyz: 0, izz: 1e-3 }
776
776
  }
777
777
  });
778
+ const groupPos = group.properties?.find((p) => p.key === "position")?.value;
779
+ const [gx, gy, gz] = Array.isArray(groupPos) ? groupPos : [0, 0, 0];
778
780
  this.joints.push({
779
781
  name: `${parentLink}_to_${groupLinkName}_joint`,
780
782
  type: "fixed",
781
783
  parent: parentLink,
782
- child: groupLinkName
784
+ child: groupLinkName,
785
+ origin: {
786
+ xyz: [gx, gy, gz],
787
+ rpy: [0, 0, 0]
788
+ }
783
789
  });
784
790
  if (group.objects) {
785
791
  for (const obj of group.objects) {
786
792
  this.processObject(obj, groupLinkName, actuatedJoints);
787
793
  }
788
794
  }
795
+ if (group.groups) {
796
+ for (const sub of group.groups) {
797
+ this.processSpatialGroup(sub, groupLinkName, actuatedJoints);
798
+ }
799
+ }
789
800
  }
790
801
  /** Process @sensor trait into sensor definition */
791
802
  processSensorTrait(config, parentLink) {
@@ -1407,5 +1418,5 @@ var init_URDFCompiler = __esm({
1407
1418
  });
1408
1419
 
1409
1420
  export { URDFCompiler, URDFCompiler_default, URDFCompiler_exports, compileForGazebo, compileForIsaacSim, compileForROS2, compileToURDF, createURDFCompiler, generateControllersYaml, generateROS2LaunchFile, init_URDFCompiler };
1410
- //# sourceMappingURL=chunk-AATYYLYK.js.map
1411
- //# sourceMappingURL=chunk-AATYYLYK.js.map
1421
+ //# sourceMappingURL=chunk-Q4J2K7FI.js.map
1422
+ //# sourceMappingURL=chunk-Q4J2K7FI.js.map