Repository navigation
3ngram 1.13.0
3ngram v1.13.0
Agents can ask where a memory came from. Accepted proposals now record what they
produced, and keyed memory reads can return a bounded provenance trace. Native
writes can also decline session attribution explicitly.
Changes
Provenance
- Accepting a consolidation, fact, resolution or retention proposal records a
tenant-bound link back to that proposal. Facts and edges it creates carry a
foreign key to the proposal. Lifecycle events it emits record the proposal's
kind and id in their payload. Account exports keep the links. Rows written
before this release are not backfilled and report an unknown producer. get_memoriesacceptsinclude: ["provenance"]for at most five ids. Each
trace reports the recorded origin, revision lineage, audit events, accepted
proposals and fact identities. It carries identity fields such as ids, topic,
scope, project and status, never content, rationale or raw payloads. Events
are capped at 50, proposals and facts at 25, lineage at 25 nodes and 50
edges, and each proposal's produced ids at 50, with truncation flags. A call
withoutincludereturns the same response as before.GET /api/v1/memories/{id}/historyreturns the same trace. If the trace
cannot be read, the history still returns and reports provenance as
unavailable.- The origin's agent label is reported by the session opener. It is not
verified attribution. - A blocking integration test checks the full chain across two tenants:
exact identities in all five trace sections and no foreign ids.
Writes and isolation
- Native memory writes accept
sessionRunId: nullto skip session
attribution. The write leaves every session's lease, triage state and closer
eligibility unchanged. An omitted id keeps automatic attribution, and a
supplied id must still belong to the caller. - Every statement behind memory history now binds
user_idto the caller
alongside row-level security (#427). Results are unchanged while RLS holds.
Images and dependencies
- The server and worker images move to the current
node:24-bookworm-slim
digest, which ships apt 2.6.2 and clears CVE-2026-109518. - The
@hono/node-serveroverride rises to^1.19.18for
GHSA-jpvv-r467-5p4w: a raw backslash in a request path was parsed as/,
so a path-based proxy rule could see a different path than the app.
GHSA-rmxm-3fg6-px4f (serveStatic) has no 1.x fix. 3ngram never calls
serveStatic, and that advisory stays open on #407 until the MCP SDK 2.4
upgrade. - The
qsoverride rises to^6.16.1for GHSA-6pq8-jhm2-2vcw. qs is
transitive under express and body-parser, and the images now resolve 6.16.1.
Compatibility
- Breaking for direct
@3ngram/dbusers:getMemoryHistorytakes the
caller's id as its second argument,getMemoryHistory(tx, userId, memoryId).
Pass the same id given towithTenant(). The old two-argument call fails to
compile in TypeScript and fails at runtime in JavaScript. The@3ngram/core
function and the REST route are unchanged. The managed dashboard in
3ngram-platformreads history through REST and is unaffected. - Strict parsers of
get_memoriesoutput must accept the optionalprovenance
object. Strict parsers of REST memory history must accept its optional
provenancefields. - Clients that validate write inputs must accept
sessionRunId: null. - Import event payloads may no longer carry
proposalKindorproposalId.
LikesessionRunId, they are reserved for native writes. Strict parsers of
account exports must accept the new nullable producer fields on facts and
edges. - Workspaces that install
@3ngram/serverfrom npm should make sure their
lockfile resolves@hono/node-server1.19.18 or later andqs6.16.1 or
later, because pnpm overrides do not travel with published packages. @3ngram/server,@3ngram/worker,@3ngram/sdkand the3ngramCLI move to
1.13.0 together. The dependency versions are config 0.7.0, schema 0.15.0,
llm 0.5.0, db 0.17.0 and core 0.18.0.- The
3ngram-hookbinary ships from its own3ngram-hook-v*tag. Managed
dashboard changes are delivered separately by3ngram-platform.
Operations
- Apply migrations
0046_illegal_thunderboltand0047_tough_lockheed. Both
are additive. 0046 adds a composite unique key to each of the four proposal
tables, three nullable producer columns onfactsandmemory_edgeswith
their foreign keys and indexes, and a one-producer check onmemory_edges.
0047 adds a partial index onmemory_events. - Neither migration creates a table or needs a grant.
provision-roles.sqlis
unchanged since v1.12.0, so it does not need a rerun. Upgrades from versions
before v1.11.0 still need migration0045_retention_proposalsand the runtime
grants described in the v1.11.0 release notes. - 0046 locks the four proposal tables,
factsandmemory_edgeswhile it adds
columns and validates constraints. Both migrations build indexes without
CONCURRENTLY, so writes to those tables and tomemory_eventswait until
the migration finishes. - The forgetting pass remains disabled by default. This release does not
authorize enabling it. - Worker images must be adopted separately from the server package. Verify the
image and completion of an actual execution for every scheduled worker.
Immutable container reference
ghcr.io/b3dmar/3ngram@sha256:913e4f4d0216dc574cbc3c85606cf43e098287a63799939dff5dbc2f96006781