opencode-swarm 4.5.0 → 5.0.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/README.md CHANGED
@@ -1,9 +1,9 @@
1
1
  <p align="center">
2
- <img src="https://img.shields.io/badge/version-4.5.0-blue" alt="Version">
2
+ <img src="https://img.shields.io/badge/version-5.0.0-blue" alt="Version">
3
3
  <img src="https://img.shields.io/badge/license-MIT-green" alt="License">
4
4
  <img src="https://img.shields.io/badge/opencode-plugin-purple" alt="OpenCode Plugin">
5
5
  <img src="https://img.shields.io/badge/agents-8-orange" alt="Agents">
6
- <img src="https://img.shields.io/badge/tests-622-brightgreen" alt="Tests">
6
+ <img src="https://img.shields.io/badge/tests-876-brightgreen" alt="Tests">
7
7
  </p>
8
8
 
9
9
  <h1 align="center">🐝 OpenCode Swarm</h1>
@@ -168,8 +168,11 @@ Other frameworks lose everything when the session ends. Swarm doesn't.
168
168
 
169
169
  ```
170
170
  .swarm/
171
- ├── plan.md # Your project roadmap
171
+ ├── plan.md # Your project roadmap (+ plan.json)
172
172
  ├── context.md # Everything a new Architect needs
173
+ ├── evidence/ # Per-task execution evidence
174
+ │ ├── 1.1/ # Evidence for task 1.1
175
+ │ └── 2.3/ # Evidence for task 2.3
173
176
  └── history/
174
177
  ├── phase-1.md # What was done, what was learned
175
178
  └── phase-2.md
@@ -331,6 +334,21 @@ bunx opencode-swarm uninstall --clean
331
334
 
332
335
  ## What's New
333
336
 
337
+ ### v5.0.0 — Verifiable Execution
338
+ - **Canonical plan schema** — Machine-readable `plan.json` with Zod-validated `PlanSchema`/`TaskSchema`/`PhaseSchema`. Automatic migration from legacy `plan.md` format. Structured status tracking (`pending`, `in_progress`, `completed`, `blocked`).
339
+ - **Evidence bundles** — Per-task execution evidence persisted to `.swarm/evidence/`. Five evidence types: `review`, `test`, `diff`, `approval`, `note`. Sanitized task IDs, atomic writes, configurable size limits. `/swarm evidence` to view, `/swarm archive` to manage retention.
340
+ - **Per-agent guardrail profiles** — Override guardrail limits for individual agents via `guardrails.profiles`. `resolveGuardrailsConfig()` merges base + profile with per-agent specificity.
341
+ - **Context injection budget** — `max_injection_tokens` config controls how much context is injected into system prompts. Priority-ordered: phase → task → decisions → agent context. Lower-priority items dropped when budget exhausted.
342
+ - **Enhanced `/swarm agents`** — Agent count summary, `⚡ custom limits` indicator for profiled agents, guardrail profiles section.
343
+ - **Packaging smoke tests** — CI-safe `dist/` validation (8 tests).
344
+ - **208 new tests** — 876 total tests across 39 files (up from 668 in v4.6.0).
345
+
346
+ ### v4.6.0 — Agent Guardrails
347
+ - **Circuit breaker** — Two-layer protection against runaway agents. Soft warning at 50% of limits, hard block at 100%. Prevents infinite loops and runaway API costs.
348
+ - **Detection signals** — Tool call count, wall-clock time, consecutive repetition, and consecutive error tracking per agent session.
349
+ - **Configurable limits** — All thresholds tunable via `guardrails` config: `max_tool_calls`, `max_duration_minutes`, `max_repetitions`, `max_consecutive_errors`, `warning_threshold`.
350
+ - **46 new tests** — 668 total tests across 30 files.
351
+
334
352
  ### v4.5.0 — Tech Debt + New Commands
335
353
  - **Lint cleanup** — Replaced string concatenation with template literals, documented `as any` casts with biome-ignore comments.
336
354
  - **Code deduplication** — Extracted `stripSwarmPrefix()` utility to eliminate 3 duplicate prefix-stripping blocks.
@@ -402,6 +420,8 @@ All features are opt-in via configuration. See [Installation Guide](docs/install
402
420
  | `/swarm diagnose` | Health check for .swarm/ files and config |
403
421
  | `/swarm export` | Export plan and context as portable JSON |
404
422
  | `/swarm reset --confirm` | Clear swarm state files (with safety gate) |
423
+ | `/swarm evidence [task]` | View evidence bundles for a task or all tasks |
424
+ | `/swarm archive [--dry-run]` | Archive old evidence bundles with retention policy |
405
425
 
406
426
  ---
407
427
 
@@ -433,6 +453,73 @@ Create `~/.config/opencode/opencode-swarm.json`:
433
453
 
434
454
  ---
435
455
 
456
+ ## Guardrails
457
+
458
+ OpenCode Swarm includes a built-in circuit breaker that prevents subagents from running away — burning API credits in infinite loops, repeating the same tool call, or spinning for hours.
459
+
460
+ ### How It Works
461
+
462
+ | Layer | Trigger | Action |
463
+ |-------|---------|--------|
464
+ | ⚠️ **Soft Warning** | 50% of any limit reached | Injects warning message into agent's chat stream |
465
+ | 🛑 **Hard Block** | 100% of any limit reached | Blocks ALL further tool calls + injects stop message |
466
+
467
+ ### Detection Signals
468
+
469
+ | Signal | Default Limit | Description |
470
+ |--------|---------------|-------------|
471
+ | Tool calls | 200 | Total tool invocations per agent session |
472
+ | Duration | 30 min | Wall-clock time since delegation started |
473
+ | Repetition | 10 | Same tool + args called consecutively |
474
+ | Consecutive errors | 5 | Sequential null/undefined tool outputs |
475
+
476
+ ### Configuration
477
+
478
+ Guardrails are **enabled by default**. Customize in your swarm config:
479
+
480
+ ```jsonc
481
+ {
482
+ "guardrails": {
483
+ "enabled": true, // default: true
484
+ "max_tool_calls": 200, // range: 10–1000
485
+ "max_duration_minutes": 30, // range: 1–120
486
+ "max_repetitions": 10, // range: 3–50
487
+ "max_consecutive_errors": 5, // range: 2–20
488
+ "warning_threshold": 0.5 // range: 0.1–0.9 (fraction of limit for soft warning)
489
+ }
490
+ }
491
+ ```
492
+
493
+ ### Per-Agent Profiles
494
+
495
+ Override limits for specific agents that need more (or less) room:
496
+
497
+ ```jsonc
498
+ {
499
+ "guardrails": {
500
+ "max_tool_calls": 200,
501
+ "profiles": {
502
+ "coder": { "max_tool_calls": 500, "max_duration_minutes": 60 },
503
+ "explorer": { "max_tool_calls": 50 }
504
+ }
505
+ }
506
+ }
507
+ ```
508
+
509
+ Profiles merge with base config — only specified fields are overridden.
510
+
511
+ ### Disable Guardrails
512
+
513
+ ```json
514
+ {
515
+ "guardrails": {
516
+ "enabled": false
517
+ }
518
+ }
519
+ ```
520
+
521
+ ---
522
+
436
523
  ## Comparison
437
524
 
438
525
  | Feature | OpenCode Swarm | AutoGen | CrewAI | LangGraph |
@@ -473,7 +560,7 @@ bun test
473
560
  bun test tests/unit/config/schema.test.ts
474
561
  ```
