toolroll 0.9.97 → 0.9.99

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 (90) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/approval-authority.d.ts +10 -1
  3. package/dist/approval-authority.js +18 -2
  4. package/dist/browser/workspace.js +1 -1
  5. package/dist/browser-workspace.d.ts +4 -3
  6. package/dist/chat-actions.d.ts +40 -5
  7. package/dist/chat-actions.js +124 -13
  8. package/dist/chat-card.js +4 -1
  9. package/dist/chat-channel.d.ts +3 -0
  10. package/dist/chat-channel.js +24 -7
  11. package/dist/chat-decide.js +4 -2
  12. package/dist/chat-task-actions.js +1 -1
  13. package/dist/chat-terms.d.ts +8 -0
  14. package/dist/chat-terms.js +14 -0
  15. package/dist/chat-voice.js +1 -1
  16. package/dist/checkout-cleanup.js +2 -1
  17. package/dist/contracts/chat-actions.d.ts +6 -0
  18. package/dist/contracts/chat-actions.js +2 -0
  19. package/dist/contracts/cli.d.ts +6 -0
  20. package/dist/contracts/cli.js +3 -0
  21. package/dist/contracts/lead-tools.d.ts +17 -0
  22. package/dist/contracts/lead-tools.js +4 -1
  23. package/dist/contracts/store-json.d.ts +1 -0
  24. package/dist/deploy-phase-data.json +21 -0
  25. package/dist/deploy-phase.d.ts +37 -0
  26. package/dist/deploy-phase.js +64 -0
  27. package/dist/deploy-rescue.d.ts +2 -1
  28. package/dist/deploy-rescue.js +6 -7
  29. package/dist/desktop-update.d.ts +2 -2
  30. package/dist/fast-start.d.ts +83 -6
  31. package/dist/fast-start.js +112 -15
  32. package/dist/home-groups.d.ts +39 -0
  33. package/dist/home-groups.js +33 -0
  34. package/dist/lead-answer-eval.d.ts +7 -0
  35. package/dist/lead-answer-eval.js +6 -2
  36. package/dist/lead-capabilities.js +1 -1
  37. package/dist/lead-context.js +2 -2
  38. package/dist/lead-contract.d.ts +1 -1
  39. package/dist/lead-contract.js +10 -7
  40. package/dist/lead-doors.d.ts +32 -0
  41. package/dist/lead-doors.js +80 -14
  42. package/dist/lead-status.d.ts +3 -0
  43. package/dist/lead-status.js +8 -3
  44. package/dist/lead-tools.d.ts +20 -0
  45. package/dist/lead-tools.js +66 -3
  46. package/dist/lead-voice.js +1 -1
  47. package/dist/lead.js +18 -2
  48. package/dist/local-owner.js +2 -0
  49. package/dist/one-step-chat-schema.d.ts +22 -0
  50. package/dist/one-step-chat-schema.js +37 -0
  51. package/dist/operate.d.ts +27 -1
  52. package/dist/operate.js +206 -32
  53. package/dist/project-delete.js +9 -0
  54. package/dist/project-knowledge.d.ts +7 -7
  55. package/dist/publish.d.ts +2 -0
  56. package/dist/publish.js +1 -1
  57. package/dist/pull-request-flow.d.ts +4 -0
  58. package/dist/pull-request-flow.js +16 -1
  59. package/dist/release-adapters.js +30 -14
  60. package/dist/release-gate.d.ts +3 -3
  61. package/dist/release-gate.js +7 -4
  62. package/dist/release-next.d.ts +3 -3
  63. package/dist/release-next.js +13 -16
  64. package/dist/reply-voice.d.ts +23 -0
  65. package/dist/reply-voice.js +37 -0
  66. package/dist/scope.d.ts +6 -1
  67. package/dist/scope.js +3 -2
  68. package/dist/server/chat.js +4 -4
  69. package/dist/server/chrome.js +2 -2
  70. package/dist/server/home.d.ts +4 -3
  71. package/dist/server/home.js +33 -28
  72. package/dist/server/render-chat.js +11 -6
  73. package/dist/server/render-pages.js +2 -2
  74. package/dist/setup-guide.d.ts +2 -2
  75. package/dist/staged-runtimes.js +2 -1
  76. package/dist/store.d.ts +4 -2
  77. package/dist/store.js +35 -12
  78. package/dist/telegram-lead.js +69 -5
  79. package/dist/telegram-status.js +9 -4
  80. package/dist/telegram.d.ts +10 -0
  81. package/dist/telegram.js +92 -8
  82. package/dist/toolroll-update.js +3 -1
  83. package/dist/tui-contract.d.ts +2 -0
  84. package/dist/tui-source.js +3 -0
  85. package/dist/tui.js +41 -41
  86. package/dist/typed-start.d.ts +51 -0
  87. package/dist/typed-start.js +98 -0
  88. package/dist/wake-hub.d.ts +72 -0
  89. package/dist/wake-hub.js +151 -0
  90. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.9.99 — 2026-11-09
