opencode-swarm 7.171.2 → 7.172.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 (124) hide show
  1. package/README.md +5 -0
  2. package/binaries/win32-arm64/swarm-sandbox-runner.exe +0 -0
  3. package/binaries/win32-x64/swarm-sandbox-runner.exe +0 -0
  4. package/dist/background/delegation-lifecycle.d.ts +21 -5
  5. package/dist/background/pending-delegations.d.ts +118 -6
  6. package/dist/cli/ast-diff-f2a1y02y.js +13 -0
  7. package/dist/cli/{coder-settlement-9e696204.js → coder-settlement-0k46xqk2.js} +14 -14
  8. package/dist/cli/{config-doctor-zr748h4m.js → config-doctor-x41bxjp6.js} +6 -6
  9. package/dist/cli/{core-aa3jmzcs.js → core-3spww0at.js} +5 -5
  10. package/dist/cli/{curation-policy-fakrpw5t.js → curation-policy-92qhvewe.js} +7 -7
  11. package/dist/cli/{curator-drift-r9r8gepb.js → curator-drift-fqvxe2zw.js} +8 -8
  12. package/dist/cli/{curator-xgpxtaf1.js → curator-eyz6gg74.js} +45 -45
  13. package/dist/cli/curator-llm-factory-jnsjqq99.js +72 -0
  14. package/dist/cli/{dispatch-hwwj3qrb.js → dispatch-9yqqqfr6.js} +2 -2
  15. package/dist/cli/{evidence-summary-service-5e2323zr.js → evidence-summary-service-kf0vb1hf.js} +22 -22
  16. package/dist/cli/{gate-evidence-5htpsr5y.js → gate-evidence-89wvxgs9.js} +9 -9
  17. package/dist/cli/guardrail-explain-rz4kaqyp.js +73 -0
  18. package/dist/cli/guardrail-log-kfjk62sz.js +23 -0
  19. package/dist/cli/{guardrail-reset-rdqxeqy0.js → guardrail-reset-d8m1h5sz.js} +45 -45
  20. package/dist/cli/hive-promoter-0ekf5zp1.js +87 -0
  21. package/dist/cli/{index-qcy7eg6z.js → index-0y2ygy5f.js} +154 -37
  22. package/dist/cli/{index-aa2eyfvr.js → index-12w05bxk.js} +2 -2
  23. package/dist/cli/{index-95e3a9en.js → index-1s3t3jdc.js} +1 -1
  24. package/dist/cli/{index-f1rj1j8t.js → index-1vsmh63p.js} +2713 -1429
  25. package/dist/cli/{index-gq2zdxep.js → index-25fa4krx.js} +8 -8
  26. package/dist/cli/{index-qdy4a48x.js → index-29j9sjbw.js} +3 -3
  27. package/dist/cli/{index-wfh89qct.js → index-2rdj9mdh.js} +4 -4
  28. package/dist/cli/{index-dsgc303n.js → index-328eg2bb.js} +4 -4
  29. package/dist/cli/{index-nyn01yrz.js → index-34jdempk.js} +2 -2
  30. package/dist/cli/{index-9txyxbqc.js → index-39x78qk0.js} +8 -8
  31. package/dist/cli/{index-5a8q4qr5.js → index-3kqzzwvd.js} +2 -2
  32. package/dist/cli/{index-r60cw2jt.js → index-53ges0rk.js} +7 -7
  33. package/dist/cli/{index-2ryy0cwt.js → index-5hambjmn.js} +6 -6
  34. package/dist/cli/{index-vqb65csb.js → index-63t4m2t5.js} +16 -16
  35. package/dist/cli/{index-0caqxnby.js → index-677gzqmd.js} +1 -1
  36. package/dist/cli/{index-b3pmzbh1.js → index-6fb3y9pm.js} +2 -2
  37. package/dist/cli/{index-e7yv4xw1.js → index-6jshhpjw.js} +3 -3
  38. package/dist/cli/{index-j6rq132j.js → index-7q1m8rsw.js} +7 -7
  39. package/dist/cli/{index-rrc08h4q.js → index-8k09fkqj.js} +5 -5
  40. package/dist/cli/{index-mazy938h.js → index-8wnjcav5.js} +4 -4
  41. package/dist/cli/{index-nbdmdyke.js → index-a2kv054j.js} +1 -1
  42. package/dist/cli/{index-9dz2ee2g.js → index-br3r0y73.js} +67 -47
  43. package/dist/cli/{index-ee6ydtfe.js → index-c1ggtmpm.js} +1 -1
  44. package/dist/cli/{index-evxd1art.js → index-dga9j6s1.js} +2 -2
  45. package/dist/cli/{index-nfs78aqj.js → index-dpb1xs5m.js} +2 -2
  46. package/dist/cli/{index-sxt7fgcw.js → index-ecaws78e.js} +1 -1
  47. package/dist/cli/{index-yqbnsmmv.js → index-efkckdaw.js} +1 -1
  48. package/dist/cli/{index-cw912re7.js → index-fpbcxykc.js} +1 -1
  49. package/dist/cli/{index-3qf1vxtb.js → index-frcemc0b.js} +1 -1
  50. package/dist/cli/{index-bpmtbmy9.js → index-gknz3bv1.js} +1 -1
  51. package/dist/cli/{index-11gz0few.js → index-gmw8a1qa.js} +1 -1
  52. package/dist/cli/{index-5400m33a.js → index-hnvmj9wx.js} +1 -1
  53. package/dist/cli/{index-ph94evsh.js → index-jvg7hvjp.js} +7 -7
  54. package/dist/cli/{index-g6nen3gt.js → index-k441jgzk.js} +1 -1
  55. package/dist/cli/{index-6k5aq7b9.js → index-mj07x42s.js} +2 -2
  56. package/dist/cli/{index-kb66he4e.js → index-nqbmk4b9.js} +1 -1
  57. package/dist/cli/{index-er6sk4e6.js → index-nyrhz1h1.js} +2 -2
  58. package/dist/cli/{index-b43rt5ph.js → index-pt7h91zc.js} +19 -1
  59. package/dist/cli/{ast-diff-b0esr2kf.js → index-qss1s93b.js} +3 -6
  60. package/dist/cli/{index-04ph4jp2.js → index-r08tgb71.js} +2 -2
  61. package/dist/cli/{index-3jcp3zb6.js → index-s723hx7z.js} +2 -2
  62. package/dist/cli/{index-jr6pypmj.js → index-tfmb620d.js} +45 -45
  63. package/dist/cli/{index-7qqwx64h.js → index-v2fge66b.js} +8 -8
  64. package/dist/cli/{index-fhh02gwx.js → index-v6msnkz2.js} +2 -2
  65. package/dist/cli/{index-7hnjs7tf.js → index-w1d5nsdc.js} +2 -2
  66. package/dist/cli/{index-n832052r.js → index-wrt875kh.js} +1 -1
  67. package/dist/cli/{index-9vfp6g53.js → index-xn9tm7sr.js} +47 -47
  68. package/dist/cli/{index-d79q2f8z.js → index-y8y2bjsy.js} +4 -4
  69. package/dist/cli/{semantic-classifier-ygqk0me1.js → index-ykamkw55.js} +2 -5
  70. package/dist/cli/{index-9br68j86.js → index-z2deqhpp.js} +1 -1
  71. package/dist/cli/{index-0yffa3np.js → index-z81mxyhm.js} +5 -5
  72. package/dist/cli/{index-q2yk70rs.js → index-zbw6h4xn.js} +4 -3
  73. package/dist/cli/index.js +53 -47
  74. package/dist/cli/{knowledge-escalator-kn74r5w8.js → knowledge-escalator-qtz01ffw.js} +17 -17
  75. package/dist/cli/{knowledge-events-7gpw741m.js → knowledge-events-8w0mvkzc.js} +15 -15
  76. package/dist/cli/{knowledge-link-vh9pfnb9.js → knowledge-link-3xp7h4xn.js} +6 -6
  77. package/dist/cli/{knowledge-store-3f9kke7z.js → knowledge-store-p5ps09qg.js} +7 -7
  78. package/dist/cli/{knowledge-validator-c2z68v8v.js → knowledge-validator-rc63wfkp.js} +9 -9
  79. package/dist/cli/mcp-pmfg7wpk.js +78 -0
  80. package/dist/cli/mcp.d.ts +27 -0
  81. package/dist/cli/{model-preflight-1ycat9jz.js → model-preflight-2mvdbj0c.js} +1 -1
  82. package/dist/cli/{pending-delegations-d5c07rb7.js → pending-delegations-1sg6g7et.js} +21 -13
  83. package/dist/cli/{pr-subscriptions-krv0jvds.js → pr-subscriptions-yd804apk.js} +13 -13
  84. package/dist/cli/{pr-workflow-gate-hmdht1he.js → pr-workflow-gate-pf3ssffq.js} +45 -45
  85. package/dist/cli/{runner-8m8qhngm.js → runner-rry4z6j2.js} +7 -7
  86. package/dist/cli/{scan-cursor-b57xxs3q.js → scan-cursor-j93ek248.js} +8 -8
  87. package/dist/cli/{schema-r8tv8dqm.js → schema-hvptm5hf.js} +3 -3
  88. package/dist/cli/{scope-persistence-0sc90mpj.js → scope-persistence-3tfvswtk.js} +17 -17
  89. package/dist/cli/semantic-classifier-bjsez0v5.js +8 -0
  90. package/dist/cli/server-rbvx63t6.js +18129 -0
  91. package/dist/cli/{skill-generator-syxa1mxm.js → skill-generator-r9wc6xt1.js} +19 -19
  92. package/dist/cli/snapshot-coordination-init-7w5em40w.js +86 -0
  93. package/dist/cli/{telemetry-0mz37v3h.js → telemetry-vw919tfm.js} +3 -3
  94. package/dist/cli/{workspace-snapshot-hkz2wt1c.js → workspace-snapshot-x54wxr6a.js} +4 -4
  95. package/dist/cli/{worktree-collision-ownership-1tzw8qzp.js → worktree-collision-ownership-yetwf2ch.js} +14 -14
  96. package/dist/cli/{worktree-isolation-ez0e48v3.js → worktree-isolation-sxfj78hv.js} +45 -45
  97. package/dist/hooks/pr-workflow-gate.d.ts +14 -2
  98. package/dist/hooks/pr-workflow-session-resolver.d.ts +45 -0
  99. package/dist/hooks/search-knowledge.d.ts +7 -0
  100. package/dist/index.js +102 -102
  101. package/dist/mcp/adapters/knowledge-memory.d.ts +16 -0
  102. package/dist/mcp/adapters/scope-repo.d.ts +14 -0
  103. package/dist/mcp/adapters/verification.d.ts +20 -0
  104. package/dist/mcp/pipeline.d.ts +25 -0
  105. package/dist/mcp/registry.d.ts +47 -0
  106. package/dist/mcp/server.d.ts +35 -0
  107. package/dist/memory/gateway.d.ts +9 -1
  108. package/dist/observability/catalog.d.ts +4 -3
  109. package/dist/pr-review/completion.d.ts +12 -0
  110. package/dist/telemetry.d.ts +11 -1
  111. package/dist/tools/dispatch-lanes.d.ts +5 -1
  112. package/dist/tools/placeholder-scan.d.ts +10 -0
  113. package/dist/tools/pr-workflow-status.d.ts +6 -0
  114. package/dist/tools/quality-budget.d.ts +10 -0
  115. package/dist/tools/repo-map.d.ts +5 -0
  116. package/dist/tools/sast-scan.d.ts +11 -0
  117. package/dist/tools/swarm-memory-recall.d.ts +12 -0
  118. package/dist/tools/syntax-check.d.ts +12 -1
  119. package/package.json +2 -1
  120. package/dist/cli/curator-llm-factory-nshzhgs4.js +0 -72
  121. package/dist/cli/guardrail-explain-d0h0p73g.js +0 -73
  122. package/dist/cli/guardrail-log-heejmjce.js +0 -23
  123. package/dist/cli/hive-promoter-n262tkm3.js +0 -87
  124. package/dist/cli/snapshot-coordination-init-x18mwxyv.js +0 -86
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Knowledge + memory adapters for the read-only MCP surface (#2499).
3
+ *
4
+ * `knowledge_recall` calls `searchKnowledge` — the exact retrieval core the
5
+ * registered `knowledge_recall` tool uses — with `skipLedgerGenesis` so a
6
+ * query never performs the receipt ledger's one-time `runLocked` genesis.
7
+ * `swarm_memory_recall` calls the registered tool's compute core with
8
+ * `{recordUsage: false}` (identical retrieval, no telemetry write) — but ONLY
9
+ * after read-only probes confirm the feature is enabled AND the configured
10
+ * provider's store artifact already exists, so no `.swarm/` state (sqlite
11
+ * `memory.db` genesis, WAL/SHM files, migration reports) is ever materialized
12
+ * by a query.
13
+ */
14
+ import type { McpReadTool } from '../registry.js';
15
+ export declare const knowledgeRecallAdapter: McpReadTool;
16
+ export declare const swarmMemoryRecallAdapter: McpReadTool;
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Scope/repo adapters for the read-only MCP surface (#2499).
3
+ *
4
+ * `plan_conflict_check` validates declared-scope disjointness (the
5
+ * scope-validation capability) via `executePlanConflictCheck` — the same
6
+ * exported core the registered tool calls; it reads `.swarm/plan.json` and
7
+ * `.swarm/scopes/` fail-open and writes nothing. `diff` and `symbols` go
8
+ * through the registered production tools (pure reads; `diff` guards
9
+ * non-git roots).
10
+ */
11
+ import type { McpReadTool } from '../registry.js';
12
+ export declare const planConflictCheckAdapter: McpReadTool;
13
+ export declare const diffAdapter: McpReadTool;
14
+ export declare const symbolsAdapter: McpReadTool;
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Verification adapters for the read-only MCP surface (#2499).
3
+ *
4
+ * Each adapter calls the SAME registered production implementation the
5
+ * in-session tool uses — the persistence-free compute cores exported by the
6
+ * tool modules (`computeSyntaxCheck`, `computePlaceholderScan`,
7
+ * `computeSastScan`, `computeQualityBudget`) and the registered
8
+ * `evidence_check` tool (a pure filesystem read). No parallel
9
+ * reimplementation of any verification logic lives here.
10
+ */
11
+ import type { ToolContext } from '@opencode-ai/plugin';
12
+ import type { McpReadTool } from '../registry.js';
13
+ /** Synthetic tool context pinning the MCP server's single configured root. */
14
+ export declare function mcpToolContext(root: string): ToolContext;
15
+ export declare function safeParseJson(text: string): unknown;
16
+ export declare const syntaxCheckAdapter: McpReadTool;
17
+ export declare const placeholderScanAdapter: McpReadTool;
18
+ export declare const sastScanAdapter: McpReadTool;
19
+ export declare const qualityBudgetAdapter: McpReadTool;
20
+ export declare const evidenceCheckAdapter: McpReadTool;
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Response pipeline for the read-only MCP verification surface (#2499).
3
+ *
4
+ * Every tool response leaving the MCP server passes through
5
+ * `applyResponsePipeline`: secrets are redacted FIRST (redacting before
6
+ * bounding matters — truncating first can split a secret pattern in half and
7
+ * defeat redaction), then the serialized payload is bounded so a large
8
+ * corpus can never produce an unbounded MCP response.
9
+ */
10
+ /** Frozen acceptance cap (repro/check-mcp-bounded-output.sh, C8): the
11
+ * JSON-serialized pipeline output may never exceed this many characters. */
12
+ export declare const MCP_MAX_RESPONSE_CHARS = 65536;
13
+ export interface ResponsePipelineResult {
14
+ /** The bounded, redacted serialized form actually sent to the client. */
15
+ text: string;
16
+ /** True when the serialized form was cut to fit the cap. */
17
+ truncated: boolean;
18
+ }
19
+ /**
20
+ * Redact every string in the payload (top-level and nested, including MCP
21
+ * `content` arrays), then bound the serialized output to
22
+ * {@link MCP_MAX_RESPONSE_CHARS} characters. The RETURN VALUE itself is
23
+ * bounded — the full (unbounded) redacted payload never leaves the pipeline.
24
+ */
25
+ export declare function applyResponsePipeline(payload: unknown): ResponsePipelineResult;
@@ -0,0 +1,47 @@
1
+ /**
2
+ * Tool registry for the read-only MCP verification surface (#2499).
3
+ *
4
+ * `buildMcpToolRegistry` composes the read-only tool set for ONE configured
5
+ * project root. Descriptions are sourced from `TOOL_METADATA` — the same
6
+ * registry the plugin host uses — so MCP tool names are a subset of
7
+ * registered tool names with exact description parity (frozen by
8
+ * repro/check-mcp-registry-capability-coverage.sh, C2).
9
+ *
10
+ * The write boundary is fail-closed (frozen by
11
+ * repro/check-mcp-readonly-default-no-writes.sh, C6): every tool name is
12
+ * validated against a write-capable denylist and a match THROWS — with or
13
+ * without `allowWrite`. Phase 1 ships zero write tools; `allowWrite` is the
14
+ * documented forward-compat seam for the #2500 write surface and adds
15
+ * nothing today.
16
+ */
17
+ import type { z } from 'zod';
18
+ /** Write-capable tool-name shapes. Mirrors the frozen C6 denylist. */
19
+ export declare const WRITE_TOOL_NAME_PATTERN: RegExp;
20
+ export interface McpReadTool {
21
+ /** Registered plugin tool name (a TOOL_METADATA key). */
22
+ name: string;
23
+ /** Exact TOOL_METADATA description (parity assigned at build time). */
24
+ description: string;
25
+ kind: 'read';
26
+ /** Argument field names carrying file-path values (containment-checked). */
27
+ pathFields: string[];
28
+ /** MCP input schema (mirrors the registered tool's zod args). */
29
+ inputSchema: z.ZodObject<z.ZodRawShape>;
30
+ execute(args: Record<string, unknown>, root: string): Promise<unknown>;
31
+ }
32
+ export interface McpToolRegistry {
33
+ tools: McpReadTool[];
34
+ }
35
+ export interface BuildMcpToolRegistryOptions {
36
+ /** The single configured project root (one server = one root). */
37
+ root: string;
38
+ /** Alias for `root` (accepted for harness compatibility). */
39
+ directory?: string;
40
+ /**
41
+ * Forward-compat seam for the #2500 explicitly-authorized write surface.
42
+ * Phase 1 has no write tools, so this flag never adds anything; the
43
+ * write-name denylist stays fail-closed either way.
44
+ */
45
+ allowWrite?: boolean;
46
+ }
47
+ export declare function buildMcpToolRegistry(options: BuildMcpToolRegistryOptions): McpToolRegistry;
@@ -0,0 +1,35 @@
1
+ /**
2
+ * MCP stdio server for the read-only verification surface (#2499).
3
+ *
4
+ * One server instance = one configured project root. Every tool call is
5
+ * containment-checked (path arguments must resolve inside the canonical
6
+ * root, including symlink/junction escapes), executed through the registered
7
+ * production implementations, and the response is redacted-then-bounded by
8
+ * the response pipeline before it leaves the server.
9
+ */
10
+ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
11
+ /** Containment rejection carried as a tool-level error result. */
12
+ export declare class McpContainmentError extends Error {
13
+ readonly field: string;
14
+ readonly value: string;
15
+ readonly root: string;
16
+ constructor(field: string, value: string, root: string);
17
+ }
18
+ /** Walk a declared path field's value shape and validate every path. */
19
+ export declare function validatePathField(field: string, value: unknown, root: string): void;
20
+ export interface RunMcpServerOptions {
21
+ root: string;
22
+ allowWrite?: boolean;
23
+ /** Test seam: inject transports instead of stdio (InMemoryTransport pair). */
24
+ transport?: {
25
+ connect(server: unknown): Promise<void>;
26
+ } | undefined;
27
+ version?: string;
28
+ }
29
+ /**
30
+ * Build the MCP server (tools registered, containment + pipeline wired).
31
+ * Exported for unit tests that drive the server over in-memory transports.
32
+ */
33
+ export declare function createMcpServer(options: RunMcpServerOptions): McpServer;
34
+ /** Serve the read-only verification surface over stdio until stdin closes. */
35
+ export declare function runMcpServer(options: RunMcpServerOptions): Promise<number>;
@@ -24,6 +24,14 @@ export interface ProposeMemoryInput {
24
24
  rationale: string;
25
25
  evidenceRefs?: string[];
26
26
  }
27
+ /**
28
+ * Recall options for read-only surfaces. `recordUsage: false` skips the
29
+ * recall-usage telemetry write (the sqlite/jsonl `recordRecallUsage` insert)
30
+ * while keeping the identical retrieval path (#2499).
31
+ */
32
+ export interface RecallUsageOptions {
33
+ recordUsage?: boolean;
34
+ }
27
35
  export interface RecallMemoryInput {
28
36
  query: string;
29
37
  task?: string;
@@ -54,7 +62,7 @@ export declare class MemoryGateway {
54
62
  isEnabled(): boolean;
55
63
  dispose(): Promise<void>;
56
64
  deriveAllowedScopes(): MemoryScopeRef[];
57
- recall(input: RecallMemoryInput): Promise<RecallBundle>;
65
+ recall(input: RecallMemoryInput, options?: RecallUsageOptions): Promise<RecallBundle>;
58
66
  propose(input: ProposeMemoryInput): Promise<MemoryProposal>;
59
67
  /**
60
68
  * Read-only passthroughs used by the consolidation engine. They assert the
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * The event catalog (issue #2029).
3
3
  *
4
- * Exactly 62 entries, matching the `TelemetryEvent` union at
4
+ * Exactly 63 entries, matching the `TelemetryEvent` union at
5
5
  * `src/telemetry.ts:20-172`. Thirty-eight predate the #2029 contract; the 39th is
6
6
  * `agent_conflict_detected` (previously emitted through a force-cast past the
7
7
  * type system), the 40th is `close_archive_result` (issue #2030 — the
@@ -32,7 +32,8 @@
32
32
  * `context_source_attribution` and the 61st is `verdict_row_pipe_recovery` and the 62nd is `training_vault_health`
33
33
  * (issue #2482 — D3: honest savings attribution with the omit-when-unknown
34
34
  * rule, and the #2184 verdict-row pipe-recovery fidelity class in the event
35
- * lifecycle). These late
35
+ * lifecycle). The 63rd is `delegation_read_uncertain` (issue #2511 —
36
+ * bounded advisory-reader uncertainty signal). These late
36
37
  * additions are instances
37
38
  * of the defect class this contract exists to close: an event kind entering
38
39
  * the stream with no registration.
@@ -88,7 +89,7 @@ export interface CatalogEntry {
88
89
  /**
89
90
  * Whether an event of this kind must carry `trace.parentSpanId`.
90
91
  *
91
- * `false` for all 62 entries today, and that is a truthful statement about
92
+ * `false` for all 63 entries today, and that is a truthful statement about
92
93
  * the current system rather than a placeholder: no producer supplies a
93
94
  * parent span, so `createObservation` never sets one. Setting this to `true`
94
95
  * for a kind whose producer cannot supply a parent would make every
@@ -201,6 +201,12 @@ export interface PrReviewTerminalCoverageSettlement {
201
201
  unresolvedDimensions: PrReviewUnresolvedDimensionRecord[];
202
202
  /** False while any dimension still has a live (in-flight) lane. */
203
203
  allLaunchedTerminal: boolean;
204
+ /**
205
+ * Issue #2511: present when a dispatched-set batch read stayed uncertain.
206
+ * Dimensions whose launch evidence is UNKNOWN are carried in
207
+ * `liveDimensions` (blocking settlement) — never labeled NOT_LAUNCHED.
208
+ */
209
+ delegationReadUncertain?: string;
204
210
  }
205
211
  /** Per-dimension explicit cancellation, written by armed recovery (issue #2383). */
206
212
  export interface PrReviewDimensionCancellationRecord {
@@ -291,6 +297,12 @@ export interface PrReviewBaseDimensionAttempts {
291
297
  dedicatedSuccessful: Set<string>;
292
298
  /** Dimensions whose recorded lane ran to a terminal, non-successful end. */
293
299
  terminallyFailed: Set<string>;
300
+ /**
301
+ * Issue #2511: present when a batch's delegation read stayed uncertain.
302
+ * The affected lanes' dimensions are carried in `inFlight` (UNKNOWN, not
303
+ * settled and not absent) so no consumer reads them as dispatchable.
304
+ */
305
+ delegationReadUncertain?: string;
294
306
  }
295
307
  /**
296
308
  * Per-dimension success/failure across every recorded base batch.
@@ -1,7 +1,7 @@
1
1
  import type { ObservabilityEvent } from './observability/envelope.js';
2
2
  import { canonicalLineContent, createObservation, toLegacyTelemetryLine } from './observability/index.js';
3
3
  import type { DelegationCostFields } from './services/cost-accounting.js';
4
- export type TelemetryEvent = 'session_started' | 'session_ended' | 'agent_activated' | 'delegation_begin' | 'delegation_end' | 'delegation_cost_correction' | 'delegation_cost_binding' | 'delegation_cost_join' | 'task_state_changed' | 'gate_passed' | 'gate_failed' | 'gate_parse_error' | 'reviewer_gate_decision' | 'phase_changed' | 'budget_updated' | 'context_pruned' | 'retrieval_routed' | 'model_fallback'
4
+ export type TelemetryEvent = 'session_started' | 'session_ended' | 'agent_activated' | 'delegation_begin' | 'delegation_end' | 'delegation_read_uncertain' | 'delegation_cost_correction' | 'delegation_cost_binding' | 'delegation_cost_join' | 'task_state_changed' | 'gate_passed' | 'gate_failed' | 'gate_parse_error' | 'reviewer_gate_decision' | 'phase_changed' | 'budget_updated' | 'context_pruned' | 'retrieval_routed' | 'model_fallback'
5
5
  /**
6
6
  * Issue #2271 bug 4 — a configured agent model id was POSITIVELY confirmed
7
7
  * unresolvable against the live provider catalog (distinct from a runtime
@@ -170,6 +170,16 @@ export declare const telemetry: {
170
170
  agentActivated(sessionId: string, agentName: string, oldName?: string): void;
171
171
  delegationBegin(sessionId: string, agentName: string, taskId: string): void;
172
172
  delegationEnd(sessionId: string, agentName: string, taskId: string, result: string, costFields?: Partial<DelegationCostFields>): void;
173
+ /**
174
+ * Issue #2511: bounded, content-free signal that an advisory delegation
175
+ * store read stayed uncertain after its one bounded retry. Payload is
176
+ * redaction-by-omission: no paths, no raw reason text, no session content.
177
+ */
178
+ delegationReadUncertain(event: {
179
+ attempt: number;
180
+ reasonCode: string;
181
+ source: string;
182
+ }): void;
173
183
  taskStateChanged(sessionId: string, taskId: string, newState: string, oldState?: string): void;
174
184
  gatePassed(sessionId: string, gate: string, taskId: string): void;
175
185
  gateParseError(taskId: string, error: Error): void;
@@ -193,7 +193,11 @@ export interface DispatchLanesAsyncResult {
193
193
  }
194
194
  export interface CollectLaneResultsResult {
195
195
  success: boolean;
196
- failure_class?: 'invalid_args' | 'not_found' | 'no_client';
196
+ /**
197
+ * 'store_unreadable' (issue #2511) is distinct from 'not_found': the
198
+ * delegation store could not be read, so the batch is UNKNOWN, not absent.
199
+ */
200
+ failure_class?: 'invalid_args' | 'not_found' | 'no_client' | 'store_unreadable';
197
201
  message?: string;
198
202
  batch_id: string;
199
203
  total: number;
@@ -101,6 +101,16 @@ declare function collectNonStubBodyLines(rootNode: any): Set<number>;
101
101
  * Scan files for placeholder content (TODO/FIXME comments, stub implementations, etc.)
102
102
  */
103
103
  export declare function placeholderScan(input: PlaceholderScanInput, directory: string, gateOverrides?: GateConfigOverrides['placeholder_scan']): Promise<PlaceholderScanResult>;
104
+ /**
105
+ * Persistence-free compute core of the placeholder scan (#2499).
106
+ *
107
+ * Never persists evidence unless `persistEvidence: true` is passed, so
108
+ * read-only surfaces (the MCP verification server) can run the exact same
109
+ * analysis without writing `.swarm/` state.
110
+ */
111
+ export declare function computePlaceholderScan(input: PlaceholderScanInput, directory: string, gateOverrides?: GateConfigOverrides['placeholder_scan'], options?: {
112
+ persistEvidence?: boolean;
113
+ }): Promise<PlaceholderScanResult>;
104
114
  export declare const placeholder_scan: ReturnType<typeof tool>;
105
115
  /**
106
116
  * Internal seam for direct testing of the body-shape walker without
@@ -1,6 +1,9 @@
1
+ import { readDelegationsDetailed } from '../background/pending-delegations';
1
2
  import { resolveCurrentGitHeadAsync, resolveIsWorkingTreeCleanAsync } from '../background/workspace-snapshot';
2
3
  import { classifyPrWorkflowGitState } from '../git/pr-workflow-state';
4
+ import { isPrWorkflowAutoWakeSuppressed } from '../hooks/pr-workflow-auto-wake';
3
5
  import { readPrWorkflowGateStateForRecovery } from '../hooks/pr-workflow-gate';
6
+ import { resolvePrWorkflowControllerSession } from '../hooks/pr-workflow-session-resolver';
4
7
  import { createSwarmTool } from './create-tool';
5
8
  /**
6
9
  * Truncate to an exact UTF-8 byte budget. `String.prototype.length`/`.slice`
@@ -22,6 +25,9 @@ export declare const pr_workflow_status: ReturnType<typeof createSwarmTool>;
22
25
  /** Test seam mirroring gh-evidence's `_internals` (issue #507 DI convention). */
23
26
  export declare const _internals: {
24
27
  readPrWorkflowGateStateForRecovery: typeof readPrWorkflowGateStateForRecovery;
28
+ readDelegationsDetailed: typeof readDelegationsDetailed;
29
+ isPrWorkflowAutoWakeSuppressed: typeof isPrWorkflowAutoWakeSuppressed;
30
+ resolvePrWorkflowControllerSession: typeof resolvePrWorkflowControllerSession;
25
31
  resolveCurrentGitHeadAsync: typeof resolveCurrentGitHeadAsync;
26
32
  resolveIsWorkingTreeCleanAsync: typeof resolveIsWorkingTreeCleanAsync;
27
33
  runGitCapture: typeof runGitCapture;
@@ -24,6 +24,16 @@ export interface QualityBudgetResult {
24
24
  * and compares against configured thresholds to ensure code quality.
25
25
  */
26
26
  export declare function qualityBudget(input: QualityBudgetInput, directory: string, abortSignal?: AbortSignal): Promise<QualityBudgetResult>;
27
+ /**
28
+ * Persistence-free compute core of the quality budget check (#2499).
29
+ *
30
+ * Never persists evidence unless `persistEvidence: true` is passed, so
31
+ * read-only surfaces (the MCP verification server) can run the exact same
32
+ * analysis without writing `.swarm/` state.
33
+ */
34
+ export declare function computeQualityBudget(input: QualityBudgetInput, directory: string, abortSignal?: AbortSignal, options?: {
35
+ persistEvidence?: boolean;
36
+ }): Promise<QualityBudgetResult>;
27
37
  export declare const quality_budget: ReturnType<typeof tool>;
28
38
  /**
29
39
  * DI seam for testability. Contains all test-mocked exports.
@@ -12,6 +12,11 @@ export declare const _internals: {
12
12
  agentActivated(sessionId: string, agentName: string, oldName?: string): void;
13
13
  delegationBegin(sessionId: string, agentName: string, taskId: string): void;
14
14
  delegationEnd(sessionId: string, agentName: string, taskId: string, result: string, costFields?: Partial<import("../services/cost-accounting").DelegationCostFields>): void;
15
+ delegationReadUncertain(event: {
16
+ attempt: number;
17
+ reasonCode: string;
18
+ source: string;
19
+ }): void;
15
20
  taskStateChanged(sessionId: string, taskId: string, newState: string, oldState?: string): void;
16
21
  gatePassed(sessionId: string, gate: string, taskId: string): void;
17
22
  gateParseError(taskId: string, error: Error): void;
@@ -129,6 +129,17 @@ export interface SastScanFinding {
129
129
  * - Tier B: Semgrep (optional, if available on PATH)
130
130
  */
131
131
  export declare function sastScan(input: SastScanInput, directory: string, gates?: GateConfigOverrides): Promise<SastScanResult>;
132
+ /**
133
+ * Persistence-free compute core of the SAST scan (#2499).
134
+ *
135
+ * Never persists evidence unless `persistEvidence: true` is passed, so
136
+ * read-only surfaces (the MCP verification server) can run the exact same
137
+ * analysis without writing `.swarm/` state. The MCP adapter also forces
138
+ * `offline_only: true` so no Semgrep subprocess is ever spawned.
139
+ */
140
+ export declare function computeSastScan(input: SastScanInput, directory: string, gates?: GateConfigOverrides, options?: {
141
+ persistEvidence?: boolean;
142
+ }): Promise<SastScanResult>;
132
143
  /**
133
144
  * SAST Scan tool - Static Application Security Testing
134
145
  * Scans changed files for security vulnerabilities using:
@@ -3,6 +3,18 @@ import { createMemoryGateway } from '../memory';
3
3
  import { getAgentSession } from '../state';
4
4
  import { createSwarmTool } from './create-tool';
5
5
  export declare const swarm_memory_recall: ReturnType<typeof createSwarmTool>;
6
+ /**
7
+ * Compute core for `swarm_memory_recall` (#2499). The registered tool wraps
8
+ * this with default options so its behavior is byte-identical; the read-only
9
+ * MCP surface calls it with `{recordUsage: false}` so a query performs the
10
+ * identical retrieval without the recall-usage telemetry write.
11
+ */
12
+ export declare function computeSwarmMemoryRecall(args: unknown, directory: string, ctx: {
13
+ sessionID?: string;
14
+ agent?: unknown;
15
+ } | undefined, options?: {
16
+ recordUsage?: boolean;
17
+ }): Promise<string>;
6
18
  export declare const _internals: {
7
19
  loadPluginConfigWithMeta: typeof loadPluginConfigWithMeta;
8
20
  createMemoryGateway: typeof createMemoryGateway;
@@ -39,7 +39,18 @@ export interface SyntaxCheckResult {
39
39
  /**
40
40
  * Run syntax check on changed files
41
41
  *
42
- * Respects gates.syntax_check.enabled - returns skipped if disabled
42
+ * Respects gates.syntax_check.enabled - returns skipped if disabled.
43
+ * Persists evidence (the registered tool's contract).
43
44
  */
44
45
  export declare function syntaxCheck(input: SyntaxCheckInput, directory: string, gates?: GateConfigOverrides): Promise<SyntaxCheckResult>;
46
+ /**
47
+ * Persistence-free compute core of the syntax check (#2499).
48
+ *
49
+ * Never persists evidence unless `persistEvidence: true` is passed, so
50
+ * read-only surfaces (the MCP verification server) can run the exact same
51
+ * analysis without writing `.swarm/` state.
52
+ */
53
+ export declare function computeSyntaxCheck(input: SyntaxCheckInput, directory: string, gates?: GateConfigOverrides, options?: {
54
+ persistEvidence?: boolean;
55
+ }): Promise<SyntaxCheckResult>;
45
56
  export declare const syntax_check: ReturnType<typeof tool>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-swarm",
3
- "version": "7.171.2",
3
+ "version": "7.172.0",
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",
@@ -137,6 +137,7 @@
137
137
  "check:retrieval-quality": "bun run scripts/retrieval-quality-regression.ts"
138
138
  },
139
139
  "dependencies": {
140
+ "@modelcontextprotocol/sdk": "^1.30.0",
140
141
  "@opencode-ai/plugin": "^1.18.3",
141
142
  "@opencode-ai/sdk": "^1.18.3",
142
143
  "@vscode/tree-sitter-wasm": "^0.3.0",
@@ -1,72 +0,0 @@
1
- // @bun
2
- import {
3
- createCuratorLLMDelegate
4
- } from "./index-f1rj1j8t.js";
5
- import"./index-5400m33a.js";
6
- import"./index-er6sk4e6.js";
7
- import"./index-dsgc303n.js";
8
- import"./index-kb66he4e.js";
9
- import"./index-qdy4a48x.js";
10
- import"./index-vqb65csb.js";
11
- import"./index-3jcp3zb6.js";
12
- import"./index-txdagbh7.js";
13
- import"./index-9br68j86.js";
14
- import"./index-cw912re7.js";
15
- import"./index-d79q2f8z.js";
16
- import"./index-0yffa3np.js";
17
- import"./index-04ph4jp2.js";
18
- import"./index-fyfbpz4f.js";
19
- import"./index-7qqwx64h.js";
20
- import"./index-0hgmsyfp.js";
21
- import"./index-zsrtt42s.js";
22
- import"./index-gq2zdxep.js";
23
- import"./index-fhh02gwx.js";
24
- import"./index-nyn01yrz.js";
25
- import"./index-b43rt5ph.js";
26
- import"./index-q7sjgr1y.js";
27
- import"./index-rrc08h4q.js";
28
- import"./index-mazy938h.js";
29
- import"./index-qcy7eg6z.js";
30
- import"./index-9txyxbqc.js";
31
- import"./index-b3pmzbh1.js";
32
- import"./index-2s7dvzff.js";
33
- import"./index-wfh89qct.js";
34
- import"./index-0caqxnby.js";
35
- import"./index-rtry5xyf.js";
36
- import"./index-e7yv4xw1.js";
37
- import"./index-3qf1vxtb.js";
38
- import"./index-n832052r.js";
39
- import"./index-j6rq132j.js";
40
- import"./index-2ryy0cwt.js";
41
- import"./index-6k5aq7b9.js";
42
- import"./index-aa2eyfvr.js";
43
- import"./index-g6nen3gt.js";
44
- import"./index-yqbnsmmv.js";
45
- import"./index-rdm3px0g.js";
46
- import"./index-ry16d01s.js";
47
- import"./index-nfs78aqj.js";
48
- import"./index-r60cw2jt.js";
49
- import"./index-vzm6zre7.js";
50
- import"./index-ae75rja9.js";
51
- import"./index-95e3a9en.js";
52
- import"./index-evxd1art.js";
53
- import"./index-7g4c7s5r.js";
54
- import"./index-9dz2ee2g.js";
55
- import"./index-nbdmdyke.js";
56
- import"./index-1xnse449.js";
57
- import"./index-ee6ydtfe.js";
58
- import"./index-5a8q4qr5.js";
59
- import"./index-0mhftbpp.js";
60
- import"./index-a1w58b47.js";
61
- import"./index-q2yk70rs.js";
62
- import"./index-sxt7fgcw.js";
63
- import"./index-bk5tah7q.js";
64
- import"./index-bpmtbmy9.js";
65
- import"./index-zpsr8rpc.js";
66
- import"./index-76qm2c2y.js";
67
- import"./index-yzjaj53h.js";
68
- import"./index-zgwm4ryv.js";
69
- import"./index-a76rekgs.js";
70
- export {
71
- createCuratorLLMDelegate
72
- };
@@ -1,73 +0,0 @@
1
- // @bun
2
- import {
3
- handleGuardrailExplain
4
- } from "./index-7hnjs7tf.js";
5
- import"./index-f1rj1j8t.js";
6
- import"./index-5400m33a.js";
7
- import"./index-er6sk4e6.js";
8
- import"./index-dsgc303n.js";
9
- import"./index-kb66he4e.js";
10
- import"./index-qdy4a48x.js";
11
- import"./index-vqb65csb.js";
12
- import"./index-3jcp3zb6.js";
13
- import"./index-txdagbh7.js";
14
- import"./index-9br68j86.js";
15
- import"./index-cw912re7.js";
16
- import"./index-d79q2f8z.js";
17
- import"./index-0yffa3np.js";
18
- import"./index-04ph4jp2.js";
19
- import"./index-fyfbpz4f.js";
20
- import"./index-7qqwx64h.js";
21
- import"./index-0hgmsyfp.js";
22
- import"./index-zsrtt42s.js";
23
- import"./index-gq2zdxep.js";
24
- import"./index-fhh02gwx.js";
25
- import"./index-nyn01yrz.js";
26
- import"./index-b43rt5ph.js";
27
- import"./index-q7sjgr1y.js";
28
- import"./index-rrc08h4q.js";
29
- import"./index-mazy938h.js";
30
- import"./index-qcy7eg6z.js";
31
- import"./index-9txyxbqc.js";
32
- import"./index-b3pmzbh1.js";
33
- import"./index-2s7dvzff.js";
34
- import"./index-wfh89qct.js";
35
- import"./index-0caqxnby.js";
36
- import"./index-rtry5xyf.js";
37
- import"./index-e7yv4xw1.js";
38
- import"./index-3qf1vxtb.js";
39
- import"./index-n832052r.js";
40
- import"./index-j6rq132j.js";
41
- import"./index-2ryy0cwt.js";
42
- import"./index-6k5aq7b9.js";
43
- import"./index-aa2eyfvr.js";
44
- import"./index-g6nen3gt.js";
45
- import"./index-yqbnsmmv.js";
46
- import"./index-rdm3px0g.js";
47
- import"./index-ry16d01s.js";
48
- import"./index-nfs78aqj.js";
49
- import"./index-r60cw2jt.js";
50
- import"./index-vzm6zre7.js";
51
- import"./index-ae75rja9.js";
52
- import"./index-95e3a9en.js";
53
- import"./index-evxd1art.js";
54
- import"./index-7g4c7s5r.js";
55
- import"./index-9dz2ee2g.js";
56
- import"./index-nbdmdyke.js";
57
- import"./index-1xnse449.js";
58
- import"./index-ee6ydtfe.js";
59
- import"./index-5a8q4qr5.js";
60
- import"./index-0mhftbpp.js";
61
- import"./index-a1w58b47.js";
62
- import"./index-q2yk70rs.js";
63
- import"./index-sxt7fgcw.js";
64
- import"./index-bk5tah7q.js";
65
- import"./index-bpmtbmy9.js";
66
- import"./index-zpsr8rpc.js";
67
- import"./index-76qm2c2y.js";
68
- import"./index-yzjaj53h.js";
69
- import"./index-zgwm4ryv.js";
70
- import"./index-a76rekgs.js";
71
- export {
72
- handleGuardrailExplain
73
- };
@@ -1,23 +0,0 @@
1
- // @bun
2
- import {
3
- handleGuardrailLog
4
- } from "./index-11gz0few.js";
5
- import"./index-dsgc303n.js";
6
- import"./index-2s7dvzff.js";
7
- import"./index-6k5aq7b9.js";
8
- import"./index-nfs78aqj.js";
9
- import"./index-9dz2ee2g.js";
10
- import"./index-nbdmdyke.js";
11
- import"./index-1xnse449.js";
12
- import"./index-ee6ydtfe.js";
13
- import"./index-q2yk70rs.js";
14
- import"./index-sxt7fgcw.js";
15
- import"./index-bk5tah7q.js";
16
- import"./index-bpmtbmy9.js";
17
- import"./index-zpsr8rpc.js";
18
- import"./index-yzjaj53h.js";
19
- import"./index-zgwm4ryv.js";
20
- import"./index-a76rekgs.js";
21
- export {
22
- handleGuardrailLog
23
- };