opencode-swarm 7.51.3 → 7.51.4
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 +1 -1
- package/dist/index.js +12 -4
- package/dist/lang/runtime.d.ts +8 -0
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -52,7 +52,7 @@ var package_default;
|
|
|
52
52
|
var init_package = __esm(() => {
|
|
53
53
|
package_default = {
|
|
54
54
|
name: "opencode-swarm",
|
|
55
|
-
version: "7.51.
|
|
55
|
+
version: "7.51.4",
|
|
56
56
|
description: "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
|
|
57
57
|
main: "dist/index.js",
|
|
58
58
|
types: "dist/index.d.ts",
|
package/dist/index.js
CHANGED
|
@@ -69,7 +69,7 @@ var package_default;
|
|
|
69
69
|
var init_package = __esm(() => {
|
|
70
70
|
package_default = {
|
|
71
71
|
name: "opencode-swarm",
|
|
72
|
-
version: "7.51.
|
|
72
|
+
version: "7.51.4",
|
|
73
73
|
description: "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
|
|
74
74
|
main: "dist/index.js",
|
|
75
75
|
types: "dist/index.d.ts",
|
|
@@ -91101,6 +91101,7 @@ ${JSON.stringify(symbolNames, null, 2)}`);
|
|
|
91101
91101
|
// src/lang/runtime.ts
|
|
91102
91102
|
var exports_runtime = {};
|
|
91103
91103
|
__export(exports_runtime, {
|
|
91104
|
+
resolveGrammarsDir: () => resolveGrammarsDir,
|
|
91104
91105
|
parserCache: () => parserCache,
|
|
91105
91106
|
loadGrammar: () => loadGrammar,
|
|
91106
91107
|
isGrammarAvailable: () => isGrammarAvailable,
|
|
@@ -91147,13 +91148,16 @@ function getWasmFileName(languageId) {
|
|
|
91147
91148
|
}
|
|
91148
91149
|
return `tree-sitter-${sanitized}.wasm`;
|
|
91149
91150
|
}
|
|
91150
|
-
function
|
|
91151
|
-
const thisDir = path92.dirname(fileURLToPath4(import.meta.url));
|
|
91151
|
+
function resolveGrammarsDir(thisDir) {
|
|
91152
91152
|
const normalized = thisDir.replace(/\\/g, "/");
|
|
91153
91153
|
const isSource = normalized.endsWith("/src/lang");
|
|
91154
91154
|
const isCliBundle = normalized.endsWith("/cli");
|
|
91155
91155
|
return isSource ? path92.join(thisDir, "grammars") : isCliBundle ? path92.join(thisDir, "..", "lang", "grammars") : path92.join(thisDir, "lang", "grammars");
|
|
91156
91156
|
}
|
|
91157
|
+
function getGrammarsDirAbsolute() {
|
|
91158
|
+
const thisDir = path92.dirname(fileURLToPath4(import.meta.url));
|
|
91159
|
+
return resolveGrammarsDir(thisDir);
|
|
91160
|
+
}
|
|
91157
91161
|
async function loadGrammar(languageId) {
|
|
91158
91162
|
if (typeof languageId !== "string" || languageId.length > 100) {
|
|
91159
91163
|
throw new Error(`Invalid languageId: must be a string of at most 100 characters`);
|
|
@@ -99988,6 +99992,7 @@ function createSystemEnhancerHook(config3, directory) {
|
|
|
99988
99992
|
let tryInject = function(text) {
|
|
99989
99993
|
const tokens = estimateTokens(text);
|
|
99990
99994
|
if (injectedTokens + tokens > maxInjectionTokens) {
|
|
99995
|
+
warn(`system-enhancer: injection budget exceeded (${injectedTokens + tokens} > ${maxInjectionTokens} tokens) — truncating system prompt content`);
|
|
99991
99996
|
return;
|
|
99992
99997
|
}
|
|
99993
99998
|
output.system.push(text);
|
|
@@ -112544,6 +112549,7 @@ init_config();
|
|
|
112544
112549
|
init_knowledge_store();
|
|
112545
112550
|
init_knowledge_validator();
|
|
112546
112551
|
init_manager();
|
|
112552
|
+
init_utils();
|
|
112547
112553
|
init_create_tool();
|
|
112548
112554
|
import { randomUUID as randomUUID13 } from "node:crypto";
|
|
112549
112555
|
var VALID_CATEGORIES2 = [
|
|
@@ -112666,7 +112672,9 @@ var knowledge_add = createSwarmTool({
|
|
|
112666
112672
|
message: "near-duplicate of existing entry"
|
|
112667
112673
|
});
|
|
112668
112674
|
}
|
|
112669
|
-
} catch {
|
|
112675
|
+
} catch (err2) {
|
|
112676
|
+
warn("knowledge_add: dedup check failed — skipping near-duplicate detection", err2);
|
|
112677
|
+
}
|
|
112670
112678
|
try {
|
|
112671
112679
|
await appendKnowledge(resolveSwarmKnowledgePath(directory), entry);
|
|
112672
112680
|
} catch (err2) {
|
package/dist/lang/runtime.d.ts
CHANGED
|
@@ -14,6 +14,14 @@ export declare const _internals: {
|
|
|
14
14
|
locateFile: (scriptName: string) => string;
|
|
15
15
|
}) => Promise<void>;
|
|
16
16
|
};
|
|
17
|
+
/**
|
|
18
|
+
* Pure path resolver for the grammars directory given a base directory.
|
|
19
|
+
* Exported for unit testing; production code uses getGrammarsDirAbsolute().
|
|
20
|
+
*
|
|
21
|
+
* @param thisDir - The directory to resolve from (typically dirname of the module file)
|
|
22
|
+
* @returns Absolute path to the grammars directory
|
|
23
|
+
*/
|
|
24
|
+
export declare function resolveGrammarsDir(thisDir: string): string;
|
|
17
25
|
/**
|
|
18
26
|
* Initialize a parser for the given language
|
|
19
27
|
* Loads WASM from dist/lang/grammars/ (copied during build)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-swarm",
|
|
3
|
-
"version": "7.51.
|
|
3
|
+
"version": "7.51.4",
|
|
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",
|