toolroll 0.9.107 → 0.9.109

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 (105) hide show
  1. package/CHANGELOG.md +54 -0
  2. package/README.md +4 -3
  3. package/dist/advanced-view.js +0 -1
  4. package/dist/agent-fence.js +35 -4
  5. package/dist/agent-state.js +5 -2
  6. package/dist/assignment-ui.js +5 -5
  7. package/dist/assignment.js +5 -2
  8. package/dist/browser/terminal.js +1 -1
  9. package/dist/browser/workspace.css +1 -1
  10. package/dist/browser/workspace.js +38 -33
  11. package/dist/browser-crew.js +4 -4
  12. package/dist/browser-shell.js +1 -1
  13. package/dist/browser-workspace.js +4 -11
  14. package/dist/builder.js +9 -1
  15. package/dist/chat-controls.js +6 -5
  16. package/dist/chat-decide.js +1 -1
  17. package/dist/chat-quiet.js +3 -3
  18. package/dist/chat-voice.js +2 -2
  19. package/dist/cli-help.js +17 -13
  20. package/dist/cli.js +4 -3
  21. package/dist/console-chrome.js +10 -3
  22. package/dist/contracts/cli.js +2 -0
  23. package/dist/contracts/console-api.js +5 -4
  24. package/dist/contracts/handoff.js +4 -0
  25. package/dist/decision.js +17 -0
  26. package/dist/demo-chat.js +1 -1
  27. package/dist/demo.js +6 -0
  28. package/dist/design/kit.js +4 -3
  29. package/dist/dispatch.js +3 -8
  30. package/dist/flexible-available.js +1 -0
  31. package/dist/flexible-schema.js +32 -0
  32. package/dist/flexible-thread-schema.js +30 -0
  33. package/dist/flexible-thread.js +526 -0
  34. package/dist/flexible-ui.js +44 -0
  35. package/dist/flexible.js +359 -0
  36. package/dist/folder-look.js +65 -4
  37. package/dist/git-views.js +38 -38
  38. package/dist/guides.js +14 -11
  39. package/dist/keymap.js +1 -1
  40. package/dist/lead-cli.js +2 -1
  41. package/dist/lead-context.js +1 -1
  42. package/dist/limits-ui.js +1 -1
  43. package/dist/live-bus.js +82 -12
  44. package/dist/login-secrets.js +43 -0
  45. package/dist/needs-you.js +3 -3
  46. package/dist/nightly-github.js +2 -2
  47. package/dist/operate.js +278 -21
  48. package/dist/project-admission.js +60 -29
  49. package/dist/project-delete-ui.js +2 -1
  50. package/dist/project-delete.js +1 -0
  51. package/dist/project.js +73 -0
  52. package/dist/provider-auth.js +1 -1
  53. package/dist/release.js +1 -0
  54. package/dist/repos.js +37 -0
  55. package/dist/result-actions.js +3 -0
  56. package/dist/result-evidence-readers.js +8 -2
  57. package/dist/result-review.js +20 -9
  58. package/dist/route-hooks.js +1 -0
  59. package/dist/sample-project.js +167 -9
  60. package/dist/scope.js +17 -2
  61. package/dist/serve.js +47 -32
  62. package/dist/server/chat.js +9 -9
  63. package/dist/server/chrome.js +16 -16
  64. package/dist/server/guards.js +10 -4
  65. package/dist/server/home.js +37 -5
  66. package/dist/server/http.js +4 -2
  67. package/dist/server/in-place.js +5 -4
  68. package/dist/server/kit.js +2 -2
  69. package/dist/server/live.js +103 -10
  70. package/dist/server/login-help.js +67 -0
  71. package/dist/server/pages.js +258 -78
  72. package/dist/server/people-tokens.js +36 -24
  73. package/dist/server/render-chat.js +1 -1
  74. package/dist/server/render-history.js +18 -4
  75. package/dist/server/render-new-task.js +2 -2
  76. package/dist/server/render-pages.js +21 -39
  77. package/dist/server/render-people.js +16 -4
  78. package/dist/server/render-projects.js +63 -15
  79. package/dist/server/render-results.js +26 -10
  80. package/dist/server/render-tasks.js +26 -17
  81. package/dist/server/retired-routes.js +37 -4
  82. package/dist/server/route-policy.js +8 -0
  83. package/dist/server/route-table.js +15 -5
  84. package/dist/server/settings-computers.js +140 -0
  85. package/dist/server/settings-scripts.js +15 -0
  86. package/dist/server/settings-section-table.js +56 -0
  87. package/dist/server/settings-sections.js +258 -0
  88. package/dist/server/settings.js +167 -19
  89. package/dist/server/task-views.js +47 -13
  90. package/dist/server/tasks.js +143 -90
  91. package/dist/server/welcome.js +35 -23
  92. package/dist/settings-groups-ui.js +34 -106
  93. package/dist/settings-proofs.js +5 -2
  94. package/dist/sqlite-telemetry.js +70 -21
  95. package/dist/store.js +141 -9
  96. package/dist/surface.js +4 -1
  97. package/dist/task-link.js +64 -0
  98. package/dist/task-outcome-cli.js +99 -4
  99. package/dist/tui-source.js +11 -3
  100. package/dist/tui.js +39 -39
  101. package/dist/typed-words-schema.js +18 -0
  102. package/dist/welcome-facts.js +15 -7
  103. package/dist/work-index.js +126 -29
  104. package/dist/work-reads.js +279 -0
  105. package/package.json +4 -2
