@vybestack/llxprt-code-core 0.5.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (262) hide show
  1. package/README.md +0 -244
  2. package/dist/index.d.ts +1 -1
  3. package/dist/index.js +1 -1
  4. package/dist/index.js.map +1 -1
  5. package/dist/src/agents/codebase-investigator.d.ts +46 -0
  6. package/dist/src/agents/codebase-investigator.js +136 -0
  7. package/dist/src/agents/codebase-investigator.js.map +1 -0
  8. package/dist/src/agents/executor.d.ts +92 -0
  9. package/dist/src/agents/executor.js +624 -0
  10. package/dist/src/agents/executor.js.map +1 -0
  11. package/dist/src/agents/invocation.d.ts +45 -0
  12. package/dist/src/agents/invocation.js +114 -0
  13. package/dist/src/agents/invocation.js.map +1 -0
  14. package/dist/src/agents/registry.d.ts +38 -0
  15. package/dist/src/agents/registry.js +64 -0
  16. package/dist/src/agents/registry.js.map +1 -0
  17. package/dist/src/agents/types.d.ts +145 -0
  18. package/dist/src/agents/types.js +17 -0
  19. package/dist/src/agents/types.js.map +1 -0
  20. package/dist/src/agents/utils.d.ts +15 -0
  21. package/dist/src/agents/utils.js +27 -0
  22. package/dist/src/agents/utils.js.map +1 -0
  23. package/dist/src/auth/types.d.ts +4 -4
  24. package/dist/src/code_assist/oauth-credential-storage.d.ts +27 -0
  25. package/dist/src/code_assist/oauth-credential-storage.js +115 -0
  26. package/dist/src/code_assist/oauth-credential-storage.js.map +1 -0
  27. package/dist/src/code_assist/oauth2.js +36 -9
  28. package/dist/src/code_assist/oauth2.js.map +1 -1
  29. package/dist/src/config/config.d.ts +72 -8
  30. package/dist/src/config/config.js +130 -23
  31. package/dist/src/config/config.js.map +1 -1
  32. package/dist/src/config/constants.d.ts +11 -0
  33. package/dist/src/config/constants.js +16 -0
  34. package/dist/src/config/constants.js.map +1 -0
  35. package/dist/src/config/storage.d.ts +1 -0
  36. package/dist/src/config/storage.js +2 -1
  37. package/dist/src/config/storage.js.map +1 -1
  38. package/dist/src/confirmation-bus/index.d.ts +2 -0
  39. package/dist/src/confirmation-bus/index.js +3 -0
  40. package/dist/src/confirmation-bus/index.js.map +1 -0
  41. package/dist/src/confirmation-bus/message-bus.d.ts +60 -0
  42. package/dist/src/confirmation-bus/message-bus.js +141 -0
  43. package/dist/src/confirmation-bus/message-bus.js.map +1 -0
  44. package/dist/src/confirmation-bus/types.d.ts +59 -0
  45. package/dist/src/confirmation-bus/types.js +10 -0
  46. package/dist/src/confirmation-bus/types.js.map +1 -0
  47. package/dist/src/core/baseLlmClient.d.ts +77 -0
  48. package/dist/src/core/baseLlmClient.js +175 -0
  49. package/dist/src/core/baseLlmClient.js.map +1 -0
  50. package/dist/src/core/client.d.ts +13 -1
  51. package/dist/src/core/client.js +98 -119
  52. package/dist/src/core/client.js.map +1 -1
  53. package/dist/src/core/coreToolScheduler.d.ts +20 -1
  54. package/dist/src/core/coreToolScheduler.js +160 -16
  55. package/dist/src/core/coreToolScheduler.js.map +1 -1
  56. package/dist/src/core/geminiChat.d.ts +8 -1
  57. package/dist/src/core/geminiChat.js +30 -21
  58. package/dist/src/core/geminiChat.js.map +1 -1
  59. package/dist/src/core/subagent.d.ts +16 -1
  60. package/dist/src/core/subagent.js +59 -3
  61. package/dist/src/core/subagent.js.map +1 -1
  62. package/dist/src/core/subagentOrchestrator.d.ts +2 -1
  63. package/dist/src/core/subagentOrchestrator.js +36 -6
  64. package/dist/src/core/subagentOrchestrator.js.map +1 -1
  65. package/dist/src/core/turn.d.ts +1 -4
  66. package/dist/src/core/turn.js +2 -12
  67. package/dist/src/core/turn.js.map +1 -1
  68. package/dist/src/ide/detect-ide.d.ts +44 -14
  69. package/dist/src/ide/detect-ide.js +35 -75
  70. package/dist/src/ide/detect-ide.js.map +1 -1
  71. package/dist/src/ide/ide-client.d.ts +5 -4
  72. package/dist/src/ide/ide-client.js +34 -25
  73. package/dist/src/ide/ide-client.js.map +1 -1
  74. package/dist/src/ide/ide-installer.d.ts +2 -2
  75. package/dist/src/ide/ide-installer.js +7 -9
  76. package/dist/src/ide/ide-installer.js.map +1 -1
  77. package/dist/src/index.d.ts +10 -2
  78. package/dist/src/index.js +12 -3
  79. package/dist/src/index.js.map +1 -1
  80. package/dist/src/mcp/oauth-provider.d.ts +5 -1
  81. package/dist/src/mcp/oauth-provider.js +56 -44
  82. package/dist/src/mcp/oauth-provider.js.map +1 -1
  83. package/dist/src/mcp/oauth-token-storage.d.ts +43 -40
  84. package/dist/src/mcp/oauth-token-storage.js +114 -44
  85. package/dist/src/mcp/oauth-token-storage.js.map +1 -1
  86. package/dist/src/mcp/oauth-utils.js +1 -0
  87. package/dist/src/mcp/oauth-utils.js.map +1 -1
  88. package/dist/src/mcp/sa-impersonation-provider.d.ts +33 -0
  89. package/dist/src/mcp/sa-impersonation-provider.js +130 -0
  90. package/dist/src/mcp/sa-impersonation-provider.js.map +1 -0
  91. package/dist/src/mcp/token-storage/hybrid-token-storage.js +1 -1
  92. package/dist/src/policy/config.d.ts +51 -0
  93. package/dist/src/policy/config.js +102 -0
  94. package/dist/src/policy/config.js.map +1 -0
  95. package/dist/src/policy/index.d.ts +5 -0
  96. package/dist/src/policy/index.js +6 -0
  97. package/dist/src/policy/index.js.map +1 -0
  98. package/dist/src/policy/policies/discovered.toml +9 -0
  99. package/dist/src/policy/policies/read-only.toml +68 -0
  100. package/dist/src/policy/policies/write.toml +69 -0
  101. package/dist/src/policy/policies/yolo.toml +8 -0
  102. package/dist/src/policy/policy-engine.d.ts +55 -0
  103. package/dist/src/policy/policy-engine.js +126 -0
  104. package/dist/src/policy/policy-engine.js.map +1 -0
  105. package/dist/src/policy/stable-stringify.d.ts +29 -0
  106. package/dist/src/policy/stable-stringify.js +111 -0
  107. package/dist/src/policy/stable-stringify.js.map +1 -0
  108. package/dist/src/policy/toml-loader.d.ts +37 -0
  109. package/dist/src/policy/toml-loader.js +183 -0
  110. package/dist/src/policy/toml-loader.js.map +1 -0
  111. package/dist/src/policy/types.d.ts +16 -0
  112. package/dist/src/policy/types.js +7 -0
  113. package/dist/src/policy/types.js.map +1 -0
  114. package/dist/src/providers/LoggingProviderWrapper.d.ts +2 -0
  115. package/dist/src/providers/LoggingProviderWrapper.js +27 -6
  116. package/dist/src/providers/LoggingProviderWrapper.js.map +1 -1
  117. package/dist/src/providers/ProviderManager.d.ts +18 -0
  118. package/dist/src/providers/ProviderManager.js +54 -3
  119. package/dist/src/providers/ProviderManager.js.map +1 -1
  120. package/dist/src/providers/anthropic/AnthropicProvider.d.ts +49 -0
  121. package/dist/src/providers/anthropic/AnthropicProvider.js +468 -30
  122. package/dist/src/providers/anthropic/AnthropicProvider.js.map +1 -1
  123. package/dist/src/providers/openai/OpenAIProvider.d.ts +3 -0
  124. package/dist/src/providers/openai/OpenAIProvider.js +12 -6
  125. package/dist/src/providers/openai/OpenAIProvider.js.map +1 -1
  126. package/dist/src/providers/utils/localEndpoint.d.ts +39 -0
  127. package/dist/src/providers/utils/localEndpoint.js +117 -0
  128. package/dist/src/providers/utils/localEndpoint.js.map +1 -0
  129. package/dist/src/runtime/AgentRuntimeLoader.d.ts +1 -0
  130. package/dist/src/runtime/AgentRuntimeLoader.js +6 -1
  131. package/dist/src/runtime/AgentRuntimeLoader.js.map +1 -1
  132. package/dist/src/runtime/createAgentRuntimeContext.js +8 -7
  133. package/dist/src/runtime/createAgentRuntimeContext.js.map +1 -1
  134. package/dist/src/services/fileSystemService.d.ts +9 -0
  135. package/dist/src/services/fileSystemService.js +12 -1
  136. package/dist/src/services/fileSystemService.js.map +1 -1
  137. package/dist/src/services/history/HistoryService.d.ts +4 -0
  138. package/dist/src/services/history/HistoryService.js +18 -0
  139. package/dist/src/services/history/HistoryService.js.map +1 -1
  140. package/dist/src/services/history/IContent.d.ts +6 -0
  141. package/dist/src/services/history/IContent.js.map +1 -1
  142. package/dist/src/services/shellExecutionService.js +0 -6
  143. package/dist/src/services/shellExecutionService.js.map +1 -1
  144. package/dist/src/settings/types.d.ts +7 -0
  145. package/dist/src/storage/sessionTypes.d.ts +27 -0
  146. package/dist/src/storage/sessionTypes.js +10 -0
  147. package/dist/src/storage/sessionTypes.js.map +1 -0
  148. package/dist/src/telemetry/constants.d.ts +8 -0
  149. package/dist/src/telemetry/constants.js +8 -0
  150. package/dist/src/telemetry/constants.js.map +1 -1
  151. package/dist/src/telemetry/loggers.d.ts +9 -1
  152. package/dist/src/telemetry/loggers.js +154 -2
  153. package/dist/src/telemetry/loggers.js.map +1 -1
  154. package/dist/src/telemetry/metrics.d.ts +5 -0
  155. package/dist/src/telemetry/metrics.js +4 -0
  156. package/dist/src/telemetry/metrics.js.map +1 -1
  157. package/dist/src/telemetry/types.d.ts +62 -1
  158. package/dist/src/telemetry/types.js +92 -0
  159. package/dist/src/telemetry/types.js.map +1 -1
  160. package/dist/src/telemetry/uiTelemetry.d.ts +1 -1
  161. package/dist/src/telemetry/uiTelemetry.js +2 -3
  162. package/dist/src/telemetry/uiTelemetry.js.map +1 -1
  163. package/dist/src/test-utils/config.js +14 -0
  164. package/dist/src/test-utils/config.js.map +1 -1
  165. package/dist/src/test-utils/mock-tool.d.ts +8 -4
  166. package/dist/src/test-utils/mock-tool.js +35 -18
  167. package/dist/src/test-utils/mock-tool.js.map +1 -1
  168. package/dist/src/test-utils/tools.d.ts +1 -1
  169. package/dist/src/test-utils/tools.js +4 -4
  170. package/dist/src/test-utils/tools.js.map +1 -1
  171. package/dist/src/tools/edit.d.ts +3 -2
  172. package/dist/src/tools/edit.js +29 -10
  173. package/dist/src/tools/edit.js.map +1 -1
  174. package/dist/src/tools/glob.d.ts +6 -4
  175. package/dist/src/tools/glob.js +3 -3
  176. package/dist/src/tools/glob.js.map +1 -1
  177. package/dist/src/tools/grep.d.ts +3 -2
  178. package/dist/src/tools/grep.js +2 -2
  179. package/dist/src/tools/grep.js.map +1 -1
  180. package/dist/src/tools/ls.d.ts +4 -3
  181. package/dist/src/tools/ls.js +3 -3
  182. package/dist/src/tools/ls.js.map +1 -1
  183. package/dist/src/tools/mcp-client.d.ts +9 -18
  184. package/dist/src/tools/mcp-client.js +60 -102
  185. package/dist/src/tools/mcp-client.js.map +1 -1
  186. package/dist/src/tools/mcp-tool.js +7 -1
  187. package/dist/src/tools/mcp-tool.js.map +1 -1
  188. package/dist/src/tools/memoryTool.d.ts +6 -2
  189. package/dist/src/tools/memoryTool.js +14 -4
  190. package/dist/src/tools/memoryTool.js.map +1 -1
  191. package/dist/src/tools/modifiable-tool.d.ts +1 -1
  192. package/dist/src/tools/modifiable-tool.js +9 -1
  193. package/dist/src/tools/modifiable-tool.js.map +1 -1
  194. package/dist/src/tools/read-file.d.ts +3 -2
  195. package/dist/src/tools/read-file.js +2 -2
  196. package/dist/src/tools/read-file.js.map +1 -1
  197. package/dist/src/tools/read-many-files.d.ts +3 -2
  198. package/dist/src/tools/read-many-files.js +2 -2
  199. package/dist/src/tools/read-many-files.js.map +1 -1
  200. package/dist/src/tools/ripGrep.d.ts +3 -2
  201. package/dist/src/tools/ripGrep.js +2 -2
  202. package/dist/src/tools/ripGrep.js.map +1 -1
  203. package/dist/src/tools/shell.d.ts +3 -2
  204. package/dist/src/tools/shell.js +69 -9
  205. package/dist/src/tools/shell.js.map +1 -1
  206. package/dist/src/tools/smart-edit.d.ts +22 -2
  207. package/dist/src/tools/smart-edit.js +124 -12
  208. package/dist/src/tools/smart-edit.js.map +1 -1
  209. package/dist/src/tools/task.d.ts +1 -0
  210. package/dist/src/tools/task.js +33 -16
  211. package/dist/src/tools/task.js.map +1 -1
  212. package/dist/src/tools/tool-confirmation-types.d.ts +20 -0
  213. package/dist/src/tools/tool-confirmation-types.js +15 -0
  214. package/dist/src/tools/tool-confirmation-types.js.map +1 -0
  215. package/dist/src/tools/tool-error.d.ts +2 -0
  216. package/dist/src/tools/tool-error.js +2 -0
  217. package/dist/src/tools/tool-error.js.map +1 -1
  218. package/dist/src/tools/tool-registry.d.ts +8 -1
  219. package/dist/src/tools/tool-registry.js +18 -4
  220. package/dist/src/tools/tool-registry.js.map +1 -1
  221. package/dist/src/tools/tools.d.ts +52 -14
  222. package/dist/src/tools/tools.js +71 -15
  223. package/dist/src/tools/tools.js.map +1 -1
  224. package/dist/src/tools/web-fetch.d.ts +3 -2
  225. package/dist/src/tools/web-fetch.js +11 -6
  226. package/dist/src/tools/web-fetch.js.map +1 -1
  227. package/dist/src/tools/web-search-invocation.d.ts +3 -1
  228. package/dist/src/tools/web-search-invocation.js +5 -2
  229. package/dist/src/tools/web-search-invocation.js.map +1 -1
  230. package/dist/src/tools/web-search.d.ts +3 -2
  231. package/dist/src/tools/web-search.js +6 -4
  232. package/dist/src/tools/web-search.js.map +1 -1
  233. package/dist/src/tools/write-file.d.ts +3 -2
  234. package/dist/src/tools/write-file.js +11 -6
  235. package/dist/src/tools/write-file.js.map +1 -1
  236. package/dist/src/utils/bfsFileSearch.d.ts +2 -2
  237. package/dist/src/utils/editor.js +5 -3
  238. package/dist/src/utils/editor.js.map +1 -1
  239. package/dist/src/utils/getFolderStructure.d.ts +2 -2
  240. package/dist/src/utils/getFolderStructure.js +1 -1
  241. package/dist/src/utils/getFolderStructure.js.map +1 -1
  242. package/dist/src/utils/llm-edit-fixer.js +10 -1
  243. package/dist/src/utils/llm-edit-fixer.js.map +1 -1
  244. package/dist/src/utils/memoryDiscovery.d.ts +2 -1
  245. package/dist/src/utils/memoryDiscovery.js +3 -2
  246. package/dist/src/utils/memoryDiscovery.js.map +1 -1
  247. package/dist/src/utils/memoryImportProcessor.js +13 -20
  248. package/dist/src/utils/memoryImportProcessor.js.map +1 -1
  249. package/dist/src/utils/retry.d.ts +5 -1
  250. package/dist/src/utils/retry.js +31 -16
  251. package/dist/src/utils/retry.js.map +1 -1
  252. package/dist/src/utils/schemaValidator.js +11 -1
  253. package/dist/src/utils/schemaValidator.js.map +1 -1
  254. package/dist/src/utils/shell-utils.d.ts +1 -0
  255. package/dist/src/utils/shell-utils.js +6 -2
  256. package/dist/src/utils/shell-utils.js.map +1 -1
  257. package/dist/src/utils/thoughtUtils.d.ts +21 -0
  258. package/dist/src/utils/thoughtUtils.js +39 -0
  259. package/dist/src/utils/thoughtUtils.js.map +1 -0
  260. package/dist/src/utils/tool-utils.js +2 -2
  261. package/dist/src/utils/tool-utils.js.map +1 -1
  262. package/package.json +6 -4
