@holoscript/core 8.0.11 → 8.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{HoloCompositionParser-3XEC7IJC.cjs → HoloCompositionParser-6GW2BZID.cjs} +3 -3
- package/dist/{HoloCompositionParser-FLBZKFD3.js → HoloCompositionParser-P4Y3CXKQ.js} +3 -3
- package/dist/{HoloScriptPlusParser-55AY4MUF.js → HoloScriptPlusParser-HQV6IJAH.js} +4 -4
- package/dist/{HoloScriptPlusParser-RNUCHOAJ.cjs → HoloScriptPlusParser-RFNHRMPE.cjs} +7 -7
- package/dist/{chunk-4VVHNBCO.js → chunk-A4OOLBZD.js} +112 -55
- package/dist/{chunk-TYNRXRHF.js → chunk-DJ5BNRIS.js} +30 -9
- package/dist/{chunk-P534AGP5.cjs → chunk-DVHZD5HV.cjs} +5 -5
- package/dist/{chunk-7NPZZZD7.js → chunk-FRSKLX6I.js} +8 -4
- package/dist/{chunk-JBYBMBMW.js → chunk-FWKEY4LD.js} +3 -2
- package/dist/{chunk-USOUXQYD.js → chunk-G6EKZHXY.js} +129 -21
- package/dist/{chunk-2TAN7H54.js → chunk-G72754QB.js} +3 -3
- package/dist/{chunk-OMNHTCS4.cjs → chunk-LHUDAJQT.cjs} +3 -2
- package/dist/{chunk-KEYG7HGY.js → chunk-ONPVM4IV.js} +163 -3
- package/dist/{chunk-RMOEL2GD.cjs → chunk-PXVAPGTR.cjs} +31 -10
- package/dist/{chunk-656IAS7B.cjs → chunk-Q4K2GEMW.cjs} +10 -6
- package/dist/{chunk-VO52AJD5.js → chunk-RVNXBF2M.js} +3 -3
- package/dist/{chunk-7N63JHUN.cjs → chunk-RZ2EPXO3.cjs} +3 -3
- package/dist/{chunk-UDGTX7LY.cjs → chunk-SQAAWO4V.cjs} +112 -55
- package/dist/{chunk-W2GA3EQB.cjs → chunk-TC7JEO6R.cjs} +163 -3
- package/dist/{chunk-TX6ZBIF4.js → chunk-U3D4SYQ5.js} +3 -3
- package/dist/{chunk-EI5G5JLY.cjs → chunk-XF63CZ7E.cjs} +133 -21
- package/dist/{chunk-3KMANSQJ.cjs → chunk-Y57AVOM2.cjs} +4 -4
- package/dist/cli/holoscript-runner.cjs +9 -9
- package/dist/cli/holoscript-runner.js +2 -2
- package/dist/compiler/incremental.cjs +6 -6
- package/dist/compiler/incremental.js +1 -1
- package/dist/compiler/index.cjs +84 -84
- package/dist/compiler/index.js +5 -5
- package/dist/compiler/webgpu.cjs +3 -3
- package/dist/compiler/webgpu.js +2 -2
- package/dist/constants.cjs +3 -3
- package/dist/constants.js +1 -1
- package/dist/entries/scripting.cjs +1 -1
- package/dist/entries/scripting.js +1 -1
- package/dist/evolution/index.cjs +19 -15
- package/dist/evolution/index.d.ts +9 -0
- package/dist/evolution/index.js +4 -4
- package/dist/index.cjs +196 -180
- package/dist/index.js +15 -15
- package/dist/parser.cjs +13 -13
- package/dist/parser.js +3 -3
- package/dist/reconstruction/index.cjs +38 -38
- package/dist/reconstruction/index.js +2 -2
- package/dist/traits/index.cjs +4 -4
- package/dist/traits/index.js +1 -1
- package/package.json +20 -40
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HoloScriptPlusParser } from './chunk-
|
|
1
|
+
import { HoloScriptPlusParser } from './chunk-FRSKLX6I.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-
|
|
128
|
-
//# sourceMappingURL=chunk-
|
|
127
|
+
//# sourceMappingURL=chunk-U3D4SYQ5.js.map
|
|
128
|
+
//# sourceMappingURL=chunk-U3D4SYQ5.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkJ3UHV5T4_cjs = require('./chunk-J3UHV5T4.cjs');
|
|
4
|
-
var
|
|
4
|
+
var chunkQ4K2GEMW_cjs = require('./chunk-Q4K2GEMW.cjs');
|
|
5
5
|
|
|
6
6
|
// src/evolution/EvolveProgramBackend.ts
|
|
7
7
|
async function sha256Hex(s) {
|
|
@@ -9,6 +9,24 @@ async function sha256Hex(s) {
|
|
|
9
9
|
const digest = await globalThis.crypto.subtle.digest("SHA-256", bytes);
|
|
10
10
|
return Array.from(new Uint8Array(digest)).map((b) => b.toString(16).padStart(2, "0")).join("");
|
|
11
11
|
}
|
|
12
|
+
function buildProposerPrompt(parentCode, goal) {
|
|
13
|
+
return `You are improving a program toward a goal. GOAL: ${goal}
|
|
14
|
+
|
|
15
|
+
Return ONLY the full revised program - no prose, no explanation, no markdown code fences.
|
|
16
|
+
|
|
17
|
+
--- CURRENT PROGRAM ---
|
|
18
|
+
${parentCode}
|
|
19
|
+
--- END ---`;
|
|
20
|
+
}
|
|
21
|
+
function stripMarkdownFences(text) {
|
|
22
|
+
return text.trim().replace(/^```[a-z]*\n?/i, "").replace(/\n?```$/i, "").trim();
|
|
23
|
+
}
|
|
24
|
+
function openAICompatibleChatUrl(endpoint) {
|
|
25
|
+
const base = endpoint.replace(/\/+$/, "");
|
|
26
|
+
if (/\/chat\/completions$/i.test(base)) return base;
|
|
27
|
+
if (/\/v1$/i.test(base)) return `${base}/chat/completions`;
|
|
28
|
+
return `${base}/v1/chat/completions`;
|
|
29
|
+
}
|
|
12
30
|
async function runEvolution(seedCode, policy, io) {
|
|
13
31
|
const now = io.now ?? (() => (/* @__PURE__ */ new Date()).toISOString());
|
|
14
32
|
const trace = [];
|
|
@@ -132,13 +150,7 @@ async function runEvolution(seedCode, policy, io) {
|
|
|
132
150
|
function makeOllamaProposer(endpoint, model) {
|
|
133
151
|
const base = endpoint.replace(/\/+$/, "");
|
|
134
152
|
return async (parentCode, goal) => {
|
|
135
|
-
const prompt =
|
|
136
|
-
|
|
137
|
-
Return ONLY the full revised program \u2014 no prose, no explanation, no markdown code fences.
|
|
138
|
-
|
|
139
|
-
--- CURRENT PROGRAM ---
|
|
140
|
-
${parentCode}
|
|
141
|
-
--- END ---`;
|
|
153
|
+
const prompt = buildProposerPrompt(parentCode, goal);
|
|
142
154
|
const res = await fetch(`${base}/api/generate`, {
|
|
143
155
|
method: "POST",
|
|
144
156
|
headers: { "content-type": "application/json" },
|
|
@@ -146,7 +158,44 @@ ${parentCode}
|
|
|
146
158
|
});
|
|
147
159
|
if (!res.ok) throw new Error(`ollama ${res.status}`);
|
|
148
160
|
const body = await res.json();
|
|
149
|
-
return (body.response ?? "")
|
|
161
|
+
return stripMarkdownFences(body.response ?? "");
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
function makeOpenAICompatibleProposer(endpoint, model, opts = {}) {
|
|
165
|
+
const fetchImpl = opts.fetchImpl ?? fetch;
|
|
166
|
+
const temperature = opts.temperature ?? 0.7;
|
|
167
|
+
return async (parentCode, goal) => {
|
|
168
|
+
const headers = { "content-type": "application/json" };
|
|
169
|
+
if (opts.apiKey) headers.authorization = `Bearer ${opts.apiKey}`;
|
|
170
|
+
const res = await fetchImpl(openAICompatibleChatUrl(endpoint), {
|
|
171
|
+
method: "POST",
|
|
172
|
+
headers,
|
|
173
|
+
body: JSON.stringify({
|
|
174
|
+
model,
|
|
175
|
+
stream: false,
|
|
176
|
+
temperature,
|
|
177
|
+
...opts.maxTokens == null ? {} : { max_tokens: opts.maxTokens },
|
|
178
|
+
messages: [
|
|
179
|
+
{
|
|
180
|
+
role: "system",
|
|
181
|
+
content: "You are a HoloScript program-evolution proposer. Return only the full revised program."
|
|
182
|
+
},
|
|
183
|
+
{ role: "user", content: buildProposerPrompt(parentCode, goal) }
|
|
184
|
+
]
|
|
185
|
+
})
|
|
186
|
+
});
|
|
187
|
+
const raw = await res.text();
|
|
188
|
+
if (!res.ok) throw new Error(`openai-compatible ${res.status}: ${raw.slice(0, 160)}`);
|
|
189
|
+
let body;
|
|
190
|
+
try {
|
|
191
|
+
body = JSON.parse(raw);
|
|
192
|
+
} catch {
|
|
193
|
+
throw new Error("openai-compatible invalid JSON response");
|
|
194
|
+
}
|
|
195
|
+
const content = body.choices?.[0]?.message?.content ?? body.choices?.[0]?.text ?? "";
|
|
196
|
+
const code = stripMarkdownFences(content);
|
|
197
|
+
if (!code) throw new Error("openai-compatible empty response");
|
|
198
|
+
return code;
|
|
150
199
|
};
|
|
151
200
|
}
|
|
152
201
|
function toGradedTraceRow(rec, opts) {
|
|
@@ -210,7 +259,8 @@ var CORPUS_PORTFOLIO = [
|
|
|
210
259
|
" }",
|
|
211
260
|
"}"
|
|
212
261
|
].join("\n"),
|
|
213
|
-
preserved: [/PatrolBot/, /\bidle\b/, /\bchasing\b/]
|
|
262
|
+
preserved: [/PatrolBot/, /\bidle\b/, /\bchasing\b/],
|
|
263
|
+
semanticCheck: stateMachineSemanticCheck
|
|
214
264
|
},
|
|
215
265
|
{
|
|
216
266
|
name: "mini-scene",
|
|
@@ -284,7 +334,8 @@ var CORPUS_PORTFOLIO = [
|
|
|
284
334
|
" }",
|
|
285
335
|
"}"
|
|
286
336
|
].join("\n"),
|
|
287
|
-
preserved: [/SmartDoor/, /\bclosed\b/, /\bopening\b/, /\bopen\b/]
|
|
337
|
+
preserved: [/SmartDoor/, /\bclosed\b/, /\bopening\b/, /\bopen\b/],
|
|
338
|
+
semanticCheck: stateMachineSemanticCheck
|
|
288
339
|
},
|
|
289
340
|
{
|
|
290
341
|
name: "trafficlight-statemachine",
|
|
@@ -303,7 +354,8 @@ var CORPUS_PORTFOLIO = [
|
|
|
303
354
|
" }",
|
|
304
355
|
"}"
|
|
305
356
|
].join("\n"),
|
|
306
|
-
preserved: [/TrafficLight/, /\bred\b/, /\bgreen\b/, /\byellow\b/]
|
|
357
|
+
preserved: [/TrafficLight/, /\bred\b/, /\bgreen\b/, /\byellow\b/],
|
|
358
|
+
semanticCheck: stateMachineSemanticCheck
|
|
307
359
|
},
|
|
308
360
|
{
|
|
309
361
|
name: "room-scene",
|
|
@@ -345,23 +397,79 @@ var CORPUS_PORTFOLIO = [
|
|
|
345
397
|
];
|
|
346
398
|
function parsesClean(src, format) {
|
|
347
399
|
try {
|
|
348
|
-
const r = format === "holo" ? chunkJ3UHV5T4_cjs.parseHolo(src) :
|
|
400
|
+
const r = format === "holo" ? chunkJ3UHV5T4_cjs.parseHolo(src) : chunkQ4K2GEMW_cjs.parse(src);
|
|
349
401
|
return Boolean(r.success && r.ast) && (r.errors?.length ?? 0) === 0;
|
|
350
402
|
} catch {
|
|
351
403
|
return false;
|
|
352
404
|
}
|
|
353
405
|
}
|
|
406
|
+
function findStateMachineConfig(node) {
|
|
407
|
+
if (!node || typeof node !== "object") return null;
|
|
408
|
+
const obj = node;
|
|
409
|
+
if (obj.name === "state_machine" && obj.config && typeof obj.config === "object") {
|
|
410
|
+
const cfg = obj.config;
|
|
411
|
+
if (cfg.states && typeof cfg.states === "object") return cfg;
|
|
412
|
+
}
|
|
413
|
+
for (const v of Object.values(obj)) {
|
|
414
|
+
if (Array.isArray(v)) {
|
|
415
|
+
for (const e of v) {
|
|
416
|
+
const f = findStateMachineConfig(e);
|
|
417
|
+
if (f) return f;
|
|
418
|
+
}
|
|
419
|
+
} else if (v && typeof v === "object") {
|
|
420
|
+
const f = findStateMachineConfig(v);
|
|
421
|
+
if (f) return f;
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
return null;
|
|
425
|
+
}
|
|
426
|
+
function extractStateMachine(ast) {
|
|
427
|
+
const cfg = findStateMachineConfig(ast);
|
|
428
|
+
if (!cfg) return null;
|
|
429
|
+
const statesObj = cfg.states;
|
|
430
|
+
const states = Object.keys(statesObj);
|
|
431
|
+
const transitions = [];
|
|
432
|
+
for (const from of states) {
|
|
433
|
+
const events = statesObj[from];
|
|
434
|
+
if (!events || typeof events !== "object") continue;
|
|
435
|
+
for (const event of Object.keys(events)) {
|
|
436
|
+
const t = events[event];
|
|
437
|
+
if (t && typeof t.target === "string") transitions.push({ from, event, target: t.target });
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
return { states, initial: typeof cfg.initial === "string" ? cfg.initial : "", transitions };
|
|
441
|
+
}
|
|
442
|
+
function stateMachineWellFormed(ast) {
|
|
443
|
+
const sm = extractStateMachine(ast);
|
|
444
|
+
if (!sm) return false;
|
|
445
|
+
const defined = new Set(sm.states);
|
|
446
|
+
return defined.has(sm.initial) && sm.transitions.every((t) => defined.has(t.target));
|
|
447
|
+
}
|
|
448
|
+
function stateMachineSemanticCheck(_candidate, ast) {
|
|
449
|
+
const sm = extractStateMachine(ast);
|
|
450
|
+
if (!sm) return { ok: false, reason: "no_state_machine" };
|
|
451
|
+
const defined = new Set(sm.states);
|
|
452
|
+
if (!defined.has(sm.initial)) return { ok: false, reason: `initial_undefined:${sm.initial}` };
|
|
453
|
+
const dangling = sm.transitions.filter((t) => !defined.has(t.target));
|
|
454
|
+
if (dangling.length) {
|
|
455
|
+
return { ok: false, reason: `dangling_transition:${dangling.map((d) => `${d.from}-${d.event}->${d.target}`).join(",")}` };
|
|
456
|
+
}
|
|
457
|
+
return { ok: true };
|
|
458
|
+
}
|
|
354
459
|
function makeSeedGate(seed) {
|
|
355
|
-
return async (candidate) =>
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
460
|
+
return async (candidate) => {
|
|
461
|
+
const r = seed.format === "holo" ? chunkJ3UHV5T4_cjs.parseHolo(candidate) : chunkQ4K2GEMW_cjs.parse(candidate);
|
|
462
|
+
const clean = Boolean(r.success && r.ast) && (r.errors?.length ?? 0) === 0;
|
|
463
|
+
const preservedOk = clean && seed.preserved.every((re) => re.test(candidate));
|
|
464
|
+
const passed = preservedOk && (!seed.semanticCheck || seed.semanticCheck(candidate, r.ast).ok);
|
|
465
|
+
return { passed, score: candidate.length };
|
|
466
|
+
};
|
|
359
467
|
}
|
|
360
468
|
async function accrueOneStep(opts) {
|
|
361
469
|
const seed = opts.seed ?? CORPUS_PORTFOLIO[(opts.tick ?? 0) % CORPUS_PORTFOLIO.length];
|
|
362
470
|
const now = opts.now ?? (() => (/* @__PURE__ */ new Date()).toISOString());
|
|
363
471
|
const rows = [];
|
|
364
|
-
await runEvolution(
|
|
472
|
+
const { receipt } = await runEvolution(
|
|
365
473
|
seed.source,
|
|
366
474
|
{ goal: seed.goal, generations: 1, population: 1, archiveSize: 4, proposerModel: "sovereign-local" },
|
|
367
475
|
{
|
|
@@ -370,7 +478,7 @@ async function accrueOneStep(opts) {
|
|
|
370
478
|
onCandidate: (rec) => rows.push(toGradedTraceRow(rec, { agentId: opts.agentId, ts: now(), source: `evolve-corpus:${seed.name}` }))
|
|
371
479
|
}
|
|
372
480
|
);
|
|
373
|
-
return { target: seed.name, rows };
|
|
481
|
+
return { target: seed.name, rows, receipt };
|
|
374
482
|
}
|
|
375
483
|
function dedupRows(existingCorpus, rows) {
|
|
376
484
|
const seen = /* @__PURE__ */ new Set();
|
|
@@ -490,13 +598,17 @@ function makeWasmCompilerFitnessGate(compileCandidate, opts = {}) {
|
|
|
490
598
|
exports.CORPUS_PORTFOLIO = CORPUS_PORTFOLIO;
|
|
491
599
|
exports.accrueOneStep = accrueOneStep;
|
|
492
600
|
exports.dedupRows = dedupRows;
|
|
601
|
+
exports.extractStateMachine = extractStateMachine;
|
|
493
602
|
exports.makeOllamaProposer = makeOllamaProposer;
|
|
603
|
+
exports.makeOpenAICompatibleProposer = makeOpenAICompatibleProposer;
|
|
494
604
|
exports.makeSeedGate = makeSeedGate;
|
|
495
605
|
exports.makeWasmCompilerFitnessGate = makeWasmCompilerFitnessGate;
|
|
496
606
|
exports.parsesClean = parsesClean;
|
|
497
607
|
exports.runEvolution = runEvolution;
|
|
498
608
|
exports.scoreWasmCompilerArtifact = scoreWasmCompilerArtifact;
|
|
609
|
+
exports.stateMachineSemanticCheck = stateMachineSemanticCheck;
|
|
610
|
+
exports.stateMachineWellFormed = stateMachineWellFormed;
|
|
499
611
|
exports.toGradedTraceRow = toGradedTraceRow;
|
|
500
612
|
exports.wasmFitnessBaselineFromScenario = wasmFitnessBaselineFromScenario;
|
|
501
|
-
//# sourceMappingURL=chunk-
|
|
502
|
-
//# sourceMappingURL=chunk-
|
|
613
|
+
//# sourceMappingURL=chunk-XF63CZ7E.cjs.map
|
|
614
|
+
//# sourceMappingURL=chunk-XF63CZ7E.cjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkQ4K2GEMW_cjs = require('./chunk-Q4K2GEMW.cjs');
|
|
4
4
|
|
|
5
5
|
// src/parser/HsplusGrammar.ts
|
|
6
6
|
function normalizeHsplusGrammarErrors(errors) {
|
|
@@ -43,7 +43,7 @@ var TypeScriptHsplusGrammar = class {
|
|
|
43
43
|
return "typescript-hsplus";
|
|
44
44
|
}
|
|
45
45
|
parseWithTypeScript(source) {
|
|
46
|
-
const parser = new
|
|
46
|
+
const parser = new chunkQ4K2GEMW_cjs.HoloScriptPlusParser(this.options);
|
|
47
47
|
return parser.parse(source);
|
|
48
48
|
}
|
|
49
49
|
};
|
|
@@ -128,5 +128,5 @@ var GrammarModuleRegistry = new GrammarModuleRegistryImpl();
|
|
|
128
128
|
exports.GrammarModuleRegistry = GrammarModuleRegistry;
|
|
129
129
|
exports.TypeScriptHsplusGrammar = TypeScriptHsplusGrammar;
|
|
130
130
|
exports.normalizeHsplusGrammarErrors = normalizeHsplusGrammarErrors;
|
|
131
|
-
//# sourceMappingURL=chunk-
|
|
132
|
-
//# sourceMappingURL=chunk-
|
|
131
|
+
//# sourceMappingURL=chunk-Y57AVOM2.cjs.map
|
|
132
|
+
//# sourceMappingURL=chunk-Y57AVOM2.cjs.map
|
|
@@ -5,10 +5,10 @@ var chunkQVJMDVYZ_cjs = require('../chunk-QVJMDVYZ.cjs');
|
|
|
5
5
|
var chunk37HHY7RH_cjs = require('../chunk-37HHY7RH.cjs');
|
|
6
6
|
var chunkXHIV6326_cjs = require('../chunk-XHIV6326.cjs');
|
|
7
7
|
var chunkR75BSDH7_cjs = require('../chunk-R75BSDH7.cjs');
|
|
8
|
-
var
|
|
8
|
+
var chunkQ4K2GEMW_cjs = require('../chunk-Q4K2GEMW.cjs');
|
|
9
9
|
require('../chunk-OIBRWLPY.cjs');
|
|
10
10
|
require('../chunk-YP5CHEYU.cjs');
|
|
11
|
-
require('../chunk-
|
|
11
|
+
require('../chunk-LHUDAJQT.cjs');
|
|
12
12
|
require('../chunk-EI3J6LTW.cjs');
|
|
13
13
|
require('../chunk-36NPLOI4.cjs');
|
|
14
14
|
require('../chunk-AWXFEAQL.cjs');
|
|
@@ -717,7 +717,7 @@ async function runScript(opts) {
|
|
|
717
717
|
const source = fs__namespace.readFileSync(filePath, "utf-8");
|
|
718
718
|
const ext = path__namespace.extname(filePath);
|
|
719
719
|
console.log(`[holoscript] Running ${path__namespace.basename(filePath)} (target: ${opts.target})`);
|
|
720
|
-
const parseResult =
|
|
720
|
+
const parseResult = chunkQ4K2GEMW_cjs.parse(source);
|
|
721
721
|
const ast = parseResult.ast;
|
|
722
722
|
if (opts.debug) {
|
|
723
723
|
console.log(`[holoscript] Parsed ${ast.body?.length || 0} top-level nodes`);
|
|
@@ -781,7 +781,7 @@ async function runScript(opts) {
|
|
|
781
781
|
console.log(`[holoscript] Re-running ${path__namespace.basename(filePath)}...`);
|
|
782
782
|
try {
|
|
783
783
|
const newSource = fs__namespace.readFileSync(filePath, "utf-8");
|
|
784
|
-
const newParseResult =
|
|
784
|
+
const newParseResult = chunkQ4K2GEMW_cjs.parse(newSource);
|
|
785
785
|
const newAst = newParseResult.ast;
|
|
786
786
|
const newRuntime = createHeadlessRuntime(newAst, {
|
|
787
787
|
profile: opts.profile === "headless" ? HEADLESS_PROFILE : getProfile(opts.profile),
|
|
@@ -817,7 +817,7 @@ async function testScript(opts) {
|
|
|
817
817
|
}
|
|
818
818
|
const source = fs__namespace.readFileSync(filePath, "utf-8");
|
|
819
819
|
console.log(`[holoscript test] Running tests in ${path__namespace.basename(filePath)}`);
|
|
820
|
-
const parseResult =
|
|
820
|
+
const parseResult = chunkQ4K2GEMW_cjs.parse(source);
|
|
821
821
|
const ast = parseResult.ast;
|
|
822
822
|
const { createHeadlessRuntime, HEADLESS_PROFILE } = await loadEngineRuntime();
|
|
823
823
|
const profile = HEADLESS_PROFILE;
|
|
@@ -900,7 +900,7 @@ function compileScript(opts) {
|
|
|
900
900
|
}
|
|
901
901
|
console.log(`[holoscript compile] @gotcha check passed (no critical violations)`);
|
|
902
902
|
}
|
|
903
|
-
const compileResult =
|
|
903
|
+
const compileResult = chunkQ4K2GEMW_cjs.parse(source);
|
|
904
904
|
if (!compileResult.success) {
|
|
905
905
|
console.error(`[holoscript compile] Failed to parse: ${compileResult.errors?.[0]?.message}`);
|
|
906
906
|
process.exit(1);
|
|
@@ -979,7 +979,7 @@ async function deployScript(opts) {
|
|
|
979
979
|
const fileName = path__namespace.basename(filePath);
|
|
980
980
|
const title = path__namespace.basename(filePath, path__namespace.extname(filePath));
|
|
981
981
|
console.log(`Parsing ${fileName}...`);
|
|
982
|
-
const ast =
|
|
982
|
+
const ast = chunkQ4K2GEMW_cjs.parse(source);
|
|
983
983
|
if (ast.errors && ast.errors.length > 0) {
|
|
984
984
|
console.error("Parse errors:");
|
|
985
985
|
for (const err of ast.errors) {
|
|
@@ -1344,7 +1344,7 @@ async function daemonScript(opts) {
|
|
|
1344
1344
|
const { createDaemonActions, getDaemonFileState } = await import('@holoscript/absorb-service/daemon');
|
|
1345
1345
|
const repoRoot = findGitRoot(path__namespace.dirname(filePath));
|
|
1346
1346
|
const source = fs__namespace.readFileSync(filePath, "utf-8");
|
|
1347
|
-
const parseResult =
|
|
1347
|
+
const parseResult = chunkQ4K2GEMW_cjs.parse(source);
|
|
1348
1348
|
if (!parseResult.success || !parseResult.ast) {
|
|
1349
1349
|
const errors = parseResult.errors?.map((e) => e.message).join(", ") || "unknown";
|
|
1350
1350
|
console.error(`[daemon] Parse failed: ${errors}`);
|
|
@@ -1911,7 +1911,7 @@ async function holoMeshDaemonScript(opts) {
|
|
|
1911
1911
|
}
|
|
1912
1912
|
const rawSource = fs__namespace.readFileSync(filePath, "utf-8");
|
|
1913
1913
|
const source = rawSource.replace(/^#(version|target|mode)\s+.*/gm, "");
|
|
1914
|
-
const parseResult =
|
|
1914
|
+
const parseResult = chunkQ4K2GEMW_cjs.parse(source);
|
|
1915
1915
|
if (!parseResult.success || !parseResult.ast) {
|
|
1916
1916
|
const errors = parseResult.errors?.map((e) => e.message).join(", ") || "unknown";
|
|
1917
1917
|
console.error(`[holomesh-daemon] Parse failed: ${errors}`);
|
|
@@ -3,10 +3,10 @@ import { checkLicenseCompatibility, ethToWei, calculateRevenueDistribution, form
|
|
|
3
3
|
import { InteropContext } from '../chunk-TPZ3BN2D.js';
|
|
4
4
|
import { AbsorbProcessor, ScriptTestRunner, HotReloadWatcher } from '../chunk-2M2DPHKB.js';
|
|
5
5
|
import { generateProvenance } from '../chunk-4R6SBXDB.js';
|
|
6
|
-
import { parse } from '../chunk-
|
|
6
|
+
import { parse } from '../chunk-FRSKLX6I.js';
|
|
7
7
|
import '../chunk-CP7V3ATL.js';
|
|
8
8
|
import '../chunk-UNMVGZVW.js';
|
|
9
|
-
import '../chunk-
|
|
9
|
+
import '../chunk-FWKEY4LD.js';
|
|
10
10
|
import '../chunk-2EGGAZT3.js';
|
|
11
11
|
import '../chunk-YW3I2FQL.js';
|
|
12
12
|
import '../chunk-7I74JWPW.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkRZ2EPXO3_cjs = require('../chunk-RZ2EPXO3.cjs');
|
|
4
4
|
require('../chunk-R75BSDH7.cjs');
|
|
5
5
|
require('../chunk-ZK7KX5CD.cjs');
|
|
6
6
|
require('../chunk-7IDJDMPU.cjs');
|
|
@@ -12,23 +12,23 @@ require('../chunk-ZHPMP447.cjs');
|
|
|
12
12
|
|
|
13
13
|
Object.defineProperty(exports, "IncrementalCompiler", {
|
|
14
14
|
enumerable: true,
|
|
15
|
-
get: function () { return
|
|
15
|
+
get: function () { return chunkRZ2EPXO3_cjs.IncrementalCompiler; }
|
|
16
16
|
});
|
|
17
17
|
Object.defineProperty(exports, "UnauthorizedIncrementalCompilerAccessError", {
|
|
18
18
|
enumerable: true,
|
|
19
|
-
get: function () { return
|
|
19
|
+
get: function () { return chunkRZ2EPXO3_cjs.UnauthorizedIncrementalCompilerAccessError; }
|
|
20
20
|
});
|
|
21
21
|
Object.defineProperty(exports, "createIncrementalCompiler", {
|
|
22
22
|
enumerable: true,
|
|
23
|
-
get: function () { return
|
|
23
|
+
get: function () { return chunkRZ2EPXO3_cjs.createIncrementalCompiler; }
|
|
24
24
|
});
|
|
25
25
|
Object.defineProperty(exports, "deserializeCache", {
|
|
26
26
|
enumerable: true,
|
|
27
|
-
get: function () { return
|
|
27
|
+
get: function () { return chunkRZ2EPXO3_cjs.deserializeCache; }
|
|
28
28
|
});
|
|
29
29
|
Object.defineProperty(exports, "serializeCache", {
|
|
30
30
|
enumerable: true,
|
|
31
|
-
get: function () { return
|
|
31
|
+
get: function () { return chunkRZ2EPXO3_cjs.serializeCache; }
|
|
32
32
|
});
|
|
33
33
|
//# sourceMappingURL=incremental.cjs.map
|
|
34
34
|
//# sourceMappingURL=incremental.cjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { IncrementalCompiler, UnauthorizedIncrementalCompilerAccessError, createIncrementalCompiler, deserializeCache, serializeCache } from '../chunk-
|
|
1
|
+
export { IncrementalCompiler, UnauthorizedIncrementalCompilerAccessError, createIncrementalCompiler, deserializeCache, serializeCache } from '../chunk-RVNXBF2M.js';
|
|
2
2
|
import '../chunk-4R6SBXDB.js';
|
|
3
3
|
import '../chunk-DUG3OQAS.js';
|
|
4
4
|
import '../chunk-B3CWTCK2.js';
|