Skip to content

Releases

@forestfuture/active-record@0.10.0

Choose a tag to compare

Minor Changes

  • #551 1fc6fce Thanks @christopherstyles! - Inside withDatabase, a read whose SQL and bound values match one already sent on that database is answered from memory, with no round trip, until a write clears it. Each answer is new records. onQuery hears a cached answer with cached: true. Any write Active Record sends inside the call clears the cache, through any database handle, and so does reload(). A write you send yourself on the binding or a pg client doesn't, so call the new db.clearRequestCache() after one. Turn the cache off with connect(env.DB, { cache: { request: false } }).

  • #535 bef8761 Thanks @christopherstyles! - upsert and upsertAll take updateOnly, naming the only attributes a clashing row has updated: upsertAll(rows, { uniqueBy: "email", updateOnly: ["name"] }). An upsert now sets a clashing row's updatedAt only when a value it updates changes, so writing a row again as it was keeps its updatedAt. An upsert with nothing to update but updatedAt (every attribute it would update is a uniqueBy one or read-only) now leaves a clashing row alone, and doesn't count it in rowsAffected or return it in rows.

Patch Changes

  • #549 cf395ce Thanks @christopherstyles! - A column(), a typed value or incoming() given as find's id, or one of its ids, now throws TypeError saying to give the value itself, instead of RecordNotFound.

    One nested in a json value (where({ settings: { theme: column("x") } }), build, update, updateAll, insert, or a value changed in place and saved) now throws the same TypeError, naming its path (settings.theme), for a custom type stored as json too. It used to match or store the reference's JSON.

  • #548 9f6bc66 Thanks @christopherstyles! - A column(), a typed value (column(name).value(v)) or incoming() given as an attribute's value now throws TypeError saying where it belongs. In a condition or updateAll, a column() or incoming() says to write it in an sql fragment, and a typed value says to give the value itself. It used to match nothing, store the reference as a json attribute's JSON, or throw a cast error that didn't say why. In a written row (insert, upsert, createWith) or a record (build, a setter, update), it says to give the value itself.

  • #541 ef696fe Thanks @christopherstyles! - upsert and upsertAll take onDuplicate, saying what a clashing row's attributes become, each an sql fragment or a value: upsertAll(rows, { uniqueBy: "name", onDuplicate: { count: sql`${column("count")} + ${incoming("count")}` } }). In its fragments, column() is the clashing row's value, and the new incoming() is the new row's.

@forestfuture/active-record@0.9.1

Choose a tag to compare

Patch Changes

  • #528 8405349 Thanks @christopherstyles! - Add read-only records and attributes (#358). Relation.readonly() marks the records it loads, and record.markReadonly() marks one; isReadonly() reads the mark. Saving, updating, destroying or touching a read-only record, or writing its columns, throws ReadonlyRecord (.record, .action) before validation or any callback runs, and so does a save, batch, push or association touch that would write one through its associations. Bulk writes ignore the mark. An attribute declared readonly: true is written when its record is created; assigning a persisted record another value throws ReadonlyAttribute (.attribute), while assigning the value it holds is allowed, so a form can post it back. Changing one another way (a belongsTo pointed elsewhere, a JSON value changed in place, a touch) is refused before anything is sent, while a counter cache still counts a read-only column. An upsert leaves a clashing row's read-only values alone.

@forestfuture/active-record@0.9.0

Choose a tag to compare

Minor Changes

  • #526 9f21d78 Thanks @christopherstyles! - Lock records optimistically with a lock_version column (#357). A Model with an integer lockVersion attribute checks it on every save, destroy and touch(), and adds 1 to it: a copy loaded before another write changed its row throws StaleRecord (.record, .action), from save() and destroy() as from their OrThrow forms, and nothing in its batch is kept. An assigned lockVersion, such as a form's hidden field, is the version checked. A NULL lock_version reads as 0. A belongsTo's or hasOne's touch of a locked record adds 1 to its version without checking it. This is a minor change because a table that already has a lock_version column starts locking.

