- Added declared unique index support through
.index(..., { unique: true })and.multi(..., ..., { unique: true }). - Added
collection.putByUnique(selector, value)for atomic create-or-replace writes keyed by one declared unique index.
- Added store-level
db.resolve(id), which inspects a tagged document ID and dispatches the read to the matching collection while preserving kind-specific return types. - Fixed the published package contents to include
docs/andexamples/, so downstream users and installed skills can route to the packaged documentation surfaces.
- Fixed public type helpers to avoid leaking the built-in
Pick<...>wrapper in downstream type output, keeping erased kindstore types more consistently flattened. - Fixed
KindInput,KindOutput, andKindIdto erase more cleanly in downstream inspected types so their emitted shapes stay readable.
- Fixed store opening to throw
UnrecoverableStoreOpenErrorfor unrecoverable internal metadata and format-version failures, so downstream code can detect the wipe-and-recreate case explicitly.
- Breaking: simplified application metadata storage by removing kindstore-managed
created_atandupdated_atcolumns. Apps that need metadata timestamps should store them in the metadata payload explicitly.
- Fixed
.multi()to allowidalongside payload fields so typed queries and composite indexes can include the store-managed document ID.
- Added
db.schema, which exposes the declaredKindBuilderinstances on the livekindstore(...)return value so downstream code can derive types likeKindInput<typeof db.schema.tasks>directly from the store.
- Fixed
.multi()to reject unknown field keys at the type boundary while still accepting any top-level schema key. - Clarified that multi-only fields automatically get the generated columns required for typed query support, without needing a separate single-field
.index(...)declaration.
- Flattened downstream declaration output for
KindInput,KindOutput, and related public types by using an internal erasedOmithelper instead of exposing the built-inOmit<...>wrapper in inspected types. - Expanded
KindInputandKindOutputto acceptKindBuildertypes directly, which preserves inference for inlined schema entries liketypeof schema.tasks.
- Fixed exported inferred
kindstore(...)values to keep.createdAt()and.updatedAt()type state out of downstream declaration emit, avoidingTS4023and inaccessibleunique symbolerrors.
- Fixed
.createdAt()and.updatedAt()to extend the kind schema with integer timestamp fields when they are missing, while keeping those fields store-managed.
- Fixed
collection.create(value)to use insert-only semantics instead of inheritingput()upsert behavior when writing a generated ID.
Note: There is no supported migration path from 0.2.x to 0.3.x.
- Added
collection.create(value)as a one-step helper that allocates a fresh tagged ID and persists the document. - Breaking: reserved
idas a store-owned document field, removed it from application payload schemas, and now include it in typed read and write results. - Breaking: renamed the internal document storage column to
data, reserveddatain document schemas, and useRowDataas the internal term for persisted document bodies. - Breaking: renamed the typed document result helper to
KindOutput, renamed the input helper toKindInput, and now usez.output<T["schema"]>directly where the raw schema output is needed. - Added
KindPropertyKey<T>as the shared property-key alias for a kind's inferred output shape. - Changed
KindMigration<T>to take aKindDefinitiontype parameter directly instead of a plain object type.
- Fixed store-format bookkeeping to keep the current internal format at version
1and removed test coverage for a nonexistent1 -> 2format transition.
- Breaking: renamed the builder class from
KindDefinitiontoKindBuilder, renamed the exported schema bag type fromKindDefinitionBagtoKindDefinition, and collapsed the runtime*Surfacetypes into the exportedKindCollection,MetadataCollection, andKindstorenames. - Breaking: reworked
kindstore()sofilename, optionaldatabaseOptions, optionalmetadata, and optionalmigrate(...)live at the top level, while declared kinds now live under a requiredschemaobject. ExportedDatabaseOptionsas a public type.
- Made
.createdAt()and.updatedAt()default to the conventionalcreatedAtandupdatedAtfield names, while still supporting explicit custom field names.