@code-yeongyu/senpi 2026.7.13 → 2026.7.14-3

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 (196) hide show
  1. package/CHANGELOG.md +52 -0
  2. package/dist/core/agent-session.js +1 -1
  3. package/dist/core/agent-session.js.map +1 -1
  4. package/dist/core/compaction/branch-summarization.d.ts +1 -1
  5. package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
  6. package/dist/core/compaction/branch-summarization.js.map +1 -1
  7. package/dist/core/extensions/builtin/prompt-preset/gpt-5.6.d.ts.map +1 -1
  8. package/dist/core/extensions/builtin/prompt-preset/gpt-5.6.js +14 -5
  9. package/dist/core/extensions/builtin/prompt-preset/gpt-5.6.js.map +1 -1
  10. package/dist/core/extensions/builtin/terminal/runtime-session.d.ts +1 -1
  11. package/dist/core/extensions/builtin/terminal/runtime-session.d.ts.map +1 -1
  12. package/dist/core/extensions/builtin/terminal/runtime-session.js +3 -2
  13. package/dist/core/extensions/builtin/terminal/runtime-session.js.map +1 -1
  14. package/dist/core/extensions/builtin/websearch/websearch/native.d.ts +1 -1
  15. package/dist/core/extensions/builtin/websearch/websearch/native.d.ts.map +1 -1
  16. package/dist/core/extensions/builtin/websearch/websearch/native.js +83 -33
  17. package/dist/core/extensions/builtin/websearch/websearch/native.js.map +1 -1
  18. package/dist/core/extensions/builtin/websearch/websearch/provider-endpoints.d.ts.map +1 -1
  19. package/dist/core/extensions/builtin/websearch/websearch/provider-endpoints.js +2 -1
  20. package/dist/core/extensions/builtin/websearch/websearch/provider-endpoints.js.map +1 -1
  21. package/dist/core/extensions/builtin/websearch/websearch/tool.d.ts.map +1 -1
  22. package/dist/core/extensions/builtin/websearch/websearch/tool.js +3 -3
  23. package/dist/core/extensions/builtin/websearch/websearch/tool.js.map +1 -1
  24. package/dist/core/model-registry.d.ts.map +1 -1
  25. package/dist/core/model-registry.js +18 -3
  26. package/dist/core/model-registry.js.map +1 -1
  27. package/dist/core/model-resolver.d.ts.map +1 -1
  28. package/dist/core/model-resolver.js +1 -0
  29. package/dist/core/model-resolver.js.map +1 -1
  30. package/dist/core/package-manager.d.ts.map +1 -1
  31. package/dist/core/package-manager.js +7 -2
  32. package/dist/core/package-manager.js.map +1 -1
  33. package/dist/core/provider-display-names.d.ts.map +1 -1
  34. package/dist/core/provider-display-names.js +1 -0
  35. package/dist/core/provider-display-names.js.map +1 -1
  36. package/dist/core/radius.d.ts +21 -0
  37. package/dist/core/radius.d.ts.map +1 -0
  38. package/dist/core/radius.js +30 -0
  39. package/dist/core/radius.js.map +1 -0
  40. package/dist/core/system-prompt.d.ts.map +1 -1
  41. package/dist/core/system-prompt.js +1 -11
  42. package/dist/core/system-prompt.js.map +1 -1
  43. package/dist/modes/interactive/interactive-mode.js +2 -2
  44. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  45. package/docs/custom-provider.md +2 -0
  46. package/docs/models.md +2 -0
  47. package/examples/AGENTS.md +34 -0
  48. package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
  49. package/examples/extensions/custom-provider-anthropic/package.json +1 -1
  50. package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  51. package/examples/extensions/gondolin/package-lock.json +2 -2
  52. package/examples/extensions/gondolin/package.json +1 -1
  53. package/examples/extensions/sandbox/package-lock.json +2 -2
  54. package/examples/extensions/sandbox/package.json +1 -1
  55. package/examples/extensions/with-deps/package-lock.json +2 -2
  56. package/examples/extensions/with-deps/package.json +1 -1
  57. package/node_modules/@code-yeongyu/senpi-codemode/CHANGELOG.md +26 -0
  58. package/node_modules/@code-yeongyu/senpi-codemode/package.json +3 -3
  59. package/node_modules/@code-yeongyu/senpi-codemode/src/prompt/eval-prompt.ts +16 -23
  60. package/node_modules/@earendil-works/pi-agent-core/package.json +2 -2
  61. package/node_modules/@earendil-works/pi-ai/README.md +3 -2
  62. package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.d.ts.map +1 -1
  63. package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.js +23 -42
  64. package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.js.map +1 -1
  65. package/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.d.ts.map +1 -1
  66. package/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.js +10 -6
  67. package/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.js.map +1 -1
  68. package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.d.ts +1 -0
  69. package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.d.ts.map +1 -1
  70. package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.js +1 -1
  71. package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.js.map +1 -1
  72. package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.d.ts.map +1 -1
  73. package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.js +12 -3
  74. package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.js.map +1 -1
  75. package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses-shared.d.ts.map +1 -1
  76. package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses-shared.js +23 -0
  77. package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses-shared.js.map +1 -1
  78. package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.d.ts +1 -0
  79. package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.d.ts.map +1 -1
  80. package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.js +22 -6
  81. package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.js.map +1 -1
  82. package/node_modules/@earendil-works/pi-ai/dist/api/pi-messages.d.ts +97 -0
  83. package/node_modules/@earendil-works/pi-ai/dist/api/pi-messages.d.ts.map +1 -0
  84. package/node_modules/@earendil-works/pi-ai/dist/api/pi-messages.js +307 -0
  85. package/node_modules/@earendil-works/pi-ai/dist/api/pi-messages.js.map +1 -0
  86. package/node_modules/@earendil-works/pi-ai/dist/api/pi-messages.lazy.d.ts +3 -0
  87. package/node_modules/@earendil-works/pi-ai/dist/api/pi-messages.lazy.d.ts.map +1 -0
  88. package/node_modules/@earendil-works/pi-ai/dist/api/pi-messages.lazy.js +3 -0
  89. package/node_modules/@earendil-works/pi-ai/dist/api/pi-messages.lazy.js.map +1 -0
  90. package/node_modules/@earendil-works/pi-ai/dist/compat.d.ts +2 -0
  91. package/node_modules/@earendil-works/pi-ai/dist/compat.d.ts.map +1 -1
  92. package/node_modules/@earendil-works/pi-ai/dist/compat.js +3 -0
  93. package/node_modules/@earendil-works/pi-ai/dist/compat.js.map +1 -1
  94. package/node_modules/@earendil-works/pi-ai/dist/env-api-keys.d.ts.map +1 -1
  95. package/node_modules/@earendil-works/pi-ai/dist/env-api-keys.js +1 -0
  96. package/node_modules/@earendil-works/pi-ai/dist/env-api-keys.js.map +1 -1
  97. package/node_modules/@earendil-works/pi-ai/dist/index.d.ts +1 -0
  98. package/node_modules/@earendil-works/pi-ai/dist/index.d.ts.map +1 -1
  99. package/node_modules/@earendil-works/pi-ai/dist/index.js.map +1 -1
  100. package/node_modules/@earendil-works/pi-ai/dist/models.generated.d.ts +233 -164
  101. package/node_modules/@earendil-works/pi-ai/dist/models.generated.d.ts.map +1 -1
  102. package/node_modules/@earendil-works/pi-ai/dist/providers/all.d.ts +9 -5
  103. package/node_modules/@earendil-works/pi-ai/dist/providers/all.d.ts.map +1 -1
  104. package/node_modules/@earendil-works/pi-ai/dist/providers/all.js.map +1 -1
  105. package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.models.d.ts +60 -0
  106. package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.models.d.ts.map +1 -1
  107. package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.models.js +54 -0
  108. package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.models.js.map +1 -1
  109. package/node_modules/@earendil-works/pi-ai/dist/providers/cerebras.models.js +1 -1
  110. package/node_modules/@earendil-works/pi-ai/dist/providers/cerebras.models.js.map +1 -1
  111. package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-ai-gateway.models.d.ts +92 -0
  112. package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-ai-gateway.models.d.ts.map +1 -1
  113. package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-ai-gateway.models.js +72 -0
  114. package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-ai-gateway.models.js.map +1 -1
  115. package/node_modules/@earendil-works/pi-ai/dist/providers/github-copilot.models.d.ts +1 -6
  116. package/node_modules/@earendil-works/pi-ai/dist/providers/github-copilot.models.d.ts.map +1 -1
  117. package/node_modules/@earendil-works/pi-ai/dist/providers/github-copilot.models.js +1 -2
  118. package/node_modules/@earendil-works/pi-ai/dist/providers/github-copilot.models.js.map +1 -1
  119. package/node_modules/@earendil-works/pi-ai/dist/providers/opencode.models.d.ts +57 -0
  120. package/node_modules/@earendil-works/pi-ai/dist/providers/opencode.models.d.ts.map +1 -1
  121. package/node_modules/@earendil-works/pi-ai/dist/providers/opencode.models.js +19 -0
  122. package/node_modules/@earendil-works/pi-ai/dist/providers/opencode.models.js.map +1 -1
  123. package/node_modules/@earendil-works/pi-ai/dist/providers/openrouter.models.d.ts +23 -22
  124. package/node_modules/@earendil-works/pi-ai/dist/providers/openrouter.models.d.ts.map +1 -1
  125. package/node_modules/@earendil-works/pi-ai/dist/providers/openrouter.models.js +54 -54
  126. package/node_modules/@earendil-works/pi-ai/dist/providers/openrouter.models.js.map +1 -1
  127. package/node_modules/@earendil-works/pi-ai/dist/providers/vercel-ai-gateway.models.d.ts +0 -136
  128. package/node_modules/@earendil-works/pi-ai/dist/providers/vercel-ai-gateway.models.d.ts.map +1 -1
  129. package/node_modules/@earendil-works/pi-ai/dist/providers/vercel-ai-gateway.models.js +2 -138
  130. package/node_modules/@earendil-works/pi-ai/dist/providers/vercel-ai-gateway.models.js.map +1 -1
  131. package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/context-transformer.d.ts.map +1 -1
  132. package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/context-transformer.js +9 -0
  133. package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/context-transformer.js.map +1 -1
  134. package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/index.d.ts +1 -1
  135. package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/index.d.ts.map +1 -1
  136. package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/index.js +6 -2
  137. package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/index.js.map +1 -1
  138. package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/anthropic-xml/coerce-parameters.d.ts +8 -0
  139. package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/anthropic-xml/coerce-parameters.d.ts.map +1 -0
  140. package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/anthropic-xml/coerce-parameters.js +92 -0
  141. package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/anthropic-xml/coerce-parameters.js.map +1 -0
  142. package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/anthropic-xml/format.d.ts +6 -0
  143. package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/anthropic-xml/format.d.ts.map +1 -0
  144. package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/anthropic-xml/format.js +54 -0
  145. package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/anthropic-xml/format.js.map +1 -0
  146. package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/anthropic-xml/index.d.ts +4 -0
  147. package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/anthropic-xml/index.d.ts.map +1 -0
  148. package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/anthropic-xml/index.js +4 -0
  149. package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/anthropic-xml/index.js.map +1 -0
  150. package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/anthropic-xml/invoke-match.d.ts +7 -0
  151. package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/anthropic-xml/invoke-match.d.ts.map +1 -0
  152. package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/anthropic-xml/invoke-match.js +16 -0
  153. package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/anthropic-xml/invoke-match.js.map +1 -0
  154. package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/anthropic-xml/invoke-tag-scanner.d.ts +19 -0
  155. package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/anthropic-xml/invoke-tag-scanner.d.ts.map +1 -0
  156. package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/anthropic-xml/invoke-tag-scanner.js +217 -0
  157. package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/anthropic-xml/invoke-tag-scanner.js.map +1 -0
  158. package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/anthropic-xml/parse.d.ts +4 -0
  159. package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/anthropic-xml/parse.d.ts.map +1 -0
  160. package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/anthropic-xml/parse.js +46 -0
  161. package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/anthropic-xml/parse.js.map +1 -0
  162. package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/anthropic-xml/stream-boundary.d.ts +13 -0
  163. package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/anthropic-xml/stream-boundary.d.ts.map +1 -0
  164. package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/anthropic-xml/stream-boundary.js +144 -0
  165. package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/anthropic-xml/stream-boundary.js.map +1 -0
  166. package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/anthropic-xml/stream.d.ts +5 -0
  167. package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/anthropic-xml/stream.d.ts.map +1 -0
  168. package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/anthropic-xml/stream.js +208 -0
  169. package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/anthropic-xml/stream.js.map +1 -0
  170. package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/anthropic-xml/tool-resolver.d.ts +4 -0
  171. package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/anthropic-xml/tool-resolver.d.ts.map +1 -0
  172. package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/anthropic-xml/tool-resolver.js +17 -0
  173. package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/anthropic-xml/tool-resolver.js.map +1 -0
  174. package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/anthropic-xml/xml-entities.d.ts +5 -0
  175. package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/anthropic-xml/xml-entities.d.ts.map +1 -0
  176. package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/anthropic-xml/xml-entities.js +34 -0
  177. package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/anthropic-xml/xml-entities.js.map +1 -0
  178. package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/types.d.ts +3 -1
  179. package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/types.d.ts.map +1 -1
  180. package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/types.js.map +1 -1
  181. package/node_modules/@earendil-works/pi-ai/dist/types.d.ts +10 -5
  182. package/node_modules/@earendil-works/pi-ai/dist/types.d.ts.map +1 -1
  183. package/node_modules/@earendil-works/pi-ai/dist/types.js.map +1 -1
  184. package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/index.d.ts +1 -0
  185. package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/index.d.ts.map +1 -1
  186. package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/index.js +9 -0
  187. package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/index.js.map +1 -1
  188. package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/radius.d.ts +39 -0
  189. package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/radius.d.ts.map +1 -0
  190. package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/radius.js +413 -0
  191. package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/radius.js.map +1 -0
  192. package/node_modules/@earendil-works/pi-ai/package.json +1 -1
  193. package/node_modules/@earendil-works/pi-pty/native/prebuilds/darwin-arm64/senpi_pty.darwin-arm64.node +0 -0
  194. package/node_modules/@earendil-works/pi-pty/package.json +1 -1
  195. package/node_modules/@earendil-works/pi-tui/package.json +1 -1
  196. package/package.json +6 -6
