Instructions for AI agents working in this repository.
Always run after making changes:
bun run build
bun run typecheckPublished packages use compiled dist/ output generated by the build script. TypeScript source files are used by tests and local source-file development.
bun testsrc/
└── index.ts — Plugin entrypoint, hooks into tool execution
- Bun over Node — use
bun,bun test,bun run. Never usenode,npx. - No comments unless explicitly requested.
- AWS auth error patterns — all AWS auth error detection happens in
AWS_AUTH_ERROR_PATTERNSinsrc/index.ts. Add new patterns there. - Single credential refresh — use the
refreshInProgressflag to prevent concurrent refresh attempts. - Tool hooks — only
bashandtasktools are monitored for AWS auth errors.
All commits must follow Conventional Commits:
<type>[optional scope]: <description>
Common types: feat, fix, perf, refactor, test, docs, ci, chore, build.
Use ! or a BREAKING CHANGE: footer for breaking changes.
Examples:
feat: add support for custom SSO login command
fix: handle concurrent refresh requests correctly
chore(deps): bump @opencode-ai/plugin to 1.14.20