Patch Changes

  • #514 1b61370 Thanks @christopherstyles! - Give an attribute a second name with aliasOf (#509): static override attributes = { title: { aliasOf: "name" } } as const, or the same in define. The alias reads and writes the attribute, typed as it, and queries, writes, validations, and change tracking take either name. attributes(), toJSON(), and changes() list the attribute's own name.

  • #516 edd95fe Thanks @christopherstyles! - Normalize an attribute's values with this.normalizes("email", { with: (email) => email.trim().toLowerCase() }) in a Model's static {} (#354). Each value assigned to it is normalized once cast: through the setter, build, create, update, a default, and bulk writes such as insert and updateAll. A query's values are normalized as well, so findBy({ email: " Jane@Example.com" }) finds jane@example.com. null is left alone unless applyToNull: true. Model.normalizeValueFor(name, value) returns a value normalized, and record.normalizeAttribute(name) normalizes a value loaded from a row stored before the normalization was declared.

  • #513 d4107bd Thanks @christopherstyles! - active-record generate model with a plural name now notes only the singular Model it makes: line_items looks plural, so the Model is LineItem (#511). The app base class that init and schema write describes itself and its filter defaults without naming another framework.

  • #518 26841ef Thanks @christopherstyles! - Keep a password as a salted digest with password: { securePassword: true } in static attributes, and give each new record a random token with authToken: { secureToken: true } (#355). A secure password adds password, passwordConfirmation, and passwordChallenge, is hashed into passwordDigest with PBKDF2-SHA256 when the record is saved, and is left out of toJSON() with its digest. await user.authenticate(password) checks it, and await User.authenticateBy({ email, password }) finds a record and checks its password in one step. Its validations require it, check its confirmation and challenge, and allow at most 72 bytes. { securePassword: { algorithm } } plugs in another hash, such as bcrypt. A secure token is 24 characters of base58, made as the record is built, or with on: "create" as it's created, and regenerateAuthToken() saves a new one. Secure passwords, their digests, and secure tokens are always filtered from logs and errors, and left out of toJSON(). generateSecureToken(length) makes a token for anything else.

  • #521 335350b Thanks @christopherstyles! - Sign tokens with the Worker's secret (#517). await user.signedId({ purpose, expiresIn }) signs a record's id, and User.findSigned(signedId, { purpose }) finds it again. this.generatesTokenFor("emailConfirmation", { expiresIn: { days: 1 }, dependsOn: (user) => user.email }) in static {} declares tokens for a purpose: await user.generateTokenFor(purpose) makes one, and User.findByTokenFor(purpose, token) finds its record until it expires or the value it depends on changes. A secure password gets a reset token, await user.passwordResetToken(), found with User.findByPasswordResetToken(token): it lasts 15 minutes and stops working once the password changes (securePassword: { resetToken: false } leaves it out). The finders are Relation methods too, keeping conditions and default scopes, and each has an OrThrow that throws the new InvalidToken for a token that isn't valid. Tokens are signed with HMAC-SHA256 under the Worker's SECRET_KEY_BASE, or what a Model's static signingSecret(env) returns, a list to rotate secrets.

  • #510 d7c746c Thanks @christopherstyles! - Declare an attribute that isn't a column with virtual: true (#356), such as a form's termsOfService checkbox: static override attributes = { termsOfService: { type: "boolean", virtual: true } } as const, or the same in define. It's typed, cast, change-tracked, and taken by permit, but never saved, never loaded from a row, and refused in a query. The new confirmation validator compares an attribute with its virtual confirmation (email with emailConfirmation), and toJSON() leaves that confirmation out.

@forestfuture/active-record@0.8.2

Choose a tag to compare

