opencode-swarm 7.177.0 → 7.178.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.
Files changed (118) hide show
  1. package/binaries/win32-arm64/swarm-sandbox-runner.exe +0 -0
  2. package/binaries/win32-x64/swarm-sandbox-runner.exe +0 -0
  3. package/dist/agents/architect.d.ts +9 -1
  4. package/dist/cli/{capability-probe-pdwwz8gs.js → capability-probe-8k8ebeyp.js} +2 -2
  5. package/dist/cli/{coder-settlement-pm07553t.js → coder-settlement-d2bfb25j.js} +13 -13
  6. package/dist/cli/{config-doctor-3mwx2rwq.js → config-doctor-905x2s1c.js} +4 -4
  7. package/dist/cli/{core-ty985ae1.js → core-k7wfx1wx.js} +4 -4
  8. package/dist/cli/{curation-policy-d8s9w1z8.js → curation-policy-n4hd2wsa.js} +5 -5
  9. package/dist/cli/{curator-drift-4m984tvy.js → curator-drift-smqmej5v.js} +4 -4
  10. package/dist/cli/curator-llm-factory-qhhxev17.js +72 -0
  11. package/dist/cli/{curator-pch7ww87.js → curator-wyadq69k.js} +40 -40
  12. package/dist/cli/{evidence-summary-service-cxed89n3.js → evidence-summary-service-r3wcprfk.js} +19 -19
  13. package/dist/cli/{gate-evidence-ymye7yew.js → gate-evidence-tq9rb2aj.js} +8 -8
  14. package/dist/cli/guardrail-explain-kvgejh24.js +73 -0
  15. package/dist/cli/{guardrail-log-pgggycf9.js → guardrail-log-m6twga6x.js} +9 -9
  16. package/dist/cli/{guardrail-reset-aghymhr5.js → guardrail-reset-86esv8cr.js} +40 -40
  17. package/dist/cli/hive-promoter-s87hkb40.js +87 -0
  18. package/dist/cli/{index-zzr7f594.js → index-18hjycr1.js} +1 -1
  19. package/dist/cli/{index-w7aedfce.js → index-29begjkp.js} +8 -8
  20. package/dist/cli/{index-7nsvszwn.js → index-2b1whj28.js} +2 -2
  21. package/dist/cli/{index-7bvzssz0.js → index-2bmhe2jn.js} +4 -4
  22. package/dist/cli/{index-hxdswvtv.js → index-2mdk6nt9.js} +7 -7
  23. package/dist/cli/{index-rz4gpt3n.js → index-2vhkwy6v.js} +3 -3
  24. package/dist/cli/{index-fpbcxykc.js → index-6b295cas.js} +87 -1
  25. package/dist/cli/{index-yzjaj53h.js → index-9rwhas09.js} +1 -1
  26. package/dist/cli/{index-8dy3qf4q.js → index-at0ygwwp.js} +5 -5
  27. package/dist/cli/{index-q1jterxw.js → index-azy3tw6c.js} +2 -2
  28. package/dist/cli/{index-eefz8ghz.js → index-bfz1jvcn.js} +1 -1
  29. package/dist/cli/{index-gwnbprzk.js → index-d5dexrv1.js} +4 -4
  30. package/dist/cli/{index-wemtrnch.js → index-ffqy30e5.js} +2 -2
  31. package/dist/cli/{index-5w51tawb.js → index-gg44hytk.js} +9 -9
  32. package/dist/cli/{index-ebmep9me.js → index-heg4em8j.js} +591 -261
  33. package/dist/cli/{index-z8j7jqxt.js → index-j1v54ahd.js} +4 -3
  34. package/dist/cli/{index-tj0sdxg9.js → index-j3rkh9mp.js} +2 -2
  35. package/dist/cli/{index-zbq9091c.js → index-jzxeymr0.js} +13 -13
  36. package/dist/cli/{index-zwam9stk.js → index-ke3m026z.js} +6 -6
  37. package/dist/cli/{index-r18n5f17.js → index-kfk403mc.js} +5 -5
  38. package/dist/cli/{index-5frh43fj.js → index-m2n1rhgv.js} +12 -0
  39. package/dist/cli/{index-k6bjkqw8.js → index-mpcp6rmj.js} +1 -1
  40. package/dist/cli/{index-fnmt1ema.js → index-p27az2hc.js} +4 -4
  41. package/dist/cli/{index-5d2avnj9.js → index-pm7c6f66.js} +2 -2
  42. package/dist/cli/{index-vfp9hjgv.js → index-q9vb5e7n.js} +1 -1
  43. package/dist/cli/{index-0z5s71kn.js → index-qk29b7s4.js} +42 -42
  44. package/dist/cli/{index-by7xpk8f.js → index-qs8eth8h.js} +37 -6
  45. package/dist/cli/{index-ef2fa774.js → index-rp0jk48x.js} +7 -7
  46. package/dist/cli/{index-9ftc8saz.js → index-sqngtwyq.js} +1 -1
  47. package/dist/cli/{index-tzxk6ct7.js → index-swxaa0zs.js} +40 -40
  48. package/dist/cli/{index-xnednxvm.js → index-tnjmn0dn.js} +1 -1
  49. package/dist/cli/{index-rgapg88w.js → index-vfc7d22n.js} +7 -3
  50. package/dist/cli/{index-1bq6hkw5.js → index-w4yjy3vp.js} +1 -1
  51. package/dist/cli/{index-73arkdgf.js → index-wbkxbgk8.js} +9 -5
  52. package/dist/cli/{index-2jtmevrr.js → index-wfbh1bx8.js} +3 -3
  53. package/dist/cli/{index-4chr4gbq.js → index-wkde35ej.js} +9 -9
  54. package/dist/cli/{index-76qm2c2y.js → index-wvghb3x6.js} +4 -4
  55. package/dist/cli/{index-v2he8xfj.js → index-y6a2bkp1.js} +2 -2
  56. package/dist/cli/{index-eya03h5m.js → index-y74n1sy8.js} +7 -7
  57. package/dist/cli/{index-tbswvz8s.js → index-yeh78c1g.js} +2 -2
  58. package/dist/cli/{index-en0p0hqp.js → index-yj1kr0ft.js} +1 -1
  59. package/dist/cli/{index-nzz58tbs.js → index-zex7644g.js} +2 -2
  60. package/dist/cli/{index-exhm2ztr.js → index-zmb8fjp5.js} +1 -1
  61. package/dist/cli/{index-mcq6xs4k.js → index-zsm8h8y1.js} +4 -4
  62. package/dist/cli/{index-yhaxn5r7.js → index-zsp9de3k.js} +2 -2
  63. package/dist/cli/index.js +41 -41
  64. package/dist/cli/{knowledge-escalator-praedffr.js → knowledge-escalator-rgz471df.js} +13 -13
  65. package/dist/cli/{knowledge-events-sn5gs5q9.js → knowledge-events-4mq0ypx9.js} +11 -11
  66. package/dist/cli/{knowledge-link-9z3fha35.js → knowledge-link-npk50523.js} +4 -4
  67. package/dist/cli/{knowledge-store-838sgd97.js → knowledge-store-gft25s5t.js} +5 -5
  68. package/dist/cli/{knowledge-validator-bsxgarqv.js → knowledge-validator-ejqacbx4.js} +7 -7
  69. package/dist/cli/{mcp-skh29erk.js → mcp-emaeeq4s.js} +48 -7
  70. package/dist/cli/mcp.d.ts +9 -0
  71. package/dist/cli/{model-preflight-gk1jysa8.js → model-preflight-kh9dwts2.js} +1 -1
  72. package/dist/cli/{pending-delegations-6zr5es4b.js → pending-delegations-4bhkcykk.js} +11 -11
  73. package/dist/cli/{pr-subscriptions-x2rr3gva.js → pr-subscriptions-h1n6dbds.js} +11 -11
  74. package/dist/cli/{pr-workflow-gate-jx30c9vz.js → pr-workflow-gate-wn6v5za8.js} +40 -40
  75. package/dist/cli/{runner-yhfmejzb.js → runner-ffy5ahhz.js} +5 -5
  76. package/dist/cli/{scan-cursor-6h85e2g0.js → scan-cursor-e63t0g5b.js} +6 -6
  77. package/dist/cli/{schema-8h1b602y.js → schema-4k4hr33y.js} +4 -2
  78. package/dist/cli/{scope-persistence-rb99xjr0.js → scope-persistence-qcw3rtxq.js} +16 -16
  79. package/dist/cli/{server-kdjc5aw8.js → server-58s1wwap.js} +2055 -736
  80. package/dist/cli/{skill-generator-nz7wjabh.js → skill-generator-fhj13jmq.js} +15 -15
  81. package/dist/cli/{snapshot-coordination-init-hexx2msp.js → snapshot-coordination-init-5fawrj35.js} +40 -40
  82. package/dist/cli/{telemetry-w774xb8g.js → telemetry-ca8dmn26.js} +1 -1
  83. package/dist/cli/{workspace-snapshot-9gqna7gq.js → workspace-snapshot-v5qyjxg0.js} +3 -3
  84. package/dist/cli/{worktree-collision-ownership-ecwj3ehp.js → worktree-collision-ownership-hjk0jx19.js} +12 -12
  85. package/dist/cli/{worktree-isolation-0x9fx30v.js → worktree-isolation-aj20bs6q.js} +40 -40
  86. package/dist/commands/dashboard.d.ts +15 -0
  87. package/dist/commands/registry.d.ts +7 -0
  88. package/dist/config/schema.d.ts +16 -0
  89. package/dist/dashboard/assets.d.ts +12 -0
  90. package/dist/dashboard/index.d.ts +74 -0
  91. package/dist/dashboard/server.d.ts +94 -0
  92. package/dist/dashboard/views.d.ts +131 -0
  93. package/dist/events/core-events.d.ts +1 -1
  94. package/dist/hooks/delegation-gate.d.ts +26 -0
  95. package/dist/hooks/index.d.ts +1 -1
  96. package/dist/hooks/tool-summarizer.d.ts +7 -2
  97. package/dist/index.js +437 -276
  98. package/dist/mcp/adapters/knowledge-add.d.ts +19 -0
  99. package/dist/mcp/adapters/receipt-status.d.ts +3 -0
  100. package/dist/mcp/adapters/scope-validation.d.ts +3 -0
  101. package/dist/mcp/registry.d.ts +26 -14
  102. package/dist/mcp/server.d.ts +5 -0
  103. package/dist/mcp/write-receipts.d.ts +168 -0
  104. package/dist/summaries/index.d.ts +1 -1
  105. package/dist/summaries/manager.d.ts +27 -1
  106. package/dist/tools/approve-retry-sounding-board.d.ts +5 -0
  107. package/dist/tools/index.d.ts +3 -0
  108. package/dist/tools/knowledge-receipt-status.d.ts +8 -0
  109. package/dist/tools/manifest.d.ts +3 -0
  110. package/dist/tools/scope-validate.d.ts +55 -0
  111. package/dist/tools/tool-metadata.d.ts +12 -0
  112. package/dist/types/events.d.ts +5 -1
  113. package/dist/utils/path-security.d.ts +21 -0
  114. package/opencode-swarm.schema.json +14 -0
  115. package/package.json +1 -1
  116. package/dist/cli/curator-llm-factory-zbs6hm60.js +0 -72
  117. package/dist/cli/guardrail-explain-1zy8c3vn.js +0 -73
  118. package/dist/cli/hive-promoter-3dp8qbqc.js +0 -87
