@intentic/sandbox-contract 1.267.0 → 1.269.0

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.
Files changed (35) hide show
  1. package/dist/contracts/system.contract.d.ts +135 -0
  2. package/dist/contracts/system.contract.d.ts.map +1 -1
  3. package/dist/contracts/system.contract.js +9 -1
  4. package/dist/contracts/system.contract.js.map +1 -1
  5. package/dist/contracts/workspace.contract.d.ts +77 -0
  6. package/dist/contracts/workspace.contract.d.ts.map +1 -1
  7. package/dist/contracts/workspace.contract.js +9 -1
  8. package/dist/contracts/workspace.contract.js.map +1 -1
  9. package/dist/events/system-events.d.ts +26 -0
  10. package/dist/events/system-events.d.ts.map +1 -1
  11. package/dist/events/system-events.js +3 -0
  12. package/dist/events/system-events.js.map +1 -1
  13. package/dist/index.d.ts +242 -30
  14. package/dist/index.d.ts.map +1 -1
  15. package/dist/schemas/system.d.ts +144 -0
  16. package/dist/schemas/system.d.ts.map +1 -1
  17. package/dist/schemas/system.js +57 -0
  18. package/dist/schemas/system.js.map +1 -1
  19. package/dist/schemas/workspace/workspace-tree.d.ts +87 -0
  20. package/dist/schemas/workspace/workspace-tree.d.ts.map +1 -1
  21. package/dist/schemas/workspace/workspace-tree.js +19 -1
  22. package/dist/schemas/workspace/workspace-tree.js.map +1 -1
  23. package/dist/state/workspace-state.d.ts +6 -0
  24. package/dist/state/workspace-state.d.ts.map +1 -1
  25. package/dist/state/workspace-state.js +8 -0
  26. package/dist/state/workspace-state.js.map +1 -1
  27. package/package.json +4 -4
  28. package/src/contracts/system.contract.ts +13 -0
  29. package/src/contracts/workspace.contract.ts +11 -0
  30. package/src/events/system-events.ts +10 -2
  31. package/src/protocol/routes.test.ts +7 -0
  32. package/src/schemas/system.ts +117 -0
  33. package/src/schemas/workspace/workspace-tree.ts +27 -1
  34. package/src/state/workspace-state.test.ts +2 -1
  35. package/src/state/workspace-state.ts +11 -0
@@ -259,6 +259,7 @@ describe(`isReviewableLockedPath`, () => {
259
259
  // None of the rest is versioned, so none is diff-reachable; the carve-out can't widen without that flag.
260
260
  expect(isReviewableLockedPath(`.intentic/identity/owner.json`)).toBe(false);
261
261
  expect(isReviewableLockedPath(`.intentic/identity/members.json`)).toBe(false);
262
+ expect(isReviewableLockedPath(`.intentic/identity/passkeys.json`)).toBe(false);
262
263
  expect(isReviewableLockedPath(`.intentic/secrets/ci.json`)).toBe(false);
263
264
  expect(isReviewableLockedPath(`.intentic/secrets/auth/codex/auth.json`)).toBe(false);
264
265
  expect(isReviewableLockedPath(`.intentic/records/sessions/claude/x.jsonl`)).toBe(false);
@@ -518,7 +519,7 @@ describe(`BACKED_UP_STATE_PATHS`, () => {
518
519
 
519
520
  // identity means never restoring into another sandbox; that doesn't stop the owner keeping their own copy.
520
521
  it(`copies the ownership records that may never travel`, () => {
521
- for (const path of [`.intentic/identity/owner.json`, `.intentic/identity/members.json`, `.intentic/identity/workspace.json`]) {
522
+ for (const path of [`.intentic/identity/owner.json`, `.intentic/identity/members.json`, `.intentic/identity/workspace.json`, `.intentic/identity/passkeys.json`]) {
522
523
  expect([path, BACKED_UP_STATE_PATHS.includes(path)]).toEqual([path, true]);
523
524
  }
524
525
  });
@@ -406,6 +406,16 @@ const STATE_FILES = [
406
406
  why: "The workspace identity, read from the /events hello frame rather than as a file.",
407
407
  portability: "identity",
408
408
  },
409
+ // Public keys and the owner's require-a-passkey switch; the one credential-shaped thing in it, the recovery codes,
410
+ // is stored hashed. `identity` because a passkey admits its holder to THIS sandbox: a copy that traveled would let
411
+ // a source sandbox's passkeys open the target.
412
+ {
413
+ path: ".intentic/identity/passkeys.json",
414
+ invalidates: [],
415
+ why: "The passkeys registered with this sandbox, whether one is required to open it, and the hashes of the owner's recovery codes; the Access tab reads them through /system/passkeys, never off disk.",
416
+ portability: "identity",
417
+ note: "Passkeys are bound to the sandbox they were registered with: add them again on the new one from its Access tab.",
418
+ },
409
419
  {
410
420
  path: ".intentic/config/templates.json",
411
421
  invalidates: [],
@@ -563,6 +573,7 @@ export const LOCKED_STATE_ENTRIES: ReadonlySet<string> = new Set([
563
573
  "identity/owner.json",
564
574
  "identity/members.json",
565
575
  "identity/control-tokens.json",
576
+ "identity/passkeys.json",
566
577
  "config/capabilities.json",
567
578
  "secrets/ci.json",
568
579
  "secrets/doors.json",