@defai.digital/ax-cli 0.0.34

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 (181) hide show
  1. package/.automatosx/agents/aerospace-scientist.yaml +159 -0
  2. package/.automatosx/agents/architecture.yaml +244 -0
  3. package/.automatosx/agents/backend.yaml +172 -0
  4. package/.automatosx/agents/ceo.yaml +105 -0
  5. package/.automatosx/agents/creative-marketer.yaml +173 -0
  6. package/.automatosx/agents/cto.yaml +118 -0
  7. package/.automatosx/agents/data-scientist.yaml +200 -0
  8. package/.automatosx/agents/data.yaml +106 -0
  9. package/.automatosx/agents/design.yaml +115 -0
  10. package/.automatosx/agents/devops.yaml +124 -0
  11. package/.automatosx/agents/frontend.yaml +171 -0
  12. package/.automatosx/agents/fullstack.yaml +172 -0
  13. package/.automatosx/agents/mobile.yaml +185 -0
  14. package/.automatosx/agents/product.yaml +103 -0
  15. package/.automatosx/agents/quality.yaml +93 -0
  16. package/.automatosx/agents/quantum-engineer.yaml +167 -0
  17. package/.automatosx/agents/researcher.yaml +122 -0
  18. package/.automatosx/agents/security.yaml +115 -0
  19. package/.automatosx/agents/standard.yaml +214 -0
  20. package/.automatosx/agents/writer.yaml +122 -0
  21. package/.automatosx/feature-flags.json +13 -0
  22. package/.automatosx/memory/memory.db +0 -0
  23. package/.automatosx/providers/README.md +117 -0
  24. package/.automatosx/providers/grok-zai.yaml.template +61 -0
  25. package/.automatosx/providers/grok.yaml.template +71 -0
  26. package/.automatosx/status/backend-1763517593334-85037.json +9 -0
  27. package/.automatosx/status/quality-1763516867087-82043.json +9 -0
  28. package/.automatosx/status/quality-1763516976722-84817.json +9 -0
  29. package/.automatosx/status/security-1763517871950-87357.json +9 -0
  30. package/.automatosx/teams/business.yaml +56 -0
  31. package/.automatosx/teams/core.yaml +60 -0
  32. package/.automatosx/teams/design.yaml +58 -0
  33. package/.automatosx/teams/engineering.yaml +69 -0
  34. package/.automatosx/teams/research.yaml +56 -0
  35. package/.automatosx/templates/analyst.yaml +60 -0
  36. package/.automatosx/templates/assistant.yaml +48 -0
  37. package/.automatosx/templates/basic-agent.yaml +28 -0
  38. package/.automatosx/templates/code-reviewer.yaml +52 -0
  39. package/.automatosx/templates/debugger.yaml +63 -0
  40. package/.automatosx/templates/designer.yaml +69 -0
  41. package/.automatosx/templates/developer.yaml +60 -0
  42. package/.automatosx/templates/fullstack-developer.yaml +395 -0
  43. package/.automatosx/templates/qa-specialist.yaml +71 -0
  44. package/.claude/mcp/automatosx.json +244 -0
  45. package/.claude/settings.local.json +34 -0
  46. package/.grok/settings.json +37 -0
  47. package/LICENSE +26 -0
  48. package/README.md +518 -0
  49. package/automatosx/PRD/README.md +9 -0
  50. package/automatosx/tmp/README.md +10 -0
  51. package/automatosx.config.json +333 -0
  52. package/dist/agent/grok-agent.d.ts +52 -0
  53. package/dist/agent/grok-agent.js +627 -0
  54. package/dist/agent/grok-agent.js.map +1 -0
  55. package/dist/agent/index.d.ts +14 -0
  56. package/dist/agent/index.js +136 -0
  57. package/dist/agent/index.js.map +1 -0
  58. package/dist/commands/mcp.d.ts +2 -0
  59. package/dist/commands/mcp.js +239 -0
  60. package/dist/commands/mcp.js.map +1 -0
  61. package/dist/grok/client.d.ts +49 -0
  62. package/dist/grok/client.js +80 -0
  63. package/dist/grok/client.js.map +1 -0
  64. package/dist/grok/tools.d.ts +8 -0
  65. package/dist/grok/tools.js +349 -0
  66. package/dist/grok/tools.js.map +1 -0
  67. package/dist/hooks/use-enhanced-input.d.ts +37 -0
  68. package/dist/hooks/use-enhanced-input.js +214 -0
  69. package/dist/hooks/use-enhanced-input.js.map +1 -0
  70. package/dist/hooks/use-input-handler.d.ts +34 -0
  71. package/dist/hooks/use-input-handler.js +608 -0
  72. package/dist/hooks/use-input-handler.js.map +1 -0
  73. package/dist/hooks/use-input-history.d.ts +9 -0
  74. package/dist/hooks/use-input-history.js +69 -0
  75. package/dist/hooks/use-input-history.js.map +1 -0
  76. package/dist/index.d.ts +2 -0
  77. package/dist/index.js +339 -0
  78. package/dist/index.js.map +1 -0
  79. package/dist/mcp/client.d.ts +31 -0
  80. package/dist/mcp/client.js +152 -0
  81. package/dist/mcp/client.js.map +1 -0
  82. package/dist/mcp/config.d.ts +13 -0
  83. package/dist/mcp/config.js +43 -0
  84. package/dist/mcp/config.js.map +1 -0
  85. package/dist/mcp/transports.d.ts +48 -0
  86. package/dist/mcp/transports.js +217 -0
  87. package/dist/mcp/transports.js.map +1 -0
  88. package/dist/schemas/index.d.ts +102 -0
  89. package/dist/schemas/index.js +105 -0
  90. package/dist/schemas/index.js.map +1 -0
  91. package/dist/tools/bash.d.ts +10 -0
  92. package/dist/tools/bash.js +82 -0
  93. package/dist/tools/bash.js.map +1 -0
  94. package/dist/tools/confirmation-tool.d.ts +16 -0
  95. package/dist/tools/confirmation-tool.js +72 -0
  96. package/dist/tools/confirmation-tool.js.map +1 -0
  97. package/dist/tools/index.d.ts +6 -0
  98. package/dist/tools/index.js +7 -0
  99. package/dist/tools/index.js.map +1 -0
  100. package/dist/tools/morph-editor.d.ts +36 -0
  101. package/dist/tools/morph-editor.js +308 -0
  102. package/dist/tools/morph-editor.js.map +1 -0
  103. package/dist/tools/search.d.ts +68 -0
  104. package/dist/tools/search.js +300 -0
  105. package/dist/tools/search.js.map +1 -0
  106. package/dist/tools/text-editor.d.ts +16 -0
  107. package/dist/tools/text-editor.js +526 -0
  108. package/dist/tools/text-editor.js.map +1 -0
  109. package/dist/tools/todo-tool.d.ts +20 -0
  110. package/dist/tools/todo-tool.js +129 -0
  111. package/dist/tools/todo-tool.js.map +1 -0
  112. package/dist/types/index.d.ts +30 -0
  113. package/dist/types/index.js +2 -0
  114. package/dist/types/index.js.map +1 -0
  115. package/dist/ui/app.d.ts +7 -0
  116. package/dist/ui/app.js +99 -0
  117. package/dist/ui/app.js.map +1 -0
  118. package/dist/ui/components/api-key-input.d.ts +7 -0
  119. package/dist/ui/components/api-key-input.js +80 -0
  120. package/dist/ui/components/api-key-input.js.map +1 -0
  121. package/dist/ui/components/chat-history.d.ts +8 -0
  122. package/dist/ui/components/chat-history.js +157 -0
  123. package/dist/ui/components/chat-history.js.map +1 -0
  124. package/dist/ui/components/chat-input.d.ts +9 -0
  125. package/dist/ui/components/chat-input.js +67 -0
  126. package/dist/ui/components/chat-input.js.map +1 -0
  127. package/dist/ui/components/chat-interface.d.ts +8 -0
  128. package/dist/ui/components/chat-interface.js +272 -0
  129. package/dist/ui/components/chat-interface.js.map +1 -0
  130. package/dist/ui/components/command-suggestions.d.ts +17 -0
  131. package/dist/ui/components/command-suggestions.js +22 -0
  132. package/dist/ui/components/command-suggestions.js.map +1 -0
  133. package/dist/ui/components/confirmation-dialog.d.ts +11 -0
  134. package/dist/ui/components/confirmation-dialog.js +105 -0
  135. package/dist/ui/components/confirmation-dialog.js.map +1 -0
  136. package/dist/ui/components/diff-renderer.d.ts +13 -0
  137. package/dist/ui/components/diff-renderer.js +186 -0
  138. package/dist/ui/components/diff-renderer.js.map +1 -0
  139. package/dist/ui/components/loading-spinner.d.ts +8 -0
  140. package/dist/ui/components/loading-spinner.js +59 -0
  141. package/dist/ui/components/loading-spinner.js.map +1 -0
  142. package/dist/ui/components/mcp-status.d.ts +5 -0
  143. package/dist/ui/components/mcp-status.js +36 -0
  144. package/dist/ui/components/mcp-status.js.map +1 -0
  145. package/dist/ui/components/model-selection.d.ts +12 -0
  146. package/dist/ui/components/model-selection.js +17 -0
  147. package/dist/ui/components/model-selection.js.map +1 -0
  148. package/dist/ui/shared/max-sized-box.d.ts +8 -0
  149. package/dist/ui/shared/max-sized-box.js +6 -0
  150. package/dist/ui/shared/max-sized-box.js.map +1 -0
  151. package/dist/ui/utils/code-colorizer.d.ts +2 -0
  152. package/dist/ui/utils/code-colorizer.js +7 -0
  153. package/dist/ui/utils/code-colorizer.js.map +1 -0
  154. package/dist/ui/utils/colors.d.ts +14 -0
  155. package/dist/ui/utils/colors.js +15 -0
  156. package/dist/ui/utils/colors.js.map +1 -0
  157. package/dist/ui/utils/markdown-renderer.d.ts +4 -0
  158. package/dist/ui/utils/markdown-renderer.js +23 -0
  159. package/dist/ui/utils/markdown-renderer.js.map +1 -0
  160. package/dist/utils/confirmation-service.d.ts +32 -0
  161. package/dist/utils/confirmation-service.js +109 -0
  162. package/dist/utils/confirmation-service.js.map +1 -0
  163. package/dist/utils/custom-instructions.d.ts +1 -0
  164. package/dist/utils/custom-instructions.js +17 -0
  165. package/dist/utils/custom-instructions.js.map +1 -0
  166. package/dist/utils/model-config.d.ts +28 -0
  167. package/dist/utils/model-config.js +42 -0
  168. package/dist/utils/model-config.js.map +1 -0
  169. package/dist/utils/settings-manager.d.ts +94 -0
  170. package/dist/utils/settings-manager.js +240 -0
  171. package/dist/utils/settings-manager.js.map +1 -0
  172. package/dist/utils/settings.d.ts +1 -0
  173. package/dist/utils/settings.js +4 -0
  174. package/dist/utils/settings.js.map +1 -0
  175. package/dist/utils/text-utils.d.ts +80 -0
  176. package/dist/utils/text-utils.js +182 -0
  177. package/dist/utils/text-utils.js.map +1 -0
  178. package/dist/utils/token-counter.d.ts +33 -0
  179. package/dist/utils/token-counter.js +78 -0
  180. package/dist/utils/token-counter.js.map +1 -0
  181. package/package.json +70 -0
