@intentic/sandbox-contract 1.325.0 → 1.327.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 (537) hide show
  1. package/README.md +24 -12
  2. package/dist/chores/chores.d.ts.map +1 -1
  3. package/dist/chores/chores.js +29 -20
  4. package/dist/chores/chores.js.map +1 -1
  5. package/dist/chores/probes.d.ts +1 -0
  6. package/dist/chores/probes.d.ts.map +1 -1
  7. package/dist/chores/probes.js +81 -12
  8. package/dist/chores/probes.js.map +1 -1
  9. package/dist/contracts/agent.contract.d.ts +1467 -6
  10. package/dist/contracts/agent.contract.d.ts.map +1 -1
  11. package/dist/contracts/agent.contract.js +2 -2
  12. package/dist/contracts/agent.contract.js.map +1 -1
  13. package/dist/contracts/agents.contract.d.ts +1391 -0
  14. package/dist/contracts/agents.contract.d.ts.map +1 -1
  15. package/dist/contracts/agents.contract.js +1 -1
  16. package/dist/contracts/automations.contract.d.ts +123 -4
  17. package/dist/contracts/automations.contract.d.ts.map +1 -1
  18. package/dist/contracts/automations.contract.js +13 -2
  19. package/dist/contracts/automations.contract.js.map +1 -1
  20. package/dist/contracts/capabilities.contract.d.ts +79 -8
  21. package/dist/contracts/capabilities.contract.d.ts.map +1 -1
  22. package/dist/contracts/chores.contract.d.ts +2 -0
  23. package/dist/contracts/chores.contract.d.ts.map +1 -1
  24. package/dist/contracts/ci.contract.d.ts +2 -0
  25. package/dist/contracts/ci.contract.d.ts.map +1 -1
  26. package/dist/contracts/device.contract.d.ts +52 -0
  27. package/dist/contracts/device.contract.d.ts.map +1 -1
  28. package/dist/contracts/device.contract.js +2 -0
  29. package/dist/contracts/device.contract.js.map +1 -1
  30. package/dist/contracts/endpoints.contract.d.ts +42 -33
  31. package/dist/contracts/endpoints.contract.d.ts.map +1 -1
  32. package/dist/contracts/endpoints.contract.js +17 -7
  33. package/dist/contracts/endpoints.contract.js.map +1 -1
  34. package/dist/contracts/extensions.contract.d.ts +192 -0
  35. package/dist/contracts/extensions.contract.d.ts.map +1 -1
  36. package/dist/contracts/extensions.contract.js +37 -1
  37. package/dist/contracts/extensions.contract.js.map +1 -1
  38. package/dist/contracts/needs.contract.d.ts +1009 -0
  39. package/dist/contracts/needs.contract.d.ts.map +1 -1
  40. package/dist/contracts/pages.contract.d.ts +34 -0
  41. package/dist/contracts/pages.contract.d.ts.map +1 -0
  42. package/dist/contracts/pages.contract.js +49 -0
  43. package/dist/contracts/pages.contract.js.map +1 -0
  44. package/dist/contracts/phone.contract.d.ts +78 -0
  45. package/dist/contracts/phone.contract.d.ts.map +1 -0
  46. package/dist/contracts/phone.contract.js +11 -0
  47. package/dist/contracts/phone.contract.js.map +1 -0
  48. package/dist/contracts/privacy.contract.d.ts +20 -0
  49. package/dist/contracts/privacy.contract.d.ts.map +1 -1
  50. package/dist/contracts/privacy.contract.js +12 -2
  51. package/dist/contracts/privacy.contract.js.map +1 -1
  52. package/dist/contracts/runner.contract.d.ts +648 -127
  53. package/dist/contracts/runner.contract.d.ts.map +1 -1
  54. package/dist/contracts/runner.contract.js +1 -1
  55. package/dist/contracts/runner.contract.js.map +1 -1
  56. package/dist/contracts/secrets.contract.d.ts +88 -0
  57. package/dist/contracts/secrets.contract.d.ts.map +1 -1
  58. package/dist/contracts/secrets.contract.js +20 -1
  59. package/dist/contracts/secrets.contract.js.map +1 -1
  60. package/dist/contracts/sessions.contract.d.ts +184 -0
  61. package/dist/contracts/sessions.contract.d.ts.map +1 -1
  62. package/dist/contracts/settings.contract.d.ts +16 -58
  63. package/dist/contracts/settings.contract.d.ts.map +1 -1
  64. package/dist/contracts/settings.contract.js +10 -1
  65. package/dist/contracts/settings.contract.js.map +1 -1
  66. package/dist/contracts/system.contract.d.ts +227 -32
  67. package/dist/contracts/system.contract.d.ts.map +1 -1
  68. package/dist/contracts/system.contract.js +18 -1
  69. package/dist/contracts/system.contract.js.map +1 -1
  70. package/dist/documents/conversions.d.ts.map +1 -1
  71. package/dist/documents/conversions.js +2 -1
  72. package/dist/documents/conversions.js.map +1 -1
  73. package/dist/documents/read.d.ts.map +1 -1
  74. package/dist/documents/read.js +4 -4
  75. package/dist/documents/read.js.map +1 -1
  76. package/dist/events/agent-events.d.ts +747 -1
  77. package/dist/events/agent-events.d.ts.map +1 -1
  78. package/dist/events/agent-events.js +14 -1
  79. package/dist/events/agent-events.js.map +1 -1
  80. package/dist/events/requests.d.ts +40 -0
  81. package/dist/events/requests.d.ts.map +1 -1
  82. package/dist/events/requests.js +39 -0
  83. package/dist/events/requests.js.map +1 -1
  84. package/dist/events/system-events.d.ts +120 -0
  85. package/dist/events/system-events.d.ts.map +1 -1
  86. package/dist/events/transcript.d.ts +1131 -1
  87. package/dist/events/transcript.d.ts.map +1 -1
  88. package/dist/events/transcript.js +9 -1
  89. package/dist/events/transcript.js.map +1 -1
  90. package/dist/ids/hostnames.d.ts +2 -0
  91. package/dist/ids/hostnames.d.ts.map +1 -1
  92. package/dist/ids/hostnames.js +18 -15
  93. package/dist/ids/hostnames.js.map +1 -1
  94. package/dist/ids/sandbox-id.d.ts +2 -0
  95. package/dist/ids/sandbox-id.d.ts.map +1 -0
  96. package/dist/ids/sandbox-id.js +2 -0
  97. package/dist/ids/sandbox-id.js.map +1 -0
  98. package/dist/ids/tunnel-ids.d.ts +1 -1
  99. package/dist/ids/tunnel-ids.d.ts.map +1 -1
  100. package/dist/ids/tunnel-ids.js +1 -1
  101. package/dist/ids/tunnel-ids.js.map +1 -1
  102. package/dist/index.d.ts +4902 -177
  103. package/dist/index.d.ts.map +1 -1
  104. package/dist/index.js +25 -9
  105. package/dist/index.js.map +1 -1
  106. package/dist/models/agent-catalog.d.ts +0 -1
  107. package/dist/models/agent-catalog.d.ts.map +1 -1
  108. package/dist/models/agent-catalog.js +0 -1
  109. package/dist/models/agent-catalog.js.map +1 -1
  110. package/dist/models/agent-runtimes.d.ts +1 -1
  111. package/dist/models/agent-runtimes.d.ts.map +1 -1
  112. package/dist/models/agent-runtimes.js +1 -1
  113. package/dist/models/agent-runtimes.js.map +1 -1
  114. package/dist/models/provider-specs.d.ts +1 -0
  115. package/dist/models/provider-specs.d.ts.map +1 -1
  116. package/dist/models/provider-specs.js +11 -0
  117. package/dist/models/provider-specs.js.map +1 -1
  118. package/dist/netd/browser-wire.d.ts.map +1 -0
  119. package/dist/netd/browser-wire.js.map +1 -0
  120. package/dist/{front → netd}/generated/browser-wire.d.ts +8 -0
  121. package/dist/netd/generated/browser-wire.d.ts.map +1 -0
  122. package/dist/netd/generated/browser-wire.js.map +1 -0
  123. package/dist/{front → netd}/generated/wire.d.ts +20 -11
  124. package/dist/netd/generated/wire.d.ts.map +1 -0
  125. package/dist/{front → netd}/generated/wire.js.map +1 -1
  126. package/dist/netd/netd-wire.d.ts +9 -0
  127. package/dist/netd/netd-wire.d.ts.map +1 -0
  128. package/dist/netd/netd-wire.js +8 -0
  129. package/dist/netd/netd-wire.js.map +1 -0
  130. package/dist/policy/credential-material.d.ts +2 -0
  131. package/dist/policy/credential-material.d.ts.map +1 -1
  132. package/dist/policy/credential-material.js +14 -8
  133. package/dist/policy/credential-material.js.map +1 -1
  134. package/dist/policy/message-limits.d.ts +14 -0
  135. package/dist/policy/message-limits.d.ts.map +1 -0
  136. package/dist/policy/message-limits.js +15 -0
  137. package/dist/policy/message-limits.js.map +1 -0
  138. package/dist/policy/request-status.d.ts.map +1 -1
  139. package/dist/policy/request-status.js +9 -1
  140. package/dist/policy/request-status.js.map +1 -1
  141. package/dist/policy/reserved-servers.d.ts.map +1 -1
  142. package/dist/policy/reserved-servers.js +1 -0
  143. package/dist/policy/reserved-servers.js.map +1 -1
  144. package/dist/policy/turned-away.d.ts.map +1 -1
  145. package/dist/policy/turned-away.js +2 -0
  146. package/dist/policy/turned-away.js.map +1 -1
  147. package/dist/protocol/container-requirements.d.ts.map +1 -1
  148. package/dist/protocol/container-requirements.js +3 -4
  149. package/dist/protocol/container-requirements.js.map +1 -1
  150. package/dist/protocol/doors/host-protocol.d.ts.map +1 -0
  151. package/dist/protocol/doors/host-protocol.js.map +1 -0
  152. package/dist/protocol/{listener-protocol.d.ts → doors/listener-protocol.d.ts} +22 -0
  153. package/dist/protocol/doors/listener-protocol.d.ts.map +1 -0
  154. package/dist/protocol/doors/listener-protocol.js +38 -0
  155. package/dist/protocol/doors/listener-protocol.js.map +1 -0
  156. package/dist/protocol/doors/phone-links.d.ts +16 -0
  157. package/dist/protocol/doors/phone-links.d.ts.map +1 -0
  158. package/dist/protocol/doors/phone-links.js +28 -0
  159. package/dist/protocol/doors/phone-links.js.map +1 -0
  160. package/dist/protocol/doors/phone-protocol.d.ts +47 -0
  161. package/dist/protocol/doors/phone-protocol.d.ts.map +1 -0
  162. package/dist/protocol/doors/phone-protocol.js +33 -0
  163. package/dist/protocol/doors/phone-protocol.js.map +1 -0
  164. package/dist/protocol/doors/runner-protocol.d.ts.map +1 -0
  165. package/dist/protocol/{runner-protocol.js → doors/runner-protocol.js} +1 -1
  166. package/dist/protocol/doors/runner-protocol.js.map +1 -0
  167. package/dist/protocol/{webext-links.d.ts → doors/webext-links.d.ts} +1 -0
  168. package/dist/protocol/doors/webext-links.d.ts.map +1 -0
  169. package/dist/protocol/{webext-links.js → doors/webext-links.js} +1 -0
  170. package/dist/protocol/doors/webext-links.js.map +1 -0
  171. package/dist/protocol/doors/webext-protocol.d.ts.map +1 -0
  172. package/dist/protocol/doors/webext-protocol.js.map +1 -0
  173. package/dist/protocol/edge-verdict.d.ts +1 -1
  174. package/dist/protocol/edge-verdict.d.ts.map +1 -1
  175. package/dist/protocol/headers.d.ts +4 -0
  176. package/dist/protocol/headers.d.ts.map +1 -0
  177. package/dist/protocol/headers.js +4 -0
  178. package/dist/protocol/headers.js.map +1 -0
  179. package/dist/protocol/ingress-contract.d.ts +1 -1
  180. package/dist/protocol/ingress-contract.d.ts.map +1 -1
  181. package/dist/protocol/ingress-contract.js +1 -5
  182. package/dist/protocol/ingress-contract.js.map +1 -1
  183. package/dist/protocol/peer-dial.d.ts.map +1 -1
  184. package/dist/protocol/peer-dial.js +18 -36
  185. package/dist/protocol/peer-dial.js.map +1 -1
  186. package/dist/protocol/raw/extension-protocol.d.ts +47 -0
  187. package/dist/protocol/raw/extension-protocol.d.ts.map +1 -0
  188. package/dist/protocol/raw/extension-protocol.js +32 -0
  189. package/dist/protocol/raw/extension-protocol.js.map +1 -0
  190. package/dist/protocol/raw/raw-json-routes.d.ts +855 -0
  191. package/dist/protocol/raw/raw-json-routes.d.ts.map +1 -0
  192. package/dist/protocol/raw/raw-json-routes.js +28 -0
  193. package/dist/protocol/raw/raw-json-routes.js.map +1 -0
  194. package/dist/protocol/{raw-routes.d.ts → raw/raw-routes.d.ts} +50 -3
  195. package/dist/protocol/raw/raw-routes.d.ts.map +1 -0
  196. package/dist/protocol/{raw-routes.js → raw/raw-routes.js} +17 -3
  197. package/dist/protocol/raw/raw-routes.js.map +1 -0
  198. package/dist/protocol/raw/route-path.d.ts +3 -0
  199. package/dist/protocol/raw/route-path.d.ts.map +1 -0
  200. package/dist/protocol/raw/route-path.js +8 -0
  201. package/dist/protocol/raw/route-path.js.map +1 -0
  202. package/dist/protocol/route-meta.d.ts +1 -1
  203. package/dist/protocol/route-meta.d.ts.map +1 -1
  204. package/dist/protocol/routes.d.ts +1 -0
  205. package/dist/protocol/routes.d.ts.map +1 -1
  206. package/dist/protocol/routes.js +8 -0
  207. package/dist/protocol/routes.js.map +1 -1
  208. package/dist/protocol/sse.d.ts +2 -1
  209. package/dist/protocol/sse.d.ts.map +1 -1
  210. package/dist/protocol/sse.js +23 -12
  211. package/dist/protocol/sse.js.map +1 -1
  212. package/dist/protocol/tunnel-bulk.js +1 -1
  213. package/dist/protocol/tunnel-bulk.js.map +1 -1
  214. package/dist/protocol/vitals.d.ts +2 -1
  215. package/dist/protocol/vitals.d.ts.map +1 -1
  216. package/dist/protocol/vitals.js +1 -0
  217. package/dist/protocol/vitals.js.map +1 -1
  218. package/dist/schemas/activity.d.ts +1 -0
  219. package/dist/schemas/activity.d.ts.map +1 -1
  220. package/dist/schemas/activity.js.map +1 -1
  221. package/dist/schemas/agent.d.ts +6 -0
  222. package/dist/schemas/agent.d.ts.map +1 -1
  223. package/dist/schemas/agent.js +9 -4
  224. package/dist/schemas/agent.js.map +1 -1
  225. package/dist/schemas/agents-list.d.ts +404 -0
  226. package/dist/schemas/agents-list.d.ts.map +1 -0
  227. package/dist/schemas/agents-list.js +14 -0
  228. package/dist/schemas/agents-list.js.map +1 -0
  229. package/dist/schemas/agents.d.ts +203 -0
  230. package/dist/schemas/agents.d.ts.map +1 -1
  231. package/dist/schemas/agents.js +44 -0
  232. package/dist/schemas/agents.js.map +1 -1
  233. package/dist/schemas/automations.d.ts +235 -347
  234. package/dist/schemas/automations.d.ts.map +1 -1
  235. package/dist/schemas/automations.js +82 -13
  236. package/dist/schemas/automations.js.map +1 -1
  237. package/dist/schemas/capabilities.d.ts +43 -8
  238. package/dist/schemas/capabilities.d.ts.map +1 -1
  239. package/dist/schemas/capabilities.js +6 -2
  240. package/dist/schemas/capabilities.js.map +1 -1
  241. package/dist/schemas/ci.d.ts +4 -0
  242. package/dist/schemas/ci.d.ts.map +1 -1
  243. package/dist/schemas/ci.js +8 -0
  244. package/dist/schemas/ci.js.map +1 -1
  245. package/dist/schemas/devices.d.ts +67 -0
  246. package/dist/schemas/devices.d.ts.map +1 -1
  247. package/dist/schemas/devices.js +8 -0
  248. package/dist/schemas/devices.js.map +1 -1
  249. package/dist/schemas/engines.d.ts +57 -0
  250. package/dist/schemas/engines.d.ts.map +1 -1
  251. package/dist/schemas/engines.js +4 -0
  252. package/dist/schemas/engines.js.map +1 -1
  253. package/dist/schemas/extension-updates.d.ts +329 -0
  254. package/dist/schemas/extension-updates.d.ts.map +1 -1
  255. package/dist/schemas/extension-updates.js +68 -3
  256. package/dist/schemas/extension-updates.js.map +1 -1
  257. package/dist/schemas/git/git.d.ts +11 -0
  258. package/dist/schemas/git/git.d.ts.map +1 -1
  259. package/dist/schemas/git/git.js +4 -4
  260. package/dist/schemas/git/git.js.map +1 -1
  261. package/dist/schemas/history.d.ts +2 -0
  262. package/dist/schemas/history.d.ts.map +1 -1
  263. package/dist/schemas/history.js.map +1 -1
  264. package/dist/schemas/hosts.d.ts +74 -0
  265. package/dist/schemas/hosts.d.ts.map +1 -1
  266. package/dist/schemas/hosts.js +10 -1
  267. package/dist/schemas/hosts.js.map +1 -1
  268. package/dist/schemas/loopback-catch.d.ts +1 -0
  269. package/dist/schemas/loopback-catch.d.ts.map +1 -1
  270. package/dist/schemas/loopback-catch.js +1 -0
  271. package/dist/schemas/loopback-catch.js.map +1 -1
  272. package/dist/schemas/maintenance.d.ts +8 -0
  273. package/dist/schemas/maintenance.d.ts.map +1 -1
  274. package/dist/schemas/maintenance.js +6 -0
  275. package/dist/schemas/maintenance.js.map +1 -1
  276. package/dist/schemas/members.d.ts +58 -0
  277. package/dist/schemas/members.d.ts.map +1 -0
  278. package/dist/schemas/members.js +16 -0
  279. package/dist/schemas/members.js.map +1 -0
  280. package/dist/schemas/metrics.d.ts +10 -0
  281. package/dist/schemas/metrics.d.ts.map +1 -1
  282. package/dist/schemas/metrics.js +19 -3
  283. package/dist/schemas/metrics.js.map +1 -1
  284. package/dist/schemas/needs.d.ts +1159 -1
  285. package/dist/schemas/needs.d.ts.map +1 -1
  286. package/dist/schemas/needs.js +25 -3
  287. package/dist/schemas/needs.js.map +1 -1
  288. package/dist/schemas/offload.js +1 -1
  289. package/dist/schemas/offload.js.map +1 -1
  290. package/dist/schemas/peer-enrollment.d.ts +7 -0
  291. package/dist/schemas/peer-enrollment.d.ts.map +1 -0
  292. package/dist/schemas/peer-enrollment.js +6 -0
  293. package/dist/schemas/peer-enrollment.js.map +1 -0
  294. package/dist/schemas/phone.d.ts +231 -0
  295. package/dist/schemas/phone.d.ts.map +1 -0
  296. package/dist/schemas/phone.js +57 -0
  297. package/dist/schemas/phone.js.map +1 -0
  298. package/dist/schemas/privacy.d.ts +41 -0
  299. package/dist/schemas/privacy.d.ts.map +1 -1
  300. package/dist/schemas/privacy.js +20 -3
  301. package/dist/schemas/privacy.js.map +1 -1
  302. package/dist/schemas/project-delivery.d.ts +94 -0
  303. package/dist/schemas/project-delivery.d.ts.map +1 -0
  304. package/dist/schemas/project-delivery.js +35 -0
  305. package/dist/schemas/project-delivery.js.map +1 -0
  306. package/dist/schemas/providers/plan-limits.d.ts +7 -0
  307. package/dist/schemas/providers/plan-limits.d.ts.map +1 -1
  308. package/dist/schemas/providers/plan-limits.js +22 -1
  309. package/dist/schemas/providers/plan-limits.js.map +1 -1
  310. package/dist/schemas/providers/usage.d.ts +1 -2
  311. package/dist/schemas/providers/usage.d.ts.map +1 -1
  312. package/dist/schemas/providers/usage.js +1 -2
  313. package/dist/schemas/providers/usage.js.map +1 -1
  314. package/dist/schemas/push.d.ts +1 -0
  315. package/dist/schemas/push.d.ts.map +1 -1
  316. package/dist/schemas/push.js.map +1 -1
  317. package/dist/schemas/secrets.d.ts +99 -0
  318. package/dist/schemas/secrets.d.ts.map +1 -1
  319. package/dist/schemas/secrets.js +34 -3
  320. package/dist/schemas/secrets.js.map +1 -1
  321. package/dist/schemas/settings-history.d.ts +1 -1
  322. package/dist/schemas/settings-history.d.ts.map +1 -1
  323. package/dist/schemas/settings-history.js +1 -0
  324. package/dist/schemas/settings-history.js.map +1 -1
  325. package/dist/schemas/settings.d.ts +13 -58
  326. package/dist/schemas/settings.d.ts.map +1 -1
  327. package/dist/schemas/settings.js +8 -13
  328. package/dist/schemas/settings.js.map +1 -1
  329. package/dist/schemas/terminal.d.ts +32 -0
  330. package/dist/schemas/terminal.d.ts.map +1 -1
  331. package/dist/schemas/terminal.js +37 -0
  332. package/dist/schemas/terminal.js.map +1 -1
  333. package/dist/schemas/updates.d.ts +1 -0
  334. package/dist/schemas/updates.d.ts.map +1 -1
  335. package/dist/schemas/updates.js +4 -0
  336. package/dist/schemas/updates.js.map +1 -1
  337. package/dist/schemas/workspace/workspace-search.d.ts +1 -0
  338. package/dist/schemas/workspace/workspace-search.d.ts.map +1 -1
  339. package/dist/schemas/workspace/workspace-search.js.map +1 -1
  340. package/dist/schemas/workspace/workspace-tree.d.ts +3 -0
  341. package/dist/schemas/workspace/workspace-tree.d.ts.map +1 -1
  342. package/dist/schemas/workspace/workspace-tree.js +22 -5
  343. package/dist/schemas/workspace/workspace-tree.js.map +1 -1
  344. package/dist/state/arrival.d.ts +59 -0
  345. package/dist/state/arrival.d.ts.map +1 -1
  346. package/dist/state/arrival.js +17 -0
  347. package/dist/state/arrival.js.map +1 -1
  348. package/dist/state/contract-lock.js +2 -2
  349. package/dist/state/contract-lock.js.map +1 -1
  350. package/dist/state/definition.d.ts +82 -16
  351. package/dist/state/definition.d.ts.map +1 -1
  352. package/dist/state/history-state.d.ts.map +1 -1
  353. package/dist/state/history-state.js +38 -0
  354. package/dist/state/history-state.js.map +1 -1
  355. package/dist/state/runtime-state.d.ts +6 -0
  356. package/dist/state/runtime-state.d.ts.map +1 -1
  357. package/dist/state/runtime-state.js +2 -0
  358. package/dist/state/runtime-state.js.map +1 -1
  359. package/dist/state/workspace-state.d.ts +24 -6
  360. package/dist/state/workspace-state.d.ts.map +1 -1
  361. package/dist/state/workspace-state.js +29 -7
  362. package/dist/state/workspace-state.js.map +1 -1
  363. package/dist/text/embed.d.ts +10 -0
  364. package/dist/text/embed.d.ts.map +1 -1
  365. package/dist/text/embed.js +25 -0
  366. package/dist/text/embed.js.map +1 -1
  367. package/dist/text/pages.d.ts +53 -0
  368. package/dist/text/pages.d.ts.map +1 -0
  369. package/dist/text/pages.js +230 -0
  370. package/dist/text/pages.js.map +1 -0
  371. package/dist/text/transcript-fold.d.ts +1 -0
  372. package/dist/text/transcript-fold.d.ts.map +1 -1
  373. package/dist/text/transcript-fold.js +30 -2
  374. package/dist/text/transcript-fold.js.map +1 -1
  375. package/dist/webext/index.d.ts +3 -2
  376. package/dist/webext/index.d.ts.map +1 -1
  377. package/dist/webext/index.js +3 -2
  378. package/dist/webext/index.js.map +1 -1
  379. package/package.json +77 -22
  380. package/src/chores/chores.ts +41 -21
  381. package/src/chores/{probes.test.ts → probes.integration.test.ts} +134 -1
  382. package/src/chores/probes.ts +128 -14
  383. package/src/chores/verdict.test.ts +29 -0
  384. package/src/contracts/agent.contract.ts +2 -2
  385. package/src/contracts/agents.contract.ts +1 -1
  386. package/src/contracts/automations.contract.ts +19 -1
  387. package/src/contracts/device.contract.ts +5 -0
  388. package/src/contracts/endpoints.contract.ts +32 -26
  389. package/src/contracts/extensions.contract.ts +49 -0
  390. package/src/contracts/pages.contract.ts +61 -0
  391. package/src/contracts/phone.contract.ts +21 -0
  392. package/src/contracts/privacy.contract.ts +13 -1
  393. package/src/contracts/runner.contract.ts +1 -1
  394. package/src/contracts/secrets.contract.ts +25 -0
  395. package/src/contracts/settings.contract.ts +10 -0
  396. package/src/contracts/system.contract.ts +26 -0
  397. package/src/documents/conversions.ts +3 -1
  398. package/src/documents/read.ts +4 -5
  399. package/src/events/agent-events.ts +27 -3
  400. package/src/events/requests.ts +47 -0
  401. package/src/events/transcript.ts +14 -0
  402. package/src/ids/hostnames.fixture.json +14 -10
  403. package/src/ids/hostnames.test.ts +21 -2
  404. package/src/ids/hostnames.ts +34 -15
  405. package/src/ids/sandbox-id.ts +3 -0
  406. package/src/ids/tunnel-ids.ts +1 -2
  407. package/src/index.ts +29 -12
  408. package/src/models/agent-catalog.ts +1 -2
  409. package/src/models/agent-runtimes.ts +12 -6
  410. package/src/models/provider-specs.test.ts +12 -0
  411. package/src/models/provider-specs.ts +16 -0
  412. package/src/{front → netd}/browser-wire.ts +1 -1
  413. package/src/{front → netd}/generated/browser-wire.json +80 -7
  414. package/src/{front → netd}/generated/browser-wire.ts +34 -7
  415. package/src/{front/generated/front-wire.json → netd/generated/netd-wire.json} +103 -41
  416. package/src/{front → netd}/generated/tunnel.json +15 -1
  417. package/src/{front → netd}/generated/wire.ts +26 -21
  418. package/src/netd/netd-wire.ts +24 -0
  419. package/src/{front → netd}/wire-manifests.test.ts +31 -11
  420. package/src/policy/credential-material.ts +39 -11
  421. package/src/policy/message-limits.ts +25 -0
  422. package/src/policy/request-status.ts +10 -1
  423. package/src/policy/reserved-servers.ts +3 -2
  424. package/src/policy/tests/credential-material.test.ts +49 -1
  425. package/src/policy/tests/message-limits.test.ts +27 -0
  426. package/src/policy/tests/reserved-servers.test.ts +3 -3
  427. package/src/policy/turned-away.ts +5 -1
  428. package/src/protocol/container-requirements.ts +4 -5
  429. package/src/protocol/{listener-protocol.ts → doors/listener-protocol.ts} +37 -15
  430. package/src/protocol/doors/phone-links.ts +50 -0
  431. package/src/protocol/doors/phone-protocol.test.ts +136 -0
  432. package/src/protocol/doors/phone-protocol.ts +71 -0
  433. package/src/protocol/{runner-protocol.ts → doors/runner-protocol.ts} +1 -1
  434. package/src/protocol/{webext-links.ts → doors/webext-links.ts} +4 -0
  435. package/src/protocol/edge-verdict.ts +1 -1
  436. package/src/protocol/headers.ts +14 -0
  437. package/src/protocol/ingress-contract.ts +6 -10
  438. package/src/protocol/peer-dial.test.ts +83 -4
  439. package/src/protocol/peer-dial.ts +33 -40
  440. package/src/protocol/raw/extension-protocol.ts +59 -0
  441. package/src/protocol/raw/raw-json-routes.ts +61 -0
  442. package/src/protocol/{raw-routes.ts → raw/raw-routes.ts} +40 -7
  443. package/src/protocol/raw/route-path.ts +13 -0
  444. package/src/protocol/route-meta.ts +4 -4
  445. package/src/protocol/routes.ts +12 -0
  446. package/src/protocol/sse.test.ts +49 -0
  447. package/src/protocol/sse.ts +29 -14
  448. package/src/protocol/tunnel-bulk.test.ts +1 -1
  449. package/src/protocol/tunnel-bulk.ts +2 -2
  450. package/src/protocol/vitals.test.ts +7 -7
  451. package/src/protocol/vitals.ts +12 -7
  452. package/src/schemas/activity.ts +1 -0
  453. package/src/schemas/agent.ts +11 -4
  454. package/src/schemas/agents-list.ts +24 -0
  455. package/src/schemas/agents.ts +71 -2
  456. package/src/schemas/automations.ts +126 -24
  457. package/src/schemas/capabilities.ts +13 -3
  458. package/src/schemas/ci.ts +10 -0
  459. package/src/schemas/devices.ts +24 -0
  460. package/src/schemas/engines.ts +7 -0
  461. package/src/schemas/extension-updates.ts +93 -3
  462. package/src/schemas/git/git.ts +15 -4
  463. package/src/schemas/history.ts +2 -0
  464. package/src/schemas/hosts.ts +23 -1
  465. package/src/schemas/loopback-catch.ts +6 -1
  466. package/src/schemas/maintenance.ts +9 -0
  467. package/src/schemas/members.ts +33 -0
  468. package/src/schemas/metrics.ts +21 -3
  469. package/src/schemas/needs.ts +36 -3
  470. package/src/schemas/offload.ts +1 -1
  471. package/src/schemas/peer-enrollment.ts +14 -0
  472. package/src/schemas/phone.ts +121 -0
  473. package/src/schemas/privacy.ts +36 -7
  474. package/src/schemas/project-delivery.ts +78 -0
  475. package/src/schemas/providers/plan-limits.ts +27 -3
  476. package/src/schemas/providers/usage.ts +3 -3
  477. package/src/schemas/push.ts +1 -0
  478. package/src/schemas/secrets.ts +54 -3
  479. package/src/schemas/settings-history.ts +2 -0
  480. package/src/schemas/settings.ts +20 -22
  481. package/src/schemas/terminal.ts +50 -0
  482. package/src/schemas/updates.test.ts +47 -0
  483. package/src/schemas/updates.ts +4 -0
  484. package/src/schemas/workspace/workspace-search.ts +2 -0
  485. package/src/schemas/workspace/workspace-tree.ts +40 -12
  486. package/src/state/arrival.ts +40 -0
  487. package/src/state/contract-lock.test.ts +1 -1
  488. package/src/state/contract-lock.ts +5 -5
  489. package/src/state/history-state.ts +72 -1
  490. package/src/state/runtime-state.ts +4 -0
  491. package/src/state/workspace-state.ts +65 -20
  492. package/src/text/embed.test.ts +21 -1
  493. package/src/text/embed.ts +50 -3
  494. package/src/text/pages.test.ts +161 -0
  495. package/src/text/pages.ts +344 -0
  496. package/src/text/transcript-fold.test.ts +22 -0
  497. package/src/text/transcript-fold.ts +41 -2
  498. package/src/webext/index.ts +3 -2
  499. package/dist/front/browser-wire.d.ts.map +0 -1
  500. package/dist/front/browser-wire.js.map +0 -1
  501. package/dist/front/front-wire.d.ts +0 -6
  502. package/dist/front/front-wire.d.ts.map +0 -1
  503. package/dist/front/front-wire.js +0 -5
  504. package/dist/front/front-wire.js.map +0 -1
  505. package/dist/front/generated/browser-wire.d.ts.map +0 -1
  506. package/dist/front/generated/browser-wire.js.map +0 -1
  507. package/dist/front/generated/wire.d.ts.map +0 -1
  508. package/dist/protocol/host-protocol.d.ts.map +0 -1
  509. package/dist/protocol/host-protocol.js.map +0 -1
  510. package/dist/protocol/listener-protocol.d.ts.map +0 -1
  511. package/dist/protocol/listener-protocol.js +0 -33
  512. package/dist/protocol/listener-protocol.js.map +0 -1
  513. package/dist/protocol/raw-routes.d.ts.map +0 -1
  514. package/dist/protocol/raw-routes.js.map +0 -1
  515. package/dist/protocol/request-id.d.ts +0 -2
  516. package/dist/protocol/request-id.d.ts.map +0 -1
  517. package/dist/protocol/request-id.js +0 -2
  518. package/dist/protocol/request-id.js.map +0 -1
  519. package/dist/protocol/runner-protocol.d.ts.map +0 -1
  520. package/dist/protocol/runner-protocol.js.map +0 -1
  521. package/dist/protocol/webext-links.d.ts.map +0 -1
  522. package/dist/protocol/webext-links.js.map +0 -1
  523. package/dist/protocol/webext-protocol.d.ts.map +0 -1
  524. package/dist/protocol/webext-protocol.js.map +0 -1
  525. package/src/front/front-wire.ts +0 -15
  526. package/src/protocol/request-id.ts +0 -2
  527. /package/dist/{front → netd}/browser-wire.d.ts +0 -0
  528. /package/dist/{front → netd}/browser-wire.js +0 -0
  529. /package/dist/{front → netd}/generated/browser-wire.js +0 -0
  530. /package/dist/{front → netd}/generated/wire.js +0 -0
  531. /package/dist/protocol/{host-protocol.d.ts → doors/host-protocol.d.ts} +0 -0
  532. /package/dist/protocol/{host-protocol.js → doors/host-protocol.js} +0 -0
  533. /package/dist/protocol/{runner-protocol.d.ts → doors/runner-protocol.d.ts} +0 -0
  534. /package/dist/protocol/{webext-protocol.d.ts → doors/webext-protocol.d.ts} +0 -0
  535. /package/dist/protocol/{webext-protocol.js → doors/webext-protocol.js} +0 -0
  536. /package/src/protocol/{host-protocol.ts → doors/host-protocol.ts} +0 -0
  537. /package/src/protocol/{webext-protocol.ts → doors/webext-protocol.ts} +0 -0
