toolroll 0.9.54 → 0.9.56

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 (350) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/README.md +29 -12
  3. package/dist/action-ledger.d.ts +2 -4
  4. package/dist/action-ledger.js +2 -10
  5. package/dist/agent-onboard.js +4 -1
  6. package/dist/approval-policy.d.ts +5 -5
  7. package/dist/approval-policy.js +4 -4
  8. package/dist/approval-rules-ui.d.ts +3 -2
  9. package/dist/approval-rules-ui.js +17 -22
  10. package/dist/assignment-ui.d.ts +3 -2
  11. package/dist/assignment-ui.js +4 -11
  12. package/dist/backup-ui.d.ts +2 -1
  13. package/dist/backup-ui.js +16 -27
  14. package/dist/brand-mark.d.ts +3 -2
  15. package/dist/brand-mark.js +4 -4
  16. package/dist/browser/workspace.css +1 -1
  17. package/dist/browser/workspace.js +25 -25
  18. package/dist/browser-shell.d.ts +2 -1
  19. package/dist/browser-shell.js +9 -9
  20. package/dist/browser-workspace.d.ts +14 -15
  21. package/dist/browser-workspace.js +0 -3
  22. package/dist/budget-alerts.js +3 -3
  23. package/dist/chat-actions.d.ts +23 -18
  24. package/dist/chat-actions.js +110 -88
  25. package/dist/chat-ask.d.ts +2 -2
  26. package/dist/chat-ask.js +5 -5
  27. package/dist/chat-channel.d.ts +15 -15
  28. package/dist/chat-channel.js +20 -20
  29. package/dist/chat-controls.d.ts +0 -4
  30. package/dist/chat-controls.js +0 -1
  31. package/dist/chat-core.js +1 -1
  32. package/dist/chat-delivery-state.js +2 -2
  33. package/dist/chat-delivery.d.ts +2 -2
  34. package/dist/chat-delivery.js +27 -34
  35. package/dist/chat-flow.js +3 -3
  36. package/dist/chat-messages.d.ts +1 -1
  37. package/dist/chat-messages.js +4 -4
  38. package/dist/chat-migration.d.ts +1 -1
  39. package/dist/chat-migration.js +11 -11
  40. package/dist/chat-polish.d.ts +5 -4
  41. package/dist/chat-polish.js +9 -10
  42. package/dist/chat-rooms.js +3 -3
  43. package/dist/chat-warmth.d.ts +2 -2
  44. package/dist/check-levels-ui.d.ts +2 -1
  45. package/dist/check-levels-ui.js +26 -53
  46. package/dist/cli.d.ts +3 -1
  47. package/dist/cli.js +15 -10
  48. package/dist/coding-shipping-ui.d.ts +2 -1
  49. package/dist/coding-shipping-ui.js +6 -6
  50. package/dist/coding-ui.d.ts +3 -1
  51. package/dist/coding-ui.js +30 -29
  52. package/dist/contracts/chat-actions.d.ts +32 -27
  53. package/dist/contracts/chat-actions.js +29 -11
  54. package/dist/contracts/chat-content.d.ts +1 -1
  55. package/dist/contracts/chat-content.js +1 -1
  56. package/dist/contracts/chat-tables.js +4 -4
  57. package/dist/contracts/cli.d.ts +1 -3
  58. package/dist/contracts/console-api.d.ts +7 -7
  59. package/dist/contracts/console-api.js +13 -12
  60. package/dist/contracts/flow-propose.d.ts +3 -3
  61. package/dist/contracts/flow.d.ts +132 -125
  62. package/dist/contracts/flow.js +27 -12
  63. package/dist/contracts/health.d.ts +1 -3
  64. package/dist/contracts/lead-context.d.ts +1 -1
  65. package/dist/contracts/lead-context.js +2 -2
  66. package/dist/contracts/lead-tools.d.ts +20 -18
  67. package/dist/contracts/lead-tools.js +15 -15
  68. package/dist/contracts/stage-output.d.ts +1 -1
  69. package/dist/contracts/stage-output.js +1 -1
  70. package/dist/contracts/store-json.d.ts +23 -22
  71. package/dist/contracts/store-json.js +17 -17
  72. package/dist/contracts/{teammate-turn.d.ts → subagent-turn.d.ts} +5 -5
  73. package/dist/contracts/{teammate-turn.js → subagent-turn.js} +7 -7
  74. package/dist/control-ui.d.ts +5 -4
  75. package/dist/control-ui.js +9 -34
  76. package/dist/converse.d.ts +23 -23
  77. package/dist/converse.js +28 -28
  78. package/dist/coordinator-proposals.d.ts +2 -2
  79. package/dist/coordinator-proposals.js +1 -1
  80. package/dist/coordinator.js +1 -1
  81. package/dist/credentials-ui.d.ts +5 -4
  82. package/dist/credentials-ui.js +23 -24
  83. package/dist/demo-chat.d.ts +3 -3
  84. package/dist/demo-chat.js +29 -76
  85. package/dist/deprecations.d.ts +12 -0
  86. package/dist/deprecations.js +20 -0
  87. package/dist/desktop-update-gate.js +8 -4
  88. package/dist/desktop-update.js +6 -1
  89. package/dist/discord-chat.js +6 -6
  90. package/dist/discord-settings.d.ts +3 -2
  91. package/dist/discord-settings.js +17 -42
  92. package/dist/dispatch.d.ts +1 -1
  93. package/dist/dispatch.js +1 -1
  94. package/dist/envelope.js +10 -1
  95. package/dist/evidence-pack.d.ts +2 -1
  96. package/dist/evidence-pack.js +45 -49
  97. package/dist/export-ui.d.ts +7 -2
  98. package/dist/export-ui.js +4 -10
  99. package/dist/export.js +7 -7
  100. package/dist/flow-engine.d.ts +2 -2
  101. package/dist/flow-engine.js +21 -21
  102. package/dist/flow-gallery-ui.d.ts +4 -3
  103. package/dist/flow-gallery-ui.js +28 -43
  104. package/dist/flow-insights.d.ts +1 -1
  105. package/dist/flow-share.js +13 -8
  106. package/dist/flow-starters-ui.d.ts +2 -1
  107. package/dist/flow-starters-ui.js +12 -15
  108. package/dist/flow-steps.d.ts +5 -5
  109. package/dist/flow-steps.js +19 -19
  110. package/dist/flow-triggers.d.ts +2 -1
  111. package/dist/flow-triggers.js +17 -15
  112. package/dist/flows-cli.js +1 -1
  113. package/dist/flows-ui.d.ts +4 -3
  114. package/dist/flows-ui.js +38 -49
  115. package/dist/flows.js +21 -20
  116. package/dist/guides.js +112 -6
  117. package/dist/html.d.ts +76 -0
  118. package/dist/html.js +173 -0
  119. package/dist/integrations-ui.d.ts +2 -1
  120. package/dist/integrations-ui.js +19 -23
  121. package/dist/invoke.js +1 -1
  122. package/dist/kits-ui.d.ts +5 -4
  123. package/dist/kits-ui.js +22 -24
  124. package/dist/kits.d.ts +12 -12
  125. package/dist/kits.js +31 -31
  126. package/dist/knowledge-ui.d.ts +6 -5
  127. package/dist/knowledge-ui.js +26 -25
  128. package/dist/{mate-cli.d.ts → lead-cli.d.ts} +11 -11
  129. package/dist/{mate-cli.js → lead-cli.js} +38 -38
  130. package/dist/lead-commitments.js +4 -4
  131. package/dist/lead-context.d.ts +12 -2
  132. package/dist/lead-context.js +15 -17
  133. package/dist/{mate-contract.d.ts → lead-contract.d.ts} +3 -3
  134. package/dist/{mate-contract.js → lead-contract.js} +7 -6
  135. package/dist/{mate-doors.d.ts → lead-doors.d.ts} +6 -6
  136. package/dist/{mate-doors.js → lead-doors.js} +24 -24
  137. package/dist/lead-follow.d.ts +5 -5
  138. package/dist/lead-follow.js +9 -9
  139. package/dist/lead-people.d.ts +5 -5
  140. package/dist/lead-people.js +14 -14
  141. package/dist/{mate-progress.d.ts → lead-progress.d.ts} +9 -9
  142. package/dist/{mate-progress.js → lead-progress.js} +3 -3
  143. package/dist/{mate-tools.d.ts → lead-tools.d.ts} +19 -19
  144. package/dist/{mate-tools.js → lead-tools.js} +109 -101
  145. package/dist/{mate.d.ts → lead.d.ts} +27 -27
  146. package/dist/{mate.js → lead.js} +102 -102
  147. package/dist/ledger-view.d.ts +2 -1
  148. package/dist/ledger-view.js +27 -29
  149. package/dist/limits-ui.d.ts +3 -2
  150. package/dist/limits-ui.js +8 -8
  151. package/dist/live-bus.d.ts +50 -8
  152. package/dist/live-bus.js +133 -50
  153. package/dist/mcp-connect.d.ts +1 -1
  154. package/dist/mcp-connect.js +3 -3
  155. package/dist/mcp-core.js +1 -1
  156. package/dist/mcp-oauth.js +35 -36
  157. package/dist/memory-pass.d.ts +2 -2
  158. package/dist/memory-pass.js +7 -7
  159. package/dist/models-ui.d.ts +2 -1
  160. package/dist/models-ui.js +25 -35
  161. package/dist/monitoring-ui.d.ts +4 -3
  162. package/dist/monitoring-ui.js +13 -26
  163. package/dist/notification-rows.d.ts +2 -2
  164. package/dist/openrouter-models.d.ts +2 -1
  165. package/dist/openrouter-models.js +5 -9
  166. package/dist/operate.d.ts +3 -3
  167. package/dist/operate.js +46 -41
  168. package/dist/people-audit-ui.d.ts +2 -1
  169. package/dist/people-audit-ui.js +13 -13
  170. package/dist/policy-ui.d.ts +3 -2
  171. package/dist/policy-ui.js +17 -23
  172. package/dist/policy.d.ts +1 -1
  173. package/dist/principal.d.ts +1 -1
  174. package/dist/principal.js +2 -2
  175. package/dist/project-delete-ui.d.ts +4 -3
  176. package/dist/project-delete-ui.js +16 -28
  177. package/dist/project-delete.d.ts +1 -1
  178. package/dist/project-delete.js +26 -26
  179. package/dist/project-memory.js +1 -1
  180. package/dist/project-tools.d.ts +1 -1
  181. package/dist/project-tools.js +1 -1
  182. package/dist/pull-request-ui.d.ts +2 -1
  183. package/dist/pull-request-ui.js +17 -32
  184. package/dist/recipe-ui.d.ts +8 -7
  185. package/dist/recipe-ui.js +39 -32
  186. package/dist/release-adapters.d.ts +60 -0
  187. package/dist/release-adapters.js +435 -0
  188. package/dist/release-cli.d.ts +24 -0
  189. package/dist/release-cli.js +181 -0
  190. package/dist/release-gate.d.ts +80 -0
  191. package/dist/release-gate.js +150 -0
  192. package/dist/release-links.d.ts +29 -0
  193. package/dist/release-links.js +102 -0
  194. package/dist/release.d.ts +331 -0
  195. package/dist/release.js +550 -0
  196. package/dist/reply-shape.d.ts +2 -1
  197. package/dist/reply-shape.js +5 -5
  198. package/dist/repository-context-ui.d.ts +2 -1
  199. package/dist/repository-context-ui.js +2 -7
  200. package/dist/request-budget-ui.d.ts +2 -1
  201. package/dist/request-budget-ui.js +16 -16
  202. package/dist/result-review.d.ts +2 -3
  203. package/dist/result-review.js +3 -9
  204. package/dist/retention-ui.d.ts +7 -1
  205. package/dist/retention-ui.js +7 -11
  206. package/dist/retention.js +4 -4
  207. package/dist/scope.d.ts +2 -2
  208. package/dist/scout-report.d.ts +1 -1
  209. package/dist/scout-report.js +1 -1
  210. package/dist/serve.d.ts +11 -2
  211. package/dist/serve.js +105 -99
  212. package/dist/server/chat.d.ts +7 -10
  213. package/dist/server/chat.js +984 -1021
  214. package/dist/server/chrome.d.ts +291 -0
  215. package/dist/server/chrome.js +747 -0
  216. package/dist/server/console.css +2819 -0
  217. package/dist/server/flows.d.ts +2 -6
  218. package/dist/server/flows.js +854 -773
  219. package/dist/server/guards.d.ts +1 -1
  220. package/dist/server/guards.js +8 -5
  221. package/dist/server/handler-context.d.ts +1 -1
  222. package/dist/server/handler-context.js +1 -1
  223. package/dist/server/handler-registry.d.ts +8 -6
  224. package/dist/server/handler-registry.js +14 -2
  225. package/dist/server/http.d.ts +274 -0
  226. package/dist/server/http.js +239 -0
  227. package/dist/server/live.d.ts +34 -0
  228. package/dist/server/live.js +309 -0
  229. package/dist/server/pages.d.ts +2 -6
  230. package/dist/server/pages.js +808 -789
  231. package/dist/server/people-tokens.d.ts +1 -6
  232. package/dist/server/people-tokens.js +581 -573
  233. package/dist/server/remote.d.ts +4 -7
  234. package/dist/server/remote.js +39 -70
  235. package/dist/server/render-chat.d.ts +402 -0
  236. package/dist/server/render-chat.js +927 -0
  237. package/dist/server/render-pages.d.ts +535 -0
  238. package/dist/server/render-pages.js +1277 -0
  239. package/dist/server/render-people.d.ts +32 -0
  240. package/dist/server/render-people.js +121 -0
  241. package/dist/server/render-results.d.ts +744 -0
  242. package/dist/server/render-results.js +2237 -0
  243. package/dist/server/render-settings.d.ts +154 -0
  244. package/dist/server/render-settings.js +580 -0
  245. package/dist/server/render-tasks.d.ts +632 -0
  246. package/dist/server/render-tasks.js +2345 -0
  247. package/dist/server/request-context.d.ts +46 -0
  248. package/dist/server/request-context.js +17 -0
  249. package/dist/server/route-table.d.ts +25 -3
  250. package/dist/server/route-table.js +167 -77
  251. package/dist/server/runtime.d.ts +28 -20
  252. package/dist/server/runtime.js +7 -1
  253. package/dist/server/session.d.ts +138 -0
  254. package/dist/server/session.js +94 -0
  255. package/dist/server/settings.d.ts +1 -5
  256. package/dist/server/settings.js +2186 -2121
  257. package/dist/server/task-views.d.ts +11 -4
  258. package/dist/server/task-views.js +26 -22
  259. package/dist/server/tasks.d.ts +9 -9
  260. package/dist/server/tasks.js +1489 -1420
  261. package/dist/server-telemetry.d.ts +4 -3
  262. package/dist/server-telemetry.js +4 -8
  263. package/dist/setup-guide.d.ts +2 -2
  264. package/dist/skills-ui.d.ts +4 -3
  265. package/dist/skills-ui.js +14 -17
  266. package/dist/skills.d.ts +1 -1
  267. package/dist/skills.js +2 -1
  268. package/dist/slack-chat.d.ts +2 -2
  269. package/dist/slack-chat.js +6 -6
  270. package/dist/slack-settings.d.ts +3 -2
  271. package/dist/slack-settings.js +17 -42
  272. package/dist/spend-ui.d.ts +5 -4
  273. package/dist/spend-ui.js +17 -40
  274. package/dist/spend.d.ts +14 -14
  275. package/dist/spend.js +31 -31
  276. package/dist/sso-ui.d.ts +3 -2
  277. package/dist/sso-ui.js +26 -27
  278. package/dist/storage-ui.d.ts +2 -1
  279. package/dist/storage-ui.js +14 -33
  280. package/dist/store-baseline.d.ts +19 -0
  281. package/dist/store-baseline.js +2873 -0
  282. package/dist/store.d.ts +197 -249
  283. package/dist/store.js +747 -3084
  284. package/dist/subagent-admin.d.ts +53 -0
  285. package/dist/{teammate-admin.js → subagent-admin.js} +37 -37
  286. package/dist/{teammate-desk.d.ts → subagent-desk.d.ts} +22 -23
  287. package/dist/{teammate-desk.js → subagent-desk.js} +26 -35
  288. package/dist/{teammate-memory.d.ts → subagent-memory.d.ts} +17 -17
  289. package/dist/{teammate-memory.js → subagent-memory.js} +41 -41
  290. package/dist/{teammate-question.d.ts → subagent-question.d.ts} +6 -6
  291. package/dist/{teammate-question.js → subagent-question.js} +17 -17
  292. package/dist/{teammate-tools.d.ts → subagent-tools.d.ts} +18 -18
  293. package/dist/{teammate-tools.js → subagent-tools.js} +36 -36
  294. package/dist/{teammate-week.d.ts → subagent-week.d.ts} +10 -10
  295. package/dist/{teammate-week.js → subagent-week.js} +23 -23
  296. package/dist/{teammate-work.d.ts → subagent-work.d.ts} +21 -21
  297. package/dist/{teammate-work.js → subagent-work.js} +50 -50
  298. package/dist/subagents-ui.d.ts +22 -0
  299. package/dist/subagents-ui.js +137 -0
  300. package/dist/{teammates.d.ts → subagents.d.ts} +11 -11
  301. package/dist/{teammates.js → subagents.js} +21 -21
  302. package/dist/subscription-chat.d.ts +13 -13
  303. package/dist/subscription-chat.js +19 -19
  304. package/dist/surface.d.ts +19 -2
  305. package/dist/surface.js +20 -33
  306. package/dist/task-composer.d.ts +2 -1
  307. package/dist/task-composer.js +7 -7
  308. package/dist/task-status.d.ts +4 -3
  309. package/dist/task-status.js +15 -16
  310. package/dist/team-cli.d.ts +1 -0
  311. package/dist/team-cli.js +14 -2
  312. package/dist/team-http.d.ts +5 -9
  313. package/dist/team-http.js +5 -63
  314. package/dist/team-leads.js +13 -13
  315. package/dist/team-runtime.d.ts +2 -2
  316. package/dist/team-runtime.js +8 -8
  317. package/dist/team-ui.d.ts +2 -1
  318. package/dist/team-ui.js +2 -5
  319. package/dist/teams-chat.js +6 -6
  320. package/dist/teams-settings.d.ts +3 -2
  321. package/dist/teams-settings.js +20 -31
  322. package/dist/telegram-flow.d.ts +3 -3
  323. package/dist/telegram-flow.js +3 -3
  324. package/dist/{telegram-mate.d.ts → telegram-lead.d.ts} +5 -5
  325. package/dist/{telegram-mate.js → telegram-lead.js} +27 -27
  326. package/dist/telegram-settings.d.ts +3 -2
  327. package/dist/telegram-settings.js +14 -25
  328. package/dist/telegram-status.js +1 -1
  329. package/dist/telegram-team.d.ts +1 -1
  330. package/dist/telegram-team.js +5 -5
  331. package/dist/telegram.d.ts +1 -1
  332. package/dist/telegram.js +9 -30
  333. package/dist/text-limits.d.ts +18 -18
  334. package/dist/text-limits.js +18 -18
  335. package/dist/toolroll-update-ui.d.ts +3 -2
  336. package/dist/toolroll-update-ui.js +35 -39
  337. package/dist/toolroll-update.d.ts +8 -0
  338. package/dist/toolroll-update.js +45 -8
  339. package/dist/tools-ui.d.ts +5 -2
  340. package/dist/tools-ui.js +31 -31
  341. package/dist/when-html.d.ts +11 -3
  342. package/dist/when-html.js +5 -6
  343. package/dist/workspace-ui.d.ts +4 -2
  344. package/dist/workspace-ui.js +10 -10
  345. package/package.json +1 -2
  346. package/dist/server/shared.d.ts +0 -3151
  347. package/dist/server/shared.js +0 -12001
  348. package/dist/teammate-admin.d.ts +0 -53
  349. package/dist/teammates-ui.d.ts +0 -20
  350. package/dist/teammates-ui.js +0 -166
