@ushiradineth/veil 0.1.3 → 0.1.5

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.
Files changed (2) hide show
  1. package/README.md +74 -218
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,100 +1,54 @@
1
1
  # veil
2
2
 
3
- > High-performance MCP server and CLI for repository indexing and code search
3
+ Veil is a fast MCP server and CLI for local code retrieval. It indexes a repo and exposes focused tools for files, symbols, search, lookup, web research, URL fetch, and git context.
4
4
 
5
- Veil is a blazingly fast code indexing and search engine designed for AI agents and developer tools. It indexes code repositories and exposes retrieval tools over the Model Context Protocol (MCP), enabling sub-millisecond queries with minimal memory overhead.
5
+ ## 2-minute setup
6
6
 
7
- ## Features
8
-
9
- - **Ultra-fast queries** - Sub-millisecond warm query latency (0.03-0.07ms p95)
10
- - **Smart indexing** - Extracts files, symbols, and semantic code chunks
11
- - **Flexible search** - File paths, symbol names, and full-text code search
12
- - **Memory efficient** - <100MB for typical workloads with intelligent caching
13
- - **Incremental updates** - Fast refresh with git-aware change detection
14
- - **Battle-tested** - Comprehensive correctness and performance test coverage
15
- - **Observable** - Built-in diagnostics and performance profiling
16
- - **MCP native** - First-class Model Context Protocol support
17
-
18
- ## Performance
19
-
20
- Veil includes a reproducible benchmark suite for public comparisons across:
21
-
22
- - Veil MCP index tools
23
- - Shell tool workflows commonly used by non-indexed agent loops
24
- - Serena via `uvx` (from `https://github.com/oraios/serena`) plus optional custom adapter configs
25
-
26
- See [BENCHMARKS.md](BENCHMARKS.md) for methodology, fairness rules, and commands to generate fresh benchmark artifacts.
27
-
28
- **Memory usage:** <100MB for typical workloads
29
- **Test coverage:** Run `bun test ./src/test.ts` for current suite status
30
-
31
- ## Installation
32
-
33
- **Requirements:**
34
- - Bun runtime (or Node.js 18+)
35
- - Git (optional, for git-aware indexing)
36
-
37
- **Clone and install:**
38
-
39
- ```bash
40
- git clone https://github.com/ushiradineth/veil.git
41
- cd veil
42
- bun install
43
- ```
44
-
45
- ## MCP Setup
46
-
47
- No-clone setup (recommended): run Veil directly from npm package.
48
-
49
- Add Veil to your MCP client configuration:
50
-
51
- ### Claude Desktop
52
-
53
- Edit `~/Library/Application Support/Claude/claude_desktop_config.json`:
7
+ Add Veil to your MCP client config:
54
8
 
55
9
  ```json
56
10
  {
57
11
  "mcpServers": {
58
12
  "veil": {
59
13
  "command": "npx",
60
- "args": ["-y", "@ushiradineth/veil", "server"],
61
- "env": {}
14
+ "args": ["-y", "@ushiradineth/veil@latest", "server"]
62
15
  }
63
16
  }
64
17
  }
65
18
  ```
66
19
 
67
- ### Codex
20
+ Then restart your MCP client.
21
+
22
+ ## MCP config snippets
68
23
 
69
- Edit `~/.config/codex/mcp.json`:
24
+ Claude Desktop (`~/Library/Application Support/Claude/claude_desktop_config.json`):
70
25
 
71
26
  ```json
72
27
  {
73
28
  "mcpServers": {
74
29
  "veil": {
75
30
  "command": "npx",
76
- "args": ["-y", "@ushiradineth/veil", "server"]
31
+ "args": ["-y", "@ushiradineth/veil@latest", "server"],
32
+ "env": {}
77
33
  }
78
34
  }
79
35
  }
80
36
  ```
81
37
 
82
- ### OpenCode
83
-
84
- Edit `~/.config/opencode/mcp.json`:
38
+ Codex (`~/.config/codex/mcp.json`) and OpenCode (`~/.config/opencode/mcp.json`):
85
39
 
