@intentic/sandbox-contract 1.405.1 → 1.407.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 (90) hide show
  1. package/dist/contracts/agent.contract.d.ts +1 -0
  2. package/dist/contracts/agent.contract.d.ts.map +1 -1
  3. package/dist/contracts/device.contract.d.ts +3 -0
  4. package/dist/contracts/device.contract.d.ts.map +1 -1
  5. package/dist/contracts/runner.contract.d.ts +252 -250
  6. package/dist/contracts/runner.contract.d.ts.map +1 -1
  7. package/dist/contracts/settings.contract.d.ts +2 -0
  8. package/dist/contracts/settings.contract.d.ts.map +1 -1
  9. package/dist/contracts/system.contract.d.ts +15 -0
  10. package/dist/contracts/system.contract.d.ts.map +1 -1
  11. package/dist/contracts/system.contract.js +19 -1
  12. package/dist/contracts/system.contract.js.map +1 -1
  13. package/dist/events/agent-events.d.ts +2 -0
  14. package/dist/events/agent-events.d.ts.map +1 -1
  15. package/dist/events/agent-events.js +1 -0
  16. package/dist/events/agent-events.js.map +1 -1
  17. package/dist/events/sandbox-notice.d.ts +5 -0
  18. package/dist/events/sandbox-notice.d.ts.map +1 -1
  19. package/dist/events/sandbox-notice.js +1 -0
  20. package/dist/events/sandbox-notice.js.map +1 -1
  21. package/dist/ids/conversation-ids.d.ts +5 -0
  22. package/dist/ids/conversation-ids.d.ts.map +1 -1
  23. package/dist/ids/conversation-ids.js +20 -109
  24. package/dist/ids/conversation-ids.js.map +1 -1
  25. package/dist/ids/conversation-words.d.ts +2 -0
  26. package/dist/ids/conversation-words.d.ts.map +1 -0
  27. package/dist/ids/conversation-words.js +35 -0
  28. package/dist/ids/conversation-words.js.map +1 -0
  29. package/dist/models/agent-catalog.d.ts.map +1 -1
  30. package/dist/models/agent-catalog.js +2 -2
  31. package/dist/models/agent-catalog.js.map +1 -1
  32. package/dist/models/model-roles.d.ts +8 -0
  33. package/dist/models/model-roles.d.ts.map +1 -1
  34. package/dist/models/model-roles.js +8 -0
  35. package/dist/models/model-roles.js.map +1 -1
  36. package/dist/policy/failure-codes.d.ts +5 -0
  37. package/dist/policy/failure-codes.d.ts.map +1 -1
  38. package/dist/policy/failure-codes.js +1 -0
  39. package/dist/policy/failure-codes.js.map +1 -1
  40. package/dist/protocol/doors/runner-protocol.d.ts +17 -0
  41. package/dist/protocol/doors/runner-protocol.d.ts.map +1 -1
  42. package/dist/protocol/doors/runner-protocol.js +22 -0
  43. package/dist/protocol/doors/runner-protocol.js.map +1 -1
  44. package/dist/protocol/peer-dial.d.ts +1 -0
  45. package/dist/protocol/peer-dial.d.ts.map +1 -1
  46. package/dist/protocol/peer-dial.js +1 -1
  47. package/dist/protocol/peer-dial.js.map +1 -1
  48. package/dist/schemas/agent.d.ts +4 -0
  49. package/dist/schemas/agent.d.ts.map +1 -1
  50. package/dist/schemas/keyring.d.ts +6 -0
  51. package/dist/schemas/keyring.d.ts.map +1 -1
  52. package/dist/schemas/keyring.js +3 -0
  53. package/dist/schemas/keyring.js.map +1 -1
  54. package/dist/schemas/offload.d.ts +5 -0
  55. package/dist/schemas/offload.d.ts.map +1 -1
  56. package/dist/schemas/offload.js +2 -0
  57. package/dist/schemas/offload.js.map +1 -1
  58. package/dist/schemas/push.d.ts +6 -0
  59. package/dist/schemas/push.d.ts.map +1 -1
  60. package/dist/schemas/push.js +2 -0
  61. package/dist/schemas/push.js.map +1 -1
  62. package/dist/schemas/settings.d.ts +2 -0
  63. package/dist/schemas/settings.d.ts.map +1 -1
  64. package/dist/schemas/settings.js +1 -1
  65. package/dist/schemas/settings.js.map +1 -1
  66. package/dist/schemas/system.d.ts +23 -0
  67. package/dist/schemas/system.d.ts.map +1 -1
  68. package/dist/schemas/system.js +13 -0
  69. package/dist/schemas/system.js.map +1 -1
  70. package/dist/state/definition.d.ts +4 -4
  71. package/package.json +5 -5
  72. package/src/contracts/system.contract.ts +33 -1
  73. package/src/events/agent-events.ts +3 -0
  74. package/src/events/sandbox-notice.ts +3 -0
  75. package/src/ids/conversation-ids.test.ts +83 -12
  76. package/src/ids/conversation-ids.ts +39 -117
  77. package/src/ids/conversation-words.ts +40 -0
  78. package/src/models/agent-catalog.ts +6 -3
  79. package/src/models/model-roles.ts +10 -0
  80. package/src/policy/failure-codes.ts +3 -0
  81. package/src/policy/tests/failure-codes.test.ts +4 -1
  82. package/src/protocol/doors/runner-protocol.test.ts +22 -0
  83. package/src/protocol/doors/runner-protocol.ts +44 -0
  84. package/src/protocol/peer-dial.test.ts +30 -1
  85. package/src/protocol/peer-dial.ts +4 -1
  86. package/src/schemas/keyring.ts +4 -0
  87. package/src/schemas/offload.ts +13 -1
  88. package/src/schemas/push.ts +7 -0
  89. package/src/schemas/settings.ts +3 -2
  90. package/src/schemas/system.ts +25 -0
