@selesai/code 0.9.14 → 0.10.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.
Files changed (263) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/README.md +6 -9
  3. package/dist/defaults/models.json +79 -29
  4. package/dist/defaults/settings.json +3 -7
  5. package/dist/extensions/package.json +3 -4
  6. package/dist/extensions/pi-zentui/.editorconfig +12 -0
  7. package/dist/extensions/pi-zentui/.github/CODEOWNERS +1 -0
  8. package/dist/extensions/pi-zentui/.github/ISSUE_TEMPLATE/bug_report.yml +110 -0
  9. package/dist/extensions/pi-zentui/.github/ISSUE_TEMPLATE/config.yml +8 -0
  10. package/dist/extensions/pi-zentui/.github/ISSUE_TEMPLATE/config_question.yml +56 -0
  11. package/dist/extensions/pi-zentui/.github/ISSUE_TEMPLATE/feature_request.yml +63 -0
  12. package/dist/extensions/pi-zentui/.github/ISSUE_TEMPLATE/rendering_issue.yml +106 -0
  13. package/dist/extensions/pi-zentui/.github/ISSUE_TEMPLATE/runtime_detection.yml +103 -0
  14. package/dist/extensions/pi-zentui/.github/dependabot.yml +47 -0
  15. package/dist/extensions/pi-zentui/.github/pull_request_template.md +34 -0
  16. package/dist/extensions/pi-zentui/.github/release.yml +18 -0
  17. package/dist/extensions/pi-zentui/.github/workflows/ci.yml +79 -0
  18. package/dist/extensions/pi-zentui/.github/workflows/publish.yml +63 -0
  19. package/dist/extensions/pi-zentui/AGENTS.md +107 -0
  20. package/dist/extensions/pi-zentui/CONTRIBUTING.md +68 -0
  21. package/dist/extensions/pi-zentui/LICENSE +21 -0
  22. package/dist/extensions/pi-zentui/README.md +188 -0
  23. package/dist/extensions/pi-zentui/SECURITY.md +18 -0
  24. package/dist/extensions/pi-zentui/assets/main-cover.png +0 -0
  25. package/dist/extensions/pi-zentui/assets/screenshots/editor-accent-rail.png +0 -0
  26. package/dist/extensions/pi-zentui/assets/screenshots/editor-minimalist.png +0 -0
  27. package/dist/extensions/pi-zentui/assets/screenshots/editor-opencode-copy-friendly.png +0 -0
  28. package/dist/extensions/pi-zentui/assets/screenshots/editor-opencode.png +0 -0
  29. package/dist/extensions/pi-zentui/assets/screenshots/user-message-compact.png +0 -0
  30. package/dist/extensions/pi-zentui/assets/screenshots/user-message-framed-copy-friendly.png +0 -0
  31. package/dist/extensions/pi-zentui/assets/screenshots/user-message-framed.png +0 -0
  32. package/dist/extensions/pi-zentui/assets/screenshots/user-message-labeled.png +0 -0
  33. package/dist/extensions/pi-zentui/assets/zentui.png +0 -0
  34. package/dist/extensions/pi-zentui/biome.json +31 -0
  35. package/dist/extensions/pi-zentui/docs/configuration.md +509 -0
  36. package/dist/extensions/pi-zentui/docs/footer-format.md +162 -0
  37. package/dist/extensions/pi-zentui/extensions/zentui/accent-rail-editor.ts +99 -0
  38. package/dist/extensions/pi-zentui/extensions/zentui/accent-rail-layout-patch.ts +457 -0
  39. package/dist/extensions/pi-zentui/extensions/zentui/completion-menu.ts +157 -0
  40. package/dist/extensions/pi-zentui/extensions/zentui/config.ts +2100 -0
  41. package/dist/extensions/pi-zentui/extensions/zentui/editor-metadata-format.ts +321 -0
  42. package/dist/extensions/pi-zentui/extensions/zentui/editor-transfer.ts +73 -0
  43. package/dist/extensions/pi-zentui/extensions/zentui/extension-status.ts +89 -0
  44. package/dist/extensions/pi-zentui/extensions/zentui/footer-format.ts +364 -0
  45. package/dist/extensions/pi-zentui/extensions/zentui/footer-layout.ts +122 -0
  46. package/dist/extensions/pi-zentui/extensions/zentui/footer.ts +812 -0
  47. package/dist/extensions/pi-zentui/extensions/zentui/format.ts +568 -0
  48. package/dist/extensions/pi-zentui/extensions/zentui/git.ts +384 -0
  49. package/dist/extensions/pi-zentui/extensions/zentui/icons.ts +252 -0
  50. package/dist/extensions/pi-zentui/extensions/zentui/index.ts +1406 -0
  51. package/dist/extensions/pi-zentui/extensions/zentui/interaction-summary.ts +1049 -0
  52. package/dist/extensions/pi-zentui/extensions/zentui/live-context.ts +75 -0
  53. package/dist/extensions/pi-zentui/extensions/zentui/minimalist-editor.ts +463 -0
  54. package/dist/extensions/pi-zentui/extensions/zentui/package-version.ts +651 -0
  55. package/dist/extensions/pi-zentui/extensions/zentui/project-refresh.ts +120 -0
  56. package/dist/extensions/pi-zentui/extensions/zentui/project-state.ts +59 -0
  57. package/dist/extensions/pi-zentui/extensions/zentui/prototype-patch-registry.ts +166 -0
  58. package/dist/extensions/pi-zentui/extensions/zentui/repository-root.ts +98 -0
  59. package/dist/extensions/pi-zentui/extensions/zentui/runtime.ts +841 -0
  60. package/dist/extensions/pi-zentui/extensions/zentui/selector-border.ts +93 -0
  61. package/dist/extensions/pi-zentui/extensions/zentui/session-lifecycle.ts +60 -0
  62. package/dist/extensions/pi-zentui/extensions/zentui/settings-command.ts +1796 -0
  63. package/dist/extensions/pi-zentui/extensions/zentui/settings-previews.ts +128 -0
  64. package/dist/extensions/pi-zentui/extensions/zentui/state.ts +94 -0
  65. package/dist/extensions/pi-zentui/extensions/zentui/style.ts +424 -0
  66. package/dist/extensions/pi-zentui/extensions/zentui/telemetry.ts +82 -0
  67. package/dist/extensions/pi-zentui/extensions/zentui/ui.ts +1290 -0
  68. package/dist/extensions/pi-zentui/extensions/zentui/user-message-osc.ts +248 -0
  69. package/dist/extensions/pi-zentui/extensions/zentui/user-message-styles.ts +215 -0
  70. package/dist/extensions/pi-zentui/extensions/zentui/user-message.ts +206 -0
  71. package/dist/extensions/pi-zentui/extensions/zentui/working-line-messages.ts +24 -0
  72. package/dist/extensions/pi-zentui/extensions/zentui/working-line-spinners.ts +54 -0
  73. package/dist/extensions/pi-zentui/extensions/zentui/working-line.ts +1433 -0
  74. package/dist/extensions/pi-zentui/package-lock.json +5311 -0
  75. package/dist/extensions/pi-zentui/package.json +60 -0
  76. package/dist/extensions/pi-zentui/test/accent-rail-editor.test.ts +232 -0
  77. package/dist/extensions/pi-zentui/test/accent-rail-layout-patch.test.ts +669 -0
  78. package/dist/extensions/pi-zentui/test/completion-menu.test.ts +265 -0
  79. package/dist/extensions/pi-zentui/test/config.test.ts +3119 -0
  80. package/dist/extensions/pi-zentui/test/editor-metadata-format.test.ts +405 -0
  81. package/dist/extensions/pi-zentui/test/editor-transfer.test.ts +260 -0
  82. package/dist/extensions/pi-zentui/test/editor-viewport-indicators.test.ts +1286 -0
  83. package/dist/extensions/pi-zentui/test/extension-compliance.test.ts +7196 -0
  84. package/dist/extensions/pi-zentui/test/extension-status.test.ts +182 -0
  85. package/dist/extensions/pi-zentui/test/fixtures/starship-nerd-font-symbols.toml +172 -0
  86. package/dist/extensions/pi-zentui/test/footer-format.test.ts +431 -0
  87. package/dist/extensions/pi-zentui/test/footer-layout.test.ts +113 -0
  88. package/dist/extensions/pi-zentui/test/footer-repository-path.test.ts +123 -0
  89. package/dist/extensions/pi-zentui/test/format.test.ts +865 -0
  90. package/dist/extensions/pi-zentui/test/git.test.ts +212 -0
  91. package/dist/extensions/pi-zentui/test/icons.test.ts +69 -0
  92. package/dist/extensions/pi-zentui/test/interaction-summary.test.ts +1402 -0
  93. package/dist/extensions/pi-zentui/test/live-context-integration.test.ts +378 -0
  94. package/dist/extensions/pi-zentui/test/live-context.test.ts +139 -0
  95. package/dist/extensions/pi-zentui/test/minimalist-editor.test.ts +811 -0
  96. package/dist/extensions/pi-zentui/test/package-version.test.ts +321 -0
  97. package/dist/extensions/pi-zentui/test/project-refresh.test.ts +250 -0
  98. package/dist/extensions/pi-zentui/test/project-state.test.ts +159 -0
  99. package/dist/extensions/pi-zentui/test/repository-root.test.ts +108 -0
  100. package/dist/extensions/pi-zentui/test/responsive-dependencies.test.ts +825 -0
  101. package/dist/extensions/pi-zentui/test/runtime.test.ts +183 -0
  102. package/dist/extensions/pi-zentui/test/session-lifecycle.test.ts +40 -0
  103. package/dist/extensions/pi-zentui/test/settings-command.test.ts +1381 -0
  104. package/dist/extensions/pi-zentui/test/settings-previews.test.ts +347 -0
  105. package/dist/extensions/pi-zentui/test/state.test.ts +84 -0
  106. package/dist/extensions/pi-zentui/test/telemetry-lifecycle-integration.test.ts +276 -0
  107. package/dist/extensions/pi-zentui/test/telemetry.test.ts +105 -0
  108. package/dist/extensions/pi-zentui/test/turn-summary-lifecycle.integration.test.ts +327 -0
  109. package/dist/extensions/pi-zentui/test/user-message-osc.test.ts +164 -0
  110. package/dist/extensions/pi-zentui/test/user-message-styles.test.ts +292 -0
  111. package/dist/extensions/pi-zentui/test/working-line-lifecycle.integration.test.ts +730 -0
  112. package/dist/extensions/pi-zentui/test/working-line-messages.test.ts +34 -0
  113. package/dist/extensions/pi-zentui/test/working-line.test.ts +1990 -0
  114. package/dist/extensions/pi-zentui/tsconfig.json +16 -0
  115. package/dist/extensions/tps.test.ts +38 -0
  116. package/dist/extensions/{pi-powerline-footer/tps.ts → tps.ts} +4 -0
  117. package/dist/skills/design-references/SKILL.md +31 -0
  118. package/dist/skills/design-references/references/clickhouse/DESIGN.md +544 -0
  119. package/dist/themes/adventure.json +84 -0
  120. package/dist/themes/adwaita-dark.json +84 -0
  121. package/dist/themes/arcoiris.json +84 -0
  122. package/dist/themes/arthur.json +84 -0
  123. package/dist/themes/atom.json +84 -0
  124. package/dist/themes/aura.json +84 -0
  125. package/dist/themes/black-metal-bathory.json +84 -0
  126. package/dist/themes/black-metal-burzum.json +84 -0
  127. package/dist/themes/black-metal-khold.json +84 -0
  128. package/dist/themes/box.json +84 -0
  129. package/dist/themes/brogrammer.json +84 -0
  130. package/dist/themes/carbonfox.json +84 -0
  131. package/dist/themes/catppuccin-mocha.json +84 -0
  132. package/dist/themes/citruszest.json +84 -0
  133. package/dist/themes/cursor-dark.json +84 -0
  134. package/dist/themes/cutie-pro.json +84 -0
  135. package/dist/themes/dark-modern.json +84 -0
  136. package/dist/themes/dark-pastel.json +84 -0
  137. package/dist/themes/dimmed-monokai.json +84 -0
  138. package/dist/themes/doom-peacock.json +84 -0
  139. package/dist/themes/dracula-plus.json +84 -0
  140. package/dist/themes/dracula.json +80 -0
  141. package/dist/themes/earthsong.json +84 -0
  142. package/dist/themes/everforest-dark-hard.json +84 -0
  143. package/dist/themes/everforest-dark.json +80 -0
  144. package/dist/themes/fahrenheit.json +84 -0
  145. package/dist/themes/flatland.json +84 -0
  146. package/dist/themes/flexoki-dark.json +84 -0
  147. package/dist/themes/front-end-delight.json +84 -0
  148. package/dist/themes/fun-forrest.json +84 -0
  149. package/dist/themes/galizur.json +84 -0
  150. package/dist/themes/github-dark-colorblind.json +84 -0
  151. package/dist/themes/github-dark-high-contrast.json +84 -0
  152. package/dist/themes/glacier.json +84 -0
  153. package/dist/themes/gruber-darker.json +84 -0
  154. package/dist/themes/gruvbox-dark-hard.json +84 -0
  155. package/dist/themes/gruvbox-dark.json +84 -0
  156. package/dist/themes/gruvbox-material.json +84 -0
  157. package/dist/themes/guezwhoz.json +84 -0
  158. package/dist/themes/hacktober.json +84 -0
  159. package/dist/themes/hardcore.json +84 -0
  160. package/dist/themes/havn-skumring.json +84 -0
  161. package/dist/themes/ic-orange-ppl.json +84 -0
  162. package/dist/themes/iterm2-smoooooth.json +84 -0
  163. package/dist/themes/iterm2-tango-dark.json +84 -0
  164. package/dist/themes/japanesque.json +84 -0
  165. package/dist/themes/jellybeans.json +84 -0
  166. package/dist/themes/kanagawa-wave.json +84 -0
  167. package/dist/themes/kurokula.json +84 -0
  168. package/dist/themes/later-this-evening.json +84 -0
  169. package/dist/themes/lovelace.json +84 -0
  170. package/dist/themes/material-darker.json +84 -0
  171. package/dist/themes/matte-black.json +84 -0
  172. package/dist/themes/mellow.json +84 -0
  173. package/dist/themes/miasma.json +84 -0
  174. package/dist/themes/nord.json +80 -0
  175. package/dist/themes/nvim-dark.json +84 -0
  176. package/dist/themes/one-dark.json +80 -0
  177. package/dist/themes/popping-and-locking.json +84 -0
  178. package/dist/themes/rose-pine.json +80 -0
  179. package/dist/themes/sea-shells.json +84 -0
  180. package/dist/themes/sleepy-hollow.json +84 -0
  181. package/dist/themes/smyck.json +84 -0
  182. package/dist/themes/solarized-dark.json +80 -0
  183. package/dist/themes/tokyo-night.json +80 -0
  184. package/dist/themes/tomorrow-night-bright.json +84 -0
  185. package/dist/themes/tomorrow-night-burns.json +84 -0
  186. package/dist/themes/tomorrow-night.json +84 -0
  187. package/dist/themes/twilight.json +84 -0
  188. package/dist/themes/vague.json +84 -0
  189. package/dist/themes/vesper.json +84 -0
  190. package/dist/themes/xcode-dark-hc.json +84 -0
  191. package/docs/custom-provider.md +0 -1
  192. package/docs/plans/auto-model-routing-extension.md +490 -0
  193. package/package.json +3 -3
  194. package/dist/extensions/pi-powerline-footer/.github/workflows/test.yml +0 -27
  195. package/dist/extensions/pi-powerline-footer/CHANGELOG.md +0 -687
  196. package/dist/extensions/pi-powerline-footer/CONTRIBUTING.md +0 -16
  197. package/dist/extensions/pi-powerline-footer/README.md +0 -513
  198. package/dist/extensions/pi-powerline-footer/banner.png +0 -0
  199. package/dist/extensions/pi-powerline-footer/bash-mode/completion.ts +0 -586
  200. package/dist/extensions/pi-powerline-footer/bash-mode/editor.ts +0 -583
  201. package/dist/extensions/pi-powerline-footer/bash-mode/history.ts +0 -204
  202. package/dist/extensions/pi-powerline-footer/bash-mode/shell-session.ts +0 -286
  203. package/dist/extensions/pi-powerline-footer/bash-mode/transcript.ts +0 -108
  204. package/dist/extensions/pi-powerline-footer/bash-mode/types.ts +0 -60
  205. package/dist/extensions/pi-powerline-footer/cd-command.ts +0 -190
  206. package/dist/extensions/pi-powerline-footer/colors.ts +0 -70
  207. package/dist/extensions/pi-powerline-footer/context-usage.ts +0 -156
  208. package/dist/extensions/pi-powerline-footer/currency-rates.ts +0 -142
  209. package/dist/extensions/pi-powerline-footer/editor-composition.ts +0 -32
  210. package/dist/extensions/pi-powerline-footer/editor-performance.ts +0 -99
  211. package/dist/extensions/pi-powerline-footer/git-status.ts +0 -329
  212. package/dist/extensions/pi-powerline-footer/guide.ts +0 -220
  213. package/dist/extensions/pi-powerline-footer/icons.ts +0 -190
  214. package/dist/extensions/pi-powerline-footer/index.ts +0 -3428
  215. package/dist/extensions/pi-powerline-footer/lifecycle.ts +0 -10
  216. package/dist/extensions/pi-powerline-footer/package.json +0 -49
  217. package/dist/extensions/pi-powerline-footer/paths.ts +0 -22
  218. package/dist/extensions/pi-powerline-footer/powerline-config.ts +0 -446
  219. package/dist/extensions/pi-powerline-footer/presets.ts +0 -102
  220. package/dist/extensions/pi-powerline-footer/queue/store.ts +0 -313
  221. package/dist/extensions/pi-powerline-footer/queue/types.ts +0 -53
  222. package/dist/extensions/pi-powerline-footer/render-scheduler.ts +0 -29
  223. package/dist/extensions/pi-powerline-footer/segments.ts +0 -570
  224. package/dist/extensions/pi-powerline-footer/separators.ts +0 -57
  225. package/dist/extensions/pi-powerline-footer/session-usage.ts +0 -44
  226. package/dist/extensions/pi-powerline-footer/shortcuts.ts +0 -61
  227. package/dist/extensions/pi-powerline-footer/tests/bash-mode.test.ts +0 -1905
  228. package/dist/extensions/pi-powerline-footer/tests/cd-command.test.ts +0 -144
  229. package/dist/extensions/pi-powerline-footer/tests/context-usage.test.ts +0 -156
  230. package/dist/extensions/pi-powerline-footer/tests/custom-items.test.ts +0 -344
  231. package/dist/extensions/pi-powerline-footer/tests/editor-composition.test.ts +0 -48
  232. package/dist/extensions/pi-powerline-footer/tests/editor-performance.test.ts +0 -43
  233. package/dist/extensions/pi-powerline-footer/tests/editor-responsiveness.test.ts +0 -136
  234. package/dist/extensions/pi-powerline-footer/tests/fixed-editor-border.test.ts +0 -39
  235. package/dist/extensions/pi-powerline-footer/tests/git-optional-locks.test.ts +0 -64
  236. package/dist/extensions/pi-powerline-footer/tests/git-status.test.ts +0 -92
  237. package/dist/extensions/pi-powerline-footer/tests/guide.test.ts +0 -129
  238. package/dist/extensions/pi-powerline-footer/tests/jump-shortcuts.test.ts +0 -116
  239. package/dist/extensions/pi-powerline-footer/tests/mode-aware-trigger.test.ts +0 -79
  240. package/dist/extensions/pi-powerline-footer/tests/paths.test.ts +0 -63
  241. package/dist/extensions/pi-powerline-footer/tests/queue-store.test.ts +0 -65
  242. package/dist/extensions/pi-powerline-footer/tests/quit-cursor.test.ts +0 -14
  243. package/dist/extensions/pi-powerline-footer/tests/remaining-regressions.test.ts +0 -173
  244. package/dist/extensions/pi-powerline-footer/tests/session-usage.test.ts +0 -47
  245. package/dist/extensions/pi-powerline-footer/tests/stash-shortcut.test.ts +0 -37
  246. package/dist/extensions/pi-powerline-footer/tests/thinking-segment.test.ts +0 -76
  247. package/dist/extensions/pi-powerline-footer/tests/token-stats.test.ts +0 -249
  248. package/dist/extensions/pi-powerline-footer/tests/tps.test.ts +0 -39
  249. package/dist/extensions/pi-powerline-footer/tests/usage-display.test.ts +0 -237
  250. package/dist/extensions/pi-powerline-footer/tests/welcome.test.ts +0 -199
  251. package/dist/extensions/pi-powerline-footer/tests/working-vibes.test.ts +0 -317
  252. package/dist/extensions/pi-powerline-footer/theme.example.json +0 -24
  253. package/dist/extensions/pi-powerline-footer/theme.json +0 -12
  254. package/dist/extensions/pi-powerline-footer/theme.ts +0 -241
  255. package/dist/extensions/pi-powerline-footer/token-stats.ts +0 -304
  256. package/dist/extensions/pi-powerline-footer/tsconfig.json +0 -13
  257. package/dist/extensions/pi-powerline-footer/types.ts +0 -235
  258. package/dist/extensions/pi-powerline-footer/welcome-dismiss.ts +0 -34
  259. package/dist/extensions/pi-powerline-footer/welcome.ts +0 -709
  260. package/dist/extensions/pi-powerline-footer/working-vibes.ts +0 -721
  261. package/dist/extensions/preview-tools-disabled.test.ts +0 -37
  262. package/dist/extensions/preview-tools-disabled.ts +0 -11
  263. package/dist/themes/powerline-footer/theme.json +0 -33