package/CHANGELOG.md CHANGED
@@ -4,6 +4,60 @@ 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.109 — 2026-11-14
8
+
9
+ One Work screen, pages several times faster on a busy install, a clearer first run, and what the agent decided
10
+ before you accept.
11
+
12
+ ### New
13
+
14
+ - **Work is the first screen.** What needs you comes first (Decide, Review, Unblock), then Running, Queued and Done;
15
+ pick a row and the task opens beside the list. Approve, Accept and Send back work there without a page load.
16
+ - **The agent says what it decided.** Before you accept, a result shows what the agent decided, assumed, didn't finish
17
+ and thinks is risky, and quotes the notes you and your teammates wrote for it.
18
+ - **Settings → Computers** holds the computers that build: connect a builder, see each one, and add or retire one on
19
+ its own password page.
20
+ - **A first task with no coding agent signed in says so.** Filing from the terminal, the shell or the browser names
21
+ the one command to run; the welcome says the task is "Filed" until an agent picks it up.
22
+ - **The shell says what comes next** after `toolroll task add`: open `toolroll` and press p to ask for the plan.
23
+
24
+ ### Changed
25
+
26
+ - **Home and Tasks are one screen.** Old Home and Tasks links open Work with the same filters; the sidebar is Work,
27
+ Chat and Settings, with your projects and Manage projects.
28
+ - **Faster on a busy install.** Chat, Work and task pages read many times less from the database: on 10,000 tasks
29
+ Chat opens in about 2 s instead of 14 s.
30
+ - **One page per result.** Every "Open result" (Work, Chat, chat apps, notifications) opens the task page at that
31
+ exact result, status and action first; an earlier attempt opens on its own page with nothing that acts on the
32
+ current one.
33
+ - **Live pages recover in about half a second** after your phone wakes or the network changes, without a gap.
34
+ - **Show advanced features** moved to Settings → General.
35
+
36
+ ### Fixed
37
+
38
+ - **Send back never sends notes you haven't seen,** and a lost answer is never shown as done.
39
+ - **A result page sends its result panel once,** about half the size it was.
40
+
41
+ ## 0.9.108 — 2026-11-14
42
+
43
+ Add projects from the browser, get back in when you forget your password, and pages that reconnect on their own.
44
+
45
+ ### New
46
+
47
+ - **Browse… on Projects.** Pick a repository from a folder list instead of typing its path; `~/code/app` works in the
48
+ path box too. A repository outside your projects folder can be added after you type your password.
49
+ - **`toolroll password reset`** gets you back in when you've forgotten your password, on the computer Toolroll runs on.
50
+ It ends that account's sessions and lead tokens and says so before you confirm.
51
+ - **Try the sample project from the terminal:** press `s` on Setup, or run `toolroll welcome sample`.
52
+
53
+ ### Changed
54
+
55
+ - **The sign-in page says how to get in** on this computer (where the saved password is, or how to reset it).
56
+ - **Pages reconnect by themselves** after your phone wakes or the connection drops, and show a small "Reconnecting…"
57
+ or "Offline" only while that's true.
58
+ - **Send back works in the terminal app without a password** when you're the computer's local owner; approve,
59
+ complete and send back in the shell say why when they can't and where to do it instead.
60
+
7
61
  ## 0.9.107 — 2026-11-13
