@openez-graph/cli 0.9.0 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -69,19 +69,24 @@ openez setup codex # wire up Codex
69
69
  openez setup opencode # wire up OpenCode
70
70
  openez setup windsurf # wire up Windsurf / Devin Desktop
71
71
  openez setup devin # wire up Devin CLI
72
+ openez config get [key] # show embedding config (all if no key)
73
+ openez config set <key> <value> # set embedding config value
74
+ openez config list # list all DB-stored config overrides
72
75
  ```
73
76
 
77
+ Valid config keys: `embedding.provider`, `embedding.openai_api_key`, `embedding.openai_base_url`, `embedding.openai_model`, `embedding.ollama_base_url`, `embedding.ollama_model`. API keys are encrypted at rest with AES-256-GCM.
78
+
74
79
  ## MCP Tools
75
80
 
76
- | Tool | Description |
77
- |------|-------------|
78
- | `list_workspaces` | List all registered workspaces |
79
- | `code_query` | Hybrid FTS/vector search + graph expansion over indexed code and docs |
80
- | `code_context` | Get budgeted symbol context with callers, callees, and related files |
81
- | `graph_neighbors` | Traverse graph edges from a node or label |
82
- | `memory_recall` | Recall active memory entries and technical decisions |
83
- | `memory_write` | Write a memory entry (notes, decisions, patterns) |
84
- | `index_workspace` | Trigger indexing for a workspace |
81
+ | Tool | Description |
82
+ | ----------------- | --------------------------------------------------------------------- |
83
+ | `list_workspaces` | List all registered workspaces |
84
+ | `code_query` | Hybrid FTS/vector search + graph expansion over indexed code and docs |
85
+ | `code_context` | Get budgeted symbol context with callers, callees, and related files |
86
+ | `graph_neighbors` | Traverse graph edges from a node or label |
87
+ | `memory_recall` | Recall active memory entries and technical decisions |
88
+ | `memory_write` | Write a memory entry (notes, decisions, patterns) |
89
+ | `index_workspace` | Trigger indexing for a workspace |
85
90
 
86
91
  `memory_query` is accepted as a deprecated compatibility alias for `code_query`, but is not advertised to new clients.
87
92
 
@@ -96,29 +101,36 @@ openez setup devin # wire up Devin CLI
96
101
 
97
102
  ## Supported languages
98
103
 
99
- | Language | Indexing depth |
100
- |----------|---------------|
104
+ | Language | Indexing depth |
105
+ | ----------------------- | ------------------------------------------------------ |
101
106
  | TypeScript / JavaScript | Richest — `ts-morph` symbol extraction, imports, calls |
102
- | Python | Basic top-level symbol extraction |
103
- | Go | Basic top-level symbol extraction |
104
- | Rust | Basic top-level symbol extraction |
105
- | YAML / JSON / TOML | Structure-aware chunking |
106
- | Markdown | Section-oriented chunking |
107
+ | Python | Basic top-level symbol extraction |
108
+ | Go | Basic top-level symbol extraction |
109
+ | Rust | Basic top-level symbol extraction |
110
+ | YAML / JSON / TOML | Structure-aware chunking |
111
+ | Markdown | Section-oriented chunking |
107
112
 
108
113
  ## Retrieval quality
109
114
 
110
- Benchmarked on 18 real queries against the openez codebase itself (118 files, 640 chunks):
115
+ Benchmarked on 23 queries (17 keyword + 6 semantic) against the openez codebase (128 files, 810 chunks):
116
+
117
+ | Metric | FTS only | FTS + Embedding (bge-m3) |
118
+ | ---------------- | -------: | -----------------------: |
119
+ | Recall@5 | 91.30% | 95.65% |
120
+ | Keyword queries | 100.00% | 100.00% |
121
+ | Semantic queries | 66.67% | 83.33% |
122
+ | Avg latency | 5 ms | 249 ms |
123
+
124
+ **FTS-only is the default** — 100% recall on keyword queries, 50x faster. **Embedding adds semantic search with +16.67% semantic recall and no keyword regression** via full RRF fusion (FTS weight 2x, vector weight 1x).
111
125
 
112
- | Metric | Value |
113
- |--------|-------|
114
- | Recall@5 | 94.44% |
115
- | MRR | 0.6565 |
116
- | Avg latency | 38.68 ms |
117
- | p50 latency | 18.65 ms |
118
- | Duplicate path rate | 0% |
119
- | Quality gate | PASS |
126
+ ```bash
127
+ # Enable Ollama embeddings (bge-m3 recommended for code search)
128
+ openez config set embedding.provider ollama
129
+ openez config set embedding.ollama_model bge-m3
130
+ openez reindex .
131
+ ```
120
132
 
121
- FTS5 with BM25 ranking handles 94% of queries in under 40ms — no embeddings needed for the default path. Embeddings (OpenAI/Ollama) are optional semantic fallback for queries without direct keyword overlap.
133
+ See [BENCHMARK.md](https://github.com/asta-nguyen/openez-graph/blob/main/BENCHMARK.md) for full analysis.
122
134
 
123
135
  ## Web dashboard
124
136
 
@@ -127,6 +139,7 @@ openez serve --web
127
139
  ```
