agents.md
DDD/domain-model guidance has moved to the skill teable-ddd-domain-model in .codex/skills/teable-ddd-domain-model. Use that skill for any v2/core domain, specification, or aggregate changes.
For HTTP-ish integrations, keep framework-independent contracts/mappers in packages/v2/contract-http:
/tables) as constants./tables/create, /tables/get, /tables/rename); avoid RESTful nested resources like /bases/{baseId}/tables/{tableId}.@teable/v2-contract-http-express, @teable/v2-contract-http-fastify) should be thin adapters that only:
@teable/v2-contract-http@teable/v2-contract-http-openapi.apps/playground), use shadcn wrappers from apps/playground/src/components/ui/* (or @teable/ui-lib) instead of importing Radix primitives directly.apps/playground/src/components/ui before using the primitive.tsyringe / reflect-metadata directly anywhere; use @teable/v2-di.v2/core/src/domain/**; DI is only for application wiring (e.g. v2/core/src/commands/**).@teable/v2-container-node, @teable/v2-container-browser) that register all port implementations.tsdown (not tsc emit). tsc is used only for typecheck (--noEmit).tsdown.config.ts that extends the shared base config from @teable/v2-tsdown-config.dist/ (ESM .js + .d.ts), and workspace deps (@teable/v2-*) are kept external (no bundling across packages).All v2 packages must support source visibility to allow consumers to reference TypeScript sources without building dist/ outputs. This is required for development workflows, testing, and tools like Vitest/Vite that can consume TypeScript directly.
Required configuration:
package.json:
types field to "src/index.ts" (not "dist/index.d.ts")exports["."].types to "./src/index.ts" (not "./dist/index.d.ts")exports["."].import to "./src/index.ts" (not "./dist/index.js") to allow Vite/Vitest to use source files directlyexports["."].require pointing to "./dist/index.cjs" for CommonJS compatibility"src" in the files array (in addition to "dist")tsconfig.json:
src paths in compilerOptions.paths (e.g. "@teable/v2-core": ["../core/src"])include arrayExample package.json configuration:
{
"types": "src/index.ts",
"exports": {
".": {
"types": "./src/index.ts",
"import": "./src/index.ts",
"require": "./dist/index.cjs"
}
},
"files": ["dist", "src"]
}
Note: Since v2 packages are workspace-only ("private": true) and not published to npm, pointing import to source files is safe. Vite/Vitest can process TypeScript files directly, enabling faster development cycles without requiring dist/ to be built first.