opencode-agentic-engine 0.2.0 → 0.2.2

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.
@@ -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;AA4kG/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"}
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;AAinG/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.0
1
+ // opencode-agentic-engine v0.2.2
2
2
  // Bundled for zero-install drop-in
3
3
 
4
4
  // src/index.ts
@@ -6798,7 +6798,7 @@ Call the specific tool (agentic_nav, agentic_execute, etc.) directly.
6798
6798
  await traceLogger.init();
6799
6799
  } catch {
6800
6800
  }
6801
- autoUpdatePlugin("0.2.0");
6801
+ autoUpdatePlugin("0.2.2");
6802
6802
  configLoader.onChange((newConfig) => {
6803
6803
  vectorStore.setSearchWeights(newConfig.memory.search.keywordWeight, newConfig.memory.search.vectorWeight);
6804
6804
  vectorStore.setStopWordsLanguages(newConfig.memory.stopWordsLanguages);
@@ -9508,8 +9508,53 @@ ${dataset.data.slice(0, 2e3)}${dataset.data.length > 2e3 ? "\n\u2026 (truncated)
9508
9508
  }
9509
9509
  } catch {
9510
9510
  }
9511
+ let codebaseContext = "";
9512
+ try {
9513
+ const rootFiles = readdirSync2(projectDir).filter((f) => !f.startsWith(".") && !f.includes("lock"));
9514
+ const knownConfigNames = /* @__PURE__ */ new Set(["Makefile", "Dockerfile", "docker-compose.yml", "docker-compose.yaml", "go.mod", "Gemfile", "requirements.txt", "setup.py", "setup.cfg", "pom.xml", "build.gradle", "gradle.properties", "Podfile", "Cartfile", "Mixfile", "rebar.config", "opam", "stack.yaml", "cabal.project", "Cargo.lock", "Gemfile.lock", "composer.lock", "pnpm-lock.yaml", "yarn.lock", "bun.lock"]);
9515
+ const configExts = [".json", ".toml", ".yaml", ".yml", ".ini", ".cfg", ".conf"];
9516
+ const configFiles = rootFiles.filter((f) => knownConfigNames.has(f) || configExts.some((ext) => f.endsWith(ext))).slice(0, 5);
9517
+ for (const cfg of configFiles) {
9518
+ const cfgPath = join6(projectDir, cfg);
9519
+ codebaseContext += `
9520
+ ### ${cfg}
9521
+ \`\`\`
9522
+ ${readFileSync6(cfgPath, "utf-8").slice(0, 1e3)}
9523
+ \`\`\`
9524
+ `;
9525
+ }
9526
+ const srcDirs = ["src", "app", "lib", "server"].filter((d) => existsSync8(join6(projectDir, d)));
9527
+ let filesRead = 0;
9528
+ for (const dir of srcDirs) {
9529
+ const walkDir = (d) => {
9530
+ if (filesRead >= 5) return;
9531
+ try {
9532
+ for (const entry of readdirSync2(d, { withFileTypes: true })) {
9533
+ if (filesRead >= 5) return;
9534
+ const full = join6(d, entry.name);
9535
+ if (entry.isDirectory() && !["node_modules", ".git", "dist"].includes(entry.name)) walkDir(full);
9536
+ else if (entry.isFile() && /\.(ts|js|tsx|jsx|mjs|rs|go|py)$/.test(entry.name)) {
9537
+ const content = readFileSync6(full, "utf-8").slice(0, 500);
9538
+ if (content.trim()) {
9539
+ codebaseContext += `
9540
+ ### ${full.replace(projectDir, ".")}
9541
+ \`\`\`
9542
+ ${content}
9543
+ \`\`\`
9544
+ `;
9545
+ filesRead++;
9546
+ }
9547
+ }
9548
+ }
9549
+ } catch {
9550
+ }
9551
+ };
9552
+ walkDir(join6(projectDir, dir));
9553
+ }
9554
+ } catch {
9555
+ }
9511
9556
  await navigator.scan(projectDir);
9512
- const summary = navigator.getSummary() + knowledgeContext;
9557
+ const summary = navigator.getSummary() + knowledgeContext + codebaseContext;
9513
9558
  let subtasks = [];
9514
9559
  try {
9515
9560
  const intent = await planner.decomposeWithLLM(llmEngine2, args.goal, summary);