Patch Changes

  • #503 5e2ff2f Thanks @christopherstyles! - Around callbacks (#48), as Rails' around_save, around_create, around_update, and around_destroy: this.aroundSave(async (order, next) => { …; await next(); … }) runs code on both sides of a write. next() runs the rest of the save and resolves once the database has kept its batch; in a batch(), every record's first part runs before the one write. Not calling next() stops the save, as abort() does. When the write is refused, or never sent because another record was refused, next() rejects with the save's error.

  • #498 38cdf12 Thanks @christopherstyles! - A belongsTo takes touch (#353), as Rails' belongs_to … touch:: belongsTo(Article, { touch: true }) sets the article's updatedAt whenever a comment is created, updated, destroyed, or touched, in the comment's own atomic batch. touch: "lastCommentedAt", or a list, sets those attributes too. The article is loaded first when it isn't, so it runs its afterTouch and update commit callbacks, and touches the records its own belongsTos touch in turn.

  • #501 5ab6414 Thanks @christopherstyles! - A hasOne takes touch (#497), as Rails' has_one … touch:: hasOne(Profile, { touch: true }) sets the profile's updatedAt whenever its user is updated, destroyed, or touched, in the user's own atomic batch. touch: "lastSeenAt", or a list, sets those attributes too. The profile runs its afterTouch and update commit callbacks. A created user touches nothing. A profile the user's own save writes (built through it, or autosaved), or the user's dependent removes, is left to that write; one saved as another entry of the same batch is still touched.

  • #502 78846f8 Thanks @christopherstyles! - afterFind and afterInitialize callbacks (#49), as Rails' after_find and after_initialize: every record loaded (by a query, an association read, a preload, or reload()) runs afterFind, then afterInitialize, and every record built runs afterInitialize, after build's or create's init. Both run synchronously, so an async one is a type error. record.hasAttribute(name), as Rails' has_attribute?, says whether a record from select(...) loaded an attribute.

  • #500 51c19f1 Thanks @christopherstyles! - Model.noTouching(fn) (#496), as Rails' no_touching: inside Article.noTouching(async () => { … }), no article is touched, by a comment's belongsTo(Article, { touch: true }) or by its own touch(), which writes nothing and resolves to false. It covers the Model and those extending it (ApplicationRecord.noTouching covers every Model), and only the code it runs, so other requests still touch. A save still sets its own updatedAt, and touchAll and the counters' touch option still write. Like withDatabase, it needs Node.js compatibility.

  • #505 ad30cc7 Thanks @christopherstyles! - The guide's pages stand on their own (#504). Each opens with one sentence saying what it lets you do, and the new Conditions and Through associations pages show the Models their examples use, with each example's imports, and its types on hover. The llms-full.txt in the package carries the same pages.

@forestfuture/active-record@0.8.1

Choose a tag to compare

Patch Changes

  • #492 980f06a Thanks @christopherstyles! - Inverse associations (#62). A record loaded through its owner's hasMany or hasOne, by the association, its finders, a Relation narrowed from it, or includes, has the owner loaded as its belongsTo, the same object, so await post.author() sends no query. Through an autosave: true belongsTo, saving such a record now also saves the owner's unsaved changes, since the owner is loaded. A belongsTo's record, read or preloaded, has the owner as its inverse hasOne. A record built through a new owner keeps pointing back after saving fills in its foreign key. The inverse is inferred by foreign key, so it's found with a foreignKey: option too; name it with inverseOf: "author" (on an association with a scope:, for one), or turn it off with inverseOf: false. A wrong inverseOf is InvalidModel when the Model is first used.

  • #495 e2d8ed1 Thanks @christopherstyles! - Touching records (#50). record.touch() sets updatedAt, and any datetime attributes named, to now (or { time }) without a save, then runs afterTouch and the update commit callbacks. A Relation's touchAll() touches every row it matches in one statement, and incrementColumn and decrementColumn take { touch }.

@forestfuture/active-record@0.8.0

Choose a tag to compare