@@ -0,0 +1,490 @@
1
+ # Extension-Only Automatic Model Routing
2
+
3
+ ## Status
4
+
5
+ **Feasible with two important boundaries:** a Selesai extension can classify and route each **serially submitted, idle top-level user prompt** to a user-selected model without changing core. It cannot safely attach a different model to an already queued steering/follow-up message because model selection is session-global and the public extension API has no “queued message is about to run” hook. It also cannot guarantee per-prompt routing under **concurrent prompt submission** (for example parallel RPC prompts): the `input` hook runs while the session is still idle, so two concurrent prompts can both enter the classifier before either reaches the agent; whichever `pi.setModel()` finishes last wins for both. Robust per-prompt routing in either case needs one narrow core seam — a model override carried with the prompt or a pre-dispatch queued-message event.
6
+
7
+ The recommended first version is deliberately smaller than LiteLLM: reuse its four-tier classifier shape and agentic calibration, but omit proxy-only deployment, spend, adaptive-bandit, and management machinery.
8
+
9
+ ## Requested behavior
10
+
11
+ Expose a built-in-feeling `auto` routing mode with four canonical levels:
12
+
13
+ | Tier | Intended work | User setting |
14
+ | --- | --- | --- |
15
+ | `simple` | greetings, lookups, tiny obvious transformations | one available Selesai model |
16
+ | `medium` | routine coding, edits, installs, explanations, ordinary debugging | one available Selesai model |
17
+ | `complex` | semantic debugging, architecture, multi-step engineering, difficult search | one available Selesai model |
18
+ | `reasoning` | open-ended tradeoffs, proofs, optimization, decisions requiring extended deliberation | one available Selesai model |
19
+
20
+ The user configures the model assigned to each tier. On each eligible prompt:
21
+
22
+ ```text
23
+ current prompt + bounded conversation context
24
+ -> classifier
25
+ -> simple | medium | complex | reasoning
26
+ -> configured model
27
+ -> pi.setModel(model)
28
+ -> normal Selesai agent turn
29
+ ```
30
+
31
+ ## What LiteLLM currently does
32
+
33
+ ### Core mechanism
34
+
35
+ LiteLLM implements this as a pre-routing strategy in:
36
+
37
+ - `/Users/andrewanggada/Documents/workdir/js_proj/litellm/litellm/router_strategy/complexity_router/config.py`
38
+ - `/Users/andrewanggada/Documents/workdir/js_proj/litellm/litellm/router_strategy/complexity_router/complexity_router.py`
39
+ - `/Users/andrewanggada/Documents/workdir/js_proj/litellm/litellm/router_strategy/complexity_router/classification_rubrics.py`
40
+
41
+ Its built-in severity ladder is `SIMPLE < MEDIUM < COMPLEX < REASONING` (`config.py`, `ComplexityTier` and `TIER_SEVERITY_ORDER`). `ComplexityRouterConfig.tiers` maps each tier to a model or pool of models. A per-tier object can also supply request parameters such as `reasoning_effort` (`config.py`, `ComplexityTierModel`, `_normalize_tier_entries`, `_normalize_tier_model_configs`).
42
+
43
+ The live request lifecycle is driven by `ComplexityRouter.async_pre_routing_hook()` and `_classify_and_route()` (`complexity_router.py`, approximately lines 2082–2490):
44
+
45
+ 1. Normalize Chat Completions or Responses input into messages.
46
+ 2. Extract the newest real human ask.
47
+ 3. Remove tool-only turns and harness reminder blocks.
48
+ 4. Apply session affinity when enabled.
49
+ 5. Detect a current plan-mode floor.
50
+ 6. Apply deterministic keyword overrides.
51
+ 7. Run the configured classifier.
52
+ 8. Apply explicit escalation and plan-mode minimum tier.
53
+ 9. Map the tier to a model or model pool.
54
+ 10. Attach tier-specific request parameters.
55
+ 11. Return a `PreRoutingHookResponse` so the normal Router selects a deployment.
56
+ 12. Record a routing decision containing cause, tier, model, score/signals, and applied overrides.
57
+
58
+ ### Classifier options
59
+
60
+ `ComplexityRouterConfig.classifier_type` supports:
61
+
62
+ - `heuristic`: local weighted scoring with no model call.
63
+ - `llm`: a configured model returns a structured tier.
64
+ - `custom`: a trusted classifier plugin returns a tier.
65
+
66
+ The heuristic classifier (`ComplexityRouter._score_and_classify`) scores seven dimensions:
67
+
68
+ - token count
69
+ - code keywords
70
+ - reasoning markers
71
+ - technical terms
72
+ - simple indicators
73
+ - multi-step patterns
74
+ - question count
75
+
76
+ Default boundaries are `0.15`, `0.35`, and `0.60`. Two or more reasoning markers can promote a request to `REASONING`, but the prompt must normally clear the simple/medium score floor first. LiteLLM's README documents this as a local, deterministic, sub-millisecond path.
77
+
78
+ The LLM classifier uses:
79
+
80
+ - a trusted classifier system rubric;
81
+ - a generated structured response schema constrained to the active tier names;
82
+ - the caller's system prompt quoted as untrusted task context;
83
+ - a bounded prior-turn window;
84
+ - the current ask.
85
+
86
+ The trust-boundary instruction is important: quoted caller text may describe the task, but cannot instruct the classifier to choose a specific tier. See `classification_system_prompt()`, `_custom_tier_prompt()`, `_tier_classification_model()`, `_classify_with_llm()`, and `_build_classifier_user_payload()`.
87
+
88
+ ### Agentic calibration worth reusing
89
+
90
+ `classification_rubrics.py` contains an `agentic` preset specifically calibrated for coding-agent traffic. Its important boundary is:
91
+
92
+ - ordinary installs, builds, routine multi-file edits, and standard debugging are `MEDIUM`;
93
+ - non-trivial search, semantic/root-cause debugging, and optimization are `COMPLEX`;
94
+ - tradeoff-heavy decisions and genuinely difficult reasoning are `REASONING`.
95
+
96
+ This prevents “contains code” from automatically meaning “use the most expensive model.” That calibration is more valuable to Selesai than copying LiteLLM's proxy plumbing.
97
+
98
+ ### Features not needed in the extension
99
+
100
+ Do not replicate these initially:
101
+
102
+ - model-group deployment health and load balancing;
103
+ - spend logs and savings-baseline accounting;
104
+ - API key/team authorization;
105
+ - FastAPI management endpoints and dashboard forms;
106
+ - adaptive Thompson sampling;
107
+ - embedding-based semantic keyword routing;
108
+ - deployment affinity;
109
+ - alias response restamping;
110
+ - arbitrary runtime classifier/routing plugins;
111
+ - user-defined tier taxonomies.
112
+
113
+ They solve proxy-scale concerns, not the requested local “choose a model for each of four levels” behavior.
114
+
115
+ ## Selesai extension seams
116
+
117
+ ### Prompt interception
118
+
119
+ Use the public `input` event documented in `/opt/homebrew/lib/node_modules/@selesai/code/docs/extensions.md` and implemented in `src/core/agent-session.ts`.
120
+
121
+ The `input` hook runs before skill/template expansion and, critically, before current-model authentication preflight. That makes it safer than `before_agent_start`: if the current model has missing or expired credentials, a `before_agent_start` router may never execute, while an `input` router can switch to an authenticated configured target first.
122
+
123
+ Eligibility rule:
124
+
125
+ ```ts
126
+ if (event.streamingBehavior !== undefined) return { action: "continue" };
127
+ ```
128
+
129
+ This intentionally skips queued `steer` and `followUp` input. Direct `steer()`/`followUp()` calls also bypass both `input` and `before_agent_start`. Since `pi.setModel()` changes session-global state, switching during streaming could affect the active request instead of only the queued request.
130
+
131
+ ### Model discovery
132
+
133
+ The picker and router should use:
134
+
135
+ ```ts
136
+ const candidates = ctx.scopedModels.length
137
+ ? ctx.scopedModels.map(({ model }) => model)
138
+ : ctx.modelRegistry.getAvailable();
139
+ ```
140
+
141
+ `ctx.scopedModels` preserves the user's `--models` or `enabledModels` policy. An empty list means all available models are in scope. Store model identities as exact `provider/modelId` pairs and resolve them again before every switch with `ctx.modelRegistry.find(provider, id)`.
142
+
143
+ ### Model switching
144
+
145
+ Use the public API:
146
+
147
+ ```ts
148
+ const ok = await pi.setModel(model);
149
+ ```
150
+
151
+ `pi.setModel()` changes the active session model, appends a model-change entry, adjusts/clamps thinking level, and emits `model_select`. It returns `false` when configured authentication is unavailable and may throw on a live authentication/provider failure.
152
+
153
+ Automatic selection should **not** persist the routed model as the global default. The public extension binding already avoids default persistence. The final auto-selected model will still survive session resume through ordinary session model-change entries.
154
+
155
+ ### User configuration UI
156
+
157
+ The built-in `/settings` menu is not extensible. Its interactive entries are assembled as a fixed list in `src/modes/interactive/interactive-mode.ts` and `src/modes/interactive/components/settings-selector.ts`, with no extension contribution hook.
158
+
159
+ Therefore the extension should provide:
160
+
161
+ ```text
162
+ /auto-model-settings
163
+ ```
164
+
165
+ TUI behavior:
166
+
167
+ - Enable/disable automatic routing.
168
+ - Choose classifier mode.
169
+ - Select one model for each of the four tiers.
170
+ - Select fallback behavior.
171
+ - Show current mappings and last routing decision.
172
+ - Optionally run “test prompt” without submitting it.
173
+
174
+ Use `ctx.ui.custom()`/`SettingsList`, following:
175
+
176
+ - `/opt/homebrew/lib/node_modules/@selesai/code/examples/extensions/preset.ts`
177
+ - `/opt/homebrew/lib/node_modules/@selesai/code/examples/extensions/tools.ts`
178
+ - `src/extensions/pi-web-agent/src/commands/web-agent-config.ts`
179
+
180
+ Non-TUI behavior should be argument-based because `ctx.ui.custom()` is TUI-only:
181
+
182
+ ```text
183
+ /auto-model-settings show
184
+ /auto-model-settings enable
185
+ /auto-model-settings disable
186
+ /auto-model-settings set simple anthropic/claude-haiku-4-5
187
+ /auto-model-settings set medium openai-codex/gpt-5.3-codex
188
+ /auto-model-settings test "fix this parser bug"
189
+ ```
190
+
191
+ ### Configuration storage
192
+
193
+ Use an extension-owned file, not the host's closed settings schema.
194
+
195
+ Recommended paths:
196
+
197
+ ```text
198
+ Global: getAgentDir()/extensions/auto-model/config.json
199
+ Project: <cwd>/<CONFIG_DIR_NAME>/extensions/auto-model/config.json
200
+ ```
201
+
202
+ Only load project configuration when `ctx.isProjectTrusted()` is true. Merge defaults, global config, then trusted project config. Use `getAgentDir()` and `CONFIG_DIR_NAME` from `@selesai/code`; never hardcode `.pi`, `.selesai`, or a home-directory path.
203
+
204
+ Suggested minimal schema:
205
+
206
+ ```json
207
+ {
208
+ "enabled": false,
209
+ "classifier": {
210
+ "type": "llm",
211
+ "model": "provider/model-id",
212
+ "timeoutMs": 3000,
213
+ "contextTurns": 3,
214
+ "contextCharsPerTurn": 300
215
+ },
216
+ "tiers": {
217
+ "simple": "provider/model-id",
218
+ "medium": "provider/model-id",
219
+ "complex": "provider/model-id",
220
+ "reasoning": "provider/model-id"
221
+ },
222
+ "fallback": "current",
223
+ "manualSelection": "suspend-until-enabled"
224
+ }
225
+ ```
226
+
227
+ Keep the schema fixed to four tiers for version one. User-defined taxonomies, model pools, tier-specific thinking levels, and project/global UI scope toggles can wait until there is a demonstrated need.
228
+
229
+ ## Recommended classifier design
230
+
231
+ ### Decision
232
+
233
+ Start with an **LLM classifier using LiteLLM's agentic rubric**, plus a deterministic fallback. A heuristic-only classifier is cheaper, but keyword scoring is fragile for coding-agent prompts: repository context is technically dense even when the actual request is simple. The LLM rubric explicitly judges intellectual difficulty rather than length or technical vocabulary.
234
+
235
+ The classifier model is user-configurable and separate from the four routed models. It should normally be a fast inexpensive model.
236
+
237
+ ### Classifier input
238
+
239
+ The classifier runs through the low-level provider-aware model path described in the runtime sequence below. Use only bounded data:
240
+
241
+ 1. Current raw idle prompt.
242
+ 2. Up to three prior human turns from the current branch.
243
+ 3. Optionally prior assistant turns when enabled, capped per turn.
244
+ 4. A short approximate conversation-depth signal.
245
+
246
+ Exclude:
247
+
248
+ - tool results;
249
+ - extension-injected messages;
250
+ - complete harness reminder blocks;
251
+ - raw secrets or entire large context files;
252
+ - images in v1 classification (presence of an image can enforce a vision-capable target check instead).
253
+
254
+ For raw `/skill:name` or prompt-template commands, `input` sees the unexpanded command. Route conservatively to at least `medium`, or classify the command name plus raw arguments. Do not move the main router to `before_agent_start` solely to see expanded content because that reintroduces the old-model authentication preflight failure.
255
+
256
+ ### Structured output
257
+
258
+ Require exactly one JSON value:
259
+
260
+ ```json
261
+ {"tier":"simple"}
262
+ ```
263
+
264
+ Allowed values are `simple`, `medium`, `complex`, and `reasoning`. Reject free-text extraction. On timeout, provider failure, malformed JSON, or an unknown tier, use the configured fallback.
265
+
266
+ ### Deterministic fallback
267
+
268
+ The minimum fallback should be conservative and small:
269
+
270
+ - explicit planning/architecture/tradeoff/proof/optimization markers -> `reasoning`;
271
+ - root-cause debugging, multi-system or substantial multi-file work -> `complex`;
272
+ - routine coding/edit/build/test requests -> `medium`;
273
+ - greetings/lookups/tiny transformations -> `simple`;
274
+ - otherwise -> `medium`.
275
+
276
+ Do not copy LiteLLM's full configurable seven-dimension scorer into v1. The LLM classifier is primary; a small fallback is easier to audit and only handles classifier failure.
277
+
278
+ ## Runtime sequence
279
+
280
+ For every idle top-level `input` event:
281
+
282
+ 1. Return unchanged when routing is disabled.
283
+ 2. Return unchanged when `event.streamingBehavior` is `steer` or `followUp`.
284
+ 3. Return unchanged for extension-injected messages to prevent recursion.
285
+ 4. Load the effective merged configuration if it changed.
286
+ 5. Build the eligible model catalogue from `ctx.scopedModels` or `ctx.modelRegistry.getAvailable()`.
287
+ 6. Validate the four configured targets against that catalogue.
288
+ 7. Extract a bounded classifier payload from the current prompt and session branch.
289
+ 8. Run the configured classifier model with timeout and structured tier output using the low-level provider-aware path: resolve credentials through `ctx.modelRegistry.getApiKeyAndHeaders()`, prefer an extension-registered provider's effective `streamSimple` when applicable, and wrap headers/environment into the request exactly like `src/extensions/pi-subagents/src/runs/shared/llm-intent-arbiter.ts` does. There is no high-level classifier/completion API on `ExtensionAPI`; a direct low-level call without this provider plumbing can fail for custom extension-registered APIs.
290
+ 9. If classification fails, run the deterministic fallback.
291
+ 10. Resolve the selected tier's exact model.
292
+ 11. If the model is missing, out of scope, or unauthenticated, apply fallback behavior:
293
+ - `current`: keep the current model;
294
+ - later optional mode: try the next lower configured tier.
295
+ 12. If the target differs from `ctx.model`, set a short suppression flag and call `pi.setModel(target)`.
296
+ 13. Record an extension session entry with tier, target, cause, and timestamp; do not include prompt text.
297
+ 14. Update a compact status item such as `auto:medium -> gpt-5-mini`.
298
+ 15. Return `{ action: "continue" }` without changing the prompt.
299
+
300
+ On `model_select`:
301
+
302
+ - ignore the event while the extension's suppression flag is set;
303
+ - otherwise treat `/model` or model cycling as manual intent;
304
+ - recommended policy: suspend auto routing for the session until the user explicitly re-enables it.
305
+
306
+ On `session_start`:
307
+
308
+ - load configuration;
309
+ - validate configured model references against the current catalogue;
310
+ - restore the last extension decision/status from custom session entries;
311
+ - use `ctx.model` as the reliable restored active model signal.
312
+
313
+ ## Manual selection semantics
314
+
315
+ **Recommendation:** a manual `/model` selection suspends automatic routing for the remainder of the session. This avoids the frustrating behavior where a user explicitly picks a model and the next prompt immediately replaces it.
316
+
317
+ `/auto-model-settings enable` resumes routing. A later setting may offer `manualSelection: "next-prompt-only"`, but it is unnecessary for the initial implementation.
318
+
319
+ ## Failure and fallback behavior
320
+
321
+ | Failure | Behavior |
322
+ | --- | --- |
323
+ | classifier timeout/error | deterministic fallback |
324
+ | invalid classifier JSON/tier | deterministic fallback |
325
+ | configured classifier model unavailable | deterministic fallback and one warning |
326
+ | routed model missing/out of scope | keep current model and warn |
327
+ | `pi.setModel()` returns `false` | keep current model and warn about auth |
328
+ | `pi.setModel()` throws | keep current model; record error without blocking prompt |
329
+ | non-interactive mode | route normally; no custom UI; errors go to logs/status where supported |
330
+ | streaming/queued message | do not route |
331
+ | no configuration | disabled by default |
332
+
333
+ Extension handler exceptions are logged and the prompt continues, but the extension should catch its own failures so the user receives a useful, bounded warning and routing state remains coherent.
334
+
335
+ ## Proposed extension layout
336
+
337
+ ```text
338
+ src/extensions/auto-model/
339
+ index.ts # event handlers and command registration
340
+ config.ts # schema, global/project load/save, validation
341
+ classifier.ts # rubric, payload construction, LLM call, deterministic fallback
342
+ routing.ts # tier/model resolution and failure policy
343
+ settings-ui.ts # /auto-model-settings TUI and argument subcommands
344
+ state.ts # session decision/manual-suspension state
345
+ tests/
346
+ classifier.test.ts
347
+ config.test.ts
348
+ routing.test.ts
349
+ lifecycle.test.ts
350
+ ```
351
+
352
+ This is a planning shape, not a mandate to create six abstractions immediately. If implementation stays small, combine `state.ts` into `index.ts` and `routing.ts` into `classifier.ts`. Keep only seams that are independently testable or stateful.
353
+
354
+ ## Implementation phases
355
+
356
+ ### Phase 1 — minimal extension and deterministic routing
357
+
358
+ 1. Add the extension entry point and brand-aware config store.
359
+ 2. Add fixed four-tier schema and validation.
360
+ 3. Add `/auto-model-settings` with enable/disable/show/set commands and a TUI model picker.
361
+ 4. Add a deterministic classifier/fallback.
362
+ 5. Route idle top-level prompts through `input` and `pi.setModel()`.
363
+ 6. Add session status and manual-selection suspension.
364
+
365
+ Exit criterion: users can configure four models, enable auto mode, and see deterministic prompts select the expected target without touching core.
366
+
367
+ ### Phase 2 — LiteLLM-compatible agentic LLM classifier
368
+
369
+ 1. Port the agentic four-tier rubric and trust-boundary instruction.
370
+ 2. Add bounded prior-turn extraction from `ctx.sessionManager.getBranch()`.
371
+ 3. Add structured JSON validation and timeout.
372
+ 4. Add a separately configurable classifier model.
373
+ 5. Preserve deterministic routing as fallback.
374
+ 6. Add a `/auto-model-settings test <prompt>` preview that reports tier and target without changing the active model.
375
+
376
+ Exit criterion: the classifier handles short follow-ups, ordinary coding work, difficult semantic debugging, and tradeoff-heavy decisions consistently with the documented tier boundary.
377
+
378
+ ### Phase 3 — hardening and product polish
379
+
380
+ 1. Validate vision capability when a prompt includes images.
381
+ 2. Add config file watching or reload-on-mtime if live edits matter.
382
+ 3. Add privacy-safe decision history and optional debug display.
383
+ 4. Measure classifier latency and route distribution.
384
+ 5. Consider project overrides and scope selection in the UI.
385
+
386
+ Do not add model pools, adaptive routing, custom tiers, or spend dashboards until usage demonstrates a need.
387
+
388
+ ## Verification
389
+
390
+ ### Classifier checks
391
+
392
+ Use table-driven fixtures covering:
393
+
394
+ - greeting/lookup -> `simple`;
395
+ - routine one-file edit -> `medium`;
396
+ - normal package install/build -> `medium`;
397
+ - semantic root-cause bug hunt -> `complex`;
398
+ - architecture across systems -> `complex`;
399
+ - explicit tradeoff requiring a committed decision -> `reasoning`;
400
+ - trivial arithmetic wrapped in “think step by step” -> not automatically `reasoning`;
401
+ - short “yes/continue” after a difficult prior turn -> inherits the prior task;
402
+ - prompt injection requesting `reasoning` -> classified on merit;
403
+ - malformed/timeout classifier response -> deterministic fallback.
404
+
405
+ ### Routing checks
406
+
407
+ - Scoped model catalogue is respected.
408
+ - Exact provider/model lookup is used.
409
+ - Missing model and missing auth preserve the current model.
410
+ - Automatic switches do not modify the global default.
411
+ - Manual `/model` selection suspends routing.
412
+ - Session resume restores the selected model and extension state.
413
+ - Extension-injected messages do not recurse.
414
+ - Streaming `steer`/`followUp` input never changes the active model.
415
+
416
+ ### Configuration checks
417
+
418
+ - Global config loads from `getAgentDir()`.
419
+ - Project config loads through `CONFIG_DIR_NAME` only for trusted projects.
420
+ - Project values override global values.
421
+ - Invalid JSON does not overwrite a valid config.
422
+ - Atomic write/rename is used for saves.
423
+ - No `.pi`, `.selesai`, or home-directory config path is hardcoded.
424
+
425
+ ### User-flow check
426
+
427
+ In a real TUI session:
428
+
429
+ 1. Open `/auto-model-settings`.
430
+ 2. Assign four distinct visible models.
431
+ 3. Enable routing.
432
+ 4. Submit one fixture from each tier.
433
+ 5. Confirm the footer/status and actual `model_select` event match the expected configured model.
434
+ 6. Manually select a fifth model with `/model`.
435
+ 7. Submit another prompt and confirm auto routing remains suspended.
436
+ 8. Re-enable and confirm routing resumes.
437
+
438
+ ## Risks
439
+
440
+ 1. **Queued-message limitation:** full per-message routing for steering/follow-up is not extension-safe today. Solving it requires a core API that attaches a model to a queued message or fires immediately before that queued message starts.
441
+ 2. **Concurrent-prompt race:** two concurrently submitted prompts can both run the classifier while the session is idle; whichever `pi.setModel()` finishes last wins for both. Serialize classifier switches per session (handler-local mutex) and document that the guarantee covers serially submitted prompts; robust concurrent routing needs a per-prompt model override in core.
442
+ 3. **Classifier cost and latency:** an LLM classifier adds a request before every eligible turn. Keep the classifier fast, timeout aggressively, and retain the deterministic fallback.
443
+ 4. **Prompt sensitivity:** classification context may cross providers. Bound and document what is sent; offer heuristic-only mode for private/offline workflows.
444
+ 5. **Raw versus expanded input:** `/skill` and prompt-template commands are classified before expansion. Default them conservatively rather than moving the whole router later in the lifecycle.
445
+ 6. **Stale model catalogue/auth:** providers can change during a session. Resolve and authenticate on every switch; never assume stored model IDs remain usable.
446
+ 7. **Manual intent:** automatic routing that silently overrides `/model` will feel broken. Suspend after manual changes.
447
+ 8. **Thinking level changes:** `pi.setModel()` clamps thinking to model capability. A later version may need per-tier thinking settings, but v1 should accept host clamping and display the result.
448
+ 9. **Settings-menu expectation:** the extension cannot add an item to built-in `/settings`; it must offer its own command unless core later adds a settings-contribution API.
449
+
450
+ ## Decisions
451
+
452
+ ### Recommended defaults
453
+
454
+ - Extension-only: **yes**.
455
+ - Core modifications: **none**.
456
+ - Tier set: fixed `simple`, `medium`, `complex`, `reasoning`.
457
+ - Primary classifier: user-selected fast LLM with the agentic rubric.
458
+ - Fallback classifier: small deterministic rules.
459
+ - Routing event: idle `input`.
460
+ - Streaming input: skip.
461
+ - Built-in settings integration: not possible; use `/auto-model-settings`.
462
+ - Config storage: extension-owned global/project JSON using host resolvers.
463
+ - Manual model choice: suspend auto routing for the session.
464
+ - Model pools/adaptive routing: defer.
465
+
466
+ ### One product decision before implementation
467
+
468
+ Choose the initial classifier policy:
469
+
470
+ 1. **Recommended — LLM primary + heuristic fallback:** better semantic boundary, added latency/cost.
471
+ 2. **Heuristic only:** instant/offline, but more false classifications on technical prompts.
472
+ 3. **User-selectable from day one:** both modes in v1, slightly more UI and test surface.
473
+
474
+ The architecture supports all three. The smallest high-quality first release is option 1 with the classifier model configurable.
475
+
476
+ ## Non-goals
477
+
478
+ - Exact parity with LiteLLM proxy routing.
479
+ - Routing already queued steering/follow-up messages.
480
+ - Adding an item to built-in `/settings` without a new core contribution API.
481
+ - Changing the global default model on each route.
482
+ - User-defined tier taxonomies.
483
+ - Model pools, adaptive learning, deployment health selection, budget accounting, or savings dashboards.
484
+ - Modifying LiteLLM or Selesai core.
485
+
486
+ ## Feasibility verdict
487
+
488
+ Build it as an extension. The public APIs cover the requested top-level flow: intercept at `input`, discover allowed models with `ctx.scopedModels`/`ctx.modelRegistry`, switch with `pi.setModel`, present a custom settings command, and store configuration with brand-aware host resolvers. Classification is possible with the public **low-level** model APIs (`@earendil-works/pi-agent-core`/`@earendil-works/pi-ai` plus `ctx.modelRegistry.getApiKeyAndHeaders()`); there is no high-level classifier/completion method on `ExtensionAPI`, so the extension must implement the classifier call itself with provider-aware plumbing.
489
+
490
+ The material mismatches with the phrase “each user message” are queued steering/follow-up input and concurrently submitted prompts. Document v1 as **automatic routing for each serially submitted, idle top-level prompt**. If routing queued or concurrent messages is later required, add one narrow core seam rather than moving the whole feature into core: a per-prompt model override or a pre-dispatch queued-message event.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@selesai/code",
3
- "version": "0.9.14",
3
+ "version": "0.10.0",
4
4
  "description": "Maintained, extension-first Pi coding agent with built-in workflows, subagents, web research, questions, skills, and an enhanced terminal UI.",
