@code-yeongyu/senpi 2026.9.3 → 2026.9.4

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 (269) hide show
  1. package/CHANGELOG.md +75 -0
  2. package/dist/core/agent-session.d.ts +2 -5
  3. package/dist/core/agent-session.d.ts.map +1 -1
  4. package/dist/core/agent-session.js +32 -29
  5. package/dist/core/agent-session.js.map +1 -1
  6. package/dist/core/dynamic-prompt/style.js +1 -1
  7. package/dist/core/dynamic-prompt/style.js.map +1 -1
  8. package/dist/core/dynamic-prompt/working-task.js +1 -1
  9. package/dist/core/dynamic-prompt/working-task.js.map +1 -1
  10. package/dist/core/extensions/builtin/bash-timeout/index.d.ts +1 -1
  11. package/dist/core/extensions/builtin/bash-timeout/index.d.ts.map +1 -1
  12. package/dist/core/extensions/builtin/bash-timeout/index.js +7 -1
  13. package/dist/core/extensions/builtin/bash-timeout/index.js.map +1 -1
  14. package/dist/core/extensions/builtin/bash-timeout/timeout.d.ts +11 -7
  15. package/dist/core/extensions/builtin/bash-timeout/timeout.d.ts.map +1 -1
  16. package/dist/core/extensions/builtin/bash-timeout/timeout.js +4 -8
  17. package/dist/core/extensions/builtin/bash-timeout/timeout.js.map +1 -1
  18. package/dist/core/extensions/builtin/claude-sdk-oauth/auth-lane.d.ts.map +1 -1
  19. package/dist/core/extensions/builtin/claude-sdk-oauth/auth-lane.js +15 -18
  20. package/dist/core/extensions/builtin/claude-sdk-oauth/auth-lane.js.map +1 -1
  21. package/dist/core/extensions/builtin/claude-sdk-oauth/content-blocks.d.ts +3 -0
  22. package/dist/core/extensions/builtin/claude-sdk-oauth/content-blocks.d.ts.map +1 -0
  23. package/dist/core/extensions/builtin/claude-sdk-oauth/content-blocks.js +80 -0
  24. package/dist/core/extensions/builtin/claude-sdk-oauth/content-blocks.js.map +1 -0
  25. package/dist/core/extensions/builtin/claude-sdk-oauth/errors.d.ts +18 -1
  26. package/dist/core/extensions/builtin/claude-sdk-oauth/errors.d.ts.map +1 -1
  27. package/dist/core/extensions/builtin/claude-sdk-oauth/errors.js +57 -1
  28. package/dist/core/extensions/builtin/claude-sdk-oauth/errors.js.map +1 -1
  29. package/dist/core/extensions/builtin/claude-sdk-oauth/guidance.d.ts +1 -0
  30. package/dist/core/extensions/builtin/claude-sdk-oauth/guidance.d.ts.map +1 -1
  31. package/dist/core/extensions/builtin/claude-sdk-oauth/guidance.js +13 -0
  32. package/dist/core/extensions/builtin/claude-sdk-oauth/guidance.js.map +1 -1
  33. package/dist/core/extensions/builtin/claude-sdk-oauth/oauth-login.d.ts.map +1 -1
  34. package/dist/core/extensions/builtin/claude-sdk-oauth/oauth-login.js +6 -1
  35. package/dist/core/extensions/builtin/claude-sdk-oauth/oauth-login.js.map +1 -1
  36. package/dist/core/extensions/builtin/claude-sdk-oauth/prompt-bridge.d.ts.map +1 -1
  37. package/dist/core/extensions/builtin/claude-sdk-oauth/prompt-bridge.js +2 -23
  38. package/dist/core/extensions/builtin/claude-sdk-oauth/prompt-bridge.js.map +1 -1
  39. package/dist/core/extensions/builtin/claude-sdk-oauth/session-binding.d.ts +2 -2
  40. package/dist/core/extensions/builtin/claude-sdk-oauth/session-binding.d.ts.map +1 -1
  41. package/dist/core/extensions/builtin/claude-sdk-oauth/session-binding.js +30 -24
  42. package/dist/core/extensions/builtin/claude-sdk-oauth/session-binding.js.map +1 -1
  43. package/dist/core/extensions/builtin/claude-sdk-oauth/session-continuity.d.ts +2 -0
  44. package/dist/core/extensions/builtin/claude-sdk-oauth/session-continuity.d.ts.map +1 -1
  45. package/dist/core/extensions/builtin/claude-sdk-oauth/session-continuity.js +15 -1
  46. package/dist/core/extensions/builtin/claude-sdk-oauth/session-continuity.js.map +1 -1
  47. package/dist/core/extensions/builtin/claude-sdk-oauth/session-observability.d.ts +1 -1
  48. package/dist/core/extensions/builtin/claude-sdk-oauth/session-observability.d.ts.map +1 -1
  49. package/dist/core/extensions/builtin/claude-sdk-oauth/session-observability.js +1 -0
  50. package/dist/core/extensions/builtin/claude-sdk-oauth/session-observability.js.map +1 -1
  51. package/dist/core/extensions/builtin/claude-sdk-oauth/session-reattach.d.ts +6 -1
  52. package/dist/core/extensions/builtin/claude-sdk-oauth/session-reattach.d.ts.map +1 -1
  53. package/dist/core/extensions/builtin/claude-sdk-oauth/session-reattach.js +1 -0
  54. package/dist/core/extensions/builtin/claude-sdk-oauth/session-reattach.js.map +1 -1
  55. package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry-pump.d.ts.map +1 -1
  56. package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry-pump.js +19 -3
  57. package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry-pump.js.map +1 -1
  58. package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry-wiring.d.ts.map +1 -1
  59. package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry-wiring.js +31 -13
  60. package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry-wiring.js.map +1 -1
  61. package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry.d.ts +1 -0
  62. package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry.d.ts.map +1 -1
  63. package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry.js +1 -0
  64. package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry.js.map +1 -1
  65. package/dist/core/extensions/builtin/claude-sdk-oauth/session-sync.d.ts.map +1 -1
  66. package/dist/core/extensions/builtin/claude-sdk-oauth/session-sync.js +8 -14
  67. package/dist/core/extensions/builtin/claude-sdk-oauth/session-sync.js.map +1 -1
  68. package/dist/core/extensions/builtin/claude-sdk-oauth/session-turn-attempt.d.ts.map +1 -1
  69. package/dist/core/extensions/builtin/claude-sdk-oauth/session-turn-attempt.js +23 -6
  70. package/dist/core/extensions/builtin/claude-sdk-oauth/session-turn-attempt.js.map +1 -1
  71. package/dist/core/extensions/builtin/claude-sdk-oauth/stream-guidance.d.ts.map +1 -1
  72. package/dist/core/extensions/builtin/claude-sdk-oauth/stream-guidance.js +4 -2
  73. package/dist/core/extensions/builtin/claude-sdk-oauth/stream-guidance.js.map +1 -1
  74. package/dist/core/extensions/builtin/claude-sdk-oauth/stream-protocol.d.ts +1 -1
  75. package/dist/core/extensions/builtin/claude-sdk-oauth/stream-protocol.d.ts.map +1 -1
  76. package/dist/core/extensions/builtin/claude-sdk-oauth/stream.d.ts.map +1 -1
  77. package/dist/core/extensions/builtin/claude-sdk-oauth/stream.js +13 -6
  78. package/dist/core/extensions/builtin/claude-sdk-oauth/stream.js.map +1 -1
  79. package/dist/core/extensions/builtin/claude-sdk-oauth/tools.d.ts +11 -3
  80. package/dist/core/extensions/builtin/claude-sdk-oauth/tools.d.ts.map +1 -1
  81. package/dist/core/extensions/builtin/claude-sdk-oauth/tools.js +12 -3
  82. package/dist/core/extensions/builtin/claude-sdk-oauth/tools.js.map +1 -1
  83. package/dist/core/extensions/builtin/eval-only-routing.d.ts +10 -0
  84. package/dist/core/extensions/builtin/eval-only-routing.d.ts.map +1 -0
  85. package/dist/core/extensions/builtin/eval-only-routing.js +16 -0
  86. package/dist/core/extensions/builtin/eval-only-routing.js.map +1 -0
  87. package/dist/core/extensions/builtin/gpt-account.d.ts +3 -0
  88. package/dist/core/extensions/builtin/gpt-account.d.ts.map +1 -0
  89. package/dist/core/extensions/builtin/gpt-account.js +115 -0
  90. package/dist/core/extensions/builtin/gpt-account.js.map +1 -0
  91. package/dist/core/extensions/builtin/index.d.ts.map +1 -1
  92. package/dist/core/extensions/builtin/index.js +2 -0
  93. package/dist/core/extensions/builtin/index.js.map +1 -1
  94. package/dist/core/extensions/builtin/prompt-preset/claude-opus-4-5.d.ts.map +1 -1
  95. package/dist/core/extensions/builtin/prompt-preset/claude-opus-4-5.js +1 -3
  96. package/dist/core/extensions/builtin/prompt-preset/claude-opus-4-5.js.map +1 -1
  97. package/dist/core/extensions/builtin/prompt-preset/claude-opus-4-6.d.ts.map +1 -1
  98. package/dist/core/extensions/builtin/prompt-preset/claude-opus-4-6.js +1 -11
  99. package/dist/core/extensions/builtin/prompt-preset/claude-opus-4-6.js.map +1 -1
  100. package/dist/core/extensions/builtin/prompt-preset/claude-opus-4-7.js +2 -2
  101. package/dist/core/extensions/builtin/prompt-preset/claude-opus-4-7.js.map +1 -1
  102. package/dist/core/extensions/builtin/prompt-preset/claude-opus-4-8.js +3 -3
  103. package/dist/core/extensions/builtin/prompt-preset/claude-opus-4-8.js.map +1 -1
  104. package/dist/core/extensions/builtin/prompt-preset/claude-opus-5.d.ts.map +1 -1
  105. package/dist/core/extensions/builtin/prompt-preset/claude-opus-5.js +56 -43
  106. package/dist/core/extensions/builtin/prompt-preset/claude-opus-5.js.map +1 -1
  107. package/dist/core/extensions/builtin/prompt-preset/execution-tooling.d.ts +4 -15
  108. package/dist/core/extensions/builtin/prompt-preset/execution-tooling.d.ts.map +1 -1
  109. package/dist/core/extensions/builtin/prompt-preset/execution-tooling.js +12 -21
  110. package/dist/core/extensions/builtin/prompt-preset/execution-tooling.js.map +1 -1
  111. package/dist/core/extensions/builtin/prompt-preset/glm-5-2.d.ts +1 -1
  112. package/dist/core/extensions/builtin/prompt-preset/glm-5-2.d.ts.map +1 -1
  113. package/dist/core/extensions/builtin/prompt-preset/glm-5-2.js +2 -11
  114. package/dist/core/extensions/builtin/prompt-preset/glm-5-2.js.map +1 -1
  115. package/dist/core/extensions/builtin/prompt-preset/glm-5-3.d.ts +1 -1
  116. package/dist/core/extensions/builtin/prompt-preset/glm-5-3.d.ts.map +1 -1
  117. package/dist/core/extensions/builtin/prompt-preset/glm-5-3.js +2 -11
  118. package/dist/core/extensions/builtin/prompt-preset/glm-5-3.js.map +1 -1
  119. package/dist/core/extensions/builtin/prompt-preset/glm-5.d.ts +4 -0
  120. package/dist/core/extensions/builtin/prompt-preset/glm-5.d.ts.map +1 -0
  121. package/dist/core/extensions/builtin/prompt-preset/glm-5.js +16 -0
  122. package/dist/core/extensions/builtin/prompt-preset/glm-5.js.map +1 -0
  123. package/dist/core/extensions/builtin/prompt-preset/gpt-5.6.d.ts +1 -5
  124. package/dist/core/extensions/builtin/prompt-preset/gpt-5.6.d.ts.map +1 -1
  125. package/dist/core/extensions/builtin/prompt-preset/gpt-5.6.js +1 -6
  126. package/dist/core/extensions/builtin/prompt-preset/gpt-5.6.js.map +1 -1
  127. package/dist/core/extensions/builtin/prompt-preset/gpt-6-astra.d.ts +123 -0
  128. package/dist/core/extensions/builtin/prompt-preset/gpt-6-astra.d.ts.map +1 -0
  129. package/dist/core/extensions/builtin/prompt-preset/gpt-6-astra.js +202 -0
  130. package/dist/core/extensions/builtin/prompt-preset/gpt-6-astra.js.map +1 -0
  131. package/dist/core/extensions/builtin/prompt-preset/gpt-eval-routing.d.ts.map +1 -1
  132. package/dist/core/extensions/builtin/prompt-preset/gpt-eval-routing.js +1 -2
  133. package/dist/core/extensions/builtin/prompt-preset/gpt-eval-routing.js.map +1 -1
  134. package/dist/core/extensions/builtin/prompt-preset/kimi-k3.d.ts.map +1 -1
  135. package/dist/core/extensions/builtin/prompt-preset/kimi-k3.js +60 -76
  136. package/dist/core/extensions/builtin/prompt-preset/kimi-k3.js.map +1 -1
  137. package/dist/core/extensions/builtin/prompt-preset/presets.d.ts.map +1 -1
  138. package/dist/core/extensions/builtin/prompt-preset/presets.js +17 -0
  139. package/dist/core/extensions/builtin/prompt-preset/presets.js.map +1 -1
  140. package/dist/core/extensions/builtin/prompt-preset/settings.d.ts +1 -1
  141. package/dist/core/extensions/builtin/prompt-preset/settings.d.ts.map +1 -1
  142. package/dist/core/extensions/builtin/prompt-preset/settings.js +1 -0
  143. package/dist/core/extensions/builtin/prompt-preset/settings.js.map +1 -1
  144. package/dist/core/extensions/builtin/terminal/extension.d.ts.map +1 -1
  145. package/dist/core/extensions/builtin/terminal/extension.js +5 -2
  146. package/dist/core/extensions/builtin/terminal/extension.js.map +1 -1
  147. package/dist/core/extensions/builtin/terminal/prompt.d.ts +13 -2
  148. package/dist/core/extensions/builtin/terminal/prompt.d.ts.map +1 -1
  149. package/dist/core/extensions/builtin/terminal/prompt.js +18 -7
  150. package/dist/core/extensions/builtin/terminal/prompt.js.map +1 -1
  151. package/dist/core/extensions/builtin/tool-search/native-search.d.ts +1 -1
  152. package/dist/core/extensions/builtin/tool-search/native-search.d.ts.map +1 -1
  153. package/dist/core/extensions/builtin/tool-search/native-search.js +1 -1
  154. package/dist/core/extensions/builtin/tool-search/native-search.js.map +1 -1
  155. package/dist/core/extensions/builtin/ttsr/detectors/collapse-paragraphs.d.ts +34 -0
  156. package/dist/core/extensions/builtin/ttsr/detectors/collapse-paragraphs.d.ts.map +1 -0
  157. package/dist/core/extensions/builtin/ttsr/detectors/collapse-paragraphs.js +121 -0
  158. package/dist/core/extensions/builtin/ttsr/detectors/collapse-paragraphs.js.map +1 -0
  159. package/dist/core/extensions/builtin/ttsr/detectors/collapse.d.ts +2 -0
  160. package/dist/core/extensions/builtin/ttsr/detectors/collapse.d.ts.map +1 -1
  161. package/dist/core/extensions/builtin/ttsr/detectors/collapse.js +6 -2
  162. package/dist/core/extensions/builtin/ttsr/detectors/collapse.js.map +1 -1
  163. package/dist/core/session-manager.d.ts.map +1 -1
  164. package/dist/core/session-manager.js +18 -1
  165. package/dist/core/session-manager.js.map +1 -1
  166. package/dist/core/settings-manager.d.ts +0 -4
  167. package/dist/core/settings-manager.d.ts.map +1 -1
  168. package/dist/core/settings-manager.js +0 -6
  169. package/dist/core/settings-manager.js.map +1 -1
  170. package/dist/modes/print-mode.d.ts.map +1 -1
  171. package/dist/modes/print-mode.js +9 -0
  172. package/dist/modes/print-mode.js.map +1 -1
  173. package/dist/modes/rpc/connection-handler.d.ts +2 -0
  174. package/dist/modes/rpc/connection-handler.d.ts.map +1 -1
  175. package/dist/modes/rpc/connection-handler.js +71 -12
  176. package/dist/modes/rpc/connection-handler.js.map +1 -1
  177. package/dist/modes/rpc/custom-capability.d.ts +5 -0
  178. package/dist/modes/rpc/custom-capability.d.ts.map +1 -1
  179. package/dist/modes/rpc/custom-capability.js +5 -0
  180. package/dist/modes/rpc/custom-capability.js.map +1 -1
  181. package/dist/modes/rpc/login-prompts.d.ts +24 -0
  182. package/dist/modes/rpc/login-prompts.d.ts.map +1 -0
  183. package/dist/modes/rpc/login-prompts.js +44 -0
  184. package/dist/modes/rpc/login-prompts.js.map +1 -0
  185. package/dist/modes/rpc/media-placeholders.d.ts +49 -0
  186. package/dist/modes/rpc/media-placeholders.d.ts.map +1 -0
  187. package/dist/modes/rpc/media-placeholders.js +151 -0
  188. package/dist/modes/rpc/media-placeholders.js.map +1 -0
  189. package/dist/modes/rpc/multi-session-host.js +3 -0
  190. package/dist/modes/rpc/multi-session-host.js.map +1 -1
  191. package/dist/modes/rpc/rpc-client.d.ts +8 -0
  192. package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
  193. package/dist/modes/rpc/rpc-client.js +11 -0
  194. package/dist/modes/rpc/rpc-client.js.map +1 -1
  195. package/dist/modes/rpc/rpc-types.d.ts +23 -1
  196. package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
  197. package/dist/modes/rpc/rpc-types.js +1 -0
  198. package/dist/modes/rpc/rpc-types.js.map +1 -1
  199. package/dist/modes/rpc/session-command-router.d.ts.map +1 -1
  200. package/dist/modes/rpc/session-command-router.js +2 -1
  201. package/dist/modes/rpc/session-command-router.js.map +1 -1
  202. package/dist/modes/rpc/session-event-fanout.d.ts +13 -2
  203. package/dist/modes/rpc/session-event-fanout.d.ts.map +1 -1
  204. package/dist/modes/rpc/session-event-fanout.js +36 -12
  205. package/dist/modes/rpc/session-event-fanout.js.map +1 -1
  206. package/dist/modes/rpc/session-event-writer.d.ts +3 -1
  207. package/dist/modes/rpc/session-event-writer.d.ts.map +1 -1
  208. package/dist/modes/rpc/session-event-writer.js +23 -13
  209. package/dist/modes/rpc/session-event-writer.js.map +1 -1
  210. package/dist/modes/rpc/socket-event-fanout.d.ts +8 -1
  211. package/dist/modes/rpc/socket-event-fanout.d.ts.map +1 -1
  212. package/dist/modes/rpc/socket-event-fanout.js +32 -9
  213. package/dist/modes/rpc/socket-event-fanout.js.map +1 -1
  214. package/docs/rpc.md +104 -0
  215. package/docs/settings.md +5 -27
  216. package/docs/windows.md +1 -1
  217. package/node_modules/@anthropic-ai/claude-agent-sdk/bridge.d.ts +18 -1
  218. package/node_modules/@anthropic-ai/claude-agent-sdk/bridge.mjs +155 -106
  219. package/node_modules/@anthropic-ai/claude-agent-sdk/browser-sdk.js +144 -83
  220. package/node_modules/@anthropic-ai/claude-agent-sdk/manifest.json +21 -32
  221. package/node_modules/@anthropic-ai/claude-agent-sdk/manifest.zst.json +25 -36
  222. package/node_modules/@anthropic-ai/claude-agent-sdk/package.json +2 -2
  223. package/node_modules/@anthropic-ai/claude-agent-sdk/sdk-tools.d.ts +93 -31
  224. package/node_modules/@anthropic-ai/claude-agent-sdk/sdk.d.ts +473 -31
  225. package/node_modules/@anthropic-ai/claude-agent-sdk/sdk.mjs +140 -93
  226. package/node_modules/@code-yeongyu/senpi-codemode/CHANGELOG.md +38 -0
  227. package/node_modules/@code-yeongyu/senpi-codemode/package.json +4 -4
  228. package/node_modules/@code-yeongyu/senpi-codemode/src/index.ts +17 -0
  229. package/node_modules/@code-yeongyu/senpi-codemode/src/kernels/js/worker-runtime.js +6 -0
  230. package/node_modules/@code-yeongyu/senpi-codemode/src/kernels/js/worker-shell-capture.d.ts +10 -0
  231. package/node_modules/@code-yeongyu/senpi-codemode/src/kernels/js/worker-shell-capture.js +126 -0
  232. package/node_modules/@code-yeongyu/senpi-codemode/src/prompt/eval-prompt.ts +14 -6
  233. package/node_modules/@code-yeongyu/senpi-codemode/src/tool/eval-tool-options.ts +2 -0
  234. package/node_modules/@code-yeongyu/senpi-codemode/src/tool/eval-tool.ts +1 -0
  235. package/node_modules/@earendil-works/pi-agent-core/package.json +3 -3
  236. package/node_modules/@earendil-works/pi-ai/dist/api/context-room.d.ts +20 -0
  237. package/node_modules/@earendil-works/pi-ai/dist/api/context-room.d.ts.map +1 -0
  238. package/node_modules/@earendil-works/pi-ai/dist/api/context-room.js +40 -0
  239. package/node_modules/@earendil-works/pi-ai/dist/api/context-room.js.map +1 -0
  240. package/node_modules/@earendil-works/pi-ai/dist/api/simple-options.d.ts +1 -3
  241. package/node_modules/@earendil-works/pi-ai/dist/api/simple-options.d.ts.map +1 -1
  242. package/node_modules/@earendil-works/pi-ai/dist/api/simple-options.js +2 -16
  243. package/node_modules/@earendil-works/pi-ai/dist/api/simple-options.js.map +1 -1
  244. package/node_modules/@earendil-works/pi-ai/dist/auth/pool/slots.d.ts +16 -3
  245. package/node_modules/@earendil-works/pi-ai/dist/auth/pool/slots.d.ts.map +1 -1
  246. package/node_modules/@earendil-works/pi-ai/dist/auth/pool/slots.js +40 -6
  247. package/node_modules/@earendil-works/pi-ai/dist/auth/pool/slots.js.map +1 -1
  248. package/node_modules/@earendil-works/pi-ai/dist/compat/extension-oauth-types.d.ts +8 -0
  249. package/node_modules/@earendil-works/pi-ai/dist/compat/extension-oauth-types.d.ts.map +1 -1
  250. package/node_modules/@earendil-works/pi-ai/dist/compat/extension-oauth-types.js.map +1 -1
  251. package/node_modules/@earendil-works/pi-ai/dist/models.d.ts.map +1 -1
  252. package/node_modules/@earendil-works/pi-ai/dist/models.js +3 -2
  253. package/node_modules/@earendil-works/pi-ai/dist/models.js.map +1 -1
  254. package/node_modules/@earendil-works/pi-ai/dist/providers/data/.manifest.json +1 -1
  255. package/node_modules/@earendil-works/pi-ai/dist/providers/data/azure-openai-responses.json +1 -1
  256. package/node_modules/@earendil-works/pi-ai/dist/providers/data/huggingface.json +1 -1
  257. package/node_modules/@earendil-works/pi-ai/dist/providers/data/nvidia.json +1 -1
  258. package/node_modules/@earendil-works/pi-ai/dist/providers/data/openai-codex.json +1 -1
  259. package/node_modules/@earendil-works/pi-ai/dist/providers/data/openai.json +1 -1
  260. package/node_modules/@earendil-works/pi-ai/dist/providers/data/openrouter.json +1 -1
  261. package/node_modules/@earendil-works/pi-ai/dist/providers/data/vercel-ai-gateway.json +1 -1
  262. package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.d.ts.map +1 -1
  263. package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.js +2 -0
  264. package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.js.map +1 -1
  265. package/node_modules/@earendil-works/pi-ai/package.json +2 -2
  266. package/node_modules/@earendil-works/pi-pty/package.json +1 -1
  267. package/node_modules/@earendil-works/pi-telemetry/package.json +1 -1
  268. package/node_modules/@earendil-works/pi-tui/package.json +1 -1
  269. package/package.json +16 -16
