githolon 0.87.0 → 0.89.0

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 +24 -2
  2. package/package.json +3 -3
package/dist/cli.mjs CHANGED
@@ -5797,11 +5797,33 @@ function seatRelationAuthority(eng, ws, lawHash, rb, actor, stamp, lines) {
5797
5797
  else if (set.has(k) || /^(subject|principal|grantedBy|grantee|member|user|owner|founder)$/i.test(k)) payload[k] = actor;
5798
5798
  }
5799
5799
  };
5800
+ const groundToWorkspace = (payload) => {
5801
+ const fields = [];
5802
+ const grounded = { ...payload };
5803
+ for (const [k, v] of Object.entries(grounded)) {
5804
+ if (typeof v === "string" && v === `sample-${k}`) {
5805
+ grounded[k] = ws;
5806
+ fields.push(k);
5807
+ }
5808
+ }
5809
+ return fields.length > 0 ? { grounded, fields } : void 0;
5810
+ };
5811
+ const dispatchSeat = (directiveId, payload) => {
5812
+ const first = author(eng, ws, rb.domain, directiveId, payload, lawHash, actorOpts);
5813
+ if (first.ok !== false) return first;
5814
+ const g = groundToWorkspace(payload);
5815
+ if (g === void 0) return first;
5816
+ const retry = author(eng, ws, rb.domain, directiveId, g.grounded, lawHash, actorOpts);
5817
+ if (retry.ok !== false) {
5818
+ lines.push(`\u2713 relation seat \u2014 grounded [${g.fields.join(", ")}] to the workspace identity '${ws}' for ${rb.domain}/${directiveId} (value-grounded retry; the real gate accepted)`);
5819
+ }
5820
+ return retry;
5821
+ };
5800
5822
  for (const seed of rb.prerequisiteSeeds ?? []) {
5801
5823
  const seedPayload = { ...seed.payload };
5802
5824
  seatActorFields(seedPayload, []);
5803
5825
  for (const f of seed.autoStamped) seedPayload[f] = stamp;
5804
- const seedRes = author(eng, ws, rb.domain, seed.directiveId, seedPayload, lawHash, actorOpts);
5826
+ const seedRes = dispatchSeat(seed.directiveId, seedPayload);
5805
5827
  if (seedRes.ok === false) {
5806
5828
  return { ok: false, skipped: `the prerequisite seed ${rb.domain}/${seed.directiveId} REFUSED with a synthesized payload (${seedRes.error ?? "refused"})` };
5807
5829
  }
@@ -5810,7 +5832,7 @@ function seatRelationAuthority(eng, ws, lawHash, rb, actor, stamp, lines) {
5810
5832
  const grantPayload = { ...rb.grantPayload };
5811
5833
  seatActorFields(grantPayload, [...rb.grantSubjectFields, ...rb.grantGrantedByFields], rb.grantSubjectWrappedFields ?? []);
5812
5834
  for (const f of rb.grantAutoStamped) grantPayload[f] = stamp;
5813
- const grantRes = author(eng, ws, rb.domain, rb.grantDirectiveId, grantPayload, lawHash, actorOpts);
5835
+ const grantRes = dispatchSeat(rb.grantDirectiveId, grantPayload);
5814
5836
  if (grantRes.ok === false) {
5815
5837
  if (speculative) return { ok: false, skipped: `the declared seed ${rb.domain}/${rb.grantDirectiveId} could not be replayed (${grantRes.error ?? "refused"})` };
5816
5838
  return { ok: false, error: `relation seat ${rb.domain}/${rb.grantDirectiveId} refused: ${grantRes.error ?? "unknown"} \u2014 the grant that should seat "${grantedRelation}" on ${actor} was rejected` };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "githolon",
3
- "version": "0.87.0",
3
+ "version": "0.89.0",
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.87.0",
33
- "@githolon/dsl": "^0.87.0",
32
+ "@githolon/client": "^0.89.0",
33
+ "@githolon/dsl": "^0.89.0",
34
34
  "isomorphic-git": "^1.38.4"
35
35
  },
36
36
  "devDependencies": {