@@ -1,8 +1,9 @@
1
1
  import type { IncomingMessage, ServerResponse } from 'node:http';
2
2
  import { type BrowserWorkspace } from './browser-workspace.js';
3
+ import { type Html } from './html.js';
3
4
  export declare function browserAssetsAvailable(): boolean;
4
5
  export declare function serveBrowserAsset(request: IncomingMessage, response: ServerResponse, path: string): boolean;
5
6
  /** Retain the complete native document as the no-JavaScript/unloaded-bundle
6
7
  * fallback. React replaces its root only once the local module has loaded.
7
8
  * The data script is escaped for HTML parsing, not merely valid JSON. */
8
- export declare function browserWorkspaceDocument(html: string, workspace: BrowserWorkspace, nonce: string, functionalScript: string): string;
9
+ export declare function browserWorkspaceDocument(document: Html, workspace: BrowserWorkspace, nonce: string, functionalScript: string): Html;
@@ -1,7 +1,8 @@
1
1
  /** The browser bundle is a presentation client. Only these fixed public assets
2
2
  * are readable here; authenticated data stays in the existing page handlers. */
3
3
  import { readFileSync } from 'node:fs';
4
- import { serializeBrowserWorkspace } from './browser-workspace.js';
4
+ import {} from './browser-workspace.js';
5
+ import { html, jsonScript, replaceMarkup, scriptElement } from './html.js';
5
6
  const assets = new Map();
