toolroll 0.9.110 → 0.9.112

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 (68) hide show
  1. package/CHANGELOG.md +66 -0
  2. package/README.md +5 -1
  3. package/THIRD_PARTY_NOTICES.md +30 -0
  4. package/dist/action-ledger.js +13 -0
  5. package/dist/agent-detect.js +1 -1
  6. package/dist/agent-said-schema.js +4 -0
  7. package/dist/agent-said.js +77 -0
  8. package/dist/approval-summary.js +39 -8
  9. package/dist/bin.js +5 -1
  10. package/dist/browser/THIRD_PARTY_NOTICES.txt +30 -0
  11. package/dist/browser/terminal.js +1 -1
  12. package/dist/browser/workspace.js +1 -1
  13. package/dist/builder.js +6 -1
  14. package/dist/chat-channel.js +10 -0
  15. package/dist/claim.js +28 -13
  16. package/dist/cli-help.js +7 -1
  17. package/dist/cli.js +2 -0
  18. package/dist/codex-limits.js +21 -8
  19. package/dist/console-instance.js +2 -1
  20. package/dist/contracts/console-api.js +3 -2
  21. package/dist/contracts/engine-api.js +15 -3
  22. package/dist/contracts/lead-tools.js +28 -0
  23. package/dist/contracts/route.js +1 -0
  24. package/dist/dispatch.js +1 -1
  25. package/dist/dispose.js +15 -9
  26. package/dist/easy-start.js +19 -3
  27. package/dist/engine-reads.js +79 -2
  28. package/dist/evidence.js +6 -6
  29. package/dist/fast-start.js +20 -11
  30. package/dist/flexible-start.js +1 -1
  31. package/dist/integrations.js +6 -1
  32. package/dist/lead-tools.js +107 -1
  33. package/dist/lead.js +1 -1
  34. package/dist/ledger-view.js +2 -1
  35. package/dist/local-owner.js +1 -0
  36. package/dist/needs-you.js +12 -2
  37. package/dist/operate.js +57 -9
  38. package/dist/outbound-privacy.js +6 -1
  39. package/dist/phase-routing.js +3 -1
  40. package/dist/plain-words.js +1 -1
  41. package/dist/plane-review.js +1 -1
  42. package/dist/proposal.js +2 -2
  43. package/dist/provider-connection.js +14 -2
  44. package/dist/release.js +1 -0
  45. package/dist/route-store.js +1 -1
  46. package/dist/serve.js +6 -4
  47. package/dist/server/chat.js +6 -1
  48. package/dist/server/pages.js +4 -1
  49. package/dist/server/render-history.js +2 -1
  50. package/dist/server/render-tasks.js +5 -2
  51. package/dist/server/route-table.js +2 -0
  52. package/dist/server/settings-section-table.js +3 -0
  53. package/dist/server/settings-sections.js +36 -0
  54. package/dist/server/settings.js +36 -0
  55. package/dist/server/tasks.js +31 -4
  56. package/dist/settings-proofs.js +1 -0
  57. package/dist/store.js +83 -11
  58. package/dist/task-sizing-schema.js +14 -0
  59. package/dist/task-sizing.js +76 -10
  60. package/dist/toolroll-update.js +3 -1
  61. package/dist/tui/darwin-arm64/toolroll-tui +0 -0
  62. package/dist/tui/darwin-x64/toolroll-tui +0 -0
  63. package/dist/tui/linux-arm64/toolroll-tui +0 -0
  64. package/dist/tui/linux-x64/toolroll-tui +0 -0
  65. package/dist/view-tools.js +94 -0
  66. package/dist/webhooks.js +8 -2
  67. package/dist/work-index.js +4 -4
  68. package/package.json +2 -1
package/CHANGELOG.md CHANGED
@@ -4,6 +4,72 @@ Each release opens with one line on its theme, then **New**, **Changed**, **Fixe
4
4
  the ones it has). Each item is at most two lines and says where to find it. Notes for maintainers (CI, the release
5
5
  tooling) go on the GitHub release, not here. Entries before 0.9.104 use the older format.
6
6
 
