@githolon/dsl 0.95.0 → 0.95.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@githolon/dsl",
3
- "version": "0.95.0",
3
+ "version": "0.95.1",
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",
@@ -329,8 +329,11 @@ export const enrollFirstDevice = directive("enrollFirstDevice")
329
329
  * walk (`verify_to_root`, keyless branch) RE-VERIFIES the token against the platform-attested
330
330
  * AuthProvider (bound to K_root by the terminal platform_cert), so a forged/swapped cert fails the
331
331
  * child's own gate. Writing it as the user's `SignerDelegation` is what lets `birthHome`'s offer-effect
332
- * assemble a WARRANTED travelling chain (closes co2's `birth-cert-not-seeded` / empty signerDelegation). */
333
- delegationCert: z.string().min(1),
332
+ * assemble a WARRANTED travelling chain (closes co2's `birth-cert-not-seeded` / empty signerDelegation).
333
+ * OPTIONAL — an enroll-only flow (seat the signer, no imminent home birth) omits it and seeds no
334
+ * delegation (backward-compatible with every pre-B `enrollFirstDevice` caller). The keyless home-birth
335
+ * ceremony ALWAYS supplies it (that is what seeds the delegation the chain needs). */
336
+ delegationCert: z.string().min(1).optional(),
334
337
  }),
335
338
  )
336
339
  .plan((p, ctx) => {
@@ -354,6 +357,8 @@ export const enrollFirstDevice = directive("enrollFirstDevice")
354
357
  // The delegation is keyed by the AUTHENTICATED principal — EXACTLY the `founder` the kernel's birth
355
358
  // offer-effect reads it back by (`read_signer_delegation(state, &founder)`, founder == captured principal
356
359
  // == this `rawPrincipal`, already in `user:<uid>` form). Do NOT re-prefix.
360
+ // Absent delegationCert ⇒ enroll-only (no delegation seeded), byte-identical to a pre-B enroll.
361
+ if (!p.delegationCert) return tupleOps;
357
362
  const d = instance(SignerDelegation, signerDelegationInstanceId(rawPrincipal));
358
363
  const delegationOps: PlannedOp[] = [
359
364
  withMarker(set(d, "user", rawPrincipal), "ensures"),