All notable changes to this project are documented here.
The format follows Keep a Changelog. This project uses Semantic Versioning; while the major version is 0, breaking changes are released in the minor version.
Releases before 0.2.0 predate this file; see the GitHub releases for those.
A correctness and hardening release. Three of the changes alter existing behaviour — see Breaking changes before upgrading.
agent_run()is now registered withSQLITE_DIRECTONLY, so it can only be called from SQL the application issues directly. Calls from a VIEW, TRIGGER, CHECK constraint, generated column or index expression now fail withunsafe use of agent_run(). The function makes network calls and writes rows; without this restriction, querying a table in a database file prepared by somebody else could trigger those side effects on the caller's behalf. If you need the result in a view, materialise it into a table first.max_iterationsmust be between 1 and 100. Values outside that range are rejected instead of being accepted.0and negative values previously caused a division by zero; large values allowed a single statement to spend an unbounded amount of time and money against the LLM and the MCP server.- A tool the model asks for is invoked only if the MCP server advertised it in
mcp_list_tools_respond. Previously any name the model produced was passed straight through.
- Text coming from the MCP server — tool names, descriptions, input schemas and
tool results — is now fenced in the prompt with a delimiter randomised per
agent_run()call, and the model is told to treat the contents as data. An instruction injected into content a tool fetched can no longer escape into the instruction region. See "Security model" in API.md. - Identifiers interpolated into SQL are quoted with
%w(PRAGMA table_info,INSERT, the embeddingUPDATE) and string literals with%q(vector_init). A table or column name containing a quote or a space can neither break the statement nor inject SQL. - Apple signing secrets are no longer exposed to workflow runs on every branch:
the keychain, codesign and notarisation steps are restricted to
main. Secrets are passed throughenvinstead of being interpolated into shell script bodies, and the keychain cleanup now runs even when a prior step fails. - GitHub Actions are pinned to commit SHAs rather than mutable tags, workflow
permissions default to
contents: readwith the release job widening them for itself, and the SQLite amalgamation downloaded during the Android test is verified against a pinned SHA-256 before being compiled. - Builds enable
-fstack-protector-strongand_FORTIFY_SOURCE=2, plus full RELRO and a non-executable stack on Linux and Android and NX/ASLR on Windows. (macOS already defaulted to the first two.)
- Fixed a stack buffer overflow when extracting into a table with roughly 22 or
more columns: the
INSERTstatement was assembled with unboundedstrcat()into two fixed 512-byte buffers. The statement is now built once per call withsqlite3_str, which grows on demand. The same unbounded concatenation is fixed in the embedding column mapping and the embeddingUPDATE. agent_run()no longer destroys the caller's transaction. It usedBEGIN/COMMIT/ROLLBACKwith the return codes ignored; because the function runs while one of the caller's statements is already executing, the innerBEGINfailed whenever the caller had a transaction open and the matchingROLLBACKthen discarded the caller's uncommitted work. It now uses aSAVEPOINT, which nests safely and leaves the caller in control.- Reduced the stack frame of
agent_run()from about 155 KB to about 6 KB by moving its scratch buffers to the heap. The old frame exceeded the 128 KB default thread stack on musl, so the extension could overflow the stack on any non-main thread. - Fixed four leaks of the 64 KB tool list on error paths in table mode.
- JSON objects in the extracted payload are now delimited by matching braces
while honouring nesting and string literals. Previously the first
}ended the object, so every field after a nested object was lost and subsequent rows were mis-split; a nested key could also shadow the row's own, and a value containing an escaped quote was truncated. Escape sequences, including\uXXXXand surrogate pairs, are now decoded. - Column values are bound according to SQLite's type affinity rules rather than
an exact match on
INTEGERorREAL. Columns declaredINT,BIGINT,FLOAT,DOUBLE,NUMERICorVARCHAR(n)previously took the string path, where an unquoted JSON number was never bound at all and the column ended upNULL. JSON booleans now bind as 1 and 0 in numeric columns. - Tool results are fed back to the model in text mode. The system prompt was rebuilt and re-sent unchanged on every iteration, so the model never saw what a tool returned and could not chain calls or use the data in its answer.
- Tool arguments are delimited with a string-aware scan, so a
}inside a JSON string value no longer truncates the arguments sent to the tool. - The per-tool truncation budget is now capped by the size of the buffer that
holds the message, and the limit is applied through
%.*srather than a format string built at runtime. The computed budget previously had no effect above 16 KB. - The Node package works when imported as ESM.
getExtensionPath()always threwExtensionNotFoundErrorfrom the ESM build, with a message claiming the platform package was not installed, because the bundler rewrites a barerequire()into a stub that throws. It now derives arequirefrom__filenameorimport.meta.url, whichever the build provides. generate-platform-packages.jsfails instead of reporting success when a platform binary is missing, so a package without its binary can no longer be published and burn the version number on npm.package-lock.jsonis tracked, pinning the toolchain that builds the published bundle.
- A "Security model" section in API.md describing what the agent trusts, what it does not, and the limits of the controls above.