pi-t3-pstack 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +23 -0
- package/index.ts +87 -0
- package/package.json +62 -4
- package/pstack/.claude-plugin/icon.png +0 -0
- package/pstack/.claude-plugin/plugin.json +35 -0
- package/pstack/.codex-plugin/plugin.json +50 -0
- package/pstack/README.md +26 -0
- package/pstack/agents/comment-sicko.md +32 -0
- package/pstack/agents/poteto-agent.md +8 -0
- package/pstack/agents/thermo-nuclear-code-quality-review-subagent.md +23 -0
- package/pstack/agents/thermo-nuclear-review-subagent.md +28 -0
- package/pstack/assets/pstack-icon.png +0 -0
- package/pstack/assets/pstack-icon.prompt.txt +8 -0
- package/pstack/hooks/codex-hooks.json +16 -0
- package/pstack/hooks/hooks.json +15 -0
- package/pstack/hooks/session-start-context.md +17 -0
- package/pstack/hooks/session-start.ps1 +33 -0
- package/pstack/hooks/session-start.sh +34 -0
- package/pstack/models.json +261 -0
- package/pstack/skills/architect/SKILL.md +85 -0
- package/pstack/skills/architect/references/design-red-flags.md +57 -0
- package/pstack/skills/architect/references/rationale-template.md +35 -0
- package/pstack/skills/architect/references/runner-prompt.md +20 -0
- package/pstack/skills/arena/SKILL.md +55 -0
- package/pstack/skills/automate-me/SKILL.md +104 -0
- package/pstack/skills/benchmark-checklist/SKILL.md +39 -0
- package/pstack/skills/blast-radius/SKILL.md +50 -0
- package/pstack/skills/bro/SKILL.md +7 -0
- package/pstack/skills/correct/SKILL.md +32 -0
- package/pstack/skills/create-formal-verification-skill/SKILL.md +43 -0
- package/pstack/skills/create-verification-skill/SKILL.md +44 -0
- package/pstack/skills/create-verification-skill/references/feature-map-example/README.md +47 -0
- package/pstack/skills/create-verification-skill/references/feature-map-example/create-note.md +39 -0
- package/pstack/skills/create-verification-skill/references/feature-map-example/search.md +45 -0
- package/pstack/skills/deslop/SKILL.md +22 -0
- package/pstack/skills/figure-it-out/SKILL.md +52 -0
- package/pstack/skills/fix-ci/SKILL.md +29 -0
- package/pstack/skills/fix-merge-conflicts/SKILL.md +32 -0
- package/pstack/skills/get-pr-comments/SKILL.md +23 -0
- package/pstack/skills/how/SKILL.md +43 -0
- package/pstack/skills/how/references/explainer-prompt.md +55 -0
- package/pstack/skills/how/references/explorer-prompt.md +35 -0
- package/pstack/skills/in-your-own-words/SKILL.md +7 -0
- package/pstack/skills/interrogate/SKILL.md +37 -0
- package/pstack/skills/ketchup/SKILL.md +43 -0
- package/pstack/skills/ketchup-video/SKILL.md +29 -0
- package/pstack/skills/maintain-formal-verification-skill/SKILL.md +58 -0
- package/pstack/skills/maintain-verification-skill/SKILL.md +39 -0
- package/pstack/skills/make-pr-easy-to-review/SKILL.md +59 -0
- package/pstack/skills/no-comments/SKILL.md +24 -0
- package/pstack/skills/poteto-help/SKILL.md +162 -0
- package/pstack/skills/poteto-help/references/prompting.md +51 -0
- package/pstack/skills/poteto-help/references/recipes.md +51 -0
- package/pstack/skills/poteto-mode/SKILL.md +186 -0
- package/pstack/skills/poteto-mode/brief.md +70 -0
- package/pstack/skills/poteto-mode/playbooks/authoring-a-skill.md +12 -0
- package/pstack/skills/poteto-mode/playbooks/autonomous-run.md +13 -0
- package/pstack/skills/poteto-mode/playbooks/autopilot-full.md +25 -0
- package/pstack/skills/poteto-mode/playbooks/autopilot-stack.md +8 -0
- package/pstack/skills/poteto-mode/playbooks/babysit.md +23 -0
- package/pstack/skills/poteto-mode/playbooks/bug-fix.md +15 -0
- package/pstack/skills/poteto-mode/playbooks/eval.md +25 -0
- package/pstack/skills/poteto-mode/playbooks/feature.md +21 -0
- package/pstack/skills/poteto-mode/playbooks/hillclimb.md +21 -0
- package/pstack/skills/poteto-mode/playbooks/investigation.md +14 -0
- package/pstack/skills/poteto-mode/playbooks/multi-phase-plan.md +155 -0
- package/pstack/skills/poteto-mode/playbooks/opening-a-pr.md +34 -0
- package/pstack/skills/poteto-mode/playbooks/orchestrate.md +25 -0
- package/pstack/skills/poteto-mode/playbooks/pause-safely.md +10 -0
- package/pstack/skills/poteto-mode/playbooks/perf-issue.md +25 -0
- package/pstack/skills/poteto-mode/playbooks/prototype.md +14 -0
- package/pstack/skills/poteto-mode/playbooks/refactoring.md +16 -0
- package/pstack/skills/poteto-mode/playbooks/runtime-forensics.md +11 -0
- package/pstack/skills/poteto-mode/playbooks/session-pickup.md +11 -0
- package/pstack/skills/poteto-mode/playbooks/shipping.md +12 -0
- package/pstack/skills/poteto-mode/playbooks/trace-forensics.md +14 -0
- package/pstack/skills/poteto-mode/playbooks/visual-parity.md +11 -0
- package/pstack/skills/poteto-mode/playbooks/worktree-cleanup.md +12 -0
- package/pstack/skills/poteto-mode/references/bugbot-triage.md +142 -0
- package/pstack/skills/poteto-mode/references/licenses/LICENSE +23 -0
- package/pstack/skills/poteto-mode/references/licenses/LICENSE-cursor-team-kit +21 -0
- package/pstack/skills/poteto-mode/references/licenses/LICENSE-thermos +21 -0
- package/pstack/skills/poteto-mode/references/licenses/NOTICE.md +14 -0
- package/pstack/skills/poteto-mode/scripts/.prettierrc.json +3 -0
- package/pstack/skills/poteto-mode/scripts/bootstrap.ts +62 -0
- package/pstack/skills/poteto-mode/scripts/bun.lock +67 -0
- package/pstack/skills/poteto-mode/scripts/check-plan.mjs +205 -0
- package/pstack/skills/poteto-mode/scripts/check-plan.test.ts +110 -0
- package/pstack/skills/poteto-mode/scripts/package.json +12 -0
- package/pstack/skills/poteto-mode/scripts/resolve-codex-transcript +4 -0
- package/pstack/skills/poteto-mode/scripts/resolve-codex-transcript.ts +314 -0
- package/pstack/skills/poteto-mode/scripts/test-utils/node-test.ts +204 -0
- package/pstack/skills/poteto-mode/scripts/watch-pr/cli.test.ts +225 -0
- package/pstack/skills/poteto-mode/scripts/watch-pr/cli.ts +231 -0
- package/pstack/skills/poteto-mode/scripts/watch-pr/fakes.test-helper.ts +142 -0
- package/pstack/skills/poteto-mode/scripts/watch-pr/github.test.ts +498 -0
- package/pstack/skills/poteto-mode/scripts/watch-pr/github.ts +760 -0
- package/pstack/skills/poteto-mode/scripts/watch-pr/policy.test.ts +483 -0
- package/pstack/skills/poteto-mode/scripts/watch-pr/policy.ts +1023 -0
- package/pstack/skills/poteto-mode/scripts/watch-pr/render.ts +188 -0
- package/pstack/skills/poteto-mode/scripts/watch-pr/settle.test.ts +552 -0
- package/pstack/skills/poteto-mode/scripts/watch-pr/settle.ts +406 -0
- package/pstack/skills/poteto-mode/scripts/watch-pr/tsconfig.json +18 -0
- package/pstack/skills/poteto-mode/scripts/watch-pr/types.compile.ts +93 -0
- package/pstack/skills/poteto-mode/scripts/watch-pr/types.ts +444 -0
- package/pstack/skills/poteto-mode/scripts/watch-pr/verdicts.test.ts +796 -0
- package/pstack/skills/poteto-mode/scripts/watch-pr/watch-pr +3 -0
- package/pstack/skills/poteto-mode/scripts/worktree-audit.sh +170 -0
- package/pstack/skills/principle-attack-the-premise/SKILL.md +21 -0
- package/pstack/skills/principle-boundary-discipline/SKILL.md +34 -0
- package/pstack/skills/principle-build-the-lever/SKILL.md +23 -0
- package/pstack/skills/principle-encode-lessons-in-structure/SKILL.md +11 -0
- package/pstack/skills/principle-exhaust-the-design-space/SKILL.md +9 -0
- package/pstack/skills/principle-experience-first/SKILL.md +19 -0
- package/pstack/skills/principle-explain-the-number/SKILL.md +18 -0
- package/pstack/skills/principle-fix-root-causes/SKILL.md +21 -0
- package/pstack/skills/principle-foundational-thinking/SKILL.md +21 -0
- package/pstack/skills/principle-guard-the-context-window/SKILL.md +12 -0
- package/pstack/skills/principle-laziness-protocol/SKILL.md +10 -0
- package/pstack/skills/principle-make-operations-idempotent/SKILL.md +22 -0
- package/pstack/skills/principle-migrate-callers-then-delete-legacy-apis/SKILL.md +14 -0
- package/pstack/skills/principle-minimize-reader-load/SKILL.md +18 -0
- package/pstack/skills/principle-model-the-domain/SKILL.md +24 -0
- package/pstack/skills/principle-never-block-on-the-human/SKILL.md +15 -0
- package/pstack/skills/principle-outcome-oriented-execution/SKILL.md +21 -0
- package/pstack/skills/principle-prove-it-works/SKILL.md +22 -0
- package/pstack/skills/principle-redesign-from-first-principles/SKILL.md +16 -0
- package/pstack/skills/principle-separate-before-serializing-shared-state/SKILL.md +16 -0
- package/pstack/skills/principle-sequence-verifiable-units/SKILL.md +17 -0
- package/pstack/skills/principle-subtract-before-you-add/SKILL.md +18 -0
- package/pstack/skills/principle-test-behavior-not-implementation/SKILL.md +20 -0
- package/pstack/skills/principle-type-system-discipline/SKILL.md +13 -0
- package/pstack/skills/recall/SKILL.md +35 -0
- package/pstack/skills/reflect/SKILL.md +86 -0
- package/pstack/skills/reflect/references/divergent-reviewer.md +38 -0
- package/pstack/skills/reflect/references/judgment-reviewer.md +37 -0
- package/pstack/skills/reflect/references/synthesizer.md +56 -0
- package/pstack/skills/reflect/references/tooling-reviewer.md +48 -0
- package/pstack/skills/reflect/scripts/find-transcript.mjs +245 -0
- package/pstack/skills/setup-pstack/SKILL.md +77 -0
- package/pstack/skills/setup-pstack/scripts/read-sheet.sh +14 -0
- package/pstack/skills/setup-pstack/scripts/t3-sheet.mjs +169 -0
- package/pstack/skills/sharpen/SKILL.md +16 -0
- package/pstack/skills/show-me-your-work/SKILL.md +82 -0
- package/pstack/skills/show-me-your-work/references/decision-log-template.tsv +1 -0
- package/pstack/skills/show-me-your-work/scripts/log.sh +42 -0
- package/pstack/skills/statechart/SKILL.md +82 -0
- package/pstack/skills/statechart/references/render.md +93 -0
- package/pstack/skills/statechart/scripts/backends/cfg.ts +33 -0
- package/pstack/skills/statechart/scripts/backends/mermaid.ts +201 -0
- package/pstack/skills/statechart/scripts/backends/plain-text.ts +72 -0
- package/pstack/skills/statechart/scripts/backends/report.ts +177 -0
- package/pstack/skills/statechart/scripts/frontends/config.ts +276 -0
- package/pstack/skills/statechart/scripts/frontends/dot.ts +74 -0
- package/pstack/skills/statechart/scripts/frontends/marks.ts +93 -0
- package/pstack/skills/statechart/scripts/frontends/messages.ts +52 -0
- package/pstack/skills/statechart/scripts/frontends/spec.ts +114 -0
- package/pstack/skills/statechart/scripts/frontends/trace.ts +24 -0
- package/pstack/skills/statechart/scripts/frontends/value.ts +166 -0
- package/pstack/skills/statechart/scripts/frontends/verdict.ts +40 -0
- package/pstack/skills/statechart/scripts/frontends/view.ts +119 -0
- package/pstack/skills/statechart/scripts/ir.ts +547 -0
- package/pstack/skills/statechart/scripts/package.json +11 -0
- package/pstack/skills/statechart/scripts/passes/annotate.ts +128 -0
- package/pstack/skills/statechart/scripts/passes/label.ts +269 -0
- package/pstack/skills/statechart/scripts/passes/lift.ts +85 -0
- package/pstack/skills/statechart/scripts/passes/loop-check.ts +68 -0
- package/pstack/skills/statechart/scripts/passes/paths.ts +60 -0
- package/pstack/skills/statechart/scripts/passes/reach.ts +135 -0
- package/pstack/skills/statechart/scripts/passes/region-check.ts +97 -0
- package/pstack/skills/statechart/scripts/passes/regions.ts +295 -0
- package/pstack/skills/statechart/scripts/pipeline.ts +76 -0
- package/pstack/skills/statechart/scripts/run.ts +481 -0
- package/pstack/skills/statechart/scripts/statechart +29 -0
- package/pstack/skills/statechart/scripts/statechart.ts +164 -0
- package/pstack/skills/statechart/scripts/test/ConfigOracle.java +63 -0
- package/pstack/skills/statechart/scripts/test/chart.test.ts +1210 -0
- package/pstack/skills/statechart/scripts/test/charts/Braces.mmd +7 -0
- package/pstack/skills/statechart/scripts/test/charts/Escapes.mmd +11 -0
- package/pstack/skills/statechart/scripts/test/charts/Phases.mmd +29 -0
- package/pstack/skills/statechart/scripts/test/cli.test.ts +1314 -0
- package/pstack/skills/statechart/scripts/test/config-fuzz.test.ts +263 -0
- package/pstack/skills/statechart/scripts/test/corpus/Counter/ChartRun.out +57 -0
- package/pstack/skills/statechart/scripts/test/corpus/Counter/Counter.cfg +3 -0
- package/pstack/skills/statechart/scripts/test/corpus/Counter/Counter.tla +10 -0
- package/pstack/skills/statechart/scripts/test/corpus/Counter/chart.mmd +9 -0
- package/pstack/skills/statechart/scripts/test/corpus/Counter/graph.dot +16 -0
- package/pstack/skills/statechart/scripts/test/corpus/Counter/report.md +7 -0
- package/pstack/skills/statechart/scripts/test/corpus/Counter/sany.out +2 -0
- package/pstack/skills/statechart/scripts/test/corpus/Counter/verdict-1.out +49 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterAction/ChartRun.out +60 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterAction/CounterAction.cfg +4 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterAction/CounterAction.tla +22 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterAction/chart.mmd +26 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterAction/graph.dot +19 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterAction/report.md +20 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterAction/sany.out +2 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterAction/verdict-1.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterAction/verdict-1.out +56 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterAction/verdict-2.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterAction/verdict-2.out +82 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterAction/verdict-3.out +57 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterDeadlock/ChartRun.out +59 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterDeadlock/CounterDeadlock.cfg +3 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterDeadlock/CounterDeadlock.tla +11 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterDeadlock/chart.mmd +22 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterDeadlock/graph.dot +16 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterDeadlock/report.md +17 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterDeadlock/sany.out +2 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterDeadlock/verdict-1.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterDeadlock/verdict-1.out +56 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterDeadlock/verdict-2.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterDeadlock/verdict-2.out +77 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterFan/ChartRun.out +69 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterFan/CounterFan.cfg +2 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterFan/CounterFan.tla +11 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterFan/chart.mmd +85 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterFan/graph.dot +70 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterFan/report.md +12 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterFan/sany.out +2 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterFan/verdict-1.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterFan/verdict-1.out +67 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterFan/verdict-2.out +57 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterGuard/ChartRun.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterGuard/ChartRun.out +85 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterGuard/CounterGuard.cfg +6 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterGuard/CounterGuard.tla +13 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterGuard/chart.mmd +5 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterGuard/graph.dot +10 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterGuard/report.md +31 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterGuard/sany.out +2 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterGuard/verdict-1.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterGuard/verdict-1.out +64 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterGuard/verdict-2.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterGuard/verdict-2.out +77 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterInitPast/ChartRun.out +55 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterInitPast/CounterInitPast.cfg +3 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterInitPast/CounterInitPast.tla +10 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterInitPast/chart.mmd +12 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterInitPast/graph.dot +6 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterInitPast/report.md +12 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterInitPast/sany.out +2 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterInitPast/verdict-1.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterInitPast/verdict-1.out +33 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterInitPast/verdict-2.out +54 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterInitPastHolds/ChartRun.out +54 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterInitPastHolds/CounterInitPastHolds.cfg +3 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterInitPastHolds/CounterInitPastHolds.tla +10 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterInitPastHolds/chart.mmd +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterInitPastHolds/graph.dot +6 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterInitPastHolds/report.md +7 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterInitPastHolds/sany.out +2 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterInitPastHolds/verdict-1.out +46 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterInstance/ChartRun.out +59 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterInstance/CounterInstance.cfg +2 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterInstance/CounterInstance.tla +10 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterInstance/CounterSteps.tla +6 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterInstance/chart.mmd +17 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterInstance/graph.dot +15 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterInstance/report.md +14 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterInstance/sany.out +3 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterInstance/verdict-1.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterInstance/verdict-1.out +78 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterJump/ChartRun.out +59 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterJump/CounterJump.cfg +3 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterJump/CounterJump.tla +19 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterJump/chart.mmd +26 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterJump/graph.dot +22 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterJump/report.md +12 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterJump/sany.out +2 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterJump/verdict-1.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterJump/verdict-1.out +58 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterJump/verdict-2.out +57 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterLoop/ChartRun.out +57 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterLoop/CounterLoop.cfg +2 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterLoop/CounterLoop.tla +11 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterLoop/chart.mmd +17 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterLoop/graph.dot +15 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterLoop/report.md +14 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterLoop/sany.out +2 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterLoop/verdict-1.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterLoop/verdict-1.out +76 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterOrder/ChartRun.out +59 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterOrder/CounterOrder.cfg +3 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterOrder/CounterOrder.tla +11 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterOrder/chart.mmd +19 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterOrder/graph.dot +10 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterOrder/report.md +15 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterOrder/sany.out +2 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterOrder/verdict-1.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterOrder/verdict-1.out +56 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterOrder/verdict-2.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterOrder/verdict-2.out +67 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterRules/ChartRun.out +62 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterRules/CounterRules.cfg +6 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterRules/CounterRules.tla +24 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterRules/Moves.tla +5 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterRules/chart.mmd +22 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterRules/graph.dot +10 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterRules/report.md +23 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterRules/sany.out +3 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterRules/verdict-1.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterRules/verdict-1.out +58 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterRules/verdict-2.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterRules/verdict-2.out +66 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterRules/verdict-3.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterRules/verdict-3.out +74 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterRules/verdict-4.out +59 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterStart/ChartRun.out +58 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterStart/CounterStart.cfg +3 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterStart/CounterStart.tla +15 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterStart/chart.mmd +18 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterStart/graph.dot +13 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterStart/report.md +11 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterStart/sany.out +2 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterStart/verdict-1.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterStart/verdict-1.out +33 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterStart/verdict-2.out +57 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterStop/ChartRun.out +57 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterStop/CounterStop.cfg +3 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterStop/CounterStop.tla +15 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterStop/chart.mmd +7 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterStop/graph.dot +13 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterStop/report.md +6 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterStop/sany.out +2 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterStop/verdict-1.out +49 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterTie/ChartRun.out +61 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterTie/CounterTie.cfg +4 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterTie/CounterTie.tla +14 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterTie/chart.mmd +30 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterTie/graph.dot +19 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterTie/report.md +27 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterTie/sany.out +2 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterTie/verdict-1.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterTie/verdict-1.out +56 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterTie/verdict-2.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterTie/verdict-2.out +64 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterTie/verdict-3.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterTie/verdict-3.out +87 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterTie/verdict-4.out +57 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterTieInGraph/ChartRun.out +60 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterTieInGraph/CounterTieInGraph.cfg +3 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterTieInGraph/CounterTieInGraph.tla +12 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterTieInGraph/chart.mmd +23 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterTieInGraph/graph.dot +19 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterTieInGraph/report.md +11 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterTieInGraph/sany.out +2 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterTieInGraph/verdict-1.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterTieInGraph/verdict-1.out +56 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterTieInGraph/verdict-2.out +57 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterView/ChartRun.out +61 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterView/CounterView.cfg +4 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterView/CounterView.tla +14 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterView/chart.mmd +23 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterView/graph.dot +19 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterView/report.md +27 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterView/sany.out +2 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterView/verdict-1.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterView/verdict-1.out +56 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterView/verdict-2.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterView/verdict-2.out +64 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterView/verdict-3.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterView/verdict-3.out +87 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterView/verdict-4.out +57 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterView/view.mjs +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/DieHard/ChartRun.out +59 -0
- package/pstack/skills/statechart/scripts/test/corpus/DieHard/DieHard.cfg +4 -0
- package/pstack/skills/statechart/scripts/test/corpus/DieHard/DieHard.tla +38 -0
- package/pstack/skills/statechart/scripts/test/corpus/DieHard/chart.mmd +92 -0
- package/pstack/skills/statechart/scripts/test/corpus/DieHard/graph.dot +126 -0
- package/pstack/skills/statechart/scripts/test/corpus/DieHard/report.md +17 -0
- package/pstack/skills/statechart/scripts/test/corpus/DieHard/sany.out +2 -0
- package/pstack/skills/statechart/scripts/test/corpus/DieHard/verdict-1.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/DieHard/verdict-1.out +91 -0
- package/pstack/skills/statechart/scripts/test/corpus/DieHard/verdict-2.out +57 -0
- package/pstack/skills/statechart/scripts/test/corpus/FirstRule/ChartRun.out +61 -0
- package/pstack/skills/statechart/scripts/test/corpus/FirstRule/FirstRule.cfg +6 -0
- package/pstack/skills/statechart/scripts/test/corpus/FirstRule/FirstRule.tla +11 -0
- package/pstack/skills/statechart/scripts/test/corpus/FirstRule/chart.mmd +22 -0
- package/pstack/skills/statechart/scripts/test/corpus/FirstRule/graph.dot +16 -0
- package/pstack/skills/statechart/scripts/test/corpus/FirstRule/report.md +25 -0
- package/pstack/skills/statechart/scripts/test/corpus/FirstRule/sany.out +2 -0
- package/pstack/skills/statechart/scripts/test/corpus/FirstRule/verdict-1.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/FirstRule/verdict-1.out +56 -0
- package/pstack/skills/statechart/scripts/test/corpus/FirstRule/verdict-2.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/FirstRule/verdict-2.out +64 -0
- package/pstack/skills/statechart/scripts/test/corpus/FirstRule/verdict-3.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/FirstRule/verdict-3.out +64 -0
- package/pstack/skills/statechart/scripts/test/corpus/FirstRule/verdict-4.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/FirstRule/verdict-4.out +77 -0
- package/pstack/skills/statechart/scripts/test/corpus/HiddenClock/ChartRun.out +57 -0
- package/pstack/skills/statechart/scripts/test/corpus/HiddenClock/HiddenClock.cfg +4 -0
- package/pstack/skills/statechart/scripts/test/corpus/HiddenClock/HiddenClock.tla +11 -0
- package/pstack/skills/statechart/scripts/test/corpus/HiddenClock/chart.mmd +13 -0
- package/pstack/skills/statechart/scripts/test/corpus/HiddenClock/graph.dot +12 -0
- package/pstack/skills/statechart/scripts/test/corpus/HiddenClock/report.md +11 -0
- package/pstack/skills/statechart/scripts/test/corpus/HiddenClock/sany.out +2 -0
- package/pstack/skills/statechart/scripts/test/corpus/HiddenClock/verdict-1.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/HiddenClock/verdict-1.out +72 -0
- package/pstack/skills/statechart/scripts/test/corpus/Login/ChartRun.out +57 -0
- package/pstack/skills/statechart/scripts/test/corpus/Login/Login.cfg +3 -0
- package/pstack/skills/statechart/scripts/test/corpus/Login/Login.tla +62 -0
- package/pstack/skills/statechart/scripts/test/corpus/Login/chart.mmd +27 -0
- package/pstack/skills/statechart/scripts/test/corpus/Login/graph.dot +40 -0
- package/pstack/skills/statechart/scripts/test/corpus/Login/report.md +7 -0
- package/pstack/skills/statechart/scripts/test/corpus/Login/sany.out +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/Login/verdict-1.out +47 -0
- package/pstack/skills/statechart/scripts/test/corpus/Login/view.mjs +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/LoginGuarded/ChartRun.out +57 -0
- package/pstack/skills/statechart/scripts/test/corpus/LoginGuarded/LoginGuarded.cfg +2 -0
- package/pstack/skills/statechart/scripts/test/corpus/LoginGuarded/LoginGuarded.tla +64 -0
- package/pstack/skills/statechart/scripts/test/corpus/LoginGuarded/chart.mmd +28 -0
- package/pstack/skills/statechart/scripts/test/corpus/LoginGuarded/graph.dot +37 -0
- package/pstack/skills/statechart/scripts/test/corpus/LoginGuarded/report.md +8 -0
- package/pstack/skills/statechart/scripts/test/corpus/LoginGuarded/sany.out +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/LoginGuarded/verdict-1.out +47 -0
- package/pstack/skills/statechart/scripts/test/corpus/LoginGuarded/view.mjs +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/LoginParallel/ChartRun.out +60 -0
- package/pstack/skills/statechart/scripts/test/corpus/LoginParallel/LoginParallel.cfg +3 -0
- package/pstack/skills/statechart/scripts/test/corpus/LoginParallel/LoginParallel.tla +64 -0
- package/pstack/skills/statechart/scripts/test/corpus/LoginParallel/chart.mmd +44 -0
- package/pstack/skills/statechart/scripts/test/corpus/LoginParallel/graph.dot +58 -0
- package/pstack/skills/statechart/scripts/test/corpus/LoginParallel/report.md +17 -0
- package/pstack/skills/statechart/scripts/test/corpus/LoginParallel/sany.out +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/LoginParallel/verdict-1.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/LoginParallel/verdict-1.out +83 -0
- package/pstack/skills/statechart/scripts/test/corpus/LoginParallel/verdict-2.out +57 -0
- package/pstack/skills/statechart/scripts/test/corpus/LoginParallel/view.mjs +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/MediaPlayer/ChartRun.out +60 -0
- package/pstack/skills/statechart/scripts/test/corpus/MediaPlayer/MediaPlayer.cfg +3 -0
- package/pstack/skills/statechart/scripts/test/corpus/MediaPlayer/MediaPlayer.tla +103 -0
- package/pstack/skills/statechart/scripts/test/corpus/MediaPlayer/chart.mmd +43 -0
- package/pstack/skills/statechart/scripts/test/corpus/MediaPlayer/graph.dot +93 -0
- package/pstack/skills/statechart/scripts/test/corpus/MediaPlayer/report.md +14 -0
- package/pstack/skills/statechart/scripts/test/corpus/MediaPlayer/sany.out +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/MediaPlayer/verdict-1.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/MediaPlayer/verdict-1.out +59 -0
- package/pstack/skills/statechart/scripts/test/corpus/MediaPlayer/verdict-2.out +72 -0
- package/pstack/skills/statechart/scripts/test/corpus/MediaPlayer/view.mjs +3 -0
- package/pstack/skills/statechart/scripts/test/corpus/MediaPlayerFixed/ChartRun.out +57 -0
- package/pstack/skills/statechart/scripts/test/corpus/MediaPlayerFixed/MediaPlayerFixed.cfg +2 -0
- package/pstack/skills/statechart/scripts/test/corpus/MediaPlayerFixed/MediaPlayerFixed.tla +100 -0
- package/pstack/skills/statechart/scripts/test/corpus/MediaPlayerFixed/chart.mmd +31 -0
- package/pstack/skills/statechart/scripts/test/corpus/MediaPlayerFixed/graph.dot +85 -0
- package/pstack/skills/statechart/scripts/test/corpus/MediaPlayerFixed/report.md +9 -0
- package/pstack/skills/statechart/scripts/test/corpus/MediaPlayerFixed/sany.out +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/MediaPlayerFixed/verdict-1.out +47 -0
- package/pstack/skills/statechart/scripts/test/corpus/MediaPlayerFixed/view.mjs +3 -0
- package/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/ChartRun.out +59 -0
- package/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/MediaPlayer.tla +103 -0
- package/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/MediaPlayerProps.cfg +3 -0
- package/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/MediaPlayerProps.tla +6 -0
- package/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/chart.mmd +42 -0
- package/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/graph.dot +93 -0
- package/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/report.md +19 -0
- package/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/sany.out +2 -0
- package/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-1.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-1.out +61 -0
- package/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-2.out +59 -0
- package/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-3.out +61 -0
- package/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-4.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-4.out +66 -0
- package/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-5.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-5.out +58 -0
- package/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-6.out +49 -0
- package/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/view.mjs +3 -0
- package/pstack/skills/statechart/scripts/test/corpus/PickWorker/ChartRun.out +57 -0
- package/pstack/skills/statechart/scripts/test/corpus/PickWorker/PickWorker.cfg +6 -0
- package/pstack/skills/statechart/scripts/test/corpus/PickWorker/PickWorker.tla +11 -0
- package/pstack/skills/statechart/scripts/test/corpus/PickWorker/chart.mmd +5 -0
- package/pstack/skills/statechart/scripts/test/corpus/PickWorker/graph.dot +11 -0
- package/pstack/skills/statechart/scripts/test/corpus/PickWorker/report.md +7 -0
- package/pstack/skills/statechart/scripts/test/corpus/PickWorker/sany.out +5 -0
- package/pstack/skills/statechart/scripts/test/corpus/PickWorker/verdict-1.out +70 -0
- package/pstack/skills/statechart/scripts/test/corpus/Shadow/ChartRun.out +61 -0
- package/pstack/skills/statechart/scripts/test/corpus/Shadow/Shadow.cfg +4 -0
- package/pstack/skills/statechart/scripts/test/corpus/Shadow/Shadow.tla +11 -0
- package/pstack/skills/statechart/scripts/test/corpus/Shadow/ShadowLib.tla +6 -0
- package/pstack/skills/statechart/scripts/test/corpus/Shadow/ShadowSub.tla +3 -0
- package/pstack/skills/statechart/scripts/test/corpus/Shadow/chart.mmd +9 -0
- package/pstack/skills/statechart/scripts/test/corpus/Shadow/graph.dot +16 -0
- package/pstack/skills/statechart/scripts/test/corpus/Shadow/report.md +8 -0
- package/pstack/skills/statechart/scripts/test/corpus/Shadow/sany.out +4 -0
- package/pstack/skills/statechart/scripts/test/corpus/Shadow/verdict-1.out +65 -0
- package/pstack/skills/statechart/scripts/test/corpus/SpacedNames/ChartRun.out +59 -0
- package/pstack/skills/statechart/scripts/test/corpus/SpacedNames/SpacedNames.cfg +2 -0
- package/pstack/skills/statechart/scripts/test/corpus/SpacedNames/SpacedNames.tla +9 -0
- package/pstack/skills/statechart/scripts/test/corpus/SpacedNames/chart.mmd +23 -0
- package/pstack/skills/statechart/scripts/test/corpus/SpacedNames/graph.dot +17 -0
- package/pstack/skills/statechart/scripts/test/corpus/SpacedNames/report.md +15 -0
- package/pstack/skills/statechart/scripts/test/corpus/SpacedNames/sany.out +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/SpacedNames/verdict-1.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/SpacedNames/verdict-1.out +65 -0
- package/pstack/skills/statechart/scripts/test/corpus/SpacedNames/verdict-2.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/SpacedNames/verdict-2.out +75 -0
- package/pstack/skills/statechart/scripts/test/corpus/TwoPhase/ChartRun.out +69 -0
- package/pstack/skills/statechart/scripts/test/corpus/TwoPhase/TwoPhase.cfg +3 -0
- package/pstack/skills/statechart/scripts/test/corpus/TwoPhase/TwoPhase.tla +75 -0
- package/pstack/skills/statechart/scripts/test/corpus/TwoPhase/chart.mmd +60 -0
- package/pstack/skills/statechart/scripts/test/corpus/TwoPhase/graph.dot +297 -0
- package/pstack/skills/statechart/scripts/test/corpus/TwoPhase/report.md +20 -0
- package/pstack/skills/statechart/scripts/test/corpus/TwoPhase/sany.out +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/TwoPhase/verdict-1.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/TwoPhase/verdict-1.out +95 -0
- package/pstack/skills/statechart/scripts/test/corpus/TwoPhase/verdict-2.out +57 -0
- package/pstack/skills/statechart/scripts/test/corpus/TwoPhase/view.mjs +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/TwoPhaseFixed/ChartRun.out +57 -0
- package/pstack/skills/statechart/scripts/test/corpus/TwoPhaseFixed/TwoPhaseFixed.cfg +3 -0
- package/pstack/skills/statechart/scripts/test/corpus/TwoPhaseFixed/TwoPhaseFixed.tla +75 -0
- package/pstack/skills/statechart/scripts/test/corpus/TwoPhaseFixed/chart.mmd +37 -0
- package/pstack/skills/statechart/scripts/test/corpus/TwoPhaseFixed/graph.dot +223 -0
- package/pstack/skills/statechart/scripts/test/corpus/TwoPhaseFixed/report.md +11 -0
- package/pstack/skills/statechart/scripts/test/corpus/TwoPhaseFixed/sany.out +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/TwoPhaseFixed/verdict-1.out +47 -0
- package/pstack/skills/statechart/scripts/test/corpus/TwoPhaseFixed/view.mjs +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/TypeGuard/ChartRun.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/TypeGuard/ChartRun.out +75 -0
- package/pstack/skills/statechart/scripts/test/corpus/TypeGuard/TypeGuard.cfg +5 -0
- package/pstack/skills/statechart/scripts/test/corpus/TypeGuard/TypeGuard.tla +11 -0
- package/pstack/skills/statechart/scripts/test/corpus/TypeGuard/chart.mmd +18 -0
- package/pstack/skills/statechart/scripts/test/corpus/TypeGuard/graph.dot +14 -0
- package/pstack/skills/statechart/scripts/test/corpus/TypeGuard/report.md +29 -0
- package/pstack/skills/statechart/scripts/test/corpus/TypeGuard/sany.out +2 -0
- package/pstack/skills/statechart/scripts/test/corpus/TypeGuard/verdict-1.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/TypeGuard/verdict-1.out +64 -0
- package/pstack/skills/statechart/scripts/test/corpus/TypeGuard/verdict-2.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/TypeGuard/verdict-2.out +75 -0
- package/pstack/skills/statechart/scripts/test/corpus/UserNoDeadlock/ChartRun.out +58 -0
- package/pstack/skills/statechart/scripts/test/corpus/UserNoDeadlock/UserNoDeadlock.cfg +2 -0
- package/pstack/skills/statechart/scripts/test/corpus/UserNoDeadlock/UserNoDeadlock.tla +8 -0
- package/pstack/skills/statechart/scripts/test/corpus/UserNoDeadlock/chart.mmd +22 -0
- package/pstack/skills/statechart/scripts/test/corpus/UserNoDeadlock/graph.dot +16 -0
- package/pstack/skills/statechart/scripts/test/corpus/UserNoDeadlock/report.md +15 -0
- package/pstack/skills/statechart/scripts/test/corpus/UserNoDeadlock/sany.out +2 -0
- package/pstack/skills/statechart/scripts/test/corpus/UserNoDeadlock/verdict-1.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/UserNoDeadlock/verdict-1.out +56 -0
- package/pstack/skills/statechart/scripts/test/corpus/UserNoDeadlock/verdict-2.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/UserNoDeadlock/verdict-2.out +77 -0
- package/pstack/skills/statechart/scripts/test/corpus.test.ts +403 -0
- package/pstack/skills/statechart/scripts/test/differential.test.ts +565 -0
- package/pstack/skills/statechart/scripts/test/grid/Grid.cfg +2 -0
- package/pstack/skills/statechart/scripts/test/grid/Grid.tla +9 -0
- package/pstack/skills/statechart/scripts/test/grid/sany.out +2 -0
- package/pstack/skills/statechart/scripts/test/java.ts +63 -0
- package/pstack/skills/statechart/scripts/test/labels.ts +643 -0
- package/pstack/skills/statechart/scripts/test/messages.test.ts +212 -0
- package/pstack/skills/statechart/scripts/test/pipeline.test.ts +270 -0
- package/pstack/skills/statechart/scripts/test/plain-tlc.test.ts +255 -0
- package/pstack/skills/statechart/scripts/test/render.test.ts +81 -0
- package/pstack/skills/statechart/scripts/test/tlc-out.test.ts +90 -0
- package/pstack/skills/statechart/scripts/test/tlc.ts +158 -0
- package/pstack/skills/statechart/scripts/tsconfig.json +11 -0
- package/pstack/skills/statechart/scripts/worker.ts +35 -0
- package/pstack/skills/swarm/SKILL.md +47 -0
- package/pstack/skills/tdd/SKILL.md +42 -0
- package/pstack/skills/teach/SKILL.md +21 -0
- package/pstack/skills/technical-writing/SKILL.md +106 -0
- package/pstack/skills/thermo-nuclear-code-quality-review/SKILL.md +192 -0
- package/pstack/skills/thermo-nuclear-review/SKILL.md +51 -0
- package/pstack/skills/thermos/SKILL.md +21 -0
- package/pstack/skills/typescript-best-practices/SKILL.md +31 -0
- package/pstack/skills/typescript-best-practices/references/patterns.md +328 -0
- package/pstack/skills/unslop/SKILL.md +62 -0
- package/pstack/skills/what-did-i-get-done/SKILL.md +31 -0
- package/pstack/skills/why/SKILL.md +105 -0
- package/pstack/skills/why/references/epistemics.md +71 -0
- package/pstack/skills/why/references/investigator-prompt.md +84 -0
- package/pstack/skills/why/references/source-playbook.md +17 -0
- package/pstack/skills/why/references/sources/code-archaeology.md +51 -0
- package/pstack/skills/why/references/sources/databricks.md +70 -0
- package/pstack/skills/why/references/sources/datadog.md +97 -0
- package/pstack/skills/why/references/sources/incident-postmortem.md +5 -0
- package/pstack/skills/why/references/sources/linear.md +48 -0
- package/pstack/skills/why/references/sources/notion.md +55 -0
- package/pstack/skills/why/references/sources/sentry.md +66 -0
- package/pstack/skills/why/references/sources/slack.md +17 -0
- package/pstack/skills/why/references/synthesizer-prompt.md +129 -0
- package/src/accounts.ts +527 -0
- package/src/bash-timeout.ts +63 -0
- package/src/bridge-trim.ts +109 -0
- package/src/brief.ts +280 -0
- package/src/cards.ts +65 -0
- package/src/child.ts +570 -0
- package/src/failures.ts +73 -0
- package/src/models.ts +1249 -0
- package/src/plan.ts +252 -0
- package/src/resources.ts +30 -0
- package/src/results.ts +92 -0
- package/src/resume.ts +143 -0
- package/src/session.ts +70 -0
- package/src/state.ts +124 -0
- package/src/t3-http.ts +140 -0
- package/src/t3-json.ts +50 -0
- package/src/t3-mcp.ts +188 -0
- package/src/tasks.ts +163 -0
- package/src/transcript.ts +17 -0
- package/src/usage.ts +145 -0
- package/README.md +0 -3
|
@@ -0,0 +1,643 @@
|
|
|
1
|
+
import { inspect } from "node:util";
|
|
2
|
+
import { mermaid as chartText } from "../backends/mermaid.ts";
|
|
3
|
+
import { checkView } from "../frontends/view.ts";
|
|
4
|
+
import type { Chart, ChartState, State, Step, View } from "../ir.ts";
|
|
5
|
+
import { walk } from "../passes/reach.ts";
|
|
6
|
+
import { project } from "../pipeline.ts";
|
|
7
|
+
|
|
8
|
+
export type Render = (text: string) => { svg: string };
|
|
9
|
+
|
|
10
|
+
type MermaidNode = {
|
|
11
|
+
id: string;
|
|
12
|
+
label?: string;
|
|
13
|
+
shape?: string;
|
|
14
|
+
parentId?: string;
|
|
15
|
+
isGroup?: boolean;
|
|
16
|
+
dir?: string;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export type Mermaid = {
|
|
20
|
+
parse: (text: string) => Promise<unknown>;
|
|
21
|
+
mermaidAPI: {
|
|
22
|
+
getDiagramFromText: (text: string) => Promise<{
|
|
23
|
+
db: {
|
|
24
|
+
getData: () => {
|
|
25
|
+
nodes: MermaidNode[];
|
|
26
|
+
edges: { start: string; end: string; label?: string }[];
|
|
27
|
+
direction?: string;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
}>;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export type Html = (markup: string) => string;
|
|
35
|
+
|
|
36
|
+
type Tools = { render: Render; mermaid: Mermaid; html: Html };
|
|
37
|
+
|
|
38
|
+
const THEME = ["blue", "orange", "purple", "yellow", "teal", "tan", "pink"];
|
|
39
|
+
const WORDS = ["Idle", "Run", "a", "b", "x1", "ok", "Done", "waiting", "on", "off", "p q"];
|
|
40
|
+
const SYNTAX = [
|
|
41
|
+
"-->",
|
|
42
|
+
"[*]",
|
|
43
|
+
"{",
|
|
44
|
+
"}",
|
|
45
|
+
"[",
|
|
46
|
+
"]",
|
|
47
|
+
"(",
|
|
48
|
+
")",
|
|
49
|
+
":",
|
|
50
|
+
";",
|
|
51
|
+
"#",
|
|
52
|
+
"%%",
|
|
53
|
+
'"',
|
|
54
|
+
"'",
|
|
55
|
+
"`",
|
|
56
|
+
"|",
|
|
57
|
+
"\\",
|
|
58
|
+
":::",
|
|
59
|
+
"::: x",
|
|
60
|
+
"--",
|
|
61
|
+
"---",
|
|
62
|
+
"<<fork>>",
|
|
63
|
+
"<<join>>",
|
|
64
|
+
"<<choice>>",
|
|
65
|
+
"[[fork]]",
|
|
66
|
+
"[[join]]",
|
|
67
|
+
"[[choice]]",
|
|
68
|
+
"<br>",
|
|
69
|
+
"<b>x</b>",
|
|
70
|
+
"<a",
|
|
71
|
+
"<a=",
|
|
72
|
+
"=",
|
|
73
|
+
"&",
|
|
74
|
+
"<",
|
|
75
|
+
";",
|
|
76
|
+
""",
|
|
77
|
+
"#quot;",
|
|
78
|
+
"#59;",
|
|
79
|
+
"#35;",
|
|
80
|
+
"**",
|
|
81
|
+
"__",
|
|
82
|
+
"*",
|
|
83
|
+
"_",
|
|
84
|
+
"~~",
|
|
85
|
+
"$$",
|
|
86
|
+
"${x}",
|
|
87
|
+
"state",
|
|
88
|
+
"as",
|
|
89
|
+
"note",
|
|
90
|
+
"end",
|
|
91
|
+
"class",
|
|
92
|
+
"classDef",
|
|
93
|
+
"style",
|
|
94
|
+
"click",
|
|
95
|
+
"direction LR",
|
|
96
|
+
"direction TB",
|
|
97
|
+
"Direction rl",
|
|
98
|
+
"direction\tBT",
|
|
99
|
+
"direction LR",
|
|
100
|
+
"accTitle: x",
|
|
101
|
+
"accDescr: y",
|
|
102
|
+
"title: t",
|
|
103
|
+
"%%{",
|
|
104
|
+
"}%%",
|
|
105
|
+
"%%{init: {}}%%",
|
|
106
|
+
"C4Context",
|
|
107
|
+
"C4Container",
|
|
108
|
+
"C4Component",
|
|
109
|
+
"C4Dynamic",
|
|
110
|
+
"C4Deployment",
|
|
111
|
+
" ",
|
|
112
|
+
"\\n",
|
|
113
|
+
"---\n",
|
|
114
|
+
"`**b**`",
|
|
115
|
+
"fl°°65¶ß",
|
|
116
|
+
"fl°lt¶ß",
|
|
117
|
+
'marker-end="url(a#',
|
|
118
|
+
"<<",
|
|
119
|
+
">>",
|
|
120
|
+
"<<a>>",
|
|
121
|
+
"|->",
|
|
122
|
+
":>",
|
|
123
|
+
"@@",
|
|
124
|
+
"/\\",
|
|
125
|
+
"\\/",
|
|
126
|
+
"..",
|
|
127
|
+
'"A"',
|
|
128
|
+
'x="a"',
|
|
129
|
+
"[a |-> 1]",
|
|
130
|
+
"{1, 2}",
|
|
131
|
+
'"\\n"',
|
|
132
|
+
"&",
|
|
133
|
+
"<",
|
|
134
|
+
">",
|
|
135
|
+
"@",
|
|
136
|
+
"~",
|
|
137
|
+
"^",
|
|
138
|
+
"$",
|
|
139
|
+
"%",
|
|
140
|
+
];
|
|
141
|
+
const SPACE = [
|
|
142
|
+
" ",
|
|
143
|
+
" ",
|
|
144
|
+
"\t",
|
|
145
|
+
"\n",
|
|
146
|
+
"\r",
|
|
147
|
+
"\r\n",
|
|
148
|
+
"\v",
|
|
149
|
+
"\f",
|
|
150
|
+
"\u00a0",
|
|
151
|
+
"\u2028",
|
|
152
|
+
"\u2029",
|
|
153
|
+
"\u0085",
|
|
154
|
+
"\u200b",
|
|
155
|
+
"\ufeff",
|
|
156
|
+
"\u3000",
|
|
157
|
+
];
|
|
158
|
+
const OTHER = [
|
|
159
|
+
"é",
|
|
160
|
+
"ü",
|
|
161
|
+
"中文",
|
|
162
|
+
"😀",
|
|
163
|
+
"👩💻",
|
|
164
|
+
"e\u0301",
|
|
165
|
+
"\u202e",
|
|
166
|
+
"\u200f",
|
|
167
|
+
"ß",
|
|
168
|
+
"Ω",
|
|
169
|
+
"\ud800",
|
|
170
|
+
"\x7f",
|
|
171
|
+
"\x80",
|
|
172
|
+
"\x9f",
|
|
173
|
+
"\x1b",
|
|
174
|
+
"\x00",
|
|
175
|
+
];
|
|
176
|
+
const BAD_COLORS: unknown[] = [
|
|
177
|
+
"pink\n s99: Ghost state",
|
|
178
|
+
"blue\r\nclassDef x fill:#f00",
|
|
179
|
+
"teal\r",
|
|
180
|
+
" pink",
|
|
181
|
+
"Pink",
|
|
182
|
+
"red",
|
|
183
|
+
"#00f",
|
|
184
|
+
"breaks",
|
|
185
|
+
"mayBreak",
|
|
186
|
+
"bugPath",
|
|
187
|
+
"repeats",
|
|
188
|
+
"toString",
|
|
189
|
+
"",
|
|
190
|
+
null,
|
|
191
|
+
7,
|
|
192
|
+
["blue"],
|
|
193
|
+
];
|
|
194
|
+
|
|
195
|
+
const random = (seed: number) => {
|
|
196
|
+
let a = seed >>> 0;
|
|
197
|
+
const next = () => {
|
|
198
|
+
a = (a + 0x6d2b79f5) >>> 0;
|
|
199
|
+
let t = a;
|
|
200
|
+
t = Math.imul(t ^ (t >>> 15), t | 1);
|
|
201
|
+
t ^= t + Math.imul(t ^ (t >>> 7), t | 61);
|
|
202
|
+
return ((t ^ (t >>> 14)) >>> 0) / 4294967296;
|
|
203
|
+
};
|
|
204
|
+
const int = (n: number) => Math.floor(next() * n);
|
|
205
|
+
return {
|
|
206
|
+
int,
|
|
207
|
+
range: (lo: number, hi: number) => lo + int(hi - lo + 1),
|
|
208
|
+
chance: (p: number) => next() < p,
|
|
209
|
+
pick: <T>(items: readonly T[]) => items[int(items.length)],
|
|
210
|
+
};
|
|
211
|
+
};
|
|
212
|
+
|
|
213
|
+
type Random = ReturnType<typeof random>;
|
|
214
|
+
|
|
215
|
+
const label = (r: Random) => {
|
|
216
|
+
let s = "";
|
|
217
|
+
for (let n = r.range(1, 4); n > 0; n--) {
|
|
218
|
+
const k = r.int(13);
|
|
219
|
+
if (k < 4) s += r.pick(WORDS);
|
|
220
|
+
else if (k < 7) s += r.pick(SYNTAX);
|
|
221
|
+
else if (k < 9) s += r.pick(SPACE);
|
|
222
|
+
else if (k < 11) s += r.pick(OTHER);
|
|
223
|
+
else s += String.fromCharCode(32 + r.int(95));
|
|
224
|
+
}
|
|
225
|
+
return s;
|
|
226
|
+
};
|
|
227
|
+
|
|
228
|
+
const color = (r: Random) => {
|
|
229
|
+
if (r.chance(0.85)) return r.pick(THEME);
|
|
230
|
+
const k = r.int(3);
|
|
231
|
+
if (k === 0) return r.pick(BAD_COLORS);
|
|
232
|
+
if (k === 1) return r.pick(THEME) + r.pick(SPACE) + label(r);
|
|
233
|
+
return label(r);
|
|
234
|
+
};
|
|
235
|
+
|
|
236
|
+
const several = <T>(n: number, make: () => T) => {
|
|
237
|
+
const out: T[] = [];
|
|
238
|
+
for (let i = 0; i < n; i++) out.push(make());
|
|
239
|
+
return out;
|
|
240
|
+
};
|
|
241
|
+
|
|
242
|
+
type Shape =
|
|
243
|
+
| { mode: "flat"; leaf: number[] }
|
|
244
|
+
| { mode: "parents"; leaf: number[]; parents: number[]; parentOf: number[] }
|
|
245
|
+
| { mode: "regions"; regions: number[]; pools: number[][]; values: number[][] };
|
|
246
|
+
|
|
247
|
+
type Groups =
|
|
248
|
+
| { groups?: undefined; colors?: undefined; groupOf?: undefined }
|
|
249
|
+
| { groups: number[]; colors: unknown[]; groupOf: number[] };
|
|
250
|
+
|
|
251
|
+
type Case = Shape &
|
|
252
|
+
Groups & { n: number; labels: string[]; actions: number[]; steps: number[][]; title?: number };
|
|
253
|
+
|
|
254
|
+
function generate(r: Random): Case {
|
|
255
|
+
const labels: string[] = [];
|
|
256
|
+
const slot = () => labels.push(label(r)) - 1;
|
|
257
|
+
const k = r.int(10);
|
|
258
|
+
const mode = k < 4 ? "flat" : k < 7 ? "parents" : "regions";
|
|
259
|
+
const n = r.range(2, 4);
|
|
260
|
+
let shape: Shape;
|
|
261
|
+
if (mode === "regions") {
|
|
262
|
+
shape = {
|
|
263
|
+
mode,
|
|
264
|
+
regions: [slot(), slot()],
|
|
265
|
+
pools: [
|
|
266
|
+
[slot(), slot()],
|
|
267
|
+
[slot(), slot()],
|
|
268
|
+
],
|
|
269
|
+
values: several(n, () => [r.int(2), r.int(2)]),
|
|
270
|
+
};
|
|
271
|
+
} else {
|
|
272
|
+
const leaf = several(n, slot);
|
|
273
|
+
if (mode === "parents") {
|
|
274
|
+
const parents = r.chance(0.5) ? [slot(), slot()] : [slot()];
|
|
275
|
+
const parentOf = several(n, () => (r.chance(0.75) ? r.int(parents.length) : -1));
|
|
276
|
+
shape = { mode, leaf, parents, parentOf };
|
|
277
|
+
} else shape = { mode, leaf };
|
|
278
|
+
}
|
|
279
|
+
const actions = several(r.range(1, 3), slot);
|
|
280
|
+
const steps = several(r.range(1, 5), () => [r.int(n), r.int(n), r.int(actions.length)]);
|
|
281
|
+
let groups: Groups = {};
|
|
282
|
+
if (r.chance(0.4)) {
|
|
283
|
+
const named = several(r.range(1, 2), slot);
|
|
284
|
+
const colors = several(named.length, () => color(r));
|
|
285
|
+
const groupOf = several(n, () => (r.chance(0.8) ? r.int(named.length) : -1));
|
|
286
|
+
groups = { groups: named, colors, groupOf };
|
|
287
|
+
}
|
|
288
|
+
const title = r.chance(0.3) ? slot() : undefined;
|
|
289
|
+
return { ...shape, ...groups, n, labels, actions, steps, title };
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
type RawView = {
|
|
293
|
+
state: (vars: { k: number }) => unknown;
|
|
294
|
+
step: (action: string) => string;
|
|
295
|
+
group?: (vars: { k: number }) => string | undefined;
|
|
296
|
+
colors?: { [group: string]: unknown };
|
|
297
|
+
title?: string;
|
|
298
|
+
};
|
|
299
|
+
|
|
300
|
+
function build(c: Case, labels: string[]) {
|
|
301
|
+
const states = new Map<string, State>();
|
|
302
|
+
for (let i = 0; i < c.n; i++)
|
|
303
|
+
states.set(String(i), { vars: { k: i }, start: i === 0, breaks: [] });
|
|
304
|
+
const steps: Step[] = [];
|
|
305
|
+
for (const [from, to, a] of c.steps)
|
|
306
|
+
steps.push({ from: String(from), to: String(to), action: `A${a}` });
|
|
307
|
+
const view: RawView = {
|
|
308
|
+
state: ({ k }) => {
|
|
309
|
+
if (c.mode === "regions") {
|
|
310
|
+
const shape: [string, string][] = [];
|
|
311
|
+
for (let j = 0; j < c.regions.length; j++)
|
|
312
|
+
shape.push([labels[c.regions[j]], labels[c.pools[j][c.values[k][j]]]]);
|
|
313
|
+
return Object.fromEntries(shape);
|
|
314
|
+
}
|
|
315
|
+
const leaf = labels[c.leaf[k]];
|
|
316
|
+
return c.mode === "parents" && c.parentOf[k] >= 0
|
|
317
|
+
? [labels[c.parents[c.parentOf[k]]], leaf]
|
|
318
|
+
: leaf;
|
|
319
|
+
},
|
|
320
|
+
step: (action) => labels[c.actions[Number(action.slice(1))]],
|
|
321
|
+
};
|
|
322
|
+
if (c.groups) {
|
|
323
|
+
view.group = ({ k }) => (c.groupOf[k] < 0 ? undefined : labels[c.groups[c.groupOf[k]]]);
|
|
324
|
+
const colors: [string, unknown][] = [];
|
|
325
|
+
for (let j = 0; j < c.groups.length; j++) colors.push([labels[c.groups[j]], c.colors[j]]);
|
|
326
|
+
view.colors = Object.fromEntries(colors);
|
|
327
|
+
}
|
|
328
|
+
if (c.title !== undefined) view.title = labels[c.title];
|
|
329
|
+
return { graph: { states, steps }, view };
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
const visible = (s: string) =>
|
|
333
|
+
s
|
|
334
|
+
.toWellFormed()
|
|
335
|
+
.replace(/(?![\t-\r\x85])[\p{Cc}\u200b-\u200f\u202a-\u202e\u2060-\u2069\ufeff]/gu, "")
|
|
336
|
+
.replace(/\p{White_Space}+/gu, " ")
|
|
337
|
+
.trim();
|
|
338
|
+
const wrapped = (s: string) => visible(s).replaceAll(" ", "");
|
|
339
|
+
const titled = (want: Want) => /[^\0\x80-\x84\x86-\x9f]/.test(want.title ?? "");
|
|
340
|
+
const NAMED: { [name: string]: string } = {
|
|
341
|
+
quot: '"',
|
|
342
|
+
lt: "<",
|
|
343
|
+
gt: ">",
|
|
344
|
+
amp: "&",
|
|
345
|
+
apos: "'",
|
|
346
|
+
nbsp: "\u00a0",
|
|
347
|
+
};
|
|
348
|
+
const WINDOWS_1252 = "€\x81‚ƒ„…†‡ˆ‰Š‹Œ\x8dŽ\x8f\x90‘’“”•–—˜™š›œ\x9džŸ";
|
|
349
|
+
const fromRef = (n: number) => {
|
|
350
|
+
if (n === 0 || n > 0x10ffff || (n >= 0xd800 && n <= 0xdfff)) return "\ufffd";
|
|
351
|
+
if (n >= 0x80 && n <= 0x9f) return WINDOWS_1252[n - 0x80];
|
|
352
|
+
return String.fromCodePoint(n);
|
|
353
|
+
};
|
|
354
|
+
const fromMermaid = (s: string) =>
|
|
355
|
+
s.replace(/fl°°(\d+)¶ß|fl°(\w+)¶ß/g, (_, d, n) =>
|
|
356
|
+
d ? fromRef(Number(d)) : (NAMED[n] ?? `&${n};`),
|
|
357
|
+
);
|
|
358
|
+
const decoded = (s: string) =>
|
|
359
|
+
s
|
|
360
|
+
.replace(/fl°°/g, "&#")
|
|
361
|
+
.replace(/fl°/g, "&")
|
|
362
|
+
.replace(/¶ß/g, ";");
|
|
363
|
+
const MARKER_END = /marker-end="url\([\d+./:=?A-Za-z-]*?#/g;
|
|
364
|
+
const rewritten = (s: string) =>
|
|
365
|
+
/fl°|¶ß/.test(s) || s.replace(MARKER_END, 'marker-end="url(#') !== s;
|
|
366
|
+
const fromSvg = (s: string) =>
|
|
367
|
+
s
|
|
368
|
+
.replace(/<\/tspan>\s*<tspan[^>]*>/g, " ")
|
|
369
|
+
.replace(/<[^>]*>/g, "")
|
|
370
|
+
.replace(/&#x([0-9a-f]+);/gi, (_, h) => fromRef(parseInt(h, 16)))
|
|
371
|
+
.replace(/&#(\d+);/g, (_, d) => fromRef(Number(d)))
|
|
372
|
+
.replace(/&(quot|lt|gt|apos|nbsp);/g, (_, n) => NAMED[n])
|
|
373
|
+
.replace(/&/g, "&");
|
|
374
|
+
|
|
375
|
+
type Node = { text: string; parent: string | null; group: boolean };
|
|
376
|
+
|
|
377
|
+
type Want = {
|
|
378
|
+
nodes: Map<string, Node>;
|
|
379
|
+
edges: string[][];
|
|
380
|
+
direction: string;
|
|
381
|
+
title: string | undefined;
|
|
382
|
+
};
|
|
383
|
+
|
|
384
|
+
function expected(chart: Chart): Want {
|
|
385
|
+
const nodes = new Map<string, Node>();
|
|
386
|
+
const edges: string[][] = [];
|
|
387
|
+
const ids = new Map<string, string>();
|
|
388
|
+
const id = (region: string, path: string[]) => {
|
|
389
|
+
const key = JSON.stringify([region, path]);
|
|
390
|
+
const found = ids.get(key) ?? `s${ids.size}`;
|
|
391
|
+
ids.set(key, found);
|
|
392
|
+
return found;
|
|
393
|
+
};
|
|
394
|
+
const multi = chart.regions.length > 1;
|
|
395
|
+
const used = new Set<string>();
|
|
396
|
+
if (multi) nodes.set("all", { text: "At the same time", parent: null, group: true });
|
|
397
|
+
for (let i = 0; i < chart.regions.length; i++) {
|
|
398
|
+
const region = chart.regions[i];
|
|
399
|
+
const wrap = multi ? `r${i}` : null;
|
|
400
|
+
if (wrap) nodes.set(wrap, { text: region.name, parent: "all", group: true });
|
|
401
|
+
const tree = (prefix: string[], parent: string | null, below: ChartState[]) => {
|
|
402
|
+
const heads = new Map<string, ChartState[]>();
|
|
403
|
+
for (const s of below) {
|
|
404
|
+
const head = s.path[prefix.length];
|
|
405
|
+
heads.set(head, [...(heads.get(head) ?? []), s]);
|
|
406
|
+
}
|
|
407
|
+
for (const [head, under] of heads) {
|
|
408
|
+
const path = [...prefix, head];
|
|
409
|
+
const inner: ChartState[] = [];
|
|
410
|
+
let leaf: ChartState | undefined;
|
|
411
|
+
for (const s of under)
|
|
412
|
+
if (s.path.length > path.length) inner.push(s);
|
|
413
|
+
else leaf = s;
|
|
414
|
+
const node = id(region.name, path);
|
|
415
|
+
nodes.set(node, { text: head, parent, group: inner.length > 0 });
|
|
416
|
+
if (inner.length) tree(path, node, inner);
|
|
417
|
+
else if (leaf?.group !== undefined) used.add(chart.colors[String(leaf.group)]);
|
|
418
|
+
}
|
|
419
|
+
};
|
|
420
|
+
tree([], wrap, region.states);
|
|
421
|
+
for (const s of region.states)
|
|
422
|
+
if (s.start) edges.push([`${wrap ?? "root"}_start`, id(region.name, s.path), ""]);
|
|
423
|
+
for (const s of region.steps)
|
|
424
|
+
edges.push([
|
|
425
|
+
id(region.name, s.from),
|
|
426
|
+
id(region.name, s.to),
|
|
427
|
+
s.label + (s.when ? ` [${s.when}]` : ""),
|
|
428
|
+
]);
|
|
429
|
+
}
|
|
430
|
+
let legend = 0;
|
|
431
|
+
for (const [text, cls] of Object.entries(chart.colors))
|
|
432
|
+
if (used.has(cls)) nodes.set(`lg${legend++}`, { text, parent: "legend", group: false });
|
|
433
|
+
if (legend) nodes.set("legend", { text: "Legend", parent: null, group: true });
|
|
434
|
+
return { nodes, edges, direction: multi ? "LR" : "TB", title: chart.title };
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
const edgeKeys = (edges: string[][], withLabels: boolean) => {
|
|
438
|
+
const keys: string[] = [];
|
|
439
|
+
for (const [from, to, text] of edges)
|
|
440
|
+
keys.push(withLabels ? `${from} ${to} ${visible(text)}` : `${from} ${to}`);
|
|
441
|
+
return keys.sort().join("\n");
|
|
442
|
+
};
|
|
443
|
+
|
|
444
|
+
async function readMermaid(text: string, want: Want, { mermaid, html }: Tools, problems: string[]) {
|
|
445
|
+
let data;
|
|
446
|
+
try {
|
|
447
|
+
data = (await mermaid.mermaidAPI.getDiagramFromText(text)).db.getData();
|
|
448
|
+
} catch (e) {
|
|
449
|
+
if (!(e instanceof Error)) throw e;
|
|
450
|
+
problems.push(`mermaid-refuses: ${e.message.split("\n")[0]}`);
|
|
451
|
+
return;
|
|
452
|
+
}
|
|
453
|
+
const byId = new Map<string | undefined, MermaidNode>();
|
|
454
|
+
for (const n of data.nodes) byId.set(n.id, n);
|
|
455
|
+
let count = 0;
|
|
456
|
+
for (const n of data.nodes) {
|
|
457
|
+
if (n.shape === "divider" || n.shape === "stateStart" || n.shape === "stateEnd") continue;
|
|
458
|
+
count++;
|
|
459
|
+
let parent = byId.get(n.parentId);
|
|
460
|
+
while (parent?.shape === "divider") parent = byId.get(parent.parentId);
|
|
461
|
+
const w = want.nodes.get(n.id);
|
|
462
|
+
const shown = fromMermaid(n.label ?? "");
|
|
463
|
+
if (!w || (parent?.id ?? null) !== w.parent || Boolean(n.isGroup) !== w.group)
|
|
464
|
+
problems.push(`mermaid-nodes: Mermaid draws ${n.id} where the chart has no such node`);
|
|
465
|
+
else if (rewritten(shown))
|
|
466
|
+
problems.push(
|
|
467
|
+
`mermaid-text: Mermaid's SVG cleanup rewrites ${n.id}'s ${JSON.stringify(shown)}`,
|
|
468
|
+
);
|
|
469
|
+
else if (visible(html(decoded(n.label ?? ""))) !== visible(w.text))
|
|
470
|
+
problems.push(
|
|
471
|
+
`mermaid-text: ${n.id} shows ${JSON.stringify(html(decoded(n.label ?? "")))} for ${JSON.stringify(w.text)}`,
|
|
472
|
+
);
|
|
473
|
+
if (n.isGroup && n.dir && n.dir !== "TB")
|
|
474
|
+
problems.push(`mermaid-direction: ${n.id} runs ${n.dir}`);
|
|
475
|
+
}
|
|
476
|
+
if (count !== want.nodes.size)
|
|
477
|
+
problems.push(`mermaid-nodes: ${count} nodes for ${want.nodes.size}`);
|
|
478
|
+
if ((data.direction ?? "TB") !== want.direction)
|
|
479
|
+
problems.push(`mermaid-direction: the chart runs ${data.direction}`);
|
|
480
|
+
const head = text.match(/^---\ntitle: (.*)\n---\n/);
|
|
481
|
+
const raw = head ? String(JSON.parse(head[1])) : undefined;
|
|
482
|
+
const title = raw === undefined ? undefined : fromMermaid(raw);
|
|
483
|
+
if ((title !== undefined) !== titled(want))
|
|
484
|
+
problems.push(`mermaid-title: Mermaid draws a title for ${JSON.stringify(want.title)}`);
|
|
485
|
+
else if (raw?.includes("<"))
|
|
486
|
+
problems.push(
|
|
487
|
+
`mermaid-title: Mermaid's sanitizer reads the < in ${JSON.stringify(raw)} as a tag`,
|
|
488
|
+
);
|
|
489
|
+
else if (title?.includes("\0"))
|
|
490
|
+
problems.push(`mermaid-title: a browser draws the NUL in ${JSON.stringify(title)} as U+FFFD`);
|
|
491
|
+
else if (title !== undefined && visible(title) !== visible(want.title ?? ""))
|
|
492
|
+
problems.push(
|
|
493
|
+
`mermaid-text: the title shows ${JSON.stringify(title)} for ${JSON.stringify(want.title)}`,
|
|
494
|
+
);
|
|
495
|
+
const got: string[][] = [];
|
|
496
|
+
const shown: string[][] = [];
|
|
497
|
+
for (const e of data.edges) {
|
|
498
|
+
got.push([e.start, e.end, fromMermaid(e.label ?? "")]);
|
|
499
|
+
shown.push([e.start, e.end, html(decoded(e.label ?? ""))]);
|
|
500
|
+
}
|
|
501
|
+
if (edgeKeys(got, false) !== edgeKeys(want.edges, false))
|
|
502
|
+
problems.push("mermaid-edges: the arrows join other states");
|
|
503
|
+
else if (edgeKeys(shown, true) !== edgeKeys(want.edges, true))
|
|
504
|
+
problems.push("mermaid-text: an arrow shows other text");
|
|
505
|
+
for (const [from, to, text] of got)
|
|
506
|
+
if (rewritten(text))
|
|
507
|
+
problems.push(
|
|
508
|
+
`mermaid-text: Mermaid's SVG cleanup rewrites the arrow from ${from} to ${to}'s ${JSON.stringify(text)}`,
|
|
509
|
+
);
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
function readPele(text: string, want: Want, render: Render, problems: string[]) {
|
|
513
|
+
let svg: string;
|
|
514
|
+
try {
|
|
515
|
+
({ svg } = render(text));
|
|
516
|
+
} catch (e) {
|
|
517
|
+
if (!(e instanceof Error)) throw e;
|
|
518
|
+
problems.push(`pele-refuses: ${e.message.split("\n")[0]}`);
|
|
519
|
+
return;
|
|
520
|
+
}
|
|
521
|
+
const drawn = new Map<string, string>();
|
|
522
|
+
for (const m of svg.matchAll(
|
|
523
|
+
/<g class="pele-(?:node|cluster) ([^"]*)" data-id="([^"]*)"[^>]*>([\s\S]*?)<\/g>/g,
|
|
524
|
+
)) {
|
|
525
|
+
if (/state-(start|end)/.test(m[1])) continue;
|
|
526
|
+
const t = m[3].match(/<text[^>]*>([\s\S]*?)<\/text>/);
|
|
527
|
+
drawn.set(m[2], t ? fromSvg(t[1]) : "");
|
|
528
|
+
}
|
|
529
|
+
if (drawn.size !== want.nodes.size)
|
|
530
|
+
problems.push(`pele-nodes: ${drawn.size} nodes for ${want.nodes.size}`);
|
|
531
|
+
for (const [node, w] of want.nodes) {
|
|
532
|
+
const shown = drawn.get(node);
|
|
533
|
+
if (shown === undefined) problems.push(`pele-nodes: Pele draws no ${node}`);
|
|
534
|
+
else if (wrapped(shown) !== wrapped(w.text))
|
|
535
|
+
problems.push(
|
|
536
|
+
`pele-text: ${node} shows ${JSON.stringify(shown)} for ${JSON.stringify(w.text)}`,
|
|
537
|
+
);
|
|
538
|
+
}
|
|
539
|
+
let arrows = 0;
|
|
540
|
+
for (const _ of svg.matchAll(/<g class="pele-edge pele-transition"/g)) arrows++;
|
|
541
|
+
if (arrows !== want.edges.length)
|
|
542
|
+
problems.push(`pele-edges: ${arrows} arrows for ${want.edges.length}`);
|
|
543
|
+
for (const m of svg.matchAll(
|
|
544
|
+
/<g class="pele-edge-label" data-id="edge(\d+)"[^>]*>[\s\S]*?<text[^>]*>([\s\S]*?)<\/text>/g,
|
|
545
|
+
)) {
|
|
546
|
+
const w = want.edges[Number(m[1])];
|
|
547
|
+
if (!w) problems.push(`pele-edges: Pele labels edge${m[1]}, which the chart does not have`);
|
|
548
|
+
else if (wrapped(fromSvg(m[2])) !== wrapped(w[2]))
|
|
549
|
+
problems.push(
|
|
550
|
+
`pele-text: edge${m[1]} shows ${JSON.stringify(fromSvg(m[2]))} for ${JSON.stringify(w[2])}`,
|
|
551
|
+
);
|
|
552
|
+
}
|
|
553
|
+
const title = svg.match(/<text class="pele-title"[^>]*>([\s\S]*?)<\/text>/);
|
|
554
|
+
if (Boolean(title) !== titled(want))
|
|
555
|
+
problems.push(`pele-title: Pele draws a title for ${JSON.stringify(want.title)}`);
|
|
556
|
+
else if (title && wrapped(fromSvg(title[1])) !== wrapped(want.title ?? ""))
|
|
557
|
+
problems.push(
|
|
558
|
+
`pele-text: the title shows ${JSON.stringify(fromSvg(title[1]))} for ${JSON.stringify(want.title)}`,
|
|
559
|
+
);
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
type Checked = { refused?: true; text?: string; problems: string[] };
|
|
563
|
+
|
|
564
|
+
async function check(c: Case, labels: string[], tools: Tools): Promise<Checked> {
|
|
565
|
+
const { graph, view } = build(c, labels);
|
|
566
|
+
let refuse = false;
|
|
567
|
+
for (const [, value] of Object.entries(view.colors ?? {}))
|
|
568
|
+
if (typeof value !== "string" || !THEME.includes(value)) refuse = true;
|
|
569
|
+
let checked: View;
|
|
570
|
+
try {
|
|
571
|
+
checked = checkView(view, inspect);
|
|
572
|
+
} catch (e) {
|
|
573
|
+
if (!(e instanceof Error)) throw e;
|
|
574
|
+
if (refuse && /^The view's colors give /.test(e.message))
|
|
575
|
+
return { refused: true, problems: [] };
|
|
576
|
+
return { problems: [`skill-throws: ${e.message}`] };
|
|
577
|
+
}
|
|
578
|
+
if (refuse) return { problems: ["colors: checkView accepts a color that is not in the theme"] };
|
|
579
|
+
let chart: Chart;
|
|
580
|
+
let text: string;
|
|
581
|
+
try {
|
|
582
|
+
({ chart } = project(graph, walk(graph), checked, []));
|
|
583
|
+
text = chartText(chart);
|
|
584
|
+
} catch (e) {
|
|
585
|
+
if (!(e instanceof Error)) throw e;
|
|
586
|
+
if (/^The view's (state|step)\(\) returned /.test(e.message))
|
|
587
|
+
return { refused: true, problems: [] };
|
|
588
|
+
return { problems: [`skill-throws: ${e.constructor.name}: ${e.message}`] };
|
|
589
|
+
}
|
|
590
|
+
const want = expected(chart);
|
|
591
|
+
const problems: string[] = [];
|
|
592
|
+
await readMermaid(text, want, tools, problems);
|
|
593
|
+
readPele(text, want, tools.render, problems);
|
|
594
|
+
return { text, problems };
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
const kind = (problem: string) => problem.slice(0, problem.indexOf(":"));
|
|
598
|
+
|
|
599
|
+
export async function fuzz({
|
|
600
|
+
seed,
|
|
601
|
+
charts,
|
|
602
|
+
...tools
|
|
603
|
+
}: { seed: number; charts: number } & Tools): Promise<{
|
|
604
|
+
drawn: number;
|
|
605
|
+
refused: number;
|
|
606
|
+
failure?: string;
|
|
607
|
+
}> {
|
|
608
|
+
await tools.mermaid.parse("stateDiagram-v2\n s0: a");
|
|
609
|
+
const r = random(seed);
|
|
610
|
+
let drawn = 0;
|
|
611
|
+
let refused = 0;
|
|
612
|
+
for (let i = 1; i <= charts; i++) {
|
|
613
|
+
const c = generate(r);
|
|
614
|
+
const result = await check(c, c.labels, tools);
|
|
615
|
+
if (result.refused) refused++;
|
|
616
|
+
else drawn++;
|
|
617
|
+
if (!result.problems.length) continue;
|
|
618
|
+
const first = kind(result.problems[0]);
|
|
619
|
+
let labels = c.labels;
|
|
620
|
+
for (let j = 0; j < labels.length; j++) {
|
|
621
|
+
const plain = labels.with(j, `n${j}`);
|
|
622
|
+
const again = await check(c, plain, tools);
|
|
623
|
+
let same = false;
|
|
624
|
+
for (const p of again.problems) if (kind(p) === first) same = true;
|
|
625
|
+
if (same) labels = plain;
|
|
626
|
+
}
|
|
627
|
+
const kept = [];
|
|
628
|
+
for (let j = 0; j < labels.length; j++) if (labels[j] !== `n${j}`) kept.push(labels[j]);
|
|
629
|
+
const last = await check(c, labels, tools);
|
|
630
|
+
const colors = c.colors ? ` and the colors ${JSON.stringify(c.colors)}` : "";
|
|
631
|
+
return {
|
|
632
|
+
drawn,
|
|
633
|
+
refused,
|
|
634
|
+
failure: [
|
|
635
|
+
`Chart ${i} of seed ${seed} goes wrong with the labels ${JSON.stringify(kept)}${colors}:`,
|
|
636
|
+
...last.problems,
|
|
637
|
+
"",
|
|
638
|
+
last.text ?? "",
|
|
639
|
+
].join("\n"),
|
|
640
|
+
};
|
|
641
|
+
}
|
|
642
|
+
return { drawn, refused };
|
|
643
|
+
}
|