Skip to content

Releases: iampantherr/SecureContext

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.

v0.41.0 — Memory-quality program: benchmarked focused recall, consolidation, temporal queries, multi-hop retrieval

Choose a tag to compare

@iampantherr iampantherr released this 10 Jul 16:32

The competitive-research-driven memory-quality program (M0–M5). Every stage was measured against a permanent benchmark and verified by REAL terminal agents — including a full regression E2E proving pre-existing features are intact.

Benchmark result (identical corpus, before → after)

Ability Baseline v0.41.0
Task-relevant fact recall 0% hit@10 (gold ranked 74–79/81) 75%, MRR 0.652
Multi-hop answers 0% (search returned empty) 100%, MRR 0.917
Temporal questions 0%; wrong-era decoy won 60% 75%; decoy wins 0%
Knowledge updates 0% 50%, MRR 0.512
Overall hit@10 0% · MRR 0.000 hit@10 75% · MRR 0.571

Added

  • Benchmark harness (scripts/memory-bench.mjs) — deterministic LongMemEval-style corpus + 32 questions, Recall@K/MRR via the live API. The permanent regression yardstick.
  • Focused recallzc_recall_context {focus:"<current task>"} ranks facts by relevance × importance × salience; facts embed at remember-time; cron backfill. No focus ⇒ byte-identical ordering.
  • Search candidate fix — independent vector channel (calibrated 0.55 similarity floor) + BM25 OR-fallback: natural-language questions no longer return empty on one non-matching word.
  • Consolidation cycle — near-duplicate facts LLM-merge into canonical statements (losers retired, revivable), guarded by an empirically calibrated threshold, a deterministic different-numbers veto, conflict-signal veto, and LLM veto.
  • Temporal queries + bi-temporal-lite — NL parsing ("last week", "about six weeks ago", "since March"), as-of time travel over the transaction timeline (returns since-retired facts), structured date params, optional event-time columns (SQLite mig 37 / PG mig 35). Graphiti has structured filters but deferred NL; Mem0 has NL but no time travel — this ships all four.
  • Multi-hop graph retrieval — bounded BFS (ZC_GRAPH_MAX_DEPTH=2, hop decay), mechanically proven on an A→B→C chain with all other channels disabled.

Hardened (bugs the benchmark exposed)

  • One transient embed failure no longer disables all semantic features for 60s (retry-once + failure streak + fast down-reprobe).
  • The contradiction scan no longer aborts on a single failed embed.

Verified

Live terminal-agent E2E 6/6 on the bench corpus (focused recall rank 79→1, temporal decoy defeated, as-of surfaced a retired fact, NL search empty→top-1, multi-hop rank 1, consolidated fact canonical) + live regression E2E 7/7 on a fresh project (classic recall, contradiction flagging, index/search, L2 symbol summaries, transient mutation guard, soft forget, focused recall). Tests 865/868 (3 pre-existing fixtures) at every stage.

v0.40.1 — Deterministic coordination-message filter for auto-extract

Choose a tag to compare

@iampantherr iampantherr released this 03 Jul 19:16

Patch release. The A2A dispatcher's coordination traffic (ASSIGN pings with embedded task summaries, wake nudges, idle alerts, shutdown signals) arrives in agent sessions as "user prompts" — previously kept out of auto-extracted memory only by the extraction LLM's judgment. Both auto-extract hooks now deterministically drop harness-authored messages by fixed prefix (DISPATCHER:, ALERT:, REMINDER:, A2A SHUTDOWN SIGNAL:; extensible via ZC_AUTO_EXTRACT_IGNORE_PREFIXES) in both the prompt buffer and transcript paths, and the extraction prompt explicitly excludes coordination instructions. Verified with a live terminal-agent E2E using REAL dispatcher traffic: an externally-submitted A2A task carrying trap markers was delivered as a genuine ASSIGN ping, completed normally, and the markers never entered auto-extracted memory — while operator briefs in the same session extracted 4 correctly-typed facts. Tests 865/868 (3 pre-existing fixtures).

v0.40.0 — Automatic background memory extraction + operator console redesign

Choose a tag to compare

@iampantherr iampantherr released this 02 Jul 20:32

