opencode-swarm 7.94.1 → 7.95.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.
@@ -0,0 +1,29 @@
1
+ import type { ToolDefinition } from '@opencode-ai/plugin/tool';
2
+ import { resolveExecutableFromPath, runExternalTool } from '../utils/external-tool-runner';
3
+ interface ActionlintFinding {
4
+ file: string;
5
+ line: number;
6
+ column: number;
7
+ kind: string;
8
+ message: string;
9
+ endColumn?: number;
10
+ }
11
+ interface WorkflowDiscoveryResult {
12
+ files: string[];
13
+ truncated: boolean;
14
+ }
15
+ declare function resolveActionlintBinary(): string | null;
16
+ declare function discoverWorkflowFiles(workspace: string): WorkflowDiscoveryResult;
17
+ declare function parseActionlintOutput(stdout: string, workspace: string, maxResults: number): {
18
+ findings: ActionlintFinding[];
19
+ total: number;
20
+ };
21
+ export declare const actionlint_scan: ToolDefinition;
22
+ export declare const _internals: {
23
+ resolveExecutableFromPath: typeof resolveExecutableFromPath;
24
+ resolveActionlintBinary: typeof resolveActionlintBinary;
25
+ runExternalTool: typeof runExternalTool;
26
+ discoverWorkflowFiles: typeof discoverWorkflowFiles;
27
+ parseActionlintOutput: typeof parseActionlintOutput;
28
+ };
29
+ export {};
@@ -0,0 +1,26 @@
1
+ import type { ToolDefinition } from '@opencode-ai/plugin/tool';
2
+ import { resolveExecutableFromPath, runExternalTool } from '../utils/external-tool-runner';
3
+ interface AstGrepMatch {
4
+ file: string;
5
+ lineNumber: number;
6
+ column: number;
7
+ endLineNumber: number;
8
+ endColumn: number;
9
+ text: string;
10
+ lines: string;
11
+ language?: string;
12
+ metaVariables?: unknown;
13
+ }
14
+ declare function resolveAstGrepBinary(): string | null;
15
+ declare function parseAstGrepStream(stdout: string, workspace: string, maxResults: number): {
16
+ matches: AstGrepMatch[];
17
+ total: number;
18
+ };
19
+ export declare const ast_grep: ToolDefinition;
20
+ export declare const _internals: {
21
+ resolveExecutableFromPath: typeof resolveExecutableFromPath;
22
+ resolveAstGrepBinary: typeof resolveAstGrepBinary;
23
+ runExternalTool: typeof runExternalTool;
24
+ parseAstGrepStream: typeof parseAstGrepStream;
25
+ };
26
+ export {};
@@ -0,0 +1,10 @@
1
+ import type { ToolDefinition } from '@opencode-ai/plugin/tool';
2
+ import { resolveExecutableFromPath, runExternalTool } from '../utils/external-tool-runner';
3
+ declare function resolveGhBinary(): string | null;
4
+ export declare const gh_evidence: ToolDefinition;
5
+ export declare const _internals: {
6
+ resolveExecutableFromPath: typeof resolveExecutableFromPath;
7
+ resolveGhBinary: typeof resolveGhBinary;
8
+ runExternalTool: typeof runExternalTool;
9
+ };
10
+ export {};
@@ -1,6 +1,8 @@
1
1
  import { swarmApplyPatch } from './apply-patch';
2
2
  export { swarmApplyPatch };
3
3
  export declare const swarm_apply_patch: typeof swarmApplyPatch;
4
+ export { actionlint_scan } from './actionlint-scan';
5
+ export { ast_grep } from './ast-grep';
4
6
  export { batch_symbols } from './batch-symbols';
5
7
  export { build_check } from './build-check';
6
8
  export { check_gate_status } from './check-gate-status';
@@ -29,6 +31,7 @@ export { external_skill_revoke } from './external-skill-revoke';
29
31
  export { extract_code_blocks } from './file-extractor';
30
32
  export { get_approved_plan } from './get-approved-plan';
31
33
  export { get_qa_gate_profile } from './get-qa-gate-profile';
34
+ export { gh_evidence } from './gh-evidence';
32
35
  export { git_blame } from './git-blame';
33
36
  export { fetchGitingest, type GitingestArgs, gitingest } from './gitingest';
34
37
  export { imports } from './imports';
@@ -39,6 +42,7 @@ export { knowledge_recall } from './knowledge-recall';
39
42
  export { knowledge_receipt } from './knowledge-receipt';
40
43
  export { knowledge_remove } from './knowledge-remove';
41
44
  export { lint } from './lint';
45
+ export { osv_scan } from './osv-scan';
42
46
  export { parse_lane_candidates } from './parse-lane-candidates';
43
47
  export { phase_complete } from './phase-complete';
44
48
  export { pkg_audit } from './pkg-audit';