86
40
  ```json
87
41
  {
88
42
  "mcpServers": {
89
43
  "veil": {
90
44
  "command": "npx",
91
- "args": ["-y", "@ushiradineth/veil", "server"]
45
+ "args": ["-y", "@ushiradineth/veil@latest", "server"]
92
46
  }
93
47
  }
94
48
  }
95
49
  ```
96
50
 
97
- Alternative package launch with Bun:
51
+ Optional Bun launcher:
98
52
 
99
53
  ```json
100
54
  {
@@ -107,7 +61,7 @@ Alternative package launch with Bun:
107
61
  }
108
62
  ```
109
63
 
110
- Local clone setup (contributors):
64
+ Local clone launcher:
111
65
 
112
66
  ```json
113
67
  {
@@ -120,187 +74,89 @@ Local clone setup (contributors):
120
74
  }
121
75
  ```
122
76
 
123
- **Example with workspace:**
77
+ ## Quick verification
124
78
 
125
- To index a specific repository (e.g., `~/nix-config`), first build the index:
79
+ Package path:
126
80
 
127
81
  ```bash
128
- bun run src/cli.ts build --workspace ~/nix-config
82
+ npx -y @ushiradineth/veil@latest cli status
129
83
  ```
130
84
 
131
- Then use the MCP tools with `workspace: "~/nix-config"` parameter, or omit it to use the current working directory.
132
-
133
- ## Agent Adoption
134
-
135
- To improve real-world tool usage (selection and correctness), use:
136
-
137
- - `AGENTS.md` for default routing policy and anti-pattern constraints
138
- - `docs/SKILL.md` as a reusable skill prompt for research and investigation tasks
139
-
140
- Install the skill using the `skills` CLI from `vercel-labs/skills`:
85
+ Local clone path:
141
86
 
142
87
  ```bash
143
- # install from local repo path
144
- npx skills add ./docs --skill veil-research-workflow
145
-
146
- # install from GitHub
147
- npx skills add https://github.com/ushiradineth/veil/tree/main/docs --skill veil-research-workflow
148
-
149
- # optional: target specific agents yourself
150
- npx skills add https://github.com/ushiradineth/veil/tree/main/docs --skill veil-research-workflow -a opencode
88
+ node bin/veil.mjs cli status
151
89
  ```
152
90
 
153
- ## CLI Usage
154
-
155
- All CLI and MCP text outputs are emitted in TOON format (not JSON text).
156
-
157
- Package-style CLI (no clone after install):
91
+ Build and query a workspace:
158
92
 
159
93
  ```bash
160
- npx -y @ushiradineth/veil cli status
161
- npx -y @ushiradineth/veil cli discover --query "homebrew pnpm"
94
+ npx -y @ushiradineth/veil@latest cli refresh --workspace ~/nix-config --mode full
95
+ npx -y @ushiradineth/veil@latest cli discover --workspace ~/nix-config --query "where is buildIndex defined"
162
96
  ```
163
97
 