@@ -547,7 +547,8 @@ export const SandboxSettingsSchema = z.object({
547
547
  "Whether each workspace repo keeps up with the remote branch it tracks. Every couple of minutes it is fetched, and what arrived is brought into the main tree: a fast-forward when you have no commits of your own, else a merge commit. Only while it is quiet (no turn working in the main tree, no merge or rebase of yours open), and never half-way: a conflict, or an uncommitted file in the way, leaves the repo exactly as it was until the next try. Following never pushes; the back-up rule does that, when you switch it on. Off, nothing is fetched.",
548
548
  ),
549
549
  // Where heavy work runs: a runner (the same image, on one of the owner's machines) instead of this sandbox. Keyed by
550
- // the heavy-command rule an agent's command matched (workload/heavy-commands.ts), each naming a runner id. A
550
+ // the heavy-command rule an agent's command matched (workload/heavy-commands.ts), each naming a runner id, or "auto"
551
+ // (OFFLOAD_ANY_RUNNER) for whichever runner has the most room while this sandbox is busy. A
551
552
  // runner that is offline, outdated or full hands the work back here, which the command's output says. Never pushed
552
553
  // to a runner itself (definition/definition.ts), which must not pass work on again.
553
554
  // `sessions`: what a new conversation is told when this machine is busy and a runner has room
@@ -560,7 +561,7 @@ export const SandboxSettingsSchema = z.object({
560
561
  })
561
562
  .default({ commands: {}, sessions: "suggest" })
562
563
  .describe(
563
- "Which work runs on a runner on one of your machines instead of this sandbox. `commands`: agents' heavy commands by the kind the heavy-command rules sort them into (tests, typechecks, verify…); the code travels as it stands, uncommitted work included, the output streams back, and any file the command changed comes back with it, while a machine that is offline, outdated or busy hands the work back to this sandbox, and the output says so. `sessions`: what happens to a new conversation while this machine is busy and one of your runners has room: `suggest` offers that machine above the composer, `auto` starts it there unless you keep it here, `off` says nothing.",
564
+ "Which work runs on a runner on one of your machines instead of this sandbox. `commands`: agents' heavy commands by the kind the heavy-command rules sort them into (tests, typechecks, verify…), each sent to one runner, or to `auto`: whichever runner has the most room at the moment the command starts, and only while this sandbox is busy (while it is calm the command runs here as usual). The code travels as it stands, uncommitted work included, the output streams back, and any file the command changed comes back with it, while a machine that is offline, outdated or busy hands the work back to this sandbox, and the output says so. `sessions`: what happens to a new conversation while this machine is busy and one of your runners has room: `suggest` offers that machine above the composer, `auto` starts it there unless you keep it here, `off` says nothing.",
564
565
  ),
565
566
  // A person answering a need is exactly the moment they want the work to go on (docs/architecture/needs.md), unlike a
566
567
  // restart nobody watched, so this one is on to begin with.
@@ -217,6 +217,31 @@ export const DaemonSessionSchema = z.object({
217
217
  });
218
218
  export type DaemonSession = z.infer<typeof DaemonSessionSchema>;
219
219
 
220
+ // (2026-11-09) The owner's name for the sandbox and its switcher logo, as the sandbox last heard them from the platform,
221
+ // which holds them. The sandbox keeps a copy so a client that reaches it while the platform is down still shows both.
222
+ // Its own routes (system.presentation, system.presentationRefresh) rather than fields on /info: /info is read often,
223
+ // and a logo is a data URL of up to 150 KB.
224
+ export const SandboxPresentationSchema = z.object({
225
+ name: z.string().describe("What the owner calls this sandbox, as the switcher shows it."),
226
+ image: z.string().nullable().describe("Its logo, as an image data URL. Null for none: the switcher draws the name's monogram instead."),
227
+ at: z.string().describe("When the sandbox heard this copy from the platform (ISO)."),
228
+ });
229
+ export type SandboxPresentation = z.infer<typeof SandboxPresentationSchema>;
230
+ export const PresentationReadSchema = z.object({
231
+ presentation: SandboxPresentationSchema.nullable().describe(
232
+ "The copy the sandbox holds. Null until it has heard one, which takes reaching the platform once.",
233
+ ),
234
+ });
235
+ export type PresentationRead = z.infer<typeof PresentationReadSchema>;
236
+ export const PresentationRefreshSchema = PresentationReadSchema.extend({
237
+ refreshed: z
238
+ .boolean()
239
+ .describe(
240
+ "Whether the platform answered. False means it could not be reached or refused, and `presentation` is the copy the sandbox already held, which a failed ask never removes.",
241
+ ),
242
+ });
243
+ export type PresentationRefresh = z.infer<typeof PresentationRefreshSchema>;
244
+
220
245
  // Passkeys registered with one sandbox, and the owner's rule that a passkey is the only proof that opens it. The
221
246
  // daemon is the WebAuthn relying party; these are the shapes its /system/passkeys routes and the 428 step-up carry.
222
247