githolon 0.98.1 → 0.98.3

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 CHANGED
@@ -2527,6 +2527,11 @@ async function boot(eng, ws, ledger) {
2527
2527
  }
2528
2528
  async function deploy(eng, ws, ledger, usda, domainHash, dispositions, opts = {}) {
2529
2529
  const result = author(eng, ws, "nomos", "installDomain", installPayload(domainHash, usda, eng.installedBy, dispositions), eng.hashes.nomos, { actor: opts.actor ?? "", ...opts.authToken ? { authToken: opts.authToken } : {} });
2530
+ if (result.ok === false) {
2531
+ throw new Error(
2532
+ `deploy-refused: installing ${domainHash.slice(0, 12)}\u2026 was REFUSED by the one gate (custody unchanged): ${result.error ?? "unknown refusal"}`
2533
+ );
2534
+ }
2530
2535
  const installation = qById(eng, ws, `domain-installation:${domainHash}`);
2531
2536
  const keys = installation[0]?.data?.domainKeys ?? installation[0]?.domainKeys ?? [];
2532
2537
  if (keys.length > 0) {
@@ -1377,6 +1377,11 @@ async function boot(eng, ws, ledger) {
1377
1377
  }
1378
1378
  async function deploy(eng, ws, ledger, usda, domainHash, dispositions, opts = {}) {
1379
1379
  const result = author(eng, ws, "nomos", "installDomain", installPayload(domainHash, usda, eng.installedBy, dispositions), eng.hashes.nomos, { actor: opts.actor ?? "", ...opts.authToken ? { authToken: opts.authToken } : {} });
1380
+ if (result.ok === false) {
1381
+ throw new Error(
1382
+ `deploy-refused: installing ${domainHash.slice(0, 12)}\u2026 was REFUSED by the one gate (custody unchanged): ${result.error ?? "unknown refusal"}`
1383
+ );
1384
+ }
1380
1385
  const installation = qById(eng, ws, `domain-installation:${domainHash}`);
1381
1386
  const keys = installation[0]?.data?.domainKeys ?? installation[0]?.domainKeys ?? [];
1382
1387
  if (keys.length > 0) {
@@ -1807,8 +1812,9 @@ var HDR = Object.freeze({
1807
1812
  function bulkReadForbidden(ws, kind, verdict) {
1808
1813
  const v = verdict || {};
1809
1814
  const caps = v.requiredRelationAnyOf || v.caps || [];
1810
- const premise = v.tokenError ? `token-verification-failed:${v.tokenError}` : v.resolvedPrincipal ? "principal-lacks-workspace-read-cap" : "no-principal-presented";
1811
- const why = v.tokenError ? `the presented ${HDR.AUTH} token did NOT verify (${v.tokenError}) against the workspace's declared issuer ${v.issuer || "?"}${v.audience ? ` / audience ${v.audience}` : ""}.` : v.resolvedPrincipal ? `resolved principal '${v.resolvedPrincipal}'${v.principalVerified ? " (token-verified)" : ` (unverified bare ${HDR.PRINCIPAL} claim)`} holds none of the required read capabilities.` : `no principal was presented \u2014 send a verified ${HDR.AUTH} token for a principal the owner granted a read capability.`;
1815
+ const schemaUnresolvable = v.schemaResolved === false;
1816
+ const premise = v.tokenError ? `token-verification-failed:${v.tokenError}` : schemaUnresolvable ? "relation-schema-unresolvable" : v.resolvedPrincipal ? "principal-lacks-workspace-read-cap" : "no-principal-presented";
1817
+ const why = v.tokenError ? `the presented ${HDR.AUTH} token did NOT verify (${v.tokenError}) against the workspace's declared issuer ${v.issuer || "?"}${v.audience ? ` / audience ${v.audience}` : ""}.` : schemaUnresolvable ? `the workspace's relation SCHEMA did not resolve \u2014 no principal can hold any read capability until the law's relation declarations merge cleanly (check for a cross-domain (type, relation) rewrite conflict on the shared 'workspace' type).` : v.resolvedPrincipal ? `resolved principal '${v.resolvedPrincipal}'${v.principalVerified ? " (token-verified)" : ` (unverified bare ${HDR.PRINCIPAL} claim)`} holds none of the required read capabilities.` : `no principal was presented \u2014 send a verified ${HDR.AUTH} token for a principal the owner granted a read capability.`;
1812
1818
  return {
1813
1819
  ok: false,
1814
1820
  ws,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "githolon",
3
- "version": "0.98.1",
3
+ "version": "0.98.3",
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.98.1",
33
- "@githolon/dsl": "^0.98.1",
32
+ "@githolon/client": "^0.98.3",
33
+ "@githolon/dsl": "^0.98.3",
34
34
  "isomorphic-git": "^1.38.4"
35
35
  },
36
36
  "devDependencies": {