pantheon-opencode 1.0.0 → 1.0.6
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 +61 -109
- package/bin/pantheon-init.mjs +57 -136
- package/commands/pantheon-audit.md +1 -1
- package/commands/pantheon-deepwork.md +32 -81
- package/commands/pantheon-reflect.md +16 -0
- package/commands/pantheon-status.md +1 -1
- package/commands/pantheon-verify.md +17 -0
- package/opencode.json +25 -0
- package/package.json +24 -13
- package/scripts/ci-validate-yaml.py +19 -0
- package/scripts/doctor.mjs +10 -65
- package/scripts/install/opencode.mjs +69 -6
- package/scripts/install/shared.mjs +39 -13
- package/scripts/manifest.mjs +5 -30
- package/scripts/postinstall.mjs +47 -0
- package/scripts/release-bundle.mjs +2 -2
- package/scripts/uninstall.mjs +5 -5
- package/scripts/validate-routing.mjs +19 -16
- package/scripts/versioning.mjs +12 -1
- package/skills-lock.json +9 -2
- package/src/agents/aphrodite.md +15 -57
- package/src/agents/apollo.md +9 -48
- package/src/agents/athena.md +17 -54
- package/src/agents/demeter.md +10 -47
- package/src/agents/gaia.md +7 -40
- package/src/agents/hephaestus.md +9 -52
- package/src/agents/hermes.md +17 -52
- package/src/agents/iris.md +8 -45
- package/src/agents/mnemosyne.md +12 -47
- package/src/agents/nyx.md +8 -45
- package/src/agents/prometheus.md +11 -49
- package/src/agents/talos.md +6 -45
- package/src/agents/themis.md +10 -35
- package/src/agents/zeus.md +5 -7
- package/src/mcp/mcp_resources_server.py +2 -0
- package/src/plugins/tui/dist/tui.tsx +203 -93
- package/src/plugins/tui/src/index.tsx +203 -93
- package/src/routing.yml +33 -93
- package/src/skills/clonedeps/SKILL.md +45 -0
- package/src/skills/codemap/SKILL.md +47 -0
- package/src/skills/loop-engineering/SKILL.md +51 -0
- package/src/skills/reflect/SKILL.md +49 -0
- package/src/skills/simplify/SKILL.md +39 -0
- package/src/skills/verification-planning/SKILL.md +52 -0
- package/src/skills/worktrees/SKILL.md +43 -0
- package/commands/pantheon-bg.md +0 -10
- package/commands/pantheon-consolidate.md +0 -11
- package/commands/pantheon-doc.md +0 -10
- package/commands/pantheon-hash.md +0 -11
- package/commands/pantheon-todo.md +0 -11
- package/docs/AGENT-MCP.md +0 -194
- package/docs/ARCHITECTURE.md +0 -384
- package/docs/BRANCH-PROTECTION.md +0 -142
- package/docs/INDEX.md +0 -81
- package/docs/INSTALLATION.md +0 -217
- package/docs/MCP.md +0 -238
- package/docs/MEMORY.md +0 -471
- package/docs/MIGRATION-MEMORY-BANK.md +0 -139
- package/docs/PLATFORMS.md +0 -5
- package/docs/QUICKSTART.md +0 -49
- package/docs/README.md +0 -18
- package/docs/RELEASING.md +0 -256
- package/docs/SETUP.md +0 -5
- package/docs/UPGRADING.md +0 -41
- package/docs/mcp-recommendations.md +0 -439
- package/docs/mcp-tools.md +0 -156
- package/docs/mcp-user-guide.md +0 -204
- package/docs/persistence-mcp.md +0 -111
- package/scripts/init-pantheon-mcp.sh +0 -118
- package/scripts/install.mjs +0 -26
- package/src/instructions/documentation-standards.instructions.md +0 -53
- package/src/mcp/init-pantheon-mcp.sh +0 -118
package/README.md
CHANGED
|
@@ -7,11 +7,11 @@
|
|
|
7
7
|
<p align="center">
|
|
8
8
|
<a href="CHANGELOG.md"><img src="https://img.shields.io/badge/version-v1.0.0-blue" alt="Version"></a>
|
|
9
9
|
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue" alt="License"></a>
|
|
10
|
-
<a href="docs/platforms/"><img src="https://img.shields.io/badge/platforms-
|
|
10
|
+
<a href="docs/platforms/"><img src="https://img.shields.io/badge/platforms-opencode-green" alt="Platforms"></a>
|
|
11
11
|
<a href="agents/README.md"><img src="https://img.shields.io/badge/agents-14-purple" alt="Agents"></a>
|
|
12
12
|
<a href="skills/README.md"><img src="https://img.shields.io/badge/skills-14-orange" alt="Skills"></a>
|
|
13
13
|
<a href="commands/"><img src="https://img.shields.io/badge/commands-14-red" alt="Commands"></a>
|
|
14
|
-
<a href="docs/platforms/"><img src="https://img.shields.io/badge/built%20with-
|
|
14
|
+
<a href="docs/platforms/"><img src="https://img.shields.io/badge/built%20with-opencode-8250DF" alt="Built with"></a>
|
|
15
15
|
<a href="https://github.com/ils15/pantheon/actions"><img src="https://img.shields.io/github/actions/workflow/status/ils15/pantheon/ci.yml?branch=main&label=CI" alt="CI"></a>
|
|
16
16
|
<a href="https://github.com/ils15/pantheon/actions"><img src="https://img.shields.io/github/actions/workflow/status/ils15/pantheon/release.yml?branch=main&label=release" alt="Release"></a>
|
|
17
17
|
</p>
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
|
|
21
21
|
Stop settling for generalist single-agent coding. Pantheon's conductor-delegate architecture dispatches expert agents with isolated context windows — parallel execution, zero context bleed, and quality gates that block anything below 80% coverage.
|
|
22
22
|
|
|
23
|
-
Supports **
|
|
23
|
+
Supports **OpenCode** — multi-agent orchestration for your editor.
|
|
24
24
|
|
|
25
25
|
---
|
|
26
26
|
|
|
@@ -51,13 +51,7 @@ Supports **VS Code Copilot**, **OpenCode**, **Claude Code**, **Cursor**, **Winds
|
|
|
51
51
|
| 🔌 **MCP User Guide** | [docs/mcp-user-guide.md](docs/mcp-user-guide.md) — adding custom MCP servers |
|
|
52
52
|
| 🗂️ **MCP Tiers** | `.pantheon/tiers.json` — 4-tier MCP selection (none/essential/recommended/full) |
|
|
53
53
|
| ⚡ **Quick Start** | [docs/QUICKSTART.md](docs/QUICKSTART.md) |
|
|
54
|
-
| 🖥️ **VS Code** | [docs/platforms/vscode.md](docs/platforms/vscode.md) |
|
|
55
54
|
| ⚡ **OpenCode** | [docs/platforms/opencode.md](docs/platforms/opencode.md) |
|
|
56
|
-
| 🤖 **Claude Code** | [docs/platforms/claude.md](docs/platforms/claude.md) |
|
|
57
|
-
| 🔧 **Cursor** | [docs/platforms/cursor.md](docs/platforms/cursor.md) |
|
|
58
|
-
| 🌊 **Windsurf** | [docs/platforms/windsurf.md](docs/platforms/windsurf.md) |
|
|
59
|
-
| 🤖 **Cline** | [docs/platforms/cline.md](docs/platforms/cline.md) |
|
|
60
|
-
| 🔄 **Continue.dev** | [docs/platforms/continue.md](docs/platforms/continue.md) |
|
|
61
55
|
|
|
62
56
|
---
|
|
63
57
|
|
|
@@ -194,26 +188,18 @@ flowchart TD
|
|
|
194
188
|
- **OpenCode** — Pantheon v1.0 is OpenCode-only. [Installation guide](docs/INSTALLATION.md).
|
|
195
189
|
|
|
196
190
|
```bash
|
|
197
|
-
#
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
# 3. Open your editor and test
|
|
208
|
-
# OpenCode: @zeus in chat
|
|
209
|
-
# Claude Code: @zeus
|
|
210
|
-
# Cursor: @zeus in Agent mode
|
|
211
|
-
# VS Code: @zeus in Copilot Chat
|
|
212
|
-
# Cline: @zeus
|
|
213
|
-
# Windsurf: @zeus in Cascade
|
|
191
|
+
# Install Pantheon globally
|
|
192
|
+
npx pantheon-opencode init
|
|
193
|
+
|
|
194
|
+
# (Optional) Install MCP servers + skills + TUI plugin
|
|
195
|
+
npm run setup
|
|
196
|
+
|
|
197
|
+
# Launch OpenCode with background subagents
|
|
198
|
+
export OPENCODE_EXPERIMENTAL_BACKGROUND_SUBAGENTS=true
|
|
199
|
+
opencode
|
|
214
200
|
```
|
|
215
201
|
|
|
216
|
-
> **
|
|
202
|
+
> **Minimal vs Full:** `npx pantheon-opencode init --no-mcp` installs only agents (~2s). `npx pantheon-opencode init` (without `--no-mcp`) also creates a Python venv and installs MCP servers (includes `pantheon-memory` for vector search and `pantheon-persistence` for KV cache).
|
|
217
203
|
|
|
218
204
|
---
|
|
219
205
|
|
|
@@ -472,7 +458,7 @@ subscription (OpenCode Go, Copilot Pro, Claude Pro, etc.).
|
|
|
472
458
|
### /forge — Model Presets
|
|
473
459
|
|
|
474
460
|
Pantheon ships with **`/forge`** — a model configuration command that applies named presets from
|
|
475
|
-
`
|
|
461
|
+
`built-in presets`. Each preset maps 4 tiers to concrete models across all 14 agents.
|
|
476
462
|
|
|
477
463
|
**Usage:**
|
|
478
464
|
```
|
|
@@ -503,43 +489,36 @@ Pantheon ships with **`/forge`** — a model configuration command that applies
|
|
|
503
489
|
|
|
504
490
|
> 🤔 = thinking habilitado
|
|
505
491
|
|
|
506
|
-
|
|
492
|
+
Built-in presets available (opencode-go, deepseek-flash, etc.) and `docs/platforms/` for per-platform setup guides.
|
|
507
493
|
|
|
508
494
|
---
|
|
509
495
|
|
|
510
496
|
## Quick Start
|
|
511
497
|
|
|
512
|
-
### 1.
|
|
498
|
+
### 1. Install Pantheon
|
|
513
499
|
|
|
514
|
-
Pantheon
|
|
500
|
+
Pantheon runs on **OpenCode**. Install it globally:
|
|
515
501
|
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
- **Cursor** — `.mdc` rules with `alwaysApply` and `globs` for Agent mode
|
|
520
|
-
- **Windsurf** — markdown agent definitions with workflow support (preview)
|
|
521
|
-
- **Cline** — custom agent definitions with skills via instruction files
|
|
522
|
-
- **Continue.dev** — IDE-agnostic rule-based agent configuration with markdown skills
|
|
502
|
+
```bash
|
|
503
|
+
npx pantheon-opencode init
|
|
504
|
+
```
|
|
523
505
|
|
|
524
|
-
|
|
506
|
+
For MCP servers (memory, persistence):
|
|
525
507
|
|
|
526
|
-
|
|
508
|
+
```bash
|
|
509
|
+
npm run setup
|
|
510
|
+
```
|
|
527
511
|
|
|
528
|
-
|
|
512
|
+
### 2. Launch OpenCode
|
|
529
513
|
|
|
530
514
|
```bash
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
# Optional: install dependencies for sync/install tools
|
|
535
|
-
npm install
|
|
515
|
+
export OPENCODE_EXPERIMENTAL_BACKGROUND_SUBAGENTS=true
|
|
516
|
+
opencode
|
|
536
517
|
```
|
|
537
518
|
|
|
538
|
-
Then run the platform-specific installer from the guides above.
|
|
539
|
-
|
|
540
519
|
### 3. Run your first feature
|
|
541
520
|
|
|
542
|
-
Once agents are loaded
|
|
521
|
+
Once agents are loaded, invoke the orchestrator:
|
|
543
522
|
|
|
544
523
|
```
|
|
545
524
|
@zeus: Implement JWT authentication with refresh tokens and rate limiting
|
|
@@ -555,24 +534,25 @@ Zeus will:
|
|
|
555
534
|
|
|
556
535
|
## Commands
|
|
557
536
|
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
| Command |
|
|
561
|
-
|
|
562
|
-
| `/pantheon` |
|
|
563
|
-
| `/pantheon-
|
|
564
|
-
| `/pantheon-
|
|
565
|
-
| `/pantheon-
|
|
566
|
-
| `/pantheon-
|
|
567
|
-
| `/pantheon-
|
|
568
|
-
| `/pantheon-
|
|
569
|
-
| `/pantheon-
|
|
570
|
-
| `/pantheon-
|
|
571
|
-
| `/pantheon-
|
|
572
|
-
| `/pantheon-
|
|
573
|
-
| `/
|
|
574
|
-
|
|
575
|
-
|
|
537
|
+
Type these in the OpenCode chat:
|
|
538
|
+
|
|
539
|
+
| Command | Description |
|
|
540
|
+
|---------|-------------|
|
|
541
|
+
| `/pantheon` | Multi-perspective synthesis (Council) via inline agents |
|
|
542
|
+
| `/pantheon-audit` | Code review + security audit |
|
|
543
|
+
| `/pantheon-bg` | List background tasks |
|
|
544
|
+
| `/pantheon-consolidate` | Consolidate memory |
|
|
545
|
+
| `/pantheon-deepwork` | Heavy multi-phase task with persisted checkpoints |
|
|
546
|
+
| `/pantheon-doc` | Generate documentation |
|
|
547
|
+
| `/pantheon-focus` | Pin a session goal |
|
|
548
|
+
| `/pantheon-forget` | Compress/consolidate memories |
|
|
549
|
+
| `/pantheon-hash` | Hash edit verification |
|
|
550
|
+
| `/pantheon-optimize` | Context optimization & token audit |
|
|
551
|
+
| `/pantheon-remember` | Store in memory |
|
|
552
|
+
| `/pantheon-search` | Search memory |
|
|
553
|
+
| `/pantheon-status` | Show system health and agent status |
|
|
554
|
+
| `/pantheon-todo` | Create and maintain task list |
|
|
555
|
+
|
|
576
556
|
|
|
577
557
|
### TUI Sidebar Plugin (OpenCode) — Temporarily Disabled
|
|
578
558
|
|
|
@@ -682,20 +662,14 @@ pantheon/
|
|
|
682
662
|
│ ├── README.md
|
|
683
663
|
│ └── dynamic/ * generated prompts
|
|
684
664
|
│
|
|
685
|
-
├── platform/ —
|
|
665
|
+
├── platform/ — OpenCode-only configuration
|
|
686
666
|
│ ├── optimize-context.sh * context optimization script
|
|
687
|
-
│
|
|
688
|
-
│ ├── opencode/ * OpenCode configs
|
|
689
|
-
│ ├── claude/ * Claude Code configs & agents
|
|
690
|
-
│ ├── cursor/ * Cursor rules
|
|
691
|
-
│ ├── windsurf/ * Windsurf configs
|
|
692
|
-
│ ├── continue/ * Continue.dev rules
|
|
693
|
-
│ ├── cline/ * Cline configs
|
|
694
|
-
│ └── _template/ * template for new platforms
|
|
667
|
+
│ └── opencode/ * OpenCode configs
|
|
695
668
|
│
|
|
696
669
|
├── scripts/ — tooling, automation & lifecycle hooks
|
|
697
|
-
│ ├──
|
|
698
|
-
│ ├──
|
|
670
|
+
│ ├── postinstall.mjs * npm post-install hook
|
|
671
|
+
│ ├── doctor.mjs * health check CLI
|
|
672
|
+
│
|
|
699
673
|
│ ├── validate-sync.mjs * sync integrity check
|
|
700
674
|
│ └── hooks/ * agent lifecycle hooks (10 .sh scripts)
|
|
701
675
|
│ ├── audit-imports.sh
|
|
@@ -709,7 +683,7 @@ pantheon/
|
|
|
709
683
|
│ ├── validate-talos-scope.sh
|
|
710
684
|
│ └── validate-tool-safety.sh
|
|
711
685
|
│
|
|
712
|
-
├── commands/ #
|
|
686
|
+
├── commands/ # 14 interaction commands
|
|
713
687
|
│ ├── cancel.md
|
|
714
688
|
│ ├── pantheon-audit.md
|
|
715
689
|
│ ├── pantheon-deepwork.md
|
|
@@ -729,14 +703,8 @@ pantheon/
|
|
|
729
703
|
│ ├── PLATFORMS.md — platform comparison
|
|
730
704
|
│ ├── RELEASING.md — versioning & release process
|
|
731
705
|
│ ├── INDEX.md — documentation index
|
|
732
|
-
│ ├── platforms/ —
|
|
733
|
-
│ │
|
|
734
|
-
│ │ ├── opencode.md
|
|
735
|
-
│ │ ├── claude.md
|
|
736
|
-
│ │ ├── cursor.md
|
|
737
|
-
│ │ ├── windsurf.md
|
|
738
|
-
│ │ ├── cline.md
|
|
739
|
-
│ │ └── continue.md
|
|
706
|
+
│ ├── platforms/ — OpenCode configuration guide
|
|
707
|
+
│ │ └── opencode.md
|
|
740
708
|
│ └── memory-bank/ — project memory (Mnemosyne's domain)
|
|
741
709
|
│ ├── 00-project.md * project overview
|
|
742
710
|
│ ├── 01-active-context.md * current sprint focus (priority file)
|
|
@@ -745,7 +713,7 @@ pantheon/
|
|
|
745
713
|
│ └── _tasks/ * sprint task records
|
|
746
714
|
│
|
|
747
715
|
├── template/ — project templates
|
|
748
|
-
|
|
716
|
+
|
|
749
717
|
│ └── README.md
|
|
750
718
|
│
|
|
751
719
|
├── logs/ — agent session audit logs
|
|
@@ -892,12 +860,6 @@ Create IMPLEMENTATION_SUMMARY.md with what we did
|
|
|
892
860
|
3. Reference relevant agents in the skill body
|
|
893
861
|
4. Invoke `@mnemosyne Update README skills table and count`
|
|
894
862
|
|
|
895
|
-
### Adding a new platform
|
|
896
|
-
|
|
897
|
-
1. Create `platform/<name>/` with platform-specific configs
|
|
898
|
-
2. Add a setup guide to `docs/platforms/<name>.md`
|
|
899
|
-
3. Extend `scripts/install.mjs` and `scripts/sync-platforms.mjs`
|
|
900
|
-
|
|
901
863
|
---
|
|
902
864
|
|
|
903
865
|
## Security & Privacy
|
|
@@ -930,16 +892,13 @@ The `.opencode/plugins/pantheon-hooks.ts` plugin bridges these shell scripts to
|
|
|
930
892
|
## FAQ
|
|
931
893
|
|
|
932
894
|
**How much does this cost?**
|
|
933
|
-
You need an existing subscription for your AI coding editor (
|
|
934
|
-
Pro, or OpenCode). Pantheon itself is free and open-source (MIT).
|
|
895
|
+
You need an existing subscription for your AI coding editor (OpenCode). Pantheon itself is free and open-source (MIT).
|
|
935
896
|
|
|
936
|
-
**Can I use this outside
|
|
937
|
-
|
|
938
|
-
[Platform Setup Guides](docs/platforms/).
|
|
897
|
+
**Can I use this outside OpenCode?**
|
|
898
|
+
No — Pantheon v1.0 is OpenCode-only. It uses OpenCode's native agent system, permission blocks, and MCP integration.
|
|
939
899
|
|
|
940
900
|
**How are platform configs synced?**
|
|
941
|
-
Edit `agents/*.agent.md` (the canonical format), then run
|
|
942
|
-
The sync engine transforms agents into every platform's native format.
|
|
901
|
+
Edit `src/agents/*.agent.md` (the canonical format), then run the sync script to update platform copies.
|
|
943
902
|
|
|
944
903
|
**Can I override Themis's code review?**
|
|
945
904
|
You can proceed past the review gate even if Themis flags issues — except test coverage.
|
|
@@ -986,16 +945,9 @@ Pantheon draws from the broader multi-agent landscape while diverging in key way
|
|
|
986
945
|
| [CHANGELOG.md](CHANGELOG.md) | Release history |
|
|
987
946
|
| [docs/INSTALLATION.md](docs/INSTALLATION.md) | Generic installation guide |
|
|
988
947
|
| [docs/platforms/](docs/platforms/) | Platform-specific setup guides (OpenCode) |
|
|
989
|
-
| [docs/platforms/
|
|
990
|
-
| [docs/platforms/opencode.md](docs/platforms/opencode.md) | OpenCode setup |
|
|
991
|
-
| [docs/platforms/claude.md](docs/platforms/claude.md) | Claude Code setup |
|
|
992
|
-
| [docs/platforms/cursor.md](docs/platforms/cursor.md) | Cursor setup |
|
|
993
|
-
| [docs/platforms/windsurf.md](docs/platforms/windsurf.md) | Windsurf setup |
|
|
994
|
-
| [docs/platforms/cline.md](docs/platforms/cline.md) | Cline setup |
|
|
995
|
-
| [docs/platforms/continue.md](docs/platforms/continue.md) | Continue.dev setup |
|
|
948
|
+
| [docs/platforms/opencode.md](docs/platforms/opencode.md) | OpenCode setup guide |
|
|
996
949
|
| [agents/README.md](agents/README.md) | Agent directory |
|
|
997
950
|
| [skills/README.md](skills/README.md) | Skill directory |
|
|
998
|
-
| [docs/platforms/](docs/platforms/) | Per-platform setup guides |
|
|
999
951
|
| [docs/mcp-tools.md](docs/mcp-tools.md) | Canonical MCP tool registry |
|
|
1000
952
|
| [docs/mcp-user-guide.md](docs/mcp-user-guide.md) | Adding custom MCP servers |
|
|
1001
953
|
| [docs/mcp-recommendations.md](docs/mcp-recommendations.md) | Recommended MCP servers per project type |
|
package/bin/pantheon-init.mjs
CHANGED
|
@@ -1,39 +1,36 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* pantheon-init.mjs — Pantheon OpenCode CLI entry point
|
|
4
|
+
*
|
|
5
|
+
* Usage: npx pantheon-opencode init [options]
|
|
6
|
+
*
|
|
7
|
+
* Thin CLI wrapper that parses arguments and delegates to
|
|
8
|
+
* installOpenCode() from scripts/install/opencode.mjs.
|
|
9
|
+
*/
|
|
2
10
|
import fs from 'fs';
|
|
3
11
|
import path from 'path';
|
|
4
12
|
import { fileURLToPath } from 'url';
|
|
5
|
-
import { homedir, platform } from 'os';
|
|
6
|
-
import { execSync } from 'child_process';
|
|
7
13
|
|
|
8
14
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
9
15
|
const ROOT = path.resolve(__dirname, '..');
|
|
10
|
-
|
|
16
|
+
|
|
17
|
+
const REQUIRED_NODE_MAJOR = 18;
|
|
18
|
+
if (parseInt(process.versions.node.split('.')[0], 10) < REQUIRED_NODE_MAJOR) {
|
|
19
|
+
console.error(`❌ Node.js >= ${REQUIRED_NODE_MAJOR} required (current: ${process.versions.node})`);
|
|
20
|
+
process.exit(1);
|
|
21
|
+
}
|
|
11
22
|
|
|
12
23
|
function printUsage() {
|
|
13
|
-
console.log('Pantheon
|
|
24
|
+
console.log('Pantheon OpenCode — Multi-agent orchestration platform');
|
|
14
25
|
console.log('');
|
|
15
26
|
console.log('Usage:');
|
|
16
|
-
console.log(' npx pantheon-
|
|
17
|
-
console.log(' npx pantheon-
|
|
18
|
-
console.log(' npx pantheon-
|
|
19
|
-
console.log(' npx pantheon-
|
|
20
|
-
console.log(' npx pantheon-
|
|
21
|
-
console.log(' npx pantheon-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
function getPkgVersion() {
|
|
25
|
-
try {
|
|
26
|
-
const p = path.join(ROOT, 'package.json');
|
|
27
|
-
return JSON.parse(fs.readFileSync(p, 'utf8')).version || '?';
|
|
28
|
-
} catch { return '?'; }
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
function getAgentList() {
|
|
32
|
-
const agentsDir = path.resolve(ROOT, 'src', 'agents');
|
|
33
|
-
if (!fs.existsSync(agentsDir)) return [];
|
|
34
|
-
return fs.readdirSync(agentsDir)
|
|
35
|
-
.filter(f => f.endsWith('.md') && f !== 'README.md')
|
|
36
|
-
.map(f => f.replace('.md', ''));
|
|
27
|
+
console.log(' npx pantheon-opencode init # Install globally');
|
|
28
|
+
console.log(' npx pantheon-opencode init --project # Install in project');
|
|
29
|
+
console.log(' npx pantheon-opencode init --dry-run # Preview only');
|
|
30
|
+
console.log(' npx pantheon-opencode init --no-mcp # Skip MCP + venv');
|
|
31
|
+
console.log(' npx pantheon-opencode init --force # Overwrite + recreate venv');
|
|
32
|
+
console.log(' npx pantheon-opencode init --doctor # Run health check after install');
|
|
33
|
+
console.log(' npx pantheon-opencode --help # Show this help');
|
|
37
34
|
}
|
|
38
35
|
|
|
39
36
|
async function main() {
|
|
@@ -47,132 +44,56 @@ async function main() {
|
|
|
47
44
|
const isDryRun = args.includes('--dry-run');
|
|
48
45
|
const skipMCP = args.includes('--no-mcp');
|
|
49
46
|
const forceReinstall = args.includes('--force');
|
|
50
|
-
const
|
|
51
|
-
? path.join(process.cwd(), '.opencode')
|
|
52
|
-
: CFG;
|
|
53
|
-
|
|
54
|
-
const version = getPkgVersion();
|
|
55
|
-
console.log(`Pantheon Orchestrator v${version} — ${isDryRun ? 'DRY RUN' : 'Installing...'}`);
|
|
56
|
-
if (forceReinstall && !isDryRun) console.log(' 🔄 Force mode — overwriting existing files + recreating venv');
|
|
57
|
-
console.log(`Target: ${base}${isProject ? ' (project-local)' : ' (global)'}`);
|
|
58
|
-
console.log('');
|
|
59
|
-
|
|
60
|
-
// Force: delete old venv to force clean install
|
|
61
|
-
if (forceReinstall && !isDryRun) {
|
|
62
|
-
const venvPath = path.join(base, '.venv');
|
|
63
|
-
if (fs.existsSync(venvPath)) {
|
|
64
|
-
fs.rmSync(venvPath, { recursive: true, force: true });
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
// 1. Agents
|
|
69
|
-
console.log(' Agents:');
|
|
70
|
-
const agentList = getAgentList();
|
|
71
|
-
let count = 0;
|
|
72
|
-
for (const agent of agentList) {
|
|
73
|
-
const s = path.join(ROOT, 'src', 'agents', `${agent}.md`);
|
|
74
|
-
const d = path.join(base, 'agents', `${agent}.md`);
|
|
75
|
-
if (fs.existsSync(s)) {
|
|
76
|
-
if (!isDryRun) {
|
|
77
|
-
fs.mkdirSync(path.join(base, 'agents'), { recursive: true });
|
|
78
|
-
fs.copyFileSync(s, d);
|
|
79
|
-
}
|
|
80
|
-
count++;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
console.log(` ${count} agent files → ${isDryRun ? '(preview)' : `${base}/agents/`}`);
|
|
47
|
+
const runDoctor = args.includes('--doctor');
|
|
84
48
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
const skillsSrc = path.resolve(ROOT, 'src', 'skills');
|
|
88
|
-
if (fs.existsSync(skillsSrc)) {
|
|
89
|
-
const skills = fs.readdirSync(skillsSrc).filter(f => fs.statSync(path.join(skillsSrc, f)).isDirectory());
|
|
90
|
-
if (!isDryRun) {
|
|
91
|
-
for (const skill of skills) {
|
|
92
|
-
const s = path.join(skillsSrc, skill);
|
|
93
|
-
const d = path.join(base, 'skills', skill);
|
|
94
|
-
fs.cpSync(s, d, { recursive: true, force: true });
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
console.log(` ${skills.length} skills → ${isDryRun ? '(preview)' : `${base}/skills/`}`);
|
|
98
|
-
}
|
|
49
|
+
const components = ['agents', 'skills', 'instructions', 'commands', 'plugins'];
|
|
50
|
+
if (!skipMCP) components.push('runtime');
|
|
99
51
|
|
|
100
|
-
//
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
fs.mkdirSync(path.join(base, 'instructions'), { recursive: true });
|
|
107
|
-
for (const f of instrs) {
|
|
108
|
-
fs.copyFileSync(path.join(instrSrc, f), path.join(base, 'instructions', f));
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
console.log(` ${instrs.length} files → ${isDryRun ? '(preview)' : `${base}/instructions/`}`);
|
|
112
|
-
}
|
|
52
|
+
// Version info
|
|
53
|
+
let version = '?';
|
|
54
|
+
try {
|
|
55
|
+
const pkgPath = path.join(ROOT, 'package.json');
|
|
56
|
+
version = JSON.parse(fs.readFileSync(pkgPath, 'utf8')).version || '?';
|
|
57
|
+
} catch { /* use default */ }
|
|
113
58
|
|
|
114
|
-
|
|
115
|
-
console.log('
|
|
116
|
-
const cmdSrc = path.resolve(ROOT, 'commands');
|
|
117
|
-
if (fs.existsSync(cmdSrc)) {
|
|
118
|
-
const cmds = fs.readdirSync(cmdSrc).filter(f => f.endsWith('.md'));
|
|
119
|
-
if (!isDryRun) {
|
|
120
|
-
fs.mkdirSync(path.join(base, 'commands'), { recursive: true });
|
|
121
|
-
for (const f of cmds) {
|
|
122
|
-
fs.copyFileSync(path.join(cmdSrc, f), path.join(base, 'commands', f));
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
console.log(` ${cmds.length} commands → ${isDryRun ? '(preview)' : `${base}/commands/`}`);
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
// 5. TUI plugin
|
|
129
|
-
console.log(' TUI Plugin:');
|
|
130
|
-
const tuiSrc = path.resolve(ROOT, 'src', 'plugins', 'tui');
|
|
131
|
-
if (fs.existsSync(tuiSrc)) {
|
|
132
|
-
if (!isDryRun) {
|
|
133
|
-
fs.cpSync(tuiSrc, path.join(base, 'plugins', 'pantheon-tui'), { recursive: true, force: true });
|
|
134
|
-
const tuiJson = path.join(base, 'tui.json');
|
|
135
|
-
const tuiConfig = { $schema: 'https://opencode.ai/tui.json', plugin: ['plugins/pantheon-tui'] };
|
|
136
|
-
fs.writeFileSync(tuiJson, JSON.stringify(tuiConfig, null, 2));
|
|
137
|
-
}
|
|
138
|
-
console.log(` Plugin → ${isDryRun ? '(preview)' : `${base}/plugins/pantheon-tui/`}`);
|
|
139
|
-
console.log(` tui.json → ${isDryRun ? '(preview)' : `${base}/tui.json`}`);
|
|
140
|
-
}
|
|
59
|
+
console.log(`Pantheon OpenCode v${version} — ${isDryRun ? 'DRY RUN' : 'Installing...'}`);
|
|
60
|
+
console.log('');
|
|
141
61
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
62
|
+
try {
|
|
63
|
+
const { installOpenCode } = await import('../scripts/install/opencode.mjs');
|
|
64
|
+
const target = isProject ? process.cwd() : undefined;
|
|
65
|
+
installOpenCode(target, isDryRun, forceReinstall, components);
|
|
66
|
+
} catch (err) {
|
|
67
|
+
console.error(`❌ Installation failed:\n${err.stack}`);
|
|
68
|
+
process.exit(1);
|
|
146
69
|
}
|
|
147
70
|
|
|
148
|
-
|
|
149
|
-
if (!skipMCP && !isDryRun) {
|
|
71
|
+
if (runDoctor && !isDryRun) {
|
|
150
72
|
console.log('');
|
|
151
|
-
console.log('
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
}
|
|
73
|
+
console.log(' Running health check...');
|
|
74
|
+
try {
|
|
75
|
+
const { spawnSync } = await import('child_process');
|
|
76
|
+
const doctorScript = path.join(ROOT, 'scripts', 'doctor.mjs');
|
|
77
|
+
spawnSync(process.execPath, [doctorScript], { stdio: 'inherit', cwd: ROOT });
|
|
78
|
+
} catch {
|
|
79
|
+
console.log(' ⚠️ Could not run doctor.mjs');
|
|
159
80
|
}
|
|
160
81
|
}
|
|
161
82
|
|
|
162
|
-
// 8. Done
|
|
163
83
|
console.log('');
|
|
164
84
|
console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
|
|
165
|
-
console.log(` ✅ Pantheon
|
|
85
|
+
console.log(` ✅ Pantheon OpenCode v${version} installed!`);
|
|
166
86
|
console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
|
|
167
87
|
console.log('');
|
|
168
88
|
console.log(' Next steps:');
|
|
169
|
-
console.log(' 1.
|
|
170
|
-
console.log('
|
|
171
|
-
console.log(' 2. Launch OpenCode
|
|
172
|
-
console.log('
|
|
173
|
-
console.log('
|
|
174
|
-
console.log('
|
|
89
|
+
console.log(' 1. Verify installation:');
|
|
90
|
+
console.log(' npx pantheon-opencode doctor');
|
|
91
|
+
console.log(' 2. Launch your AI coding tool (OpenCode, Claude Code, Cursor, etc.)');
|
|
92
|
+
console.log(' 3. Invoke agents with @agent-name in chat');
|
|
93
|
+
console.log(' 4. For project-local install:');
|
|
94
|
+
console.log(' npx pantheon-opencode init --project');
|
|
175
95
|
console.log('');
|
|
96
|
+
|
|
176
97
|
return;
|
|
177
98
|
}
|
|
178
99
|
|
|
@@ -180,4 +101,4 @@ async function main() {
|
|
|
180
101
|
process.exit(1);
|
|
181
102
|
}
|
|
182
103
|
|
|
183
|
-
main().catch(err => { console.error('Error:', err.
|
|
104
|
+
main().catch(err => { console.error('Error:', err.stack); process.exit(1); });
|