6
7
  function readAsset(name) {
7
8
  // Compiled installation first; the second location supports source-based
@@ -47,16 +48,15 @@ export function serveBrowserAsset(request, response, path) {
47
48
  /** Retain the complete native document as the no-JavaScript/unloaded-bundle
48
49
  * fallback. React replaces its root only once the local module has loaded.
49
50
  * The data script is escaped for HTML parsing, not merely valid JSON. */
50
- export function browserWorkspaceDocument(html, workspace, nonce, functionalScript) {
51
+ export function browserWorkspaceDocument(document, workspace, nonce, functionalScript) {
51
52
  const initialize = `window.addEventListener('standing-orders:workspace-rendered',function initializeWorkspace(){window.removeEventListener('standing-orders:workspace-rendered',initializeWorkspace);${functionalScript}});`;
52
53
  // A cross-page fade the browser gives up on rejects its promises; settle them from the head, before the
53
54
  // first frame (the app's own listener arrives too late when a page is revealed before the bundle runs).
54
55
  const settleFades = `(function(){function s(e){var f=e.viewTransition;if(f)[f.finished,f.ready,f.updateCallbackDone].forEach(function(p){if(p)p.catch(function(){})})}addEventListener('pageswap',s);addEventListener('pagereveal',s)})();`;
55
- return html
56
- // A page showing a password keeps to its one script (the sensitivity contract), so it goes without.
57
- // Replacer functions, never strings: a `$\`` or `$'` in the page's data (an issue title, a TODO) would
58
- // otherwise paste part of the page into the data block and close it early.
59
- .replace('</head>', () => `<link rel="stylesheet" href="/assets/workspace.css">${workspace.sensitive ? "" : `<script nonce="${nonce}">${settleFades}</script>`}</head>`)
60
- .replace('<body>', () => '<body><div id="standing-orders-workspace">')
61
- .replace('</body>', () => `</div><script type="application/json" id="standing-orders-workspace-data" nonce="${nonce}">${serializeBrowserWorkspace(workspace)}</script><script nonce="${nonce}">${initialize}</script><script type="module" src="/assets/workspace.js" nonce="${nonce}"></script></body>`);
56
+ // Each insertion is markup built here; the page's own markup (and its data) is never re-read as a pattern.
57
+ let out = replaceMarkup(document, /<\/head>/, () =>
58
+ // A page showing a password keeps to its one script (the sensitivity contract), so it goes without.
59
+ html `<link rel="stylesheet" href="/assets/workspace.css">${workspace.sensitive ? "" : scriptElement(settleFades, { nonce })}</head>`);
60
+ out = replaceMarkup(out, /<body>/, () => html `<body><div id="standing-orders-workspace">`);
61
+ return replaceMarkup(out, /<\/body>/, () => html `</div>${jsonScript(workspace, { id: "standing-orders-workspace-data", nonce })}${scriptElement(initialize, { nonce })}<script type="module" src="/assets/workspace.js" nonce="${nonce}"></script></body>`);
62
62
  }
@@ -430,9 +430,9 @@ export type BrowserTaskView = {
430
430
  } | null;
431
431
  /** What the agent did last on the live run, and when; the page words it against its own clock (activity-line.ts). */
432
432
  activity?: RunActivity | null;
433
- /** The task's live stream (/t/<id>/live): change nudges and who else has it open. Absent: the page reads on its beat. */
433
+ /** The task's live room (GET /live?room=task:<root>): change nudges and who else has it open. */
434
434
  live?: {
435
- href: string;
435
+ room: string;
436
436
  at: string | null;
437
437
  } | null;
438
438
  /** Stop, on the Building card: the exact live build's stop form (posts its run id). */
@@ -765,7 +765,7 @@ export type BrowserRunChecks = {
765
765
  export type BrowserFlowStage = {
766
766
  id: string;
767
767
  title: string;
768
- kind: "inbox" | "task" | "report" | "approval" | "check" | "pull-request" | "update" | "notify" | "sort" | "draft" | "request" | "email" | "tool" | "wait" | "teammate" | "send" | "choose" | "done";
768
+ kind: "inbox" | "task" | "report" | "approval" | "check" | "pull-request" | "update" | "notify" | "sort" | "draft" | "request" | "email" | "tool" | "wait" | "subagent" | "send" | "choose" | "done";
769
769
  zone: {
770
770
  x: number;
771
771
  y: number;
@@ -835,9 +835,9 @@ export type BrowserFlowStage = {
835
835
  minutes: number;
836
836
  to: string | null;
837
837
  } | undefined;
838
- /** v92: the AI teammate who decides (an approval zone) or handles (a teammate zone) it. */
839
- teammate?: string | undefined;
840
- /** v96: a teammate zone sends what the teammate writes back to whoever asked. */
838
+ /** v92: the subagent who decides (an approval zone) or handles (a subagent zone) it. */
839
+ subagent?: string | undefined;
840
+ /** v96: a subagent zone sends what the subagent writes back to whoever asked. */
841
841
  reply?: boolean | undefined;
842
842
  /** A "Person chooses" zone's buttons: each one's words and the zone it leads to ("end" ignores the card). */
843
843
  options?: {
@@ -921,7 +921,7 @@ export type BrowserFlowCard = {
921
921
  at: string;
922
922
  label: string;
923
923
  } | null;
924
- /** v92: a teammate's open question about this visit, and whether the viewer is the one asked. */
924
+ /** v92: a subagent's open question about this visit, and whether the viewer is the one asked. */
925
925
  question?: {
926
926
  id: number;
927
927
  from: string;
@@ -932,13 +932,13 @@ export type BrowserFlowCard = {
932
932
  }[];
933
933
  askedOf: string;
934
934
  mine: boolean;
935
- /** v94: a tool call waiting for approval — why the teammate wants it, and why it needs approval. */
935
+ /** v94: a tool call waiting for approval — why the subagent wants it, and why it needs approval. */
936
936
  call?: {
937
937
  why: string;
938
938
  rule: string;
939
939
  } | null;
940
940
  } | null;
941
- /** v92: what the teammate said when it handed this decision to a person. */
941
+ /** v92: what the subagent said when it handed this decision to a person. */
942
942
  handoff?: {
943
943
  from: string;
944
944
  note: string;
@@ -973,7 +973,7 @@ export type BrowserFlowCard = {
973
973
  person: string;
974
974
  at: string;
975
975
  } | null;
976
- /** v94: every tool call teammates made or asked to make on this card, oldest first: the receipts. */
976
+ /** v94: every tool call subagents made or asked to make on this card, oldest first: the receipts. */
977
977
  calls?: {
978
978
  id: number;
979
979
  who: string;
@@ -983,8 +983,8 @@ export type BrowserFlowCard = {
983
983
  why: string;
984
984
  result: string | null;
985
985
  at: string;
986
- /** v97: the teammate's id and the action that undoes this call, when a person can press Undo. */
987
- teammate?: number;
986
+ /** v97: the subagent's id and the action that undoes this call, when a person can press Undo. */
987
+ subagent?: number;
988
988
  undo?: string | null;
989
989
  }[];
990
990
  };
@@ -1065,8 +1065,8 @@ export type BrowserFlowView = {
1065
1065
  me: string;
1066
1066
  /** Whether sort zones can run: an OpenRouter key is saved in Settings → AI providers. */
1067
1067
  sortReady: boolean;
1068
- /** v92: the project's AI teammates, to staff zones with. */
1069
- teammates?: {
1068
+ /** v92: the project's subagents, to staff zones with. */
1069
+ subagents?: {
1070
1070
  handle: string;
1071
1071
  label: string;
1072
1072
  name: string;
@@ -1276,7 +1276,6 @@ export type BrowserSignIn = {
1276
1276
  };
1277
1277
  /** Safe inside a script[type=application/json] element. JSON escaping alone
1278
1278
  * does not stop the HTML parser from closing that element at </script>. */
1279
- export declare function serializeBrowserWorkspace(workspace: BrowserWorkspace): string;
1280
1279
  export declare const BROWSER_CREW_LIMIT = 40;
1281
1280
  export type BrowserCrewOptions = {
1282
1281
  evidenceRoot?: string;
@@ -9,9 +9,6 @@ export function needsYouLabelOf(count, projectName, saturated = false) {
9
9
  }
10
10
  /** Safe inside a script[type=application/json] element. JSON escaping alone
11
11
  * does not stop the HTML parser from closing that element at </script>. */
12
- export function serializeBrowserWorkspace(workspace) {
13
- return JSON.stringify(workspace).replace(/</g, '\\u003c').replace(/\u2028/g, '\\u2028').replace(/\u2029/g, '\\u2029');
14
- }
15
12
  export const BROWSER_CREW_LIMIT = 40;
16
13
  /** A bounded recent family list. The caller supplies its already admitted
17
14
  * access; an optional project can only narrow it. Admission and family grouping
@@ -1,9 +1,9 @@
1
- import { budgetLabel, teammateNames, usd } from "./spend.js";
1
+ import { budgetLabel, subagentNames, usd } from "./spend.js";
2
2
  const MARKS = [100, 80, 50];
3
3
  export function budgetAlertPass(store, now) {
4
4
  const { month, budgets } = store.monthSpend(now);
5
5
  const sent = [];
6
- const names = teammateNames(store.handle);
6
+ const names = subagentNames(store.handle);
7
7
  for (const budget of budgets) {
8
8
  const mark = MARKS.find(one => budget.percent >= one);
9
9
  if (mark === undefined)
@@ -13,7 +13,7 @@ export function budgetAlertPass(store, now) {
13
13
  // A higher mark already sent this month covers this one.
14
14
  if (MARKS.filter(one => one >= mark).some(one => store.handle.prepare("SELECT 1 AS hit FROM notification WHERE dedupe_key = ?").get(key(one)) !== undefined))
15
15
  continue;
16
- const label = budgetLabel(budget, budget.scope === "teammate" ? names.get(Number(budget.key)) : undefined);
16
+ const label = budgetLabel(budget, budget.scope === "subagent" ? names.get(Number(budget.key)) : undefined);
17
17
  const fresh = store.enqueueNotification({
18
18
  dedupeKey: key(mark), kind: "budget-alert", pushClass: "attention", link: `/spend?month=${month}`,
19
19
  subject: `${label} budget: ${mark}% used`,
@@ -143,48 +143,53 @@ export declare const CHAT_ACTIONS: {
143
143
  readonly protected: false;
144
144
  readonly password: false;
145
145
  };
146
- readonly teammate_create: {
147
- readonly label: "Add teammate";
146
+ readonly subagent_create: {
147
+ readonly label: "Add subagent";
148
148
  readonly protected: false;
149
149
  readonly password: false;
150
150
  };
151
- readonly teammate_soul: {
151
+ readonly subagent_soul: {
152
152
  readonly label: "Update soul file";
153
153
  readonly protected: false;
154
154
  readonly password: false;
155
155
  };
156
- readonly teammate_state: {
157
- readonly label: "Change teammate";
156
+ readonly subagent_state: {
157
+ readonly label: "Change subagent";
158
158
  readonly protected: false;
159
159
  readonly password: false;
160
160
  };
161
- readonly teammate_note: {
162
- readonly label: "Tell teammate";
161
+ readonly subagent_note: {
162
+ readonly label: "Tell subagent";
163
163
  readonly protected: false;
164
164
  readonly password: false;
165
165
  };
166
- readonly teammate_answer: {
167
- readonly label: "Answer teammate";
166
+ readonly subagent_ask: {
167
+ readonly label: "Ask subagent";
168
168
  readonly protected: false;
169
169
  readonly password: false;
170
170
  };
171
- readonly teammate_tools: {
172
- readonly label: "Change teammate's tools";
171
+ readonly subagent_answer: {
172
+ readonly label: "Answer subagent";
173
173
  readonly protected: false;
174
174
  readonly password: false;
175
175
  };
176
- readonly teammate_memory: {
177
- readonly label: "Change teammate's memory";
176
+ readonly subagent_tools: {
177
+ readonly label: "Change subagent's tools";
178
178
  readonly protected: false;
179
179
  readonly password: false;
180
180
  };
181
- readonly teammate_routine: {
182
- readonly label: "Change teammate's routines";
181
+ readonly subagent_memory: {
182
+ readonly label: "Change subagent's memory";
183
183
  readonly protected: false;
184
184
  readonly password: false;
185
185
  };
186
- readonly teammate_undo: {
187
- readonly label: "Undo teammate's call";
186
+ readonly subagent_routine: {
187
+ readonly label: "Change subagent's routines";
188
+ readonly protected: false;
189
+ readonly password: false;
190
+ };
191
+ readonly subagent_undo: {
192
+ readonly label: "Undo subagent's call";
188
193
  readonly protected: false;
189
194
  readonly password: false;
190
195
  };
@@ -251,7 +256,7 @@ export declare function sharedActionReviewPath(id: number): string;
251
256
  export declare function mintSharedActionReview(store: Store, who: VerifiedApprover, id: number, root: string, now: Date): {
252
257
  payload: {
253
258
  version: 1;
254
- operation: "decision_record" | "decision_retire" | "flow_card_add" | "flow_card_approve" | "flow_card_assign" | "flow_card_cancel" | "flow_card_choose" | "flow_card_comment" | "flow_card_move" | "flow_card_send_back" | "flow_card_watch" | "flow_create" | "flow_edit" | "flow_script_save" | "flow_starter" | "flow_trigger_add" | "flow_trigger_pause" | "flow_trigger_remove" | "flow_trigger_resume" | "kit_setup" | "knowledge_instructions" | "knowledge_remove" | "knowledge_restore" | "knowledge_save" | "lead_about_you" | "result_accept" | "scope_approve" | "skill_disable" | "skill_enable" | "skill_import" | "skill_restore" | "skill_test" | "task_cancel" | "task_resume" | "teammate_answer" | "teammate_create" | "teammate_memory" | "teammate_note" | "teammate_routine" | "teammate_soul" | "teammate_state" | "teammate_tools" | "teammate_undo" | "tool_add" | "tool_remove";
259
+ operation: "decision_record" | "decision_retire" | "flow_card_add" | "flow_card_approve" | "flow_card_assign" | "flow_card_cancel" | "flow_card_choose" | "flow_card_comment" | "flow_card_move" | "flow_card_send_back" | "flow_card_watch" | "flow_create" | "flow_edit" | "flow_script_save" | "flow_starter" | "flow_trigger_add" | "flow_trigger_pause" | "flow_trigger_remove" | "flow_trigger_resume" | "kit_setup" | "knowledge_instructions" | "knowledge_remove" | "knowledge_restore" | "knowledge_save" | "lead_about_you" | "result_accept" | "scope_approve" | "skill_disable" | "skill_enable" | "skill_import" | "skill_restore" | "skill_test" | "subagent_answer" | "subagent_ask" | "subagent_create" | "subagent_memory" | "subagent_note" | "subagent_routine" | "subagent_soul" | "subagent_state" | "subagent_tools" | "subagent_undo" | "task_cancel" | "task_resume" | "tool_add" | "tool_remove";
255
260
  request: {
256
261
  [x: string]: unknown;
257
262
  };