Extension Authoring Guide
Authoring Model
MdWrk extensions are normal workspace packages that declare a manifest, activate through the extension runtime, and use host APIs for commands, views, settings, diagnostics, themes, editor access, and workspace access.
The core package surfaces are:
@mdwrk/extension-manifest@mdwrk/extension-host@mdwrk/extension-runtime@mdwrk/extension-manager
Package Shape
A first-party or installable extension package should include:
package.jsonREADME.mdsrc/manifest.tssrc/index.ts- tests for manifest validity and runtime behavior
src/version.tsfor package version exports
Use packages/extensions/extension-catalog-hello as the smallest reference extension and packages/extensions/extension-manager as a fuller operator-facing surface.
Manifest Responsibilities
The manifest declares identity, version, display metadata, activation mode, requested capabilities, compatibility ranges, contribution points, and settings schema. The runtime uses it before activation to evaluate compatibility and host capability access.
Runtime Responsibilities
Extension code should register through the provided context:
- commands through
context.registerCommand - views through
context.registerView - action rail items through
context.registerActionRailItem - settings through manifest settings schema
- diagnostics through host diagnostics APIs
Extensions should clean up registered work with disposables returned by the runtime.
Publish Workflow
npm run build:extensions
npm run extension:bundle
npm run extension:sign
npm run validate:extension-artifactsThe generated artifacts include installable payloads, integrity metadata, signed manifests, and catalog entries under artifacts/extensions.