spidersan 0.4.2 → 0.4.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.
- package/CHANGELOG.md +65 -0
- package/README.md +73 -29
- package/dist/bin/spidersan.d.ts.map +1 -1
- package/dist/bin/spidersan.js +14 -2
- package/dist/bin/spidersan.js.map +1 -1
- package/dist/commands/auto.d.ts +8 -0
- package/dist/commands/auto.d.ts.map +1 -0
- package/dist/commands/auto.js +206 -0
- package/dist/commands/auto.js.map +1 -0
- package/dist/commands/config.d.ts +15 -0
- package/dist/commands/config.d.ts.map +1 -0
- package/dist/commands/config.js +337 -0
- package/dist/commands/config.js.map +1 -0
- package/dist/commands/conflicts.d.ts.map +1 -1
- package/dist/commands/conflicts.js +39 -20
- package/dist/commands/conflicts.js.map +1 -1
- package/dist/commands/ecosystem-loader.d.ts.map +1 -1
- package/dist/commands/ecosystem-loader.js +12 -0
- package/dist/commands/ecosystem-loader.js.map +1 -1
- package/dist/commands/index.d.ts +4 -0
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/index.js +4 -0
- package/dist/commands/index.js.map +1 -1
- package/dist/commands/ready-check.d.ts +1 -0
- package/dist/commands/ready-check.d.ts.map +1 -1
- package/dist/commands/ready-check.js +1 -1
- package/dist/commands/ready-check.js.map +1 -1
- package/dist/commands/rebase-helper.d.ts +3 -0
- package/dist/commands/rebase-helper.d.ts.map +1 -0
- package/dist/commands/rebase-helper.js +44 -0
- package/dist/commands/rebase-helper.js.map +1 -0
- package/dist/commands/register.d.ts +1 -0
- package/dist/commands/register.d.ts.map +1 -1
- package/dist/commands/register.js +35 -2
- package/dist/commands/register.js.map +1 -1
- package/dist/commands/rescue.d.ts.map +1 -1
- package/dist/commands/rescue.js +28 -7
- package/dist/commands/rescue.js.map +1 -1
- package/dist/commands/torrent.js +32 -11
- package/dist/commands/torrent.js.map +1 -1
- package/dist/commands/watch.d.ts.map +1 -1
- package/dist/commands/watch.js +18 -5
- package/dist/commands/watch.js.map +1 -1
- package/dist/commands/welcome.d.ts +5 -0
- package/dist/commands/welcome.d.ts.map +1 -1
- package/dist/commands/welcome.js +27 -34
- package/dist/commands/welcome.js.map +1 -1
- package/dist/lib/config.d.ts +29 -0
- package/dist/lib/config.d.ts.map +1 -1
- package/dist/lib/config.js +116 -28
- package/dist/lib/config.js.map +1 -1
- package/dist/lib/security.d.ts +10 -8
- package/dist/lib/security.d.ts.map +1 -1
- package/dist/lib/security.js +26 -1
- package/dist/lib/security.js.map +1 -1
- package/dist/storage/git-messages.d.ts.map +1 -1
- package/dist/storage/git-messages.js +55 -53
- package/dist/storage/git-messages.js.map +1 -1
- package/package.json +4 -2
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
## [0.4.5] - 2026-02-18
|
|
11
|
+
### Added
|
|
12
|
+
- **Fork Sync Use Case**: New documentation pattern for safely cherry-picking commits from a public fork into a private branch using spidersan conflict detection (`docs/USE_CASES.md` Use Case #8)
|
|
13
|
+
- **Fork Sync Best Practices**: Per-commit classification workflow (SAFE / NEEDS-REVIEW / SKIP) documented in `BEST_PRACTICES.md`
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
- **Security: Command injection in git adapter** — `execSync` with string interpolation replaced with `execFileSync`/`spawnSync` with argument arrays across all git operations (PR #13)
|
|
17
|
+
- **Security: Arbitrary file read in rescue command** — Path traversal vulnerability fixed in `rescue` command
|
|
18
|
+
- **Security: Input validation bypass in register** — File path and agent ID validation now covers all input sources (flags, auto-detection, prompts) in `register` and `conflicts --cleanup` commands (PR #14, #16)
|
|
19
|
+
- **Security: Git command injection** — Comprehensive fix for remaining injection vectors (PR #17)
|
|
20
|
+
- `_testable` export from `config.ts` for prototype pollution tests
|
|
21
|
+
|
|
22
|
+
### Documentation
|
|
23
|
+
- Fork Sync use case with full spidersan workflow example
|
|
24
|
+
- Best practices: Fork Sync Workflow section
|
|
25
|
+
- Auto-register use cases guide (`AUTO_REGISTER_USE_CASES.md`)
|
|
26
|
+
- MCP integration config for Copilot
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
### Added
|
|
30
|
+
- **GitHub Actions Auto-Register Workflow**: Automatic branch registration on every push
|
|
31
|
+
- Extracts agent name from branch prefix (e.g., `claude/feature` → `claude`)
|
|
32
|
+
- Auto-detects changed files via git diff
|
|
33
|
+
- Runs conflict detection with TIER 2+ warnings
|
|
34
|
+
- Handles first push to new branches correctly
|
|
35
|
+
- Documented in `AUTO_REGISTER_USE_CASES.md` with 10 real-world scenarios
|
|
36
|
+
|
|
37
|
+
### Fixed
|
|
38
|
+
- GitHub workflow: Removed invalid `--branch` flag from `spidersan register` command
|
|
39
|
+
- GitHub workflow: Added `spidersan init` step to initialize environment
|
|
40
|
+
- GitHub workflow: Fixed file detection for first push to new branches (null SHA handling)
|
|
41
|
+
|
|
42
|
+
### Documentation
|
|
43
|
+
- Added comprehensive auto-register use cases guide
|
|
44
|
+
- Updated README with GitHub Actions auto-register section
|
|
45
|
+
- Added Lesson #12 to SPIDERSAN_LESSONS_LEARNED.md for workflow --branch flag issue
|
|
46
|
+
|
|
47
|
+
## [0.4.3] - 2026-01-27
|
|
48
|
+
### Added
|
|
49
|
+
- `spidersan welcome` onboarding command for core.
|
|
50
|
+
- `spidersan config` command with guided wizard, global/local config support, and ecosystem toggle.
|
|
51
|
+
- Config fields for `agent.name` and `autoWatch` presets.
|
|
52
|
+
- `spidersan auto start|stop|status` for background watch sessions.
|
|
53
|
+
- `spidersan watch --paths` and `--root` for scoped watching.
|
|
54
|
+
|
|
55
|
+
### Changed
|
|
56
|
+
- `spidersan register` and `spidersan watch` now default to `agent.name` from config when set.
|
|
57
|
+
- Ecosystem commands only load when enabled in config (or not disabled via env).
|
|
58
|
+
|
|
59
|
+
## [0.4.2] - 2026-01-26
|
|
60
|
+
|
|
61
|
+
### Changed
|
|
62
|
+
- README updated with Support section.
|
|
63
|
+
|
|
64
|
+
### Fixed
|
|
65
|
+
- npm `bin` field normalized to avoid publish warnings.
|
package/README.md
CHANGED
|
@@ -19,13 +19,7 @@
|
|
|
19
19
|
|
|
20
20
|
## 🎯 The Problem
|
|
21
21
|
|
|
22
|
-
**
|
|
23
|
-
|
|
24
|
-
In our experience:
|
|
25
|
-
- ⏱️ ~51 min to complete 1 shared file
|
|
26
|
-
- 💥 12 conflicts
|
|
27
|
-
- 🔥 2 build breaks pushed to main
|
|
28
|
-
- 😰 Frustration level: 5/5
|
|
22
|
+
**A multi coders or agents and multi branch work can result in a merging nightmare**
|
|
29
23
|
|
|
30
24
|
## 🕷️ The Solution
|
|
31
25
|
|
|
@@ -46,10 +40,8 @@ spidersan ready-check
|
|
|
46
40
|
```
|
|
47
41
|
|
|
48
42
|
**Results with Spidersan (same team):**
|
|
49
|
-
- ⏱️ ~5 min (about 10x faster
|
|
43
|
+
- ⏱️ ~5 min (about 10x faster)
|
|
50
44
|
- ✅ 0 conflicts
|
|
51
|
-
- 🎯 Recommended merge sequence
|
|
52
|
-
- 😌 Confidence: 5/5
|
|
53
45
|
|
|
54
46
|
---
|
|
55
47
|
|
|
@@ -61,6 +53,13 @@ spidersan ready-check
|
|
|
61
53
|
npm install -g spidersan
|
|
62
54
|
```
|
|
63
55
|
|
|
56
|
+
### Guided Setup (Optional)
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
spidersan welcome
|
|
60
|
+
spidersan config wizard
|
|
61
|
+
```
|
|
62
|
+
|
|
64
63
|
### Basic Usage
|
|
65
64
|
|
|
66
65
|
```bash
|
|
@@ -85,30 +84,26 @@ spidersan merge-order
|
|
|
85
84
|
|
|
86
85
|
| Command | Description |
|
|
87
86
|
|---------|-------------|
|
|
88
|
-
| `spidersan
|
|
87
|
+
| `spidersan init` | Initialize Spidersan in the current project |
|
|
89
88
|
| `spidersan register --files` | Register a branch with the files being modified |
|
|
89
|
+
| `spidersan list` | List all registered branches and their file ownership |
|
|
90
90
|
| `spidersan conflicts` | Show file conflicts between your branch and others |
|
|
91
91
|
| `spidersan merge-order` | Get topologically-sorted optimal merge order |
|
|
92
92
|
| `spidersan ready-check` | Verify branch is ready to merge (no WIP, no conflicts) |
|
|
93
|
-
| `spidersan
|
|
94
|
-
| `spidersan
|
|
93
|
+
| `spidersan depends` | Set/show branch dependencies (Supabase only) |
|
|
94
|
+
| `spidersan stale` | Find stale branches |
|
|
95
|
+
| `spidersan cleanup` | Cleanup stale branches |
|
|
95
96
|
| `spidersan rescue` | Start rescue mission for abandoned branch cleanup |
|
|
96
|
-
| `spidersan
|
|
97
|
-
| `spidersan
|
|
98
|
-
| `spidersan
|
|
99
|
-
| `spidersan watch` | Daemon mode
|
|
97
|
+
| `spidersan abandon` | Abandon a branch (mark inactive) |
|
|
98
|
+
| `spidersan merged` | Mark a branch merged |
|
|
99
|
+
| `spidersan sync` | Sync registry (local/Supabase) |
|
|
100
|
+
| `spidersan watch` | Daemon mode: watch files and auto-register |
|
|
100
101
|
| `spidersan doctor` | Diagnose local state and registry health |
|
|
102
|
+
| `spidersan config` | View/edit configuration + guided wizard |
|
|
103
|
+
| `spidersan auto` | Auto-watch start/stop/status (config-based) |
|
|
104
|
+
| `spidersan welcome` | Onboarding and quick start |
|
|
101
105
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
### Ecosystem Plugin (Optional)
|
|
105
|
-
|
|
106
|
-
Install `spidersan-ecosystem` to unlock advanced coordination (internal for now):
|
|
107
|
-
- Symbol locking (`lock`) and semantic analysis (`semantic`)
|
|
108
|
-
- Intent scanning, active windows, and realtime monitoring (`intent-scan`, `active-windows`, `monitor`, `radar`)
|
|
109
|
-
- Task torrenting, multi-repo sync, and messaging (`torrent`, `sync-all`, `send`, `inbox`)
|
|
110
|
-
- Security pipeline + MCP health (`tension`, `audit-mark`, `mcp-health`, `mcp-restart`)
|
|
111
|
-
|
|
106
|
+
Advanced commands like `who-touched`, `monitor`, `lock`, `scan`, `triage`, and `salvage` live in the ecosystem plugin.
|
|
112
107
|
|
|
113
108
|
### Watch Mode (Daemon)
|
|
114
109
|
|
|
@@ -123,6 +118,9 @@ spidersan watch --agent myagent --hub
|
|
|
123
118
|
|
|
124
119
|
# Quiet mode (only show conflicts)
|
|
125
120
|
spidersan watch --agent myagent --hub --quiet
|
|
121
|
+
|
|
122
|
+
# Watch only specific paths
|
|
123
|
+
spidersan watch --paths "src,lib" --root .
|
|
126
124
|
```
|
|
127
125
|
|
|
128
126
|
**Features:**
|
|
@@ -131,6 +129,54 @@ spidersan watch --agent myagent --hub --quiet
|
|
|
131
129
|
- 🔌 Hub integration for team visibility
|
|
132
130
|
- 🕐 Debounced (1s) to prevent spam
|
|
133
131
|
|
|
132
|
+
### ⚡ Auto Watch (Background)
|
|
133
|
+
|
|
134
|
+
Run a background watcher using paths from your config:
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
spidersan auto start
|
|
138
|
+
spidersan auto status
|
|
139
|
+
spidersan auto stop
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
### 🤖 GitHub Actions Auto-Register (NEW!)
|
|
143
|
+
|
|
144
|
+
**Zero-effort branch registration via GitHub workflow**
|
|
145
|
+
|
|
146
|
+
When enabled, every push to a branch automatically:
|
|
147
|
+
- ✅ Registers the branch with Spidersan
|
|
148
|
+
- ✅ Detects changed files via git diff
|
|
149
|
+
- ✅ Checks for conflicts with other branches
|
|
150
|
+
- ✅ Reports TIER 2+ conflicts as workflow warnings
|
|
151
|
+
- ✅ Extracts agent name from branch prefix (e.g., `claude/feature` → `claude`)
|
|
152
|
+
|
|
153
|
+
**Setup:**
|
|
154
|
+
1. Workflow is already included: `.github/workflows/auto-register.yml`
|
|
155
|
+
2. Just push to any branch (except main/staging)
|
|
156
|
+
3. View results in GitHub Actions tab
|
|
157
|
+
|
|
158
|
+
**Example:**
|
|
159
|
+
```bash
|
|
160
|
+
git checkout -b yourname/new-feature
|
|
161
|
+
git add src/api.ts
|
|
162
|
+
git commit -m "feat: add new endpoint"
|
|
163
|
+
git push origin yourname/new-feature
|
|
164
|
+
# ✅ Auto-registered in ~15 seconds!
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
**Benefits:**
|
|
168
|
+
- No manual `spidersan register` needed
|
|
169
|
+
- Works across all contributors and AI agents
|
|
170
|
+
- Conflict warnings appear in CI checks
|
|
171
|
+
- Perfect for multi-agent repositories
|
|
172
|
+
|
|
173
|
+
**Note:** This complements (doesn't replace) local `spidersan watch` for real-time file monitoring.
|
|
174
|
+
|
|
175
|
+
**Installation:**
|
|
176
|
+
- [📖 Complete Installation Guide →](./INSTALL_AUTO_REGISTER.md)
|
|
177
|
+
- [🎯 Use Cases & Examples →](./AUTO_REGISTER_USE_CASES.md)
|
|
178
|
+
- [🤖 Claude Code Skill →](./.claude/skills/install-auto-register.md)
|
|
179
|
+
|
|
134
180
|
### 🦺 Rescue Mode
|
|
135
181
|
|
|
136
182
|
Got a repo with 10+ abandoned branches? Let Spidersan clean up the mess:
|
|
@@ -153,9 +199,7 @@ spidersan rescue --abandon path/to/file.ts
|
|
|
153
199
|
## 📖 Documentation
|
|
154
200
|
|
|
155
201
|
- [Core Guide](docs/CORE.md) - Public feature set and core workflows
|
|
156
|
-
- Ecosystem Overview (internal; see spidersan-ecosystem repo)
|
|
157
202
|
- Usage (internal; see spidersan-ecosystem repo)
|
|
158
|
-
- [One Pager](docs/ONE_PAGER.md) - Product overview
|
|
159
203
|
- [Data Collection](docs/DATA_COLLECTION.md) - Privacy & data practices
|
|
160
204
|
|
|
161
205
|
---
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spidersan.d.ts","sourceRoot":"","sources":["../../src/bin/spidersan.ts"],"names":[],"mappings":";AACA;;;;GAIG;AAEH,OAAO,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"spidersan.d.ts","sourceRoot":"","sources":["../../src/bin/spidersan.ts"],"names":[],"mappings":";AACA;;;;GAIG;AAEH,OAAO,eAAe,CAAC;AAmCvB,eAAO,MAAM,WAAW,eAAkB,CAAC"}
|
package/dist/bin/spidersan.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
import 'dotenv/config';
|
|
8
8
|
import { Command } from 'commander';
|
|
9
9
|
import { createRequire } from 'module';
|
|
10
|
-
import { initCommand, registerCommand, listCommand, conflictsCommand, mergeOrderCommand, readyCheckCommand, dependsCommand, staleCommand, cleanupCommand, rescueCommand, abandonCommand, mergedCommand, syncCommand, watchCommand, doctorCommand, loadEcosystemCommands, getEcosystemStatus, } from '../commands/index.js';
|
|
10
|
+
import { initCommand, registerCommand, listCommand, conflictsCommand, mergeOrderCommand, readyCheckCommand, dependsCommand, staleCommand, cleanupCommand, rescueCommand, abandonCommand, mergedCommand, syncCommand, watchCommand, doctorCommand, configCommand, autoCommand, welcomeCommand, loadEcosystemCommands, getEcosystemStatus, } from '../commands/index.js';
|
|
11
11
|
import { checkForUpdates } from '../lib/update-check.js';
|
|
12
12
|
// Read version from package.json dynamically
|
|
13
13
|
const require = createRequire(import.meta.url);
|
|
@@ -67,9 +67,21 @@ program.addCommand(mergedCommand);
|
|
|
67
67
|
program.addCommand(syncCommand);
|
|
68
68
|
program.addCommand(watchCommand);
|
|
69
69
|
program.addCommand(doctorCommand);
|
|
70
|
+
program.addCommand(configCommand);
|
|
71
|
+
program.addCommand(autoCommand);
|
|
72
|
+
program.addCommand(welcomeCommand);
|
|
70
73
|
async function main() {
|
|
71
74
|
const ecosystemCommands = await loadEcosystemCommands();
|
|
72
|
-
ecosystemCommands.forEach((command) =>
|
|
75
|
+
ecosystemCommands.forEach((command) => {
|
|
76
|
+
const existing = program.commands.find(c => c.name() === command.name());
|
|
77
|
+
if (existing) {
|
|
78
|
+
if (isDebugMode()) {
|
|
79
|
+
console.log(`⚠️ Skipping duplicate ecosystem command: ${command.name()}`);
|
|
80
|
+
}
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
program.addCommand(command);
|
|
84
|
+
});
|
|
73
85
|
const ecosystemStatus = getEcosystemStatus();
|
|
74
86
|
if (ecosystemStatus.versionMismatch && ecosystemStatus.requiredRange && ecosystemStatus.coreVersion) {
|
|
75
87
|
console.warn(`⚠️ Ecosystem expects spidersan@${ecosystemStatus.requiredRange}, but core is ${ecosystemStatus.coreVersion}`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spidersan.js","sourceRoot":"","sources":["../../src/bin/spidersan.ts"],"names":[],"mappings":";AACA;;;;GAIG;AAEH,OAAO,eAAe,CAAC;AACvB,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,EACH,WAAW,EACX,eAAe,EACf,WAAW,EACX,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,EACjB,cAAc,EACd,YAAY,EACZ,cAAc,EACd,aAAa,EACb,cAAc,EACd,aAAa,EACb,WAAW,EACX,YAAY,EACZ,aAAa,EACb,qBAAqB,EACrB,kBAAkB,GACrB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAEzD,6CAA6C;AAC7C,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC/C,MAAM,GAAG,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;AAE1C,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;AAE9B,yBAAyB;AACzB,IAAI,SAAS,GAAG,KAAK,CAAC;AACtB,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,EAAE,CAAC,SAAS,CAAC;AAE3C,sCA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ourceRoot":"","sources":["../../src/commands/auto.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAwEpC,eAAO,MAAM,WAAW,SAC6B,CAAC"}
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* spidersan auto
|
|
3
|
+
*
|
|
4
|
+
* Start/stop auto-watch sessions based on config.
|
|
5
|
+
*/
|
|
6
|
+
import { Command } from 'commander';
|
|
7
|
+
import { execSync, spawn } from 'child_process';
|
|
8
|
+
import { existsSync, readFileSync, writeFileSync, mkdirSync, rmSync } from 'fs';
|
|
9
|
+
import { join } from 'path';
|
|
10
|
+
import { loadConfig } from '../lib/config.js';
|
|
11
|
+
function getRepoRoot() {
|
|
12
|
+
try {
|
|
13
|
+
return execSync('git rev-parse --show-toplevel', { encoding: 'utf-8' }).trim();
|
|
14
|
+
}
|
|
15
|
+
catch {
|
|
16
|
+
return process.cwd();
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
function getStatePath(repoRoot) {
|
|
20
|
+
return join(repoRoot, '.spidersan', 'auto-watch.json');
|
|
21
|
+
}
|
|
22
|
+
function ensureStateDir(repoRoot) {
|
|
23
|
+
const dir = join(repoRoot, '.spidersan');
|
|
24
|
+
if (!existsSync(dir)) {
|
|
25
|
+
mkdirSync(dir, { recursive: true });
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
function parsePaths(value) {
|
|
29
|
+
return value.split(',').map((entry) => entry.trim()).filter(Boolean);
|
|
30
|
+
}
|
|
31
|
+
function isProcessRunning(pid) {
|
|
32
|
+
try {
|
|
33
|
+
process.kill(pid, 0);
|
|
34
|
+
return true;
|
|
35
|
+
}
|
|
36
|
+
catch {
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
function readState(statePath) {
|
|
41
|
+
if (!existsSync(statePath))
|
|
42
|
+
return null;
|
|
43
|
+
try {
|
|
44
|
+
const content = readFileSync(statePath, 'utf-8');
|
|
45
|
+
return JSON.parse(content);
|
|
46
|
+
}
|
|
47
|
+
catch {
|
|
48
|
+
return null;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
function stopProcess(pid) {
|
|
52
|
+
try {
|
|
53
|
+
if (process.platform !== 'win32') {
|
|
54
|
+
process.kill(-pid);
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
process.kill(pid);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
catch {
|
|
61
|
+
// ignore kill errors
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
export const autoCommand = new Command('auto')
|
|
65
|
+
.description('Auto-watch shortcuts (start/stop)');
|
|
66
|
+
autoCommand
|
|
67
|
+
.command('start')
|
|
68
|
+
.description('Start auto-watch in the background')
|
|
69
|
+
.option('--paths <paths>', 'Comma-separated list of files or folders to watch')
|
|
70
|
+
.option('--agent <agent>', 'Agent identifier for registration')
|
|
71
|
+
.option('--hub', 'Connect to Hub and emit real-time conflict warnings')
|
|
72
|
+
.option('--hub-sync', 'Post conflicts to Hub chat via REST API')
|
|
73
|
+
.option('--quiet', 'Only log conflicts, not file changes')
|
|
74
|
+
.option('--legacy', 'Legacy mode: use old watcher settings')
|
|
75
|
+
.option('--force', 'Start even if autoWatch is disabled in config')
|
|
76
|
+
.action(async (options) => {
|
|
77
|
+
const repoRoot = getRepoRoot();
|
|
78
|
+
const statePath = getStatePath(repoRoot);
|
|
79
|
+
ensureStateDir(repoRoot);
|
|
80
|
+
const existing = readState(statePath);
|
|
81
|
+
if (existing && isProcessRunning(existing.pid)) {
|
|
82
|
+
console.log('🕷️ Auto-watch is already running.');
|
|
83
|
+
console.log(` PID: ${existing.pid}`);
|
|
84
|
+
console.log(` Paths: ${existing.paths.join(', ')}`);
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
const config = await loadConfig();
|
|
88
|
+
const autoConfig = config.autoWatch;
|
|
89
|
+
const configEnabled = autoConfig.enabled;
|
|
90
|
+
const cliPaths = options.paths ? parsePaths(options.paths) : [];
|
|
91
|
+
if (!configEnabled && cliPaths.length === 0 && !options.force) {
|
|
92
|
+
console.error('❌ Auto-watch is disabled in config.');
|
|
93
|
+
console.error(' Enable it in .spidersanrc or pass --paths / --force.');
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
const paths = cliPaths.length > 0 ? cliPaths : autoConfig.paths;
|
|
97
|
+
if (paths.length === 0) {
|
|
98
|
+
console.error('❌ No auto-watch paths configured.');
|
|
99
|
+
console.error(' Set autoWatch.paths in .spidersanrc or pass --paths.');
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
const configuredAgent = config.agent.name?.trim();
|
|
103
|
+
const agent = (options.agent || process.env.SPIDERSAN_AGENT || configuredAgent || 'unknown').trim();
|
|
104
|
+
const hub = Boolean(options.hub || autoConfig.hub);
|
|
105
|
+
const hubSync = Boolean(options.hubSync || autoConfig.hubSync);
|
|
106
|
+
const quiet = Boolean(options.quiet || autoConfig.quiet);
|
|
107
|
+
const legacy = Boolean(options.legacy || autoConfig.legacy);
|
|
108
|
+
const script = process.argv[1];
|
|
109
|
+
if (!script) {
|
|
110
|
+
console.error('❌ Could not resolve CLI script path.');
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
const args = [
|
|
114
|
+
script,
|
|
115
|
+
'watch',
|
|
116
|
+
'--root',
|
|
117
|
+
repoRoot,
|
|
118
|
+
'--paths',
|
|
119
|
+
paths.join(','),
|
|
120
|
+
'--agent',
|
|
121
|
+
agent,
|
|
122
|
+
];
|
|
123
|
+
if (hub)
|
|
124
|
+
args.push('--hub');
|
|
125
|
+
if (hubSync)
|
|
126
|
+
args.push('--hub-sync');
|
|
127
|
+
if (quiet)
|
|
128
|
+
args.push('--quiet');
|
|
129
|
+
if (legacy)
|
|
130
|
+
args.push('--legacy');
|
|
131
|
+
const child = spawn(process.execPath, args, {
|
|
132
|
+
cwd: repoRoot,
|
|
133
|
+
detached: true,
|
|
134
|
+
stdio: 'ignore',
|
|
135
|
+
env: process.env,
|
|
136
|
+
});
|
|
137
|
+
if (!child.pid) {
|
|
138
|
+
console.error('❌ Failed to start auto-watch.');
|
|
139
|
+
return;
|
|
140
|
+
}
|
|
141
|
+
child.unref();
|
|
142
|
+
const state = {
|
|
143
|
+
pid: child.pid,
|
|
144
|
+
startedAt: new Date().toISOString(),
|
|
145
|
+
repoRoot,
|
|
146
|
+
paths,
|
|
147
|
+
agent,
|
|
148
|
+
hub,
|
|
149
|
+
hubSync,
|
|
150
|
+
quiet,
|
|
151
|
+
legacy,
|
|
152
|
+
};
|
|
153
|
+
writeFileSync(statePath, JSON.stringify(state, null, 2));
|
|
154
|
+
console.log('🕷️ Auto-watch started.');
|
|
155
|
+
console.log(` PID: ${child.pid}`);
|
|
156
|
+
console.log(` Paths: ${paths.join(', ')}`);
|
|
157
|
+
console.log(' Stop with: spidersan auto stop');
|
|
158
|
+
});
|
|
159
|
+
autoCommand
|
|
160
|
+
.command('stop')
|
|
161
|
+
.description('Stop the running auto-watch session')
|
|
162
|
+
.action(() => {
|
|
163
|
+
const repoRoot = getRepoRoot();
|
|
164
|
+
const statePath = getStatePath(repoRoot);
|
|
165
|
+
const state = readState(statePath);
|
|
166
|
+
if (!state) {
|
|
167
|
+
console.log('🕷️ No auto-watch session found.');
|
|
168
|
+
return;
|
|
169
|
+
}
|
|
170
|
+
if (isProcessRunning(state.pid)) {
|
|
171
|
+
stopProcess(state.pid);
|
|
172
|
+
console.log(`🕷️ Stopped auto-watch (PID ${state.pid}).`);
|
|
173
|
+
}
|
|
174
|
+
else {
|
|
175
|
+
console.log('🕷️ Auto-watch process not running (stale state).');
|
|
176
|
+
}
|
|
177
|
+
try {
|
|
178
|
+
rmSync(statePath);
|
|
179
|
+
}
|
|
180
|
+
catch {
|
|
181
|
+
// ignore
|
|
182
|
+
}
|
|
183
|
+
});
|
|
184
|
+
autoCommand
|
|
185
|
+
.command('status')
|
|
186
|
+
.description('Show auto-watch status')
|
|
187
|
+
.action(() => {
|
|
188
|
+
const repoRoot = getRepoRoot();
|
|
189
|
+
const statePath = getStatePath(repoRoot);
|
|
190
|
+
const state = readState(statePath);
|
|
191
|
+
if (!state) {
|
|
192
|
+
console.log('🕷️ Auto-watch is not running.');
|
|
193
|
+
return;
|
|
194
|
+
}
|
|
195
|
+
const running = isProcessRunning(state.pid);
|
|
196
|
+
console.log(`🕷️ Auto-watch ${running ? 'running' : 'stopped'}`);
|
|
197
|
+
console.log(` PID: ${state.pid}`);
|
|
198
|
+
console.log(` Paths: ${state.paths.join(', ')}`);
|
|
199
|
+
console.log(` Agent: ${state.agent || 'unknown'}`);
|
|
200
|
+
console.log(` Hub: ${state.hub ? 'enabled' : 'disabled'}`);
|
|
201
|
+
console.log(` Hub Sync: ${state.hubSync ? 'enabled' : 'disabled'}`);
|
|
202
|
+
console.log(` Quiet: ${state.quiet ? 'enabled' : 'disabled'}`);
|
|
203
|
+
console.log(` Legacy: ${state.legacy ? 'enabled' : 'disabled'}`);
|
|
204
|
+
console.log(` Started: ${state.startedAt}`);
|
|
205
|
+
});
|
|
206
|
+
//# sourceMappingURL=auto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auto.js","sourceRoot":"","sources":["../../src/commands/auto.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,IAAI,CAAC;AAChF,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAc9C,SAAS,WAAW;IAChB,IAAI,CAAC;QACD,OAAO,QAAQ,CAAC,+BAA+B,EAAE,EAA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K,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,UAAU,EAAE,CAAC,CAAC;IACjE,OAAO,CAAC,GAAG,CAAC,cAAc,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,UAAU,EAAE,CAAC,CAAC;IACnE,OAAO,CAAC,GAAG,CAAC,eAAe,KAAK,CAAC,SAAS,EAAE,CAAC,CAAC;AAClD,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* spidersan config
|
|
3
|
+
*
|
|
4
|
+
* Manage Spidersan configuration (.spidersanrc).
|
|
5
|
+
*/
|
|
6
|
+
import { Command } from 'commander';
|
|
7
|
+
declare function setNestedValue(obj: Record<string, unknown>, path: string, value: unknown): void;
|
|
8
|
+
declare function getNestedValue(obj: unknown, path: string): unknown;
|
|
9
|
+
export declare const configCommand: Command;
|
|
10
|
+
export declare const _testable: {
|
|
11
|
+
setNestedValue: typeof setNestedValue;
|
|
12
|
+
getNestedValue: typeof getNestedValue;
|
|
13
|
+
};
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/commands/config.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAgEpC,iBAAS,cAAc,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI,CAmBxF;AAED,iBAAS,cAAc,CAAC,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAW3D;AA4HD,eAAO,MAAM,aAAa,SAC+B,CAAC;AAG1D,eAAO,MAAM,SAAS;;;CAGrB,CAAC"}
|