githolon 0.29.1 → 0.30.1

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 +40 -0
  2. package/package.json +3 -3
package/dist/cli.mjs CHANGED
@@ -1651,6 +1651,9 @@ function runRelationBootstrapLeg(eng, ws, lawHash, rb) {
1651
1651
  const grantedRelation = rb.grantedRelation ?? rb.relation;
1652
1652
  const computed = grantedRelation !== rb.relation;
1653
1653
  const speculative = rb.seedSpeculative === true;
1654
+ if (rb.bornContext !== void 0) {
1655
+ return runBornContextLeg(eng, ws, lawHash, rb, ACTOR, stamp);
1656
+ }
1654
1657
  const grantPayload = { ...rb.grantPayload };
1655
1658
  const overwrite = /* @__PURE__ */ new Set([...rb.grantSubjectFields, ...rb.grantGrantedByFields]);
1656
1659
  for (const k of Object.keys(grantPayload)) {
@@ -1681,6 +1684,43 @@ function runRelationBootstrapLeg(eng, ws, lawHash, rb) {
1681
1684
  lines.push(speculative ? `\u2713 relation bootstrap (prove) \u2014 ${rb.domain}/${rb.gatedDirectiveId} authored under the replayed seed (gated write SUCCEEDS \u2014 the REAL kernel gate confirmed the replayed seed establishes authority for "${rb.relation}")` : `\u2713 relation bootstrap (prove) \u2014 ${rb.domain}/${rb.gatedDirectiveId} authored under the seeded holder of "${rb.relation}" (gated write SUCCEEDS once granted)`);
1682
1685
  return done(true);
1683
1686
  }
1687
+ function runBornContextLeg(eng, ws, lawHash, rb, ACTOR, stamp) {
1688
+ const t0 = performance.now();
1689
+ const lines = [];
1690
+ const done = (ok, error) => ({ ok, ms: performance.now() - t0, legs: lines, ...error !== void 0 ? { error } : {} });
1691
+ const bc = rb.bornContext;
1692
+ const fw = eng.hashes?.nomos;
1693
+ const actorOpts = { actor: ACTOR };
1694
+ const birthPayload = { ...bc.birthPayload };
1695
+ if (bc.ownerField !== void 0) birthPayload[bc.ownerField] = ACTOR;
1696
+ if (bc.frameworkHashField !== void 0) birthPayload[bc.frameworkHashField] = fw;
1697
+ if (bc.lawHashField !== void 0) birthPayload[bc.lawHashField] = lawHash;
1698
+ for (const f of bc.birthAutoStamped) birthPayload[f] = stamp;
1699
+ const birthRes = author(eng, ws, rb.domain, bc.birthDirectiveId, birthPayload, lawHash, actorOpts);
1700
+ if (birthRes.ok === false) {
1701
+ lines.push(`\u2013 relation-bootstrap leg SKIPPED (layer-4 born-context) \u2014 the self-birth ${rb.domain}/${bc.birthDirectiveId} refused (${birthRes.error ?? "refused"}); could not establish born-genesis authority for "${rb.relation}"`);
1702
+ return done(true);
1703
+ }
1704
+ const bornWs = (birthRes.born ?? []).map((b) => b?.workspace).find((w) => typeof w === "string" && w.length > 0);
1705
+ if (bornWs === void 0) {
1706
+ lines.push(`\u2013 relation-bootstrap leg SKIPPED (layer-4 born-context) \u2014 the self-birth ${rb.domain}/${bc.birthDirectiveId} admitted but spawned no workspace (the genesis did not fold); "${rb.relation}" authority not established`);
1707
+ return done(true);
1708
+ }
1709
+ lines.push(`\u2713 relation bootstrap (born-context) \u2014 birthed ${bornWs} via ${rb.domain}/${bc.birthDirectiveId}; its genesis (${bc.seatsViaDirectiveId}) seated "${rb.relation}" for the owner ${ACTOR}`);
1710
+ const gatedPayload = { ...rb.gatedPayload };
1711
+ for (const k of Object.keys(gatedPayload)) {
1712
+ if (/^(subject|principal|owner|ownerSubject|grantee|member|user)$/i.test(k)) gatedPayload[k] = ACTOR;
1713
+ }
1714
+ for (const f of rb.gatedAutoStamped) gatedPayload[f] = stamp;
1715
+ if (rb.gatedMintField !== void 0 && rb.gatedAggregateId !== void 0) gatedPayload[rb.gatedMintField] = mintId(eng, rb.gatedAggregateId);
1716
+ const gatedRes = author(eng, bornWs, rb.domain, rb.gatedDirectiveId, gatedPayload, lawHash, actorOpts);
1717
+ if (gatedRes.ok === false) {
1718
+ lines.push(`\u2013 relation-bootstrap leg SKIPPED (layer-4 born-context) \u2014 dispatching ${rb.domain}/${rb.gatedDirectiveId} .requires("${rb.relation}") inside the born ${bornWs} as ${ACTOR} was REFUSED on the real gate (${gatedRes.error ?? "refused"}); the born genesis did not establish the authority the gate needs`);
1719
+ return done(true);
1720
+ }
1721
+ lines.push(`\u2713 relation bootstrap (prove) \u2014 ${rb.domain}/${rb.gatedDirectiveId} authored INSIDE the born ${bornWs} as the genesis-established owner (gated write SUCCEEDS \u2014 the REAL kernel gate confirmed the born genesis seats "${rb.relation}")`);
1722
+ return done(true);
1723
+ }
1684
1724
  function actorFromPayload(payload, field) {
1685
1725
  if (field === void 0) return void 0;
1686
1726
  const value = payload[field];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "githolon",
3
- "version": "0.29.1",
3
+ "version": "0.30.1",
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.29.1",
33
- "@githolon/dsl": "^0.29.1",
32
+ "@githolon/client": "^0.30.1",
33
+ "@githolon/dsl": "^0.30.1",
34
34
  "isomorphic-git": "^1.38.4"
35
35
  },
36
36
  "devDependencies": {