githolon 0.70.0 → 0.70.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.
- package/dist/cli.mjs +12 -6
- package/package.json +3 -3
package/dist/cli.mjs
CHANGED
|
@@ -5610,16 +5610,19 @@ function runChildBirthLeg(eng, ws, lawHash, cb, frameworkHash) {
|
|
|
5610
5610
|
}
|
|
5611
5611
|
function seatRelationAuthority(eng, ws, lawHash, rb, actor, stamp, lines) {
|
|
5612
5612
|
const actorOpts = { actor };
|
|
5613
|
+
const bareActor = actor.replace(/^user:/, "");
|
|
5613
5614
|
const grantedRelation = rb.grantedRelation ?? rb.relation;
|
|
5614
5615
|
const speculative = rb.seedSpeculative === true;
|
|
5615
5616
|
if (rb.granterAuthority !== void 0) {
|
|
5616
5617
|
const inner = seatRelationAuthority(eng, ws, lawHash, rb.granterAuthority, actor, stamp, lines);
|
|
5617
5618
|
if (!inner.ok) return inner;
|
|
5618
5619
|
}
|
|
5619
|
-
const seatActorFields = (payload, routed) => {
|
|
5620
|
+
const seatActorFields = (payload, routed, wrapped = []) => {
|
|
5620
5621
|
const set = new Set(routed);
|
|
5622
|
+
const wrappedSet = new Set(wrapped);
|
|
5621
5623
|
for (const k of Object.keys(payload)) {
|
|
5622
|
-
if (
|
|
5624
|
+
if (wrappedSet.has(k)) payload[k] = bareActor;
|
|
5625
|
+
else if (set.has(k) || /^(subject|principal|grantedBy|grantee|member|user|owner|founder)$/i.test(k)) payload[k] = actor;
|
|
5623
5626
|
}
|
|
5624
5627
|
};
|
|
5625
5628
|
for (const seed of rb.prerequisiteSeeds ?? []) {
|
|
@@ -5633,7 +5636,7 @@ function seatRelationAuthority(eng, ws, lawHash, rb, actor, stamp, lines) {
|
|
|
5633
5636
|
lines.push(`\u2713 relation seat (prerequisite) \u2014 ${rb.domain}/${seed.directiveId} established (as ${actor})`);
|
|
5634
5637
|
}
|
|
5635
5638
|
const grantPayload = { ...rb.grantPayload };
|
|
5636
|
-
seatActorFields(grantPayload, [...rb.grantSubjectFields, ...rb.grantGrantedByFields]);
|
|
5639
|
+
seatActorFields(grantPayload, [...rb.grantSubjectFields, ...rb.grantGrantedByFields], rb.grantSubjectWrappedFields ?? []);
|
|
5637
5640
|
for (const f of rb.grantAutoStamped) grantPayload[f] = stamp;
|
|
5638
5641
|
const grantRes = author(eng, ws, rb.domain, rb.grantDirectiveId, grantPayload, lawHash, actorOpts);
|
|
5639
5642
|
if (grantRes.ok === false) {
|
|
@@ -5648,6 +5651,7 @@ function runRelationBootstrapLeg(eng, ws, lawHash, rb) {
|
|
|
5648
5651
|
const lines = [];
|
|
5649
5652
|
const done = (ok, error) => ({ ok, ms: performance.now() - t0, legs: lines, ...error !== void 0 ? { error } : {} });
|
|
5650
5653
|
const ACTOR = "user:proof-conformance";
|
|
5654
|
+
const BARE_ACTOR = "proof-conformance";
|
|
5651
5655
|
const actorOpts = { actor: ACTOR };
|
|
5652
5656
|
const stamp = (/* @__PURE__ */ new Date()).toISOString();
|
|
5653
5657
|
const grantedRelation = rb.grantedRelation ?? rb.relation;
|
|
@@ -5666,10 +5670,12 @@ function runRelationBootstrapLeg(eng, ws, lawHash, rb) {
|
|
|
5666
5670
|
return done(false, seat.error ?? `could not seat the granter's authority for ${rb.grantDirectiveId}`);
|
|
5667
5671
|
}
|
|
5668
5672
|
}
|
|
5669
|
-
const seatActorFields = (payload, routed) => {
|
|
5673
|
+
const seatActorFields = (payload, routed, wrapped = []) => {
|
|
5670
5674
|
const set = new Set(routed);
|
|
5675
|
+
const wrappedSet = new Set(wrapped);
|
|
5671
5676
|
for (const k of Object.keys(payload)) {
|
|
5672
|
-
if (
|
|
5677
|
+
if (wrappedSet.has(k)) payload[k] = BARE_ACTOR;
|
|
5678
|
+
else if (set.has(k) || /^(subject|principal|grantedBy|grantee|member|user|owner|founder)$/i.test(k)) payload[k] = ACTOR;
|
|
5673
5679
|
}
|
|
5674
5680
|
};
|
|
5675
5681
|
for (const seed of rb.prerequisiteSeeds ?? []) {
|
|
@@ -5684,7 +5690,7 @@ function runRelationBootstrapLeg(eng, ws, lawHash, rb) {
|
|
|
5684
5690
|
lines.push(`\u2713 relation bootstrap (prerequisite) \u2014 ${rb.domain}/${seed.directiveId} established (as founder ${ACTOR}) before the grant`);
|
|
5685
5691
|
}
|
|
5686
5692
|
const grantPayload = { ...rb.grantPayload };
|
|
5687
|
-
seatActorFields(grantPayload, [...rb.grantSubjectFields, ...rb.grantGrantedByFields]);
|
|
5693
|
+
seatActorFields(grantPayload, [...rb.grantSubjectFields, ...rb.grantGrantedByFields], rb.grantSubjectWrappedFields ?? []);
|
|
5688
5694
|
for (const f of rb.grantAutoStamped) grantPayload[f] = stamp;
|
|
5689
5695
|
const grantRes = author(eng, ws, rb.domain, rb.grantDirectiveId, grantPayload, lawHash, actorOpts);
|
|
5690
5696
|
if (grantRes.ok === false) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "githolon",
|
|
3
|
-
"version": "0.70.
|
|
3
|
+
"version": "0.70.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.70.
|
|
33
|
-
"@githolon/dsl": "^0.70.
|
|
32
|
+
"@githolon/client": "^0.70.1",
|
|
33
|
+
"@githolon/dsl": "^0.70.1",
|
|
34
34
|
"isomorphic-git": "^1.38.4"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|