@desplega.ai/agent-swarm 1.2.1 → 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.
Files changed (119) hide show
  1. package/.claude/settings.local.json +20 -1
  2. package/.env.docker.example +22 -1
  3. package/.env.example +17 -0
  4. package/.github/workflows/docker-publish.yml +92 -0
  5. package/CONTRIBUTING.md +270 -0
  6. package/DEPLOYMENT.md +391 -0
  7. package/Dockerfile.worker +29 -1
  8. package/FAQ.md +19 -0
  9. package/LICENSE +21 -0
  10. package/MCP.md +249 -0
  11. package/README.md +103 -207
  12. package/assets/agent-swarm-logo-orange.png +0 -0
  13. package/assets/agent-swarm-logo.png +0 -0
  14. package/docker-compose.example.yml +137 -0
  15. package/docker-entrypoint.sh +223 -7
  16. package/package.json +8 -3
  17. package/{cc-plugin → plugin}/.claude-plugin/plugin.json +1 -1
  18. package/plugin/README.md +1 -0
  19. package/plugin/agents/.gitkeep +0 -0
  20. package/plugin/agents/codebase-analyzer.md +143 -0
  21. package/plugin/agents/codebase-locator.md +122 -0
  22. package/plugin/agents/codebase-pattern-finder.md +227 -0
  23. package/plugin/agents/web-search-researcher.md +109 -0
  24. package/plugin/commands/create-plan.md +415 -0
  25. package/plugin/commands/implement-plan.md +89 -0
  26. package/plugin/commands/research.md +200 -0
  27. package/plugin/commands/start-leader.md +101 -0
  28. package/plugin/commands/start-worker.md +56 -0
  29. package/plugin/commands/swarm-chat.md +78 -0
  30. package/plugin/commands/todos.md +66 -0
  31. package/plugin/commands/work-on-task.md +44 -0
  32. package/plugin/skills/.gitkeep +0 -0
  33. package/scripts/generate-mcp-docs.ts +415 -0
  34. package/slack-manifest.json +69 -0
  35. package/src/be/db.ts +1431 -25
  36. package/src/cli.tsx +135 -11
  37. package/src/commands/lead.ts +13 -0
  38. package/src/commands/runner.ts +255 -0
  39. package/src/commands/worker.ts +8 -220
  40. package/src/hooks/hook.ts +102 -14
  41. package/src/http.ts +361 -5
  42. package/src/prompts/base-prompt.ts +131 -0
  43. package/src/server.ts +56 -0
  44. package/src/slack/app.ts +73 -0
  45. package/src/slack/commands.ts +88 -0
  46. package/src/slack/handlers.ts +281 -0
  47. package/src/slack/index.ts +3 -0
  48. package/src/slack/responses.ts +175 -0
  49. package/src/slack/router.ts +170 -0
  50. package/src/slack/types.ts +20 -0
  51. package/src/slack/watcher.ts +119 -0
  52. package/src/tools/create-channel.ts +80 -0
  53. package/src/tools/get-tasks.ts +54 -21
  54. package/src/tools/join-swarm.ts +28 -4
  55. package/src/tools/list-channels.ts +37 -0
  56. package/src/tools/list-services.ts +110 -0
  57. package/src/tools/poll-task.ts +46 -3
  58. package/src/tools/post-message.ts +87 -0
  59. package/src/tools/read-messages.ts +192 -0
  60. package/src/tools/register-service.ts +118 -0
  61. package/src/tools/send-task.ts +80 -7
  62. package/src/tools/store-progress.ts +9 -3
  63. package/src/tools/task-action.ts +211 -0
  64. package/src/tools/unregister-service.ts +110 -0
  65. package/src/tools/update-profile.ts +105 -0
  66. package/src/tools/update-service-status.ts +118 -0
  67. package/src/types.ts +110 -3
  68. package/src/utils/pretty-print.ts +224 -0
  69. package/thoughts/shared/plans/.gitkeep +0 -0
  70. package/thoughts/shared/plans/2025-12-18-inverse-teleport.md +1142 -0
  71. package/thoughts/shared/plans/2025-12-18-slack-integration.md +1195 -0
  72. package/thoughts/shared/plans/2025-12-19-agent-log-streaming.md +732 -0
  73. package/thoughts/shared/plans/2025-12-19-role-based-swarm-plugin.md +361 -0
  74. package/thoughts/shared/plans/2025-12-20-mobile-responsive-ui.md +501 -0
  75. package/thoughts/shared/plans/2025-12-20-startup-team-swarm.md +560 -0
  76. package/thoughts/shared/research/.gitkeep +0 -0
  77. package/thoughts/shared/research/2025-12-18-slack-integration.md +442 -0
  78. package/thoughts/shared/research/2025-12-19-agent-log-streaming.md +339 -0
  79. package/thoughts/shared/research/2025-12-19-agent-secrets-cli-research.md +390 -0
  80. package/thoughts/shared/research/2025-12-21-gemini-cli-integration.md +376 -0
  81. package/thoughts/shared/research/2025-12-22-setup-experience-improvements.md +264 -0
  82. package/tsconfig.json +3 -1
  83. package/ui/bun.lock +692 -0
  84. package/ui/index.html +22 -0
  85. package/ui/package.json +32 -0
  86. package/ui/pnpm-lock.yaml +3034 -0
  87. package/ui/postcss.config.js +6 -0
  88. package/ui/public/logo.png +0 -0
  89. package/ui/src/App.tsx +43 -0
  90. package/ui/src/components/ActivityFeed.tsx +415 -0
  91. package/ui/src/components/AgentDetailPanel.tsx +534 -0
  92. package/ui/src/components/AgentsPanel.tsx +549 -0
  93. package/ui/src/components/ChatPanel.tsx +1820 -0
  94. package/ui/src/components/ConfigModal.tsx +232 -0
  95. package/ui/src/components/Dashboard.tsx +534 -0
  96. package/ui/src/components/Header.tsx +168 -0
  97. package/ui/src/components/ServicesPanel.tsx +612 -0
  98. package/ui/src/components/StatsBar.tsx +288 -0
  99. package/ui/src/components/StatusBadge.tsx +124 -0
  100. package/ui/src/components/TaskDetailPanel.tsx +807 -0
  101. package/ui/src/components/TasksPanel.tsx +575 -0
  102. package/ui/src/hooks/queries.ts +170 -0
  103. package/ui/src/index.css +235 -0
  104. package/ui/src/lib/api.ts +161 -0
  105. package/ui/src/lib/config.ts +35 -0
  106. package/ui/src/lib/theme.ts +214 -0
  107. package/ui/src/lib/utils.ts +48 -0
  108. package/ui/src/main.tsx +32 -0
  109. package/ui/src/types/api.ts +164 -0
  110. package/ui/src/vite-env.d.ts +1 -0
  111. package/ui/tailwind.config.js +35 -0
  112. package/ui/tsconfig.json +31 -0
  113. package/ui/vite.config.ts +22 -0
  114. package/cc-plugin/README.md +0 -49
  115. package/cc-plugin/commands/setup-leader.md +0 -73
  116. package/cc-plugin/commands/start-worker.md +0 -64
  117. package/docker-compose.worker.yml +0 -35
  118. package/example-req-meta.json +0 -24
  119. /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
+ }