Repository navigation
3ngram 1.5.0
3ngram v1.5.0
Minor: session continuity lands (issue #166) — typed agent sessions with
write-time provenance, a session-lifecycle REST surface for hooks, and two
default-off triage mechanisms (the worker-side closer and the Stop-nudge
handshake). Nothing triages a session until the flags are turned on.
Changes
-
agent_sessions+ write-time provenance. New table keyed by the natural
key(agent, sessionId); nativeremember/revise/resolve/archive accept
an optionalsessionRunIdand stamp it on audit events. Import rejects the
reserved key. Erasure redacts session rows in place; the GDPR export includes
them. Migration0032. -
Session-lifecycle REST surface for hooks.
POST /api/v1/agent-sessions/open,/close,/heartbeat, the typed provenance
readGET /api/v1/agent-sessions/{sessionRunId}/events, andGET /api/v1/prompts/debrief— one renderer shared with the MCPdebriefprompt,
now inlining the run's briefed commitments so the model can tell which id to
resolve. -
Session closer, default-off (
SESSION_CLOSER_ENABLED, a kill switch, not
just a first-boot default). A lease-expiry sweep closes crashed sessions and
a resolve-only worker job makes one metered LLM pass over the run's briefed
commitments — it canresolve, neverremember/revise/archive.
Migration0033. The worker gains a Dockerfile and a service in both compose
files. -
Stop-nudge triage handshake, default-off (
THREENGRAM_STOP_NUDGEon the
hook).POST /api/v1/agent-sessions/triage/beginand/triage/complete; the
server decides the debounce, the hook injects only when armed.3ngram-hook stopships the client half with Claude Code as the one registered
validation harness. -
Supply chain: the server image build no longer sets
npm_config_ignore_scripts, restoring thestrictDepBuildstripwire during
docker build(the worker image got the same fix in #181). nanoid bumped to
3.3.18 (Dependabot alert #16, dev-only chain).
Upgrade notes
Run pnpm db:migrate — this release adds migrations 0032 and 0033 (one new
table, agent_sessions; the table count moves to 27). No breaking API change:
every new surface is additive, sessionRunId is optional everywhere it is
accepted, and both triage mechanisms are off until you set their flags. The
SDK's remember() now uses the facts-capable V2 argument/output types.
Immutable container reference
ghcr.io/b3dmar/3ngram@sha256:db3b4bbe760b9b6ee7f56f7eff9bb5b585b85770bedeabcbad247d5aa89df14d