@intentic/sandbox-contract 1.430.0 → 1.431.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 (494) hide show
  1. package/README.md +12 -2
  2. package/dist/app-routes/app-pages.d.ts +1 -0
  3. package/dist/app-routes/app-pages.d.ts.map +1 -1
  4. package/dist/app-routes/app-pages.js +1 -0
  5. package/dist/app-routes/app-pages.js.map +1 -1
  6. package/dist/app-routes/index.d.ts +1 -0
  7. package/dist/app-routes/index.d.ts.map +1 -1
  8. package/dist/app-routes/index.js +1 -0
  9. package/dist/app-routes/index.js.map +1 -1
  10. package/dist/app-routes/return-path.d.ts +2 -0
  11. package/dist/app-routes/return-path.d.ts.map +1 -0
  12. package/dist/app-routes/return-path.js +8 -0
  13. package/dist/app-routes/return-path.js.map +1 -0
  14. package/dist/contracts/accounts.contract.d.ts.map +1 -1
  15. package/dist/contracts/accounts.contract.js +2 -0
  16. package/dist/contracts/accounts.contract.js.map +1 -1
  17. package/dist/contracts/agent.contract.d.ts +357 -0
  18. package/dist/contracts/agent.contract.d.ts.map +1 -1
  19. package/dist/contracts/agents.contract.d.ts +3221 -1576
  20. package/dist/contracts/agents.contract.d.ts.map +1 -1
  21. package/dist/contracts/agents.contract.js +35 -5
  22. package/dist/contracts/agents.contract.js.map +1 -1
  23. package/dist/contracts/automations.contract.d.ts +31 -0
  24. package/dist/contracts/automations.contract.d.ts.map +1 -1
  25. package/dist/contracts/automations.contract.js +1 -0
  26. package/dist/contracts/automations.contract.js.map +1 -1
  27. package/dist/contracts/capabilities.contract.d.ts +12 -0
  28. package/dist/contracts/capabilities.contract.d.ts.map +1 -1
  29. package/dist/contracts/capabilities.contract.js +3 -1
  30. package/dist/contracts/capabilities.contract.js.map +1 -1
  31. package/dist/contracts/device-ci-runners.contract.d.ts +108 -0
  32. package/dist/contracts/device-ci-runners.contract.d.ts.map +1 -0
  33. package/dist/contracts/device-ci-runners.contract.js +56 -0
  34. package/dist/contracts/device-ci-runners.contract.js.map +1 -0
  35. package/dist/contracts/device.contract.d.ts +27 -0
  36. package/dist/contracts/device.contract.d.ts.map +1 -1
  37. package/dist/contracts/extensions.contract.d.ts +1 -0
  38. package/dist/contracts/extensions.contract.d.ts.map +1 -1
  39. package/dist/contracts/extensions.contract.js +1 -1
  40. package/dist/contracts/extensions.contract.js.map +1 -1
  41. package/dist/contracts/git.contract.d.ts +7 -0
  42. package/dist/contracts/git.contract.d.ts.map +1 -1
  43. package/dist/contracts/issues.contract.d.ts +11 -0
  44. package/dist/contracts/issues.contract.d.ts.map +1 -1
  45. package/dist/contracts/needs.contract.d.ts +408 -0
  46. package/dist/contracts/needs.contract.d.ts.map +1 -1
  47. package/dist/contracts/offload.contract.d.ts +4 -0
  48. package/dist/contracts/offload.contract.d.ts.map +1 -1
  49. package/dist/contracts/ports.contract.d.ts +8 -0
  50. package/dist/contracts/ports.contract.d.ts.map +1 -1
  51. package/dist/contracts/ports.contract.js +6 -5
  52. package/dist/contracts/ports.contract.js.map +1 -1
  53. package/dist/contracts/remote.contract.d.ts +1 -0
  54. package/dist/contracts/remote.contract.d.ts.map +1 -1
  55. package/dist/contracts/runner.contract.d.ts +702 -1
  56. package/dist/contracts/runner.contract.d.ts.map +1 -1
  57. package/dist/contracts/runner.contract.js +49 -2
  58. package/dist/contracts/runner.contract.js.map +1 -1
  59. package/dist/contracts/runners.contract.d.ts +16 -0
  60. package/dist/contracts/runners.contract.d.ts.map +1 -0
  61. package/dist/contracts/runners.contract.js +15 -0
  62. package/dist/contracts/runners.contract.js.map +1 -0
  63. package/dist/contracts/safety.contract.d.ts.map +1 -1
  64. package/dist/contracts/safety.contract.js +1 -0
  65. package/dist/contracts/safety.contract.js.map +1 -1
  66. package/dist/contracts/seal.contract.d.ts +85 -0
  67. package/dist/contracts/seal.contract.d.ts.map +1 -1
  68. package/dist/contracts/secrets.contract.d.ts.map +1 -1
  69. package/dist/contracts/secrets.contract.js +6 -0
  70. package/dist/contracts/secrets.contract.js.map +1 -1
  71. package/dist/contracts/sessions.contract.d.ts +48 -0
  72. package/dist/contracts/sessions.contract.d.ts.map +1 -1
  73. package/dist/contracts/settings.contract.d.ts +2 -0
  74. package/dist/contracts/settings.contract.d.ts.map +1 -1
  75. package/dist/contracts/settings.contract.js +1 -0
  76. package/dist/contracts/settings.contract.js.map +1 -1
  77. package/dist/contracts/skills.contract.d.ts +6 -0
  78. package/dist/contracts/skills.contract.d.ts.map +1 -1
  79. package/dist/contracts/system.contract.d.ts +332 -4
  80. package/dist/contracts/system.contract.d.ts.map +1 -1
  81. package/dist/contracts/system.contract.js +14 -3
  82. package/dist/contracts/system.contract.js.map +1 -1
  83. package/dist/contracts/usage.contract.d.ts +3 -0
  84. package/dist/contracts/usage.contract.d.ts.map +1 -1
  85. package/dist/events/agent-events.d.ts +194 -0
  86. package/dist/events/agent-events.d.ts.map +1 -1
  87. package/dist/events/agent-events.js +2 -2
  88. package/dist/events/agent-events.js.map +1 -1
  89. package/dist/events/agent-transcript.d.ts +48 -0
  90. package/dist/events/agent-transcript.d.ts.map +1 -1
  91. package/dist/events/agent-words.d.ts +5 -0
  92. package/dist/events/agent-words.d.ts.map +1 -1
  93. package/dist/events/agent-words.js +20 -1
  94. package/dist/events/agent-words.js.map +1 -1
  95. package/dist/events/refusal-incidents.d.ts +1 -0
  96. package/dist/events/refusal-incidents.d.ts.map +1 -1
  97. package/dist/events/refusal-incidents.js +42 -19
  98. package/dist/events/refusal-incidents.js.map +1 -1
  99. package/dist/events/system-events.d.ts +86 -0
  100. package/dist/events/system-events.d.ts.map +1 -1
  101. package/dist/events/transcript.d.ts +240 -0
  102. package/dist/events/transcript.d.ts.map +1 -1
  103. package/dist/ids/conversation-ids.d.ts +1 -0
  104. package/dist/ids/conversation-ids.d.ts.map +1 -1
  105. package/dist/ids/conversation-ids.js +2 -1
  106. package/dist/ids/conversation-ids.js.map +1 -1
  107. package/dist/ids/project-id.d.ts.map +1 -1
  108. package/dist/ids/project-id.js +4 -4
  109. package/dist/ids/project-id.js.map +1 -1
  110. package/dist/ids/run-row-ids.d.ts +8 -0
  111. package/dist/ids/run-row-ids.d.ts.map +1 -0
  112. package/dist/ids/run-row-ids.js +32 -0
  113. package/dist/ids/run-row-ids.js.map +1 -0
  114. package/dist/index.d.ts +2 -0
  115. package/dist/index.d.ts.map +1 -1
  116. package/dist/index.js +2 -0
  117. package/dist/index.js.map +1 -1
  118. package/dist/models/agent-catalog.d.ts.map +1 -1
  119. package/dist/models/agent-catalog.js +3 -2
  120. package/dist/models/agent-catalog.js.map +1 -1
  121. package/dist/models/agent-lanes.d.ts.map +1 -1
  122. package/dist/models/agent-lanes.js +4 -1
  123. package/dist/models/agent-lanes.js.map +1 -1
  124. package/dist/models/agent-runtimes.d.ts.map +1 -1
  125. package/dist/models/agent-runtimes.js +2 -2
  126. package/dist/models/agent-runtimes.js.map +1 -1
  127. package/dist/models/agent-standing.d.ts +6 -1
  128. package/dist/models/agent-standing.d.ts.map +1 -1
  129. package/dist/models/agent-standing.js +1 -0
  130. package/dist/models/agent-standing.js.map +1 -1
  131. package/dist/models/providers/provider-traits.d.ts +215 -0
  132. package/dist/models/providers/provider-traits.d.ts.map +1 -0
  133. package/dist/models/providers/provider-traits.js +60 -0
  134. package/dist/models/providers/provider-traits.js.map +1 -0
  135. package/dist/netd/browser-wire.d.ts +8 -0
  136. package/dist/netd/browser-wire.d.ts.map +1 -1
  137. package/dist/netd/browser-wire.js +5 -0
  138. package/dist/netd/browser-wire.js.map +1 -1
  139. package/dist/netd/generated/wire.d.ts +42 -1
  140. package/dist/netd/generated/wire.d.ts.map +1 -1
  141. package/dist/policy/admin/admin-grant.d.ts +21 -0
  142. package/dist/policy/admin/admin-grant.d.ts.map +1 -0
  143. package/dist/policy/admin/admin-grant.js +41 -0
  144. package/dist/policy/admin/admin-grant.js.map +1 -0
  145. package/dist/policy/capabilities/capability-kinds.d.ts +268 -0
  146. package/dist/policy/capabilities/capability-kinds.d.ts.map +1 -0
  147. package/dist/policy/capabilities/capability-kinds.js +47 -0
  148. package/dist/policy/capabilities/capability-kinds.js.map +1 -0
  149. package/dist/policy/command-classes.d.ts.map +1 -1
  150. package/dist/policy/command-classes.js +3 -1
  151. package/dist/policy/command-classes.js.map +1 -1
  152. package/dist/policy/device-programs.d.ts +79 -2
  153. package/dist/policy/device-programs.d.ts.map +1 -1
  154. package/dist/policy/device-programs.js +15 -16
  155. package/dist/policy/device-programs.js.map +1 -1
  156. package/dist/policy/reserved-servers.d.ts.map +1 -1
  157. package/dist/policy/reserved-servers.js +5 -1
  158. package/dist/policy/reserved-servers.js.map +1 -1
  159. package/dist/policy/role-capability.d.ts.map +1 -1
  160. package/dist/policy/role-capability.js +2 -1
  161. package/dist/policy/role-capability.js.map +1 -1
  162. package/dist/policy/shell/command-normalise.d.ts +10 -0
  163. package/dist/policy/shell/command-normalise.d.ts.map +1 -0
  164. package/dist/policy/shell/command-normalise.js +153 -0
  165. package/dist/policy/shell/command-normalise.js.map +1 -0
  166. package/dist/protocol/doors/listener-protocol.d.ts +4 -0
  167. package/dist/protocol/doors/listener-protocol.d.ts.map +1 -1
  168. package/dist/protocol/doors/listener-protocol.js +4 -0
  169. package/dist/protocol/doors/listener-protocol.js.map +1 -1
  170. package/dist/protocol/doors/loopback-proof.d.ts +8 -0
  171. package/dist/protocol/doors/loopback-proof.d.ts.map +1 -0
  172. package/dist/protocol/doors/loopback-proof.js +11 -0
  173. package/dist/protocol/doors/loopback-proof.js.map +1 -0
  174. package/dist/protocol/doors/pass-scopes.d.ts +4 -0
  175. package/dist/protocol/doors/pass-scopes.d.ts.map +1 -0
  176. package/dist/protocol/doors/pass-scopes.js +3 -0
  177. package/dist/protocol/doors/pass-scopes.js.map +1 -0
  178. package/dist/protocol/doors/runner-protocol.d.ts +187 -0
  179. package/dist/protocol/doors/runner-protocol.d.ts.map +1 -1
  180. package/dist/protocol/doors/runner-protocol.js +48 -1
  181. package/dist/protocol/doors/runner-protocol.js.map +1 -1
  182. package/dist/protocol/doors/sandbox-pass.d.ts +19 -2
  183. package/dist/protocol/doors/sandbox-pass.d.ts.map +1 -1
  184. package/dist/protocol/doors/sandbox-pass.js +42 -10
  185. package/dist/protocol/doors/sandbox-pass.js.map +1 -1
  186. package/dist/protocol/member-reach.d.ts +6 -0
  187. package/dist/protocol/member-reach.d.ts.map +1 -1
  188. package/dist/protocol/member-reach.js +24 -0
  189. package/dist/protocol/member-reach.js.map +1 -1
  190. package/dist/protocol/peer-mcp-server.d.ts +2 -0
  191. package/dist/protocol/peer-mcp-server.d.ts.map +1 -1
  192. package/dist/protocol/peer-mcp-server.js +1 -0
  193. package/dist/protocol/peer-mcp-server.js.map +1 -1
  194. package/dist/protocol/raw/raw-json-routes.d.ts +512 -0
  195. package/dist/protocol/raw/raw-json-routes.d.ts.map +1 -1
  196. package/dist/protocol/raw/raw-json-routes.js +25 -2
  197. package/dist/protocol/raw/raw-json-routes.js.map +1 -1
  198. package/dist/protocol/raw/raw-routes.d.ts +164 -2
  199. package/dist/protocol/raw/raw-routes.d.ts.map +1 -1
  200. package/dist/protocol/raw/raw-routes.js +63 -35
  201. package/dist/protocol/raw/raw-routes.js.map +1 -1
  202. package/dist/protocol/route-meta.d.ts.map +1 -1
  203. package/dist/protocol/route-meta.js.map +1 -1
  204. package/dist/schemas/account-routes.d.ts +176 -0
  205. package/dist/schemas/account-routes.d.ts.map +1 -0
  206. package/dist/schemas/account-routes.js +73 -0
  207. package/dist/schemas/account-routes.js.map +1 -0
  208. package/dist/schemas/activity.d.ts.map +1 -1
  209. package/dist/schemas/activity.js.map +1 -1
  210. package/dist/schemas/agent-background.d.ts +48 -0
  211. package/dist/schemas/agent-background.d.ts.map +1 -0
  212. package/dist/schemas/agent-background.js +63 -0
  213. package/dist/schemas/agent-background.js.map +1 -0
  214. package/dist/schemas/agent-land.d.ts +7 -0
  215. package/dist/schemas/agent-land.d.ts.map +1 -1
  216. package/dist/schemas/agent-land.js +11 -0
  217. package/dist/schemas/agent-land.js.map +1 -1
  218. package/dist/schemas/agents-list.d.ts +34 -0
  219. package/dist/schemas/agents-list.d.ts.map +1 -1
  220. package/dist/schemas/agents.d.ts +656 -17
  221. package/dist/schemas/agents.d.ts.map +1 -1
  222. package/dist/schemas/agents.js +16 -41
  223. package/dist/schemas/agents.js.map +1 -1
  224. package/dist/schemas/auto-approve.d.ts +12 -0
  225. package/dist/schemas/auto-approve.d.ts.map +1 -0
  226. package/dist/schemas/auto-approve.js +12 -0
  227. package/dist/schemas/auto-approve.js.map +1 -0
  228. package/dist/schemas/automations.d.ts +83 -0
  229. package/dist/schemas/automations.d.ts.map +1 -1
  230. package/dist/schemas/automations.js +11 -1
  231. package/dist/schemas/automations.js.map +1 -1
  232. package/dist/schemas/bridge-heads.d.ts +57 -0
  233. package/dist/schemas/bridge-heads.d.ts.map +1 -0
  234. package/dist/schemas/bridge-heads.js +22 -0
  235. package/dist/schemas/bridge-heads.js.map +1 -0
  236. package/dist/schemas/capabilities.d.ts +21 -0
  237. package/dist/schemas/capabilities.d.ts.map +1 -1
  238. package/dist/schemas/capabilities.js +6 -0
  239. package/dist/schemas/capabilities.js.map +1 -1
  240. package/dist/schemas/checkout-hooks.d.ts +24 -0
  241. package/dist/schemas/checkout-hooks.d.ts.map +1 -0
  242. package/dist/schemas/checkout-hooks.js +23 -0
  243. package/dist/schemas/checkout-hooks.js.map +1 -0
  244. package/dist/schemas/ci-fleet.d.ts +216 -0
  245. package/dist/schemas/ci-fleet.d.ts.map +1 -0
  246. package/dist/schemas/ci-fleet.js +87 -0
  247. package/dist/schemas/ci-fleet.js.map +1 -0
  248. package/dist/schemas/connection-hub.d.ts +3 -1
  249. package/dist/schemas/connection-hub.d.ts.map +1 -1
  250. package/dist/schemas/connection-hub.js +2 -1
  251. package/dist/schemas/connection-hub.js.map +1 -1
  252. package/dist/schemas/context-continues.d.ts.map +1 -1
  253. package/dist/schemas/context-continues.js +2 -2
  254. package/dist/schemas/context-continues.js.map +1 -1
  255. package/dist/schemas/devices.d.ts +64 -0
  256. package/dist/schemas/devices.d.ts.map +1 -1
  257. package/dist/schemas/devices.js +6 -1
  258. package/dist/schemas/devices.js.map +1 -1
  259. package/dist/schemas/environment.d.ts +1 -0
  260. package/dist/schemas/environment.d.ts.map +1 -1
  261. package/dist/schemas/environment.js +1 -0
  262. package/dist/schemas/environment.js.map +1 -1
  263. package/dist/schemas/extension-updates.d.ts +2 -0
  264. package/dist/schemas/extension-updates.d.ts.map +1 -1
  265. package/dist/schemas/extension-updates.js +4 -0
  266. package/dist/schemas/extension-updates.js.map +1 -1
  267. package/dist/schemas/git/git.d.ts +13 -0
  268. package/dist/schemas/git/git.d.ts.map +1 -1
  269. package/dist/schemas/git/git.js +7 -7
  270. package/dist/schemas/git/git.js.map +1 -1
  271. package/dist/schemas/git/index-run.d.ts +1 -0
  272. package/dist/schemas/git/index-run.d.ts.map +1 -1
  273. package/dist/schemas/host-power.d.ts +54 -0
  274. package/dist/schemas/host-power.d.ts.map +1 -0
  275. package/dist/schemas/host-power.js +46 -0
  276. package/dist/schemas/host-power.js.map +1 -0
  277. package/dist/schemas/hosts.d.ts +139 -0
  278. package/dist/schemas/hosts.d.ts.map +1 -1
  279. package/dist/schemas/hosts.js +9 -1
  280. package/dist/schemas/hosts.js.map +1 -1
  281. package/dist/schemas/issues.d.ts +44 -0
  282. package/dist/schemas/issues.d.ts.map +1 -1
  283. package/dist/schemas/issues.js +12 -0
  284. package/dist/schemas/issues.js.map +1 -1
  285. package/dist/schemas/keyring-native.d.ts.map +1 -1
  286. package/dist/schemas/keyring-native.js +3 -1
  287. package/dist/schemas/keyring-native.js.map +1 -1
  288. package/dist/schemas/keyring.d.ts +1 -0
  289. package/dist/schemas/keyring.d.ts.map +1 -1
  290. package/dist/schemas/keyring.js +3 -1
  291. package/dist/schemas/keyring.js.map +1 -1
  292. package/dist/schemas/members.d.ts.map +1 -1
  293. package/dist/schemas/members.js +2 -14
  294. package/dist/schemas/members.js.map +1 -1
  295. package/dist/schemas/metrics.d.ts +8 -0
  296. package/dist/schemas/metrics.d.ts.map +1 -1
  297. package/dist/schemas/metrics.js +8 -0
  298. package/dist/schemas/metrics.js.map +1 -1
  299. package/dist/schemas/needs.d.ts +349 -1
  300. package/dist/schemas/needs.d.ts.map +1 -1
  301. package/dist/schemas/needs.js +45 -5
  302. package/dist/schemas/needs.js.map +1 -1
  303. package/dist/schemas/offload.d.ts +9 -0
  304. package/dist/schemas/offload.d.ts.map +1 -1
  305. package/dist/schemas/offload.js +2 -1
  306. package/dist/schemas/offload.js.map +1 -1
  307. package/dist/schemas/ports.d.ts +4 -0
  308. package/dist/schemas/ports.d.ts.map +1 -1
  309. package/dist/schemas/ports.js +3 -0
  310. package/dist/schemas/ports.js.map +1 -1
  311. package/dist/schemas/providers/capacity.d.ts +6 -0
  312. package/dist/schemas/providers/capacity.d.ts.map +1 -1
  313. package/dist/schemas/providers/refusals.d.ts +12 -0
  314. package/dist/schemas/providers/refusals.d.ts.map +1 -1
  315. package/dist/schemas/providers/refusals.js +4 -0
  316. package/dist/schemas/providers/refusals.js.map +1 -1
  317. package/dist/schemas/remote-access.d.ts +1 -0
  318. package/dist/schemas/remote-access.d.ts.map +1 -1
  319. package/dist/schemas/remote-access.js +1 -0
  320. package/dist/schemas/remote-access.js.map +1 -1
  321. package/dist/schemas/run-targets.d.ts.map +1 -1
  322. package/dist/schemas/run-targets.js +2 -1
  323. package/dist/schemas/run-targets.js.map +1 -1
  324. package/dist/schemas/runner-views.d.ts +24 -0
  325. package/dist/schemas/runner-views.d.ts.map +1 -0
  326. package/dist/schemas/runner-views.js +16 -0
  327. package/dist/schemas/runner-views.js.map +1 -0
  328. package/dist/schemas/sandbox-reach.d.ts +157 -0
  329. package/dist/schemas/sandbox-reach.d.ts.map +1 -0
  330. package/dist/schemas/sandbox-reach.js +112 -0
  331. package/dist/schemas/sandbox-reach.js.map +1 -0
  332. package/dist/schemas/settings.d.ts +18 -0
  333. package/dist/schemas/settings.d.ts.map +1 -1
  334. package/dist/schemas/settings.js +19 -1
  335. package/dist/schemas/settings.js.map +1 -1
  336. package/dist/schemas/system.d.ts +19 -0
  337. package/dist/schemas/system.d.ts.map +1 -1
  338. package/dist/schemas/system.js +9 -0
  339. package/dist/schemas/system.js.map +1 -1
  340. package/dist/schemas/terminal.d.ts +46 -0
  341. package/dist/schemas/terminal.d.ts.map +1 -1
  342. package/dist/schemas/terminal.js +19 -0
  343. package/dist/schemas/terminal.js.map +1 -1
  344. package/dist/state/auth-state.d.ts.map +1 -1
  345. package/dist/state/auth-state.js +1 -0
  346. package/dist/state/auth-state.js.map +1 -1
  347. package/dist/state/definition.d.ts +12 -0
  348. package/dist/state/definition.d.ts.map +1 -1
  349. package/dist/state/runtime-state.d.ts +1 -1
  350. package/dist/state/runtime-state.d.ts.map +1 -1
  351. package/dist/state/runtime-state.js +1 -1
  352. package/dist/state/runtime-state.js.map +1 -1
  353. package/dist/state/workspace-state.d.ts +1 -1
  354. package/dist/state/workspace-state.d.ts.map +1 -1
  355. package/dist/state/workspace-state.js +1 -1
  356. package/dist/state/workspace-state.js.map +1 -1
  357. package/dist/sync/workspace-sync-ignores.d.ts +4 -0
  358. package/dist/sync/workspace-sync-ignores.d.ts.map +1 -0
  359. package/dist/sync/workspace-sync-ignores.js +75 -0
  360. package/dist/sync/workspace-sync-ignores.js.map +1 -0
  361. package/dist/text/pages.d.ts.map +1 -1
  362. package/dist/text/pages.js +17 -4
  363. package/dist/text/pages.js.map +1 -1
  364. package/dist/text/transcript-fold.js +2 -2
  365. package/dist/text/transcript-fold.js.map +1 -1
  366. package/package.json +5 -5
  367. package/src/app-routes/app-pages.ts +3 -0
  368. package/src/app-routes/index.ts +1 -0
  369. package/src/app-routes/return-path.ts +16 -0
  370. package/src/contracts/accounts.contract.ts +3 -0
  371. package/src/contracts/agents.contract.ts +41 -5
  372. package/src/contracts/automations.contract.ts +2 -0
  373. package/src/contracts/capabilities.contract.ts +7 -2
  374. package/src/contracts/device-ci-runners.contract.ts +81 -0
  375. package/src/contracts/extensions.contract.ts +1 -1
  376. package/src/contracts/ports.contract.ts +6 -6
  377. package/src/contracts/runner.contract.ts +117 -3
  378. package/src/contracts/runners.contract.ts +19 -0
  379. package/src/contracts/safety.contract.ts +2 -0
  380. package/src/contracts/secrets.contract.ts +12 -0
  381. package/src/contracts/settings.contract.ts +2 -0
  382. package/src/contracts/system.contract.ts +20 -3
  383. package/src/events/agent-events.ts +3 -2
  384. package/src/events/agent-words.test.ts +19 -1
  385. package/src/events/agent-words.ts +33 -1
  386. package/src/events/refusal-incidents.ts +60 -19
  387. package/src/ids/conversation-ids.test.ts +3 -1
  388. package/src/ids/conversation-ids.ts +6 -4
  389. package/src/ids/project-dir.test.ts +1 -1
  390. package/src/ids/project-dir.ts +1 -1
  391. package/src/ids/project-id.test.ts +14 -0
  392. package/src/ids/project-id.ts +6 -4
  393. package/src/ids/run-row-ids.test.ts +38 -0
  394. package/src/ids/run-row-ids.ts +49 -0
  395. package/src/index.ts +3 -0
  396. package/src/models/agent-catalog.test.ts +7 -4
  397. package/src/models/agent-catalog.ts +3 -2
  398. package/src/models/agent-lanes.ts +8 -1
  399. package/src/models/agent-runtimes.ts +7 -6
  400. package/src/models/agent-standing.ts +13 -0
  401. package/src/models/provider-specs.test.ts +2 -2
  402. package/src/models/providers/provider-traits.test.ts +71 -0
  403. package/src/models/providers/provider-traits.ts +144 -0
  404. package/src/netd/browser-wire.ts +13 -0
  405. package/src/netd/generated/browser-wire.json +10 -0
  406. package/src/netd/generated/netd-wire.json +224 -1
  407. package/src/netd/generated/wire.ts +18 -6
  408. package/src/netd/wire-manifests.test.ts +16 -0
  409. package/src/policy/admin/admin-grant.ts +69 -0
  410. package/src/policy/capabilities/capability-kinds.test.ts +112 -0
  411. package/src/policy/capabilities/capability-kinds.ts +110 -0
  412. package/src/policy/command-classes.ts +5 -3
  413. package/src/policy/credential-material.ts +1 -1
  414. package/src/policy/device-programs.ts +29 -20
  415. package/src/policy/overlay-lint.ts +1 -1
  416. package/src/policy/reserved-servers.ts +5 -1
  417. package/src/policy/role-capability.ts +3 -1
  418. package/src/policy/shell/command-normalise.test.ts +72 -0
  419. package/src/policy/shell/command-normalise.ts +212 -0
  420. package/src/policy/tests/admin-grant.test.ts +35 -0
  421. package/src/policy/tests/command-classes.test.ts +41 -0
  422. package/src/protocol/doors/listener-protocol.ts +18 -1
  423. package/src/protocol/doors/loopback-proof.ts +34 -0
  424. package/src/protocol/doors/pass-scopes.ts +12 -0
  425. package/src/protocol/doors/runner-protocol.ts +133 -4
  426. package/src/protocol/doors/sandbox-pass.test.ts +33 -1
  427. package/src/protocol/doors/sandbox-pass.ts +92 -16
  428. package/src/protocol/ingress-contract.fixture.json +5 -1
  429. package/src/protocol/member-reach.test.ts +40 -1
  430. package/src/protocol/member-reach.ts +40 -0
  431. package/src/protocol/peer-mcp-server.ts +6 -0
  432. package/src/protocol/raw/raw-json-routes.ts +45 -1
  433. package/src/protocol/raw/raw-routes.ts +88 -36
  434. package/src/protocol/route-meta.ts +4 -1
  435. package/src/schemas/account-routes.ts +126 -0
  436. package/src/schemas/activity.ts +4 -3
  437. package/src/schemas/agent-background.ts +104 -0
  438. package/src/schemas/agent-land.ts +21 -2
  439. package/src/schemas/agents.ts +26 -65
  440. package/src/schemas/auto-approve.ts +31 -0
  441. package/src/schemas/automations.ts +26 -1
  442. package/src/schemas/bridge-heads.ts +33 -0
  443. package/src/schemas/capabilities.ts +23 -0
  444. package/src/schemas/checkout-hooks.ts +44 -0
  445. package/src/schemas/ci-fleet.ts +180 -0
  446. package/src/schemas/compose-overlay.test.ts +1 -1
  447. package/src/schemas/compose-overlay.ts +1 -1
  448. package/src/schemas/connection-hub.ts +4 -2
  449. package/src/schemas/context-continues.ts +6 -3
  450. package/src/schemas/data-protection.ts +1 -1
  451. package/src/schemas/device-swaps.test.ts +1 -1
  452. package/src/schemas/devices.ts +19 -1
  453. package/src/schemas/egress-private.test.ts +1 -1
  454. package/src/schemas/environment.ts +4 -0
  455. package/src/schemas/extension-updates.ts +8 -0
  456. package/src/schemas/git/git.ts +14 -14
  457. package/src/schemas/host-power.ts +79 -0
  458. package/src/schemas/hosts.ts +24 -2
  459. package/src/schemas/intentic-os.ts +2 -2
  460. package/src/schemas/issues.ts +14 -0
  461. package/src/schemas/keyring-native.test.ts +11 -3
  462. package/src/schemas/keyring-native.ts +3 -1
  463. package/src/schemas/keyring.ts +6 -1
  464. package/src/schemas/members.ts +4 -16
  465. package/src/schemas/metrics.test.ts +9 -1
  466. package/src/schemas/metrics.ts +8 -0
  467. package/src/schemas/needs.ts +68 -5
  468. package/src/schemas/offload.ts +6 -3
  469. package/src/schemas/ports.ts +5 -0
  470. package/src/schemas/providers/refusals.ts +9 -0
  471. package/src/schemas/remote-access.ts +3 -0
  472. package/src/schemas/run-targets.ts +2 -1
  473. package/src/schemas/runner-views.ts +27 -0
  474. package/src/schemas/sandbox-reach.ts +161 -0
  475. package/src/schemas/settings.test.ts +5 -4
  476. package/src/schemas/settings.ts +45 -10
  477. package/src/schemas/state-plan.test.ts +1 -1
  478. package/src/schemas/state-plan.ts +2 -2
  479. package/src/schemas/system.ts +16 -1
  480. package/src/schemas/terminal.ts +28 -0
  481. package/src/schemas/updates.test.ts +1 -1
  482. package/src/schemas/updates.ts +1 -1
  483. package/src/state/auth-state.ts +3 -0
  484. package/src/state/runtime-state.test.ts +3 -2
  485. package/src/state/runtime-state.ts +3 -1
  486. package/src/state/update-probation.ts +1 -1
  487. package/src/state/ways-back.test.ts +1 -1
  488. package/src/state/workspace-state.test.ts +2 -0
  489. package/src/state/workspace-state.ts +4 -4
  490. package/src/sync/workspace-sync-ignores.test.ts +48 -0
  491. package/src/sync/workspace-sync-ignores.ts +143 -0
  492. package/src/text/pages.ts +34 -7
  493. package/src/text/transcript-fold.test.ts +40 -2
  494. package/src/text/transcript-fold.ts +2 -2
