opencode-cc10x 6.0.21

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.
Files changed (45) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +283 -0
  3. package/bun.lock +20 -0
  4. package/dist/agents.d.ts +3 -0
  5. package/dist/agents.d.ts.map +1 -0
  6. package/dist/agents.js +483 -0
  7. package/dist/agents.js.map +1 -0
  8. package/dist/compatibility-layer.d.ts +18 -0
  9. package/dist/compatibility-layer.d.ts.map +1 -0
  10. package/dist/compatibility-layer.js +150 -0
  11. package/dist/compatibility-layer.js.map +1 -0
  12. package/dist/index.d.ts +4 -0
  13. package/dist/index.d.ts.map +1 -0
  14. package/dist/index.js +1459 -0
  15. package/dist/index.js.map +1 -0
  16. package/dist/intent-detection.d.ts +14 -0
  17. package/dist/intent-detection.d.ts.map +1 -0
  18. package/dist/intent-detection.js +121 -0
  19. package/dist/intent-detection.js.map +1 -0
  20. package/dist/memory.d.ts +41 -0
  21. package/dist/memory.d.ts.map +1 -0
  22. package/dist/memory.js +330 -0
  23. package/dist/memory.js.map +1 -0
  24. package/dist/router.d.ts +15 -0
  25. package/dist/router.d.ts.map +1 -0
  26. package/dist/router.js +208 -0
  27. package/dist/router.js.map +1 -0
  28. package/dist/skills.d.ts +3 -0
  29. package/dist/skills.d.ts.map +1 -0
  30. package/dist/skills.js +2790 -0
  31. package/dist/skills.js.map +1 -0
  32. package/dist/task-orchestrator.d.ts +46 -0
  33. package/dist/task-orchestrator.d.ts.map +1 -0
  34. package/dist/task-orchestrator.js +262 -0
  35. package/dist/task-orchestrator.js.map +1 -0
  36. package/dist/workflow-executor.d.ts +29 -0
  37. package/dist/workflow-executor.d.ts.map +1 -0
  38. package/dist/workflow-executor.js +414 -0
  39. package/dist/workflow-executor.js.map +1 -0
  40. package/install-from-github.mjs +152 -0
  41. package/install-from-github.sh +106 -0
  42. package/install.sh +295 -0
  43. package/opencode.json +118 -0
  44. package/package.json +41 -0
  45. package/tsconfig.json +23 -0