164
- ```bash
165
- # Build index
166
- bun run src/cli.ts build --workspace <path>
167
-
168
- # Check status
169
- bun run src/cli.ts status --workspace <path>
170
-
171
- # Refresh index (incremental)
172
- bun run src/cli.ts refresh --workspace <path> --mode changed
173
-
174
- # Search and discover
175
- bun run src/cli.ts discover --workspace <path> --query "homebrew pnpm"
98
+ If you run these commands from inside a local `veil` clone, keep `@latest` in the package spec so npm does not resolve to the local workspace package.
176
99
 
177
- # Intent-aware lookup with explainability
178
- bun run src/cli.ts lookup --workspace <path> --query "where is buildIndex defined"
100
+ ## Agent skill install (`veil`)
179
101
 
180
- # Fast web search without API keys (google, duckduckgo, wikipedia, github, reddit, deepwiki)
181
- bun run src/cli.ts web-search --query "typescript language server"
102
+ Install and list from local path:
182
103
 
183
- # Optional debug diagnostics for web search (provider trace, ranking details)
184
- bun run src/cli.ts web-search --query "typescript language server" --debug 1
185
-
186
- # Fetch URL content with markdown-first negotiation
187
- bun run src/cli.ts fetch-url --url "https://example.com" --format markdown
188
-
189
- # Git repository lookups
190
- bun run src/cli.ts git-status --workspace <path>
191
- bun run src/cli.ts git-log --workspace <path> --limit 20
192
- bun run src/cli.ts git-diff --workspace <path> --staged 0 --path src/indexer.ts
193
- bun run src/cli.ts git-show --workspace <path> --rev HEAD
194
-
195
- # Optional GitHub lookup via gh CLI
196
- bun run src/cli.ts gh-lookup --workspace <path> --repo owner/name --kind prs --limit 10
197
-
198
- # Run diagnostics
199
- bun run src/cli.ts diagnostics
200
-
201
- # Run tests
202
- bun test ./src/test.ts
203
-
204
- # Benchmark (internal performance)
205
- bun run src/bench-harness.ts --workspace <path> --warm 50
206
-
207
- # Benchmark (vs traditional tools)
208
- bun run src/bench-comparison.ts --workspace <path>
209
-
210
- # Benchmark suite (public, multi-competitor)
211
- bun run src/bench-suite.ts --workspace <path> --cold 1 --warm 50 --out benchmarks/results/latest
212
-
213
- # Benchmark suite with custom Serena command overrides (optional)
214
- bun run src/bench-suite.ts --workspace <path> --serena-config benchmarks/serena.config.example.json --out benchmarks/results/latest
215
- ```
216
-
217
- ## Release Pipeline
218
-
219
- Manual release workflow: `.github/workflows/release.yml`.
220
-
221
- - Trigger via GitHub Actions `Release` workflow (`workflow_dispatch`)
222
- - Supports `patch|minor|major` bump
223
- - Supports `dry_run=true` for full validation without push/publish
224
- - Auto-updates `package.json` and `CHANGELOG.md`
225
- - Tags release as `v<version>`, publishes npm package, and creates GitHub release
226
-
227
- Required GitHub secrets:
228
-
229
- - `NPM_TOKEN`: npm automation token with publish access to `@ushiradineth/veil`
230
-
231
- No additional GitHub environment variables are required by default.
232
-
233
- ## MCP Tools
234
-
235
- The server exposes the following MCP tools:
236
-
237
- - **status** - Get index status and staleness reasons
238
- - **refresh** - Build or refresh the index
239
- - **files** - Find files by substring path query
240
- - **symbols** - Find symbols by name
241
- - **search** - Search indexed code chunks by keyword
242
- - **lookup** - Intent-aware contextual lookup with confidence and fallback metadata
243
- - **web_search** - Fast web search without API keys (google, duckduckgo, wikipedia, github, reddit, deepwiki), minimal results by default with optional debug diagnostics
244
- - **fetch_url** - Fetch URL content with markdown-first output negotiation and fallback conversion
245
- - returns `markdown_tokens`, `content_signal`, and `vary` when present in response headers
246
- - **discover** - Combined status + files + symbols + search in one call
247
- - **git_status** - Inspect branch state and dirty workspace changes
248
- - **git_log** - Query commit history with limit and filters
249
- - **git_diff** - Inspect uncommitted or revision-range diff output
250
- - **git_show** - Show commit details and optional patch output
251
- - **gh_lookup** - Optional GitHub issues/PRs/checks lookup via `gh`
252
- - **diagnostics** - Get performance diagnostics and cache stats
253
-
254
- ## Index Storage
255
-
256
- Index artifacts are written to `<workspace>/.agents/index/`:
257
- - `files.ndjson` - File records with metadata
258
- - `symbols.ndjson` - Extracted symbols (functions, classes, types)
259
- - `chunks.ndjson` - Code chunks for semantic search
260
- - `manifest.json` - Index metadata and staleness tracking
261
-
262
- ## Architecture
263
-
264
- **Hot path optimizations:**
265
- - Heap-based top-K scoring (O(n log k) vs O(n²))
266
- - Single-pass NDJSON parsing
267
- - Parallel file processing with batching
268
- - Normalized string caching for memory efficiency
269
-
270
- **Caching strategy:**
271
- - In-memory index cache with mtime validation
272
- - Query result caching per workspace
273
- - Status cache with TTL
274
-
275
- ## Development
276
-
277
- **Run tests:**
278
104
  ```bash
279
- bun test ./src/test.ts
105
+ npx -y skills add ./docs --skill veil --list
280
106
  ```
