@intentic/sandbox-contract 1.430.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 (711) hide show
  1. package/README.md +22 -5
  2. package/dist/app-routes/app-pages.d.ts +1 -0
  3. package/dist/app-routes/app-pages.d.ts.map +1 -1
  4. package/dist/app-routes/app-pages.js +1 -0
  5. package/dist/app-routes/app-pages.js.map +1 -1
  6. package/dist/app-routes/index.d.ts +1 -0
  7. package/dist/app-routes/index.d.ts.map +1 -1
  8. package/dist/app-routes/index.js +1 -0
  9. package/dist/app-routes/index.js.map +1 -1
  10. package/dist/app-routes/return-path.d.ts +2 -0
  11. package/dist/app-routes/return-path.d.ts.map +1 -0
  12. package/dist/app-routes/return-path.js +8 -0
  13. package/dist/app-routes/return-path.js.map +1 -0
  14. package/dist/briefs/agent-ask.d.ts +10 -0
  15. package/dist/briefs/agent-ask.d.ts.map +1 -0
  16. package/dist/briefs/agent-ask.js +2 -0
  17. package/dist/briefs/agent-ask.js.map +1 -0
  18. package/dist/{chores/extension-update.d.ts → briefs/extension-update-brief.d.ts} +1 -1
  19. package/dist/briefs/extension-update-brief.d.ts.map +1 -0
  20. package/dist/{chores/extension-update.js → briefs/extension-update-brief.js} +2 -2
  21. package/dist/briefs/extension-update-brief.js.map +1 -0
  22. package/dist/chores/digest.d.ts.map +1 -1
  23. package/dist/chores/digest.js.map +1 -1
  24. package/dist/chores/index.d.ts +2 -2
  25. package/dist/chores/index.d.ts.map +1 -1
  26. package/dist/chores/index.js +1 -1
  27. package/dist/chores/index.js.map +1 -1
  28. package/dist/chores/prompt.d.ts +1 -9
  29. package/dist/chores/prompt.d.ts.map +1 -1
  30. package/dist/chores/prompt.js +1 -1
  31. package/dist/chores/prompt.js.map +1 -1
  32. package/dist/chores/stack.d.ts.map +1 -1
  33. package/dist/chores/stack.js.map +1 -1
  34. package/dist/chores/verdict.d.ts.map +1 -1
  35. package/dist/chores/verdict.js.map +1 -1
  36. package/dist/chores/workspace-scope.d.ts +1 -3
  37. package/dist/chores/workspace-scope.d.ts.map +1 -1
  38. package/dist/chores/workspace-scope.js +1 -3
  39. package/dist/chores/workspace-scope.js.map +1 -1
  40. package/dist/contracts/accounts.contract.d.ts.map +1 -1
  41. package/dist/contracts/accounts.contract.js +2 -0
  42. package/dist/contracts/accounts.contract.js.map +1 -1
  43. package/dist/contracts/agent.contract.d.ts +1226 -12
  44. package/dist/contracts/agent.contract.d.ts.map +1 -1
  45. package/dist/contracts/agents.contract.d.ts +2665 -733
  46. package/dist/contracts/agents.contract.d.ts.map +1 -1
  47. package/dist/contracts/agents.contract.js +35 -5
  48. package/dist/contracts/agents.contract.js.map +1 -1
  49. package/dist/contracts/automations.contract.d.ts +90 -8
  50. package/dist/contracts/automations.contract.d.ts.map +1 -1
  51. package/dist/contracts/automations.contract.js +1 -0
  52. package/dist/contracts/automations.contract.js.map +1 -1
  53. package/dist/contracts/capabilities.contract.d.ts +49 -0
  54. package/dist/contracts/capabilities.contract.d.ts.map +1 -1
  55. package/dist/contracts/capabilities.contract.js +24 -1
  56. package/dist/contracts/capabilities.contract.js.map +1 -1
  57. package/dist/contracts/ci.contract.d.ts +222 -95
  58. package/dist/contracts/ci.contract.d.ts.map +1 -1
  59. package/dist/contracts/ci.contract.js +87 -26
  60. package/dist/contracts/ci.contract.js.map +1 -1
  61. package/dist/contracts/device-ci-runners.contract.d.ts +108 -0
  62. package/dist/contracts/device-ci-runners.contract.d.ts.map +1 -0
  63. package/dist/contracts/device-ci-runners.contract.js +56 -0
  64. package/dist/contracts/device-ci-runners.contract.js.map +1 -0
  65. package/dist/contracts/device-stacks.contract.d.ts +129 -0
  66. package/dist/contracts/device-stacks.contract.d.ts.map +1 -0
  67. package/dist/contracts/device-stacks.contract.js +66 -0
  68. package/dist/contracts/device-stacks.contract.js.map +1 -0
  69. package/dist/contracts/device.contract.d.ts +74 -0
  70. package/dist/contracts/device.contract.d.ts.map +1 -1
  71. package/dist/contracts/extensions.contract.d.ts +604 -0
  72. package/dist/contracts/extensions.contract.d.ts.map +1 -1
  73. package/dist/contracts/extensions.contract.js +11 -2
  74. package/dist/contracts/extensions.contract.js.map +1 -1
  75. package/dist/contracts/git.contract.d.ts +7 -0
  76. package/dist/contracts/git.contract.d.ts.map +1 -1
  77. package/dist/contracts/needs.contract.d.ts +1097 -18
  78. package/dist/contracts/needs.contract.d.ts.map +1 -1
  79. package/dist/contracts/offload.contract.d.ts +25 -0
  80. package/dist/contracts/offload.contract.d.ts.map +1 -1
  81. package/dist/contracts/ports.contract.d.ts +8 -0
  82. package/dist/contracts/ports.contract.d.ts.map +1 -1
  83. package/dist/contracts/ports.contract.js +6 -5
  84. package/dist/contracts/ports.contract.js.map +1 -1
  85. package/dist/contracts/remote.contract.d.ts +1 -0
  86. package/dist/contracts/remote.contract.d.ts.map +1 -1
  87. package/dist/contracts/runner.contract.d.ts +1203 -9
  88. package/dist/contracts/runner.contract.d.ts.map +1 -1
  89. package/dist/contracts/runner.contract.js +49 -2
  90. package/dist/contracts/runner.contract.js.map +1 -1
  91. package/dist/contracts/runners.contract.d.ts +16 -0
  92. package/dist/contracts/runners.contract.d.ts.map +1 -0
  93. package/dist/contracts/runners.contract.js +15 -0
  94. package/dist/contracts/runners.contract.js.map +1 -0
  95. package/dist/contracts/safety.contract.d.ts.map +1 -1
  96. package/dist/contracts/safety.contract.js +1 -0
  97. package/dist/contracts/safety.contract.js.map +1 -1
  98. package/dist/contracts/seal.contract.d.ts +100 -0
  99. package/dist/contracts/seal.contract.d.ts.map +1 -1
  100. package/dist/contracts/secrets.contract.d.ts +15 -0
  101. package/dist/contracts/secrets.contract.d.ts.map +1 -1
  102. package/dist/contracts/secrets.contract.js +27 -1
  103. package/dist/contracts/secrets.contract.js.map +1 -1
  104. package/dist/contracts/sessions.contract.d.ts +159 -2
  105. package/dist/contracts/sessions.contract.d.ts.map +1 -1
  106. package/dist/contracts/settings.contract.d.ts +59 -42
  107. package/dist/contracts/settings.contract.d.ts.map +1 -1
  108. package/dist/contracts/settings.contract.js +19 -0
  109. package/dist/contracts/settings.contract.js.map +1 -1
  110. package/dist/contracts/skills.contract.d.ts +6 -0
  111. package/dist/contracts/skills.contract.d.ts.map +1 -1
  112. package/dist/contracts/stack-grants.contract.d.ts +418 -0
  113. package/dist/contracts/stack-grants.contract.d.ts.map +1 -0
  114. package/dist/contracts/stack-grants.contract.js +46 -0
  115. package/dist/contracts/stack-grants.contract.js.map +1 -0
  116. package/dist/contracts/system.contract.d.ts +516 -69
  117. package/dist/contracts/system.contract.d.ts.map +1 -1
  118. package/dist/contracts/system.contract.js +26 -45
  119. package/dist/contracts/system.contract.js.map +1 -1
  120. package/dist/contracts/usage.contract.d.ts +3 -0
  121. package/dist/contracts/usage.contract.d.ts.map +1 -1
  122. package/dist/contracts/workspace.contract.d.ts +0 -55
  123. package/dist/contracts/workspace.contract.d.ts.map +1 -1
  124. package/dist/contracts/workspace.contract.js +0 -19
  125. package/dist/contracts/workspace.contract.js.map +1 -1
  126. package/dist/events/agent-events.d.ts +615 -8
  127. package/dist/events/agent-events.d.ts.map +1 -1
  128. package/dist/events/agent-events.js +2 -2
  129. package/dist/events/agent-events.js.map +1 -1
  130. package/dist/events/agent-transcript.d.ts +159 -2
  131. package/dist/events/agent-transcript.d.ts.map +1 -1
  132. package/dist/events/agent-words.d.ts +5 -0
  133. package/dist/events/agent-words.d.ts.map +1 -1
  134. package/dist/events/agent-words.js +22 -2
  135. package/dist/events/agent-words.js.map +1 -1
  136. package/dist/events/child-news.d.ts +32 -0
  137. package/dist/events/child-news.d.ts.map +1 -0
  138. package/dist/events/child-news.js +171 -0
  139. package/dist/events/child-news.js.map +1 -0
  140. package/dist/events/prompt-origins.d.ts +42 -0
  141. package/dist/events/prompt-origins.d.ts.map +1 -1
  142. package/dist/events/prompt-origins.js +28 -0
  143. package/dist/events/prompt-origins.js.map +1 -1
  144. package/dist/events/refusal-incidents.d.ts +1 -0
  145. package/dist/events/refusal-incidents.d.ts.map +1 -1
  146. package/dist/events/refusal-incidents.js +42 -19
  147. package/dist/events/refusal-incidents.js.map +1 -1
  148. package/dist/events/requests.d.ts +14 -0
  149. package/dist/events/requests.d.ts.map +1 -1
  150. package/dist/events/requests.js +12 -0
  151. package/dist/events/requests.js.map +1 -1
  152. package/dist/events/system-events.d.ts +98 -0
  153. package/dist/events/system-events.d.ts.map +1 -1
  154. package/dist/events/transcript.d.ts +799 -10
  155. package/dist/events/transcript.d.ts.map +1 -1
  156. package/dist/events/transcript.js +2 -1
  157. package/dist/events/transcript.js.map +1 -1
  158. package/dist/ids/conversation-ids.d.ts +1 -0
  159. package/dist/ids/conversation-ids.d.ts.map +1 -1
  160. package/dist/ids/conversation-ids.js +2 -1
  161. package/dist/ids/conversation-ids.js.map +1 -1
  162. package/dist/ids/project-id.d.ts.map +1 -1
  163. package/dist/ids/project-id.js +4 -4
  164. package/dist/ids/project-id.js.map +1 -1
  165. package/dist/ids/run-row-ids.d.ts +8 -0
  166. package/dist/ids/run-row-ids.d.ts.map +1 -0
  167. package/dist/ids/run-row-ids.js +32 -0
  168. package/dist/ids/run-row-ids.js.map +1 -0
  169. package/dist/index.d.ts +4 -4
  170. package/dist/index.d.ts.map +1 -1
  171. package/dist/index.js +4 -4
  172. package/dist/index.js.map +1 -1
  173. package/dist/models/agent-catalog.d.ts.map +1 -1
  174. package/dist/models/agent-catalog.js +3 -2
  175. package/dist/models/agent-catalog.js.map +1 -1
  176. package/dist/models/agent-lanes.d.ts.map +1 -1
  177. package/dist/models/agent-lanes.js +4 -1
  178. package/dist/models/agent-lanes.js.map +1 -1
  179. package/dist/models/agent-runtimes.d.ts.map +1 -1
  180. package/dist/models/agent-runtimes.js +2 -2
  181. package/dist/models/agent-runtimes.js.map +1 -1
  182. package/dist/models/agent-standing.d.ts +6 -1
  183. package/dist/models/agent-standing.d.ts.map +1 -1
  184. package/dist/models/agent-standing.js +1 -0
  185. package/dist/models/agent-standing.js.map +1 -1
  186. package/dist/models/model-roles.d.ts +91 -37
  187. package/dist/models/model-roles.d.ts.map +1 -1
  188. package/dist/models/model-roles.js +106 -35
  189. package/dist/models/model-roles.js.map +1 -1
  190. package/dist/models/model-setups.d.ts +10 -8
  191. package/dist/models/model-setups.d.ts.map +1 -1
  192. package/dist/models/model-setups.js +15 -15
  193. package/dist/models/model-setups.js.map +1 -1
  194. package/dist/models/providers/provider-traits.d.ts +215 -0
  195. package/dist/models/providers/provider-traits.d.ts.map +1 -0
  196. package/dist/models/providers/provider-traits.js +60 -0
  197. package/dist/models/providers/provider-traits.js.map +1 -0
  198. package/dist/netd/browser-wire.d.ts +8 -0
  199. package/dist/netd/browser-wire.d.ts.map +1 -1
  200. package/dist/netd/browser-wire.js +5 -0
  201. package/dist/netd/browser-wire.js.map +1 -1
  202. package/dist/netd/generated/wire.d.ts +42 -1
  203. package/dist/netd/generated/wire.d.ts.map +1 -1
  204. package/dist/policy/admin/admin-grant.d.ts +21 -0
  205. package/dist/policy/admin/admin-grant.d.ts.map +1 -0
  206. package/dist/policy/admin/admin-grant.js +41 -0
  207. package/dist/policy/admin/admin-grant.js.map +1 -0
  208. package/dist/policy/approvals-execution.d.ts +5 -2
  209. package/dist/policy/approvals-execution.d.ts.map +1 -1
  210. package/dist/policy/approvals-execution.js +3 -4
  211. package/dist/policy/approvals-execution.js.map +1 -1
  212. package/dist/policy/batch-runs.d.ts +1 -1
  213. package/dist/policy/batch-runs.d.ts.map +1 -1
  214. package/dist/policy/batch-runs.js +2 -1
  215. package/dist/policy/batch-runs.js.map +1 -1
  216. package/dist/policy/capabilities/capability-kinds.d.ts +268 -0
  217. package/dist/policy/capabilities/capability-kinds.d.ts.map +1 -0
  218. package/dist/policy/capabilities/capability-kinds.js +47 -0
  219. package/dist/policy/capabilities/capability-kinds.js.map +1 -0
  220. package/dist/policy/command-classes.d.ts.map +1 -1
  221. package/dist/policy/command-classes.js +3 -1
  222. package/dist/policy/command-classes.js.map +1 -1
  223. package/dist/policy/device-programs.d.ts +79 -2
  224. package/dist/policy/device-programs.d.ts.map +1 -1
  225. package/dist/policy/device-programs.js +15 -16
  226. package/dist/policy/device-programs.js.map +1 -1
  227. package/dist/policy/message-limits.d.ts.map +1 -1
  228. package/dist/policy/message-limits.js.map +1 -1
  229. package/dist/policy/org-locks.d.ts +1 -1
  230. package/dist/policy/org-locks.d.ts.map +1 -1
  231. package/dist/policy/org-locks.js +1 -0
  232. package/dist/policy/org-locks.js.map +1 -1
  233. package/dist/policy/reserved-servers.d.ts.map +1 -1
  234. package/dist/policy/reserved-servers.js +5 -1
  235. package/dist/policy/reserved-servers.js.map +1 -1
  236. package/dist/policy/role-capability.d.ts.map +1 -1
  237. package/dist/policy/role-capability.js +2 -1
  238. package/dist/policy/role-capability.js.map +1 -1
  239. package/dist/policy/shell/command-normalise.d.ts +10 -0
  240. package/dist/policy/shell/command-normalise.d.ts.map +1 -0
  241. package/dist/policy/shell/command-normalise.js +153 -0
  242. package/dist/policy/shell/command-normalise.js.map +1 -0
  243. package/dist/policy/shell/workspace-root-exclude.d.ts +4 -0
  244. package/dist/policy/shell/workspace-root-exclude.d.ts.map +1 -0
  245. package/dist/policy/shell/workspace-root-exclude.js +4 -0
  246. package/dist/policy/shell/workspace-root-exclude.js.map +1 -0
  247. package/dist/protocol/doors/listener-protocol.d.ts +11 -0
  248. package/dist/protocol/doors/listener-protocol.d.ts.map +1 -1
  249. package/dist/protocol/doors/listener-protocol.js +5 -0
  250. package/dist/protocol/doors/listener-protocol.js.map +1 -1
  251. package/dist/protocol/doors/loopback-proof.d.ts +8 -0
  252. package/dist/protocol/doors/loopback-proof.d.ts.map +1 -0
  253. package/dist/protocol/doors/loopback-proof.js +11 -0
  254. package/dist/protocol/doors/loopback-proof.js.map +1 -0
  255. package/dist/protocol/doors/pass-scopes.d.ts +4 -0
  256. package/dist/protocol/doors/pass-scopes.d.ts.map +1 -0
  257. package/dist/protocol/doors/pass-scopes.js +3 -0
  258. package/dist/protocol/doors/pass-scopes.js.map +1 -0
  259. package/dist/protocol/doors/runner-protocol.d.ts +187 -0
  260. package/dist/protocol/doors/runner-protocol.d.ts.map +1 -1
  261. package/dist/protocol/doors/runner-protocol.js +48 -1
  262. package/dist/protocol/doors/runner-protocol.js.map +1 -1
  263. package/dist/protocol/doors/sandbox-pass.d.ts +19 -2
  264. package/dist/protocol/doors/sandbox-pass.d.ts.map +1 -1
  265. package/dist/protocol/doors/sandbox-pass.js +42 -10
  266. package/dist/protocol/doors/sandbox-pass.js.map +1 -1
  267. package/dist/protocol/doors/webext-links.d.ts.map +1 -1
  268. package/dist/protocol/doors/webext-links.js.map +1 -1
  269. package/dist/protocol/member-reach.d.ts +6 -0
  270. package/dist/protocol/member-reach.d.ts.map +1 -1
  271. package/dist/protocol/member-reach.js +24 -0
  272. package/dist/protocol/member-reach.js.map +1 -1
  273. package/dist/protocol/peer-mcp-server.d.ts +2 -0
  274. package/dist/protocol/peer-mcp-server.d.ts.map +1 -1
  275. package/dist/protocol/peer-mcp-server.js +1 -0
  276. package/dist/protocol/peer-mcp-server.js.map +1 -1
  277. package/dist/protocol/raw/extension-protocol.d.ts +518 -0
  278. package/dist/protocol/raw/extension-protocol.d.ts.map +1 -1
  279. package/dist/protocol/raw/extension-protocol.js +276 -0
  280. package/dist/protocol/raw/extension-protocol.js.map +1 -1
  281. package/dist/protocol/raw/raw-json-routes.d.ts +572 -0
  282. package/dist/protocol/raw/raw-json-routes.d.ts.map +1 -1
  283. package/dist/protocol/raw/raw-json-routes.js +25 -2
  284. package/dist/protocol/raw/raw-json-routes.js.map +1 -1
  285. package/dist/protocol/raw/raw-routes.d.ts +245 -3
  286. package/dist/protocol/raw/raw-routes.d.ts.map +1 -1
  287. package/dist/protocol/raw/raw-routes.js +79 -36
  288. package/dist/protocol/raw/raw-routes.js.map +1 -1
  289. package/dist/protocol/route-meta.d.ts.map +1 -1
  290. package/dist/protocol/route-meta.js.map +1 -1
  291. package/dist/schemas/account-routes.d.ts +176 -0
  292. package/dist/schemas/account-routes.d.ts.map +1 -0
  293. package/dist/schemas/account-routes.js +73 -0
  294. package/dist/schemas/account-routes.js.map +1 -0
  295. package/dist/schemas/activity.d.ts.map +1 -1
  296. package/dist/schemas/activity.js.map +1 -1
  297. package/dist/schemas/agent-background.d.ts +48 -0
  298. package/dist/schemas/agent-background.d.ts.map +1 -0
  299. package/dist/schemas/agent-background.js +63 -0
  300. package/dist/schemas/agent-background.js.map +1 -0
  301. package/dist/schemas/agent-land.d.ts +7 -0
  302. package/dist/schemas/agent-land.d.ts.map +1 -1
  303. package/dist/schemas/agent-land.js +11 -0
  304. package/dist/schemas/agent-land.js.map +1 -1
  305. package/dist/schemas/agent.d.ts +4 -0
  306. package/dist/schemas/agent.d.ts.map +1 -1
  307. package/dist/schemas/agent.js +4 -2
  308. package/dist/schemas/agent.js.map +1 -1
  309. package/dist/schemas/agents-list.d.ts +40 -0
  310. package/dist/schemas/agents-list.d.ts.map +1 -1
  311. package/dist/schemas/agents.d.ts +668 -17
  312. package/dist/schemas/agents.d.ts.map +1 -1
  313. package/dist/schemas/agents.js +16 -41
  314. package/dist/schemas/agents.js.map +1 -1
  315. package/dist/schemas/auto-approve.d.ts +12 -0
  316. package/dist/schemas/auto-approve.d.ts.map +1 -0
  317. package/dist/schemas/auto-approve.js +12 -0
  318. package/dist/schemas/auto-approve.js.map +1 -0
  319. package/dist/schemas/automations.d.ts +170 -27
  320. package/dist/schemas/automations.d.ts.map +1 -1
  321. package/dist/schemas/automations.js +26 -34
  322. package/dist/schemas/automations.js.map +1 -1
  323. package/dist/schemas/bridge-heads.d.ts +57 -0
  324. package/dist/schemas/bridge-heads.d.ts.map +1 -0
  325. package/dist/schemas/bridge-heads.js +22 -0
  326. package/dist/schemas/bridge-heads.js.map +1 -0
  327. package/dist/schemas/capabilities.d.ts +21 -0
  328. package/dist/schemas/capabilities.d.ts.map +1 -1
  329. package/dist/schemas/capabilities.js +6 -0
  330. package/dist/schemas/capabilities.js.map +1 -1
  331. package/dist/schemas/checkout-hooks.d.ts +24 -0
  332. package/dist/schemas/checkout-hooks.d.ts.map +1 -0
  333. package/dist/schemas/checkout-hooks.js +23 -0
  334. package/dist/schemas/checkout-hooks.js.map +1 -0
  335. package/dist/schemas/ci-deployments.d.ts +30 -0
  336. package/dist/schemas/ci-deployments.d.ts.map +1 -0
  337. package/dist/schemas/ci-deployments.js +18 -0
  338. package/dist/schemas/ci-deployments.js.map +1 -0
  339. package/dist/schemas/ci-fleet.d.ts +216 -0
  340. package/dist/schemas/ci-fleet.d.ts.map +1 -0
  341. package/dist/schemas/ci-fleet.js +87 -0
  342. package/dist/schemas/ci-fleet.js.map +1 -0
  343. package/dist/schemas/ci.d.ts +348 -21
  344. package/dist/schemas/ci.d.ts.map +1 -1
  345. package/dist/schemas/ci.js +110 -19
  346. package/dist/schemas/ci.js.map +1 -1
  347. package/dist/schemas/command-run.d.ts +29 -0
  348. package/dist/schemas/command-run.d.ts.map +1 -0
  349. package/dist/schemas/command-run.js +20 -0
  350. package/dist/schemas/command-run.js.map +1 -0
  351. package/dist/schemas/connection-hub.d.ts +3 -1
  352. package/dist/schemas/connection-hub.d.ts.map +1 -1
  353. package/dist/schemas/connection-hub.js +2 -1
  354. package/dist/schemas/connection-hub.js.map +1 -1
  355. package/dist/schemas/context-continues.d.ts.map +1 -1
  356. package/dist/schemas/context-continues.js +2 -2
  357. package/dist/schemas/context-continues.js.map +1 -1
  358. package/dist/schemas/data-protection.d.ts +15 -2
  359. package/dist/schemas/data-protection.d.ts.map +1 -1
  360. package/dist/schemas/data-protection.js +15 -23
  361. package/dist/schemas/data-protection.js.map +1 -1
  362. package/dist/schemas/device-stacks.d.ts +131 -0
  363. package/dist/schemas/device-stacks.d.ts.map +1 -1
  364. package/dist/schemas/device-stacks.js +81 -0
  365. package/dist/schemas/device-stacks.js.map +1 -1
  366. package/dist/schemas/devices.d.ts +137 -0
  367. package/dist/schemas/devices.d.ts.map +1 -1
  368. package/dist/schemas/devices.js +11 -2
  369. package/dist/schemas/devices.js.map +1 -1
  370. package/dist/schemas/environment.d.ts +1 -0
  371. package/dist/schemas/environment.d.ts.map +1 -1
  372. package/dist/schemas/environment.js +1 -0
  373. package/dist/schemas/environment.js.map +1 -1
  374. package/dist/schemas/extension-updates.d.ts +1186 -0
  375. package/dist/schemas/extension-updates.d.ts.map +1 -1
  376. package/dist/schemas/extension-updates.js +22 -4
  377. package/dist/schemas/extension-updates.js.map +1 -1
  378. package/dist/schemas/git/git.d.ts +13 -0
  379. package/dist/schemas/git/git.d.ts.map +1 -1
  380. package/dist/schemas/git/git.js +7 -7
  381. package/dist/schemas/git/git.js.map +1 -1
  382. package/dist/schemas/git/index-run.d.ts +1 -0
  383. package/dist/schemas/git/index-run.d.ts.map +1 -1
  384. package/dist/schemas/host-power.d.ts +76 -0
  385. package/dist/schemas/host-power.d.ts.map +1 -0
  386. package/dist/schemas/host-power.js +101 -0
  387. package/dist/schemas/host-power.js.map +1 -0
  388. package/dist/schemas/hosts.d.ts +365 -0
  389. package/dist/schemas/hosts.d.ts.map +1 -1
  390. package/dist/schemas/hosts.js +33 -1
  391. package/dist/schemas/hosts.js.map +1 -1
  392. package/dist/schemas/issues.d.ts +55 -225
  393. package/dist/schemas/issues.d.ts.map +1 -1
  394. package/dist/schemas/issues.js +21 -43
  395. package/dist/schemas/issues.js.map +1 -1
  396. package/dist/schemas/keyring-native.d.ts.map +1 -1
  397. package/dist/schemas/keyring-native.js +3 -1
  398. package/dist/schemas/keyring-native.js.map +1 -1
  399. package/dist/schemas/keyring.d.ts +1 -0
  400. package/dist/schemas/keyring.d.ts.map +1 -1
  401. package/dist/schemas/keyring.js +3 -1
  402. package/dist/schemas/keyring.js.map +1 -1
  403. package/dist/schemas/maintenance.d.ts.map +1 -1
  404. package/dist/schemas/maintenance.js.map +1 -1
  405. package/dist/schemas/members.d.ts.map +1 -1
  406. package/dist/schemas/members.js +2 -14
  407. package/dist/schemas/members.js.map +1 -1
  408. package/dist/schemas/metrics.d.ts +33 -0
  409. package/dist/schemas/metrics.d.ts.map +1 -1
  410. package/dist/schemas/metrics.js +26 -0
  411. package/dist/schemas/metrics.js.map +1 -1
  412. package/dist/schemas/need-kinds.d.ts +19 -0
  413. package/dist/schemas/need-kinds.d.ts.map +1 -0
  414. package/dist/schemas/need-kinds.js +7 -0
  415. package/dist/schemas/need-kinds.js.map +1 -0
  416. package/dist/schemas/needs.d.ts +868 -27
  417. package/dist/schemas/needs.d.ts.map +1 -1
  418. package/dist/schemas/needs.js +79 -9
  419. package/dist/schemas/needs.js.map +1 -1
  420. package/dist/schemas/offload.d.ts +61 -0
  421. package/dist/schemas/offload.d.ts.map +1 -1
  422. package/dist/schemas/offload.js +14 -1
  423. package/dist/schemas/offload.js.map +1 -1
  424. package/dist/schemas/outward-action.d.ts +39 -0
  425. package/dist/schemas/outward-action.d.ts.map +1 -0
  426. package/dist/schemas/outward-action.js +40 -0
  427. package/dist/schemas/outward-action.js.map +1 -0
  428. package/dist/schemas/ports.d.ts +4 -0
  429. package/dist/schemas/ports.d.ts.map +1 -1
  430. package/dist/schemas/ports.js +3 -0
  431. package/dist/schemas/ports.js.map +1 -1
  432. package/dist/schemas/providers/capacity.d.ts +6 -0
  433. package/dist/schemas/providers/capacity.d.ts.map +1 -1
  434. package/dist/schemas/providers/plan-limits.d.ts +1 -0
  435. package/dist/schemas/providers/plan-limits.d.ts.map +1 -1
  436. package/dist/schemas/providers/plan-limits.js +1 -0
  437. package/dist/schemas/providers/plan-limits.js.map +1 -1
  438. package/dist/schemas/providers/refusals.d.ts +12 -0
  439. package/dist/schemas/providers/refusals.d.ts.map +1 -1
  440. package/dist/schemas/providers/refusals.js +4 -0
  441. package/dist/schemas/providers/refusals.js.map +1 -1
  442. package/dist/schemas/remote-access.d.ts +1 -0
  443. package/dist/schemas/remote-access.d.ts.map +1 -1
  444. package/dist/schemas/remote-access.js +1 -0
  445. package/dist/schemas/remote-access.js.map +1 -1
  446. package/dist/schemas/run-targets.d.ts.map +1 -1
  447. package/dist/schemas/run-targets.js +2 -1
  448. package/dist/schemas/run-targets.js.map +1 -1
  449. package/dist/schemas/runner-views.d.ts +24 -0
  450. package/dist/schemas/runner-views.d.ts.map +1 -0
  451. package/dist/schemas/runner-views.js +16 -0
  452. package/dist/schemas/runner-views.js.map +1 -0
  453. package/dist/schemas/sandbox-reach.d.ts +157 -0
  454. package/dist/schemas/sandbox-reach.d.ts.map +1 -0
  455. package/dist/schemas/sandbox-reach.js +112 -0
  456. package/dist/schemas/sandbox-reach.js.map +1 -0
  457. package/dist/schemas/secrets.d.ts +17 -0
  458. package/dist/schemas/secrets.d.ts.map +1 -1
  459. package/dist/schemas/secrets.js +12 -5
  460. package/dist/schemas/secrets.js.map +1 -1
  461. package/dist/schemas/settings-history.d.ts +1 -1
  462. package/dist/schemas/settings-history.d.ts.map +1 -1
  463. package/dist/schemas/settings-history.js +5 -4
  464. package/dist/schemas/settings-history.js.map +1 -1
  465. package/dist/schemas/settings-savings.d.ts +58 -0
  466. package/dist/schemas/settings-savings.d.ts.map +1 -1
  467. package/dist/schemas/settings-savings.js +22 -0
  468. package/dist/schemas/settings-savings.js.map +1 -1
  469. package/dist/schemas/settings.d.ts +20 -42
  470. package/dist/schemas/settings.d.ts.map +1 -1
  471. package/dist/schemas/settings.js +24 -7
  472. package/dist/schemas/settings.js.map +1 -1
  473. package/dist/schemas/stack-grants.d.ts +60 -0
  474. package/dist/schemas/stack-grants.d.ts.map +1 -0
  475. package/dist/schemas/stack-grants.js +33 -0
  476. package/dist/schemas/stack-grants.js.map +1 -0
  477. package/dist/schemas/system.d.ts +19 -0
  478. package/dist/schemas/system.d.ts.map +1 -1
  479. package/dist/schemas/system.js +9 -0
  480. package/dist/schemas/system.js.map +1 -1
  481. package/dist/schemas/terminal.d.ts +46 -0
  482. package/dist/schemas/terminal.d.ts.map +1 -1
  483. package/dist/schemas/terminal.js +19 -0
  484. package/dist/schemas/terminal.js.map +1 -1
  485. package/dist/schemas/watch-sources.d.ts +72 -0
  486. package/dist/schemas/watch-sources.d.ts.map +1 -0
  487. package/dist/schemas/watch-sources.js +88 -0
  488. package/dist/schemas/watch-sources.js.map +1 -0
  489. package/dist/schemas/workspace/workspace-search.d.ts.map +1 -1
  490. package/dist/schemas/workspace/workspace-search.js +1 -1
  491. package/dist/schemas/workspace/workspace-search.js.map +1 -1
  492. package/dist/schemas/wsl-memory.d.ts +76 -0
  493. package/dist/schemas/wsl-memory.d.ts.map +1 -0
  494. package/dist/schemas/wsl-memory.js +36 -0
  495. package/dist/schemas/wsl-memory.js.map +1 -0
  496. package/dist/state/auth-state.d.ts.map +1 -1
  497. package/dist/state/auth-state.js +3 -0
  498. package/dist/state/auth-state.js.map +1 -1
  499. package/dist/state/definition.d.ts +16 -8
  500. package/dist/state/definition.d.ts.map +1 -1
  501. package/dist/state/runtime-state.d.ts +1 -1
  502. package/dist/state/runtime-state.d.ts.map +1 -1
  503. package/dist/state/runtime-state.js +1 -1
  504. package/dist/state/runtime-state.js.map +1 -1
  505. package/dist/state/workspace-state.d.ts +9 -4
  506. package/dist/state/workspace-state.d.ts.map +1 -1
  507. package/dist/state/workspace-state.js +9 -4
  508. package/dist/state/workspace-state.js.map +1 -1
  509. package/dist/sync/workspace-sync-ignores.d.ts +4 -0
  510. package/dist/sync/workspace-sync-ignores.d.ts.map +1 -0
  511. package/dist/sync/workspace-sync-ignores.js +75 -0
  512. package/dist/sync/workspace-sync-ignores.js.map +1 -0
  513. package/dist/text/pages.d.ts.map +1 -1
  514. package/dist/text/pages.js +17 -4
  515. package/dist/text/pages.js.map +1 -1
  516. package/dist/text/transcript-fold.js +2 -2
  517. package/dist/text/transcript-fold.js.map +1 -1
  518. package/package.json +5 -5
  519. package/src/app-routes/app-pages.ts +3 -0
  520. package/src/app-routes/index.ts +1 -0
  521. package/src/app-routes/return-path.ts +16 -0
  522. package/src/briefs/agent-ask.ts +23 -0
  523. package/src/{chores/extension-update.ts → briefs/extension-update-brief.ts} +3 -2
  524. package/src/chores/digest.ts +1 -0
  525. package/src/chores/index.ts +13 -2
  526. package/src/chores/prompt.ts +3 -18
  527. package/src/chores/stack.ts +1 -0
  528. package/src/chores/verdict.ts +1 -0
  529. package/src/chores/workspace-scope.ts +3 -8
  530. package/src/contracts/accounts.contract.ts +3 -0
  531. package/src/contracts/agents.contract.ts +41 -5
  532. package/src/contracts/automations.contract.ts +2 -0
  533. package/src/contracts/capabilities.contract.ts +31 -2
  534. package/src/contracts/ci.contract.ts +119 -37
  535. package/src/contracts/device-ci-runners.contract.ts +81 -0
  536. package/src/contracts/device-stacks.contract.ts +97 -0
  537. package/src/contracts/extensions.contract.ts +12 -1
  538. package/src/contracts/ports.contract.ts +6 -6
  539. package/src/contracts/runner.contract.ts +117 -3
  540. package/src/contracts/runners.contract.ts +19 -0
  541. package/src/contracts/safety.contract.ts +2 -0
  542. package/src/contracts/secrets.contract.ts +39 -0
  543. package/src/contracts/settings.contract.ts +26 -0
  544. package/src/contracts/stack-grants.contract.ts +51 -0
  545. package/src/contracts/system.contract.ts +36 -62
  546. package/src/contracts/workspace.contract.ts +0 -22
  547. package/src/events/agent-events.ts +3 -2
  548. package/src/events/agent-words.test.ts +19 -1
  549. package/src/events/agent-words.ts +36 -2
  550. package/src/events/child-news.test.ts +91 -0
  551. package/src/events/child-news.ts +269 -0
  552. package/src/events/prompt-origins.ts +35 -0
  553. package/src/events/refusal-incidents.ts +60 -19
  554. package/src/events/requests.ts +18 -0
  555. package/src/events/transcript.ts +10 -1
  556. package/src/ids/conversation-ids.test.ts +3 -1
  557. package/src/ids/conversation-ids.ts +6 -4
  558. package/src/ids/project-dir.test.ts +1 -1
  559. package/src/ids/project-dir.ts +1 -1
  560. package/src/ids/project-id.test.ts +14 -0
  561. package/src/ids/project-id.ts +6 -4
  562. package/src/ids/run-row-ids.test.ts +38 -0
  563. package/src/ids/run-row-ids.ts +49 -0
  564. package/src/index.ts +6 -6
  565. package/src/models/agent-catalog.test.ts +7 -4
  566. package/src/models/agent-catalog.ts +3 -2
  567. package/src/models/agent-lanes.ts +8 -1
  568. package/src/models/agent-runtimes.ts +7 -6
  569. package/src/models/agent-standing.ts +13 -0
  570. package/src/models/model-roles.test.ts +61 -4
  571. package/src/models/model-roles.ts +153 -49
  572. package/src/models/model-setups.ts +49 -26
  573. package/src/models/provider-specs.test.ts +2 -2
  574. package/src/models/providers/provider-traits.test.ts +71 -0
  575. package/src/models/providers/provider-traits.ts +144 -0
  576. package/src/netd/browser-wire.ts +13 -0
  577. package/src/netd/generated/browser-wire.json +10 -0
  578. package/src/netd/generated/netd-wire.json +224 -1
  579. package/src/netd/generated/wire.ts +18 -6
  580. package/src/netd/wire-manifests.test.ts +16 -0
  581. package/src/policy/admin/admin-grant.ts +69 -0
  582. package/src/policy/approvals-execution.ts +11 -6
  583. package/src/policy/batch-runs.ts +2 -2
  584. package/src/policy/capabilities/capability-kinds.test.ts +112 -0
  585. package/src/policy/capabilities/capability-kinds.ts +110 -0
  586. package/src/policy/command-classes.ts +5 -3
  587. package/src/policy/credential-material.ts +1 -1
  588. package/src/policy/device-programs.ts +29 -20
  589. package/src/policy/message-limits.ts +8 -4
  590. package/src/policy/org-locks.ts +1 -0
  591. package/src/policy/overlay-lint.ts +1 -1
  592. package/src/policy/reserved-servers.ts +5 -1
  593. package/src/policy/role-capability.ts +3 -1
  594. package/src/policy/shell/command-normalise.test.ts +72 -0
  595. package/src/policy/shell/command-normalise.ts +212 -0
  596. package/src/policy/shell/workspace-root-exclude.ts +11 -0
  597. package/src/policy/tests/admin-grant.test.ts +35 -0
  598. package/src/policy/tests/command-classes.test.ts +41 -0
  599. package/src/protocol/doors/listener-protocol.ts +32 -1
  600. package/src/protocol/doors/loopback-proof.ts +34 -0
  601. package/src/protocol/doors/pass-scopes.ts +12 -0
  602. package/src/protocol/doors/runner-protocol.ts +133 -4
  603. package/src/protocol/doors/sandbox-pass.test.ts +33 -1
  604. package/src/protocol/doors/sandbox-pass.ts +92 -16
  605. package/src/protocol/doors/webext-links.ts +3 -1
  606. package/src/protocol/ingress-contract.fixture.json +5 -1
  607. package/src/protocol/member-reach.test.ts +40 -1
  608. package/src/protocol/member-reach.ts +40 -0
  609. package/src/protocol/peer-mcp-server.ts +6 -0
  610. package/src/protocol/raw/extension-protocol.ts +469 -2
  611. package/src/protocol/raw/raw-json-routes.ts +45 -1
  612. package/src/protocol/raw/raw-routes.ts +133 -40
  613. package/src/protocol/route-meta.ts +4 -1
  614. package/src/schemas/account-routes.ts +126 -0
  615. package/src/schemas/activity.ts +6 -4
  616. package/src/schemas/agent-background.ts +104 -0
  617. package/src/schemas/agent-land.ts +21 -2
  618. package/src/schemas/agent.test.ts +3 -0
  619. package/src/schemas/agent.ts +10 -4
  620. package/src/schemas/agents.ts +26 -65
  621. package/src/schemas/auto-approve.ts +31 -0
  622. package/src/schemas/automations.ts +51 -42
  623. package/src/schemas/bridge-heads.ts +33 -0
  624. package/src/schemas/capabilities.ts +23 -0
  625. package/src/schemas/checkout-hooks.ts +44 -0
  626. package/src/schemas/ci-deployments.ts +26 -0
  627. package/src/schemas/ci-fleet.ts +180 -0
  628. package/src/schemas/ci.ts +185 -45
  629. package/src/schemas/command-run.ts +44 -0
  630. package/src/schemas/compose-overlay.test.ts +1 -1
  631. package/src/schemas/compose-overlay.ts +1 -1
  632. package/src/schemas/connection-hub.ts +4 -2
  633. package/src/schemas/context-continues.ts +6 -3
  634. package/src/schemas/data-protection.ts +28 -34
  635. package/src/schemas/device-stacks.ts +162 -3
  636. package/src/schemas/device-swaps.test.ts +1 -1
  637. package/src/schemas/devices.ts +31 -2
  638. package/src/schemas/egress-private.test.ts +1 -1
  639. package/src/schemas/environment.ts +4 -0
  640. package/src/schemas/extension-updates.ts +35 -7
  641. package/src/schemas/git/git.ts +14 -14
  642. package/src/schemas/host-power.test.ts +53 -0
  643. package/src/schemas/host-power.ts +173 -0
  644. package/src/schemas/hosts.test.ts +32 -0
  645. package/src/schemas/hosts.ts +86 -2
  646. package/src/schemas/intentic-os.ts +2 -2
  647. package/src/schemas/issues.ts +43 -86
  648. package/src/schemas/keyring-native.test.ts +11 -3
  649. package/src/schemas/keyring-native.ts +3 -1
  650. package/src/schemas/keyring.ts +6 -1
  651. package/src/schemas/maintenance.ts +4 -3
  652. package/src/schemas/members.ts +4 -16
  653. package/src/schemas/metrics.test.ts +9 -1
  654. package/src/schemas/metrics.ts +43 -0
  655. package/src/schemas/need-kinds.ts +13 -0
  656. package/src/schemas/needs.ts +118 -14
  657. package/src/schemas/offload.ts +37 -3
  658. package/src/schemas/outward-action.ts +47 -0
  659. package/src/schemas/ports.ts +5 -0
  660. package/src/schemas/providers/plan-limits.ts +1 -0
  661. package/src/schemas/providers/refusals.ts +9 -0
  662. package/src/schemas/remote-access.ts +3 -0
  663. package/src/schemas/run-targets.ts +2 -1
  664. package/src/schemas/runner-views.ts +27 -0
  665. package/src/schemas/sandbox-reach.ts +161 -0
  666. package/src/schemas/secrets.ts +23 -5
  667. package/src/schemas/settings-history.ts +10 -5
  668. package/src/schemas/settings-savings.ts +29 -0
  669. package/src/schemas/settings.test.ts +24 -23
  670. package/src/schemas/settings.ts +55 -22
  671. package/src/schemas/stack-grants.ts +59 -0
  672. package/src/schemas/state-plan.test.ts +1 -1
  673. package/src/schemas/state-plan.ts +2 -2
  674. package/src/schemas/system.ts +16 -1
  675. package/src/schemas/terminal.ts +28 -0
  676. package/src/schemas/updates.test.ts +1 -1
  677. package/src/schemas/updates.ts +1 -1
  678. package/src/schemas/version-seam.test.ts +4 -1
  679. package/src/schemas/watch-sources.ts +127 -0
  680. package/src/schemas/workspace/workspace-search.ts +5 -2
  681. package/src/schemas/wsl-memory.ts +59 -0
  682. package/src/state/auth-state.ts +10 -0
  683. package/src/state/runtime-state.test.ts +3 -2
  684. package/src/state/runtime-state.ts +3 -1
  685. package/src/state/update-probation.ts +1 -1
  686. package/src/state/ways-back.test.ts +1 -1
  687. package/src/state/workspace-state.test.ts +2 -0
  688. package/src/state/workspace-state.ts +21 -21
  689. package/src/sync/workspace-sync-ignores.test.ts +48 -0
  690. package/src/sync/workspace-sync-ignores.ts +143 -0
  691. package/src/text/embed.ts +2 -2
  692. package/src/text/pages.ts +34 -7
  693. package/src/text/transcript-fold.test.ts +40 -2
  694. package/src/text/transcript-fold.ts +2 -2
  695. package/dist/chores/extension-update.d.ts.map +0 -1
  696. package/dist/chores/extension-update.js.map +0 -1
  697. package/dist/contracts/chores.contract.d.ts +0 -213
  698. package/dist/contracts/chores.contract.d.ts.map +0 -1
  699. package/dist/contracts/chores.contract.js +0 -32
  700. package/dist/contracts/chores.contract.js.map +0 -1
  701. package/dist/contracts/issues.contract.d.ts +0 -95
  702. package/dist/contracts/issues.contract.d.ts.map +0 -1
  703. package/dist/contracts/issues.contract.js +0 -50
  704. package/dist/contracts/issues.contract.js.map +0 -1
  705. package/src/chores/chores.test.ts +0 -24
  706. package/src/chores/digest.test.ts +0 -27
  707. package/src/chores/probes.integration.test.ts +0 -494
  708. package/src/chores/stack.test.ts +0 -140
  709. package/src/chores/verdict.test.ts +0 -761
  710. package/src/contracts/chores.contract.ts +0 -39
  711. package/src/contracts/issues.contract.ts +0 -53
