opencode-swarm 6.2.0 → 6.3.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.
- package/README.md +306 -543
- package/dist/config/schema.d.ts +42 -0
- package/dist/index.js +1243 -10
- package/dist/tools/imports.d.ts +5 -0
- package/dist/tools/index.d.ts +3 -0
- package/dist/tools/lint.d.ts +34 -0
- package/dist/tools/secretscan.d.ts +31 -0
- package/package.json +1 -1
package/dist/tools/index.d.ts
CHANGED
|
@@ -2,4 +2,7 @@ export { type DiffErrorResult, type DiffResult, diff } from './diff';
|
|
|
2
2
|
export { detect_domains } from './domain-detector';
|
|
3
3
|
export { extract_code_blocks } from './file-extractor';
|
|
4
4
|
export { fetchGitingest, type GitingestArgs, gitingest } from './gitingest';
|
|
5
|
+
export { imports } from './imports';
|
|
6
|
+
export { lint } from './lint';
|
|
5
7
|
export { retrieve_summary } from './retrieve-summary';
|
|
8
|
+
export { type SecretFinding, type SecretscanResult, secretscan, } from './secretscan';
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { tool } from '@opencode-ai/plugin';
|
|
2
|
+
export declare const MAX_OUTPUT_BYTES = 512000;
|
|
3
|
+
export declare const MAX_COMMAND_LENGTH = 500;
|
|
4
|
+
export declare const SUPPORTED_LINTERS: readonly ["biome", "eslint"];
|
|
5
|
+
export type SupportedLinter = (typeof SUPPORTED_LINTERS)[number];
|
|
6
|
+
export interface LintSuccessResult {
|
|
7
|
+
success: true;
|
|
8
|
+
mode: 'fix' | 'check';
|
|
9
|
+
linter: SupportedLinter;
|
|
10
|
+
command: string[];
|
|
11
|
+
exitCode: number;
|
|
12
|
+
output: string;
|
|
13
|
+
message?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface LintErrorResult {
|
|
16
|
+
success: false;
|
|
17
|
+
mode: 'fix' | 'check';
|
|
18
|
+
linter?: SupportedLinter;
|
|
19
|
+
command?: string[];
|
|
20
|
+
exitCode?: number;
|
|
21
|
+
output?: string;
|
|
22
|
+
error: string;
|
|
23
|
+
message?: string;
|
|
24
|
+
}
|
|
25
|
+
export type LintResult = LintSuccessResult | LintErrorResult;
|
|
26
|
+
export declare function containsPathTraversal(str: string): boolean;
|
|
27
|
+
export declare function containsControlChars(str: string): boolean;
|
|
28
|
+
export declare function validateArgs(args: unknown): args is {
|
|
29
|
+
mode: 'fix' | 'check';
|
|
30
|
+
};
|
|
31
|
+
export declare function getLinterCommand(linter: SupportedLinter, mode: 'fix' | 'check'): string[];
|
|
32
|
+
export declare function detectAvailableLinter(): Promise<SupportedLinter | null>;
|
|
33
|
+
export declare function runLint(linter: SupportedLinter, mode: 'fix' | 'check'): Promise<LintResult>;
|
|
34
|
+
export declare const lint: ReturnType<typeof tool>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { tool } from '@opencode-ai/plugin';
|
|
2
|
+
type SecretType = 'api_key' | 'aws_access_key' | 'aws_secret_key' | 'private_key' | 'password' | 'secret_token' | 'bearer_token' | 'basic_auth' | 'database_url' | 'jwt' | 'github_token' | 'slack_token' | 'stripe_key' | 'sendgrid_key' | 'twilio_key' | 'generic_token' | 'high_entropy';
|
|
3
|
+
type Confidence = 'high' | 'medium' | 'low';
|
|
4
|
+
type Severity = 'critical' | 'high' | 'medium' | 'low';
|
|
5
|
+
export interface SecretFinding {
|
|
6
|
+
path: string;
|
|
7
|
+
line: number;
|
|
8
|
+
type: SecretType;
|
|
9
|
+
confidence: Confidence;
|
|
10
|
+
severity: Severity;
|
|
11
|
+
redacted: string;
|
|
12
|
+
context: string;
|
|
13
|
+
}
|
|
14
|
+
export interface SecretscanResult {
|
|
15
|
+
scan_dir: string;
|
|
16
|
+
findings: SecretFinding[];
|
|
17
|
+
count: number;
|
|
18
|
+
files_scanned: number;
|
|
19
|
+
skipped_files: number;
|
|
20
|
+
message?: string;
|
|
21
|
+
}
|
|
22
|
+
export interface SecretscanErrorResult {
|
|
23
|
+
error: string;
|
|
24
|
+
scan_dir: string;
|
|
25
|
+
findings: [];
|
|
26
|
+
count: 0;
|
|
27
|
+
files_scanned: 0;
|
|
28
|
+
skipped_files: 0;
|
|
29
|
+
}
|
|
30
|
+
export declare const secretscan: ReturnType<typeof tool>;
|
|
31
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-swarm",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.3.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",
|