Skip to content

Commit 54bea31

Browse files
committed
docs: update for v0.57.0 (artifact-aware file search) and v0.58.0 (semantic session search)
- AGENTS.md: bump version to v0.58.8, add v0.57.0/v0.58.0 feature sections - SESSIONS.md: document session_search tool, two-tier pipeline, vector index maintenance - TELEGRAM.md: /now archives sessions instead of deleting, add session recall docs - DEVELOPMENT.md: add generate-changelog.sh usage instructions - CLI.md/WEBUI.md/SANDBOXING.md: KODE_* -> ODEK_*, kode.json -> odek.json fixes - CHEATSHEET.md: add session_search to tool table
1 parent 6570438 commit 54bea31

8 files changed

Lines changed: 63 additions & 7 deletions

File tree

AGENTS.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ It provides context about the project's architecture, conventions, and how to up
1212
- **Binary:** `odek` — single static binary, ~12 MB, instant startup.
1313
- **Config:** Five-layer priority: `~/.odek/secrets.env``~/.odek/config.json``./odek.json``ODEK_*` env vars → CLI flags.
1414
- **Benchmark:** AIEB v2.0 — 80.3% (highest published agent score on the Autonomous Intelligence Engineering Benchmark).
15-
- **Version:** v0.56.2 — see latest tag at https://github.com/BackendStack21/odek/releases
15+
- **Version:** v0.58.8 — see latest tag at https://github.com/BackendStack21/odek/releases
1616

1717
## Source Layout
1818

@@ -71,6 +71,8 @@ ReAct cycle: observe → think → act → repeat.
7171
- **Interaction modes** — engaging (narrated), enhance (persistent), verbose (raw), off.
7272
- Max 300 iterations by default.
7373
- **Post-response async processing** (v0.56.0) — skill learning and episode extraction run in background goroutines, eliminating the 2-5 second hang after every `odek run`.
74+
- **Artifact-aware file search** (v0.57.0) — `search_files` and `multi_grep` skip build/artifact directories (`node_modules`, `vendor`, `.git`, `__pycache__`, `.venv`, etc.) automatically, reducing noise and speeding scans.
75+
- **Semantic session search** (v0.58.0) — the `session_search` tool uses go-vector RandomProjections + k-NN for semantic similarity search through session content. Finds relevant past conversations even when keywords don't match. Features a two-tier pipeline: vector index (fast, ~1ms) → deepSearch fallback (exhaustive, slower).
7476

7577
### Tools
7678
All built-in tools with zero subprocess forks: batch_read, batch_patch, parallel_shell, http_batch, math_eval, diff, count_lines, multi_grep, json_query, tree, checksum, sort, head_tail, base64, tr, word_count, transcribe, browser, read_file, write_file, search_files, patch, shell, delegate_tasks, session_search.

docs/CHEATSHEET.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,7 @@ odek mcp # stdio transport
277277
|------|-------------|
278278
| `delegate_tasks` | Spawn sub-agent OS processes |
279279
| `memory` | Persistent fact CRUD with cosine-merge |
280+
| `session_search` | Browse, search, and recall past sessions (semantic vector search) |
280281
| `clarify` | Ask the user for clarification |
281282
| `send_message` | Send text/photo/document to Telegram |
282283
| `skill_load/list/save/patch/delete` | Skill CRUD |

docs/CLI.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ Config sources from lowest to highest priority:
342342
```
343343
1. ~/.odek/config.json ← Global defaults
344344
2. ./odek.json ← Project overrides
345-
3. KODE_* env vars ← Runtime overrides
345+
3. ODEK_* env vars ← Runtime overrides
346346
4. CLI flags ← Explicit invocation (highest)
347347
```
348348

docs/DEVELOPMENT.md

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,34 @@
11
# Development
22

3+
## Generate Changelog
4+
5+
CHANGELOG.md is auto-generated from conventional git commits. **Do not edit manually** — edits will be overwritten.
6+
7+
```bash
8+
# Generate changelog for the next patch release (stdout)
9+
./generate-changelog.sh --bump patch
10+
11+
# Prepend to CHANGELOG.md
12+
./generate-changelog.sh --bump patch --prepend
13+
14+
# Release notes for gh release create
15+
./generate-changelog.sh --bump patch --notes > /tmp/notes.md
16+
gh release create v0.59.0 --notes-file /tmp/notes.md
17+
18+
# Explicit range
19+
./generate-changelog.sh --from v0.57.0 --to v0.58.0
20+
```
21+
22+
Commit prefixes and their section mapping:
23+
- `feat|feature:` → ### Features
24+
- `fix|bugfix:` → ### Bug Fixes
25+
- `perf:` → ### Performance
26+
- `refactor:` → ### Refactoring
27+
- `docs:` → ### Documentation
28+
- `test|tests:` → ### Testing
29+
- `chore|build|ci:` → ### Infrastructure
30+
- (unmatched) → ### Other Changes
31+
332
## Prerequisites
433

