opencode-swarm 7.145.0 → 7.145.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 (71) hide show
  1. package/dist/background/workspace-snapshot.d.ts +29 -0
  2. package/dist/cli/{config-doctor-dzsv3pqy.js → config-doctor-96jmxr7s.js} +3 -3
  3. package/dist/cli/{core-qkh9me8x.js → core-w78pc1hh.js} +3 -3
  4. package/dist/cli/{curation-policy-5x6346tf.js → curation-policy-smyc2mrm.js} +5 -5
  5. package/dist/cli/{curator-zssndq5x.js → curator-59hzdxrv.js} +30 -30
  6. package/dist/cli/{curator-llm-factory-q5p4578g.js → curator-llm-factory-g794pv51.js} +30 -30
  7. package/dist/cli/{evidence-summary-service-dqcpapj8.js → evidence-summary-service-41m0cna6.js} +13 -13
  8. package/dist/cli/{gate-evidence-bkdqryqg.js → gate-evidence-7aywx7qa.js} +8 -8
  9. package/dist/cli/{guardrail-explain-kspf83x5.js → guardrail-explain-j88dhm6w.js} +31 -31
  10. package/dist/cli/{guardrail-log-qg4sq6gr.js → guardrail-log-xcb3ke8s.js} +4 -4
  11. package/dist/cli/{hive-promoter-3h7dhnek.js → hive-promoter-nnnx5692.js} +30 -30
  12. package/dist/cli/{index-0pcq32y2.js → index-17e73wac.js} +1 -1
  13. package/dist/cli/{index-4e5a28h7.js → index-19v4tccw.js} +2 -2
  14. package/dist/cli/{index-fp464as8.js → index-2qrd8mfa.js} +1 -1
  15. package/dist/cli/{index-wk54ey3h.js → index-34tawmyx.js} +1 -1
  16. package/dist/cli/{index-s6cwsnrw.js → index-41t3hgaa.js} +10 -10
  17. package/dist/cli/{index-zfhe7vbb.js → index-7axx11dt.js} +1 -1
  18. package/dist/cli/{index-h4hasck4.js → index-8ef23wex.js} +4 -4
  19. package/dist/cli/{index-4zwjc9sb.js → index-90w06fqr.js} +100 -3
  20. package/dist/cli/{index-kp87kr1a.js → index-b7ntt9cw.js} +3 -3
  21. package/dist/cli/{index-6ezbzd5e.js → index-bst6epnr.js} +298 -160
  22. package/dist/cli/{index-apjdytwx.js → index-cqfp05jb.js} +3 -3
  23. package/dist/cli/{index-zz5qsjd1.js → index-dppzthm9.js} +64 -36
  24. package/dist/cli/{index-s72naw1j.js → index-dzan8czb.js} +1 -1
  25. package/dist/cli/{index-e00wbqw5.js → index-evpgszmp.js} +2 -2
  26. package/dist/cli/{index-c13ttmak.js → index-ff66fbjt.js} +10 -10
  27. package/dist/cli/{index-jy9bwa9k.js → index-fwnhh6s7.js} +2 -2
  28. package/dist/cli/{index-77ef8gye.js → index-gey2257h.js} +1 -1
  29. package/dist/cli/{index-pa86tpgt.js → index-gf03198s.js} +1 -1
  30. package/dist/cli/{index-v64kjqvg.js → index-kxzgnz2h.js} +17 -17
  31. package/dist/cli/{index-6q3agdmr.js → index-mpf01swm.js} +1 -1
  32. package/dist/cli/{index-mkks7jwg.js → index-mrkgxfeh.js} +3 -3
  33. package/dist/cli/{index-7g276m9m.js → index-neh8azwc.js} +2 -2
  34. package/dist/cli/{index-qfawexc8.js → index-qpke2x5h.js} +6 -6
  35. package/dist/cli/{index-ffdwj1an.js → index-rtkttser.js} +1 -1
  36. package/dist/cli/{index-b3xret0a.js → index-sfemjcb8.js} +5 -5
  37. package/dist/cli/{index-k6pdsct6.js → index-tm0bezd9.js} +1 -1
  38. package/dist/cli/{index-0jr9zn34.js → index-tw8ck794.js} +1 -1
  39. package/dist/cli/{index-hfzcztv6.js → index-xz4x17z0.js} +32 -32
  40. package/dist/cli/{index-2dnqazyr.js → index-ymyke19q.js} +1 -1
  41. package/dist/cli/{index-b30x236n.js → index-z9yhhk6q.js} +96 -8
  42. package/dist/cli/{index-6hqhyb0f.js → index-zpp507z0.js} +18 -4
  43. package/dist/cli/index.js +30 -30
  44. package/dist/cli/{knowledge-escalator-w1mbaktt.js → knowledge-escalator-s6acdpwj.js} +13 -13
  45. package/dist/cli/{knowledge-events-a0dj6gy6.js → knowledge-events-jprkz49t.js} +11 -11
  46. package/dist/cli/{knowledge-link-mzdjvjsd.js → knowledge-link-zvtmj756.js} +4 -4
  47. package/dist/cli/{knowledge-store-8kk3rghx.js → knowledge-store-mc4awds4.js} +5 -5
  48. package/dist/cli/{knowledge-validator-91ym56e0.js → knowledge-validator-pe4ncrvj.js} +7 -7
  49. package/dist/cli/model-preflight-77dwxfv5.js +170 -0
  50. package/dist/cli/{pending-delegations-6vsrmw5w.js → pending-delegations-epzht3d7.js} +3 -3
  51. package/dist/cli/{pr-subscriptions-zc3skxde.js → pr-subscriptions-2ahy8g87.js} +3 -3
  52. package/dist/cli/{runner-jj32v8bk.js → runner-ra9pjhp2.js} +5 -5
  53. package/dist/cli/{scan-cursor-12jxwd14.js → scan-cursor-hdzhqwzj.js} +6 -6
  54. package/dist/cli/{schema-nq9tcz87.js → schema-pg85z06v.js} +1 -1
  55. package/dist/cli/{scope-persistence-dv6z7n08.js → scope-persistence-v8we8ja7.js} +9 -6
  56. package/dist/cli/{skill-generator-drscnzq9.js → skill-generator-ctskfct2.js} +15 -15
  57. package/dist/cli/{telemetry-z54dgdrh.js → telemetry-c21dgffc.js} +1 -1
  58. package/dist/cli/{workspace-snapshot-q21mgbsh.js → workspace-snapshot-kznz5e13.js} +4 -2
  59. package/dist/cli/{worktree-collision-ownership-rfyyjjct.js → worktree-collision-ownership-f7se4wbf.js} +8 -8
  60. package/dist/cli/{worktree-isolation-4tehtym5.js → worktree-isolation-j4qb7mgb.js} +32 -30
  61. package/dist/hooks/delegation-gate/worktree-isolation.d.ts +4 -0
  62. package/dist/index.js +307 -293
  63. package/dist/observability/catalog.d.ts +2 -2
  64. package/dist/scope/scope-binding.d.ts +16 -0
  65. package/dist/services/model-preflight.d.ts +151 -0
  66. package/dist/services/session-reflection.d.ts +24 -0
  67. package/dist/telemetry.d.ts +12 -1
  68. package/dist/tools/placeholder-scan.d.ts +64 -0
  69. package/dist/tools/sast-scan.d.ts +6 -0
  70. package/package.json +1 -1
  71. package/dist/cli/{curator-drift-yn5d0mvq.js → curator-drift-r50x1rac.js} +1 -1
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * The event catalog (issue #2029).
3
3
  *
4
- * Exactly 44 entries, matching the `TelemetryEvent` union at
4
+ * Exactly 45 entries, matching the `TelemetryEvent` union at
5
5
  * `src/telemetry.ts:15-92`. 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
@@ -65,7 +65,7 @@ export interface CatalogEntry {
65
65
  /**
66
66
  * Whether an event of this kind must carry `trace.parentSpanId`.
67
67
  *
68
- * `false` for all 44 entries today, and that is a truthful statement about
68
+ * `false` for all 45 entries today, and that is a truthful statement about
69
69
  * the current system rather than a placeholder: no producer supplies a
70
70
  * parent span, so `createObservation` never sets one. Setting this to `true`
71
71
  * for a kind whose producer cannot supply a parent would make every
@@ -198,6 +198,22 @@ export declare function clearExactScopeBinding(input: {
198
198
  }): ScopeBinding | null;
199
199
  export declare function installScopeBindingTombstone(binding: ScopeBinding): void;
200
200
  export declare function hasScopeBindingDenyOverlay(binding: ScopeBinding): boolean;
201
+ /**
202
+ * Issue #2271 bug 5: deny check that ignores purely time-based (sweep)
203
+ * tombstones. `sweepExpired` installs an 'expired'-lifecycle tombstone at
204
+ * revision+1 for every lapsed generation on ANY scope read — that is not a
205
+ * deliberate denial, and the durable CAS in the idle-revival path re-verifies
206
+ * the on-disk generation anyway. Deliberate revocation classes
207
+ * ('revoked'/'superseded') and any failed-revocation overlay still deny.
208
+ */
209
+ export declare function hasDeliberateScopeBindingDenyOverlay(binding: ScopeBinding): boolean;
210
+ /**
211
+ * Issue #2271 bug 5: remove a sweep-signature tombstone so a durable-CAS
212
+ * revival can be admitted in memory. Only 'expired'-lifecycle tombstones at
213
+ * or below the revived revision are cleared — deliberate revocations and any
214
+ * newer overlay are preserved.
215
+ */
216
+ export declare function clearSweepTombstoneForRevival(binding: ScopeBinding): void;
201
217
  /** Fail-closed overlay used only when durable revocation cannot be verified. */
202
218
  export declare function installFailedRevocationOverlay(binding: ScopeBinding, reason: Exclude<ScopeBindingLifecycleState, 'live'>): boolean;
203
219
  /**
@@ -0,0 +1,151 @@
1
+ /**
2
+ * Agent model-resolution preflight (issue #2271 bug 4).
3
+ *
4
+ * Agent model strings (DEFAULT_MODELS plus user `agents.<role>.model`
5
+ * overrides) are handed to the OpenCode host unvalidated. When one does not
6
+ * resolve ("Model not found", "Forbidden"), dispatch-lanes classifies the
7
+ * failure as permanent, the affected agent never runs, and the plan-critic
8
+ * gate wedges into manual `approve_plan_critic` overrides because no APPROVED
9
+ * verdict is ever produced.
10
+ *
11
+ * This module validates configured model IDs against the live provider
12
+ * catalog (`client.provider.list()`). Every check is FAIL-OPEN: if the catalog
13
+ * is unreachable or malformed, results come back `unknown` and callers must
14
+ * proceed — the preflight only acts on a POSITIVE confirmation that a model
15
+ * does not resolve.
16
+ */
17
+ import type { OpencodeClient } from '@opencode-ai/sdk';
18
+ import type { PluginConfig } from '../config/schema.js';
19
+ /** Tight bound for the catalog HTTP call — it runs on init/doctor paths. */
20
+ export declare const PROVIDER_LIST_TIMEOUT_MS = 2000;
21
+ export interface ConfiguredAgentModel {
22
+ /** Agent role the model is configured for. */
23
+ agent: string;
24
+ /** Full model id in `provider/model` form. */
25
+ model: string;
26
+ /** Where the value came from. */
27
+ source: 'default' | 'override' | 'fallback';
28
+ }
29
+ export type ModelResolutionStatus = 'ok' | 'unresolved' | 'unknown';
30
+ export interface ModelResolution {
31
+ agent: string;
32
+ model: string;
33
+ source: ConfiguredAgentModel['source'];
34
+ status: ModelResolutionStatus;
35
+ /** Human-readable explanation for non-ok statuses. */
36
+ detail?: string;
37
+ }
38
+ export interface ModelPreflightResult {
39
+ /** False when the catalog could not be fetched — every entry is `unknown`. */
40
+ catalogAvailable: boolean;
41
+ resolutions: ModelResolution[];
42
+ }
43
+ /**
44
+ * Split a model id into its provider and model parts. Returns null for ids
45
+ * without a provider prefix (e.g. a bare model name) — those cannot be
46
+ * validated against a provider catalog.
47
+ */
48
+ export declare function splitModelId(model: string): {
49
+ provider: string;
50
+ model: string;
51
+ } | null;
52
+ /**
53
+ * Collect every model id the swarm could dispatch with: DEFAULT_MODELS
54
+ * entries, user agent overrides, and declared fallback_models. Overriding one
55
+ * role replaces its default (mirrors getModelForAgent precedence).
56
+ */
57
+ export declare function collectConfiguredAgentModels(config?: PluginConfig): ConfiguredAgentModel[];
58
+ /** Provider catalog snapshot: provider id → set of model ids. */
59
+ export type ProviderCatalog = Map<string, Set<string>>;
60
+ /** Test/gate seam: drop the cached catalogs (used after config changes and denials). */
61
+ export declare function invalidateProviderCatalogCache(): void;
62
+ /**
63
+ * Fetch the provider catalog. Returns null when the catalog cannot be
64
+ * obtained or parsed — callers fail open on null.
65
+ */
66
+ export declare function fetchProviderCatalog(client: OpencodeClient | null): Promise<ProviderCatalog | null>;
67
+ /**
68
+ * Validate collected models against a catalog. A model whose provider is
69
+ * absent from the catalog, or whose provider exists but does not list the
70
+ * model, is `unresolved` — but only when the catalog itself was successfully
71
+ * fetched (callers must treat a null catalog as fail-open, never unresolved).
72
+ */
73
+ export declare function resolveAgainstCatalog(models: ConfiguredAgentModel[], catalog: ProviderCatalog | null): ModelPreflightResult;
74
+ /**
75
+ * End-to-end preflight: collect configured models, fetch the catalog, and
76
+ * resolve. Fail-open on every catalog error.
77
+ */
78
+ export declare function runModelPreflight(config: PluginConfig | undefined, client: OpencodeClient | null): Promise<ModelPreflightResult>;
79
+ /**
80
+ * Resolves a single model id against the live catalog for gate preflights.
81
+ * Returns 'unknown' whenever the catalog cannot be fetched — gates must only
82
+ * block on 'unresolved'.
83
+ */
84
+ export declare function checkSingleModelResolution(model: string, client: OpencodeClient | null): Promise<ModelResolutionStatus>;
85
+ export declare const _internals: {
86
+ /** Injectable seam for the SDK catalog call (tests substitute this). */
87
+ providerList: (client: OpencodeClient) => Promise<({
88
+ data: undefined;
89
+ error: unknown;
90
+ } | {
91
+ data: {
92
+ all: Array<{
93
+ api?: string;
94
+ name: string;
95
+ env: Array<string>;
96
+ id: string;
97
+ npm?: string;
98
+ models: {
99
+ [key: string]: {
100
+ id: string;
101
+ name: string;
102
+ release_date: string;
103
+ attachment: boolean;
104
+ reasoning: boolean;
105
+ temperature: boolean;
106
+ tool_call: boolean;
107
+ cost?: {
108
+ input: number;
109
+ output: number;
110
+ cache_read?: number;
111
+ cache_write?: number;
112
+ context_over_200k?: {
113
+ input: number;
114
+ output: number;
115
+ cache_read?: number;
116
+ cache_write?: number;
117
+ };
118
+ };
119
+ limit: {
120
+ context: number;
121
+ output: number;
122
+ };
123
+ modalities?: {
124
+ input: Array<"text" | "audio" | "image" | "video" | "pdf">;
125
+ output: Array<"text" | "audio" | "image" | "video" | "pdf">;
126
+ };
127
+ experimental?: boolean;
128
+ status?: "alpha" | "beta" | "deprecated" | "active";
129
+ options: {
130
+ [key: string]: unknown;
131
+ };
132
+ headers?: {
133
+ [key: string]: string;
134
+ };
135
+ provider?: {
136
+ npm: string;
137
+ };
138
+ };
139
+ };
140
+ }>;
141
+ default: {
142
+ [key: string]: string;
143
+ };
144
+ connected: Array<string>;
145
+ };
146
+ error: undefined;
147
+ }) & {
148
+ request: Request;
149
+ response: Response;
150
+ }>;
151
+ };
@@ -109,6 +109,14 @@ export interface SessionReflectionData {
109
109
  knowledgeDelta?: KnowledgeDelta;
110
110
  skillViolations: SkillViolationSignal[];
111
111
  contradictionCandidates: ContradictionCandidate[];
112
+ /**
113
+ * Issue #2271 bug 6: rejection/circuit-breaker/manual-approval event counts
114
+ * by type, read from the session ledger (.swarm/events.jsonl). Gate denials
115
+ * throw in tool.execute.before and never increment ToolAggregate counters
116
+ * (denied calls do not fire toolAfter), so without this field a session
117
+ * full of gate rejections reports "0 tool failures or gate rejections".
118
+ */
119
+ ledgerRejections?: Record<string, number>;
112
120
  }
113
121
  export interface SessionReflectionResult {
114
122
  data: SessionReflectionData;
@@ -138,6 +146,21 @@ declare function gatherRetroLessonsAndTaxonomy(directory: string): Promise<{
138
146
  taxonomy: Record<string, number>;
139
147
  }>;
140
148
  declare function gatherGateFailures(directory: string): Promise<GateFailureSummary[]>;
149
+ /**
150
+ * Count rejection-class events in the session ledger. Reads the LIVE
151
+ * .swarm/events.jsonl first (finalize runs before archive in the close
152
+ * pipeline), falling back to the newest archived copy for a partially-run
153
+ * prior close. Fail-open: any read/parse problem yields empty counts.
154
+ *
155
+ * When `sessionId` is provided, events carrying a DIFFERENT session id are
156
+ * ignored so a per-session close summary cannot overcount sibling sessions'
157
+ * rejections in multi-swarm projects. Events with NO session field are still
158
+ * counted: several rejection writers emit none (coder_retry_circuit_breaker,
159
+ * architect_loop_detected), a sessionless event cannot be attributed to a
160
+ * sibling session, and dropping them would resurrect the bug-6 undercount in
161
+ * the standard close flow.
162
+ */
163
+ declare function gatherLedgerRejections(directory: string, sessionId?: string): Promise<Record<string, number>>;
141
164
  /**
142
165
  * Top skills by violation this session (issue #2077).
143
166
  *
@@ -242,6 +265,7 @@ export declare const _internals: {
242
265
  gatherAgentDispatches: typeof gatherAgentDispatches;
243
266
  gatherRetroLessonsAndTaxonomy: typeof gatherRetroLessonsAndTaxonomy;
244
267
  gatherGateFailures: typeof gatherGateFailures;
268
+ gatherLedgerRejections: typeof gatherLedgerRejections;
245
269
  buildReflectionDataSummary: typeof buildReflectionDataSummary;
246
270
  buildDeterministicReport: typeof buildDeterministicReport;
247
271
  gatherSkillViolations: typeof gatherSkillViolations;
@@ -1,6 +1,12 @@
1
1
  import { createObservation, toLegacyTelemetryLine } from './observability/index.js';
2
2
  import type { DelegationCostFields } from './services/cost-accounting.js';
3
- export type TelemetryEvent = 'session_started' | 'session_ended' | 'agent_activated' | 'delegation_begin' | 'delegation_end' | 'task_state_changed' | 'gate_passed' | 'gate_failed' | 'gate_parse_error' | 'reviewer_gate_decision' | 'phase_changed' | 'budget_updated' | 'context_pruned' | 'model_fallback' | 'hard_limit_hit' | 'revision_limit_hit' | 'loop_detected' | 'no_op_strong_warning' | 'scope_violation' | 'qa_skip_violation' | 'heartbeat' | 'turbo_mode_changed' | 'auto_oversight_escalation' | 'environment_detected' | 'evidence_lock_acquired' | 'evidence_lock_contended' | 'evidence_lock_stale_recovered' | 'plan_ledger_cas_retry' | 'plan_md_write_failed' | 'snapshot_failed' | 'gate_denial_loop'
3
+ export type TelemetryEvent = 'session_started' | 'session_ended' | 'agent_activated' | 'delegation_begin' | 'delegation_end' | 'task_state_changed' | 'gate_passed' | 'gate_failed' | 'gate_parse_error' | 'reviewer_gate_decision' | 'phase_changed' | 'budget_updated' | 'context_pruned' | 'model_fallback'
4
+ /**
5
+ * Issue #2271 bug 4 — a configured agent model id was POSITIVELY confirmed
6
+ * unresolvable against the live provider catalog (distinct from a runtime
7
+ * model_fallback: this fires at preflight, before any dispatch attempt).
8
+ */
9
+ | 'model_unresolved' | 'hard_limit_hit' | 'revision_limit_hit' | 'loop_detected' | 'no_op_strong_warning' | 'scope_violation' | 'qa_skip_violation' | 'heartbeat' | 'turbo_mode_changed' | 'auto_oversight_escalation' | 'environment_detected' | 'evidence_lock_acquired' | 'evidence_lock_contended' | 'evidence_lock_stale_recovered' | 'plan_ledger_cas_retry' | 'plan_md_write_failed' | 'snapshot_failed' | 'gate_denial_loop'
4
10
  /**
5
11
  * Issue #2063 B5 — an ARMED execution episode reached the advisory rung:
6
12
  * `execution_stall_warn_calls` tool calls with no delegation completion, no
@@ -133,6 +139,11 @@ export declare const telemetry: {
133
139
  prunedTokensFreed: number;
134
140
  }): void;
135
141
  modelFallback(sessionId: string, agentName: string, fromModel: string, toModel: string, reason: string): void;
142
+ /**
143
+ * Issue #2271 bug 4 — preflight confirmed a configured model id does not
144
+ * resolve against the provider catalog. Emitted once per detected model.
145
+ */
146
+ modelUnresolved(agentName: string, model: string, detail: string): void;
136
147
  hardLimitHit(sessionId: string, agentName: string, limitType: string, value: number): void;
137
148
  revisionLimitHit(sessionId: string, agentName: string): void;
138
149
  loopDetected(sessionId: string, agentName: string, loopType: string): void;
@@ -36,8 +36,72 @@ export interface PlaceholderScanResult {
36
36
  files_with_findings: number;
37
37
  };
38
38
  }
39
+ /**
40
+ * Classify a single expression node as a "constant literal" for stub-skeleton
41
+ * detection. Returns true for nodes whose source text is one of:
42
+ * - `null`, `true`, `false` (JS/TS keywords; Python `none`/`True`/`False` differ)
43
+ * - `number` literals (e.g. `0`, `1`)
44
+ * - `string` literals (e.g. `""`)
45
+ * - `array` literals (e.g. `[]`)
46
+ * - `object` literals (e.g. `{}`)
47
+ * - `unary_expression` with operator `-` and number operand (e.g. `-1`)
48
+ * - `identifier` (a named constant reference, e.g. `CONFIG_DEFAULTS`)
49
+ * - `template_string` with NO `template_substitution` children
50
+ * (i.e. `\`hello\`` is constant; `\`hello ${world}\`` is not)
51
+ *
52
+ * Note: Python's `none`/`True`/`False`/`integer`/`float`/`string`/`list`/
53
+ * `dictionary`/`tuple` map to tree-sitter-python grammar node types and
54
+ * follow the same classification rules.
55
+ */
56
+ declare function isConstantLiteralNode(node: any): boolean;
57
+ /**
58
+ * Determine whether a function's body (or expression body) is a "stub
59
+ * skeleton" — exactly one effective statement, and that statement is a
60
+ * constant return (or, for expression-bodied arrows, the body expression
61
+ * itself is a constant).
62
+ *
63
+ * Returns true when the function IS a stub skeleton.
64
+ * Returns false when the function has substantive subsequent behavior
65
+ * (the constant return is a guard clause, not a stub).
66
+ */
67
+ declare function isStubSkeletonFunction(fnNode: any): boolean;
68
+ /**
69
+ * Walk a tree-sitter root node and collect the line numbers of all function
70
+ * bodies whose structure is NOT a pure stub skeleton. These are the lines
71
+ * where a regex `code-stub-return` finding should be suppressed, because
72
+ * the function has substantive subsequent behavior and the constant return
73
+ * is a guard clause.
74
+ *
75
+ * For expression-bodied arrows (where the body's range equals the arrow's
76
+ * own range), we add only the lines that are INSIDE the body expression
77
+ * itself, NOT the entire arrow's range — otherwise a curried arrow like
78
+ * `const f = () => () => null;` would suppress the inner stub's finding
79
+ * (because the outer arrow's range covers the inner arrow too).
80
+ *
81
+ * Recognized function-like node types:
82
+ * - TS/JS: `function_declaration`, `generator_function_declaration`,
83
+ * `method_definition`, `arrow_function`, `function_expression`,
84
+ * `generator_function`
85
+ * - Python: `function_definition`
86
+ *
87
+ * `method_definition` nodes with no body (abstract/declared methods) are
88
+ * skipped. Getters and setters classify by their body like normal methods.
89
+ */
90
+ declare function collectNonStubBodyLines(rootNode: any): Set<number>;
39
91
  /**
40
92
  * Scan files for placeholder content (TODO/FIXME comments, stub implementations, etc.)
41
93
  */
42
94
  export declare function placeholderScan(input: PlaceholderScanInput, directory: string): Promise<PlaceholderScanResult>;
43
95
  export declare const placeholder_scan: ReturnType<typeof tool>;
96
+ /**
97
+ * Internal seam for direct testing of the body-shape walker without
98
+ * exercising the full placeholderScan pipeline. Mirrors the `_internals`
99
+ * pattern from `src/lang/backends/typescript.ts:343-351` (AGENTS.md
100
+ * invariant 7 — DI over `mock.module`).
101
+ */
102
+ export declare const _internals: {
103
+ readonly collectNonStubBodyLines: typeof collectNonStubBodyLines;
104
+ readonly isStubSkeletonFunction: typeof isStubSkeletonFunction;
105
+ readonly isConstantLiteralNode: typeof isConstantLiteralNode;
106
+ };
107
+ export {};
@@ -59,6 +59,12 @@ export interface SastScanResult {
59
59
  medium: number;
60
60
  low: number;
61
61
  };
62
+ /**
63
+ * Issue #2271 bug 3: present when every input was skipped for having no
64
+ * SAST language profile (non-code diff) — the scan passed because there
65
+ * was nothing to scan, and this counts the skipped non-code inputs.
66
+ */
67
+ files_skipped_non_code?: number;
62
68
  };
63
69
  /** 'baseline_captured' when capture_baseline:true succeeded */
64
70
  status?: 'baseline_captured' | 'baseline_merged';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-swarm",
3
- "version": "7.145.0",
3
+ "version": "7.145.1",
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",
@@ -6,13 +6,13 @@ import {
6
6
  readEffectiveSpecSync
7
7
  } from "./index-9ss2m4rs.js";
8
8
  import"./index-n832052r.js";
9
+ import"./index-4rhhvd1a.js";
9
10
  import {
10
11
  readSwarmFileAsync,
11
12
  validateSwarmPath
12
13
  } from "./index-w8pgjr75.js";
13
14
  import"./index-z6xqpmqg.js";
14
15
  import"./index-zj6t9zgx.js";
15
- import"./index-4rhhvd1a.js";
16
16
  import"./index-zjygnfay.js";
17
17
  import"./index-bpmtbmy9.js";
18
18
  import {