@@ -74,16 +74,99 @@ const semverKind = (current: string, latest: string): OutdatedPackage["kind"] =>
74
74
  return latestMinor !== currentMinor ? `minor` : `patch`;
75
75
  };
76
76
 
77
+ // ---- packages the workspace leaves out -------------------------------------------------------------------------
78
+ // `pnpm outdated -r` and `pnpm audit` read the workspace's own tree, so a package the repo deliberately keeps OUT of
79
+ // it (the iOS shell, whose dependencies Xcode consumes and which is installed with npm on the Mac that builds it)
80
+ // was measured by neither, while Dependabot reads every manifest: GitHub reported a critical Capacitor advisory
81
+ // this panel never saw. Every literal `!dir` under `packages:` in pnpm-workspace.yaml naming a folder with its own
82
+ // package.json counts. A glob negation (`!**/fixtures/**`) is how fixtures are left out; it never names a folder
83
+ // that exists, so the package.json test drops it without a rule of its own.
84
+ const STANDALONE_DIRS =
85
+ `sed -n '/^packages:/,/^[^[:space:]#-]/p' pnpm-workspace.yaml 2>/dev/null | tr -d "\\"'" | ` +
86
+ `sed -n -e 's|/\\*\\*[[:space:]]*$||' -e 's|^[[:space:]]*-[[:space:]]*!\\([^[:space:]#]*\\).*$|\\1|p'`;
87
+
88
+ // The line that opens one standalone package's report, as JSON so a guard can still read the stream with `jq -s`.
89
+ const STANDALONE_KEY = `standalone`;
90
+ const STANDALONE_LINE = /^\{"standalone":"([^"]*)"\}$/;
91
+
92
+ // Runs `measure` against each standalone package in a scratch copy, never in place: `--lockfile-only` would write
93
+ // a pnpm lockfile into a folder whose whole point is that pnpm does not manage it. A lockfile the folder already
94
+ // has is honoured (an npm one through `pnpm import`); without one the tree is what a fresh install there resolves
95
+ // today, which for a folder that commits none is exactly what its next build installs. A copy that cannot be
96
+ // resolved prints nothing after its marker, and the parser turns that into a failed probe, never a clean package.
97
+ const standaloneCommand = (measure: string): string =>
98
+ `${STANDALONE_DIRS} | while IFS= read -r dir; do ` +
99
+ `[ -f "$dir/package.json" ] || continue; ` +
100
+ `printf '{"${STANDALONE_KEY}":"%s"}\\n' "$dir"; ` +
101
+ `scratch=$(mktemp -d) || continue; ` +
102
+ `for file in package.json pnpm-lock.yaml package-lock.json .npmrc; do [ -f "$dir/$file" ] && cp "$dir/$file" "$scratch/"; done; ` +
103
+ `( cd "$scratch" && { [ -f pnpm-lock.yaml ] || { [ -f package-lock.json ] && pnpm import >/dev/null 2>&1; } || ` +
104
+ `pnpm install --lockfile-only --ignore-workspace --ignore-scripts >/dev/null 2>&1; } && ${measure} ); ` +
105
+ `rm -rf "$scratch"; ` +
106
+ `done`;
107
+
108
+ // The workspace's own report, then one per standalone package; `true` at the end because pnpm exits non-zero when
109
+ // it has findings, and the runner judges by whether the output parses.
110
+ const withStandalone = (measure: string, standaloneMeasure: string): string => `${measure}; ${standaloneCommand(standaloneMeasure)}; true`;
111
+
112
+ interface Section {
113
+ readonly standalone?: string;
114
+ readonly text: string;
115
+ }
116
+
117
+ // Splits a probe's output at each standalone marker; the first section, before any marker, is the workspace's own.
118
+ const sectionsOf = (stdout: string): Section[] => {
119
+ const sections: { standalone?: string; lines: string[] }[] = [{ lines: [] }];
120
+ for (const line of stdout.split(`\n`)) {
121
+ const marker = STANDALONE_LINE.exec(line.trim());
122
+ if (marker === null) {
123
+ sections.at(-1)?.lines.push(line);
124
+ } else {
125
+ sections.push({ standalone: marker[1] ?? ``, lines: [] });
126
+ }
127
+ }
128
+ return sections.map(({ standalone, lines }) => ({ ...(standalone === undefined ? {} : { standalone }), text: lines.join(`\n`) }));
129
+ };
130
+
131
+ // Every section has to parse: a standalone package that could not be measured is not a clean one, so one unreadable
132
+ // report fails the whole probe rather than vanishing from it.
133
+ const parseSections = <T>(stdout: string, parse: (section: Section) => readonly T[] | undefined): T[] | undefined => {
134
+ const found: T[] = [];
135
+ for (const section of sectionsOf(stdout)) {
136
+ const parsed = parse(section);
137
+ if (parsed === undefined) {
138
+ return undefined;
139
+ }
140
+ found.push(...parsed);
141
+ }
142
+ return found;
143
+ };
144
+
145
+ const standaloneOf = (section: Section): { standalone?: string } => (section.standalone === undefined ? {} : { standalone: section.standalone });
146
+
147
+ // pnpm 12 keys a package that appears more than once in the workspace (two versions, or both a dependency and a
148
+ // devDependency somewhere) as `name@version` and `name@version (dev)`; taken as the name, that listed mermaid twice
149
+ // under a name no registry knows.
150
+ const DISAMBIGUATED_KEY = /^(@?[^@\s]+)@\S+(?:\s+\([^)]*\))?$/;
151
+ const packageNameOf = (key: string): string => DISAMBIGUATED_KEY.exec(key)?.[1] ?? key;
152
+
153
+ // What ships outranks what only builds, so the merged row says `dependencies` if any of its copies does.
154
+ const SECTION_RANK = [`dependencies`, `optionalDependencies`, `peerDependencies`, `devDependencies`];
155
+ const rankOf = (section: string): number => {
156
+ const rank = SECTION_RANK.indexOf(section);
157
+ return rank === -1 ? SECTION_RANK.length : rank;
158
+ };
159
+
77
160
  // `pnpm outdated --json` prints a name→{current,latest,dependencyType} map; the recursive workspace form merges into