475
562
 
476
- 622 unit tests across 29 files covering config, tools, agents, hooks, commands, and state. Uses Bun's built-in test runner — zero additional test dependencies.
563
+ 876 unit tests across 39 files covering config, tools, agents, hooks, commands, state, guardrails, evidence, and plan schemas. Uses Bun's built-in test runner — zero additional test dependencies.
477
564
 
478
565
  ## Troubleshooting
479
566
 
@@ -1,2 +1,3 @@
1
1
  import type { AgentDefinition } from '../agents';
2
- export declare function handleAgentsCommand(agents: Record<string, AgentDefinition>): string;
2
+ import type { GuardrailsConfig } from '../config/schema';
3
+ export declare function handleAgentsCommand(agents: Record<string, AgentDefinition>, guardrails?: GuardrailsConfig): string;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Handles the /swarm archive command.
3
+ * Archives old evidence bundles based on retention policy.
4
+ */
5
+ export declare function handleArchiveCommand(directory: string, args: string[]): Promise<string>;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Handles the /swarm evidence command.
3
+ * Lists all evidence bundles or shows details for a specific task.
4
+ */
5
+ export declare function handleEvidenceCommand(directory: string, args: string[]): Promise<string>;
@@ -1,7 +1,9 @@
1
1
  import type { AgentDefinition } from '../agents';
