@swarmclawai/swarmclaw 1.5.3 → 1.5.33
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 +167 -147
- package/bin/swarmclaw.js +35 -1
- package/package.json +2 -2
- package/scripts/run-next-build.mjs +87 -2
- package/skills/swarmclaw/SKILL.md +151 -0
- package/src/app/api/agents/[id]/route.ts +8 -0
- package/src/app/api/agents/agents-route.test.ts +114 -0
- package/src/app/api/agents/route.ts +10 -0
- package/src/app/api/connectors/route.ts +25 -13
- package/src/app/api/credentials/[id]/route.ts +8 -1
- package/src/app/api/schedules/[id]/route.ts +8 -0
- package/src/app/api/secrets/[id]/route.ts +10 -0
- package/src/app/api/setup/check-provider/route.ts +45 -0
- package/src/app/api/setup/doctor/route.ts +5 -0
- package/src/cli/binary.test.js +11 -0
- package/src/cli/index.js +4 -4
- package/src/cli/index.test.js +5 -2
- package/src/cli/index.ts +1 -1
- package/src/components/agents/agent-sheet.tsx +16 -4
- package/src/components/agents/inspector-panel.tsx +5 -0
- package/src/components/auth/setup-wizard/step-agents.tsx +19 -1
- package/src/components/chat/activity-moment.tsx +3 -0
- package/src/components/chat/chat-header.tsx +23 -2
- package/src/components/chat/tool-call-bubble.tsx +20 -0
- package/src/components/layout/sidebar-rail.tsx +29 -0
- package/src/hooks/setup-done-detection.test.ts +4 -2
- package/src/hooks/setup-done-detection.ts +1 -1
- package/src/lib/orchestrator-config.ts +5 -0
- package/src/lib/provider-sets.ts +4 -4
- package/src/lib/providers/acp-client.ts +116 -0
- package/src/lib/providers/cli-utils.test.ts +9 -1
- package/src/lib/providers/cli-utils.ts +89 -4
- package/src/lib/providers/cursor-cli.ts +172 -0
- package/src/lib/providers/goose.ts +149 -0
- package/src/lib/providers/index.ts +29 -1
- package/src/lib/providers/qwen-code-cli.ts +152 -0
- package/src/lib/server/agents/agent-availability.ts +2 -2
- package/src/lib/server/agents/agent-thread-session.ts +8 -0
- package/src/lib/server/agents/task-session.ts +8 -0
- package/src/lib/server/capability-router.ts +8 -2
- package/src/lib/server/chat-execution/chat-execution-utils.ts +13 -0
- package/src/lib/server/chat-execution/chat-turn-finalization.ts +8 -0
- package/src/lib/server/chat-execution/chat-turn-preparation.ts +5 -1
- package/src/lib/server/chat-execution/chat-turn-tool-routing.ts +3 -0
- package/src/lib/server/chat-execution/iteration-timers.test.ts +84 -0
- package/src/lib/server/chat-execution/iteration-timers.ts +18 -1
- package/src/lib/server/chat-execution/prompt-sections.ts +3 -1
- package/src/lib/server/chat-execution/stream-agent-chat.ts +5 -0
- package/src/lib/server/chatrooms/chatroom-helpers.ts +13 -0
- package/src/lib/server/chats/chat-session-service.ts +18 -0
- package/src/lib/server/connectors/session.ts +8 -0
- package/src/lib/server/context-manager.ts +5 -0
- package/src/lib/server/provider-health.ts +13 -3
- package/src/lib/server/provider-model-discovery.test.ts +8 -0
- package/src/lib/server/provider-model-discovery.ts +1 -1
- package/src/lib/server/runtime/daemon-state/core.ts +2 -2
- package/src/lib/server/runtime/queue/core.ts +30 -4
- package/src/lib/server/runtime/session-run-manager/enqueue.ts +1 -1
- package/src/lib/server/session-reset-policy.test.ts +16 -0
- package/src/lib/server/session-reset-policy.ts +9 -1
- package/src/lib/server/session-tools/context.ts +2 -2
- package/src/lib/server/session-tools/delegate.ts +334 -14
- package/src/lib/server/session-tools/index.ts +5 -2
- package/src/lib/server/session-tools/session-info.ts +4 -1
- package/src/lib/server/storage-auth-docker.test.ts +244 -0
- package/src/lib/server/storage-auth.test.ts +150 -0
- package/src/lib/server/storage-auth.ts +57 -22
- package/src/lib/server/storage-normalization.ts +19 -0
- package/src/lib/server/storage.ts +3 -0
- package/src/lib/server/tasks/task-resume.ts +23 -1
- package/src/lib/server/tool-aliases.ts +1 -1
- package/src/lib/server/tool-capability-policy.ts +4 -1
- package/src/lib/setup-defaults.test.ts +6 -0
- package/src/lib/setup-defaults.ts +146 -0
- package/src/lib/tool-definitions.ts +1 -1
- package/src/types/misc.ts +4 -1
- package/src/types/provider.ts +1 -1
- package/src/types/session.ts +9 -0
|
@@ -42,6 +42,12 @@ test('getDefaultModelForProvider returns non-empty for hermes', () => {
|
|
|
42
42
|
assert.ok(model, 'hermes model should be truthy')
|
|
43
43
|
})
|
|
44
44
|
|
|
45
|
+
test('getDefaultModelForProvider returns expected defaults for cursor, qwen, and goose', () => {
|
|
46
|
+
assert.equal(getDefaultModelForProvider('cursor-cli'), 'auto')
|
|
47
|
+
assert.equal(getDefaultModelForProvider('qwen-code-cli'), 'default')
|
|
48
|
+
assert.equal(getDefaultModelForProvider('goose'), 'default')
|
|
49
|
+
})
|
|
50
|
+
|
|
45
51
|
test('getDefaultModelForProvider returns non-empty for ollama', () => {
|
|
46
52
|
const model = getDefaultModelForProvider('ollama')
|
|
47
53
|
assert.ok(model, 'ollama model should be truthy')
|
|
@@ -4,6 +4,14 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
export type SetupProvider =
|
|
7
|
+
| 'claude-cli'
|
|
8
|
+
| 'codex-cli'
|
|
9
|
+
| 'opencode-cli'
|
|
10
|
+
| 'gemini-cli'
|
|
11
|
+
| 'copilot-cli'
|
|
12
|
+
| 'cursor-cli'
|
|
13
|
+
| 'qwen-code-cli'
|
|
14
|
+
| 'goose'
|
|
7
15
|
| 'anthropic'
|
|
8
16
|
| 'openai'
|
|
9
17
|
| 'openrouter'
|
|
@@ -41,6 +49,82 @@ export interface SetupProviderOption {
|
|
|
41
49
|
}
|
|
42
50
|
|
|
43
51
|
export const SETUP_PROVIDERS: SetupProviderOption[] = [
|
|
52
|
+
{
|
|
53
|
+
id: 'claude-cli',
|
|
54
|
+
name: 'Claude Code CLI',
|
|
55
|
+
description: 'Anthropic’s coding agent with native tools, strong edits, and first-class CLI workflows.',
|
|
56
|
+
requiresKey: false,
|
|
57
|
+
supportsEndpoint: false,
|
|
58
|
+
badge: 'CLI',
|
|
59
|
+
icon: 'C',
|
|
60
|
+
modelLibraryUrl: 'https://docs.anthropic.com/en/docs/about-claude/models',
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
id: 'codex-cli',
|
|
64
|
+
name: 'OpenAI Codex CLI',
|
|
65
|
+
description: 'OpenAI’s terminal coding agent with resume support and structured headless output.',
|
|
66
|
+
requiresKey: false,
|
|
67
|
+
supportsEndpoint: false,
|
|
68
|
+
badge: 'CLI',
|
|
69
|
+
icon: 'O',
|
|
70
|
+
modelLibraryUrl: 'https://platform.openai.com/docs/models',
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
id: 'opencode-cli',
|
|
74
|
+
name: 'OpenCode CLI',
|
|
75
|
+
description: 'A flexible coding CLI that can route across multiple model backends.',
|
|
76
|
+
requiresKey: false,
|
|
77
|
+
supportsEndpoint: false,
|
|
78
|
+
badge: 'CLI',
|
|
79
|
+
icon: 'O',
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
id: 'gemini-cli',
|
|
83
|
+
name: 'Gemini CLI',
|
|
84
|
+
description: 'Google’s terminal coding agent with project-aware headless mode and resume support.',
|
|
85
|
+
requiresKey: false,
|
|
86
|
+
supportsEndpoint: false,
|
|
87
|
+
badge: 'CLI',
|
|
88
|
+
icon: 'G',
|
|
89
|
+
modelLibraryUrl: 'https://ai.google.dev/gemini-api/docs/models',
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
id: 'copilot-cli',
|
|
93
|
+
name: 'GitHub Copilot CLI',
|
|
94
|
+
description: 'GitHub’s multi-model terminal agent for coding and automation.',
|
|
95
|
+
requiresKey: false,
|
|
96
|
+
supportsEndpoint: false,
|
|
97
|
+
badge: 'CLI',
|
|
98
|
+
icon: 'P',
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
id: 'cursor-cli',
|
|
102
|
+
name: 'Cursor Agent CLI',
|
|
103
|
+
description: 'Cursor’s terminal agent with resume support, JSON output, and Cursor-native coding workflows.',
|
|
104
|
+
requiresKey: false,
|
|
105
|
+
supportsEndpoint: false,
|
|
106
|
+
badge: 'CLI',
|
|
107
|
+
icon: 'U',
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
id: 'qwen-code-cli',
|
|
111
|
+
name: 'Qwen Code CLI',
|
|
112
|
+
description: 'Qwen’s terminal coding agent with structured headless mode and multi-provider model config.',
|
|
113
|
+
requiresKey: false,
|
|
114
|
+
supportsEndpoint: false,
|
|
115
|
+
badge: 'CLI',
|
|
116
|
+
icon: 'Q',
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
id: 'goose',
|
|
120
|
+
name: 'Goose',
|
|
121
|
+
description: 'A runtime-managed terminal agent with extensions, session history, and ACP support.',
|
|
122
|
+
requiresKey: false,
|
|
123
|
+
supportsEndpoint: false,
|
|
124
|
+
optionalKey: true,
|
|
125
|
+
badge: 'Runtime',
|
|
126
|
+
icon: 'G',
|
|
127
|
+
},
|
|
44
128
|
{
|
|
45
129
|
id: 'openai',
|
|
46
130
|
name: 'OpenAI',
|
|
@@ -248,6 +332,9 @@ export const STARTER_AGENT_TOOLS = [
|
|
|
248
332
|
'claude_code',
|
|
249
333
|
'codex_cli',
|
|
250
334
|
'opencode_cli',
|
|
335
|
+
'gemini_cli',
|
|
336
|
+
'cursor_cli',
|
|
337
|
+
'qwen_code_cli',
|
|
251
338
|
'openclaw_workspace',
|
|
252
339
|
]
|
|
253
340
|
|
|
@@ -429,6 +516,9 @@ const BUILDER_AGENT_TOOLS = [
|
|
|
429
516
|
'claude_code',
|
|
430
517
|
'codex_cli',
|
|
431
518
|
'opencode_cli',
|
|
519
|
+
'gemini_cli',
|
|
520
|
+
'cursor_cli',
|
|
521
|
+
'qwen_code_cli',
|
|
432
522
|
]
|
|
433
523
|
|
|
434
524
|
const OPERATOR_AGENT_TOOLS = STARTER_AGENT_TOOLS
|
|
@@ -618,6 +708,62 @@ export interface DefaultAgentConfig {
|
|
|
618
708
|
}
|
|
619
709
|
|
|
620
710
|
export const DEFAULT_AGENTS: Record<SetupProvider, DefaultAgentConfig> = {
|
|
711
|
+
'claude-cli': {
|
|
712
|
+
name: 'Claude CLI',
|
|
713
|
+
description: 'A helpful assistant powered by Claude Code CLI.',
|
|
714
|
+
systemPrompt: SWARMCLAW_ASSISTANT_PROMPT,
|
|
715
|
+
model: 'claude-sonnet-4-6',
|
|
716
|
+
tools: STARTER_AGENT_TOOLS,
|
|
717
|
+
},
|
|
718
|
+
'codex-cli': {
|
|
719
|
+
name: 'Codex CLI',
|
|
720
|
+
description: 'A helpful assistant powered by OpenAI Codex CLI.',
|
|
721
|
+
systemPrompt: SWARMCLAW_ASSISTANT_PROMPT,
|
|
722
|
+
model: 'gpt-5.3-codex',
|
|
723
|
+
tools: STARTER_AGENT_TOOLS,
|
|
724
|
+
},
|
|
725
|
+
'opencode-cli': {
|
|
726
|
+
name: 'OpenCode',
|
|
727
|
+
description: 'A helpful assistant powered by OpenCode CLI.',
|
|
728
|
+
systemPrompt: SWARMCLAW_ASSISTANT_PROMPT,
|
|
729
|
+
model: 'claude-sonnet-4-6',
|
|
730
|
+
tools: STARTER_AGENT_TOOLS,
|
|
731
|
+
},
|
|
732
|
+
'gemini-cli': {
|
|
733
|
+
name: 'Gemini CLI',
|
|
734
|
+
description: 'A helpful assistant powered by Gemini CLI.',
|
|
735
|
+
systemPrompt: SWARMCLAW_ASSISTANT_PROMPT,
|
|
736
|
+
model: 'gemini-2.5-pro',
|
|
737
|
+
tools: STARTER_AGENT_TOOLS,
|
|
738
|
+
},
|
|
739
|
+
'copilot-cli': {
|
|
740
|
+
name: 'Copilot CLI',
|
|
741
|
+
description: 'A helpful assistant powered by GitHub Copilot CLI.',
|
|
742
|
+
systemPrompt: SWARMCLAW_ASSISTANT_PROMPT,
|
|
743
|
+
model: 'claude-sonnet-4-5',
|
|
744
|
+
tools: STARTER_AGENT_TOOLS,
|
|
745
|
+
},
|
|
746
|
+
'cursor-cli': {
|
|
747
|
+
name: 'Cursor CLI',
|
|
748
|
+
description: 'A helpful assistant powered by Cursor Agent CLI.',
|
|
749
|
+
systemPrompt: SWARMCLAW_ASSISTANT_PROMPT,
|
|
750
|
+
model: 'auto',
|
|
751
|
+
tools: STARTER_AGENT_TOOLS,
|
|
752
|
+
},
|
|
753
|
+
'qwen-code-cli': {
|
|
754
|
+
name: 'Qwen Code',
|
|
755
|
+
description: 'A helpful assistant powered by Qwen Code CLI.',
|
|
756
|
+
systemPrompt: SWARMCLAW_ASSISTANT_PROMPT,
|
|
757
|
+
model: 'default',
|
|
758
|
+
tools: STARTER_AGENT_TOOLS,
|
|
759
|
+
},
|
|
760
|
+
goose: {
|
|
761
|
+
name: 'Goose',
|
|
762
|
+
description: 'A helpful assistant powered by Goose.',
|
|
763
|
+
systemPrompt: SWARMCLAW_ASSISTANT_PROMPT,
|
|
764
|
+
model: 'default',
|
|
765
|
+
tools: STARTER_AGENT_TOOLS,
|
|
766
|
+
},
|
|
621
767
|
anthropic: {
|
|
622
768
|
name: 'Claude',
|
|
623
769
|
description: 'A helpful Claude-powered assistant.',
|
|
@@ -20,7 +20,7 @@ export const AVAILABLE_TOOLS: ToolDefinition[] = [
|
|
|
20
20
|
{ id: 'files', label: 'Files', description: 'Complete file management: read, write, list, move, copy, delete, and send' },
|
|
21
21
|
{ id: 'edit_file', label: 'Edit File', description: 'Surgical search-and-replace within files' },
|
|
22
22
|
{ id: 'web', label: 'Web', description: 'Search the web, fetch content, and make HTTP API calls' },
|
|
23
|
-
{ id: 'delegate', label: 'Delegate', description: 'Delegate complex tasks to specialized backends (Claude Code, Codex, OpenCode)' },
|
|
23
|
+
{ id: 'delegate', label: 'Delegate', description: 'Delegate complex tasks to specialized backends (Claude Code, Codex, OpenCode, Gemini, Cursor, Qwen)' },
|
|
24
24
|
{ id: 'browser', label: 'Browser', description: 'Playwright — browse, scrape, interact with web pages' },
|
|
25
25
|
{ id: 'memory', label: 'Memory', description: 'Store and retrieve long-term memories across conversations' },
|
|
26
26
|
{ id: 'monitor', label: 'Monitor', description: 'Durable watch jobs: monitor files, endpoints, tasks, and resume agents on triggers' },
|
package/src/types/misc.ts
CHANGED
|
@@ -387,7 +387,7 @@ export interface DelegationJobRecord {
|
|
|
387
387
|
id: string
|
|
388
388
|
kind: DelegationJobKind
|
|
389
389
|
status: DelegationJobStatus
|
|
390
|
-
backend?: 'claude' | 'codex' | 'opencode' | 'gemini' | null
|
|
390
|
+
backend?: 'claude' | 'codex' | 'opencode' | 'gemini' | 'copilot' | 'cursor' | 'qwen' | null
|
|
391
391
|
parentSessionId?: string | null
|
|
392
392
|
childSessionId?: string | null
|
|
393
393
|
agentId?: string | null
|
|
@@ -405,6 +405,9 @@ export interface DelegationJobRecord {
|
|
|
405
405
|
codex?: string | null
|
|
406
406
|
opencode?: string | null
|
|
407
407
|
gemini?: string | null
|
|
408
|
+
copilot?: string | null
|
|
409
|
+
cursor?: string | null
|
|
410
|
+
qwen?: string | null
|
|
408
411
|
}
|
|
409
412
|
requesterRunId?: string | null
|
|
410
413
|
childRunId?: string | null
|
package/src/types/provider.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type ProviderType = 'claude-cli' | 'codex-cli' | 'opencode-cli' | 'gemini-cli' | 'copilot-cli' | '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' | 'gemini-cli' | 'copilot-cli' | 'cursor-cli' | 'qwen-code-cli' | 'goose' | '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 {
|
package/src/types/session.ts
CHANGED
|
@@ -71,12 +71,17 @@ export interface Session {
|
|
|
71
71
|
opencodeSessionId?: string | null
|
|
72
72
|
geminiSessionId?: string | null
|
|
73
73
|
copilotSessionId?: string | null
|
|
74
|
+
cursorSessionId?: string | null
|
|
75
|
+
qwenSessionId?: string | null
|
|
76
|
+
acpSessionId?: string | null
|
|
74
77
|
delegateResumeIds?: {
|
|
75
78
|
claudeCode?: string | null
|
|
76
79
|
codex?: string | null
|
|
77
80
|
opencode?: string | null
|
|
78
81
|
gemini?: string | null
|
|
79
82
|
copilot?: string | null
|
|
83
|
+
cursor?: string | null
|
|
84
|
+
qwen?: string | null
|
|
80
85
|
}
|
|
81
86
|
/** @deprecated Messages are stored in session_messages table. Use message-repository. */
|
|
82
87
|
messages: Message[]
|
|
@@ -199,6 +204,10 @@ export type SessionTool =
|
|
|
199
204
|
| 'claude_code'
|
|
200
205
|
| 'codex_cli'
|
|
201
206
|
| 'opencode_cli'
|
|
207
|
+
| 'gemini_cli'
|
|
208
|
+
| 'copilot_cli'
|
|
209
|
+
| 'cursor_cli'
|
|
210
|
+
| 'qwen_code_cli'
|
|
202
211
|
| 'web_search'
|
|
203
212
|
| 'web_fetch'
|
|
204
213
|
| 'edit_file'
|