@@ -0,0 +1,173 @@
1
+ import { z } from "zod";
2
+
3
+ /* WHAT A COMPUTER'S OWN OS DOES TO WORK LEFT RUNNING ON IT (2026-11-22). Two sandboxes on rog had sessions booked for the
4
+ night. rog's power plan put it to sleep five hours after its owner's last keypress, at 05:37, and nothing on it ran
5
+ again until the lid was opened at 10:01: a send booked for 07:10 went out three hours late, and nobody had been told
6
+ this would happen. The machine agent now reads the settings that decide this (machine `power/`) and reports each one
7
+ that would stop a sandbox's scheduled work as a finding, in its facts (`DeviceFacts.power`). The daemon raises a
8
+ `host-power` card when something is booked that one of them would stop (needs.ts), and the owner's yes runs the
9
+ agent's `power-stay-on` op (DeviceAgentOpSchema), which changes those settings on mains power and leaves battery as it
10
+ is: a laptop in a bag must still sleep.
11
+
12
+ Finding ids are strings, not an enum, so a finding a newer agent adds is one more line rather than facts that fail to
13
+ parse; `text` is the agent's own sentence for it, which a reader shows when it has no words of its own for the id. */
14
+
15
+ // The ids this build knows. Each is one setting or one OS behaviour, on one power source where that matters.
16
+ export const POWER_FINDING = {
17
+ // Windows: "Sleep after" is set, on mains power, in at least one power plan.
18
+ sleepIdle: "sleep-idle",
19
+ // Windows: "Hibernate after" is set, on mains power.
20
+ hibernateIdle: "hibernate-idle",
21
+ // Windows: closing the lid on mains power sleeps, hibernates or shuts the computer down.
22
+ lidClose: "lid-close",
23
+ // Windows Modern Standby: the network is cut while the screen is off, so a provider call from a turn fails.
24
+ standbyNetwork: "standby-network",
25
+ // Windows: on battery it still sleeps (after `afterSeconds`, or when the lid closes). Reported, never changed.
26
+ batterySleep: "battery-sleep",
27
+ // Windows Update may restart the computer outside its active hours (`window`). Never changed by `power-stay-on`; the
28
+ // agent's `update-pause` and `before-sign-in` ops answer it (`offers`, POWER_REMEDY), and `comesBack` says whether the
29
+ // computer's sandboxes start again by themselves after it or wait for somebody to sign in.
30
+ updateRestart: "update-restart",
31
+ // Linux or macOS: the OS may suspend the computer; the fix needs root, so `command` says what to run.
32
+ osSleep: "os-sleep",
33
+ } as const;
34
+
35
+ /* WHAT ANSWERS A NIGHT RESTART (2026-11-27). The card about Windows Update used to say what would happen and offer nothing
36
+ but "Not now": the restart window is Windows', and after one nothing ran until somebody signed in. Two answers, each an
37
+ agent op the owner's yes runs (DeviceAgentOpSchema): Windows Update paused until after the booked work (`update-pause`,
38
+ for the night in question), and Windows' boot task (`before-sign-in`), which starts the agent with no session, and the
39
+ agent then starts intentic's engine and the sandboxes on it, so a restart costs minutes rather than the night. The
40
+ second needs intentic's engine: Docker Desktop is a program with a window and starts only at a sign-in, so the agent
41
+ offers it only where the sandboxes run on intentic's engine. */
42
+ export const POWER_REMEDY = {
43
+ pauseUpdates: "update-pause",
44
+ beforeSignIn: "before-sign-in",
45
+ } as const;
46
+
47
+ // The longest Windows lets updates be paused for: five weeks, as its own Settings page offers.
48
+ export const UPDATE_PAUSE_MAX_MS = 35 * 24 * 3_600_000;
49
+ // Where the agent did not say when restarts may happen, how long past the booked work a pause holds.
50
+ const PAUSE_PAST_DUE_MS = 2 * 3_600_000;
51
+
52
+ export const HostPowerFindingSchema = z.object({
53
+ id: z.string().min(1).describe("Which setting or behaviour (POWER_FINDING), as a string so a newer agent's id still parses."),
54
+ power: z.enum(["ac", "dc"]).optional().describe("The power source it applies to: ac is mains, dc is battery. Absent where that does not matter."),
55
+ afterSeconds: z.number().int().positive().optional().describe("For a timeout: how long without input before it acts, the shortest across power plans."),
56
+ action: z.string().optional().describe("For the lid: what closing it does now, `sleep`, `hibernate` or `shut-down`."),
57
+ window: z
58
+ .object({
59
+ fromHour: z.number().int().min(0).max(23),
60
+ toHour: z.number().int().min(0).max(23),
61
+ })
62
+ .optional()
63
+ .describe("For an update restart: the local hours it may happen in, from `fromHour` up to `toHour` (wrapping past midnight)."),
64
+ plans: z.array(z.string()).optional().describe("Windows: the power plans that hold the value, by name. A vendor may switch between them by itself."),
65
+ fixable: z.boolean().describe("Whether the agent's `power-stay-on` op changes it."),
66
+ command: z.string().optional().describe("Where the agent cannot change it: the command a person runs on that computer."),
67
+ offers: z
68
+ .array(z.string())
69
+ .optional()
70
+ .describe("The agent ops other than `power-stay-on` that answer it (POWER_REMEDY), as strings so a newer agent's still parses."),
71
+ pausedUntil: z.number().optional().describe("For an update restart: Windows Update is paused until then (epoch ms), so it restarts nothing before it."),
72
+ restartPending: z
73
+ .boolean()
74
+ .optional()
75
+ .describe("For an update restart: an update is already installed and waiting for a restart, which a pause may not hold off."),
76
+ comesBack: z
77
+ .enum(["sign-in", "boot"])
78
+ .optional()
79
+ .catch(undefined)
80
+ .describe("For an update restart: what starts this computer's sandboxes again after it, somebody signing in or the computer starting."),
81
+ text: z.string().min(1).describe("What it does now, in the agent's words (English), for a reader with none of its own for this id."),
82
+ });
83
+ export type HostPowerFinding = z.infer<typeof HostPowerFindingSchema>;
84
+
85
+ export const HostPowerSchema = z.object({
86
+ at: z.number().describe("When the settings were read, in epoch ms."),
87
+ utcOffsetMinutes: z
88
+ .number()
89
+ .int()
90
+ .describe("The computer's local time minus UTC, in minutes, when read: what places a finding's local `window` on another clock."),
91
+ battery: z.boolean().optional().describe("Whether the computer has a battery at all."),
92
+ findings: z.array(HostPowerFindingSchema).describe("Everything its OS would do to stop or delay work left running; empty when nothing would."),
93
+ });
94
+ export type HostPower = z.infer<typeof HostPowerSchema>;
95
+
96
+ /** The findings the agent's `power-stay-on` op would change. Pure. */
97
+ export const fixablePowerFindings = (power: Pick<HostPower, "findings"> | undefined): HostPowerFinding[] =>
98
+ (power?.findings ?? []).filter((finding) => finding.fixable);
99
+
100
+ /**
101
+ * Whether `at` (epoch ms) falls inside a finding's local-hours `window` on a computer `utcOffsetMinutes` from UTC: the
102
+ * window runs from `fromHour` up to `toHour`, past midnight when `toHour` is the smaller. Pure.
103
+ */
104
+ export const insideLocalWindow = (at: number, window: NonNullable<HostPowerFinding["window"]>, utcOffsetMinutes: number): boolean => {
105
+ const local = new Date(at + utcOffsetMinutes * 60_000);
106
+ const hour = local.getUTCHours();
107
+ if (window.fromHour === window.toHour) {
108
+ return true;
109
+ }
110
+ return window.fromHour < window.toHour ? hour >= window.fromHour && hour < window.toHour : hour >= window.fromHour || hour < window.toHour;
111
+ };
112
+
113
+ /**
114
+ * When `update-pause` should hold Windows Update until, for work due at `dueAt`: the end of the first restart window
115
+ * that ends at or after it, so the night the work runs in is left alone, or two hours past it where the finding names no
116
+ * window. Undefined where that is further off than Windows lets updates be paused from `now`. Pure.
117
+ */
118
+ export const pauseUntilFor = (finding: Pick<HostPowerFinding, "window">, utcOffsetMinutes: number, now: number, dueAt: number): number | undefined => {
119
+ const window = finding.window;
120
+ let until = dueAt + PAUSE_PAST_DUE_MS;
121
+ if (window !== undefined && window.fromHour !== window.toHour) {
122
+ // The next local `toHour` o'clock at or after dueAt, on the computer's own clock.
123
+ const local = new Date(dueAt + utcOffsetMinutes * 60_000);
124
+ const end = Date.UTC(local.getUTCFullYear(), local.getUTCMonth(), local.getUTCDate(), window.toHour) - utcOffsetMinutes * 60_000;
125
+ until = end >= dueAt ? end : end + 24 * 3_600_000;
126
+ }
127
+ return until - now > UPDATE_PAUSE_MAX_MS ? undefined : until;
128
+ };
129
+
130
+ const HOUR_MS = 3_600_000;
131
+ // A local-hours window repeats daily, so a day of hour starts visits every hour it could hold.
132
+ const HOURS_A_DAY = 24;
133
+
134
+ /**
135
+ * Whether any moment from `from` to `to` (epoch ms) falls inside a local-hours window on a computer `utcOffsetMinutes`
136
+ * from UTC. The window is whole local hours, so it is enough to look at `from` and at each local hour's start up to `to`,
137
+ * for at most a day: past that the same hours only come round again. Pure.
138
+ */
139
+ export const windowMeets = (window: NonNullable<HostPowerFinding["window"]>, utcOffsetMinutes: number, from: number, to: number): boolean => {
140
+ if (insideLocalWindow(from, window, utcOffsetMinutes)) {
141
+ return true;
142
+ }
143
+ // The next local hour's start: an offset like +05:30 puts the computer's hours off UTC's.
144
+ const local = from + utcOffsetMinutes * 60_000;
145
+ let at = from - (((local % HOUR_MS) + HOUR_MS) % HOUR_MS) + HOUR_MS;
146
+ for (let step = 0; step < HOURS_A_DAY && at <= to; step += 1, at += HOUR_MS) {
147
+ if (insideLocalWindow(at, window, utcOffsetMinutes)) {
148
+ return true;
149
+ }
150
+ }
151
+ return false;
152
+ };
153
+
154
+ /**
155
+ * Whether an `update-restart` finding would stop work due at `dueAt`, read at `now`: a restart inside its hours between
156
+ * now (or the end of Windows Update's pause, if later) and the work, after which the sandboxes wait for a sign-in. Never
157
+ * where they start again with the computer (`comesBack: boot`), and at any hour where the agent did not say which. Pure.
158
+ */
159
+ export const restartBlocks = (
160
+ finding: Pick<HostPowerFinding, "window" | "pausedUntil" | "comesBack">,
161
+ utcOffsetMinutes: number,
162
+ now: number,
163
+ dueAt: number,
164
+ ): boolean => {
165
+ if (finding.comesBack === "boot") {
166
+ return false;
167
+ }
168
+ const from = Math.max(now, finding.pausedUntil ?? now);
169
+ if (from >= dueAt && finding.pausedUntil !== undefined) {
170
+ return false;
171
+ }
172
+ return finding.window === undefined || windowMeets(finding.window, utcOffsetMinutes, from, dueAt);
173
+ };
@@ -0,0 +1,32 @@
1
+ import { DevicePingSchema } from "./hosts.js";
2
+
3
+ const GIB = 1024 ** 3;
4
+
5
+ // rog on 2026-11-26: Windows at its low line, the VM holding 18.4 GiB, 1.7 GiB of its free memory in blocks under 128 KiB.
6
+ const memory = {
7
+ availableBytes: 3.2 * GIB,
8
+ totalBytes: 31.4 * GIB,
9
+ vm: { workingSetBytes: 18.4 * GIB, at: 1_800_000_000_000 },
10
+ guestFree: { reportableBytes: 1.2 * GIB, strandedBytes: 1.7 * GIB, reportingOrder: 5, at: 1_800_000_000_000 },
11
+ };
12
+
13
+ test("a heartbeat from an agent older than the VM's figures still reads, with Windows' own", () => {
14
+ expect(DevicePingSchema.parse({ ok: true, memory: { availableBytes: 3.2 * GIB, totalBytes: 31.4 * GIB } })).toEqual({
15
+ ok: true,
16
+ memory: { availableBytes: 3.2 * GIB, totalBytes: 31.4 * GIB },
17
+ });
18
+ });
19
+
20
+ test("the VM's footprint and the guest's stranded memory ride the heartbeat whole", () => {
21
+ expect(DevicePingSchema.parse({ ok: true, memory })).toEqual({ ok: true, memory });
22
+ const lowered = { ...memory, guestFree: { ...memory.guestFree, reportingOrder: 2, loweredFrom: 5 } };
23
+ expect(DevicePingSchema.parse({ ok: true, memory: lowered }).memory?.guestFree).toEqual(lowered.guestFree);
24
+ });
25
+
26
+ test("a malformed VM figure reads as missing and never costs Windows' own", () => {
27
+ const parsed = DevicePingSchema.parse({
28
+ ok: true,
29
+ memory: { ...memory, vm: { workingSetBytes: -1, at: 1 }, guestFree: { strandedBytes: "lots" } },
30
+ });
31
+ expect(parsed.memory).toEqual({ availableBytes: memory.availableBytes, totalBytes: memory.totalBytes, vm: undefined, guestFree: undefined });
32
+ });
@@ -1,5 +1,7 @@
1
1
  // hosts: the user's own connected devices (the `host` capability's live half)
