@ushiradineth/veil 0.1.0 → 0.1.4
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 +72 -218
- package/package.json +9 -1
package/README.md
CHANGED
|
@@ -1,87 +1,41 @@
|
|
|
1
1
|
# veil
|
|
2
2
|
|
|
3
|
-
|
|
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
|
-
|
|
5
|
+
## 2-minute setup
|
|
6
6
|
|
|
7
|
-
|
|
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", "server"]
|
|
62
15
|
}
|
|
63
16
|
}
|
|
64
17
|
}
|
|
65
18
|
```
|
|
66
19
|
|
|
67
|
-
|
|
20
|
+
Then restart your MCP client.
|
|
21
|
+
|
|
22
|
+
## MCP config snippets
|
|
68
23
|
|
|
69
|
-
|
|
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", "server"],
|
|
32
|
+
"env": {}
|
|
77
33
|
}
|
|
78
34
|
}
|
|
79
35
|
}
|
|
80
36
|
```
|
|
81
37
|
|
|
82
|
-
|
|
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
|
{
|
|
@@ -94,7 +48,7 @@ Edit `~/.config/opencode/mcp.json`:
|
|
|
94
48
|
}
|
|
95
49
|
```
|
|
96
50
|
|
|
97
|
-
|
|
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
|
|
64
|
+
Local clone launcher:
|
|
111
65
|
|
|
112
66
|
```json
|
|
113
67
|
{
|
|
@@ -120,187 +74,87 @@ Local clone setup (contributors):
|
|
|
120
74
|
}
|
|
121
75
|
```
|
|
122
76
|
|
|
123
|
-
|
|
77
|
+
## Quick verification
|
|
124
78
|
|
|
125
|
-
|
|
79
|
+
Package path:
|
|
126
80
|
|
|
127
81
|
```bash
|
|
128
|
-
|
|
82
|
+
npx -y @ushiradineth/veil cli status
|
|
129
83
|
```
|
|
130
84
|
|
|
131
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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):
|
|
158
|
-
|
|
159
|
-
```bash
|
|
160
|
-
npx -y @ushiradineth/veil cli status
|
|
161
|
-
npx -y @ushiradineth/veil cli discover --query "homebrew pnpm"
|
|
162
|
-
```
|
|
91
|
+
Build and query a workspace:
|
|
163
92
|
|
|
164
93
|
```bash
|
|
165
|
-
|
|
166
|
-
|
|
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"
|
|
176
|
-
|
|
177
|
-
# Intent-aware lookup with explainability
|
|
178
|
-
bun run src/cli.ts lookup --workspace <path> --query "where is buildIndex defined"
|
|
179
|
-
|
|
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"
|
|
182
|
-
|
|
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
|
|
94
|
+
npx -y @ushiradineth/veil cli refresh --workspace ~/nix-config --mode full
|
|
95
|
+
npx -y @ushiradineth/veil cli discover --workspace ~/nix-config --query "where is buildIndex defined"
|
|
215
96
|
```
|
|
216
97
|
|
|
217
|
-
##
|
|
218
|
-
|
|
219
|
-
Manual release workflow: `.github/workflows/release.yml`.
|
|
98
|
+
## Agent skill install (`veil`)
|
|
220
99
|
|
|
221
|
-
|
|
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
|
|
100
|
+
Install and list from local path:
|
|
226
101
|
|
|
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
102
|
```bash
|
|
279
|
-
|
|
103
|
+
npx -y skills add ./docs --skill veil --list
|
|
280
104
|
```
|
|
281
105
|
|
|
282
|
-
|
|
283
|
-
```bash
|
|
284
|
-
bun run src/bench-harness.ts --workspace /path/to/repo --warm 100
|
|
285
|
-
```
|
|
106
|
+
Install and list from GitHub path:
|
|
286
107
|
|
|
287
|
-
**Start MCP server:**
|
|
288
108
|
```bash
|
|
289
|
-
|
|
109
|
+
npx -y skills add https://github.com/ushiradineth/veil/tree/main/docs --skill veil --list
|
|
290
110
|
```
|
|
291
111
|
|
|
292
|
-
|
|
112
|
+
Note: this command reflects the current `main` branch contents on GitHub.
|
|
293
113
|
|
|
294
|
-
|
|
114
|
+
Optional agent targeting:
|
|
295
115
|
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
## Acknowledgments
|
|
116
|
+
```bash
|
|
117
|
+
npx -y skills add https://github.com/ushiradineth/veil/tree/main/docs --skill veil -a opencode
|
|
118
|
+
```
|
|
301
119
|
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
-
|
|
305
|
-
-
|
|
306
|
-
-
|
|
120
|
+
## Integration checklist
|
|
121
|
+
|
|
122
|
+
- `veil` server starts in your MCP client
|
|
123
|
+
- `status` returns index metadata
|
|
124
|
+
- `discover` returns relevant repo hits
|
|
125
|
+
- local `skills ... --list` shows `veil`
|
|
126
|
+
- Routing guidance is loaded from `docs/SKILL.md`
|
|
127
|
+
|
|
128
|
+
## MCP tools
|
|
129
|
+
|
|
130
|
+
- `status`: index status and staleness reasons
|
|
131
|
+
- `refresh`: full or changed index refresh
|
|
132
|
+
- `files`: file path substring lookup
|
|
133
|
+
- `symbols`: symbol name lookup
|
|
134
|
+
- `search`: indexed code chunk search
|
|
135
|
+
- `lookup`: intent-aware contextual retrieval with explainability
|
|
136
|
+
- `discover`: combined status and focused retrieval in one call
|
|
137
|
+
- `web_search`: no-key web search (google, duckduckgo, wikipedia, github, reddit, deepwiki)
|
|
138
|
+
- `fetch_url`: markdown-first URL content fetch
|
|
139
|
+
- `git_status`: branch and workspace state
|
|
140
|
+
- `git_log`: commit history lookup
|
|
141
|
+
- `git_diff`: uncommitted or range diff lookup
|
|
142
|
+
- `git_show`: commit details and optional patch
|
|
143
|
+
- `gh_lookup`: GitHub issues, PRs, and checks via `gh`
|
|
144
|
+
- `diagnostics`: cache and latency diagnostics
|
|
145
|
+
|
|
146
|
+
## Release workflow
|
|
147
|
+
|
|
148
|
+
- Workflow: `.github/workflows/release.yml` (`workflow_dispatch`)
|
|
149
|
+
- Inputs: `version_bump` (`patch|minor|major`) and `dry_run` (`true|false`)
|
|
150
|
+
- Guardrails: release runs only from default branch and requires `package.json` version to match latest semver tag (`vX.Y.Z`) before bump
|
|
151
|
+
- Outputs: updates `package.json` and `CHANGELOG.md`, tags `v<version>`, publishes npm package, and creates GitHub release
|
|
152
|
+
- Release notes: generated via GitHub release notes config in `.github/release.yml` with changelog fallback so release pages are never empty
|
|
153
|
+
- Required secret: `NPM_TOKEN` for npm publish (`GITHUB_TOKEN` is provided by Actions)
|
|
154
|
+
|
|
155
|
+
## Links
|
|
156
|
+
|
|
157
|
+
- Benchmark methodology and latest artifacts: `BENCHMARKS.md`
|
|
158
|
+
- Agent routing policy: `AGENTS.md`
|
|
159
|
+
- Reusable routing skill: `docs/SKILL.md`
|
|
160
|
+
- License: `LICENSE`
|
package/package.json
CHANGED
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ushiradineth/veil",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/ushiradineth/veil"
|
|
9
|
+
},
|
|
10
|
+
"homepage": "https://github.com/ushiradineth/veil",
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/ushiradineth/veil/issues"
|
|
13
|
+
},
|
|
6
14
|
"bin": {
|
|
7
15
|
"veil": "bin/veil.mjs"
|
|
8
16
|
},
|