Automatic background memory extraction (local-first)

Agents no longer have to call zc_remember for a fact to survive the session — closing the hands-free-extraction gap vs AWS AgentCore Memory / Google Memory Bank / Mem0, with extraction running on YOUR local Ollama instead of a vendor cloud.

  • hooks/stop-autoextract.mjs (Stop): at every turn end, distills new conversation content into ≤5 durable facts (decisions, constraints, gotchas, preferences) and writes them through the normal memory API with origin=auto-extract:<session> — epistemology auto-typing, per-claim citations, contradiction detection, and temporal retirement all apply to extracted facts exactly as to hand-written ones.
  • hooks/userprompt-autoextract.mjs (UserPromptSubmit): buffers the user-prompt side per session, so extraction works even where interactive CLI sessions persist only title-stub transcripts.
  • Budgets (ZC_AUTO_EXTRACT_MAX, default 10/session), importance clamp 2–4, secret-pattern filtering, key+value dedup vs existing memory, per-session offset state, ZC_AUTO_EXTRACT=0 kill-switch. /api/v1/remember accepts a whitelisted origin.

Operator console redesign

Five job-oriented tabs replace the four organically-grown ones: Overview (new landing — system status line + 6 clickable stat cards including auto-extracted facts · 24h, plus the live agent feed), Memory (contradiction triage), Skills (full lifecycle in order), Security (HMAC chain, quarantine, admission log), Knowledge (summarizer, both KB graphs, token savings). New /dashboard/overview-strip fragment; headers de-cluttered.

Verified

Live terminal-agent E2E: an agent given a prose payments brief (zero zc_remember calls) had 4 facts auto-extracted — including a typed decision — plus a follow-up message's constraint. Unit: all four epistemic kinds, idempotent re-run (61 ms, no dupes). Browser QA: all 5 tabs + stat-card navigation. Tests 865/868 (3 pre-existing fixtures).

v0.39.1 — PG-parity fix: file content + embeddings mirror to Postgres

Choose a tag to compare

@iampantherr iampantherr released this 02 Jul 18:26

Patch release. In the containerized PG deployment, semantic search and the co-reference graph over project FILE BODIES were empty: zc_index_project wrote content/embeddings only to the agent's local SQLite while zc_search/zc_graph_* read Postgres. indexContent now fire-and-forget mirrors the knowledge content row + embedding vector (content-hash deduped) to PG alongside the existing L0/L1 summary mirror. Found by a live terminal-agent full-feature coverage test; re-verified live post-fix (search 3 results, graph 7 edges, config.js in_degree=3). Tests 865/868 (3 pre-existing fixtures).

v0.39.0 — Tier-3: embedding dedup, L2 disclosure, mutator guard, trajectory export

Choose a tag to compare

@iampantherr iampantherr released this 02 Jul 15:32

Tier-3 of the July-2026 competitive-parity program. All four features verified on LIVE terminal agents before release.

Added

  • Content-addressable embedding dedup + safe model migrationembeddings.content_hash (SQLite mig 36 / PG mig 34). Re-indexing identical content skips the embed call entirely; when ZC_EMBED_MODEL changes, the enrichment cron re-embeds stale rows in bounded batches (40/cycle) and prunes orphans.
  • L2 progressive disclosurezc_file_summary {symbol} returns ONLY that function/class ( [L2 · path · 'symbol' · lines a–b of n] ). Notebook ladder: L0 → L1 → L2 → raw.
  • Mutator learned-helplessness guard — transient infra failures (timeout, ECONNREFUSED, 429/5xx, HMAC-block, Ollama/Docker down, OOM) are tagged at record time and EXCLUDED from the 3-failure mutation trigger. A one-off network blip can no longer rewrite a healthy skill.
  • Trajectory exportGET /api/v1/trajectories/export?project=<hash|path> streams session-grouped JSONL of the HMAC-chained tool-call log with per-event row_hash + outcome evidence.

Fixed during the live E2E

  • getRecentSkillRuns dropped the evidence column, blinding the guard to transient tags (live agent surfaced it; re-verified live: "only 1 failures in last 3 runs" with 2 transient runs excluded).
  • Trajectory export ignored its project query param (returned all projects); now filters by hash or normalized path.

