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,143 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* The disposable macOS launchd certificate (docs/PROCESS_CONTAINMENT_PLAN.md,
|
|
4
|
+
* acceptance 5). It INSTALLS A DISPOSABLE LaunchAgent under a throwaway
|
|
5
|
+
* label in the current user's gui domain, so it runs only where an operator
|
|
6
|
+
* decided to run it:
|
|
7
|
+
*
|
|
8
|
+
* npm run certify:launchd -- [--observe-ms 60000] [--output <file>] [--keep]
|
|
9
|
+
*
|
|
10
|
+
* With the shared unit generator (daemon.ts, the same document the CLI
|
|
11
|
+
* daemon and the desktop service use) it proves, against the real launchd:
|
|
12
|
+
* 1. automatic relaunch after an UNEXPECTED CLEAN EXIT (exit 0) — with no
|
|
13
|
+
* manual kickstart: the certificate only watches;
|
|
14
|
+
* 2. automatic relaunch after SIGKILL;
|
|
15
|
+
* 3. explicit stop (bootout + disable) stays down beyond the throttle, and
|
|
16
|
+
* a start (enable + bootstrap) comes back with a FRESH incarnation and
|
|
17
|
+
* exactly one writer at a time — no duplicate;
|
|
18
|
+
* 4. observation beyond ThrottleInterval (at least 60 s in total).
|
|
19
|
+
* It then boots the disposable label out, re-enables it (leaving no
|
|
20
|
+
* disabled record behind) and removes its plist. Nothing here touches an
|
|
21
|
+
* installed Toolroll service, a database, or another label.
|
|
22
|
+
*/
|
|
23
|
+
import { existsSync, mkdirSync, readdirSync, readFileSync, realpathSync, rmSync, writeFileSync } from "node:fs";
|
|
24
|
+
import { mkdtemp } from "node:fs/promises";
|
|
25
|
+
import { tmpdir } from "node:os";
|
|
26
|
+
import { dirname, join, resolve } from "node:path";
|
|
27
|
+
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
28
|
+
|
|
29
|
+
const root = resolve(dirname(fileURLToPath(import.meta.url)), "..");
|
|
30
|
+
if (process.platform !== "darwin") { console.error("the launchd certificate runs on macOS only; Linux/Windows service behaviour is covered by the generation tests and the restart certificate"); process.exit(2); }
|
|
31
|
+
let observeMs = 60_000;
|
|
32
|
+
let output = resolve("output/certification/launchd.json");
|
|
33
|
+
let keep = false;
|
|
34
|
+
for (let index = 2; index < process.argv.length; index++) {
|
|
35
|
+
const arg = process.argv[index];
|
|
36
|
+
if (arg === "--keep") keep = true;
|
|
37
|
+
else if (arg === "--observe-ms") observeMs = Number(process.argv[++index]);
|
|
38
|
+
else if (arg === "--output") output = resolve(process.argv[++index]);
|
|
39
|
+
else if (arg === "--help") { console.log("npm run certify:launchd -- [--observe-ms 60000] [--output <file>] [--keep]"); process.exit(0); }
|
|
40
|
+
else throw new Error(`unknown argument ${arg}`);
|
|
41
|
+
}
|
|
42
|
+
if (!Number.isFinite(observeMs) || observeMs < 60_000) throw new Error("--observe-ms must be at least 60000: the throttle is 15 s and the assertion must outlast it");
|
|
43
|
+
|
|
44
|
+
const { launchdPlist, installLaunchdService, stopLaunchdService, daemonStatus } = await import(pathToFileURL(resolve(root, "dist/daemon.js")));
|
|
45
|
+
const { run } = await import(pathToFileURL(resolve(root, "dist/exec.js")));
|
|
46
|
+
|
|
47
|
+
const sleep = ms => new Promise(resolvePromise => setTimeout(resolvePromise, ms));
|
|
48
|
+
const state = realpathSync(await mkdtemp(join(tmpdir(), "so-launchd-cert-")));
|
|
49
|
+
const label = `com.standing-orders.certificate.${state.split("-").pop()}`;
|
|
50
|
+
const uid = process.getuid();
|
|
51
|
+
const service = `gui/${uid}/${label}`;
|
|
52
|
+
const home = process.env["HOME"];
|
|
53
|
+
const definition = {
|
|
54
|
+
platform: "darwin",
|
|
55
|
+
label,
|
|
56
|
+
unitPath: join(home, "Library", "LaunchAgents", `${label}.plist`),
|
|
57
|
+
unitContent: launchdPlist({ label, command: [process.execPath, resolve(root, "scripts/fixtures/restart-service.mjs")], workingDirectory: state, pathEnv: dirname(process.execPath), logPath: join(state, "service.log"), environment: { SO_CERT_STATE: state } }),
|
|
58
|
+
logPath: join(state, "service.log"),
|
|
59
|
+
bin: process.execPath,
|
|
60
|
+
entry: resolve(root, "scripts/fixtures/restart-service.mjs"),
|
|
61
|
+
};
|
|
62
|
+
const supervise = (file, args) => run(file, args, { timeoutMs: 30_000 });
|
|
63
|
+
const heartbeat = () => { try { return JSON.parse(readFileSync(join(state, "heartbeat.json"), "utf8")); } catch { return null; } };
|
|
64
|
+
const alive = pid => { try { process.kill(pid, 0); return true; } catch { return false; } };
|
|
65
|
+
async function until(predicate, ms, what) {
|
|
66
|
+
const end = Date.now() + ms;
|
|
67
|
+
while (Date.now() < end) { const value = predicate(); if (value) return value; await sleep(100); }
|
|
68
|
+
throw new Error(`timed out waiting for ${what}`);
|
|
69
|
+
}
|
|
70
|
+
/** Writers that beat inside a window: exactly one pid at a time means no duplicate controller. */
|
|
71
|
+
const writersWithin = ms => { const now = Date.now(); return readdirSync(join(state, "writers")).filter(name => now - Number(readFileSync(join(state, "writers", name), "utf8")) < ms).map(name => Number(name.split("-")[0])); };
|
|
72
|
+
|
|
73
|
+
const started = Date.now();
|
|
74
|
+
const steps = [];
|
|
75
|
+
const step = (name, ok, detail) => { steps.push({ name, ok, detail, at: new Date().toISOString() }); console.log(`${ok ? "ok " : "FAIL"} ${name}: ${detail}`); if (!ok) throw new Error(`${name}: ${detail}`); };
|
|
76
|
+
let installed = false;
|
|
77
|
+
try {
|
|
78
|
+
mkdirSync(join(state, "writers"), { recursive: true });
|
|
79
|
+
const first = await installLaunchdService(definition, supervise);
|
|
80
|
+
installed = true;
|
|
81
|
+
step("install", first.ok, first.ok ? `${first.action} ${label}` : first.message);
|
|
82
|
+
const beat1 = await until(() => heartbeat(), 20_000, "the first heartbeat");
|
|
83
|
+
step("first-incarnation", alive(beat1.pid), `pid ${beat1.pid} incarnation ${beat1.incarnation}`);
|
|
84
|
+
|
|
85
|
+
// 1. Unexpected clean exit: the fixture exits 0 on request. NO kickstart
|
|
86
|
+
// from here — launchd alone must bring it back (KeepAlive=true, after
|
|
87
|
+
// ThrottleInterval).
|
|
88
|
+
writeFileSync(join(state, "exit-now"), "");
|
|
89
|
+
await until(() => !alive(beat1.pid), 10_000, "the clean exit");
|
|
90
|
+
const beat2 = await until(() => { const b = heartbeat(); return b !== null && b.incarnation !== beat1.incarnation && alive(b.pid) ? b : null; }, 45_000, "the relaunch after exit 0");
|
|
91
|
+
step("relaunch-after-clean-exit", beat2.pid !== beat1.pid, `launchd relaunched after exit 0 without a kickstart: pid ${beat1.pid} → ${beat2.pid}, incarnation ${beat2.incarnation}`);
|
|
92
|
+
|
|
93
|
+
// 2. Crash: SIGKILL the running incarnation.
|
|
94
|
+
process.kill(beat2.pid, "SIGKILL");
|
|
95
|
+
await until(() => !alive(beat2.pid), 10_000, "the kill");
|
|
96
|
+
const beat3 = await until(() => { const b = heartbeat(); return b !== null && b.incarnation !== beat2.incarnation && alive(b.pid) ? b : null; }, 45_000, "the relaunch after SIGKILL");
|
|
97
|
+
step("relaunch-after-sigkill", beat3.pid !== beat2.pid, `launchd relaunched after SIGKILL: pid ${beat2.pid} → ${beat3.pid}`);
|
|
98
|
+
|
|
99
|
+
// 3. Explicit stop stays down beyond the throttle; start brings a fresh
|
|
100
|
+
// incarnation with exactly one writer.
|
|
101
|
+
const stopped = await stopLaunchdService(definition, supervise);
|
|
102
|
+
step("explicit-stop", stopped.wasLoaded, "bootout + disable");
|
|
103
|
+
await until(() => !alive(beat3.pid), 10_000, "the stop to end the process");
|
|
104
|
+
await sleep(20_000);
|
|
105
|
+
const afterStop = heartbeat();
|
|
106
|
+
step("stays-down", afterStop !== null && afterStop.incarnation === beat3.incarnation && !alive(afterStop.pid), `no relaunch 20 s after an explicit stop (last incarnation ${afterStop?.incarnation})`);
|
|
107
|
+
const status = await daemonStatus(definition, supervise);
|
|
108
|
+
step("status-disabled", status.state === "disabled", `status reads ${status.state}: ${status.detail}`);
|
|
109
|
+
const again = await installLaunchdService(definition, supervise);
|
|
110
|
+
step("start-again", again.ok, again.ok ? `${again.action} (changed=${again.changed})` : again.message);
|
|
111
|
+
const beat4 = await until(() => { const b = heartbeat(); return b !== null && b.incarnation !== beat3.incarnation && alive(b.pid) ? b : null; }, 30_000, "the fresh incarnation after start");
|
|
112
|
+
await sleep(1_500);
|
|
113
|
+
const writers = [...new Set(writersWithin(1_000))];
|
|
114
|
+
step("one-writer", writers.length === 1 && writers[0] === beat4.pid, `writers beating in the last second: ${writers.join(", ") || "none"} (fresh incarnation ${beat4.incarnation})`);
|
|
115
|
+
const idempotent = await installLaunchdService(definition, supervise);
|
|
116
|
+
await sleep(1_500);
|
|
117
|
+
step("idempotent-start", idempotent.ok && idempotent.action === "started" && heartbeat().incarnation === beat4.incarnation, `a second start on a running unchanged definition left pid ${beat4.pid} alone (${idempotent.ok ? idempotent.action : idempotent.message})`);
|
|
118
|
+
|
|
119
|
+
// 4. Observe beyond the throttle.
|
|
120
|
+
const remaining = observeMs - (Date.now() - started);
|
|
121
|
+
if (remaining > 0) await sleep(remaining);
|
|
122
|
+
const final = heartbeat();
|
|
123
|
+
step("observed-beyond-throttle", final !== null && alive(final.pid) && Date.now() - started >= observeMs, `observed ${Math.round((Date.now() - started) / 1000)} s (throttle 15 s); live pid ${final?.pid}`);
|
|
124
|
+
} catch (error) {
|
|
125
|
+
steps.push({ name: "error", ok: false, detail: String(error), at: new Date().toISOString() });
|
|
126
|
+
console.error(String(error));
|
|
127
|
+
} finally {
|
|
128
|
+
if (installed && !keep) {
|
|
129
|
+
await stopLaunchdService(definition, supervise);
|
|
130
|
+
// Leave no disabled record for a label that no longer exists.
|
|
131
|
+
await supervise("launchctl", ["enable", service]);
|
|
132
|
+
try { rmSync(definition.unitPath); } catch { /* already gone */ }
|
|
133
|
+
}
|
|
134
|
+
const ok = steps.every(one => one.ok);
|
|
135
|
+
mkdirSync(dirname(output), { recursive: true });
|
|
136
|
+
writeFileSync(output, `${JSON.stringify({ ok, label, state: keep ? state : null, node: process.version, observedMs: Date.now() - started, steps, limits: [
|
|
137
|
+
"this certifies launchd's automatic relaunch and the shared unit's lifecycle for a disposable label in this user's gui domain",
|
|
138
|
+
"it does not reboot; LaunchAgents resume at user login after a reboot, not before FileVault unlock/login",
|
|
139
|
+
] }, null, 2)}\n`);
|
|
140
|
+
if (!keep) rmSync(state, { recursive: true, force: true });
|
|
141
|
+
console.log(`${ok ? "PASS" : "FAIL"} — launchd certificate written to ${output}`);
|
|
142
|
+
process.exit(ok ? 0 : 1);
|
|
143
|
+
}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/** Twenty real subscription tasks under preapproved fixture contracts, with explicit lead completion. */
|
|
3
|
+
import assert from 'node:assert/strict';
|
|
4
|
+
import {spawn} from 'node:child_process';
|
|
5
|
+
import {createHash,randomUUID} from 'node:crypto';
|
|
6
|
+
import {mkdir,mkdtemp,readFile,readdir,realpath,writeFile} from 'node:fs/promises';
|
|
7
|
+
import {join,dirname,resolve} from 'node:path';
|
|
8
|
+
import {tmpdir} from 'node:os';
|
|
9
|
+
import {fileURLToPath} from 'node:url';
|
|
10
|
+
import {scenario,scenarioIds} from './fixtures/pilot-scenarios.mjs';
|
|
11
|
+
import {createFixtureLead,completeFixtureAssignment} from './canary-assertions.mjs';
|
|
12
|
+
const root=resolve(dirname(fileURLToPath(import.meta.url)),'..');
|
|
13
|
+
let output=resolve('output/certification/pilot.json'), concurrency=4, playwright=null, selected=scenarioIds, providers=['claude','codex'];
|
|
14
|
+
for(let i=2;i<process.argv.length;i++) {
|
|
15
|
+
const arg=process.argv[i];
|
|
16
|
+
if(arg==='--output') output=resolve(process.argv[++i]);
|
|
17
|
+
else if(arg==='--concurrency') concurrency=Number(process.argv[++i]);
|
|
18
|
+
else if(arg==='--playwright') playwright=resolve(process.argv[++i]);
|
|
19
|
+
else if(arg==='--scenario') selected=[process.argv[++i]];
|
|
20
|
+
else if(arg==='--provider') providers=[process.argv[++i]];
|
|
21
|
+
else if(arg==='--help') {console.log('node scripts/pilot.mjs [--scenario id] [--provider claude|codex] [--concurrency 4] --playwright /installed/playwright/index.mjs [--output file]');process.exit(0);}
|
|
22
|
+
else throw new Error('unknown argument '+arg);
|
|
23
|
+
}
|
|
24
|
+
assert(Number.isInteger(concurrency)&&concurrency>=1&&concurrency<=4);
|
|
25
|
+
assert(selected.every(x=>scenarioIds.includes(x))&&providers.every(x=>['claude','codex'].includes(x)));
|
|
26
|
+
const models={claude:'sonnet',codex:'gpt-5.6-sol'};
|
|
27
|
+
function run(file,args,options={}) {
|
|
28
|
+
return new Promise((resolvePromise,reject)=>{
|
|
29
|
+
const child=spawn(file,args,{cwd:options.cwd??root,env:process.env,stdio:['ignore','pipe','pipe']});
|
|
30
|
+
let stdout='',stderr=''; child.stdout.on('data',c=>stdout+=c); child.stderr.on('data',c=>stderr+=c);
|
|
31
|
+
const timer=setTimeout(()=>child.kill('SIGTERM'),options.timeoutMs??20*60_000);
|
|
32
|
+
child.on('error',e=>{clearTimeout(timer);reject(e);});
|
|
33
|
+
child.on('close',(code,signal)=>{clearTimeout(timer);resolvePromise({code,signal,stdout,stderr});});
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
async function identity() {
|
|
37
|
+
const hash=createHash('sha256');
|
|
38
|
+
async function visit(dir,prefix) {for(const e of (await readdir(dir,{withFileTypes:true})).sort((a,b)=>a.name.localeCompare(b.name))) {const p=join(dir,e.name),name=prefix+'/'+e.name;if(e.isDirectory()) await visit(p,name);else hash.update(name).update('\0').update(await readFile(p)).update('\0');}}
|
|
39
|
+
await visit(join(root,'dist'),'dist'); const executableSha256=hash.copy().digest('hex');
|
|
40
|
+
for(const file of ['package.json','scripts/pilot.mjs','scripts/fixtures/pilot-scenarios.mjs','scripts/canary-assertions.mjs']) hash.update(file).update('\0').update(await readFile(join(root,file))).update('\0');
|
|
41
|
+
return {sha256:hash.digest('hex'),executableSha256,sourceCommit:(await run('git',['rev-parse','HEAD'])).stdout.trim()};
|
|
42
|
+
}
|
|
43
|
+
const runtime=await identity(), startedAt=new Date();
|
|
44
|
+
const base=await realpath(await mkdtemp(join(tmpdir(),'standing-orders-real-pilot-')));
|
|
45
|
+
const results=[];
|
|
46
|
+
async function one(id,provider,wave) {
|
|
47
|
+
const spec=scenario(id,playwright), model=models[provider], name=provider+'-'+id;
|
|
48
|
+
const dir=join(base,name), repo=join(dir,'repo'), db=join(dir,'orders.db'), pool=join(dir,'worktrees');
|
|
49
|
+
const steps=[]; let final=null,baseSha=null;
|
|
50
|
+
const record={name,scenario:id,category:spec.category,provider,model,wave,passed:false,manualInterventions:0,retainedAt:dir,startedAt:new Date().toISOString(),steps};
|
|
51
|
+
async function cli(label,args,accepted=[0]) {
|
|
52
|
+
assert.deepEqual(await identity(),runtime,'runtime changed during the pilot');
|
|
53
|
+
const start=Date.now(), result=await run(process.execPath,[join(root,'dist/bin.js'),...args,'--db',db,'--json']);
|
|
54
|
+
steps.push({label,durationMs:Date.now()-start,exitCode:result.code});
|
|
55
|
+
if(!accepted.includes(result.code)) throw new Error(label+': '+(result.stdout+'\n'+result.stderr).slice(0,6000));
|
|
56
|
+
return JSON.parse(result.stdout);
|
|
57
|
+
}
|
|
58
|
+
const git=async args=>{const r=await run('git',args,{cwd:repo}); assert.equal(r.code,0,r.stderr);return r.stdout.trim();};
|
|
59
|
+
try {
|
|
60
|
+
await mkdir(repo,{recursive:true});
|
|
61
|
+
for(const [name,body] of Object.entries(spec.files)) {const path=join(repo,name);await mkdir(dirname(path),{recursive:true});await writeFile(path,body);}
|
|
62
|
+
if(spec.dependency) {const lock=await run('npm',['install','--package-lock-only','--ignore-scripts','--offline'],{cwd:repo});assert.equal(lock.code,0,lock.stderr);}
|
|
63
|
+
await git(['init','-q','-b','main']);await git(['config','user.email','pilot@example.invalid']);await git(['config','user.name','Unattended Pilot']);await git(['add','.']);await git(['commit','-qm','seed fixed pilot assignment']);baseSha=await git(['rev-parse','HEAD']);
|
|
64
|
+
const password='pilot-'+randomUUID(),auth=['--as','pilot','--token',password];
|
|
65
|
+
await cli('isolated fixture approver',['approver','add','pilot','--password',password]);
|
|
66
|
+
const registered=await cli('repository-bound worker',['runner','register','worker','--repo',repo,...auth]);
|
|
67
|
+
for(const phase of ['plan','build','repair']) await cli('route '+phase,['config','set',phase,'--provider',provider,'--model',model,...auth]);
|
|
68
|
+
await cli('bounded standing mode',['mode','set','--repo',repo,'--name','standard','--days','1',...auth]);
|
|
69
|
+
if(spec.dependency) await cli('approved offline setup',['setup','set','--repo',repo,'--command','npm ci --offline --ignore-scripts','--timeout-seconds','120','--yes',...auth]);
|
|
70
|
+
await cli('approved verification',['verify','set','--repo',repo,'--command','npm test','--timeout-seconds','120','--yes',...auth]);
|
|
71
|
+
const title='Pilot '+id+': implement the approved scope in '+spec.paths.join(', ')+'. Run npm test before writing proof. Do not modify verification, package, or vendor files.';
|
|
72
|
+
await cli('file assignment',['task','add',title,'--id','work','--repo',repo]);
|
|
73
|
+
const rubric=[
|
|
74
|
+
'The requested behavior passes every assertion in the provided verify.mjs.|check',
|
|
75
|
+
'The implementation changes only '+spec.paths.join(' and ')+'.|changed-path',
|
|
76
|
+
...(spec.ui?['Desktop and mobile screenshots show the requested interface after the tested interaction at 1280x800 and 390x844.|screenshot,check']:[]),
|
|
77
|
+
].join(';');
|
|
78
|
+
await cli('file fixed scope',['task','scope','work','--goal',spec.goal,'--touches',spec.paths.join(','),'--acceptance',rubric,'--not','Changing tests or dependency definitions, external publication, or unrelated files.']);
|
|
79
|
+
const preview=await cli('read scope',['task','show','work']);
|
|
80
|
+
await cli('approve exact fixture scope',['task','approve','work','--yes','--digest',preview.scope.digest,...auth]);
|
|
81
|
+
await writeFile(join(dir,'runner-token'),registered.token,{mode:0o600});
|
|
82
|
+
console.log(name+': starting unattended build and check');
|
|
83
|
+
const start=Date.now();
|
|
84
|
+
const worker=await run(process.execPath,[join(root,'dist/bin.js'),'watch','--runner','worker','--token-file',join(dir,'runner-token'),'--repo',repo,'--pool',pool,'--for','1000','--tick-every','200','--reconcile-every','1000','--bridge-every','3600000','--db',db,'--json']);
|
|
85
|
+
await writeFile(join(dir,'watch-result.json'),JSON.stringify(worker,null,2));
|
|
86
|
+
steps.push({label:'unattended watch build and check',durationMs:Date.now()-start,exitCode:worker.code});
|
|
87
|
+
final=await cli('read final result',['task','show','work']);
|
|
88
|
+
record.final=final;
|
|
89
|
+
assert.equal(worker.code,0,'watch failed');
|
|
90
|
+
assert.equal(final.task.state,'done','task did not complete');
|
|
91
|
+
const build=final.runs.find(r=>r.role==='builder'&&r.outcome==='built'); assert(build,'missing completed build');
|
|
92
|
+
assert(final.runs.every(r=>r.outcome!==null),'open orphan run');
|
|
93
|
+
const head=await git(['rev-parse',build.branch]); assert.notEqual(head,baseSha);
|
|
94
|
+
const changed=(await git(['diff','--name-only',baseSha,head])).split('\n').filter(Boolean).sort();
|
|
95
|
+
assert.deepEqual(changed,[...spec.paths].sort(),'unexpected or missing changed paths');
|
|
96
|
+
assert.equal(await git(['rev-parse','main']),baseSha,'default branch changed');
|
|
97
|
+
const leadFile=await createFixtureLead(args=>cli('scope fixture lead',args),{repo,auth,tokenFile:join(dir,'lead.token')});
|
|
98
|
+
record.completion=await completeFixtureAssignment(args=>cli('inspect and handle result',args),'work',leadFile,{head,runId:build.id});
|
|
99
|
+
const duplicate=await cli('duplicate dispatch',['tick','--runner','worker','--token',registered.token,'--repo',repo,'--pool',pool],[3]);assert.equal(duplicate.reason,'empty');
|
|
100
|
+
assert.deepEqual(await identity(),runtime);
|
|
101
|
+
record.commit=head;record.changed=changed;record.duplicateDispatch='refused-empty';record.passed=true;
|
|
102
|
+
} catch(error) {
|
|
103
|
+
record.error=error.stack;
|
|
104
|
+
if(final===null) {try{record.final=await cli('failure state',['task','show','work']);}catch{}}
|
|
105
|
+
}
|
|
106
|
+
record.finishedAt=new Date().toISOString();record.durationSeconds=(Date.parse(record.finishedAt)-Date.parse(record.startedAt))/1000;
|
|
107
|
+
results.push(record);await writeFile(join(dir,'result.json'),JSON.stringify(record,null,2));
|
|
108
|
+
console.log(name+': '+(record.passed?'PASS':'FAIL '+record.error.split('\n')[0]));
|
|
109
|
+
}
|
|
110
|
+
// Two successive service batches, each with fresh provider sessions and repositories.
|
|
111
|
+
for(let wave=1;wave<=2;wave++) {
|
|
112
|
+
const ids=selected.filter((_,i)=>selected.length===1?wave===1:(i<5?wave===1:wave===2));
|
|
113
|
+
const queue=ids.flatMap(id=>providers.map(provider=>({id,provider})));
|
|
114
|
+
await Promise.all(Array.from({length:Math.min(concurrency,queue.length)},async()=>{while(queue.length){const job=queue.shift();await one(job.id,job.provider,wave);}}));
|
|
115
|
+
}
|
|
116
|
+
const times=results.map(r=>r.durationSeconds).sort((a,b)=>a-b), percentile=p=>times[Math.ceil(times.length*p)-1]??null;
|
|
117
|
+
const report={version:1,passed:results.every(r=>r.passed),runtime,runtimeUnchanged:JSON.stringify(await identity())===JSON.stringify(runtime),startedAt:startedAt.toISOString(),finishedAt:new Date().toISOString(),platform:process.platform,node:process.versions.node,retainedAt:base,total:results.length,completed:results.filter(r=>r.passed).length,p50Seconds:percentile(.5),p95Seconds:percentile(.95),manualInterventions:0,results,
|
|
118
|
+
scope:'Real subscription builds, approved checks, and explicit lead completion in disposable repositories across two sequential batches. Contracts are fixed and approved before unattended dispatch. Failed cases receive no manual rescue.',
|
|
119
|
+
exclusions:['provider-authored planning (separately exercised by certify:provider)','mid-flight human revision or approval','direct-provider latency comparison','Windows','actual subscription exhaustion','production publication']};
|
|
120
|
+
report.passed&&=report.runtimeUnchanged;
|
|
121
|
+
await mkdir(dirname(output),{recursive:true});await writeFile(output,JSON.stringify(report,null,2)+'\n');console.log('Pilot: '+output+' ('+report.completed+'/'+report.total+')');if(!report.passed)process.exitCode=1;
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Preflight the protocol files an agent writes at the end of an attempt —
|
|
3
|
+
// the handoff (DONE), the proof (PROOF), and a park mailbox — with the SAME
|
|
4
|
+
// parsers the machine ingests them through (dist/decision.js and
|
|
5
|
+
// dist/proof.js), so a cap or a shape the brief names is checked before the
|
|
6
|
+
// attempt ends instead of refusing the whole file after it. Beyond parsing,
|
|
7
|
+
// every proof evidence ref is resolved against its source list — a check
|
|
8
|
+
// ref must be an exact command in `checks`, a changed-path ref an exact
|
|
9
|
+
// path in `changed`, a screenshot ref an exact path in `screenshots` — and
|
|
10
|
+
// every signed criterion id given on the command line must be answered.
|
|
11
|
+
// A caveat that names a criterion the proof marks `met` (its exact id as a
|
|
12
|
+
// standalone token — `c1: …`) is a blocking exception: the proof's verdict
|
|
13
|
+
// disagrees with its own words, the plane refutes it, and this preflight
|
|
14
|
+
// refuses it first so the criterion can be marked not-met before the end.
|
|
15
|
+
// Every caveat must name at least one known criterion — a signed id when
|
|
16
|
+
// `--criteria` names the rubric (a proof-authored extra id is no authority
|
|
17
|
+
// then), or one the proof answers only when nothing was signed: an
|
|
18
|
+
// unassigned caveat, or one tagged with an unknown id, is refused the same
|
|
19
|
+
// way — unrelated ideas belong in the handoff's followUps.
|
|
20
|
+
// A criterion marked `met` whose cited check exited nonzero is refused in
|
|
21
|
+
// the adjudicator's own words (`criterion "c1"'s check "…" exited 1`): a
|
|
22
|
+
// met criterion rests only on checks that exited zero, so the agent marks
|
|
23
|
+
// it not-met or cites a durable current-tree command that passes. A
|
|
24
|
+
// not-met or not-checked criterion may cite a failed check honestly.
|
|
25
|
+
//
|
|
26
|
+
// node scripts/proof-preflight.mjs [--done <file>] [--proof <file>]
|
|
27
|
+
// [--park <file>] [--rubric <canonical-json-file>] [--criteria c1,c2,…]
|
|
28
|
+
//
|
|
29
|
+
// Exit 0 when every named file parses and resolves; 1 with the problems
|
|
30
|
+
// listed otherwise; 2 when dist/ is missing (run `npm run build` first).
|
|
31
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
32
|
+
import { dirname, join, resolve } from "node:path";
|
|
33
|
+
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
34
|
+
|
|
35
|
+
const root = resolve(dirname(fileURLToPath(import.meta.url)), "..");
|
|
36
|
+
const dist = join(root, "dist");
|
|
37
|
+
if (!existsSync(join(dist, "proof.js")) || !existsSync(join(dist, "decision.js"))) {
|
|
38
|
+
console.error("proof-preflight: dist/ is not built — run `npm run build` first");
|
|
39
|
+
process.exit(2);
|
|
40
|
+
}
|
|
41
|
+
const { parseProof, proofSubmissionProblems, failedMetChecks, failedCheckWords, blockingCaveats, caveatAttributionProblems, caveatAttributionWords } = await import(pathToFileURL(join(dist, "proof.js")).href);
|
|
42
|
+
const { parseAcceptanceCriteria } = await import(pathToFileURL(join(dist, "scope.js")).href);
|
|
43
|
+
const { parseHandoff, parseDecision } = await import(pathToFileURL(join(dist, "decision.js")).href);
|
|
44
|
+
|
|
45
|
+
const args = process.argv.slice(2);
|
|
46
|
+
const flag = name => {
|
|
47
|
+
const at = args.indexOf(`--${name}`);
|
|
48
|
+
return at === -1 ? null : (args[at + 1] ?? null);
|
|
49
|
+
};
|
|
50
|
+
const files = { done: flag("done"), proof: flag("proof"), park: flag("park") };
|
|
51
|
+
let signed = (flag("criteria") ?? "").split(",").map(one => one.trim()).filter(one => one !== "");
|
|
52
|
+
let rubric = null;
|
|
53
|
+
const rubricFile = flag("rubric");
|
|
54
|
+
if (args.includes("--rubric")) {
|
|
55
|
+
try {
|
|
56
|
+
if (rubricFile === null) throw new Error("--rubric needs a JSON file");
|
|
57
|
+
const value = JSON.parse(readFileSync(rubricFile, "utf8"));
|
|
58
|
+
if (!Array.isArray(value)) throw new Error("the rubric must be an array");
|
|
59
|
+
const parsed = parseAcceptanceCriteria(value);
|
|
60
|
+
if (parsed.problems.length > 0) throw new Error(parsed.problems.map(one => one.message).join("; "));
|
|
61
|
+
rubric = parsed.criteria;
|
|
62
|
+
const ids = rubric.map(one => one.id);
|
|
63
|
+
if (signed.length > 0 && (signed.length !== ids.length || signed.some(id => !ids.includes(id)))) throw new Error("--criteria disagrees with --rubric");
|
|
64
|
+
signed = ids;
|
|
65
|
+
} catch (error) {
|
|
66
|
+
console.error(`proof-preflight: invalid rubric (${error.message})`);
|
|
67
|
+
process.exit(2);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
if (files.done === null && files.proof === null && files.park === null) {
|
|
71
|
+
console.error("proof-preflight: name at least one file (--done, --proof, --park)");
|
|
72
|
+
process.exit(2);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
const problems = [];
|
|
76
|
+
const read = (path, what) => {
|
|
77
|
+
try {
|
|
78
|
+
return readFileSync(path, "utf8");
|
|
79
|
+
} catch (error) {
|
|
80
|
+
problems.push(`${what}: cannot read ${path} (${error instanceof Error ? error.message : String(error)})`);
|
|
81
|
+
return null;
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
if (files.done !== null) {
|
|
86
|
+
const raw = read(files.done, "handoff");
|
|
87
|
+
if (raw !== null) {
|
|
88
|
+
const parsed = parseHandoff(raw);
|
|
89
|
+
if (!parsed.ok) for (const one of parsed.problems) problems.push(`handoff: ${one.reason} — ${one.message}`);
|
|
90
|
+
else console.log(`handoff: ok (${parsed.handoff.status}; ${parsed.handoff.changes.length} change(s), ${parsed.handoff.verification.length} verification line(s), ${parsed.handoff.followUps.length} follow-up(s))`);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
if (files.park !== null) {
|
|
95
|
+
const raw = read(files.park, "park");
|
|
96
|
+
if (raw !== null) {
|
|
97
|
+
const parsed = parseDecision(raw);
|
|
98
|
+
if (!parsed.ok) for (const one of parsed.problems) problems.push(`park: ${one.reason} — ${one.message}`);
|
|
99
|
+
else console.log(`park: ok (${parsed.decision.options.length} option(s), recommendation ${parsed.decision.recommendation})`);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
if (files.proof !== null) {
|
|
104
|
+
const raw = read(files.proof, "proof");
|
|
105
|
+
if (raw !== null) {
|
|
106
|
+
const parsed = parseProof(raw);
|
|
107
|
+
if (!parsed.ok) {
|
|
108
|
+
for (const one of parsed.problems) problems.push(`proof: ${one.reason} — ${one.message}`);
|
|
109
|
+
} else {
|
|
110
|
+
const { proof } = parsed;
|
|
111
|
+
const failed = new Set(failedMetChecks(proof).map(failedCheckWords));
|
|
112
|
+
problems.push(...proofSubmissionProblems(proof, rubric ?? []).map(one => `proof: ${one}${failed.has(one) ? " — a criterion marked met cites only checks that exited zero; mark it not-met, or cite a durable current-tree command that passed" : ""}`));
|
|
113
|
+
const answered = new Set(proof.criteria.map(one => one.id));
|
|
114
|
+
for (const id of signed) {
|
|
115
|
+
if (!answered.has(id)) problems.push(`proof: signed criterion ${id} is not answered`);
|
|
116
|
+
}
|
|
117
|
+
for (const one of blockingCaveats(proof)) {
|
|
118
|
+
problems.push(`proof: criterion ${one.criterionId} is marked met, but caveat ${one.index + 1} admits an exception to it — mark it not-met or drop the exception: ${JSON.stringify(one.caveat)}`);
|
|
119
|
+
}
|
|
120
|
+
// Every caveat names a known criterion (final authority closure): an
|
|
121
|
+
// unassigned caveat, or one tagged with an id nobody signed (or, with
|
|
122
|
+
// no signed rubric, the proof never answers), refuses here — the
|
|
123
|
+
// plane refutes the same proof, so it is said before the attempt
|
|
124
|
+
// ends. Unrelated ideas go to the handoff's followUps.
|
|
125
|
+
for (const one of caveatAttributionProblems(proof, signed)) {
|
|
126
|
+
problems.push(`proof: ${caveatAttributionWords(one)}`);
|
|
127
|
+
}
|
|
128
|
+
for (const shot of proof.screenshots) {
|
|
129
|
+
if (!existsSync(resolve(dirname(files.proof), shot.path)) && !existsSync(resolve(shot.path))) problems.push(`proof: screenshot ${shot.path} does not exist beside the proof`);
|
|
130
|
+
}
|
|
131
|
+
if (problems.length === 0) console.log(`proof: ok (${proof.criteria.length} criteria, ${proof.checks.length} checks, ${proof.changed.length} changed, ${proof.caveats.length} caveat(s), none blocking, ${proof.screenshots.length} screenshot(s))`);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
if (problems.length > 0) {
|
|
137
|
+
console.error(`proof-preflight: ${problems.length} problem(s)\n ${problems.join("\n ")}`);
|
|
138
|
+
process.exit(1);
|
|
139
|
+
}
|
|
140
|
+
console.log("proof-preflight: every named file parses and resolves");
|