opencode-orchestrator-plugin 1.0.0-beta.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/LICENSE +202 -0
- package/README.md +130 -0
- package/README.test.md +51 -0
- package/dist/commands/implement.d.ts +1 -0
- package/dist/commands/implement.js +30 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +153 -0
- package/dist/prompts/agent/implementer.md +22 -0
- package/dist/prompts/agent/orchestrator.md +35 -0
- package/dist/prompts/agent.md +23 -0
- package/dist/prompts/orchestrator/implement.json +4 -0
- package/dist/prompts/orchestrator/newTrack.json +4 -0
- package/dist/prompts/orchestrator/revert.json +4 -0
- package/dist/prompts/orchestrator/setup.json +4 -0
- package/dist/prompts/orchestrator/status.json +4 -0
- package/dist/prompts/strategies/delegate.md +11 -0
- package/dist/prompts/strategies/manual.md +9 -0
- package/dist/templates/code_styleguides/c.md +28 -0
- package/dist/templates/code_styleguides/cpp.md +46 -0
- package/dist/templates/code_styleguides/csharp.md +115 -0
- package/dist/templates/code_styleguides/dart.md +238 -0
- package/dist/templates/code_styleguides/general.md +23 -0
- package/dist/templates/code_styleguides/go.md +48 -0
- package/dist/templates/code_styleguides/html-css.md +49 -0
- package/dist/templates/code_styleguides/java.md +39 -0
- package/dist/templates/code_styleguides/javascript.md +51 -0
- package/dist/templates/code_styleguides/julia.md +27 -0
- package/dist/templates/code_styleguides/kotlin.md +41 -0
- package/dist/templates/code_styleguides/php.md +37 -0
- package/dist/templates/code_styleguides/python.md +37 -0
- package/dist/templates/code_styleguides/react.md +37 -0
- package/dist/templates/code_styleguides/ruby.md +39 -0
- package/dist/templates/code_styleguides/rust.md +44 -0
- package/dist/templates/code_styleguides/shell.md +35 -0
- package/dist/templates/code_styleguides/solidity.md +60 -0
- package/dist/templates/code_styleguides/sql.md +39 -0
- package/dist/templates/code_styleguides/swift.md +36 -0
- package/dist/templates/code_styleguides/typescript.md +43 -0
- package/dist/templates/code_styleguides/vue.md +38 -0
- package/dist/templates/code_styleguides/zig.md +27 -0
- package/dist/templates/workflow.md +336 -0
- package/dist/tools/background.d.ts +54 -0
- package/dist/tools/background.js +198 -0
- package/dist/tools/commands.d.ts +11 -0
- package/dist/tools/commands.js +80 -0
- package/dist/tools/commands.test.d.ts +1 -0
- package/dist/tools/commands.test.js +145 -0
- package/dist/tools/delegate.d.ts +3 -0
- package/dist/tools/delegate.js +45 -0
- package/dist/utils/bootstrap.d.ts +1 -0
- package/dist/utils/bootstrap.js +46 -0
- package/dist/utils/commandFactory.d.ts +11 -0
- package/dist/utils/commandFactory.js +69 -0
- package/dist/utils/stateManager.d.ts +10 -0
- package/dist/utils/stateManager.js +30 -0
- package/package.json +88 -0
- package/scripts/convert-legacy.cjs +17 -0
- package/scripts/postinstall.cjs +38 -0
package/package.json
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "opencode-orchestrator-plugin",
|
|
3
|
+
"version": "1.0.0-beta.0",
|
|
4
|
+
"description": "Orchestrator plugin for OpenCode",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/fparrav/opencode-orchestrator.git"
|
|
9
|
+
},
|
|
10
|
+
"keywords": [
|
|
11
|
+
"opencode",
|
|
12
|
+
"plugin",
|
|
13
|
+
"orchestrator",
|
|
14
|
+
"agent",
|
|
15
|
+
"sisyphus"
|
|
16
|
+
],
|
|
17
|
+
"author": "Derek Barrera",
|
|
18
|
+
"license": "Apache-2.0",
|
|
19
|
+
"bugs": {
|
|
20
|
+
"url": "https://github.com/fparrav/opencode-orchestrator/issues"
|
|
21
|
+
},
|
|
22
|
+
"homepage": "https://github.com/fparrav/opencode-orchestrator#readme",
|
|
23
|
+
"publishConfig": {
|
|
24
|
+
"access": "public",
|
|
25
|
+
"registry": "https://registry.npmjs.org/",
|
|
26
|
+
"provenance": false
|
|
27
|
+
},
|
|
28
|
+
"main": "dist/index.js",
|
|
29
|
+
"types": "dist/index.d.ts",
|
|
30
|
+
"files": [
|
|
31
|
+
"dist",
|
|
32
|
+
"scripts"
|
|
33
|
+
],
|
|
34
|
+
"scripts": {
|
|
35
|
+
"test": "vitest run",
|
|
36
|
+
"postinstall": "node scripts/postinstall.cjs",
|
|
37
|
+
"build": "rm -rf dist && npm run verify-prompts && tsc && npm run copy-assets",
|
|
38
|
+
"verify-prompts": "node scripts/convert-legacy.cjs",
|
|
39
|
+
"copy-assets": "mkdir -p dist/templates && cp -r src/templates/* dist/templates/ && mkdir -p dist/prompts && cp -r src/prompts/* dist/prompts/",
|
|
40
|
+
"prepublishOnly": "npm run build"
|
|
41
|
+
},
|
|
42
|
+
"dependencies": {
|
|
43
|
+
"@opencode-ai/plugin": "1.0.223",
|
|
44
|
+
"smol-toml": "^1.6.0"
|
|
45
|
+
},
|
|
46
|
+
"devDependencies": {
|
|
47
|
+
"@semantic-release/changelog": "^6.0.3",
|
|
48
|
+
"@semantic-release/commit-analyzer": "^13.0.0",
|
|
49
|
+
"@semantic-release/git": "^10.0.1",
|
|
50
|
+
"@semantic-release/github": "^11.0.1",
|
|
51
|
+
"@semantic-release/npm": "^12.0.1",
|
|
52
|
+
"@semantic-release/release-notes-generator": "^14.0.0",
|
|
53
|
+
"@types/node": "^20.0.0",
|
|
54
|
+
"semantic-release": "^24.2.1",
|
|
55
|
+
"typescript": "^5.0.0",
|
|
56
|
+
"vitest": "^4.0.16"
|
|
57
|
+
},
|
|
58
|
+
"release": {
|
|
59
|
+
"branches": [
|
|
60
|
+
"main"
|
|
61
|
+
],
|
|
62
|
+
"repositoryUrl": "https://github.com/fparrav/opencode-orchestrator",
|
|
63
|
+
"plugins": [
|
|
64
|
+
"@semantic-release/commit-analyzer",
|
|
65
|
+
"@semantic-release/release-notes-generator",
|
|
66
|
+
"@semantic-release/changelog",
|
|
67
|
+
[
|
|
68
|
+
"@semantic-release/npm",
|
|
69
|
+
{
|
|
70
|
+
"npmPublish": false,
|
|
71
|
+
"tarballDir": "dist-npm"
|
|
72
|
+
}
|
|
73
|
+
],
|
|
74
|
+
[
|
|
75
|
+
"@semantic-release/git",
|
|
76
|
+
{
|
|
77
|
+
"assets": [
|
|
78
|
+
"package.json",
|
|
79
|
+
"package-lock.json",
|
|
80
|
+
"CHANGELOG.md"
|
|
81
|
+
],
|
|
82
|
+
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
|
|
83
|
+
}
|
|
84
|
+
],
|
|
85
|
+
"@semantic-release/github"
|
|
86
|
+
]
|
|
87
|
+
}
|
|
88
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
|
|
4
|
+
const destDir = path.join(__dirname, '../src/prompts/orchestrator');
|
|
5
|
+
|
|
6
|
+
if (!fs.existsSync(destDir)) {
|
|
7
|
+
console.error('Missing orchestrator prompts directory.');
|
|
8
|
+
process.exit(1);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const files = fs.readdirSync(destDir).filter(file => file.endsWith('.json'));
|
|
12
|
+
if (files.length === 0) {
|
|
13
|
+
console.error('No orchestrator prompt JSON files found.');
|
|
14
|
+
process.exit(1);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
console.log(`Found ${files.length} orchestrator prompt JSON files.`);
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
const os = require('os');
|
|
4
|
+
|
|
5
|
+
const home = os.homedir();
|
|
6
|
+
const opencodeConfigDir = path.join(home, '.config', 'opencode');
|
|
7
|
+
const targetAgentDir = path.join(opencodeConfigDir, 'agent');
|
|
8
|
+
const targetCommandDir = path.join(opencodeConfigDir, 'command');
|
|
9
|
+
|
|
10
|
+
const sourcePromptsDir = path.join(__dirname, '..', 'dist', 'prompts');
|
|
11
|
+
const sourceAgentFile = path.join(sourcePromptsDir, 'agent', 'orchestrator.md');
|
|
12
|
+
const sourceCommandsDir = path.join(sourcePromptsDir, 'commands');
|
|
13
|
+
|
|
14
|
+
function ensureDir(dir) {
|
|
15
|
+
if (!fs.existsSync(dir)) {
|
|
16
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
try {
|
|
21
|
+
ensureDir(targetAgentDir);
|
|
22
|
+
ensureDir(targetCommandDir);
|
|
23
|
+
|
|
24
|
+
if (fs.existsSync(sourceAgentFile)) {
|
|
25
|
+
fs.copyFileSync(sourceAgentFile, path.join(targetAgentDir, 'orchestrator.md'));
|
|
26
|
+
console.log('[Orchestrator] Installed agent definition.');
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
if (fs.existsSync(sourceCommandsDir)) {
|
|
30
|
+
const commands = fs.readdirSync(sourceCommandsDir);
|
|
31
|
+
for (const cmdFile of commands) {
|
|
32
|
+
fs.copyFileSync(path.join(sourceCommandsDir, cmdFile), path.join(targetCommandDir, cmdFile));
|
|
33
|
+
}
|
|
34
|
+
console.log('[Orchestrator] Installed slash commands.');
|
|
35
|
+
}
|
|
36
|
+
} catch (err) {
|
|
37
|
+
console.error('[Orchestrator] Setup failed:', err.message);
|
|
38
|
+
}
|