The public contract for defining Kubator applications: collections, APIs, migrations, and the building blocks for CMS and CRM-style models.
import { Collection, type Timestamp, type Uuid } from "@kubator/sdk"
export type Note = {
/** @primary */
readonly id: Uuid<"Note">
text: string
created: Timestamp
}
export const Notes = new Collection<Note>()
It requires a compatible Kubator host, which supplies the collection runtime.
Models declare metadata with defineModel(...); they do not call Serve(...).
The Kubator host loads that manifest and calls Serve itself, adding the
runtime, Studio APIs, reflection, and server lifecycle.
Model tests can use the SDK testing entrypoint instead of importing a host repository's test runner:
import { ExpectEqual, Test } from "@kubator/sdk/testing"
Test("notes have a title", () => {
ExpectEqual("Kubator", "Kubator")
})
A compatible Kubator test host supplies the test runner at runtime.