toolroll 0.9.107 → 0.9.109
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 +54 -0
- package/README.md +4 -3
- package/dist/advanced-view.js +0 -1
- package/dist/agent-fence.js +35 -4
- package/dist/agent-state.js +5 -2
- package/dist/assignment-ui.js +5 -5
- package/dist/assignment.js +5 -2
- package/dist/browser/terminal.js +1 -1
- package/dist/browser/workspace.css +1 -1
- package/dist/browser/workspace.js +38 -33
- package/dist/browser-crew.js +4 -4
- package/dist/browser-shell.js +1 -1
- package/dist/browser-workspace.js +4 -11
- package/dist/builder.js +9 -1
- package/dist/chat-controls.js +6 -5
- package/dist/chat-decide.js +1 -1
- package/dist/chat-quiet.js +3 -3
- package/dist/chat-voice.js +2 -2
- package/dist/cli-help.js +17 -13
- package/dist/cli.js +4 -3
- package/dist/console-chrome.js +10 -3
- package/dist/contracts/cli.js +2 -0
- package/dist/contracts/console-api.js +5 -4
- package/dist/contracts/handoff.js +4 -0
- package/dist/decision.js +17 -0
- package/dist/demo-chat.js +1 -1
- package/dist/demo.js +6 -0
- package/dist/design/kit.js +4 -3
- package/dist/dispatch.js +3 -8
- package/dist/flexible-available.js +1 -0
- package/dist/flexible-schema.js +32 -0
- package/dist/flexible-thread-schema.js +30 -0
- package/dist/flexible-thread.js +526 -0
- package/dist/flexible-ui.js +44 -0
- package/dist/flexible.js +359 -0
- package/dist/folder-look.js +65 -4
- package/dist/git-views.js +38 -38
- package/dist/guides.js +14 -11
- package/dist/keymap.js +1 -1
- package/dist/lead-cli.js +2 -1
- package/dist/lead-context.js +1 -1
- package/dist/limits-ui.js +1 -1
- package/dist/live-bus.js +82 -12
- package/dist/login-secrets.js +43 -0
- package/dist/needs-you.js +3 -3
- package/dist/nightly-github.js +2 -2
- package/dist/operate.js +278 -21
- package/dist/project-admission.js +60 -29
- package/dist/project-delete-ui.js +2 -1
- package/dist/project-delete.js +1 -0
- package/dist/project.js +73 -0
- package/dist/provider-auth.js +1 -1
- package/dist/release.js +1 -0
- package/dist/repos.js +37 -0
- package/dist/result-actions.js +3 -0
- package/dist/result-evidence-readers.js +8 -2
- package/dist/result-review.js +20 -9
- package/dist/route-hooks.js +1 -0
- package/dist/sample-project.js +167 -9
- package/dist/scope.js +17 -2
- package/dist/serve.js +47 -32
- package/dist/server/chat.js +9 -9
- package/dist/server/chrome.js +16 -16
- package/dist/server/guards.js +10 -4
- package/dist/server/home.js +37 -5
- package/dist/server/http.js +4 -2
- package/dist/server/in-place.js +5 -4
- package/dist/server/kit.js +2 -2
- package/dist/server/live.js +103 -10
- package/dist/server/login-help.js +67 -0
- package/dist/server/pages.js +258 -78
- package/dist/server/people-tokens.js +36 -24
- package/dist/server/render-chat.js +1 -1
- package/dist/server/render-history.js +18 -4
- package/dist/server/render-new-task.js +2 -2
- package/dist/server/render-pages.js +21 -39
- package/dist/server/render-people.js +16 -4
- package/dist/server/render-projects.js +63 -15
- package/dist/server/render-results.js +26 -10
- package/dist/server/render-tasks.js +26 -17
- package/dist/server/retired-routes.js +37 -4
- package/dist/server/route-policy.js +8 -0
- package/dist/server/route-table.js +15 -5
- package/dist/server/settings-computers.js +140 -0
- package/dist/server/settings-scripts.js +15 -0
- package/dist/server/settings-section-table.js +56 -0
- package/dist/server/settings-sections.js +258 -0
- package/dist/server/settings.js +167 -19
- package/dist/server/task-views.js +47 -13
- package/dist/server/tasks.js +143 -90
- package/dist/server/welcome.js +35 -23
- package/dist/settings-groups-ui.js +34 -106
- package/dist/settings-proofs.js +5 -2
- package/dist/sqlite-telemetry.js +70 -21
- package/dist/store.js +141 -9
- package/dist/surface.js +4 -1
- package/dist/task-link.js +64 -0
- package/dist/task-outcome-cli.js +99 -4
- package/dist/tui-source.js +11 -3
- package/dist/tui.js +39 -39
- package/dist/typed-words-schema.js +18 -0
- package/dist/welcome-facts.js +15 -7
- package/dist/work-index.js +126 -29
- package/dist/work-reads.js +279 -0
- package/package.json +4 -2
package/dist/lead-context.js
CHANGED
|
@@ -174,6 +174,6 @@ export function leadBriefHtml(brief) {
|
|
|
174
174
|
};
|
|
175
175
|
return [html `<section><h3>${group.title}</h3><ul>${entries.map(one => html `<li><a href="/chat?task=${encodeURIComponent(one.rootId)}">${one.title}</a>${stateChip(one.state, one.detail)}${quiet ? '' : html `<span class="lead-brief-detail">${publicChatText(one.detail || one.outcome || '', 160)}</span>`}${one.state === 'needs-decision' && one.nextAction !== null && one.nextHref ? html `<a class="lead-brief-act button-link" href="${one.nextHref}" data-catch-up-action>${one.nextAction.label}</a>` : ''}</li>`)}</ul></section>`];
|
|
176
176
|
});
|
|
177
|
-
return html `<section class="lead-brief" aria-label="Project catch-up"><h2>Catch up</h2>${sections.length ? sections : html `<p class="meta">Nothing needs you right now.</p>`}${brief.assignments.length > 3 || brief.omissions.candidateScanLimited || brief.omissions.assignments > 0 ? html `<a href="/
|
|
177
|
+
return html `<section class="lead-brief" aria-label="Project catch-up"><h2>Catch up</h2>${sections.length ? sections : html `<p class="meta">Nothing needs you right now.</p>`}${brief.assignments.length > 3 || brief.omissions.candidateScanLimited || brief.omissions.assignments > 0 ? html `<a href="/">See all tasks</a>` : ''}</section>`;
|
|
178
178
|
}
|
|
179
179
|
export const LEAD_CONTEXT_CSS = '.lead-subagent-list{list-style:none;margin:0 0 .5rem;padding:0}.lead-subagent-list li{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:.75rem;align-items:center;border-bottom:1px solid var(--border);min-width:0}.lead-subagent-list li:last-child{border-bottom:0}.lead-subagent-list a{display:flex;min-height:44px;align-items:center;font-weight:500;overflow-wrap:anywhere;min-width:0}.lead-subagent-list .meta{text-align:right;overflow-wrap:anywhere}@media(max-width:600px){.lead-subagent-list li{grid-template-columns:minmax(0,1fr)}.lead-subagent-list .meta{text-align:left;padding-bottom:.4rem}}.lead-subagents .button-link{min-height:44px;display:inline-flex;align-items:center}.lead-promise-list{list-style:none;margin:0;padding:0}.lead-promise-list li{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:.75rem;align-items:center;padding:.5rem 0;border-bottom:1px solid var(--border);min-width:0}.lead-promise-list li:last-child{border-bottom:0}.lead-promise-list p{margin:0;overflow-wrap:anywhere}.lead-promise-list form{grid-column:2;grid-row:1/span 2;margin:0}.lead-promise-list button{min-height:44px;width:auto;white-space:nowrap}.lead-promise-list .nowrap{white-space:nowrap}.lead-brief{margin:1rem 0;min-width:0}.lead-brief h2{font-size:1.1rem;margin:0 0 .8rem}.repository-context input[name=q]{display:block;box-sizing:border-box;min-height:44px;width:100%;margin:.4rem 0 .75rem;padding:.6rem .75rem;border:1px solid var(--border);border-radius:8px;background:var(--surface);color:inherit;font:inherit}.repository-context form{margin:.5rem 0 1rem}.repository-context summary{min-height:44px;padding:.75rem 0;overflow-wrap:anywhere}.lead-brief h3{font-size:.85rem;margin:1rem 0 .4rem;color:var(--muted-foreground)}.lead-brief ul{list-style:none;margin:0;padding:0}.lead-brief li{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:.75rem;align-items:center;padding:.35rem 0;border-bottom:1px solid var(--border);min-width:0}.lead-brief li a{display:flex;min-height:44px;align-items:center;font-weight:500;overflow-wrap:anywhere;text-decoration:none}.lead-brief li a:hover{text-decoration:underline}.lead-brief-state{font-size:.75rem;font-weight:600;padding:.15rem .5rem;border-radius:.375rem;background:var(--so-neutral-soft);color:var(--so-neutral-ink);white-space:nowrap}.lead-brief-state--needs-decision,.lead-brief-state--ready-to-check{background:var(--so-attention-soft);color:var(--so-attention)}.lead-brief-state--working,.lead-brief-state--checking{background:var(--so-info-soft);color:var(--so-info)}.lead-brief-state--complete{background:var(--so-success-soft);color:var(--so-success)}.lead-brief li a.lead-brief-act{grid-column:1/-1;justify-self:start;display:inline-flex;min-height:40px;margin:.15rem 0 .4rem;font-weight:600}@media(max-width:760px){.lead-brief li a.lead-brief-act{justify-self:stretch;justify-content:center;min-height:44px}}.lead-brief-detail{grid-column:1/-1;font-size:.85rem;color:var(--muted-foreground);overflow-wrap:anywhere;padding-bottom:.35rem}@media(max-width:760px){.lead-brief{margin:.5rem 0}.lead-brief h2{margin:0 0 .25rem}.lead-brief h3{margin:.5rem 0 0}.lead-brief li{padding:0 0 .375rem}.lead-brief-detail{margin-top:-.375rem;padding-bottom:0;line-height:1.35;pointer-events:none}}';
|
package/dist/limits-ui.js
CHANGED
|
@@ -59,7 +59,7 @@ export function usageChipOf(windows, now) {
|
|
|
59
59
|
const stale = old || now.getTime() - Date.parse(top.observedAt) > 30 * 60_000;
|
|
60
60
|
const reset = old ? "window reset" : top.resetsAt === null || top.windowMinutes === null ? "resets: unknown" : `resets ${shortReset(top.resetsAt, now)}`;
|
|
61
61
|
const text = `${PROVIDER_NAMES[top.provider] ?? top.provider} ${windowLabel(top.window, top.windowMinutes)} · ${Math.round(top.usedPercent)}% · ${reset}${stale ? ` · as of ${ago(top.observedAt, now)}` : ""}`;
|
|
62
|
-
return { text, tone: old ? "neutral" : toneOf(top.usedPercent, top.reached), stale, href: "/
|
|
62
|
+
return { text, tone: old ? "neutral" : toneOf(top.usedPercent, top.reached), stale, href: "/", title: `What the providers last reported: ${text}` };
|
|
63
63
|
}
|
|
64
64
|
export function limitsHtml(limits) {
|
|
65
65
|
if (limits === null)
|
package/dist/live-bus.js
CHANGED
|
@@ -99,6 +99,9 @@ export function followWorkspace(store, current, bus, options = {}) {
|
|
|
99
99
|
},
|
|
100
100
|
};
|
|
101
101
|
}
|
|
102
|
+
export function liveOrderAfter(previous) {
|
|
103
|
+
return Math.max(previous + 1, Date.now() * 1_000);
|
|
104
|
+
}
|
|
102
105
|
export const SAFETY_NET_MS = 30_000;
|
|
103
106
|
export const KEEP_ALIVE_MS = 15_000;
|
|
104
107
|
export const STREAM_LIMIT_BYTES = 32 * 1024;
|
|
@@ -141,6 +144,9 @@ export class LiveStream {
|
|
|
141
144
|
keepAlive() {
|
|
142
145
|
this.write(": keep-alive\n\n");
|
|
143
146
|
}
|
|
147
|
+
tick() {
|
|
148
|
+
this.write("event: tick\ndata: {}\n\n");
|
|
149
|
+
}
|
|
144
150
|
}
|
|
145
151
|
export class LiveConnection {
|
|
146
152
|
response;
|
|
@@ -150,25 +156,79 @@ export class LiveConnection {
|
|
|
150
156
|
timer;
|
|
151
157
|
closed = false;
|
|
152
158
|
refusing = false;
|
|
159
|
+
frames;
|
|
160
|
+
ends = new Set();
|
|
161
|
+
conn;
|
|
162
|
+
syncHolds = 0;
|
|
163
|
+
syncWanted = false;
|
|
164
|
+
syncSent = false;
|
|
153
165
|
constructor(response, options = {}) {
|
|
154
166
|
this.response = response;
|
|
167
|
+
this.frames = options.frames === true;
|
|
168
|
+
this.conn = this.frames ? options.conn ?? null : null;
|
|
155
169
|
this.stream = new LiveStream(response, options.limitBytes, () => this.close());
|
|
156
170
|
this.timer = setInterval(() => this.keepAlive(), options.keepAliveMs ?? KEEP_ALIVE_MS);
|
|
157
171
|
this.timer.unref();
|
|
158
172
|
response.once("close", () => this.close());
|
|
159
173
|
}
|
|
160
|
-
|
|
174
|
+
prove() {
|
|
161
175
|
for (const prove of [...this.proofs]) {
|
|
162
176
|
if (!this.open)
|
|
163
|
-
return;
|
|
177
|
+
return false;
|
|
164
178
|
prove();
|
|
165
179
|
}
|
|
166
|
-
|
|
180
|
+
return this.open;
|
|
181
|
+
}
|
|
182
|
+
keepAlive() {
|
|
183
|
+
if (!this.prove())
|
|
184
|
+
return;
|
|
185
|
+
if (this.frames)
|
|
186
|
+
this.stream.tick();
|
|
187
|
+
else
|
|
167
188
|
this.stream.keepAlive();
|
|
168
189
|
}
|
|
190
|
+
hello(data) {
|
|
191
|
+
if (this.frames && this.open)
|
|
192
|
+
this.stream.send("hello", this.conn === null ? data : { ...data, conn: this.conn });
|
|
193
|
+
}
|
|
194
|
+
synced() {
|
|
195
|
+
if (!this.frames || this.syncWanted)
|
|
196
|
+
return;
|
|
197
|
+
this.syncWanted = true;
|
|
198
|
+
this.flushSynced();
|
|
199
|
+
}
|
|
200
|
+
holdSynced() {
|
|
201
|
+
if (!this.frames || this.syncSent)
|
|
202
|
+
return () => { };
|
|
203
|
+
this.syncHolds += 1;
|
|
204
|
+
let released = false;
|
|
205
|
+
return () => {
|
|
206
|
+
if (released)
|
|
207
|
+
return;
|
|
208
|
+
released = true;
|
|
209
|
+
this.syncHolds = Math.max(0, this.syncHolds - 1);
|
|
210
|
+
this.flushSynced();
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
flushSynced() {
|
|
214
|
+
if (!this.syncWanted || this.syncSent || this.syncHolds > 0)
|
|
215
|
+
return;
|
|
216
|
+
this.syncSent = true;
|
|
217
|
+
if (this.open)
|
|
218
|
+
this.stream.send("synced", {});
|
|
219
|
+
}
|
|
220
|
+
pong(n) {
|
|
221
|
+
if (!this.frames || !this.prove())
|
|
222
|
+
return false;
|
|
223
|
+
this.stream.send("pong", { n });
|
|
224
|
+
return this.open;
|
|
225
|
+
}
|
|
226
|
+
onEnd(run) { this.ends.add(run); }
|
|
169
227
|
onKeepAlive(prove) { this.proofs.add(prove); return () => { this.proofs.delete(prove); }; }
|
|
170
228
|
get open() { return !this.closed && this.stream.open; }
|
|
171
|
-
send(room, event, data = {}
|
|
229
|
+
send(room, event, data = {}, order) {
|
|
230
|
+
this.stream.send(event, this.frames ? { room, ...data, seq: order ?? liveOrderAfter(0) } : { room, ...data });
|
|
231
|
+
}
|
|
172
232
|
refuse(leave) {
|
|
173
233
|
const outer = this.refusing;
|
|
174
234
|
this.refusing = true;
|
|
@@ -189,6 +249,13 @@ export class LiveConnection {
|
|
|
189
249
|
leave();
|
|
190
250
|
this.leaves.clear();
|
|
191
251
|
this.proofs.clear();
|
|
252
|
+
for (const end of [...this.ends]) {
|
|
253
|
+
try {
|
|
254
|
+
end();
|
|
255
|
+
}
|
|
256
|
+
catch { }
|
|
257
|
+
}
|
|
258
|
+
this.ends.clear();
|
|
192
259
|
if (this.refusing && this.stream.open) {
|
|
193
260
|
this.response.end("event: ended\ndata: {}\n\n");
|
|
194
261
|
return;
|
|
@@ -213,8 +280,9 @@ export function createLiveRooms(fingerprint, presence, options = {}) {
|
|
|
213
280
|
clearTimeout(room.settling);
|
|
214
281
|
room.settling = setTimeout(() => {
|
|
215
282
|
room.settling = null;
|
|
283
|
+
const order = room.order = liveOrderAfter(room.order);
|
|
216
284
|
for (const viewer of [...room.viewers.keys()])
|
|
217
|
-
deliver(key, room, viewer, "here", { people: presence([...room.viewers.keys()], viewer.name) });
|
|
285
|
+
deliver(key, room, viewer, "here", { people: presence([...room.viewers.keys()], viewer.name) }, order);
|
|
218
286
|
}, PRESENCE_SETTLE_MS);
|
|
219
287
|
room.settling.unref();
|
|
220
288
|
};
|
|
@@ -247,7 +315,7 @@ export function createLiveRooms(fingerprint, presence, options = {}) {
|
|
|
247
315
|
unsubscribe = null;
|
|
248
316
|
}
|
|
249
317
|
};
|
|
250
|
-
const deliver = (key, room, viewer, event, data = {}) => {
|
|
318
|
+
const deliver = (key, room, viewer, event, data = {}, order) => {
|
|
251
319
|
if (rooms.get(key) !== room || !room.viewers.has(viewer))
|
|
252
320
|
return false;
|
|
253
321
|
if (!viewer.connection.open) {
|
|
@@ -272,7 +340,7 @@ export function createLiveRooms(fingerprint, presence, options = {}) {
|
|
|
272
340
|
return false;
|
|
273
341
|
}
|
|
274
342
|
if (event !== undefined)
|
|
275
|
-
viewer.connection.send(viewer.room, event, data);
|
|
343
|
+
viewer.connection.send(viewer.room, event, data, order);
|
|
276
344
|
return viewer.connection.open && room.viewers.has(viewer);
|
|
277
345
|
};
|
|
278
346
|
const refresh = (key, room, revision) => {
|
|
@@ -300,6 +368,7 @@ export function createLiveRooms(fingerprint, presence, options = {}) {
|
|
|
300
368
|
if (now === room.last)
|
|
301
369
|
return;
|
|
302
370
|
room.last = now;
|
|
371
|
+
room.lastOrder = room.order = liveOrderAfter(room.order);
|
|
303
372
|
room.revision = revision ?? bus?.revision() ?? null;
|
|
304
373
|
if (room.holding !== null)
|
|
305
374
|
return;
|
|
@@ -315,7 +384,7 @@ export function createLiveRooms(fingerprint, presence, options = {}) {
|
|
|
315
384
|
const say = (key, room) => {
|
|
316
385
|
room.saidAt = Date.now();
|
|
317
386
|
for (const viewer of [...room.viewers.keys()])
|
|
318
|
-
deliver(key, room, viewer, "change", { at: room.last, revision: room.revision });
|
|
387
|
+
deliver(key, room, viewer, "change", { at: room.last, revision: room.revision }, room.lastOrder || undefined);
|
|
319
388
|
};
|
|
320
389
|
const heard = (change) => {
|
|
321
390
|
for (const [key, room] of [...rooms]) {
|
|
@@ -336,12 +405,13 @@ export function createLiveRooms(fingerprint, presence, options = {}) {
|
|
|
336
405
|
join(key, viewer) {
|
|
337
406
|
let room = rooms.get(key);
|
|
338
407
|
if (room === undefined) {
|
|
339
|
-
let last = null;
|
|
408
|
+
let last = null, lastOrder = 0;
|
|
340
409
|
try {
|
|
341
410
|
last = fingerprint(key);
|
|
411
|
+
lastOrder = liveOrderAfter(0);
|
|
342
412
|
}
|
|
343
413
|
catch { }
|
|
344
|
-
const created = { viewers: new Map(), last, timer: setInterval(() => refresh(key, created, null), safetyNetMs), settling: null, retry: null, saidAt: 0, holding: null, revision: null, reading: null };
|
|
414
|
+
const created = { viewers: new Map(), last, timer: setInterval(() => refresh(key, created, null), safetyNetMs), settling: null, retry: null, saidAt: 0, holding: null, revision: null, reading: null, lastOrder, order: lastOrder };
|
|
345
415
|
created.timer.unref();
|
|
346
416
|
room = created;
|
|
347
417
|
rooms.set(key, room);
|
|
@@ -352,9 +422,9 @@ export function createLiveRooms(fingerprint, presence, options = {}) {
|
|
|
352
422
|
const forget = viewer.connection.onClose(() => leave(key, viewer));
|
|
353
423
|
const unprove = viewer.connection.onKeepAlive(() => { deliver(key, joined, viewer); });
|
|
354
424
|
room.viewers.set(viewer, () => { forget(); unprove(); });
|
|
355
|
-
if (!deliver(key, room, viewer, "change", { at: room.last, revision: bus?.revision() ?? null }) || presence === null)
|
|
425
|
+
if (!deliver(key, room, viewer, "change", { at: room.last, revision: bus?.revision() ?? null }, room.lastOrder || undefined) || presence === null)
|
|
356
426
|
return;
|
|
357
|
-
if (deliver(key, room, viewer, "here", { people: presence([...room.viewers.keys()], viewer.name) }))
|
|
427
|
+
if (deliver(key, room, viewer, "here", { people: presence([...room.viewers.keys()], viewer.name) }, room.order = liveOrderAfter(room.order)))
|
|
358
428
|
announce(key, room);
|
|
359
429
|
},
|
|
360
430
|
close() {
|
package/dist/login-secrets.js
CHANGED
|
@@ -157,3 +157,46 @@ export function migrateLegacyLogin(stateDir) {
|
|
|
157
157
|
removeOld();
|
|
158
158
|
return { kind: "moved", from, to };
|
|
159
159
|
}
|
|
160
|
+
export function removeStaleSavedLogin(stateDir, account, current, beforeRemove) {
|
|
161
|
+
const done = { removed: [], stale: [], unchecked: [] };
|
|
162
|
+
const uid = process.getuid?.();
|
|
163
|
+
const proved = (parts) => {
|
|
164
|
+
for (let index = 1; index <= parts.length; index += 1) {
|
|
165
|
+
let held;
|
|
166
|
+
try {
|
|
167
|
+
held = lstatSync(join(stateDir, ...parts.slice(0, index)));
|
|
168
|
+
}
|
|
169
|
+
catch {
|
|
170
|
+
return "absent";
|
|
171
|
+
}
|
|
172
|
+
const last = index === parts.length;
|
|
173
|
+
if (held.isSymbolicLink() || (uid !== undefined && held.uid !== uid))
|
|
174
|
+
return "doubtful";
|
|
175
|
+
if (last ? !held.isFile() || held.nlink !== 1 : !held.isDirectory())
|
|
176
|
+
return "doubtful";
|
|
177
|
+
}
|
|
178
|
+
return "contained";
|
|
179
|
+
};
|
|
180
|
+
for (const parts of [[SECRETS_DIR, LOGIN_FILE_NAME], [LOGIN_FILE_NAME]]) {
|
|
181
|
+
const path = join(stateDir, ...parts);
|
|
182
|
+
const first = proved(parts);
|
|
183
|
+
if (first === "absent")
|
|
184
|
+
continue;
|
|
185
|
+
if (first === "doubtful") {
|
|
186
|
+
done.unchecked.push(path);
|
|
187
|
+
continue;
|
|
188
|
+
}
|
|
189
|
+
const held = ownRegularBytes(path, LOGIN_LIMIT);
|
|
190
|
+
if (held === null) {
|
|
191
|
+
done.unchecked.push(path);
|
|
192
|
+
continue;
|
|
193
|
+
}
|
|
194
|
+
const raw = held.bytes.toString("utf8").trim();
|
|
195
|
+
const cut = raw.indexOf(" ");
|
|
196
|
+
if (cut <= 0 || raw.slice(0, cut) !== account || raw.slice(cut + 1) === current)
|
|
197
|
+
continue;
|
|
198
|
+
beforeRemove?.(path);
|
|
199
|
+
done.stale.push(path);
|
|
200
|
+
}
|
|
201
|
+
return done;
|
|
202
|
+
}
|
package/dist/needs-you.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export const STORAGE_HOLD_PREFIX = "protected-storage — ";
|
|
2
|
-
export const START_BUILDER_HREF = "/start
|
|
3
|
-
export const startBuilderHref = (taskId) => taskId === null ? START_BUILDER_HREF :
|
|
2
|
+
export const START_BUILDER_HREF = "/settings/computers?section=start";
|
|
3
|
+
export const startBuilderHref = (taskId) => taskId === null ? START_BUILDER_HREF : `/settings/computers?task=${encodeURIComponent(taskId)}§ion=start`;
|
|
4
4
|
export const START_BUILDER_COMMAND = "toolroll up";
|
|
5
5
|
const always = () => true;
|
|
6
6
|
const build = (context) => context.build == null ? "the last build" : `build #${context.build}`;
|
|
@@ -14,7 +14,7 @@ export const NEEDS = {
|
|
|
14
14
|
"stop-unproven": { sentence: context => `Toolroll can't prove ${build(context)} stopped from this computer, so the work is held. Close anything of yours that is using its folder, then check again.`, action: { code: "recheck-stopped", label: "Check again" } },
|
|
15
15
|
hold: { sentence: () => "A hold is keeping this task from starting. Review it to release it.", action: { code: "inspect-hold", label: "Review hold" } },
|
|
16
16
|
storage: { sentence: () => "Toolroll couldn't finish checking other apps' data before starting. Allow it in Privacy & Security, then try again.", action: { code: "unhold", label: "Try again" }, useReason: always },
|
|
17
|
-
"choose-project": { sentence: () => "Choose a project so
|
|
17
|
+
"choose-project": { sentence: () => "Choose a project so it can start.", action: { code: "place-task", label: "Choose a project" } },
|
|
18
18
|
"define-task": { sentence: () => "Say what the task should do so it can be planned.", action: { code: "write-scope", label: "Define the task" } },
|
|
19
19
|
"fix-request": { sentence: () => "The request can't be planned as written. Edit it so the planner can start.", action: { code: "write-scope", label: "Edit the request" },
|
|
20
20
|
useReason: reason => /the planner can carry at most/.test(reason) },
|
package/dist/nightly-github.js
CHANGED
|
@@ -796,7 +796,7 @@ export function nightlyNeedsYou(store, shown) {
|
|
|
796
796
|
for (const failure of openFailures(store, repo)) {
|
|
797
797
|
needs.push({ key: `github-nightly-${failure.id}`, repo, title: `Nightly checks failed: ${laneName(store, repo, failure.laneId)}`,
|
|
798
798
|
reason: `On main at ${failure.sha.slice(0, 7)}. Releases wait until it passes again.`,
|
|
799
|
-
href: slug === null ? "
|
|
799
|
+
href: slug === null ? "/?view=board" : `https://github.com/${slug}/actions/runs/${failure.ghRun}/job/${failure.jobId}`, since: failure.openedAt });
|
|
800
800
|
}
|
|
801
801
|
}
|
|
802
802
|
const rows = store.handle.prepare("SELECT repo, run, sha, MIN(opened_at) AS since, COUNT(*) AS n FROM main_check_failure WHERE cleared_at IS NULL GROUP BY repo, run, sha ORDER BY since").all();
|
|
@@ -809,7 +809,7 @@ export function nightlyNeedsYou(store, shown) {
|
|
|
809
809
|
const items = store.handle.prepare("SELECT item FROM main_check_failure WHERE repo = ? AND run = ? AND cleared_at IS NULL ORDER BY item").all(repo, Number(row["run"])).map(one => String(one["item"]));
|
|
810
810
|
needs.push({ key: `main-check-${Number(row["run"])}`, repo, title: `Nightly check of main failed: ${failureSummary(items)}`,
|
|
811
811
|
reason: `On main at ${String(row["sha"]).slice(0, 7)}. Composed releases wait until a full check passes.`,
|
|
812
|
-
href: task === null ? "
|
|
812
|
+
href: task === null ? "/?view=board" : `/t/${encodeURIComponent(task)}`, since: String(row["since"]) });
|
|
813
813
|
}
|
|
814
814
|
return needs.sort((a, b) => a.since.localeCompare(b.since));
|
|
815
815
|
}
|