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.
Files changed (544) hide show
  1. package/README.md +122 -76
  2. package/README.zh.md +116 -70
  3. package/assets/agent-presets.png +0 -0
  4. package/assets/plugin-configure.png +0 -0
  5. package/assets/plugin-recommended.png +0 -0
  6. package/assets/plugin-roles.png +0 -0
  7. package/assets/session-preset.png +0 -0
  8. package/cordis.patch.yml +332 -24
  9. package/dist/budget.d.mts +82 -0
  10. package/dist/budget.mjs +293 -0
  11. package/dist/catalogue-wgVaGeUx.d.mts +27 -0
  12. package/dist/catalogue.d.mts +2 -0
  13. package/dist/catalogue.mjs +116 -0
  14. package/dist/client.js +4072 -0
  15. package/dist/index.d.mts +2 -87
  16. package/dist/index.mjs +3 -394
  17. package/dist/models.d.mts +11 -40
  18. package/dist/models.mjs +47 -107
  19. package/dist/paths.d.mts +13 -0
  20. package/dist/paths.mjs +26 -0
  21. package/dist/poteto-mode.d.mts +37 -0
  22. package/dist/poteto-mode.mjs +61 -0
  23. package/dist/preset-copy.d.mts +12 -0
  24. package/dist/preset-copy.mjs +64 -0
  25. package/dist/preset.d.mts +31 -0
  26. package/dist/preset.mjs +51 -0
  27. package/dist/pstack/docs/harness/dsh.md +40 -40
  28. package/dist/pstack/plugin.json +21 -0
  29. package/dist/pstack/skills/poteto-mode/scripts/bootstrap.ts +62 -0
  30. package/dist/pstack/skills/poteto-mode/scripts/bun.lock +67 -0
  31. package/dist/pstack/skills/poteto-mode/scripts/check-plan.mjs +70 -83
  32. package/dist/pstack/skills/poteto-mode/scripts/{check-plan.test.mjs → check-plan.test.ts} +24 -42
  33. package/dist/pstack/skills/poteto-mode/scripts/package.json +16 -0
  34. package/dist/pstack/skills/poteto-mode/scripts/watch-pr/cli.test.ts +224 -0
  35. package/dist/pstack/skills/poteto-mode/scripts/watch-pr/cli.ts +223 -0
  36. package/dist/pstack/skills/poteto-mode/scripts/watch-pr/fakes.test-helper.ts +129 -0
  37. package/dist/pstack/skills/poteto-mode/scripts/watch-pr/github.test.ts +498 -0
  38. package/dist/pstack/skills/poteto-mode/scripts/watch-pr/github.ts +726 -0
  39. package/dist/pstack/skills/poteto-mode/scripts/watch-pr/policy.test.ts +482 -0
  40. package/dist/pstack/skills/poteto-mode/scripts/watch-pr/policy.ts +842 -0
  41. package/dist/pstack/skills/poteto-mode/scripts/watch-pr/render.ts +169 -0
  42. package/dist/pstack/skills/poteto-mode/scripts/watch-pr/tsconfig.json +13 -0
  43. package/dist/pstack/skills/poteto-mode/scripts/watch-pr/types.compile.ts +93 -0
  44. package/dist/pstack/skills/poteto-mode/scripts/watch-pr/types.ts +414 -0
  45. package/dist/pstack/skills/poteto-mode/scripts/watch-pr/watch-pr +6 -0
  46. package/dist/pstack/skills/poteto-mode/scripts/worktree-audit.sh +134 -0
  47. package/dist/pstack/skills/show-me-your-work/scripts/log.sh +42 -0
  48. package/dist/pstack/skills/statechart/scripts/backends/cfg.ts +33 -0
  49. package/dist/pstack/skills/statechart/scripts/backends/mermaid.ts +201 -0
  50. package/dist/pstack/skills/statechart/scripts/backends/plain-text.ts +72 -0
  51. package/dist/pstack/skills/statechart/scripts/backends/report.ts +177 -0
  52. package/dist/pstack/skills/statechart/scripts/frontends/config.ts +276 -0
  53. package/dist/pstack/skills/statechart/scripts/frontends/dot.ts +74 -0
  54. package/dist/pstack/skills/statechart/scripts/frontends/marks.ts +93 -0
  55. package/dist/pstack/skills/statechart/scripts/frontends/messages.ts +52 -0
  56. package/dist/pstack/skills/statechart/scripts/frontends/spec.ts +114 -0
  57. package/dist/pstack/skills/statechart/scripts/frontends/trace.ts +24 -0
  58. package/dist/pstack/skills/statechart/scripts/frontends/value.ts +166 -0
  59. package/dist/pstack/skills/statechart/scripts/frontends/verdict.ts +40 -0
  60. package/dist/pstack/skills/statechart/scripts/frontends/view.ts +119 -0
  61. package/dist/pstack/skills/statechart/scripts/ir.ts +547 -0
  62. package/dist/pstack/skills/statechart/scripts/package.json +11 -0
  63. package/dist/pstack/skills/statechart/scripts/passes/annotate.ts +128 -0
  64. package/dist/pstack/skills/statechart/scripts/passes/label.ts +269 -0
  65. package/dist/pstack/skills/statechart/scripts/passes/lift.ts +85 -0
  66. package/dist/pstack/skills/statechart/scripts/passes/loop-check.ts +68 -0
  67. package/dist/pstack/skills/statechart/scripts/passes/paths.ts +60 -0
  68. package/dist/pstack/skills/statechart/scripts/passes/reach.ts +135 -0
  69. package/dist/pstack/skills/statechart/scripts/passes/region-check.ts +97 -0
  70. package/dist/pstack/skills/statechart/scripts/passes/regions.ts +295 -0
  71. package/dist/pstack/skills/statechart/scripts/pipeline.ts +76 -0
  72. package/dist/pstack/skills/statechart/scripts/run.ts +481 -0
  73. package/dist/pstack/skills/statechart/scripts/statechart +29 -0
  74. package/dist/pstack/skills/statechart/scripts/statechart.ts +164 -0
  75. package/dist/pstack/skills/statechart/scripts/test/ConfigOracle.java +63 -0
  76. package/dist/pstack/skills/statechart/scripts/test/chart.test.ts +1210 -0
  77. package/dist/pstack/skills/statechart/scripts/test/charts/Braces.mmd +7 -0
  78. package/dist/pstack/skills/statechart/scripts/test/charts/Escapes.mmd +11 -0
  79. package/dist/pstack/skills/statechart/scripts/test/charts/Phases.mmd +29 -0
  80. package/dist/pstack/skills/statechart/scripts/test/cli.test.ts +1314 -0
  81. package/dist/pstack/skills/statechart/scripts/test/config-fuzz.test.ts +263 -0
  82. package/dist/pstack/skills/statechart/scripts/test/corpus/Counter/ChartRun.out +57 -0
  83. package/dist/pstack/skills/statechart/scripts/test/corpus/Counter/Counter.cfg +3 -0
  84. package/dist/pstack/skills/statechart/scripts/test/corpus/Counter/Counter.tla +10 -0
  85. package/dist/pstack/skills/statechart/scripts/test/corpus/Counter/chart.mmd +9 -0
  86. package/dist/pstack/skills/statechart/scripts/test/corpus/Counter/graph.dot +16 -0
  87. package/dist/pstack/skills/statechart/scripts/test/corpus/Counter/report.md +7 -0
  88. package/dist/pstack/skills/statechart/scripts/test/corpus/Counter/sany.out +2 -0
  89. package/dist/pstack/skills/statechart/scripts/test/corpus/Counter/verdict-1.out +49 -0
  90. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterAction/ChartRun.out +60 -0
  91. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterAction/CounterAction.cfg +4 -0
  92. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterAction/CounterAction.tla +22 -0
  93. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterAction/chart.mmd +26 -0
  94. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterAction/graph.dot +19 -0
  95. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterAction/report.md +20 -0
  96. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterAction/sany.out +2 -0
  97. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterAction/verdict-1.exit +1 -0
  98. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterAction/verdict-1.out +56 -0
  99. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterAction/verdict-2.exit +1 -0
  100. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterAction/verdict-2.out +82 -0
  101. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterAction/verdict-3.out +57 -0
  102. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterDeadlock/ChartRun.out +59 -0
  103. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterDeadlock/CounterDeadlock.cfg +3 -0
  104. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterDeadlock/CounterDeadlock.tla +11 -0
  105. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterDeadlock/chart.mmd +22 -0
  106. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterDeadlock/graph.dot +16 -0
  107. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterDeadlock/report.md +17 -0
  108. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterDeadlock/sany.out +2 -0
  109. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterDeadlock/verdict-1.exit +1 -0
  110. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterDeadlock/verdict-1.out +56 -0
  111. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterDeadlock/verdict-2.exit +1 -0
  112. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterDeadlock/verdict-2.out +77 -0
  113. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterFan/ChartRun.out +69 -0
  114. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterFan/CounterFan.cfg +2 -0
  115. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterFan/CounterFan.tla +11 -0
  116. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterFan/chart.mmd +85 -0
  117. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterFan/graph.dot +70 -0
  118. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterFan/report.md +12 -0
  119. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterFan/sany.out +2 -0
  120. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterFan/verdict-1.exit +1 -0
  121. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterFan/verdict-1.out +67 -0
  122. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterFan/verdict-2.out +57 -0
  123. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterGuard/ChartRun.exit +1 -0
  124. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterGuard/ChartRun.out +85 -0
  125. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterGuard/CounterGuard.cfg +6 -0
  126. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterGuard/CounterGuard.tla +13 -0
  127. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterGuard/chart.mmd +5 -0
  128. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterGuard/graph.dot +10 -0
  129. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterGuard/report.md +31 -0
  130. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterGuard/sany.out +2 -0
  131. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterGuard/verdict-1.exit +1 -0
  132. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterGuard/verdict-1.out +64 -0
  133. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterGuard/verdict-2.exit +1 -0
  134. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterGuard/verdict-2.out +77 -0
  135. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterInitPast/ChartRun.out +55 -0
  136. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterInitPast/CounterInitPast.cfg +3 -0
  137. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterInitPast/CounterInitPast.tla +10 -0
  138. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterInitPast/chart.mmd +12 -0
  139. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterInitPast/graph.dot +6 -0
  140. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterInitPast/report.md +12 -0
  141. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterInitPast/sany.out +2 -0
  142. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterInitPast/verdict-1.exit +1 -0
  143. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterInitPast/verdict-1.out +33 -0
  144. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterInitPast/verdict-2.out +54 -0
  145. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterInitPastHolds/ChartRun.out +54 -0
  146. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterInitPastHolds/CounterInitPastHolds.cfg +3 -0
  147. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterInitPastHolds/CounterInitPastHolds.tla +10 -0
  148. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterInitPastHolds/chart.mmd +1 -0
  149. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterInitPastHolds/graph.dot +6 -0
  150. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterInitPastHolds/report.md +7 -0
  151. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterInitPastHolds/sany.out +2 -0
  152. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterInitPastHolds/verdict-1.out +46 -0
  153. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterInstance/ChartRun.out +59 -0
  154. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterInstance/CounterInstance.cfg +2 -0
  155. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterInstance/CounterInstance.tla +10 -0
  156. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterInstance/CounterSteps.tla +6 -0
  157. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterInstance/chart.mmd +17 -0
  158. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterInstance/graph.dot +15 -0
  159. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterInstance/report.md +14 -0
  160. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterInstance/sany.out +3 -0
  161. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterInstance/verdict-1.exit +1 -0
  162. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterInstance/verdict-1.out +78 -0
  163. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterJump/ChartRun.out +59 -0
  164. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterJump/CounterJump.cfg +3 -0
  165. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterJump/CounterJump.tla +19 -0
  166. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterJump/chart.mmd +26 -0
  167. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterJump/graph.dot +22 -0
  168. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterJump/report.md +12 -0
  169. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterJump/sany.out +2 -0
  170. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterJump/verdict-1.exit +1 -0
  171. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterJump/verdict-1.out +58 -0
  172. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterJump/verdict-2.out +57 -0
  173. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterLoop/ChartRun.out +57 -0
  174. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterLoop/CounterLoop.cfg +2 -0
  175. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterLoop/CounterLoop.tla +11 -0
  176. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterLoop/chart.mmd +17 -0
  177. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterLoop/graph.dot +15 -0
  178. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterLoop/report.md +14 -0
  179. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterLoop/sany.out +2 -0
  180. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterLoop/verdict-1.exit +1 -0
  181. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterLoop/verdict-1.out +76 -0
  182. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterOrder/ChartRun.out +59 -0
  183. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterOrder/CounterOrder.cfg +3 -0
  184. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterOrder/CounterOrder.tla +11 -0
  185. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterOrder/chart.mmd +19 -0
  186. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterOrder/graph.dot +10 -0
  187. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterOrder/report.md +15 -0
  188. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterOrder/sany.out +2 -0
  189. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterOrder/verdict-1.exit +1 -0
  190. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterOrder/verdict-1.out +56 -0
  191. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterOrder/verdict-2.exit +1 -0
  192. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterOrder/verdict-2.out +67 -0
  193. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterRules/ChartRun.out +62 -0
  194. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterRules/CounterRules.cfg +6 -0
  195. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterRules/CounterRules.tla +24 -0
  196. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterRules/Moves.tla +5 -0
  197. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterRules/chart.mmd +22 -0
  198. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterRules/graph.dot +10 -0
  199. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterRules/report.md +23 -0
  200. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterRules/sany.out +3 -0
  201. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterRules/verdict-1.exit +1 -0
  202. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterRules/verdict-1.out +58 -0
  203. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterRules/verdict-2.exit +1 -0
  204. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterRules/verdict-2.out +66 -0
  205. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterRules/verdict-3.exit +1 -0
  206. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterRules/verdict-3.out +74 -0
  207. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterRules/verdict-4.out +59 -0
  208. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterStart/ChartRun.out +58 -0
  209. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterStart/CounterStart.cfg +3 -0
  210. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterStart/CounterStart.tla +15 -0
  211. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterStart/chart.mmd +18 -0
  212. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterStart/graph.dot +13 -0
  213. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterStart/report.md +11 -0
  214. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterStart/sany.out +2 -0
  215. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterStart/verdict-1.exit +1 -0
  216. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterStart/verdict-1.out +33 -0
  217. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterStart/verdict-2.out +57 -0
  218. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterStop/ChartRun.out +57 -0
  219. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterStop/CounterStop.cfg +3 -0
  220. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterStop/CounterStop.tla +15 -0
  221. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterStop/chart.mmd +7 -0
  222. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterStop/graph.dot +13 -0
  223. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterStop/report.md +6 -0
  224. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterStop/sany.out +2 -0
  225. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterStop/verdict-1.out +49 -0
  226. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterTie/ChartRun.out +61 -0
  227. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterTie/CounterTie.cfg +4 -0
  228. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterTie/CounterTie.tla +14 -0
  229. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterTie/chart.mmd +30 -0
  230. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterTie/graph.dot +19 -0
  231. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterTie/report.md +27 -0
  232. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterTie/sany.out +2 -0
  233. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterTie/verdict-1.exit +1 -0
  234. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterTie/verdict-1.out +56 -0
  235. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterTie/verdict-2.exit +1 -0
  236. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterTie/verdict-2.out +64 -0
  237. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterTie/verdict-3.exit +1 -0
  238. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterTie/verdict-3.out +87 -0
  239. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterTie/verdict-4.out +57 -0
  240. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterTieInGraph/ChartRun.out +60 -0
  241. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterTieInGraph/CounterTieInGraph.cfg +3 -0
  242. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterTieInGraph/CounterTieInGraph.tla +12 -0
  243. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterTieInGraph/chart.mmd +23 -0
  244. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterTieInGraph/graph.dot +19 -0
  245. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterTieInGraph/report.md +11 -0
  246. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterTieInGraph/sany.out +2 -0
  247. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterTieInGraph/verdict-1.exit +1 -0
  248. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterTieInGraph/verdict-1.out +56 -0
  249. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterTieInGraph/verdict-2.out +57 -0
  250. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterView/ChartRun.out +61 -0
  251. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterView/CounterView.cfg +4 -0
  252. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterView/CounterView.tla +14 -0
  253. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterView/chart.mmd +23 -0
  254. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterView/graph.dot +19 -0
  255. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterView/report.md +27 -0
  256. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterView/sany.out +2 -0
  257. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterView/verdict-1.exit +1 -0
  258. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterView/verdict-1.out +56 -0
  259. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterView/verdict-2.exit +1 -0
  260. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterView/verdict-2.out +64 -0
  261. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterView/verdict-3.exit +1 -0
  262. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterView/verdict-3.out +87 -0
  263. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterView/verdict-4.out +57 -0
  264. package/dist/pstack/skills/statechart/scripts/test/corpus/CounterView/view.mjs +1 -0
  265. package/dist/pstack/skills/statechart/scripts/test/corpus/DieHard/ChartRun.out +59 -0
  266. package/dist/pstack/skills/statechart/scripts/test/corpus/DieHard/DieHard.cfg +4 -0
  267. package/dist/pstack/skills/statechart/scripts/test/corpus/DieHard/DieHard.tla +38 -0
  268. package/dist/pstack/skills/statechart/scripts/test/corpus/DieHard/chart.mmd +92 -0
  269. package/dist/pstack/skills/statechart/scripts/test/corpus/DieHard/graph.dot +126 -0
  270. package/dist/pstack/skills/statechart/scripts/test/corpus/DieHard/report.md +17 -0
  271. package/dist/pstack/skills/statechart/scripts/test/corpus/DieHard/sany.out +2 -0
  272. package/dist/pstack/skills/statechart/scripts/test/corpus/DieHard/verdict-1.exit +1 -0
  273. package/dist/pstack/skills/statechart/scripts/test/corpus/DieHard/verdict-1.out +91 -0
  274. package/dist/pstack/skills/statechart/scripts/test/corpus/DieHard/verdict-2.out +57 -0
  275. package/dist/pstack/skills/statechart/scripts/test/corpus/FirstRule/ChartRun.out +61 -0
  276. package/dist/pstack/skills/statechart/scripts/test/corpus/FirstRule/FirstRule.cfg +6 -0
  277. package/dist/pstack/skills/statechart/scripts/test/corpus/FirstRule/FirstRule.tla +11 -0
  278. package/dist/pstack/skills/statechart/scripts/test/corpus/FirstRule/chart.mmd +22 -0
  279. package/dist/pstack/skills/statechart/scripts/test/corpus/FirstRule/graph.dot +16 -0
  280. package/dist/pstack/skills/statechart/scripts/test/corpus/FirstRule/report.md +25 -0
  281. package/dist/pstack/skills/statechart/scripts/test/corpus/FirstRule/sany.out +2 -0
  282. package/dist/pstack/skills/statechart/scripts/test/corpus/FirstRule/verdict-1.exit +1 -0
  283. package/dist/pstack/skills/statechart/scripts/test/corpus/FirstRule/verdict-1.out +56 -0
  284. package/dist/pstack/skills/statechart/scripts/test/corpus/FirstRule/verdict-2.exit +1 -0
  285. package/dist/pstack/skills/statechart/scripts/test/corpus/FirstRule/verdict-2.out +64 -0
  286. package/dist/pstack/skills/statechart/scripts/test/corpus/FirstRule/verdict-3.exit +1 -0
  287. package/dist/pstack/skills/statechart/scripts/test/corpus/FirstRule/verdict-3.out +64 -0
  288. package/dist/pstack/skills/statechart/scripts/test/corpus/FirstRule/verdict-4.exit +1 -0
  289. package/dist/pstack/skills/statechart/scripts/test/corpus/FirstRule/verdict-4.out +77 -0
  290. package/dist/pstack/skills/statechart/scripts/test/corpus/HiddenClock/ChartRun.out +57 -0
  291. package/dist/pstack/skills/statechart/scripts/test/corpus/HiddenClock/HiddenClock.cfg +4 -0
  292. package/dist/pstack/skills/statechart/scripts/test/corpus/HiddenClock/HiddenClock.tla +11 -0
  293. package/dist/pstack/skills/statechart/scripts/test/corpus/HiddenClock/chart.mmd +13 -0
  294. package/dist/pstack/skills/statechart/scripts/test/corpus/HiddenClock/graph.dot +12 -0
  295. package/dist/pstack/skills/statechart/scripts/test/corpus/HiddenClock/report.md +11 -0
  296. package/dist/pstack/skills/statechart/scripts/test/corpus/HiddenClock/sany.out +2 -0
  297. package/dist/pstack/skills/statechart/scripts/test/corpus/HiddenClock/verdict-1.exit +1 -0
  298. package/dist/pstack/skills/statechart/scripts/test/corpus/HiddenClock/verdict-1.out +72 -0
  299. package/dist/pstack/skills/statechart/scripts/test/corpus/Login/ChartRun.out +57 -0
  300. package/dist/pstack/skills/statechart/scripts/test/corpus/Login/Login.cfg +3 -0
  301. package/dist/pstack/skills/statechart/scripts/test/corpus/Login/Login.tla +62 -0
  302. package/dist/pstack/skills/statechart/scripts/test/corpus/Login/chart.mmd +27 -0
  303. package/dist/pstack/skills/statechart/scripts/test/corpus/Login/graph.dot +40 -0
  304. package/dist/pstack/skills/statechart/scripts/test/corpus/Login/report.md +7 -0
  305. package/dist/pstack/skills/statechart/scripts/test/corpus/Login/sany.out +1 -0
  306. package/dist/pstack/skills/statechart/scripts/test/corpus/Login/verdict-1.out +47 -0
  307. package/dist/pstack/skills/statechart/scripts/test/corpus/Login/view.mjs +1 -0
  308. package/dist/pstack/skills/statechart/scripts/test/corpus/LoginGuarded/ChartRun.out +57 -0
  309. package/dist/pstack/skills/statechart/scripts/test/corpus/LoginGuarded/LoginGuarded.cfg +2 -0
  310. package/dist/pstack/skills/statechart/scripts/test/corpus/LoginGuarded/LoginGuarded.tla +64 -0
  311. package/dist/pstack/skills/statechart/scripts/test/corpus/LoginGuarded/chart.mmd +28 -0
  312. package/dist/pstack/skills/statechart/scripts/test/corpus/LoginGuarded/graph.dot +37 -0
  313. package/dist/pstack/skills/statechart/scripts/test/corpus/LoginGuarded/report.md +8 -0
  314. package/dist/pstack/skills/statechart/scripts/test/corpus/LoginGuarded/sany.out +1 -0
  315. package/dist/pstack/skills/statechart/scripts/test/corpus/LoginGuarded/verdict-1.out +47 -0
  316. package/dist/pstack/skills/statechart/scripts/test/corpus/LoginGuarded/view.mjs +1 -0
  317. package/dist/pstack/skills/statechart/scripts/test/corpus/LoginParallel/ChartRun.out +60 -0
  318. package/dist/pstack/skills/statechart/scripts/test/corpus/LoginParallel/LoginParallel.cfg +3 -0
  319. package/dist/pstack/skills/statechart/scripts/test/corpus/LoginParallel/LoginParallel.tla +64 -0
  320. package/dist/pstack/skills/statechart/scripts/test/corpus/LoginParallel/chart.mmd +44 -0
  321. package/dist/pstack/skills/statechart/scripts/test/corpus/LoginParallel/graph.dot +58 -0
  322. package/dist/pstack/skills/statechart/scripts/test/corpus/LoginParallel/report.md +17 -0
  323. package/dist/pstack/skills/statechart/scripts/test/corpus/LoginParallel/sany.out +1 -0
  324. package/dist/pstack/skills/statechart/scripts/test/corpus/LoginParallel/verdict-1.exit +1 -0
  325. package/dist/pstack/skills/statechart/scripts/test/corpus/LoginParallel/verdict-1.out +83 -0
  326. package/dist/pstack/skills/statechart/scripts/test/corpus/LoginParallel/verdict-2.out +57 -0
  327. package/dist/pstack/skills/statechart/scripts/test/corpus/LoginParallel/view.mjs +1 -0
  328. package/dist/pstack/skills/statechart/scripts/test/corpus/MediaPlayer/ChartRun.out +60 -0
  329. package/dist/pstack/skills/statechart/scripts/test/corpus/MediaPlayer/MediaPlayer.cfg +3 -0
  330. package/dist/pstack/skills/statechart/scripts/test/corpus/MediaPlayer/MediaPlayer.tla +103 -0
  331. package/dist/pstack/skills/statechart/scripts/test/corpus/MediaPlayer/chart.mmd +43 -0
  332. package/dist/pstack/skills/statechart/scripts/test/corpus/MediaPlayer/graph.dot +93 -0
  333. package/dist/pstack/skills/statechart/scripts/test/corpus/MediaPlayer/report.md +14 -0
  334. package/dist/pstack/skills/statechart/scripts/test/corpus/MediaPlayer/sany.out +1 -0
  335. package/dist/pstack/skills/statechart/scripts/test/corpus/MediaPlayer/verdict-1.exit +1 -0
  336. package/dist/pstack/skills/statechart/scripts/test/corpus/MediaPlayer/verdict-1.out +59 -0
  337. package/dist/pstack/skills/statechart/scripts/test/corpus/MediaPlayer/verdict-2.out +72 -0
  338. package/dist/pstack/skills/statechart/scripts/test/corpus/MediaPlayer/view.mjs +3 -0
  339. package/dist/pstack/skills/statechart/scripts/test/corpus/MediaPlayerFixed/ChartRun.out +57 -0
  340. package/dist/pstack/skills/statechart/scripts/test/corpus/MediaPlayerFixed/MediaPlayerFixed.cfg +2 -0
  341. package/dist/pstack/skills/statechart/scripts/test/corpus/MediaPlayerFixed/MediaPlayerFixed.tla +100 -0
  342. package/dist/pstack/skills/statechart/scripts/test/corpus/MediaPlayerFixed/chart.mmd +31 -0
  343. package/dist/pstack/skills/statechart/scripts/test/corpus/MediaPlayerFixed/graph.dot +85 -0
  344. package/dist/pstack/skills/statechart/scripts/test/corpus/MediaPlayerFixed/report.md +9 -0
  345. package/dist/pstack/skills/statechart/scripts/test/corpus/MediaPlayerFixed/sany.out +1 -0
  346. package/dist/pstack/skills/statechart/scripts/test/corpus/MediaPlayerFixed/verdict-1.out +47 -0
  347. package/dist/pstack/skills/statechart/scripts/test/corpus/MediaPlayerFixed/view.mjs +3 -0
  348. package/dist/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/ChartRun.out +59 -0
  349. package/dist/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/MediaPlayer.tla +103 -0
  350. package/dist/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/MediaPlayerProps.cfg +3 -0
  351. package/dist/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/MediaPlayerProps.tla +6 -0
  352. package/dist/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/chart.mmd +42 -0
  353. package/dist/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/graph.dot +93 -0
  354. package/dist/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/report.md +19 -0
  355. package/dist/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/sany.out +2 -0
  356. package/dist/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-1.exit +1 -0
  357. package/dist/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-1.out +61 -0
  358. package/dist/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-2.out +59 -0
  359. package/dist/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-3.out +61 -0
  360. package/dist/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-4.exit +1 -0
  361. package/dist/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-4.out +66 -0
  362. package/dist/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-5.exit +1 -0
  363. package/dist/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-5.out +58 -0
  364. package/dist/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-6.out +49 -0
  365. package/dist/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/view.mjs +3 -0
  366. package/dist/pstack/skills/statechart/scripts/test/corpus/PickWorker/ChartRun.out +57 -0
  367. package/dist/pstack/skills/statechart/scripts/test/corpus/PickWorker/PickWorker.cfg +6 -0
  368. package/dist/pstack/skills/statechart/scripts/test/corpus/PickWorker/PickWorker.tla +11 -0
  369. package/dist/pstack/skills/statechart/scripts/test/corpus/PickWorker/chart.mmd +5 -0
  370. package/dist/pstack/skills/statechart/scripts/test/corpus/PickWorker/graph.dot +11 -0
  371. package/dist/pstack/skills/statechart/scripts/test/corpus/PickWorker/report.md +7 -0
  372. package/dist/pstack/skills/statechart/scripts/test/corpus/PickWorker/sany.out +5 -0
  373. package/dist/pstack/skills/statechart/scripts/test/corpus/PickWorker/verdict-1.out +70 -0
  374. package/dist/pstack/skills/statechart/scripts/test/corpus/Shadow/ChartRun.out +61 -0
  375. package/dist/pstack/skills/statechart/scripts/test/corpus/Shadow/Shadow.cfg +4 -0
  376. package/dist/pstack/skills/statechart/scripts/test/corpus/Shadow/Shadow.tla +11 -0
  377. package/dist/pstack/skills/statechart/scripts/test/corpus/Shadow/ShadowLib.tla +6 -0
  378. package/dist/pstack/skills/statechart/scripts/test/corpus/Shadow/ShadowSub.tla +3 -0
  379. package/dist/pstack/skills/statechart/scripts/test/corpus/Shadow/chart.mmd +9 -0
  380. package/dist/pstack/skills/statechart/scripts/test/corpus/Shadow/graph.dot +16 -0
  381. package/dist/pstack/skills/statechart/scripts/test/corpus/Shadow/report.md +8 -0
  382. package/dist/pstack/skills/statechart/scripts/test/corpus/Shadow/sany.out +4 -0
  383. package/dist/pstack/skills/statechart/scripts/test/corpus/Shadow/verdict-1.out +65 -0
  384. package/dist/pstack/skills/statechart/scripts/test/corpus/SpacedNames/ChartRun.out +59 -0
  385. package/dist/pstack/skills/statechart/scripts/test/corpus/SpacedNames/SpacedNames.cfg +2 -0
  386. package/dist/pstack/skills/statechart/scripts/test/corpus/SpacedNames/SpacedNames.tla +9 -0
  387. package/dist/pstack/skills/statechart/scripts/test/corpus/SpacedNames/chart.mmd +23 -0
  388. package/dist/pstack/skills/statechart/scripts/test/corpus/SpacedNames/graph.dot +17 -0
  389. package/dist/pstack/skills/statechart/scripts/test/corpus/SpacedNames/report.md +15 -0
  390. package/dist/pstack/skills/statechart/scripts/test/corpus/SpacedNames/sany.out +1 -0
  391. package/dist/pstack/skills/statechart/scripts/test/corpus/SpacedNames/verdict-1.exit +1 -0
  392. package/dist/pstack/skills/statechart/scripts/test/corpus/SpacedNames/verdict-1.out +65 -0
  393. package/dist/pstack/skills/statechart/scripts/test/corpus/SpacedNames/verdict-2.exit +1 -0
  394. package/dist/pstack/skills/statechart/scripts/test/corpus/SpacedNames/verdict-2.out +75 -0
  395. package/dist/pstack/skills/statechart/scripts/test/corpus/TwoPhase/ChartRun.out +69 -0
  396. package/dist/pstack/skills/statechart/scripts/test/corpus/TwoPhase/TwoPhase.cfg +3 -0
  397. package/dist/pstack/skills/statechart/scripts/test/corpus/TwoPhase/TwoPhase.tla +75 -0
  398. package/dist/pstack/skills/statechart/scripts/test/corpus/TwoPhase/chart.mmd +60 -0
  399. package/dist/pstack/skills/statechart/scripts/test/corpus/TwoPhase/graph.dot +297 -0
  400. package/dist/pstack/skills/statechart/scripts/test/corpus/TwoPhase/report.md +20 -0
  401. package/dist/pstack/skills/statechart/scripts/test/corpus/TwoPhase/sany.out +1 -0
  402. package/dist/pstack/skills/statechart/scripts/test/corpus/TwoPhase/verdict-1.exit +1 -0
  403. package/dist/pstack/skills/statechart/scripts/test/corpus/TwoPhase/verdict-1.out +95 -0
  404. package/dist/pstack/skills/statechart/scripts/test/corpus/TwoPhase/verdict-2.out +57 -0
  405. package/dist/pstack/skills/statechart/scripts/test/corpus/TwoPhase/view.mjs +1 -0
  406. package/dist/pstack/skills/statechart/scripts/test/corpus/TwoPhaseFixed/ChartRun.out +57 -0
  407. package/dist/pstack/skills/statechart/scripts/test/corpus/TwoPhaseFixed/TwoPhaseFixed.cfg +3 -0
  408. package/dist/pstack/skills/statechart/scripts/test/corpus/TwoPhaseFixed/TwoPhaseFixed.tla +75 -0
  409. package/dist/pstack/skills/statechart/scripts/test/corpus/TwoPhaseFixed/chart.mmd +37 -0
  410. package/dist/pstack/skills/statechart/scripts/test/corpus/TwoPhaseFixed/graph.dot +223 -0
  411. package/dist/pstack/skills/statechart/scripts/test/corpus/TwoPhaseFixed/report.md +11 -0
  412. package/dist/pstack/skills/statechart/scripts/test/corpus/TwoPhaseFixed/sany.out +1 -0
  413. package/dist/pstack/skills/statechart/scripts/test/corpus/TwoPhaseFixed/verdict-1.out +47 -0
  414. package/dist/pstack/skills/statechart/scripts/test/corpus/TwoPhaseFixed/view.mjs +1 -0
  415. package/dist/pstack/skills/statechart/scripts/test/corpus/TypeGuard/ChartRun.exit +1 -0
  416. package/dist/pstack/skills/statechart/scripts/test/corpus/TypeGuard/ChartRun.out +75 -0
  417. package/dist/pstack/skills/statechart/scripts/test/corpus/TypeGuard/TypeGuard.cfg +5 -0
  418. package/dist/pstack/skills/statechart/scripts/test/corpus/TypeGuard/TypeGuard.tla +11 -0
  419. package/dist/pstack/skills/statechart/scripts/test/corpus/TypeGuard/chart.mmd +18 -0
  420. package/dist/pstack/skills/statechart/scripts/test/corpus/TypeGuard/graph.dot +14 -0
  421. package/dist/pstack/skills/statechart/scripts/test/corpus/TypeGuard/report.md +29 -0
  422. package/dist/pstack/skills/statechart/scripts/test/corpus/TypeGuard/sany.out +2 -0
  423. package/dist/pstack/skills/statechart/scripts/test/corpus/TypeGuard/verdict-1.exit +1 -0
  424. package/dist/pstack/skills/statechart/scripts/test/corpus/TypeGuard/verdict-1.out +64 -0
  425. package/dist/pstack/skills/statechart/scripts/test/corpus/TypeGuard/verdict-2.exit +1 -0
  426. package/dist/pstack/skills/statechart/scripts/test/corpus/TypeGuard/verdict-2.out +75 -0
  427. package/dist/pstack/skills/statechart/scripts/test/corpus/UserNoDeadlock/ChartRun.out +58 -0
  428. package/dist/pstack/skills/statechart/scripts/test/corpus/UserNoDeadlock/UserNoDeadlock.cfg +2 -0
  429. package/dist/pstack/skills/statechart/scripts/test/corpus/UserNoDeadlock/UserNoDeadlock.tla +8 -0
  430. package/dist/pstack/skills/statechart/scripts/test/corpus/UserNoDeadlock/chart.mmd +22 -0
  431. package/dist/pstack/skills/statechart/scripts/test/corpus/UserNoDeadlock/graph.dot +16 -0
  432. package/dist/pstack/skills/statechart/scripts/test/corpus/UserNoDeadlock/report.md +15 -0
  433. package/dist/pstack/skills/statechart/scripts/test/corpus/UserNoDeadlock/sany.out +2 -0
  434. package/dist/pstack/skills/statechart/scripts/test/corpus/UserNoDeadlock/verdict-1.exit +1 -0
  435. package/dist/pstack/skills/statechart/scripts/test/corpus/UserNoDeadlock/verdict-1.out +56 -0
  436. package/dist/pstack/skills/statechart/scripts/test/corpus/UserNoDeadlock/verdict-2.exit +1 -0
  437. package/dist/pstack/skills/statechart/scripts/test/corpus/UserNoDeadlock/verdict-2.out +77 -0
  438. package/dist/pstack/skills/statechart/scripts/test/corpus.test.ts +403 -0
  439. package/dist/pstack/skills/statechart/scripts/test/differential.test.ts +565 -0
  440. package/dist/pstack/skills/statechart/scripts/test/grid/Grid.cfg +2 -0
  441. package/dist/pstack/skills/statechart/scripts/test/grid/Grid.tla +9 -0
  442. package/dist/pstack/skills/statechart/scripts/test/grid/sany.out +2 -0
  443. package/dist/pstack/skills/statechart/scripts/test/java.ts +63 -0
  444. package/dist/pstack/skills/statechart/scripts/test/labels.ts +643 -0
  445. package/dist/pstack/skills/statechart/scripts/test/messages.test.ts +212 -0
  446. package/dist/pstack/skills/statechart/scripts/test/pipeline.test.ts +270 -0
  447. package/dist/pstack/skills/statechart/scripts/test/plain-tlc.test.ts +255 -0
  448. package/dist/pstack/skills/statechart/scripts/test/render.test.ts +81 -0
  449. package/dist/pstack/skills/statechart/scripts/test/tlc-out.test.ts +90 -0
  450. package/dist/pstack/skills/statechart/scripts/test/tlc.ts +158 -0
  451. package/dist/pstack/skills/statechart/scripts/tsconfig.json +11 -0
  452. package/dist/pstack/skills/statechart/scripts/worker.ts +35 -0
  453. package/dist/readonly.d.mts +3 -0
  454. package/dist/readonly.mjs +9 -0
  455. package/dist/role-catalog.d.mts +11 -24
  456. package/dist/role-catalog.mjs +17 -32
  457. package/dist/role-config.d.mts +41 -0
  458. package/dist/role-config.mjs +112 -0
  459. package/dist/role-editor.d.mts +25 -0
  460. package/dist/role-editor.mjs +372 -0
  461. package/dist/role-file-CIVHnhBg.d.mts +53 -0
  462. package/dist/role-file.d.mts +2 -0
  463. package/dist/role-file.mjs +121 -0
  464. package/dist/{role-manifest-8OERX9-s.d.mts → role-manifest-D1npMjqZ.d.mts} +21 -10
  465. package/dist/role-manifest.d.mts +2 -0
  466. package/dist/{role-manifest-79cnFfDM.mjs → role-manifest.mjs} +20 -16
  467. package/dist/role-remote.d.mts +23 -0
  468. package/dist/role-remote.mjs +106 -0
  469. package/dist/{roles.d.mts → role-service.d.mts} +8 -4
  470. package/dist/role-service.mjs +43 -0
  471. package/dist/role-wire.d.mts +54 -0
  472. package/dist/role-wire.mjs +127 -0
  473. package/dist/route-7SqXDYrL.d.mts +36 -0
  474. package/dist/route.d.mts +2 -0
  475. package/dist/route.mjs +78 -0
  476. package/dist/skill.d.mts +9 -23
  477. package/dist/skill.mjs +28 -37
  478. package/dist/skills/authored/docs-drift/SKILL.md +4 -4
  479. package/dist/skills/authored/docs-drift/SKILL.zh.md +4 -4
  480. package/dist/skills/vendored/control-cli/SKILL.md +109 -0
  481. package/dist/skills/vendored/control-ui/SKILL.md +109 -0
  482. package/dist/skills/vendored/deslop/SKILL.md +22 -0
  483. package/dist/subagent.d.mts +60 -169
  484. package/dist/subagent.mjs +344 -587
  485. package/dist/wire-error-D_r-UW4w.d.mts +5 -0
  486. package/dist/wire-error.d.mts +2 -0
  487. package/dist/wire-error.mjs +9 -0
  488. package/locale/en.json +1 -1
  489. package/package.json +51 -35
  490. package/assets/pstack-config-entry.png +0 -0
  491. package/dist/client.mjs +0 -2482
  492. package/dist/client.mjs.map +0 -1
  493. package/dist/host-contract-CUPSpeNk.d.mts +0 -22
  494. package/dist/paths-yji9SNak.mjs +0 -47
  495. package/dist/pstack/skills/poteto-mode/scripts/expect.mjs +0 -254
  496. package/dist/pstack/skills/poteto-mode/scripts/support.mjs +0 -93
  497. package/dist/pstack/skills/poteto-mode/scripts/watch-pr/cli.mjs +0 -123
  498. package/dist/pstack/skills/poteto-mode/scripts/watch-pr/cli.test.mjs +0 -217
  499. package/dist/pstack/skills/poteto-mode/scripts/watch-pr/fakes.test-helper.mjs +0 -119
  500. package/dist/pstack/skills/poteto-mode/scripts/watch-pr/github.mjs +0 -626
  501. package/dist/pstack/skills/poteto-mode/scripts/watch-pr/github.test.mjs +0 -521
  502. package/dist/pstack/skills/poteto-mode/scripts/watch-pr/policy.mjs +0 -657
  503. package/dist/pstack/skills/poteto-mode/scripts/watch-pr/policy.test.mjs +0 -523
  504. package/dist/pstack/skills/poteto-mode/scripts/watch-pr/render.mjs +0 -106
  505. package/dist/pstack/skills/poteto-mode/scripts/watch-pr/types.mjs +0 -9
  506. package/dist/pstack/skills/poteto-mode/scripts/watch-pr/watch-pr.mjs +0 -5
  507. package/dist/pstack/skills/poteto-mode/scripts/worktree-audit.mjs +0 -668
  508. package/dist/pstack/skills/poteto-mode/scripts/worktree-audit.test.mjs +0 -134
  509. package/dist/pstack/skills/show-me-your-work/scripts/log.mjs +0 -106
  510. package/dist/pstack/skills/show-me-your-work/scripts/log.test.mjs +0 -56
  511. package/dist/pstack/skills/statechart/scripts/backends/cfg.mjs +0 -31
  512. package/dist/pstack/skills/statechart/scripts/backends/mermaid.mjs +0 -186
  513. package/dist/pstack/skills/statechart/scripts/backends/plain-text.mjs +0 -62
  514. package/dist/pstack/skills/statechart/scripts/backends/report.mjs +0 -84
  515. package/dist/pstack/skills/statechart/scripts/frontends/config.mjs +0 -268
  516. package/dist/pstack/skills/statechart/scripts/frontends/dot.mjs +0 -67
  517. package/dist/pstack/skills/statechart/scripts/frontends/marks.mjs +0 -94
  518. package/dist/pstack/skills/statechart/scripts/frontends/messages.mjs +0 -48
  519. package/dist/pstack/skills/statechart/scripts/frontends/spec.mjs +0 -101
  520. package/dist/pstack/skills/statechart/scripts/frontends/trace.mjs +0 -39
  521. package/dist/pstack/skills/statechart/scripts/frontends/value.mjs +0 -180
  522. package/dist/pstack/skills/statechart/scripts/frontends/verdict.mjs +0 -40
  523. package/dist/pstack/skills/statechart/scripts/frontends/view.mjs +0 -99
  524. package/dist/pstack/skills/statechart/scripts/ir.mjs +0 -277
  525. package/dist/pstack/skills/statechart/scripts/passes/annotate.mjs +0 -92
  526. package/dist/pstack/skills/statechart/scripts/passes/label.mjs +0 -210
  527. package/dist/pstack/skills/statechart/scripts/passes/lift.mjs +0 -84
  528. package/dist/pstack/skills/statechart/scripts/passes/loop-check.mjs +0 -47
  529. package/dist/pstack/skills/statechart/scripts/passes/paths.mjs +0 -72
  530. package/dist/pstack/skills/statechart/scripts/passes/reach.mjs +0 -135
  531. package/dist/pstack/skills/statechart/scripts/passes/region-check.mjs +0 -82
  532. package/dist/pstack/skills/statechart/scripts/passes/regions.mjs +0 -268
  533. package/dist/pstack/skills/statechart/scripts/pipeline.mjs +0 -72
  534. package/dist/pstack/skills/statechart/scripts/run.mjs +0 -440
  535. package/dist/pstack/skills/statechart/scripts/statechart.mjs +0 -155
  536. package/dist/pstack/skills/statechart/scripts/statechart.test.mjs +0 -198
  537. package/dist/pstack/skills/statechart/scripts/worker.mjs +0 -31
  538. package/dist/remote.d.mts +0 -27
  539. package/dist/remote.mjs +0 -235
  540. package/dist/role-config-a4JpVdc-.mjs +0 -379
  541. package/dist/role-wire-CAJsVA6e.d.mts +0 -54
  542. package/dist/roles.mjs +0 -293
  543. package/dist/script.d.mts +0 -91
  544. package/dist/script.mjs +0 -485
