Add cross-repo tool with PR #18 patterns#21
Conversation
|
/bonk review our implementation against the changes in anomalyco/opencode#6302 - e.g. whether installing dependencies takes effect as expected / Bun.install runs per subdirectory under |
|
Now I have a clear picture. Let me analyze the implementation against PR #6302's changes: Review: Cross-Repo Tool vs PR #6302 (Local Plugin Dependencies)Summary of PR #6302's ChangesPR #6302 adds support for local plugin dependencies by running // Install any additional dependencies defined in the package.json
// This allows local plugins and custom tools to use external packages
await BunProc.run(["install"], { cwd: dir }).catch(() => {})This runs once at startup in the config directory (e.g., Your Implementation AnalysisDoes dependency installation take effect as expected? Yes. Your setup is correctly structured:
Does No, and that's by design. PR #6302 runs Node/Bun module resolution naturally finds Potential IssueThere's one subtle concern: if
So the timing should be correct. Verification ChecklistYour implementation correctly follows PR #6302's pattern:
RecommendationNo changes needed - your implementation aligns with PR #6302's design. The |
|
Bonk workflow was cancelled. |
6590079 to
7e3b16a
Compare
|
/bonk investigate further:
|
|
Bonk workflow was cancelled. |
This comment was marked as outdated.
This comment was marked as outdated.
|
error: Your local changes to the following files would be overwritten by checkout: |
|
Bonk workflow failed. Check the logs for details. |
- Implements clone, read, write, list, branch, commit, push, pr, exec operations - Session-scoped repo state prevents concurrent agent conflicts - Context-aware auth: OIDC (GitHub Actions), gh CLI, or env tokens - Crash-resistant: all errors returned as results, never thrown - Input validation prevents shell injection and path traversal - Structured logging for debugging Closes #20
7e3b16a to
a3aa4f8
Compare
|
/bonk make logging and SDK changes per 1387dce to cross-repo as we did for git-worktree |
Co-authored-by: elithrar <elithrar@users.noreply.github.com>
|
I've applied the logging and SDK changes from commit Summary of Changes
|
|
/bonk passing LogFn around is noisy. Can we avoid that?
|
|
error: Your local changes to the following files would be overwritten by checkout: |
|
Bonk workflow failed. Check the logs for details. |
I've created the cross-repo tool at
.config/opencode/tool/cross-repo.tsbased on the gist, applying the best practices from PR #18 (worktree plugin).Summary
Created:
.config/opencode/tool/cross-repo.ts- A tool for operating on GitHub repositories other than the current working directory.Key Features
{sessionID}/{owner}/{repo}to prevent conflicts between concurrent agentsBest Practices Applied (per PR #18 guidance)
execute(), errors returned as{ success: false, error }Bun.spawnwith array args (avoids shell interpolation)validateRepoName()andvalidateBranchName()reject shell metacharacterslog(sessionID, action, detail)formatGIT_TERMINAL_PROMPT=0,stdin: "ignore", timeout handlingImprovements Over Original Gist
bash -cpatterns with directBun.spawnarray argsPromise.raceCloses #20
github run