@happyvertical/smrt-spreadsheets
Spreadsheet import for smrt: validated plans, workbook checks, batch loading through a target adapter, and a read-back proof.
What it gives you
Spreadsheet import for smrt: validated plans, workbook checks, batch loading through a target adapter, and a read-back proof.
- 01A plan maps sheet ranges to tables, columns to typed fields, and calculated fields
- 02checkPlan validates the plan against the workbook before anything is written
- 03runImport loads in batches through an ImportTarget and verifies the result with checkLoaded
- 04Export, saved mapping, and re-import are planned and not present
A person or a model proposes the plan
This package does not decide the plan. validatePlan checks its shape and limits. A plan that fails validation throws ImportPlanError. A workbook over the size limits is refused.
Nothing is guessed
coerceCell is the one typing rule. A cell that does not fit its field is refused, and its row never becomes a record. Money is an exact number of integer minor units. Integer sums are exact.
First import into an empty target
runImport refuses a target that already holds a planned table. If checkPlan reports errors, nothing is written. After a load, an unsuccessful verdict means the caller discards the draft target. The package never repairs.
Entries
The root entry exports types only. The import entry is pure and browser-safe. The testing entry holds createSqliteReferenceTarget, a Node-only SQLite target for tests.
Package UI
No UI layer to carry
This package stays focused on models, runtime behavior, or tooling. Build its interface with smrt-ui, or use a related domain package that exposes a /svelte entry point.
Intentionally headless
Package previews
No playground module yet
This package does not currently export a ./playground module. Its component names and import path remain available in the Components tab.
Intentionally not registered
Generated interface
REST
The exact route set comes from each model's @smrt({ api }) policy
and the application manifest—not from a second controller definition.
The package has no models, tables, or Svelte components. The target you provide decides where the data goes.
Generated interface
MCP
AI tools are generated from the methods you explicitly include. Their inputs are validated against the same model metadata used by REST and CLI.
The package has no models, tables, or Svelte components. The target you provide decides where the data goes.
Browser-native agent interface
WebMCP
The generated web definitions carry the same tool names, descriptions, and JSON Schema
inputs as MCP. smrt-web registers them with document.modelContext.
The package has no models, tables, or Svelte components. The target you provide decides where the data goes.
Generated interface
CLI
The app CLI turns manifest resources into predictable operator commands while keeping package-specific actions close to their models.
The package has no models, tables, or Svelte components. The target you provide decides where the data goes.