78
161
  // the same shape.
79
162
  // Entries missing `current` or `latest` are skipped: pnpm could not resolve them against the registry.
80
- const parseOutdated = (stdout: string): ProbeFacts | undefined => {
81
- const root = asObject(stdout);
163
+ const parseOutdatedSection = (section: Section): OutdatedPackage[] | undefined => {
164
+ const root = asObject(section.text);
82
165
  if (root === undefined) {
83
166
  return undefined;
84
167
  }
85
- const packages: OutdatedPackage[] = [];
86
- for (const [name, raw] of Object.entries(root)) {
168
+ const packages = new Map<string, OutdatedPackage>();
169
+ for (const [key, raw] of Object.entries(root)) {
87
170
  if (typeof raw !== `object` || raw === null) {
88
171
  continue;
89
172
  }
@@ -93,9 +176,28 @@ const parseOutdated = (stdout: string): ProbeFacts | undefined => {
93
176
  if (current === undefined || latest === undefined || current === latest) {
94
177
  continue;
95
178
  }
96
- packages.push({ name, current, latest, kind: semverKind(current, latest), section: asString(entry[`dependencyType`]) ?? `dependencies` });
179
+ const name = packageNameOf(key);
180
+ const row: OutdatedPackage = {
181
+ name,
182
+ current,
183
+ latest,
184
+ kind: semverKind(current, latest),
185
+ section: asString(entry[`dependencyType`]) ?? `dependencies`,
186
+ ...standaloneOf(section),
187
+ };
188
+ // One row per version pair: the same upgrade seen from a dependency and a devDependency is one upgrade.
189
+ const identity = `${name}@${current}→${latest}`;
190
+ const seen = packages.get(identity);
191
+ if (seen === undefined || rankOf(row.section) < rankOf(seen.section)) {
192
+ packages.set(identity, row);
193
+ }
97
194
  }
98
- return { id: `outdated`, packages };
195
+ return [...packages.values()];
196
+ };
197
+
198
+ const parseOutdated = (stdout: string): ProbeFacts | undefined => {
199
+ const packages = parseSections(stdout, parseOutdatedSection);
200
+ return packages === undefined ? undefined : { id: `outdated`, packages };
99
201
  };
100
202
 
101
203
  const SEVERITIES = new Set([`critical`, `high`, `moderate`, `low`, `info`]);
@@ -104,15 +206,15 @@ const SEVERITIES = new Set([`critical`, `high`, `moderate`, `low`, `info`]);
104
206
  // and whether a patch exists.
105
207
  // `dev` is read from the findings' own flag: a build-time-only advisory is a different risk than one in a running
106
208
  // service.
107
- const parseAudit = (stdout: string): ProbeFacts | undefined => {
108
- const root = asObject(stdout);
209
+ const parseAuditSection = (section: Section): Advisory[] | undefined => {
210
+ const root = asObject(section.text);
109
211
  if (root === undefined) {
110
212
  return undefined;
111
213
  }
112
214
  const raw = root[`advisories`];
113
215
  // No `advisories` key is pnpm's clean report (empty list), not an unrecognized shape.
114
216
  if (raw === undefined) {
115
- return { id: `audit`, advisories: [] };
217
+ return [];
116
218
  }
117
219
  if (typeof raw !== `object` || raw === null) {
118
220
  return undefined;
@@ -137,11 +239,22 @@ const parseAudit = (stdout: string): ProbeFacts | undefined => {
137
239
  // `<0.0.0` is npm's spelling of "no patch exists"; treated as absent rather than a fixable range.
138
240
  ...(patched === undefined || patched === `<0.0.0` ? {} : { patched }),
139
241
  dev: findings.length > 0 && findings.every((finding) => finding[`dev`] === true),
242
+ ...standaloneOf(section),
140
243
  });
141
244
  }
142
- return { id: `audit`, advisories };
245
+ return advisories;
143
246
  };
144
247
 
248
+ const parseAudit = (stdout: string): ProbeFacts | undefined => {
249
+ const advisories = parseSections(stdout, parseAuditSection);
250
+ return advisories === undefined ? undefined : { id: `audit`, advisories };
251
+ };
252
+
253
+ // Shared with the security chore's nightly guard, so the automation wakes on exactly what the panel shows. The output
254
+ // is a stream of JSON documents (`jq -s` reads it whole): pnpm's report, then a `{"standalone": dir}` line and that
255
+ // package's report for each standalone package.
256
+ export const AUDIT_COMMAND = withStandalone(`pnpm audit --json 2>/dev/null`, `pnpm audit --json --ignore-workspace 2>/dev/null`);
257
+
145
258
  // Sample of paths only; the agent re-runs knip live, so a full list would already be stale.
146
259
  const DEAD_CODE_SAMPLE = 8;
147
260
 
@@ -404,9 +517,10 @@ export const PROBES: readonly ProbeSpec[] = [
404
517
  timeoutMs: 5 * 60_000,
405
518
  available: `test -f package.json`,
406
519
  unavailable: `no package.json`,
407
- // `-r` reports every workspace package, not just root; `|| true` since pnpm exits non-zero when it has
408
- // findings.
409
- command: `pnpm outdated -r --json 2>/dev/null || true`,
520
+ // `-r` reports every workspace package, not just root, and resolves `catalog:` through pnpm-workspace.yaml,
521
+ // so the catalog is what gets measured. It also honours `minimumReleaseAge`: a release younger than the
522
+ // floor is not reported as latest, by the same policy that would refuse to install it.
523
+ command: withStandalone(`pnpm outdated -r --json 2>/dev/null`, `pnpm outdated --json --ignore-workspace 2>/dev/null`),
410
524
  parse: parseOutdated,
411
525
  },
412
526
  {
@@ -419,7 +533,7 @@ export const PROBES: readonly ProbeSpec[] = [
419
533
  // A lockfile, not package.json: audit resolves the installed tree, and without one pnpm has nothing to check.
420
534
  available: `test -f pnpm-lock.yaml || test -f package-lock.json`,
421
535
  unavailable: `no lockfile`,
422
- command: `pnpm audit --json 2>/dev/null || true`,
536
+ command: AUDIT_COMMAND,
423
537
  parse: parseAudit,
424
538
  },
425
539
  {
@@ -10,6 +10,7 @@ import type {
10
10
  UiScan,
11
11
  } from "../schemas/maintenance.js";
12
12
  import { choreById, CHORES } from "./chores.js";
13
+ import { digestOf } from "./digest.js";
13
14
  import { assessReport, choreAnswer, choreAnswered, ledgerKey, unseenVerdicts } from "./verdict.js";
14
15
 
15
16
  // The chore verdict state machine, tested at the distinctions a simpler design gets wrong: reporting an unmeasured repo
@@ -101,6 +102,34 @@ describe(`what "we have not measured this" means`, () => {
101
102
  });
102
103
  });
103
104
 
105
+ // A package the pnpm workspace leaves out is fixed in its own folder, so its findings have to say which folder; the
106
+ // workspace's own findings keep the digest they always had, so adding the field rebadges nothing already settled.
107
+ describe(`findings from a package the workspace leaves out`, () => {
108
+ const advisory = (name: string, standalone?: string) => ({
109
+ name,
110
+ severity: `critical` as const,
111
+ title: `${name} is bad`,
112
+ patched: `>=2`,
113
+ dev: false,
114
+ ...(standalone === undefined ? {} : { standalone }),
115
+ });
116
+ const withFacts = (advisories: ReturnType<typeof advisory>[]) =>
117
+ report({ repos: [{ repo: `app`, probes: [probe({ id: `audit`, facts: { id: `audit`, advisories } })], signals: signals() }] });
118
+
119
+ test(`name their folder in the panel and in the prompt`, () => {
120
+ const verdict = verdictFor(withFacts([advisory(`@capacitor/ios`, `_editor/ios-app`)]), `security-advisories`);
121
+ expect(verdict.detail).toEqual([`critical · @capacitor/ios in _editor/ios-app, @capacitor/ios is bad`]);
122
+ expect(verdict.prompt).toContain(`@capacitor/ios in _editor/ios-app (critical`);
123
+ });
124
+
125
+ test(`are a different finding from the same package in the workspace, which keeps its old digest`, () => {
126
+ const workspace = verdictFor(withFacts([advisory(`left-pad`)]), `security-advisories`);
127
+ const standalone = verdictFor(withFacts([advisory(`left-pad`, `shell`)]), `security-advisories`);
128
+ expect(workspace.digest).toBe(digestOf(`left-pad@critical`));
129
+ expect(standalone.digest).not.toBe(workspace.digest);
130
+ });
131
+ });
132
+
104
133
  describe(`the ledger debounces; it cannot hide`, () => {
105
134
  const withAdvisories = report({ repos: [{ repo: `app`, probes: [auditProbe([`left-pad`])], signals: signals() }] });
106
135
  const ledgerEntry = (over: Partial<ChoreLedgerEntry> = {}): ChoreLedgerEntry => ({
@@ -112,7 +112,7 @@ export const agentContract = {
112
112
  path: "/agent/queue/resume",
113
113
  summary: "Let waiting messages go",
114
114
  description:
115
- "Releases a queue held after a stop or a refusal: what waits goes out now as one turn when nothing is running, or after the running turn otherwise. Name who serves that turn when the conversation has been re-pointed since the messages were queued.",
115
+ "Releases a queue held after a stop or a refusal: what waits goes out now as one turn when nothing is running, or after the running turn otherwise. Name who serves that turn when the conversation has been re-pointed since the messages were queued. Name messages by id to let only those go (a scheduled one now, ahead of its time), leaving every other booking on its time.",
116
116
  })
117
117
  .meta({ floor: "collaborator", guest: true })
118
118
  .input(QueueResumeSchema)
@@ -124,7 +124,7 @@ export const agentContract = {
124
124
  path: "/agent/queue/schedule",
125
125
  summary: "Reschedule waiting messages",
126
126
  description:
127
- "Books what waits in the conversation's queue to go out by itself at another instant, or once another conversation has finished and its work has landed, holding it until then. Works on a queue that is held for any reason, or on messages waiting behind a running turn. A time already past, or a conversation with nothing left to land, lets them go now.",
127
+ "Books what waits in the conversation's queue to go out by itself at another instant, or once another conversation has finished and its work has landed, holding it until then. Works on a queue that is held for any reason, or on messages waiting behind a running turn. Name messages by id to re-time only those; every other keeps its own booking. A time already past, or a conversation with nothing left to land, lets them go now.",
128
128
  })
129
129
  .meta({ floor: "collaborator", guest: true })
130
130
  .input(QueueScheduleSchema)
@@ -25,7 +25,7 @@ import {
25
25
  AgentUnsentSchema,
26
26
  LandResultSchema,
27
27
  } from "../schemas/agents.js";
28
- import { AgentsListSchema } from "../schemas/automations.js";
28
+ import { AgentsListSchema } from "../schemas/agents-list.js";
29
29
  import { AgentChangesSchema, AgentConflictsSchema, AgentScratchSchema, AgentHistorySchema } from "../schemas/git/git.js";
30
30
  import { FileDiffSchema } from "../schemas/history.js";
31
31
  import { OkSchema } from "../schemas/shared.js";
@@ -9,20 +9,38 @@ import {
9
9
  AutomationsListSchema,
10
10
  SendersProviderParamSchema,
11
11
  SendersRosterSchema,
12
+ WatchCheckInputSchema,
13
+ WatchCheckResultSchema,
12
14
  } from "../schemas/automations.js";
13
15
  import { DoorTokenSchema, OkSchema } from "../schemas/shared.js";
14
16
 
15
17
  // Automations manifest (scheduled agent wake-ups); `pending*` is the owner's approval queue for wakes a
16
18
  // `requireApproval` automation holds instead of firing directly.
17
19
  export const automationsContract = {
20
+ // The `automations` CLI reads it on the agent token; a door's credential is attached for an operator only, which the
21
+ // agent token never is.
18
22
  list: procedure
23
+ .meta({ agent: true })
19
24
  .route({
20
25
  method: "GET",
21
26
  path: "/automations",
22
27
  summary: "Things that wake an agent on their own",
23
- description: "Every automation with its recent runs and when it fires next.",
28
+ description: "Every automation with its recent runs, what its check saw last, and when it fires next.",
24
29
  })
25
30
  .output(AutomationsListSchema),
31
+ // A source only, never a guard command: a command run here would carry whichever persona's credentials the caller
32
+ // named, and the agent can run its own command in its own shell.
33
+ check: procedure
34
+ .meta({ agent: true })
35
+ .route({
36
+ method: "POST",
37
+ path: "/automations/check",
38
+ summary: "Try a watch's check once",
39
+ description:
40
+ "Runs a ready-made source's check now and answers what it sees, without saving or remembering anything: what to look at before proposing a watch, and what the composer shows beside the source it is editing.",
41
+ })
42
+ .input(WatchCheckInputSchema)
43
+ .output(WatchCheckResultSchema),
26
44
  catalog: procedure
27
45
  .route({
28
46
  method: "GET",
@@ -6,6 +6,7 @@ import { DeviceScopesSchema } from "../schemas/capabilities.js";
6
6
  import { DeviceFactsSchema } from "../schemas/hosts.js";
7
7
  import { LoopbackCatchEventSchema, LoopbackCatchSchema } from "../schemas/loopback-catch.js";
8
8
  import { OkSchema } from "../schemas/shared.js";
9
+ import { ProjectDeliveryResultSchema, ProjectDeliverySchema } from "../schemas/project-delivery.js";
9
10
 
10
11
  // What a connected device can be asked, over the socket it opened; the machine is the oRPC server, the daemon the
11
12
  // client. No `.route()`: the procedure path is the address, not HTTP. Every input is strict (devices.ts says why). `mcp` stays opaque (`z.unknown()`) so a machine
@@ -31,4 +32,8 @@ export const deviceContract = {
31
32
  // daemon arms it, never a tool, and aborting the stream is how it stops. Sent only to an agent advertising
32
33
  // `loopback-catch`.
33
34
  catchLoopback: oc.input(LoopbackCatchSchema).output(streamOf(LoopbackCatchEventSchema)),
35
+ // Landed work written into the owner's folder that `/work/<name>` copies (schemas/project-delivery.ts). Only the
36
+ // daemon calls it, after a land, and only on an agent advertising `project-delivery`; the machine refuses a folder
37
+ // that did not opt into delivery, takes a restore point first, and never writes over an edit of the owner's own.
38
+ deliverProject: oc.input(ProjectDeliverySchema).output(ProjectDeliveryResultSchema),
34
39
  };
@@ -27,27 +27,28 @@ export const TrialStatusSchema = z.object({
27
27
  });
28
28
  export type TrialStatusResponse = z.infer<typeof TrialStatusSchema>;
29
29
 
30
- // Whether this container can reach an NVIDIA GPU, and how sure we are. The three states are not a tri-state boolean:
31
- // `absent` means nobody has asked yet, so the switch is still worth offering, while `unsupported` means the host's
32
- // Docker answered and has no nvidia runtime, which is a sentence to print rather than a switch to offer. Before the
33
- // grant the sandbox cannot see VRAM at all — only after it can `gpuMemoryBytes` be anything but zero.
34
- export const LocalModelGpuSchema = z.enum(["granted", "unsupported", "absent"]);
35
- export type LocalModelGpu = z.infer<typeof LocalModelGpuSchema>;
30
+ // A model server found running on the computer that hosts the sandbox.
31
+ export const HostModelServerSchema = z.object({
32
+ kind: z.enum(["ollama", "lmstudio", "llamacpp", "vllm"]).describe("Which program usually listens on the port it answered on."),
33
+ label: z.string().describe("Its name, for the row."),
34
+ baseUrl: z.string().describe("Where the container reaches it, as a model endpoint's base URL."),
35
+ models: z.array(z.string()).describe("The models it lists right now."),
36
+ capability: z.string().optional().describe("The connection that already points at it, if one does."),
37
+ });
38
+ export type HostModelServer = z.infer<typeof HostModelServerSchema>;
36
39
 
37
- // Which one device a model runs at full speed on: the GPU when one reached this sandbox, else the host's RAM. One, never
38
- // a sum: a model split between a card and the CPU runs at the CPU's pace.
39
- export const LocalModelDeviceSchema = z.enum(["gpu", "host"]);
40
- export type LocalModelDevice = z.infer<typeof LocalModelDeviceSchema>;
40
+ export const HostModelServersSchema = z.object({ servers: z.array(HostModelServerSchema) });
41
+ export type HostModelServers = z.infer<typeof HostModelServersSchema>;
41
42
 
42
43
  // One window rung priced against one model, so a surface never has to redo the arithmetic the start check will.
43
44
  const LocalModelWindowFitSchema = z.object({
44
45
  tokens: z.number().int().positive(),
45
46
  // Weights + KV cache + the runtime's own floor: the same estimate the admission check refuses a start on.
46
47
  totalBytes: z.number().int().nonnegative(),
47
- // Whether it can load at all, GPU and host together: what a start is refused on.
48
+ // Whether it can load at all: what a start is refused on.
48
49
  fits: z.boolean(),
49
- // Whether all of it fits in the free memory of the one device, so it runs at that device's pace. A rung can fit and
50
- // still run mostly on the CPU. Absent from a daemon older than the distinction.
50
+ // Whether all of it fits in the sandbox's free memory, so it runs at full speed. Absent from a daemon older than the
51
+ // distinction.
51
52
  fullSpeed: z.boolean().optional(),
52
53
  });
53
54
 
@@ -79,18 +80,12 @@ export const LocalModelFitSchema = z.object({
79
80
  // True when the number above is a container limit rather than the machine's: worth saying, since the host may look
80
81
  // much larger than what a model can have.
81
82
  memoryCapped: z.boolean(),
82
- gpu: LocalModelGpuSchema,
83
- gpuMemoryBytes: z.number().int().nonnegative(),
84
- // The GPU's free memory, on the card with the most of it; zero before the grant. Absent from an older daemon.
85
- gpuFreeBytes: z.number().int().nonnegative().optional(),
86
- // What a start is refused on: the host and the GPU together, since llama.cpp can split a model between them. Only a
87
- // model that cannot load at all is turned away here; a model that fits only this way runs mostly on the CPU.
83
+ // What a start is refused on: the sandbox's memory, by total. Only a model that cannot load at all is turned away.
88
84
  budgetBytes: z.number().int().nonnegative(),
89
- // What a model may take and still run at full speed: the free memory of one device (fullSpeedDevice), plus whatever
90
- // this sandbox's own local model holds there now, since a start stops it first. Both offers are sized against this,
91
- // never against the sum. Zero means unmeasurable. Absent from a daemon older than the distinction.
85
+ // What a model may take and still run at full speed: the sandbox's free memory, plus whatever its own local model
86
+ // holds now, since a start stops it first. Both offers are sized against this. Zero means unmeasurable. Absent from
87
+ // a daemon older than the distinction.
92
88
  fullSpeedBytes: z.number().int().nonnegative().optional(),
93
- fullSpeedDevice: LocalModelDeviceSchema.optional(),
94
89
  // Whether llama-server is in this image. False means the local lane costs a rebuild before it can serve anything.
95
90
  serverReady: z.boolean(),
96
91
  options: z.array(LocalModelOptionFitSchema),
@@ -122,17 +117,28 @@ export const endpointsContract = {
122
117
  "The allowance, what has been used, when it resets, and which model actually answered the last message. Not being available is the ordinary answer rather than a failure: most sandboxes run against a platform that offers no trial at all.",
123
118
  })
124
119
  .output(TrialStatusSchema),
125
- // Sized against this machine rather than a table in the browser, because the numbers that matter (a cgroup cap, a
126
- // GPU that may not be passed through, weights already on disk) are only knowable in here.
120
+ // Sized against this machine rather than a table in the browser, because the numbers that matter (a cgroup cap, the
121
+ // memory free now, weights already on disk) are only knowable in here.
127
122
  localModelFit: procedure
128
123
  .route({
129
124
  method: "GET",
130
125
  path: "/endpoints/local-model/fit",
131
126
  summary: "Which local models this machine can actually run",
132
127
  description:
133
- "The memory this sandbox may use, whether a GPU reached it, and every curated model priced two ways: whether it fits on one device's free memory and so runs at full speed, and whether it can load at all. The two the connect view offers, one that downloads in a minute and the best this machine runs at full speed, come from the first; a start is refused only on the second.",
128
+ "The memory this sandbox may use, and every curated model priced two ways: whether it fits in the free memory and so runs at full speed, and whether it can load at all. The two the connect view offers, one that downloads in a minute and the best this machine runs at full speed, come from the first; a start is refused only on the second. These run on the sandbox's CPU; a GPU model is a server on the host, which hostServers finds.",
134
129
  })
135
130
  .output(LocalModelFitSchema),
131
+ // A GPU model runs in a server on the computer that hosts the sandbox, never inside it; this finds the ones already
132
+ // running, so pointing at one is a press rather than a form.
133
+ hostServers: procedure
134
+ .route({
135
+ method: "GET",
136
+ path: "/endpoints/host-servers",
137
+ summary: "Model servers already running on the computer that hosts this sandbox",
138
+ description:
139
+ "Asks the usual ports of the hosting computer (Ollama 11434, LM Studio 1234, llama.cpp 8080, vLLM 8000) for their model list, as the container reaches them at host.docker.internal. Only servers that answer with models are listed, each with the connection that already points at it, if one does. Nothing is added.",
140
+ })
141
+ .output(HostModelServersSchema),
136
142
  // Start or stop fetching the instant model's weights before anyone has asked for them, so the first local turn does
137
143
  // not begin with a download. Idempotent: starting twice joins the transfer already running.
138
144
  localModelPrefetch: procedure
@@ -2,6 +2,11 @@ import { procedure } from "../protocol/route-meta.js";
2
2
  import { CapabilityIdParamSchema } from "../schemas/capabilities.js";
3
3
  import {
4
4
  ExtensionApproveInputSchema,
5
+ ExtensionDevClearedSchema,
6
+ ExtensionDevListSchema,
7
+ ExtensionDevSetInputSchema,
8
+ ExtensionDevStateSchema,
9
+ ExtensionDevTargetSchema,
5
10
  ExtensionEnabledInputSchema,
6
11
  ExtensionProcessParamSchema,
7
12
  ExtensionProcessStatusSchema,
@@ -22,6 +27,10 @@ import {
22
27
  import { ExtensionReadinessSchema } from "../schemas/maintenance.js";
23
28
  import { OkSchema } from "../schemas/shared.js";
24
29
 
30
+ // Dev mode's verbs: the agent's `extension` CLI drives them on the agent token, and the Extensions tab's way back
31
+ // calls devClear. None reads or moves a credential.
32
+ const devRoute = procedure.meta({ agent: true });
33
+
25
34
  // Installed extensions resolved to their approved manifests. The bundle itself is a plain Hono route, `GET
26
35
  // /extensions/{id}/bundle`, not part of this oRPC contract: raw ESM bytes aren't a JSON payload.
27
36
  export const extensionsContract = {
@@ -209,4 +218,44 @@ export const extensionsContract = {
209
218
  })
210
219
  .input(ExtensionProcessParamSchema)
211
220
  .output(OkSchema),
221
+ // Dev mode (.intentic/local/extension-dev.json): an installed extension served from a source checkout. Same powers
222
+ // only: a checkout declaring more is held, and the pinned version keeps running.
223
+ devList: devRoute
224
+ .route({
225
+ method: "GET",
226
+ path: "/extensions/dev",
227
+ summary: "Installed extensions and their source checkouts",
228
+ description:
229
+ "Every extension installed from a repository, with its pinned commit, whether it runs from a source checkout, and the checkout of its repository this workspace holds, if any. The calling conversation's own copy is named first.",
230
+ })
231
+ .output(ExtensionDevListSchema),
232
+ devSet: devRoute
233
+ .route({
234
+ method: "POST",
235
+ path: "/extensions/{id}/dev",
236
+ summary: "Run an installed extension from its source checkout",
237
+ description:
238
+ "Serves the extension's browser bundle, backend, processes, skills and contributions from a checkout of its source instead of its pinned copy, so a change to it shows on reload without being landed first. The checkout must hold the same extension and declare the same powers; one asking for more, or not built yet, is held and the pinned version keeps running, with the reason. Nothing is installed or updated: the pinned copy stays where it is.",
239
+ })
240
+ .input(ExtensionDevSetInputSchema)
241
+ .output(ExtensionDevStateSchema),
242
+ devClear: devRoute
243
+ .route({
244
+ method: "POST",
245
+ path: "/extensions/{id}/dev/clear",
246
+ summary: "Go back to the pinned version",
247
+ description: "Stops serving the extension from its source checkout. The checkout itself is left exactly as it is.",
248
+ })
249
+ .input(ExtensionDevTargetSchema)
250
+ .output(ExtensionDevClearedSchema),
251
+ devReload: devRoute
252
+ .route({
253
+ method: "POST",
254
+ path: "/extensions/{id}/dev/reload",
255
+ summary: "Pick up a rebuilt checkout",
256
+ description:
257
+ "Call after rebuilding an extension that runs from its source checkout: its backend restarts on the new code, and an open app is told the list changed, so it offers to reload the new browser bundle.",
258
+ })
259
+ .input(ExtensionDevTargetSchema)
260
+ .output(ExtensionDevStateSchema),
212
261
  };
@@ -0,0 +1,61 @@
1
+ import { z } from "zod";
2
+ import { procedure } from "../protocol/route-meta.js";
3
+ import { PAGE_ERROR_CHARS, PAGE_ERRORS_MAX } from "../text/pages.js";
4
+
5
+ // Pages the agent showed in a chat. The pages themselves are files the workspace already serves; the routes here are
6
+ // what an MCP server's app asks of its server while a reader uses it (`tools/call` over the bridge), carried by the
7
+ // daemon since the app's frame reaches no network of its own, and what a page's own scripts threw as it drew, carried
8
+ // back to the agent that showed it.
9
+ export const PageAppCallSchema = z.object({
10
+ page: z.string().min(1).describe("The stored page the app is drawn from, as a workspace path; it names the server and the tool the app belongs to."),
11
+ name: z.string().min(1).describe("The tool the app asks to call, on its own server."),
12
+ arguments: z.record(z.string(), z.unknown()).optional().describe("What the app passes it."),
13
+ pressed: z
14
+ .boolean()
15
+ .optional()
16
+ .describe(
17
+ "Whether the reader had just pressed something in the app when it asked. Without a press, only a tool its server marks read-only is called: an app's own script cannot make a change nobody asked for.",
18
+ ),
19
+ });
20
+ export const PageAppCallResultSchema = z.object({
21
+ result: z.unknown().describe("The server's answer, as the MCP call result it sent (`content`, `structuredContent`, `isError`)."),
22
+ });
23
+
24
+ export const PageErrorsSchema = z.object({
25
+ page: z.string().min(1).describe("The stored page that threw, as a workspace path."),
26
+ errors: z
27
+ .array(z.string().min(1).max(PAGE_ERROR_CHARS))
28
+ .min(1)
29
+ .max(PAGE_ERRORS_MAX)
30
+ .describe("Its uncaught errors as its frame caught them, each with the first line of its stack."),
31
+ });
32
+ export const PageErrorsResultSchema = z.object({
33
+ told: z
34
+ .boolean()
35
+ .describe(
36
+ "Whether the agent heard: true when the turn that showed the page was still running and took the errors. False when that turn is over, the page is an MCP server's app, or these errors were already told.",
37
+ ),
38
+ });
39
+
40
+ export const pagesContract = {
41
+ appCall: procedure
42
+ .route({
43
+ method: "POST",
44
+ path: "/pages/app-call",
45
+ summary: "Call a tool for an MCP app shown in a chat",
46
+ description:
47
+ "Calls one tool of the connected MCP server whose app a chat is showing, on behalf of a reader using that app. Only a tool the server marks as callable by its app is answered, and only on the server the page was shown for. The answer goes back to the app, not to the agent.",
48
+ })
49
+ .input(PageAppCallSchema)
50
+ .output(PageAppCallResultSchema),
51
+ reportErrors: procedure
52
+ .route({
53
+ method: "POST",
54
+ path: "/pages/errors",
55
+ summary: "Tell the agent that a page it showed threw",
56
+ description:
57
+ "Hands the uncaught errors a page's own scripts threw in a reader's chat to the agent that showed it, as the sandbox's notice inside that agent's running turn, so it fixes the page and draws it again. Only the turn that showed the page hears it, once per drawing, and never for an MCP server's app; afterwards nothing is said, and the reader can ask from the page's own line.",
58
+ })
59
+ .input(PageErrorsSchema)
60
+ .output(PageErrorsResultSchema),
61
+ };
@@ -0,0 +1,21 @@
1
+ import { oc } from "@orpc/contract";
2
+ import { z } from "zod";
3
+ import { PhoneFactsSchema, PhoneScopesSchema } from "../schemas/phone.js";
4
+ import { OkSchema } from "../schemas/shared.js";
5
+
6
+ // What a connected phone can be asked, over the socket its app opened; the phone answers, the daemon asks, inverted
7
+ // as every peer door is, since a phone cannot be dialled. Carried as JSON-RPC rather than oRPC frames
8
+ // (protocol/doors/phone-protocol.ts says why); each key here is a JSON-RPC method name.
9
+ // `mcp` stays one opaque procedure so the app can gain a tool without a matching daemon release.
10
+ export const phoneContract = {
11
+ // Refetched on connect and each card read: the person changes the app's access in Android's settings, not here.
12
+ describe: oc.output(PhoneFactsSchema),
13
+ // Pushed on connect and on every card edit; enforced by the app, never checked here. The daemon sends the card's
14
+ // whole config, so its `platform` is accepted and ignored. Not strict, unlike a computer's: the app ships on its own
15
+ // schedule, and it reads a switch it does not know as off rather than refusing the grant and dropping the link.
16
+ setScopes: oc.input(PhoneScopesSchema.extend({ platform: z.string().optional() })).output(OkSchema),
17
+ // Liveness and keepalive; a failure means the phone went away, not that it is merely quiet.
18
+ ping: oc.output(OkSchema),
19
+ // One MCP JSON-RPC message forwarded verbatim in both directions.
20
+ mcp: oc.input(z.unknown()).output(z.unknown()),
21
+ };
@@ -6,6 +6,7 @@ import {
6
6
  PrivacyKnownSourceSchema,
7
7
  PrivacyKnownValueSchema,
8
8
  PrivacyLedgerEntrySchema,
9
+ PrivacyRevealSchema,
9
10
  PrivacyShieldPolicySchema,
10
11
  PrivacyShieldStatusSchema,
11
12
  } from "../schemas/privacy.js";
@@ -42,9 +43,20 @@ export const privacyContract = {
42
43
  path: "/privacy/log",
43
44
  summary: "What the privacy shield did lately",
44
45
  description:
45
- "Each model request the gateway handled: which provider, whether it was trusted, and how many of each kind of personal data it found. Never the values.",
46
+ "Each model request the gateway handled: which provider, whether it was trusted, how many of each kind of personal data it found, and the tokens it gave with the masked text around them. Never the values.",
46
47
  })
47
48
  .output(z.array(PrivacyLedgerEntrySchema)),
49
+ reveal: procedure
50
+ .route({
51
+ method: "POST",
52
+ path: "/privacy/reveal",
53
+ summary: "Read tokens back to their values",
54
+ description:
55
+ "The value each token stands for, from the vault, so the owner can check what the shield masked and spot a value it should have left alone. Only the owner may ask; a token the vault never gave out is left out.",
56
+ })
57
+ .meta({ floor: "owner", control: "never", panel: false })
58
+ .input(PrivacyRevealSchema)
59
+ .output(z.record(z.string(), z.string())),
48
60
  dictionary: procedure
49
61
  .route({
50
62
  method: "GET",
@@ -2,7 +2,7 @@ import { oc } from "@orpc/contract";
2
2
  import { streamOf } from "../protocol/routes.js";
3
3
  import { z } from "zod";
4
4
  import { AgentEventSchema } from "../events/agent-events.js";
5
- import { RunnerCommandFrameSchema, RunnerCommandSchema, RunnerFactsSchema, RunnerSyncLineSchema, RunnerSyncSchema, RunnerTurnSchema } from "../protocol/runner-protocol.js";
5
+ import { RunnerCommandFrameSchema, RunnerCommandSchema, RunnerFactsSchema, RunnerSyncLineSchema, RunnerSyncSchema, RunnerTurnSchema } from "../protocol/doors/runner-protocol.js";
6
6
  import { EditorContextSchema } from "../schemas/agent.js";
7
7
  import { AgentReplySchema } from "../schemas/providers/plan-limits.js";
8
8
  import { OkSchema } from "../schemas/shared.js";