dsh-pstack 0.3.0-beta.1 → 0.3.1
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/README.md +122 -76
- package/README.zh.md +116 -70
- package/assets/agent-presets.png +0 -0
- package/assets/plugin-configure.png +0 -0
- package/assets/plugin-recommended.png +0 -0
- package/assets/plugin-roles.png +0 -0
- package/assets/session-preset.png +0 -0
- package/cordis.patch.yml +332 -24
- package/dist/budget.d.mts +82 -0
- package/dist/budget.mjs +293 -0
- package/dist/catalogue-wgVaGeUx.d.mts +27 -0
- package/dist/catalogue.d.mts +2 -0
- package/dist/catalogue.mjs +116 -0
- package/dist/client.js +4072 -0
- package/dist/index.d.mts +2 -87
- package/dist/index.mjs +3 -394
- package/dist/models.d.mts +11 -40
- package/dist/models.mjs +47 -107
- package/dist/paths.d.mts +13 -0
- package/dist/paths.mjs +26 -0
- package/dist/poteto-mode.d.mts +37 -0
- package/dist/poteto-mode.mjs +61 -0
- package/dist/preset-copy.d.mts +12 -0
- package/dist/preset-copy.mjs +64 -0
- package/dist/preset.d.mts +31 -0
- package/dist/preset.mjs +51 -0
- package/dist/pstack/docs/harness/dsh.md +40 -40
- package/dist/pstack/plugin.json +21 -0
- package/dist/pstack/skills/poteto-mode/scripts/bootstrap.ts +62 -0
- package/dist/pstack/skills/poteto-mode/scripts/bun.lock +67 -0
- package/dist/pstack/skills/poteto-mode/scripts/check-plan.mjs +70 -83
- package/dist/pstack/skills/poteto-mode/scripts/{check-plan.test.mjs → check-plan.test.ts} +24 -42
- package/dist/pstack/skills/poteto-mode/scripts/package.json +16 -0
- package/dist/pstack/skills/poteto-mode/scripts/watch-pr/cli.test.ts +224 -0
- package/dist/pstack/skills/poteto-mode/scripts/watch-pr/cli.ts +223 -0
- package/dist/pstack/skills/poteto-mode/scripts/watch-pr/fakes.test-helper.ts +129 -0
- package/dist/pstack/skills/poteto-mode/scripts/watch-pr/github.test.ts +498 -0
- package/dist/pstack/skills/poteto-mode/scripts/watch-pr/github.ts +726 -0
- package/dist/pstack/skills/poteto-mode/scripts/watch-pr/policy.test.ts +482 -0
- package/dist/pstack/skills/poteto-mode/scripts/watch-pr/policy.ts +842 -0
- package/dist/pstack/skills/poteto-mode/scripts/watch-pr/render.ts +169 -0
- package/dist/pstack/skills/poteto-mode/scripts/watch-pr/tsconfig.json +13 -0
- package/dist/pstack/skills/poteto-mode/scripts/watch-pr/types.compile.ts +93 -0
- package/dist/pstack/skills/poteto-mode/scripts/watch-pr/types.ts +414 -0
- package/dist/pstack/skills/poteto-mode/scripts/watch-pr/watch-pr +6 -0
- package/dist/pstack/skills/poteto-mode/scripts/worktree-audit.sh +134 -0
- package/dist/pstack/skills/show-me-your-work/scripts/log.sh +42 -0
- package/dist/pstack/skills/statechart/scripts/backends/cfg.ts +33 -0
- package/dist/pstack/skills/statechart/scripts/backends/mermaid.ts +201 -0
- package/dist/pstack/skills/statechart/scripts/backends/plain-text.ts +72 -0
- package/dist/pstack/skills/statechart/scripts/backends/report.ts +177 -0
- package/dist/pstack/skills/statechart/scripts/frontends/config.ts +276 -0
- package/dist/pstack/skills/statechart/scripts/frontends/dot.ts +74 -0
- package/dist/pstack/skills/statechart/scripts/frontends/marks.ts +93 -0
- package/dist/pstack/skills/statechart/scripts/frontends/messages.ts +52 -0
- package/dist/pstack/skills/statechart/scripts/frontends/spec.ts +114 -0
- package/dist/pstack/skills/statechart/scripts/frontends/trace.ts +24 -0
- package/dist/pstack/skills/statechart/scripts/frontends/value.ts +166 -0
- package/dist/pstack/skills/statechart/scripts/frontends/verdict.ts +40 -0
- package/dist/pstack/skills/statechart/scripts/frontends/view.ts +119 -0
- package/dist/pstack/skills/statechart/scripts/ir.ts +547 -0
- package/dist/pstack/skills/statechart/scripts/package.json +11 -0
- package/dist/pstack/skills/statechart/scripts/passes/annotate.ts +128 -0
- package/dist/pstack/skills/statechart/scripts/passes/label.ts +269 -0
- package/dist/pstack/skills/statechart/scripts/passes/lift.ts +85 -0
- package/dist/pstack/skills/statechart/scripts/passes/loop-check.ts +68 -0
- package/dist/pstack/skills/statechart/scripts/passes/paths.ts +60 -0
- package/dist/pstack/skills/statechart/scripts/passes/reach.ts +135 -0
- package/dist/pstack/skills/statechart/scripts/passes/region-check.ts +97 -0
- package/dist/pstack/skills/statechart/scripts/passes/regions.ts +295 -0
- package/dist/pstack/skills/statechart/scripts/pipeline.ts +76 -0
- package/dist/pstack/skills/statechart/scripts/run.ts +481 -0
- package/dist/pstack/skills/statechart/scripts/statechart +29 -0
- package/dist/pstack/skills/statechart/scripts/statechart.ts +164 -0
- package/dist/pstack/skills/statechart/scripts/test/ConfigOracle.java +63 -0
- package/dist/pstack/skills/statechart/scripts/test/chart.test.ts +1210 -0
- package/dist/pstack/skills/statechart/scripts/test/charts/Braces.mmd +7 -0
- package/dist/pstack/skills/statechart/scripts/test/charts/Escapes.mmd +11 -0
- package/dist/pstack/skills/statechart/scripts/test/charts/Phases.mmd +29 -0
- package/dist/pstack/skills/statechart/scripts/test/cli.test.ts +1314 -0
- package/dist/pstack/skills/statechart/scripts/test/config-fuzz.test.ts +263 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/Counter/ChartRun.out +57 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/Counter/Counter.cfg +3 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/Counter/Counter.tla +10 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/Counter/chart.mmd +9 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/Counter/graph.dot +16 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/Counter/report.md +7 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/Counter/sany.out +2 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/Counter/verdict-1.out +49 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterAction/ChartRun.out +60 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterAction/CounterAction.cfg +4 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterAction/CounterAction.tla +22 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterAction/chart.mmd +26 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterAction/graph.dot +19 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterAction/report.md +20 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterAction/sany.out +2 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterAction/verdict-1.exit +1 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterAction/verdict-1.out +56 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterAction/verdict-2.exit +1 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterAction/verdict-2.out +82 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterAction/verdict-3.out +57 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterDeadlock/ChartRun.out +59 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterDeadlock/CounterDeadlock.cfg +3 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterDeadlock/CounterDeadlock.tla +11 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterDeadlock/chart.mmd +22 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterDeadlock/graph.dot +16 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterDeadlock/report.md +17 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterDeadlock/sany.out +2 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterDeadlock/verdict-1.exit +1 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterDeadlock/verdict-1.out +56 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterDeadlock/verdict-2.exit +1 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterDeadlock/verdict-2.out +77 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterFan/ChartRun.out +69 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterFan/CounterFan.cfg +2 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterFan/CounterFan.tla +11 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterFan/chart.mmd +85 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterFan/graph.dot +70 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterFan/report.md +12 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterFan/sany.out +2 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterFan/verdict-1.exit +1 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterFan/verdict-1.out +67 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterFan/verdict-2.out +57 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterGuard/ChartRun.exit +1 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterGuard/ChartRun.out +85 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterGuard/CounterGuard.cfg +6 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterGuard/CounterGuard.tla +13 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterGuard/chart.mmd +5 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterGuard/graph.dot +10 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterGuard/report.md +31 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterGuard/sany.out +2 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterGuard/verdict-1.exit +1 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterGuard/verdict-1.out +64 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterGuard/verdict-2.exit +1 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterGuard/verdict-2.out +77 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterInitPast/ChartRun.out +55 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterInitPast/CounterInitPast.cfg +3 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterInitPast/CounterInitPast.tla +10 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterInitPast/chart.mmd +12 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterInitPast/graph.dot +6 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterInitPast/report.md +12 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterInitPast/sany.out +2 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterInitPast/verdict-1.exit +1 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterInitPast/verdict-1.out +33 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterInitPast/verdict-2.out +54 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterInitPastHolds/ChartRun.out +54 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterInitPastHolds/CounterInitPastHolds.cfg +3 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterInitPastHolds/CounterInitPastHolds.tla +10 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterInitPastHolds/chart.mmd +1 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterInitPastHolds/graph.dot +6 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterInitPastHolds/report.md +7 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterInitPastHolds/sany.out +2 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterInitPastHolds/verdict-1.out +46 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterInstance/ChartRun.out +59 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterInstance/CounterInstance.cfg +2 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterInstance/CounterInstance.tla +10 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterInstance/CounterSteps.tla +6 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterInstance/chart.mmd +17 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterInstance/graph.dot +15 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterInstance/report.md +14 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterInstance/sany.out +3 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterInstance/verdict-1.exit +1 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterInstance/verdict-1.out +78 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterJump/ChartRun.out +59 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterJump/CounterJump.cfg +3 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterJump/CounterJump.tla +19 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterJump/chart.mmd +26 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterJump/graph.dot +22 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterJump/report.md +12 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterJump/sany.out +2 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterJump/verdict-1.exit +1 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterJump/verdict-1.out +58 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterJump/verdict-2.out +57 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterLoop/ChartRun.out +57 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterLoop/CounterLoop.cfg +2 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterLoop/CounterLoop.tla +11 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterLoop/chart.mmd +17 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterLoop/graph.dot +15 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterLoop/report.md +14 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterLoop/sany.out +2 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterLoop/verdict-1.exit +1 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterLoop/verdict-1.out +76 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterOrder/ChartRun.out +59 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterOrder/CounterOrder.cfg +3 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterOrder/CounterOrder.tla +11 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterOrder/chart.mmd +19 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterOrder/graph.dot +10 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterOrder/report.md +15 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterOrder/sany.out +2 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterOrder/verdict-1.exit +1 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterOrder/verdict-1.out +56 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterOrder/verdict-2.exit +1 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterOrder/verdict-2.out +67 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterRules/ChartRun.out +62 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterRules/CounterRules.cfg +6 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterRules/CounterRules.tla +24 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterRules/Moves.tla +5 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterRules/chart.mmd +22 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterRules/graph.dot +10 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterRules/report.md +23 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterRules/sany.out +3 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterRules/verdict-1.exit +1 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterRules/verdict-1.out +58 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterRules/verdict-2.exit +1 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterRules/verdict-2.out +66 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterRules/verdict-3.exit +1 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterRules/verdict-3.out +74 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterRules/verdict-4.out +59 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterStart/ChartRun.out +58 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterStart/CounterStart.cfg +3 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterStart/CounterStart.tla +15 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterStart/chart.mmd +18 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterStart/graph.dot +13 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterStart/report.md +11 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterStart/sany.out +2 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterStart/verdict-1.exit +1 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterStart/verdict-1.out +33 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterStart/verdict-2.out +57 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterStop/ChartRun.out +57 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterStop/CounterStop.cfg +3 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterStop/CounterStop.tla +15 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterStop/chart.mmd +7 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterStop/graph.dot +13 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterStop/report.md +6 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterStop/sany.out +2 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterStop/verdict-1.out +49 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterTie/ChartRun.out +61 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterTie/CounterTie.cfg +4 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterTie/CounterTie.tla +14 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterTie/chart.mmd +30 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterTie/graph.dot +19 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterTie/report.md +27 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterTie/sany.out +2 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterTie/verdict-1.exit +1 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterTie/verdict-1.out +56 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterTie/verdict-2.exit +1 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterTie/verdict-2.out +64 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterTie/verdict-3.exit +1 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterTie/verdict-3.out +87 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterTie/verdict-4.out +57 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterTieInGraph/ChartRun.out +60 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterTieInGraph/CounterTieInGraph.cfg +3 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterTieInGraph/CounterTieInGraph.tla +12 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterTieInGraph/chart.mmd +23 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterTieInGraph/graph.dot +19 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterTieInGraph/report.md +11 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterTieInGraph/sany.out +2 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterTieInGraph/verdict-1.exit +1 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterTieInGraph/verdict-1.out +56 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterTieInGraph/verdict-2.out +57 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterView/ChartRun.out +61 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterView/CounterView.cfg +4 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterView/CounterView.tla +14 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterView/chart.mmd +23 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterView/graph.dot +19 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterView/report.md +27 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterView/sany.out +2 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterView/verdict-1.exit +1 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterView/verdict-1.out +56 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterView/verdict-2.exit +1 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterView/verdict-2.out +64 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterView/verdict-3.exit +1 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterView/verdict-3.out +87 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterView/verdict-4.out +57 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/CounterView/view.mjs +1 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/DieHard/ChartRun.out +59 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/DieHard/DieHard.cfg +4 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/DieHard/DieHard.tla +38 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/DieHard/chart.mmd +92 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/DieHard/graph.dot +126 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/DieHard/report.md +17 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/DieHard/sany.out +2 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/DieHard/verdict-1.exit +1 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/DieHard/verdict-1.out +91 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/DieHard/verdict-2.out +57 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/FirstRule/ChartRun.out +61 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/FirstRule/FirstRule.cfg +6 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/FirstRule/FirstRule.tla +11 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/FirstRule/chart.mmd +22 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/FirstRule/graph.dot +16 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/FirstRule/report.md +25 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/FirstRule/sany.out +2 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/FirstRule/verdict-1.exit +1 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/FirstRule/verdict-1.out +56 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/FirstRule/verdict-2.exit +1 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/FirstRule/verdict-2.out +64 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/FirstRule/verdict-3.exit +1 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/FirstRule/verdict-3.out +64 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/FirstRule/verdict-4.exit +1 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/FirstRule/verdict-4.out +77 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/HiddenClock/ChartRun.out +57 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/HiddenClock/HiddenClock.cfg +4 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/HiddenClock/HiddenClock.tla +11 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/HiddenClock/chart.mmd +13 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/HiddenClock/graph.dot +12 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/HiddenClock/report.md +11 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/HiddenClock/sany.out +2 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/HiddenClock/verdict-1.exit +1 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/HiddenClock/verdict-1.out +72 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/Login/ChartRun.out +57 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/Login/Login.cfg +3 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/Login/Login.tla +62 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/Login/chart.mmd +27 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/Login/graph.dot +40 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/Login/report.md +7 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/Login/sany.out +1 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/Login/verdict-1.out +47 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/Login/view.mjs +1 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/LoginGuarded/ChartRun.out +57 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/LoginGuarded/LoginGuarded.cfg +2 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/LoginGuarded/LoginGuarded.tla +64 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/LoginGuarded/chart.mmd +28 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/LoginGuarded/graph.dot +37 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/LoginGuarded/report.md +8 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/LoginGuarded/sany.out +1 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/LoginGuarded/verdict-1.out +47 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/LoginGuarded/view.mjs +1 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/LoginParallel/ChartRun.out +60 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/LoginParallel/LoginParallel.cfg +3 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/LoginParallel/LoginParallel.tla +64 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/LoginParallel/chart.mmd +44 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/LoginParallel/graph.dot +58 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/LoginParallel/report.md +17 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/LoginParallel/sany.out +1 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/LoginParallel/verdict-1.exit +1 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/LoginParallel/verdict-1.out +83 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/LoginParallel/verdict-2.out +57 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/LoginParallel/view.mjs +1 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/MediaPlayer/ChartRun.out +60 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/MediaPlayer/MediaPlayer.cfg +3 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/MediaPlayer/MediaPlayer.tla +103 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/MediaPlayer/chart.mmd +43 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/MediaPlayer/graph.dot +93 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/MediaPlayer/report.md +14 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/MediaPlayer/sany.out +1 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/MediaPlayer/verdict-1.exit +1 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/MediaPlayer/verdict-1.out +59 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/MediaPlayer/verdict-2.out +72 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/MediaPlayer/view.mjs +3 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/MediaPlayerFixed/ChartRun.out +57 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/MediaPlayerFixed/MediaPlayerFixed.cfg +2 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/MediaPlayerFixed/MediaPlayerFixed.tla +100 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/MediaPlayerFixed/chart.mmd +31 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/MediaPlayerFixed/graph.dot +85 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/MediaPlayerFixed/report.md +9 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/MediaPlayerFixed/sany.out +1 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/MediaPlayerFixed/verdict-1.out +47 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/MediaPlayerFixed/view.mjs +3 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/ChartRun.out +59 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/MediaPlayer.tla +103 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/MediaPlayerProps.cfg +3 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/MediaPlayerProps.tla +6 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/chart.mmd +42 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/graph.dot +93 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/report.md +19 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/sany.out +2 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-1.exit +1 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-1.out +61 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-2.out +59 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-3.out +61 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-4.exit +1 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-4.out +66 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-5.exit +1 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-5.out +58 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-6.out +49 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/view.mjs +3 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/PickWorker/ChartRun.out +57 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/PickWorker/PickWorker.cfg +6 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/PickWorker/PickWorker.tla +11 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/PickWorker/chart.mmd +5 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/PickWorker/graph.dot +11 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/PickWorker/report.md +7 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/PickWorker/sany.out +5 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/PickWorker/verdict-1.out +70 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/Shadow/ChartRun.out +61 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/Shadow/Shadow.cfg +4 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/Shadow/Shadow.tla +11 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/Shadow/ShadowLib.tla +6 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/Shadow/ShadowSub.tla +3 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/Shadow/chart.mmd +9 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/Shadow/graph.dot +16 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/Shadow/report.md +8 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/Shadow/sany.out +4 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/Shadow/verdict-1.out +65 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/SpacedNames/ChartRun.out +59 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/SpacedNames/SpacedNames.cfg +2 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/SpacedNames/SpacedNames.tla +9 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/SpacedNames/chart.mmd +23 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/SpacedNames/graph.dot +17 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/SpacedNames/report.md +15 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/SpacedNames/sany.out +1 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/SpacedNames/verdict-1.exit +1 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/SpacedNames/verdict-1.out +65 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/SpacedNames/verdict-2.exit +1 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/SpacedNames/verdict-2.out +75 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/TwoPhase/ChartRun.out +69 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/TwoPhase/TwoPhase.cfg +3 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/TwoPhase/TwoPhase.tla +75 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/TwoPhase/chart.mmd +60 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/TwoPhase/graph.dot +297 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/TwoPhase/report.md +20 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/TwoPhase/sany.out +1 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/TwoPhase/verdict-1.exit +1 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/TwoPhase/verdict-1.out +95 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/TwoPhase/verdict-2.out +57 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/TwoPhase/view.mjs +1 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/TwoPhaseFixed/ChartRun.out +57 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/TwoPhaseFixed/TwoPhaseFixed.cfg +3 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/TwoPhaseFixed/TwoPhaseFixed.tla +75 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/TwoPhaseFixed/chart.mmd +37 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/TwoPhaseFixed/graph.dot +223 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/TwoPhaseFixed/report.md +11 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/TwoPhaseFixed/sany.out +1 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/TwoPhaseFixed/verdict-1.out +47 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/TwoPhaseFixed/view.mjs +1 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/TypeGuard/ChartRun.exit +1 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/TypeGuard/ChartRun.out +75 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/TypeGuard/TypeGuard.cfg +5 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/TypeGuard/TypeGuard.tla +11 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/TypeGuard/chart.mmd +18 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/TypeGuard/graph.dot +14 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/TypeGuard/report.md +29 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/TypeGuard/sany.out +2 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/TypeGuard/verdict-1.exit +1 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/TypeGuard/verdict-1.out +64 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/TypeGuard/verdict-2.exit +1 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/TypeGuard/verdict-2.out +75 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/UserNoDeadlock/ChartRun.out +58 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/UserNoDeadlock/UserNoDeadlock.cfg +2 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/UserNoDeadlock/UserNoDeadlock.tla +8 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/UserNoDeadlock/chart.mmd +22 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/UserNoDeadlock/graph.dot +16 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/UserNoDeadlock/report.md +15 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/UserNoDeadlock/sany.out +2 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/UserNoDeadlock/verdict-1.exit +1 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/UserNoDeadlock/verdict-1.out +56 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/UserNoDeadlock/verdict-2.exit +1 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus/UserNoDeadlock/verdict-2.out +77 -0
- package/dist/pstack/skills/statechart/scripts/test/corpus.test.ts +403 -0
- package/dist/pstack/skills/statechart/scripts/test/differential.test.ts +565 -0
- package/dist/pstack/skills/statechart/scripts/test/grid/Grid.cfg +2 -0
- package/dist/pstack/skills/statechart/scripts/test/grid/Grid.tla +9 -0
- package/dist/pstack/skills/statechart/scripts/test/grid/sany.out +2 -0
- package/dist/pstack/skills/statechart/scripts/test/java.ts +63 -0
- package/dist/pstack/skills/statechart/scripts/test/labels.ts +643 -0
- package/dist/pstack/skills/statechart/scripts/test/messages.test.ts +212 -0
- package/dist/pstack/skills/statechart/scripts/test/pipeline.test.ts +270 -0
- package/dist/pstack/skills/statechart/scripts/test/plain-tlc.test.ts +255 -0
- package/dist/pstack/skills/statechart/scripts/test/render.test.ts +81 -0
- package/dist/pstack/skills/statechart/scripts/test/tlc-out.test.ts +90 -0
- package/dist/pstack/skills/statechart/scripts/test/tlc.ts +158 -0
- package/dist/pstack/skills/statechart/scripts/tsconfig.json +11 -0
- package/dist/pstack/skills/statechart/scripts/worker.ts +35 -0
- package/dist/readonly.d.mts +3 -0
- package/dist/readonly.mjs +9 -0
- package/dist/role-catalog.d.mts +11 -24
- package/dist/role-catalog.mjs +17 -32
- package/dist/role-config.d.mts +41 -0
- package/dist/role-config.mjs +112 -0
- package/dist/role-editor.d.mts +25 -0
- package/dist/role-editor.mjs +372 -0
- package/dist/role-file-CIVHnhBg.d.mts +53 -0
- package/dist/role-file.d.mts +2 -0
- package/dist/role-file.mjs +121 -0
- package/dist/{role-manifest-8OERX9-s.d.mts → role-manifest-D1npMjqZ.d.mts} +21 -10
- package/dist/role-manifest.d.mts +2 -0
- package/dist/{role-manifest-79cnFfDM.mjs → role-manifest.mjs} +20 -16
- package/dist/role-remote.d.mts +23 -0
- package/dist/role-remote.mjs +106 -0
- package/dist/{roles.d.mts → role-service.d.mts} +8 -4
- package/dist/role-service.mjs +43 -0
- package/dist/role-wire.d.mts +54 -0
- package/dist/role-wire.mjs +127 -0
- package/dist/route-7SqXDYrL.d.mts +36 -0
- package/dist/route.d.mts +2 -0
- package/dist/route.mjs +78 -0
- package/dist/skill.d.mts +9 -23
- package/dist/skill.mjs +28 -37
- package/dist/skills/authored/docs-drift/SKILL.md +4 -4
- package/dist/skills/authored/docs-drift/SKILL.zh.md +4 -4
- package/dist/skills/vendored/control-cli/SKILL.md +109 -0
- package/dist/skills/vendored/control-ui/SKILL.md +109 -0
- package/dist/skills/vendored/deslop/SKILL.md +22 -0
- package/dist/subagent.d.mts +60 -169
- package/dist/subagent.mjs +344 -587
- package/dist/wire-error-D_r-UW4w.d.mts +5 -0
- package/dist/wire-error.d.mts +2 -0
- package/dist/wire-error.mjs +9 -0
- package/locale/en.json +1 -1
- package/package.json +51 -35
- package/assets/pstack-config-entry.png +0 -0
- package/dist/client.mjs +0 -2482
- package/dist/client.mjs.map +0 -1
- package/dist/host-contract-CUPSpeNk.d.mts +0 -22
- package/dist/paths-yji9SNak.mjs +0 -47
- package/dist/pstack/skills/poteto-mode/scripts/expect.mjs +0 -254
- package/dist/pstack/skills/poteto-mode/scripts/support.mjs +0 -93
- package/dist/pstack/skills/poteto-mode/scripts/watch-pr/cli.mjs +0 -123
- package/dist/pstack/skills/poteto-mode/scripts/watch-pr/cli.test.mjs +0 -217
- package/dist/pstack/skills/poteto-mode/scripts/watch-pr/fakes.test-helper.mjs +0 -119
- package/dist/pstack/skills/poteto-mode/scripts/watch-pr/github.mjs +0 -626
- package/dist/pstack/skills/poteto-mode/scripts/watch-pr/github.test.mjs +0 -521
- package/dist/pstack/skills/poteto-mode/scripts/watch-pr/policy.mjs +0 -657
- package/dist/pstack/skills/poteto-mode/scripts/watch-pr/policy.test.mjs +0 -523
- package/dist/pstack/skills/poteto-mode/scripts/watch-pr/render.mjs +0 -106
- package/dist/pstack/skills/poteto-mode/scripts/watch-pr/types.mjs +0 -9
- package/dist/pstack/skills/poteto-mode/scripts/watch-pr/watch-pr.mjs +0 -5
- package/dist/pstack/skills/poteto-mode/scripts/worktree-audit.mjs +0 -668
- package/dist/pstack/skills/poteto-mode/scripts/worktree-audit.test.mjs +0 -134
- package/dist/pstack/skills/show-me-your-work/scripts/log.mjs +0 -106
- package/dist/pstack/skills/show-me-your-work/scripts/log.test.mjs +0 -56
- package/dist/pstack/skills/statechart/scripts/backends/cfg.mjs +0 -31
- package/dist/pstack/skills/statechart/scripts/backends/mermaid.mjs +0 -186
- package/dist/pstack/skills/statechart/scripts/backends/plain-text.mjs +0 -62
- package/dist/pstack/skills/statechart/scripts/backends/report.mjs +0 -84
- package/dist/pstack/skills/statechart/scripts/frontends/config.mjs +0 -268
- package/dist/pstack/skills/statechart/scripts/frontends/dot.mjs +0 -67
- package/dist/pstack/skills/statechart/scripts/frontends/marks.mjs +0 -94
- package/dist/pstack/skills/statechart/scripts/frontends/messages.mjs +0 -48
- package/dist/pstack/skills/statechart/scripts/frontends/spec.mjs +0 -101
- package/dist/pstack/skills/statechart/scripts/frontends/trace.mjs +0 -39
- package/dist/pstack/skills/statechart/scripts/frontends/value.mjs +0 -180
- package/dist/pstack/skills/statechart/scripts/frontends/verdict.mjs +0 -40
- package/dist/pstack/skills/statechart/scripts/frontends/view.mjs +0 -99
- package/dist/pstack/skills/statechart/scripts/ir.mjs +0 -277
- package/dist/pstack/skills/statechart/scripts/passes/annotate.mjs +0 -92
- package/dist/pstack/skills/statechart/scripts/passes/label.mjs +0 -210
- package/dist/pstack/skills/statechart/scripts/passes/lift.mjs +0 -84
- package/dist/pstack/skills/statechart/scripts/passes/loop-check.mjs +0 -47
- package/dist/pstack/skills/statechart/scripts/passes/paths.mjs +0 -72
- package/dist/pstack/skills/statechart/scripts/passes/reach.mjs +0 -135
- package/dist/pstack/skills/statechart/scripts/passes/region-check.mjs +0 -82
- package/dist/pstack/skills/statechart/scripts/passes/regions.mjs +0 -268
- package/dist/pstack/skills/statechart/scripts/pipeline.mjs +0 -72
- package/dist/pstack/skills/statechart/scripts/run.mjs +0 -440
- package/dist/pstack/skills/statechart/scripts/statechart.mjs +0 -155
- package/dist/pstack/skills/statechart/scripts/statechart.test.mjs +0 -198
- package/dist/pstack/skills/statechart/scripts/worker.mjs +0 -31
- package/dist/remote.d.mts +0 -27
- package/dist/remote.mjs +0 -235
- package/dist/role-config-a4JpVdc-.mjs +0 -379
- package/dist/role-wire-CAJsVA6e.d.mts +0 -54
- package/dist/roles.mjs +0 -293
- package/dist/script.d.mts +0 -91
- package/dist/script.mjs +0 -485
|
@@ -1,254 +0,0 @@
|
|
|
1
|
-
import { inspect } from "node:util";
|
|
2
|
-
// runtime/skills/poteto-mode/scripts/expect.ts
|
|
3
|
-
/**
|
|
4
|
-
* A small `expect` for `node:test`.
|
|
5
|
-
*
|
|
6
|
-
* The five upstream test files were written against `bun:test`. Their assertions
|
|
7
|
-
* are ordinary value comparisons, so this module supplies exactly the matchers
|
|
8
|
-
* they use rather than a general test framework. It is deliberately not a drop-in
|
|
9
|
-
* replacement: a matcher that is not listed here fails to compile, which keeps the
|
|
10
|
-
* port auditable against the calls that actually exist.
|
|
11
|
-
*
|
|
12
|
-
* Covered: `toBe`, `toEqual`, `toContain`, `toMatch`, `toThrow`, `toBeNull`,
|
|
13
|
-
* `toBeUndefined`, `toBeInstanceOf`, `toHaveLength`, `toEndWith`, `toMatchObject`,
|
|
14
|
-
* `.not` on each, and `rejects` / `resolves` for promises.
|
|
15
|
-
*
|
|
16
|
-
* Two differences from `bun:test`, stated so a failure is not misread:
|
|
17
|
-
*
|
|
18
|
-
* - `toEqual` is structural for arrays and plain objects, `Object.is` otherwise.
|
|
19
|
-
* A class instance only equals itself; `toBeInstanceOf` is the matcher for type
|
|
20
|
-
* identity. The ported tests compare plain data, which is why this is enough.
|
|
21
|
-
* - A failure throws `AssertionError` with the two values rendered, not Bun's
|
|
22
|
-
* coloured diff.
|
|
23
|
-
*/
|
|
24
|
-
/** Raised by every failing assertion. */
|
|
25
|
-
var AssertionError = class extends Error {
|
|
26
|
-
constructor(message) {
|
|
27
|
-
super(message);
|
|
28
|
-
this.name = "AssertionError";
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
function display(value) {
|
|
32
|
-
if (typeof value === "function") return `[Function ${value.name || "anonymous"}]`;
|
|
33
|
-
return inspect(value, {
|
|
34
|
-
depth: 3,
|
|
35
|
-
breakLength: 120,
|
|
36
|
-
maxArrayLength: 20
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
function messageOf(error) {
|
|
40
|
-
if (error instanceof Error) return `${error.name}: ${error.message}`;
|
|
41
|
-
return String(error);
|
|
42
|
-
}
|
|
43
|
-
/** Structural equality for the shapes the ported tests compare. */
|
|
44
|
-
function deepEqual(left, right) {
|
|
45
|
-
if (Object.is(left, right)) return true;
|
|
46
|
-
if (left instanceof Date || right instanceof Date) return left instanceof Date && right instanceof Date && left.getTime() === right.getTime();
|
|
47
|
-
if (Array.isArray(left) || Array.isArray(right)) {
|
|
48
|
-
if (!Array.isArray(left) || !Array.isArray(right) || left.length !== right.length) return false;
|
|
49
|
-
return left.every((item, index) => deepEqual(item, right[index]));
|
|
50
|
-
}
|
|
51
|
-
if (left === null || right === null || typeof left !== "object" || typeof right !== "object") return false;
|
|
52
|
-
const leftProto = Object.getPrototypeOf(left);
|
|
53
|
-
if (leftProto !== Object.getPrototypeOf(right)) return false;
|
|
54
|
-
if (leftProto !== Object.prototype && leftProto !== null) return false;
|
|
55
|
-
const leftKeys = Object.keys(left);
|
|
56
|
-
const rightKeys = Object.keys(right);
|
|
57
|
-
if (leftKeys.length !== rightKeys.length) return false;
|
|
58
|
-
return leftKeys.every((key) => deepEqual(left[key], right[key]));
|
|
59
|
-
}
|
|
60
|
-
function contains(haystack, needle) {
|
|
61
|
-
if (typeof haystack === "string") return haystack.includes(String(needle));
|
|
62
|
-
if (Array.isArray(haystack)) return haystack.some((item) => deepEqual(item, needle));
|
|
63
|
-
if (haystack instanceof Set) return [...haystack].some((item) => deepEqual(item, needle));
|
|
64
|
-
return false;
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* Whether `expected` is a partial description of `actual`.
|
|
68
|
-
*
|
|
69
|
-
* `bun:test`'s `toMatchObject` is recursive: every key in `expected` must exist and
|
|
70
|
-
* match, arrays match element by element with the same partial rule, and extra keys
|
|
71
|
-
* in `actual` are allowed. That is what lets an assertion name only the fields it
|
|
72
|
-
* cares about, which several ported cases rely on.
|
|
73
|
-
*/
|
|
74
|
-
function matchesObject(actual, expected) {
|
|
75
|
-
if (Array.isArray(expected)) {
|
|
76
|
-
if (!Array.isArray(actual) || actual.length !== expected.length) return false;
|
|
77
|
-
return expected.every((item, index) => matchesObject(actual[index], item));
|
|
78
|
-
}
|
|
79
|
-
if (expected instanceof Date) return deepEqual(actual, expected);
|
|
80
|
-
if (expected === null || typeof expected !== "object") return deepEqual(actual, expected);
|
|
81
|
-
if (actual === null || typeof actual !== "object") return false;
|
|
82
|
-
return Object.entries(expected).every(([key, value]) => matchesObject(actual[key], value));
|
|
83
|
-
}
|
|
84
|
-
function thrownBy(call) {
|
|
85
|
-
try {
|
|
86
|
-
call();
|
|
87
|
-
return { thrown: false };
|
|
88
|
-
} catch (error) {
|
|
89
|
-
return {
|
|
90
|
-
thrown: true,
|
|
91
|
-
error
|
|
92
|
-
};
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
function buildMatchers(actual, negate) {
|
|
96
|
-
/**
|
|
97
|
-
* Fail when `ok` is not what the matcher asked for.
|
|
98
|
-
*
|
|
99
|
-
* `negate` inverts the requirement, so `.not.toContain(x)` passes on a haystack
|
|
100
|
-
* that does not contain `x` and fails when it does.
|
|
101
|
-
*/
|
|
102
|
-
const check = (ok, matcher, expected) => {
|
|
103
|
-
if (ok === !negate) return;
|
|
104
|
-
const relation = negate ? `not to ${matcher}` : matcher;
|
|
105
|
-
throw new AssertionError(`expected ${display(actual)} ${relation} ${display(expected)}`);
|
|
106
|
-
};
|
|
107
|
-
const checkPlain = (ok, matcher) => {
|
|
108
|
-
if (ok === !negate) return;
|
|
109
|
-
throw new AssertionError(`expected ${display(actual)} ${negate ? `not to ${matcher}` : matcher}`);
|
|
110
|
-
};
|
|
111
|
-
const matchers = {
|
|
112
|
-
toBe(expected) {
|
|
113
|
-
check(Object.is(actual, expected), "toBe", expected);
|
|
114
|
-
},
|
|
115
|
-
toEqual(expected) {
|
|
116
|
-
check(deepEqual(actual, expected), "toEqual", expected);
|
|
117
|
-
},
|
|
118
|
-
toContain(expected) {
|
|
119
|
-
check(contains(actual, expected), "toContain", expected);
|
|
120
|
-
},
|
|
121
|
-
toMatch(expected) {
|
|
122
|
-
const text = String(actual);
|
|
123
|
-
check(typeof expected === "string" ? text.includes(expected) : expected.test(text), "toMatch", expected);
|
|
124
|
-
},
|
|
125
|
-
toThrow(expected) {
|
|
126
|
-
if (typeof actual !== "function") throw new AssertionError(`toThrow needs a function, received ${display(actual)}`);
|
|
127
|
-
const result = thrownBy(actual);
|
|
128
|
-
if (!result.thrown) {
|
|
129
|
-
checkPlain(false, "toThrow");
|
|
130
|
-
return;
|
|
131
|
-
}
|
|
132
|
-
if (expected === void 0) {
|
|
133
|
-
checkPlain(true, "toThrow");
|
|
134
|
-
return;
|
|
135
|
-
}
|
|
136
|
-
const message = messageOf(result.error);
|
|
137
|
-
const ok = typeof expected === "string" ? message.includes(expected) : expected instanceof RegExp ? expected.test(message) : result.error instanceof expected;
|
|
138
|
-
check(ok, "toThrow", expected);
|
|
139
|
-
},
|
|
140
|
-
toBeNull() {
|
|
141
|
-
checkPlain(actual === null, "toBeNull");
|
|
142
|
-
},
|
|
143
|
-
toBeUndefined() {
|
|
144
|
-
checkPlain(actual === void 0, "toBeUndefined");
|
|
145
|
-
},
|
|
146
|
-
toBeInstanceOf(expected) {
|
|
147
|
-
check(actual instanceof expected, "toBeInstanceOf", expected);
|
|
148
|
-
},
|
|
149
|
-
toHaveLength(expected) {
|
|
150
|
-
const length = actual?.length;
|
|
151
|
-
check(length === expected, "toHaveLength", expected);
|
|
152
|
-
},
|
|
153
|
-
toEndWith(expected) {
|
|
154
|
-
check(String(actual).endsWith(expected), "toEndWith", expected);
|
|
155
|
-
},
|
|
156
|
-
toMatchObject(expected) {
|
|
157
|
-
check(matchesObject(actual, expected), "toMatchObject", expected);
|
|
158
|
-
}
|
|
159
|
-
};
|
|
160
|
-
Object.defineProperties(matchers, {
|
|
161
|
-
not: {
|
|
162
|
-
get: () => buildMatchers(actual, !negate),
|
|
163
|
-
enumerable: true
|
|
164
|
-
},
|
|
165
|
-
rejects: {
|
|
166
|
-
get: () => buildAsyncMatchers(actual, "rejects", negate),
|
|
167
|
-
enumerable: true
|
|
168
|
-
},
|
|
169
|
-
resolves: {
|
|
170
|
-
get: () => buildAsyncMatchers(actual, "resolves", negate),
|
|
171
|
-
enumerable: true
|
|
172
|
-
}
|
|
173
|
-
});
|
|
174
|
-
return matchers;
|
|
175
|
-
}
|
|
176
|
-
/**
|
|
177
|
-
* Compare against a settled promise.
|
|
178
|
-
*
|
|
179
|
-
* `rejects` reads the rejection reason and fails when the promise resolved;
|
|
180
|
-
* `resolves` is the mirror. Each matcher awaits the settlement, which is what
|
|
181
|
-
* makes `await expect(promise).rejects.toThrow(...)` wait before it compares.
|
|
182
|
-
*/
|
|
183
|
-
function buildAsyncMatchers(actual, mode, negate) {
|
|
184
|
-
if (typeof actual?.then !== "function") throw new AssertionError(`expected a promise, received ${display(actual)}`);
|
|
185
|
-
const wantRejection = mode === "rejects" !== negate;
|
|
186
|
-
const settle = async () => {
|
|
187
|
-
let resolved;
|
|
188
|
-
let rejected;
|
|
189
|
-
await Promise.resolve(actual).then((value) => {
|
|
190
|
-
resolved = { value };
|
|
191
|
-
}, (error) => {
|
|
192
|
-
rejected = { error };
|
|
193
|
-
});
|
|
194
|
-
if (wantRejection) {
|
|
195
|
-
if (resolved !== void 0) throw new AssertionError(`expected the promise to reject, it resolved to ${display(resolved.value)}`);
|
|
196
|
-
return rejected?.error;
|
|
197
|
-
}
|
|
198
|
-
if (rejected !== void 0) throw new AssertionError(`expected the promise to resolve, it rejected with ${messageOf(rejected.error)}`);
|
|
199
|
-
return resolved?.value;
|
|
200
|
-
};
|
|
201
|
-
/**
|
|
202
|
-
* Run one matcher against the settled value.
|
|
203
|
-
*
|
|
204
|
-
* `toThrow` and `toBeInstanceOf` both read the rejection reason, so a thrown
|
|
205
|
-
* reason is turned back into a thunk for `toThrow` rather than special-cased
|
|
206
|
-
* twice. `negate` is already folded into the settlement mode, so the inner
|
|
207
|
-
* matchers run un-negated.
|
|
208
|
-
*/
|
|
209
|
-
const wrap = async (name, expected) => {
|
|
210
|
-
const subject = await settle();
|
|
211
|
-
if (name === "toThrow") {
|
|
212
|
-
buildMatchers(() => {
|
|
213
|
-
throw subject;
|
|
214
|
-
}, false).toThrow(expected);
|
|
215
|
-
return;
|
|
216
|
-
}
|
|
217
|
-
if (name === "toBeNull") {
|
|
218
|
-
buildMatchers(subject, false).toBeNull();
|
|
219
|
-
return;
|
|
220
|
-
}
|
|
221
|
-
if (name === "toBeUndefined") {
|
|
222
|
-
buildMatchers(subject, false).toBeUndefined();
|
|
223
|
-
return;
|
|
224
|
-
}
|
|
225
|
-
const matchers = buildMatchers(subject, false);
|
|
226
|
-
const matcher = matchers[name];
|
|
227
|
-
if (typeof matcher !== "function") throw new AssertionError(`unknown matcher ${name}`);
|
|
228
|
-
matcher.call(matchers, expected);
|
|
229
|
-
};
|
|
230
|
-
const matchers = {
|
|
231
|
-
toBe: (expected) => wrap("toBe", expected),
|
|
232
|
-
toEqual: (expected) => wrap("toEqual", expected),
|
|
233
|
-
toContain: (expected) => wrap("toContain", expected),
|
|
234
|
-
toMatch: (expected) => wrap("toMatch", expected),
|
|
235
|
-
toThrow: (expected) => wrap("toThrow", expected),
|
|
236
|
-
toBeNull: () => wrap("toBeNull"),
|
|
237
|
-
toBeUndefined: () => wrap("toBeUndefined"),
|
|
238
|
-
toBeInstanceOf: (expected) => wrap("toBeInstanceOf", expected),
|
|
239
|
-
toHaveLength: (expected) => wrap("toHaveLength", expected),
|
|
240
|
-
toEndWith: (expected) => wrap("toEndWith", expected),
|
|
241
|
-
toMatchObject: (expected) => wrap("toMatchObject", expected)
|
|
242
|
-
};
|
|
243
|
-
Object.defineProperty(matchers, "not", {
|
|
244
|
-
get: () => buildAsyncMatchers(actual, mode, !negate),
|
|
245
|
-
enumerable: true
|
|
246
|
-
});
|
|
247
|
-
return matchers;
|
|
248
|
-
}
|
|
249
|
-
const expect = Object.assign((actual) => buildMatchers(actual, false), {
|
|
250
|
-
not: (actual) => buildMatchers(actual, true),
|
|
251
|
-
rejects: (actual) => buildAsyncMatchers(actual, "rejects", false),
|
|
252
|
-
resolves: (actual) => buildAsyncMatchers(actual, "resolves", false)
|
|
253
|
-
});
|
|
254
|
-
export { AssertionError, deepEqual, expect };
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import { expect } from "./expect.mjs";
|
|
2
|
-
import { spawn as spawn$1, spawnSync as spawnSync$1 } from "node:child_process";
|
|
3
|
-
// runtime/skills/poteto-mode/scripts/support.ts
|
|
4
|
-
/**
|
|
5
|
-
* The one support module the ported upstream tests import.
|
|
6
|
-
*
|
|
7
|
-
* The five upstream test files were written for `bun:test` and use exactly two
|
|
8
|
-
* Bun facilities: its `expect`, and `Bun.spawnSync` / `Bun.spawn` for running git
|
|
9
|
-
* and short-lived processes. Rather than rewrite every call site, this module
|
|
10
|
-
* supplies those two shapes and the test patch only replaces the import line. The
|
|
11
|
-
* bodies below stay byte-for-byte the upstream text, so a future upstream change
|
|
12
|
-
* is still readable against this tree.
|
|
13
|
-
*
|
|
14
|
-
* `Bun.spawnSync` returns `{ exitCode, stdout, stderr, success }` with Buffer
|
|
15
|
-
* output and never throws on a nonzero exit; `node:child_process.spawnSync`
|
|
16
|
-
* returns `{ status, stdout, stderr }`. The adapter is the mapping between them,
|
|
17
|
-
* not a second implementation.
|
|
18
|
-
*
|
|
19
|
-
* `Bun.spawn` returns `{ pid, exited: Promise<number> }`. The adapter runs the
|
|
20
|
-
* child to completion and resolves `exited` with the exit status, which is what
|
|
21
|
-
* the one call site awaits.
|
|
22
|
-
*/
|
|
23
|
-
/**
|
|
24
|
-
* Run a command to completion, Bun-shaped.
|
|
25
|
-
*
|
|
26
|
-
* A signal-terminated child reports `exitCode: 1` rather than `null`, so a test
|
|
27
|
-
* that formats the code never prints `undefined` for a killed process.
|
|
28
|
-
*/
|
|
29
|
-
function spawnSync(argv, options = {}) {
|
|
30
|
-
const [command, ...args] = argv;
|
|
31
|
-
if (command === void 0) throw new TypeError("spawnSync needs a command");
|
|
32
|
-
const result = spawnSync$1(command, args, {
|
|
33
|
-
cwd: options.cwd,
|
|
34
|
-
env: options.env,
|
|
35
|
-
stdio: [
|
|
36
|
-
options.stdin === "inherit" ? "inherit" : "pipe",
|
|
37
|
-
options.stdout === "inherit" ? "inherit" : "pipe",
|
|
38
|
-
options.stderr === "inherit" ? "inherit" : "pipe"
|
|
39
|
-
],
|
|
40
|
-
encoding: "buffer"
|
|
41
|
-
});
|
|
42
|
-
const exitCode = result.status ?? 1;
|
|
43
|
-
return {
|
|
44
|
-
exitCode,
|
|
45
|
-
stdout: Buffer.isBuffer(result.stdout) ? result.stdout : Buffer.alloc(0),
|
|
46
|
-
stderr: Buffer.isBuffer(result.stderr) ? result.stderr : Buffer.alloc(0),
|
|
47
|
-
success: exitCode === 0
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* A child that exits immediately, as a real process.
|
|
52
|
-
*
|
|
53
|
-
* The current interpreter running an empty program is a process like any other: its
|
|
54
|
-
* `pid` is real and its exit status is 0.
|
|
55
|
-
*/
|
|
56
|
-
function immediateExit() {
|
|
57
|
-
return spawn$1(process.execPath, ["-e", ""], { stdio: "ignore" });
|
|
58
|
-
}
|
|
59
|
-
/** Whether `command` starts at all, checked without a shell. */
|
|
60
|
-
function resolves(command) {
|
|
61
|
-
return spawnSync$1(command, ["--version"], { stdio: "ignore" }).error === void 0;
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* Start a command and expose Bun's `{ pid, exited }` shape.
|
|
65
|
-
*
|
|
66
|
-
* The one upstream call is `spawn(["true"])`, used to obtain a pid that has already
|
|
67
|
-
* exited so the test can plant a stale lock. It reads `pid` *before* awaiting
|
|
68
|
-
* `exited`, so the pid must be real and already dead when this returns.
|
|
69
|
-
*
|
|
70
|
-
* That rules out "spawn it and fall back on failure": the failure is asynchronous, so
|
|
71
|
-
* the caller would read `-1`. The probe is synchronous instead, which lets this
|
|
72
|
-
* function choose the right child before returning. `true` is used when it exists and
|
|
73
|
-
* the current interpreter otherwise — a `PATH` without the usual Unix utilities is
|
|
74
|
-
* exactly the environment this release has to work in.
|
|
75
|
-
*/
|
|
76
|
-
function spawn(argv) {
|
|
77
|
-
const [command, ...args] = argv;
|
|
78
|
-
if (command === void 0) throw new TypeError("spawn needs a command");
|
|
79
|
-
const child = resolves(command) ? spawn$1(command, args, { stdio: "ignore" }) : immediateExit();
|
|
80
|
-
return {
|
|
81
|
-
pid: child.pid ?? -1,
|
|
82
|
-
exited: new Promise((resolve) => {
|
|
83
|
-
child.once("close", (code) => resolve(code ?? 1));
|
|
84
|
-
child.once("error", () => resolve(1));
|
|
85
|
-
})
|
|
86
|
-
};
|
|
87
|
-
}
|
|
88
|
-
/** The `Bun` global the upstream tests reference, limited to what they call. */
|
|
89
|
-
const Bun = {
|
|
90
|
-
spawnSync,
|
|
91
|
-
spawn
|
|
92
|
-
};
|
|
93
|
-
export { Bun, expect, spawn, spawnSync };
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
import { nonEmpty, parsePrNumber } from "./types.mjs";
|
|
2
|
-
import { GhGitHubReader, WatcherQueryError, discoverStack, resolveContext } from "./github.mjs";
|
|
3
|
-
import { runQueued, runSimple, statusQueryVerdict, verdictFactory } from "./policy.mjs";
|
|
4
|
-
import { renderJson, renderPretty } from "./render.mjs";
|
|
5
|
-
import { setTimeout } from "node:timers/promises";
|
|
6
|
-
import { Command, CommanderError, InvalidArgumentError, Option } from "commander";
|
|
7
|
-
// runtime/skills/poteto-mode/scripts/watch-pr/cli.ts
|
|
8
|
-
function positiveNumber(value) {
|
|
9
|
-
const parsed = Number(value);
|
|
10
|
-
if (!Number.isFinite(parsed) || parsed <= 0) throw new InvalidArgumentError("must be greater than zero");
|
|
11
|
-
return parsed;
|
|
12
|
-
}
|
|
13
|
-
function nonNegativeNumber(value) {
|
|
14
|
-
const parsed = Number(value);
|
|
15
|
-
if (!Number.isFinite(parsed) || parsed < 0) throw new InvalidArgumentError("must be zero or greater");
|
|
16
|
-
return parsed;
|
|
17
|
-
}
|
|
18
|
-
function positiveInteger(value) {
|
|
19
|
-
const parsed = Number(value);
|
|
20
|
-
if (!Number.isInteger(parsed) || parsed <= 0) throw new InvalidArgumentError("must be a positive integer");
|
|
21
|
-
return parsed;
|
|
22
|
-
}
|
|
23
|
-
function prNumber(value) {
|
|
24
|
-
try {
|
|
25
|
-
return parsePrNumber(Number(value.replace(/^#/, "")));
|
|
26
|
-
} catch {
|
|
27
|
-
throw new InvalidArgumentError("must be a positive integer");
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
function stackPrList(value) {
|
|
31
|
-
const numbers = value.split(",").map((part) => prNumber(part.trim()));
|
|
32
|
-
if (new Set(numbers).size !== numbers.length) throw new InvalidArgumentError("contains a duplicate PR");
|
|
33
|
-
const parsed = nonEmpty(numbers);
|
|
34
|
-
if (parsed === null) throw new InvalidArgumentError("cannot be empty");
|
|
35
|
-
return parsed;
|
|
36
|
-
}
|
|
37
|
-
function parseArgs(argv, io) {
|
|
38
|
-
const program = new Command("watch-pr").description("Watch one pull request, a connected stack, or an immutable queued stack.\nJSON (NDJSON while polling) is the default; --pretty renders human text.").configureOutput({
|
|
39
|
-
writeOut: io.stdout,
|
|
40
|
-
writeErr: io.stderr
|
|
41
|
-
}).exitOverride().option("--owner <owner>", "GitHub repository owner").option("--repo <repo>", "GitHub repository name").option("--pr <number>", "pull request number", prNumber).addOption(new Option("--stack", "watch the connected open stack").default(false).conflicts("queuedStack")).option("--queued-stack", "watch the captured stack until all PRs merge", false).option("--stack-prs <n,...>", "frozen bottom-to-top queue (queued mode only)", stackPrList).option("--interval <seconds>", "poll interval", positiveNumber, 60).option("--sweep-interval <seconds>", "whole-stack sweep interval", positiveNumber, 300).option("--timeout <seconds>", "deadline; 0 disables it", nonNegativeNumber, 0).option("--max-query-errors <count>", "consecutive query-error budget", positiveInteger, 5).option("--status-only", "print one status table and exit 0", false).option("--allow-draft", "do not treat a draft as a merge gate", false).option("--pretty", "render human text instead of JSON", false);
|
|
42
|
-
program.parse(argv, { from: "user" });
|
|
43
|
-
const raw = program.opts();
|
|
44
|
-
if (raw.stackPrs !== void 0 && !raw.queuedStack) program.error("error: --stack-prs requires --queued-stack");
|
|
45
|
-
return {
|
|
46
|
-
owner: raw.owner ?? null,
|
|
47
|
-
repo: raw.repo ?? null,
|
|
48
|
-
pr: raw.pr ?? null,
|
|
49
|
-
mode: raw.queuedStack ? "queued-stack" : raw.stack ? "stack" : "single",
|
|
50
|
-
stackPrs: raw.stackPrs ?? [],
|
|
51
|
-
statusOnly: raw.statusOnly,
|
|
52
|
-
pretty: raw.pretty,
|
|
53
|
-
polling: {
|
|
54
|
-
interval: raw.interval,
|
|
55
|
-
sweepInterval: raw.sweepInterval,
|
|
56
|
-
timeout: raw.timeout,
|
|
57
|
-
maxQueryErrors: raw.maxQueryErrors,
|
|
58
|
-
allowDraft: raw.allowDraft
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
function realRuntime() {
|
|
63
|
-
return {
|
|
64
|
-
reader: new GhGitHubReader(),
|
|
65
|
-
clock: {
|
|
66
|
-
now: () => performance.now() / 1e3,
|
|
67
|
-
observedAt: () => (/* @__PURE__ */ new Date()).toISOString(),
|
|
68
|
-
sleep: async (seconds) => {
|
|
69
|
-
await setTimeout(seconds * 1e3);
|
|
70
|
-
}
|
|
71
|
-
},
|
|
72
|
-
stdout: (value) => process.stdout.write(value),
|
|
73
|
-
stderr: (value) => process.stderr.write(value)
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
async function main(argv, runtime = realRuntime()) {
|
|
77
|
-
let options;
|
|
78
|
-
try {
|
|
79
|
-
options = parseArgs(argv, runtime);
|
|
80
|
-
} catch (error) {
|
|
81
|
-
if (!(error instanceof CommanderError)) throw error;
|
|
82
|
-
return error.exitCode === 0 ? 0 : 64;
|
|
83
|
-
}
|
|
84
|
-
const render = options.pretty ? renderPretty : renderJson;
|
|
85
|
-
const emit = (verdict) => runtime.stdout(render(verdict));
|
|
86
|
-
let contexts;
|
|
87
|
-
try {
|
|
88
|
-
const seed = await resolveContext({
|
|
89
|
-
reader: runtime.reader,
|
|
90
|
-
owner: options.owner,
|
|
91
|
-
repo: options.repo,
|
|
92
|
-
pr: options.pr ?? options.stackPrs[0] ?? null
|
|
93
|
-
});
|
|
94
|
-
contexts = nonEmpty(options.stackPrs.map((number) => ({
|
|
95
|
-
...seed,
|
|
96
|
-
number
|
|
97
|
-
}))) ?? (options.mode === "single" ? [seed] : await discoverStack(runtime.reader, seed));
|
|
98
|
-
} catch (error) {
|
|
99
|
-
if (!(error instanceof WatcherQueryError)) throw error;
|
|
100
|
-
const verdict = statusQueryVerdict(verdictFactory(runtime.clock, options.mode), 1, error.failure);
|
|
101
|
-
runtime.stdout(render(verdict));
|
|
102
|
-
return verdict.exitCode;
|
|
103
|
-
}
|
|
104
|
-
const dependencies = {
|
|
105
|
-
reader: runtime.reader,
|
|
106
|
-
clock: runtime.clock,
|
|
107
|
-
emit
|
|
108
|
-
};
|
|
109
|
-
const verdict = options.mode === "queued-stack" && !options.statusOnly ? await runQueued({
|
|
110
|
-
dependencies,
|
|
111
|
-
contexts,
|
|
112
|
-
options: options.polling
|
|
113
|
-
}) : await runSimple({
|
|
114
|
-
dependencies,
|
|
115
|
-
contexts,
|
|
116
|
-
mode: options.mode,
|
|
117
|
-
statusOnly: options.statusOnly,
|
|
118
|
-
options: options.polling
|
|
119
|
-
});
|
|
120
|
-
runtime.stdout(render(verdict));
|
|
121
|
-
return verdict.exitCode;
|
|
122
|
-
}
|
|
123
|
-
export { main, parseArgs };
|
|
@@ -1,217 +0,0 @@
|
|
|
1
|
-
import { expect } from "../expect.mjs";
|
|
2
|
-
import "../support.mjs";
|
|
3
|
-
import { parsePrNumber } from "./types.mjs";
|
|
4
|
-
import { renderJson, renderPretty } from "./render.mjs";
|
|
5
|
-
import { main, parseArgs } from "./cli.mjs";
|
|
6
|
-
import { fakeReader, passingCheck } from "./fakes.test-helper.mjs";
|
|
7
|
-
import { describe, it } from "node:test";
|
|
8
|
-
// runtime/skills/poteto-mode/scripts/watch-pr/cli.test.ts
|
|
9
|
-
const silentIo = {
|
|
10
|
-
stdout: () => {},
|
|
11
|
-
stderr: () => {}
|
|
12
|
-
};
|
|
13
|
-
function testRuntime(reader) {
|
|
14
|
-
const stdout = [];
|
|
15
|
-
const stderr = [];
|
|
16
|
-
return {
|
|
17
|
-
stdout,
|
|
18
|
-
stderr,
|
|
19
|
-
runtime: {
|
|
20
|
-
reader,
|
|
21
|
-
clock: {
|
|
22
|
-
now: () => 0,
|
|
23
|
-
observedAt: () => "2026-07-26T00:00:00.000Z",
|
|
24
|
-
async sleep() {
|
|
25
|
-
throw new Error("test unexpectedly slept");
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
stdout: (value) => stdout.push(value),
|
|
29
|
-
stderr: (value) => stderr.push(value)
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
describe("parseArgs", () => {
|
|
34
|
-
it("uses the specified defaults", () => {
|
|
35
|
-
expect(parseArgs([], silentIo)).toMatchObject({
|
|
36
|
-
owner: null,
|
|
37
|
-
repo: null,
|
|
38
|
-
pr: null,
|
|
39
|
-
mode: "single",
|
|
40
|
-
stackPrs: [],
|
|
41
|
-
statusOnly: false,
|
|
42
|
-
pretty: false,
|
|
43
|
-
polling: {
|
|
44
|
-
interval: 60,
|
|
45
|
-
sweepInterval: 300,
|
|
46
|
-
timeout: 0,
|
|
47
|
-
maxQueryErrors: 5,
|
|
48
|
-
allowDraft: false
|
|
49
|
-
}
|
|
50
|
-
});
|
|
51
|
-
});
|
|
52
|
-
it("parses a frozen queued stack bottom-to-top", () => {
|
|
53
|
-
const parsed = parseArgs([
|
|
54
|
-
"--queued-stack",
|
|
55
|
-
"--stack-prs",
|
|
56
|
-
"#10, 11,#12",
|
|
57
|
-
"--interval",
|
|
58
|
-
"2.5",
|
|
59
|
-
"--sweep-interval",
|
|
60
|
-
"30",
|
|
61
|
-
"--timeout",
|
|
62
|
-
"0",
|
|
63
|
-
"--max-query-errors",
|
|
64
|
-
"3",
|
|
65
|
-
"--allow-draft",
|
|
66
|
-
"--pretty"
|
|
67
|
-
], silentIo);
|
|
68
|
-
expect(parsed.mode).toBe("queued-stack");
|
|
69
|
-
expect(parsed.stackPrs.map(Number)).toEqual([
|
|
70
|
-
10,
|
|
71
|
-
11,
|
|
72
|
-
12
|
|
73
|
-
]);
|
|
74
|
-
expect(parsed.polling).toEqual({
|
|
75
|
-
interval: 2.5,
|
|
76
|
-
sweepInterval: 30,
|
|
77
|
-
timeout: 0,
|
|
78
|
-
maxQueryErrors: 3,
|
|
79
|
-
allowDraft: true
|
|
80
|
-
});
|
|
81
|
-
expect(parsed.pretty).toBe(true);
|
|
82
|
-
});
|
|
83
|
-
it("rejects every invalid mode and numeric shape as usage", async () => {
|
|
84
|
-
for (const argv of [
|
|
85
|
-
["--unknown"],
|
|
86
|
-
["--interval", "0"],
|
|
87
|
-
["--sweep-interval", "-1"],
|
|
88
|
-
["--timeout", "-1"],
|
|
89
|
-
["--max-query-errors", "1.5"],
|
|
90
|
-
["--stack", "--queued-stack"],
|
|
91
|
-
["--stack-prs", "1,2"],
|
|
92
|
-
[
|
|
93
|
-
"--queued-stack",
|
|
94
|
-
"--stack-prs",
|
|
95
|
-
"1,1"
|
|
96
|
-
]
|
|
97
|
-
]) {
|
|
98
|
-
const harness = testRuntime(fakeReader());
|
|
99
|
-
expect(await main(argv, harness.runtime)).toBe(64);
|
|
100
|
-
expect(harness.stdout).toEqual([]);
|
|
101
|
-
expect(harness.stderr.join("")).toContain("error:");
|
|
102
|
-
}
|
|
103
|
-
});
|
|
104
|
-
});
|
|
105
|
-
describe("rendering", () => {
|
|
106
|
-
const context = {
|
|
107
|
-
owner: "owner",
|
|
108
|
-
repo: "repo",
|
|
109
|
-
number: parsePrNumber(1)
|
|
110
|
-
};
|
|
111
|
-
const status = {
|
|
112
|
-
schemaVersion: 1,
|
|
113
|
-
sequence: 1,
|
|
114
|
-
observedAt: "2026-07-26T00:00:00.000Z",
|
|
115
|
-
mode: "single",
|
|
116
|
-
kind: "STATUS",
|
|
117
|
-
terminal: true,
|
|
118
|
-
exitCode: 0,
|
|
119
|
-
reason: "status-only",
|
|
120
|
-
rows: [{
|
|
121
|
-
kind: "merged",
|
|
122
|
-
context,
|
|
123
|
-
facts: {
|
|
124
|
-
context,
|
|
125
|
-
mergeable: "MERGEABLE",
|
|
126
|
-
mergeStateStatus: "CLEAN",
|
|
127
|
-
reviewDecision: "APPROVED",
|
|
128
|
-
headRefOid: "head",
|
|
129
|
-
headRefName: "feature",
|
|
130
|
-
baseRefName: "main",
|
|
131
|
-
state: "MERGED",
|
|
132
|
-
mergedAt: "now",
|
|
133
|
-
isDraft: false
|
|
134
|
-
}
|
|
135
|
-
}]
|
|
136
|
-
};
|
|
137
|
-
it("emits compact valid JSON by default", () => {
|
|
138
|
-
const rendered = renderJson(status);
|
|
139
|
-
expect(rendered.endsWith("\n")).toBe(true);
|
|
140
|
-
expect(JSON.parse(rendered)).toEqual(status);
|
|
141
|
-
});
|
|
142
|
-
it("renders the Markdown table from the same verdict only", () => {
|
|
143
|
-
const rendered = renderPretty(status);
|
|
144
|
-
expect(rendered).toContain("| PR | CI | Review | Merge |");
|
|
145
|
-
expect(rendered).toContain("| [#1](https://github.com/owner/repo/pull/1) | — | — | ✅ merged |");
|
|
146
|
-
});
|
|
147
|
-
});
|
|
148
|
-
describe("main", () => {
|
|
149
|
-
it("returns EX_USAGE 64 and writes usage errors only to stderr", async () => {
|
|
150
|
-
const harness = testRuntime(fakeReader());
|
|
151
|
-
expect(await main(["--interval", "0"], harness.runtime)).toBe(64);
|
|
152
|
-
expect(harness.stdout).toEqual([]);
|
|
153
|
-
expect(harness.stderr.join("")).toContain("option '--interval <seconds>' argument '0' is invalid");
|
|
154
|
-
});
|
|
155
|
-
it("bypasses the queue machine for queued-stack status-only", async () => {
|
|
156
|
-
const harness = testRuntime(fakeReader());
|
|
157
|
-
const code = await main([
|
|
158
|
-
"--owner",
|
|
159
|
-
"owner",
|
|
160
|
-
"--repo",
|
|
161
|
-
"repo",
|
|
162
|
-
"--queued-stack",
|
|
163
|
-
"--stack-prs",
|
|
164
|
-
"1",
|
|
165
|
-
"--status-only"
|
|
166
|
-
], harness.runtime);
|
|
167
|
-
expect(code).toBe(0);
|
|
168
|
-
expect(harness.stdout).toHaveLength(1);
|
|
169
|
-
const verdict = JSON.parse(harness.stdout[0]);
|
|
170
|
-
expect(verdict).toMatchObject({
|
|
171
|
-
kind: "STATUS",
|
|
172
|
-
terminal: true,
|
|
173
|
-
exitCode: 0,
|
|
174
|
-
mode: "queued-stack"
|
|
175
|
-
});
|
|
176
|
-
expect(harness.stdout[0]).not.toContain("\"kind\":\"QUEUE\"");
|
|
177
|
-
});
|
|
178
|
-
it("returns exit 4 for a hidden GitHub-side CI refusal", async () => {
|
|
179
|
-
const harness = testRuntime(fakeReader({
|
|
180
|
-
facts: { mergeStateStatus: "BLOCKED" },
|
|
181
|
-
fastPath: {
|
|
182
|
-
kind: "checks",
|
|
183
|
-
checks: [passingCheck()]
|
|
184
|
-
},
|
|
185
|
-
commitRollups: [{
|
|
186
|
-
oid: "head",
|
|
187
|
-
state: "FAILURE"
|
|
188
|
-
}]
|
|
189
|
-
}));
|
|
190
|
-
const code = await main([
|
|
191
|
-
"--owner",
|
|
192
|
-
"owner",
|
|
193
|
-
"--repo",
|
|
194
|
-
"repo",
|
|
195
|
-
"--pr",
|
|
196
|
-
"1"
|
|
197
|
-
], harness.runtime);
|
|
198
|
-
expect(code).toBe(4);
|
|
199
|
-
expect(harness.stdout).toHaveLength(1);
|
|
200
|
-
expect(JSON.parse(harness.stdout[0])).toMatchObject({
|
|
201
|
-
kind: "BLOCKER",
|
|
202
|
-
exitCode: 4,
|
|
203
|
-
blocker: {
|
|
204
|
-
kind: "failing-checks",
|
|
205
|
-
ci: { kind: "ci-github-rejected" }
|
|
206
|
-
}
|
|
207
|
-
});
|
|
208
|
-
});
|
|
209
|
-
it("shows help without touching the reader", async () => {
|
|
210
|
-
const reader = fakeReader();
|
|
211
|
-
const harness = testRuntime(reader);
|
|
212
|
-
expect(await main(["--help"], harness.runtime)).toBe(0);
|
|
213
|
-
expect(harness.stdout.join("")).toContain("JSON (NDJSON while polling)");
|
|
214
|
-
expect(reader.calls).toEqual([]);
|
|
215
|
-
});
|
|
216
|
-
});
|
|
217
|
-
export {};
|