opencode-swarm-plugin 0.22.0 → 0.23.1
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/.turbo/turbo-build.log +9 -0
- package/CHANGELOG.md +20 -0
- package/README.md +109 -429
- package/dist/agent-mail.d.ts +480 -0
- package/dist/agent-mail.d.ts.map +1 -0
- package/dist/anti-patterns.d.ts +257 -0
- package/dist/anti-patterns.d.ts.map +1 -0
- package/dist/beads.d.ts +377 -0
- package/dist/beads.d.ts.map +1 -0
- package/dist/eval-capture.d.ts +206 -0
- package/dist/eval-capture.d.ts.map +1 -0
- package/dist/index.d.ts +1299 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +498 -4246
- package/dist/learning.d.ts +670 -0
- package/dist/learning.d.ts.map +1 -0
- package/dist/mandate-promotion.d.ts +93 -0
- package/dist/mandate-promotion.d.ts.map +1 -0
- package/dist/mandate-storage.d.ts +209 -0
- package/dist/mandate-storage.d.ts.map +1 -0
- package/dist/mandates.d.ts +230 -0
- package/dist/mandates.d.ts.map +1 -0
- package/dist/output-guardrails.d.ts +125 -0
- package/dist/output-guardrails.d.ts.map +1 -0
- package/dist/pattern-maturity.d.ts +246 -0
- package/dist/pattern-maturity.d.ts.map +1 -0
- package/dist/plugin.d.ts +22 -0
- package/dist/plugin.d.ts.map +1 -0
- package/dist/plugin.js +493 -4241
- package/dist/rate-limiter.d.ts +218 -0
- package/dist/rate-limiter.d.ts.map +1 -0
- package/dist/repo-crawl.d.ts +146 -0
- package/dist/repo-crawl.d.ts.map +1 -0
- package/dist/schemas/bead.d.ts +255 -0
- package/dist/schemas/bead.d.ts.map +1 -0
- package/dist/schemas/evaluation.d.ts +161 -0
- package/dist/schemas/evaluation.d.ts.map +1 -0
- package/dist/schemas/index.d.ts +34 -0
- package/dist/schemas/index.d.ts.map +1 -0
- package/dist/schemas/mandate.d.ts +336 -0
- package/dist/schemas/mandate.d.ts.map +1 -0
- package/dist/schemas/swarm-context.d.ts +131 -0
- package/dist/schemas/swarm-context.d.ts.map +1 -0
- package/dist/schemas/task.d.ts +188 -0
- package/dist/schemas/task.d.ts.map +1 -0
- package/dist/skills.d.ts +471 -0
- package/dist/skills.d.ts.map +1 -0
- package/dist/storage.d.ts +260 -0
- package/dist/storage.d.ts.map +1 -0
- package/dist/structured.d.ts +196 -0
- package/dist/structured.d.ts.map +1 -0
- package/dist/swarm-decompose.d.ts +201 -0
- package/dist/swarm-decompose.d.ts.map +1 -0
- package/dist/swarm-mail.d.ts +240 -0
- package/dist/swarm-mail.d.ts.map +1 -0
- package/dist/swarm-orchestrate.d.ts +708 -0
- package/dist/swarm-orchestrate.d.ts.map +1 -0
- package/dist/swarm-prompts.d.ts +292 -0
- package/dist/swarm-prompts.d.ts.map +1 -0
- package/dist/swarm-strategies.d.ts +100 -0
- package/dist/swarm-strategies.d.ts.map +1 -0
- package/dist/swarm.d.ts +455 -0
- package/dist/swarm.d.ts.map +1 -0
- package/dist/tool-availability.d.ts +91 -0
- package/dist/tool-availability.d.ts.map +1 -0
- package/docs/planning/ADR-001-monorepo-structure.md +171 -0
- package/docs/planning/ADR-002-package-extraction.md +393 -0
- package/docs/planning/ADR-003-performance-improvements.md +451 -0
- package/docs/planning/ADR-004-message-queue-features.md +187 -0
- package/docs/planning/ADR-005-devtools-observability.md +202 -0
- package/docs/planning/ROADMAP.md +368 -0
- package/package.json +13 -24
- package/src/agent-mail.ts +1 -1
- package/src/beads.ts +1 -2
- package/src/index.ts +2 -2
- package/src/learning.integration.test.ts +66 -11
- package/src/mandate-storage.test.ts +3 -3
- package/src/storage.ts +78 -10
- package/src/swarm-mail.ts +3 -3
- package/src/swarm-orchestrate.ts +7 -7
- package/src/tool-availability.ts +1 -1
- package/tsconfig.json +1 -1
- package/.beads/.local_version +0 -1
- package/.beads/README.md +0 -81
- package/.beads/analysis/skill-architecture-meta-skills.md +0 -1562
- package/.beads/config.yaml +0 -62
- package/.beads/issues.jsonl +0 -2197
- package/.beads/metadata.json +0 -4
- package/.gitattributes +0 -3
- package/.github/workflows/ci.yml +0 -30
- package/.github/workflows/opencode.yml +0 -31
- package/.opencode/skills/tdd/SKILL.md +0 -182
- package/INTEGRATION_EXAMPLE.md +0 -66
- package/VERIFICATION_QUALITY_PATTERNS.md +0 -565
- package/bun.lock +0 -286
- package/dist/pglite.data +0 -0
- package/dist/pglite.wasm +0 -0
- package/src/streams/agent-mail.test.ts +0 -777
- package/src/streams/agent-mail.ts +0 -535
- package/src/streams/debug.test.ts +0 -500
- package/src/streams/debug.ts +0 -727
- package/src/streams/effect/ask.integration.test.ts +0 -314
- package/src/streams/effect/ask.ts +0 -202
- package/src/streams/effect/cursor.integration.test.ts +0 -418
- package/src/streams/effect/cursor.ts +0 -288
- package/src/streams/effect/deferred.test.ts +0 -357
- package/src/streams/effect/deferred.ts +0 -445
- package/src/streams/effect/index.ts +0 -17
- package/src/streams/effect/layers.ts +0 -73
- package/src/streams/effect/lock.test.ts +0 -385
- package/src/streams/effect/lock.ts +0 -399
- package/src/streams/effect/mailbox.test.ts +0 -260
- package/src/streams/effect/mailbox.ts +0 -318
- package/src/streams/events.test.ts +0 -924
- package/src/streams/events.ts +0 -329
- package/src/streams/index.test.ts +0 -229
- package/src/streams/index.ts +0 -578
- package/src/streams/migrations.test.ts +0 -359
- package/src/streams/migrations.ts +0 -362
- package/src/streams/projections.test.ts +0 -611
- package/src/streams/projections.ts +0 -504
- package/src/streams/store.integration.test.ts +0 -658
- package/src/streams/store.ts +0 -1075
- package/src/streams/swarm-mail.ts +0 -552
- package/test-bug-fixes.ts +0 -86
- package/vitest.integration.config.ts +0 -19
- package/vitest.integration.setup.ts +0 -48
- package/workflow-integration-analysis.md +0 -876
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
import { type MailSessionState } from "swarm-mail";
|
|
2
|
+
/**
|
|
3
|
+
* Swarm Mail session state
|
|
4
|
+
* @deprecated Use MailSessionState from streams/events.ts instead
|
|
5
|
+
* This is kept for backward compatibility and re-exported as an alias
|
|
6
|
+
*/
|
|
7
|
+
export type SwarmMailState = MailSessionState;
|
|
8
|
+
/**
|
|
9
|
+
* Set the default project directory for Swarm Mail operations
|
|
10
|
+
*
|
|
11
|
+
* Called during plugin initialization with the actual project directory.
|
|
12
|
+
*/
|
|
13
|
+
export declare function setSwarmMailProjectDirectory(directory: string): void;
|
|
14
|
+
/**
|
|
15
|
+
* Get the default project directory
|
|
16
|
+
* Returns undefined if not set - let getDatabasePath use global fallback
|
|
17
|
+
*/
|
|
18
|
+
export declare function getSwarmMailProjectDirectory(): string | undefined;
|
|
19
|
+
export declare function clearSessionState(sessionID: string): void;
|
|
20
|
+
/**
|
|
21
|
+
* Initialize Swarm Mail session
|
|
22
|
+
*/
|
|
23
|
+
export declare const swarmmail_init: {
|
|
24
|
+
description: string;
|
|
25
|
+
args: {
|
|
26
|
+
project_path: import("zod").ZodOptional<import("zod").ZodString>;
|
|
27
|
+
agent_name: import("zod").ZodOptional<import("zod").ZodString>;
|
|
28
|
+
task_description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
29
|
+
};
|
|
30
|
+
execute(args: {
|
|
31
|
+
project_path?: string | undefined;
|
|
32
|
+
agent_name?: string | undefined;
|
|
33
|
+
task_description?: string | undefined;
|
|
34
|
+
}, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* Send message to other agents
|
|
38
|
+
*/
|
|
39
|
+
export declare const swarmmail_send: {
|
|
40
|
+
description: string;
|
|
41
|
+
args: {
|
|
42
|
+
to: import("zod").ZodArray<import("zod").ZodString>;
|
|
43
|
+
subject: import("zod").ZodString;
|
|
44
|
+
body: import("zod").ZodString;
|
|
45
|
+
thread_id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
46
|
+
importance: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
47
|
+
low: "low";
|
|
48
|
+
normal: "normal";
|
|
49
|
+
high: "high";
|
|
50
|
+
urgent: "urgent";
|
|
51
|
+
}>>;
|
|
52
|
+
ack_required: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
53
|
+
};
|
|
54
|
+
execute(args: {
|
|
55
|
+
to: string[];
|
|
56
|
+
subject: string;
|
|
57
|
+
body: string;
|
|
58
|
+
thread_id?: string | undefined;
|
|
59
|
+
importance?: "low" | "normal" | "high" | "urgent" | undefined;
|
|
60
|
+
ack_required?: boolean | undefined;
|
|
61
|
+
}, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* Fetch inbox (CONTEXT-SAFE: bodies excluded, limit 5)
|
|
65
|
+
*/
|
|
66
|
+
export declare const swarmmail_inbox: {
|
|
67
|
+
description: string;
|
|
68
|
+
args: {
|
|
69
|
+
limit: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
70
|
+
urgent_only: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
71
|
+
};
|
|
72
|
+
execute(args: {
|
|
73
|
+
limit?: number | undefined;
|
|
74
|
+
urgent_only?: boolean | undefined;
|
|
75
|
+
}, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* Fetch ONE message body by ID
|
|
79
|
+
*/
|
|
80
|
+
export declare const swarmmail_read_message: {
|
|
81
|
+
description: string;
|
|
82
|
+
args: {
|
|
83
|
+
message_id: import("zod").ZodNumber;
|
|
84
|
+
};
|
|
85
|
+
execute(args: {
|
|
86
|
+
message_id: number;
|
|
87
|
+
}, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
|
|
88
|
+
};
|
|
89
|
+
/**
|
|
90
|
+
* Reserve file paths for exclusive editing
|
|
91
|
+
*/
|
|
92
|
+
export declare const swarmmail_reserve: {
|
|
93
|
+
description: string;
|
|
94
|
+
args: {
|
|
95
|
+
paths: import("zod").ZodArray<import("zod").ZodString>;
|
|
96
|
+
reason: import("zod").ZodOptional<import("zod").ZodString>;
|
|
97
|
+
exclusive: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
98
|
+
ttl_seconds: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
99
|
+
};
|
|
100
|
+
execute(args: {
|
|
101
|
+
paths: string[];
|
|
102
|
+
reason?: string | undefined;
|
|
103
|
+
exclusive?: boolean | undefined;
|
|
104
|
+
ttl_seconds?: number | undefined;
|
|
105
|
+
}, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
|
|
106
|
+
};
|
|
107
|
+
/**
|
|
108
|
+
* Release file reservations
|
|
109
|
+
*/
|
|
110
|
+
export declare const swarmmail_release: {
|
|
111
|
+
description: string;
|
|
112
|
+
args: {
|
|
113
|
+
paths: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
114
|
+
reservation_ids: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodNumber>>;
|
|
115
|
+
};
|
|
116
|
+
execute(args: {
|
|
117
|
+
paths?: string[] | undefined;
|
|
118
|
+
reservation_ids?: number[] | undefined;
|
|
119
|
+
}, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
|
|
120
|
+
};
|
|
121
|
+
/**
|
|
122
|
+
* Acknowledge a message
|
|
123
|
+
*/
|
|
124
|
+
export declare const swarmmail_ack: {
|
|
125
|
+
description: string;
|
|
126
|
+
args: {
|
|
127
|
+
message_id: import("zod").ZodNumber;
|
|
128
|
+
};
|
|
129
|
+
execute(args: {
|
|
130
|
+
message_id: number;
|
|
131
|
+
}, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
|
|
132
|
+
};
|
|
133
|
+
/**
|
|
134
|
+
* Check if Swarm Mail is healthy
|
|
135
|
+
*/
|
|
136
|
+
export declare const swarmmail_health: {
|
|
137
|
+
description: string;
|
|
138
|
+
args: {};
|
|
139
|
+
execute(args: Record<string, never>, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
|
|
140
|
+
};
|
|
141
|
+
export declare const swarmMailTools: {
|
|
142
|
+
swarmmail_init: {
|
|
143
|
+
description: string;
|
|
144
|
+
args: {
|
|
145
|
+
project_path: import("zod").ZodOptional<import("zod").ZodString>;
|
|
146
|
+
agent_name: import("zod").ZodOptional<import("zod").ZodString>;
|
|
147
|
+
task_description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
148
|
+
};
|
|
149
|
+
execute(args: {
|
|
150
|
+
project_path?: string | undefined;
|
|
151
|
+
agent_name?: string | undefined;
|
|
152
|
+
task_description?: string | undefined;
|
|
153
|
+
}, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
|
|
154
|
+
};
|
|
155
|
+
swarmmail_send: {
|
|
156
|
+
description: string;
|
|
157
|
+
args: {
|
|
158
|
+
to: import("zod").ZodArray<import("zod").ZodString>;
|
|
159
|
+
subject: import("zod").ZodString;
|
|
160
|
+
body: import("zod").ZodString;
|
|
161
|
+
thread_id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
162
|
+
importance: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
163
|
+
low: "low";
|
|
164
|
+
normal: "normal";
|
|
165
|
+
high: "high";
|
|
166
|
+
urgent: "urgent";
|
|
167
|
+
}>>;
|
|
168
|
+
ack_required: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
169
|
+
};
|
|
170
|
+
execute(args: {
|
|
171
|
+
to: string[];
|
|
172
|
+
subject: string;
|
|
173
|
+
body: string;
|
|
174
|
+
thread_id?: string | undefined;
|
|
175
|
+
importance?: "low" | "normal" | "high" | "urgent" | undefined;
|
|
176
|
+
ack_required?: boolean | undefined;
|
|
177
|
+
}, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
|
|
178
|
+
};
|
|
179
|
+
swarmmail_inbox: {
|
|
180
|
+
description: string;
|
|
181
|
+
args: {
|
|
182
|
+
limit: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
183
|
+
urgent_only: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
184
|
+
};
|
|
185
|
+
execute(args: {
|
|
186
|
+
limit?: number | undefined;
|
|
187
|
+
urgent_only?: boolean | undefined;
|
|
188
|
+
}, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
|
|
189
|
+
};
|
|
190
|
+
swarmmail_read_message: {
|
|
191
|
+
description: string;
|
|
192
|
+
args: {
|
|
193
|
+
message_id: import("zod").ZodNumber;
|
|
194
|
+
};
|
|
195
|
+
execute(args: {
|
|
196
|
+
message_id: number;
|
|
197
|
+
}, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
|
|
198
|
+
};
|
|
199
|
+
swarmmail_reserve: {
|
|
200
|
+
description: string;
|
|
201
|
+
args: {
|
|
202
|
+
paths: import("zod").ZodArray<import("zod").ZodString>;
|
|
203
|
+
reason: import("zod").ZodOptional<import("zod").ZodString>;
|
|
204
|
+
exclusive: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
205
|
+
ttl_seconds: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
206
|
+
};
|
|
207
|
+
execute(args: {
|
|
208
|
+
paths: string[];
|
|
209
|
+
reason?: string | undefined;
|
|
210
|
+
exclusive?: boolean | undefined;
|
|
211
|
+
ttl_seconds?: number | undefined;
|
|
212
|
+
}, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
|
|
213
|
+
};
|
|
214
|
+
swarmmail_release: {
|
|
215
|
+
description: string;
|
|
216
|
+
args: {
|
|
217
|
+
paths: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
218
|
+
reservation_ids: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodNumber>>;
|
|
219
|
+
};
|
|
220
|
+
execute(args: {
|
|
221
|
+
paths?: string[] | undefined;
|
|
222
|
+
reservation_ids?: number[] | undefined;
|
|
223
|
+
}, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
|
|
224
|
+
};
|
|
225
|
+
swarmmail_ack: {
|
|
226
|
+
description: string;
|
|
227
|
+
args: {
|
|
228
|
+
message_id: import("zod").ZodNumber;
|
|
229
|
+
};
|
|
230
|
+
execute(args: {
|
|
231
|
+
message_id: number;
|
|
232
|
+
}, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
|
|
233
|
+
};
|
|
234
|
+
swarmmail_health: {
|
|
235
|
+
description: string;
|
|
236
|
+
args: {};
|
|
237
|
+
execute(args: Record<string, never>, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
|
|
238
|
+
};
|
|
239
|
+
};
|
|
240
|
+
//# sourceMappingURL=swarm-mail.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"swarm-mail.d.ts","sourceRoot":"","sources":["../src/swarm-mail.ts"],"names":[],"mappings":"AAmBA,OAAO,EAUL,KAAK,gBAAgB,EACtB,MAAM,YAAY,CAAC;AAoBpB;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG,gBAAgB,CAAC;AA+D9C;;;;GAIG;AACH,wBAAgB,4BAA4B,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAEpE;AAED;;;GAGG;AACH,wBAAgB,4BAA4B,IAAI,MAAM,GAAG,SAAS,CAEjE;AAyCD,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CASzD;AAMD;;GAEG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;CAyEzB,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;CAiEzB,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;CA6D1B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;CAyDjC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;CA8E5B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;CA6E5B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,aAAa;;;;;;;;CA2CxB,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;;CA0C3B,CAAC;AAMH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAS1B,CAAC"}
|