opencode-swarm 6.30.1 → 6.31.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 (37) hide show
  1. package/dist/cli/index.d.ts +1 -0
  2. package/dist/cli/index.js +6606 -2568
  3. package/dist/commands/index.d.ts +4 -1
  4. package/dist/commands/registry.d.ts +160 -0
  5. package/dist/config/schema.d.ts +22 -0
  6. package/dist/hooks/curator-drift-advisory.test.d.ts +1 -0
  7. package/dist/hooks/curator-drift.d.ts +1 -1
  8. package/dist/hooks/delegation-ledger.d.ts +37 -0
  9. package/dist/hooks/delegation-ledger.test.d.ts +11 -0
  10. package/dist/hooks/scope-guard-throw-behavior.test.d.ts +15 -0
  11. package/dist/hooks/scope-guard.adversarial.test.d.ts +1 -0
  12. package/dist/hooks/scope-guard.d.ts +43 -0
  13. package/dist/hooks/scope-guard.test.d.ts +14 -0
  14. package/dist/hooks/self-review.d.ts +14 -0
  15. package/dist/hooks/self-review.test.d.ts +14 -0
  16. package/dist/hooks/slop-detector.adversarial.test.d.ts +1 -0
  17. package/dist/hooks/watchdog.integration.test.d.ts +9 -0
  18. package/dist/index.js +7447 -6623
  19. package/dist/tools/curator-analyze.d.ts +7 -0
  20. package/dist/tools/curator-analyze.test.d.ts +1 -0
  21. package/dist/tools/diff.d.ts +2 -2
  22. package/dist/tools/gitingest.d.ts +2 -2
  23. package/dist/tools/imports.d.ts +2 -2
  24. package/dist/tools/index.d.ts +4 -0
  25. package/dist/tools/knowledge-add.d.ts +2 -0
  26. package/dist/tools/knowledge-recall.d.ts +2 -0
  27. package/dist/tools/knowledge-remove.d.ts +2 -0
  28. package/dist/tools/knowledge-tools.integration.test.d.ts +1 -0
  29. package/dist/tools/lint.d.ts +1 -1
  30. package/dist/tools/phase-complete.d.ts +1 -1
  31. package/dist/tools/pre-check-batch.d.ts +1 -1
  32. package/dist/tools/retrieve-summary.d.ts +2 -2
  33. package/dist/tools/secretscan.d.ts +2 -2
  34. package/dist/tools/test-runner.d.ts +1 -1
  35. package/dist/tools/update-task-status.adversarial.test.d.ts +13 -0
  36. package/dist/tools/update-task-status.test.d.ts +1 -0
  37. package/package.json +1 -1
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Curator analyze tool — explicit mechanism to trigger curator phase analysis
3
+ * and apply knowledge recommendations. Closes the curator data pipeline by
4
+ * giving the architect an explicit tool to call after reviewing phase data.
5
+ */
6
+ import { createSwarmTool } from './create-tool';
7
+ export declare const curator_analyze: ReturnType<typeof createSwarmTool>;
@@ -0,0 +1 @@
1
+ export {};
@@ -1,4 +1,4 @@
1
- import { tool } from '@opencode-ai/plugin';
1
+ import { createSwarmTool } from './create-tool';
2
2
  export interface DiffResult {
3
3
  files: Array<{
4
4
  path: string;
@@ -15,4 +15,4 @@ export interface DiffErrorResult {
15
15
  contractChanges: [];
16
16
  hasContractChanges: false;
17
17
  }
18
- export declare const diff: ReturnType<typeof tool>;
18
+ export declare const diff: ReturnType<typeof createSwarmTool>;
@@ -1,4 +1,4 @@
1
- import { tool } from '@opencode-ai/plugin';
1
+ import { createSwarmTool } from './create-tool';
2
2
  export interface GitingestArgs {
3
3
  url: string;
4
4
  maxFileSize?: number;
@@ -15,4 +15,4 @@ export declare function fetchGitingest(args: GitingestArgs): Promise<string>;
15
15
  /**
16
16
  * Gitingest tool for fetching GitHub repository contents
17
17
  */
18
- export declare const gitingest: ReturnType<typeof tool>;
18
+ export declare const gitingest: ReturnType<typeof createSwarmTool>;
@@ -1,5 +1,5 @@
1
- import { tool } from '@opencode-ai/plugin';
1
+ import { createSwarmTool } from './create-tool';
2
2
  /**
3
3
  * Main imports tool implementation
4
4
  */
5
- export declare const imports: ReturnType<typeof tool>;
5
+ export declare const imports: ReturnType<typeof createSwarmTool>;
@@ -2,6 +2,7 @@ export { build_check } from './build-check';
2
2
  export { check_gate_status } from './check-gate-status';
3
3
  export { checkpoint } from './checkpoint';
4
4
  export { complexity_hotspots } from './complexity-hotspots';
5
+ export { curator_analyze } from './curator-analyze';
5
6
  export { declare_scope } from './declare-scope';
6
7
  export { type DiffErrorResult, type DiffResult, diff } from './diff';
7
8
  export { detect_domains } from './domain-detector';
@@ -9,7 +10,10 @@ export { evidence_check } from './evidence-check';
9
10
  export { extract_code_blocks } from './file-extractor';
10
11
  export { fetchGitingest, type GitingestArgs, gitingest } from './gitingest';
11
12
  export { imports } from './imports';
13
+ export { knowledgeAdd } from './knowledge-add';
12
14
  export { knowledge_query } from './knowledge-query';
15
+ export { knowledgeRecall } from './knowledge-recall';
16
+ export { knowledgeRemove } from './knowledge-remove';
13
17
  export { lint } from './lint';
14
18
  export { phase_complete } from './phase-complete';
15
19
  export { pkg_audit } from './pkg-audit';
@@ -0,0 +1,2 @@
1
+ import { createSwarmTool } from './create-tool.js';
2
+ export declare const knowledgeAdd: ReturnType<typeof createSwarmTool>;
@@ -0,0 +1,2 @@
1
+ import { createSwarmTool } from './create-tool.js';
2
+ export declare const knowledgeRecall: ReturnType<typeof createSwarmTool>;
@@ -0,0 +1,2 @@
1
+ import { createSwarmTool } from './create-tool.js';
2
+ export declare const knowledgeRemove: ReturnType<typeof createSwarmTool>;
@@ -0,0 +1 @@
1
+ export {};
@@ -46,7 +46,7 @@ export declare function getBiomeBinPath(directory: string): string;
46
46
  export declare function getEslintBinPath(directory: string): string;
47
47
  export declare function detectAvailableLinter(directory?: string): Promise<SupportedLinter | null>;
48
48
  /** Internal implementation — accepts pre-computed binary paths for testability. */
49
- export declare function _detectAvailableLinter(projectDir: string, biomeBin: string, eslintBin: string): Promise<SupportedLinter | null>;
49
+ export declare function _detectAvailableLinter(_projectDir: string, biomeBin: string, eslintBin: string): Promise<SupportedLinter | null>;
50
50
  export declare function runLint(linter: SupportedLinter, mode: 'fix' | 'check', directory: string): Promise<LintResult>;
51
51
  /**
52
52
  * Run an additional (non-JS/TS) linter.
@@ -18,7 +18,7 @@ export interface PhaseCompleteArgs {
18
18
  * Execute the phase_complete tool
19
19
  * Gathers data, enforces policy, writes event, resets state
20
20
  */
21
- export declare function executePhaseComplete(args: PhaseCompleteArgs, workingDirectory?: string): Promise<string>;
21
+ export declare function executePhaseComplete(args: PhaseCompleteArgs, workingDirectory?: string, directory?: string): Promise<string>;
22
22
  /**
23
23
  * Tool definition for phase_complete
24
24
  */
@@ -48,7 +48,7 @@ export interface PreCheckBatchResult {
48
48
  * @param input - The pre-check batch input
49
49
  * @param workspaceDir - Optional workspace directory for traversal validation (defaults to directory param or process.cwd())
50
50
  */
51
- export declare function runPreCheckBatch(input: PreCheckBatchInput, workspaceDir?: string): Promise<PreCheckBatchResult>;
51
+ export declare function runPreCheckBatch(input: PreCheckBatchInput, workspaceDir?: string, contextDir?: string): Promise<PreCheckBatchResult>;
52
52
  /**
53
53
  * Pre-check batch tool - runs 4 verification tools in parallel
54
54
  * Returns unified result with gates_passed status
@@ -1,2 +1,2 @@
1
- import { tool } from '@opencode-ai/plugin';
2
- export declare const retrieve_summary: ReturnType<typeof tool>;
1
+ import { createSwarmTool } from './create-tool';
2
+ export declare const retrieve_summary: ReturnType<typeof createSwarmTool>;
@@ -1,4 +1,4 @@
1
- import { tool } from '@opencode-ai/plugin';
1
+ import { createSwarmTool } from './create-tool';
2
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
3
  type Confidence = 'high' | 'medium' | 'low';
4
4
  type Severity = 'critical' | 'high' | 'medium' | 'low';
@@ -27,7 +27,7 @@ export interface SecretscanErrorResult {
27
27
  files_scanned: 0;
28
28
  skipped_files: 0;
29
29
  }
30
- export declare const secretscan: ReturnType<typeof tool>;
30
+ export declare const secretscan: ReturnType<typeof createSwarmTool>;
31
31
  /**
32
32
  * Run secretscan programmatically
33
33
  */
@@ -46,5 +46,5 @@ export interface TestErrorResult {
46
46
  }
47
47
  export type TestResult = TestSuccessResult | TestErrorResult;
48
48
  export declare function detectTestFramework(cwd: string): Promise<TestFramework>;
49
- export declare function runTests(framework: TestFramework, scope: 'all' | 'convention' | 'graph', files: string[], coverage: boolean, timeout_ms: number, cwd?: string): Promise<TestResult>;
49
+ export declare function runTests(framework: TestFramework, scope: 'all' | 'convention' | 'graph', files: string[], coverage: boolean, timeout_ms: number, cwd: string): Promise<TestResult>;
50
50
  export declare const test_runner: ReturnType<typeof tool>;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * ADVERSARIAL SECURITY TESTS for src/tools/update-task-status.ts
3
+ *
4
+ * Tests attack vectors against the fallbackDir parameter which bypasses
5
+ * the working_directory validation guards.
6
+ *
7
+ * Attack vectors tested:
8
+ * 1. Null byte injection in fallbackDir
9
+ * 2. Path traversal sequences (../../etc) in fallbackDir
10
+ * 3. Empty string fallbackDir (falsy check edge case)
11
+ * 4. Command injection via path.join with malicious fallbackDir
12
+ */
13
+ export {};
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-swarm",
3
- "version": "6.30.1",
3
+ "version": "6.31.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",