opencode-swarm-plugin 0.39.1 → 0.40.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.hive/issues.jsonl +16 -0
- package/CHANGELOG.md +52 -0
- package/bin/swarm.test.ts +406 -0
- package/bin/swarm.ts +303 -0
- package/dist/compaction-hook.d.ts +8 -1
- package/dist/compaction-hook.d.ts.map +1 -1
- package/dist/compaction-observability.d.ts +173 -0
- package/dist/compaction-observability.d.ts.map +1 -0
- package/dist/eval-capture.d.ts +93 -0
- package/dist/eval-capture.d.ts.map +1 -1
- package/dist/hive.d.ts.map +1 -1
- package/dist/index.d.ts +36 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15670 -580
- package/dist/plugin.js +15623 -557
- package/dist/schemas/task.d.ts +3 -3
- package/evals/README.md +113 -0
- package/evals/scorers/coordinator-discipline.evalite-test.ts +163 -0
- package/evals/scorers/coordinator-discipline.ts +335 -2
- package/evals/scorers/index.test.ts +146 -0
- package/evals/scorers/index.ts +104 -0
- package/evals/swarm-decomposition.eval.ts +9 -2
- package/examples/commands/swarm.md +291 -21
- package/package.json +1 -1
- package/src/compaction-hook.ts +258 -110
- package/src/compaction-observability.integration.test.ts +139 -0
- package/src/compaction-observability.test.ts +187 -0
- package/src/compaction-observability.ts +324 -0
- package/src/eval-capture.test.ts +204 -1
- package/src/eval-capture.ts +194 -2
- package/src/eval-runner.test.ts +96 -0
- package/src/eval-runner.ts +356 -0
- package/src/hive.ts +34 -0
- package/src/index.ts +54 -1
- package/src/memory.test.ts +110 -0
- package/src/memory.ts +34 -0
- package/dist/beads.d.ts +0 -386
- package/dist/beads.d.ts.map +0 -1
- package/dist/schemas/bead-events.d.ts +0 -698
- package/dist/schemas/bead-events.d.ts.map +0 -1
- package/dist/schemas/bead.d.ts +0 -255
- package/dist/schemas/bead.d.ts.map +0 -1
package/dist/schemas/bead.d.ts
DELETED
|
@@ -1,255 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Bead schemas for type-safe beads operations
|
|
3
|
-
*
|
|
4
|
-
* These schemas validate all data from the `bd` CLI to ensure
|
|
5
|
-
* type safety and catch malformed responses early.
|
|
6
|
-
*/
|
|
7
|
-
import { z } from "zod";
|
|
8
|
-
/** Valid bead statuses */
|
|
9
|
-
export declare const BeadStatusSchema: z.ZodEnum<{
|
|
10
|
-
open: "open";
|
|
11
|
-
in_progress: "in_progress";
|
|
12
|
-
blocked: "blocked";
|
|
13
|
-
closed: "closed";
|
|
14
|
-
}>;
|
|
15
|
-
export type BeadStatus = z.infer<typeof BeadStatusSchema>;
|
|
16
|
-
/** Valid bead types */
|
|
17
|
-
export declare const BeadTypeSchema: z.ZodEnum<{
|
|
18
|
-
bug: "bug";
|
|
19
|
-
feature: "feature";
|
|
20
|
-
task: "task";
|
|
21
|
-
epic: "epic";
|
|
22
|
-
chore: "chore";
|
|
23
|
-
}>;
|
|
24
|
-
export type BeadType = z.infer<typeof BeadTypeSchema>;
|
|
25
|
-
/** Dependency relationship between beads */
|
|
26
|
-
export declare const BeadDependencySchema: z.ZodObject<{
|
|
27
|
-
id: z.ZodString;
|
|
28
|
-
type: z.ZodEnum<{
|
|
29
|
-
blocks: "blocks";
|
|
30
|
-
"blocked-by": "blocked-by";
|
|
31
|
-
related: "related";
|
|
32
|
-
"discovered-from": "discovered-from";
|
|
33
|
-
}>;
|
|
34
|
-
}, z.core.$strip>;
|
|
35
|
-
export type BeadDependency = z.infer<typeof BeadDependencySchema>;
|
|
36
|
-
/**
|
|
37
|
-
* Core bead schema - validates bd CLI JSON output
|
|
38
|
-
*
|
|
39
|
-
* ID format:
|
|
40
|
-
* - Standard: `{project}-{hash}` (e.g., `opencode-swarm-plugin-1i8`)
|
|
41
|
-
* - Subtask: `{project}-{hash}.{index}` (e.g., `opencode-swarm-plugin-1i8.1`)
|
|
42
|
-
* - Custom: `{project}-{custom-id}` (e.g., `migrate-egghead-phase-0`)
|
|
43
|
-
* - Custom subtask: `{project}-{custom-id}.{suffix}` (e.g., `migrate-egghead-phase-0.e2e-test`)
|
|
44
|
-
*/
|
|
45
|
-
export declare const BeadSchema: z.ZodObject<{
|
|
46
|
-
id: z.ZodString;
|
|
47
|
-
title: z.ZodString;
|
|
48
|
-
description: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
49
|
-
status: z.ZodDefault<z.ZodEnum<{
|
|
50
|
-
open: "open";
|
|
51
|
-
in_progress: "in_progress";
|
|
52
|
-
blocked: "blocked";
|
|
53
|
-
closed: "closed";
|
|
54
|
-
}>>;
|
|
55
|
-
priority: z.ZodDefault<z.ZodNumber>;
|
|
56
|
-
issue_type: z.ZodDefault<z.ZodEnum<{
|
|
57
|
-
bug: "bug";
|
|
58
|
-
feature: "feature";
|
|
59
|
-
task: "task";
|
|
60
|
-
epic: "epic";
|
|
61
|
-
chore: "chore";
|
|
62
|
-
}>>;
|
|
63
|
-
created_at: z.ZodString;
|
|
64
|
-
updated_at: z.ZodOptional<z.ZodString>;
|
|
65
|
-
closed_at: z.ZodOptional<z.ZodString>;
|
|
66
|
-
parent_id: z.ZodOptional<z.ZodString>;
|
|
67
|
-
dependencies: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
68
|
-
id: z.ZodString;
|
|
69
|
-
type: z.ZodEnum<{
|
|
70
|
-
blocks: "blocks";
|
|
71
|
-
"blocked-by": "blocked-by";
|
|
72
|
-
related: "related";
|
|
73
|
-
"discovered-from": "discovered-from";
|
|
74
|
-
}>;
|
|
75
|
-
}, z.core.$strip>>>;
|
|
76
|
-
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
77
|
-
}, z.core.$strip>;
|
|
78
|
-
export type Bead = z.infer<typeof BeadSchema>;
|
|
79
|
-
/** Arguments for creating a bead */
|
|
80
|
-
export declare const BeadCreateArgsSchema: z.ZodObject<{
|
|
81
|
-
title: z.ZodString;
|
|
82
|
-
type: z.ZodDefault<z.ZodEnum<{
|
|
83
|
-
bug: "bug";
|
|
84
|
-
feature: "feature";
|
|
85
|
-
task: "task";
|
|
86
|
-
epic: "epic";
|
|
87
|
-
chore: "chore";
|
|
88
|
-
}>>;
|
|
89
|
-
priority: z.ZodDefault<z.ZodNumber>;
|
|
90
|
-
description: z.ZodOptional<z.ZodString>;
|
|
91
|
-
parent_id: z.ZodOptional<z.ZodString>;
|
|
92
|
-
id: z.ZodOptional<z.ZodString>;
|
|
93
|
-
}, z.core.$strip>;
|
|
94
|
-
export type BeadCreateArgs = z.infer<typeof BeadCreateArgsSchema>;
|
|
95
|
-
/** Arguments for updating a bead */
|
|
96
|
-
export declare const BeadUpdateArgsSchema: z.ZodObject<{
|
|
97
|
-
id: z.ZodString;
|
|
98
|
-
status: z.ZodOptional<z.ZodEnum<{
|
|
99
|
-
open: "open";
|
|
100
|
-
in_progress: "in_progress";
|
|
101
|
-
blocked: "blocked";
|
|
102
|
-
closed: "closed";
|
|
103
|
-
}>>;
|
|
104
|
-
description: z.ZodOptional<z.ZodString>;
|
|
105
|
-
priority: z.ZodOptional<z.ZodNumber>;
|
|
106
|
-
}, z.core.$strip>;
|
|
107
|
-
export type BeadUpdateArgs = z.infer<typeof BeadUpdateArgsSchema>;
|
|
108
|
-
/** Arguments for closing a bead */
|
|
109
|
-
export declare const BeadCloseArgsSchema: z.ZodObject<{
|
|
110
|
-
id: z.ZodString;
|
|
111
|
-
reason: z.ZodString;
|
|
112
|
-
}, z.core.$strip>;
|
|
113
|
-
export type BeadCloseArgs = z.infer<typeof BeadCloseArgsSchema>;
|
|
114
|
-
/** Arguments for querying beads */
|
|
115
|
-
export declare const BeadQueryArgsSchema: z.ZodObject<{
|
|
116
|
-
status: z.ZodOptional<z.ZodEnum<{
|
|
117
|
-
open: "open";
|
|
118
|
-
in_progress: "in_progress";
|
|
119
|
-
blocked: "blocked";
|
|
120
|
-
closed: "closed";
|
|
121
|
-
}>>;
|
|
122
|
-
type: z.ZodOptional<z.ZodEnum<{
|
|
123
|
-
bug: "bug";
|
|
124
|
-
feature: "feature";
|
|
125
|
-
task: "task";
|
|
126
|
-
epic: "epic";
|
|
127
|
-
chore: "chore";
|
|
128
|
-
}>>;
|
|
129
|
-
ready: z.ZodOptional<z.ZodBoolean>;
|
|
130
|
-
limit: z.ZodDefault<z.ZodNumber>;
|
|
131
|
-
}, z.core.$strip>;
|
|
132
|
-
export type BeadQueryArgs = z.infer<typeof BeadQueryArgsSchema>;
|
|
133
|
-
/**
|
|
134
|
-
* Subtask specification for epic decomposition
|
|
135
|
-
*
|
|
136
|
-
* Used when creating an epic with subtasks in one operation.
|
|
137
|
-
* The `files` array is used for Agent Mail file reservations.
|
|
138
|
-
*/
|
|
139
|
-
export declare const SubtaskSpecSchema: z.ZodObject<{
|
|
140
|
-
title: z.ZodString;
|
|
141
|
-
description: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
142
|
-
files: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
143
|
-
dependencies: z.ZodDefault<z.ZodArray<z.ZodNumber>>;
|
|
144
|
-
estimated_complexity: z.ZodDefault<z.ZodNumber>;
|
|
145
|
-
}, z.core.$strip>;
|
|
146
|
-
export type SubtaskSpec = z.infer<typeof SubtaskSpecSchema>;
|
|
147
|
-
/**
|
|
148
|
-
* Bead tree for swarm decomposition
|
|
149
|
-
*
|
|
150
|
-
* Represents an epic with its subtasks, ready for spawning agents.
|
|
151
|
-
*/
|
|
152
|
-
export declare const BeadTreeSchema: z.ZodObject<{
|
|
153
|
-
epic: z.ZodObject<{
|
|
154
|
-
title: z.ZodString;
|
|
155
|
-
description: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
156
|
-
}, z.core.$strip>;
|
|
157
|
-
subtasks: z.ZodArray<z.ZodObject<{
|
|
158
|
-
title: z.ZodString;
|
|
159
|
-
description: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
160
|
-
files: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
161
|
-
dependencies: z.ZodDefault<z.ZodArray<z.ZodNumber>>;
|
|
162
|
-
estimated_complexity: z.ZodDefault<z.ZodNumber>;
|
|
163
|
-
}, z.core.$strip>>;
|
|
164
|
-
}, z.core.$strip>;
|
|
165
|
-
export type BeadTree = z.infer<typeof BeadTreeSchema>;
|
|
166
|
-
/** Arguments for creating an epic with subtasks */
|
|
167
|
-
export declare const EpicCreateArgsSchema: z.ZodObject<{
|
|
168
|
-
epic_title: z.ZodString;
|
|
169
|
-
epic_description: z.ZodOptional<z.ZodString>;
|
|
170
|
-
epic_id: z.ZodOptional<z.ZodString>;
|
|
171
|
-
subtasks: z.ZodArray<z.ZodObject<{
|
|
172
|
-
title: z.ZodString;
|
|
173
|
-
priority: z.ZodDefault<z.ZodNumber>;
|
|
174
|
-
files: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
175
|
-
id_suffix: z.ZodOptional<z.ZodString>;
|
|
176
|
-
}, z.core.$strip>>;
|
|
177
|
-
}, z.core.$strip>;
|
|
178
|
-
export type EpicCreateArgs = z.infer<typeof EpicCreateArgsSchema>;
|
|
179
|
-
/**
|
|
180
|
-
* Result of epic creation
|
|
181
|
-
*
|
|
182
|
-
* Contains the created epic and all subtasks with their IDs.
|
|
183
|
-
*/
|
|
184
|
-
export declare const EpicCreateResultSchema: z.ZodObject<{
|
|
185
|
-
success: z.ZodBoolean;
|
|
186
|
-
epic: z.ZodObject<{
|
|
187
|
-
id: z.ZodString;
|
|
188
|
-
title: z.ZodString;
|
|
189
|
-
description: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
190
|
-
status: z.ZodDefault<z.ZodEnum<{
|
|
191
|
-
open: "open";
|
|
192
|
-
in_progress: "in_progress";
|
|
193
|
-
blocked: "blocked";
|
|
194
|
-
closed: "closed";
|
|
195
|
-
}>>;
|
|
196
|
-
priority: z.ZodDefault<z.ZodNumber>;
|
|
197
|
-
issue_type: z.ZodDefault<z.ZodEnum<{
|
|
198
|
-
bug: "bug";
|
|
199
|
-
feature: "feature";
|
|
200
|
-
task: "task";
|
|
201
|
-
epic: "epic";
|
|
202
|
-
chore: "chore";
|
|
203
|
-
}>>;
|
|
204
|
-
created_at: z.ZodString;
|
|
205
|
-
updated_at: z.ZodOptional<z.ZodString>;
|
|
206
|
-
closed_at: z.ZodOptional<z.ZodString>;
|
|
207
|
-
parent_id: z.ZodOptional<z.ZodString>;
|
|
208
|
-
dependencies: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
209
|
-
id: z.ZodString;
|
|
210
|
-
type: z.ZodEnum<{
|
|
211
|
-
blocks: "blocks";
|
|
212
|
-
"blocked-by": "blocked-by";
|
|
213
|
-
related: "related";
|
|
214
|
-
"discovered-from": "discovered-from";
|
|
215
|
-
}>;
|
|
216
|
-
}, z.core.$strip>>>;
|
|
217
|
-
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
218
|
-
}, z.core.$strip>;
|
|
219
|
-
subtasks: z.ZodArray<z.ZodObject<{
|
|
220
|
-
id: z.ZodString;
|
|
221
|
-
title: z.ZodString;
|
|
222
|
-
description: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
223
|
-
status: z.ZodDefault<z.ZodEnum<{
|
|
224
|
-
open: "open";
|
|
225
|
-
in_progress: "in_progress";
|
|
226
|
-
blocked: "blocked";
|
|
227
|
-
closed: "closed";
|
|
228
|
-
}>>;
|
|
229
|
-
priority: z.ZodDefault<z.ZodNumber>;
|
|
230
|
-
issue_type: z.ZodDefault<z.ZodEnum<{
|
|
231
|
-
bug: "bug";
|
|
232
|
-
feature: "feature";
|
|
233
|
-
task: "task";
|
|
234
|
-
epic: "epic";
|
|
235
|
-
chore: "chore";
|
|
236
|
-
}>>;
|
|
237
|
-
created_at: z.ZodString;
|
|
238
|
-
updated_at: z.ZodOptional<z.ZodString>;
|
|
239
|
-
closed_at: z.ZodOptional<z.ZodString>;
|
|
240
|
-
parent_id: z.ZodOptional<z.ZodString>;
|
|
241
|
-
dependencies: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
242
|
-
id: z.ZodString;
|
|
243
|
-
type: z.ZodEnum<{
|
|
244
|
-
blocks: "blocks";
|
|
245
|
-
"blocked-by": "blocked-by";
|
|
246
|
-
related: "related";
|
|
247
|
-
"discovered-from": "discovered-from";
|
|
248
|
-
}>;
|
|
249
|
-
}, z.core.$strip>>>;
|
|
250
|
-
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
251
|
-
}, z.core.$strip>>;
|
|
252
|
-
rollback_hint: z.ZodOptional<z.ZodString>;
|
|
253
|
-
}, z.core.$strip>;
|
|
254
|
-
export type EpicCreateResult = z.infer<typeof EpicCreateResultSchema>;
|
|
255
|
-
//# sourceMappingURL=bead.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bead.d.ts","sourceRoot":"","sources":["../../src/schemas/bead.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,0BAA0B;AAC1B,eAAO,MAAM,gBAAgB;;;;;EAK3B,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D,uBAAuB;AACvB,eAAO,MAAM,cAAc;;;;;;EAMzB,CAAC;AACH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAEtD,4CAA4C;AAC5C,eAAO,MAAM,oBAAoB;;;;;;;;iBAG/B,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE;;;;;;;;GAQG;AACH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAsCrB,CAAC;AACH,MAAM,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAA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