@snapback/cli 1.6.0 → 3.0.1
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 +121 -22
- package/dist/SkippedTestDetector-AXTMWWHC.js +5 -0
- package/dist/SkippedTestDetector-QLSQV7K7.js +5 -0
- package/dist/analysis-6WTBZJH3.js +6 -0
- package/dist/analysis-C472LUGW.js +2475 -0
- package/dist/auth-UA7I3YE4.js +1446 -0
- package/dist/auto-provision-organization-6YF463TK.js +161 -0
- package/dist/{chunk-FVIYXFCL.js → chunk-4YTE4JEW.js} +2 -3
- package/dist/chunk-5EOPYJ4Y.js +12 -0
- package/dist/{chunk-ARVV3F4K.js → chunk-5SQA44V7.js} +1085 -18
- package/dist/{chunk-RB7H4UQJ.js → chunk-7ADPL4Q3.js} +10 -3
- package/dist/chunk-BE3HNVSV.js +2300 -0
- package/dist/chunk-BWWPGNZ5.js +5842 -0
- package/dist/chunk-CBGOC6RV.js +293 -0
- package/dist/{chunk-7JX6Y4TL.js → chunk-DPWFZNMY.js} +21 -34
- package/dist/{chunk-R7CUQ7CU.js → chunk-E6V6QKS7.js} +317 -33
- package/dist/chunk-GT4ZUCFR.js +111 -0
- package/dist/chunk-NOWJBG6X.js +3654 -0
- package/dist/chunk-O7HMAZ7L.js +3497 -0
- package/dist/chunk-PL4HF4M2.js +593 -0
- package/dist/chunk-V7B37PPD.js +4075 -0
- package/dist/chunk-YVZXPBSV.js +314 -0
- package/dist/chunk-ZBQDE6WJ.js +108 -0
- package/dist/client-RHDS6NOB.js +8 -0
- package/dist/dist-5LR7APG5.js +5 -0
- package/dist/dist-CUHOKNLS.js +12 -0
- package/dist/dist-RJE4RSZJ.js +9 -0
- package/dist/index.js +60568 -36578
- package/dist/local-service-adapter-AB3UYRUK.js +6 -0
- package/dist/pioneer-oauth-hook-V2JKEXM7.js +12 -0
- package/dist/{secure-credentials-IWQB6KU4.js → secure-credentials-UEPG7GWW.js} +2 -3
- package/dist/snapback-dir-MG7DTRMF.js +6 -0
- package/package.json +12 -11
- package/scripts/postinstall.mjs +2 -3
- package/dist/SkippedTestDetector-5WJZKZQ3.js +0 -5
- package/dist/SkippedTestDetector-5WJZKZQ3.js.map +0 -1
- package/dist/analysis-YI4UNUCM.js +0 -6
- package/dist/analysis-YI4UNUCM.js.map +0 -1
- package/dist/chunk-7JX6Y4TL.js.map +0 -1
- package/dist/chunk-ARVV3F4K.js.map +0 -1
- package/dist/chunk-EU2IZPOK.js +0 -13002
- package/dist/chunk-EU2IZPOK.js.map +0 -1
- package/dist/chunk-FVIYXFCL.js.map +0 -1
- package/dist/chunk-R7CUQ7CU.js.map +0 -1
- package/dist/chunk-RB7H4UQJ.js.map +0 -1
- package/dist/chunk-SOABQWAU.js +0 -385
- package/dist/chunk-SOABQWAU.js.map +0 -1
- package/dist/dist-O6EBXLN6.js +0 -5
- package/dist/dist-O6EBXLN6.js.map +0 -1
- package/dist/dist-PJVBBZTF.js +0 -5
- package/dist/dist-PJVBBZTF.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/learning-pruner-QC4CTJDX.js +0 -5
- package/dist/learning-pruner-QC4CTJDX.js.map +0 -1
- package/dist/secure-credentials-IWQB6KU4.js.map +0 -1
- package/dist/snapback-dir-V6MWXIW4.js +0 -5
- package/dist/snapback-dir-V6MWXIW4.js.map +0 -1
package/README.md
CHANGED
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
[](https://www.npmjs.com/package/@snapback/cli)
|
|
7
7
|
[](https://github.com/snapback-dev/snapback-cli/blob/main/LICENSE)
|
|
8
8
|
|
|
9
|
-
AI coding
|
|
9
|
+
AI coding agents—Cursor, Claude Code, GitHub Copilot, Windsurf—are incredible until they're not. One hallucinated change cascades into hours of debugging. Git doesn't help because you haven't committed yet. And the faster you vibe-code, the faster mistakes compound.
|
|
10
10
|
|
|
11
|
-
**SnapBack
|
|
11
|
+
**SnapBack makes your codebase smarter every session.** Day 1: Detection. Day 30: Patterns. Day 90: Prediction.
|
|
12
12
|
|
|
13
13
|
## Why SnapBack?
|
|
14
14
|
|
|
@@ -22,8 +22,8 @@ AI coding assistants like **Cursor**, **GitHub Copilot**, and **Claude** are inc
|
|
|
22
22
|
|
|
23
23
|
### Key Metrics
|
|
24
24
|
|
|
25
|
-
- ⚡ **<100ms** snapshot creation
|
|
26
|
-
- 🎯 **89%** AI change detection accuracy
|
|
25
|
+
- ⚡ **<100ms** snapshot creation (tested on 10K file repo, MacBook Pro M1, SSD)
|
|
26
|
+
- 🎯 **89%** AI change detection accuracy (internal benchmark, Q4 2025)
|
|
27
27
|
- 🔒 **Privacy-first** — code never leaves your machine
|
|
28
28
|
- 🧠 **Self-improving** — learns from your mistakes automatically
|
|
29
29
|
|
|
@@ -52,6 +52,8 @@ For terminal workflows, CI/CD integration, and MCP server setup:
|
|
|
52
52
|
```bash
|
|
53
53
|
# Install globally
|
|
54
54
|
npm install -g @snapback/cli
|
|
55
|
+
# or
|
|
56
|
+
pnpm add -g @snapback/cli
|
|
55
57
|
|
|
56
58
|
# Or run without installing
|
|
57
59
|
npx @snapback/cli <command>
|
|
@@ -83,13 +85,20 @@ snap undo
|
|
|
83
85
|
|
|
84
86
|
---
|
|
85
87
|
|
|
86
|
-
##
|
|
88
|
+
## Integration with AI Tools & Editors
|
|
87
89
|
|
|
88
|
-
SnapBack
|
|
90
|
+
SnapBack supports **two protocol layers** for maximum compatibility:
|
|
89
91
|
|
|
90
|
-
###
|
|
92
|
+
### MCP Integration (AI Assistants)
|
|
91
93
|
|
|
92
|
-
|
|
94
|
+
**Model Context Protocol** for AI assistants like Claude, Cursor, and Windsurf.
|
|
95
|
+
|
|
96
|
+
**Supported AI Tools:**
|
|
97
|
+
- **Claude Desktop** - `.claude/mcp.json` or `~/.claude.json`
|
|
98
|
+
- **Qoder** - `.qoder-mcp-config.json`
|
|
99
|
+
- **Cursor, Windsurf, cline, Gemini, Roo Code** - `mcpServers` format
|
|
100
|
+
|
|
101
|
+
**Quick Setup:**
|
|
93
102
|
|
|
94
103
|
```bash
|
|
95
104
|
# Auto-detect and configure all AI tools
|
|
@@ -101,6 +110,55 @@ snap tools configure --claude
|
|
|
101
110
|
snap tools configure --windsurf
|
|
102
111
|
```
|
|
103
112
|
|
|
113
|
+
### ACP Integration (Editor Agents)
|
|
114
|
+
|
|
115
|
+
**Agent Communication Protocol** for editor-native agents in Zed, JetBrains, and Neovim.
|
|
116
|
+
|
|
117
|
+
**Supported Editors:**
|
|
118
|
+
- **Zed** - `~/.config/zed/settings.json` (`agent_servers`)
|
|
119
|
+
- **JetBrains AI Assistant** - `~/.config/jetbrains/ai-assistant.json`
|
|
120
|
+
- **Neovim** - Coming soon
|
|
121
|
+
|
|
122
|
+
**Quick Setup:**
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
# Auto-configure for Zed
|
|
126
|
+
snap acp configure --zed
|
|
127
|
+
|
|
128
|
+
# Auto-configure for JetBrains
|
|
129
|
+
snap acp configure --jetbrains
|
|
130
|
+
|
|
131
|
+
# Or configure all detected editors
|
|
132
|
+
snap acp configure --all
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
**Manual Setup:**
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
# View configuration examples
|
|
139
|
+
snap acp info
|
|
140
|
+
|
|
141
|
+
# Start ACP server manually
|
|
142
|
+
snap acp serve
|
|
143
|
+
|
|
144
|
+
# Or start with workspace path and verbose logging
|
|
145
|
+
snap acp serve --workspace /path/to/project --verbose
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
**How it works:** The `snap acp serve` command starts a JSON-RPC 2.0 server over stdin/stdout that your editor communicates with. No network required - fully local.
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
### Compatibility Matrix
|
|
153
|
+
|
|
154
|
+
| Integration Layer | Protocol | Editors/Tools |
|
|
155
|
+
|-------------------|----------|---------------|
|
|
156
|
+
| **VS Code Extension** | Extension API | VS Code, Cursor, VSCodium, Code Server |
|
|
157
|
+
| **MCP** | JSON-RPC over stdio | Claude Desktop, Qoder, Windsurf, cline, Gemini, Roo Code |
|
|
158
|
+
| **ACP** | JSON-RPC 2.0 + Content-Length | Zed, JetBrains, Neovim |
|
|
159
|
+
|
|
160
|
+
**Total**: 13 tools/editors across 3 protocol layers.
|
|
161
|
+
|
|
104
162
|
### Manual Setup
|
|
105
163
|
|
|
106
164
|
If you prefer manual configuration or the auto-setup doesn't work, add this to your AI tool's MCP config:
|
|
@@ -203,14 +261,33 @@ snap tools repair
|
|
|
203
261
|
|
|
204
262
|
### Available MCP Tools
|
|
205
263
|
|
|
206
|
-
Once configured, your AI assistant
|
|
264
|
+
Once configured, your AI assistant uses the **V2 4-tool surface** — a session-oriented API designed for agentic coding loops:
|
|
207
265
|
|
|
208
|
-
| Tool |
|
|
209
|
-
|
|
210
|
-
| `
|
|
211
|
-
| `
|
|
212
|
-
| `
|
|
213
|
-
| `
|
|
266
|
+
| Tool | When to call | What it returns |
|
|
267
|
+
|------|-------------|----------------|
|
|
268
|
+
| `snap_begin` | Start of every task | Intelligence briefing: past learnings, active warnings, session lineage |
|
|
269
|
+
| `snap_pulse` | Mid-session check | Read-only vitals: pulse level, risk pressure, trajectory |
|
|
270
|
+
| `snap_learn` | Any discovery | Captures a pattern, gotcha, or decision for future sessions |
|
|
271
|
+
| `snap_end` | Task complete | Ceremony: outcome recorded, carry-forward context for next session |
|
|
272
|
+
|
|
273
|
+
**The agentic workflow** (runs automatically in your AI assistant):
|
|
274
|
+
|
|
275
|
+
```
|
|
276
|
+
snap_begin({ task: "refactor auth module" })
|
|
277
|
+
→ briefing with learnings, warnings, risk context
|
|
278
|
+
|
|
279
|
+
[... agent works ...]
|
|
280
|
+
|
|
281
|
+
snap_pulse() // optional mid-session check
|
|
282
|
+
→ pulse: elevated, pressure: 42%, trajectory: stable
|
|
283
|
+
|
|
284
|
+
snap_learn({ insight: "always snapshot before token refresh logic" })
|
|
285
|
+
|
|
286
|
+
snap_end({ outcome: "completed", summary: "..." })
|
|
287
|
+
→ ceremony: files changed, patterns captured, context for next session
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
The full surface (check, advise, safe_to_write, refactoring intelligence, learning intelligence) is also available for advanced workflows — see [MCP documentation →](https://docs.snapback.dev/mcp).
|
|
214
291
|
|
|
215
292
|
---
|
|
216
293
|
|
|
@@ -273,10 +350,13 @@ Once configured, your AI assistant can use:
|
|
|
273
350
|
|
|
274
351
|
| Command | Description |
|
|
275
352
|
|---------|-------------|
|
|
276
|
-
| `snap context [task]` |
|
|
353
|
+
| `snap context [task]` | Pre-task briefing: relevant patterns, warnings, risk context (CLI equivalent of `snap_begin`) |
|
|
277
354
|
| `snap validate <file>` | Run 7-layer validation pipeline |
|
|
278
355
|
| `snap validate --all` | Validate all staged files |
|
|
279
356
|
| `snap stats` | Show learning statistics |
|
|
357
|
+
| `snap metrics [file]` | File momentum scores — which files are highest-churn / highest-risk |
|
|
358
|
+
| `snap sync` | Collect signals and fit momentum scoring normalizers |
|
|
359
|
+
| `snap refresh [--since]` | Incremental signal update |
|
|
280
360
|
|
|
281
361
|
### Learning Commands
|
|
282
362
|
|
|
@@ -295,7 +375,10 @@ Once configured, your AI assistant can use:
|
|
|
295
375
|
| `snap protect remove <file>` | Remove from protection |
|
|
296
376
|
| `snap protect list` | List protected files |
|
|
297
377
|
| `snap session start` | Start a coding session |
|
|
298
|
-
| `snap session end` | End current session |
|
|
378
|
+
| `snap session end` | End current session (with learnings and validation) |
|
|
379
|
+
| `snap session end -l "learning"` | End session and capture learnings |
|
|
380
|
+
| `snap session end --ceremony` | End with validation (quick/standard/comprehensive) |
|
|
381
|
+
| `snap session end --outcome completed` | End with outcome status |
|
|
299
382
|
| `snap watch` | Continuous file watching |
|
|
300
383
|
|
|
301
384
|
### MCP & Tools Commands
|
|
@@ -313,14 +396,30 @@ Once configured, your AI assistant can use:
|
|
|
313
396
|
| `snap tools validate` | Validate MCP configurations |
|
|
314
397
|
| `snap tools repair` | Repair broken MCP configurations |
|
|
315
398
|
|
|
316
|
-
### Daemon Commands
|
|
399
|
+
### Daemon & Service Commands
|
|
317
400
|
|
|
318
401
|
| Command | Description |
|
|
319
402
|
|---------|-------------|
|
|
320
|
-
| `snap daemon start` | Start SnapBack daemon |
|
|
403
|
+
| `snap daemon start [--detach]` | Start SnapBack daemon (CLI↔Extension coordination) |
|
|
321
404
|
| `snap daemon stop` | Stop SnapBack daemon |
|
|
322
405
|
| `snap daemon status` | Check daemon status |
|
|
323
406
|
| `snap daemon restart` | Restart daemon |
|
|
407
|
+
| `snap daemon ping` | Verify daemon is responsive |
|
|
408
|
+
| `snap service start [--daemon]` | Start local service (shared state for multi-client) |
|
|
409
|
+
| `snap service stop` | Stop local service |
|
|
410
|
+
| `snap service status` | Check service status |
|
|
411
|
+
| `snap service logs [--follow]` | Stream service logs |
|
|
412
|
+
| `snap service install` | Register as system service |
|
|
413
|
+
| `snap service uninstall` | Unregister system service |
|
|
414
|
+
|
|
415
|
+
### Workspace Baseline Commands
|
|
416
|
+
|
|
417
|
+
| Command | Description |
|
|
418
|
+
|---------|-------------|
|
|
419
|
+
| `snap baseline scan` | Scan workspace and build intelligence baseline |
|
|
420
|
+
| `snap baseline status` | Show baseline freshness and coverage |
|
|
421
|
+
| `snap baseline show` | Display current baseline data |
|
|
422
|
+
| `snap baseline invalidate` | Force baseline rebuild on next scan |
|
|
324
423
|
|
|
325
424
|
### Utility Commands
|
|
326
425
|
|
|
@@ -329,7 +428,7 @@ Once configured, your AI assistant can use:
|
|
|
329
428
|
| `snap wizard` | Interactive first-run setup |
|
|
330
429
|
| `snap doctor` | Diagnostics and health check |
|
|
331
430
|
| `snap doctor --fix` | Auto-fix detected issues |
|
|
332
|
-
| `snap upgrade` |
|
|
431
|
+
| `snap upgrade [--check|--canary]` | Update CLI or check for new version |
|
|
333
432
|
| `snap config list` | List configuration values |
|
|
334
433
|
| `snap config get <key>` | Get a specific config value |
|
|
335
434
|
| `snap config set <key> <value>` | Set a configuration value |
|
|
@@ -580,7 +679,7 @@ $ snap doctor
|
|
|
580
679
|
|
|
581
680
|
Unlock Pro features like checkpoint creation and restoration:
|
|
582
681
|
|
|
583
|
-
👉 **[console.snapback.dev/settings/api-keys](https://console.snapback.dev/settings/api-keys)**
|
|
682
|
+
👉 **[console.snapback.dev/app/settings/api-keys](https://console.snapback.dev/app/settings/api-keys)**
|
|
584
683
|
|
|
585
684
|
---
|
|
586
685
|
|
|
@@ -591,7 +690,7 @@ Unlock Pro features like checkpoint creation and restoration:
|
|
|
591
690
|
---
|
|
592
691
|
|
|
593
692
|
<p align="center">
|
|
594
|
-
<strong>
|
|
693
|
+
<strong>SnapBack saw it coming.</strong><br>
|
|
595
694
|
<a href="https://snapback.dev">Website</a> ·
|
|
596
695
|
<a href="https://docs.snapback.dev">Docs</a> ·
|
|
597
696
|
<a href="https://console.snapback.dev">Dashboard</a> ·
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
#!/usr/bin/env node --no-warnings=ExperimentalWarning
|
|
2
|
+
export { ChangeImpactAnalyzer, CompletenessAnalyzer, ComplexityAnalyzer, ImportGraphAnalyzer, SecurityAnalyzer, SyntaxAnalyzer, checkFilesForOrphanStatus, countASTNodes, createChangeImpactAnalyzer, detectOrphans, extractImportSources, extractImports, extractImportsBatch, filterOrphansToFiles, isSupportedFile, offsetToLine, parseSource, runAnalysisPipeline, runStaticAnalysis, walkAST } from './chunk-5SQA44V7.js';
|
|
3
|
+
export { analyzeSkippedTests, detectSkippedTests, getSkippedTestSummary } from './chunk-4YTE4JEW.js';
|
|
4
|
+
import './chunk-7ADPL4Q3.js';
|
|
5
|
+
|
|
6
|
+
process.env.SNAPBACK_CLI='true';
|