@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
@@ -1,9 +1,12 @@
1
+ import { MODEL_ROLE_ID, MODEL_ROLE_ID_MAX, type ModelRoleContribution } from "@intentic/extension-manifest";
1
2
  import { z } from "zod";
2
3
 
3
4
  // Every job that picks a model, one row per job; the unit is the role, not a difficulty tier. A job runs on the setup it
4
5
  // was put on (model-setups.ts), an ordered fallback ladder it shares with every other job put there; a job on none, or
5
- // on an empty one, is off (helper) or falls back to the caller's own chat model (run). Adding a role is one row here, settings, resolver
6
- // and daemon all read this table.
6
+ // on an empty one, is off (helper) or falls back to the caller's own chat model (run). This table holds the sandbox's
7
+ // own jobs; an extension declares the jobs it starts runs for (`contributes.modelRoles`), and the daemon serves both
8
+ // (`GET /settings/model-roles`), which the settings page and every reader that resolves a job by id read.
9
+ // (2026-11-26) Until then this table also listed six extensions' jobs, so a job could not come and go with its extension.
7
10
 
8
11
  export const ModelRoleKindSchema = z.enum(["helper", "run"]);
9
12
  export type ModelRoleKind = z.infer<typeof ModelRoleKindSchema>;
@@ -13,9 +16,8 @@ export type ModelRoleKind = z.infer<typeof ModelRoleKindSchema>;
13
16
  export const PRESET_SETUPS = ["low", "medium", "high"] as const;
14
17
  export type PresetSetup = (typeof PRESET_SETUPS)[number];
15
18
 
