opencode-team-lead 0.2.1 → 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.
Files changed (3) hide show
  1. package/README.md +24 -0
  2. package/index.js +32 -21
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -61,6 +61,30 @@ The agent has a minimal permission set:
61
61
  | `bash` (git only) | allow |
62
62
  | Everything else | deny |
63
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
+
64
88
  ## License
65
89
 
66
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,29 +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
- "*": "deny",
41
- todowrite: "allow",
42
- todoread: "allow",
43
- skill: "allow",
44
- task: "allow",
45
- question: "allow",
46
- distill: "allow",
47
- prune: "allow",
48
- compress: "allow",
49
- "memoai_*": "allow",
50
- "sequential-thinking_*": "allow",
51
- bash: {
52
- "*": "deny",
53
- "git status*": "allow",
54
- "git diff*": "allow",
55
- "git log*": "allow",
56
- "git add*": "allow",
57
- "git commit*": "allow",
58
- "git push*": "allow",
59
- "git tag*": "allow",
60
- },
70
+ ...defaultPermission,
71
+ ...userConfig.permission,
61
72
  },
62
73
  };
63
74
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-team-lead",
3
- "version": "0.2.1",
3
+ "version": "0.3.0",
4
4
  "description": "Team-lead orchestrator agent for opencode — delegates work, reviews quality, manages context",
5
5
  "type": "module",
6
6
  "main": "index.js",