opencode-team-lead 0.2.0 → 0.3.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/README.md +31 -1
- package/index.js +32 -18
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -14,7 +14,10 @@ Add to your OpenCode config:
|
|
|
14
14
|
```jsonc
|
|
15
15
|
// opencode.json
|
|
16
16
|
{
|
|
17
|
-
"plugin": [
|
|
17
|
+
"plugin": [
|
|
18
|
+
"opencode-team-lead@latest",
|
|
19
|
+
"@tarquinen/opencode-dcp@latest"
|
|
20
|
+
]
|
|
18
21
|
}
|
|
19
22
|
```
|
|
20
23
|
|
|
@@ -22,6 +25,8 @@ Using `@latest` ensures you always get the newest version automatically when Ope
|
|
|
22
25
|
|
|
23
26
|
Restart OpenCode. The plugin will automatically install and register the team-lead agent.
|
|
24
27
|
|
|
28
|
+
The team-lead relies on [`opencode-dynamic-context-pruning`](https://github.com/Opencode-DCP/opencode-dynamic-context-pruning) for context window management. The DCP plugin provides `distill`, `prune`, and `compress` tools that the agent uses to condense verbose outputs and discard irrelevant tool calls — keeping the context clean across long sessions.
|
|
29
|
+
|
|
25
30
|
## The team-lead agent
|
|
26
31
|
|
|
27
32
|
The team-lead never touches code directly. It:
|
|
@@ -50,11 +55,36 @@ The agent has a minimal permission set:
|
|
|
50
55
|
| `todowrite` / `todoread` | allow |
|
|
51
56
|
| `skill` | allow |
|
|
52
57
|
| `question` | allow |
|
|
58
|
+
| `distill` / `prune` / `compress` | allow |
|
|
53
59
|
| `memoai_*` | allow |
|
|
54
60
|
| `sequential-thinking_*` | allow |
|
|
55
61
|
| `bash` (git only) | allow |
|
|
56
62
|
| Everything else | deny |
|
|
57
63
|
|
|
64
|
+
## Customization
|
|
65
|
+
|
|
66
|
+
You can override agent properties in your `opencode.json` — `temperature`, `color`, `variant`, `mode`, and additional permissions are all fair game:
|
|
67
|
+
|
|
68
|
+
```jsonc
|
|
69
|
+
// opencode.json
|
|
70
|
+
{
|
|
71
|
+
"agent": {
|
|
72
|
+
"team-lead": {
|
|
73
|
+
"temperature": 0.5,
|
|
74
|
+
"color": "#FF5733",
|
|
75
|
+
"permission": {
|
|
76
|
+
"webfetch": "allow",
|
|
77
|
+
"my_custom_tool": "allow"
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Your overrides are merged on top of the plugin defaults — anything you don't specify keeps its default value. Permissions work the same way: the plugin's built-in permissions stay intact, and yours are added (or override specific entries).
|
|
85
|
+
|
|
86
|
+
The system prompt is always provided by the plugin and cannot be overridden.
|
|
87
|
+
|
|
58
88
|
## License
|
|
59
89
|
|
|
60
90
|
MIT
|
package/index.js
CHANGED
|
@@ -27,6 +27,34 @@ export const TeamLeadPlugin = async ({ directory, worktree }) => {
|
|
|
27
27
|
// ── Config hook: inject the team-lead agent ──────────────────────
|
|
28
28
|
config: async (input) => {
|
|
29
29
|
input.agent = input.agent ?? {};
|
|
30
|
+
|
|
31
|
+
// Capture any existing user config (e.g. from opencode.json)
|
|
32
|
+
const userConfig = input.agent["team-lead"] ?? {};
|
|
33
|
+
|
|
34
|
+
const defaultPermission = {
|
|
35
|
+
"*": "deny",
|
|
36
|
+
todowrite: "allow",
|
|
37
|
+
todoread: "allow",
|
|
38
|
+
skill: "allow",
|
|
39
|
+
task: "allow",
|
|
40
|
+
question: "allow",
|
|
41
|
+
distill: "allow",
|
|
42
|
+
prune: "allow",
|
|
43
|
+
compress: "allow",
|
|
44
|
+
"memoai_*": "allow",
|
|
45
|
+
"sequential-thinking_*": "allow",
|
|
46
|
+
bash: {
|
|
47
|
+
"*": "deny",
|
|
48
|
+
"git status*": "allow",
|
|
49
|
+
"git diff*": "allow",
|
|
50
|
+
"git log*": "allow",
|
|
51
|
+
"git add*": "allow",
|
|
52
|
+
"git commit*": "allow",
|
|
53
|
+
"git push*": "allow",
|
|
54
|
+
"git tag*": "allow",
|
|
55
|
+
},
|
|
56
|
+
};
|
|
57
|
+
|
|
30
58
|
input.agent["team-lead"] = {
|
|
31
59
|
description:
|
|
32
60
|
"Strict delegation-only team lead. Understands requests, breaks them into tasks, " +
|
|
@@ -35,26 +63,12 @@ export const TeamLeadPlugin = async ({ directory, worktree }) => {
|
|
|
35
63
|
temperature: 0.3,
|
|
36
64
|
variant: "max",
|
|
37
65
|
mode: "all",
|
|
66
|
+
color: "error",
|
|
67
|
+
...userConfig,
|
|
38
68
|
prompt,
|
|
39
69
|
permission: {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
todoread: "allow",
|
|
43
|
-
skill: "allow",
|
|
44
|
-
task: "allow",
|
|
45
|
-
question: "allow",
|
|
46
|
-
"memoai_*": "allow",
|
|
47
|
-
"sequential-thinking_*": "allow",
|
|
48
|
-
bash: {
|
|
49
|
-
"*": "deny",
|
|
50
|
-
"git status*": "allow",
|
|
51
|
-
"git diff*": "allow",
|
|
52
|
-
"git log*": "allow",
|
|
53
|
-
"git add*": "allow",
|
|
54
|
-
"git commit*": "allow",
|
|
55
|
-
"git push*": "allow",
|
|
56
|
-
"git tag*": "allow",
|
|
57
|
-
},
|
|
70
|
+
...defaultPermission,
|
|
71
|
+
...userConfig.permission,
|
|
58
72
|
},
|
|
59
73
|
};
|
|
60
74
|
},
|