ALWAYS use when writing code importing "@libsql/client". Consult for debugging, best practices, or modifying @libsql/client, libsql/client, libsql client, libsql-client-ts, libsql client ts.
@libsql/[email protected]Tags: next: 0.15.0-pre.3, latest: 0.17.2
References: package.json • README • Docs • Issues • Releases
Use skilld search "query" -p @libsql/client instead of grepping directories. Run for full syntax, filters, and operators.
.skilld/skilld search --guide -p @libsql/clientThe @libsql/client CHANGELOG only covers up to v0.12.0, and GitHub releases only list v0.14.0 (with empty notes). Issue #340 confirms v0.16/v0.17 release notes are missing entirely. Many recent APIs are only discoverable by diffing the @libsql/core/api.d.ts type definitions against the CHANGELOG.
All relevant files have been read:
releases/_INDEX.md — only 1 release (v0.14.0, empty)releases/CHANGELOG.md — covers v0.2.0 through v0.12.0@libsql/core/lib-esm/api.d.ts — full current API surface (v0.17.2)@libsql/core/lib-esm/config.d.ts — expanded config internalspkg/lib-esm/*.d.ts — all client implementations (node, web, http, ws, sqlite3, hrana)issues/issue-339.md — v0.17.0 XMLHttpRequest regressionissues/issue-340.md — missing v0.16/v0.17 changelogsdocs/sdk/ts/reference.md — current documentationclient.migrate(stmts) — v0.10.0, schema migrations with FK disabledexecute(sql, args) overload — v0.8.0, convenience shorthandConfig.concurrency — v0.7.0, parallel request limitConfig.syncInterval — v0.5.3, periodic embedded replica syncConfig.encryptionKey — v0.5.0, encryption at restConfig.offline — undocumented, enables offline writesConfig.readYourWrites — undocumented, consistency optionConfig.remoteEncryptionKey — undocumented, Turso Cloud encryptionclient.reconnect() — undocumented, reconnect after closeLibsqlBatchError — undocumented, batch-specific error with statementIndexbatch() tuple syntax [string, InArgs?] — undocumented shorthandLibsqlError.extendedCode and .rawCode — extended error codesbatch() parameter order — v0.3.0, mode is 2nd param not 1st./hrana import removed — v0.2.0, replaced with ./wstransaction() without mode — deprecated per type definition JSDocencryptionCipher option — was in v0.5.1 CHANGELOG, absent from current typesReplicated return type from sync() — { frame_no, frames_synced } | undefinedWrite to: /Users/dave/src/github.com/synmux/syn-horse/.claude/skills/libsql-client-skilld/.skilld/_API_CHANGES.md
Then validate with: skilld validate <path>
Generating a SKILL.md best practices section for the @libsql/client TypeScript package. The goal is to extract 14 non-obvious, documented patterns that an LLM wouldn't already know, sourced from local .skilld/ reference files.
Read and verified:
@libsql/core/api.d.ts — Config, Client, Transaction, ResultSet, TransactionMode, LibsqlError, LibsqlBatchError types@libsql/core/config.d.ts — ExpandedConfig, expandConfig.skilld/pkg/lib-esm/node.d.ts and web.d.ts — confirmed exports.skilld/docs/sdk/ts/reference.md — full TypeScript SDK reference.skilld/docs/features/embedded-replicas/introduction.md — sync, offline, encryption, read-your-writes.skilld/docs/features/ai-and-embeddings.md — vector types and DiskANN indexing.skilld/docs/local-development.md — file: URLs, turso dev.skilld/docs/sync/usage.md — push/pull/checkpoint sync model.skilld/docs/sync/conflict-resolution.md — last push wins.skilld/docs/sync/checkpoint.md — WAL compaction.skilld/releases/CHANGELOG.md — version history with breaking changes.skilld/issues/ — #119 (baton errors), #140/#229 (:memory: transactions), #191 (RESPONSE_TOO_LARGE), #195 (WHERE IN), #288 (busy_timeout), #290 (web file: URLs), #339 (v0.17 XMLHttpRequest regression)Covering 5+ distinct areas: connection config, transactions/batches, embedded replicas/sync, error handling, query patterns, edge/serverless runtime.
"write" or "read" mode for batch() and transaction() — default "deferred" can fail on upgradebatch() over interactive transaction() for atomic multi-statement ops — lower latency, avoids 5s timeouttransaction.close() in a finally blocksyncInterval is in seconds, not milliseconds@libsql/client/web for edge runtimes (Cloudflare Workers, Vercel Edge)@libsql/client/web does not support file: URLsintMode: "bigint" if integer columns may exceed 2^53-1migrate() instead of batch() for schema DDL — auto-wraps with foreign_keys=offLibsqlBatchError.statementIndex identifies which statement failedfile::memory:?cache=sharedoffline: true for embedded replicas that need local writes without connectivityconcurrency from default 20 based on workloadLIMIT/pagination for large remote result sets to avoid RESPONSE_TOO_LARGEreadYourWrites (default true) auto-syncs the local replica after writes.d.ts filesWrite to: /Users/dave/src/github.com/synmux/syn-horse/.claude/skills/libsql-client-skilld/.skilld/_BEST_PRACTICES.md
Then validate with skilld validate.