package/install.sh ADDED
@@ -0,0 +1,295 @@
1
+ #!/bin/bash
2
+
3
+ # OpenCode cc10x Plugin Installer
4
+ # This script installs and configures the cc10x orchestration system for OpenCode
5
+
6
+ set -e
7
+
8
+ echo "🔌 Installing OpenCode cc10x Plugin..."
9
+
10
+ # Check if OpenCode is installed
11
+ if ! command -v opencode &> /dev/null; then
12
+ echo "❌ OpenCode is not installed. Please install OpenCode first."
13
+ exit 1
14
+ fi
15
+
16
+ # Create plugin directory
17
+ PLUGIN_DIR="$HOME/.config/opencode/plugins"
18
+ mkdir -p "$PLUGIN_DIR"
19
+
20
+ # Copy plugin file
21
+ echo "📦 Installing plugin..."
22
+ cp dist/index.js "$PLUGIN_DIR/opencode-cc10x.js"
23
+
24
+ # Create global config
25
+ CONFIG_DIR="$HOME/.config/opencode"
26
+ CONFIG_FILE="$CONFIG_DIR/opencode.json"
27
+
28
+ echo "⚙️ Creating global configuration..."
29
+
30
+ # Create config with proper structure
31
+ cat > "$CONFIG_FILE" << 'EOF'
32
+ {
33
+ "$schema": "https://opencode.ai/config.json",
34
+ "plugin": ["opencode-cc10x"],
35
+ "command": {
36
+ "cc10x-orchestrate": {
37
+ "template": "Run cc10x intelligent orchestration for this development task: ${input}",
38
+ "description": "Intelligent orchestration system for development tasks with multi-agent workflows",
39
+ "agent": "planner",
40
+ "model": "anthropic/claude-sonnet-4-20250514"
41
+ },
42
+ "cc10x-build": {
43
+ "template": "Build this feature using TDD: ${input}",
44
+ "description": "Build features using TDD cycle (RED → GREEN → REFACTOR)",
45
+ "agent": "component-builder",
46
+ "model": "anthropic/claude-sonnet-4-20250514"
47
+ },
48
+ "cc10x-debug": {
49
+ "template": "Debug this issue: ${input}",
50
+ "description": "Investigate and fix bugs with log-first approach",
51
+ "agent": "bug-investigator",
52
+ "model": "anthropic/claude-sonnet-4-20250514"
53
+ },
54
+ "cc10x-review": {
55
+ "template": "Review this code: ${input}",
56
+ "description": "Comprehensive code review with 80%+ confidence threshold",
57
+ "agent": "code-reviewer",
58
+ "model": "anthropic/claude-sonnet-4-20250514"
59
+ },
60
+ "cc10x-plan": {
61
+ "template": "Create a comprehensive plan for: ${input}",
62
+ "description": "Create detailed plans with research and architecture design",
63
+ "agent": "planner",
64
+ "model": "anthropic/claude-sonnet-4-20250514"
65
+ }
66
+ },
67
+ "agent": {
68
+ "component-builder": {
69
+ "description": "Builds features using TDD cycle (RED → GREEN → REFACTOR). Part of cc10x orchestration system.",
70
+ "mode": "subagent",
71
+ "temperature": 0.3,
72
+ "color": "#00ff00",
73
+ "tools": {
74
+ "write": true,
75
+ "edit": true,
76
+ "bash": true,
77
+ "grep": true,
78
+ "glob": true,
79
+ "skill": true,
80
+ "lsp": true,
81
+ "askUserQuestion": true
82
+ }
83
+ },
84
+ "bug-investigator": {
85
+ "description": "Investigates bugs with log-first approach. Part of cc10x orchestration system.",
86
+ "mode": "subagent",
87
+ "temperature": 0.2,
88
+ "color": "#ffa500",
89
+ "tools": {
90
+ "write": false,
91
+ "edit": false,
92
+ "bash": true,
93
+ "grep": true,
94
+ "glob": true,
95
+ "skill": true,
96
+ "lsp": true,
97
+ "webfetch": true
98
+ }
99
+ },
100
+ "code-reviewer": {
101
+ "description": "Reviews code with 80%+ confidence threshold. Part of cc10x orchestration system.",
102
+ "mode": "subagent",
103
+ "temperature": 0.1,
104
+ "color": "#ffff00",
105
+ "tools": {
106
+ "write": false,
107
+ "edit": false,
108
+ "bash": true,
109
+ "grep": true,
110
+ "glob": true,
111
+ "skill": true,
112
+ "lsp": true
113
+ }
114
+ },
115
+ "silent-failure-hunter": {
116
+ "description": "Finds silent failures and error handling gaps. Part of cc10x orchestration system.",
117
+ "mode": "subagent",
118
+ "temperature": 0.2,
119
+ "color": "#ff0000",
120
+ "tools": {
121
+ "write": false,
122
+ "edit": false,
123
+ "bash": true,
124
+ "grep": true,
125
+ "glob": true,
126
+ "skill": true,
127
+ "lsp": true
128
+ }
129
+ },
130
+ "integration-verifier": {
131
+ "description": "Performs end-to-end validation. Part of cc10x orchestration system.",
132
+ "mode": "subagent",
133
+ "temperature": 0.1,
134
+ "color": "#0000ff",
135
+ "tools": {
136
+ "write": false,
137
+ "edit": false,
138
+ "bash": true,
139
+ "grep": true,
140
+ "glob": true,
141
+ "skill": true,
142
+ "lsp": true,
143
+ "askUserQuestion": true
144
+ }
145
+ },
146
+ "planner": {
147
+ "description": "Creates comprehensive plans with research. Part of cc10x orchestration system.",
148
+ "mode": "subagent",
149
+ "temperature": 0.4,
150
+ "color": "#800080",
151
+ "tools": {
152
+ "write": true,
153
+ "edit": true,
154
+ "bash": true,
155
+ "grep": true,
156
+ "glob": true,
157
+ "skill": true,
158
+ "lsp": true,
159
+ "webfetch": true
160
+ }
161
+ }
162
+ },
163
+ "permission": {
164
+ "bash": {
165
+ "mkdir -p .claude/cc10x": "allow",
166
+ "git status": "allow",
167
+ "git diff": "allow",
168
+ "git log": "allow",
169
+ "npm test": "allow",
170
+ "yarn test": "allow",
171
+ "bun test": "allow",
172
+ "npm start": "allow",
173
+ "*": "ask"
174
+ },
175
+ "edit": "allow",
176
+ "write": "allow",
177
+ "skill": {
178
+ "cc10x:*": "allow"
179
+ }
180
+ }
181
+ }
182
+ EOF
183
+
184
+ # Create commands directory
185
+ COMMANDS_DIR="$CONFIG_DIR/commands"
186
+ mkdir -p "$COMMANDS_DIR"
187
+
188
+ echo "📝 Creating command files..."
189
+
190
+ # Create cc10x-orchestrate command
191
+ cat > "$COMMANDS_DIR/cc10x-orchestrate.md" << 'EOF'
192
+ ---
193
+ description: Intelligent orchestration system for development tasks with multi-agent workflows
194
+ agent: planner
195
+ model: anthropic/claude-sonnet-4-20250514
196
+ ---
197
+
198
+ Run cc10x intelligent orchestration for this development task:
199
+
200
+ $ARGUMENTS
201
+
202
+ This will automatically detect the intent and orchestrate the appropriate workflow with multiple specialized agents.
203
+ EOF
204
+
205
+ # Create cc10x-build command
206
+ cat > "$COMMANDS_DIR/cc10x-build.md" << 'EOF'
207
+ ---
208
+ description: Build features using TDD cycle (RED → GREEN → REFACTOR)
209
+ agent: component-builder
210
+ model: anthropic/claude-sonnet-4-20250514
211
+ ---
212
+
213
+ Build this feature using TDD:
214
+
215
+ $ARGUMENTS
216
+
217
+ Follow the TDD cycle strictly:
218
+ 1. RED: Write a failing test first
219
+ 2. GREEN: Write minimal code to pass
220
+ 3. REFACTOR: Clean up while keeping tests green
221
+ 4. VERIFY: All tests must pass
222
+ EOF
223
+
224
+ # Create cc10x-debug command
225
+ cat > "$COMMANDS_DIR/cc10x-debug.md" << 'EOF'
226
+ ---
227
+ description: Investigate and fix bugs with log-first approach
228
+ agent: bug-investigator
229
+ model: anthropic/claude-sonnet-4-20250514
230
+ ---
231
+
232
+ Debug this issue:
233
+
234
+ $ARGUMENTS
235
+
236
+ Use a log-first approach to:
237
+ 1. Identify the root cause
238
+ 2. Find all related error logs
239
+ 3. Propose fixes with evidence
240
+ 4. Implement the solution
241
+ EOF
242
+
243
+ # Create cc10x-review command
244
+ cat > "$COMMANDS_DIR/cc10x-review.md" << 'EOF'
245
+ ---
246
+ description: Comprehensive code review with 80%+ confidence threshold
247
+ agent: code-reviewer
248
+ model: anthropic/claude-sonnet-4-20250514
249
+ ---
250
+
251
+ Review this code:
252
+
253
+ $ARGUMENTS
254
+
255
+ Perform a comprehensive code review with 80%+ confidence threshold:
256
+ - Check for bugs and security issues
257
+ - Verify code quality and best practices
258
+ - Suggest improvements
259
+ - Only approve if confidence is high
260
+ EOF
261
+
262
+ # Create cc10x-plan command
263
+ cat > "$COMMANDS_DIR/cc10x-plan.md" << 'EOF'
264
+ ---
265
+ description: Create detailed plans with research and architecture design
266
+ agent: planner
267
+ model: anthropic/claude-sonnet-4-20250514
268
+ ---
269
+
270
+ Create a comprehensive plan for:
271
+
272
+ $ARGUMENTS
273
+
274
+ Include:
275
+ - Research phase
276
+ - Architecture design
277
+ - Implementation steps
278
+ - Risk assessment
279
+ - Timeline estimates
280
+ EOF
281
+
282
+ echo "✅ Installation complete!"
283
+ echo ""
284
+ echo "📁 Files installed:"
285
+ echo " Plugin: $PLUGIN_DIR/opencode-cc10x.js"
286
+ echo " Config: $CONFIG_FILE"
287
+ echo " Commands: $COMMANDS_DIR/"
288
+ echo ""
289
+ echo "🚀 Usage:"
290
+ echo " • Start OpenCode: opencode"
291
+ echo " • Press '/' to see cc10x commands"
292
+ echo " • Or use directly: /cc10x-orchestrate <task>"
293
+ echo " • Or run: opencode run \"<your task>\""
294
+ echo ""
295
+ echo "🎯 The cc10x orchestration system is now ready!"
package/opencode.json ADDED
@@ -0,0 +1,118 @@
1
+ {
2
+ "$schema": "https://opencode.ai/config.json",
3
+ "plugin": ["opencode-cc10x"],
4
+ "agent": {
5
+ "cc10x-component-builder": {
6
+ "description": "Builds features using TDD cycle (RED → GREEN → REFACTOR). Part of cc10x orchestration system.",
7
+ "mode": "subagent",
8
+ "temperature": 0.3,
9
+ "color": "#00ff00",
10
+ "tools": {
11
+ "write": true,
12
+ "edit": true,
13
+ "bash": true,
14
+ "grep": true,
15
+ "glob": true,
16
+ "skill": true,
17
+ "lsp": true,
18
+ "askUserQuestion": true
19
+ }
20
+ },
21
+ "cc10x-bug-investigator": {
22
+ "description": "Investigates bugs with log-first approach. Part of cc10x orchestration system.",
23
+ "mode": "subagent",
24
+ "temperature": 0.2,
25
+ "color": "#ffa500",
26
+ "tools": {
27
+ "write": false,
28
+ "edit": false,
29
+ "bash": true,
30
+ "grep": true,
31
+ "glob": true,
32
+ "skill": true,
33
+ "lsp": true,
34
+ "webfetch": true
35
+ }
36
+ },
37
+ "cc10x-code-reviewer": {
38
+ "description": "Reviews code with 80%+ confidence threshold. Part of cc10x orchestration system.",
39
+ "mode": "subagent",
40
+ "temperature": 0.1,
41
+ "color": "#ffff00",
42
+ "tools": {
43
+ "write": false,
44
+ "edit": false,
45
+ "bash": true,
46
+ "grep": true,
47
+ "glob": true,
48
+ "skill": true,
49
+ "lsp": true
50
+ }
51
+ },
52
+ "cc10x-silent-failure-hunter": {
53
+ "description": "Finds silent failures and error handling gaps. Part of cc10x orchestration system.",
54
+ "mode": "subagent",
55
+ "temperature": 0.2,
56
+ "color": "#ff0000",
57
+ "tools": {
58
+ "write": false,
59
+ "edit": false,
60
+ "bash": true,
61
+ "grep": true,
62
+ "glob": true,
63
+ "skill": true,
64
+ "lsp": true
65
+ }
66
+ },
67
+ "cc10x-integration-verifier": {
68
+ "description": "Performs end-to-end validation. Part of cc10x orchestration system.",
69
+ "mode": "subagent",
70
+ "temperature": 0.1,
71
+ "color": "#0000ff",
72
+ "tools": {
73
+ "write": false,
74
+ "edit": false,
75
+ "bash": true,
76
+ "grep": true,
77
+ "glob": true,
78
+ "skill": true,
79
+ "lsp": true,
80
+ "askUserQuestion": true
81
+ }
82
+ },
83
+ "cc10x-planner": {
84
+ "description": "Creates comprehensive plans with research. Part of cc10x orchestration system.",
85
+ "mode": "subagent",
86
+ "temperature": 0.4,
87
+ "color": "#800080",
88
+ "tools": {
89
+ "write": true,
90
+ "edit": true,
91
+ "bash": true,
92
+ "grep": true,
93
+ "glob": true,
94
+ "skill": true,
95
+ "lsp": true,
96
+ "webfetch": true
97
+ }
98
+ }
99
+ },
100
+ "permission": {
101
+ "bash": {
102
+ "mkdir -p .claude/cc10x": "allow",
103
+ "git status": "allow",
104
+ "git diff": "allow",
105
+ "git log": "allow",
106
+ "npm test": "allow",
107
+ "yarn test": "allow",
108
+ "bun test": "allow",
109
+ "npm start": "allow",
110
+ "*": "ask"
111
+ },
112
+ "edit": "allow",
113
+ "write": "allow",
114
+ "skill": {
115
+ "cc10x:*": "allow"
116
+ }
117
+ }
118
+ }
package/package.json ADDED
@@ -0,0 +1,41 @@
1
+ {
2
+ "name": "opencode-cc10x",
3
+ "version": "6.0.21",
4
+ "description": "Intelligent orchestration plugin for OpenCode - port of cc10x from Claude Code",
5
+ "main": "dist/index.js",
6
+ "scripts": {
7
+ "build": "esbuild src/index.ts --bundle --platform=node --format=esm --outfile=dist/index.js --external:@opencode-ai/plugin",
8
+ "dev": "esbuild src/index.ts --bundle --platform=node --format=esm --outfile=dist/index.js --external:@opencode-ai/plugin --watch",
9
+ "test": "bun test --coverage",
10
+ "test:watch": "bun test --watch",
11
+ "lint": "bun x tsc --noEmit",
12
+ "prepublishOnly": "npm run build"
13
+ },
14
+ "keywords": [
15
+ "opencode",
16
+ "plugin",
17
+ "cc10x",
18
+ "orchestration",
19
+ "agents",
20
+ "tdd",
21
+ "workflow"
22
+ ],
23
+ "author": "OpenHands",
24
+ "license": "MIT",
25
+ "repository": {
26
+ "type": "git",
27
+ "url": "https://github.com/Chaim12345/cc10x.git"
28
+ },
29
+ "devDependencies": {
30
+ "@types/node": "^20.0.0",
31
+ "esbuild": "^0.25.10",
32
+ "typescript": "^5.0.0"
33
+ },
34
+ "peerDependencies": {
35
+ "@opencode-ai/plugin": "^1.1.60"
36
+ },
37
+ "engines": {
38
+ "node": ">=18.0.0",
39
+ "bun": ">=1.0.0"
40
+ }
41
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,23 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "module": "ESNext",
5
+ "moduleResolution": "bundler",
6
+ "lib": ["ES2022"],
7
+ "outDir": "./dist",
8
+ "rootDir": "./src",
9
+ "strict": true,
10
+ "esModuleInterop": true,
11
+ "skipLibCheck": true,
12
+ "forceConsistentCasingInFileNames": true,
13
+ "declaration": true,
14
+ "declarationMap": true,
15
+ "sourceMap": true,
16
+ "resolveJsonModule": true,
17
+ "allowSyntheticDefaultImports": true,
18
+ "experimentalDecorators": true,
19
+ "emitDecoratorMetadata": true
20
+ },
21
+ "include": ["src/**/*"],
22
+ "exclude": ["node_modules", "dist", "**/*.test.ts"]
23
+ }