pi-pstack-native 0.0.0-stage → 1.0.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/ACCEPTANCE.md +40 -0
- package/CHANGELOG.md +75 -0
- package/CONTRIBUTING.md +29 -0
- package/IMPLEMENTATION.md +38 -0
- package/INSTALLATION-CHECK.md +13 -0
- package/LICENSE +21 -0
- package/NOTICE.md +14 -0
- package/PARITY.json +133 -0
- package/PARITY.md +156 -0
- package/PRD.md +2131 -0
- package/README.md +103 -2
- package/README.zh-CN.md +137 -0
- package/REVIEW.md +24 -0
- package/SECURITY.md +17 -0
- package/SEMANTICS.json +2852 -0
- package/UPSTREAM.json +32 -0
- package/agents/architect.md +3 -0
- package/agents/comment-sicko.md +3 -0
- package/agents/integrator.md +6 -0
- package/agents/poteto-agent.md +3 -0
- package/agents/reviewer.md +3 -0
- package/agents/scout.md +3 -0
- package/agents/synthesizer.md +3 -0
- package/agents/verifier.md +3 -0
- package/agents/worker.md +3 -0
- package/benchmarks/cases.json +354 -0
- package/dist/agent/candidates.d.ts +13 -0
- package/dist/agent/candidates.js +50 -0
- package/dist/agent/grep-worker.mjs +46 -0
- package/dist/agent/host.d.ts +47 -0
- package/dist/agent/host.js +480 -0
- package/dist/agent/isolation.d.ts +3 -0
- package/dist/agent/isolation.js +12 -0
- package/dist/agent/outcome.d.ts +8 -0
- package/dist/agent/outcome.js +15 -0
- package/dist/agent/profiles.d.ts +5 -0
- package/dist/agent/profiles.js +128 -0
- package/dist/agent/read-only-tools.d.ts +1 -0
- package/dist/agent/read-only-tools.js +150 -0
- package/dist/agent/resources.d.ts +15 -0
- package/dist/agent/resources.js +77 -0
- package/dist/api.d.ts +18 -0
- package/dist/api.js +18 -0
- package/dist/artifacts/fingerprint.d.ts +29 -0
- package/dist/artifacts/fingerprint.js +75 -0
- package/dist/compatibility/adapter.d.ts +66 -0
- package/dist/compatibility/adapter.js +110 -0
- package/dist/compatibility/source.d.ts +2 -0
- package/dist/compatibility/source.js +38 -0
- package/dist/compatibility/tool.d.ts +2 -0
- package/dist/compatibility/tool.js +59 -0
- package/dist/context/snapshot.d.ts +37 -0
- package/dist/context/snapshot.js +12 -0
- package/dist/contracts/brief.d.ts +19 -0
- package/dist/contracts/brief.js +198 -0
- package/dist/contracts/types.d.ts +192 -0
- package/dist/contracts/types.js +1 -0
- package/dist/delivery/frontier.d.ts +61 -0
- package/dist/delivery/frontier.js +123 -0
- package/dist/delivery/git.d.ts +2 -0
- package/dist/delivery/git.js +12 -0
- package/dist/delivery/prepare.d.ts +18 -0
- package/dist/delivery/prepare.js +30 -0
- package/dist/delivery/provider.d.ts +31 -0
- package/dist/delivery/provider.js +42 -0
- package/dist/delivery/review-threads.d.ts +18 -0
- package/dist/delivery/review-threads.js +39 -0
- package/dist/delivery/stack.d.ts +32 -0
- package/dist/delivery/stack.js +91 -0
- package/dist/extension.d.ts +2 -0
- package/dist/extension.js +320 -0
- package/dist/loop/scheduler.d.ts +53 -0
- package/dist/loop/scheduler.js +334 -0
- package/dist/loop/store.d.ts +16 -0
- package/dist/loop/store.js +66 -0
- package/dist/models/router.d.ts +25 -0
- package/dist/models/router.js +183 -0
- package/dist/program/coordinator.d.ts +75 -0
- package/dist/program/coordinator.js +169 -0
- package/dist/program/dispatch.d.ts +20 -0
- package/dist/program/dispatch.js +82 -0
- package/dist/runner/cli.mjs +46 -0
- package/dist/runner/lease.d.ts +10 -0
- package/dist/runner/lease.js +24 -0
- package/dist/runner/service.d.ts +8 -0
- package/dist/runner/service.js +66 -0
- package/dist/runtime/checkout.d.ts +3 -0
- package/dist/runtime/checkout.js +20 -0
- package/dist/runtime/config.d.ts +7 -0
- package/dist/runtime/config.js +46 -0
- package/dist/runtime/errors.d.ts +2 -0
- package/dist/runtime/errors.js +10 -0
- package/dist/runtime/home.d.ts +11 -0
- package/dist/runtime/home.js +15 -0
- package/dist/runtime/lock.d.ts +12 -0
- package/dist/runtime/lock.js +123 -0
- package/dist/runtime/migrate.d.ts +9 -0
- package/dist/runtime/migrate.js +44 -0
- package/dist/runtime/ownership.d.ts +4 -0
- package/dist/runtime/ownership.js +6 -0
- package/dist/runtime/protocol.d.ts +24 -0
- package/dist/runtime/protocol.js +35 -0
- package/dist/runtime/redact.d.ts +3 -0
- package/dist/runtime/redact.js +32 -0
- package/dist/runtime/store.d.ts +6 -0
- package/dist/runtime/store.js +75 -0
- package/dist/runtime/transaction.d.ts +4 -0
- package/dist/runtime/transaction.js +44 -0
- package/dist/runtime/types.d.ts +202 -0
- package/dist/runtime/types.js +1 -0
- package/dist/runtime/upstream.d.ts +2 -0
- package/dist/runtime/upstream.js +8 -0
- package/dist/setup/command.d.ts +2 -0
- package/dist/setup/command.js +423 -0
- package/dist/statechart/backends/cfg.js +31 -0
- package/dist/statechart/backends/mermaid.js +223 -0
- package/dist/statechart/backends/plain-text.js +68 -0
- package/dist/statechart/backends/report.js +123 -0
- package/dist/statechart/frontends/config.js +258 -0
- package/dist/statechart/frontends/dot.js +68 -0
- package/dist/statechart/frontends/marks.js +102 -0
- package/dist/statechart/frontends/messages.js +53 -0
- package/dist/statechart/frontends/spec.js +89 -0
- package/dist/statechart/frontends/trace.js +24 -0
- package/dist/statechart/frontends/value.js +181 -0
- package/dist/statechart/frontends/verdict.js +38 -0
- package/dist/statechart/frontends/view.js +107 -0
- package/dist/statechart/ir.js +317 -0
- package/dist/statechart/passes/annotate.js +102 -0
- package/dist/statechart/passes/label.js +217 -0
- package/dist/statechart/passes/lift.js +89 -0
- package/dist/statechart/passes/loop-check.js +57 -0
- package/dist/statechart/passes/paths.js +50 -0
- package/dist/statechart/passes/reach.js +134 -0
- package/dist/statechart/passes/region-check.js +94 -0
- package/dist/statechart/passes/regions.js +296 -0
- package/dist/statechart/pipeline.js +63 -0
- package/dist/statechart/run.js +432 -0
- package/dist/statechart/statechart.js +149 -0
- package/dist/statechart/worker.js +40 -0
- package/dist/telemetry/metrics.d.ts +13 -0
- package/dist/telemetry/metrics.js +11 -0
- package/dist/templates/build.d.ts +35 -0
- package/dist/templates/build.js +172 -0
- package/dist/tools/agents.d.ts +3 -0
- package/dist/tools/agents.js +74 -0
- package/dist/tools/graph.d.ts +3 -0
- package/dist/tools/graph.js +35 -0
- package/dist/tools/protocol.d.ts +3 -0
- package/dist/tools/protocol.js +77 -0
- package/dist/tools/schema.d.ts +7 -0
- package/dist/tools/schema.js +6 -0
- package/dist/tools/workflow.d.ts +3 -0
- package/dist/tools/workflow.js +137 -0
- package/dist/tools/worktrees.d.ts +3 -0
- package/dist/tools/worktrees.js +35 -0
- package/dist/verification/process.mjs +9 -0
- package/dist/verification/runner.d.ts +23 -0
- package/dist/verification/runner.js +259 -0
- package/dist/workflow/artifacts.d.ts +10 -0
- package/dist/workflow/artifacts.js +102 -0
- package/dist/workflow/engine.d.ts +58 -0
- package/dist/workflow/engine.js +725 -0
- package/dist/workflow/graph.d.ts +10 -0
- package/dist/workflow/graph.js +60 -0
- package/dist/worktree/manager.d.ts +20 -0
- package/dist/worktree/manager.js +68 -0
- package/dist/worktree/snapshot.d.ts +2 -0
- package/dist/worktree/snapshot.js +43 -0
- package/docs/DEPENDENCIES.md +35 -0
- package/docs/LIVE-TEST-PLAN.zh-CN.md +161 -0
- package/docs/ML-WORKFLOWS.zh-CN.md +49 -0
- package/docs/PI-SEMANTIC-ADAPTER.md +34 -0
- package/docs/PR-41-ALIGNMENT-PLAN.zh-CN.md +30 -0
- package/docs/PR-PROTOCOL.md +48 -0
- package/docs/PUBLISHING.md +61 -0
- package/docs/README.md +30 -0
- package/docs/REFERENCE.md +357 -0
- package/docs/SEMANTIC-COMPATIBILITY.md +135 -0
- package/docs/STATECHART.md +13 -0
- package/docs/UPSTREAM-0.15.17.md +51 -0
- package/docs/VALIDATION.md +59 -0
- package/docs/WINDOWS-MODEL-TEST.zh-CN.md +27 -0
- package/docs/evidence/live-github-5deb723.json +44 -0
- package/docs/evidence/semantic-smoke-5deb723.json +49 -0
- package/docs/parity.test.mjs +84 -0
- package/docs/registry-records-0.15.32.json +2161 -0
- package/docs/registry-records-0.15.36.json +2161 -0
- package/docs/stacked-pr-body.md +23 -0
- package/docs/upstream-dispositions-0.15.36.json +2408 -0
- package/docs/upstream-inventory-0.15.36.json +15754 -0
- package/docs/upstream-provenance-0.15.17.json +62 -0
- package/docs/upstream-provenance-0.15.32.json +11 -0
- package/docs/upstream-provenance-0.15.36.json +11 -0
- package/docs/upstream-sync/IMPLEMENTATION.md +114 -0
- package/docs/upstream-sync/PORT-0.15.23.md +142 -0
- package/docs/upstream-sync/PR-PORT-0.15.23.md +28 -0
- package/docs/upstream-sync/VALIDATION.md +76 -0
- package/docs/upstream-sync/candidate-0.15.23.json +632 -0
- package/docs/upstream-sync/reports/978ca6e9c0e0_837067b75aa2-e928d281378110a3.json +2166 -0
- package/docs/upstream-sync/reports/978ca6e9c0e0_837067b75aa2-e928d281378110a3.md +440 -0
- package/docs/upstream-sync/reports/978ca6e9c0e0_837067b75aa2.json +2161 -0
- package/docs/upstream-sync/reports/978ca6e9c0e0_837067b75aa2.md +440 -0
- package/docs/upstream-sync/tasks/978ca6e9c0e0_837067b75aa2-e928d281378110a3.md +440 -0
- package/docs/upstream-sync/tasks/978ca6e9c0e0_837067b75aa2.md +440 -0
- package/docs/upstream-sync-0.15.17.json +521 -0
- package/docs/upstream-sync-0.15.32.json +106 -0
- package/docs/upstream-sync-0.15.36.json +106 -0
- package/docs/upstream-target-0.15.36.json +3456 -0
- package/docs/upstream-upgrade-0.15.32.json +12140 -0
- package/docs/upstream-upgrade-0.15.32.md +23 -0
- package/docs/upstream-upgrade-0.15.36.md +7 -0
- package/docs/validate-pr.mjs +74 -0
- package/examples/README.md +45 -0
- package/examples/strict-brief.json +14 -0
- package/examples/verification-policy.json +8 -0
- package/package.json +152 -4
- package/scripts/benchmark.mjs +39 -0
- package/scripts/build-statechart.mjs +30 -0
- package/scripts/build.mjs +11 -0
- package/scripts/check-benchmark.mjs +27 -0
- package/scripts/check-contracts.mjs +15 -0
- package/scripts/check-e2e.mjs +86 -0
- package/scripts/check-inventory.mjs +24 -0
- package/scripts/check-package.mjs +17 -0
- package/scripts/check-parity.mjs +4 -0
- package/scripts/check-plan.mjs +206 -0
- package/scripts/check-records.mjs +35 -0
- package/scripts/check-semantics.mjs +7 -0
- package/scripts/check-statechart.mjs +13 -0
- package/scripts/check-syntax.mjs +9 -0
- package/scripts/check-windows-build.mjs +12 -0
- package/scripts/e2e-live.mjs +58 -0
- package/scripts/e2e-reporter.mjs +17 -0
- package/scripts/review.mjs +26 -0
- package/scripts/semantics/core.mjs +101 -0
- package/scripts/semantics/generate.mjs +47 -0
- package/scripts/semantics/real-pi-smoke.mjs +46 -0
- package/scripts/smoke-host.mjs +10 -0
- package/scripts/smoke-install.mjs +37 -0
- package/scripts/sync-upstream.mjs +4 -0
- package/scripts/upstream/cli.mjs +140 -0
- package/scripts/upstream/core.mjs +178 -0
- package/scripts/upstream/core.test.mjs +137 -0
- package/scripts/upstream/inventory.mjs +229 -0
- package/scripts/upstream/inventory.test.mjs +417 -0
- package/scripts/upstream/notify.cjs +17 -0
- package/scripts/upstream/notify.test.mjs +12 -0
- package/scripts/upstream/parity.mjs +45 -0
- package/scripts/upstream/playbook-contract.test.mjs +80 -0
- package/scripts/upstream/playbooks.mjs +143 -0
- package/scripts/upstream/records.mjs +113 -0
- package/scripts/upstream/records.test.mjs +116 -0
- package/scripts/upstream/report.d.ts +30 -0
- package/skills/architect/SKILL.md +133 -0
- package/skills/architect/references/design-red-flags.md +57 -0
- package/skills/architect/references/rationale-template.md +35 -0
- package/skills/architect/references/runner-prompt.md +20 -0
- package/skills/arena/SKILL.md +102 -0
- package/skills/automate-me/SKILL.md +158 -0
- package/skills/benchmark-checklist/SKILL.md +89 -0
- package/skills/blast-radius/SKILL.md +100 -0
- package/skills/bro/SKILL.md +57 -0
- package/skills/correct/SKILL.md +82 -0
- package/skills/create-formal-verification-skill/SKILL.md +93 -0
- package/skills/create-verification-skill/SKILL.md +94 -0
- package/skills/create-verification-skill/references/feature-map-example/README.md +47 -0
- package/skills/create-verification-skill/references/feature-map-example/create-note.md +39 -0
- package/skills/create-verification-skill/references/feature-map-example/search.md +45 -0
- package/skills/figure-it-out/SKILL.md +102 -0
- package/skills/how/SKILL.md +86 -0
- package/skills/how/references/explainer-prompt.md +55 -0
- package/skills/how/references/explorer-prompt.md +35 -0
- package/skills/in-your-own-words/SKILL.md +57 -0
- package/skills/interrogate/SKILL.md +85 -0
- package/skills/ketchup/SKILL.md +93 -0
- package/skills/ketchup-video/SKILL.md +79 -0
- package/skills/maintain-formal-verification-skill/SKILL.md +108 -0
- package/skills/maintain-verification-skill/SKILL.md +89 -0
- package/skills/make-bot-ui/SKILL.md +8 -0
- package/skills/ml-development/SKILL.md +38 -0
- package/skills/ml-development/playbooks/01-scope.md +14 -0
- package/skills/ml-development/playbooks/02-data.md +14 -0
- package/skills/ml-development/playbooks/03-baseline.md +14 -0
- package/skills/ml-development/playbooks/04-experiments.md +14 -0
- package/skills/ml-development/playbooks/05-evaluation.md +14 -0
- package/skills/ml-development/playbooks/06-reproducibility.md +13 -0
- package/skills/ml-development/references/experiment-matrix.md +11 -0
- package/skills/ml-development/references/run-record.md +19 -0
- package/skills/no-comments/SKILL.md +74 -0
- package/skills/poteto-help/SKILL.md +217 -0
- package/skills/poteto-help/references/prompting.md +51 -0
- package/skills/poteto-help/references/recipes.md +51 -0
- package/skills/poteto-mode/SKILL.md +214 -0
- package/skills/poteto-mode/playbooks/authoring-a-skill.md +64 -0
- package/skills/poteto-mode/playbooks/autonomous-run.md +65 -0
- package/skills/poteto-mode/playbooks/autopilot-full.md +77 -0
- package/skills/poteto-mode/playbooks/autopilot-stack.md +60 -0
- package/skills/poteto-mode/playbooks/babysit.md +75 -0
- package/skills/poteto-mode/playbooks/bug-fix.md +67 -0
- package/skills/poteto-mode/playbooks/eval.md +77 -0
- package/skills/poteto-mode/playbooks/feature.md +73 -0
- package/skills/poteto-mode/playbooks/hillclimb.md +73 -0
- package/skills/poteto-mode/playbooks/investigation.md +66 -0
- package/skills/poteto-mode/playbooks/multi-phase-plan.md +207 -0
- package/skills/poteto-mode/playbooks/opening-a-pr.md +86 -0
- package/skills/poteto-mode/playbooks/orchestrate.md +77 -0
- package/skills/poteto-mode/playbooks/pause-safely.md +62 -0
- package/skills/poteto-mode/playbooks/perf-issue.md +77 -0
- package/skills/poteto-mode/playbooks/prototype.md +66 -0
- package/skills/poteto-mode/playbooks/refactoring.md +68 -0
- package/skills/poteto-mode/playbooks/runtime-forensics.md +63 -0
- package/skills/poteto-mode/playbooks/session-pickup.md +63 -0
- package/skills/poteto-mode/playbooks/shipping.md +64 -0
- package/skills/poteto-mode/playbooks/trace-forensics.md +66 -0
- package/skills/poteto-mode/playbooks/visual-parity.md +63 -0
- package/skills/poteto-mode/playbooks/worktree-cleanup.md +64 -0
- package/skills/poteto-mode/references/bugbot-triage.md +142 -0
- package/skills/poteto-mode/references/runtime-mapping.md +10 -0
- package/skills/principle-attack-the-premise/SKILL.md +71 -0
- package/skills/principle-boundary-discipline/SKILL.md +84 -0
- package/skills/principle-build-the-lever/SKILL.md +73 -0
- package/skills/principle-encode-lessons-in-structure/SKILL.md +61 -0
- package/skills/principle-exhaust-the-design-space/SKILL.md +59 -0
- package/skills/principle-experience-first/SKILL.md +69 -0
- package/skills/principle-explain-the-number/SKILL.md +68 -0
- package/skills/principle-fix-root-causes/SKILL.md +71 -0
- package/skills/principle-foundational-thinking/SKILL.md +71 -0
- package/skills/principle-guard-the-context-window/SKILL.md +62 -0
- package/skills/principle-laziness-protocol/SKILL.md +60 -0
- package/skills/principle-make-operations-idempotent/SKILL.md +72 -0
- package/skills/principle-migrate-callers-then-delete-legacy-apis/SKILL.md +64 -0
- package/skills/principle-minimize-reader-load/SKILL.md +68 -0
- package/skills/principle-model-the-domain/SKILL.md +74 -0
- package/skills/principle-never-block-on-the-human/SKILL.md +65 -0
- package/skills/principle-outcome-oriented-execution/SKILL.md +71 -0
- package/skills/principle-prove-it-works/SKILL.md +72 -0
- package/skills/principle-redesign-from-first-principles/SKILL.md +66 -0
- package/skills/principle-separate-before-serializing-shared-state/SKILL.md +66 -0
- package/skills/principle-sequence-verifiable-units/SKILL.md +67 -0
- package/skills/principle-subtract-before-you-add/SKILL.md +68 -0
- package/skills/principle-test-behavior-not-implementation/SKILL.md +70 -0
- package/skills/principle-type-system-discipline/SKILL.md +63 -0
- package/skills/pstack-runtime/SKILL.md +8 -0
- package/skills/recall/SKILL.md +85 -0
- package/skills/reflect/SKILL.md +119 -0
- package/skills/reflect/references/divergent-reviewer.md +38 -0
- package/skills/reflect/references/judgment-reviewer.md +37 -0
- package/skills/reflect/references/synthesizer.md +56 -0
- package/skills/reflect/references/tooling-reviewer.md +48 -0
- package/skills/setup-pstack/SKILL.md +132 -0
- package/skills/sharpen/SKILL.md +66 -0
- package/skills/show-me-your-work/SKILL.md +132 -0
- package/skills/statechart/SKILL.md +132 -0
- package/skills/statechart/references/render.md +93 -0
- package/skills/statechart/scripts/backends/cfg.ts +33 -0
- package/skills/statechart/scripts/backends/mermaid.ts +201 -0
- package/skills/statechart/scripts/backends/plain-text.ts +72 -0
- package/skills/statechart/scripts/backends/report.ts +177 -0
- package/skills/statechart/scripts/bug-states.mjs +81 -0
- package/skills/statechart/scripts/chart-edges.mjs +68 -0
- package/skills/statechart/scripts/chart-parts.mjs +21 -0
- package/skills/statechart/scripts/chart-to-tla.mjs +205 -0
- package/skills/statechart/scripts/compare-charts.mjs +74 -0
- package/skills/statechart/scripts/frontends/config.ts +276 -0
- package/skills/statechart/scripts/frontends/dot.ts +74 -0
- package/skills/statechart/scripts/frontends/marks.ts +93 -0
- package/skills/statechart/scripts/frontends/messages.ts +52 -0
- package/skills/statechart/scripts/frontends/spec.ts +114 -0
- package/skills/statechart/scripts/frontends/trace.ts +24 -0
- package/skills/statechart/scripts/frontends/value.ts +166 -0
- package/skills/statechart/scripts/frontends/verdict.ts +40 -0
- package/skills/statechart/scripts/frontends/view.ts +119 -0
- package/skills/statechart/scripts/ir.ts +547 -0
- package/skills/statechart/scripts/lib.mjs +970 -0
- package/skills/statechart/scripts/map-view.mjs +92 -0
- package/skills/statechart/scripts/package.json +11 -0
- package/skills/statechart/scripts/passes/annotate.ts +128 -0
- package/skills/statechart/scripts/passes/label.ts +269 -0
- package/skills/statechart/scripts/passes/lift.ts +85 -0
- package/skills/statechart/scripts/passes/loop-check.ts +68 -0
- package/skills/statechart/scripts/passes/paths.ts +60 -0
- package/skills/statechart/scripts/passes/reach.ts +135 -0
- package/skills/statechart/scripts/passes/region-check.ts +97 -0
- package/skills/statechart/scripts/passes/regions.ts +295 -0
- package/skills/statechart/scripts/pipeline.ts +76 -0
- package/skills/statechart/scripts/property-loop.mjs +60 -0
- package/skills/statechart/scripts/read-check.mjs +79 -0
- package/skills/statechart/scripts/regions-chart.mjs +307 -0
- package/skills/statechart/scripts/render.mjs +531 -0
- package/skills/statechart/scripts/rule-book.mjs +84 -0
- package/skills/statechart/scripts/run.ts +481 -0
- package/skills/statechart/scripts/second-replay.mjs +122 -0
- package/skills/statechart/scripts/snapshot.mjs +74 -0
- package/skills/statechart/scripts/spec-text.mjs +126 -0
- package/skills/statechart/scripts/statechart +29 -0
- package/skills/statechart/scripts/statechart-help.mjs +350 -0
- package/skills/statechart/scripts/statechart.mjs +903 -0
- package/skills/statechart/scripts/statechart.ts +164 -0
- package/skills/statechart/scripts/test/ConfigOracle.java +63 -0
- package/skills/statechart/scripts/test/band.mmd +15 -0
- package/skills/statechart/scripts/test/chart.test.ts +1210 -0
- package/skills/statechart/scripts/test/charts/Braces.mmd +7 -0
- package/skills/statechart/scripts/test/charts/Escapes.mmd +11 -0
- package/skills/statechart/scripts/test/charts/Phases.mmd +29 -0
- package/skills/statechart/scripts/test/cli.test.ts +1314 -0
- package/skills/statechart/scripts/test/config-fuzz.test.ts +263 -0
- package/skills/statechart/scripts/test/corpus/Counter/ChartRun.out +57 -0
- package/skills/statechart/scripts/test/corpus/Counter/Counter.cfg +3 -0
- package/skills/statechart/scripts/test/corpus/Counter/Counter.tla +10 -0
- package/skills/statechart/scripts/test/corpus/Counter/chart.mmd +9 -0
- package/skills/statechart/scripts/test/corpus/Counter/graph.dot +16 -0
- package/skills/statechart/scripts/test/corpus/Counter/report.md +7 -0
- package/skills/statechart/scripts/test/corpus/Counter/sany.out +2 -0
- package/skills/statechart/scripts/test/corpus/Counter/verdict-1.out +49 -0
- package/skills/statechart/scripts/test/corpus/CounterAction/ChartRun.out +60 -0
- package/skills/statechart/scripts/test/corpus/CounterAction/CounterAction.cfg +4 -0
- package/skills/statechart/scripts/test/corpus/CounterAction/CounterAction.tla +22 -0
- package/skills/statechart/scripts/test/corpus/CounterAction/chart.mmd +26 -0
- package/skills/statechart/scripts/test/corpus/CounterAction/graph.dot +19 -0
- package/skills/statechart/scripts/test/corpus/CounterAction/report.md +20 -0
- package/skills/statechart/scripts/test/corpus/CounterAction/sany.out +2 -0
- package/skills/statechart/scripts/test/corpus/CounterAction/verdict-1.exit +1 -0
- package/skills/statechart/scripts/test/corpus/CounterAction/verdict-1.out +56 -0
- package/skills/statechart/scripts/test/corpus/CounterAction/verdict-2.exit +1 -0
- package/skills/statechart/scripts/test/corpus/CounterAction/verdict-2.out +82 -0
- package/skills/statechart/scripts/test/corpus/CounterAction/verdict-3.out +57 -0
- package/skills/statechart/scripts/test/corpus/CounterDeadlock/ChartRun.out +59 -0
- package/skills/statechart/scripts/test/corpus/CounterDeadlock/CounterDeadlock.cfg +3 -0
- package/skills/statechart/scripts/test/corpus/CounterDeadlock/CounterDeadlock.tla +11 -0
- package/skills/statechart/scripts/test/corpus/CounterDeadlock/chart.mmd +22 -0
- package/skills/statechart/scripts/test/corpus/CounterDeadlock/graph.dot +16 -0
- package/skills/statechart/scripts/test/corpus/CounterDeadlock/report.md +17 -0
- package/skills/statechart/scripts/test/corpus/CounterDeadlock/sany.out +2 -0
- package/skills/statechart/scripts/test/corpus/CounterDeadlock/verdict-1.exit +1 -0
- package/skills/statechart/scripts/test/corpus/CounterDeadlock/verdict-1.out +56 -0
- package/skills/statechart/scripts/test/corpus/CounterDeadlock/verdict-2.exit +1 -0
- package/skills/statechart/scripts/test/corpus/CounterDeadlock/verdict-2.out +77 -0
- package/skills/statechart/scripts/test/corpus/CounterFan/ChartRun.out +69 -0
- package/skills/statechart/scripts/test/corpus/CounterFan/CounterFan.cfg +2 -0
- package/skills/statechart/scripts/test/corpus/CounterFan/CounterFan.tla +11 -0
- package/skills/statechart/scripts/test/corpus/CounterFan/chart.mmd +85 -0
- package/skills/statechart/scripts/test/corpus/CounterFan/graph.dot +70 -0
- package/skills/statechart/scripts/test/corpus/CounterFan/report.md +12 -0
- package/skills/statechart/scripts/test/corpus/CounterFan/sany.out +2 -0
- package/skills/statechart/scripts/test/corpus/CounterFan/verdict-1.exit +1 -0
- package/skills/statechart/scripts/test/corpus/CounterFan/verdict-1.out +67 -0
- package/skills/statechart/scripts/test/corpus/CounterFan/verdict-2.out +57 -0
- package/skills/statechart/scripts/test/corpus/CounterGuard/ChartRun.exit +1 -0
- package/skills/statechart/scripts/test/corpus/CounterGuard/ChartRun.out +85 -0
- package/skills/statechart/scripts/test/corpus/CounterGuard/CounterGuard.cfg +6 -0
- package/skills/statechart/scripts/test/corpus/CounterGuard/CounterGuard.tla +13 -0
- package/skills/statechart/scripts/test/corpus/CounterGuard/chart.mmd +5 -0
- package/skills/statechart/scripts/test/corpus/CounterGuard/graph.dot +10 -0
- package/skills/statechart/scripts/test/corpus/CounterGuard/report.md +31 -0
- package/skills/statechart/scripts/test/corpus/CounterGuard/sany.out +2 -0
- package/skills/statechart/scripts/test/corpus/CounterGuard/verdict-1.exit +1 -0
- package/skills/statechart/scripts/test/corpus/CounterGuard/verdict-1.out +64 -0
- package/skills/statechart/scripts/test/corpus/CounterGuard/verdict-2.exit +1 -0
- package/skills/statechart/scripts/test/corpus/CounterGuard/verdict-2.out +77 -0
- package/skills/statechart/scripts/test/corpus/CounterInitPast/ChartRun.out +55 -0
- package/skills/statechart/scripts/test/corpus/CounterInitPast/CounterInitPast.cfg +3 -0
- package/skills/statechart/scripts/test/corpus/CounterInitPast/CounterInitPast.tla +10 -0
- package/skills/statechart/scripts/test/corpus/CounterInitPast/chart.mmd +12 -0
- package/skills/statechart/scripts/test/corpus/CounterInitPast/graph.dot +6 -0
- package/skills/statechart/scripts/test/corpus/CounterInitPast/report.md +12 -0
- package/skills/statechart/scripts/test/corpus/CounterInitPast/sany.out +2 -0
- package/skills/statechart/scripts/test/corpus/CounterInitPast/verdict-1.exit +1 -0
- package/skills/statechart/scripts/test/corpus/CounterInitPast/verdict-1.out +33 -0
- package/skills/statechart/scripts/test/corpus/CounterInitPast/verdict-2.out +54 -0
- package/skills/statechart/scripts/test/corpus/CounterInitPastHolds/ChartRun.out +54 -0
- package/skills/statechart/scripts/test/corpus/CounterInitPastHolds/CounterInitPastHolds.cfg +3 -0
- package/skills/statechart/scripts/test/corpus/CounterInitPastHolds/CounterInitPastHolds.tla +10 -0
- package/skills/statechart/scripts/test/corpus/CounterInitPastHolds/chart.mmd +1 -0
- package/skills/statechart/scripts/test/corpus/CounterInitPastHolds/graph.dot +6 -0
- package/skills/statechart/scripts/test/corpus/CounterInitPastHolds/report.md +7 -0
- package/skills/statechart/scripts/test/corpus/CounterInitPastHolds/sany.out +2 -0
- package/skills/statechart/scripts/test/corpus/CounterInitPastHolds/verdict-1.out +46 -0
- package/skills/statechart/scripts/test/corpus/CounterInstance/ChartRun.out +59 -0
- package/skills/statechart/scripts/test/corpus/CounterInstance/CounterInstance.cfg +2 -0
- package/skills/statechart/scripts/test/corpus/CounterInstance/CounterInstance.tla +10 -0
- package/skills/statechart/scripts/test/corpus/CounterInstance/CounterSteps.tla +6 -0
- package/skills/statechart/scripts/test/corpus/CounterInstance/chart.mmd +17 -0
- package/skills/statechart/scripts/test/corpus/CounterInstance/graph.dot +15 -0
- package/skills/statechart/scripts/test/corpus/CounterInstance/report.md +14 -0
- package/skills/statechart/scripts/test/corpus/CounterInstance/sany.out +3 -0
- package/skills/statechart/scripts/test/corpus/CounterInstance/verdict-1.exit +1 -0
- package/skills/statechart/scripts/test/corpus/CounterInstance/verdict-1.out +78 -0
- package/skills/statechart/scripts/test/corpus/CounterJump/ChartRun.out +59 -0
- package/skills/statechart/scripts/test/corpus/CounterJump/CounterJump.cfg +3 -0
- package/skills/statechart/scripts/test/corpus/CounterJump/CounterJump.tla +19 -0
- package/skills/statechart/scripts/test/corpus/CounterJump/chart.mmd +26 -0
- package/skills/statechart/scripts/test/corpus/CounterJump/graph.dot +22 -0
- package/skills/statechart/scripts/test/corpus/CounterJump/report.md +12 -0
- package/skills/statechart/scripts/test/corpus/CounterJump/sany.out +2 -0
- package/skills/statechart/scripts/test/corpus/CounterJump/verdict-1.exit +1 -0
- package/skills/statechart/scripts/test/corpus/CounterJump/verdict-1.out +58 -0
- package/skills/statechart/scripts/test/corpus/CounterJump/verdict-2.out +57 -0
- package/skills/statechart/scripts/test/corpus/CounterLoop/ChartRun.out +57 -0
- package/skills/statechart/scripts/test/corpus/CounterLoop/CounterLoop.cfg +2 -0
- package/skills/statechart/scripts/test/corpus/CounterLoop/CounterLoop.tla +11 -0
- package/skills/statechart/scripts/test/corpus/CounterLoop/chart.mmd +17 -0
- package/skills/statechart/scripts/test/corpus/CounterLoop/graph.dot +15 -0
- package/skills/statechart/scripts/test/corpus/CounterLoop/report.md +14 -0
- package/skills/statechart/scripts/test/corpus/CounterLoop/sany.out +2 -0
- package/skills/statechart/scripts/test/corpus/CounterLoop/verdict-1.exit +1 -0
- package/skills/statechart/scripts/test/corpus/CounterLoop/verdict-1.out +76 -0
- package/skills/statechart/scripts/test/corpus/CounterOrder/ChartRun.out +59 -0
- package/skills/statechart/scripts/test/corpus/CounterOrder/CounterOrder.cfg +3 -0
- package/skills/statechart/scripts/test/corpus/CounterOrder/CounterOrder.tla +11 -0
- package/skills/statechart/scripts/test/corpus/CounterOrder/chart.mmd +19 -0
- package/skills/statechart/scripts/test/corpus/CounterOrder/graph.dot +10 -0
- package/skills/statechart/scripts/test/corpus/CounterOrder/report.md +15 -0
- package/skills/statechart/scripts/test/corpus/CounterOrder/sany.out +2 -0
- package/skills/statechart/scripts/test/corpus/CounterOrder/verdict-1.exit +1 -0
- package/skills/statechart/scripts/test/corpus/CounterOrder/verdict-1.out +56 -0
- package/skills/statechart/scripts/test/corpus/CounterOrder/verdict-2.exit +1 -0
- package/skills/statechart/scripts/test/corpus/CounterOrder/verdict-2.out +67 -0
- package/skills/statechart/scripts/test/corpus/CounterRules/ChartRun.out +62 -0
- package/skills/statechart/scripts/test/corpus/CounterRules/CounterRules.cfg +6 -0
- package/skills/statechart/scripts/test/corpus/CounterRules/CounterRules.tla +24 -0
- package/skills/statechart/scripts/test/corpus/CounterRules/Moves.tla +5 -0
- package/skills/statechart/scripts/test/corpus/CounterRules/chart.mmd +22 -0
- package/skills/statechart/scripts/test/corpus/CounterRules/graph.dot +10 -0
- package/skills/statechart/scripts/test/corpus/CounterRules/report.md +23 -0
- package/skills/statechart/scripts/test/corpus/CounterRules/sany.out +3 -0
- package/skills/statechart/scripts/test/corpus/CounterRules/verdict-1.exit +1 -0
- package/skills/statechart/scripts/test/corpus/CounterRules/verdict-1.out +58 -0
- package/skills/statechart/scripts/test/corpus/CounterRules/verdict-2.exit +1 -0
- package/skills/statechart/scripts/test/corpus/CounterRules/verdict-2.out +66 -0
- package/skills/statechart/scripts/test/corpus/CounterRules/verdict-3.exit +1 -0
- package/skills/statechart/scripts/test/corpus/CounterRules/verdict-3.out +74 -0
- package/skills/statechart/scripts/test/corpus/CounterRules/verdict-4.out +59 -0
- package/skills/statechart/scripts/test/corpus/CounterStart/ChartRun.out +58 -0
- package/skills/statechart/scripts/test/corpus/CounterStart/CounterStart.cfg +3 -0
- package/skills/statechart/scripts/test/corpus/CounterStart/CounterStart.tla +15 -0
- package/skills/statechart/scripts/test/corpus/CounterStart/chart.mmd +18 -0
- package/skills/statechart/scripts/test/corpus/CounterStart/graph.dot +13 -0
- package/skills/statechart/scripts/test/corpus/CounterStart/report.md +11 -0
- package/skills/statechart/scripts/test/corpus/CounterStart/sany.out +2 -0
- package/skills/statechart/scripts/test/corpus/CounterStart/verdict-1.exit +1 -0
- package/skills/statechart/scripts/test/corpus/CounterStart/verdict-1.out +33 -0
- package/skills/statechart/scripts/test/corpus/CounterStart/verdict-2.out +57 -0
- package/skills/statechart/scripts/test/corpus/CounterStop/ChartRun.out +57 -0
- package/skills/statechart/scripts/test/corpus/CounterStop/CounterStop.cfg +3 -0
- package/skills/statechart/scripts/test/corpus/CounterStop/CounterStop.tla +15 -0
- package/skills/statechart/scripts/test/corpus/CounterStop/chart.mmd +7 -0
- package/skills/statechart/scripts/test/corpus/CounterStop/graph.dot +13 -0
- package/skills/statechart/scripts/test/corpus/CounterStop/report.md +6 -0
- package/skills/statechart/scripts/test/corpus/CounterStop/sany.out +2 -0
- package/skills/statechart/scripts/test/corpus/CounterStop/verdict-1.out +49 -0
- package/skills/statechart/scripts/test/corpus/CounterTie/ChartRun.out +61 -0
- package/skills/statechart/scripts/test/corpus/CounterTie/CounterTie.cfg +4 -0
- package/skills/statechart/scripts/test/corpus/CounterTie/CounterTie.tla +14 -0
- package/skills/statechart/scripts/test/corpus/CounterTie/chart.mmd +30 -0
- package/skills/statechart/scripts/test/corpus/CounterTie/graph.dot +19 -0
- package/skills/statechart/scripts/test/corpus/CounterTie/report.md +27 -0
- package/skills/statechart/scripts/test/corpus/CounterTie/sany.out +2 -0
- package/skills/statechart/scripts/test/corpus/CounterTie/verdict-1.exit +1 -0
- package/skills/statechart/scripts/test/corpus/CounterTie/verdict-1.out +56 -0
- package/skills/statechart/scripts/test/corpus/CounterTie/verdict-2.exit +1 -0
- package/skills/statechart/scripts/test/corpus/CounterTie/verdict-2.out +64 -0
- package/skills/statechart/scripts/test/corpus/CounterTie/verdict-3.exit +1 -0
- package/skills/statechart/scripts/test/corpus/CounterTie/verdict-3.out +87 -0
- package/skills/statechart/scripts/test/corpus/CounterTie/verdict-4.out +57 -0
- package/skills/statechart/scripts/test/corpus/CounterTieInGraph/ChartRun.out +60 -0
- package/skills/statechart/scripts/test/corpus/CounterTieInGraph/CounterTieInGraph.cfg +3 -0
- package/skills/statechart/scripts/test/corpus/CounterTieInGraph/CounterTieInGraph.tla +12 -0
- package/skills/statechart/scripts/test/corpus/CounterTieInGraph/chart.mmd +23 -0
- package/skills/statechart/scripts/test/corpus/CounterTieInGraph/graph.dot +19 -0
- package/skills/statechart/scripts/test/corpus/CounterTieInGraph/report.md +11 -0
- package/skills/statechart/scripts/test/corpus/CounterTieInGraph/sany.out +2 -0
- package/skills/statechart/scripts/test/corpus/CounterTieInGraph/verdict-1.exit +1 -0
- package/skills/statechart/scripts/test/corpus/CounterTieInGraph/verdict-1.out +56 -0
- package/skills/statechart/scripts/test/corpus/CounterTieInGraph/verdict-2.out +57 -0
- package/skills/statechart/scripts/test/corpus/CounterView/ChartRun.out +61 -0
- package/skills/statechart/scripts/test/corpus/CounterView/CounterView.cfg +4 -0
- package/skills/statechart/scripts/test/corpus/CounterView/CounterView.tla +14 -0
- package/skills/statechart/scripts/test/corpus/CounterView/chart.mmd +23 -0
- package/skills/statechart/scripts/test/corpus/CounterView/graph.dot +19 -0
- package/skills/statechart/scripts/test/corpus/CounterView/report.md +27 -0
- package/skills/statechart/scripts/test/corpus/CounterView/sany.out +2 -0
- package/skills/statechart/scripts/test/corpus/CounterView/verdict-1.exit +1 -0
- package/skills/statechart/scripts/test/corpus/CounterView/verdict-1.out +56 -0
- package/skills/statechart/scripts/test/corpus/CounterView/verdict-2.exit +1 -0
- package/skills/statechart/scripts/test/corpus/CounterView/verdict-2.out +64 -0
- package/skills/statechart/scripts/test/corpus/CounterView/verdict-3.exit +1 -0
- package/skills/statechart/scripts/test/corpus/CounterView/verdict-3.out +87 -0
- package/skills/statechart/scripts/test/corpus/CounterView/verdict-4.out +57 -0
- package/skills/statechart/scripts/test/corpus/CounterView/view.mjs +1 -0
- package/skills/statechart/scripts/test/corpus/DieHard/ChartRun.out +59 -0
- package/skills/statechart/scripts/test/corpus/DieHard/DieHard.cfg +4 -0
- package/skills/statechart/scripts/test/corpus/DieHard/DieHard.tla +38 -0
- package/skills/statechart/scripts/test/corpus/DieHard/chart.mmd +92 -0
- package/skills/statechart/scripts/test/corpus/DieHard/graph.dot +126 -0
- package/skills/statechart/scripts/test/corpus/DieHard/report.md +17 -0
- package/skills/statechart/scripts/test/corpus/DieHard/sany.out +2 -0
- package/skills/statechart/scripts/test/corpus/DieHard/verdict-1.exit +1 -0
- package/skills/statechart/scripts/test/corpus/DieHard/verdict-1.out +91 -0
- package/skills/statechart/scripts/test/corpus/DieHard/verdict-2.out +57 -0
- package/skills/statechart/scripts/test/corpus/FirstRule/ChartRun.out +61 -0
- package/skills/statechart/scripts/test/corpus/FirstRule/FirstRule.cfg +6 -0
- package/skills/statechart/scripts/test/corpus/FirstRule/FirstRule.tla +11 -0
- package/skills/statechart/scripts/test/corpus/FirstRule/chart.mmd +22 -0
- package/skills/statechart/scripts/test/corpus/FirstRule/graph.dot +16 -0
- package/skills/statechart/scripts/test/corpus/FirstRule/report.md +25 -0
- package/skills/statechart/scripts/test/corpus/FirstRule/sany.out +2 -0
- package/skills/statechart/scripts/test/corpus/FirstRule/verdict-1.exit +1 -0
- package/skills/statechart/scripts/test/corpus/FirstRule/verdict-1.out +56 -0
- package/skills/statechart/scripts/test/corpus/FirstRule/verdict-2.exit +1 -0
- package/skills/statechart/scripts/test/corpus/FirstRule/verdict-2.out +64 -0
- package/skills/statechart/scripts/test/corpus/FirstRule/verdict-3.exit +1 -0
- package/skills/statechart/scripts/test/corpus/FirstRule/verdict-3.out +64 -0
- package/skills/statechart/scripts/test/corpus/FirstRule/verdict-4.exit +1 -0
- package/skills/statechart/scripts/test/corpus/FirstRule/verdict-4.out +77 -0
- package/skills/statechart/scripts/test/corpus/HiddenClock/ChartRun.out +57 -0
- package/skills/statechart/scripts/test/corpus/HiddenClock/HiddenClock.cfg +4 -0
- package/skills/statechart/scripts/test/corpus/HiddenClock/HiddenClock.tla +11 -0
- package/skills/statechart/scripts/test/corpus/HiddenClock/chart.mmd +13 -0
- package/skills/statechart/scripts/test/corpus/HiddenClock/graph.dot +12 -0
- package/skills/statechart/scripts/test/corpus/HiddenClock/report.md +11 -0
- package/skills/statechart/scripts/test/corpus/HiddenClock/sany.out +2 -0
- package/skills/statechart/scripts/test/corpus/HiddenClock/verdict-1.exit +1 -0
- package/skills/statechart/scripts/test/corpus/HiddenClock/verdict-1.out +72 -0
- package/skills/statechart/scripts/test/corpus/Login/ChartRun.out +57 -0
- package/skills/statechart/scripts/test/corpus/Login/Login.cfg +3 -0
- package/skills/statechart/scripts/test/corpus/Login/Login.tla +62 -0
- package/skills/statechart/scripts/test/corpus/Login/chart.mmd +27 -0
- package/skills/statechart/scripts/test/corpus/Login/graph.dot +40 -0
- package/skills/statechart/scripts/test/corpus/Login/report.md +7 -0
- package/skills/statechart/scripts/test/corpus/Login/sany.out +1 -0
- package/skills/statechart/scripts/test/corpus/Login/verdict-1.out +47 -0
- package/skills/statechart/scripts/test/corpus/Login/view.mjs +1 -0
- package/skills/statechart/scripts/test/corpus/LoginGuarded/ChartRun.out +57 -0
- package/skills/statechart/scripts/test/corpus/LoginGuarded/LoginGuarded.cfg +2 -0
- package/skills/statechart/scripts/test/corpus/LoginGuarded/LoginGuarded.tla +64 -0
- package/skills/statechart/scripts/test/corpus/LoginGuarded/chart.mmd +28 -0
- package/skills/statechart/scripts/test/corpus/LoginGuarded/graph.dot +37 -0
- package/skills/statechart/scripts/test/corpus/LoginGuarded/report.md +8 -0
- package/skills/statechart/scripts/test/corpus/LoginGuarded/sany.out +1 -0
- package/skills/statechart/scripts/test/corpus/LoginGuarded/verdict-1.out +47 -0
- package/skills/statechart/scripts/test/corpus/LoginGuarded/view.mjs +1 -0
- package/skills/statechart/scripts/test/corpus/LoginParallel/ChartRun.out +60 -0
- package/skills/statechart/scripts/test/corpus/LoginParallel/LoginParallel.cfg +3 -0
- package/skills/statechart/scripts/test/corpus/LoginParallel/LoginParallel.tla +64 -0
- package/skills/statechart/scripts/test/corpus/LoginParallel/chart.mmd +44 -0
- package/skills/statechart/scripts/test/corpus/LoginParallel/graph.dot +58 -0
- package/skills/statechart/scripts/test/corpus/LoginParallel/report.md +17 -0
- package/skills/statechart/scripts/test/corpus/LoginParallel/sany.out +1 -0
- package/skills/statechart/scripts/test/corpus/LoginParallel/verdict-1.exit +1 -0
- package/skills/statechart/scripts/test/corpus/LoginParallel/verdict-1.out +83 -0
- package/skills/statechart/scripts/test/corpus/LoginParallel/verdict-2.out +57 -0
- package/skills/statechart/scripts/test/corpus/LoginParallel/view.mjs +1 -0
- package/skills/statechart/scripts/test/corpus/MediaPlayer/ChartRun.out +60 -0
- package/skills/statechart/scripts/test/corpus/MediaPlayer/MediaPlayer.cfg +3 -0
- package/skills/statechart/scripts/test/corpus/MediaPlayer/MediaPlayer.tla +103 -0
- package/skills/statechart/scripts/test/corpus/MediaPlayer/chart.mmd +43 -0
- package/skills/statechart/scripts/test/corpus/MediaPlayer/graph.dot +93 -0
- package/skills/statechart/scripts/test/corpus/MediaPlayer/report.md +14 -0
- package/skills/statechart/scripts/test/corpus/MediaPlayer/sany.out +1 -0
- package/skills/statechart/scripts/test/corpus/MediaPlayer/verdict-1.exit +1 -0
- package/skills/statechart/scripts/test/corpus/MediaPlayer/verdict-1.out +59 -0
- package/skills/statechart/scripts/test/corpus/MediaPlayer/verdict-2.out +72 -0
- package/skills/statechart/scripts/test/corpus/MediaPlayer/view.mjs +3 -0
- package/skills/statechart/scripts/test/corpus/MediaPlayerFixed/ChartRun.out +57 -0
- package/skills/statechart/scripts/test/corpus/MediaPlayerFixed/MediaPlayerFixed.cfg +2 -0
- package/skills/statechart/scripts/test/corpus/MediaPlayerFixed/MediaPlayerFixed.tla +100 -0
- package/skills/statechart/scripts/test/corpus/MediaPlayerFixed/chart.mmd +31 -0
- package/skills/statechart/scripts/test/corpus/MediaPlayerFixed/graph.dot +85 -0
- package/skills/statechart/scripts/test/corpus/MediaPlayerFixed/report.md +9 -0
- package/skills/statechart/scripts/test/corpus/MediaPlayerFixed/sany.out +1 -0
- package/skills/statechart/scripts/test/corpus/MediaPlayerFixed/verdict-1.out +47 -0
- package/skills/statechart/scripts/test/corpus/MediaPlayerFixed/view.mjs +3 -0
- package/skills/statechart/scripts/test/corpus/MediaPlayerProps/ChartRun.out +59 -0
- package/skills/statechart/scripts/test/corpus/MediaPlayerProps/MediaPlayer.tla +103 -0
- package/skills/statechart/scripts/test/corpus/MediaPlayerProps/MediaPlayerProps.cfg +3 -0
- package/skills/statechart/scripts/test/corpus/MediaPlayerProps/MediaPlayerProps.tla +6 -0
- package/skills/statechart/scripts/test/corpus/MediaPlayerProps/chart.mmd +42 -0
- package/skills/statechart/scripts/test/corpus/MediaPlayerProps/graph.dot +93 -0
- package/skills/statechart/scripts/test/corpus/MediaPlayerProps/report.md +19 -0
- package/skills/statechart/scripts/test/corpus/MediaPlayerProps/sany.out +2 -0
- package/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-1.exit +1 -0
- package/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-1.out +61 -0
- package/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-2.out +59 -0
- package/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-3.out +61 -0
- package/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-4.exit +1 -0
- package/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-4.out +66 -0
- package/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-5.exit +1 -0
- package/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-5.out +58 -0
- package/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-6.out +49 -0
- package/skills/statechart/scripts/test/corpus/MediaPlayerProps/view.mjs +3 -0
- package/skills/statechart/scripts/test/corpus/PickWorker/ChartRun.out +57 -0
- package/skills/statechart/scripts/test/corpus/PickWorker/PickWorker.cfg +6 -0
- package/skills/statechart/scripts/test/corpus/PickWorker/PickWorker.tla +11 -0
- package/skills/statechart/scripts/test/corpus/PickWorker/chart.mmd +5 -0
- package/skills/statechart/scripts/test/corpus/PickWorker/graph.dot +11 -0
- package/skills/statechart/scripts/test/corpus/PickWorker/report.md +7 -0
- package/skills/statechart/scripts/test/corpus/PickWorker/sany.out +5 -0
- package/skills/statechart/scripts/test/corpus/PickWorker/verdict-1.out +70 -0
- package/skills/statechart/scripts/test/corpus/Shadow/ChartRun.out +61 -0
- package/skills/statechart/scripts/test/corpus/Shadow/Shadow.cfg +4 -0
- package/skills/statechart/scripts/test/corpus/Shadow/Shadow.tla +11 -0
- package/skills/statechart/scripts/test/corpus/Shadow/ShadowLib.tla +6 -0
- package/skills/statechart/scripts/test/corpus/Shadow/ShadowSub.tla +3 -0
- package/skills/statechart/scripts/test/corpus/Shadow/chart.mmd +9 -0
- package/skills/statechart/scripts/test/corpus/Shadow/graph.dot +16 -0
- package/skills/statechart/scripts/test/corpus/Shadow/report.md +8 -0
- package/skills/statechart/scripts/test/corpus/Shadow/sany.out +4 -0
- package/skills/statechart/scripts/test/corpus/Shadow/verdict-1.out +65 -0
- package/skills/statechart/scripts/test/corpus/SpacedNames/ChartRun.out +59 -0
- package/skills/statechart/scripts/test/corpus/SpacedNames/SpacedNames.cfg +2 -0
- package/skills/statechart/scripts/test/corpus/SpacedNames/SpacedNames.tla +9 -0
- package/skills/statechart/scripts/test/corpus/SpacedNames/chart.mmd +23 -0
- package/skills/statechart/scripts/test/corpus/SpacedNames/graph.dot +17 -0
- package/skills/statechart/scripts/test/corpus/SpacedNames/report.md +15 -0
- package/skills/statechart/scripts/test/corpus/SpacedNames/sany.out +1 -0
- package/skills/statechart/scripts/test/corpus/SpacedNames/verdict-1.exit +1 -0
- package/skills/statechart/scripts/test/corpus/SpacedNames/verdict-1.out +65 -0
- package/skills/statechart/scripts/test/corpus/SpacedNames/verdict-2.exit +1 -0
- package/skills/statechart/scripts/test/corpus/SpacedNames/verdict-2.out +75 -0
- package/skills/statechart/scripts/test/corpus/TwoPhase/ChartRun.out +69 -0
- package/skills/statechart/scripts/test/corpus/TwoPhase/TwoPhase.cfg +3 -0
- package/skills/statechart/scripts/test/corpus/TwoPhase/TwoPhase.tla +75 -0
- package/skills/statechart/scripts/test/corpus/TwoPhase/chart.mmd +60 -0
- package/skills/statechart/scripts/test/corpus/TwoPhase/graph.dot +297 -0
- package/skills/statechart/scripts/test/corpus/TwoPhase/report.md +20 -0
- package/skills/statechart/scripts/test/corpus/TwoPhase/sany.out +1 -0
- package/skills/statechart/scripts/test/corpus/TwoPhase/verdict-1.exit +1 -0
- package/skills/statechart/scripts/test/corpus/TwoPhase/verdict-1.out +95 -0
- package/skills/statechart/scripts/test/corpus/TwoPhase/verdict-2.out +57 -0
- package/skills/statechart/scripts/test/corpus/TwoPhase/view.mjs +1 -0
- package/skills/statechart/scripts/test/corpus/TwoPhaseFixed/ChartRun.out +57 -0
- package/skills/statechart/scripts/test/corpus/TwoPhaseFixed/TwoPhaseFixed.cfg +3 -0
- package/skills/statechart/scripts/test/corpus/TwoPhaseFixed/TwoPhaseFixed.tla +75 -0
- package/skills/statechart/scripts/test/corpus/TwoPhaseFixed/chart.mmd +37 -0
- package/skills/statechart/scripts/test/corpus/TwoPhaseFixed/graph.dot +223 -0
- package/skills/statechart/scripts/test/corpus/TwoPhaseFixed/report.md +11 -0
- package/skills/statechart/scripts/test/corpus/TwoPhaseFixed/sany.out +1 -0
- package/skills/statechart/scripts/test/corpus/TwoPhaseFixed/verdict-1.out +47 -0
- package/skills/statechart/scripts/test/corpus/TwoPhaseFixed/view.mjs +1 -0
- package/skills/statechart/scripts/test/corpus/TypeGuard/ChartRun.exit +1 -0
- package/skills/statechart/scripts/test/corpus/TypeGuard/ChartRun.out +75 -0
- package/skills/statechart/scripts/test/corpus/TypeGuard/TypeGuard.cfg +5 -0
- package/skills/statechart/scripts/test/corpus/TypeGuard/TypeGuard.tla +11 -0
- package/skills/statechart/scripts/test/corpus/TypeGuard/chart.mmd +18 -0
- package/skills/statechart/scripts/test/corpus/TypeGuard/graph.dot +14 -0
- package/skills/statechart/scripts/test/corpus/TypeGuard/report.md +29 -0
- package/skills/statechart/scripts/test/corpus/TypeGuard/sany.out +2 -0
- package/skills/statechart/scripts/test/corpus/TypeGuard/verdict-1.exit +1 -0
- package/skills/statechart/scripts/test/corpus/TypeGuard/verdict-1.out +64 -0
- package/skills/statechart/scripts/test/corpus/TypeGuard/verdict-2.exit +1 -0
- package/skills/statechart/scripts/test/corpus/TypeGuard/verdict-2.out +75 -0
- package/skills/statechart/scripts/test/corpus/UserNoDeadlock/ChartRun.out +58 -0
- package/skills/statechart/scripts/test/corpus/UserNoDeadlock/UserNoDeadlock.cfg +2 -0
- package/skills/statechart/scripts/test/corpus/UserNoDeadlock/UserNoDeadlock.tla +8 -0
- package/skills/statechart/scripts/test/corpus/UserNoDeadlock/chart.mmd +22 -0
- package/skills/statechart/scripts/test/corpus/UserNoDeadlock/graph.dot +16 -0
- package/skills/statechart/scripts/test/corpus/UserNoDeadlock/report.md +15 -0
- package/skills/statechart/scripts/test/corpus/UserNoDeadlock/sany.out +2 -0
- package/skills/statechart/scripts/test/corpus/UserNoDeadlock/verdict-1.exit +1 -0
- package/skills/statechart/scripts/test/corpus/UserNoDeadlock/verdict-1.out +56 -0
- package/skills/statechart/scripts/test/corpus/UserNoDeadlock/verdict-2.exit +1 -0
- package/skills/statechart/scripts/test/corpus/UserNoDeadlock/verdict-2.out +77 -0
- package/skills/statechart/scripts/test/corpus.test.ts +403 -0
- package/skills/statechart/scripts/test/differential.test.ts +565 -0
- package/skills/statechart/scripts/test/grid/Grid.cfg +2 -0
- package/skills/statechart/scripts/test/grid/Grid.tla +9 -0
- package/skills/statechart/scripts/test/grid/sany.out +2 -0
- package/skills/statechart/scripts/test/java.ts +63 -0
- package/skills/statechart/scripts/test/labels.ts +643 -0
- package/skills/statechart/scripts/test/messages.test.ts +212 -0
- package/skills/statechart/scripts/test/pipeline.test.ts +270 -0
- package/skills/statechart/scripts/test/plain-tlc.test.ts +255 -0
- package/skills/statechart/scripts/test/regions.mmd +62 -0
- package/skills/statechart/scripts/test/render.test.ts +81 -0
- package/skills/statechart/scripts/test/statechart.test.mjs +6854 -0
- package/skills/statechart/scripts/test/sync.mmd +19 -0
- package/skills/statechart/scripts/test/tlc-out.test.ts +90 -0
- package/skills/statechart/scripts/test/tlc.ts +158 -0
- package/skills/statechart/scripts/test/upload.mmd +16 -0
- package/skills/statechart/scripts/tlc-to-chart-args.mjs +52 -0
- package/skills/statechart/scripts/tlc-to-chart.mjs +802 -0
- package/skills/statechart/scripts/tlc-tools.mjs +69 -0
- package/skills/statechart/scripts/tsconfig.json +11 -0
- package/skills/statechart/scripts/ways-in.mjs +69 -0
- package/skills/statechart/scripts/worker.ts +35 -0
- package/skills/swarm/SKILL.md +91 -0
- package/skills/tdd/SKILL.md +92 -0
- package/skills/teach/SKILL.md +71 -0
- package/skills/technical-writing/SKILL.md +156 -0
- package/skills/typescript-best-practices/SKILL.md +81 -0
- package/skills/typescript-best-practices/references/patterns.md +328 -0
- package/skills/unslop/SKILL.md +112 -0
- package/skills/why/SKILL.md +148 -0
- package/skills/why/references/epistemics.md +71 -0
- package/skills/why/references/investigator-prompt.md +84 -0
- package/skills/why/references/source-playbook.md +17 -0
- package/skills/why/references/sources/analytics.md +5 -0
- package/skills/why/references/sources/code-archaeology.md +51 -0
- package/skills/why/references/sources/databricks.md +70 -0
- package/skills/why/references/sources/datadog.md +97 -0
- package/skills/why/references/sources/documents.md +5 -0
- package/skills/why/references/sources/errors.md +5 -0
- package/skills/why/references/sources/incident-postmortem.md +5 -0
- package/skills/why/references/sources/issues.md +5 -0
- package/skills/why/references/sources/linear.md +48 -0
- package/skills/why/references/sources/notion.md +55 -0
- package/skills/why/references/sources/observability.md +5 -0
- package/skills/why/references/sources/sentry.md +66 -0
- package/skills/why/references/sources/slack.md +17 -0
- package/skills/why/references/sources/source-control.md +5 -0
- package/skills/why/references/sources/team-chat.md +5 -0
- package/skills/why/references/synthesizer-prompt.md +129 -0
- package/src/agent/candidates.ts +60 -0
- package/src/agent/grep-worker.mjs +46 -0
- package/src/agent/host.ts +455 -0
- package/src/agent/isolation.ts +14 -0
- package/src/agent/outcome.ts +18 -0
- package/src/agent/profiles.ts +133 -0
- package/src/agent/read-only-tools.ts +129 -0
- package/src/agent/resources.ts +66 -0
- package/src/api.ts +19 -0
- package/src/artifacts/fingerprint.ts +58 -0
- package/src/compatibility/adapter.ts +94 -0
- package/src/compatibility/source.ts +30 -0
- package/src/compatibility/tool.ts +47 -0
- package/src/context/snapshot.ts +12 -0
- package/src/contracts/brief.ts +144 -0
- package/src/contracts/types.ts +57 -0
- package/src/delivery/frontier.ts +87 -0
- package/src/delivery/git.ts +9 -0
- package/src/delivery/prepare.ts +23 -0
- package/src/delivery/provider.ts +41 -0
- package/src/delivery/review-threads.ts +28 -0
- package/src/delivery/stack.ts +76 -0
- package/src/extension.ts +281 -0
- package/src/loop/scheduler.ts +334 -0
- package/src/loop/store.ts +66 -0
- package/src/models/router.ts +171 -0
- package/src/program/coordinator.ts +122 -0
- package/src/program/dispatch.ts +83 -0
- package/src/runner/cli.mjs +46 -0
- package/src/runner/lease.ts +17 -0
- package/src/runner/service.ts +37 -0
- package/src/runtime/checkout.ts +19 -0
- package/src/runtime/config.ts +49 -0
- package/src/runtime/errors.ts +12 -0
- package/src/runtime/home.ts +17 -0
- package/src/runtime/lock.ts +101 -0
- package/src/runtime/migrate.ts +29 -0
- package/src/runtime/ownership.ts +6 -0
- package/src/runtime/protocol.ts +35 -0
- package/src/runtime/redact.ts +34 -0
- package/src/runtime/store.ts +50 -0
- package/src/runtime/transaction.ts +41 -0
- package/src/runtime/types.ts +203 -0
- package/src/runtime/upstream.ts +7 -0
- package/src/setup/command.ts +331 -0
- package/src/telemetry/metrics.ts +11 -0
- package/src/templates/build.ts +172 -0
- package/src/tools/agents.ts +62 -0
- package/src/tools/graph.ts +37 -0
- package/src/tools/protocol.ts +53 -0
- package/src/tools/schema.ts +9 -0
- package/src/tools/workflow.ts +103 -0
- package/src/tools/worktrees.ts +39 -0
- package/src/verification/process.mjs +9 -0
- package/src/verification/runner.ts +148 -0
- package/src/workflow/artifacts.ts +97 -0
- package/src/workflow/engine.ts +631 -0
- package/src/workflow/graph.ts +53 -0
- package/src/worktree/manager.ts +60 -0
- package/src/worktree/snapshot.ts +35 -0
- package/test/baseline-owner.test.ts +122 -0
- package/test/benchmark.test.ts +81 -0
- package/test/cancellation.test.ts +92 -0
- package/test/candidate-port.test.ts +18 -0
- package/test/check-plan.test.ts +99 -0
- package/test/checkout.test.ts +19 -0
- package/test/delivery-stack.test.ts +106 -0
- package/test/dispatch.test.ts +171 -0
- package/test/e2e/fixture-child.mjs +33 -0
- package/test/e2e/harness.ts +282 -0
- package/test/e2e/offline.test.ts +153 -0
- package/test/e2e/parent-context.ts +66 -0
- package/test/e2e/reported-defects.test.ts +85 -0
- package/test/e2e/shipping.test.ts +204 -0
- package/test/e2e/workflow.test.ts +408 -0
- package/test/fixtures/loop-execution-lock-holder.mjs +38 -0
- package/test/fixtures/loop-lock-holder.mjs +31 -0
- package/test/fixtures/loop-scheduler-worker.mjs +95 -0
- package/test/fixtures/semantics/scenarios.json +18 -0
- package/test/fixtures/verification-crash-worker.mjs +5 -0
- package/test/graph.test.ts +23 -0
- package/test/isolation.test.ts +21 -0
- package/test/latest-upstream.test.ts +41 -0
- package/test/live/command-probe-child.mjs +22 -0
- package/test/live/command-probe-loader.mjs +8 -0
- package/test/live/command-probe-register.mjs +12 -0
- package/test/live/github-live.test.ts +107 -0
- package/test/live/guard.ts +70 -0
- package/test/lock.test.ts +76 -0
- package/test/loop-scheduler.test.ts +460 -0
- package/test/loop.test.ts +60 -0
- package/test/ml-development.test.ts +65 -0
- package/test/model-panels.test.ts +237 -0
- package/test/model-router.test.ts +124 -0
- package/test/outcome.test.ts +31 -0
- package/test/protocol.test.ts +350 -0
- package/test/read-only-tools.test.ts +86 -0
- package/test/real-sdk-integration.test.ts +183 -0
- package/test/redaction.test.ts +66 -0
- package/test/resources.test.ts +42 -0
- package/test/review-snapshot.test.ts +48 -0
- package/test/semantic-compatibility.test.ts +121 -0
- package/test/setup-command.test.ts +212 -0
- package/test/setup-rpc.test.ts +68 -0
- package/test/smoke-installed-package.mjs +119 -0
- package/test/statechart.test.ts +25 -0
- package/test/store.test.ts +35 -0
- package/test/swarm-race.test.ts +50 -0
- package/test/tool-ownership.test.ts +59 -0
- package/test/transaction.test.ts +89 -0
- package/test/verification.test.ts +295 -0
- package/test/workflow.test.ts +408 -0
- package/test/worktree.test.ts +39 -0
- package/tsconfig.build.json +12 -0
- package/tsconfig.json +17 -0
- package/vendor/upstream/0.15.17/pstack/LICENSE +21 -0
- package/vendor/upstream/0.15.17/pstack/skills/architect/SKILL.md +79 -0
- package/vendor/upstream/0.15.17/pstack/skills/architect/references/design-red-flags.md +57 -0
- package/vendor/upstream/0.15.17/pstack/skills/architect/references/rationale-template.md +35 -0
- package/vendor/upstream/0.15.17/pstack/skills/architect/references/runner-prompt.md +20 -0
- package/vendor/upstream/0.15.17/pstack/skills/arena/SKILL.md +48 -0
- package/vendor/upstream/0.15.17/pstack/skills/automate-me/SKILL.md +104 -0
- package/vendor/upstream/0.15.17/pstack/skills/benchmark-checklist/SKILL.md +39 -0
- package/vendor/upstream/0.15.17/pstack/skills/blast-radius/SKILL.md +50 -0
- package/vendor/upstream/0.15.17/pstack/skills/bro/SKILL.md +7 -0
- package/vendor/upstream/0.15.17/pstack/skills/correct/SKILL.md +32 -0
- package/vendor/upstream/0.15.17/pstack/skills/create-verification-skill/SKILL.md +44 -0
- package/vendor/upstream/0.15.17/pstack/skills/create-verification-skill/references/feature-map-example/README.md +47 -0
- package/vendor/upstream/0.15.17/pstack/skills/create-verification-skill/references/feature-map-example/create-note.md +39 -0
- package/vendor/upstream/0.15.17/pstack/skills/create-verification-skill/references/feature-map-example/search.md +45 -0
- package/vendor/upstream/0.15.17/pstack/skills/figure-it-out/SKILL.md +52 -0
- package/vendor/upstream/0.15.17/pstack/skills/how/SKILL.md +36 -0
- package/vendor/upstream/0.15.17/pstack/skills/how/references/explainer-prompt.md +55 -0
- package/vendor/upstream/0.15.17/pstack/skills/how/references/explorer-prompt.md +52 -0
- package/vendor/upstream/0.15.17/pstack/skills/interrogate/SKILL.md +74 -0
- package/vendor/upstream/0.15.17/pstack/skills/interrogate/references/code-quality-review.md +47 -0
- package/vendor/upstream/0.15.17/pstack/skills/interrogate/references/lead-judgment.md +58 -0
- package/vendor/upstream/0.15.17/pstack/skills/interrogate/references/reviewer-prompt.md +62 -0
- package/vendor/upstream/0.15.17/pstack/skills/interrogate/references/rubric.md +77 -0
- package/vendor/upstream/0.15.17/pstack/skills/ketchup/SKILL.md +23 -0
- package/vendor/upstream/0.15.17/pstack/skills/maintain-verification-skill/SKILL.md +39 -0
- package/vendor/upstream/0.15.17/pstack/skills/make-bot-ui/SKILL.md +115 -0
- package/vendor/upstream/0.15.17/pstack/skills/no-comments/SKILL.md +24 -0
- package/vendor/upstream/0.15.17/pstack/skills/poteto-help/SKILL.md +154 -0
- package/vendor/upstream/0.15.17/pstack/skills/poteto-help/references/prompting.md +51 -0
- package/vendor/upstream/0.15.17/pstack/skills/poteto-help/references/recipes.md +47 -0
- package/vendor/upstream/0.15.17/pstack/skills/poteto-mode/SKILL.md +147 -0
- package/vendor/upstream/0.15.17/pstack/skills/poteto-mode/playbooks/authoring-a-skill.md +12 -0
- package/vendor/upstream/0.15.17/pstack/skills/poteto-mode/playbooks/autonomous-run.md +13 -0
- package/vendor/upstream/0.15.17/pstack/skills/poteto-mode/playbooks/autopilot-full.md +13 -0
- package/vendor/upstream/0.15.17/pstack/skills/poteto-mode/playbooks/autopilot-stack.md +16 -0
- package/vendor/upstream/0.15.17/pstack/skills/poteto-mode/playbooks/babysit.md +27 -0
- package/vendor/upstream/0.15.17/pstack/skills/poteto-mode/playbooks/bug-fix.md +15 -0
- package/vendor/upstream/0.15.17/pstack/skills/poteto-mode/playbooks/eval.md +25 -0
- package/vendor/upstream/0.15.17/pstack/skills/poteto-mode/playbooks/feature.md +21 -0
- package/vendor/upstream/0.15.17/pstack/skills/poteto-mode/playbooks/hillclimb.md +21 -0
- package/vendor/upstream/0.15.17/pstack/skills/poteto-mode/playbooks/investigation.md +14 -0
- package/vendor/upstream/0.15.17/pstack/skills/poteto-mode/playbooks/multi-phase-plan.md +155 -0
- package/vendor/upstream/0.15.17/pstack/skills/poteto-mode/playbooks/opening-a-pr.md +34 -0
- package/vendor/upstream/0.15.17/pstack/skills/poteto-mode/playbooks/orchestrate.md +111 -0
- package/vendor/upstream/0.15.17/pstack/skills/poteto-mode/playbooks/pause-safely.md +10 -0
- package/vendor/upstream/0.15.17/pstack/skills/poteto-mode/playbooks/perf-issue.md +25 -0
- package/vendor/upstream/0.15.17/pstack/skills/poteto-mode/playbooks/prototype.md +14 -0
- package/vendor/upstream/0.15.17/pstack/skills/poteto-mode/playbooks/refactoring.md +16 -0
- package/vendor/upstream/0.15.17/pstack/skills/poteto-mode/playbooks/runtime-forensics.md +11 -0
- package/vendor/upstream/0.15.17/pstack/skills/poteto-mode/playbooks/session-pickup.md +11 -0
- package/vendor/upstream/0.15.17/pstack/skills/poteto-mode/playbooks/shipping.md +17 -0
- package/vendor/upstream/0.15.17/pstack/skills/poteto-mode/playbooks/trace-forensics.md +14 -0
- package/vendor/upstream/0.15.17/pstack/skills/poteto-mode/playbooks/visual-parity.md +11 -0
- package/vendor/upstream/0.15.17/pstack/skills/poteto-mode/playbooks/worktree-cleanup.md +14 -0
- package/vendor/upstream/0.15.17/pstack/skills/poteto-mode/references/bugbot-triage.md +142 -0
- package/vendor/upstream/0.15.17/pstack/skills/principle-attack-the-premise/SKILL.md +23 -0
- package/vendor/upstream/0.15.17/pstack/skills/principle-boundary-discipline/SKILL.md +34 -0
- package/vendor/upstream/0.15.17/pstack/skills/principle-build-the-lever/SKILL.md +23 -0
- package/vendor/upstream/0.15.17/pstack/skills/principle-encode-lessons-in-structure/SKILL.md +28 -0
- package/vendor/upstream/0.15.17/pstack/skills/principle-exhaust-the-design-space/SKILL.md +21 -0
- package/vendor/upstream/0.15.17/pstack/skills/principle-experience-first/SKILL.md +19 -0
- package/vendor/upstream/0.15.17/pstack/skills/principle-explain-the-number/SKILL.md +17 -0
- package/vendor/upstream/0.15.17/pstack/skills/principle-fix-root-causes/SKILL.md +23 -0
- package/vendor/upstream/0.15.17/pstack/skills/principle-foundational-thinking/SKILL.md +21 -0
- package/vendor/upstream/0.15.17/pstack/skills/principle-guard-the-context-window/SKILL.md +16 -0
- package/vendor/upstream/0.15.17/pstack/skills/principle-laziness-protocol/SKILL.md +18 -0
- package/vendor/upstream/0.15.17/pstack/skills/principle-make-operations-idempotent/SKILL.md +24 -0
- package/vendor/upstream/0.15.17/pstack/skills/principle-migrate-callers-then-delete-legacy-apis/SKILL.md +22 -0
- package/vendor/upstream/0.15.17/pstack/skills/principle-minimize-reader-load/SKILL.md +18 -0
- package/vendor/upstream/0.15.17/pstack/skills/principle-model-the-domain/SKILL.md +24 -0
- package/vendor/upstream/0.15.17/pstack/skills/principle-never-block-on-the-human/SKILL.md +15 -0
- package/vendor/upstream/0.15.17/pstack/skills/principle-outcome-oriented-execution/SKILL.md +21 -0
- package/vendor/upstream/0.15.17/pstack/skills/principle-prove-it-works/SKILL.md +22 -0
- package/vendor/upstream/0.15.17/pstack/skills/principle-redesign-from-first-principles/SKILL.md +16 -0
- package/vendor/upstream/0.15.17/pstack/skills/principle-separate-before-serializing-shared-state/SKILL.md +16 -0
- package/vendor/upstream/0.15.17/pstack/skills/principle-sequence-verifiable-units/SKILL.md +17 -0
- package/vendor/upstream/0.15.17/pstack/skills/principle-subtract-before-you-add/SKILL.md +18 -0
- package/vendor/upstream/0.15.17/pstack/skills/principle-test-behavior-not-implementation/SKILL.md +21 -0
- package/vendor/upstream/0.15.17/pstack/skills/principle-type-system-discipline/SKILL.md +18 -0
- package/vendor/upstream/0.15.17/pstack/skills/recall/SKILL.md +35 -0
- package/vendor/upstream/0.15.17/pstack/skills/reflect/SKILL.md +67 -0
- package/vendor/upstream/0.15.17/pstack/skills/reflect/references/divergent-reviewer.md +38 -0
- package/vendor/upstream/0.15.17/pstack/skills/reflect/references/judgment-reviewer.md +37 -0
- package/vendor/upstream/0.15.17/pstack/skills/reflect/references/synthesizer.md +56 -0
- package/vendor/upstream/0.15.17/pstack/skills/reflect/references/tooling-reviewer.md +48 -0
- package/vendor/upstream/0.15.17/pstack/skills/setup-pstack/SKILL.md +74 -0
- package/vendor/upstream/0.15.17/pstack/skills/show-me-your-work/SKILL.md +82 -0
- package/vendor/upstream/0.15.17/pstack/skills/swarm/SKILL.md +46 -0
- package/vendor/upstream/0.15.17/pstack/skills/tdd/SKILL.md +42 -0
- package/vendor/upstream/0.15.17/pstack/skills/teach/SKILL.md +21 -0
- package/vendor/upstream/0.15.17/pstack/skills/technical-writing/SKILL.md +106 -0
- package/vendor/upstream/0.15.17/pstack/skills/typescript-best-practices/SKILL.md +31 -0
- package/vendor/upstream/0.15.17/pstack/skills/typescript-best-practices/references/patterns.md +324 -0
- package/vendor/upstream/0.15.17/pstack/skills/unslop/SKILL.md +62 -0
- package/vendor/upstream/0.15.17/pstack/skills/why/SKILL.md +98 -0
- package/vendor/upstream/0.15.17/pstack/skills/why/references/epistemics.md +71 -0
- package/vendor/upstream/0.15.17/pstack/skills/why/references/investigator-prompt.md +84 -0
- package/vendor/upstream/0.15.17/pstack/skills/why/references/source-playbook.md +17 -0
- package/vendor/upstream/0.15.17/pstack/skills/why/references/sources/code-archaeology.md +86 -0
- package/vendor/upstream/0.15.17/pstack/skills/why/references/sources/databricks.md +70 -0
- package/vendor/upstream/0.15.17/pstack/skills/why/references/sources/datadog.md +97 -0
- package/vendor/upstream/0.15.17/pstack/skills/why/references/sources/incident-postmortem.md +15 -0
- package/vendor/upstream/0.15.17/pstack/skills/why/references/sources/linear.md +48 -0
- package/vendor/upstream/0.15.17/pstack/skills/why/references/sources/notion.md +55 -0
- package/vendor/upstream/0.15.17/pstack/skills/why/references/sources/sentry.md +96 -0
- package/vendor/upstream/0.15.17/pstack/skills/why/references/sources/slack.md +54 -0
- package/vendor/upstream/0.15.17/pstack/skills/why/references/synthesizer-prompt.md +129 -0
- package/vendor/upstream/0.15.32/pstack/.cursor-plugin/plugin.json +31 -0
- package/vendor/upstream/0.15.32/pstack/LICENSE +21 -0
- package/vendor/upstream/0.15.32/pstack/skills/architect/SKILL.md +79 -0
- package/vendor/upstream/0.15.32/pstack/skills/architect/references/design-red-flags.md +57 -0
- package/vendor/upstream/0.15.32/pstack/skills/architect/references/rationale-template.md +35 -0
- package/vendor/upstream/0.15.32/pstack/skills/architect/references/runner-prompt.md +20 -0
- package/vendor/upstream/0.15.32/pstack/skills/arena/SKILL.md +48 -0
- package/vendor/upstream/0.15.32/pstack/skills/automate-me/SKILL.md +104 -0
- package/vendor/upstream/0.15.32/pstack/skills/benchmark-checklist/SKILL.md +39 -0
- package/vendor/upstream/0.15.32/pstack/skills/blast-radius/SKILL.md +50 -0
- package/vendor/upstream/0.15.32/pstack/skills/bro/SKILL.md +7 -0
- package/vendor/upstream/0.15.32/pstack/skills/correct/SKILL.md +32 -0
- package/vendor/upstream/0.15.32/pstack/skills/create-formal-verification-skill/SKILL.md +43 -0
- package/vendor/upstream/0.15.32/pstack/skills/create-verification-skill/SKILL.md +44 -0
- package/vendor/upstream/0.15.32/pstack/skills/create-verification-skill/references/feature-map-example/README.md +47 -0
- package/vendor/upstream/0.15.32/pstack/skills/create-verification-skill/references/feature-map-example/create-note.md +39 -0
- package/vendor/upstream/0.15.32/pstack/skills/create-verification-skill/references/feature-map-example/search.md +45 -0
- package/vendor/upstream/0.15.32/pstack/skills/figure-it-out/SKILL.md +52 -0
- package/vendor/upstream/0.15.32/pstack/skills/how/SKILL.md +36 -0
- package/vendor/upstream/0.15.32/pstack/skills/how/references/explainer-prompt.md +55 -0
- package/vendor/upstream/0.15.32/pstack/skills/how/references/explorer-prompt.md +35 -0
- package/vendor/upstream/0.15.32/pstack/skills/in-your-own-words/SKILL.md +7 -0
- package/vendor/upstream/0.15.32/pstack/skills/interrogate/SKILL.md +74 -0
- package/vendor/upstream/0.15.32/pstack/skills/interrogate/references/code-quality-review.md +47 -0
- package/vendor/upstream/0.15.32/pstack/skills/interrogate/references/lead-judgment.md +39 -0
- package/vendor/upstream/0.15.32/pstack/skills/interrogate/references/reviewer-prompt.md +62 -0
- package/vendor/upstream/0.15.32/pstack/skills/interrogate/references/rubric.md +77 -0
- package/vendor/upstream/0.15.32/pstack/skills/ketchup/SKILL.md +43 -0
- package/vendor/upstream/0.15.32/pstack/skills/ketchup-video/SKILL.md +23 -0
- package/vendor/upstream/0.15.32/pstack/skills/maintain-formal-verification-skill/SKILL.md +58 -0
- package/vendor/upstream/0.15.32/pstack/skills/maintain-verification-skill/SKILL.md +39 -0
- package/vendor/upstream/0.15.32/pstack/skills/make-bot-ui/SKILL.md +115 -0
- package/vendor/upstream/0.15.32/pstack/skills/no-comments/SKILL.md +24 -0
- package/vendor/upstream/0.15.32/pstack/skills/poteto-help/SKILL.md +163 -0
- package/vendor/upstream/0.15.32/pstack/skills/poteto-help/references/prompting.md +51 -0
- package/vendor/upstream/0.15.32/pstack/skills/poteto-help/references/recipes.md +51 -0
- package/vendor/upstream/0.15.32/pstack/skills/poteto-mode/SKILL.md +149 -0
- package/vendor/upstream/0.15.32/pstack/skills/poteto-mode/playbooks/authoring-a-skill.md +12 -0
- package/vendor/upstream/0.15.32/pstack/skills/poteto-mode/playbooks/autonomous-run.md +13 -0
- package/vendor/upstream/0.15.32/pstack/skills/poteto-mode/playbooks/autopilot-full.md +25 -0
- package/vendor/upstream/0.15.32/pstack/skills/poteto-mode/playbooks/autopilot-stack.md +12 -0
- package/vendor/upstream/0.15.32/pstack/skills/poteto-mode/playbooks/babysit.md +23 -0
- package/vendor/upstream/0.15.32/pstack/skills/poteto-mode/playbooks/bug-fix.md +15 -0
- package/vendor/upstream/0.15.32/pstack/skills/poteto-mode/playbooks/eval.md +25 -0
- package/vendor/upstream/0.15.32/pstack/skills/poteto-mode/playbooks/feature.md +21 -0
- package/vendor/upstream/0.15.32/pstack/skills/poteto-mode/playbooks/hillclimb.md +21 -0
- package/vendor/upstream/0.15.32/pstack/skills/poteto-mode/playbooks/investigation.md +14 -0
- package/vendor/upstream/0.15.32/pstack/skills/poteto-mode/playbooks/multi-phase-plan.md +155 -0
- package/vendor/upstream/0.15.32/pstack/skills/poteto-mode/playbooks/opening-a-pr.md +34 -0
- package/vendor/upstream/0.15.32/pstack/skills/poteto-mode/playbooks/orchestrate.md +112 -0
- package/vendor/upstream/0.15.32/pstack/skills/poteto-mode/playbooks/pause-safely.md +10 -0
- package/vendor/upstream/0.15.32/pstack/skills/poteto-mode/playbooks/perf-issue.md +25 -0
- package/vendor/upstream/0.15.32/pstack/skills/poteto-mode/playbooks/prototype.md +14 -0
- package/vendor/upstream/0.15.32/pstack/skills/poteto-mode/playbooks/refactoring.md +16 -0
- package/vendor/upstream/0.15.32/pstack/skills/poteto-mode/playbooks/runtime-forensics.md +11 -0
- package/vendor/upstream/0.15.32/pstack/skills/poteto-mode/playbooks/session-pickup.md +11 -0
- package/vendor/upstream/0.15.32/pstack/skills/poteto-mode/playbooks/shipping.md +12 -0
- package/vendor/upstream/0.15.32/pstack/skills/poteto-mode/playbooks/trace-forensics.md +14 -0
- package/vendor/upstream/0.15.32/pstack/skills/poteto-mode/playbooks/visual-parity.md +11 -0
- package/vendor/upstream/0.15.32/pstack/skills/poteto-mode/playbooks/worktree-cleanup.md +12 -0
- package/vendor/upstream/0.15.32/pstack/skills/poteto-mode/references/bugbot-triage.md +142 -0
- package/vendor/upstream/0.15.32/pstack/skills/principle-attack-the-premise/SKILL.md +21 -0
- package/vendor/upstream/0.15.32/pstack/skills/principle-boundary-discipline/SKILL.md +34 -0
- package/vendor/upstream/0.15.32/pstack/skills/principle-build-the-lever/SKILL.md +23 -0
- package/vendor/upstream/0.15.32/pstack/skills/principle-encode-lessons-in-structure/SKILL.md +11 -0
- package/vendor/upstream/0.15.32/pstack/skills/principle-exhaust-the-design-space/SKILL.md +9 -0
- package/vendor/upstream/0.15.32/pstack/skills/principle-experience-first/SKILL.md +19 -0
- package/vendor/upstream/0.15.32/pstack/skills/principle-explain-the-number/SKILL.md +17 -0
- package/vendor/upstream/0.15.32/pstack/skills/principle-fix-root-causes/SKILL.md +21 -0
- package/vendor/upstream/0.15.32/pstack/skills/principle-foundational-thinking/SKILL.md +21 -0
- package/vendor/upstream/0.15.32/pstack/skills/principle-guard-the-context-window/SKILL.md +12 -0
- package/vendor/upstream/0.15.32/pstack/skills/principle-laziness-protocol/SKILL.md +10 -0
- package/vendor/upstream/0.15.32/pstack/skills/principle-make-operations-idempotent/SKILL.md +22 -0
- package/vendor/upstream/0.15.32/pstack/skills/principle-migrate-callers-then-delete-legacy-apis/SKILL.md +14 -0
- package/vendor/upstream/0.15.32/pstack/skills/principle-minimize-reader-load/SKILL.md +18 -0
- package/vendor/upstream/0.15.32/pstack/skills/principle-model-the-domain/SKILL.md +24 -0
- package/vendor/upstream/0.15.32/pstack/skills/principle-never-block-on-the-human/SKILL.md +15 -0
- package/vendor/upstream/0.15.32/pstack/skills/principle-outcome-oriented-execution/SKILL.md +21 -0
- package/vendor/upstream/0.15.32/pstack/skills/principle-prove-it-works/SKILL.md +22 -0
- package/vendor/upstream/0.15.32/pstack/skills/principle-redesign-from-first-principles/SKILL.md +16 -0
- package/vendor/upstream/0.15.32/pstack/skills/principle-separate-before-serializing-shared-state/SKILL.md +16 -0
- package/vendor/upstream/0.15.32/pstack/skills/principle-sequence-verifiable-units/SKILL.md +17 -0
- package/vendor/upstream/0.15.32/pstack/skills/principle-subtract-before-you-add/SKILL.md +18 -0
- package/vendor/upstream/0.15.32/pstack/skills/principle-test-behavior-not-implementation/SKILL.md +20 -0
- package/vendor/upstream/0.15.32/pstack/skills/principle-type-system-discipline/SKILL.md +13 -0
- package/vendor/upstream/0.15.32/pstack/skills/recall/SKILL.md +35 -0
- package/vendor/upstream/0.15.32/pstack/skills/reflect/SKILL.md +69 -0
- package/vendor/upstream/0.15.32/pstack/skills/reflect/references/divergent-reviewer.md +38 -0
- package/vendor/upstream/0.15.32/pstack/skills/reflect/references/judgment-reviewer.md +37 -0
- package/vendor/upstream/0.15.32/pstack/skills/reflect/references/synthesizer.md +56 -0
- package/vendor/upstream/0.15.32/pstack/skills/reflect/references/tooling-reviewer.md +48 -0
- package/vendor/upstream/0.15.32/pstack/skills/setup-pstack/SKILL.md +78 -0
- package/vendor/upstream/0.15.32/pstack/skills/sharpen/SKILL.md +16 -0
- package/vendor/upstream/0.15.32/pstack/skills/show-me-your-work/SKILL.md +82 -0
- package/vendor/upstream/0.15.32/pstack/skills/statechart/SKILL.md +36 -0
- package/vendor/upstream/0.15.32/pstack/skills/statechart/scripts/bug-states.mjs +81 -0
- package/vendor/upstream/0.15.32/pstack/skills/statechart/scripts/chart-edges.mjs +68 -0
- package/vendor/upstream/0.15.32/pstack/skills/statechart/scripts/chart-parts.mjs +21 -0
- package/vendor/upstream/0.15.32/pstack/skills/statechart/scripts/chart-to-tla.mjs +205 -0
- package/vendor/upstream/0.15.32/pstack/skills/statechart/scripts/compare-charts.mjs +74 -0
- package/vendor/upstream/0.15.32/pstack/skills/statechart/scripts/lib.mjs +970 -0
- package/vendor/upstream/0.15.32/pstack/skills/statechart/scripts/map-view.mjs +92 -0
- package/vendor/upstream/0.15.32/pstack/skills/statechart/scripts/property-loop.mjs +60 -0
- package/vendor/upstream/0.15.32/pstack/skills/statechart/scripts/read-check.mjs +79 -0
- package/vendor/upstream/0.15.32/pstack/skills/statechart/scripts/regions-chart.mjs +307 -0
- package/vendor/upstream/0.15.32/pstack/skills/statechart/scripts/render.mjs +531 -0
- package/vendor/upstream/0.15.32/pstack/skills/statechart/scripts/rule-book.mjs +84 -0
- package/vendor/upstream/0.15.32/pstack/skills/statechart/scripts/second-replay.mjs +122 -0
- package/vendor/upstream/0.15.32/pstack/skills/statechart/scripts/snapshot.mjs +74 -0
- package/vendor/upstream/0.15.32/pstack/skills/statechart/scripts/spec-text.mjs +126 -0
- package/vendor/upstream/0.15.32/pstack/skills/statechart/scripts/statechart-help.mjs +350 -0
- package/vendor/upstream/0.15.32/pstack/skills/statechart/scripts/statechart.mjs +903 -0
- package/vendor/upstream/0.15.32/pstack/skills/statechart/scripts/test/band.mmd +15 -0
- package/vendor/upstream/0.15.32/pstack/skills/statechart/scripts/test/regions.mmd +62 -0
- package/vendor/upstream/0.15.32/pstack/skills/statechart/scripts/test/statechart.test.mjs +6854 -0
- package/vendor/upstream/0.15.32/pstack/skills/statechart/scripts/test/sync.mmd +19 -0
- package/vendor/upstream/0.15.32/pstack/skills/statechart/scripts/test/upload.mmd +16 -0
- package/vendor/upstream/0.15.32/pstack/skills/statechart/scripts/tlc-to-chart-args.mjs +52 -0
- package/vendor/upstream/0.15.32/pstack/skills/statechart/scripts/tlc-to-chart.mjs +802 -0
- package/vendor/upstream/0.15.32/pstack/skills/statechart/scripts/tlc-tools.mjs +69 -0
- package/vendor/upstream/0.15.32/pstack/skills/statechart/scripts/ways-in.mjs +69 -0
- package/vendor/upstream/0.15.32/pstack/skills/swarm/SKILL.md +41 -0
- package/vendor/upstream/0.15.32/pstack/skills/tdd/SKILL.md +42 -0
- package/vendor/upstream/0.15.32/pstack/skills/teach/SKILL.md +21 -0
- package/vendor/upstream/0.15.32/pstack/skills/technical-writing/SKILL.md +106 -0
- package/vendor/upstream/0.15.32/pstack/skills/typescript-best-practices/SKILL.md +31 -0
- package/vendor/upstream/0.15.32/pstack/skills/typescript-best-practices/references/patterns.md +328 -0
- package/vendor/upstream/0.15.32/pstack/skills/unslop/SKILL.md +62 -0
- package/vendor/upstream/0.15.32/pstack/skills/why/SKILL.md +98 -0
- package/vendor/upstream/0.15.32/pstack/skills/why/references/epistemics.md +71 -0
- package/vendor/upstream/0.15.32/pstack/skills/why/references/investigator-prompt.md +84 -0
- package/vendor/upstream/0.15.32/pstack/skills/why/references/source-playbook.md +17 -0
- package/vendor/upstream/0.15.32/pstack/skills/why/references/sources/code-archaeology.md +51 -0
- package/vendor/upstream/0.15.32/pstack/skills/why/references/sources/databricks.md +70 -0
- package/vendor/upstream/0.15.32/pstack/skills/why/references/sources/datadog.md +97 -0
- package/vendor/upstream/0.15.32/pstack/skills/why/references/sources/incident-postmortem.md +5 -0
- package/vendor/upstream/0.15.32/pstack/skills/why/references/sources/linear.md +48 -0
- package/vendor/upstream/0.15.32/pstack/skills/why/references/sources/notion.md +55 -0
- package/vendor/upstream/0.15.32/pstack/skills/why/references/sources/sentry.md +66 -0
- package/vendor/upstream/0.15.32/pstack/skills/why/references/sources/slack.md +17 -0
- package/vendor/upstream/0.15.32/pstack/skills/why/references/synthesizer-prompt.md +129 -0
- package/vendor/upstream/0.15.36/pstack/.cursor-plugin/plugin.json +31 -0
- package/vendor/upstream/0.15.36/pstack/LICENSE +21 -0
- package/vendor/upstream/0.15.36/pstack/skills/architect/SKILL.md +79 -0
- package/vendor/upstream/0.15.36/pstack/skills/architect/references/design-red-flags.md +57 -0
- package/vendor/upstream/0.15.36/pstack/skills/architect/references/rationale-template.md +35 -0
- package/vendor/upstream/0.15.36/pstack/skills/architect/references/runner-prompt.md +20 -0
- package/vendor/upstream/0.15.36/pstack/skills/arena/SKILL.md +48 -0
- package/vendor/upstream/0.15.36/pstack/skills/automate-me/SKILL.md +104 -0
- package/vendor/upstream/0.15.36/pstack/skills/benchmark-checklist/SKILL.md +39 -0
- package/vendor/upstream/0.15.36/pstack/skills/blast-radius/SKILL.md +50 -0
- package/vendor/upstream/0.15.36/pstack/skills/bro/SKILL.md +7 -0
- package/vendor/upstream/0.15.36/pstack/skills/correct/SKILL.md +32 -0
- package/vendor/upstream/0.15.36/pstack/skills/create-formal-verification-skill/SKILL.md +43 -0
- package/vendor/upstream/0.15.36/pstack/skills/create-verification-skill/SKILL.md +44 -0
- package/vendor/upstream/0.15.36/pstack/skills/create-verification-skill/references/feature-map-example/README.md +47 -0
- package/vendor/upstream/0.15.36/pstack/skills/create-verification-skill/references/feature-map-example/create-note.md +39 -0
- package/vendor/upstream/0.15.36/pstack/skills/create-verification-skill/references/feature-map-example/search.md +45 -0
- package/vendor/upstream/0.15.36/pstack/skills/figure-it-out/SKILL.md +52 -0
- package/vendor/upstream/0.15.36/pstack/skills/how/SKILL.md +36 -0
- package/vendor/upstream/0.15.36/pstack/skills/how/references/explainer-prompt.md +55 -0
- package/vendor/upstream/0.15.36/pstack/skills/how/references/explorer-prompt.md +35 -0
- package/vendor/upstream/0.15.36/pstack/skills/in-your-own-words/SKILL.md +7 -0
- package/vendor/upstream/0.15.36/pstack/skills/interrogate/SKILL.md +31 -0
- package/vendor/upstream/0.15.36/pstack/skills/ketchup/SKILL.md +43 -0
- package/vendor/upstream/0.15.36/pstack/skills/ketchup-video/SKILL.md +29 -0
- package/vendor/upstream/0.15.36/pstack/skills/maintain-formal-verification-skill/SKILL.md +58 -0
- package/vendor/upstream/0.15.36/pstack/skills/maintain-verification-skill/SKILL.md +39 -0
- package/vendor/upstream/0.15.36/pstack/skills/make-bot-ui/SKILL.md +115 -0
- package/vendor/upstream/0.15.36/pstack/skills/no-comments/SKILL.md +24 -0
- package/vendor/upstream/0.15.36/pstack/skills/poteto-help/SKILL.md +163 -0
- package/vendor/upstream/0.15.36/pstack/skills/poteto-help/references/prompting.md +51 -0
- package/vendor/upstream/0.15.36/pstack/skills/poteto-help/references/recipes.md +51 -0
- package/vendor/upstream/0.15.36/pstack/skills/poteto-mode/SKILL.md +150 -0
- package/vendor/upstream/0.15.36/pstack/skills/poteto-mode/playbooks/authoring-a-skill.md +12 -0
- package/vendor/upstream/0.15.36/pstack/skills/poteto-mode/playbooks/autonomous-run.md +13 -0
- package/vendor/upstream/0.15.36/pstack/skills/poteto-mode/playbooks/autopilot-full.md +25 -0
- package/vendor/upstream/0.15.36/pstack/skills/poteto-mode/playbooks/autopilot-stack.md +8 -0
- package/vendor/upstream/0.15.36/pstack/skills/poteto-mode/playbooks/babysit.md +23 -0
- package/vendor/upstream/0.15.36/pstack/skills/poteto-mode/playbooks/bug-fix.md +15 -0
- package/vendor/upstream/0.15.36/pstack/skills/poteto-mode/playbooks/eval.md +25 -0
- package/vendor/upstream/0.15.36/pstack/skills/poteto-mode/playbooks/feature.md +21 -0
- package/vendor/upstream/0.15.36/pstack/skills/poteto-mode/playbooks/hillclimb.md +21 -0
- package/vendor/upstream/0.15.36/pstack/skills/poteto-mode/playbooks/investigation.md +14 -0
- package/vendor/upstream/0.15.36/pstack/skills/poteto-mode/playbooks/multi-phase-plan.md +155 -0
- package/vendor/upstream/0.15.36/pstack/skills/poteto-mode/playbooks/opening-a-pr.md +34 -0
- package/vendor/upstream/0.15.36/pstack/skills/poteto-mode/playbooks/orchestrate.md +25 -0
- package/vendor/upstream/0.15.36/pstack/skills/poteto-mode/playbooks/pause-safely.md +10 -0
- package/vendor/upstream/0.15.36/pstack/skills/poteto-mode/playbooks/perf-issue.md +25 -0
- package/vendor/upstream/0.15.36/pstack/skills/poteto-mode/playbooks/prototype.md +14 -0
- package/vendor/upstream/0.15.36/pstack/skills/poteto-mode/playbooks/refactoring.md +16 -0
- package/vendor/upstream/0.15.36/pstack/skills/poteto-mode/playbooks/runtime-forensics.md +11 -0
- package/vendor/upstream/0.15.36/pstack/skills/poteto-mode/playbooks/session-pickup.md +11 -0
- package/vendor/upstream/0.15.36/pstack/skills/poteto-mode/playbooks/shipping.md +12 -0
- package/vendor/upstream/0.15.36/pstack/skills/poteto-mode/playbooks/trace-forensics.md +14 -0
- package/vendor/upstream/0.15.36/pstack/skills/poteto-mode/playbooks/visual-parity.md +11 -0
- package/vendor/upstream/0.15.36/pstack/skills/poteto-mode/playbooks/worktree-cleanup.md +12 -0
- package/vendor/upstream/0.15.36/pstack/skills/poteto-mode/references/bugbot-triage.md +142 -0
- package/vendor/upstream/0.15.36/pstack/skills/principle-attack-the-premise/SKILL.md +21 -0
- package/vendor/upstream/0.15.36/pstack/skills/principle-boundary-discipline/SKILL.md +34 -0
- package/vendor/upstream/0.15.36/pstack/skills/principle-build-the-lever/SKILL.md +23 -0
- package/vendor/upstream/0.15.36/pstack/skills/principle-encode-lessons-in-structure/SKILL.md +11 -0
- package/vendor/upstream/0.15.36/pstack/skills/principle-exhaust-the-design-space/SKILL.md +9 -0
- package/vendor/upstream/0.15.36/pstack/skills/principle-experience-first/SKILL.md +19 -0
- package/vendor/upstream/0.15.36/pstack/skills/principle-explain-the-number/SKILL.md +18 -0
- package/vendor/upstream/0.15.36/pstack/skills/principle-fix-root-causes/SKILL.md +21 -0
- package/vendor/upstream/0.15.36/pstack/skills/principle-foundational-thinking/SKILL.md +21 -0
- package/vendor/upstream/0.15.36/pstack/skills/principle-guard-the-context-window/SKILL.md +12 -0
- package/vendor/upstream/0.15.36/pstack/skills/principle-laziness-protocol/SKILL.md +10 -0
- package/vendor/upstream/0.15.36/pstack/skills/principle-make-operations-idempotent/SKILL.md +22 -0
- package/vendor/upstream/0.15.36/pstack/skills/principle-migrate-callers-then-delete-legacy-apis/SKILL.md +14 -0
- package/vendor/upstream/0.15.36/pstack/skills/principle-minimize-reader-load/SKILL.md +18 -0
- package/vendor/upstream/0.15.36/pstack/skills/principle-model-the-domain/SKILL.md +24 -0
- package/vendor/upstream/0.15.36/pstack/skills/principle-never-block-on-the-human/SKILL.md +15 -0
- package/vendor/upstream/0.15.36/pstack/skills/principle-outcome-oriented-execution/SKILL.md +21 -0
- package/vendor/upstream/0.15.36/pstack/skills/principle-prove-it-works/SKILL.md +22 -0
- package/vendor/upstream/0.15.36/pstack/skills/principle-redesign-from-first-principles/SKILL.md +16 -0
- package/vendor/upstream/0.15.36/pstack/skills/principle-separate-before-serializing-shared-state/SKILL.md +16 -0
- package/vendor/upstream/0.15.36/pstack/skills/principle-sequence-verifiable-units/SKILL.md +17 -0
- package/vendor/upstream/0.15.36/pstack/skills/principle-subtract-before-you-add/SKILL.md +18 -0
- package/vendor/upstream/0.15.36/pstack/skills/principle-test-behavior-not-implementation/SKILL.md +20 -0
- package/vendor/upstream/0.15.36/pstack/skills/principle-type-system-discipline/SKILL.md +13 -0
- package/vendor/upstream/0.15.36/pstack/skills/recall/SKILL.md +35 -0
- package/vendor/upstream/0.15.36/pstack/skills/reflect/SKILL.md +69 -0
- package/vendor/upstream/0.15.36/pstack/skills/reflect/references/divergent-reviewer.md +38 -0
- package/vendor/upstream/0.15.36/pstack/skills/reflect/references/judgment-reviewer.md +37 -0
- package/vendor/upstream/0.15.36/pstack/skills/reflect/references/synthesizer.md +56 -0
- package/vendor/upstream/0.15.36/pstack/skills/reflect/references/tooling-reviewer.md +48 -0
- package/vendor/upstream/0.15.36/pstack/skills/setup-pstack/SKILL.md +78 -0
- package/vendor/upstream/0.15.36/pstack/skills/sharpen/SKILL.md +16 -0
- package/vendor/upstream/0.15.36/pstack/skills/show-me-your-work/SKILL.md +82 -0
- package/vendor/upstream/0.15.36/pstack/skills/statechart/SKILL.md +82 -0
- package/vendor/upstream/0.15.36/pstack/skills/statechart/references/render.md +93 -0
- package/vendor/upstream/0.15.36/pstack/skills/statechart/scripts/backends/cfg.ts +33 -0
- package/vendor/upstream/0.15.36/pstack/skills/statechart/scripts/backends/mermaid.ts +201 -0
- package/vendor/upstream/0.15.36/pstack/skills/statechart/scripts/backends/plain-text.ts +72 -0
- package/vendor/upstream/0.15.36/pstack/skills/statechart/scripts/backends/report.ts +177 -0
- package/vendor/upstream/0.15.36/pstack/skills/statechart/scripts/frontends/config.ts +276 -0
- package/vendor/upstream/0.15.36/pstack/skills/statechart/scripts/frontends/dot.ts +74 -0
- package/vendor/upstream/0.15.36/pstack/skills/statechart/scripts/frontends/marks.ts +93 -0
- package/vendor/upstream/0.15.36/pstack/skills/statechart/scripts/frontends/messages.ts +52 -0
- package/vendor/upstream/0.15.36/pstack/skills/statechart/scripts/frontends/spec.ts +114 -0
- package/vendor/upstream/0.15.36/pstack/skills/statechart/scripts/frontends/trace.ts +24 -0
- package/vendor/upstream/0.15.36/pstack/skills/statechart/scripts/frontends/value.ts +166 -0
- package/vendor/upstream/0.15.36/pstack/skills/statechart/scripts/frontends/verdict.ts +40 -0
- package/vendor/upstream/0.15.36/pstack/skills/statechart/scripts/frontends/view.ts +119 -0
- package/vendor/upstream/0.15.36/pstack/skills/statechart/scripts/ir.ts +547 -0
- package/vendor/upstream/0.15.36/pstack/skills/statechart/scripts/package.json +11 -0
- package/vendor/upstream/0.15.36/pstack/skills/statechart/scripts/passes/annotate.ts +128 -0
- package/vendor/upstream/0.15.36/pstack/skills/statechart/scripts/passes/label.ts +269 -0
- package/vendor/upstream/0.15.36/pstack/skills/statechart/scripts/passes/lift.ts +85 -0
- package/vendor/upstream/0.15.36/pstack/skills/statechart/scripts/passes/loop-check.ts +68 -0
- package/vendor/upstream/0.15.36/pstack/skills/statechart/scripts/passes/paths.ts +60 -0
- package/vendor/upstream/0.15.36/pstack/skills/statechart/scripts/passes/reach.ts +135 -0
- package/vendor/upstream/0.15.36/pstack/skills/statechart/scripts/passes/region-check.ts +97 -0
- package/vendor/upstream/0.15.36/pstack/skills/statechart/scripts/passes/regions.ts +295 -0
- package/vendor/upstream/0.15.36/pstack/skills/statechart/scripts/pipeline.ts +76 -0
- package/vendor/upstream/0.15.36/pstack/skills/statechart/scripts/run.ts +481 -0
- package/vendor/upstream/0.15.36/pstack/skills/statechart/scripts/statechart +29 -0
- package/vendor/upstream/0.15.36/pstack/skills/statechart/scripts/statechart.ts +164 -0
- package/vendor/upstream/0.15.36/pstack/skills/statechart/scripts/tsconfig.json +11 -0
- package/vendor/upstream/0.15.36/pstack/skills/statechart/scripts/worker.ts +35 -0
- package/vendor/upstream/0.15.36/pstack/skills/swarm/SKILL.md +41 -0
- package/vendor/upstream/0.15.36/pstack/skills/tdd/SKILL.md +42 -0
- package/vendor/upstream/0.15.36/pstack/skills/teach/SKILL.md +21 -0
- package/vendor/upstream/0.15.36/pstack/skills/technical-writing/SKILL.md +106 -0
- package/vendor/upstream/0.15.36/pstack/skills/typescript-best-practices/SKILL.md +31 -0
- package/vendor/upstream/0.15.36/pstack/skills/typescript-best-practices/references/patterns.md +328 -0
- package/vendor/upstream/0.15.36/pstack/skills/unslop/SKILL.md +62 -0
- package/vendor/upstream/0.15.36/pstack/skills/why/SKILL.md +98 -0
- package/vendor/upstream/0.15.36/pstack/skills/why/references/epistemics.md +71 -0
- package/vendor/upstream/0.15.36/pstack/skills/why/references/investigator-prompt.md +84 -0
- package/vendor/upstream/0.15.36/pstack/skills/why/references/source-playbook.md +17 -0
- package/vendor/upstream/0.15.36/pstack/skills/why/references/sources/code-archaeology.md +51 -0
- package/vendor/upstream/0.15.36/pstack/skills/why/references/sources/databricks.md +70 -0
- package/vendor/upstream/0.15.36/pstack/skills/why/references/sources/datadog.md +97 -0
- package/vendor/upstream/0.15.36/pstack/skills/why/references/sources/incident-postmortem.md +5 -0
- package/vendor/upstream/0.15.36/pstack/skills/why/references/sources/linear.md +48 -0
- package/vendor/upstream/0.15.36/pstack/skills/why/references/sources/notion.md +55 -0
- package/vendor/upstream/0.15.36/pstack/skills/why/references/sources/sentry.md +66 -0
- package/vendor/upstream/0.15.36/pstack/skills/why/references/sources/slack.md +17 -0
- package/vendor/upstream/0.15.36/pstack/skills/why/references/synthesizer-prompt.md +129 -0
|
@@ -0,0 +1,350 @@
|
|
|
1
|
+
import assert from 'node:assert/strict';
|
|
2
|
+
import test from 'node:test';
|
|
3
|
+
import { mkdtempSync, writeFileSync, rmSync, readFileSync, mkdirSync, symlinkSync } from 'node:fs';
|
|
4
|
+
import { join } from 'node:path';
|
|
5
|
+
import { execFileSync } from 'node:child_process';
|
|
6
|
+
import { capture, fingerprint, ownerOf, sameFingerprint, git } from '../src/artifacts/fingerprint.ts';
|
|
7
|
+
import { validateBrief, scopeViolations, matchPath, saveBrief, briefPrompt, parseReport } from '../src/contracts/brief.ts';
|
|
8
|
+
import { verify, ledgerCurrent, parseTestReport } from '../src/verification/runner.ts';
|
|
9
|
+
import { protocol, hash, transact } from '../src/runtime/protocol.ts';
|
|
10
|
+
import { refresh, eligibility, ship, authorizeMerge } from '../src/delivery/frontier.ts';
|
|
11
|
+
import { buildTemplate } from '../src/templates/build.ts';
|
|
12
|
+
import { claimLease, renewLease, assertLease } from '../src/runner/lease.ts';
|
|
13
|
+
import { WorkflowEngine } from '../src/workflow/engine.ts';
|
|
14
|
+
import { ProgramCoordinator } from '../src/program/coordinator.ts';
|
|
15
|
+
import { contextSnapshot } from '../src/context/snapshot.ts';
|
|
16
|
+
import { migrate } from '../src/runtime/migrate.ts';
|
|
17
|
+
import { homePath } from '../src/runtime/home.ts';
|
|
18
|
+
import { writeJsonAtomic } from '../src/runtime/store.ts';
|
|
19
|
+
import type { TaskBrief, GateSpec } from '../src/contracts/types.ts';
|
|
20
|
+
import type { PullRequest } from '../src/delivery/provider.ts';
|
|
21
|
+
function fixture(){
|
|
22
|
+
const root=mkdtempSync(join(process.cwd(),'.test-protocol-'));const repo=join(root,'repo');mkdirSync(repo);
|
|
23
|
+
process.env.PSTACK_NATIVE_HOME=join(root,'state');
|
|
24
|
+
git(repo,['init','-q']);git(repo,['config','user.name','Test']);git(repo,['config','user.email','test@example.invalid']);
|
|
25
|
+
writeFileSync(join(repo,'source.txt'),'baseline');writeFileSync(join(repo,'.gitignore'),'cache/\n');git(repo,['add','.']);git(repo,['commit','-qm','baseline']);
|
|
26
|
+
return {root,repo,cleanup(){rmSync(root,{recursive:true,force:true});delete process.env.PSTACK_NATIVE_HOME;}};
|
|
27
|
+
}
|
|
28
|
+
function brief(repo:string,gates?:GateSpec[]):TaskBrief {
|
|
29
|
+
const verification=gates ?? [{id:'file',kind:'file',path:'source.txt',pattern:'baseline',category:'typecheck'}];
|
|
30
|
+
return {id:'brief',revision:1,contractLevel:'strict',goal:'Check source',scope:{repoId:fingerprint(repo).repoId,include:['**'],exclude:['private/**']},contextRefs:[],acceptance:[{id:'ac',description:'source valid',required:true,gateIds:verification.map(g=>g.id)}],verification,forbidden:['remote-write'],standingOrders:['preserve user changes'],reportFormat:'task-report-v1',timeboxSeconds:30};
|
|
31
|
+
}
|
|
32
|
+
const pass=['node','-e','console.log("ok")'];
|
|
33
|
+
function commandBrief(repo:string,command=pass){return brief(repo,[{id:'test',kind:'command',command,sideEffect:'none',category:'behavior',timeoutSeconds:2}]);}
|
|
34
|
+
const BRIEF_OWNER={id:'brief',revision:1};
|
|
35
|
+
function baseline(repo:string,own=BRIEF_OWNER){return capture(repo,undefined,[],'working',{kind:'baseline',owner:ownerOf(own)}).fingerprint;}
|
|
36
|
+
function agentBaseline(spec:any){return capture(spec.cwd,undefined,[],'working',{kind:'baseline',owner:ownerOf(spec.brief ?? BRIEF_OWNER,{workflowId:spec.workflowId,callKey:spec.callKey})}).fingerprint;}
|
|
37
|
+
|
|
38
|
+
test('strict brief validates required acceptance, commands and immutable revisions',()=>{const f=fixture();try{const b=brief(f.repo);validateBrief(b);assert.throws(()=>validateBrief({...b,acceptance:[]}),/BRIEF_INCOMPLETE/);assert.throws(()=>validateBrief({...b,timeboxSeconds:undefined}),/timebox/);saveBrief(b,'test','initial');saveBrief(b,'test','same');assert.equal(protocol().briefs.brief.length,1);assert.throws(()=>saveBrief({...b,goal:'new'},'test','update'),/REVISION/);saveBrief({...b,revision:2,goal:'new'},'test','update');assert.equal(protocol().briefs.brief.length,2);}finally{f.cleanup();}});
|
|
39
|
+
test('task brief describes the accepted report and its specialized fields',()=>{const f=fixture();try{const b=brief(f.repo);b.reportRequirements={kind:'review'};const prompt=briefPrompt(b);assert.match(prompt,/exactly one of completed, failed, or blocked/);assert.match(prompt,/findings:/);const fp=fingerprint(f.repo);const report={status:'completed',base:fp.commitSha,head:fp.commitSha,artifactRefs:[],commandsRun:[],evidenceRefs:[],deviations:[],unresolved:[],nextActions:[],findings:[]};assert.deepEqual(parseReport('```json\n'+JSON.stringify(report)+'\n```'),report);assert.throws(()=>parseReport(JSON.stringify({...report,status:'success'})),/TASK_REPORT_INCOMPLETE/);}finally{f.cleanup();}});
|
|
40
|
+
test('workflow exposes the blocked command policy reason',async()=>{const f=fixture();try{const engine=new WorkflowEngine({} as any);const b=commandBrief(f.repo);const wf=engine.create({cwd:f.repo,contractLevel:'strict',nodes:[{key:'task',task:'x',profile:'worker',brief:b}]});const before=capture(f.repo,undefined,[],'working',{kind:'baseline',owner:ownerOf(b,{workflowId:wf.id,callKey:'task'})}).fingerprint;const r={status:'completed',base:before.commitSha,head:before.commitSha,artifactRefs:[],commandsRun:[],evidenceRefs:[],deviations:[],unresolved:[],nextActions:[]};await engine.verifyCall(wf.id,'task',{id:'a',state:'completed',cwd:f.repo,baseline:before,report:r} as any);assert.equal(engine.get(wf.id)!.calls.task.verification?.reason,'COMMAND_NOT_ALLOWED');}finally{f.cleanup();}});
|
|
41
|
+
test('strict acceptance retains advisory notes and blocks legacy, blocking, malformed and short-SHA reports',async()=>{
|
|
42
|
+
const f=fixture();try{
|
|
43
|
+
const engine=new WorkflowEngine({} as any),b=brief(f.repo),wf=engine.create({cwd:f.repo,contractLevel:'strict',nodes:[{key:'task',task:'x',profile:'worker',brief:b}]});
|
|
44
|
+
const before=capture(f.repo,undefined,[],'working',{kind:'baseline',owner:ownerOf(b,{workflowId:wf.id,callKey:'task'})}).fingerprint;
|
|
45
|
+
const report={status:'completed',base:before.commitSha,head:before.commitSha,artifactRefs:[],commandsRun:[],evidenceRefs:[],deviations:[],unresolved:[],nextActions:[]};
|
|
46
|
+
for(const [change,accepted] of [
|
|
47
|
+
[{unresolved:[{severity:'advisory',description:'Documented trade-off'}],deviations:[{severity:'advisory',description:'Informational warning'}]},true],
|
|
48
|
+
[{unresolved:['Legacy unresolved item']},false],
|
|
49
|
+
[{deviations:[{severity:'blocking',description:'Acceptance is incomplete'}]},false],
|
|
50
|
+
[{unresolved:[{severity:'advisory',description:' '}]},false],
|
|
51
|
+
[{deviations:[{severity:'unknown',description:'not classified'}]},false],
|
|
52
|
+
[{base:before.commitSha.slice(0,7)},false],
|
|
53
|
+
] as const){
|
|
54
|
+
const r={...report,...change};await engine.verifyCall(wf.id,'task',{id:'a',state:'completed',cwd:f.repo,baseline:before,report:r} as any);
|
|
55
|
+
const v=engine.get(wf.id)!.calls.task.verification!;assert.equal(v.status,accepted?'passed':'blocked');
|
|
56
|
+
assert.equal(protocol().ledgers[v.ledgerId!].contractAccepted,accepted);
|
|
57
|
+
if(accepted)assert.deepEqual(engine.get(wf.id)!.calls.task.report!.unresolved,r.unresolved);
|
|
58
|
+
}
|
|
59
|
+
assert.match(briefPrompt(b),/40 hex characters for SHA-1 or 64 for SHA-256/);
|
|
60
|
+
assert.throws(()=>parseReport(JSON.stringify({...report,unresolved:[{severity:'advisory',description:''}]})),/TASK_REPORT_INCOMPLETE/);
|
|
61
|
+
}finally{f.cleanup();}
|
|
62
|
+
});
|
|
63
|
+
test('scope globs include root paths, deny excluded and traversal patterns',()=>{const f=fixture();try{assert(matchPath('a.ts','**/*.ts'));assert(matchPath('src/a/b.ts','src/**'));assert.deepEqual(scopeViolations(brief(f.repo),['private/a','src/a']),['private/a']);assert.throws(()=>validateBrief({...brief(f.repo),scope:{...brief(f.repo).scope,include:['../*']}}),/relativeGlob/);}finally{f.cleanup();}});
|
|
64
|
+
test('fingerprints distinguish staged, unstaged, untracked, mode and commits',()=>{const f=fixture();try{const a=fingerprint(f.repo);writeFileSync(join(f.repo,'source.txt'),'changed');const b=fingerprint(f.repo);assert(!sameFingerprint(a,b));git(f.repo,['add','.']);const c=fingerprint(f.repo);assert(!sameFingerprint(b,c));writeFileSync(join(f.repo,'other.txt'),'new');assert(!sameFingerprint(c,fingerprint(f.repo)));assert.throws(()=>fingerprint(f.repo,'committed'),/DIRTY/);git(f.repo,['add','.']);git(f.repo,['commit','-qm','new']);assert(!sameFingerprint(a,fingerprint(f.repo)));}finally{f.cleanup();}});
|
|
65
|
+
test('worktrees share repo identity while different repos never share it',()=>{const f=fixture();try{git(f.repo,['worktree','add','-qb','isolated',join(f.root,'wt')]);assert.equal(fingerprint(f.repo).repoId,fingerprint(join(f.root,'wt')).repoId);const other=join(f.root,'other');mkdirSync(other);git(f.repo,['clone','-q',f.repo,other]);assert.notEqual(fingerprint(f.repo).repoId,fingerprint(other).repoId);}finally{f.cleanup();}});
|
|
66
|
+
test('symlink fingerprints do not follow outside file contents',()=>{const f=fixture();try{writeFileSync(join(f.root,'outside'),'secret');symlinkSync(join(f.root,'outside'),join(f.repo,'link'));const a=fingerprint(f.repo);writeFileSync(join(f.root,'outside'),'different');assert(sameFingerprint(a,fingerprint(f.repo)));}finally{f.cleanup();}});
|
|
67
|
+
test('real runner passes and records log hashes; source or evidence changes invalidate',async()=>{const f=fixture();try{const before=baseline(f.repo);const l=await verify(f.repo,commandBrief(f.repo),{before,policy:{commands:[pass]}});assert.equal(l.status,'passed');assert.equal(l.verdict,'unit-test-verified');assert(ledgerCurrent(l,fingerprint(f.repo)));writeFileSync(protocol().evidence[l.evidenceRefs[0]].logPath,'tampered');assert(!ledgerCurrent(l,fingerprint(f.repo)));writeFileSync(join(f.repo,'source.txt'),'changed');assert(!ledgerCurrent(l,fingerprint(f.repo)));}finally{f.cleanup();}});
|
|
68
|
+
test('agent narrative cannot override failing deterministic command',async()=>{const f=fixture();try{const before=baseline(f.repo);const argv=['node','-e','process.exit(7)'];const l=await verify(f.repo,commandBrief(f.repo,argv),{before,policy:{commands:[argv]}});assert.equal(l.status,'failed');assert.equal(protocol().evidence[l.evidenceRefs[0]].exitCode,7);}finally{f.cleanup();}});
|
|
69
|
+
test('timeout, unknown side effects and unavailable executables are blocked',async()=>{const f=fixture();try{const before=baseline(f.repo);const argv=['node','-e','setInterval(()=>{},1000)'];const b=commandBrief(f.repo,argv);b.verification[0].timeoutSeconds=.05;assert.equal((await verify(f.repo,b,{before,policy:{commands:[argv]}})).status,'blocked');delete b.verification[0].sideEffect;assert.equal((await verify(f.repo,b,{before,policy:{commands:[argv]}})).status,'blocked');const missing=['no-such-pstack-command'];assert.equal((await verify(f.repo,commandBrief(f.repo,missing),{before,policy:{commands:[missing]}})).status,'blocked');}finally{f.cleanup();}});
|
|
70
|
+
test('shell chaining is never interpreted and command allowlist is exact',async()=>{const f=fixture();try{const before=baseline(f.repo);assert.equal((await verify(f.repo,commandBrief(f.repo),{before,policy:{commands:[]}})).status,'blocked');const cmd=['node','-e','console.log("x")',';','touch','oops'];assert.equal((await verify(f.repo,commandBrief(f.repo,cmd),{before,policy:{commands:[pass]}})).status,'blocked');}finally{f.cleanup();}});
|
|
71
|
+
test('test-time source mutation produces stale evidence, never verified',async()=>{const f=fixture();try{const before=baseline(f.repo);const argv=['node','-e','require("node:fs").writeFileSync("source.txt","mutation")'];assert.equal((await verify(f.repo,commandBrief(f.repo,argv),{before,policy:{commands:[argv]}})).status,'stale');}finally{f.cleanup();}});
|
|
72
|
+
test('scope and insufficient coverage reject acceptance',async()=>{const f=fixture();try{const before=baseline(f.repo);mkdirSync(join(f.repo,'private'));writeFileSync(join(f.repo,'private/a'),'bad');assert.equal((await verify(f.repo,brief(f.repo),{before})).status,'blocked');rmSync(join(f.repo,'private'),{recursive:true});writeFileSync(join(f.repo,'other'),'new');const b=brief(f.repo);b.verification[0].coverage=['source.txt'];assert.equal((await verify(f.repo,b,{before})).status,'blocked');}finally{f.cleanup();}});
|
|
73
|
+
test('human and advisory gates never auto-pass',async()=>{const f=fixture();try{const before=baseline(f.repo);const b=brief(f.repo,[{id:'human',kind:'human-approval'}]);assert.equal((await verify(f.repo,b,{before})).status,'blocked');assert.throws(()=>validateBrief(brief(f.repo,[{id:'judge',kind:'llm-review'}])),/machineGate/);}finally{f.cleanup();}});
|
|
74
|
+
test('JUnit and TAP reject malformed, skipped and failed runs',()=>{assert(parseTestReport('<testsuite tests="2" failures="0" errors="0"></testsuite>','junit'));assert(!parseTestReport('<testsuite tests="2"></testsuite>','junit'));assert(!parseTestReport('<testsuite tests="2" failures="1" errors="0"></testsuite>','junit'));assert(parseTestReport('ok 1 works\n1..1','tap'));assert(!parseTestReport('ok 1 # SKIP\n1..1','tap'));assert(!parseTestReport('ok 1\n1..2','tap'));});
|
|
75
|
+
test('evidence logs redact common credentials',async()=>{const f=fixture();try{const before=baseline(f.repo);const argv=['node','-e','console.log("token=verysecret password=hidden")'];const l=await verify(f.repo,commandBrief(f.repo,argv),{before,policy:{commands:[argv]}});assert.equal(l.status,'passed');const e=protocol().evidence[l.evidenceRefs[0]];assert.equal(e.exitCode,0);assert.equal(readFileSync(e.logPath,'utf8'),'token=[REDACTED] password=[REDACTED]\n');}finally{f.cleanup();}});
|
|
76
|
+
function report(fp:any){return {status:'completed' as const,base:fp.commitSha,head:fp.commitSha,artifactRefs:[],commandsRun:[],evidenceRefs:[],deviations:[],unresolved:[],nextActions:[]};}
|
|
77
|
+
const briefHistory=(id:string,key:string)=>Object.entries(protocol().briefs).filter(([briefId])=>briefId.endsWith(`.${id}.${key}`)).flatMap(([,versions])=>versions);
|
|
78
|
+
async function deliveryFixture(repo:string){
|
|
79
|
+
const baseSha=git(repo,['rev-parse','HEAD']);
|
|
80
|
+
writeFileSync(join(repo,'source.txt'),'baseline delivery');git(repo,['add','source.txt']);git(repo,['commit','-qm','delivery']);
|
|
81
|
+
const fp=fingerprint(repo);const head=fp.commitSha;
|
|
82
|
+
const spec={id:'stack',repoId:fp.repoId,repo:'example/project',numbers:[1,2,3],owner:'session',rootBase:'main'};
|
|
83
|
+
const prs:PullRequest[]=[1,2,3].map((n,i)=>({number:n,repo:spec.repo,headSha:i===0?head:`head-${n}`,baseSha:i===0?baseSha:i===1?head:'head-2',baseRef:i?'branch-'+i:'main',state:'OPEN',draft:false,mergeState:'CLEAN',mergeable:'MERGEABLE',ci:'passed',review:'approved',reviewThreads:{status:'checked',total:0,unresolved:0,bugbotUnresolved:0}}));
|
|
84
|
+
let merges=0;const provider={async read(_repo:string,n:number){return structuredClone(prs[n-1]);},async merge(p:PullRequest){assert.equal(p.headSha,prs[p.number-1].headSha);prs[p.number-1].state='MERGED';merges++;}};
|
|
85
|
+
await verify(repo,commandBrief(repo),{policy:{commands:[pass]},pr:{repoId:fp.repoId,number:1,headSha:head,baseSha},report:{...report(fp),base:baseSha}});
|
|
86
|
+
return {spec,prs,provider,merges:()=>merges};
|
|
87
|
+
}
|
|
88
|
+
test('stack frontier blocks upper PRs and ships only explicitly approved bottom PR',async()=>{const f=fixture();try{const d=await deliveryFixture(f.repo);const frontier=await refresh(d.spec,d.provider);const decisions=eligibility(frontier);assert.equal(decisions[0].eligible,true);assert(decisions[2].blockers.includes('LOWER_UNMERGED'));await ship(d.spec,d.provider);assert.equal(d.merges(),0);await assert.rejects(()=>ship(d.spec,d.provider,{dryRun:false}),/AUTHORIZATION/);const token=authorizeMerge(frontier,1,'human-cli');await ship(d.spec,d.provider,{token,dryRun:false});assert.equal(d.merges(),1);await assert.rejects(()=>ship(d.spec,d.provider,{token,dryRun:false}),/AUTHORIZATION/);}finally{f.cleanup();}});
|
|
89
|
+
test('changed PR head invalidates approval and old ledger',async()=>{const f=fixture();try{const d=await deliveryFixture(f.repo);const frontier=await refresh(d.spec,d.provider);const token=authorizeMerge(frontier,1,'human-cli');d.prs[0].headSha='new-head';d.prs[1].baseSha='new-head';await assert.rejects(()=>ship(d.spec,d.provider,{token,dryRun:false}),/AUTHORIZATION/);assert(eligibility(await refresh(d.spec,d.provider))[0].blockers.includes('CURRENT_VERIFICATION_REQUIRED'));assert.equal(d.merges(),0);}finally{f.cleanup();}});
|
|
90
|
+
test('TOCTOU change before merge blocks provider write',async()=>{const f=fixture();try{const d=await deliveryFixture(f.repo);const frontier=await refresh(d.spec,d.provider);const token=authorizeMerge(frontier,1,'human-cli');let reads=0;const provider={...d.provider,async read(repo:string,n:number){reads++;if(reads===4)d.prs[0].ci='failed';return d.provider.read(repo,n);}};await assert.rejects(()=>ship(d.spec,provider,{token,dryRun:false}),/FRONTIER_CHANGED/);assert.equal(d.merges(),0);}finally{f.cleanup();}});
|
|
91
|
+
test('typecheck-only and missing task report cannot satisfy behavior shipping',async()=>{const f=fixture();try{const d=await deliveryFixture(f.repo);transact('revoke','ledger','test',s=>{for(const id of Object.keys(s.ledgers))s.invalidations[id]={at:new Date().toISOString(),reason:'test'};});const typecheck=await verify(f.repo,brief(f.repo),{pr:{repoId:d.spec.repoId,number:1,headSha:d.prs[0].headSha,baseSha:d.prs[0].baseSha},report:{...report(fingerprint(f.repo)),base:d.prs[0].baseSha}});assert.equal(typecheck.status,'passed');assert.equal(typecheck.verdict,'type-check-only');assert.equal(typecheck.contractAccepted,true);assert.equal(eligibility(await refresh(d.spec,d.provider))[0].eligible,false);const missingReport=await verify(f.repo,commandBrief(f.repo),{policy:{commands:[pass]},pr:{repoId:d.spec.repoId,number:1,headSha:d.prs[0].headSha,baseSha:d.prs[0].baseSha}});assert.equal(missingReport.status,'passed');assert.equal(missingReport.verdict,'unit-test-verified');assert.equal(missingReport.contractAccepted,false);assert.equal(eligibility(await refresh(d.spec,d.provider))[0].eligible,false);}finally{f.cleanup();}});
|
|
92
|
+
for(const flag of ['--skip-worktree','--assume-unchanged']) {
|
|
93
|
+
test(`round4 C ${flag} cannot turn a failed behavior gate into shipping evidence`,async()=>{
|
|
94
|
+
const f=fixture();try {
|
|
95
|
+
writeFileSync(join(f.repo,'forbidden.txt'),'baseline');git(f.repo,['add','.']);git(f.repo,['commit','-qm','forbidden baseline']);
|
|
96
|
+
const fp=fingerprint(f.repo);
|
|
97
|
+
const argv=['node','-e','process.exit(require("node:fs").readFileSync("forbidden.txt","utf8")==="hidden"?0:7)'];
|
|
98
|
+
const b=commandBrief(f.repo,argv);b.scope.include=['source.txt'];
|
|
99
|
+
const pr:PullRequest={repo:'example/project',number:1,headSha:fp.commitSha,baseSha:fp.commitSha,baseRef:'main',state:'OPEN',draft:false,mergeState:'CLEAN',mergeable:'MERGEABLE',ci:'passed',review:'approved',reviewThreads:{status:'checked',total:0,unresolved:0,bugbotUnresolved:0}};
|
|
100
|
+
const provider={async read(){return structuredClone(pr);},async merge(){throw new Error('must not merge');}};
|
|
101
|
+
const spec={id:'round4',repoId:fp.repoId,repo:pr.repo,numbers:[1],owner:'test',rootBase:'main'};
|
|
102
|
+
const options={policy:{commands:[argv]},pr:{repoId:fp.repoId,number:1,headSha:fp.commitSha,baseSha:fp.commitSha},report:report(fp)};
|
|
103
|
+
const failed=await verify(f.repo,b,options);
|
|
104
|
+
assert.equal(failed.status,'failed');
|
|
105
|
+
assert.equal(protocol().evidence[failed.evidenceRefs[0]].exitCode,7);
|
|
106
|
+
assert.equal(eligibility(await refresh(spec,provider))[0].eligible,false);
|
|
107
|
+
git(f.repo,['update-index',flag,'forbidden.txt']);writeFileSync(join(f.repo,'forbidden.txt'),'hidden');
|
|
108
|
+
assert.equal(git(f.repo,['status','--porcelain=v1']),'');
|
|
109
|
+
await assert.rejects(()=>verify(f.repo,b,options),{message:'FINGERPRINT_INDEX_FLAGS_UNSUPPORTED'});
|
|
110
|
+
assert.equal(eligibility(await refresh(spec,provider))[0].eligible,false);
|
|
111
|
+
assert.equal(Object.values(protocol().ledgers).filter(l=>l.status==='passed').length,0);
|
|
112
|
+
}finally{f.cleanup();}
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
test('PR repo/number/head evidence never crosses identity',async()=>{const f=fixture();try{const d=await deliveryFixture(f.repo);const wrong={...d.spec,id:'other-stack',repoId:'other-repo'};assert.equal(eligibility(await refresh(wrong,d.provider))[0].eligible,false);}finally{f.cleanup();}});
|
|
116
|
+
test('arena/race templates enforce rubric and model independence',()=>{const f=fixture();try{const b=brief(f.repo);assert.throws(()=>buildTemplate({kind:'arena',brief:b,models:['p/a','p/b'],judgeModel:'p/j'}),/RUBRIC/);assert.throws(()=>buildTemplate({kind:'arena',brief:b,models:['p/a','p/b'],judgeModel:'p/a',independencePolicy:'different-model',rubric:[{criterion:'correct',weight:1}]}),/INDEPENDENT/);const plan=buildTemplate({kind:'arena',brief:b,models:['p/a','p/b'],judgeModel:'p/j',rubric:[{criterion:'correct',weight:1}]});assert.equal(plan.nodes.filter(n=>n.profile==='worker').length,2);assert.equal(plan.nodes.at(-1)?.profile,'verifier');assert.equal(plan.nodes.find(n=>n.key==='integrate')?.profile,'integrator');}finally{f.cleanup();}});
|
|
117
|
+
test('review and partition templates encode readonly and explicit slices',()=>{const f=fixture();try{const b=brief(f.repo);const plan=buildTemplate({kind:'review',brief:b,models:['p/a','p/b']});assert(plan.nodes.every(n=>n.isolation==='readonly'));assert.throws(()=>buildTemplate({kind:'swarm',swarmMode:'partition',brief:b,models:['p/a']}),/SLICES/);assert.throws(()=>buildTemplate({kind:'arena',brief:b,models:['p/a','p/b'],judgeModel:'q/j',independencePolicy:'different-family',rubric:[{criterion:'correct',weight:1}]}),/UNPROVEN/);}finally{f.cleanup();}});
|
|
118
|
+
test('lease tokens fence stale workers after expiration and takeover',()=>{const f=fixture();try{const l=claimLease('wf','one');assert.throws(()=>claimLease('wf','two'),/BUSY/);transact('expire','wf','test',s=>{s.leases.wf.expiresAt=0;});const next=claimLease('wf','two');assert(next.token>l.token);assert.throws(()=>renewLease(l),/LOST/);assert.throws(()=>assertLease(l),/LOST/);assertLease(next);}finally{f.cleanup();}});
|
|
119
|
+
test('legacy migration backs up state, preserves ids and never fabricates verification',()=>{const f=fixture();try{writeJsonAtomic(homePath('workflows','legacy.json'),{id:'legacy',calls:{},state:'completed'});assert(migrate().records[0].needsMigration);assert.equal(JSON.parse(readFileSync(homePath('workflows','legacy.json'),'utf8')).schemaVersion,undefined);const r=migrate(false);assert(r.backup);assert.equal(JSON.parse(readFileSync(homePath('workflows','legacy.json'),'utf8')).verification,'unknown');assert.equal(JSON.parse(readFileSync(join(r.backup!,'legacy.json'),'utf8')).schemaVersion,undefined);}finally{f.cleanup();}});
|
|
120
|
+
test('strict workflow runs real gates, blocks malformed reports and invalidates current status',async()=>{const f=fixture();try{
|
|
121
|
+
const agents=new Map<string,any>();let malformed=false;
|
|
122
|
+
const host:any={get:(id:string)=>agents.get(id),async run(spec:any){const baseline=agentBaseline(spec);const a={...spec,id:spec.id,state:'completed',cwd:spec.cwd,baseline,report:malformed?undefined:report(baseline),result:'done'};agents.set(a.id,a);return a;},async recover(a:any){return a;},async stop(id:string){return {...agents.get(id),state:'cancelled'};}};
|
|
123
|
+
const engine=new WorkflowEngine(host);const ctx:any={sessionManager:{getSessionId:()=> 'session'},cwd:f.repo};
|
|
124
|
+
const wf=engine.create({cwd:f.repo,parentSessionId:'session',contractLevel:'strict',nodes:[{key:'a',task:'check',profile:'verifier',brief:brief(f.repo)}]});
|
|
125
|
+
const done=await engine.run(wf.id,ctx);assert.equal(done.state,'completed');assert.equal(done.verification,'verified');assert(engine.accepted(done.calls.a));
|
|
126
|
+
writeFileSync(join(f.repo,'source.txt'),'changed');assert(!engine.accepted(done.calls.a));const snapshot=contextSnapshot(engine,'session');assert.equal(snapshot.workflows[0].calls[0].acceptance,'stale');
|
|
127
|
+
writeFileSync(join(f.repo,'source.txt'),'baseline');malformed=true;const bad=engine.create({cwd:f.repo,nodes:[{key:'bad',task:'check',profile:'verifier',brief:brief(f.repo)}]});assert.equal((await engine.run(bad.id,ctx)).state,'blocked');
|
|
128
|
+
}catch(e){throw e;}finally{f.cleanup();}});
|
|
129
|
+
test('new strict mode rejects omitted contract before dispatch',()=>{const f=fixture();try{const e=new WorkflowEngine({} as any);assert.throws(()=>e.create({cwd:f.repo,contractLevel:'strict',nodes:[{key:'a',task:'x'}]}),/BRIEF_INCOMPLETE/);assert.equal(protocol().events.length,0);}finally{f.cleanup();}});
|
|
130
|
+
test('program pilot then rolling window clears 12 units and closes from Store',async()=>{const f=fixture();try{
|
|
131
|
+
const agents=new Map<string,any>();let running=0,peak=0;
|
|
132
|
+
const host:any={get:(id:string)=>agents.get(id),async run(spec:any){running++;peak=Math.max(peak,running);await new Promise(r=>setTimeout(r,spec.callKey==='slow'?50:5));const fp=agentBaseline(spec);const a={...spec,state:'completed',cwd:spec.cwd,baseline:fp,report:report(fp),result:'checked'};agents.set(a.id,a);running--;return a;}};
|
|
133
|
+
const engine=new WorkflowEngine(host);const ctx:any={cwd:f.repo,sessionManager:{getSessionId:()=> 'session'}};const coordinator=new ProgramCoordinator(engine);
|
|
134
|
+
const p=coordinator.create('session',Array.from({length:12},(_,i)=>({key:'unit'+i,spec:{cwd:f.repo,nodes:[{key:'read',profile:'scout',task:'inspect',brief:{...brief(f.repo),id:'unit'+i}}]}})),3);
|
|
135
|
+
await coordinator.run(p.id,ctx);assert(peak>1 && peak<=3);assert.equal(coordinator.get(p.id,'session').units.filter(u=>u.state==='reconciled').length,12);
|
|
136
|
+
const restored=new ProgramCoordinator(engine);assert.equal(restored.close(p.id,'session').state,'completed');assert.throws(()=>restored.get(p.id,'other'),/NOT_FOUND/);
|
|
137
|
+
}finally{f.cleanup();}});
|
|
138
|
+
test('corrupt protocol Store fails closed instead of producing empty evidence',()=>{const f=fixture();try{mkdirSync(homePath(),{recursive:true});writeFileSync(homePath('protocol.json'),'{broken');assert.throws(()=>protocol());}finally{f.cleanup();}});
|
|
139
|
+
test('crash after gate-start leaves no passed ledger; restart verifies anew',async()=>{const f=fixture();try{
|
|
140
|
+
const crashBrief={...brief(f.repo),id:'crash-brief'};
|
|
141
|
+
const before=baseline(f.repo,crashBrief);
|
|
142
|
+
const {spawn}=await import('node:child_process');
|
|
143
|
+
const child=spawn(process.execPath,['test/fixtures/verification-crash-worker.mjs',f.repo,JSON.stringify(before)],{cwd:process.cwd(),env:process.env,stdio:'ignore'});
|
|
144
|
+
await new Promise<void>((resolve,reject)=>{const deadline=Date.now()+5000;const timer=setInterval(()=>{try{if(Object.values(protocol().evidence).some(e=>e.status==='running')){clearInterval(timer);resolve();}else if(Date.now()>deadline){clearInterval(timer);reject(new Error('worker never reached gate'));}}catch{}},20);});
|
|
145
|
+
child.kill('SIGKILL');await new Promise(resolve=>child.once('exit',resolve));
|
|
146
|
+
assert.equal(Object.values(protocol().ledgers).filter(l=>l.status==='passed').length,0);
|
|
147
|
+
assert(Object.values(protocol().evidence).some(e=>e.status==='running'));
|
|
148
|
+
const again=await verify(f.repo,crashBrief,{before});assert.equal(again.status,'passed');
|
|
149
|
+
}finally{f.cleanup();}});
|
|
150
|
+
test('crash after remote merge request consumes authorization; reconcile reads remote',async()=>{const f=fixture();try{
|
|
151
|
+
const d=await deliveryFixture(f.repo);const frontier=await refresh(d.spec,d.provider);const token=authorizeMerge(frontier,1,'human-cli');
|
|
152
|
+
const provider={...d.provider,async merge(p:PullRequest){await d.provider.merge(p);throw new Error('injected local crash after remote success');}};
|
|
153
|
+
await assert.rejects(()=>ship(d.spec,provider,{token,dryRun:false}),/injected/);assert.equal(d.merges(),1);
|
|
154
|
+
const recovered=await refresh(d.spec,d.provider);assert.equal(recovered.prs[0].state,'MERGED');
|
|
155
|
+
await assert.rejects(()=>ship(d.spec,d.provider,{token,dryRun:false}),/AUTHORIZATION/);assert.equal(d.merges(),1);
|
|
156
|
+
}finally{f.cleanup();}});
|
|
157
|
+
test('strict budgets reject invalid values and stop future dispatch',async()=>{const f=fixture();try{
|
|
158
|
+
const engine=new WorkflowEngine({run(){throw new Error('must not dispatch');},get(){return undefined;},stop(){throw new Error('no');},recover(){throw new Error('no');}} as any);
|
|
159
|
+
assert.throws(()=>engine.create({cwd:f.repo,budget:{maxTokens:-1},nodes:[{key:'a',task:'x'}]}),/INVALID_BUDGET/);
|
|
160
|
+
const w=engine.create({cwd:f.repo,budget:{maxTimeSeconds:.0001},nodes:[{key:'a',task:'x'}]});
|
|
161
|
+
const done=await engine.run(w.id,{} as any);assert.equal(done.state,'blocked');assert.equal(done.calls.a.attempt,0);
|
|
162
|
+
}finally{f.cleanup();}});
|
|
163
|
+
test('structured evaluator reports cannot omit scores, evidence or selection',async()=>{const f=fixture();try{const {reportSatisfies}=await import('../src/contracts/brief.ts');const b={...brief(f.repo),reportRequirements:{kind:'evaluation' as const,criteria:['correct']}};const r=report(fingerprint(f.repo));assert(!reportSatisfies(b,r));assert(reportSatisfies(b,{...r,evaluation:[{criterion:'correct',score:8,evidence:['source.txt:1'],weaknesses:[],selectedParts:[]}]}));assert(!reportSatisfies(b,{...r,evaluation:[{criterion:'correct',score:8,evidence:[],weaknesses:[],selectedParts:[]}]}));}finally{f.cleanup();}});
|
|
164
|
+
test('program pause/resume and versioned orders persist for subsequent dispatch',()=>{const f=fixture();try{const e=new WorkflowEngine({} as any);const c=new ProgramCoordinator(e);const p=c.create('session',[{key:'unit',spec:{cwd:f.repo,nodes:[{key:'a',task:'x',brief:brief(f.repo)}]}}]);c.updateOrders(p.id,'session',['new rule'],'user update');assert.equal(c.get(p.id,'session').orders?.revision,1);c.pause(p.id,'session');assert.equal(c.resume(p.id,'session').state,'pilot');assert.equal(new ProgramCoordinator(e).get(p.id,'session').orders?.instructions[0],'new rule');}finally{f.cleanup();}});
|
|
165
|
+
test('tampered standing orders digest blocks dispatch and creates no workflow',async()=>{const f=fixture();try{
|
|
166
|
+
const agents=new Map<string,any>();
|
|
167
|
+
const host:any={get:(id:string)=>agents.get(id),async run(spec:any){const fp=agentBaseline(spec);const a={...spec,state:'completed',cwd:spec.cwd,baseline:fp,report:report(fp),result:'checked'};agents.set(a.id,a);return a;}};
|
|
168
|
+
const engine=new WorkflowEngine(host);const ctx:any={cwd:f.repo,sessionManager:{getSessionId:()=> 'session'}};const coordinator=new ProgramCoordinator(engine);
|
|
169
|
+
const p=coordinator.create('session',[{key:'unit',spec:{cwd:f.repo,nodes:[{key:'read',profile:'scout',task:'inspect',brief:brief(f.repo)}]}}]);
|
|
170
|
+
coordinator.updateOrders(p.id,'session',['ordered rule'],'operator update');
|
|
171
|
+
transact('orders-tampered','program','test',s=>{s.programs[p.id].orders.instructions=['TAMPERED RULE'];});
|
|
172
|
+
await assert.rejects(()=>coordinator.run(p.id,ctx),/ORDERS_INTEGRITY_MISMATCH/);
|
|
173
|
+
assert.equal(coordinator.get(p.id,'session').units[0].workflowId,undefined);
|
|
174
|
+
assert.equal(engine.list().length,0);
|
|
175
|
+
assert(!protocol().events.some(e=>e.type==='unit-dispatched'));
|
|
176
|
+
}finally{f.cleanup();}});
|
|
177
|
+
test('restored coordinator stamps each unit with the orders revision in force at dispatch',async()=>{const f=fixture();try{
|
|
178
|
+
const agents=new Map<string,any>();let paused=false;
|
|
179
|
+
const host:any={get:(id:string)=>agents.get(id),async run(spec:any){const fp=agentBaseline(spec);const a={...spec,state:'completed',cwd:spec.cwd,baseline:fp,report:report(fp),result:'checked'};agents.set(a.id,a);if(spec.brief?.id.endsWith('.unit1') && !paused){paused=true;coordinator.pause(p.id,'session');coordinator.updateOrders(p.id,'session',['new rule'],'operator update');}return a;}};
|
|
180
|
+
const engine=new WorkflowEngine(host);const ctx:any={cwd:f.repo,sessionManager:{getSessionId:()=> 'session'}};const coordinator=new ProgramCoordinator(engine);
|
|
181
|
+
const p=coordinator.create('session',['unit0','unit1','unit2'].map(key=>({key,spec:{cwd:f.repo,nodes:[{key:'read',profile:'scout',task:'inspect',brief:{...brief(f.repo),id:key}}]}})),1);
|
|
182
|
+
coordinator.updateOrders(p.id,'session',['old rule'],'operator update');
|
|
183
|
+
await coordinator.run(p.id,ctx);
|
|
184
|
+
assert.equal(coordinator.get(p.id,'session').state,'paused');
|
|
185
|
+
assert.deepEqual(coordinator.get(p.id,'session').units.map(u=>u.ordersRevision),[1,1,undefined]);
|
|
186
|
+
const restored=new ProgramCoordinator(engine);
|
|
187
|
+
assert.deepEqual(restored.get(p.id,'session').orders?.instructions,['new rule']);
|
|
188
|
+
assert.equal(restored.resume(p.id,'session').state,'scaling');
|
|
189
|
+
const stalled=await restored.run(p.id,ctx);
|
|
190
|
+
assert.equal(stalled.state,'blocked');
|
|
191
|
+
assert.deepEqual(stalled.units.map(u=>u.ordersRevision),[1,1,undefined]);
|
|
192
|
+
assert.deepEqual(stalled.blockedReason?.units,[{key:'unit0',dispatchedRevision:1},{key:'unit1',dispatchedRevision:1}]);
|
|
193
|
+
for(const key of ['unit0','unit1'])restored.acknowledgeOrders(p.id,'session',key,2,'operator ack');
|
|
194
|
+
assert.equal(restored.resume(p.id,'session').state,'scaling');
|
|
195
|
+
await restored.run(p.id,ctx);
|
|
196
|
+
const after=restored.get(p.id,'session');
|
|
197
|
+
assert.deepEqual(after.units.map(u=>u.ordersRevision),[1,1,2]);
|
|
198
|
+
const ordersFor=(key:string)=>Object.entries(protocol().briefs).filter(([id])=>id.endsWith(`.${after.id}.${key}`)).flatMap(([,v])=>v).at(-1)?.standingOrders;
|
|
199
|
+
assert.deepEqual(ordersFor('unit0'),['old rule']);
|
|
200
|
+
assert.deepEqual(ordersFor('unit2'),['new rule']);
|
|
201
|
+
}finally{f.cleanup();}});
|
|
202
|
+
test('orders revised while a unit is running block the program until the operator acknowledges that revision',async()=>{const f=fixture();try{
|
|
203
|
+
const agents=new Map<string,any>();let runs=0;
|
|
204
|
+
const host:any={get:(id:string)=>agents.get(id),async run(spec:any){runs++;const fp=agentBaseline(spec);const a={...spec,state:'completed',cwd:spec.cwd,baseline:fp,report:report(fp),result:'checked'};agents.set(a.id,a);if(runs===1)coordinator.updateOrders(p.id,'session',['new safety rule'],'operator update');return a;}};
|
|
205
|
+
const engine=new WorkflowEngine(host);const ctx:any={cwd:f.repo,sessionManager:{getSessionId:()=> 'session'}};const coordinator=new ProgramCoordinator(engine);
|
|
206
|
+
const p=coordinator.create('session',[{key:'unit',spec:{cwd:f.repo,nodes:[{key:'read',profile:'scout',task:'inspect',brief:{...brief(f.repo),id:'unit'}}]}}]);
|
|
207
|
+
coordinator.updateOrders(p.id,'session',['old rule'],'operator update');
|
|
208
|
+
const blocked=await coordinator.run(p.id,ctx);
|
|
209
|
+
assert.equal(blocked.state,'blocked');
|
|
210
|
+
assert.equal(blocked.blockedReason?.code,'ORDERS_STALE');
|
|
211
|
+
assert.deepEqual(blocked.blockedReason?.units,[{key:'unit',dispatchedRevision:1}]);
|
|
212
|
+
assert.equal(blocked.blockedReason?.currentRevision,2);
|
|
213
|
+
assert.match(blocked.blockedReason!.message,/dispatched under orders revision 1/);
|
|
214
|
+
assert.match(blocked.blockedReason!.message,/current revision 2/);
|
|
215
|
+
assert.equal(runs,1);
|
|
216
|
+
assert.equal(engine.list().length,1);
|
|
217
|
+
assert.equal(briefHistory(p.id,'unit').length,1);
|
|
218
|
+
}finally{f.cleanup();}});
|
|
219
|
+
test('orders acknowledgement is durable per unit, version stamped, and not implied by resume',async()=>{const f=fixture();try{
|
|
220
|
+
const agents=new Map<string,any>();let runs=0;
|
|
221
|
+
const host:any={get:(id:string)=>agents.get(id),async run(spec:any){runs++;const fp=agentBaseline(spec);const a={...spec,state:'completed',cwd:spec.cwd,baseline:fp,report:report(fp),result:'checked'};agents.set(a.id,a);return a;}};
|
|
222
|
+
const engine=new WorkflowEngine(host);const ctx:any={cwd:f.repo,sessionManager:{getSessionId:()=> 'session'}};const coordinator=new ProgramCoordinator(engine);
|
|
223
|
+
const p=coordinator.create('session',[{key:'unit',spec:{cwd:f.repo,nodes:[{key:'read',profile:'scout',task:'inspect',brief:{...brief(f.repo),id:'unit'}}]}}]);
|
|
224
|
+
coordinator.updateOrders(p.id,'session',['old rule'],'operator update');
|
|
225
|
+
await coordinator.run(p.id,ctx);
|
|
226
|
+
coordinator.updateOrders(p.id,'session',['new safety rule'],'operator update');
|
|
227
|
+
assert.equal((await coordinator.run(p.id,ctx)).state,'blocked');
|
|
228
|
+
const resumed=coordinator.resume(p.id,'session');
|
|
229
|
+
assert.equal(resumed.state,'scaling');
|
|
230
|
+
assert.deepEqual(resumed.staleUnits.map(d=>[d.key,d.dispatchedRevision,d.currentRevision]),[['unit',1,2]]);
|
|
231
|
+
assert.equal((await coordinator.run(p.id,ctx)).state,'blocked');
|
|
232
|
+
assert.throws(()=>coordinator.acknowledgeOrders(p.id,'session','unit',1,'operator ack'),/ORDERS_REVISION_MISMATCH/);
|
|
233
|
+
assert.throws(()=>coordinator.acknowledgeOrders(p.id,'session','other',2,'operator ack'),/UNKNOWN_UNIT/);
|
|
234
|
+
assert.equal(coordinator.acknowledgeOrders(p.id,'session','unit',2,'operator ack').units[0].ordersAcknowledgement?.revision,2);
|
|
235
|
+
const restored=new ProgramCoordinator(engine);
|
|
236
|
+
const ack=restored.get(p.id,'session').units[0].ordersAcknowledgement!;
|
|
237
|
+
assert.deepEqual([ack.revision,ack.actor,ack.reason],[2,'session','operator ack']);
|
|
238
|
+
assert.ok(Date.parse(ack.at)>0);
|
|
239
|
+
const cleared=restored.resume(p.id,'session');
|
|
240
|
+
assert.deepEqual(cleared.staleUnits,[]);
|
|
241
|
+
assert.equal(cleared.state,'scaling');
|
|
242
|
+
await restored.run(p.id,ctx);
|
|
243
|
+
assert.equal(restored.get(p.id,'session').state,'scaling');
|
|
244
|
+
assert.equal(runs,1);
|
|
245
|
+
assert.equal(engine.list().length,1);
|
|
246
|
+
assert.deepEqual(briefHistory(p.id,'unit').map(b=>b.standingOrders),[['old rule']]);
|
|
247
|
+
}finally{f.cleanup();}});
|
|
248
|
+
test('restarted coordinator never resumes a unit under superseded orders',async()=>{const f=fixture();try{
|
|
249
|
+
const agents=new Map<string,any>();let runs=0;
|
|
250
|
+
const host:any={get:(id:string)=>agents.get(id),async run(spec:any){runs++;const fp=agentBaseline(spec);const a={...spec,state:'completed',cwd:spec.cwd,baseline:fp,result:'checked'};agents.set(a.id,a);return a;}};
|
|
251
|
+
const engine=new WorkflowEngine(host);const ctx:any={cwd:f.repo,sessionManager:{getSessionId:()=> 'session'}};const coordinator=new ProgramCoordinator(engine);
|
|
252
|
+
const p=coordinator.create('session',[{key:'unit',spec:{cwd:f.repo,nodes:[{key:'read',profile:'scout',task:'inspect',brief:{...brief(f.repo),id:'unit'}}]}}]);
|
|
253
|
+
coordinator.updateOrders(p.id,'session',['old rule'],'operator update');
|
|
254
|
+
const settled=await coordinator.run(p.id,ctx);
|
|
255
|
+
assert.equal(settled.units[0].state,'blocked');
|
|
256
|
+
const workflowId=settled.units[0].workflowId!;const ledgers=Object.keys(protocol().ledgers).length;
|
|
257
|
+
coordinator.updateOrders(p.id,'session',['new safety rule'],'operator update');
|
|
258
|
+
const restarted=new WorkflowEngine(host);const restored=new ProgramCoordinator(restarted);
|
|
259
|
+
assert.equal(restarted.recoverSession('session',ctx).length,1);
|
|
260
|
+
await new Promise(r=>setTimeout(r,50));
|
|
261
|
+
assert.equal(restarted.get(workflowId)?.state,'blocked');
|
|
262
|
+
assert.equal(restarted.get(workflowId)?.error?.code,'ORDERS_STALE');
|
|
263
|
+
assert.match(restarted.get(workflowId)?.error?.message ?? '',/current revision 2/);
|
|
264
|
+
assert.equal(Object.keys(protocol().ledgers).length,ledgers);
|
|
265
|
+
assert.equal(runs,1);
|
|
266
|
+
const blocked=await restored.run(p.id,ctx);
|
|
267
|
+
assert.equal(blocked.state,'blocked');
|
|
268
|
+
assert.deepEqual(blocked.blockedReason?.units,[{key:'unit',dispatchedRevision:1}]);
|
|
269
|
+
assert.equal(blocked.blockedReason?.currentRevision,2);
|
|
270
|
+
}finally{f.cleanup();}});
|
|
271
|
+
test('a revised revision blocks only the units dispatched under the old one',async()=>{const f=fixture();try{
|
|
272
|
+
const agents=new Map<string,any>();let runs=0;
|
|
273
|
+
const host:any={get:(id:string)=>agents.get(id),async run(spec:any){runs++;const fp=agentBaseline(spec);const a={...spec,state:'completed',cwd:spec.cwd,baseline:fp,report:report(fp),result:'checked'};agents.set(a.id,a);if(runs===2)coordinator.updateOrders(p.id,'session',['revised rule'],'operator update');return a;}};
|
|
274
|
+
const engine=new WorkflowEngine(host);const ctx:any={cwd:f.repo,sessionManager:{getSessionId:()=> 'session'}};const coordinator=new ProgramCoordinator(engine);
|
|
275
|
+
const p=coordinator.create('session',['unit0','unit1','unit2','unit3'].map(key=>({key,spec:{cwd:f.repo,nodes:[{key:'read',profile:'scout',task:'inspect',brief:{...brief(f.repo),id:key}}]}})),1);
|
|
276
|
+
coordinator.updateOrders(p.id,'session',['original rule'],'operator update');
|
|
277
|
+
const blocked=await coordinator.run(p.id,ctx);
|
|
278
|
+
assert.equal(blocked.state,'blocked');
|
|
279
|
+
assert.deepEqual(blocked.blockedReason?.units.map(u=>u.key),['unit0','unit1']);
|
|
280
|
+
assert.deepEqual(blocked.units.map(u=>u.ordersRevision),[1,1,undefined,undefined]);
|
|
281
|
+
assert.equal(runs,2);
|
|
282
|
+
coordinator.acknowledgeOrders(p.id,'session','unit0',2,'operator ack');
|
|
283
|
+
assert.deepEqual((await coordinator.run(p.id,ctx)).blockedReason?.units.map(u=>u.key),['unit1']);
|
|
284
|
+
assert.equal(runs,2);
|
|
285
|
+
coordinator.acknowledgeOrders(p.id,'session','unit1',2,'operator ack');
|
|
286
|
+
const finished=await coordinator.run(p.id,ctx);
|
|
287
|
+
assert.equal(finished.units.filter(u=>u.state==='reconciled').length,4);
|
|
288
|
+
assert.deepEqual(finished.units.map(u=>u.ordersRevision),[1,1,2,2]);
|
|
289
|
+
assert.equal(runs,4);
|
|
290
|
+
assert.deepEqual(finished.units.map(u=>briefHistory(p.id,u.key).length),[1,1,1,1]);
|
|
291
|
+
assert.deepEqual(briefHistory(p.id,'unit0').map(b=>b.standingOrders),[['original rule']]);
|
|
292
|
+
assert.deepEqual(briefHistory(p.id,'unit3').map(b=>b.standingOrders),[['revised rule']]);
|
|
293
|
+
}finally{f.cleanup();}});
|
|
294
|
+
test('orders digest tampered after the pilot refuses the next unit dispatch',async(t)=>{const f=fixture();try{
|
|
295
|
+
const agents=new Map<string,any>();const started:string[]=[];
|
|
296
|
+
const host:any={get:(id:string)=>agents.get(id),async run(spec:any){started.push(spec.brief.id);const fp=agentBaseline(spec);const a={...spec,state:'completed',cwd:spec.cwd,baseline:fp,report:report(fp),result:'checked'};agents.set(a.id,a);return a;}};
|
|
297
|
+
const engine=new WorkflowEngine(host);const ctx:any={cwd:f.repo,sessionManager:{getSessionId:()=> 'session'}};const coordinator=new ProgramCoordinator(engine);
|
|
298
|
+
const p=coordinator.create('session',['pilot','next'].map(key=>({key,spec:{cwd:f.repo,nodes:[{key:'read',profile:'scout',task:'inspect',brief:{...brief(f.repo),id:key}}]}})),1);
|
|
299
|
+
coordinator.updateOrders(p.id,'session',['original rule'],'operator update');
|
|
300
|
+
const run=engine.run.bind(engine);let pilotCompleted=false;
|
|
301
|
+
t.mock.method(engine,'run',async(id:string,context:any)=>{const wf=await run(id,context);if(!pilotCompleted){assert.equal(wf.state,'completed');assert.equal(wf.verification,'verified');pilotCompleted=true;transact('test-orders-tampered',p.id,'test',s=>{s.programs[p.id].orders.instructions=['tampered rule'];});}return wf;});
|
|
302
|
+
await assert.rejects(()=>coordinator.run(p.id,ctx),/ORDERS_INTEGRITY_MISMATCH/);
|
|
303
|
+
const after=coordinator.get(p.id,'session');
|
|
304
|
+
assert.equal(pilotCompleted,true);
|
|
305
|
+
assert.equal(after.units[0].state,'ready-to-integrate');
|
|
306
|
+
assert.equal(after.orders?.digest,hash(['original rule']));
|
|
307
|
+
assert.deepEqual(after.orders?.instructions,['tampered rule']);
|
|
308
|
+
assert.deepEqual(started,[`pilot.${p.id}.pilot`]);
|
|
309
|
+
assert.equal(after.units[1].workflowId,undefined);
|
|
310
|
+
assert.equal(engine.list().length,1);
|
|
311
|
+
assert.deepEqual(briefHistory(p.id,'next'),[]);
|
|
312
|
+
}finally{t.mock.restoreAll();f.cleanup();}});
|
|
313
|
+
test('orders revised by the first root veto the second call in the same batch',async()=>{const f=fixture();try{
|
|
314
|
+
const agents=new Map<string,any>();const started:{key:string;orders:string[]}[]=[];
|
|
315
|
+
const host:any={get:(id:string)=>agents.get(id),async run(spec:any){started.push({key:spec.callKey,orders:spec.brief.standingOrders});if(spec.callKey==='first')coordinator.updateOrders(p.id,'session',['revised rule'],'operator update');const fp=agentBaseline(spec);const a={...spec,state:'completed',cwd:spec.cwd,baseline:fp,report:report(fp),result:'checked'};agents.set(a.id,a);return a;}};
|
|
316
|
+
const engine=new WorkflowEngine(host);const ctx:any={cwd:f.repo,sessionManager:{getSessionId:()=> 'session'}};const coordinator=new ProgramCoordinator(engine);
|
|
317
|
+
const p=coordinator.create('session',[{key:'unit',spec:{cwd:f.repo,maxConcurrency:2,nodes:['first','second'].map(key=>({key,profile:'scout',task:'inspect',brief:{...brief(f.repo),id:key}}))}}]);
|
|
318
|
+
coordinator.updateOrders(p.id,'session',['original rule'],'operator update');
|
|
319
|
+
const blocked=await coordinator.run(p.id,ctx);
|
|
320
|
+
assert.deepEqual(started,[{key:'first',orders:['original rule']}]);
|
|
321
|
+
assert.equal(blocked.state,'blocked');
|
|
322
|
+
assert.equal(blocked.blockedReason?.currentRevision,2);
|
|
323
|
+
const wf=engine.get(blocked.units[0].workflowId!)!;
|
|
324
|
+
assert.equal(wf.state,'blocked');
|
|
325
|
+
assert.equal(wf.error?.code,'ORDERS_STALE');
|
|
326
|
+
assert.equal(wf.calls.first.state,'completed');
|
|
327
|
+
assert.equal(wf.calls.second.attempt,0);
|
|
328
|
+
assert.equal(wf.calls.second.agentId,undefined);
|
|
329
|
+
}finally{f.cleanup();}});
|
|
330
|
+
test('orders acknowledgement refuses a revision moved before transaction lock acquisition',async(t)=>{const f=fixture();try{
|
|
331
|
+
const {FileLock}=await import('../src/runtime/lock.ts');const {lockPath}=await import('../src/runtime/home.ts');
|
|
332
|
+
const agents=new Map<string,any>();
|
|
333
|
+
const host:any={get:(id:string)=>agents.get(id),async run(spec:any){const fp=agentBaseline(spec);const a={...spec,state:'completed',cwd:spec.cwd,baseline:fp,report:report(fp),result:'checked'};agents.set(a.id,a);return a;}};
|
|
334
|
+
const engine=new WorkflowEngine(host);const ctx:any={cwd:f.repo,sessionManager:{getSessionId:()=> 'session'}};const coordinator=new ProgramCoordinator(engine);
|
|
335
|
+
const p=coordinator.create('session',[{key:'unit',spec:{cwd:f.repo,nodes:[{key:'read',profile:'scout',task:'inspect',brief:brief(f.repo)}]}}]);
|
|
336
|
+
coordinator.updateOrders(p.id,'session',['original rule'],'operator update');
|
|
337
|
+
assert.equal((await coordinator.run(p.id,ctx)).units[0].state,'reconciled');
|
|
338
|
+
coordinator.updateOrders(p.id,'session',['second rule'],'operator update');
|
|
339
|
+
const acquire=FileLock.prototype.acquire;let moved=false;
|
|
340
|
+
t.mock.method(FileLock.prototype,'acquire',function(this:InstanceType<typeof FileLock>){if(!moved && this.path===lockPath('protocol-state')){moved=true;execFileSync(process.execPath,['--experimental-strip-types','--input-type=module','-e',`import {ProgramCoordinator} from './src/program/coordinator.ts';new ProgramCoordinator(null).updateOrders(${JSON.stringify(p.id)},'session',['third rule'],'concurrent operator update');`],{cwd:process.cwd(),env:process.env});}return acquire.call(this);});
|
|
341
|
+
assert.throws(()=>coordinator.acknowledgeOrders(p.id,'session','unit',2,'operator ack'),/ORDERS_REVISION_MISMATCH: acknowledgement names revision 2, current revision 3/);
|
|
342
|
+
t.mock.restoreAll();
|
|
343
|
+
const after=coordinator.get(p.id,'session');
|
|
344
|
+
assert.equal(moved,true);
|
|
345
|
+
assert.equal(after.orders?.revision,3);
|
|
346
|
+
assert.deepEqual(after.orders?.instructions,['third rule']);
|
|
347
|
+
assert.equal(after.units[0].ordersAcknowledgement,undefined);
|
|
348
|
+
assert.equal(protocol().events.filter(e=>e.subject===p.id && e.type==='unit-orders-acknowledged').length,0);
|
|
349
|
+
assert.equal(coordinator.acknowledgeOrders(p.id,'session','unit',3,'current operator ack').units[0].ordersAcknowledgement?.revision,3);
|
|
350
|
+
}finally{t.mock.restoreAll();f.cleanup();}});
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import test from "node:test";
|
|
2
|
+
import assert from "node:assert/strict";
|
|
3
|
+
import { mkdtempSync, mkdirSync, rmSync, symlinkSync, writeFileSync } from "node:fs";
|
|
4
|
+
import { join } from "node:path";
|
|
5
|
+
import { createReadOnlyTools } from "../src/agent/read-only-tools.ts";
|
|
6
|
+
import { PROFILES, READ_ONLY_TOOL_NAMES, getProfile } from "../src/agent/profiles.ts";
|
|
7
|
+
|
|
8
|
+
test("read-only search tools find content and reject paths outside the workspace", async () => {
|
|
9
|
+
const root = mkdtempSync(join(process.cwd(), ".pstack-ro-"));
|
|
10
|
+
const outside = mkdtempSync(join(process.cwd(), ".pstack-out-"));
|
|
11
|
+
try {
|
|
12
|
+
mkdirSync(join(root,"src")); writeFileSync(join(root,"src","a.ts"),"const usefulName = 1;\n");
|
|
13
|
+
writeFileSync(join(outside,"secret.txt"),"secret\n"); symlinkSync(outside,join(root,"escape"));
|
|
14
|
+
const tools = Object.fromEntries(createReadOnlyTools(root).map((t) => [t.name,t]));
|
|
15
|
+
const found = await tools.find.execute("1",{query:"a.ts"});
|
|
16
|
+
assert.match(found.content[0].text,/src\/a\.ts/);
|
|
17
|
+
const grep = await tools.grep.execute("2",{pattern:"usefulName"});
|
|
18
|
+
assert.match(grep.content[0].text,/src\/a\.ts:1/);
|
|
19
|
+
await assert.rejects(() => tools.ls.execute("3",{path:"escape"}), /escapes child workspace/);
|
|
20
|
+
} finally { rmSync(root,{recursive:true,force:true}); rmSync(outside,{recursive:true,force:true}); }
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
test("confined read rejects symlink and absolute paths outside the workspace", async () => {
|
|
24
|
+
const root = mkdtempSync(join(process.cwd(), ".pstack-read-"));
|
|
25
|
+
const outside = mkdtempSync(join(process.cwd(), ".pstack-secret-"));
|
|
26
|
+
try {
|
|
27
|
+
writeFileSync(join(root, "safe.txt"), "hello\nworld");
|
|
28
|
+
writeFileSync(join(outside, "secret"), "token");
|
|
29
|
+
symlinkSync(join(outside, "secret"), join(root, "link"));
|
|
30
|
+
const tools = Object.fromEntries(createReadOnlyTools(root).map((tool) => [tool.name, tool]));
|
|
31
|
+
assert.match((await tools.read.execute("1", { path: "safe.txt" })).content[0].text, /1: hello/);
|
|
32
|
+
await assert.rejects(() => tools.read.execute("2", { path: join(outside, "secret") }), /escapes/);
|
|
33
|
+
await assert.rejects(() => tools.read.execute("3", { path: "link" }), /escapes/);
|
|
34
|
+
} finally { rmSync(root, { recursive: true, force: true }); rmSync(outside, { recursive: true, force: true }); }
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
test("every read-only profile is limited to READ_ONLY_TOOL_NAMES and a stray writable tool is rejected", () => {
|
|
38
|
+
for (const profile of Object.values(PROFILES)) {
|
|
39
|
+
if (profile.writable) continue;
|
|
40
|
+
for (const tool of profile.tools) {
|
|
41
|
+
assert.ok((READ_ONLY_TOOL_NAMES as readonly string[]).includes(tool), `${profile.name} is read-only but lists ${tool}`);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
PROFILES["probe-writer"] = { ...PROFILES.reviewer!, name: "probe-writer", tools: ["read", "bash"] };
|
|
45
|
+
try {
|
|
46
|
+
assert.throws(() => getProfile("probe-writer"), (error: unknown) =>
|
|
47
|
+
error instanceof Error && error.message.startsWith("PROFILE_TOOL_VIOLATION"));
|
|
48
|
+
} finally {
|
|
49
|
+
delete PROFILES["probe-writer"];
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
test("catastrophic regex runs in a killable worker rather than stalling the main thread", async () => {
|
|
54
|
+
const root = mkdtempSync(join(process.cwd(), ".pstack-redos-"));
|
|
55
|
+
try {
|
|
56
|
+
writeFileSync(join(root, "re.txt"), "a".repeat(90) + "!\n");
|
|
57
|
+
const tools = Object.fromEntries(createReadOnlyTools(root).map((tool) => [tool.name, tool]));
|
|
58
|
+
const before = Date.now();
|
|
59
|
+
await assert.rejects(() => tools.grep.execute("1", { pattern: "(a+)+$" }), /exceeded.*limit/);
|
|
60
|
+
assert.ok(Date.now() - before < 7000, "regex should not block the main JS thread indefinitely");
|
|
61
|
+
assert.match((await tools.read.execute("2", { path: "re.txt" })).content[0].text, /a+/);
|
|
62
|
+
} finally { rmSync(root, { recursive: true, force: true }); }
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
test("find stops at the traversal bound instead of walking a tree of empty directories", async () => {
|
|
66
|
+
const root = mkdtempSync(join(process.cwd(), ".pstack-walk-"));
|
|
67
|
+
try {
|
|
68
|
+
for (let i = 0; i < 25_000; i++) mkdirSync(join(root, `empty-${i}`));
|
|
69
|
+
const find = createReadOnlyTools(root).find((t) => t.name === "find")!;
|
|
70
|
+
const text = (await find.execute("1", { query: "nothing-matches" })).content[0].text;
|
|
71
|
+
assert.equal(text, "(no matches)\n(walk stopped at the traversal limit; results may be incomplete)");
|
|
72
|
+
} finally { rmSync(root, { recursive: true, force: true }); }
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
test("find does not descend past the depth limit", async () => {
|
|
76
|
+
const root = mkdtempSync(join(process.cwd(), ".pstack-depth-"));
|
|
77
|
+
try {
|
|
78
|
+
let deep = root; for (let i = 0; i < 40; i++) { deep = join(deep, "d"); mkdirSync(deep); }
|
|
79
|
+
writeFileSync(join(deep, "deep.txt"), "x");
|
|
80
|
+
let near = root; for (let i = 0; i < 3; i++) { near = join(near, "n"); mkdirSync(near); }
|
|
81
|
+
writeFileSync(join(near, "near.txt"), "x");
|
|
82
|
+
const find = createReadOnlyTools(root).find((t) => t.name === "find")!;
|
|
83
|
+
assert.ok(!(await find.execute("1", { query: "deep.txt" })).content[0].text.includes("deep.txt"));
|
|
84
|
+
assert.match((await find.execute("2", { query: "near.txt" })).content[0].text, /near\.txt/);
|
|
85
|
+
} finally { rmSync(root, { recursive: true, force: true }); }
|
|
86
|
+
});
|