@swarmclawai/swarmclaw 1.6.1 → 1.7.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.
- package/README.md +14 -5
- package/package.json +2 -2
- package/src/app/home/page.tsx +10 -19
- package/src/components/auth/setup-wizard/index.tsx +2 -6
- package/src/components/auth/setup-wizard/step-next.tsx +39 -46
- package/src/components/auth/setup-wizard/step-providers.tsx +142 -76
- package/src/components/auth/setup-wizard/types.ts +2 -5
- package/src/components/auth/setup-wizard/utils.test.ts +19 -0
- package/src/components/auth/setup-wizard/utils.ts +69 -0
- package/src/components/home/home-launchpad.tsx +71 -123
- package/src/lib/home-launchpad.test.ts +31 -1
- package/src/lib/home-launchpad.ts +58 -0
- package/src/lib/providers/cli-utils.test.ts +10 -0
- package/src/lib/providers/cli-utils.ts +31 -0
- package/src/lib/providers/generic-cli.test.ts +71 -0
- package/src/lib/providers/generic-cli.ts +138 -0
- package/src/lib/providers/index.ts +56 -1
- package/src/types/provider.ts +1 -1
|
@@ -8,6 +8,7 @@ import { streamDroidCliChat } from './droid-cli'
|
|
|
8
8
|
import { streamCursorCliChat } from './cursor-cli'
|
|
9
9
|
import { streamQwenCodeCliChat } from './qwen-code-cli'
|
|
10
10
|
import { streamGooseChat } from './goose'
|
|
11
|
+
import { streamGenericCliChat, GENERIC_CLI_BINARIES } from './generic-cli'
|
|
11
12
|
import { streamOpenAiChat } from './openai'
|
|
12
13
|
import { streamOllamaChat } from './ollama'
|
|
13
14
|
import { streamAnthropicChat } from './anthropic'
|
|
@@ -51,6 +52,59 @@ interface BuiltinProviderConfig extends ProviderInfo {
|
|
|
51
52
|
handler: ProviderHandler
|
|
52
53
|
}
|
|
53
54
|
|
|
55
|
+
const GENERIC_CLI_DISPLAY_NAMES: Record<string, string> = {
|
|
56
|
+
'aider-cli': 'Aider CLI',
|
|
57
|
+
'amp-cli': 'Amp CLI',
|
|
58
|
+
'augment-cli': 'Augment CLI',
|
|
59
|
+
'adal-cli': 'AdaL CLI',
|
|
60
|
+
'bob-cli': 'IBM Bob CLI',
|
|
61
|
+
'cline-cli': 'Cline CLI',
|
|
62
|
+
'codebuddy-cli': 'CodeBuddy CLI',
|
|
63
|
+
'command-code-cli': 'Command Code CLI',
|
|
64
|
+
'continue-cli': 'Continue CLI',
|
|
65
|
+
'cortex-cli': 'Cortex Code CLI',
|
|
66
|
+
'crush-cli': 'Crush CLI',
|
|
67
|
+
'deepagents-cli': 'Deep Agents CLI',
|
|
68
|
+
'firebender-cli': 'Firebender CLI',
|
|
69
|
+
'iflow-cli': 'iFlow CLI',
|
|
70
|
+
'junie-cli': 'Junie CLI',
|
|
71
|
+
'kilo-code-cli': 'Kilo Code CLI',
|
|
72
|
+
'kimi-cli': 'Kimi Code CLI',
|
|
73
|
+
'kode-cli': 'Kode CLI',
|
|
74
|
+
'mcpjam-cli': 'MCPJam CLI',
|
|
75
|
+
'mistral-vibe-cli': 'Mistral Vibe CLI',
|
|
76
|
+
'mux-cli': 'Mux CLI',
|
|
77
|
+
'neovate-cli': 'Neovate CLI',
|
|
78
|
+
'openhands-cli': 'OpenHands CLI',
|
|
79
|
+
'pochi-cli': 'Pochi CLI',
|
|
80
|
+
'qoder-cli': 'Qoder CLI',
|
|
81
|
+
'replit-cli': 'Replit Agent CLI',
|
|
82
|
+
'roo-code-cli': 'Roo Code CLI',
|
|
83
|
+
'trae-cn-cli': 'TRAE CN CLI',
|
|
84
|
+
'warp-cli': 'Warp Agent CLI',
|
|
85
|
+
'windsurf-cli': 'Windsurf CLI',
|
|
86
|
+
'zencoder-cli': 'Zencoder CLI',
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
function buildGenericCliEntries(): Record<string, BuiltinProviderConfig> {
|
|
90
|
+
const entries: Record<string, BuiltinProviderConfig> = {}
|
|
91
|
+
for (const [providerId, binaryName] of Object.entries(GENERIC_CLI_BINARIES)) {
|
|
92
|
+
const displayName = GENERIC_CLI_DISPLAY_NAMES[providerId] ?? providerId
|
|
93
|
+
entries[providerId] = {
|
|
94
|
+
id: providerId,
|
|
95
|
+
name: displayName,
|
|
96
|
+
models: ['default'],
|
|
97
|
+
requiresApiKey: false,
|
|
98
|
+
optionalApiKey: true,
|
|
99
|
+
requiresEndpoint: false,
|
|
100
|
+
handler: {
|
|
101
|
+
streamChat: (opts) => streamGenericCliChat({ ...opts, binaryName, displayName }),
|
|
102
|
+
},
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
return entries
|
|
106
|
+
}
|
|
107
|
+
|
|
54
108
|
export const PROVIDERS: Record<string, BuiltinProviderConfig> = {
|
|
55
109
|
'claude-cli': {
|
|
56
110
|
id: 'claude-cli',
|
|
@@ -223,6 +277,7 @@ export const PROVIDERS: Record<string, BuiltinProviderConfig> = {
|
|
|
223
277
|
requiresEndpoint: false,
|
|
224
278
|
handler: { streamChat: streamGooseChat },
|
|
225
279
|
},
|
|
280
|
+
...buildGenericCliEntries(),
|
|
226
281
|
google: {
|
|
227
282
|
id: 'google',
|
|
228
283
|
name: 'Google Gemini',
|
|
@@ -475,7 +530,7 @@ export function getProviderList(): ProviderInfo[] {
|
|
|
475
530
|
...info,
|
|
476
531
|
models: overrides[info.id] || info.models,
|
|
477
532
|
defaultModels: info.models,
|
|
478
|
-
supportsModelDiscovery: !['claude-cli', 'codex-cli', 'opencode-cli', 'gemini-cli', 'copilot-cli', 'droid-cli', 'cursor-cli', 'qwen-code-cli', 'goose', 'fireworks'].includes(info.id),
|
|
533
|
+
supportsModelDiscovery: !['claude-cli', 'codex-cli', 'opencode-cli', 'gemini-cli', 'copilot-cli', 'droid-cli', 'cursor-cli', 'qwen-code-cli', 'goose', 'fireworks', ...Object.keys(GENERIC_CLI_BINARIES)].includes(info.id),
|
|
479
534
|
}
|
|
480
535
|
})
|
|
481
536
|
|
package/src/types/provider.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type ProviderType = 'claude-cli' | 'codex-cli' | 'opencode-cli' | 'opencode-web' | 'gemini-cli' | 'copilot-cli' | 'droid-cli' | 'cursor-cli' | 'qwen-code-cli' | 'goose' | 'openai' | 'openrouter' | 'ollama' | 'anthropic' | 'openclaw' | 'hermes' | 'google' | 'deepseek' | 'groq' | 'together' | 'mistral' | 'xai' | 'fireworks' | 'nebius' | 'deepinfra'
|
|
1
|
+
export type ProviderType = 'claude-cli' | 'codex-cli' | 'opencode-cli' | 'opencode-web' | 'gemini-cli' | 'copilot-cli' | 'droid-cli' | 'cursor-cli' | 'qwen-code-cli' | 'goose' | 'aider-cli' | 'amp-cli' | 'augment-cli' | 'adal-cli' | 'bob-cli' | 'cline-cli' | 'codebuddy-cli' | 'command-code-cli' | 'continue-cli' | 'cortex-cli' | 'crush-cli' | 'deepagents-cli' | 'firebender-cli' | 'iflow-cli' | 'junie-cli' | 'kilo-code-cli' | 'kimi-cli' | 'kode-cli' | 'mcpjam-cli' | 'mistral-vibe-cli' | 'mux-cli' | 'neovate-cli' | 'openhands-cli' | 'pochi-cli' | 'qoder-cli' | 'replit-cli' | 'roo-code-cli' | 'trae-cn-cli' | 'warp-cli' | 'windsurf-cli' | 'zencoder-cli' | 'openai' | 'openrouter' | 'ollama' | 'anthropic' | 'openclaw' | 'hermes' | 'google' | 'deepseek' | 'groq' | 'together' | 'mistral' | 'xai' | 'fireworks' | 'nebius' | 'deepinfra'
|
|
2
2
|
export type ProviderId = ProviderType | (string & {})
|
|
3
3
|
|
|
4
4
|
export interface ProviderInfo {
|