@@ -0,0 +1,131 @@
1
+ /**
2
+ * Read-only dashboard data layer (issue #2509).
3
+ *
4
+ * Every view composes the repo's existing bounded read APIs — this module
5
+ * holds no authoritative state and performs no durable writes of its own;
6
+ * the one exception is shared plumbing: on a legacy-telemetry-only project,
7
+ * the observability coverage read (same call `/swarm report` makes) may
8
+ * materialize `.swarm/swarm.db` via its rebuildable-import path
9
+ * (observability-event-store, issue #2482). Design rules (AGENTS invariants
10
+ * 4/5, issue #2509 AC4/AC6/AC7):
11
+ *
12
+ * - DB reads go through the sanctioned read-only surface
13
+ * (`withProjectDbReadOnly`) or store readers that already fail closed on an
14
+ * absent DB; anything that would open the shared writer handle is guarded
15
+ * by `projectDbExists` so a read-only view can never materialize a
16
+ * `.swarm/` tree that does not exist yet.
17
+ * - Every string rendered into a payload passes through
18
+ * `sanitizeFailureEvidenceDisplay` (the house no-secrets posture —
19
+ * src/failures/invocation-failure.ts, kin to the src/commands/_shared/
20
+ * url-security.ts standard named by the issue) plus the URL-credential and
21
+ * filesystem-path prescrubs below — no field class is exempt; plain
22
+ * identifiers simply survive it.
23
+ * - Row counts and per-field lengths are capped so responses stay bounded
24
+ * against very large stores (AC7).
25
+ */
26
+ import { type SwarmDbHealthSnapshot } from '../db/health.js';
27
+ interface GateProfileSummaryRow {
28
+ planId: string;
29
+ enabledGates: string[];
30
+ }
31
+ interface CircuitSummaryRow {
32
+ label: string;
33
+ state: string;
34
+ generation: number | null;
35
+ since: string | null;
36
+ }
37
+ export interface GatesView {
38
+ available: boolean;
39
+ unavailableReason?: string;
40
+ profileCount: number;
41
+ profiles: GateProfileSummaryRow[];
42
+ enabledCounts: Record<string, number>;
43
+ circuits: CircuitSummaryRow[];
44
+ }
45
+ export interface DelegationBandRow {
46
+ band: string;
47
+ count: number;
48
+ oldestAgeMs: number | null;
49
+ }
50
+ export interface DelegationRow {
51
+ correlationId: string;
52
+ agent: string;
53
+ status: string;
54
+ planTaskId: string;
55
+ ageMinutes: number | null;
56
+ }
57
+ export interface DelegationsView {
58
+ available: boolean;
59
+ unavailableReason?: string;
60
+ total: number;
61
+ bands: DelegationBandRow[];
62
+ recent: DelegationRow[];
63
+ }
64
+ export interface LaneRow {
65
+ correlationId: string;
66
+ laneId: string;
67
+ batchId: string;
68
+ workflowLane: string;
69
+ status: string;
70
+ pendingMinutes: number | null;
71
+ staleSuspect: boolean;
72
+ }
73
+ export interface LanesView {
74
+ available: boolean;
75
+ unavailableReason?: string;
76
+ lanes: LaneRow[];
77
+ staleSuspectCount: number;
78
+ }
79
+ export interface TaskRow {
80
+ id: string;
81
+ phase: number;
82
+ status: string;
83
+ description: string;
84
+ }
85
+ export interface TasksView {
86
+ available: boolean;
87
+ unavailableReason?: string;
88
+ title: string;
89
+ currentPhase: number | null;
90
+ tasks: TaskRow[];
91
+ }
92
+ export interface TimelineEventRow {
93
+ occurredAt: string;
94
+ kind: string;
95
+ severity: string;
96
+ taskId: string;
97
+ sessionId: string;
98
+ payload: string;
99
+ }
100
+ export interface TimelineView {
101
+ available: boolean;
102
+ unavailableReason?: string;
103
+ totalMatching: number;
104
+ truncated: boolean;
105
+ events: TimelineEventRow[];
106
+ }
107
+ export interface OverviewView {
108
+ dbHealth: SwarmDbHealthSnapshot;
109
+ gates: GatesView;
110
+ delegations: DelegationsView;
111
+ lanes: LanesView;
112
+ tasks: TasksView;
113
+ timeline: TimelineView;
114
+ }
115
+ export declare function renderGatesView(directory: string): GatesView;
116
+ export declare function renderDelegationsView(directory: string): DelegationsView;
117
+ export declare function renderLanesView(directory: string): LanesView;
118
+ export declare function renderTasksView(directory: string): Promise<TasksView>;
119
+ export declare function renderTimelineView(directory: string): TimelineView;
120
+ export interface DashboardStatusView {
121
+ dbHealth: SwarmDbHealthSnapshot;
122
+ observabilityCoverage: {
123
+ available: boolean;
124
+ totalRows?: number;
125
+ earliestOccurredAt?: string | null;
126
+ latestOccurredAt?: string | null;
127
+ };
128
+ }
129
+ export declare function renderStatusView(directory: string): DashboardStatusView;
130
+ export declare function renderOverviewView(directory: string): Promise<OverviewView>;
131
+ export {};
@@ -70,7 +70,7 @@ export interface CoreEventLimits {
70
70
  maxLineBytes: number;
71
71
  }
