@happyvertical/smrt-app-runtime
Validated local, self-hosted, and cloud runtime composition for s-m-r-t applications, with a SvelteKit entry for server hooks.
What it gives you
Validated local, self-hosted, and cloud runtime composition for s-m-r-t applications, with a SvelteKit entry for server hooks.
- 01The local profile owns user data paths, SQLite custody, application-secret creation, and a single-use loopback owner bootstrap
- 02Deployed profiles compose provider bindings for database, authentication, assets, and secrets, readiness-checked before startup
- 03Application migrations run through an explicit, idempotent prepareDatabase hook; runtime never creates tables implicitly
Private local applications
initializeLocalApplicationRuntime claims a dedicated mode-0700 data root in the OS application-data directory and serializes initializers with a SQLite lock database. The first valid bootstrap claim creates a Person, User, default Tenant, owner Role and Membership, and Session in one transaction. Local MCP tokens are owner-bound, scoped, expiring, and stored only as an HMAC.
Deployed profiles and workers
initializeDeployedApplicationRuntime composes only self-hosted and cloud. createTaskWorker and createScheduleWorker run the jobs package runners in separate processes against the shared PostgreSQL database; the web process does not start them. health is process liveness; readiness probes database, auth, assets, and secrets.
The SvelteKit entry
createSmrtSvelteKitRuntime from the sveltekit subpath returns init and handle for hooks.server.ts. init is the fail-closed startup gate. handle runs URL tenant selection, the signed session, and then publishes tenant context only when the active context matches the verified session tenant.
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.
Infrastructure composition without models of its own. The generated interfaces an application serves come from the packages it registers, not from this one.
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.
Infrastructure composition without models of its own. The generated interfaces an application serves come from the packages it registers, not from this one.
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.
Infrastructure composition without models of its own. The generated interfaces an application serves come from the packages it registers, not from this one.
Generated interface
CLI
The app CLI turns manifest resources into predictable operator commands while keeping package-specific actions close to their models.
Infrastructure composition without models of its own. The generated interfaces an application serves come from the packages it registers, not from this one.