7
+ ## 0.9.112 — 2026-11-16
8
+
9
+ A security release: keys and folder paths in an agent's output never leave Toolroll. Plus asking your agent to restyle
10
+ the workbench, and a smoother everyday terminal: full-text export, the task's situation on Live, and a jump history.
11
+
12
+ ### Fixed
13
+
14
+ - **Keys ending in "-" are caught.** Google, GitLab, OpenAI, Telegram, Slack and Discord tokens before a space or at a
15
+ line's end slipped past the privacy check, redaction and patch scanning in 0.9.111 and earlier.
16
+ - **Folder paths in what an agent said are hidden whole,** including paths after a web address, glued paths,
17
+ `file://` and other local addresses, network shares, `$HOME`/`%USERPROFILE%` forms, and escaped or encoded paths.
18
+ - **Very long agent output can't slow the cleaning down,** and an agent's only error line is never dropped.
19
+
20
+ ### New
21
+
22
+ - **Ask your agent to restyle the workbench.** In your own chat on this computer: themes, colours, density, columns,
23
+ notifications on. Contrast and status colours are protected; keys stay yours. `toolroll view reset` undoes it.
24
+ - **Ctrl-E opens the full text** of a pane in your editor, not the cut-off screen.
25
+ - **Live shows the task's situation:** waiting to retry, on hold or failed, with what the agent said and `x` / `X`.
26
+ - **`'` remembers your last 20 jumps,** and pressing it again goes forward.
27
+
28
+ ### Changed
29
+
30
+ - **Narrow windows show the list** (`b`), with your place ("2 of 5"); the top bar is the same on every screen.
31
+ - **Search covers what's on screen,** including the agent's error; unread dots mark any change you didn't see.
32
+ - **Attempts read the same everywhere:** "attempt 3 (build #4)" in the workbench, `toolroll task show` and status.
33
+ - **The guide covers the terminal workbench,** failures and retries, task sizing and upgrading.
34
+
35
+ ## 0.9.111 — 2026-11-16
36
+
37
+ The terminal workbench, smoothed by five rounds of first-run testing: failures say why in the agent's own words,
38
+ and you can stop, resume, cancel and retry from the keyboard. Plus a layout pass: resize, collapse, zoom, jump to
39
+ what needs you.
40
+
41
+ ### New
42
+
43
+ - **Stop, resume and cancel from the workbench.** `x` stops a task that keeps retrying and resumes it; `X` cancels.
44
+ Each asks first and refuses if the task changed since you looked.
45
+ - **What the agent said.** When an agent fails, Live and Steps show its last lines, cleaned (no paths or keys);
46
+ they never leave Toolroll in chat, push, email or webhooks.
47
+ - **Layout keys.** `<` `>` resize the list or a split, `=` evens them, `b` cycles the list full, slim rail or hidden,
48
+ `z` zooms a panel; the list can sit on the right. Your view is remembered per project.
49
+ - **Jump to what needs you** with `!` and `@` (`'` jumps back), and finished tasks keep an unread dot until opened.
50
+ - **Search and edit.** `/` searches the focused pane; `Ctrl-E` opens its text in your editor, with modelines off.
51
+ - **Settings change in the workbench** (theme, density, glyphs, notifications), saved to `tui.toml`.
52
+ - **Task sizing by a quick model call is opt-in** (Settings → General). Off, nothing calls a model before you
53
+ approve, and uncertain tasks plan first. On, the card says which model sized it.
54
+
55
+ ### Changed
56
+
57
+ - **An agent that errors stops after one failure** and shows what it said; Retry starts it again. Machine
58
+ glitches still retry on their own, with "Last build failed · reason · next try in 40s".
59
+ - **Attempts are counted per task** ("attempt 2") everywhere you read them.
60
+ - **The approval card is shorter:** your usual settings are one line, `f` shows them all.
61
+ - **A signed-out agent is never started** in the background; status says "Codex · signed out (run `codex login`)".
62
+ - **Typing in a Terminal pane stays instant** while a build streams output (was up to a second behind).
63
+
64
+ ### Fixed
65
+
66
+ - **A filed task no longer disappears** from the list while it waits to retry.
67
+ - **First run** opens on "What would you like to work on?" instead of sending you to the browser.
68
+ - **A config folder path too long for the socket** is refused at once with the fix, not after 90 seconds.
69
+ - **Confirmations never take keys before they're drawn** (a tiny window could accept unseen).
70
+ - **Upgrading from the old `standing-orders` package:** the installer removes it first; the docs lead with
71
+ `npm uninstall -g standing-orders`.
72
+
7
73
  ## 0.9.110 — 2026-11-15