534
- Go 1.24+
@@ -94,7 +123,7 @@ cmd/odek/
94123
wsapprover.go WSApprover — WebSocket-based approval for serve mode
95124
subagent_test.go Tests (flag parsing, JSON stdout, exit codes, tool schema)
96125
subagent_contract_test.go Contract tests (flag parsing, stdout protocol, exit codes)
97-
subagent_e2e_test.go E2E tests (16 — KODE_E2E=true, real subprocess spawning)
126+
subagent_e2e_test.go E2E tests (16 — ODEK_E2E=true, real subprocess spawning)
98127
ui/
99128
index.html Single-page web UI (~770 LOC, vanilla JS + CSS)
100129
docs/ Documentation

docs/SANDBOXING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ odek run --sandbox "protoc --version"
2323

2424
## Config reference
2525

26-
All sandbox settings are available in `~/.odek/config.json`, `./kode.json`, `ODEK_*` env vars, and CLI flags, following the same [priority chain](CONFIG.md).
26+
All sandbox settings are available in `~/.odek/config.json`, `./odek.json`, `ODEK_*` env vars, and CLI flags, following the same [priority chain](CONFIG.md).
2727

2828
### Config file fields
2929

docs/SESSIONS.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,28 @@ odek session cleanup 0
7777
# → Cleaned up 12 session(s) older than 0 days.
7878
```
7979

80+
**Vector index maintenance:** `odek session cleanup` also removes stale entries from the vector index — orphaned vectors no longer accumulate in `vectors.gob`. This was a bug fix in v0.58.2: the primary cleanup path previously bypassed `Vec.Remove()`, leaving orphaned vectors that silently accumulated.
81+
82+
## Session Search Tool
83+
84+
The `session_search` tool (available inside the agent loop, not as a CLI command) lets the agent browse, search, and recall past sessions by semantic content. This is the primary mechanism for revisiting historical conversations.
85+
86+
| Action | Description |
87+
|--------|-------------|
88+
| `list` | Recent sessions (metadata only: ID, task, turns, timestamps, model) |
89+
| `search` | Semantic keyword search through full message content using vector similarity |
90+
| `get` | Full session by ID — returns ALL messages including tool calls and results |
91+
| `find` | Find sessions by task/title |
92+
93+
**How search works — two-tier pipeline:**
94+
95+
1. **Vector index** (fast path) — go-vector RandomProjections embed session summaries into 64-dimensional vectors. Cosine similarity >0.7 returns results in ~1ms. Zero LLM calls.
96+
2. **DeepSearch** (fallback) — when vector results are insufficient (<2 distinct token matches), falls back to exhaustive text search through session files on disk. Requires 2+ distinct token matches to qualify.
97+
98+
**IMPORTANT:** After `search` returns matching session IDs, use `get` (not `search`) to read the actual conversation content. `get` returns the full `session_messages` array with every user and assistant message.
99+
100+
From inside the Telegram bot, session recall is seamless: the current user message is persisted to the session store *before* the agent loop runs, so `session_search` can find the current conversation's data during the same turn.
101+
80102
## Programmatic API
81103

82104
```go

docs/TELEGRAM.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ The handler uses `sync.Map` for `TelegramApprover` instances, keyed by `chatID`.
197197
|---|---|
198198
| `/start` | Welcome message and bot introduction |
199199
| `/help` | Show all available commands with descriptions |
200-
| `/new` | Reset the current conversation (clear context) |
200+
| `/new` | Archive the current session and start a fresh conversation. Archived sessions are timestamped (`tg-<chatID>-<YYYYMMDD>-<HHMMSS>`) and remain visible via `odek session list` |
201201
| `/stats` | Show session statistics (turn count, model used, etc.) |
202202
| `/stop` | Cancel a running agent task |
203203
| `/mode` | Show current agent modes (interaction_mode, sandbox, skills) |
@@ -229,7 +229,9 @@ The `SessionManager` manages per-chat Telegram agent conversations, backed by th
229229
2. Sessions are persisted to `~/.odek/sessions/tg-<chatID>.json`
230230
3. An in-memory cache (`map[int64]*ChatSession`) avoids redundant disk reads
231231
4. Session TTL (default 24h) controls inactivity timeout
232-
5. Active sessions survive bot restarts — on reconnect, the session is loaded from disk
232+
5. **Session recall** — the user message is saved to the session store *before* the agent loop runs, enabling `session_search` to find the current conversation's data during the same turn
233+
6. Active sessions survive bot restarts — on reconnect, the session is loaded from disk
234+
7. **/now archives** — using `/new` archives the current session with a timestamped ID (`tg-<chatID>-<YYYYMMDD>-<HHMMSS>`) before starting fresh. Archived sessions remain on disk and are visible via `odek session list`.
233235

234236
### Key Methods
235237

docs/WEBUI.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,5 +171,5 @@ Example event sequence:
171171
## Tips
172172

173173
- **Security sandbox**: `odek serve --addr localhost:8080` restricts to localhost. Use a reverse proxy (Caddy, nginx) for remote access.
174-
- **Config inheritance**: `odek serve` reads the same config chain (`~/.odek/config.json``./kode.json` → env vars) as `odek run`. Set your model, API key, and sandbox settings there.
174+
- **Config inheritance**: `odek serve` reads the same config chain (`~/.odek/config.json``./odek.json` → env vars) as `odek run`. Set your model, API key, and sandbox settings there.
175175
- **Session discovery**: reference any saved session via `@sess:ID` in your prompt to give the agent full context from previous conversations.

0 commit comments

Comments
 (0)