Minor Changes

  • #333 bfa9bb6 Thanks @christopherstyles! - A batch's writes are prepared in its callback (#332): batch((b) => [b.save(user), b.destroy(post), b.insert(Log, { … }), b.updateAll(Post.where({ … }), { … }), b.deleteAll(user.posts())]), and db.batch the same. b has a method for each write, named as the write is when it runs alone, taking a Model or a Relation first. A Model is written on the batch's database, so db.model(…) isn't needed inside db.batch. The callback can't await: one that doesn't return an array, and a b used after it has returned, throw a TypeError with nothing sent.

    Breaking: the array form of batch and db.batch is removed, along with the to… methods (toInsert, toInsertAll, toUpsert, toUpsertAll, toUpdateAll and toDeleteAll, on Relations and as Model statics) and records' toSave() and toDestroy(). A prepared write no longer has toSql(); onQuery shows what a batch sent. Replace batch([user.toSave(), Post.where(…).toDeleteAll()]) with batch((b) => [b.save(user), b.deleteAll(Post.where(…))]).

  • #394 e688585 Thanks @christopherstyles! - binary attributes and custom types (#20).

    A binary attribute holds bytes as a Uint8Array, in a BLOB column on D1 or a bytea one on Postgres. It's assigned a Uint8Array or an ArrayBuffer, and always reads back as a plain Uint8Array. A change is found by comparing bytes, so a byte changed in place is saved. where, gt and order compare bytes in order. A printed record shows <3 bytes of binary data>. active-record schema reads BLOB and bytea columns as binary, where they were errors, and g writes name:binary as BLOB or BYTEA. permit still refuses a file: assign new Uint8Array(await file.arrayBuffer()).

    defineType({ storedAs, cast, serialize, deserialize }) makes a custom type, which a spec takes as it takes a type's name: price: money, or { type: money, null: false }, and a generated Model's override too. Its values are kept as storedAs keeps its own, so they're read strictly, compared and ordered as that type's are. What its cast or deserialize throws is a TypeError naming the Model and attribute, with the type's error as its cause; defineType throws TypeError for an unknown storedAs or a missing function.

    isAttributeChanged and the other change methods cast their from and to as a condition's value is cast, so from: "2026-01-01" matches a datetime, and a value that can't be cast matches nothing, where it could throw.

    Breaking: typeForAttribute(name).serialize is typed string | number | Uint8Array | null, since a binary attribute's stored form is bytes.

  • #405 a451f78 Thanks @christopherstyles! - decimal, date and time attributes (#391).

    A decimal holds an exact number as text in one form: "12.50" reads as "12.5". It's assigned decimal text or a bigint exactly, or a number at 16 significant digits (0.1 + 0.2 is "0.3"). A decimal past a JavaScript number's range ("1e400", "1e-400") is refused. Conditions, comparisons and order compare decimals as numbers, and so do numericality and comparison. D1 keeps about 15 significant digits; Postgres's numeric keeps every one.

    A date holds a day, "2026-01-02", and a time a time of day, "09:30:00" (up to "24:00:00", the end of the day), both as text with no zone. A Date is refused for either, since its day and time depend on the time zone.

    active-record schema reads NUMERIC and DECIMAL columns as decimal, where they were errors, and TIME as time. g writes price:decimal, starts_on:date and opens_at:time, with =value defaults.

    Breaking: active-record schema reads a DATE column as a date, where it was a datetime. Override it with "datetime" to keep a Date. On D1, a DATE column a datetime wrote holds 2026-01-02T00:00:00.000Z, which a date can't read; the upgrading guide shows the SQL that keeps each day. A TIME column, read as a string before, reads as "09:30:00".

  • #387 450bb89 Thanks @christopherstyles! - Enum attributes (#340). Declare one with enum, in an override (status: { enum: ["draft", "published"] }) or in define, with names stored as text or mapped to integers ({ low: 0, high: 10 }). Its property is typed as the union of its names, an unknown value throws TypeError when it's assigned, and a stored value the enum doesn't list reads as null. Each name gives records isPublished() and saveAsPublished() / saveAsPublishedOrThrow(), and the Model published() and notPublished() scopes; Post.enumValues("status") gives the names with their stored values. prefix, suffix, scopes: false, instanceMethods: false and validate: true work as Rails' options do.

    The generated schema.ts is now a defineSchema({ … }) call, which makes a generated Model's enum scopes statics from the start. Run npx active-record schema to regenerate yours; --check reports a schema an older version wrote.

  • #390 e5fb4d5 Thanks @christopherstyles! - active-record schema reads enums from the database (#64). A column whose values a Postgres enum type, or a CHECK (column IN ('open', 'done')) on D1 or Postgres, restricts to a list of strings becomes a generated enum: its spec lists the names, with scopes: false and instanceMethods: false, so its type is the union of the names and assigning any other value throws TypeError. Its Model turns the predicates, setters, and scopes on with an override's enum: true, or drops the enum with enum: false.

    Regenerating an existing schema narrows such columns to their names, so code that assigned other text to one now throws TypeError; override the column with enum: false to keep it a plain string.

  • #456 019d1c5 Thanks @christopherstyles! - A record built, created, or inserted through a hasMany always gets its owner's key (#346), as one built through a hasOne already did. Breaking: a foreign key passed along, as in user.posts().build({ userId: otherId }), is now replaced by the owner's instead of kept. Build a record for another owner through that owner, or through the Model.

  • #373 c169409 Thanks @christopherstyles! - A hasOne replaces its record as Rails does (#40). await user.profile.set(profile) gives the owner another record, and set(null) removes it. On a saved owner, set, build and create remove the old record by dependent:: "destroy" destroys it, "delete" deletes it, and otherwise its foreign key is set to null and it's saved. It's removed in the same atomic batch that writes the new record: at once for set and create, and for build when the owner is saved. An old record that can't be saved with a null foreign key throws RecordNotSaved, and nothing is written.

    Breaking: build and create through a saved owner's hasOne used to leave the old record as it was. Without dependent, its foreign key is now set to null, which a NOT NULL column refuses; set dependent: "destroy" or "delete" to remove it instead. Building twice through an unsaved owner's hasOne now saves only the last record.

  • #364 6c91a98 Thanks @christopherstyles! - A new record's changes run from its declared defaults and generated ids (#41), as in Rails: Post.build() holding only defaults isn't changed, and assigning a default's value isn't a change. Inserts still write them. After a create, savedChanges() is what the insert changed plus what the write or the database filled in (a generated key, timestamps), not the defaults the record kept.

    Breaking: code reading a new record's changes(), changed(), isChanged() or savedChanges() no longer sees its kept defaults or generated id.

  • #469 c78af0e Thank...