2
2
  import { z } from "zod";
3
+ import { HostPowerSchema } from "./host-power.js";
4
+ import { WslMemorySchema } from "./wsl-memory.js";
3
5
  import { IntenticOsFactsSchema } from "./intentic-os.js";
4
6
  // Manifest says which machines are intended; this says which actually hold a socket now. Nothing persists across a
5
7
  // daemon restart except the enrollment itself, so a closed laptop reads offline within a heartbeat.
@@ -106,9 +108,51 @@ export const DeviceFactsSchema = z.object({
106
108
  // the machine boots, so the daemon tells the agent it may be this box's steward and the os_* tools are there. `os`
107
109
  // above stays the human name. Absent everywhere else, and from an agent older than the field.
108
110
  intenticOs: IntenticOsFactsSchema.optional(),
111
+ // (2026-11-22) What this computer's OS would do to work left running on it: a power plan that sleeps it, a lid that
112
+ // does, an update restart in the night (HostPowerSchema, host-power.ts). Said by the environment that owns those
113
+ // settings (Windows' native side, a Linux or macOS host), never by a WSL distro. Absent from an agent older than the
114
+ // field, and where the settings could not be read.
115
+ power: HostPowerSchema.optional(),
116
+ // (2026-11-26) The WSL2 VM's `memory=` and, when it is too big for this PC, the size proposed for it (WslMemorySchema,
117
+ // wsl-memory.ts). Said by Windows' own side alone, once it has read `.wslconfig`; absent everywhere else and from an
118
+ // agent older than the field.
119
+ wslMemory: WslMemorySchema.optional(),
109
120
  });
