@jigyasudham/veto 0.8.3 → 1.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 (114) hide show
  1. package/README.md +217 -54
  2. package/dist/adapters/index.js +4 -3
  3. package/dist/agents/executor.js +36 -3
  4. package/dist/cli.js +246 -7
  5. package/dist/context/reader.js +113 -0
  6. package/dist/council/index.js +3 -1
  7. package/dist/memory/local.js +18 -1
  8. package/dist/memory/schema.js +12 -10
  9. package/dist/plugins/loader.js +49 -0
  10. package/dist/router/index.js +2 -2
  11. package/dist/router/learning-updater.js +45 -1
  12. package/dist/server.js +507 -21
  13. package/dist/watcher/index.js +77 -0
  14. package/dist/workflow/pipeline.js +64 -0
  15. package/package.json +12 -3
  16. package/.claude/settings.local.json +0 -9
  17. package/src/adapters/claude.ts +0 -70
  18. package/src/adapters/codex.ts +0 -71
  19. package/src/adapters/gemini.ts +0 -71
  20. package/src/adapters/index.ts +0 -217
  21. package/src/agents/development/api.ts +0 -120
  22. package/src/agents/development/backend.ts +0 -85
  23. package/src/agents/development/coder.ts +0 -213
  24. package/src/agents/development/database.ts +0 -83
  25. package/src/agents/development/debugger.ts +0 -238
  26. package/src/agents/development/devops.ts +0 -86
  27. package/src/agents/development/frontend.ts +0 -85
  28. package/src/agents/development/migration.ts +0 -144
  29. package/src/agents/development/performance.ts +0 -144
  30. package/src/agents/development/refactor.ts +0 -86
  31. package/src/agents/development/reviewer.ts +0 -268
  32. package/src/agents/development/tester.ts +0 -151
  33. package/src/agents/executor.ts +0 -158
  34. package/src/agents/memory/context-manager.ts +0 -171
  35. package/src/agents/memory/decision-logger.ts +0 -160
  36. package/src/agents/memory/knowledge-base.ts +0 -124
  37. package/src/agents/memory/pattern-learner.ts +0 -143
  38. package/src/agents/memory/project-mapper.ts +0 -118
  39. package/src/agents/quality/accessibility.ts +0 -99
  40. package/src/agents/quality/code-quality.ts +0 -115
  41. package/src/agents/quality/compatibility.ts +0 -58
  42. package/src/agents/quality/documentation.ts +0 -105
  43. package/src/agents/quality/error-handling.ts +0 -96
  44. package/src/agents/research/competitor-analyzer.ts +0 -45
  45. package/src/agents/research/cost-analyzer.ts +0 -54
  46. package/src/agents/research/estimator.ts +0 -60
  47. package/src/agents/research/ethics-bias.ts +0 -113
  48. package/src/agents/research/researcher.ts +0 -114
  49. package/src/agents/research/risk-assessor.ts +0 -63
  50. package/src/agents/research/tech-advisor.ts +0 -55
  51. package/src/agents/security/auth.ts +0 -287
  52. package/src/agents/security/dependency-audit.ts +0 -337
  53. package/src/agents/security/penetration.ts +0 -262
  54. package/src/agents/security/privacy.ts +0 -285
  55. package/src/agents/security/scanner.ts +0 -322
  56. package/src/agents/security/secrets.ts +0 -249
  57. package/src/agents/types.ts +0 -66
  58. package/src/agents/workflow/automation.ts +0 -59
  59. package/src/agents/workflow/file-manager.ts +0 -52
  60. package/src/agents/workflow/git-agent.ts +0 -55
  61. package/src/agents/workflow/reporter.ts +0 -51
  62. package/src/agents/workflow/search-agent.ts +0 -40
  63. package/src/agents/workflow/task-coordinator.ts +0 -41
  64. package/src/agents/workflow/task-planner.ts +0 -47
  65. package/src/cli.ts +0 -204
  66. package/src/council/decision-engine.ts +0 -171
  67. package/src/council/devil-advocate.ts +0 -116
  68. package/src/council/index.ts +0 -44
  69. package/src/council/lead-developer.ts +0 -118
  70. package/src/council/legal-compliance.ts +0 -152
  71. package/src/council/product-manager.ts +0 -102
  72. package/src/council/security.ts +0 -172
  73. package/src/council/system-architect.ts +0 -132
  74. package/src/council/types.ts +0 -33
  75. package/src/council/ux-designer.ts +0 -121
  76. package/src/memory/local.ts +0 -305
  77. package/src/memory/schema.ts +0 -174
  78. package/src/memory/sync.ts +0 -274
  79. package/src/router/complexity-scorer.ts +0 -96
  80. package/src/router/context-compressor.ts +0 -74
  81. package/src/router/index.ts +0 -60
  82. package/src/router/learning-updater.ts +0 -271
  83. package/src/router/model-selector.ts +0 -83
  84. package/src/router/rate-monitor.ts +0 -103
  85. package/src/server.ts +0 -1038
  86. package/src/skills/development/skill-api-design.ts +0 -329
  87. package/src/skills/development/skill-auth.ts +0 -271
  88. package/src/skills/development/skill-ci-cd.ts +0 -0
  89. package/src/skills/development/skill-crud.ts +0 -209
  90. package/src/skills/development/skill-db-schema.ts +0 -0
  91. package/src/skills/development/skill-docker.ts +0 -0
  92. package/src/skills/development/skill-env-setup.ts +0 -0
  93. package/src/skills/development/skill-scaffold.ts +0 -323
  94. package/src/skills/intelligence/skill-complexity-score.ts +0 -69
  95. package/src/skills/intelligence/skill-cost-track.ts +0 -39
  96. package/src/skills/intelligence/skill-learning-loop.ts +0 -69
  97. package/src/skills/intelligence/skill-pattern-detect.ts +0 -38
  98. package/src/skills/intelligence/skill-rate-watch.ts +0 -61
  99. package/src/skills/memory/skill-context-compress.ts +0 -98
  100. package/src/skills/memory/skill-cross-sync.ts +0 -104
  101. package/src/skills/memory/skill-decision-log.ts +0 -119
  102. package/src/skills/memory/skill-session-restore.ts +0 -59
  103. package/src/skills/memory/skill-session-save.ts +0 -94
  104. package/src/skills/quality/skill-accessibility.ts +0 -0
  105. package/src/skills/quality/skill-code-review.ts +0 -84
  106. package/src/skills/quality/skill-docs-gen.ts +0 -0
  107. package/src/skills/quality/skill-perf-audit.ts +0 -0
  108. package/src/skills/quality/skill-security-scan.ts +0 -91
  109. package/src/skills/quality/skill-test-suite.ts +0 -290
  110. package/src/skills/workflow/skill-deploy.ts +0 -0
  111. package/src/skills/workflow/skill-git-workflow.ts +0 -0
  112. package/src/skills/workflow/skill-rollback.ts +0 -0
  113. package/src/skills/workflow/skill-task-breakdown.ts +0 -0
  114. package/tsconfig.json +0 -20
