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,7 +1,7 @@
1
1
  /** Live progress of one lead turn (chat streaming): what the lead is doing
2
2
  * and the reply as it is written. Nothing here is durable or authoritative —
3
3
  * the finished turn's saved message and cards remain the record. */
4
- export type MateProgress = {
4
+ export type LeadProgress = {
5
5
  kind: "started";
6
6
  turn: number;
7
7
  } | {
@@ -19,33 +19,33 @@ export type MateProgress = {
19
19
  turn: number;
20
20
  step: number;
21
21
  id: string;
22
- outcome: MateToolOutcome;
22
+ outcome: LeadToolOutcome;
23
23
  } | {
24
24
  kind: "text";
25
25
  turn: number;
26
26
  step: number;
27
27
  text: string;
28
28
  };
29
- export type MateToolOutcome = {
29
+ export type LeadToolOutcome = {
30
30
  state: "succeeded";
31
31
  } | {
32
32
  state: "failed";
33
33
  reason: string;
34
34
  };
35
- export type MateLiveTool = {
35
+ export type LeadLiveTool = {
36
36
  id: string;
37
37
  label: string;
38
38
  } & ({
39
39
  state: "running";
40
- } | MateToolOutcome);
40
+ } | LeadToolOutcome);
41
41
  /** Keep tools as labels for older clients; toolCalls adds per-call outcomes. */
42
- export type MateLiveStep = {
42
+ export type LeadLiveStep = {
43
43
  tools: string[];
44
- toolCalls: MateLiveTool[];
44
+ toolCalls: LeadLiveTool[];
45
45
  text: string;
46
46
  };
47
- export declare function mateToolLabel(name: string): string;
48
- export declare function mateToolFailureReason(name: string, message: string): string;
47
+ export declare function leadToolLabel(name: string): string;
48
+ export declare function leadToolFailureReason(name: string, message: string): string;
49
49
  /** The `text` of a structured answer still being written, when the answer
50
50
  * opens with it (`{"text": "…`); null until then. Escapes are decoded, and
51
51
  * an escape cut off at the end is left for the next chunk. */
@@ -38,7 +38,7 @@ const TOOL_LABELS = {
38
38
  remember: "Preparing a card for you to confirm",
39
39
  get_person: "Looking them up",
40
40
  };
41
- export function mateToolLabel(name) {
41
+ export function leadToolLabel(name) {
42
42
  if (name in TOOL_LABELS)
43
43
  return TOOL_LABELS[name];
44
44
  return name.startsWith("propose_") ? "Preparing a card for you to confirm" : "Working";
@@ -64,8 +64,8 @@ const TOOL_FAILURE_REASONS = new Map([
64
64
  ["Task text cannot contain credentials.", "The task text contains a password or secret key."],
65
65
  ["that tool refused — the plane could not answer it right now", "Toolroll couldn't finish that step right now."],
66
66
  ]);
67
- export function mateToolFailureReason(name, message) {
68
- return TOOL_FAILURE_REASONS.get(message) ?? `That step didn't work (${mateToolLabel(name)}).`;
67
+ export function leadToolFailureReason(name, message) {
68
+ return TOOL_FAILURE_REASONS.get(message) ?? `That step didn't work (${leadToolLabel(name)}).`;
69
69
  }
70
70
  /** The `text` of a structured answer still being written, when the answer
71
71
  * opens with it (`{"text": "…`); null until then. Escapes are decoded, and
@@ -3,18 +3,18 @@ import { type Integration } from "./integrations.js";
3
3
  import type { AuthMode } from "./keys.js";
4
4
  import type { ProviderId } from "./provider.js";
5
5
  import { type ReviewSnapshot } from "./chat-review.js";
6
- import { type Store, type MateProposalKind, type MateTurnEvidence } from "./store.js";
6
+ import { type Store, type LeadProposalKind, type LeadTurnEvidence } from "./store.js";
7
7
  import type { VerifiedApprover } from "./principal.js";
8
- import type { MateToolSchema } from "./converse.js";
8
+ import type { LeadToolSchema } from "./converse.js";
9
9
  import { type AcceptanceCriterion } from "./scope.js";
10
10
  import { type ContractResult } from "./contracts/contract.js";
11
- export declare const MATE_MAX_PROPOSALS_PER_TURN = 5;
12
- export type MateToolContext = {
11
+ export declare const LEAD_MAX_PROPOSALS_PER_TURN = 5;
12
+ export type LeadToolContext = {
13
13
  store: Store;
14
14
  who: VerifiedApprover;
15
15
  now: Date;
16
16
  /** Records a proposal as `drafting` under the running turn; null when the turn may draft no more. */
17
- draft: (kind: MateProposalKind, payload: Record<string, unknown>) => number | null;
17
+ draft: (kind: LeadProposalKind, payload: Record<string, unknown>) => number | null;
18
18
  /** The step this call runs in, and which decisions were read (by get_decision) at which step —
19
19
  * an answer may be proposed only for a decision read in an EARLIER step (v3 review, finding 6). */
20
20
  step: number;
@@ -27,7 +27,7 @@ export type MateToolContext = {
27
27
  evidenceRoot?: string;
28
28
  /** Records the screenshots this turn selected, under the turn, for a channel that delivers files; returns how many are recorded. Absent: nothing durable is kept. */
29
29
  /** Return the exact artifact ids reserved under this running turn, including earlier calls. */
30
- selectEvidence?: (rows: readonly Omit<MateTurnEvidence, "turn" | "ordinal" | "createdAt">[]) => readonly number[];
30
+ selectEvidence?: (rows: readonly Omit<LeadTurnEvidence, "turn" | "ordinal" | "createdAt">[]) => readonly number[];
31
31
  /** How this surface delivers selected images: Telegram sends them as documents after the reply; every other surface shows identity only. */
32
32
  mediaDelivery?: "documents";
33
33
  /** The conversation and turn this call runs in: where a promise (commit_to) is reported. Absent: no promise can be kept. */
@@ -49,7 +49,7 @@ export type MateToolContext = {
49
49
  /** Records this turn's one question to its owner; false when it already asked one. Absent: this surface cannot ask. */
50
50
  ask?: (question: string, options: readonly string[]) => boolean;
51
51
  };
52
- export type MateToolResult = {
52
+ export type LeadToolResult = {
53
53
  ok: true;
54
54
  body: unknown;
55
55
  } | {
@@ -57,18 +57,18 @@ export type MateToolResult = {
57
57
  message: string;
58
58
  };
59
59
  export { reportSummaryFor } from "./report-summary.js";
60
- export type MateViewContext = {
60
+ export type LeadViewContext = {
61
61
  repos: readonly string[];
62
62
  names: readonly string[];
63
63
  };
64
64
  /** Scrub one string. Exact repo paths and their basenames go first (v13: no paths, no basenames), then shapes. */
65
- export declare function redactForMate(text: string, view: MateViewContext): string;
65
+ export declare function redactForLead(text: string, view: LeadViewContext): string;
66
66
  /** The choke point: every string inside a tool result, recursively, scrubbed. */
67
- export declare function mateView<T>(value: T, view: MateViewContext): T;
68
- export declare function mateViewContextFor(store: Store, who: VerifiedApprover): MateViewContext;
67
+ export declare function leadView<T>(value: T, view: LeadViewContext): T;
68
+ export declare function leadViewContextFor(store: Store, who: VerifiedApprover): LeadViewContext;
69
69
  /** Project names are deliberate display metadata, not a general basename
70
70
  * exemption. Invalid, sensitive or account-identifying labels stay opaque. */
71
- export declare function projectLabelForMate(path: string, index: number, names: readonly string[]): string;
71
+ export declare function projectLabelForLead(path: string, index: number, names: readonly string[]): string;
72
72
  /** The same text rule, for the gateway's proposals. */
73
73
  export declare function honestText(value: unknown, maxChars: number): value is string;
74
74
  export declare function readOptionalText(value: unknown, maxChars: number): string | null | undefined;
@@ -78,9 +78,9 @@ export declare function readTouches(value: unknown): string[] | null;
78
78
  * the argument did not even parse into a non-empty rubric. */
79
79
  export declare function readAcceptanceArg(value: unknown): AcceptanceCriterion[] | null;
80
80
  /** A lead tool as the model is shown it (its inputSchema derived from its contract) and as a call is read and run. */
81
- export type MateTool = MateToolSchema & {
82
- read: (ctx: MateToolContext, raw: Record<string, unknown>) => ContractResult<Record<string, unknown>>;
83
- handle: (ctx: MateToolContext, args: Record<string, unknown>) => MateToolResult;
81
+ export type LeadTool = LeadToolSchema & {
82
+ read: (ctx: LeadToolContext, raw: Record<string, unknown>) => ContractResult<Record<string, unknown>>;
83
+ handle: (ctx: LeadToolContext, args: Record<string, unknown>) => LeadToolResult;
84
84
  };
85
85
  /** Replace every `repoIndex` with a `repo` label, recursively. */
86
86
  export declare function labelRepos<T>(value: T, label: (index: number) => string): T;
@@ -106,7 +106,7 @@ export declare const ISO_STAMP_RULE: RegExp;
106
106
  */
107
107
  export declare function agentsOver(store: Store, taskId: string, now: Date): Record<string, unknown> | null;
108
108
  /** The lead's tools, in the order the model is shown them: each one's inputSchema is its contract, derived. */
109
- export declare const MATE_TOOLS: MateTool[];
109
+ export declare const LEAD_TOOLS: LeadTool[];
110
110
  /** A unified diff, file by file, with each file's added and removed lines. */
111
111
  export declare function patchFiles(patch: string): {
112
112
  path: string;
@@ -114,10 +114,10 @@ export declare function patchFiles(patch: string): {
114
114
  removed: number;
115
115
  text: string;
116
116
  }[];
117
- export declare const MATE_TOOL_SCHEMAS: MateToolSchema[];
118
- export declare function isMateTool(name: string): boolean;
117
+ export declare const LEAD_TOOL_SCHEMAS: LeadToolSchema[];
118
+ export declare function isLeadTool(name: string): boolean;
119
119
  /** Scrub every result. Only list_repos then adds validated display metadata
120
120
  * from the same admitted project list; no user-authored result gets an exemption. */
121
- export declare function executeMateTool(ctx: MateToolContext, name: string, args: Record<string, unknown>, view?: MateViewContext): MateToolResult;
121
+ export declare function executeLeadTool(ctx: LeadToolContext, name: string, args: Record<string, unknown>, view?: LeadViewContext): LeadToolResult;
122
122
  /** Bytes of a serialized tool result as it will sit inside the request body. */
123
123
  export declare function toolResultBytes(text: string): number;