toolroll 0.9.85 → 0.9.86

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 (79) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/agent-fence.d.ts +6 -2
  3. package/dist/agent-fence.js +3 -2
  4. package/dist/assignment.js +4 -3
  5. package/dist/browser/workspace.css +1 -1
  6. package/dist/browser/workspace.js +31 -29
  7. package/dist/browser-workspace.d.ts +40 -0
  8. package/dist/chat-actions.d.ts +11 -1
  9. package/dist/chat-actions.js +53 -1
  10. package/dist/chat-channel.js +1 -0
  11. package/dist/chat-quiet.js +3 -2
  12. package/dist/claim.d.ts +3 -0
  13. package/dist/claim.js +4 -1
  14. package/dist/contracts/chat-actions.d.ts +9 -0
  15. package/dist/contracts/chat-actions.js +3 -0
  16. package/dist/contracts/console-api.d.ts +4 -1
  17. package/dist/contracts/console-api.js +4 -1
  18. package/dist/contracts/flow-propose.d.ts +4 -1
  19. package/dist/contracts/flow-propose.js +1 -1
  20. package/dist/contracts/flow.d.ts +41 -0
  21. package/dist/contracts/flow.js +4 -2
  22. package/dist/contracts/lead-tools.d.ts +21 -0
  23. package/dist/contracts/lead-tools.js +2 -0
  24. package/dist/contracts/store-json.d.ts +2 -0
  25. package/dist/contracts/trigger-payloads.d.ts +20 -0
  26. package/dist/contracts/trigger-payloads.js +4 -0
  27. package/dist/coordinator.js +1 -0
  28. package/dist/deploy-gate.js +4 -0
  29. package/dist/dispatch.d.ts +3 -0
  30. package/dist/dispatch.js +4 -1
  31. package/dist/flow-browser.d.ts +103 -0
  32. package/dist/flow-browser.js +204 -0
  33. package/dist/flow-code.d.ts +5 -1
  34. package/dist/flow-code.js +4 -1
  35. package/dist/flow-engine.js +16 -0
  36. package/dist/flow-live.js +9 -1
  37. package/dist/flow-pull-request.js +15 -7
  38. package/dist/flow-share.js +3 -1
  39. package/dist/flow-steps.d.ts +9 -1
  40. package/dist/flow-steps.js +55 -5
  41. package/dist/flow-triggers.js +55 -0
  42. package/dist/flows-cli.d.ts +19 -0
  43. package/dist/flows-cli.js +47 -2
  44. package/dist/flows-ui.js +11 -2
  45. package/dist/flows.js +5 -2
  46. package/dist/lead-tools.js +35 -6
  47. package/dist/lead-voice.js +16 -5
  48. package/dist/operate.d.ts +1 -1
  49. package/dist/operate.js +215 -6
  50. package/dist/project-delete.js +7 -3
  51. package/dist/pull-request-flow.js +35 -4
  52. package/dist/result-follow-ups.js +4 -0
  53. package/dist/scope.d.ts +5 -0
  54. package/dist/scope.js +7 -0
  55. package/dist/server/chat.js +4 -2
  56. package/dist/server/console.css +29 -0
  57. package/dist/server/flows.js +15 -0
  58. package/dist/server/render-pages.d.ts +13 -0
  59. package/dist/server/render-pages.js +45 -2
  60. package/dist/server/render-tasks.d.ts +8 -0
  61. package/dist/server/render-tasks.js +17 -6
  62. package/dist/server/route-table.js +11 -0
  63. package/dist/server/task-views.js +5 -0
  64. package/dist/server/tasks.d.ts +10 -0
  65. package/dist/server/tasks.js +54 -2
  66. package/dist/settings-proofs.js +1 -0
  67. package/dist/store.d.ts +71 -3
  68. package/dist/store.js +222 -20
  69. package/dist/surface.js +18 -2
  70. package/dist/task-archive.d.ts +10 -0
  71. package/dist/task-archive.js +16 -0
  72. package/dist/task-control.d.ts +1 -1
  73. package/dist/tidy.d.ts +130 -0
  74. package/dist/tidy.js +503 -0
  75. package/dist/work-index.d.ts +24 -0
  76. package/dist/work-index.js +52 -30
  77. package/dist/workspace-ui.d.ts +1 -1
  78. package/dist/workspace-ui.js +3 -2
  79. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,29 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.9.86 — 2026-11-02
