agent-sory 1.0.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 (195) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +265 -0
  3. package/dist/commands/base.d.ts +26 -0
  4. package/dist/commands/base.d.ts.map +1 -0
  5. package/dist/commands/base.js +3 -0
  6. package/dist/commands/base.js.map +1 -0
  7. package/dist/commands/definitions/clear.d.ts +3 -0
  8. package/dist/commands/definitions/clear.d.ts.map +1 -0
  9. package/dist/commands/definitions/clear.js +12 -0
  10. package/dist/commands/definitions/clear.js.map +1 -0
  11. package/dist/commands/definitions/help.d.ts +3 -0
  12. package/dist/commands/definitions/help.d.ts.map +1 -0
  13. package/dist/commands/definitions/help.js +28 -0
  14. package/dist/commands/definitions/help.js.map +1 -0
  15. package/dist/commands/definitions/init.d.ts +3 -0
  16. package/dist/commands/definitions/init.d.ts.map +1 -0
  17. package/dist/commands/definitions/init.js +23 -0
  18. package/dist/commands/definitions/init.js.map +1 -0
  19. package/dist/commands/definitions/login.d.ts +3 -0
  20. package/dist/commands/definitions/login.d.ts.map +1 -0
  21. package/dist/commands/definitions/login.js +8 -0
  22. package/dist/commands/definitions/login.js.map +1 -0
  23. package/dist/commands/definitions/model.d.ts +3 -0
  24. package/dist/commands/definitions/model.d.ts.map +1 -0
  25. package/dist/commands/definitions/model.js +10 -0
  26. package/dist/commands/definitions/model.js.map +1 -0
  27. package/dist/commands/definitions/reasoning.d.ts +3 -0
  28. package/dist/commands/definitions/reasoning.d.ts.map +1 -0
  29. package/dist/commands/definitions/reasoning.js +21 -0
  30. package/dist/commands/definitions/reasoning.js.map +1 -0
  31. package/dist/commands/definitions/stats.d.ts +3 -0
  32. package/dist/commands/definitions/stats.d.ts.map +1 -0
  33. package/dist/commands/definitions/stats.js +22 -0
  34. package/dist/commands/definitions/stats.js.map +1 -0
  35. package/dist/commands/index.d.ts +6 -0
  36. package/dist/commands/index.d.ts.map +1 -0
  37. package/dist/commands/index.js +38 -0
  38. package/dist/commands/index.js.map +1 -0
  39. package/dist/core/agent.d.ts +41 -0
  40. package/dist/core/agent.d.ts.map +1 -0
  41. package/dist/core/agent.js +266 -0
  42. package/dist/core/agent.js.map +1 -0
  43. package/dist/core/cli.d.ts +3 -0
  44. package/dist/core/cli.d.ts.map +1 -0
  45. package/dist/core/cli.js +48 -0
  46. package/dist/core/cli.js.map +1 -0
  47. package/dist/core/llm/factory.d.ts +12 -0
  48. package/dist/core/llm/factory.d.ts.map +1 -0
  49. package/dist/core/llm/factory.js +44 -0
  50. package/dist/core/llm/factory.js.map +1 -0
  51. package/dist/core/llm/providers/gemini.d.ts +22 -0
  52. package/dist/core/llm/providers/gemini.d.ts.map +1 -0
  53. package/dist/core/llm/providers/gemini.js +167 -0
  54. package/dist/core/llm/providers/gemini.js.map +1 -0
  55. package/dist/core/llm/providers/groq.d.ts +23 -0
  56. package/dist/core/llm/providers/groq.d.ts.map +1 -0
  57. package/dist/core/llm/providers/groq.js +96 -0
  58. package/dist/core/llm/providers/groq.js.map +1 -0
  59. package/dist/core/llm/providers/openai-compatible.d.ts +24 -0
  60. package/dist/core/llm/providers/openai-compatible.d.ts.map +1 -0
  61. package/dist/core/llm/providers/openai-compatible.js +86 -0
  62. package/dist/core/llm/providers/openai-compatible.js.map +1 -0
  63. package/dist/core/llm/types.d.ts +37 -0
  64. package/dist/core/llm/types.d.ts.map +1 -0
  65. package/dist/core/llm/types.js +2 -0
  66. package/dist/core/llm/types.js.map +1 -0
  67. package/dist/core/prompts/system.d.ts +6 -0
  68. package/dist/core/prompts/system.d.ts.map +1 -0
  69. package/dist/core/prompts/system.js +36 -0
  70. package/dist/core/prompts/system.js.map +1 -0
  71. package/dist/tests/proxy-config.test.d.ts +2 -0
  72. package/dist/tests/proxy-config.test.d.ts.map +1 -0
  73. package/dist/tests/proxy-config.test.js +169 -0
  74. package/dist/tests/proxy-config.test.js.map +1 -0
  75. package/dist/tools/tool-schemas.d.ts +36 -0
  76. package/dist/tools/tool-schemas.d.ts.map +1 -0
  77. package/dist/tools/tool-schemas.js +482 -0
  78. package/dist/tools/tool-schemas.js.map +1 -0
  79. package/dist/tools/tools.d.ts +114 -0
  80. package/dist/tools/tools.d.ts.map +1 -0
  81. package/dist/tools/tools.js +1015 -0
  82. package/dist/tools/tools.js.map +1 -0
  83. package/dist/tools/utils/edit-logic.d.ts +9 -0
  84. package/dist/tools/utils/edit-logic.d.ts.map +1 -0
  85. package/dist/tools/utils/edit-logic.js +149 -0
  86. package/dist/tools/utils/edit-logic.js.map +1 -0
  87. package/dist/tools/utils/ripgrep-runner.d.ts +15 -0
  88. package/dist/tools/utils/ripgrep-runner.d.ts.map +1 -0
  89. package/dist/tools/utils/ripgrep-runner.js +90 -0
  90. package/dist/tools/utils/ripgrep-runner.js.map +1 -0
  91. package/dist/tools/validators.d.ts +4 -0
  92. package/dist/tools/validators.d.ts.map +1 -0
  93. package/dist/tools/validators.js +18 -0
  94. package/dist/tools/validators.js.map +1 -0
  95. package/dist/ui/App.d.ts +7 -0
  96. package/dist/ui/App.d.ts.map +1 -0
  97. package/dist/ui/App.js +12 -0
  98. package/dist/ui/App.js.map +1 -0
  99. package/dist/ui/components/core/Chat.d.ts +7 -0
  100. package/dist/ui/components/core/Chat.d.ts.map +1 -0
  101. package/dist/ui/components/core/Chat.js +60 -0
  102. package/dist/ui/components/core/Chat.js.map +1 -0
  103. package/dist/ui/components/core/MessageHistory.d.ts +7 -0
  104. package/dist/ui/components/core/MessageHistory.d.ts.map +1 -0
  105. package/dist/ui/components/core/MessageHistory.js +39 -0
  106. package/dist/ui/components/core/MessageHistory.js.map +1 -0
  107. package/dist/ui/components/core/MessageInput.d.ts +10 -0
  108. package/dist/ui/components/core/MessageInput.d.ts.map +1 -0
  109. package/dist/ui/components/core/MessageInput.js +130 -0
  110. package/dist/ui/components/core/MessageInput.js.map +1 -0
  111. package/dist/ui/components/display/DiffPreview.d.ts +15 -0
  112. package/dist/ui/components/display/DiffPreview.d.ts.map +1 -0
  113. package/dist/ui/components/display/DiffPreview.js +298 -0
  114. package/dist/ui/components/display/DiffPreview.js.map +1 -0
  115. package/dist/ui/components/display/Stats.d.ts +19 -0
  116. package/dist/ui/components/display/Stats.d.ts.map +1 -0
  117. package/dist/ui/components/display/Stats.js +31 -0
  118. package/dist/ui/components/display/Stats.js.map +1 -0
  119. package/dist/ui/components/display/TokenMetrics.d.ts +11 -0
  120. package/dist/ui/components/display/TokenMetrics.d.ts.map +1 -0
  121. package/dist/ui/components/display/TokenMetrics.js +16 -0
  122. package/dist/ui/components/display/TokenMetrics.js.map +1 -0
  123. package/dist/ui/components/display/ToolHistoryItem.d.ts +7 -0
  124. package/dist/ui/components/display/ToolHistoryItem.d.ts.map +1 -0
  125. package/dist/ui/components/display/ToolHistoryItem.js +102 -0
  126. package/dist/ui/components/display/ToolHistoryItem.js.map +1 -0
  127. package/dist/ui/components/input-overlays/ErrorRetry.d.ts +8 -0
  128. package/dist/ui/components/input-overlays/ErrorRetry.d.ts.map +1 -0
  129. package/dist/ui/components/input-overlays/ErrorRetry.js +6 -0
  130. package/dist/ui/components/input-overlays/ErrorRetry.js.map +1 -0
  131. package/dist/ui/components/input-overlays/Login.d.ts +7 -0
  132. package/dist/ui/components/input-overlays/Login.d.ts.map +1 -0
  133. package/dist/ui/components/input-overlays/Login.js +32 -0
  134. package/dist/ui/components/input-overlays/Login.js.map +1 -0
  135. package/dist/ui/components/input-overlays/MaxIterationsContinue.d.ts +8 -0
  136. package/dist/ui/components/input-overlays/MaxIterationsContinue.d.ts.map +1 -0
  137. package/dist/ui/components/input-overlays/MaxIterationsContinue.js +32 -0
  138. package/dist/ui/components/input-overlays/MaxIterationsContinue.js.map +1 -0
  139. package/dist/ui/components/input-overlays/ModelSelector.d.ts +12 -0
  140. package/dist/ui/components/input-overlays/ModelSelector.d.ts.map +1 -0
  141. package/dist/ui/components/input-overlays/ModelSelector.js +114 -0
  142. package/dist/ui/components/input-overlays/ModelSelector.js.map +1 -0
  143. package/dist/ui/components/input-overlays/PendingToolApproval.d.ts +10 -0
  144. package/dist/ui/components/input-overlays/PendingToolApproval.d.ts.map +1 -0
  145. package/dist/ui/components/input-overlays/PendingToolApproval.js +51 -0
  146. package/dist/ui/components/input-overlays/PendingToolApproval.js.map +1 -0
  147. package/dist/ui/components/input-overlays/SlashCommandSuggestions.d.ts +8 -0
  148. package/dist/ui/components/input-overlays/SlashCommandSuggestions.d.ts.map +1 -0
  149. package/dist/ui/components/input-overlays/SlashCommandSuggestions.js +13 -0
  150. package/dist/ui/components/input-overlays/SlashCommandSuggestions.js.map +1 -0
  151. package/dist/ui/hooks/useAgent.d.ts +41 -0
  152. package/dist/ui/hooks/useAgent.d.ts.map +1 -0
  153. package/dist/ui/hooks/useAgent.js +205 -0
  154. package/dist/ui/hooks/useAgent.js.map +1 -0
  155. package/dist/ui/hooks/useMouseScroll.d.ts +3 -0
  156. package/dist/ui/hooks/useMouseScroll.d.ts.map +1 -0
  157. package/dist/ui/hooks/useMouseScroll.js +32 -0
  158. package/dist/ui/hooks/useMouseScroll.js.map +1 -0
  159. package/dist/ui/hooks/useSessionStats.d.ts +20 -0
  160. package/dist/ui/hooks/useSessionStats.d.ts.map +1 -0
  161. package/dist/ui/hooks/useSessionStats.js +36 -0
  162. package/dist/ui/hooks/useSessionStats.js.map +1 -0
  163. package/dist/ui/hooks/useTokenMetrics.d.ts +21 -0
  164. package/dist/ui/hooks/useTokenMetrics.d.ts.map +1 -0
  165. package/dist/ui/hooks/useTokenMetrics.js +102 -0
  166. package/dist/ui/hooks/useTokenMetrics.js.map +1 -0
  167. package/dist/ui/utils/CodeColorizer.d.ts +5 -0
  168. package/dist/ui/utils/CodeColorizer.d.ts.map +1 -0
  169. package/dist/ui/utils/CodeColorizer.js +47 -0
  170. package/dist/ui/utils/CodeColorizer.js.map +1 -0
  171. package/dist/utils/constants.d.ts +8 -0
  172. package/dist/utils/constants.d.ts.map +1 -0
  173. package/dist/utils/constants.js +104 -0
  174. package/dist/utils/constants.js.map +1 -0
  175. package/dist/utils/context.d.ts +36 -0
  176. package/dist/utils/context.d.ts.map +1 -0
  177. package/dist/utils/context.js +239 -0
  178. package/dist/utils/context.js.map +1 -0
  179. package/dist/utils/file-ops.d.ts +21 -0
  180. package/dist/utils/file-ops.d.ts.map +1 -0
  181. package/dist/utils/file-ops.js +125 -0
  182. package/dist/utils/file-ops.js.map +1 -0
  183. package/dist/utils/local-settings.d.ts +18 -0
  184. package/dist/utils/local-settings.d.ts.map +1 -0
  185. package/dist/utils/local-settings.js +176 -0
  186. package/dist/utils/local-settings.js.map +1 -0
  187. package/dist/utils/markdown.d.ts +13 -0
  188. package/dist/utils/markdown.d.ts.map +1 -0
  189. package/dist/utils/markdown.js +122 -0
  190. package/dist/utils/markdown.js.map +1 -0
  191. package/dist/utils/proxy-config.d.ts +25 -0
  192. package/dist/utils/proxy-config.d.ts.map +1 -0
  193. package/dist/utils/proxy-config.js +145 -0
  194. package/dist/utils/proxy-config.js.map +1 -0
  195. package/package.json +76 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"groq.d.ts","sourceRoot":"","sources":["../../../../src/core/llm/providers/groq.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAGvE,qBAAa,YAAa,YAAW,WAAW;IAC9C,IAAI,SAAU;IACd,OAAO,CAAC,MAAM,CAAqB;IACnC,OAAO,CAAC,QAAQ,CAAC,CAAS;gBAEd,QAAQ,CAAC,EAAE,MAAM;IAI7B,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAYzB,IAAI,CACR,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,OAAO,EAAE,EACnB,OAAO,CAAC,EAAE;QACR,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,KAAK,CAAC,EAAE,GAAG,EAAE,CAAC;QACd,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,UAAU,CAAC;QAC1C,WAAW,CAAC,EAAE,WAAW,CAAC;KAC3B,GACA,OAAO,CAAC,kBAAkB,CAAC;IAgCxB,UAAU,CACd,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,OAAO,EAAE,EACnB,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,EAChC,OAAO,CAAC,EAAE;QACR,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,KAAK,CAAC,EAAE,GAAG,EAAE,CAAC;QACd,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,UAAU,CAAC;QAC1C,WAAW,CAAC,EAAE,WAAW,CAAC;KAC3B,GACA,OAAO,CAAC,kBAAkB,CAAC;CA+C/B"}
