feat(ide): promote OpenCode to first-class IDE integration#1321
Open
Lokesh7025 wants to merge 15 commits into
Open
feat(ide): promote OpenCode to first-class IDE integration#1321Lokesh7025 wants to merge 15 commits into
Lokesh7025 wants to merge 15 commits into
Conversation
- Add full CLI adapter with scanning for MCPs, skills, agents, hooks
- Add hook spec with TypeScript plugin for session telemetry
- Plugin subscribes to session.idle events, fetches messages via
OpenCode SDK, converts to Claude-Code-compatible JSONL, and pushes
to the Observal ingest endpoint
- Register 'opencode' session parser, classifier, timestamp extractor,
usage extractor, and UUID extractor on the server side
- Add 'skills' to OpenCode's feature set in IDE registry
- Update server adapter to generate skills and proper plugin source
- Handle OpenCode's timestamp format ({created: epoch_ms} objects)
Tested end-to-end: agent pull -> plugin install -> session capture ->
ClickHouse persistence -> frontend visibility.
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
- Feature matrix now includes 'skills' - Env vars key renamed to 'environment' (OpenCode config format) - Plugin uses execFileSync not execSync - Compatibility warnings test reflects skills support
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
Skip built-in agents (build, plan, general, explore, scout, etc.) and only push telemetry for user-pulled Observal agents. Matches behavior of Claude Code (agent-setting detection) and Kiro (per-agent hook commands with OBSERVAL_AGENT_NAME).
- _build_mcp_configs now handles 'mcp' key returned by generate_config for OpenCode (previously MCPs were silently dropped) - config_generator uses 'environment' (not 'env') for OpenCode entries - opencode.py adapter normalizes any remaining 'env' → 'environment' - opencode.py passes skill_configs through as-is for CLI-side install (was pre-rendering via _generate_skill_file causing 'no content' error) - Custom hook components generate per-event plugin files in .opencode/plugins/hook-<name>.ts (command and http handler types) - .opencode/hooks/ added to HOOK_SCRIPTS_DIR for script-based hooks - Update test to expect 'environment' key in MCP config
When pulling an agent with a sandbox component, the generated opencode.json uses bare 'python3' for the observal-sandbox MCP. OpenCode resolves this from its own subprocess PATH which may not include the observal_cli venv, causing a 30s timeout. Rewrite ['python3', '-m', 'observal_cli.*'] command arrays to use sys.executable so the correct interpreter is always used regardless of the environment OpenCode is launched from.
f1e3ce1 to
8b5adcf
Compare
- Replace curl subprocess with Node.js http/https modules for Windows compat - Fix command injection in hook plugins (use shell:true with constant arg) - Fix JSONC comment stripping to handle inline comments - Add message.updated event handling and conditional final flag - Cap sessionState Map to prevent memory leaks in long-lived processes - Remove duplicate plugin source from CLI (delegate to server) - Validate URLs in HTTP hook plugin generation - Fix detect_hooks to not rely on Path.cwd() - Fix frontmatter parsing to only match top-level keys - Restore test coverage for session.created and message.updated - Bump HOOKS_SPEC_VERSION to 2
8b5adcf to
f35821a
Compare
Haz3-jolt
approved these changes
Jun 1, 2026
Multi-worker uvicorn takes longer to stabilize on startup due to the Redis pubsub subscriber retrying connections. The 15s start_period caused the container to be marked unhealthy before the app fully stabilized, failing CI deploys.
…gured The /status endpoint was showing 'AWS access key not configured' even when insights.api_key was set. Now it reads the API key first and only checks AWS credentials for Bedrock models when no direct key exists.
…r Analytics tab StatusBadge no longer shows indicator dots for approved and pending statuses. Dots remain for active/running states where animation is meaningful. The Analytics tab on the agent detail page was a hardcoded empty state with no real data fetching. Removed it entirely since traces are accessible from the admin dashboard and stats are in the sidebar.
The insights endpoints (session-count, generate, list-reports, get-report, export-html, status) now accept any authenticated user with owner or edit permission on the agent, not just admins. Frontend changes: - Add Insights tab to agent detail page (visible to owners/co-authors) - Shows session count, generate button, and report list - Move report detail route from admin-only to authenticated user level - Remove dots from approved/pending status badges (prior commit)
Insights are now accessed per-agent via the Insights tab on the agent detail page. Admins still see the tab on every agent since they have owner-level permission. Removed: - Sidebar nav entry for /insights - Admin insights index route and page - Retention banner link to /insights (replaced with inline text) - Back button in report detail now uses browser history
Signed-off-by: Hari Srinivasan <harisrini21@gmail.com>
Contributor
Author
|
@Haz3-jolt Screenshots added, and README.md changes done, merge after a final review. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes
Approach
OpenCode does not write JSONL session files like Claude Code. Instead it stores messages in a SQLite DB accessible via its SDK. The approach:
Files changed:
How Has This Been Tested?
Learning
Checklist
Screenshots