toolspace › registry › Muninn zeitgeist_delta
Muninn zeitgeist_delta
Semantic deduplication for zeitgeist drafts. Compares each topic section of a candidate zeitgeist memory against the N most-recent stored zeitgeists using Gemini embeddings (via Cloudflare AI Gateway) and emits a delta-only compressed version.
Install
install-manifest install https://raw.githubusercontent.com/oaustegard/muninn-utilities/main/manifests/zeitgeist-delta/muninn-zeitgeist-delta.v0.4.json
manifest JSON · source · docs · issues · homepage
Security
| Kill switch | manual Manual procedure: — |
|---|---|
| Smoke contract | shell timeout 5s |
Scopes
-
compute.llm-inferenceread, write cf-api-token (coarse; full AI Gateway access)Each check_delta call sends the candidate draft and N prior memory sections to Gemini's text-embedding model, consuming tokens against the user's Cloudflare AI Gateway quota. Cost is variable in candidate length × N.
-
memory.trackingread turso-libsql-token (coarse; full DB access)Reads the N most-recent `zeitgeist`-tagged memories from Turso to compare against. Read-only; the tool returns a delta but does not write it back — the caller decides whether to store.
-
net.outboundread, write gateway.ai.cloudflare.com, *.turso.ioTalks to gateway.ai.cloudflare.com (which forwards to Gemini's embedding endpoint) and to the configured Turso libSQL host for memory reads.
Data boundary
Reads
compute.llm-inferencesensitivity: lowmemory.trackingsensitivity: medium
Transmits
-
gateway.ai.cloudflare.com unknown
model-inference (embeddings; proxied through Cloudflare AI Gateway to Gemini)
input.draftfetched_zeitgeist_section_text
Actions
-
check_delta read idempotent
Compare a candidate zeitgeist draft against recent stored zeitgeists and return per-section duplicate flags plus a compressed delta-only version. ·
compute.llm-inferencememory.trackingnet.outbound- Goal
- Identify which sections of a candidate zeitgeist memory duplicate prior entries, and emit a compressed delta.
- Inputs
draft (req markdown), n_recent (int, default 5), threshold (float, default 0.85)- Outputs
{report: [{section, verdict, similarity, ref_id?}], delta_text: string, total_sections: int, redundant_count: int}- Errors
tracking_unconfigured, gateway_unreachable, embed_failed, draft_empty- Example
check_delta draft='# Topic A\n...' n_recent=5 threshold=0.85
Environment
CF_ACCOUNT_ID |
Cloudflare account ID hosting the AI Gateway used to proxy Gemini embedding calls. The tool routes through Cloudflare for caching, observability, and rate-limit pooling. required · secret: no |
|---|---|
CF_GATEWAY_ID |
Cloudflare AI Gateway slug — the gateway name chosen when it was created in the Cloudflare dashboard. required · secret: no |
CF_API_TOKEN |
Cloudflare API token scoped to AI Gateway access. Treat as a secret. Required. required · secret: yes |
TURSO_TOKEN |
Turso libSQL auth token for the Muninn memory database. The tool reads recent zeitgeist memories to compare against. Required. required · secret: yes · obtain |
TURSO_URL |
Hostname of the Muninn memory libSQL database, e.g. 'mydb-username.turso.io'. required · secret: no |
Verify & cost
| Install fee | 0¢ |
|---|---|
| Monthly fee | 0¢ |
| Usage model | external |
Runtime
runtime: python-module · install method: preinstalled · entrypoint: python -m muninn_utils.zeitgeist_delta
Reads recent `zeitgeist`-tagged memories from Turso, splits the candidate draft into topic sections by markdown header, embeds each section + each prior memory's sections via Gemini's text-embedding model (proxied through Cloudflare AI Gateway), and computes cosine similarity. Sections above a duplicate threshold are flagged as redundant; the rest pass through into a compressed delta-only version that can be stored without bloating the memory store. Like `verify_patch` (LLM-as-judge with Anthropic + optional Turso writes) but with embeddings instead of completions and a different cloud surface (Cloudflare AI Gateway → Gemini, not Anthropic). Issue #5 calls this out as the test for whether two LLM-as-judge tools share a manifest pattern.
Tags: embeddingsdeduplicationmemoryllmgeminicloudflare-ai-gateway
License: MIT
Last fetched 2026-06-18T09:09:17Z (live)