Repository navigation
3ngram 1.10.0
3ngram v1.10.0
Minor: a Postgres-backed rate limiter, so a deployment can run without Redis;
a one-shot worker for cron schedulers; and the typed-judgment path for the
session closer (a Jev provider, a per-tenant opt-in and resolution
proposals). The typed-judgment path is off unless you configure JEV_* and
a tenant opts in, and SESSION_CLOSER_ENABLED still defaults to off. Also
carries a nodemailer security fix.
Changes
Rate limiting and the worker (#315)
RATE_LIMIT_STORE=redis|postgres|memoryselects the server's
rate-limiter store.postgresbacks every limiter, including the
/oauth/tokenfailure counter, with the newrate_limitstable
(migration 0042), and production then accepts a missingREDIS_URL. If the
variable is unset, behaviour is unchanged: Redis whenREDIS_URLis set,
in-memory outside production, a validation error in production.memoryin
production is an explicit single-replica opt-in that logs a boot warning.- One-shot worker:
node dist/once.js <consolidation|surfacing|gc-clients|session-sweep>runs one pass without
Redis and exits (0 success, 1 failure, 2 unknown job). The resident BullMQ
worker stays the default. - Worker env role (#204): the worker validates its env as role
worker,
so it no longer requires the server-onlyOAUTH_JWKSandREDIS_URLin
production.
Typed judgment (#224, default-off)
Gateway.decide()and a Jev (TypeSafe AI) provider (#225). Each call
makes one bounded attempt with no retries. Every answer is checked against
the questions asked, and errors carry counts only, never bodies. New
optional env varsJEV_API_URL,JEV_API_KEYandJEV_MODELrequire an
explicit model pin and refuse-latest;jev-1.14.0is the last pin
verified wire-compatible. Calls are metered assession.closer.decide.- Per-tenant judgment opt-in (#225). New table
user_judgment_policy
(migration 0043, RLS + FORCE RLS) andGET/PUT /api/v1/settings/judgment.
The default isoff, and there is no MCP surface. Each change writes a
content-freeaudit_logconsent row. Account erasure resets the opt-in, and
the export includes it. - The closer decides for opted-in tenants (#229). When an opted-in tenant
has a configured judgment gateway, the closer sends one question per briefed
commitment, with the session excerpt fenced as untrusted data. It resolves a
commitment only at p ≥ 0.9. Opted-out tenants keep the existing path. - Resolution proposals (#229). A commitment judged plausibly done
(0.5 ≤ p < 0.9) is staged in the newresolution_proposalstable
(migration 0044, RLS + FORCE RLS) instead of being resolved.
review_proposalslists it as a third kind (output V3):counts/totals
gain aresolutionkey, and accept/reject return
applied_resolution/rejected_resolution. Accepting resolves the
commitment through the FSM-checked transition, recorded as the reviewer.
Security
- nodemailer 10.1.4 (#355, GHSA-85x2-q946-cp5h: the address parser could
deliver a crafted quoted address to a domain the header does not name). No
API or behaviour change.
Compatibility
- Custom
Gatewayimplementations must adddecide. It may reject with
NotImplementedError('decide'), as the OpenAI gateway does. - Library API renames:
createRateLimitertakesstoreinstead of
redis,oauthTokenRoutertakesrateLimitStore, and
setExchangeFailureStorereplacessetExchangeFailureRedis. The exported
envSchemais now role-agnostic; validate throughparseEnv/loadEnvto
get the production rules. review_proposals: a cursor issued before this release is rejected once
as invalid input, because the walk now covers the third kind. Restart the
walk from page 1. A client that strict-parses the V2 output or switches
exhaustively onactionhas to accept the newresolutionkey and the two
new action literals.
Operations
- Migrations 0042–0044 (additive, run before starting the new server):
0042_rate_limits(system table, no RLS;provision-roles.sqlgrants the
runtime role SELECT/INSERT/UPDATE/DELETE),0043_user_judgment_policy,
0044_resolution_proposals. No backfill. From 1.8.x, apply 0039–0044. - No configuration change is required.
RATE_LIMIT_STORE,JEV_*,
SESSION_CLOSER_ENABLEDandTHREENGRAM_STOP_NUDGEkeep today's behaviour
when unset.
Immutable container reference
ghcr.io/b3dmar/3ngram@sha256:ee220e073056b99b82904833ccff519231318816b82dbe6ae37fcc978ebc9300