This directory contains a devcontainer setup for testing Plannotator with OpenCode in a containerized environment.
- Docker installed and running
- VS Code with Dev Containers extension
- OpenCode auth configured on your host machine (
~/.local/share/opencode/auth.json)
-
Create auth symlink (one-time setup on host):
mkdir -p .opencode ln ~/.local/share/opencode/auth.json .opencode/auth.json -
Open in VS Code:
code tests/devcontainer
-
Reopen in Container: When prompted, click "Reopen in Container" or use Command Palette:
Dev Containers: Reopen in Container
The devcontainer is pre-configured with:
PLANNOTATOR_REMOTE=1- enables remote modePLANNOTATOR_PORT=9999- fixed port for the UI- Port 9999 forwarded to host
-
Inside the container terminal, run OpenCode:
opencode
Or for web interface:
opencode web
Then access http://localhost:4096 in your browser.
-
Ask OpenCode to create a plan (e.g., "Create a plan to add user authentication")
-
When OpenCode calls
submit_plan, Plannotator should:- Start server on port 9999 (not random)
- Not try to open browser (remote mode)
-
Open
http://localhost:9999in your host browser -
Approve or deny the plan
Before fix (v0.4.0): Plugin hangs trying to open browser, random port unusable
After fix:
- Server uses fixed port 9999
- No browser open attempt
- Works via port forwarding
Plugin not updating?
rm -rf ~/.cache/opencode/node_modules/@plannotatorOpenCode crashes/aborts on startup?
rm -rf ~/.cache/opencodePort not forwarding? Check VS Code "Ports" tab, ensure 9999 is listed and forwarded.
Auth issues?
Ensure .opencode/auth.json exists and contains valid credentials.