Platform

TypeScript Engine & Frameworks

How Strata combines framework plugins with scoped TypeScript Language Services across monorepos.

Strata runs TypeScript's own Language Service (ts.LanguageService and ts.TypeChecker) in-process without loading an entire monorepo into one giant TypeScript program.

How Framework Plugins Work

Each supported framework (vue, react, svelte, astro) is implemented as an isolated plugin:

  • Virtual TSX projection: .vue, .svelte, and .astro files are projected into valid Virtual TSX in memory (<path>.__strata__.tsx) with a bidirectional offset map. That lets TypeScript's TypeChecker and findReferences() work across SFCs and .ts/.tsx files while mapping line and column numbers back to the original source file.
  • Fast syntax pass: Extracts template render sites, slots, render boundaries, and dynamic prop spreads (v-bind="attrs", {...props}) for fast graph queries.

Scoped Per-Package TypeScript Projects

  • One Language Service per tsconfig.json: Each monorepo package gets its own lazily-created TypeScript Language Service.
  • Workspace & Nuxt resolution: Resolves monorepo package.json#exports directly to source files (even before dist/ is built) and reads .nuxt/imports.d.ts and .nuxt/components.d.ts when present.
  • Pure-JS fallback: Packages without a tsconfig.json still work using a synthetic allowJs: true configuration.
  • Bounded memory: An LRU pool keeps at most 3 active TypeScript projects in memory (with a 512 MB soft cap and idle eviction) so long-running MCP sessions stay lightweight.
  • Fast vs exclusive execution lanes: Fast read-only calls (map_workspace, read_slice, search_code, inspect_file(resolve_types: false), component_tree, state_flow) run up to 4 concurrently, while TypeScript-heavy calls (inspect_file with resolve_types: true, definition, references, impact) run exclusively so memory stays bounded.