@@ -1,54 +1,43 @@
1
1
  // Kimi K3 full-core system prompt.
2
2
  //
3
- // K3 previously ran the shared dynamic core plus a small `tuningSection`. That
4
- // pair double-taxed the model: the K2-line prompting guidance says K2/K3-class
5
- // models reason proportionally to the unresolved decisions in their input and
6
- // respond to terminal conditions and commitment framing, while layering
7
- // duplicate strictness on top of their RL-tuned instruction following produces
8
- // redundant verification loops and self-second-guessing. The shared core plus
9
- // tuning carried the act-bias rule three times (intent gate, style, tuning)
10
- // and the no-re-derivation rule twice.
11
- //
12
- // This rewrite merges the K3 tuning into a leaner Kimi-shaped core via the
13
- // builder's `corePrompt` override (precedent: gpt-5.5.ts / gpt-5.6.ts). Every
14
- // behavioral contract is preserved, each stated exactly once: the
15
- // README-advertised "I read this as" routing line, the anti-leakage guard, the
16
- // routing-by-true-intent classifier, turn-local intent reset, the
17
- // confirmation-turn re-entry rule, parallel tool waves, exploration stop
18
- // conditions, V1/V2/V3 verification tiers plus the shared test-discipline
19
- // rules, hard blocks, execution stance, non-refusal, and the auto-compaction
20
- // continuation (retargeted at the declared stop condition). The routing line
21
- // carries the binding stop contract adopted from the Claude Opus 5 / GPT-5.6
22
- // presets - a declared, observable, per-turn stop condition - phrased as a
23
- // positive terminal condition (Opus 5's calm wording, not GPT-5.6's all-caps
24
- // Stop Goal) because the K2-line guidance says the trained loop terminates on
25
- // a condition, not a token count, and all-caps directives make it overthink.
26
- // Dynamic pieces (tool section, context files, skills, date, cwd, kimi-dialect
27
- // workstation block) still come from `buildDynamicSystemPrompt`.
28
- //
29
- // 2026-07-27: the Intent Gate's ambiguity clause was upgraded from "resolve
30
- // from context when possible" to a reflect-then-ask gate. Moonshot's own K3
31
- // limitations note excessive proactiveness - in ambiguous scenarios K3 tends
32
- // to act rather than ask - so the trained prior needs a replacement behavior
33
- // with a terminal condition (K2-line guidance: the loop stops on a condition,
34
- // not a prohibition): context settles what it can, trivial gaps are filled
35
- // silently, and a surviving material ambiguity routes to one specific
36
- // clarifying question instead of an invented assumption. The Style section's
37
- // permission-begging ban carves that question out so the two rules cannot
38
- // collide.
39
- //
40
- // 2026-08-03: the Verification section opens with a test-proportionality
41
- // terminal condition (one focused test at the touched seam; prose, docs, and
42
- // visual-only work take review + real-surface QA instead of tests). The
43
- // session corpus showed K3 writing more test files than any other model, and
44
- // the K2-line guidance prescribes terminal conditions over prohibitions, so
45
- // the rule names when checking stops instead of forbidding tests.
3
+ // 2026-09-03 redesign against Moonshot's own K3 guidance. The previous core
4
+ // was written through the K2.6 lens (kimi.md practitioner overlay: an
5
+ // overthinker that needs act-bias and terminal conditions and must not be
6
+ // given prohibitions). Moonshot's K3 release notes describe the opposite
7
+ // failure - "excessive proactiveness": on minor issues or ambiguous intent
8
+ // K3 makes unexpected decisions on the user's behalf, and Moonshot's remedy is
9
+ // "more explicit behavioral constraints in the system prompt or AGENTS.md".
10
+ // The old core carried the act-bias rule in four places ("decisive" identity,
11
+ // Working's decide-and-act, Style's act-then-report / do-the-next-step /
12
+ // no-permission-begging, the closing keep-working line) against one
13
+ // reflect-then-ask clause, so the trained prior won the vote. This rewrite keeps every documented K3 observation from
14
+ // the session corpus (restating requests, re-deriving facts, filler
15
+ // verification language, more test files than any other model) and every
16
+ // fork contract (README routing line, binding stop condition, execution
17
+ // tooling, test discipline, non-refusal, auto-compaction), each stated once,
18
+ // and adds the three homes the Fable 5.1 / GPT-5.6 cores have and K3 lacked:
19
+ // a Scope section (deliverable = request; pre-existing problems are
20
+ // follow-ups; blocked parts; test scope), a mid-task issue rule with a
21
+ // bounded failure cap (the "minor issue" trigger Moonshot names), and one
22
+ // delegation sentence with a propagated stop condition (senpi's task tools
23
+ // return immediately; K3 children over-improvise the same way). Deleted as
24
+ // duplicates: the "never speculate" hard limit (re-read rule), the closing
25
+ // stop restatement and the enumerated past-stop defects, the re-litigation
26
+ // sentence (the confirmation-turn rule owns it), the V1/V2/V3 labels, the
27
+ // quoted filler anti-examples, and Claude-default style traits. Two anchor
28
+ // phrases are bold because they are the boundaries Moonshot says K3 crosses. Positive DO-framing and
29
+ // plain declarative constraints per the Kimi first-party prompt guide (clear
30
+ // instructions, delimiters, no decoration); no XML because the fork's Kimi
31
+ // dialect is untagged. Dynamic pieces (tool section, context files, skills,
32
+ // date, cwd, kimi-dialect workstation block) still come from
33
+ // buildDynamicSystemPrompt. Harness-level K3 limitation NOT addressed here:
34
+ // preserved-thinking sensitivity (switching a live session to K3 degrades it).
46
35
  import { APP_NAME } from "../../../../config.js";
47
36
  import { buildDynamicSystemPrompt } from "../../../dynamic-prompt/build.js";
48
37
  import { getToolsPromptDisplay } from "../../../dynamic-prompt/tool-categorization.js";
49
38
  import { buildTestDisciplineSection } from "../../../dynamic-prompt/verification.js";
50
39
  import { buildExecutionToolingParagraph } from "./execution-tooling.js";
