@skastr0/quartz-opencode-plugin
v0.2.0
Published
OpenCode plugin wrapper for quartz TypeScript code intelligence.
Maintainers
Readme
@skastr0/quartz-opencode-plugin
OpenCode plugin wrapper for Quartz TypeScript code intelligence.
Status
Experimental. The plugin is publishable as a Bun/ESM package, but the repository is still using explicit release gates before any real npm upload.
Install
After the first npm release:
bun add -d @skastr0/quartz-opencode-pluginThe package exports @skastr0/quartz-opencode-plugin/server.
Build
bun run buildThe bundle is written to dist/server.js and exported as @skastr0/quartz-opencode-plugin/server.
Runtime Behavior
The plugin roots one persistent native Quartz analyzer at the OpenCode workspace directory and reuses it across tool calls. It marks the analyzer cache dirty from OpenCode's file.edited and file.watcher.updated events, with tool-hook fallbacks for apply_patch, edit, write, and morph-mcp_edit_file. The analyzer is disposed when OpenCode emits server.instance.disposed for that workspace directory; deleting a session does not close it.
Use the optional package argument when the workspace has multiple discovered TypeScript packages.
Tools
Discovery:
type_packagestype_symbolstype_infotype_expandtype_relatedtype_search
Analysis:
type_evaltype_diagnosticstype_check_snippettype_at_positiontype_filetype_refresh
Relationships and refactors:
type_compatibletype_graphtype_refactor_previewtype_why_errortype_explaintype_transform_searchtype_verify_contract
Examples
{"tool":"type_symbols","args":{"pattern":"^User","kind":"interface","limit":10}}{"tool":"type_info","args":{"symbol":"User"}}{"tool":"type_transform_search","args":{"from":"User","to":"UserDTO","limit":5}}The plugin returns JSON strings for most tool results, matching the core analyzer data shapes. type_refresh clears cached TypeScript projects and returns the analyzer refresh result.