110
121
  export type DeviceFacts = z.infer<typeof DeviceFactsSchema>;
111
122
 
123
+ /* WHAT THE WSL2 VM HOLDS OF IT, AND WHAT IT HAS FREE BUT CANNOT GIVE BACK (2026-11-26). The VM hands free memory back to
124
+ Windows through free page reporting, which reports only free blocks of at least 2^page_reporting_order pages (WSL's
125
+ kernel line sets 5: 128 KiB). Free memory in smaller blocks stays charged to Windows as the VM's. On rog that day it
126
+ was 2.0-2.6 GB most of the time, and 5.3 of the 8.4 GB a cache drop had just freed. So beside Windows' own figures the
127
+ Windows side says the VM's footprint (`vm`) and, when a distro is already running to read it through (WSL is never
128
+ booted for this), the guest's free memory split at the reporting order (`guestFree`, from /proc/buddyinfo). Both are
129
+ read on their own pace, not per heartbeat, so each carries when; both are absent from an agent older than them, from a
130
+ PC whose VM is not running, and from every side but Windows'. */
131
+ const HostVmMemorySchema = z.object({
132
+ // vmmemWSL's working set: the VM's footprint in Windows' RAM, in bytes. 0: the VM was not running.
133
+ workingSetBytes: z.number().nonnegative(),
134
+ // vmmemWSL's private bytes: what Windows charges the VM, in RAM or pushed out of it, in bytes. Above the working set
135
+ // by what Windows has pushed out (3.5 GiB on rog, 2026-11-26). Absent where only the working set was read.
136
+ privateBytes: z.number().nonnegative().optional(),
137
+ // When it was read, in epoch ms.
138
+ at: z.number(),
139
+ });
140
+ export type HostVmMemory = z.infer<typeof HostVmMemorySchema>;
141
+
142
+ const GuestFreeMemorySchema = z.object({
143
+ // Free inside the VM in blocks free page reporting hands back to Windows (2^reportingOrder pages or larger), in bytes.
144
+ reportableBytes: z.number().nonnegative(),
145
+ // Free inside the VM in smaller blocks: memory the VM does not use, still charged to Windows. In bytes.
146
+ strandedBytes: z.number().nonnegative(),
147
+ // The kernel's page_reporting_order as read.
148
+ reportingOrder: z.number().int().nonnegative(),
149
+ // The order the agent lowered it from, while it holds it lowered (machine `environments/wsl-page-reporting.ts`).
150
+ loweredFrom: z.number().int().nonnegative().optional(),
151
+ // When it was read, in epoch ms.
152
+ at: z.number(),
153
+ });
154
+ export type GuestFreeMemory = z.infer<typeof GuestFreeMemorySchema>;
155
+
112
156
  /* THE HOST'S OWN MEMORY, ON EVERY HEARTBEAT (2026-11-02). A sandbox on a Windows PC runs inside Docker Desktop's WSL2
113
157
  VM, so everything it reads about memory (its cgroup, the VM's /proc/meminfo) is the VM's. On 2026-11-02 rog's Windows
114
158
  was down to 1.1 GB available while the VM held 20 GB, half of it file cache, and the sandbox's heavy-command queue
@@ -121,6 +165,9 @@ const HostMemorySchema = z.object({
121
165
  // Physical memory the OS could hand out now (Windows' ullAvailPhys, standby cache included), in bytes.
122
166
  availableBytes: z.number().nonnegative(),
123
167
  totalBytes: z.number().positive(),
168
+ // A malformed one reads as missing rather than costing the sandbox Windows' own figures above.
169
+ vm: HostVmMemorySchema.optional().catch(undefined),
170
+ guestFree: GuestFreeMemorySchema.optional().catch(undefined),
124
171
  });
125
172
  export type HostMemory = z.infer<typeof HostMemorySchema>;
126
173
 
@@ -167,7 +214,7 @@ const GIB = 1024 ** 3;
167
214
  below it. Windows' memory manager trims working sets and pages hard well before it reaches zero: rog froze with 1.1 GB
168
215
  left, so the floor sits above that. A tenth scales it with the machine, where one browser or a game can take a few
169
216
  gigabytes in a second and 1.5 GiB of a 64 GiB machine is no margin at all. */