4
+
5
+ - **A Toolroll update interrupted while the new service was starting no longer gets stuck.** Before, an update killed in that short window left new work paused until someone edited a file by hand. Running the release again now finishes the update when the new service is running, and puts the previous service back once the new one is proved gone. Nothing is stopped on a guess: a new service that is loaded but never answers is left alone, and the message names the one command that stops it.
6
+ - **Update steps are one list.** The 17 steps an update records, and what a stopped update at each step needs, now live in one file that every part of Toolroll reads. A step name this version doesn't know is refused instead of being treated as "roll back".
7
+
8
+ ## 0.9.98 — 2026-11-09
9
+
10
+ - **Start a small task from chat in one step.** Ask the lead for one small, clear change ("just fix the typo in the footer") in web chat, Telegram, Slack, Discord or Teams, and it drafts a Start work card. Your own tap (then "Yes, start work") files and approves it under the same rules as the New task form's Build: small changes only, Toolroll's size check must agree, your chat approval setting and limits apply, it must start within 30 minutes, and you still accept the result before it's finished or published. On web chat the card opens the full terms to confirm. On Telegram you can also reply yes to the card, and the reply links the task it started. In Teams, and in Slack when a word in the request would show as an emoji, approval cards open the review page instead of taking a tap, so what you approve is always shown exactly as written. Anything bigger becomes an ordinary task card, and the lead can never start work itself.
11
+ - **Approved work starts within a second.** Approving a plan or a merge, by any road, now tells the builder at once, and phone notifications, webhooks and Telegram messages go out within seconds instead of up to a minute. Pull requests waiting on CI are checked every 30 seconds instead of every 5 minutes.
12
+ - **A quieter idle builder.** An idle builder now checks for new work once per process instead of once per project and build slot, so it uses far less CPU while nothing is happening.
13
+ - **The lead is asked for shorter answers in plainer words.** Its instructions now ask for the answer first, in one to three sentences, in everyday words and without an account of its own steps, in the browser and the terminal as well as the chat apps. How much shorter real answers are has not been measured yet; `node scripts/lead-answer-eval.mjs --real` now reports answer length and wording.
14
+ - **Home shows three groups: Waiting on you, Working, Done.** What asks something of you comes first (decisions, then results to review, then what is blocked), then what is running and what waits its turn, then up to eight tasks finished in the last 7 days. The figures above still open the same Tasks lists and count the same things; "Needs you" now reads "Waiting on you" and "Finished" reads "Done".
15
+ - **The same figures in the terminal and in chat.** `toolroll status` (and `--json`, as `figures`) and `/status` in chat start with "Waiting on you N · Running N · Queued N · Done N", the counts Home shows. A provider that needs a sign-in is still said first. The terminal UI lists tasks under the same three headings as Home, with cancelled and other tasks last under Other.
16
+ - **Plainer wording on a few cards and phone status lines.** "Plan" instead of "scope", "Your sign-in changed. Sign in again.", "Audit log" in every menu, matching the page it opens.
17
+
3
18
  ## 0.9.97 — 2026-11-09
4
19
 
5
20
  - **Chat answers feel instant, everywhere.** On the web, Telegram, Slack, Discord, Teams and `toolroll chat`, your message gets an acknowledgement at once (👀 in chat apps, a status line on the web and in the terminal), you see what the lead is doing in one line, and the answer appears as it is written. Cards and buttons come when the answer is finished, as before.
