squads-cli 0.4.11 → 0.4.13
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 +24 -4
- package/dist/chunk-3TSY2K7R.js +473 -0
- package/dist/chunk-3TSY2K7R.js.map +1 -0
- package/dist/cli.js +4292 -1091
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +54 -0
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/squad-parser-YRE2FEAA.js +31 -0
- package/dist/squad-parser-YRE2FEAA.js.map +1 -0
- package/docker/docker-compose.engram.yml +26 -0
- package/docker/docker-compose.yml +118 -78
- package/docker/squads-bridge/squads_bridge.py +534 -8
- package/package.json +12 -8
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
# Squads
|
|
2
|
-
# Full telemetry pipeline: OTel → Bridge → Langfuse (local or cloud)
|
|
1
|
+
# Squads Stack - Consolidated Infrastructure
|
|
3
2
|
#
|
|
4
3
|
# Usage:
|
|
5
|
-
# cd docker && docker
|
|
4
|
+
# cd squads-cli/docker && docker compose up -d
|
|
6
5
|
#
|
|
7
|
-
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
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
|
|
10
13
|
|
|
11
14
|
name: agents-squads
|
|
12
15
|
|
|
13
16
|
services:
|
|
14
17
|
# =============================================================================
|
|
15
|
-
# PostgreSQL - Primary data store
|
|
18
|
+
# PostgreSQL with pgvector - Primary data store
|
|
16
19
|
# =============================================================================
|
|
17
20
|
postgres:
|
|
18
|
-
image:
|
|
21
|
+
image: pgvector/pgvector:pg16
|
|
19
22
|
container_name: squads-postgres
|
|
20
23
|
restart: unless-stopped
|
|
21
24
|
environment:
|
|
22
25
|
POSTGRES_USER: squads
|
|
23
26
|
POSTGRES_PASSWORD: squads
|
|
24
27
|
POSTGRES_DB: squads
|
|
25
|
-
# Create both databases on init
|
|
26
|
-
POSTGRES_MULTIPLE_DATABASES: langfuse
|
|
27
28
|
ports:
|
|
28
29
|
- "${POSTGRES_PORT:-5433}:5432"
|
|
29
30
|
volumes:
|
|
30
31
|
- squads_postgres_data:/var/lib/postgresql/data
|
|
31
32
|
- ./init-db.sql:/docker-entrypoint-initdb.d/01-init-squads.sql:ro
|
|
32
|
-
- ./init-langfuse-db.sh:/docker-entrypoint-initdb.d/00-init-langfuse.sh:ro
|
|
33
33
|
healthcheck:
|
|
34
34
|
test: ["CMD-SHELL", "pg_isready -U squads -d squads"]
|
|
35
35
|
interval: 5s
|
|
@@ -58,34 +58,6 @@ services:
|
|
|
58
58
|
networks:
|
|
59
59
|
- squads
|
|
60
60
|
|
|
61
|
-
# =============================================================================
|
|
62
|
-
# Langfuse - LLM Observability (local instance)
|
|
63
|
-
# =============================================================================
|
|
64
|
-
langfuse:
|
|
65
|
-
image: langfuse/langfuse:2
|
|
66
|
-
container_name: squads-langfuse
|
|
67
|
-
restart: unless-stopped
|
|
68
|
-
depends_on:
|
|
69
|
-
postgres:
|
|
70
|
-
condition: service_healthy
|
|
71
|
-
environment:
|
|
72
|
-
DATABASE_URL: postgresql://squads:squads@postgres:5432/langfuse
|
|
73
|
-
NEXTAUTH_SECRET: ${NEXTAUTH_SECRET:-squads-local-dev-secret}
|
|
74
|
-
NEXTAUTH_URL: http://localhost:${LANGFUSE_PORT:-3100}
|
|
75
|
-
SALT: ${LANGFUSE_SALT:-squads-local-salt}
|
|
76
|
-
TELEMETRY_ENABLED: "false"
|
|
77
|
-
LANGFUSE_ENABLE_EXPERIMENTAL_FEATURES: "true"
|
|
78
|
-
ports:
|
|
79
|
-
- "${LANGFUSE_PORT:-3100}:3000"
|
|
80
|
-
healthcheck:
|
|
81
|
-
test: ["CMD-SHELL", "wget -q --spider http://localhost:3000/api/public/health || exit 1"]
|
|
82
|
-
interval: 30s
|
|
83
|
-
timeout: 15s
|
|
84
|
-
retries: 10
|
|
85
|
-
start_period: 60s
|
|
86
|
-
networks:
|
|
87
|
-
- squads
|
|
88
|
-
|
|
89
61
|
# =============================================================================
|
|
90
62
|
# OpenTelemetry Collector - Receives telemetry from Claude Code
|
|
91
63
|
# =============================================================================
|
|
@@ -104,7 +76,7 @@ services:
|
|
|
104
76
|
- squads
|
|
105
77
|
|
|
106
78
|
# =============================================================================
|
|
107
|
-
# Squads Bridge - Telemetry storage
|
|
79
|
+
# Squads Bridge - Telemetry storage in Postgres
|
|
108
80
|
# =============================================================================
|
|
109
81
|
squads-bridge:
|
|
110
82
|
build:
|
|
@@ -114,18 +86,10 @@ services:
|
|
|
114
86
|
restart: unless-stopped
|
|
115
87
|
environment:
|
|
116
88
|
PORT: 8080
|
|
117
|
-
DEBUG: "
|
|
118
|
-
# Primary storage: PostgreSQL (durable)
|
|
89
|
+
DEBUG: "${DEBUG:-0}"
|
|
119
90
|
DATABASE_URL: postgresql://squads:squads@postgres:5432/squads
|
|
120
|
-
# Cache: Redis (real-time stats, session cache)
|
|
121
91
|
REDIS_URL: redis://redis:6379/0
|
|
122
|
-
# Budget tracking
|
|
123
92
|
SQUADS_DAILY_BUDGET: ${SQUADS_DAILY_BUDGET:-50.0}
|
|
124
|
-
# Optional: Forward to Langfuse (set LANGFUSE_ENABLED=true to enable)
|
|
125
|
-
LANGFUSE_ENABLED: ${LANGFUSE_ENABLED:-false}
|
|
126
|
-
LANGFUSE_HOST: ${LANGFUSE_HOST:-http://langfuse:3000}
|
|
127
|
-
LANGFUSE_PUBLIC_KEY: ${LANGFUSE_PUBLIC_KEY:-}
|
|
128
|
-
LANGFUSE_SECRET_KEY: ${LANGFUSE_SECRET_KEY:-}
|
|
129
93
|
ports:
|
|
130
94
|
- "${BRIDGE_PORT:-8088}:8080"
|
|
131
95
|
depends_on:
|
|
@@ -137,50 +101,127 @@ services:
|
|
|
137
101
|
- squads
|
|
138
102
|
|
|
139
103
|
# =============================================================================
|
|
140
|
-
#
|
|
104
|
+
# Scheduler API - Triggers, webhooks, approvals
|
|
141
105
|
# =============================================================================
|
|
142
|
-
|
|
106
|
+
scheduler-api:
|
|
143
107
|
build:
|
|
144
|
-
context:
|
|
145
|
-
dockerfile: Dockerfile
|
|
146
|
-
container_name: squads-
|
|
108
|
+
context: ../../hq/squads-scheduler
|
|
109
|
+
dockerfile: Dockerfile
|
|
110
|
+
container_name: squads-scheduler-api
|
|
147
111
|
restart: unless-stopped
|
|
148
|
-
|
|
112
|
+
command: uvicorn api:app --host 0.0.0.0 --port 8090
|
|
113
|
+
env_file:
|
|
114
|
+
- ../../hq/.env
|
|
149
115
|
environment:
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
ANTHROPIC_API_URL: https://api.anthropic.com
|
|
153
|
-
REDIS_URL: redis://redis:6379/0
|
|
154
|
-
SQUADS_BRIDGE_URL: http://squads-bridge:8080
|
|
116
|
+
# Override database URL for container network
|
|
117
|
+
DATABASE_URL: postgresql://squads:squads@postgres:5432/squads
|
|
155
118
|
ports:
|
|
156
|
-
- "${
|
|
119
|
+
- "${SCHEDULER_API_PORT:-8090}:8090"
|
|
157
120
|
depends_on:
|
|
158
|
-
|
|
121
|
+
postgres:
|
|
159
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
|
|
160
149
|
networks:
|
|
161
150
|
- squads
|
|
162
151
|
|
|
163
152
|
# =============================================================================
|
|
164
|
-
#
|
|
153
|
+
# Slack Bot - Approvals and PR management
|
|
165
154
|
# =============================================================================
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
155
|
+
slack-bot:
|
|
156
|
+
build:
|
|
157
|
+
context: ../../slack-bot
|
|
158
|
+
dockerfile: Dockerfile
|
|
159
|
+
container_name: squads-slack-bot
|
|
169
160
|
restart: unless-stopped
|
|
170
|
-
|
|
161
|
+
env_file:
|
|
162
|
+
- ../../hq/.env
|
|
171
163
|
environment:
|
|
172
|
-
|
|
173
|
-
|
|
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}}
|
|
174
176
|
ports:
|
|
175
|
-
- "${
|
|
176
|
-
|
|
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"
|
|
177
202
|
volumes:
|
|
178
|
-
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
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
|
|
184
225
|
networks:
|
|
185
226
|
- squads
|
|
186
227
|
|
|
@@ -191,4 +232,3 @@ networks:
|
|
|
191
232
|
volumes:
|
|
192
233
|
squads_postgres_data:
|
|
193
234
|
squads_redis_data:
|
|
194
|
-
squads_neo4j_data:
|