opencode-agentic-engine 0.2.1 → 0.2.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/index.d.ts.map +1 -1
- package/dist/index.js +61 -40
- package/dist/index.js.map +2 -2
- package/package.json +1 -1
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAioG/D,eAAO,MAAM,aAAa,EAAE,MAAqB,CAAA;AAEjD,QAAA,MAAM,YAAY,EAAE,YAGnB,CAAA;AACD,eAAe,YAAY,CAAA;AAG3B,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAC7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAA;AACzE,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAA;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAA;AAC/D,OAAO,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAA;AAC5J,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// opencode-agentic-engine v0.2.
|
|
1
|
+
// opencode-agentic-engine v0.2.3
|
|
2
2
|
// Bundled for zero-install drop-in
|
|
3
3
|
|
|
4
4
|
// src/index.ts
|
|
@@ -6563,10 +6563,12 @@ You have access to **22 specialized agentic_* tools** designed for software engi
|
|
|
6563
6563
|
|
|
6564
6564
|
### BEFORE STARTING ANY TASK \u2014 Gather Knowledge First
|
|
6565
6565
|
Your training data has a cutoff date. Before implementing:
|
|
6566
|
-
1. **
|
|
6567
|
-
2. **
|
|
6568
|
-
3. **Search
|
|
6569
|
-
4.
|
|
6566
|
+
1. **Check project structure** \u2014 agentic_auto already gives you a map: file types, root dirs, largest dirs
|
|
6567
|
+
2. **Read relevant files** \u2014 use \`read\` or \`agentic_nav\` to inspect specific files (you decide which)
|
|
6568
|
+
3. **Search skills**: \`agentic_skill find "relevant technology"\` \u2014 learn from past successes/failures
|
|
6569
|
+
4. **Search episodes**: \`agentic_episodes search "similar task"\` \u2014 see what worked before
|
|
6570
|
+
5. **Search latest docs**: \`websearch "technology X latest version 2026"\` \u2014 check current APIs for ANY ecosystem (Node, Rust, Go, Python, etc.)
|
|
6571
|
+
6. Only then start implementing
|
|
6570
6572
|
|
|
6571
6573
|
### FOR MULTI-STEP FEATURES (apps, APIs, refactors):
|
|
6572
6574
|
Call **agentic_auto** IMMEDIATELY. It auto-gathers skills + doc context. Example:
|
|
@@ -6798,7 +6800,7 @@ Call the specific tool (agentic_nav, agentic_execute, etc.) directly.
|
|
|
6798
6800
|
await traceLogger.init();
|
|
6799
6801
|
} catch {
|
|
6800
6802
|
}
|
|
6801
|
-
autoUpdatePlugin("0.2.
|
|
6803
|
+
autoUpdatePlugin("0.2.3");
|
|
6802
6804
|
configLoader.onChange((newConfig) => {
|
|
6803
6805
|
vectorStore.setSearchWeights(newConfig.memory.search.keywordWeight, newConfig.memory.search.vectorWeight);
|
|
6804
6806
|
vectorStore.setStopWordsLanguages(newConfig.memory.stopWordsLanguages);
|
|
@@ -9508,51 +9510,70 @@ ${dataset.data.slice(0, 2e3)}${dataset.data.length > 2e3 ? "\n\u2026 (truncated)
|
|
|
9508
9510
|
}
|
|
9509
9511
|
} catch {
|
|
9510
9512
|
}
|
|
9511
|
-
let
|
|
9513
|
+
let structureContext = "";
|
|
9512
9514
|
try {
|
|
9513
|
-
|
|
9514
|
-
|
|
9515
|
-
if (
|
|
9516
|
-
|
|
9517
|
-
|
|
9518
|
-
|
|
9519
|
-
|
|
9520
|
-
|
|
9521
|
-
|
|
9515
|
+
const extCount = /* @__PURE__ */ new Map();
|
|
9516
|
+
const walkExt = (d, depth = 0) => {
|
|
9517
|
+
if (depth > 8) return;
|
|
9518
|
+
for (const entry of readdirSync2(d, { withFileTypes: true })) {
|
|
9519
|
+
if (entry.name.startsWith(".") || ["node_modules", ".git", "dist", "build", "target", "vendor"].includes(entry.name)) continue;
|
|
9520
|
+
const full = join6(d, entry.name);
|
|
9521
|
+
if (entry.isDirectory()) walkExt(full, depth + 1);
|
|
9522
|
+
else if (entry.isFile()) {
|
|
9523
|
+
const idx = entry.name.lastIndexOf(".");
|
|
9524
|
+
const ext = idx > 0 ? entry.name.slice(idx) : "(no ext)";
|
|
9525
|
+
extCount.set(ext, (extCount.get(ext) || 0) + 1);
|
|
9526
|
+
}
|
|
9522
9527
|
}
|
|
9528
|
+
};
|
|
9529
|
+
walkExt(projectDir);
|
|
9530
|
+
const sortedExts = [...extCount.entries()].sort((a, b) => b[1] - a[1]).slice(0, 15);
|
|
9531
|
+
structureContext += `
|
|
9532
|
+
### Project File Types
|
|
9533
|
+
| Extension | Count |
|
|
9534
|
+
|-----------|-------|
|
|
9535
|
+
`;
|
|
9536
|
+
for (const [ext, count] of sortedExts) {
|
|
9537
|
+
structureContext += `| \`${ext}\` | ${count} |
|
|
9538
|
+
`;
|
|
9523
9539
|
}
|
|
9524
|
-
const
|
|
9525
|
-
|
|
9526
|
-
|
|
9527
|
-
const walkDir = (d) => {
|
|
9528
|
-
if (filesRead >= 5) return;
|
|
9529
|
-
try {
|
|
9530
|
-
for (const entry of readdirSync2(d, { withFileTypes: true })) {
|
|
9531
|
-
if (filesRead >= 5) return;
|
|
9532
|
-
const full = join6(d, entry.name);
|
|
9533
|
-
if (entry.isDirectory() && !["node_modules", ".git", "dist"].includes(entry.name)) walkDir(full);
|
|
9534
|
-
else if (entry.isFile() && /\.(ts|js|tsx|jsx|mjs|rs|go|py)$/.test(entry.name)) {
|
|
9535
|
-
const content = readFileSync6(full, "utf-8").slice(0, 500);
|
|
9536
|
-
if (content.trim()) {
|
|
9537
|
-
codebaseContext += `
|
|
9538
|
-
### ${full.replace(projectDir, ".")}
|
|
9540
|
+
const rootEntries = readdirSync2(projectDir, { withFileTypes: true }).filter((e) => !e.name.startsWith(".") && !["node_modules", ".git", "dist", "build", "target", "vendor"].includes(e.name));
|
|
9541
|
+
structureContext += `
|
|
9542
|
+
### Project Root
|
|
9539
9543
|
\`\`\`
|
|
9540
|
-
${
|
|
9544
|
+
${rootEntries.map((e) => (e.isDirectory() ? "\u{1F4C1} " : "\u{1F4C4} ") + e.name).join("\n")}
|
|
9541
9545
|
\`\`\`
|
|
9542
9546
|
`;
|
|
9543
|
-
|
|
9544
|
-
|
|
9545
|
-
|
|
9546
|
-
|
|
9547
|
-
|
|
9547
|
+
const dirCount = /* @__PURE__ */ new Map();
|
|
9548
|
+
const walkDirCount = (d, depth = 0) => {
|
|
9549
|
+
if (depth > 6) return;
|
|
9550
|
+
for (const entry of readdirSync2(d, { withFileTypes: true })) {
|
|
9551
|
+
if (entry.name.startsWith(".") || ["node_modules", ".git", "dist", "build", "target", "vendor"].includes(entry.name)) continue;
|
|
9552
|
+
const full = join6(d, entry.name);
|
|
9553
|
+
if (entry.isDirectory()) walkDirCount(full, depth + 1);
|
|
9554
|
+
else if (entry.isFile()) {
|
|
9555
|
+
const parent = d.replace(projectDir, "").slice(1) || ".";
|
|
9556
|
+
dirCount.set(parent, (dirCount.get(parent) || 0) + 1);
|
|
9548
9557
|
}
|
|
9549
|
-
}
|
|
9550
|
-
|
|
9558
|
+
}
|
|
9559
|
+
};
|
|
9560
|
+
walkDirCount(projectDir);
|
|
9561
|
+
const sortedDirs = [...dirCount.entries()].sort((a, b) => b[1] - a[1]).slice(0, 8);
|
|
9562
|
+
structureContext += `
|
|
9563
|
+
### Largest Directories
|
|
9564
|
+
| Directory | Files |
|
|
9565
|
+
|-----------|-------|
|
|
9566
|
+
`;
|
|
9567
|
+
for (const [dir, count] of sortedDirs) {
|
|
9568
|
+
structureContext += `| \`${dir}/\` | ${count} |
|
|
9569
|
+
`;
|
|
9551
9570
|
}
|
|
9571
|
+
structureContext += `
|
|
9572
|
+
> \u{1F4A1} LLM: Use \`read\` or \`agentic_nav\` to inspect specific files as needed.`;
|
|
9552
9573
|
} catch {
|
|
9553
9574
|
}
|
|
9554
9575
|
await navigator.scan(projectDir);
|
|
9555
|
-
const summary = navigator.getSummary() + knowledgeContext +
|
|
9576
|
+
const summary = navigator.getSummary() + knowledgeContext + structureContext;
|
|
9556
9577
|
let subtasks = [];
|
|
9557
9578
|
try {
|
|
9558
9579
|
const intent = await planner.decomposeWithLLM(llmEngine2, args.goal, summary);
|