opencode-agentic-engine 0.1.6 → 0.1.8
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 +21 -15
- 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;AAkjG/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.1.
|
|
1
|
+
// opencode-agentic-engine v0.1.8
|
|
2
2
|
// Bundled for zero-install drop-in
|
|
3
3
|
|
|
4
4
|
// src/index.ts
|
|
@@ -7,7 +7,7 @@ import { readFileSync as readFileSync6, writeFileSync as writeFileSync4, mkdirSy
|
|
|
7
7
|
import { execFileSync as execFileSync5 } from "node:child_process";
|
|
8
8
|
import { join as join6, dirname as dirname5 } from "node:path";
|
|
9
9
|
import { fileURLToPath } from "node:url";
|
|
10
|
-
import { tmpdir } from "node:os";
|
|
10
|
+
import { tmpdir, homedir } from "node:os";
|
|
11
11
|
|
|
12
12
|
// src/core/intent-parser.ts
|
|
13
13
|
var IntentParser = class {
|
|
@@ -6541,12 +6541,7 @@ var createEngine = async (input, _options) => {
|
|
|
6541
6541
|
const configLoader = new ConfigLoader(worktree);
|
|
6542
6542
|
const config = configLoader.load();
|
|
6543
6543
|
configLoader.startWatch();
|
|
6544
|
-
const
|
|
6545
|
-
const agenticAgentPath = join6(agentsDir, "agentic.md");
|
|
6546
|
-
if (!existsSync8(agenticAgentPath)) {
|
|
6547
|
-
try {
|
|
6548
|
-
mkdirSync4(agentsDir, { recursive: true });
|
|
6549
|
-
writeFileSync4(agenticAgentPath, `---
|
|
6544
|
+
const agentContent = `---
|
|
6550
6545
|
description: Multi-agent software engineering assistant \u2014 22 tools for autonomous planning, execution, verification, delegation, and self-evolution.
|
|
6551
6546
|
mode: all
|
|
6552
6547
|
---
|
|
@@ -6617,9 +6612,18 @@ Call the specific tool (agentic_nav, agentic_execute, etc.) directly.
|
|
|
6617
6612
|
3. Never ask "should I..." \u2014 just call the tool
|
|
6618
6613
|
4. If a step fails, call **agentic_reflect** before retrying
|
|
6619
6614
|
5. After all steps done, call **agentic_verify** for final verification
|
|
6620
|
-
|
|
6621
|
-
|
|
6622
|
-
|
|
6615
|
+
`;
|
|
6616
|
+
try {
|
|
6617
|
+
const globalAgentsDir = join6(homedir(), ".config", "opencode", "agents");
|
|
6618
|
+
mkdirSync4(globalAgentsDir, { recursive: true });
|
|
6619
|
+
writeFileSync4(join6(globalAgentsDir, "agentic.md"), agentContent, "utf-8");
|
|
6620
|
+
} catch {
|
|
6621
|
+
}
|
|
6622
|
+
try {
|
|
6623
|
+
const localAgentsDir = join6(worktree, ".opencode", "agents");
|
|
6624
|
+
mkdirSync4(localAgentsDir, { recursive: true });
|
|
6625
|
+
writeFileSync4(join6(localAgentsDir, "agentic.md"), agentContent, "utf-8");
|
|
6626
|
+
} catch {
|
|
6623
6627
|
}
|
|
6624
6628
|
const intentParser = new IntentParser();
|
|
6625
6629
|
const executor = new Executor();
|
|
@@ -6787,7 +6791,7 @@ Call the specific tool (agentic_nav, agentic_execute, etc.) directly.
|
|
|
6787
6791
|
await traceLogger.init();
|
|
6788
6792
|
} catch {
|
|
6789
6793
|
}
|
|
6790
|
-
autoUpdatePlugin("0.1.
|
|
6794
|
+
autoUpdatePlugin("0.1.8");
|
|
6791
6795
|
configLoader.onChange((newConfig) => {
|
|
6792
6796
|
vectorStore.setSearchWeights(newConfig.memory.search.keywordWeight, newConfig.memory.search.vectorWeight);
|
|
6793
6797
|
vectorStore.setStopWordsLanguages(newConfig.memory.stopWordsLanguages);
|
|
@@ -6962,7 +6966,8 @@ ${patch.instruction}`;
|
|
|
6962
6966
|
let subtasks = args.subtasks ?? [];
|
|
6963
6967
|
if (subtasks.length === 0 && args.autoDecompose !== false) {
|
|
6964
6968
|
if (args.llmDecompose !== false) {
|
|
6965
|
-
|
|
6969
|
+
const scanDir = context.directory || context.worktree || worktree;
|
|
6970
|
+
await navigator.scan(scanDir);
|
|
6966
6971
|
const codebaseSummary = navigator.getSummary();
|
|
6967
6972
|
try {
|
|
6968
6973
|
const llmIntent = await planner.decomposeWithLLM(llmEngine2, args.goal, codebaseSummary);
|
|
@@ -7056,9 +7061,10 @@ Start with \`agentic_execute\` for the first ready step.`,
|
|
|
7056
7061
|
maxResults: tool.schema.number().optional().describe("Maximum number of files to return (default: 10)"),
|
|
7057
7062
|
showSummary: tool.schema.boolean().optional().describe("Show full project structure summary")
|
|
7058
7063
|
},
|
|
7059
|
-
async execute(args,
|
|
7064
|
+
async execute(args, context) {
|
|
7060
7065
|
const maxResults = args.maxResults ?? 10;
|
|
7061
|
-
|
|
7066
|
+
const scanDir = context.directory || context.worktree || worktree;
|
|
7067
|
+
await navigator.scan(scanDir);
|
|
7062
7068
|
const files = navigator.findRelevantFiles(args.query, maxResults);
|
|
7063
7069
|
for (const file of files) {
|
|
7064
7070
|
vectorStore.addDocument(`file:${file}`, `File ${file}`, {
|