opencode-swarm 6.85.1 → 6.85.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.
Files changed (2) hide show
  1. package/dist/index.js +18 -8
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -15723,6 +15723,14 @@ function warn(message, data) {
15723
15723
  console.warn(`[opencode-swarm ${timestamp}] WARN: ${message}`);
15724
15724
  }
15725
15725
  }
15726
+ function error48(message, data) {
15727
+ const timestamp = new Date().toISOString();
15728
+ if (data !== undefined) {
15729
+ console.error(`[opencode-swarm ${timestamp}] ERROR: ${message}`, data);
15730
+ } else {
15731
+ console.error(`[opencode-swarm ${timestamp}] ERROR: ${message}`);
15732
+ }
15733
+ }
15726
15734
  var DEBUG;
15727
15735
  var init_logger = __esm(() => {
15728
15736
  DEBUG = process.env.OPENCODE_SWARM_DEBUG === "1";
@@ -64832,6 +64840,7 @@ import * as path50 from "path";
64832
64840
 
64833
64841
  // src/tools/repo-graph.ts
64834
64842
  init_utils2();
64843
+ init_logger();
64835
64844
  init_path_security();
64836
64845
  import * as fsSync2 from "fs";
64837
64846
  import { constants as constants3, existsSync as existsSync28, realpathSync as realpathSync6 } from "fs";
@@ -65565,7 +65574,7 @@ async function saveGraph(workspace, graph, options) {
65565
65574
  await fsPromises3.unlink(tempPath);
65566
65575
  } catch (error93) {
65567
65576
  if (error93 instanceof Error && "code" in error93 && error93.code !== "ENOENT") {
65568
- console.error(`Failed to clean up temp file ${tempPath}:`, error93);
65577
+ error48(`Failed to clean up temp file ${tempPath}:`, error93);
65569
65578
  }
65570
65579
  }
65571
65580
  }
@@ -65705,7 +65714,7 @@ function buildWorkspaceGraph(workspaceRoot, options) {
65705
65714
  return normA.localeCompare(normB);
65706
65715
  });
65707
65716
  if (sourceFiles.length > maxFiles) {
65708
- console.warn(`[repo-graph] Truncating scan: ${sourceFiles.length} files found, capping at ${maxFiles}. ` + `${sourceFiles.length - maxFiles} files skipped.`);
65717
+ warn(`[repo-graph] Truncating scan: ${sourceFiles.length} files found, capping at ${maxFiles}. ` + `${sourceFiles.length - maxFiles} files skipped.`);
65709
65718
  sourceFiles.length = maxFiles;
65710
65719
  stats.truncated = true;
65711
65720
  }
@@ -65775,7 +65784,7 @@ function buildWorkspaceGraph(workspaceRoot, options) {
65775
65784
  edgeCount: graph.edges.length
65776
65785
  };
65777
65786
  if (stats.skippedFiles > 0 || stats.skippedDirs > 0 || stats.truncated) {
65778
- console.log(`[repo-graph] Scan stats: ${stats.filesScanned} files scanned, ` + `${stats.skippedFiles} files skipped, ${stats.skippedDirs} dirs skipped` + (stats.truncated ? ", TRUNCATED" : ""));
65787
+ log(`[repo-graph] Scan stats: ${stats.filesScanned} files scanned, ` + `${stats.skippedFiles} files skipped, ${stats.skippedDirs} dirs skipped` + (stats.truncated ? ", TRUNCATED" : ""));
65779
65788
  }
65780
65789
  return graph;
65781
65790
  }
@@ -65881,7 +65890,7 @@ async function updateGraphForFiles(workspaceRoot, filePaths, options) {
65881
65890
  }
65882
65891
  }
65883
65892
  if (validationFailed) {
65884
- console.warn(`[repo-graph] Incremental update failed, falling back to full rebuild`);
65893
+ warn(`[repo-graph] Incremental update failed, falling back to full rebuild`);
65885
65894
  const rebuiltGraph = buildWorkspaceGraph(workspaceRoot);
65886
65895
  await saveGraph(workspaceRoot, rebuiltGraph);
65887
65896
  return rebuiltGraph;
@@ -65892,6 +65901,7 @@ async function updateGraphForFiles(workspaceRoot, filePaths, options) {
65892
65901
  }
65893
65902
 
65894
65903
  // src/hooks/repo-graph-builder.ts
65904
+ init_logger();
65895
65905
  var SUPPORTED_EXTENSIONS2 = [
65896
65906
  ".ts",
65897
65907
  ".tsx",
@@ -65923,13 +65933,13 @@ function createRepoGraphBuilderHook(workspaceRoot, deps) {
65923
65933
  try {
65924
65934
  const graph = _buildWorkspaceGraph(workspaceRoot);
65925
65935
  await _saveGraph(workspaceRoot, graph);
65926
- console.log(`[repo-graph] Built graph: ${graph.metadata.nodeCount} nodes, ${graph.metadata.edgeCount} edges`);
65936
+ log(`[repo-graph] Built graph: ${graph.metadata.nodeCount} nodes, ${graph.metadata.edgeCount} edges`);
65927
65937
  } catch (error93) {
65928
65938
  const message = error93 instanceof Error ? error93.message : String(error93);
65929
65939
  if (message.includes("does not exist")) {
65930
65940
  return;
65931
65941
  }
65932
- console.warn(`[repo-graph] Failed to build graph: ${message}`);
65942
+ error48(`[repo-graph] Failed to build graph: ${message}`);
65933
65943
  }
65934
65944
  },
65935
65945
  async toolAfter(input, _output) {
@@ -65966,10 +65976,10 @@ function createRepoGraphBuilderHook(workspaceRoot, deps) {
65966
65976
  }
65967
65977
  try {
65968
65978
  await _updateGraphForFiles(workspaceRoot, [absoluteFilePath]);
65969
- console.log(`[repo-graph] Incremental update for ${path50.basename(filePath)}`);
65979
+ log(`[repo-graph] Incremental update for ${path50.basename(filePath)}`);
65970
65980
  } catch (error93) {
65971
65981
  const message = error93 instanceof Error ? error93.message : String(error93);
65972
- console.warn(`[repo-graph] Incremental update failed: ${message}`);
65982
+ error48(`[repo-graph] Incremental update failed: ${message}`);
65973
65983
  }
65974
65984
  }
65975
65985
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-swarm",
3
- "version": "6.85.1",
3
+ "version": "6.85.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",