Read more

@forestfuture/active-record@0.7.0

Choose a tag to compare

Minor Changes

  • #307 8086f1f Thanks @christopherstyles! - The adapters now ship inside @forestfuture/active-record, so an app installs one package. Import what opens D1 from @forestfuture/active-record/d1 (connect, withSession, NoSession, d1), and uninstall @forestfuture/d1-record, which gets no new version. The PostgreSQL adapter is @forestfuture/active-record/postgresql (connect, postgresql), with your own pg; pg and PGlite are optional peer dependencies, so a D1 app installs neither.

    Every active-record command now reads active-record.jsonc, which names each of your databases and its adapter ("DB": { "adapter": "d1" }). Run npx active-record init to write it: it reads your Wrangler config, and links a JSON Schema your editor completes the file from. Run it again after you add a database to your Wrangler config: it adds the ones the file doesn't name, and leaves the rest as you wrote it. A D1 database's other settings stay in your Wrangler config, and every command notes a D1 database there that the file doesn't name. --adapter is gone from every command but init, and --config now names active-record.jsonc.

    Run npx active-record schema once: the generated schema now imports d1 from @forestfuture/active-record/d1, and until you regenerate it, schema --check reports it as out of date. See Upgrading.

  • #290 8806626 Thanks @christopherstyles! - The active-record command now speaks for any adapter. Its help and messages say the database, its binding and its config, and D1's own words (migrations_pattern, the config file) come from D1's plugin. active-record schema --check now reports a schema as out of date when it was written for another adapter, so a schema written before this release reads as out of date once: run npx active-record schema to bring it up to date. The console keeps its history in .wrangler/active-record-history; the old .wrangler/d1-record-history isn't read, so earlier history isn't offered. The command itself needs Node 22.5 or later; on D1 every command still needs 22.13 (23.4 on Node 23), for node:sqlite, and says so before it starts. A plugin for the command (its interface is @forestfuture/active-record/cli, unstable) reads a schema asynchronously, names the folder for the command's local files, can say why a Node can't run it, and gets the chosen database's migrations folder in place of D1's account.

Patch Changes

  • #287 b6e2d37 Thanks @christopherstyles! - The adapter interface (@forestfuture/active-record/adapter, unstable) takes what the PostgreSQL adapter needs: a dialect writes its own placeholders and links keys of different types, a driver can hold a connection for a withDatabase scope, and workersEnv() tells a Worker from Node. Nothing changes for an app on D1.

  • #298 2cb4107 Thanks @christopherstyles! - g model and g migration name a new migration for the UTC second it's written in (20261108090503_create_products.sql), on D1 too, so migrations written on two branches don't clash. Wrangler orders D1's migrations by their leading number, so files numbered 0001_… still run first. The command reads a project's active-record.jsonc, which Postgres projects declare their databases in. A plugin for the command (@forestfuture/active-record/cli, unstable) returns a migration's SQL and notes while the command names its file, reads a schema with its database's config entry, and shares the core's helpers for reading tables, migration names and JSON with comments.

@forestfuture/d1-record@0.6.0

Choose a tag to compare