@@ -5,9 +5,18 @@ export declare function authorityStandsSql(scope: string, repo: string, now: str
5
5
  /**
6
6
  * SQL, conjunctive with every alternative above (plain-toolroll.md P2.4): narrow only. A fast start's seal dispatches only
7
7
  * inside its start window, and only as what it claims to be: a person's own ceremony yes to these exact bytes, proved at
8
- * the seal's instant. Losing the marker leaves an ordinary person approval; nothing here grants anything.
8
+ * the seal's instant (`password`), or (one-step-chat.md C1) their own yes on a chat Start card (`chat`), which stands only
9
+ * on ONE complete chat proof row at the seal's instant carrying the fast marker (chatFastProofSql). Losing the marker
10
+ * leaves an ordinary person approval; nothing here grants anything.
9
11
  */
10
12
  export declare function fastStartStandsSql(scope: string, now: string): string;
13
+ /**
14
+ * SQL: a chat seal's fast-start proof — ONE `approval proved` row that matches all of: this task, the seal's approver,
15
+ * the seal's instant, outcome `chat`, and a detail that is valid JSON (checked before any json_extract, which would fail
16
+ * on anything else) whose `$.fastStart.rule` is the rule this build writes (fast-start.ts FAST_START_RULE), `$.at` the
17
+ * seal's instant and `$.digest` the approved digest. Facts split across rows never add up to one.
18
+ */
19
+ export declare const chatFastProofSql: (scope: string) => string;
11
20
  /**
12
21
  * SQL, conjunctive with every alternative above (results routing slice 3): a task whose sealed route tries a cheaper
13
22
  * model (its build leg's selection is a trial) stands only on a PERSON's own yes to these exact bytes — the ceremony
@@ -37,12 +37,28 @@ export function authorityStandsSql(scope, repo, now) {
37
37
  /**
38
38
  * SQL, conjunctive with every alternative above (plain-toolroll.md P2.4): narrow only. A fast start's seal dispatches only
39
39
  * inside its start window, and only as what it claims to be: a person's own ceremony yes to these exact bytes, proved at
40
- * the seal's instant. Losing the marker leaves an ordinary person approval; nothing here grants anything.
40
+ * the seal's instant (`password`), or (one-step-chat.md C1) their own yes on a chat Start card (`chat`), which stands only
41
+ * on ONE complete chat proof row at the seal's instant carrying the fast marker (chatFastProofSql). Losing the marker
42
+ * leaves an ordinary person approval; nothing here grants anything.
41
43
  */
42
44
  export function fastStartStandsSql(scope, now) {
43
45
  return `NOT EXISTS (SELECT 1 FROM task_ref fsr WHERE fsr.backend = 'built-in' AND fsr.external_id = ${scope}.task_id AND fsr.fast_start_until IS NOT NULL
44
- AND (fsr.fast_start_until <= ${now} OR COALESCE(${scope}.approval_basis, '') <> 'password' OR ${machineSealSql(scope)} OR NOT ${personSealSql(scope)}))`;
46
+ AND (fsr.fast_start_until <= ${now}
47
+ OR NOT (COALESCE(${scope}.approval_basis, '') = 'password' OR (COALESCE(${scope}.approval_basis, '') = 'chat' AND ${chatFastProofSql(scope)}))
48
+ OR ${machineSealSql(scope)} OR NOT ${personSealSql(scope)}))`;
45
49
  }
50
+ /**
51
+ * SQL: a chat seal's fast-start proof — ONE `approval proved` row that matches all of: this task, the seal's approver,
52
+ * the seal's instant, outcome `chat`, and a detail that is valid JSON (checked before any json_extract, which would fail
53
+ * on anything else) whose `$.fastStart.rule` is the rule this build writes (fast-start.ts FAST_START_RULE), `$.at` the
54
+ * seal's instant and `$.digest` the approved digest. Facts split across rows never add up to one.
55
+ */
56
+ export const chatFastProofSql = (scope) => `EXISTS (SELECT 1 FROM action_ledger cfp WHERE cfp.task_id = ${scope}.task_id AND cfp.action = 'approval proved'
57
+ AND cfp.actor = ${scope}.approved_by AND cfp.at = ${scope}.approved_at AND cfp.outcome = 'chat'
58
+ AND CASE WHEN json_valid(cfp.detail) THEN json_type(cfp.detail, '$.fastStart.rule') = 'text' AND json_extract(cfp.detail, '$.fastStart.rule') = 'small-v1'
59
+ AND json_type(cfp.detail, '$.at') = 'text' AND json_extract(cfp.detail, '$.at') = ${scope}.approved_at
60
+ AND json_type(cfp.detail, '$.digest') = 'text' AND json_extract(cfp.detail, '$.digest') = ${scope}.approved_digest
61
+ ELSE 0 END)`;
46
62
  /**
47
63
  * SQL, conjunctive with every alternative above (results routing slice 3): a task whose sealed route tries a cheaper
48
64
  * model (its build leg's selection is a trial) stands only on a PERSON's own yes to these exact bytes — the ceremony