@@ -1,5 +1,5 @@
1
1
  import { ATTACHMENTS_DIR } from "../state/workspace-state.js";
2
- import { guestReach, memberRefusal, routeFloor } from "./member-reach.js";
2
+ import { guestReach, memberRefusal, routeFloor, scopeRefusal } from "./member-reach.js";
3
3
 
4
4
  describe("routeFloor", () => {
5
5
  test("reads floor at viewer: fleet, transcripts, workspace files, git log", () => {
@@ -275,3 +275,42 @@ describe("a home-only member", () => {
275
275
  });
276
276
  });
277
277
  });
278
+
279
+ describe("scopeRefusal", () => {
280
+ const guest = { tier: "guest", agents: "chat" } as const;
281
+ const viewer = { tier: "viewer" } as const;
282
+ const collaborator = { tier: "collaborator", agents: "run" } as const;
283
+ const handsOnly = { tier: "writer", agents: "off" } as const;
284
+ const homeOnly = { tier: "collaborator", agents: "home" } as const;
285
+
286
+ test("a report and a read admit anyone on the roster, a guest included", () => {
287
+ for (const caller of [guest, viewer, collaborator, handsOnly, homeOnly]) {
288
+ expect(scopeRefusal(caller, "report")).toBeUndefined();
289
+ expect(scopeRefusal(caller, "read")).toBeUndefined();
290
+ }
291
+ });
292
+
293
+ test("a drop is the collaborator's and up, never a guest's, and a writer whose agents are off may drop", () => {
294
+ expect(scopeRefusal(guest, "drop")).toMatchObject({ floor: "collaborator", reason: "guest" });
295
+ expect(scopeRefusal(viewer, "drop")).toMatchObject({ floor: "collaborator", reason: "floor" });
296
+ expect(scopeRefusal(collaborator, "drop")).toBeUndefined();
297
+ expect(scopeRefusal(handsOnly, "drop")).toBeUndefined();
298
+ });
299
+
300
+ test("a drop that wakes a conversation also needs running agents", () => {
301
+ expect(scopeRefusal(collaborator, "drop", { wake: true })).toBeUndefined();
302
+ expect(scopeRefusal(handsOnly, "drop", { wake: true })).toMatchObject({ reason: "agents-off" });
303
+ expect(scopeRefusal(homeOnly, "drop", { wake: true })).toMatchObject({ reason: "agents-off" });
304
+ });
305
+
306
+ test("a task needs running agents here, and neither a guest nor a home-only member gets one", () => {
307
+ // POST /agent is on the guest list, so memberRefusal alone would admit a guest: the scope names them apart.
308
+ expect(memberRefusal(guest, "POST", "/agent")).toBeUndefined();
309
+ expect(scopeRefusal(guest, "task")).toMatchObject({ reason: "guest" });
310
+ expect(scopeRefusal(homeOnly, "task")).toMatchObject({ reason: "agents-off" });
311
+ expect(scopeRefusal(viewer, "task")).toMatchObject({ reason: "floor" });
312
+ expect(scopeRefusal(handsOnly, "task")).toMatchObject({ reason: "agents-off" });
313
+ expect(scopeRefusal(collaborator, "task")).toBeUndefined();
314
+ expect(scopeRefusal({ tier: "owner" }, "task")).toBeUndefined();
315
+ });
316
+ });
@@ -3,6 +3,7 @@ import { type MemberTier, tierAtLeast } from "../schemas/shared.js";
3
3
  import { defaultFloor } from "./route-meta.js";