@@ -1,210 +0,0 @@
1
- import { isRecord, key, list, loopOf, must, sortBy, stateText, tupleKey } from "../ir.mjs";
2
- // runtime/skills/statechart/scripts/passes/label.ts
3
- const isLabel = (l) => typeof l === "string" && l !== "" && !/\bundefined\b|\bNaN\b|\[object Object\]/.test(l);
4
- const shapeOf = (shape, vars) => {
5
- function fail() {
6
- throw new Error(`The view's state() returned ${JSON.stringify(shape) ?? "undefined"} for the state ${stateText(vars)}. Return a string, an array of strings, or an object of those.`);
7
- }
8
- const path = (p) => {
9
- const labels = [];
10
- for (const l of [p].flat()) {
11
- if (!isLabel(l)) fail();
12
- labels.push(l);
13
- }
14
- if (!labels.length) fail();
15
- return labels;
16
- };
17
- const regions = isRecord(shape) ? Object.entries(shape) : [["", shape]];
18
- const pairs = [];
19
- for (const [k, v] of regions) pairs.push([k, path(v)]);
20
- return pairs.length ? Object.fromEntries(pairs) : fail();
21
- };
22
- const stepOf = (view) => (action, from, to) => {
23
- const label = (view.step ?? ((a) => a))(action, from, to);
24
- if (label === null || isLabel(label)) return label;
25
- throw new Error(`The view's step() returned ${JSON.stringify(label) ?? "undefined"} for the step ${action}.`);
26
- };
27
- function unlabeled(action, before, after, bug) {
28
- const changed = [];
29
- for (const k of Object.keys(after)) if (key(before[k]) !== key(after[k])) changed.push(k);
30
- throw new Error(`The view's step() returned null for the step ${action} that changes ${changed.join(", ") || "nothing"}. It is on the path to the ${bug.rule.name} bug${bug.loop === void 0 ? "" : " or leaves its loop"}, so label it.`);
31
- }
32
- function ask(graph, { states: tla, nameOf, from, to }, view) {
33
- const n = nameOf.length;
34
- const m = from.length;
35
- const state = view.state;
36
- const shapes = new Array(n);
37
- for (let i = 0; i < n; i++) shapes[i] = shapeOf(state ? state(tla[i].vars) : nameOf[i], tla[i].vars);
38
- const names = Object.keys(shapes[0] ?? { "": [] });
39
- const regionsKey = tupleKey(names);
40
- for (let i = 0; i < n; i++) if (tupleKey(Object.keys(shapes[i])) !== regionsKey) throw new Error(`The view's state() returned the regions ${names.join(", ")} for one state and ${Object.keys(shapes[i]).join(", ")} for the state ${stateText(tla[i].vars)}. Return the same regions for every state.`);
41
- const step = stepOf(view);
42
- const labels = new Array(m);
43
- for (let j = 0; j < m; j++) labels[j] = step(graph.steps[j].action, tla[from[j]].vars, tla[to[j]].vars);
44
- const groups = new Array(n);
45
- const asked = new Uint8Array(n);
46
- const group = (i) => {
47
- if (view.group && !asked[i]) {
48
- groups[i] = view.group(tla[i].vars);
49
- asked[i] = 1;
50
- }
51
- return groups[i];
52
- };
53
- return {
54
- names,
55
- shapes,
56
- labels,
57
- group
58
- };
59
- }
60
- function asParents({ states: tla }, { names, shapes, labels, group }) {
61
- const parents = new Array(shapes.length);
62
- for (let i = 0; i < shapes.length; i++) {
63
- const path = [];
64
- for (const n of names) for (const p of shapes[i][n]) path.push(`${n} ${p}`);
65
- parents[i] = shapeOf(path, tla[i].vars);
66
- }
67
- return {
68
- names: [""],
69
- shapes: parents,
70
- labels,
71
- group
72
- };
73
- }
74
- function labelGraph(graph, { index, from, to, action }, answers, rank, found) {
75
- const { names, shapes, labels: stepLabels } = answers;
76
- const n = shapes.length;
77
- const m = stepLabels.length;
78
- const onPath = /* @__PURE__ */ new Set();
79
- for (const b of found) for (const p of b.path) onPath.add(p.step);
80
- const pathStepIndex = /* @__PURE__ */ new Map();
81
- if (onPath.size) {
82
- for (let j = 0; j < m; j++) if (onPath.has(graph.steps[j])) pathStepIndex.set(graph.steps[j], j);
83
- }
84
- const R = names.length;
85
- const keys = [];
86
- const kinds = [];
87
- const sizes = [];
88
- for (const name of names) {
89
- const key = new Array(n);
90
- const kind = new Int32Array(n);
91
- const tops = /* @__PURE__ */ new Map();
92
- const nested = /* @__PURE__ */ new Map();
93
- const keyOf = [];
94
- for (let i = 0; i < n; i++) {
95
- const path = shapes[i][name];
96
- const top = path.length === 1;
97
- const seen = top ? tops : nested;
98
- const k = top ? path[0] : tupleKey(path);
99
- let c = seen.get(k);
100
- if (c === void 0) {
101
- seen.set(k, c = keyOf.length);
102
- keyOf.push(top ? tupleKey(path) : k);
103
- }
104
- key[i] = keyOf[c];
105
- kind[i] = c;
106
- }
107
- keys.push(key);
108
- kinds.push(kind);
109
- sizes.push(keyOf.length);
110
- }
111
- for (const b of found) {
112
- let t;
113
- for (const p of b.path) if (stepLabels[must(pathStepIndex, p.step)] === null) {
114
- t = p.step;
115
- break;
116
- }
117
- if (!t) {
118
- const inLoop = loopOf(b, index);
119
- if (inLoop.size) {
120
- for (let j = 0; j < m; j++) if (inLoop.has(from[j]) && !inLoop.has(to[j]) && stepLabels[j] === null) {
121
- t = graph.steps[j];
122
- break;
123
- }
124
- }
125
- }
126
- if (t) unlabeled(t.action, must(graph.states, t.from).vars, must(graph.states, t.to).vars, b);
127
- }
128
- const drawn = [];
129
- const drawnLabels = new Array(m);
130
- for (let j = 0; j < m; j++) {
131
- const label = stepLabels[j];
132
- if (label === null) continue;
133
- drawn.push(j);
134
- drawnLabels[j] = label;
135
- }
136
- const fromRank = new Int32Array(m);
137
- const toRank = new Int32Array(m);
138
- for (let j = 0; j < m; j++) {
139
- fromRank[j] = rank[from[j]];
140
- toRank[j] = rank[to[j]];
141
- }
142
- const sorted = sortBy(Int32Array.from(drawn), [
143
- fromRank,
144
- toRank,
145
- action
146
- ]);
147
- const pathSteps = new Uint8Array(m);
148
- for (const j of pathStepIndex.values()) pathSteps[j] = 1;
149
- const byLabel = /* @__PURE__ */ new Map();
150
- if (R > 1) for (const j of sorted) {
151
- let entry = byLabel.get(drawnLabels[j]);
152
- if (!entry) byLabel.set(drawnLabels[j], entry = {
153
- changed: new Uint8Array(R),
154
- sets: /* @__PURE__ */ new Set()
155
- });
156
- const changed = [];
157
- for (let r = 0; r < R; r++) if (kinds[r][from[j]] !== kinds[r][to[j]]) {
158
- changed.push(names[r]);
159
- entry.changed[r] = 1;
160
- }
161
- if (changed.length > 1) entry.sets.add(list(changed));
162
- }
163
- const together = /* @__PURE__ */ new Set();
164
- for (const [text, { sets }] of byLabel) if (sets.size) together.add(text);
165
- const notes = [];
166
- for (const [text, entry] of byLabel) {
167
- const changed = [];
168
- for (let r = 0; r < R; r++) if (entry.changed[r]) changed.push(names[r]);
169
- if (changed.length < 2) continue;
170
- if (!together.has(text)) {
171
- notes.push(`The step ${text} changes only one of ${list(changed)} at a time.`);
172
- continue;
173
- }
174
- const sets = [...entry.sets];
175
- notes.push(`The step ${text} changes ${sets.length > 1 ? `${sets.join(", or ")},` : sets[0]} at the same time.`);
176
- }
177
- return {
178
- ...answers,
179
- drawnLabels,
180
- keys,
181
- kinds,
182
- sizes,
183
- sorted,
184
- pathStepIndex,
185
- pathSteps,
186
- together,
187
- notes
188
- };
189
- }
190
- function tell(states, found, shapeAt, labelAt) {
191
- const vars = (id) => must(states, id).vars;
192
- const stories = /* @__PURE__ */ new Map();
193
- for (const bug of found) {
194
- const story = [{ state: shapeAt(bug.start) }];
195
- let from = bug.start;
196
- for (const [k, p] of bug.path.entries()) {
197
- const step = labelAt(bug, k, from);
198
- if (step === null) unlabeled(p.action, vars(from), vars(p.state), bug);
199
- story.push({
200
- step,
201
- state: shapeAt(p.state)
202
- });
203
- from = p.state;
204
- }
205
- stories.set(bug, story);
206
- }
207
- return stories;
208
- }
209
- const storiesOf = (graph, found, { index }, { shapes, drawnLabels, pathStepIndex }) => tell(graph.states, found, (id) => shapes[must(index, id)], (bug, k) => drawnLabels[must(pathStepIndex, bug.path[k].step)]);
210
- export { asParents, ask, labelGraph, storiesOf };
@@ -1,84 +0,0 @@
1
- import { append, must, tupleKey, unkey } from "../ir.mjs";
2
- // runtime/skills/statechart/scripts/passes/lift.ts
3
- function liftToParents(states, steps) {
4
- const depths = /* @__PURE__ */ new Map();
5
- const leaves = /* @__PURE__ */ new Map();
6
- for (const s of states.values()) for (let i = 1; i < s.path.length; i++) {
7
- const prefix = tupleKey(s.path.slice(0, i));
8
- depths.set(prefix, i);
9
- leaves.set(prefix, (leaves.get(prefix) ?? 0) + 1);
10
- }
11
- if (!depths.size) return steps;
12
- const leaving = /* @__PURE__ */ new Map();
13
- for (const s of steps) {
14
- let same = 0;
15
- while (same < s.from.length && s.from[same] === s.to[same]) same++;
16
- for (let i = 1; i < s.from.length; i++) {
17
- if (i <= same && i < s.to.length) continue;
18
- const prefix = tupleKey(s.from.slice(0, i));
19
- if (depths.has(prefix)) append(leaving, prefix, s);
20
- }
21
- }
22
- const removed = /* @__PURE__ */ new Set();
23
- const lifted = [];
24
- for (const [prefix] of [...depths].sort((a, b) => a[1] - b[1])) {
25
- const groups = /* @__PURE__ */ new Map();
26
- for (const s of leaving.get(prefix) ?? []) if (!removed.has(s)) append(groups, tupleKey([
27
- s.label,
28
- s.when,
29
- s.to
30
- ]), s);
31
- const under = must(leaves, prefix);
32
- for (const group of groups.values()) {
33
- if (under < 2 || group.length < under) continue;
34
- for (const s of group) removed.add(s);
35
- lifted.push({
36
- ...group[0],
37
- from: unkey(prefix)
38
- });
39
- }
40
- }
41
- const kept = [];
42
- for (const s of steps) if (!removed.has(s)) kept.push(s);
43
- for (const s of lifted) kept.push(s);
44
- return kept;
45
- }
46
- function lift(chart) {
47
- const regions = [];
48
- for (const r of chart.regions) {
49
- const known = /* @__PURE__ */ new Map();
50
- for (const s of r.states) known.set(s.path, known.size);
51
- let numbers;
52
- const pathIndex = (path) => {
53
- let i = known.get(path);
54
- if (i !== void 0) return i;
55
- if (!numbers) {
56
- numbers = /* @__PURE__ */ new Map();
57
- for (const s of r.states) numbers.set(tupleKey(s.path), numbers.size);
58
- }
59
- const k = tupleKey(path);
60
- i = numbers.get(k);
61
- if (i === void 0) numbers.set(k, i = numbers.size);
62
- known.set(path, i);
63
- return i;
64
- };
65
- const merged = /* @__PURE__ */ new Map();
66
- for (const s of liftToParents(r.states, r.steps)) {
67
- const f = pathIndex(s.from);
68
- const t = pathIndex(s.to);
69
- const k = s.when === void 0 && f < 2 ** 26 && t < 2 ** 26 ? f * 2 ** 26 + t : `${f},${t}:${s.when}`;
70
- const prior = merged.get(k);
71
- if (prior) prior.label += ` or ${s.label}`;
72
- else merged.set(k, { ...s });
73
- }
74
- regions.push({
75
- ...r,
76
- steps: [...merged.values()]
77
- });
78
- }
79
- return {
80
- ...chart,
81
- regions
82
- };
83
- }
84
- export { lift, liftToParents };
@@ -1,47 +0,0 @@
1
- import { append, holds, loopOf, must, tupleKey, unkey } from "../ir.mjs";
2
- // runtime/skills/statechart/scripts/passes/loop-check.ts
3
- function loopCheck({ regions, loops }, { names, keys, drawnLabels, sorted }, { index, from, to }, found) {
4
- const R = names.length;
5
- const combo = (i) => {
6
- const parts = [];
7
- for (let r = 0; r < R; r++) parts.push(keys[r][i]);
8
- return tupleKey(parts);
9
- };
10
- const stepsFrom = /* @__PURE__ */ new Map();
11
- const arrowsFrom = [];
12
- if (loops.length) {
13
- for (const j of sorted) append(stepsFrom, from[j], j);
14
- for (const { arrows } of regions) {
15
- const out = /* @__PURE__ */ new Map();
16
- for (const a of arrows) append(out, a.from, a);
17
- arrowsFrom.push(out);
18
- }
19
- }
20
- for (const b of found) {
21
- if (b.loop === void 0) continue;
22
- const inLoop = /* @__PURE__ */ new Set();
23
- const twinsOf = /* @__PURE__ */ new Map();
24
- for (const i of loopOf(b, index)) {
25
- inLoop.add(combo(i));
26
- append(twinsOf, combo(i), i);
27
- }
28
- for (const i of loopOf(b, index)) {
29
- const twins = must(twinsOf, combo(i));
30
- for (const [r, name] of names.entries()) {
31
- const takes = (a) => {
32
- for (const s of twins) for (const j of stepsFrom.get(s) ?? []) if (drawnLabels[j] === a.label && keys[r][to[j]] === a.to) return true;
33
- return false;
34
- };
35
- const rest = [];
36
- for (let o = 0; o < R; o++) if (o !== r) rest.push(keys[o][i]);
37
- for (const a of arrowsFrom[r].get(keys[r][i]) ?? []) {
38
- if (!holds(a.condition, rest)) continue;
39
- const next = [];
40
- for (let o = 0; o < R; o++) next.push(o === r ? a.to : keys[o][i]);
41
- if (!inLoop.has(tupleKey(next)) && !takes(a)) throw new Error(`The chart draws the step ${a.label} out of ${name ? `${name} ` : ""}${unkey(a.from).join(" / ")}, but the ${b.rule.name} loop cannot take it there. Show in a label what stops it.`);
42
- }
43
- }
44
- }
45
- }
46
- }
47
- export { loopCheck };
@@ -1,72 +0,0 @@
1
- import { hasRule, must, stateKey } from "../ir.mjs";
2
- // runtime/skills/statechart/scripts/passes/paths.ts
3
- function pathGraph(names) {
4
- const graph = {
5
- states: /* @__PURE__ */ new Map(),
6
- steps: []
7
- };
8
- const ids = /* @__PURE__ */ new Map();
9
- const taken = /* @__PURE__ */ new Map();
10
- const idOf = (vars, start) => {
11
- if (!vars) throw new Error("TLC's trace has a state with no values.");
12
- const k = stateKey(names.map((name) => vars[name]));
13
- let id = ids.get(k);
14
- if (id === void 0) {
15
- ids.set(k, id = String(ids.size));
16
- graph.states.set(id, {
17
- vars,
18
- start,
19
- breaks: []
20
- });
21
- } else if (start) must(graph.states, id).start = true;
22
- return id;
23
- };
24
- const route = (seq) => {
25
- const start = idOf(seq[0].vars, true);
26
- const path = [];
27
- let from = start;
28
- for (let i = 1; i < seq.length; i++) {
29
- const { action } = seq[i];
30
- const to = idOf(seq[i].vars, false);
31
- const k = `${from} ${to} ${action}`;
32
- let step = taken.get(k);
33
- if (!step) {
34
- taken.set(k, step = {
35
- from,
36
- to,
37
- action
38
- });
39
- graph.steps.push(step);
40
- }
41
- path.push({
42
- action,
43
- state: to,
44
- step
45
- });
46
- from = to;
47
- }
48
- return {
49
- start,
50
- path
51
- };
52
- };
53
- return {
54
- graph,
55
- bug: (rule, trace) => {
56
- if (!trace.length) throw new Error(`TLC's trace for ${rule.name} has no states.`);
57
- const bug = {
58
- rule,
59
- ...route(trace)
60
- };
61
- const end = must(graph.states, bug.path.at(-1)?.state ?? bug.start);
62
- if (!hasRule(end.breaks, rule)) end.breaks.push(rule);
63
- return bug;
64
- },
65
- lasso: ({ seq, loop }) => seq.length ? {
66
- ...route(seq),
67
- loop,
68
- stutters: loop === seq.length - 1
69
- } : void 0
70
- };
71
- }
72
- export { pathGraph };
@@ -1,135 +0,0 @@
1
- import { byText, count, defaultState, must, ruleKey, sortBy } from "../ir.mjs";
2
- // runtime/skills/statechart/scripts/passes/reach.ts
3
- function walk(graph) {
4
- const ids = [];
5
- const states = [];
6
- const nameOf = [];
7
- const starts = [];
8
- const unique = /* @__PURE__ */ new Set();
9
- for (const [id, s] of graph.states) {
10
- const name = defaultState(s.vars);
11
- if (s.start) starts.push(ids.length);
12
- ids.push(id);
13
- states.push(s);
14
- nameOf.push(name);
15
- unique.add(name);
16
- }
17
- const names = Array.from(unique).sort(byText);
18
- const rankOf = /* @__PURE__ */ new Map();
19
- for (let i = 0; i < names.length; i++) rankOf.set(names[i], i);
20
- const n = ids.length;
21
- const index = /* @__PURE__ */ new Map();
22
- const nameRank = new Int32Array(n);
23
- for (let i = 0; i < n; i++) {
24
- index.set(ids[i], i);
25
- nameRank[i] = must(rankOf, nameOf[i]);
26
- }
27
- const m = graph.steps.length;
28
- const from = new Int32Array(m);
29
- const to = new Int32Array(m);
30
- const action = new Int32Array(m);
31
- const actions = /* @__PURE__ */ new Map();
32
- for (let j = 0; j < m; j++) {
33
- const t = graph.steps[j];
34
- from[j] = must(index, t.from);
35
- to[j] = must(index, t.to);
36
- let a = actions.get(t.action);
37
- if (a === void 0) actions.set(t.action, a = actions.size);
38
- action[j] = a;
39
- }
40
- const actionRank = new Int32Array(actions.size);
41
- for (const [i, a] of [...actions.keys()].sort(byText).entries()) actionRank[must(actions, a)] = i;
42
- const toName = new Int32Array(m);
43
- for (let j = 0; j < m; j++) {
44
- action[j] = actionRank[action[j]];
45
- toName[j] = nameRank[to[j]];
46
- }
47
- const first = new Int32Array(n + 1);
48
- for (let j = 0; j < m; j++) first[from[j] + 1]++;
49
- for (let i = 0; i < n; i++) first[i + 1] += first[i];
50
- const fill = first.slice(0, n);
51
- const next = new Int32Array(m);
52
- for (const j of sortBy(count(m), [action, toName])) next[fill[from[j]]++] = j;
53
- starts.sort((a, b) => nameRank[a] - nameRank[b]);
54
- const depth = new Int32Array(n).fill(-1);
55
- const via = new Int32Array(n).fill(-1);
56
- const reached = new Int32Array(n);
57
- let size = 0;
58
- for (const s of starts) {
59
- depth[s] = 0;
60
- reached[size++] = s;
61
- }
62
- for (let q = 0; q < size; q++) {
63
- const s = reached[q];
64
- for (let e = first[s]; e < first[s + 1]; e++) {
65
- const t = to[next[e]];
66
- if (depth[t] >= 0) continue;
67
- depth[t] = depth[s] + 1;
68
- via[t] = next[e];
69
- reached[size++] = t;
70
- }
71
- }
72
- return {
73
- ids,
74
- states,
75
- index,
76
- nameOf,
77
- nameRank,
78
- from,
79
- to,
80
- action,
81
- depth,
82
- via,
83
- reached: reached.subarray(0, size),
84
- starts
85
- };
86
- }
87
- function drawOrder({ depth, nameRank }) {
88
- const n = depth.length;
89
- let deepest = 0;
90
- for (let i = 0; i < n; i++) if (depth[i] > deepest) deepest = depth[i];
91
- const level = new Int32Array(n);
92
- for (let i = 0; i < n; i++) level[i] = depth[i] < 0 ? deepest + 1 : depth[i];
93
- const order = sortBy(count(n), [level, nameRank]);
94
- const rank = new Int32Array(n);
95
- for (let p = 0; p < n; p++) rank[order[p]] = p;
96
- return {
97
- order,
98
- rank
99
- };
100
- }
101
- function bugs(graph, { ids, from, via, reached } = walk(graph)) {
102
- const ends = /* @__PURE__ */ new Map();
103
- for (const [id, s] of graph.states) for (const rule of s.ends ?? []) ends.set(ruleKey(rule), id);
104
- const first = /* @__PURE__ */ new Map();
105
- for (const i of reached) {
106
- const s = must(graph.states, ids[i]);
107
- for (const rule of s.past ? s.ends : s.breaks) {
108
- const k = ruleKey(rule);
109
- if (!first.has(k) && (ends.get(k) ?? ids[i]) === ids[i]) first.set(k, {
110
- rule,
111
- i
112
- });
113
- }
114
- }
115
- const found = [];
116
- for (const { rule, i } of first.values()) {
117
- const path = [];
118
- let start = i;
119
- for (let j; (j = via[start]) >= 0; start = from[j]) {
120
- const step = graph.steps[j];
121
- path.unshift({
122
- action: step.action,
123
- state: step.to,
124
- step
125
- });
126
- }
127
- found.push({
128
- rule,
129
- start: ids[start],
130
- path
131
- });
132
- }
133
- return found;
134
- }
135
- export { bugs, drawOrder, walk };
@@ -1,82 +0,0 @@
1
- import { append, holds, tupleKey, unkey } from "../ir.mjs";
2
- // runtime/skills/statechart/scripts/passes/region-check.ts
3
- function regionsLie(regions, { names, keys, sorted, drawnLabels, together }, { from, to, starts }, order) {
4
- if (names.length < 2) return void 0;
5
- const combo = (i) => {
6
- const c = [];
7
- for (let r = 0; r < names.length; r++) c.push(keys[r][i]);
8
- return c;
9
- };
10
- const words = (c) => {
11
- const parts = [];
12
- for (let i = 0; i < names.length; i++) parts.push(`${names[i]} ${unkey(c[i]).join(" / ")}`);
13
- return parts.join(", ");
14
- };
15
- const addMove = (moves, m) => moves.set(tupleKey([
16
- m.from,
17
- m.text,
18
- m.to
19
- ]), m);
20
- let product = [[]];
21
- for (const r of regions) {
22
- const next = [];
23
- for (const c of product) for (const s of r.states) if (s.start) next.push([...c, tupleKey(s.path)]);
24
- product = next;
25
- }
26
- const realStarts = /* @__PURE__ */ new Set();
27
- for (const i of starts) realStarts.add(tupleKey(combo(i)));
28
- for (const c of product) if (!realStarts.has(tupleKey(c))) return `The regions chart starts at ${words(c)}, where the model never starts.`;
29
- for (const [i, r] of regions.entries()) for (const a of r.arrows) if (a.condition.kind === "tuples") return `In ${names[i]}, ${a.label} from ${unkey(a.from).join(" / ")} depends on the other regions in a way that one "and" or "or" condition cannot say.`;
30
- const real = /* @__PURE__ */ new Map();
31
- for (const j of sorted) {
32
- const before = combo(from[j]);
33
- const after = combo(to[j]);
34
- if (tupleKey(before) !== tupleKey(after)) addMove(real, {
35
- from: before,
36
- text: drawnLabels[j],
37
- to: after
38
- });
39
- }
40
- const combos = /* @__PURE__ */ new Map();
41
- for (const i of order) {
42
- const c = combo(i);
43
- combos.set(tupleKey(c), c);
44
- }
45
- const drawn = /* @__PURE__ */ new Map();
46
- for (const c of combos.values()) {
47
- const enabled = /* @__PURE__ */ new Map();
48
- for (const [i, r] of regions.entries()) {
49
- const rest = [];
50
- for (let k = 0; k < c.length; k++) if (k !== i) rest.push(c[k]);
51
- for (const a of r.arrows) if (a.from === c[i] && holds(a.condition, rest)) append(enabled, a.label, {
52
- i,
53
- a
54
- });
55
- }
56
- for (const [text, list] of enabled) {
57
- let groups = [];
58
- if (together.has(text)) {
59
- const byRegion = /* @__PURE__ */ new Map();
60
- for (const m of list) append(byRegion, m.i, m);
61
- groups = [[]];
62
- for (const opts of byRegion.values()) {
63
- const next = [];
64
- for (const g of groups) for (const m of opts) next.push([...g, m]);
65
- groups = next;
66
- }
67
- } else for (const m of list) groups.push([m]);
68
- for (const group of groups) {
69
- const to = [...c];
70
- for (const { i, a } of group) to[i] = a.to;
71
- addMove(drawn, {
72
- from: c,
73
- text,
74
- to
75
- });
76
- }
77
- }
78
- }
79
- for (const [k, extra] of drawn) if (!real.has(k)) return `The regions chart lets ${words(extra.from)} go to ${words(extra.to)} by ${extra.text}, which the model never does.`;
80
- for (const [k, missing] of real) if (!drawn.has(k)) return `The model goes from ${words(missing.from)} to ${words(missing.to)} by ${missing.text}, which the regions chart cannot show.`;
81
- }
82
- export { regionsLie };