opencode-swarm 7.148.3 → 7.148.4

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 (64) hide show
  1. package/dist/background/delegation-health.d.ts +100 -0
  2. package/dist/background/pending-delegations.d.ts +97 -0
  3. package/dist/background/queue.d.ts +45 -7
  4. package/dist/background/worker.d.ts +24 -3
  5. package/dist/cli/{config-doctor-q3fw9744.js → config-doctor-ycf9ws4p.js} +2 -2
  6. package/dist/cli/{core-y72nw57z.js → core-a1bhs3xa.js} +1 -1
  7. package/dist/cli/{curation-policy-hkdghd3a.js → curation-policy-fbvctttr.js} +5 -5
  8. package/dist/cli/{curator-bsr0xx05.js → curator-8y57gq1g.js} +26 -26
  9. package/dist/cli/{curator-llm-factory-sdxsn88r.js → curator-llm-factory-rj4vw5fd.js} +26 -26
  10. package/dist/cli/{evidence-summary-service-rk5exnrk.js → evidence-summary-service-wkp0gfpd.js} +10 -10
  11. package/dist/cli/{gate-evidence-cn0dvw8m.js → gate-evidence-qty15skw.js} +5 -5
  12. package/dist/cli/{guardrail-explain-fnnka0vt.js → guardrail-explain-2n3ahs0m.js} +27 -27
  13. package/dist/cli/{guardrail-log-gsx9kj51.js → guardrail-log-bmxrb3r2.js} +3 -3
  14. package/dist/cli/{guardrail-reset-kk1rdmm0.js → guardrail-reset-be3sx0am.js} +26 -26
  15. package/dist/cli/{hive-promoter-w7cr6qym.js → hive-promoter-te5d78yt.js} +26 -26
  16. package/dist/cli/{index-dh85aep3.js → index-0045n7qe.js} +2 -2
  17. package/dist/cli/{index-fp9d0e6f.js → index-1vbmra32.js} +1 -1
  18. package/dist/cli/{index-2d582j6q.js → index-622phhp5.js} +3 -3
  19. package/dist/cli/{index-harsx832.js → index-6kw1a3bk.js} +4 -4
  20. package/dist/cli/{index-08d3pb9a.js → index-7rerkeg8.js} +1 -1
  21. package/dist/cli/{index-x4kgn37c.js → index-8djgxw2w.js} +2 -2
  22. package/dist/cli/{index-y8kppv1z.js → index-8kzrgjt6.js} +1 -1
  23. package/dist/cli/{index-8sz9t8s2.js → index-9m8jy3av.js} +2 -2
  24. package/dist/cli/{index-hwfs0ze1.js → index-9qzkcmry.js} +3 -3
  25. package/dist/cli/{index-c9xfy8yj.js → index-b1c83zf9.js} +5 -5
  26. package/dist/cli/{index-et35gcph.js → index-b94487xm.js} +1 -1
  27. package/dist/cli/{index-xq8eydnk.js → index-bccfz7br.js} +4 -4
  28. package/dist/cli/{index-8w63kj4x.js → index-gswx08pr.js} +4 -4
  29. package/dist/cli/{index-7a41ca8k.js → index-hj1xd3pg.js} +265 -83
  30. package/dist/cli/{index-ebt47fnp.js → index-j382eh60.js} +1 -1
  31. package/dist/cli/{index-m5z2fgs4.js → index-k1s8gxjh.js} +1 -1
  32. package/dist/cli/{index-zpn3wqvp.js → index-kg4knw6r.js} +2 -2
  33. package/dist/cli/{index-r9g7ymv2.js → index-nq4tkfpc.js} +1 -1
  34. package/dist/cli/{index-b0703hjg.js → index-qbvq3xt2.js} +1 -1
  35. package/dist/cli/{index-4aqnb12y.js → index-qpewzk0q.js} +2 -2
  36. package/dist/cli/{index-2n9rwvcc.js → index-qwmrt51t.js} +1 -1
  37. package/dist/cli/{index-kn36sxj0.js → index-rzzwem6x.js} +28 -28
  38. package/dist/cli/{index-dmbvep3q.js → index-skgeytf6.js} +6 -6
  39. package/dist/cli/{index-3vescfdb.js → index-sxtz2d26.js} +6 -6
  40. package/dist/cli/{index-092deqxs.js → index-t25evmna.js} +400 -12
  41. package/dist/cli/{index-2zz8b0rb.js → index-vhefvcta.js} +2 -2
  42. package/dist/cli/{index-rsn4jm90.js → index-vrp2zva8.js} +1 -1
  43. package/dist/cli/{index-8y79znpe.js → index-w00hn0dd.js} +2 -2
  44. package/dist/cli/{index-afwwz4py.js → index-ye7kpzrk.js} +5 -5
  45. package/dist/cli/{index-65jw48eb.js → index-yq89bgnz.js} +1 -1
  46. package/dist/cli/index.js +26 -26
  47. package/dist/cli/{knowledge-escalator-jxpz0mv5.js → knowledge-escalator-9w53tx55.js} +10 -10
  48. package/dist/cli/{knowledge-events-kjwmc21q.js → knowledge-events-my31zepa.js} +8 -8
  49. package/dist/cli/{knowledge-link-5dctq0ax.js → knowledge-link-spw879rs.js} +4 -4
  50. package/dist/cli/{knowledge-store-j9bzs7zx.js → knowledge-store-yf59mxp5.js} +5 -5
  51. package/dist/cli/{knowledge-validator-56w52rwr.js → knowledge-validator-8n569fp4.js} +7 -7
  52. package/dist/cli/{pending-delegations-h4gr264y.js → pending-delegations-f4wvyzbf.js} +10 -2
  53. package/dist/cli/{pr-subscriptions-9mg6mwc0.js → pr-subscriptions-f4xw1rxy.js} +2 -2
  54. package/dist/cli/{runner-9g2pcg10.js → runner-rk26nk58.js} +5 -5
  55. package/dist/cli/{scan-cursor-7xbrxm2c.js → scan-cursor-www6dbn8.js} +6 -6
  56. package/dist/cli/{schema-gcjdpfr9.js → schema-vyg0k7rh.js} +1 -1
  57. package/dist/cli/{scope-persistence-2n9nk833.js → scope-persistence-3qbr019s.js} +6 -6
  58. package/dist/cli/{skill-generator-z70bhhx9.js → skill-generator-fh8emssb.js} +12 -12
  59. package/dist/cli/{worktree-collision-ownership-e0p490vw.js → worktree-collision-ownership-wqy7mgb3.js} +2 -2
  60. package/dist/cli/{worktree-isolation-vg6g00mq.js → worktree-isolation-sbsdx1yj.js} +26 -26
  61. package/dist/hooks/delegation-gate.d.ts +1 -0
  62. package/dist/index.js +15 -14
  63. package/dist/services/status-service.d.ts +55 -3
  64. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  import type { AgentDefinition } from '../agents';