@@ -77,6 +77,10 @@ export declare const TOOL_MANIFEST: {
77
77
  knowledge_remove: () => ToolDefinition;
78
78
  co_change_analyzer: () => ToolDefinition;
79
79
  search: () => ToolDefinition;
80
+ ast_grep: () => ToolDefinition;
81
+ actionlint_scan: () => ToolDefinition;
82
+ osv_scan: () => ToolDefinition;
83
+ gh_evidence: () => ToolDefinition;
80
84
  batch_symbols: () => ToolDefinition;
81
85
  suggest_patch: () => ToolDefinition;
82
86
  req_coverage: () => ToolDefinition;
@@ -0,0 +1,27 @@
1
+ import type { ToolDefinition } from '@opencode-ai/plugin/tool';
2
+ import { resolveExecutableFromPath, runExternalTool } from '../utils/external-tool-runner';
3
+ interface OsvFinding {
4
+ id: string;
5
+ summary?: string;
6
+ packageName?: string;
7
+ ecosystem?: string;
8
+ installedVersion?: string;
9
+ fixedVersion?: string;
10
+ aliases?: string[];
11
+ references?: string[];
12
+ }
13
+ interface ParsedOsvOutput {
14
+ findings: OsvFinding[];
15
+ total: number;
16
+ parseError: boolean;
17
+ }
18
+ declare function resolveOsvScannerBinary(): string | null;
19
+ declare function parseOsvOutput(stdout: string, maxResults: number): ParsedOsvOutput;
20
+ export declare const osv_scan: ToolDefinition;
21
+ export declare const _internals: {
22
+ resolveExecutableFromPath: typeof resolveExecutableFromPath;
23
+ resolveOsvScannerBinary: typeof resolveOsvScannerBinary;
24
+ runExternalTool: typeof runExternalTool;
25
+ parseOsvOutput: typeof parseOsvOutput;
26
+ };
27
+ export {};
@@ -1,4 +1,5 @@
1
1
  import type { ToolDefinition } from '@opencode-ai/plugin/tool';
2
+ import { resolveExecutableFromPath, runExternalTool } from '../utils/external-tool-runner';
2
3
  export interface SearchMatch {
3
4
  file: string;
4
5
  lineNumber: number;
@@ -12,6 +13,9 @@ export interface SearchResult {
12
13
  query: string;
13
14
  mode: 'literal' | 'regex';
14
15
  maxResults: number;
16
+ engine: 'ripgrep' | 'fallback';
17
+ outputTruncated?: boolean;
18
+ warning?: string;
15
19
  }
16
20
  export interface SearchError {
17
21
  error: true;
@@ -26,4 +30,27 @@ export interface SearchArgs {
26
30
  max_results?: number;
27
31
  max_lines?: number;
28
32
  }
33
+ declare function resolvePackagedRipgrep(): string | null;
34
+ declare function resolveRipgrepBinary(): string | null;
35
+ interface FallbackSearchOptions {
36
+ query: string;
37
+ mode: 'literal' | 'regex';
38
+ include?: string;
39
+ exclude?: string;
40
+ maxResults: number;
41
+ maxLines: number;
42
+ workspace: string;
43
+ }
44
+ /**
45
+ * Execute search using Node.js fallback (when ripgrep not available).
46
+ */
47
+ declare function fallbackSearch(opts: FallbackSearchOptions): Promise<SearchResult | SearchError>;
29
48
  export declare const search: ToolDefinition;
49
+ export declare const _internals: {
50
+ resolvePackagedRipgrep: typeof resolvePackagedRipgrep;
51
+ resolveExecutableFromPath: typeof resolveExecutableFromPath;
52
+ resolveRipgrepBinary: typeof resolveRipgrepBinary;
53
+ runExternalTool: typeof runExternalTool;
54
+ fallbackSearch: typeof fallbackSearch;
55
+ };
56
+ export {};
@@ -239,6 +239,22 @@ export declare const TOOL_METADATA: {
239
239
  description: string;
240
240
  agents: ("reviewer" | "test_engineer" | "coder" | "docs" | "designer" | "explorer" | "sme" | "critic_hallucination_verifier" | "critic_oversight" | "architect" | "researcher" | "docs_design" | "skill_improver" | "spec_writer")[];
241
241
  };
242
+ ast_grep: {
243
+ description: string;
244
+ agents: ("test_engineer" | "coder" | "docs" | "explorer" | "sme" | "critic_hallucination_verifier" | "architect" | "researcher" | "docs_design" | "spec_writer")[];
245
+ };
246
+ actionlint_scan: {
247
+ description: string;
248
+ agents: ("test_engineer" | "architect")[];
249
+ };
250
+ osv_scan: {
251
+ description: string;
252
+ agents: ("test_engineer" | "architect")[];
253
+ };
254
+ gh_evidence: {
255
+ description: string;
256
+ agents: ("architect" | "researcher")[];
257
+ };
242
258
  batch_symbols: {
243
259
  description: string;
244
260
  agents: ("reviewer" | "explorer" | "critic_hallucination_verifier" | "critic_oversight" | "architect")[];
@@ -0,0 +1,25 @@
1
+ import { bunSpawn } from './bun-compat';
2
+ export interface ExternalToolRunOptions {
3
+ executable: string;
4
+ args: string[];
5
+ cwd: string;
6
+ timeoutMs: number;
7
+ maxStdoutBytes: number;
8
+ maxStderrBytes: number;
9
+ env?: Record<string, string | undefined>;
10
+ }
11
+ export interface ExternalToolRunResult {
12
+ status: 'completed' | 'timeout' | 'spawn-error';
13
+ exitCode: number | null;
14
+ stdout: string;
15
+ stderr: string;
16
+ stdoutTruncated: boolean;
17
+ stderrTruncated: boolean;
18
+ message?: string;
19
+ }
20
+ export declare function resolveExecutableFromPath(names: string[], envPath?: string, platform?: NodeJS.Platform): string | null;
21
+ export declare function runExternalTool(options: ExternalToolRunOptions): Promise<ExternalToolRunResult>;
22
+ export declare const _internals: {
23
+ bunSpawn: typeof bunSpawn;
24
+ platform: () => NodeJS.Platform;
25
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-swarm",
3
- "version": "7.94.1",
3
+ "version": "7.95.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",