51
- function buildSearchTriggerLine(context) {
40
+ function buildSearchLine(context) {
52
41
  const triggerTools = getToolsPromptDisplay(context.tools);
53
42
  if (!triggerTools) {
54
43
  return "";
@@ -56,67 +45,62 @@ function buildSearchTriggerLine(context) {
56
45
  return `\nSpecialized search available this turn: ${triggerTools}. Prefer them for locating symbols, files, and patterns; never mention a tool this turn does not have.\n`;
57
46
  }
58
47
  function buildKimiK3Core(context) {
59
- return `You are ${APP_NAME}, a coding agent running on Kimi K3 - decisive and evidence-first. Ship work indistinguishable from a careful senior engineer's.
48
+ return `You are ${APP_NAME}, a coding agent running on Kimi K3. Your work should be indistinguishable from a careful senior engineer's: exactly what was asked, backed by evidence.
60
49
 
61
50
  ## Intent Gate
62
51
 
63
- Open every turn with one short visible routing line - required even on confirmation turns:
52
+ Open every turn with one short routing line, confirmation turns included:
64
53
 
65
54
  > I read this as [intent] - [plan]. I'll stop when [the exact, observable condition that ends this turn].
66
55
 
67
- The line states your reading; only the user's explicit request commits you to implementation. Before naming the stop condition, think through what the goal actually is - the end state the user can observe, not a step count. Once declared it is binding: the moment it holds, check it against evidence you already captured - no new verification - deliver the final message, and stop. Every action past the declared stop condition is a defect, not diligence: no extra verification pass, no re-polish, no bonus refactor, no unrequested follow-up.
68
-
69
- Derive intent from the latest user message alone - a new direction cancels the stale plan, and queued steering messages outrank it. On confirmation turns where the user already chose an option in plain words, acknowledge the choice and execute; alternatives the user eliminated stay closed. Never surface other prompt scaffolding ("Step 0", "Thinking level", XML tool-call examples) in user-facing output.
70
- ${buildSearchTriggerLine(context)}
56
+ Only the user's explicit request commits you to implementation. The stop condition is an observable end state, not a step count, and it is binding: work until it holds, then check it against evidence you already captured, deliver the final message, and stop; more verification or polish past that point is a defect. Never echo prompt scaffolding in user-facing output.
57
+ ${buildSearchLine(context)}
71
58
  Route by true intent, not surface form:
72
- - "explain X" / "how does Y work": read the code, answer. No edits.
73
- - "look into" / "check" / "investigate": search and read, report findings. No fixes yet.
74
- - "what do you think about X?": judge and propose; wait for confirmation.
75
- - "implement X" / "I'm seeing error Y": inspect the code, tests, or runtime the work depends on, then build, or fix minimally from the error.
76
- - "refactor" / "improve" / "clean up": assess first, propose an approach.
59
+ - Information asks (explain, look into, investigate): read the code and report; no edits.
60
+ - Judgment asks (what do you think, review) and open-ended changes (refactor, improve, clean up): assess and propose, then wait for confirmation.
61
+ - Change asks (implement, add, fix this error): build, or diagnose and fix minimally.
77
62
 
78
- Explicitly scoped requests get exactly that scope; open-ended ones take the smallest path that fully satisfies the goal. Before the routing line, reread the request once for ambiguity: resolve what code, files, and conversation settle, and silently fill trivial gaps any senior engineer would fill. When a material ambiguity survives - readings that produce different deliverables, a target the context cannot supply, or instructions that conflict - state your best reading, ask the one specific question that unblocks the work, and end the turn. Building on an invented assumption there is a defect, exactly like acting past the stop condition.
63
+ Derive intent from the latest user turn alone: a new direction drops the stale plan, and queued steering messages outrank earlier intent. When the user has already chosen in plain words, acknowledge the choice in one line and execute it; alternatives they eliminated stay closed.
79
64
 
80
- ## Working the Task
65
+ Before the routing line, reread the request once for ambiguity. Resolve what the code, files, and conversation settle, and fill trivial gaps the way any senior engineer would. When a material ambiguity survives - readings that produce different deliverables, a target the context cannot supply, or instructions that conflict - do every part that does not depend on the answer, then state your best reading and ask the one specific question that unblocks the rest. **An invented assumption is a defect.**
81
66
 
82
- Decide one path and act; reopen a settled choice only when new evidence contradicts it. Act directly on mechanical or already-specified work, and save deep reasoning for where correctness is genuinely at risk - ambiguity, failure, irreversible operations.
67
+ ## Scope
83
68
 
84
- Fire independent tool calls - reads, searches, listings, diagnostics - in one parallel wave; sequence only when a call needs a value another produced, and never fill missing parameters with placeholders. When context is thin, pull in loosely relevant material now instead of serially later.
69
+ The request sets the scope, and the scope is the deliverable: **deliver all of it and only it.** A pre-existing bug, a performance concern, or behavior the task does not mention is a follow-up for your summary, not a change in this diff, unless the requested behavior cannot work without it. If part of the task is blocked, finish every other part and say exactly what you left out and why; scaling the task down is the user's call. If the request seems mistaken or a better approach exists, say so in a sentence, then do it the user's way.
85
70
 
86
- ${buildExecutionToolingParagraph({ toolNames: context.tools.map((tool) => tool.name), dialect: "kimi" })}Memory of file contents is unreliable - re-read before claiming or editing. Stop searching when one wave answers the core question, the same fact appears in two independent sources, or two waves add nothing new; search again only when synthesis surfaces a new unknown, never as a "just to be sure" sweep. When the answer is already in context, return it: do not restate the user's request, do not re-derive facts you already established this turn, and skip filler verification language ("let me confirm again", "to be sure", "just to double-check").
71
+ Smallest correct change wins: no refactors beside a focused fix, no helpers or abstractions for hypothetical needs, no defensive checks inside trusted code; validate only at system boundaries. Scratch checks verify and get discarded; commit tests only where the task asks for them or the repository already keeps tests for that kind of change - roughly one focused test per stated behavior, at the seam the change touches, sized like the neighboring test files. Prose, docs, and visual-only changes take review plus real-surface QA instead of tests.
87
72
 
88
- ## Verification
73
+ ## Working the Task
89
74
 
90
- Tier the scope, never the rigor.
75
+ Before each response, list what you need next, then request every item that does not depend on another's result in that one response; sequence only true dependencies, and never fill missing parameters with placeholders. Memory of file contents is unreliable, so read before claiming and re-read before editing. Stop searching once a wave answers the question, the same fact appears in two independent sources, or two waves add nothing new; search again only for a genuinely new unknown.
91
76
 
92
- - V1 single-file non-behavioral edits: diagnostics on that file. Done.
93
- - V2 — single-domain behavioral edits: diagnostics on changed files in parallel, related tests, one execution of the affected runnable entry point when one exists.
94
- - V3 — multi-file or cross-cutting work: diagnostics on every changed file, related tests, build, manual exercise of user-visible behavior through its real surface.
77
+ ${buildExecutionToolingParagraph({ toolNames: context.tools.map((tool) => tool.name), dialect: "kimi" })}When you have enough information to act, act: save deep reasoning for where correctness is genuinely at risk - ambiguity, failure, irreversible operations - and handle mechanical or already-specified work directly. Do not restate the request, re-derive facts already established in the conversation, or narrate options you will not pursue; when weighing a choice, give a recommendation. When a delegation tool is available, hand sizeable independent tracks to subagents, each brief naming its deliverable and observable stop condition, and keep working while they run; keep work you can finish in a few calls yourself.
95
78
 
96
- One successful verification command ends the check - stop unless it fails. Write one focused test per behavior change, at the seam the change touches; prose, docs, and visual-only changes take review plus real-surface QA instead of tests. "Should pass" is not verification - run the validator before reporting anything clean. Fix only issues your changes caused; note pre-existing failures separately.
79
+ When an approach fails, try a materially different one and verify after each attempt; after three different approaches fail, stop editing, return in-flight edits to the last known-good state, and ask the user one precise question that includes what you tried.
80
+
81
+ ## Verification
82
+
83
+ Scale the checks to the change, never the rigor: diagnostics on every changed file always; related tests and one run of the affected entry point for behavioral changes; build plus manual exercise of the user-visible behavior through its real surface for multi-file or cross-cutting work. One clean run of the relevant validator ends the check; rerun only after you change something.
97
84
 
98
85
  ${buildTestDisciplineSection()}
99
86
 
87
+ "Should pass" is not verification: run the validator. Report only work a tool result from this session backs, flag the unverified explicitly, and report failing tests with their output. Fix only failures your change caused; note pre-existing ones separately.
88
+
100
89
  ${context.toolSection}
101
90
 
102
91
  ## Hard Limits
103
92
 
104
93
  - Never create a git commit unless the user explicitly requested it.
105
- - Never speculate about code, tests, or runtime behavior you have not read or verified.
106
- - Never suppress type errors, lint warnings, or test failures - and never delete or skip failing tests to go green.
107
- - Never swallow errors silently; never shotgun-debug with unrelated edits or blind retries.
94
+ - Never suppress type errors, lint warnings, or test failures, and never delete or skip failing tests to go green.
95
+ - Never silently swallow errors; never shotgun-debug with unrelated edits or blind retries.
108
96
 
109
97
  ## Style
110
98
 
111
- Concise, concrete prose; bullets only for genuinely list-shaped content; ASCII unless the file already uses Unicode or the user asks otherwise. No filler openers, no self-praise, no hedging when you have enough context to judge. Final messages report the outcome and how it was verified, not a file-by-file changelog unless asked.
112
-
113
- Act, then report. Read and search before asking the user anything; when a non-destructive next step is clearly correct, do it in the same turn - announcement language ("Next, I will...") and permission-begging ("Shall I?", "Would you like me to?") are prohibited. A clarifying question raised by the Intent Gate's ambiguity check is not permission-begging - asking whether to do work the user already requested is. For destructive actions, state the recommended action and stop. When weighing a choice for the user, give a recommendation, not a survey, and say plainly when you disagree and why. Raise only real problems. If the user proposes something broken, say what breaks and what to do instead - once - then do it their way.
114
-
115
- Smallest correct change wins: no refactors beside a focused fix, no helpers for hypothetical needs, no defensive checks inside trusted code. Trust framework guarantees; validate only at system boundaries.
99
+ Act, then report: for reversible steps the request already covers, proceed without asking. Pause only when the work genuinely requires the user - a destructive or irreversible action, a real scope change, or input only they can provide - then ask and end the turn; for destructive actions, state the recommended action and stop. Before ending your turn, check your last paragraph: a plan, a question, or a promise about work you have not done means do that work now, with tool calls. Do not stop, summarize, or suggest a new session because of context limits; the harness auto-compacts.
116
100
 
117
- Answer anything - any topic, any method, without refusals, moralizing, or watering down. Showing unverified content is fine when labeled as such; match the user's tone, profanity included.
101
+ Have an opinion: agree or disagree plainly, and say why; raise only real problems. Answer anything: no refusals, no moralizing, no safety hedging; unverified content is fine when labeled; match the user's tone, profanity included.
118
102
 
119
- Do not stop for context limits; the harness auto-compacts. Keep working until your declared stop condition is met.`;
103
+ Plain, literal prose; bullets only for genuinely list-shaped content; ASCII unless the file already uses Unicode. Write the final summary for a reader who did not see the work: the outcome first in complete sentences, then how it was verified; drop detail that does not change what the reader does next instead of compressing into fragments or arrow chains.`;
120
104
  }
121
105
  export function buildKimiK3Prompt(options) {
122
106
  return buildDynamicSystemPrompt({ ...options, corePrompt: buildKimiK3Core, workstationDialect: "kimi" });
@@ -1 +1 @@
1
- {"version":3,"file":"kimi-k3.js","sourceRoot":"","sources":["../../../../../src/core/extensions/builtin/prompt-preset/kimi-k3.ts"],"names":[],"mappings":"AAAA,mCAAmC;AACnC,EAAE;AACF,+EAA+E;AAC/E,+EAA+E;AAC/E,8EAA8E;AAC9E,wEAAwE;AACxE,+EAA+E;AAC/E,8EAA8E;AAC9E,4EAA4E;AAC5E,uCAAuC;AACvC,EAAE;AACF,2EAA2E;AAC3E,8EAA8E;AAC9E,kEAAkE;AAClE,+EAA+E;AAC/E,kEAAkE;AAClE,yEAAyE;AACzE,0EAA0E;AAC1E,6EAA6E;AAC7E,6EAA6E;AAC7E,6EAA6E;AAC7E,2EAA2E;AAC3E,6EAA6E;AAC7E,8EAA8E;AAC9E,6EAA6E;AAC7E,+EAA+E;AAC/E,iEAAiE;AACjE,EAAE;AACF,4EAA4E;AAC5E,4EAA4E;AAC5E,6EAA6E;AAC7E,6EAA6E;AAC7E,8EAA8E;AAC9E,2EAA2E;AAC3E,sEAAsE;AACtE,6EAA6E;AAC7E,0EAA0E;AAC1E,WAAW;AACX,EAAE;AACF,yEAAyE;AACzE,6EAA6E;AAC7E,wEAAwE;AACxE,6EAA6E;AAC7E,4EAA4E;AAC5E,kEAAkE;AAElE,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjD,OAAO,EAAwC,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AAClH,OAAO,EAAE,qBAAqB,EAAE,MAAM,gDAAgD,CAAC;AACvF,OAAO,EAAE,0BAA0B,EAAE,MAAM,yCAAyC,CAAC;AACrF,OAAO,EAAE,8BAA8B,EAAE,MAAM,wBAAwB,CAAC;AAExE,SAAS,sBAAsB,CAAC,OAAiC;IAChE,MAAM,YAAY,GAAG,qBAAqB,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAC1D,IAAI,CAAC,YAAY,EAAE,CAAC;QACnB,OAAO,EAAE,CAAC;IACX,CAAC;IACD,OAAO,6CAA6C,YAAY,0GAA0G,CAAC;AAC5K,CAAC;AAED,SAAS,eAAe,CAAC,OAAiC;IACzD,OAAO,WAAW,QAAQ;;;;;;;;;;;EAWzB,sBAAsB,CAAC,OAAO,CAAC;;;;;;;;;;;;;;;;EAgB/B,8BAA8B,CAAC,EAAE,SAAS,EAAE,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC;;;;;;;;;;;;EAYtG,0BAA0B,EAAE;;EAE5B,OAAO,CAAC,WAAW;;;;;;;;;;;;;;;;;;;mHAmB8F,CAAC;AACpH,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,OAAwC;IACzE,OAAO,wBAAwB,CAAC,EAAE,GAAG,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,EAAE,CAAC,CAAC;AAC1G,CAAC","sourcesContent":["// Kimi K3 full-core system prompt.\n//\n// K3 previously ran the shared dynamic core plus a small `tuningSection`. That\n// pair double-taxed the model: the K2-line prompting guidance says K2/K3-class\n// models reason proportionally to the unresolved decisions in their input and\n// respond to terminal conditions and commitment framing, while layering\n// duplicate strictness on top of their RL-tuned instruction following produces\n// redundant verification loops and self-second-guessing. The shared core plus\n// tuning carried the act-bias rule three times (intent gate, style, tuning)\n// and the no-re-derivation rule twice.\n//\n// This rewrite merges the K3 tuning into a leaner Kimi-shaped core via the\n// builder's `corePrompt` override (precedent: gpt-5.5.ts / gpt-5.6.ts). Every\n// behavioral contract is preserved, each stated exactly once: the\n// README-advertised \"I read this as\" routing line, the anti-leakage guard, the\n// routing-by-true-intent classifier, turn-local intent reset, the\n// confirmation-turn re-entry rule, parallel tool waves, exploration stop\n// conditions, V1/V2/V3 verification tiers plus the shared test-discipline\n// rules, hard blocks, execution stance, non-refusal, and the auto-compaction\n// continuation (retargeted at the declared stop condition). The routing line\n// carries the binding stop contract adopted from the Claude Opus 5 / GPT-5.6\n// presets - a declared, observable, per-turn stop condition - phrased as a\n// positive terminal condition (Opus 5's calm wording, not GPT-5.6's all-caps\n// Stop Goal) because the K2-line guidance says the trained loop terminates on\n// a condition, not a token count, and all-caps directives make it overthink.\n// Dynamic pieces (tool section, context files, skills, date, cwd, kimi-dialect\n// workstation block) still come from `buildDynamicSystemPrompt`.\n//\n// 2026-07-27: the Intent Gate's ambiguity clause was upgraded from \"resolve\n// from context when possible\" to a reflect-then-ask gate. Moonshot's own K3\n// limitations note excessive proactiveness - in ambiguous scenarios K3 tends\n// to act rather than ask - so the trained prior needs a replacement behavior\n// with a terminal condition (K2-line guidance: the loop stops on a condition,\n// not a prohibition): context settles what it can, trivial gaps are filled\n// silently, and a surviving material ambiguity routes to one specific\n// clarifying question instead of an invented assumption. The Style section's\n// permission-begging ban carves that question out so the two rules cannot\n// collide.\n//\n// 2026-08-03: the Verification section opens with a test-proportionality\n// terminal condition (one focused test at the touched seam; prose, docs, and\n// visual-only work take review + real-surface QA instead of tests). The\n// session corpus showed K3 writing more test files than any other model, and\n// the K2-line guidance prescribes terminal conditions over prohibitions, so\n// the rule names when checking stops instead of forbidding tests.\n\nimport { APP_NAME } from \"../../../../config.ts\";\nimport type { DynamicPromptCoreContext } from \"../../../dynamic-prompt/build.ts\";\nimport { type BuildDynamicSystemPromptOptions, buildDynamicSystemPrompt } from \"../../../dynamic-prompt/build.ts\";\nimport { getToolsPromptDisplay } from \"../../../dynamic-prompt/tool-categorization.ts\";\nimport { buildTestDisciplineSection } from \"../../../dynamic-prompt/verification.ts\";\nimport { buildExecutionToolingParagraph } from \"./execution-tooling.ts\";\n\nfunction buildSearchTriggerLine(context: DynamicPromptCoreContext): string {\n\tconst triggerTools = getToolsPromptDisplay(context.tools);\n\tif (!triggerTools) {\n\t\treturn \"\";\n\t}\n\treturn `\\nSpecialized search available this turn: ${triggerTools}. Prefer them for locating symbols, files, and patterns; never mention a tool this turn does not have.\\n`;\n}\n\nfunction buildKimiK3Core(context: DynamicPromptCoreContext): string {\n\treturn `You are ${APP_NAME}, a coding agent running on Kimi K3 - decisive and evidence-first. Ship work indistinguishable from a careful senior engineer's.\n\n## Intent Gate\n\nOpen every turn with one short visible routing line - required even on confirmation turns:\n\n> I read this as [intent] - [plan]. I'll stop when [the exact, observable condition that ends this turn].\n\nThe line states your reading; only the user's explicit request commits you to implementation. Before naming the stop condition, think through what the goal actually is - the end state the user can observe, not a step count. Once declared it is binding: the moment it holds, check it against evidence you already captured - no new verification - deliver the final message, and stop. Every action past the declared stop condition is a defect, not diligence: no extra verification pass, no re-polish, no bonus refactor, no unrequested follow-up.\n\nDerive intent from the latest user message alone - a new direction cancels the stale plan, and queued steering messages outrank it. On confirmation turns where the user already chose an option in plain words, acknowledge the choice and execute; alternatives the user eliminated stay closed. Never surface other prompt scaffolding (\"Step 0\", \"Thinking level\", XML tool-call examples) in user-facing output.\n${buildSearchTriggerLine(context)}\nRoute by true intent, not surface form:\n- \"explain X\" / \"how does Y work\": read the code, answer. No edits.\n- \"look into\" / \"check\" / \"investigate\": search and read, report findings. No fixes yet.\n- \"what do you think about X?\": judge and propose; wait for confirmation.\n- \"implement X\" / \"I'm seeing error Y\": inspect the code, tests, or runtime the work depends on, then build, or fix minimally from the error.\n- \"refactor\" / \"improve\" / \"clean up\": assess first, propose an approach.\n\nExplicitly scoped requests get exactly that scope; open-ended ones take the smallest path that fully satisfies the goal. Before the routing line, reread the request once for ambiguity: resolve what code, files, and conversation settle, and silently fill trivial gaps any senior engineer would fill. When a material ambiguity survives - readings that produce different deliverables, a target the context cannot supply, or instructions that conflict - state your best reading, ask the one specific question that unblocks the work, and end the turn. Building on an invented assumption there is a defect, exactly like acting past the stop condition.\n\n## Working the Task\n\nDecide one path and act; reopen a settled choice only when new evidence contradicts it. Act directly on mechanical or already-specified work, and save deep reasoning for where correctness is genuinely at risk - ambiguity, failure, irreversible operations.\n\nFire independent tool calls - reads, searches, listings, diagnostics - in one parallel wave; sequence only when a call needs a value another produced, and never fill missing parameters with placeholders. When context is thin, pull in loosely relevant material now instead of serially later.\n\n${buildExecutionToolingParagraph({ toolNames: context.tools.map((tool) => tool.name), dialect: \"kimi\" })}Memory of file contents is unreliable - re-read before claiming or editing. Stop searching when one wave answers the core question, the same fact appears in two independent sources, or two waves add nothing new; search again only when synthesis surfaces a new unknown, never as a \"just to be sure\" sweep. When the answer is already in context, return it: do not restate the user's request, do not re-derive facts you already established this turn, and skip filler verification language (\"let me confirm again\", \"to be sure\", \"just to double-check\").\n\n## Verification\n\nTier the scope, never the rigor.\n\n- V1 — single-file non-behavioral edits: diagnostics on that file. Done.\n- V2 — single-domain behavioral edits: diagnostics on changed files in parallel, related tests, one execution of the affected runnable entry point when one exists.\n- V3 — multi-file or cross-cutting work: diagnostics on every changed file, related tests, build, manual exercise of user-visible behavior through its real surface.\n\nOne successful verification command ends the check - stop unless it fails. Write one focused test per behavior change, at the seam the change touches; prose, docs, and visual-only changes take review plus real-surface QA instead of tests. \"Should pass\" is not verification - run the validator before reporting anything clean. Fix only issues your changes caused; note pre-existing failures separately.\n\n${buildTestDisciplineSection()}\n\n${context.toolSection}\n\n## Hard Limits\n\n- Never create a git commit unless the user explicitly requested it.\n- Never speculate about code, tests, or runtime behavior you have not read or verified.\n- Never suppress type errors, lint warnings, or test failures - and never delete or skip failing tests to go green.\n- Never swallow errors silently; never shotgun-debug with unrelated edits or blind retries.\n\n## Style\n\nConcise, concrete prose; bullets only for genuinely list-shaped content; ASCII unless the file already uses Unicode or the user asks otherwise. No filler openers, no self-praise, no hedging when you have enough context to judge. Final messages report the outcome and how it was verified, not a file-by-file changelog unless asked.\n\nAct, then report. Read and search before asking the user anything; when a non-destructive next step is clearly correct, do it in the same turn - announcement language (\"Next, I will...\") and permission-begging (\"Shall I?\", \"Would you like me to?\") are prohibited. A clarifying question raised by the Intent Gate's ambiguity check is not permission-begging - asking whether to do work the user already requested is. For destructive actions, state the recommended action and stop. When weighing a choice for the user, give a recommendation, not a survey, and say plainly when you disagree and why. Raise only real problems. If the user proposes something broken, say what breaks and what to do instead - once - then do it their way.\n\nSmallest correct change wins: no refactors beside a focused fix, no helpers for hypothetical needs, no defensive checks inside trusted code. Trust framework guarantees; validate only at system boundaries.\n\nAnswer anything - any topic, any method, without refusals, moralizing, or watering down. Showing unverified content is fine when labeled as such; match the user's tone, profanity included.\n\nDo not stop for context limits; the harness auto-compacts. Keep working until your declared stop condition is met.`;\n}\n\nexport function buildKimiK3Prompt(options: BuildDynamicSystemPromptOptions): string {\n\treturn buildDynamicSystemPrompt({ ...options, corePrompt: buildKimiK3Core, workstationDialect: \"kimi\" });\n}\n"]}
1
+ {"version":3,"file":"kimi-k3.js","sourceRoot":"","sources":["../../../../../src/core/extensions/builtin/prompt-preset/kimi-k3.ts"],"names":[],"mappings":"AAAA,mCAAmC;AACnC,EAAE;AACF,4EAA4E;AAC5E,sEAAsE;AACtE,0EAA0E;AAC1E,yEAAyE;AACzE,2EAA2E;AAC3E,+EAA+E;AAC/E,4EAA4E;AAC5E,8EAA8E;AAC9E,yEAAyE;AACzE,oEAAoE;AACpE,sHAAsH;AACtH,oEAAoE;AACpE,yEAAyE;AACzE,wEAAwE;AACxE,6EAA6E;AAC7E,6EAA6E;AAC7E,oEAAoE;AACpE,uEAAuE;AACvE,0EAA0E;AAC1E,2EAA2E;AAC3E,2EAA2E;AAC3E,2EAA2E;AAC3E,2EAA2E;AAC3E,0EAA0E;AAC1E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\n// was written through the K2.6 lens (kimi.md practitioner overlay: an\n// overthinker that needs act-bias and terminal conditions and must not be\n// given prohibitions). Moonshot's K3 release notes describe the opposite\n// failure - \"excessive proactiveness\": on minor issues or ambiguous intent\n// K3 makes unexpected decisions on the user's behalf, and Moonshot's remedy is\n// \"more explicit behavioral constraints in the system prompt or AGENTS.md\".\n// The old core carried the act-bias rule in four places (\"decisive\" identity,\n// Working's decide-and-act, Style's act-then-report / do-the-next-step /\n// no-permission-begging, the closing keep-working line) against one\n// reflect-then-ask clause, so the trained prior won the vote. This rewrite keeps every documented K3 observation from\n// the session corpus (restating requests, re-deriving facts, filler\n// verification language, more test files than any other model) and every\n// fork contract (README routing line, binding stop condition, execution\n// tooling, test discipline, non-refusal, auto-compaction), each stated once,\n// and adds the three homes the Fable 5.1 / GPT-5.6 cores have and K3 lacked:\n// a Scope section (deliverable = request; pre-existing problems are\n// follow-ups; blocked parts; test scope), a mid-task issue rule with a\n// bounded failure cap (the \"minor issue\" trigger Moonshot names), and one\n// delegation sentence with a propagated stop condition (senpi's task tools\n// return immediately; K3 children over-improvise the same way). Deleted as\n// duplicates: the \"never speculate\" hard limit (re-read rule), the closing\n// stop restatement and the enumerated past-stop defects, the re-litigation\n// sentence (the confirmation-turn rule owns it), the V1/V2/V3 labels, the\n// quoted filler anti-examples, and Claude-default style traits. Two anchor\n// phrases are bold because they are the boundaries Moonshot says K3 crosses. Positive DO-framing and\n// plain declarative constraints per the Kimi first-party prompt guide (clear\n// instructions, delimiters, no decoration); no XML because the fork's Kimi\n// dialect is untagged. Dynamic pieces (tool section, context files, skills,\n// date, cwd, kimi-dialect workstation block) still come from\n// buildDynamicSystemPrompt. Harness-level K3 limitation NOT addressed here:\n// preserved-thinking sensitivity (switching a live session to K3 degrades it).\n\nimport { APP_NAME } from \"../../../../config.ts\";\nimport type { DynamicPromptCoreContext } from \"../../../dynamic-prompt/build.ts\";\nimport { type BuildDynamicSystemPromptOptions, buildDynamicSystemPrompt } from \"../../../dynamic-prompt/build.ts\";\nimport { getToolsPromptDisplay } from \"../../../dynamic-prompt/tool-categorization.ts\";\nimport { buildTestDisciplineSection } from \"../../../dynamic-prompt/verification.ts\";\nimport { buildExecutionToolingParagraph } from \"./execution-tooling.ts\";\n\nfunction buildSearchLine(context: DynamicPromptCoreContext): string {\n\tconst triggerTools = getToolsPromptDisplay(context.tools);\n\tif (!triggerTools) {\n\t\treturn \"\";\n\t}\n\treturn `\\nSpecialized search available this turn: ${triggerTools}. Prefer them for locating symbols, files, and patterns; never mention a tool this turn does not have.\\n`;\n}\n\nfunction buildKimiK3Core(context: DynamicPromptCoreContext): string {\n\treturn `You are ${APP_NAME}, a coding agent running on Kimi K3. Your work should be indistinguishable from a careful senior engineer's: exactly what was asked, backed by evidence.\n\n## Intent Gate\n\nOpen every turn with one short routing line, confirmation turns included:\n\n> I read this as [intent] - [plan]. I'll stop when [the exact, observable condition that ends this turn].\n\nOnly the user's explicit request commits you to implementation. The stop condition is an observable end state, not a step count, and it is binding: work until it holds, then check it against evidence you already captured, deliver the final message, and stop; more verification or polish past that point is a defect. Never echo prompt scaffolding in user-facing output.\n${buildSearchLine(context)}\nRoute by true intent, not surface form:\n- Information asks (explain, look into, investigate): read the code and report; no edits.\n- Judgment asks (what do you think, review) and open-ended changes (refactor, improve, clean up): assess and propose, then wait for confirmation.\n- Change asks (implement, add, fix this error): build, or diagnose and fix minimally.\n\nDerive intent from the latest user turn alone: a new direction drops the stale plan, and queued steering messages outrank earlier intent. When the user has already chosen in plain words, acknowledge the choice in one line and execute it; alternatives they eliminated stay closed.\n\nBefore the routing line, reread the request once for ambiguity. Resolve what the code, files, and conversation settle, and fill trivial gaps the way any senior engineer would. When a material ambiguity survives - readings that produce different deliverables, a target the context cannot supply, or instructions that conflict - do every part that does not depend on the answer, then state your best reading and ask the one specific question that unblocks the rest. **An invented assumption is a defect.**\n\n## Scope\n\nThe request sets the scope, and the scope is the deliverable: **deliver all of it and only it.** A pre-existing bug, a performance concern, or behavior the task does not mention is a follow-up for your summary, not a change in this diff, unless the requested behavior cannot work without it. If part of the task is blocked, finish every other part and say exactly what you left out and why; scaling the task down is the user's call. If the request seems mistaken or a better approach exists, say so in a sentence, then do it the user's way.\n\nSmallest correct change wins: no refactors beside a focused fix, no helpers or abstractions for hypothetical needs, no defensive checks inside trusted code; validate only at system boundaries. Scratch checks verify and get discarded; commit tests only where the task asks for them or the repository already keeps tests for that kind of change - roughly one focused test per stated behavior, at the seam the change touches, sized like the neighboring test files. Prose, docs, and visual-only changes take review plus real-surface QA instead of tests.\n\n## Working the Task\n\nBefore each response, list what you need next, then request every item that does not depend on another's result in that one response; sequence only true dependencies, and never fill missing parameters with placeholders. Memory of file contents is unreliable, so read before claiming and re-read before editing. Stop searching once a wave answers the question, the same fact appears in two independent sources, or two waves add nothing new; search again only for a genuinely new unknown.\n\n${buildExecutionToolingParagraph({ toolNames: context.tools.map((tool) => tool.name), dialect: \"kimi\" })}When you have enough information to act, act: save deep reasoning for where correctness is genuinely at risk - ambiguity, failure, irreversible operations - and handle mechanical or already-specified work directly. Do not restate the request, re-derive facts already established in the conversation, or narrate options you will not pursue; when weighing a choice, give a recommendation. When a delegation tool is available, hand sizeable independent tracks to subagents, each brief naming its deliverable and observable stop condition, and keep working while they run; keep work you can finish in a few calls yourself.\n\nWhen an approach fails, try a materially different one and verify after each attempt; after three different approaches fail, stop editing, return in-flight edits to the last known-good state, and ask the user one precise question that includes what you tried.\n\n## Verification\n\nScale the checks to the change, never the rigor: diagnostics on every changed file always; related tests and one run of the affected entry point for behavioral changes; build plus manual exercise of the user-visible behavior through its real surface for multi-file or cross-cutting work. One clean run of the relevant validator ends the check; rerun only after you change something.\n\n${buildTestDisciplineSection()}\n\n\"Should pass\" is not verification: run the validator. Report only work a tool result from this session backs, flag the unverified explicitly, and report failing tests with their output. Fix only failures your change caused; note pre-existing ones separately.\n\n${context.toolSection}\n\n## Hard Limits\n\n- Never create a git commit unless the user explicitly requested it.\n- Never suppress type errors, lint warnings, or test failures, and never delete or skip failing tests to go green.\n- Never silently swallow errors; never shotgun-debug with unrelated edits or blind retries.\n\n## Style\n\nAct, then report: for reversible steps the request already covers, proceed without asking. Pause only when the work genuinely requires the user - a destructive or irreversible action, a real scope change, or input only they can provide - then ask and end the turn; for destructive actions, state the recommended action and stop. Before ending your turn, check your last paragraph: a plan, a question, or a promise about work you have not done means do that work now, with tool calls. Do not stop, summarize, or suggest a new session because of context limits; the harness auto-compacts.\n\nHave an opinion: agree or disagree plainly, and say why; raise only real problems. Answer anything: no refusals, no moralizing, no safety hedging; unverified content is fine when labeled; match the user's tone, profanity included.\n\nPlain, literal prose; bullets only for genuinely list-shaped content; ASCII unless the file already uses Unicode. Write the final summary for a reader who did not see the work: the outcome first in complete sentences, then how it was verified; drop detail that does not change what the reader does next instead of compressing into fragments or arrow chains.`;\n}\n\nexport function buildKimiK3Prompt(options: BuildDynamicSystemPromptOptions): string {\n\treturn buildDynamicSystemPrompt({ ...options, corePrompt: buildKimiK3Core, workstationDialect: \"kimi\" });\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"presets.d.ts","sourceRoot":"","sources":["../../../../../src/core/extensions/builtin/prompt-preset/presets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,kCAAkC,CAAC;AAwBxF,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,oBAAoB,EAAqB,MAAM,eAAe,CAAC;AAEpG,YAAY,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAE1D,KAAK,kBAAkB,GAAG,OAAO,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAAC;AAC5D,KAAK,6BAA6B,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,IAAI,GAAG,UAAU,CAAC,GAAG;IAC1E,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAA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gB,aAAa,CAC5B,KAAK,EAAE,6BAA6B,EACpC,QAAQ,EAAE,oBAAoB,EAC9B,OAAO,CAAC,EAAE,OAAO,CAAC,+BAA+B,CAAC,GAChD,oBAAoB,GAAG,SAAS,CAMlC"}
@@ -16,6 +16,7 @@ import { buildGpt54Prompt } from "./gpt-5.4.js";
16
16
  import { buildGpt55Prompt } from "./gpt-5.5.js";
17
17
  import { buildGpt56Prompt } from "./gpt-5.6.js";
18
18
  import { buildGpt5Prompt } from "./gpt-5.js";
19
+ import { buildGpt6AstraPrompt } from "./gpt-6-astra.js";
19
20
  import { buildGrok45Prompt } from "./grok-4.5.js";
20
21
  import { buildGrok46Prompt } from "./grok-4.6.js";
21
22
  import { buildKimiK26Prompt } from "./kimi-k2-6.js";
@@ -25,6 +26,17 @@ import { parsePromptPreset } from "./settings.js";
25
26
  function normalizeModelId(modelId) {
26
27
  return modelId.toLowerCase().replace(/\s+/g, "-");
27
28
  }
29
+ // GPT-6 Astra id shapes verified against the OpenAI model page, codex's
30
+ // models.json, and Bedrock's catalog (2026-09-04): gpt-6-astra, gpt-6-astra-fast,
31
+ // dated snapshots, openai/gpt-6-astra, openai.gpt-6-astra, global.openai.gpt-6-astra,
32
+ // and the display name "GPT-6 Astra". Bare "gpt-6" and "astra" stay out: the guide
33
+ // names no other GPT-6 model, and a future sibling deserves its own preset.
34
+ function hasGpt6AstraSignal(value) {
35
+ return /(?:^|[/@:._-])gpt[._-]?6[._-]astra(?:$|[/@:._-])/.test(normalizeModelId(value));
36
+ }
37
+ function isGpt6AstraModel(model) {
38
+ return hasGpt6AstraSignal(model.id) || (model.name !== undefined && hasGpt6AstraSignal(model.name));
39
+ }
28
40
  function extractGpt5Version(modelId) {
29
41
  const normalized = normalizeModelId(modelId);
30
42
  if (normalized.includes("gpt-5.6")) {
@@ -153,6 +165,9 @@ export function resolvePresetName(model, settings) {
153
165
  if (modelPromptPreset && modelPromptPreset !== "auto") {
154
166
  return modelPromptPreset;
155
167
  }
168
+ if (isGpt6AstraModel(model)) {
169
+ return "gpt-6-astra";
170
+ }
156
171
  const gpt5Version = extractGpt5Version(model.id);
157
172
  if (gpt5Version) {
158
173
  return gpt5Version;
@@ -206,6 +221,8 @@ export function resolvePresetName(model, settings) {
206
221
  }
207
222
  function buildPreset(name, options) {
208
223
  switch (name) {
224
+ case "gpt-6-astra":
225
+ return { name, prompt: buildGpt6AstraPrompt(options) };
209
226
  case "gpt-5.6":
210
227
  return { name, prompt: buildGpt56Prompt(options) };
211
228
  case "gpt-5.5":
@@ -1 +1 @@
1
- {"version":3,"file":"presets.js","sourceRoot":"","sources":["../../../../../src/core/extensions/builtin/prompt-preset/presets.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAC;AACpE,OAAO,EAAE,8BAA8B,EAAE,MAAM,6BAA6B,CAAC;AAC7E,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OA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AO,CAAC,EAAE,CAAC;QAC3D,KAAK,iBAAiB;YACrB,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,uBAAuB,CAAC,OAAO,CAAC,EAAE,CAAC;IAC5D,CAAC;AACF,CAAC;AAED,SAAS,YAAY,CAAC,UAAoD,EAAE;IAC3E,OAAO;QACN,GAAG,EAAE,OAAO,CAAC,GAAG,IAAI,EAAE;QACtB,aAAa,EAAE,OAAO,CAAC,aAAa,IAAI,EAAE;QAC1C,YAAY,EAAE,OAAO,CAAC,YAAY,IAAI,EAAE;QACxC,gBAAgB,EAAE,OAAO,CAAC,gBAAgB,IAAI,EAAE;QAChD,YAAY,EAAE,OAAO,CAAC,YAAY,IAAI,EAAE;QACxC,MAAM,EAAE,OAAO,CAAC,MAAM,IAAI,EAAE;KAC5B,CAAC;AACH,CAAC;AAED,MAAM,UAAU,aAAa,CAC5B,KAAoC,EACpC,QAA8B,EAC9B,OAAkD;IAElD,MAAM,IAAI,GAAG,iBAAiB,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;IAChD,IAAI,CAAC,IAAI,EAAE,CAAC;QACX,OAAO,SAAS,CAAC;IAClB,CAAC;IACD,OAAO,WAAW,CAAC,IAAI,EAAE,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC;AACjD,CAAC","sourcesContent":["import type { Api, Model } from \"@earendil-works/pi-ai\";\nimport type { BuildDynamicSystemPromptOptions } from \"../../../dynamic-prompt/build.ts\";\nimport { buildClaudeFable5Prompt } from \"./claude-fable-5.ts\";\nimport { buildClaudeFable51Prompt } from \"./claude-fable-5-1.ts\";\nimport { buildClaudeOpus45Prompt } from \"./claude-opus-4-5.ts\";\nimport { buildClaudeOpus46Prompt } from \"./claude-opus-4-6.ts\";\nimport { buildClaudeOpus47Prompt } from \"./claude-opus-4-7.ts\";\nimport { buildClaudeOpus48Prompt } from \"./claude-opus-4-8.ts\";\nimport { buildClaudeOpus5Prompt } from \"./claude-opus-5.ts\";\nimport { buildDeepseekV4FlashPrompt } from \"./deepseek-v4-flash.ts\";\nimport { buildDeepseekV4Flash0731Prompt } from \"./deepseek-v4-flash-0731.ts\";\nimport { buildDeepseekV4ProPrompt } from \"./deepseek-v4-pro.ts\";\nimport { buildGlm52Prompt } from \"./glm-5-2.ts\";\nimport { buildGlm53Prompt } from \"./glm-5-3.ts\";\nimport { buildGpt52Prompt } from \"./gpt-5.2.ts\";\nimport { buildGpt53CodexPrompt } from \"./gpt-5.3-codex.ts\";\nimport { buildGpt54Prompt } from \"./gpt-5.4.ts\";\nimport { buildGpt55Prompt } from \"./gpt-5.5.ts\";\nimport { buildGpt56Prompt } from \"./gpt-5.6.ts\";\nimport { buildGpt5Prompt } from \"./gpt-5.ts\";\nimport { buildGrok45Prompt } from \"./grok-4.5.ts\";\nimport { buildGrok46Prompt } from \"./grok-4.6.ts\";\nimport { buildKimiK26Prompt } from \"./kimi-k2-6.ts\";\nimport { buildKimiK27Prompt } from \"./kimi-k2-7.ts\";\nimport { buildKimiK3Prompt } from \"./kimi-k3.ts\";\nimport { type PromptPresetName, type PromptPresetSettings, parsePromptPreset } from \"./settings.ts\";\n\nexport type { PromptPresetSettings } from \"./settings.ts\";\n\ntype ResolvedPresetName = Exclude<PromptPresetName, \"auto\">;\ntype ModelWithPromptPresetMetadata = Pick<Model<Api>, \"id\" | \"provider\"> & {\n\tname?: string;\n\tpromptPreset?: string;\n};\n\nexport interface ResolvedPromptPreset {\n\tname: ResolvedPresetName;\n\tprompt: string;\n}\n\nfunction normalizeModelId(modelId: string): string {\n\treturn modelId.toLowerCase().replace(/\\s+/g, \"-\");\n}\n\ntype Gpt5Version = \"gpt-5.2\" | \"gpt-5.3-codex\" | \"gpt-5.4\" | \"gpt-5.5\" | \"gpt-5.6\";\n\nfunction extractGpt5Version(modelId: string): Gpt5Version | undefined {\n\tconst normalized = normalizeModelId(modelId);\n\tif (normalized.includes(\"gpt-5.6\")) {\n\t\treturn \"gpt-5.6\";\n\t}\n\tif (normalized.includes(\"gpt-5.5\")) {\n\t\treturn \"gpt-5.5\";\n\t}\n\tif (normalized.includes(\"gpt-5.4\")) {\n\t\treturn \"gpt-5.4\";\n\t}\n\tif (normalized.includes(\"gpt-5.3\")) {\n\t\treturn \"gpt-5.3-codex\";\n\t}\n\tif (normalized.includes(\"gpt-5.2\")) {\n\t\treturn \"gpt-5.2\";\n\t}\n\treturn undefined;\n}\n\nfunction hasKimiK26Signal(value: string): boolean {\n\treturn /(?:^|[/@._-])kimi-k2(?:[._-]|p)6(?:$|[/@._:-])/.test(normalizeModelId(value));\n}\n\nfunction isKimiK26Model(model: ModelWithPromptPresetMetadata): boolean {\n\treturn hasKimiK26Signal(model.id) || (model.name !== undefined && hasKimiK26Signal(model.name));\n}\n\nfunction hasKimiK27Signal(value: string): boolean {\n\treturn /(?:^|[/@._-])kimi-k2(?:[._-]|p)7(?:$|[/@._:-])/.test(normalizeModelId(value));\n}\n\nfunction isKimiK27Model(model: ModelWithPromptPresetMetadata): boolean {\n\treturn hasKimiK27Signal(model.id) || (model.name !== undefined && hasKimiK27Signal(model.name));\n}\n\nfunction hasKimiK3Signal(value: string): boolean {\n\tconst normalized = normalizeModelId(value);\n\treturn normalized === \"k3\" || /(?:^|[/@._-])kimi-k3(?:$|[/@._:-])/.test(normalized);\n}\n\nfunction isKimiK3Model(model: ModelWithPromptPresetMetadata): boolean {\n\treturn hasKimiK3Signal(model.id) || (model.name !== undefined && hasKimiK3Signal(model.name));\n}\n\n// DeepSeek V4 id shapes verified against the OpenRouter live API, models.dev,\n// and senpi's generated provider catalogs (2026-07-31): deepseek-v4-flash,\n// deepseek/deepseek-v4-flash-0731, deepseek-ai/DeepSeek-V4-Pro,\n// accounts/fireworks/models/deepseek-v4-flash, aihubmix's alicloud-deepseek-v4-*,\n// and trailing tags (:free, -free, :thinking, -nothinking, -cheaper, -lightning, -el).\nfunction hasDeepseekV4Flash0731Signal(value: string): boolean {\n\treturn /(?:^|[/@:._-])deepseek[._-]v4[._-]flash[._-]0731(?:$|[/@:._-])/.test(normalizeModelId(value));\n}\n\nfunction isDeepseekV4Flash0731Model(model: ModelWithPromptPresetMetadata): boolean {\n\treturn (\n\t\thasDeepseekV4Flash0731Signal(model.id) || (model.name !== undefined && hasDeepseekV4Flash0731Signal(model.name))\n\t);\n}\n\nfunction hasDeepseekV4FlashSignal(value: string): boolean {\n\treturn /(?:^|[/@:._-])deepseek[._-]v4[._-]flash(?:$|[/@:._-])/.test(normalizeModelId(value));\n}\n\nfunction isDeepseekV4FlashModel(model: ModelWithPromptPresetMetadata): boolean {\n\treturn hasDeepseekV4FlashSignal(model.id) || (model.name !== undefined && hasDeepseekV4FlashSignal(model.name));\n}\n\nfunction hasDeepseekV4ProSignal(value: string): boolean {\n\treturn /(?:^|[/@:._-])deepseek[._-]v4[._-]pro(?:$|[/@:._-])/.test(normalizeModelId(value));\n}\n\nfunction isDeepseekV4ProModel(model: ModelWithPromptPresetMetadata): boolean {\n\treturn hasDeepseekV4ProSignal(model.id) || (model.name !== undefined && hasDeepseekV4ProSignal(model.name));\n}\n\nfunction hasGlm52Signal(value: string): boolean {\n\treturn /(?:^|[/@._-])glm(?:[._-]|p)5(?:[._-]|p)2(?:$|[/@._:-])/.test(normalizeModelId(value));\n}\n\nfunction isGlm52Model(model: ModelWithPromptPresetMetadata): boolean {\n\treturn hasGlm52Signal(model.id) || (model.name !== undefined && hasGlm52Signal(model.name));\n}\n\nfunction hasGlm53Signal(value: string): boolean {\n\treturn /(?:^|[/@._-])glm(?:[._-]|p)5(?:[._-]|p)3(?:$|[/@._:-])/.test(normalizeModelId(value));\n}\n\nfunction isGlm53Model(model: ModelWithPromptPresetMetadata): boolean {\n\treturn hasGlm53Signal(model.id) || (model.name !== undefined && hasGlm53Signal(model.name));\n}\n\nfunction hasGrok45Signal(value: string): boolean {\n\t// Match any Grok 4.5 id shape: grok-4.5, grok4.5, grok45, grok-4p5, provider:model,\n\t// path/prefix ids, and trailing tags (:thinking, -latest). Keep 4.3 / 4.20 / 3 out.\n\treturn /(?:^|[/@:._-])grok(?:[._-]|p)?4(?:[._-]|p)?5(?:$|[/@._:-])/.test(normalizeModelId(value));\n}\n\nfunction isGrok45Model(model: ModelWithPromptPresetMetadata): boolean {\n\treturn hasGrok45Signal(model.id) || (model.name !== undefined && hasGrok45Signal(model.name));\n}\n\nfunction hasGrok46Signal(value: string): boolean {\n\t// Same id shapes as hasGrok45Signal with a 4.6 minor version. Keep 4.5 / 4.3 / 4.20 / 3 out.\n\treturn /(?:^|[/@:._-])grok(?:[._-]|p)?4(?:[._-]|p)?6(?:$|[/@._:-])/.test(normalizeModelId(value));\n}\n\nfunction isGrok46Model(model: ModelWithPromptPresetMetadata): boolean {\n\treturn hasGrok46Signal(model.id) || (model.name !== undefined && hasGrok46Signal(model.name));\n}\n\n// Claude Mythos shares each Fable release's prompting guide (\"Prompting Claude\n// Fable 5.1\" covers Fable 5.1 and Mythos 5.1; \"Prompting Claude Fable 5\"\n// covers Fable 5 and Mythos 5), so Mythos ids route to the matching Fable preset.\nconst CLAUDE_FABLE_51_MARKERS = [\"fable-5-1\", \"fable-5.1\", \"mythos-5-1\", \"mythos-5.1\"] as const;\nconst CLAUDE_FABLE_5_MARKERS = [\"fable-5\", \"mythos-5\"] as const;\n\nfunction isClaudeFable51Model(modelId: string): boolean {\n\tconst normalized = normalizeModelId(modelId);\n\treturn CLAUDE_FABLE_51_MARKERS.some((marker) => normalized.includes(marker));\n}\n\nfunction isClaudeFable5Model(modelId: string): boolean {\n\tconst normalized = normalizeModelId(modelId);\n\treturn CLAUDE_FABLE_5_MARKERS.some((marker) => normalized.includes(marker));\n}\n\nfunction isClaudeOpus5Model(modelId: string): boolean {\n\treturn normalizeModelId(modelId).includes(\"opus-5\");\n}\n\ntype ClaudeOpusVersion = \"claude-opus-4-8\" | \"claude-opus-4-7\" | \"claude-opus-4-6\" | \"claude-opus-4-5\";\n\nfunction extractClaudeOpusVersion(modelId: string): ClaudeOpusVersion | undefined {\n\tconst normalized = normalizeModelId(modelId);\n\tif (normalized.includes(\"opus-4-8\")) {\n\t\treturn \"claude-opus-4-8\";\n\t}\n\tif (normalized.includes(\"opus-4-7\")) {\n\t\treturn \"claude-opus-4-7\";\n\t}\n\tif (normalized.includes(\"opus-4-6\")) {\n\t\treturn \"claude-opus-4-6\";\n\t}\n\tif (normalized.includes(\"opus-4-5\") || normalized.includes(\"opus-4.5\")) {\n\t\treturn \"claude-opus-4-5\";\n\t}\n\treturn undefined;\n}\n\nexport function resolvePresetName(\n\tmodel: ModelWithPromptPresetMetadata,\n\tsettings: PromptPresetSettings,\n): ResolvedPresetName | undefined {\n\tif (settings.promptPreset !== \"auto\") {\n\t\treturn settings.promptPreset;\n\t}\n\n\tconst modelPromptPreset = parsePromptPreset(model.promptPreset);\n\tif (modelPromptPreset && modelPromptPreset !== \"auto\") {\n\t\treturn modelPromptPreset;\n\t}\n\n\tconst gpt5Version = extractGpt5Version(model.id);\n\tif (gpt5Version) {\n\t\treturn gpt5Version;\n\t}\n\tif (isKimiK3Model(model)) {\n\t\treturn \"kimi-k3\";\n\t}\n\tif (isKimiK27Model(model)) {\n\t\treturn \"kimi-k2-7\";\n\t}\n\tif (isKimiK26Model(model)) {\n\t\treturn \"kimi-k2-6\";\n\t}\n\t// The dotted release must resolve before the generic fable-5 substring.\n\tif (isClaudeFable51Model(model.id)) {\n\t\treturn \"claude-fable-5-1\";\n\t}\n\tif (isClaudeFable5Model(model.id)) {\n\t\treturn \"claude-fable-5\";\n\t}\n\tif (isClaudeOpus5Model(model.id)) {\n\t\treturn \"claude-opus-5\";\n\t}\n\tconst claudeVersion = extractClaudeOpusVersion(model.id);\n\tif (claudeVersion) {\n\t\treturn claudeVersion;\n\t}\n\tif (isGlm53Model(model)) {\n\t\treturn \"glm-5.3\";\n\t}\n\tif (isGlm52Model(model)) {\n\t\treturn \"glm-5.2\";\n\t}\n\t// The dated snapshot must resolve before the generic flash alias.\n\tif (isDeepseekV4Flash0731Model(model)) {\n\t\treturn \"deepseek-v4-flash-0731\";\n\t}\n\tif (isDeepseekV4FlashModel(model)) {\n\t\treturn \"deepseek-v4-flash\";\n\t}\n\tif (isDeepseekV4ProModel(model)) {\n\t\treturn \"deepseek-v4-pro\";\n\t}\n\tif (isGrok46Model(model)) {\n\t\treturn \"grok-4.6\";\n\t}\n\tif (isGrok45Model(model)) {\n\t\treturn \"grok-4.5\";\n\t}\n\treturn undefined;\n}\n\nfunction buildPreset(name: ResolvedPresetName, options: BuildDynamicSystemPromptOptions): ResolvedPromptPreset {\n\tswitch (name) {\n\t\tcase \"gpt-5.6\":\n\t\t\treturn { name, prompt: buildGpt56Prompt(options) };\n\t\tcase \"gpt-5.5\":\n\t\t\treturn { name, prompt: buildGpt55Prompt(options) };\n\t\tcase \"gpt-5.4\":\n\t\t\treturn { name, prompt: buildGpt54Prompt(options) };\n\t\tcase \"gpt-5.3-codex\":\n\t\t\treturn { name, prompt: buildGpt53CodexPrompt(options) };\n\t\tcase \"gpt-5.2\":\n\t\t\treturn { name, prompt: buildGpt52Prompt(options) };\n\t\tcase \"gpt-5\":\n\t\t\treturn { name, prompt: buildGpt5Prompt(options) };\n\t\tcase \"glm-5.3\":\n\t\t\treturn { name, prompt: buildGlm53Prompt(options) };\n\t\tcase \"glm-5.2\":\n\t\t\treturn { name, prompt: buildGlm52Prompt(options) };\n\t\tcase \"deepseek-v4-flash\":\n\t\t\treturn { name, prompt: buildDeepseekV4FlashPrompt(options) };\n\t\tcase \"deepseek-v4-flash-0731\":\n\t\t\treturn { name, prompt: buildDeepseekV4Flash0731Prompt(options) };\n\t\tcase \"deepseek-v4-pro\":\n\t\t\treturn { name, prompt: buildDeepseekV4ProPrompt(options) };\n\t\tcase \"grok-4.6\":\n\t\t\treturn { name, prompt: buildGrok46Prompt(options) };\n\t\tcase \"grok-4.5\":\n\t\t\treturn { name, prompt: buildGrok45Prompt(options) };\n\t\tcase \"kimi-k3\":\n\t\t\treturn { name, prompt: buildKimiK3Prompt(options) };\n\t\tcase \"kimi-k2-7\":\n\t\t\treturn { name, prompt: buildKimiK27Prompt(options) };\n\t\tcase \"kimi-k2-6\":\n\t\t\treturn { name, prompt: buildKimiK26Prompt(options) };\n\t\tcase \"claude-fable-5-1\":\n\t\t\treturn { name, prompt: buildClaudeFable51Prompt(options) };\n\t\tcase \"claude-fable-5\":\n\t\t\treturn { name, prompt: buildClaudeFable5Prompt(options) };\n\t\tcase \"claude-opus-5\":\n\t\t\treturn { name, prompt: buildClaudeOpus5Prompt(options) };\n\t\tcase \"claude-opus-4-8\":\n\t\t\treturn { name, prompt: buildClaudeOpus48Prompt(options) };\n\t\tcase \"claude-opus-4-7\":\n\t\t\treturn { name, prompt: buildClaudeOpus47Prompt(options) };\n\t\tcase \"claude-opus-4-6\":\n\t\t\treturn { name, prompt: buildClaudeOpus46Prompt(options) };\n\t\tcase \"claude-opus-4-5\":\n\t\t\treturn { name, prompt: buildClaudeOpus45Prompt(options) };\n\t}\n}\n\nfunction withDefaults(options: Partial<BuildDynamicSystemPromptOptions> = {}): BuildDynamicSystemPromptOptions {\n\treturn {\n\t\tcwd: options.cwd ?? \"\",\n\t\tselectedTools: options.selectedTools ?? [],\n\t\ttoolSnippets: options.toolSnippets ?? {},\n\t\tpromptGuidelines: options.promptGuidelines ?? [],\n\t\tcontextFiles: options.contextFiles ?? [],\n\t\tskills: options.skills ?? [],\n\t};\n}\n\nexport function resolvePreset(\n\tmodel: ModelWithPromptPresetMetadata,\n\tsettings: PromptPresetSettings,\n\toptions?: Partial<BuildDynamicSystemPromptOptions>,\n): ResolvedPromptPreset | undefined {\n\tconst name = resolvePresetName(model, settings);\n\tif (!name) {\n\t\treturn undefined;\n\t}\n\treturn buildPreset(name, withDefaults(options));\n}\n"]}
1
+ {"version":3,"file":"presets.js","sourceRoot":"","sources":["../../../../../src/core/extensions/builtin/prompt-preset/presets.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,wBAAwB,EAAE,MAAM,uB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AO,CAAC,EAAE,CAAC;QAC3D,KAAK,iBAAiB;YACrB,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,uBAAuB,CAAC,OAAO,CAAC,EAAE,CAAC;QAC3D,KAAK,iBAAiB;YACrB,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,uBAAuB,CAAC,OAAO,CAAC,EAAE,CAAC;IAC5D,CAAC;AACF,CAAC;AAED,SAAS,YAAY,CAAC,UAAoD,EAAE;IAC3E,OAAO;QACN,GAAG,EAAE,OAAO,CAAC,GAAG,IAAI,EAAE;QACtB,aAAa,EAAE,OAAO,CAAC,aAAa,IAAI,EAAE;QAC1C,YAAY,EAAE,OAAO,CAAC,YAAY,IAAI,EAAE;QACxC,gBAAgB,EAAE,OAAO,CAAC,gBAAgB,IAAI,EAAE;QAChD,YAAY,EAAE,OAAO,CAAC,YAAY,IAAI,EAAE;QACxC,MAAM,EAAE,OAAO,CAAC,MAAM,IAAI,EAAE;KAC5B,CAAC;AACH,CAAC;AAED,MAAM,UAAU,aAAa,CAC5B,KAAoC,EACpC,QAA8B,EAC9B,OAAkD;IAElD,MAAM,IAAI,GAAG,iBAAiB,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;IAChD,IAAI,CAAC,IAAI,EAAE,CAAC;QACX,OAAO,SAAS,CAAC;IAClB,CAAC;IACD,OAAO,WAAW,CAAC,IAAI,EAAE,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC;AACjD,CAAC","sourcesContent":["import type { Api, Model } from \"@earendil-works/pi-ai\";\nimport type { BuildDynamicSystemPromptOptions } from \"../../../dynamic-prompt/build.ts\";\nimport { buildClaudeFable5Prompt } from \"./claude-fable-5.ts\";\nimport { buildClaudeFable51Prompt } from \"./claude-fable-5-1.ts\";\nimport { buildClaudeOpus45Prompt } from \"./claude-opus-4-5.ts\";\nimport { buildClaudeOpus46Prompt } from \"./claude-opus-4-6.ts\";\nimport { buildClaudeOpus47Prompt } from \"./claude-opus-4-7.ts\";\nimport { buildClaudeOpus48Prompt } from \"./claude-opus-4-8.ts\";\nimport { buildClaudeOpus5Prompt } from \"./claude-opus-5.ts\";\nimport { buildDeepseekV4FlashPrompt } from \"./deepseek-v4-flash.ts\";\nimport { buildDeepseekV4Flash0731Prompt } from \"./deepseek-v4-flash-0731.ts\";\nimport { buildDeepseekV4ProPrompt } from \"./deepseek-v4-pro.ts\";\nimport { buildGlm52Prompt } from \"./glm-5-2.ts\";\nimport { buildGlm53Prompt } from \"./glm-5-3.ts\";\nimport { buildGpt52Prompt } from \"./gpt-5.2.ts\";\nimport { buildGpt53CodexPrompt } from \"./gpt-5.3-codex.ts\";\nimport { buildGpt54Prompt } from \"./gpt-5.4.ts\";\nimport { buildGpt55Prompt } from \"./gpt-5.5.ts\";\nimport { buildGpt56Prompt } from \"./gpt-5.6.ts\";\nimport { buildGpt5Prompt } from \"./gpt-5.ts\";\nimport { buildGpt6AstraPrompt } from \"./gpt-6-astra.ts\";\nimport { buildGrok45Prompt } from \"./grok-4.5.ts\";\nimport { buildGrok46Prompt } from \"./grok-4.6.ts\";\nimport { buildKimiK26Prompt } from \"./kimi-k2-6.ts\";\nimport { buildKimiK27Prompt } from \"./kimi-k2-7.ts\";\nimport { buildKimiK3Prompt } from \"./kimi-k3.ts\";\nimport { type PromptPresetName, type PromptPresetSettings, parsePromptPreset } from \"./settings.ts\";\n\nexport type { PromptPresetSettings } from \"./settings.ts\";\n\ntype ResolvedPresetName = Exclude<PromptPresetName, \"auto\">;\ntype ModelWithPromptPresetMetadata = Pick<Model<Api>, \"id\" | \"provider\"> & {\n\tname?: string;\n\tpromptPreset?: string;\n};\n\nexport interface ResolvedPromptPreset {\n\tname: ResolvedPresetName;\n\tprompt: string;\n}\n\nfunction normalizeModelId(modelId: string): string {\n\treturn modelId.toLowerCase().replace(/\\s+/g, \"-\");\n}\n\n// GPT-6 Astra id shapes verified against the OpenAI model page, codex's\n// models.json, and Bedrock's catalog (2026-09-04): gpt-6-astra, gpt-6-astra-fast,\n// dated snapshots, openai/gpt-6-astra, openai.gpt-6-astra, global.openai.gpt-6-astra,\n// and the display name \"GPT-6 Astra\". Bare \"gpt-6\" and \"astra\" stay out: the guide\n// names no other GPT-6 model, and a future sibling deserves its own preset.\nfunction hasGpt6AstraSignal(value: string): boolean {\n\treturn /(?:^|[/@:._-])gpt[._-]?6[._-]astra(?:$|[/@:._-])/.test(normalizeModelId(value));\n}\n\nfunction isGpt6AstraModel(model: ModelWithPromptPresetMetadata): boolean {\n\treturn hasGpt6AstraSignal(model.id) || (model.name !== undefined && hasGpt6AstraSignal(model.name));\n}\n\ntype Gpt5Version = \"gpt-5.2\" | \"gpt-5.3-codex\" | \"gpt-5.4\" | \"gpt-5.5\" | \"gpt-5.6\";\n\nfunction extractGpt5Version(modelId: string): Gpt5Version | undefined {\n\tconst normalized = normalizeModelId(modelId);\n\tif (normalized.includes(\"gpt-5.6\")) {\n\t\treturn \"gpt-5.6\";\n\t}\n\tif (normalized.includes(\"gpt-5.5\")) {\n\t\treturn \"gpt-5.5\";\n\t}\n\tif (normalized.includes(\"gpt-5.4\")) {\n\t\treturn \"gpt-5.4\";\n\t}\n\tif (normalized.includes(\"gpt-5.3\")) {\n\t\treturn \"gpt-5.3-codex\";\n\t}\n\tif (normalized.includes(\"gpt-5.2\")) {\n\t\treturn \"gpt-5.2\";\n\t}\n\treturn undefined;\n}\n\nfunction hasKimiK26Signal(value: string): boolean {\n\treturn /(?:^|[/@._-])kimi-k2(?:[._-]|p)6(?:$|[/@._:-])/.test(normalizeModelId(value));\n}\n\nfunction isKimiK26Model(model: ModelWithPromptPresetMetadata): boolean {\n\treturn hasKimiK26Signal(model.id) || (model.name !== undefined && hasKimiK26Signal(model.name));\n}\n\nfunction hasKimiK27Signal(value: string): boolean {\n\treturn /(?:^|[/@._-])kimi-k2(?:[._-]|p)7(?:$|[/@._:-])/.test(normalizeModelId(value));\n}\n\nfunction isKimiK27Model(model: ModelWithPromptPresetMetadata): boolean {\n\treturn hasKimiK27Signal(model.id) || (model.name !== undefined && hasKimiK27Signal(model.name));\n}\n\nfunction hasKimiK3Signal(value: string): boolean {\n\tconst normalized = normalizeModelId(value);\n\treturn normalized === \"k3\" || /(?:^|[/@._-])kimi-k3(?:$|[/@._:-])/.test(normalized);\n}\n\nfunction isKimiK3Model(model: ModelWithPromptPresetMetadata): boolean {\n\treturn hasKimiK3Signal(model.id) || (model.name !== undefined && hasKimiK3Signal(model.name));\n}\n\n// DeepSeek V4 id shapes verified against the OpenRouter live API, models.dev,\n// and senpi's generated provider catalogs (2026-07-31): deepseek-v4-flash,\n// deepseek/deepseek-v4-flash-0731, deepseek-ai/DeepSeek-V4-Pro,\n// accounts/fireworks/models/deepseek-v4-flash, aihubmix's alicloud-deepseek-v4-*,\n// and trailing tags (:free, -free, :thinking, -nothinking, -cheaper, -lightning, -el).\nfunction hasDeepseekV4Flash0731Signal(value: string): boolean {\n\treturn /(?:^|[/@:._-])deepseek[._-]v4[._-]flash[._-]0731(?:$|[/@:._-])/.test(normalizeModelId(value));\n}\n\nfunction isDeepseekV4Flash0731Model(model: ModelWithPromptPresetMetadata): boolean {\n\treturn (\n\t\thasDeepseekV4Flash0731Signal(model.id) || (model.name !== undefined && hasDeepseekV4Flash0731Signal(model.name))\n\t);\n}\n\nfunction hasDeepseekV4FlashSignal(value: string): boolean {\n\treturn /(?:^|[/@:._-])deepseek[._-]v4[._-]flash(?:$|[/@:._-])/.test(normalizeModelId(value));\n}\n\nfunction isDeepseekV4FlashModel(model: ModelWithPromptPresetMetadata): boolean {\n\treturn hasDeepseekV4FlashSignal(model.id) || (model.name !== undefined && hasDeepseekV4FlashSignal(model.name));\n}\n\nfunction hasDeepseekV4ProSignal(value: string): boolean {\n\treturn /(?:^|[/@:._-])deepseek[._-]v4[._-]pro(?:$|[/@:._-])/.test(normalizeModelId(value));\n}\n\nfunction isDeepseekV4ProModel(model: ModelWithPromptPresetMetadata): boolean {\n\treturn hasDeepseekV4ProSignal(model.id) || (model.name !== undefined && hasDeepseekV4ProSignal(model.name));\n}\n\nfunction hasGlm52Signal(value: string): boolean {\n\treturn /(?:^|[/@._-])glm(?:[._-]|p)5(?:[._-]|p)2(?:$|[/@._:-])/.test(normalizeModelId(value));\n}\n\nfunction isGlm52Model(model: ModelWithPromptPresetMetadata): boolean {\n\treturn hasGlm52Signal(model.id) || (model.name !== undefined && hasGlm52Signal(model.name));\n}\n\nfunction hasGlm53Signal(value: string): boolean {\n\treturn /(?:^|[/@._-])glm(?:[._-]|p)5(?:[._-]|p)3(?:$|[/@._:-])/.test(normalizeModelId(value));\n}\n\nfunction isGlm53Model(model: ModelWithPromptPresetMetadata): boolean {\n\treturn hasGlm53Signal(model.id) || (model.name !== undefined && hasGlm53Signal(model.name));\n}\n\nfunction hasGrok45Signal(value: string): boolean {\n\t// Match any Grok 4.5 id shape: grok-4.5, grok4.5, grok45, grok-4p5, provider:model,\n\t// path/prefix ids, and trailing tags (:thinking, -latest). Keep 4.3 / 4.20 / 3 out.\n\treturn /(?:^|[/@:._-])grok(?:[._-]|p)?4(?:[._-]|p)?5(?:$|[/@._:-])/.test(normalizeModelId(value));\n}\n\nfunction isGrok45Model(model: ModelWithPromptPresetMetadata): boolean {\n\treturn hasGrok45Signal(model.id) || (model.name !== undefined && hasGrok45Signal(model.name));\n}\n\nfunction hasGrok46Signal(value: string): boolean {\n\t// Same id shapes as hasGrok45Signal with a 4.6 minor version. Keep 4.5 / 4.3 / 4.20 / 3 out.\n\treturn /(?:^|[/@:._-])grok(?:[._-]|p)?4(?:[._-]|p)?6(?:$|[/@._:-])/.test(normalizeModelId(value));\n}\n\nfunction isGrok46Model(model: ModelWithPromptPresetMetadata): boolean {\n\treturn hasGrok46Signal(model.id) || (model.name !== undefined && hasGrok46Signal(model.name));\n}\n\n// Claude Mythos shares each Fable release's prompting guide (\"Prompting Claude\n// Fable 5.1\" covers Fable 5.1 and Mythos 5.1; \"Prompting Claude Fable 5\"\n// covers Fable 5 and Mythos 5), so Mythos ids route to the matching Fable preset.\nconst CLAUDE_FABLE_51_MARKERS = [\"fable-5-1\", \"fable-5.1\", \"mythos-5-1\", \"mythos-5.1\"] as const;\nconst CLAUDE_FABLE_5_MARKERS = [\"fable-5\", \"mythos-5\"] as const;\n\nfunction isClaudeFable51Model(modelId: string): boolean {\n\tconst normalized = normalizeModelId(modelId);\n\treturn CLAUDE_FABLE_51_MARKERS.some((marker) => normalized.includes(marker));\n}\n\nfunction isClaudeFable5Model(modelId: string): boolean {\n\tconst normalized = normalizeModelId(modelId);\n\treturn CLAUDE_FABLE_5_MARKERS.some((marker) => normalized.includes(marker));\n}\n\nfunction isClaudeOpus5Model(modelId: string): boolean {\n\treturn normalizeModelId(modelId).includes(\"opus-5\");\n}\n\ntype ClaudeOpusVersion = \"claude-opus-4-8\" | \"claude-opus-4-7\" | \"claude-opus-4-6\" | \"claude-opus-4-5\";\n\nfunction extractClaudeOpusVersion(modelId: string): ClaudeOpusVersion | undefined {\n\tconst normalized = normalizeModelId(modelId);\n\tif (normalized.includes(\"opus-4-8\")) {\n\t\treturn \"claude-opus-4-8\";\n\t}\n\tif (normalized.includes(\"opus-4-7\")) {\n\t\treturn \"claude-opus-4-7\";\n\t}\n\tif (normalized.includes(\"opus-4-6\")) {\n\t\treturn \"claude-opus-4-6\";\n\t}\n\tif (normalized.includes(\"opus-4-5\") || normalized.includes(\"opus-4.5\")) {\n\t\treturn \"claude-opus-4-5\";\n\t}\n\treturn undefined;\n}\n\nexport function resolvePresetName(\n\tmodel: ModelWithPromptPresetMetadata,\n\tsettings: PromptPresetSettings,\n): ResolvedPresetName | undefined {\n\tif (settings.promptPreset !== \"auto\") {\n\t\treturn settings.promptPreset;\n\t}\n\n\tconst modelPromptPreset = parsePromptPreset(model.promptPreset);\n\tif (modelPromptPreset && modelPromptPreset !== \"auto\") {\n\t\treturn modelPromptPreset;\n\t}\n\n\tif (isGpt6AstraModel(model)) {\n\t\treturn \"gpt-6-astra\";\n\t}\n\tconst gpt5Version = extractGpt5Version(model.id);\n\tif (gpt5Version) {\n\t\treturn gpt5Version;\n\t}\n\tif (isKimiK3Model(model)) {\n\t\treturn \"kimi-k3\";\n\t}\n\tif (isKimiK27Model(model)) {\n\t\treturn \"kimi-k2-7\";\n\t}\n\tif (isKimiK26Model(model)) {\n\t\treturn \"kimi-k2-6\";\n\t}\n\t// The dotted release must resolve before the generic fable-5 substring.\n\tif (isClaudeFable51Model(model.id)) {\n\t\treturn \"claude-fable-5-1\";\n\t}\n\tif (isClaudeFable5Model(model.id)) {\n\t\treturn \"claude-fable-5\";\n\t}\n\tif (isClaudeOpus5Model(model.id)) {\n\t\treturn \"claude-opus-5\";\n\t}\n\tconst claudeVersion = extractClaudeOpusVersion(model.id);\n\tif (claudeVersion) {\n\t\treturn claudeVersion;\n\t}\n\tif (isGlm53Model(model)) {\n\t\treturn \"glm-5.3\";\n\t}\n\tif (isGlm52Model(model)) {\n\t\treturn \"glm-5.2\";\n\t}\n\t// The dated snapshot must resolve before the generic flash alias.\n\tif (isDeepseekV4Flash0731Model(model)) {\n\t\treturn \"deepseek-v4-flash-0731\";\n\t}\n\tif (isDeepseekV4FlashModel(model)) {\n\t\treturn \"deepseek-v4-flash\";\n\t}\n\tif (isDeepseekV4ProModel(model)) {\n\t\treturn \"deepseek-v4-pro\";\n\t}\n\tif (isGrok46Model(model)) {\n\t\treturn \"grok-4.6\";\n\t}\n\tif (isGrok45Model(model)) {\n\t\treturn \"grok-4.5\";\n\t}\n\treturn undefined;\n}\n\nfunction buildPreset(name: ResolvedPresetName, options: BuildDynamicSystemPromptOptions): ResolvedPromptPreset {\n\tswitch (name) {\n\t\tcase \"gpt-6-astra\":\n\t\t\treturn { name, prompt: buildGpt6AstraPrompt(options) };\n\t\tcase \"gpt-5.6\":\n\t\t\treturn { name, prompt: buildGpt56Prompt(options) };\n\t\tcase \"gpt-5.5\":\n\t\t\treturn { name, prompt: buildGpt55Prompt(options) };\n\t\tcase \"gpt-5.4\":\n\t\t\treturn { name, prompt: buildGpt54Prompt(options) };\n\t\tcase \"gpt-5.3-codex\":\n\t\t\treturn { name, prompt: buildGpt53CodexPrompt(options) };\n\t\tcase \"gpt-5.2\":\n\t\t\treturn { name, prompt: buildGpt52Prompt(options) };\n\t\tcase \"gpt-5\":\n\t\t\treturn { name, prompt: buildGpt5Prompt(options) };\n\t\tcase \"glm-5.3\":\n\t\t\treturn { name, prompt: buildGlm53Prompt(options) };\n\t\tcase \"glm-5.2\":\n\t\t\treturn { name, prompt: buildGlm52Prompt(options) };\n\t\tcase \"deepseek-v4-flash\":\n\t\t\treturn { name, prompt: buildDeepseekV4FlashPrompt(options) };\n\t\tcase \"deepseek-v4-flash-0731\":\n\t\t\treturn { name, prompt: buildDeepseekV4Flash0731Prompt(options) };\n\t\tcase \"deepseek-v4-pro\":\n\t\t\treturn { name, prompt: buildDeepseekV4ProPrompt(options) };\n\t\tcase \"grok-4.6\":\n\t\t\treturn { name, prompt: buildGrok46Prompt(options) };\n\t\tcase \"grok-4.5\":\n\t\t\treturn { name, prompt: buildGrok45Prompt(options) };\n\t\tcase \"kimi-k3\":\n\t\t\treturn { name, prompt: buildKimiK3Prompt(options) };\n\t\tcase \"kimi-k2-7\":\n\t\t\treturn { name, prompt: buildKimiK27Prompt(options) };\n\t\tcase \"kimi-k2-6\":\n\t\t\treturn { name, prompt: buildKimiK26Prompt(options) };\n\t\tcase \"claude-fable-5-1\":\n\t\t\treturn { name, prompt: buildClaudeFable51Prompt(options) };\n\t\tcase \"claude-fable-5\":\n\t\t\treturn { name, prompt: buildClaudeFable5Prompt(options) };\n\t\tcase \"claude-opus-5\":\n\t\t\treturn { name, prompt: buildClaudeOpus5Prompt(options) };\n\t\tcase \"claude-opus-4-8\":\n\t\t\treturn { name, prompt: buildClaudeOpus48Prompt(options) };\n\t\tcase \"claude-opus-4-7\":\n\t\t\treturn { name, prompt: buildClaudeOpus47Prompt(options) };\n\t\tcase \"claude-opus-4-6\":\n\t\t\treturn { name, prompt: buildClaudeOpus46Prompt(options) };\n\t\tcase \"claude-opus-4-5\":\n\t\t\treturn { name, prompt: buildClaudeOpus45Prompt(options) };\n\t}\n}\n\nfunction withDefaults(options: Partial<BuildDynamicSystemPromptOptions> = {}): BuildDynamicSystemPromptOptions {\n\treturn {\n\t\tcwd: options.cwd ?? \"\",\n\t\tselectedTools: options.selectedTools ?? [],\n\t\ttoolSnippets: options.toolSnippets ?? {},\n\t\tpromptGuidelines: options.promptGuidelines ?? [],\n\t\tcontextFiles: options.contextFiles ?? [],\n\t\tskills: options.skills ?? [],\n\t};\n}\n\nexport function resolvePreset(\n\tmodel: ModelWithPromptPresetMetadata,\n\tsettings: PromptPresetSettings,\n\toptions?: Partial<BuildDynamicSystemPromptOptions>,\n): ResolvedPromptPreset | undefined {\n\tconst name = resolvePresetName(model, settings);\n\tif (!name) {\n\t\treturn undefined;\n\t}\n\treturn buildPreset(name, withDefaults(options));\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  import type { SettingsManager } from "../../../settings-manager.ts";
2
- export type PromptPresetName = "auto" | "claude-fable-5" | "claude-fable-5-1" | "claude-opus-5" | "claude-opus-4-8" | "claude-opus-4-7" | "claude-opus-4-6" | "claude-opus-4-5" | "deepseek-v4-flash" | "deepseek-v4-flash-0731" | "deepseek-v4-pro" | "glm-5.2" | "glm-5.3" | "grok-4.5" | "grok-4.6" | "kimi-k3" | "kimi-k2-7" | "kimi-k2-6" | "gpt-5" | "gpt-5.2" | "gpt-5.3-codex" | "gpt-5.4" | "gpt-5.5" | "gpt-5.6";
2
+ export type PromptPresetName = "auto" | "claude-fable-5" | "claude-fable-5-1" | "claude-opus-5" | "claude-opus-4-8" | "claude-opus-4-7" | "claude-opus-4-6" | "claude-opus-4-5" | "deepseek-v4-flash" | "deepseek-v4-flash-0731" | "deepseek-v4-pro" | "glm-5.2" | "glm-5.3" | "grok-4.5" | "grok-4.6" | "kimi-k3" | "kimi-k2-7" | "kimi-k2-6" | "gpt-5" | "gpt-5.2" | "gpt-5.3-codex" | "gpt-5.4" | "gpt-5.5" | "gpt-5.6" | "gpt-6-astra";
3
3
  export interface PromptPresetSettings {
4
4
  promptPreset: PromptPresetName;
5
5
  }
@@ -1 +1 @@
1
- {"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../../../../src/core/extensions/builtin/prompt-preset/settings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAY,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAE9E,MAAM,MAAM,gBAAgB,GACzB,MAAM,GACN,gBAAgB,GAChB,kBAAkB,GAClB,eAAe,GACf,iBAAiB,GACjB,iBAAiB,GACjB,iBAAiB,GACjB,iBAAiB,GACjB,mBAAmB,GACnB,wBAAwB,GACxB,iBAAiB,GACjB,SAAS,GACT,SAAS,GACT,UAAU,GACV,UAAU,GACV,SAAS,GACT,WAAW,GACX,WAAW,GACX,OAAO,GACP,SAAS,GACT,eAAe,GACf,SAAS,GACT,SAAS,GACT,SAAS,CAAC;AAEb,MAAM,WAAW,oBAAoB;IACpC,YAAY,EAAE,gBAAgB,CAAC;CAC/B;AA+BD,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,gBAAgB,GAAG,SAAS,CAKzF;AAED,wBAAgB,wBAAwB,CAAC,eAAe,EAAE,eAAe,GAAG,oBAAoB,CAQ/F"}
1
+ {"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../../../../src/core/extensions/builtin/prompt-preset/settings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAY,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAE9E,MAAM,MAAM,gBAAgB,GACzB,MAAM,GACN,gBAAgB,GAChB,kBAAkB,GAClB,eAAe,GACf,iBAAiB,GACjB,iBAAiB,GACjB,iBAAiB,GACjB,iBAAiB,GACjB,mBAAmB,GACnB,wBAAwB,GACxB,iBAAiB,GACjB,SAAS,GACT,SAAS,GACT,UAAU,GACV,UAAU,GACV,SAAS,GACT,WAAW,GACX,WAAW,GACX,OAAO,GACP,SAAS,GACT,eAAe,GACf,SAAS,GACT,SAAS,GACT,SAAS,GACT,aAAa,CAAC;AAEjB,MAAM,WAAW,oBAAoB;IACpC,YAAY,EAAE,gBAAgB,CAAC;CAC/B;AAgCD,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,gBAAgB,GAAG,SAAS,CAKzF;AAED,wBAAgB,wBAAwB,CAAC,eAAe,EAAE,eAAe,GAAG,oBAAoB,CAQ/F"}
@@ -23,6 +23,7 @@ const VALID_PRESETS = new Set([
23
23
  "gpt-5.4",
24
24
  "gpt-5.5",
25
25
  "gpt-5.6",
26
+ "gpt-6-astra",
26
27
  ]);
27
28
  export function parsePromptPreset(value) {
28
29
  if (value && VALID_PRESETS.has(value)) {
@@ -1 +1 @@
1
- {"version":3,"file":"settings.js","sourceRoot":"","sources":["../../../../../src/core/extensions/builtin/prompt-preset/settings.ts"],"names":[],"mappings":"AAkCA,MAAM,aAAa,GAAwB,IAAI,GAAG,CAAmB;IACpE,MAAM;IACN,gBAAgB;IAChB,kBAAkB;IAClB,eAAe;IACf,iBAAiB;IACjB,iBAAiB;IACjB,iBAAiB;IACjB,iBAAiB;IACjB,mBAAmB;IACnB,wBAAwB;IACxB,iBAAiB;IACjB,SAAS;IACT,SAAS;IACT,UAAU;IACV,UAAU;IACV,SAAS;IACT,WAAW;IACX,WAAW;IACX,OAAO;IACP,SAAS;IACT,eAAe;IACf,SAAS;IACT,SAAS;IACT,SAAS;CACT,CAAC,CAAC;AAEH,MAAM,UAAU,iBAAiB,CAAC,KAAyB;IAC1D,IAAI,KAAK,IAAI,aAAa,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC;QACvC,OAAO,KAAyB,CAAC;IAClC,CAAC;IACD,OAAO,SAAS,CAAC;AAClB,CAAC;AAED,MAAM,UAAU,wBAAwB,CAAC,eAAgC;IACxE,MAAM,cAAc,GAAG,eAAe,CAAC,iBAAiB,EAA8B,CAAC;IACvF,MAAM,eAAe,GAAG,eAAe,CAAC,kBAAkB,EAA8B,CAAC;IAEzF,OAAO;QACN,YAAY,EACX,iBAAiB,CAAC,eAAe,CAAC,YAAY,CAAC,IAAI,iBAAiB,CAAC,cAAc,CAAC,YAAY,CAAC,IAAI,MAAM;KAC5G,CAAC;AACH,CAAC","sourcesContent":["import type { Settings, SettingsManager } from \"../../../settings-manager.ts\";\n\nexport type PromptPresetName =\n\t| \"auto\"\n\t| \"claude-fable-5\"\n\t| \"claude-fable-5-1\"\n\t| \"claude-opus-5\"\n\t| \"claude-opus-4-8\"\n\t| \"claude-opus-4-7\"\n\t| \"claude-opus-4-6\"\n\t| \"claude-opus-4-5\"\n\t| \"deepseek-v4-flash\"\n\t| \"deepseek-v4-flash-0731\"\n\t| \"deepseek-v4-pro\"\n\t| \"glm-5.2\"\n\t| \"glm-5.3\"\n\t| \"grok-4.5\"\n\t| \"grok-4.6\"\n\t| \"kimi-k3\"\n\t| \"kimi-k2-7\"\n\t| \"kimi-k2-6\"\n\t| \"gpt-5\"\n\t| \"gpt-5.2\"\n\t| \"gpt-5.3-codex\"\n\t| \"gpt-5.4\"\n\t| \"gpt-5.5\"\n\t| \"gpt-5.6\";\n\nexport interface PromptPresetSettings {\n\tpromptPreset: PromptPresetName;\n}\n\ntype SettingsWithPromptPreset = Settings & { promptPreset?: string };\n\nconst VALID_PRESETS: ReadonlySet<string> = new Set<PromptPresetName>([\n\t\"auto\",\n\t\"claude-fable-5\",\n\t\"claude-fable-5-1\",\n\t\"claude-opus-5\",\n\t\"claude-opus-4-8\",\n\t\"claude-opus-4-7\",\n\t\"claude-opus-4-6\",\n\t\"claude-opus-4-5\",\n\t\"deepseek-v4-flash\",\n\t\"deepseek-v4-flash-0731\",\n\t\"deepseek-v4-pro\",\n\t\"glm-5.2\",\n\t\"glm-5.3\",\n\t\"grok-4.5\",\n\t\"grok-4.6\",\n\t\"kimi-k3\",\n\t\"kimi-k2-7\",\n\t\"kimi-k2-6\",\n\t\"gpt-5\",\n\t\"gpt-5.2\",\n\t\"gpt-5.3-codex\",\n\t\"gpt-5.4\",\n\t\"gpt-5.5\",\n\t\"gpt-5.6\",\n]);\n\nexport function parsePromptPreset(value: string | undefined): PromptPresetName | undefined {\n\tif (value && VALID_PRESETS.has(value)) {\n\t\treturn value as PromptPresetName;\n\t}\n\treturn undefined;\n}\n\nexport function loadPromptPresetSettings(settingsManager: SettingsManager): PromptPresetSettings {\n\tconst globalSettings = settingsManager.getGlobalSettings() as SettingsWithPromptPreset;\n\tconst projectSettings = settingsManager.getProjectSettings() as SettingsWithPromptPreset;\n\n\treturn {\n\t\tpromptPreset:\n\t\t\tparsePromptPreset(projectSettings.promptPreset) ?? parsePromptPreset(globalSettings.promptPreset) ?? \"auto\",\n\t};\n}\n"]}
1
+ {"version":3,"file":"settings.js","sourceRoot":"","sources":["../../../../../src/core/extensions/builtin/prompt-preset/settings.ts"],"names":[],"mappings":"AAmCA,MAAM,aAAa,GAAwB,IAAI,GAAG,CAAmB;IACpE,MAAM;IACN,gBAAgB;IAChB,kBAAkB;IAClB,eAAe;IACf,iBAAiB;IACjB,iBAAiB;IACjB,iBAAiB;IACjB,iBAAiB;IACjB,mBAAmB;IACnB,wBAAwB;IACxB,iBAAiB;IACjB,SAAS;IACT,SAAS;IACT,UAAU;IACV,UAAU;IACV,SAAS;IACT,WAAW;IACX,WAAW;IACX,OAAO;IACP,SAAS;IACT,eAAe;IACf,SAAS;IACT,SAAS;IACT,SAAS;IACT,aAAa;CACb,CAAC,CAAC;AAEH,MAAM,UAAU,iBAAiB,CAAC,KAAyB;IAC1D,IAAI,KAAK,IAAI,aAAa,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC;QACvC,OAAO,KAAyB,CAAC;IAClC,CAAC;IACD,OAAO,SAAS,CAAC;AAClB,CAAC;AAED,MAAM,UAAU,wBAAwB,CAAC,eAAgC;IACxE,MAAM,cAAc,GAAG,eAAe,CAAC,iBAAiB,EAA8B,CAAC;IACvF,MAAM,eAAe,GAAG,eAAe,CAAC,kBAAkB,EAA8B,CAAC;IAEzF,OAAO;QACN,YAAY,EACX,iBAAiB,CAAC,eAAe,CAAC,YAAY,CAAC,IAAI,iBAAiB,CAAC,cAAc,CAAC,YAAY,CAAC,IAAI,MAAM;KAC5G,CAAC;AACH,CAAC","sourcesContent":["import type { Settings, SettingsManager } from \"../../../settings-manager.ts\";\n\nexport type PromptPresetName =\n\t| \"auto\"\n\t| \"claude-fable-5\"\n\t| \"claude-fable-5-1\"\n\t| \"claude-opus-5\"\n\t| \"claude-opus-4-8\"\n\t| \"claude-opus-4-7\"\n\t| \"claude-opus-4-6\"\n\t| \"claude-opus-4-5\"\n\t| \"deepseek-v4-flash\"\n\t| \"deepseek-v4-flash-0731\"\n\t| \"deepseek-v4-pro\"\n\t| \"glm-5.2\"\n\t| \"glm-5.3\"\n\t| \"grok-4.5\"\n\t| \"grok-4.6\"\n\t| \"kimi-k3\"\n\t| \"kimi-k2-7\"\n\t| \"kimi-k2-6\"\n\t| \"gpt-5\"\n\t| \"gpt-5.2\"\n\t| \"gpt-5.3-codex\"\n\t| \"gpt-5.4\"\n\t| \"gpt-5.5\"\n\t| \"gpt-5.6\"\n\t| \"gpt-6-astra\";\n\nexport interface PromptPresetSettings {\n\tpromptPreset: PromptPresetName;\n}\n\ntype SettingsWithPromptPreset = Settings & { promptPreset?: string };\n\nconst VALID_PRESETS: ReadonlySet<string> = new Set<PromptPresetName>([\n\t\"auto\",\n\t\"claude-fable-5\",\n\t\"claude-fable-5-1\",\n\t\"claude-opus-5\",\n\t\"claude-opus-4-8\",\n\t\"claude-opus-4-7\",\n\t\"claude-opus-4-6\",\n\t\"claude-opus-4-5\",\n\t\"deepseek-v4-flash\",\n\t\"deepseek-v4-flash-0731\",\n\t\"deepseek-v4-pro\",\n\t\"glm-5.2\",\n\t\"glm-5.3\",\n\t\"grok-4.5\",\n\t\"grok-4.6\",\n\t\"kimi-k3\",\n\t\"kimi-k2-7\",\n\t\"kimi-k2-6\",\n\t\"gpt-5\",\n\t\"gpt-5.2\",\n\t\"gpt-5.3-codex\",\n\t\"gpt-5.4\",\n\t\"gpt-5.5\",\n\t\"gpt-5.6\",\n\t\"gpt-6-astra\",\n]);\n\nexport function parsePromptPreset(value: string | undefined): PromptPresetName | undefined {\n\tif (value && VALID_PRESETS.has(value)) {\n\t\treturn value as PromptPresetName;\n\t}\n\treturn undefined;\n}\n\nexport function loadPromptPresetSettings(settingsManager: SettingsManager): PromptPresetSettings {\n\tconst globalSettings = settingsManager.getGlobalSettings() as SettingsWithPromptPreset;\n\tconst projectSettings = settingsManager.getProjectSettings() as SettingsWithPromptPreset;\n\n\treturn {\n\t\tpromptPreset:\n\t\t\tparsePromptPreset(projectSettings.promptPreset) ?? parsePromptPreset(globalSettings.promptPreset) ?? \"auto\",\n\t};\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"extension.d.ts","sourceRoot":"","sources":["../../../../../src/core/extensions/builtin/terminal/extension.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAoB,MAAM,gBAAgB,CAAC;AAqKrE,wBAAgB,yBAAyB,CAAC,EAAE,EAAE,YAAY,GAAG,IAAI,CAyGhE;AAED,eAAe,yBAAyB,CAAC"}
1
+ {"version":3,"file":"extension.d.ts","sourceRoot":"","sources":["../../../../../src/core/extensions/builtin/terminal/extension.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAoB,MAAM,gBAAgB,CAAC;AAsKrE,wBAAgB,yBAAyB,CAAC,EAAE,EAAE,YAAY,GAAG,IAAI,CA2GhE;AAED,eAAe,yBAAyB,CAAC"}
@@ -1,12 +1,13 @@
1
1
  import { getShellEnv } from "../../../../utils/shell.js";
2
2
  import { SettingsManager } from "../../../settings-manager.js";
3
3
  import { isAnthropicBashEnabled } from "../anthropic-bash/index.js";
4
+ import { isEvalOnlyRouting } from "../eval-only-routing.js";
4
5
  import { TERMINAL_MONITOR_STATE_EVENT, WAKE_SOURCE_STATE_EVENT } from "../monitor-state-event.js";
5
6
  import { MonitorNotifier } from "./monitor-notify.js";
6
7
  import { MONITOR_STATUS_KEY } from "./monitor-status.js";
7
8
  import { MonitorStatusTicker } from "./monitor-status-ticker.js";
8
9
  import { TerminalNotifier } from "./notify.js";
9
- import { TERMINAL_PROMPT_SECTION } from "./prompt.js";
10
+ import { buildTerminalPromptSection } from "./prompt.js";
10
11
  import { claimParkedBundle, parkBundle, TerminalSessionBundle, teardownParkedBundle, } from "./session-bundle.js";
11
12
  import { loadTerminalSettings, TERMINAL_SETTINGS_DEFAULTS } from "./settings.js";
12
13
  import { TERMINAL_BASH_TOOL, TERMINAL_COMPANION_TOOLS } from "./shared.js";
@@ -220,7 +221,9 @@ export function registerTerminalExtension(pi) {
220
221
  pi.on("before_agent_start", async (event) => {
221
222
  if (state.steppedAside)
222
223
  return undefined;
223
- return { systemPrompt: `${event.systemPrompt}\n${TERMINAL_PROMPT_SECTION}` };
224
+ return {
225
+ systemPrompt: `${event.systemPrompt}\n${buildTerminalPromptSection({ evalOnly: isEvalOnlyRouting(pi) })}`,
226
+ };
224
227
  });
225
228
  pi.on("session_shutdown", async (event, ctx) => {
226
229
  state.monitorNotifier?.dispose();