@zcy2nn/agent-forge 1.1.3 → 1.1.5

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 (58) hide show
  1. package/README.md +188 -247
  2. package/agent-forge.schema.json +2 -265
  3. package/dist/agents/orchestrator.d.ts +1 -1
  4. package/dist/cli/index.js +90 -259
  5. package/dist/cli/providers.d.ts +0 -44
  6. package/dist/cli/types.d.ts +0 -2
  7. package/dist/config/constants.d.ts +3 -8
  8. package/dist/config/index.d.ts +0 -1
  9. package/dist/config/loader.d.ts +1 -1
  10. package/dist/config/schema.d.ts +1 -184
  11. package/dist/hooks/index.d.ts +0 -6
  12. package/dist/hooks/json-error-recovery/hook.d.ts +1 -1
  13. package/dist/hooks/todo-continuation/index.d.ts +2 -1
  14. package/dist/index.d.ts +1 -1
  15. package/dist/index.js +7875 -31853
  16. package/dist/tools/index.d.ts +0 -3
  17. package/dist/tui.js +5 -61
  18. package/dist/utils/index.d.ts +0 -2
  19. package/package.json +95 -104
  20. package/src/skills/brainstorming/SKILL.md +185 -186
  21. package/src/skills/brainstorming/scripts/frame-template.html +214 -214
  22. package/src/skills/brainstorming/scripts/server.cjs +354 -354
  23. package/src/skills/brainstorming/spec-document-reviewer-prompt.md +1 -1
  24. package/src/skills/requesting-code-review/SKILL.md +1 -1
  25. package/src/skills/subagent-driven-development/SKILL.md +1 -1
  26. package/src/skills/systematic-debugging/SKILL.md +318 -318
  27. package/src/skills/test-driven-development/SKILL.md +392 -392
  28. package/src/skills/verification-before-completion/SKILL.md +153 -153
  29. package/src/skills/writing-plans/SKILL.md +2 -2
  30. package/src/skills/writing-skills/graphviz-conventions.dot +171 -171
  31. package/dist/agents/council.d.ts +0 -27
  32. package/dist/agents/councillor.d.ts +0 -2
  33. package/dist/agents/designer.d.ts +0 -2
  34. package/dist/agents/explorer.d.ts +0 -2
  35. package/dist/agents/fixer.d.ts +0 -2
  36. package/dist/agents/implementer.d.ts +0 -2
  37. package/dist/agents/librarian.d.ts +0 -2
  38. package/dist/agents/observer.d.ts +0 -2
  39. package/dist/agents/oracle.d.ts +0 -2
  40. package/dist/agents/reviewer.d.ts +0 -2
  41. package/dist/cli/migration.d.ts +0 -46
  42. package/dist/config/council-schema.d.ts +0 -127
  43. package/dist/council/council-manager.d.ts +0 -49
  44. package/dist/council/index.d.ts +0 -1
  45. package/dist/hooks/phase-reminder/index.d.ts +0 -26
  46. package/dist/hooks/post-file-tool-nudge/index.d.ts +0 -19
  47. package/dist/skills/systematic-debugging/condition-based-waiting-example.d.ts +0 -51
  48. package/dist/tools/council.d.ts +0 -10
  49. package/src/skills/codemap/README.md +0 -59
  50. package/src/skills/codemap/SKILL.md +0 -163
  51. package/src/skills/codemap/codemap.md +0 -36
  52. package/src/skills/codemap/scripts/codemap.mjs +0 -483
  53. package/src/skills/codemap/scripts/codemap.test.ts +0 -129
  54. package/src/skills/codemap.md +0 -40
  55. package/src/skills/simplify/README.md +0 -19
  56. package/src/skills/simplify/SKILL.md +0 -138
  57. package/src/skills/simplify/codemap.md +0 -36
  58. package/src/skills/using-git-worktrees/SKILL.md +0 -226
@@ -1,172 +1,172 @@
1
- digraph STYLE_GUIDE {
2
- // The style guide for our process DSL, written in the DSL itself
3
-
4
- // Node type examples with their shapes
5
- subgraph cluster_node_types {
6
- label="NODE TYPES AND SHAPES";
7
-
8
- // Questions are diamonds
9
- "Is this a question?" [shape=diamond];
10
-
11
- // Actions are boxes (default)
12
- "Take an action" [shape=box];
13
-
14
- // Commands are plaintext
15
- "git commit -m 'msg'" [shape=plaintext];
16
-
17
- // States are ellipses
18
- "Current state" [shape=ellipse];
19
-
20
- // Warnings are octagons
21
- "STOP: Critical warning" [shape=octagon, style=filled, fillcolor=red, fontcolor=white];
22
-
23
- // Entry/exit are double circles
24
- "Process starts" [shape=doublecircle];
25
- "Process complete" [shape=doublecircle];
26
-
27
- // Examples of each
28
- "Is test passing?" [shape=diamond];
29
- "Write test first" [shape=box];
30
- "npm test" [shape=plaintext];
31
- "I am stuck" [shape=ellipse];
32
- "NEVER use git add -A" [shape=octagon, style=filled, fillcolor=red, fontcolor=white];
33
- }
34
-
35
- // Edge naming conventions
36
- subgraph cluster_edge_types {
37
- label="EDGE LABELS";
38
-
39
- "Binary decision?" [shape=diamond];
40
- "Yes path" [shape=box];
41
- "No path" [shape=box];
42
-
43
- "Binary decision?" -> "Yes path" [label="yes"];
44
- "Binary decision?" -> "No path" [label="no"];
45
-
46
- "Multiple choice?" [shape=diamond];
47
- "Option A" [shape=box];
48
- "Option B" [shape=box];
49
- "Option C" [shape=box];
50
-
51
- "Multiple choice?" -> "Option A" [label="condition A"];
52
- "Multiple choice?" -> "Option B" [label="condition B"];
53
- "Multiple choice?" -> "Option C" [label="otherwise"];
54
-
55
- "Process A done" [shape=doublecircle];
56
- "Process B starts" [shape=doublecircle];
57
-
58
- "Process A done" -> "Process B starts" [label="triggers", style=dotted];
59
- }
60
-
61
- // Naming patterns
62
- subgraph cluster_naming_patterns {
63
- label="NAMING PATTERNS";
64
-
65
- // Questions end with ?
66
- "Should I do X?";
67
- "Can this be Y?";
68
- "Is Z true?";
69
- "Have I done W?";
70
-
71
- // Actions start with verb
72
- "Write the test";
73
- "Search for patterns";
74
- "Commit changes";
75
- "Ask for help";
76
-
77
- // Commands are literal
78
- "grep -r 'pattern' .";
79
- "git status";
80
- "npm run build";
81
-
82
- // States describe situation
83
- "Test is failing";
84
- "Build complete";
85
- "Stuck on error";
86
- }
87
-
88
- // Process structure template
89
- subgraph cluster_structure {
90
- label="PROCESS STRUCTURE TEMPLATE";
91
-
92
- "Trigger: Something happens" [shape=ellipse];
93
- "Initial check?" [shape=diamond];
94
- "Main action" [shape=box];
95
- "git status" [shape=plaintext];
96
- "Another check?" [shape=diamond];
97
- "Alternative action" [shape=box];
98
- "STOP: Don't do this" [shape=octagon, style=filled, fillcolor=red, fontcolor=white];
99
- "Process complete" [shape=doublecircle];
100
-
101
- "Trigger: Something happens" -> "Initial check?";
102
- "Initial check?" -> "Main action" [label="yes"];
103
- "Initial check?" -> "Alternative action" [label="no"];
104
- "Main action" -> "git status";
105
- "git status" -> "Another check?";
106
- "Another check?" -> "Process complete" [label="ok"];
107
- "Another check?" -> "STOP: Don't do this" [label="problem"];
108
- "Alternative action" -> "Process complete";
109
- }
110
-
111
- // When to use which shape
112
- subgraph cluster_shape_rules {
113
- label="WHEN TO USE EACH SHAPE";
114
-
115
- "Choosing a shape" [shape=ellipse];
116
-
117
- "Is it a decision?" [shape=diamond];
118
- "Use diamond" [shape=diamond, style=filled, fillcolor=lightblue];
119
-
120
- "Is it a command?" [shape=diamond];
121
- "Use plaintext" [shape=plaintext, style=filled, fillcolor=lightgray];
122
-
123
- "Is it a warning?" [shape=diamond];
124
- "Use octagon" [shape=octagon, style=filled, fillcolor=pink];
125
-
126
- "Is it entry/exit?" [shape=diamond];
127
- "Use doublecircle" [shape=doublecircle, style=filled, fillcolor=lightgreen];
128
-
129
- "Is it a state?" [shape=diamond];
130
- "Use ellipse" [shape=ellipse, style=filled, fillcolor=lightyellow];
131
-
132
- "Default: use box" [shape=box, style=filled, fillcolor=lightcyan];
133
-
134
- "Choosing a shape" -> "Is it a decision?";
135
- "Is it a decision?" -> "Use diamond" [label="yes"];
136
- "Is it a decision?" -> "Is it a command?" [label="no"];
137
- "Is it a command?" -> "Use plaintext" [label="yes"];
138
- "Is it a command?" -> "Is it a warning?" [label="no"];
139
- "Is it a warning?" -> "Use octagon" [label="yes"];
140
- "Is it a warning?" -> "Is it entry/exit?" [label="no"];
141
- "Is it entry/exit?" -> "Use doublecircle" [label="yes"];
142
- "Is it entry/exit?" -> "Is it a state?" [label="no"];
143
- "Is it a state?" -> "Use ellipse" [label="yes"];
144
- "Is it a state?" -> "Default: use box" [label="no"];
145
- }
146
-
147
- // Good vs bad examples
148
- subgraph cluster_examples {
149
- label="GOOD VS BAD EXAMPLES";
150
-
151
- // Good: specific and shaped correctly
152
- "Test failed" [shape=ellipse];
153
- "Read error message" [shape=box];
154
- "Can reproduce?" [shape=diamond];
155
- "git diff HEAD~1" [shape=plaintext];
156
- "NEVER ignore errors" [shape=octagon, style=filled, fillcolor=red, fontcolor=white];
157
-
158
- "Test failed" -> "Read error message";
159
- "Read error message" -> "Can reproduce?";
160
- "Can reproduce?" -> "git diff HEAD~1" [label="yes"];
161
-
162
- // Bad: vague and wrong shapes
163
- bad_1 [label="Something wrong", shape=box]; // Should be ellipse (state)
164
- bad_2 [label="Fix it", shape=box]; // Too vague
165
- bad_3 [label="Check", shape=box]; // Should be diamond
166
- bad_4 [label="Run command", shape=box]; // Should be plaintext with actual command
167
-
168
- bad_1 -> bad_2;
169
- bad_2 -> bad_3;
170
- bad_3 -> bad_4;
171
- }
1
+ digraph STYLE_GUIDE {
2
+ // The style guide for our process DSL, written in the DSL itself
3
+
4
+ // Node type examples with their shapes
5
+ subgraph cluster_node_types {
6
+ label="NODE TYPES AND SHAPES";
7
+
8
+ // Questions are diamonds
9
+ "Is this a question?" [shape=diamond];
10
+
11
+ // Actions are boxes (default)
12
+ "Take an action" [shape=box];
13
+
14
+ // Commands are plaintext
15
+ "git commit -m 'msg'" [shape=plaintext];
16
+
17
+ // States are ellipses
18
+ "Current state" [shape=ellipse];
19
+
20
+ // Warnings are octagons
21
+ "STOP: Critical warning" [shape=octagon, style=filled, fillcolor=red, fontcolor=white];
22
+
23
+ // Entry/exit are double circles
24
+ "Process starts" [shape=doublecircle];
25
+ "Process complete" [shape=doublecircle];
26
+
27
+ // Examples of each
28
+ "Is test passing?" [shape=diamond];
29
+ "Write test first" [shape=box];
30
+ "npm test" [shape=plaintext];
31
+ "I am stuck" [shape=ellipse];
32
+ "NEVER use git add -A" [shape=octagon, style=filled, fillcolor=red, fontcolor=white];
33
+ }
34
+
35
+ // Edge naming conventions
36
+ subgraph cluster_edge_types {
37
+ label="EDGE LABELS";
38
+
39
+ "Binary decision?" [shape=diamond];
40
+ "Yes path" [shape=box];
41
+ "No path" [shape=box];
42
+
43
+ "Binary decision?" -> "Yes path" [label="yes"];
44
+ "Binary decision?" -> "No path" [label="no"];
45
+
46
+ "Multiple choice?" [shape=diamond];
47
+ "Option A" [shape=box];
48
+ "Option B" [shape=box];
49
+ "Option C" [shape=box];
50
+
51
+ "Multiple choice?" -> "Option A" [label="condition A"];
52
+ "Multiple choice?" -> "Option B" [label="condition B"];
53
+ "Multiple choice?" -> "Option C" [label="otherwise"];
54
+
55
+ "Process A done" [shape=doublecircle];
56
+ "Process B starts" [shape=doublecircle];
57
+
58
+ "Process A done" -> "Process B starts" [label="triggers", style=dotted];
59
+ }
60
+
61
+ // Naming patterns
62
+ subgraph cluster_naming_patterns {
63
+ label="NAMING PATTERNS";
64
+
65
+ // Questions end with ?
66
+ "Should I do X?";
67
+ "Can this be Y?";
68
+ "Is Z true?";
69
+ "Have I done W?";
70
+
71
+ // Actions start with verb
72
+ "Write the test";
73
+ "Search for patterns";
74
+ "Commit changes";
75
+ "Ask for help";
76
+
77
+ // Commands are literal
78
+ "grep -r 'pattern' .";
79
+ "git status";
80
+ "npm run build";
81
+
82
+ // States describe situation
83
+ "Test is failing";
84
+ "Build complete";
85
+ "Stuck on error";
86
+ }
87
+
88
+ // Process structure template
89
+ subgraph cluster_structure {
90
+ label="PROCESS STRUCTURE TEMPLATE";
91
+
92
+ "Trigger: Something happens" [shape=ellipse];
93
+ "Initial check?" [shape=diamond];
94
+ "Main action" [shape=box];
95
+ "git status" [shape=plaintext];
96
+ "Another check?" [shape=diamond];
97
+ "Alternative action" [shape=box];
98
+ "STOP: Don't do this" [shape=octagon, style=filled, fillcolor=red, fontcolor=white];
99
+ "Process complete" [shape=doublecircle];
100
+
101
+ "Trigger: Something happens" -> "Initial check?";
102
+ "Initial check?" -> "Main action" [label="yes"];
103
+ "Initial check?" -> "Alternative action" [label="no"];
104
+ "Main action" -> "git status";
105
+ "git status" -> "Another check?";
106
+ "Another check?" -> "Process complete" [label="ok"];
107
+ "Another check?" -> "STOP: Don't do this" [label="problem"];
108
+ "Alternative action" -> "Process complete";
109
+ }
110
+
111
+ // When to use which shape
112
+ subgraph cluster_shape_rules {
113
+ label="WHEN TO USE EACH SHAPE";
114
+
115
+ "Choosing a shape" [shape=ellipse];
116
+
117
+ "Is it a decision?" [shape=diamond];
118
+ "Use diamond" [shape=diamond, style=filled, fillcolor=lightblue];
119
+
120
+ "Is it a command?" [shape=diamond];
121
+ "Use plaintext" [shape=plaintext, style=filled, fillcolor=lightgray];
122
+
123
+ "Is it a warning?" [shape=diamond];
124
+ "Use octagon" [shape=octagon, style=filled, fillcolor=pink];
125
+
126
+ "Is it entry/exit?" [shape=diamond];
127
+ "Use doublecircle" [shape=doublecircle, style=filled, fillcolor=lightgreen];
128
+
129
+ "Is it a state?" [shape=diamond];
130
+ "Use ellipse" [shape=ellipse, style=filled, fillcolor=lightyellow];
131
+
132
+ "Default: use box" [shape=box, style=filled, fillcolor=lightcyan];
133
+
134
+ "Choosing a shape" -> "Is it a decision?";
135
+ "Is it a decision?" -> "Use diamond" [label="yes"];
136
+ "Is it a decision?" -> "Is it a command?" [label="no"];
137
+ "Is it a command?" -> "Use plaintext" [label="yes"];
138
+ "Is it a command?" -> "Is it a warning?" [label="no"];
139
+ "Is it a warning?" -> "Use octagon" [label="yes"];
140
+ "Is it a warning?" -> "Is it entry/exit?" [label="no"];
141
+ "Is it entry/exit?" -> "Use doublecircle" [label="yes"];
142
+ "Is it entry/exit?" -> "Is it a state?" [label="no"];
143
+ "Is it a state?" -> "Use ellipse" [label="yes"];
144
+ "Is it a state?" -> "Default: use box" [label="no"];
145
+ }
146
+
147
+ // Good vs bad examples
148
+ subgraph cluster_examples {
149
+ label="GOOD VS BAD EXAMPLES";
150
+
151
+ // Good: specific and shaped correctly
152
+ "Test failed" [shape=ellipse];
153
+ "Read error message" [shape=box];
154
+ "Can reproduce?" [shape=diamond];
155
+ "git diff HEAD~1" [shape=plaintext];
156
+ "NEVER ignore errors" [shape=octagon, style=filled, fillcolor=red, fontcolor=white];
157
+
158
+ "Test failed" -> "Read error message";
159
+ "Read error message" -> "Can reproduce?";
160
+ "Can reproduce?" -> "git diff HEAD~1" [label="yes"];
161
+
162
+ // Bad: vague and wrong shapes
163
+ bad_1 [label="Something wrong", shape=box]; // Should be ellipse (state)
164
+ bad_2 [label="Fix it", shape=box]; // Too vague
165
+ bad_3 [label="Check", shape=box]; // Should be diamond
166
+ bad_4 [label="Run command", shape=box]; // Should be plaintext with actual command
167
+
168
+ bad_1 -> bad_2;
169
+ bad_2 -> bad_3;
170
+ bad_3 -> bad_4;
171
+ }
172
172
  }
@@ -1,27 +0,0 @@
1
- import { type AgentDefinition } from './orchestrator';
2
- export declare function createCouncilAgent(model: string, customPrompt?: string, customAppendPrompt?: string): AgentDefinition;
3
- /**
4
- * Build the prompt for a specific councillor session.
5
- *
6
- * Returns the raw user prompt — the agent factory (councillor.ts) provides
7
- * the system prompt with tool-aware instructions. No duplication.
8
- *
9
- * If a per-councillor prompt override is provided, it is prepended as
10
- * role/guidance context before the user's question.
11
- */
12
- export declare function formatCouncillorPrompt(userPrompt: string, councillorPrompt?: string): string;
13
- /**
14
- * Format councillor results for the council agent to synthesize.
15
- *
16
- * Formats councillor results as structured data that the council agent
17
- * (which called the tool) will receive as the tool response. The council
18
- * agent's system prompt contains synthesis instructions.
19
- * Returns a special message when all councillors failed to produce output.
20
- */
21
- export declare function formatCouncillorResults(originalPrompt: string, councillorResults: Array<{
22
- name: string;
23
- model: string;
24
- status: string;
25
- result?: string;
26
- error?: string;
27
- }>): string;
@@ -1,2 +0,0 @@
1
- import { type AgentDefinition } from './orchestrator';
2
- export declare function createCouncillorAgent(model: string, customPrompt?: string, customAppendPrompt?: string): AgentDefinition;
@@ -1,2 +0,0 @@
1
- import type { AgentDefinition } from './orchestrator';
2
- export declare function createDesignerAgent(model: string, customPrompt?: string, customAppendPrompt?: string): AgentDefinition;
@@ -1,2 +0,0 @@
1
- import type { AgentDefinition } from './orchestrator';
2
- export declare function createExplorerAgent(model: string, customPrompt?: string, customAppendPrompt?: string): AgentDefinition;
@@ -1,2 +0,0 @@
1
- import type { AgentDefinition } from './orchestrator';
2
- export declare function createFixerAgent(model: string, customPrompt?: string, customAppendPrompt?: string): AgentDefinition;
@@ -1,2 +0,0 @@
1
- import type { AgentDefinition } from './orchestrator';
2
- export declare function createImplementerAgent(model: string, customPrompt?: string, customAppendPrompt?: string): AgentDefinition;
@@ -1,2 +0,0 @@
1
- import type { AgentDefinition } from './orchestrator';
2
- export declare function createLibrarianAgent(model: string, customPrompt?: string, customAppendPrompt?: string): AgentDefinition;
@@ -1,2 +0,0 @@
1
- import type { AgentDefinition } from './orchestrator';
2
- export declare function createObserverAgent(model: string, customPrompt?: string, customAppendPrompt?: string): AgentDefinition;
@@ -1,2 +0,0 @@
1
- import type { AgentDefinition } from './orchestrator';
2
- export declare function createOracleAgent(model: string, customPrompt?: string, customAppendPrompt?: string): AgentDefinition;
@@ -1,2 +0,0 @@
1
- import type { AgentDefinition } from './orchestrator';
2
- export declare function createReviewerAgent(model: string, customPrompt?: string, customAppendPrompt?: string): AgentDefinition;
@@ -1,46 +0,0 @@
1
- /** Result of a migration attempt. */
2
- export interface MigrationResult {
3
- /** Whether a legacy config was detected. */
4
- detected: boolean;
5
- /** Whether the migration was performed. */
6
- migrated: boolean;
7
- /** Path to the new config file, if migrated. */
8
- newPath?: string;
9
- /** Path to the legacy config file that was found. */
10
- legacyPath?: string;
11
- /** Error message if migration failed. */
12
- error?: string;
13
- }
14
- /**
15
- * Get all possible legacy config file paths (json and jsonc).
16
- */
17
- export declare function getLegacyConfigPaths(): string[];
18
- /**
19
- * Detect whether a legacy `oh-my-opencode-slim.json` config exists.
20
- * Returns the path if found, or undefined.
21
- */
22
- export declare function detectLegacyConfig(): string | undefined;
23
- /**
24
- * Check if a config object contains any legacy agent names
25
- * in its presets or agents sections.
26
- */
27
- export declare function hasLegacyAgentNames(config: Record<string, unknown>): boolean;
28
- /**
29
- * Migrate agent names in a config object.
30
- *
31
- * - Renames primary mapping keys (explorer→researcher, oracle→reviewer,
32
- * designer→implementer).
33
- * - For secondary mappings (librarian→researcher, fixer→implementer),
34
- * only applies if the primary mapping target doesn't already exist.
35
- * - Removes observer entries entirely.
36
- * - Preserves all non-agent config keys unchanged.
37
- */
38
- export declare function migrateAgentNames(config: Record<string, unknown>): Record<string, unknown>;
39
- /**
40
- * Perform the full migration:
41
- * 1. Read legacy config
42
- * 2. Migrate agent names
43
- * 3. Write to `agent-forge.json`
44
- * 4. Rename legacy file to `.bak`
45
- */
46
- export declare function performMigration(legacyPath: string): MigrationResult;
@@ -1,127 +0,0 @@
1
- import { z } from 'zod';
2
- /**
3
- * Configuration for a single councillor within a preset.
4
- * Each councillor is an independent LLM that processes the same prompt.
5
- *
6
- * Councillors run as agent sessions with read-only codebase access
7
- * (read, glob, grep, lsp, list). They can examine the codebase but
8
- * cannot modify files or spawn subagents.
9
- */
10
- export declare const CouncillorConfigSchema: z.ZodObject<{
11
- model: z.ZodString;
12
- variant: z.ZodOptional<z.ZodString>;
13
- prompt: z.ZodOptional<z.ZodString>;
14
- }, z.core.$strip>;
15
- export type CouncillorConfig = z.infer<typeof CouncillorConfigSchema>;
16
- /**
17
- * A named preset grouping several councillors.
18
- *
19
- * All keys are treated as councillor names mapping to councillor configs.
20
- * The reserved key `"master"` is silently ignored (legacy from when
21
- * council-master was a separate agent).
22
- */
23
- export declare const CouncilPresetSchema: z.ZodPipe<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>, z.ZodTransform<Record<string, {
24
- model: string;
25
- variant?: string | undefined;
26
- prompt?: string | undefined;
27
- }>, Record<string, Record<string, unknown>>>>;
28
- export type CouncilPreset = z.infer<typeof CouncilPresetSchema>;
29
- /**
30
- * Execution mode for councillors.
31
- * - parallel: Run all councillors concurrently (default, fastest for multi-model systems)
32
- * - serial: Run councillors one at a time (required for single-model systems to avoid conflicts)
33
- */
34
- export declare const CouncillorExecutionModeSchema: z.ZodDefault<z.ZodEnum<{
35
- parallel: "parallel";
36
- serial: "serial";
37
- }>>;
38
- /**
39
- * Top-level council configuration.
40
- *
41
- * Example JSONC:
42
- * ```jsonc
43
- * {
44
- * "council": {
45
- * "presets": {
46
- * "default": {
47
- * "alpha": { "model": "openai/gpt-5.4-mini" },
48
- * "beta": { "model": "openai/gpt-5.3-codex" },
49
- * "gamma": { "model": "google/gemini-3-pro" }
50
- * }
51
- * },
52
- * "timeout": 180000,
53
- * "councillor_execution_mode": "serial"
54
- * }
55
- * }
56
- * ```
57
- */
58
- export declare const CouncilConfigSchema: z.ZodPipe<z.ZodObject<{
59
- presets: z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>, z.ZodTransform<Record<string, {
60
- model: string;
61
- variant?: string | undefined;
62
- prompt?: string | undefined;
63
- }>, Record<string, Record<string, unknown>>>>>;
64
- timeout: z.ZodDefault<z.ZodNumber>;
65
- default_preset: z.ZodDefault<z.ZodString>;
66
- councillor_execution_mode: z.ZodDefault<z.ZodEnum<{
67
- parallel: "parallel";
68
- serial: "serial";
69
- }>>;
70
- councillor_retries: z.ZodDefault<z.ZodNumber>;
71
- master: z.ZodOptional<z.ZodUnknown>;
72
- master_timeout: z.ZodOptional<z.ZodUnknown>;
73
- master_fallback: z.ZodOptional<z.ZodUnknown>;
74
- }, z.core.$strip>, z.ZodTransform<{
75
- presets: Record<string, Record<string, {
76
- model: string;
77
- variant?: string | undefined;
78
- prompt?: string | undefined;
79
- }>>;
80
- timeout: number;
81
- default_preset: string;
82
- councillor_execution_mode: "parallel" | "serial";
83
- councillor_retries: number;
84
- _deprecated: string[] | undefined;
85
- _legacyMasterModel: string | undefined;
86
- }, {
87
- presets: Record<string, Record<string, {
88
- model: string;
89
- variant?: string | undefined;
90
- prompt?: string | undefined;
91
- }>>;
92
- timeout: number;
93
- default_preset: string;
94
- councillor_execution_mode: "parallel" | "serial";
95
- councillor_retries: number;
96
- master?: unknown;
97
- master_timeout?: unknown;
98
- master_fallback?: unknown;
99
- }>>;
100
- export type CouncilConfig = z.infer<typeof CouncilConfigSchema>;
101
- export type CouncillorExecutionMode = z.infer<typeof CouncillorExecutionModeSchema>;
102
- /**
103
- * A sensible default council configuration that users can copy into their
104
- * opencode.jsonc. Provides a 3-councillor preset using common models.
105
- *
106
- * Users should replace models with ones they have access to.
107
- *
108
- * ```jsonc
109
- * "council": DEFAULT_COUNCIL_CONFIG
110
- * ```
111
- */
112
- export declare const DEFAULT_COUNCIL_CONFIG: z.input<typeof CouncilConfigSchema>;
113
- /**
114
- * Result of a council session.
115
- */
116
- export interface CouncilResult {
117
- success: boolean;
118
- result?: string;
119
- error?: string;
120
- councillorResults: Array<{
121
- name: string;
122
- model: string;
123
- status: 'completed' | 'failed' | 'timed_out';
124
- result?: string;
125
- error?: string;
126
- }>;
127
- }
@@ -1,49 +0,0 @@
1
- /**
2
- * Council Manager
3
- *
4
- * Orchestrates multi-LLM council sessions: launches councillors in
5
- * parallel and collects their results for the council agent to synthesize.
6
- */
7
- import type { PluginInput } from '@opencode-ai/plugin';
8
- import type { PluginConfig } from '../config';
9
- import type { CouncilResult } from '../config/council-schema';
10
- import type { SubagentDepthTracker } from '../utils/subagent-depth';
11
- export declare class CouncilManager {
12
- private client;
13
- private directory;
14
- private config?;
15
- private depthTracker?;
16
- private tmuxEnabled;
17
- private deprecatedFields?;
18
- private legacyMasterModel?;
19
- constructor(ctx: PluginInput, config?: PluginConfig, depthTracker?: SubagentDepthTracker, tmuxEnabled?: boolean);
20
- /** Return deprecated config fields detected during parsing (for tool warnings). */
21
- getDeprecatedFields(): string[] | undefined;
22
- /** Return the legacy master.model if it was used as fallback. */
23
- getLegacyMasterModel(): string | undefined;
24
- /**
25
- * Run a full council session.
26
- *
27
- * 1. Look up the preset
28
- * 2. Launch all councillors in parallel
29
- * 3. Collect results (respecting timeout)
30
- * 4. Return formatted councillor results for synthesis
31
- */
32
- runCouncil(prompt: string, presetName: string | undefined, parentSessionId: string): Promise<CouncilResult>;
33
- /**
34
- * Inject a start notification into the parent session so the user
35
- * sees immediate feedback while councillors are spinning up.
36
- */
37
- private sendStartNotification;
38
- /**
39
- * Run a single agent session: create → register → prompt → extract → cleanup.
40
- */
41
- private runAgentSession;
42
- private runCouncillors;
43
- /**
44
- * Run a single councillor with retry logic for empty responses.
45
- * Only retries on "Empty response from provider" errors — timeouts
46
- * and other failures are returned immediately.
47
- */
48
- private runCouncillorWithRetry;
49
- }
@@ -1 +0,0 @@
1
- export { CouncilManager } from './council-manager';