170
- const HOST_LOW_FLOOR_BYTES = 1.5 * GIB;
217
+ export const HOST_LOW_FLOOR_BYTES = 1.5 * GIB;
171
218
  const HOST_LOW_SHARE = 0.1;
172
219
  export const hostMemoryLowBytes = (totalBytes: number): number => Math.max(HOST_LOW_FLOOR_BYTES, HOST_LOW_SHARE * totalBytes);
173
220
 
@@ -210,6 +257,36 @@ export const DeviceFeatureSchema = z.enum([
210
257
  // (2026-11-20) `remoteService`: remoted's Windows service for the lock screen and administrator prompts, read,
211
258
  // installed and removed (schemas/device-remote.ts). Advertised by a Windows agent that advertises `remote`.
212
259
  "remote-service",
260
+ // (2026-11-22) The `power-stay-on` agent op: the power settings that would sleep this computer through scheduled work
261
+ // (`DeviceFacts.power`), changed on mains power by `intentic-machine power stay-on`. Advertised where the agent can
262
+ // change them itself, which is Windows' native side.
263
+ "power",
264
+ // (2026-11-23) run_command's `admin`: the command run as the signed-in person's administrator, with no UAC prompt,
265
+ // through intentic-remoted's Windows service, under the card's "Run commands as administrator" switch. Advertised by
266
+ // a Windows agent that advertises `remote-service`; an agent without it would drop the field and run the command
267
+ // unelevated, so the daemon refuses `admin` to it rather than forward it.
268
+ "admin-run",
269
+ // (2026-11-24) `ci_runners`, `ci_runner_action`, `ci_runner_logs`, `ci_runner_register` and `ci_runner_remove`: the
270
+ // self-hosted GitHub Actions runners on this computer, read and driven from the Pipelines view
271
+ // (schemas/ci-fleet.ts). Advertised by a Linux agent: the runners are systemd units.
272
+ "ci-runners",
273
+ // (2026-11-25) `deploy_stack`'s managed fields (schemas/device-stacks.ts DeployStackToolArgsSchema): a daemon-rendered
274
+ // `.env`, `images` mode (pull, never build), registry logins kept in the stack's own docker config, pre/post-deploy
275
+ // hooks, a health wait, image pins and adopting a stopped project; and every stack recording the sandbox that
276
+ // deployed it, with ops, logs and deploys from any other sandbox refused (stack-grants.ts, and the Deployments extension that owns managed stacks). An agent without it
277
+ // rejects those fields, so the daemon sends them only to one that advertises this.
278
+ "stacks-managed",
279
+ // (2026-11-25) `host_stats`: disk free under Docker's root and the stacks folder, memory and load, for the deploys
280
+ // monitor's low-disk and low-memory alerts (HostStatsSchema in schemas/device-stacks.ts).
281
+ "host-stats",
282
+ // (2026-11-26) The `wsl-memory` agent op: `memory=` in this PC's `.wslconfig` rewritten to the size the owner approved
283
+ // on a card (`DeviceFacts.wslMemory`), by `intentic-machine wsl-memory apply`. Advertised by Windows' own side.
284
+ "wsl-memory",
285
+ // (2026-11-27) The `update-pause` and `before-sign-in` agent ops, the two answers to Windows Update restarting the PC at
286
+ // night (host-power.ts, `update-restart`): Windows Update paused until after work booked here, and Windows' boot task
287
+ // that starts the agent, and with it intentic's engine and its sandboxes, before anyone signs in. Advertised by
288
+ // Windows' own side.
289
+ "power-restart",
213
290
  ]);
