githolon 0.69.3 → 0.70.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.
- package/dist/cli.mjs +254 -4
- package/package.json +3 -3
package/dist/cli.mjs
CHANGED
|
@@ -2972,10 +2972,12 @@ var init_repairs = __esm({
|
|
|
2972
2972
|
// src/governance.ts
|
|
2973
2973
|
var governance_exports = {};
|
|
2974
2974
|
__export(governance_exports, {
|
|
2975
|
+
HONEST_CEILING: () => HONEST_CEILING,
|
|
2975
2976
|
ROOT_CUSTODIAN_SECRET: () => ROOT_CUSTODIAN_SECRET,
|
|
2976
2977
|
buildCertificate: () => buildCertificate,
|
|
2977
2978
|
buildRebirthPlan: () => buildRebirthPlan,
|
|
2978
2979
|
certifyEra: () => certifyEra,
|
|
2980
|
+
consentRebirth: () => consentRebirth,
|
|
2979
2981
|
executeRepairRebirth: () => executeRepairRebirth,
|
|
2980
2982
|
governanceOffer: () => governanceOffer,
|
|
2981
2983
|
governanceRelay: () => governanceRelay,
|
|
@@ -2984,6 +2986,11 @@ __export(governance_exports, {
|
|
|
2984
2986
|
keyExport: () => keyExport,
|
|
2985
2987
|
keyImport: () => keyImport,
|
|
2986
2988
|
keyShow: () => keyShow,
|
|
2989
|
+
postureMeaning: () => postureMeaning,
|
|
2990
|
+
postureSet: () => postureSet,
|
|
2991
|
+
postureShow: () => postureShow,
|
|
2992
|
+
readLiveConsent: () => readLiveConsent,
|
|
2993
|
+
readPosture: () => readPosture2,
|
|
2987
2994
|
rebirthApply: () => rebirthApply,
|
|
2988
2995
|
rebirthPlanCommand: () => rebirthPlanCommand,
|
|
2989
2996
|
rebirthWorkspace: () => rebirthWorkspace,
|
|
@@ -3095,6 +3102,129 @@ async function grantOrRevoke(verb, kind, subject, opts) {
|
|
|
3095
3102
|
out2(`\u2713 ${directiveId} ${subject} via signed governance offer to ${parent}`);
|
|
3096
3103
|
return 0;
|
|
3097
3104
|
}
|
|
3105
|
+
function postureMeaning(posture) {
|
|
3106
|
+
return posture === "sovereign" ? "the operator CANNOT run recovery verbs (rebirth, certifyEra, repairs) without YOUR consent \u2014 root's rebirth REFUSES for this workspace unless a live RebirthConsent fact is folded in your OWN chain (githolon consent rebirth <ws>). Restraint is law that replays, not host policy." : 'the operator CAN run recovery verbs (rebirth, certifyEra, repairs) FOR you \u2014 each a signed, attributed, permanent law fact you audit forever. "The assurance of being able to ask us for help." Revoke any time (\u2192 sovereign): githolon posture set <ws> sovereign --reason \u2026';
|
|
3107
|
+
}
|
|
3108
|
+
async function readPosture2(cloud, ws) {
|
|
3109
|
+
try {
|
|
3110
|
+
const r = await fetch(`${cloud}/v2/workspaces/${ws}/governancePosture?scope=self`);
|
|
3111
|
+
if (!r.ok) return "managed";
|
|
3112
|
+
const d = await r.json();
|
|
3113
|
+
const rows = Array.isArray(d?.rows) ? d.rows : [];
|
|
3114
|
+
const last = rows[rows.length - 1];
|
|
3115
|
+
return last?.data?.posture === "sovereign" ? "sovereign" : "managed";
|
|
3116
|
+
} catch {
|
|
3117
|
+
return null;
|
|
3118
|
+
}
|
|
3119
|
+
}
|
|
3120
|
+
async function readLiveConsent(cloud, ws) {
|
|
3121
|
+
try {
|
|
3122
|
+
const r = await fetch(`${cloud}/v2/workspaces/${ws}/rebirthConsentByWorkspace?workspaceId=${encodeURIComponent(ws)}`);
|
|
3123
|
+
if (!r.ok) return [];
|
|
3124
|
+
const d = await r.json();
|
|
3125
|
+
const now = Date.now();
|
|
3126
|
+
return (Array.isArray(d?.rows) ? d.rows : []).map((row) => row?.data ?? {}).filter((data) => {
|
|
3127
|
+
const e = Number(data["expiresAt"]);
|
|
3128
|
+
return !(e > 0) || e > now;
|
|
3129
|
+
}).map((data) => ({
|
|
3130
|
+
reason: String(data["reason"] ?? ""),
|
|
3131
|
+
consentedBy: String(data["consentedBy"] ?? ""),
|
|
3132
|
+
consentedAt: Number(data["consentedAt"] ?? 0),
|
|
3133
|
+
...Number(data["expiresAt"]) > 0 ? { expiresAt: Number(data["expiresAt"]) } : {}
|
|
3134
|
+
}));
|
|
3135
|
+
} catch {
|
|
3136
|
+
return [];
|
|
3137
|
+
}
|
|
3138
|
+
}
|
|
3139
|
+
async function postureShow(ws, opts) {
|
|
3140
|
+
const cloud = cloudBase(opts.cloud);
|
|
3141
|
+
const posture = await readPosture2(cloud, ws);
|
|
3142
|
+
if (posture === null) {
|
|
3143
|
+
err2(`could not read '${ws}' posture from ${cloud} \u2014 is the workspace born?`);
|
|
3144
|
+
return 1;
|
|
3145
|
+
}
|
|
3146
|
+
out2(`governance posture \u2014 ${ws} on ${cloud}`);
|
|
3147
|
+
out2("\u2550".repeat(48));
|
|
3148
|
+
out2(` posture : ${posture.toUpperCase()}${posture === "managed" ? " (default)" : ""}`);
|
|
3149
|
+
out2(` means : ${postureMeaning(posture)}`);
|
|
3150
|
+
if (posture === "sovereign") {
|
|
3151
|
+
const consents = await readLiveConsent(cloud, ws);
|
|
3152
|
+
if (consents.length === 0) {
|
|
3153
|
+
out2(` consent : NONE live \u2014 a rebirth of this workspace would be REFUSED (428) until the tenant consents.`);
|
|
3154
|
+
out2(` grant it: githolon consent rebirth ${ws} --reason "\u2026"`);
|
|
3155
|
+
} else {
|
|
3156
|
+
out2(` consent : ${consents.length} live consent fact(s):`);
|
|
3157
|
+
for (const c of consents) out2(` \u2022 by ${c.consentedBy || "?"} at ${c.consentedAt ? new Date(c.consentedAt).toISOString() : "?"}${c.expiresAt ? ` (expires ${new Date(c.expiresAt).toISOString()})` : ""} \u2014 ${c.reason || ""}`);
|
|
3158
|
+
}
|
|
3159
|
+
out2("");
|
|
3160
|
+
out2(` HONEST CEILING: ${HONEST_CEILING}`);
|
|
3161
|
+
}
|
|
3162
|
+
return 0;
|
|
3163
|
+
}
|
|
3164
|
+
async function postureSet(ws, posture, opts) {
|
|
3165
|
+
if (posture !== "managed" && posture !== "sovereign") {
|
|
3166
|
+
err2(`expected: githolon posture set ${ws} <managed|sovereign> --reason "\u2026"`);
|
|
3167
|
+
return 1;
|
|
3168
|
+
}
|
|
3169
|
+
const reason = opts.reason;
|
|
3170
|
+
if (reason === void 0 || reason.trim() === "") {
|
|
3171
|
+
err2(`posture set requires a --reason (the audit justification, on the ledger forever)`);
|
|
3172
|
+
return 1;
|
|
3173
|
+
}
|
|
3174
|
+
let principal;
|
|
3175
|
+
try {
|
|
3176
|
+
principal = resolveGovernancePrincipal(opts);
|
|
3177
|
+
} catch (e) {
|
|
3178
|
+
err2(e.message);
|
|
3179
|
+
return 1;
|
|
3180
|
+
}
|
|
3181
|
+
const payload = { workspaceId: ws, posture, reason, setBy: principal, at: Date.now() };
|
|
3182
|
+
let v;
|
|
3183
|
+
try {
|
|
3184
|
+
v = await signAndPostGovernance(ws, "setGovernancePosture", payload, opts);
|
|
3185
|
+
} catch (e) {
|
|
3186
|
+
err2(e.message);
|
|
3187
|
+
return 1;
|
|
3188
|
+
}
|
|
3189
|
+
if (!v.ok) {
|
|
3190
|
+
err2(`setGovernancePosture refused (${v.status}): ${typeof v.body === "string" ? v.body : JSON.stringify(v.body)}`);
|
|
3191
|
+
return 1;
|
|
3192
|
+
}
|
|
3193
|
+
out2(`\u2713 ${ws} posture set to ${posture.toUpperCase()} via signed governance offer`);
|
|
3194
|
+
out2(` ${postureMeaning(posture)}`);
|
|
3195
|
+
if (posture === "sovereign") out2(` (forward-only: help already given stays in history; the operator now needs your consent to rebirth \u2014 githolon consent rebirth ${ws} --reason \u2026)`);
|
|
3196
|
+
return 0;
|
|
3197
|
+
}
|
|
3198
|
+
async function consentRebirth(ws, opts) {
|
|
3199
|
+
const reason = opts.reason;
|
|
3200
|
+
if (reason === void 0 || reason.trim() === "") {
|
|
3201
|
+
err2(`consent rebirth requires a --reason (why you consent \u2014 on the ledger forever)`);
|
|
3202
|
+
return 1;
|
|
3203
|
+
}
|
|
3204
|
+
let principal;
|
|
3205
|
+
try {
|
|
3206
|
+
principal = resolveGovernancePrincipal(opts);
|
|
3207
|
+
} catch (e) {
|
|
3208
|
+
err2(e.message);
|
|
3209
|
+
return 1;
|
|
3210
|
+
}
|
|
3211
|
+
const payload = { workspaceId: ws, reason, consentedBy: principal, consentedAt: Date.now() };
|
|
3212
|
+
if (typeof opts.expiresAt === "number" && opts.expiresAt > 0) payload["expiresAt"] = opts.expiresAt;
|
|
3213
|
+
let v;
|
|
3214
|
+
try {
|
|
3215
|
+
v = await signAndPostGovernance(ws, "consentToRebirth", payload, opts);
|
|
3216
|
+
} catch (e) {
|
|
3217
|
+
err2(e.message);
|
|
3218
|
+
return 1;
|
|
3219
|
+
}
|
|
3220
|
+
if (!v.ok) {
|
|
3221
|
+
err2(`consentToRebirth refused (${v.status}): ${typeof v.body === "string" ? v.body : JSON.stringify(v.body)}`);
|
|
3222
|
+
return 1;
|
|
3223
|
+
}
|
|
3224
|
+
out2(`\u2713 ${ws} \u2014 rebirth consent folded in the tenant chain (by ${principal})`);
|
|
3225
|
+
out2(` the operator's rebirth custody act may now proceed (the two-key ceremony is satisfied).`);
|
|
3226
|
+
return 0;
|
|
3227
|
+
}
|
|
3098
3228
|
async function keyEnroll(opts) {
|
|
3099
3229
|
const cloud = cloudBase(opts.cloud);
|
|
3100
3230
|
const principal = opts.principal ?? activePrincipal();
|
|
@@ -3318,6 +3448,7 @@ async function certifyEra(ws, opts) {
|
|
|
3318
3448
|
return 1;
|
|
3319
3449
|
}
|
|
3320
3450
|
let seed = opts.seedSecret ?? process.env["NOMOS_ROOT_SEED"];
|
|
3451
|
+
const hasAsIdentity = typeof opts.as === "string" && opts.as.length > 0;
|
|
3321
3452
|
if (seed === void 0 && opts.gcpSecret !== void 0) {
|
|
3322
3453
|
try {
|
|
3323
3454
|
const { execFileSync } = await import("node:child_process");
|
|
@@ -3576,6 +3707,9 @@ async function buildRebirthPlan(cloud, ws, reason) {
|
|
|
3576
3707
|
}
|
|
3577
3708
|
const frozenAt = priorSupersessions === 0 ? ws : `${ws}--i${priorSupersessions}`;
|
|
3578
3709
|
const newCustodyAddress = `${ws}--i${priorSupersessions + 1}`;
|
|
3710
|
+
const posture = await readPosture2(cloud, ws) ?? "managed";
|
|
3711
|
+
const consents = posture === "sovereign" ? await readLiveConsent(cloud, ws) : [];
|
|
3712
|
+
const consentState = posture === "managed" ? "not-required" : consents.length > 0 ? "present" : "absent";
|
|
3579
3713
|
const plan = {
|
|
3580
3714
|
v: 1,
|
|
3581
3715
|
workspace: ws,
|
|
@@ -3591,6 +3725,7 @@ async function buildRebirthPlan(cloud, ws, reason) {
|
|
|
3591
3725
|
mode,
|
|
3592
3726
|
compaction,
|
|
3593
3727
|
repairs,
|
|
3728
|
+
posture: { posture, consent: consentState },
|
|
3594
3729
|
clientImpact: CLIENT_IMPACT,
|
|
3595
3730
|
generatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
3596
3731
|
};
|
|
@@ -3662,6 +3797,18 @@ function renderRebirthImpact(plan, ledgerCommits) {
|
|
|
3662
3797
|
L.push(" state-transform verbs execute at the re-fold seam in a future release.");
|
|
3663
3798
|
}
|
|
3664
3799
|
L.push("");
|
|
3800
|
+
L.push("GOVERNANCE POSTURE");
|
|
3801
|
+
const pp = plan.posture ?? { posture: "managed", consent: "not-required" };
|
|
3802
|
+
L.push(` posture : ${pp.posture.toUpperCase()}${pp.posture === "managed" ? " (default \u2014 the operator may run recovery verbs for the tenant)" : ""}`);
|
|
3803
|
+
if (pp.posture === "sovereign") {
|
|
3804
|
+
if (pp.consent === "present") {
|
|
3805
|
+
L.push(" consent : PRESENT \u2014 a live tenant RebirthConsent fact authorizes this rebirth (the two-key ceremony is satisfied).");
|
|
3806
|
+
} else {
|
|
3807
|
+
L.push(` consent : ABSENT \u2014 SOVEREIGN target: this rebirth is REFUSED until the tenant consents in THEIR OWN chain.`);
|
|
3808
|
+
L.push(` the tenant grants it: githolon consent rebirth ${plan.workspace} --reason "\u2026"`);
|
|
3809
|
+
}
|
|
3810
|
+
}
|
|
3811
|
+
L.push("");
|
|
3665
3812
|
L.push("CLIENT IMPACT");
|
|
3666
3813
|
L.push(` ${plan.clientImpact}.`);
|
|
3667
3814
|
L.push(" Recommend tenants DRAIN/SYNC their clients before the rebirth window.");
|
|
@@ -3735,6 +3882,7 @@ async function rebirthWorkspace(ws, opts) {
|
|
|
3735
3882
|
}
|
|
3736
3883
|
}
|
|
3737
3884
|
let seed = opts.seedSecret ?? process.env["NOMOS_ROOT_SEED"];
|
|
3885
|
+
const hasAsIdentity = typeof opts.as === "string" && opts.as.length > 0;
|
|
3738
3886
|
if (seed === void 0 && opts.gcpSecret !== void 0) {
|
|
3739
3887
|
try {
|
|
3740
3888
|
const { execFileSync } = await import("node:child_process");
|
|
@@ -3745,8 +3893,10 @@ async function rebirthWorkspace(ws, opts) {
|
|
|
3745
3893
|
}
|
|
3746
3894
|
}
|
|
3747
3895
|
if (seed === void 0 || seed.trim() === "") {
|
|
3748
|
-
|
|
3749
|
-
|
|
3896
|
+
if (!hasAsIdentity) {
|
|
3897
|
+
err2(`gov rebirth needs an identity: --as <admin-uid> (key on file \u2014 the same lane every signed governance offer uses), or the ROOT CUSTODIAN seed (--gcp-secret ${ROOT_CUSTODIAN_SECRET}; --seed-secret <b64> is break-glass, env NOMOS_ROOT_SEED the CI lane)`);
|
|
3898
|
+
return 1;
|
|
3899
|
+
}
|
|
3750
3900
|
}
|
|
3751
3901
|
const cloud = cloudBase(opts.cloud);
|
|
3752
3902
|
const engMod = await Promise.resolve().then(() => (init_engine(), engine_exports));
|
|
@@ -3776,6 +3926,20 @@ async function rebirthWorkspace(ws, opts) {
|
|
|
3776
3926
|
err2("refusing to rebirth root (the fixed point)");
|
|
3777
3927
|
return 1;
|
|
3778
3928
|
}
|
|
3929
|
+
{
|
|
3930
|
+
const planPosture = opts.plan?.posture;
|
|
3931
|
+
let sovereignBlocked = false;
|
|
3932
|
+
if (planPosture !== void 0) {
|
|
3933
|
+
sovereignBlocked = planPosture.posture === "sovereign" && planPosture.consent === "absent";
|
|
3934
|
+
} else {
|
|
3935
|
+
const posture = await readPosture2(cloud, ws) ?? "managed";
|
|
3936
|
+
if (posture === "sovereign") sovereignBlocked = (await readLiveConsent(cloud, ws)).length === 0;
|
|
3937
|
+
}
|
|
3938
|
+
if (sovereignBlocked) {
|
|
3939
|
+
err2(`'${ws}' is SOVEREIGN \u2014 a rebirth needs the tenant's OWN consent first (no live RebirthConsent fact). The tenant grants it from their admin: githolon consent rebirth ${ws} --reason "\u2026" \u2014 then re-run this rebirth. (Operator restraint is law that replays here, not host policy.)`);
|
|
3940
|
+
return 1;
|
|
3941
|
+
}
|
|
3942
|
+
}
|
|
3779
3943
|
if (opts.quiet !== true) {
|
|
3780
3944
|
try {
|
|
3781
3945
|
const built = await buildRebirthPlan(cloud, ws, reason);
|
|
@@ -3810,7 +3974,19 @@ gov rebirth ${ws}:`);
|
|
|
3810
3974
|
err2("could not resolve root's governance (workspaces) law hash from root currentLaw (pass --controller-hash)");
|
|
3811
3975
|
return 1;
|
|
3812
3976
|
}
|
|
3813
|
-
const
|
|
3977
|
+
const actorUid = opts.as;
|
|
3978
|
+
let signSecret = seed;
|
|
3979
|
+
let actor = "user:root-custodian";
|
|
3980
|
+
if (typeof actorUid === "string" && actorUid.length > 0) {
|
|
3981
|
+
const dk = getDeviceKey(actorUid);
|
|
3982
|
+
if (dk === void 0) {
|
|
3983
|
+
err2(`no signing key on file for --as ${actorUid} (githolon key import/enroll)`);
|
|
3984
|
+
return 1;
|
|
3985
|
+
}
|
|
3986
|
+
signSecret = dk.secret;
|
|
3987
|
+
actor = `user:${actorUid}`;
|
|
3988
|
+
}
|
|
3989
|
+
const res = author2(eng, "root", "workspaces", "rebirthWorkspace", { workspaceId, reason, rebornAt }, controllerHash, { authorSecret: signSecret, actor });
|
|
3814
3990
|
if (res.ok === false) {
|
|
3815
3991
|
err2(`rebirthWorkspace refused locally: ${res.error}`);
|
|
3816
3992
|
return 1;
|
|
@@ -4095,13 +4271,14 @@ function readSealedIntentBytes(eng, ws, intentOut) {
|
|
|
4095
4271
|
if (f?.data === void 0) return void 0;
|
|
4096
4272
|
return Buffer.from(f.data).toString("base64");
|
|
4097
4273
|
}
|
|
4098
|
-
var out2, err2, ROOT_CUSTODIAN_SECRET, CLIENT_IMPACT;
|
|
4274
|
+
var out2, err2, HONEST_CEILING, ROOT_CUSTODIAN_SECRET, CLIENT_IMPACT;
|
|
4099
4275
|
var init_governance = __esm({
|
|
4100
4276
|
"src/governance.ts"() {
|
|
4101
4277
|
"use strict";
|
|
4102
4278
|
init_cloud();
|
|
4103
4279
|
out2 = (s) => void process.stdout.write(s + "\n");
|
|
4104
4280
|
err2 = (s) => void process.stderr.write("error: " + s + "\n");
|
|
4281
|
+
HONEST_CEILING = `The operator controls root's law and could deploy law removing the consent check \u2014 but that act is itself a signed, ordered, permanent fact in root's chain, visible to every tenant running \`replay root\`, and grounds for exit-with-everything. Not "we can't" \u2014 "we can't secretly, and you can always leave."`;
|
|
4105
4282
|
ROOT_CUSTODIAN_SECRET = "nomos-root-custodian-key";
|
|
4106
4283
|
CLIENT_IMPACT = "every connected client raises CustodyBreak(superseded); unsynced client work is invisible to the cloud \u2014 drain/sync clients first";
|
|
4107
4284
|
}
|
|
@@ -8518,6 +8695,19 @@ async function status(wsArg, opts) {
|
|
|
8518
8695
|
}
|
|
8519
8696
|
} catch {
|
|
8520
8697
|
}
|
|
8698
|
+
try {
|
|
8699
|
+
const { readPosture: readPosture3, readLiveConsent: readLiveConsent2 } = await Promise.resolve().then(() => (init_governance(), governance_exports));
|
|
8700
|
+
const posture = await readPosture3(cloud, ws);
|
|
8701
|
+
if (posture !== null) {
|
|
8702
|
+
if (posture === "sovereign") {
|
|
8703
|
+
const consents = await readLiveConsent2(cloud, ws);
|
|
8704
|
+
out10(`posture SOVEREIGN (operator recovery verbs need tenant consent \u2014 ${consents.length} live consent fact(s))`);
|
|
8705
|
+
} else {
|
|
8706
|
+
out10(`posture managed (default \u2014 operator may run recovery verbs for the tenant)`);
|
|
8707
|
+
}
|
|
8708
|
+
}
|
|
8709
|
+
} catch {
|
|
8710
|
+
}
|
|
8521
8711
|
const allDomains = d.domains ?? [];
|
|
8522
8712
|
const frameworkHashes = new Set(FRAMEWORK_DOMAIN_KEYS.map((k) => d.currentLaw?.[k]).filter(Boolean));
|
|
8523
8713
|
const domains = allDomains.filter((dm) => !frameworkHashes.has(dm.domainHash));
|
|
@@ -9196,6 +9386,7 @@ ${USAGE}`);
|
|
|
9196
9386
|
...opts,
|
|
9197
9387
|
...flag("--seed-secret") !== void 0 ? { seedSecret: flag("--seed-secret") } : {},
|
|
9198
9388
|
...flag("--gcp-secret") !== void 0 ? { gcpSecret: flag("--gcp-secret") } : {},
|
|
9389
|
+
...flag("--as") !== void 0 ? { as: flag("--as") } : {},
|
|
9199
9390
|
...flag("--controller-hash") !== void 0 ? { controllerHash: flag("--controller-hash") } : {},
|
|
9200
9391
|
yes: argv.includes("--yes")
|
|
9201
9392
|
});
|
|
@@ -9203,6 +9394,65 @@ ${USAGE}`);
|
|
|
9203
9394
|
process.stderr.write("error: expected: githolon rebirth <plan <ws> | apply --plan <plan.json>>\n");
|
|
9204
9395
|
return 1;
|
|
9205
9396
|
}
|
|
9397
|
+
if (argv[0] === "posture") {
|
|
9398
|
+
const { pos, opts, bad } = cloudArgs(argv.slice(1));
|
|
9399
|
+
if (bad !== void 0) {
|
|
9400
|
+
process.stderr.write(`error: ${bad}
|
|
9401
|
+
|
|
9402
|
+
${USAGE}`);
|
|
9403
|
+
return 1;
|
|
9404
|
+
}
|
|
9405
|
+
const flag = (n) => {
|
|
9406
|
+
const i = argv.indexOf(n);
|
|
9407
|
+
return i >= 0 ? argv[i + 1] : void 0;
|
|
9408
|
+
};
|
|
9409
|
+
if (pos[0] === "set") {
|
|
9410
|
+
const platform2 = pos[1];
|
|
9411
|
+
const posture = pos[2];
|
|
9412
|
+
if (platform2 === void 0 || posture === void 0) {
|
|
9413
|
+
process.stderr.write("error: expected: githolon posture set <platform> <managed|sovereign> --reason <text>\n");
|
|
9414
|
+
return 1;
|
|
9415
|
+
}
|
|
9416
|
+
const { postureSet: postureSet2 } = await Promise.resolve().then(() => (init_governance(), governance_exports));
|
|
9417
|
+
return postureSet2(platform2, posture, { ...opts, ...flag("--reason") !== void 0 ? { reason: flag("--reason") } : {} });
|
|
9418
|
+
}
|
|
9419
|
+
const platform = pos[0];
|
|
9420
|
+
if (platform === void 0) {
|
|
9421
|
+
process.stderr.write("error: expected: githolon posture <platform> | githolon posture set <platform> <managed|sovereign> --reason <text>\n");
|
|
9422
|
+
return 1;
|
|
9423
|
+
}
|
|
9424
|
+
const { postureShow: postureShow2 } = await Promise.resolve().then(() => (init_governance(), governance_exports));
|
|
9425
|
+
return postureShow2(platform, opts);
|
|
9426
|
+
}
|
|
9427
|
+
if (argv[0] === "consent") {
|
|
9428
|
+
const { pos, opts, bad } = cloudArgs(argv.slice(1));
|
|
9429
|
+
if (bad !== void 0) {
|
|
9430
|
+
process.stderr.write(`error: ${bad}
|
|
9431
|
+
|
|
9432
|
+
${USAGE}`);
|
|
9433
|
+
return 1;
|
|
9434
|
+
}
|
|
9435
|
+
const flag = (n) => {
|
|
9436
|
+
const i = argv.indexOf(n);
|
|
9437
|
+
return i >= 0 ? argv[i + 1] : void 0;
|
|
9438
|
+
};
|
|
9439
|
+
if (pos[0] === "rebirth") {
|
|
9440
|
+
const ws = pos[1];
|
|
9441
|
+
if (ws === void 0) {
|
|
9442
|
+
process.stderr.write("error: expected: githolon consent rebirth <ws> --reason <text> [--expires-at <epoch-ms>]\n");
|
|
9443
|
+
return 1;
|
|
9444
|
+
}
|
|
9445
|
+
const { consentRebirth: consentRebirth2 } = await Promise.resolve().then(() => (init_governance(), governance_exports));
|
|
9446
|
+
const expiresRaw = flag("--expires-at");
|
|
9447
|
+
return consentRebirth2(ws, {
|
|
9448
|
+
...opts,
|
|
9449
|
+
...flag("--reason") !== void 0 ? { reason: flag("--reason") } : {},
|
|
9450
|
+
...expiresRaw !== void 0 && Number.isFinite(Number(expiresRaw)) ? { expiresAt: Number(expiresRaw) } : {}
|
|
9451
|
+
});
|
|
9452
|
+
}
|
|
9453
|
+
process.stderr.write("error: expected: githolon consent rebirth <ws> --reason <text>\n");
|
|
9454
|
+
return 1;
|
|
9455
|
+
}
|
|
9206
9456
|
if (argv[0] === "gov") {
|
|
9207
9457
|
const { governanceOffer: governanceOffer2, governanceRelay: governanceRelay2 } = await Promise.resolve().then(() => (init_governance(), governance_exports));
|
|
9208
9458
|
const { pos, opts, bad } = cloudArgs(argv.slice(1));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "githolon",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.70.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.
|
|
33
|
-
"@githolon/dsl": "^0.
|
|
32
|
+
"@githolon/client": "^0.70.0",
|
|
33
|
+
"@githolon/dsl": "^0.70.0",
|
|
34
34
|
"isomorphic-git": "^1.38.4"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|