toolroll 0.9.63 → 0.9.65

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 (292) hide show
  1. package/CHANGELOG.md +51 -0
  2. package/README.md +15 -5
  3. package/dist/acp-agents.d.ts +43 -0
  4. package/dist/acp-agents.js +62 -0
  5. package/dist/acp-attest.d.ts +44 -0
  6. package/dist/acp-attest.js +269 -0
  7. package/dist/acp-check.d.ts +28 -0
  8. package/dist/acp-check.js +410 -0
  9. package/dist/acp-client.d.ts +163 -0
  10. package/dist/acp-client.js +738 -0
  11. package/dist/acp-inspect.d.ts +23 -0
  12. package/dist/acp-inspect.js +109 -0
  13. package/dist/agent-board.d.ts +19 -6
  14. package/dist/agent-board.js +30 -9
  15. package/dist/agent-fence.d.ts +50 -2
  16. package/dist/agent-fence.js +157 -10
  17. package/dist/agent-pulse.js +9 -2
  18. package/dist/agent-state-words.d.ts +19 -0
  19. package/dist/agent-state-words.js +20 -0
  20. package/dist/agent-state.d.ts +65 -0
  21. package/dist/agent-state.js +229 -0
  22. package/dist/agentconfig.js +36 -13
  23. package/dist/agents-board.d.ts +34 -2
  24. package/dist/agents-board.js +110 -1
  25. package/dist/approval-rules-ui.js +2 -2
  26. package/dist/assignment-delivery.d.ts +14 -0
  27. package/dist/assignment-delivery.js +13 -0
  28. package/dist/assignment.js +13 -0
  29. package/dist/attest.js +7 -0
  30. package/dist/backup-ui.js +2 -2
  31. package/dist/browser/THIRD_PARTY_NOTICES.txt +48 -0
  32. package/dist/browser/terminal.css +37 -0
  33. package/dist/browser/terminal.js +117 -0
  34. package/dist/browser/workspace.css +2 -2
  35. package/dist/browser/workspace.js +42 -38
  36. package/dist/browser-shell.js +6 -3
  37. package/dist/browser-workspace.d.ts +235 -1
  38. package/dist/browser-workspace.js +60 -0
  39. package/dist/builder.d.ts +6 -1
  40. package/dist/builder.js +34 -13
  41. package/dist/chat-actions.d.ts +13 -1
  42. package/dist/chat-actions.js +197 -15
  43. package/dist/chat-ask.d.ts +4 -0
  44. package/dist/chat-ask.js +14 -0
  45. package/dist/chat-channel.js +20 -0
  46. package/dist/chat-continuity.js +5 -4
  47. package/dist/chat-decide.d.ts +0 -14
  48. package/dist/chat-decide.js +4 -1
  49. package/dist/chat-delivery.d.ts +9 -0
  50. package/dist/chat-delivery.js +45 -6
  51. package/dist/chat-messages.d.ts +8 -0
  52. package/dist/chat-messages.js +36 -4
  53. package/dist/check-levels-ui.js +2 -2
  54. package/dist/checkout-proof.d.ts +28 -0
  55. package/dist/checkout-proof.js +62 -0
  56. package/dist/claim.d.ts +12 -0
  57. package/dist/claim.js +19 -0
  58. package/dist/cli-help.d.ts +1 -1
  59. package/dist/cli-help.js +4 -1
  60. package/dist/cli.d.ts +3 -0
  61. package/dist/cli.js +21 -2
  62. package/dist/coding-ui.js +6 -4
  63. package/dist/console-instance.d.ts +124 -0
  64. package/dist/console-instance.js +337 -0
  65. package/dist/contracts/chat-actions.d.ts +16 -0
  66. package/dist/contracts/chat-actions.js +4 -0
  67. package/dist/contracts/chat-content.d.ts +19 -0
  68. package/dist/contracts/chat-content.js +6 -0
  69. package/dist/contracts/console-api.d.ts +12 -4
  70. package/dist/contracts/console-api.js +12 -4
  71. package/dist/contracts/flow-card.d.ts +4 -0
  72. package/dist/contracts/flow-card.js +3 -0
  73. package/dist/contracts/flow.d.ts +46 -0
  74. package/dist/contracts/flow.js +11 -2
  75. package/dist/contracts/lead-tools.d.ts +92 -0
  76. package/dist/contracts/lead-tools.js +13 -0
  77. package/dist/contracts/provider.d.ts +11 -1
  78. package/dist/contracts/provider.js +1 -1
  79. package/dist/contracts/route.d.ts +76 -1
  80. package/dist/contracts/route.js +1 -1
  81. package/dist/contracts/store-json.d.ts +2 -0
  82. package/dist/control-setup.d.ts +1 -1
  83. package/dist/control-ui.js +2 -2
  84. package/dist/converse.d.ts +16 -0
  85. package/dist/converse.js +32 -4
  86. package/dist/demo-chat.js +4 -4
  87. package/dist/demo.js +2 -2
  88. package/dist/desktop-update-gate.js +6 -0
  89. package/dist/desktop-update.d.ts +1 -1
  90. package/dist/discord-chat.js +4 -1
  91. package/dist/doctor.js +1 -1
  92. package/dist/egress-bridge.d.ts +17 -0
  93. package/dist/egress-bridge.js +111 -0
  94. package/dist/egress.d.ts +119 -0
  95. package/dist/egress.js +423 -0
  96. package/dist/exec.d.ts +78 -0
  97. package/dist/exec.js +367 -9
  98. package/dist/export-ui.js +2 -2
  99. package/dist/flow-engine.js +24 -5
  100. package/dist/flow-gallery-ui.js +2 -2
  101. package/dist/flow-gallery.js +27 -8
  102. package/dist/flow-share.js +16 -5
  103. package/dist/flow-triggers.d.ts +77 -8
  104. package/dist/flow-triggers.js +517 -70
  105. package/dist/flows-cli.js +8 -2
  106. package/dist/flows-ui.d.ts +0 -2
  107. package/dist/flows-ui.js +52 -4
  108. package/dist/flows.d.ts +4 -0
  109. package/dist/flows.js +9 -1
  110. package/dist/html.d.ts +9 -0
  111. package/dist/html.js +11 -0
  112. package/dist/invoke.d.ts +17 -0
  113. package/dist/invoke.js +217 -21
  114. package/dist/keys.d.ts +18 -14
  115. package/dist/keys.js +5 -0
  116. package/dist/lead-capabilities.js +3 -2
  117. package/dist/lead-contract.js +2 -0
  118. package/dist/lead-doors.d.ts +2 -0
  119. package/dist/lead-doors.js +7 -0
  120. package/dist/lead-follow.d.ts +2 -0
  121. package/dist/lead-follow.js +58 -2
  122. package/dist/lead-progress.js +1 -0
  123. package/dist/lead-queue-runtime.d.ts +46 -0
  124. package/dist/lead-queue-runtime.js +191 -0
  125. package/dist/lead-queue.d.ts +104 -0
  126. package/dist/lead-queue.js +187 -0
  127. package/dist/lead-sweep.d.ts +67 -0
  128. package/dist/lead-sweep.js +99 -0
  129. package/dist/lead-tools.d.ts +22 -0
  130. package/dist/lead-tools.js +152 -1
  131. package/dist/lead.d.ts +13 -5
  132. package/dist/lead.js +89 -29
  133. package/dist/limits-ui.d.ts +8 -1
  134. package/dist/limits-ui.js +26 -0
  135. package/dist/live-bus.d.ts +8 -0
  136. package/dist/live-bus.js +40 -4
  137. package/dist/live-detail.d.ts +27 -0
  138. package/dist/live-detail.js +57 -0
  139. package/dist/live-notes.d.ts +20 -0
  140. package/dist/live-notes.js +47 -0
  141. package/dist/live-records.d.ts +140 -0
  142. package/dist/live-records.js +935 -0
  143. package/dist/live-terminal.d.ts +258 -0
  144. package/dist/live-terminal.js +649 -0
  145. package/dist/live.d.ts +38 -27
  146. package/dist/live.js +142 -124
  147. package/dist/mcp-oauth.d.ts +6 -3
  148. package/dist/mcp-oauth.js +8 -4
  149. package/dist/memory-pass.js +2 -2
  150. package/dist/mobile-viewport.d.ts +5 -1
  151. package/dist/mobile-viewport.js +18 -2
  152. package/dist/model-catalog.js +4 -0
  153. package/dist/monitoring-ui.js +2 -2
  154. package/dist/needs-you.d.ts +1 -1
  155. package/dist/needs-you.js +11 -4
  156. package/dist/operate.d.ts +2 -0
  157. package/dist/operate.js +275 -17
  158. package/dist/passwordless.d.ts +23 -0
  159. package/dist/passwordless.js +26 -0
  160. package/dist/peek-cli.d.ts +12 -4
  161. package/dist/peek-cli.js +19 -11
  162. package/dist/phase-routing.js +10 -3
  163. package/dist/planner-source.d.ts +3 -0
  164. package/dist/planner-source.js +14 -0
  165. package/dist/planner.d.ts +2 -1
  166. package/dist/planner.js +7 -1
  167. package/dist/policy-ui.js +2 -2
  168. package/dist/policy.d.ts +1 -20
  169. package/dist/policy.js +29 -2
  170. package/dist/project-delete-ui.d.ts +12 -0
  171. package/dist/project-delete-ui.js +41 -9
  172. package/dist/project-delete.js +2 -2
  173. package/dist/project-memory.d.ts +3 -1
  174. package/dist/project-memory.js +57 -25
  175. package/dist/project-tools.d.ts +5 -3
  176. package/dist/project-tools.js +12 -9
  177. package/dist/provider-auth.d.ts +4 -3
  178. package/dist/provider-auth.js +5 -4
  179. package/dist/provider-connection.d.ts +2 -1
  180. package/dist/provider-connection.js +5 -0
  181. package/dist/provider.d.ts +25 -2
  182. package/dist/provider.js +63 -9
  183. package/dist/pull-request-ui.js +2 -2
  184. package/dist/push.js +1 -1
  185. package/dist/quick-start.d.ts +24 -0
  186. package/dist/quick-start.js +127 -0
  187. package/dist/release.d.ts +3 -0
  188. package/dist/release.js +14 -8
  189. package/dist/request-budget-ui.js +2 -2
  190. package/dist/result-review.d.ts +1 -1
  191. package/dist/result-review.js +9 -3
  192. package/dist/retention-ui.js +2 -2
  193. package/dist/retention.js +10 -1
  194. package/dist/run-efficiency.d.ts +73 -0
  195. package/dist/run-efficiency.js +228 -0
  196. package/dist/runner.d.ts +5 -1
  197. package/dist/runner.js +22 -1
  198. package/dist/scope.d.ts +170 -5
  199. package/dist/scope.js +251 -31
  200. package/dist/scout-net.d.ts +4 -1
  201. package/dist/scout-net.js +37 -12
  202. package/dist/scout.d.ts +20 -6
  203. package/dist/scout.js +27 -3
  204. package/dist/serve.js +247 -40
  205. package/dist/server/chat.d.ts +1 -1
  206. package/dist/server/chat.js +122 -31
  207. package/dist/server/chrome.d.ts +6 -1
  208. package/dist/server/chrome.js +18 -7
  209. package/dist/server/console.css +52 -38
  210. package/dist/server/flows.js +38 -8
  211. package/dist/server/guards.d.ts +1 -0
  212. package/dist/server/guards.js +23 -9
  213. package/dist/server/http.d.ts +7 -0
  214. package/dist/server/http.js +3 -2
  215. package/dist/server/live.d.ts +34 -1
  216. package/dist/server/live.js +39 -17
  217. package/dist/server/pages-assets.js +5 -0
  218. package/dist/server/pages.js +90 -13
  219. package/dist/server/people-tokens.d.ts +3 -0
  220. package/dist/server/people-tokens.js +55 -17
  221. package/dist/server/remote-hooks.js +12 -6
  222. package/dist/server/remote.d.ts +2 -1
  223. package/dist/server/remote.js +14 -5
  224. package/dist/server/render-chat.d.ts +12 -3
  225. package/dist/server/render-chat.js +47 -16
  226. package/dist/server/render-pages.d.ts +4 -1
  227. package/dist/server/render-pages.js +5 -4
  228. package/dist/server/render-people.d.ts +3 -2
  229. package/dist/server/render-people.js +3 -2
  230. package/dist/server/render-results.d.ts +18 -2
  231. package/dist/server/render-results.js +37 -28
  232. package/dist/server/render-settings.js +6 -5
  233. package/dist/server/render-tasks.d.ts +35 -10
  234. package/dist/server/render-tasks.js +110 -27
  235. package/dist/server/request-context.d.ts +2 -0
  236. package/dist/server/request-context.js +2 -1
  237. package/dist/server/route-table.d.ts +3 -0
  238. package/dist/server/route-table.js +46 -5
  239. package/dist/server/runtime.d.ts +33 -2
  240. package/dist/server/session.d.ts +25 -1
  241. package/dist/server/session.js +18 -4
  242. package/dist/server/settings.js +121 -10
  243. package/dist/server/sweeps.d.ts +4 -0
  244. package/dist/server/sweeps.js +58 -0
  245. package/dist/server/task-views.d.ts +2 -1
  246. package/dist/server/task-views.js +96 -6
  247. package/dist/server/tasks.js +320 -74
  248. package/dist/server/terminals.d.ts +31 -0
  249. package/dist/server/terminals.js +365 -0
  250. package/dist/setup-guide.js +3 -2
  251. package/dist/slack-chat.js +4 -1
  252. package/dist/spend-ui.js +3 -3
  253. package/dist/spend.js +2 -1
  254. package/dist/steer-capabilities.d.ts +32 -0
  255. package/dist/steer-capabilities.js +60 -0
  256. package/dist/steer-controls.d.ts +14 -0
  257. package/dist/steer-controls.js +36 -0
  258. package/dist/steer-status.js +2 -2
  259. package/dist/storage-ui.js +4 -4
  260. package/dist/store-baseline.d.ts +1 -1
  261. package/dist/store-baseline.js +1 -1
  262. package/dist/store.d.ts +430 -15
  263. package/dist/store.js +1041 -52
  264. package/dist/subagent-desk.js +1 -1
  265. package/dist/summary.js +3 -0
  266. package/dist/task-source.d.ts +58 -0
  267. package/dist/task-source.js +93 -0
  268. package/dist/team-leads.js +1 -1
  269. package/dist/teams-chat.js +4 -1
  270. package/dist/telegram-lead.d.ts +3 -0
  271. package/dist/telegram-lead.js +44 -7
  272. package/dist/telegram.d.ts +11 -2
  273. package/dist/telegram.js +51 -17
  274. package/dist/terminal-catalog.d.ts +11 -0
  275. package/dist/terminal-catalog.js +129 -0
  276. package/dist/text-limits.d.ts +2 -0
  277. package/dist/text-limits.js +2 -0
  278. package/dist/tool-broker.d.ts +2 -0
  279. package/dist/tool-broker.js +1 -0
  280. package/dist/toolroll-update-ui.js +2 -2
  281. package/dist/toolroll-update.js +13 -3
  282. package/dist/tools-ui.js +2 -2
  283. package/dist/webhook-limits.d.ts +23 -0
  284. package/dist/webhook-limits.js +30 -0
  285. package/dist/webhook-readers.d.ts +56 -0
  286. package/dist/webhook-readers.js +138 -0
  287. package/dist/webhook-signing.d.ts +27 -0
  288. package/dist/webhook-signing.js +119 -0
  289. package/dist/work-index.d.ts +29 -0
  290. package/dist/work-index.js +16 -2
  291. package/dist/workspace-revision.js +3 -1
  292. package/package.json +11 -2
