githolon 0.105.6 → 0.105.7

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.
@@ -360,7 +360,10 @@ var init_custody_transport = __esm({
360
360
  // vendor/engine/managed-promotion.ts
361
361
  function prepareManagedPromotion(report, candidateHash, domain, opts = {}) {
362
362
  if (!report.sourceVerified || !report.complete || !report.evolve?.ok) {
363
- const reason = !report.sourceVerified ? "the source ledger did not verify" : !report.complete ? "some historical premises could not be re-derived" : "the candidate fails deterministic schema evolution";
363
+ const reason = !report.sourceVerified ? "the source ledger did not verify" : !report.complete ? "some historical premises could not be re-derived" : [
364
+ "the candidate fails deterministic schema evolution",
365
+ ...report.evolve.violations.map((violation) => violation.detail)
366
+ ].join(": ");
364
367
  return { ok: false, stage: "preflight", report, error: `promotion refused: ${reason}` };
365
368
  }
366
369
  const acceptanceReason = opts.acceptanceReason?.trim();
@@ -902,17 +905,18 @@ function offerResult(response) {
902
905
  }
903
906
  }
904
907
  function applicationQueryProto(eng, ws, query2, options = {}) {
908
+ const hasAuthority = options.principal !== void 0 || options.keys !== void 0 || options.authToken !== void 0 || options.nowUnix !== void 0 || options.authorSecret !== void 0;
905
909
  const response = callProto(eng.ex, {
906
910
  case: "query",
907
911
  value: create(QueryRequestSchema, {
908
912
  target: protoTarget(ws, options.branch ?? BRANCH),
909
- authority: protoAuthority(
913
+ authority: hasAuthority ? protoAuthority(
910
914
  options.principal,
911
915
  options.keys,
912
916
  options.authToken,
913
917
  options.nowUnix,
914
918
  options.authorSecret
915
- ),
919
+ ) : void 0,
916
920
  spans: options.spans ?? false,
917
921
  query: query2
918
922
  })
@@ -4031,12 +4035,10 @@ var init_engine = __esm({
4031
4035
  const recordObject = record === void 0 ? void 0 : `${record.type}:${record.id}`;
4032
4036
  const derived = namedQueryProto(eng, workspace, QueryOperation.CRYPTO_OWNED_SCOPE_KEY, {
4033
4037
  custodyWorkspace: workspace,
4034
- principal,
4035
- authorSecret,
4036
4038
  scope,
4037
4039
  ...recordObject === void 0 ? {} : { recordObject, recordEpoch },
4038
4040
  ...recordWrap === void 0 ? {} : { recordWrap }
4039
- });
4041
+ }, { principal, authorSecret });
4040
4042
  const ownedKeySubject = String(derived.ownedKeySubject || "");
4041
4043
  if (!requireSeat) {
4042
4044
  return {
@@ -4053,7 +4055,16 @@ var init_engine = __esm({
4053
4055
  let hex = "";
4054
4056
  for (const byte of enc3.encode(principal)) hex += byte.toString(16).padStart(2, "0");
4055
4057
  const object = `nomos-owned-principal:${hex || "00"}`;
4056
- const rows = qById(eng, workspace, `reltuple-${object}-nomos_internal_owned_device_key_7c1f5e`);
4058
+ const rows = qById(
4059
+ eng,
4060
+ workspace,
4061
+ `reltuple-${object}-nomos_internal_owned_device_key_7c1f5e`,
4062
+ principal,
4063
+ [],
4064
+ "",
4065
+ 0,
4066
+ authorSecret
4067
+ );
4057
4068
  const row = Array.isArray(rows) ? rows[0] : rows?.rows?.[0];
4058
4069
  const leaves = row?.data?.subjects ?? row?.subjects ?? {};
4059
4070
  const leaf = (raw) => {
@@ -4084,14 +4095,12 @@ var init_engine = __esm({
4084
4095
  const custody = String(leaf(leaves[ownedKeySubject]).ownedCustody || "");
4085
4096
  if (!custody) throw new Error("the approved device has no owned-data handoff");
4086
4097
  const opened = namedQueryProto(eng, workspace, QueryOperation.CRYPTO_OWNED_SCOPE_KEY, {
4087
- workspace,
4088
- principal,
4089
- authorSecret,
4098
+ custodyWorkspace: workspace,
4090
4099
  scope,
4091
4100
  ownedCustody: custody,
4092
4101
  ...recordObject === void 0 ? {} : { recordObject, recordEpoch },
4093
4102
  ...recordWrap === void 0 ? {} : { recordWrap }
4094
- });
4103
+ }, { principal, authorSecret });
4095
4104
  return {
4096
4105
  scope: String(opened.scope || scope),
4097
4106
  epoch: Number(opened.epoch) || 0,
@@ -4112,11 +4121,8 @@ var init_engine = __esm({
4112
4121
  };
4113
4122
  };
4114
4123
  cryptoOwnedDeviceRequest = (eng, workspace, principal, authorSecret, scope) => String(namedQueryProto(eng, workspace, QueryOperation.CRYPTO_OWNED_DEVICE_REQUEST, {
4115
- workspace,
4116
- principal,
4117
- authorSecret,
4118
4124
  scope
4119
- }).request || "");
4125
+ }, { principal, authorSecret }).request || "");
4120
4126
  cryptoOwnedPrepareApproval = (eng, args) => namedQueryProto(eng, args.workspace, QueryOperation.CRYPTO_OWNED_PREPARE_APPROVAL, args);
4121
4127
  cryptoOwnedPrepareRecovery = (eng, args) => namedQueryProto(eng, args.workspace, QueryOperation.CRYPTO_OWNED_PREPARE_RECOVERY, args);
4122
4128
  cryptoKeygen = (eng) => namedQueryProto(eng, "root", QueryOperation.CRYPTO_KEYGEN);
@@ -4154,7 +4160,10 @@ var init_engine = __esm({
4154
4160
  ...authProviderJwks !== void 0 ? { authProviderJwks } : {},
4155
4161
  ...authProviderAudience !== void 0 ? { authProviderAudience } : {}
4156
4162
  }).cert;
4157
- cryptoWrapKey = (eng, { recipientPub, scopeKey }) => namedQueryProto(eng, "root", QueryOperation.CRYPTO_WRAP_KEY, { recipientPub, scopeKey });
4163
+ cryptoWrapKey = (eng, { recipientPub, scopeKey }) => {
4164
+ const result = namedQueryProto(eng, "root", QueryOperation.CRYPTO_WRAP_KEY, { recipientPub, scopeKey });
4165
+ return { hpkeEpk: String(result.hpkeEpk ?? ""), ct: String(result.ct ?? "") };
4166
+ };
4158
4167
  cryptoUnwrapKey = (eng, { secret, hpkeEpk, ct }) => namedQueryProto(eng, "root", QueryOperation.CRYPTO_UNWRAP_KEY, { secret, hpkeEpk, ct }).scopeKey;
4159
4168
  readPosture = (eng, ws, principal = "", authToken = "", nowUnix = 0, authorSecret = "") => namedQueryProto(
4160
4169
  eng,
@@ -618,17 +618,18 @@ function offerResult(response) {
618
618
  }
619
619
  }
620
620
  function applicationQueryProto(eng, ws, query2, options = {}) {
621
+ const hasAuthority = options.principal !== void 0 || options.keys !== void 0 || options.authToken !== void 0 || options.nowUnix !== void 0 || options.authorSecret !== void 0;
621
622
  const response = callProto(eng.ex, {
622
623
  case: "query",
623
624
  value: create(QueryRequestSchema, {
624
625
  target: protoTarget(ws, options.branch ?? BRANCH),
625
- authority: protoAuthority(
626
+ authority: hasAuthority ? protoAuthority(
626
627
  options.principal,
627
628
  options.keys,
628
629
  options.authToken,
629
630
  options.nowUnix,
630
631
  options.authorSecret
631
- ),
632
+ ) : void 0,
632
633
  spans: options.spans ?? false,
633
634
  query: query2
634
635
  })
@@ -2990,8 +2991,8 @@ function resolveGatewayOperation(spec, opName, method) {
2990
2991
 
2991
2992
  // ../cloud/cloudflare-shell/src/kernel-registry.generated.ts
2992
2993
  var DEPLOYED_KERNELS = [
2993
- { prefix: "796e512c", hash: "796e512cf4549c7fadbb4e56248ec076bca3992258a1b5282d678cb56bf24f35", version: "kernel-796e512c", note: "production (this candidate)", features: ["compoundKeys", "capturedReads", "invariantGate", "surfacedMerge", "fieldProvenance", "nullSemantics", "attestedReads", "conflictSnapshots", "ownedAudience", "temporalEnum"] },
2994
- { prefix: "beaabafa", hash: "beaabafa0d30eb83f1e49cc9f26251996ea3ef302e24ae36180a686145b41588", version: "kernel-beaabafa", note: "test-mint (this candidate) \u2014 feature-equivalent to production", features: ["compoundKeys", "capturedReads", "invariantGate", "surfacedMerge", "fieldProvenance", "nullSemantics", "attestedReads", "conflictSnapshots", "ownedAudience", "temporalEnum"] }
2994
+ { prefix: "08719339", hash: "08719339b0ecfb39b75543bf40422e84832153cc463b00283c0e84f6e38ce359", version: "kernel-08719339", note: "production (this candidate)", features: ["compoundKeys", "capturedReads", "invariantGate", "surfacedMerge", "fieldProvenance", "nullSemantics", "attestedReads", "conflictSnapshots", "ownedAudience", "temporalEnum"] },
2995
+ { prefix: "ab5c45c0", hash: "ab5c45c029a57b39711a559d803ed7d23e8eb94c11bbba652df7f8b3abd3c6df", version: "kernel-ab5c45c0", note: "test-mint (this candidate) \u2014 feature-equivalent to production", features: ["compoundKeys", "capturedReads", "invariantGate", "surfacedMerge", "fieldProvenance", "nullSemantics", "attestedReads", "conflictSnapshots", "ownedAudience", "temporalEnum"] }
2995
2996
  ];
2996
2997
 
2997
2998
  // ../cloud/cloudflare-shell/src/staged-intents.ts
Binary file
Binary file
package/dist/full-cli.mjs CHANGED
@@ -4419,7 +4419,10 @@ var init_custody_transport = __esm({
4419
4419
  // ../cloud/web-client/src/_adapter/managed-promotion.ts
4420
4420
  function prepareManagedPromotion(report, candidateHash, domain, opts = {}) {
4421
4421
  if (!report.sourceVerified || !report.complete || !report.evolve?.ok) {
4422
- const reason = !report.sourceVerified ? "the source ledger did not verify" : !report.complete ? "some historical premises could not be re-derived" : "the candidate fails deterministic schema evolution";
4422
+ const reason = !report.sourceVerified ? "the source ledger did not verify" : !report.complete ? "some historical premises could not be re-derived" : [
4423
+ "the candidate fails deterministic schema evolution",
4424
+ ...report.evolve.violations.map((violation) => violation.detail)
4425
+ ].join(": ");
4423
4426
  return { ok: false, stage: "preflight", report, error: `promotion refused: ${reason}` };
4424
4427
  }
4425
4428
  const acceptanceReason = opts.acceptanceReason?.trim();
@@ -11768,7 +11771,10 @@ var init_custody_transport2 = __esm({
11768
11771
  // vendor/engine/managed-promotion.ts
11769
11772
  function prepareManagedPromotion2(report, candidateHash, domain, opts = {}) {
11770
11773
  if (!report.sourceVerified || !report.complete || !report.evolve?.ok) {
11771
- const reason = !report.sourceVerified ? "the source ledger did not verify" : !report.complete ? "some historical premises could not be re-derived" : "the candidate fails deterministic schema evolution";
11774
+ const reason = !report.sourceVerified ? "the source ledger did not verify" : !report.complete ? "some historical premises could not be re-derived" : [
11775
+ "the candidate fails deterministic schema evolution",
11776
+ ...report.evolve.violations.map((violation) => violation.detail)
11777
+ ].join(": ");
11772
11778
  return { ok: false, stage: "preflight", report, error: `promotion refused: ${reason}` };
11773
11779
  }
11774
11780
  const acceptanceReason = opts.acceptanceReason?.trim();
@@ -12310,17 +12316,18 @@ function offerResult(response) {
12310
12316
  }
12311
12317
  }
12312
12318
  function applicationQueryProto(eng, ws, query3, options = {}) {
12319
+ const hasAuthority = options.principal !== void 0 || options.keys !== void 0 || options.authToken !== void 0 || options.nowUnix !== void 0 || options.authorSecret !== void 0;
12313
12320
  const response = callProto(eng.ex, {
12314
12321
  case: "query",
12315
12322
  value: create2(QueryRequestSchema2, {
12316
12323
  target: protoTarget2(ws, options.branch ?? BRANCH2),
12317
- authority: protoAuthority(
12324
+ authority: hasAuthority ? protoAuthority(
12318
12325
  options.principal,
12319
12326
  options.keys,
12320
12327
  options.authToken,
12321
12328
  options.nowUnix,
12322
12329
  options.authorSecret
12323
- ),
12330
+ ) : void 0,
12324
12331
  spans: options.spans ?? false,
12325
12332
  query: query3
12326
12333
  })
@@ -15439,12 +15446,10 @@ var init_engine = __esm({
15439
15446
  const recordObject = record === void 0 ? void 0 : `${record.type}:${record.id}`;
15440
15447
  const derived = namedQueryProto(eng, workspace, QueryOperation2.CRYPTO_OWNED_SCOPE_KEY, {
15441
15448
  custodyWorkspace: workspace,
15442
- principal,
15443
- authorSecret,
15444
15449
  scope,
15445
15450
  ...recordObject === void 0 ? {} : { recordObject, recordEpoch },
15446
15451
  ...recordWrap === void 0 ? {} : { recordWrap }
15447
- });
15452
+ }, { principal, authorSecret });
15448
15453
  const ownedKeySubject = String(derived.ownedKeySubject || "");
15449
15454
  if (!requireSeat) {
15450
15455
  return {
@@ -15461,7 +15466,16 @@ var init_engine = __esm({
15461
15466
  let hex = "";
15462
15467
  for (const byte of enc7.encode(principal)) hex += byte.toString(16).padStart(2, "0");
15463
15468
  const object = `nomos-owned-principal:${hex || "00"}`;
15464
- const rows = qById(eng, workspace, `reltuple-${object}-nomos_internal_owned_device_key_7c1f5e`);
15469
+ const rows = qById(
15470
+ eng,
15471
+ workspace,
15472
+ `reltuple-${object}-nomos_internal_owned_device_key_7c1f5e`,
15473
+ principal,
15474
+ [],
15475
+ "",
15476
+ 0,
15477
+ authorSecret
15478
+ );
15465
15479
  const row = Array.isArray(rows) ? rows[0] : rows?.rows?.[0];
15466
15480
  const leaves = row?.data?.subjects ?? row?.subjects ?? {};
15467
15481
  const leaf = (raw) => {
@@ -15492,14 +15506,12 @@ var init_engine = __esm({
15492
15506
  const custody = String(leaf(leaves[ownedKeySubject]).ownedCustody || "");
15493
15507
  if (!custody) throw new Error("the approved device has no owned-data handoff");
15494
15508
  const opened = namedQueryProto(eng, workspace, QueryOperation2.CRYPTO_OWNED_SCOPE_KEY, {
15495
- workspace,
15496
- principal,
15497
- authorSecret,
15509
+ custodyWorkspace: workspace,
15498
15510
  scope,
15499
15511
  ownedCustody: custody,
15500
15512
  ...recordObject === void 0 ? {} : { recordObject, recordEpoch },
15501
15513
  ...recordWrap === void 0 ? {} : { recordWrap }
15502
- });
15514
+ }, { principal, authorSecret });
15503
15515
  return {
15504
15516
  scope: String(opened.scope || scope),
15505
15517
  epoch: Number(opened.epoch) || 0,
@@ -15520,11 +15532,8 @@ var init_engine = __esm({
15520
15532
  };
15521
15533
  };
15522
15534
  cryptoOwnedDeviceRequest = (eng, workspace, principal, authorSecret, scope) => String(namedQueryProto(eng, workspace, QueryOperation2.CRYPTO_OWNED_DEVICE_REQUEST, {
15523
- workspace,
15524
- principal,
15525
- authorSecret,
15526
15535
  scope
15527
- }).request || "");
15536
+ }, { principal, authorSecret }).request || "");
15528
15537
  cryptoOwnedPrepareApproval = (eng, args) => namedQueryProto(eng, args.workspace, QueryOperation2.CRYPTO_OWNED_PREPARE_APPROVAL, args);
15529
15538
  cryptoOwnedPrepareRecovery = (eng, args) => namedQueryProto(eng, args.workspace, QueryOperation2.CRYPTO_OWNED_PREPARE_RECOVERY, args);
15530
15539
  cryptoKeygen = (eng) => namedQueryProto(eng, "root", QueryOperation2.CRYPTO_KEYGEN);
@@ -15562,7 +15571,10 @@ var init_engine = __esm({
15562
15571
  ...authProviderJwks !== void 0 ? { authProviderJwks } : {},
15563
15572
  ...authProviderAudience !== void 0 ? { authProviderAudience } : {}
15564
15573
  }).cert;
15565
- cryptoWrapKey = (eng, { recipientPub, scopeKey }) => namedQueryProto(eng, "root", QueryOperation2.CRYPTO_WRAP_KEY, { recipientPub, scopeKey });
15574
+ cryptoWrapKey = (eng, { recipientPub, scopeKey }) => {
15575
+ const result = namedQueryProto(eng, "root", QueryOperation2.CRYPTO_WRAP_KEY, { recipientPub, scopeKey });
15576
+ return { hpkeEpk: String(result.hpkeEpk ?? ""), ct: String(result.ct ?? "") };
15577
+ };
15566
15578
  cryptoUnwrapKey = (eng, { secret, hpkeEpk, ct }) => namedQueryProto(eng, "root", QueryOperation2.CRYPTO_UNWRAP_KEY, { secret, hpkeEpk, ct }).scopeKey;
15567
15579
  readPosture = (eng, ws, principal = "", authToken = "", nowUnix = 0, authorSecret = "") => namedQueryProto(
15568
15580
  eng,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "githolon",
3
- "version": "0.105.6",
3
+ "version": "0.105.7",
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",
@@ -30,7 +30,7 @@
30
30
  "dependencies": {
31
31
  "@bjorn3/browser_wasi_shim": "0.4.2",
32
32
  "@bufbuild/protobuf": "^2.13.0",
33
- "@githolon/dsl": "^0.105.6",
33
+ "@githolon/dsl": "^0.105.7",
34
34
  "isomorphic-git": "^1.38.4",
35
35
  "tsx": "^4.19.2"
36
36
  },