toolroll 0.9.0 → 0.9.1
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.
- package/CHANGELOG.md +18 -0
- package/dist/agent-onboard.d.ts +21 -1
- package/dist/agent-onboard.js +50 -1
- package/dist/backup-ui.js +4 -2
- package/dist/browser/workspace.css +2 -2
- package/dist/browser/workspace.js +31 -31
- package/dist/browser-workspace.d.ts +12 -2
- package/dist/chat-actions.d.ts +5 -0
- package/dist/chat-actions.js +43 -3
- package/dist/cli.d.ts +1 -1
- package/dist/cli.js +1 -1
- package/dist/desktop-update.d.ts +1 -1
- package/dist/flow-engine.js +13 -1
- package/dist/flow-pull-request.d.ts +11 -0
- package/dist/flow-pull-request.js +123 -0
- package/dist/flow-starters-ui.d.ts +20 -0
- package/dist/flow-starters-ui.js +35 -0
- package/dist/flow-starters.d.ts +55 -0
- package/dist/flow-starters.js +104 -0
- package/dist/flow-steps.js +14 -0
- package/dist/flows-ui.d.ts +1 -1
- package/dist/flows-ui.js +4 -3
- package/dist/flows.d.ts +30 -6
- package/dist/flows.js +110 -6
- package/dist/integrations-ui.js +9 -4
- package/dist/lead-context.d.ts +1 -1
- package/dist/lead-context.js +1 -1
- package/dist/mate-contract.js +1 -1
- package/dist/mate-tools.js +18 -5
- package/dist/models-ui.js +3 -2
- package/dist/monitoring-ui.js +2 -1
- package/dist/operate.js +18 -0
- package/dist/policy-ui.js +2 -1
- package/dist/pull-request-flow.d.ts +32 -0
- package/dist/pull-request-flow.js +43 -8
- package/dist/pull-request-ui.js +2 -2
- package/dist/serve.js +108 -43
- package/dist/skills-ui.js +2 -1
- package/dist/store.js +2 -0
- package/dist/surface.js +1 -1
- package/dist/when-html.d.ts +8 -0
- package/dist/when-html.js +36 -0
- package/package.json +1 -1
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A time a person reads. A desk shows the full stamp, as before; a phone (760px and narrower) shows the short
|
|
3
|
+
* one — "16:39" today, "Yesterday 16:39", "Sep 28" otherwise — and the full stamp stays in the title. Stamps are
|
|
4
|
+
* UTC to the minute, so the short form is counted in UTC too. The CSS that picks one lives in the shared page
|
|
5
|
+
* stylesheet (`.so-when-*` in serve.ts).
|
|
6
|
+
*/
|
|
7
|
+
const escape = (value) => value.replace(/[&<>"']/g, c => ({ "&": "&", "<": "<", ">": ">", '"': """, "'": "'" })[c]);
|
|
8
|
+
const MONTHS = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
|
|
9
|
+
const DAY_MS = 86_400_000;
|
|
10
|
+
/** "16:39" today, "Yesterday 16:39" / "Tomorrow 16:39" beside it, "Sep 28" otherwise ("Sep 28 2025" in another year). */
|
|
11
|
+
export function shortWhen(iso, now = new Date()) {
|
|
12
|
+
const at = new Date(iso);
|
|
13
|
+
if (Number.isNaN(at.getTime()))
|
|
14
|
+
return iso;
|
|
15
|
+
const clock = iso.length >= 16 && iso[10] === "T" ? iso.slice(11, 16) : at.toISOString().slice(11, 16);
|
|
16
|
+
const days = Math.floor(at.getTime() / DAY_MS) - Math.floor(now.getTime() / DAY_MS);
|
|
17
|
+
if (days === 0)
|
|
18
|
+
return clock;
|
|
19
|
+
if (days === -1)
|
|
20
|
+
return `Yesterday ${clock}`;
|
|
21
|
+
if (days === 1)
|
|
22
|
+
return `Tomorrow ${clock}`;
|
|
23
|
+
const date = `${MONTHS[at.getUTCMonth()]} ${at.getUTCDate()}`;
|
|
24
|
+
return at.getUTCFullYear() === now.getUTCFullYear() ? date : `${date} ${at.getUTCFullYear()}`;
|
|
25
|
+
}
|
|
26
|
+
/** The `<time>` for a stamp: `full` is the words a desk shows ("2026-09-30 16:39 UTC"). Empty for no stamp. */
|
|
27
|
+
export function whenHtml(iso, full, now = new Date()) {
|
|
28
|
+
if (iso === null || iso === "")
|
|
29
|
+
return "";
|
|
30
|
+
const words = escape(full);
|
|
31
|
+
return `<time datetime="${escape(iso)}" title="${words}"><span class="so-when-full">${words}</span><span class="so-when-short">${escape(shortWhen(iso, now))}</span></time>`;
|
|
32
|
+
}
|
|
33
|
+
/** "2026-09-30 16:39 UTC" — the desk's words for a stamp. */
|
|
34
|
+
export const utcMinute = (iso) => `${iso.slice(0, 16).replace("T", " ")} UTC`;
|
|
35
|
+
/** Both the desk and phone forms of a UTC stamp. */
|
|
36
|
+
export const whenUtc = (iso, now = new Date()) => iso === null || iso === "" ? "" : whenHtml(iso, utcMinute(iso), now);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "toolroll",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.1",
|
|
4
4
|
"description": "A control plane for unattended coding agents — queue tasks, walk away, come back to pull requests. Agents build in leased worktrees, never touch your default branch, and interrupt you only for decisions that need a human.",
|
|
5
5
|
"directories": {
|
|
6
6
|
"doc": "docs"
|