toolroll 0.5.0
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/LICENSE +21 -0
- package/README.md +1113 -0
- package/THIRD_PARTY_NOTICES.md +449 -0
- package/dist/accent-colors.d.ts +48 -0
- package/dist/accent-colors.js +122 -0
- package/dist/action-ledger.d.ts +26 -0
- package/dist/action-ledger.js +75 -0
- package/dist/agent-fence.d.ts +42 -0
- package/dist/agent-fence.js +183 -0
- package/dist/agentconfig.d.ts +216 -0
- package/dist/agentconfig.js +454 -0
- package/dist/api-tokens.d.ts +16 -0
- package/dist/api-tokens.js +27 -0
- package/dist/approval-policy.d.ts +69 -0
- package/dist/approval-policy.js +137 -0
- package/dist/approval-rules-ui.d.ts +25 -0
- package/dist/approval-rules-ui.js +39 -0
- package/dist/assignment-adapters.d.ts +180 -0
- package/dist/assignment-adapters.js +239 -0
- package/dist/assignment-brief.d.ts +71 -0
- package/dist/assignment-brief.js +129 -0
- package/dist/assignment-delivery.d.ts +56 -0
- package/dist/assignment-delivery.js +160 -0
- package/dist/assignment-presentation.d.ts +26 -0
- package/dist/assignment-presentation.js +80 -0
- package/dist/assignment-status.d.ts +62 -0
- package/dist/assignment-status.js +152 -0
- package/dist/assignment-ui.d.ts +71 -0
- package/dist/assignment-ui.js +103 -0
- package/dist/assignment.d.ts +222 -0
- package/dist/assignment.js +399 -0
- package/dist/attest.d.ts +56 -0
- package/dist/attest.js +153 -0
- package/dist/backend.d.ts +97 -0
- package/dist/backend.js +166 -0
- package/dist/backup-ui.d.ts +22 -0
- package/dist/backup-ui.js +59 -0
- package/dist/backup.d.ts +84 -0
- package/dist/backup.js +421 -0
- package/dist/beads.d.ts +34 -0
- package/dist/beads.js +135 -0
- package/dist/bin.d.ts +2 -0
- package/dist/bin.js +22 -0
- package/dist/board.d.ts +150 -0
- package/dist/board.js +210 -0
- package/dist/boot-identity.d.ts +63 -0
- package/dist/boot-identity.js +99 -0
- package/dist/browser/THIRD_PARTY_NOTICES.txt +2295 -0
- package/dist/browser/workspace.css +4 -0
- package/dist/browser/workspace.js +225 -0
- package/dist/browser-crew.d.ts +11 -0
- package/dist/browser-crew.js +50 -0
- package/dist/browser-shell.d.ts +8 -0
- package/dist/browser-shell.js +60 -0
- package/dist/browser-workspace.d.ts +780 -0
- package/dist/browser-workspace.js +47 -0
- package/dist/budget-alerts.d.ts +19 -0
- package/dist/budget-alerts.js +46 -0
- package/dist/builder.d.ts +370 -0
- package/dist/builder.js +3262 -0
- package/dist/capscan.d.ts +35 -0
- package/dist/capscan.js +113 -0
- package/dist/chat-acceptance.d.ts +71 -0
- package/dist/chat-acceptance.js +120 -0
- package/dist/chat-actions.d.ts +265 -0
- package/dist/chat-actions.js +1273 -0
- package/dist/chat-channel.d.ts +109 -0
- package/dist/chat-channel.js +652 -0
- package/dist/chat-continuity.d.ts +32 -0
- package/dist/chat-continuity.js +317 -0
- package/dist/chat-controls.d.ts +113 -0
- package/dist/chat-controls.js +53 -0
- package/dist/chat-delivery-state.d.ts +159 -0
- package/dist/chat-delivery-state.js +309 -0
- package/dist/chat-delivery.d.ts +38 -0
- package/dist/chat-delivery.js +693 -0
- package/dist/chat-display.d.ts +1 -0
- package/dist/chat-display.js +18 -0
- package/dist/chat-evidence.d.ts +123 -0
- package/dist/chat-evidence.js +207 -0
- package/dist/chat-flow.d.ts +44 -0
- package/dist/chat-flow.js +215 -0
- package/dist/chat-inbox.d.ts +57 -0
- package/dist/chat-inbox.js +123 -0
- package/dist/chat-polish.d.ts +16 -0
- package/dist/chat-polish.js +135 -0
- package/dist/chat-review.d.ts +46 -0
- package/dist/chat-review.js +98 -0
- package/dist/chat-rooms.d.ts +123 -0
- package/dist/chat-rooms.js +216 -0
- package/dist/chat-task-actions.d.ts +44 -0
- package/dist/chat-task-actions.js +79 -0
- package/dist/check-progress.d.ts +51 -0
- package/dist/check-progress.js +290 -0
- package/dist/child-database.d.ts +12 -0
- package/dist/child-database.js +30 -0
- package/dist/claim.d.ts +688 -0
- package/dist/claim.js +1740 -0
- package/dist/cli.d.ts +137 -0
- package/dist/cli.js +1461 -0
- package/dist/codex-limits.d.ts +15 -0
- package/dist/codex-limits.js +145 -0
- package/dist/coding-context.d.ts +55 -0
- package/dist/coding-context.js +92 -0
- package/dist/coding-handoff.d.ts +57 -0
- package/dist/coding-handoff.js +277 -0
- package/dist/coding-provider.d.ts +72 -0
- package/dist/coding-provider.js +424 -0
- package/dist/coding-shipping-ui.d.ts +4 -0
- package/dist/coding-shipping-ui.js +12 -0
- package/dist/coding-types.d.ts +62 -0
- package/dist/coding-types.js +1 -0
- package/dist/coding-ui.d.ts +17 -0
- package/dist/coding-ui.js +364 -0
- package/dist/coding-update.d.ts +15 -0
- package/dist/coding-update.js +149 -0
- package/dist/coding-workspace.d.ts +124 -0
- package/dist/coding-workspace.js +768 -0
- package/dist/container-state.d.ts +5 -0
- package/dist/container-state.js +62 -0
- package/dist/containment.d.ts +197 -0
- package/dist/containment.js +559 -0
- package/dist/contest.d.ts +318 -0
- package/dist/contest.js +753 -0
- package/dist/control-setup.d.ts +35 -0
- package/dist/control-setup.js +40 -0
- package/dist/control-ui.d.ts +29 -0
- package/dist/control-ui.js +53 -0
- package/dist/controller-service.d.ts +1 -0
- package/dist/controller-service.js +19 -0
- package/dist/controller-supervisor.d.ts +30 -0
- package/dist/controller-supervisor.js +104 -0
- package/dist/converse.d.ts +304 -0
- package/dist/converse.js +849 -0
- package/dist/coordinator-proposals.d.ts +29 -0
- package/dist/coordinator-proposals.js +137 -0
- package/dist/coordinator.d.ts +186 -0
- package/dist/coordinator.js +447 -0
- package/dist/credentials-ui.d.ts +25 -0
- package/dist/credentials-ui.js +48 -0
- package/dist/daemon.d.ts +209 -0
- package/dist/daemon.js +604 -0
- package/dist/decision.d.ts +120 -0
- package/dist/decision.js +388 -0
- package/dist/demo.d.ts +55 -0
- package/dist/demo.js +992 -0
- package/dist/desktop-access.d.ts +28 -0
- package/dist/desktop-access.js +88 -0
- package/dist/desktop-bundle.d.ts +16 -0
- package/dist/desktop-bundle.js +74 -0
- package/dist/desktop-host.d.ts +54 -0
- package/dist/desktop-host.js +508 -0
- package/dist/desktop-update-gate.d.ts +12 -0
- package/dist/desktop-update-gate.js +91 -0
- package/dist/desktop-update-recovery.d.ts +14 -0
- package/dist/desktop-update-recovery.js +243 -0
- package/dist/desktop-update.d.ts +110 -0
- package/dist/desktop-update.js +740 -0
- package/dist/discord-api.d.ts +20 -0
- package/dist/discord-api.js +138 -0
- package/dist/discord-chat.d.ts +16 -0
- package/dist/discord-chat.js +381 -0
- package/dist/discord-settings.d.ts +7 -0
- package/dist/discord-settings.js +75 -0
- package/dist/discord.d.ts +10 -0
- package/dist/discord.js +169 -0
- package/dist/discover.d.ts +75 -0
- package/dist/discover.js +150 -0
- package/dist/dispatch.d.ts +100 -0
- package/dist/dispatch.js +311 -0
- package/dist/dispose.d.ts +161 -0
- package/dist/dispose.js +803 -0
- package/dist/email-settings.d.ts +34 -0
- package/dist/email-settings.js +50 -0
- package/dist/envelope.d.ts +47 -0
- package/dist/envelope.js +105 -0
- package/dist/evidence-pack.d.ts +185 -0
- package/dist/evidence-pack.js +258 -0
- package/dist/evidence.d.ts +345 -0
- package/dist/evidence.js +782 -0
- package/dist/exec.d.ts +285 -0
- package/dist/exec.js +1841 -0
- package/dist/exhaustion.d.ts +85 -0
- package/dist/exhaustion.js +141 -0
- package/dist/export-ui.d.ts +4 -0
- package/dist/export-ui.js +17 -0
- package/dist/export.d.ts +48 -0
- package/dist/export.js +305 -0
- package/dist/flow-actions.d.ts +77 -0
- package/dist/flow-actions.js +203 -0
- package/dist/flow-code.d.ts +50 -0
- package/dist/flow-code.js +159 -0
- package/dist/flow-draft.d.ts +38 -0
- package/dist/flow-draft.js +80 -0
- package/dist/flow-engine.d.ts +66 -0
- package/dist/flow-engine.js +416 -0
- package/dist/flow-insights.d.ts +95 -0
- package/dist/flow-insights.js +149 -0
- package/dist/flow-live.d.ts +24 -0
- package/dist/flow-live.js +150 -0
- package/dist/flow-people.d.ts +24 -0
- package/dist/flow-people.js +91 -0
- package/dist/flow-replies.d.ts +48 -0
- package/dist/flow-replies.js +113 -0
- package/dist/flow-scripts.d.ts +38 -0
- package/dist/flow-scripts.js +73 -0
- package/dist/flow-secrets.d.ts +13 -0
- package/dist/flow-secrets.js +45 -0
- package/dist/flow-sort.d.ts +82 -0
- package/dist/flow-sort.js +153 -0
- package/dist/flow-steps.d.ts +40 -0
- package/dist/flow-steps.js +408 -0
- package/dist/flow-triggers.d.ts +244 -0
- package/dist/flow-triggers.js +959 -0
- package/dist/flows-ui.d.ts +20 -0
- package/dist/flows-ui.js +175 -0
- package/dist/flows.d.ts +229 -0
- package/dist/flows.js +968 -0
- package/dist/fonts.d.ts +19 -0
- package/dist/fonts.js +19 -0
- package/dist/gaps.d.ts +35 -0
- package/dist/gaps.js +101 -0
- package/dist/gate-failure.d.ts +40 -0
- package/dist/gate-failure.js +66 -0
- package/dist/git.d.ts +54 -0
- package/dist/git.js +94 -0
- package/dist/google-mail.d.ts +58 -0
- package/dist/google-mail.js +151 -0
- package/dist/grant.d.ts +136 -0
- package/dist/grant.js +238 -0
- package/dist/graph.d.ts +164 -0
- package/dist/graph.js +383 -0
- package/dist/guides.d.ts +22 -0
- package/dist/guides.js +363 -0
- package/dist/held.d.ts +150 -0
- package/dist/held.js +799 -0
- package/dist/invoke.d.ts +112 -0
- package/dist/invoke.js +780 -0
- package/dist/issues.d.ts +41 -0
- package/dist/issues.js +131 -0
- package/dist/job-object-helper.ps1 +252 -0
- package/dist/jsonl-discriminants.d.ts +11 -0
- package/dist/jsonl-discriminants.js +93 -0
- package/dist/keys.d.ts +104 -0
- package/dist/keys.js +229 -0
- package/dist/kits-ui.d.ts +17 -0
- package/dist/kits-ui.js +46 -0
- package/dist/kits.d.ts +86 -0
- package/dist/kits.js +215 -0
- package/dist/knowledge-cli.d.ts +101 -0
- package/dist/knowledge-cli.js +92 -0
- package/dist/knowledge-ui.d.ts +24 -0
- package/dist/knowledge-ui.js +40 -0
- package/dist/lead-context.d.ts +8 -0
- package/dist/lead-context.js +56 -0
- package/dist/lead-follow.d.ts +22 -0
- package/dist/lead-follow.js +167 -0
- package/dist/lead-status.d.ts +75 -0
- package/dist/lead-status.js +285 -0
- package/dist/ledger-chain.d.ts +46 -0
- package/dist/ledger-chain.js +187 -0
- package/dist/ledger-csv.d.ts +4 -0
- package/dist/ledger-csv.js +11 -0
- package/dist/ledger-view.d.ts +24 -0
- package/dist/ledger-view.js +58 -0
- package/dist/limits-ui.d.ts +26 -0
- package/dist/limits-ui.js +67 -0
- package/dist/link.d.ts +72 -0
- package/dist/link.js +217 -0
- package/dist/live.d.ts +96 -0
- package/dist/live.js +366 -0
- package/dist/liveness.d.ts +30 -0
- package/dist/liveness.js +42 -0
- package/dist/log.d.ts +7 -0
- package/dist/log.js +25 -0
- package/dist/mailbox.d.ts +57 -0
- package/dist/mailbox.js +150 -0
- package/dist/maintenance.d.ts +11 -0
- package/dist/maintenance.js +35 -0
- package/dist/mate-cli.d.ts +52 -0
- package/dist/mate-cli.js +345 -0
- package/dist/mate-contract.d.ts +10 -0
- package/dist/mate-contract.js +30 -0
- package/dist/mate-doors.d.ts +69 -0
- package/dist/mate-doors.js +548 -0
- package/dist/mate-progress.d.ts +29 -0
- package/dist/mate-progress.js +121 -0
- package/dist/mate-tools.d.ts +94 -0
- package/dist/mate-tools.js +1878 -0
- package/dist/mate.d.ts +92 -0
- package/dist/mate.js +435 -0
- package/dist/mcp-connect.d.ts +103 -0
- package/dist/mcp-connect.js +252 -0
- package/dist/mcp.d.ts +27 -0
- package/dist/mcp.js +651 -0
- package/dist/memory-cli.d.ts +466 -0
- package/dist/memory-cli.js +111 -0
- package/dist/memory-pass.d.ts +160 -0
- package/dist/memory-pass.js +409 -0
- package/dist/metrics.d.ts +3 -0
- package/dist/metrics.js +56 -0
- package/dist/mobile-viewport.d.ts +3 -0
- package/dist/mobile-viewport.js +37 -0
- package/dist/model-catalog.d.ts +118 -0
- package/dist/model-catalog.js +376 -0
- package/dist/models-cli.d.ts +102 -0
- package/dist/models-cli.js +66 -0
- package/dist/models-ui.d.ts +34 -0
- package/dist/models-ui.js +68 -0
- package/dist/modes.d.ts +80 -0
- package/dist/modes.js +182 -0
- package/dist/monitoring-settings.d.ts +44 -0
- package/dist/monitoring-settings.js +173 -0
- package/dist/monitoring-ui.d.ts +20 -0
- package/dist/monitoring-ui.js +51 -0
- package/dist/monitoring.d.ts +34 -0
- package/dist/monitoring.js +221 -0
- package/dist/names.d.ts +67 -0
- package/dist/names.js +102 -0
- package/dist/observations.d.ts +40 -0
- package/dist/observations.js +211 -0
- package/dist/oidc.d.ts +71 -0
- package/dist/oidc.js +182 -0
- package/dist/onboard.d.ts +108 -0
- package/dist/onboard.js +325 -0
- package/dist/openrouter-models.d.ts +30 -0
- package/dist/openrouter-models.js +120 -0
- package/dist/operate.d.ts +118 -0
- package/dist/operate.js +11321 -0
- package/dist/peek-cli.d.ts +97 -0
- package/dist/peek-cli.js +215 -0
- package/dist/peek.d.ts +134 -0
- package/dist/peek.js +578 -0
- package/dist/phase-routing.d.ts +307 -0
- package/dist/phase-routing.js +658 -0
- package/dist/plan-auto.d.ts +14 -0
- package/dist/plan-auto.js +92 -0
- package/dist/plan.d.ts +186 -0
- package/dist/plan.js +401 -0
- package/dist/planner-source.d.ts +251 -0
- package/dist/planner-source.js +460 -0
- package/dist/planner.d.ts +75 -0
- package/dist/planner.js +992 -0
- package/dist/policy-ui.d.ts +20 -0
- package/dist/policy-ui.js +41 -0
- package/dist/policy.d.ts +111 -0
- package/dist/policy.js +231 -0
- package/dist/prepared-evidence.d.ts +16 -0
- package/dist/prepared-evidence.js +96 -0
- package/dist/pricing.d.ts +45 -0
- package/dist/pricing.js +77 -0
- package/dist/principal.d.ts +42 -0
- package/dist/principal.js +82 -0
- package/dist/probe.d.ts +46 -0
- package/dist/probe.js +79 -0
- package/dist/process-custody.d.ts +17 -0
- package/dist/process-custody.js +91 -0
- package/dist/process-liveness.d.ts +10 -0
- package/dist/process-liveness.js +81 -0
- package/dist/process-recovery-anchor.d.ts +75 -0
- package/dist/process-recovery-anchor.js +188 -0
- package/dist/process-recovery-coalition.d.ts +25 -0
- package/dist/process-recovery-coalition.js +105 -0
- package/dist/process-recovery-eligibility.d.ts +178 -0
- package/dist/process-recovery-eligibility.js +170 -0
- package/dist/process-recovery-native.d.ts +172 -0
- package/dist/process-recovery-native.js +592 -0
- package/dist/process-recovery-provenance.d.ts +163 -0
- package/dist/process-recovery-provenance.js +292 -0
- package/dist/process-recovery-services.d.ts +56 -0
- package/dist/process-recovery-services.js +191 -0
- package/dist/process-recovery-settlement.d.ts +32 -0
- package/dist/process-recovery-settlement.js +132 -0
- package/dist/process-recovery.d.ts +41 -0
- package/dist/process-recovery.js +91 -0
- package/dist/process-tree.d.ts +41 -0
- package/dist/process-tree.js +264 -0
- package/dist/project-access.d.ts +14 -0
- package/dist/project-access.js +34 -0
- package/dist/project-cli.d.ts +18 -0
- package/dist/project-cli.js +104 -0
- package/dist/project-delete-ui.d.ts +22 -0
- package/dist/project-delete-ui.js +48 -0
- package/dist/project-delete.d.ts +55 -0
- package/dist/project-delete.js +413 -0
- package/dist/project-knowledge.d.ts +111 -0
- package/dist/project-knowledge.js +241 -0
- package/dist/project-learning.d.ts +100 -0
- package/dist/project-learning.js +438 -0
- package/dist/project-memory.d.ts +81 -0
- package/dist/project-memory.js +264 -0
- package/dist/project-skills.d.ts +152 -0
- package/dist/project-skills.js +660 -0
- package/dist/project-tools.d.ts +219 -0
- package/dist/project-tools.js +796 -0
- package/dist/project.d.ts +61 -0
- package/dist/project.js +125 -0
- package/dist/prompt.d.ts +22 -0
- package/dist/prompt.js +72 -0
- package/dist/proof.d.ts +513 -0
- package/dist/proof.js +1140 -0
- package/dist/proposal.d.ts +82 -0
- package/dist/proposal.js +210 -0
- package/dist/provider-connection.d.ts +22 -0
- package/dist/provider-connection.js +98 -0
- package/dist/provider-limits.d.ts +35 -0
- package/dist/provider-limits.js +95 -0
- package/dist/provider.d.ts +279 -0
- package/dist/provider.js +935 -0
- package/dist/publish.d.ts +107 -0
- package/dist/publish.js +650 -0
- package/dist/pulls.d.ts +118 -0
- package/dist/pulls.js +240 -0
- package/dist/push.d.ts +95 -0
- package/dist/push.js +353 -0
- package/dist/quality.d.ts +8 -0
- package/dist/quality.js +6 -0
- package/dist/recipe-ui.d.ts +18 -0
- package/dist/recipe-ui.js +152 -0
- package/dist/recipes.d.ts +81 -0
- package/dist/recipes.js +332 -0
- package/dist/remote.d.ts +67 -0
- package/dist/remote.js +122 -0
- package/dist/render.d.ts +64 -0
- package/dist/render.js +587 -0
- package/dist/report-summary.d.ts +13 -0
- package/dist/report-summary.js +15 -0
- package/dist/repos.d.ts +65 -0
- package/dist/repos.js +277 -0
- package/dist/repository-context-ui.d.ts +2 -0
- package/dist/repository-context-ui.js +10 -0
- package/dist/repository-context.d.ts +67 -0
- package/dist/repository-context.js +376 -0
- package/dist/restart-certification.d.ts +134 -0
- package/dist/restart-certification.js +226 -0
- package/dist/result-actions.d.ts +28 -0
- package/dist/result-actions.js +270 -0
- package/dist/result-completion.d.ts +18 -0
- package/dist/result-completion.js +66 -0
- package/dist/result-review.d.ts +213 -0
- package/dist/result-review.js +430 -0
- package/dist/retention-ui.d.ts +12 -0
- package/dist/retention-ui.js +39 -0
- package/dist/retention.d.ts +72 -0
- package/dist/retention.js +288 -0
- package/dist/review-context.d.ts +243 -0
- package/dist/review-context.js +1043 -0
- package/dist/review-evidence.d.ts +33 -0
- package/dist/review-evidence.js +56 -0
- package/dist/reviewer.d.ts +97 -0
- package/dist/reviewer.js +202 -0
- package/dist/routine.d.ts +228 -0
- package/dist/routine.js +764 -0
- package/dist/runner.d.ts +266 -0
- package/dist/runner.js +399 -0
- package/dist/scan.d.ts +32 -0
- package/dist/scan.js +92 -0
- package/dist/scope.d.ts +695 -0
- package/dist/scope.js +1176 -0
- package/dist/scout-report.d.ts +42 -0
- package/dist/scout-report.js +108 -0
- package/dist/scout.d.ts +69 -0
- package/dist/scout.js +351 -0
- package/dist/serve.d.ts +313 -0
- package/dist/serve.js +21776 -0
- package/dist/session-brief.d.ts +8 -0
- package/dist/session-brief.js +24 -0
- package/dist/session-cli.d.ts +13 -0
- package/dist/session-cli.js +284 -0
- package/dist/session-contract.d.ts +183 -0
- package/dist/session-contract.js +122 -0
- package/dist/session-http.d.ts +19 -0
- package/dist/session-http.js +154 -0
- package/dist/session-server.d.ts +12 -0
- package/dist/session-server.js +37 -0
- package/dist/session-service.d.ts +22 -0
- package/dist/session-service.js +157 -0
- package/dist/setup-guide.d.ts +39 -0
- package/dist/setup-guide.js +93 -0
- package/dist/sign-in-guard.d.ts +45 -0
- package/dist/sign-in-guard.js +74 -0
- package/dist/skills-ui.d.ts +11 -0
- package/dist/skills-ui.js +58 -0
- package/dist/skills.d.ts +97 -0
- package/dist/skills.js +276 -0
- package/dist/slack-api.d.ts +55 -0
- package/dist/slack-api.js +229 -0
- package/dist/slack-chat.d.ts +28 -0
- package/dist/slack-chat.js +413 -0
- package/dist/slack-settings.d.ts +7 -0
- package/dist/slack-settings.js +75 -0
- package/dist/slack-state.d.ts +13 -0
- package/dist/slack-state.js +9 -0
- package/dist/slack.d.ts +13 -0
- package/dist/slack.js +167 -0
- package/dist/spend-ui.d.ts +28 -0
- package/dist/spend-ui.js +95 -0
- package/dist/spend.d.ts +142 -0
- package/dist/spend.js +313 -0
- package/dist/sqlite-runtime.d.ts +3 -0
- package/dist/sqlite-runtime.js +6 -0
- package/dist/sso-settings.d.ts +33 -0
- package/dist/sso-settings.js +103 -0
- package/dist/sso-ui.d.ts +22 -0
- package/dist/sso-ui.js +39 -0
- package/dist/storage.d.ts +15 -0
- package/dist/storage.js +84 -0
- package/dist/store.d.ts +7754 -0
- package/dist/store.js +23279 -0
- package/dist/structured-output.d.ts +58 -0
- package/dist/structured-output.js +103 -0
- package/dist/style-asset.d.ts +7 -0
- package/dist/style-asset.js +41 -0
- package/dist/subscription-chat.d.ts +46 -0
- package/dist/subscription-chat.js +275 -0
- package/dist/summary.d.ts +33 -0
- package/dist/summary.js +71 -0
- package/dist/supervisor.mjs +297 -0
- package/dist/surface.d.ts +63 -0
- package/dist/surface.js +352 -0
- package/dist/sync.d.ts +94 -0
- package/dist/sync.js +279 -0
- package/dist/task-composer.d.ts +13 -0
- package/dist/task-composer.js +52 -0
- package/dist/task-control.d.ts +165 -0
- package/dist/task-control.js +214 -0
- package/dist/task-outcome-cli.d.ts +10 -0
- package/dist/task-outcome-cli.js +92 -0
- package/dist/task-text.d.ts +30 -0
- package/dist/task-text.js +41 -0
- package/dist/team-cli.d.ts +15 -0
- package/dist/team-cli.js +618 -0
- package/dist/team-contract.d.ts +92 -0
- package/dist/team-contract.js +1 -0
- package/dist/team-http.d.ts +17 -0
- package/dist/team-http.js +144 -0
- package/dist/team-leads.d.ts +81 -0
- package/dist/team-leads.js +565 -0
- package/dist/team-runtime.d.ts +27 -0
- package/dist/team-runtime.js +264 -0
- package/dist/team-ui.d.ts +3 -0
- package/dist/team-ui.js +9 -0
- package/dist/team-updates.d.ts +8 -0
- package/dist/team-updates.js +57 -0
- package/dist/teammate-admin.d.ts +53 -0
- package/dist/teammate-admin.js +111 -0
- package/dist/teammate-desk.d.ts +60 -0
- package/dist/teammate-desk.js +154 -0
- package/dist/teammate-memory.d.ts +64 -0
- package/dist/teammate-memory.js +196 -0
- package/dist/teammate-question.d.ts +59 -0
- package/dist/teammate-question.js +175 -0
- package/dist/teammate-tools.d.ts +108 -0
- package/dist/teammate-tools.js +271 -0
- package/dist/teammate-week.d.ts +68 -0
- package/dist/teammate-week.js +132 -0
- package/dist/teammate-work.d.ts +76 -0
- package/dist/teammate-work.js +280 -0
- package/dist/teammates-ui.d.ts +20 -0
- package/dist/teammates-ui.js +166 -0
- package/dist/teammates.d.ts +180 -0
- package/dist/teammates.js +253 -0
- package/dist/teams-api.d.ts +33 -0
- package/dist/teams-api.js +204 -0
- package/dist/teams-chat.d.ts +26 -0
- package/dist/teams-chat.js +215 -0
- package/dist/teams-settings.d.ts +12 -0
- package/dist/teams-settings.js +57 -0
- package/dist/teams.d.ts +21 -0
- package/dist/teams.js +124 -0
- package/dist/telegram-flow.d.ts +49 -0
- package/dist/telegram-flow.js +110 -0
- package/dist/telegram-mate.d.ts +137 -0
- package/dist/telegram-mate.js +707 -0
- package/dist/telegram-progress.d.ts +14 -0
- package/dist/telegram-progress.js +129 -0
- package/dist/telegram-settings.d.ts +9 -0
- package/dist/telegram-settings.js +36 -0
- package/dist/telegram-status.d.ts +75 -0
- package/dist/telegram-status.js +265 -0
- package/dist/telegram-team.d.ts +85 -0
- package/dist/telegram-team.js +359 -0
- package/dist/telegram.d.ts +230 -0
- package/dist/telegram.js +1931 -0
- package/dist/templates.d.ts +65 -0
- package/dist/templates.js +118 -0
- package/dist/tool-launcher.d.ts +1 -0
- package/dist/tool-launcher.js +101 -0
- package/dist/tools-ui.d.ts +30 -0
- package/dist/tools-ui.js +40 -0
- package/dist/transitions-recipes.d.ts +1 -0
- package/dist/transitions-recipes.js +203 -0
- package/dist/tree-proof.d.ts +34 -0
- package/dist/tree-proof.js +58 -0
- package/dist/verification-evidence.d.ts +44 -0
- package/dist/verification-evidence.js +238 -0
- package/dist/version.d.ts +2 -0
- package/dist/version.js +10 -0
- package/dist/webhooks.d.ts +91 -0
- package/dist/webhooks.js +283 -0
- package/dist/work-index.d.ts +68 -0
- package/dist/work-index.js +384 -0
- package/dist/work-summary.d.ts +57 -0
- package/dist/work-summary.js +116 -0
- package/dist/workspace-motion.d.ts +4 -0
- package/dist/workspace-motion.js +133 -0
- package/dist/workspace-revision.d.ts +19 -0
- package/dist/workspace-revision.js +92 -0
- package/dist/workspace-ui.d.ts +204 -0
- package/dist/workspace-ui.js +411 -0
- package/dist/worktree-notices.d.ts +13 -0
- package/dist/worktree-notices.js +17 -0
- package/dist/worktree.d.ts +249 -0
- package/dist/worktree.js +720 -0
- package/package.json +122 -0
- package/scripts/canary-assertions.mjs +42 -0
- package/scripts/crash-canary.mjs +253 -0
- package/scripts/fixtures/crash-process.mjs +74 -0
- package/scripts/fixtures/pilot-scenarios.mjs +85 -0
- package/scripts/fixtures/restart-service.mjs +27 -0
- package/scripts/launchd-certification.mjs +143 -0
- package/scripts/pilot.mjs +121 -0
- package/scripts/proof-preflight.mjs +140 -0
- package/scripts/provider-canary.mjs +379 -0
- package/scripts/recovery-canary.mjs +135 -0
- package/scripts/restart-certification.mjs +98 -0
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The read-only roles' clean-tree proof (planner, scout — mate arc §10,
|
|
3
|
+
* v4 review finding 4). `git status --porcelain` alone is not a proof: it
|
|
4
|
+
* omits IGNORED paths, so an agent could leave a generated file behind
|
|
5
|
+
* and pass; and a pathname filter that exempts the protocol files
|
|
6
|
+
* regardless of index status would let an agent `git add` its own
|
|
7
|
+
* handoff and pass with a dirty index. So: ignored paths are snapshotted
|
|
8
|
+
* BEFORE the agent runs and any new one afterwards is foreign; and a
|
|
9
|
+
* protocol file is admitted only as plain untracked (`??`) — staged is
|
|
10
|
+
* foreign. Ignored directories are collapsed by git (`!! build/`), so a
|
|
11
|
+
* write INTO a directory that was already ignored before the agent ran
|
|
12
|
+
* (a dependency tree the setup command produced) is not detected — that
|
|
13
|
+
* residual is stated here rather than wished away.
|
|
14
|
+
*/
|
|
15
|
+
const GIT = "git";
|
|
16
|
+
const STATUS_ARGS = ["--no-optional-locks", "-c", "core.quotePath=false", "status", "--porcelain", "--ignored"];
|
|
17
|
+
/** The ignored paths git reports right now — the "before" of a proof. */
|
|
18
|
+
export async function snapshotIgnored(git, cwd) {
|
|
19
|
+
const status = await git(GIT, [...STATUS_ARGS], { cwd });
|
|
20
|
+
if (status.code !== 0)
|
|
21
|
+
return null;
|
|
22
|
+
const ignored = new Set();
|
|
23
|
+
for (const line of status.stdout.split("\n")) {
|
|
24
|
+
if (line.startsWith("!! "))
|
|
25
|
+
ignored.add(line.slice(3));
|
|
26
|
+
}
|
|
27
|
+
return ignored;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Everything in the tree that is not (a) an ignored path that was already
|
|
31
|
+
* ignored before, (b) one of this attempt's own protocol files as PLAIN
|
|
32
|
+
* untracked, or (c) the pool's untracked lease marker.
|
|
33
|
+
*/
|
|
34
|
+
export async function proveTreeUntouched(git, cwd, args) {
|
|
35
|
+
const status = await git(GIT, [...STATUS_ARGS], { cwd });
|
|
36
|
+
if (status.code !== 0)
|
|
37
|
+
return { ok: false, reason: "git", foreign: [] };
|
|
38
|
+
const foreign = [];
|
|
39
|
+
for (const line of status.stdout.split("\n")) {
|
|
40
|
+
if (line.trim() === "")
|
|
41
|
+
continue;
|
|
42
|
+
const code = line.slice(0, 2);
|
|
43
|
+
const path = line.slice(3);
|
|
44
|
+
if (code === "!!") {
|
|
45
|
+
if (!args.ignoredBefore.has(path))
|
|
46
|
+
foreign.push(path);
|
|
47
|
+
continue;
|
|
48
|
+
}
|
|
49
|
+
const own = args.protocolFiles.includes(path) || path === args.marker;
|
|
50
|
+
// Untracked is the only admissible state for a protocol file: a staged
|
|
51
|
+
// one would survive cleanup in the index and ride into somebody's
|
|
52
|
+
// commit.
|
|
53
|
+
if (own && code === "??")
|
|
54
|
+
continue;
|
|
55
|
+
foreign.push(own ? `${path} (staged)` : path);
|
|
56
|
+
}
|
|
57
|
+
return foreign.length === 0 ? { ok: true } : { ok: false, reason: "dirty-tree", foreign };
|
|
58
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { Artifact, Store, VerifyCommand } from "./store.js";
|
|
2
|
+
import type { VerifyCommandFacts } from "./proof.js";
|
|
3
|
+
import { type AdjudicateResult } from "./proof.js";
|
|
4
|
+
export declare const VERIFICATION_RECEIPT_CAPTURE = "machine verification receipt v1";
|
|
5
|
+
export declare const REVIEW_GATE_NAME = "REVIEW-VERIFICATION.json";
|
|
6
|
+
export declare const isVerificationReceipt: (a: Artifact) => boolean;
|
|
7
|
+
export declare function sealVerificationReceipt(store: Store, root: string, runId: number, head: string, command: VerifyCommand, result: VerifyCommandFacts, now: Date, reusedFrom?: {
|
|
8
|
+
run: number;
|
|
9
|
+
digest: string;
|
|
10
|
+
}): void;
|
|
11
|
+
/** Read and bind existing evidence, never backfill historical receipts. A legacy
|
|
12
|
+
* single-attempt machine header is sufficient only with its exact approved grant
|
|
13
|
+
* and sealed candidate endpoints. Recovery logs without a receipt stay explicit. */
|
|
14
|
+
export declare function verificationEvidence(store: Store, root: string, runId: number): {
|
|
15
|
+
ok: true;
|
|
16
|
+
bytes: string | null;
|
|
17
|
+
digest: string;
|
|
18
|
+
} | {
|
|
19
|
+
ok: false;
|
|
20
|
+
problem: string;
|
|
21
|
+
};
|
|
22
|
+
/** Only a sealed failed check can start unattended diagnosis. Lost custody,
|
|
23
|
+
* changed approvals/trees and incomplete evidence still need attention; they
|
|
24
|
+
* must not become another code-writing attempt. Keep the log out of the small
|
|
25
|
+
* revision artifact and re-read it when the repair builder starts. */
|
|
26
|
+
export declare function failedVerificationEvidence(store: Store, root: string, runId: number): {
|
|
27
|
+
kind: "none";
|
|
28
|
+
} | {
|
|
29
|
+
kind: "unavailable";
|
|
30
|
+
problem: string;
|
|
31
|
+
} | {
|
|
32
|
+
kind: "failed";
|
|
33
|
+
digest: string;
|
|
34
|
+
receipt: string;
|
|
35
|
+
log: string;
|
|
36
|
+
};
|
|
37
|
+
/** A fresh review may assess a pre-upgrade result which stopped solely because
|
|
38
|
+
* no builder proof was written. Read original sealed facts; never run checks,
|
|
39
|
+
* backfill receipts, rewrite artifacts, or reuse a different candidate's gate.
|
|
40
|
+
* Called inside review ingestion, after its exact bindings have been proved. */
|
|
41
|
+
export declare function assessmentFromSavedEvidence(store: Store, root: string, runId: number): AdjudicateResult | null;
|
|
42
|
+
/** Reuse is exclusive to a machine-authored observation revision, with its
|
|
43
|
+
* own current approval and complete new observations. Never synthesize a pass. */
|
|
44
|
+
export declare function reuseObservationVerification(store: Store, root: string, runId: number, now: Date): VerifyCommandFacts | null;
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
// Verified-build assignment completion reuses these gate checks.
|
|
2
|
+
import { observationBrief, readObservationEvidence } from "./observations.js";
|
|
3
|
+
/** Machine verification receipts use the existing sealed artifact store (schema
|
|
4
|
+
* 60). Verbose output is independently bounded; no agent-authored check claim
|
|
5
|
+
* can create or replace this receipt. */
|
|
6
|
+
import { createHash } from "node:crypto";
|
|
7
|
+
import { adjudicate } from "./proof.js";
|
|
8
|
+
import { parseReviewContext, reviewContextCustodyProblem } from "./review-context.js";
|
|
9
|
+
import { readVerifiedArtifact, storeEvidence, scanForSecrets, redactSecretLines } from "./evidence.js";
|
|
10
|
+
export const VERIFICATION_RECEIPT_CAPTURE = "machine verification receipt v1";
|
|
11
|
+
export const REVIEW_GATE_NAME = "REVIEW-VERIFICATION.json";
|
|
12
|
+
const hash = (value) => createHash("sha256").update(JSON.stringify(value)).digest("hex");
|
|
13
|
+
const binding = (a) => ({ artifactId: a.id, sha256: a.sha256, bytesStored: a.bytesStored, bytesOriginal: a.bytesOriginal, truncated: a.truncated, redacted: a.redacted, captureStatus: a.captureStatus });
|
|
14
|
+
export const isVerificationReceipt = (a) => a.kind === "structured-output" && (a.capture === VERIFICATION_RECEIPT_CAPTURE || a.capture === "machine verification reuse v1");
|
|
15
|
+
export function sealVerificationReceipt(store, root, runId, head, command, result, now, reusedFrom) {
|
|
16
|
+
const source = store.getRun(runId);
|
|
17
|
+
const log = store.artifactsFor(runId).find(a => a.kind === "check-log");
|
|
18
|
+
if (!log)
|
|
19
|
+
throw new Error("Verification receipt requires its retained log");
|
|
20
|
+
const raw = JSON.stringify({
|
|
21
|
+
version: reusedFrom === undefined ? 1 : 2, run: runId, head, base: source.baseRevision, scopeDigest: source.scopeDigest,
|
|
22
|
+
...(reusedFrom === undefined ? {} : { reusedFrom, executedHere: false }),
|
|
23
|
+
command, result, log: binding(log),
|
|
24
|
+
}, null, 1);
|
|
25
|
+
const hits = scanForSecrets(raw);
|
|
26
|
+
storeEvidence(store, root, runId, "structured-output", "verification-receipt.json", Buffer.from(hits.length ? redactSecretLines(raw, hits) : raw), reusedFrom === undefined ? VERIFICATION_RECEIPT_CAPTURE : "machine verification reuse v1", now, { captureStatus: "ok", redacted: hits.length > 0 });
|
|
27
|
+
}
|
|
28
|
+
/** Read and bind existing evidence, never backfill historical receipts. A legacy
|
|
29
|
+
* single-attempt machine header is sufficient only with its exact approved grant
|
|
30
|
+
* and sealed candidate endpoints. Recovery logs without a receipt stay explicit. */
|
|
31
|
+
// Recovery reads this existing receipt binding, then requires an actually executed
|
|
32
|
+
// v1 passing gate. This reader does not rerun checks or transfer a prior approval.
|
|
33
|
+
export function verificationEvidence(store, root, runId) {
|
|
34
|
+
const fail = (problem) => ({ ok: false, problem });
|
|
35
|
+
const source = store.getRun(runId);
|
|
36
|
+
if (!source)
|
|
37
|
+
return fail("The verification source run is missing.");
|
|
38
|
+
const repo = store.refById(source.taskRef)?.repo;
|
|
39
|
+
const command = repo ? store.liveVerifyCommand(repo) : null;
|
|
40
|
+
const artifacts = store.artifactsFor(runId);
|
|
41
|
+
const receipts = artifacts.filter(isVerificationReceipt);
|
|
42
|
+
const machine = store.proofVerdictFor(runId);
|
|
43
|
+
const verified = (machine?.machineVerdict ?? machine?.verdict) === "verified";
|
|
44
|
+
if (!command && !receipts.length && !verified)
|
|
45
|
+
return { ok: true, bytes: null, digest: hash(null) };
|
|
46
|
+
if (!command || command.approvedAt > source.startedAt)
|
|
47
|
+
return fail("The original approved verification command is missing or changed.");
|
|
48
|
+
if (receipts.length > 1)
|
|
49
|
+
return fail("The verification receipt is ambiguous.");
|
|
50
|
+
const logs = artifacts.filter(a => a.kind === "check-log");
|
|
51
|
+
if (logs.length !== 1 || logs[0].captureStatus === "failed")
|
|
52
|
+
return fail("One readable machine verification log is required.");
|
|
53
|
+
const log = logs[0];
|
|
54
|
+
const read = readVerifiedArtifact(root, log);
|
|
55
|
+
if (!read.ok)
|
|
56
|
+
return fail("The retained verification log no longer verifies.");
|
|
57
|
+
let receipt;
|
|
58
|
+
if (receipts.length) {
|
|
59
|
+
const artifact = receipts[0];
|
|
60
|
+
if (artifact.truncated || artifact.redacted || artifact.captureStatus === "failed")
|
|
61
|
+
return fail("The verification receipt is incomplete.");
|
|
62
|
+
const sealed = readVerifiedArtifact(root, artifact);
|
|
63
|
+
if (!sealed.ok)
|
|
64
|
+
return fail("The verification receipt no longer verifies.");
|
|
65
|
+
try {
|
|
66
|
+
receipt = JSON.parse(sealed.content.toString("utf8"));
|
|
67
|
+
}
|
|
68
|
+
catch {
|
|
69
|
+
return fail("The verification receipt cannot be read.");
|
|
70
|
+
}
|
|
71
|
+
if ((receipt?.version !== 1 && receipt?.version !== 2) || receipt.run !== runId || receipt.head !== source.headRevision || receipt.base !== source.baseRevision || receipt.scopeDigest !== source.scopeDigest || JSON.stringify(receipt.command) !== JSON.stringify(command) || JSON.stringify(receipt.log) !== JSON.stringify(binding(log)))
|
|
72
|
+
return fail("The candidate, approved command or retained log changed since verification.");
|
|
73
|
+
if (receipt.version === 2) {
|
|
74
|
+
try {
|
|
75
|
+
const brief = observationBrief(store, root, source.taskRef);
|
|
76
|
+
const reused = receipt.reusedFrom;
|
|
77
|
+
if (!brief || !readObservationEvidence(store, root, runId) || !reused || reused.run !== brief.sourceRun || reused.run >= runId || reused.digest !== brief.gateDigest ||
|
|
78
|
+
source.baseRevision !== brief.head || source.headRevision !== brief.head || receipt.executedHere !== false)
|
|
79
|
+
return fail("The reused gate is not bound to an unchanged observation follow-up.");
|
|
80
|
+
const original = verificationEvidence(store, root, reused.run);
|
|
81
|
+
if (!original.ok || !original.bytes || original.digest !== reused.digest)
|
|
82
|
+
return fail("The original passing gate no longer verifies.");
|
|
83
|
+
const previous = JSON.parse(original.bytes);
|
|
84
|
+
const originalLog = store.getArtifact(previous.log.artifactId);
|
|
85
|
+
if (previous.head !== source.headRevision || previous.result.exitCode !== 0 || JSON.stringify(previous.command) !== JSON.stringify(command) ||
|
|
86
|
+
JSON.stringify(previous.result) !== JSON.stringify(receipt.result) || originalLog?.sha256 !== log.sha256 ||
|
|
87
|
+
originalLog.bytesOriginal !== log.bytesOriginal || originalLog.redacted !== log.redacted || originalLog.truncated !== log.truncated)
|
|
88
|
+
return fail("The reused gate's candidate, command, result or copied log changed.");
|
|
89
|
+
}
|
|
90
|
+
catch {
|
|
91
|
+
return fail("The reused gate or its observations no longer verify.");
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
else if (receipt.reusedFrom !== undefined)
|
|
95
|
+
return fail("The gate reuse receipt has an unsupported version.");
|
|
96
|
+
const result = receipt.result;
|
|
97
|
+
if (result?.configured !== true || typeof result.ran !== "boolean" || (result.ran ? !Number.isInteger(result.exitCode) || result.exitCode < 0 || result.exitCode > 255 : result.attemptFailed !== true))
|
|
98
|
+
return fail("The machine verification result is malformed.");
|
|
99
|
+
if (verified && (!result.ran || result.exitCode !== 0))
|
|
100
|
+
return fail("The passing machine verdict disagrees with its verification receipt.");
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
const stat = artifacts.filter(a => a.kind === "diff-stat");
|
|
104
|
+
if (stat.length !== 1 || stat[0].truncated || stat[0].captureStatus === "failed")
|
|
105
|
+
return fail("Legacy verification has no exact candidate inventory.");
|
|
106
|
+
const readStat = readVerifiedArtifact(root, stat[0]);
|
|
107
|
+
if (!readStat.ok)
|
|
108
|
+
return fail("Legacy candidate inventory no longer verifies.");
|
|
109
|
+
let endpoints;
|
|
110
|
+
try {
|
|
111
|
+
endpoints = JSON.parse(readStat.content.toString("utf8"));
|
|
112
|
+
}
|
|
113
|
+
catch {
|
|
114
|
+
return fail("Legacy candidate inventory is unreadable.");
|
|
115
|
+
}
|
|
116
|
+
if (!source.headRevision || endpoints.head !== source.headRevision || endpoints.base !== source.baseRevision || endpoints.filesTruncated !== false)
|
|
117
|
+
return fail("Legacy verification candidate endpoints do not match.");
|
|
118
|
+
const text = read.content.toString("utf8");
|
|
119
|
+
const header = /^=== Attempt summary ===\n- Project check · attempt 1: \(exit (\d+)\)\n\n=== Project check · attempt 1 ===\n/.exec(text);
|
|
120
|
+
const exitCode = header ? Number(header[1]) : -1;
|
|
121
|
+
if (!header || exitCode > 255 || !text.startsWith(`${header[0]}$ ${command.command}\n(exit ${exitCode})\n\n--- stdout ---\n`))
|
|
122
|
+
return fail("The original log lacks an unambiguous machine gate receipt; historical output was not reconstructed.");
|
|
123
|
+
if (verified && exitCode !== 0)
|
|
124
|
+
return fail("The passing machine verdict disagrees with the original failed check.");
|
|
125
|
+
receipt = { version: 1, source: "legacy machine log header", run: runId, head: source.headRevision, base: source.baseRevision, scopeDigest: source.scopeDigest, command, result: { configured: true, ran: true, exitCode }, log: binding(log), candidate: binding(stat[0]) };
|
|
126
|
+
}
|
|
127
|
+
// The view preserves shortened/redacted status and does not claim the omitted
|
|
128
|
+
// output exists. Its fingerprint is re-proved before every turn and ingestion.
|
|
129
|
+
const bytes = JSON.stringify(receipt);
|
|
130
|
+
return { ok: true, bytes, digest: hash({ receipt, receipts }) };
|
|
131
|
+
}
|
|
132
|
+
/** Only a sealed failed check can start unattended diagnosis. Lost custody,
|
|
133
|
+
* changed approvals/trees and incomplete evidence still need attention; they
|
|
134
|
+
* must not become another code-writing attempt. Keep the log out of the small
|
|
135
|
+
* revision artifact and re-read it when the repair builder starts. */
|
|
136
|
+
export function failedVerificationEvidence(store, root, runId) {
|
|
137
|
+
if (!store.artifactsFor(runId).some(isVerificationReceipt))
|
|
138
|
+
return { kind: "none" };
|
|
139
|
+
const verified = verificationEvidence(store, root, runId);
|
|
140
|
+
if (!verified.ok)
|
|
141
|
+
return { kind: "unavailable", problem: verified.problem };
|
|
142
|
+
if (verified.bytes === null)
|
|
143
|
+
return { kind: "none" };
|
|
144
|
+
const receipt = JSON.parse(verified.bytes);
|
|
145
|
+
const result = receipt.result;
|
|
146
|
+
if (!result.configured || (result.ran ? result.exitCode === 0 :
|
|
147
|
+
result.failure !== "timed-out" && result.failure !== "retry-timed-out"))
|
|
148
|
+
return { kind: "none" };
|
|
149
|
+
const artifact = store.getArtifact(receipt.log.artifactId);
|
|
150
|
+
if (!artifact || artifact.truncated || artifact.redacted || artifact.captureStatus !== "ok") {
|
|
151
|
+
return { kind: "unavailable", problem: "Automatic repair needs the complete, unredacted failed-check log." };
|
|
152
|
+
}
|
|
153
|
+
const read = readVerifiedArtifact(root, artifact);
|
|
154
|
+
if (!read.ok)
|
|
155
|
+
return { kind: "unavailable", problem: "The failed-check log no longer verifies." };
|
|
156
|
+
return { kind: "failed", digest: verified.digest, receipt: verified.bytes, log: read.content.toString("utf8") };
|
|
157
|
+
}
|
|
158
|
+
/** A fresh review may assess a pre-upgrade result which stopped solely because
|
|
159
|
+
* no builder proof was written. Read original sealed facts; never run checks,
|
|
160
|
+
* backfill receipts, rewrite artifacts, or reuse a different candidate's gate.
|
|
161
|
+
* Called inside review ingestion, after its exact bindings have been proved. */
|
|
162
|
+
export function assessmentFromSavedEvidence(store, root, runId) {
|
|
163
|
+
const previous = store.proofVerdictFor(runId);
|
|
164
|
+
if (previous?.verdict !== "short" || previous.reasons.length !== 1 || previous.reasons[0] !== "no proof was written" ||
|
|
165
|
+
previous.matrix.some(row => row.review !== null || row.assessment !== undefined))
|
|
166
|
+
return null;
|
|
167
|
+
const source = store.getRun(runId);
|
|
168
|
+
if (!source?.headRevision || !source.baseRevision)
|
|
169
|
+
return null;
|
|
170
|
+
const task = store.externalIdFor(source.taskRef);
|
|
171
|
+
const scope = task === null ? null : store.getScope(task);
|
|
172
|
+
if (!scope || scope.digest !== source.scopeDigest || scope.acceptance.length === 0)
|
|
173
|
+
return null;
|
|
174
|
+
const artifacts = store.artifactsFor(runId);
|
|
175
|
+
if (artifacts.some(one => one.kind === "proof"))
|
|
176
|
+
return null;
|
|
177
|
+
const readOne = (kind) => {
|
|
178
|
+
const found = artifacts.filter(one => one.kind === kind);
|
|
179
|
+
if (found.length !== 1 || found[0].truncated || found[0].redacted || found[0].captureStatus === "failed")
|
|
180
|
+
return null;
|
|
181
|
+
const read = readVerifiedArtifact(root, found[0]);
|
|
182
|
+
return read.ok ? read.content.toString("utf8") : null;
|
|
183
|
+
};
|
|
184
|
+
const diff = readOne("terminal-diff"), stat = readOne("diff-stat"), handoff = readOne("handoff"), context = readOne("review-context");
|
|
185
|
+
if (diff === null || stat === null || handoff === null || context === null)
|
|
186
|
+
return null;
|
|
187
|
+
const parsedContext = parseReviewContext(context);
|
|
188
|
+
if (!parsedContext.ok || parsedContext.inventory.run !== runId || reviewContextCustodyProblem(store, root, parsedContext.inventory) !== null)
|
|
189
|
+
return null;
|
|
190
|
+
const gate = verificationEvidence(store, root, runId);
|
|
191
|
+
if (!gate.ok || gate.bytes === null)
|
|
192
|
+
return null;
|
|
193
|
+
try {
|
|
194
|
+
const inventory = JSON.parse(stat), receipt = JSON.parse(gate.bytes);
|
|
195
|
+
const base = source.branch ? store.firstBuilderBase(source.taskRef, source.branch) ?? source.baseRevision : source.baseRevision;
|
|
196
|
+
if (inventory.schema !== 1 || inventory.head !== source.headRevision || inventory.base !== base || inventory.filesTruncated !== false ||
|
|
197
|
+
!Array.isArray(inventory.files) || inventory.fileCount !== inventory.files.length || !inventory.files.every((one) => typeof one?.path === "string") ||
|
|
198
|
+
new Set(inventory.files.map((one) => one.path)).size !== inventory.files.length)
|
|
199
|
+
return null;
|
|
200
|
+
return adjudicate({ directAssessment: true, proofArtifactPresent: false, proofParse: null,
|
|
201
|
+
handoffPresent: true, terminalDiffPresent: true, terminalDiffCaptureStatus: "ok",
|
|
202
|
+
diffStat: { captured: true, truncated: false, paths: new Set(inventory.files.map((one) => one.path)) },
|
|
203
|
+
verifyCommand: receipt.result, verificationCommand: receipt.command.command, screenshots: [],
|
|
204
|
+
approvedCriteria: scope.acceptance, reviewContext: parsedContext.inventory.coverage });
|
|
205
|
+
}
|
|
206
|
+
catch {
|
|
207
|
+
return null;
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
/** Reuse is exclusive to a machine-authored observation revision, with its
|
|
211
|
+
* own current approval and complete new observations. Never synthesize a pass. */
|
|
212
|
+
export function reuseObservationVerification(store, root, runId, now) {
|
|
213
|
+
const run = store.getRun(runId);
|
|
214
|
+
if (!run)
|
|
215
|
+
throw Error("The observation run is missing.");
|
|
216
|
+
const brief = observationBrief(store, root, run.taskRef);
|
|
217
|
+
if (!brief)
|
|
218
|
+
return null;
|
|
219
|
+
const scope = store.getScope(store.externalIdFor(run.taskRef));
|
|
220
|
+
if (!scope || scope.digest !== run.scopeDigest || scope.approvedDigest !== scope.digest || run.baseRevision !== brief.head || run.headRevision !== brief.head ||
|
|
221
|
+
!readObservationEvidence(store, root, runId))
|
|
222
|
+
throw Error("Only complete observations for the unchanged approved candidate can reuse its gate.");
|
|
223
|
+
const original = verificationEvidence(store, root, brief.sourceRun);
|
|
224
|
+
if (!original.ok || !original.bytes || original.digest !== brief.gateDigest)
|
|
225
|
+
throw Error("The original passing gate is unavailable or changed.");
|
|
226
|
+
const receipt = JSON.parse(original.bytes), log = store.getArtifact(receipt.log.artifactId);
|
|
227
|
+
if (!log || receipt.head !== brief.head || receipt.result?.ran !== true || receipt.result.exitCode !== 0)
|
|
228
|
+
throw Error("The source gate did not pass this candidate.");
|
|
229
|
+
const read = readVerifiedArtifact(root, log);
|
|
230
|
+
if (!read.ok)
|
|
231
|
+
throw Error("The original check log no longer verifies.");
|
|
232
|
+
if (store.artifactsFor(runId).some(a => a.kind === "check-log" || isVerificationReceipt(a)))
|
|
233
|
+
throw Error("This attempt already has a gate; it cannot be replaced.");
|
|
234
|
+
storeEvidence(store, root, runId, "check-log", "check-log.txt", read.content, `Reused unchanged passing checks from run #${brief.sourceRun}; no full command executed in this attempt`, now, { captureStatus: "ok", redacted: log.redacted, sourceBytesOriginal: log.bytesOriginal });
|
|
235
|
+
sealVerificationReceipt(store, root, runId, brief.head, receipt.command, receipt.result, now, { run: brief.sourceRun, digest: brief.gateDigest });
|
|
236
|
+
store.addRunNote(runId, "Toolroll", `Reused the passing project checks from run #${brief.sourceRun} for the unchanged candidate. This attempt collected only the missing focused observations.`, now);
|
|
237
|
+
return receipt.result;
|
|
238
|
+
}
|
package/dist/version.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { readFileSync } from "node:fs";
|
|
2
|
+
/** The package's own version, read from package.json beside dist/ or src/ — one source, never a literal. */
|
|
3
|
+
export const PACKAGE_VERSION = (() => {
|
|
4
|
+
try {
|
|
5
|
+
return String(JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8")).version ?? "0.0.0");
|
|
6
|
+
}
|
|
7
|
+
catch {
|
|
8
|
+
return "0.0.0";
|
|
9
|
+
}
|
|
10
|
+
})();
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import type { Notification, Store } from "./store.js";
|
|
2
|
+
export declare const SLACK_ENV = "TOOLROLL_SLACK_WEBHOOK";
|
|
3
|
+
export declare const DISCORD_ENV = "TOOLROLL_DISCORD_WEBHOOK";
|
|
4
|
+
export declare const CONSOLE_URL_ENV = "TOOLROLL_CONSOLE_URL";
|
|
5
|
+
export declare const PRIMARY_ENV = "TOOLROLL_MESSAGING_PRIMARY";
|
|
6
|
+
export type WebhookKind = "slack" | "discord";
|
|
7
|
+
export type WebhookTarget = {
|
|
8
|
+
kind: WebhookKind;
|
|
9
|
+
url: string;
|
|
10
|
+
};
|
|
11
|
+
export type MessagingChannel = "telegram" | "slack" | "discord" | "teams";
|
|
12
|
+
export declare const MESSAGING_CHANNELS: readonly MessagingChannel[];
|
|
13
|
+
export declare function isMessagingChannel(value: string): value is MessagingChannel;
|
|
14
|
+
export declare function saveWebhook(dir: string, kind: WebhookKind, url: string): {
|
|
15
|
+
ok: true;
|
|
16
|
+
} | {
|
|
17
|
+
ok: false;
|
|
18
|
+
message: string;
|
|
19
|
+
};
|
|
20
|
+
export declare function clearWebhook(dir: string, kind: WebhookKind): void;
|
|
21
|
+
export declare function saveConsoleUrl(dir: string, url: string): {
|
|
22
|
+
ok: true;
|
|
23
|
+
} | {
|
|
24
|
+
ok: false;
|
|
25
|
+
message: string;
|
|
26
|
+
};
|
|
27
|
+
/** Every configured mirror. Environment wins over files, like the bot token. */
|
|
28
|
+
export declare function loadWebhookTargets(env: Record<string, string | undefined>, dir: string): WebhookTarget[];
|
|
29
|
+
/** The operator's explicit choice of which service carries the pages. */
|
|
30
|
+
export declare function savePrimary(dir: string, channel: MessagingChannel): void;
|
|
31
|
+
export declare function loadPrimary(env: Record<string, string | undefined>, dir: string): MessagingChannel | null;
|
|
32
|
+
/**
|
|
33
|
+
* Which service actually carries the pages, and whether that was chosen or
|
|
34
|
+
* merely fell out of what happens to be configured. Explicit choice wins
|
|
35
|
+
* WHEN its channel is actually configured (a primary pointing at nothing
|
|
36
|
+
* falls through rather than silencing every page); otherwise Telegram if
|
|
37
|
+
* present (it can hold buttons), else the mirrors. `implicit` is the flag
|
|
38
|
+
* every status surface uses to say "you have several — pick one".
|
|
39
|
+
*/
|
|
40
|
+
export declare function effectivePrimary(env: Record<string, string | undefined>, dir: string, telegramConfigured: boolean): {
|
|
41
|
+
channel: MessagingChannel | null;
|
|
42
|
+
implicit: boolean;
|
|
43
|
+
configured: MessagingChannel[];
|
|
44
|
+
};
|
|
45
|
+
export declare function loadConsoleUrl(env: Record<string, string | undefined>, dir: string): string | null;
|
|
46
|
+
/**
|
|
47
|
+
* The origin a phone link may open, or null. The SAME console-url setting
|
|
48
|
+
* the mirrors use — read again on every call, never cached, so a changed or
|
|
49
|
+
* removed setting stops the next link — held to a stricter shape than a
|
|
50
|
+
* mirror link: exactly an https origin (no credentials, path, query,
|
|
51
|
+
* fragment), not loopback, and, when the console this process co-hosts
|
|
52
|
+
* states its own `--public-url`, exactly that origin. A model, a Host
|
|
53
|
+
* header or a proposal field never supplies it, and nothing here probes
|
|
54
|
+
* the address: a valid shape is a place to send a person, not a promise
|
|
55
|
+
* that it answers.
|
|
56
|
+
*/
|
|
57
|
+
export declare function phoneOrigin(env: Record<string, string | undefined>, dir: string, options?: {
|
|
58
|
+
serverOrigin?: string | null;
|
|
59
|
+
}): string | null;
|
|
60
|
+
/** Where in the console this notification wants a person. */
|
|
61
|
+
export declare function linkFor(consoleUrl: string | null, notification: Notification): string | null;
|
|
62
|
+
/**
|
|
63
|
+
* One notification, one platform. The payloads are the simplest thing each
|
|
64
|
+
* platform documents; the console link is the call to action, because the
|
|
65
|
+
* message is a mirror and the UI is the instrument.
|
|
66
|
+
*/
|
|
67
|
+
export declare function postWebhook(target: WebhookTarget, notification: Notification, link: string | null, fetcher?: typeof fetch): Promise<{
|
|
68
|
+
ok: true;
|
|
69
|
+
} | {
|
|
70
|
+
ok: false;
|
|
71
|
+
error: string;
|
|
72
|
+
}>;
|
|
73
|
+
export type WebhookReport = {
|
|
74
|
+
sent: number;
|
|
75
|
+
problems: string[];
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* Deliver every pending notification to every configured mirror, through
|
|
79
|
+
* the SAME claim/finalize discipline as every other deliverer — so a
|
|
80
|
+
* webhook pass and a Telegram bridge can never both own one row. This
|
|
81
|
+
* pass runs when Telegram is NOT configured; with a paired Telegram chat,
|
|
82
|
+
* Telegram remains the delivery channel (it can carry buttons) and these
|
|
83
|
+
* mirrors stay silent rather than double-paging every phone.
|
|
84
|
+
*/
|
|
85
|
+
export declare function webhookPass(store: Store, options: {
|
|
86
|
+
targets: WebhookTarget[];
|
|
87
|
+
consoleUrl: string | null;
|
|
88
|
+
owner?: string;
|
|
89
|
+
clock?: () => Date;
|
|
90
|
+
fetcher?: typeof fetch;
|
|
91
|
+
}): Promise<WebhookReport>;
|