@code-yeongyu/senpi 2026.7.16 → 2026.7.17-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 (176) hide show
  1. package/CHANGELOG.md +81 -0
  2. package/dist/core/dynamic-prompt/build.d.ts +7 -0
  3. package/dist/core/dynamic-prompt/build.d.ts.map +1 -1
  4. package/dist/core/dynamic-prompt/build.js +5 -0
  5. package/dist/core/dynamic-prompt/build.js.map +1 -1
  6. package/dist/core/dynamic-prompt/workstation.d.ts +35 -0
  7. package/dist/core/dynamic-prompt/workstation.d.ts.map +1 -0
  8. package/dist/core/dynamic-prompt/workstation.js +81 -0
  9. package/dist/core/dynamic-prompt/workstation.js.map +1 -0
  10. package/dist/core/extensions/builtin/anthropic-web-search/index.d.ts +6 -2
  11. package/dist/core/extensions/builtin/anthropic-web-search/index.d.ts.map +1 -1
  12. package/dist/core/extensions/builtin/anthropic-web-search/index.js +73 -5
  13. package/dist/core/extensions/builtin/anthropic-web-search/index.js.map +1 -1
  14. package/dist/core/extensions/builtin/goal/command-registration.d.ts +1 -0
  15. package/dist/core/extensions/builtin/goal/command-registration.d.ts.map +1 -1
  16. package/dist/core/extensions/builtin/goal/command-registration.js +4 -5
  17. package/dist/core/extensions/builtin/goal/command-registration.js.map +1 -1
  18. package/dist/core/extensions/builtin/goal/elapsed-ticker.d.ts +43 -0
  19. package/dist/core/extensions/builtin/goal/elapsed-ticker.d.ts.map +1 -0
  20. package/dist/core/extensions/builtin/goal/elapsed-ticker.js +58 -0
  21. package/dist/core/extensions/builtin/goal/elapsed-ticker.js.map +1 -0
  22. package/dist/core/extensions/builtin/goal/index.d.ts.map +1 -1
  23. package/dist/core/extensions/builtin/goal/index.js +39 -14
  24. package/dist/core/extensions/builtin/goal/index.js.map +1 -1
  25. package/dist/core/extensions/builtin/goal/tool-registration.d.ts +1 -0
  26. package/dist/core/extensions/builtin/goal/tool-registration.d.ts.map +1 -1
  27. package/dist/core/extensions/builtin/goal/tool-registration.js +3 -4
  28. package/dist/core/extensions/builtin/goal/tool-registration.js.map +1 -1
  29. package/dist/core/extensions/builtin/goal/ui.d.ts +2 -2
  30. package/dist/core/extensions/builtin/goal/ui.d.ts.map +1 -1
  31. package/dist/core/extensions/builtin/goal/ui.js +8 -4
  32. package/dist/core/extensions/builtin/goal/ui.js.map +1 -1
  33. package/dist/core/extensions/builtin/mcp/expose/native-search.d.ts +1 -1
  34. package/dist/core/extensions/builtin/mcp/expose/native-search.d.ts.map +1 -1
  35. package/dist/core/extensions/builtin/mcp/expose/native-search.js +1 -1
  36. package/dist/core/extensions/builtin/mcp/expose/native-search.js.map +1 -1
  37. package/dist/core/extensions/builtin/mcp/expose/policy.js +1 -1
  38. package/dist/core/extensions/builtin/mcp/expose/policy.js.map +1 -1
  39. package/dist/core/extensions/builtin/mcp/expose/status.js +1 -1
  40. package/dist/core/extensions/builtin/mcp/expose/status.js.map +1 -1
  41. package/dist/core/extensions/builtin/mcp/expose/tier-b.d.ts +3 -3
  42. package/dist/core/extensions/builtin/mcp/expose/tier-b.d.ts.map +1 -1
  43. package/dist/core/extensions/builtin/mcp/expose/tier-b.js +10 -10
  44. package/dist/core/extensions/builtin/mcp/expose/tier-b.js.map +1 -1
  45. package/dist/core/extensions/builtin/mcp/expose/tool-search.d.ts +3 -3
  46. package/dist/core/extensions/builtin/mcp/expose/tool-search.d.ts.map +1 -1
  47. package/dist/core/extensions/builtin/mcp/expose/tool-search.js +14 -14
  48. package/dist/core/extensions/builtin/mcp/expose/tool-search.js.map +1 -1
  49. package/dist/core/extensions/builtin/mcp/index.js +5 -5
  50. package/dist/core/extensions/builtin/mcp/index.js.map +1 -1
  51. package/dist/core/extensions/builtin/mcp/service.d.ts +2 -2
  52. package/dist/core/extensions/builtin/mcp/service.d.ts.map +1 -1
  53. package/dist/core/extensions/builtin/mcp/service.js +2 -2
  54. package/dist/core/extensions/builtin/mcp/service.js.map +1 -1
  55. package/dist/core/extensions/builtin/prompt-preset/claude-fable-5.d.ts.map +1 -1
  56. package/dist/core/extensions/builtin/prompt-preset/claude-fable-5.js +5 -1
  57. package/dist/core/extensions/builtin/prompt-preset/claude-fable-5.js.map +1 -1
  58. package/dist/core/extensions/builtin/prompt-preset/claude-opus-4-5.d.ts.map +1 -1
  59. package/dist/core/extensions/builtin/prompt-preset/claude-opus-4-5.js +5 -1
  60. package/dist/core/extensions/builtin/prompt-preset/claude-opus-4-5.js.map +1 -1
  61. package/dist/core/extensions/builtin/prompt-preset/claude-opus-4-6.d.ts.map +1 -1
  62. package/dist/core/extensions/builtin/prompt-preset/claude-opus-4-6.js +5 -1
  63. package/dist/core/extensions/builtin/prompt-preset/claude-opus-4-6.js.map +1 -1
  64. package/dist/core/extensions/builtin/prompt-preset/claude-opus-4-7.d.ts.map +1 -1
  65. package/dist/core/extensions/builtin/prompt-preset/claude-opus-4-7.js +5 -1
  66. package/dist/core/extensions/builtin/prompt-preset/claude-opus-4-7.js.map +1 -1
  67. package/dist/core/extensions/builtin/prompt-preset/claude-opus-4-8.d.ts.map +1 -1
  68. package/dist/core/extensions/builtin/prompt-preset/claude-opus-4-8.js +5 -1
  69. package/dist/core/extensions/builtin/prompt-preset/claude-opus-4-8.js.map +1 -1
  70. package/dist/core/extensions/builtin/prompt-preset/glm-5-2.js +1 -1
  71. package/dist/core/extensions/builtin/prompt-preset/glm-5-2.js.map +1 -1
  72. package/dist/core/extensions/builtin/prompt-preset/gpt-5.2.js +1 -1
  73. package/dist/core/extensions/builtin/prompt-preset/gpt-5.2.js.map +1 -1
  74. package/dist/core/extensions/builtin/prompt-preset/gpt-5.3-codex.js +1 -1
  75. package/dist/core/extensions/builtin/prompt-preset/gpt-5.3-codex.js.map +1 -1
  76. package/dist/core/extensions/builtin/prompt-preset/gpt-5.4.js +1 -1
  77. package/dist/core/extensions/builtin/prompt-preset/gpt-5.4.js.map +1 -1
  78. package/dist/core/extensions/builtin/prompt-preset/gpt-5.5.js +1 -1
  79. package/dist/core/extensions/builtin/prompt-preset/gpt-5.5.js.map +1 -1
  80. package/dist/core/extensions/builtin/prompt-preset/gpt-5.6.js +1 -1
  81. package/dist/core/extensions/builtin/prompt-preset/gpt-5.6.js.map +1 -1
  82. package/dist/core/extensions/builtin/prompt-preset/gpt-5.js +1 -1
  83. package/dist/core/extensions/builtin/prompt-preset/gpt-5.js.map +1 -1
  84. package/dist/core/extensions/builtin/prompt-preset/kimi-k2-6.js +1 -1
  85. package/dist/core/extensions/builtin/prompt-preset/kimi-k2-6.js.map +1 -1
  86. package/dist/core/extensions/builtin/prompt-preset/kimi-k2-7.js +1 -1
  87. package/dist/core/extensions/builtin/prompt-preset/kimi-k2-7.js.map +1 -1
  88. package/dist/core/extensions/builtin/prompt-preset/kimi-k3.d.ts +3 -0
  89. package/dist/core/extensions/builtin/prompt-preset/kimi-k3.d.ts.map +1 -0
  90. package/dist/core/extensions/builtin/prompt-preset/kimi-k3.js +14 -0
  91. package/dist/core/extensions/builtin/prompt-preset/kimi-k3.js.map +1 -0
  92. package/dist/core/extensions/builtin/prompt-preset/presets.d.ts.map +1 -1
  93. package/dist/core/extensions/builtin/prompt-preset/presets.js +13 -0
  94. package/dist/core/extensions/builtin/prompt-preset/presets.js.map +1 -1
  95. package/dist/core/extensions/builtin/prompt-preset/settings.d.ts +1 -1
  96. package/dist/core/extensions/builtin/prompt-preset/settings.d.ts.map +1 -1
  97. package/dist/core/extensions/builtin/prompt-preset/settings.js +1 -0
  98. package/dist/core/extensions/builtin/prompt-preset/settings.js.map +1 -1
  99. package/dist/core/extensions/builtin/webfetch/webfetch/renderers.d.ts.map +1 -1
  100. package/dist/core/extensions/builtin/webfetch/webfetch/renderers.js +2 -1
  101. package/dist/core/extensions/builtin/webfetch/webfetch/renderers.js.map +1 -1
  102. package/dist/core/extensions/builtin/webfetch/webfetch/tool.d.ts +27 -0
  103. package/dist/core/extensions/builtin/webfetch/webfetch/tool.d.ts.map +1 -1
  104. package/dist/core/extensions/builtin/webfetch/webfetch/tool.js +60 -1
  105. package/dist/core/extensions/builtin/webfetch/webfetch/tool.js.map +1 -1
  106. package/dist/core/extensions/types.d.ts +5 -0
  107. package/dist/core/extensions/types.d.ts.map +1 -1
  108. package/dist/core/extensions/types.js.map +1 -1
  109. package/dist/core/model-config.d.ts +5 -0
  110. package/dist/core/model-config.d.ts.map +1 -1
  111. package/dist/core/model-config.js +1 -0
  112. package/dist/core/model-config.js.map +1 -1
  113. package/dist/modes/interactive/components/tool-execution-renderer.d.ts.map +1 -1
  114. package/dist/modes/interactive/components/tool-execution-renderer.js +1 -0
  115. package/dist/modes/interactive/components/tool-execution-renderer.js.map +1 -1
  116. package/docs/AGENTS.md +70 -0
  117. package/docs/mcp.md +5 -5
  118. package/docs/settings.md +1 -1
  119. package/examples/AGENTS.md +3 -0
  120. package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
  121. package/examples/extensions/custom-provider-anthropic/package.json +1 -1
  122. package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  123. package/examples/extensions/gondolin/package-lock.json +2 -2
  124. package/examples/extensions/gondolin/package.json +1 -1
  125. package/examples/extensions/sandbox/package-lock.json +2 -2
  126. package/examples/extensions/sandbox/package.json +1 -1
  127. package/examples/extensions/with-deps/package-lock.json +2 -2
  128. package/examples/extensions/with-deps/package.json +1 -1
  129. package/node_modules/@code-yeongyu/senpi-codemode/CHANGELOG.md +49 -0
  130. package/node_modules/@code-yeongyu/senpi-codemode/package.json +3 -3
  131. package/node_modules/@code-yeongyu/senpi-codemode/src/index.ts +59 -19
  132. package/node_modules/@code-yeongyu/senpi-codemode/src/prompt/eval-prompt.ts +68 -2
  133. package/node_modules/@code-yeongyu/senpi-codemode/src/tool/eval-tool.ts +6 -0
  134. package/node_modules/@code-yeongyu/senpi-codemode/src/tool/render.ts +6 -0
  135. package/node_modules/@earendil-works/pi-agent-core/package.json +2 -2
  136. package/node_modules/@earendil-works/pi-ai/README.md +1 -1
  137. package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.d.ts.map +1 -1
  138. package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.js +58 -7
  139. package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.js.map +1 -1
  140. package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.d.ts +2 -1
  141. package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.d.ts.map +1 -1
  142. package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.js +25 -1
  143. package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.js.map +1 -1
  144. package/node_modules/@earendil-works/pi-ai/dist/models.generated.d.ts +70 -131
  145. package/node_modules/@earendil-works/pi-ai/dist/models.generated.d.ts.map +1 -1
  146. package/node_modules/@earendil-works/pi-ai/dist/providers/kimi-coding.models.d.ts +26 -0
  147. package/node_modules/@earendil-works/pi-ai/dist/providers/kimi-coding.models.d.ts.map +1 -1
  148. package/node_modules/@earendil-works/pi-ai/dist/providers/kimi-coding.models.js +6 -0
  149. package/node_modules/@earendil-works/pi-ai/dist/providers/kimi-coding.models.js.map +1 -1
  150. package/node_modules/@earendil-works/pi-ai/dist/providers/moonshotai-cn.models.js +3 -3
  151. package/node_modules/@earendil-works/pi-ai/dist/providers/moonshotai-cn.models.js.map +1 -1
  152. package/node_modules/@earendil-works/pi-ai/dist/providers/moonshotai.models.js +3 -3
  153. package/node_modules/@earendil-works/pi-ai/dist/providers/moonshotai.models.js.map +1 -1
  154. package/node_modules/@earendil-works/pi-ai/dist/providers/opencode-go.models.d.ts +44 -0
  155. package/node_modules/@earendil-works/pi-ai/dist/providers/opencode-go.models.d.ts.map +1 -1
  156. package/node_modules/@earendil-works/pi-ai/dist/providers/opencode-go.models.js +36 -0
  157. package/node_modules/@earendil-works/pi-ai/dist/providers/opencode-go.models.js.map +1 -1
  158. package/node_modules/@earendil-works/pi-ai/dist/providers/openrouter.models.d.ts +0 -21
  159. package/node_modules/@earendil-works/pi-ai/dist/providers/openrouter.models.d.ts.map +1 -1
  160. package/node_modules/@earendil-works/pi-ai/dist/providers/openrouter.models.js +20 -38
  161. package/node_modules/@earendil-works/pi-ai/dist/providers/openrouter.models.js.map +1 -1
  162. package/node_modules/@earendil-works/pi-ai/dist/providers/xai.models.d.ts +0 -110
  163. package/node_modules/@earendil-works/pi-ai/dist/providers/xai.models.d.ts.map +1 -1
  164. package/node_modules/@earendil-works/pi-ai/dist/providers/xai.models.js +0 -90
  165. package/node_modules/@earendil-works/pi-ai/dist/providers/xai.models.js.map +1 -1
  166. package/node_modules/@earendil-works/pi-ai/dist/types.d.ts +14 -0
  167. package/node_modules/@earendil-works/pi-ai/dist/types.d.ts.map +1 -1
  168. package/node_modules/@earendil-works/pi-ai/dist/types.js.map +1 -1
  169. package/node_modules/@earendil-works/pi-ai/dist/utils/tool-schema-compat.d.ts +19 -0
  170. package/node_modules/@earendil-works/pi-ai/dist/utils/tool-schema-compat.d.ts.map +1 -0
  171. package/node_modules/@earendil-works/pi-ai/dist/utils/tool-schema-compat.js +171 -0
  172. package/node_modules/@earendil-works/pi-ai/dist/utils/tool-schema-compat.js.map +1 -0
  173. package/node_modules/@earendil-works/pi-ai/package.json +1 -1
  174. package/node_modules/@earendil-works/pi-pty/package.json +1 -1
  175. package/node_modules/@earendil-works/pi-tui/package.json +1 -1
  176. package/package.json +6 -6
