@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
@@ -0,0 +1,121 @@
1
+ // phone: the user's own Android phone (the `phone` capability's live half)
2
+ import { z } from "zod";
3
+ import { RelayChannelSchema } from "./push.js";
4
+
5
+ // The card's switches. A phone's sibling of `device` and `webext`, not an arm of either: it has no shell and no home
6
+ // folder, and what it can be asked (its screen, the apps on it, the folders and notifications the owner handed it)
7
+ // is granted twice, once here and once on the phone itself, where Android asks the person for each kind of access.
8
+ // Every switch is enforced by the app on the phone, never checked on the daemon side. A switch the app does not know
9
+ // is read as off, so a newer sandbox never breaks an older app's connection.
10
+ const phoneScope = z.enum(["on", "off"]);
11
+ export const PhoneScopesSchema = z.object({
12
+ // On by default, as on a computer. Android still asks the person before the first capture of a session unless the
13
+ // touch-and-type service is on, so this switch is the sandbox's half of a consent the phone holds the other half of.
14
+ screen: phoneScope.default("on"),
15
+ // Tapping, swiping and typing in other apps, through the app's accessibility service. Off by default, like a
16
+ // computer's mouse and keyboard; only the direct-download build carries it at all (Google Play forbids an agent
17
+ // driving other apps through that service).
18
+ control: phoneScope.default("off"),
19
+ // Reading the folders the owner picked on the phone. Nothing else on the phone is reachable as a file.
20
+ files: phoneScope.default("on"),
21
+ // Creating, changing and trashing files in those folders.
22
+ write: phoneScope.default("off"),
23
+ // Reading the phone's notifications, which is where one-time codes and messages arrive. Off by default: it reads
24
+ // what every other app posts.
25
+ notifications: phoneScope.default("off"),
26
+ // Opening apps, links and the phone's own settings screens.
27
+ apps: phoneScope.default("on"),
28
+ // Typing text the command classifier reads as destructive, and acting in an app the person marked sensitive.
29
+ destructive: phoneScope.default("off"),
30
+ // "sensitive" (default) asks on the phone before a password, payment or delete action; "always" before every
31
+ // action; "never" trusts the owner to watch.
32
+ confirm: z.enum(["sensitive", "always", "never"]).default("sensitive"),
33
+ });
34
+ export type PhoneScopes = z.infer<typeof PhoneScopesSchema>;
35
+ // An open slug like a device's `platform` (android today), so a new phone family needs no daemon release.
36
+ export const PhoneConfigSchema = PhoneScopesSchema.extend({ platform: z.string().min(1) });
37
+ export type PhoneConfig = z.infer<typeof PhoneConfigSchema>;
38
+
39
+ // One app the person allowed the agent into, on the phone itself: `read` lets it look, `act` lets it touch too.
40
+ // The phone's own allow-list, the way a browser's site grants are the browser's: the agent asks, only the person grants.
41
+ export const PhoneAppGrantSchema = z.object({
42
+ package: z.string(),
43
+ label: z.string(),
44
+ mode: z.enum(["read", "act"]),
45
+ });
46
+ export type PhoneAppGrant = z.infer<typeof PhoneAppGrantSchema>;
47
+
48
+ // A folder the person picked on the phone, by the name the agent addresses it with.
49
+ export const PhoneFolderSchema = z.object({
50
+ name: z.string(),
51
+ writable: z.boolean(),
52
+ });
53
+ export type PhoneFolder = z.infer<typeof PhoneFolderSchema>;
54
+
55
+ // What a connected phone reports about itself. Strings where a newer app may say something new, so an older sandbox
56
+ // still reads it.
57
+ export const PhoneFactsSchema = z.object({
58
+ // How a person names it: "Google Pixel 8".
59
+ device: z.string(),
60
+ // The Android release ("16") and its API level (36).
61
+ android: z.string(),
62
+ sdk: z.number().int(),
63
+ // "direct" (downloaded from intentic.dev, can touch and type) or "play" (the store build, which cannot).
64
+ build: z.string(),
65
+ // The pause tile on the phone; true means every tool refuses and says the person paused it.
66
+ paused: z.boolean(),
67
+ // What the person has switched on in Android's own settings for this app.
68
+ access: z.object({
69
+ // The accessibility service behind touch and type, and behind screenshots taken without asking.
70
+ accessibility: z.boolean(),
71
+ // The notification listener behind reading notifications.
72
+ notifications: z.boolean(),
73
+ // How a screenshot is taken now: "accessibility" (no prompt), "consent" (the person allows each session) or
74
+ // "none" (screenshots are off on the phone).
75
+ screenCapture: z.string(),
76
+ }),
77
+ folders: z.array(PhoneFolderSchema),
78
+ apps: z.array(PhoneAppGrantSchema),
79
+ battery: z.object({ level: z.number().min(0).max(100), charging: z.boolean() }).optional(),
80
+ // The phone's Firebase Cloud Messaging token, when Google Play services are there: what the sandbox wakes it with.
81
+ // Not a credential (sending needs the app vendor's key), so it rides the facts.
82
+ wake: z.object({ fcm: z.string().min(1) }).optional(),
83
+ // Optional procedures and tool families this build answers; strings, so a newer build's never fails a read.
84
+ features: z.array(z.string()).optional(),
85
+ });
86
+ export type PhoneFacts = z.infer<typeof PhoneFactsSchema>;
87
+
88
+ // Whether the sandbox can wake this phone when it is asleep: "ready" holds a relay channel for the phone's current
89
+ // token, "register" means the phone has a token nobody registered yet (the editor does it, signed in to the platform),
90
+ // "none" means the phone has no way to be woken (no Google Play services) and only answers while its app is open or
91
+ // set to stay connected.
92
+ export const PhoneWakeStateSchema = z.enum(["ready", "register", "none"]);
93
+ export type PhoneWakeState = z.infer<typeof PhoneWakeStateSchema>;
94
+
95
+ export const PhoneSummarySchema = z.object({
96
+ // The capability id and the prefix of its tools (mcp__<id>__screenshot).
97
+ id: z.string(),
98
+ platform: z.string().min(1),
99
+ online: z.boolean(),
100
+ // Whether the sandbox holds a pairing for this phone. `online`, `lastSeen` and `facts` live in memory and are empty
101
+ // after every restart, so none of them can tell a phone that was never paired from one that has not dialled in yet.
102
+ // Absent from a daemon older than this field, which a reader takes as "cannot tell".
103
+ paired: z.boolean().optional(),
104
+ // The app's build; an old one reads as outdated rather than missing a tool.
105
+ version: z.string().optional(),
106
+ // Epoch ms of the last connection; absent after a restart rather than stale.
107
+ lastSeen: z.number().optional(),
108
+ facts: PhoneFactsSchema.optional(),
109
+ wake: PhoneWakeStateSchema,
110
+ });
111
+ export type PhoneSummary = z.infer<typeof PhoneSummarySchema>;
112
+ export const PhonesListSchema = z.object({ phones: z.array(PhoneSummarySchema) });
113
+
114
+ // The editor's half of making a phone wakeable: it registered the phone's token with the platform's push relay,
115
+ // signed in as the owner, and hands the sandbox the channel the relay answered with. `token` is the one it registered,
116
+ // so a phone that rotated its token reads "register" again instead of being woken through a dead channel.
117
+ export const PhoneWakeRegistrationSchema = z.object({
118
+ token: z.string().min(1),
119
+ channel: RelayChannelSchema,
120
+ });
121
+ export type PhoneWakeRegistration = z.infer<typeof PhoneWakeRegistrationSchema>;
@@ -21,9 +21,10 @@ export const PERSONAL_DATA_CLASSES = [
21
21
  export const PersonalDataClassSchema = z.enum(PERSONAL_DATA_CLASSES);
22
22
  export type PersonalDataClass = z.infer<typeof PersonalDataClassSchema>;
23
23
 
24
- // off: nothing is routed or read. watch: every shieldable turn goes through the gateway, which reads and records what it
25
- // would have masked and sends everything unchanged. on: untrusted providers get tokens, and a turn that cannot be
26
- // shielded (a runtime the gateway cannot sit in front of) is refused unless its provider is trusted.
24
+ // off: nothing is routed or read. watch: every shieldable turn is read on its way (the gateway, or a hooked runtime's
25
+ // channels), which records what it would have masked and sends everything unchanged. on: untrusted providers get
26
+ // tokens, and a turn that cannot be read by content at all (a runtime with no gateway and no hooks) is refused unless its
27
+ // provider is trusted.
27
28
  export const PrivacyShieldModeSchema = z.enum(["off", "watch", "on"]);
28
29
  export type PrivacyShieldMode = z.infer<typeof PrivacyShieldModeSchema>;
29
30
 
@@ -103,7 +104,7 @@ export const DEFAULT_PRIVACY_SHIELD: PrivacyShieldPolicy = PrivacyShieldPolicySc
103
104
  export const PrivacyProviderSchema = z.object({
104
105
  id: z.string().describe("Provider id, as the trusted list names it."),
105
106
  label: z.string(),
106
- shieldable: z.boolean().describe("Its runtime can be put behind the gateway; one that cannot is refused while the shield is on, unless trusted."),
107
+ shieldable: z.boolean().describe("The shield can read what its runtime sends by content (through the gateway or the runtime's hooks); one it cannot is refused while the shield is on, unless trusted."),
107
108
  local: z.boolean().describe("It runs on this machine, so it is trusted whatever the list says."),
108
109
  });
109
110
  export type PrivacyProvider = z.infer<typeof PrivacyProviderSchema>;
@@ -120,10 +121,28 @@ export const PrivacyShieldStatusSchema = z.object({
120
121
  });
121
122
  export type PrivacyShieldStatus = z.infer<typeof PrivacyShieldStatusSchema>;
122
123
 
123
- // One request the gateway handled, as the log keeps it: counts and kinds, never a value.
124
+ // One request the gateway handled, as the log keeps it: counts and kinds, the tokens it gave and the masked text around
125
+ // them, never a value.
124
126
  export const PrivacyLedgerActionSchema = z.enum(["masked", "watched", "passed", "refused"]);
125
127
  export type PrivacyLedgerAction = z.infer<typeof PrivacyLedgerActionSchema>;
126
128
 
129
+ // The most replacements one entry keeps, and how much masked text it keeps on each side of a token: enough to see what a
130
+ // value became and how the provider read it, not a second transcript.
131
+ export const PRIVACY_REPLACEMENTS_MAX = 12;
132
+ export const PRIVACY_EXCERPT_REACH = 48;
133
+
134
+ // One value the shield replaced in what a request added, as its token: the value itself stays in the vault, off the
135
+ // workspace, and only the owner can have it read back (privacy.reveal).
136
+ export const PrivacyReplacementSchema = z.object({
137
+ token: z.string().describe("The token the value became, as the provider read it: Alice."),
138
+ class: PersonalDataClassSchema,
139
+ excerpt: z
140
+ .string()
141
+ .describe("The masked text around the token as it left this machine (watching: as it would have). Tokens only, never a value."),
142
+ image: z.boolean().optional().describe("Found in an image's text, so the token was painted over the picture rather than written."),
143
+ });
144
+ export type PrivacyReplacement = z.infer<typeof PrivacyReplacementSchema>;
145
+
127
146
  export const PrivacyLedgerEntrySchema = z.object({
128
147
  at: z.string().describe("When, as an ISO timestamp."),
129
148
  conversationId: z.string().optional(),
@@ -135,9 +154,19 @@ export const PrivacyLedgerEntrySchema = z.object({
135
154
  documents: z.number().int().describe("Documents replaced by their masked text."),
136
155
  protocol: z.string().describe("Which wire format the request spoke."),
137
156
  detail: z.string().optional().describe("Why it was refused, when it was."),
157
+ replacements: z
158
+ .array(PrivacyReplacementSchema)
159
+ .max(PRIVACY_REPLACEMENTS_MAX)
160
+ .optional()
161
+ .describe("The first values replaced in what this request added, one per token. Absent on entries written before it was kept."),
138
162
  });
139
163
  export type PrivacyLedgerEntry = z.infer<typeof PrivacyLedgerEntrySchema>;
140
164
 
165
+ // Tokens read back to their values, for the owner checking what the shield masked; a token this vault never gave out is
166
+ // left out of the answer.
167
+ export const PRIVACY_REVEAL_MAX = 100;
168
+ export const PrivacyRevealSchema = z.object({ tokens: z.array(z.string().min(1).max(64)).max(PRIVACY_REVEAL_MAX) });
169
+
141
170
  // A dataset taught to the shield: each value is matched exactly from then on, in every form it is written.
142
171
  export const PRIVACY_KNOWN_BATCH_MAX = 50_000;
143
172
 
@@ -159,7 +188,7 @@ export type PrivacyKnownSource = z.infer<typeof PrivacyKnownSourceSchema>;
159
188
  export const PrivacyNameListSchema = z.object({
160
189
  id: z.string().describe("Stable id of the list."),
161
190
  kind: z.enum(["first-name", "surname", "ambiguous", "title", "never"]).describe("What a word on it says about a name."),
162
- languages: z.array(z.enum(["pl", "en"])).describe("The languages its words come from."),
191
+ languages: z.array(z.enum(["pl", "en", "multi"])).describe("The languages its words come from; multi: many languages at once."),
163
192
  count: z.number().int().describe("How many words it holds."),
164
193
  matching: z
165
194
  .enum(["inflected", "as-written"])
@@ -176,7 +205,7 @@ export const PrivacyNameWordSchema = z.object({
176
205
  firstName: z.boolean().describe("A listed first name, in this form or as an inflection of one."),
177
206
  surname: z.boolean().describe("A listed surname, in this form or as an inflection of one."),
178
207
  surnameForm: z.boolean().describe("Shaped like a Polish surname (-ski, -cki, -wicz…), listed or not."),
179
- ambiguous: z.boolean().describe("Also an ordinary word, so found only beside other evidence (a surname, a title)."),
208
+ ambiguous: z.boolean().describe("Also an ordinary word in some language, so found only beside other evidence (a title, a name field) and no surname to pair a first name with."),
180
209
  never: z.boolean().describe("Never taken as part of a name (a title, an institution, a function word)."),
181
210
  });
182
211
  export type PrivacyNameWord = z.infer<typeof PrivacyNameWordSchema>;
@@ -0,0 +1,78 @@
1
+ import { z } from "zod";
2
+
3
+ // LANDED WORK DELIVERED TO THE OWNER'S FOLDER. A folder attached to this computer's own sandbox is copied one way into
4
+ // `/work/<name>`; when a conversation's work lands there, the daemon hands the same change to the machine agent that
5
+ // holds the folder, which applies it file by file under a restore point and never over an edit of the owner's own.
6
+ // The daemon asks (`deliverProject` on the device contract), the machine decides and writes; nothing an agent runs can
7
+ // call it, since it is a procedure of the device link and not one of its tools.
8
+
9
+ // One changed file, as the land changed it: `base` is the content the conversation started from, `next` what it
10
+ // landed. Both base64, null where the file did not exist (an addition has no base, a deletion no next). A rename
11
+ // arrives as a deletion and an addition.
12
+ export const DeliveredFileSchema = z.strictObject({
13
+ path: z.string().min(1).describe("Folder-relative, `/`-separated, never `.`, `..`, a drive or a backslash."),
14
+ kind: z.enum(["added", "modified", "deleted"]),
15
+ base: z.string().nullable(),
16
+ next: z.string().nullable(),
17
+ // Set only when the landed file is executable; the owner's folder keeps its own bit otherwise.
18
+ executable: z.boolean().optional(),
19
+ });
20
+ export type DeliveredFile = z.infer<typeof DeliveredFileSchema>;
21
+
22
+ // The whole of what a delivery may carry in one call, decoded; past it the daemon delivers nothing and says so, and the
23
+ // window's Bring back still reaches every file.
24
+ export const PROJECT_DELIVERY_MAX_BYTES = 32 * 1024 * 1024;
25
+
26
+ export const ProjectDeliverySchema = z.strictObject({
27
+ // The sandbox folder the change landed in, exactly `/work/<name>`; the machine finds the folder paired with it.
28
+ remoteDir: z.string().min(1),
29
+ files: z.array(DeliveredFileSchema),
30
+ // Which land this is, for the restore point's record and the machine's audit line.
31
+ landing: z.strictObject({ agentId: z.string().min(1), title: z.string().optional() }),
32
+ });
33
+ export type ProjectDelivery = z.infer<typeof ProjectDeliverySchema>;
34
+
35
+ // Why a file was left as the owner's folder holds it. `edited`: the owner changed it too and the two would not merge
36
+ // cleanly (or it is not text). `link`: a link or a non-file stands on its path. `outside`: the path would leave the
37
+ // folder. `missing-git`: the change needed a three-way merge and this machine has no git to make one.
38
+ export const DeliveryConflictReasonSchema = z.enum(["edited", "link", "outside", "missing-git"]);
39
+ export type DeliveryConflictReason = z.infer<typeof DeliveryConflictReasonSchema>;
40
+
41
+ export const ProjectDeliveryResultSchema = z.object({
42
+ // The restore point taken before the first write (`intentic-machine sync restore --point <id>` undoes it); absent
43
+ // when nothing was written.
44
+ point: z.string().optional(),
45
+ // The folder on the machine, as the owner knows it.
46
+ folder: z.string(),
47
+ // Written as landed.
48
+ applied: z.array(z.string()),
49
+ // Written as a merge of the owner's edit and the landed change; `content` (base64) is what the folder now holds, so
50
+ // the sandbox's copy can be brought to the same bytes.
51
+ merged: z.array(z.object({ path: z.string(), content: z.string() })),
52
+ // Already as landed in the folder; nothing written.
53
+ already: z.array(z.string()),
54
+ conflicts: z.array(z.object({ path: z.string(), reason: DeliveryConflictReasonSchema })),
55
+ });
56
+ export type ProjectDeliveryResult = z.infer<typeof ProjectDeliveryResultSchema>;
57
+
58
+ // What became of a land's delivery, kept on the conversation's landing record and shown on its card.
59
+ // - delivered: every file is in the folder as landed (or merged with the owner's edit).
60
+ // - partial: some were kept out, named in `conflicts`; the rest were written.
61
+ // - waiting: the computer holding the folder is not connected; it is delivered when it next is.
62
+ // - failed: the machine refused or broke; `reason` says why. Bring back still reaches the files.
63
+ // - too-large: past PROJECT_DELIVERY_MAX_BYTES; Bring back reaches the files.
64
+ export const LandingDeliveryStateSchema = z.enum(["delivered", "partial", "waiting", "failed", "too-large"]);
65
+ export type LandingDeliveryState = z.infer<typeof LandingDeliveryStateSchema>;
66
+
67
+ export const LandingDeliverySchema = z.object({
68
+ state: LandingDeliveryStateSchema,
69
+ at: z.number().describe("When this state was reached, in milliseconds."),
70
+ // Which project folder of the workspace the land was delivered from (`my-app` for /work/my-app).
71
+ project: z.string(),
72
+ folder: z.string().optional().describe("The folder on the owner's computer, as its machine reported it."),
73
+ applied: z.number().int().nonnegative().describe("Files written, merged ones included."),
74
+ conflicts: z.array(z.object({ path: z.string(), reason: DeliveryConflictReasonSchema })),
75
+ point: z.string().optional().describe("The machine's restore point taken before writing."),
76
+ reason: z.string().optional().describe("Why it failed or waits, in a sentence."),
77
+ });
78
+ export type LandingDelivery = z.infer<typeof LandingDeliverySchema>;
@@ -1,5 +1,5 @@
1
1
  import { z } from "zod";
2
- import { ChildRunSchema } from "../../events/requests.js";
2
+ import { ChildRunSchema, PAGE_VALUE_MAX } from "../../events/requests.js";
3
3
  import { TRANSLATOR_PROVIDERS, type TranslatorProvider } from "../../models/provider-specs.js";
4
4
  import { AgentHarnessSchema, AgentProviderSchema, ConversationIdSchema, EditorContextSchema } from "../agent.js";
5
5
  import { MENTION_LIMIT } from "../../text/mentions.js";
@@ -271,6 +271,20 @@ export const AgentReplySchema = z.discriminatedUnion("kind", [
271
271
  .boolean()
272
272
  .describe("Yes releases exactly one payment. Anything else spends nothing. This click is the only way the money can move."),
273
273
  }),
274
+ // What a page the agent asked on sent back, as JSON text: the page's own answer, handed to the agent as it came.
275
+ z.object({
276
+ kind: z.literal("page_ask").describe("Answering a page the agent showed to be answered on."),
277
+ requestId: z.string().min(1).describe("Which card you are answering."),
278
+ value: z
279
+ .string()
280
+ .max(PAGE_VALUE_MAX)
281
+ .optional()
282
+ .describe("What the page sent back, as JSON text. Absent with a dismissal."),
283
+ cancelled: z
284
+ .boolean()
285
+ .optional()
286
+ .describe("Dismissing it instead, which tells the agent to carry on without an answer rather than leaving it waiting."),
287
+ }),
274
288
  // The one reply whose sender is checked: the daemon verifies identity against the card's named list and refuses
275
289
  // anyone else, including a `no` — otherwise a stranger could deny-of-service the approver.
276
290
  z.object({
@@ -410,10 +424,16 @@ export const QueueResumeSchema = z.object({
410
424
  routing: ResumeRoutingSchema.optional().describe(
411
425
  "Who serves the turn the waiting messages start, when the conversation has been re-pointed since they were queued: the usual answer to a refusal that held them. Leave it out to send them as they were queued.",
412
426
  ),
427
+ ids: z
428
+ .array(z.string().min(1))
429
+ .optional()
430
+ .describe(
431
+ "Which waiting messages to let go: a booked message named here goes now, and any held message goes with it. Leave it out to let every waiting message go, booked or held.",
432
+ ),
413
433
  });
414
434
  export type QueueResume = z.infer<typeof QueueResumeSchema>;
415
- // Re-times what a conversation's queue holds: the same messages, booked for another instant or for after another
416
- // conversation's work lands. One of the two, never both, since a hold waits on exactly one thing.
435
+ // Re-times what a conversation's queue holds: the same messages (or only those `ids` names), booked for another instant
436
+ // or for after another conversation's work lands. One of the two, never both, since a booking waits on exactly one thing.
417
437
  export const QueueScheduleSchema = z
418
438
  .object({
419
439
  conversationId: z.string().min(1).describe("Whose queue."),
@@ -426,6 +446,10 @@ export const QueueScheduleSchema = z
426
446
  sendAfter: ConversationIdSchema.optional().describe(
427
447
  "Send what waits once that conversation has finished and all of its work has landed in the workspace, instead. Sent now when it has nothing running and nothing left to land.",
428
448
  ),
449
+ ids: z
450
+ .array(z.string().min(1))
451
+ .optional()
452
+ .describe("Which waiting messages to re-time; every other keeps its own booking. Leave it out to re-time every waiting message."),
429
453
  })
430
454
  .refine((input) => (input.sendAt === undefined) !== (input.sendAfter === undefined), {
431
455
  message: "name exactly one of sendAt and sendAfter",
@@ -71,15 +71,15 @@ export const UsageTurnSchema = z.object({
71
71
  // Arm of the project-map experiment, stable per conversation; mapChars is the note's length when sent.
72
72
  mapArm: z.boolean().optional(),
73
73
  mapChars: z.number().optional(),
74
+ // Which comparison `mapArm` belongs to: absent on the map-or-none rows, "compact-vs-full" since 2026-10-06, when
75
+ // the arm became the compact map and the holdout the full one.
76
+ mapCohort: z.string().optional(),
74
77
  // Arm of the field-notes experiment, stable per conversation; notesChars is what the budget let through.
75
78
  notesArm: z.boolean().optional(),
76
79
  notesChars: z.number().optional(),
77
80
  // Hash of the brief that was sent, recorded on control turns too. Load-bearing rather than decorative: the file is
78
81
  // rewritten monthly, so a 30-day window holds two different treatments and pooling them would measure neither.
79
82
  notesCohort: z.string().optional(),
80
- // Arm of the lean-guidance experiment, stable per conversation; true is the short form. The cohort hashes both forms.
81
- guidanceArm: z.boolean().optional(),
82
- guidanceCohort: z.string().optional(),
83
83
  // Arm of the tool-result clearing experiment, stable per conversation; true is a conversation whose old tool results
84
84
  // the gateway drops. Native Claude turns only: no other runtime's requests pass a gateway that clears.
85
85
  clearingArm: z.boolean().optional(),
@@ -69,6 +69,7 @@ export const PushConfigSchema = z.object({
69
69
  "Whether the asking device is already registered, so a toggle can show its real state instead of trusting the device's own permission, which can be granted with nothing behind it.",
70
70
  ),
71
71
  });
72
+ export type PushConfig = z.infer<typeof PushConfigSchema>;
72
73
  export const PushChannelIdSchema = z.object({
73
74
  id: z.string().min(1).describe("Which device: a browser's push address, or a native install's device id."),
74
75
  });
@@ -1,4 +1,5 @@
1
1
  // secrets: user-supplied env-var secrets the daemon writes to desired-state/.env
2
+ import { BrokerRuleSchema } from "@intentic/extension-manifest";
2
3
  import { z } from "zod";
3
4
  import { SECRET_HOST_MAX, SECRET_HOST_PATTERN_RE, SECRET_HOSTS_MAX } from "../policy/secret-hosts.js";
4
5
  // Straight to the sandbox daemon, never through the platform; `apply` reloads .env with no restart. `list` returns keys
@@ -60,8 +61,10 @@ export const CredentialGateKindSchema = z
60
61
  export type CredentialGateKind = z.infer<typeof CredentialGateKindSchema>;
61
62
 
62
63
  export const CredentialLaneSchema = z
63
- .enum(["shell", "code", "browser", "session", "otp"])
64
- .describe("What the credential was about to be used for: a shell command, a script, typing into a page, mounting a connected account, or one one-time code.");
64
+ .enum(["shell", "code", "browser", "session", "otp", "gateway", "ssh"])
65
+ .describe(
66
+ "What the credential was about to be used for: a shell command, a script, typing into a page, mounting a connected account, one one-time code, a request the credential gateway attaches it to, or a signature the sandbox's ssh agent makes with a held key.",
67
+ );
65
68
  export type CredentialLane = z.infer<typeof CredentialLaneSchema>;
66
69
 
67
70
  export const CredentialGateSchema = z.object({
@@ -167,6 +170,44 @@ export const SecretHostGuardSetResultSchema = z.object({
167
170
 
168
171
  // Across every store: env/generated secrets, capability credentials, AI-provider accounts. Values never ride this
169
172
  // shape; `revealable` says whether `reveal` can return one (everything but provider accounts).
173
+ // How the agent gets one connection's credential, and what it may do with it there. `gateway` is the default for every
174
+ // connector that declares gateway routes: the credential never enters the agent's shell, and the rules below are
175
+ // enforced where it is attached. `raw` is the owner's explicit choice for a tool that needs the real value; `direct` is a
176
+ // connector with no gateway route at all (a database's wire protocol, a mail server, a request signature) or an SSH
177
+ // machine signed into with a password; `ssh-agent` is an SSH machine's key, which the sandbox's ssh agent signs with.
178
+ export const CredentialDeliveryModeSchema = z
179
+ .enum(["gateway", "raw", "direct", "ssh-agent"])
180
+ .describe(
181
+ "How the agent gets this connection's credential: `gateway` keeps it in the sandbox's credential gateway, which attaches it to each request the agent sends and checks the rules first; `raw` hands it to the agent because the owner chose that for a tool needing the real value; `direct` hands it over because nothing can use it on the agent's behalf (a database, a mail server, an SSH password); `ssh-agent` keeps an SSH key in the sandbox's ssh agent, which signs for the agent's ssh and never hands the key over.",
182
+ );
183
+ export type CredentialDeliveryMode = z.infer<typeof CredentialDeliveryModeSchema>;
184
+
185
+ export const CredentialPolicySchema = z.object({
186
+ subject: z.string().describe("The connection's id."),
187
+ delivery: CredentialDeliveryModeSchema,
188
+ rules: z
189
+ .array(BrokerRuleSchema)
190
+ .describe("What the credential may do through the gateway, checked in order, the first covering rule deciding; a request none covers is allowed."),
191
+ rulesFrom: z
192
+ .enum(["connector", "owner"])
193
+ .describe("Whose rules these are: the connector's own defaults, or the owner's, which replace them whole."),
194
+ });
195
+ export type CredentialPolicy = z.infer<typeof CredentialPolicySchema>;
196
+
197
+ export const CredentialPolicySetSchema = z.object({
198
+ subject: z.string().describe("The connection's id."),
199
+ delivery: z
200
+ .enum(["gateway", "raw"])
201
+ .optional()
202
+ .describe("Hand the agent the credential itself (`raw`), or keep it in the gateway (`gateway`). Leave it out to keep what is set."),
203
+ rules: z
204
+ .array(BrokerRuleSchema)
205
+ .nullable()
206
+ .optional()
207
+ .describe("The owner's own rules, replacing the connector's whole; `null` goes back to the connector's. Leave it out to keep what is set."),
208
+ });
209
+ export type CredentialPolicySet = z.infer<typeof CredentialPolicySetSchema>;
210
+
170
211
  export const SecretInventoryEntrySchema = z.object({
171
212
  // Env-var key for env|generated; `<provider>:<accountId>` for provider; capability instance id otherwise.
172
213
  key: z.string().describe("What identifies it. Unique across the whole inventory, so several accounts of one provider each get their own entry."),
@@ -195,7 +236,11 @@ export const SecretInventoryEntrySchema = z.object({
195
236
  lastUse: z
196
237
  .object({
197
238
  at: z.number().describe("When, in milliseconds."),
198
- lane: z.enum(["shell", "code", "browser"]).describe("How it was used: a command, a script, or typed into a page."),
239
+ lane: z
240
+ .enum(["shell", "code", "browser", "gateway", "ssh"])
241
+ .describe(
242
+ "How it was used: a command, a script, typed into a page, attached by the credential gateway to a request the agent sent, or a key the sandbox's ssh agent signed with for the agent.",
243
+ ),
199
244
  detail: z
200
245
  .string()
201
246
  .optional()
@@ -204,6 +249,12 @@ export const SecretInventoryEntrySchema = z.object({
204
249
  })
205
250
  .optional()
206
251
  .describe("The last time an agent actually spent this secret. Absent while it never has been, which most never are."),
252
+ // Joined from the credential gateway's policy, on a connection's row only.
253
+ credential: CredentialPolicySchema.omit({ subject: true })
254
+ .optional()
255
+ .describe(
256
+ "How the agent gets this connection's credential and what it may do with it. Absent on everything but a connected command-line tool or SSH machine.",
257
+ ),
207
258
  // Joined from the gate policy, so the row can name the approver without a second call.
208
259
  gate: z
209
260
  .object({
@@ -110,4 +110,6 @@ export const SETTINGS_HISTORY = [
110
110
  at("offload", drop("landCheck")),
111
111
  // The model list for the fix a refused push offered (2026-09-28): a refused push now says why and offers nothing.
112
112
  at("modelRoles", drop("pre-push-fix")),
113
+ // The short guidance form (2026-10-06): it lost its A/B to the full one, which every turn now gets.
114
+ ...dropAll(["leanGuidance", "leanGuidanceHoldout"]),
113
115
  ] as const;
@@ -9,6 +9,11 @@ import { LimitPolicySchema, RetryPolicySchema } from "./turn-break.js";
9
9
  import { ZoneSchema } from "../time/zone.js";
10
10
  // Which prompt base the agent runs before this turn composes anything on top: Intentic's own (default), Claude Code's
11
11
  // preset, or the owner's text. Declared out here since both the daemon and the browser branch on it.
12
+ // Kept in the daemon's auth root, never in SandboxSettings: an agent cannot edit its execution boundary.
13
+ export const AgentDomainSchema = z.enum(["root", "unprivileged"]);
14
+ export const AgentDomainPolicySchema = z.object({ agentDomain: AgentDomainSchema.default("root") });
15
+ export type AgentDomainPolicy = z.infer<typeof AgentDomainPolicySchema>;
16
+
12
17
  export const SystemPromptModeSchema = z.enum(["intentic", "claude", "custom"]);
13
18
  export type SystemPromptMode = z.infer<typeof SystemPromptModeSchema>;
14
19
  // Excludes "custom": there is nothing to fetch, it's whatever the owner already typed into the settings field.
@@ -280,6 +285,14 @@ export const SandboxSettingsSchema = z.object({
280
285
  .describe(
281
286
  "Whether a new chat is matched to one of your personas from its first message. It is read once the message is sent, in the same single call that chooses what the chat runs on (the New chat routing job under Models), and the chat says in its own transcript which persona it landed on. Never applies to unwatched runs, which name their persona themselves.",
282
287
  ),
288
+ // The `show_page`/`ask_page` tools and the guidance that names them (agent/pages/page-tools.ts); off, a turn is
289
+ // offered neither and draws no page, which costs it nothing.
290
+ chatPages: z
291
+ .boolean()
292
+ .default(true)
293
+ .describe(
294
+ "Let the agent answer with a page drawn right in the chat: a chart, a table, a diagram, a mock-up, or a small form you answer it on. Off, the agent is not offered the tools at all, so it spends nothing on them.",
295
+ ),
283
296
  hashlineEdits: z
284
297
  .boolean()
285
298
  .default(false)
@@ -303,21 +316,6 @@ export const SandboxSettingsSchema = z.object({
303
316
  .describe(
304
317
  "Your own instructions, used only when the mode above says custom. Then it is the whole of them: both built-in bases go, and so does everything this product would otherwise add, including the guidance the chat's own cards are driven by. That is the price of total control.",
305
318
  ),
306
- // Measured by the `guidance` experiment against the full set; the full set stays the default until that says otherwise.
307
- leanGuidance: z
308
- .boolean()
309
- .default(false)
310
- .describe(
311
- "Send this product's own guidance in its short form: only what the agent cannot find out by looking, instead of a paragraph for every habit it was once caught in. Off by default, because the long form is the one the product was tuned on.",
312
- ),
313
- leanGuidanceHoldout: z
314
- .number()
315
- .min(0)
316
- .max(1)
317
- .default(0)
318
- .describe(
319
- "What share of conversations to keep on the long form, so the two can be compared. Whole conversations rather than individual turns, because the guidance sits in the prompt for the whole session.",
320
- ),
321
319
  // Measured by the `clearing` experiment: the gateway in front of a native Claude turn replaces old tool results with
322
320
  // a placeholder, a chunk at a time, so the cached prompt breaks once per chunk rather than on every call
323
321
  // (privacy/gateway/tool-result-clearing.ts). Off by default until that experiment says it pays.
@@ -353,17 +351,18 @@ export const SandboxSettingsSchema = z.object({
353
351
  .boolean()
354
352
  .default(false)
355
353
  .describe(
356
- "Open every conversation with a map of the project it starts in: what is in it, what each part is for, and where the agent is standing. Worked out fresh each time rather than written down anywhere, because a written layout is wrong within a fortnight. Off by default, since it spends tokens on the first message of every conversation.",
354
+ "Open every conversation with a map of the project it starts in: the parts recent work touched and what each is for, the rest by name, where the agent is standing, and which folders the last three weeks of commits landed in. Worked out fresh each time from the tree and its history rather than written down anywhere, because a written layout is wrong within a fortnight. Off by default, since it spends tokens on the first message of every conversation.",
357
355
  ),
358
356
  // Judged on the opening turn's own directory listings, not averaged across the conversation, or a twelve-turn
359
- // conversation would divide the effect by twelve.
357
+ // conversation would divide the effect by twelve. Since 2026-10-06 the held-out share gets the full map (every area
358
+ // with its size) rather than none: the map-or-none comparison had settled its one effect, fewer opening listings.
360
359
  workspaceMapHoldout: z
361
360
  .number()
362
361
  .min(0)
363
362
  .max(1)
364
363
  .default(0)
365
364
  .describe(
366
- "What share of conversations to open without the map, so the two can be compared. Whole conversations rather than individual turns, because the map is sent once and stays in the conversation's history afterwards.",
365
+ "What share of conversations to open with the full map instead, every area with its size, so the two forms can be compared. Whole conversations rather than individual turns, because the map is sent once and stays in the conversation's history afterwards.",
367
366
  ),
368
367
  // The one composed piece that is WRITTEN rather than derived: a monthly automation rewrites it off the session
369
368
  // corpus, so it carries what no scan of the tree can (which commands really work here, what the box can take, how
@@ -486,9 +485,9 @@ export const SandboxSettingsSchema = z.object({
486
485
  "Whether each workspace repo keeps up with the remote branch it tracks. Every couple of minutes it is fetched, and what arrived is brought into the main tree: a fast-forward when you have no commits of your own, else a merge commit. Only while it is quiet (no turn working in the main tree, no merge or rebase of yours open), and never half-way: a conflict, or an uncommitted file in the way, leaves the repo exactly as it was until the next try. Nothing is ever pushed. Off, nothing is fetched.",
487
486
  ),
488
487
  // Where heavy work runs: a runner (the same image, on one of the owner's machines) instead of this sandbox. Keyed by
489
- // the heavy-command rule an agent's command matched (system/resources/heavy-commands.ts), each naming a runner id. A
488
+ // the heavy-command rule an agent's command matched (workload/heavy-commands.ts), each naming a runner id. A
490
489
  // runner that is offline, outdated or full hands the work back here, which the command's output says. Never pushed
491
- // to a runner itself (portability/definition.ts), which must not pass work on again.
490
+ // to a runner itself (definition/definition.ts), which must not pass work on again.
492
491
  offload: z
493
492
  .object({
494
493
  commands: z.record(z.string().min(1), z.string().min(1)).default({}),
@@ -654,7 +653,7 @@ export const SavingsArmSchema = z.object({ turns: z.number(), mean: z.number() }
654
653
  // openingListings: directory listings a turn ran to orient itself (the project map).
655
654
  // callsBeforeTarget: how far a turn walked before touching a file it went on to edit.
656
655
  // failedCalls: tool calls that ended in error (the field notes, whose largest section is a failure taxonomy).
657
- // roundTrips: model calls a turn took (the guidance form, whose batching and context-reuse paragraphs exist to save them).
656
+ // roundTrips: model calls a turn took (tool-result clearing, whose lost results could cost re-runs).
658
657
  // contextPerCall: prompt tokens per model call, cached or not (tool-result clearing, which exists to shrink it).
659
658
  // Never cost: each mechanism moves one small part of a turn's work, inside the noise of the rest. Round trips are the
660
659
  // nearest a reading comes to it, and still a count of calls, not of tokens or money; the prompt a call carries is the
@@ -723,7 +722,6 @@ export const SavingsReportSchema = z.object({
723
722
  // Same absence rule as `search`: not measured, never zero.
724
723
  map: TurnExperimentSchema.optional(),
725
724
  notes: TurnExperimentSchema.optional(),
726
- guidance: TurnExperimentSchema.optional(),
727
725
  clearing: TurnExperimentSchema.optional(),
728
726
  });
729
727
  export type SavingsReport = z.infer<typeof SavingsReportSchema>;