githolon 0.100.5 → 0.100.6

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 (2) hide show
  1. package/dist/cli.mjs +13 -13
  2. package/package.json +3 -3
package/dist/cli.mjs CHANGED
@@ -2852,8 +2852,9 @@ function atomicWriteRuntime(target, data) {
2852
2852
  function runtimeDirIsWarm(runtimeDir) {
2853
2853
  try {
2854
2854
  const w = statSync(join2(runtimeDir, "holon.wasm")).mtimeMs;
2855
+ const t = statSync(join2(runtimeDir, "holon-testmint.wasm")).mtimeMs;
2855
2856
  const p = statSync(join2(runtimeDir, "packages.json")).mtimeMs;
2856
- return Date.now() - Math.min(w, p) < RUNTIME_FRESH_MS;
2857
+ return Date.now() - Math.min(w, t, p) < RUNTIME_FRESH_MS;
2857
2858
  } catch {
2858
2859
  return false;
2859
2860
  }
@@ -2869,11 +2870,15 @@ async function refreshRuntimeDir(cloud, runtimeDir) {
2869
2870
  const r = await fetch(`${cloud}/v1/runtime/holon.wasm`);
2870
2871
  if (!r.ok) throw new Error(`runtime wasm \u2192 ${r.status}`);
2871
2872
  const wasmBytes = new Uint8Array(await r.arrayBuffer());
2873
+ const testmint = await fetch(`${cloud}/v1/runtime/holon-testmint.wasm`);
2874
+ if (!testmint.ok) throw new Error(`test-mint runtime wasm \u2192 ${testmint.status}`);
2875
+ const testmintBytes = new Uint8Array(await testmint.arrayBuffer());
2872
2876
  const pkgs = await fetch(`${cloud}/v1/runtime/packages`);
2873
2877
  if (!pkgs.ok) throw new Error(`runtime packages \u2192 ${pkgs.status}`);
2874
2878
  const pkgText = await pkgs.text();
2875
2879
  mkdirSync2(runtimeDir, { recursive: true });
2876
2880
  atomicWriteRuntime(join2(runtimeDir, "holon.wasm"), wasmBytes);
2881
+ atomicWriteRuntime(join2(runtimeDir, "holon-testmint.wasm"), testmintBytes);
2877
2882
  atomicWriteRuntime(join2(runtimeDir, "packages.json"), pkgText);
2878
2883
  _refreshedDirsThisProcess.add(runtimeDir);
2879
2884
  return true;
@@ -6334,15 +6339,6 @@ function warrantParentForBirth(eng, parentWs, parentDomain, lawHash, genesisOwne
6334
6339
  const root = authorKeygen(eng);
6335
6340
  setTestKRoot(eng, root.public);
6336
6341
  const parentCert = certSign(eng, {
6337
- child: parentWs,
6338
- founder: genesisOwner,
6339
- verified: true,
6340
- parentKey: dev2.public,
6341
- parentId: "root",
6342
- epoch: 0,
6343
- secret: dev2.secret
6344
- });
6345
- const rootDelegation = certSign(eng, {
6346
6342
  child: parentWs,
6347
6343
  founder: genesisOwner,
6348
6344
  verified: true,
@@ -6377,7 +6373,7 @@ function warrantParentForBirth(eng, parentWs, parentDomain, lawHash, genesisOwne
6377
6373
  parentId: parentWs,
6378
6374
  parentKey: dev2.public,
6379
6375
  epoch: 0,
6380
- certChain: JSON.stringify({ links: [parentCert, rootDelegation] })
6376
+ certChain: JSON.stringify({ links: [parentCert] })
6381
6377
  }, genesisOwner);
6382
6378
  const hasParentAttestation = !(sba.ok === false && /no directive registered/i.test(sba.error ?? ""));
6383
6379
  if (sba.ok === false && !/already|create-once|attest|no directive registered/i.test(sba.error ?? "")) return { ok: false, error: `seedBirthAttestation refused: ${sba.error}` };
@@ -6476,6 +6472,10 @@ async function runChildBirthLeg(eng, ws, lawHash, cb, frameworkHash) {
6476
6472
  }
6477
6473
  const bornParent = (setupRes.born ?? []).map((b) => b?.workspace).find((w) => typeof w === "string" && w.length > 0);
6478
6474
  if (bornParent === void 0) {
6475
+ const failed = (setupRes.birthOutcomes ?? []).find((o) => o?.status === "failed" || o?.status === "refused");
6476
+ if (failed !== void 0) {
6477
+ return done(false, `parent setup ${setup.parentDomain}/${setup.birthDirectiveId} child genesis failed: ${failed.reason ?? "unknown"}`);
6478
+ }
6479
6479
  return done(false, `parent setup ${setup.parentDomain}/${setup.birthDirectiveId} admitted but spawned no parent workspace (born=${JSON.stringify(setupRes.born ?? [])})`);
6480
6480
  }
6481
6481
  parentWs = bornParent;
@@ -7227,11 +7227,11 @@ async function harnessInstall(opts) {
7227
7227
  const refreshed = await refreshRuntimeDir(cloudBase(), runtimeDir);
7228
7228
  if (refreshed) process.stderr.write(`harness-install: refreshed runtime cache from the cloud \u2192 ${runtimeDir}
7229
7229
  `);
7230
- const wasmFile = join15(runtimeDir, "holon.wasm");
7230
+ const wasmFile = join15(runtimeDir, "holon-testmint.wasm");
7231
7231
  const pkgsFile = join15(runtimeDir, "packages.json");
7232
7232
  if (!existsSync13(wasmFile) || !existsSync13(pkgsFile)) {
7233
7233
  die(
7234
- `runtime cache missing at ${runtimeDir} (holon.wasm + packages.json). Warm it once with a \`githolon\` run (it fetches + caches the runtime), then re-run offline.`
7234
+ `test runtime cache missing at ${runtimeDir} (holon-testmint.wasm + packages.json). Warm it once with a \`githolon\` run (it fetches + caches the runtime), then re-run offline.`
7235
7235
  );
7236
7236
  }
7237
7237
  const wasm = readFileSync14(wasmFile);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "githolon",
3
- "version": "0.100.5",
3
+ "version": "0.100.6",
4
4
  "type": "module",
5
5
  "description": "githolon — the Nomos developer CLI: Rails-style generators for @githolon/dsl domains + the package compiler. Kernel-independent.",
6
6
  "license": "SEE LICENSE IN LICENSE.md",
@@ -29,8 +29,8 @@
29
29
  },
30
30
  "dependencies": {
31
31
  "@bjorn3/browser_wasi_shim": "0.4.2",
32
- "@githolon/client": "^0.100.5",
33
- "@githolon/dsl": "^0.100.5",
32
+ "@githolon/client": "^0.100.6",
33
+ "@githolon/dsl": "^0.100.6",
34
34
  "isomorphic-git": "^1.38.4"
35
35
  },
36
36
  "devDependencies": {