72
72
  export declare const CORE_EVENT_LIMITS: CoreEventLimits;
73
- export type CoderRetryEscalationAction = 'sounding_board_consultation' | 'simplification' | 'user_escalation';
73
+ export type CoderRetryEscalationAction = 'sounding_board_consultation' | 'simplification' | 'user_escalation' | 'sounding_board_manual_approval';
74
74
  /** Size-bounded folded aggregate persisted in the manifest header. FOLDED-ONLY:
75
75
  * events compacted/cut away from the retained window. Retained events are NOT
76
76
  * in here. Lifetime totals = folded + retained. */
@@ -418,6 +418,32 @@ export declare function forceRecordPlanCriticApproval(directory: string, session
418
418
  reason?: string;
419
419
  userConfirmed: boolean;
420
420
  }>;
421
+ /**
422
+ * Issue #2703: architect-facing manual recovery for the coder retry circuit
423
+ * breaker's critic_sounding_board gate. `enforceCoderRetryEscalation` blocks
424
+ * every coder dispatch for a task until durable evidence
425
+ * `gates.critic_sounding_board` exists, but the only foreground writer is the
426
+ * toolAfter auto-recorder, whose conjunctive preconditions (verdict parse via
427
+ * the plan-critic rubric, dispatch-time task attribution, launch-generation
428
+ * binding, non-terminal output state) can each miss on a legitimate APPROVED
429
+ * verdict — leaving the gate blocked across sessions and resets with no
430
+ * recovery path (unlike the plan-critic gate's approve_plan_critic, issue
431
+ * #2012). This helper writes the exact evidence the mechanical recorder would
432
+ * have written. It records evidence ONLY: it never emits
433
+ * sounding_board_consultation / simplification / user_escalation, so it cannot
434
+ * fabricate or skip the escalation protocol — a durable consultation for the
435
+ * task's CURRENT retry epoch must already exist.
436
+ */
437
+ export declare function forceRecordRetrySoundingBoardApproval(directory: string, sessionID: string, options: {
438
+ taskId: string;
439
+ reason?: string;
440
+ }): Promise<{
441
+ taskId: string;
442
+ generation: number;
443
+ retryEpoch: number;
444
+ recordedAt: string;
445
+ auditEventRecorded: boolean;
446
+ }>;
421
447
  /**
422
448
  * Builds a cause-specific diagnostic for `prepareCoderScope`'s SCOPE_NOT_DECLARED
423
449
  * throw when `resolveDelegatedPlanTaskId` returns null. Re-runs extraction with
@@ -19,5 +19,5 @@ export { createPipelineTrackerHook } from './pipeline-tracker';
19
19
  export { createRepoGraphBuilderHook, type RepoGraphBuilderHook, } from './repo-graph-builder';
20
20
  export { buildApprovedReceipt, buildReceiptContextForDrift, buildRejectedReceipt, persistReviewReceipt, readAllReceipts, readReceiptsByScopeHash, } from './review-receipt';
21
21
  export { createSystemEnhancerHook } from './system-enhancer';
22
- export { createToolSummarizerHook, resetSummaryIdCounter, } from './tool-summarizer';
22
+ export { createToolSummarizerHook } from './tool-summarizer';
23
23
  export { composeBlockingHandlers, composeHandlers, estimateTokens, readSwarmFileAsync, safeHook, validateSwarmPath, } from './utils';
@@ -6,10 +6,15 @@
6
6
  * the output with a compact summary containing a retrieval ID.
7
7
  */
8
8
  import type { SummaryConfig } from '../config/schema';
9
+ import { allocateSummaryId, storeSummary } from '../summaries/manager';
9
10
  /**
10
- * Reset the summary ID counter. Used for testing.
11
+ * Dependency seam for tests (repo `_internals` DI convention) so the
12
+ * collision-retry path is unit-testable without `mock.module`.
11
13
  */
12
- export declare function resetSummaryIdCounter(): void;
14
+ export declare const _internals: {
15
+ allocateSummaryId: typeof allocateSummaryId;
16
+ storeSummary: typeof storeSummary;
17
+ };
13
18
  /**
14
19
  * Creates a tool.execute.after hook that summarizes oversized tool outputs.
15
20
  *