214
291
  export type DeviceFeature = z.infer<typeof DeviceFeatureSchema>;
215
292
  export const DEVICE_FEATURE_RESHAPE_LATER: DeviceFeature = "reshape-later";
@@ -227,10 +304,17 @@ export const DEVICE_FEATURE_REACH_NETWORK: DeviceFeature = "reach-network";
227
304
  export const DEVICE_FEATURE_SANDBOX_MOVE: DeviceFeature = "sandbox-move";
228
305
  export const DEVICE_FEATURE_FILE_COPY: DeviceFeature = "file-copy";
229
306
  export const DEVICE_FEATURE_STACKS: DeviceFeature = "stacks";
307
+ export const DEVICE_FEATURE_CI_RUNNERS: DeviceFeature = "ci-runners";
230
308
  export const DEVICE_FEATURE_REMOTE: DeviceFeature = "remote";
231
309
  export const DEVICE_FEATURE_REMOTE_ICE: DeviceFeature = "remote-ice";
232
310
  export const DEVICE_FEATURE_REMOTE_SERVICE: DeviceFeature = "remote-service";
233
- // What `ic features --json` answers (_sandbox/ic/src/features.rs, golden/ic-features.json): the optional ops that ic
311
+ export const DEVICE_FEATURE_POWER: DeviceFeature = "power";
312
+ export const DEVICE_FEATURE_ADMIN_RUN: DeviceFeature = "admin-run";
313
+ export const DEVICE_FEATURE_STACKS_MANAGED: DeviceFeature = "stacks-managed";
314
+ export const DEVICE_FEATURE_HOST_STATS: DeviceFeature = "host-stats";
315
+ export const DEVICE_FEATURE_WSL_MEMORY: DeviceFeature = "wsl-memory";
316
+ export const DEVICE_FEATURE_POWER_RESTART: DeviceFeature = "power-restart";
317
+ // What `ic features --json` answers (_hosts/ic/src/features.rs, golden/ic-features.json): the optional ops that ic
234
318
  // implements, as strings, since a newer ic's word means nothing to an older agent.
