squads-cli 0.4.13 → 0.6.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 (146) hide show
  1. package/README.md +161 -4
  2. package/dist/{chunk-HKWCBCEK.js → chunk-4CMAEQQY.js} +6 -2
  3. package/dist/chunk-4CMAEQQY.js.map +1 -0
  4. package/dist/{chunk-NA3IECJA.js → chunk-N7KDWU4W.js} +155 -58
  5. package/dist/chunk-N7KDWU4W.js.map +1 -0
  6. package/dist/{chunk-HIQ2APYR.js → chunk-NHGLXN2F.js} +8 -6
  7. package/dist/chunk-NHGLXN2F.js.map +1 -0
  8. package/dist/{chunk-3TSY2K7R.js → chunk-O7UV3FWI.js} +140 -21
  9. package/dist/chunk-O7UV3FWI.js.map +1 -0
  10. package/dist/chunk-ZTQ7ISUR.js +338 -0
  11. package/dist/chunk-ZTQ7ISUR.js.map +1 -0
  12. package/dist/cli.js +5232 -6194
  13. package/dist/cli.js.map +1 -1
  14. package/dist/index.d.ts +110 -2
  15. package/dist/index.js +302 -25
  16. package/dist/index.js.map +1 -1
  17. package/dist/{memory-4PVUKIDK.js → memory-VNF2VFRB.js} +8 -4
  18. package/dist/{sessions-R4VWIGFR.js → sessions-6PB7ALCE.js} +3 -3
  19. package/dist/{squad-parser-YRE2FEAA.js → squad-parser-4BI3G4RS.js} +4 -2
  20. package/dist/templates/core/AGENTS.md.template +64 -0
  21. package/dist/templates/core/BUSINESS_BRIEF.md.template +29 -0
  22. package/dist/templates/core/CLAUDE.md.template +50 -0
  23. package/dist/templates/core/provider.yaml.template +5 -0
  24. package/dist/templates/first-squad/SQUAD.md.template +23 -0
  25. package/dist/templates/first-squad/lead.md.template +44 -0
  26. package/dist/templates/memory/getting-started/state.md.template +19 -0
  27. package/dist/templates/seed/BUSINESS_BRIEF.md.template +27 -0
  28. package/dist/templates/seed/CLAUDE.md.template +69 -0
  29. package/dist/templates/seed/config/provider.yaml +4 -0
  30. package/dist/templates/seed/hooks/settings.json.template +31 -0
  31. package/dist/templates/seed/memory/company/manager/state.md +16 -0
  32. package/dist/templates/seed/memory/engineering/issue-solver/state.md +12 -0
  33. package/dist/templates/seed/memory/intelligence/intel-lead/state.md +9 -0
  34. package/dist/templates/seed/memory/marketing/content-drafter/state.md +12 -0
  35. package/dist/templates/seed/memory/operations/ops-lead/state.md +12 -0
  36. package/dist/templates/seed/memory/research/researcher/state.md +10 -0
  37. package/dist/templates/seed/skills/gh/SKILL.md +57 -0
  38. package/dist/templates/seed/skills/squads-cli/SKILL.md +88 -0
  39. package/dist/templates/seed/squads/company/SQUAD.md +49 -0
  40. package/dist/templates/seed/squads/company/company-critic.md +21 -0
  41. package/dist/templates/seed/squads/company/company-eval.md +21 -0
  42. package/dist/templates/seed/squads/company/event-dispatcher.md +21 -0
  43. package/dist/templates/seed/squads/company/goal-tracker.md +21 -0
  44. package/dist/templates/seed/squads/company/manager.md +66 -0
  45. package/dist/templates/seed/squads/engineering/SQUAD.md +48 -0
  46. package/dist/templates/seed/squads/engineering/code-reviewer.md +57 -0
  47. package/dist/templates/seed/squads/engineering/issue-solver.md +58 -0
  48. package/dist/templates/seed/squads/engineering/test-writer.md +50 -0
  49. package/dist/templates/seed/squads/intelligence/SQUAD.md +37 -0
  50. package/dist/templates/seed/squads/intelligence/intel-critic.md +36 -0
  51. package/dist/templates/seed/squads/intelligence/intel-eval.md +31 -0
  52. package/dist/templates/seed/squads/intelligence/intel-lead.md +71 -0
  53. package/dist/templates/seed/squads/marketing/SQUAD.md +47 -0
  54. package/dist/templates/seed/squads/marketing/content-drafter.md +71 -0
  55. package/dist/templates/seed/squads/marketing/growth-analyst.md +49 -0
  56. package/dist/templates/seed/squads/marketing/social-poster.md +44 -0
  57. package/dist/templates/seed/squads/operations/SQUAD.md +45 -0
  58. package/dist/templates/seed/squads/operations/finance-tracker.md +47 -0
  59. package/dist/templates/seed/squads/operations/goal-tracker.md +48 -0
  60. package/dist/templates/seed/squads/operations/ops-lead.md +58 -0
  61. package/dist/templates/seed/squads/research/SQUAD.md +38 -0
  62. package/dist/templates/seed/squads/research/analyst.md +27 -0
  63. package/dist/templates/seed/squads/research/research-critic.md +20 -0
  64. package/dist/templates/seed/squads/research/research-eval.md +20 -0
  65. package/dist/templates/seed/squads/research/researcher.md +28 -0
  66. package/dist/templates/skills/squads-learn/SKILL.md +86 -0
  67. package/dist/templates/skills/squads-workflow/instruction.md +70 -0
  68. package/dist/{terminal-JZSAQSN7.js → terminal-YKA4O5CX.js} +4 -2
  69. package/dist/{update-MAY6EXFQ.js → update-ALJKFFM7.js} +3 -2
  70. package/package.json +9 -20
  71. package/templates/core/AGENTS.md.template +64 -0
  72. package/templates/core/BUSINESS_BRIEF.md.template +29 -0
  73. package/templates/core/CLAUDE.md.template +50 -0
  74. package/templates/core/provider.yaml.template +5 -0
  75. package/templates/first-squad/SQUAD.md.template +23 -0
  76. package/templates/first-squad/lead.md.template +44 -0
  77. package/templates/memory/getting-started/state.md.template +19 -0
  78. package/templates/seed/BUSINESS_BRIEF.md.template +27 -0
  79. package/templates/seed/CLAUDE.md.template +69 -0
  80. package/templates/seed/config/provider.yaml +4 -0
  81. package/templates/seed/hooks/settings.json.template +31 -0
  82. package/templates/seed/memory/company/manager/state.md +16 -0
  83. package/templates/seed/memory/engineering/issue-solver/state.md +12 -0
  84. package/templates/seed/memory/intelligence/intel-lead/state.md +9 -0
  85. package/templates/seed/memory/marketing/content-drafter/state.md +12 -0
  86. package/templates/seed/memory/operations/ops-lead/state.md +12 -0
  87. package/templates/seed/memory/research/researcher/state.md +10 -0
  88. package/templates/seed/skills/gh/SKILL.md +57 -0
  89. package/templates/seed/skills/squads-cli/SKILL.md +88 -0
  90. package/templates/seed/squads/company/SQUAD.md +49 -0
  91. package/templates/seed/squads/company/company-critic.md +21 -0
  92. package/templates/seed/squads/company/company-eval.md +21 -0
  93. package/templates/seed/squads/company/event-dispatcher.md +21 -0
  94. package/templates/seed/squads/company/goal-tracker.md +21 -0
  95. package/templates/seed/squads/company/manager.md +66 -0
  96. package/templates/seed/squads/engineering/SQUAD.md +48 -0
  97. package/templates/seed/squads/engineering/code-reviewer.md +57 -0
  98. package/templates/seed/squads/engineering/issue-solver.md +58 -0
  99. package/templates/seed/squads/engineering/test-writer.md +50 -0
  100. package/templates/seed/squads/intelligence/SQUAD.md +37 -0
  101. package/templates/seed/squads/intelligence/intel-critic.md +36 -0
  102. package/templates/seed/squads/intelligence/intel-eval.md +31 -0
  103. package/templates/seed/squads/intelligence/intel-lead.md +71 -0
  104. package/templates/seed/squads/marketing/SQUAD.md +47 -0
  105. package/templates/seed/squads/marketing/content-drafter.md +71 -0
  106. package/templates/seed/squads/marketing/growth-analyst.md +49 -0
  107. package/templates/seed/squads/marketing/social-poster.md +44 -0
  108. package/templates/seed/squads/operations/SQUAD.md +45 -0
  109. package/templates/seed/squads/operations/finance-tracker.md +47 -0
  110. package/templates/seed/squads/operations/goal-tracker.md +48 -0
  111. package/templates/seed/squads/operations/ops-lead.md +58 -0
  112. package/templates/seed/squads/research/SQUAD.md +38 -0
  113. package/templates/seed/squads/research/analyst.md +27 -0
  114. package/templates/seed/squads/research/research-critic.md +20 -0
  115. package/templates/seed/squads/research/research-eval.md +20 -0
  116. package/templates/seed/squads/research/researcher.md +28 -0
  117. package/templates/skills/squads-learn/SKILL.md +86 -0
  118. package/templates/skills/squads-workflow/instruction.md +70 -0
  119. package/dist/chunk-3TSY2K7R.js.map +0 -1
  120. package/dist/chunk-FUHBEL3L.js +0 -203
  121. package/dist/chunk-FUHBEL3L.js.map +0 -1
  122. package/dist/chunk-HIQ2APYR.js.map +0 -1
  123. package/dist/chunk-HKWCBCEK.js.map +0 -1
  124. package/dist/chunk-NA3IECJA.js.map +0 -1
  125. package/docker/.env.example +0 -17
  126. package/docker/README.md +0 -92
  127. package/docker/docker-compose.engram.yml +0 -304
  128. package/docker/docker-compose.yml +0 -234
  129. package/docker/init-db.sql +0 -478
  130. package/docker/init-engram-db.sql +0 -148
  131. package/docker/init-langfuse-db.sh +0 -10
  132. package/docker/otel-collector.yaml +0 -34
  133. package/docker/squads-bridge/Dockerfile +0 -14
  134. package/docker/squads-bridge/Dockerfile.proxy +0 -14
  135. package/docker/squads-bridge/anthropic_proxy.py +0 -313
  136. package/docker/squads-bridge/requirements.txt +0 -7
  137. package/docker/squads-bridge/squads_bridge.py +0 -2299
  138. package/docker/telemetry-ping/Dockerfile +0 -10
  139. package/docker/telemetry-ping/deploy.sh +0 -69
  140. package/docker/telemetry-ping/main.py +0 -136
  141. package/docker/telemetry-ping/requirements.txt +0 -3
  142. /package/dist/{memory-4PVUKIDK.js.map → memory-VNF2VFRB.js.map} +0 -0
  143. /package/dist/{sessions-R4VWIGFR.js.map → sessions-6PB7ALCE.js.map} +0 -0
  144. /package/dist/{squad-parser-YRE2FEAA.js.map → squad-parser-4BI3G4RS.js.map} +0 -0
  145. /package/dist/{terminal-JZSAQSN7.js.map → terminal-YKA4O5CX.js.map} +0 -0
  146. /package/dist/{update-MAY6EXFQ.js.map → update-ALJKFFM7.js.map} +0 -0