16
- // `id` is a bare string here; narrowed to the role union on `ModelRoleSpec` below, since that union derives from this
17
- // table via `satisfies`.
18
- interface ModelRoleRow {
19
+ // One job, the sandbox's own or an extension's. `id` is a bare string: an extension's job is named by its declaration.
20
+ export interface ModelRoleSpec {
19
21
  readonly id: string;
20
22
  // The owner's own words for the job; never a difficulty tier.
21
23
  readonly label: string;
@@ -29,8 +31,9 @@ interface ModelRoleRow {
29
31
  readonly setup: PresetSetup;
30
32
  }
31
33
 
32
- // Ids are wire-stable (`AgentTurn.runRole`); order is the settings page's: one-shot helpers first, then whole sessions.
33
- export const MODEL_ROLES = [
34
+ // Ids are wire-stable (`AgentTurn.job`, `runRole`); order is the settings page's: one-shot helpers first, then whole sessions,
35
+ // then the enabled extensions' jobs.
36
+ export const CORE_MODEL_ROLES = [
34
37
  {
35
38
  id: "commit-message",
36
39
  label: "Commit messages",
@@ -105,6 +108,102 @@ export const MODEL_ROLES = [
105
108
  icon: "server",
106
109
  setup: "low",
107
110
  },
111
+ {
112
+ // Started by a person's press on a failure the app cannot settle by itself (agentFix.ts in the editor): a sync that
113
+ // conflicts, a push the remote refuses, a commit a hook refuses, a dev server that crashed, a build that failed.
114
+ id: "workflow-fix",
115
+ label: "Workflow fixes",
116
+ blurb: "The agent started by Fix with agent on a failed sync, push, commit, run or build.",
117
+ kind: "run",
118
+ icon: "wrench",
119
+ setup: "high",
120
+ },
121
+ {
122
+ id: "approval-queue",
123
+ label: "Approvals queue",
124
+ blurb: "The turn that publishes or acts on what you approved.",
125
+ kind: "run",
126
+ icon: "check-circle",
127
+ setup: "medium",
128
+ },
129
+ {
130
+ id: "extension-review",
131
+ label: "Extension update reviews",
132
+ blurb: "The agent that reads an extension update before it is applied.",
133
+ kind: "run",
134
+ icon: "box",
135
+ setup: "medium",
136
+ },
137
+ {
138
+ id: "loop-iteration",
139
+ label: "Loop iterations",
140
+ blurb: "Each round of a loop working towards its goal.",
141
+ kind: "run",
142
+ icon: "repeat",
143
+ setup: "high",
144
+ },
145
+ ] as const satisfies readonly ModelRoleSpec[];
146
+
147
+ // One of the sandbox's own jobs.
148
+ export type CoreModelRole = (typeof CORE_MODEL_ROLES)[number]["id"];
149
+ // Any job's id, the sandbox's own or one an extension declares: what `AgentTurn.job` and the keys of `roleSetups` hold.
150
+ export type ModelRole = string;
151
+
152
+ const CORE_IDS = new Set<string>(CORE_MODEL_ROLES.map((role) => role.id));
153
+ export const isCoreModelRole = (id: string): id is CoreModelRole => CORE_IDS.has(id);
154
+
155
+ /** One of the sandbox's own jobs by id, or undefined for an extension's (or nobody's). */
156
+ export const coreModelRole = (id: string): ModelRoleSpec | undefined => CORE_MODEL_ROLES.find((role) => role.id === id);
157
+
158
+ // A string, not the table's enum (2026-11-26): an extension's job is named by its declaration, which the contract cannot
159
+ // list. A run naming a job nobody declares opens on the caller's own model, as a run naming none does.
160
+ export const ModelRoleSchema = z
161
+ .string()
162
+ .max(MODEL_ROLE_ID_MAX)
163
+ .regex(MODEL_ROLE_ID, "a job's id is lowercase words joined by dashes")
164
+ .describe("A job's id: one of the sandbox's own (`commit-message`, `loop-iteration`) or one an enabled extension declares (`pipeline-fix`).");
165
+
166
+ // One job as the daemon serves it to the settings page (`GET /settings/model-roles`): the sandbox's own and every
167
+ // installed extension's, an extension's switched off kept in the list so a page placing jobs keeps its stored choice.
168
+ export const ModelRoleEntrySchema = z.object({
169
+ id: ModelRoleSchema,
170
+ label: z.string().min(1).describe("What the settings page calls the job."),
171
+ blurb: z.string().min(1).describe("One sentence on what starts it, beyond the label."),
172
+ kind: ModelRoleKindSchema.describe("`helper`: a one-shot call the sandbox makes. `run`: a whole session."),
173
+ icon: z.string().min(1).describe("A name from the host's icon set."),
174
+ setup: z.enum(PRESET_SETUPS).describe("The preset it runs on until it is placed, and where it goes when placed again."),
175
+ extension: z.string().min(1).optional().describe("The extension that declares it (`publisher.name`); absent on the sandbox's own jobs."),
176
+ enabled: z.boolean().describe("False while the extension that declares it is switched off: its job is not shown, and the owner's choice for it is kept."),
177
+ });
178
+ export type ModelRoleEntry = z.infer<typeof ModelRoleEntrySchema>;
179
+
180
+ export const ModelRolesSchema = z.object({
181
+ roles: z.array(ModelRoleEntrySchema).describe("The sandbox's own jobs, then each installed extension's, in the settings page's order."),
182
+ });
183
+ export type ModelRoles = z.infer<typeof ModelRolesSchema>;
184
+
185
+ /** A job an extension declares, as it is served: always a whole session, suggested `medium` unless it says otherwise. */
186
+ export const contributedModelRole = (declared: ModelRoleContribution, extension: string, enabled: boolean): ModelRoleEntry => ({
187
+ id: declared.id,
188
+ label: declared.label,
189
+ blurb: declared.explanation,
190
+ kind: "run",
191
+ icon: declared.icon ?? "wrench",
192
+ setup: declared.setup ?? "medium",
193
+ extension,
194
+ enabled,
195
+ });
196
+
197
+ /** The sandbox's own jobs as served. */
198
+ export const coreModelRoleEntries = (): ModelRoleEntry[] => CORE_MODEL_ROLES.map((role) => ({ ...role, enabled: true }));
199
+
200
+ // (2026-11-26) The six jobs this table held for extensions until they declared them in their manifests
201
+ // (`contributes.modelRoles`), as the table had them, by the extension that now declares each. Frozen, and read only where
202
+ // the past is: a daemon older than extension API 2.52.0 serves no job list and knows these as its own, so the settings
203
+ // page shows them from here (docs/architecture/app-plane.md, older daemons); and the 2026-10-12 settings conversion
204
+ // placed jobs in the table's order of that day (settings-history.ts). `refactor-run` belongs to nobody: nothing has
205
+ // started it since the Health tab went (2026-11-18), and it stays only so a stored choice naming it still reads.
206
+ export const EXTENSION_ROLES_BEFORE_CONTRIBUTIONS = [
108
207
  {
109
208
  id: "pipeline-fix",
110
209
  label: "Pipeline fixes",
@@ -112,6 +211,7 @@ export const MODEL_ROLES = [
112
211
  kind: "run",
113
212
  icon: "wave-pulse",
114
213
  setup: "high",
214
+ extension: "intentic.pipelines",
115
215
  },
116
216
  {
117
217
  id: "deployment-fix",
@@ -120,16 +220,7 @@ export const MODEL_ROLES = [
120
220
  kind: "run",
121
221
  icon: "server",
122
222
  setup: "high",
123
- },
124
- {
125
- // Started by a person's press on a failure the app cannot settle by itself (agentFix.ts in the editor): a sync that
126
- // conflicts, a push the remote refuses, a commit a hook refuses, a dev server that crashed, a build that failed.
127
- id: "workflow-fix",
128
- label: "Workflow fixes",
129
- blurb: "The agent started by Fix with agent on a failed sync, push, commit, run or build.",
130
- kind: "run",
131
- icon: "wrench",
132
- setup: "high",
223
+ extension: "intentic.deployments",
133
224
  },
134
225
  {
135
226
  id: "maintenance-chore",
@@ -138,16 +229,16 @@ export const MODEL_ROLES = [
138
229
  kind: "run",
139
230
  icon: "wrench",
140
231
  setup: "medium",
232
+ extension: "intentic.maintenance",
141
233
  },
142
234
  {
143
235
  id: "refactor-run",
144
236
  label: "Refactors",
145
- // Started from the Health tab, removed with iq (2026-11-18). The id stays: every saved roleSetups names it, and a
146
- // newer editor reads an older daemon's settings with this enum.
147
237
  blurb: "Kept so settings saved before the Health tab was removed still read; nothing starts a refactor run now.",
148
238
  kind: "run",
149
239
  icon: "hammer",
150
240
  setup: "high",
241
+ extension: undefined,
151
242
  },
152
243
  {
153
244
  id: "documentation-run",
@@ -156,6 +247,7 @@ export const MODEL_ROLES = [
156
247
  kind: "run",
157
248
  icon: "book",
158
249
  setup: "medium",
250
+ extension: "intentic.documentation",
159
251
  },
160
252
  {
161
253
  id: "acceptance-run",
@@ -164,37 +256,49 @@ export const MODEL_ROLES = [
164
256
  kind: "run",
165
257
  icon: "list-check",
166
258
  setup: "high",
259
+ extension: "intentic.acceptance",
167
260
  },
168
- {
169
- id: "approval-queue",
170
- label: "Approvals queue",
171
- blurb: "The turn that publishes or acts on what you approved.",
172
- kind: "run",
173
- icon: "check-circle",
174
- setup: "medium",
175
- },
176
- {
177
- id: "extension-review",
178
- label: "Extension update reviews",
179
- blurb: "The agent that reads an extension update before it is applied.",
180
- kind: "run",
181
- icon: "box",
182
- setup: "medium",
183
- },
184
- {
185
- id: "loop-iteration",
186
- label: "Loop iterations",
187
- blurb: "Each round of a loop working towards its goal.",
188
- kind: "run",
189
- icon: "repeat",
190
- setup: "high",
191
- },
192
- ] as const satisfies readonly ModelRoleRow[];
261
+ ] as const satisfies readonly (ModelRoleSpec & { readonly extension: string | undefined })[];
262
+
263
+ // The order the table held every job in until 2026-11-26, the six above among the sandbox's own.
264
+ const ORDER_BEFORE_CONTRIBUTIONS = [
265
+ "commit-message",
266
+ "session-title",
267
+ "safety-judge",
268
+ "loop-verdict",
269
+ "handoff-summary",
270
+ "spoken-reply",
271
+ "model-router",
272
+ "subagent-sizing",
273
+ "pipeline-fix",
274
+ "deployment-fix",
275
+ "workflow-fix",
276
+ "maintenance-chore",
277
+ "refactor-run",
278
+ "documentation-run",
279
+ "acceptance-run",
280
+ "approval-queue",
281
+ "extension-review",
282
+ "loop-iteration",
283
+ ] as const;
193
284
 
194
- export type ModelRole = (typeof MODEL_ROLES)[number]["id"];
195
- export type ModelRoleSpec = ModelRoleRow & { readonly id: ModelRole };
285
+ // The ids `AgentTurn.runRole` takes: every job the table held until 2026-11-26, frozen. A schema a door's far end reads in
286
+ // the field may only grow (_tools/checks/lib/release-doors.mjs), so this enum stays as it was beside the open `job` that
287
+ // names an extension's job; every daemon reads `runRole`, and one from before ignores `job`.
288
+ export const RunRoleSchema = z.enum(ORDER_BEFORE_CONTRIBUTIONS);
289
+ export type RunRole = z.infer<typeof RunRoleSchema>;
196
290
 
197
- export const MODEL_ROLE_IDS = MODEL_ROLES.map((role) => role.id) as readonly ModelRole[];
291
+ /** How a turn names its job: `runRole` for one every daemon knows, `job` for one only a newer daemon does. */
292
+ export const jobFields = (role: ModelRole): { readonly runRole: RunRole } | { readonly job: ModelRole } => {
293
+ const known = RunRoleSchema.safeParse(role);
294
+ return known.success ? { runRole: known.data } : { job: role };
295
+ };
198
296
 
199
- // Enum, not a string: an id outside this table names nothing, so it should fail loudly rather than be ignored.
200
- export const ModelRoleSchema = z.enum(MODEL_ROLE_IDS as [ModelRole, ...ModelRole[]]);
297
+ /** Every job the table held until 2026-11-26, in its order then: what a daemon from before served, and what the 2026-10-12 conversion placed. */
298
+ export const ROLES_BEFORE_CONTRIBUTIONS: readonly ModelRoleSpec[] = ORDER_BEFORE_CONTRIBUTIONS.map((id) => {
299
+ const spec = coreModelRole(id) ?? EXTENSION_ROLES_BEFORE_CONTRIBUTIONS.find((role) => role.id === id);
300
+ if (spec === undefined) {
301
+ throw new Error(`model-roles: "${id}" is in neither table`);
302
+ }
303
+ return spec;
304
+ });
@@ -3,13 +3,13 @@ import { type ModelPin, ModelPinSchema } from "../schemas/agent.js";
3
3
  import { isEndpointProvider } from "./agent-catalog.js";
4
4
  import { compareModelIds, modelRungOf } from "./model-order.js";
5
5
  import type { ModelSource } from "./model-pins.js";
6
- import { MODEL_ROLE_IDS, MODEL_ROLES, type ModelRole, PRESET_SETUPS, type PresetSetup } from "./model-roles.js";
6
+ import { coreModelRole, type ModelRole, type ModelRoleSpec, PRESET_SETUPS, type PresetSetup, ROLES_BEFORE_CONTRIBUTIONS } from "./model-roles.js";
7
7
 
8
8
  // A setup is a named, ordered list of models that any number of jobs run on: edited once, used by every job put there.
9
9
  // Every sandbox has three, Low, Medium and High, worked out from the accounts it has connected until the owner edits
10
- // one; the owner adds any others. New settings place every job on its catalog preset (model-roles.ts `setup`).
11
- // Saved assignments stay as written: a job left out runs on nothing. Every reader resolves a job through here,
12
- // daemon and browser alike, so the settings page shows what will run.
10
+ // one; the owner adds any others. Until a job is placed, every job runs on its suggested preset (model-roles.ts `setup`,
11
+ // or its extension's declaration). Saved assignments stay as written: a job left out runs on nothing. Every reader
12
+ // resolves a job through here, daemon and browser alike, so the settings page shows what will run.
13
13
 
14
14
  export const MODEL_SETUP_ID = /^[a-z0-9][a-z0-9-]{0,39}$/;
15
15
 
@@ -28,24 +28,32 @@ export type ModelSetup = z.infer<typeof ModelSetupSchema>;
28
28
 
29
29
  export const isPresetSetup = (id: string): id is PresetSetup => PRESET_SETUPS.some((preset) => preset === id);
30
30
 
31
- // The settings a job's models are read from; a slice, so a caller holding only these two can resolve.
31
+ // The settings a job's models are read from; a slice, so a caller holding only these two can resolve. `roleSetups` absent
32
+ // is a sandbox that never placed its jobs: each runs on its suggested preset. (2026-11-26) Until then the schema wrote
33
+ // the suggestions down at the first save of any setting, so an extension installed later found its jobs on none.
32
34
  export interface SetupSettings {
33
35
  readonly modelSetups: readonly ModelSetup[];
34
- readonly roleSetups: Partial<Record<ModelRole, string>>;
36
+ readonly roleSetups?: Readonly<Partial<Record<ModelRole, string>>> | undefined;
35
37
  }
36
38
 
37
- const SUGGESTED = new Map<ModelRole, PresetSetup>(MODEL_ROLES.map((role) => [role.id, role.setup]));
39
+ // What a job is suggested, which resolution reads when the sandbox never placed its jobs: the sandbox's own job's from its
40
+ // table by id; an extension's from its declaration, which a caller holding the job list passes (`suggested`). An id
41
+ // nobody declares is suggested nothing, so such a sandbox runs it on none.
42
+ const coreSuggestion = (role: ModelRole): PresetSetup | undefined => coreModelRole(role)?.setup;
38
43
 
39
- /** The preset suggested for a job when it is placed. */
40
- export const suggestedSetup = (role: ModelRole): PresetSetup => SUGGESTED.get(role) ?? `medium`;
44
+ /** The preset suggested for one of the sandbox's own jobs when it is placed; an extension's says its own (`setup`). */
45
+ export const suggestedSetup = (role: ModelRole): PresetSetup => coreSuggestion(role) ?? `medium`;
41
46
 
42
47
  // First entry wins: a hand-edited file holding one id twice means the earlier, as everywhere else a list is read.
43
48
  export const storedSetup = (settings: Pick<SetupSettings, "modelSetups">, id: string): ModelSetup | undefined =>
44
49
  settings.modelSetups.find((setup) => setup.id === id);
45
50
 
46
- /** The setup a job runs on, or undefined while it is on none (never placed, or placed on a setup that is gone). */
47
- export const roleSetupId = (settings: SetupSettings, role: ModelRole): string | undefined => {
48
- const assigned = settings.roleSetups[role];
51
+ /**
52
+ * The setup a job runs on, or undefined while it is on none (left out of a saved map, placed on a setup that is gone, or
53
+ * never placed and suggested nothing).
54
+ */
55
+ export const roleSetupId = (settings: SetupSettings, role: ModelRole, suggested: PresetSetup | undefined = coreSuggestion(role)): string | undefined => {
56
+ const assigned = settings.roleSetups === undefined ? suggested : settings.roleSetups[role];
49
57
  return assigned !== undefined && (isPresetSetup(assigned) || storedSetup(settings, assigned) !== undefined) ? assigned : undefined;
50
58
  };
51
59
 
@@ -66,7 +74,8 @@ export const setupLadder = (settings: Pick<SetupSettings, "modelSetups">, id: st
66
74
  return isPresetSetup(id) ? { kind: `preset`, preset: id } : NO_MODELS;
67
75
  };
68
76
 
69
- export const roleLadder = (settings: SetupSettings, role: ModelRole): SetupLadder => setupLadder(settings, roleSetupId(settings, role));
77
+ export const roleLadder = (settings: SetupSettings, role: ModelRole, suggested: PresetSetup | undefined = coreSuggestion(role)): SetupLadder =>
78
+ setupLadder(settings, roleSetupId(settings, role, suggested));
70
79
 
71
80
  /** True only for a ladder that can never name a model, whatever is connected: a written list left empty. */
72
81
  export const ladderIsEmpty = (ladder: SetupLadder): boolean => ladder.kind === `pins` && ladder.pins.length === 0;
@@ -116,37 +125,51 @@ export const ladderPins = (ladder: SetupLadder, sources: readonly ModelSource[])
116
125
  ladder.kind === `pins` ? ladder.pins : presetPins(ladder.preset, sources);
117
126
 
118
127
  /** The models a job runs on, in try order, before readiness filters them (model-pins.ts `readyChain`). */
119
- export const rolePins = (settings: SetupSettings, role: ModelRole, sources: readonly ModelSource[]): readonly ModelPin[] =>
120
- ladderPins(roleLadder(settings, role), sources);
128
+ export const rolePins = (
129
+ settings: SetupSettings,
130
+ role: ModelRole,
131
+ sources: readonly ModelSource[],
132
+ suggested: PresetSetup | undefined = coreSuggestion(role),
133
+ ): readonly ModelPin[] => ladderPins(roleLadder(settings, role, suggested), sources);
134
+
135
+ // Setups made from per-job lists: every job that held a list is placed, so the map holds a setup for each it names.
136
+ export interface RoleListSetups {
137
+ readonly modelSetups: ModelSetup[];
138
+ readonly roleSetups: Record<ModelRole, string>;
139
+ }
121
140
 
122
141
  /**
123
142
  * Setups for a set of per-job lists, the shape settings had before setups (2026-10-12): jobs holding the same list share
124
143
  * one setup, a list most of whose jobs are suggested one preset becomes that preset while it is free, and the rest are
125
144
  * new setups. A job with no list, or an empty one, ran on nothing and is left on none. Exported for the settings
126
- * history and for tests that want a job on exact models.
145
+ * history and for tests that want a job on exact models. `roles` is the jobs it reads, in order: by default every job the
146
+ * table held until 2026-11-26, the conversion's own.
127
147
  */
128
- export const setupsFromRoleLists = (lists: Partial<Record<ModelRole, readonly ModelPin[]>>): SetupSettings & { modelSetups: ModelSetup[] } => {
148
+ export const setupsFromRoleLists = (
149
+ lists: Partial<Record<ModelRole, readonly ModelPin[]>>,
150
+ roles: readonly Pick<ModelRoleSpec, "id" | "setup">[] = ROLES_BEFORE_CONTRIBUTIONS,
151
+ ): RoleListSetups => {
129
152
  const modelSetups: ModelSetup[] = [];
130
- const roleSetups: Partial<Record<ModelRole, string>> = {};
131
- const groups = new Map<string, ModelRole[]>();
132
- for (const role of MODEL_ROLE_IDS) {
133
- const list = lists[role];
153
+ const roleSetups: Record<ModelRole, string> = {};
154
+ const groups = new Map<string, Pick<ModelRoleSpec, "id" | "setup">[]>();
155
+ for (const role of roles) {
156
+ const list = lists[role.id];
134
157
  if (list !== undefined && list.length > 0) {
135
158
  const key = JSON.stringify(list);
136
159
  groups.set(key, [...(groups.get(key) ?? []), role]);
137
160
  }
138
161
  }
139
162
  let made = 0;
140
- for (const roles of groups.values()) {
141
- const pins = lists[roles[0]!] ?? [];
163
+ for (const group of groups.values()) {
164
+ const pins = lists[group[0]!.id] ?? [];
142
165
  // The preset most of these jobs are suggested; a tie goes to the first job's, the table's own order.
143
- const votes = roles.map(suggestedSetup);
166
+ const votes = group.map((role) => role.setup);
144
167
  const preset = votes.toSorted((a, b) => votes.filter((vote) => vote === b).length - votes.filter((vote) => vote === a).length)[0]!;
145
168
  const free = storedSetup({ modelSetups }, preset) === undefined;
146
169
  const id = free ? preset : `setup-${++made}`;
147
170
  modelSetups.push(free ? { id, pins: [...pins] } : { id, name: `Setup ${made}`, pins: [...pins] });
148
- for (const role of roles) {
149
- roleSetups[role] = id;
171
+ for (const role of group) {
172
+ roleSetups[role.id] = id;
150
173
  }
151
174
  }
152
175
  return { modelSetups, roleSetups };
@@ -1,9 +1,6 @@
1
1
  // A held item is dated this far out (an ordinary scheduledAt), to catch a mis-click before it's public.
2
2
  export const APPROVAL_HOLD_MS = 60_000;
3
3
 
4
- // Platforms reachable by a stored API credential alone; the rest need a turn to drive the logged-in browser.
5
- export const DIRECT_PUBLISH_PLATFORMS: ReadonlySet<string> = new Set(["discord"]);
6
-
7
4
  // The workspace-relative directory both prompts below name, spelled once.
8
5
  const APPROVALS_DIR = ".intentic/config/approvals";
9
6
 
@@ -16,9 +13,17 @@ const WRITE_BACK = [
16
13
  `owner can act on, then move to the next one instead of retrying in a loop.`,
17
14
  ];
18
15
 
16
+ // What a platform's own extension says a publishing turn should know about posting there (a card's `channel.posting`,
17
+ // 2026-11-26): the Reddit rule that a comment's permalink nests the reply under that comment lived here until then.
18
+ export interface PostingNote {
19
+ // The platform as its card names it ("Reddit").
20
+ readonly platform: string;
21
+ readonly note: string;
22
+ }
23
+
19
24
  // Names the files directly rather than saying "go look": the daemon already decided what's due, and a re-deriving turn
20
25
  // could disagree. Writes the outcome back into the same file, since that's where the queue reads it.
21
- export const publishTurnPrompt = (posts: readonly { readonly id: string; readonly platform: string }[]): string =>
26
+ export const publishTurnPrompt = (posts: readonly { readonly id: string; readonly platform: string }[], notes: readonly PostingNote[] = []): string =>
22
27
  [
23
28
  `Publish these approved posts, which are due now. They live in ${APPROVALS_DIR}/, one JSON file each:`,
24
29
  ``,
@@ -29,10 +34,10 @@ export const publishTurnPrompt = (posts: readonly { readonly id: string; readonl
29
34
  ` ${WRITE_BACK[1]}`,
30
35
  `2. Post exactly its "content": with its "title", "target" and "media", using that platform's skill.`,
31
36
  ` A "target" that is a URL means this post is a REPLY to whatever is at it: open that exact URL and`,
32
- ` reply where it lands. On reddit a comment permalink (.../comments/<post>/<slug>/<comment>/) has to`,
33
- ` nest under that comment rather than becoming a new top-level comment on the thread.`,
37
+ ` reply where it lands, under the one comment it names if it names one.`,
34
38
  `3. ${WRITE_BACK[2]} ${WRITE_BACK[3]}`,
35
39
  ` ${WRITE_BACK[4]}`,
40
+ ...(notes.length === 0 ? [] : [``, `What each platform's own extension adds:`, ...notes.map(({ platform, note }) => `- ${platform}: ${note}`)]),
36
41
  ``,
37
42
  `Never rewrite the content: the owner approved these exact words. Never touch a file not listed above.`,
38
43
  ].join(`\n`);
@@ -1,5 +1,5 @@
1
1
  import { STATE_DIR } from "@intentic/constants";
2
- import type { ModelRole } from "../models/model-roles.js";
2
+ import { jobFields, type ModelRole } from "../models/model-roles.js";
3
3
 
4
4
  // One batch run engine for every surface that fans an isolated agent turn out over items and reads results off disk.
5
5
  // Backed by files, not a pack's own store, with derived conversation ids that join the fleet via a GET /agents filter,
@@ -102,7 +102,7 @@ export const batchTurnBody = (params: {
102
102
  conversationId: params.conversationId,
103
103
  isolated: true,
104
104
  unattended: true,
105
- runRole: params.role,
105
+ ...jobFields(params.role),
106
106
  ...(params.pick === undefined ? {} : runPickFields(params.pick)),
107
107
  ...params.extra,
108
108
  });
@@ -1,7 +1,11 @@
1
- // The longest one message may be on each platform, declared once: the approvals inbox counts a post against it (over it,
2
- // a post does not post), the daemon refuses a direct publish past it, and each messaging gateway spills a reply into a
3
- // follow-up message there. Measured in JavaScript string length (UTF-16 code units), which never undercounts a
4
- // platform that counts characters. A platform absent here has no known cap.
1
+ // FROZEN (2026-11-26, extension API 2.54.0): a platform's one-message limit is what the card naming it declares
2
+ // (`channel.messageLimit` in its extension's manifest), which the gateways, the approvals inbox and a publishing backend
3
+ // read. Nothing in the repository reads this table except the approvals inbox facing a daemon from before 2.54.0, whose
4
+ // cards declare none. It stays because the extension wire records this subpath (@intentic/extension-api/wire), and
5
+ // leaves at extension API 3.0.0 as a pure delete; never add a platform here.
6
+ //
7
+ // The longest one message may be on each platform, as that daemon knew it. Measured in JavaScript string length (UTF-16
8
+ // code units), which never undercounts a platform that counts characters. A platform absent here has no known cap.
5
9
  export const MESSAGE_LIMITS = {
6
10
  bluesky: 300,
7
11
  discord: 2_000,
@@ -74,6 +74,7 @@ export const ORG_SECTION_ROUTES = {
74
74
  "extensions.applyUpdate",
75
75
  "extensions.revert",
76
76
  "extensions.setUpdatePolicy",
77
+ "extensions.setUpdateDefaults",
77
78
  "extensions.devSet",
78
79
  "extensions.devClear",
79
80
  "extensions.devReload",
@@ -0,0 +1,11 @@
1
+ // The name of the folder a command run at the workspace root should step over, handed to it in its environment: every
2
+ // automation guard gets the reference shelf's (automations/watch/watch-condition.ts), and the maintenance extension's
3
+ // probes get it at the workspace root only, since inside one repository a `refs/` directory is ordinary project content.
4
+ // In the `chores` subpath until 2026-11-26, which re-exports it until extension API 3.0.0.
5
+ export const WORKSPACE_ROOT_EXCLUDE_ENV = `INTENTIC_WORKSPACE_ROOT_EXCLUDE`;
6
+
7
+ // Unquoted parameter expansion is intentional: when the variable is absent it contributes zero arguments;
8
+ // when present, each expression expands to one whitespace-free CLI argument. The daemon supplies the value
9
+ // from @intentic/workspace-ignore, never from user input.
10
+ export const WORKSPACE_ROOT_RG_EXCLUDE_ARG = `\${${WORKSPACE_ROOT_EXCLUDE_ENV}:+--glob=!/\${${WORKSPACE_ROOT_EXCLUDE_ENV}}/**}`;
11
+ export const WORKSPACE_ROOT_JSCPD_EXCLUDE_ARG = `\${${WORKSPACE_ROOT_EXCLUDE_ENV}:+--ignore=\${${WORKSPACE_ROOT_EXCLUDE_ENV}}/**}`;
@@ -61,6 +61,10 @@ export const ListenerMessageSchema = z.object({
61
61
  // Prior channel messages fetched when tagged; top-level so it reaches the model but skips the activity feed.
62
62
  history: z.array(ListenerHistoryEntrySchema).optional(),
63
63
  timestamp: z.string(),
64
+ // (2026-11-26) Only the automation with this id hears it (still held to its own filters, sender rules and the
65
+ // owner's floor): a source with one automation per door (an intake) names the one the message came through, so
66
+ // another listening to everything is not woken too. Absent, every automation whose filters admit it.
67
+ automationId: z.string().min(1).optional(),
64
68
  // Provider-specific fields, for example:
65
69
  // - discord message: guildId, attachments
66
70
  // - slack message: threadTs, teamId, attachments
@@ -78,6 +82,13 @@ export interface ListenerTurnOpened {
78
82
  readonly link?: string;
79
83
  }
80
84
 
85
+ // A wake held for a person: which one, the conversation it will run in, and where a person opens that in the app.
86
+ export interface ListenerHeldWake {
87
+ readonly id: string;
88
+ readonly conversationId?: string;
89
+ readonly link?: string;
90
+ }
91
+
81
92
  // One piece of the agent's work as a status line shows it: what kind of work, on what, and how it went. Never the
82
93
  // call's output. `delegate` is a subagent the turn started, its target the task it was given.
83
94
  export interface ListenerStep {
@@ -111,6 +122,9 @@ export interface ListenerDispatchFrame {
111
122
  readonly plan?: readonly ListenerPlanItem[];
112
123
  // The wake waits for a person's approval before anything runs; the sentence to say where the message came from.
113
124
  readonly held?: string;
125
+ // (2026-11-26) Beside `held`: the held wake's id, and the conversation it runs in once a person lets it, so the
126
+ // sender can link it now (a later message on its thread continues that conversation too).
127
+ readonly heldWake?: ListenerHeldWake;
114
128
  // The wake waits for other turns of this automation to finish first; the sentence to say why.
115
129
  readonly queued?: string;
116
130
  // The message went into the turn already running in its thread instead of starting one; that turn answers it.
@@ -45,7 +45,9 @@ export const WEBEXT_MEDIA_SOURCE_HEADER = "x-intentic-source";
45
45
  export const WEBEXT_UPLOAD_TOOL = "upload_file";
46
46
 
47
47
  // The ChatGPT kit's send, whose `files` (sandbox paths) are ticketed the same way, one ticket per file, into its
48
- // `tickets` in the same order.
48
+ // `tickets` in the same order. (2026-11-26) The kit is the chatgpt extension's now (_extensions/chatgpt); this stays
49
+ // because the browser extension runs the kit as tools of its own and refuses a file without its ticket, at every
50
+ // version in the field, whether the agent or that extension's `browser` half calls it.
49
51
  export const WEBEXT_CHATGPT_SEND_TOOL = "chatgpt_send";
50
52
 
51
53
  // How long a file ticket waits to be collected; the extension collects it before it asks the person anything.