2
2
  export { handleAgentsCommand } from './agents';
3
+ export { handleArchiveCommand } from './archive';
3
4
  export { handleConfigCommand } from './config';
4
5
  export { handleDiagnoseCommand } from './diagnose';
6
+ export { handleEvidenceCommand } from './evidence';
5
7
  export { handleExportCommand } from './export';
6
8
  export { handleHistoryCommand } from './history';
7
9
  export { handlePlanCommand } from './plan';
@@ -0,0 +1,353 @@
1
+ import { z } from 'zod';
2
+ export declare const EVIDENCE_MAX_JSON_BYTES: number;
3
+ export declare const EVIDENCE_MAX_PATCH_BYTES: number;
4
+ export declare const EVIDENCE_MAX_TASK_BYTES: number;
5
+ export declare const EvidenceTypeSchema: z.ZodEnum<{
6
+ review: "review";
7
+ test: "test";
8
+ diff: "diff";
9
+ approval: "approval";
10
+ note: "note";
11
+ }>;
12
+ export type EvidenceType = z.infer<typeof EvidenceTypeSchema>;
13
+ export declare const EvidenceVerdictSchema: z.ZodEnum<{
14
+ pass: "pass";
15
+ fail: "fail";
16
+ approved: "approved";
17
+ rejected: "rejected";
18
+ info: "info";
19
+ }>;
20
+ export type EvidenceVerdict = z.infer<typeof EvidenceVerdictSchema>;
21
+ export declare const BaseEvidenceSchema: z.ZodObject<{
22
+ task_id: z.ZodString;
23
+ type: z.ZodEnum<{
24
+ review: "review";
25
+ test: "test";
26
+ diff: "diff";
27
+ approval: "approval";
28
+ note: "note";
29
+ }>;
30
+ timestamp: z.ZodString;
31
+ agent: z.ZodString;
32
+ verdict: z.ZodEnum<{
33
+ pass: "pass";
34
+ fail: "fail";
35
+ approved: "approved";
36
+ rejected: "rejected";
37
+ info: "info";
38
+ }>;
39
+ summary: z.ZodString;
40
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
41
+ }, z.core.$strip>;
42
+ export type BaseEvidence = z.infer<typeof BaseEvidenceSchema>;
43
+ export declare const ReviewEvidenceSchema: z.ZodObject<{
44
+ task_id: z.ZodString;
45
+ timestamp: z.ZodString;
46
+ agent: z.ZodString;
47
+ verdict: z.ZodEnum<{
48
+ pass: "pass";
49
+ fail: "fail";
50
+ approved: "approved";
51
+ rejected: "rejected";
52
+ info: "info";
53
+ }>;
54
+ summary: z.ZodString;
55
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
56
+ type: z.ZodLiteral<"review">;
57
+ risk: z.ZodEnum<{
58
+ medium: "medium";
59
+ low: "low";
60
+ high: "high";
61
+ critical: "critical";
62
+ }>;
63
+ issues: z.ZodDefault<z.ZodArray<z.ZodObject<{
64
+ severity: z.ZodEnum<{
65
+ error: "error";
66
+ info: "info";
67
+ warning: "warning";
68
+ }>;
69
+ message: z.ZodString;
70
+ file: z.ZodOptional<z.ZodString>;
71
+ line: z.ZodOptional<z.ZodNumber>;
72
+ }, z.core.$strip>>>;
73
+ }, z.core.$strip>;
74
+ export type ReviewEvidence = z.infer<typeof ReviewEvidenceSchema>;
75
+ export declare const TestEvidenceSchema: z.ZodObject<{
76
+ task_id: z.ZodString;
77
+ timestamp: z.ZodString;
78
+ agent: z.ZodString;
79
+ verdict: z.ZodEnum<{
80
+ pass: "pass";
81
+ fail: "fail";
82
+ approved: "approved";
83
+ rejected: "rejected";
84
+ info: "info";
85
+ }>;
86
+ summary: z.ZodString;
87
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
88
+ type: z.ZodLiteral<"test">;
89
+ tests_passed: z.ZodNumber;
90
+ tests_failed: z.ZodNumber;
91
+ test_file: z.ZodOptional<z.ZodString>;
92
+ failures: z.ZodDefault<z.ZodArray<z.ZodObject<{
93
+ name: z.ZodString;
94
+ message: z.ZodString;
95
+ }, z.core.$strip>>>;
96
+ }, z.core.$strip>;
97
+ export type TestEvidence = z.infer<typeof TestEvidenceSchema>;
98
+ export declare const DiffEvidenceSchema: z.ZodObject<{
99
+ task_id: z.ZodString;
100
+ timestamp: z.ZodString;
101
+ agent: z.ZodString;
102
+ verdict: z.ZodEnum<{
103
+ pass: "pass";
104
+ fail: "fail";
105
+ approved: "approved";
106
+ rejected: "rejected";
107
+ info: "info";
108
+ }>;
109
+ summary: z.ZodString;
110
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
111
+ type: z.ZodLiteral<"diff">;
112
+ files_changed: z.ZodDefault<z.ZodArray<z.ZodString>>;
113
+ additions: z.ZodDefault<z.ZodNumber>;
114
+ deletions: z.ZodDefault<z.ZodNumber>;
115
+ patch_path: z.ZodOptional<z.ZodString>;
116
+ }, z.core.$strip>;
117
+ export type DiffEvidence = z.infer<typeof DiffEvidenceSchema>;
118
+ export declare const ApprovalEvidenceSchema: z.ZodObject<{
119
+ task_id: z.ZodString;
120
+ timestamp: z.ZodString;
121
+ agent: z.ZodString;
122
+ verdict: z.ZodEnum<{
123
+ pass: "pass";
124
+ fail: "fail";
125
+ approved: "approved";
126
+ rejected: "rejected";
127
+ info: "info";
128
+ }>;
129
+ summary: z.ZodString;
130
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
131
+ type: z.ZodLiteral<"approval">;
132
+ }, z.core.$strip>;
133
+ export type ApprovalEvidence = z.infer<typeof ApprovalEvidenceSchema>;
134
+ export declare const NoteEvidenceSchema: z.ZodObject<{
135
+ task_id: z.ZodString;
136
+ timestamp: z.ZodString;
137
+ agent: z.ZodString;
138
+ verdict: z.ZodEnum<{
139
+ pass: "pass";
140
+ fail: "fail";
141
+ approved: "approved";
142
+ rejected: "rejected";
143
+ info: "info";
144
+ }>;
145
+ summary: z.ZodString;
146
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
147
+ type: z.ZodLiteral<"note">;
148
+ }, z.core.$strip>;
149
+ export type NoteEvidence = z.infer<typeof NoteEvidenceSchema>;
150
+ export declare const EvidenceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
151
+ task_id: z.ZodString;
152
+ timestamp: z.ZodString;
153
+ agent: z.ZodString;
154
+ verdict: z.ZodEnum<{
155
+ pass: "pass";
156
+ fail: "fail";
157
+ approved: "approved";
158
+ rejected: "rejected";
159
+ info: "info";
160
+ }>;
161
+ summary: z.ZodString;
162
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
163
+ type: z.ZodLiteral<"review">;
164
+ risk: z.ZodEnum<{
165
+ medium: "medium";
166
+ low: "low";
167
+ high: "high";
168
+ critical: "critical";
169
+ }>;
170
+ issues: z.ZodDefault<z.ZodArray<z.ZodObject<{
171
+ severity: z.ZodEnum<{
172
+ error: "error";
173
+ info: "info";
174
+ warning: "warning";
175
+ }>;
176
+ message: z.ZodString;
177
+ file: z.ZodOptional<z.ZodString>;
178
+ line: z.ZodOptional<z.ZodNumber>;
179
+ }, z.core.$strip>>>;
180
+ }, z.core.$strip>, z.ZodObject<{
181
+ task_id: z.ZodString;
182
+ timestamp: z.ZodString;
183
+ agent: z.ZodString;
184
+ verdict: z.ZodEnum<{
185
+ pass: "pass";
186
+ fail: "fail";
187
+ approved: "approved";
188
+ rejected: "rejected";
189
+ info: "info";
190
+ }>;
191
+ summary: z.ZodString;
192
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
193
+ type: z.ZodLiteral<"test">;
194
+ tests_passed: z.ZodNumber;
195
+ tests_failed: z.ZodNumber;
196
+ test_file: z.ZodOptional<z.ZodString>;
197
+ failures: z.ZodDefault<z.ZodArray<z.ZodObject<{
198
+ name: z.ZodString;
199
+ message: z.ZodString;
200
+ }, z.core.$strip>>>;
201
+ }, z.core.$strip>, z.ZodObject<{
202
+ task_id: z.ZodString;
203
+ timestamp: z.ZodString;
204
+ agent: z.ZodString;
205
+ verdict: z.ZodEnum<{
206
+ pass: "pass";
207
+ fail: "fail";
208
+ approved: "approved";
209
+ rejected: "rejected";
210
+ info: "info";
211
+ }>;
212
+ summary: z.ZodString;
213
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
214
+ type: z.ZodLiteral<"diff">;
215
+ files_changed: z.ZodDefault<z.ZodArray<z.ZodString>>;
216
+ additions: z.ZodDefault<z.ZodNumber>;
217
+ deletions: z.ZodDefault<z.ZodNumber>;
218
+ patch_path: z.ZodOptional<z.ZodString>;
219
+ }, z.core.$strip>, z.ZodObject<{
220
+ task_id: z.ZodString;
221
+ timestamp: z.ZodString;
222
+ agent: z.ZodString;
223
+ verdict: z.ZodEnum<{
224
+ pass: "pass";
225
+ fail: "fail";
226
+ approved: "approved";
227
+ rejected: "rejected";
228
+ info: "info";
229
+ }>;
230
+ summary: z.ZodString;
231
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
232
+ type: z.ZodLiteral<"approval">;
233
+ }, z.core.$strip>, z.ZodObject<{
234
+ task_id: z.ZodString;
235
+ timestamp: z.ZodString;
236
+ agent: z.ZodString;
237
+ verdict: z.ZodEnum<{
238
+ pass: "pass";
239
+ fail: "fail";
240
+ approved: "approved";
241
+ rejected: "rejected";
242
+ info: "info";
243
+ }>;
244
+ summary: z.ZodString;
245
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
246
+ type: z.ZodLiteral<"note">;
247
+ }, z.core.$strip>], "type">;
248
+ export type Evidence = z.infer<typeof EvidenceSchema>;
249
+ export declare const EvidenceBundleSchema: z.ZodObject<{
250
+ schema_version: z.ZodLiteral<"1.0.0">;
251
+ task_id: z.ZodString;
252
+ entries: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
253
+ task_id: z.ZodString;
254
+ timestamp: z.ZodString;
255
+ agent: z.ZodString;
256
+ verdict: z.ZodEnum<{
257
+ pass: "pass";
258
+ fail: "fail";
259
+ approved: "approved";
260
+ rejected: "rejected";
261
+ info: "info";
262
+ }>;
263
+ summary: z.ZodString;
264
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
265
+ type: z.ZodLiteral<"review">;
266
+ risk: z.ZodEnum<{
267
+ medium: "medium";
268
+ low: "low";
269
+ high: "high";
270
+ critical: "critical";
271
+ }>;
272
+ issues: z.ZodDefault<z.ZodArray<z.ZodObject<{
273
+ severity: z.ZodEnum<{
274
+ error: "error";
275
+ info: "info";
276
+ warning: "warning";
277
+ }>;
278
+ message: z.ZodString;
279
+ file: z.ZodOptional<z.ZodString>;
280
+ line: z.ZodOptional<z.ZodNumber>;
281
+ }, z.core.$strip>>>;
282
+ }, z.core.$strip>, z.ZodObject<{
283
+ task_id: z.ZodString;
284
+ timestamp: z.ZodString;
285
+ agent: z.ZodString;
286
+ verdict: z.ZodEnum<{
287
+ pass: "pass";
288
+ fail: "fail";
289
+ approved: "approved";
290
+ rejected: "rejected";
291
+ info: "info";
292
+ }>;
293
+ summary: z.ZodString;
294
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
295
+ type: z.ZodLiteral<"test">;
296
+ tests_passed: z.ZodNumber;
297
+ tests_failed: z.ZodNumber;
298
+ test_file: z.ZodOptional<z.ZodString>;
299
+ failures: z.ZodDefault<z.ZodArray<z.ZodObject<{
300
+ name: z.ZodString;
301
+ message: z.ZodString;
302
+ }, z.core.$strip>>>;
303
+ }, z.core.$strip>, z.ZodObject<{
304
+ task_id: z.ZodString;
305
+ timestamp: z.ZodString;
306
+ agent: z.ZodString;
307
+ verdict: z.ZodEnum<{
308
+ pass: "pass";
309
+ fail: "fail";
310
+ approved: "approved";
311
+ rejected: "rejected";
312
+ info: "info";
313
+ }>;
314
+ summary: z.ZodString;
315
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
316
+ type: z.ZodLiteral<"diff">;
317
+ files_changed: z.ZodDefault<z.ZodArray<z.ZodString>>;
318
+ additions: z.ZodDefault<z.ZodNumber>;
319
+ deletions: z.ZodDefault<z.ZodNumber>;
320
+ patch_path: z.ZodOptional<z.ZodString>;
321
+ }, z.core.$strip>, z.ZodObject<{
322
+ task_id: z.ZodString;
323
+ timestamp: z.ZodString;
324
+ agent: z.ZodString;
325
+ verdict: z.ZodEnum<{
326
+ pass: "pass";
327
+ fail: "fail";
328
+ approved: "approved";
329
+ rejected: "rejected";
330
+ info: "info";
331
+ }>;
332
+ summary: z.ZodString;
333
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
334
+ type: z.ZodLiteral<"approval">;
335
+ }, z.core.$strip>, z.ZodObject<{
336
+ task_id: z.ZodString;
337
+ timestamp: z.ZodString;
338
+ agent: z.ZodString;
339
+ verdict: z.ZodEnum<{
340
+ pass: "pass";
341
+ fail: "fail";
342
+ approved: "approved";
343
+ rejected: "rejected";
344
+ info: "info";
345
+ }>;
346
+ summary: z.ZodString;
347
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
348
+ type: z.ZodLiteral<"note">;
349
+ }, z.core.$strip>], "type">>>;
350
+ created_at: z.ZodString;
351
+ updated_at: z.ZodString;
352
+ }, z.core.$strip>;
353
+ export type EvidenceBundle = z.infer<typeof EvidenceBundleSchema>;
@@ -1,5 +1,9 @@
1
- export { ALL_AGENT_NAMES, ALL_SUBAGENT_NAMES, DEFAULT_MODELS, ORCHESTRATOR_NAME, PIPELINE_AGENTS, QA_AGENTS, isQAAgent, isSubagent, } from './constants';
2
1
  export type { AgentName, PipelineAgentName, QAAgentName, } from './constants';