package/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # veto
2
2
 
3
- > **50 agents. 28 skills. 3 AIs. Self-learning. Zero extra cost.**
3
+ > **50 agents. 34 tools. 3 AIs. Self-learning. Zero extra cost.**
4
4
 
5
- An MCP server that runs locally on your machine, plugs into Claude Code, Codex CLI, and Gemini CLI using your existing subscriptions — giving every AI a council of specialist agents, persistent cross-platform memory, a self-learning router, and the ability to say no to bad decisions.
5
+ An MCP server that runs locally on your machine, plugs into Claude Code, Codex CLI, and Gemini CLI using your existing subscriptions — giving every AI a council of specialist agents, persistent cross-platform memory, a self-learning router, reactive file watching, sequential agent pipelines, and the ability to say no to bad decisions.
6
6
 
7
7
  ---
8
8
 
@@ -11,25 +11,12 @@ An MCP server that runs locally on your machine, plugs into Claude Code, Codex C
11
11
  | Requirement | Version | Notes |
12
12
  |---|---|---|
13
13
  | **Node.js** | 22.5.0 or higher | Required — uses the built-in `node:sqlite` module (no native compilation). Download at [nodejs.org](https://nodejs.org). |
14
- | **At least one AI CLI** | Latest | Claude Code, Gemini CLI, or Codex CLI — whichever you use. Veto works with all three. See below. |
14
+ | **At least one AI CLI** | Latest | Claude Code, Gemini CLI, or Codex CLI — whichever you use. Veto works with all three. |
15
15
 
16
- **Check your Node version:**
17
16
  ```bash
18
17
  node --version # must be v22.5.0 or higher
19
18
  ```
20
19
 
21
- If you're on an older version, update Node before continuing — Veto will fail silently on Node 18 or 20 because `node:sqlite` does not exist in those versions.
22
-
23
- **Install whichever AI CLI(s) you use — Veto works with all of them:**
24
-
25
- | Platform | Install | Auth |
26
- |---|---|---|
27
- | **Claude Code** | [claude.ai/code](https://claude.ai/code) | Sign in via browser |
28
- | **Gemini CLI** | `npm install -g @google/gemini-cli` | `gemini auth` |
29
- | **Codex CLI** | `npm install -g @openai/codex` | `export OPENAI_API_KEY=your-key` |
30
-
31
- You only need one to get started. Install more to enable cross-platform handoff.
32
-
33
20
  ---
34
21
 
35
22
  ## Quick Start
@@ -38,7 +25,7 @@ You only need one to get started. Install more to enable cross-platform handoff.
38
25
  npx @jigyasudham/veto@latest init
39
26
  ```
40
27
 
41
- The `init` command prints the exact config snippet for your platform. Paste it into your MCP config file:
28
+ `init` auto-detects every AI tool installed on your machine, configures them all, and builds a project map from your current directory — no manual steps.
42
29
 
43
30
  | Platform | Config file |
44
31
  |---|---|
@@ -49,8 +36,6 @@ The `init` command prints the exact config snippet for your platform. Paste it i
49
36
  | **Windsurf** | `~/.codeium/windsurf/mcp_config.json` |
50
37
  | **VS Code** | `.vscode/mcp.json` |
51
38
 
52
- Claude Code, Gemini, Codex, Cursor, and Windsurf all use `"mcpServers"`:
53
-
54
39
  ```json
55
40
  {
56
41
  "mcpServers": {
@@ -80,13 +65,29 @@ VS Code uses `"servers"` with `"type": "stdio"`:
80
65
 
81
66
  **Council** — Before any significant task, 7 specialist agents debate it in parallel and return a GREEN / YELLOW / RED / DEADLOCK verdict. Bad decisions get blocked before any code is written.
82
67
 
83
- **Router** — Every task is scored locally (zero tokens) and sent to the right model tier. Rate limits are tracked across all 3 platforms. The router self-adjusts over time from recorded outcomes.
68
+ **Codebase-aware agents** — Pass `project_dir` to any tool and Veto auto-reads `package.json`, detects your tech stack, and injects recent `git diff` context. Every agent responds to your actual project, not generic templates.
69
+
70
+ **Structured output** — Every agent result carries `confidence`, `severity`, `recommendation`, `affected_files`, and `line_refs` — composable and actionable.
71
+
72
+ **Router** — Every task is scored locally (zero tokens) and sent to the right model tier. Rate limits are tracked across all 3 platforms. The router self-adjusts from recorded outcomes and learns which agents perform best per file type.
73
+
74
+ **50 Agents** — Domain experts for every task type. Each agent knows when it is the right tool and when to defer.
75
+
76
+ **Memory** — Sessions, decisions, knowledge, and coding patterns persist across every conversation and every platform. Memory is automatically scoped to the active session's project directory — two instances working on different projects stay isolated without any extra configuration.
77
+
78
+ **Diff review** — `veto_diff_review` runs code review, security scan, and secrets scan in parallel across a git diff. Returns a pass/warn/fail verdict with per-file findings — ready for CI and pre-commit hooks.
84
79
 
85
- **50 Agents** — Domain experts for every task type. Each agent knows when it is the right tool and when to defer to another.
80
+ **File watching** — `veto_watch` monitors your project and tells you which agent to call when files change.
86
81
 
87
- **Memory** — Sessions, decisions, knowledge, and coding patterns persist across every conversation and every platform.
82
+ **Sequential pipelines** — `veto_workflow` runs a chain of agents with pass/fail gates end to end.
88
83
 
89
- **Cross-platform handoff** — Claude hitting its rate limit? Call `veto_handoff`, open Gemini or Codex, call `veto_continue`. Full context restored in seconds. Nothing re-explained.
84
+ **File explanation** — `veto_explain` reads any file and routes it to the best-fit expert agent automatically.
85
+
86
+ **Plugin system** — Drop a `.js` file in `~/.veto/agents/` and it registers as a custom agent available in every tool.
87
+
88
+ **MCP Resources + Prompts** — Read Veto's memory as MCP Resources. Use built-in Prompts as reusable task templates.
89
+
90
+ **Cross-platform handoff** — Claude hitting its rate limit? `veto_handoff` → open Gemini → `veto_continue`. Full context restored in seconds.
90
91
 
91
92
  ---
92
93
 
@@ -115,42 +116,210 @@ VS Code uses `"servers"` with `"type": "stdio"`:
115
116
 
116
117
  ---
117
118
 
118
- ## MCP Tools (29)
119
+ ## MCP Tools (34)
119
120
 
120
121
  | Category | Tools |
121
122
  |---|---|
122
- | Session | `veto_status` · `veto_session_save` · `veto_session_restore` · `veto_sessions_list` |
123
- | Router | `veto_route_task` · `veto_rate_status` |
124
- | Council | `veto_council_debate` |
125
- | Agents | `veto_agent_plan` · `veto_code_review` · `veto_security_scan` · `veto_secrets_scan` · `veto_execute_parallel` |
126
- | Memory | `veto_memory_store` · `veto_memory_search` · `veto_memory_delete` · `veto_project_map_update` · `veto_project_map_get` · `veto_pattern_store` · `veto_patterns_list` · `veto_memory_export` · `veto_memory_import` |
127
- | Learning | `veto_record_outcome` · `veto_learning_stats` · `veto_learning_apply` |
128
- | Handoff | `veto_handoff` · `veto_continue` · `veto_platform_setup` |
123
+ | **Session** | `veto_status` · `veto_session_save` · `veto_session_restore` · `veto_sessions_list` |
124
+ | **Router** | `veto_route_task` · `veto_rate_status` |
125
+ | **Council** | `veto_council_debate` |
126
+ | **Agents** | `veto_agent_plan` · `veto_execute_parallel` · `veto_explain` |
127
+ | **Review** | `veto_code_review` · `veto_security_scan` · `veto_secrets_scan` · `veto_diff_review` |
128
+ | **Pipelines** | `veto_workflow` |
129
+ | **Watching** | `veto_watch` · `veto_watch_poll` · `veto_watch_stop` |
130
+ | **Memory** | `veto_memory_store` · `veto_memory_search` · `veto_memory_delete` · `veto_project_map_update` · `veto_project_map_get` · `veto_pattern_store` · `veto_patterns_list` · `veto_memory_export` · `veto_memory_import` |
131
+ | **Learning** | `veto_record_outcome` · `veto_learning_stats` · `veto_learning_apply` |
132
+ | **Handoff** | `veto_handoff` · `veto_continue` · `veto_platform_setup` |
133
+ | **Plugins** | `veto_plugins` |
134
+
135
+ ## MCP Resources
136
+
137
+ | URI | What it returns |
138
+ |---|---|
139
+ | `veto://sessions` | All saved sessions across platforms |
140
+ | `veto://project-map?dir=<path>` | Stored project structure map |
141
+ | `veto://memory?q=<query>` | Knowledge base search results |
142
+ | `veto://patterns` | Learned coding patterns |
143
+
144
+ ## MCP Prompts
145
+
146
+ | Prompt | What it does |
147
+ |---|---|
148
+ | `code-review` | Full code review — paste code, get scored findings |
149
+ | `security-audit` | OWASP Top 10 scan with CWE references |
150
+ | `deploy-checklist` | Council reviews your deployment plan before you ship |
151
+ | `explain-file` | Expert explanation of any file, auto-routed by type |
129
152
 
130
153
  ---
131
154
 
132
- ## Cross-Platform Handoff
155
+ ## CLI Commands
156
+
157
+ Use these from any terminal to inspect Veto's brain without opening an AI session.
158
+
159
+ After installing globally (`npm i -g @jigyasudham/veto`) or via npx:
160
+
161
+ ```bash
162
+ veto init # Configure all AI tools + scan project
163
+ veto status # Version, DB path, session/memory/outcome counts
164
+ veto sessions # List last 20 saved sessions
165
+ veto memory [query] # Search knowledge base (blank = all entries)
166
+ veto patterns [prefix] # List learned agent/routing patterns
167
+ veto help # Full command + MCP tools reference
168
+
169
+ # Without installing:
170
+ npx @jigyasudham/veto help # Same help output, no install needed
171
+ npx @jigyasudham/veto status # Check status from any machine
172
+ ```
173
+
174
+ `veto help` shows all CLI commands, all 34 MCP tool names, MCP Resources, and MCP Prompts — the full reference in one place.
175
+
176
+ ---
177
+
178
+ ## Codebase-Aware Agents
179
+
180
+ Pass `project_dir` to any agent tool — Veto auto-injects:
181
+ - Project name, version, dependency list
182
+ - Detected tech stack (React, Next.js, Prisma, Express, MCP, etc.)
183
+ - Recent `git diff --stat` and last 5 commits
184
+ - Config files present (tsconfig, vite.config, tailwind, etc.)
185
+
186
+ ```
187
+ veto_council_debate {
188
+ task: "migrate auth from sessions to JWTs",
189
+ project_dir: "/your/project" ← agents now know your actual stack
190
+ }
191
+ ```
192
+
193
+ ---
194
+
195
+ ## Diff Review
196
+
197
+ Auto-reads `git diff HEAD` from `project_dir`, or pass a diff string directly:
198
+
199
+ ```
200
+ veto_diff_review { project_dir: "/your/project" }
201
+ → {
202
+ verdict: "warn",
203
+ files_changed: 4,
204
+ code_review: { score: 78, critical: 0, high: 2, findings: [...] },
205
+ security: { score: 91, critical: 0, high: 0, findings: [...] },
206
+ secrets: { findings: [] },
207
+ summary: "⚠️ WARN — 4 file(s) changed\nCode: approved_with_warnings (78/100)\n..."
208
+ }
209
+ ```
210
+
211
+ Works as a pre-commit hook or CI step. The `summary` field is a single string ready to post as a PR comment.
212
+
213
+ ---
133
214
 
134
- No accounts. No cloud services. Works on the same machine or across machines.
215
+ ## Sequential Pipelines
216
+
217
+ ```
218
+ veto_workflow {
219
+ steps: [
220
+ { id: "code", agent: "coder", task: "implement auth middleware", gate: 70 },
221
+ { id: "review", agent: "reviewer", task: "review the implementation", gate: 75 },
222
+ { id: "security", agent: "security-scanner", task: "scan for vulnerabilities", gate: 80 },
223
+ { id: "test", agent: "tester", task: "write test cases" }
224
+ ],
225
+ project_dir: "/your/project"
226
+ }
227
+ → { verdict: "passed", steps_passed: 4, steps_failed: 0, results: [...] }
228
+ ```
229
+
230
+ If any step's confidence falls below its gate, the pipeline halts and returns `partial` with the exact failure point.
231
+
232
+ ---
233
+
234
+ ## Reactive File Watching
235
+
236
+ ```bash
237
+ veto_watch { project_dir: "/your/project" }
238
+ → { watch_id: "a3f2b1c0" }
239
+
240
+ # make some changes, then:
241
+ veto_watch_poll { watch_id: "a3f2b1c0" }
242
+ → [
243
+ { file: "src/auth.ts", recommended_agent: "code-quality", suggested_tool: "veto_code_review" },
244
+ { file: "package.json", recommended_agent: "dependency-audit", suggested_tool: "veto_agent_plan" },
245
+ { file: ".env", recommended_agent: "secrets", suggested_tool: "veto_secrets_scan" }
246
+ ]
247
+ ```
248
+
249
+ ---
250
+
251
+ ## Self-Learning Router
252
+
253
+ The router gets smarter as you use it:
254
+
255
+ ```bash
256
+ # After completing a task:
257
+ veto_record_outcome {
258
+ task_type: "fix-auth-bug",
259
+ complexity: 45,
260
+ model_tier: 2,
261
+ output_quality: 88,
262
+ agent: "debugger",
263
+ file_ext: ".ts" # ← teaches the router which agent works best for .ts files
264
+ }
265
+
266
+ # After 20+ outcomes:
267
+ veto_learning_apply # adjusts tier thresholds from your actual data
268
+
269
+ # Next route_task call:
270
+ veto_route_task { task: "debug auth issue", file_ext: ".ts" }
271
+ → { ..., recommended_agent: "debugger" } # ← predicted from history
272
+ ```
273
+
274
+ ---
275
+
276
+ ## Plugin System
277
+
278
+ Register custom agents without forking:
279
+
280
+ ```js
281
+ // ~/.veto/agents/my-agent.js
282
+ export function plan(task, context) {
283
+ return {
284
+ agent: 'my-agent',
285
+ task,
286
+ tier: 2,
287
+ approach: 'Your custom approach...',
288
+ steps: ['Step 1', 'Step 2'],
289
+ checklist: ['[ ] Check 1'],
290
+ pitfalls: ['Pitfall 1'],
291
+ patterns: ['Pattern 1'],
292
+ duration_estimate: '1-2 hours',
293
+ };
294
+ }
295
+ ```
296
+
297
+ Veto loads it on start. Use it in `veto_agent_plan { agent: "my-agent" }` or `veto_execute_parallel`.
298
+
299
+ ---
300
+
301
+ ## Cross-Platform Handoff
135
302
 
136
303
  **Rate limit mid-task:**
137
304
  ```
138
305
  Claude at 90% → veto_handoff { summary, context }
139
- Open Gemini → veto_continue
306
+ Open Gemini → veto_continue { resuming_as: "gemini" }
140
307
  Full context restored. Continue exactly where you stopped.
141
308
  ```
142
309
 
310
+ Every session tracks two fields:
311
+ - `created_by` — which AI originally saved the session
312
+ - `active_client` — which AI last resumed it (updated on every `veto_continue` or `veto_session_restore`)
313
+
314
+ **Multiple AIs on different projects simultaneously:** Each MCP server process is independent. Sessions are always separate. Memory is automatically scoped to each process's active project — no cross-contamination.
315
+
143
316
  **Switch machines:**
144
317
  ```
145
318
  Machine A → veto_memory_export → veto-export.json
146
- copy file any way (Dropbox, USB, scp)
147
- Machine B → veto_memory_import
148
- veto_session_restore → resume instantly
319
+ Machine B → veto_memory_import → veto_session_restore
149
320
  ```
150
321
 
151
- **Platform support:**
152
-
153
- | Platform | Works with Veto |
322
+ | Platform | Support |
154
323
  |---|---|
155
324
  | Claude Code | ✅ Native MCP |
156
325
  | Gemini CLI | ✅ MCP support |
@@ -161,16 +330,6 @@ Machine B → veto_memory_import
161
330
 
162
331
  ---
163
332
 
164
- ## Self-Learning Router
165
-
166
- The router gets smarter as you use it:
167
-
168
- 1. Complete a task → `veto_record_outcome` with quality score (0–100)
169
- 2. After 20+ outcomes → `veto_learning_apply`
170
- 3. Tier thresholds adjust — over-routed tasks self-correct over time
171
-
172
- ---
173
-
174
333
  ## Roadmap
175
334
 
176
335
  | Phase | Status | Version |
@@ -183,16 +342,20 @@ The router gets smarter as you use it:
183
342
  | 6 — Self-Learning | ✅ Complete | v0.6.0 |
184
343
  | 7 — Cross-Platform | ✅ Complete | v0.7.0 |
185
344
  | 8 — All 50 Agents | ✅ Complete | v0.8.0 |
345
+ | 9 — Codebase Context + Structured Output + MCP Resources/Prompts | ✅ Complete | v0.9.0 |
346
+ | 10 — Watch, Workflow, Explain, Plugins | ✅ Complete | v0.10.0 |
347
+ | 11 — Smarter Council + Predictive Routing + Auto Project Map | ✅ Complete | v0.11.0 |
348
+ | 12 — CLI Subcommands + Diff Review | ✅ Complete | v1.0.0 |
186
349
 
187
350
  ---
188
351
 
189
352
  ## Tech Stack
190
353
 
191
354
  - **Language:** TypeScript (strict mode)
192
- - **Runtime:** Node.js 22.5+ (required — uses built-in `node:sqlite`)
193
- - **Dependencies:** `@modelcontextprotocol/sdk` only — one package, no native addons
194
- - **Memory:** SQLite via `node:sqlite` — zero native compilation, zero configuration, works offline
195
- - **Cross-machine:** File-based JSON export/import no external services, no accounts
355
+ - **Runtime:** Node.js 22.5+ (built-in `node:sqlite` — no native compilation)
356
+ - **Dependencies:** `@modelcontextprotocol/sdk` only — one package, zero native addons
357
+ - **Memory:** Local SQLite — zero config, works offline, portable via JSON export
358
+ - **Platforms:** Claude Code · Gemini CLI · Codex CLI · Cursor · Windsurf · VS Code
196
359
 
197
360
  ---
198
361
 
@@ -37,10 +37,10 @@ export function handoff(options) {
37
37
  };
38
38
  }
39
39
  // ─── Continue ─────────────────────────────────────────────────────────────────
40
- export function continueSession(sessionId) {
40
+ export function continueSession(sessionId, active_client) {
41
41
  const now = new Date().toISOString();
42
42
  if (sessionId) {
43
- const result = restoreSession(sessionId);
43
+ const result = restoreSession(sessionId, active_client);
44
44
  if (!result.found || !result.session) {
45
45
  return { found: false, message: `No session found with ID: ${sessionId}`, restored_at: now };
46
46
  }
@@ -55,7 +55,7 @@ export function continueSession(sessionId) {
55
55
  restored_at: now,
56
56
  };
57
57
  }
58
- const result = restoreSession(sessions[0].id);
58
+ const result = restoreSession(sessions[0].id, active_client);
59
59
  if (!result.found || !result.session) {
60
60
  return { found: false, message: 'Could not restore the most recent session.', restored_at: now };
61
61
  }
@@ -98,6 +98,7 @@ function buildContinueResult(session, now) {
98
98
  found: true,
99
99
  session_id: session.id,
100
100
  platform: session.platform,
101
+ active_client: session.active_client ?? undefined,
101
102
  summary: session.summary ?? undefined,
102
103
  context,
103
104
  task_state,
@@ -1,3 +1,5 @@
1
+ import { buildContextString } from '../context/reader.js';
2
+ import { getPlugin } from '../plugins/loader.js';
1
3
  // Development agents
2
4
  import * as coder from './development/coder.js';
3
5
  import * as reviewer from './development/reviewer.js';
@@ -101,30 +103,60 @@ function resolveAgent(agentType) {
101
103
  case 'search-agent': return searchAgent;
102
104
  case 'reporter': return reporter;
103
105
  case 'automation': return automation;
104
- default:
106
+ default: {
107
+ const plugin = getPlugin(agentType);
108
+ if (plugin)
109
+ return plugin;
105
110
  throw new Error(`Unknown agent type: ${agentType}`);
111
+ }
112
+ }
113
+ }
114
+ function deriveOutput(plan, analysis) {
115
+ if (analysis) {
116
+ return {
117
+ confidence: Math.min(1, Math.max(0, analysis.score / 100)),
118
+ severity: analysis.critical_count > 0 ? 'critical' : analysis.high_count > 0 ? 'high' : 'medium',
119
+ recommendation: analysis.summary,
120
+ affected_files: [],
121
+ line_refs: analysis.findings
122
+ .filter(f => f.location)
123
+ .map(f => ({ file: f.location, line: 0, description: f.description })),
124
+ };
125
+ }
126
+ if (plan) {
127
+ return {
128
+ confidence: 0.8,
129
+ severity: 'info',
130
+ recommendation: plan.approach,
131
+ affected_files: [],
132
+ line_refs: [],
133
+ };
106
134
  }
135
+ return { confidence: 0, severity: 'info', recommendation: '', affected_files: [], line_refs: [] };
107
136
  }
108
137
  export async function executeOne(task) {
109
138
  const start = Date.now();
110
139
  try {
111
140
  const agent = resolveAgent(task.agent);
112
141
  const useAnalyze = task.code !== undefined && ANALYZE_CAPABLE.has(task.agent);
142
+ const enrichedContext = buildContextString(task.project_dir, task.context);
113
143
  if (useAnalyze && agent.analyze) {
114
- const analysis = agent.analyze(task.code, task.context);
144
+ const analysis = agent.analyze(task.code, enrichedContext || task.context);
115
145
  return {
116
146
  id: task.id,
117
147
  agent: task.agent,
118
148
  analysis,
149
+ output: deriveOutput(undefined, analysis),
119
150
  duration_ms: Date.now() - start,
120
151
  };
121
152
  }
122
153
  else {
123
- const plan = agent.plan(task.task, task.context);
154
+ const plan = agent.plan(task.task, enrichedContext || task.context);
124
155
  return {
125
156
  id: task.id,
126
157
  agent: task.agent,
127
158
  plan,
159
+ output: deriveOutput(plan, undefined),
128
160
  duration_ms: Date.now() - start,
129
161
  };
130
162
  }
@@ -133,6 +165,7 @@ export async function executeOne(task) {
133
165
  return {
134
166
  id: task.id,
135
167
  agent: task.agent,
168
+ output: { confidence: 0, severity: 'info', recommendation: '', affected_files: [], line_refs: [] },
136
169
  duration_ms: Date.now() - start,
137
170
  error: err instanceof Error ? err.message : String(err),
138
171
  };