toolroll 0.9.128 → 0.9.130
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 +41 -0
- package/dist/accent-colors.js +3 -1
- package/dist/agent-fence.js +0 -2
- package/dist/agents-board.js +0 -3
- package/dist/approval-authority.js +2 -1
- package/dist/assignment.js +56 -2
- package/dist/backup-ui.js +6 -3
- package/dist/backup.js +6 -0
- package/dist/bounded-spawn.js +0 -1
- package/dist/browser/manifest.json +57 -0
- package/dist/browser/terminal.2a682d0b91a35288271c73b7ee253e524cca0917d17fbaf6733e80b7a767a37c.js.br +0 -0
- package/dist/browser/terminal.2a682d0b91a35288271c73b7ee253e524cca0917d17fbaf6733e80b7a767a37c.js.gz +0 -0
- package/dist/browser/{terminal.css → terminal.4d1cf20c32ad7c2099df657358d540d5fd92bb55195a88121e74b28467238b42.css} +1 -1
- package/dist/browser/terminal.4d1cf20c32ad7c2099df657358d540d5fd92bb55195a88121e74b28467238b42.css.br +0 -0
- package/dist/browser/terminal.4d1cf20c32ad7c2099df657358d540d5fd92bb55195a88121e74b28467238b42.css.gz +0 -0
- package/dist/browser/{workspace.js → workspace.9bd1db81d3c897045a5d82d4804e374e41e78b1b2cfd05d37b982a4ea0d02626.js} +25 -25
- package/dist/browser/workspace.9bd1db81d3c897045a5d82d4804e374e41e78b1b2cfd05d37b982a4ea0d02626.js.br +0 -0
- package/dist/browser/workspace.9bd1db81d3c897045a5d82d4804e374e41e78b1b2cfd05d37b982a4ea0d02626.js.gz +0 -0
- package/dist/browser/{workspace.css → workspace.a0752f935cfeaf16758d1085fe8f3e1719a7cd525b91a9c9943c789d65879a54.css} +1 -1
- package/dist/browser/workspace.a0752f935cfeaf16758d1085fe8f3e1719a7cd525b91a9c9943c789d65879a54.css.br +0 -0
- package/dist/browser/workspace.a0752f935cfeaf16758d1085fe8f3e1719a7cd525b91a9c9943c789d65879a54.css.gz +0 -0
- package/dist/browser-shell.js +271 -25
- package/dist/canvas-freshness.js +122 -0
- package/dist/canvas-fs.js +273 -0
- package/dist/canvas-reads.js +747 -0
- package/dist/canvas-state-key.js +45 -0
- package/dist/canvas-state-worker.js +12 -0
- package/dist/central-recovery-stage.js +3 -3
- package/dist/chat-actions.js +26 -0
- package/dist/chat-channel.js +4 -3
- package/dist/chat-task-actions.js +1 -1
- package/dist/chat-warmth.js +0 -1
- package/dist/check-report.js +0 -6
- package/dist/commit-extract.js +79 -40
- package/dist/companion/access.js +162 -0
- package/dist/companion/actions.js +622 -0
- package/dist/companion/bonjour.js +45 -0
- package/dist/companion/canvas.js +141 -0
- package/dist/companion/chat-origin.js +92 -0
- package/dist/companion/chat.js +571 -0
- package/dist/companion/daemon.js +1387 -0
- package/dist/companion/direct-server.js +177 -0
- package/dist/companion/finish.js +51 -0
- package/dist/companion/framing.js +498 -0
- package/dist/companion/noise.js +461 -0
- package/dist/companion/passkey-gate.js +287 -0
- package/dist/companion/paths.js +90 -0
- package/dist/companion/reads.js +283 -0
- package/dist/companion/relay-auth.js +265 -0
- package/dist/companion/relay-server.js +870 -0
- package/dist/companion/schema.js +289 -0
- package/dist/companion/service.js +581 -0
- package/dist/companion/store.js +325 -0
- package/dist/companion/webauthn.js +407 -0
- package/dist/console-instance.js +0 -4
- package/dist/contracts/console-api.js +18 -0
- package/dist/converse.js +0 -1
- package/dist/coordinator.js +1 -1
- package/dist/design/kit.css +30 -0
- package/dist/desktop-config.js +156 -0
- package/dist/desktop-host.js +6 -152
- package/dist/desktop-update.js +1 -1
- package/dist/finished-task-sql.js +14 -0
- package/dist/flexible-answers.js +0 -1
- package/dist/github-read.js +41 -0
- package/dist/guides.js +4 -3
- package/dist/lead-doors.js +50 -3
- package/dist/lead-queue-runtime.js +11 -2
- package/dist/lead-queue.js +25 -0
- package/dist/live-backup-change.js +93 -0
- package/dist/live-backup.js +75 -31
- package/dist/live-bus.js +3 -2
- package/dist/live-records.js +0 -1
- package/dist/local-landing.js +47 -0
- package/dist/local-owner.js +0 -1
- package/dist/model-choices.js +0 -11
- package/dist/nightly-check.js +0 -3
- package/dist/nightly-github.js +1 -2
- package/dist/notification-retention.js +119 -0
- package/dist/observations.js +0 -1
- package/dist/operate.js +17 -4
- package/dist/person-proof.js +5 -1
- package/dist/pull-request-flow.js +116 -2
- package/dist/qr.js +360 -0
- package/dist/release-adapters.js +14 -43
- package/dist/release-auto.js +17 -13
- package/dist/release-card.js +0 -4
- package/dist/release-cli.js +37 -2
- package/dist/release.js +13 -2
- package/dist/restore-retirement.js +6 -1
- package/dist/result-review.js +0 -3
- package/dist/retention-ui.js +1 -1
- package/dist/retention.js +14 -21
- package/dist/review-context.js +0 -5
- package/dist/route-rules.js +1 -5
- package/dist/sandbox-runtime.js +0 -1
- package/dist/scope.js +68 -17
- package/dist/scout.js +0 -6
- package/dist/serve.js +60 -9
- package/dist/server/kit.js +1 -0
- package/dist/server/live.js +9 -2
- package/dist/server/pages.js +12 -4
- package/dist/server/phone-engine-api.js +79 -0
- package/dist/server/render-pages.js +1 -11
- package/dist/server/render-results.js +0 -1
- package/dist/server/render-tasks.js +0 -68
- package/dist/server/route-table.js +12 -1
- package/dist/server/settings-phone.js +515 -0
- package/dist/server/settings-scripts.js +2 -0
- package/dist/server/settings-section-table.js +0 -3
- package/dist/server/settings-sections.js +10 -4
- package/dist/server/settings.js +20 -5
- package/dist/server/terminals.js +2 -1
- package/dist/settings-groups-ui.js +2 -1
- package/dist/settings-proofs.js +6 -0
- package/dist/store.js +52 -4
- package/dist/structured-output.js +0 -1
- package/dist/style-asset.js +20 -7
- package/dist/tailnet.js +39 -0
- package/dist/task-control.js +5 -0
- package/dist/task-sizing.js +0 -1
- package/dist/toolroll-update-cli.js +19 -3
- package/dist/toolroll-update-ui.js +2 -2
- package/dist/toolroll-update.js +98 -16
- package/dist/youiyoux-intake.js +8 -0
- package/package.json +7 -2
- package/dist/contracts/contract-test.js +0 -55
- package/dist/unfenced-test-support.js +0 -6
- /package/dist/browser/{terminal.js → terminal.2a682d0b91a35288271c73b7ee253e524cca0917d17fbaf6733e80b7a767a37c.js} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,47 @@ 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.130 — 2026-11-29
|
|
8
|
+
|
|
9
|
+
Talk to the lead from your iPhone, see your Canvas there, pair and turn on approvals in one go, and a faster console.
|
|
10
|
+
|
|
11
|
+
### New
|
|
12
|
+
|
|
13
|
+
- **Lead tab on iPhone**: talk to the lead from your phone, in your main conversation or a task's own thread (Ask Lead on a task). Replies stream in as they're written; what you type while your Mac is out of reach is kept as a draft and only sends when you tap Send. A message from the phone can never approve anything on its own. Needs the Mac's chat on a Claude or Codex membership.
|
|
14
|
+
- **Finish work from your iPhone**: open the pull request, land a result on your branch, or undo a landing, each confirmed with your passkey and showing exactly where it goes. Merging a pull request stays on your Mac for now ("Merge it on your Mac").
|
|
15
|
+
- **Canvas on iPhone** (Work → Canvas): each project's Web and App · iPhone screens with their capture time, an out-of-date badge, full-screen zoom, light and dark, and pins linked to their tasks. View only for now.
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
|
|
19
|
+
- **Pair and turn on approvals in one go**: confirming the pairing code on your Mac also opens passkey setup for that phone, and the phone goes straight to Turn on approvals. A paired phone without a passkey says so instead of showing approve buttons that would fail.
|
|
20
|
+
- **Faster console**: the app's script and styles are cached and compressed, so a repeat visit downloads almost nothing (Home about 2.0 s → 0.9 s, Settings 1.8 s → 0.6 s on a phone), and pages no longer re-download the whole work list just to update the Needs you count.
|
|
21
|
+
- **Lighter backups**: the continuous backup copies only when something changed (a quick check on each copy, a full check at least daily) instead of copying and fully checking the whole database every 5 minutes. Settings → Backups says which check each copy passed.
|
|
22
|
+
- **Old progress notifications are cleared**: progress pings for finished tasks and undeliverable old receipts are removed after 30 days, so the database stops growing from them.
|
|
23
|
+
- **Version drift is shown**: when the background service runs a different build from `toolroll`, the update preview, `toolroll status` and the console (Settings → Updates, General → Version) say which is newer and to run `toolroll update --yes`.
|
|
24
|
+
|
|
25
|
+
### Fixed
|
|
26
|
+
|
|
27
|
+
- **Fewer dropped requests behind a proxy**: the console keeps idle connections open longer than Tailscale serve or a reverse proxy does, so a reused connection is never reset.
|
|
28
|
+
- **`toolroll update` updates the background service too**: a launchd service still running an older build is drained, pointed at the new build and restarted, instead of refusing "Stop it first" or leaving it behind.
|
|
29
|
+
- **Already up to date, service behind**: `toolroll update --yes` reinstalls the current release and points the service at it.
|
|
30
|
+
|
|
31
|
+
## 0.9.129 — 2026-11-28
|
|
32
|
+
|
|
33
|
+
The Toolroll iPhone app: see what needs you, read plans and changes, and approve with a passkey, from anywhere.
|
|
34
|
+
|
|
35
|
+
### New
|
|
36
|
+
|
|
37
|
+
- **Pair an iPhone** (Settings → Phone): scan a one-time QR code and confirm the six-character code on both screens, then read your Work inbox, plans, diffs and live output on the phone.
|
|
38
|
+
- **Direct first, encrypted relay when away**: the phone connects straight to this Mac on Wi-Fi or Tailscale, and from anywhere else through `relay.toolroll.dev`, which is end-to-end encrypted and never sees what they send.
|
|
39
|
+
- **Approve from your phone with a passkey**: approve plans and accept results in the app, each confirmed with a passkey and checked on this Mac (Settings → Phone → Passkey approvals).
|
|
40
|
+
- **Passkey prompt** (Settings → Phone, operators only): ask for every approval, or once per 15 minutes or per hour; opening the app with your passkey unlocks routine approvals for that window. Shipping, landing, protected work and exceptions always ask, and every change is recorded.
|
|
41
|
+
- **Manage paired phones**: rename or remove a phone in Settings → Phone; changing your Toolroll password or restoring a backup retires paired phones.
|
|
42
|
+
- **Canvas: App · iPhone** (Mac app → Canvas): the iPhone app's real screens, light and dark, beside your web screens; Recapture asks before its first run in each project.
|
|
43
|
+
|
|
44
|
+
### Fixed
|
|
45
|
+
|
|
46
|
+
- **Canvas** finds projects in `~/Developer`, files option pins once, links each pin to the task it created, and no longer re-renders every web tile after an iOS edit.
|
|
47
|
+
|
|
7
48
|
## 0.9.128 — 2026-11-27
|
|
8
49
|
|
|
9
50
|
Sharper UI craft across Work, diffs, Settings, Flows, and Spend, plus focused `toolroll task --help`.
|
package/dist/accent-colors.js
CHANGED
|
@@ -2,8 +2,10 @@ export const DEFAULT_ACCENT = "#171717";
|
|
|
2
2
|
const PAPER_LIGHT = "#ffffff", FRAME_LIGHT = "#efefef", PAPER_DARK = "#161616", INK_DARK = "#0a0a0a";
|
|
3
3
|
export const ACCENT_PRESETS = [
|
|
4
4
|
[null, "Ink", DEFAULT_ACCENT],
|
|
5
|
-
[null, "
|
|
5
|
+
[null, "Signal blue", "#3b82f6"],
|
|
6
6
|
[null, "Chart magenta", "#c0267e"],
|
|
7
|
+
[null, "Built mint", "#16a34a"],
|
|
8
|
+
[null, "Violet", "#6e56cf"],
|
|
7
9
|
[2025, "Mocha Mousse", "#a47864"], [2024, "Peach Fuzz", "#ffbe98"], [2023, "Viva Magenta", "#bb2649"],
|
|
8
10
|
[2022, "Very Peri", "#6667ab"], [2021, "Illuminating", "#f5df4d"], [2020, "Classic Blue", "#0f4c81"],
|
|
9
11
|
[2019, "Living Coral", "#ff6f61"], [2018, "Ultra Violet", "#5f4b8b"], [2017, "Greenery", "#88b04b"],
|
package/dist/agent-fence.js
CHANGED
|
@@ -873,8 +873,6 @@ export function linuxFenceAvailable(platform = process.platform, probe = () => s
|
|
|
873
873
|
}
|
|
874
874
|
return linuxWorks;
|
|
875
875
|
}
|
|
876
|
-
export class LinuxFenceUnavailable extends Error {
|
|
877
|
-
}
|
|
878
876
|
export function srtTermsOf(fence, grants = NO_GRANTS) {
|
|
879
877
|
const denyRead = new Set(fence.map(real));
|
|
880
878
|
const regular = new Set(grants.exactRegular ?? []);
|
package/dist/agents-board.js
CHANGED
|
@@ -201,9 +201,6 @@ export const LANE_ROWS = 12;
|
|
|
201
201
|
const LANE_LOOKBACK_MS = 24 * 60 * 60_000;
|
|
202
202
|
const WINDOW_MS = { "30m": 30 * 60_000, "2h": 2 * 60 * 60_000, "24h": 24 * 60 * 60_000 };
|
|
203
203
|
const LANE_ROLES = "('planner', 'builder', 'repair', 'reviewer', 'scout')";
|
|
204
|
-
export function laneWindowOf(value) {
|
|
205
|
-
return value === "30m" || value === "24h" ? value : "2h";
|
|
206
|
-
}
|
|
207
204
|
export function laneSinceOf(window, now) {
|
|
208
205
|
return new Date(now.getTime() - WINDOW_MS[window]);
|
|
209
206
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { grantStandsSql } from "./flow-unattended.js";
|
|
2
2
|
import { accountReachesSql } from "./project-access.js";
|
|
3
3
|
import { autoSealSql } from "./release-authority.js";
|
|
4
|
-
|
|
4
|
+
import { PERSON_PROOFS as PERSON_PROOF_NAMES } from "./person-proof.js";
|
|
5
|
+
const PERSON_PROOFS = `(${PERSON_PROOF_NAMES.map(name => `'${name.replace(/'/g, "''")}'`).join(", ")})`;
|
|
5
6
|
export function authorityStandsSql(scope, repo, now) {
|
|
6
7
|
return `COALESCE((((COALESCE(${scope}.approval_basis, '') IN ('password', 'chat') AND NOT ${machineSealSql(scope)}
|
|
7
8
|
AND (${personSealSql(scope)} OR NOT ${automationSql(scope)} OR ${approverStandsSql(scope, repo)}))
|
package/dist/assignment.js
CHANGED
|
@@ -24,6 +24,9 @@ import { NEEDS, WAITS, processNeedOf, resultHoldUpSentence } from "./needs-you.j
|
|
|
24
24
|
import { assignmentStageOf, checkBackingOf, completionBlockersOf, receiptChecksOf, requirementWordOf } from "./task-status.js";
|
|
25
25
|
import { releaseCoverageOf } from "./release-coverage.js";
|
|
26
26
|
import { leadClaimOf } from "./lead-voice.js";
|
|
27
|
+
import { passkeyApprovalWindowMinutes, usesPasskeyLease, verifyPasskeyAction, verifyPasskeyLease } from "./companion/passkey-gate.js";
|
|
28
|
+
import { acceptBindingOf, passkeyProofDetail, publishDestinationForRun } from "./companion/webauthn.js";
|
|
29
|
+
import { isProtectedWork, protectedChanges } from "./approval-policy.js";
|
|
27
30
|
export function assignmentBrief(assignment) {
|
|
28
31
|
if (assignment === null)
|
|
29
32
|
return null;
|
|
@@ -532,6 +535,28 @@ export function owedAcceptance(receipt, blockers = []) {
|
|
|
532
535
|
return "exception";
|
|
533
536
|
return cantAcceptYetOf(receipt.proof?.verdict ?? null, receipt.proof?.reasons ?? [], false) === ACCEPT_NEEDS_REASON ? "exception" : null;
|
|
534
537
|
}
|
|
538
|
+
export const ACCEPT_PROVED_ACTION = "accept proved";
|
|
539
|
+
export function acceptWindowCovers(store, before, publish, root) {
|
|
540
|
+
const receipt = before.receipt;
|
|
541
|
+
const owed = before.state === "ready-to-check" ? owedAcceptance(receipt, before.readiness?.blockers ?? []) : null;
|
|
542
|
+
if (publish || owed === "exception" || receipt === null || before.repo === null)
|
|
543
|
+
return false;
|
|
544
|
+
const ancestry = store.revisionAncestryStatus(receipt.taskId);
|
|
545
|
+
if (ancestry.problem !== null || ancestry.chain.length === 0)
|
|
546
|
+
return false;
|
|
547
|
+
const scopes = ancestry.chain.map(id => store.getScope(id));
|
|
548
|
+
if (scopes.some(scope => scope?.releaseTerms != null))
|
|
549
|
+
return false;
|
|
550
|
+
const rules = store.approvalRules(before.repo);
|
|
551
|
+
if (rules.protectProject)
|
|
552
|
+
return false;
|
|
553
|
+
if (rules.protectedPaths.length === 0)
|
|
554
|
+
return true;
|
|
555
|
+
if (scopes.some(scope => scope === null || isProtectedWork(rules, [...scope.touches])))
|
|
556
|
+
return false;
|
|
557
|
+
const changed = familyChangedFiles(store, receipt.taskId, receipt.runId, root);
|
|
558
|
+
return changed !== null && protectedChanges(rules, changed).length === 0;
|
|
559
|
+
}
|
|
535
560
|
export function acceptAndCompleteAsOperator(store, taskId, input, who, now, root = evidenceRoot(homedir()), finish = digest => checkAssignmentAsOperator(store, taskId, digest, who, now, root)) {
|
|
536
561
|
try {
|
|
537
562
|
return withActor(currentActor() ?? { account: who.name, lead: false }, () => store.transact(() => store.savepoint(() => {
|
|
@@ -545,14 +570,40 @@ export function acceptAndCompleteAsOperator(store, taskId, input, who, now, root
|
|
|
545
570
|
if (receipt === null || (input.runId !== null && receipt.runId !== input.runId) || !/^[a-f0-9]{64}$/.test(input.receiptDigest) || receipt.digest !== input.receiptDigest) {
|
|
546
571
|
return { ok: false, reason: "stale", message: "This result changed. Open the current result before accepting it." };
|
|
547
572
|
}
|
|
573
|
+
const owed = before.state === "ready-to-check" ? owedAcceptance(receipt, before.readiness?.blockers ?? []) : null;
|
|
548
574
|
const local = localCompletionRefusal(store, `operator:${who.name}`, [receipt.taskId, taskId, before.rootId], receipt.runId, root);
|
|
549
575
|
if (local !== null)
|
|
550
576
|
return local;
|
|
551
|
-
const owed = before.state === "ready-to-check" ? owedAcceptance(receipt, before.readiness?.blockers ?? []) : null;
|
|
552
577
|
if (owed === "exception" && input.note === null)
|
|
553
578
|
return { ok: false, reason: "needs-reason", message: `${ACCEPT_NEEDS_REASON}.` };
|
|
554
|
-
if (owed === "person-check" && machineActing())
|
|
579
|
+
if ((owed === "person-check" || input.passkey !== undefined) && machineActing())
|
|
555
580
|
return { ok: false, reason: "person-required", message: MACHINE_CANT_CHECK };
|
|
581
|
+
let passkeyProof = null;
|
|
582
|
+
if (input.passkey !== undefined) {
|
|
583
|
+
const routine = acceptWindowCovers(store, before, input.publish === true, root);
|
|
584
|
+
const lease = usesPasskeyLease(input.passkey);
|
|
585
|
+
if (lease && !routine)
|
|
586
|
+
return { ok: false, reason: "step-up-required", message: "Confirm with your passkey to accept this result." };
|
|
587
|
+
const verified = usesPasskeyLease(input.passkey)
|
|
588
|
+
? verifyPasskeyLease(store, { accountName: who.name, repo: before.repo, proof: input.passkey, now })
|
|
589
|
+
: verifyPasskeyAction(store, {
|
|
590
|
+
accountName: who.name,
|
|
591
|
+
repo: before.repo,
|
|
592
|
+
verb: "accept",
|
|
593
|
+
expectedBinding: acceptBindingOf({ taskId, runId: input.runId, receiptDigest: input.receiptDigest, note: input.note, publish: input.publish === true,
|
|
594
|
+
destination: input.publish === true ? publishDestinationForRun(store, receipt.runId) : undefined }, receipt.runId),
|
|
595
|
+
proof: input.passkey,
|
|
596
|
+
now,
|
|
597
|
+
...(routine ? { startsLease: { minutes: passkeyApprovalWindowMinutes(store) } } : {}),
|
|
598
|
+
});
|
|
599
|
+
if (!verified.ok)
|
|
600
|
+
return { ok: false, reason: verified.code === "step_up_required" ? "step-up-required" : verified.code === "binding_mismatch" ? "changed" : "unauthenticated", message: verified.message };
|
|
601
|
+
passkeyProof = {
|
|
602
|
+
outcome: lease ? "passkey-fresh" : "passkey",
|
|
603
|
+
detail: passkeyProofDetail({ at: now, ...(lease ? { provedAtMs: verified.provedAtMs } : {}), generation: verified.accountGeneration, digest: receipt.digest, verb: "accept",
|
|
604
|
+
credentialId: verified.credentialId, pairedDeviceId: verified.deviceId, be: verified.be, bs: verified.bs }),
|
|
605
|
+
};
|
|
606
|
+
}
|
|
556
607
|
let digest = receipt.digest;
|
|
557
608
|
if (owed !== null) {
|
|
558
609
|
store.acceptProof(receipt.runId, who.name, input.note, now);
|
|
@@ -562,6 +613,9 @@ export function acceptAndCompleteAsOperator(store, taskId, input, who, now, root
|
|
|
562
613
|
throw new Undone({ ok: false, reason: "stale", message: "This result changed. Open the current result before accepting it." });
|
|
563
614
|
digest = accepted.digest;
|
|
564
615
|
}
|
|
616
|
+
if (passkeyProof !== null) {
|
|
617
|
+
store.recordAction({ at: now.toISOString(), actor: who.name, repo: before.repo, taskId, runId: receipt.runId, action: ACCEPT_PROVED_ACTION, outcome: passkeyProof.outcome, source: "request", detail: passkeyProof.detail });
|
|
618
|
+
}
|
|
565
619
|
const done = finish(digest);
|
|
566
620
|
if (!done.ok)
|
|
567
621
|
throw new Undone(done);
|
package/dist/backup-ui.js
CHANGED
|
@@ -19,9 +19,12 @@ function liveLine(view) {
|
|
|
19
19
|
return note("Continuous copy is off.");
|
|
20
20
|
if (live.state.problem !== null)
|
|
21
21
|
return notice(`The continuous copy failed: ${live.state.problem}`);
|
|
22
|
-
|
|
22
|
+
const newest = live.newest ?? (live.state.latest === null ? null : { madeAt: live.state.latest.madeAt, check: "integrity" });
|
|
23
|
+
if (newest === null)
|
|
23
24
|
return note("The first continuous copy is made within a few minutes of Toolroll starting.");
|
|
24
|
-
|
|
25
|
+
const every = live.state.settings.everyMinutes === 1 ? "minute" : `${live.state.settings.everyMinutes} minutes`;
|
|
26
|
+
const full = newest.check === "quick" && live.state.latest !== null ? ` Last full integrity check ${whenWords(live.state.latest.madeAt)}.` : "";
|
|
27
|
+
return html `<p class="k-note" data-live-copy>Latest continuous copy ${when(newest.madeAt)} (${newest.check === "quick" ? "quick check" : "full integrity check"}).${full} Toolroll looks for changes every ${every} and copies only when something changed; at least once a day it copies anyway and runs the full integrity check. A change made outside Toolroll (a script, or the database edited by hand) may wait for that daily copy.</p>`;
|
|
25
28
|
}
|
|
26
29
|
function state(view) {
|
|
27
30
|
const last = view.runs[0];
|
|
@@ -89,7 +92,7 @@ function liveFields(view) {
|
|
|
89
92
|
const every = select({ id: "backup-live-every", name: "live_every", label: "Copy continuously", current: on.enabled ? String(on.everyMinutes) : "off",
|
|
90
93
|
items: [["off", "Off"], ...LIVE_EVERY.map(minutes => [String(minutes), minutes === 1 ? "Every minute" : `Every ${minutes} minutes`])] });
|
|
91
94
|
return joinHtml([
|
|
92
|
-
formRow("Copy continuously", "
|
|
95
|
+
formRow("Copy continuously", "Between backups, a checked copy of the database whenever it changed, looked for this often.", every, "inline"),
|
|
93
96
|
formRow("Copy folder", "Blank: beside the database.", input({ id: "backup-live-folder", name: "live_folder", value: on.folder ?? "",
|
|
94
97
|
attrs: { placeholder: live.defaultFolder, spellcheck: "false", "aria-label": "Copy folder" } })),
|
|
95
98
|
]);
|
package/dist/backup.js
CHANGED
|
@@ -9,6 +9,8 @@ import { DEFAULT_LIVENESS_MS } from "./runner.js";
|
|
|
9
9
|
import { openStore, readSchemaVersion, SCHEMA_VERSION } from "./store.js";
|
|
10
10
|
import { resetFlexibleSignInsForRestore } from "./flexible-sign-in.js";
|
|
11
11
|
import { retireRestoredAuthority } from "./restore-retirement.js";
|
|
12
|
+
import { hostedRelayRoomOf } from "./companion/access.js";
|
|
13
|
+
import { forgetMachineOnRelay } from "./companion/service.js";
|
|
12
14
|
const BACKUP_NAME = /^(?:toolroll|standing-orders)-(?:([0-9a-f]{8})-)?(\d{4}-\d{2}-\d{2}-\d{6})(?:-(\d+))?\.db$/;
|
|
13
15
|
export const OLDEST_RESTORABLE = 103;
|
|
14
16
|
export { BACKUP_EVERY_HOURS, MAX_KEEP };
|
|
@@ -330,6 +332,7 @@ export async function restoreDatabase(options) {
|
|
|
330
332
|
const store = openStore(databaseFile);
|
|
331
333
|
let carried;
|
|
332
334
|
let replacedRecoveryGeneration = null;
|
|
335
|
+
let relayRoom = null;
|
|
333
336
|
try {
|
|
334
337
|
const running = runningNow(store, new Date());
|
|
335
338
|
if (running.length > 0)
|
|
@@ -340,10 +343,13 @@ export async function restoreDatabase(options) {
|
|
|
340
343
|
replacedRecoveryGeneration = store.workspaceIdentity().recoveryGeneration;
|
|
341
344
|
}
|
|
342
345
|
catch { }
|
|
346
|
+
relayRoom = hostedRelayRoomOf(store);
|
|
343
347
|
}
|
|
344
348
|
finally {
|
|
345
349
|
store.close();
|
|
346
350
|
}
|
|
351
|
+
if (relayRoom !== null)
|
|
352
|
+
await forgetMachineOnRelay(relayRoom.relayUrl, relayRoom.keys);
|
|
347
353
|
let retired;
|
|
348
354
|
try {
|
|
349
355
|
const prepared = openStore(staged);
|
package/dist/bounded-spawn.js
CHANGED
|
@@ -8,7 +8,6 @@ const PIDS = 64;
|
|
|
8
8
|
const PRELUDE = 'if [ "$1" != none ]; then if [ -n "$BASH_VERSION" ]; then b=$(($1/1024)); else b=$(($1/512)); fi; ulimit -f "$b" 2>/dev/null || exit 126; fi\nshift\nexec "$@"';
|
|
9
9
|
let containment = null;
|
|
10
10
|
const preferred = () => containment ??= effectiveContainment("preferred", probeContainmentCapability());
|
|
11
|
-
export function resetBoundedContainmentForTests() { containment = null; }
|
|
12
11
|
export function processStartedAt(pid) {
|
|
13
12
|
return processIdentity(pid);
|
|
14
13
|
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"assets": {
|
|
4
|
+
"workspace.js": {
|
|
5
|
+
"file": "workspace.9bd1db81d3c897045a5d82d4804e374e41e78b1b2cfd05d37b982a4ea0d02626.js",
|
|
6
|
+
"sha256": "9bd1db81d3c897045a5d82d4804e374e41e78b1b2cfd05d37b982a4ea0d02626",
|
|
7
|
+
"bytes": 1197716,
|
|
8
|
+
"br": {
|
|
9
|
+
"sha256": "b0a8d16c6994ac1984df9c1d9e9467692232036fc45cc49d5896da03c6dfcdf8",
|
|
10
|
+
"bytes": 305761
|
|
11
|
+
},
|
|
12
|
+
"gzip": {
|
|
13
|
+
"sha256": "92c02fd89e62f69df7ca5ae0224ec663fe13bf7e1f6932462ea09a97f65da8ab",
|
|
14
|
+
"bytes": 367162
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"workspace.css": {
|
|
18
|
+
"file": "workspace.a0752f935cfeaf16758d1085fe8f3e1719a7cd525b91a9c9943c789d65879a54.css",
|
|
19
|
+
"sha256": "a0752f935cfeaf16758d1085fe8f3e1719a7cd525b91a9c9943c789d65879a54",
|
|
20
|
+
"bytes": 230217,
|
|
21
|
+
"br": {
|
|
22
|
+
"sha256": "d366b686570d4545e2464490af77461b74808f0f90e3b269324e1d137a4dd6df",
|
|
23
|
+
"bytes": 30944
|
|
24
|
+
},
|
|
25
|
+
"gzip": {
|
|
26
|
+
"sha256": "ec3be3bfe980eef77dca2076e5efcb88c6d2bf34ab016199aeb4e187409395f2",
|
|
27
|
+
"bytes": 36317
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"terminal.js": {
|
|
31
|
+
"file": "terminal.2a682d0b91a35288271c73b7ee253e524cca0917d17fbaf6733e80b7a767a37c.js",
|
|
32
|
+
"sha256": "2a682d0b91a35288271c73b7ee253e524cca0917d17fbaf6733e80b7a767a37c",
|
|
33
|
+
"bytes": 780873,
|
|
34
|
+
"br": {
|
|
35
|
+
"sha256": "ddab065c7eeec564171884f4fa948da30b5ec7937d5ffc9df53bb522e5b25b33",
|
|
36
|
+
"bytes": 167572
|
|
37
|
+
},
|
|
38
|
+
"gzip": {
|
|
39
|
+
"sha256": "5652b5aee53192ef0e12f7279725e2b1cd5370b3215787ea0183e22964042d98",
|
|
40
|
+
"bytes": 219378
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"terminal.css": {
|
|
44
|
+
"file": "terminal.4d1cf20c32ad7c2099df657358d540d5fd92bb55195a88121e74b28467238b42.css",
|
|
45
|
+
"sha256": "4d1cf20c32ad7c2099df657358d540d5fd92bb55195a88121e74b28467238b42",
|
|
46
|
+
"bytes": 77650,
|
|
47
|
+
"br": {
|
|
48
|
+
"sha256": "8dba626d3778caaddfa93a40ccd0e3c4ef04cad3865a7558cbc63646669dfb39",
|
|
49
|
+
"bytes": 13176
|
|
50
|
+
},
|
|
51
|
+
"gzip": {
|
|
52
|
+
"sha256": "ccd860a398e19a5876cd7758707cdded058690ab747f62a02d8ec172f679776a",
|
|
53
|
+
"bytes": 15262
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|