@intentic/sandbox-contract 1.431.0 → 1.432.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 (362) hide show
  1. package/README.md +10 -3
  2. package/dist/briefs/agent-ask.d.ts +10 -0
  3. package/dist/briefs/agent-ask.d.ts.map +1 -0
  4. package/dist/briefs/agent-ask.js +2 -0
  5. package/dist/briefs/agent-ask.js.map +1 -0
  6. package/dist/{chores/extension-update.d.ts → briefs/extension-update-brief.d.ts} +1 -1
  7. package/dist/briefs/extension-update-brief.d.ts.map +1 -0
  8. package/dist/{chores/extension-update.js → briefs/extension-update-brief.js} +2 -2
  9. package/dist/briefs/extension-update-brief.js.map +1 -0
  10. package/dist/chores/digest.d.ts.map +1 -1
  11. package/dist/chores/digest.js.map +1 -1
  12. package/dist/chores/index.d.ts +2 -2
  13. package/dist/chores/index.d.ts.map +1 -1
  14. package/dist/chores/index.js +1 -1
  15. package/dist/chores/index.js.map +1 -1
  16. package/dist/chores/prompt.d.ts +1 -9
  17. package/dist/chores/prompt.d.ts.map +1 -1
  18. package/dist/chores/prompt.js +1 -1
  19. package/dist/chores/prompt.js.map +1 -1
  20. package/dist/chores/stack.d.ts.map +1 -1
  21. package/dist/chores/stack.js.map +1 -1
  22. package/dist/chores/verdict.d.ts.map +1 -1
  23. package/dist/chores/verdict.js.map +1 -1
  24. package/dist/chores/workspace-scope.d.ts +1 -3
  25. package/dist/chores/workspace-scope.d.ts.map +1 -1
  26. package/dist/chores/workspace-scope.js +1 -3
  27. package/dist/chores/workspace-scope.js.map +1 -1
  28. package/dist/contracts/agent.contract.d.ts +869 -12
  29. package/dist/contracts/agent.contract.d.ts.map +1 -1
  30. package/dist/contracts/agents.contract.d.ts +291 -4
  31. package/dist/contracts/agents.contract.d.ts.map +1 -1
  32. package/dist/contracts/automations.contract.d.ts +59 -8
  33. package/dist/contracts/automations.contract.d.ts.map +1 -1
  34. package/dist/contracts/capabilities.contract.d.ts +37 -0
  35. package/dist/contracts/capabilities.contract.d.ts.map +1 -1
  36. package/dist/contracts/capabilities.contract.js +21 -0
  37. package/dist/contracts/capabilities.contract.js.map +1 -1
  38. package/dist/contracts/ci.contract.d.ts +222 -95
  39. package/dist/contracts/ci.contract.d.ts.map +1 -1
  40. package/dist/contracts/ci.contract.js +87 -26
  41. package/dist/contracts/ci.contract.js.map +1 -1
  42. package/dist/contracts/device-stacks.contract.d.ts +129 -0
  43. package/dist/contracts/device-stacks.contract.d.ts.map +1 -0
  44. package/dist/contracts/device-stacks.contract.js +66 -0
  45. package/dist/contracts/device-stacks.contract.js.map +1 -0
  46. package/dist/contracts/device.contract.d.ts +47 -0
  47. package/dist/contracts/device.contract.d.ts.map +1 -1
  48. package/dist/contracts/extensions.contract.d.ts +603 -0
  49. package/dist/contracts/extensions.contract.d.ts.map +1 -1
  50. package/dist/contracts/extensions.contract.js +10 -1
  51. package/dist/contracts/extensions.contract.js.map +1 -1
  52. package/dist/contracts/needs.contract.d.ts +689 -18
  53. package/dist/contracts/needs.contract.d.ts.map +1 -1
  54. package/dist/contracts/offload.contract.d.ts +21 -0
  55. package/dist/contracts/offload.contract.d.ts.map +1 -1
  56. package/dist/contracts/runner.contract.d.ts +501 -8
  57. package/dist/contracts/runner.contract.d.ts.map +1 -1
  58. package/dist/contracts/seal.contract.d.ts +15 -0
  59. package/dist/contracts/seal.contract.d.ts.map +1 -1
  60. package/dist/contracts/secrets.contract.d.ts +15 -0
  61. package/dist/contracts/secrets.contract.d.ts.map +1 -1
  62. package/dist/contracts/secrets.contract.js +21 -1
  63. package/dist/contracts/secrets.contract.js.map +1 -1
  64. package/dist/contracts/sessions.contract.d.ts +111 -2
  65. package/dist/contracts/sessions.contract.d.ts.map +1 -1
  66. package/dist/contracts/settings.contract.d.ts +57 -42
  67. package/dist/contracts/settings.contract.d.ts.map +1 -1
  68. package/dist/contracts/settings.contract.js +18 -0
  69. package/dist/contracts/settings.contract.js.map +1 -1
  70. package/dist/contracts/stack-grants.contract.d.ts +418 -0
  71. package/dist/contracts/stack-grants.contract.d.ts.map +1 -0
  72. package/dist/contracts/stack-grants.contract.js +46 -0
  73. package/dist/contracts/stack-grants.contract.js.map +1 -0
  74. package/dist/contracts/system.contract.d.ts +188 -69
  75. package/dist/contracts/system.contract.d.ts.map +1 -1
  76. package/dist/contracts/system.contract.js +12 -42
  77. package/dist/contracts/system.contract.js.map +1 -1
  78. package/dist/contracts/workspace.contract.d.ts +0 -55
  79. package/dist/contracts/workspace.contract.d.ts.map +1 -1
  80. package/dist/contracts/workspace.contract.js +0 -19
  81. package/dist/contracts/workspace.contract.js.map +1 -1
  82. package/dist/events/agent-events.d.ts +421 -8
  83. package/dist/events/agent-events.d.ts.map +1 -1
  84. package/dist/events/agent-transcript.d.ts +111 -2
  85. package/dist/events/agent-transcript.d.ts.map +1 -1
  86. package/dist/events/agent-words.d.ts.map +1 -1
  87. package/dist/events/agent-words.js +2 -1
  88. package/dist/events/agent-words.js.map +1 -1
  89. package/dist/events/child-news.d.ts +32 -0
  90. package/dist/events/child-news.d.ts.map +1 -0
  91. package/dist/events/child-news.js +171 -0
  92. package/dist/events/child-news.js.map +1 -0
  93. package/dist/events/prompt-origins.d.ts +42 -0
  94. package/dist/events/prompt-origins.d.ts.map +1 -1
  95. package/dist/events/prompt-origins.js +28 -0
  96. package/dist/events/prompt-origins.js.map +1 -1
  97. package/dist/events/requests.d.ts +14 -0
  98. package/dist/events/requests.d.ts.map +1 -1
  99. package/dist/events/requests.js +12 -0
  100. package/dist/events/requests.js.map +1 -1
  101. package/dist/events/system-events.d.ts +12 -0
  102. package/dist/events/system-events.d.ts.map +1 -1
  103. package/dist/events/transcript.d.ts +559 -10
  104. package/dist/events/transcript.d.ts.map +1 -1
  105. package/dist/events/transcript.js +2 -1
  106. package/dist/events/transcript.js.map +1 -1
  107. package/dist/index.d.ts +2 -4
  108. package/dist/index.d.ts.map +1 -1
  109. package/dist/index.js +2 -4
  110. package/dist/index.js.map +1 -1
  111. package/dist/models/model-roles.d.ts +91 -37
  112. package/dist/models/model-roles.d.ts.map +1 -1
  113. package/dist/models/model-roles.js +106 -35
  114. package/dist/models/model-roles.js.map +1 -1
  115. package/dist/models/model-setups.d.ts +10 -8
  116. package/dist/models/model-setups.d.ts.map +1 -1
  117. package/dist/models/model-setups.js +15 -15
  118. package/dist/models/model-setups.js.map +1 -1
  119. package/dist/policy/approvals-execution.d.ts +5 -2
  120. package/dist/policy/approvals-execution.d.ts.map +1 -1
  121. package/dist/policy/approvals-execution.js +3 -4
  122. package/dist/policy/approvals-execution.js.map +1 -1
  123. package/dist/policy/batch-runs.d.ts +1 -1
  124. package/dist/policy/batch-runs.d.ts.map +1 -1
  125. package/dist/policy/batch-runs.js +2 -1
  126. package/dist/policy/batch-runs.js.map +1 -1
  127. package/dist/policy/message-limits.d.ts.map +1 -1
  128. package/dist/policy/message-limits.js.map +1 -1
  129. package/dist/policy/org-locks.d.ts +1 -1
  130. package/dist/policy/org-locks.d.ts.map +1 -1
  131. package/dist/policy/org-locks.js +1 -0
  132. package/dist/policy/org-locks.js.map +1 -1
  133. package/dist/policy/shell/workspace-root-exclude.d.ts +4 -0
  134. package/dist/policy/shell/workspace-root-exclude.d.ts.map +1 -0
  135. package/dist/policy/shell/workspace-root-exclude.js +4 -0
  136. package/dist/policy/shell/workspace-root-exclude.js.map +1 -0
  137. package/dist/protocol/doors/listener-protocol.d.ts +7 -0
  138. package/dist/protocol/doors/listener-protocol.d.ts.map +1 -1
  139. package/dist/protocol/doors/listener-protocol.js +1 -0
  140. package/dist/protocol/doors/listener-protocol.js.map +1 -1
  141. package/dist/protocol/doors/webext-links.d.ts.map +1 -1
  142. package/dist/protocol/doors/webext-links.js.map +1 -1
  143. package/dist/protocol/raw/extension-protocol.d.ts +518 -0
  144. package/dist/protocol/raw/extension-protocol.d.ts.map +1 -1
  145. package/dist/protocol/raw/extension-protocol.js +276 -0
  146. package/dist/protocol/raw/extension-protocol.js.map +1 -1
  147. package/dist/protocol/raw/raw-json-routes.d.ts +60 -0
  148. package/dist/protocol/raw/raw-json-routes.d.ts.map +1 -1
  149. package/dist/protocol/raw/raw-routes.d.ts +81 -1
  150. package/dist/protocol/raw/raw-routes.d.ts.map +1 -1
  151. package/dist/protocol/raw/raw-routes.js +16 -1
  152. package/dist/protocol/raw/raw-routes.js.map +1 -1
  153. package/dist/schemas/activity.d.ts.map +1 -1
  154. package/dist/schemas/activity.js.map +1 -1
  155. package/dist/schemas/agent.d.ts +4 -0
  156. package/dist/schemas/agent.d.ts.map +1 -1
  157. package/dist/schemas/agent.js +4 -2
  158. package/dist/schemas/agent.js.map +1 -1
  159. package/dist/schemas/agents-list.d.ts +6 -0
  160. package/dist/schemas/agents-list.d.ts.map +1 -1
  161. package/dist/schemas/agents.d.ts +12 -0
  162. package/dist/schemas/agents.d.ts.map +1 -1
  163. package/dist/schemas/automations.d.ts +87 -27
  164. package/dist/schemas/automations.d.ts.map +1 -1
  165. package/dist/schemas/automations.js +15 -33
  166. package/dist/schemas/automations.js.map +1 -1
  167. package/dist/schemas/ci-deployments.d.ts +30 -0
  168. package/dist/schemas/ci-deployments.d.ts.map +1 -0
  169. package/dist/schemas/ci-deployments.js +18 -0
  170. package/dist/schemas/ci-deployments.js.map +1 -0
  171. package/dist/schemas/ci.d.ts +348 -21
  172. package/dist/schemas/ci.d.ts.map +1 -1
  173. package/dist/schemas/ci.js +110 -19
  174. package/dist/schemas/ci.js.map +1 -1
  175. package/dist/schemas/command-run.d.ts +29 -0
  176. package/dist/schemas/command-run.d.ts.map +1 -0
  177. package/dist/schemas/command-run.js +20 -0
  178. package/dist/schemas/command-run.js.map +1 -0
  179. package/dist/schemas/data-protection.d.ts +15 -2
  180. package/dist/schemas/data-protection.d.ts.map +1 -1
  181. package/dist/schemas/data-protection.js +15 -23
  182. package/dist/schemas/data-protection.js.map +1 -1
  183. package/dist/schemas/device-stacks.d.ts +131 -0
  184. package/dist/schemas/device-stacks.d.ts.map +1 -1
  185. package/dist/schemas/device-stacks.js +81 -0
  186. package/dist/schemas/device-stacks.js.map +1 -1
  187. package/dist/schemas/devices.d.ts +73 -0
  188. package/dist/schemas/devices.d.ts.map +1 -1
  189. package/dist/schemas/devices.js +6 -2
  190. package/dist/schemas/devices.js.map +1 -1
  191. package/dist/schemas/extension-updates.d.ts +1184 -0
  192. package/dist/schemas/extension-updates.d.ts.map +1 -1
  193. package/dist/schemas/extension-updates.js +18 -4
  194. package/dist/schemas/extension-updates.js.map +1 -1
  195. package/dist/schemas/host-power.d.ts +22 -0
  196. package/dist/schemas/host-power.d.ts.map +1 -1
  197. package/dist/schemas/host-power.js +55 -0
  198. package/dist/schemas/host-power.js.map +1 -1
  199. package/dist/schemas/hosts.d.ts +226 -0
  200. package/dist/schemas/hosts.d.ts.map +1 -1
  201. package/dist/schemas/hosts.js +24 -0
  202. package/dist/schemas/hosts.js.map +1 -1
  203. package/dist/schemas/issues.d.ts +35 -249
  204. package/dist/schemas/issues.d.ts.map +1 -1
  205. package/dist/schemas/issues.js +9 -43
  206. package/dist/schemas/issues.js.map +1 -1
  207. package/dist/schemas/maintenance.d.ts.map +1 -1
  208. package/dist/schemas/maintenance.js.map +1 -1
  209. package/dist/schemas/metrics.d.ts +25 -0
  210. package/dist/schemas/metrics.d.ts.map +1 -1
  211. package/dist/schemas/metrics.js +18 -0
  212. package/dist/schemas/metrics.js.map +1 -1
  213. package/dist/schemas/need-kinds.d.ts +19 -0
  214. package/dist/schemas/need-kinds.d.ts.map +1 -0
  215. package/dist/schemas/need-kinds.js +7 -0
  216. package/dist/schemas/need-kinds.js.map +1 -0
  217. package/dist/schemas/needs.d.ts +523 -30
  218. package/dist/schemas/needs.d.ts.map +1 -1
  219. package/dist/schemas/needs.js +36 -6
  220. package/dist/schemas/needs.js.map +1 -1
  221. package/dist/schemas/offload.d.ts +52 -0
  222. package/dist/schemas/offload.d.ts.map +1 -1
  223. package/dist/schemas/offload.js +12 -0
  224. package/dist/schemas/offload.js.map +1 -1
  225. package/dist/schemas/outward-action.d.ts +39 -0
  226. package/dist/schemas/outward-action.d.ts.map +1 -0
  227. package/dist/schemas/outward-action.js +40 -0
  228. package/dist/schemas/outward-action.js.map +1 -0
  229. package/dist/schemas/providers/plan-limits.d.ts +1 -0
  230. package/dist/schemas/providers/plan-limits.d.ts.map +1 -1
  231. package/dist/schemas/providers/plan-limits.js +1 -0
  232. package/dist/schemas/providers/plan-limits.js.map +1 -1
  233. package/dist/schemas/secrets.d.ts +17 -0
  234. package/dist/schemas/secrets.d.ts.map +1 -1
  235. package/dist/schemas/secrets.js +12 -5
  236. package/dist/schemas/secrets.js.map +1 -1
  237. package/dist/schemas/settings-history.d.ts +1 -1
  238. package/dist/schemas/settings-history.d.ts.map +1 -1
  239. package/dist/schemas/settings-history.js +5 -4
  240. package/dist/schemas/settings-history.js.map +1 -1
  241. package/dist/schemas/settings-savings.d.ts +58 -0
  242. package/dist/schemas/settings-savings.d.ts.map +1 -1
  243. package/dist/schemas/settings-savings.js +22 -0
  244. package/dist/schemas/settings-savings.js.map +1 -1
  245. package/dist/schemas/settings.d.ts +2 -42
  246. package/dist/schemas/settings.d.ts.map +1 -1
  247. package/dist/schemas/settings.js +5 -6
  248. package/dist/schemas/settings.js.map +1 -1
  249. package/dist/schemas/stack-grants.d.ts +60 -0
  250. package/dist/schemas/stack-grants.d.ts.map +1 -0
  251. package/dist/schemas/stack-grants.js +33 -0
  252. package/dist/schemas/stack-grants.js.map +1 -0
  253. package/dist/schemas/watch-sources.d.ts +72 -0
  254. package/dist/schemas/watch-sources.d.ts.map +1 -0
  255. package/dist/schemas/watch-sources.js +88 -0
  256. package/dist/schemas/watch-sources.js.map +1 -0
  257. package/dist/schemas/workspace/workspace-search.d.ts.map +1 -1
  258. package/dist/schemas/workspace/workspace-search.js +1 -1
  259. package/dist/schemas/workspace/workspace-search.js.map +1 -1
  260. package/dist/schemas/wsl-memory.d.ts +76 -0
  261. package/dist/schemas/wsl-memory.d.ts.map +1 -0
  262. package/dist/schemas/wsl-memory.js +36 -0
  263. package/dist/schemas/wsl-memory.js.map +1 -0
  264. package/dist/state/auth-state.d.ts.map +1 -1
  265. package/dist/state/auth-state.js +2 -0
  266. package/dist/state/auth-state.js.map +1 -1
  267. package/dist/state/definition.d.ts +4 -8
  268. package/dist/state/definition.d.ts.map +1 -1
  269. package/dist/state/workspace-state.d.ts +8 -3
  270. package/dist/state/workspace-state.d.ts.map +1 -1
  271. package/dist/state/workspace-state.js +8 -3
  272. package/dist/state/workspace-state.js.map +1 -1
  273. package/package.json +5 -5
  274. package/src/briefs/agent-ask.ts +23 -0
  275. package/src/{chores/extension-update.ts → briefs/extension-update-brief.ts} +3 -2
  276. package/src/chores/digest.ts +1 -0
  277. package/src/chores/index.ts +13 -2
  278. package/src/chores/prompt.ts +3 -18
  279. package/src/chores/stack.ts +1 -0
  280. package/src/chores/verdict.ts +1 -0
  281. package/src/chores/workspace-scope.ts +3 -8
  282. package/src/contracts/capabilities.contract.ts +24 -0
  283. package/src/contracts/ci.contract.ts +119 -37
  284. package/src/contracts/device-stacks.contract.ts +97 -0
  285. package/src/contracts/extensions.contract.ts +11 -0
  286. package/src/contracts/secrets.contract.ts +27 -0
  287. package/src/contracts/settings.contract.ts +24 -0
  288. package/src/contracts/stack-grants.contract.ts +51 -0
  289. package/src/contracts/system.contract.ts +16 -59
  290. package/src/contracts/workspace.contract.ts +0 -22
  291. package/src/events/agent-words.ts +3 -1
  292. package/src/events/child-news.test.ts +91 -0
  293. package/src/events/child-news.ts +269 -0
  294. package/src/events/prompt-origins.ts +35 -0
  295. package/src/events/requests.ts +18 -0
  296. package/src/events/transcript.ts +10 -1
  297. package/src/index.ts +3 -6
  298. package/src/models/model-roles.test.ts +61 -4
  299. package/src/models/model-roles.ts +153 -49
  300. package/src/models/model-setups.ts +49 -26
  301. package/src/policy/approvals-execution.ts +11 -6
  302. package/src/policy/batch-runs.ts +2 -2
  303. package/src/policy/message-limits.ts +8 -4
  304. package/src/policy/org-locks.ts +1 -0
  305. package/src/policy/shell/workspace-root-exclude.ts +11 -0
  306. package/src/protocol/doors/listener-protocol.ts +14 -0
  307. package/src/protocol/doors/webext-links.ts +3 -1
  308. package/src/protocol/raw/extension-protocol.ts +469 -2
  309. package/src/protocol/raw/raw-routes.ts +45 -4
  310. package/src/schemas/activity.ts +2 -1
  311. package/src/schemas/agent.test.ts +3 -0
  312. package/src/schemas/agent.ts +10 -4
  313. package/src/schemas/automations.ts +25 -41
  314. package/src/schemas/ci-deployments.ts +26 -0
  315. package/src/schemas/ci.ts +185 -45
  316. package/src/schemas/command-run.ts +44 -0
  317. package/src/schemas/data-protection.ts +28 -34
  318. package/src/schemas/device-stacks.ts +162 -3
  319. package/src/schemas/devices.ts +13 -2
  320. package/src/schemas/extension-updates.ts +27 -7
  321. package/src/schemas/host-power.test.ts +53 -0
  322. package/src/schemas/host-power.ts +96 -2
  323. package/src/schemas/hosts.test.ts +32 -0
  324. package/src/schemas/hosts.ts +62 -0
  325. package/src/schemas/issues.ts +29 -86
  326. package/src/schemas/maintenance.ts +4 -3
  327. package/src/schemas/metrics.ts +35 -0
  328. package/src/schemas/need-kinds.ts +13 -0
  329. package/src/schemas/needs.ts +57 -16
  330. package/src/schemas/offload.ts +31 -0
  331. package/src/schemas/outward-action.ts +47 -0
  332. package/src/schemas/providers/plan-limits.ts +1 -0
  333. package/src/schemas/secrets.ts +23 -5
  334. package/src/schemas/settings-history.ts +10 -5
  335. package/src/schemas/settings-savings.ts +29 -0
  336. package/src/schemas/settings.test.ts +23 -23
  337. package/src/schemas/settings.ts +10 -12
  338. package/src/schemas/stack-grants.ts +59 -0
  339. package/src/schemas/version-seam.test.ts +4 -1
  340. package/src/schemas/watch-sources.ts +127 -0
  341. package/src/schemas/workspace/workspace-search.ts +5 -2
  342. package/src/schemas/wsl-memory.ts +59 -0
  343. package/src/state/auth-state.ts +7 -0
  344. package/src/state/workspace-state.ts +18 -18
  345. package/src/text/embed.ts +2 -2
  346. package/dist/chores/extension-update.d.ts.map +0 -1
  347. package/dist/chores/extension-update.js.map +0 -1
  348. package/dist/contracts/chores.contract.d.ts +0 -213
  349. package/dist/contracts/chores.contract.d.ts.map +0 -1
  350. package/dist/contracts/chores.contract.js +0 -32
  351. package/dist/contracts/chores.contract.js.map +0 -1
  352. package/dist/contracts/issues.contract.d.ts +0 -106
  353. package/dist/contracts/issues.contract.d.ts.map +0 -1
  354. package/dist/contracts/issues.contract.js +0 -50
  355. package/dist/contracts/issues.contract.js.map +0 -1
  356. package/src/chores/chores.test.ts +0 -24
  357. package/src/chores/digest.test.ts +0 -27
  358. package/src/chores/probes.integration.test.ts +0 -494
  359. package/src/chores/stack.test.ts +0 -140
  360. package/src/chores/verdict.test.ts +0 -761
  361. package/src/contracts/chores.contract.ts +0 -39
  362. package/src/contracts/issues.contract.ts +0 -53