@@ -1,304 +0,0 @@
1
- # Squads Full Stack - With Memory + Scheduler
2
- # Full telemetry pipeline + Memory system + Scheduler
3
- #
4
- # Usage:
5
- # cd docker && docker-compose -f docker-compose.engram.yml up -d
6
- # With webhooks: docker-compose -f docker-compose.engram.yml --profile webhooks up -d
7
- #
8
- # Access:
9
- # Langfuse UI: http://localhost:3100
10
- # Mem0 API: http://localhost:8000
11
- # Scheduler API: http://localhost:8090
12
- # Postgres: localhost:5433
13
-
14
- name: agents-squads
15
-
16
- services:
17
- # =============================================================================
18
- # PostgreSQL with pgvector - Primary data store + Vector search
19
- # =============================================================================
20
- postgres:
21
- image: pgvector/pgvector:pg16
22
- container_name: squads-postgres
23
- restart: unless-stopped
24
- environment:
25
- POSTGRES_USER: squads
26
- POSTGRES_PASSWORD: squads
27
- POSTGRES_DB: squads
28
- ports:
29
- - "${POSTGRES_PORT:-5433}:5432"
30
- volumes:
31
- - squads_postgres_data:/var/lib/postgresql/data
32
- - ./init-db.sql:/docker-entrypoint-initdb.d/01-init-squads.sql:ro
33
- - ./init-langfuse-db.sh:/docker-entrypoint-initdb.d/00-init-langfuse.sh:ro
34
- - ./init-engram-db.sql:/docker-entrypoint-initdb.d/02-init-engram.sql:ro
35
- healthcheck:
36
- test: ["CMD-SHELL", "pg_isready -U squads -d squads"]
37
- interval: 5s
38
- timeout: 5s
39
- retries: 5
40
- networks:
41
- - squads
42
-
43
- # =============================================================================
44
- # Redis - Caching and job queues
45
- # =============================================================================
46
- redis:
47
- image: redis:7-alpine
48
- container_name: squads-redis
49
- restart: unless-stopped
50
- ports:
51
- - "${REDIS_PORT:-6379}:6379"
52
- volumes:
53
- - squads_redis_data:/data
54
- command: redis-server --appendonly yes
55
- healthcheck:
56
- test: ["CMD", "redis-cli", "ping"]
57
- interval: 5s
58
- timeout: 5s
59
- retries: 5
60
- networks:
61
- - squads
62
-
63
- # =============================================================================
64
- # Langfuse - LLM Observability (local instance)
65
- # =============================================================================
66
- langfuse:
67
- image: langfuse/langfuse:2
68
- container_name: squads-langfuse
69
- restart: unless-stopped
70
- depends_on:
71
- postgres:
72
- condition: service_healthy
73
- environment:
74
- DATABASE_URL: postgresql://squads:squads@postgres:5432/langfuse
75
- NEXTAUTH_SECRET: ${NEXTAUTH_SECRET:-squads-local-dev-secret}
76
- NEXTAUTH_URL: http://localhost:${LANGFUSE_PORT:-3100}
77
- SALT: ${LANGFUSE_SALT:-squads-local-salt}
78
- TELEMETRY_ENABLED: "false"
79
- LANGFUSE_ENABLE_EXPERIMENTAL_FEATURES: "true"
80
- ports:
81
- - "${LANGFUSE_PORT:-3100}:3000"
82
- healthcheck:
83
- test: ["CMD-SHELL", "wget -q -O /dev/null http://$(hostname -i):3000/api/public/health || exit 1"]
84
- interval: 15s
85
- timeout: 10s
86
- retries: 5
87
- start_period: 60s
88
- networks:
89
- - squads
90
-
91
- # =============================================================================
92
- # OpenTelemetry Collector - Receives telemetry from Claude Code
93
- # =============================================================================
94
- otel-collector:
95
- image: otel/opentelemetry-collector-contrib:latest
96
- container_name: squads-otel-collector
97
- restart: unless-stopped
98
- command: ["--config=/etc/otel-collector.yaml"]
99
- volumes:
100
- - ./otel-collector.yaml:/etc/otel-collector.yaml:ro
101
- ports:
102
- - "${OTEL_PORT:-4318}:4318"
103
- depends_on:
104
- - squads-bridge
105
- networks:
106
- - squads
107
-
108
- # =============================================================================
109
- # Squads Bridge - Telemetry storage (postgres first, Langfuse optional)
110
- # =============================================================================
111
- squads-bridge:
112
- build:
113
- context: ./squads-bridge
114
- dockerfile: Dockerfile
115
- container_name: squads-bridge
116
- restart: unless-stopped
117
- environment:
118
- PORT: 8080
119
- DEBUG: "1"
120
- DATABASE_URL: postgresql://squads:squads@postgres:5432/squads
121
- REDIS_URL: redis://redis:6379/0
122
- SQUADS_DAILY_BUDGET: ${SQUADS_DAILY_BUDGET:-50.0}
123
- LANGFUSE_ENABLED: ${LANGFUSE_ENABLED:-false}
124
- LANGFUSE_HOST: ${LANGFUSE_HOST:-http://langfuse:3000}
125
- LANGFUSE_PUBLIC_KEY: ${LANGFUSE_PUBLIC_KEY:-}
126
- LANGFUSE_SECRET_KEY: ${LANGFUSE_SECRET_KEY:-}
127
- ports:
128
- - "${BRIDGE_PORT:-8088}:8080"
129
- depends_on:
130
- postgres:
131
- condition: service_healthy
132
- redis:
133
- condition: service_healthy
134
- networks:
135
- - squads
136
-
137
- # =============================================================================
138
- # Anthropic Proxy - Captures rate limit headers
139
- # =============================================================================
140
- anthropic-proxy:
141
- build:
142
- context: ./squads-bridge
143
- dockerfile: Dockerfile.proxy
144
- container_name: squads-anthropic-proxy
145
- restart: unless-stopped
146
- profiles: ["proxy"]
147
- environment:
148
- PORT: 8089
149
- DEBUG: "${DEBUG:-0}"
150
- ANTHROPIC_API_URL: https://api.anthropic.com
151
- REDIS_URL: redis://redis:6379/0
152
- SQUADS_BRIDGE_URL: http://squads-bridge:8080
153
- ports:
154
- - "${ANTHROPIC_PROXY_PORT:-8089}:8089"
155
- depends_on:
156
- redis:
157
- condition: service_healthy
158
- networks:
159
- - squads
160
-
161
- # =============================================================================
162
- # Mem0 - Memory extraction API (Engram backend)
163
- # =============================================================================
164
- mem0:
165
- build:
166
- context: ../../engram/mem0-server
167
- dockerfile: Dockerfile
168
- container_name: squads-mem0
169
- restart: unless-stopped
170
- environment:
171
- # Database
172
- POSTGRES_HOST: postgres
173
- POSTGRES_PORT: 5432
174
- POSTGRES_USER: squads
175
- POSTGRES_PASSWORD: squads
176
- POSTGRES_DB: engram
177
- POSTGRES_COLLECTION_NAME: memories
178
- # Neo4j (disabled by default - saves ~600MB RAM)
179
- NEO4J_ENABLED: ${NEO4J_ENABLED:-false}
180
- # LLM Provider: openai (fast) or ollama (local)
181
- # Set LLM_PROVIDER=openai and OPENAI_API_KEY for fast embeddings
182
- LLM_PROVIDER: ${LLM_PROVIDER:-openai}
183
- # OpenAI config (recommended for speed)
184
- OPENAI_API_KEY: ${OPENAI_API_KEY:-}
185
- OPENAI_LLM_MODEL: ${OPENAI_LLM_MODEL:-gpt-4o-mini}
186
- OPENAI_EMBEDDING_MODEL: ${OPENAI_EMBEDDING_MODEL:-text-embedding-3-small}
187
- OPENAI_EMBEDDING_DIMS: ${OPENAI_EMBEDDING_DIMS:-1536}
188
- # Ollama config (fallback for local/offline)
189
- OLLAMA_BASE_URL: ${OLLAMA_BASE_URL:-http://host.docker.internal:11434}
190
- OLLAMA_LLM_MODEL: ${OLLAMA_LLM_MODEL:-qwen3:latest}
191
- OLLAMA_EMBEDDING_MODEL: ${OLLAMA_EMBEDDING_MODEL:-nomic-embed-text:latest}
192
- OLLAMA_EMBEDDING_DIMS: ${OLLAMA_EMBEDDING_DIMS:-768}
193
- # Logging
194
- LOG_LEVEL: ${LOG_LEVEL:-INFO}
195
- ports:
196
- - "${MEM0_PORT:-8000}:8000"
197
- depends_on:
198
- postgres:
199
- condition: service_healthy
200
- healthcheck:
201
- test: ["CMD-SHELL", "python -c \"import urllib.request; urllib.request.urlopen('http://localhost:8000/health')\" || exit 1"]
202
- interval: 10s
203
- timeout: 5s
204
- retries: 5
205
- start_period: 30s
206
- networks:
207
- - squads
208
-
209
- # =============================================================================
210
- # Engram MCP Server - Claude Code memory integration
211
- # =============================================================================
212
- engram-mcp:
213
- build:
214
- context: ../../engram/mcp-server
215
- dockerfile: Dockerfile
216
- container_name: squads-engram-mcp
217
- restart: unless-stopped
218
- environment:
219
- MEM0_API_URL: http://mem0:8000
220
- MEM0_API_KEY: ${MEM0_API_KEY:-}
221
- LOG_LEVEL: ${LOG_LEVEL:-INFO}
222
- ports:
223
- - "${ENGRAM_MCP_PORT:-8081}:8080"
224
- depends_on:
225
- mem0:
226
- condition: service_healthy
227
- healthcheck:
228
- test: ["CMD-SHELL", "curl -f http://localhost:8080/health || exit 1"]
229
- interval: 10s
230
- timeout: 5s
231
- retries: 5
232
- networks:
233
- - squads
234
-
235
- # =============================================================================
236
- # Scheduler API - Trigger management and webhooks
237
- # =============================================================================
238
- scheduler-api:
239
- build:
240
- context: ../../hq/squads-scheduler
241
- dockerfile: Dockerfile
242
- container_name: squads-scheduler-api
243
- restart: unless-stopped
244
- command: uvicorn api:app --host 0.0.0.0 --port 8090
245
- environment:
246
- DATABASE_URL: postgresql://squads:squads@postgres:5432/squads
247
- STRIPE_WEBHOOK_SECRET: ${STRIPE_WEBHOOK_SECRET:-}
248
- ports:
249
- - "${SCHEDULER_API_PORT:-8090}:8090"
250
- depends_on:
251
- postgres:
252
- condition: service_healthy
253
- healthcheck:
254
- test: ["CMD", "curl", "-f", "http://localhost:8090/health"]
255
- interval: 30s
256
- timeout: 10s
257
- retries: 3
258
- networks:
259
- - squads
260
-
261
- # =============================================================================
262
- # Scheduler Worker - Trigger evaluation and agent execution
263
- # =============================================================================
264
- scheduler-worker:
265
- build:
266
- context: ../../hq/squads-scheduler
267
- dockerfile: Dockerfile
268
- container_name: squads-scheduler-worker
269
- restart: unless-stopped
270
- command: python scheduler.py
271
- environment:
272
- DATABASE_URL: postgresql://squads:squads@postgres:5432/squads
273
- HQ_PATH: /hq
274
- SQUADS_CLI: squads
275
- volumes:
276
- - ../../hq:/hq:ro
277
- depends_on:
278
- - scheduler-api
279
- networks:
280
- - squads
281
-
282
- # =============================================================================
283
- # Ngrok - Tunnel for webhooks (dev/testing)
284
- # =============================================================================
285
- ngrok:
286
- image: ngrok/ngrok:latest
287
- container_name: squads-ngrok
288
- restart: unless-stopped
289
- profiles: ["webhooks"] # Only start with: --profile webhooks
290
- command: http scheduler-api:8090 --log stdout
291
- environment:
292
- NGROK_AUTHTOKEN: ${NGROK_AUTHTOKEN:-}
293
- depends_on:
294
- - scheduler-api
295
- networks:
296
- - squads
297
-
298
- networks:
299
- squads:
300
- driver: bridge
301
-
302
- volumes:
303
- squads_postgres_data:
304
- squads_redis_data:
@@ -1,234 +0,0 @@
1
- # Squads Stack - Consolidated Infrastructure
2
- #
3
- # Usage:
4
- # cd squads-cli/docker && docker compose up -d
5
- #
6
- # Services:
7
- # - postgres:5433 Primary database (pgvector)
8
- # - redis:6379 Caching & queues
9
- # - otel-collector Receives telemetry from Claude Code
10
- # - squads-bridge Stores telemetry in Postgres
11
- # - scheduler-api Triggers, webhooks, approvals
12
- # - scheduler-worker Agent execution
13
-
14
- name: agents-squads
15
-
16
- services:
17
- # =============================================================================
18
- # PostgreSQL with pgvector - Primary data store
19
- # =============================================================================
20
- postgres:
21
- image: pgvector/pgvector:pg16
22
- container_name: squads-postgres
23
- restart: unless-stopped
24
- environment:
25
- POSTGRES_USER: squads
26
- POSTGRES_PASSWORD: squads
27
- POSTGRES_DB: squads
28
- ports:
29
- - "${POSTGRES_PORT:-5433}:5432"
30
- volumes:
31
- - squads_postgres_data:/var/lib/postgresql/data
32
- - ./init-db.sql:/docker-entrypoint-initdb.d/01-init-squads.sql:ro
33
- healthcheck:
34
- test: ["CMD-SHELL", "pg_isready -U squads -d squads"]
35
- interval: 5s
36
- timeout: 5s
37
- retries: 5
38
- networks:
39
- - squads
40
-
41
- # =============================================================================
42
- # Redis - Caching and job queues
43
- # =============================================================================
44
- redis:
45
- image: redis:7-alpine
46
- container_name: squads-redis
47
- restart: unless-stopped
48
- ports:
49
- - "${REDIS_PORT:-6379}:6379"
50
- volumes:
51
- - squads_redis_data:/data
52
- command: redis-server --appendonly yes
53
- healthcheck:
54
- test: ["CMD", "redis-cli", "ping"]
55
- interval: 5s
56
- timeout: 5s
57
- retries: 5
58
- networks:
59
- - squads
60
-
61
- # =============================================================================
62
- # OpenTelemetry Collector - Receives telemetry from Claude Code
63
- # =============================================================================
64
- otel-collector:
65
- image: otel/opentelemetry-collector-contrib:latest
66
- container_name: squads-otel-collector
67
- restart: unless-stopped
68
- command: ["--config=/etc/otel-collector.yaml"]
69
- volumes:
70
- - ./otel-collector.yaml:/etc/otel-collector.yaml:ro
71
- ports:
72
- - "${OTEL_PORT:-4318}:4318"
73
- depends_on:
74
- - squads-bridge
75
- networks:
76
- - squads
77
-
78
- # =============================================================================
79
- # Squads Bridge - Telemetry storage in Postgres
80
- # =============================================================================
81
- squads-bridge:
82
- build:
83
- context: ./squads-bridge
84
- dockerfile: Dockerfile
85
- container_name: squads-bridge
86
- restart: unless-stopped
87
- environment:
88
- PORT: 8080
89
- DEBUG: "${DEBUG:-0}"
90
- DATABASE_URL: postgresql://squads:squads@postgres:5432/squads
91
- REDIS_URL: redis://redis:6379/0
92
- SQUADS_DAILY_BUDGET: ${SQUADS_DAILY_BUDGET:-50.0}
93
- ports:
94
- - "${BRIDGE_PORT:-8088}:8080"
95
- depends_on:
96
- postgres:
97
- condition: service_healthy
98
- redis:
99
- condition: service_healthy
100
- networks:
101
- - squads
102
-
103
- # =============================================================================
104
- # Scheduler API - Triggers, webhooks, approvals
105
- # =============================================================================
106
- scheduler-api:
107
- build:
108
- context: ../../hq/squads-scheduler
109
- dockerfile: Dockerfile
110
- container_name: squads-scheduler-api
111
- restart: unless-stopped
112
- command: uvicorn api:app --host 0.0.0.0 --port 8090
113
- env_file:
114
- - ../../hq/.env
115
- environment:
116
- # Override database URL for container network
117
- DATABASE_URL: postgresql://squads:squads@postgres:5432/squads
118
- ports:
119
- - "${SCHEDULER_API_PORT:-8090}:8090"
120
- depends_on:
121
- postgres:
122
- condition: service_healthy
123
- healthcheck:
124
- test: ["CMD", "curl", "-f", "http://localhost:8090/health"]
125
- interval: 30s
126
- timeout: 10s
127
- retries: 3
128
- networks:
129
- - squads
130
-
131
- # =============================================================================
132
- # Scheduler Worker - Trigger evaluation and agent execution
133
- # =============================================================================
134
- scheduler-worker:
135
- build:
136
- context: ../../hq/squads-scheduler
137
- dockerfile: Dockerfile
138
- container_name: squads-scheduler-worker
139
- restart: unless-stopped
140
- command: python scheduler.py
141
- environment:
142
- DATABASE_URL: postgresql://squads:squads@postgres:5432/squads
143
- HQ_PATH: /hq
144
- SQUADS_CLI: squads
145
- volumes:
146
- - ../../hq:/hq:ro
147
- depends_on:
148
- - scheduler-api
149
- networks:
150
- - squads
151
-
152
- # =============================================================================
153
- # Slack Bot - Approvals and PR management
154
- # =============================================================================
155
- slack-bot:
156
- build:
157
- context: ../../slack-bot
158
- dockerfile: Dockerfile
159
- container_name: squads-slack-bot
160
- restart: unless-stopped
161
- env_file:
162
- - ../../hq/.env
163
- environment:
164
- # Scheduler API for approvals
165
- SCHEDULER_API_URL: http://scheduler-api:8090
166
- # HTTP port for CLI integration
167
- HTTP_PORT: 3001
168
- # GitHub CLI authentication (for PR/issue operations)
169
- GH_TOKEN: ${GH_TOKEN:-}
170
- # Approval channels - defaults to SLACK_CHANNEL if per-type not set
171
- SLACK_CHANNEL_ISSUES: ${SLACK_CHANNEL_ISSUES:-${SLACK_CHANNEL:-social}}
172
- SLACK_CHANNEL_PRS: ${SLACK_CHANNEL_PRS:-${SLACK_CHANNEL:-social}}
173
- SLACK_CHANNEL_CONTENT: ${SLACK_CHANNEL_CONTENT:-${SLACK_CHANNEL:-social}}
174
- SLACK_CHANNEL_RUNS: ${SLACK_CHANNEL_RUNS:-${SLACK_CHANNEL:-social}}
175
- SLACK_CHANNEL_BRIEFS: ${SLACK_CHANNEL_BRIEFS:-${SLACK_CHANNEL:-social}}
176
- ports:
177
- - "${SLACK_BOT_PORT:-3001}:3001"
178
- depends_on:
179
- - scheduler-api
180
- networks:
181
- - squads
182
-
183
- # =============================================================================
184
- # Slack Worker - Auto-respond to Slack messages
185
- # =============================================================================
186
- slack-worker:
187
- build:
188
- context: ../../hq/squads-scheduler
189
- dockerfile: Dockerfile
190
- container_name: squads-slack-worker
191
- restart: unless-stopped
192
- command: python -u slack_worker.py
193
- env_file:
194
- - ../../hq/.env
195
- environment:
196
- PYTHONUNBUFFERED: "1"
197
- DATABASE_URL: postgresql://squads:squads@postgres:5432/squads
198
- SLACK_BOT_URL: http://slack-bot:3001
199
- HQ_PATH: /hq
200
- SLACK_WORKER_POLL_INTERVAL: "5"
201
- SLACK_WORKER_MODEL: "claude-sonnet-4-20250514"
202
- volumes:
203
- - ../../hq:/hq:ro
204
- depends_on:
205
- postgres:
206
- condition: service_healthy
207
- slack-bot:
208
- condition: service_started
209
- networks:
210
- - squads
211
-
212
- # =============================================================================
213
- # Ngrok - Webhook tunnel (optional, for Stripe webhooks in dev)
214
- # =============================================================================
215
- ngrok:
216
- image: ngrok/ngrok:latest
217
- container_name: squads-ngrok
218
- restart: unless-stopped
219
- profiles: ["webhooks"]
220
- command: http scheduler-api:8090 --log stdout
221
- environment:
222
- NGROK_AUTHTOKEN: ${NGROK_AUTHTOKEN:-}
223
- depends_on:
224
- - scheduler-api
225
- networks:
226
- - squads
227
-
228
- networks:
229
- squads:
230
- driver: bridge
231
-
232
- volumes:
233
- squads_postgres_data:
234
- squads_redis_data: