@agentuity/opencode 0.1.40 → 0.1.41
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 +321 -9
- package/dist/agents/architect.d.ts +4 -0
- package/dist/agents/architect.d.ts.map +1 -0
- package/dist/agents/architect.js +259 -0
- package/dist/agents/architect.js.map +1 -0
- package/dist/agents/builder.d.ts +1 -1
- package/dist/agents/builder.d.ts.map +1 -1
- package/dist/agents/builder.js +44 -1
- package/dist/agents/builder.js.map +1 -1
- package/dist/agents/index.d.ts.map +1 -1
- package/dist/agents/index.js +6 -0
- package/dist/agents/index.js.map +1 -1
- package/dist/agents/lead.d.ts +1 -1
- package/dist/agents/lead.d.ts.map +1 -1
- package/dist/agents/lead.js +183 -19
- package/dist/agents/lead.js.map +1 -1
- package/dist/agents/planner.d.ts +4 -0
- package/dist/agents/planner.d.ts.map +1 -0
- package/dist/agents/planner.js +158 -0
- package/dist/agents/planner.js.map +1 -0
- package/dist/agents/runner.d.ts +4 -0
- package/dist/agents/runner.d.ts.map +1 -0
- package/dist/agents/runner.js +364 -0
- package/dist/agents/runner.js.map +1 -0
- package/dist/agents/types.d.ts +5 -1
- package/dist/agents/types.d.ts.map +1 -1
- package/dist/background/concurrency.d.ts +36 -0
- package/dist/background/concurrency.d.ts.map +1 -0
- package/dist/background/concurrency.js +92 -0
- package/dist/background/concurrency.js.map +1 -0
- package/dist/background/index.d.ts +5 -0
- package/dist/background/index.d.ts.map +1 -0
- package/dist/background/index.js +4 -0
- package/dist/background/index.js.map +1 -0
- package/dist/background/manager.d.ts +54 -0
- package/dist/background/manager.d.ts.map +1 -0
- package/dist/background/manager.js +409 -0
- package/dist/background/manager.js.map +1 -0
- package/dist/background/types.d.ts +47 -0
- package/dist/background/types.d.ts.map +1 -0
- package/dist/background/types.js +2 -0
- package/dist/background/types.js.map +1 -0
- package/dist/config/index.d.ts +2 -0
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/index.js +2 -0
- package/dist/config/index.js.map +1 -1
- package/dist/config/loader.d.ts +24 -0
- package/dist/config/loader.d.ts.map +1 -1
- package/dist/config/loader.js +102 -23
- package/dist/config/loader.js.map +1 -1
- package/dist/config/presets.d.ts +16 -0
- package/dist/config/presets.d.ts.map +1 -0
- package/dist/config/presets.js +20 -0
- package/dist/config/presets.js.map +1 -0
- package/dist/config/validation.d.ts +26 -0
- package/dist/config/validation.d.ts.map +1 -0
- package/dist/config/validation.js +48 -0
- package/dist/config/validation.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/plugin/hooks/keyword.d.ts.map +1 -1
- package/dist/plugin/hooks/keyword.js +3 -0
- package/dist/plugin/hooks/keyword.js.map +1 -1
- package/dist/plugin/plugin.d.ts.map +1 -1
- package/dist/plugin/plugin.js +297 -36
- package/dist/plugin/plugin.js.map +1 -1
- package/dist/skills/frontmatter.d.ts +7 -0
- package/dist/skills/frontmatter.d.ts.map +1 -0
- package/dist/skills/frontmatter.js +17 -0
- package/dist/skills/frontmatter.js.map +1 -0
- package/dist/skills/index.d.ts +4 -0
- package/dist/skills/index.d.ts.map +1 -0
- package/dist/skills/index.js +4 -0
- package/dist/skills/index.js.map +1 -0
- package/dist/skills/loader.d.ts +20 -0
- package/dist/skills/loader.d.ts.map +1 -0
- package/dist/skills/loader.js +152 -0
- package/dist/skills/loader.js.map +1 -0
- package/dist/skills/types.d.ts +41 -0
- package/dist/skills/types.d.ts.map +1 -0
- package/dist/skills/types.js +2 -0
- package/dist/skills/types.js.map +1 -0
- package/dist/tmux/decision-engine.d.ts +24 -0
- package/dist/tmux/decision-engine.d.ts.map +1 -0
- package/dist/tmux/decision-engine.js +193 -0
- package/dist/tmux/decision-engine.js.map +1 -0
- package/dist/tmux/executor.d.ts +56 -0
- package/dist/tmux/executor.d.ts.map +1 -0
- package/dist/tmux/executor.js +231 -0
- package/dist/tmux/executor.js.map +1 -0
- package/dist/tmux/index.d.ts +7 -0
- package/dist/tmux/index.d.ts.map +1 -0
- package/dist/tmux/index.js +7 -0
- package/dist/tmux/index.js.map +1 -0
- package/dist/tmux/manager.d.ts +80 -0
- package/dist/tmux/manager.d.ts.map +1 -0
- package/dist/tmux/manager.js +276 -0
- package/dist/tmux/manager.js.map +1 -0
- package/dist/tmux/state-query.d.ts +7 -0
- package/dist/tmux/state-query.d.ts.map +1 -0
- package/dist/tmux/state-query.js +67 -0
- package/dist/tmux/state-query.js.map +1 -0
- package/dist/tmux/types.d.ts +96 -0
- package/dist/tmux/types.d.ts.map +1 -0
- package/dist/tmux/types.js +8 -0
- package/dist/tmux/types.js.map +1 -0
- package/dist/tmux/utils.d.ts +32 -0
- package/dist/tmux/utils.d.ts.map +1 -0
- package/dist/tmux/utils.js +80 -0
- package/dist/tmux/utils.js.map +1 -0
- package/dist/tools/background.d.ts +61 -0
- package/dist/tools/background.d.ts.map +1 -0
- package/dist/tools/background.js +78 -0
- package/dist/tools/background.js.map +1 -0
- package/dist/tools/delegate.d.ts +6 -0
- package/dist/tools/delegate.d.ts.map +1 -1
- package/dist/tools/delegate.js +8 -2
- package/dist/tools/delegate.js.map +1 -1
- package/dist/tools/index.d.ts +1 -0
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +1 -0
- package/dist/tools/index.js.map +1 -1
- package/dist/types.d.ts +118 -18
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +49 -7
- package/dist/types.js.map +1 -1
- package/package.json +4 -3
- package/src/agents/architect.ts +262 -0
- package/src/agents/builder.ts +44 -1
- package/src/agents/index.ts +6 -0
- package/src/agents/lead.ts +183 -19
- package/src/agents/planner.ts +161 -0
- package/src/agents/runner.ts +367 -0
- package/src/agents/types.ts +5 -1
- package/src/background/concurrency.ts +116 -0
- package/src/background/index.ts +4 -0
- package/src/background/manager.ts +478 -0
- package/src/background/types.ts +52 -0
- package/src/config/index.ts +2 -0
- package/src/config/loader.ts +128 -31
- package/src/config/presets.ts +21 -0
- package/src/config/validation.ts +70 -0
- package/src/index.ts +1 -0
- package/src/plugin/hooks/keyword.ts +3 -0
- package/src/plugin/plugin.ts +323 -42
- package/src/skills/frontmatter.ts +25 -0
- package/src/skills/index.ts +3 -0
- package/src/skills/loader.ts +185 -0
- package/src/skills/types.ts +43 -0
- package/src/tmux/decision-engine.ts +246 -0
- package/src/tmux/executor.ts +286 -0
- package/src/tmux/index.ts +11 -0
- package/src/tmux/manager.ts +331 -0
- package/src/tmux/state-query.ts +74 -0
- package/src/tmux/types.ts +106 -0
- package/src/tmux/utils.ts +85 -0
- package/src/tools/background.ts +145 -0
- package/src/tools/delegate.ts +8 -2
- package/src/tools/index.ts +9 -0
- package/src/types.ts +88 -15
package/dist/types.d.ts
CHANGED
|
@@ -1,20 +1,29 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import type { BackgroundTaskConfig } from './background/types';
|
|
3
|
+
import type { SkillsConfig } from './skills/types';
|
|
4
|
+
import type { TmuxConfig } from './tmux/types';
|
|
2
5
|
export type { Plugin, PluginInput, Hooks as PluginHooks, ToolDefinition, } from '@opencode-ai/plugin';
|
|
6
|
+
export type { BackgroundTaskConfig } from './background/types';
|
|
7
|
+
export type { SkillsConfig, LoadedSkill, SkillMetadata, SkillScope } from './skills';
|
|
8
|
+
export type { TmuxConfig } from './tmux/types';
|
|
3
9
|
export declare const AgentRoleSchema: z.ZodEnum<{
|
|
4
10
|
lead: "lead";
|
|
5
11
|
scout: "scout";
|
|
6
12
|
builder: "builder";
|
|
13
|
+
architect: "architect";
|
|
7
14
|
reviewer: "reviewer";
|
|
8
15
|
memory: "memory";
|
|
9
16
|
expert: "expert";
|
|
17
|
+
planner: "planner";
|
|
18
|
+
runner: "runner";
|
|
10
19
|
}>;
|
|
11
20
|
export type AgentRole = z.infer<typeof AgentRoleSchema>;
|
|
12
21
|
export declare const TaskStatusSchema: z.ZodEnum<{
|
|
13
22
|
pending: "pending";
|
|
14
23
|
running: "running";
|
|
15
24
|
completed: "completed";
|
|
16
|
-
failed: "failed";
|
|
17
25
|
cancelled: "cancelled";
|
|
26
|
+
failed: "failed";
|
|
18
27
|
}>;
|
|
19
28
|
export type TaskStatus = z.infer<typeof TaskStatusSchema>;
|
|
20
29
|
export declare const OrchestrationPatternSchema: z.ZodEnum<{
|
|
@@ -26,8 +35,8 @@ export type OrchestrationPattern = z.infer<typeof OrchestrationPatternSchema>;
|
|
|
26
35
|
export declare const CadenceStatusSchema: z.ZodEnum<{
|
|
27
36
|
running: "running";
|
|
28
37
|
completed: "completed";
|
|
29
|
-
failed: "failed";
|
|
30
38
|
cancelled: "cancelled";
|
|
39
|
+
failed: "failed";
|
|
31
40
|
paused: "paused";
|
|
32
41
|
}>;
|
|
33
42
|
export type CadenceStatus = z.infer<typeof CadenceStatusSchema>;
|
|
@@ -71,6 +80,10 @@ export interface AgentConfig {
|
|
|
71
80
|
temperature?: number;
|
|
72
81
|
/** Maximum agentic steps before forcing text response */
|
|
73
82
|
maxSteps?: number;
|
|
83
|
+
/** Reasoning effort for OpenAI models */
|
|
84
|
+
reasoningEffort?: ReasoningEffort;
|
|
85
|
+
/** Extended thinking configuration for Anthropic models */
|
|
86
|
+
thinking?: ThinkingConfig;
|
|
74
87
|
}
|
|
75
88
|
export interface AgentContext {
|
|
76
89
|
projectRoot: string;
|
|
@@ -90,32 +103,119 @@ export interface CoderTask {
|
|
|
90
103
|
result?: string;
|
|
91
104
|
error?: string;
|
|
92
105
|
}
|
|
106
|
+
/** Extended thinking configuration for Anthropic models */
|
|
107
|
+
export declare const ThinkingConfigSchema: z.ZodObject<{
|
|
108
|
+
type: z.ZodEnum<{
|
|
109
|
+
enabled: "enabled";
|
|
110
|
+
disabled: "disabled";
|
|
111
|
+
}>;
|
|
112
|
+
budgetTokens: z.ZodOptional<z.ZodNumber>;
|
|
113
|
+
}, z.core.$strip>;
|
|
114
|
+
export type ThinkingConfig = z.infer<typeof ThinkingConfigSchema>;
|
|
115
|
+
/** Reasoning effort for OpenAI models */
|
|
116
|
+
export declare const ReasoningEffortSchema: z.ZodEnum<{
|
|
117
|
+
low: "low";
|
|
118
|
+
medium: "medium";
|
|
119
|
+
high: "high";
|
|
120
|
+
xhigh: "xhigh";
|
|
121
|
+
}>;
|
|
122
|
+
export type ReasoningEffort = z.infer<typeof ReasoningEffortSchema>;
|
|
123
|
+
/** Model variant for Anthropic thinking levels */
|
|
124
|
+
export declare const ModelVariantSchema: z.ZodEnum<{
|
|
125
|
+
low: "low";
|
|
126
|
+
medium: "medium";
|
|
127
|
+
high: "high";
|
|
128
|
+
max: "max";
|
|
129
|
+
}>;
|
|
130
|
+
export type ModelVariant = z.infer<typeof ModelVariantSchema>;
|
|
131
|
+
/** Enhanced agent model configuration */
|
|
132
|
+
export interface AgentModelConfig {
|
|
133
|
+
/** Model ID in provider/model-id format */
|
|
134
|
+
model?: string;
|
|
135
|
+
/** Temperature for response creativity (0.0-2.0) */
|
|
136
|
+
temperature?: number;
|
|
137
|
+
/** Model variant for Anthropic thinking levels */
|
|
138
|
+
variant?: ModelVariant;
|
|
139
|
+
/** Reasoning effort for OpenAI models */
|
|
140
|
+
reasoningEffort?: ReasoningEffort;
|
|
141
|
+
/** Extended thinking configuration for Anthropic models */
|
|
142
|
+
thinking?: ThinkingConfig;
|
|
143
|
+
/** Maximum agentic steps before forcing text response */
|
|
144
|
+
maxSteps?: number;
|
|
145
|
+
}
|
|
146
|
+
export declare const AgentModelConfigSchema: z.ZodObject<{
|
|
147
|
+
model: z.ZodOptional<z.ZodString>;
|
|
148
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
149
|
+
variant: z.ZodOptional<z.ZodEnum<{
|
|
150
|
+
low: "low";
|
|
151
|
+
medium: "medium";
|
|
152
|
+
high: "high";
|
|
153
|
+
max: "max";
|
|
154
|
+
}>>;
|
|
155
|
+
reasoningEffort: z.ZodOptional<z.ZodEnum<{
|
|
156
|
+
low: "low";
|
|
157
|
+
medium: "medium";
|
|
158
|
+
high: "high";
|
|
159
|
+
xhigh: "xhigh";
|
|
160
|
+
}>>;
|
|
161
|
+
thinking: z.ZodOptional<z.ZodObject<{
|
|
162
|
+
type: z.ZodEnum<{
|
|
163
|
+
enabled: "enabled";
|
|
164
|
+
disabled: "disabled";
|
|
165
|
+
}>;
|
|
166
|
+
budgetTokens: z.ZodOptional<z.ZodNumber>;
|
|
167
|
+
}, z.core.$strip>>;
|
|
168
|
+
maxSteps: z.ZodOptional<z.ZodNumber>;
|
|
169
|
+
}, z.core.$strip>;
|
|
93
170
|
export interface CoderConfig {
|
|
94
171
|
org?: string;
|
|
95
|
-
agents?: Partial<Record<AgentRole, AgentModelConfig>>;
|
|
96
172
|
disabledMcps?: string[];
|
|
97
173
|
/** CLI command patterns to block for security (e.g., 'cloud secrets', 'auth token') */
|
|
98
174
|
blockedCommands?: string[];
|
|
175
|
+
background?: BackgroundTaskConfig;
|
|
176
|
+
skills?: SkillsConfig;
|
|
177
|
+
tmux?: TmuxConfig;
|
|
99
178
|
}
|
|
100
|
-
export
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
179
|
+
export declare const BackgroundTaskConfigSchema: z.ZodObject<{
|
|
180
|
+
enabled: z.ZodBoolean;
|
|
181
|
+
defaultConcurrency: z.ZodNumber;
|
|
182
|
+
staleTimeoutMs: z.ZodNumber;
|
|
183
|
+
providerConcurrency: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
184
|
+
modelConcurrency: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
185
|
+
}, z.core.$strip>;
|
|
186
|
+
export declare const SkillsConfigSchema: z.ZodObject<{
|
|
187
|
+
enabled: z.ZodBoolean;
|
|
188
|
+
paths: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
189
|
+
disabled: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
190
|
+
}, z.core.$strip>;
|
|
191
|
+
export declare const TmuxConfigSchema: z.ZodObject<{
|
|
192
|
+
enabled: z.ZodBoolean;
|
|
193
|
+
maxPanes: z.ZodNumber;
|
|
194
|
+
mainPaneMinWidth: z.ZodNumber;
|
|
195
|
+
agentPaneMinWidth: z.ZodNumber;
|
|
196
|
+
}, z.core.$strip>;
|
|
104
197
|
export declare const CoderConfigSchema: z.ZodObject<{
|
|
105
198
|
org: z.ZodOptional<z.ZodString>;
|
|
106
|
-
agents: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
|
|
107
|
-
lead: "lead";
|
|
108
|
-
scout: "scout";
|
|
109
|
-
builder: "builder";
|
|
110
|
-
reviewer: "reviewer";
|
|
111
|
-
memory: "memory";
|
|
112
|
-
expert: "expert";
|
|
113
|
-
}>, z.ZodObject<{
|
|
114
|
-
model: z.ZodOptional<z.ZodString>;
|
|
115
|
-
temperature: z.ZodOptional<z.ZodNumber>;
|
|
116
|
-
}, z.core.$strip>>>;
|
|
117
199
|
disabledMcps: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
118
200
|
blockedCommands: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
201
|
+
background: z.ZodOptional<z.ZodObject<{
|
|
202
|
+
enabled: z.ZodBoolean;
|
|
203
|
+
defaultConcurrency: z.ZodNumber;
|
|
204
|
+
staleTimeoutMs: z.ZodNumber;
|
|
205
|
+
providerConcurrency: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
206
|
+
modelConcurrency: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
207
|
+
}, z.core.$strip>>;
|
|
208
|
+
skills: z.ZodOptional<z.ZodObject<{
|
|
209
|
+
enabled: z.ZodBoolean;
|
|
210
|
+
paths: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
211
|
+
disabled: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
212
|
+
}, z.core.$strip>>;
|
|
213
|
+
tmux: z.ZodOptional<z.ZodObject<{
|
|
214
|
+
enabled: z.ZodBoolean;
|
|
215
|
+
maxPanes: z.ZodNumber;
|
|
216
|
+
mainPaneMinWidth: z.ZodNumber;
|
|
217
|
+
agentPaneMinWidth: z.ZodNumber;
|
|
218
|
+
}, z.core.$strip>>;
|
|
119
219
|
}, z.core.$strip>;
|
|
120
220
|
export interface McpConfig {
|
|
121
221
|
name: string;
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG/C,YAAY,EACX,MAAM,EACN,WAAW,EACX,KAAK,IAAI,WAAW,EACpB,cAAc,GACd,MAAM,qBAAqB,CAAC;AAE7B,YAAY,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACrF,YAAY,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,eAAO,MAAM,eAAe;;;;;;;;;;EAU1B,CAAC;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAExD,eAAO,MAAM,gBAAgB;;;;;;EAAqE,CAAC;AACnG,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D,eAAO,MAAM,0BAA0B;;;;EAA2C,CAAC;AACnF,MAAM,MAAM,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,OAAO,CAAC,EAAE,OAAO,CAAC;CAClB"}
|
package/dist/types.js
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export const AgentRoleSchema = z.enum([
|
|
2
|
+
export const AgentRoleSchema = z.enum([
|
|
3
|
+
'lead',
|
|
4
|
+
'scout',
|
|
5
|
+
'builder',
|
|
6
|
+
'architect',
|
|
7
|
+
'reviewer',
|
|
8
|
+
'memory',
|
|
9
|
+
'expert',
|
|
10
|
+
'planner',
|
|
11
|
+
'runner',
|
|
12
|
+
]);
|
|
3
13
|
export const TaskStatusSchema = z.enum(['pending', 'running', 'completed', 'failed', 'cancelled']);
|
|
4
14
|
export const OrchestrationPatternSchema = z.enum(['single', 'fanout', 'pipeline']);
|
|
5
15
|
export const CadenceStatusSchema = z.enum([
|
|
@@ -10,16 +20,48 @@ export const CadenceStatusSchema = z.enum([
|
|
|
10
20
|
'cancelled',
|
|
11
21
|
]);
|
|
12
22
|
export const CadenceSandboxModeSchema = z.enum(['off', 'per_iteration', 'persistent']);
|
|
23
|
+
/** Extended thinking configuration for Anthropic models */
|
|
24
|
+
export const ThinkingConfigSchema = z.object({
|
|
25
|
+
type: z.enum(['enabled', 'disabled']),
|
|
26
|
+
budgetTokens: z.number().optional(),
|
|
27
|
+
});
|
|
28
|
+
/** Reasoning effort for OpenAI models */
|
|
29
|
+
export const ReasoningEffortSchema = z.enum(['low', 'medium', 'high', 'xhigh']);
|
|
30
|
+
/** Model variant for Anthropic thinking levels */
|
|
31
|
+
export const ModelVariantSchema = z.enum(['low', 'medium', 'high', 'max']);
|
|
32
|
+
export const AgentModelConfigSchema = z.object({
|
|
33
|
+
model: z.string().optional(),
|
|
34
|
+
temperature: z.number().min(0).max(2).optional(),
|
|
35
|
+
variant: ModelVariantSchema.optional(),
|
|
36
|
+
reasoningEffort: ReasoningEffortSchema.optional(),
|
|
37
|
+
thinking: ThinkingConfigSchema.optional(),
|
|
38
|
+
maxSteps: z.number().optional(),
|
|
39
|
+
});
|
|
40
|
+
export const BackgroundTaskConfigSchema = z.object({
|
|
41
|
+
enabled: z.boolean(),
|
|
42
|
+
defaultConcurrency: z.number(),
|
|
43
|
+
staleTimeoutMs: z.number(),
|
|
44
|
+
providerConcurrency: z.record(z.string(), z.number()).optional(),
|
|
45
|
+
modelConcurrency: z.record(z.string(), z.number()).optional(),
|
|
46
|
+
});
|
|
47
|
+
export const SkillsConfigSchema = z.object({
|
|
48
|
+
enabled: z.boolean(),
|
|
49
|
+
paths: z.array(z.string()).optional(),
|
|
50
|
+
disabled: z.array(z.string()).optional(),
|
|
51
|
+
});
|
|
52
|
+
export const TmuxConfigSchema = z.object({
|
|
53
|
+
enabled: z.boolean(),
|
|
54
|
+
maxPanes: z.number(),
|
|
55
|
+
mainPaneMinWidth: z.number(),
|
|
56
|
+
agentPaneMinWidth: z.number(),
|
|
57
|
+
});
|
|
13
58
|
export const CoderConfigSchema = z.object({
|
|
14
59
|
org: z.string().optional(),
|
|
15
|
-
agents: z
|
|
16
|
-
.record(AgentRoleSchema, z.object({
|
|
17
|
-
model: z.string().optional(),
|
|
18
|
-
temperature: z.number().min(0).max(2).optional(),
|
|
19
|
-
}))
|
|
20
|
-
.optional(),
|
|
21
60
|
disabledMcps: z.array(z.string()).optional(),
|
|
22
61
|
blockedCommands: z.array(z.string()).optional(),
|
|
62
|
+
background: BackgroundTaskConfigSchema.optional(),
|
|
63
|
+
skills: SkillsConfigSchema.optional(),
|
|
64
|
+
tmux: TmuxConfigSchema.optional(),
|
|
23
65
|
});
|
|
24
66
|
// ToolDefinition is re-exported from @opencode-ai/plugin above
|
|
25
67
|
//# sourceMappingURL=types.js.map
|
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"types.js","sourceR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,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;CACxC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE;IACpB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE;IAC5B,iBAAiB,EAAE,CAAC,CAAC,MAAM,EAAE;CAC7B,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC1B,YAAY,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IAC5C,eAAe,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IAC/C,UAAU,EAAE,0BAA0B,CAAC,QAAQ,EAAE;IACjD,MAAM,EAAE,kBAAkB,CAAC,QAAQ,EAAE;IACrC,IAAI,EAAE,gBAAgB,CAAC,QAAQ,EAAE;CACjC,CAAC,CAAC;AAuBH,+DAA+D"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentuity/opencode",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.41",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"author": "Agentuity employees and contributors",
|
|
6
6
|
"description": "Agentuity Open Code plugin with specialized AI coding agents",
|
|
@@ -40,12 +40,13 @@
|
|
|
40
40
|
"prepublishOnly": "bun run clean && bun run build"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@agentuity/core": "0.1.
|
|
43
|
+
"@agentuity/core": "0.1.41",
|
|
44
44
|
"@opencode-ai/plugin": "^1.1.36",
|
|
45
|
+
"yaml": "^2.8.1",
|
|
45
46
|
"zod": "^4.3.5"
|
|
46
47
|
},
|
|
47
48
|
"devDependencies": {
|
|
48
|
-
"@agentuity/test-utils": "0.1.
|
|
49
|
+
"@agentuity/test-utils": "0.1.41",
|
|
49
50
|
"@types/bun": "latest",
|
|
50
51
|
"bun-types": "latest",
|
|
51
52
|
"typescript": "^5.9.0"
|
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
import type { AgentDefinition } from './types';
|
|
2
|
+
|
|
3
|
+
export const ARCHITECT_SYSTEM_PROMPT = `# Architect Agent
|
|
4
|
+
|
|
5
|
+
You are the Architect agent on the Agentuity Coder team. You handle complex, autonomous implementation tasks that require deep reasoning and extended execution.
|
|
6
|
+
|
|
7
|
+
**Role Metaphor**: You are a senior engineer trusted with complex, multi-step implementations. You think deeply, plan thoroughly, and execute precisely — especially for Cadence mode and long-running autonomous tasks.
|
|
8
|
+
|
|
9
|
+
## What You ARE / ARE NOT
|
|
10
|
+
|
|
11
|
+
| You ARE | You ARE NOT |
|
|
12
|
+
|---------|-------------|
|
|
13
|
+
| Senior implementer — complex autonomous tasks | Quick-fix agent — use regular Builder for that |
|
|
14
|
+
| Deep thinker — extended reasoning for hard problems | Surface-level coder — you go deep |
|
|
15
|
+
| Cadence specialist — long-running task execution | Interactive assistant — you work autonomously |
|
|
16
|
+
| Full-stack capable — end-to-end implementation | Narrow specialist — you handle complete features |
|
|
17
|
+
|
|
18
|
+
## When to Use Architect vs Builder
|
|
19
|
+
|
|
20
|
+
| Situation | Agent |
|
|
21
|
+
|-----------|-------|
|
|
22
|
+
| Quick fix, simple change | Builder |
|
|
23
|
+
| Cadence mode task | **Architect** |
|
|
24
|
+
| Complex multi-file feature | **Architect** |
|
|
25
|
+
| Autonomous long-running work | **Architect** |
|
|
26
|
+
| Interactive debugging | Builder |
|
|
27
|
+
| Deep architectural implementation | **Architect** |
|
|
28
|
+
|
|
29
|
+
## CLI & Output Accuracy (NON-NEGOTIABLE)
|
|
30
|
+
|
|
31
|
+
**Never fabricate CLI flags, URLs, or command outputs.**
|
|
32
|
+
|
|
33
|
+
1. If unsure of CLI syntax, run \`<command> --help\` first
|
|
34
|
+
2. **Never make up URLs** — when running \`bun run dev\` or \`agentuity deploy\`, read the actual output for URLs
|
|
35
|
+
3. Report only what the command actually outputs, not what you expect it to output
|
|
36
|
+
|
|
37
|
+
## Bun-First Development
|
|
38
|
+
|
|
39
|
+
**Agentuity projects are Bun-native.** Prefer Bun built-ins over external packages:
|
|
40
|
+
|
|
41
|
+
| Need | Use | NOT |
|
|
42
|
+
|------|-----|-----|
|
|
43
|
+
| Database queries | \`import { sql } from "bun"\` | pg, postgres, mysql2 |
|
|
44
|
+
| HTTP server | \`Bun.serve\` or Hono (included) | express, fastify |
|
|
45
|
+
| File operations | \`Bun.file\`, \`Bun.write\` | fs-extra |
|
|
46
|
+
| Run subprocess | \`Bun.spawn\` | child_process |
|
|
47
|
+
| Test runner | \`bun test\` | jest, vitest |
|
|
48
|
+
|
|
49
|
+
## CRITICAL: Runtime Detection (Agentuity = Bun, Always)
|
|
50
|
+
|
|
51
|
+
Before running ANY install/build/test command:
|
|
52
|
+
|
|
53
|
+
1. **Check for Agentuity project first:**
|
|
54
|
+
- If \`agentuity.json\` or \`.agentuity/\` directory exists → ALWAYS use \`bun\`
|
|
55
|
+
- Agentuity projects are bun-only. Never use npm/pnpm for Agentuity projects.
|
|
56
|
+
|
|
57
|
+
2. **For non-Agentuity projects, check lockfiles:**
|
|
58
|
+
- \`bun.lockb\` → use \`bun\`
|
|
59
|
+
- \`package-lock.json\` → use \`npm\`
|
|
60
|
+
- \`pnpm-lock.yaml\` → use \`pnpm\`
|
|
61
|
+
|
|
62
|
+
3. **Report your choice** in Build Result: "Runtime: bun (Agentuity project)"
|
|
63
|
+
|
|
64
|
+
## CRITICAL: Do NOT Guess Agentuity SDK/ctx APIs
|
|
65
|
+
|
|
66
|
+
If unsure about \`ctx.kv\`, \`ctx.vector\`, \`ctx.storage\`, or other ctx.* APIs:
|
|
67
|
+
- STOP and consult Expert or official docs before coding
|
|
68
|
+
- The correct signatures (examples):
|
|
69
|
+
- \`ctx.kv.get(namespace, key)\` → returns \`{ exists, data }\`
|
|
70
|
+
- \`ctx.kv.set(namespace, key, value, { ttl: seconds })\`
|
|
71
|
+
- \`ctx.kv.delete(namespace, key)\`
|
|
72
|
+
- Cite the source (SDK repo URL or file path) for the API shape you use
|
|
73
|
+
- **For code questions, check SDK source first:** https://github.com/agentuity/sdk/tree/main/packages/runtime/src
|
|
74
|
+
|
|
75
|
+
## Autonomous Implementation Workflow
|
|
76
|
+
|
|
77
|
+
For Cadence mode and complex tasks, follow this extended workflow:
|
|
78
|
+
|
|
79
|
+
### Phase 1: Deep Analysis
|
|
80
|
+
- Read ALL relevant files before touching anything
|
|
81
|
+
- Map out the full scope of changes needed
|
|
82
|
+
- Identify dependencies and ordering constraints
|
|
83
|
+
- Check Memory for past patterns, corrections, gotchas
|
|
84
|
+
- Think through edge cases and failure modes
|
|
85
|
+
|
|
86
|
+
### Phase 2: Comprehensive Planning
|
|
87
|
+
Before editing, document:
|
|
88
|
+
- Complete file change manifest with ordering
|
|
89
|
+
- Interface contracts between components
|
|
90
|
+
- Test strategy (unit, integration, e2e as appropriate)
|
|
91
|
+
- Rollback plan if something goes wrong
|
|
92
|
+
- Estimated phases and checkpoints
|
|
93
|
+
|
|
94
|
+
### Phase 3: Phased Implementation
|
|
95
|
+
- Implement in logical phases
|
|
96
|
+
- Complete one phase fully before moving to next
|
|
97
|
+
- Run tests after each phase
|
|
98
|
+
- Document progress for checkpoint storage
|
|
99
|
+
|
|
100
|
+
### Phase 4: Thorough Testing
|
|
101
|
+
- Delegate to Runner for lint/build/test commands (see below)
|
|
102
|
+
- Run ALL affected tests, not just new ones
|
|
103
|
+
- Test edge cases explicitly
|
|
104
|
+
- Verify integration points
|
|
105
|
+
- Document test results comprehensively
|
|
106
|
+
|
|
107
|
+
### Phase 5: Verification & Cleanup
|
|
108
|
+
- Verify all acceptance criteria met
|
|
109
|
+
- Clean up any temporary code
|
|
110
|
+
- Ensure code style consistency
|
|
111
|
+
- Prepare summary for Reviewer
|
|
112
|
+
|
|
113
|
+
## Command Execution — Delegate to Runner
|
|
114
|
+
|
|
115
|
+
For lint, build, test, typecheck, format, clean, or install commands, **delegate to Runner** instead of running them directly.
|
|
116
|
+
|
|
117
|
+
**Why delegate to Runner?**
|
|
118
|
+
- Runner returns **structured results** with errors parsed into file:line format
|
|
119
|
+
- Runner **detects the correct runtime** (bun/npm/pnpm/yarn/go/cargo)
|
|
120
|
+
- Runner **deduplicates errors** and shows top 10 issues
|
|
121
|
+
- Keeps your context lean — no raw command output bloat
|
|
122
|
+
|
|
123
|
+
**How to delegate:**
|
|
124
|
+
|
|
125
|
+
> @Agentuity Coder Runner
|
|
126
|
+
> Run build and report any errors.
|
|
127
|
+
|
|
128
|
+
> @Agentuity Coder Runner
|
|
129
|
+
> Run all tests and report results.
|
|
130
|
+
|
|
131
|
+
**What Runner returns:**
|
|
132
|
+
\`\`\`markdown
|
|
133
|
+
## Test Result: ✅ PASSED
|
|
134
|
+
|
|
135
|
+
**Runtime:** bun (Agentuity project)
|
|
136
|
+
**Command:** \`bun test\`
|
|
137
|
+
|
|
138
|
+
### Summary
|
|
139
|
+
All 42 tests passed across 8 test files.
|
|
140
|
+
\`\`\`
|
|
141
|
+
|
|
142
|
+
**When to run commands directly (exceptions):**
|
|
143
|
+
- Quick one-off commands during debugging
|
|
144
|
+
- Commands that need interactive input
|
|
145
|
+
- When Runner is unavailable
|
|
146
|
+
|
|
147
|
+
## Cadence Mode Specifics
|
|
148
|
+
|
|
149
|
+
When working in Cadence mode:
|
|
150
|
+
|
|
151
|
+
1. **Checkpoint frequently** — Store progress after each significant milestone
|
|
152
|
+
2. **Be self-sufficient** — Don't wait for guidance on implementation details
|
|
153
|
+
3. **Handle failures gracefully** — If something fails, try alternate approaches before escalating
|
|
154
|
+
4. **Document decisions** — Leave clear trail of what you did and why
|
|
155
|
+
5. **Think ahead** — Anticipate next steps and prepare for them
|
|
156
|
+
|
|
157
|
+
## Sandbox Usage for Complex Work
|
|
158
|
+
|
|
159
|
+
For complex implementations, prefer sandboxes:
|
|
160
|
+
|
|
161
|
+
\`\`\`bash
|
|
162
|
+
# Create sandbox for isolated development
|
|
163
|
+
agentuity cloud sandbox create --json \\
|
|
164
|
+
--runtime bun:1 --memory 2Gi \\
|
|
165
|
+
--name architect-task --description "Complex implementation task"
|
|
166
|
+
|
|
167
|
+
# Copy code and work
|
|
168
|
+
agentuity cloud sandbox cp -r ./src sbx_xxx:/home/agentuity/src
|
|
169
|
+
agentuity cloud sandbox exec sbx_xxx -- bun install
|
|
170
|
+
agentuity cloud sandbox exec sbx_xxx -- bun test
|
|
171
|
+
|
|
172
|
+
# For network access (when needed)
|
|
173
|
+
agentuity cloud sandbox create --json --runtime bun:1 --network
|
|
174
|
+
\`\`\`
|
|
175
|
+
|
|
176
|
+
## Collaboration Rules
|
|
177
|
+
|
|
178
|
+
| Situation | Action |
|
|
179
|
+
|-----------|--------|
|
|
180
|
+
| Blocked on unclear requirements | Ask Lead via checkpoint |
|
|
181
|
+
| Need architectural guidance | Consult Planner agent |
|
|
182
|
+
| Cloud service setup needed | Ask Expert agent |
|
|
183
|
+
| Past implementation exists | Consult Memory agent |
|
|
184
|
+
| Implementation complete | Request Reviewer |
|
|
185
|
+
|
|
186
|
+
## Output Format
|
|
187
|
+
|
|
188
|
+
Use this Markdown structure for build results:
|
|
189
|
+
|
|
190
|
+
\`\`\`markdown
|
|
191
|
+
# Architect Result
|
|
192
|
+
|
|
193
|
+
## Summary
|
|
194
|
+
|
|
195
|
+
[High-level summary of what was accomplished]
|
|
196
|
+
|
|
197
|
+
## Phases Completed
|
|
198
|
+
|
|
199
|
+
### Phase 1: [Name]
|
|
200
|
+
- Changes: [list]
|
|
201
|
+
- Tests: ✅/❌
|
|
202
|
+
- Checkpoint: [stored/not needed]
|
|
203
|
+
|
|
204
|
+
### Phase 2: [Name]
|
|
205
|
+
...
|
|
206
|
+
|
|
207
|
+
## Changes
|
|
208
|
+
|
|
209
|
+
| File | Summary | Lines |
|
|
210
|
+
|------|---------|-------|
|
|
211
|
+
| \`src/foo.ts\` | Added X to support Y | 15-45 |
|
|
212
|
+
|
|
213
|
+
## Tests
|
|
214
|
+
|
|
215
|
+
- **Command:** \`bun test\`
|
|
216
|
+
- **Result:** ✅ Pass / ❌ Fail
|
|
217
|
+
- **Coverage:** [if applicable]
|
|
218
|
+
|
|
219
|
+
## Verification
|
|
220
|
+
|
|
221
|
+
- [ ] All acceptance criteria met
|
|
222
|
+
- [ ] Tests passing
|
|
223
|
+
- [ ] Code style consistent
|
|
224
|
+
- [ ] No regressions
|
|
225
|
+
|
|
226
|
+
## Next Steps
|
|
227
|
+
|
|
228
|
+
[What should happen next, or "Ready for review"]
|
|
229
|
+
\`\`\`
|
|
230
|
+
|
|
231
|
+
## Cloud Service Callouts
|
|
232
|
+
|
|
233
|
+
When using Agentuity cloud services, format them as callout blocks:
|
|
234
|
+
|
|
235
|
+
\`\`\`markdown
|
|
236
|
+
> 🏖️ **Agentuity Sandbox**
|
|
237
|
+
> \`\`\`bash
|
|
238
|
+
> agentuity cloud sandbox run -- bun test
|
|
239
|
+
> \`\`\`
|
|
240
|
+
> Tests passed in isolated environment
|
|
241
|
+
\`\`\`
|
|
242
|
+
|
|
243
|
+
Service icons:
|
|
244
|
+
- 🗄️ KV Storage
|
|
245
|
+
- 📦 Object Storage
|
|
246
|
+
- 🔍 Vector Search
|
|
247
|
+
- 🏖️ Sandbox
|
|
248
|
+
- 🐘 Postgres
|
|
249
|
+
- 🔐 SSH
|
|
250
|
+
`;
|
|
251
|
+
|
|
252
|
+
export const architectAgent: AgentDefinition = {
|
|
253
|
+
role: 'architect',
|
|
254
|
+
id: 'ag-architect',
|
|
255
|
+
displayName: 'Agentuity Coder Architect',
|
|
256
|
+
description:
|
|
257
|
+
'Senior implementer for complex autonomous tasks - Cadence mode, deep reasoning, extended execution',
|
|
258
|
+
defaultModel: 'openai/gpt-5.2-codex',
|
|
259
|
+
systemPrompt: ARCHITECT_SYSTEM_PROMPT,
|
|
260
|
+
reasoningEffort: 'xhigh', // Maximum reasoning for complex tasks
|
|
261
|
+
temperature: 0.1, // Deterministic - precise code generation
|
|
262
|
+
};
|
package/src/agents/builder.ts
CHANGED
|
@@ -98,7 +98,7 @@ Before editing, list:
|
|
|
98
98
|
- Use LSP tools for safe refactoring
|
|
99
99
|
|
|
100
100
|
### Phase 4: Test
|
|
101
|
-
-
|
|
101
|
+
- Delegate to Runner for lint/build/test commands (see below)
|
|
102
102
|
- Verify your changes don't break existing functionality
|
|
103
103
|
- If tests fail, fix them or explain the blocker
|
|
104
104
|
|
|
@@ -108,6 +108,49 @@ Before editing, list:
|
|
|
108
108
|
- Artifacts created with storage paths
|
|
109
109
|
- Risks or concerns identified
|
|
110
110
|
|
|
111
|
+
## Command Execution — Delegate to Runner
|
|
112
|
+
|
|
113
|
+
For lint, build, test, typecheck, format, clean, or install commands, **delegate to Runner** instead of running them directly.
|
|
114
|
+
|
|
115
|
+
**Why delegate to Runner?**
|
|
116
|
+
- Runner returns **structured results** with errors parsed into file:line format
|
|
117
|
+
- Runner **detects the correct runtime** (bun/npm/pnpm/yarn/go/cargo)
|
|
118
|
+
- Runner **deduplicates errors** and shows top 10 issues
|
|
119
|
+
- Keeps your context lean — no raw command output bloat
|
|
120
|
+
|
|
121
|
+
**How to delegate:**
|
|
122
|
+
|
|
123
|
+
> @Agentuity Coder Runner
|
|
124
|
+
> Run build and report any errors.
|
|
125
|
+
|
|
126
|
+
> @Agentuity Coder Runner
|
|
127
|
+
> Run tests for the changes I just made.
|
|
128
|
+
|
|
129
|
+
> @Agentuity Coder Runner
|
|
130
|
+
> Run typecheck to verify types are correct.
|
|
131
|
+
|
|
132
|
+
**What Runner returns:**
|
|
133
|
+
\`\`\`markdown
|
|
134
|
+
## Build Result: ❌ FAILED
|
|
135
|
+
|
|
136
|
+
**Runtime:** bun
|
|
137
|
+
**Command:** \`bun run build\`
|
|
138
|
+
|
|
139
|
+
### Errors (2)
|
|
140
|
+
|
|
141
|
+
| File | Line | Type | Message |
|
|
142
|
+
|------|------|------|---------|
|
|
143
|
+
| \`src/foo.ts\` | 45 | Type | Property 'x' does not exist |
|
|
144
|
+
|
|
145
|
+
### Summary
|
|
146
|
+
Build failed with 2 type errors.
|
|
147
|
+
\`\`\`
|
|
148
|
+
|
|
149
|
+
**When to run commands directly (exceptions):**
|
|
150
|
+
- Quick one-off commands during debugging
|
|
151
|
+
- Commands that need interactive input
|
|
152
|
+
- When Runner is unavailable
|
|
153
|
+
|
|
111
154
|
## Anti-Pattern Catalog
|
|
112
155
|
|
|
113
156
|
| Anti-Pattern | Example | Correct Approach |
|
package/src/agents/index.ts
CHANGED
|
@@ -3,9 +3,12 @@ import type { AgentDefinition, AgentRegistry } from './types';
|
|
|
3
3
|
import { leadAgent } from './lead';
|
|
4
4
|
import { scoutAgent } from './scout';
|
|
5
5
|
import { builderAgent } from './builder';
|
|
6
|
+
import { architectAgent } from './architect';
|
|
6
7
|
import { reviewerAgent } from './reviewer';
|
|
7
8
|
import { memoryAgent } from './memory';
|
|
8
9
|
import { expertAgent } from './expert';
|
|
10
|
+
import { plannerAgent } from './planner';
|
|
11
|
+
import { runnerAgent } from './runner';
|
|
9
12
|
|
|
10
13
|
export type { AgentDefinition, AgentRegistry } from './types';
|
|
11
14
|
|
|
@@ -13,9 +16,12 @@ export const agents: Record<AgentRole, AgentDefinition> = {
|
|
|
13
16
|
lead: leadAgent,
|
|
14
17
|
scout: scoutAgent,
|
|
15
18
|
builder: builderAgent,
|
|
19
|
+
architect: architectAgent,
|
|
16
20
|
reviewer: reviewerAgent,
|
|
17
21
|
memory: memoryAgent,
|
|
18
22
|
expert: expertAgent,
|
|
23
|
+
planner: plannerAgent,
|
|
24
|
+
runner: runnerAgent,
|
|
19
25
|
};
|
|
20
26
|
|
|
21
27
|
export function getAgent(role: AgentRole): AgentDefinition {
|