githolon 0.105.19 → 0.105.23

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.
@@ -3004,8 +3004,8 @@ function resolveGatewayOperation(spec, opName, method) {
3004
3004
 
3005
3005
  // ../cloud/cloudflare-shell/src/kernel-registry.generated.ts
3006
3006
  var DEPLOYED_KERNELS = [
3007
- { prefix: "d37253bc", hash: "d37253bcefd90a180a6a1af96422a9f0724dfca9efd9ae7cff070afa2c410f09", version: "kernel-d37253bc", note: "production (this candidate)", features: ["compoundKeys", "capturedReads", "invariantGate", "surfacedMerge", "fieldProvenance", "nullSemantics", "attestedReads", "conflictSnapshots", "ownedAudience", "temporalEnum"] },
3008
- { prefix: "b6bddd8d", hash: "b6bddd8d61390edbe2ee4e5f3c7f21108bdb7800af746d20f568936f63e2d517", version: "kernel-b6bddd8d", note: "test-mint (this candidate) \u2014 feature-equivalent to production", features: ["compoundKeys", "capturedReads", "invariantGate", "surfacedMerge", "fieldProvenance", "nullSemantics", "attestedReads", "conflictSnapshots", "ownedAudience", "temporalEnum"] }
3007
+ { prefix: "49e1a3d0", hash: "49e1a3d03b90d54318fabab2ec8574e211fca54310553b5cd07d546ff8d04a67", version: "kernel-49e1a3d0", note: "production (this candidate)", features: ["compoundKeys", "capturedReads", "invariantGate", "surfacedMerge", "fieldProvenance", "nullSemantics", "attestedReads", "conflictSnapshots", "ownedAudience", "temporalEnum"] },
3008
+ { prefix: "73e25e41", hash: "73e25e416b2f6a3173ae0bd3d4139db582ec32b832c38286c22b189dff8a94dd", version: "kernel-73e25e41", note: "test-mint (this candidate) \u2014 feature-equivalent to production", features: ["compoundKeys", "capturedReads", "invariantGate", "surfacedMerge", "fieldProvenance", "nullSemantics", "attestedReads", "conflictSnapshots", "ownedAudience", "temporalEnum"] }
3009
3009
  ];
3010
3010
 
3011
3011
  // ../cloud/cloudflare-shell/src/staged-intents.ts
package/dist/full-cli.mjs CHANGED
@@ -5413,6 +5413,42 @@ var init_intent_offer_codec = __esm({
5413
5413
  }
5414
5414
  });
5415
5415
 
5416
+ // ../cloud/web-client/src/domain_readiness.ts
5417
+ async function prepareDomainUntilReady({
5418
+ domain,
5419
+ packageHash,
5420
+ directiveId,
5421
+ warm,
5422
+ timeoutMs = 3e4,
5423
+ yieldEvery = 32,
5424
+ now = Date.now,
5425
+ yieldHost = () => new Promise((resolve8) => setTimeout(resolve8, 0)),
5426
+ onQuantum
5427
+ }) {
5428
+ if (!domain || !packageHash) return { prepared: false, reason: "invalid-target", quanta: 0 };
5429
+ const selector = directiveId ? `plan:offer:${domain}:${directiveId}` : `plan:domain:${domain}`;
5430
+ const deadlineAt = now() + timeoutMs;
5431
+ let quanta = 0;
5432
+ while (now() <= deadlineAt) {
5433
+ quanta += 1;
5434
+ const progress = await warm();
5435
+ onQuantum?.(progress);
5436
+ if (progress.preparedCommandDomain === domain && progress.preparedCommandPackage === packageHash && progress.preparedCommandSelector === selector) {
5437
+ return { prepared: true, quanta };
5438
+ }
5439
+ if (progress.maintenancePending !== true) {
5440
+ return { prepared: false, reason: "maintenance-exhausted", quanta };
5441
+ }
5442
+ if (quanta % Math.max(1, yieldEvery) === 0) await yieldHost();
5443
+ }
5444
+ return { prepared: false, reason: "deadline-exceeded", quanta };
5445
+ }
5446
+ var init_domain_readiness = __esm({
5447
+ "../cloud/web-client/src/domain_readiness.ts"() {
5448
+ "use strict";
5449
+ }
5450
+ });
5451
+
5416
5452
  // ../cloud/web-client/src/remote_holon.ts
