Skip to content

Releases: iampantherr/SecureContext

v0.48.1 — Temporal block: advisory, not commanding

Choose a tag to compare

@iampantherr iampantherr released this 23 Jul 02:47

The zc_search ## Temporal computation block is now framed as a cross-check aid rather than a command.

Before: "deterministic — trust these numbers over mental date math"
After: "deterministic date-math aid — cross-check against the dated sources below"

Why (measured): an apples-to-apples LongMemEval run (frontier model as both answerer and judge — Zep's methodology) showed the old commanding phrasing OVER-STEERED capable models: temporal-reasoning scored 100% with the block reframed as advisory vs 73% with the old command. The precomputed date math still renders (it genuinely helps weaker local generators); it just no longer orders the model to override its own reasoning. Verified end-to-end via a fresh MCP render probe.

Also folds in bench-harness measurement tooling used to produce the finding (generator-tier context assembly, opt-in recency backfill, an OpenAI apples-to-apples path gated on a local BENCH_OPENAI_KEY, and BENCH_SKIP_INGEST). Benchmark result files remain local.

v0.48.0 — Lever 4: event-fact extraction at ingest

Choose a tag to compare

@iampantherr iampantherr released this 21 Jul 03:04

Session-tier content is mined for events at ingest: a local model extracts event descriptions + RAW time expressions, and deterministic code resolves them to calendar dates anchored on the session date (the model never does date math). Events index as event:<parent>:<n> pseudo-entries — points (DATE:) and first-class ranges (FROM:/TO:) — flowing through every retrieval channel.

Temporal solver: new duration question kind answered directly from range entries; four precision gates (topical overlap, proximity date grounding, content-origin requirement, degenerate-result abstention) make it abstain rather than assert mis-grounded numbers.

Search layer: event result cap (ZC_EVENT_RESULT_CAP, default 3) + same-subject event supersession (latest-dated wins; numeral- and number-word-stripped matching; solver sub-searches see everything).

Measured (LongMemEval, fully local: gpt-oss:20b generator, phi4:14b judge): temporal-reasoning +8 over full-context baseline at n=25/type — the first nonzero temporal delta for SC; knowledge-update at baseline parity. Extraction bakeoff (committed in bench/t3/): phi4:14b, 100% event recall / 100% date accuracy, 2× faster than gpt-oss:20b.

Docs: new README FAQ on hardware tiers × model choice (what runs on what machine).
CI: the publish workflow now skips npm publish with a warning when NPM_TOKEN is absent instead of failing the tag build.

Kill switches: ZC_EVENT_EXTRACT=0, ZC_EVENT_SUPERSEDE=0, ZC_EVENT_RESULT_CAP.

v0.47.1 — Deterministic temporal answer solver

Choose a tag to compare

@iampantherr iampantherr released this 19 Jul 10:20

Temporal interval/ordering/elapsed questions are now computed, not generated: SecureContext decomposes the question into events, retrieves and date-grounds each one, and does the arithmetic in code — rendered as a 'Temporal computation' block above the search Timeline. LLMs are unreliable at date math; this removes them from that job entirely. Fails closed (no block rather than a fabricated date). E2E-verified with real terminal agents. Details in CHANGELOG.md.

v0.47.0 — Temporal knowledge graph: bi-temporal memory, time travel, evidence-selected invalidation

Choose a tag to compare

@iampantherr iampantherr released this 18 Jul 23:51

SecureContext's temporal story, fully local. Built from a 105-agent verified research pass on Graphiti/Zep's architecture: their bi-temporal model is pure schema, their retrieval pure algorithm — both replicated here with zero cloud dependency — and their per-edge LLM invalidation replaced with an algorithmic-first loop escalating only ambiguous pairs to a local model chosen by a 6-model bakeoff.

Bi-temporal KB (T1): immutable first_seen_at + bumped last_indexed_at — 'when did we learn this' survives re-indexing; temporal Timelines order by first-seen.

Time travel (T2): as_of on both zc_search and zc_recall_context — reconstruct exactly what the project knew and believed at any past moment (includes since-retired facts, excludes later ones).

Invalidation loop (T3): ships with qwen2.5-coder:14b as the adjudicator — the only local model in our published bakeoff (bench/t3/) with ZERO false contradictions and 5/5 true-conflict recall (llama3.1:8b: 27 false conflicts, disqualified; 32B was worse than 14B). Policy derived from the data: the model classifies, recency picks the survivor, 'contradiction' verdicts only ever open operator triage. invalid_from completes the four-timestamp bi-temporal square. First live scan on a real project suppressed 6 work-journal false positives automatically.

E2E-verified with real terminal agents on fresh + mature projects (two failures found, fixed, retested → 8/8). 959 tests. Kill switches: ZC_LLM_ADJUDICATE=0 and friends. Details in CHANGELOG.md.

v0.46.2 — Operational hardening from the enterprise run

Choose a tag to compare

@iampantherr iampantherr released this 18 Jul 13:27

Bugfix release. Every fix was caught during live operation of the 6-department enterprise delivery run and verified on the running stack: verification-key loss is now loud (/health verifyKeys), the contradiction triage queue self-maintains (auto-closes flags for retired facts; 806 zombies cleared on first run), launcher-decorated model ids price correctly, favicon served. Details in CHANGELOG.md.

v0.46.1 — Temporal decomposition, program memory, embed self-heal

Choose a tag to compare

@iampantherr iampantherr released this 17 Jul 22:45

Temporal retrieval round 2

Compound temporal questions ("how many days between the day I started X and the day Y") now decompose into event clauses, retrieve per clause, and RRF-fuse. Temporal questions get a chronological Timeline block with day-gap intervals; results older than 30 days carry a staleness note.

LongMemEval temporal-reasoning: recall@5 33.3 → 57.1, recall@10 46.7 → 64.3, MRR 0.157 → 0.404 (2.6×), measured through the live search API. No regression in other categories.

Delivery-tool kit

  • zc_program — multi-phase delivery programs. status is the orchestrator-handoff primitive; close_phase requires acceptance evidence and auto-generates a searchable checkpoint document. Live-verified: an orchestrator killed mid-phase was replaced by a cold one that resumed correctly from two calls.
  • zc_search_global project filter — "how did project X implement this?" from any other project.
  • Embed-lane watchdog + self-heal — detects the silent vector-lane stall class and drains orphaned entries automatically (drained a real 735-entry backlog to zero in production while shipping this release).
  • Dashboard: program burn-down panel + embed-lane health chip.
  • Delivery mandates: acceptance-gate and web-e2e-verify wired into orchestrator/worker defaults (A2A dispatcher repo).

Fixes (caught by live terminal-agent E2E + bench)

  • Event-loop starvation from the synchronous O(N²) backlink scan on bulk-ingested corpora (async yielding extractor, precompiled regexes, ZC_GRAPH_MAX_NODES cap)
  • Timeline formatter silently dead in ESM dist (lazy require)
  • zc_search_global 500 on Postgres since v0.31 (integer param inference vs W_BACKLINK=0.08)
  • Self-heal head-of-line blocking (empty files; consecutive-failure abort semantics)
  • Embed context overflow on token-dense content (halve-and-retry)
  • chk_sss_score constraint vs 11-check scans (migration 40)

Full detail in CHANGELOG.md. Suite: 959 passing.

v0.46.0 — Team memory, session replay, OTel Gen-AI, CI memory, chunked embeddings, compliance export

Choose a tag to compare

@iampantherr iampantherr released this 17 Jul 12:26

Two releases in one drop — every feature live-verified with real terminal agents on fresh AND mature (250-fact) projects.

v0.45.0 — Session replay from the HMAC audit chain (S6)

Time-travel debugging with cryptographic provenance: scrub any session's tool-call timeline on the dashboard (Security → Session replay). Every step carries a chain verdict — ✓ verified / ✗ tampered / ⛓ gap / · unsigned — computed by re-verifying the FULL project chain against every candidate machine key (container + host via read-only ZC_VERIFY_SECRET_PATH mount). Live tamper test: a SQL-modified row flips to ✗ at the exact step while neighbors stay ✓.

v0.46.0

  • Team / multi-user memory (S3): per-user API keys (zck_…, sha256-hashed, instant revocation), shared workspaces (workspace:<slug> virtual projects, membership-gated), unspoofable per-fact attribution (created_by), /api/v1/team/* control plane. Kill switch ZC_TEAM_AUTH=0.
  • OTel Gen-AI conformance (S5): audit spans now follow the Gen-AI semantic conventions (execute_tool shape, gen_ai.* attributes, error.type) — plus the tamper-evidence hashes no other tracer has. POST /api/v1/otel/export for on-demand flush.
  • CI/CD memory (S7): scripts/ci-memory.mjs — hydrate project memory into claude -p pipelines and write results back, attributed to a revocable ci user key.
  • Chunked embeddings (S9): long content stores per-chunk vectors; search max-pools over them. Measured on LongMemEval: single-session-user hit@5 21.4% → 46.2%, MRR 0.145 → 0.333. Also: embed timeout is now ZC_EMBED_TIMEOUT_MS (the fixed 5s silently killed all embeds under chat-model CPU contention).
  • Compliance export (S10): GET /api/v1/compliance/report + dashboard panel — full-chain re-verification, agent activity, admission events, and attribution as an auditor-ready markdown document.
  • CRITICAL fix: the test suite was deleting + regenerating the REAL machine secret on every run, rotating the root HMAC key and invalidating previously-signed audit rows. Tests are now isolated to a scratch secret (ZC_MACHINE_SECRET_PATH); proven byte-identical across a full suite run.

Suite: 946 passed. Full details in CHANGELOG.md.

v0.44.0 — Temporal supersession, durable task graph, LongMemEval numbers

Choose a tag to compare

@iampantherr iampantherr released this 16 Jul 13:06

S1 — Temporal fact supersession (Zep-parity): retrieval now prefers current facts — near-identical conflicting pairs demote the older side at recall time (historical queries still find it), and the contradiction scan auto-retires numeric updates that announce themselves ("now 90 seconds…") with full revivability. Internal bench: stale-fact-outranks-update went 100% → 0%.

S8 — Durable task graph: depends_on + plan_id on the work-stealing queue with STRICT dependency enforcement inside the atomic claim, zc_plan_status for crash-resumable multi-step plans, and unblock notifications on completion. A 12-step multi-agent plan now survives crashes: the replacement agent sees done/claimed/blocked/ready in one call and continues.

S4 — LongMemEval: first public-benchmark numbers (retrieval recall over a 5,674-session haystack, 100% local embeddings) — knowledge-update hits 86.7% recall@10, the S1 work measured on a public yardstick. Reproduce: node scripts/memory-bench.mjs --longmemeval <longmemeval_s.json> --limit 15.

Reliability: two-lane embedder (background serialization with retry — no more concurrent-boot stampedes silently disabling semantic search), write-time PG fact embeddings, stored-vector scans, recent-first scan budgets, honest skip/failure disclosure end-to-end.

Verified with 6 live terminal-agent E2E rounds on fresh + mature projects. Details: CHANGELOG.md

v0.43.0 — Recall budget: bounded digest, staleness decay, importance discipline

Choose a tag to compare

@iampantherr iampantherr released this 13 Jul 11:28

Fixes a measured failure on mature projects: 237 accumulated facts (87% importance-5) made zc_recall_context render ~47k tokens, and agents responded by spawning subagents to "digest" their own memory — slower, lossier, and more expensive than reading it. Recall is now a bounded digest (~4k tokens default) with honest progressive disclosure.

Highlights

  • Recall output budget (src/recall_budget.ts, shared SQLite/PG): top-ranked facts render fully up to ZC_RECALL_MAX_CHARS (16k chars default); the tail collapses into a grouped index (…140 more facts: OWNERSHIP_* (46) · …) that stays fully retrievable via focus or zc_search. =0 disables; small projects render byte-identically.
  • Temporal tier-1 contract: "what happened last week" puts in-window facts first under the budget, with an explicit warning when in-window facts overflow — never silent truncation.
  • Staleness decay: facts untouched past ZC_RECALL_STALE_DAYS (30) demote below fresh lower-importance facts, enabled by selective-rehearsal access bumping (only rendered facts stay "fresh").
  • Importance discipline: zc_remember warns past a ★5 soft quota (ZC_IMP5_SOFT_CAP, 25) per namespace; guidance prescribes ttl_days for per-task notes.
  • Scan-coverage honesty (found by this release's live E2E): a contradiction scan that transiently skipped facts now discloses the skip count instead of implying a clean result.
  • Regression scaffolding: permanent mature-project fixture (scripts/seed-mature-memory.mjs) + recall-size gate (scripts/recall-size-check.mjs).

Verification

Suite 878/881 (3 pre-existing fixtures), recall-size gate 7/7, benchmark ≥ prior stage on every category (overall hit@10 78.1%), and live terminal-agent E2Es on both a fresh and a seeded mature project — temporal recall answered directly from memory with zero subagent usage in telemetry.

Full details: CHANGELOG.md · ARCHITECTURE.md

v0.42.0 — TTL memories, numeric-conflict triage, multimodal ingestion, temporal search, LongMemEval

Choose a tag to compare

@iampantherr iampantherr released this 10 Jul 17:32

Refinement round closing the remaining competitive gaps. Verified with a 13/13 full-functionality live terminal-agent E2E, suite 865/868, bench parity (hit@10 75% / MRR 0.571).

  • R1 — Expiring memories (TTL): zc_remember {ttl_days}expires_at (SQLite mig 38 / PG mig 36); recall excludes expired live; cron retires as expired (revivable). Closes the Mem0 gap.
  • R2 — Numeric-conflict detection: near-identical claims (cosine ≥ 0.85) disagreeing on a number are flagged numeric_conflict for operator triage — never auto-resolved.
  • R3 — Temporal-bonus gating (measured no-ship): hard and proportional relevance gates both lost to the flat in-window bonus on the benchmark; shipped as a default-off knob ZC_RECALL_TEMPORAL_REL_GATE=0.
  • R4 — Temporal filters in KB search: "last week", "since March", "as of 3 months ago" now parsed and applied in zc_search (both stores).
  • R5 — Multimodal ingestion: new zc_index_file — PDF (pdfjs-dist), DOCX (zero-dep ZIP reader), images via local Ollama vision models (graceful skip when none installed). Path-traversal guarded, 25 MB cap.
  • R6 — LongMemEval adapter: memory-bench.mjs --longmemeval <file> runs the public benchmark for directly comparable numbers vs published Zep/Mem0 results.

Full details in CHANGELOG.md.