@@ -0,0 +1,96 @@
1
+ import Groq from 'groq-sdk';
2
+ import { getProxyAgent } from '../../../utils/proxy-config.js';
3
+ export class GroqProvider {
4
+ name = 'groq';
5
+ client = null;
6
+ proxyUrl;
7
+ constructor(proxyUrl) {
8
+ this.proxyUrl = proxyUrl;
9
+ }
10
+ configure(apiKey) {
11
+ const clientOptions = { apiKey };
12
+ // Add proxy support if configured
13
+ const proxyAgent = getProxyAgent(this.proxyUrl);
14
+ if (proxyAgent) {
15
+ clientOptions.httpAgent = proxyAgent;
16
+ }
17
+ this.client = new Groq(clientOptions);
18
+ }
19
+ async chat(model, messages, options) {
20
+ if (!this.client) {
21
+ throw new Error('Groq provider not configured. Call configure() first.');
22
+ }
23
+ const response = await this.client.chat.completions.create({
24
+ model: model,
25
+ messages: messages,
26
+ tools: options?.tools,
27
+ tool_choice: options?.toolChoice || 'auto',
28
+ temperature: options?.temperature || 1.0,
29
+ max_tokens: options?.maxTokens || 8000,
30
+ }, {
31
+ signal: options?.abortSignal
32
+ });
33
+ const choice = response.choices[0];
34
+ const message = choice.message;
35
+ return {
36
+ content: message.content,
37
+ tool_calls: message.tool_calls,
38
+ usage: response.usage ? {
39
+ prompt_tokens: response.usage.prompt_tokens,
40
+ completion_tokens: response.usage.completion_tokens,
41
+ total_tokens: response.usage.total_tokens,
42
+ total_time: response.usage.total_time
43
+ } : undefined,
44
+ reasoning: message.reasoning
45
+ };
46
+ }
47
+ async streamChat(model, messages, onChunk, options) {
48
+ if (!this.client)
49
+ throw new Error('Groq not configured');
50
+ const stream = await this.client.chat.completions.create({
51
+ model: model,
52
+ messages: messages,
53
+ tools: options?.tools,
54
+ tool_choice: options?.toolChoice || 'auto',
55
+ temperature: options?.temperature || 1.0,
56
+ max_tokens: options?.maxTokens || 8000,
57
+ stream: true,
58
+ }, { signal: options?.abortSignal });
59
+ let fullContent = '';
60
+ let tool_calls = [];
61
+ let finalUsage;
62
+ for await (const chunk of stream) {
63
+ const delta = chunk.choices[0]?.delta;
64
+ if (delta?.content) {
65
+ fullContent += delta.content;
66
+ onChunk(delta.content);
67
+ }
68
+ if (delta?.tool_calls) {
69
+ for (const tc of delta.tool_calls) {
70
+ const index = tc.index;
71
+ if (!tool_calls[index]) {
72
+ tool_calls[index] = {
73
+ id: tc.id,
74
+ type: 'function',
75
+ function: { name: '', arguments: '' }
76
+ };
77
+ }
78
+ if (tc.id)
79
+ tool_calls[index].id = tc.id;
80
+ if (tc.function?.name)
81
+ tool_calls[index].function.name += tc.function.name;
82
+ if (tc.function?.arguments)
83
+ tool_calls[index].function.arguments += tc.function.arguments;
84
+ }
85
+ }
86
+ if (chunk.x_groq?.usage)
87
+ finalUsage = chunk.x_groq.usage;
88
+ }
89
+ return {
90
+ content: fullContent,
91
+ tool_calls: tool_calls.filter(Boolean),
92
+ usage: finalUsage
93
+ };
94
+ }
95
+ }
96
+ //# sourceMappingURL=groq.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"groq.js","sourceRoot":"","sources":["../../../../src/core/llm/providers/groq.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,UAAU,CAAC;AAE5B,OAAO,EAAE,aAAa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LMProvider, Message, CompletionResponse } from '../types.js';
2
+ export declare class OpenAICompatibleProvider implements LLMProvider {
3
+ name: string;
4
+ private client;
5
+ private proxyUrl?;
6
+ private baseURL;
7
+ constructor(name: string, baseURL: string, proxyUrl?: string);
8
+ configure(apiKey: string): void;
9
+ chat(model: string, messages: Message[], options?: {
10
+ temperature?: number;
11
+ maxTokens?: number;
12
+ tools?: any[];
13
+ toolChoice?: 'auto' | 'none' | 'required';
14
+ abortSignal?: AbortSignal;
15
+ }): Promise<CompletionResponse>;
16
+ streamChat(model: string, messages: Message[], onChunk: (chunk: string) => void, options?: {
17
+ temperature?: number;
18
+ maxTokens?: number;
19
+ tools?: any[];
20
+ toolChoice?: 'auto' | 'none' | 'required';
21
+ abortSignal?: AbortSignal;
22
+ }): Promise<CompletionResponse>;
23
+ }
24
+ //# sourceMappingURL=openai-compatible.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"openai-compatible.d.ts","sourceRoot":"","sources":["../../../../src/core/llm/providers/openai-compatible.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAGvE,qBAAa,wBAAyB,YAAW,WAAW;IAC1D,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,MAAM,CAAuB;IACrC,OAAO,CAAC,QAAQ,CAAC,CAAS;IAC1B,OAAO,CAAC,OAAO,CAAS;gBAEZ,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM;IAM5D,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAczB,IAAI,CACR,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,OAAO,EAAE,EACnB,OAAO,CAAC,EAAE;QACR,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,KAAK,CAAC,EAAE,GAAG,EAAE,CAAC;QACd,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,UAAU,CAAC;QAC1C,WAAW,CAAC,EAAE,WAAW,CAAC;KAC3B,GACA,OAAO,CAAC,kBAAkB,CAAC;IA8BxB,UAAU,CACd,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,OAAO,EAAE,EACnB,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,EAChC,OAAO,CAAC,EAAE;QACR,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,KAAK,CAAC,EAAE,GAAG,EAAE,CAAC;QACd,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,UAAU,CAAC;QAC1C,WAAW,CAAC,EAAE,WAAW,CAAC;KAC3B,GACA,OAAO,CAAC,kBAAkB,CAAC;CAmC/B"}
@@ -0,0 +1,86 @@
1
+ import OpenAI from 'openai';
2
+ import { getProxyAgent } from '../../../utils/proxy-config.js';
3
+ export class OpenAICompatibleProvider {
4
+ name;
5
+ client = null;
6
+ proxyUrl;
7
+ baseURL;
8
+ constructor(name, baseURL, proxyUrl) {
9
+ this.name = name;
10
+ this.baseURL = baseURL;
11
+ this.proxyUrl = proxyUrl;
12
+ }
13
+ configure(apiKey) {
14
+ const clientOptions = {
15
+ apiKey,
16
+ baseURL: this.baseURL
17
+ };
18
+ const proxyAgent = getProxyAgent(this.proxyUrl);
19
+ if (proxyAgent) {
20
+ clientOptions.httpAgent = proxyAgent;
21
+ }
22
+ this.client = new OpenAI(clientOptions);
23
+ }
24
+ async chat(model, messages, options) {
25
+ if (!this.client) {
26
+ throw new Error(`${this.name} provider not configured. Call configure() first.`);
27
+ }
28
+ const response = await this.client.chat.completions.create({
29
+ model: model,
30
+ messages: messages,
31
+ tools: options?.tools,
32
+ tool_choice: options?.toolChoice || 'auto',
33
+ temperature: options?.temperature || 1.0,
34
+ max_tokens: options?.maxTokens || 8000,
35
+ }, {
36
+ signal: options?.abortSignal
37
+ });
38
+ const choice = response.choices[0];
39
+ const message = choice.message;
40
+ return {
41
+ content: message.content,
42
+ tool_calls: message.tool_calls,
43
+ usage: response.usage ? {
44
+ prompt_tokens: response.usage.prompt_tokens,
45
+ completion_tokens: response.usage.completion_tokens,
46
+ total_tokens: response.usage.total_tokens,
47
+ } : undefined
48
+ };
49
+ }
50
+ async streamChat(model, messages, onChunk, options) {
51
+ if (!this.client)
52
+ throw new Error('Not configured');
53
+ const stream = await this.client.chat.completions.create({
54
+ model: model,
55
+ messages: messages,
56
+ tools: options?.tools,
57
+ tool_choice: options?.toolChoice || 'auto',
58
+ temperature: options?.temperature || 1.0,
59
+ stream: true,
60
+ }, { signal: options?.abortSignal });
61
+ let fullContent = '';
62
+ let tool_calls = [];
63
+ for await (const chunk of stream) {
64
+ const delta = chunk.choices[0]?.delta;
65
+ if (delta?.content) {
66
+ fullContent += delta.content;
67
+ onChunk(delta.content);
68
+ }
69
+ if (delta?.tool_calls) {
70
+ delta.tool_calls.forEach((tc) => {
71
+ if (!tool_calls[tc.index])
72
+ tool_calls[tc.index] = { id: tc.id, function: { name: '', arguments: '' } };
73
+ if (tc.function?.name)
74
+ tool_calls[tc.index].function.name += tc.function.name;
75
+ if (tc.function?.arguments)
76
+ tool_calls[tc.index].function.arguments += tc.function.arguments;
77
+ });
78
+ }
79
+ }
80
+ return {
81
+ content: fullContent,
82
+ tool_calls: tool_calls.filter(Boolean),
83
+ };
84
+ }
85
+ }
86
+ //# sourceMappingURL=openai-compatible.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"openai-compatible.js","sourceRoot":"","sources":["../../../../src/core/llm/providers/openai-compatible.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAE/D,MAAM,OAAO,wBAAwB;IACnC,IAAI,CAAS;IACL,MAAM,GAAkB,IAAI,CAAC;IAC7B,QAAQ,CAAU;IAClB,OAAO,CA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AAK,EAAE,UAAU,EAAE,CAAC;gBACtB,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,EAAO,EAAE,EAAE;oBACnC,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,KAAK,CAAC;wBAAE,UAAU,CAAC,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,EAAE,CAAC;oBACvG,IAAI,EAAE,CAAC,QAAQ,EAAE,IAAI;wBAAE,UAAU,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,IAAI,IAAI,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC;oBAC9E,IAAI,EAAE,CAAC,QAAQ,EAAE,SAAS;wBAAE,UAAU,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,SAAS,IAAI,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC;gBAC/F,CAAC,CAAC,CAAC;YACL,CAAC;QACH,CAAC;QAED,OAAO;YACL,OAAO,EAAE,WAAW;YACpB,UAAU,EAAE,UAAU,CAAC,MAAM,CAAC,OAAO,CAAC;SACvC,CAAC;IACJ,CAAC;CACF"}
@@ -0,0 +1,37 @@
1
+ export interface Message {
2
+ role: 'system' | 'user' | 'assistant' | 'tool';
3
+ content: string;
4
+ tool_calls?: any[];
5
+ tool_call_id?: string;
6
+ name?: string;
7
+ }
8
+ export interface CompletionResponse {
9
+ content: string | null;
10
+ tool_calls?: any[];
11
+ usage?: {
12
+ prompt_tokens: number;
13
+ completion_tokens: number;
14
+ total_tokens: number;
15
+ total_time?: number;
16
+ };
17
+ reasoning?: string;
18
+ }
19
+ export interface LLMProvider {
20
+ name: string;
21
+ configure(apiKey: string): void;
22
+ chat(model: string, messages: Message[], options?: {
23
+ temperature?: number;
24
+ maxTokens?: number;
25
+ tools?: any[];
26
+ toolChoice?: 'auto' | 'none' | 'required';
27
+ abortSignal?: AbortSignal;
28
+ }): Promise<CompletionResponse>;
29
+ streamChat(model: string, messages: Message[], onChunk: (chunk: string) => void, options?: {
30
+ temperature?: number;
31
+ maxTokens?: number;
32
+ tools?: any[];
33
+ toolChoice?: 'auto' | 'none' | 'required';
34
+ abortSignal?: AbortSignal;
35
+ }): Promise<CompletionResponse>;
36
+ }
37
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/core/llm/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,QAAQ,GAAG,MAAM,GAAG,WAAW,GAAG,MAAM,CAAC;IAC/C,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,GAAG,EAAE,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,UAAU,CAAC,EAAE,GAAG,EAAE,CAAC;IACnB,KAAK,CAAC,EAAE;QACN,aAAa,EAAE,MAAM,CAAC;QACtB,iBAAiB,EAAE,MAAM,CAAC;QAC1B,YAAY,EAAE,MAAM,CAAC;QACrB,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB,CAAC;IACF,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IAEb,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAEhC,IAAI,CACF,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,OAAO,EAAE,EACnB,OAAO,CAAC,EAAE;QACR,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,KAAK,CAAC,EAAE,GAAG,EAAE,CAAC;QACd,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,UAAU,CAAC;QAC1C,WAAW,CAAC,EAAE,WAAW,CAAC;KAC3B,GACA,OAAO,CAAC,kBAAkB,CAAC,CAAC;IAE/B,UAAU,CACR,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,OAAO,EAAE,EACnB,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,EAChC,OAAO,CAAC,EAAE;QACR,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,KAAK,CAAC,EAAE,GAAG,EAAE,CAAC;QACd,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,UAAU,CAAC;QAC1C,WAAW,CAAC,EAAE,WAAW,CAAC;KAC3B,GACA,OAAO,CAAC,kBAAkB,CAAC,CAAC;CAChC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/core/llm/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Prompt système optimisé pour SORY.
3
+ * Inclut l'intelligence de recherche multi-sources et ciblée.
4
+ */
5
+ export declare function getSystemPrompt(): string;
6
+ //# sourceMappingURL=system.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"system.d.ts","sourceRoot":"","sources":["../../../src/core/prompts/system.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,wBAAgB,eAAe,IAAI,MAAM,CA+BxC"}
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Prompt système optimisé pour SORY.
3
+ * Inclut l'intelligence de recherche multi-sources et ciblée.
4
+ */
5
+ export function getSystemPrompt() {
6
+ const cwd = process.cwd();
7
+ return `Tu es SORY, un ingénieur logiciel d'élite et un détective technique.
8
+
9
+ # RÈGLES DE LANGUE
10
+ - **RÉPONDS TOUJOURS EN FRANÇAIS**.
11
+
12
+ # STRATÉGIE DE RECHERCHE WEB
13
+ Tu possèdes un outil de recherche ultra-puissant (\`google_web_search\`) qui peut cibler différentes sources. Utilise-les intelligemment :
14
+ - **Recherche de code/repo/version** : Utilise indIndex{source: 'github'} indIndex.
15
+ - **Recherche d'outils CLI ou librairies JS** : Utilise indIndex{source: 'npm'} indIndex.
16
+ - **Recherche de définitions ou faits** : Utilise indIndex{source: 'wikipedia'} indIndex.
17
+ - **Recherche générale ou bugs** : Utilise indIndex{source: 'web'} indIndex ou indIndex{source: 'auto'} indIndex.
18
+
19
+ # COMPORTEMENT ET RÉACTION
20
+ 1. **ÉCHANGE** : Réponds aux salutations sans outils.
21
+ 2. **ACTION** : Si on te demande d'étudier un projet, lance 'list_files' puis 'read_many_files'.
22
+ 3. **PAS DE JSON** : Ne génère jamais de JSON textuel dans tes réponses. Déclenche les outils via l'interface.
23
+
24
+ # ANALYSE DE PROJET (Sur demande)
25
+ Produis un rapport structuré : VUE D'ENSEMBLE, STRUCTURE, FONCTIONNALITÉS, TECHNOLOGIES, AMÉLIORATIONS.
26
+
27
+ # RÈGLES DE QUALITÉ
28
+ - Ne répète jamais le code lu. Résume-le.
29
+ - Utilise des chemins relatifs.
30
+ - Anticipe les besoins de l'utilisateur (sécurité, optimisation).
31
+
32
+ # CONTEXTE
33
+ - Répertoire : ${cwd}
34
+ - Capacités : FS, RipGrep, Recherche ciblée (GitHub, NPM, Wiki).`;
35
+ }
36
+ //# sourceMappingURL=system.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"system.js","sourceRoot":"","sources":["../../../src/core/prompts/system.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,UAAU,eAAe;IAC7B,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;IAE1B,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;iBA0BQ,GAAG;iEAC6C,CAAC;AAClE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=proxy-config.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"proxy-config.test.d.ts","sourceRoot":"","sources":["../../src/tests/proxy-config.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,169 @@
1
+ import test from 'ava';
2
+ import { getProxyAgent, getProxyInfo } from '../utils/proxy-config.js';
3
+ // Helper to set and restore environment variables
4
+ function withEnv(env, fn) {
5
+ const original = {};
6
+ // Save original values
7
+ for (const key of Object.keys(env)) {
8
+ original[key] = process.env[key];
9
+ }
10
+ // Set new values
11
+ for (const [key, value] of Object.entries(env)) {
12
+ if (value === undefined) {
13
+ delete process.env[key];
14
+ }
15
+ else {
16
+ process.env[key] = value;
17
+ }
18
+ }
19
+ try {
20
+ fn();
21
+ }
22
+ finally {
23
+ // Restore original values
24
+ for (const [key, value] of Object.entries(original)) {
25
+ if (value === undefined) {
26
+ delete process.env[key];
27
+ }
28
+ else {
29
+ process.env[key] = value;
30
+ }
31
+ }
32
+ }
33
+ }
34
+ test('getProxyInfo returns disabled when no proxy is configured', t => {
35
+ withEnv({ HTTP_PROXY: undefined, HTTPS_PROXY: undefined, http_proxy: undefined, https_proxy: undefined }, () => {
36
+ const info = getProxyInfo();
37
+ t.is(info.enabled, false);
38
+ t.is(info.url, undefined);
39
+ t.is(info.type, undefined);
40
+ });
41
+ });
42
+ test('getProxyInfo detects HTTP_PROXY environment variable', t => {
43
+ withEnv({ HTTP_PROXY: 'http://proxy.example.com:8080', HTTPS_PROXY: undefined }, () => {
44
+ const info = getProxyInfo();
45
+ t.is(info.enabled, true);
46
+ t.is(info.url, 'http://proxy.example.com:8080');
47
+ t.is(info.type, 'http');
48
+ });
49
+ });
50
+ test('getProxyInfo detects HTTPS_PROXY environment variable', t => {
51
+ withEnv({ HTTPS_PROXY: 'http://secure-proxy.example.com:8443', HTTP_PROXY: undefined }, () => {
52
+ const info = getProxyInfo();
53
+ t.is(info.enabled, true);
54
+ t.is(info.url, 'http://secure-proxy.example.com:8443');
55
+ t.is(info.type, 'http');
56
+ });
57
+ });
58
+ test('getProxyInfo prefers HTTPS_PROXY over HTTP_PROXY', t => {
59
+ withEnv({
60
+ HTTPS_PROXY: 'http://secure-proxy.example.com:8443',
61
+ HTTP_PROXY: 'http://proxy.example.com:8080'
62
+ }, () => {
63
+ const info = getProxyInfo();
64
+ t.is(info.enabled, true);
65
+ t.is(info.url, 'http://secure-proxy.example.com:8443');
66
+ t.is(info.type, 'http');
67
+ });
68
+ });
69
+ test('getProxyInfo detects SOCKS5 proxy from URL scheme', t => {
70
+ withEnv({ HTTP_PROXY: 'socks5://socks-proxy.example.com:1080', HTTPS_PROXY: undefined }, () => {
71
+ const info = getProxyInfo();
72
+ t.is(info.enabled, true);
73
+ t.is(info.url, 'socks5://socks-proxy.example.com:1080');
74
+ t.is(info.type, 'socks');
75
+ });
76
+ });
77
+ test('getProxyInfo detects SOCKS proxy (without version) from URL scheme', t => {
78
+ withEnv({ HTTP_PROXY: 'socks://socks-proxy.example.com:1080', HTTPS_PROXY: undefined }, () => {
79
+ const info = getProxyInfo();
80
+ t.is(info.enabled, true);
81
+ t.is(info.url, 'socks://socks-proxy.example.com:1080');
82
+ t.is(info.type, 'socks');
83
+ });
84
+ });
85
+ test('getProxyInfo respects lowercase environment variables', t => {
86
+ withEnv({
87
+ http_proxy: 'http://proxy.example.com:3128',
88
+ https_proxy: 'http://secure-proxy.example.com:3128',
89
+ HTTP_PROXY: undefined,
90
+ HTTPS_PROXY: undefined
91
+ }, () => {
92
+ const info = getProxyInfo();
93
+ t.is(info.enabled, true);
94
+ t.is(info.url, 'http://secure-proxy.example.com:3128');
95
+ t.is(info.type, 'http');
96
+ });
97
+ });
98
+ test('getProxyInfo uses proxy override when provided', t => {
99
+ withEnv({ HTTP_PROXY: 'http://env-proxy.example.com:8080' }, () => {
100
+ const info = getProxyInfo('http://override-proxy.example.com:9090');
101
+ t.is(info.enabled, true);
102
+ t.is(info.url, 'http://override-proxy.example.com:9090');
103
+ t.is(info.type, 'http');
104
+ });
105
+ });
106
+ test('getProxyInfo detects SOCKS proxy type in override', t => {
107
+ withEnv({ HTTP_PROXY: 'http://env-proxy.example.com:8080' }, () => {
108
+ const info = getProxyInfo('socks5://override-socks.example.com:1080');
109
+ t.is(info.enabled, true);
110
+ t.is(info.url, 'socks5://override-socks.example.com:1080');
111
+ t.is(info.type, 'socks');
112
+ });
113
+ });
114
+ test('getProxyAgent returns undefined when no proxy is configured', t => {
115
+ withEnv({ HTTP_PROXY: undefined, HTTPS_PROXY: undefined }, () => {
116
+ const agent = getProxyAgent();
117
+ t.is(agent, undefined);
118
+ });
119
+ });
120
+ test('getProxyAgent creates HttpsProxyAgent for HTTP proxy', t => {
121
+ withEnv({ HTTP_PROXY: 'http://proxy.example.com:8080' }, () => {
122
+ const agent = getProxyAgent();
123
+ t.not(agent, undefined);
124
+ // Check that it's an HttpsProxyAgent instance
125
+ t.truthy(agent);
126
+ });
127
+ });
128
+ test('getProxyAgent creates SocksProxyAgent for SOCKS5 proxy', t => {
129
+ withEnv({ HTTP_PROXY: 'socks5://socks-proxy.example.com:1080' }, () => {
130
+ const agent = getProxyAgent();
131
+ t.not(agent, undefined);
132
+ // Check that it's a SocksProxyAgent instance
133
+ t.truthy(agent);
134
+ });
135
+ });
136
+ test('getProxyAgent uses override when provided', t => {
137
+ withEnv({ HTTP_PROXY: 'http://env-proxy.example.com:8080' }, () => {
138
+ const agent = getProxyAgent('http://override-proxy.example.com:9090');
139
+ t.not(agent, undefined);
140
+ t.truthy(agent);
141
+ });
142
+ });
143
+ test('getProxyAgent creates correct agent for SOCKS override', t => {
144
+ withEnv({ HTTP_PROXY: 'http://env-proxy.example.com:8080' }, () => {
145
+ const agent = getProxyAgent('socks5://override-socks.example.com:1080');
146
+ t.not(agent, undefined);
147
+ t.truthy(agent);
148
+ });
149
+ });
150
+ test('getProxyInfo sanitizes proxy URLs with credentials', t => {
151
+ const info = getProxyInfo('http://user:pass@proxy.example.com:8080');
152
+ t.is(info.enabled, true);
153
+ t.is(info.url, 'http://proxy.example.com:8080/');
154
+ t.is(info.type, 'http');
155
+ });
156
+ test('getProxyAgent handles invalid proxy URLs gracefully', t => {
157
+ const agent = getProxyAgent('not-a-valid-url');
158
+ t.is(agent, undefined);
159
+ });
160
+ test('getProxyInfo handles malformed URLs safely', t => {
161
+ const info = getProxyInfo('http://user@:pass@@proxy:8080');
162
+ t.is(info.enabled, true);
163
+ // Should return sanitized version or safe message
164
+ t.truthy(info.url);
165
+ if (info.url) {
166
+ t.not(info.url.includes('pass'), 'Password should be removed');
167
+ }
168
+ });
169
+ //# sourceMappingURL=proxy-config.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"proxy-config.test.js","sourceRoot":"","sources":["../../src/tests/proxy-config.test.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,KAAK,CAAC;AACvB,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAEvE,kDAAkD;AAClD,SAAS,OAAO,CAAC,GAAuC,EAAE,EAAc;IACtE,MAAM,QAAQ,GAAuC,EAAE,CAAC;IAExD,uBAAuB;IACvB,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;QACnC,QAAQ,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACnC,CAAC;IAED,iBAAiB;IACjB,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;QAC/C,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;YACxB,OAAO,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAC1B,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;QAC3B,CAAC;IACH,CAAC;IAED,IAAI,CAAC;QACH,EAAE,EAAE,CAAC;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;AAEH,IAAI,CAAC,oDAAoD,EAAE,CAAC,CAAC,EAAE;IAC7D,MAAM,IAAI,GAAG,YAAY,CAAC,yCAAyC,CAAC,CAAC;IACrE,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IACzB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE,gCAAgC,CAAC,CAAC;IACjD,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;AAC1B,CAAC,CAAC,CAAC;AAEH,IAAI,CAAC,qDAAqD,EAAE,CAAC,CAAC,EAAE;IAC9D,MAAM,KAAK,GAAG,aAAa,CAAC,iBAAiB,CAAC,CAAC;IAC/C,CAAC,CAAC,EAAE,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;AACzB,CAAC,CAAC,CAAC;AAEH,IAAI,CAAC,4CAA4C,EAAE,CAAC,CAAC,EAAE;IACrD,MAAM,IAAI,GAAG,YAAY,CAAC,+BAA+B,CAAC,CAAC;IAC3D,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IACzB,kDAAkD;IAClD,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACnB,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC;QACb,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,4BAA4B,CAAC,CAAC;IACjE,CAAC;AACH,CAAC,CAAC,CAAC"}
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Tool schemas for Groq function calling API.
3
+ * These define the available tools that the LLM can call.
4
+ */
5
+ export interface ToolSchema {
6
+ type: 'function';
7
+ function: {
8
+ name: string;
9
+ description: string;
10
+ parameters: {
11
+ type: 'object';
12
+ properties: Record<string, any>;
13
+ required: string[];
14
+ };
15
+ };
16
+ }
17
+ export declare const READ_FILE_SCHEMA: ToolSchema;
18
+ export declare const READ_MANY_FILES_SCHEMA: ToolSchema;
19
+ export declare const CREATE_FILE_SCHEMA: ToolSchema;
20
+ export declare const EDIT_FILE_SCHEMA: ToolSchema;
21
+ export declare const DELETE_FILE_SCHEMA: ToolSchema;
22
+ export declare const EXECUTE_COMMAND_SCHEMA: ToolSchema;
23
+ export declare const SEARCH_FILES_SCHEMA: ToolSchema;
24
+ export declare const LIST_FILES_SCHEMA: ToolSchema;
25
+ export declare const CREATE_TASKS_SCHEMA: ToolSchema;
26
+ export declare const UPDATE_TASKS_SCHEMA: ToolSchema;
27
+ export declare const GREP_SCHEMA: ToolSchema;
28
+ export declare const GLOB_SCHEMA: ToolSchema;
29
+ export declare const SAVE_MEMORY_SCHEMA: ToolSchema;
30
+ export declare const GOOGLE_WEB_SEARCH_SCHEMA: ToolSchema;
31
+ export declare const WEB_FETCH_SCHEMA: ToolSchema;
32
+ export declare const ALL_TOOL_SCHEMAS: ToolSchema[];
33
+ export declare const SAFE_TOOLS: string[];
34
+ export declare const APPROVAL_REQUIRED_TOOLS: string[];
35
+ export declare const DANGEROUS_TOOLS: string[];
36
+ //# sourceMappingURL=tool-schemas.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tool-schemas.d.ts","sourceRoot":"","sources":["../../src/tools/tool-schemas.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,UAAU,CAAC;IACjB,QAAQ,EAAE;QACR,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,EAAE,MAAM,CAAC;QACpB,UAAU,EAAE;YACV,IAAI,EAAE,QAAQ,CAAC;YACf,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;YAChC,QAAQ,EAAE,MAAM,EAAE,CAAC;SACpB,CAAC;KACH,CAAC;CACH;AAID,eAAO,MAAM,gBAAgB,EAAE,UA0B9B,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAA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