5
5
  "type": "module",
6
6
  "repository": {
@@ -52,8 +52,8 @@
52
52
  "clean": "shx rm -rf dist",
53
53
  "dev": "tsx src/cli.ts",
54
54
  "dev:print": "tsx src/cli.ts --print",
55
- "test": "vitest run src/extensions/undo.test.ts src/extensions/custom-provider-ollama/index.test.ts src/extensions/agent-browser.test.ts src/extensions/context-compaction-reminder.test.ts src/extensions/copy-turn.test.ts src/extensions/grep-app/index.test.ts src/extensions/inline-skills.test.ts src/extensions/rtk.test.ts src/extensions/model-prompt-injector/index.test.ts src/extensions/web-agent-onboarding.test.ts src/extensions/handoff-new.test.ts src/extensions/question/tests src/extensions/ponytail/test src/__tests__/tokenin-onboarding.test.ts src/__tests__/model-registry-defaults.test.ts src/cli/args.test.ts",
56
- "test:coverage": "vitest run --coverage src/extensions/undo.test.ts src/extensions/custom-provider-ollama/index.test.ts src/extensions/agent-browser.test.ts src/extensions/context-compaction-reminder.test.ts src/extensions/copy-turn.test.ts src/extensions/grep-app/index.test.ts src/extensions/inline-skills.test.ts src/extensions/rtk.test.ts src/extensions/model-prompt-injector/index.test.ts src/extensions/web-agent-onboarding.test.ts src/extensions/handoff-new.test.ts src/extensions/question/tests src/extensions/ponytail/test src/__tests__/tokenin-onboarding.test.ts src/__tests__/model-registry-defaults.test.ts src/cli/args.test.ts",
55
+ "test": "vitest run src/extensions/undo.test.ts src/extensions/tps.test.ts src/extensions/agent-browser.test.ts src/extensions/context-compaction-reminder.test.ts src/extensions/copy-turn.test.ts src/extensions/grep-app/index.test.ts src/extensions/inline-skills.test.ts src/extensions/rtk.test.ts src/extensions/model-prompt-injector/index.test.ts src/extensions/web-agent-onboarding.test.ts src/extensions/handoff-new.test.ts src/extensions/question/tests src/extensions/ponytail/test src/__tests__/tokenin-onboarding.test.ts src/__tests__/model-registry-defaults.test.ts src/cli/args.test.ts",
56
+ "test:coverage": "vitest run --coverage src/extensions/undo.test.ts src/extensions/tps.test.ts src/extensions/agent-browser.test.ts src/extensions/context-compaction-reminder.test.ts src/extensions/copy-turn.test.ts src/extensions/grep-app/index.test.ts src/extensions/inline-skills.test.ts src/extensions/rtk.test.ts src/extensions/model-prompt-injector/index.test.ts src/extensions/web-agent-onboarding.test.ts src/extensions/handoff-new.test.ts src/extensions/question/tests src/extensions/ponytail/test src/__tests__/tokenin-onboarding.test.ts src/__tests__/model-registry-defaults.test.ts src/cli/args.test.ts",
57
57
  "prepare": "npm run build",
58
58
  "build": "npm run clean && tsgo -p tsconfig.build.json && shx chmod +x dist/cli.js dist/rpc-entry.js && npm run copy-assets",
59
59
  "copy-assets": "shx mkdir -p dist/modes/interactive/theme && shx cp src/modes/interactive/theme/*.json dist/modes/interactive/theme/ && shx mkdir -p dist/modes/interactive/assets && shx cp src/modes/interactive/assets/*.png dist/modes/interactive/assets/ && shx mkdir -p dist/core/export-html/vendor && shx cp src/core/export-html/template.html src/core/export-html/template.css src/core/export-html/template.js dist/core/export-html/ && shx cp src/core/export-html/vendor/*.js dist/core/export-html/vendor/ && shx mkdir -p dist/defaults && shx cp src/defaults/* dist/defaults/ && shx mkdir -p dist/extensions && node scripts/copy-extensions.mjs && shx mkdir -p dist/themes && shx cp -r src/themes/. dist/themes/ && shx mkdir -p dist/skills && shx cp -r src/skills/. dist/skills/"
@@ -1,27 +0,0 @@
1
- name: Test
2
-
3
- on:
4
- push:
5
- branches: [main]
6
- pull_request:
7
-
8
- jobs:
9
- test:
10
- name: test (${{ matrix.os }})
11
- runs-on: ${{ matrix.os }}
12
- strategy:
13
- fail-fast: false
14
- matrix:
15
- os: [ubuntu-latest, windows-latest]
16
- steps:
17
- - uses: actions/checkout@v5
18
- - uses: actions/setup-node@v5
19
- with:
20
- node-version: 24
21
- cache: npm
22
- - name: Install devDependencies
23
- run: npm ci --ignore-scripts
24
- - name: Typecheck
25
- run: npm run typecheck
26
- - name: Unit tests
27
- run: npm test