Add agent filtering to experimental.chat.system.transform hook to prevent
injecting plan submission prompts into agents that shouldn't receive them:
- Hardcoded exclusion for "build" agent
- Dynamic exclusion for agents with mode "subagent" (e.g., general, explore)
- Skip injection if agent detection fails (safer behavior)
The plan agent and other primary agents will continue to receive the prompt.
Co-authored-by: cognitive <152830360+METAeuPHORIC@users.noreply.github.com>
Addresses community feedback on v0.6.6 sub-agent fix:
1. Add `config` hook to register `submit_plan` in `primary_tools`
- OpenCode natively hides these tools from ALL sub-agents
- Works for custom sub-agents too, not just general/explore
2. Replace buggy `chat.message` hook with `experimental.chat.system.transform`
- chat.message was persisting the reminder to ALL user messages
- system.transform injects once into system prompt
3. Remove hardcoded runtime sub-agent check
- No longer needed with primary_tools handling it
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
The `files` array in package.json was missing plannotator.html and
review-editor.html, causing them to be omitted from npm publishes.
This explains why users were stuck on old versions.
Also fixes incorrect cache path in docs and install script.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The Plan Submission system prompt was being injected into ALL requests,
including title generation. This caused the title generator to see the
wrong system prompt and attempt to call submit_plan instead of generating
a title.
This fix detects title generation requests by checking for "title generator"
or "generate a title" in the existing system prompt and skips injecting
the Plan Submission instructions for those requests.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fix config access: use response.data.share instead of response.share
- Make config read lazy to avoid blocking plugin init
- Add --disable-sharing and --keep flags to sandbox script
- Add sharingEnabled to test-server.ts
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add deployment-level configuration to disable URL sharing for
security/privacy concerns.
Configuration methods:
- Claude Code: PLANNOTATOR_SHARE=disabled env var
- OpenCode: "share": "disabled" in opencode.json (primary), env var fallback
When disabled:
- Quick Share button hidden in annotation panel
- Share tab hidden in export modal (shows only Raw Diff)
Closes#69
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The postinstall script previously hardcoded ~/.config/opencode/command
as the destination for slash command files. This causes issues for users
running OpenCode in portable/XDG-compliant environments where
XDG_CONFIG_HOME is set to a custom location.
This change uses ${XDG_CONFIG_HOME:-$HOME/.config} which:
- Uses XDG_CONFIG_HOME when set (for portable installations)
- Falls back to ~/.config for standard installations (no behavior change)
This follows the XDG Base Directory Specification and ensures the plugin
works correctly in containerized, portable, or multi-user environments.
Co-authored-by: Aleksey Bragin <ab@alfabox.net>
- Add Windows PowerShell install script (install.ps1)
- Install slash commands for both Claude Code and OpenCode
- Update OpenCode README with install script instructions
- Simplify UpdateBanner to use same install command for both platforms
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Remove early exit when no uncommitted changes - user can switch to
"Last commit" or other diff types via dropdown.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Show correct origin badge (Claude Code orange, OpenCode gray)
- Always show file tree sidebar when diff options available
- Update README with v0.5.0 label
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Update version in root, opencode-plugin, and server packages
- Add code review feature to README
- Build artifacts for release
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
## Summary
Complete code review system for reviewing git diffs with annotations.
### Features
- Interactive diff viewer with split/unified views
- Line-level annotation system
- Diff type selector (uncommitted, last commit, vs main branch)
- Dynamic default branch detection
- Empty state handling
- Simplified UX with streamlined feedback flow
Closes#51Closes#56
Allow users to specify which browser opens plan files via environment variable.
Default behavior unchanged - only activates when env var is set.
- macOS: Set to app name ("Google Chrome") or path
- Linux/Windows: Set to executable path
Closes#42
Fix stale build artifacts in npm package - version was showing 0.4.9 due to
pre-built HTML being copied before version bump.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Update CLAUDE.md with new APIs and file structure
- Remove unused helper functions (isAgentSwitchEnabled, isPlanSaveEnabled)
- Sync all package versions to 0.4.10
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Add configurable agent switching for OpenCode
Add a Settings UI option to configure agent switching behavior after plan
approval. Users can now choose to switch to the "build" agent (default) or
disable agent switching entirely. This is particularly useful for oh-my-opencode
users who have their own agent switching logic.
Changes:
- Add agentSwitch.ts utility for storing agent switch preference
- Add "Agent Switching" dropdown in Settings UI
- Pass agentSwitch setting through /api/approve to OpenCode plugin
- Conditionally perform agent switch based on user preference
Closes#37🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: TheOutdoorProgrammer <13936290+TheOutdoorProgrammer@users.noreply.github.com>
* Hide Agent Switching setting when not in OpenCode mode
* Add configurable plan saving settings
Users can now:
- Disable plan saving entirely via Settings toggle
- Set a custom save path (supports ~ for home directory)
Closes#36
* Widen Settings dialog to accommodate new options
* Move Save Plans setting below Identity section
* Make Obsidian Vault and Folder inputs side by side
* Move Agent Switching below Save Plans in Settings
---------
Co-authored-by: TheOutdoorProgrammer <13936290+TheOutdoorProgrammer@users.noreply.github.com>
- New storage.ts module with cross-platform support (Windows/macOS/Linux)
- Save plan.md on server start
- Save plan.diff.md and plan-{approved,denied}.md on decision
- OpenCode plugin shows saved path in tool result
Features:
- OpenCode: annotations are sent on approval as implementation notes
- Claude Code: confirmation dialog warns annotations won't be sent
- Dialog includes links to upvote Claude Code issues #16001#15755
Refactor:
- New reusable ConfirmDialog component
Closes#30🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Agent switching:
- Use noReply: true with await to ensure user message is created
before returning from tool
- Fixes race condition where message was created after loop exited
UI:
- Adjust plan viewer width to 832px (between 3xl and 4xl)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Increases default width from 768px to 896px for better readability
while still fitting comfortably on laptop screens.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Users need to clear both ~/.cache/opencode and ~/.bun/install/cache
for a complete reset when stuck on old versions.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Removes xl breakpoint to keep narrow layout on all laptops.
Only widens on truly large external monitors.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Restore max-w-3xl as default width, only widen on larger screens:
- Default: max-w-3xl (768px) for laptops
- xl (1280px+): max-w-5xl for external monitors
- 2xl (1536px+): max-w-6xl for large desktops
Bumps version to 0.4.3.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Refactor: shared server package with PLANNOTATOR_REMOTE env var
- Create packages/server/ with shared server implementation
- Add PLANNOTATOR_REMOTE=1 env var for devcontainer/SSH mode
- Deprecate SSH_CONNECTION detection (still works with warning)
- Both Claude Code and OpenCode now use identical server logic
- OpenCode gains Obsidian/Bear integrations and remote detection
- Update documentation with environment variables section
Fixes#27🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Remove PLANNOTATOR_ORIGIN env var, fix onReady callback timing
- Remove PLANNOTATOR_ORIGIN hack from Claude Code hook (hardcode "claude-code")
- Fix onReady callback to pass port directly (was referencing undefined server)
- Create tests/manual/test-server.ts for testing either origin
- Update test-hook-2.sh to use new test server with opencode origin
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Add devcontainer test setup, reduce logging verbosity
- Add tests/devcontainer/ with devcontainer.json for testing remote mode
- Add tests/opencode-local/ for local OpenCode testing
- Update package.json build script for proper bundling
- Remove verbose multi-line error messages, keep useful errors
- Clean up unused deprecationWarned variable
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Add devcontainer support and documentation
- Add PLANNOTATOR_REMOTE env var for container/remote detection
- Remove console logging (silent operation)
- Add devcontainer.md with full setup instructions
- Add devcontainer section to OpenCode plugin README
- Add port-only test setup to reproduce common misconfiguration
- Update test devcontainers to forward port 4096 for opencode web
- Bump version to 0.4.1
Fixes#27🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Update CLAUDE.md: legacy SSH detection, not deprecated
Removed incorrect mention of deprecation warning - SSH_TTY/SSH_CONNECTION
detection is silent by design.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Fix OpenCode agent switching after plan approval
After approving a plan, the conversation context stayed in "plan" mode
even though the TUI showed "build". This caused edits to fail because
the plan agent has edit permissions denied.
The fix uses session.prompt() to inject a message with agent: "build",
which triggers a new agentic loop with proper build agent permissions.
Fixes#29🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
- Server returns origin field in /api/plan response
- UI displays badge next to version in header
- Claude Code: orange badge
- OpenCode: neutral zinc/gray badge
- Supports PLANNOTATOR_ORIGIN env var for testing
Closes#22🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Users may be stuck on old plugin versions due to OpenCode's caching.
Added note to both READMEs with the rm command to clear the cache.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>