2
- import { type DelegationLedgerHealth } from '../background/delegation-health';
2
+ import { type DelegationHealthMaintenanceSection, type DelegationLedgerHealth } from '../background/delegation-health';
3
3
  import { loadFullAutoRunState } from '../full-auto/state';
4
4
  import { type RecentEscalation } from '../hooks/knowledge-escalator';
5
5
  import { getActiveFullAutoSessionID, hasActiveFullAuto, hasActiveLeanTurbo } from '../state';
@@ -167,12 +167,62 @@ export interface StatusData {
167
167
  * exist (clean repos keep their previous byte-identical output).
168
168
  */
169
169
  delegationLedgerHealth?: DelegationLedgerHealth;
170
+ /**
171
+ * Issue #2104: opt-in background-work status. Populated ONLY when
172
+ * `hooks.background_subagents` is enabled — a disabled (default) feature
173
+ * adds no section and no output. All reads are bounded (recovery scan +
174
+ * bounded reservation store + health artifact); over-bound or corrupt
175
+ * stores surface as typed uncertainty, never partially-trusted counts.
176
+ */
177
+ backgroundWork?: BackgroundWorkStatus;
178
+ }
179
+ /** Issue #2104: opt-in background-work status snapshot for /swarm status. */
180
+ export interface BackgroundWorkStatus {
181
+ /** Live-set counts by delegation status (bounded recovery scan). */
182
+ counts: {
183
+ pending: number;
184
+ running: number;
185
+ completed: number;
186
+ consumed: number;
187
+ stale: number;
188
+ cancelled: number;
189
+ error: number;
190
+ ingestion_error: number;
191
+ };
192
+ /** Active coder reservations with their lease state. */
193
+ reservations: Array<{
194
+ reservationId: string;
195
+ planTaskId: string | null;
196
+ generation: number;
197
+ state: 'reserved' | 'bound';
198
+ leaseState: 'active' | 'expired' | 'protected-legacy';
199
+ leaseExpiresAt?: number;
200
+ }>;
201
+ /** Durable maintenance state from the health artifact (null when absent). */
202
+ maintenance: DelegationHealthMaintenanceSection | null;
203
+ /**
204
+ * Provenance: 'validated-recovery' when the bounded recovery scan and
205
+ * reservation scan both validated; 'uncertain' when either store is
206
+ * corrupt/over-bound — in that case counts/reservations are NOT presented
207
+ * (never a partial record set as authoritative) and `uncertainty` carries
208
+ * the typed reason.
209
+ */
210
+ source: 'validated-recovery' | 'uncertain';
211
+ /** Typed uncertainty reason when source is 'uncertain'. */
212
+ uncertainty?: string;
170
213
  }
171
214
  /**
172
215
  * Get status data from the swarm directory.
173
216
  * Returns structured data that can be used by GUI, background flows, or commands.
174
217
  */
175
- export declare function getStatusData(directory: string, agents: Record<string, AgentDefinition>, sessionId?: string): Promise<StatusData>;
218
+ export declare function getStatusData(directory: string, agents: Record<string, AgentDefinition>, sessionId?: string, options?: {
219
+ /**
220
+ * Explicit `hooks.background_subagents` value (issue #2104). When
221
+ * omitted, the service resolves it from the same config loader it
222
+ * already uses for the memory section (fail-open to disabled).
223
+ */
224
+ backgroundSubagents?: boolean;
225
+ }): Promise<StatusData>;
176
226
  /**
177
227
  * Format status data as markdown for command output.
178
228
  * This is the thin adapter that delegates to the service.
@@ -182,4 +232,6 @@ export declare function formatStatusMarkdown(status: StatusData): string;
182
232
  * Handle status command - delegates to service and formats output.
183
233
  * Kept for backward compatibility - thin adapter.
184
234
  */
185
- export declare function handleStatusCommand(directory: string, agents: Record<string, AgentDefinition>, sessionId?: string): Promise<string>;
235
+ export declare function handleStatusCommand(directory: string, agents: Record<string, AgentDefinition>, sessionId?: string, options?: {
236
+ backgroundSubagents?: boolean;
237
+ }): Promise<string>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-swarm",
3
- "version": "7.148.3",
3
+ "version": "7.148.4",
4
4
  "description": "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",