@_xtribe/cli 1.0.0-beta.9 → 1.0.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/README.md +30 -7
- package/install-tribe.js +1110 -410
- package/package.json +8 -10
- package/lima-guestagent.Linux-aarch64.gz +0 -0
- package/tribe +0 -0
- package/tribe-deployment.yaml +0 -448
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@_xtribe/cli",
|
|
3
|
-
"version": "1.0.0
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "TRIBE multi-agent development system - Zero to productive with one command",
|
|
5
5
|
"main": "install-tribe.js",
|
|
6
6
|
"bin": {
|
|
7
|
-
"tribe": "install-tribe.js"
|
|
7
|
+
"install-tribe": "./install-tribe.js"
|
|
8
8
|
},
|
|
9
9
|
"scripts": {
|
|
10
10
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
@@ -35,27 +35,25 @@
|
|
|
35
35
|
},
|
|
36
36
|
"files": [
|
|
37
37
|
"install-tribe.js",
|
|
38
|
-
"lima-guestagent.Linux-aarch64.gz",
|
|
39
|
-
"tribe-deployment.yaml",
|
|
40
|
-
"tribe",
|
|
41
38
|
"README.md",
|
|
42
39
|
"package.json"
|
|
43
40
|
],
|
|
44
41
|
"dependencies": {
|
|
42
|
+
"adm-zip": "^0.5.9",
|
|
45
43
|
"chalk": "^4.1.2",
|
|
46
|
-
"ora": "^5.4.1",
|
|
47
44
|
"node-fetch": "^2.6.7",
|
|
45
|
+
"ora": "^5.4.1",
|
|
48
46
|
"tar": "^6.1.15",
|
|
49
47
|
"which": "^2.0.2"
|
|
50
48
|
},
|
|
51
49
|
"repository": {
|
|
52
50
|
"type": "git",
|
|
53
|
-
"url": "git+https://github.com/
|
|
51
|
+
"url": "git+https://github.com/TRIBE-INC/0zen.git"
|
|
54
52
|
},
|
|
55
|
-
"author": "
|
|
53
|
+
"author": "TRIBE-INC",
|
|
56
54
|
"license": "MIT",
|
|
57
|
-
"homepage": "https://github.com/
|
|
55
|
+
"homepage": "https://github.com/TRIBE-INC/0zen",
|
|
58
56
|
"bugs": {
|
|
59
|
-
"url": "https://github.com/
|
|
57
|
+
"url": "https://github.com/TRIBE-INC/0zen/issues"
|
|
60
58
|
}
|
|
61
59
|
}
|
|
Binary file
|
package/tribe
DELETED
|
Binary file
|
package/tribe-deployment.yaml
DELETED
|
@@ -1,448 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
# TRIBE Complete Deployment - Bundled with NPM Package
|
|
3
|
-
# This file is automatically deployed by 'npx @_xtribe/cli'
|
|
4
|
-
---
|
|
5
|
-
apiVersion: v1
|
|
6
|
-
kind: Namespace
|
|
7
|
-
metadata:
|
|
8
|
-
name: tribe-system
|
|
9
|
-
---
|
|
10
|
-
# ServiceAccount for Bridge
|
|
11
|
-
apiVersion: v1
|
|
12
|
-
kind: ServiceAccount
|
|
13
|
-
metadata:
|
|
14
|
-
name: bridge
|
|
15
|
-
namespace: tribe-system
|
|
16
|
-
---
|
|
17
|
-
# Role for Bridge
|
|
18
|
-
apiVersion: rbac.authorization.k8s.io/v1
|
|
19
|
-
kind: Role
|
|
20
|
-
metadata:
|
|
21
|
-
name: bridge-role
|
|
22
|
-
namespace: tribe-system
|
|
23
|
-
rules:
|
|
24
|
-
- apiGroups: [""]
|
|
25
|
-
resources: ["pods", "services", "pods/exec", "pods/log", "configmaps", "secrets", "namespaces"]
|
|
26
|
-
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
|
|
27
|
-
- apiGroups: ["apps"]
|
|
28
|
-
resources: ["deployments", "replicasets"]
|
|
29
|
-
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
|
|
30
|
-
- apiGroups: ["batch"]
|
|
31
|
-
resources: ["jobs"]
|
|
32
|
-
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
|
|
33
|
-
---
|
|
34
|
-
# RoleBinding for Bridge
|
|
35
|
-
apiVersion: rbac.authorization.k8s.io/v1
|
|
36
|
-
kind: RoleBinding
|
|
37
|
-
metadata:
|
|
38
|
-
name: bridge-rolebinding
|
|
39
|
-
namespace: tribe-system
|
|
40
|
-
subjects:
|
|
41
|
-
- kind: ServiceAccount
|
|
42
|
-
name: bridge
|
|
43
|
-
namespace: tribe-system
|
|
44
|
-
roleRef:
|
|
45
|
-
kind: Role
|
|
46
|
-
name: bridge-role
|
|
47
|
-
apiGroup: rbac.authorization.k8s.io
|
|
48
|
-
---
|
|
49
|
-
# PostgreSQL
|
|
50
|
-
apiVersion: apps/v1
|
|
51
|
-
kind: Deployment
|
|
52
|
-
metadata:
|
|
53
|
-
name: postgres
|
|
54
|
-
namespace: tribe-system
|
|
55
|
-
spec:
|
|
56
|
-
replicas: 1
|
|
57
|
-
selector:
|
|
58
|
-
matchLabels:
|
|
59
|
-
app: postgres
|
|
60
|
-
template:
|
|
61
|
-
metadata:
|
|
62
|
-
labels:
|
|
63
|
-
app: postgres
|
|
64
|
-
spec:
|
|
65
|
-
containers:
|
|
66
|
-
- name: postgres
|
|
67
|
-
image: postgres:15
|
|
68
|
-
env:
|
|
69
|
-
- name: POSTGRES_DB
|
|
70
|
-
value: gitea
|
|
71
|
-
- name: POSTGRES_USER
|
|
72
|
-
value: gitea
|
|
73
|
-
- name: POSTGRES_PASSWORD
|
|
74
|
-
value: gitea
|
|
75
|
-
ports:
|
|
76
|
-
- containerPort: 5432
|
|
77
|
-
readinessProbe:
|
|
78
|
-
exec:
|
|
79
|
-
command:
|
|
80
|
-
- pg_isready
|
|
81
|
-
- -U
|
|
82
|
-
- gitea
|
|
83
|
-
initialDelaySeconds: 5
|
|
84
|
-
periodSeconds: 5
|
|
85
|
-
---
|
|
86
|
-
apiVersion: v1
|
|
87
|
-
kind: Service
|
|
88
|
-
metadata:
|
|
89
|
-
name: postgres
|
|
90
|
-
namespace: tribe-system
|
|
91
|
-
spec:
|
|
92
|
-
selector:
|
|
93
|
-
app: postgres
|
|
94
|
-
ports:
|
|
95
|
-
- port: 5432
|
|
96
|
-
---
|
|
97
|
-
# Gitea
|
|
98
|
-
apiVersion: apps/v1
|
|
99
|
-
kind: Deployment
|
|
100
|
-
metadata:
|
|
101
|
-
name: gitea
|
|
102
|
-
namespace: tribe-system
|
|
103
|
-
spec:
|
|
104
|
-
replicas: 1
|
|
105
|
-
selector:
|
|
106
|
-
matchLabels:
|
|
107
|
-
app: gitea
|
|
108
|
-
template:
|
|
109
|
-
metadata:
|
|
110
|
-
labels:
|
|
111
|
-
app: gitea
|
|
112
|
-
spec:
|
|
113
|
-
initContainers:
|
|
114
|
-
- name: wait-for-db
|
|
115
|
-
image: busybox:1.35
|
|
116
|
-
command: ['sh', '-c', 'until nc -z postgres 5432; do echo waiting for db; sleep 2; done']
|
|
117
|
-
- name: init-gitea
|
|
118
|
-
image: gitea/gitea:1.20.5
|
|
119
|
-
command: ['/bin/bash', '-c']
|
|
120
|
-
args:
|
|
121
|
-
- |
|
|
122
|
-
# Create app.ini
|
|
123
|
-
mkdir -p /data/gitea/conf
|
|
124
|
-
cat > /data/gitea/conf/app.ini << 'EOF'
|
|
125
|
-
APP_NAME = Gitea
|
|
126
|
-
RUN_MODE = prod
|
|
127
|
-
|
|
128
|
-
[database]
|
|
129
|
-
DB_TYPE = postgres
|
|
130
|
-
HOST = postgres:5432
|
|
131
|
-
NAME = gitea
|
|
132
|
-
USER = gitea
|
|
133
|
-
PASSWD = gitea
|
|
134
|
-
|
|
135
|
-
[server]
|
|
136
|
-
DOMAIN = gitea
|
|
137
|
-
ROOT_URL = http://gitea:3000/
|
|
138
|
-
HTTP_PORT = 3000
|
|
139
|
-
|
|
140
|
-
[service]
|
|
141
|
-
DISABLE_REGISTRATION = true
|
|
142
|
-
|
|
143
|
-
[security]
|
|
144
|
-
INSTALL_LOCK = true
|
|
145
|
-
SECRET_KEY = changeme
|
|
146
|
-
EOF
|
|
147
|
-
|
|
148
|
-
# Run migrations
|
|
149
|
-
gitea migrate
|
|
150
|
-
|
|
151
|
-
# Create admin user
|
|
152
|
-
gitea admin user create --admin --username gitea_admin --password admin123 --email admin@example.com || true
|
|
153
|
-
env:
|
|
154
|
-
- name: GITEA_WORK_DIR
|
|
155
|
-
value: /data
|
|
156
|
-
- name: GITEA_CUSTOM
|
|
157
|
-
value: /data/gitea
|
|
158
|
-
volumeMounts:
|
|
159
|
-
- name: gitea-data
|
|
160
|
-
mountPath: /data
|
|
161
|
-
containers:
|
|
162
|
-
- name: gitea
|
|
163
|
-
image: gitea/gitea:1.20.5
|
|
164
|
-
ports:
|
|
165
|
-
- containerPort: 3000
|
|
166
|
-
env:
|
|
167
|
-
- name: GITEA_WORK_DIR
|
|
168
|
-
value: /data
|
|
169
|
-
- name: GITEA_CUSTOM
|
|
170
|
-
value: /data/gitea
|
|
171
|
-
volumeMounts:
|
|
172
|
-
- name: gitea-data
|
|
173
|
-
mountPath: /data
|
|
174
|
-
readinessProbe:
|
|
175
|
-
httpGet:
|
|
176
|
-
path: /
|
|
177
|
-
port: 3000
|
|
178
|
-
initialDelaySeconds: 30
|
|
179
|
-
periodSeconds: 10
|
|
180
|
-
volumes:
|
|
181
|
-
- name: gitea-data
|
|
182
|
-
emptyDir: {}
|
|
183
|
-
---
|
|
184
|
-
apiVersion: v1
|
|
185
|
-
kind: Service
|
|
186
|
-
metadata:
|
|
187
|
-
name: gitea
|
|
188
|
-
namespace: tribe-system
|
|
189
|
-
spec:
|
|
190
|
-
selector:
|
|
191
|
-
app: gitea
|
|
192
|
-
ports:
|
|
193
|
-
- port: 3000
|
|
194
|
-
---
|
|
195
|
-
# TaskMaster
|
|
196
|
-
apiVersion: apps/v1
|
|
197
|
-
kind: Deployment
|
|
198
|
-
metadata:
|
|
199
|
-
name: taskmaster
|
|
200
|
-
namespace: tribe-system
|
|
201
|
-
spec:
|
|
202
|
-
replicas: 1
|
|
203
|
-
selector:
|
|
204
|
-
matchLabels:
|
|
205
|
-
app: taskmaster
|
|
206
|
-
template:
|
|
207
|
-
metadata:
|
|
208
|
-
labels:
|
|
209
|
-
app: taskmaster
|
|
210
|
-
spec:
|
|
211
|
-
initContainers:
|
|
212
|
-
- name: wait-for-db
|
|
213
|
-
image: busybox:1.35
|
|
214
|
-
command: ['sh', '-c', 'until nc -z postgres 5432; do echo waiting for db; sleep 2; done']
|
|
215
|
-
containers:
|
|
216
|
-
- name: taskmaster
|
|
217
|
-
image: taskmaster:latest
|
|
218
|
-
imagePullPolicy: IfNotPresent
|
|
219
|
-
ports:
|
|
220
|
-
- containerPort: 5000
|
|
221
|
-
env:
|
|
222
|
-
- name: FLASK_ENV
|
|
223
|
-
value: development
|
|
224
|
-
- name: DATABASE_URL
|
|
225
|
-
value: postgresql://gitea:gitea@postgres:5432/gitea
|
|
226
|
-
- name: GITEA_URL
|
|
227
|
-
value: http://gitea:3000
|
|
228
|
-
- name: GITEA_TOKEN
|
|
229
|
-
value: will-be-set-by-init-job
|
|
230
|
-
readinessProbe:
|
|
231
|
-
httpGet:
|
|
232
|
-
path: /
|
|
233
|
-
port: 5000
|
|
234
|
-
initialDelaySeconds: 10
|
|
235
|
-
periodSeconds: 5
|
|
236
|
-
---
|
|
237
|
-
apiVersion: v1
|
|
238
|
-
kind: Service
|
|
239
|
-
metadata:
|
|
240
|
-
name: taskmaster
|
|
241
|
-
namespace: tribe-system
|
|
242
|
-
spec:
|
|
243
|
-
selector:
|
|
244
|
-
app: taskmaster
|
|
245
|
-
ports:
|
|
246
|
-
- port: 5000
|
|
247
|
-
---
|
|
248
|
-
# Bridge
|
|
249
|
-
apiVersion: apps/v1
|
|
250
|
-
kind: Deployment
|
|
251
|
-
metadata:
|
|
252
|
-
name: bridge
|
|
253
|
-
namespace: tribe-system
|
|
254
|
-
spec:
|
|
255
|
-
replicas: 1
|
|
256
|
-
selector:
|
|
257
|
-
matchLabels:
|
|
258
|
-
app: bridge
|
|
259
|
-
template:
|
|
260
|
-
metadata:
|
|
261
|
-
labels:
|
|
262
|
-
app: bridge
|
|
263
|
-
spec:
|
|
264
|
-
serviceAccountName: bridge
|
|
265
|
-
initContainers:
|
|
266
|
-
- name: wait-for-services
|
|
267
|
-
image: busybox:1.35
|
|
268
|
-
command: ['sh', '-c']
|
|
269
|
-
args:
|
|
270
|
-
- |
|
|
271
|
-
echo "Waiting for services..."
|
|
272
|
-
until nc -z taskmaster 5000; do echo waiting for taskmaster; sleep 2; done
|
|
273
|
-
until nc -z gitea 3000; do echo waiting for gitea; sleep 2; done
|
|
274
|
-
echo "All services ready!"
|
|
275
|
-
containers:
|
|
276
|
-
- name: bridge
|
|
277
|
-
image: bridge:latest
|
|
278
|
-
imagePullPolicy: IfNotPresent
|
|
279
|
-
ports:
|
|
280
|
-
- containerPort: 8080
|
|
281
|
-
- containerPort: 3456
|
|
282
|
-
env:
|
|
283
|
-
- name: TASKMASTER_URL
|
|
284
|
-
value: http://taskmaster:5000
|
|
285
|
-
- name: GITEA_URL
|
|
286
|
-
value: http://gitea:3000
|
|
287
|
-
- name: GITEA_ADMIN_USER
|
|
288
|
-
value: gitea_admin
|
|
289
|
-
- name: GITEA_ADMIN_PASSWORD
|
|
290
|
-
value: admin123
|
|
291
|
-
- name: NAMESPACE
|
|
292
|
-
value: tribe-system
|
|
293
|
-
readinessProbe:
|
|
294
|
-
httpGet:
|
|
295
|
-
path: /health
|
|
296
|
-
port: 8080
|
|
297
|
-
initialDelaySeconds: 10
|
|
298
|
-
periodSeconds: 5
|
|
299
|
-
---
|
|
300
|
-
apiVersion: v1
|
|
301
|
-
kind: Service
|
|
302
|
-
metadata:
|
|
303
|
-
name: bridge
|
|
304
|
-
namespace: tribe-system
|
|
305
|
-
spec:
|
|
306
|
-
selector:
|
|
307
|
-
app: bridge
|
|
308
|
-
ports:
|
|
309
|
-
- name: http
|
|
310
|
-
port: 8080
|
|
311
|
-
- name: websocket
|
|
312
|
-
port: 3456
|
|
313
|
-
---
|
|
314
|
-
# Claude Worker Deployment (starts with 0 replicas)
|
|
315
|
-
apiVersion: apps/v1
|
|
316
|
-
kind: Deployment
|
|
317
|
-
metadata:
|
|
318
|
-
name: claude-worker-deployment
|
|
319
|
-
namespace: tribe-system
|
|
320
|
-
spec:
|
|
321
|
-
replicas: 0
|
|
322
|
-
selector:
|
|
323
|
-
matchLabels:
|
|
324
|
-
app: claude-worker
|
|
325
|
-
template:
|
|
326
|
-
metadata:
|
|
327
|
-
labels:
|
|
328
|
-
app: claude-worker
|
|
329
|
-
spec:
|
|
330
|
-
containers:
|
|
331
|
-
- name: claude-agent
|
|
332
|
-
image: claude-agent:latest
|
|
333
|
-
imagePullPolicy: IfNotPresent
|
|
334
|
-
env:
|
|
335
|
-
- name: ROLE
|
|
336
|
-
value: worker
|
|
337
|
-
- name: TASKMASTER_URL
|
|
338
|
-
value: http://taskmaster:5000
|
|
339
|
-
- name: GITEA_URL
|
|
340
|
-
value: http://gitea:3000
|
|
341
|
-
- name: NAMESPACE
|
|
342
|
-
value: tribe-system
|
|
343
|
-
- name: ANTHROPIC_API_KEY
|
|
344
|
-
valueFrom:
|
|
345
|
-
secretKeyRef:
|
|
346
|
-
name: claude-api-key
|
|
347
|
-
key: api-key
|
|
348
|
-
optional: true
|
|
349
|
-
volumeMounts:
|
|
350
|
-
- name: workspace
|
|
351
|
-
mountPath: /workspace
|
|
352
|
-
- name: config
|
|
353
|
-
mountPath: /app/minimal-config
|
|
354
|
-
readinessProbe:
|
|
355
|
-
exec:
|
|
356
|
-
command:
|
|
357
|
-
- /bin/sh
|
|
358
|
-
- -c
|
|
359
|
-
- test -f /tmp/worker-ready
|
|
360
|
-
initialDelaySeconds: 30
|
|
361
|
-
periodSeconds: 10
|
|
362
|
-
volumes:
|
|
363
|
-
- name: workspace
|
|
364
|
-
emptyDir: {}
|
|
365
|
-
- name: config
|
|
366
|
-
configMap:
|
|
367
|
-
name: claude-config
|
|
368
|
-
optional: true
|
|
369
|
-
---
|
|
370
|
-
# NodePort service for easy access
|
|
371
|
-
apiVersion: v1
|
|
372
|
-
kind: Service
|
|
373
|
-
metadata:
|
|
374
|
-
name: bridge-nodeport
|
|
375
|
-
namespace: tribe-system
|
|
376
|
-
spec:
|
|
377
|
-
type: NodePort
|
|
378
|
-
selector:
|
|
379
|
-
app: bridge
|
|
380
|
-
ports:
|
|
381
|
-
- name: http
|
|
382
|
-
port: 8080
|
|
383
|
-
nodePort: 30080
|
|
384
|
-
- name: websocket
|
|
385
|
-
port: 3456
|
|
386
|
-
nodePort: 30456
|
|
387
|
-
---
|
|
388
|
-
# ConfigMap for Claude agent configuration
|
|
389
|
-
apiVersion: v1
|
|
390
|
-
kind: ConfigMap
|
|
391
|
-
metadata:
|
|
392
|
-
name: claude-config
|
|
393
|
-
namespace: tribe-system
|
|
394
|
-
data:
|
|
395
|
-
config.yaml: |
|
|
396
|
-
mcp_servers:
|
|
397
|
-
filesystem:
|
|
398
|
-
command: npx
|
|
399
|
-
args: ["-y", "@modelcontextprotocol/server-filesystem", "/workspace"]
|
|
400
|
-
git:
|
|
401
|
-
command: npx
|
|
402
|
-
args: ["-y", "@modelcontextprotocol/server-git"]
|
|
403
|
-
env:
|
|
404
|
-
PATH: /usr/local/bin:/usr/bin:/bin
|
|
405
|
-
---
|
|
406
|
-
# Initialization Job
|
|
407
|
-
apiVersion: batch/v1
|
|
408
|
-
kind: Job
|
|
409
|
-
metadata:
|
|
410
|
-
name: tribe-init
|
|
411
|
-
namespace: tribe-system
|
|
412
|
-
spec:
|
|
413
|
-
template:
|
|
414
|
-
spec:
|
|
415
|
-
restartPolicy: OnFailure
|
|
416
|
-
containers:
|
|
417
|
-
- name: init
|
|
418
|
-
image: curlimages/curl:8.4.0
|
|
419
|
-
command: ['/bin/sh', '-c']
|
|
420
|
-
args:
|
|
421
|
-
- |
|
|
422
|
-
echo "Waiting for Gitea to be ready..."
|
|
423
|
-
until curl -s http://gitea:3000 > /dev/null; do
|
|
424
|
-
echo "Waiting for Gitea..."
|
|
425
|
-
sleep 5
|
|
426
|
-
done
|
|
427
|
-
|
|
428
|
-
echo "Creating Gitea access token..."
|
|
429
|
-
TOKEN=$(curl -s -X POST http://gitea:3000/api/v1/users/gitea_admin/tokens \
|
|
430
|
-
-u gitea_admin:admin123 \
|
|
431
|
-
-H "Content-Type: application/json" \
|
|
432
|
-
-d '{"name":"taskmaster-'$(date +%s)'","scopes":["write:repository","write:user","write:issue","write:organization","read:repository"]}' \
|
|
433
|
-
| grep -o '"sha1":"[^"]*' | cut -d'"' -f4)
|
|
434
|
-
|
|
435
|
-
if [ -z "$TOKEN" ]; then
|
|
436
|
-
echo "Failed to create token!"
|
|
437
|
-
exit 1
|
|
438
|
-
fi
|
|
439
|
-
|
|
440
|
-
echo "Token created successfully"
|
|
441
|
-
|
|
442
|
-
# Update TaskMaster with the token
|
|
443
|
-
echo "Updating TaskMaster configuration..."
|
|
444
|
-
curl -X POST http://taskmaster:5000/api/config \
|
|
445
|
-
-H "Content-Type: application/json" \
|
|
446
|
-
-d "{\"gitea_token\":\"$TOKEN\"}"
|
|
447
|
-
|
|
448
|
-
echo "Initialization complete!"
|