chore: Type safety cleanup — remove `any` types from production code
Description
Several production files use any types where proper typing would improve safety and developer experience. This is a focused cleanup task — great for getting familiar with the codebase.
Locations to Fix
1. src/index.ts — configInput: any
Lines 216, 218:
config: async (configInput: any) => {
// ...
registerCommands(configInput);
Fix: Type configInput using the OpenCode plugin config type (check @opencode-ai/plugin exports).
2. src/commands.ts — args as any
Line 161:
args ? { checkpoint: args as any } : {},
Fix: Type the args parameter from the command handler properly.
3. src/tools/cleanup.ts — implicit any[] return
Line 46:
return state.jobs.filter((j) => j.status !== 'running');
Fix: Add explicit return type annotation to determineJobsToClean. The function should return JobState[] or similar typed array.
4. src/index.ts — as any for tool registration
Line 248:
? { mc_report, mc_status } as any
Fix: Use proper tool type from the plugin SDK.
How to Verify
# After making changes, ensure build passes
bun run build
# Run tests
bun test
# Optionally check for remaining `as any` in src/ (not tests/)
grep -rn "as any" src/
Additional Context
This is a good first issue for contributors getting started with the codebase. Each fix is isolated, low-risk, and teaches you about the plugin structure:
index.ts— plugin entry point and lifecycle hookscommands.ts— slash command registrationcleanup.ts— job cleanup logic
The test files (219 as any usages) are intentionally out of scope — mock typing in tests is a separate effort.