Skip to content

3ngram 1.5.0

Choose a tag to compare

@github-actions github-actions released this 24 Aug 10:42
c6617b2

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); native remember/revise/resolve/archive accept
    an optional sessionRunId and stamp it on audit events. Import rejects the
    reserved key. Erasure redacts session rows in place; the GDPR export includes
    them. Migration 0032.

  • Session-lifecycle REST surface for hooks. POST /api/v1/agent-sessions/open, /close, /heartbeat, the typed provenance
    read GET /api/v1/agent-sessions/{sessionRunId}/events, and GET /api/v1/prompts/debrief — one renderer shared with the MCP debrief prompt,
    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 can resolve, never remember/revise/archive.
    Migration 0033. The worker gains a Dockerfile and a service in both compose
    files.

  • Stop-nudge triage handshake, default-off (THREENGRAM_STOP_NUDGE on the
    hook). POST /api/v1/agent-sessions/triage/begin and /triage/complete; the
    server decides the debounce, the hook injects only when armed. 3ngram-hook stop ships 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 the strictDepBuilds tripwire 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