@@ -0,0 +1,140 @@
1
+ /**
2
+ * The live conversation's records (docs/plans/live-conversation.md): what a
3
+ * running agent said and did, one JSON object per line of `live/<run>.jsonl`.
4
+ *
5
+ * The recorder turns provider stream events into records. It names a step's
6
+ * target only from a closed list of argument fields, keeps a command's text
7
+ * and output only when the project turned "Show commands in the live view"
8
+ * on (the `commands` tier), and never writes a tool's own name — only our
9
+ * fixed kind. Every string is redacted, then cleaned of controls, then cut.
10
+ * The redaction is best effort; the opt-in is the real control.
11
+ *
12
+ * Readers trust nothing they read back: `parseLiveRecord` re-checks shape,
13
+ * caps and redaction, since the machine running the agent could alter the
14
+ * file. Display state, never evidence.
15
+ */
16
+ /**
17
+ * The fixed tool vocabulary: known harness tools map to OUR kinds; anything
18
+ * unrecognized is "tool". The tool's own name never reaches the file.
19
+ */
20
+ export type LiveActivityKind = "session" | "message" | "edit" | "command" | "read" | "search" | "lookup" | "plan" | "delegate" | "tool";
21
+ export declare const LIVE_ACTIVITY_KINDS: readonly LiveActivityKind[];
22
+ /** What a run's live file may hold: the base tier, or commands too (the project setting, read at open). */
23
+ export type LiveDetail = "base" | "commands";
24
+ /** One record. `at` is when the recorder saw it (ISO). */
25
+ export type LiveRecord =
26
+ /** The file's first record: what this run's project allowed when it started, kept with the run. */
27
+ {
28
+ k: "open";
29
+ at: string;
30
+ detail: LiveDetail;
31
+ } | {
32
+ k: "start";
33
+ at: string;
34
+ } | {
35
+ k: "say";
36
+ at: string;
37
+ t: string[];
38
+ } | {
39
+ k: "step";
40
+ at: string;
41
+ id: string;
42
+ kind: LiveActivityKind;
43
+ target?: string;
44
+ once?: true;
45
+ } | {
46
+ k: "done";
47
+ at: string;
48
+ id: string;
49
+ ok: boolean | null;
50
+ out?: string[];
51
+ } | {
52
+ k: "cut";
53
+ at: string;
54
+ } | {
55
+ k: "cap";
56
+ at: string;
57
+ };
58
+ /** A record's serialized size limit: a longer one is replaced by `cut`. */
59
+ export declare const LIVE_RECORD_CAP: number;
60
+ export declare const HIDDEN_TARGET = "[hidden]";
61
+ export declare const HIDDEN_LINE = "[a line was hidden]";
62
+ export declare const HIDDEN_KEY_BLOCK = "[a key block was hidden]";
63
+ export declare const OUTSIDE_PROJECT = "a file outside the project";
64
+ export declare const SOME_FILE = "a file";
65
+ /** Whether a line looks like it carries a credential (best effort). */
66
+ export declare function liveSecretHit(line: string): boolean;
67
+ /** Controls, ANSI escapes and bidi overrides out; tabs to spaces. */
68
+ export declare function cleanLiveText(text: string): string;
69
+ /** An escape a line ended in the middle of, which the next line finishes: CSI, OSC, or a bare ESC. */
70
+ export type EscapeCarry = "" | "C" | "O" | "E";
71
+ /** Cut to at most `cap` UTF-8 bytes on a character boundary, "…" when cut. */
72
+ export declare function capLive(text: string, cap: number): string;
73
+ /** One line for the view: redacted whole when it hits, then cleaned and cut. */
74
+ export declare function liveLine(raw: string, cap?: number): string;
75
+ /**
76
+ * Lines redacted as a whole: each line on its own, and a key block hidden
77
+ * from its BEGIN line to its END (or to the end) as one line. Used for the
78
+ * agent's words, command output, and everything read back.
79
+ */
80
+ /**
81
+ * Whether reading is inside a key block: carried from line to line, record to
82
+ * record and — through the reader's cursor — from one read to the next, so a
83
+ * block split anywhere stays hidden.
84
+ */
85
+ export type KeyState = {
86
+ inKey: boolean;
87
+ /** Per reading, how much of "-----BEGIN" the stream has ended on so far, then the escape the last line left open:
88
+ * marker characters and one flag only, never content, so it may ride the cursor. Joined with "|" when carried. */
89
+ tail?: string;
90
+ };
91
+ /** Whether a carried tail is one this code could have produced: three BEGIN prefixes and an escape flag, or nothing. */
92
+ export declare function validKeyTail(tail: string): boolean;
93
+ export declare function redactLiveLines(lines: readonly string[], state?: KeyState): string[];
94
+ /**
95
+ * Output for a command step: every line redacted first (a key block hidden
96
+ * from its BEGIN line to its END, or to the end), then the last 20 lines
97
+ * within 4 KiB — truncation never comes before redaction.
98
+ */
99
+ export declare function liveOutput(raw: string, keys?: KeyState): string[];
100
+ /**
101
+ * A path as the view shows it: relative to the run's own checkout when it
102
+ * lies inside it, judged lexically — nothing is opened or resolved on disk.
103
+ */
104
+ export declare function livePath(base: string | null, given: unknown): string | null;
105
+ /** A command's first line, "…" when more followed or it was cut. */
106
+ export declare function liveCommand(given: unknown): string | null;
107
+ export type LiveRecorderOptions = {
108
+ /** The run's own checkout; null when it has none (every path is "a file"). */
109
+ base: string | null;
110
+ /** The project's "Show commands in the live view" setting, read at open. */
111
+ commands: boolean;
112
+ clock?: () => Date;
113
+ };
114
+ export type LiveRecorder = {
115
+ /** The records one stream event adds. Never throws. */
116
+ observe(event: Record<string, unknown>): LiveRecord[];
117
+ /** The process ended: every step still open closes unknown. */
118
+ end(): LiveRecord[];
119
+ };
120
+ export declare function createLiveRecorder(options: LiveRecorderOptions): LiveRecorder;
121
+ /** One record as its file line; an oversized one becomes `cut`. */
122
+ export declare function serializeLiveRecord(record: LiveRecord): string;
123
+ /**
124
+ * One file line back into a record, strictly: a known shape within its caps,
125
+ * every string redacted and cleaned again. Anything else is null — skipped,
126
+ * never shown raw.
127
+ */
128
+ export declare function parseLiveRecord(line: string, keys?: KeyState): LiveRecord | null;
129
+ /** Complete file lines (a window's text) into records; bad lines are skipped. */
130
+ export declare function parseLiveRecords(text: string, keys?: KeyState): LiveRecord[];
131
+ export declare const LIVE_CAP_WORDS = "[the live view stopped at its size cap \u2014 the run record continues]";
132
+ export declare const LIVE_CUT_WORDS = "[a line was too long to show]";
133
+ export declare const LIVE_KIND_HEADLINES: Readonly<Record<LiveActivityKind, string>>;
134
+ /** A step's one line of words, with its target when it has one. */
135
+ export declare function stepWords(step: {
136
+ kind: LiveActivityKind;
137
+ target?: string;
138
+ }): string;
139
+ /** Records as the plain lines the run page and `toolroll peek` show. */
140
+ export declare function projectLiveText(records: readonly LiveRecord[]): string[];