Part of Phase 1 — Core skeleton (tasks.md Task 1.12).
Summary
Implement lazy extension activation, ExtensionContext, and clean deactivation.
Details
- Activation events (Req 2.5):
onStartup (after first frame), onCommand:<id> (lazy command activates its extension, then re-dispatches), onLanguage:<id> (from DocumentManager open notifications). Lazy views likewise activate on first reveal. activate(ctx) receives ExtensionContext { api, extensionUri, subscriptions: Disposable[], storagePath }.- Shutdown/deactivation: dispose
subscriptions in reverse order, then call deactivate() if exported (Req 2.6). - Failed activation (throw): extension marked failed and quarantined — its contributions stay registered, but invoking its commands reports the failure; no crash.
Completion requirements
References
- requirements.md: Req 2.5, 2.6
- design.md: §4.2
Dependencies
Blocked by: 1.11 (#12).
Part of Phase 1 — Core skeleton (tasks.md Task 1.12).
Summary
Implement lazy extension activation,
ExtensionContext, and clean deactivation.Details
onStartup(after first frame),onCommand:<id>(lazy command activates its extension, then re-dispatches),onLanguage:<id>(from DocumentManager open notifications). Lazy views likewise activate on first reveal.activate(ctx)receivesExtensionContext { api, extensionUri, subscriptions: Disposable[], storagePath }.subscriptionsin reverse order, then calldeactivate()if exported (Req 2.6).Completion requirements
deactivate()called on shutdownactivatequarantines the extension and surfaces the error; other extensions unaffectedbun testand lint passReferences
Dependencies
Blocked by: 1.11 (#12).