3
- export { AgentOverrideConfigSchema, PluginConfigSchema, SwarmConfigSchema, } from './schema';
4
- export type { AgentOverrideConfig, PluginConfig, SwarmConfig, } from './schema';
2
+ export { ALL_AGENT_NAMES, ALL_SUBAGENT_NAMES, DEFAULT_MODELS, isQAAgent, isSubagent, ORCHESTRATOR_NAME, PIPELINE_AGENTS, QA_AGENTS, } from './constants';
5
3
  export { loadAgentPrompt, loadPluginConfig, } from './loader';
4
+ export type { MigrationStatus, Phase, PhaseStatus, Plan, Task, TaskSize, TaskStatus, } from './plan-schema';
5
+ export { MigrationStatusSchema, PhaseSchema, PhaseStatusSchema, PlanSchema, TaskSchema, TaskSizeSchema, TaskStatusSchema, } from './plan-schema';
6
+ export type { ApprovalEvidence, BaseEvidence, DiffEvidence, Evidence, EvidenceBundle, EvidenceType, EvidenceVerdict, NoteEvidence, ReviewEvidence, TestEvidence, } from './evidence-schema';
7
+ export { ApprovalEvidenceSchema, BaseEvidenceSchema, DiffEvidenceSchema, EVIDENCE_MAX_JSON_BYTES, EVIDENCE_MAX_PATCH_BYTES, EVIDENCE_MAX_TASK_BYTES, EvidenceBundleSchema, EvidenceSchema, EvidenceTypeSchema, EvidenceVerdictSchema, NoteEvidenceSchema, ReviewEvidenceSchema, TestEvidenceSchema, } from './evidence-schema';
8
+ export type { AgentOverrideConfig, PluginConfig, SwarmConfig, } from './schema';
9
+ export { AgentOverrideConfigSchema, PluginConfigSchema, SwarmConfigSchema, } from './schema';
@@ -0,0 +1,124 @@
1
+ import { z } from 'zod';
2
+ export declare const TaskStatusSchema: z.ZodEnum<{
3
+ pending: "pending";
4
+ in_progress: "in_progress";
5
+ completed: "completed";
6
+ blocked: "blocked";
7
+ }>;
8
+ export type TaskStatus = z.infer<typeof TaskStatusSchema>;
9
+ export declare const TaskSizeSchema: z.ZodEnum<{
10
+ small: "small";
11
+ medium: "medium";
12
+ large: "large";
13
+ }>;
14
+ export type TaskSize = z.infer<typeof TaskSizeSchema>;
15
+ export declare const PhaseStatusSchema: z.ZodEnum<{
16
+ pending: "pending";
17
+ in_progress: "in_progress";
18
+ blocked: "blocked";
19
+ complete: "complete";
20
+ }>;
21
+ export type PhaseStatus = z.infer<typeof PhaseStatusSchema>;
22
+ export declare const MigrationStatusSchema: z.ZodEnum<{
23
+ native: "native";
24
+ migrated: "migrated";
25
+ migration_failed: "migration_failed";
26
+ }>;
27
+ export type MigrationStatus = z.infer<typeof MigrationStatusSchema>;
28
+ export declare const TaskSchema: z.ZodObject<{
29
+ id: z.ZodString;
30
+ phase: z.ZodNumber;
31
+ status: z.ZodDefault<z.ZodEnum<{
32
+ pending: "pending";
33
+ in_progress: "in_progress";
34
+ completed: "completed";
35
+ blocked: "blocked";
36
+ }>>;
37
+ size: z.ZodDefault<z.ZodEnum<{
38
+ small: "small";
39
+ medium: "medium";
40
+ large: "large";
41
+ }>>;
42
+ description: z.ZodString;
43
+ depends: z.ZodDefault<z.ZodArray<z.ZodString>>;
44
+ acceptance: z.ZodOptional<z.ZodString>;
45
+ files_touched: z.ZodDefault<z.ZodArray<z.ZodString>>;
46
+ evidence_path: z.ZodOptional<z.ZodString>;
47
+ blocked_reason: z.ZodOptional<z.ZodString>;
48
+ }, z.core.$strip>;
49
+ export type Task = z.infer<typeof TaskSchema>;
50
+ export declare const PhaseSchema: z.ZodObject<{
51
+ id: z.ZodNumber;
52
+ name: z.ZodString;
53
+ status: z.ZodDefault<z.ZodEnum<{
54
+ pending: "pending";
55
+ in_progress: "in_progress";
56
+ blocked: "blocked";
57
+ complete: "complete";
58
+ }>>;
59
+ tasks: z.ZodDefault<z.ZodArray<z.ZodObject<{
60
+ id: z.ZodString;
61
+ phase: z.ZodNumber;
62
+ status: z.ZodDefault<z.ZodEnum<{
63
+ pending: "pending";
64
+ in_progress: "in_progress";
65
+ completed: "completed";
66
+ blocked: "blocked";
67
+ }>>;
68
+ size: z.ZodDefault<z.ZodEnum<{
69
+ small: "small";
70
+ medium: "medium";
71
+ large: "large";
72
+ }>>;
73
+ description: z.ZodString;
74
+ depends: z.ZodDefault<z.ZodArray<z.ZodString>>;
75
+ acceptance: z.ZodOptional<z.ZodString>;
76
+ files_touched: z.ZodDefault<z.ZodArray<z.ZodString>>;
77
+ evidence_path: z.ZodOptional<z.ZodString>;
78
+ blocked_reason: z.ZodOptional<z.ZodString>;
79
+ }, z.core.$strip>>>;
80
+ }, z.core.$strip>;
81
+ export type Phase = z.infer<typeof PhaseSchema>;
82
+ export declare const PlanSchema: z.ZodObject<{
83
+ schema_version: z.ZodLiteral<"1.0.0">;
84
+ title: z.ZodString;
85
+ swarm: z.ZodString;
86
+ current_phase: z.ZodNumber;
87
+ phases: z.ZodArray<z.ZodObject<{
88
+ id: z.ZodNumber;
89
+ name: z.ZodString;
90
+ status: z.ZodDefault<z.ZodEnum<{
91
+ pending: "pending";
92
+ in_progress: "in_progress";
93
+ blocked: "blocked";
94
+ complete: "complete";
95
+ }>>;
96
+ tasks: z.ZodDefault<z.ZodArray<z.ZodObject<{
97
+ id: z.ZodString;
98
+ phase: z.ZodNumber;
99
+ status: z.ZodDefault<z.ZodEnum<{
100
+ pending: "pending";
101
+ in_progress: "in_progress";
102
+ completed: "completed";
103
+ blocked: "blocked";
104
+ }>>;
105
+ size: z.ZodDefault<z.ZodEnum<{
106
+ small: "small";
107
+ medium: "medium";
108
+ large: "large";
109
+ }>>;
110
+ description: z.ZodString;
111
+ depends: z.ZodDefault<z.ZodArray<z.ZodString>>;
112
+ acceptance: z.ZodOptional<z.ZodString>;
113
+ files_touched: z.ZodDefault<z.ZodArray<z.ZodString>>;
114
+ evidence_path: z.ZodOptional<z.ZodString>;
115
+ blocked_reason: z.ZodOptional<z.ZodString>;
116
+ }, z.core.$strip>>>;
117
+ }, z.core.$strip>>;
118
+ migration_status: z.ZodOptional<z.ZodEnum<{
119
+ native: "native";
120
+ migrated: "migrated";
121
+ migration_failed: "migration_failed";
122
+ }>>;
123
+ }, z.core.$strip>;
124
+ export type Plan = z.infer<typeof PlanSchema>;