@oxgeneral/orch 1.0.5 → 1.0.7
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/dist/App-LEVUTWQN.js +22 -0
- package/dist/{chunk-UTDC3OB3.js → chunk-4TDXD3LA.js} +53 -6
- package/dist/chunk-4TDXD3LA.js.map +1 -0
- package/dist/{chunk-BSJVYRI3.js → chunk-EH3HRQP4.js} +59 -8
- package/dist/chunk-EH3HRQP4.js.map +1 -0
- package/dist/chunk-FQ5YUP4J.js +4 -0
- package/dist/{chunk-TPTHLFOB.js → chunk-HYPSQAQX.js} +1 -1
- package/dist/{chunk-LXNRCJ22.js → chunk-KR7VDF23.js} +1 -1
- package/dist/{chunk-KFQTWMZI.js → chunk-LOJ26OVK.js} +1 -1
- package/dist/{chunk-PJ5DKXGR.js → chunk-N4OXN2HW.js} +1 -1
- package/dist/{chunk-MOWC2CHX.js → chunk-TWEMIPRN.js} +12 -8
- package/dist/chunk-TWEMIPRN.js.map +1 -0
- package/dist/chunk-WVJTXBPL.js +11 -0
- package/dist/claude-ADMRIWTR.js +2 -0
- package/dist/{claude-4R6L6BWY.js → claude-OTQ2NSJR.js} +3 -3
- package/dist/{claude-4R6L6BWY.js.map → claude-OTQ2NSJR.js.map} +1 -1
- package/dist/cli.js +1 -1
- package/dist/{codex-YRSODLH4.js → codex-AZD52UPS.js} +1 -1
- package/dist/{codex-IMOW5ZUZ.js → codex-WQ3LU3MM.js} +3 -3
- package/dist/{codex-IMOW5ZUZ.js.map → codex-WQ3LU3MM.js.map} +1 -1
- package/dist/container-FXUUV6PP.js +4 -0
- package/dist/{cursor-2HILMNM3.js → cursor-M3EJ432K.js} +1 -1
- package/dist/{cursor-NHV7X3WG.js → cursor-TKV5FFCN.js} +3 -3
- package/dist/{cursor-NHV7X3WG.js.map → cursor-TKV5FFCN.js.map} +1 -1
- package/dist/doctor-P2J6VAUX.js +2 -0
- package/dist/index.d.ts +13 -1
- package/dist/index.js +14 -11
- package/dist/index.js.map +1 -1
- package/dist/{init-56QC5QVX.js → init-PTAYCSMO.js} +4 -4
- package/dist/{once-runner-UCMXCY6C.js → once-runner-AMKCFW22.js} +1 -1
- package/dist/{opencode-3S4VDXRG.js → opencode-4G7VAZGY.js} +1 -1
- package/dist/{opencode-ULT6DYCT.js → opencode-YWT3M4NX.js} +3 -3
- package/dist/{opencode-ULT6DYCT.js.map → opencode-YWT3M4NX.js.map} +1 -1
- package/dist/orchestrator-JOTMB5XT.js +13 -0
- package/dist/orchestrator-XPEMMBOO.js +6 -0
- package/dist/{orchestrator-64BHTD42.js.map → orchestrator-XPEMMBOO.js.map} +1 -1
- package/dist/{serve-3DV74ZSO.js → serve-5OAANN6J.js} +1 -1
- package/dist/shell-JC2WDWBR.js +2 -0
- package/dist/{shell-UXEJRK3D.js → shell-PMLIRG3N.js} +3 -3
- package/dist/{shell-UXEJRK3D.js.map → shell-PMLIRG3N.js.map} +1 -1
- package/dist/{task-M2JGNUYW.js → task-QFLIIRKZ.js} +1 -1
- package/dist/{tui-4VRDSRVB.js → tui-BJHZBCIR.js} +1 -1
- package/dist/{workspace-manager-ABXFBL2A.js → workspace-manager-5EYCMAEO.js} +25 -9
- package/dist/workspace-manager-5EYCMAEO.js.map +1 -0
- package/dist/workspace-manager-XKOZ5WM6.js +3 -0
- package/package.json +19 -9
- package/readme.md +111 -2
- package/scripts/demo.sh +202 -0
- package/scripts/{postinstall.js → postinstall.cjs} +25 -4
- package/skills/orch/SKILL.md +278 -0
- package/dist/App-SSYYVFGW.js +0 -22
- package/dist/chunk-BSJVYRI3.js.map +0 -1
- package/dist/chunk-MOWC2CHX.js.map +0 -1
- package/dist/chunk-QNZ6D63E.js +0 -4
- package/dist/chunk-UTDC3OB3.js.map +0 -1
- package/dist/chunk-X54D5JZG.js +0 -11
- package/dist/claude-ZLVOLRUG.js +0 -2
- package/dist/container-FUHRQOV4.js +0 -4
- package/dist/doctor-GKTV4YYD.js +0 -2
- package/dist/orchestrator-64BHTD42.js +0 -6
- package/dist/orchestrator-KEH7RQAV.js +0 -13
- package/dist/shell-OBHIVC2H.js +0 -2
- package/dist/workspace-manager-ABXFBL2A.js.map +0 -1
- package/dist/workspace-manager-Q6WWXSTR.js +0 -3
package/readme.md
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
<a href="https://www.orch.one/"><img src="https://img.shields.io/badge/website-orch.one-f59e0b?style=for-the-badge&labelColor=0a0a0a" alt="Website" /></a>
|
|
16
16
|
<a href="https://www.npmjs.com/package/@oxgeneral/orch"><img src="https://img.shields.io/npm/v/@oxgeneral/orch?style=for-the-badge&color=f59e0b&labelColor=0a0a0a" alt="npm" /></a>
|
|
17
17
|
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-f59e0b?style=for-the-badge&labelColor=0a0a0a" alt="MIT License" /></a>
|
|
18
|
-
<a href="#development"><img src="https://img.shields.io/badge/tests-
|
|
18
|
+
<a href="#development"><img src="https://img.shields.io/badge/tests-1647%20passing-f59e0b?style=for-the-badge&labelColor=0a0a0a" alt="Tests" /></a>
|
|
19
19
|
</p>
|
|
20
20
|
|
|
21
21
|
<br/>
|
|
@@ -23,8 +23,10 @@
|
|
|
23
23
|
<p align="center">
|
|
24
24
|
<a href="#you-hired-ai-agents-now-youre-managing-them-full-time">Problem</a> •
|
|
25
25
|
<a href="#start-coordinating-agents-in-30-seconds">Install</a> •
|
|
26
|
+
<a href="#claude-code-integration">Claude Code</a> •
|
|
26
27
|
<a href="#how-your-ai-team-works">How It Works</a> •
|
|
27
28
|
<a href="#why-founders-choose-orch">Features</a> •
|
|
29
|
+
<a href="#headless-daemon--cicd">Serve</a> •
|
|
28
30
|
<a href="#pre-built-teams--start-with-a-proven-setup">Templates</a> •
|
|
29
31
|
<a href="#full-cli-reference">CLI</a> •
|
|
30
32
|
<a href="#architecture">Architecture</a> •
|
|
@@ -137,6 +139,16 @@ $ orch run --all --watch
|
|
|
137
139
|
|
|
138
140
|
That's it. ORCH auto-initializes and opens the TUI dashboard. Add agents, set goals, and run — right from there.
|
|
139
141
|
|
|
142
|
+
### Claude Code integration
|
|
143
|
+
|
|
144
|
+
After install, the `/orch` skill is automatically available in **Claude Code**. Just type `/orch` and describe what you need in natural language:
|
|
145
|
+
|
|
146
|
+
```
|
|
147
|
+
/orch deploy a team to refactor the auth module and add tests
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
Claude will translate your intent into the right `orch` commands — create agents, tasks, goals, and run the orchestration. No need to memorize CLI flags.
|
|
151
|
+
|
|
140
152
|
Or deploy a pre-built team:
|
|
141
153
|
|
|
142
154
|
```bash
|
|
@@ -373,6 +385,92 @@ orch org export my-team # Save your setup as template
|
|
|
373
385
|
|
|
374
386
|
<br/>
|
|
375
387
|
|
|
388
|
+
## Headless daemon & CI/CD
|
|
389
|
+
|
|
390
|
+
Run ORCH on a server 24/7 — no terminal, no TUI. Structured JSON logs for Datadog, Grafana Loki, or `jq`.
|
|
391
|
+
|
|
392
|
+
```bash
|
|
393
|
+
# Daemon mode — runs forever, picks up new tasks automatically
|
|
394
|
+
orch serve
|
|
395
|
+
|
|
396
|
+
# CI/CD mode — process current tasks and exit
|
|
397
|
+
orch serve --once # exit 0 = all done, exit 1 = has failures
|
|
398
|
+
```
|
|
399
|
+
|
|
400
|
+
### Options
|
|
401
|
+
|
|
402
|
+
| Flag | Description | Default |
|
|
403
|
+
|------|-------------|---------|
|
|
404
|
+
| `--once` | Process all todo tasks and exit | watch mode |
|
|
405
|
+
| `--tick-interval <ms>` | Override polling interval | 10000 |
|
|
406
|
+
| `--log-file <path>` | Tee logs to a file (append) | stdout only |
|
|
407
|
+
| `--log-format json\|text` | Output format | json |
|
|
408
|
+
| `--verbose` | Include `agent:output` events | off |
|
|
409
|
+
|
|
410
|
+
### Structured logs
|
|
411
|
+
|
|
412
|
+
Every event is a single JSON line — pipe to any log aggregator:
|
|
413
|
+
|
|
414
|
+
```json
|
|
415
|
+
{"ts":"2026-03-17T03:00:10.000Z","level":"info","event":"agent:started","agentId":"agt_abc","taskId":"tsk_123","runId":"run_xyz"}
|
|
416
|
+
{"ts":"2026-03-17T03:12:45.000Z","level":"info","event":"task:status_changed","taskId":"tsk_123","from":"in_progress","to":"review"}
|
|
417
|
+
{"ts":"2026-03-17T03:12:46.000Z","level":"info","event":"orchestrator:tick","running":0,"queued":2,"heap_mb":142}
|
|
418
|
+
```
|
|
419
|
+
|
|
420
|
+
### Deploy with pm2 or systemd
|
|
421
|
+
|
|
422
|
+
<details>
|
|
423
|
+
<summary><strong>pm2</strong></summary>
|
|
424
|
+
|
|
425
|
+
```bash
|
|
426
|
+
pm2 start "orch serve" --name orch-daemon --cwd ~/my-project
|
|
427
|
+
pm2 logs orch-daemon # structured JSON logs
|
|
428
|
+
pm2 stop orch-daemon # SIGINT → graceful shutdown
|
|
429
|
+
```
|
|
430
|
+
|
|
431
|
+
</details>
|
|
432
|
+
|
|
433
|
+
<details>
|
|
434
|
+
<summary><strong>systemd</strong></summary>
|
|
435
|
+
|
|
436
|
+
```ini
|
|
437
|
+
[Unit]
|
|
438
|
+
Description=ORCH AI Agent Daemon
|
|
439
|
+
After=network.target
|
|
440
|
+
|
|
441
|
+
[Service]
|
|
442
|
+
Type=simple
|
|
443
|
+
WorkingDirectory=/home/user/my-project
|
|
444
|
+
ExecStart=/usr/local/bin/orch serve
|
|
445
|
+
Restart=on-failure
|
|
446
|
+
RestartSec=10
|
|
447
|
+
|
|
448
|
+
[Install]
|
|
449
|
+
WantedBy=multi-user.target
|
|
450
|
+
```
|
|
451
|
+
|
|
452
|
+
</details>
|
|
453
|
+
|
|
454
|
+
### How it works
|
|
455
|
+
|
|
456
|
+
- **Watch mode** (default): tick loop runs indefinitely. Add tasks from another terminal (`orch task add`) — daemon picks them up on the next tick.
|
|
457
|
+
- **Once mode** (`--once`): processes all existing todo tasks, skips autonomous task seeding, exits when everything reaches a terminal status.
|
|
458
|
+
- **Lock protection**: only one orchestrator per project (reuses `.orchestry/orchestry.lock`). Second `orch serve` exits with a clear error.
|
|
459
|
+
- **Graceful shutdown**: SIGINT/SIGTERM → stops accepting new tasks → waits for running agents → saves state → releases lock.
|
|
460
|
+
- **Heap monitoring**: every tick logs `heap_mb` — catch memory leaks before OOM.
|
|
461
|
+
- **Idle throttling**: logs every 6th idle tick (~60s) to avoid flooding logs when nothing is happening.
|
|
462
|
+
|
|
463
|
+
<br/>
|
|
464
|
+
|
|
465
|
+
<!-- Divider -->
|
|
466
|
+
<picture>
|
|
467
|
+
<source media="(prefers-color-scheme: dark)" srcset="./assets/divider-dark.svg">
|
|
468
|
+
<source media="(prefers-color-scheme: light)" srcset="./assets/divider-light.svg">
|
|
469
|
+
<img alt="" src="./assets/divider-dark.svg" width="100%">
|
|
470
|
+
</picture>
|
|
471
|
+
|
|
472
|
+
<br/>
|
|
473
|
+
|
|
376
474
|
## Full CLI reference
|
|
377
475
|
|
|
378
476
|
<details>
|
|
@@ -461,6 +559,8 @@ orch context set <key> <value> # Shared context
|
|
|
461
559
|
```bash
|
|
462
560
|
orch run --all --watch # Launch all agents
|
|
463
561
|
orch run <task-id> # Run single task
|
|
562
|
+
orch serve # Headless daemon (JSON logs)
|
|
563
|
+
orch serve --once # CI/CD: process and exit
|
|
464
564
|
orch status # Quick overview
|
|
465
565
|
orch logs <run-id> # View run logs
|
|
466
566
|
orch tui # Command center (TUI)
|
|
@@ -521,7 +621,7 @@ src/
|
|
|
521
621
|
```bash
|
|
522
622
|
npm run dev # Run via tsx
|
|
523
623
|
npm run build # Build ESM + DTS
|
|
524
|
-
npm test #
|
|
624
|
+
npm test # 1647 tests via Vitest
|
|
525
625
|
npm run typecheck # Strict TypeScript
|
|
526
626
|
```
|
|
527
627
|
|
|
@@ -609,6 +709,15 @@ Five adapters: **Claude Code**, **OpenCode** (Gemini, DeepSeek, any OpenRouter m
|
|
|
609
709
|
|
|
610
710
|
</details>
|
|
611
711
|
|
|
712
|
+
<details>
|
|
713
|
+
<summary><strong>Can I run agents 24/7 on a server?</strong></summary>
|
|
714
|
+
|
|
715
|
+
<br/>
|
|
716
|
+
|
|
717
|
+
Yes. `orch serve` runs the orchestrator as a headless daemon — no TUI, structured JSON logs to stdout. Deploy with pm2, systemd, or any process manager. Add tasks from another terminal or machine — the daemon picks them up automatically. Graceful shutdown on SIGINT/SIGTERM.
|
|
718
|
+
|
|
719
|
+
</details>
|
|
720
|
+
|
|
612
721
|
<details>
|
|
613
722
|
<summary><strong>Is there a cloud component?</strong></summary>
|
|
614
723
|
|
package/scripts/demo.sh
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# ============================================================
|
|
3
|
+
# ORCH Demo — asciinema-ready terminal workflow
|
|
4
|
+
#
|
|
5
|
+
# Record: asciinema rec demo.cast -c ./scripts/demo.sh \
|
|
6
|
+
# --title "ORCH — AI Agent Runtime Demo"
|
|
7
|
+
#
|
|
8
|
+
# Preview: asciinema play demo.cast
|
|
9
|
+
# To GIF: agg demo.cast demo.gif --font-size 14 --theme monokai
|
|
10
|
+
#
|
|
11
|
+
# Duration: ~75 seconds
|
|
12
|
+
# Shows: setup → add agents → add tasks → run --all →
|
|
13
|
+
# parallel execution → state transitions → status
|
|
14
|
+
# ============================================================
|
|
15
|
+
set -euo pipefail
|
|
16
|
+
|
|
17
|
+
# ── visual config ────────────────────────────────────────────
|
|
18
|
+
TYPE_SPEED=0.035 # seconds per character (adjust for recording speed)
|
|
19
|
+
CMD_PAUSE=0.7 # pause after showing command before running
|
|
20
|
+
SECTION_PAUSE=1.0 # pause between sections
|
|
21
|
+
OUTPUT_PAUSE=0.4 # pause after output before next step
|
|
22
|
+
|
|
23
|
+
# ── color helpers ────────────────────────────────────────────
|
|
24
|
+
RESET="\033[0m"
|
|
25
|
+
BOLD="\033[1m"
|
|
26
|
+
GREEN="\033[1;32m"
|
|
27
|
+
YELLOW="\033[1;33m"
|
|
28
|
+
CYAN="\033[1;36m"
|
|
29
|
+
BLUE="\033[0;34m"
|
|
30
|
+
MAGENTA="\033[0;35m"
|
|
31
|
+
DIM="\033[90m"
|
|
32
|
+
RED="\033[0;31m"
|
|
33
|
+
|
|
34
|
+
# ── utility functions ────────────────────────────────────────
|
|
35
|
+
type_cmd() {
|
|
36
|
+
printf "${GREEN}\$${RESET} "
|
|
37
|
+
local text="$1"
|
|
38
|
+
for (( i=0; i<${#text}; i++ )); do
|
|
39
|
+
printf "%s" "${text:$i:1}"
|
|
40
|
+
sleep "$TYPE_SPEED"
|
|
41
|
+
done
|
|
42
|
+
sleep "$CMD_PAUSE"
|
|
43
|
+
printf "\n"
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
run_cmd() {
|
|
47
|
+
eval "$1" 2>/dev/null || true
|
|
48
|
+
sleep "$OUTPUT_PAUSE"
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
pause() { sleep "${1:-$SECTION_PAUSE}"; }
|
|
52
|
+
|
|
53
|
+
section() {
|
|
54
|
+
printf "\n${YELLOW}# ── %s ──${RESET}\n\n" "$1"
|
|
55
|
+
sleep 0.5
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
divider() {
|
|
59
|
+
printf "${DIM}────────────────────────────────────────────────────${RESET}\n"
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
# ── demo environment setup ───────────────────────────────────
|
|
63
|
+
DEMO_DIR="/tmp/orch-demo-$$"
|
|
64
|
+
mkdir -p "$DEMO_DIR"
|
|
65
|
+
cd "$DEMO_DIR"
|
|
66
|
+
|
|
67
|
+
# pre-create .orchestry structure silently so init is instant
|
|
68
|
+
export NO_COLOR=""
|
|
69
|
+
|
|
70
|
+
# ── SCENE 0: Clear + intro ───────────────────────────────────
|
|
71
|
+
clear
|
|
72
|
+
sleep 0.5
|
|
73
|
+
|
|
74
|
+
printf "${YELLOW}${BOLD}"
|
|
75
|
+
printf " ┌─────────────────────────────────────────────────┐\n"
|
|
76
|
+
printf " │ ORCH — AI Agent Runtime │\n"
|
|
77
|
+
printf " │ 3 agents. Parallel execution. Zero babysitting │\n"
|
|
78
|
+
printf " └─────────────────────────────────────────────────┘\n"
|
|
79
|
+
printf "${RESET}\n"
|
|
80
|
+
sleep 1.5
|
|
81
|
+
|
|
82
|
+
# ── SCENE 1: Install (show only — not actually installing) ───
|
|
83
|
+
section "Install"
|
|
84
|
+
|
|
85
|
+
type_cmd "npm install -g @oxgeneral/orch"
|
|
86
|
+
printf "${DIM} added 1 package in 2.1s${RESET}\n"
|
|
87
|
+
printf "${GREEN} ✓ orch v1.0.5 installed${RESET}\n"
|
|
88
|
+
sleep "$OUTPUT_PAUSE"
|
|
89
|
+
pause 0.5
|
|
90
|
+
|
|
91
|
+
# ── SCENE 2: Init ────────────────────────────────────────────
|
|
92
|
+
section "Initialize project"
|
|
93
|
+
|
|
94
|
+
type_cmd "mkdir my-project && cd my-project"
|
|
95
|
+
printf "" # no output
|
|
96
|
+
|
|
97
|
+
type_cmd "orch init"
|
|
98
|
+
run_cmd "orch init"
|
|
99
|
+
pause 0.5
|
|
100
|
+
|
|
101
|
+
# ── SCENE 3: Add agents ──────────────────────────────────────
|
|
102
|
+
section "Add your AI team (3 agents)"
|
|
103
|
+
|
|
104
|
+
type_cmd 'orch agent add "Backend" --adapter claude --model claude-sonnet-4-6 --role "Senior TypeScript developer. Implements features end-to-end." --approval-policy auto'
|
|
105
|
+
run_cmd 'orch agent add "Backend" --adapter claude --model claude-sonnet-4-6 --role "Senior TypeScript developer. Implements features end-to-end." --approval-policy auto'
|
|
106
|
+
|
|
107
|
+
type_cmd 'orch agent add "QA" --adapter claude --model claude-sonnet-4-6 --role "QA engineer. Writes integration tests, verifies correctness." --approval-policy auto'
|
|
108
|
+
run_cmd 'orch agent add "QA" --adapter claude --model claude-sonnet-4-6 --role "QA engineer. Writes integration tests, verifies correctness." --approval-policy auto'
|
|
109
|
+
|
|
110
|
+
type_cmd 'orch agent add "Reviewer" --adapter claude --model claude-sonnet-4-6 --role "Code reviewer. Checks quality, security, and edge cases." --approval-policy auto'
|
|
111
|
+
run_cmd 'orch agent add "Reviewer" --adapter claude --model claude-sonnet-4-6 --role "Code reviewer. Checks quality, security, and edge cases." --approval-policy auto'
|
|
112
|
+
|
|
113
|
+
pause 0.3
|
|
114
|
+
type_cmd "orch agent list"
|
|
115
|
+
run_cmd "orch agent list"
|
|
116
|
+
pause
|
|
117
|
+
|
|
118
|
+
# ── SCENE 4: Add tasks ───────────────────────────────────────
|
|
119
|
+
section "Queue tasks"
|
|
120
|
+
|
|
121
|
+
type_cmd 'orch task add "Implement REST API: GET /users endpoint" -p 2'
|
|
122
|
+
run_cmd 'orch task add "Implement REST API: GET /users endpoint" -p 2'
|
|
123
|
+
|
|
124
|
+
type_cmd 'orch task add "Write integration tests for /users endpoint" -p 2'
|
|
125
|
+
run_cmd 'orch task add "Write integration tests for /users endpoint" -p 2'
|
|
126
|
+
|
|
127
|
+
type_cmd 'orch task add "Review: API implementation + test coverage" -p 3'
|
|
128
|
+
run_cmd 'orch task add "Review: API implementation + test coverage" -p 3'
|
|
129
|
+
|
|
130
|
+
pause 0.3
|
|
131
|
+
type_cmd "orch task list"
|
|
132
|
+
run_cmd "orch task list"
|
|
133
|
+
pause
|
|
134
|
+
|
|
135
|
+
# ── SCENE 5: Run — simulated parallel execution ──────────────
|
|
136
|
+
section "orch run --all (parallel execution)"
|
|
137
|
+
|
|
138
|
+
printf "${GREEN}\$${RESET} orch run --all\n"
|
|
139
|
+
sleep 0.4
|
|
140
|
+
|
|
141
|
+
printf "${DIM}[orchestrator] tick #1 — dispatching idle agents...${RESET}\n"; sleep 0.3
|
|
142
|
+
divider
|
|
143
|
+
|
|
144
|
+
# Backend and QA claim tasks simultaneously
|
|
145
|
+
printf "${BLUE}[Backend ]${RESET} ${YELLOW}▶${RESET} Claiming \"Implement REST API: GET /users endpoint\"\n"; sleep 0.15
|
|
146
|
+
printf "${MAGENTA}[QA ]${RESET} ${YELLOW}▶${RESET} Claiming \"Write integration tests for /users endpoint\"\n"; sleep 0.3
|
|
147
|
+
|
|
148
|
+
printf "${BLUE}[Backend ]${RESET} ${YELLOW}●${RESET} Running ${DIM}todo${RESET} → ${YELLOW}in_progress${RESET}\n"; sleep 0.15
|
|
149
|
+
printf "${MAGENTA}[QA ]${RESET} ${YELLOW}●${RESET} Running ${DIM}todo${RESET} → ${YELLOW}in_progress${RESET}\n"; sleep 0.4
|
|
150
|
+
|
|
151
|
+
printf "${DIM}[orchestrator] 2 agents running in parallel...${RESET}\n"; sleep 1.2
|
|
152
|
+
|
|
153
|
+
# Backend finishes first
|
|
154
|
+
printf "${BLUE}[Backend ]${RESET} ${CYAN}⏸${RESET} Awaiting ${YELLOW}in_progress${RESET} → ${CYAN}review${RESET}\n"; sleep 0.5
|
|
155
|
+
|
|
156
|
+
# QA finishes
|
|
157
|
+
printf "${MAGENTA}[QA ]${RESET} ${CYAN}⏸${RESET} Awaiting ${YELLOW}in_progress${RESET} → ${CYAN}review${RESET}\n"; sleep 0.4
|
|
158
|
+
|
|
159
|
+
printf "${DIM}[orchestrator] tick #2 — dispatching Reviewer...${RESET}\n"; sleep 0.3
|
|
160
|
+
divider
|
|
161
|
+
|
|
162
|
+
printf "${YELLOW}[Reviewer ]${RESET} ${YELLOW}▶${RESET} Claiming \"Review: API implementation + test coverage\"\n"; sleep 0.2
|
|
163
|
+
printf "${YELLOW}[Reviewer ]${RESET} ${YELLOW}●${RESET} Running ${DIM}todo${RESET} → ${YELLOW}in_progress${RESET}\n"; sleep 1.0
|
|
164
|
+
|
|
165
|
+
# Reviewer approves both
|
|
166
|
+
printf "${BLUE}[Backend ]${RESET} ${GREEN}✓${RESET} Approved ${CYAN}review${RESET} → ${GREEN}done${RESET}\n"; sleep 0.3
|
|
167
|
+
printf "${MAGENTA}[QA ]${RESET} ${GREEN}✓${RESET} Approved ${CYAN}review${RESET} → ${GREEN}done${RESET}\n"; sleep 0.4
|
|
168
|
+
printf "${YELLOW}[Reviewer ]${RESET} ${GREEN}✓${RESET} Done ${YELLOW}in_progress${RESET} → ${GREEN}done${RESET}\n"; sleep 0.3
|
|
169
|
+
|
|
170
|
+
divider
|
|
171
|
+
printf "\n${GREEN}${BOLD}✓ All 3 tasks completed. 2 agents ran in parallel. 0 failures.${RESET}\n"
|
|
172
|
+
printf "${DIM} Total: ~47s · Backend: 31s · QA: 38s · Reviewer: 22s${RESET}\n"
|
|
173
|
+
pause
|
|
174
|
+
|
|
175
|
+
# ── SCENE 6: Final status check ─────────────────────────────
|
|
176
|
+
section "Results"
|
|
177
|
+
|
|
178
|
+
type_cmd "orch task list"
|
|
179
|
+
run_cmd "orch task list"
|
|
180
|
+
pause 0.5
|
|
181
|
+
|
|
182
|
+
type_cmd "orch status"
|
|
183
|
+
run_cmd "orch status"
|
|
184
|
+
pause
|
|
185
|
+
|
|
186
|
+
# ── OUTRO ────────────────────────────────────────────────────
|
|
187
|
+
printf "\n"
|
|
188
|
+
printf "${YELLOW}${BOLD}"
|
|
189
|
+
printf "╔══════════════════════════════════════════════════════╗\n"
|
|
190
|
+
printf "║ ORCH — AI Agent Runtime ║\n"
|
|
191
|
+
printf "║ ║\n"
|
|
192
|
+
printf "║ npm install -g @oxgeneral/orch ║\n"
|
|
193
|
+
printf "║ github.com/oxgeneral/ORCH ║\n"
|
|
194
|
+
printf "║ ║\n"
|
|
195
|
+
printf "║ ⭐ Star us if this saved you time ║\n"
|
|
196
|
+
printf "╚══════════════════════════════════════════════════════╝\n"
|
|
197
|
+
printf "${RESET}\n"
|
|
198
|
+
sleep 3
|
|
199
|
+
|
|
200
|
+
# ── cleanup ──────────────────────────────────────────────────
|
|
201
|
+
cd /tmp
|
|
202
|
+
rm -rf "$DEMO_DIR"
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* Post-install: patch Ink caches
|
|
4
|
+
* Post-install: patch Ink caches, install Claude Code skill, show banner.
|
|
5
5
|
* Pure Node.js, no dependencies.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
+
const { readFileSync, writeFileSync, existsSync, mkdirSync } = require('node:fs');
|
|
9
|
+
const { join } = require('node:path');
|
|
10
|
+
const { homedir } = require('node:os');
|
|
11
|
+
|
|
8
12
|
// Patch Ink's unbounded caches before anything else
|
|
9
13
|
try {
|
|
10
|
-
const { readFileSync, writeFileSync, existsSync } = require('node:fs');
|
|
11
|
-
const { join } = require('node:path');
|
|
12
14
|
const inkBuild = join(__dirname, '..', 'node_modules', 'ink', 'build');
|
|
13
15
|
const MAX = 2000;
|
|
14
16
|
|
|
@@ -47,6 +49,23 @@ try {
|
|
|
47
49
|
}
|
|
48
50
|
} catch { /* non-fatal: caches will just be unbounded */ }
|
|
49
51
|
|
|
52
|
+
// Install Claude Code skill to ~/.claude/skills/orch/
|
|
53
|
+
let skillInstalled = false;
|
|
54
|
+
try {
|
|
55
|
+
const skillSource = join(__dirname, '..', 'skills', 'orch', 'SKILL.md');
|
|
56
|
+
const skillDir = join(homedir(), '.claude', 'skills', 'orch');
|
|
57
|
+
const skillDest = join(skillDir, 'SKILL.md');
|
|
58
|
+
|
|
59
|
+
const content = readFileSync(skillSource, 'utf8');
|
|
60
|
+
let existing = '';
|
|
61
|
+
try { existing = readFileSync(skillDest, 'utf8'); } catch { /* file absent */ }
|
|
62
|
+
if (content !== existing) {
|
|
63
|
+
mkdirSync(skillDir, { recursive: true });
|
|
64
|
+
writeFileSync(skillDest, content);
|
|
65
|
+
}
|
|
66
|
+
skillInstalled = true;
|
|
67
|
+
} catch { /* non-fatal: skill just won't be available in Claude Code */ }
|
|
68
|
+
|
|
50
69
|
// Skip banner in CI or non-interactive environments
|
|
51
70
|
if (process.env.CI || !process.stderr.isTTY) process.exit(0);
|
|
52
71
|
|
|
@@ -57,8 +76,10 @@ const green = (s) => `\x1b[38;5;72m${s}\x1b[0m`;
|
|
|
57
76
|
|
|
58
77
|
process.stderr.write(`
|
|
59
78
|
${green('✓')} ${bold('orchestry')} installed
|
|
60
|
-
|
|
79
|
+
${skillInstalled ? ` ${green('✓')} Claude Code skill ${bold('/orch')} registered\n` : ''}
|
|
61
80
|
Get started:
|
|
62
81
|
$ ${bold('orch')}
|
|
82
|
+
${skillInstalled ? ` ${dim('or use')} ${bold('/orch')} ${dim('in Claude Code')}\n` : ''}
|
|
83
|
+
${dim('⭐ Like it? Star us on GitHub: https://github.com/oxgeneral/ORCH')}
|
|
63
84
|
|
|
64
85
|
`);
|