Part of Phase 1 — Core skeleton (tasks.md Task 1.11).
Summary
Implement extension discovery, Manifest validation, contribution registration without code execution, and API-version checking.
Details
- Discovery order: embedded
builtin/ registry → ~/.config/tecode/extensions/*/ → <workspace>/.tecode/extensions/*/ (Req 2.1). - Hand-rolled validator in
core/host/validate.ts with precise, path-annotated error messages (no runtime schema library — binary size). - Invalid manifest → record
HostError { extensionId?, path, message }, skip the extension, continue startup (Req 2.4). - Duplicate IDs: later discovery wins (workspace > user > builtin); shadowed one reported as a warning.
- Registration walks
contributes into: command registry (lazy commands), keymap layers, slot registry (lazy views), config schema registry, language registry, theme registry — without importing index.ts (Req 2.2). - API-version check: same major, host minor >= requested; incompatible → skipped with surfaced error (Req 2.7).
Completion requirements
References
- requirements.md: Req 2.1–2.4, 2.7
- design.md: §4.1, §4.3
Dependencies
Blocked by: 1.3 (#4), 1.4 (#5), 1.10 (#11).
Part of Phase 1 — Core skeleton (tasks.md Task 1.11).
Summary
Implement extension discovery,
Manifestvalidation, contribution registration without code execution, and API-version checking.Details
builtin/registry →~/.config/tecode/extensions/*/→<workspace>/.tecode/extensions/*/(Req 2.1).core/host/validate.tswith precise, path-annotated error messages (no runtime schema library — binary size).HostError { extensionId?, path, message }, skip the extension, continue startup (Req 2.4).contributesinto: command registry (lazy commands), keymap layers, slot registry (lazy views), config schema registry, language registry, theme registry — without importingindex.ts(Req 2.2).Completion requirements
index.tsexecutes during registrationbun testand lint passReferences
Dependencies
Blocked by: 1.3 (#4), 1.4 (#5), 1.10 (#11).