235
319
  export const IcFeaturesAnswerSchema = z.object({ features: z.array(z.string()) });
236
320
 
@@ -1,6 +1,6 @@
1
1
  import { z } from "zod";
2
2
 
3
- // INTENTIC OS (2026-10-13): the immutable Linux that boots straight into Intentic (_os/README.md). Everything that changes
3
+ // INTENTIC OS (2026-10-13): the immutable Linux that boots straight into Intentic (_hosts/README.md). Everything that changes
4
4
  // the OS goes through `ic os`, and everything that calls it reads ic's JSON rather than bootc's. This is that JSON as the
5
5
  // TypeScript side reads it, and the argv every caller spells it with: the machine agent's os_* tools run it, and a page
6
6
  // that cannot reach the machine can print it for a person to type. golden/intentic-os.json holds an example of each
@@ -130,7 +130,7 @@ export const icOsRebootArgs = (): string[] => ["os", "reboot"];
130
130
  export const icOsChannelArgs = (channel: IntenticOsChannel): string[] => ["os", "channel", IntenticOsChannelSchema.parse(channel)];
131
131
 
132
132
  // THE MACHINE'S OWN SETTINGS (2026-10-16): the network, the sound, the screen, the keyboard and the drives a person plugs
133
- // in, each a verb of `ic os` (_os/README.md, "Settings"). The desktop app's This computer cards, its status bar and the
133
+ // in, each a verb of `ic os` (_hosts/README.md, "Settings"). The desktop app's This computer cards, its status bar and the
134
134
  // machine agent's tools all read these shapes, so a person and the agent in the machine's own sandbox change the same
135
135
  // things the same way ("connect to the guest Wi-Fi"). ic reads NetworkManager, WirePlumber, sway and udisks for them:
136
136
  // nothing that calls ic speaks to those.
@@ -1,11 +1,11 @@
1
- // Inbound bug reports from the owner's own sites and apps, grouped by fingerprint
2
- // (.intentic/records/issues/<fingerprint>.json, one file per group).
1
+ // Bug reports from the owner's own sites and apps, as they travel: what the reporter SDK sends, what an intake's
2
+ // automation is configured with, and what one sandbox of the owner's account reports to another. The inbox they are
3
+ // grouped into (.intentic/records/issues/, one file per fingerprint) is the issues extension's own since 2026-11-26, and
4
+ // so are its shapes.
3
5
  import { z } from "zod";
4
- import { entryId } from "./internal.js";
5
6
 
6
- // Three shapes: `IssueReportSchema` (untrusted, from a stranger's POST), `IssueSchema` (the daemon's per-fingerprint
7
- // group with a count and latest sample), and `IssuesConfigSchema`/`IssuePublicConfigSchema` (owner settings vs. what
8
- // the SDK reads back). Imported as types only, so zod never reaches a browser.
7
+ // `IssueReportSchema` (untrusted, from a stranger's POST), and `IssuesConfigSchema`/`IssuePublicConfigSchema` (owner
8
+ // settings vs. what the SDK reads back). Imported as types only, so zod never reaches a browser.
9
9
 
10
10
  // `crash` and `detection` group under one fingerprint with a rising count; `report` never groups, since two people's
11
11
  // own words are two different things.
@@ -55,8 +55,11 @@ export const IssueReportSchema = z.object({
55
55
  });
56
56
  export type IssueReport = z.infer<typeof IssueReportSchema>;
57
57
 