8
62
 
9
63
  A smoother install, an honest terminal when something stops, and sign-in links that stay private.
package/README.md CHANGED
@@ -47,9 +47,10 @@ toolroll
47
47
  Toolroll opens in your terminal and runs while that window is open. No
48
48
  password and no login file: on your own computer you're already in. Started
49
49
  in a git repository, that repository is your project; press `n` for a first
50
- task, approve the plan, and the result comes back **Ready**. Elsewhere, add a
51
- project with `toolroll repos add <folder>`, or open the browser (press `w`, or
52
- run `toolroll --web`), which also offers a sample project. To look around
50
+ task, approve the plan, and the result comes back **Ready**. Elsewhere, press
51
+ `s` to try a small sample project, add your own with
52
+ `toolroll repos add <folder>`, or open the browser (press `w`, or run
53
+ `toolroll --web`). To look around
53
54
  first, `toolroll demo` opens a seeded sandbox with no model calls and no spend.
54
55
  More: [Getting started](docs/guide/getting-started.md).
55
56
 
@@ -21,6 +21,5 @@ export const ADVANCED_PAGES = Object.freeze([
21
21
  { title: "Sign-in with a provider", href: "/settings/sign-in", words: "Let people sign in with your identity provider", operator: true },
22
22
  { title: "Passwordless", href: "/settings/passwordless", words: "Sign in once; most approvals then need no password", operator: true },
23
23
  { title: "Monitoring", href: "/settings/monitoring", words: "Send the audit stream and traces to your own systems", operator: true },
24
- { title: "Builders", href: "/fleet", words: "Every computer that builds" },
25
24
  { title: "For each project", href: "/settings/projects", words: "Fallback agents, live view commands, code map and flaky tests, on each project’s page" },
26
25
  ]);
@@ -16,6 +16,7 @@ import { SEATBELT_PROBE, sandboxRuntimeProblem, srtSpawn } from "./sandbox-runti
16
16
  import { protectedStorageDenies, protectedStorageNames } from "./protected-storage.js";
17
17
  import { ensureSecretsDir, legacyLoginFileOf, SECRETS_DIR, secretsDirOf } from "./login-secrets.js";
18
18
  import { getDefaultWritePaths } from "@anthropic-ai/sandbox-runtime";
19
+ export const FLEXIBLE_THREADS_DIR = "threads";
19
20
  const SENSITIVE_NAME = /(^up-login\.txt$|token|secret|login|password|credential|vapid|keys?\b|\.pem$|\.key$|^backups$|^evidence$|^remote$|^sign-in\.json$|^monitoring\.json$)/i;
