Skip to content

Commit 8995e92

Browse files
committed
Merge remote-tracking branch 'origin/main' into robschilderr/feat/sync-include-cwd-prefixes
* origin/main: feat(usage): show session context and token breakdown (kenn-io#982) (kenn-io#989) perf(push): ignore volatile stat fields for session candidacy (kenn-io#1014) feat(settings): support worktree layout mappings (kenn-io#582) (kenn-io#993) fix(config): apply port from config.toml to Config struct (kenn-io#1005) feat(parser): add Qoder session support (kenn-io#1013) fix(usage): wire agent exclusions through usage filters (kenn-io#972) fix(frontend): preserve calendar range picker selections (kenn-io#1016) feat: semantic search with run-grouped embeddings and conversation-unit citations (kenn-io#999) feat(parser): add ZCode SQLite sync support (kenn-io#1003) (kenn-io#1012) fix(sync): drop unchanged opencode-family container sessions (kenn-io#1015) fix(sync): skip local git discovery for foreign-machine sessions (kenn-io#1008) fix(activity): count subagent sessions in activity report cost (kenn-io#1006) feat(i18n): add Korean (ko) locale support (kenn-io#1002)
2 parents eef4cd7 + a2bd0ed commit 8995e92

291 files changed

Lines changed: 35532 additions & 936 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

AGENTS.md

Lines changed: 29 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,8 @@ CLI (agentsview) -> Config -> DB (SQLite/FTS5)
120120
- `internal/parser/` - Per-agent session file parsers and content extraction.
121121
- `internal/server/` - HTTP handlers, SSE, middleware, search, and export.
122122
- `internal/sync/` - Sync engine, file watcher, discovery, and hashing.
123+
- `internal/vector/` - Semantic search: embeddings encoder, `vectors.db`
124+
mirror/index, build orchestration, and semantic/hybrid search.
123125
- `internal/timeutil/` - Time parsing utilities.
124126
- `internal/web/` - Embedded frontend copied from `frontend/dist/` at build
125127
time.
@@ -128,30 +130,33 @@ CLI (agentsview) -> Config -> DB (SQLite/FTS5)
128130

129131
## Key Files
130132

131-
| Path | Purpose |
132-
| -------------------------------- | --------------------------------------------- |
133-
| `cmd/agentsview/main.go` | CLI entry point, server startup, file watcher |
134-
| `cmd/agentsview/pg.go` | `pg` command group: push, status, serve |
135-
| `internal/server/server.go` | HTTP router and handler setup |
136-
| `internal/server/sessions.go` | Session list/detail API handlers |
137-
| `internal/server/search.go` | Full-text search API |
138-
| `internal/server/events.go` | SSE event streaming |
139-
| `internal/db/db.go` | Database open, migrations, schema |
140-
| `internal/db/sessions.go` | Session CRUD queries |
141-
| `internal/db/search.go` | FTS5 search queries |
142-
| `internal/sync/engine.go` | Sync orchestration |
143-
| `internal/parser/types.go` | Agent registry with one `AgentDef` per agent |
144-
| `internal/parser/*.go` | Per-agent session parsers |
145-
| `internal/postgres/connect.go` | Connection setup, SSL checks, DSN helpers |
146-
| `internal/postgres/schema.go` | PG DDL and schema management |
147-
| `internal/postgres/push.go` | Push logic and fingerprinting |
148-
| `internal/postgres/sync.go` | Push sync lifecycle |
149-
| `internal/postgres/store.go` | PostgreSQL read-only store |
150-
| `internal/postgres/sessions.go` | PG session queries on the read side |
151-
| `internal/postgres/messages.go` | PG message queries and ILIKE search |
152-
| `internal/postgres/analytics.go` | PG analytics queries |
153-
| `internal/postgres/time.go` | Timestamp conversion helpers |
154-
| `internal/config/config.go` | Config loading and flag registration |
133+
| Path | Purpose |
134+
| -------------------------------- | --------------------------------------------------------- |
135+
| `cmd/agentsview/main.go` | CLI entry point, server startup, file watcher |
136+
| `cmd/agentsview/pg.go` | `pg` command group: push, status, serve |
137+
| `cmd/agentsview/embeddings.go` | `embeddings` command group: build, list, activate, retire |
138+
| `internal/server/server.go` | HTTP router and handler setup |
139+
| `internal/server/sessions.go` | Session list/detail API handlers |
140+
| `internal/server/search.go` | Full-text search API |
141+
| `internal/server/events.go` | SSE event streaming |
142+
| `internal/db/db.go` | Database open, migrations, schema |
143+
| `internal/db/sessions.go` | Session CRUD queries |
144+
| `internal/db/search.go` | FTS5 search queries |
145+
| `internal/vector/index.go` | `vectors.db` schema, generations, staleness gate |
146+
| `internal/vector/search.go` | Semantic + hybrid search, RRF merge |
147+
| `internal/sync/engine.go` | Sync orchestration |
148+
| `internal/parser/types.go` | Agent registry with one `AgentDef` per agent |
149+
| `internal/parser/*.go` | Per-agent session parsers |
150+
| `internal/postgres/connect.go` | Connection setup, SSL checks, DSN helpers |
151+
| `internal/postgres/schema.go` | PG DDL and schema management |
152+
| `internal/postgres/push.go` | Push logic and fingerprinting |
153+
| `internal/postgres/sync.go` | Push sync lifecycle |
154+
| `internal/postgres/store.go` | PostgreSQL read-only store |
155+
| `internal/postgres/sessions.go` | PG session queries on the read side |
156+
| `internal/postgres/messages.go` | PG message queries and ILIKE search |
157+
| `internal/postgres/analytics.go` | PG analytics queries |
158+
| `internal/postgres/time.go` | Timestamp conversion helpers |
159+
| `internal/config/config.go` | Config loading and flag registration |
155160

156161
## Development
157162

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,11 @@ agentsview stats --include-git-outcomes
277277
| ![Search](https://agentsview.io/assets/generated/screenshots/search-results.png) | ![Heatmap](https://agentsview.io/assets/generated/screenshots/heatmap.png) |
278278

279279
- **Full-text search** across all message content (FTS5)
280+
- **Semantic search** (opt-in) -- index session content with any
281+
OpenAI-compatible embeddings endpoint and search by meaning with
282+
`agentsview session search --semantic` or `--hybrid`; every content-search
283+
match cites the conversation unit it came from
284+
([docs](https://agentsview.io/semantic-search/))
280285
- **Token usage and cost dashboard** -- per-session and per-model cost
281286
breakdowns, daily spend charts, all in the web UI
282287
- **Analytics dashboard** -- activity heatmaps, tool usage, velocity metrics,

cmd/agentsview/archive_query_backend.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ func (b localArchiveQueryBackend) SessionUsage(
264264
engine.Close()
265265
}
266266

267-
u, err := b.database.GetSessionUsage(ctx, resolvedID)
267+
u, err := b.database.GetSessionUsage(ctx, resolvedID, true)
268268
if err != nil {
269269
return nil, tokenUseExitErr,
270270
fmt.Errorf("querying session usage: %w", err)
@@ -283,7 +283,7 @@ func (b localArchiveQueryBackend) SessionUsage(
283283
"warning: pricing refresh failed: %v\n", refErr)
284284
} else if refreshed {
285285
if u2, e := b.database.GetSessionUsage(
286-
ctx, resolvedID,
286+
ctx, resolvedID, true,
287287
); e == nil && u2 != nil {
288288
u = u2
289289
}

cmd/agentsview/cli.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,12 +115,14 @@ func newRootCommand() *cobra.Command {
115115
root.AddCommand(newActivityCommand())
116116
root.AddCommand(newPGCommand())
117117
root.AddCommand(newDuckDBCommand())
118+
root.AddCommand(newEmbeddingsCommand())
118119
root.AddCommand(newSessionCommand())
119120
root.AddCommand(newMCPCommand())
120121
root.AddCommand(newStatsCommand())
121122
root.AddCommand(newParseDiffCommand())
122123
root.AddCommand(newClassifierCommand())
123124
root.AddCommand(newSecretsCommand())
125+
root.AddCommand(newSkillsCommand())
124126
root.AddCommand(newDoctorCommand())
125127
root.AddCommand(newVersionCommand())
126128
root.AddCommand(newOpenAPICommand())

cmd/agentsview/doctor.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,12 +202,17 @@ func inspectDoctorDB(path string) doctorDBInspection {
202202
return insp
203203
}
204204

205+
// doctorReadOnlyDSN builds a read-only sqlite3 DSN. The file: scheme is
206+
// required for mattn/go-sqlite3 to honor mode=ro (a bare path silently opens
207+
// read-write), and the path is percent-encoded so `%`, `?`, or `#` in a real
208+
// path cannot be misparsed as URI syntax.
205209
func doctorReadOnlyDSN(path string) string {
206210
params := url.Values{}
207211
params.Set("mode", "ro")
208212
params.Set("_busy_timeout", "5000")
209213
params.Set("_foreign_keys", "ON")
210-
return path + "?" + params.Encode()
214+
escaped := (&url.URL{Path: path}).EscapedPath()
215+
return "file:" + escaped + "?" + params.Encode()
211216
}
212217

213218
func listDoctorResyncTempFiles(dbPath string) []string {

0 commit comments

Comments
 (0)