@@ -113,6 +113,7 @@ const AnthropicMessagesCompatSchema = Type.Object({
113
113
  forceAdaptiveThinking: Type.Optional(Type.Boolean()),
114
114
  allowEmptySignature: Type.Optional(Type.Boolean()),
115
115
  supportsToolReferences: Type.Optional(Type.Boolean()),
116
+ supportsWebSearch: Type.Optional(Type.Boolean()),
116
117
  });
117
118
  const ProviderCompatSchema = Type.Union([
118
119
  OpenAICompletionsCompatSchema,
@@ -1 +1 @@
1
- {"version":3,"file":"model-config.js","sourceRoot":"","sources":["../../src/core/model-config.ts"],"names":[],"mappings":"AAAA,wDAAwD;AAExD,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,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GAAG,aAAa,CAAC,cAAc,CAAC,CAAC;QAC3C,IAAI,CAAC;YACJ,OAAO,WAAW,CAAC,KAAK,CAAC,YAAY,CAAC,IAAI,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,CAAC;QAC7D,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YAChB,IAAK,KAA+B,CAAC,IAAI,KAAK,QAAQ;gBAAE,OAAO,IAAI,WAAW,CAAC,IAAI,GAAG,EAAE,CAAC,CAAC;YAC1F,OAAO,IAAI,WAAW,CACrB,IAAI,GAAG,EAAE,EACT,IAAI,GAAG,EAAE,EACT,+BAA+B,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,aAAa,IAAI,EAAE,CAChG,CAAC;QACH,CAAC;IACF,CAAC;IAED,WAAW,CAAC,UAAkB;QAC7B,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IACvC,CAAC;IAED,cAAc;QACb,OAAO,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC,CAAC;IACnC,CAAC;IAED,kBAAkB,CAAC,UAAkB;QACpC,OAAO,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,QAAQ,KAAK,IAAI,CAAC;IACpG,CAAC;IAED,QAAQ;QACP,OAAO,IAAI,CAAC,KAAK,CAAC;IACnB,CAAC;CACD","sourcesContent":["/** Immutable, credential-blind models.json snapshot. */\n\nimport { readFileSync } from \"node:fs\";\nimport { readFile } from \"node:fs/promises\";\nimport { type Static, Type } from \"typebox\";\nimport { Compile } from \"typebox/compile\";\nimport type { TLocalizedValidationError } from \"typebox/error\";\nimport { stripJsonComments } from \"../utils/json.ts\";\nimport { normalizePath } from \"../utils/paths.ts\";\n\nconst PercentileCutoffsSchema = Type.Object({\n\tp50: Type.Optional(Type.Number()),\n\tp75: Type.Optional(Type.Number()),\n\tp90: Type.Optional(Type.Number()),\n\tp99: Type.Optional(Type.Number()),\n});\n\nconst OpenRouterRoutingSchema = Type.Object({\n\tallow_fallbacks: Type.Optional(Type.Boolean()),\n\trequire_parameters: Type.Optional(Type.Boolean()),\n\tdata_collection: Type.Optional(Type.Union([Type.Literal(\"deny\"), Type.Literal(\"allow\")])),\n\tzdr: Type.Optional(Type.Boolean()),\n\tenforce_distillable_text: Type.Optional(Type.Boolean()),\n\torder: Type.Optional(Type.Array(Type.String())),\n\tonly: Type.Optional(Type.Array(Type.String())),\n\tignore: Type.Optional(Type.Array(Type.String())),\n\tquantizations: Type.Optional(Type.Array(Type.String())),\n\tsort: Type.Optional(\n\t\tType.Union([\n\t\t\tType.String(),\n\t\t\tType.Object({\n\t\t\t\tby: Type.Optional(Type.String()),\n\t\t\t\tpartition: Type.Optional(Type.Union([Type.String(), Type.Null()])),\n\t\t\t}),\n\t\t]),\n\t),\n\tmax_price: Type.Optional(\n\t\tType.Object({\n\t\t\tprompt: Type.Optional(Type.Union([Type.Number(), Type.String()])),\n\t\t\tcompletion: Type.Optional(Type.Union([Type.Number(), Type.String()])),\n\t\t\timage: Type.Optional(Type.Union([Type.Number(), Type.String()])),\n\t\t\taudio: Type.Optional(Type.Union([Type.Number(), Type.String()])),\n\t\t\trequest: Type.Optional(Type.Union([Type.Number(), Type.String()])),\n\t\t}),\n\t),\n\tpreferred_min_throughput: Type.Optional(Type.Union([Type.Number(), PercentileCutoffsSchema])),\n\tpreferred_max_latency: Type.Optional(Type.Union([Type.Number(), PercentileCutoffsSchema])),\n});\n\nconst VercelGatewayRoutingSchema = Type.Object({\n\tonly: Type.Optional(Type.Array(Type.String())),\n\torder: Type.Optional(Type.Array(Type.String())),\n});\n\nconst ThinkingLevelMapValueSchema = Type.Union([Type.String(), Type.Null()]);\nconst ThinkingLevelMapSchema = Type.Object({\n\toff: Type.Optional(ThinkingLevelMapValueSchema),\n\tminimal: Type.Optional(ThinkingLevelMapValueSchema),\n\tlow: Type.Optional(ThinkingLevelMapValueSchema),\n\tmedium: Type.Optional(ThinkingLevelMapValueSchema),\n\thigh: Type.Optional(ThinkingLevelMapValueSchema),\n\txhigh: Type.Optional(ThinkingLevelMapValueSchema),\n\tmax: Type.Optional(ThinkingLevelMapValueSchema),\n});\n\nconst ChatTemplateKwargScalarSchema = Type.Union([Type.String(), Type.Number(), Type.Boolean(), Type.Null()]);\nconst ChatTemplateKwargVariableSchema = Type.Object({\n\t$var: Type.Union([Type.Literal(\"thinking.enabled\"), Type.Literal(\"thinking.effort\")]),\n\tomitWhenOff: Type.Optional(Type.Boolean()),\n});\nconst ChatTemplateKwargSchema = Type.Union([ChatTemplateKwargScalarSchema, ChatTemplateKwargVariableSchema]);\n\nconst OpenAICompletionsCompatSchema = Type.Object({\n\tsupportsStore: Type.Optional(Type.Boolean()),\n\tsupportsDeveloperRole: Type.Optional(Type.Boolean()),\n\tsupportsReasoningEffort: Type.Optional(Type.Boolean()),\n\tsupportsUsageInStreaming: Type.Optional(Type.Boolean()),\n\tmaxTokensField: Type.Optional(Type.Union([Type.Literal(\"max_completion_tokens\"), Type.Literal(\"max_tokens\")])),\n\trequiresToolResultName: Type.Optional(Type.Boolean()),\n\trequiresAssistantAfterToolResult: Type.Optional(Type.Boolean()),\n\trequiresThinkingAsText: Type.Optional(Type.Boolean()),\n\trequiresReasoningContentOnAssistantMessages: Type.Optional(Type.Boolean()),\n\tsupportsDisabledThinking: Type.Optional(Type.Boolean()),\n\tthinkingFormat: Type.Optional(\n\t\tType.Union([\n\t\t\tType.Literal(\"openai\"),\n\t\t\tType.Literal(\"openrouter\"),\n\t\t\tType.Literal(\"together\"),\n\t\t\tType.Literal(\"deepseek\"),\n\t\t\tType.Literal(\"zai\"),\n\t\t\tType.Literal(\"qwen\"),\n\t\t\tType.Literal(\"chat-template\"),\n\t\t\tType.Literal(\"qwen-chat-template\"),\n\t\t\tType.Literal(\"string-thinking\"),\n\t\t\tType.Literal(\"ant-ling\"),\n\t\t]),\n\t),\n\tchatTemplateKwargs: Type.Optional(Type.Record(Type.String(), ChatTemplateKwargSchema)),\n\tcacheControlFormat: Type.Optional(Type.Literal(\"anthropic\")),\n\topenRouterRouting: Type.Optional(OpenRouterRoutingSchema),\n\tvercelGatewayRouting: Type.Optional(VercelGatewayRoutingSchema),\n\tzaiToolStream: Type.Optional(Type.Boolean()),\n\tsupportsStrictMode: Type.Optional(Type.Boolean()),\n\ttoolCallFormat: Type.Optional(Type.String()),\n\tsendSessionAffinityHeaders: Type.Optional(Type.Boolean()),\n\tdeferredToolsMode: Type.Optional(Type.Literal(\"kimi\")),\n\tsessionAffinityFormat: Type.Optional(\n\t\tType.Union([Type.Literal(\"openai\"), Type.Literal(\"openai-nosession\"), Type.Literal(\"openrouter\")]),\n\t),\n\tsupportsLongCacheRetention: Type.Optional(Type.Boolean()),\n});\n\nconst OpenAIResponsesCompatSchema = Type.Object({\n\tsupportsDeveloperRole: Type.Optional(Type.Boolean()),\n\tsessionAffinityFormat: Type.Optional(\n\t\tType.Union([Type.Literal(\"openai\"), Type.Literal(\"openai-nosession\"), Type.Literal(\"openrouter\")]),\n\t),\n\tsupportsLongCacheRetention: Type.Optional(Type.Boolean()),\n\tsupportsWebSocket: Type.Optional(Type.Boolean()),\n\tsupportsWebSearchPreview: Type.Optional(Type.Boolean()),\n\tsupportsToolSearch: Type.Optional(Type.Boolean()),\n});\n\nconst AnthropicMessagesCompatSchema = Type.Object({\n\tsupportsEagerToolInputStreaming: Type.Optional(Type.Boolean()),\n\tsupportsLongCacheRetention: Type.Optional(Type.Boolean()),\n\tsendSessionAffinityHeaders: Type.Optional(Type.Boolean()),\n\tsupportsCacheControlOnTools: Type.Optional(Type.Boolean()),\n\tsupportsDisabledThinking: Type.Optional(Type.Boolean()),\n\tsupportsTemperature: Type.Optional(Type.Boolean()),\n\tsupportsToolChoice: Type.Optional(Type.Boolean()),\n\tsupportsForcedToolChoice: Type.Optional(Type.Boolean()),\n\tforceAdaptiveThinking: Type.Optional(Type.Boolean()),\n\tallowEmptySignature: Type.Optional(Type.Boolean()),\n\tsupportsToolReferences: Type.Optional(Type.Boolean()),\n});\n\nconst ProviderCompatSchema = Type.Union([\n\tOpenAICompletionsCompatSchema,\n\tOpenAIResponsesCompatSchema,\n\tAnthropicMessagesCompatSchema,\n]);\n\nconst ModelCostRatesSchema = {\n\tinput: Type.Number(),\n\toutput: Type.Number(),\n\tcacheRead: Type.Number(),\n\tcacheWrite: Type.Number(),\n};\nconst ModelCostTierSchema = Type.Object({\n\tinputTokensAbove: Type.Number(),\n\t...ModelCostRatesSchema,\n});\nconst ModelCostSchema = Type.Object({\n\t...ModelCostRatesSchema,\n\ttiers: Type.Optional(Type.Array(ModelCostTierSchema)),\n});\nconst ExtraBodySchema = Type.Record(Type.String(), Type.Unknown());\n\nconst ModelDefinitionSchema = Type.Object({\n\tid: Type.String({ minLength: 1 }),\n\tname: Type.Optional(Type.String({ minLength: 1 })),\n\tupstreamModelId: Type.Optional(Type.String({ minLength: 1 })),\n\tserviceTier: Type.Optional(Type.Union([Type.Literal(\"auto\"), Type.Literal(\"flex\"), Type.Literal(\"priority\")])),\n\tpromptPreset: Type.Optional(Type.String({ minLength: 1 })),\n\tapi: Type.Optional(Type.String({ minLength: 1 })),\n\tbaseUrl: Type.Optional(Type.String({ minLength: 1 })),\n\treasoning: Type.Optional(Type.Boolean()),\n\tthinkingLevelMap: Type.Optional(ThinkingLevelMapSchema),\n\tinput: Type.Optional(Type.Array(Type.Union([Type.Literal(\"text\"), Type.Literal(\"image\")]))),\n\tcost: Type.Optional(ModelCostSchema),\n\tcontextWindow: Type.Optional(Type.Number()),\n\tmaxTokens: Type.Optional(Type.Number()),\n\theaders: Type.Optional(Type.Record(Type.String(), Type.String())),\n\textraBody: Type.Optional(ExtraBodySchema),\n\tcacheRetention: Type.Optional(Type.Union([Type.Literal(\"none\"), Type.Literal(\"short\"), Type.Literal(\"long\")])),\n\tcompat: Type.Optional(ProviderCompatSchema),\n});\n\nconst ModelOverrideSchema = Type.Object({\n\tname: Type.Optional(Type.String({ minLength: 1 })),\n\tpromptPreset: Type.Optional(Type.String({ minLength: 1 })),\n\treasoning: Type.Optional(Type.Boolean()),\n\tthinkingLevelMap: Type.Optional(ThinkingLevelMapSchema),\n\tthinkingLevelMapMode: Type.Optional(Type.Union([Type.Literal(\"merge\"), Type.Literal(\"replace\")])),\n\tinput: Type.Optional(Type.Array(Type.Union([Type.Literal(\"text\"), Type.Literal(\"image\")]))),\n\tcost: Type.Optional(\n\t\tType.Object({\n\t\t\tinput: Type.Optional(Type.Number()),\n\t\t\toutput: Type.Optional(Type.Number()),\n\t\t\tcacheRead: Type.Optional(Type.Number()),\n\t\t\tcacheWrite: Type.Optional(Type.Number()),\n\t\t\ttiers: Type.Optional(Type.Array(ModelCostTierSchema)),\n\t\t}),\n\t),\n\tcontextWindow: Type.Optional(Type.Number()),\n\tmaxTokens: Type.Optional(Type.Number()),\n\theaders: Type.Optional(Type.Record(Type.String(), Type.String())),\n\textraBody: Type.Optional(ExtraBodySchema),\n\tcacheRetention: Type.Optional(Type.Union([Type.Literal(\"none\"), Type.Literal(\"short\"), Type.Literal(\"long\")])),\n\tcompat: Type.Optional(ProviderCompatSchema),\n});\n\nconst ProviderConfigSchema = Type.Object({\n\tname: Type.Optional(Type.String({ minLength: 1 })),\n\tdisabled: Type.Optional(Type.Boolean()),\n\tbaseUrl: Type.Optional(Type.String({ minLength: 1 })),\n\tapiKey: Type.Optional(Type.String({ minLength: 1 })),\n\tapi: Type.Optional(Type.String({ minLength: 1 })),\n\toauth: Type.Optional(Type.Literal(\"radius\")),\n\theaders: Type.Optional(Type.Record(Type.String(), Type.String())),\n\textraBody: Type.Optional(ExtraBodySchema),\n\tcacheRetention: Type.Optional(Type.Union([Type.Literal(\"none\"), Type.Literal(\"short\"), Type.Literal(\"long\")])),\n\tcompat: Type.Optional(ProviderCompatSchema),\n\tauthHeader: Type.Optional(Type.Boolean()),\n\twhitelist: Type.Optional(Type.Array(Type.String({ minLength: 1 }))),\n\tblacklist: Type.Optional(Type.Array(Type.String({ minLength: 1 }))),\n\tmodels: Type.Optional(Type.Array(ModelDefinitionSchema)),\n\tmodelOverrides: Type.Optional(Type.Record(Type.String(), ModelOverrideSchema)),\n});\n\nconst ModelsConfigSchema = Type.Object({\n\tdisabledProviders: Type.Optional(Type.Array(Type.String({ minLength: 1 }))),\n\tproviders: Type.Record(Type.String(), ProviderConfigSchema),\n});\nconst validateModelsConfig = Compile(ModelsConfigSchema);\n\nexport type ModelsJsonModel = Static<typeof ModelDefinitionSchema>;\nexport type ModelsJsonModelOverride = Static<typeof ModelOverrideSchema>;\nexport type ModelsJsonProvider = Static<typeof ProviderConfigSchema>;\ntype ModelsJson = Static<typeof ModelsConfigSchema>;\n\nfunction formatValidationPath(error: TLocalizedValidationError): string {\n\tif (error.keyword === \"required\") {\n\t\tconst requiredProperties = (error.params as { requiredProperties?: string[] }).requiredProperties;\n\t\tconst requiredProperty = requiredProperties?.[0];\n\t\tif (requiredProperty) {\n\t\t\tconst basePath = error.instancePath.replace(/^\\//, \"\").replace(/\\//g, \".\");\n\t\t\treturn basePath ? `${basePath}.${requiredProperty}` : requiredProperty;\n\t\t}\n\t}\n\tconst path = error.instancePath.replace(/^\\//, \"\").replace(/\\//g, \".\");\n\treturn path || \"root\";\n}\n\nfunction deepFreeze<T>(value: T): T {\n\tif (typeof value !== \"object\" || value === null || Object.isFrozen(value)) return value;\n\tfor (const child of Object.values(value)) deepFreeze(child);\n\treturn Object.freeze(value);\n}\n\n/** One immutable load of models.json. */\nexport class ModelConfig {\n\tprivate readonly providers: ReadonlyMap<string, ModelsJsonProvider>;\n\tprivate readonly disabledProviders: ReadonlySet<string>;\n\tprivate readonly error: string | undefined;\n\n\tprivate constructor(\n\t\tproviders: ReadonlyMap<string, ModelsJsonProvider>,\n\t\tdisabledProviders: ReadonlySet<string> = new Set(),\n\t\terror?: string,\n\t) {\n\t\tthis.providers = providers;\n\t\tthis.disabledProviders = disabledProviders;\n\t\tthis.error = error;\n\t}\n\n\tprivate static parse(content: string, path: string): ModelConfig {\n\t\tlet parsed: unknown;\n\t\ttry {\n\t\t\tparsed = JSON.parse(stripJsonComments(content));\n\t\t} catch (error) {\n\t\t\treturn new ModelConfig(\n\t\t\t\tnew Map(),\n\t\t\t\tnew Set(),\n\t\t\t\t`Failed to parse models.json: ${error instanceof Error ? error.message : error}\\n\\nFile: ${path}`,\n\t\t\t);\n\t\t}\n\n\t\tif (!validateModelsConfig.Check(parsed)) {\n\t\t\tconst errors =\n\t\t\t\tvalidateModelsConfig\n\t\t\t\t\t.Errors(parsed)\n\t\t\t\t\t.map((error) => ` - ${formatValidationPath(error)}: ${error.message}`)\n\t\t\t\t\t.join(\"\\n\") || \"Unknown schema error\";\n\t\t\treturn new ModelConfig(new Map(), new Set(), `Invalid models.json schema:\\n${errors}\\n\\nFile: ${path}`);\n\t\t}\n\n\t\tconst config = parsed as ModelsJson;\n\t\tconst providers = new Map<string, ModelsJsonProvider>();\n\t\tfor (const [providerId, provider] of Object.entries(config.providers)) {\n\t\t\tproviders.set(providerId, deepFreeze(structuredClone(provider)));\n\t\t}\n\t\treturn new ModelConfig(providers, new Set(config.disabledProviders ?? []));\n\t}\n\n\tstatic async load(modelsJsonPath: string | undefined): Promise<ModelConfig> {\n\t\tif (!modelsJsonPath) return new ModelConfig(new Map());\n\t\tconst path = normalizePath(modelsJsonPath);\n\t\tlet content: string;\n\t\ttry {\n\t\t\tcontent = await readFile(path, \"utf-8\");\n\t\t} catch (error) {\n\t\t\tif ((error as NodeJS.ErrnoException).code === \"ENOENT\") return new ModelConfig(new Map());\n\t\t\treturn new ModelConfig(\n\t\t\t\tnew Map(),\n\t\t\t\tnew Set(),\n\t\t\t\t`Failed to load models.json: ${error instanceof Error ? error.message : error}\\n\\nFile: ${path}`,\n\t\t\t);\n\t\t}\n\t\treturn ModelConfig.parse(content, path);\n\t}\n\n\tstatic loadSync(modelsJsonPath: string | undefined): ModelConfig {\n\t\tif (!modelsJsonPath) return new ModelConfig(new Map());\n\t\tconst path = normalizePath(modelsJsonPath);\n\t\ttry {\n\t\t\treturn ModelConfig.parse(readFileSync(path, \"utf-8\"), path);\n\t\t} catch (error) {\n\t\t\tif ((error as NodeJS.ErrnoException).code === \"ENOENT\") return new ModelConfig(new Map());\n\t\t\treturn new ModelConfig(\n\t\t\t\tnew Map(),\n\t\t\t\tnew Set(),\n\t\t\t\t`Failed to load models.json: ${error instanceof Error ? error.message : error}\\n\\nFile: ${path}`,\n\t\t\t);\n\t\t}\n\t}\n\n\tgetProvider(providerId: string): ModelsJsonProvider | undefined {\n\t\treturn this.providers.get(providerId);\n\t}\n\n\tgetProviderIds(): readonly string[] {\n\t\treturn [...this.providers.keys()];\n\t}\n\n\tisProviderDisabled(providerId: string): boolean {\n\t\treturn this.disabledProviders.has(providerId) || this.providers.get(providerId)?.disabled === true;\n\t}\n\n\tgetError(): string | undefined {\n\t\treturn this.error;\n\t}\n}\n"]}
1
+ {"version":3,"file":"model-config.js","sourceRoot":"","sources":["../../src/core/model-config.ts"],"names":[],"mappings":"AAAA,wDAAwD;AAExD,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAe,IAAI,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAE1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,MAAM,uBAAuB,GAAG,IAAI,CAAC,MAAM,CAAC;IAC3C,GAAG,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;IACjC,GAAG,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;IACjC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EAAE,EACT,+BAA+B,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,aAAa,IAAI,EAAE,CAChG,CAAC;QACH,CAAC;IACF,CAAC;IAED,WAAW,CAAC,UAAkB;QAC7B,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IACvC,CAAC;IAED,cAAc;QACb,OAAO,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC,CAAC;IACnC,CAAC;IAED,kBAAkB,CAAC,UAAkB;QACpC,OAAO,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,QAAQ,KAAK,IAAI,CAAC;IACpG,CAAC;IAED,QAAQ;QACP,OAAO,IAAI,CAAC,KAAK,CAAC;IACnB,CAAC;CACD","sourcesContent":["/** Immutable, credential-blind models.json snapshot. */\n\nimport { readFileSync } from \"node:fs\";\nimport { readFile } from \"node:fs/promises\";\nimport { type Static, Type } from \"typebox\";\nimport { Compile } from \"typebox/compile\";\nimport type { TLocalizedValidationError } from \"typebox/error\";\nimport { stripJsonComments } from \"../utils/json.ts\";\nimport { normalizePath } from \"../utils/paths.ts\";\n\nconst PercentileCutoffsSchema = Type.Object({\n\tp50: Type.Optional(Type.Number()),\n\tp75: Type.Optional(Type.Number()),\n\tp90: Type.Optional(Type.Number()),\n\tp99: Type.Optional(Type.Number()),\n});\n\nconst OpenRouterRoutingSchema = Type.Object({\n\tallow_fallbacks: Type.Optional(Type.Boolean()),\n\trequire_parameters: Type.Optional(Type.Boolean()),\n\tdata_collection: Type.Optional(Type.Union([Type.Literal(\"deny\"), Type.Literal(\"allow\")])),\n\tzdr: Type.Optional(Type.Boolean()),\n\tenforce_distillable_text: Type.Optional(Type.Boolean()),\n\torder: Type.Optional(Type.Array(Type.String())),\n\tonly: Type.Optional(Type.Array(Type.String())),\n\tignore: Type.Optional(Type.Array(Type.String())),\n\tquantizations: Type.Optional(Type.Array(Type.String())),\n\tsort: Type.Optional(\n\t\tType.Union([\n\t\t\tType.String(),\n\t\t\tType.Object({\n\t\t\t\tby: Type.Optional(Type.String()),\n\t\t\t\tpartition: Type.Optional(Type.Union([Type.String(), Type.Null()])),\n\t\t\t}),\n\t\t]),\n\t),\n\tmax_price: Type.Optional(\n\t\tType.Object({\n\t\t\tprompt: Type.Optional(Type.Union([Type.Number(), Type.String()])),\n\t\t\tcompletion: Type.Optional(Type.Union([Type.Number(), Type.String()])),\n\t\t\timage: Type.Optional(Type.Union([Type.Number(), Type.String()])),\n\t\t\taudio: Type.Optional(Type.Union([Type.Number(), Type.String()])),\n\t\t\trequest: Type.Optional(Type.Union([Type.Number(), Type.String()])),\n\t\t}),\n\t),\n\tpreferred_min_throughput: Type.Optional(Type.Union([Type.Number(), PercentileCutoffsSchema])),\n\tpreferred_max_latency: Type.Optional(Type.Union([Type.Number(), PercentileCutoffsSchema])),\n});\n\nconst VercelGatewayRoutingSchema = Type.Object({\n\tonly: Type.Optional(Type.Array(Type.String())),\n\torder: Type.Optional(Type.Array(Type.String())),\n});\n\nconst ThinkingLevelMapValueSchema = Type.Union([Type.String(), Type.Null()]);\nconst ThinkingLevelMapSchema = Type.Object({\n\toff: Type.Optional(ThinkingLevelMapValueSchema),\n\tminimal: Type.Optional(ThinkingLevelMapValueSchema),\n\tlow: Type.Optional(ThinkingLevelMapValueSchema),\n\tmedium: Type.Optional(ThinkingLevelMapValueSchema),\n\thigh: Type.Optional(ThinkingLevelMapValueSchema),\n\txhigh: Type.Optional(ThinkingLevelMapValueSchema),\n\tmax: Type.Optional(ThinkingLevelMapValueSchema),\n});\n\nconst ChatTemplateKwargScalarSchema = Type.Union([Type.String(), Type.Number(), Type.Boolean(), Type.Null()]);\nconst ChatTemplateKwargVariableSchema = Type.Object({\n\t$var: Type.Union([Type.Literal(\"thinking.enabled\"), Type.Literal(\"thinking.effort\")]),\n\tomitWhenOff: Type.Optional(Type.Boolean()),\n});\nconst ChatTemplateKwargSchema = Type.Union([ChatTemplateKwargScalarSchema, ChatTemplateKwargVariableSchema]);\n\nconst OpenAICompletionsCompatSchema = Type.Object({\n\tsupportsStore: Type.Optional(Type.Boolean()),\n\tsupportsDeveloperRole: Type.Optional(Type.Boolean()),\n\tsupportsReasoningEffort: Type.Optional(Type.Boolean()),\n\tsupportsUsageInStreaming: Type.Optional(Type.Boolean()),\n\tmaxTokensField: Type.Optional(Type.Union([Type.Literal(\"max_completion_tokens\"), Type.Literal(\"max_tokens\")])),\n\trequiresToolResultName: Type.Optional(Type.Boolean()),\n\trequiresAssistantAfterToolResult: Type.Optional(Type.Boolean()),\n\trequiresThinkingAsText: Type.Optional(Type.Boolean()),\n\trequiresReasoningContentOnAssistantMessages: Type.Optional(Type.Boolean()),\n\tsupportsDisabledThinking: Type.Optional(Type.Boolean()),\n\tthinkingFormat: Type.Optional(\n\t\tType.Union([\n\t\t\tType.Literal(\"openai\"),\n\t\t\tType.Literal(\"openrouter\"),\n\t\t\tType.Literal(\"together\"),\n\t\t\tType.Literal(\"deepseek\"),\n\t\t\tType.Literal(\"zai\"),\n\t\t\tType.Literal(\"qwen\"),\n\t\t\tType.Literal(\"chat-template\"),\n\t\t\tType.Literal(\"qwen-chat-template\"),\n\t\t\tType.Literal(\"string-thinking\"),\n\t\t\tType.Literal(\"ant-ling\"),\n\t\t]),\n\t),\n\tchatTemplateKwargs: Type.Optional(Type.Record(Type.String(), ChatTemplateKwargSchema)),\n\tcacheControlFormat: Type.Optional(Type.Literal(\"anthropic\")),\n\topenRouterRouting: Type.Optional(OpenRouterRoutingSchema),\n\tvercelGatewayRouting: Type.Optional(VercelGatewayRoutingSchema),\n\tzaiToolStream: Type.Optional(Type.Boolean()),\n\tsupportsStrictMode: Type.Optional(Type.Boolean()),\n\ttoolCallFormat: Type.Optional(Type.String()),\n\tsendSessionAffinityHeaders: Type.Optional(Type.Boolean()),\n\tdeferredToolsMode: Type.Optional(Type.Literal(\"kimi\")),\n\tsessionAffinityFormat: Type.Optional(\n\t\tType.Union([Type.Literal(\"openai\"), Type.Literal(\"openai-nosession\"), Type.Literal(\"openrouter\")]),\n\t),\n\tsupportsLongCacheRetention: Type.Optional(Type.Boolean()),\n});\n\nconst OpenAIResponsesCompatSchema = Type.Object({\n\tsupportsDeveloperRole: Type.Optional(Type.Boolean()),\n\tsessionAffinityFormat: Type.Optional(\n\t\tType.Union([Type.Literal(\"openai\"), Type.Literal(\"openai-nosession\"), Type.Literal(\"openrouter\")]),\n\t),\n\tsupportsLongCacheRetention: Type.Optional(Type.Boolean()),\n\tsupportsWebSocket: Type.Optional(Type.Boolean()),\n\tsupportsWebSearchPreview: Type.Optional(Type.Boolean()),\n\tsupportsToolSearch: Type.Optional(Type.Boolean()),\n});\n\nconst AnthropicMessagesCompatSchema = Type.Object({\n\tsupportsEagerToolInputStreaming: Type.Optional(Type.Boolean()),\n\tsupportsLongCacheRetention: Type.Optional(Type.Boolean()),\n\tsendSessionAffinityHeaders: Type.Optional(Type.Boolean()),\n\tsupportsCacheControlOnTools: Type.Optional(Type.Boolean()),\n\tsupportsDisabledThinking: Type.Optional(Type.Boolean()),\n\tsupportsTemperature: Type.Optional(Type.Boolean()),\n\tsupportsToolChoice: Type.Optional(Type.Boolean()),\n\tsupportsForcedToolChoice: Type.Optional(Type.Boolean()),\n\tforceAdaptiveThinking: Type.Optional(Type.Boolean()),\n\tallowEmptySignature: Type.Optional(Type.Boolean()),\n\tsupportsToolReferences: Type.Optional(Type.Boolean()),\n\tsupportsWebSearch: Type.Optional(Type.Boolean()),\n});\n\nconst ProviderCompatSchema = Type.Union([\n\tOpenAICompletionsCompatSchema,\n\tOpenAIResponsesCompatSchema,\n\tAnthropicMessagesCompatSchema,\n]);\n\nconst ModelCostRatesSchema = {\n\tinput: Type.Number(),\n\toutput: Type.Number(),\n\tcacheRead: Type.Number(),\n\tcacheWrite: Type.Number(),\n};\nconst ModelCostTierSchema = Type.Object({\n\tinputTokensAbove: Type.Number(),\n\t...ModelCostRatesSchema,\n});\nconst ModelCostSchema = Type.Object({\n\t...ModelCostRatesSchema,\n\ttiers: Type.Optional(Type.Array(ModelCostTierSchema)),\n});\nconst ExtraBodySchema = Type.Record(Type.String(), Type.Unknown());\n\nconst ModelDefinitionSchema = Type.Object({\n\tid: Type.String({ minLength: 1 }),\n\tname: Type.Optional(Type.String({ minLength: 1 })),\n\tupstreamModelId: Type.Optional(Type.String({ minLength: 1 })),\n\tserviceTier: Type.Optional(Type.Union([Type.Literal(\"auto\"), Type.Literal(\"flex\"), Type.Literal(\"priority\")])),\n\tpromptPreset: Type.Optional(Type.String({ minLength: 1 })),\n\tapi: Type.Optional(Type.String({ minLength: 1 })),\n\tbaseUrl: Type.Optional(Type.String({ minLength: 1 })),\n\treasoning: Type.Optional(Type.Boolean()),\n\tthinkingLevelMap: Type.Optional(ThinkingLevelMapSchema),\n\tinput: Type.Optional(Type.Array(Type.Union([Type.Literal(\"text\"), Type.Literal(\"image\")]))),\n\tcost: Type.Optional(ModelCostSchema),\n\tcontextWindow: Type.Optional(Type.Number()),\n\tmaxTokens: Type.Optional(Type.Number()),\n\theaders: Type.Optional(Type.Record(Type.String(), Type.String())),\n\textraBody: Type.Optional(ExtraBodySchema),\n\tcacheRetention: Type.Optional(Type.Union([Type.Literal(\"none\"), Type.Literal(\"short\"), Type.Literal(\"long\")])),\n\tcompat: Type.Optional(ProviderCompatSchema),\n});\n\nconst ModelOverrideSchema = Type.Object({\n\tname: Type.Optional(Type.String({ minLength: 1 })),\n\tpromptPreset: Type.Optional(Type.String({ minLength: 1 })),\n\treasoning: Type.Optional(Type.Boolean()),\n\tthinkingLevelMap: Type.Optional(ThinkingLevelMapSchema),\n\tthinkingLevelMapMode: Type.Optional(Type.Union([Type.Literal(\"merge\"), Type.Literal(\"replace\")])),\n\tinput: Type.Optional(Type.Array(Type.Union([Type.Literal(\"text\"), Type.Literal(\"image\")]))),\n\tcost: Type.Optional(\n\t\tType.Object({\n\t\t\tinput: Type.Optional(Type.Number()),\n\t\t\toutput: Type.Optional(Type.Number()),\n\t\t\tcacheRead: Type.Optional(Type.Number()),\n\t\t\tcacheWrite: Type.Optional(Type.Number()),\n\t\t\ttiers: Type.Optional(Type.Array(ModelCostTierSchema)),\n\t\t}),\n\t),\n\tcontextWindow: Type.Optional(Type.Number()),\n\tmaxTokens: Type.Optional(Type.Number()),\n\theaders: Type.Optional(Type.Record(Type.String(), Type.String())),\n\textraBody: Type.Optional(ExtraBodySchema),\n\tcacheRetention: Type.Optional(Type.Union([Type.Literal(\"none\"), Type.Literal(\"short\"), Type.Literal(\"long\")])),\n\tcompat: Type.Optional(ProviderCompatSchema),\n});\n\nconst ProviderConfigSchema = Type.Object({\n\tname: Type.Optional(Type.String({ minLength: 1 })),\n\tdisabled: Type.Optional(Type.Boolean()),\n\tbaseUrl: Type.Optional(Type.String({ minLength: 1 })),\n\tapiKey: Type.Optional(Type.String({ minLength: 1 })),\n\tapi: Type.Optional(Type.String({ minLength: 1 })),\n\toauth: Type.Optional(Type.Literal(\"radius\")),\n\theaders: Type.Optional(Type.Record(Type.String(), Type.String())),\n\textraBody: Type.Optional(ExtraBodySchema),\n\tcacheRetention: Type.Optional(Type.Union([Type.Literal(\"none\"), Type.Literal(\"short\"), Type.Literal(\"long\")])),\n\tcompat: Type.Optional(ProviderCompatSchema),\n\tauthHeader: Type.Optional(Type.Boolean()),\n\twhitelist: Type.Optional(Type.Array(Type.String({ minLength: 1 }))),\n\tblacklist: Type.Optional(Type.Array(Type.String({ minLength: 1 }))),\n\tmodels: Type.Optional(Type.Array(ModelDefinitionSchema)),\n\tmodelOverrides: Type.Optional(Type.Record(Type.String(), ModelOverrideSchema)),\n});\n\nconst ModelsConfigSchema = Type.Object({\n\tdisabledProviders: Type.Optional(Type.Array(Type.String({ minLength: 1 }))),\n\tproviders: Type.Record(Type.String(), ProviderConfigSchema),\n});\nconst validateModelsConfig = Compile(ModelsConfigSchema);\n\nexport type ModelsJsonModel = Static<typeof ModelDefinitionSchema>;\nexport type ModelsJsonModelOverride = Static<typeof ModelOverrideSchema>;\nexport type ModelsJsonProvider = Static<typeof ProviderConfigSchema>;\ntype ModelsJson = Static<typeof ModelsConfigSchema>;\n\nfunction formatValidationPath(error: TLocalizedValidationError): string {\n\tif (error.keyword === \"required\") {\n\t\tconst requiredProperties = (error.params as { requiredProperties?: string[] }).requiredProperties;\n\t\tconst requiredProperty = requiredProperties?.[0];\n\t\tif (requiredProperty) {\n\t\t\tconst basePath = error.instancePath.replace(/^\\//, \"\").replace(/\\//g, \".\");\n\t\t\treturn basePath ? `${basePath}.${requiredProperty}` : requiredProperty;\n\t\t}\n\t}\n\tconst path = error.instancePath.replace(/^\\//, \"\").replace(/\\//g, \".\");\n\treturn path || \"root\";\n}\n\nfunction deepFreeze<T>(value: T): T {\n\tif (typeof value !== \"object\" || value === null || Object.isFrozen(value)) return value;\n\tfor (const child of Object.values(value)) deepFreeze(child);\n\treturn Object.freeze(value);\n}\n\n/** One immutable load of models.json. */\nexport class ModelConfig {\n\tprivate readonly providers: ReadonlyMap<string, ModelsJsonProvider>;\n\tprivate readonly disabledProviders: ReadonlySet<string>;\n\tprivate readonly error: string | undefined;\n\n\tprivate constructor(\n\t\tproviders: ReadonlyMap<string, ModelsJsonProvider>,\n\t\tdisabledProviders: ReadonlySet<string> = new Set(),\n\t\terror?: string,\n\t) {\n\t\tthis.providers = providers;\n\t\tthis.disabledProviders = disabledProviders;\n\t\tthis.error = error;\n\t}\n\n\tprivate static parse(content: string, path: string): ModelConfig {\n\t\tlet parsed: unknown;\n\t\ttry {\n\t\t\tparsed = JSON.parse(stripJsonComments(content));\n\t\t} catch (error) {\n\t\t\treturn new ModelConfig(\n\t\t\t\tnew Map(),\n\t\t\t\tnew Set(),\n\t\t\t\t`Failed to parse models.json: ${error instanceof Error ? error.message : error}\\n\\nFile: ${path}`,\n\t\t\t);\n\t\t}\n\n\t\tif (!validateModelsConfig.Check(parsed)) {\n\t\t\tconst errors =\n\t\t\t\tvalidateModelsConfig\n\t\t\t\t\t.Errors(parsed)\n\t\t\t\t\t.map((error) => ` - ${formatValidationPath(error)}: ${error.message}`)\n\t\t\t\t\t.join(\"\\n\") || \"Unknown schema error\";\n\t\t\treturn new ModelConfig(new Map(), new Set(), `Invalid models.json schema:\\n${errors}\\n\\nFile: ${path}`);\n\t\t}\n\n\t\tconst config = parsed as ModelsJson;\n\t\tconst providers = new Map<string, ModelsJsonProvider>();\n\t\tfor (const [providerId, provider] of Object.entries(config.providers)) {\n\t\t\tproviders.set(providerId, deepFreeze(structuredClone(provider)));\n\t\t}\n\t\treturn new ModelConfig(providers, new Set(config.disabledProviders ?? []));\n\t}\n\n\tstatic async load(modelsJsonPath: string | undefined): Promise<ModelConfig> {\n\t\tif (!modelsJsonPath) return new ModelConfig(new Map());\n\t\tconst path = normalizePath(modelsJsonPath);\n\t\tlet content: string;\n\t\ttry {\n\t\t\tcontent = await readFile(path, \"utf-8\");\n\t\t} catch (error) {\n\t\t\tif ((error as NodeJS.ErrnoException).code === \"ENOENT\") return new ModelConfig(new Map());\n\t\t\treturn new ModelConfig(\n\t\t\t\tnew Map(),\n\t\t\t\tnew Set(),\n\t\t\t\t`Failed to load models.json: ${error instanceof Error ? error.message : error}\\n\\nFile: ${path}`,\n\t\t\t);\n\t\t}\n\t\treturn ModelConfig.parse(content, path);\n\t}\n\n\tstatic loadSync(modelsJsonPath: string | undefined): ModelConfig {\n\t\tif (!modelsJsonPath) return new ModelConfig(new Map());\n\t\tconst path = normalizePath(modelsJsonPath);\n\t\ttry {\n\t\t\treturn ModelConfig.parse(readFileSync(path, \"utf-8\"), path);\n\t\t} catch (error) {\n\t\t\tif ((error as NodeJS.ErrnoException).code === \"ENOENT\") return new ModelConfig(new Map());\n\t\t\treturn new ModelConfig(\n\t\t\t\tnew Map(),\n\t\t\t\tnew Set(),\n\t\t\t\t`Failed to load models.json: ${error instanceof Error ? error.message : error}\\n\\nFile: ${path}`,\n\t\t\t);\n\t\t}\n\t}\n\n\tgetProvider(providerId: string): ModelsJsonProvider | undefined {\n\t\treturn this.providers.get(providerId);\n\t}\n\n\tgetProviderIds(): readonly string[] {\n\t\treturn [...this.providers.keys()];\n\t}\n\n\tisProviderDisabled(providerId: string): boolean {\n\t\treturn this.disabledProviders.has(providerId) || this.providers.get(providerId)?.disabled === true;\n\t}\n\n\tgetError(): string | undefined {\n\t\treturn this.error;\n\t}\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"tool-execution-renderer.d.ts","sourceRoot":"","sources":["../../../../src/modes/interactive/components/tool-execution-renderer.ts"],"names":[],"mappings":"AACA,OAAO,EAAuB,SAAS,EAAyB,MAAM,wBAAwB,CAAC;AAS/F,OAAO,KAAK,EAAE,qBAAqB,EAAE,wBAAwB,EAAuB,MAAM,2BAA2B,CAAC;AAMtH,qBAAa,qBAAsB,SAAQ,SAAS;IACnD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAwB;IACjD,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAsB;IACxD,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAM;IACjC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAO;IACnC,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAmB;IACvD,OAAO,CAAC,QAAQ,CAAC,aAAa,CAA+B;IAC7D,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAa;IAC1C,OAAO,CAAC,KAAK,CAA2B;IACxC,OAAO,CAAC,qBAAqB,CAAC,CAAY;IAC1C,OAAO,CAAC,uBAAuB,CAAC,CAAY;IAE5C,YAAY,QAAQ,EAAE,qBAAqB,EAAE,KAAK,EAAE,wBAAwB,EAAE,YAAY,EAAE,MAAM,IAAI,EAerG;IAED,IAAI,qBAAqB,IAAI,OAAO,CAEnC;IAED,IAAI,iBAAiB,IAAI,OAAO,CAE/B;IAED,IAAI,WAAW,IAAI,SAAS,GAAG,MAAM,CAGpC;IAED,MAAM,CAAC,KAAK,EAAE,wBAAwB,GAAG,IAAI,CAqB5C;IAED,OAAO,CAAC,eAAe;IAIvB,OAAO,CAAC,iBAAiB;IAIzB,OAAO,CAAC,gBAAgB;IAmBxB,OAAO,CAAC,UAAU;IAgBlB,OAAO,CAAC,YAAY;IAsBpB,OAAO,CAAC,oBAAoB;IAmB5B,OAAO,CAAC,oBAAoB;IAI5B,OAAO,CAAC,oBAAoB;CAI5B"}
1
+ {"version":3,"file":"tool-execution-renderer.d.ts","sourceRoot":"","sources":["../../../../src/modes/interactive/components/tool-execution-renderer.ts"],"names":[],"mappings":"AACA,OAAO,EAAuB,SAAS,EAAyB,MAAM,wBAAwB,CAAC;AAS/F,OAAO,KAAK,EAAE,qBAAqB,EAAE,wBAAwB,EAAuB,MAAM,2BAA2B,CAAC;AAMtH,qBAAa,qBAAsB,SAAQ,SAAS;IACnD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAwB;IACjD,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAsB;IACxD,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAM;IACjC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAO;IACnC,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAmB;IACvD,OAAO,CAAC,QAAQ,CAAC,aAAa,CAA+B;IAC7D,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAa;IAC1C,OAAO,CAAC,KAAK,CAA2B;IACxC,OAAO,CAAC,qBAAqB,CAAC,CAAY;IAC1C,OAAO,CAAC,uBAAuB,CAAC,CAAY;IAE5C,YAAY,QAAQ,EAAE,qBAAqB,EAAE,KAAK,EAAE,wBAAwB,EAAE,YAAY,EAAE,MAAM,IAAI,EAerG;IAED,IAAI,qBAAqB,IAAI,OAAO,CAEnC;IAED,IAAI,iBAAiB,IAAI,OAAO,CAE/B;IAED,IAAI,WAAW,IAAI,SAAS,GAAG,MAAM,CAGpC;IAED,MAAM,CAAC,KAAK,EAAE,wBAAwB,GAAG,IAAI,CAqB5C;IAED,OAAO,CAAC,eAAe;IAIvB,OAAO,CAAC,iBAAiB;IAIzB,OAAO,CAAC,gBAAgB;IAoBxB,OAAO,CAAC,UAAU;IAgBlB,OAAO,CAAC,YAAY;IAsBpB,OAAO,CAAC,oBAAoB;IAmB5B,OAAO,CAAC,oBAAoB;IAI5B,OAAO,CAAC,oBAAoB;CAI5B"}
@@ -71,6 +71,7 @@ export class ToolExecutionRenderer extends Container {
71
71
  showImages: this.state.showImages,
72
72
  imageProtocol: getCapabilities().images,
73
73
  isError: this.state.result?.isError ?? false,
74
+ hasResult: this.state.result !== undefined,
74
75
  spinnerFrame: this.state.spinnerFrame,
75
76
  };
76
77
  }
@@ -1 +1 @@
1
- {"version":3,"file":"tool-execution-renderer.js","sourceRoot":"","sources":["../../../../src/modes/interactive/components/tool-execution-renderer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAkB,SAAS,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE/F,OAAO,EAAE,wBAAwB,EAA+B,MAAM,8BAA8B,CAAC;AACrG,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EACN,sBAAsB,EACtB,wBAAwB,EACxB,2BAA2B,GAC3B,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAKhF,MAAM,OAAO,qBAAsB,SAAQ,SAAS;IAYnD,YAAY,QAA+B,EAAE,KAA+B,EAAE,YAAwB;QACrG,KAAK,EAAE,CAAC;QARQ,wBAAmB,GAAG,IAAI,SAAS,EAAE,CAAC;QACtC,kBAAa,GAA4B,EAAE,CAAC;QAQ5D,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,iBAAi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AK,CAAC,EAAE,CAAC;YACzB,IAAI,CAAC,oBAAoB,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;YAC3C,IAAI,QAAQ;gBAAE,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;YAC3C,OAAO;QACR,CAAC;QACD,IAAI,CAAC,oBAAoB,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QACvC,SAAS,CAAC,QAAQ,CACjB,IAAI,oBAAoB,CAAC,KAAK,EAAE,QAAQ,EAAE,GAAG,EAAE;YAC9C,IAAI,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,KAAK,KAAK;gBAAE,IAAI,CAAC,oBAAoB,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;QAC3F,CAAC,CAAC,CACF,CAAC;IACH,CAAC;IAEO,oBAAoB,CAAC,IAAkB;QAC9C,OAAO,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC,CAAC,IAAI,CAAC,uBAAuB,CAAC;IACpF,CAAC;IAEO,oBAAoB,CAAC,IAAkB,EAAE,SAAgC;QAChF,IAAI,IAAI,KAAK,MAAM;YAAE,IAAI,CAAC,qBAAqB,GAAG,SAAS,CAAC;;YACvD,IAAI,CAAC,uBAAuB,GAAG,SAAS,CAAC;IAC/C,CAAC;CACD","sourcesContent":["import type { AgentToolResult } from \"@earendil-works/pi-agent-core\";\nimport { Box, type Component, Container, getCapabilities, Text } from \"@earendil-works/pi-tui\";\nimport type { ToolRenderContext } from \"../../../core/extensions/types.ts\";\nimport { createAllToolDefinitions, type ToolDef, type ToolName } from \"../../../core/tools/index.ts\";\nimport { theme } from \"../theme/theme.ts\";\nimport {\n\tcreateToolCallFallback,\n\tcreateToolResultFallback,\n\tformatToolExecutionFallback,\n} from \"./tool-execution-fallback.ts\";\nimport type { ToolExecutionIdentity, ToolExecutionRenderState, ToolExecutionResult } from \"./tool-execution-types.ts\";\nimport { isComponent, ToolRendererBoundary } from \"./tool-renderer-boundary.ts\";\n\ntype RenderContainer = Box | Container;\ntype RendererSlot = \"call\" | \"result\";\n\nexport class ToolExecutionRenderer extends Container {\n\tprivate readonly identity: ToolExecutionIdentity;\n\tprivate readonly builtInDefinition: ToolDef | undefined;\n\tprivate readonly contentBox: Box;\n\tprivate readonly contentText: Text;\n\tprivate readonly selfRenderContainer = new Container();\n\tprivate readonly rendererState: Record<string, unknown> = {};\n\tprivate readonly onInvalidate: () => void;\n\tprivate state: ToolExecutionRenderState;\n\tprivate callRendererComponent?: Component;\n\tprivate resultRendererComponent?: Component;\n\n\tconstructor(identity: ToolExecutionIdentity, state: ToolExecutionRenderState, onInvalidate: () => void) {\n\t\tsuper();\n\t\tthis.identity = identity;\n\t\tthis.state = state;\n\t\tthis.onInvalidate = onInvalidate;\n\t\tthis.builtInDefinition = createAllToolDefinitions(identity.cwd)[identity.toolName as ToolName];\n\t\tthis.contentBox = new Box(1, 1, (text: string) => theme.bg(\"toolPendingBg\", text));\n\t\tthis.contentText = new Text(\"\", 1, 1, (text: string) => theme.bg(\"toolPendingBg\", text));\n\t\tthis.addChild(\n\t\t\tthis.hasRendererDefinition\n\t\t\t\t? this.renderShell === \"self\"\n\t\t\t\t\t? this.selfRenderContainer\n\t\t\t\t\t: this.contentBox\n\t\t\t\t: this.contentText,\n\t\t);\n\t}\n\n\tget hasRendererDefinition(): boolean {\n\t\treturn this.builtInDefinition !== undefined || this.identity.toolDefinition !== undefined;\n\t}\n\n\tget hasResultRenderer(): boolean {\n\t\treturn this.getResultRenderer() !== undefined;\n\t}\n\n\tget renderShell(): \"default\" | \"self\" {\n\t\tconst customShell = this.identity.toolDefinition?.renderShell;\n\t\treturn customShell ?? this.builtInDefinition?.renderShell ?? \"default\";\n\t}\n\n\tupdate(state: ToolExecutionRenderState): void {\n\t\tthis.state = state;\n\t\tconst background = state.isPartial\n\t\t\t? (text: string) => theme.bg(\"toolPendingBg\", text)\n\t\t\t: state.result?.isError\n\t\t\t\t? (text: string) => theme.bg(\"toolErrorBg\", text)\n\t\t\t\t: (text: string) => theme.bg(\"toolSuccessBg\", text);\n\n\t\tif (!this.hasRendererDefinition) {\n\t\t\tthis.contentText.setCustomBgFn(background);\n\t\t\tthis.contentText.setText(\n\t\t\t\tformatToolExecutionFallback(this.identity.toolName, state.args, state.result, state.showImages),\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\n\t\tconst container = this.renderShell === \"self\" ? this.selfRenderContainer : this.contentBox;\n\t\tif (container instanceof Box) container.setBgFn(background);\n\t\tcontainer.detachAll();\n\t\tthis.renderCall(container);\n\t\tif (state.result) this.renderResult(container, state.result);\n\t}\n\n\tprivate getCallRenderer(): ToolDef[\"renderCall\"] | undefined {\n\t\treturn this.identity.toolDefinition?.renderCall ?? this.builtInDefinition?.renderCall;\n\t}\n\n\tprivate getResultRenderer(): ToolDef[\"renderResult\"] | undefined {\n\t\treturn this.identity.toolDefinition?.renderResult ?? this.builtInDefinition?.renderResult;\n\t}\n\n\tprivate getRenderContext(lastComponent: Component | undefined): ToolRenderContext<Record<string, unknown>, unknown> {\n\t\treturn {\n\t\t\targs: this.state.args,\n\t\t\ttoolCallId: this.identity.toolCallId,\n\t\t\tinvalidate: this.onInvalidate,\n\t\t\tlastComponent,\n\t\t\tstate: this.rendererState,\n\t\t\tcwd: this.identity.cwd,\n\t\t\texecutionStarted: this.state.executionStarted,\n\t\t\targsComplete: this.state.argsComplete,\n\t\t\tisPartial: this.state.isPartial,\n\t\t\texpanded: this.state.expanded,\n\t\t\tshowImages: this.state.showImages,\n\t\t\timageProtocol: getCapabilities().images,\n\t\t\tisError: this.state.result?.isError ?? false,\n\t\t\tspinnerFrame: this.state.spinnerFrame,\n\t\t};\n\t}\n\n\tprivate renderCall(container: RenderContainer): void {\n\t\tconst fallback = createToolCallFallback(this.identity.toolName);\n\t\tconst renderer = this.getCallRenderer();\n\t\tif (!renderer) {\n\t\t\tcontainer.addChild(fallback);\n\t\t\treturn;\n\t\t}\n\t\ttry {\n\t\t\tconst component = renderer(this.state.args, theme, this.getRenderContext(this.callRendererComponent));\n\t\t\tthis.addRendererComponent(container, \"call\", component, fallback);\n\t\t} catch {\n\t\t\tthis.callRendererComponent = undefined;\n\t\t\tcontainer.addChild(fallback);\n\t\t}\n\t}\n\n\tprivate renderResult(container: RenderContainer, result: ToolExecutionResult): void {\n\t\tconst fallback = createToolResultFallback(result, this.state.showImages);\n\t\tconst renderer = this.getResultRenderer();\n\t\tif (!renderer) {\n\t\t\tif (fallback) container.addChild(fallback);\n\t\t\treturn;\n\t\t}\n\t\ttry {\n\t\t\tconst agentResult = { content: result.content, details: result.details } satisfies AgentToolResult<unknown>;\n\t\t\tconst component = renderer(\n\t\t\t\tagentResult,\n\t\t\t\t{ expanded: this.state.expanded, isPartial: this.state.isPartial },\n\t\t\t\ttheme,\n\t\t\t\tthis.getRenderContext(this.resultRendererComponent),\n\t\t\t);\n\t\t\tthis.addRendererComponent(container, \"result\", component, fallback);\n\t\t} catch {\n\t\t\tthis.resultRendererComponent = undefined;\n\t\t\tif (fallback) container.addChild(fallback);\n\t\t}\n\t}\n\n\tprivate addRendererComponent(\n\t\tcontainer: RenderContainer,\n\t\tslot: RendererSlot,\n\t\tvalue: unknown,\n\t\tfallback: Component | undefined,\n\t): void {\n\t\tif (!isComponent(value)) {\n\t\t\tthis.setRendererComponent(slot, undefined);\n\t\t\tif (fallback) container.addChild(fallback);\n\t\t\treturn;\n\t\t}\n\t\tthis.setRendererComponent(slot, value);\n\t\tcontainer.addChild(\n\t\t\tnew ToolRendererBoundary(value, fallback, () => {\n\t\t\t\tif (this.getRendererComponent(slot) === value) this.setRendererComponent(slot, undefined);\n\t\t\t}),\n\t\t);\n\t}\n\n\tprivate getRendererComponent(slot: RendererSlot): Component | undefined {\n\t\treturn slot === \"call\" ? this.callRendererComponent : this.resultRendererComponent;\n\t}\n\n\tprivate setRendererComponent(slot: RendererSlot, component: Component | undefined): void {\n\t\tif (slot === \"call\") this.callRendererComponent = component;\n\t\telse this.resultRendererComponent = component;\n\t}\n}\n"]}
1
+ {"version":3,"file":"tool-execution-renderer.js","sourceRoot":"","sources":["../../../../src/modes/interactive/components/tool-execution-renderer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAkB,SAAS,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE/F,OAAO,EAAE,wBAAwB,EAA+B,MAAM,8BAA8B,CAAC;AACrG,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EACN,sBAAsB,EACtB,wBAAwB,EACxB,2BAA2B,GAC3B,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAKhF,MAAM,OAAO,qBAAsB,SAAQ,SAAS;IAYnD,YAAY,QAA+B,EAAE,KAA+B,EAAE,YAAwB;QACrG,KAAK,EAAE,CAAC;QARQ,wBAAmB,GAAG,IAAI,SAAS,EAAE,CAAC;QACtC,kBAAa,GAA4B,EAAE,CAAC;QAQ5D,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,iBAAiB,GAAG,wBAAwB,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,QAAoB,CAAC,CAAC;QAC/F,IAAI,CAAC,UAAU,GAAG,IAAI,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,eAAe,EAAE,IAAI,CAAC,CAAC,CAAC;QACnF,IAAI,CAAC,WAAW,GAAG,IAAI,IAAI,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,eAAe,EAAE,IAAI,CAAC,CAAC,C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AAoB,CAAC,IAAI,CAAC,KAAK,KAAK;gBAAE,IAAI,CAAC,oBAAoB,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;QAC3F,CAAC,CAAC,CACF,CAAC;IACH,CAAC;IAEO,oBAAoB,CAAC,IAAkB;QAC9C,OAAO,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC,CAAC,IAAI,CAAC,uBAAuB,CAAC;IACpF,CAAC;IAEO,oBAAoB,CAAC,IAAkB,EAAE,SAAgC;QAChF,IAAI,IAAI,KAAK,MAAM;YAAE,IAAI,CAAC,qBAAqB,GAAG,SAAS,CAAC;;YACvD,IAAI,CAAC,uBAAuB,GAAG,SAAS,CAAC;IAC/C,CAAC;CACD","sourcesContent":["import type { AgentToolResult } from \"@earendil-works/pi-agent-core\";\nimport { Box, type Component, Container, getCapabilities, Text } from \"@earendil-works/pi-tui\";\nimport type { ToolRenderContext } from \"../../../core/extensions/types.ts\";\nimport { createAllToolDefinitions, type ToolDef, type ToolName } from \"../../../core/tools/index.ts\";\nimport { theme } from \"../theme/theme.ts\";\nimport {\n\tcreateToolCallFallback,\n\tcreateToolResultFallback,\n\tformatToolExecutionFallback,\n} from \"./tool-execution-fallback.ts\";\nimport type { ToolExecutionIdentity, ToolExecutionRenderState, ToolExecutionResult } from \"./tool-execution-types.ts\";\nimport { isComponent, ToolRendererBoundary } from \"./tool-renderer-boundary.ts\";\n\ntype RenderContainer = Box | Container;\ntype RendererSlot = \"call\" | \"result\";\n\nexport class ToolExecutionRenderer extends Container {\n\tprivate readonly identity: ToolExecutionIdentity;\n\tprivate readonly builtInDefinition: ToolDef | undefined;\n\tprivate readonly contentBox: Box;\n\tprivate readonly contentText: Text;\n\tprivate readonly selfRenderContainer = new Container();\n\tprivate readonly rendererState: Record<string, unknown> = {};\n\tprivate readonly onInvalidate: () => void;\n\tprivate state: ToolExecutionRenderState;\n\tprivate callRendererComponent?: Component;\n\tprivate resultRendererComponent?: Component;\n\n\tconstructor(identity: ToolExecutionIdentity, state: ToolExecutionRenderState, onInvalidate: () => void) {\n\t\tsuper();\n\t\tthis.identity = identity;\n\t\tthis.state = state;\n\t\tthis.onInvalidate = onInvalidate;\n\t\tthis.builtInDefinition = createAllToolDefinitions(identity.cwd)[identity.toolName as ToolName];\n\t\tthis.contentBox = new Box(1, 1, (text: string) => theme.bg(\"toolPendingBg\", text));\n\t\tthis.contentText = new Text(\"\", 1, 1, (text: string) => theme.bg(\"toolPendingBg\", text));\n\t\tthis.addChild(\n\t\t\tthis.hasRendererDefinition\n\t\t\t\t? this.renderShell === \"self\"\n\t\t\t\t\t? this.selfRenderContainer\n\t\t\t\t\t: this.contentBox\n\t\t\t\t: this.contentText,\n\t\t);\n\t}\n\n\tget hasRendererDefinition(): boolean {\n\t\treturn this.builtInDefinition !== undefined || this.identity.toolDefinition !== undefined;\n\t}\n\n\tget hasResultRenderer(): boolean {\n\t\treturn this.getResultRenderer() !== undefined;\n\t}\n\n\tget renderShell(): \"default\" | \"self\" {\n\t\tconst customShell = this.identity.toolDefinition?.renderShell;\n\t\treturn customShell ?? this.builtInDefinition?.renderShell ?? \"default\";\n\t}\n\n\tupdate(state: ToolExecutionRenderState): void {\n\t\tthis.state = state;\n\t\tconst background = state.isPartial\n\t\t\t? (text: string) => theme.bg(\"toolPendingBg\", text)\n\t\t\t: state.result?.isError\n\t\t\t\t? (text: string) => theme.bg(\"toolErrorBg\", text)\n\t\t\t\t: (text: string) => theme.bg(\"toolSuccessBg\", text);\n\n\t\tif (!this.hasRendererDefinition) {\n\t\t\tthis.contentText.setCustomBgFn(background);\n\t\t\tthis.contentText.setText(\n\t\t\t\tformatToolExecutionFallback(this.identity.toolName, state.args, state.result, state.showImages),\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\n\t\tconst container = this.renderShell === \"self\" ? this.selfRenderContainer : this.contentBox;\n\t\tif (container instanceof Box) container.setBgFn(background);\n\t\tcontainer.detachAll();\n\t\tthis.renderCall(container);\n\t\tif (state.result) this.renderResult(container, state.result);\n\t}\n\n\tprivate getCallRenderer(): ToolDef[\"renderCall\"] | undefined {\n\t\treturn this.identity.toolDefinition?.renderCall ?? this.builtInDefinition?.renderCall;\n\t}\n\n\tprivate getResultRenderer(): ToolDef[\"renderResult\"] | undefined {\n\t\treturn this.identity.toolDefinition?.renderResult ?? this.builtInDefinition?.renderResult;\n\t}\n\n\tprivate getRenderContext(lastComponent: Component | undefined): ToolRenderContext<Record<string, unknown>, unknown> {\n\t\treturn {\n\t\t\targs: this.state.args,\n\t\t\ttoolCallId: this.identity.toolCallId,\n\t\t\tinvalidate: this.onInvalidate,\n\t\t\tlastComponent,\n\t\t\tstate: this.rendererState,\n\t\t\tcwd: this.identity.cwd,\n\t\t\texecutionStarted: this.state.executionStarted,\n\t\t\targsComplete: this.state.argsComplete,\n\t\t\tisPartial: this.state.isPartial,\n\t\t\texpanded: this.state.expanded,\n\t\t\tshowImages: this.state.showImages,\n\t\t\timageProtocol: getCapabilities().images,\n\t\t\tisError: this.state.result?.isError ?? false,\n\t\t\thasResult: this.state.result !== undefined,\n\t\t\tspinnerFrame: this.state.spinnerFrame,\n\t\t};\n\t}\n\n\tprivate renderCall(container: RenderContainer): void {\n\t\tconst fallback = createToolCallFallback(this.identity.toolName);\n\t\tconst renderer = this.getCallRenderer();\n\t\tif (!renderer) {\n\t\t\tcontainer.addChild(fallback);\n\t\t\treturn;\n\t\t}\n\t\ttry {\n\t\t\tconst component = renderer(this.state.args, theme, this.getRenderContext(this.callRendererComponent));\n\t\t\tthis.addRendererComponent(container, \"call\", component, fallback);\n\t\t} catch {\n\t\t\tthis.callRendererComponent = undefined;\n\t\t\tcontainer.addChild(fallback);\n\t\t}\n\t}\n\n\tprivate renderResult(container: RenderContainer, result: ToolExecutionResult): void {\n\t\tconst fallback = createToolResultFallback(result, this.state.showImages);\n\t\tconst renderer = this.getResultRenderer();\n\t\tif (!renderer) {\n\t\t\tif (fallback) container.addChild(fallback);\n\t\t\treturn;\n\t\t}\n\t\ttry {\n\t\t\tconst agentResult = { content: result.content, details: result.details } satisfies AgentToolResult<unknown>;\n\t\t\tconst component = renderer(\n\t\t\t\tagentResult,\n\t\t\t\t{ expanded: this.state.expanded, isPartial: this.state.isPartial },\n\t\t\t\ttheme,\n\t\t\t\tthis.getRenderContext(this.resultRendererComponent),\n\t\t\t);\n\t\t\tthis.addRendererComponent(container, \"result\", component, fallback);\n\t\t} catch {\n\t\t\tthis.resultRendererComponent = undefined;\n\t\t\tif (fallback) container.addChild(fallback);\n\t\t}\n\t}\n\n\tprivate addRendererComponent(\n\t\tcontainer: RenderContainer,\n\t\tslot: RendererSlot,\n\t\tvalue: unknown,\n\t\tfallback: Component | undefined,\n\t): void {\n\t\tif (!isComponent(value)) {\n\t\t\tthis.setRendererComponent(slot, undefined);\n\t\t\tif (fallback) container.addChild(fallback);\n\t\t\treturn;\n\t\t}\n\t\tthis.setRendererComponent(slot, value);\n\t\tcontainer.addChild(\n\t\t\tnew ToolRendererBoundary(value, fallback, () => {\n\t\t\t\tif (this.getRendererComponent(slot) === value) this.setRendererComponent(slot, undefined);\n\t\t\t}),\n\t\t);\n\t}\n\n\tprivate getRendererComponent(slot: RendererSlot): Component | undefined {\n\t\treturn slot === \"call\" ? this.callRendererComponent : this.resultRendererComponent;\n\t}\n\n\tprivate setRendererComponent(slot: RendererSlot, component: Component | undefined): void {\n\t\tif (slot === \"call\") this.callRendererComponent = component;\n\t\telse this.resultRendererComponent = component;\n\t}\n}\n"]}
package/docs/AGENTS.md ADDED
@@ -0,0 +1,70 @@
1
+ # packages/coding-agent/docs/
2
+
3
+ Public documentation for `@code-yeongyu/senpi`. Shipped inside the npm package: `package.json`
4
+ `files` array includes `"docs"`, so every file here lands in the published tarball.
5
+
6
+ ## Navigation manifest
7
+
8
+ `docs.json` has two top-level keys: `navigation` (ordered section and page list) and `redirects`.
9
+ Page paths are relative to this directory.
10
+
11
+ - Every new `.md` file needs an entry in `docs.json` under `navigation`.
12
+ - Renamed or moved pages need a `redirects` entry to avoid broken links.
13
+ - Navigation-only stubs without real content belong in `redirects`, not `navigation`.
14
+
15
+ ## Landing page and images
16
+
17
+ `index.md` is the landing page. Images live under `docs/images/`:
18
+ `doom-extension.png`, `exy.png`, `interactive-mode.png`, `tree-view.png`.
19
+
20
+ New images go in `docs/images/`. Don't reference images by absolute URL when a relative path works.
21
+
22
+ ## Protocol and reference pages
23
+
24
+ These pages must track their implementation counterparts. Treat them as specs, not tutorials.
25
+
26
+ | Page | Tracks |
27
+ |------|--------|
28
+ | `rpc.md` | `packages/coding-agent/src/modes/rpc/` |
29
+ | `app-server.md` | `packages/coding-agent/src/modes/app-server/` |
30
+ | `json.md` | JSONL wire format and record shapes |
31
+ | `session-format.md` | Session file structure and field types |
32
+
33
+ Preserve LF line endings and exact field names in these pages. Field spellings and JSONL record
34
+ structures are asserted by tests; prose-only rewording can still break them.
35
+
36
+ ## Validators
37
+
38
+ - `scripts/check-mcp-docs.test.mjs`: Parses `config-schema.ts` key names as raw text and
39
+ checks that every field has a `### \`field\`` heading in `mcp.md`. Runs under
40
+ `npm run test:scripts`. Schema additions without a matching doc heading break CI.
41
+
42
+ - `packages/coding-agent/test/qa/app-server/task20-doc-example-check.ts`: Spins up a live
43
+ app-server process and validates that JSON examples in `app-server.md` match actual server
44
+ behavior. Prose edits to `app-server.md` that change JSON shapes will fail this test.
45
+
46
+ ## Terminology
47
+
48
+ Docs mix `senpi` and upstream `Pi` branding in legacy text. Don't do broad rebrand sweeps
49
+ during focused edits; update only the immediate context you're working in.
50
+
51
+ Consistent names: CLI binary is `senpi`, config directory is `.senpi`, npm package is
52
+ `@code-yeongyu/senpi`. Don't use `codex`, `pi`, or `openai-codex` in new prose.
53
+
54
+ ## Security rules
55
+
56
+ - `bearerTokenEnv` names an environment variable, not a token value. Examples must never put
57
+ a literal token in the JSON config; the implementation warns when it detects one.
58
+ - OAuth tokens persist under the agent directory at runtime. Don't surface them in doc examples
59
+ or log snippets.
60
+ - MCP config values are not shell-expanded. Don't document or imply `$VAR` substitution in
61
+ JSON config examples.
62
+ - `mcp.md` must not advertise URL-mode elicitation; it's not a shipped feature.
63
+
64
+ ## Anti-patterns
65
+
66
+ - No new `.md` file without a `docs.json` entry.
67
+ - Don't edit protocol page prose without checking whether `task20-doc-example-check.ts` or
68
+ `check-mcp-docs.test.mjs` would break.
69
+ - Don't copy claims from upstream Pi docs without verifying they apply to the senpi fork.
70
+ - Don't embed bearer tokens, session IDs, or raw API keys in example output.
package/docs/mcp.md CHANGED
@@ -26,7 +26,7 @@ catalog costs almost nothing until the model actually needs it.
26
26
  summary, `/mcp add <name> <command...>` to add servers interactively.
27
27
  3. Servers needing OAuth: `/mcp login <name>` (see [Auth](#auth)).
28
28
  4. Use it: small catalogs register directly; big ones surface through
29
- `mcp_search` (see [Exposure tiers](#exposure-tiers)).
29
+ `tool_search` (see [Exposure tiers](#exposure-tiers)).
30
30
 
31
31
  ## Configuration reference
32
32
 
@@ -95,7 +95,7 @@ Glob denylist applied after `includeTools`.
95
95
 
96
96
  ### `directTools`
97
97
  `true` = every filtered tool active immediately; or an array of names/globs
98
- that stay active while the rest goes behind `mcp_search`. Default: none.
98
+ that stay active while the rest goes behind `tool_search`. Default: none.
99
99
 
100
100
  ### `exposure`
101
101
  `"auto"` (default), `"direct"`, `"search"`, or `"proxy"`. See
@@ -134,14 +134,14 @@ the stub for the full schema in place. Default `false`.
134
134
  ### `nativeToolSearch`
135
135
  `"auto"` (default) | `true` | `false`. On Anthropic models, defers inactive
136
136
  MCP tools to the provider's native tool-search; any 400 falls back to the
137
- local `mcp_search` for the session.
137
+ local `tool_search` for the session.
138
138
 
139
139
  ## Exposure tiers
140
140
 
141
141
  | Tier | When | Cost profile |
142
142
  |---|---|---|
143
143
  | direct | `exposure:"direct"`, `directTools:true`, or `auto` at/below `searchThreshold` | Every tool schema on every request |
144
- | search (Tier-B) | `exposure:"search"` or `auto` above the threshold | Full catalog registered, ~135 tokens resident (`mcp_search` only); matches promote next turn; promotions survive resume/compaction |
144
+ | search (Tier-B) | `exposure:"search"` or `auto` above the threshold | Full catalog registered, ~135 tokens resident (`tool_search` only); matches promote next turn; promotions survive resume/compaction |
145
145
  | proxy (Tier-C) | `exposure:"proxy"` only — never `auto` | One `mcp_<server>` gateway tool (`search`/`describe`/`call` with JSON-string args); cheapest, but no provider-side argument validation |
146
146
 
147
147
  Skills can carry MCP servers too (an `mcp.json` sidecar next to SKILL.md, or a
@@ -181,7 +181,7 @@ with a configured server resolves in favor of your config.
181
181
  | `needs_auth` | 401 and no usable token | `/mcp login <name>` |
182
182
  | `suspended` | reconnect circuit breaker opened (5 failures/30s) | fix the server, then `/mcp reconnect <name>` |
183
183
  | `degraded` | transient failure; auto-reconnect with backoff is running | wait, or `/mcp reconnect <name>` |
184
- | tools missing | server filtered/disabled, or hidden behind search | check `includeTools`/`excludeTools`, ask the model to `mcp_search` |
184
+ | tools missing | server filtered/disabled, or hidden behind search | check `includeTools`/`excludeTools`, ask the model to `tool_search` |
185
185
  | child exits at spawn (EOF) | bad `command`/`args`/`env` | `/mcp logs <name>` shows the captured stderr |
186
186
  | slow first call | lazy server cold boot | use `lifecycle:"eager"` or `"keep-alive"` |
187
187
 
package/docs/settings.md CHANGED
@@ -84,7 +84,7 @@ Permission rules are a confirmation policy, not a sandbox. Senpi, extensions, pa
84
84
  | `defaultProvider` | string | - | Default provider (e.g., `"anthropic"`, `"openai"`) |
85
85
  | `defaultModel` | string | - | Default model ID |
86
86
  | `defaultThinkingLevel` | string | - | `"off"`, `"minimal"`, `"low"`, `"medium"`, `"high"`, `"xhigh"`, `"max"` |
87
- | `promptPreset` | string | `"auto"` | Force a system prompt preset: `"auto"`, `"kimi-k2-6"`, `"kimi-k2-7"`, `"glm-5.2"`, `"claude-fable-5"`, `"claude-opus-4-5"`, `"claude-opus-4-6"`, `"claude-opus-4-7"`, `"claude-opus-4-8"`, `"gpt-5"`, `"gpt-5.2"`, `"gpt-5.3-codex"`, `"gpt-5.4"`, `"gpt-5.5"`, or `"gpt-5.6"` |
87
+ | `promptPreset` | string | `"auto"` | Force a system prompt preset: `"auto"`, `"kimi-k2-6"`, `"kimi-k2-7"`, `"kimi-k3"`, `"glm-5.2"`, `"claude-fable-5"`, `"claude-opus-4-5"`, `"claude-opus-4-6"`, `"claude-opus-4-7"`, `"claude-opus-4-8"`, `"gpt-5"`, `"gpt-5.2"`, `"gpt-5.3-codex"`, `"gpt-5.4"`, `"gpt-5.5"`, or `"gpt-5.6"` |
88
88
  | `hideThinkingBlock` | boolean | `false` | Hide thinking blocks in output |
89
89
  | `showCacheMissNotices` | boolean | `false` | Show transcript notices for significant prompt-cache misses |
90
90
  | `thinkingBudgets` | object | - | Custom token budgets per thinking level |
@@ -9,6 +9,7 @@ extensions/ Tools, commands, UI, providers, hooks, resources
9
9
  extensions/*/ Multi-file examples and nested private workspaces
10
10
  sdk/ Programmatic SDK usage
11
11
  rpc-extension-ui.ts RPC-compatible extension UI example
12
+ extensions/kimi-deferred-tools.ts Deferred tool discovery/activation example
12
13
  ```
13
14
 
14
15
  ## CONVENTIONS
@@ -18,6 +19,8 @@ rpc-extension-ui.ts RPC-compatible extension UI example
18
19
  - Extension factories have no top-level runtime side effects. Register work through the public `pi.*` API and lifecycle events.
19
20
  - New interactive examples should use configurable keybindings and themed TUI helpers. Existing demos may keep fixed controls when the control scheme is part of the example. Direct terminal writes belong only in examples explicitly teaching a terminal protocol; ordinary SDK examples may use normal stdout.
20
21
  - Tool string enums use the shared `StringEnum` helper for provider compatibility.
22
+ - SDK examples should use `ModelRuntime` for auth/custom-model/session composition; deprecated static catalog helpers import from `@earendil-works/pi-ai/compat`.
23
+ - Deferred-tool examples preserve the Kimi flow: expose search first, activate via `pi.setActiveTools()`, and register lifecycle work in `session_start`.
21
24
  - Stateful examples persist reconstructable state in session entries or tool-result details so fork/resume behavior remains valid.
22
25
  - Nested example packages are private workspaces with exact-pinned dependencies. Treat their manifests and lock impact as production dependency changes.
23
26
 
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "pi-extension-custom-provider",
3
- "version": "0.80.9",
3
+ "version": "0.80.10",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "pi-extension-custom-provider",
9
- "version": "0.80.9",
9
+ "version": "0.80.10",
10
10
  "dependencies": {
11
11
  "@anthropic-ai/sdk": "^0.52.0"
12
12
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pi-extension-custom-provider-anthropic",
3
3
  "private": true,
4
- "version": "0.80.9",
4
+ "version": "0.80.10",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "clean": "echo 'nothing to clean'",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pi-extension-custom-provider-gitlab-duo",
3
3
  "private": true,
4
- "version": "0.80.9",
4
+ "version": "0.80.10",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "clean": "echo 'nothing to clean'",
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "pi-extension-gondolin",
3
- "version": "0.80.9",
3
+ "version": "0.80.10",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "pi-extension-gondolin",
9
- "version": "0.80.9",
9
+ "version": "0.80.10",
10
10
  "dependencies": {
11
11
  "@earendil-works/gondolin": "0.12.0"
12
12
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pi-extension-gondolin",
3
3
  "private": true,
4
- "version": "0.80.9",
4
+ "version": "0.80.10",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "clean": "echo 'nothing to clean'",
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "pi-extension-sandbox",
3
- "version": "1.10.9",
3
+ "version": "1.10.10",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "pi-extension-sandbox",
9
- "version": "1.10.9",
9
+ "version": "1.10.10",
10
10
  "dependencies": {
11
11
  "@anthropic-ai/sandbox-runtime": "^0.0.26"
12
12
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pi-extension-sandbox",
3
3
  "private": true,
4
- "version": "1.10.9",
4
+ "version": "1.10.10",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "clean": "echo 'nothing to clean'",
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "pi-extension-with-deps",
3
- "version": "0.80.9",
3
+ "version": "0.80.10",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "pi-extension-with-deps",
9
- "version": "0.80.9",
9
+ "version": "0.80.10",
10
10
  "dependencies": {
11
11
  "ms": "^2.1.3"
12
12
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pi-extension-with-deps",
3
3
  "private": true,
4
- "version": "0.80.9",
4
+ "version": "0.80.10",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "clean": "echo 'nothing to clean'",
@@ -1,5 +1,54 @@
1
1
  # Changelog
2
2
 
3
+ ## [2026.7.17-3] - 2026-07-17
4
+
5
+ ### Breaking Changes
6
+
7
+ ### Added
8
+
9
+ ### Changed
10
+
11
+ ### Fixed
12
+
13
+ ### Removed
14
+
15
+ ## [2026.7.17-2] - 2026-07-17
16
+
17
+ ### Added
18
+
19
+ - Added a host-sizing note to the `eval` prompt: the extension now passes a preformatted host line (platform, arch, CPU model, core count) at registration so the prompt tells the model to size `parallel(thunks)` pools to the local cores and keep shell commands platform-appropriate.
20
+ - Added model-aware eval-first batching emphasis: the `eval` tool description and its system-prompt guideline now render in a dialect selected by the active model id (Claude/GLM, OpenAI, Kimi, and a maximum-emphasis default fallback), re-registering on `model_select` so mid-session model switches pick up the matching dialect.
21
+
22
+ ### Changed
23
+
24
+ ### Fixed
25
+
26
+ ## [2026.7.17] - 2026-07-17
27
+
28
+ ### Added
29
+
30
+ ### Changed
31
+
32
+ ### Fixed
33
+
34
+ - Fixed `eval` tool calls rendering duplicate stacked boxes after a result arrived; the pending, running, and completed states now update in one in-place frame ([#223](https://github.com/code-yeongyu/senpi/pull/223)).
35
+
36
+ ## [2026.7.16-3] - 2026-07-16
37
+
38
+ ### Added
39
+
40
+ ### Changed
41
+
42
+ ### Fixed
43
+
44
+ ## [2026.7.16-2] - 2026-07-16
45
+
46
+ ### Added
47
+
48
+ ### Changed
49
+
50
+ ### Fixed
51
+
3
52
  ## [2026.7.16] - 2026-07-16
4
53
 
5
54
  ### Added
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@code-yeongyu/senpi-codemode",
3
- "version": "2026.7.16",
3
+ "version": "2026.7.17-3",
4
4
  "description": "Source-only senpi extension package for codemode evaluation tools",
5
5
  "type": "module",
6
6
  "main": "./src/index.ts",
@@ -30,14 +30,14 @@
30
30
  },
31
31
  "dependencies": {
32
32
  "@babel/parser": "7.29.7",
33
- "@earendil-works/pi-ai": "^2026.7.16",
33
+ "@earendil-works/pi-ai": "^2026.7.17-3",
34
34
  "typebox": "1.1.38"
35
35
  },
36
36
  "peerDependencies": {
37
37
  "@code-yeongyu/senpi": "*"
38
38
  },
39
39
  "devDependencies": {
40
- "@code-yeongyu/senpi": "2026.7.16"
40
+ "@code-yeongyu/senpi": "2026.7.17-3"
41
41
  },
42
42
  "keywords": [
43
43
  "senpi",