toolroll 0.9.55 → 0.9.57
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/README.md +24 -8
- package/dist/action-ledger.d.ts +2 -4
- package/dist/action-ledger.js +2 -10
- package/dist/approval-policy.d.ts +5 -5
- package/dist/approval-policy.js +4 -4
- package/dist/approval-rules-ui.js +2 -2
- package/dist/assignment-adapters.d.ts +5 -0
- package/dist/assignment.d.ts +24 -3
- package/dist/assignment.js +36 -10
- package/dist/browser/workspace.js +5 -5
- package/dist/browser-workspace.d.ts +12 -12
- package/dist/browser-workspace.js +1 -1
- package/dist/budget-alerts.js +3 -3
- package/dist/chat-actions.d.ts +23 -18
- package/dist/chat-actions.js +110 -88
- package/dist/chat-ask.d.ts +2 -2
- package/dist/chat-ask.js +5 -5
- package/dist/chat-channel.d.ts +15 -15
- package/dist/chat-channel.js +20 -20
- package/dist/chat-controls.d.ts +0 -4
- package/dist/chat-controls.js +0 -1
- package/dist/chat-core.js +1 -1
- package/dist/chat-delivery-state.js +2 -2
- package/dist/chat-delivery.d.ts +2 -2
- package/dist/chat-delivery.js +30 -37
- package/dist/chat-flow.js +3 -3
- package/dist/chat-messages.d.ts +1 -1
- package/dist/chat-messages.js +4 -4
- package/dist/chat-migration.d.ts +1 -1
- package/dist/chat-migration.js +11 -11
- package/dist/chat-rooms.js +3 -3
- package/dist/chat-voice.js +1 -1
- package/dist/chat-warmth.d.ts +2 -2
- package/dist/check-levels.d.ts +3 -0
- package/dist/check-levels.js +5 -0
- package/dist/cli.d.ts +1 -1
- package/dist/cli.js +6 -7
- package/dist/contracts/chat-actions.d.ts +32 -27
- package/dist/contracts/chat-actions.js +29 -11
- package/dist/contracts/chat-content.d.ts +1 -1
- package/dist/contracts/chat-content.js +1 -1
- package/dist/contracts/chat-tables.js +4 -4
- package/dist/contracts/console-api.d.ts +6 -6
- package/dist/contracts/console-api.js +7 -7
- package/dist/contracts/flow-propose.d.ts +3 -3
- package/dist/contracts/flow.d.ts +132 -125
- package/dist/contracts/flow.js +27 -12
- package/dist/contracts/lead-context.d.ts +1 -1
- package/dist/contracts/lead-context.js +2 -2
- package/dist/contracts/lead-tools.d.ts +20 -18
- package/dist/contracts/lead-tools.js +15 -15
- package/dist/contracts/stage-output.d.ts +1 -1
- package/dist/contracts/stage-output.js +1 -1
- package/dist/contracts/store-json.d.ts +23 -22
- package/dist/contracts/store-json.js +17 -17
- package/dist/contracts/{teammate-turn.d.ts → subagent-turn.d.ts} +5 -5
- package/dist/contracts/{teammate-turn.js → subagent-turn.js} +7 -7
- package/dist/converse.d.ts +23 -23
- package/dist/converse.js +28 -28
- package/dist/coordinator-proposals.d.ts +2 -2
- package/dist/coordinator-proposals.js +1 -1
- package/dist/coordinator.js +1 -1
- package/dist/deprecations.d.ts +12 -0
- package/dist/deprecations.js +20 -0
- package/dist/desktop-update-gate.js +8 -4
- package/dist/desktop-update.js +6 -1
- package/dist/discord-chat.js +6 -6
- package/dist/dispatch.d.ts +1 -1
- package/dist/dispatch.js +1 -1
- package/dist/dispose.js +0 -5
- package/dist/envelope.js +0 -1
- package/dist/export-ui.js +1 -1
- package/dist/export.js +7 -7
- package/dist/flow-engine.d.ts +2 -2
- package/dist/flow-engine.js +21 -21
- package/dist/flow-insights.d.ts +1 -1
- package/dist/flow-share.js +13 -8
- package/dist/flow-steps.d.ts +5 -5
- package/dist/flow-steps.js +19 -19
- package/dist/flow-triggers.d.ts +1 -1
- package/dist/flow-triggers.js +1 -1
- package/dist/flows-cli.js +1 -1
- package/dist/flows-ui.js +20 -20
- package/dist/flows.js +19 -19
- package/dist/guides.js +4 -3
- package/dist/invoke.js +1 -1
- package/dist/kits-ui.js +5 -5
- package/dist/kits.d.ts +12 -12
- package/dist/kits.js +31 -31
- package/dist/{mate-cli.d.ts → lead-cli.d.ts} +11 -11
- package/dist/{mate-cli.js → lead-cli.js} +38 -38
- package/dist/lead-commitments.js +4 -4
- package/dist/lead-context.d.ts +2 -2
- package/dist/lead-context.js +9 -9
- package/dist/{mate-contract.d.ts → lead-contract.d.ts} +3 -3
- package/dist/{mate-contract.js → lead-contract.js} +7 -6
- package/dist/{mate-doors.d.ts → lead-doors.d.ts} +6 -6
- package/dist/{mate-doors.js → lead-doors.js} +24 -24
- package/dist/lead-follow.d.ts +5 -5
- package/dist/lead-follow.js +9 -9
- package/dist/lead-people.d.ts +5 -5
- package/dist/lead-people.js +14 -14
- package/dist/{mate-progress.d.ts → lead-progress.d.ts} +9 -9
- package/dist/{mate-progress.js → lead-progress.js} +3 -3
- package/dist/lead-status.d.ts +1 -1
- package/dist/lead-status.js +2 -2
- package/dist/{mate-tools.d.ts → lead-tools.d.ts} +19 -19
- package/dist/{mate-tools.js → lead-tools.js} +109 -101
- package/dist/{mate.d.ts → lead.d.ts} +27 -27
- package/dist/{mate.js → lead.js} +102 -102
- package/dist/limits-ui.d.ts +1 -1
- package/dist/limits-ui.js +1 -1
- package/dist/mcp-connect.d.ts +1 -1
- package/dist/mcp-connect.js +3 -3
- package/dist/mcp-core.js +1 -1
- package/dist/memory-pass.d.ts +2 -2
- package/dist/memory-pass.js +7 -7
- package/dist/notification-rows.d.ts +2 -2
- package/dist/operate.d.ts +3 -3
- package/dist/operate.js +52 -42
- package/dist/policy.d.ts +1 -1
- package/dist/principal.d.ts +1 -1
- package/dist/principal.js +2 -2
- package/dist/project-delete-ui.js +1 -1
- package/dist/project-delete.d.ts +1 -1
- package/dist/project-delete.js +26 -26
- package/dist/project-memory.js +1 -1
- package/dist/project-tools.d.ts +1 -1
- package/dist/project-tools.js +1 -1
- package/dist/proof.d.ts +9 -0
- package/dist/proof.js +12 -0
- package/dist/recipe-ui.js +1 -1
- package/dist/release-coverage.d.ts +16 -0
- package/dist/release-coverage.js +92 -0
- package/dist/retention.js +4 -4
- package/dist/scope.d.ts +2 -2
- package/dist/scout-report.d.ts +1 -1
- package/dist/scout-report.js +1 -1
- package/dist/serve.js +40 -45
- package/dist/server/chat.d.ts +4 -4
- package/dist/server/chat.js +105 -103
- package/dist/server/chrome.js +3 -3
- package/dist/server/flows.js +69 -62
- package/dist/server/guards.js +3 -3
- package/dist/server/http.d.ts +3 -3
- package/dist/server/http.js +1 -1
- package/dist/server/live.js +6 -6
- package/dist/server/people-tokens.js +1 -1
- package/dist/server/remote.js +12 -10
- package/dist/server/render-chat.d.ts +30 -30
- package/dist/server/render-chat.js +33 -33
- package/dist/server/render-pages.js +2 -2
- package/dist/server/render-results.d.ts +4 -1
- package/dist/server/render-results.js +23 -9
- package/dist/server/render-settings.d.ts +7 -0
- package/dist/server/render-settings.js +3 -0
- package/dist/server/route-table.js +9 -7
- package/dist/server/runtime.d.ts +13 -13
- package/dist/server/settings.js +14 -13
- package/dist/server/tasks.js +34 -30
- package/dist/setup-guide.d.ts +2 -2
- package/dist/slack-chat.d.ts +2 -2
- package/dist/slack-chat.js +6 -6
- package/dist/spend-ui.d.ts +3 -3
- package/dist/spend-ui.js +9 -9
- package/dist/spend.d.ts +14 -14
- package/dist/spend.js +31 -31
- package/dist/store-baseline.d.ts +19 -0
- package/dist/store-baseline.js +2873 -0
- package/dist/store.d.ts +200 -254
- package/dist/store.js +830 -3152
- package/dist/subagent-admin.d.ts +53 -0
- package/dist/{teammate-admin.js → subagent-admin.js} +37 -37
- package/dist/{teammate-desk.d.ts → subagent-desk.d.ts} +22 -23
- package/dist/{teammate-desk.js → subagent-desk.js} +26 -35
- package/dist/{teammate-memory.d.ts → subagent-memory.d.ts} +17 -17
- package/dist/{teammate-memory.js → subagent-memory.js} +41 -41
- package/dist/{teammate-question.d.ts → subagent-question.d.ts} +6 -6
- package/dist/{teammate-question.js → subagent-question.js} +17 -17
- package/dist/{teammate-tools.d.ts → subagent-tools.d.ts} +18 -18
- package/dist/{teammate-tools.js → subagent-tools.js} +36 -36
- package/dist/{teammate-week.d.ts → subagent-week.d.ts} +10 -10
- package/dist/{teammate-week.js → subagent-week.js} +23 -23
- package/dist/{teammate-work.d.ts → subagent-work.d.ts} +21 -21
- package/dist/{teammate-work.js → subagent-work.js} +50 -50
- package/dist/subagents-ui.d.ts +22 -0
- package/dist/{teammates-ui.js → subagents-ui.js} +45 -45
- package/dist/{teammates.d.ts → subagents.d.ts} +11 -11
- package/dist/{teammates.js → subagents.js} +21 -21
- package/dist/subscription-chat.d.ts +13 -13
- package/dist/subscription-chat.js +19 -19
- package/dist/surface.d.ts +19 -2
- package/dist/surface.js +7 -31
- package/dist/task-outcome-cli.js +3 -1
- package/dist/task-status.d.ts +59 -7
- package/dist/task-status.js +132 -16
- package/dist/team-cli.d.ts +1 -0
- package/dist/team-cli.js +14 -2
- package/dist/team-leads.js +13 -13
- package/dist/team-runtime.d.ts +2 -2
- package/dist/team-runtime.js +9 -9
- package/dist/teams-chat.js +6 -6
- package/dist/telegram-flow.d.ts +3 -3
- package/dist/telegram-flow.js +3 -3
- package/dist/{telegram-mate.d.ts → telegram-lead.d.ts} +5 -5
- package/dist/{telegram-mate.js → telegram-lead.js} +27 -27
- package/dist/telegram-status.d.ts +11 -4
- package/dist/telegram-status.js +18 -11
- package/dist/telegram-team.d.ts +1 -1
- package/dist/telegram-team.js +5 -5
- package/dist/telegram.d.ts +1 -1
- package/dist/telegram.js +13 -34
- package/dist/text-limits.d.ts +18 -18
- package/dist/text-limits.js +18 -18
- package/dist/toolroll-update.d.ts +8 -0
- package/dist/toolroll-update.js +45 -8
- package/dist/work-index.d.ts +6 -1
- package/dist/work-index.js +50 -8
- package/dist/workspace-ui.js +2 -1
- package/package.json +1 -2
- package/dist/teammate-admin.d.ts +0 -53
- package/dist/teammates-ui.d.ts +0 -21
package/dist/work-index.js
CHANGED
|
@@ -8,8 +8,12 @@ import { join } from 'node:path';
|
|
|
8
8
|
import { readProjectAccess } from './project-access.js';
|
|
9
9
|
import { pauseOnTaskProviders, providerName, signInReason } from './provider-auth.js';
|
|
10
10
|
import { scopeTermsProblem, stopFactOf } from './store.js';
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
11
|
+
import { assignmentChecksForRun } from './assignment.js';
|
|
12
|
+
import { checkBackingOf, completionBlockersOf, leadOnIt, plainReasonOf, replacedWords, requirementsOf, stageOfCode, taskStatusOf, unverifiedWhenRefuted, workToneOf } from './task-status.js';
|
|
13
|
+
import { releaseCoverageOf } from './release-coverage.js';
|
|
14
|
+
import { buildReviewOf } from './review-switch.js';
|
|
15
|
+
import { shownVerdictOf } from './proof.js';
|
|
16
|
+
import { isCheckLevel, requiredCheckCommandFor } from './check-levels.js';
|
|
13
17
|
import { MARKER } from './worktree.js';
|
|
14
18
|
import { withFollowUps } from './result-follow-ups.js';
|
|
15
19
|
import { ASKS, NEED_ASK, NEEDS, askChipOf, failedAttemptSentence, processNeedOf, resultHoldUpSentence } from './needs-you.js';
|
|
@@ -359,6 +363,14 @@ function readCursor(value, scope) {
|
|
|
359
363
|
* Project counters share the page's admitted project/state filter.
|
|
360
364
|
* Cursors bind the admitted scope, project and view, never broaden access. */
|
|
361
365
|
export function workIndexPage(store, now, access, options = {}) {
|
|
366
|
+
return readWorkIndexPage(store, now, access, options);
|
|
367
|
+
}
|
|
368
|
+
/** An exact family lookup through the list's saved-fact projection. It remains
|
|
369
|
+
* permission-bound and bypasses pagination, never action-time verification. */
|
|
370
|
+
export function workIndexTask(store, taskId, now, access, root) {
|
|
371
|
+
return readWorkIndexPage(store, now, access, { limit: 1, ...(root === undefined ? {} : { root }) }, taskId).items[0] ?? null;
|
|
372
|
+
}
|
|
373
|
+
function readWorkIndexPage(store, now, access, options, taskId = null) {
|
|
362
374
|
const projection = registerValidators(store);
|
|
363
375
|
const custody = custodyReadings(store);
|
|
364
376
|
const view = VIEWS.includes(options.view ?? 'all') ? options.view ?? 'all' : 'all';
|
|
@@ -366,7 +378,7 @@ export function workIndexPage(store, now, access, options = {}) {
|
|
|
366
378
|
const scope = cursorScope(access, options, view), cursor = readCursor(options.cursor, scope);
|
|
367
379
|
const filter = view === 'needs-you' ? 'needs=1' : view === 'running' ? 'family_running=1' : view === 'completed' ? "code='complete'" : '1';
|
|
368
380
|
const rows = prepared(store, `${projection}, selected_page AS MATERIALIZED (
|
|
369
|
-
SELECT * FROM ranked WHERE ${filter} AND ($cursorRoot=0 OR
|
|
381
|
+
SELECT * FROM ranked WHERE ${filter} AND ($taskId IS NULL OR root_ref IN (SELECT root_ref FROM members WHERE id=$taskId)) AND ($cursorRoot=0 OR
|
|
370
382
|
${ORDER}>$cursorRank OR (${ORDER}=$cursorRank AND (sort_at<$cursorAt OR (sort_at=$cursorAt AND root_ref<$cursorRoot))))
|
|
371
383
|
ORDER BY ${ORDER},sort_at DESC,root_ref DESC LIMIT $limit
|
|
372
384
|
), page AS (SELECT p.*,COALESCE(p.result_id,(SELECT id FROM run WHERE task_ref=p.ref_id AND finished_at IS NOT NULL AND role IN ('builder','scout') ORDER BY id DESC LIMIT 1)) page_result_id FROM selected_page p), totals AS (SELECT ${TOTALS},${GROUP_TOTALS} FROM ranked), project_totals AS (
|
|
@@ -379,7 +391,7 @@ export function workIndexPage(store, now, access, options = {}) {
|
|
|
379
391
|
'state',state,'created_at',created_at,'family_updated',family_updated,'version_count',version_count,'earlier_active',earlier_active,
|
|
380
392
|
'earlier_id',earlier_id,'broken',broken,'live_run',live_run,'result_id',page_result_id,'result_outcome',(SELECT outcome FROM run WHERE id=page_result_id),'attempt_reason',(SELECT substr(reason,1,1000) FROM run WHERE task_ref IN (SELECT ref_id FROM members WHERE root_ref=page.root_ref) AND (finished_at IS NOT NULL OR outcome IS NOT NULL) AND role NOT IN ('planner','reviewer') ORDER BY id DESC LIMIT 1),
|
|
381
393
|
'publication_url',(SELECT pr_url FROM publication WHERE run=page_result_id),
|
|
382
|
-
'result_role',(SELECT role FROM run WHERE id=page_result_id),'live_role',(SELECT role FROM run WHERE id=page.live_run),
|
|
394
|
+
'result_role',(SELECT role FROM run WHERE id=page_result_id),'result_head',(SELECT head_revision FROM run WHERE id=page_result_id),'live_role',(SELECT role FROM run WHERE id=page.live_run),
|
|
383
395
|
'check_status',(SELECT status FROM run_check WHERE run=page_result_id),
|
|
384
396
|
'check_level',(SELECT outcome FROM action_ledger WHERE repo IS page.repo AND run_id=page_result_id AND action='checks used' ORDER BY id DESC LIMIT 1),
|
|
385
397
|
'check_follows',(SELECT json_group_array(q.outcome||' '||COALESCE((SELECT substr(f.outcome,instr(f.outcome,':')+1) FROM action_ledger f WHERE f.repo IS page.repo AND f.run_id=page_result_id
|
|
@@ -392,7 +404,7 @@ export function workIndexPage(store, now, access, options = {}) {
|
|
|
392
404
|
'question_run',(SELECT run FROM decision WHERE id=page.question_id),'replaced_by',(SELECT successor FROM task_replacement WHERE task_ref=page.ref_id),
|
|
393
405
|
'completed_by_lead',(SELECT lead FROM task_act WHERE task_ref=page.root_ref AND act='completed' ORDER BY id DESC LIMIT 1),
|
|
394
406
|
'question_task',(SELECT r.external_id FROM decision d JOIN run ON run.id=d.run JOIN task_ref r ON r.id=run.task_ref WHERE d.id=page.question_id)) FROM page`)
|
|
395
|
-
.all({ ...parameters(now, access, options, custody), $cursorRoot: cursor?.root ?? 0, $cursorRank: cursor?.rank ?? 0, $cursorAt: cursor?.at ?? '', $limit: limit + 1, $recent: new Date(now.getTime() - 86_400_000).toISOString() });
|
|
407
|
+
.all({ ...parameters(now, access, options, custody), $taskId: taskId, $cursorRoot: cursor?.root ?? 0, $cursorRank: cursor?.rank ?? 0, $cursorAt: cursor?.at ?? '', $limit: limit + 1, $recent: new Date(now.getTime() - 86_400_000).toISOString() });
|
|
396
408
|
const selected = rows.slice(1).map(row => JSON.parse(String(row['row_json'])));
|
|
397
409
|
const page = selected.slice(0, limit), last = page.at(-1);
|
|
398
410
|
const nextCursor = selected.length > limit && last !== undefined ? Buffer.from(JSON.stringify({ version: 2, scope,
|
|
@@ -405,7 +417,11 @@ export function workIndexPage(store, now, access, options = {}) {
|
|
|
405
417
|
};
|
|
406
418
|
// A claimed row says the viewer's own name for their lead.
|
|
407
419
|
const leadName = page.some(row => n(row, 'lead_claim') !== 0) && access.principal === 'operator' && access.viewer != null ? leadNameOf(store, access.viewer) : undefined;
|
|
408
|
-
|
|
420
|
+
// A finished result reads the same readiness the task page does (task-status.ts): its requirements, acceptance,
|
|
421
|
+
// automatic review and, with checks Off, the release check that covers it.
|
|
422
|
+
const memo = new Map();
|
|
423
|
+
const readiness = (row, checks) => resultReadinessFacts(store, now, options.root, row, checks, memo);
|
|
424
|
+
return { items: page.map(row => itemOf(row, access.principal, probe, leadName, readiness)), projects, totals: rows[0] === undefined ? { ...EMPTY } : counts(rows[0]),
|
|
409
425
|
groups: rows[0] === undefined ? { ...NO_GROUPS } : groupCounts(rows[0]), nextCursor, limit, view };
|
|
410
426
|
}
|
|
411
427
|
export function workCountsByProject(store, now, access) {
|
|
@@ -451,7 +467,30 @@ function listChecksOf(own, level, follows) {
|
|
|
451
467
|
return null;
|
|
452
468
|
return { status: read.status, exitCode: null, head: null, level: read.level, running: read.running };
|
|
453
469
|
}
|
|
454
|
-
|
|
470
|
+
/** A ready result's requirements, acceptance and completion blockers from its saved records, as assignmentOf reads them. */
|
|
471
|
+
function resultReadinessFacts(store, now, root, row, recorded, memo) {
|
|
472
|
+
const run = n(row, 'result_id'), repo = s(row, 'repo');
|
|
473
|
+
if (!run)
|
|
474
|
+
return { checks: recorded };
|
|
475
|
+
const report = s(row, 'result_role') === 'scout';
|
|
476
|
+
// No recorded check result (a build from before results were recorded, or none ran): read its saved receipt, as the page does.
|
|
477
|
+
const saved = root !== undefined && (recorded === null || recorded.status === 'not-run') ? assignmentChecksForRun(store, root, run, now) : null;
|
|
478
|
+
const listed = saved === null ? recorded : { status: saved.status, exitCode: saved.exitCode, head: s(row, 'result_head'),
|
|
479
|
+
...(saved.level == null ? {} : { level: saved.level }), ...(saved.running == null ? {} : { running: saved.running }), ...(saved.batch == null ? {} : { batch: saved.batch }) };
|
|
480
|
+
const checks = listed?.level === 'off' && listed.status !== 'passed' && listed.status !== 'failed'
|
|
481
|
+
? { ...listed, release: releaseCoverageOf(store, root, repo, s(row, 'result_head'), { memo }) } : listed;
|
|
482
|
+
const proof = store.proofVerdictFor(run), accepted = store.proofAcceptance(run) !== null;
|
|
483
|
+
const review = buildReviewOf(store, run);
|
|
484
|
+
const high = review === null || review.sentBackAs !== null || review.state !== 'reviewed' ? 0 : review.high.length;
|
|
485
|
+
const checkRequired = requiredCheckCommandFor(store, repo, String(row['id']), checks?.level) !== null;
|
|
486
|
+
const backing = checkBackingOf(checks);
|
|
487
|
+
const requirements = requirementsOf(proof?.matrix, backing);
|
|
488
|
+
const verdict = shownVerdictOf(proof?.verdict ?? null, { checkFailed: !report && checks?.status === 'failed', highFindings: high, reviewPending: review?.state === 'pending',
|
|
489
|
+
criteriaPassed: requirements === null || requirements.met === requirements.total });
|
|
490
|
+
const blockers = completionBlockersOf({ report, checks, checkRequired, matrix: proof?.matrix, verdict: proof?.verdict ?? null, accepted, high });
|
|
491
|
+
return { checks, requirements: unverifiedWhenRefuted(requirements, verdict), ...(accepted ? { accepted } : {}), ...(blockers.length === 0 ? {} : { blockers }) };
|
|
492
|
+
}
|
|
493
|
+
function itemOf(row, principal, probe, leadName, readiness) {
|
|
455
494
|
const code = String(row['code']), id = String(row['id']);
|
|
456
495
|
const custody = code === 'process-needs-attention' || (code === 'result-needs-attention' && n(row, 'custody_unresolved') === 1);
|
|
457
496
|
const process = custody && probe !== undefined ? processNeedOf(probe(id)) : null;
|
|
@@ -564,10 +603,13 @@ function itemOf(row, principal, probe, leadName) {
|
|
|
564
603
|
const checkStatus = s(row, 'check_status'), verdict = s(row, 'proof_verdict');
|
|
565
604
|
const finished = reading.stage === 'finished' || reading.stage === 'complete';
|
|
566
605
|
const own = checkStatus === 'failed' || n(row, 'proof_failed_check') === 1 ? 'failed' : checkStatus === 'passed' || verdict === 'verified' ? 'passed' : null;
|
|
606
|
+
const listedChecks = !finished ? null : listChecksOf(own, s(row, 'check_level'), row['check_follows']);
|
|
607
|
+
const ready = reading.stage === 'finished' && readiness !== undefined ? readiness(row, listedChecks) : null;
|
|
567
608
|
const shared = taskStatusOf({ stage: reading.stage, ...(reading.need === undefined ? {} : { need: reading.need }), ...(reading.wait === undefined ? {} : { wait: reading.wait }),
|
|
568
609
|
...(process === null ? {} : { needContext: { build: process.build } }),
|
|
569
610
|
reason: finished ? null : plainReasonOf(reading.stage, code, detail || null), report: s(row, 'result_role') === 'scout',
|
|
570
|
-
checks:
|
|
611
|
+
checks: ready?.checks ?? listedChecks,
|
|
612
|
+
...(ready === null ? {} : { requirements: ready.requirements ?? null, ...(ready.accepted ? { accepted: true } : {}), ...(ready.blockers === undefined ? {} : { blockers: ready.blockers }) }),
|
|
571
613
|
completedBy: code !== 'complete' ? null : n(row, 'completed_by_lead') === 1 ? 'the lead' : String(row['checked_actor']).replace(/^(?:operator|coordinator|lead):/, ''),
|
|
572
614
|
...(lead === null ? {} : { lead, ...(leadName === undefined ? {} : { leadName }) }) });
|
|
573
615
|
label = shared.headline;
|
package/dist/workspace-ui.js
CHANGED
|
@@ -395,7 +395,8 @@ export function acceptWordsOf(facts) {
|
|
|
395
395
|
const plural = (n, one, many) => `${n} ${n === 1 ? one : many}`;
|
|
396
396
|
const parts = [
|
|
397
397
|
...(facts.proof ? [] : ["nothing on record says what was met"]),
|
|
398
|
-
|
|
398
|
+
// Checks deliberately Off are checked at release (task-status.ts): not a gap here.
|
|
399
|
+
...(facts.checks === "passed" || facts.checks === "off" ? [] : [facts.checks === "failed" ? "checks failed"
|
|
399
400
|
: facts.checks === "running" ? "checks are still running" : facts.checks === "unavailable" ? "saved checks can't be read" : "checks didn't run"]),
|
|
400
401
|
...(facts.unmet > 0 ? [`${plural(facts.unmet, "requirement isn't", "requirements aren't")} met`] : []),
|
|
401
402
|
];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "toolroll",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.57",
|
|
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"
|
|
@@ -17,7 +17,6 @@
|
|
|
17
17
|
"prepublishOnly": "npm run typecheck && npm run build",
|
|
18
18
|
"nul-scan": "node scripts/nul-scan.mjs",
|
|
19
19
|
"proof-preflight": "node scripts/proof-preflight.mjs",
|
|
20
|
-
"fixture:v47": "node scripts/derive-v47-fixture.mjs",
|
|
21
20
|
"build:desktop": "node scripts/build-desktop.mjs",
|
|
22
21
|
"certify:restart": "npm run build && node scripts/restart-certification.mjs",
|
|
23
22
|
"certify:launchd": "npm run build && node scripts/launchd-certification.mjs",
|
package/dist/teammate-admin.d.ts
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Looking after AI teammates (v92): making one from a template or a soul
|
|
3
|
-
* file, editing its soul (a new version each time), pausing or removing it,
|
|
4
|
-
* telling it something, and the daily summary it sends its manager.
|
|
5
|
-
*
|
|
6
|
-
* Shared by the Teammates pages and the lead chat, so both do the same thing.
|
|
7
|
-
*/
|
|
8
|
-
import type { Store, TeammateRow } from "./store.js";
|
|
9
|
-
export type Done = {
|
|
10
|
-
ok: true;
|
|
11
|
-
said: string;
|
|
12
|
-
id?: number;
|
|
13
|
-
} | {
|
|
14
|
-
ok: false;
|
|
15
|
-
said: string;
|
|
16
|
-
};
|
|
17
|
-
export declare const TEAMMATE_MODELS: readonly ["default", "sonnet", "opus", "haiku"];
|
|
18
|
-
/** A soul file with a different name: the template's, renamed. */
|
|
19
|
-
export declare function renamedSoul(soul: string, name: string): string;
|
|
20
|
-
/** A new teammate in a project, from a template (optionally renamed) or a whole soul file. */
|
|
21
|
-
export declare function createTeammateFrom(store: Store, input: {
|
|
22
|
-
repo: string;
|
|
23
|
-
template?: string | null;
|
|
24
|
-
name?: string | null;
|
|
25
|
-
soul?: string | null;
|
|
26
|
-
by: string;
|
|
27
|
-
}, now: Date): Done;
|
|
28
|
-
/** Save a new version of a teammate's soul file. Its name stays: zones name it by handle. */
|
|
29
|
-
export declare function saveSoul(store: Store, mate: TeammateRow, soul: string, by: string, now: Date): Done;
|
|
30
|
-
/** Pause, resume or remove. Paused, its decisions go to people and the zones it handles wait. */
|
|
31
|
-
export declare function setTeammateState(store: Store, mate: TeammateRow, state: "active" | "paused" | "removed", by: string, now: Date): Done;
|
|
32
|
-
export declare function teammateSettings(store: Store, mate: TeammateRow, change: {
|
|
33
|
-
model?: string;
|
|
34
|
-
dailyTurns?: number;
|
|
35
|
-
manager?: string;
|
|
36
|
-
}, by: string, now: Date): Done;
|
|
37
|
-
export declare const nameOf: (mate: TeammateRow) => string;
|
|
38
|
-
export declare const labelOf: (mate: TeammateRow) => string;
|
|
39
|
-
/** Every zone a teammate works, in every flow of its project. */
|
|
40
|
-
export declare function zonesOf(store: Store, mate: TeammateRow): {
|
|
41
|
-
flow: number;
|
|
42
|
-
flowName: string;
|
|
43
|
-
zone: string;
|
|
44
|
-
title: string;
|
|
45
|
-
kind: "decides" | "handles";
|
|
46
|
-
}[];
|
|
47
|
-
/** What a teammate did since a time, in words its manager reads at a glance. */
|
|
48
|
-
export declare function summaryOf(store: Store, mate: TeammateRow, since: string | null): {
|
|
49
|
-
said: string;
|
|
50
|
-
quiet: boolean;
|
|
51
|
-
};
|
|
52
|
-
/** The daily summary, to each teammate's manager, once a day after 5 pm (this computer's time), or now when asked. */
|
|
53
|
-
export declare function sendTeammateSummaries(store: Store, repo: string, now: Date, only?: number | null): number;
|
package/dist/teammates-ui.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The Teammates pages (v92): who is on the team, and one page per teammate —
|
|
3
|
-
* what it asks you, its soul file, what it did and why, what you told it,
|
|
4
|
-
* and its settings. Server-rendered forms, like the other settings pages.
|
|
5
|
-
*/
|
|
6
|
-
import type { Store, TeammateRow } from "./store.js";
|
|
7
|
-
import { type Html } from "./html.js";
|
|
8
|
-
/** v94: the Tools section's rule rows; a limit's fields show only while "Up to a limit" is chosen. */
|
|
9
|
-
export declare const TEAMMATE_CSS = ".teammate-tools .tool-grant{border-top:1px solid var(--so-line);padding-top:12px;margin-top:12px}.teammate-tools .tool-grant:first-of-type{border-top:0;margin-top:0;padding-top:0}.teammate-tools h3{font-size:1rem;margin:0 0 4px}.teammate-tools .tool-rule{display:grid;gap:6px;padding:10px 0;border-bottom:1px solid var(--so-line)}.teammate-tools .tool-rule:last-of-type{border-bottom:0}.teammate-tools .tool-rule .meta{display:block}.teammate-tools select,.teammate-tools input{max-width:100%;box-sizing:border-box}.teammate-tools .tool-limit{display:none;flex-wrap:wrap;align-items:center;gap:6px}.teammate-tools .tool-rule:has(option[value=\"limit\"]:checked) .tool-limit{display:flex}.teammate-tools .tool-rule>select{width:auto;min-width:16em}.teammate-tools .tool-limit select{width:auto}.teammate-tools .tool-limit input{width:7em}.teammate-tools .tool-buttons{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}.teammate-tools button{min-height:44px}.teammate-activity li{overflow-wrap:anywhere}.teammate-memory .memory-tell,.teammate-memory .memory-search{display:flex;flex-wrap:wrap;gap:8px;align-items:flex-end;margin:0 0 12px}.teammate-memory .memory-tell textarea{flex:1 1 280px}.teammate-memory .memory-search input{flex:1 1 220px}.teammate-memory button{min-height:44px}.teammate-memories{list-style:none;padding:0;margin:0}.teammate-memories li{padding:10px 0;border-top:1px solid var(--so-line);overflow-wrap:anywhere}.teammate-memories li:first-child{border-top:0}.teammate-memories .meta{display:block;font-size:.85rem}.teammate-memories details.memory-edit{border:0;padding:0;margin:2px 0 0;background:transparent;box-shadow:none}.memory-edit summary{cursor:pointer;min-height:32px;display:inline-flex;align-items:center;font-size:.85rem;font-weight:400;color:var(--so-muted)}.tool-undo{border:0;padding:0;margin:8px 0;background:transparent;box-shadow:none}.tool-undo summary{cursor:pointer;min-height:36px;display:inline-flex;align-items:center;font-size:.9rem}.tool-undo-row{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin:6px 0}.tool-undo-row select{width:auto}.teammate-overrides,.teammate-undo{padding-left:18px}.teammate-undo li{margin:6px 0}.teammate-undo form{display:inline}.teammate-week h3{font-size:1rem;margin:14px 0 4px}.teammate-week button{min-height:44px}.teammate-routines{list-style:none;padding:0;margin:8px 0}.teammate-routines li{display:grid;gap:4px;padding:10px 0;border-top:1px solid var(--so-line)}.teammate-routines li:first-child{border-top:0}.routine-buttons{display:flex;flex-wrap:wrap;gap:8px}.routine-buttons button,.routine-add button{min-height:44px}.routine-add{display:flex;flex-wrap:wrap;gap:8px;align-items:flex-end;margin:8px 0}.routine-add label{display:grid;gap:4px;flex:1 1 200px}.routine-add label:first-of-type{flex:0 1 180px}.teammate-actions,.question-options{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0}.teammate-actions form,.question-options form{margin:0}.memory-edit form{display:grid;gap:8px;margin-top:6px}.memory-buttons{display:flex;flex-wrap:wrap;gap:8px}@media(max-width:600px){.teammate-tools select,.teammate-tools input{font-size:16px}}";
|
|
10
|
-
/** A blank soul file: the sections a teammate reads, to fill in. */
|
|
11
|
-
export declare const BLANK_SOUL = "---\nname: \nrole: \n---\n\n## Who you are\n\n\n## How you write\n\n\n## What you know\n\n\n## Decide on your own\n- \n\n## Ask first\n- \n\n## Never\n- \n";
|
|
12
|
-
export declare function teammatesListHtml(store: Store, mates: readonly TeammateRow[], projects: readonly string[], projectName: (repo: string) => string, canCreate: boolean, notice: {
|
|
13
|
-
said?: string | null;
|
|
14
|
-
problem?: string | null;
|
|
15
|
-
}): Html;
|
|
16
|
-
export declare function teammatePageHtml(store: Store, mate: TeammateRow, viewer: string, projectName: (repo: string) => string, canManage: boolean, approvers: readonly string[], notice: {
|
|
17
|
-
said?: string | null;
|
|
18
|
-
problem?: string | null;
|
|
19
|
-
soulDraft?: string | null;
|
|
20
|
-
query?: string | null;
|
|
21
|
-
}): Html;
|