128
140
 
129
141
  Opens a full web dashboard at `http://localhost:17881` with:
142
+
130
143
  - Workspace overview (documents, chunks, nodes, edges)
131
144
  - Graph explorer with force-directed layout
132
145
  - Query interface for memory retrieval
@@ -0,0 +1,135 @@
1
+ # Changelog
2
+
3
+ All notable changes to OpenEZ Graph are documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [0.10.0] - 2026-08-05
9
+
10
+ ### Fixed
11
+
12
+ - MCP stdio corruption: retrieval diagnostics now write to `stderr` instead of `stdout`, preserving JSON-RPC framing for `code_query` calls
13
+ - `lint-staged` downgraded from v17 to v16.4.0 for Node.js 20 compatibility (v17 requires Node >=22.22.1)
14
+ - Master key race condition: atomic exclusive file creation (`O_CREAT|O_EXCL`) prevents concurrent processes from generating different keys
15
+ - Master key malformed-file handling: invalid key content now throws an explicit error instead of silently overwriting the file
16
+ - Master key file permissions: existing key files are now `chmod`-ed to `0o600` on read if permissions are too open
17
+ - Embedding dedup: chunks skipped by `input_hash` match now receive a copied embedding row so they appear in vector search results
18
+ - Embedding dedup legacy cleanup: `ROW_NUMBER()` ordering (newest, non-null `input_hash` first) replaces `MIN(id)` to preserve the most useful embedding
19
+ - Composite index `(provider, model, input_hash)` added to speed up embedding dedup lookups on large workspaces
20
+ - `vectorSearch` now wraps `getEmbeddingProvider()` in the same `try` block so initialization failures fall back to FTS instead of aborting `codeQuery`
21
+ - Web API `PUT /api/settings/embedding` validates `embedding.provider` against `none`, `openai`, `ollama` (returns 400 for invalid values)
22
+ - Web API clearing a setting (empty value) now deletes the DB override instead of skipping it, restoring env/default fallback
23
+ - CLI `config get <key>` resolves the effective DB-plus-environment value and prints `not set` when absent
24
+ - CLI sensitive-key masking uses `isSensitiveKey()` consistently across all `config` commands
25
+ - Settings UI syncs external config to form state via `useEffect` instead of setState-during-render; form updates after save refetch
26
+ - Settings UI resets the "Saved!" indicator when any field is edited after a successful save
27
+ - RRF `identity()` function computed once per entry instead of twice (get + set)
28
+ - Benchmark test isolated from the user's real registry DB via temp `AI_MEMORY_REGISTRY_DB_PATH`
29
+ - Benchmark stats workspace path resolved from registry instead of `cwd` to match `codeQuery`
30
+ - `withRetry` dead code replaced with a type-safe unreachable return
31
+
32
+ ### Changed
33
+
34
+ - README storage section updated from three to four local artifacts (added `master.key`)
35
+
36
+ ## [0.9.0] - 2026-08-02
37
+
38
+ ### Added
39
+
40
+ - MCP server version and Git build identity in the protocol handshake
41
+ - Token budgets for `code_query`, `code_context`, `graph_neighbors`, and `memory_recall`, with compact graph/context responses
42
+ - Live `code_query` token telemetry on the dashboard and benchmark page
43
+ - MCP contract tests for response budgets, multi-workspace attribution, graph context, and startup indexing
44
+
45
+ ### Changed
46
+
47
+ - Multi-workspace retrieval now applies one global serialized-response budget and attributes delivered tokens exactly across workspaces
48
+ - CLI npm package now exposes the bundled entry point and installs only `better-sqlite3` at runtime
49
+
50
+ ### Fixed
51
+
52
+ - Empty workspaces no longer re-index on every MCP server restart
53
+ - Very small token budgets are rejected instead of returning an oversized response
54
+ - Token-savings telemetry now uses selected full-file tokens minus the actual serialized response size
55
+
56
+ ## [0.8.0] - 2026-08-02
57
+
58
+ ### Added
59
+
60
+ - Memory management UI at `/memories` with list, search, detail view, and create dialog
61
+ - Memory API routes: `GET /api/memories` (list + search), `GET /api/memories/:id`, `POST /api/memories`, `DELETE /api/memories/:id`
62
+ - Recent memories section on the dashboard now populated from the workspace database
63
+ - Memories navigation link in the sidebar with prefetch on hover
64
+ - `resolveActiveWorkspace` helper to select the first workspace with a valid root path for memory operations
65
+ - Integration tests for hybrid retrieval ranking and registry operations
66
+
67
+ ### Fixed
68
+
69
+ - Changelog page stuck loading — `findChangelogPath` now walks up from `serverDir` and `cwd` to locate `CHANGELOG.md` in the monorepo root
70
+ - Memory endpoints no longer fail when the first registered workspace has a stale root path
71
+
72
+ ## [0.7.0] - 2026-08-01
73
+
74
+ ### Added
75
+
76
+ - Web dashboard changelog page (`/changelog`) with structured rendering of release notes from `CHANGELOG.md`
77
+ - API endpoint `GET /api/changelog` serving the repo changelog
78
+ - Changelog link in CLI README for npm package page
79
+ - Release workflow instructions in `AGENTS.md` for cross-agent support (Codex, OpenCode, Claude Code)
80
+ - Agent skill at `.agents/skills/release-cli/SKILL.md` for automated release workflow
81
+ - `memory_recall` MCP tool for retrieving active technical decisions and learned notes written by `memory_write`
82
+
83
+ ### Changed
84
+
85
+ - Renamed the public `memory_query` MCP tool to `code_query`; the old name remains a deprecated, hidden compatibility alias
86
+ - Code retrieval now fuses both FTS and vector results, and `code_context` supports result/token budgets
87
+
88
+ ## [0.6.1] - 2026-08-01
89
+
90
+ ### Added
91
+
92
+ - Syntax-highlighted context blocks in the web Query page (`prism-react-renderer`), with per-source file metadata (path, line range, score) and line numbers
93
+ - Markdown context blocks now render fenced code blocks with their own language highlighting (e.g. ` ```bash ` gets real bash highlighting)
94
+
95
+ ### Fixed
96
+
97
+ - Dark boxes obscuring markdown inline code in context blocks (stripped token `backgroundColor` from the nightOwl theme)
98
+
99
+ ## [0.6.0] - 2026-08-01
100
+
101
+ Remediation release — index/graph correctness, data protection, and web flow fixes.
102
+
103
+ ### Security
104
+
105
+ - Web API and CLI dashboard now bind to loopback (`127.0.0.1`) by default (FIX-01)
106
+
107
+ ### Fixed
108
+
109
+ - Full reindex no longer wipes memories, query logs, and run history — only rebuildable index artifacts are reset (FIX-02)
110
+ - Incremental indexing preserves inbound graph edges (calls/imports) to symbols in changed files; symbol and file node identities are now stable across re-parses (FIX-03)
111
+ - Graph edges are deduplicated by `(from, to, type)` with a unique SQLite index and `ON CONFLICT DO NOTHING` inserts (FIX-04)
112
+ - Web index endpoint (`POST /api/workspaces/:id/index`) now runs real indexing synchronously instead of returning a stub (FIX-05)
113
+ - Incremental indexing skips reading files whose `mtimeMs`/`sizeBytes` are unchanged; content-hash verification catches stat-only changes (FIX-06)
114
+ - Regenerated stale route tree referencing the deleted `/jobs` route; removed the CI lint no-op (`turbo run lint` with zero lint tasks) (FIX-08)
115
+
116
+ ### Removed
117
+
118
+ - Jobs page and related API endpoints
119
+
120
+ ## [0.5.1] - 2026-07-31
121
+
122
+ ### Fixed
123
+
124
+ - Blazing-fast indexing for large codebases (batch transactions, optimized write mode)
125
+ - Error handling and validation for import path extraction
126
+ - CLI npm packaging
127
+
128
+ [0.10.0]: https://github.com/asta-nguyen/openez-graph/compare/fbcad4f...HEAD
129
+ [0.9.1]: https://github.com/asta-nguyen/openez-graph/compare/fbcad4f...HEAD
130
+ [0.9.0]: https://github.com/asta-nguyen/openez-graph/compare/fbcad4f...HEAD
131
+ [0.8.0]: https://github.com/asta-nguyen/openez-graph/compare/a7ce4df...849060b
132
+ [0.7.0]: https://github.com/asta-nguyen/openez-graph/compare/9b7cc78...a7ce4df
133
+ [0.6.1]: https://github.com/asta-nguyen/openez-graph/compare/405f7e8...9b7cc78
134
+ [0.6.0]: https://github.com/asta-nguyen/openez-graph/compare/5ff0f5c...405f7e8
135
+ [0.5.1]: https://github.com/asta-nguyen/openez-graph/releases/tag/v0.5.1