4
4
  import { isAttachmentPath } from "../state/workspace-state.js";
5
5
  import { sandboxRouteFor } from "../index.js";
6
+ import type { PassScope } from "./doors/pass-scopes.js";
6
7
 
7
8
  // Role floors: the minimum trust tier each route demands, read from the route's own RouteMeta (route-meta.ts). One
8
9
  // function for both sides: the daemon's bearer middleware refuses with it right after the caller's tier resolves, and
@@ -55,6 +56,45 @@ export const memberRefusal = (
55
56
  return floor === "collaborator" && caller.agents === "off" ? { error: "running agents is not on for you here", floor, reason: "agents-off" } : undefined;
56
57
  };
57
58
 
59
+ // The caller's fields every floor reads, as memberRefusal takes them.
60
+ type ReachCaller = Parameters<typeof memberRefusal>[0];
61
+
62
+ // WHAT A PERSON ROUTED FROM ANOTHER SANDBOX MAY DO HERE (2026-11-24, docs/architecture/account-routing.md), one rule per
63
+ // pass scope, beside memberRefusal so the editor can say before sending what the receiving daemon will answer. Undefined
64
+ // admits. `wake` is a drop that asks to be queued into one of the person's conversations, which starts a turn.
65
+ // - report: anyone on the roster, a guest included: the person is attribution only, and a report starts nothing they own;
66
+ // - drop: collaborator and up, never a guest. Not memberRefusal's floor, whose agents-off rule would refuse a writer who
67
+ // edits by hand, and a drop runs no agent; one that wakes a conversation is driving one, so it takes that floor too;
68
+ // - read: viewer and up, a guest included, since the reader cuts what they see to what they may read here;
69
+ // - task: whoever may start a turn here. A guest is named apart, as is a home-only member: both reach `POST /agent` on the
70
+ // guest list (member-reach.test.ts), for their own chat or home, never a conversation another sandbox opens for them.
71
+ export const scopeRefusal = (caller: ReachCaller, scope: PassScope, options: { readonly wake?: boolean } = {}): MemberRefusal | undefined => {
72
+ switch (scope) {
73
+ case "report":
74
+ case "read":
75
+ return undefined;
76
+ case "drop": {
77
+ if (caller.tier === "guest" || !tierAtLeast(caller.tier, "collaborator")) {
78
+ return { error: "dropping into this sandbox needs collaborator access here", floor: "collaborator", reason: caller.tier === "guest" ? "guest" : "floor" };
79
+ }
80
+ return options.wake === true ? taskRefusal(caller) : undefined;
81
+ }
82
+ case "task":
83
+ return taskRefusal(caller);
84
+ }
85
+ };
86
+
87
+ // Starting a turn here for a person another sandbox routes: the chat's own floor, a guest and a home-only member aside.
88
+ const taskRefusal = (caller: ReachCaller): MemberRefusal | undefined => {
89
+ if (caller.tier === "guest") {
90
+ return { error: "not open to a guest member", floor: "collaborator", reason: "guest" };
91
+ }
92
+ if (caller.agents === "home") {
93
+ return { error: "running agents here is limited to your own home conversation", floor: "collaborator", reason: "agents-off" };
94
+ }
95
+ return memberRefusal(caller, "POST", "/agent");
96
+ };
97
+
58
98
  // Whether the caller was given the part of the sandbox this route runs (route-meta.ts `right`).
