toolroll 0.9.93 → 0.9.95
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 +79 -0
- package/dist/activity-line.d.ts +7 -4
- package/dist/activity-line.js +9 -7
- package/dist/agent-fence.d.ts +10 -0
- package/dist/agent-fence.js +6 -3
- package/dist/approval-authority.d.ts +7 -1
- package/dist/approval-authority.js +11 -2
- package/dist/approval-password.d.ts +31 -0
- package/dist/approval-password.js +26 -0
- package/dist/assignment-status.d.ts +1 -1
- package/dist/assignment-ui.js +3 -1
- package/dist/assignment.js +5 -0
- package/dist/attest.d.ts +3 -0
- package/dist/attest.js +10 -0
- package/dist/boot-identity.d.ts +2 -1
- package/dist/boot-identity.js +6 -4
- package/dist/bounded-spawn.d.ts +57 -0
- package/dist/bounded-spawn.js +220 -0
- package/dist/browser/terminal.js +42 -42
- package/dist/browser/workspace.css +1 -1
- package/dist/browser/workspace.js +32 -32
- package/dist/browser-crew.js +2 -0
- package/dist/browser-shell.d.ts +1 -1
- package/dist/browser-shell.js +2 -2
- package/dist/browser-workspace.d.ts +50 -2
- package/dist/browser-workspace.js +3 -3
- package/dist/build-review.js +2 -0
- package/dist/builder-restart.d.ts +21 -0
- package/dist/builder-restart.js +50 -0
- package/dist/builder.d.ts +11 -2
- package/dist/builder.js +234 -101
- package/dist/card-catalog.d.ts +209 -0
- package/dist/card-catalog.js +133 -0
- package/dist/card-cli.d.ts +43 -0
- package/dist/card-cli.js +44 -0
- package/dist/card-render.d.ts +26 -0
- package/dist/card-render.js +223 -0
- package/dist/card-sources.d.ts +68 -0
- package/dist/card-sources.js +234 -0
- package/dist/chat-acceptance.js +1 -1
- package/dist/chat-actions.d.ts +106 -9
- package/dist/chat-actions.js +473 -46
- package/dist/chat-approval.d.ts +13 -0
- package/dist/chat-approval.js +39 -9
- package/dist/chat-card-part.d.ts +11 -0
- package/dist/chat-card-part.js +18 -0
- package/dist/chat-card.d.ts +46 -0
- package/dist/chat-card.js +99 -0
- package/dist/chat-channel.d.ts +2 -0
- package/dist/chat-channel.js +37 -14
- package/dist/chat-controls.d.ts +4 -0
- package/dist/chat-controls.js +4 -0
- package/dist/chat-decide.d.ts +10 -16
- package/dist/chat-decide.js +79 -62
- package/dist/chat-delivery.js +13 -4
- package/dist/chat-flow.d.ts +0 -27
- package/dist/chat-flow.js +31 -2
- package/dist/chat-quiet.js +4 -4
- package/dist/chat-task-actions.d.ts +3 -2
- package/dist/chat-task-actions.js +19 -5
- package/dist/chat-terms.d.ts +14 -2
- package/dist/chat-terms.js +35 -0
- package/dist/chat-voice.d.ts +1 -1
- package/dist/chat-voice.js +2 -2
- package/dist/check-facts.d.ts +3 -1
- package/dist/check-facts.js +57 -11
- package/dist/check-failure.d.ts +24 -3
- package/dist/check-failure.js +89 -13
- package/dist/check-levels-ui.d.ts +4 -0
- package/dist/check-levels-ui.js +10 -1
- package/dist/check-load.d.ts +85 -0
- package/dist/check-load.js +147 -0
- package/dist/check-only-standing.d.ts +36 -0
- package/dist/check-only-standing.js +39 -0
- package/dist/check-only.d.ts +15 -0
- package/dist/check-only.js +99 -0
- package/dist/check-repair.d.ts +47 -0
- package/dist/check-repair.js +240 -0
- package/dist/check-report.d.ts +2 -0
- package/dist/check-report.js +1 -1
- package/dist/check-stamp.d.ts +46 -0
- package/dist/check-stamp.js +93 -0
- package/dist/checkout-cleanup.d.ts +36 -5
- package/dist/checkout-cleanup.js +166 -14
- package/dist/claim.d.ts +6 -0
- package/dist/claim.js +13 -2
- package/dist/cli-help.d.ts +4 -1
- package/dist/cli-help.js +49 -30
- package/dist/cli.js +15 -1
- package/dist/code-extract.d.ts +44 -0
- package/dist/code-extract.js +88 -0
- package/dist/code-map-acts.d.ts +24 -0
- package/dist/code-map-acts.js +53 -0
- package/dist/code-map-admission.d.ts +52 -0
- package/dist/code-map-admission.js +295 -0
- package/dist/code-map-build.d.ts +63 -0
- package/dist/code-map-build.js +415 -0
- package/dist/code-map-cli.d.ts +153 -0
- package/dist/code-map-cli.js +103 -0
- package/dist/code-map-main.d.ts +1 -0
- package/dist/code-map-main.js +48 -0
- package/dist/code-map-read.d.ts +106 -0
- package/dist/code-map-read.js +171 -0
- package/dist/code-map-report.d.ts +37 -0
- package/dist/code-map-report.js +95 -0
- package/dist/code-map-shape.d.ts +172 -0
- package/dist/code-map-shape.js +327 -0
- package/dist/code-map-store.d.ts +136 -0
- package/dist/code-map-store.js +233 -0
- package/dist/coding-provider.d.ts +3 -1
- package/dist/coding-provider.js +12 -7
- package/dist/coding-update.js +3 -2
- package/dist/coding-workspace.d.ts +1 -1
- package/dist/coding-workspace.js +8 -8
- package/dist/console-chrome.js +2 -2
- package/dist/containment.d.ts +5 -0
- package/dist/containment.js +14 -1
- package/dist/contracts/chat-actions.d.ts +92 -0
- package/dist/contracts/chat-actions.js +20 -0
- package/dist/contracts/chat-card.d.ts +91 -0
- package/dist/contracts/chat-card.js +54 -0
- package/dist/contracts/chat-content.d.ts +191 -0
- package/dist/contracts/chat-content.js +4 -0
- package/dist/contracts/cli.d.ts +52 -0
- package/dist/contracts/cli.js +4 -0
- package/dist/contracts/console-api.d.ts +12 -3
- package/dist/contracts/console-api.js +12 -3
- package/dist/contracts/flow-propose.d.ts +8 -1
- package/dist/contracts/flow-propose.js +3 -1
- package/dist/contracts/flow-send.d.ts +126 -0
- package/dist/contracts/flow-send.js +3 -0
- package/dist/contracts/gateway-tools.d.ts +17 -0
- package/dist/contracts/gateway-tools.js +3 -1
- package/dist/contracts/lead-tools.d.ts +234 -0
- package/dist/contracts/lead-tools.js +25 -1
- package/dist/contracts/project-knowledge.d.ts +38 -5
- package/dist/contracts/project-knowledge.js +11 -5
- package/dist/contracts/project-memory.d.ts +3 -1
- package/dist/contracts/project-memory.js +3 -2
- package/dist/contracts/storage.d.ts +14 -0
- package/dist/contracts/storage.js +3 -1
- package/dist/contracts/store-json.d.ts +18 -0
- package/dist/contracts/youiyoux-request.d.ts +1 -1
- package/dist/contracts/youiyoux-request.js +1 -1
- package/dist/desktop-access.js +6 -2
- package/dist/discord-chat.js +14 -0
- package/dist/dispatch.d.ts +1 -1
- package/dist/dispatch.js +25 -16
- package/dist/dispose.d.ts +19 -0
- package/dist/dispose.js +55 -9
- package/dist/easy-start.js +2 -3
- package/dist/eval-oracle.js +4 -1
- package/dist/evals.js +2 -1
- package/dist/evidence-pair.d.ts +53 -0
- package/dist/evidence-pair.js +128 -0
- package/dist/exhaustion.d.ts +17 -4
- package/dist/exhaustion.js +44 -4
- package/dist/export.js +1 -1
- package/dist/failing-first.d.ts +31 -0
- package/dist/failing-first.js +44 -0
- package/dist/fallback-schema.d.ts +8 -0
- package/dist/fallback-schema.js +40 -0
- package/dist/fallback.d.ts +138 -0
- package/dist/fallback.js +605 -0
- package/dist/fast-start.d.ts +136 -0
- package/dist/fast-start.js +431 -0
- package/dist/fast-terms.d.ts +9 -0
- package/dist/fast-terms.js +23 -0
- package/dist/fenced-check-coverage.d.ts +62 -0
- package/dist/fenced-check-coverage.js +54 -0
- package/dist/findings.d.ts +224 -0
- package/dist/findings.js +449 -0
- package/dist/first-run.js +1 -1
- package/dist/flaky-ci.d.ts +31 -0
- package/dist/flaky-ci.js +149 -0
- package/dist/flaky-cli.d.ts +60 -0
- package/dist/flaky-cli.js +60 -0
- package/dist/flaky.d.ts +75 -9
- package/dist/flaky.js +255 -0
- package/dist/fleet-schema.d.ts +17 -0
- package/dist/fleet-schema.js +135 -0
- package/dist/flow-browser.js +2 -2
- package/dist/flow-card-task.js +3 -0
- package/dist/flow-code.d.ts +2 -2
- package/dist/flow-code.js +9 -5
- package/dist/flow-result-card.d.ts +22 -0
- package/dist/flow-result-card.js +55 -0
- package/dist/flow-send.js +12 -9
- package/dist/flow-steps.js +1 -1
- package/dist/flow-triggers.d.ts +1 -1
- package/dist/flow-triggers.js +2 -2
- package/dist/flow-unattended.d.ts +26 -0
- package/dist/flow-unattended.js +12 -3
- package/dist/flows-ui.js +10 -2
- package/dist/follow-through-brief.d.ts +12 -0
- package/dist/follow-through-brief.js +31 -0
- package/dist/follow-through-cli.d.ts +23 -0
- package/dist/follow-through-cli.js +153 -0
- package/dist/git-incident.d.ts +16 -0
- package/dist/git-incident.js +69 -6
- package/dist/github-import.d.ts +62 -0
- package/dist/github-import.js +146 -0
- package/dist/guides.js +15 -10
- package/dist/handover-note.d.ts +33 -0
- package/dist/handover-note.js +106 -0
- package/dist/invoke.d.ts +25 -2
- package/dist/invoke.js +157 -58
- package/dist/job-object-helper.ps1 +10 -3
- package/dist/keymap.d.ts +41 -0
- package/dist/keymap.js +51 -0
- package/dist/knowledge-cli.js +1 -1
- package/dist/knowledge-ui.d.ts +21 -4
- package/dist/knowledge-ui.js +75 -7
- package/dist/laptop-background.d.ts +16 -0
- package/dist/laptop-background.js +108 -2
- package/dist/lead-cli.js +26 -24
- package/dist/lead-context.js +1 -1
- package/dist/lead-contract.d.ts +1 -1
- package/dist/lead-contract.js +3 -2
- package/dist/lead-doors.d.ts +4 -0
- package/dist/lead-doors.js +2 -2
- package/dist/lead-progress.js +5 -0
- package/dist/lead-status.d.ts +2 -0
- package/dist/lead-status.js +6 -2
- package/dist/lead-tools.js +162 -34
- package/dist/lead.js +2 -2
- package/dist/lesson-notes.d.ts +81 -0
- package/dist/lesson-notes.js +336 -0
- package/dist/limits-ui.js +1 -1
- package/dist/local-owner.d.ts +1 -1
- package/dist/local-owner.js +16 -0
- package/dist/machine-check.d.ts +16 -0
- package/dist/machine-check.js +26 -0
- package/dist/machine-identity.d.ts +75 -0
- package/dist/machine-identity.js +170 -0
- package/dist/mcp-core.js +11 -1
- package/dist/memory-cli.d.ts +300 -1
- package/dist/memory-cli.js +62 -9
- package/dist/memory-pass.d.ts +16 -0
- package/dist/memory-pass.js +67 -3
- package/dist/memory-tidy.d.ts +181 -0
- package/dist/memory-tidy.js +523 -0
- package/dist/memory-use.d.ts +35 -0
- package/dist/memory-use.js +109 -0
- package/dist/merge-checklist.d.ts +55 -0
- package/dist/merge-checklist.js +182 -0
- package/dist/modes.d.ts +6 -6
- package/dist/modes.js +3 -1
- package/dist/needs-you.d.ts +31 -9
- package/dist/needs-you.js +110 -41
- package/dist/nightly-github.d.ts +2 -0
- package/dist/nightly-github.js +4 -4
- package/dist/operate-remote-arguments.js +7 -1
- package/dist/operate-remote.js +3 -1
- package/dist/operate.d.ts +6 -1
- package/dist/operate.js +565 -64
- package/dist/phase-routing.js +2 -2
- package/dist/plain-schema.d.ts +23 -0
- package/dist/plain-schema.js +94 -0
- package/dist/plain-words.d.ts +20 -0
- package/dist/plain-words.js +66 -0
- package/dist/plan-login.d.ts +14 -0
- package/dist/plan-login.js +58 -0
- package/dist/planner.d.ts +1 -1
- package/dist/planner.js +4 -2
- package/dist/process-liveness.d.ts +2 -0
- package/dist/process-liveness.js +61 -17
- package/dist/project-delete-ui.d.ts +19 -2
- package/dist/project-delete-ui.js +29 -1
- package/dist/project-delete.js +14 -1
- package/dist/project-knowledge.d.ts +18 -11
- package/dist/project-knowledge.js +39 -9
- package/dist/project-learning.d.ts +2 -1
- package/dist/project-learning.js +15 -45
- package/dist/project-memory.d.ts +5 -0
- package/dist/project-memory.js +22 -2
- package/dist/project-tools.d.ts +4 -4
- package/dist/project-tools.js +23 -7
- package/dist/proof.js +30 -5
- package/dist/protected-storage-look.d.ts +1 -0
- package/dist/protected-storage-look.js +13 -0
- package/dist/protected-storage.d.ts +70 -39
- package/dist/protected-storage.js +196 -147
- package/dist/provider-auth.js +1 -1
- package/dist/provider-capture.d.ts +34 -0
- package/dist/provider-capture.js +53 -0
- package/dist/publish.js +9 -1
- package/dist/pull-request-flow.js +5 -0
- package/dist/push.d.ts +18 -2
- package/dist/push.js +40 -16
- package/dist/release-adapters.d.ts +9 -0
- package/dist/release-adapters.js +76 -0
- package/dist/release-auto.js +13 -13
- package/dist/release-card.d.ts +1 -2
- package/dist/release-card.js +11 -0
- package/dist/release-carry.d.ts +7 -2
- package/dist/release-carry.js +49 -10
- package/dist/release-cli.d.ts +4 -0
- package/dist/release-cli.js +29 -22
- package/dist/release-coverage.js +1 -1
- package/dist/release-next.d.ts +48 -0
- package/dist/release-next.js +161 -0
- package/dist/release.d.ts +20 -1
- package/dist/release.js +85 -9
- package/dist/remote-destination.d.ts +36 -0
- package/dist/remote-destination.js +217 -0
- package/dist/remote-main.d.ts +48 -0
- package/dist/remote-main.js +84 -5
- package/dist/repository-context.d.ts +3 -2
- package/dist/repository-context.js +112 -70
- package/dist/restart-certification.d.ts +1 -0
- package/dist/restart-certification.js +8 -6
- package/dist/result-acts.d.ts +27 -19
- package/dist/result-acts.js +36 -25
- package/dist/result-follow-ups.d.ts +2 -2
- package/dist/result-follow-ups.js +18 -4
- package/dist/result-review.d.ts +1 -1
- package/dist/route-change-check.d.ts +4 -0
- package/dist/route-change-check.js +13 -0
- package/dist/route-change.d.ts +22 -0
- package/dist/route-change.js +89 -0
- package/dist/route-hooks.js +3 -2
- package/dist/route-results.d.ts +6 -1
- package/dist/route-results.js +14 -5
- package/dist/run-closeout.d.ts +1 -1
- package/dist/run-closeout.js +7 -5
- package/dist/runner-process.js +3 -2
- package/dist/runner.js +2 -1
- package/dist/scope.d.ts +28 -4
- package/dist/scope.js +92 -28
- package/dist/scout.d.ts +1 -1
- package/dist/scout.js +2 -1
- package/dist/serve.d.ts +1 -1
- package/dist/serve.js +26 -18
- package/dist/server/chat.js +16 -14
- package/dist/server/chrome.d.ts +1 -1
- package/dist/server/chrome.js +26 -35
- package/dist/server/console.css +73 -0
- package/dist/server/guards.js +3 -0
- package/dist/server/home.d.ts +6 -0
- package/dist/server/home.js +21 -13
- package/dist/server/http.js +1 -1
- package/dist/server/kit.js +1 -1
- package/dist/server/merge-ready-view.d.ts +10 -0
- package/dist/server/merge-ready-view.js +30 -0
- package/dist/server/pages-assets.d.ts +1 -0
- package/dist/server/pages-assets.js +8 -5
- package/dist/server/pages.js +103 -82
- package/dist/server/render-chat.js +16 -3
- package/dist/server/render-code-map.d.ts +30 -0
- package/dist/server/render-code-map.js +137 -0
- package/dist/server/render-flaky.d.ts +20 -0
- package/dist/server/render-flaky.js +59 -0
- package/dist/server/render-follow-through.d.ts +11 -0
- package/dist/server/render-follow-through.js +68 -0
- package/dist/server/render-history.js +1 -1
- package/dist/server/render-new-task.d.ts +26 -1
- package/dist/server/render-new-task.js +30 -5
- package/dist/server/render-pages.d.ts +1 -175
- package/dist/server/render-pages.js +38 -313
- package/dist/server/render-projects.d.ts +2 -1
- package/dist/server/render-projects.js +9 -7
- package/dist/server/render-release.d.ts +2 -0
- package/dist/server/render-release.js +3 -3
- package/dist/server/render-results.d.ts +2 -0
- package/dist/server/render-results.js +68 -68
- package/dist/server/render-tasks.d.ts +16 -2
- package/dist/server/render-tasks.js +177 -141
- package/dist/server/retired-routes.d.ts +17 -0
- package/dist/server/retired-routes.js +53 -0
- package/dist/server/route-table.d.ts +3 -0
- package/dist/server/route-table.js +48 -12
- package/dist/server/settings.js +166 -34
- package/dist/server/task-views.js +66 -26
- package/dist/server/tasks.d.ts +2 -6
- package/dist/server/tasks.js +250 -321
- package/dist/server/welcome.js +1 -1
- package/dist/settings-groups-ui.d.ts +1 -0
- package/dist/settings-groups-ui.js +4 -2
- package/dist/settings-kit.js +3 -2
- package/dist/settings-proofs.js +3 -1
- package/dist/slack-chat.js +14 -1
- package/dist/steer-mailbox.d.ts +8 -1
- package/dist/steer-mailbox.js +164 -6
- package/dist/stop-proof.js +6 -4
- package/dist/storage-sweep-process.js +1 -1
- package/dist/storage-sweep.d.ts +5 -3
- package/dist/storage-sweep.js +30 -9
- package/dist/storage-ui.js +28 -17
- package/dist/storage.d.ts +27 -2
- package/dist/storage.js +39 -2
- package/dist/store.d.ts +89 -7
- package/dist/store.js +386 -114
- package/dist/surface.js +67 -6
- package/dist/sweep-quarantine.d.ts +1 -0
- package/dist/sweep-quarantine.js +6 -4
- package/dist/tamper-scan.d.ts +4 -0
- package/dist/tamper-scan.js +90 -0
- package/dist/task-aliases.d.ts +5 -0
- package/dist/task-aliases.js +9 -0
- package/dist/task-control.d.ts +2 -1
- package/dist/task-control.js +4 -1
- package/dist/task-outcome-cli.d.ts +2 -0
- package/dist/task-outcome-cli.js +17 -17
- package/dist/task-sizing.d.ts +5 -0
- package/dist/task-sizing.js +2 -0
- package/dist/task-source.d.ts +7 -0
- package/dist/task-source.js +14 -0
- package/dist/task-status.d.ts +9 -0
- package/dist/task-status.js +45 -49
- package/dist/teardown-git.d.ts +18 -0
- package/dist/teardown-git.js +105 -21
- package/dist/telegram-lead.js +23 -6
- package/dist/telegram-progress.js +5 -3
- package/dist/telegram-status.js +6 -4
- package/dist/telegram.js +12 -1
- package/dist/test-infra.d.ts +8 -0
- package/dist/test-infra.js +18 -0
- package/dist/tidy.js +1 -1
- package/dist/toolroll-update.js +19 -5
- package/dist/tui-contract.d.ts +24 -0
- package/dist/tui-source.js +67 -8
- package/dist/tui.js +51 -51
- package/dist/vanished-retry.d.ts +30 -0
- package/dist/vanished-retry.js +174 -0
- package/dist/work-index.d.ts +2 -0
- package/dist/work-index.js +95 -66
- package/dist/work-summary.d.ts +1 -1
- package/dist/work-summary.js +7 -2
- package/dist/workspace-ui.d.ts +7 -3
- package/dist/workspace-ui.js +38 -23
- package/dist/worktree.d.ts +12 -3
- package/dist/worktree.js +91 -14
- package/package.json +2 -1
- package/dist/server/render-next.d.ts +0 -63
- package/dist/server/render-next.js +0 -109
package/dist/surface.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { KNOWLEDGE_DESCRIPTORS } from "./knowledge-cli.js";
|
|
2
2
|
import { MEMORY_DESCRIPTORS } from "./memory-cli.js";
|
|
3
|
+
import { CARD_DESCRIPTOR } from "./card-cli.js";
|
|
4
|
+
import { FLAKY_DESCRIPTORS } from "./flaky-cli.js";
|
|
3
5
|
import { MODELS_DESCRIPTORS } from "./models-cli.js";
|
|
6
|
+
import { MAP_DESCRIPTORS } from "./code-map-cli.js";
|
|
4
7
|
import { FLOWS_DESCRIPTORS } from "./flows-cli.js";
|
|
5
8
|
/**
|
|
6
9
|
* The declared command guide (arc 5): the agent-facing surface as data,
|
|
@@ -117,10 +120,13 @@ const GUIDE_ROWS = [
|
|
|
117
120
|
operator("demo", "a seeded throwaway sandbox"),
|
|
118
121
|
...KNOWLEDGE_DESCRIPTORS.map(spec => ({ invocation: `knowledge ${spec.action}`, synopsis: spec.synopsis, audience: "audience" in spec ? spec.audience : "agent", agentMayInvoke: !("audience" in spec), mutation: spec.mutation, flags: spec.flags, ...(spec.takesQuery ? { positionals: [{ name: "query", required: true, meaning: "search text or source file for impact" }] } : {}) })),
|
|
119
122
|
...MEMORY_DESCRIPTORS.map(spec => ({ invocation: `memory ${spec.action}`, synopsis: spec.synopsis, audience: "audience" in spec ? spec.audience : "agent", agentMayInvoke: !("audience" in spec), mutation: spec.mutation, flags: spec.flags, ...(spec.takesQuery ? { positionals: [{ name: "query", required: true, meaning: "search text, a decision id, or the decision sentence" }] } : {}) })),
|
|
123
|
+
{ invocation: CARD_DESCRIPTOR.invocation, synopsis: CARD_DESCRIPTOR.synopsis, audience: "agent", agentMayInvoke: true, mutation: "none", flags: CARD_DESCRIPTOR.flags, positionals: [{ name: "source", required: true, meaning: "which data to show" }] },
|
|
124
|
+
...FLAKY_DESCRIPTORS.map(spec => ({ invocation: `flaky ${spec.action}`, synopsis: spec.synopsis, audience: "agent", agentMayInvoke: true, mutation: spec.mutation, flags: spec.flags, ...(spec.takesQuery ? { positionals: [{ name: "identity", required: true, meaning: "a row's key from flaky list" }] } : {}) })),
|
|
120
125
|
// Flow writes carry an approver's credential: an agent runs them only as the person asked, after showing the preview.
|
|
121
126
|
// Letting a flow run on its own raises authority: the owner's own password ceremony, never an agent's act.
|
|
122
127
|
...FLOWS_DESCRIPTORS.map(spec => ({ invocation: `flows ${spec.action}`, synopsis: spec.synopsis, audience: "audience" in spec ? spec.audience : "agent", agentMayInvoke: !("audience" in spec), mutation: spec.mutation, flags: spec.flags,
|
|
123
128
|
...("positionals" in spec ? { positionals: spec.positionals.map(name => ({ name, required: true, meaning: name === "flow" ? "a flow id from flows list" : name === "card" ? "a card id from flows show" : name === "on|off" ? "on signs the grant, off revokes it" : "a trigger id from flows show, or for trigger add its settings as JSON, a JSON file, or -" })) } : {}) })),
|
|
129
|
+
...MAP_DESCRIPTORS.map(spec => ({ invocation: spec.action === "" ? "map" : `map ${spec.action}`, synopsis: spec.synopsis, audience: "audience" in spec ? spec.audience : "agent", agentMayInvoke: !("audience" in spec), mutation: spec.mutation, flags: spec.flags, ...(spec.positional === null ? {} : { positionals: [{ name: "target", required: true, meaning: spec.positional }] }) })),
|
|
124
130
|
...MODELS_DESCRIPTORS.map(spec => ({ invocation: `models ${spec.action}`, synopsis: spec.synopsis, audience: "agent", agentMayInvoke: true, mutation: spec.mutation, flags: spec.flags, ...(spec.takesQuery ? { positionals: [{ name: "target", required: true, meaning: "positional" in spec ? spec.positional : "the CLI to update, or on/off" }] } : {}) })),
|
|
125
131
|
// ---- the queue (agent surface) ----
|
|
126
132
|
{ invocation: "status", synopsis: "running work, queued reasons, results to review, the latest release check and plan windows", audience: "agent", agentMayInvoke: true, mutation: "none", flags: [jsonFlag, dbFlag] },
|
|
@@ -153,6 +159,21 @@ const GUIDE_ROWS = [
|
|
|
153
159
|
{ name: "token", takesValue: true, meaning: "a lead token: filed as the lead, so it pings nobody" },
|
|
154
160
|
{ name: "checks", takesValue: true, meaning: "quick|full|off: this task's checks, overriding the project's level (\"skip the tests\" is off)" }],
|
|
155
161
|
notableReasons: ["duplicate", "usage", "unknown-task", "unauthenticated"] },
|
|
162
|
+
{ invocation: "task new", synopsis: "start a small task at a terminal: shows the exact terms, then Build now? is your approval", audience: "operator", agentMayInvoke: false, mutation: "unkeyed",
|
|
163
|
+
positionals: [{ name: "words", required: false, meaning: "what should change" }],
|
|
164
|
+
flags: [dbFlag,
|
|
165
|
+
{ name: "repo", takesValue: true, meaning: "the project" },
|
|
166
|
+
{ name: "as", takesValue: true, meaning: "the approver" },
|
|
167
|
+
{ name: "token", takesValue: true, meaning: "their password" },
|
|
168
|
+
{ name: "from", takesValue: true, meaning: "a github.com issue or pull request of this project: quoted, then filed for your approval" },
|
|
169
|
+
{ name: "preview", takesValue: false, meaning: "the terminal UI's own: the exact terms, nothing started" },
|
|
170
|
+
{ name: "build", takesValue: true, meaning: "the terminal UI's own: Build on those terms" },
|
|
171
|
+
{ name: "digest", takesValue: true, meaning: "the terms the person read" }],
|
|
172
|
+
notableReasons: ["person-only", "usage"] },
|
|
173
|
+
{ invocation: "task keep", synopsis: "a fast start that grew: propose a plan for its exact commit, for you to approve", audience: "operator", agentMayInvoke: false, mutation: "unkeyed",
|
|
174
|
+
positionals: [{ name: "id", required: true, meaning: "the task" }],
|
|
175
|
+
flags: [jsonFlag, dbFlag, { name: "as", takesValue: true, meaning: "the approver" }, { name: "token", takesValue: true, meaning: "their password" }],
|
|
176
|
+
notableReasons: ["usage", "refused"] },
|
|
156
177
|
{ invocation: "task ask", synopsis: "hand a task to a person: one message saying why, and the task is theirs", audience: "agent", agentMayInvoke: true, mutation: "unkeyed",
|
|
157
178
|
positionals: [{ name: "id", required: true, meaning: "the task" }],
|
|
158
179
|
flags: [jsonFlag, dbFlag,
|
|
@@ -169,6 +190,10 @@ const GUIDE_ROWS = [
|
|
|
169
190
|
audience: "agent", agentMayInvoke: true, mutation: "none",
|
|
170
191
|
positionals: [{ name: "task", required: true, meaning: "any version of the task" }], flags: [jsonFlag, dbFlag],
|
|
171
192
|
notableReasons: ["unknown-task", "no-pull-request"] },
|
|
193
|
+
{ invocation: "task ready", synopsis: "Can I merge? The task's checklist from Toolroll's records, each blocker with the act that clears it (Run checks, Retry, Ask the agent to fix)",
|
|
194
|
+
audience: "agent", agentMayInvoke: true, mutation: "none",
|
|
195
|
+
positionals: [{ name: "task", required: true, meaning: "any version of the task" }], flags: [jsonFlag, dbFlag],
|
|
196
|
+
notableReasons: ["unknown-task"] },
|
|
172
197
|
{ invocation: "task add-tests", synopsis: "file a small task to write tests for the task's latest change; it waits for approval like any task",
|
|
173
198
|
audience: "agent", agentMayInvoke: true, mutation: "identity-idempotent",
|
|
174
199
|
positionals: [{ name: "task", required: true, meaning: "any version of the task" }], flags: [jsonFlag, dbFlag],
|
|
@@ -298,8 +323,25 @@ const GUIDE_ROWS = [
|
|
|
298
323
|
{ name: "all", takesValue: false, meaning: "include LOW findings within the compact packet's limit; extra findings are counted" },
|
|
299
324
|
{ name: "token", takesValue: true, meaning: "the lead token (or TOOLROLL_LEAD_TOKEN)" }],
|
|
300
325
|
notableReasons: ["usage", "unauthenticated", "not-found"] },
|
|
301
|
-
operator("task accept", "
|
|
302
|
-
|
|
326
|
+
{ ...operator("task accept", "accept a result: --finish (or --digest <receipt>) is exactly task complete's completion of the exact receipt; --despite \"<reason>\" records an acceptance with limitations and never completes; a bare call refuses"),
|
|
327
|
+
positionals: [{ name: "id", required: true, meaning: "the task" }],
|
|
328
|
+
flags: [jsonFlag, dbFlag, { name: "finish", takesValue: false, meaning: "accept the result and finish the task: task complete's exact-receipt completion; --json and scoped agents pass --digest" },
|
|
329
|
+
{ name: "digest", takesValue: true, meaning: "the exact receipt from assignment show; accepts and finishes exactly that result" },
|
|
330
|
+
{ name: "despite", takesValue: true, meaning: "accept with this reason, without finishing; never combines with --finish or --digest (--note is its alias)" }],
|
|
331
|
+
notableReasons: ["usage", "unknown-task", "no-run", "not-ready"] },
|
|
332
|
+
operator("task repair", "inspect or approve a repair draft; --yes starts the repair a failed check is waiting for, under the normal plan approval"),
|
|
333
|
+
operatorRead("task handover", "where a task stands, from Toolroll's records: revision, decisions, rejected approaches, open findings, checks and the next action"),
|
|
334
|
+
operator("task before-after", "before-and-after evidence: read it, save a failing result, or rerun the same check on the latest commit with no agent"),
|
|
335
|
+
operator("task failing-first", "ask a bug fix's next attempt to write a failing test first (on|off); shown in the result as the agent's report"),
|
|
336
|
+
operatorRead("finding list", "findings still waiting on someone, or every finding of --task <id>"),
|
|
337
|
+
operatorRead("finding show", "one finding: its text, evidence and how it stands"),
|
|
338
|
+
operator("finding send", "send a finding to the task that owns the code; the owner must accept it or reject it with a reason"),
|
|
339
|
+
operator("finding resend", "send an answered finding back, one more round; past the limit it goes to a person"),
|
|
340
|
+
operator("finding close", "a person's decision on a finding"),
|
|
341
|
+
operatorRead("captures list", "what providers said when attempts failed, the ones mentioning limits first; nothing routes on these"),
|
|
342
|
+
operatorRead("captures show", "one saved provider failure"),
|
|
343
|
+
operatorRead("captures export", "one saved provider failure as a fixture"),
|
|
344
|
+
operator("captures mark", "a person's reading of a capture: exhausted or not-exhausted"),
|
|
303
345
|
operator("task route", "which configured agents plan, build and repair this task; phase and size changes require renewed approval"),
|
|
304
346
|
operator("task reopen", "resume external work its tracker closed and has been SEEN open again"),
|
|
305
347
|
operator("task stop", "stop ONE exact live attempt (--run <id>): durable before any process is signalled, answers 'stopping' until its own processes are established gone; work, branch, and evidence preserved; no strike, no retry"),
|
|
@@ -448,6 +490,8 @@ const GUIDE_ROWS = [
|
|
|
448
490
|
* project access. A row missing here fails the contract test, and runs nowhere remotely meanwhile.
|
|
449
491
|
*/
|
|
450
492
|
const REMOTE_NO = [
|
|
493
|
+
// A fast start is a person at this computer (fast-start.ts).
|
|
494
|
+
"task new", "task keep",
|
|
451
495
|
// Answered by the local CLI, or a client of a central server itself.
|
|
452
496
|
"", "pulls", "graph", "repos", "repos add", "repos remove", "repos add-from-github", "contract", "skills list", "skills get", "skills install",
|
|
453
497
|
"link", "unlink", "update", "release", "demo", "chat",
|
|
@@ -465,6 +509,9 @@ const REMOTE_NO = [
|
|
|
465
509
|
// Earned rules (results routing): the project's own results, and its rules' doors, with this machine's sign-in; a
|
|
466
510
|
// remote token never changes which models run (the rule door refuses it in the write too).
|
|
467
511
|
"models suggestions", "models accept", "models dismiss", "models turn-off", "models keep", "models try", "models stop",
|
|
512
|
+
// The code map's switch, holdout and report: this machine's sign-in, never a token's (code-map-acts.ts refuses one in
|
|
513
|
+
// the write too).
|
|
514
|
+
"map on", "map off", "map holdout end", "map report",
|
|
468
515
|
// Publication and release.
|
|
469
516
|
"publish", "publish status", "publish merge", "publish refire", "publish unblock", "publish rearm", "publish grant", "publish revoke",
|
|
470
517
|
// A repository's authority grants on this machine.
|
|
@@ -476,12 +523,17 @@ const REMOTE_NO = [
|
|
|
476
523
|
// Reads this machine owner's own Claude and Codex session files (~/.claude, ~/.codex).
|
|
477
524
|
"memory propose",
|
|
478
525
|
];
|
|
526
|
+
const REMOTE_FOLLOW_THROUGH = [
|
|
527
|
+
// On the server's machine or in the console: each writes through a verified person, and they read saved model text.
|
|
528
|
+
"task handover", "task before-after", "task failing-first", "finding list", "finding show", "finding send", "finding resend", "finding close",
|
|
529
|
+
"captures list", "captures show", "captures export", "captures mark",
|
|
530
|
+
];
|
|
479
531
|
const REMOTE_STEP_UP = [
|
|
480
532
|
"proposals", "decide", "task regate", "task approve", "task accept", "task merge", "run settle",
|
|
481
533
|
// Putting tasks away and restoring them: a person's act, in the console or on the server's machine.
|
|
482
534
|
"task archive", "task restore", "task tidy", "knowledge apply",
|
|
483
535
|
// Changing project memory: a person's own password, never a token (the lead only proposes it in chat).
|
|
484
|
-
"memory decide", "memory retire", "memory apply",
|
|
536
|
+
"memory decide", "memory retire", "memory apply", "memory tidy", "memory restore", "memory unmerge",
|
|
485
537
|
"flows card approve", "flows card send-back", "flows script approve", "flows unattended",
|
|
486
538
|
"approver list", "approver add", "people list", "people invite", "people projects", "people revoke",
|
|
487
539
|
// A person's own API tokens: a password step-up on the server's machine, or the console. Never with a token.
|
|
@@ -491,14 +543,16 @@ const REMOTE_STEP_UP = [
|
|
|
491
543
|
];
|
|
492
544
|
const REMOTE_YES = [
|
|
493
545
|
"status", "integrations", "ready", "gaps", "grants", "sync", "audit",
|
|
494
|
-
"task add", "task ask", "task checks", "task ship", "task add-tests", "task list", "task show", "check-progress", "task wait", "task complete", "task revise",
|
|
546
|
+
"task add", "task ask", "task checks", "task ship", "task ready", "task add-tests", "task list", "task show", "check-progress", "task wait", "task complete", "task revise",
|
|
495
547
|
"task state", "task block", "task unblock", "task next", "task steer", "task pause", "task continue", "task assign", "task scope", "task plan", "task hold", "task unhold", "task require",
|
|
496
548
|
"task requeue", "task review", "task repair", "task route", "task reopen", "task stop", "task resume",
|
|
497
549
|
"runner list", "coordinator list", "cap list", "cap add", "outbox list", "incident list", "incident resolve",
|
|
498
550
|
"config show", "verify show", "intake show", "intake run", "intake preview", "intake pr-comments", "template list", "template show",
|
|
499
551
|
"webhook status", "review show", "chat-approval show", "chat-approval off",
|
|
500
552
|
"knowledge search", "knowledge impact", "knowledge refresh",
|
|
553
|
+
"map", "map area", "map file", "map search", "map refresh",
|
|
501
554
|
"memory search", "memory decisions", "memory show", "memory review", "memory status",
|
|
555
|
+
"flaky list", "flaky show", "card",
|
|
502
556
|
"flows list", "flows show", "flows export", "flows create", "flows edit", "flows trigger add", "flows trigger pause", "flows trigger resume",
|
|
503
557
|
"flows trigger remove", "flows card add", "flows archive",
|
|
504
558
|
"models status", "models list",
|
|
@@ -506,11 +560,12 @@ const REMOTE_YES = [
|
|
|
506
560
|
/** Every row's remote policy, by invocation. Exported for the contract test, which holds it to the guide exactly. */
|
|
507
561
|
export const REMOTE_POLICY = new Map([
|
|
508
562
|
...REMOTE_NO.map(invocation => [invocation, "no"]),
|
|
563
|
+
...REMOTE_FOLLOW_THROUGH.map(invocation => [invocation, "no"]),
|
|
509
564
|
...REMOTE_STEP_UP.map(invocation => [invocation, "step-up"]),
|
|
510
565
|
...REMOTE_YES.map(invocation => [invocation, "yes"]),
|
|
511
566
|
]);
|
|
512
567
|
/** How many times each invocation was classified — the contract test refuses a row stated twice. */
|
|
513
|
-
export const REMOTE_POLICY_COUNT = REMOTE_NO.length + REMOTE_STEP_UP.length + REMOTE_YES.length;
|
|
568
|
+
export const REMOTE_POLICY_COUNT = REMOTE_NO.length + REMOTE_FOLLOW_THROUGH.length + REMOTE_STEP_UP.length + REMOTE_YES.length;
|
|
514
569
|
/**
|
|
515
570
|
* Easy-start C3: the commands a laptop's local owner may run through the terminal UI (local-owner.ts runAsLocalOwner),
|
|
516
571
|
* each with the act it is; every other row (and every command with no row) is refused to the local owner before any
|
|
@@ -518,10 +573,14 @@ export const REMOTE_POLICY_COUNT = REMOTE_NO.length + REMOTE_STEP_UP.length + RE
|
|
|
518
573
|
*/
|
|
519
574
|
const LOCAL_ALLOW = {
|
|
520
575
|
// Reads.
|
|
521
|
-
pulls: "read", graph: "read", repos: "read", status: "read", ready: "read", gaps: "read", contract: "read", "skills list": "read", "skills get": "read",
|
|
576
|
+
pulls: "read", graph: "read", repos: "read", map: "read", "map area": "read", "map file": "read", "map search": "read", status: "read", ready: "read", gaps: "read", contract: "read", "skills list": "read", "skills get": "read",
|
|
577
|
+
"flaky list": "read", "flaky show": "read", card: "read", "memory review": "read", "memory status": "read", "memory decisions": "read", "memory show": "read",
|
|
578
|
+
// Learning loops (D3): a lesson note or a clean-up, decided by a person at the laptop (the writers check the act).
|
|
579
|
+
"memory apply": "memory-review", "memory tidy": "memory-review", "memory restore": "memory-review", "memory unmerge": "memory-review",
|
|
522
580
|
"task list": "read", "task show": "read", "task state": "read", "task wait": "read", "check-progress": "read", "review show": "read", welcome: "read",
|
|
523
581
|
// Acts (plan C1's list).
|
|
524
582
|
"task add": "file-task",
|
|
583
|
+
"task new": "build-now",
|
|
525
584
|
chat: "lead-send",
|
|
526
585
|
"task steer": "lead-send",
|
|
527
586
|
"task approve": "approve-plan",
|
|
@@ -542,6 +601,8 @@ const LOCAL_ALLOW = {
|
|
|
542
601
|
"models turn-off": "routing-turn-off",
|
|
543
602
|
"models dismiss": "dismiss-suggestion",
|
|
544
603
|
"models stop": "trial-stop",
|
|
604
|
+
"map on": "code-map-switch",
|
|
605
|
+
"map off": "code-map-switch",
|
|
545
606
|
};
|
|
546
607
|
/** Every guide row's local-owner mark, by invocation: `allow` with its act, else `deny`. Exported for the inventory test. */
|
|
547
608
|
export const LOCAL_POLICY = new Map(GUIDE_ROWS.map(row => [row.invocation,
|
package/dist/sweep-quarantine.js
CHANGED
|
@@ -7,16 +7,17 @@ import { existsSync, linkSync, lstatSync, readFileSync, readdirSync, renameSync,
|
|
|
7
7
|
import { hostname } from "node:os";
|
|
8
8
|
import { basename, dirname, join } from "node:path";
|
|
9
9
|
import { currentBootId, provenDeadByBootChange } from "./boot-identity.js";
|
|
10
|
+
import { currentMachineId, isThisMachine } from "./machine-identity.js";
|
|
10
11
|
export const QUARANTINE_NOTE = ".toolroll-sweep.json";
|
|
11
12
|
const PREFIX = ".toolroll-trash-";
|
|
12
13
|
const freshPath = (root) => join(root, `${PREFIX}${randomBytes(16).toString("hex")}`);
|
|
13
|
-
const owner = () => ({ pid: process.pid, host: hostname(), bootId: currentBootId() });
|
|
14
|
+
const owner = () => ({ pid: process.pid, host: hostname(), bootId: currentBootId(), machineId: currentMachineId() });
|
|
14
15
|
function alive(one) {
|
|
15
16
|
if (one.pid === 0)
|
|
16
17
|
return false;
|
|
17
|
-
if (one
|
|
18
|
+
if (!isThisMachine(one))
|
|
18
19
|
return true;
|
|
19
|
-
if (one.bootId !== null && provenDeadByBootChange(one))
|
|
20
|
+
if (one.bootId !== null && provenDeadByBootChange(one, { host: one.host, bootId: currentBootId() }))
|
|
20
21
|
return false;
|
|
21
22
|
try {
|
|
22
23
|
process.kill(one.pid, 0);
|
|
@@ -31,7 +32,8 @@ function read(path) {
|
|
|
31
32
|
const j = JSON.parse(readFileSync(join(path, QUARANTINE_NOTE), "utf8"));
|
|
32
33
|
return j.version === 1 && typeof j.name === "string" && j.name !== "." && j.name !== ".." &&
|
|
33
34
|
j.name !== "" && !/[\\/\0]/.test(j.name) && Number.isSafeInteger(j.pid) && j.pid >= 0 && typeof j.host === "string" &&
|
|
34
|
-
(j.bootId === null || typeof j.bootId === "string") &&
|
|
35
|
+
(j.bootId === null || typeof j.bootId === "string") && (j.machineId === undefined || j.machineId === null || typeof j.machineId === "string")
|
|
36
|
+
&& typeof j.deleting === "boolean" ? j : null;
|
|
35
37
|
}
|
|
36
38
|
catch {
|
|
37
39
|
return null;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** Every expression in `text` that could reach the runner, with its arguments, spaces collapsed. */
|
|
2
|
+
export declare function runnerExpressions(path: string, text: string): string[];
|
|
3
|
+
/** What the candidate has that the base doesn't, as a multiset: an edited argument is a new expression, a moved one isn't. */
|
|
4
|
+
export declare function tamperFindings(path: string, base: string | null, candidate: string): string[];
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A heuristic over changed code (docs/plans/trusted-release-reports.md, H4): the expressions that could reach the test
|
|
3
|
+
* runner, compared whole. Round 1 of the plan counted these forms, and Codex's finding 5 was that a count misses an
|
|
4
|
+
* edit: `process.exit(1)` becoming `process.exit(0)` counts the same. So this keeps each expression's text, its
|
|
5
|
+
* arguments included, and each binding that aliases a runner object, and reports what the candidate has that the base
|
|
6
|
+
* doesn't.
|
|
7
|
+
*
|
|
8
|
+
* It decides nothing. It isn't wired to any approval: it makes tampering visible, can't make it impossible, and the
|
|
9
|
+
* rate at which it flags honest work is measured first (scripts/tamper-measure.mjs).
|
|
10
|
+
*/
|
|
11
|
+
import { createRequire } from "node:module";
|
|
12
|
+
let compiler;
|
|
13
|
+
const typescript = () => compiler ??= createRequire(import.meta.url)("typescript-parser");
|
|
14
|
+
const PROCESS_MEMBERS = new Set(["exit", "exitCode", "kill", "send", "channel", "ppid", "binding", "dlopen", "reallyExit", "abort"]);
|
|
15
|
+
const RUNNER_OBJECTS = new Set(["process", "globalThis", "global", "vi"]);
|
|
16
|
+
const TEST_GLOBALS = new Set(["expect", "test", "it", "describe", "vi"]);
|
|
17
|
+
const IMPORTS = /^(?:node:)?process$|^@vitest\/|^vitest\/(?!config$)|^tinypool$|^birpc$|^(?:node:)?vm$|^(?:node:)?inspector$/;
|
|
18
|
+
const HARNESS_WORDS = /node_modules\/|\/proc\/|RUNNER_|ACTIONS_|TOOLROLL_CHECK|shard-report|NODE_OPTIONS|\bsudo\b|__vitest/;
|
|
19
|
+
const TEST_ENV = /^(?:VITEST.*|TOOLROLL_TEST.*|CI|NODE_ENV)$/;
|
|
20
|
+
const TEST_FILE = /\.test\.[cm]?[jt]sx?$/;
|
|
21
|
+
/** Every expression in `text` that could reach the runner, with its arguments, spaces collapsed. */
|
|
22
|
+
export function runnerExpressions(path, text) {
|
|
23
|
+
const tsc = typescript();
|
|
24
|
+
const source = tsc.createSourceFile(path, text, tsc.ScriptTarget.Latest, true, /x$/.test(path) ? tsc.ScriptKind.TSX : tsc.ScriptKind.TS);
|
|
25
|
+
const found = [];
|
|
26
|
+
const said = (node) => found.push(node.getText(source).replace(/\s+/g, " ").slice(0, 200));
|
|
27
|
+
const named = (node, names) => tsc.isIdentifier(node) && names.has(node.text);
|
|
28
|
+
// The call or assignment a member is part of, so what it is called with or set to counts.
|
|
29
|
+
const whole = (node) => (tsc.isCallExpression(node.parent) && node.parent.expression === node) || (tsc.isBinaryExpression(node.parent) && node.parent.left === node) ? node.parent : node;
|
|
30
|
+
const visit = (node) => {
|
|
31
|
+
if (tsc.isImportDeclaration(node) && tsc.isStringLiteral(node.moduleSpecifier) && IMPORTS.test(node.moduleSpecifier.text))
|
|
32
|
+
said(node);
|
|
33
|
+
else if (tsc.isCallExpression(node) && (node.expression.kind === tsc.SyntaxKind.ImportKeyword || (tsc.isIdentifier(node.expression) && node.expression.text === "require"))
|
|
34
|
+
&& node.arguments[0] !== undefined && tsc.isStringLiteral(node.arguments[0]) && IMPORTS.test(node.arguments[0].text))
|
|
35
|
+
said(node);
|
|
36
|
+
else if (tsc.isPropertyAccessExpression(node) && tsc.isIdentifier(node.expression)) {
|
|
37
|
+
const object = node.expression.text, member = node.name.text;
|
|
38
|
+
if (object === "process" && (PROCESS_MEMBERS.has(member) || member.startsWith("_")))
|
|
39
|
+
said(whole(node));
|
|
40
|
+
if (object === "require" && member === "cache")
|
|
41
|
+
said(node);
|
|
42
|
+
if (object === "Module" && member.startsWith("_"))
|
|
43
|
+
said(whole(node));
|
|
44
|
+
if (object === "module" && member === "register")
|
|
45
|
+
said(whole(node));
|
|
46
|
+
}
|
|
47
|
+
else if (tsc.isElementAccessExpression(node) && named(node.expression, RUNNER_OBJECTS) && !tsc.isStringLiteralLike(node.argumentExpression))
|
|
48
|
+
said(node);
|
|
49
|
+
else if (tsc.isCallExpression(node) && tsc.isIdentifier(node.expression) && (node.expression.text === "eval" || node.expression.text === "Function"))
|
|
50
|
+
said(node);
|
|
51
|
+
else if (tsc.isNewExpression(node) && tsc.isIdentifier(node.expression) && node.expression.text === "Function")
|
|
52
|
+
said(node);
|
|
53
|
+
else if (tsc.isBinaryExpression(node) && node.operatorToken.kind === tsc.SyntaxKind.EqualsToken) {
|
|
54
|
+
const left = node.left;
|
|
55
|
+
if (named(left, TEST_GLOBALS) || (tsc.isPropertyAccessExpression(left) && (named(left.expression, TEST_GLOBALS) || named(left.expression, new Set(["globalThis"])) || (tsc.isPropertyAccessExpression(left.expression) && left.expression.name.text === "prototype"))))
|
|
56
|
+
said(node);
|
|
57
|
+
}
|
|
58
|
+
else if (tsc.isCallExpression(node) && tsc.isPropertyAccessExpression(node.expression) && node.expression.name.text === "defineProperty" && node.arguments[0] !== undefined
|
|
59
|
+
&& (named(node.arguments[0], TEST_GLOBALS) || named(node.arguments[0], RUNNER_OBJECTS)))
|
|
60
|
+
said(node);
|
|
61
|
+
// A binding: another name for a runner object, or pieces taken out of one.
|
|
62
|
+
else if (tsc.isVariableDeclaration(node) && node.initializer !== undefined && named(node.initializer, RUNNER_OBJECTS))
|
|
63
|
+
said(node);
|
|
64
|
+
else if (tsc.isStringLiteralLike(node) && HARNESS_WORDS.test(node.text))
|
|
65
|
+
said(node);
|
|
66
|
+
// Product code telling a test from the real thing.
|
|
67
|
+
if (!TEST_FILE.test(path) && tsc.isPropertyAccessExpression(node) && TEST_ENV.test(node.name.text) && tsc.isPropertyAccessExpression(node.expression) && node.expression.name.text === "env")
|
|
68
|
+
said(node);
|
|
69
|
+
if (!TEST_FILE.test(path) && tsc.isElementAccessExpression(node) && tsc.isStringLiteralLike(node.argumentExpression) && TEST_ENV.test(node.argumentExpression.text) && tsc.isPropertyAccessExpression(node.expression) && node.expression.name.text === "env")
|
|
70
|
+
said(node);
|
|
71
|
+
tsc.forEachChild(node, visit);
|
|
72
|
+
};
|
|
73
|
+
visit(source);
|
|
74
|
+
return found;
|
|
75
|
+
}
|
|
76
|
+
/** What the candidate has that the base doesn't, as a multiset: an edited argument is a new expression, a moved one isn't. */
|
|
77
|
+
export function tamperFindings(path, base, candidate) {
|
|
78
|
+
const left = new Map();
|
|
79
|
+
for (const one of base === null ? [] : runnerExpressions(path, base))
|
|
80
|
+
left.set(one, (left.get(one) ?? 0) + 1);
|
|
81
|
+
const added = [];
|
|
82
|
+
for (const one of runnerExpressions(path, candidate)) {
|
|
83
|
+
const count = left.get(one) ?? 0;
|
|
84
|
+
if (count > 0)
|
|
85
|
+
left.set(one, count - 1);
|
|
86
|
+
else
|
|
87
|
+
added.push(one);
|
|
88
|
+
}
|
|
89
|
+
return added;
|
|
90
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** People's names for task commands (docs/plans/plain-toolroll.md P1.3): each is exactly the command it names, read
|
|
2
|
+
* before anything else looks at the command, so a remote, local-owner or contract rule sees only the original. */
|
|
3
|
+
export declare const TASK_ALIASES: Readonly<Record<string, string>>;
|
|
4
|
+
/** `task <alias> …` as the command it names; anything else unchanged. */
|
|
5
|
+
export declare function withTaskAlias(argv: readonly string[]): readonly string[];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** People's names for task commands (docs/plans/plain-toolroll.md P1.3): each is exactly the command it names, read
|
|
2
|
+
* before anything else looks at the command, so a remote, local-owner or contract rule sees only the original. */
|
|
3
|
+
export const TASK_ALIASES = { "send-back": "revise", retry: "requeue", recheck: "regate" };
|
|
4
|
+
/** `task <alias> …` as the command it names; anything else unchanged. */
|
|
5
|
+
export function withTaskAlias(argv) {
|
|
6
|
+
if (argv[0] !== "task" || argv[1] === undefined || !Object.prototype.hasOwnProperty.call(TASK_ALIASES, argv[1]))
|
|
7
|
+
return argv;
|
|
8
|
+
return ["task", TASK_ALIASES[argv[1]], ...argv.slice(2)];
|
|
9
|
+
}
|
package/dist/task-control.d.ts
CHANGED
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
* hold, recovery, and invocation-gateway machinery. This
|
|
20
20
|
* module only names the door and the fence.
|
|
21
21
|
*/
|
|
22
|
+
import type { StopVia } from "./store.js";
|
|
22
23
|
import { type DispatchDiagnosis } from "./dispatch.js";
|
|
23
24
|
import type { Run, RunStop, Store } from "./store.js";
|
|
24
25
|
/** How often a running attempt re-reads its stop row while a child runs.
|
|
@@ -86,7 +87,7 @@ export type ResumeRequest = {
|
|
|
86
87
|
taskId: string;
|
|
87
88
|
runId: number;
|
|
88
89
|
by: string;
|
|
89
|
-
via:
|
|
90
|
+
via: StopVia;
|
|
90
91
|
/** The workspace occupancy probe (the worktree pool's `inUse`): a
|
|
91
92
|
* checkout some process still holds is not quiescent, whatever the
|
|
92
93
|
* rows say — the concrete gate names the pid. */
|
package/dist/task-control.js
CHANGED
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
* hold, recovery, and invocation-gateway machinery. This
|
|
20
20
|
* module only names the door and the fence.
|
|
21
21
|
*/
|
|
22
|
+
import { existsSync } from "node:fs";
|
|
22
23
|
import { ownedProcessCount, runOwnerTag, terminateOwnedProcesses } from "./exec.js";
|
|
23
24
|
import { diagnoseTaskDispatch } from "./dispatch.js";
|
|
24
25
|
/** How often a running attempt re-reads its stop row while a child runs.
|
|
@@ -195,7 +196,9 @@ export function taskControlOf(store, taskRef, now) {
|
|
|
195
196
|
if (newest !== null) {
|
|
196
197
|
const stop = store.stopOf(newest.id);
|
|
197
198
|
if (stop !== null && stop.settledAt !== null && stop.resumedAt === null) {
|
|
198
|
-
return { kind: "paused", run: newest.id, role: newest.role, stop, outcome: newest.outcome, committed: newest.committed === true,
|
|
199
|
+
return { kind: "paused", run: newest.id, role: newest.role, stop, outcome: newest.outcome, committed: newest.committed === true,
|
|
200
|
+
// A folder idle cleanup removed held nothing uncommitted: a later run makes it again from the branch.
|
|
201
|
+
worktree: newest.worktree !== null && existsSync(newest.worktree) ? newest.worktree : null };
|
|
199
202
|
}
|
|
200
203
|
}
|
|
201
204
|
const newestReview = runs.find(run => run.role === "reviewer" && isAttemptRoot(store, run)) ?? null;
|
|
@@ -9,6 +9,8 @@ export declare function runTaskOutcomeCommand(action: 'complete' | 'revise', pos
|
|
|
9
9
|
write: (line: string) => void;
|
|
10
10
|
now: Date;
|
|
11
11
|
operator: () => Promise<VerifiedApprover | null>;
|
|
12
|
+
/** The command it answers as: `task accept --finish` is this same completion under its own name. */
|
|
13
|
+
command?: string;
|
|
12
14
|
}): Promise<number>;
|
|
13
15
|
/** `task merge <task>`: the console's Merge — the newest pull request any version of the task opened through
|
|
14
16
|
* Complete, merged behind the approver's password once a fresh read shows its checks passing. */
|
package/dist/task-outcome-cli.js
CHANGED
|
@@ -12,7 +12,7 @@ import { envelopeJson } from './envelope.js';
|
|
|
12
12
|
import { completeAndOpenPullRequest, mergeAsPerson, MERGE_NEEDS_PERSON, newestPullRequestOf, publishingOf, pullRequestViewOf } from './pull-request-flow.js';
|
|
13
13
|
import { proveRunStopped } from './stop-proof.js';
|
|
14
14
|
export async function runTaskOutcomeCommand(action, positional, flags, context) {
|
|
15
|
-
const command = `task ${action}`;
|
|
15
|
+
const command = context.command ?? `task ${action}`;
|
|
16
16
|
const emit = (result, lines) => {
|
|
17
17
|
context.write(context.json ? envelopeJson({ ...result, command }) : result.ok ? (lines ?? []).join('\n') : result.message ?? 'The action was refused.');
|
|
18
18
|
return result.ok ? 0 : result.reason === 'usage' ? 2 : 3;
|
|
@@ -21,21 +21,21 @@ export async function runTaskOutcomeCommand(action, positional, flags, context)
|
|
|
21
21
|
const allowed = new Set(['json', 'db', 'as', 'token', 'token-env', 'token-file', ...(action === 'complete' ? ['digest', 'pull-request'] : ['feedback', 'run', 'source', 'key'])]);
|
|
22
22
|
for (const key of flags.keys())
|
|
23
23
|
if (!allowed.has(key))
|
|
24
|
-
return fail('usage', `--${key} is not a
|
|
24
|
+
return fail('usage', `--${key} is not a ${command} option.`);
|
|
25
25
|
const task = positional[0];
|
|
26
26
|
if (positional.length !== 1 || !task || task.length > 64 || /[\x00-\x1f]/.test(task))
|
|
27
|
-
return fail('usage', `Use
|
|
27
|
+
return fail('usage', `Use ${command} <task>${action === 'complete' ? `${command === 'task accept' ? ' --finish' : ''} --digest <receipt> [--pull-request]` : ' --feedback "requested change"'}.`);
|
|
28
28
|
const pullRequest = flags.has('pull-request');
|
|
29
29
|
const credential = coordinatorToken(flags, process.env);
|
|
30
30
|
if ('ok' in credential)
|
|
31
31
|
return emit(credential);
|
|
32
32
|
if (credential.token !== null && (flags.has('as') || flags.has('token')))
|
|
33
|
-
return fail('usage', 'Choose
|
|
33
|
+
return fail('usage', 'Choose your lead\'s credential or your own sign-in, not both.');
|
|
34
34
|
if (credential.token !== null && pullRequest)
|
|
35
|
-
return fail('unauthenticated', 'Opening a pull request is an approver\'s act. Use your
|
|
35
|
+
return fail('unauthenticated', 'Opening a pull request is an approver\'s act. Use your own sign-in (--as and --token), not your lead\'s credential.');
|
|
36
36
|
const operator = credential.token === null ? await context.operator() : null;
|
|
37
37
|
if (credential.token === null && operator === null)
|
|
38
|
-
return fail('unauthenticated', 'Sign in with up, or supply --as and --token.
|
|
38
|
+
return fail('unauthenticated', 'Sign in with up, or supply --as and --token. Your lead can use --token-file or --token-env with its own credential.');
|
|
39
39
|
const { store, now, evidenceRoot } = context;
|
|
40
40
|
// A result whose build Toolroll hasn't yet proven stopped: it looks now (stop-proof.ts), so completing never waits
|
|
41
41
|
// on a person to confirm it, only on Toolroll's own check (a refusal says "stopping" until it lands).
|
|
@@ -44,7 +44,7 @@ export async function runTaskOutcomeCommand(action, positional, flags, context)
|
|
|
44
44
|
return store.transact(() => {
|
|
45
45
|
const coordinator = credential.token === null ? null : authenticateCoordinator(store, credential.token);
|
|
46
46
|
if (coordinator !== null && !coordinator.ok)
|
|
47
|
-
return fail('unauthenticated', '
|
|
47
|
+
return fail('unauthenticated', 'That credential is invalid or revoked.');
|
|
48
48
|
if (operator !== null && !reproveApprover(store, operator).ok)
|
|
49
49
|
return fail('unauthenticated', 'Your sign-in is no longer valid.');
|
|
50
50
|
const repos = coordinator?.ok ? coordinator.who.repos : operator.repos;
|
|
@@ -54,12 +54,12 @@ export async function runTaskOutcomeCommand(action, positional, flags, context)
|
|
|
54
54
|
if (action === 'complete') {
|
|
55
55
|
const supplied = flags.get('digest');
|
|
56
56
|
if (supplied !== undefined && (typeof supplied !== 'string' || !/^[a-f0-9]{64}$/.test(supplied)))
|
|
57
|
-
return fail('usage', '--digest
|
|
57
|
+
return fail('usage', '--digest needs the exact result version from assignment show.');
|
|
58
58
|
if (supplied === undefined && (context.json || coordinator !== null))
|
|
59
|
-
return fail('usage', 'Read assignment show <task>, then pass its exact --digest to
|
|
59
|
+
return fail('usage', 'Read assignment show <task>, then pass its exact --digest to accept that result.');
|
|
60
60
|
const digest = typeof supplied === 'string' ? supplied : current.receipt?.digest;
|
|
61
61
|
if (!digest)
|
|
62
|
-
return fail('not-ready', 'This task has no finished result to
|
|
62
|
+
return fail('not-ready', 'This task has no finished result to accept.');
|
|
63
63
|
if (pullRequest) {
|
|
64
64
|
// The console's "Complete and open a pull request": the same exact-receipt completion and owed PR, one transaction.
|
|
65
65
|
const repo = store.lookupRef(current.activeTaskId)?.repo ?? null;
|
|
@@ -67,19 +67,19 @@ export async function runTaskOutcomeCommand(action, positional, flags, context)
|
|
|
67
67
|
if (!publishing.on)
|
|
68
68
|
return fail('pull-requests-off', `Pull requests aren't set up for this project. Turn them on with: toolroll publish setup --repo ${repo ?? '<path>'} --yes`);
|
|
69
69
|
if (publishing.legacy)
|
|
70
|
-
return fail('pull-requests-off', 'This project opens a pull request for every build.
|
|
70
|
+
return fail('pull-requests-off', 'This project opens a pull request for every build. Accept without --pull-request.');
|
|
71
71
|
const runId = current.receipt?.runId;
|
|
72
72
|
if (runId === undefined)
|
|
73
|
-
return fail('not-ready', 'This task has no finished result to
|
|
73
|
+
return fail('not-ready', 'This task has no finished result to accept.');
|
|
74
74
|
const opened = completeAndOpenPullRequest(store, { taskId: task, digest, runId, who: operator, root: evidenceRoot }, now);
|
|
75
75
|
if (!opened.ok)
|
|
76
76
|
return emit(opened);
|
|
77
77
|
const link = opened.publication.prUrl;
|
|
78
78
|
return emit({ ok: true, result: assignmentOf(store, task, now, { principal: 'operator', repos }, evidenceRoot), pullRequest: pullRequestViewOf(store, runId) }, [
|
|
79
|
-
`${current.rootId} ·
|
|
80
|
-
`Result: ${current.activeTaskId} ·
|
|
81
|
-
link === null ? `Pull request: opening from ${opened.publication.headSha.slice(0,
|
|
82
|
-
`Next:
|
|
79
|
+
`${current.rootId} · Accepted`,
|
|
80
|
+
`Result: ${current.activeTaskId} · build #${runId} · ${opened.publication.headSha.slice(0, 7)}`,
|
|
81
|
+
link === null ? `Pull request: opening from ${opened.publication.headSha.slice(0, 7)} into ${publishing.githubRepo} ${publishing.base}. toolroll task show ${current.rootId} prints its link.` : `Pull request: ${link}`,
|
|
82
|
+
`Next: Toolroll follows its CI on GitHub. Merge when green: toolroll task merge ${current.rootId}`,
|
|
83
83
|
]);
|
|
84
84
|
}
|
|
85
85
|
const changed = credential.token !== null
|
|
@@ -89,7 +89,7 @@ export async function runTaskOutcomeCommand(action, positional, flags, context)
|
|
|
89
89
|
return emit(changed);
|
|
90
90
|
const assignment = 'body' in changed ? changed.body : changed.assignment;
|
|
91
91
|
// Checks deliberately Off: nothing to say about them here.
|
|
92
|
-
return emit({ ok: true, result: assignment }, [`${current.rootId} ·
|
|
92
|
+
return emit({ ok: true, result: assignment }, [`${current.rootId} · Accepted`, `Result: ${current.activeTaskId} · build #${current.receipt.runId} · ${current.receipt.head?.slice(0, 7) ?? 'no commit'}`,
|
|
93
93
|
...(current.readiness?.checksOff ? [] : [current.receipt.checks.detail])]);
|
|
94
94
|
}
|
|
95
95
|
const feedback = flags.get('feedback'), runFlag = flags.get('run'), sourceFlag = flags.get('source'), keyFlag = flags.get('key');
|
package/dist/task-sizing.d.ts
CHANGED
|
@@ -42,6 +42,11 @@ export declare function classifyTask(input: SizingInput, sizer: Sizer | null, bu
|
|
|
42
42
|
/** Install the process's classifier for filings (the CLI, the console, the worker); returns how to remove it. Unset,
|
|
43
43
|
* filings keep the description's size — tests never spend a turn. */
|
|
44
44
|
export declare function installFilingSizer(sizer: Sizer, budgetMs?: number): () => void;
|
|
45
|
+
/** The classifier this process filed with, and its budget (fast-start.ts waits for it; null: no answer will come). */
|
|
46
|
+
export declare const filingSizer: () => {
|
|
47
|
+
sizer: Sizer | null;
|
|
48
|
+
budget: number;
|
|
49
|
+
};
|
|
45
50
|
/**
|
|
46
51
|
* After a filing: ask the classifier (within the budget) and apply its size
|
|
47
52
|
* to the still-unapproved task. Runs in the background; the filing already
|
package/dist/task-sizing.js
CHANGED
|
@@ -185,6 +185,8 @@ export function installFilingSizer(sizer, budgetMs = SIZING_BUDGET_MS) {
|
|
|
185
185
|
return () => { installed = previous; budget = previousBudget; };
|
|
186
186
|
}
|
|
187
187
|
let budget = SIZING_BUDGET_MS;
|
|
188
|
+
/** The classifier this process filed with, and its budget (fast-start.ts waits for it; null: no answer will come). */
|
|
189
|
+
export const filingSizer = () => ({ sizer: installed, budget });
|
|
188
190
|
/**
|
|
189
191
|
* After a filing: ask the classifier (within the budget) and apply its size
|
|
190
192
|
* to the still-unapproved task. Runs in the background; the filing already
|
package/dist/task-source.d.ts
CHANGED
|
@@ -5,6 +5,10 @@
|
|
|
5
5
|
* task link and zone. Every word shown comes from that snapshot — never from today's trigger settings.
|
|
6
6
|
*/
|
|
7
7
|
import type { FlowCardSource, Store } from "./store.js";
|
|
8
|
+
/** A task filed from a GitHub issue or pull request (github-import.ts): its filed-via, and its snapshot's proof. Its
|
|
9
|
+
* provenance is outside text however it reaches a seal, and a revision keeps it (markRevision copies the snapshot). */
|
|
10
|
+
export declare const ISSUE_IMPORT_FILED_VIA = "issue-import";
|
|
11
|
+
export declare const ISSUE_IMPORT_VERIFIED = "github-import";
|
|
8
12
|
/** What a task keeps of the card it was filed from. */
|
|
9
13
|
export type TaskSourceSnapshot = {
|
|
10
14
|
label: string;
|
|
@@ -68,3 +72,6 @@ export declare function requestName(request: NonNullable<TaskOrigin["request"]>)
|
|
|
68
72
|
export declare function requestWords(request: NonNullable<TaskOrigin["request"]>): string;
|
|
69
73
|
/** The one line an approval shows about an outside event that started its work: context, never a term agreed to. */
|
|
70
74
|
export declare function originNote(origin: TaskOrigin | null | undefined): string | null;
|
|
75
|
+
/** Whether this task, or the task it revises, came from a GitHub import. Unreadable provenance on a row counts: it was
|
|
76
|
+
* written by the import road, and nothing here widens on a doubt. */
|
|
77
|
+
export declare function issueImported(store: Pick<Store, "filedViaOf" | "taskSourceOf">, taskId: string): boolean;
|
package/dist/task-source.js
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { SENDER_WORDS } from "./webhook-signing.js";
|
|
2
|
+
/** A task filed from a GitHub issue or pull request (github-import.ts): its filed-via, and its snapshot's proof. Its
|
|
3
|
+
* provenance is outside text however it reaches a seal, and a revision keeps it (markRevision copies the snapshot). */
|
|
4
|
+
export const ISSUE_IMPORT_FILED_VIA = "issue-import";
|
|
5
|
+
export const ISSUE_IMPORT_VERIFIED = "github-import";
|
|
2
6
|
/** The snapshot an outside event's card gives its task, or null when the card didn't come from one (a person's, a poll's). */
|
|
3
7
|
export function snapshotOf(source) {
|
|
4
8
|
if (source === null || typeof source.verified !== "string")
|
|
@@ -49,6 +53,8 @@ export function linkWords(url, max = 72) {
|
|
|
49
53
|
}
|
|
50
54
|
/** How a snapshot's delivery was proved, in words: "signed by Sentry", or "unsigned". */
|
|
51
55
|
export function provedWords(snapshot) {
|
|
56
|
+
if (snapshot.verified === ISSUE_IMPORT_VERIFIED)
|
|
57
|
+
return "read from GitHub";
|
|
52
58
|
const by = snapshot.verified === "github" ? "GitHub" : snapshot.verified === "linear" ? "Linear" : SENDER_WORDS[snapshot.verified] ?? snapshot.verified;
|
|
53
59
|
return snapshot.verified === "none" ? "unsigned" : `signed by ${by}`;
|
|
54
60
|
}
|
|
@@ -107,3 +113,11 @@ export function originNote(origin) {
|
|
|
107
113
|
const where = origin.source.host === null ? "" : ` · ${origin.source.host}`;
|
|
108
114
|
return `Started by an outside event: ${origin.source.label} (${origin.source.proved})${where}. The agent reads what it sent as data, not instructions.`;
|
|
109
115
|
}
|
|
116
|
+
/** Whether this task, or the task it revises, came from a GitHub import. Unreadable provenance on a row counts: it was
|
|
117
|
+
* written by the import road, and nothing here widens on a doubt. */
|
|
118
|
+
export function issueImported(store, taskId) {
|
|
119
|
+
if (store.filedViaOf(taskId) === ISSUE_IMPORT_FILED_VIA)
|
|
120
|
+
return true;
|
|
121
|
+
const kept = store.taskSourceOf(taskId);
|
|
122
|
+
return kept !== null && (kept.sourceJson.includes(`"verified":"${ISSUE_IMPORT_VERIFIED}"`) || readSnapshot(kept.sourceJson) === null);
|
|
123
|
+
}
|
package/dist/task-status.d.ts
CHANGED
|
@@ -14,6 +14,8 @@ export declare const CHECKS_LABEL = "Project checks";
|
|
|
14
14
|
export declare const PR_CI_LABEL = "PR CI";
|
|
15
15
|
/** The one verb for opening a saved result, on every surface. */
|
|
16
16
|
export declare const OPEN_RESULT = "Open result";
|
|
17
|
+
/** A machine-run check under way (a prepared candidate: no agent runs), on every surface that has no richer words. */
|
|
18
|
+
export declare const MACHINE_CHECK_RUNNING = "Running the check on the prepared version.";
|
|
17
19
|
export type DetailKey = "checks" | "pull-request" | "requirements" | "evidence";
|
|
18
20
|
/** The row's small icon: the only coloured part of a detail. `failed` is red
|
|
19
21
|
* and only ever appears under the Failed headline; `note` is amber. */
|
|
@@ -132,6 +134,9 @@ export type TaskStatusFacts = {
|
|
|
132
134
|
reason?: string | null;
|
|
133
135
|
/** A research report rather than a code change. */
|
|
134
136
|
report?: boolean;
|
|
137
|
+
/** The machine runs this task's check on a prepared candidate; no agent runs (machine-check.ts). Building then says
|
|
138
|
+
* the check is running, never "an agent". */
|
|
139
|
+
machine?: boolean;
|
|
135
140
|
checks?: ChecksFact | null;
|
|
136
141
|
pullRequest?: PullRequestFact | null;
|
|
137
142
|
/** `unverified`: the report is refuted, so no requirement counts as met however it was marked. `missed`: the ones it
|
|
@@ -184,6 +189,8 @@ export declare function statusOf(facts: TaskStatusFacts): TaskStatus;
|
|
|
184
189
|
/** The name most surfaces already import. */
|
|
185
190
|
export declare const taskStatusOf: typeof statusOf;
|
|
186
191
|
export declare function plainReasonOf(stage: TaskStage, code: string, detail: string | null | undefined): string | null;
|
|
192
|
+
/** Every dispatch or work-index code, as the stage it means (needs-you.ts CODE_READING, the one table). Unknown
|
|
193
|
+
* codes that wait on a person stay Needs you; everything else waits in the queue. */
|
|
187
194
|
export declare function stageOfCode(code: string, options?: {
|
|
188
195
|
needsPerson?: boolean;
|
|
189
196
|
planning?: boolean;
|
|
@@ -191,6 +198,7 @@ export declare function stageOfCode(code: string, options?: {
|
|
|
191
198
|
}): {
|
|
192
199
|
stage: TaskStage;
|
|
193
200
|
need?: TaskStatusFacts["need"];
|
|
201
|
+
wait?: WaitKey;
|
|
194
202
|
};
|
|
195
203
|
/** The pull request as the task page's follower reports it, or the bare publication row. */
|
|
196
204
|
export declare function pullRequestFactOf(publication: {
|
|
@@ -309,6 +317,7 @@ export declare function stageOfDispatch(d: {
|
|
|
309
317
|
}): {
|
|
310
318
|
stage: TaskStage;
|
|
311
319
|
need?: TaskStatusFacts["need"];
|
|
320
|
+
wait?: WaitKey;
|
|
312
321
|
};
|
|
313
322
|
/** The demo runs no checks: a Checks row that would offer to run one (or open one that never ran) says so instead. */
|
|
314
323
|
export declare const DEMO_CHECKS = "Can't run in the demo";
|