58
- // POSTed to /intake/<id>/report: the report plus what the gate needs (client id, anti-bot answer) but never stores —
59
- // keeps the stored sample pure evidence, not doorman's paperwork.
58
+ // POSTed to an intake's report door: the report plus what the gate needs (client id, anti-bot answer) but never stores,
59
+ // which keeps the stored sample pure evidence, not doorman's paperwork. Since 2026-11-26 the door is the issues
60
+ // extension's (/door/intentic.issues/<id>/report), where the key travels as `?key=` and a proof of work in the door's
61
+ // headers; `powNonce` and `key` are what an SDK from before then puts in the body at /intake/<id>/report, which the
62
+ // daemon still forwards there.
60
63
  export const IssueIngestSchema = z.object({
61
64
  report: IssueReportSchema,
62
65
  // Per-minute limit key; distinct from the daily budget below.
@@ -69,20 +72,6 @@ export const IssueIngestSchema = z.object({
69
72
  });
70
73
  export type IssueIngest = z.infer<typeof IssueIngestSchema>;
71
74
 
72
- // `investigating` is set only by the daemon when a turn actually starts (a wake, or the Investigate button); never
73
- // guessed, never settable by a click.
74
- export const IssueStatusSchema = z.enum(["open", "investigating", "resolved", "ignored"]);
75
- export type IssueStatus = z.infer<typeof IssueStatusSchema>;
76
-
77
- // Store only the conversation id for an issue run.
78
- export const IssueRunSchema = z.object({
79
- conversationId: z.string().describe("The conversation this run became."),
80
- at: z.number().describe("When it started, in milliseconds."),
81
- // Lets a post-fix recurrence read as "it came back", not "already looked at".
82
- atCount: z.number().describe("How many times it had happened when this run started."),
83
- });
84
- export type IssueRun = z.infer<typeof IssueRunSchema>;
85
-
86
75
  // Who reported it, when the reporter was another sandbox on the owner's account (account-level report routing). Read
87
76
  // from the platform-signed pass, except `conversationId`, which the sending daemon names for its own conversation.
88
77
  export const IssueSenderSchema = z.object({
@@ -90,6 +79,20 @@ export const IssueSenderSchema = z.object({
90
79
  sandboxName: z.string().max(120).describe("Its name on your account."),
91
80
  project: z.string().max(200).describe("The project it reported about, as this sandbox claims it."),
92
81
  conversationId: z.string().max(120).optional().describe("The conversation over there that reported it."),
82
+ person: z
83
+ .string()
84
+ .max(254)
85
+ .optional()
86
+ .describe("The person that conversation acts for, as the platform signed it and this sandbox's roster knows them: attribution only."),
87
+ crossesOrg: z
88
+ .object({
89
+ from: z.object({ id: z.string().max(64), name: z.string().max(120) }).optional(),
90
+ to: z.object({ id: z.string().max(64), name: z.string().max(120) }).optional(),
91
+ })
92
+ .optional()
93
+ .describe(
94
+ "Set when the reporting sandbox and this one are not in the same organisation, as the platform signed it: `from` is the reporter's organisation, `to` this sandbox's; a side in none is absent.",
95
+ ),
93
96
  });
94
97
  export type IssueSender = z.infer<typeof IssueSenderSchema>;
95
98
 
@@ -106,6 +109,16 @@ export const AccountReportSchema = z.object({
106
109
  });
107
110
  export type AccountReport = z.infer<typeof AccountReportSchema>;
108
111
 
112
+ // (2026-11-26) An admitted account report as the receiving door hands it to the extension that keeps the issues inbox
113
+ // (its `account-report` fire handler, the fire's payload as JSON): the problem, how many arrivals it stands for, and the
114
+ // sender as the platform's pass named it, which the inbox keeps outside everything the reporter wrote.
115
+ export const AccountReportFiledSchema = z.object({
116
+ report: AccountProblemSchema,
117
+ times: z.number().int().min(1).max(10_000),
118
+ sender: IssueSenderSchema,
119
+ });
120
+ export type AccountReportFiled = z.infer<typeof AccountReportFiledSchema>;
121
+
109
122
  // The sending side, over loopback from the `projects report` command: a problem for whichever sandbox on the owner's
110
123
  // account claims `project`, and what came of it (delivered now, waiting in the outbox, or refused for good).
111
124
  export const AccountSendSchema = z.object({
@@ -135,62 +148,18 @@ export const AccountOutboxSchema = z.object({
135
148
  export type AccountOutbox = z.infer<typeof AccountOutboxSchema>;
136
149
  export const AccountProjectsSchema = z.object({ projects: z.array(z.string()) });
137
150
 
138
- // One group; the id is the fingerprint and the filename, never in the body, so a body cannot disagree with its own
139
- // grouping.
140
- export const IssueSchema = z.object({
141
- kind: IssueKindSchema,
142
- // Derived from the report, never typed, so two recurrences of one crash can't end up under two titles.
143
- title: z.string().min(1).max(300).describe("The one line this is listed under."),
144
- culprit: z.string().max(300).optional().describe("The frame it came from, when the stack named one."),
145
- // A workspace can run several intakes (one per site); the inbox is one list across all of them.
146
- automationId: entryId.describe("Which intake received it."),
147
- // Absent for a keyed client (mobile app, server) with no Origin header to send.
148
- origin: z.string().max(400).optional().describe("Which site it came from."),
149
- firstSeen: z.number().describe("When it first happened, in milliseconds."),
150
- lastSeen: z.number().describe("When it last happened, in milliseconds."),
151
- count: z.number().describe("How many times this exact thing has arrived."),
152
- status: IssueStatusSchema.default("open").describe("Where it stands with you."),
153
- statusAt: z.number().optional().describe("When the status last changed, in milliseconds."),
154
- release: z.string().max(200).optional().describe("The build the latest one came from."),
155
- // Latest, not first: a fix must match what it looks like now, not a build that may no longer exist.
156
- sample: IssueReportSchema.describe("The most recent one, in full."),
157
- // Escalation rule lives in this number: fires once when new, again only once count has moved this far past it.
158
- // Stored, since a restart can't derive it from a count and timestamp.
159
- firedAt: z.number().optional().describe("What the count stood at the last time this woke an agent."),
160
- runs: z.array(IssueRunSchema).max(20).optional().describe("The turns started for it."),
161
- // Set only by the daemon, from a pass the platform signed: never a field a reporter can type.
162
- sender: IssueSenderSchema.optional().describe("The sandbox on your account that reported the latest one, when another sandbox did."),
163
- });
164
- export type Issue = z.infer<typeof IssueSchema>;
165
-
166
- // The list row: the stored group plus its filename id (the fingerprint).
167
- export const IssueSummarySchema = IssueSchema.extend({ id: entryId.describe("The issue's id, which is its fingerprint.") });
168
- export type IssueSummary = z.infer<typeof IssueSummarySchema>;
169
-
170
- // `invalid`: nothing but the daemon writes these files, so one that fails to parse is a bug in this daemon or a
171
- // half-written volume, worth surfacing not skipping.
172
- export const IssuesListSchema = z.object({
173
- issues: z.array(IssueSummarySchema).describe("The inbox, most recently seen first."),
174
- invalid: z.array(z.string()).describe("Files in the issues directory that could not be read at all."),
175
- });
176
- export type IssuesList = z.infer<typeof IssuesListSchema>;
177
-
178
- export const IssueIdParamSchema = z.object({ id: entryId.describe("Which issue.") });
179
- // `investigating` is not offered here: the daemon sets it when a turn actually starts, so a click can't fake the one
180
- // status that means something.
181
- export const IssueStatusInputSchema = z.object({
182
- id: entryId.describe("Which issue."),
183
- status: z.enum(["open", "resolved", "ignored"]).describe("Where it now stands with you."),
184
- });
185
- export type IssueStatusInput = z.infer<typeof IssueStatusInputSchema>;
186
-
187
151
  // Present only on `issues` listener automations. `allowedOrigins` is not here: it lives on the trigger, since the
188
152
  // ingest route reads it as the admission gate, not a rendering choice.
189
153
  export const IssuesConfigSchema = z.object({
190
154
  // Ingest key lives in the secrets store (`AutomationSummary.ingestKey`), not here — an abuse label the origin
191
- // allowlist and ceilings actually bound, not a secret.
192
- // Off by default: a leaked key in a public bundle is the commonest abuse, and the allowlist is what limits it.
193
- keyFromBrowsers: z.boolean().optional().describe("Let a browser report with the key alone, rather than only from a site you listed. Off unless you need it."),
155
+ // allowlist and ceilings actually bound, not a secret. `keyFromBrowsers` left for the listener trigger (2026-11-26),
156
+ // where any extension's public door reads it; the automations file's conversion moves a stored one there. It stays
157
+ // accepted here, read by nothing, because a runner of an older release still speaks it inside an automation need's
158
+ // event (the runner door lags in the field: _tools/checks/lib/release-doors.mjs).
159
+ keyFromBrowsers: z
160
+ .boolean()
161
+ .optional()
162
+ .describe("Deprecated: moved to the listener trigger. Let a browser report with the key alone, rather than only from a site you listed."),
194
163
  // Per UTC day, counted in reports that reach the store; absent means ISSUES_DAILY_MAX_DEFAULT, never uncapped.
195
164
  dailyReportMax: z.number().int().positive().optional().describe("How many reports a day this intake accepts at all."),
196
165
  // Wakes an agent on new, then again once count has grown this much since the last wake; absent means
@@ -233,18 +202,6 @@ export type IssuePublicConfig = z.infer<typeof IssuePublicConfigSchema>;
233
202
  export const IssueAcceptedSchema = z.object({ ok: z.literal(true), id: z.string() });
234
203
  export type IssueAccepted = z.infer<typeof IssueAcceptedSchema>;
235
204
 
236
- // Which origins loaded this intake's SDK, and which were turned away: a snippet never pasted and one pasted on a
237
- // disallowed origin both look like "no reports".
238
- export const IssueInstallSchema = z.object({
239
- origin: z.string(),
240
- allowed: z.boolean(),
241
- lastSeenAt: z.number(),
242
- loads: z.number(),
243
- });
244
- export const IssueInstallsSchema = z.object({ origins: z.array(IssueInstallSchema) });
245
- export type IssueInstalls = z.infer<typeof IssueInstallsSchema>;
246
- export const IssueIntakeIdParamSchema = z.object({ automationId: entryId.describe("Which intake.") });
247
-
248
205
  // Constants both the editor and the route need, so a limit is visible to the owner before it is hit.
249
206
 
250
207
  // Default daily ceiling; higher than the Visitor chat's 200 since a report is only sometimes a turn (dedup decides),
@@ -1,4 +1,4 @@
1
- import { KEYRING_NAME_RE, KeyringCaptureOutcomeSchema, KeyringRefusalCodeSchema } from "./keyring.js";
1
+ import { KeyringCaptureOutcomeSchema, KeyringRefusalCodeSchema, KeyringSecretNameSchema } from "./keyring.js";
2
2
  import { KeyringNativeNameSchema, KeyringNativeOutcomeSchema, KeyringNativeRefusalCodeSchema } from "./keyring-native.js";
3
3
 
4
4
  // keyring-native.ts spells three of keyring.ts's schemas again so the browser extension's bundle never reaches keyring.ts
@@ -7,7 +7,15 @@ import { KeyringNativeNameSchema, KeyringNativeOutcomeSchema, KeyringNativeRefus
7
7
  test("the extension's copies of keyring.ts's names, refusals and outcomes are the same", () => {
8
8
  expect(KeyringNativeRefusalCodeSchema.options).toEqual(KeyringRefusalCodeSchema.options);
9
9
  expect(KeyringNativeOutcomeSchema.options).toEqual(KeyringCaptureOutcomeSchema.options);
10
- for (const name of ["GITHUB_COM", "_1PASSWORD", "a", "1BAD", "has-dash", ""]) {
11
- expect(KeyringNativeNameSchema.safeParse(name).success).toBe(KEYRING_NAME_RE.test(name));
10
+ for (const name of ["GITHUB_COM", "_1PASSWORD", "a", "1BAD", "has-dash", "", "__proto__", "constructor", "prototype"]) {
11
+ expect(KeyringNativeNameSchema.safeParse(name).success).toBe(KeyringSecretNameSchema.safeParse(name).success);
12
12
  }
13
13
  });
14
+
15
+ test("a secret's name is never one Object.prototype already has, since it keys the vault's plain objects", () => {
16
+ for (const name of ["__proto__", "constructor", "toString", "hasOwnProperty", "valueOf", "prototype"]) {
17
+ expect(KeyringSecretNameSchema.safeParse(name).success).toBe(false);
18
+ }
19
+ expect(KeyringSecretNameSchema.safeParse("CONSTRUCTOR").success).toBe(true);
20
+ expect(KeyringSecretNameSchema.safeParse("_proto").success).toBe(true);
21
+ });
@@ -20,7 +20,9 @@ const id = string().min(1).max(64);
20
20
  const host = string().min(1).max(253);
21
21
 
22
22
  /** keyring.ts's secret name, refusal code and capture outcome, as the extension sees them. */
23
- export const KeyringNativeNameSchema = string().regex(/^[A-Za-z_][A-Za-z0-9_]{0,127}$/u);
23
+ export const KeyringNativeNameSchema = string()
24
+ .regex(/^[A-Za-z_][A-Za-z0-9_]{0,127}$/u)
25
+ .refine((key) => !(key in Object.prototype) && key !== "prototype");
24
26
  export const KeyringNativeRefusalCodeSchema = zEnum([
25
27
  "no-keyring",
26
28
  "locked",
@@ -14,9 +14,14 @@ export const KeyringPublicKeySchema = z.string().regex(KEYRING_KEY_RE).describe(
14
14
  // One secret's name, the same shape a sandbox secret's name and a reference to it take (SECRET_KEY_RE), so a shared
15
15
  // entry is spent, typed and listed exactly like a sandbox-held one.
16
16
  export const KEYRING_NAME_RE = /^[A-Za-z_][A-Za-z0-9_]{0,127}$/u;
17
+ // A name that keys a plain object in the keyring's vault (entries by name, phones by device) is never one of
18
+ // Object.prototype's members: `entries["constructor"]` would read the prototype's function instead of nothing, and an
19
+ // assignment to `entries["__proto__"]` would swap the dictionary's prototype for a peer's value.
20
+ export const isVaultKey = (key: string): boolean => !(key in Object.prototype) && key !== "prototype";
17
21
  export const KeyringSecretNameSchema = z
18
22
  .string()
19
23
  .regex(KEYRING_NAME_RE)
24
+ .refine(isVaultKey, "not a name Object.prototype already has (`constructor`, `__proto__`, `toString`, ...)")
20
25
  .describe("The secret's name, as a reference to it carries it: a letter or underscore, then letters, digits or `_`.");
21
26
 
22
27
  export const KeyringShareModeSchema = z
@@ -431,7 +436,7 @@ export type KeyringPendingNeed = z.infer<typeof KeyringPendingNeedSchema>;
431
436
  // way a Windows Hello signature is. Pairing is carried by a sandbox both are linked to, with both fingerprints shown.
432
437
  export const KeyringPhoneKeysSchema = z
433
438
  .object({
434
- device: z.string().min(1).max(128).describe("The phone, by its device card."),
439
+ device: z.string().min(1).max(128).refine(isVaultKey, "not a name Object.prototype already has").describe("The phone, by its device card."),
435
440
  label: z.string().min(1).max(200).describe("The phone's name for people, `Pixel 8`."),
436
441
  seal: KeyringPublicKeySchema,
437
442
  presence: z.string().min(1).max(512).describe("The presence key, X.509 SubjectPublicKeyInfo DER, base64."),
@@ -1,8 +1,9 @@
1
1
  // maintenance: the standing evidence a chore is decided from
2
2
  import { z } from "zod";
3
- // The daemon serves facts, never a verdict: which chore is due is computed by shared code
4
- // (`@intentic/sandbox-contract/chores`) so the tile and panel can't disagree. Split by cost: probes (subprocesses,
5
- // cached with a TTL) vs signals (cheap, recomputed per request).
3
+ // FROZEN (2026-11-26), with the `chores` subpath whose types it gives: the maintenance extension's backend measures and
4
+ // serves this evidence now (its src/chores/schema.ts), and the daemon's GET /chores, POST /chores/probe and
5
+ // POST /chores/ledger are gone. Kept for that subpath until extension API 3.0.0, and for the extension-readiness schemas
6
+ // at the bottom, which the extensions contract reads and which stay.
6
7
 
7
8
  export const PROBE_IDS = ["outdated", "audit", "knip", "jscpd", "ui", "bundle", "mutation"] as const;
8
9
  export const ProbeIdSchema = z.enum(PROBE_IDS);