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,180 +0,0 @@
|
|
|
1
|
-
// runtime/skills/statechart/scripts/frontends/value.ts
|
|
2
|
-
const BRACKET = /* @__PURE__ */ new Int8Array(128);
|
|
3
|
-
for (const c of "<{[(") BRACKET[c.charCodeAt(0)] = 1;
|
|
4
|
-
for (const c of ">}])") BRACKET[c.charCodeAt(0)] = -1;
|
|
5
|
-
const PUNCT = /* @__PURE__ */ new Map([
|
|
6
|
-
[60, "<<"],
|
|
7
|
-
[62, ">>"],
|
|
8
|
-
[124, "|->"],
|
|
9
|
-
[58, ":>"],
|
|
10
|
-
[64, "@@"],
|
|
11
|
-
[46, ".."]
|
|
12
|
-
]);
|
|
13
|
-
const SPACE = /\s/;
|
|
14
|
-
const isSpace = (c) => c === 32 || c >= 9 && c <= 13 || c > 127 && SPACE.test(String.fromCharCode(c));
|
|
15
|
-
const isDigit = (c) => c >= 48 && c <= 57;
|
|
16
|
-
const isWord = (c) => isDigit(c) || c >= 65 && c <= 90 || c >= 97 && c <= 122 || c === 95;
|
|
17
|
-
const isLineEnd = (c) => c === 10 || c === 13 || c === 8232 || c === 8233;
|
|
18
|
-
const tokenEnd = (s, i) => {
|
|
19
|
-
const c = s.charCodeAt(i);
|
|
20
|
-
if (c === 34) {
|
|
21
|
-
for (let j = i + 1; j < s.length; j++) {
|
|
22
|
-
const d = s.charCodeAt(j);
|
|
23
|
-
if (d === 34) return j + 1;
|
|
24
|
-
if (d === 92 && (++j >= s.length || isLineEnd(s.charCodeAt(j)))) return -1;
|
|
25
|
-
}
|
|
26
|
-
return -1;
|
|
27
|
-
}
|
|
28
|
-
const punct = PUNCT.get(c);
|
|
29
|
-
if (punct) return s.startsWith(punct, i) ? i + punct.length : -1;
|
|
30
|
-
if (BRACKET[c] || c === 44) return i + 1;
|
|
31
|
-
let j = i + 1;
|
|
32
|
-
if (c === 45 || isDigit(c)) {
|
|
33
|
-
while (isDigit(s.charCodeAt(j))) j++;
|
|
34
|
-
return c === 45 && j === i + 1 ? -1 : j;
|
|
35
|
-
}
|
|
36
|
-
if (!isWord(c)) return -1;
|
|
37
|
-
while (isWord(s.charCodeAt(j))) j++;
|
|
38
|
-
return j;
|
|
39
|
-
};
|
|
40
|
-
const unreadable = (text, pos) => /* @__PURE__ */ new Error(`cannot read TLA+ value at "${text.slice(pos, pos + 20)}"`);
|
|
41
|
-
const INT = /^-?\d+$/;
|
|
42
|
-
const NAME = /^\w*[A-Za-z]\w*$/;
|
|
43
|
-
const UNESCAPED = {
|
|
44
|
-
"\"": "\"",
|
|
45
|
-
"\\": "\\",
|
|
46
|
-
n: "\n",
|
|
47
|
-
t: " ",
|
|
48
|
-
r: "\r",
|
|
49
|
-
f: "\f"
|
|
50
|
-
};
|
|
51
|
-
const models = /* @__PURE__ */ new Map();
|
|
52
|
-
const model = (name) => {
|
|
53
|
-
let v = models.get(name);
|
|
54
|
-
if (v === void 0) models.set(name, v = {
|
|
55
|
-
kind: "model",
|
|
56
|
-
name
|
|
57
|
-
});
|
|
58
|
-
return v;
|
|
59
|
-
};
|
|
60
|
-
function parseValue(text) {
|
|
61
|
-
const tokens = [];
|
|
62
|
-
const starts = [];
|
|
63
|
-
for (let pos = 0;;) {
|
|
64
|
-
while (pos < text.length && isSpace(text.charCodeAt(pos))) pos++;
|
|
65
|
-
if (pos === text.length) break;
|
|
66
|
-
const end = tokenEnd(text, pos);
|
|
67
|
-
if (end === -1) throw unreadable(text, pos);
|
|
68
|
-
tokens.push(text.slice(pos, end));
|
|
69
|
-
starts.push(pos);
|
|
70
|
-
pos = end;
|
|
71
|
-
}
|
|
72
|
-
let i = 0;
|
|
73
|
-
const fail = () => {
|
|
74
|
-
throw unreadable(text, i < starts.length ? starts[Math.max(i - 1, 0)] : text.length);
|
|
75
|
-
};
|
|
76
|
-
const next = () => i < tokens.length ? tokens[i++] : fail();
|
|
77
|
-
const eat = (t) => {
|
|
78
|
-
if (next() !== t) fail();
|
|
79
|
-
};
|
|
80
|
-
const items = (close, item) => {
|
|
81
|
-
const out = [];
|
|
82
|
-
if (tokens[i] === close) {
|
|
83
|
-
i++;
|
|
84
|
-
return out;
|
|
85
|
-
}
|
|
86
|
-
for (;;) {
|
|
87
|
-
out.push(item());
|
|
88
|
-
const t = next();
|
|
89
|
-
if (t === close) return out;
|
|
90
|
-
if (t !== ",") fail();
|
|
91
|
-
}
|
|
92
|
-
};
|
|
93
|
-
const string = (t) => {
|
|
94
|
-
let s = "";
|
|
95
|
-
for (let j = 1, from = 1;;) {
|
|
96
|
-
const k = t.indexOf("\\", j);
|
|
97
|
-
if (k === -1 || k >= t.length - 1) return s + t.slice(from, -1);
|
|
98
|
-
const c = UNESCAPED[t[k + 1]];
|
|
99
|
-
if (c === void 0) fail();
|
|
100
|
-
s += t.slice(from, k) + c;
|
|
101
|
-
j = from = k + 2;
|
|
102
|
-
}
|
|
103
|
-
};
|
|
104
|
-
const value = () => {
|
|
105
|
-
const t = next();
|
|
106
|
-
switch (t) {
|
|
107
|
-
case "TRUE": return true;
|
|
108
|
-
case "FALSE": return false;
|
|
109
|
-
case "{": return {
|
|
110
|
-
kind: "set",
|
|
111
|
-
members: items("}", value)
|
|
112
|
-
};
|
|
113
|
-
case "<<": {
|
|
114
|
-
const values = items(">>", value);
|
|
115
|
-
const keys = [];
|
|
116
|
-
for (let k = 1; k <= values.length; k++) keys.push(k);
|
|
117
|
-
return {
|
|
118
|
-
kind: "function",
|
|
119
|
-
printedAs: "tuple",
|
|
120
|
-
keys,
|
|
121
|
-
values
|
|
122
|
-
};
|
|
123
|
-
}
|
|
124
|
-
case "[": {
|
|
125
|
-
const keys = [];
|
|
126
|
-
const values = [];
|
|
127
|
-
items("]", () => {
|
|
128
|
-
const name = next();
|
|
129
|
-
if (!NAME.test(name)) fail();
|
|
130
|
-
eat("|->");
|
|
131
|
-
keys.push(name);
|
|
132
|
-
values.push(value());
|
|
133
|
-
});
|
|
134
|
-
return {
|
|
135
|
-
kind: "function",
|
|
136
|
-
printedAs: "record",
|
|
137
|
-
keys,
|
|
138
|
-
values
|
|
139
|
-
};
|
|
140
|
-
}
|
|
141
|
-
case "(": {
|
|
142
|
-
const keys = [];
|
|
143
|
-
const values = [];
|
|
144
|
-
do {
|
|
145
|
-
keys.push(value());
|
|
146
|
-
eat(":>");
|
|
147
|
-
values.push(value());
|
|
148
|
-
} while (next() === "@@");
|
|
149
|
-
if (tokens[i - 1] !== ")") fail();
|
|
150
|
-
return {
|
|
151
|
-
kind: "function",
|
|
152
|
-
printedAs: "pairs",
|
|
153
|
-
keys,
|
|
154
|
-
values
|
|
155
|
-
};
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
if (t.charCodeAt(0) === 34) return string(t);
|
|
159
|
-
if (INT.test(t)) {
|
|
160
|
-
if (tokens[i] !== "..") return Number(t);
|
|
161
|
-
i++;
|
|
162
|
-
const hi = next();
|
|
163
|
-
if (!INT.test(hi)) fail();
|
|
164
|
-
return {
|
|
165
|
-
kind: "interval",
|
|
166
|
-
lo: Number(t),
|
|
167
|
-
hi: Number(hi)
|
|
168
|
-
};
|
|
169
|
-
}
|
|
170
|
-
if (NAME.test(t)) return model(t);
|
|
171
|
-
return fail();
|
|
172
|
-
};
|
|
173
|
-
const out = value();
|
|
174
|
-
if (i < tokens.length) {
|
|
175
|
-
i++;
|
|
176
|
-
fail();
|
|
177
|
-
}
|
|
178
|
-
return out;
|
|
179
|
-
}
|
|
180
|
-
export { BRACKET, isSpace, parseValue, tokenEnd, unreadable };
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { EC } from "../ir.mjs";
|
|
2
|
-
import { textOf } from "./messages.mjs";
|
|
3
|
-
// runtime/skills/statechart/scripts/frontends/verdict.ts
|
|
4
|
-
const NAMED = /* @__PURE__ */ new Map([
|
|
5
|
-
[EC.TLC_INVARIANT_VIOLATED_INITIAL, ["invariant", /^Invariant (.+) is violated by the initial/]],
|
|
6
|
-
[EC.TLC_INVARIANT_VIOLATED_BEHAVIOR, ["invariant", /^Invariant (.+) is violated\.$/m]],
|
|
7
|
-
[EC.TLC_PROPERTY_VIOLATED_INITIAL, ["property", /^Property (.+) is violated by the initial/]],
|
|
8
|
-
[EC.TLC_ACTION_PROPERTY_VIOLATED_BEHAVIOR, ["property", /^Action property (.+) is violated\.$/m]]
|
|
9
|
-
]);
|
|
10
|
-
const DISTINCT = /* @__PURE__ */ new Map([
|
|
11
|
-
[EC.TLC_INIT_GENERATED1, /(\d+) distinct states? generated/],
|
|
12
|
-
[EC.TLC_INIT_GENERATED2, /with (\d+) of them distinct/],
|
|
13
|
-
[EC.TLC_STATS, /(\d+) distinct states found/]
|
|
14
|
-
]);
|
|
15
|
-
function readVerdict(messages) {
|
|
16
|
-
let broke;
|
|
17
|
-
let distinct = 0;
|
|
18
|
-
let initial = 0;
|
|
19
|
-
for (const m of messages) {
|
|
20
|
-
if (typeof m === "string") continue;
|
|
21
|
-
const count = DISTINCT.get(m.code)?.exec(textOf(m));
|
|
22
|
-
if (count) distinct = Math.max(distinct, Number(count[1]));
|
|
23
|
-
if (m.code === EC.TLC_INIT_GENERATED1 || m.code === EC.TLC_INIT_GENERATED2) initial = Number(/(\d+) (?:distinct )?states? generated/.exec(textOf(m))?.[1] ?? 0);
|
|
24
|
-
if (broke) continue;
|
|
25
|
-
if (m.code === EC.TLC_DEADLOCK_REACHED) broke = { kind: "deadlock" };
|
|
26
|
-
else if (m.code === EC.TLC_TEMPORAL_PROPERTY_VIOLATED) broke = { kind: "temporal" };
|
|
27
|
-
const named = NAMED.get(m.code);
|
|
28
|
-
const name = named?.[1].exec(textOf(m))?.[1];
|
|
29
|
-
if (named && name) broke = {
|
|
30
|
-
kind: named[0],
|
|
31
|
-
name
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
return {
|
|
35
|
-
broke,
|
|
36
|
-
distinct,
|
|
37
|
-
initial
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
export { readVerdict };
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
import { checked, list } from "../ir.mjs";
|
|
2
|
-
// runtime/skills/statechart/scripts/frontends/view.ts
|
|
3
|
-
const projected = /* @__PURE__ */ new WeakMap();
|
|
4
|
-
const json = (v) => {
|
|
5
|
-
if (typeof v !== "object") return v;
|
|
6
|
-
if (v.kind === "model") return v.name;
|
|
7
|
-
let j = projected.get(v);
|
|
8
|
-
if (j === void 0) {
|
|
9
|
-
if (v.kind === "interval") {
|
|
10
|
-
const members = [];
|
|
11
|
-
for (let k = v.lo; k <= v.hi; k++) members.push(k);
|
|
12
|
-
j = members;
|
|
13
|
-
} else if (v.kind === "set") {
|
|
14
|
-
const members = [];
|
|
15
|
-
for (const m of v.members) members.push(json(m));
|
|
16
|
-
j = members;
|
|
17
|
-
} else {
|
|
18
|
-
const fields = [];
|
|
19
|
-
for (let i = 0; i < v.keys.length; i++) {
|
|
20
|
-
const k = json(v.keys[i]);
|
|
21
|
-
fields.push([typeof k === "object" ? JSON.stringify(k) : String(k), json(v.values[i])]);
|
|
22
|
-
}
|
|
23
|
-
j = Object.fromEntries(fields);
|
|
24
|
-
}
|
|
25
|
-
projected.set(v, j);
|
|
26
|
-
}
|
|
27
|
-
return j;
|
|
28
|
-
};
|
|
29
|
-
const projectedVars = /* @__PURE__ */ new WeakMap();
|
|
30
|
-
const jsonVars = (vars) => {
|
|
31
|
-
let j = projectedVars.get(vars);
|
|
32
|
-
if (j === void 0) {
|
|
33
|
-
const fields = [];
|
|
34
|
-
for (const [name, v] of Object.entries(vars)) fields.push([name, json(v)]);
|
|
35
|
-
j = Object.fromEntries(fields);
|
|
36
|
-
projectedVars.set(vars, j);
|
|
37
|
-
}
|
|
38
|
-
return j;
|
|
39
|
-
};
|
|
40
|
-
const THEME_COLORS = [
|
|
41
|
-
"blue",
|
|
42
|
-
"orange",
|
|
43
|
-
"purple",
|
|
44
|
-
"yellow",
|
|
45
|
-
"teal",
|
|
46
|
-
"tan",
|
|
47
|
-
"pink"
|
|
48
|
-
];
|
|
49
|
-
const isFunction = (v) => typeof v === "function";
|
|
50
|
-
const isPlainObject = (v) => {
|
|
51
|
-
if (typeof v !== "object" || v === null) return false;
|
|
52
|
-
const proto = Object.getPrototypeOf(v);
|
|
53
|
-
return proto === Object.prototype || proto === null;
|
|
54
|
-
};
|
|
55
|
-
const isString = (v) => typeof v === "string";
|
|
56
|
-
const VIEW_EXPORTS = [
|
|
57
|
-
"state",
|
|
58
|
-
"step",
|
|
59
|
-
"group",
|
|
60
|
-
"colors",
|
|
61
|
-
"title"
|
|
62
|
-
];
|
|
63
|
-
function checkView(view, inspect) {
|
|
64
|
-
const literal = (v) => typeof v === "string" ? JSON.stringify(v) : inspect(v, { breakLength: Infinity });
|
|
65
|
-
const extra = [];
|
|
66
|
-
for (const name of Object.keys(view)) if (!VIEW_EXPORTS.includes(name)) extra.push(name);
|
|
67
|
-
if (extra.length) throw new Error(`The view exports ${list(extra)}, which the command does not read. Export only ${list(VIEW_EXPORTS)}.`);
|
|
68
|
-
const wrong = [];
|
|
69
|
-
const pick = (name, kind, fits) => {
|
|
70
|
-
const v = view[name];
|
|
71
|
-
if (v === void 0 || fits(v)) return v;
|
|
72
|
-
wrong.push(`${name} must be ${kind}`);
|
|
73
|
-
};
|
|
74
|
-
const state = pick("state", "a function", isFunction);
|
|
75
|
-
const step = pick("step", "a function", isFunction);
|
|
76
|
-
const group = pick("group", "a function", isFunction);
|
|
77
|
-
const exported = pick("colors", "a plain object", isPlainObject);
|
|
78
|
-
const title = pick("title", "a string", isString);
|
|
79
|
-
if (wrong.length) throw new Error(`The view's ${list(wrong)}.`);
|
|
80
|
-
if (group !== void 0 && exported === void 0) throw new Error("The view exports group() but no colors. Give each group a color in colors.");
|
|
81
|
-
const colors = Object.create(null);
|
|
82
|
-
const bad = [];
|
|
83
|
-
for (const [name, color] of Object.entries(exported ?? {})) if (typeof color === "string" && THEME_COLORS.includes(color)) colors[name] = color;
|
|
84
|
-
else bad.push(`${JSON.stringify(name)} the color ${literal(color)}`);
|
|
85
|
-
if (bad.length) throw new Error(`The view's colors give ${list(bad)}. Give each group ${list(THEME_COLORS, "or")}.`);
|
|
86
|
-
return {
|
|
87
|
-
state: state && ((vars) => state(jsonVars(vars))),
|
|
88
|
-
step: step && ((action, from, to) => step(action, jsonVars(from), jsonVars(to))),
|
|
89
|
-
group: group && ((vars) => {
|
|
90
|
-
const g = group(jsonVars(vars));
|
|
91
|
-
if (g !== void 0 && !Object.hasOwn(colors, typeof g === "symbol" ? g : String(g))) throw new Error(`The view's group() returned ${literal(g)}, which colors does not name. Give each group a color in colors.`);
|
|
92
|
-
return g;
|
|
93
|
-
}),
|
|
94
|
-
colors,
|
|
95
|
-
title,
|
|
96
|
-
[checked]: true
|
|
97
|
-
};
|
|
98
|
-
}
|
|
99
|
-
export { checkView, json };
|
|
@@ -1,277 +0,0 @@
|
|
|
1
|
-
// runtime/skills/statechart/scripts/ir.ts
|
|
2
|
-
const EC = {
|
|
3
|
-
TLC_INVARIANT_VIOLATED_INITIAL: 2107,
|
|
4
|
-
TLC_PROPERTY_VIOLATED_INITIAL: 2108,
|
|
5
|
-
TLC_INVARIANT_VIOLATED_BEHAVIOR: 2110,
|
|
6
|
-
TLC_ACTION_PROPERTY_VIOLATED_BEHAVIOR: 2112,
|
|
7
|
-
TLC_DEADLOCK_REACHED: 2114,
|
|
8
|
-
TLC_TEMPORAL_PROPERTY_VIOLATED: 2116,
|
|
9
|
-
TLC_BACK_TO_STATE: 2122,
|
|
10
|
-
TLC_FINISHED: 2186,
|
|
11
|
-
TLC_INIT_GENERATED1: 2190,
|
|
12
|
-
TLC_INIT_GENERATED2: 2191,
|
|
13
|
-
TLC_STATS: 2199,
|
|
14
|
-
TLC_PROGRESS_STATS: 2200,
|
|
15
|
-
TLC_STATE_PRINT2: 2217,
|
|
16
|
-
TLC_STATE_PRINT3: 2218,
|
|
17
|
-
TLC_SANY_END: 2219,
|
|
18
|
-
TLC_SANY_START: 2220
|
|
19
|
-
};
|
|
20
|
-
const LEVEL = {
|
|
21
|
-
NONE: 0,
|
|
22
|
-
ERROR: 1,
|
|
23
|
-
TLCBUG: 2,
|
|
24
|
-
WARNING: 3,
|
|
25
|
-
STATE: 4
|
|
26
|
-
};
|
|
27
|
-
const RERUN_STATES = 1e5;
|
|
28
|
-
const CHART_STATES = 500;
|
|
29
|
-
const checked = Symbol("checked");
|
|
30
|
-
const isRecord = (v) => typeof v === "object" && v !== null && !Array.isArray(v);
|
|
31
|
-
const isStrings = (v) => Array.isArray(v) && v.every((s) => typeof s === "string");
|
|
32
|
-
const PART = 1 << 24;
|
|
33
|
-
const byText = (a, b) => a < b ? -1 : a > b ? 1 : 0;
|
|
34
|
-
const list = (items, and = "and") => items.length < 2 ? items.join("") : `${items.slice(0, -1).join(", ")} ${and} ${items.at(-1)}`;
|
|
35
|
-
const ESCAPES = {
|
|
36
|
-
"\"": "\\\"",
|
|
37
|
-
"\\": "\\\\",
|
|
38
|
-
"\n": "\\n",
|
|
39
|
-
" ": "\\t",
|
|
40
|
-
"\r": "\\r",
|
|
41
|
-
"\f": "\\f"
|
|
42
|
-
};
|
|
43
|
-
const quote = (s) => `"${s.replace(/["\\\n\t\r\f]/g, (c) => ESCAPES[c])}"`;
|
|
44
|
-
const joined = (items, sep) => {
|
|
45
|
-
let s = "";
|
|
46
|
-
for (let i = 0; i < items.length; i++) s += (i ? sep : "") + show(items[i]);
|
|
47
|
-
return s;
|
|
48
|
-
};
|
|
49
|
-
const show = (v) => {
|
|
50
|
-
switch (typeof v) {
|
|
51
|
-
case "boolean": return v ? "TRUE" : "FALSE";
|
|
52
|
-
case "number": return String(v);
|
|
53
|
-
case "string": return quote(v);
|
|
54
|
-
}
|
|
55
|
-
switch (v.kind) {
|
|
56
|
-
case "model": return v.name;
|
|
57
|
-
case "interval": return `${v.lo}..${v.hi}`;
|
|
58
|
-
case "set": return `{${joined(v.members, ", ")}}`;
|
|
59
|
-
case "function": {
|
|
60
|
-
if (v.printedAs === "tuple") return `<<${joined(v.values, ", ")}>>`;
|
|
61
|
-
const record = v.printedAs === "record";
|
|
62
|
-
let s = record ? "[" : "(";
|
|
63
|
-
for (let i = 0; i < v.keys.length; i++) s += record ? `${i ? ", " : ""}${String(v.keys[i])} |-> ${show(v.values[i])}` : `${i ? " @@ " : ""}${show(v.keys[i])} :> ${show(v.values[i])}`;
|
|
64
|
-
return s + (record ? "]" : ")");
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
};
|
|
68
|
-
const must = (map, key) => {
|
|
69
|
-
const value = map.get(key);
|
|
70
|
-
if (value === void 0) throw new Error(`The chart lost track of ${JSON.stringify(key)}.`);
|
|
71
|
-
return value;
|
|
72
|
-
};
|
|
73
|
-
const append = (groups, key, item) => {
|
|
74
|
-
const group = groups.get(key);
|
|
75
|
-
if (group) group.push(item);
|
|
76
|
-
else groups.set(key, [item]);
|
|
77
|
-
};
|
|
78
|
-
const seqOf = (bug, index) => {
|
|
79
|
-
const seq = [must(index, bug.start)];
|
|
80
|
-
for (const p of bug.path) seq.push(must(index, p.state));
|
|
81
|
-
return seq;
|
|
82
|
-
};
|
|
83
|
-
const loopOf = (bug, index) => new Set(bug.loop === void 0 ? [] : seqOf(bug, index).slice(bug.loop));
|
|
84
|
-
const defaultState = (vars) => {
|
|
85
|
-
const entries = Object.entries(vars);
|
|
86
|
-
if (entries.length === 1) return show(entries[0][1]);
|
|
87
|
-
const parts = [];
|
|
88
|
-
for (const [k, v] of entries) parts.push(`${k}=${show(v)}`);
|
|
89
|
-
return parts.join(" ");
|
|
90
|
-
};
|
|
91
|
-
const stateText = (vars) => {
|
|
92
|
-
const parts = [];
|
|
93
|
-
for (const [k, v] of Object.entries(vars)) parts.push(`${k} = ${show(v)}`);
|
|
94
|
-
return parts.join(" /\\ ");
|
|
95
|
-
};
|
|
96
|
-
const count = (n) => {
|
|
97
|
-
const items = new Int32Array(n);
|
|
98
|
-
for (let i = 0; i < n; i++) items[i] = i;
|
|
99
|
-
return items;
|
|
100
|
-
};
|
|
101
|
-
const sortBy = (items, keys) => {
|
|
102
|
-
for (let k = keys.length - 1; k >= 0; k--) {
|
|
103
|
-
const key = keys[k];
|
|
104
|
-
let size = 0;
|
|
105
|
-
for (let p = 0; p < items.length; p++) if (key[items[p]] >= size) size = key[items[p]] + 1;
|
|
106
|
-
const start = new Int32Array(size + 1);
|
|
107
|
-
for (let p = 0; p < items.length; p++) start[key[items[p]] + 1]++;
|
|
108
|
-
for (let v = 0; v < size; v++) start[v + 1] += start[v];
|
|
109
|
-
const sorted = new Int32Array(items.length);
|
|
110
|
-
for (let p = 0; p < items.length; p++) sorted[start[key[items[p]]]++] = items[p];
|
|
111
|
-
items = sorted;
|
|
112
|
-
}
|
|
113
|
-
return items;
|
|
114
|
-
};
|
|
115
|
-
const tupleKey = (parts) => JSON.stringify(parts);
|
|
116
|
-
const unkey = (k) => {
|
|
117
|
-
const parts = JSON.parse(k);
|
|
118
|
-
if (!isStrings(parts)) throw new Error(`The chart cannot read the key ${k}.`);
|
|
119
|
-
return parts;
|
|
120
|
-
};
|
|
121
|
-
function holds(condition, others) {
|
|
122
|
-
switch (condition.kind) {
|
|
123
|
-
case "and":
|
|
124
|
-
for (let j = 0; j < others.length; j++) if (!condition.otherKeys[j].has(others[j])) return false;
|
|
125
|
-
return true;
|
|
126
|
-
case "or":
|
|
127
|
-
for (let j = 0; j < others.length; j++) if (condition.otherKeys[j].has(others[j])) return true;
|
|
128
|
-
return false;
|
|
129
|
-
case "tuples": return condition.otherTuples.has(tupleKey(others));
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
const ruleKey = (rule) => tupleKey([rule.kind, rule.name]);
|
|
133
|
-
const hasRule = (rules, rule) => {
|
|
134
|
-
for (const r of rules) if (r.kind === rule.kind && r.name === rule.name) return true;
|
|
135
|
-
return false;
|
|
136
|
-
};
|
|
137
|
-
const ascending = (keys) => {
|
|
138
|
-
for (let i = 1; i < keys.length; i++) if (keys[i - 1] > keys[i]) return false;
|
|
139
|
-
return true;
|
|
140
|
-
};
|
|
141
|
-
const span = (lo, hi) => hi > lo ? `${lo}..${hi}` : String(lo);
|
|
142
|
-
const setKey = (members) => {
|
|
143
|
-
const ints = [];
|
|
144
|
-
let others = [];
|
|
145
|
-
for (const m of members) if (typeof m === "number") ints.push(m);
|
|
146
|
-
else others.push(key(m));
|
|
147
|
-
for (let i = 1; i < ints.length; i++) if (ints[i - 1] >= ints[i]) {
|
|
148
|
-
ints.sort((a, b) => a - b);
|
|
149
|
-
break;
|
|
150
|
-
}
|
|
151
|
-
if (!ascending(others)) others = others.sort(byText);
|
|
152
|
-
let s = "{";
|
|
153
|
-
for (let i = 0; i < ints.length;) {
|
|
154
|
-
let j = i;
|
|
155
|
-
while (j + 1 < ints.length && ints[j + 1] - ints[j] <= 1) j++;
|
|
156
|
-
s += `${s.length > 1 ? "," : ""}${span(ints[i], ints[j])}`;
|
|
157
|
-
i = j + 1;
|
|
158
|
-
}
|
|
159
|
-
for (let i = 0; i < others.length; i++) if (!i || others[i] !== others[i - 1]) s += (s.length > 1 ? "," : "") + others[i];
|
|
160
|
-
return s + "}";
|
|
161
|
-
};
|
|
162
|
-
const functionKey = ({ keys, values }) => {
|
|
163
|
-
const order = [];
|
|
164
|
-
const keyTexts = [];
|
|
165
|
-
let ints = 0;
|
|
166
|
-
for (let i = 0; i < keys.length; i++) {
|
|
167
|
-
order.push(i);
|
|
168
|
-
keyTexts.push(key(keys[i]));
|
|
169
|
-
if (typeof keys[i] === "number") ints++;
|
|
170
|
-
}
|
|
171
|
-
const rank = (i) => typeof keys[i] === "number" ? keys[i] : Infinity;
|
|
172
|
-
order.sort((a, b) => rank(a) - rank(b) || byText(keyTexts[a], keyTexts[b]) || a - b);
|
|
173
|
-
let tuple = ints === keys.length;
|
|
174
|
-
for (let i = 0; tuple && i < order.length; i++) tuple = keys[order[i]] === i + 1;
|
|
175
|
-
let s = tuple ? "<<" : "(";
|
|
176
|
-
for (let i = 0, kept = 0; i < order.length; i++) {
|
|
177
|
-
const k = order[i];
|
|
178
|
-
if (i && keyTexts[k] === keyTexts[order[i - 1]]) continue;
|
|
179
|
-
const v = key(values[k]);
|
|
180
|
-
s += tuple ? `${kept++ ? "," : ""}${v}` : `${kept++ ? "@@" : ""}${keyTexts[k]}:>${v}`;
|
|
181
|
-
}
|
|
182
|
-
return s + (tuple ? ">>" : ")");
|
|
183
|
-
};
|
|
184
|
-
const keys = /* @__PURE__ */ new WeakMap();
|
|
185
|
-
const key = (v) => {
|
|
186
|
-
switch (typeof v) {
|
|
187
|
-
case "boolean": return v ? "TRUE" : "FALSE";
|
|
188
|
-
case "number": return String(v);
|
|
189
|
-
case "string": return JSON.stringify(v);
|
|
190
|
-
}
|
|
191
|
-
if (v.kind === "model") return v.name;
|
|
192
|
-
let k = keys.get(v);
|
|
193
|
-
if (k === void 0) {
|
|
194
|
-
k = v.kind === "interval" ? `{${v.lo > v.hi ? "" : span(v.lo, v.hi)}}` : v.kind === "set" ? setKey(v.members) : functionKey(v);
|
|
195
|
-
keys.set(v, k);
|
|
196
|
-
}
|
|
197
|
-
return k;
|
|
198
|
-
};
|
|
199
|
-
const stateKey = (values) => {
|
|
200
|
-
let k = "";
|
|
201
|
-
for (let i = 0; i < values.length; i++) k += (i ? "," : "") + key(values[i]);
|
|
202
|
-
return k;
|
|
203
|
-
};
|
|
204
|
-
const memo = (make, limit = 65536) => {
|
|
205
|
-
const cache = /* @__PURE__ */ new Map();
|
|
206
|
-
return (k) => {
|
|
207
|
-
let v = cache.get(k);
|
|
208
|
-
if (v === void 0) {
|
|
209
|
-
if (cache.size >= limit) cache.clear();
|
|
210
|
-
cache.set(k, v = make(k));
|
|
211
|
-
}
|
|
212
|
-
return v;
|
|
213
|
-
};
|
|
214
|
-
};
|
|
215
|
-
const valuesOf = (vars, names) => {
|
|
216
|
-
const values = [];
|
|
217
|
-
for (const n of names) values.push(vars[n]);
|
|
218
|
-
return values;
|
|
219
|
-
};
|
|
220
|
-
const findTrace = (counterexample, names, rule, find) => {
|
|
221
|
-
const trace = [];
|
|
222
|
-
for (const { action, vars } of counterexample) {
|
|
223
|
-
const values = valuesOf(vars, names);
|
|
224
|
-
trace.push({
|
|
225
|
-
action,
|
|
226
|
-
vars,
|
|
227
|
-
values,
|
|
228
|
-
id: find(values)
|
|
229
|
-
});
|
|
230
|
-
}
|
|
231
|
-
const end = trace.length - 1;
|
|
232
|
-
if (end < 0) throw new Error(`TLC's trace for ${rule.name} has no states.`);
|
|
233
|
-
for (let i = 0; i < end; i++) if (trace[i].id === void 0) throw new Error(`TLC's trace for ${rule.name} has a state before its last that the dump does not list.`);
|
|
234
|
-
return trace;
|
|
235
|
-
};
|
|
236
|
-
const findLoop = ({ seq, loop }, names, find) => {
|
|
237
|
-
const found = [];
|
|
238
|
-
for (const { action, vars } of seq) found.push({
|
|
239
|
-
action,
|
|
240
|
-
id: vars && find(valuesOf(vars, names))
|
|
241
|
-
});
|
|
242
|
-
return {
|
|
243
|
-
seq: found,
|
|
244
|
-
loop
|
|
245
|
-
};
|
|
246
|
-
};
|
|
247
|
-
const pastState = (vars, start, marked, excluded) => {
|
|
248
|
-
const breaks = [];
|
|
249
|
-
for (const r of marked) if (!hasRule(breaks, r)) breaks.push(r);
|
|
250
|
-
return {
|
|
251
|
-
vars,
|
|
252
|
-
start,
|
|
253
|
-
breaks,
|
|
254
|
-
ends: [],
|
|
255
|
-
past: true,
|
|
256
|
-
excluded
|
|
257
|
-
};
|
|
258
|
-
};
|
|
259
|
-
const CHECK_DEADLOCK = "CHECK_DEADLOCK";
|
|
260
|
-
const deadlockRule = ({ invariants, properties }) => ({
|
|
261
|
-
kind: "deadlock",
|
|
262
|
-
name: invariants.includes("NoDeadlock") || properties.includes("NoDeadlock") ? CHECK_DEADLOCK : "NoDeadlock"
|
|
263
|
-
});
|
|
264
|
-
const hasSection = ({ written }, ...keys) => {
|
|
265
|
-
for (const s of written) if (keys.includes(s.key)) return true;
|
|
266
|
-
return false;
|
|
267
|
-
};
|
|
268
|
-
const stateRules = (spec) => {
|
|
269
|
-
const rules = [];
|
|
270
|
-
for (const name of spec.invariants) rules.push({
|
|
271
|
-
kind: "invariant",
|
|
272
|
-
name
|
|
273
|
-
});
|
|
274
|
-
if (spec.deadlock) rules.push(deadlockRule(spec));
|
|
275
|
-
return rules;
|
|
276
|
-
};
|
|
277
|
-
export { CHART_STATES, CHECK_DEADLOCK, EC, LEVEL, PART, RERUN_STATES, append, byText, checked, count, defaultState, findLoop, findTrace, hasRule, hasSection, holds, isRecord, isStrings, key, list, loopOf, memo, must, pastState, ruleKey, seqOf, show, sortBy, stateKey, stateRules, stateText, tupleKey, unkey, valuesOf };
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import { findLoop, findTrace, hasRule, must, pastState, stateKey, valuesOf } from "../ir.mjs";
|
|
2
|
-
// runtime/skills/statechart/scripts/passes/annotate.ts
|
|
3
|
-
const finder = (graph, names) => {
|
|
4
|
-
let ids;
|
|
5
|
-
const find = (values) => {
|
|
6
|
-
if (!ids) {
|
|
7
|
-
ids = /* @__PURE__ */ new Map();
|
|
8
|
-
for (const [id, s] of graph.states) if (!s.excluded) ids.set(stateKey(valuesOf(s.vars, names)), id);
|
|
9
|
-
}
|
|
10
|
-
return ids.get(stateKey(values));
|
|
11
|
-
};
|
|
12
|
-
find.add = (id, values) => ids?.set(stateKey(values), id);
|
|
13
|
-
return find;
|
|
14
|
-
};
|
|
15
|
-
function mark(graph, marks, names, rules, find = finder(graph, names)) {
|
|
16
|
-
const byName = /* @__PURE__ */ new Map();
|
|
17
|
-
for (const rule of rules) byName.set(rule.name, rule);
|
|
18
|
-
const past = /* @__PURE__ */ new Map();
|
|
19
|
-
for (const { values, broken } of marks) {
|
|
20
|
-
const id = find(values);
|
|
21
|
-
const state = id === void 0 ? void 0 : graph.states.get(id);
|
|
22
|
-
for (const name of broken) {
|
|
23
|
-
const rule = must(byName, name);
|
|
24
|
-
if (state) state.breaks.push(rule);
|
|
25
|
-
else past.set(stateKey(values), (past.get(stateKey(values)) ?? /* @__PURE__ */ new Set()).add(rule));
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
return past;
|
|
29
|
-
}
|
|
30
|
-
function deadEnds(graph, rule) {
|
|
31
|
-
const from = /* @__PURE__ */ new Set();
|
|
32
|
-
for (const t of graph.steps) from.add(t.from);
|
|
33
|
-
for (const [id, s] of graph.states) if (!s.past && !from.has(id)) s.breaks.push(rule);
|
|
34
|
-
}
|
|
35
|
-
function addPast(graph, counterexample, names, rule, past, excludes, find = finder(graph, names)) {
|
|
36
|
-
const trace = findTrace(counterexample, names, rule, find);
|
|
37
|
-
const end = trace.length - 1;
|
|
38
|
-
const from = trace[end - 1]?.id;
|
|
39
|
-
const action = trace[end].action;
|
|
40
|
-
const taken = (to) => {
|
|
41
|
-
for (const t of graph.steps) if (t.from === from && t.to === to && t.action === action) return true;
|
|
42
|
-
return false;
|
|
43
|
-
};
|
|
44
|
-
let to = trace[end].id;
|
|
45
|
-
const reached = to === void 0 ? void 0 : graph.states.get(to);
|
|
46
|
-
const excluded = excludes && reached !== void 0 && end > 0 && !reached.past && !taken(to);
|
|
47
|
-
if (excluded) to = `past ${to} ${action} ${from}`;
|
|
48
|
-
to ??= `past ${graph.states.size}`;
|
|
49
|
-
let last = graph.states.get(to);
|
|
50
|
-
if (!last) {
|
|
51
|
-
const marked = excluded ? reached.breaks : past.get(stateKey(trace[end].values)) ?? [];
|
|
52
|
-
last = pastState(trace[end].vars, end === 0, marked, excluded);
|
|
53
|
-
graph.states.set(to, last);
|
|
54
|
-
if (!excluded) find.add(to, trace[end].values);
|
|
55
|
-
}
|
|
56
|
-
if (!hasRule(last.breaks, rule)) last.breaks.push(rule);
|
|
57
|
-
(last.ends ??= []).push(rule);
|
|
58
|
-
if (from !== void 0 && last.past && !taken(to)) graph.steps.push({
|
|
59
|
-
from,
|
|
60
|
-
to,
|
|
61
|
-
action
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
function lasso(graph, trace, names, find = finder(graph, names)) {
|
|
65
|
-
const { seq, loop } = findLoop(trace, names, find);
|
|
66
|
-
const start = seq[0]?.id;
|
|
67
|
-
if (start === void 0) return void 0;
|
|
68
|
-
const out = /* @__PURE__ */ new Map();
|
|
69
|
-
for (const s of seq) out.set(s.id, []);
|
|
70
|
-
for (const t of graph.steps) out.get(t.from)?.push(t);
|
|
71
|
-
const route = [];
|
|
72
|
-
for (let i = 1; i < seq.length; i++) {
|
|
73
|
-
let step;
|
|
74
|
-
for (const t of out.get(seq[i - 1].id) ?? []) if (t.to === seq[i].id && t.action === seq[i].action) {
|
|
75
|
-
step = t;
|
|
76
|
-
break;
|
|
77
|
-
}
|
|
78
|
-
if (!step) return void 0;
|
|
79
|
-
route.push({
|
|
80
|
-
action: step.action,
|
|
81
|
-
state: step.to,
|
|
82
|
-
step
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
return {
|
|
86
|
-
start,
|
|
87
|
-
path: route,
|
|
88
|
-
loop,
|
|
89
|
-
stutters: loop === seq.length - 1
|
|
90
|
-
};
|
|
91
|
-
}
|
|
92
|
-
export { addPast, deadEnds, finder, lasso, mark };
|