jev-dev-harness 0.1.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.
Files changed (129) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +375 -0
  3. package/bin/jev-dev.js +3 -0
  4. package/bin/jev-mcp.js +8 -0
  5. package/dist/cli/index.d.ts +3 -0
  6. package/dist/cli/index.d.ts.map +1 -0
  7. package/dist/cli/index.js +333 -0
  8. package/dist/cli/index.js.map +1 -0
  9. package/dist/context-ranker/index.d.ts +17 -0
  10. package/dist/context-ranker/index.d.ts.map +1 -0
  11. package/dist/context-ranker/index.js +59 -0
  12. package/dist/context-ranker/index.js.map +1 -0
  13. package/dist/context-ranker/stage-a-filter.d.ts +8 -0
  14. package/dist/context-ranker/stage-a-filter.d.ts.map +1 -0
  15. package/dist/context-ranker/stage-a-filter.js +121 -0
  16. package/dist/context-ranker/stage-a-filter.js.map +1 -0
  17. package/dist/context-ranker/stage-b-candidates.d.ts +11 -0
  18. package/dist/context-ranker/stage-b-candidates.d.ts.map +1 -0
  19. package/dist/context-ranker/stage-b-candidates.js +139 -0
  20. package/dist/context-ranker/stage-b-candidates.js.map +1 -0
  21. package/dist/context-ranker/stage-c-jev.d.ts +14 -0
  22. package/dist/context-ranker/stage-c-jev.d.ts.map +1 -0
  23. package/dist/context-ranker/stage-c-jev.js +111 -0
  24. package/dist/context-ranker/stage-c-jev.js.map +1 -0
  25. package/dist/context-ranker/stage-d-ranker.d.ts +13 -0
  26. package/dist/context-ranker/stage-d-ranker.d.ts.map +1 -0
  27. package/dist/context-ranker/stage-d-ranker.js +109 -0
  28. package/dist/context-ranker/stage-d-ranker.js.map +1 -0
  29. package/dist/context-ranker/types.d.ts +53 -0
  30. package/dist/context-ranker/types.d.ts.map +1 -0
  31. package/dist/context-ranker/types.js +2 -0
  32. package/dist/context-ranker/types.js.map +1 -0
  33. package/dist/hooks/index.d.ts +14 -0
  34. package/dist/hooks/index.d.ts.map +1 -0
  35. package/dist/hooks/index.js +83 -0
  36. package/dist/hooks/index.js.map +1 -0
  37. package/dist/index.d.ts +8 -0
  38. package/dist/index.d.ts.map +1 -0
  39. package/dist/index.js +8 -0
  40. package/dist/index.js.map +1 -0
  41. package/dist/mcp/index.d.ts +2 -0
  42. package/dist/mcp/index.d.ts.map +1 -0
  43. package/dist/mcp/index.js +2 -0
  44. package/dist/mcp/index.js.map +1 -0
  45. package/dist/mcp/server.d.ts +6 -0
  46. package/dist/mcp/server.d.ts.map +1 -0
  47. package/dist/mcp/server.js +255 -0
  48. package/dist/mcp/server.js.map +1 -0
  49. package/dist/patch-reviewer/diff-extractor.d.ts +13 -0
  50. package/dist/patch-reviewer/diff-extractor.d.ts.map +1 -0
  51. package/dist/patch-reviewer/diff-extractor.js +136 -0
  52. package/dist/patch-reviewer/diff-extractor.js.map +1 -0
  53. package/dist/patch-reviewer/index.d.ts +15 -0
  54. package/dist/patch-reviewer/index.d.ts.map +1 -0
  55. package/dist/patch-reviewer/index.js +46 -0
  56. package/dist/patch-reviewer/index.js.map +1 -0
  57. package/dist/patch-reviewer/reviewer.d.ts +20 -0
  58. package/dist/patch-reviewer/reviewer.d.ts.map +1 -0
  59. package/dist/patch-reviewer/reviewer.js +145 -0
  60. package/dist/patch-reviewer/reviewer.js.map +1 -0
  61. package/dist/patch-reviewer/triage.d.ts +14 -0
  62. package/dist/patch-reviewer/triage.d.ts.map +1 -0
  63. package/dist/patch-reviewer/triage.js +66 -0
  64. package/dist/patch-reviewer/triage.js.map +1 -0
  65. package/dist/patch-reviewer/types.d.ts +37 -0
  66. package/dist/patch-reviewer/types.d.ts.map +1 -0
  67. package/dist/patch-reviewer/types.js +2 -0
  68. package/dist/patch-reviewer/types.js.map +1 -0
  69. package/dist/semantic-linter/catalog.d.ts +3 -0
  70. package/dist/semantic-linter/catalog.d.ts.map +1 -0
  71. package/dist/semantic-linter/catalog.js +68 -0
  72. package/dist/semantic-linter/catalog.js.map +1 -0
  73. package/dist/semantic-linter/index.d.ts +4 -0
  74. package/dist/semantic-linter/index.d.ts.map +1 -0
  75. package/dist/semantic-linter/index.js +4 -0
  76. package/dist/semantic-linter/index.js.map +1 -0
  77. package/dist/semantic-linter/linter.d.ts +6 -0
  78. package/dist/semantic-linter/linter.d.ts.map +1 -0
  79. package/dist/semantic-linter/linter.js +177 -0
  80. package/dist/semantic-linter/linter.js.map +1 -0
  81. package/dist/semantic-linter/types.d.ts +48 -0
  82. package/dist/semantic-linter/types.d.ts.map +1 -0
  83. package/dist/semantic-linter/types.js +2 -0
  84. package/dist/semantic-linter/types.js.map +1 -0
  85. package/dist/shared/cache.d.ts +31 -0
  86. package/dist/shared/cache.d.ts.map +1 -0
  87. package/dist/shared/cache.js +111 -0
  88. package/dist/shared/cache.js.map +1 -0
  89. package/dist/shared/ignore.d.ts +31 -0
  90. package/dist/shared/ignore.d.ts.map +1 -0
  91. package/dist/shared/ignore.js +197 -0
  92. package/dist/shared/ignore.js.map +1 -0
  93. package/dist/shared/index.d.ts +6 -0
  94. package/dist/shared/index.d.ts.map +1 -0
  95. package/dist/shared/index.js +6 -0
  96. package/dist/shared/index.js.map +1 -0
  97. package/dist/shared/redaction.d.ts +27 -0
  98. package/dist/shared/redaction.d.ts.map +1 -0
  99. package/dist/shared/redaction.js +134 -0
  100. package/dist/shared/redaction.js.map +1 -0
  101. package/dist/shared/telemetry.d.ts +41 -0
  102. package/dist/shared/telemetry.d.ts.map +1 -0
  103. package/dist/shared/telemetry.js +75 -0
  104. package/dist/shared/telemetry.js.map +1 -0
  105. package/dist/shared/typesafe-client.d.ts +60 -0
  106. package/dist/shared/typesafe-client.d.ts.map +1 -0
  107. package/dist/shared/typesafe-client.js +330 -0
  108. package/dist/shared/typesafe-client.js.map +1 -0
  109. package/dist/tool-guard/classifier.d.ts +12 -0
  110. package/dist/tool-guard/classifier.d.ts.map +1 -0
  111. package/dist/tool-guard/classifier.js +242 -0
  112. package/dist/tool-guard/classifier.js.map +1 -0
  113. package/dist/tool-guard/evaluator.d.ts +17 -0
  114. package/dist/tool-guard/evaluator.d.ts.map +1 -0
  115. package/dist/tool-guard/evaluator.js +83 -0
  116. package/dist/tool-guard/evaluator.js.map +1 -0
  117. package/dist/tool-guard/guard.d.ts +9 -0
  118. package/dist/tool-guard/guard.d.ts.map +1 -0
  119. package/dist/tool-guard/guard.js +130 -0
  120. package/dist/tool-guard/guard.js.map +1 -0
  121. package/dist/tool-guard/index.d.ts +15 -0
  122. package/dist/tool-guard/index.d.ts.map +1 -0
  123. package/dist/tool-guard/index.js +38 -0
  124. package/dist/tool-guard/index.js.map +1 -0
  125. package/dist/tool-guard/types.d.ts +25 -0
  126. package/dist/tool-guard/types.d.ts.map +1 -0
  127. package/dist/tool-guard/types.js +2 -0
  128. package/dist/tool-guard/types.js.map +1 -0
  129. package/package.json +94 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Marcelo Lopes
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,375 @@
1
+ # Jev Developer Harness (`jev-dev-harness`)
2
+
3
+ [![Tests](https://img.shields.io/badge/tests-106%20passing-brightgreen.svg)]()
4
+ [![TypeScript](https://img.shields.io/badge/TypeScript-5.8-blue.svg)]()
5
+ [![Node](https://img.shields.io/badge/Node.js-22+-green.svg)]()
6
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
7
+ [![TypeSafe AI](https://img.shields.io/badge/Powered%20By-TypeSafe%20AI%20%2F%20Jev-purple.svg)](https://typesafe.ai)
8
+
9
+ > **An open-source developer harness and runtime safety toolkit for AI coding agents (Antigravity, Codex, Claude Code, Cursor, Aider) powered by TypeSafe AI / Jev.**
10
+
11
+ ---
12
+
13
+ ## ๐Ÿš€ Why Jev Developer Harness?
14
+
15
+ Large Language Models (LLMs) are exceptional at generative synthesis and reasoning, but using them for high-volume context filtering, safety guardrails, and patch triage is **slow, expensive, and prone to context window dilution**.
16
+
17
+ **TypeSafe AI's Jev** is a specialized "System One" decision engine. Rather than generating chat text, it evaluates application state and natural language against typed, calibrated questions (`noul`, `score`, `choice`) with sub-second latency and consistent probabilities.
18
+
19
+ `jev-dev-harness` bridges the gap between coding agents and codebase safety:
20
+
21
+ ```
22
+ AI Coding Agent (Codex, Antigravity, Claude Code)
23
+ โ”‚
24
+ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
25
+ โ–ผ โ–ผ โ–ผ
26
+ [Context Ranker] [Tool Call Guard] [Patch Reviewer]
27
+ Selects surgical 3-5 Intercepts shell commands Audits git diffs before
28
+ relevant files (<90% tokens) in <1ms (blocks destructive) commits (secrets, scope, auth)
29
+ โ”‚ โ”‚ โ”‚
30
+ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
31
+ โ–ผ
32
+ [Semantic Linter in CI]
33
+ Enforces architectural drift
34
+ and safety rules in GitHub PRs
35
+ ```
36
+
37
+ ---
38
+
39
+ ## โšก Key Modules
40
+
41
+ | Module | Command | Purpose |
42
+ | :--- | :--- | :--- |
43
+ | **Context Ranker** | `jev-dev context rank` | Selects the top 3-5 crucial files for a task, reducing token bloat by 88%โ€“94%. |
44
+ | **Tool Call Guard** | `jev-dev guard check` | Intercepts agent commands in <1ms, categorizing operations into `read-only`, `modify-local`, `destructive-local`, `network`, or `production-sensitive`. |
45
+ | **Patch Reviewer** | `jev-dev patch review` | Fast triage of git diffs before commit/PR. Detects scope creep, credential exposure, database mutations, and missing tests. |
46
+ | **Semantic Linter** | `jev-dev lint semantic` | Automated architectural drift detection in GitHub Actions CI (prevents UI/database mixing, dangerous migrations, etc.). |
47
+ | **Git Hook Automation** | `jev-dev hooks install` | 1-click installer for git pre-commit safety gate. Blocks commits containing leaked credentials or critical regression risk. |
48
+ | **MCP Server** | `jev-dev mcp` | Standard Model Context Protocol (stdio) exposing all 4 tools to Cursor, Claude Desktop, Antigravity. |
49
+
50
+ ---
51
+
52
+ ## ๐Ÿ”‘ Dual-Provider Architecture: Native TypeSafe & OpenRouter
53
+
54
+ `jev-dev-harness` is designed to be accessible to everyone:
55
+
56
+ 1. **Native TypeSafe AI (Recommended)**:
57
+ * Direct integration with TypeSafe's Jev System One model.
58
+ * Calibrated probabilities, native discrete choices, and extreme low-latency evaluation.
59
+ * Automatically activated when `TYPESAFE_API_KEY` (or `JEV_API_KEY`) is set.
60
+ 2. **OpenRouter Emulator (Community & Multi-Model)**:
61
+ * Emulates Jev's structured System One contract (`noul`, `score`, `choice`) using fast reasoning models (defaults to `deepseek/deepseek-v4-flash`, also supports `openai/gpt-4o-mini`, `anthropic/claude-3.5-haiku`).
62
+ * Automatically activated when `OPENROUTER_API_KEY` (or keys starting with `sk-or-`) is configured.
63
+ 3. **Deterministic Offline Fallback**:
64
+ * If offline or no API keys are provided, the harness automatically falls back to regex and heuristic analysis. **Your coding agents are never blocked by API downtime.**
65
+
66
+ ---
67
+
68
+ ## ๐Ÿ“ฆ Installation
69
+
70
+ ### Option 1: Global CLI (Recommended)
71
+
72
+ ```bash
73
+ # Clone the repository
74
+ git clone https://github.com/celolopes/jev-dev-harness.git
75
+ cd jev-dev-harness
76
+
77
+ # Install dependencies and build
78
+ npm install
79
+ npm run build
80
+
81
+ # Link globally to use `jev-dev` anywhere
82
+ npm link
83
+ ```
84
+
85
+ ### Option 2: Run via npx / local script
86
+
87
+ ```bash
88
+ node dist/cli/index.js --help
89
+ # Or if linked:
90
+ npx jev-dev --help
91
+ ```
92
+
93
+ ---
94
+
95
+ ## ๐Ÿ› ๏ธ Usage Guide
96
+
97
+ ### 1. Context Ranker (`context rank`)
98
+ Narrow down an entire codebase to the exact files needed for a prompt:
99
+
100
+ ```bash
101
+ # Formatted human output
102
+ jev-dev context rank --task "Implement JWT authentication token refresh and logout routes" --path .
103
+
104
+ # Machine-readable JSON (ideal for AI coding agents)
105
+ jev-dev context rank --task "Implement JWT authentication" --top 5 --json
106
+ ```
107
+
108
+ Output example:
109
+ ```json
110
+ {
111
+ "task": "Implement JWT authentication",
112
+ "selected": [
113
+ {
114
+ "path": "src/auth/jwt.ts",
115
+ "score": 0.94,
116
+ "confidence": 0.92,
117
+ "role": "implementation",
118
+ "reason": "Jev: Crucial (95% match, role: implementation) + heuristic: 92%"
119
+ },
120
+ {
121
+ "path": "tests/auth/jwt.test.ts",
122
+ "score": 0.84,
123
+ "confidence": 0.90,
124
+ "role": "test",
125
+ "reason": "Jev: Highly Relevant (85% match, role: test) + heuristic: 82%"
126
+ }
127
+ ],
128
+ "metrics": {
129
+ "initialCandidates": 240,
130
+ "filteredCandidates": 14,
131
+ "tokensSent": 950,
132
+ "latencyMs": 280
133
+ }
134
+ }
135
+ ```
136
+
137
+ ---
138
+
139
+ ### 2. Tool Call Guard (`guard check`)
140
+ Inspect shell commands before execution to prevent accidental file deletion or production outages:
141
+
142
+ ```bash
143
+ # Safe read-only inspection -> ALLOWED immediately
144
+ jev-dev guard check --command "git status"
145
+
146
+ # Destructive command -> BLOCKED (Requires confirmation)
147
+ jev-dev guard check --command "git reset --hard HEAD~1"
148
+
149
+ # Production cloud command -> BLOCKED (Critical safety risk)
150
+ jev-dev guard check --command "gcloud compute instances delete prod-server"
151
+
152
+ # Authorize network operations explicitly if intended
153
+ jev-dev guard check --command "git push origin main" --allow-network
154
+ ```
155
+
156
+ ---
157
+
158
+ ### 3. Patch Reviewer (`patch review`)
159
+ Audit a patch or git diff before committing:
160
+
161
+ ```bash
162
+ # Review uncommitted working tree changes
163
+ jev-dev patch review --task "Refactor authentication session handling"
164
+
165
+ # Review staged changes
166
+ jev-dev patch review --staged --task "Fix invoice tax calculation"
167
+
168
+ # Review a specific commit range
169
+ jev-dev patch review --commit-range HEAD~1 --task "Database migration"
170
+ ```
171
+
172
+ Output:
173
+ ```
174
+ =======================================================
175
+ JEV PATCH REVIEWER (PHASE 3)
176
+ =======================================================
177
+
178
+ Task: Fix invoice tax calculation
179
+ Status: [APPROVED] (Risk Score: 12.0/100)
180
+ Diff Stats: 2 file(s), +24 / -3 lines
181
+
182
+ --- JUDGMENTS BREAKDOWN ---
183
+ Regression Risk: 1.0 / 4.0
184
+ Out Of Scope: 5%
185
+ Modifies Auth: 0%
186
+ Modifies Database: 0%
187
+ Missing Tests: 10%
188
+ Exposes Secrets: 0%
189
+ Confidence: 92%
190
+ =======================================================
191
+ ```
192
+
193
+ ---
194
+
195
+ ### 4. Git Pre-Commit Hook (`hooks install`)
196
+ Protect your repository automatically on every `git commit`:
197
+
198
+ ```bash
199
+ jev-dev hooks install
200
+ ```
201
+
202
+ Whenever you run `git commit`, the hook evaluates your staged diff:
203
+ * If secrets, private keys, or catastrophic regressions are detected, **the commit is aborted** (`exit 1`).
204
+ * If clean, the commit proceeds instantly.
205
+ * To uninstall: `jev-dev hooks uninstall`.
206
+
207
+ ---
208
+
209
+ ### 5. Semantic Linter in CI (`lint semantic`)
210
+ Prevent architectural drift in pull requests:
211
+
212
+ ```bash
213
+ # Run locally over staged changes
214
+ jev-dev lint semantic --staged
215
+
216
+ # Run in advisory mode (report findings without breaking build)
217
+ jev-dev lint semantic --commit-range origin/main...HEAD --advisory
218
+ ```
219
+
220
+ #### GitHub Actions Workflow
221
+ Add `.github/workflows/jev-lint.yml` to your repository:
222
+
223
+ ```yaml
224
+ name: Jev Semantic Linter
225
+
226
+ on:
227
+ pull_request:
228
+ branches: [main, master]
229
+
230
+ jobs:
231
+ semantic-lint:
232
+ runs-on: ubuntu-latest
233
+ steps:
234
+ - uses: actions/checkout@v4
235
+ with:
236
+ fetch-depth: 0
237
+ - uses: actions/setup-node@v4
238
+ with:
239
+ node-version: 22
240
+ - run: npm ci
241
+ - run: npx jev-dev lint semantic --commit-range origin/main...HEAD --advisory
242
+ env:
243
+ TYPESAFE_API_KEY: ${{ secrets.TYPESAFE_API_KEY }}
244
+ OPENROUTER_API_KEY: ${{ secrets.OPENROUTER_API_KEY }}
245
+ ```
246
+
247
+ Built-in rules:
248
+ * `insecure_secret_handling`: Detects hardcoded secrets, private keys, or leaked tokens.
249
+ * `dangerous_migration`: Blocks destructive database operations (`DROP TABLE`, `TRUNCATE`).
250
+ * `ui_domain_mixing`: Prevents raw SQL queries inside React / UI components.
251
+ * `auth_boundary_change`: Flags changes to authentication and permission guards.
252
+ * `manual_generated_edit`: Flags manual edits to auto-generated or compiled code.
253
+ * `missing_tests`: Requires automated test coverage for new business logic.
254
+
255
+ ---
256
+
257
+ ## ๐Ÿ”Œ Model Context Protocol (MCP) Server
258
+
259
+ `jev-dev-harness` includes an official Model Context Protocol (MCP) server running over stdio (`@modelcontextprotocol/sdk`). This allows **Cursor**, **Claude Desktop**, **Antigravity**, and any MCP-compatible agent to natively invoke Jev capabilities as first-class tools.
260
+
261
+ ### Available MCP Tools
262
+
263
+ 1. **`jev_rank_context`**: Intelligent context selector that ranks codebase files by relevance for a given task, cutting prompt tokens by up to 94%.
264
+ 2. **`jev_guard_check`**: Pre-execution security filter that classifies shell commands (`read-only`, `modify-local`, `destructive-local`, `network`, `production-sensitive`) and blocks risky execution.
265
+ 3. **`jev_review_patch`**: Fast patch auditor that checks git diffs for regressions, scope creep, auth/database modifications, and exposed secrets.
266
+ 4. **`jev_lint_semantic`**: Semantic architectural linter that tests diffs against modularity, security, and migration rules.
267
+
268
+ ### Running the MCP Server
269
+
270
+ ```bash
271
+ # Via global CLI:
272
+ jev-dev mcp
273
+
274
+ # Via npx / node:
275
+ node dist/cli/index.js mcp
276
+ ```
277
+
278
+ ### Configuration Examples
279
+
280
+ #### 1. Claude Desktop (`claude_desktop_config.json`)
281
+ Add to your Claude Desktop configuration (`%APPDATA%\Claude\claude_desktop_config.json` on Windows or `~/Library/Application Support/Claude/claude_desktop_config.json` on macOS):
282
+
283
+ ```json
284
+ {
285
+ "mcpServers": {
286
+ "jev-dev": {
287
+ "command": "node",
288
+ "args": ["<path-to-repo>/dist/cli/index.js", "mcp"],
289
+ "env": {
290
+ "TYPESAFE_API_KEY": "your-typesafe-or-openrouter-key"
291
+ }
292
+ }
293
+ }
294
+ }
295
+ ```
296
+
297
+ #### 2. Cursor (`.cursor/mcp.json`)
298
+ Add to `.cursor/mcp.json` in your project root:
299
+
300
+ ```json
301
+ {
302
+ "mcpServers": {
303
+ "jev-dev": {
304
+ "command": "node",
305
+ "args": ["dist/cli/index.js", "mcp"],
306
+ "env": {
307
+ "TYPESAFE_API_KEY": "${env:TYPESAFE_API_KEY}"
308
+ }
309
+ }
310
+ }
311
+ }
312
+ ```
313
+
314
+ #### 3. Antigravity / Agent MCP Config
315
+ Configure in your agent's MCP settings:
316
+
317
+ ```json
318
+ {
319
+ "jev-dev": {
320
+ "command": "node",
321
+ "args": ["<path-to-repo>/dist/cli/index.js", "mcp"],
322
+ "env": {
323
+ "TYPESAFE_API_KEY": "your-typesafe-or-openrouter-key"
324
+ }
325
+ }
326
+ }
327
+ ```
328
+
329
+ ---
330
+
331
+ ## ๐Ÿค– Integration with AI Coding Agents
332
+
333
+ `jev-dev-harness` ships with official agent skills located in `.agents/skills/`:
334
+ * `jev-context-ranker`: Instructs agents to rank context before loading files.
335
+ * `jev-tool-guard`: Instructs agents to verify shell commands before execution.
336
+ * `jev-patch-reviewer`: Instructs agents to audit git diffs before completing tasks.
337
+
338
+ These are natively discovered by **Antigravity**, **Codex**, and any agent adhering to standard skill conventions.
339
+
340
+ ---
341
+
342
+ ## โš™๏ธ Environment Variables
343
+
344
+ Create a `.env` file or export environment variables:
345
+
346
+ | Variable | Description |
347
+ | :--- | :--- |
348
+ | `TYPESAFE_API_KEY` or `JEV_API_KEY` | Official TypeSafe AI API key (enables native Jev System One). |
349
+ | `OPENROUTER_API_KEY` | OpenRouter API key (enables LLM emulation mode, e.g. `deepseek/deepseek-v4-flash`). |
350
+ | `JEV_PROVIDER` | Force provider: `typesafe` or `openrouter`. |
351
+ | `OPENROUTER_MODEL` | Custom OpenRouter model slug (default: `deepseek/deepseek-v4-flash`). |
352
+ | `OPENROUTER_EFFORT` | Reasoning effort for supported models (`low`, `medium`, `high`). |
353
+
354
+ ---
355
+
356
+ ## ๐Ÿงช Testing
357
+
358
+ The repository features comprehensive integration and unit test suites:
359
+
360
+ ```bash
361
+ # Run full Vitest test suite (106 tests)
362
+ npm test
363
+
364
+ # Run benchmark suite (precision, recall, token reduction)
365
+ npm run bench
366
+
367
+ # Run TypeScript typecheck
368
+ npm run typecheck
369
+ ```
370
+
371
+ ---
372
+
373
+ ## ๐Ÿ“„ License
374
+
375
+ This project is licensed under the [MIT License](LICENSE).
package/bin/jev-dev.js ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+
3
+ import "../dist/cli/index.js";
package/bin/jev-mcp.js ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { startMcpServer } from "../dist/mcp/index.js";
4
+
5
+ startMcpServer().catch((err) => {
6
+ console.error("Fatal error starting Jev MCP Server:", err);
7
+ process.exit(1);
8
+ });
@@ -0,0 +1,3 @@
1
+ import { Command } from "commander";
2
+ export declare function createCli(): Command;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AASpC,wBAAgB,SAAS,IAAI,OAAO,CA0WnC"}