281
107
 
282
- **Run benchmarks:**
283
- ```bash
284
- bun run src/bench-harness.ts --workspace /path/to/repo --warm 100
285
- ```
108
+ Install and list from GitHub path:
286
109
 
287
- **Start MCP server:**
288
110
  ```bash
289
- bun run src/server.ts
111
+ npx -y skills add https://github.com/ushiradineth/veil/tree/main/docs --skill veil --list
290
112
  ```
291
113
 
292
- ## License
114
+ Note: this command reflects the current `main` branch contents on GitHub.
293
115
 
294
- MIT License - see [LICENSE](LICENSE) for details.
116
+ Optional agent targeting:
295
117
 
296
- ## Contributing
297
-
298
- Contributions are welcome! Please feel free to submit issues or pull requests.
299
-
300
- ## Acknowledgments
118
+ ```bash
119
+ npx -y skills add https://github.com/ushiradineth/veil/tree/main/docs --skill veil -a opencode
120
+ ```
301
121
 
302
- Built with performance in mind, leveraging:
303
- - Heap-based top-K algorithms for efficient ranking
304
- - Single-pass parsing to minimize allocations
305
- - Parallel file processing for multi-core systems
306
- - Intelligent caching strategies for memory efficiency
122
+ ## Integration checklist
123
+
124
+ - `veil` server starts in your MCP client
125
+ - `status` returns index metadata
126
+ - `discover` returns relevant repo hits
127
+ - local `skills ... --list` shows `veil`
128
+ - Routing guidance is loaded from `docs/SKILL.md`
129
+
130
+ ## MCP tools
131
+
132
+ - `status`: index status and staleness reasons
133
+ - `refresh`: full or changed index refresh
134
+ - `files`: file path substring lookup
135
+ - `symbols`: symbol name lookup
136
+ - `search`: indexed code chunk search
137
+ - `lookup`: intent-aware contextual retrieval with explainability
138
+ - `discover`: combined status and focused retrieval in one call
139
+ - `web_search`: no-key web search (google, duckduckgo, wikipedia, github, reddit, deepwiki)
140
+ - `fetch_url`: markdown-first URL content fetch
141
+ - `git_status`: branch and workspace state
142
+ - `git_log`: commit history lookup
143
+ - `git_diff`: uncommitted or range diff lookup
144
+ - `git_show`: commit details and optional patch
145
+ - `gh_lookup`: GitHub issues, PRs, and checks via `gh`
146
+ - `diagnostics`: cache and latency diagnostics
147
+
148
+ ## Release workflow
149
+
150
+ - Workflow: `.github/workflows/release.yml` (`workflow_dispatch`)
151
+ - Inputs: `version_bump` (`patch|minor|major`) and `dry_run` (`true|false`)
152
+ - Guardrails: release runs only from default branch and requires `package.json` version to match latest semver tag (`vX.Y.Z`) before bump
153
+ - Outputs: updates `package.json` and `CHANGELOG.md`, tags `v<version>`, publishes npm package, and creates GitHub release
154
+ - Release notes: generated via GitHub release notes config in `.github/release.yml` with changelog fallback so release pages are never empty
155
+ - Required secret: `NPM_TOKEN` for npm publish (`GITHUB_TOKEN` is provided by Actions)
156
+
157
+ ## Links
158
+
159
+ - Benchmark methodology and latest artifacts: `BENCHMARKS.md`
160
+ - Agent routing policy: `AGENTS.md`
161
+ - Reusable routing skill: `docs/SKILL.md`
162
+ - License: `LICENSE`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ushiradineth/veil",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "repository": {