toolroll 0.9.127 → 0.9.129
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 +36 -0
- package/README.md +2 -1
- package/dist/accent-colors.js +3 -1
- package/dist/approval-authority.js +2 -1
- package/dist/assignment.js +55 -2
- package/dist/backup.js +6 -0
- package/dist/browser/terminal.css +1 -1
- package/dist/browser/workspace.css +2 -2
- package/dist/browser/workspace.js +9 -9
- package/dist/central-recovery-stage.js +3 -3
- package/dist/companion/access.js +161 -0
- package/dist/companion/actions.js +559 -0
- package/dist/companion/bonjour.js +45 -0
- package/dist/companion/daemon.js +1346 -0
- package/dist/companion/direct-server.js +177 -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 +279 -0
- package/dist/companion/relay-auth.js +265 -0
- package/dist/companion/relay-server.js +870 -0
- package/dist/companion/schema.js +225 -0
- package/dist/companion/service.js +580 -0
- package/dist/companion/store.js +324 -0
- package/dist/companion/webauthn-test-support.js +44 -0
- package/dist/companion/webauthn.js +398 -0
- package/dist/contracts/console-api.js +18 -0
- package/dist/demo.js +1 -1
- package/dist/design/kit.css +36 -3
- package/dist/local-landing.js +47 -0
- package/dist/models-ui.js +5 -2
- package/dist/operate.js +19 -3
- package/dist/person-proof.js +5 -1
- package/dist/pull-request-flow.js +75 -2
- package/dist/qr.js +385 -0
- package/dist/release-adapters.js +2 -1
- package/dist/restore-retirement.js +2 -0
- package/dist/scope.js +67 -4
- package/dist/serve.js +31 -4
- package/dist/server/pages.js +9 -2
- package/dist/server/phone-engine-api.js +59 -0
- package/dist/server/route-table.js +11 -0
- package/dist/server/settings-phone.js +492 -0
- package/dist/server/settings-scripts.js +2 -0
- package/dist/server/settings-sections.js +6 -2
- package/dist/server/settings.js +8 -2
- package/dist/settings-groups-ui.js +2 -1
- package/dist/settings-proofs.js +6 -0
- package/dist/skills-ui.js +11 -6
- package/dist/spend-ui.js +3 -2
- package/dist/spend.js +8 -1
- package/dist/store.js +37 -4
- package/dist/tailnet.js +42 -0
- package/dist/toolroll-update.js +3 -1
- package/dist/youiyoux-intake.js +8 -0
- package/package.json +7 -2
package/dist/skills-ui.js
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import { randomUUID } from "node:crypto";
|
|
2
|
+
import { homedir } from "node:os";
|
|
2
3
|
import { whenUtc } from "./when-html.js";
|
|
3
4
|
import { html, joinHtml, postForm } from "./html.js";
|
|
4
5
|
import { acts, btn, chip, disclose, facts, formRow, input, note, notice, select, settingsRecord, settingsSection, textarea } from "./server/kit.js";
|
|
5
6
|
import { plural } from "./design/kit.js";
|
|
7
|
+
function prettyHomePath(target) {
|
|
8
|
+
const home = homedir();
|
|
9
|
+
return home && (target === home || target.startsWith(`${home}/`)) ? `~${target.slice(home.length)}` : target;
|
|
10
|
+
}
|
|
6
11
|
const fields = (data) => Object.fromEntries(Object.entries(data).map(([k, v]) => [k, String(v ?? "")]));
|
|
7
12
|
export const SKILLS_CSS = `.skills{max-width:780px;min-width:0;overflow-wrap:anywhere}.skills h2{font-size:1.1rem}.skills .card{padding:18px;margin:14px 0;min-width:0}.skills form,.skills label{display:grid;gap:10px}.skills input,.skills textarea,.skills select{box-sizing:border-box;width:100%;max-width:100%;min-width:0}.skills textarea{resize:vertical;min-height:130px}.skills button{justify-self:start;white-space:nowrap;min-height:44px}.skills summary{cursor:pointer;min-height:44px;display:flex;align-items:center;gap:10px;flex-wrap:wrap}.skills pre{white-space:pre-wrap;overflow-wrap:anywhere;max-height:360px;overflow:auto;font-size:.9rem}.skills .skill-heading{display:flex;align-items:baseline;justify-content:space-between;gap:12px}.skills .skill-heading h2{margin:0}.skills .skill-state{font-size:.85rem;flex-shrink:0}.skills .skill-source{font-size:.85rem}.skills .skill-controls{display:flex;gap:12px;flex-wrap:wrap}.skills .skill-controls form{margin:0}.skills details details{margin-top:10px}.skills [hidden]{display:none!important}.skills .skill-files{max-height:200px;overflow:auto}.skills .problem{padding:12px}@media(max-width:600px){.skills input,.skills textarea,.skills select{font-size:16px}.skills .card{padding:14px}.skills .skill-heading{align-items:flex-start}}`;
|
|
8
13
|
function source(skill) {
|
|
@@ -117,11 +122,11 @@ export function skillLibrarySectionHtml(library, localTools, csrf, canManage, op
|
|
|
117
122
|
const projectOptedOutAll = library.projectOptOut?.all === true;
|
|
118
123
|
const projectOptOutNames = new Set(library.projectOptOut?.names ?? []);
|
|
119
124
|
const importBundleForm = manage
|
|
120
|
-
? disclose("Import a GitHub skill bundle", libForm("import-bundle", joinHtml([
|
|
125
|
+
? disclose("Import a GitHub skill bundle", libForm("import-bundle", html `<div class="k-sec">${joinHtml([
|
|
121
126
|
formRow("GitHub repository URL", "Imports every SKILL.md found in the repository, pinned to its exact commit SHA.", input({ id: "bundle-url", name: "url", type: "url", value: bundleUrl, attrs: { required: true, placeholder: "https://github.com/owner/repo", "aria-label": "GitHub repository URL" } }), "wide"),
|
|
122
|
-
html `<
|
|
127
|
+
html `<div class="k-checks"><label><input type="checkbox" name="autoUpdate" value="1" checked> Check daily and apply clean updates automatically (suspicious changes are held for review)</label></div>`,
|
|
123
128
|
acts(btn("Import bundle", { variant: "primary", type: "submit" })),
|
|
124
|
-
])), bundleUrl !== "" || (library.bundles.length === 0 && library.skills.length === 0))
|
|
129
|
+
])}</div>`), bundleUrl !== "" || (library.bundles.length === 0 && library.skills.length === 0))
|
|
125
130
|
: "";
|
|
126
131
|
const addGlobalSkillForm = manage
|
|
127
132
|
? disclose("Add a single skill to all projects", libForm("import-skill", joinHtml([
|
|
@@ -195,14 +200,14 @@ export function skillLibrarySectionHtml(library, localTools, csrf, canManage, op
|
|
|
195
200
|
id: "global-library",
|
|
196
201
|
title: "Global Skill Library",
|
|
197
202
|
lead: `${enabledCount ? `${plural(enabledCount, "skill", "skills")} active across all projects by default.` : "No global skills installed yet."} Every agent (tasks, Direct Chat, threads, terminals, and the lead) receives this pinned set unless a project opts out.`,
|
|
198
|
-
body: joinHtml([
|
|
203
|
+
body: html `<div class="k-sec">${joinHtml([
|
|
199
204
|
importBundleForm,
|
|
200
205
|
addGlobalSkillForm,
|
|
201
206
|
bundleCards.length ? html `<h3>Tracked GitHub bundles</h3>${joinHtml(bundleCards)}` : "",
|
|
202
207
|
projectOptOutToggle,
|
|
203
208
|
globalSearch,
|
|
204
209
|
globalSkillCards.length ? joinHtml(globalSkillCards) : note("Import a GitHub skill repository or add a skill above to share it across every project."),
|
|
205
|
-
])
|
|
210
|
+
])}</div>`,
|
|
206
211
|
});
|
|
207
212
|
const localToolCards = localTools.map((tool) => {
|
|
208
213
|
const statusChip = !tool.detected
|
|
@@ -211,7 +216,7 @@ export function skillLibrarySectionHtml(library, localTools, csrf, canManage, op
|
|
|
211
216
|
? chip(`Synced (${tool.installedCount})`, "done")
|
|
212
217
|
: chip("Detected · off", "");
|
|
213
218
|
const sub = tool.detected
|
|
214
|
-
? html `Writes only Toolroll-managed skills to <span class="k-mono">${tool.skillsDir ?? tool.toolHome}</span>. Your own hand-written skills are never overwritten.`
|
|
219
|
+
? html `Writes only Toolroll-managed skills to <span class="k-mono">${prettyHomePath(tool.skillsDir ?? tool.toolHome)}</span>. Your own hand-written skills are never overwritten.`
|
|
215
220
|
: "Folder not found on this computer — Toolroll only writes where a tool is already installed.";
|
|
216
221
|
const actions = manage && tool.detected
|
|
217
222
|
? html `<div class="skill-controls">
|
package/dist/spend-ui.js
CHANGED
|
@@ -52,11 +52,12 @@ const unknownWords = (line) => {
|
|
|
52
52
|
const apiWords = (line) => line.apiMicrousd > 0 ? money(line.apiMicrousd) : "—";
|
|
53
53
|
const sec = (id, title, state, body, attrs = "") => html `<section class="k-sec spend-sec" aria-labelledby="spend-${id}"${attrs}><div class="k-secthead"><h3 id="spend-${id}">${title}${state ? html ` <small>· ${state}</small>` : ""}</h3></div>${body}</section>`;
|
|
54
54
|
function bars(head, lines, name, max, top = 12, detail = () => "") {
|
|
55
|
+
const scale = Math.max(max, 1_000_000);
|
|
55
56
|
const rows = lines.slice(0, top).map(line => {
|
|
56
57
|
const sub = [detail(line), line.usageCount > 0 ? `plan usage ${usageWords(line)}` : "", line.unknown > 0 || line.estimatedMicrousd > 0 ? `unknown ${unknownWords(line)}` : ""].filter(Boolean).join(" · ");
|
|
57
|
-
const width =
|
|
58
|
+
const width = line.apiMicrousd > 0 ? Math.max(0, Math.min(100, (line.apiMicrousd / scale) * 100)) : 0;
|
|
58
59
|
return html `<div class="spend-bar" role="row"><span class="spend-bar-n" role="cell">${name(line.key)}${sub === "" ? "" : html `<small data-amount-kind="${line.usageCount > 0 ? "subscription" : "unknown"}">${sub}</small>`}</span>\
|
|
59
|
-
<span class="spend-lane" role="cell" aria-hidden="true">${line.apiMicrousd > 0 ? html `<i style="width:${width.toFixed(1)}%"></i>` : ""}</span><span class="spend-bar-v" role="cell" data-amount-kind="api">${apiWords(line)}</span></div>`;
|
|
60
|
+
<span class="spend-lane" role="cell" aria-hidden="true">${line.apiMicrousd > 0 ? html `<i style="width:${width.toFixed(1)}%" title="${apiWords(line)}"></i>` : ""}</span><span class="spend-bar-v" role="cell" data-amount-kind="api">${apiWords(line)}</span></div>`;
|
|
60
61
|
});
|
|
61
62
|
const total = lines.reduce((sum, line) => sum + line.apiMicrousd, 0);
|
|
62
63
|
return html `<div class="spend-bars" role="table" aria-label="${head}"><div class="spend-bar h" role="row"><span role="columnheader">${head}</span><span role="columnheader"></span><span class="spend-bar-v" role="columnheader">API dollars</span></div>${rows}\
|
package/dist/spend.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { realpathSync } from "node:fs";
|
|
1
2
|
import { SUBSCRIPTION_CAPABLE, readAuthMode } from "./keys.js";
|
|
2
3
|
export function billingOf(provider, db) {
|
|
3
4
|
const base = provider.replace(/-(subscription|api)$/, "");
|
|
@@ -270,11 +271,17 @@ export function spendItems(db, from, to, readMode = provider => billingOf(provid
|
|
|
270
271
|
}
|
|
271
272
|
return items;
|
|
272
273
|
}
|
|
274
|
+
const canonicalRepoPath = (value) => { try {
|
|
275
|
+
return realpathSync(value);
|
|
276
|
+
}
|
|
277
|
+
catch {
|
|
278
|
+
return value;
|
|
279
|
+
} };
|
|
273
280
|
export function countsToward(item, budget) {
|
|
274
281
|
if (budget.scope === "installation")
|
|
275
282
|
return true;
|
|
276
283
|
if (budget.scope === "project")
|
|
277
|
-
return item.project === budget.key;
|
|
284
|
+
return item.project !== null && (item.project === budget.key || canonicalRepoPath(item.project) === canonicalRepoPath(budget.key));
|
|
278
285
|
if (budget.scope === "person")
|
|
279
286
|
return item.person === budget.key;
|
|
280
287
|
return item.subagent !== null && String(item.subagent) === budget.key;
|
package/dist/store.js
CHANGED
|
@@ -41,6 +41,7 @@ import { V177_STEPS, V177_SCHEMA, V177_OBJECTS, WORKSPACE_ID_PATTERN, RECOVERY_G
|
|
|
41
41
|
import { V174_OBJECTS, V174_SCHEMA, V174_STEPS } from "./flexible-everyday-schema.js";
|
|
42
42
|
import { V185_OBJECTS, V185_SCHEMA, V185_STEPS } from "./flexible-conversation-schema.js";
|
|
43
43
|
import { V186_OBJECTS, V186_SCHEMA, V186_STEPS } from "./skill-library-schema.js";
|
|
44
|
+
import { adoptLegacyCompanion, companionPasskeyShapeProblem, companionShapeProblem, V187_STEPS, V188_SCHEMA, V188_STEPS } from "./companion/schema.js";
|
|
44
45
|
import { endThreadAuthorityFor } from "./flexible-authority-end.js";
|
|
45
46
|
import { relayCancel } from "./flexible-relay-cancel.js";
|
|
46
47
|
import { endLapsedFlexible } from "./flexible.js";
|
|
@@ -847,7 +848,7 @@ export function checkSuitesOf(value) {
|
|
|
847
848
|
}
|
|
848
849
|
}
|
|
849
850
|
const REGISTERED_AT_FILING = "again, as it was filed";
|
|
850
|
-
export const SCHEMA_VERSION =
|
|
851
|
+
export const SCHEMA_VERSION = 188;
|
|
851
852
|
export const V179_STEPS = Object.freeze(["antigravity-provider"]);
|
|
852
853
|
export const V118_MERGED_TABLES = Object.freeze({ api_token: "person", coordinator_credential: "coordinator", lead_credential: "lead" });
|
|
853
854
|
const V118_REFERENCES = /REFERENCES (?:coordinator_credential\(cid\)|api_token\(id\))/g;
|
|
@@ -913,7 +914,7 @@ export const V115_DROPPED_TABLES = Object.freeze([
|
|
|
913
914
|
"fallback_config", "fallback_cycle", "fallback_transition",
|
|
914
915
|
]);
|
|
915
916
|
const V115_DROPPED_REFERENCES = /\s+REFERENCES (?:contestant|contest|tournament_terms|session_turn|attended_authorization|held_session|fallback_cycle|fallback_config|fallback_transition|routine|routine_fire)\(id\)(?: ON DELETE CASCADE)?/g;
|
|
916
|
-
export const UPDATE_SAFE_MIGRATIONS = Object.freeze([108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186]);
|
|
917
|
+
export const UPDATE_SAFE_MIGRATIONS = Object.freeze([108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188]);
|
|
917
918
|
export const V119_ADDED_COLUMNS = Object.freeze({
|
|
918
919
|
task_ref: { planning_generation: { definition: "INTEGER NOT NULL DEFAULT 0", saved: "0" } },
|
|
919
920
|
run: { planning_generation: { definition: "INTEGER NOT NULL DEFAULT 0", saved: "0" } },
|
|
@@ -1456,7 +1457,7 @@ export { V156_STEPS };
|
|
|
1456
1457
|
export { V157_STEPS };
|
|
1457
1458
|
export { V158_STEPS };
|
|
1458
1459
|
export { V159_STEPS };
|
|
1459
|
-
export { V160_STEPS, V161_STEPS, V162_STEPS, V163_STEPS, V164_STEPS, V165_STEPS, V166_STEPS, V167_STEPS, V168_STEPS, V169_STEPS, V170_STEPS, V171_STEPS, V172_STEPS, V173_STEPS, V174_STEPS, V175_STEPS, V176_STEPS, V177_STEPS, V178_STEPS, V180_STEPS, V181_STEPS, V182_STEPS, V183_STEPS, V184_STEPS, V185_STEPS, V186_STEPS };
|
|
1460
|
+
export { V160_STEPS, V161_STEPS, V162_STEPS, V163_STEPS, V164_STEPS, V165_STEPS, V166_STEPS, V167_STEPS, V168_STEPS, V169_STEPS, V170_STEPS, V171_STEPS, V172_STEPS, V173_STEPS, V174_STEPS, V175_STEPS, V176_STEPS, V177_STEPS, V178_STEPS, V180_STEPS, V181_STEPS, V182_STEPS, V183_STEPS, V184_STEPS, V185_STEPS, V186_STEPS, V187_STEPS, V188_STEPS };
|
|
1460
1461
|
export const RELEASE_ONCE_SCHEMA = `
|
|
1461
1462
|
CREATE TABLE IF NOT EXISTS release_authority (
|
|
1462
1463
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
@@ -4245,7 +4246,7 @@ function initializeStore(db, file, options = {}) {
|
|
|
4245
4246
|
throw new Error(`${file}: ${problem}; refusing to move chat history it cannot name`);
|
|
4246
4247
|
}
|
|
4247
4248
|
if (preflight === SCHEMA_VERSION && !findingSourcesStale(db)) {
|
|
4248
|
-
const missing = codeMapShapeProblem(db) ?? viewPreferenceShapeProblem(db) ?? flexibleTermsShapeProblem(db) ?? flexibleThreadShapeProblem(db) ?? typedByPersonShapeProblem(db) ?? flexibleTurnsShapeProblem(db) ?? flexibleLaunchShapeProblem(db) ?? flexibleRelayShapeProblem(db) ?? flexibleAnswersShapeProblem(db) ?? flexibleShipShapeProblem(db) ?? taskSizingShapeProblem(db) ?? agentSaidShapeProblem(db) ?? flexibleSettingShapeProblem(db) ?? flexibleSignInShapeProblem(db) ?? planProblemsShapeProblem(db) ?? flexibleEverydayShapeProblem(db) ?? flexibleInteractiveShapeProblem(db) ?? subagentBackupShapeProblem(db) ?? workspaceIdentityShapeProblem(db) ?? pendingAgentChangeShapeProblem(db) ?? directChatShapeProblem(db) ?? directChatPhase1bShapeProblem(db) ?? directChatHardeningShapeProblem(db) ?? flexibleConversationShapeProblem(db) ?? skillLibraryShapeProblem(db);
|
|
4249
|
+
const missing = codeMapShapeProblem(db) ?? viewPreferenceShapeProblem(db) ?? flexibleTermsShapeProblem(db) ?? flexibleThreadShapeProblem(db) ?? typedByPersonShapeProblem(db) ?? flexibleTurnsShapeProblem(db) ?? flexibleLaunchShapeProblem(db) ?? flexibleRelayShapeProblem(db) ?? flexibleAnswersShapeProblem(db) ?? flexibleShipShapeProblem(db) ?? taskSizingShapeProblem(db) ?? agentSaidShapeProblem(db) ?? flexibleSettingShapeProblem(db) ?? flexibleSignInShapeProblem(db) ?? planProblemsShapeProblem(db) ?? flexibleEverydayShapeProblem(db) ?? flexibleInteractiveShapeProblem(db) ?? subagentBackupShapeProblem(db) ?? workspaceIdentityShapeProblem(db) ?? pendingAgentChangeShapeProblem(db) ?? directChatShapeProblem(db) ?? directChatPhase1bShapeProblem(db) ?? directChatHardeningShapeProblem(db) ?? flexibleConversationShapeProblem(db) ?? skillLibraryShapeProblem(db) ?? companionShapeProblem(db) ?? companionPasskeyShapeProblem(db);
|
|
4249
4250
|
if (missing !== null)
|
|
4250
4251
|
throw new Error(`${file}: refusing to open — ${missing}, though the schema says v${SCHEMA_VERSION}`);
|
|
4251
4252
|
db.exec("PRAGMA journal_mode = WAL; PRAGMA foreign_keys = ON;");
|
|
@@ -4740,6 +4741,36 @@ CREATE INDEX IF NOT EXISTS run_checkpoint_by_task ON run_checkpoint (task_ref, i
|
|
|
4740
4741
|
if (skillLibraryDamaged !== null)
|
|
4741
4742
|
throw new Error(`${file}: refusing to open — ${skillLibraryDamaged}`);
|
|
4742
4743
|
step("skill-library");
|
|
4744
|
+
db.exec("BEGIN IMMEDIATE");
|
|
4745
|
+
try {
|
|
4746
|
+
adoptLegacyCompanion(db, new Date());
|
|
4747
|
+
const companionDamaged = companionShapeProblem(db);
|
|
4748
|
+
if (companionDamaged !== null)
|
|
4749
|
+
throw new Error(`${file}: refusing to open — ${companionDamaged}`);
|
|
4750
|
+
step("companion");
|
|
4751
|
+
db.exec("COMMIT");
|
|
4752
|
+
}
|
|
4753
|
+
catch (error) {
|
|
4754
|
+
db.exec("ROLLBACK");
|
|
4755
|
+
if (error instanceof Error && !error.message.startsWith(`${file}:`) && /unknown shape/.test(error.message))
|
|
4756
|
+
throw new Error(`${file}: refusing to open — ${error.message}`);
|
|
4757
|
+
throw error;
|
|
4758
|
+
}
|
|
4759
|
+
db.exec("BEGIN IMMEDIATE");
|
|
4760
|
+
try {
|
|
4761
|
+
db.exec(V188_SCHEMA);
|
|
4762
|
+
const passkeyDamaged = companionPasskeyShapeProblem(db);
|
|
4763
|
+
if (passkeyDamaged !== null)
|
|
4764
|
+
throw new Error(`${file}: refusing to open — ${passkeyDamaged}`);
|
|
4765
|
+
step("companion-passkey");
|
|
4766
|
+
db.exec("COMMIT");
|
|
4767
|
+
}
|
|
4768
|
+
catch (error) {
|
|
4769
|
+
db.exec("ROLLBACK");
|
|
4770
|
+
if (error instanceof Error && !error.message.startsWith(`${file}:`) && /unknown shape/.test(error.message))
|
|
4771
|
+
throw new Error(`${file}: refusing to open — ${error.message}`);
|
|
4772
|
+
throw error;
|
|
4773
|
+
}
|
|
4743
4774
|
if (!fresh)
|
|
4744
4775
|
reclaimDatabase(db, "migration");
|
|
4745
4776
|
const expectedMarker = preflight < 0 ? preflight : -preflight;
|
|
@@ -7273,6 +7304,8 @@ export class Store {
|
|
|
7273
7304
|
chat.revokeBinding({ id: Number(row["id"]) }, now, by);
|
|
7274
7305
|
chat.prepare("UPDATE chat_pair SET consumed = ? WHERE provider = :provider AND approver = ? AND consumed IS NULL").run(stamp, approver);
|
|
7275
7306
|
}
|
|
7307
|
+
this.db.prepare("UPDATE companion_paired_device SET revoked_at = ?, revoked_reason = ? WHERE account_name = ? AND revoked_at IS NULL")
|
|
7308
|
+
.run(stamp, by === "credential-rotation" ? "password_changed" : "access_changed", approver);
|
|
7276
7309
|
const subscriptions = this.db
|
|
7277
7310
|
.prepare("SELECT id FROM push_subscription WHERE approver = ? AND retired_at IS NULL")
|
|
7278
7311
|
.all(approver)
|
package/dist/tailnet.js
CHANGED
|
@@ -36,3 +36,45 @@ export async function readTailnetNames(runner = run, platform = process.platform
|
|
|
36
36
|
}
|
|
37
37
|
return [];
|
|
38
38
|
}
|
|
39
|
+
export function tailnetIpv4Of(statusJson) {
|
|
40
|
+
let status;
|
|
41
|
+
try {
|
|
42
|
+
status = JSON.parse(statusJson);
|
|
43
|
+
}
|
|
44
|
+
catch {
|
|
45
|
+
return null;
|
|
46
|
+
}
|
|
47
|
+
if (typeof status !== "object" || status === null)
|
|
48
|
+
return null;
|
|
49
|
+
const body = status;
|
|
50
|
+
if (body.BackendState !== "Running" || !Array.isArray(body.Self?.TailscaleIPs))
|
|
51
|
+
return null;
|
|
52
|
+
for (const ip of body.Self.TailscaleIPs) {
|
|
53
|
+
if (typeof ip !== "string")
|
|
54
|
+
continue;
|
|
55
|
+
const m = /^100\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/.exec(ip);
|
|
56
|
+
if (m !== null && Number(m[1]) >= 64 && Number(m[1]) <= 127 && Number(m[2]) <= 255 && Number(m[3]) <= 255)
|
|
57
|
+
return ip;
|
|
58
|
+
}
|
|
59
|
+
return null;
|
|
60
|
+
}
|
|
61
|
+
export async function readTailnetIpv4(runner = run, platform = process.platform) {
|
|
62
|
+
return (await readTailnetStatus(runner, platform)).ipv4;
|
|
63
|
+
}
|
|
64
|
+
export async function readTailnetStatus(runner = run, platform = process.platform) {
|
|
65
|
+
const candidates = ["tailscale", ...(platform === "darwin" && existsSync(MAC_APP_CLI) ? [MAC_APP_CLI] : [])];
|
|
66
|
+
let found = false;
|
|
67
|
+
for (const file of candidates) {
|
|
68
|
+
try {
|
|
69
|
+
const answer = await runner(file, ["status", "--json"], { timeoutMs: 3_000 });
|
|
70
|
+
if (answer.notFound === true)
|
|
71
|
+
continue;
|
|
72
|
+
found = true;
|
|
73
|
+
if (answer.code === 0)
|
|
74
|
+
return { found, ipv4: tailnetIpv4Of(answer.stdout) };
|
|
75
|
+
}
|
|
76
|
+
catch {
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
return { found, ipv4: null };
|
|
80
|
+
}
|
package/dist/toolroll-update.js
CHANGED
|
@@ -329,6 +329,8 @@ const HISTORY_RULES = {
|
|
|
329
329
|
...Object.fromEntries(Object.entries(V117_RENAMED_TABLES).map(([old, now]) => [old, { moved: { into: now, where: "1" } }])),
|
|
330
330
|
...Object.fromEntries(V117_RENAMED_COLUMNS.filter(([table]) => !Object.values(V117_RENAMED_TABLES).includes(table)).map(([table, from, to]) => [table, { renamed: { [from]: to } }])),
|
|
331
331
|
...Object.fromEntries(Object.entries(V118_MERGED_TABLES).map(([table, kind]) => [table, { moved: { into: "credential", where: `kind = '${kind}'` } }])),
|
|
332
|
+
companion_push_token: { retired: true }, companion_idempotency: { retired: true },
|
|
333
|
+
companion_host_keys: { discarded: ["relay_url"] }, companion_paired_device: { discarded: ["next_device_psk", "psk_version"] },
|
|
332
334
|
...Object.fromEntries(Object.entries(addedColumns(V119_ADDED_COLUMNS, V120_ADDED_COLUMNS, V121_ADDED_COLUMNS, V122_ADDED_COLUMNS, V123_ADDED_COLUMNS, V125_ADDED_COLUMNS, V126_ADDED_COLUMNS, V128_ADDED_COLUMNS, V129_ADDED_COLUMNS, V134_ADDED_COLUMNS, V135_ADDED_COLUMNS, V138_ADDED_COLUMNS, V143_ADDED_COLUMNS, V147_ADDED_COLUMNS, V148_ADDED_COLUMNS, V150_ADDED_COLUMNS, V151_ADDED_COLUMNS, V152_ADDED_COLUMNS, V153_ADDED_COLUMNS, V158_ADDED_COLUMNS, V159_ADDED_COLUMNS, V169_ADDED_COLUMNS, V170_ADDED_COLUMNS, V172_ADDED_COLUMNS, V173_ADDED_COLUMNS))
|
|
333
335
|
.map(([table, rule]) => [table, { ...EARLIER_RULES[table], ...rule }])),
|
|
334
336
|
};
|
|
@@ -468,7 +470,7 @@ export function changedHistory(db, before) {
|
|
|
468
470
|
return move === undefined || t.moved === undefined || arrived(db, move) - t.moved.found !== t.moved.rows;
|
|
469
471
|
}
|
|
470
472
|
const rule = HISTORY_RULES[t.name], present = new Set(tableColumns(db, t.name));
|
|
471
|
-
const kept = (c) => present.has(c) || (rule?.renamed?.[c] !== undefined && present.has(rule.renamed[c]));
|
|
473
|
+
const kept = (c) => present.has(c) || (rule?.renamed?.[c] !== undefined && present.has(rule.renamed[c])) || rule?.discarded?.includes(c) === true;
|
|
472
474
|
if (t.columns.some(c => !kept(c) && (!rule?.dropped?.includes(c) || (t.nonNull?.[c] !== 0 && !accounted(rule, t)))))
|
|
473
475
|
return true;
|
|
474
476
|
const columns = t.columns.filter(c => present.has(c));
|
package/dist/youiyoux-intake.js
CHANGED
|
@@ -159,6 +159,8 @@ function readRequests(dir, taken) {
|
|
|
159
159
|
}
|
|
160
160
|
if (parsed.value.kind === "comment" || parsed.value.status !== "open")
|
|
161
161
|
continue;
|
|
162
|
+
if (canvasDraft(raw))
|
|
163
|
+
continue;
|
|
162
164
|
const options = optionsProblem(parsed.value);
|
|
163
165
|
if (options !== null) {
|
|
164
166
|
out.invalid.push(`${name}: ${options}`);
|
|
@@ -170,6 +172,12 @@ function readRequests(dir, taken) {
|
|
|
170
172
|
}
|
|
171
173
|
return out;
|
|
172
174
|
}
|
|
175
|
+
function canvasDraft(raw) {
|
|
176
|
+
if (typeof raw !== "object" || raw === null)
|
|
177
|
+
return false;
|
|
178
|
+
const canvas = raw.canvas;
|
|
179
|
+
return typeof canvas === "object" && canvas !== null && canvas.isDraft === true;
|
|
180
|
+
}
|
|
173
181
|
function line(text, max) {
|
|
174
182
|
const clean = text.replace(/[\p{Cc}\p{Cf}\u2028\u2029]+/gu, " ").replace(/\s+/g, " ").trim();
|
|
175
183
|
return clean.length > max ? `${clean.slice(0, max - 1).trimEnd()}…` : clean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "toolroll",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.129",
|
|
4
4
|
"description": "Your agents build. You decide. A control plane for coding agents — Claude Code, Codex, Gemini: approve the exact scope once, get results back Ready with the diff, the passing check and screenshots. Runs on your machine.",
|
|
5
5
|
"directories": {
|
|
6
6
|
"doc": "docs"
|
|
@@ -35,7 +35,12 @@
|
|
|
35
35
|
"e2e:app": "npm run build && node scripts/app-e2e.mjs",
|
|
36
36
|
"e2e:app:parallel": "npm run build && node scripts/e2e-parallel.mjs scripts/app-e2e.mjs",
|
|
37
37
|
"e2e": "npm run build && node scripts/flows-e2e.mjs && node scripts/app-e2e.mjs",
|
|
38
|
-
"e2e:click-paths": "npm run build && node scripts/click-paths-journey.mjs"
|
|
38
|
+
"e2e:click-paths": "npm run build && node scripts/click-paths-journey.mjs",
|
|
39
|
+
"relay:install": "npm ci --prefix relay/cloudflare --no-audit --no-fund",
|
|
40
|
+
"relay:typecheck": "tsc -p relay/cloudflare/tsconfig.json && tsc -p relay/reference/tsconfig.json",
|
|
41
|
+
"relay:test": "vitest run --config relay/vitest.config.ts",
|
|
42
|
+
"relay:smoke": "tsx relay/cloudflare/scripts/smoke.ts",
|
|
43
|
+
"relay:deploy": "node relay/cloudflare/scripts/deploy.mjs"
|
|
39
44
|
},
|
|
40
45
|
"repository": {
|
|
41
46
|
"type": "git",
|