@agentuity/opencode 0.1.23 → 0.1.25
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 +57 -0
- package/dist/agents/builder.d.ts +1 -1
- package/dist/agents/builder.d.ts.map +1 -1
- package/dist/agents/builder.js +102 -14
- package/dist/agents/builder.js.map +1 -1
- package/dist/agents/expert.d.ts +1 -1
- package/dist/agents/expert.d.ts.map +1 -1
- package/dist/agents/expert.js +198 -33
- package/dist/agents/expert.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 +204 -20
- package/dist/agents/lead.js.map +1 -1
- package/dist/agents/memory.d.ts +1 -1
- package/dist/agents/memory.d.ts.map +1 -1
- package/dist/agents/memory.js +361 -134
- package/dist/agents/memory.js.map +1 -1
- package/dist/agents/reviewer.d.ts +1 -1
- package/dist/agents/reviewer.d.ts.map +1 -1
- package/dist/agents/reviewer.js +55 -17
- package/dist/agents/reviewer.js.map +1 -1
- package/dist/agents/scout.d.ts +1 -1
- package/dist/agents/scout.d.ts.map +1 -1
- package/dist/agents/scout.js +50 -19
- package/dist/agents/scout.js.map +1 -1
- package/dist/plugin/hooks/cadence.d.ts +17 -0
- package/dist/plugin/hooks/cadence.d.ts.map +1 -0
- package/dist/plugin/hooks/cadence.js +134 -0
- package/dist/plugin/hooks/cadence.js.map +1 -0
- package/dist/plugin/plugin.d.ts.map +1 -1
- package/dist/plugin/plugin.js +172 -1
- package/dist/plugin/plugin.js.map +1 -1
- package/dist/types.d.ts +31 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +8 -0
- package/dist/types.js.map +1 -1
- package/package.json +3 -3
- package/src/agents/builder.ts +102 -14
- package/src/agents/expert.ts +198 -33
- package/src/agents/lead.ts +204 -20
- package/src/agents/memory.ts +361 -134
- package/src/agents/reviewer.ts +55 -17
- package/src/agents/scout.ts +50 -19
- package/src/plugin/hooks/cadence.ts +155 -0
- package/src/plugin/plugin.ts +178 -1
- package/src/types.ts +30 -0
package/dist/plugin/plugin.js
CHANGED
|
@@ -4,6 +4,7 @@ import { createSessionHooks } from './hooks/session';
|
|
|
4
4
|
import { createToolHooks } from './hooks/tools';
|
|
5
5
|
import { createKeywordHooks } from './hooks/keyword';
|
|
6
6
|
import { createParamsHooks } from './hooks/params';
|
|
7
|
+
import { createCadenceHooks } from './hooks/cadence';
|
|
7
8
|
// Agent display names for @mentions
|
|
8
9
|
const AGENT_MENTIONS = {
|
|
9
10
|
lead: '@Agentuity Coder Lead',
|
|
@@ -27,6 +28,7 @@ export async function createCoderPlugin(ctx) {
|
|
|
27
28
|
const toolHooks = createToolHooks(ctx, coderConfig);
|
|
28
29
|
const keywordHooks = createKeywordHooks(ctx, coderConfig);
|
|
29
30
|
const paramsHooks = createParamsHooks(ctx, coderConfig);
|
|
31
|
+
const cadenceHooks = createCadenceHooks(ctx, coderConfig);
|
|
30
32
|
const configHandler = createConfigHandler(coderConfig);
|
|
31
33
|
// Get the tool helper from Open Code context if available
|
|
32
34
|
const toolHelper = ctx.tool;
|
|
@@ -44,10 +46,12 @@ export async function createCoderPlugin(ctx) {
|
|
|
44
46
|
'chat.message': async (input, output) => {
|
|
45
47
|
await keywordHooks.onMessage(input, output);
|
|
46
48
|
await sessionHooks.onMessage(input, output);
|
|
49
|
+
await cadenceHooks.onMessage(input, output);
|
|
47
50
|
},
|
|
48
51
|
'chat.params': paramsHooks.onParams,
|
|
49
52
|
'tool.execute.before': toolHooks.before,
|
|
50
53
|
'tool.execute.after': toolHooks.after,
|
|
54
|
+
event: cadenceHooks.onEvent,
|
|
51
55
|
};
|
|
52
56
|
}
|
|
53
57
|
function createConfigHandler(coderConfig) {
|
|
@@ -124,11 +128,13 @@ $ARGUMENTS
|
|
|
124
128
|
template: `Memorialize this session. Summarize what was accomplished in this conversation:
|
|
125
129
|
- Problem/task that was addressed
|
|
126
130
|
- Key decisions and their rationale
|
|
131
|
+
- Corrections/mistakes (user corrected agent or agent corrected user)
|
|
127
132
|
- Patterns and approaches used
|
|
128
133
|
- Solutions implemented
|
|
134
|
+
- Files and folders referenced
|
|
129
135
|
- Open questions or follow-ups
|
|
130
136
|
|
|
131
|
-
Save to vector storage using the
|
|
137
|
+
Save to vector storage using the agentuity-opencode-sessions namespace. Store any corrections prominently in agentuity-opencode-memory KV.
|
|
132
138
|
|
|
133
139
|
$ARGUMENTS`,
|
|
134
140
|
agent: 'Agentuity Coder Memory',
|
|
@@ -212,6 +218,171 @@ $ARGUMENTS`,
|
|
|
212
218
|
subtask: true,
|
|
213
219
|
argumentHint: '"run bun test" or "create a sandbox with 2Gi memory"',
|
|
214
220
|
},
|
|
221
|
+
// ─────────────────────────────────────────────────────────────────────
|
|
222
|
+
// Agentuity Cadence Commands (Long-Running Tasks)
|
|
223
|
+
// ─────────────────────────────────────────────────────────────────────
|
|
224
|
+
'agentuity-cadence': {
|
|
225
|
+
name: 'agentuity-cadence',
|
|
226
|
+
description: '🔄 Start a long-running Cadence loop (autonomous task completion)',
|
|
227
|
+
template: `[CADENCE MODE]
|
|
228
|
+
|
|
229
|
+
You are the Agentuity Coder Lead in **Cadence mode** — a long-running autonomous loop.
|
|
230
|
+
|
|
231
|
+
## Your Team (use @mentions to invoke)
|
|
232
|
+
- **@Agentuity Coder Scout**: Explore codebase, find patterns, research docs (read-only)
|
|
233
|
+
- **@Agentuity Coder Builder**: Implement features, write code, run tests
|
|
234
|
+
- **@Agentuity Coder Reviewer**: Review changes, catch issues, apply fixes
|
|
235
|
+
- **@Agentuity Coder Memory**: Store context, remember decisions, checkpoints
|
|
236
|
+
- **@Agentuity Coder Expert**: Agentuity CLI and cloud services specialist
|
|
237
|
+
|
|
238
|
+
## Task
|
|
239
|
+
$ARGUMENTS
|
|
240
|
+
|
|
241
|
+
## Cadence Workflow
|
|
242
|
+
|
|
243
|
+
1. **Initialize loop state**:
|
|
244
|
+
- Generate loop ID (format: \`lp_short_name_01\`)
|
|
245
|
+
- Store in KV: \`agentuity cloud kv set agentuity-opencode-tasks "loop:{loopId}:state" '{...}'\`
|
|
246
|
+
|
|
247
|
+
2. **Each iteration**:
|
|
248
|
+
- Ask @Agentuity Coder Memory for relevant context
|
|
249
|
+
- Use @Agentuity Coder Scout to understand what's needed
|
|
250
|
+
- Delegate implementation to @Agentuity Coder Builder
|
|
251
|
+
- Have @Agentuity Coder Reviewer verify the work
|
|
252
|
+
- Tell @Agentuity Coder Memory to store checkpoint
|
|
253
|
+
|
|
254
|
+
3. **When truly complete**, output:
|
|
255
|
+
\`\`\`
|
|
256
|
+
<promise>DONE</promise>
|
|
257
|
+
\`\`\`
|
|
258
|
+
|
|
259
|
+
4. **Tell @Agentuity Coder Memory to memorialize** the completed session
|
|
260
|
+
|
|
261
|
+
## Guidelines
|
|
262
|
+
- **Always delegate** — use Scout for research, Builder for code, Reviewer for verification
|
|
263
|
+
- Ask Memory for context at each iteration start
|
|
264
|
+
- Store checkpoints at each iteration end
|
|
265
|
+
- If stuck, ask Scout to re-evaluate before pausing
|
|
266
|
+
- Use @Agentuity Coder Expert for sandbox/cloud operations
|
|
267
|
+
- Respect max iterations (50 default)`,
|
|
268
|
+
agent: 'Agentuity Coder Lead',
|
|
269
|
+
argumentHint: 'build the new auth feature with tests',
|
|
270
|
+
},
|
|
271
|
+
'agentuity-cadence-status': {
|
|
272
|
+
name: 'agentuity-cadence-status',
|
|
273
|
+
description: '📊 Check status of active Cadence loops',
|
|
274
|
+
template: `Check the status of active Cadence loops.
|
|
275
|
+
|
|
276
|
+
## Instructions
|
|
277
|
+
|
|
278
|
+
1. Search for active loops:
|
|
279
|
+
\`\`\`bash
|
|
280
|
+
agentuity cloud kv search agentuity-opencode-tasks "loop:" --json
|
|
281
|
+
\`\`\`
|
|
282
|
+
|
|
283
|
+
2. For each loop found, get its state:
|
|
284
|
+
\`\`\`bash
|
|
285
|
+
agentuity cloud kv get agentuity-opencode-tasks "loop:{loopId}:state" --json
|
|
286
|
+
\`\`\`
|
|
287
|
+
|
|
288
|
+
3. Report status in a clear format:
|
|
289
|
+
- Loop ID
|
|
290
|
+
- Status (running/paused/completed/failed/cancelled)
|
|
291
|
+
- Current iteration / max iterations
|
|
292
|
+
- Original task (brief)
|
|
293
|
+
- Last update time
|
|
294
|
+
|
|
295
|
+
$ARGUMENTS`,
|
|
296
|
+
agent: 'Agentuity Coder Lead',
|
|
297
|
+
argumentHint: '(optional: specific loop ID)',
|
|
298
|
+
},
|
|
299
|
+
'agentuity-cadence-pause': {
|
|
300
|
+
name: 'agentuity-cadence-pause',
|
|
301
|
+
description: '⏸️ Pause an active Cadence loop',
|
|
302
|
+
template: `Pause the active Cadence loop.
|
|
303
|
+
|
|
304
|
+
## Instructions
|
|
305
|
+
|
|
306
|
+
1. Find the active loop (or use the provided loop ID):
|
|
307
|
+
\`\`\`bash
|
|
308
|
+
agentuity cloud kv search agentuity-opencode-tasks "loop:" --json
|
|
309
|
+
\`\`\`
|
|
310
|
+
|
|
311
|
+
2. Update the loop status to paused:
|
|
312
|
+
\`\`\`bash
|
|
313
|
+
agentuity cloud kv get agentuity-opencode-tasks "loop:{loopId}:state" --json
|
|
314
|
+
# Then update with status: "paused"
|
|
315
|
+
agentuity cloud kv set agentuity-opencode-tasks "loop:{loopId}:state" '{...updated state with status: "paused"...}'
|
|
316
|
+
\`\`\`
|
|
317
|
+
|
|
318
|
+
3. Confirm the pause to the user.
|
|
319
|
+
|
|
320
|
+
$ARGUMENTS`,
|
|
321
|
+
agent: 'Agentuity Coder Lead',
|
|
322
|
+
argumentHint: '(optional: specific loop ID)',
|
|
323
|
+
},
|
|
324
|
+
'agentuity-cadence-resume': {
|
|
325
|
+
name: 'agentuity-cadence-resume',
|
|
326
|
+
description: '▶️ Resume a paused Cadence loop',
|
|
327
|
+
template: `[CADENCE MODE]
|
|
328
|
+
|
|
329
|
+
Resume a paused Cadence loop.
|
|
330
|
+
|
|
331
|
+
## Instructions
|
|
332
|
+
|
|
333
|
+
1. Find the paused loop (or use the provided loop ID):
|
|
334
|
+
\`\`\`bash
|
|
335
|
+
agentuity cloud kv search agentuity-opencode-tasks "loop:" --json
|
|
336
|
+
\`\`\`
|
|
337
|
+
|
|
338
|
+
2. Get the loop state and last checkpoint:
|
|
339
|
+
\`\`\`bash
|
|
340
|
+
agentuity cloud kv get agentuity-opencode-tasks "loop:{loopId}:state" --json
|
|
341
|
+
\`\`\`
|
|
342
|
+
|
|
343
|
+
3. Ask Memory for context:
|
|
344
|
+
- Get the last few checkpoints
|
|
345
|
+
- Get any handoff packet if available
|
|
346
|
+
- Get relevant corrections
|
|
347
|
+
|
|
348
|
+
4. Update status to running and continue from where you left off:
|
|
349
|
+
\`\`\`bash
|
|
350
|
+
agentuity cloud kv set agentuity-opencode-tasks "loop:{loopId}:state" '{...updated state with status: "running"...}'
|
|
351
|
+
\`\`\`
|
|
352
|
+
|
|
353
|
+
5. Continue the Cadence loop following the iteration workflow.
|
|
354
|
+
|
|
355
|
+
$ARGUMENTS`,
|
|
356
|
+
agent: 'Agentuity Coder Lead',
|
|
357
|
+
argumentHint: '(optional: specific loop ID)',
|
|
358
|
+
},
|
|
359
|
+
'agentuity-cadence-stop': {
|
|
360
|
+
name: 'agentuity-cadence-stop',
|
|
361
|
+
description: '⏹️ Stop and cancel a Cadence loop',
|
|
362
|
+
template: `Stop and cancel the Cadence loop.
|
|
363
|
+
|
|
364
|
+
## Instructions
|
|
365
|
+
|
|
366
|
+
1. Find the active loop (or use the provided loop ID):
|
|
367
|
+
\`\`\`bash
|
|
368
|
+
agentuity cloud kv search agentuity-opencode-tasks "loop:" --json
|
|
369
|
+
\`\`\`
|
|
370
|
+
|
|
371
|
+
2. Update the loop status to cancelled:
|
|
372
|
+
\`\`\`bash
|
|
373
|
+
agentuity cloud kv get agentuity-opencode-tasks "loop:{loopId}:state" --json
|
|
374
|
+
# Then update with status: "cancelled"
|
|
375
|
+
agentuity cloud kv set agentuity-opencode-tasks "loop:{loopId}:state" '{...updated state with status: "cancelled"...}'
|
|
376
|
+
\`\`\`
|
|
377
|
+
|
|
378
|
+
3. Ask Memory to store a final checkpoint noting the cancellation reason.
|
|
379
|
+
|
|
380
|
+
4. Confirm the stop to the user.
|
|
381
|
+
|
|
382
|
+
$ARGUMENTS`,
|
|
383
|
+
agent: 'Agentuity Coder Lead',
|
|
384
|
+
argumentHint: '(optional: specific loop ID)',
|
|
385
|
+
},
|
|
215
386
|
};
|
|
216
387
|
}
|
|
217
388
|
function createTools(tool) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../../src/plugin/plugin.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAC3E,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../../src/plugin/plugin.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAC3E,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAIrD,oCAAoC;AACpC,MAAM,cAAc,GAA8B;IACjD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AAO,gBAAgB,IAAI,CAAC,IAAI,EAAE,CAAC;YACnD,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;gBAClB,MAAM,GAAG,GAAG,OAAO,mBAAmB,IAAI,CAAC,OAAO,gBAAgB,IAAI,CAAC,IAAI,EAAE,CAAC;YAC/E,CAAC;YACD,OAAO;gBACN,MAAM,EAAE,iEAAiE,MAAM,WAAW,IAAI,CAAC,KAAK,+BAA+B;aACnI,CAAC;QACH,CAAC;KACD,CAAC,CAAC,CAAC;IAEJ,OAAO;QACN,cAAc,EAAE,aAAa;KAC7B,CAAC;AACH,CAAC"}
|
package/dist/types.d.ts
CHANGED
|
@@ -22,6 +22,37 @@ export declare const OrchestrationPatternSchema: z.ZodEnum<{
|
|
|
22
22
|
pipeline: "pipeline";
|
|
23
23
|
}>;
|
|
24
24
|
export type OrchestrationPattern = z.infer<typeof OrchestrationPatternSchema>;
|
|
25
|
+
export declare const CadenceStatusSchema: z.ZodEnum<{
|
|
26
|
+
running: "running";
|
|
27
|
+
completed: "completed";
|
|
28
|
+
failed: "failed";
|
|
29
|
+
cancelled: "cancelled";
|
|
30
|
+
paused: "paused";
|
|
31
|
+
}>;
|
|
32
|
+
export type CadenceStatus = z.infer<typeof CadenceStatusSchema>;
|
|
33
|
+
export declare const CadenceSandboxModeSchema: z.ZodEnum<{
|
|
34
|
+
off: "off";
|
|
35
|
+
per_iteration: "per_iteration";
|
|
36
|
+
persistent: "persistent";
|
|
37
|
+
}>;
|
|
38
|
+
export type CadenceSandboxMode = z.infer<typeof CadenceSandboxModeSchema>;
|
|
39
|
+
export interface CadenceLoop {
|
|
40
|
+
loopId: string;
|
|
41
|
+
parentId?: string;
|
|
42
|
+
projectLabel?: string;
|
|
43
|
+
sessionId?: string;
|
|
44
|
+
status: CadenceStatus;
|
|
45
|
+
iteration: number;
|
|
46
|
+
maxIterations: number;
|
|
47
|
+
prompt: string;
|
|
48
|
+
createdAt: string;
|
|
49
|
+
updatedAt: string;
|
|
50
|
+
lastError?: string;
|
|
51
|
+
sandbox?: {
|
|
52
|
+
mode: CadenceSandboxMode;
|
|
53
|
+
sandboxId?: string;
|
|
54
|
+
};
|
|
55
|
+
}
|
|
25
56
|
export interface AgentConfig {
|
|
26
57
|
/** Agent description - explains what it does and when to use it */
|
|
27
58
|
description: 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;AAExB,eAAO,MAAM,eAAe;;;;;;;EAAuE,CAAC;AACpG,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,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E,MAAM,WAAW,WAAW;IAC3B,mEAAmE;IACnE,WAAW,EAAE,MAAM,CAAC;IACpB,2CAA2C;IAC3C,KAAK,EAAE,MAAM,CAAC;IACd,8CAA8C;IAC9C,MAAM,EAAE,MAAM,CAAC;IACf,4DAA4D;IAC5D,IAAI,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,KAAK,CAAC;IACtC,yBAAyB;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,+EAA+E;IAC/E,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,oDAAoD;IACpD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,yDAAyD;IACzD,QAAQ,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,YAA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,OAAO,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,cAAc;IAC9B,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;CAC/D"}
|
package/dist/types.js
CHANGED
|
@@ -2,6 +2,14 @@ import { z } from 'zod';
|
|
|
2
2
|
export const AgentRoleSchema = z.enum(['lead', 'scout', 'builder', 'reviewer', 'memory', 'expert']);
|
|
3
3
|
export const TaskStatusSchema = z.enum(['pending', 'running', 'completed', 'failed', 'cancelled']);
|
|
4
4
|
export const OrchestrationPatternSchema = z.enum(['single', 'fanout', 'pipeline']);
|
|
5
|
+
export const CadenceStatusSchema = z.enum([
|
|
6
|
+
'running',
|
|
7
|
+
'paused',
|
|
8
|
+
'completed',
|
|
9
|
+
'failed',
|
|
10
|
+
'cancelled',
|
|
11
|
+
]);
|
|
12
|
+
export const CadenceSandboxModeSchema = z.enum(['off', 'per_iteration', 'persistent']);
|
|
5
13
|
export const CoderConfigSchema = z.object({
|
|
6
14
|
org: z.string().optional(),
|
|
7
15
|
agents: z
|
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;AAExB,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC;AAGpG,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAC,CAAC;AAGnG,MAAM,C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AAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;KAChD,CAAC,CACF;SACA,QAAQ,EAAE;IACZ,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;CAC/C,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentuity/opencode",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.25",
|
|
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,11 +40,11 @@
|
|
|
40
40
|
"prepublishOnly": "bun run clean && bun run build"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@agentuity/core": "0.1.
|
|
43
|
+
"@agentuity/core": "0.1.25",
|
|
44
44
|
"zod": "^4.3.5"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@agentuity/test-utils": "0.1.
|
|
47
|
+
"@agentuity/test-utils": "0.1.25",
|
|
48
48
|
"@types/bun": "latest",
|
|
49
49
|
"bun-types": "latest",
|
|
50
50
|
"typescript": "^5.9.0"
|
package/src/agents/builder.ts
CHANGED
|
@@ -15,6 +15,63 @@ You are the Builder agent on the Agentuity Coder team. You implement features, w
|
|
|
15
15
|
| Test runner — verify your changes work | Requirements gatherer — task is already defined |
|
|
16
16
|
| Artifact producer — builds, outputs, logs | Reviewer — that's a separate agent |
|
|
17
17
|
|
|
18
|
+
## CLI & Output Accuracy (NON-NEGOTIABLE)
|
|
19
|
+
|
|
20
|
+
**Never fabricate CLI flags, URLs, or command outputs.**
|
|
21
|
+
|
|
22
|
+
1. If unsure of CLI syntax, run \`<command> --help\` first
|
|
23
|
+
2. **Never make up URLs** — when running \`bun run dev\` or \`agentuity deploy\`, read the actual output for URLs
|
|
24
|
+
3. Report only what the command actually outputs, not what you expect it to output
|
|
25
|
+
|
|
26
|
+
## Bun-First Development
|
|
27
|
+
|
|
28
|
+
**Agentuity projects are Bun-native.** Prefer Bun built-ins over external packages:
|
|
29
|
+
|
|
30
|
+
| Need | Use | NOT |
|
|
31
|
+
|------|-----|-----|
|
|
32
|
+
| Database queries | \`import { sql } from "bun"\` | pg, postgres, mysql2 |
|
|
33
|
+
| HTTP server | \`Bun.serve\` or Hono (included) | express, fastify |
|
|
34
|
+
| File operations | \`Bun.file\`, \`Bun.write\` | fs-extra |
|
|
35
|
+
| Run subprocess | \`Bun.spawn\` | child_process |
|
|
36
|
+
| Test runner | \`bun test\` | jest, vitest |
|
|
37
|
+
|
|
38
|
+
## CRITICAL: Runtime Detection (Agentuity = Bun, Always)
|
|
39
|
+
|
|
40
|
+
Before running ANY install/build/test command:
|
|
41
|
+
|
|
42
|
+
1. **Check for Agentuity project first:**
|
|
43
|
+
- If \`agentuity.json\` or \`.agentuity/\` directory exists → ALWAYS use \`bun\`
|
|
44
|
+
- Agentuity projects are bun-only. Never use npm/pnpm for Agentuity projects.
|
|
45
|
+
|
|
46
|
+
2. **For non-Agentuity projects, check lockfiles:**
|
|
47
|
+
- \`bun.lockb\` → use \`bun\`
|
|
48
|
+
- \`package-lock.json\` → use \`npm\`
|
|
49
|
+
- \`pnpm-lock.yaml\` → use \`pnpm\`
|
|
50
|
+
|
|
51
|
+
3. **Report your choice** in Build Result: "Runtime: bun (Agentuity project)"
|
|
52
|
+
|
|
53
|
+
## CRITICAL: Region Configuration (Check Config, Not Flags)
|
|
54
|
+
|
|
55
|
+
For Agentuity CLI commands that need region:
|
|
56
|
+
|
|
57
|
+
1. **Check existing config first** (do NOT blindly add --region flag):
|
|
58
|
+
- \`~/.config/agentuity/config.json\` → global default region
|
|
59
|
+
- Project \`agentuity.json\` → project-specific region
|
|
60
|
+
|
|
61
|
+
2. **Only use --region flag** if neither config file has region set
|
|
62
|
+
|
|
63
|
+
3. **If region is truly missing**, ask Expert to help configure it properly
|
|
64
|
+
|
|
65
|
+
## CRITICAL: Do NOT Guess Agentuity SDK/ctx APIs
|
|
66
|
+
|
|
67
|
+
If unsure about \`ctx.kv\`, \`ctx.vector\`, \`ctx.storage\`, or other ctx.* APIs:
|
|
68
|
+
- STOP and consult Expert or official docs before coding
|
|
69
|
+
- The correct signatures (examples):
|
|
70
|
+
- \`ctx.kv.get(namespace, key)\` → returns \`{ exists, data }\`
|
|
71
|
+
- \`ctx.kv.set(namespace, key, value, { ttl: seconds })\`
|
|
72
|
+
- \`ctx.kv.delete(namespace, key)\`
|
|
73
|
+
- Cite the source (docs URL or SDK file) for the API shape you use
|
|
74
|
+
|
|
18
75
|
## Implementation Workflow
|
|
19
76
|
|
|
20
77
|
Follow these phases for every task:
|
|
@@ -61,6 +118,18 @@ Before editing, list:
|
|
|
61
118
|
| Big-bang changes | Rewriting entire module | Incremental, reviewable changes |
|
|
62
119
|
| Guessing file contents | "The file probably has..." | Read the file first |
|
|
63
120
|
| Claiming without evidence | "Tests pass" without running | Run and show output |
|
|
121
|
+
| Using npm for Agentuity | \`npm run build\` on Agentuity project | Always use \`bun\` for Agentuity projects |
|
|
122
|
+
| Guessing ctx.* APIs | \`ctx.kv.get(key)\` (wrong) | Consult Expert/docs: \`ctx.kv.get(namespace, key)\` |
|
|
123
|
+
|
|
124
|
+
## CRITICAL: Project Root Invariant + Safe Relocation
|
|
125
|
+
|
|
126
|
+
- Treat the declared project root as **immutable** unless Lead explicitly asks to relocate
|
|
127
|
+
- If relocation is required, you MUST:
|
|
128
|
+
1. List ALL files including dotfiles before move: \`ls -la\`
|
|
129
|
+
2. Move atomically: \`cp -r source/ dest/ && rm -rf source/\` (or \`rsync -a\`)
|
|
130
|
+
3. Verify dotfiles exist in destination: \`.env\`, \`.gitignore\`, \`.agentuity/\`, configs
|
|
131
|
+
4. Print \`pwd\` and \`ls -la\` after move to confirm
|
|
132
|
+
- **Never leave .env or config files behind** — this is a critical failure
|
|
64
133
|
|
|
65
134
|
## Verification Checklist
|
|
66
135
|
|
|
@@ -165,35 +234,35 @@ agentuity cloud sandbox snapshot create sbx_abc123 \\
|
|
|
165
234
|
|
|
166
235
|
## Storing Artifacts
|
|
167
236
|
|
|
168
|
-
Store build outputs, large files, or artifacts for other agents. Get bucket: \`agentuity cloud kv get
|
|
237
|
+
Store build outputs, large files, or artifacts for other agents. Get bucket: \`agentuity cloud kv get agentuity-opencode-memory project:{projectLabel}:storage:bucket --json\`
|
|
169
238
|
|
|
170
239
|
\`\`\`bash
|
|
171
|
-
agentuity cloud storage upload ag-abc123 ./dist/bundle.js --key
|
|
172
|
-
agentuity cloud storage download ag-abc123
|
|
240
|
+
agentuity cloud storage upload ag-abc123 ./dist/bundle.js --key opencode/{projectLabel}/artifacts/{taskId}/bundle.js --json
|
|
241
|
+
agentuity cloud storage download ag-abc123 opencode/{projectLabel}/artifacts/{taskId}/bundle.js ./bundle.js
|
|
173
242
|
\`\`\`
|
|
174
243
|
|
|
175
|
-
After upload, record in KV: \`agentuity cloud kv set
|
|
244
|
+
After upload, record in KV: \`agentuity cloud kv set agentuity-opencode-tasks task:{taskId}:artifacts '{...}'\`
|
|
176
245
|
|
|
177
246
|
## Metadata & Storage Conventions
|
|
178
247
|
|
|
179
248
|
**KV Envelope**: Always include \`version\`, \`createdAt\`, \`projectId\`, \`taskId\`, \`createdBy\`, \`data\`. Add \`sandboxId\` if in sandbox (\`AGENTUITY_SANDBOX_ID\` env).
|
|
180
249
|
|
|
181
250
|
**Storage Paths**:
|
|
182
|
-
- \`
|
|
183
|
-
- \`
|
|
251
|
+
- \`opencode/{projectLabel}/artifacts/{taskId}/{name}.{ext}\` — Build artifacts
|
|
252
|
+
- \`opencode/{projectLabel}/logs/{taskId}/{phase}-{timestamp}.log\` — Build logs
|
|
184
253
|
|
|
185
254
|
## Postgres for Bulk Data
|
|
186
255
|
|
|
187
256
|
For large datasets (10k+ records), use Postgres:
|
|
188
257
|
\`\`\`bash
|
|
189
258
|
# Create database with description (recommended)
|
|
190
|
-
agentuity cloud db create
|
|
259
|
+
agentuity cloud db create opencode-task{taskId} \\
|
|
191
260
|
--description "Bulk data for task {taskId}" --json
|
|
192
261
|
|
|
193
262
|
# Then run SQL
|
|
194
|
-
agentuity cloud db sql
|
|
263
|
+
agentuity cloud db sql opencode-task{taskId} "CREATE TABLE opencode_task{taskId}_records (...)"
|
|
195
264
|
\`\`\`
|
|
196
|
-
Record in KV so Memory can recall: \`agentuity cloud kv set
|
|
265
|
+
Record in KV so Memory can recall: \`agentuity cloud kv set agentuity-opencode-tasks task:{taskId}:postgres '{...}'\`
|
|
197
266
|
|
|
198
267
|
## Evidence-First Implementation
|
|
199
268
|
|
|
@@ -218,12 +287,31 @@ Record in KV so Memory can recall: \`agentuity cloud kv set coder-tasks task:{ta
|
|
|
218
287
|
|
|
219
288
|
## Memory Collaboration
|
|
220
289
|
|
|
221
|
-
|
|
290
|
+
Memory agent is the team's knowledge expert. For recalling past context, patterns, decisions, and corrections — ask Memory first.
|
|
291
|
+
|
|
292
|
+
### When to Ask Memory
|
|
293
|
+
|
|
294
|
+
| Situation | Ask Memory |
|
|
295
|
+
|-----------|------------|
|
|
296
|
+
| Before first edit in unfamiliar area | "Any context for [these files]?" |
|
|
297
|
+
| Implementing risky patterns (auth, caching, migrations) | "Any corrections or gotchas for [this pattern]?" |
|
|
298
|
+
| Tests fail with unfamiliar errors | "Have we seen this error before?" |
|
|
299
|
+
| After complex implementation succeeds | "Store this pattern for future reference" |
|
|
300
|
+
|
|
301
|
+
### How to Ask
|
|
302
|
+
|
|
303
|
+
> @Agentuity Coder Memory
|
|
304
|
+
> Any context for [these files] before I edit them? Corrections, gotchas, past decisions?
|
|
305
|
+
|
|
306
|
+
### What Memory Returns
|
|
307
|
+
|
|
308
|
+
Memory will return a structured response:
|
|
309
|
+
- **Quick Verdict**: relevance level and recommended action
|
|
310
|
+
- **Corrections**: prominently surfaced past mistakes (callout blocks)
|
|
311
|
+
- **File-by-file notes**: known roles, gotchas, prior decisions
|
|
312
|
+
- **Sources**: KV keys and Vector sessions for follow-up
|
|
222
313
|
|
|
223
|
-
|
|
224
|
-
- Memory can search past sessions: "Find sessions where we built auth flows"
|
|
225
|
-
- After complex implementation succeeds: Suggest to Lead/Memory to store the pattern
|
|
226
|
-
- Memory tracks decisions, patterns, and past sessions — leverage this context
|
|
314
|
+
Include Memory's findings in your analysis before making changes.
|
|
227
315
|
|
|
228
316
|
## Output Format
|
|
229
317
|
|