Verified

Live terminal-agent E2E: L2 symbol slices byte-checked, transient/real outcome recount, export filter by hash+path, live reembedStaleModels round-trip. Suite 865/868 (3 pre-existing PG fixtures).

v0.38.0 — Tier-2: per-claim citations, forget recovery window, A2A protocol compat, OTLP audit export

Choose a tag to compare

@iampantherr iampantherr released this 02 Jul 15:03

Four Tier-2 features, all terminal-E2E verified:

  1. Per-claim citationszc_recall_context {cite:true} appends 〔agent · date · origin〕 provenance to every fact (origin: zc_remember, compact:<session>, broadcast:REJECT:<task>), backed by the HMAC-chained tool-call log. Opt-in; default recall stays lean.
  2. Forget recovery windowzc_forget soft-deletes: retired + KB-archived, revivable for 30 days before the tombstone purges. No more irreversible memory loss.
  3. A2A protocol compat (experimental) — public agent card + /a2a/tasks/send|get: external A2A/LangGraph/CrewAI clients hand tasks to an SC-coordinated team; a MERGE completes the task with the artifact. Verified end-to-end with a real terminal agent completing an externally-submitted task.
  4. OTLP audit export — the cron ships the HMAC-chained tool_calls_pg as zero-dependency OTLP/HTTP spans to ZC_OTLP_ENDPOINT, each span carrying audit.row_hash/prev_hash — the only tamper-evident traces in your Grafana/Langfuse stack. Exactly-once via cursor.

Tests 865/868.

v0.37.0 — Tier-1 competitive parity: self-correcting temporal memory, graph retrieval, entities, global Q&A, auto skill discovery, scanner breadth

Choose a tag to compare

@iampantherr iampantherr released this 02 Jul 14:31

Six default-on features closing every functional gap the July-2026 competitive research found (Zep/Graphiti temporal model + graph-BFS retrieval, GraphRAG global search, Letta skill learning, Snyk scan breadth):

  1. Self-correcting memory v2 — temporal fact retirement (valid_to/superseded_by); clear supersessions auto-resolve (stale fact retired + KB-archived, dashboard Undo); triage actions now act on memory (Keep left/right retire the loser; Not a conflict is a permanent operator override); cron prunes flags + purges tombstones.
  2. Graph retrieval channel — 1-hop neighbors as a 4th RRF list; call-sites and linked live memory facts surface associatively.
  3. Semantic entity extraction — budgeted local-Ollama entities/relations in the enrichment cron; survive rebuilds, feed the boost + graph UI.
  4. Community query modezc_search {mode:"global"}: corpus-level answers over pre-computed community summaries + DRIFT-lite follow-ups.
  5. Automated skill discovery — spotter detectors auto-run (6h-gated) and auto-file high-confidence candidates into the operator queue.
  6. Admission scan 8→11 checks — NL exfil-imperative (block), toxic tool flows, trigger shadowing; marketplace upstream pinning (rug-pull drift).

Verified with a live terminal agent: its own writes auto-retired the stale fact (its second recall held only the survivor); its own search surfaced a zero-keyword-overlap call-site via the graph channel; its global query returned a cluster-cited answer. Dashboard Undo/Keep browser-verified. One E2E-found bug fixed (singleton communities). Tests 865/868.

v0.36.0 — Memory-aware edge extraction

Choose a tag to compare

@iampantherr iampantherr released this 02 Jul 05:25

Working-memory facts become first-class knowledge-graph sources. The backlink rebuild (both stores) unions live working_memory rows into the co-reference scan as memory:<agent>:<key> pseudo-sources: a fact mentioning session.ts creates a memory→file edge (the file gains search boost from what memory discusses), and content citing a fact's key links back to it. remember/forget now trigger the debounced rebuild so memory edges stay fresh by default.

Verified with a real terminal agent: a live A2A developer given only ordinary steps produced the memory→file edge in PG by default and observed it through its own zc_graph_backlinks call; its unscripted work-log notes organically raised the file to in_degree=3. Real projects gained 23 + 9 edges on rebuild. Tests 865/868.