Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add echoVic/blade-code --skill durable-transcript-and-event-projectiongit clone --depth 1 https://github.com/echoVic/blade-codeWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/echovic/blade-code/durable-transcript-and-event-projection)<a href="https://agentmods.dev/skills/echovic/blade-code/durable-transcript-and-event-projection"><img src="https://agentmods.dev/badge/skills/echovic/blade-code/durable-transcript-and-event-projection.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00159 | $0.02810 |
| Opus 5 | $0.00079 | $0.01405 |
| Sonnet 5 | $0.00032 | $0.00562 |
| Haiku 4.5 | $0.00016 | $0.00281 |
Grade A, and why
knowledge-session-state-and-context-durable-transcript-and-event-projection scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
This is a copy
84% identical to knowledge-session-state-and-context — 138 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 121 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Module Structure
该组件是 Session 跨运行时、服务和界面的共享事实层:JSONL 保存 committed event,SessionEventLog 在落盘后扇出,SQLite 和 UI reducer 仅构建可丢弃读模型。
Directory Layout
packages/cli/src/context/events/:单写者事件日志、delta 与 turn 生命周期 reducerpackages/cli/src/context/storage/JSONLStore.ts:crash-safe 逐行存储、seq 分配和 validated 操作packages/cli/src/context/storage/PersistentStore.ts:领域事件构造与恢复事务packages/cli/src/context/storage/sqlite/:Bun/Node 双运行时读侧索引及 FTSpackages/cli/src/context/types.ts:committed SessionEvent 联合类型packages/cli/src/server/bus.ts:committed 与 ephemeral 的进程内扇出通道packages/cli/src/store/slices/sessionSlice.ts:TUI conversation read modelpackages/cli/web/src/store/session/handlers/eventHandlers.ts:Web SSE 事件折叠与 delta 缓冲
Key Entry Points
SessionEventLog.for()inpackages/cli/src/context/events/SessionEventLog.ts:获取项目路径与 Session 复合键对应的写入/扇出实例JSONLStore.appendValidatedBatch()inpackages/cli/src/context/storage/JSONLStore.ts:在同一文件队列内校验最新状态并提交有序批次projectConversation()inpackages/cli/src/context/events/reducers/conversationReducer.ts:从 committed history 构建 UI 消息syncAll()inpackages/cli/src/context/storage/sqlite/projection.ts:拉取 JSONL 并同步可重建索引
API Surface
SessionEventLog
for(sessionId, projectPath):返回进程内共享的复合身份日志实例commit(event)/commitBatch(events):先持久化和分配 seq,再按提交顺序扇出commitValidated(builder)/commitValidatedBatch(builder):在最新 transcript 的同一文件临界区执行单胜者状态转换emitDelta(delta):只向订阅者与 Bus 发布无 seq 的流式增量replay(subscriber, fromSeq):从 JSONL 重放seq >= fromSeq的客户端可见 committed eventsubscribe(subscriber, options)/release():管理实时订阅与有界实例缓存
JSONLStore
append()/appendBatch():修复 crash tail 后,以文件尾 seq 为基准追加并 fsyncappendValidated*():读取、校验和追加共享同一个 per-file 进程内队列createExclusive():以wx创建完整 transcript,供新会话与 fork 防碰撞readAll()/readFromSeq():使用统一解析器读取完整历史或断点区间deleteValidated():在删除前对最新 committed 状态执行谓词
Read Models
applyCommittedEvent()/applyDelta():将 durable truth 与临时 overlay 折叠为 TUI 消息materializeSessionEvents():在所有读取投影前应用 append-only rewind markersyncSession()/syncAll():以 mtime/size 门控重物化 SQLite session、part 和 FTS 行searchProjectionText():仅产生 FTS 候选,最终 substring 语义由搜索服务裁决
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 4d ago First seen · 121 lines · 159 tokens per session scan A 76e48f53feab
knowledge-session-state-and-context-durable-transcript-and-event-projection is a skill published in the GitHub repository echoVic/blade-code (178 stars, last pushed yesterday), licensed MIT. It adds 159 tokens to every session and 2,810 once invoked, about $0.0008 per session on Opus 5. A static security scan graded it A with 0 findings. It is 84% identical to knowledge-session-state-and-context, differing in 138 lines, and is treated as a copy.
Other skills, from other repositories
algorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright…
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external agents through well-designed tools. Use when building MCP servers to integrate external APIs or agents, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).
slack-gif-creator
Toolkit for creating animated GIFs optimized for Slack, with validators for size constraints and composable animation primitives. This skill applies when users request animated GIFs or emoji animations for Slack from descriptions like "make me a GIF for Slack of X doing Y".
canvas-design
Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.
self-improvement
A process for recording useful lessons from unexpected failures, user corrections, missing abilities, and reusable project patterns.
travel-planner
Creates comprehensive travel itineraries with destination analysis, budget planning, transportation, accommodation, and local insights. Use when planning trips, organizing travel schedules, or seeking destination recommendations.