package/README.md CHANGED
@@ -1,244 +0,0 @@
1
- # LLxprt Code
2
-
3
- [![LLxprt Code CI](https://github.com/vybestack/llxprt-code/actions/workflows/ci.yml/badge.svg)](https://github.com/vybestack/llxprt-code/actions/workflows/ci.yml)
4
-  [![Mentioned in Awesome Gemini CLI](https://awesome.re/mentioned-badge.svg)](https://github.com/Piebald-AI/awesome-gemini-cli) [![Discord Server](https://dcbadge.limes.pink/api/server/https://discord.gg/Wc6dZqWWYv?style=flat)](https://discord.gg/Wc6dZqWWYv) ![CodeRabbit Pull Request Reviews](https://img.shields.io/coderabbit/prs/github/vybestack/llxprt-code?utm_source=oss&utm_medium=github&utm_campaign=vybestack%2Fllxprt-code&labelColor=171717&color=FF570A&link=https%3A%2F%2Fcoderabbit.ai&label=CodeRabbit+Reviews)
5
-
6
- ![LLxprt Code Screenshot](./docs/assets/llxprt-screenshot.png)
7
-
8
- **AI-powered coding assistant that works with any LLM provider.** Command-line interface for querying and editing codebases, generating applications, and automating development workflows.
9
-
10
- ## Free & Subscription Options
11
-
12
- Get started immediately with powerful LLM options:
13
-
14
- ```bash
15
- # Free Gemini models
16
- /auth gemini enable
17
- /provider gemini
18
- /model gemini-2.5-flash
19
-
20
- # Free Qwen models
21
- /auth qwen enable
22
- /provider qwen
23
- /model qwen-3-coder
24
-
25
- # Your Claude Pro / Max subscription
26
- /auth anthropic enable
27
- /provider anthropic
28
- /model claude-sonnet-4-5
29
- ```
30
-
31
- ## Why Choose LLxprt Code?
32
-
33
- - **Free Tier Support**: Start coding immediately with Gemini, Qwen, or your existing Claude account
34
- - **Provider Flexibility**: Switch between any Anthropic, Gemini, or OpenAI-compatible provider
35
- - **Top Open Models**: Works seamlessly with GLM 4.6, MiniMax-2, and Qwen 3 Coder
36
- - **Local Models**: Run models locally with LM Studio, llama.cpp for complete privacy
37
- - **Privacy First**: No telemetry by default, local processing available
38
- - **Subagent Flexibility**: Create agents with different models, providers, or settings
39
- - **[ACTION] Real-time**: Interactive REPL with beautiful themes
40
- - **Zed Integration**: Native Zed editor integration for seamless workflow
41
-
42
- ```bash
43
- # Install and get started
44
- npm install -g @vybestack/llxprt-code
45
- llxprt
46
-
47
- # Try without installing
48
- npx @vybestack/llxprt-code --provider synthetic --model hf:zai-org/GLM-4.6 --keyfile ~/.synthetic_key "simplify the README.md"
49
- ```
50
-
51
- ## What is LLxprt Code?
52
-
53
- LLxprt Code is a command-line AI assistant designed for developers who want powerful LLM capabilities without leaving their terminal. Unlike GitHub Copilot or ChatGPT, LLxprt Code works with **any provider** and can run **locally** for complete privacy.
54
-
55
- **Key differences:**
56
-
57
- - **Open source & community driven**: Not locked into proprietary ecosystems
58
- - **Provider agnostic**: Not locked into one AI service
59
- - **Local-first**: Run entirely offline if needed
60
- - **Developer-centric**: Built specifically for coding workflows
61
- - **Terminal native**: Designed for CLI workflows, not web interfaces
62
-
63
- ## Quick Start
64
-
65
- 1. **Prerequisites:** Node.js 20+ installed
66
- 2. **Install:**
67
- ```bash
68
- npm install -g @vybestack/llxprt-code
69
- # Or try without installing:
70
- npx @vybestack/llxprt-code
71
- ```
72
- 3. **Run:** `llxprt`
73
- 4. **Choose provider:** Use `/provider` to select your preferred LLM service
74
- 5. **Start coding:** Ask questions, generate code, or analyze projects
75
-
76
- **First session example:**
77
-
78
- ```bash
79
- cd your-project/
80
- llxprt
81
- > Explain the architecture of this codebase and suggest improvements
82
- > Create a test file for the user authentication module
83
- > Help me debug this error: [paste error message]
84
- ```
85
-
86
- ## Key Features
87
-
88
- - **Free & Subscription Options** - Gemini, Qwen (free), Claude Pro/Max (subscription)
89
- - **Extensive Provider Support** - Any Anthropic, Gemini, or OpenAI-compatible provider [**Provider Guide →**](./docs/providers/quick-reference.md)
90
- - **Top Open Models** - GLM 4.6, MiniMax-2, Qwen 3 Coder
91
- - **Local Model Support** - LM Studio, llama.cpp, Ollama for complete privacy
92
- - **Profile System** - Save provider configurations and model settings
93
- - **Advanced Subagents** - Isolated AI assistants with different models/providers
94
- - **MCP Integration** - Connect to external tools and services
95
- - **Beautiful Terminal UI** - Multiple themes with syntax highlighting
96
-
97
- ## Interactive vs Non-Interactive Workflows
98
-
99
- **Interactive Mode (REPL):**
100
- Perfect for exploration, rapid prototyping, and iterative development:
101
-
102
- ```bash
103
- # Start interactive session
104
- llxprt
105
-
106
- > Explore this codebase and suggest improvements
107
- > Create a REST API endpoint with tests
108
- > Debug this authentication issue
109
- > Optimize this database query
110
- ```
111
-
112
- **Non-Interactive Mode:**
113
- Ideal for automation, CI/CD, and scripted workflows:
114
-
115
- ```bash
116
- # Single command with immediate response
117
- llxprt --profile-load zai-glm46 "Refactor this function for better readability"
118
- llxprt "Generate unit tests for payment module" > tests/payment.test.js
119
- ```
120
-
121
- ## Top Open Weight Models
122
-
123
- LLxprt Code works seamlessly with the best open-weight models:
124
-
125
- ### GLM 4.6
126
-
127
- - **Context Window**: 200,000 tokens
128
- - **Architecture**: Mixture-of-Experts with 355B total parameters (32B active)
129
- - **Strengths**: Coding, multi-step planning, tool integration
130
- - **15% fewer tokens** for equivalent tasks vs previous generation
131
-
132
- ### MiniMax-2
133
-
134
- - **Context Window**: ~204,800 tokens
135
- - **Architecture**: MoE with 230B total parameters (10B active)
136
- - **Strengths**: Coding workflows, multi-step agents, tool calling
137
- - **Cost**: Only 8% of Claude Sonnet, ~2x faster
138
-
139
- ### Qwen 3 Coder
140
-
141
- - **Context Window**: 256,000 tokens (extendable to 1M)
142
- - **Architecture**: MoE with 480B total parameters (35B active)
143
- - **Strengths**: Agentic coding, browser automation, tool usage
144
- - **Performance**: State-of-the-art on SWE-bench Verified (69.6%)
145
-
146
- ## Local Models
147
-
148
- Run models completely offline for maximum privacy:
149
-
150
- ```bash
151
- # With LM Studio
152
- /provider openai
153
- /baseurl http://localhost:1234/v1/
154
- /model your-local-model
155
-
156
- # With Ollama
157
- /provider ollama
158
- /model codellama:13b
159
- ```
160
-
161
- Supported local providers:
162
-
163
- - **LM Studio**: Easy Windows/Mac/Linux setup
164
- - **llama.cpp**: Maximum performance and control
165
- - **Ollama**: Simple model management
166
- - **Any OpenAI-compatible API**: Full flexibility
167
-
168
- ## Advanced Subagents
169
-
170
- Create specialized AI assistants with isolated contexts and different configurations:
171
-
172
- ```bash
173
- # Subagents run with custom profiles and tool access
174
- # Access via the commands interface
175
- /subagent list
176
- /subagent create <name>
177
- ```
178
-
179
- Each subagent can be configured with:
180
-
181
- - **Different providers** (Gemini vs Anthropic vs Qwen vs Local)
182
- - **Different models** (Flash vs Sonnet vs GLM 4.6 vs Custom)
183
- - **Different tool access** (Restrict or allow specific tools)
184
- - **Different settings** (Temperature, timeouts, max turns)
185
- - **Isolated runtime context** (No memory or state crossover)
186
-
187
- Subagents are designed for:
188
-
189
- - **Specialized tasks** (Code review, debugging, documentation)
190
- - **Different expertise areas** (Frontend vs Backend vs DevOps)
191
- - **Tool-limited environments** (Read-only analysis vs Full development)
192
- - **Experimental configurations** (Testing new models or settings)
193
-
194
- **[Full Subagent Documentation →](./docs/subagents.md)**
195
-
196
- ## Zed Integration
197
-
198
- Native Zed editor support for seamless development workflow:
199
-
200
- ```bash
201
- # Install Zed extension
202
- zed:install llxprt-code
203
-
204
- # Use within Zed
205
- # (See docs for Zed integration setup)
206
- ```
207
-
208
- Features:
209
-
210
- - **In-editor chat**: Direct AI interaction without leaving Zed
211
- - **Code selection**: Ask about specific code selections
212
- - **Inline suggestions**: Get AI help while typing
213
- - **Project awareness**: Full context of your open workspace
214
-
215
- ** [Zed Integration Guide →](./docs/zed-integration.md)**
216
-
217
- ** [Complete Provider Guide →](./docs/cli/providers.md)**
218
-
219
- ## Advanced Features
220
-
221
- - **Settings & Profiles**: Fine-tune model parameters and save configurations
222
- - **Subagents**: Create specialized assistants for different tasks
223
- - **MCP Servers**: Connect external tools and data sources
224
- - **Checkpointing**: Save and resume complex conversations
225
- - **IDE Integration**: Connect to VS Code and other editors
226
-
227
- ** [Full Documentation →](./docs/index.md)**
228
-
229
- ## Migration & Resources
230
-
231
- - **From Gemini CLI**: [Migration Guide](./docs/gemini-cli-tips.md)
232
- - **Local Models Setup**: [Local Models Guide](./docs/local-models.md)
233
- - **Command Reference**: [CLI Commands](./docs/cli/commands.md)
234
- - **Troubleshooting**: [Common Issues](./docs/troubleshooting.md)
235
-
236
- ## Privacy & Terms
237
-
238
- LLxprt Code does not collect telemetry by default. Your data stays with you unless you choose to send it to external AI providers.
239
-
240
- When using external services, their respective terms of service apply:
241
-
242
- - [OpenAI Terms](https://openai.com/policies/terms-of-use)
243
- - [Anthropic Terms](https://www.anthropic.com/legal/terms)
244
- - [Google Terms](https://policies.google.com/terms)
package/dist/index.d.ts CHANGED
@@ -8,10 +8,10 @@ export { DEFAULT_GEMINI_MODEL, DEFAULT_GEMINI_FLASH_MODEL, DEFAULT_GEMINI_FLASH_
8
8
  export { QwenDeviceFlow, DeviceFlowConfig, } from './src/auth/qwen-device-flow.js';
9
9
  export { MultiProviderTokenStore } from './src/auth/token-store.js';
10
10
  export { openBrowserSecurely, shouldLaunchBrowser, } from './src/utils/secure-browser-launcher.js';
11
+ export { IDE_DEFINITIONS, detectIdeFromEnv } from './src/ide/detect-ide.js';
11
12
  export { SettingsService } from './src/settings/SettingsService.js';
12
13
  export type { ISettingsService, GlobalSettings, SettingsChangeEvent, ProviderSettings, UISettings, AdvancedSettings, EventListener, EventUnsubscribe, } from './src/settings/types.js';
13
14
  export type { TelemetrySettings as SettingsTelemetrySettings } from './src/settings/types.js';
14
15
  export { IdeConnectionEvent, IdeConnectionType, } from './src/telemetry/types.js';
15
16
  export { getIdeTrust } from './src/utils/ide-trust.js';
16
- export { makeFakeConfig } from './src/test-utils/config.js';
17
17
  export * from './src/utils/pathReader.js';
package/dist/index.js CHANGED
@@ -8,11 +8,11 @@ export { DEFAULT_GEMINI_MODEL, DEFAULT_GEMINI_FLASH_MODEL, DEFAULT_GEMINI_FLASH_
8
8
  export { QwenDeviceFlow, } from './src/auth/qwen-device-flow.js';
9
9
  export { MultiProviderTokenStore } from './src/auth/token-store.js';
10
10
  export { openBrowserSecurely, shouldLaunchBrowser, } from './src/utils/secure-browser-launcher.js';
11
+ export { IDE_DEFINITIONS, detectIdeFromEnv } from './src/ide/detect-ide.js';
11
12
  // Re-export settings system for explicit access
12
13
  export { SettingsService } from './src/settings/SettingsService.js';
13
14
  // IDE connection telemetry exports removed - telemetry disabled in llxprt
14
15
  export { IdeConnectionEvent, IdeConnectionType, } from './src/telemetry/types.js';
15
16
  export { getIdeTrust } from './src/utils/ide-trust.js';
16
- export { makeFakeConfig } from './src/test-utils/config.js';
17
17
  export * from './src/utils/pathReader.js';
18
18
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,gBAAgB,CAAC;AAC/B,OAAO,EACL,oBAAoB,EACpB,0BAA0B,EAC1B,+BAA+B,EAC/B,8BAA8B,GAC/B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,cAAc,GAEf,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EACL,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,wCAAwC,CAAC;AAEhD,gDAAgD;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AAYpE,0EAA0E;AAC1E,OAAO,EACL,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,cAAc,2BAA2B,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,gBAAgB,CAAC;AAC/B,OAAO,EACL,oBAAoB,EACpB,0BAA0B,EAC1B,+BAA+B,EAC/B,8BAA8B,GAC/B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,cAAc,GAEf,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EACL,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAE5E,gDAAgD;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AAYpE,0EAA0E;AAC1E,OAAO,EACL,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,cAAc,2BAA2B,CAAC"}
@@ -0,0 +1,46 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import type { AgentDefinition } from './types.js';
7
+ import { z } from 'zod';
8
+ declare const CodebaseInvestigationReportSchema: z.ZodObject<{
9
+ SummaryOfFindings: z.ZodString;
10
+ ExplorationTrace: z.ZodArray<z.ZodString, "many">;
11
+ RelevantLocations: z.ZodArray<z.ZodObject<{
12
+ FilePath: z.ZodString;
13
+ Reasoning: z.ZodString;
14
+ KeySymbols: z.ZodArray<z.ZodString, "many">;
15
+ }, "strip", z.ZodTypeAny, {
16
+ FilePath: string;
17
+ Reasoning: string;
18
+ KeySymbols: string[];
19
+ }, {
20
+ FilePath: string;
21
+ Reasoning: string;
22
+ KeySymbols: string[];
23
+ }>, "many">;
24
+ }, "strip", z.ZodTypeAny, {
25
+ SummaryOfFindings: string;
26
+ ExplorationTrace: string[];
27
+ RelevantLocations: {
28
+ FilePath: string;
29
+ Reasoning: string;
30
+ KeySymbols: string[];
31
+ }[];
32
+ }, {
33
+ SummaryOfFindings: string;
34
+ ExplorationTrace: string[];
35
+ RelevantLocations: {
36
+ FilePath: string;
37
+ Reasoning: string;
38
+ KeySymbols: string[];
39
+ }[];
40
+ }>;
41
+ /**
42
+ * A Proof-of-Concept subagent specialized in analyzing codebase structure,
43
+ * dependencies, and technologies.
44
+ */
45
+ export declare const CodebaseInvestigatorAgent: AgentDefinition<typeof CodebaseInvestigationReportSchema>;
46
+ export {};
@@ -0,0 +1,136 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { LSTool } from '../tools/ls.js';
7
+ import { ReadFileTool } from '../tools/read-file.js';
8
+ import { GlobTool } from '../tools/glob.js';
9
+ import { GrepTool } from '../tools/grep.js';
10
+ import { DEFAULT_GEMINI_MODEL } from '../config/models.js';
11
+ import { z } from 'zod';
12
+ // Define a type that matches the outputConfig schema for type safety.
13
+ const CodebaseInvestigationReportSchema = z.object({
14
+ SummaryOfFindings: z
15
+ .string()
16
+ .describe("A summary of the investigation's conclusions and insights for the main agent."),
17
+ ExplorationTrace: z
18
+ .array(z.string())
19
+ .describe('A step-by-step list of actions and tools used during the investigation.'),
20
+ RelevantLocations: z
21
+ .array(z.object({
22
+ FilePath: z.string(),
23
+ Reasoning: z.string(),
24
+ KeySymbols: z.array(z.string()),
25
+ }))
26
+ .describe('A list of relevant files and the key symbols within them.'),
27
+ });
28
+ /**
29
+ * A Proof-of-Concept subagent specialized in analyzing codebase structure,
30
+ * dependencies, and technologies.
31
+ */
32
+ export const CodebaseInvestigatorAgent = {
33
+ name: 'codebase_investigator',
34
+ displayName: 'Codebase Investigator Agent',
35
+ description: `Your primary tool for multifile search tasks and codebase exploration.
36
+ Invoke this tool to delegate search tasks to an autonomous subagent.
37
+ Use this to find features, understand context, or locate specific files, functions, or symbols.
38
+ Returns a structured Json report with key file paths, symbols, architectural map and insights to solve a task or answer questions`,
39
+ inputConfig: {
40
+ inputs: {
41
+ objective: {
42
+ description: `A comprehensive and detailed description of the user's ultimate goal.
43
+ You must include original user's objective as well as questions and any extra context and questions you may have.`,
44
+ type: 'string',
45
+ required: true,
46
+ },
47
+ },
48
+ },
49
+ outputConfig: {
50
+ outputName: 'report',
51
+ description: 'The final investigation report as a JSON object.',
52
+ schema: CodebaseInvestigationReportSchema,
53
+ },
54
+ // The 'output' parameter is now strongly typed as CodebaseInvestigationReportSchema
55
+ processOutput: (output) => JSON.stringify(output, null, 2),
56
+ modelConfig: {
57
+ model: DEFAULT_GEMINI_MODEL,
58
+ temp: 0.1,
59
+ top_p: 0.95,
60
+ thinkingBudget: -1,
61
+ },
62
+ runConfig: {
63
+ max_time_minutes: 5,
64
+ max_turns: 15,
65
+ },
66
+ toolConfig: {
67
+ // Grant access only to read-only tools.
68
+ tools: [LSTool.Name, ReadFileTool.Name, GlobTool.Name, GrepTool.Name],
69
+ },
70
+ promptConfig: {
71
+ query: `Your task is to do a deep investigation of the codebase to find all relevant files, code locations, architectural mental map and insights to solve for the following user objective:
72
+ <objective>
73
+ \${objective}
74
+ </objective>`,
75
+ systemPrompt: `You are **Codebase Investigator**, a hyper-specialized AI agent and an expert in reverse-engineering complex software projects. You are a sub-agent within a larger development system.
76
+ Your **SOLE PURPOSE** is to build a complete mental model of the code relevant to a given investigation. You must identify all relevant files, understand their roles, and foresee the direct architectural consequences of potential changes.
77
+ You are a sub-agent in a larger system. Your only responsibility is to provide deep, actionable context.
78
+ - **DO:** Find the key modules, classes, and functions that are part of the problem and its solution.
79
+ - **DO:** Understand *why* the code is written the way it is. Question everything.
80
+ - **DO:** Foresee the ripple effects of a change. If \`function A\` is modified, you must check its callers. If a data structure is altered, you must identify where its type definitions need to be updated.
81
+ - **DO:** provide a conclusion and insights to the main agent that invoked you. If the agent is trying to solve a bug, you should provide the root cause of the bug, its impacts, how to fix it etc. If it's a new feature, you should provide insights on where to implement it, what chagnes are necessary etc.
82
+ - **DO NOT:** Write the final implementation code yourself.
83
+ - **DO NOT:** Stop at the first relevant file. Your goal is a comprehensive understanding of the entire relevant subsystem.
84
+ You operate in a non-interactive loop and must reason based on the information provided and the output of your tools.
85
+ ---
86
+ ## Core Directives
87
+ <RULES>
88
+ 1. **DEEP ANALYSIS, NOT JUST FILE FINDING:** Your goal is to understand the *why* behind the code. Don't just list files; explain their purpose and the role of their key components. Your final report should empower another agent to make a correct and complete fix.
89
+ 2. **SYSTEMATIC & CURIOUS EXPLORATION:** Start with high-value clues (like tracebacks or ticket numbers) and broaden your search as needed. Think like a senior engineer doing a code review. An initial file contains clues (imports, function calls, puzzling logic). **If you find something you don't understand, you MUST prioritize investigating it until it is clear.** Treat confusion as a signal to dig deeper.
90
+ 3. **HOLISTIC & PRECISE:** Your goal is to find the complete and minimal set of locations that need to be understood or changed. Do not stop until you are confident you have considered the side effects of a potential fix (e.g., type errors, breaking changes to callers, opportunities for code reuse).
91
+ 4. **Web Search:** You are allowed to use the \`web_fetch\` tool to research libraries, language features, or concepts you don't understand (e.g., "what does gettext.translation do with localedir=None?").
92
+ </RULES>
93
+ ---
94
+ ## Scratchpad Management
95
+ **This is your most critical function. Your scratchpad is your memory and your plan.**
96
+ 1. **Initialization:** On your very first turn, you **MUST** create the \`<scratchpad>\` section. Analyze the \`task\` and create an initial \`Checklist\` of investigation goals and a \`Questions to Resolve\` section for any initial uncertainties.
97
+ 2. **Constant Updates:** After **every** \`<OBSERVATION>\`, you **MUST** update the scratchpad.
98
+ * Mark checklist items as complete: \`[x]\`.
99
+ * Add new checklist items as you trace the architecture.
100
+ * **Explicitly log questions in \`Questions to Resolve\`** (e.g., \`[ ] What is the purpose of the 'None' element in this list?\`). Do not consider your investigation complete until this list is empty.
101
+ * Record \`Key Findings\` with file paths and notes about their purpose and relevance.
102
+ * Update \`Irrelevant Paths to Ignore\` to avoid re-investigating dead ends.
103
+ 3. **Thinking on Paper:** The scratchpad must show your reasoning process, including how you resolve your questions.
104
+ ---
105
+ ## Termination
106
+ Your mission is complete **ONLY** when your \`Questions to Resolve\` list is empty and you have identified all files and necessary change *considerations*.
107
+ When you are finished, you **MUST** call the \`complete_task\` tool. The \`report\` argument for this tool **MUST** be a valid JSON object containing your findings.
108
+
109
+ **Example of the final report**
110
+ \`\`\`json
111
+ {
112
+ "SummaryOfFindings": "The core issue is a race condition in the \`updateUser\` function. The function reads the user's state, performs an asynchronous operation, and then writes the state back. If another request modifies the user state during the async operation, that change will be overwritten. The fix requires implementing a transactional read-modify-write pattern, potentially using a database lock or a versioning system.",
113
+ "ExplorationTrace": [
114
+ "Used \`grep\` to search for \`updateUser\` to locate the primary function.",
115
+ "Read the file \`src/controllers/userController.js\` to understand the function's logic.",
116
+ "Used \`ls -R\` to look for related files, such as services or database models.",
117
+ "Read \`src/services/userService.js\` and \`src/models/User.js\` to understand the data flow and how state is managed."
118
+ ],
119
+ "RelevantLocations": [
120
+ {
121
+ "FilePath": "src/controllers/userController.js",
122
+ "Reasoning": "This file contains the \`updateUser\` function which has the race condition. It's the entry point for the problematic logic.",
123
+ "KeySymbols": ["updateUser", "getUser", "saveUser"]
124
+ },
125
+ {
126
+ "FilePath": "src/services/userService.js",
127
+ "Reasoning": "This service is called by the controller and handles the direct interaction with the data layer. Any locking mechanism would likely be implemented here.",
128
+ "KeySymbols": ["updateUserData"]
129
+ }
130
+ ]
131
+ }
132
+ \`\`\`
133
+ `,
134
+ },
135
+ };
136
+ //# sourceMappingURL=codebase-investigator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"codebase-investigator.js","sourceRoot":"","sources":["../../../src/agents/codebase-investigator.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,sEAAsE;AACtE,MAAM,iCAAiC,GAAG,CAAC,CAAC,MAAM,CAAC;IACjD,iBAAiB,EAAE,CAAC;SACjB,MAAM,EAAE;SACR,QAAQ,CACP,+EAA+E,CAChF;IACH,gBAAgB,EAAE,CAAC;SAChB,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;SACjB,QAAQ,CACP,yEAAyE,CAC1E;IACH,iBAAiB,EAAE,CAAC;SACjB,KAAK,CACJ,CAAC,CAAC,MAAM,CAAC;QACP,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;QACpB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;QACrB,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;KAChC,CAAC,CACH;SACA,QAAQ,CAAC,2DAA2D,CAAC;CACzE,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAElC;IACF,IAAI,EAAE,uBAAuB;IAC7B,WAAW,EAAE,6BAA6B;IAC1C,WAAW,EAAE;;;sIAGuH;IACpI,WAAW,EAAE;QACX,MAAM,EAAE;YACN,SAAS,EAAE;gBACT,WAAW,EAAE;4HACuG;gBACpH,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;aACf;SACF;KACF;IACD,YAAY,EAAE;QACZ,UAAU,EAAE,QAAQ;QACpB,WAAW,EAAE,kDAAkD;QAC/D,MAAM,EAAE,iCAAiC;KAC1C;IAED,oFAAoF;IACpF,aAAa,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;IAE1D,WAAW,EAAE;QACX,KAAK,EAAE,oBAAoB;QAC3B,IAAI,EAAE,GAAG;QACT,KAAK,EAAE,IAAI;QACX,cAAc,EAAE,CAAC,CAAC;KACnB;IAED,SAAS,EAAE;QACT,gBAAgB,EAAE,CAAC;QACnB,SAAS,EAAE,EAAE;KACd;IAED,UAAU,EAAE;QACV,wCAAwC;QACxC,KAAK,EAAE,CAAC,MAAM,CAAC,IAAI,EAAE,YAAY,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC;KACtE;IAED,YAAY,EAAE;QACZ,KAAK,EAAE;;;aAGE;QACT,YAAY,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0DjB;KACE;CACF,CAAC"}
@@ -0,0 +1,92 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import type { Config } from '../config/config.js';
7
+ import type { AgentDefinition, AgentInputs, OutputObject, SubagentActivityEvent } from './types.js';
8
+ import { type z } from 'zod';
9
+ /** A callback function to report on agent activity. */
10
+ export type ActivityCallback = (activity: SubagentActivityEvent) => void;
11
+ /**
12
+ * Executes an agent loop based on an {@link AgentDefinition}.
13
+ *
14
+ * This executor runs the agent in a loop, calling tools until it calls the
15
+ * mandatory `complete_task` tool to signal completion.
16
+ */
17
+ export declare class AgentExecutor<TOutput extends z.ZodTypeAny> {
18
+ readonly definition: AgentDefinition<TOutput>;
19
+ private readonly agentId;
20
+ private readonly toolRegistry;
21
+ private readonly runtimeContext;
22
+ private readonly onActivity?;
23
+ /**
24
+ * Creates and validates a new `AgentExecutor` instance.
25
+ *
26
+ * This method ensures that all tools specified in the agent's definition are
27
+ * safe for non-interactive use before creating the executor.
28
+ *
29
+ * @param definition The definition object for the agent.
30
+ * @param runtimeContext The global runtime configuration.
31
+ * @param onActivity An optional callback to receive activity events.
32
+ * @returns A promise that resolves to a new `AgentExecutor` instance.
33
+ */
34
+ static create<TOutput extends z.ZodTypeAny>(definition: AgentDefinition<TOutput>, runtimeContext: Config, onActivity?: ActivityCallback): Promise<AgentExecutor<TOutput>>;
35
+ /**
36
+ * Constructs a new AgentExecutor instance.
37
+ *
38
+ * @private This constructor is private. Use the static `create` method to
39
+ * instantiate the class.
40
+ */
41
+ private constructor();
42
+ /**
43
+ * Runs the agent.
44
+ *
45
+ * @param inputs The validated input parameters for this invocation.
46
+ * @param signal An `AbortSignal` for cancellation.
47
+ * @returns A promise that resolves to the agent's final output.
48
+ */
49
+ run(inputs: AgentInputs, signal: AbortSignal): Promise<OutputObject>;
50
+ /**
51
+ * Calls the generative model with the current context and tools.
52
+ *
53
+ * @returns The model's response, including any tool calls or text.
54
+ */
55
+ private callModel;
56
+ /** Initializes a `GeminiChat` instance for the agent run. */
57
+ private createChatObject;
58
+ /**
59
+ * Executes function calls requested by the model and returns the results.
60
+ *
61
+ * @returns A new `Content` object for history, any submitted output, and completion status.
62
+ */
63
+ private processFunctionCalls;
64
+ /**
65
+ * Prepares the list of tool function declarations to be sent to the model.
66
+ */
67
+ private prepareToolsList;
68
+ /** Builds the system prompt from the agent definition and inputs. */
69
+ private buildSystemPrompt;
70
+ /**
71
+ * Applies template strings to initial messages.
72
+ *
73
+ * @param initialMessages The initial messages from the prompt config.
74
+ * @param inputs The validated input parameters for this invocation.
75
+ * @returns A new array of `Content` with templated strings.
76
+ */
77
+ private applyTemplateToInitialMessages;
78
+ /**
79
+ * Validates that all tools in a registry are safe for non-interactive use.
80
+ *
81
+ * @throws An error if a tool is not on the allow-list for non-interactive execution.
82
+ */
83
+ private static validateTools;
84
+ /**
85
+ * Checks if the agent should terminate due to exceeding configured limits.
86
+ *
87
+ * @returns The reason for termination, or `null` if execution can continue.
88
+ */
89
+ private checkTermination;
90
+ /** Emits an activity event to the configured callback. */
91
+ private emitActivity;
92
+ }