Land the uncommitted tree: the cut campaign, the work under it, and the daemon's window
Everything since 93f66d4 has been carried in the working tree. This lands it: - The cut campaign: 208 files retired (benchmarks and the router experiments, klbr-bench, the old LCM store surface, the starter's own root docs), -180,096 lines against +22,583. By its own census: 110,545 -> 62,750 physical lines, -43.2%. - The runtime work whose files were never added: peers, orientations, prompt headers, skills, attempt budget, migrations 010..016, and the Python workspace/peer/orientation surface with the skills that document it. - The daemon half of the windowed transcript: a bounded `subscribe` that opens after the session's context fold (`lcm_frontier`, `drained_through_seq`), `earliest_seq`/`fold_seq` on the replay frames, and a `history` request that pages backwards. The console half, and the frames the two sides share, are in their own commits. One commit rather than three because the halves are not separable: the modified files reference modules that exist only in the new files (klbr-runtime/src/{peer,frontier, prompt_header,skills}.rs, the 010..016 migrations), so any split leaves a commit that does not build. The tree as one unit is verified: `cargo test -p klbr-ipc -p klbr-daemon` green, the store suite green including its new bounds/page test, the console's own suite green. Also ignored now: /target-parent (123,424 build-artifact paths that `git status` was showing) and /.releases (behavior releases published by Release::publish at runtime).
19 unmodified lines20212223242519 unmodified lines__pycache__/
# Python build metadata regenerated by wheel builds (U33 packaging smoke)*.egg-info//target-parent/.releases1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773781# klbr — codebase reference for agents
personal ai agent harness in rust. local llm chat daemon with multi-lane long-term memory, tool calling, discord integration, and a ratatui tui / svelte web client. self-hosted, no corporate product feel. (。-`ω´-)
memory docs:- [docs/README.md](file:///home/mayer/proj/klbr/docs/README.md) — docs map and status taxonomy; read this first when docs conflict.- [docs/long-term-memory-arch.md](file:///home/mayer/proj/klbr/docs/long-term-memory-arch.md) — current long-term memory direction after the 2026-06-29 review.- [docs/memory-implementation-status.md](file:///home/mayer/proj/klbr/docs/memory-implementation-status.md) — current implementation, verified commands, and open bead ids.- [docs/folgezettel-memory.md](file:///home/mayer/proj/klbr/docs/folgezettel-memory.md) — current agent-facing memory tool ontology.- [docs/memory-benches.md](file:///home/mayer/proj/klbr/docs/memory-benches.md) — benchmark protocol and run commands.- [docs/evidence-selection.md](file:///home/mayer/proj/klbr/docs/evidence-selection.md) — supporting evidence packet selection/rerank research report.- [docs/code-intel-tools.md](file:///home/mayer/proj/klbr/docs/code-intel-tools.md) — tree-sitter-first file-local code retrieval/editing tools.
---
## crate layout
```klbr/ klbr-core/ — agent loop, llm/embedding clients, sqlite multi-lane memory store, context assembly, tools klbr-daemon/ — websocket server bridging the agent runtime to client interfaces klbr-ipc/ — shared protocol types (client/server messages) klbr-discord/ — discord gateway bot integration using twilight klbr-bench/ — benchmarking suite evaluating memory retrieval and generation on longmemeval/locomo klbr-web/ — web client in svelte + typescript antigravity-bridge/ — local api proxy translating openai/anthropic calls to gemini with oauth extraction```
---
## klbr-core
### [config.rs](file:///home/mayer/proj/klbr/klbr-core/src/config.rs)
[Config](file:///home/mayer/proj/klbr/klbr-core/src/config.rs#L80) struct handles KDL-based config loading via [Config::load](file:///home/mayer/proj/klbr/klbr-core/src/config.rs#L128) (looks at `KLBR_CONFIG`, `klbr.kdl`, or `~/.config/klbr/config.kdl`). it flattens two major structs:
- [MemoryConfig](file:///home/mayer/proj/klbr/klbr-core/src/config.rs#L10): parameters for multi-lane retrieval, similarity cutoff (`sim_threshold`), time window schedule (`initial_window_days`, `expansion_window_days`), reranking settings (`rerank`, `rerank_top_k`, thresholds), and optional linear/centroid router models (`router_model_path`).- [ModelsConfig](file:///home/mayer/proj/klbr/klbr-core/src/models.rs#L281): endpoints, models, proxies, and dimensions for LLM, embedder, and reranker models.
note: local config files `klbr.kdl` and `bench.kdl` contain endpoints and model configs, including sensitive api keys (secrets). `klbr.kdl` is loaded by default by the main `klbr` runtime, while `bench.kdl` is resolved and loaded by `klbr-bench` for evaluations. `soul` (system personality) defaults to `DEFAULT_SOUL` but is fetched dynamically from the db.
### [models.rs](file:///home/mayer/proj/klbr/klbr-core/src/models.rs)
replaces the old `llm.rs` module. provides:- [LlmClient](file:///home/mayer/proj/klbr/klbr-core/src/models.rs#L337): handles streaming chat completion via [LlmClient::stream](file:///home/mayer/proj/klbr/klbr-core/src/models.rs#L519) (sending [LlmEvent](file:///home/mayer/proj/klbr/klbr-core/src/models.rs#L177)s), simple completions via `complete`, embeddings (individual and batch), and reranking.- [Message](file:///home/mayer/proj/klbr/klbr-core/src/models.rs#L26) struct: openai/anthropic layout supporting assistant thoughts/reasoning and tool call structures.
### [memory.rs](file:///home/mayer/proj/klbr/klbr-core/src/memory.rs)
handles sqlite + sqlite-vec storage. implements a universal `refs` mapping substrate, meaning every turn chunk, note paragraph, or episode summary has a stable ref id. key tables:- `memories`: vector-enabled episodic/semantic memories (backed by `vec_memories` virtual table for cosine distance ANN).- `turns` and `turn_chunks`: full immutable conversation logs and parsed segments.- `refs`, `ref_aliases`, and `edges`: the universal reflink graph mapping links (`derived_from`, `supports`, `supersedes`) between entities.- `markdown_notes` and `markdown_note_chunks`: local markdown-indexed note garden mirror.- `zettel_note` / `fleeting_note`: folgezettel-native agent memory notes.- `ref_metadata`: attaches references to one of 5 lanes defined by the [MemoryLane](file:///home/mayer/proj/klbr/klbr-core/src/memory.rs#L112) enum: `live`, `episodic`, `semantic`, `profile`, or `procedural`.- `promptable_text` and `promptable_text_fts`: full-text lexical indexing.
[MemoryStore](file:///home/mayer/proj/klbr/klbr-core/src/memory.rs#L200) (wraps connections in `Arc<Mutex<Connection>>`) exposes operations for transactionally saving/retrieving refs, setting tags/pins, query-matching, and handling versioning.
### [context.rs](file:///home/mayer/proj/klbr/klbr-core/src/context.rs)
manages the sliding context window. [Context](file:///home/mayer/proj/klbr/klbr-core/src/context.rs#L23) keeps the soul prompt + pinned turns anchored. it can dynamically inject retrieved evidence packets as XML structures (`<memory_packets>`) via [Context::inject_evidence_packets](file:///home/mayer/proj/klbr/klbr-core/src/context.rs#L192) and parse inline citations via `extract_ref_codes`. draining safely cleans old context turns without slicing active tool calls.
### [pipeline.rs](file:///home/mayer/proj/klbr/klbr-core/src/pipeline.rs)
the central entry point facade for memory orchestration. [MemoryPipeline](file:///home/mayer/proj/klbr/klbr-core/src/pipeline.rs#L134) coordinates:- [observe_session](file:///home/mayer/proj/klbr/klbr-core/src/pipeline.rs#L162): ingests new interaction turns, writes them to the database, parses chunks, and syncs reference graphs.- [retrieve_evidence](file:///home/mayer/proj/klbr/klbr-core/src/pipeline.rs#L264): runs lane routing, exact-ref resolution, fts retrieval, dense canonical-ref retrieval through `embedding_items`, graph expansion, folgezettel trail support, packet planning, and optional packet-level reranking.- [assemble_context](file:///home/mayer/proj/klbr/klbr-core/src/pipeline.rs#L350): renders budgeted `<memory_packets>` into the reader context.- `answer` and `complete_stored_context`: completes the final turn context or runs evaluations.
### [evidence.rs](file:///home/mayer/proj/klbr/klbr-core/src/evidence.rs)
coordinates planning and rendering of evidence. [EvidencePlanner](file:///home/mayer/proj/klbr/klbr-core/src/evidence.rs#L78) builds [EvidencePacket](file:///home/mayer/proj/klbr/klbr-core/src/evidence.rs#L58)s with dedicated kinds (`exact_ref`, `turn_window`, `episode_bridge`, `graph_bridge`). it expands seeds into packet bodies, adds zettel parent/sibling/child/source context as `trail_support`, merges source signals, applies duplicate/session caps after packet construction, and formats packets into XML using [render_evidence_packets](file:///home/mayer/proj/klbr/klbr-core/src/evidence.rs#L283).
### [retrieval.rs](file:///home/mayer/proj/klbr/klbr-core/src/retrieval.rs)
provides schedule-based time window schedules ([window_schedule](file:///home/mayer/proj/klbr/klbr-core/src/retrieval.rs#L104)) and cosine similarity filters to query memories within temporal windows, expanding the search window if results are sparse.
### [router.rs](file:///home/mayer/proj/klbr/klbr-core/src/router.rs)
routes queries to the appropriate memory strategy. implements [CentroidRouter](file:///home/mayer/proj/klbr/klbr-core/src/router.rs#L108) and [LinearRouter](file:///home/mayer/proj/klbr/klbr-core/src/router.rs#L256) classifiers to predict [RouteDecision](file:///home/mayer/proj/klbr/klbr-core/src/router.rs#L20)s (`tools`, `memory`, or `abstain`).
### [garden.rs](file:///home/mayer/proj/klbr/klbr-core/src/garden.rs)
implements [MemoryGarden](file:///home/mayer/proj/klbr/klbr-core/src/garden.rs#L12) which writes markdown files with YAML frontmatter representing semantic notes, profiling configs, or procedural scripts, syncing changes bi-directionally back into sqlite.
### [tools/](file:///home/mayer/proj/klbr/klbr-core/src/tools/)
individual tool definitions are split into standalone subfiles. the registry [Subroutines](file:///home/mayer/proj/klbr/klbr-core/src/tools/mod.rs#L82) is configured via [tools/mod.rs](file:///home/mayer/proj/klbr/klbr-core/src/tools/mod.rs):- `memory_tools()` (for reflection): `mk_index`, `mk_search`, `mk_follow`, `mk_recall`, `mk_remember`, `mk_revise`, `mk_link`, `mk_fleeting`. old public memory tools are intentionally not registered.- `all_tools()` (adds shell/files/code): `shell`, `symbol_overview`, `find_symbol`, `find_references`, `find_definition`, `read_symbol`, `replace_symbol_body`, `insert_before_symbol`, `insert_after_symbol`, `read_file`, `read_media`, `write_file`, `local_send`, `wait_and_continue`, `restart_harness`, plus the `mk_*` memory tools.
### [agent.rs](file:///home/mayer/proj/klbr/klbr-core/src/agent.rs)
main continuous event loop. receives chat interrupts, runs the tool execution loop, manages compaction/reflection states, and emits event telemetry.
---
## klbr-ipc
shared types in [klbr-ipc/src/lib.rs](file:///home/mayer/proj/klbr/klbr-ipc/src/lib.rs):- [ClientMsg](file:///home/mayer/proj/klbr/klbr-ipc/src/lib.rs#L6) (TUI/Web client to daemon): `Message`, `ExternalEvent`, `FetchHistory`, `Compact`, `DebugReflectRequest`, `Reset`, `DumpMemories`, `UpdateSoul`, `ResolveRef`, `FetchResolutionEvents`.- [ServerMsg](file:///home/mayer/proj/klbr/klbr-ipc/src/lib.rs#L84) (daemon to client): `Token`, `ScratchToken`, `ThinkToken`, `ReflectStarted`, `CompactionDone`, `Metrics`, `ResolvedRef`, etc.
---
## klbr-daemon
[main.rs](file:///home/mayer/proj/klbr/klbr-daemon/src/main.rs) boots `Config`, `MemoryStore`, the `Agent` loop, optional Discord/External plugins, and the WebSocket server defined in [daemon.rs](file:///home/mayer/proj/klbr/klbr-daemon/src/daemon.rs).
---
## klbr-discord
implements [DiscordRuntime](file:///home/mayer/proj/klbr/klbr-discord/src/lib.rs#L52) using `twilight`. logs into discord, listens to message events/mentions, maps them to `ExternalEvent` interrupts, and runs them through the agent loop.
---
## things not yet implemented
- multiple clients (broadcast works but history paging is per-connection)- external interrupt sources (Bluesky, etc.) — `spawn_source` is ready but unused- auth/encryption for networked transports (WebSocket is local-only by default)
<!-- headroom:rtk-instructions --># RTK (Rust Token Killer) - Token-Optimized Commands
When running shell commands, **always prefix with `rtk`**. This reduces contextusage by 60-90% with zero behavior change. If rtk has no filter for a command,it passes through unchanged — so it is always safe to use.
## Key Commands```bash# Git (59-80% savings)rtk git status rtk git diff rtk git log
# Files & Search (60-75% savings)rtk ls <path> rtk read <file> rtk grep <pattern>rtk find <pattern> rtk diff <file>
# Test (90-99% savings) — shows failures onlyrtk pytest tests/ rtk cargo test rtk test <cmd>
# Build & Lint (80-90% savings) — shows errors onlyrtk tsc rtk lint rtk cargo buildrtk prettier --check rtk mypy rtk ruff check
# Analysis (70-90% savings)rtk err <cmd> rtk log <file> rtk json <file>rtk summary <cmd> rtk deps rtk env
# GitHub (26-87% savings)rtk gh pr view <n> rtk gh run list rtk gh issue list
# Infrastructure (85% savings)rtk docker ps rtk kubectl get rtk docker logs <c>
# Package managers (70-90% savings)rtk pip list rtk pnpm install rtk npm run <script>```
## Rules- In command chains, prefix each segment: `rtk git add . && rtk git commit -m "msg"`- For debugging, use raw command without rtk prefix- `rtk proxy <cmd>` runs command without filtering but tracks usage<!-- /headroom:rtk-instructions -->
<!-- rtk-instructions v2 --># RTK (Rust Token Killer) - Token-Optimized Commands
## Golden Rule
**Always prefix commands with `rtk`**. If RTK has a dedicated filter, it uses it. If not, it passes through unchanged. This means RTK is always safe to use.
**Important**: Even in command chains with `&&`, use `rtk`:```bash# ❌ Wronggit add . && git commit -m "msg" && git push
# ✅ Correctrtk git add . && rtk git commit -m "msg" && rtk git push```
## RTK Commands by Workflow
### Build & Compile (80-90% savings)```bashrtk cargo build # Cargo build outputrtk cargo check # Cargo check outputrtk cargo clippy # Clippy warnings grouped by file (80%)rtk tsc # TypeScript errors grouped by file/code (83%)rtk lint # ESLint/Biome violations grouped (84%)rtk prettier --check # Files needing format only (70%)rtk next build # Next.js build with route metrics (87%)```
### Test (60-99% savings)```bashrtk cargo test # Cargo test failures only (90%)rtk go test # Go test failures only (90%)rtk jest # Jest failures only (99.5%)rtk vitest # Vitest failures only (99.5%)rtk playwright test # Playwright failures only (94%)rtk pytest # Python test failures only (90%)rtk rake test # Ruby test failures only (90%)rtk rspec # RSpec test failures only (60%)rtk test <cmd> # Generic test wrapper - failures only```
### Git (59-80% savings)```bashrtk git status # Compact statusrtk git log # Compact log (works with all git flags)rtk git diff # Compact diff (80%)rtk git show # Compact show (80%)rtk git add # Ultra-compact confirmations (59%)rtk git commit # Ultra-compact confirmations (59%)rtk git push # Ultra-compact confirmationsrtk git pull # Ultra-compact confirmationsrtk git branch # Compact branch listrtk git fetch # Compact fetchrtk git stash # Compact stashrtk git worktree # Compact worktree```
Note: Git passthrough works for ALL subcommands, even those not explicitly listed.
### GitHub (26-87% savings)```bashrtk gh pr view <num> # Compact PR view (87%)rtk gh pr checks # Compact PR checks (79%)rtk gh run list # Compact workflow runs (82%)rtk gh issue list # Compact issue list (80%)rtk gh api # Compact API responses (26%)```
### JavaScript/TypeScript Tooling (70-90% savings)```bashrtk pnpm list # Compact dependency tree (70%)rtk pnpm outdated # Compact outdated packages (80%)rtk pnpm install # Compact install output (90%)rtk npm run <script> # Compact npm script outputrtk npx <cmd> # Compact npx command outputrtk prisma # Prisma without ASCII art (88%)```
### Files & Search (60-75% savings)```bashrtk ls <path> # Tree format, compact (65%)rtk read <file> # Code reading with filtering (60%)rtk grep <pattern> # Search grouped by file (75%). Format flags (-c, -l, -L, -o, -Z) run raw.rtk find <pattern> # Find grouped by directory (70%)```
### Analysis & Debug (70-90% savings)```bashrtk err <cmd> # Filter errors only from any commandrtk log <file> # Deduplicated logs with countsrtk json <file> # JSON structure without valuesrtk deps # Dependency overviewrtk env # Environment variables compactrtk summary <cmd> # Smart summary of command outputrtk diff # Ultra-compact diffs```
### Infrastructure (85% savings)```bashrtk docker ps # Compact container listrtk docker images # Compact image listrtk docker logs <c> # Deduplicated logsrtk kubectl get # Compact resource listrtk kubectl logs # Deduplicated pod logs```
### Network (65-70% savings)```bashrtk curl <url> # Compact HTTP responses (70%)rtk wget <url> # Compact download output (65%)```
### Meta Commands```bashrtk gain # View token savings statisticsrtk gain --history # View command history with savingsrtk discover # Analyze Claude Code sessions for missed RTK usagertk proxy <cmd> # Run command without filtering (for debugging)rtk init # Add RTK instructions to CLAUDE.mdrtk init --global # Add RTK to ~/.claude/CLAUDE.md```
## Token Savings Overview
| Category | Commands | Typical Savings ||----------|----------|-----------------|| Tests | vitest, playwright, cargo test | 90-99% || Build | next, tsc, lint, prettier | 70-87% || Git | status, log, diff, add, commit | 59-80% || GitHub | gh pr, gh run, gh issue | 26-87% || Package Managers | pnpm, npm, npx | 70-90% || Files | ls, read, grep, find | 60-75% || Infrastructure | docker, kubectl | 85% || Network | curl, wget | 65-70% |
Overall average: **60-90% token reduction** on common development operations.<!-- /rtk-instructions -->
<!-- BEGIN BEADS INTEGRATION v:1 profile:minimal hash:7510c1e2 -->## Beads Issue Tracker
This project uses **bd (beads)** for issue tracking. Run `bd prime` to see full workflow context and commands.
### Quick Reference
```bashbd ready # Find available workbd show <id> # View issue detailsbd update <id> --claim # Claim workbd close <id> # Complete work```
### Rules
- Use `bd` for ALL task tracking — do NOT use TodoWrite, TaskCreate, or markdown TODO lists- Run `bd prime` for detailed command reference and session close protocol- Use `bd remember` for persistent knowledge — do NOT use MEMORY.md files
**Architecture in one line:** issues live in a local Dolt DB; sync uses `refs/dolt/data` on your git remote; `.beads/issues.jsonl` is a passive export. See https://github.com/gastownhall/beads/blob/main/docs/SYNC_CONCEPTS.md for details and anti-patterns.
## Session Completion
**When ending a work session**, you MUST complete ALL steps below. Work is NOT complete until `git push` succeeds.
**MANDATORY WORKFLOW:**
1. **File issues for remaining work** - Create issues for anything that needs follow-up2. **Run quality gates** (if code changed) - Tests, linters, builds3. **Update issue status** - Close finished work, update in-progress items4. **PUSH TO REMOTE** - This is MANDATORY: ```bash git pull --rebase git push git status # MUST show "up to date with origin" ```5. **Clean up** - Clear stashes, prune remote branches6. **Verify** - All changes committed AND pushed7. **Hand off** - Provide context for next session
**CRITICAL RULES:**- Work is NOT complete until `git push` succeeds- NEVER stop before pushing - that leaves work stranded locally- NEVER say "ready to push when you are" - YOU must push- If push fails, resolve and retry until it succeeds<!-- END BEADS INTEGRATION -->
<!-- BEGIN BEADS CODEX SETUP: generated by bd setup codex -->## Beads Issue Tracker
Use Beads (`bd`) for durable task tracking in repositories that include it. Use the `beads` skill at `.agents/skills/beads/SKILL.md` (project install) or `~/.agents/skills/beads/SKILL.md` (global install) for Beads workflow guidance, then use the `bd` CLI for issue operations.
### Quick Reference
```bashbd ready # Find available workbd show <id> # View issue detailsbd update <id> --claim # Claim workbd close <id> # Complete workbd prime # Refresh Beads context```
### Rules
- Use `bd` for all task tracking; do not create markdown TODO lists.- Run `bd prime` when Beads context is missing or stale.- Keep persistent project memory in Beads via `bd remember`; do not create ad hoc memory files.<!-- END BEADS CODEX SETUP -->See `AGENTS.md` in this directory: it is the only contributor map for this repository.1 unmodified line2345678910111213141516171819202122232425678983 unmodified lines939495961179798991001011021031041251051061071081095 unmodified lines115116117118139140141142143144145146147148149150119120121122112 unmodified linesExpand all2352362372382712722732742752762772782792802812822832842392402412421 unmodified line2442452462472942952962972982993003013022482492502518 unmodified lines260261262263319320321322323324264265266267112 unmodified linesExpand all38038138238344544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547638438538638727 unmodified lines4154164174185125135145155165175185195205215225235245255265275285295305315325335345354194204214222 unmodified lines42542642742854654754854955055155255355442943043143212 unmodified lines44544644744857557644945045145245358058158258358458558658758858959045445545645745859645946046146260060160260360460560660760846346446546646746846961647047147247347462162262362462562662762862963063163247547647747861 unmodified lines540541542543702703704705706707708709710711712713714715716717718719720721722544545546547548549729730731732733734735736737738550551552553123 unmodified linesExpand all677678679680870871872873874875876877878681682683684135 unmodified linesExpand all820821822823102210231024102510261027102810291030824825826827306 unmodified linesExpand all113411351136113713451346134713481349135013511352135313541355135613571358135913601361136213631138113911401141114213691143137111441145114611471148137513761149137811501151138113821152115311541155115613861387138811571158115911601 unmodified line1162116311641165116611671168116911701171117214031173117411751176117711781179118011811182118311843 unmodified lines11881189119011911422119211931425119414271195142911961197119811993 unmodified lines1203120412051206144112071208120912101 unmodified line121212131214121512161217121812191220122114541222122312241225122616 unmodified lines12431244124512461479148014811482148314841485148614871488124712481249125063 unmodified lines13141315131613171560131813191320132113221 unmodified line132413251326132715701571157215731574157515761577157815791328132913301331226 unmodified linesExpand all155815591560156118141815181618171818181918201821182218231824182518261827182818291830183118321562156315641565148 unmodified linesExpand all1714171517161717198919901991199219931994199519961997199819991718171917201721310 unmodified linesExpand all20322033203420352318203620372038203940 unmodified lines2080208120822083236723682084208520862087208820897 unmodified lines2097209820992100238423852101210221032104210523892390239123922393239423952396239723982399210621072108210917 unmodified lines2127212821292130242524262427242824292430213121322133213426 unmodified lines216121622163216424652466246724682469247024712472247324742475247624772478247924802481248224832484216521662167216810 unmodified lines2179218021812182250325042505250625072508218321842185218656 unmodified lines224322442245224625732574257525762577257825792580258125822583224722482249225084 unmodified lines23352336233723382676267726782679268026812682268326842339234023412342207 unmodified linesExpand all255025512552255329002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542554255525562557111 unmodified linesExpand all266926702671267230743075307630773078307926732674267526762677267830863087308830893090309126792680268126822683268430983099310031013102310326852686268726884 unmodified lines26932694269526963116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146269726982699270010 unmodified lines27112712271327143165316631673168316931702715271627172718207 unmodified linesExpand all2926292729282929338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341029302931293229331 unmodified line29352936293729383420342134223423342434252939294029412942388 unmodified linesExpand all333133323333333438223823382438253826382738283829383038313335333633373338101 unmodified linesExpand all3440344134423443394139423943394439453946394739483949344434453446344713 unmodified lines1 unmodified line# It is not intended for manual editing.version = 4
[[package]]name = "adler2"version = "2.0.1"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa"
[[package]]name = "ahash"version = "0.8.12"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75"dependencies = [ "cfg-if", "const-random", "once_cell", "serde", "version_check", "zerocopy",]
[[package]]name = "aho-corasick"version = "1.1.4"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301"83 unmodified lines "async-stream", "axum", "base64", "chrono", "dirs 5.0.1", "dirs", "futures", "hex", "rand 0.8.5", "regex", "reqwest", "serde", "serde_json", "sha2 0.10.9", "sha2", "tokio", "tracing", "tracing-subscriber", "uuid",5 unmodified linessource = "registry+https://github.com/rust-lang/crates.io-index"checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c"
[[package]]name = "arrayref"version = "0.3.9"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb"
[[package]]name = "arrayvec"version = "0.7.7"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "f02882884d3e1bc524fb12c79f107f6ad0e1cfd498c536ffb494301740995dfe"
[[package]]name = "async-stream"version = "0.3.6"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "0b5a71a6f37880a80d1d7f19efd781e4b5de42c88f0722cc13bcb6cc2cfe8476"112 unmodified linesExpand allsource = "registry+https://github.com/rust-lang/crates.io-index"checksum = "843867be96c8daad0d758b57df9392b6d8d271134fce549de6ce169ff98a92af"
[[package]]name = "blake3"version = "1.8.5"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "0aa83c34e62843d924f905e0f5c866eb1dd6545fc4d719e803d9ba6030371fce"dependencies = [ "arrayref", "arrayvec", "cc", "cfg-if", "constant_time_eq", "cpufeatures 0.3.0",]
[[package]]name = "block-buffer"version = "0.10.4"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71"1 unmodified line "generic-array",]
[[package]]name = "block-buffer"version = "0.12.1"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "d2f6c7dbe95a6ed67ad9f18e57daf93a2f034c524b99fd2b76d18fdfeb6660aa"dependencies = [ "hybrid-array",]
[[package]]name = "brotli-decompressor"version = "5.0.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "874bb8112abecc98cbd6d81ea4fa7e94fb9449648c93cc89aa40c81c24d7de03"8 unmodified linessource = "registry+https://github.com/rust-lang/crates.io-index"checksum = "5d20789868f4b01b2f2caec9f5c4e0213b41e3e5702a50157d699ae31ced2fcb"
[[package]]name = "bytemuck"version = "1.25.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "c8efb64bd706a16a1bdde310ae86b351e4d21550d98d056f22f8a7f7a2183fec"
[[package]]name = "byteorder"version = "1.5.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"112 unmodified linesExpand all "memchr",]
[[package]]name = "const-oid"version = "0.10.2"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "a6ef517f0926dd24a1582492c791b6a4818a4d94e789a334894aa15b0d12f55c"
[[package]]name = "const-random"version = "0.1.18"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "87e00182fe74b066627d63b85fd550ac2998d4b0bd86bfed477a0ae4c7c71359"dependencies = [ "const-random-macro",]
[[package]]name = "const-random-macro"version = "0.1.16"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e"dependencies = [ "getrandom 0.2.17", "once_cell", "tiny-keccak",]
[[package]]name = "constant_time_eq"version = "0.4.2"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "3d52eff69cd5e647efe296129160853a42795992097e8af39800e1060caeea9b"
[[package]]name = "core-foundation"version = "0.9.4"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f"27 unmodified lines "libc",]
[[package]]name = "cpufeatures"version = "0.3.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "8b2a41393f66f16b0823bb79094d54ac5fbd34ab292ddafb9a0456ac9f87d201"dependencies = [ "libc",]
[[package]]name = "crc32fast"version = "1.5.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511"dependencies = [ "cfg-if",]
[[package]]name = "crunchy"version = "0.2.4"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5"
[[package]]name = "crypto-common"version = "0.1.7"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a"2 unmodified lines "typenum",]
[[package]]name = "crypto-common"version = "0.2.2"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "ce6e4c961d6cd6c9a86db418387425e8bdeaf05b3c8bc1411e6dca4c252f1453"dependencies = [ "hybrid-array",]
[[package]]name = "data-encoding"version = "2.11.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "a4ae5f15dda3c708c0ade84bfee31ccab44a3da4f88015ed22f63732abe300c8"12 unmodified linesversion = "0.10.7"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"dependencies = [ "block-buffer 0.10.4", "crypto-common 0.1.7", "block-buffer", "crypto-common",]
[[package]]name = "digest"version = "0.11.3"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "f1dd6dbb5841937940781866fa1281a1ff7bd3bf827091440879f9994983d5c2"dependencies = [ "block-buffer 0.12.1", "const-oid", "crypto-common 0.2.2",]
[[package]]name = "dirs"version = "5.0.1"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225"dependencies = [ "dirs-sys 0.4.1", "dirs-sys",]
[[package]]name = "dirs"version = "6.0.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "c3e8aa94d75141228480295a7d0e7feb620b1a5ad9f12bc40be62411e38cce4e"dependencies = [ "dirs-sys 0.5.0",]
[[package]]name = "dirs-sys"version = "0.4.1"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c"dependencies = [ "libc", "option-ext", "redox_users 0.4.6", "redox_users", "windows-sys 0.48.0",]
[[package]]name = "dirs-sys"version = "0.5.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "e01a3366d27ee9890022452ee61b2b63a67e6f13f58900b651ff5665f0bb1fab"dependencies = [ "libc", "option-ext", "redox_users 0.5.2", "windows-sys 0.61.2",]
[[package]]name = "displaydoc"version = "0.2.5"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0"61 unmodified linessource = "registry+https://github.com/rust-lang/crates.io-index"checksum = "a043dc74da1e37d6afe657061213aa6f425f855399a11d3463c6ecccc4dfda1f"
[[package]]name = "fd-lock"version = "4.0.4"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "0ce92ff622d6dadf7349484f42c93271a0d49b7cc4d466a936405bacbe10aa78"dependencies = [ "cfg-if", "rustix", "windows-sys 0.59.0",]
[[package]]name = "filetime"version = "0.2.29"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "5c287a33c7f0a620c38e641e7f60827713987b3c0f26e8ddc9462cc69cf75759"dependencies = [ "cfg-if", "libc",]
[[package]]name = "find-msvc-tools"version = "0.1.9"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582"
[[package]]name = "flate2"version = "1.1.9"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "843fba2746e448b37e26a819579957415c8cef339bf08564fe8b7ddbd959573c"dependencies = [ "crc32fast", "miniz_oxide",]
[[package]]name = "fnv"version = "1.0.7"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"123 unmodified linesExpand all "version_check",]
[[package]]name = "getopts"version = "0.2.24"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "cfe4fbac503b8d1f88e6676011885f34b7174f46e59956bba534ba83abded4df"dependencies = [ "unicode-width 0.2.2",]
[[package]]name = "getrandom"version = "0.2.17"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0"135 unmodified linesExpand allsource = "registry+https://github.com/rust-lang/crates.io-index"checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9"
[[package]]name = "hybrid-array"version = "0.4.13"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "818356c5132c1fede50f837ca96afbe78ff42413047f4abb886217845e1b6c8c"dependencies = [ "typenum",]
[[package]]name = "hyper"version = "1.9.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "6299f016b246a94207e63da54dbe807655bf9e00044f73ded42c3ac5305fbcca"306 unmodified linesExpand all "winnow",]
[[package]]name = "klbr-bench"version = "0.1.0"dependencies = [ "anyhow", "blake3", "bytemuck", "chrono", "clap", "klbr-core", "rand 0.8.5", "rusqlite", "serde", "serde_json", "tempfile", "tokio", "unicode-segmentation",]
[[package]]name = "klbr-core"version = "0.1.0"dependencies = [ "anyhow", "async-stream", "base64", "chrono", "dirs 5.0.1", "dirs", "futures", "hex", "kdl", "klbr-runtime", "pulldown-cmark", "regex", "reqwest", "rusqlite", "serde", "serde_json", "sha2 0.10.9", "sqlite-vec", "sha2", "tempfile", "thiserror 1.0.69", "tokio", "tracing", "tracing-subscriber", "tree-sitter-language-pack", "tree-sitter-tags", "uuid",]
[[package]]1 unmodified lineversion = "0.1.0"dependencies = [ "anyhow", "chrono", "clap", "dirs", "futures", "klbr-core", "klbr-discord", "klbr-ipc", "klbr-runtime", "rusqlite", "serde", "serde_json", "tempfile", "tokio", "tokio-tungstenite", "tracing", "tracing-subscriber", "url", "uuid",]
[[package]]3 unmodified lines "anyhow", "base64", "chrono", "emojis", "klbr-core", "regex", "reqwest", "rusqlite", "rustls", "serde", "serde_json", "tempfile", "tokio", "tracing", "twilight-gateway", "twilight-http",3 unmodified lines[[package]]name = "klbr-ipc"version = "0.1.0"dependencies = [ "klbr-core", "serde", "serde_json",]
1 unmodified linename = "klbr-runtime"version = "0.1.0"dependencies = [ "anyhow", "base64", "chrono", "rusqlite", "rustix", "serde", "serde_json", "sha2 0.10.9", "sha2", "tempfile", "tokio", "uuid",]16 unmodified linessource = "registry+https://github.com/rust-lang/crates.io-index"checksum = "48f5d2a454e16a5ea0f4ced81bd44e4cfc7bd3a507b61887c99fd3538b28e4af"
[[package]]name = "libloading"version = "0.9.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "754ca22de805bb5744484a5b151a9e1a8e837d5dc232c2d7d8c2e3492edc8b60"dependencies = [ "cfg-if", "windows-link",]
[[package]]name = "libredox"version = "0.1.14"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "1744e39d1d6a9948f4f388969627434e31128196de472883b39f148769bfe30a"63 unmodified linessource = "registry+https://github.com/rust-lang/crates.io-index"checksum = "5f98efec8807c63c752b5bd61f862c165c115b0a35685bdcfd9238c7aeb592b7"dependencies = [ "cfg-if", "unicode-width 0.1.14", "unicode-width",]
[[package]]name = "mime"1 unmodified linesource = "registry+https://github.com/rust-lang/crates.io-index"checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a"
[[package]]name = "miniz_oxide"version = "0.8.9"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316"dependencies = [ "adler2", "simd-adler32",]
[[package]]name = "mio"version = "1.2.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "50b7e5b27aa02a74bac8c3f23f448f8d87ff11f92d3aac1a6ed369ee08cc56c1"226 unmodified linesExpand all "unicode-ident",]
[[package]]name = "pulldown-cmark"version = "0.11.3"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "679341d22c78c6c649893cbd6c3278dcbe9fc4faa62fea3a9296ae2b50c14625"dependencies = [ "bitflags", "getopts", "memchr", "pulldown-cmark-escape", "unicase",]
[[package]]name = "pulldown-cmark-escape"version = "0.11.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "007d8adb5ddab6f8e3f491ac63566a7d5002cc7ed73901f72057943fa71ae1ae"
[[package]]name = "quinn"version = "0.11.9"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "b9e20a958963c291dc322d98411f541009df2ced7b5a4f2bd52337638cfccf20"148 unmodified linesExpand all "thiserror 1.0.69",]
[[package]]name = "redox_users"version = "0.5.2"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "a4e608c6638b9c18977b00b475ac1f28d14e84b27d8d42f70e0bf1e3dec127ac"dependencies = [ "getrandom 0.2.17", "libredox", "thiserror 2.0.18",]
[[package]]name = "regex"version = "1.12.3"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "e10754a14b9137dd7b1e3e5b0493cc9171fdd105e0ab477f51b72e7f3ac0e276"310 unmodified linesExpand allversion = "1.0.149"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86"dependencies = [ "indexmap", "itoa", "memchr", "serde", "serde_core",40 unmodified linessource = "registry+https://github.com/rust-lang/crates.io-index"checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba"dependencies = [ "cfg-if", "cpufeatures 0.2.17", "digest 0.10.7", "cpufeatures", "digest",]
[[package]]name = "sha1_smol"7 unmodified linessource = "registry+https://github.com/rust-lang/crates.io-index"checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283"dependencies = [ "cfg-if", "cpufeatures 0.2.17", "digest 0.10.7", "cpufeatures", "digest",]
[[package]]name = "sha2"version = "0.11.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "446ba717509524cb3f22f17ecc096f10f4822d76ab5c0b9822c5f9c284e825f4"dependencies = [ "cfg-if", "cpufeatures 0.3.0", "digest 0.11.3",]
[[package]]name = "sharded-slab"version = "0.1.7"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6"17 unmodified lines "libc",]
[[package]]name = "simd-adler32"version = "0.3.9"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "703d5c7ef118737c72f1af64ad2f6f8c5e1921f818cdcb97b8fe6fc69bf66214"
[[package]]name = "simdutf8"version = "0.1.5"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e"26 unmodified lines "windows-sys 0.61.2",]
[[package]]name = "socks"version = "0.3.4"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "f0c3dbbd9ae980613c6dd8e28a9407b50509d3803b57624d5dfe8315218cd58b"dependencies = [ "byteorder", "libc", "winapi",]
[[package]]name = "sqlite-vec"version = "0.1.9"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "d0ba424237a9a5db2f6071f193319e2b6a32f7f3961debb2fbbfe67067abce3f"dependencies = [ "cc",]
[[package]]name = "sqlite-wasm-rs"version = "0.5.2"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "2f4206ed3a67690b9c29b77d728f6acc3ce78f16bf846d83c94f76400320181b"10 unmodified linessource = "registry+https://github.com/rust-lang/crates.io-index"checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596"
[[package]]name = "streaming-iterator"version = "0.1.9"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "2b2231b7c3057d5e4ad0156fb3dc807d900806020c5ffa3ee6ff2c8c76fb8520"
[[package]]name = "strsim"version = "0.11.1"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"56 unmodified lines "libc",]
[[package]]name = "tar"version = "0.4.46"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "3f6221d9a6003c78398e3b239969f352578258df48c8eb051caadae0015bc840"dependencies = [ "filetime", "libc", "xattr",]
[[package]]name = "tempfile"version = "3.27.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd"84 unmodified lines "time-core",]
[[package]]name = "tiny-keccak"version = "2.0.2"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237"dependencies = [ "crunchy",]
[[package]]name = "tinystr"version = "0.8.3"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "c8323304221c2a851516f22236c5722a72eaa19749016521d6dff0824447d96d"207 unmodified linesExpand all "tracing-log",]
[[package]]name = "tree-sitter"version = "0.26.9"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "4dab76d0b724ba557954125188cf0633a1ca43199ced82d95c7b9c32cc3de1f3"dependencies = [ "cc", "regex", "regex-syntax", "serde_json", "streaming-iterator", "tree-sitter-language",]
[[package]]name = "tree-sitter-language"version = "0.1.7"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "009994f150cc0cd50ff54917d5bc8bffe8cad10ca10d81c34da2ec421ae61782"
[[package]]name = "tree-sitter-language-pack"version = "1.11.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "612b125cb189b3d80ff9cf69b6c56552c23df584acc9368058a1a9cc8669a05c"dependencies = [ "ahash", "cc", "dirs 6.0.0", "fd-lock", "libloading", "memchr", "serde", "serde_json", "sha2 0.11.0", "tar", "thiserror 2.0.18", "tree-sitter", "ureq", "zstd",]
[[package]]name = "tree-sitter-tags"version = "0.26.9"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "ba419171ace99ea326903dffc603ce627d6936719812d50cc95ba4377abd9cd1"dependencies = [ "memchr", "regex", "streaming-iterator", "thiserror 2.0.18", "tree-sitter",]
[[package]]name = "try-lock"version = "0.2.5"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b"111 unmodified linesExpand allsource = "registry+https://github.com/rust-lang/crates.io-index"checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20"
[[package]]name = "unicase"version = "2.9.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "dbc4bc3a9f746d862c45cb89d705aa10f187bb96c76001afab07a0d35ce60142"
[[package]]name = "unicode-ident"version = "1.0.24"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
[[package]]name = "unicode-segmentation"version = "1.13.2"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "9629274872b2bfaf8d66f5f15725007f635594914870f65218920345aa11aa8c"
[[package]]name = "unicode-width"version = "0.1.14"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af"
[[package]]name = "unicode-width"version = "0.2.2"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254"
[[package]]name = "unicode-xid"version = "0.2.6"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853"4 unmodified linessource = "registry+https://github.com/rust-lang/crates.io-index"checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1"
[[package]]name = "ureq"version = "3.3.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "dea7109cdcd5864d4eeb1b58a1648dc9bf520360d7af16ec26d0a9354bafcfc0"dependencies = [ "base64", "flate2", "log", "percent-encoding", "rustls", "rustls-pki-types", "rustls-platform-verifier", "socks", "ureq-proto", "utf8-zero", "webpki-roots",]
[[package]]name = "ureq-proto"version = "0.6.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "e994ba84b0bd1b1b0cf92878b7ef898a5c1760108fe7b6010327e274917a808c"dependencies = [ "base64", "http", "httparse", "log",]
[[package]]name = "url"version = "2.5.8"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed"10 unmodified linessource = "registry+https://github.com/rust-lang/crates.io-index"checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9"
[[package]]name = "utf8-zero"version = "0.8.1"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "b8c0a043c9540bae7c578c88f91dda8bd82e59ae27c21baca69c8b191aaf5a6e"
[[package]]name = "utf8_iter"version = "1.0.4"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be"207 unmodified linesExpand all "rustls-pki-types",]
[[package]]name = "webpki-roots"version = "1.0.8"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "bf85cb06032201fa7c6f829d7db5a7e5aa45bcc0655327713065f6f0576731bf"dependencies = [ "rustls-pki-types",]
[[package]]name = "winapi"version = "0.3.9"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"dependencies = [ "winapi-i686-pc-windows-gnu", "winapi-x86_64-pc-windows-gnu",]
[[package]]name = "winapi-i686-pc-windows-gnu"version = "0.4.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
[[package]]name = "winapi-util"version = "0.1.11"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22"1 unmodified line "windows-sys 0.61.2",]
[[package]]name = "winapi-x86_64-pc-windows-gnu"version = "0.4.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
[[package]]name = "windows-core"version = "0.62.2"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb"388 unmodified linesExpand allsource = "registry+https://github.com/rust-lang/crates.io-index"checksum = "1ffae5123b2d3fc086436f8834ae3ab053a283cfac8fe0a0b8eaae044768a4c4"
[[package]]name = "xattr"version = "1.6.1"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "32e45ad4206f6d2479085147f02bc2ef834ac85886624a23575ae137c8aa8156"dependencies = [ "libc", "rustix",]
[[package]]name = "yoke"version = "0.8.2"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "abe8c5fda708d9ca3df187cae8bfb9ceda00dd96231bed36e445a1a48e66f9ca"101 unmodified linesExpand allsource = "registry+https://github.com/rust-lang/crates.io-index"checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa"
[[package]]name = "zstd"version = "0.13.3"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "e91ee311a569c327171651566e07972200e76fcfe2242a4fa446149a3881c08a"dependencies = [ "zstd-safe",]
[[package]]name = "zstd-safe"version = "7.2.4"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "8f49c4d5f0abb602a93fb8736af2a4f4dd9512e36f7f570d66e65ff867ed3b9d"13 unmodified lines1234556784 unmodified lines131415161819171819202122232724252627282930313632333435363742433839404741424344454647514849[workspace]members = [ "klbr-core", "klbr-runtime", "klbr-bench", "klbr-daemon", "klbr-discord", "klbr-ipc", "antigravity-bridge",4 unmodified linesanyhow = "1"async-stream = "0.3"axum = "0.8"base64 = "0.22"blake3 = "1.8.5"bytemuck = "1.25.0"chrono = "0.4.44"clap = { version = "4", features = ["derive"] }dirs = "5"emojis = "0.8.1"futures = "0.3"hex = "0.4"kdl = "6.5"pulldown-cmark = "0.11"rand = "0.8"regex = "1"reqwest = "0.13"rusqlite = { version = "0.39", features = ["bundled"] }rustls = { version = "0.23", features = ["ring"] }serde = { version = "1", features = ["derive"] }serde_json = "1"sha2 = "0.10"sqlite-vec = "0.1.0"tempfile = "3"thiserror = "1"tokio = { version = "1", features = ["full"] }tokio-tungstenite = "0.23"tracing = "0.1.44"tracing-subscriber = "0.3.23"tree-sitter-language-pack = "1.11.0"tree-sitter-tags = "0.26.9"twilight-gateway = "0.17.1"twilight-http = "0.17.1"twilight-model = "0.17.1"unicode-segmentation = "1"uuid = { version = "1", features = ["v4"] }
[profile.dev]# Dev/test builds are relinked constantly, so optimisation costs more than it saves. Tests are not# performance measurements; anything that needs real optimisation uses the# release profile. Line-table debuginfo keeps backtraces usable without paying# for full debug symbols at every link.opt-level = 2opt-level = 0debug = 1123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153# dogfood runtime
This checkout now has one normal execution path: the Rust runtime/store owns state andmechanisms, a persistent Python workbench supplies policy and self-hosted code work, and thebrowser uses only the v2 lane protocol. The legacy agent/memory/tool loop is not started.Configured Discord ingress is normalized into the same durable runtime admission path. Thetransport owns no inbox database or model loop, and outbound sends remain explicit host effects.
## source checkout
The commands below are argv commands and work from Nushell. They do not depend on Bash.
```textbun run --cwd klbr-web buildcargo run -p klbr-daemon --bin klbr-daemon -- initcargo run -p klbr-daemon --bin klbr-daemon -- doctorcargo run -p klbr-daemon --bin klbr-daemon -- serve```
Open `http://127.0.0.1:8765/`. `serve` is also the default subcommand. The service publishesthe editable `behavior/` tree as an immutable content-addressed release before opening asession. It refuses a non-loopback bind. Browser WebSockets also reject non-loopback origins;native local clients do not need an `Origin` header.
Runtime paths are explicit:
| variable | default ||---|---|| `KLBR_WORKSPACE` | current directory || `KLBR_DATA_DIR` | the platform data directory plus `klbr` || `KLBR_PYTHON` | `python3` || `KLBR_WORKER_RUNNER` | `<workspace>/python/klbr-runtime/src/klbr_runtime/__main__.py` || `KLBR_BEHAVIOR_DIR` | `<workspace>/behavior` || `KLBR_SKILLS_DIR` | `<workspace>/skills` || `KLBR_WEB_DIR` | `<workspace>/klbr-web/dist` || `KLBR_BIND_ADDR` | `127.0.0.1:8765` || `KLBR_REMOTE_PLACEMENT` | unset; local workbench |
The state directory contains `runtime.sqlite`, `releases/`, `drafts/`, `artifacts/`, and`skills/`.The old `agent.db` is neither opened nor seeded by this path.
## Nix later
Dogfooding is source-first for now. The repository's existing NCI/crate2nix-oriented flake isleft intact; a relocatable package and service are deferred until the runtime path is settled.
## working on this checkout from a cell
```pythonprint(await search("TODO", "klbr-runtime/src", max_results=20))note = await open_file("docs/note.md")await note.replace("old", "new") # one occurrence, or an errorcheck = await run(("cargo", "check", "-p", "klbr-runtime"), timeout=120)print(check.exit_code, check.stderr.decode(errors="replace"))```
`open_file`, `ls`, `search`, `delete` and `run` are bound in every cell and acton the session's workspace, resolved once per kernel generation(`klbr.workspace.PRELUDE_NAMES` lists them; `ws = await workspace.current()` is the object form).`ls` lists one level and `ls(path, recursive=True, match="*.rs")` walks with a name glob, and `search` reports`truncated` rather than letting a capped result read as a complete one.
Paths are root-bound and symlink escapes are rejected. `workspace.run` is a typed host RPC,not a shell call inside Python. The Rust host owns the process group, output cap, timeout, andcancellation cleanup, so kernel replacement cannot strand a build process.
## skills
Instruction bodies live in `skills/<id>/SKILL.md`. The first non-empty line is `# <id>` and thedirectory name must equal it; that title is the only schema, so the id is a handle and the bodyis the trail to the state the id names. Nothing is stored beside the body, because a descriptionwould become a second, staler definition of it.
```pythonimport klbr.skills as skills
dir(skills) # the ids this kernel generation can importhelp(skills.workspace) # one bodyskills.refused # ids found and not offered, with the reasonskills.revision # content identity of the whole offered setskills.roots # where those ids were read from```
Builtin ids are read from `KLBR_SKILLS_DIR` (default `<workspace>/skills`), so they ship with thecheckout. Managed ids are read from `<data>/skills`, which `init` and `serve` create; a skill theagent writes there survives a checkout move. Both are one namespace, and an id defined in both isrefused instead of silently winning - `klbr doctor` prints the ids and the refusals, and thedaemon logs the index at startup.
The host validates the roots and hands the bodies to the worker as a spawn payload, so a workernever reads a skills directory itself: one reader, one validator, and a set that cannot changeunder a running turn. The kernel generation's `kernel.reset` record carries the revision itloaded, so the durable log says which instruction set a turn could have read rather than what thedirectories happen to hold now.
The model sees the ids in its contract message and imports a body by id. A maintenance turnadditionally loads `maintenance` by default. Because the set is fixed at spawn, a skill writtenduring a turn is offered on the next generation rather than mid-turn.
## operator path
These commands use the same v2 socket as the UI and do not need a successful model or policycallback:
```textklbr statusklbr status defaultklbr reset defaultklbr compact defaultklbr drain defaultklbr stop defaultklbr activate default 3 /absolute/path/to/releases/<sha256>```
`reset` states explicitly that Python heap state was not restored. `drain` waits for acceptedhost work before stopping. Behavior activation is an epoch compare-and-swap against a verifiedcontent-addressed release.
## model seam
`klbr-core` still reads the existing KDL model configuration. Defaults target OpenAI-compatiblelocal endpoints at `http://localhost:8001/v1`, `:8002/v1`, and `:8003/v1`. `doctor` validatesthe configuration and worker import path; a normal send is the live model/provider check.Provider keys belong in the process environment or the configured KDL file, not source control.
Prompt caching is a route property, declared per route and never guessed:
```kdlllm { url "https://api.example/v1" model "m" cache_profile "openai_prompt_cache_key" // or openai_prompt_cache_retention | openai_prompt_cache_options cache_affinity "klbr:work" // stable key: the same one for related requests, never per request cache_retention "24h" // only on a profile that accepts it: in_memory | 24h, or 30m on an options route}```
`cache_profile` is opt-in because `/chat/completions` is shared by many incompatibleOpenAI-style routes, and an unknown route must not receive a field it may reject. A profiledeclares which cache fields that route accepts; `cache_retention` values are checked against itat parse time, so a mismatch is a configuration error here rather than a parameter error fromthe route after the request was paid for. Route `extra_options` cannot smuggle a cache field:`cache_prompt`, `cache_control`, `prompt_cache_key`, `prompt_cache_retention` and`prompt_cache_options` are removed from route options and only re-added by the declared profile.
Cache reads and writes are reported separately and are never inferred: a provider that reportsnothing leaves the measurement absent, which is a different statement from a provider thatreported zero. OpenAI's `prompt_tokens_details.cached_tokens` and `cache_write_tokens`, andDeepSeek's `prompt_cache_hit_tokens` / `prompt_cache_miss_tokens`, are all read; a route with anautomatic cache (DeepSeek) needs no profile at all.
Rebuild the source UI after frontend changes with `bun run --cwd klbr-web build`.123456789101112131415161718192021222324252627282930313233343536373839404142# klbr
klbr is one continuous agent runtime. Rust owns durable state, scheduling, provider/effectexecution, limits, recovery, and Python worker supervision. Python owns normal skills andbehavior policy. The browser uses one versioned lane protocol.
## active path
- `klbr-daemon`: service composition, scheduling, HTTP/WebSocket server, operator CLI- `klbr-runtime`: SQLite runtime store, kernels, effects, releases, remote execution- `klbr-core`: provider adapter, request/context contracts, configuration- `klbr-ipc`: v2 client/server wire values and cursor logic- `klbr-discord`: Twilight transport adapter feeding the runtime ingress boundary- `python/klbr-runtime`: persistent workbench, hooks, and the `klbr` Python SDK- `klbr-web`: bundled Svelte lane client
There is no legacy runtime mode, legacy memory database, Rust model-tool registry, benchmarkcrate, or v1 client protocol in the normal source tree.
## run from source
These argv commands work from Nushell:
```textbun run --cwd klbr-web buildcargo run -p klbr-daemon --bin klbr-daemon -- doctorcargo run -p klbr-daemon --bin klbr-daemon -- serve```
Open `http://127.0.0.1:8765/`. Set `KLBR_CONFIG` for the primary model and`KLBR_DATA_DIR` for durable state. See [DOGFOOD.md](DOGFOOD.md) for paths and operatorcommands. Source dogfooding is the current path; Nix packaging is deferred.
## invariants
- runtime Store is the only normal history/work owner- admitted input commits before acknowledgement or execution- one Python tool is model-visible; host effects remain typed- output is diagnostic unless an explicit delivery operation confirms speech- operator stop/reset/drain/activation never depend on model cooperation- model, kernel, context, behavior, and service generations are distinct- failed or unknown effects remain durable facts; they are never rewritten as success