githolon 0.111.0 → 0.111.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/README.md +43 -0
- package/dist/compile_mountability_entry.js +141 -20
- package/dist/conformance-fixture/domains/booking.ts +72 -0
- package/dist/conformance-fixture/nomos.project.ts +1 -0
- package/dist/conformance-probe.mjs +69 -0
- package/dist/dev-server.mjs +133 -19
- package/dist/full-cli.mjs +355 -83
- package/package.json +2 -2
package/dist/full-cli.mjs
CHANGED
|
@@ -9279,7 +9279,7 @@ var init_recovery_desk_pb = __esm({
|
|
|
9279
9279
|
// ../adapter/proto/nomos/runtime/v2/observability_desk_pb.js
|
|
9280
9280
|
import { enumDesc as enumDesc15, fileDesc as fileDesc22, messageDesc as messageDesc22, tsEnum as tsEnum15 } from "@bufbuild/protobuf/codegenv2";
|
|
9281
9281
|
import { file_google_protobuf_any as file_google_protobuf_any2 } from "@bufbuild/protobuf/wkt";
|
|
9282
|
-
var file_nomos_runtime_v2_observability_desk, RuntimeFailureSchema, RuntimeUnavailableSchema, RuntimeRefusalSchema, DiagnosticAttributeSchema, RuntimeEventSchema, FollowsSummarySchema, FollowObservationSchema, CredentialRefreshRequestedSchema, RuntimeReadySchema, WatchChangedSchema, SyncCompletedSchema, LinkChangedSchema, RuntimeSpanSchema, RuntimeFailureKindSchema, RuntimeFailureKind, RuntimeUnavailableReasonSchema, RuntimeUnavailableReason, RuntimeRefusalReasonSchema, RuntimeRefusalReason, FollowObservationPhaseSchema, FollowObservationPhase, LinkStatusSchema, LinkStatus;
|
|
9282
|
+
var file_nomos_runtime_v2_observability_desk, RuntimeFailureSchema, RuntimeUnavailableSchema, RuntimeRefusalSchema, DiagnosticAttributeSchema, RuntimeEventSchema, FollowsSummarySchema, FollowObservationSchema, CredentialRefreshRequestedSchema, RuntimeReadySchema, WatchChangedSchema, SyncCompletedSchema, LinkChangedSchema, RuntimeSpanSchema, WritePreparationSchema, RuntimeFailureKindSchema, RuntimeFailureKind, RuntimeUnavailableReasonSchema, RuntimeUnavailableReason, RuntimeRefusalReasonSchema, RuntimeRefusalReason, FollowObservationPhaseSchema, FollowObservationPhase, LinkStatusSchema, LinkStatus;
|
|
9283
9283
|
var init_observability_desk_pb = __esm({
|
|
9284
9284
|
"../adapter/proto/nomos/runtime/v2/observability_desk_pb.js"() {
|
|
9285
9285
|
"use strict";
|
|
@@ -9291,7 +9291,7 @@ var init_observability_desk_pb = __esm({
|
|
|
9291
9291
|
init_model_adoption_desk_pb();
|
|
9292
9292
|
init_receiving_group_desk_pb();
|
|
9293
9293
|
init_recovery_desk_pb();
|
|
9294
|
-
file_nomos_runtime_v2_observability_desk = /* @__PURE__ */ fileDesc22("Cilub21vcy9ydW50aW1lL3YyL29ic2VydmFiaWxpdHlfZGVzay5wcm90bxIQbm9tb3MucnVudGltZS52MiJCCgxUcmFjZUNvbnRleHQSEAoIdHJhY2VfaWQYASABKAwSDwoHc3Bhbl9pZBgCIAEoDBIPCgdzYW1wbGVkGAMgASgIIp0CCg5SdW50aW1lRmFpbHVyZRIMCgRjb2RlGAEgASgJEg8KB21lc3NhZ2UYAiABKAkSEQoJY29tcG9uZW50GAMgASgJEhYKCXdvcmtzcGFjZRgEIAEoCUgAiAEBEhMKBmRvbWFpbhgFIAEoCUgBiAEBEhYKCWRpcmVjdGl2ZRgGIAEoCUgCiAEBEjkKCmF0dHJpYnV0ZXMYByADKAsyJS5ub21vcy5ydW50aW1lLnYyLkRpYWdub3N0aWNBdHRyaWJ1dGUSMgoEa2luZBgIIAEoDjIkLm5vbW9zLnJ1bnRpbWUudjIuUnVudGltZUZhaWx1cmVLaW5kQgwKCl93b3Jrc3BhY2VCCQoHX2RvbWFpbkIMCgpfZGlyZWN0aXZlIr4BChJSdW50aW1lVW5hdmFpbGFibGUSOgoGcmVhc29uGAEgASgOMioubm9tb3MucnVudGltZS52Mi5SdW50aW1lVW5hdmFpbGFibGVSZWFzb24SEQoJd29ya3NwYWNlGAIgASgJEh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KIEZPTExPV19PQlNFUlZBVElPTl9QSEFTRV9CQUNLT0ZGEAgSLAooRk9MTE9XX09CU0VSVkFUSU9OX1BIQVNFX1JFQk9STl9SRU1PVEVMWRAJEiwKKEZPTExPV19PQlNFUlZBVElPTl9QSEFTRV9SRVBMQUNJTkdfTE9DQUwQChIyCi5GT0xMT1dfT0JTRVJWQVRJT05fUEhBU0VfTE9DQUxfQ09QWV9VTlJFQURBQkxFEAsqVwoKTGlua1N0YXR1cxIbChdMSU5LX1NUQVRVU19VTlNQRUNJRklFRBAAEhQKEExJTktfU1RBVFVTX09QRU4QARIWChJMSU5LX1NUQVRVU19DTE9TRUQQAip2CgxUcmFuc2ZlcktpbmQSHQoZVFJBTlNGRVJfS0lORF9VTlNQRUNJRklFRBAAEhcKE1RSQU5TRkVSX0tJTkRfREVMVEEQARIWChJUUkFOU0ZFUl9LSU5EX0ZVTEwQAhIWChJUUkFOU0ZFUl9LSU5EX1BVU0gQA2IGcHJvdG8z", [file_google_protobuf_any2, file_nomos_kernel_v1_progress, file_nomos_runtime_v2_correspondence_desk, file_nomos_runtime_v2_custody_desk, file_nomos_runtime_v2_placement_desk, file_nomos_runtime_v2_maintenance_desk, file_nomos_runtime_v2_model_adoption_desk, file_nomos_runtime_v2_receiving_group_desk, file_nomos_runtime_v2_recovery_desk]);
|
|
9295
9295
|
RuntimeFailureSchema = /* @__PURE__ */ messageDesc22(file_nomos_runtime_v2_observability_desk, 1);
|
|
9296
9296
|
RuntimeUnavailableSchema = /* @__PURE__ */ messageDesc22(file_nomos_runtime_v2_observability_desk, 2);
|
|
9297
9297
|
RuntimeRefusalSchema = /* @__PURE__ */ messageDesc22(file_nomos_runtime_v2_observability_desk, 3);
|
|
@@ -9305,6 +9305,7 @@ var init_observability_desk_pb = __esm({
|
|
|
9305
9305
|
SyncCompletedSchema = /* @__PURE__ */ messageDesc22(file_nomos_runtime_v2_observability_desk, 11);
|
|
9306
9306
|
LinkChangedSchema = /* @__PURE__ */ messageDesc22(file_nomos_runtime_v2_observability_desk, 12);
|
|
9307
9307
|
RuntimeSpanSchema = /* @__PURE__ */ messageDesc22(file_nomos_runtime_v2_observability_desk, 15);
|
|
9308
|
+
WritePreparationSchema = /* @__PURE__ */ messageDesc22(file_nomos_runtime_v2_observability_desk, 18);
|
|
9308
9309
|
RuntimeFailureKindSchema = /* @__PURE__ */ enumDesc15(file_nomos_runtime_v2_observability_desk, 0);
|
|
9309
9310
|
RuntimeFailureKind = /* @__PURE__ */ tsEnum15(RuntimeFailureKindSchema);
|
|
9310
9311
|
RuntimeUnavailableReasonSchema = /* @__PURE__ */ enumDesc15(file_nomos_runtime_v2_observability_desk, 1);
|
|
@@ -11691,7 +11692,7 @@ function filesystemCustodyFetch(dataDir, origin, options = {}, networkFetch = fe
|
|
|
11691
11692
|
async function runGitHttpBackend(projectRoot, { method, pathInfo, query: query2, contentType, body }, options = {}) {
|
|
11692
11693
|
const stdin = body && body.length ? await requestBodyStdin(body) : void 0;
|
|
11693
11694
|
try {
|
|
11694
|
-
return await new Promise((
|
|
11695
|
+
return await new Promise((resolve9, reject) => {
|
|
11695
11696
|
const env = {
|
|
11696
11697
|
...process.env,
|
|
11697
11698
|
GIT_PROJECT_ROOT: projectRoot,
|
|
@@ -11766,7 +11767,7 @@ async function runGitHttpBackend(projectRoot, { method, pathInfo, query: query2,
|
|
|
11766
11767
|
}
|
|
11767
11768
|
headers[k] = v;
|
|
11768
11769
|
}
|
|
11769
|
-
|
|
11770
|
+
resolve9({ status: status2, headers, body: payload });
|
|
11770
11771
|
});
|
|
11771
11772
|
});
|
|
11772
11773
|
} finally {
|
|
@@ -14850,6 +14851,22 @@ var init_credential_sessions = __esm({
|
|
|
14850
14851
|
}
|
|
14851
14852
|
});
|
|
14852
14853
|
|
|
14854
|
+
// ../peer-office/src/runtime/credential_failure.ts
|
|
14855
|
+
function recoverableCredential(failure) {
|
|
14856
|
+
return failure.code === "nomos.auth.token_expired" || failure.code === "nomos.auth.token_missing";
|
|
14857
|
+
}
|
|
14858
|
+
function syncNeedsCredentialRefresh(result, failure) {
|
|
14859
|
+
if (failure !== void 0 && recoverableCredential(failure)) return true;
|
|
14860
|
+
const offer = result?.offerReceipt?.outcome;
|
|
14861
|
+
const pushNeedsRefresh = offer?.case === "failure" ? recoverableCredential(offer.value) : result?.pushError?.status === 401;
|
|
14862
|
+
return pushNeedsRefresh || result?.discoveryError?.status === 401;
|
|
14863
|
+
}
|
|
14864
|
+
var init_credential_failure = __esm({
|
|
14865
|
+
"../peer-office/src/runtime/credential_failure.ts"() {
|
|
14866
|
+
"use strict";
|
|
14867
|
+
}
|
|
14868
|
+
});
|
|
14869
|
+
|
|
14853
14870
|
// ../peer-office/src/runtime/credential_renewal.ts
|
|
14854
14871
|
function identityTokenClaim(token, claim) {
|
|
14855
14872
|
const claims = tokenClaims(token);
|
|
@@ -15048,19 +15065,11 @@ var init_sha256 = __esm({
|
|
|
15048
15065
|
|
|
15049
15066
|
// ../peer-office/src/runtime/credential_recovery_desk.ts
|
|
15050
15067
|
import { create as create17, fromBinary as fromBinary9, toBinary as toBinary8 } from "@bufbuild/protobuf";
|
|
15051
|
-
function recoverableCredential(failure) {
|
|
15052
|
-
return failure.code === "nomos.auth.token_expired" || failure.code === "nomos.auth.token_missing";
|
|
15053
|
-
}
|
|
15054
|
-
function syncNeedsCredentialRefresh(event) {
|
|
15055
|
-
const failures = [event.result?.pushError, event.result?.discoveryError];
|
|
15056
|
-
if (failures.some((failure) => failure?.status === 401 || failure?.status === 403)) return true;
|
|
15057
|
-
const text2 = `${event.failure?.message ?? ""} ${failures.map((failure) => failure?.message ?? "").join(" ")}`.toLowerCase();
|
|
15058
|
-
return text2.includes("unauthenticated") || text2.includes("token expired") || text2.includes("invalid token");
|
|
15059
|
-
}
|
|
15060
15068
|
var CredentialRecoveryDesk;
|
|
15061
15069
|
var init_credential_recovery_desk = __esm({
|
|
15062
15070
|
"../peer-office/src/runtime/credential_recovery_desk.ts"() {
|
|
15063
15071
|
"use strict";
|
|
15072
|
+
init_credential_failure();
|
|
15064
15073
|
init_kernel_pb();
|
|
15065
15074
|
init_correspondence_desk_pb();
|
|
15066
15075
|
init_credentials_desk_pb();
|
|
@@ -15145,7 +15154,7 @@ var init_credential_recovery_desk = __esm({
|
|
|
15145
15154
|
return false;
|
|
15146
15155
|
}
|
|
15147
15156
|
observeSync(session, event) {
|
|
15148
|
-
if (!syncNeedsCredentialRefresh(event) || this.#tokenless(session)) return;
|
|
15157
|
+
if (!syncNeedsCredentialRefresh(event.result, event.failure) || this.#tokenless(session)) return;
|
|
15149
15158
|
this.#prune();
|
|
15150
15159
|
const capability = this.#ports.capabilityFor(session);
|
|
15151
15160
|
const existing = this.#active.get(capability);
|
|
@@ -16352,6 +16361,7 @@ var init_receiving_group_desk = __esm({
|
|
|
16352
16361
|
#accounts = /* @__PURE__ */ new Map();
|
|
16353
16362
|
/** D22: device key hash → the workspaces the console reported this key enrolled in (this process's memory, not truth). */
|
|
16354
16363
|
#consoleEnrolments = /* @__PURE__ */ new Map();
|
|
16364
|
+
#preparingWrites = /* @__PURE__ */ new Map();
|
|
16355
16365
|
#sequence = 0;
|
|
16356
16366
|
#internalRequestId = 30000000000n;
|
|
16357
16367
|
constructor(ports) {
|
|
@@ -16391,16 +16401,124 @@ var init_receiving_group_desk = __esm({
|
|
|
16391
16401
|
if (head === account.observedHead) return;
|
|
16392
16402
|
this.#tails.set(workspace, { ...account, inFlight: false, attempts: 0, notBefore: 0n });
|
|
16393
16403
|
}
|
|
16394
|
-
/**
|
|
16395
|
-
*
|
|
16404
|
+
/** Only a proven non-admission can enter recovery. Console-enrolled children
|
|
16405
|
+
* share the owning application's route, selected by credential capability and
|
|
16406
|
+
* principal, never by workspace-name guessing or an unverified payload. */
|
|
16396
16407
|
recoverOffer(request, response) {
|
|
16397
|
-
if (!this.#ports.call || request.command.case !== "kernelCall" || request.command.value.credentialUse !== CredentialUse.SESSION || request.command.value.request?.operation.case !== "offer" || request.command.value.request.operation.value.intent.case !== "call"
|
|
16408
|
+
if (!this.#ports.call || request.command.case !== "kernelCall" || request.command.value.credentialUse !== CredentialUse.SESSION || request.command.value.request?.operation.case !== "offer" || request.command.value.request.operation.value.intent.case !== "call") return;
|
|
16409
|
+
const missing = response.outcome.case === "failure" ? response.outcome.value.code === "nomos.authz.signer_enrollment_missing" : response.outcome.case === "offer" && response.outcome.value.outcome.case === "refused" && response.outcome.value.outcome.value.refusal?.code === KernelRefusalCode.FORGED_PRINCIPAL && response.outcome.value.outcome.value.refusal.details?.fields.actor?.kind.case === "text" && response.outcome.value.outcome.value.refusal.details.fields.actor.kind.value === "unenrolled-signer-key";
|
|
16410
|
+
const revoked = response.outcome.case === "failure" && response.outcome.value.code === "nomos.authz.device_key_revoked";
|
|
16411
|
+
if (!missing && !revoked) return;
|
|
16398
16412
|
const binding = this.#ports.binding(request.command.value.session);
|
|
16399
|
-
|
|
16400
|
-
|
|
16413
|
+
if (!binding) return;
|
|
16414
|
+
const enrolled = [...this.#accounts.values()].find((account2) => {
|
|
16415
|
+
const owner = this.#ports.binding(account2.session);
|
|
16416
|
+
return account2.enrolment && owner?.credentialCapability === binding.credentialCapability && owner.principal === binding.principal;
|
|
16417
|
+
});
|
|
16401
16418
|
const copy3 = fromBinary14(RuntimeRequestSchema, toBinary11(RuntimeRequestSchema, request));
|
|
16419
|
+
if (enrolled?.enrolment) {
|
|
16420
|
+
if (revoked) return this.#writeRefused(binding.workspace, "This device's access has been revoked.");
|
|
16421
|
+
return this.#begin(request, `enrolled-write-${++this.#sequence}`, (workId2) => this.#prepareEnrolledWrite(copy3, binding, enrolled.application, enrolled.enrolment, workId2));
|
|
16422
|
+
}
|
|
16423
|
+
const account = this.#accounts.get(binding.workspace);
|
|
16424
|
+
if (!account) return;
|
|
16402
16425
|
return this.#begin(request, `receiving-group-authoring-${++this.#sequence}`, (workId2) => this.#recoverOffer(copy3, response, account, workId2));
|
|
16403
16426
|
}
|
|
16427
|
+
#writeRefused(workspace, detail, reason = RuntimeRefusalReason.ACCESS_DENIED) {
|
|
16428
|
+
return { case: "refused", value: create24(RuntimeRefusalSchema, {
|
|
16429
|
+
reason,
|
|
16430
|
+
workspace,
|
|
16431
|
+
retryable: false,
|
|
16432
|
+
detail
|
|
16433
|
+
}) };
|
|
16434
|
+
}
|
|
16435
|
+
#writeWaiting(workspace, detail) {
|
|
16436
|
+
return { case: "unavailable", value: create24(RuntimeUnavailableSchema, {
|
|
16437
|
+
reason: RuntimeUnavailableReason.CREDENTIAL_UNAVAILABLE,
|
|
16438
|
+
workspace,
|
|
16439
|
+
retryable: true,
|
|
16440
|
+
retryAfterMillis: 1e3,
|
|
16441
|
+
detail
|
|
16442
|
+
}) };
|
|
16443
|
+
}
|
|
16444
|
+
*#prepareEnrolledWrite(request, binding, application, route, workId2) {
|
|
16445
|
+
if (request.command.case !== "kernelCall") throw new Error("write preparation lost its call");
|
|
16446
|
+
const command = request.command.value;
|
|
16447
|
+
const principal = binding.principal;
|
|
16448
|
+
const unavailable = () => this.#writeWaiting(
|
|
16449
|
+
binding.workspace,
|
|
16450
|
+
"This device is still being prepared to save changes. Your change has not been saved. Try again when connected."
|
|
16451
|
+
);
|
|
16452
|
+
this.#ports.emit(binding.session, { case: "writePreparation", value: create24(WritePreparationSchema, {
|
|
16453
|
+
requestId: command.request.requestId,
|
|
16454
|
+
workspace: binding.workspace
|
|
16455
|
+
}) });
|
|
16456
|
+
const key2 = JSON.stringify([binding.credentialCapability, principal, binding.workspace]);
|
|
16457
|
+
const shared = this.#preparingWrites.get(key2);
|
|
16458
|
+
const deadline = this.#ports.clock.monotonicNanoseconds() + 30000000000n;
|
|
16459
|
+
let wake = 0;
|
|
16460
|
+
if (shared) {
|
|
16461
|
+
while (!shared.settled) {
|
|
16462
|
+
if (this.#ports.clock.monotonicNanoseconds() >= deadline) return unavailable();
|
|
16463
|
+
const receipt = yield { case: "wake", value: create24(PeerWakeEffectSchema, {
|
|
16464
|
+
effectId: `${workId2}:join-${++wake}`,
|
|
16465
|
+
delayMillis: 250
|
|
16466
|
+
}) };
|
|
16467
|
+
if (receipt.outcome.case !== "woken") return unavailable();
|
|
16468
|
+
}
|
|
16469
|
+
if (shared.result) return shared.result;
|
|
16470
|
+
} else {
|
|
16471
|
+
const preparation = { settled: false };
|
|
16472
|
+
this.#preparingWrites.set(key2, preparation);
|
|
16473
|
+
try {
|
|
16474
|
+
const secret = this.#ports.authorSecretIfPresent(binding.session);
|
|
16475
|
+
if (!secret) return preparation.result = this.#writeRefused(binding.workspace, "Sign in again to set up this device.", RuntimeRefusalReason.INVALID_CREDENTIAL);
|
|
16476
|
+
const keyHash = sha256Hex6(this.#ports.deriveSigningPublicKey(secret));
|
|
16477
|
+
let posture = this.#ports.posture(request, binding.session, principal, secret, false);
|
|
16478
|
+
if (posture.deviceSignerStatus === DeviceSignerStatus.REVOKED) {
|
|
16479
|
+
return preparation.result = this.#writeRefused(binding.workspace, "This device's access has been revoked.");
|
|
16480
|
+
}
|
|
16481
|
+
if (!posture.enrolledDevice || posture.deviceSignerStatus !== DeviceSignerStatus.ACTIVE) {
|
|
16482
|
+
const enrolled = yield* this.#enrolAtConsole(
|
|
16483
|
+
route,
|
|
16484
|
+
binding,
|
|
16485
|
+
`${application}|${principal}`,
|
|
16486
|
+
principal,
|
|
16487
|
+
keyHash,
|
|
16488
|
+
[binding.workspace],
|
|
16489
|
+
`${workId2}:console`
|
|
16490
|
+
);
|
|
16491
|
+
if (enrolled.case === "deferred") return preparation.result = enrolled.credentialRefused ? this.#writeRefused(binding.workspace, "Sign in again to set up this device.", RuntimeRefusalReason.INVALID_CREDENTIAL) : unavailable();
|
|
16492
|
+
if (!(binding.workspace in enrolled.value.heads)) {
|
|
16493
|
+
return preparation.result = this.#writeRefused(binding.workspace, "This device could not obtain access to save changes in this workspace.");
|
|
16494
|
+
}
|
|
16495
|
+
while (true) {
|
|
16496
|
+
posture = this.#ports.posture(request, binding.session, principal, secret, false);
|
|
16497
|
+
if (posture.deviceSignerStatus === DeviceSignerStatus.REVOKED) {
|
|
16498
|
+
return preparation.result = this.#writeRefused(binding.workspace, "This device's access has been revoked.");
|
|
16499
|
+
}
|
|
16500
|
+
if (posture.enrolledDevice && posture.deviceSignerStatus === DeviceSignerStatus.ACTIVE) break;
|
|
16501
|
+
if (this.#ports.clock.monotonicNanoseconds() >= deadline) return preparation.result = unavailable();
|
|
16502
|
+
const receipt = yield { case: "wake", value: create24(PeerWakeEffectSchema, {
|
|
16503
|
+
effectId: `${workId2}:observe-${++wake}`,
|
|
16504
|
+
delayMillis: 500
|
|
16505
|
+
}) };
|
|
16506
|
+
if (receipt.outcome.case !== "woken") return preparation.result = unavailable();
|
|
16507
|
+
}
|
|
16508
|
+
}
|
|
16509
|
+
} catch (error) {
|
|
16510
|
+
if (error instanceof ReceivingGroupRefusal) {
|
|
16511
|
+
return preparation.result = this.#writeRefused(binding.workspace, "This device could not obtain access to save changes in this workspace.");
|
|
16512
|
+
}
|
|
16513
|
+
preparation.result = unavailable();
|
|
16514
|
+
throw error;
|
|
16515
|
+
} finally {
|
|
16516
|
+
preparation.settled = true;
|
|
16517
|
+
this.#preparingWrites.delete(key2);
|
|
16518
|
+
}
|
|
16519
|
+
}
|
|
16520
|
+
return { case: "retried", request, response: this.#ports.call(request, command) };
|
|
16521
|
+
}
|
|
16404
16522
|
*#recoverOffer(request, response, account, workId2) {
|
|
16405
16523
|
const workspace = this.#ports.binding(account.session).workspace;
|
|
16406
16524
|
const deadline = this.#ports.clock.monotonicNanoseconds() + 60000000000n;
|
|
@@ -16468,6 +16586,7 @@ var init_receiving_group_desk = __esm({
|
|
|
16468
16586
|
this.#opening.clear();
|
|
16469
16587
|
this.#accounts.clear();
|
|
16470
16588
|
this.#consoleEnrolments.clear();
|
|
16589
|
+
this.#preparingWrites.clear();
|
|
16471
16590
|
}
|
|
16472
16591
|
#begin(request, workId2, procedure) {
|
|
16473
16592
|
const held = {
|
|
@@ -20359,6 +20478,7 @@ var init_replica_follow_controller = __esm({
|
|
|
20359
20478
|
init_replica_follow_state();
|
|
20360
20479
|
init_local_copy_readability();
|
|
20361
20480
|
init_placement_desk();
|
|
20481
|
+
init_credential_failure();
|
|
20362
20482
|
ReplicaFollowReconciliationKind = Object.freeze({
|
|
20363
20483
|
Following: "following",
|
|
20364
20484
|
NotFollowing: "not_following"
|
|
@@ -20626,12 +20746,12 @@ var init_replica_follow_controller = __esm({
|
|
|
20626
20746
|
this.#desk.transition(result.workspace, { case: ReplicaFollowEventKind.WentOffline, nowUnixMillis });
|
|
20627
20747
|
return delayUntilDue(this.#desk.get(result.workspace), nowUnixMillis);
|
|
20628
20748
|
}
|
|
20629
|
-
|
|
20630
|
-
|
|
20749
|
+
if (syncNeedsCredentialRefresh(result)) {
|
|
20750
|
+
const offer = result.offerReceipt?.outcome;
|
|
20631
20751
|
const transition = this.#desk.transition(result.workspace, {
|
|
20632
20752
|
case: ReplicaFollowEventKind.CredentialRejected,
|
|
20633
20753
|
nowUnixMillis,
|
|
20634
|
-
failure:
|
|
20754
|
+
failure: (offer?.case === "failure" ? offer.value.message : void 0) || result.pushError?.message || result.discoveryError?.message || "remote requires a refreshed credential"
|
|
20635
20755
|
});
|
|
20636
20756
|
if (transition.effects.some((effect) => effect.case === ReplicaFollowEffectKind.RefreshCredential)) {
|
|
20637
20757
|
return 0;
|
|
@@ -23855,9 +23975,9 @@ var init_workspace_sync = __esm({
|
|
|
23855
23975
|
return this.#route?.receptionUrl || `${this.#cloudBase()}/v2/workspaces/${encodeURIComponent(this.#mount.workspace)}`;
|
|
23856
23976
|
}
|
|
23857
23977
|
#authToken() {
|
|
23858
|
-
const
|
|
23859
|
-
if (!
|
|
23860
|
-
return
|
|
23978
|
+
const resolve9 = this.#credentials.authTokenForCapability ?? this.#credentials.authToken;
|
|
23979
|
+
if (!resolve9) throw new Error("workspace sync has no credential capability resolver");
|
|
23980
|
+
return resolve9.call(this.#credentials, this.#binding.credentialCapability);
|
|
23861
23981
|
}
|
|
23862
23982
|
};
|
|
23863
23983
|
}
|
|
@@ -29347,6 +29467,7 @@ var init_peer_office = __esm({
|
|
|
29347
29467
|
return this.#responses.modelAdoption(request, step);
|
|
29348
29468
|
}
|
|
29349
29469
|
#receivingGroupResponse(request, step) {
|
|
29470
|
+
if (step.case === "refused") return this.#response(request, { case: "refused", value: step.value });
|
|
29350
29471
|
if (step.case === "retried") return this.#birthCustodyResponse(step.request, this.#birthCustody.afterKernelCall(step.request, step.response));
|
|
29351
29472
|
if (step.case === "pending") return this.#response(request, { case: "correspondencePending", value: step.value });
|
|
29352
29473
|
if (step.case === "failure") return this.#failure(request, step.code, step.message);
|
|
@@ -29640,7 +29761,7 @@ function createPeerOfficeFrameRunner(kernel, credentials, profile, observations,
|
|
|
29640
29761
|
const deadline = Date.now() + Math.max(0, withinMillis);
|
|
29641
29762
|
while (outstanding() > 0 && Date.now() < deadline) {
|
|
29642
29763
|
lanes.wake(0);
|
|
29643
|
-
await new Promise((
|
|
29764
|
+
await new Promise((resolve9) => setTimeout(resolve9, 10));
|
|
29644
29765
|
}
|
|
29645
29766
|
return outstanding();
|
|
29646
29767
|
},
|
|
@@ -29701,7 +29822,7 @@ async function drivePeerFrame(runner, initialFrame, fetchImpl = globalThis.fetch
|
|
|
29701
29822
|
if (response.outcome.case === "localReadPending") {
|
|
29702
29823
|
if (yieldLocalReadToCaller) return responseFrame;
|
|
29703
29824
|
const pending2 = response.outcome.value;
|
|
29704
|
-
await new Promise((
|
|
29825
|
+
await new Promise((resolve9) => setTimeout(resolve9, pending2.resumeAfterMillis));
|
|
29705
29826
|
responseFrame = runner.handleFrame(toBinary26(RuntimeRequestSchema, create72(RuntimeRequestSchema, {
|
|
29706
29827
|
protocolVersion: response.protocolVersion,
|
|
29707
29828
|
requestId: response.requestId,
|
|
@@ -29871,7 +29992,7 @@ async function executeHistoryAcquisitionEffect(effect, custody) {
|
|
|
29871
29992
|
}
|
|
29872
29993
|
}
|
|
29873
29994
|
async function executeWakeEffect(effect) {
|
|
29874
|
-
await new Promise((
|
|
29995
|
+
await new Promise((resolve9) => setTimeout(resolve9, effect.delayMillis));
|
|
29875
29996
|
return create72(PeerEffectReceiptSchema, { effectId: effect.effectId, outcome: { case: "woken", value: create72(PeerWokenSchema) } });
|
|
29876
29997
|
}
|
|
29877
29998
|
async function executeCredentialRefreshEffect(effect, provider) {
|
|
@@ -31188,7 +31309,7 @@ async function prepareRemoteModelTransition(cloud, input) {
|
|
|
31188
31309
|
}
|
|
31189
31310
|
atHash = status2.outcome.value.head ?? "";
|
|
31190
31311
|
if (atHash || Date.now() >= deadline) break;
|
|
31191
|
-
await new Promise((
|
|
31312
|
+
await new Promise((resolve9) => setTimeout(resolve9, 1e3));
|
|
31192
31313
|
}
|
|
31193
31314
|
if (!atHash) {
|
|
31194
31315
|
throw new Error("workspace has no current Git frontier to prove after pulling it");
|
|
@@ -31234,8 +31355,8 @@ async function prepareRemoteModelTransition(cloud, input) {
|
|
|
31234
31355
|
target3
|
|
31235
31356
|
);
|
|
31236
31357
|
if (response.outcome.case !== "unavailable" || !response.outcome.value.retryable || Date.now() >= proofDeadline) break;
|
|
31237
|
-
await new Promise((
|
|
31238
|
-
|
|
31358
|
+
await new Promise((resolve9) => setTimeout(
|
|
31359
|
+
resolve9,
|
|
31239
31360
|
Math.max(500, response.outcome.case === "unavailable" ? response.outcome.value.retryAfterMillis ?? 1e3 : 1e3)
|
|
31240
31361
|
));
|
|
31241
31362
|
}
|
|
@@ -32088,7 +32209,7 @@ async function waitForWorkspaceMain(cloud, workspace, timeoutMs = 3e4) {
|
|
|
32088
32209
|
while (Date.now() < deadline) {
|
|
32089
32210
|
const head = await workspaceMainHead(cloud, workspace);
|
|
32090
32211
|
if (head !== void 0) return head;
|
|
32091
|
-
await new Promise((
|
|
32212
|
+
await new Promise((resolve9) => setTimeout(resolve9, 250));
|
|
32092
32213
|
}
|
|
32093
32214
|
return void 0;
|
|
32094
32215
|
}
|
|
@@ -32309,7 +32430,7 @@ async function ensureSovereignHome(opts = {}) {
|
|
|
32309
32430
|
const deadline = Date.now() + 3e4;
|
|
32310
32431
|
while (Date.now() < deadline) {
|
|
32311
32432
|
if (await fetch(`${cloud}/v2/workspaces/${encodeURIComponent(home)}`).then((r) => r.ok).catch(() => false)) break;
|
|
32312
|
-
await new Promise((
|
|
32433
|
+
await new Promise((resolve9) => setTimeout(resolve9, 250));
|
|
32313
32434
|
}
|
|
32314
32435
|
if (!await fetch(`${cloud}/v2/workspaces/${encodeURIComponent(home)}`).then((r) => r.ok).catch(() => false)) {
|
|
32315
32436
|
throw new Error(`Nomos admitted the birth of '${home}' but its custody did not become readable`);
|
|
@@ -32357,7 +32478,7 @@ async function ensureSovereignHome(opts = {}) {
|
|
|
32357
32478
|
return typeof leaf?.verifiedVia === "string" && leaf.verifiedVia.length > 0;
|
|
32358
32479
|
}).catch(() => false);
|
|
32359
32480
|
if (visible) break;
|
|
32360
|
-
await new Promise((
|
|
32481
|
+
await new Promise((resolve9) => setTimeout(resolve9, 250));
|
|
32361
32482
|
}
|
|
32362
32483
|
if (!visible) throw new Error(`the session home's verified device enrollment did not become readable`);
|
|
32363
32484
|
}
|
|
@@ -33741,7 +33862,7 @@ async function waitForDurableMainAdvance(cloud, ws2, previousHead, opts = {}) {
|
|
|
33741
33862
|
while (Date.now() < deadline) {
|
|
33742
33863
|
const head = await durableMainHead(cloud, ws2, fetchImpl);
|
|
33743
33864
|
if (head !== void 0 && head !== previousHead) return head;
|
|
33744
|
-
await new Promise((
|
|
33865
|
+
await new Promise((resolve9) => setTimeout(resolve9, pollMs));
|
|
33745
33866
|
}
|
|
33746
33867
|
return void 0;
|
|
33747
33868
|
}
|
|
@@ -34297,6 +34418,7 @@ var init_commands = __esm({
|
|
|
34297
34418
|
"mcp",
|
|
34298
34419
|
"init-editor",
|
|
34299
34420
|
"test",
|
|
34421
|
+
"conformance",
|
|
34300
34422
|
"doctor",
|
|
34301
34423
|
"cloud",
|
|
34302
34424
|
"console",
|
|
@@ -34428,6 +34550,16 @@ var init_help = __esm({
|
|
|
34428
34550
|
],
|
|
34429
34551
|
examples: ["githolon cloud dev", "githolon cloud dev --port 8787 --ephemeral", "githolon cloud dev --platform my-platform --law build/my.law.usdz"]
|
|
34430
34552
|
},
|
|
34553
|
+
conformance: {
|
|
34554
|
+
usage: "githolon conformance [--json] [--offline] [--runtime <directory>]",
|
|
34555
|
+
what: "Check the installed Node packages with an isolated generated application and the real test harness.\nProves write, read, refusal without mutation, persisted history and cold restore. Reports package versions\nand the kernel identity. First use may download verified runtime artifacts; no cloud workspace is changed.",
|
|
34556
|
+
flags: [
|
|
34557
|
+
["--json", "emit one report for CI; exit nonzero if any check fails"],
|
|
34558
|
+
["--offline", "use local runtime artifacts only; fail if unavailable"],
|
|
34559
|
+
["--runtime <directory>", "use this verified runtime bundle"]
|
|
34560
|
+
],
|
|
34561
|
+
examples: ["githolon conformance", "githolon conformance --offline --json"]
|
|
34562
|
+
},
|
|
34431
34563
|
test: {
|
|
34432
34564
|
usage: "githolon test [test-file-or-flutter-test-flags] [--diagnostics]",
|
|
34433
34565
|
what: "Run generated Dart application scenarios through Flutter with the real local Nomos custody plane.\nThe server rides inside githolon; connected scenarios, partitions, restarts and fresh reinstalls need no\nserver path, environment variables, certificates, workspace setup or separate application state.",
|
|
@@ -35040,35 +35172,171 @@ var init_mcp = __esm({
|
|
|
35040
35172
|
}
|
|
35041
35173
|
});
|
|
35042
35174
|
|
|
35175
|
+
// src/conformance.ts
|
|
35176
|
+
var conformance_exports = {};
|
|
35177
|
+
__export(conformance_exports, {
|
|
35178
|
+
runConformance: () => runConformance
|
|
35179
|
+
});
|
|
35180
|
+
import { spawnSync as spawnSync5 } from "node:child_process";
|
|
35181
|
+
import { cpSync, existsSync as existsSync13, mkdirSync as mkdirSync11, mkdtempSync as mkdtempSync4, readFileSync as readFileSync12, rmSync as rmSync6, symlinkSync, writeFileSync as writeFileSync12 } from "node:fs";
|
|
35182
|
+
import { createRequire as createRequire3 } from "node:module";
|
|
35183
|
+
import { tmpdir as tmpdir3 } from "node:os";
|
|
35184
|
+
import { dirname as dirname4, join as join17, resolve as resolve5 } from "node:path";
|
|
35185
|
+
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
35186
|
+
function installedPackage(name, from) {
|
|
35187
|
+
const require2 = createRequire3(join17(from, "package.json"));
|
|
35188
|
+
const entry = require2.resolve(name === "@githolon/testing" ? name : `${name}/package.json`);
|
|
35189
|
+
for (let directory2 = dirname4(entry); ; directory2 = dirname4(directory2)) {
|
|
35190
|
+
const manifest = join17(directory2, "package.json");
|
|
35191
|
+
if (existsSync13(manifest)) {
|
|
35192
|
+
const pkg = JSON.parse(readFileSync12(manifest, "utf8"));
|
|
35193
|
+
if (pkg.name === name) return { name, version: pkg.version, directory: directory2 };
|
|
35194
|
+
}
|
|
35195
|
+
if (dirname4(directory2) === directory2) throw new Error(`Cannot identify installed ${name}`);
|
|
35196
|
+
}
|
|
35197
|
+
}
|
|
35198
|
+
function runConformance(args, cwd = process.cwd()) {
|
|
35199
|
+
let json = false, offline = false, runtime;
|
|
35200
|
+
for (let index = 0; index < args.length; index++) {
|
|
35201
|
+
const arg = args[index];
|
|
35202
|
+
if (arg === "--json") json = true;
|
|
35203
|
+
else if (arg === "--offline") offline = true;
|
|
35204
|
+
else if (arg === "--runtime" && args[index + 1] && !args[index + 1].startsWith("--")) runtime = resolve5(cwd, args[++index]);
|
|
35205
|
+
else {
|
|
35206
|
+
process.stderr.write(`error: unknown or incomplete conformance option: ${arg}. See githolon conformance --help.
|
|
35207
|
+
`);
|
|
35208
|
+
return 2;
|
|
35209
|
+
}
|
|
35210
|
+
}
|
|
35211
|
+
const report = { passed: false, packages: [], checks: [] };
|
|
35212
|
+
let scratch;
|
|
35213
|
+
let stage = "installed packages";
|
|
35214
|
+
let action = "Run npm install in this project. Install githolon, @githolon/dsl and @githolon/testing as development dependencies if absent.";
|
|
35215
|
+
try {
|
|
35216
|
+
const packages = ["githolon", "@githolon/dsl", "@githolon/testing"].map((name) => {
|
|
35217
|
+
const pkg = installedPackage(name, cwd);
|
|
35218
|
+
report.packages.push({ name, version: pkg.version });
|
|
35219
|
+
return pkg;
|
|
35220
|
+
});
|
|
35221
|
+
const [cli, dsl] = packages;
|
|
35222
|
+
const peer2 = installedPackage("@githolon/runtime", dsl.directory);
|
|
35223
|
+
report.packages.push({ name: peer2.name, version: peer2.version });
|
|
35224
|
+
report.checks.push({ name: stage, passed: true });
|
|
35225
|
+
if (!json) {
|
|
35226
|
+
process.stdout.write("Nomos conformance \u2014 isolated generated application, real local runtime\n");
|
|
35227
|
+
for (const pkg of report.packages) process.stdout.write(` ${pkg.name} ${pkg.version}
|
|
35228
|
+
`);
|
|
35229
|
+
}
|
|
35230
|
+
scratch = mkdtempSync4(join17(tmpdir3(), "nomos-conformance-"));
|
|
35231
|
+
const here = dirname4(fileURLToPath2(import.meta.url));
|
|
35232
|
+
const distribution = existsSync13(join17(here, "conformance-probe.mjs")) ? here : resolve5(here, "../dist");
|
|
35233
|
+
cpSync(join17(distribution, "conformance-fixture"), scratch, { recursive: true });
|
|
35234
|
+
writeFileSync12(join17(scratch, "package.json"), '{"name":"nomos-conformance-probe","private":true,"type":"module"}\n');
|
|
35235
|
+
const modules = join17(scratch, "node_modules");
|
|
35236
|
+
mkdirSync11(join17(modules, "@githolon"), { recursive: true });
|
|
35237
|
+
for (const pkg of [dsl, peer2]) {
|
|
35238
|
+
symlinkSync(pkg.directory, join17(modules, pkg.name), process.platform === "win32" ? "junction" : "dir");
|
|
35239
|
+
}
|
|
35240
|
+
const environment = { ...process.env, TMPDIR: scratch, TMP: scratch, TEMP: scratch };
|
|
35241
|
+
const run2 = (argv) => {
|
|
35242
|
+
const result = spawnSync5(process.execPath, argv, {
|
|
35243
|
+
cwd: scratch,
|
|
35244
|
+
env: environment,
|
|
35245
|
+
encoding: "utf8",
|
|
35246
|
+
timeout: 18e4,
|
|
35247
|
+
maxBuffer: 8 * 1024 * 1024
|
|
35248
|
+
});
|
|
35249
|
+
if (result.error) throw result.error;
|
|
35250
|
+
if (result.status !== 0) throw new Error((result.stderr || result.stdout || `Exited ${result.status}`).slice(-6e3));
|
|
35251
|
+
};
|
|
35252
|
+
stage = "compile generated application";
|
|
35253
|
+
action = "Reinstall compatible githolon and @githolon/dsl versions from your lockfile. If this bundled fixture still fails, report the diagnostic and package versions to Nomos.";
|
|
35254
|
+
if (!json) process.stdout.write(`Checking ${stage}\u2026
|
|
35255
|
+
`);
|
|
35256
|
+
run2([join17(cli.directory, "dist/cli.mjs"), "compile", "--no-mount-check"]);
|
|
35257
|
+
report.checks.push({ name: stage, passed: true });
|
|
35258
|
+
stage = "runtime and application behavior";
|
|
35259
|
+
action = "Check the selected runtime and installed @githolon/testing version. For an uncached runtime, run once online or supply a verified runtime directory with --runtime. Report repeatable behavior failures with this report.";
|
|
35260
|
+
if (!json) process.stdout.write(`Checking ${stage}\u2026
|
|
35261
|
+
`);
|
|
35262
|
+
const resultFile = join17(scratch, "result.json");
|
|
35263
|
+
const testingEntry = createRequire3(join17(cwd, "package.json")).resolve("@githolon/testing");
|
|
35264
|
+
const probe = spawnSync5(process.execPath, [
|
|
35265
|
+
join17(distribution, "conformance-probe.mjs"),
|
|
35266
|
+
testingEntry,
|
|
35267
|
+
scratch,
|
|
35268
|
+
resultFile,
|
|
35269
|
+
runtime ?? "",
|
|
35270
|
+
String(offline)
|
|
35271
|
+
], {
|
|
35272
|
+
cwd: scratch,
|
|
35273
|
+
env: environment,
|
|
35274
|
+
encoding: "utf8",
|
|
35275
|
+
timeout: 18e4,
|
|
35276
|
+
maxBuffer: 8 * 1024 * 1024
|
|
35277
|
+
});
|
|
35278
|
+
if (existsSync13(resultFile)) {
|
|
35279
|
+
const result = JSON.parse(readFileSync12(resultFile, "utf8"));
|
|
35280
|
+
report.checks.push(...result.checks);
|
|
35281
|
+
if (result.runtime) report.runtime = result.runtime;
|
|
35282
|
+
if (result.failure) report.failure = result.failure;
|
|
35283
|
+
report.passed = result.passed && probe.status === 0;
|
|
35284
|
+
}
|
|
35285
|
+
if (!report.passed && !report.failure) throw probe.error ?? new Error((probe.stderr || probe.stdout || `Probe exited ${probe.status}`).slice(-6e3));
|
|
35286
|
+
} catch (error) {
|
|
35287
|
+
report.checks.push({ name: stage, passed: false });
|
|
35288
|
+
report.failure = { stage, detail: error instanceof Error ? error.message : String(error), action };
|
|
35289
|
+
} finally {
|
|
35290
|
+
if (scratch) rmSync6(scratch, { recursive: true, force: true });
|
|
35291
|
+
}
|
|
35292
|
+
if (json) process.stdout.write(JSON.stringify(report, null, 2) + "\n");
|
|
35293
|
+
else {
|
|
35294
|
+
if (report.runtime) process.stdout.write(`Kernel SHA-256: ${report.runtime.kernelSha256}
|
|
35295
|
+
`);
|
|
35296
|
+
for (const check2 of report.checks) process.stdout.write(`${check2.passed ? "PASS" : "FAIL"} ${check2.name}${check2.detail ? ` \u2014 ${check2.detail}` : ""}
|
|
35297
|
+
`);
|
|
35298
|
+
if (report.failure) process.stderr.write(`${report.failure.detail}
|
|
35299
|
+
Next: ${report.failure.action}
|
|
35300
|
+
`);
|
|
35301
|
+
process.stdout.write(report.passed ? "PASS \u2014 installed Node stack conforms.\n" : "FAIL \u2014 conformance did not pass.\n");
|
|
35302
|
+
}
|
|
35303
|
+
return report.passed ? 0 : 1;
|
|
35304
|
+
}
|
|
35305
|
+
var init_conformance = __esm({
|
|
35306
|
+
"src/conformance.ts"() {
|
|
35307
|
+
"use strict";
|
|
35308
|
+
}
|
|
35309
|
+
});
|
|
35310
|
+
|
|
35043
35311
|
// src/test.ts
|
|
35044
35312
|
var test_exports = {};
|
|
35045
35313
|
__export(test_exports, {
|
|
35046
35314
|
resolveTestCloudEntry: () => resolveTestCloudEntry,
|
|
35047
35315
|
runDartTests: () => runDartTests
|
|
35048
35316
|
});
|
|
35049
|
-
import { spawnSync as
|
|
35050
|
-
import { existsSync as
|
|
35051
|
-
import { dirname as
|
|
35052
|
-
import { fileURLToPath as
|
|
35317
|
+
import { spawnSync as spawnSync6 } from "node:child_process";
|
|
35318
|
+
import { existsSync as existsSync14 } from "node:fs";
|
|
35319
|
+
import { dirname as dirname5, resolve as resolve6 } from "node:path";
|
|
35320
|
+
import { fileURLToPath as fileURLToPath3 } from "node:url";
|
|
35053
35321
|
function resolveTestCloudEntry(options = {}) {
|
|
35054
35322
|
const cwd = options.cwd ?? process.cwd();
|
|
35055
35323
|
const environment = options.environment ?? process.env;
|
|
35056
35324
|
const explicit = environment.NOMOS_TEST_CLOUD_ENTRY;
|
|
35057
35325
|
if (explicit !== void 0) {
|
|
35058
|
-
const candidate =
|
|
35059
|
-
if (!
|
|
35326
|
+
const candidate = resolve6(cwd, explicit);
|
|
35327
|
+
if (!existsSync14(candidate)) {
|
|
35060
35328
|
throw new Error(`NOMOS_TEST_CLOUD_ENTRY does not exist: ${candidate}`);
|
|
35061
35329
|
}
|
|
35062
35330
|
return candidate;
|
|
35063
35331
|
}
|
|
35064
|
-
const here =
|
|
35332
|
+
const here = dirname5(fileURLToPath3(options.moduleUrl ?? import.meta.url));
|
|
35065
35333
|
const candidates = [
|
|
35066
|
-
|
|
35067
|
-
|
|
35068
|
-
|
|
35069
|
-
|
|
35334
|
+
resolve6(here, "dev-server.mjs"),
|
|
35335
|
+
resolve6(here, "../dist/dev-server.mjs"),
|
|
35336
|
+
resolve6(here, "../../platform-shells/node/local-development/server.ts"),
|
|
35337
|
+
resolve6(cwd, "platform-shells/node/local-development/server.ts")
|
|
35070
35338
|
];
|
|
35071
|
-
const server = candidates.find((candidate) =>
|
|
35339
|
+
const server = candidates.find((candidate) => existsSync14(candidate));
|
|
35072
35340
|
if (server === void 0) {
|
|
35073
35341
|
throw new Error("the bundled local Nomos cloud is missing \u2014 rebuild or reinstall githolon");
|
|
35074
35342
|
}
|
|
@@ -35086,7 +35354,7 @@ function runDartTests(args) {
|
|
|
35086
35354
|
return 1;
|
|
35087
35355
|
}
|
|
35088
35356
|
process.stdout.write("githolon test \u2014 generated application scenarios with real local custody\n");
|
|
35089
|
-
const result =
|
|
35357
|
+
const result = spawnSync6("flutter", ["test", ...forwarded], {
|
|
35090
35358
|
cwd: process.cwd(),
|
|
35091
35359
|
stdio: "inherit",
|
|
35092
35360
|
env: {
|
|
@@ -35702,7 +35970,7 @@ var init_law_command_projection = __esm({
|
|
|
35702
35970
|
});
|
|
35703
35971
|
|
|
35704
35972
|
// src/law_encoder.ts
|
|
35705
|
-
import { readFileSync as
|
|
35973
|
+
import { readFileSync as readFileSync13 } from "node:fs";
|
|
35706
35974
|
async function loadInstalledLaw(input) {
|
|
35707
35975
|
const file = discoverLawUsdz(input.cwd ?? process.cwd(), input.file);
|
|
35708
35976
|
const inspected = await inspectLawArchive(input.cloud, file);
|
|
@@ -35714,7 +35982,7 @@ async function loadInstalledLaw(input) {
|
|
|
35714
35982
|
);
|
|
35715
35983
|
}
|
|
35716
35984
|
const projection = parseLawCommandProjection(
|
|
35717
|
-
readLawClosureAsset(new Uint8Array(
|
|
35985
|
+
readLawClosureAsset(new Uint8Array(readFileSync13(file)), COMMAND_PROJECTION)
|
|
35718
35986
|
);
|
|
35719
35987
|
return { identity: inspected.identity, servedDomains: served, projection, file };
|
|
35720
35988
|
}
|
|
@@ -36010,7 +36278,7 @@ var init_model_children = __esm({
|
|
|
36010
36278
|
init_law_directive_call();
|
|
36011
36279
|
init_law_command_projection();
|
|
36012
36280
|
init_law_encoder();
|
|
36013
|
-
sleep = (ms) => new Promise((
|
|
36281
|
+
sleep = (ms) => new Promise((resolve9) => setTimeout(resolve9, ms));
|
|
36014
36282
|
}
|
|
36015
36283
|
});
|
|
36016
36284
|
|
|
@@ -36135,7 +36403,7 @@ async function modelAdopt(workspace, opts) {
|
|
|
36135
36403
|
inventory = observed;
|
|
36136
36404
|
break;
|
|
36137
36405
|
}
|
|
36138
|
-
await new Promise((
|
|
36406
|
+
await new Promise((resolve9) => setTimeout(resolve9, 250));
|
|
36139
36407
|
} while (Date.now() < deadline);
|
|
36140
36408
|
if (inventory === void 0) throw new Error("the active-law projection did not converge within 30 seconds");
|
|
36141
36409
|
const candidate = inventory.domains.find((installed) => installed.domainHash === identity);
|
|
@@ -36200,8 +36468,8 @@ __export(platform_exports, {
|
|
|
36200
36468
|
storeSeatDevice: () => storeSeatDevice
|
|
36201
36469
|
});
|
|
36202
36470
|
import { createHash as createHash6 } from "node:crypto";
|
|
36203
|
-
import { existsSync as
|
|
36204
|
-
import { join as
|
|
36471
|
+
import { existsSync as existsSync15, mkdirSync as mkdirSync12, readFileSync as readFileSync14, writeFileSync as writeFileSync13 } from "node:fs";
|
|
36472
|
+
import { join as join18 } from "node:path";
|
|
36205
36473
|
function refuse(message) {
|
|
36206
36474
|
throw new PlatformRefusal(message);
|
|
36207
36475
|
}
|
|
@@ -36274,8 +36542,8 @@ async function readModelAuthority(cloud, platform, seatedAt) {
|
|
|
36274
36542
|
}
|
|
36275
36543
|
function loadSeatDevice(workspace) {
|
|
36276
36544
|
const path4 = seatDevicePath(workspace);
|
|
36277
|
-
if (!
|
|
36278
|
-
const stored = JSON.parse(
|
|
36545
|
+
if (!existsSync15(path4)) return void 0;
|
|
36546
|
+
const stored = JSON.parse(readFileSync14(path4, "utf8"));
|
|
36279
36547
|
const publicKey = stored.publicKey ?? (stored.publicKeyHex === void 0 ? void 0 : Buffer.from(stored.publicKeyHex, "hex").toString("base64"));
|
|
36280
36548
|
if (typeof stored.secret !== "string" || publicKey === void 0 || typeof stored.keyHash !== "string") {
|
|
36281
36549
|
refuse(`${path4} is not a stored device key {secret, publicKey, keyHash}`);
|
|
@@ -36284,8 +36552,8 @@ function loadSeatDevice(workspace) {
|
|
|
36284
36552
|
}
|
|
36285
36553
|
function storeSeatDevice(workspace, device) {
|
|
36286
36554
|
const path4 = seatDevicePath(workspace);
|
|
36287
|
-
|
|
36288
|
-
|
|
36555
|
+
mkdirSync12(join18(path4, ".."), { recursive: true });
|
|
36556
|
+
writeFileSync13(path4, JSON.stringify(device, null, 2) + "\n", { mode: 384 });
|
|
36289
36557
|
}
|
|
36290
36558
|
async function mintSeatDevice(cloud) {
|
|
36291
36559
|
const generated = await generateDeviceKey(cloud);
|
|
@@ -36508,7 +36776,7 @@ async function platformAuthor(workspace, directiveId, opts) {
|
|
|
36508
36776
|
}
|
|
36509
36777
|
}
|
|
36510
36778
|
function readPayload(opts) {
|
|
36511
|
-
const raw = opts.payloadFile !== void 0 ?
|
|
36779
|
+
const raw = opts.payloadFile !== void 0 ? readFileSync14(opts.payloadFile, "utf8") : opts.payload;
|
|
36512
36780
|
if (raw === void 0 || raw.trim() === "") refuse("author needs --payload <json> or --payload-file <file>");
|
|
36513
36781
|
let parsed;
|
|
36514
36782
|
try {
|
|
@@ -36700,7 +36968,7 @@ async function waitFor(condition, deadlineMillis, report) {
|
|
|
36700
36968
|
announced = elapsed;
|
|
36701
36969
|
report(elapsed);
|
|
36702
36970
|
}
|
|
36703
|
-
await new Promise((
|
|
36971
|
+
await new Promise((resolve9) => setTimeout(resolve9, 1e3));
|
|
36704
36972
|
}
|
|
36705
36973
|
return false;
|
|
36706
36974
|
}
|
|
@@ -36720,7 +36988,7 @@ var init_platform = __esm({
|
|
|
36720
36988
|
PlatformRefusal = class extends Error {
|
|
36721
36989
|
};
|
|
36722
36990
|
ws = (name) => encodeURIComponent(name);
|
|
36723
|
-
seatDevicePath = (workspace) =>
|
|
36991
|
+
seatDevicePath = (workspace) => join18(configDir(), `seat-device-${workspace}.json`);
|
|
36724
36992
|
SEAT_CONVERGENCE_MILLIS = 18e4;
|
|
36725
36993
|
}
|
|
36726
36994
|
});
|
|
@@ -36786,9 +37054,9 @@ var init_dlq = __esm({
|
|
|
36786
37054
|
|
|
36787
37055
|
// src/custodian.ts
|
|
36788
37056
|
import { createHash as createHash7, createPrivateKey as createPrivateKey2, createPublicKey as createPublicKey2 } from "node:crypto";
|
|
36789
|
-
import { existsSync as
|
|
36790
|
-
import { dirname as
|
|
36791
|
-
import { fileURLToPath as
|
|
37057
|
+
import { existsSync as existsSync16, readFileSync as readFileSync15 } from "node:fs";
|
|
37058
|
+
import { dirname as dirname6, isAbsolute as isAbsolute3, join as join19, resolve as resolve7 } from "node:path";
|
|
37059
|
+
import { fileURLToPath as fileURLToPath4, pathToFileURL as pathToFileURL3 } from "node:url";
|
|
36792
37060
|
import { create as create80 } from "@bufbuild/protobuf";
|
|
36793
37061
|
import { AnySchema as AnySchema3 } from "@bufbuild/protobuf/wkt";
|
|
36794
37062
|
function custodianKeyHash(seed) {
|
|
@@ -36834,8 +37102,8 @@ async function resolveCustodianCredential(reference) {
|
|
|
36834
37102
|
return fromSeed(custodianSeedFromText(device.secret, `~/.holon device key for ${rest}`), reference);
|
|
36835
37103
|
}
|
|
36836
37104
|
if (scheme === "file") {
|
|
36837
|
-
if (rest === "" || !
|
|
36838
|
-
return fromSeed(custodianSeedFromText(
|
|
37105
|
+
if (rest === "" || !existsSync16(rest)) throw new Error(`--custodian-key file:<path> \u2014 no file at '${rest}'`);
|
|
37106
|
+
return fromSeed(custodianSeedFromText(readFileSync15(rest, "utf8"), rest), `file:${rest}`);
|
|
36839
37107
|
}
|
|
36840
37108
|
if (scheme === "env") {
|
|
36841
37109
|
const value = process.env[rest];
|
|
@@ -36861,8 +37129,8 @@ async function resolveCustodianCredential(reference) {
|
|
|
36861
37129
|
}
|
|
36862
37130
|
function readCustodianChain(file) {
|
|
36863
37131
|
if (file === void 0) return [];
|
|
36864
|
-
if (!
|
|
36865
|
-
const parsed = JSON.parse(
|
|
37132
|
+
if (!existsSync16(file)) throw new Error(`--chain <file> \u2014 no file at '${file}'`);
|
|
37133
|
+
const parsed = JSON.parse(readFileSync15(file, "utf8"));
|
|
36866
37134
|
const links = Array.isArray(parsed) ? parsed : typeof parsed === "object" && parsed !== null && Array.isArray(parsed.certChain) ? parsed.certChain : void 0;
|
|
36867
37135
|
if (links === void 0) {
|
|
36868
37136
|
throw new Error(
|
|
@@ -36912,10 +37180,10 @@ function scarFromVerdict(verdict) {
|
|
|
36912
37180
|
}
|
|
36913
37181
|
function frameworkReceptionPath(here = moduleDirectory()) {
|
|
36914
37182
|
const candidates = [
|
|
36915
|
-
|
|
36916
|
-
|
|
37183
|
+
join19(here, "framework", "nomos.reception.mjs"),
|
|
37184
|
+
resolve7(here, "../../cloud/cloudflare-shell/domains/build/nomos/nomos.reception.mjs")
|
|
36917
37185
|
];
|
|
36918
|
-
const found = candidates.find((candidate) =>
|
|
37186
|
+
const found = candidates.find((candidate) => existsSync16(candidate));
|
|
36919
37187
|
if (found === void 0) {
|
|
36920
37188
|
throw new Error(
|
|
36921
37189
|
"the framework controller's compiled Reception is missing \u2014 reinstall `githolon`, or compile it with `node dsl/compile_package.mjs domain_nomos.nomos.project.ts` in cloud/cloudflare-shell/domains"
|
|
@@ -36924,8 +37192,8 @@ function frameworkReceptionPath(here = moduleDirectory()) {
|
|
|
36924
37192
|
return found;
|
|
36925
37193
|
}
|
|
36926
37194
|
async function encodeDirectiveCall(receptionPath, domain, directiveId, workspace, payload) {
|
|
36927
|
-
const absolute = isAbsolute3(receptionPath) ? receptionPath :
|
|
36928
|
-
if (!
|
|
37195
|
+
const absolute = isAbsolute3(receptionPath) ? receptionPath : resolve7(process.cwd(), receptionPath);
|
|
37196
|
+
if (!existsSync16(absolute)) throw new Error(`--reception <path> \u2014 no compiled Reception at '${absolute}'`);
|
|
36929
37197
|
const module = await import(pathToFileURL3(absolute).href);
|
|
36930
37198
|
const frameworkCalls = module["nomosFrameworkCalls"];
|
|
36931
37199
|
if (typeof frameworkCalls === "object" && frameworkCalls !== null) {
|
|
@@ -36990,7 +37258,7 @@ async function encodeDirectiveCall(receptionPath, domain, directiveId, workspace
|
|
|
36990
37258
|
return captured;
|
|
36991
37259
|
}
|
|
36992
37260
|
function readPayload2(opts) {
|
|
36993
|
-
const text2 = opts.payloadFile !== void 0 ?
|
|
37261
|
+
const text2 = opts.payloadFile !== void 0 ? readFileSync15(opts.payloadFile, "utf8") : opts.payload;
|
|
36994
37262
|
if (text2 === void 0) throw new Error("pass the directive's payload with --payload <json> or --payload-file <file>");
|
|
36995
37263
|
const parsed = JSON.parse(text2);
|
|
36996
37264
|
if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) {
|
|
@@ -37204,7 +37472,7 @@ var init_custodian = __esm({
|
|
|
37204
37472
|
[/forged-principal|ForgedPrincipal|VERIFIED author/i, "ForgedPrincipal"],
|
|
37205
37473
|
[/bad-signature|BadSignature/i, "BadSignature"]
|
|
37206
37474
|
];
|
|
37207
|
-
moduleDirectory = () =>
|
|
37475
|
+
moduleDirectory = () => dirname6(fileURLToPath4(import.meta.url));
|
|
37208
37476
|
CapturedCall = class extends Error {
|
|
37209
37477
|
constructor() {
|
|
37210
37478
|
super("call captured");
|
|
@@ -37330,9 +37598,9 @@ Options
|
|
|
37330
37598
|
});
|
|
37331
37599
|
|
|
37332
37600
|
// src/cli.ts
|
|
37333
|
-
import { existsSync as
|
|
37334
|
-
import { dirname as
|
|
37335
|
-
import { pathToFileURL as pathToFileURL4, fileURLToPath as
|
|
37601
|
+
import { existsSync as existsSync17, readFileSync as readFileSync16 } from "node:fs";
|
|
37602
|
+
import { dirname as dirname7, join as join20, resolve as resolve8 } from "node:path";
|
|
37603
|
+
import { pathToFileURL as pathToFileURL4, fileURLToPath as fileURLToPath5 } from "node:url";
|
|
37336
37604
|
|
|
37337
37605
|
// src/generate.ts
|
|
37338
37606
|
import { mkdirSync, existsSync, writeFileSync } from "node:fs";
|
|
@@ -37844,6 +38112,7 @@ var USAGE2 = `githolon \u2014 model a business; Nomos owns the compute science
|
|
|
37844
38112
|
Start here:
|
|
37845
38113
|
githolon compile compile aggregates, birth, directives, and reads into law + a typed client
|
|
37846
38114
|
githolon test run generated Dart scenarios with real local custody
|
|
38115
|
+
githolon conformance check the installed stack with an isolated generated application
|
|
37847
38116
|
githolon check explain anything the law can already prove it would refuse
|
|
37848
38117
|
|
|
37849
38118
|
The application surface is one idea:
|
|
@@ -38052,6 +38321,9 @@ async function main(argv) {
|
|
|
38052
38321
|
const { initEditor: initEditor2 } = await Promise.resolve().then(() => (init_editor(), editor_exports));
|
|
38053
38322
|
return initEditor2(process.cwd());
|
|
38054
38323
|
}
|
|
38324
|
+
if (argv[0] === "conformance") {
|
|
38325
|
+
return (await Promise.resolve().then(() => (init_conformance(), conformance_exports))).runConformance(argv.slice(1));
|
|
38326
|
+
}
|
|
38055
38327
|
if (argv[0] === "test") {
|
|
38056
38328
|
const { runDartTests: runDartTests2 } = await Promise.resolve().then(() => (init_test(), test_exports));
|
|
38057
38329
|
return runDartTests2(argv.slice(1));
|
|
@@ -38075,18 +38347,18 @@ async function main(argv) {
|
|
|
38075
38347
|
${commandHelp("cloud") ?? USAGE2}`);
|
|
38076
38348
|
return 1;
|
|
38077
38349
|
}
|
|
38078
|
-
const { spawnSync:
|
|
38079
|
-
const here =
|
|
38350
|
+
const { spawnSync: spawnSync7 } = await import("node:child_process");
|
|
38351
|
+
const here = dirname7(fileURLToPath5(import.meta.url));
|
|
38080
38352
|
const candidates = [
|
|
38081
|
-
|
|
38353
|
+
resolve8(here, "dev-server.mjs")
|
|
38082
38354
|
// published: dist/dev-server.mjs
|
|
38083
38355
|
];
|
|
38084
|
-
const serverPath = candidates.find((p) =>
|
|
38356
|
+
const serverPath = candidates.find((p) => existsSync17(p));
|
|
38085
38357
|
if (!serverPath) {
|
|
38086
38358
|
process.stderr.write("error: dev-server not found \u2014 reinstall `githolon` or run `npm run build` in the cli package\n");
|
|
38087
38359
|
return 1;
|
|
38088
38360
|
}
|
|
38089
|
-
const r =
|
|
38361
|
+
const r = spawnSync7(process.execPath, [serverPath, ...argv.slice(2)], { stdio: "inherit" });
|
|
38090
38362
|
return r.status ?? 0;
|
|
38091
38363
|
}
|
|
38092
38364
|
if (argv[0] === "status") {
|