opencode-swarm 6.47.1 → 6.48.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 +59 -3
- package/dist/cli/index.js +2746 -2562
- package/dist/commands/doctor.d.ts +5 -0
- package/dist/commands/registry.d.ts +4 -0
- package/dist/hooks/curator-types.d.ts +3 -0
- package/dist/hooks/curator.d.ts +1 -1
- package/dist/index.js +1768 -835
- package/dist/services/tool-doctor.d.ts +20 -0
- package/dist/services/tool-doctor.test.d.ts +1 -0
- package/dist/tools/index.d.ts +7 -4
- package/dist/tools/placeholder-scan.d.ts +2 -0
- package/dist/tools/quality-budget.d.ts +2 -0
- package/dist/tools/syntax-check.d.ts +2 -0
- package/dist/tools/test-runner.d.ts +4 -0
- package/dist/tools/update-task-status.d.ts +5 -0
- package/dist/tools/verify-six-tools-registration.test.d.ts +9 -0
- package/package.json +1 -1
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tool Doctor Service
|
|
3
|
+
*
|
|
4
|
+
* Validates that every tool name in TOOL_NAMES has a corresponding
|
|
5
|
+
* registration in the plugin's tool: {} block in src/index.ts.
|
|
6
|
+
*
|
|
7
|
+
* Also validates:
|
|
8
|
+
* - AGENT_TOOL_MAP alignment: tools assigned to agents are registered in the plugin
|
|
9
|
+
* - Class 3 tool binary readiness: external binaries needed by lint tools are available
|
|
10
|
+
*/
|
|
11
|
+
import type { ConfigDoctorResult } from './config-doctor';
|
|
12
|
+
/** Result of tool registration coherence check */
|
|
13
|
+
export type ToolDoctorResult = ConfigDoctorResult;
|
|
14
|
+
/**
|
|
15
|
+
* Run tool registration coherence check
|
|
16
|
+
*
|
|
17
|
+
* Verifies that every entry in TOOL_NAMES has a corresponding key
|
|
18
|
+
* in the plugin's tool: {} block in src/index.ts.
|
|
19
|
+
*/
|
|
20
|
+
export declare function runToolDoctor(_directory: string, pluginRoot?: string): ToolDoctorResult;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/tools/index.d.ts
CHANGED
|
@@ -21,9 +21,9 @@ export { knowledgeRemove } from './knowledge-remove';
|
|
|
21
21
|
export { lint } from './lint';
|
|
22
22
|
export { phase_complete } from './phase-complete';
|
|
23
23
|
export { pkg_audit } from './pkg-audit';
|
|
24
|
-
export { type PlaceholderFinding, type PlaceholderScanInput, type PlaceholderScanResult, placeholderScan, } from './placeholder-scan';
|
|
24
|
+
export { type PlaceholderFinding, type PlaceholderScanInput, type PlaceholderScanResult, placeholder_scan, placeholderScan, } from './placeholder-scan';
|
|
25
25
|
export { type PreCheckBatchInput, type PreCheckBatchResult, pre_check_batch, runPreCheckBatch, type ToolResult, } from './pre-check-batch';
|
|
26
|
-
export { type QualityBudgetInput, type QualityBudgetResult, qualityBudget, } from './quality-budget';
|
|
26
|
+
export { type QualityBudgetInput, type QualityBudgetResult, quality_budget, qualityBudget, } from './quality-budget';
|
|
27
27
|
export { retrieve_summary } from './retrieve-summary';
|
|
28
28
|
export { type SastScanFinding, type SastScanInput, type SastScanResult, sast_scan, sastScan, } from './sast-scan';
|
|
29
29
|
export type { SavePlanArgs, SavePlanResult } from './save-plan';
|
|
@@ -32,9 +32,12 @@ export { type SbomGenerateInput, type SbomGenerateResult, sbom_generate, } from
|
|
|
32
32
|
export { schema_drift } from './schema-drift';
|
|
33
33
|
export { search } from './search';
|
|
34
34
|
export { type SecretFinding, type SecretscanResult, secretscan, } from './secretscan';
|
|
35
|
-
|
|
35
|
+
import { suggestPatch } from './suggest-patch';
|
|
36
|
+
export { suggestPatch };
|
|
37
|
+
export type { SuggestPatchArgs } from './suggest-patch';
|
|
38
|
+
export declare const suggest_patch: typeof suggestPatch;
|
|
36
39
|
export { symbols } from './symbols';
|
|
37
|
-
export { type SyntaxCheckFileResult, type SyntaxCheckInput, type SyntaxCheckResult, syntaxCheck, } from './syntax-check';
|
|
40
|
+
export { type SyntaxCheckFileResult, type SyntaxCheckInput, type SyntaxCheckResult, syntax_check, syntaxCheck, } from './syntax-check';
|
|
38
41
|
export { test_runner } from './test-runner';
|
|
39
42
|
export { todo_extract } from './todo-extract';
|
|
40
43
|
export { executeUpdateTaskStatus, type UpdateTaskStatusArgs, type UpdateTaskStatusResult, update_task_status, } from './update-task-status';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { tool } from '@opencode-ai/plugin';
|
|
1
2
|
import type { EvidenceVerdict } from '../config/evidence-schema';
|
|
2
3
|
export interface PlaceholderScanInput {
|
|
3
4
|
changed_files: string[];
|
|
@@ -24,3 +25,4 @@ export interface PlaceholderScanResult {
|
|
|
24
25
|
* Scan files for placeholder content (TODO/FIXME comments, stub implementations, etc.)
|
|
25
26
|
*/
|
|
26
27
|
export declare function placeholderScan(input: PlaceholderScanInput, directory: string): Promise<PlaceholderScanResult>;
|
|
28
|
+
export declare const placeholder_scan: ReturnType<typeof tool>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { tool } from '@opencode-ai/plugin';
|
|
1
2
|
import type { QualityBudgetConfig } from '../config/schema';
|
|
2
3
|
import { type QualityMetrics, type QualityViolation } from '../quality/metrics';
|
|
3
4
|
export interface QualityBudgetInput {
|
|
@@ -22,3 +23,4 @@ export interface QualityBudgetResult {
|
|
|
22
23
|
* and compares against configured thresholds to ensure code quality.
|
|
23
24
|
*/
|
|
24
25
|
export declare function qualityBudget(input: QualityBudgetInput, directory: string): Promise<QualityBudgetResult>;
|
|
26
|
+
export declare const quality_budget: ReturnType<typeof tool>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { tool } from '@opencode-ai/plugin';
|
|
1
2
|
import type { PluginConfig } from '../config';
|
|
2
3
|
import type { EvidenceVerdict } from '../config/evidence-schema';
|
|
3
4
|
export interface SyntaxCheckInput {
|
|
@@ -33,3 +34,4 @@ export interface SyntaxCheckResult {
|
|
|
33
34
|
* Respects config.gates.syntax_check.enabled - returns skipped if disabled
|
|
34
35
|
*/
|
|
35
36
|
export declare function syntaxCheck(input: SyntaxCheckInput, directory: string, config?: PluginConfig): Promise<SyntaxCheckResult>;
|
|
37
|
+
export declare const syntax_check: ReturnType<typeof tool>;
|
|
@@ -13,6 +13,7 @@ export interface TestRunnerArgs {
|
|
|
13
13
|
timeout_ms?: number;
|
|
14
14
|
allow_full_suite?: boolean;
|
|
15
15
|
}
|
|
16
|
+
export type RegressionOutcome = 'pass' | 'skip' | 'regression' | 'scope_exceeded' | 'error';
|
|
16
17
|
export interface TestTotals {
|
|
17
18
|
passed: number;
|
|
18
19
|
failed: number;
|
|
@@ -30,6 +31,7 @@ export interface TestSuccessResult {
|
|
|
30
31
|
coveragePercent?: number;
|
|
31
32
|
rawOutput?: string;
|
|
32
33
|
message?: string;
|
|
34
|
+
outcome?: RegressionOutcome;
|
|
33
35
|
}
|
|
34
36
|
export interface TestErrorResult {
|
|
35
37
|
success: false;
|
|
@@ -43,6 +45,8 @@ export interface TestErrorResult {
|
|
|
43
45
|
error: string;
|
|
44
46
|
rawOutput?: string;
|
|
45
47
|
message?: string;
|
|
48
|
+
outcome?: RegressionOutcome;
|
|
49
|
+
attempted_scope?: 'graph';
|
|
46
50
|
}
|
|
47
51
|
export type TestResult = TestSuccessResult | TestErrorResult;
|
|
48
52
|
export declare function detectTestFramework(cwd: string): Promise<TestFramework>;
|
|
@@ -21,6 +21,8 @@ export interface UpdateTaskStatusResult {
|
|
|
21
21
|
new_status?: string;
|
|
22
22
|
current_phase?: number;
|
|
23
23
|
errors?: string[];
|
|
24
|
+
/** Present when the call failed due to lock contention. Instructs the caller to retry. */
|
|
25
|
+
recovery_guidance?: string;
|
|
24
26
|
}
|
|
25
27
|
/**
|
|
26
28
|
* Validate that the status is one of the allowed values.
|
|
@@ -72,7 +74,10 @@ export declare function recoverTaskStateFromDelegations(taskId: string): void;
|
|
|
72
74
|
/**
|
|
73
75
|
* Execute the update_task_status tool.
|
|
74
76
|
* Validates the task_id and status, then updates the task status in the plan.
|
|
77
|
+
* Uses file locking on plan.json to prevent concurrent writes from corrupting the plan.
|
|
78
|
+
* Only one concurrent call wins the lock; others return success: false with recovery_guidance: "retry".
|
|
75
79
|
* @param args - The update task status arguments
|
|
80
|
+
* @param fallbackDir - Fallback working directory if args.working_directory is not provided
|
|
76
81
|
* @returns UpdateTaskStatusResult with success status and details
|
|
77
82
|
*/
|
|
78
83
|
export declare function executeUpdateTaskStatus(args: UpdateTaskStatusArgs, fallbackDir?: string): Promise<UpdateTaskStatusResult>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-swarm",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.48.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",
|