8
74
 
9
75
  A real terminal screen: run `toolroll` in a terminal and watch, steer, review and accept your agents' work there, in a
package/README.md CHANGED
@@ -40,10 +40,14 @@ curl -fsSL https://raw.githubusercontent.com/ap9000/toolroll/main/install.sh | s
40
40
  or
41
41
 
42
42
  ```sh
43
- npm install -g toolroll # or: brew install ap9000/toolroll/toolroll
43
+ npm uninstall -g standing-orders 2>/dev/null; npm install -g toolroll # or: brew install ap9000/toolroll/toolroll
44
44
  toolroll
45
45
  ```
46
46
 
47
+ The first command removes Toolroll's older package, `standing-orders`, if you
48
+ have it: npm can't install over it (it stops with `EEXIST: file already
49
+ exists … bin/standing-orders`). Without it, the command does nothing.
50
+
47
51
  Toolroll opens in your terminal and runs while that window is open. No
48
52
  password and no login file: on your own computer you're already in. Started
49
53
  in a git repository, that repository is your project; press `n` for a first
@@ -585,3 +585,33 @@ distributed under the License is distributed on an "AS IS" BASIS,
585
585
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
586
586
  See the License for the specific language governing permissions and
587
587
  limitations under the License.
588
+
589
+ ## vt100 0.16.2 (Rust crate) — MIT
590
+
591
+ The terminal workbench's Terminal tab (the `toolroll-tui` binary) draws a take-over terminal through a vendored,
592
+ modified copy of vt100 0.16.2 by Jesse Luehrs (https://github.com/doy/vt100-rust), kept in `tui/vendor/vt100`. It
593
+ diverges from upstream in `grid.rs`, `row.rs` and `screen.rs` only: rows that scroll are reused and cleared only as
594
+ far as they were written, and one-row and one-column screens no longer overflow. `tui/vendor/vt100/README` lists the
595
+ exact changes.
596
+
597
+ The MIT License (MIT)
598
+
599
+ Copyright (c) 2016 Jesse Luehrs
600
+
601
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
602
+ this software and associated documentation files (the "Software"), to deal in
603
+ the Software without restriction, including without limitation the rights to
604
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
605
+ of the Software, and to permit persons to whom the Software is furnished to do
606
+ so, subject to the following conditions:
607
+
608
+ The above copyright notice and this permission notice shall be included in all
609
+ copies or substantial portions of the Software.
610
+
611
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
612
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
613
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
614
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
615
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
616
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
617
+ SOFTWARE.
@@ -1,4 +1,17 @@
1
1
  export const LEDGER_SOURCES = ["work", "request", "access", "sign-in", "policy", "api", "mcp"];
2
+ export const RECORD_WHOLE_MAX = 16_384;
3
+ export function recordActionWhole(db, entry, detail) {
4
+ const text = JSON.stringify(detail);
5
+ if (text === undefined || text.length > RECORD_WHOLE_MAX || /[\u0000-\u001f\u007f]/.test(text))
6
+ throw new Error("Ledger detail is not storable");
7
+ const row = db.prepare("INSERT INTO action_ledger(at,actor,repo,task_id,run_id,action,outcome,source,detail) VALUES (?,?,?,?,?,?,?,?,?)")
8
+ .run(entry.at, entry.actor, entry.repo, entry.taskId, entry.runId, entry.action, entry.outcome, entry.source, text);
9
+ return Number(row.lastInsertRowid);
10
+ }
11
+ export const DETAIL_SHOWN = 300;
12
+ export function detailShown(detail) {
13
+ return detail.length <= DETAIL_SHOWN ? detail : `${detail.slice(0, DETAIL_SHOWN - 1)}…`;
14
+ }
2
15
  export const LEDGER_V99_TABLE = (name) => `CREATE TABLE ${name} (
3
16
  id INTEGER PRIMARY KEY AUTOINCREMENT,
4
17
  at TEXT NOT NULL, actor TEXT NOT NULL, repo TEXT,
@@ -165,7 +165,7 @@ const npm = (pkg) => ({ install: `npm install -g ${pkg}`, installRun: { binary:
165
165
  const ACP_CHECK = (id) => `toolroll agents check ${id} --model <model>`;
166
166
  export const AGENT_SETUP = Object.freeze({
167
167
  claude: { ...npm("@anthropic-ai/claude-code"), signIn: "claude auth login", signInRun: { binary: "claude", args: ["auth", "login"] }, key: null, check: null,
168
- note: "Flexible threads bill your Claude plan through Toolroll's relay, which needs a long-lived token: run `claude setup-token` in your own terminal (it prints the token, so Toolroll never runs it for you)." },
168
+ note: "Flexible threads (off for now) need `claude setup-token`." },
169
169
  codex: { ...npm("@openai/codex"), signIn: "codex login", signInRun: { binary: "codex", args: ["login"] }, key: null, check: null, note: null },
170
170
  gemini: { ...npm("@google/gemini-cli"), signIn: "gemini", signInRun: { binary: "gemini", args: [] },
171
171
  key: "Or run it on an API key: switch it with `toolroll keys auth gemini api-key`, then pipe the key in with `toolroll keys set gemini < key.txt` (or paste it in Settings → Agents in the browser).", check: null,
@@ -0,0 +1,4 @@
1
+ export const V170_ADDED_COLUMNS = Object.freeze({
2
+ run: { agent_said_json: { definition: "TEXT CHECK (agent_said_json IS NULL OR length(agent_said_json) BETWEEN 2 AND 4096)", saved: "NULL" } },
3
+ });
4
+ export const V170_STEPS = Object.freeze(["agent-said-column"]);
@@ -0,0 +1,77 @@
1
+ import { redactSecretLines, scanForSecrets } from "./evidence.js";
2
+ import { privateWords } from "./outbound-privacy.js";
3
+ export const AGENT_SAID_LINES = 8;
4
+ export const AGENT_SAID_CHARS = 200;
5
+ const ESCAPES = /\u001b\[[0-?]*[ -/]*[@-~]|\u001b\][^\u0007\u001b]*(?:\u0007|\u001b\\)|\u001b[@-_]/g;
6
+ const CONTROLS = /[\u0000-\u0008\u000b-\u001f\u007f-\u009f\u061c\u200b-\u200f\u202a-\u202e\u2060-\u206f]/g;
7
+ const STARTS = String.raw `\s"'` + "`" + String.raw `(<[=:,`;
8
+ const START = `(^|[${STARTS}])`;
9
+ const ENDS = String.raw `\s"'` + "`" + String.raw `)>\]:,;`;
10
+ const HOME_VARIABLE = String.raw `(?:\$HOME|\$\{HOME\}|%USERPROFILE%|%HOMEPATH%|\$env:USERPROFILE)[\\/]`;
11
+ const NEW_ROOT = String.raw `(?![A-Za-z]:[\\/]|~[A-Za-z0-9._-]*\/|\\\\(?![\\${ENDS}])|(?<=[${STARTS}])${HOME_VARIABLE})`;
12
+ const PART = `(?:${NEW_ROOT}[^${ENDS}/])`;
13
+ const TAIL = `(?:${NEW_ROOT}[^${ENDS}])`;
14
+ const ROOTED = [
15
+ `(?:\\/${PART}+){2,}\\/?`,
16
+ `\\/${PART}*\\.${PART}+`,
17
+ `~[A-Za-z0-9._-]*\\/${TAIL}*`,
18
+ `[A-Za-z]:[\\\\/]${TAIL}*`,
19
+ `\\\\\\\\(?![\\\\${ENDS}])${TAIL}+`,
20
+ `${HOME_VARIABLE}${TAIL}*`,
21
+ `(?:\\\\\\/(?:${NEW_ROOT}[^${ENDS}/\\\\])+){2,}`,
22
+ ].join("|");
23
+ const PATHS = new RegExp(`${START}((?:${ROOTED})+)`, "g");
24
+ const ROOTED_ANYWHERE = new RegExp(`(?:^|[^A-Za-z0-9])(?:${ROOTED})`);
25
+ const NETWORK = /(\b(?:https?|wss?|ftp|ssh|git):\/\/[^\s"'`<>]*)/i;
26
+ const OTHER_ADDRESS = /\b(?!(?:https?|wss?|ftp|ssh|git):\/\/)[a-z][a-z0-9+.-]*:\/\/([^\s"'`<>]*)/gi;
27
+ const otherAddress = (whole, rest) => /[\\/]/.test(rest) ? "[path]" : whole;
28
+ const WORDS = /([\s"'`<>]+)/;
29
+ const ESCAPED = /%[0-9A-Fa-f]{2}/;
30
+ const DECODE_AT_MOST = 2048;
31
+ function encodedWords(text) {
32
+ return text.split(WORDS).map((word, at) => {
33
+ if (at % 2 === 1 || !ESCAPED.test(word))
34
+ return word;
35
+ if (word.length > DECODE_AT_MOST)
36
+ return "[path]";
37
+ const decoded = word.replace(/%([0-9A-Fa-f]{2})/g, (_, hex) => String.fromCharCode(Number.parseInt(hex, 16)));
38
+ return ROOTED_ANYWHERE.test(` ${decoded}`) ? "[path]" : word;
39
+ }).join("");
40
+ }
41
+ const READ_AT_MOST = 64 * 1024;
42
+ const LINE_AT_MOST = 4096;
43
+ const cutStart = (line) => `… ${line.replace(/^[^\s"'`<>]*[\s"'`<>]?/, "")}`;
44
+ const capped = (line) => line.length <= LINE_AT_MOST ? line : cutStart(line.slice(-(LINE_AT_MOST - 2)));
45
+ const URL_USERINFO = /\b([a-z][a-z0-9+.-]*:\/\/)[^\s/@"'`<>]+@/gi;
46
+ const URL_QUERY = /\b([a-z][a-z0-9+.-]*:\/\/[^\s?#"'`<>]*)[?#][^\s"'`<>]*/gi;
47
+ const ADDRESS_QUERY = /\b[a-z][a-z0-9+.-]*:\/\/[^\s?#"'`<>]*([?#][^\s"'`<>]*)?/gi;
48
+ function shortened(line) {
49
+ if (line.length <= AGENT_SAID_CHARS)
50
+ return line;
51
+ let end = AGENT_SAID_CHARS - 1;
52
+ if (/[\ud800-\udbff]/.test(line[end - 1] ?? ""))
53
+ end -= 1;
54
+ let kept = line.slice(0, end).trimEnd();
55
+ const last = [...kept.matchAll(ADDRESS_QUERY)].at(-1);
56
+ if (last?.[1] !== undefined && last.index + last[0].length === kept.length)
57
+ kept = kept.slice(0, kept.length - last[1].length).trimEnd();
58
+ return `${kept}…`;
59
+ }
60
+ export function agentSaidTail(text) {
61
+ if (text === null || text === undefined || text.trim() === "")
62
+ return [];
63
+ const sliced = text.length > READ_AT_MOST && text[text.length - READ_AT_MOST - 1] !== "\n";
64
+ const tail = text.length <= READ_AT_MOST ? text : text.slice(-READ_AT_MOST);
65
+ const plain = tail.replace(ESCAPES, "").replace(/\r\n?/g, "\n").replace(/\t/g, " ").replace(CONTROLS, "");
66
+ const bounded = plain.split("\n").map((line, at) => capped(at === 0 && sliced ? cutStart(line) : line));
67
+ const addresses = bounded.map(line => line.replace(URL_USERINFO, "$1[hidden]@").replace(URL_QUERY, "$1?[hidden]")).join("\n");
68
+ const redacted = redactSecretLines(addresses, scanForSecrets(addresses));
69
+ const lines = redacted.split("\n")
70
+ .map(line => line.replace(OTHER_ADDRESS, otherAddress).split(NETWORK)
71
+ .map((part, at) => at % 2 === 1 ? part : encodedWords(part).replace(PATHS, "$1[path]")).join(""))
72
+ .map(line => line.replace(/\s+/g, " ").trim()).filter(line => line !== "");
73
+ return lines
74
+ .map(shortened)
75
+ .filter(line => !privateWords(line))
76
+ .slice(-AGENT_SAID_LINES);
77
+ }
@@ -5,7 +5,7 @@ import { permissionPlainWords, scopeFullAccess } from "./chat-terms.js";
5
5
  import { checkAccessWords } from "./check-access.js";
6
6
  import { networkWords, unaccountedHosts } from "./egress.js";
7
7
  import { agentModelName } from "./model-names.js";
8
- import { makesNoPlan, NO_READINESS, projectRoute, routeFromJson, sizeWords } from "./phase-routing.js";
8
+ import { makesNoPlan, NO_READINESS, PLANNED_FIRST_REASON, projectRoute, routeFromJson, sizeWords } from "./phase-routing.js";
9
9
  import { sandboxTermsWords } from "./project-sandbox.js";
10
10
  import { qualityModeTitle } from "./quality.js";
11
11
  import { approvalOf, chainTermsLines, describeApproval, liveChainFromJson, releaseAsksAgainWords, releaseCheckSentence, releaseTermsSentence } from "./scope.js";
@@ -48,6 +48,23 @@ function agentWords(route, profile) {
48
48
  const size = sizeWords(route);
49
49
  return size === null ? who : `${who} (${lowerFirst(size)})`;
50
50
  }
51
+ function timeWords(profile) {
52
+ if ("idleTimeoutSeconds" in profile)
53
+ return `${minutes(profile.timeoutSeconds)}, or ${minutes(profile.idleTimeoutSeconds)} silent`;
54
+ return `${minutes(profile.timeoutSeconds)} ${profile.timeoutKind === "idle" ? "without progress" : "per attempt"}`;
55
+ }
56
+ function usualSummaryOf(usual, profile) {
57
+ const has = (label) => usual.find(one => one.label === label);
58
+ const parts = [];
59
+ if (profile !== null && has("Reads") !== undefined && profile.fencePolicy === 2 && has("Project checks")?.words === checkAccessWords("sandboxed"))
60
+ parts.push("sandboxed");
61
+ if (profile !== null && has("Writes") !== undefined && profile.writes === "workspace")
62
+ parts.push("writes only its checkout");
63
+ const checks = has("Checks");
64
+ if (checks !== undefined)
65
+ parts.push(`${checks.words} checks`);
66
+ return parts.join(", ");
67
+ }
51
68
  function limitWords(profile) {
52
69
  if ("idleTimeoutSeconds" in profile)
53
70
  return `stops after ${minutes(profile.timeoutSeconds)}, or ${minutes(profile.idleTimeoutSeconds)} silent`;
@@ -141,15 +158,21 @@ export function approvalSummaryOf(scope, context = NO_CONTEXT) {
141
158
  decisions.push({ label: "Goal", words: scope.goal, fields: ["goal"] });
142
159
  if (scope.outOfScope !== null)
143
160
  decisions.push({ label: "Won’t touch", words: scope.outOfScope, fields: ["outOfScope"] });
161
+ const reviewOnly = scope.acceptance.length === 1 && scope.acceptance[0].statement.trim() === scope.goal.trim()
162
+ && scope.acceptance[0].evidence.length === 1 && scope.acceptance[0].evidence[0] === "manual-review";
144
163
  decisions.push(scope.acceptance.length === 0
145
164
  ? { label: "Done when", words: "You decide when you review the result.", fields: ["acceptance"] }
146
- : { label: "Done when", words: `${scope.acceptance[0].statement} (${scope.acceptance[0].evidence.map(kind => EVIDENCE_WORDS[kind] ?? kind).join(", ")})`,
147
- lines: scope.acceptance.slice(1).map(one => `${one.statement} (${one.evidence.map(kind => EVIDENCE_WORDS[kind] ?? kind).join(", ")})`), fields: ["acceptance"] });
165
+ : reviewOnly ? { label: "Done when", words: "You review the result", fields: ["acceptance"] }
166
+ : { label: "Done when", words: `${scope.acceptance[0].statement} (${scope.acceptance[0].evidence.map(kind => EVIDENCE_WORDS[kind] ?? kind).join(", ")})`,
167
+ lines: scope.acceptance.slice(1).map(one => `${one.statement} (${one.evidence.map(kind => EVIDENCE_WORDS[kind] ?? kind).join(", ")})`), fields: ["acceptance"] });
148
168
  if (scope.candidate)
149
169
  decisions.push({ label: "Commit", words: `${scope.candidate}, checked out as it is; no agent runs`, fields: ["candidate"] });
150
170
  const agent = agentWords(route, profile);
151
171
  if (agent !== null)
152
172
  decisions.push({ label: "Agent", words: agent, fields: [...(route === null ? [] : ["route", ...route.legs.map(leg => `route.${leg.phase}`)]), ...(profile === null ? [] : ["profile.provider", "profile.model"])] });
173
+ const sized = route?.size ?? null;
174
+ if (sized !== null && sized.source === "classifier" && sized.by !== undefined)
175
+ decisions.push({ label: "Sized by", words: sized.by, fields: ["route"] });
153
176
  const permissionKey = profile === null ? null : PERMISSION_KEYS.find(key => key in profile) ?? null;
154
177
  const tools = permissionPlainWords(profile);
155
178
  const usualTools = usualProfile === null ? null : permissionPlainWords(usualProfile);
@@ -163,7 +186,7 @@ export function approvalSummaryOf(scope, context = NO_CONTEXT) {
163
186
  decisions.push({ label: "Tools", words: `${tools}${usualTools !== null && usualTools !== tools ? " (not the project’s usual)" : ""}`,
164
187
  fields: permissionKey === null ? [] : [`profile.${permissionKey}`], ...(scopeFullAccess(profile) ? { risky: true } : {}) });
165
188
  }
166
- decisions.push({ label: "May cost", words: scope.budgetMicrousd === null ? "no cap: an attempt runs until it finishes or reaches its time limit" : `up to ${money(scope.budgetMicrousd)} per attempt; the agent is stopped there`,
189
+ decisions.push({ label: "May cost", words: scope.budgetMicrousd === null ? `No spend cap · stops at its time limit${profile === null ? "" : ` (${timeWords(profile)})`}` : `up to ${money(scope.budgetMicrousd)} per attempt; the agent is stopped there`,
167
190
  fields: ["budget"], ...(scope.budgetMicrousd === null ? { risky: true } : {}) });
168
191
  if (scope.releaseTerms != null) {
169
192
  const terms = scope.releaseTerms;
@@ -202,6 +225,9 @@ export function approvalSummaryOf(scope, context = NO_CONTEXT) {
202
225
  const chain = chainTermsLines(scope);
203
226
  if (chain.length > 0)
204
227
  warnings.push({ words: [...chain, ...fallbackDifferences(scope)].join(" "), fields: ["chain"] });
228
+ if (sized !== null && route !== null && sized.source === "heuristic" && sized.reason === PLANNED_FIRST_REASON && !makesNoPlan(sized, route.risk)) {
229
+ warnings.push({ words: "Planned first: task sizing is off (Settings → General)", fields: ["route"] });
230
+ }
205
231
  const rules = context.rules;
206
232
  if (rules !== null && isProtectedWork(rules, [...scope.touches]))
207
233
  warnings.push({ words: "This project protects this work: two people must approve it.", fields: [] });
@@ -213,9 +239,10 @@ export function approvalSummaryOf(scope, context = NO_CONTEXT) {
213
239
  if (context.revision?.problem != null)
214
240
  warnings.push({ words: `Toolroll can’t check what this revises (${context.revision.problem}), so no fix runs on its own.`, fields: [] });
215
241
  const usualLabel = context.usual === null ? OTHER_LABEL : USUAL_LABEL;
216
- const key = createHash("sha256").update(JSON.stringify({ v: 2, digest: scope.digest, revision, revisionChanges, decisions, differs, warnings, usual, usualLabel, baseline: context.usual }), "utf8").digest("hex").slice(0, 32);
242
+ const usualSummary = usualSummaryOf(usual, profile);
243
+ const key = createHash("sha256").update(JSON.stringify({ v: 3, digest: scope.digest, revision, revisionChanges, decisions, differs, warnings, usual, usualLabel, usualSummary, baseline: context.usual }), "utf8").digest("hex").slice(0, 32);
217
244
  const why = context.evidence == null || context.evidence === "" ? null : context.evidence.replace(/^Why this model: /, "");
218
- return { revision, revisionNotes, revisionChanges, decisions, why, differs, warnings, usual, usualLabel, key };
245
+ return { revision, revisionNotes, revisionChanges, decisions, why, differs, warnings, usual, usualLabel, usualSummary, key };
219
246
  }
220
247
  export function summaryFields(summary) {
221
248
  return new Set([...summary.decisions, ...summary.differs, ...summary.usual, ...summary.warnings].flatMap(one => one.fields));
@@ -250,7 +277,8 @@ export function summaryLines(summary) {
250
277
  ...(summary.why === null ? [] : [`${pad("Why model")}${summary.why}`]),
251
278
  ...summary.differs.flatMap(row),
252
279
  ...summary.warnings.map(one => `${pad("Note")}${one.words}`),
253
- ...(summary.usual.length === 0 ? [] : [`${pad("Usual")}${summary.usualLabel}: ${summary.usual.map(one => `${lowerFirst(one.label)} ${one.words}`).join(" · ")}`]),
280
+ ...(summary.usual.length === 0 ? [] : [`${pad("Usual")}${summary.usualSummary === "" ? summary.usualLabel : `${summary.usualLabel}: ${summary.usualSummary}`}`,
281
+ ...summary.usual.filter(one => !saidInUsualSummary(one, summary.usualSummary)).map(one => `${indent}${one.label}: ${one.words}`)]),
254
282
  ];
255
283
  }
256
284
  export function summaryText(summary, omit = () => false) {
@@ -340,5 +368,8 @@ export function approvalSummaryFor(store, taskId, now, evidence = null) {
340
368
  }
341
369
  export function shipSummaryOf(digest, decisions, warnings) {
342
370
  const key = createHash("sha256").update(JSON.stringify({ v: 2, kind: "flexible-ship", digest, decisions, warnings }), "utf8").digest("hex").slice(0, 32);
343
- return { revision: null, revisionNotes: [], revisionChanges: [], decisions, why: null, differs: [], warnings, usual: [], usualLabel: USUAL_LABEL, key };
371
+ return { revision: null, revisionNotes: [], revisionChanges: [], decisions, why: null, differs: [], warnings, usual: [], usualLabel: USUAL_LABEL, usualSummary: "", key };
372
+ }
373
+ function saidInUsualSummary(row, usualSummary) {
374
+ return row.label === "Checks" && usualSummary.split(", ").includes(`${row.words} checks`);
344
375
  }
package/dist/bin.js CHANGED
@@ -41,6 +41,11 @@ async function sqliteHasFts5() {
41
41
  }
42
42
  }
43
43
  const argv = process.argv.slice(2);
44
+ export const STARTING_SAID = Symbol.for("toolroll.starting-said");
45
+ if (argv.length === 0 && process.stdout.isTTY === true && process.stdin.isTTY === true) {
46
+ process.stdout.write("Starting Toolroll…\n");
47
+ globalThis[STARTING_SAID] = true;
48
+ }
44
49
  const { quickAnswer } = await import("./cli-fast.js");
45
50
  const quick = quickAnswer(argv);
46
51
  if (quick !== null) {
@@ -54,4 +59,3 @@ else {
54
59
  const { runCliProcess } = await import("./cli.js");
55
60
  await runCliProcess(argv);
56
61
  }
57
- export {};
@@ -586,6 +586,36 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
586
586
  See the License for the specific language governing permissions and
587
587
  limitations under the License.
588
588
 
589
+ ## vt100 0.16.2 (Rust crate) — MIT
590
+
591
+ The terminal workbench's Terminal tab (the `toolroll-tui` binary) draws a take-over terminal through a vendored,
592
+ modified copy of vt100 0.16.2 by Jesse Luehrs (https://github.com/doy/vt100-rust), kept in `tui/vendor/vt100`. It
593
+ diverges from upstream in `grid.rs`, `row.rs` and `screen.rs` only: rows that scroll are reused and cleared only as
594
+ far as they were written, and one-row and one-column screens no longer overflow. `tui/vendor/vt100/README` lists the
595
+ exact changes.
596
+
597
+ The MIT License (MIT)
598
+
599
+ Copyright (c) 2016 Jesse Luehrs
600
+
601
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
602
+ this software and associated documentation files (the "Software"), to deal in
603
+ the Software without restriction, including without limitation the rights to
604
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
605
+ of the Software, and to permit persons to whom the Software is furnished to do
606
+ so, subject to the following conditions:
607
+
608
+ The above copyright notice and this permission notice shall be included in all
609
+ copies or substantial portions of the Software.
610
+
611
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
612
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
613
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
614
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
615
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
616
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
617
+ SOFTWARE.
618
+
589
619
 
590
620
  ## Bundled dependency: @alcalzone/ansi-tokenize 0.2.5
591
621