opencode-swarm 7.19.1 → 7.19.2

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/dist/cli/index.js CHANGED
@@ -34,7 +34,7 @@ var package_default;
34
34
  var init_package = __esm(() => {
35
35
  package_default = {
36
36
  name: "opencode-swarm",
37
- version: "7.19.1",
37
+ version: "7.19.2",
38
38
  description: "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
39
39
  main: "dist/index.js",
40
40
  types: "dist/index.d.ts",
@@ -48754,7 +48754,7 @@ function analyzeFailures(workingDir) {
48754
48754
  } catch {}
48755
48755
  return report;
48756
48756
  }
48757
- var MAX_OUTPUT_BYTES3 = 512000, MAX_COMMAND_LENGTH2 = 500, DEFAULT_TIMEOUT_MS = 60000, MAX_TIMEOUT_MS = 300000, MAX_SAFE_TEST_FILES = 50, POWERSHELL_METACHARACTERS, DISPATCH_FRAMEWORK_MAP, COMPOUND_TEST_EXTENSIONS, TEST_DIRECTORY_NAMES, SOURCE_EXTENSIONS, SKIP_DIRECTORIES, test_runner;
48757
+ var MAX_OUTPUT_BYTES3 = 512000, MAX_COMMAND_LENGTH2 = 500, DEFAULT_TIMEOUT_MS = 60000, MAX_TIMEOUT_MS = 300000, MAX_SAFE_TEST_FILES = 50, MAX_SAFE_SOURCE_FILES = 1, POWERSHELL_METACHARACTERS, DISPATCH_FRAMEWORK_MAP, COMPOUND_TEST_EXTENSIONS, TEST_DIRECTORY_NAMES, SOURCE_EXTENSIONS, SKIP_DIRECTORIES, test_runner;
48758
48758
  var init_test_runner = __esm(() => {
48759
48759
  init_zod();
48760
48760
  init_discovery();
@@ -48941,8 +48941,8 @@ var init_test_runner = __esm(() => {
48941
48941
  success: false,
48942
48942
  framework: "none",
48943
48943
  scope: "all",
48944
- error: 'scope "all" is not allowed without explicit files. Use scope "convention" or "graph" with a files array to run targeted tests.',
48945
- message: 'Running the full test suite without file targeting is blocked. Provide scope "convention" or "graph" with specific source files in the files array. Example: { scope: "convention", files: ["src/tools/test-runner.ts"] }',
48944
+ error: 'scope "all" is blocked for agent use. Use scope "convention" with specific test files, or scope "graph" with exactly one source file.',
48945
+ message: 'The full test suite is blocked in agent context. Use scope "convention" with specific test files, or scope "graph" with exactly one source file. Example: { scope: "convention", files: ["src/tools/test-runner.ts"] }',
48946
48946
  outcome: "error"
48947
48947
  };
48948
48948
  return JSON.stringify(errorResult, null, 2);
@@ -49023,6 +49023,17 @@ var init_test_runner = __esm(() => {
49023
49023
  };
49024
49024
  return JSON.stringify(errorResult, null, 2);
49025
49025
  }
49026
+ if (sourceFiles.length > MAX_SAFE_SOURCE_FILES) {
49027
+ const errorResult = {
49028
+ success: false,
49029
+ framework,
49030
+ scope,
49031
+ error: `scope "convention" accepts at most ${MAX_SAFE_SOURCE_FILES} source file for discovery (got ${sourceFiles.length}). Treat this as SKIP without retry.`,
49032
+ message: `Too many source files for scope "convention" discovery (${sourceFiles.length} provided, limit is ${MAX_SAFE_SOURCE_FILES}). Call test_runner once per source file, or pass direct test file paths instead of source files.`,
49033
+ outcome: "scope_exceeded"
49034
+ };
49035
+ return JSON.stringify(errorResult, null, 2);
49036
+ }
49026
49037
  testFiles = [
49027
49038
  ...directTestFiles,
49028
49039
  ...getTestFilesFromConvention(sourceFiles, workingDir)
@@ -49046,6 +49057,17 @@ var init_test_runner = __esm(() => {
49046
49057
  };
49047
49058
  return JSON.stringify(errorResult, null, 2);
49048
49059
  }
49060
+ if (sourceFiles.length > MAX_SAFE_SOURCE_FILES) {
49061
+ const errorResult = {
49062
+ success: false,
49063
+ framework,
49064
+ scope,
49065
+ error: `scope "graph" accepts at most ${MAX_SAFE_SOURCE_FILES} source file (got ${sourceFiles.length}). Treat this as SKIP without retry.`,
49066
+ message: `Too many source files for scope "graph" (${sourceFiles.length} provided, limit is ${MAX_SAFE_SOURCE_FILES}). Call test_runner once per source file, or use scope "convention" with direct test file paths.`,
49067
+ outcome: "scope_exceeded"
49068
+ };
49069
+ return JSON.stringify(errorResult, null, 2);
49070
+ }
49049
49071
  const graphTestFiles = await getTestFilesFromGraph(sourceFiles, workingDir);
49050
49072
  if (graphTestFiles.length > 0) {
49051
49073
  testFiles = graphTestFiles;
@@ -49073,6 +49095,17 @@ var init_test_runner = __esm(() => {
49073
49095
  };
49074
49096
  return JSON.stringify(errorResult, null, 2);
49075
49097
  }
49098
+ if (sourceFiles.length > MAX_SAFE_SOURCE_FILES) {
49099
+ const errorResult = {
49100
+ success: false,
49101
+ framework,
49102
+ scope,
49103
+ error: `scope "impact" accepts at most ${MAX_SAFE_SOURCE_FILES} source file (got ${sourceFiles.length}). Treat this as SKIP without retry.`,
49104
+ message: `Too many source files for scope "impact" (${sourceFiles.length} provided, limit is ${MAX_SAFE_SOURCE_FILES}). Call test_runner once per source file, or use scope "convention" with direct test file paths.`,
49105
+ outcome: "scope_exceeded"
49106
+ };
49107
+ return JSON.stringify(errorResult, null, 2);
49108
+ }
49076
49109
  try {
49077
49110
  const impactResult = await analyzeImpact(sourceFiles, workingDir);
49078
49111
  if (impactResult.impactedTests.length > 0) {
package/dist/index.js CHANGED
@@ -33,7 +33,7 @@ var package_default;
33
33
  var init_package = __esm(() => {
34
34
  package_default = {
35
35
  name: "opencode-swarm",
36
- version: "7.19.1",
36
+ version: "7.19.2",
37
37
  description: "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
38
38
  main: "dist/index.js",
39
39
  types: "dist/index.d.ts",
@@ -57290,7 +57290,7 @@ function analyzeFailures(workingDir) {
57290
57290
  } catch {}
57291
57291
  return report;
57292
57292
  }
57293
- var MAX_OUTPUT_BYTES3 = 512000, MAX_COMMAND_LENGTH2 = 500, DEFAULT_TIMEOUT_MS = 60000, MAX_TIMEOUT_MS = 300000, MAX_SAFE_TEST_FILES = 50, POWERSHELL_METACHARACTERS, DISPATCH_FRAMEWORK_MAP, COMPOUND_TEST_EXTENSIONS, TEST_DIRECTORY_NAMES, SOURCE_EXTENSIONS, SKIP_DIRECTORIES, test_runner;
57293
+ var MAX_OUTPUT_BYTES3 = 512000, MAX_COMMAND_LENGTH2 = 500, DEFAULT_TIMEOUT_MS = 60000, MAX_TIMEOUT_MS = 300000, MAX_SAFE_TEST_FILES = 50, MAX_SAFE_SOURCE_FILES = 1, POWERSHELL_METACHARACTERS, DISPATCH_FRAMEWORK_MAP, COMPOUND_TEST_EXTENSIONS, TEST_DIRECTORY_NAMES, SOURCE_EXTENSIONS, SKIP_DIRECTORIES, test_runner;
57294
57294
  var init_test_runner = __esm(() => {
57295
57295
  init_zod();
57296
57296
  init_discovery();
@@ -57477,8 +57477,8 @@ var init_test_runner = __esm(() => {
57477
57477
  success: false,
57478
57478
  framework: "none",
57479
57479
  scope: "all",
57480
- error: 'scope "all" is not allowed without explicit files. Use scope "convention" or "graph" with a files array to run targeted tests.',
57481
- message: 'Running the full test suite without file targeting is blocked. Provide scope "convention" or "graph" with specific source files in the files array. Example: { scope: "convention", files: ["src/tools/test-runner.ts"] }',
57480
+ error: 'scope "all" is blocked for agent use. Use scope "convention" with specific test files, or scope "graph" with exactly one source file.',
57481
+ message: 'The full test suite is blocked in agent context. Use scope "convention" with specific test files, or scope "graph" with exactly one source file. Example: { scope: "convention", files: ["src/tools/test-runner.ts"] }',
57482
57482
  outcome: "error"
57483
57483
  };
57484
57484
  return JSON.stringify(errorResult, null, 2);
@@ -57559,6 +57559,17 @@ var init_test_runner = __esm(() => {
57559
57559
  };
57560
57560
  return JSON.stringify(errorResult, null, 2);
57561
57561
  }
57562
+ if (sourceFiles.length > MAX_SAFE_SOURCE_FILES) {
57563
+ const errorResult = {
57564
+ success: false,
57565
+ framework,
57566
+ scope,
57567
+ error: `scope "convention" accepts at most ${MAX_SAFE_SOURCE_FILES} source file for discovery (got ${sourceFiles.length}). Treat this as SKIP without retry.`,
57568
+ message: `Too many source files for scope "convention" discovery (${sourceFiles.length} provided, limit is ${MAX_SAFE_SOURCE_FILES}). Call test_runner once per source file, or pass direct test file paths instead of source files.`,
57569
+ outcome: "scope_exceeded"
57570
+ };
57571
+ return JSON.stringify(errorResult, null, 2);
57572
+ }
57562
57573
  testFiles = [
57563
57574
  ...directTestFiles,
57564
57575
  ...getTestFilesFromConvention(sourceFiles, workingDir)
@@ -57582,6 +57593,17 @@ var init_test_runner = __esm(() => {
57582
57593
  };
57583
57594
  return JSON.stringify(errorResult, null, 2);
57584
57595
  }
57596
+ if (sourceFiles.length > MAX_SAFE_SOURCE_FILES) {
57597
+ const errorResult = {
57598
+ success: false,
57599
+ framework,
57600
+ scope,
57601
+ error: `scope "graph" accepts at most ${MAX_SAFE_SOURCE_FILES} source file (got ${sourceFiles.length}). Treat this as SKIP without retry.`,
57602
+ message: `Too many source files for scope "graph" (${sourceFiles.length} provided, limit is ${MAX_SAFE_SOURCE_FILES}). Call test_runner once per source file, or use scope "convention" with direct test file paths.`,
57603
+ outcome: "scope_exceeded"
57604
+ };
57605
+ return JSON.stringify(errorResult, null, 2);
57606
+ }
57585
57607
  const graphTestFiles = await getTestFilesFromGraph(sourceFiles, workingDir);
57586
57608
  if (graphTestFiles.length > 0) {
57587
57609
  testFiles = graphTestFiles;
@@ -57609,6 +57631,17 @@ var init_test_runner = __esm(() => {
57609
57631
  };
57610
57632
  return JSON.stringify(errorResult, null, 2);
57611
57633
  }
57634
+ if (sourceFiles.length > MAX_SAFE_SOURCE_FILES) {
57635
+ const errorResult = {
57636
+ success: false,
57637
+ framework,
57638
+ scope,
57639
+ error: `scope "impact" accepts at most ${MAX_SAFE_SOURCE_FILES} source file (got ${sourceFiles.length}). Treat this as SKIP without retry.`,
57640
+ message: `Too many source files for scope "impact" (${sourceFiles.length} provided, limit is ${MAX_SAFE_SOURCE_FILES}). Call test_runner once per source file, or use scope "convention" with direct test file paths.`,
57641
+ outcome: "scope_exceeded"
57642
+ };
57643
+ return JSON.stringify(errorResult, null, 2);
57644
+ }
57612
57645
  try {
57613
57646
  const impactResult = await analyzeImpact(sourceFiles, workingDir);
57614
57647
  if (impactResult.impactedTests.length > 0) {
@@ -4,6 +4,7 @@ export declare const MAX_COMMAND_LENGTH = 500;
4
4
  export declare const DEFAULT_TIMEOUT_MS = 60000;
5
5
  export declare const MAX_TIMEOUT_MS = 300000;
6
6
  export declare const MAX_SAFE_TEST_FILES = 50;
7
+ export declare const MAX_SAFE_SOURCE_FILES = 1;
7
8
  export declare const SUPPORTED_FRAMEWORKS: readonly ["bun", "vitest", "jest", "mocha", "pytest", "cargo", "pester", "go-test", "maven", "gradle", "dotnet-test", "ctest", "swift-test", "dart-test", "rspec", "minitest"];
8
9
  export type TestFramework = (typeof SUPPORTED_FRAMEWORKS)[number] | 'none';
9
10
  export interface TestRunnerArgs {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-swarm",
3
- "version": "7.19.1",
3
+ "version": "7.19.2",
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",