Part of Phase 1 — Core skeleton (tasks.md Task 1.13).
Summary
Build the concrete tecode namespace object handed to every extension, and the contract-test suite that gates API versioning.
Details
core/api/create.ts wires every namespace from Req 10.1 to the services from Tasks 1.3–1.12 (commands, workspace incl. fs wrapper over node:fs/promises + fs.watch, window stubs where UI lands later, editor, ui, config, context, languages, themes).- Shallow
Object.freeze per namespace to prevent cross-extension monkey-patching. - Register a Bun module alias so
import { commands } from "tecode" resolves to this object in dev and compiled mode. tecode.editor calls with no active editor no-op with a status-sink notice.- Contract tests: a fixture extension activated against the real core exercises every namespace — register/dispose symmetry, event firing order, frozenness. This suite is the compatibility gate for future
API_VERSION bumps.
Completion requirements
References
- requirements.md: Req 10.1, 10.2
- design.md: §12, §16
Dependencies
Blocked by: 1.12 (#13) and all of 1.3–1.10.
Part of Phase 1 — Core skeleton (tasks.md Task 1.13).
Summary
Build the concrete
tecodenamespace object handed to every extension, and the contract-test suite that gates API versioning.Details
core/api/create.tswires every namespace from Req 10.1 to the services from Tasks 1.3–1.12 (commands,workspaceincl.fswrapper overnode:fs/promises+fs.watch,windowstubs where UI lands later,editor,ui,config,context,languages,themes).Object.freezeper namespace to prevent cross-extension monkey-patching.import { commands } from "tecode"resolves to this object in dev and compiled mode.tecode.editorcalls with no active editor no-op with a status-sink notice.API_VERSIONbumps.Completion requirements
ctx.apiandimport ... from "tecode"bun testand lint passReferences
Dependencies
Blocked by: 1.12 (#13) and all of 1.3–1.10.