4
+
5
+ - **Old tasks tidy themselves.** A routine's newer run puts away its older
6
+ ones, a release task goes once its version ships or a newer attempt
7
+ replaces it, and a "Checks failed on main" notice goes once main passes
8
+ again. Running work, tasks you filed, and tasks handed to a person are
9
+ never touched. Each one says why it was put away.
10
+ - **Put away old tasks, in one step.** Needs you → **Put away old tasks**
11
+ shows exactly what would go and why, grouped, with a box to untick each
12
+ one; your password puts away exactly that list. **Put away** works on a
13
+ single task too. Nothing is deleted: the **Archived** view keeps every
14
+ task's history and has **Restore**. The same from the terminal:
15
+ `toolroll task tidy --preview`, then the `--apply --digest` command it
16
+ prints; `task archive`, `task restore`, `task list --view archived`.
17
+ - **Flows can drive a browser, once you allow it.** A flow step that starts a
18
+ browser (like the nightly journeys) now runs in its sandbox when a person
19
+ has allowed it: **Allow browser** on the flow page shows the exact script
20
+ and asks for your password, or `toolroll flows browser <flow> on`. Changing
21
+ the script ends the approval. Without it, the step waits with one line
22
+ saying what to allow, instead of crashing.
23
+ - **Deploys no longer stop halfway.** A deploy now proves the release
24
+ read-only and writes its "deploying" marker separately, so it finishes
25
+ instead of stopping with "attempt to write a readonly database".
26
+
3
27
  ## 0.9.85 — 2026-11-01
4
28
 
5
29
  - **Point at the exact screenshot.** Choose **Comment** beside a result's
@@ -98,8 +98,9 @@ export type FenceGrants = {
98
98
  * SEATBELT_NO_KEYCHAIN). Only fenceFor gives it, to a build's agent. Never a check's (one with sign-ins gets those in
99
99
  * its environment, invoke.ts keychainSignIns), never a tool server's (serverGrantsOf). */
100
100
  keychain?: true;
101
- /** macOS: a project check's launch, whose Chromium may start (sandbox-runtime.ts SEATBELT_CHROMIUM). Only fenceFor
102
- * sets it, only for kind "check". */
101
+ /** macOS: a project check's launch, or a flow script zone's with approved browser use, whose Chromium may start
102
+ * (sandbox-runtime.ts SEATBELT_CHROMIUM). Only fenceFor sets it: always for kind "check", for kind "flow" only when
103
+ * its caller proved the approval (flow-browser.ts). */
103
104
  browser?: true;
104
105
  /** A `sign-ins` check's exact sign-in files, read again inside the home denies (check-access.ts, signInGrants). */
105
106
  signIns?: SignInGrants;
@@ -391,6 +392,9 @@ export type FenceContext = {
391
392
  provider?: string;
392
393
  /** Scratch folders (a flow's) that stay denied whole inside the pool, whatever the policy. */
393
394
  scratchRoots?: readonly string[];
395
+ /** A flow's script zone whose browser use a person approved, proved at launch (flow-browser.ts browserStanding):
396
+ * Chromium's one service, as a check gets it. Read for kind "flow" only; every other kind ignores it. */
397
+ browser?: true;
394
398
  };
395
399
  /** A launch's sealed sandbox terms (builder.ts launchSandboxOf): its policy version, read denies and mach services. A
396
400
  * launch with none sealed is v1 with none of them. */
