@githolon/dsl 0.105.15 → 0.105.16
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/dart/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
## 0.64.32
|
|
2
|
+
|
|
3
|
+
- Prove a restored generated-application device is enrolled before exposing business APIs, including recovery from an interrupted bootstrap journal.
|
|
4
|
+
|
|
1
5
|
## 0.64.31
|
|
2
6
|
|
|
3
7
|
- Restage the validated intent-offer byte gate and deterministic signer-posture reader into the immutable Dart runner.
|
package/dart/pubspec.yaml
CHANGED
|
@@ -7,7 +7,7 @@ repository: https://github.com/Captain-App/nomos2
|
|
|
7
7
|
description: >-
|
|
8
8
|
Nomos 2 Dart client — generated domain values, intent payloads and application
|
|
9
9
|
lifecycle types over the typed Nomos kernel protocol and USDA custody model.
|
|
10
|
-
version: 0.64.
|
|
10
|
+
version: 0.64.32
|
|
11
11
|
|
|
12
12
|
environment:
|
|
13
13
|
sdk: ^3.5.0
|
package/package.json
CHANGED
|
@@ -13884,7 +13884,6 @@ async function nomosInternalOpenGeneratedApplication(options, bind, internals =
|
|
|
13884
13884
|
let authorityHolon = await measureOpen("open private application custody", () => mountAuthority(secret, authToken));
|
|
13885
13885
|
const storedJournal = await measureOpen("load application bootstrap state", () => store.loadText(journalState));
|
|
13886
13886
|
const completed = storedJournal === "complete";
|
|
13887
|
-
const hadDurableSecret = secret !== null;
|
|
13888
13887
|
let publicKey;
|
|
13889
13888
|
if (secret === null) {
|
|
13890
13889
|
const device = await measureOpen("create application device identity", () => authorityHolon.authorKeygen());
|
|
@@ -13905,22 +13904,44 @@ async function nomosInternalOpenGeneratedApplication(options, bind, internals =
|
|
|
13905
13904
|
throw applicationError("Sign in changed authority while preparing this application device.", "nomos.authority.changed_during_open");
|
|
13906
13905
|
}
|
|
13907
13906
|
authToken = deviceToken;
|
|
13907
|
+
const birthOrRepeat = async () => {
|
|
13908
|
+
const birth = await measureOpen("establish private application custody", () => authorityHolon.nomosInternalBirthReceivingGroup({
|
|
13909
|
+
parent: application,
|
|
13910
|
+
principal,
|
|
13911
|
+
subject,
|
|
13912
|
+
device: { secret, public: publicKey },
|
|
13913
|
+
authToken,
|
|
13914
|
+
idToken: authToken,
|
|
13915
|
+
verifiedVia: issuer,
|
|
13916
|
+
bornAt: now().toISOString(),
|
|
13917
|
+
confirm: true
|
|
13918
|
+
}));
|
|
13919
|
+
const verdict = birth.verify;
|
|
13920
|
+
if (verdict !== void 0 && verdict.valid !== true) throw new Error(`the born application failed replay verification: ${String(verdict.error ?? "unknown")}`);
|
|
13921
|
+
};
|
|
13922
|
+
const ensureSignerEnrollment = async () => {
|
|
13923
|
+
const enroll = () => authorityHolon.ensureParentSignerEnrollment({
|
|
13924
|
+
// The write gate that this device will use is the receiving-group workspace itself.
|
|
13925
|
+
// The application root authorises/births that home; it is not a substitute signer index.
|
|
13926
|
+
parent: receivingGroup,
|
|
13927
|
+
// The author gate speaks canonical Nomos principals. A provider subject is deliberately
|
|
13928
|
+
// opaque and may contain its own namespace separators; never enrol that raw value as the actor.
|
|
13929
|
+
principal: subject,
|
|
13930
|
+
publicKey,
|
|
13931
|
+
authorSecret: secret,
|
|
13932
|
+
authToken,
|
|
13933
|
+
idToken: authToken,
|
|
13934
|
+
verifiedVia: issuer
|
|
13935
|
+
});
|
|
13936
|
+
try {
|
|
13937
|
+
await measureOpen("confirm private-custody signer enrolment", enroll);
|
|
13938
|
+
} catch (error) {
|
|
13939
|
+
if (!String(error).includes("receiving-group-additional-device-requires-current-device-or-guardian")) throw error;
|
|
13940
|
+
await birthOrRepeat();
|
|
13941
|
+
await measureOpen("verify recovered private-custody signer enrolment", enroll);
|
|
13942
|
+
}
|
|
13943
|
+
};
|
|
13908
13944
|
if (!completed) {
|
|
13909
|
-
const birthOrRepeat = async () => {
|
|
13910
|
-
const birth = await measureOpen("establish private application custody", () => authorityHolon.nomosInternalBirthReceivingGroup({
|
|
13911
|
-
parent: application,
|
|
13912
|
-
principal,
|
|
13913
|
-
subject,
|
|
13914
|
-
device: { secret, public: publicKey },
|
|
13915
|
-
authToken,
|
|
13916
|
-
idToken: authToken,
|
|
13917
|
-
verifiedVia: issuer,
|
|
13918
|
-
bornAt: now().toISOString(),
|
|
13919
|
-
confirm: true
|
|
13920
|
-
}));
|
|
13921
|
-
const verdict = birth.verify;
|
|
13922
|
-
if (verdict !== void 0 && verdict.valid !== true) throw new Error(`the born application failed replay verification: ${String(verdict.error ?? "unknown")}`);
|
|
13923
|
-
};
|
|
13924
13945
|
let homeAvailable = false;
|
|
13925
13946
|
try {
|
|
13926
13947
|
homeAvailable = Boolean(await measureOpen("check private application custody", () => authorityHolon.head()));
|
|
@@ -13928,28 +13949,6 @@ async function nomosInternalOpenGeneratedApplication(options, bind, internals =
|
|
|
13928
13949
|
}
|
|
13929
13950
|
if (!homeAvailable) {
|
|
13930
13951
|
await birthOrRepeat();
|
|
13931
|
-
} else if (!hadDurableSecret) {
|
|
13932
|
-
try {
|
|
13933
|
-
await measureOpen("enrol application device in its private custody", () => authorityHolon.ensureParentSignerEnrollment({
|
|
13934
|
-
// The write gate that this device will use is the receiving-group workspace itself.
|
|
13935
|
-
// The application root authorises/births that home; it is not a substitute signer index.
|
|
13936
|
-
parent: receivingGroup,
|
|
13937
|
-
// The author gate speaks canonical Nomos principals. A provider subject is deliberately
|
|
13938
|
-
// opaque and may contain its own namespace separators; never enrol that raw value as the actor.
|
|
13939
|
-
principal: subject,
|
|
13940
|
-
publicKey,
|
|
13941
|
-
authorSecret: secret,
|
|
13942
|
-
authToken,
|
|
13943
|
-
idToken: authToken,
|
|
13944
|
-
verifiedVia: issuer
|
|
13945
|
-
}));
|
|
13946
|
-
} catch (error) {
|
|
13947
|
-
if (String(error).includes("receiving-group-additional-device-requires-current-device-or-guardian")) {
|
|
13948
|
-
await birthOrRepeat();
|
|
13949
|
-
} else {
|
|
13950
|
-
throw error;
|
|
13951
|
-
}
|
|
13952
|
-
}
|
|
13953
13952
|
}
|
|
13954
13953
|
await measureOpen("save application bootstrap progress", () => store.saveText(journalState, "home-available"));
|
|
13955
13954
|
authorityHolon = await measureOpen("rebind durable application authority", () => mountAuthority(secret, authToken));
|
|
@@ -13962,23 +13961,11 @@ async function nomosInternalOpenGeneratedApplication(options, bind, internals =
|
|
|
13962
13961
|
const verified = await measureOpen("verify new application custody", () => authorityHolon.verifyChain());
|
|
13963
13962
|
if (verified.valid !== true) throw new Error(`the private authority context failed replay verification: ${String(verified.error ?? "unknown")}`);
|
|
13964
13963
|
await measureOpen("save application bootstrap progress", () => store.saveText(journalState, "verified"));
|
|
13965
|
-
|
|
13966
|
-
await measureOpen("confirm private-custody signer enrolment", () => authorityHolon.ensureParentSignerEnrollment({
|
|
13967
|
-
parent: receivingGroup,
|
|
13968
|
-
principal: subject,
|
|
13969
|
-
authorSecret: secret,
|
|
13970
|
-
authToken,
|
|
13971
|
-
idToken: authToken,
|
|
13972
|
-
verifiedVia: issuer
|
|
13973
|
-
}));
|
|
13974
|
-
} catch (error) {
|
|
13975
|
-
if (/revoked/i.test(String(error))) throw error;
|
|
13976
|
-
}
|
|
13977
|
-
await measureOpen("complete application bootstrap journal", async () => {
|
|
13964
|
+
await measureOpen("save verified application bootstrap journal", async () => {
|
|
13978
13965
|
await store.saveText(journalState, "complete");
|
|
13979
|
-
await store.remove(journalState);
|
|
13980
13966
|
});
|
|
13981
13967
|
}
|
|
13968
|
+
await ensureSignerEnrollment();
|
|
13982
13969
|
holon = authorityHolon;
|
|
13983
13970
|
const authorityVerified = await measureOpen("verify application custody", () => holon.verifyChain());
|
|
13984
13971
|
if (authorityVerified.valid !== true) throw new Error(`the private authority context failed replay verification: ${String(authorityVerified.error ?? "unknown")}`);
|
|
@@ -1664,8 +1664,8 @@ const NOMOS_TYPES_DEP = "^0.8.7";
|
|
|
1664
1664
|
// 0.48.x: session-bound clients (XClient.bind/NomosClientInterface/DomainClientSessionMismatch/
|
|
1665
1665
|
// DomainNotInstalledForSession, engine.follow, pendingConflicts lanes) — the generated client
|
|
1666
1666
|
// REQUIRES this surface. 0.48.1 fixes NomosSession.watchPendingConflicts delegation.
|
|
1667
|
-
const NOMOS_CLIENT_DEP = "^0.64.
|
|
1668
|
-
const NOMOS_FLUTTER_DEP = "^0.63.
|
|
1667
|
+
const NOMOS_CLIENT_DEP = "^0.64.32";
|
|
1668
|
+
const NOMOS_FLUTTER_DEP = "^0.63.55";
|
|
1669
1669
|
// DRIFT TRIPWIRE: pubspec_pins.test.ts asserts these equal the CURRENT versions in dsl/dart/pubspec.yaml
|
|
1670
1670
|
// and dsl/dart_types/pubspec.yaml — a Dart release without this bump fails the suite, so tenants never
|
|
1671
1671
|
// land back in dependency_overrides (the exact co2 report this closes, third occurrence).
|