@githolon/dsl 0.98.0 → 0.98.2

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,8 @@
1
+ ## 0.61.3
2
+
3
+ - cloudBound seeds the KEYLESS enroll-once delegation (mintKeylessDelegation) so a keyless private home
4
+ is born with a well-formed cert chain (was: platform_cert in the delegation slot → self-refusal).
5
+
1
6
  ## 0.61.2
2
7
 
3
8
  - cloudBound works against PRIVATE platforms/homes (declared read caps — the co2 shape): the device
@@ -835,6 +835,22 @@ class NomosTestHarness {
835
835
  if (idpToken.isEmpty || issuer.isEmpty) {
836
836
  throw NomosTestHarnessException('cloudBound: /dev/mint-token returned no token — is the test cloud started with platform:/deployJsonPath: and a law composing setAuthProvider?');
837
837
  }
838
+ // THE KEYLESS ENROLL-ONCE DELEGATION (links[1] of the home cert chain) — device-self-signed,
839
+ // its authority the dev-IdP token. enrollFirstDevice SEEDS it as the user's SignerDelegation, so
840
+ // birthHome's offer-effect assembles a WELL-FORMED chain [home_cert, u_delegation, …platform…].
841
+ // WITHOUT it the platform holds no delegation for the owner, the assembly falls to the
842
+ // no-delegation branch, the platform_cert lands in the delegation slot, and the home refuses at
843
+ // its OWN verify door ("home cert founder != delegation cert founder").
844
+ final delegationCert = await plane.mintKeylessDelegation({
845
+ 'user': subject,
846
+ 'deviceKey': publicB64,
847
+ 'childName': _homeNameOf(subject),
848
+ 'parentId': platformWorkspace,
849
+ 'verifiedVia': issuer,
850
+ 'idpToken': idpToken,
851
+ 'capturedClock': DateTime.now().toUtc().millisecondsSinceEpoch,
852
+ 'epoch': 0,
853
+ }, secret);
838
854
  await post('/v2/workspaces/$platformWorkspace/enrollFirstDevice', {
839
855
  'keyHash': keyHash,
840
856
  'verifiedVia': issuer,
@@ -843,6 +859,7 @@ class NomosTestHarness {
843
859
  'idpToken': idpToken,
844
860
  'actor': subject,
845
861
  'authorSecret': secret,
862
+ 'delegationCert': jsonEncode(delegationCert),
846
863
  }, headers: {'x-nomos-auth': idpToken});
847
864
  return (publicB64: publicB64, secret: secret, keyHash: keyHash, idpToken: idpToken);
848
865
  });
@@ -1829,6 +1829,20 @@ class NomosBridge {
1829
1829
  }))['cert'] as Map<String, Object?>? ??
1830
1830
  const {};
1831
1831
 
1832
+ /// MINT THE KEYLESS ENROLL-ONCE DELEGATION (`enrollFirstDevice.delegationCert`, the verified-first-device
1833
+ /// lane). The device SELF-signs it; its authority is the carried `idpToken` (the kernel re-verifies that to
1834
+ /// the platform's AuthProvider at every lane), so no S_P/admin signature is needed. [spec] carries
1835
+ /// `{user, deviceKey, childName, parentId, verifiedVia, idpToken, capturedClock, epoch}`. WITHOUT this the
1836
+ /// keyless home is born with a malformed cert chain (the platform_cert falls into the delegation slot →
1837
+ /// `home cert founder != delegation cert founder` at the home's own verify door).
1838
+ Future<Map<String, Object?>> mintKeylessDelegation(
1839
+ Map<String, Object?> spec, String deviceSecret) async =>
1840
+ _asMap(await _call('mintKeylessDelegation', {
1841
+ 'spec': spec,
1842
+ 'deviceSecret': deviceSecret,
1843
+ }))['cert'] as Map<String, Object?>? ??
1844
+ const {};
1845
+
1832
1846
  /// ENROLL THIS DEVICE — the LIVE gate: bind a device key's PUBLIC half to `principal` on-chain as a
1833
1847
  /// `signer` so the holon's gate can PROVE this device's authorship on replay (and the VA chain attest it).
1834
1848
  /// `publicKey` is the base64 PUBLIC half (from [mintDeviceKey]); `authToken` (defaults to the connect-time
package/dart/pubspec.yaml CHANGED
@@ -11,7 +11,7 @@ description: >-
11
11
  Nomos 2 Dart frontend types — the hand-written kernel wire types plus the
12
12
  code-generated per-domain aggregate + directive-payload types. (De)serializes
13
13
  the EXACT serde JSON the Rust kernel + projection produce/consume.
14
- version: 0.61.2
14
+ version: 0.61.3
15
15
 
16
16
  environment:
17
17
  sdk: ^3.5.0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@githolon/dsl",
3
- "version": "0.98.0",
3
+ "version": "0.98.2",
4
4
  "type": "module",
5
5
  "description": "Nomos 2 domain-authoring DSL: aggregates + directives in TS, executed and encoded to the Rust kernel's wire shapes.",
6
6
  "license": "SEE LICENSE IN LICENSE.md",
@@ -36,6 +36,7 @@ import { set, type PlannedOp } from "../ops.js";
36
36
  import { query } from "../query.js";
37
37
  import { birth } from "../births.js";
38
38
  import { readFrameworkDeclared } from "../read.js";
39
+ import { authProvider as authProviderQuery } from "./auth_provider_law.js";
39
40
  import { workspaceInvariant, refAs } from "./workspace_invariant.js";
40
41
  import { identityRelations } from "./signing_identity.js";
41
42
  import { writeTuple } from "./relations.js";
@@ -291,7 +292,7 @@ export const birthHome = directive("birthHome")
291
292
  birth({ workspace: homeName, genesisChain });
292
293
  return [];
293
294
  })
294
- .reads("authProvider") // the parent-side AuthProvider capture the inheritance copies (the #58 lane)
295
+ .reads(authProviderQuery) // the parent-side AuthProvider capture the inheritance copies (the #58 lane)
295
296
  .births(); // BIRTH IS A DECLARED KERNEL PRIMITIVE — emits the `nomosBirthGate` era key; the kernel folds the recipe
296
297
 
297
298
  /**