59
99
  const givenRight = (caller: { readonly manages?: readonly ManageRight[] | undefined }, method: string, path: string): boolean => {
60
100
  const right = sandboxRouteFor(method, path)?.meta.right;
@@ -29,6 +29,9 @@ export interface McpTool<Ctx> {
29
29
  // JSON Schema for `tools/list`, derived from the zod schema once at module load, not per request.
30
30
  readonly inputSchema: Record<string, unknown>;
31
31
  readonly annotations: ReturnType<typeof toolAnnotations>;
32
+ // Whether a call's arguments carry a program (policy/device-programs.ts): the machine's own check, never sent in
33
+ // `tools/list`, which only the daemon's table speaks for.
34
+ readonly carriesProgram: boolean;
32
35
  readonly call: (args: unknown, ctx: Ctx) => Promise<Record<string, unknown>>;
33
36
  }
34
37
 
@@ -61,6 +64,8 @@ export const tool = <Schema extends z.ZodType, Ctx>(spec: {
61
64
  readonly name: string;
62
65
  readonly description: string;
63
66
  readonly effect: ToolEffect;
67
+ // Its arguments carry a program; a device marks it through a wrapper that takes only names in that table.
68
+ readonly program?: true;
64
69
  readonly input: Schema;
65
70
  readonly run: (args: z.output<Schema>, ctx: Ctx) => Promise<Record<string, unknown>>;
66
71
  }): McpTool<Ctx> => {
@@ -70,6 +75,7 @@ export const tool = <Schema extends z.ZodType, Ctx>(spec: {
70
75
  description: spec.description,
71
76
  inputSchema: converterReadable(inputSchema) as Record<string, unknown>,
72
77
  annotations: toolAnnotations(spec.effect),
78
+ carriesProgram: spec.program === true,
73
79
  call: async (args, ctx) => {
74
80
  const parsed = spec.input.safeParse(args);
75
81
  // Readable enough for a model to fix its own call: which field, and what was expected.
@@ -13,7 +13,7 @@ import {
13
13
  EnvironmentRuntimeDecisionSchema,
14
14
  EnvironmentSchema,
15
15
  } from "../../schemas/environment.js";
16
- import { SyncStatusSchema } from "../../schemas/devices.js";
16
+ import { SyncChangesSchema, SyncStatusSchema } from "../../schemas/devices.js";
17
17
  import { ConversationBundleSchema, DiagnosticsAnswerSchema, DiagnosticsAskSchema, DiagnosticsQuerySchema } from "../../schemas/diagnostics.js";
18
18
  import { HostsListSchema } from "../../schemas/hosts.js";
19
19
  import { VoicesViewSchema } from "../../schemas/voice.js";
@@ -37,6 +37,22 @@ import {
37
37
  PhonePasswordsPairSchema,
38
38
  } from "../../schemas/phone-passwords.js";
39
39
  import { OkSchema } from "../../schemas/shared.js";
40
+ import {
41
+ DropAcceptedSchema,
42
+ DropBodySchema,
43
+ DropFilesSchema,
44
+ DropSendOutcomeSchema,
45
+ DropSendSchema,
46
+ DropTakenSchema,
47
+ DropTakeSchema,
48
+ PairingMintedSchema,
49
+ PairingMintSchema,
50
+ PairingsListSchema,
51
+ ReceivedDropSchema,
52
+ ReceivedDropsSchema,
53
+ RouteSecretSchema,
54
+ RoutesListSchema,
55
+ } from "../../schemas/account-routes.js";
40
56
  import { PeerPairingAnswerSchema, SyncPairAnswerSchema, SyncPairRequestSchema } from "../../schemas/short-codes.js";
41
57
  import { SpeechStatusSchema, SpeechTranscriptSchema, SpeechWakeClaimSchema, SpeechWakeGrantSchema } from "../../schemas/speech.js";
42
58
  import {
@@ -97,6 +113,7 @@ import {
97
113
  import { DefinitionDiffSchema, DefinitionExportSchema, WorkspacePublishResultSchema, WorkspacePublishSchema, WorkspaceRemoteSchema } from "../../state/definition.js";
98
114
  import {
99
115
  RunnerDefinitionAppliedSchema,
116
+ RunnerLabelSchema,
100
117
  RunnersListSchema,
101
118
  } from "../doors/runner-protocol.js";
102
119
  import type { RawRouteKey } from "./raw-routes.js";
@@ -180,8 +197,11 @@ export const RAW_JSON_ROUTES = {
180
197
  "GET /system/runners": { output: RunnersListSchema },
181
198
  "DELETE /system/runners/{id}": { output: OkSchema },
182
199
  "POST /system/runners/{id}/definition/sync": { output: RunnerDefinitionAppliedSchema },
200
+ // A runner's name for people (its id never changes); empty clears it.
201
+ "POST /system/runners/{id}/label": { input: RunnerLabelSchema, output: OkSchema },
183
202
  // Desktop sync: the sandbox-level state, the pairing (`?mode=mirror` asks for the narrower one), one machine's key.
184
203
  "GET /system/sync": { output: SyncStatusSchema },
204
+ "GET /system/sync/changes": { output: SyncChangesSchema },
185
205
  "POST /system/sync/pair": { input: SyncPairRequestSchema, output: SyncPairAnswerSchema },
186
206
  "DELETE /system/authorized-key/{machine}": { output: OkSchema },
187
207
  // Every browser session revoked, the owner's own included.
@@ -194,9 +214,33 @@ export const RAW_JSON_ROUTES = {
194
214
  "POST /system/links/{id}/requests/{request}": { input: LinkRequestDecisionSchema, output: InboundLinkSummarySchema },
195
215
  // Another sandbox on the owner's account reporting a problem about a project this one claims (schemas/issues.ts).
196
216
  "POST /account/report": { input: AccountReportSchema, output: IssueAcceptedSchema },
217
+ // A task routed as a person: the link doors' own shapes, behind a pass and a pairing instead of a link token.
218
+ "POST /account/task": { input: LinkTaskSchema, output: LinkTaskStatusSchema },
219
+ "GET /account/task/{id}": { output: LinkTaskStatusSchema },
220
+ "POST /account/task/{id}/messages": { input: LinkMessageSchema, output: LinkMessageReceiptSchema },
221
+ "POST /account/task/{id}/answer": { input: LinkAnswerSchema, output: OkSchema },
222
+ "POST /account/task/{id}/stop": { output: LinkTaskStatusSchema },
197
223
  "POST /account/outbox": { input: AccountSendSchema, output: AccountSendOutcomeSchema },
198
224
  "GET /account/outbox": { output: AccountOutboxSchema },
199
225
  "GET /account/projects": { output: AccountProjectsSchema },
226
+ "GET /account/projects/suggest": { output: AccountProjectsSchema },
227
+ // Routing as a person: the pairings this sandbox keeps for others, and the secrets it holds for itself.
228
+ "POST /account/pairings": { input: PairingMintSchema, output: PairingMintedSchema },
229
+ "GET /account/pairings": { output: PairingsListSchema },
230
+ "DELETE /account/pairings/{from}": { output: OkSchema },
231
+ "POST /account/routes/secret": { input: RouteSecretSchema, output: OkSchema },
232
+ "GET /account/routes": { output: RoutesListSchema },
233
+ // Routing as a person: a drop between daemons, the sending side's loopback send, and the inbox it lands in.
234
+ "POST /account/drop": { input: DropBodySchema, output: DropAcceptedSchema },
235
+ "POST /account/drops": { input: DropSendSchema, output: DropSendOutcomeSchema },
236
+ "GET /account/inbox": { output: ReceivedDropsSchema },
237
+ "GET /account/inbox/{id}": { output: ReceivedDropSchema },
238
+ "GET /account/inbox/{id}/files": { output: DropFilesSchema },
239
+ "POST /account/inbox/{id}/take": { input: DropTakeSchema, output: DropTakenSchema },
240
+ "DELETE /account/inbox/{id}": { output: OkSchema },
241
+ // A read as a person answers what the fleet's own reads answer (GET /fleet…, POST /diagnostics).
242
+ "POST /account/read/diagnostics": { input: DiagnosticsQuerySchema, output: DiagnosticsAnswerSchema },
243
+ "GET /account/read/agents/{handle}/bundle": { output: ConversationBundleSchema },
200
244
  // The link doors, as the asking sandbox's daemon reads them. A status takes `?after=<version>&wait=<seconds>` to
201
245
  // be held until it moves past that version.
202
246
  "GET /link": { output: LinkHelloSchema },
@@ -53,7 +53,7 @@ export const RAW_ROUTES = {
53
53
  "POST /workspace/upload-diff": {},
54
54
  "POST /workspace/upload-archive": { lane: "bulk" },
55
55
  // Minting is cheap: each WebSocket upgrade floors its own redemption.
56
- "POST /system/ws-ticket": { beforeBoot: true, floor: "collaborator", control: "never" },
56
+ "POST /system/ws-ticket": { beforeBoot: true, floor: "collaborator", panel: false, control: "never" },
57
57
  // A WebSocket upgrade carries no Authorization header; the terminal, both browser wires and the desktop's check a
58
58
  // query ticket.
59
59
  "GET /system/terminal": { auth: "door", beforeBoot: true, control: "never", netd: true },
@@ -97,19 +97,19 @@ export const RAW_ROUTES = {
97
97
  // The roster is for whoever runs people and access (Full access, or the People & access right) to read and change;
98
98
  // giving up one's own grant is every tier's. Reading it is floored here as well as in its handler (members.routes.ts),
99
99
  // so the editor knows before asking; what someone below Full access may change is the handler's (peopleChangeRefusal).
100
- "GET /members": { floor: "maintainer", right: "people", control: "never" },
101
- "POST /members": { right: "people", control: "never" },
102
- "DELETE /members": { right: "people", control: "never" },
100
+ "GET /members": { floor: "maintainer", right: "people", panel: false, control: "never" },
101
+ "POST /members": { right: "people", panel: false, control: "never" },
102
+ "DELETE /members": { right: "people", panel: false, control: "never" },
103
103
  "DELETE /members/self": { floor: "viewer", guest: true, control: "never" },
104
104
  // What one's own grant allows, read by the editor to offer only what will be taken.
105
105
  "GET /members/self": { floor: "viewer", guest: true, control: "never" },
106
106
  // Asking for more access is every member's, a guest's included, from wherever they were refused; reading and
107
107
  // dismissing the requests is for whoever runs people and access, beside the roster they are answered on.
108
108
  "POST /members/requests": { floor: "viewer", guest: true, control: "never" },
109
- "GET /members/requests": { floor: "maintainer", right: "people", control: "never" },
110
- "DELETE /members/requests": { right: "people", control: "never" },
109
+ "GET /members/requests": { floor: "maintainer", right: "people", panel: false, control: "never" },
110
+ "DELETE /members/requests": { right: "people", panel: false, control: "never" },
111
111
  // The owner's Reconnect: register with the platform now, having it adopt the sandbox first when it holds no record.
112
- "POST /platform/relink": { floor: "owner", control: "never" },
112
+ "POST /platform/relink": { floor: "owner", panel: false, control: "never" },
113
113
  "GET /environment": {},
114
114
  "GET /environment/contents": {},
115
115
  "POST /environment/approve": {},
@@ -124,10 +124,11 @@ export const RAW_ROUTES = {
124
124
  "POST /engines/channel": {},
125
125
  "POST /engines/update": {},
126
126
  "POST /engines/revert": {},
127
+ // An export can carry every vault (the owner's choice), and its ticket is the download's credential: never a panel's.
127
128
  "GET /bundles": { floor: "maintainer", control: "never" },
128
- "POST /bundles": { control: "never" },
129
+ "POST /bundles": { panel: false, control: "never" },
129
130
  "DELETE /bundles": { control: "never" },
130
- "POST /bundles/ticket": { control: "never" },
131
+ "POST /bundles/ticket": { panel: false, control: "never" },
131
132
  // Navigated to by the browser, so no header: its ticket is checked in the handler.
132
133
  "GET /bundles/download": { auth: "door", control: "never", lane: "bulk" },
133
134
  "GET /definition": {},
@@ -138,9 +139,10 @@ export const RAW_ROUTES = {
138
139
  "GET /arrivals/hosts": {},
139
140
  "POST /arrivals/scan": {},
140
141
  "POST /arrivals/apply": {},
141
- // Model API keys on the owner's devices, and turning the picked ones into model endpoints.
142
- "GET /arrivals/keys": {},
143
- "POST /arrivals/keys/apply": {},
142
+ // Model API keys on the owner's devices, and turning the picked ones into model endpoints: each reads credential
143
+ // files off the owner's computers, so never a panel process's.
144
+ "GET /arrivals/keys": { panel: false },
145
+ "POST /arrivals/keys/apply": { panel: false },
144
146
  "DELETE /arrivals": {},
145
147
  "GET /extensions/{id}/bundle": { lane: "bulk" },
146
148
  // An extension backend's own namespace, proxied verbatim.
@@ -238,27 +240,27 @@ export const RAW_ROUTES = {
238
240
  // a sign-in this daemon started, and worth nothing without the PKCE verifier only the daemon holds.
239
241
  "GET /oauth/mcp/callback": { auth: "door", control: "never" },
240
242
  // Below maintainer a pairing is capped to port-mirror, so a collaborator may mint a preview tunnel.
241
- "POST /system/sync/pair": { floor: "collaborator", control: "never" },
243
+ "POST /system/sync/pair": { floor: "collaborator", panel: false, control: "never" },
242
244
  // A copy-paste command's short code, redeemed by the install script it was handed to: a device's first contact,
243
245
  // gated by the code itself and a limit on failed attempts (peers/redeem-codes.ts).
244
246
  "POST /system/redeem/{code}": { auth: "door", control: "never" },
245
247
  // The peer doors: a device, browser or runner redeems its pairing at `enroll` and dials `connect` with the token.
246
- "POST /system/hosts/pair": { control: "never" },
248
+ "POST /system/hosts/pair": { panel: false, control: "never" },
247
249
  "POST /system/hosts/enroll": { auth: "door", control: "never" },
248
250
  "GET /system/hosts": { control: "never" },
249
- "DELETE /system/hosts/{id}": { control: "never" },
251
+ "DELETE /system/hosts/{id}": { panel: false, control: "never" },
250
252
  // A peer's socket reconnects on its own backoff, so it answers before boot.
251
253
  "GET /system/hosts/connect": { auth: "door", beforeBoot: true, control: "never" },
252
254
  "POST /system/hosts/keyring-changed": { auth: "door", control: "never" },
253
- "POST /system/webext/pair": { control: "never" },
255
+ "POST /system/webext/pair": { panel: false, control: "never" },
254
256
  "POST /system/webext/enroll": { auth: "door", control: "never" },
255
257
  "GET /system/webext": { control: "never" },
256
- "DELETE /system/webext/{id}": { control: "never" },
258
+ "DELETE /system/webext/{id}": { panel: false, control: "never" },
257
259
  "GET /system/webext/connect": { auth: "door", beforeBoot: true, control: "never" },
258
- "POST /system/phones/pair": { control: "never" },
260
+ "POST /system/phones/pair": { panel: false, control: "never" },
259
261
  "POST /system/phones/enroll": { auth: "door", control: "never" },
260
262
  "GET /system/phones": { control: "never" },
261
- "DELETE /system/phones/{id}": { control: "never" },
263
+ "DELETE /system/phones/{id}": { panel: false, control: "never" },
262
264
  "GET /system/phones/connect": { auth: "door", beforeBoot: true, control: "never" },
263
265
  // The editor hands over the push-relay channel it registered for a phone, so the sandbox can wake it.
264
266
  "POST /system/phones/{id}/wake": { control: "never" },
@@ -267,10 +269,10 @@ export const RAW_ROUTES = {
267
269
  "POST /system/phones/passwords/pair": { auth: "door", control: "never" },
268
270
  "POST /system/phones/passwords/capture": { auth: "door", control: "never" },
269
271
  "POST /system/phones/passwords/fill": { auth: "door", control: "never" },
270
- "POST /system/runners/pair": { control: "never" },
272
+ "POST /system/runners/pair": { panel: false, control: "never" },
271
273
  "POST /system/runners/enroll": { auth: "door", control: "never" },
272
274
  "GET /system/runners": { control: "never" },
273
- "DELETE /system/runners/{id}": { control: "never" },
275
+ "DELETE /system/runners/{id}": { panel: false, control: "never" },
274
276
  "GET /system/runners/connect": { auth: "door", beforeBoot: true, control: "never" },
275
277
  // Every MCP server the daemon hosts for a turn (its browser routers, the machines and browsers it was granted, its
276
278
  // extension cards' endpoints), by server name: the handler checks the conversation's mount bearer the turn's tool
@@ -291,6 +293,7 @@ export const RAW_ROUTES = {
291
293
  // sandbox's own address, before it shares anything with it, rather than take them from whoever relays the share.
292
294
  "GET /keyring/keys": { auth: "door", control: "never" },
293
295
  "POST /system/runners/{id}/definition/sync": { control: "never" },
296
+ "POST /system/runners/{id}/label": { control: "never" },
294
297
  // A runner's git door and credential doors, each on the runner's own bearer.
295
298
  "GET /system/runners/git/{repo}/info/refs": { auth: "door", control: "never", lane: "bulk" },
296
299
  "POST /system/runners/git/{repo}/git-upload-pack": { auth: "door", control: "never", lane: "bulk" },
@@ -299,6 +302,14 @@ export const RAW_ROUTES = {
299
302
  "POST /system/runners/credentials/refresh": { auth: "door", control: "never" },
300
303
  // A runner's wake for a conversation dispatched there (runner-wake.ts): said here, so its turn is the parent's.
301
304
  "POST /system/runners/wake": { auth: "door", control: "never" },
305
+ // A runner's turn reading this sandbox's fleet (runner-protocol.ts runnerFleetPath), as a turn of the conversation it
306
+ // was placed there for reads it here: the same answers `GET /fleet…` gives.
307
+ "GET /system/runners/fleet": { auth: "door", control: "never" },
308
+ "GET /system/runners/fleet/{handle}": { auth: "door", control: "never" },
309
+ "GET /system/runners/fleet/{handle}/bundle": { auth: "door", control: "never" },
310
+ // A runner's turn calling one of its `subagents` tools for the conversation it was placed there for (runner-protocol.ts
311
+ // runnerSubagentsPath), run here as that conversation's turn running here runs it. A `wait` parks for up to 31 minutes.
312
+ "POST /system/runners/subagents/{tool}": { auth: "door", control: "never", stream: true },
302
313
  [`ALL ${runnerTranslatorPath}/*` as const]: { auth: "door", control: "never" },
303
314
  // The privacy shield's gateway: every shielded runtime's model requests, on the signed session its base URL carries
304
315
  // (privacy/gateway/session-token.ts), which names the provider and the only upstream it may forward to. Held open
@@ -315,19 +326,57 @@ export const RAW_ROUTES = {
315
326
  // Inbound links: another of the owner's sandboxes handing this one tasks (schemas/links.ts). Minted, re-termed and
316
327
  // revoked by the owner alone, checked in the handler like a control token; a waiting task is the owner's to allow.
317
328
  "GET /system/links": { control: "never" },
318
- "POST /system/links": { control: "never" },
319
- "POST /system/links/{id}": { control: "never" },
320
- "DELETE /system/links/{id}": { control: "never" },
321
- "POST /system/links/{id}/requests/{request}": { control: "never" },
329
+ "POST /system/links": { panel: false, control: "never" },
330
+ "POST /system/links/{id}": { panel: false, control: "never" },
331
+ "DELETE /system/links/{id}": { panel: false, control: "never" },
332
+ "POST /system/links/{id}/requests/{request}": { panel: false, control: "never" },
322
333
  // Account-level report routing: another sandbox on the owner's account reporting a problem about a project this one
323
334
  // claims. Checked in the handler against a pass the platform signed (policy/sandbox-pass.ts); it only ever records
324
335
  // into the issues inbox, and wakes an agent only as the inbox's own escalation rule says.
325
336
  "POST /account/report": { auth: "door", control: "never" },
337
+ // Routing as a person, the `task` scope (2026-11-24): another sandbox hands a task to a conversation here that acts
338
+ // for the one person its pass names. Each door checks the pass and that person's pairing itself (account-routing/
339
+ // admit-route.ts) and reaches only the conversations that (asking sandbox, person) opened, as a link's doors do.
340
+ "POST /account/task": { auth: "door", control: "never" },
341
+ "GET /account/task/{id}": { auth: "door", control: "never" },
342
+ "POST /account/task/{id}/messages": { auth: "door", control: "never" },
343
+ "POST /account/task/{id}/answer": { auth: "door", control: "never" },
344
+ "POST /account/task/{id}/stop": { auth: "door", control: "never" },
326
345
  // The sending side, for the `projects` command on the agent's PATH: report a problem to whichever sandbox claims a
327
346
  // project (delivered now or kept in the outbox), what is still waiting, and the projects this sandbox claims.
328
347
  "POST /account/outbox": { agent: true, control: "never" },
329
348
  "GET /account/outbox": { agent: true, control: "never" },
330
349
  "GET /account/projects": { agent: true, control: "never" },
350
+ // The projects this workspace's repos could claim, from their remotes: for Settings ▸ Projects and `projects suggest`.
351
+ "GET /account/projects/suggest": { floor: "maintainer", agent: true, control: "never" },
352
+ // Routing as a person (schemas/account-routes.ts). The receiving side: the signed-in person pairs an asking sandbox
353
+ // with themselves (never a guest, who reaches nothing a pass would open), lists their own pairings, revokes one; the
354
+ // handler lets a maintainer list and revoke anyone's. The asking side: the same person, signed in here, keeps the
355
+ // secret they minted over there, and anyone reads what is held, never a secret. No agent and no control token reaches
356
+ // any of them: a pairing is the person's own word.
357
+ "POST /account/pairings": { floor: "viewer", panel: false, control: "never" },
358
+ "GET /account/pairings": { floor: "viewer", panel: false, control: "never" },
359
+ "DELETE /account/pairings/{from}": { floor: "viewer", panel: false, control: "never" },
360
+ "POST /account/routes/secret": { floor: "viewer", panel: false, control: "never" },
361
+ "GET /account/routes": { floor: "viewer", control: "never" },
362
+ // Routing as a person, a drop (schemas/account-routes.ts): another sandbox the person is in handing a note and files
363
+ // into this one's inbox, admitted in the handler by a drop pass beside the person's pairing (admit-route.ts); it starts
364
+ // no turn. The sending side, for `sandboxes send` on the agent's PATH. The inbox, for the `inbox` command and the
365
+ // editor's Received list: each shown to the people a drop names and to maintainers, the handler cutting the list.
366
+ "POST /account/drop": { auth: "door", control: "never", lane: "bulk" },
367
+ "POST /account/drops": { agent: true, control: "never" },
368
+ "GET /account/inbox": { floor: "viewer", agent: true, control: "never" },
369
+ "GET /account/inbox/{id}": { floor: "viewer", agent: true, control: "never" },
370
+ "GET /account/inbox/{id}/files": { floor: "viewer", agent: true, control: "never", lane: "bulk" },
371
+ "POST /account/inbox/{id}/take": { floor: "collaborator", agent: true, control: "never" },
372
+ "DELETE /account/inbox/{id}": { floor: "collaborator", agent: true, control: "never" },
373
+ // Routing as a person, a read: another sandbox the person is in reading the conversations and records they may read
374
+ // here, admitted in the handler by a read pass beside their pairing. None can change anything; diagnostics are a
375
+ // maintainer's, as this sandbox's own logs are.
376
+ "GET /account/read/agents": { auth: "door", control: "never" },
377
+ "GET /account/read/agents/{handle}": { auth: "door", control: "never" },
378
+ "GET /account/read/agents/{handle}/bundle": { auth: "door", control: "never" },
379
+ "POST /account/read/diagnostics": { auth: "door", control: "never" },
331
380
  // The link doors, called by the asking sandbox's daemon: each checks the link token itself (x-intentic-link) and
332
381
  // reaches only the conversations that link opened, which is the whole of a link's reach.
333
382
  "GET /link": { auth: "door", control: "never" },
@@ -352,24 +401,24 @@ export const RAW_ROUTES = {
352
401
  "POST /link/operate/exec/{id}/stop": { auth: "door", control: "never" },
353
402
  "POST /link/operate/read": { auth: "door", control: "never" },
354
403
  "POST /link/operate/write": { auth: "door", control: "never" },
355
- "POST /system/control/tokens": { control: "never" },
356
- "GET /system/control/tokens": { floor: "maintainer", control: "never" },
357
- "DELETE /system/control/tokens/{id}": { control: "never" },
404
+ "POST /system/control/tokens": { panel: false, control: "never" },
405
+ "GET /system/control/tokens": { floor: "maintainer", panel: false, control: "never" },
406
+ "DELETE /system/control/tokens/{id}": { panel: false, control: "never" },
358
407
  // One's own passkeys are identity, like staying signed in; the policy and recovery codes are the owner's own door, so
359
408
  // they stay ownership's whoever else runs the sandbox.
360
- "GET /system/passkeys": { guest: true, control: "never" },
361
- "POST /system/passkeys/register/options": { floor: "viewer", guest: true, enrolment: true, control: "never" },
362
- "POST /system/passkeys/register": { floor: "viewer", guest: true, enrolment: true, control: "never" },
409
+ "GET /system/passkeys": { guest: true, panel: false, control: "never" },
410
+ "POST /system/passkeys/register/options": { floor: "viewer", guest: true, enrolment: true, panel: false, control: "never" },
411
+ "POST /system/passkeys/register": { floor: "viewer", guest: true, enrolment: true, panel: false, control: "never" },
363
412
  // The assertion has no bearer yet, since it is how one is minted.
364
413
  "POST /system/passkeys/assert/options": { auth: "door", beforeBoot: true, control: "never" },
365
414
  "POST /system/passkeys/assert": { auth: "door", beforeBoot: true, control: "never" },
366
- "POST /system/passkeys/policy": { floor: "owner", control: "never" },
367
- "POST /system/passkeys/recovery": { floor: "owner", control: "never" },
415
+ "POST /system/passkeys/policy": { floor: "owner", panel: false, control: "never" },
416
+ "POST /system/passkeys/recovery": { floor: "owner", panel: false, control: "never" },
368
417
  // One's own passkey; the handler holds another member's to whoever runs people and access, and the owner's to the owner.
369
- "DELETE /system/passkeys/{id}": { floor: "viewer", guest: true, control: "never" },
418
+ "DELETE /system/passkeys/{id}": { floor: "viewer", guest: true, panel: false, control: "never" },
370
419
  // Checks its own bearer, since the require-passkey policy would otherwise hold out the owner it exists for.
371
420
  "POST /system/session/recover": { auth: "door", beforeBoot: true, control: "never" },
372
- "POST /system/sessions/revoke": { control: "never" },
421
+ "POST /system/sessions/revoke": { panel: false, control: "never" },
373
422
  // Stays repeatable after a partial attempt; the handler does its own owner check.
374
423
  "POST /system/access/disable": { auth: "door", control: "never" },
375
424
  // The desktop-sync agent: redeems a one-time pairing, and later revokes with its own token.
@@ -377,9 +426,12 @@ export const RAW_ROUTES = {
377
426
  "GET /system/sync": { control: "never" },
378
427
  // The sync agent's own machine report, the daemon's only view of SYNC_DIR.
379
428
  "POST /system/sync/report": { sync: "poll", control: "never" },
429
+ // The workspace's change signal (devices.ts SyncChangesSchema): a long poll the sync agent holds open, so the request
430
+ // timer leaves it out, and like the byte pipe no check-in; the ports poll beside it is the heartbeat.
431
+ "GET /system/sync/changes": { sync: "pipe", control: "never", stream: true },
380
432
  "DELETE /system/authorized-key": { auth: "door", control: "never" },
381
433
  // The owner revoking one machine is no door: it goes through the session middleware.
382
- "DELETE /system/authorized-key/{machine}": { control: "never" },
434
+ "DELETE /system/authorized-key/{machine}": { panel: false, control: "never" },
383
435
  } as const satisfies Readonly<Record<`${"GET" | "POST" | "PUT" | "DELETE" | "ALL"} /${string}`, RouteMeta>>;
384
436
 
385
437
  export type RawRouteKey = keyof typeof RAW_ROUTES;
@@ -38,7 +38,10 @@ export interface RouteMeta {
38
38
  readonly agent?: true;
39
39
  // The desktop-sync token reaches it; a `poll` refreshes the machine's heartbeat, the held-open `pipe` does not.
40
40
  readonly sync?: "poll" | "pipe";
41
- // Withheld from the panel token, which reaches every other route: it puts a stored credential in motion.
41
+ // Withheld from the panel token, which reaches every other route: it puts a stored credential in motion, or it
42
+ // administers the sandbox for its owner (the people on it, tokens and links minted, computers paired, passkeys and
43
+ // sessions, secrets and the settings that hold the agent back). (2026-11-24) The token is handed to every
44
+ // repo-defined process, which an agent can start: such a route reached by it was the owner's, by anyone's hand.
42
45
  readonly panel?: false;
43
46
  readonly control?: ControlReach;
44
47
  // A transfer: announced to the edge through netd (tunnel-bulk.ts), which sends it down the tunnel's bulk socket,
@@ -0,0 +1,126 @@
1
+ import { z } from "zod";
2
+
3
+ // ROUTING AS A PERSON, the pairing (docs/architecture/account-routing.md, 2026-11-24). A scope other than `report` is
4
+ // admitted only beside a secret the person minted at the receiving sandbox and handed to the asking one, so the
5
+ // platform's pass alone opens nothing but an inbox. The person's own editor carries it, being signed in to both: it
6
+ // mints the secret at the target (`POST /account/pairings`), which keeps only its hash, and stores it here
7
+ // (`POST /account/routes/secret`), beside the vault, where no agent reads it.
8
+
9
+ // A tunnel id, as the platform names a sandbox to another (twelve lowercase hex characters).
10
+ const TunnelIdSchema = z.string().regex(/^[0-9a-f]{12}$/);
11
+
12
+ // At the receiving sandbox: the signed-in person pairs the asking sandbox `from` with themselves.
13
+ export const PairingMintSchema = z.object({
14
+ from: TunnelIdSchema.describe("The asking sandbox's tunnel id."),
15
+ fromName: z.string().trim().min(1).max(120).describe("Its name, for the list of pairings; display only."),
16
+ });
17
+ export type PairingMint = z.infer<typeof PairingMintSchema>;
18
+
19
+ // The secret, answered once; only its hash stays.
20
+ export const PairingMintedSchema = z.object({
21
+ from: z.string(),
22
+ person: z.string(),
23
+ secret: z.string().describe("The pairing secret: hand it to the asking sandbox, which sends it beside every routed request."),
24
+ createdAt: z.number(),
25
+ });
26
+ export type PairingMinted = z.infer<typeof PairingMintedSchema>;
27
+
28
+ // One pairing as the receiving sandbox keeps it, without its hash.
29
+ export const PairingSchema = z.object({
30
+ from: z.string(),
31
+ fromName: z.string(),
32
+ person: z.string(),
33
+ createdAt: z.number(),
34
+ });
35
+ export type Pairing = z.infer<typeof PairingSchema>;
36
+ export const PairingsListSchema = z.object({ pairings: z.array(PairingSchema) });
37
+ export type PairingsList = z.infer<typeof PairingsListSchema>;
38
+
39
+ // At the asking sandbox: the secret the signed-in person minted at `target`, to keep for routing as them there.
40
+ export const RouteSecretSchema = z.object({
41
+ target: TunnelIdSchema.describe("The target sandbox's tunnel id."),
42
+ secret: z.string().min(32).max(200),
43
+ });
44
+ export type RouteSecret = z.infer<typeof RouteSecretSchema>;
45
+
46
+ // What the asking sandbox holds, never the secrets.
47
+ export const RouteHeldSchema = z.object({ target: z.string(), person: z.string(), createdAt: z.number() });
48
+ export type RouteHeld = z.infer<typeof RouteHeldSchema>;
49
+ export const RoutesListSchema = z.object({ routes: z.array(RouteHeldSchema) });
50
+ export type RoutesList = z.infer<typeof RoutesListSchema>;
51
+
52
+ // A DROP (2026-11-24, docs/architecture/account-routing.md): a note and files one of a person's sandboxes hands another
53
+ // that person is in, landing in its inbox on the history volume and starting no turn. Bounded so one drop is one POST.
54
+ export const DROP_NOTE_MAX = 4_000;
55
+ export const DROP_FILES_MAX = 20;
56
+ export const DROP_BYTES_MAX = 10 * 1024 * 1024;
57
+ // A file's own name, never a path: it lands in the drop's folder as itself.
58
+ const DropFileNameSchema = z
59
+ .string()
60
+ .min(1)
61
+ .max(200)
62
+ .refine((name) => !/[/\\\0]/u.test(name) && name !== "." && name !== "..", "a file's own name, without a directory");
63
+ const DropNoteSchema = z.string().max(DROP_NOTE_MAX);
64
+ // A conversation id as the receiving sandbox names its own.
65
+ const ConversationIdSchema = z.string().min(1).max(120);
66
+ // One file: its name and its bytes in base64.
67
+ export const DropFileSchema = z.object({ name: DropFileNameSchema, data: z.string() });
68
+
69
+ // The loopback send (`sandboxes send`): the target sandbox by name or id, and the files as the command read them. The
70
+ // command reads them itself, as the agent, so the daemon never opens a path an agent names (its own state included).
71
+ export const DropSendSchema = z.object({
72
+ sandbox: z.string().trim().min(1).max(120),
73
+ files: z.array(DropFileSchema).max(DROP_FILES_MAX).default([]),
74
+ note: DropNoteSchema.optional(),
75
+ wake: ConversationIdSchema.optional().describe("Queue the note into this conversation of the person's there, while a turn of it runs."),
76
+ });
77
+ export type DropSend = z.infer<typeof DropSendSchema>;
78
+
79
+ // What the send came to: the outbox's answer, or the person's card it raised instead of sending.
80
+ export const DropSendOutcomeSchema = z.discriminatedUnion("state", [
81
+ z.object({ state: z.literal("delivered"), to: z.string(), id: z.string() }),
82
+ z.object({ state: z.literal("queued"), to: z.string().optional(), reason: z.string(), times: z.number() }),
83
+ z.object({ state: z.literal("refused"), reason: z.string() }),
84
+ z.object({ state: z.literal("asked"), reason: z.string(), needId: z.string() }),
85
+ ]);
86
+ export type DropSendOutcome = z.infer<typeof DropSendOutcomeSchema>;
87
+
88
+ // The wire, daemon to daemon (`POST /account/drop`, `?wake=<conversation>`): one JSON body, every file's bytes in
89
+ // base64 beside its name, the shape the outbox's postToDoor already sends. The sender's drop id makes a retry land once.
90
+ export const DropBodySchema = z.object({
91
+ id: z.string().regex(/^[A-Za-z0-9_-]{8,80}$/u),
92
+ note: DropNoteSchema.optional(),
93
+ conversationId: z.string().max(120).optional().describe("The sending conversation, for the record; display only."),
94
+ files: z.array(DropFileSchema).max(DROP_FILES_MAX),
95
+ });
96
+ export type DropBody = z.infer<typeof DropBodySchema>;
97
+ // Base64 is four bytes for three, plus the note and the names.
98
+ export const DROP_BODY_MAX = Math.ceil((DROP_BYTES_MAX * 4) / 3) + 256 * 1024;
99
+ export const DropAcceptedSchema = z.object({ ok: z.literal(true), id: z.string(), woke: z.boolean().optional() });
100
+
101
+ // One drop as the receiving sandbox keeps it (its manifest), as the inbox lists it.
102
+ export const ReceivedDropSchema = z.object({
103
+ id: z.string(),
104
+ from: z.object({ sandboxId: z.string(), sandboxName: z.string() }),
105
+ person: z.string(),
106
+ // Set when the two sandboxes are not in one organisation, as the pass said (a side in none is absent).
107
+ crossesOrg: z
108
+ .object({ from: z.object({ id: z.string(), name: z.string() }).optional(), to: z.object({ id: z.string(), name: z.string() }).optional() })
109
+ .optional(),
110
+ note: z.string().optional(),
111
+ files: z.array(z.object({ name: z.string(), size: z.number() })),
112
+ receivedAt: z.number(),
113
+ // The conversation it asked to be queued into, and whether a turn of it was running to take it.
114
+ wake: z.object({ conversationId: z.string(), delivered: z.boolean() }).optional(),
115
+ });
116
+ export type ReceivedDrop = z.infer<typeof ReceivedDropSchema>;
117
+ export const ReceivedDropsSchema = z.object({ drops: z.array(ReceivedDropSchema) });
118
+ export type ReceivedDrops = z.infer<typeof ReceivedDropsSchema>;
119
+ // Taking a drop copies its files into a folder of the workspace (workspace-relative, or absolute under it).
120
+ export const DropTakeSchema = z.object({ dest: z.string().min(1).max(1000) });
121
+ export type DropTake = z.infer<typeof DropTakeSchema>;
122
+ export const DropTakenSchema = z.object({ dest: z.string(), files: z.array(z.string()) });
123
+ export type DropTaken = z.infer<typeof DropTakenSchema>;
124
+ // A drop's files whole, for the `inbox take` command, which writes them where its own shell sees the destination.
125
+ export const DropFilesSchema = z.object({ files: z.array(DropFileSchema) });
126
+ export type DropFiles = z.infer<typeof DropFilesSchema>;
@@ -20,9 +20,10 @@ export const ActivityEventSchema = z.object({
20
20
  // in: message.received, voice_utterance.received, voice_transcript.received
21
21
  // out: message.send, reaction.add, messages.read, api.call (unclassified endpoint)
22
22
  // system: gateway.login_failed, dispatch.failed, voice.session_started, voice.session_ended, automation.run,
23
- // turn.started, turn.plan, turn.error, turn.completed, rule.held_work, deps.verify_green, deps.verify_red,
24
- // deps.breakage_routed, deps.breakage_fixup, deps.breakage_waiting, deps.breakage_held, deps.breakage_resolved,
25
- // deps.breakage_spent; rule.blocked_push and rule.continued_turn are retired and only appear in older logs
23
+ // turn.started, turn.plan, turn.error, turn.completed, rule.held_work, land.unhidden, extension.landed_on,
24
+ // deps.verify_green, deps.verify_red, deps.breakage_routed, deps.breakage_fixup, deps.breakage_waiting,
25
+ // deps.breakage_held, deps.breakage_resolved, deps.breakage_spent; rule.blocked_push and rule.continued_turn are
26
+ // retired and only appear in older logs
26
27
  type: z
27
28
  .string()
28
29
  .describe(