githolon 0.101.4 → 0.101.5

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 +31 -27
  2. package/package.json +3 -3
package/dist/cli.mjs CHANGED
@@ -3941,29 +3941,26 @@ async function ensureApplicationWorkspace(application, opts = {}) {
3941
3941
  });
3942
3942
  const bare = lineageIdentity(home.principal);
3943
3943
  const now = Date.now();
3944
- const birth = await fetch(
3945
- `${cloud}/v2/workspaces/${encodeURIComponent(home.home)}/workspaces/birthChild`,
3944
+ const birth = await signAndPostOffer(
3945
+ home.home,
3946
+ "workspaces",
3947
+ "birthChild",
3946
3948
  {
3947
- method: "POST",
3948
- headers: { "content-type": "application/json" },
3949
- body: JSON.stringify({
3950
- name: application,
3951
- parent: home.home,
3952
- principal: bare,
3953
- tier: "edge",
3954
- requestedBy: bare,
3955
- requestedAt: now,
3956
- foundingAdminHash: home.device.keyHash,
3957
- bornAt: new Date(now).toISOString(),
3958
- frameworkHash,
3959
- lawHash,
3960
- platformCert: JSON.stringify(birthCert),
3961
- actor: home.principal,
3962
- authorSecret: home.device.secret
3963
- })
3964
- }
3949
+ name: application,
3950
+ parent: home.home,
3951
+ principal: bare,
3952
+ tier: "edge",
3953
+ requestedBy: bare,
3954
+ requestedAt: now,
3955
+ foundingAdminHash: home.device.keyHash,
3956
+ bornAt: new Date(now).toISOString(),
3957
+ frameworkHash,
3958
+ lawHash,
3959
+ platformCert: JSON.stringify(birthCert)
3960
+ },
3961
+ { ...opts, principal: bare }
3965
3962
  );
3966
- const body = await birth.json().catch(() => null);
3963
+ const body = birth.body;
3967
3964
  const failed = body?.birthOutcomes?.find((outcome) => outcome.status !== "born");
3968
3965
  if (!birth.ok || body?.ok === false || failed) {
3969
3966
  if (!await fetch(statusUrl).then((r) => r.ok).catch(() => false)) {
@@ -5391,7 +5388,7 @@ async function probeOfferLane(cloud, ws, route, fetchImpl = fetch) {
5391
5388
  const spec = await r.json().catch(() => void 0);
5392
5389
  if (spec === void 0 || typeof spec !== "object") return { served: false, routesTarget: void 0 };
5393
5390
  const served = true;
5394
- const routesTarget = route === void 0 ? void 0 : openapiRoutesDirective(spec, route.domain, route.directiveId);
5391
+ const routesTarget = route === void 0 || route.visibility === "framework" ? void 0 : openapiRoutesDirective(spec, route.domain, route.directiveId);
5395
5392
  return { served, routesTarget };
5396
5393
  } catch {
5397
5394
  return { served: void 0, routesTarget: void 0 };
@@ -6283,7 +6280,11 @@ async function deploy2(ws, opts) {
6283
6280
  return 1;
6284
6281
  }
6285
6282
  const { probeCloudCapabilities: probeCloudCapabilities2, negotiateDeployRoute: negotiateDeployRoute2 } = await Promise.resolve().then(() => (init_capabilities(), capabilities_exports));
6286
- const route = { domain: "nomos", directiveId: expectsPending ? "stageDomain" : "installDomain" };
6283
+ const route = {
6284
+ domain: "nomos",
6285
+ directiveId: expectsPending ? "stageDomain" : "installDomain",
6286
+ visibility: "framework"
6287
+ };
6287
6288
  const caps = await probeCloudCapabilities2(cloud, ws, route);
6288
6289
  const refusal = negotiateDeployRoute2(caps, { signed: true, ws, sealedSizeChars: packageUsda.length, route });
6289
6290
  if (refusal !== void 0) {
@@ -9161,6 +9162,7 @@ var init_dlq = __esm({
9161
9162
  // src/cli.ts
9162
9163
  import { existsSync as existsSync16, readdirSync as readdirSync6, readFileSync as readFileSync16 } from "node:fs";
9163
9164
  import { spawnSync as spawnSync6 } from "node:child_process";
9165
+ import { createHash as createHash7 } from "node:crypto";
9164
9166
  import { createRequire as createRequire3 } from "node:module";
9165
9167
  import { dirname as dirname9, join as join17, resolve as resolve5 } from "node:path";
9166
9168
  import { pathToFileURL as pathToFileURL5, fileURLToPath } from "node:url";
@@ -10686,7 +10688,7 @@ async function runProof(args) {
10686
10688
  return 1;
10687
10689
  };
10688
10690
  const live = args.includes("--live");
10689
- if (args.includes("--keep")) return refuse("--keep no longer applies: proof --live uses your durable signed Nomos home and creates only the requested business aggregate");
10691
+ if (args.includes("--keep")) return refuse("--keep no longer applies: proof --live owns its isolated acceptance workspace and preserves its verified history");
10690
10692
  let domain;
10691
10693
  let domainValueIdx = -1;
10692
10694
  const di = args.findIndex((a) => a === "--domain" || a.startsWith("--domain="));
@@ -10773,14 +10775,16 @@ async function runProof(args) {
10773
10775
  );
10774
10776
  }
10775
10777
  const barePrincipal = home.principal.startsWith("user:") ? home.principal.slice("user:".length) : home.principal;
10776
- const deployed = await deploy2(home.home, { principal: barePrincipal });
10777
- if (deployed !== 0) return refuse("proof --live: Nomos could not install the compiled business law into the signed session home");
10778
+ const proofIdentity = createHash7("sha256").update(home.home).update("\0").update(readFileSync16(proofPath)).digest("hex").slice(0, 24);
10779
+ const proofWorkspace = `nomos-proof-${proofIdentity}`;
10780
+ const deployed = await deploy2(proofWorkspace, { principal: barePrincipal });
10781
+ if (deployed !== 0) return refuse("proof --live: Nomos could not install the compiled business law into its isolated acceptance application");
10778
10782
  const r = spawnSync6(process.execPath, [tsxCli, proofPath], {
10779
10783
  stdio: "inherit",
10780
10784
  cwd: process.cwd(),
10781
10785
  env: {
10782
10786
  ...process.env,
10783
- NOMOS_WS: home.home,
10787
+ NOMOS_WS: proofWorkspace,
10784
10788
  NOMOS_PRINCIPAL: home.principal,
10785
10789
  NOMOS_AUTHOR_SECRET: home.device.secret,
10786
10790
  NOMOS_PROOF_MANAGED: "1"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "githolon",
3
- "version": "0.101.4",
3
+ "version": "0.101.5",
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.101.4",
33
- "@githolon/dsl": "^0.101.4",
32
+ "@githolon/client": "^0.101.5",
33
+ "@githolon/dsl": "^0.101.5",
34
34
  "isomorphic-git": "^1.38.4"
35
35
  },
36
36
  "devDependencies": {