opencode-mega-agent 0.1.0 → 0.1.1

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.
Files changed (2) hide show
  1. package/index.mjs +2 -0
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -236,6 +236,8 @@ async function executeLocalTool(toolName, argsJson, directory) {
236
236
  const target = resolve(args.file_path)
237
237
  const content = readFileSync(target, "utf-8")
238
238
  if (!content.includes(args.old_string)) return `Error: old_string not found in ${args.file_path}. File exists but the search string doesn't match.`
239
+ const matchCount = content.split(args.old_string).length - 1
240
+ if (matchCount > 1) return `Error: Found ${matchCount} matches for old_string in ${args.file_path}. Provide more surrounding context to identify a unique match.`
239
241
  writeFileSync(target, content.replace(args.old_string, args.new_string), "utf-8")
240
242
  return `Edited ${args.file_path}`
241
243
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-mega-agent",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "OpenCode plugin for MegaRouter cloud agents — auto-discovers and registers specialist AI agents (code review, security audit, debugging, etc.) as native subagents",
5
5
  "main": "index.mjs",
6
6
  "type": "module",