@@ -1167,8 +1167,9 @@ export function fenceFor(kind, ctx) {
1167
1167
  ...(written === null ? {} : { writes: written.writes, readOnly: [...new Set([...made.readOnly, ...written.readOnly])].sort() }),
1168
1168
  ...(ctx.network === undefined ? {} : { network: ctx.network }),
1169
1169
  ...(ctx.machLookup === undefined || ctx.machLookup.length === 0 ? {} : { machLookup: [...ctx.machLookup] }),
1170
- // A project's checks may drive a browser (Playwright's Chromium); builds, flows and tool servers don't get it.
1171
- ...(kind === "check" ? { browser: true } : {}),
1170
+ // A project's checks may drive a browser (Playwright's Chromium), and so may a flow's script zone whose browser use
1171
+ // a person approved (the caller proves it at launch); builds, tool servers and every other flow launch don't get it.
1172
+ ...(kind === "check" || (kind === "flow" && ctx.browser === true) ? { browser: true } : {}),
1172
1173
  // A build's agent signs in from the keychain (Claude Code does); nothing else it launches reaches it.
1173
1174
  ...(kind === "build" ? { keychain: true } : {}),
1174
1175
  // Under a write allowlist these are out of reach already; where the launch writes anywhere, they are denied by name.
@@ -6,7 +6,7 @@ import { currentActor, withActor } from "./actor.js";
6
6
  import { replacedWords } from "./task-status.js";
7
7
  import { COMPLETER_ACTOR, COMPLETION_ACTION, COMPLETION_BY_MACHINE, COMPLETION_BY_PERSON, familyChangedFiles, landedReasonOf, personCompletionOwed } from "./result-completion.js";
8
8
  import { homedir } from "node:os";
9
- import { readSchemaVersion, stopFactOf } from "./store.js";
9
+ import { readSchemaVersion, refArchived, stopFactOf } from "./store.js";
10
10
  import { approvalOf, liveReleaseOf, machineActing } from "./scope.js";
11
11
  import { openWorkDecisionOf, taskWorkSummaryOf, workDecisionAction } from "./work-summary.js";
12
12
  import { evidenceRoot, readVerifiedArtifact, readVerifiedReport, verifyArtifact } from "./evidence.js";
@@ -170,14 +170,15 @@ export function assignmentOf(store, taskId, now, access, root, memo) {
170
170
  const attention = family.problem === null ? [] : [family.problem];
171
171
  // Family admission above precedes question bodies. The newest result
172
172
  // does not settle an unanswered question on any earlier version.
173
- const questions = [current, ...family.versions.filter(version => version.id !== current.id)].flatMap(version => {
173
+ // A put-away earlier version (v145) is history: its question and its queue place never hold the current one up.
174
+ const questions = [current, ...family.versions.filter(version => version.id !== current.id && !refArchived(store, version.refId))].flatMap(version => {
174
175
  const decision = openWorkDecisionOf(store, version.refId, now);
175
176
  return decision === null ? [] : [{ taskId: version.id, decision }];
176
177
  });
177
178
  // A finished task label cannot hide a lease or an unfinished process record.
178
179
  const busy = (version) => version.state === "running" || store.currentLiveLease(version.refId, now) !== null ||
179
180
  store.runsFor(version.refId).some(run => run.outcome === null || store.stopQuiescenceProblem(run.id) !== null);
180
- const earlierActive = family.versions.filter(version => version.id !== current.id && (version.state === "queued" || busy(version)));
181
+ const earlierActive = family.versions.filter(version => version.id !== current.id && ((version.state === "queued" && !refArchived(store, version.refId)) || busy(version)));
181
182
  // Of those, how many have work under way (the rest only wait in the queue).
182
183
  const earlierRunning = earlierActive.filter(busy).length;
183
184
  const unfinished = store.runsFor(current.refId).find(run => run.outcome === null) ?? null;