Plugin Development
Publishing and Review
Prepare plugin release assets for review and community listing without promising an unreviewed install path.
On this page
Reviewed community listing is release-asset based with a source-archive fallback during early development.
Required Release Assets
Publish these assets in the latest release:
manifest.json
dist/index.js # or the basename/path referenced by manifest.main
styles.css # optional, Markdown-surface styles only
Cortex downloads manifest.json, reads main, then downloads the matching main asset. It accepts
either the exact relative path from main or the basename of that path.
Manifest checks
The reviewed listing flow verifies:
manifest.jsonis valid JSON.manifest.idmatches the listing entry id.manifest.mainis present and safe.- The main bundle exists in release assets or in the source archive fallback.
Source Archive Fallback
If release assets are incomplete, Cortex can fall back to the GitHub source archive. It searches for
manifest.json, resolves the declared main file, and copies optional styles.css into staging.
This fallback is useful during early development, but reviewed plugins should still include release assets explicitly.
Install and rollback behavior
Cortex installs into:
<vault>/.cortex/plugins/<plugin-id>
Install and update use a staging directory. The previous plugin directory is preserved until the staged plugin is promoted, the plugin host reloads, and the new plugin registration is visible. If anything fails, Cortex removes staging and restores the previous plugin best effort.
Release checklist
- Build a single plugin bundle.
- Include
manifest.jsonat the release root. - Include the file referenced by
manifest.main. - Include
styles.cssonly when the plugin declaresmarkdown:extensions. - Keep all paths relative and free of
... - Test install, reload, disable, and uninstall in a temporary vault.