opencode-swarm 7.177.1 → 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 (114) 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 +8 -0
  4. package/dist/cli/{capability-probe-pdwwz8gs.js → capability-probe-8k8ebeyp.js} +2 -2
  5. package/dist/cli/{coder-settlement-c0kysest.js → coder-settlement-d2bfb25j.js} +13 -13
  6. package/dist/cli/{config-doctor-bqwse4pd.js → config-doctor-905x2s1c.js} +4 -4
  7. package/dist/cli/{core-e6vtme4x.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-2xb1d80j.js → curator-wyadq69k.js} +40 -40
  12. package/dist/cli/{evidence-summary-service-9yxm6jkq.js → evidence-summary-service-r3wcprfk.js} +19 -19
  13. package/dist/cli/{gate-evidence-43bnst3v.js → gate-evidence-tq9rb2aj.js} +8 -8
  14. package/dist/cli/guardrail-explain-kvgejh24.js +73 -0
  15. package/dist/cli/{guardrail-log-j7cj3rjy.js → guardrail-log-m6twga6x.js} +9 -9
  16. package/dist/cli/{guardrail-reset-jcsyfvf4.js → guardrail-reset-86esv8cr.js} +40 -40
  17. package/dist/cli/hive-promoter-s87hkb40.js +87 -0
  18. package/dist/cli/{index-m0cdjvtv.js → index-18hjycr1.js} +1 -1
  19. package/dist/cli/{index-cv191ybt.js → index-29begjkp.js} +8 -8
  20. package/dist/cli/{index-7nsvszwn.js → index-2b1whj28.js} +2 -2
  21. package/dist/cli/{index-hp5eet6g.js → index-2bmhe2jn.js} +4 -4
  22. package/dist/cli/{index-634pjhe4.js → index-2mdk6nt9.js} +7 -7
  23. package/dist/cli/{index-67amf4my.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-k330631a.js → index-at0ygwwp.js} +5 -5
  27. package/dist/cli/{index-t6q73twc.js → index-azy3tw6c.js} +2 -2
  28. package/dist/cli/{index-eefz8ghz.js → index-bfz1jvcn.js} +1 -1
  29. package/dist/cli/{index-yrs4wwfq.js → index-d5dexrv1.js} +4 -4
  30. package/dist/cli/{index-wemtrnch.js → index-ffqy30e5.js} +2 -2
  31. package/dist/cli/{index-7ntcak58.js → index-gg44hytk.js} +9 -9
  32. package/dist/cli/{index-yepxmq4f.js → index-heg4em8j.js} +590 -260
  33. package/dist/cli/{index-t2nf57mv.js → index-j1v54ahd.js} +2 -2
  34. package/dist/cli/{index-tj0sdxg9.js → index-j3rkh9mp.js} +2 -2
  35. package/dist/cli/{index-4ygb35m1.js → index-jzxeymr0.js} +13 -13
  36. package/dist/cli/{index-drgt81xf.js → index-ke3m026z.js} +6 -6
  37. package/dist/cli/{index-fnq5ac3f.js → index-kfk403mc.js} +5 -5
  38. package/dist/cli/{index-n7nzwz0q.js → index-m2n1rhgv.js} +8 -0
  39. package/dist/cli/{index-k6bjkqw8.js → index-mpcp6rmj.js} +1 -1
  40. package/dist/cli/{index-j82xdrqp.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-epsy1rh1.js → index-qk29b7s4.js} +42 -42
  44. package/dist/cli/{index-fgv6qp10.js → index-qs8eth8h.js} +37 -6
  45. package/dist/cli/{index-bqmxxbrw.js → index-rp0jk48x.js} +7 -7
  46. package/dist/cli/{index-fnw6zfh0.js → index-sqngtwyq.js} +1 -1
  47. package/dist/cli/{index-bc4x76z7.js → index-swxaa0zs.js} +40 -40
  48. package/dist/cli/{index-xnednxvm.js → index-tnjmn0dn.js} +1 -1
  49. package/dist/cli/{index-1042jnb9.js → index-vfc7d22n.js} +7 -3
  50. package/dist/cli/{index-1bq6hkw5.js → index-w4yjy3vp.js} +1 -1
  51. package/dist/cli/{index-e48h8m73.js → index-wbkxbgk8.js} +9 -5
  52. package/dist/cli/{index-2jtmevrr.js → index-wfbh1bx8.js} +3 -3
  53. package/dist/cli/{index-822hhbkc.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-7c24bb1r.js → index-zex7644g.js} +2 -2
  60. package/dist/cli/{index-exhm2ztr.js → index-zmb8fjp5.js} +1 -1
  61. package/dist/cli/{index-qgf5xexz.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-j4jcpver.js → knowledge-escalator-rgz471df.js} +13 -13
  65. package/dist/cli/{knowledge-events-fcpzfp2m.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-6evy197p.js → knowledge-store-gft25s5t.js} +5 -5
  68. package/dist/cli/{knowledge-validator-s28b1ddg.js → knowledge-validator-ejqacbx4.js} +7 -7
  69. package/dist/cli/{mcp-9kqsnehc.js → mcp-emaeeq4s.js} +48 -7
  70. package/dist/cli/mcp.d.ts +9 -0
  71. package/dist/cli/{model-preflight-1pp1a4yf.js → model-preflight-kh9dwts2.js} +1 -1
  72. package/dist/cli/{pending-delegations-e15f26e0.js → pending-delegations-4bhkcykk.js} +11 -11
  73. package/dist/cli/{pr-subscriptions-mqv51zvm.js → pr-subscriptions-h1n6dbds.js} +11 -11
  74. package/dist/cli/{pr-workflow-gate-fj31btdv.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-tpnq7e56.js → scan-cursor-e63t0g5b.js} +6 -6
  77. package/dist/cli/{schema-1wwcyaxp.js → schema-4k4hr33y.js} +4 -2
  78. package/dist/cli/{scope-persistence-332nvn9b.js → scope-persistence-qcw3rtxq.js} +16 -16
  79. package/dist/cli/{server-19bpfaps.js → server-58s1wwap.js} +2055 -736
  80. package/dist/cli/{skill-generator-gn1k4yxj.js → skill-generator-fhj13jmq.js} +15 -15
  81. package/dist/cli/{snapshot-coordination-init-6ztt4v99.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-q2ydb0ph.js → worktree-collision-ownership-hjk0jx19.js} +12 -12
  85. package/dist/cli/{worktree-isolation-fsqe1qdv.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/hooks/index.d.ts +1 -1
  94. package/dist/hooks/tool-summarizer.d.ts +7 -2
  95. package/dist/index.js +435 -274
  96. package/dist/mcp/adapters/knowledge-add.d.ts +19 -0
  97. package/dist/mcp/adapters/receipt-status.d.ts +3 -0
  98. package/dist/mcp/adapters/scope-validation.d.ts +3 -0
  99. package/dist/mcp/registry.d.ts +26 -14
  100. package/dist/mcp/server.d.ts +5 -0
  101. package/dist/mcp/write-receipts.d.ts +168 -0
  102. package/dist/summaries/index.d.ts +1 -1
  103. package/dist/summaries/manager.d.ts +27 -1
  104. package/dist/tools/index.d.ts +2 -0
  105. package/dist/tools/knowledge-receipt-status.d.ts +8 -0
  106. package/dist/tools/manifest.d.ts +2 -0
  107. package/dist/tools/scope-validate.d.ts +55 -0
  108. package/dist/tools/tool-metadata.d.ts +8 -0
  109. package/dist/utils/path-security.d.ts +21 -0
  110. package/opencode-swarm.schema.json +14 -0
  111. package/package.json +1 -1
  112. package/dist/cli/curator-llm-factory-fywmb8jh.js +0 -72
  113. package/dist/cli/guardrail-explain-gm69b76w.js +0 -73
  114. package/dist/cli/hive-promoter-hc0r0z9h.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 {};
@@ -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
  *