@@ -17,6 +17,7 @@ import {
17
17
  ExtensionsListSchema,
18
18
  ExtensionUpdateActionSchema,
19
19
  ExtensionUpdateAppliedSchema,
20
+ ExtensionUpdateDefaultsInputSchema,
20
21
  ExtensionUpdatePolicyInputSchema,
21
22
  ExtensionUpdatePreviewSchema,
22
23
  ExtensionUpdatesCheckedSchema,
@@ -190,6 +191,16 @@ export const extensionsContract = {
190
191
  })
191
192
  .input(ExtensionUpdatePolicyInputSchema)
192
193
  .output(OkSchema),
194
+ setUpdateDefaults: procedure
195
+ .route({
196
+ method: "POST",
197
+ path: "/extensions/update-policy",
198
+ summary: "Whether extensions update by themselves",
199
+ description:
200
+ "The sandbox's answer for every extension installed from a repository that has no answer of its own. Automatic takes a release with the same powers by itself and leaves one that asks for more to you.",
201
+ })
202
+ .input(ExtensionUpdateDefaultsInputSchema)
203
+ .output(OkSchema),
193
204
  // Declared via `contributes.processes`; the terminals list shows each one's log as `svc-ext-<id>-<name>`.
194
205
  processStatus: procedure
195
206
  .route({
@@ -11,6 +11,9 @@ import {
11
11
  SecretKeyParamSchema,
12
12
  SecretGeneratedSchema,
13
13
  SecretGenerateSchema,
14
+ SecretImportSchema,
15
+ SecretMarksRequestSchema,
16
+ SecretMarksResponseSchema,
14
17
  SecretRegenerateSchema,
15
18
  SecretHostGuardSetResultSchema,
16
19
  SecretHostGuardSetSchema,
@@ -63,6 +66,30 @@ export const secretsContract = {
63
66
  .meta({ agent: true })
64
67
  .input(SecretGenerateSchema)
65
68
  .output(SecretGeneratedSchema),
69
+ importValue: secretRoute
70
+ .route({
71
+ method: "POST",
72
+ path: "/secrets/import",
73
+ summary: "Store a value under a new name",
74
+ description:
75
+ "Stores a value read from the `secrets import` command's input under a name nothing here holds yet, where `set` would have put it: how a value moves from where it lives now (another orchestrator's variables, a file on a server) without passing through the chat. Answers the name and its length, never the value. Refused for a name something here already holds, so it can add a credential and never replace one.",
76
+ })
77
+ // (2026-11-25) The `secrets import` CLI, on the agent token; withheld from the panel token, as `set` is.
78
+ .meta({ agent: true, panel: false })
79
+ .input(SecretImportSchema)
80
+ .output(SecretGeneratedSchema),
81
+ // (2026-11-25) Keyed marks of named values (schemas/secrets.ts), never the values: how the Deployments extension tells
82
+ // that a secret a stack received changed since. An extension reaches it by declaring it; not the agent, not a panel.
83
+ marks: procedure
84
+ .route({
85
+ method: "POST",
86
+ path: "/secrets/marks",
87
+ summary: "A keyed mark of each named secret's value",
88
+ description: "An HMAC of each value under a key only this sandbox holds, so two marks compare equal exactly when the value is unchanged. Never the value.",
89
+ })
90
+ .meta({ floor: "maintainer", control: "never", panel: false })
91
+ .input(SecretMarksRequestSchema)
92
+ .output(SecretMarksResponseSchema),
66
93
  regenerate: secretRoute
67
94
  .route({
68
95
  method: "POST",
@@ -20,6 +20,8 @@ import {
20
20
  TimezoneOfferSchema,
21
21
  TimezoneStateSchema,
22
22
  } from "../schemas/settings.js";
23
+ import { ModelRolesSchema } from "../models/model-roles.js";
24
+ import { OutwardActionsSchema } from "../schemas/data-protection.js";
23
25
  import { OkSchema } from "../schemas/shared.js";
24
26
  import { DayWindowQuerySchema } from "../schemas/providers/usage.js";
25
27
 
@@ -92,6 +94,28 @@ export const settingsContract = {
92
94
  "A separate read rather than a field on the settings, because a rule firing is not somebody editing anything: folding it in would turn every firing into a settings write and put a self-changing value inside the object a screen edits.",
93
95
  })
94
96
  .output(RuleFiringsSchema),
97
+ // Read off the enabled extensions' manifests, not out of the settings file: the rules are the owner's, the actions
98
+ // they can be written for are each extension's own declaration (2026-11-25).
99
+ outwardActions: procedure
100
+ .route({
101
+ method: "GET",
102
+ path: "/settings/outward-actions",
103
+ summary: "What the action rules can be written for",
104
+ description:
105
+ "Every outward action the enabled extensions declare (send a Slack message, upload to OneDrive), by the key an action rule for it is written under. Reads are left out: a rule on one would hold a bot reading its own channel.",
106
+ })
107
+ .output(OutwardActionsSchema),
108
+ // Read off the extensions' manifests, not out of the settings file: which setup a job runs on is the owner's, the jobs
109
+ // there are are the sandbox's own and each extension's declaration (2026-11-26).
110
+ modelRoles: procedure
111
+ .route({
112
+ method: "GET",
113
+ path: "/settings/model-roles",
114
+ summary: "The jobs a model setup can be chosen for",
115
+ description:
116
+ "Every job this sandbox picks a model for: its own (commit messages, the safety judge, loop iterations), then each installed extension's (`contributes.modelRoles`: pipeline fixes, maintenance chores), with whether that extension is switched on. A switched-off extension's job stays listed so the owner's choice for it is kept, and is not shown.",
117
+ })
118
+ .output(ModelRolesSchema),
95
119
  // Read off the repositories themselves, not out of the settings file: the declaration is a tracked file in each
96
120
  // repository, and only the owner's answer to it lives here.
97
121
  repoChecks: procedure
@@ -0,0 +1,51 @@
1
+ import { procedure } from "../protocol/route-meta.js";
2
+ import { NeedRaisedSchema } from "../schemas/needs.js";
3
+ import { OkSchema } from "../schemas/shared.js";
4
+ import { StackGrantRefSchema, StackGrantRequestSchema, StackGrantSetSchema, StackGrantsResponseSchema } from "../schemas/stack-grants.js";
5
+
6
+ // WHICH SECRETS EACH MANAGED STACK MAY RECEIVE (schemas/stack-grants.ts). Reading the grants reaches an extension (the
7
+ // Deployments board shows what is missing) and the agent; granting and revoking are the owner's alone, never a machine
8
+ // credential's, and the handlers hold the caller to the Secrets right again. An agent asks on a card instead.
9
+ const grantRoute = procedure.meta({ control: "never", panel: false });
10
+
11
+ export const stackGrantsContract = {
12
+ list: grantRoute
13
+ .route({
14
+ method: "GET",
15
+ path: "/stack-grants",
16
+ summary: "Which secrets each managed stack may receive",
17
+ description: "Every grant: the repository, stack and computer it is for, and the secret names it covers. Names only, never a value.",
18
+ })
19
+ .meta({ agent: true })
20
+ .output(StackGrantsResponseSchema),
21
+ request: grantRoute
22
+ .route({
23
+ method: "POST",
24
+ path: "/stack-grants/request",
25
+ summary: "Ask the owner to let a stack receive some secrets",
26
+ description:
27
+ "Raises a card in the asking conversation listing the names; the owner's yes grants exactly those, for that stack from that repository on that computer.",
28
+ })
29
+ .meta({ agent: true, floor: "maintainer" })
30
+ .input(StackGrantRequestSchema)
31
+ .output(NeedRaisedSchema),
32
+ grant: grantRoute
33
+ .route({
34
+ method: "POST",
35
+ path: "/stack-grants/grant",
36
+ summary: "Let a stack receive these secrets",
37
+ })
38
+ .meta({ floor: "maintainer", right: "secrets" })
39
+ .input(StackGrantSetSchema)
40
+ .output(StackGrantsResponseSchema),
41
+ revoke: grantRoute
42
+ .route({
43
+ method: "POST",
44
+ path: "/stack-grants/revoke",
45
+ summary: "Stop a stack receiving secrets",
46
+ description: "Its next managed deploy is refused until granted again; what already runs keeps its `.env`.",
47
+ })
48
+ .meta({ floor: "maintainer", right: "secrets" })
49
+ .input(StackGrantRefSchema)
50
+ .output(OkSchema),
51
+ };
@@ -10,17 +10,8 @@ import {
10
10
  DeviceSandboxFlowInputSchema,
11
11
  DevicesListSchema,
12
12
  } from "../schemas/devices.js";
13
- import {
14
- DeviceStackDeployInputSchema,
15
- DeviceStackDeployResultSchema,
16
- DeviceStackLogsInputSchema,
17
- DeviceStackOpInputSchema,
18
- DeviceStacksInputSchema,
19
- DeviceStacksSchema,
20
- StackLogsSchema,
21
- StackOpResultSchema,
22
- } from "../schemas/device-stacks.js";
23
13
  import { deviceCiRunnerRoutes } from "./device-ci-runners.contract.js";
14
+ import { deviceStackRoutes } from "./device-stacks.contract.js";
24
15
  import { EgressOwnerKeysReadSchema } from "../schemas/egress.js";
25
16
  import { SandboxReachSchema } from "../schemas/sandbox-reach.js";
26
17
  import { PresenceReportSchema } from "../schemas/logs.js";
@@ -28,6 +19,7 @@ import {
28
19
  CheckoutPressInputSchema,
29
20
  CheckoutPressResultSchema,
30
21
  DiskPressureSchema,
22
+ MemoryReclaimResultSchema,
31
23
  SandboxMetricsSchema,
32
24
  StorageCleanInputSchema,
33
25
  StorageCleanResultSchema,
@@ -294,6 +286,18 @@ export const systemContract = {
294
286
  })
295
287
  .input(CheckoutPressInputSchema)
296
288
  .output(CheckoutPressResultSchema),
289
+ // (2026-11-26) The composer's "Free memory" press while the computer under this sandbox is short (offload.placement
290
+ // `reclaim`). The owner's alone: it empties caches every conversation here was reading from.
291
+ reclaimMemory: systemRoute
292
+ .route({
293
+ method: "POST",
294
+ path: "/system/memory/reclaim",
295
+ summary: "Give memory back to the computer this sandbox runs on",
296
+ description:
297
+ "Has this sandbox let go of memory it can do without (cached files first) now, and says how much it let go and what the computer it runs on had available just before and a few seconds after. On a Windows PC much of what a sandbox lets go stays inside the WSL VM, so the answer can be that Windows got none of it. Refused, with why, where that computer says nothing of its memory, where the kernel takes no reclaim, or while this sandbox is short of memory itself.",
298
+ })
299
+ .meta({ floor: "owner", panel: false })
300
+ .output(MemoryReclaimResultSchema),
297
301
  // Control plane only; live I/O is /system/terminal WebSocket, exempt from the Bearer auth these routes take.
298
302
  terminals: systemRoute
299
303
  .route({
@@ -529,55 +533,8 @@ export const systemContract = {
529
533
  })
530
534
  .input(DeviceAgentFlowInputSchema)
531
535
  .output(streamOf(DeviceFlowLineSchema)),
532
- // Docker compose stacks on a connected computer (schemas/device-stacks.ts): what the Deployments board reads and
533
- // drives where no Komodo stands between. Relayed to the machine's own tools, which check its switches; the daemon
534
- // adds no opinion beyond the floor, so a refusal arrives in the machine's words, naming the switch to flip.
535
- deviceStacks: systemRoute
536
- .route({
537
- method: "GET",
538
- path: "/system/devices/{id}/stacks",
539
- summary: "The Docker compose stacks on one of your devices",
540
- description:
541
- "Every Docker compose project on a computer you connected, with each service's container, image and state, and the folder this sandbox deploys stacks into there. Intentic's own sandboxes are marked rather than left out. Needs that computer's \"Run commands\" switch.",
542
- })
543
- .meta({ floor: "maintainer", panel: false })
544
- .input(DeviceStacksInputSchema)
545
- .output(DeviceStacksSchema),
546
- // Up, restart, start, stop, or pull-then-up; nothing here removes a stack or a volume.
547
- deviceStackOp: systemRoute
548
- .route({
549
- method: "POST",
550
- path: "/system/devices/{id}/stacks/{name}/ops/{op}",
551
- summary: "Start, stop, restart or update a stack on one of your devices",
552
- description:
553
- "Runs `docker compose` for one stack on a computer you connected: `up` applies its files, `pull` fetches newer images and then applies, and `restart`, `start` and `stop` do what they say. Nothing here removes a stack or its volumes. Needs that computer's \"Run commands\" switch.",
554
- })
555
- .meta({ panel: false })
556
- .input(DeviceStackOpInputSchema)
557
- .output(StackOpResultSchema),
558
- // Floored like the actions, though it only reads: a log can hold anything the service printed.
559
- deviceStackLogs: systemRoute
560
- .route({
561
- method: "GET",
562
- path: "/system/devices/{id}/stacks/{name}/logs",
563
- summary: "The recent log of a stack on one of your devices",
564
- description: "The last lines every service of one compose stack printed, oldest first, as `docker compose logs` gives them.",
565
- })
566
- .meta({ floor: "maintainer", panel: false })
567
- .input(DeviceStackLogsInputSchema)
568
- .output(StackLogsSchema),
569
- // The repository's committed tree, packed here, carried over the device link and brought up there with `--build`.
570
- deployDeviceStack: systemRoute
571
- .route({
572
- method: "POST",
573
- path: "/system/devices/{id}/stacks/{name}/deploy",
574
- summary: "Deploy a workspace repository to one of your devices",
575
- description:
576
- "Packs the committed tree (HEAD) of a workspace repository, carries it to a computer you connected and runs it there as a Docker compose stack of the given name, building its images on that computer. Uncommitted changes are not deployed. A `.env` already in the stack's folder there is kept: secrets are placed into it by an agent, never sent with a deploy. Needs that computer's \"Run commands\" and \"Run programs this sandbox sends\" switches.",
577
- })
578
- .meta({ panel: false })
579
- .input(DeviceStackDeployInputSchema)
580
- .output(DeviceStackDeployResultSchema),
536
+ // Docker compose stacks on a connected computer (device-stacks.contract.ts).
537
+ ...deviceStackRoutes,
581
538
  // The self-hosted CI runners on a connected computer, for the Pipelines view (device-ci-runners.contract.ts).
582
539
  ...deviceCiRunnerRoutes,
583
540
  };
@@ -15,7 +15,6 @@ import {
15
15
  TemplatesListSchema,
16
16
  WorkspaceSyncSchema,
17
17
  } from "../schemas/workspace/workspace-repos.js";
18
- import { PackageModulesParamSchema, PackageModulesSchema, WorkspaceGraphSchema } from "../schemas/workspace/workspace-graph.js";
19
18
  import { WorkspaceSearchFrameSchema, WorkspaceSearchQuerySchema, WorkspaceSearchResultSchema } from "../schemas/workspace/workspace-search.js";
20
19
  import { WorkspaceInstallResultSchema, WorkspaceInstallSchema, WorkspaceSetupSchema } from "../schemas/workspace/workspace-setup.js";
21
20
  import {
@@ -380,27 +379,6 @@ export const workspaceContract = {
380
379
  })
381
380
  .input(RepoAppsParamSchema)
382
381
  .output(AppsListSchema),
383
- // The monorepo's package dependency graph, from pnpm-workspace.yaml globs and each package.json's deps.
384
- packageGraph: procedure
385
- .route({
386
- method: "GET",
387
- path: "/workspace/repos/{repo}/graph",
388
- summary: "How a repo's packages depend on each other",
389
- description: "Every package in one multi-package repo and which of its siblings each one uses, which is what a dependency view draws.",
390
- })
391
- .input(RepoAppsParamSchema)
392
- .output(WorkspaceGraphSchema),
393
- // One package's modules grouped into units, and the value imports between them, placed in its declared layers.
394
- packageModules: procedure
395
- .route({
396
- method: "GET",
397
- path: "/workspace/repos/{repo}/layers",
398
- summary: "How one package's modules import each other",
399
- description:
400
- "One workspace package's source directories as units, the value imports between them, and the layers its layers.json declares, which is what a view of its insides draws.",
401
- })
402
- .input(PackageModulesParamSchema)
403
- .output(PackageModulesSchema),
404
382
  // Every repo's package dirs in one call, since a review spans repos and per-repo would fan out per open.
405
383
  modules: procedure
406
384
  .route({
@@ -1,6 +1,7 @@
1
1
  import { oneLine } from "@intentic/base/one-line";
2
2
  import type { SubagentVerification } from "../schemas/terminal.js";
3
3
  import type { TranscriptAgentWords, TranscriptRow } from "./transcript.js";
4
+ import { childNewsRow } from "./child-news.js";
4
5
  import { needWakeRow } from "./need-wake.js";
5
6
  import { watchWakeRow } from "./watch-wake.js";
6
7
 
@@ -221,4 +222,5 @@ export const agentWordsRow = (prompt: string): TranscriptRow | undefined => {
221
222
  };
222
223
 
223
224
  /** The row for a prompt nobody at the composer typed; every transcript reader asks this one function. */
224
- export const unspokenPromptRow = (prompt: string): TranscriptRow | undefined => watchWakeRow(prompt) ?? needWakeRow(prompt) ?? agentWordsRow(prompt);
225
+ export const unspokenPromptRow = (prompt: string): TranscriptRow | undefined =>
226
+ watchWakeRow(prompt) ?? needWakeRow(prompt) ?? agentWordsRow(prompt) ?? childNewsRow(prompt);
@@ -0,0 +1,91 @@
1
+ import { unspokenPromptRow } from "./agent-words.js";
2
+ import {
3
+ allowedWords,
4
+ answerLostWords,
5
+ asChildNews,
6
+ childNewsOf,
7
+ driftWords,
8
+ fellBackWords,
9
+ landConflictWords,
10
+ landedWords,
11
+ linkedQuestionWords,
12
+ messageLostWords,
13
+ movedHereWords,
14
+ notStartedWords,
15
+ otherModelWords,
16
+ questionWords,
17
+ restartedWords,
18
+ stoppedWords,
19
+ workingWords,
20
+ } from "./child-news.js";
21
+
22
+ const who = { child: "sub-moon-4rfr", title: "#2 Targeted memory reclaim instead of global drop_caches" };
23
+
24
+ // The runner's own failure, word for word as runner-dispatch.ts says it: the news that drew four of the owner's bubbles.
25
+ const FAILURE =
26
+ "Preparing the runner's workspace failed: the runner \"omen\" runs an older build (0.0.0), whose sync can lose a turn's uncommitted work, so nothing was sent there. Update it (Devices, its Update button), or move this conversation here to go on in this sandbox.";
27
+
28
+ describe("news about a subagent", () => {
29
+ // 2026-11-26: the sentence as the owner's chat held it, before it was composed here; records keep it so.
30
+ it("reads the words a parent was told before they were composed here", () => {
31
+ const stored = `Your subagent \`sub-moon-4rfr\` ("#2 Targeted memory reclaim instead of global drop_caches") could not start on the runner "omen": ${FAILURE} It runs here, in this sandbox, instead, and its report reaches you when it ends.`;
32
+ expect(movedHereWords(who, "omen", FAILURE)).toBe(stored);
33
+ expect(childNewsOf(stored)).toEqual({ kind: "movedHere", from: "sub-moon-4rfr", title: who.title, runner: "omen", cause: FAILURE, sent: stored });
34
+ });
35
+
36
+ // Composer and parser are one piece of knowledge: every sentence reads back as the kind it was written as.
37
+ it.each([
38
+ ["stopped", stoppedWords(who, "its allowance never reopened."), { cause: "its allowance never reopened." }],
39
+ ["restarted", restartedWords(who), {}],
40
+ ["otherModel", otherModelWords(who, "kimi-k3", "kimi-k3-256k"), { model: "kimi-k3" }],
41
+ ["fellBack", fellBackWords(who, "claude/opus", "codex/gpt-6", "429: allowance spent"), { model: "codex/gpt-6", cause: "429: allowance spent" }],
42
+ ["working", workingWords(who, "the sandbox sent its turn again by itself because its allowance reopened"), { cause: "the sandbox sent its turn again by itself because its allowance reopened" }],
43
+ ["question", questionWords(who, [{ question: "Which cache?", options: [{ label: "page" }, { label: "slab" }] }]), { cause: "Which cache?" }],
44
+ ["landed", landedWords(who, ["intentic"]), {}],
45
+ ["landConflict", landConflictWords(who, ["a.ts", "b.ts"]), {}],
46
+ ["drift", driftWords(who, "`intentic` moved 3 commits."), { cause: "`intentic` moved 3 commits." }],
47
+ ] as const)("reads %s back with its subagent and what it carries", (kind, prompt, carried) => {
48
+ expect(childNewsOf(prompt)).toEqual({ kind, from: who.child, title: who.title, ...carried, sent: prompt });
49
+ });
50
+
51
+ it.each([
52
+ ["notStarted", notStartedWords("sub-x7", "the owner declined it."), { cause: "the owner declined it." }],
53
+ ["allowed", allowedWords("sub-x7", "It runs on omen."), {}],
54
+ ["messageLost", messageLostWords("sub-x7", "it is archived."), { cause: "it is archived." }],
55
+ ["answerLost", answerLostWords("sub-x7", "it is not waiting on a question."), { cause: "it is not waiting on a question." }],
56
+ ["question", linkedQuestionWords("sub-x7", "acme", [{ question: "Ship it?", options: [] }]), { cause: "Ship it?" }],
57
+ ] as const)("reads %s, which names no title, back with its subagent", (kind, prompt, carried) => {
58
+ expect(childNewsOf(prompt)).toEqual({ kind, from: "sub-x7", ...carried, sent: prompt });
59
+ });
60
+
61
+ it("ends a title where the fixed words after it begin, whatever quotes or brackets it holds", () => {
62
+ const odd = { child: "sub-tuna-25dq", title: 'Propose a "WSL" VM size (card")' };
63
+ expect(childNewsOf(restartedWords(odd))).toMatchObject({ kind: "restarted", title: odd.title });
64
+ expect(childNewsOf(restartedWords({ child: "sub-tuna-25dq" }))).not.toHaveProperty("title");
65
+ });
66
+
67
+ it("is not news when a prompt only mentions a subagent", () => {
68
+ expect(childNewsOf("Your subagent `sub-x7` looks stuck, can you check?")).toBeUndefined();
69
+ expect(childNewsOf("Report from a subagent you started: `sub-x7` finished.\n\nDone.")).toBeUndefined();
70
+ });
71
+
72
+ it("is a notice wherever a prompt becomes a row, never the owner's words", () => {
73
+ const prompt = restartedWords(who);
74
+ expect(unspokenPromptRow(prompt)).toMatchObject({ role: "notice", childNews: { kind: "restarted", from: who.child } });
75
+ });
76
+
77
+ it("reads a row recorded as the user's as the news it was, keeping its place and moment", () => {
78
+ const text = stoppedWords(who, "no fallback took it.");
79
+ const read = asChildNews({ role: "user", text, rowId: "r1", run: "run-1", sentAt: 1000, speaker: { kind: "sandbox" } });
80
+ expect(read).toMatchObject({ role: "notice", rowId: "r1", run: "run-1", openedAt: 1000, childNews: { kind: "stopped" } });
81
+ expect(read).not.toHaveProperty("speaker");
82
+ expect(read).not.toHaveProperty("sentAt");
83
+ });
84
+
85
+ it("leaves a person's own words alone, even word for word the same", () => {
86
+ const row = { role: "user" as const, text: restartedWords(who), speaker: { kind: "person" as const, email: "a@b.c" } };
87
+ expect(asChildNews(row)).toBe(row);
88
+ const plain = { role: "user" as const, text: "hello" };
89
+ expect(asChildNews(plain)).toBe(plain);
90
+ });
91
+ });