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.
Files changed (128) hide show
  1. package/.turbo/turbo-build.log +9 -0
  2. package/CHANGELOG.md +20 -0
  3. package/README.md +109 -429
  4. package/dist/agent-mail.d.ts +480 -0
  5. package/dist/agent-mail.d.ts.map +1 -0
  6. package/dist/anti-patterns.d.ts +257 -0
  7. package/dist/anti-patterns.d.ts.map +1 -0
  8. package/dist/beads.d.ts +377 -0
  9. package/dist/beads.d.ts.map +1 -0
  10. package/dist/eval-capture.d.ts +206 -0
  11. package/dist/eval-capture.d.ts.map +1 -0
  12. package/dist/index.d.ts +1299 -0
  13. package/dist/index.d.ts.map +1 -0
  14. package/dist/index.js +498 -4246
  15. package/dist/learning.d.ts +670 -0
  16. package/dist/learning.d.ts.map +1 -0
  17. package/dist/mandate-promotion.d.ts +93 -0
  18. package/dist/mandate-promotion.d.ts.map +1 -0
  19. package/dist/mandate-storage.d.ts +209 -0
  20. package/dist/mandate-storage.d.ts.map +1 -0
  21. package/dist/mandates.d.ts +230 -0
  22. package/dist/mandates.d.ts.map +1 -0
  23. package/dist/output-guardrails.d.ts +125 -0
  24. package/dist/output-guardrails.d.ts.map +1 -0
  25. package/dist/pattern-maturity.d.ts +246 -0
  26. package/dist/pattern-maturity.d.ts.map +1 -0
  27. package/dist/plugin.d.ts +22 -0
  28. package/dist/plugin.d.ts.map +1 -0
  29. package/dist/plugin.js +493 -4241
  30. package/dist/rate-limiter.d.ts +218 -0
  31. package/dist/rate-limiter.d.ts.map +1 -0
  32. package/dist/repo-crawl.d.ts +146 -0
  33. package/dist/repo-crawl.d.ts.map +1 -0
  34. package/dist/schemas/bead.d.ts +255 -0
  35. package/dist/schemas/bead.d.ts.map +1 -0
  36. package/dist/schemas/evaluation.d.ts +161 -0
  37. package/dist/schemas/evaluation.d.ts.map +1 -0
  38. package/dist/schemas/index.d.ts +34 -0
  39. package/dist/schemas/index.d.ts.map +1 -0
  40. package/dist/schemas/mandate.d.ts +336 -0
  41. package/dist/schemas/mandate.d.ts.map +1 -0
  42. package/dist/schemas/swarm-context.d.ts +131 -0
  43. package/dist/schemas/swarm-context.d.ts.map +1 -0
  44. package/dist/schemas/task.d.ts +188 -0
  45. package/dist/schemas/task.d.ts.map +1 -0
  46. package/dist/skills.d.ts +471 -0
  47. package/dist/skills.d.ts.map +1 -0
  48. package/dist/storage.d.ts +260 -0
  49. package/dist/storage.d.ts.map +1 -0
  50. package/dist/structured.d.ts +196 -0
  51. package/dist/structured.d.ts.map +1 -0
  52. package/dist/swarm-decompose.d.ts +201 -0
  53. package/dist/swarm-decompose.d.ts.map +1 -0
  54. package/dist/swarm-mail.d.ts +240 -0
  55. package/dist/swarm-mail.d.ts.map +1 -0
  56. package/dist/swarm-orchestrate.d.ts +708 -0
  57. package/dist/swarm-orchestrate.d.ts.map +1 -0
  58. package/dist/swarm-prompts.d.ts +292 -0
  59. package/dist/swarm-prompts.d.ts.map +1 -0
  60. package/dist/swarm-strategies.d.ts +100 -0
  61. package/dist/swarm-strategies.d.ts.map +1 -0
  62. package/dist/swarm.d.ts +455 -0
  63. package/dist/swarm.d.ts.map +1 -0
  64. package/dist/tool-availability.d.ts +91 -0
  65. package/dist/tool-availability.d.ts.map +1 -0
  66. package/docs/planning/ADR-001-monorepo-structure.md +171 -0
  67. package/docs/planning/ADR-002-package-extraction.md +393 -0
  68. package/docs/planning/ADR-003-performance-improvements.md +451 -0
  69. package/docs/planning/ADR-004-message-queue-features.md +187 -0
  70. package/docs/planning/ADR-005-devtools-observability.md +202 -0
  71. package/docs/planning/ROADMAP.md +368 -0
  72. package/package.json +13 -24
  73. package/src/agent-mail.ts +1 -1
  74. package/src/beads.ts +1 -2
  75. package/src/index.ts +2 -2
  76. package/src/learning.integration.test.ts +66 -11
  77. package/src/mandate-storage.test.ts +3 -3
  78. package/src/storage.ts +78 -10
  79. package/src/swarm-mail.ts +3 -3
  80. package/src/swarm-orchestrate.ts +7 -7
  81. package/src/tool-availability.ts +1 -1
  82. package/tsconfig.json +1 -1
  83. package/.beads/.local_version +0 -1
  84. package/.beads/README.md +0 -81
  85. package/.beads/analysis/skill-architecture-meta-skills.md +0 -1562
  86. package/.beads/config.yaml +0 -62
  87. package/.beads/issues.jsonl +0 -2197
  88. package/.beads/metadata.json +0 -4
  89. package/.gitattributes +0 -3
  90. package/.github/workflows/ci.yml +0 -30
  91. package/.github/workflows/opencode.yml +0 -31
  92. package/.opencode/skills/tdd/SKILL.md +0 -182
  93. package/INTEGRATION_EXAMPLE.md +0 -66
  94. package/VERIFICATION_QUALITY_PATTERNS.md +0 -565
  95. package/bun.lock +0 -286
  96. package/dist/pglite.data +0 -0
  97. package/dist/pglite.wasm +0 -0
  98. package/src/streams/agent-mail.test.ts +0 -777
  99. package/src/streams/agent-mail.ts +0 -535
  100. package/src/streams/debug.test.ts +0 -500
  101. package/src/streams/debug.ts +0 -727
  102. package/src/streams/effect/ask.integration.test.ts +0 -314
  103. package/src/streams/effect/ask.ts +0 -202
  104. package/src/streams/effect/cursor.integration.test.ts +0 -418
  105. package/src/streams/effect/cursor.ts +0 -288
  106. package/src/streams/effect/deferred.test.ts +0 -357
  107. package/src/streams/effect/deferred.ts +0 -445
  108. package/src/streams/effect/index.ts +0 -17
  109. package/src/streams/effect/layers.ts +0 -73
  110. package/src/streams/effect/lock.test.ts +0 -385
  111. package/src/streams/effect/lock.ts +0 -399
  112. package/src/streams/effect/mailbox.test.ts +0 -260
  113. package/src/streams/effect/mailbox.ts +0 -318
  114. package/src/streams/events.test.ts +0 -924
  115. package/src/streams/events.ts +0 -329
  116. package/src/streams/index.test.ts +0 -229
  117. package/src/streams/index.ts +0 -578
  118. package/src/streams/migrations.test.ts +0 -359
  119. package/src/streams/migrations.ts +0 -362
  120. package/src/streams/projections.test.ts +0 -611
  121. package/src/streams/projections.ts +0 -504
  122. package/src/streams/store.integration.test.ts +0 -658
  123. package/src/streams/store.ts +0 -1075
  124. package/src/streams/swarm-mail.ts +0 -552
  125. package/test-bug-fixes.ts +0 -86
  126. package/vitest.integration.config.ts +0 -19
  127. package/vitest.integration.setup.ts +0 -48
  128. 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"}