Minor Changes

  • #281 febbe8c Thanks @christopherstyles! - The command line is now active-record, also installed as ffar, and comes with @forestfuture/active-record. npx d1-record is gone: run npx active-record schema, g model, g migration and console as before.

    • npx active-record migrate applies your pending migrations, locally by default, through your project's own Wrangler. --remote asks you to type the database's name first, and --yes skips that. The generators now suggest it as the next step.
    • The command finds its adapter from your package.json. When a project has several installed, choose one with --adapter d1.
    • Generated schema files now say "Generated by active-record schema". Their format number went up, so active-record schema --check asks you to regenerate them once.
  • #275 992d4e3 Thanks @christopherstyles! - Bulk inserts resolve to the rows they wrote, and the base error is ActiveRecordError. Both are breaking changes.

    • insert, insertAll, upsert and upsertAll resolve to { rowsAffected, rows } in place of D1's meta. rows holds each written row's primary key, read as its type. Name other attributes with returning: ["id", "createdAt"], which types rows too, or pass returning: false for none. Replace meta.changes with rowsAffected. For a one-row insert, rows[0] holds the new row's primary key in place of meta.last_row_id.
    • A statement's result in db.batch is the same { rowsAffected, rows }. rows is empty for toUpdateAll and toDeleteAll.
    • D1RecordError is now ActiveRecordError, with no alias. Rename it in instanceof checks.
    • D1's meta is still on every onQuery event, typed D1Meta.
  • #280 41a4c37 Thanks @christopherstyles! - The library is now two packages, both breaking changes. @forestfuture/active-record is the core, and @forestfuture/d1-record is its D1 adapter. Install both. The guide's Upgrading to 0.6 walks through the move.

    • Import Models, Relations, validations, callbacks, associations, withDatabase, batch and the error classes from @forestfuture/active-record. Import connect, withSession, NoSession, d1, and D1's QueryEvent and QueryListener, from @forestfuture/d1-record. d1-record re-exports nothing of the core.
    • The generated schema names its adapter: adapter: d1({ binding: "DB" }) replaces binding: "DB". Run npx active-record schema to regenerate it.
    • toSql() on a Model with no generated schema, outside withDatabase and with no db, throws NoDatabase, since nothing says which database's SQL to write.
    • The agent skill is now active-record, in @forestfuture/active-record, which ships llms-full.txt too.

Patch Changes

  • #273 eb0cf85 Thanks @christopherstyles! - A bookmark D1 rejects no longer passes for a constraint failure. A forged cookie could make a request's first statement throw RecordNotUnique or another constraint error, and now starts the Session again. A bookmark given to connect throws D1's error.
  • Updated dependencies [febbe8c, 41a4c37]:
    • @forestfuture/active-record@0.6.0

@forestfuture/active-record@0.6.0

Choose a tag to compare

Minor Changes

  • #281 febbe8c Thanks @christopherstyles! - The command line is now active-record, also installed as ffar, and comes with @forestfuture/active-record. npx d1-record is gone: run npx active-record schema, g model, g migration and console as before.

    • npx active-record migrate applies your pending migrations, locally by default, through your project's own Wrangler. --remote asks you to type the database's name first, and --yes skips that. The generators now suggest it as the next step.
    • The command finds its adapter from your package.json. When a project has several installed, choose one with --adapter d1.
    • Generated schema files now say "Generated by active-record schema". Their format number went up, so active-record schema --check asks you to regenerate them once.
  • #280 41a4c37 Thanks @christopherstyles! - The library is now two packages, both breaking changes. @forestfuture/active-record is the core, and @forestfuture/d1-record is its D1 adapter. Install both. The guide's Upgrading to 0.6 walks through the move.

    • Import Models, Relations, validations, callbacks, associations, withDatabase, batch and the error classes from @forestfuture/active-record. Import connect, withSession, NoSession, d1, and D1's QueryEvent and QueryListener, from @forestfuture/d1-record. d1-record re-exports nothing of the core.
    • The generated schema names its adapter: adapter: d1({ binding: "DB" }) replaces binding: "DB". Run npx active-record schema to regenerate it.
    • toSql() on a Model with no generated schema, outside withDatabase and with no db, throws NoDatabase, since nothing says which database's SQL to write.
    • The agent skill is now active-record, in @forestfuture/active-record, which ships llms-full.txt too.

The core was part of @forestfuture/d1-record before 0.6: its history up to 0.5 is in packages/d1-record/CHANGELOG.md.

@forestfuture/d1-record@0.5.1

Choose a tag to compare

Patch Changes

  • #252 ebf0bf7 Thanks @christopherstyles! - exists(), isEmpty() and hasAny() now give the right answer after distinct() with an offset. Post.select("title").distinct().offset(1).exists() was false even when toArray() returned records, because every match counted as one row and the offset skipped it.

  • #257 2163b15 Thanks @christopherstyles! - The agent skill no longer sends agents to web pages. They read only the llms-full.txt shipped in the package, which matches the installed version.