20
21
  function real(path) {
21
22
  try {
@@ -97,6 +98,7 @@ export function trustedWorktreeBinding(repository, worktree, poolRoots = []) {
97
98
  export function agentFence(options) {
98
99
  const fence = new Set();
99
100
  let runFolder = null;
101
+ const literal = new Set();
100
102
  const home = real(options.home ?? homedir());
101
103
  const worktree = options.worktree === null ? null : real(options.worktree);
102
104
  if (options.databaseFile !== null && options.databaseFile !== "" && options.databaseFile !== ":memory:") {
@@ -133,6 +135,30 @@ export function agentFence(options) {
133
135
  catch { }
134
136
  fence.add(backups);
135
137
  fence.add(real(backups));
138
+ const threads = join(state, FLEXIBLE_THREADS_DIR);
139
+ try {
140
+ mkdirSync(threads, { mode: 0o700 });
141
+ }
142
+ catch (error) {
143
+ if (error.code !== "EEXIST")
144
+ process.stderr.write(`toolroll: fence: couldn't make ${threads} (${error.message}); it is denied by name, and no Flexible thread starts\n`);
145
+ }
146
+ let threadsFolder = false, threadsThere = false;
147
+ try {
148
+ const held = lstatSync(threads);
149
+ threadsThere = true;
150
+ threadsFolder = held.isDirectory() && !held.isSymbolicLink();
151
+ }
152
+ catch {
153
+ threadsThere = false;
154
+ }
155
+ if (threadsThere && !threadsFolder)
156
+ process.stderr.write(`toolroll: fence: ${threads} isn't a folder (a link?); it is denied by name and never followed\n`);
157
+ const ownThread = threadsFolder && worktree !== null && (worktree === threads || inside(worktree, threads));
158
+ if (!ownThread) {
159
+ fence.add(threads);
160
+ literal.add(threads);
161
+ }
136
162
  const secrets = secretsDirOf(state);
137
163
  try {
138
164
  ensureSecretsDir(state);
@@ -179,7 +205,7 @@ export function agentFence(options) {
179
205
  fence.add(real(path));
180
206
  for (const path of options.boundary?.protectedShell ?? [])
181
207
  fence.add(real(path));
182
- const protectedPaths = new Set([...fence].flatMap(path => path === runFolder || [RUNNER_PROCESS_DIR, "backups", SECRETS_DIR].includes(basename(path)) ? [path, real(path)] : [real(path)]));
208
+ const protectedPaths = new Set([...fence].flatMap(path => literal.has(path) ? [path] : path === runFolder || [RUNNER_PROCESS_DIR, "backups", SECRETS_DIR].includes(basename(path)) ? [path, real(path)] : [real(path)]));
183
209
  const storage = options.protectedStorage ?? protectedStorageDenies(home);
184
210
  for (const path of storage) {
185
211
  protectedPaths.add(path);
@@ -189,7 +215,7 @@ export function agentFence(options) {
189
215
  fence.add(path);
190
216
  const binding = options.binding;
191
217
  const needed = binding === undefined || binding === null ? [] : [binding.gitdir, real(join(binding.main, ".git"))];
192
- return [...new Set([...[...fence].flatMap(path => path === runFolder || [RUNNER_PROCESS_DIR, "backups", SECRETS_DIR].includes(basename(path)) ? [path, real(path)] : [real(path)]), ...storage.flatMap(path => [path, real(path)])])].filter(path => {
218
+ return [...new Set([...[...fence].flatMap(path => literal.has(path) ? [path] : path === runFolder || [RUNNER_PROCESS_DIR, "backups", SECRETS_DIR].includes(basename(path)) ? [path, real(path)] : [real(path)]), ...storage.flatMap(path => [path, real(path)])])].filter(path => {
193
219
  if (protectedPaths.has(path) || !needed.some(target => target === path || inside(target, path)))
194
220
  return true;
195
221
  console.warn(`Dropped build fence entry covering this checkout's own Git data: ${path}`);
@@ -758,6 +784,8 @@ export function srtTermsOf(fence, grants = NO_GRANTS) {
758
784
  denyRead.add(name);
759
785
  denyWrite.add(name);
760
786
  }
787
+ for (const path of grants.readDenyOnly ?? [])
788
+ denyRead.add(real(path));
761
789
  for (const file of grants.signIns?.read ?? [])
762
790
  allowRead.add(file);
763
791
  const folders = grants.runFolders;
@@ -780,7 +808,8 @@ export function srtTermsOf(fence, grants = NO_GRANTS) {
780
808
  for (const root of pool.deny)
781
809
  denyRead.add(root);
782
810
  if (pool.own !== null)
783
- allowRead.add(pool.own);
811
+ for (const path of grants.ownReadBack ?? [pool.own])
812
+ allowRead.add(real(path));
784
813
  for (const path of codexPool(pool).deny)
785
814
  denyWrite.add(path);
786
815
  for (const sealed of pool.sealed ?? []) {
@@ -802,7 +831,8 @@ export function srtTermsOf(fence, grants = NO_GRANTS) {
802
831
  const writes = grants.writes;
803
832
  const signInWrites = [...grants.signIns?.writes ?? [], ...(grants.signIns?.transcripts ?? []).map(folder => join(folder, "*.jsonl"))];
804
833
  const allowOnly = writes === undefined ? ["/", ...(pool?.own == null ? [] : [real(pool.own)]), ...(folders?.own == null ? [] : [folders.own])]
805
- : [...writes.subpaths, ...writes.prefixes.map(one => `${one.path}*`), ...signInWrites, ...getDefaultWritePaths({ denyRead: readConfig.denyOnly, allowRead: readConfig.allowWithinDeny })];
834
+ : [...writes.subpaths, ...writes.prefixes.map(one => `${one.path}*`), ...signInWrites, ...getDefaultWritePaths({ denyRead: readConfig.denyOnly, allowRead: readConfig.allowWithinDeny })
835
+ .filter(path => grants.noSharedTemp !== true || !SHARED_TEMP.includes(path))];
806
836
  const network = grants.network;
807
837
  return {
808
838
  readConfig,
@@ -816,6 +846,7 @@ export function srtTermsOf(fence, grants = NO_GRANTS) {
816
846
  },
817
847
  };
818
848
  }
849
+ const SHARED_TEMP = ["/tmp/claude", "/private/tmp/claude"];
819
850
  export function sandboxedSpawn(file, args, fence, grants = NO_GRANTS, cwd, temp) {
820
851
  return srtSpawn(file, args, srtTermsOf(fence, grants), cwd ?? process.cwd(), temp);
821
852
  }
@@ -3,8 +3,9 @@ import { stuckSince } from "./agent-board.js";
3
3
  import { wasInterrupted } from "./run-ending.js";
4
4
  import { flowDefinitionOf } from "./flow-engine.js";
5
5
  import { runActivityOf } from "./task-activity.js";
6
- import { workStateRows } from "./work-index.js";
6
+ import { prefetchResultRuns, workStateRows } from "./work-index.js";
7
7
  import { assignmentChecksForRun } from "./assignment.js";
8
+ import { workReadsOf } from "./work-reads.js";
8
9
  import { DISPLAY_STATES, NO_COUNTS, rollUp } from "./agent-state-words.js";
9
10
  export { DISPLAY_STATES, NEEDS_SOMEONE, NO_COUNTS, rollUp, STATE_TONE, STATE_WORDS } from "./agent-state-words.js";
10
11
  export function displayStateOf(facts) {
@@ -74,8 +75,10 @@ export function projectStates(store, access, account, now, root, flowRepos) {
74
75
  AND NOT EXISTS (SELECT 1 FROM agent_seen s WHERE s.account = ? AND s.run = r.id)`).all(completed, account).map(row => Number(row["id"])));
75
76
  const resultFacts = new Map(store.handle.prepare(`SELECT r.id, r.outcome, (SELECT c.status FROM run_check c WHERE c.run = r.id) AS recorded FROM run r
76
77
  WHERE r.id IN (SELECT value FROM json_each(?))`).all(JSON.stringify(families.flatMap(row => row.resultRun ?? []))).map(row => [Number(row["id"]), row]));
78
+ const reads = workReadsOf(store), reader = reads?.store ?? store;
79
+ prefetchResultRuns(store, families.flatMap(row => (row.code === "ready-to-check" || row.code === "result-needs-attention") && row.resultRun !== null ? [row.resultRun] : []), reads);
77
80
  const checksFailed = (run) => {
78
- const status = assignmentChecksForRun(store, root, run, now).status;
81
+ const status = assignmentChecksForRun(reader, root, run, now).status;
79
82
  if (status === "failed" || status === "passed")
80
83
  return status === "failed";
81
84
  return resultFacts.get(run)?.["recorded"] === "failed";
@@ -1,6 +1,7 @@
1
1
  import { assignmentPresentationOf, shortenedMaterialReason } from './assignment-presentation.js';
2
2
  import { plainReasonWords } from './proof.js';
3
3
  import { chatResultHref } from './chat-controls.js';
4
+ import { taskLinkOf } from './task-link.js';
4
5
  import { startBuilderHref } from './needs-you.js';
5
6
  import { statusDetailsHtml, statusWhyHtml } from './task-status.js';
6
7
  import { html } from './html.js';
@@ -22,7 +23,7 @@ export function assignmentActionHref(assignment) {
22
23
  return null;
23
24
  const { taskId, runId, decisionId } = action.target;
24
25
  if (action.code === 'inspect-findings')
25
- return `/t/${encodeURIComponent(taskId)}#findings`;
26
+ return taskLinkOf({ task: taskId, anchor: 'findings' });
26
27
  if (decisionId !== null)
27
28
  return `/d/${decisionId}`;
28
29
  if (action.code === 'inspect-decisions')
@@ -33,9 +34,8 @@ export function assignmentActionHref(assignment) {
33
34
  return `/t/${encodeURIComponent(assignment.rootId)}#recheck-stopped`;
34
35
  if (action.code === 'open-pr' && /^https:\/\/github\.com\/[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+\/pull\/\d+$/.test(assignment.publication?.prUrl ?? ''))
35
36
  return assignment.publication.prUrl;
36
- if (runId !== null && (action.code === 'open-result' || action.code === 'open-pr' || action.code === 'retry-review')) {
37
- return `/review?result=${encodeURIComponent(taskId)}&run=${runId}`;
38
- }
37
+ if (runId !== null && (action.code === 'open-result' || action.code === 'open-pr' || action.code === 'retry-review'))
38
+ return taskLinkOf({ task: taskId, run: runId });
39
39
  if (runId !== null && (action.code === 'inspect-run' || action.code === 'reconcile-run'))
40
40
  return `/r/${runId}`;
41
41
  if (action.code === 'start-worker')
@@ -69,7 +69,7 @@ function savedMaterialNotice(detail, assignment) {
69
69
  }
70
70
  export function assignmentCardOf(assignment, options = {}) {
71
71
  const receipt = assignment.receipt;
72
- const checksPage = receipt === null ? null : `/review?result=${encodeURIComponent(receipt.taskId)}&run=${receipt.runId}&tab=checks`;
72
+ const checksPage = receipt === null ? null : taskLinkOf({ task: receipt.taskId, run: receipt.runId, section: 'checks' });
73
73
  const links = receipt === null ? {} : { result: options.resultHref ?? chatResultHref(receipt.taskId, receipt.runId), checks: checksPage,
74
74
  pullRequest: `/t/${encodeURIComponent(assignment.rootId)}#merge`,
75
75
  ...(receipt.completionKind === 'research-report' ? {} : { runChecks: `${checksPage}#follow-ups` }) };
@@ -1,3 +1,4 @@
1
+ import { readerOf } from "./work-reads.js";
1
2
  import { fastCompletionProblem } from "./fast-start.js";
2
3
  import { createHash } from "node:crypto";
3
4
  import { currentActor, withActor } from "./actor.js";
@@ -75,7 +76,8 @@ function ownerOf(store, rootId, repo) {
75
76
  return { kind: "coordinator", id, label: String(credential?.["name"] ?? "Former lead"),
76
77
  active: credential !== undefined && credential["revoked_at"] === null && repo !== null && Array.isArray(repos) && repos.includes(repo) };
77
78
  }
78
- export function assignmentChecksForRun(store, root, runId, now) {
79
+ export function assignmentChecksForRun(given, root, runId, now) {
80
+ const store = readerOf(given);
79
81
  const own = recordedFailureStands(store, runId, buildChecks(store, root, runId));
80
82
  const run = store.getRun(runId);
81
83
  const followUps = followUpChecksOf(store, runId, now, root);
@@ -137,7 +139,8 @@ function buildChecks(store, root, runId) {
137
139
  return unavailable("Saved checks could not be read.");
138
140
  }
139
141
  }
140
- export function assignmentOf(store, taskId, now, access, root, memo) {
142
+ export function assignmentOf(given, taskId, now, access, root, memo) {
143
+ const store = readerOf(given);
141
144
  const family = store.taskFamilyOf(taskId, access.repos, access.principal === "operator" && access.includeUnplaced === true);
142
145
  if (family === null)
143
146
  return null;