@@ -1 +1 @@
1
- {"version":3,"file":"provider-display-names.d.ts","sourceRoot":"","sources":["../../src/core/provider-display-names.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,+BAA+B,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAkClE,CAAC"}
1
+ {"version":3,"file":"provider-display-names.d.ts","sourceRoot":"","sources":["../../src/core/provider-display-names.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,+BAA+B,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAmClE,CAAC"}
@@ -23,6 +23,7 @@ export const BUILT_IN_PROVIDER_DISPLAY_NAMES = {
23
23
  "opencode-go": "OpenCode Go",
24
24
  openai: "OpenAI",
25
25
  openrouter: "OpenRouter",
26
+ radius: "Radius",
26
27
  together: "Together AI",
27
28
  "vercel-ai-gateway": "Vercel AI Gateway",
28
29
  xai: "xAI",
@@ -1 +1 @@
1
- {"version":3,"file":"provider-display-names.js","sourceRoot":"","sources":["../../src/core/provider-display-names.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,+BAA+B,GAA2B;IACtE,SAAS,EAAE,WAAW;IACtB,gBAAgB,EAAE,gBAAgB;IAClC,UAAU,EAAE,UAAU;IACtB,wBAAwB,EAAE,wBAAwB;IAClD,QAAQ,EAAE,UAAU;IACpB,uBAAuB,EAAE,uBAAuB;IAChD,uBAAuB,EAAE,uBAAuB;IAChD,QAAQ,EAAE,UAAU;IACpB,SAAS,EAAE,WAAW;IACtB,MAAM,EAAE,eAAe;IACvB,eAAe,EAAE,kBAAkB;IACnC,IAAI,EAAE,MAAM;IACZ,WAAW,EAAE,cAAc;IAC3B,aAAa,EAAE,iBAAiB;IAChC,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,YAAY,EAAE,iBAAiB;IAC/B,UAAU,EAAE,aAAa;IACzB,eAAe,EAAE,qBAAqB;IACtC,MAAM,EAAE,YAAY;IACpB,QAAQ,EAAE,cAAc;IACxB,aAAa,EAAE,aAAa;IAC5B,MAAM,EAAE,QAAQ;IAChB,UAAU,EAAE,YAAY;IACxB,QAAQ,EAAE,aAAa;IACvB,mBAAmB,EAAE,mBAAmB;IACxC,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,0BAA0B;IAC/B,eAAe,EAAE,yBAAyB;IAC1C,MAAM,EAAE,aAAa;IACrB,sBAAsB,EAAE,gCAAgC;IACxD,uBAAuB,EAAE,oCAAoC;IAC7D,uBAAuB,EAAE,oCAAoC;CAC7D,CAAC","sourcesContent":["export const BUILT_IN_PROVIDER_DISPLAY_NAMES: Record<string, string> = {\n\tanthropic: \"Anthropic\",\n\t\"amazon-bedrock\": \"Amazon Bedrock\",\n\t\"ant-ling\": \"Ant Ling\",\n\t\"azure-openai-responses\": \"Azure OpenAI Responses\",\n\tcerebras: \"Cerebras\",\n\t\"cloudflare-ai-gateway\": \"Cloudflare AI Gateway\",\n\t\"cloudflare-workers-ai\": \"Cloudflare Workers AI\",\n\tdeepseek: \"DeepSeek\",\n\tfireworks: \"Fireworks\",\n\tgoogle: \"Google Gemini\",\n\t\"google-vertex\": \"Google Vertex AI\",\n\tgroq: \"Groq\",\n\thuggingface: \"Hugging Face\",\n\t\"kimi-coding\": \"Kimi For Coding\",\n\tmistral: \"Mistral\",\n\tminimax: \"MiniMax\",\n\t\"minimax-cn\": \"MiniMax (China)\",\n\tmoonshotai: \"Moonshot AI\",\n\t\"moonshotai-cn\": \"Moonshot AI (China)\",\n\tnvidia: \"NVIDIA NIM\",\n\topencode: \"OpenCode Zen\",\n\t\"opencode-go\": \"OpenCode Go\",\n\topenai: \"OpenAI\",\n\topenrouter: \"OpenRouter\",\n\ttogether: \"Together AI\",\n\t\"vercel-ai-gateway\": \"Vercel AI Gateway\",\n\txai: \"xAI\",\n\tzai: \"ZAI Coding Plan (Global)\",\n\t\"zai-coding-cn\": \"ZAI Coding Plan (China)\",\n\txiaomi: \"Xiaomi MiMo\",\n\t\"xiaomi-token-plan-cn\": \"Xiaomi MiMo Token Plan (China)\",\n\t\"xiaomi-token-plan-ams\": \"Xiaomi MiMo Token Plan (Amsterdam)\",\n\t\"xiaomi-token-plan-sgp\": \"Xiaomi MiMo Token Plan (Singapore)\",\n};\n"]}
1
+ {"version":3,"file":"provider-display-names.js","sourceRoot":"","sources":["../../src/core/provider-display-names.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,+BAA+B,GAA2B;IACtE,SAAS,EAAE,WAAW;IACtB,gBAAgB,EAAE,gBAAgB;IAClC,UAAU,EAAE,UAAU;IACtB,wBAAwB,EAAE,wBAAwB;IAClD,QAAQ,EAAE,UAAU;IACpB,uBAAuB,EAAE,uBAAuB;IAChD,uBAAuB,EAAE,uBAAuB;IAChD,QAAQ,EAAE,UAAU;IACpB,SAAS,EAAE,WAAW;IACtB,MAAM,EAAE,eAAe;IACvB,eAAe,EAAE,kBAAkB;IACnC,IAAI,EAAE,MAAM;IACZ,WAAW,EAAE,cAAc;IAC3B,aAAa,EAAE,iBAAiB;IAChC,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,YAAY,EAAE,iBAAiB;IAC/B,UAAU,EAAE,aAAa;IACzB,eAAe,EAAE,qBAAqB;IACtC,MAAM,EAAE,YAAY;IACpB,QAAQ,EAAE,cAAc;IACxB,aAAa,EAAE,aAAa;IAC5B,MAAM,EAAE,QAAQ;IAChB,UAAU,EAAE,YAAY;IACxB,MAAM,EAAE,QAAQ;IAChB,QAAQ,EAAE,aAAa;IACvB,mBAAmB,EAAE,mBAAmB;IACxC,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,0BAA0B;IAC/B,eAAe,EAAE,yBAAyB;IAC1C,MAAM,EAAE,aAAa;IACrB,sBAAsB,EAAE,gCAAgC;IACxD,uBAAuB,EAAE,oCAAoC;IAC7D,uBAAuB,EAAE,oCAAoC;CAC7D,CAAC","sourcesContent":["export const BUILT_IN_PROVIDER_DISPLAY_NAMES: Record<string, string> = {\n\tanthropic: \"Anthropic\",\n\t\"amazon-bedrock\": \"Amazon Bedrock\",\n\t\"ant-ling\": \"Ant Ling\",\n\t\"azure-openai-responses\": \"Azure OpenAI Responses\",\n\tcerebras: \"Cerebras\",\n\t\"cloudflare-ai-gateway\": \"Cloudflare AI Gateway\",\n\t\"cloudflare-workers-ai\": \"Cloudflare Workers AI\",\n\tdeepseek: \"DeepSeek\",\n\tfireworks: \"Fireworks\",\n\tgoogle: \"Google Gemini\",\n\t\"google-vertex\": \"Google Vertex AI\",\n\tgroq: \"Groq\",\n\thuggingface: \"Hugging Face\",\n\t\"kimi-coding\": \"Kimi For Coding\",\n\tmistral: \"Mistral\",\n\tminimax: \"MiniMax\",\n\t\"minimax-cn\": \"MiniMax (China)\",\n\tmoonshotai: \"Moonshot AI\",\n\t\"moonshotai-cn\": \"Moonshot AI (China)\",\n\tnvidia: \"NVIDIA NIM\",\n\topencode: \"OpenCode Zen\",\n\t\"opencode-go\": \"OpenCode Go\",\n\topenai: \"OpenAI\",\n\topenrouter: \"OpenRouter\",\n\tradius: \"Radius\",\n\ttogether: \"Together AI\",\n\t\"vercel-ai-gateway\": \"Vercel AI Gateway\",\n\txai: \"xAI\",\n\tzai: \"ZAI Coding Plan (Global)\",\n\t\"zai-coding-cn\": \"ZAI Coding Plan (China)\",\n\txiaomi: \"Xiaomi MiMo\",\n\t\"xiaomi-token-plan-cn\": \"Xiaomi MiMo Token Plan (China)\",\n\t\"xiaomi-token-plan-ams\": \"Xiaomi MiMo Token Plan (Amsterdam)\",\n\t\"xiaomi-token-plan-sgp\": \"Xiaomi MiMo Token Plan (Singapore)\",\n};\n"]}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Radius (pi-messages gateway) provider wiring.
3
+ *
4
+ * The main Radius provider is a built-in OAuth provider in pi-ai; models are
5
+ * dynamic, cached on the stored OAuth credential (`gatewayConfig`) and
6
+ * injected via the OAuth provider's `modifyModels` hook, so startup, /reload,
7
+ * and registry refreshes work without network access. The catalog refreshes
8
+ * on login and on every token refresh.
9
+ *
10
+ * Additional gateways (e.g. a local dev gateway) can be declared in
11
+ * models.json with `"oauth": "radius"`; each entry is an independent Radius
12
+ * instance with its own credentials and catalog.
13
+ */
14
+ export declare const RADIUS_PROVIDER_ID = "radius";
15
+ /**
16
+ * Register a Radius-style OAuth provider for a custom gateway declared in
17
+ * models.json (`"oauth": "radius"`). Runs on every models.json load so the
18
+ * registration survives `resetOAuthProviders()` during registry refreshes.
19
+ */
20
+ export declare function registerCustomRadiusOAuthProvider(id: string, name: string | undefined, gateway: string): void;
21
+ //# sourceMappingURL=radius.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"radius.d.ts","sourceRoot":"","sources":["../../src/core/radius.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAIH,eAAO,MAAM,kBAAkB,WAAW,CAAC;AAE3C;;;;GAIG;AACH,wBAAgB,iCAAiC,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,SAAS,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAU7G"}
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Radius (pi-messages gateway) provider wiring.
3
+ *
4
+ * The main Radius provider is a built-in OAuth provider in pi-ai; models are
5
+ * dynamic, cached on the stored OAuth credential (`gatewayConfig`) and
6
+ * injected via the OAuth provider's `modifyModels` hook, so startup, /reload,
7
+ * and registry refreshes work without network access. The catalog refreshes
8
+ * on login and on every token refresh.
9
+ *
10
+ * Additional gateways (e.g. a local dev gateway) can be declared in
11
+ * models.json with `"oauth": "radius"`; each entry is an independent Radius
12
+ * instance with its own credentials and catalog.
13
+ */
14
+ import { createRadiusOAuthProvider, registerOAuthProvider } from "@earendil-works/pi-ai/oauth";
15
+ export const RADIUS_PROVIDER_ID = "radius";
16
+ /**
17
+ * Register a Radius-style OAuth provider for a custom gateway declared in
18
+ * models.json (`"oauth": "radius"`). Runs on every models.json load so the
19
+ * registration survives `resetOAuthProviders()` during registry refreshes.
20
+ */
21
+ export function registerCustomRadiusOAuthProvider(id, name, gateway) {
22
+ registerOAuthProvider(createRadiusOAuthProvider({
23
+ id,
24
+ name: name ?? id,
25
+ // Tolerate an API base URL: the gateway root is what the OAuth and
26
+ // config discovery endpoints hang off.
27
+ gateway: gateway.replace(/\/v1\/?$/u, ""),
28
+ }));
29
+ }
30
+ //# sourceMappingURL=radius.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"radius.js","sourceRoot":"","sources":["../../src/core/radius.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,yBAAyB,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAE/F,MAAM,CAAC,MAAM,kBAAkB,GAAG,QAAQ,CAAC;AAE3C;;;;GAIG;AACH,MAAM,UAAU,iCAAiC,CAAC,EAAU,EAAE,IAAwB,EAAE,OAAe;IACtG,qBAAqB,CACpB,yBAAyB,CAAC;QACzB,EAAE;QACF,IAAI,EAAE,IAAI,IAAI,EAAE;QAChB,mEAAmE;QACnE,uCAAuC;QACvC,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC;KACzC,CAAC,CACF,CAAC;AACH,CAAC","sourcesContent":["/**\n * Radius (pi-messages gateway) provider wiring.\n *\n * The main Radius provider is a built-in OAuth provider in pi-ai; models are\n * dynamic, cached on the stored OAuth credential (`gatewayConfig`) and\n * injected via the OAuth provider's `modifyModels` hook, so startup, /reload,\n * and registry refreshes work without network access. The catalog refreshes\n * on login and on every token refresh.\n *\n * Additional gateways (e.g. a local dev gateway) can be declared in\n * models.json with `\"oauth\": \"radius\"`; each entry is an independent Radius\n * instance with its own credentials and catalog.\n */\n\nimport { createRadiusOAuthProvider, registerOAuthProvider } from \"@earendil-works/pi-ai/oauth\";\n\nexport const RADIUS_PROVIDER_ID = \"radius\";\n\n/**\n * Register a Radius-style OAuth provider for a custom gateway declared in\n * models.json (`\"oauth\": \"radius\"`). Runs on every models.json load so the\n * registration survives `resetOAuthProviders()` during registry refreshes.\n */\nexport function registerCustomRadiusOAuthProvider(id: string, name: string | undefined, gateway: string): void {\n\tregisterOAuthProvider(\n\t\tcreateRadiusOAuthProvider({\n\t\t\tid,\n\t\t\tname: name ?? id,\n\t\t\t// Tolerate an API base URL: the gateway root is what the OAuth and\n\t\t\t// config discovery endpoints hang off.\n\t\t\tgateway: gateway.replace(/\\/v1\\/?$/u, \"\"),\n\t\t}),\n\t);\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"system-prompt.d.ts","sourceRoot":"","sources":["../../src/core/system-prompt.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAyB,KAAK,KAAK,EAAE,MAAM,aAAa,CAAC;AAEhE,MAAM,WAAW,wBAAwB;IACxC,+CAA+C;IAC/C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,qEAAqE;IACrE,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,0DAA0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E;AAClE,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,wBAAwB,GAAG,MAAM,CAsI3E"}
@@ -6,13 +6,7 @@ import { formatSkillsForPrompt } from "./skills.js";
6
6
  /** Build the system prompt with tools, guidelines, and context */
7
7
  export function buildSystemPrompt(options) {
8
8
  const { customPrompt, selectedTools, toolSnippets, promptGuidelines, appendSystemPrompt, cwd, contextFiles: providedContextFiles, skills: providedSkills, } = options;
9
- const resolvedCwd = cwd;
10
- const promptCwd = resolvedCwd.replace(/\\/g, "/");
11
- const now = new Date();
12
- const year = now.getFullYear();
13
- const month = String(now.getMonth() + 1).padStart(2, "0");
14
- const day = String(now.getDate()).padStart(2, "0");
15
- const date = `${year}-${month}-${day}`;
9
+ const promptCwd = cwd.replace(/\\/g, "/");
16
10
  const appendSection = appendSystemPrompt ? `\n\n${appendSystemPrompt}` : "";
17
11
  const contextFiles = providedContextFiles ?? [];
18
12
  const skills = providedSkills ?? [];
@@ -35,8 +29,6 @@ export function buildSystemPrompt(options) {
35
29
  if (customPromptHasRead && skills.length > 0) {
36
30
  prompt += formatSkillsForPrompt(skills);
37
31
  }
38
- // Add date and working directory last
39
- prompt += `\nCurrent date: ${date}`;
40
32
  prompt += `\nCurrent working directory: ${promptCwd}`;
41
33
  return prompt;
42
34
  }
@@ -112,8 +104,6 @@ Pi documentation (read only when the user asks about pi itself, its SDK, extensi
112
104
  if (hasRead && skills.length > 0) {
113
105
  prompt += formatSkillsForPrompt(skills);
114
106
  }
115
- // Add date and working directory last
116
- prompt += `\nCurrent date: ${date}`;
117
107
  prompt += `\nCurrent working directory: ${promptCwd}`;
118
108
  return prompt;
119
109
  }
@@ -1 +1 @@
1
- {"version":3,"file":"system-prompt.js","sourceRoot":"","sources":["../../src/core/system-prompt.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC3E,OAAO,EAAE,qBAAqB,EAAc,MAA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,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAElE,IAAI,MAAM,GAAG;;;EAGZ,SAAS;;;;;EAKT,UAAU;;;wBAGY,UAAU;qBACb,QAAQ;cACf,YAAY;;;;0GAIgF,CAAC;IAE1G,IAAI,aAAa,EAAE,CAAC;QACnB,MAAM,IAAI,aAAa,CAAC;IACzB,CAAC;IAED,+BAA+B;IAC/B,IAAI,YAAY,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC7B,MAAM,IAAI,2BAA2B,CAAC;QACtC,MAAM,IAAI,mDAAmD,CAAC;QAC9D,KAAK,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,YAAY,EAAE,CAAC;YACxD,MAAM,IAAI,+BAA+B,QAAQ,OAAO,OAAO,+BAA+B,CAAC;QAChG,CAAC;QACD,MAAM,IAAI,sBAAsB,CAAC;IAClC,CAAC;IAED,yDAAyD;IACzD,IAAI,OAAO,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAClC,MAAM,IAAI,qBAAqB,CAAC,MAAM,CAAC,CAAC;IACzC,CAAC;IAED,sCAAsC;IACtC,MAAM,IAAI,mBAAmB,IAAI,EAAE,CAAC;IACpC,MAAM,IAAI,gCAAgC,SAAS,EAAE,CAAC;IAEtD,OAAO,MAAM,CAAC;AACf,CAAC","sourcesContent":["/**\n * System prompt construction and project context loading\n */\n\nimport { getDocsPath, getExamplesPath, getReadmePath } from \"../config.ts\";\nimport { formatSkillsForPrompt, type Skill } from \"./skills.ts\";\n\nexport interface BuildSystemPromptOptions {\n\t/** Custom system prompt (replaces default). */\n\tcustomPrompt?: string;\n\t/** Tools to include in prompt. Default: [read, bash, edit, write] */\n\tselectedTools?: string[];\n\t/** Optional one-line tool snippets keyed by tool name. */\n\ttoolSnippets?: Record<string, string>;\n\t/** Additional guideline bullets appended to the default system prompt guidelines. */\n\tpromptGuidelines?: string[];\n\t/** Text to append to system prompt. */\n\tappendSystemPrompt?: string;\n\t/** Working directory. */\n\tcwd: string;\n\t/** Pre-loaded context files. */\n\tcontextFiles?: Array<{ path: string; content: string }>;\n\t/** Pre-loaded skills. */\n\tskills?: Skill[];\n}\n\n/** Build the system prompt with tools, guidelines, and context */\nexport function buildSystemPrompt(options: BuildSystemPromptOptions): string {\n\tconst {\n\t\tcustomPrompt,\n\t\tselectedTools,\n\t\ttoolSnippets,\n\t\tpromptGuidelines,\n\t\tappendSystemPrompt,\n\t\tcwd,\n\t\tcontextFiles: providedContextFiles,\n\t\tskills: providedSkills,\n\t} = options;\n\tconst resolvedCwd = cwd;\n\tconst promptCwd = resolvedCwd.replace(/\\\\/g, \"/\");\n\n\tconst now = new Date();\n\tconst year = now.getFullYear();\n\tconst month = String(now.getMonth() + 1).padStart(2, \"0\");\n\tconst day = String(now.getDate()).padStart(2, \"0\");\n\tconst date = `${year}-${month}-${day}`;\n\n\tconst appendSection = appendSystemPrompt ? `\\n\\n${appendSystemPrompt}` : \"\";\n\n\tconst contextFiles = providedContextFiles ?? [];\n\tconst skills = providedSkills ?? [];\n\n\tif (customPrompt) {\n\t\tlet prompt = customPrompt;\n\n\t\tif (appendSection) {\n\t\t\tprompt += appendSection;\n\t\t}\n\n\t\t// Append project context files\n\t\tif (contextFiles.length > 0) {\n\t\t\tprompt += \"\\n\\n<project_context>\\n\\n\";\n\t\t\tprompt += \"Project-specific instructions and guidelines:\\n\\n\";\n\t\t\tfor (const { path: filePath, content } of contextFiles) {\n\t\t\t\tprompt += `<project_instructions path=\"${filePath}\">\\n${content}\\n</project_instructions>\\n\\n`;\n\t\t\t}\n\t\t\tprompt += \"</project_context>\\n\";\n\t\t}\n\n\t\t// Append skills section (only if read tool is available)\n\t\tconst customPromptHasRead = !selectedTools || selectedTools.includes(\"read\");\n\t\tif (customPromptHasRead && skills.length > 0) {\n\t\t\tprompt += formatSkillsForPrompt(skills);\n\t\t}\n\n\t\t// Add date and working directory last\n\t\tprompt += `\\nCurrent date: ${date}`;\n\t\tprompt += `\\nCurrent working directory: ${promptCwd}`;\n\n\t\treturn prompt;\n\t}\n\n\t// Get absolute paths to documentation and examples\n\tconst readmePath = getReadmePath();\n\tconst docsPath = getDocsPath();\n\tconst examplesPath = getExamplesPath();\n\n\t// Build tools list based on selected tools.\n\t// A tool appears in Available tools only when the caller provides a one-line snippet.\n\tconst tools = selectedTools || [\"read\", \"bash\", \"edit\", \"write\"];\n\tconst visibleTools = tools.filter((name) => !!toolSnippets?.[name]);\n\tconst toolsList =\n\t\tvisibleTools.length > 0 ? visibleTools.map((name) => `- ${name}: ${toolSnippets![name]}`).join(\"\\n\") : \"(none)\";\n\n\t// Build guidelines based on which tools are actually available\n\tconst guidelinesList: string[] = [];\n\tconst guidelinesSet = new Set<string>();\n\tconst addGuideline = (guideline: string): void => {\n\t\tif (guidelinesSet.has(guideline)) {\n\t\t\treturn;\n\t\t}\n\t\tguidelinesSet.add(guideline);\n\t\tguidelinesList.push(guideline);\n\t};\n\n\tconst hasBash = tools.includes(\"bash\");\n\tconst hasGrep = tools.includes(\"grep\");\n\tconst hasFind = tools.includes(\"find\");\n\tconst hasLs = tools.includes(\"ls\");\n\tconst hasRead = tools.includes(\"read\");\n\n\t// File exploration guidelines\n\tif (hasBash && !hasGrep && !hasFind && !hasLs) {\n\t\taddGuideline(\"Use bash for file operations like ls, rg, find\");\n\t}\n\n\tfor (const guideline of promptGuidelines ?? []) {\n\t\tconst normalized = guideline.trim();\n\t\tif (normalized.length > 0) {\n\t\t\taddGuideline(normalized);\n\t\t}\n\t}\n\n\t// Always include these\n\taddGuideline(\"Be concise in your responses\");\n\taddGuideline(\"Show file paths clearly when working with files\");\n\n\tconst guidelines = guidelinesList.map((g) => `- ${g}`).join(\"\\n\");\n\n\tlet prompt = `You are an expert coding assistant operating inside pi, a coding agent harness. You help users by reading files, executing commands, editing code, and writing new files.\n\nAvailable tools:\n${toolsList}\n\nIn addition to the tools above, you may have access to other custom tools depending on the project.\n\nGuidelines:\n${guidelines}\n\nPi documentation (read only when the user asks about pi itself, its SDK, extensions, themes, skills, or TUI):\n- Main documentation: ${readmePath}\n- Additional docs: ${docsPath}\n- Examples: ${examplesPath} (extensions, custom tools, SDK)\n- When reading pi docs or examples, resolve docs/... under Additional docs and examples/... under Examples, not the current working directory\n- When asked about: extensions (docs/extensions.md, examples/extensions/), themes (docs/themes.md), skills (docs/skills.md), prompt templates (docs/prompt-templates.md), TUI components (docs/tui.md), keybindings (docs/keybindings.md), SDK integrations (docs/sdk.md), custom providers (docs/custom-provider.md), adding models (docs/models.md), pi packages (docs/packages.md)\n- When working on pi topics, read the docs and examples, and follow .md cross-references before implementing\n- Always read pi .md files completely and follow links to related docs (e.g., tui.md for TUI API details)`;\n\n\tif (appendSection) {\n\t\tprompt += appendSection;\n\t}\n\n\t// Append project context files\n\tif (contextFiles.length > 0) {\n\t\tprompt += \"\\n\\n<project_context>\\n\\n\";\n\t\tprompt += \"Project-specific instructions and guidelines:\\n\\n\";\n\t\tfor (const { path: filePath, content } of contextFiles) {\n\t\t\tprompt += `<project_instructions path=\"${filePath}\">\\n${content}\\n</project_instructions>\\n\\n`;\n\t\t}\n\t\tprompt += \"</project_context>\\n\";\n\t}\n\n\t// Append skills section (only if read tool is available)\n\tif (hasRead && skills.length > 0) {\n\t\tprompt += formatSkillsForPrompt(skills);\n\t}\n\n\t// Add date and working directory last\n\tprompt += `\\nCurrent date: ${date}`;\n\tprompt += `\\nCurrent working directory: ${promptCwd}`;\n\n\treturn prompt;\n}\n"]}
1
+ {"version":3,"file":"system-prompt.js","sourceRoot":"","sources":["../../src/core/system-prompt.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC3E,OAAO,EAAE,qBAAqB,EAAc,MAAM,aAAa,CAAC;AAqBhE,kEAAkE;AAClE,MAAM,UAAU,iBAAiB,CAAC,OAAiC;IAClE,MAAM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DAAyD;IACzD,IAAI,OAAO,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAClC,MAAM,IAAI,qBAAqB,CAAC,MAAM,CAAC,CAAC;IACzC,CAAC;IAED,MAAM,IAAI,gCAAgC,SAAS,EAAE,CAAC;IAEtD,OAAO,MAAM,CAAC;AACf,CAAC","sourcesContent":["/**\n * System prompt construction and project context loading\n */\n\nimport { getDocsPath, getExamplesPath, getReadmePath } from \"../config.ts\";\nimport { formatSkillsForPrompt, type Skill } from \"./skills.ts\";\n\nexport interface BuildSystemPromptOptions {\n\t/** Custom system prompt (replaces default). */\n\tcustomPrompt?: string;\n\t/** Tools to include in prompt. Default: [read, bash, edit, write] */\n\tselectedTools?: string[];\n\t/** Optional one-line tool snippets keyed by tool name. */\n\ttoolSnippets?: Record<string, string>;\n\t/** Additional guideline bullets appended to the default system prompt guidelines. */\n\tpromptGuidelines?: string[];\n\t/** Text to append to system prompt. */\n\tappendSystemPrompt?: string;\n\t/** Working directory. */\n\tcwd: string;\n\t/** Pre-loaded context files. */\n\tcontextFiles?: Array<{ path: string; content: string }>;\n\t/** Pre-loaded skills. */\n\tskills?: Skill[];\n}\n\n/** Build the system prompt with tools, guidelines, and context */\nexport function buildSystemPrompt(options: BuildSystemPromptOptions): string {\n\tconst {\n\t\tcustomPrompt,\n\t\tselectedTools,\n\t\ttoolSnippets,\n\t\tpromptGuidelines,\n\t\tappendSystemPrompt,\n\t\tcwd,\n\t\tcontextFiles: providedContextFiles,\n\t\tskills: providedSkills,\n\t} = options;\n\tconst promptCwd = cwd.replace(/\\\\/g, \"/\");\n\n\tconst appendSection = appendSystemPrompt ? `\\n\\n${appendSystemPrompt}` : \"\";\n\n\tconst contextFiles = providedContextFiles ?? [];\n\tconst skills = providedSkills ?? [];\n\n\tif (customPrompt) {\n\t\tlet prompt = customPrompt;\n\n\t\tif (appendSection) {\n\t\t\tprompt += appendSection;\n\t\t}\n\n\t\t// Append project context files\n\t\tif (contextFiles.length > 0) {\n\t\t\tprompt += \"\\n\\n<project_context>\\n\\n\";\n\t\t\tprompt += \"Project-specific instructions and guidelines:\\n\\n\";\n\t\t\tfor (const { path: filePath, content } of contextFiles) {\n\t\t\t\tprompt += `<project_instructions path=\"${filePath}\">\\n${content}\\n</project_instructions>\\n\\n`;\n\t\t\t}\n\t\t\tprompt += \"</project_context>\\n\";\n\t\t}\n\n\t\t// Append skills section (only if read tool is available)\n\t\tconst customPromptHasRead = !selectedTools || selectedTools.includes(\"read\");\n\t\tif (customPromptHasRead && skills.length > 0) {\n\t\t\tprompt += formatSkillsForPrompt(skills);\n\t\t}\n\n\t\tprompt += `\\nCurrent working directory: ${promptCwd}`;\n\n\t\treturn prompt;\n\t}\n\n\t// Get absolute paths to documentation and examples\n\tconst readmePath = getReadmePath();\n\tconst docsPath = getDocsPath();\n\tconst examplesPath = getExamplesPath();\n\n\t// Build tools list based on selected tools.\n\t// A tool appears in Available tools only when the caller provides a one-line snippet.\n\tconst tools = selectedTools || [\"read\", \"bash\", \"edit\", \"write\"];\n\tconst visibleTools = tools.filter((name) => !!toolSnippets?.[name]);\n\tconst toolsList =\n\t\tvisibleTools.length > 0 ? visibleTools.map((name) => `- ${name}: ${toolSnippets![name]}`).join(\"\\n\") : \"(none)\";\n\n\t// Build guidelines based on which tools are actually available\n\tconst guidelinesList: string[] = [];\n\tconst guidelinesSet = new Set<string>();\n\tconst addGuideline = (guideline: string): void => {\n\t\tif (guidelinesSet.has(guideline)) {\n\t\t\treturn;\n\t\t}\n\t\tguidelinesSet.add(guideline);\n\t\tguidelinesList.push(guideline);\n\t};\n\n\tconst hasBash = tools.includes(\"bash\");\n\tconst hasGrep = tools.includes(\"grep\");\n\tconst hasFind = tools.includes(\"find\");\n\tconst hasLs = tools.includes(\"ls\");\n\tconst hasRead = tools.includes(\"read\");\n\n\t// File exploration guidelines\n\tif (hasBash && !hasGrep && !hasFind && !hasLs) {\n\t\taddGuideline(\"Use bash for file operations like ls, rg, find\");\n\t}\n\n\tfor (const guideline of promptGuidelines ?? []) {\n\t\tconst normalized = guideline.trim();\n\t\tif (normalized.length > 0) {\n\t\t\taddGuideline(normalized);\n\t\t}\n\t}\n\n\t// Always include these\n\taddGuideline(\"Be concise in your responses\");\n\taddGuideline(\"Show file paths clearly when working with files\");\n\n\tconst guidelines = guidelinesList.map((g) => `- ${g}`).join(\"\\n\");\n\n\tlet prompt = `You are an expert coding assistant operating inside pi, a coding agent harness. You help users by reading files, executing commands, editing code, and writing new files.\n\nAvailable tools:\n${toolsList}\n\nIn addition to the tools above, you may have access to other custom tools depending on the project.\n\nGuidelines:\n${guidelines}\n\nPi documentation (read only when the user asks about pi itself, its SDK, extensions, themes, skills, or TUI):\n- Main documentation: ${readmePath}\n- Additional docs: ${docsPath}\n- Examples: ${examplesPath} (extensions, custom tools, SDK)\n- When reading pi docs or examples, resolve docs/... under Additional docs and examples/... under Examples, not the current working directory\n- When asked about: extensions (docs/extensions.md, examples/extensions/), themes (docs/themes.md), skills (docs/skills.md), prompt templates (docs/prompt-templates.md), TUI components (docs/tui.md), keybindings (docs/keybindings.md), SDK integrations (docs/sdk.md), custom providers (docs/custom-provider.md), adding models (docs/models.md), pi packages (docs/packages.md)\n- When working on pi topics, read the docs and examples, and follow .md cross-references before implementing\n- Always read pi .md files completely and follow links to related docs (e.g., tui.md for TUI API details)`;\n\n\tif (appendSection) {\n\t\tprompt += appendSection;\n\t}\n\n\t// Append project context files\n\tif (contextFiles.length > 0) {\n\t\tprompt += \"\\n\\n<project_context>\\n\\n\";\n\t\tprompt += \"Project-specific instructions and guidelines:\\n\\n\";\n\t\tfor (const { path: filePath, content } of contextFiles) {\n\t\t\tprompt += `<project_instructions path=\"${filePath}\">\\n${content}\\n</project_instructions>\\n\\n`;\n\t\t}\n\t\tprompt += \"</project_context>\\n\";\n\t}\n\n\t// Append skills section (only if read tool is available)\n\tif (hasRead && skills.length > 0) {\n\t\tprompt += formatSkillsForPrompt(skills);\n\t}\n\n\tprompt += `\\nCurrent working directory: ${promptCwd}`;\n\n\treturn prompt;\n}\n"]}
@@ -4373,8 +4373,8 @@ export class InteractiveMode {
4373
4373
  }
4374
4374
  }
4375
4375
  showLoginAuthTypeSelector(providerOptions) {
4376
- const subscriptionLabel = "Use a subscription";
4377
- const apiKeyLabel = "Use an API key";
4376
+ const subscriptionLabel = "Sign in with an account";
4377
+ const apiKeyLabel = "Sign in with an API key";
4378
4378
  const availableAuthTypes = providerOptions
4379
4379
  ? new Set(providerOptions.map((provider) => provider.authType))
4380
4380
  : new Set(["oauth", "api_key"]);