pantheon-opencode 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/AGENTS.md +37 -0
- package/LICENSE +21 -0
- package/README.md +1013 -0
- package/bin/pantheon-init.mjs +183 -0
- package/commands/pantheon-audit.md +25 -0
- package/commands/pantheon-bg.md +10 -0
- package/commands/pantheon-consolidate.md +11 -0
- package/commands/pantheon-deepwork.md +128 -0
- package/commands/pantheon-doc.md +10 -0
- package/commands/pantheon-focus.md +9 -0
- package/commands/pantheon-forget.md +58 -0
- package/commands/pantheon-hash.md +11 -0
- package/commands/pantheon-optimize.md +79 -0
- package/commands/pantheon-remember.md +44 -0
- package/commands/pantheon-search.md +48 -0
- package/commands/pantheon-status.md +71 -0
- package/commands/pantheon-todo.md +11 -0
- package/commands/pantheon.md +49 -0
- package/docs/AGENT-MCP.md +194 -0
- package/docs/ARCHITECTURE.md +384 -0
- package/docs/BRANCH-PROTECTION.md +142 -0
- package/docs/INDEX.md +81 -0
- package/docs/INSTALLATION.md +217 -0
- package/docs/MCP.md +238 -0
- package/docs/MEMORY.md +471 -0
- package/docs/MIGRATION-MEMORY-BANK.md +139 -0
- package/docs/PLATFORMS.md +5 -0
- package/docs/QUICKSTART.md +49 -0
- package/docs/README.md +18 -0
- package/docs/RELEASING.md +256 -0
- package/docs/SETUP.md +5 -0
- package/docs/UPGRADING.md +41 -0
- package/docs/mcp-recommendations.md +439 -0
- package/docs/mcp-tools.md +156 -0
- package/docs/mcp-user-guide.md +204 -0
- package/docs/persistence-mcp.md +111 -0
- package/package.json +72 -0
- package/pantheon.schema.json +158 -0
- package/scripts/__init__.py +0 -0
- package/scripts/_pantheon_paths.py +68 -0
- package/scripts/check-version-consistency.sh +23 -0
- package/scripts/code_mode_server.py +202 -0
- package/scripts/doctor.mjs +763 -0
- package/scripts/generate-prompts.sh +222 -0
- package/scripts/generate-routing-docs.mjs +104 -0
- package/scripts/hash_verify.py +192 -0
- package/scripts/init-pantheon-mcp.sh +118 -0
- package/scripts/install/agents-md.mjs +214 -0
- package/scripts/install/health-check.mjs +196 -0
- package/scripts/install/migrate.mjs +209 -0
- package/scripts/install/opencode.mjs +645 -0
- package/scripts/install/shared.mjs +655 -0
- package/scripts/install/venv.mjs +116 -0
- package/scripts/install-mcp.mjs +885 -0
- package/scripts/install.mjs +26 -0
- package/scripts/manifest.mjs +622 -0
- package/scripts/mcp_persistence_server.py +459 -0
- package/scripts/mcp_resources_server.py +206 -0
- package/scripts/memory_cache.py +78 -0
- package/scripts/memory_mcp_server.py +605 -0
- package/scripts/paths.py +64 -0
- package/scripts/prune_context.py +72 -0
- package/scripts/release-bundle.mjs +109 -0
- package/scripts/scrub-secrets.py +282 -0
- package/scripts/scrub_secrets.py +281 -0
- package/scripts/test-context-compression.sh +166 -0
- package/scripts/themis_heuristic_scan.py +287 -0
- package/scripts/todo_enforcer.py +242 -0
- package/scripts/uninstall.mjs +1057 -0
- package/scripts/validate-routing.mjs +160 -0
- package/scripts/validate_agent_frontmatter.py +226 -0
- package/scripts/versioning.mjs +254 -0
- package/skills-lock.json +16 -0
- package/src/agents/aphrodite.md +162 -0
- package/src/agents/apollo.md +109 -0
- package/src/agents/athena.md +226 -0
- package/src/agents/demeter.md +146 -0
- package/src/agents/gaia.md +82 -0
- package/src/agents/hephaestus.md +105 -0
- package/src/agents/hermes.md +302 -0
- package/src/agents/iris.md +99 -0
- package/src/agents/mnemosyne.md +226 -0
- package/src/agents/nyx.md +87 -0
- package/src/agents/prometheus.md +199 -0
- package/src/agents/talos.md +93 -0
- package/src/agents/themis.md +187 -0
- package/src/agents/zeus.md +209 -0
- package/src/instructions/agent-return-format.instructions.md +26 -0
- package/src/instructions/backend-standards.instructions.md +45 -0
- package/src/instructions/documentation-standards.instructions.md +53 -0
- package/src/instructions/frontend-standards.instructions.md +46 -0
- package/src/instructions/memory-protocol.instructions.md +67 -0
- package/src/instructions/yagni.instructions.md +21 -0
- package/src/instructions/zeus-anti-stall.instructions.md +72 -0
- package/src/instructions/zeus-communication-rules.instructions.md +15 -0
- package/src/instructions/zeus-council-synthesis.instructions.md +105 -0
- package/src/instructions/zeus-timeout-retry.instructions.md +127 -0
- package/src/mcp/_pantheon_paths.py +67 -0
- package/src/mcp/code_mode_server.py +202 -0
- package/src/mcp/init-pantheon-mcp.sh +118 -0
- package/src/mcp/install-mcp.mjs +885 -0
- package/src/mcp/mcp_persistence_server.py +458 -0
- package/src/mcp/mcp_resources_server.py +205 -0
- package/src/mcp/memory_mcp_server.py +604 -0
- package/src/mcp/requirements-mcp-core.txt +5 -0
- package/src/mcp/requirements-mcp.txt +5 -0
- package/src/plugin.ts +19 -0
- package/src/plugins/tui/dist/tui.js +143 -0
- package/src/plugins/tui/dist/tui.tsx +144 -0
- package/src/plugins/tui/package.json +32 -0
- package/src/plugins/tui/src/index.tsx +144 -0
- package/src/plugins/tui/tsdown.config.ts +22 -0
- package/src/routing.yml +499 -0
- package/src/skills/README.md +230 -0
- package/src/skills/agent-coordination/SKILL.md +95 -0
- package/src/skills/artifact-management/SKILL.md +118 -0
- package/src/skills/auto-continue/SKILL.md +280 -0
- package/src/skills/code-review-checklist/SKILL.md +139 -0
- package/src/skills/context-compression/SKILL.md +861 -0
- package/src/skills/git-workflow-and-versioning/SKILL.md +32 -0
- package/src/skills/incremental-implementation/SKILL.md +27 -0
- package/src/skills/memory-bank/SKILL.md +165 -0
- package/src/skills/orchestration-workflow/SKILL.md +311 -0
- package/src/skills/security-hardening/SKILL.md +36 -0
- package/src/skills/session-goal/SKILL.md +138 -0
- package/src/skills/spec-driven-development/SKILL.md +23 -0
- package/src/skills/tdd-with-agents/SKILL.md +170 -0
- package/src/skills/visual-review-pipeline/SKILL.md +200 -0
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* venv.mjs — Virtual environment setup + dependency install
|
|
5
|
+
*
|
|
6
|
+
* Usage:
|
|
7
|
+
* node scripts/install/venv.mjs --target ~/.config/opencode
|
|
8
|
+
* node scripts/install/venv.mjs --target ~/.config/opencode --dry-run
|
|
9
|
+
* node scripts/install/venv.mjs --target ~/.config/opencode --skip-install
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import { spawnSync } from 'node:child_process'
|
|
13
|
+
import { existsSync } from 'node:fs'
|
|
14
|
+
import { dirname, join } from 'node:path'
|
|
15
|
+
import { fileURLToPath } from 'node:url'
|
|
16
|
+
|
|
17
|
+
const __dirname = dirname(fileURLToPath(import.meta.url))
|
|
18
|
+
const ROOT = join(__dirname, '..', '..')
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Set up a Python virtual environment and install MCP dependencies.
|
|
22
|
+
*
|
|
23
|
+
* @param {string} target - Target installation directory (e.g. ~/.config/opencode)
|
|
24
|
+
* @param {{ dryRun?: boolean, skipInstall?: boolean }} [options]
|
|
25
|
+
* @returns {{ venvPath: string, python: string }}
|
|
26
|
+
*/
|
|
27
|
+
export function setupVenv(target, { dryRun = false, skipInstall = false } = {}) {
|
|
28
|
+
const venvPath = join(target, '.venv')
|
|
29
|
+
const pythonBin = join(venvPath, 'bin', 'python3')
|
|
30
|
+
|
|
31
|
+
// Step 1: Create venv if not exists
|
|
32
|
+
if (!existsSync(pythonBin)) {
|
|
33
|
+
if (!dryRun) {
|
|
34
|
+
console.log(' Creating .venv...')
|
|
35
|
+
const result = spawnSync('python3', ['-m', 'venv', venvPath], {
|
|
36
|
+
stdio: 'inherit',
|
|
37
|
+
timeout: 30_000,
|
|
38
|
+
})
|
|
39
|
+
if (result.status !== 0) {
|
|
40
|
+
throw new Error('Failed to create virtual environment')
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
console.log(' ✅ .venv created')
|
|
44
|
+
} else {
|
|
45
|
+
console.log(' ⏭️ .venv already exists')
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// Step 2: Install MCP dependencies
|
|
49
|
+
if (!skipInstall) {
|
|
50
|
+
const pip = join(venvPath, 'bin', 'pip')
|
|
51
|
+
const reqFile = join(ROOT, 'src', 'mcp', 'requirements-mcp.txt')
|
|
52
|
+
|
|
53
|
+
if (!existsSync(reqFile)) {
|
|
54
|
+
throw new Error(`Requirements file not found: ${reqFile}`)
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
console.log(' Installing MCP dependencies...')
|
|
58
|
+
|
|
59
|
+
if (!dryRun) {
|
|
60
|
+
// Upgrade pip first (avoids resolver warnings)
|
|
61
|
+
spawnSync(pip, ['install', '--upgrade', 'pip'], {
|
|
62
|
+
stdio: 'ignore',
|
|
63
|
+
timeout: 30_000,
|
|
64
|
+
})
|
|
65
|
+
|
|
66
|
+
// Install requirements
|
|
67
|
+
const r = spawnSync(pip, ['install', '-r', reqFile], {
|
|
68
|
+
stdio: 'inherit',
|
|
69
|
+
timeout: 120_000,
|
|
70
|
+
})
|
|
71
|
+
|
|
72
|
+
if (r.status !== 0) {
|
|
73
|
+
// If failed, try with --break-system-packages (PEP 668 workaround)
|
|
74
|
+
console.log(' ⚠️ First attempt failed, retrying with --break-system-packages...')
|
|
75
|
+
const r2 = spawnSync(pip, ['install', '-r', reqFile, '--break-system-packages'], {
|
|
76
|
+
stdio: 'inherit',
|
|
77
|
+
timeout: 120_000,
|
|
78
|
+
})
|
|
79
|
+
if (r2.status !== 0) {
|
|
80
|
+
throw new Error(
|
|
81
|
+
'Failed to install MCP dependencies. ' +
|
|
82
|
+
'Try: pip install -r src/mcp/requirements-mcp.txt --break-system-packages'
|
|
83
|
+
)
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
console.log(' ✅ MCP dependencies installed')
|
|
88
|
+
} else {
|
|
89
|
+
console.log(' ⏭️ Dependency install skipped (--skip-install)')
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
return { venvPath, python: pythonBin }
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// ---------------------------------------------------------------------------
|
|
96
|
+
// CLI entry point
|
|
97
|
+
// ---------------------------------------------------------------------------
|
|
98
|
+
function main() {
|
|
99
|
+
const args = process.argv.slice(2)
|
|
100
|
+
const targetIdx = args.indexOf('--target')
|
|
101
|
+
const target = targetIdx !== -1 ? args[targetIdx + 1] : process.cwd()
|
|
102
|
+
const dryRun = args.includes('--dry-run')
|
|
103
|
+
const skipInstall = args.includes('--skip-install')
|
|
104
|
+
|
|
105
|
+
try {
|
|
106
|
+
const result = setupVenv(target, { dryRun, skipInstall })
|
|
107
|
+
console.log(` 📍 Python: ${result.python}`)
|
|
108
|
+
} catch (err) {
|
|
109
|
+
console.error(`\n ❌ ${err.message}`)
|
|
110
|
+
process.exit(1)
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
if (process.argv[1] && import.meta.url === `file://${process.argv[1]}`) {
|
|
115
|
+
main()
|
|
116
|
+
}
|