@@ -0,0 +1,333 @@
1
+ {
2
+ "providers": {
3
+ "claude-code": {
4
+ "enabled": true,
5
+ "priority": 3,
6
+ "timeout": 2700000,
7
+ "command": "claude",
8
+ "healthCheck": {
9
+ "enabled": true,
10
+ "interval": 300000,
11
+ "timeout": 5000
12
+ },
13
+ "circuitBreaker": {
14
+ "enabled": true,
15
+ "failureThreshold": 3,
16
+ "recoveryTimeout": 60000
17
+ },
18
+ "processManagement": {
19
+ "gracefulShutdownTimeout": 5000,
20
+ "forceKillDelay": 1000
21
+ },
22
+ "versionDetection": {
23
+ "timeout": 5000,
24
+ "forceKillDelay": 1000,
25
+ "cacheEnabled": true
26
+ },
27
+ "limitTracking": {
28
+ "enabled": true,
29
+ "window": "weekly",
30
+ "resetHourUtc": 0
31
+ }
32
+ },
33
+ "gemini-cli": {
34
+ "enabled": true,
35
+ "priority": 2,
36
+ "timeout": 2700000,
37
+ "command": "gemini",
38
+ "healthCheck": {
39
+ "enabled": true,
40
+ "interval": 300000,
41
+ "timeout": 5000
42
+ },
43
+ "circuitBreaker": {
44
+ "enabled": true,
45
+ "failureThreshold": 3,
46
+ "recoveryTimeout": 60000
47
+ },
48
+ "processManagement": {
49
+ "gracefulShutdownTimeout": 5000,
50
+ "forceKillDelay": 1000
51
+ },
52
+ "versionDetection": {
53
+ "timeout": 5000,
54
+ "forceKillDelay": 1000,
55
+ "cacheEnabled": true
56
+ },
57
+ "limitTracking": {
58
+ "enabled": true,
59
+ "window": "daily",
60
+ "resetHourUtc": 0
61
+ }
62
+ },
63
+ "openai": {
64
+ "enabled": true,
65
+ "priority": 1,
66
+ "timeout": 2700000,
67
+ "command": "codex",
68
+ "healthCheck": {
69
+ "enabled": true,
70
+ "interval": 300000,
71
+ "timeout": 5000
72
+ },
73
+ "circuitBreaker": {
74
+ "enabled": true,
75
+ "failureThreshold": 3,
76
+ "recoveryTimeout": 60000
77
+ },
78
+ "processManagement": {
79
+ "gracefulShutdownTimeout": 5000,
80
+ "forceKillDelay": 1000
81
+ },
82
+ "versionDetection": {
83
+ "timeout": 5000,
84
+ "forceKillDelay": 1000,
85
+ "cacheEnabled": true
86
+ },
87
+ "limitTracking": {
88
+ "enabled": true,
89
+ "window": "daily",
90
+ "resetHourUtc": 0
91
+ }
92
+ },
93
+ "grok": {
94
+ "enabled": true,
95
+ "priority": 4,
96
+ "timeout": 2700000,
97
+ "command": "grok",
98
+ "healthCheck": {
99
+ "enabled": true,
100
+ "interval": 300000,
101
+ "timeout": 5000
102
+ },
103
+ "circuitBreaker": {
104
+ "enabled": true,
105
+ "failureThreshold": 3,
106
+ "recoveryTimeout": 60000
107
+ },
108
+ "processManagement": {
109
+ "gracefulShutdownTimeout": 5000,
110
+ "forceKillDelay": 1000
111
+ },
112
+ "versionDetection": {
113
+ "timeout": 5000,
114
+ "forceKillDelay": 1000,
115
+ "cacheEnabled": true
116
+ },
117
+ "limitTracking": {
118
+ "enabled": true,
119
+ "window": "daily",
120
+ "resetHourUtc": 0
121
+ }
122
+ }
123
+ },
124
+ "execution": {
125
+ "defaultTimeout": 2700000,
126
+ "concurrency": {
127
+ "maxConcurrentAgents": 4,
128
+ "autoDetect": false,
129
+ "cpuMultiplier": 1,
130
+ "minConcurrency": 2,
131
+ "maxConcurrency": 16
132
+ },
133
+ "retry": {
134
+ "maxAttempts": 3,
135
+ "initialDelay": 1000,
136
+ "maxDelay": 10000,
137
+ "backoffFactor": 2,
138
+ "retryableErrors": [
139
+ "ECONNREFUSED",
140
+ "ETIMEDOUT",
141
+ "ENOTFOUND",
142
+ "rate_limit",
143
+ "overloaded",
144
+ "timeout"
145
+ ]
146
+ },
147
+ "provider": {
148
+ "maxWaitMs": 60000,
149
+ "fallbackDelay": 5000
150
+ },
151
+ "stages": {
152
+ "enabled": true,
153
+ "defaultTimeout": 1800000,
154
+ "checkpointPath": ".automatosx/checkpoints",
155
+ "autoSaveCheckpoint": true,
156
+ "cleanupAfterDays": 7,
157
+ "retry": {
158
+ "defaultMaxRetries": 1,
159
+ "defaultRetryDelay": 2000
160
+ },
161
+ "prompts": {
162
+ "timeout": 600000,
163
+ "autoConfirm": false,
164
+ "locale": "en"
165
+ },
166
+ "progress": {
167
+ "updateInterval": 2000,
168
+ "syntheticProgress": true
169
+ }
170
+ }
171
+ },
172
+ "orchestration": {
173
+ "session": {
174
+ "maxSessions": 100,
175
+ "maxMetadataSize": 10240,
176
+ "saveDebounce": 1000,
177
+ "cleanupAfterDays": 7,
178
+ "maxUuidAttempts": 100,
179
+ "persistPath": ".automatosx/sessions"
180
+ },
181
+ "delegation": {
182
+ "maxDepth": 2,
183
+ "timeout": 2700000,
184
+ "enableCycleDetection": true
185
+ }
186
+ },
187
+ "memory": {
188
+ "maxEntries": 10000,
189
+ "persistPath": ".automatosx/memory",
190
+ "autoCleanup": true,
191
+ "cleanupDays": 30,
192
+ "busyTimeout": 5000,
193
+ "search": {
194
+ "defaultLimit": 10,
195
+ "maxLimit": 100,
196
+ "timeout": 5000
197
+ }
198
+ },
199
+ "abilities": {
200
+ "basePath": ".automatosx/abilities",
201
+ "fallbackPath": "examples/abilities",
202
+ "cache": {
203
+ "enabled": true,
204
+ "maxEntries": 50,
205
+ "ttl": 600000,
206
+ "maxSize": 5242880,
207
+ "cleanupInterval": 120000
208
+ },
209
+ "limits": {
210
+ "maxFileSize": 524288
211
+ }
212
+ },
213
+ "workspace": {
214
+ "prdPath": "automatosx/PRD",
215
+ "tmpPath": "automatosx/tmp",
216
+ "autoCleanupTmp": true,
217
+ "tmpCleanupDays": 7
218
+ },
219
+ "logging": {
220
+ "level": "info",
221
+ "path": ".automatosx/logs",
222
+ "console": true,
223
+ "retention": {
224
+ "maxSizeBytes": 104857600,
225
+ "maxAgeDays": 30,
226
+ "compress": true
227
+ }
228
+ },
229
+ "performance": {
230
+ "profileCache": {
231
+ "enabled": true,
232
+ "maxEntries": 20,
233
+ "ttl": 600000,
234
+ "cleanupInterval": 120000
235
+ },
236
+ "teamCache": {
237
+ "enabled": true,
238
+ "maxEntries": 10,
239
+ "ttl": 600000,
240
+ "cleanupInterval": 120000
241
+ },
242
+ "providerCache": {
243
+ "enabled": true,
244
+ "maxEntries": 100,
245
+ "ttl": 600000,
246
+ "cleanupInterval": 120000
247
+ },
248
+ "adaptiveCache": {
249
+ "maxEntries": 1000,
250
+ "baseTTL": 300000,
251
+ "minTTL": 60000,
252
+ "maxTTL": 3600000,
253
+ "adaptiveMultiplier": 2,
254
+ "lowFreqDivisor": 2,
255
+ "frequencyThreshold": 5,
256
+ "cleanupInterval": 60000
257
+ },
258
+ "responseCache": {
259
+ "enabled": false,
260
+ "ttl": 86400,
261
+ "maxSize": 1000,
262
+ "maxMemorySize": 100,
263
+ "dbPath": ".automatosx/cache/responses.db"
264
+ },
265
+ "rateLimit": {
266
+ "enabled": false,
267
+ "requestsPerMinute": 60,
268
+ "burstSize": 10
269
+ }
270
+ },
271
+ "advanced": {
272
+ "embedding": {
273
+ "timeout": 30000,
274
+ "retryDelay": 1000,
275
+ "dimensions": 1536,
276
+ "maxRetries": 3
277
+ },
278
+ "security": {
279
+ "enablePathValidation": true,
280
+ "allowedExtensions": [
281
+ ".ts",
282
+ ".js",
283
+ ".tsx",
284
+ ".jsx",
285
+ ".py",
286
+ ".go",
287
+ ".rs",
288
+ ".java",
289
+ ".yaml",
290
+ ".yml",
291
+ ".json",
292
+ ".toml",
293
+ ".md",
294
+ ".txt",
295
+ ".csv"
296
+ ]
297
+ },
298
+ "development": {
299
+ "mockProviders": false,
300
+ "profileMode": false
301
+ }
302
+ },
303
+ "integration": {
304
+ "vscode": {
305
+ "enabled": false,
306
+ "apiPort": 3000,
307
+ "autoStart": true,
308
+ "outputPanel": true,
309
+ "notifications": true
310
+ }
311
+ },
312
+ "cli": {
313
+ "run": {
314
+ "defaultMemory": true,
315
+ "defaultSaveMemory": true,
316
+ "defaultFormat": "text",
317
+ "defaultVerbose": false
318
+ },
319
+ "session": {
320
+ "defaultShowAgents": true
321
+ },
322
+ "memory": {
323
+ "defaultLimit": 10
324
+ }
325
+ },
326
+ "router": {
327
+ "healthCheckInterval": 60000,
328
+ "providerCooldownMs": 30000,
329
+ "enableFreeTierPrioritization": true,
330
+ "enableWorkloadAwareRouting": true
331
+ },
332
+ "version": "9.0.0"
333
+ }
@@ -0,0 +1,52 @@
1
+ import { GrokToolCall } from "../grok/client.js";
2
+ import { ToolResult } from "../types/index.js";
3
+ import { EventEmitter } from "events";
4
+ export interface ChatEntry {
5
+ type: "user" | "assistant" | "tool_result" | "tool_call";
6
+ content: string;
7
+ timestamp: Date;
8
+ toolCalls?: GrokToolCall[];
9
+ toolCall?: GrokToolCall;
10
+ toolResult?: {
11
+ success: boolean;
12
+ output?: string;
13
+ error?: string;
14
+ };
15
+ isStreaming?: boolean;
16
+ }
17
+ export interface StreamingChunk {
18
+ type: "content" | "tool_calls" | "tool_result" | "done" | "token_count";
19
+ content?: string;
20
+ toolCalls?: GrokToolCall[];
21
+ toolCall?: GrokToolCall;
22
+ toolResult?: ToolResult;
23
+ tokenCount?: number;
24
+ }
25
+ export declare class GrokAgent extends EventEmitter {
26
+ private grokClient;
27
+ private textEditor;
28
+ private morphEditor;
29
+ private bash;
30
+ private todoTool;
31
+ private search;
32
+ private chatHistory;
33
+ private messages;
34
+ private tokenCounter;
35
+ private abortController;
36
+ private maxToolRounds;
37
+ constructor(apiKey: string, baseURL?: string, model?: string, maxToolRounds?: number);
38
+ private initializeMCP;
39
+ private isGrokModel;
40
+ private shouldUseSearchFor;
41
+ processUserMessage(message: string): Promise<ChatEntry[]>;
42
+ private messageReducer;
43
+ processUserMessageStream(message: string): AsyncGenerator<StreamingChunk, void, unknown>;
44
+ private executeTool;
45
+ private executeMCPTool;
46
+ getChatHistory(): ChatEntry[];
47
+ getCurrentDirectory(): string;
48
+ executeBashCommand(command: string): Promise<ToolResult>;
49
+ getCurrentModel(): string;
50
+ setModel(model: string): void;
51
+ abortCurrentOperation(): void;
52
+ }