Instructions for AI agents working in this repository.
Always run after making changes:
bun run typecheckThere is no build step. TypeScript source files are published directly and loaded natively by Bun.
bun testsrc/
├── index.ts — Plugin entrypoint, hooks into tool execution
└── types.d.ts — Plugin type definitions
- Bun over Node — use
bun,bun test,bun run. Never usenode,npx. - No comments unless explicitly requested.
- 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.2.23