opencode-agentic-engine 0.1.8 → 0.1.9
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 +58 -6
- 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;AA8lG/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.9
|
|
2
2
|
// Bundled for zero-install drop-in
|
|
3
3
|
|
|
4
4
|
// src/index.ts
|
|
@@ -6561,8 +6561,15 @@ You have access to **22 specialized agentic_* tools** designed for software engi
|
|
|
6561
6561
|
- Use **agentic_auto** instead of implementing step by step manually
|
|
6562
6562
|
- Use **agentic_execute** instead of tracking progress manually
|
|
6563
6563
|
|
|
6564
|
+
### BEFORE STARTING ANY TASK \u2014 Gather Knowledge First
|
|
6565
|
+
Your training data has a cutoff date. Before implementing:
|
|
6566
|
+
1. **Search skills**: \`agentic_skill find "relevant technology"\` \u2014 learn from past successes/failures
|
|
6567
|
+
2. **Search episodes**: \`agentic_episodes search "similar task"\` \u2014 see what worked before
|
|
6568
|
+
3. **Check latest versions**: Use \`websearch\` for "technology X latest version 2026" to ensure you use current APIs
|
|
6569
|
+
4. Only then start implementing
|
|
6570
|
+
|
|
6564
6571
|
### FOR MULTI-STEP FEATURES (apps, APIs, refactors):
|
|
6565
|
-
Call **agentic_auto** IMMEDIATELY.
|
|
6572
|
+
Call **agentic_auto** IMMEDIATELY. It auto-gathers skills + doc context. Example:
|
|
6566
6573
|
\`@agentic_auto goal="Buat aplikasi POS dengan Express dan SQLite"\`
|
|
6567
6574
|
|
|
6568
6575
|
### FOR SINGLE-STEP TASKS:
|
|
@@ -6570,8 +6577,8 @@ Call the specific tool (agentic_nav, agentic_execute, etc.) directly.
|
|
|
6570
6577
|
|
|
6571
6578
|
## Standard Workflow
|
|
6572
6579
|
|
|
6573
|
-
1. **agentic_auto** \u2014 For multi-step tasks, call this FIRST. It
|
|
6574
|
-
2. OR manually: **
|
|
6580
|
+
1. **agentic_auto** \u2014 For multi-step tasks, call this FIRST. It auto-gathers knowledge
|
|
6581
|
+
2. OR manually: **agentic_skill find** \u2192 **agentic_episodes search** \u2192 **agentic_plan** \u2192 **agentic_execute** \u2192 **agentic_verify**
|
|
6575
6582
|
|
|
6576
6583
|
## Tool Reference
|
|
6577
6584
|
|
|
@@ -6791,7 +6798,7 @@ Call the specific tool (agentic_nav, agentic_execute, etc.) directly.
|
|
|
6791
6798
|
await traceLogger.init();
|
|
6792
6799
|
} catch {
|
|
6793
6800
|
}
|
|
6794
|
-
autoUpdatePlugin("0.1.
|
|
6801
|
+
autoUpdatePlugin("0.1.9");
|
|
6795
6802
|
configLoader.onChange((newConfig) => {
|
|
6796
6803
|
vectorStore.setSearchWeights(newConfig.memory.search.keywordWeight, newConfig.memory.search.vectorWeight);
|
|
6797
6804
|
vectorStore.setStopWordsLanguages(newConfig.memory.stopWordsLanguages);
|
|
@@ -9477,8 +9484,53 @@ ${dataset.data.slice(0, 2e3)}${dataset.data.length > 2e3 ? "\n\u2026 (truncated)
|
|
|
9477
9484
|
llmEngine2.setSessionId(context.sessionID);
|
|
9478
9485
|
const startTime = Date.now();
|
|
9479
9486
|
const projectDir = ctxDir(context);
|
|
9487
|
+
let knowledgeContext = "";
|
|
9488
|
+
try {
|
|
9489
|
+
const relevantSkills = skillStore.find(args.goal);
|
|
9490
|
+
if (relevantSkills.length > 0) {
|
|
9491
|
+
knowledgeContext += `
|
|
9492
|
+
## Relevant Skills from Past Sessions
|
|
9493
|
+
`;
|
|
9494
|
+
for (const sk of relevantSkills.slice(0, 5)) {
|
|
9495
|
+
knowledgeContext += `- **${sk.definition.meta.name}** (${(sk.successRate * 100).toFixed(0)}% success, ${sk.usageCount}x): ${sk.definition.workflow.steps.map((s) => s.description).join(" \u2192 ")}
|
|
9496
|
+
`;
|
|
9497
|
+
}
|
|
9498
|
+
}
|
|
9499
|
+
const similarTasks = episodicStore.search(args.goal);
|
|
9500
|
+
if (similarTasks.length > 0) {
|
|
9501
|
+
knowledgeContext += `
|
|
9502
|
+
## Similar Past Tasks
|
|
9503
|
+
`;
|
|
9504
|
+
for (const ep of similarTasks.slice(0, 3)) {
|
|
9505
|
+
knowledgeContext += `- **${ep.planGoal}** \u2192 outcome: ${ep.outcome}
|
|
9506
|
+
`;
|
|
9507
|
+
}
|
|
9508
|
+
}
|
|
9509
|
+
const techPattern = args.goal.match(/(node\.js|express|react|vue|angular|tailwind|bootstrap|sqlite|mongodb|postgres|typescript|next\.js|nuxt|svelte|prisma|drizzle|trpc|graphql|socket\.io|docker)/gi);
|
|
9510
|
+
if (techPattern) {
|
|
9511
|
+
const uniqueTech = [...new Set(techPattern.map((t) => t.toLowerCase().replace(/\.js$/, "").replace(/\.io$/, "")))];
|
|
9512
|
+
knowledgeContext += `
|
|
9513
|
+
## Latest Technology Versions
|
|
9514
|
+
`;
|
|
9515
|
+
for (const tech of uniqueTech.slice(0, 4)) {
|
|
9516
|
+
try {
|
|
9517
|
+
const pkgName = tech === "node" ? "node" : tech === "socket" ? "socket.io" : tech;
|
|
9518
|
+
const res = await fetch(`https://registry.npmjs.org/${pkgName}/latest`, { signal: AbortSignal.timeout(3e3) });
|
|
9519
|
+
if (res.ok) {
|
|
9520
|
+
const data = await res.json();
|
|
9521
|
+
if (data.version) {
|
|
9522
|
+
knowledgeContext += `- **${tech}**: v${data.version}${data.description ? ` \u2014 ${data.description.slice(0, 80)}` : ""}
|
|
9523
|
+
`;
|
|
9524
|
+
}
|
|
9525
|
+
}
|
|
9526
|
+
} catch {
|
|
9527
|
+
}
|
|
9528
|
+
}
|
|
9529
|
+
}
|
|
9530
|
+
} catch {
|
|
9531
|
+
}
|
|
9480
9532
|
await navigator.scan(projectDir);
|
|
9481
|
-
const summary = navigator.getSummary();
|
|
9533
|
+
const summary = navigator.getSummary() + knowledgeContext;
|
|
9482
9534
|
let subtasks = [];
|
|
9483
9535
|
try {
|
|
9484
9536
|
const intent = await planner.decomposeWithLLM(llmEngine2, args.goal, summary);
|