opencode-swarm 6.85.2 → 6.85.3

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
@@ -36305,6 +36305,12 @@ async function checkConfigParseability(directory) {
36305
36305
  };
36306
36306
  }
36307
36307
  }
36308
+ function resolveGrammarDir(thisDir) {
36309
+ const normalized = thisDir.replace(/\\/g, "/");
36310
+ const isSource = normalized.endsWith("/src/services");
36311
+ const isCliBundle = normalized.endsWith("/cli");
36312
+ return isSource || isCliBundle ? path17.join(thisDir, "..", "lang", "grammars") : path17.join(thisDir, "lang", "grammars");
36313
+ }
36308
36314
  async function checkGrammarWasmFiles() {
36309
36315
  const grammarFiles = [
36310
36316
  "tree-sitter-javascript.wasm",
@@ -36328,8 +36334,7 @@ async function checkGrammarWasmFiles() {
36328
36334
  "tree-sitter-regex.wasm"
36329
36335
  ];
36330
36336
  const thisDir = path17.dirname(fileURLToPath(import.meta.url));
36331
- const isSource = thisDir.replace(/\\/g, "/").endsWith("/src/services");
36332
- const grammarDir = isSource ? path17.join(thisDir, "..", "lang", "grammars") : path17.join(thisDir, "lang", "grammars");
36337
+ const grammarDir = resolveGrammarDir(thisDir);
36333
36338
  const missing = [];
36334
36339
  if (!existsSync8(path17.join(grammarDir, "tree-sitter.wasm"))) {
36335
36340
  missing.push("tree-sitter.wasm (core runtime)");
@@ -37211,7 +37216,7 @@ LANGUAGE_REGISTRY.register({
37211
37216
  displayName: "C# / .NET",
37212
37217
  tier: 2,
37213
37218
  extensions: [".cs", ".csx"],
37214
- treeSitter: { grammarId: "c_sharp", wasmFile: "tree-sitter-c_sharp.wasm" },
37219
+ treeSitter: { grammarId: "csharp", wasmFile: "tree-sitter-c-sharp.wasm" },
37215
37220
  build: {
37216
37221
  detectFiles: ["*.csproj", "*.sln", "Directory.Build.props"],
37217
37222
  commands: [
package/dist/index.js CHANGED
@@ -43947,6 +43947,12 @@ async function checkConfigParseability(directory) {
43947
43947
  };
43948
43948
  }
43949
43949
  }
43950
+ function resolveGrammarDir(thisDir) {
43951
+ const normalized = thisDir.replace(/\\/g, "/");
43952
+ const isSource = normalized.endsWith("/src/services");
43953
+ const isCliBundle = normalized.endsWith("/cli");
43954
+ return isSource || isCliBundle ? path24.join(thisDir, "..", "lang", "grammars") : path24.join(thisDir, "lang", "grammars");
43955
+ }
43950
43956
  async function checkGrammarWasmFiles() {
43951
43957
  const grammarFiles = [
43952
43958
  "tree-sitter-javascript.wasm",
@@ -43970,8 +43976,7 @@ async function checkGrammarWasmFiles() {
43970
43976
  "tree-sitter-regex.wasm"
43971
43977
  ];
43972
43978
  const thisDir = path24.dirname(fileURLToPath(import.meta.url));
43973
- const isSource = thisDir.replace(/\\/g, "/").endsWith("/src/services");
43974
- const grammarDir = isSource ? path24.join(thisDir, "..", "lang", "grammars") : path24.join(thisDir, "lang", "grammars");
43979
+ const grammarDir = resolveGrammarDir(thisDir);
43975
43980
  const missing = [];
43976
43981
  if (!existsSync11(path24.join(grammarDir, "tree-sitter.wasm"))) {
43977
43982
  missing.push("tree-sitter.wasm (core runtime)");
@@ -45491,7 +45496,7 @@ var init_profiles = __esm(() => {
45491
45496
  displayName: "C# / .NET",
45492
45497
  tier: 2,
45493
45498
  extensions: [".cs", ".csx"],
45494
- treeSitter: { grammarId: "c_sharp", wasmFile: "tree-sitter-c_sharp.wasm" },
45499
+ treeSitter: { grammarId: "csharp", wasmFile: "tree-sitter-c-sharp.wasm" },
45495
45500
  build: {
45496
45501
  detectFiles: ["*.csproj", "*.sln", "Directory.Build.props"],
45497
45502
  commands: [
@@ -62041,8 +62046,10 @@ function getWasmFileName(languageId) {
62041
62046
  }
62042
62047
  function getGrammarsDirAbsolute() {
62043
62048
  const thisDir = path57.dirname(fileURLToPath2(import.meta.url));
62044
- const isSource = thisDir.replace(/\\/g, "/").endsWith("/src/lang");
62045
- return isSource ? path57.join(thisDir, "grammars") : path57.join(thisDir, "lang", "grammars");
62049
+ const normalized = thisDir.replace(/\\/g, "/");
62050
+ const isSource = normalized.endsWith("/src/lang");
62051
+ const isCliBundle = normalized.endsWith("/cli");
62052
+ return isSource ? path57.join(thisDir, "grammars") : isCliBundle ? path57.join(thisDir, "..", "lang", "grammars") : path57.join(thisDir, "lang", "grammars");
62046
62053
  }
62047
62054
  async function loadGrammar(languageId) {
62048
62055
  if (typeof languageId !== "string" || languageId.length > 100) {
@@ -15,6 +15,16 @@ export interface DiagnoseData {
15
15
  totalCount: number;
16
16
  allPassed: boolean;
17
17
  }
18
+ /**
19
+ * Resolve the grammar WASM directory from an arbitrary module directory.
20
+ * Exported for unit testing — callers should not pass import.meta.url directly.
21
+ *
22
+ * Rules:
23
+ * - Dev source (ends with /src/services): go up one level → src/lang/grammars
24
+ * - CLI bundle (ends with /cli): go up one level → dist/lang/grammars
25
+ * - Main bundle (everything else): stay put → dist/lang/grammars
26
+ */
27
+ export declare function resolveGrammarDir(thisDir: string): string;
18
28
  /**
19
29
  * Get diagnose data from the swarm directory.
20
30
  * Returns structured health checks for GUI, background flows, or commands.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-swarm",
3
- "version": "6.85.2",
3
+ "version": "6.85.3",
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",