5417
5453
  function connectRemote(opts) {
5418
5454
  const { cloud, workspace } = opts;
@@ -6165,30 +6201,31 @@ ${String(commit).toLowerCase()}`;
6165
6201
  scheduleMaintenanceSoon();
6166
6202
  };
6167
6203
  const prepareDomainReady = async (domain, packageHash, directiveId) => {
6168
- if (!domain || !packageHash) return { prepared: false };
6169
6204
  requestDomainMaintenance(domain, packageHash, directiveId);
6170
- const selector = directiveId ? `plan:offer:${domain}:${directiveId}` : `plan:domain:${domain}`;
6171
- for (let quantum = 0; quantum < 64; quantum += 1) {
6172
- const result = await serialize(async () => JSON.parse(call("query", { queryBytes: qBytes({
6205
+ const readiness2 = await prepareDomainUntilReady({
6206
+ domain,
6207
+ packageHash,
6208
+ directiveId,
6209
+ warm: () => serialize(async () => JSON.parse(call("query", { queryBytes: qBytes({
6173
6210
  op: "warm",
6174
6211
  interactiveOnly: true,
6175
6212
  requestedDomain: domain,
6176
6213
  ...directiveId ? { requestedDirective: directiveId } : {},
6177
6214
  requestedPackage: packageHash
6178
- }) })), "prepare generated domain", false);
6179
- if (typeof process !== "undefined" && process.env?.NOMOS_DEBUG_RAW) {
6180
- console.error("[nomos] generated domain readiness quantum", result);
6181
- }
6182
- if (result?.preparedCommandDomain === domain && result?.preparedCommandPackage === packageHash && result?.preparedCommandSelector === selector) {
6183
- const index = _maintenanceTargets.findIndex(
6184
- (target) => target.domain === domain && target.packageHash === packageHash && target.directiveId === directiveId
6185
- );
6186
- if (index >= 0) _maintenanceTargets.splice(index, 1);
6187
- return { prepared: true };
6215
+ }) })), "prepare generated domain", false),
6216
+ onQuantum: (result) => {
6217
+ if (typeof process !== "undefined" && process.env?.NOMOS_DEBUG_RAW) {
6218
+ console.error("[nomos] generated domain readiness quantum", result);
6219
+ }
6188
6220
  }
6189
- if (result?.maintenancePending !== true) break;
6221
+ });
6222
+ if (readiness2.prepared) {
6223
+ const index = _maintenanceTargets.findIndex(
6224
+ (target) => target.domain === domain && target.packageHash === packageHash && target.directiveId === directiveId
6225
+ );
6226
+ if (index >= 0) _maintenanceTargets.splice(index, 1);
6190
6227
  }
6191
- return { prepared: false };
6228
+ return readiness2;
6192
6229
  };
6193
6230
  const scheduleMaintenanceSoon = (delayMs = 0) => {
6194
6231
  if (_disposed || _maintenanceTimer !== null || _maintenanceInFlight) return;
@@ -7307,7 +7344,9 @@ ${String(commit).toLowerCase()}`;
7307
7344
  try {
7308
7345
  const readiness2 = await prepareDomainReady(domain, candidateHash);
7309
7346
  if (readiness2.prepared !== true) {
7310
- throw new Error(`the current model '${candidateHash}' has no authenticated '${domain}' USDA slice`);
7347
+ throw new Error(
7348
+ `the current model '${candidateHash}' authenticated '${domain}' USDA slice did not become ready (${readiness2.reason} after ${readiness2.quanta} maintenance quanta)`
7349
+ );
7311
7350
  }
7312
7351
  return { ok: true, stage: "promoted" };
7313
7352
  } catch (error) {
@@ -7355,7 +7394,9 @@ ${String(commit).toLowerCase()}`;
7355
7394
  const readiness2 = await prepareDomainReady(domain, candidateHash);
7356
7395
  if (readiness2.prepared !== true) {
7357
7396
  throw Object.assign(
7358
- new Error(`the promoted model '${candidateHash}' is active but its authenticated '${domain}' USDA slice is not ready`),
7397
+ new Error(
7398
+ `the promoted model '${candidateHash}' is active but its authenticated '${domain}' USDA slice did not become ready (${readiness2.reason} after ${readiness2.quanta} maintenance quanta)`
7399
+ ),
7359
7400
  { code: "nomos.model.readiness_failed" }
7360
7401
  );
7361
7402
  }
@@ -11552,6 +11593,7 @@ var init_src2 = __esm({
11552
11593
  init_serialized_scheduler();
11553
11594
  init_kernel_pb();
11554
11595
  init_intent_offer_codec();
11596
+ init_domain_readiness();
11555
11597
  init_intent_offer_codec();
11556
11598
  init_kernel_provider_wasm();
11557
11599
  init_errors();
@@ -21360,11 +21402,12 @@ var init_dlq = __esm({
21360
21402
  });
21361
21403
 
21362
21404
  // src/cli.ts
21363
- import { existsSync as existsSync16, readdirSync as readdirSync6, readFileSync as readFileSync12 } from "node:fs";
21405
+ import { existsSync as existsSync16, mkdtempSync as mkdtempSync2, readdirSync as readdirSync6, readFileSync as readFileSync12, rmSync as rmSync3 } from "node:fs";
21364
21406
  import { spawn as spawn2, spawnSync as spawnSync7 } from "node:child_process";
21365
21407
  import { createHash as createHash6 } from "node:crypto";
21366
21408
  import { createRequire as createRequire3 } from "node:module";
21367
21409
  import { dirname as dirname9, join as join17, resolve as resolve7 } from "node:path";
21410
+ import { tmpdir as tmpdir2 } from "node:os";
21368
21411
  import { pathToFileURL as pathToFileURL5, fileURLToPath as fileURLToPath3 } from "node:url";
21369
21412
 
21370
21413
  // src/generate.ts
@@ -25134,6 +25177,7 @@ async function runGeneratedApplicationProofLocally(proofPath, onPerformance) {
25134
25177
  const platform = `proof-app-${createHash6("sha256").update(readFileSync12(proofPath)).digest("hex").slice(0, 20)}`;
25135
25178
  const proofLegs = parseOfflineLegs(readFileSync12(proofPath, "utf8"));
25136
25179
  const applicationMaxChildWorkspacesPerUser = proofLegs.applicationMaxChildWorkspacesPerUser;
25180
+ const proofHomeDirectory = mkdtempSync2(join17(tmpdir2(), "nomos-generated-proof-home-"));
25137
25181
  let dev2;
25138
25182
  try {
25139
25183
  dev2 = await module.startGeneratedApplicationProofCloud({
@@ -25159,6 +25203,7 @@ async function runGeneratedApplicationProofLocally(proofPath, onPerformance) {
25159
25203
  NOMOS_DEVICE_TOKEN_ENDPOINT: `${dev2.origin}/dev/mint-token`,
25160
25204
  NOMOS_TEST_K_ROOT_PUBLIC: testKRootPublic,
25161
25205
  NOMOS_PROOF_MANAGED: "1",
25206
+ HOME: proofHomeDirectory,
25162
25207
  ...onPerformance === void 0 ? {} : { NOMOS_PROOF_PERFORMANCE: "1" }
25163
25208
  }
25164
25209
  });
@@ -25196,6 +25241,7 @@ async function runGeneratedApplicationProofLocally(proofPath, onPerformance) {
25196
25241
  }
25197
25242
  if (priorLocalWasm === void 0) delete process.env.NOMOS_LOCAL_WASM;
25198
25243
  else process.env.NOMOS_LOCAL_WASM = priorLocalWasm;
25244
+ rmSync3(proofHomeDirectory, { recursive: true, force: true });
25199
25245
  }
25200
25246
  }
25201
25247
  async function runProof(args) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "githolon",
3
- "version": "0.105.19",
3
+ "version": "0.105.23",
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.19",
33
+ "@githolon/dsl": "^0.105.23",
34
34
  "isomorphic-git": "^1.38.4",
35
35
  "tsx": "^4.19.2"
36
36
  },