@desplega.ai/agent-swarm 1.2.0 → 1.9.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/.claude/settings.local.json +20 -1
- package/.dockerignore +3 -0
- package/.env.docker.example +22 -1
- package/.env.example +17 -0
- package/.github/workflows/docker-publish.yml +92 -0
- package/CONTRIBUTING.md +270 -0
- package/DEPLOYMENT.md +391 -0
- package/Dockerfile.worker +29 -1
- package/FAQ.md +19 -0
- package/LICENSE +21 -0
- package/MCP.md +249 -0
- package/README.md +105 -185
- package/assets/agent-swarm-logo-orange.png +0 -0
- package/assets/agent-swarm-logo.png +0 -0
- package/assets/agent-swarm.png +0 -0
- package/deploy/docker-push.ts +30 -0
- package/docker-compose.example.yml +137 -0
- package/docker-entrypoint.sh +223 -7
- package/package.json +13 -4
- package/{cc-plugin → plugin}/.claude-plugin/plugin.json +1 -1
- package/plugin/README.md +1 -0
- package/plugin/agents/.gitkeep +0 -0
- package/plugin/agents/codebase-analyzer.md +143 -0
- package/plugin/agents/codebase-locator.md +122 -0
- package/plugin/agents/codebase-pattern-finder.md +227 -0
- package/plugin/agents/web-search-researcher.md +109 -0
- package/plugin/commands/create-plan.md +415 -0
- package/plugin/commands/implement-plan.md +89 -0
- package/plugin/commands/research.md +200 -0
- package/plugin/commands/start-leader.md +101 -0
- package/plugin/commands/start-worker.md +56 -0
- package/plugin/commands/swarm-chat.md +78 -0
- package/plugin/commands/todos.md +66 -0
- package/plugin/commands/work-on-task.md +44 -0
- package/plugin/skills/.gitkeep +0 -0
- package/scripts/generate-mcp-docs.ts +415 -0
- package/slack-manifest.json +69 -0
- package/src/be/db.ts +1431 -25
- package/src/cli.tsx +135 -11
- package/src/commands/lead.ts +13 -0
- package/src/commands/runner.ts +255 -0
- package/src/commands/setup.tsx +5 -5
- package/src/commands/worker.ts +8 -220
- package/src/hooks/hook.ts +108 -14
- package/src/http.ts +361 -5
- package/src/prompts/base-prompt.ts +131 -0
- package/src/server.ts +56 -0
- package/src/slack/app.ts +73 -0
- package/src/slack/commands.ts +88 -0
- package/src/slack/handlers.ts +281 -0
- package/src/slack/index.ts +3 -0
- package/src/slack/responses.ts +175 -0
- package/src/slack/router.ts +170 -0
- package/src/slack/types.ts +20 -0
- package/src/slack/watcher.ts +119 -0
- package/src/tools/create-channel.ts +80 -0
- package/src/tools/get-tasks.ts +54 -21
- package/src/tools/join-swarm.ts +28 -4
- package/src/tools/list-channels.ts +37 -0
- package/src/tools/list-services.ts +110 -0
- package/src/tools/poll-task.ts +47 -3
- package/src/tools/post-message.ts +87 -0
- package/src/tools/read-messages.ts +192 -0
- package/src/tools/register-service.ts +118 -0
- package/src/tools/send-task.ts +80 -7
- package/src/tools/store-progress.ts +9 -3
- package/src/tools/task-action.ts +211 -0
- package/src/tools/unregister-service.ts +110 -0
- package/src/tools/update-profile.ts +105 -0
- package/src/tools/update-service-status.ts +118 -0
- package/src/types.ts +110 -3
- package/src/utils/pretty-print.ts +224 -0
- package/thoughts/shared/plans/.gitkeep +0 -0
- package/thoughts/shared/plans/2025-12-18-inverse-teleport.md +1142 -0
- package/thoughts/shared/plans/2025-12-18-slack-integration.md +1195 -0
- package/thoughts/shared/plans/2025-12-19-agent-log-streaming.md +732 -0
- package/thoughts/shared/plans/2025-12-19-role-based-swarm-plugin.md +361 -0
- package/thoughts/shared/plans/2025-12-20-mobile-responsive-ui.md +501 -0
- package/thoughts/shared/plans/2025-12-20-startup-team-swarm.md +560 -0
- package/thoughts/shared/research/.gitkeep +0 -0
- package/thoughts/shared/research/2025-12-18-slack-integration.md +442 -0
- package/thoughts/shared/research/2025-12-19-agent-log-streaming.md +339 -0
- package/thoughts/shared/research/2025-12-19-agent-secrets-cli-research.md +390 -0
- package/thoughts/shared/research/2025-12-21-gemini-cli-integration.md +376 -0
- package/thoughts/shared/research/2025-12-22-setup-experience-improvements.md +264 -0
- package/tsconfig.json +3 -1
- package/ui/bun.lock +692 -0
- package/ui/index.html +22 -0
- package/ui/package.json +32 -0
- package/ui/pnpm-lock.yaml +3034 -0
- package/ui/postcss.config.js +6 -0
- package/ui/public/logo.png +0 -0
- package/ui/src/App.tsx +43 -0
- package/ui/src/components/ActivityFeed.tsx +415 -0
- package/ui/src/components/AgentDetailPanel.tsx +534 -0
- package/ui/src/components/AgentsPanel.tsx +549 -0
- package/ui/src/components/ChatPanel.tsx +1820 -0
- package/ui/src/components/ConfigModal.tsx +232 -0
- package/ui/src/components/Dashboard.tsx +534 -0
- package/ui/src/components/Header.tsx +168 -0
- package/ui/src/components/ServicesPanel.tsx +612 -0
- package/ui/src/components/StatsBar.tsx +288 -0
- package/ui/src/components/StatusBadge.tsx +124 -0
- package/ui/src/components/TaskDetailPanel.tsx +807 -0
- package/ui/src/components/TasksPanel.tsx +575 -0
- package/ui/src/hooks/queries.ts +170 -0
- package/ui/src/index.css +235 -0
- package/ui/src/lib/api.ts +161 -0
- package/ui/src/lib/config.ts +35 -0
- package/ui/src/lib/theme.ts +214 -0
- package/ui/src/lib/utils.ts +48 -0
- package/ui/src/main.tsx +32 -0
- package/ui/src/types/api.ts +164 -0
- package/ui/src/vite-env.d.ts +1 -0
- package/ui/tailwind.config.js +35 -0
- package/ui/tsconfig.json +31 -0
- package/ui/vite.config.ts +22 -0
- package/cc-plugin/README.md +0 -49
- package/cc-plugin/commands/setup-leader.md +0 -73
- package/cc-plugin/commands/start-worker.md +0 -64
- package/docker-compose.worker.yml +0 -35
- package/example-req-meta.json +0 -24
- /package/{cc-plugin → plugin}/hooks/hooks.json +0 -0
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
import { useState, useEffect } from "react";
|
|
2
|
+
import Modal from "@mui/joy/Modal";
|
|
3
|
+
import ModalDialog from "@mui/joy/ModalDialog";
|
|
4
|
+
import Typography from "@mui/joy/Typography";
|
|
5
|
+
import Input from "@mui/joy/Input";
|
|
6
|
+
import Button from "@mui/joy/Button";
|
|
7
|
+
import FormControl from "@mui/joy/FormControl";
|
|
8
|
+
import FormLabel from "@mui/joy/FormLabel";
|
|
9
|
+
import Stack from "@mui/joy/Stack";
|
|
10
|
+
import Box from "@mui/joy/Box";
|
|
11
|
+
import Divider from "@mui/joy/Divider";
|
|
12
|
+
import { useColorScheme } from "@mui/joy/styles";
|
|
13
|
+
import { getConfig, saveConfig, resetConfig, getDefaultConfig } from "../lib/config";
|
|
14
|
+
|
|
15
|
+
interface ConfigModalProps {
|
|
16
|
+
open: boolean;
|
|
17
|
+
onClose: () => void;
|
|
18
|
+
onSave: () => void;
|
|
19
|
+
blocking?: boolean;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export default function ConfigModal({ open, onClose, onSave, blocking }: ConfigModalProps) {
|
|
23
|
+
const [apiUrl, setApiUrl] = useState("");
|
|
24
|
+
const [apiKey, setApiKey] = useState("");
|
|
25
|
+
const { mode } = useColorScheme();
|
|
26
|
+
const isDark = mode === "dark";
|
|
27
|
+
|
|
28
|
+
const colors = {
|
|
29
|
+
amber: isDark ? "#F5A623" : "#D48806",
|
|
30
|
+
honey: isDark ? "#FFB84D" : "#B87300",
|
|
31
|
+
rust: isDark ? "#A85454" : "#B54242",
|
|
32
|
+
surface: isDark ? "#1A130E" : "#FFFFFF",
|
|
33
|
+
level1: isDark ? "#251C15" : "#F5EDE4",
|
|
34
|
+
border: isDark ? "#3A2D1F" : "#E5D9CA",
|
|
35
|
+
borderHover: isDark ? "#4A3A2F" : "#D5C9BA",
|
|
36
|
+
textPrimary: isDark ? "#FFF8E7" : "#1A130E",
|
|
37
|
+
textSecondary: isDark ? "#C9B896" : "#5C4A3D",
|
|
38
|
+
textTertiary: isDark ? "#8B7355" : "#6B5344",
|
|
39
|
+
amberGlow: isDark ? "0 0 10px rgba(245, 166, 35, 0.5)" : "0 0 8px rgba(212, 136, 6, 0.4)",
|
|
40
|
+
modalGlow: isDark
|
|
41
|
+
? "0 0 40px rgba(245, 166, 35, 0.1), 0 0 80px rgba(245, 166, 35, 0.05)"
|
|
42
|
+
: "0 4px 20px rgba(0, 0, 0, 0.15), 0 0 40px rgba(212, 136, 6, 0.1)",
|
|
43
|
+
focusGlow: isDark ? "0 0 10px rgba(245, 166, 35, 0.2)" : "0 0 8px rgba(212, 136, 6, 0.15)",
|
|
44
|
+
hoverBg: isDark ? "rgba(255, 255, 255, 0.02)" : "rgba(0, 0, 0, 0.02)",
|
|
45
|
+
rustHoverBg: isDark ? "rgba(168, 84, 84, 0.05)" : "rgba(181, 66, 66, 0.05)",
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
useEffect(() => {
|
|
49
|
+
if (open) {
|
|
50
|
+
const config = getConfig();
|
|
51
|
+
setApiUrl(config.apiUrl);
|
|
52
|
+
setApiKey(config.apiKey);
|
|
53
|
+
}
|
|
54
|
+
}, [open]);
|
|
55
|
+
|
|
56
|
+
const handleSave = () => {
|
|
57
|
+
saveConfig({ apiUrl, apiKey });
|
|
58
|
+
onSave();
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
const handleReset = () => {
|
|
62
|
+
const defaults = getDefaultConfig();
|
|
63
|
+
setApiUrl(defaults.apiUrl);
|
|
64
|
+
setApiKey(defaults.apiKey);
|
|
65
|
+
resetConfig();
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
return (
|
|
69
|
+
<Modal open={open} onClose={blocking ? undefined : onClose}>
|
|
70
|
+
<ModalDialog
|
|
71
|
+
sx={{
|
|
72
|
+
bgcolor: colors.surface,
|
|
73
|
+
border: "1px solid",
|
|
74
|
+
borderColor: colors.border,
|
|
75
|
+
borderRadius: "12px",
|
|
76
|
+
boxShadow: colors.modalGlow,
|
|
77
|
+
minWidth: 400,
|
|
78
|
+
}}
|
|
79
|
+
>
|
|
80
|
+
{/* Header */}
|
|
81
|
+
<Box sx={{ display: "flex", alignItems: "center", gap: 1.5 }}>
|
|
82
|
+
{/* Hex accent */}
|
|
83
|
+
<Box
|
|
84
|
+
sx={{
|
|
85
|
+
width: 12,
|
|
86
|
+
height: 14,
|
|
87
|
+
clipPath: "polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%)",
|
|
88
|
+
bgcolor: colors.amber,
|
|
89
|
+
boxShadow: colors.amberGlow,
|
|
90
|
+
}}
|
|
91
|
+
/>
|
|
92
|
+
<Typography
|
|
93
|
+
level="h4"
|
|
94
|
+
sx={{
|
|
95
|
+
fontFamily: "display",
|
|
96
|
+
fontWeight: 600,
|
|
97
|
+
color: colors.amber,
|
|
98
|
+
textShadow: isDark ? "0 0 15px rgba(245, 166, 35, 0.4)" : "none",
|
|
99
|
+
}}
|
|
100
|
+
>
|
|
101
|
+
CONFIGURATION
|
|
102
|
+
</Typography>
|
|
103
|
+
</Box>
|
|
104
|
+
|
|
105
|
+
<Divider sx={{ my: 2, bgcolor: colors.border }} />
|
|
106
|
+
|
|
107
|
+
<Stack spacing={2.5}>
|
|
108
|
+
<FormControl>
|
|
109
|
+
<FormLabel
|
|
110
|
+
sx={{
|
|
111
|
+
fontFamily: "code",
|
|
112
|
+
color: colors.textSecondary,
|
|
113
|
+
fontSize: "0.75rem",
|
|
114
|
+
letterSpacing: "0.05em",
|
|
115
|
+
}}
|
|
116
|
+
>
|
|
117
|
+
API URL
|
|
118
|
+
</FormLabel>
|
|
119
|
+
<Input
|
|
120
|
+
value={apiUrl}
|
|
121
|
+
onChange={(e) => setApiUrl(e.target.value)}
|
|
122
|
+
placeholder="https://desplega.sh"
|
|
123
|
+
sx={{
|
|
124
|
+
fontFamily: "code",
|
|
125
|
+
bgcolor: colors.level1,
|
|
126
|
+
borderColor: colors.border,
|
|
127
|
+
color: colors.textPrimary,
|
|
128
|
+
"&:focus-within": {
|
|
129
|
+
borderColor: colors.amber,
|
|
130
|
+
boxShadow: colors.focusGlow,
|
|
131
|
+
},
|
|
132
|
+
"&:hover": {
|
|
133
|
+
borderColor: colors.borderHover,
|
|
134
|
+
},
|
|
135
|
+
}}
|
|
136
|
+
/>
|
|
137
|
+
</FormControl>
|
|
138
|
+
|
|
139
|
+
<FormControl>
|
|
140
|
+
<FormLabel
|
|
141
|
+
sx={{
|
|
142
|
+
fontFamily: "code",
|
|
143
|
+
color: colors.textSecondary,
|
|
144
|
+
fontSize: "0.75rem",
|
|
145
|
+
letterSpacing: "0.05em",
|
|
146
|
+
}}
|
|
147
|
+
>
|
|
148
|
+
API KEY (optional)
|
|
149
|
+
</FormLabel>
|
|
150
|
+
<Input
|
|
151
|
+
type="password"
|
|
152
|
+
value={apiKey}
|
|
153
|
+
onChange={(e) => setApiKey(e.target.value)}
|
|
154
|
+
placeholder="Enter API key if required"
|
|
155
|
+
sx={{
|
|
156
|
+
fontFamily: "code",
|
|
157
|
+
bgcolor: colors.level1,
|
|
158
|
+
borderColor: colors.border,
|
|
159
|
+
color: colors.textPrimary,
|
|
160
|
+
"&:focus-within": {
|
|
161
|
+
borderColor: colors.amber,
|
|
162
|
+
boxShadow: colors.focusGlow,
|
|
163
|
+
},
|
|
164
|
+
"&:hover": {
|
|
165
|
+
borderColor: colors.borderHover,
|
|
166
|
+
},
|
|
167
|
+
}}
|
|
168
|
+
/>
|
|
169
|
+
</FormControl>
|
|
170
|
+
</Stack>
|
|
171
|
+
|
|
172
|
+
<Divider sx={{ my: 2, bgcolor: colors.border }} />
|
|
173
|
+
|
|
174
|
+
<Box sx={{ display: "flex", gap: 1.5, justifyContent: "space-between" }}>
|
|
175
|
+
<Button
|
|
176
|
+
variant="outlined"
|
|
177
|
+
onClick={handleReset}
|
|
178
|
+
sx={{
|
|
179
|
+
fontFamily: "code",
|
|
180
|
+
fontSize: "0.75rem",
|
|
181
|
+
borderColor: colors.border,
|
|
182
|
+
color: colors.textTertiary,
|
|
183
|
+
"&:hover": {
|
|
184
|
+
borderColor: colors.rust,
|
|
185
|
+
color: colors.rust,
|
|
186
|
+
bgcolor: colors.rustHoverBg,
|
|
187
|
+
},
|
|
188
|
+
}}
|
|
189
|
+
>
|
|
190
|
+
RESET
|
|
191
|
+
</Button>
|
|
192
|
+
<Box sx={{ display: "flex", gap: 1.5 }}>
|
|
193
|
+
{!blocking && (
|
|
194
|
+
<Button
|
|
195
|
+
variant="outlined"
|
|
196
|
+
onClick={onClose}
|
|
197
|
+
sx={{
|
|
198
|
+
fontFamily: "code",
|
|
199
|
+
fontSize: "0.75rem",
|
|
200
|
+
borderColor: colors.border,
|
|
201
|
+
color: colors.textSecondary,
|
|
202
|
+
"&:hover": {
|
|
203
|
+
borderColor: colors.borderHover,
|
|
204
|
+
bgcolor: colors.hoverBg,
|
|
205
|
+
},
|
|
206
|
+
}}
|
|
207
|
+
>
|
|
208
|
+
CANCEL
|
|
209
|
+
</Button>
|
|
210
|
+
)}
|
|
211
|
+
<Button
|
|
212
|
+
onClick={handleSave}
|
|
213
|
+
sx={{
|
|
214
|
+
fontFamily: "code",
|
|
215
|
+
fontSize: "0.75rem",
|
|
216
|
+
bgcolor: colors.amber,
|
|
217
|
+
color: isDark ? "#0D0906" : "#FFFFFF",
|
|
218
|
+
fontWeight: 700,
|
|
219
|
+
"&:hover": {
|
|
220
|
+
bgcolor: colors.honey,
|
|
221
|
+
boxShadow: isDark ? "0 0 20px rgba(245, 166, 35, 0.4)" : "0 0 15px rgba(212, 136, 6, 0.3)",
|
|
222
|
+
},
|
|
223
|
+
}}
|
|
224
|
+
>
|
|
225
|
+
CONNECT
|
|
226
|
+
</Button>
|
|
227
|
+
</Box>
|
|
228
|
+
</Box>
|
|
229
|
+
</ModalDialog>
|
|
230
|
+
</Modal>
|
|
231
|
+
);
|
|
232
|
+
}
|