spidersan 0.2.2

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 (245) hide show
  1. package/CHANGELOG.md +91 -0
  2. package/LICENSE +21 -0
  3. package/LICENSE.md +85 -0
  4. package/README.md +217 -0
  5. package/dist/bin/spidersan.d.ts +9 -0
  6. package/dist/bin/spidersan.d.ts.map +1 -0
  7. package/dist/bin/spidersan.js +152 -0
  8. package/dist/bin/spidersan.js.map +1 -0
  9. package/dist/commands/abandon.d.ts +8 -0
  10. package/dist/commands/abandon.d.ts.map +1 -0
  11. package/dist/commands/abandon.js +49 -0
  12. package/dist/commands/abandon.js.map +1 -0
  13. package/dist/commands/activate.d.ts +9 -0
  14. package/dist/commands/activate.d.ts.map +1 -0
  15. package/dist/commands/activate.js +45 -0
  16. package/dist/commands/activate.js.map +1 -0
  17. package/dist/commands/active-windows.d.ts +16 -0
  18. package/dist/commands/active-windows.d.ts.map +1 -0
  19. package/dist/commands/active-windows.js +373 -0
  20. package/dist/commands/active-windows.js.map +1 -0
  21. package/dist/commands/audit-mark.d.ts +12 -0
  22. package/dist/commands/audit-mark.d.ts.map +1 -0
  23. package/dist/commands/audit-mark.js +204 -0
  24. package/dist/commands/audit-mark.js.map +1 -0
  25. package/dist/commands/cleanup.d.ts +8 -0
  26. package/dist/commands/cleanup.d.ts.map +1 -0
  27. package/dist/commands/cleanup.js +41 -0
  28. package/dist/commands/cleanup.js.map +1 -0
  29. package/dist/commands/close.d.ts +9 -0
  30. package/dist/commands/close.d.ts.map +1 -0
  31. package/dist/commands/close.js +129 -0
  32. package/dist/commands/close.js.map +1 -0
  33. package/dist/commands/collab-sync.d.ts +14 -0
  34. package/dist/commands/collab-sync.d.ts.map +1 -0
  35. package/dist/commands/collab-sync.js +240 -0
  36. package/dist/commands/collab-sync.js.map +1 -0
  37. package/dist/commands/collab.d.ts +6 -0
  38. package/dist/commands/collab.d.ts.map +1 -0
  39. package/dist/commands/collab.js +103 -0
  40. package/dist/commands/collab.js.map +1 -0
  41. package/dist/commands/completions.d.ts +8 -0
  42. package/dist/commands/completions.d.ts.map +1 -0
  43. package/dist/commands/completions.js +83 -0
  44. package/dist/commands/completions.js.map +1 -0
  45. package/dist/commands/conflicts.d.ts +12 -0
  46. package/dist/commands/conflicts.d.ts.map +1 -0
  47. package/dist/commands/conflicts.js +426 -0
  48. package/dist/commands/conflicts.js.map +1 -0
  49. package/dist/commands/demo.d.ts +3 -0
  50. package/dist/commands/demo.d.ts.map +1 -0
  51. package/dist/commands/demo.js +113 -0
  52. package/dist/commands/demo.js.map +1 -0
  53. package/dist/commands/depends.d.ts +8 -0
  54. package/dist/commands/depends.d.ts.map +1 -0
  55. package/dist/commands/depends.js +44 -0
  56. package/dist/commands/depends.js.map +1 -0
  57. package/dist/commands/doctor.d.ts +8 -0
  58. package/dist/commands/doctor.d.ts.map +1 -0
  59. package/dist/commands/doctor.js +249 -0
  60. package/dist/commands/doctor.js.map +1 -0
  61. package/dist/commands/inbox.d.ts +3 -0
  62. package/dist/commands/inbox.d.ts.map +1 -0
  63. package/dist/commands/inbox.js +66 -0
  64. package/dist/commands/inbox.js.map +1 -0
  65. package/dist/commands/index.d.ts +43 -0
  66. package/dist/commands/index.d.ts.map +1 -0
  67. package/dist/commands/index.js +61 -0
  68. package/dist/commands/index.js.map +1 -0
  69. package/dist/commands/init.d.ts +8 -0
  70. package/dist/commands/init.d.ts.map +1 -0
  71. package/dist/commands/init.js +23 -0
  72. package/dist/commands/init.js.map +1 -0
  73. package/dist/commands/intent-scan.d.ts +17 -0
  74. package/dist/commands/intent-scan.d.ts.map +1 -0
  75. package/dist/commands/intent-scan.js +336 -0
  76. package/dist/commands/intent-scan.js.map +1 -0
  77. package/dist/commands/key-import.d.ts +3 -0
  78. package/dist/commands/key-import.d.ts.map +1 -0
  79. package/dist/commands/key-import.js +54 -0
  80. package/dist/commands/key-import.js.map +1 -0
  81. package/dist/commands/keygen.d.ts +3 -0
  82. package/dist/commands/keygen.d.ts.map +1 -0
  83. package/dist/commands/keygen.js +53 -0
  84. package/dist/commands/keygen.js.map +1 -0
  85. package/dist/commands/keys.d.ts +3 -0
  86. package/dist/commands/keys.d.ts.map +1 -0
  87. package/dist/commands/keys.js +56 -0
  88. package/dist/commands/keys.js.map +1 -0
  89. package/dist/commands/list.d.ts +3 -0
  90. package/dist/commands/list.d.ts.map +1 -0
  91. package/dist/commands/list.js +45 -0
  92. package/dist/commands/list.js.map +1 -0
  93. package/dist/commands/lock.d.ts +11 -0
  94. package/dist/commands/lock.d.ts.map +1 -0
  95. package/dist/commands/lock.js +220 -0
  96. package/dist/commands/lock.js.map +1 -0
  97. package/dist/commands/log.d.ts +8 -0
  98. package/dist/commands/log.d.ts.map +1 -0
  99. package/dist/commands/log.js +95 -0
  100. package/dist/commands/log.js.map +1 -0
  101. package/dist/commands/mcp-health.d.ts +3 -0
  102. package/dist/commands/mcp-health.d.ts.map +1 -0
  103. package/dist/commands/mcp-health.js +305 -0
  104. package/dist/commands/mcp-health.js.map +1 -0
  105. package/dist/commands/mcp-restart.d.ts +3 -0
  106. package/dist/commands/mcp-restart.d.ts.map +1 -0
  107. package/dist/commands/mcp-restart.js +176 -0
  108. package/dist/commands/mcp-restart.js.map +1 -0
  109. package/dist/commands/merge-order.d.ts +9 -0
  110. package/dist/commands/merge-order.d.ts.map +1 -0
  111. package/dist/commands/merge-order.js +138 -0
  112. package/dist/commands/merge-order.js.map +1 -0
  113. package/dist/commands/merged.d.ts +8 -0
  114. package/dist/commands/merged.d.ts.map +1 -0
  115. package/dist/commands/merged.js +39 -0
  116. package/dist/commands/merged.js.map +1 -0
  117. package/dist/commands/msg-read.d.ts +3 -0
  118. package/dist/commands/msg-read.d.ts.map +1 -0
  119. package/dist/commands/msg-read.js +70 -0
  120. package/dist/commands/msg-read.js.map +1 -0
  121. package/dist/commands/pulse.d.ts +9 -0
  122. package/dist/commands/pulse.d.ts.map +1 -0
  123. package/dist/commands/pulse.js +232 -0
  124. package/dist/commands/pulse.js.map +1 -0
  125. package/dist/commands/radar.d.ts +3 -0
  126. package/dist/commands/radar.d.ts.map +1 -0
  127. package/dist/commands/radar.js +147 -0
  128. package/dist/commands/radar.js.map +1 -0
  129. package/dist/commands/ready-check.d.ts +9 -0
  130. package/dist/commands/ready-check.d.ts.map +1 -0
  131. package/dist/commands/ready-check.js +156 -0
  132. package/dist/commands/ready-check.js.map +1 -0
  133. package/dist/commands/register.d.ts +3 -0
  134. package/dist/commands/register.d.ts.map +1 -0
  135. package/dist/commands/register.js +124 -0
  136. package/dist/commands/register.js.map +1 -0
  137. package/dist/commands/send.d.ts +3 -0
  138. package/dist/commands/send.d.ts.map +1 -0
  139. package/dist/commands/send.js +134 -0
  140. package/dist/commands/send.js.map +1 -0
  141. package/dist/commands/stale.d.ts +8 -0
  142. package/dist/commands/stale.d.ts.map +1 -0
  143. package/dist/commands/stale.js +38 -0
  144. package/dist/commands/stale.js.map +1 -0
  145. package/dist/commands/status.d.ts +9 -0
  146. package/dist/commands/status.d.ts.map +1 -0
  147. package/dist/commands/status.js +41 -0
  148. package/dist/commands/status.js.map +1 -0
  149. package/dist/commands/sync-all.d.ts +9 -0
  150. package/dist/commands/sync-all.d.ts.map +1 -0
  151. package/dist/commands/sync-all.js +180 -0
  152. package/dist/commands/sync-all.js.map +1 -0
  153. package/dist/commands/sync.d.ts +8 -0
  154. package/dist/commands/sync.d.ts.map +1 -0
  155. package/dist/commands/sync.js +49 -0
  156. package/dist/commands/sync.js.map +1 -0
  157. package/dist/commands/tension.d.ts +12 -0
  158. package/dist/commands/tension.d.ts.map +1 -0
  159. package/dist/commands/tension.js +242 -0
  160. package/dist/commands/tension.js.map +1 -0
  161. package/dist/commands/torrent.d.ts +9 -0
  162. package/dist/commands/torrent.d.ts.map +1 -0
  163. package/dist/commands/torrent.js +431 -0
  164. package/dist/commands/torrent.js.map +1 -0
  165. package/dist/commands/tui.d.ts +8 -0
  166. package/dist/commands/tui.d.ts.map +1 -0
  167. package/dist/commands/tui.js +15 -0
  168. package/dist/commands/tui.js.map +1 -0
  169. package/dist/commands/wake.d.ts +9 -0
  170. package/dist/commands/wake.d.ts.map +1 -0
  171. package/dist/commands/wake.js +188 -0
  172. package/dist/commands/wake.js.map +1 -0
  173. package/dist/commands/watch.d.ts +3 -0
  174. package/dist/commands/watch.d.ts.map +1 -0
  175. package/dist/commands/watch.js +245 -0
  176. package/dist/commands/watch.js.map +1 -0
  177. package/dist/commands/who-touched.d.ts +9 -0
  178. package/dist/commands/who-touched.d.ts.map +1 -0
  179. package/dist/commands/who-touched.js +186 -0
  180. package/dist/commands/who-touched.js.map +1 -0
  181. package/dist/index.d.ts +6 -0
  182. package/dist/index.d.ts.map +1 -0
  183. package/dist/index.js +6 -0
  184. package/dist/index.js.map +1 -0
  185. package/dist/lib/agent-errors.d.ts +41 -0
  186. package/dist/lib/agent-errors.d.ts.map +1 -0
  187. package/dist/lib/agent-errors.js +143 -0
  188. package/dist/lib/agent-errors.js.map +1 -0
  189. package/dist/lib/ast.d.ts +56 -0
  190. package/dist/lib/ast.d.ts.map +1 -0
  191. package/dist/lib/ast.js +134 -0
  192. package/dist/lib/ast.js.map +1 -0
  193. package/dist/lib/config.d.ts +33 -0
  194. package/dist/lib/config.d.ts.map +1 -0
  195. package/dist/lib/config.js +127 -0
  196. package/dist/lib/config.js.map +1 -0
  197. package/dist/lib/crdt.d.ts +83 -0
  198. package/dist/lib/crdt.d.ts.map +1 -0
  199. package/dist/lib/crdt.js +160 -0
  200. package/dist/lib/crdt.js.map +1 -0
  201. package/dist/lib/crypto.d.ts +71 -0
  202. package/dist/lib/crypto.d.ts.map +1 -0
  203. package/dist/lib/crypto.js +172 -0
  204. package/dist/lib/crypto.js.map +1 -0
  205. package/dist/lib/errors.d.ts +35 -0
  206. package/dist/lib/errors.d.ts.map +1 -0
  207. package/dist/lib/errors.js +71 -0
  208. package/dist/lib/errors.js.map +1 -0
  209. package/dist/lib/license.d.ts +61 -0
  210. package/dist/lib/license.d.ts.map +1 -0
  211. package/dist/lib/license.js +171 -0
  212. package/dist/lib/license.js.map +1 -0
  213. package/dist/lib/security.d.ts +53 -0
  214. package/dist/lib/security.d.ts.map +1 -0
  215. package/dist/lib/security.js +122 -0
  216. package/dist/lib/security.js.map +1 -0
  217. package/dist/lib/update-check.d.ts +11 -0
  218. package/dist/lib/update-check.d.ts.map +1 -0
  219. package/dist/lib/update-check.js +113 -0
  220. package/dist/lib/update-check.js.map +1 -0
  221. package/dist/storage/adapter.d.ts +58 -0
  222. package/dist/storage/adapter.d.ts.map +1 -0
  223. package/dist/storage/adapter.js +8 -0
  224. package/dist/storage/adapter.js.map +1 -0
  225. package/dist/storage/factory.d.ts +6 -0
  226. package/dist/storage/factory.d.ts.map +1 -0
  227. package/dist/storage/factory.js +22 -0
  228. package/dist/storage/factory.js.map +1 -0
  229. package/dist/storage/index.d.ts +5 -0
  230. package/dist/storage/index.d.ts.map +1 -0
  231. package/dist/storage/index.js +5 -0
  232. package/dist/storage/index.js.map +1 -0
  233. package/dist/storage/local.d.ts +24 -0
  234. package/dist/storage/local.d.ts.map +1 -0
  235. package/dist/storage/local.js +101 -0
  236. package/dist/storage/local.js.map +1 -0
  237. package/dist/storage/supabase.d.ts +52 -0
  238. package/dist/storage/supabase.d.ts.map +1 -0
  239. package/dist/storage/supabase.js +221 -0
  240. package/dist/storage/supabase.js.map +1 -0
  241. package/dist/tui/screen.d.ts +14 -0
  242. package/dist/tui/screen.d.ts.map +1 -0
  243. package/dist/tui/screen.js +136 -0
  244. package/dist/tui/screen.js.map +1 -0
  245. package/package.json +89 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,91 @@
1
+ ---
2
+ tags: [project/treebird-hub, agent/myceliumail, agent/spidersan, topic/mcp]
3
+ ---
4
+
5
+ # Changelog
6
+
7
+ All notable changes to Spidersan will be documented in this file.
8
+
9
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
10
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
11
+
12
+ ## [Unreleased]
13
+
14
+ ## [0.2.2] - 2026-01-19 (Security Release)
15
+
16
+ This release addresses several critical security vulnerabilities. Users are strongly encouraged to upgrade immediately.
17
+
18
+ ### Security
19
+ - **Fixed:** Resolved a shell injection vulnerability in `conflicts.ts`. Improper sanitization of user-provided input could allow arbitrary command execution via `--wake` flag.
20
+ - **Fixed:** Implemented stricter input validation across 8 mycmail wrapper commands (send.ts, inbox.ts, msg-read.ts, keys.ts, keygen.ts, key-import.ts, collab.ts) to prevent injection attacks.
21
+ - **Fixed:** Sanitized Supabase queries to prevent potential SQL injection vulnerabilities.
22
+ - **Added:** Implemented MCP server Access Control Lists (ACLs) to restrict process control and validate watch directories.
23
+ - **Added:** Centralized security validation utilities in `src/lib/security.ts`.
24
+
25
+ ### Changed
26
+ - Replaced `execSync` with `execFileSync` and `spawnSync` for safer command execution using argument arrays instead of string interpolation.
27
+ - Added input validation patterns: `VALID_AGENT_ID` (`[a-z0-9_-]{1,32}`), `VALID_BRANCH_NAME` (`[a-zA-Z0-9/_.-]{1,128}`), `VALID_MESSAGE_ID`.
28
+ - Hardened file path handling in all commands.
29
+
30
+ ### Added
31
+ - **AST semantic detection** - `spidersan conflicts --semantic` for symbol-level conflict analysis using Tree-sitter
32
+ - **CRDT symbol locking** - `spidersan lock` for distributed coordination
33
+ - **GitHub Action template** for auto-registration on push
34
+
35
+ ## [0.2.1] - 2025-12-30
36
+
37
+ ### Added
38
+ - **Watch mode (daemon)** - Real-time file monitoring and auto-registration
39
+ - `spidersan watch` - Start watching files in current repo
40
+ - `--agent <id>` - Tag registrations with agent identifier
41
+ - `--hub` - Connect to Treebird Hub for real-time conflict warnings
42
+ - `--hub-sync` - Post conflicts to Hub chat via REST API
43
+ - `--quiet` - Only show conflicts, not file changes
44
+ - `--dir <path>` - Watch specific directory
45
+ - Debounced file detection (1s) to prevent spam
46
+ - Auto-register files to current branch on change
47
+ - Real-time conflict detection across active branches
48
+ - Hub integration via `conflicts:warning` socket event
49
+
50
+ ### Dependencies
51
+ - Added `chokidar` for file system watching
52
+ - Added `socket.io-client` for Hub real-time connection
53
+
54
+ ## [0.2.0] - 2025-12-29
55
+
56
+ ### Added
57
+ - **Session lifecycle commands** - Myceliumail ecosystem integration
58
+ - `spidersan wake` - Start session: sync registry, check conflicts, call `mycmail wake`
59
+ - `spidersan close` - End session: show status, optionally mark stale, call `mycmail close`
60
+
61
+ ## [0.2.0] - 2025-12-23
62
+
63
+ ### Added
64
+ - **Pro license system** - Ed25519-based cryptographic licensing
65
+ - `spidersan activate <key>` - Activate Pro license
66
+ - `spidersan status` - Check license and branch status
67
+ - 5-branch limit for free tier
68
+ - Unlimited branches for Pro users
69
+ - **MCP Server** - Model Context Protocol integration for Claude Desktop
70
+ - 7 tools: list_branches, check_conflicts, get_merge_order, register_branch, mark_merged, mark_abandoned, get_branch_info
71
+ - Pro license required
72
+ - Global storage at `~/.spidersan/registry.json`
73
+ - **Update check notifications** - CLI checks npm for newer versions
74
+ - Shows banner when update available
75
+ - 24-hour cache, non-blocking
76
+ - **Pro READMEs** - Updated docs with pricing ($9/mo) and features
77
+ - Free vs Pro comparison table
78
+ - Feedback & support section
79
+ - Contact: treebird7@proton.me
80
+
81
+ ### Changed
82
+ - MCP server uses global storage (works without git context)
83
+ - `register_branch` accepts explicit branch name (no git auto-detect required)
84
+
85
+ ## [0.1.0] - 2025-12-15
86
+
87
+ ### Added
88
+ - Initial project structure
89
+ - Branch registration and conflict detection
90
+ - Merge order recommendations
91
+ - Local JSON storage
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 treebird7
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/LICENSE.md ADDED
@@ -0,0 +1,85 @@
1
+ ---
2
+ tags: [agent/spidersan, topic/mcp]
3
+ ---
4
+
5
+ # Spidersan Licensing
6
+
7
+ ## Open Core + Business Source License
8
+
9
+ Spidersan uses a dual licensing model:
10
+
11
+ ---
12
+
13
+ ## Core CLI (MIT License)
14
+
15
+ The following features are available under the MIT License:
16
+
17
+ - `spidersan list` - List all registered branches
18
+ - `spidersan register` - Register a branch with the coordinator
19
+ - `spidersan conflicts` - Show file conflicts between branches
20
+ - `spidersan merge-order` - Get optimal merge order
21
+ - `spidersan ready-check` - Verify branch is ready to merge
22
+
23
+ ```
24
+ MIT License
25
+
26
+ Copyright (c) 2025 treebird7
27
+
28
+ Permission is hereby granted, free of charge, to any person obtaining a copy
29
+ of this software and associated documentation files (the "Software"), to deal
30
+ in the Software without restriction, including without limitation the rights
31
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
32
+ copies of the Software, and to permit persons to whom the Software is
33
+ furnished to do so, subject to the following conditions:
34
+
35
+ The above copyright notice and this permission notice shall be included in all
36
+ copies or substantial portions of the Software.
37
+
38
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
39
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
40
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
41
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
42
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
43
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
44
+ SOFTWARE.
45
+ ```
46
+
47
+ ---
48
+
49
+ ## Pro Features (Business Source License 1.1)
50
+
51
+ The following features are licensed under BSL 1.1:
52
+
53
+ - **Unlimited Branches** - No limit on concurrent registered branches
54
+ - **Conflict Prediction** - Proactive conflict detection before they occur
55
+ - **MCP Server** - Model Context Protocol server for AI agent integration
56
+
57
+ ### Business Source License 1.1
58
+
59
+ **Licensor:** treebird7
60
+
61
+ **Licensed Work:** Spidersan Pro Features
62
+ The Licensed Work is (c) 2025 treebird7
63
+
64
+ **Additional Use Grant:** You may use the Licensed Work for non-production purposes, including development, testing, and evaluation.
65
+
66
+ **Change Date:** Four years from the date the Licensed Work is published.
67
+
68
+ **Change License:** MIT License
69
+
70
+ For production use of Pro Features, please contact us for a commercial license.
71
+
72
+ ---
73
+
74
+ ## Summary
75
+
76
+ | Feature | License | Status |
77
+ |---------|---------|--------|
78
+ | `list` | MIT | ✅ Free |
79
+ | `register` | MIT | ✅ Free |
80
+ | `conflicts` | MIT | ✅ Free |
81
+ | `merge-order` | MIT | ✅ Free |
82
+ | `ready-check` | MIT | ✅ Free |
83
+ | Unlimited Branches | BSL 1.1 | 💎 Pro |
84
+ | Conflict Prediction | BSL 1.1 | 💎 Pro |
85
+ | MCP Server | BSL 1.1 | 💎 Pro |
package/README.md ADDED
@@ -0,0 +1,217 @@
1
+ ---
2
+ aliases: ["Spidersan Overview"]
3
+ tags: [agent/myceliumail, type/readme]
4
+ ---
5
+
6
+ <div align="center">
7
+
8
+ # 🕷️ Spidersan
9
+
10
+ ### Coordination for the multi-agent era
11
+
12
+ **Branch coordination for AI coding agents**
13
+
14
+ [![npm version](https://img.shields.io/npm/v/spidersan.svg)](https://www.npmjs.com/package/spidersan)
15
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
16
+
17
+ ![Demo](./assets/demo.gif)
18
+
19
+ [Quick Start](#-quick-start) • [Features](#-features) • [Documentation](#-documentation) • [Pro](#-pro)
20
+
21
+ </div>
22
+
23
+ ---
24
+
25
+ ## 🎯 The Problem
26
+
27
+ **10 AI agents. 1 file. 51 minutes of chaos.**
28
+
29
+ Without coordination:
30
+ - ⏱️ 51 min to complete 1 shared file
31
+ - 💥 12 conflicts
32
+ - �� 2 build breaks pushed to main
33
+ - 😰 Frustration level: 5/5
34
+
35
+ ## 🕷️ The Solution
36
+
37
+ **Spidersan** is your AI team's coordination layer. It tracks branches, detects conflicts early, and provides optimal merge ordering—so your agents can work in harmony.
38
+
39
+ ```bash
40
+ # Register your branch
41
+ spidersan register feature/auth --files "lib/auth.ts,api/login.ts"
42
+
43
+ # See what conflicts with you
44
+ spidersan conflicts
45
+
46
+ # Get the right merge order
47
+ spidersan merge-order
48
+
49
+ # Check if you're ready to merge
50
+ spidersan ready-check
51
+ ```
52
+
53
+ **Results with Spidersan:**
54
+ - ⏱️ 5 min (10x faster)
55
+ - ✅ 0 conflicts
56
+ - 🎯 Optimal merge sequence
57
+ - 😌 Confidence: 5/5
58
+
59
+ ---
60
+
61
+ ## 🚀 Quick Start
62
+
63
+ ### Installation
64
+
65
+ ```bash
66
+ npm install -g spidersan
67
+ ```
68
+
69
+ ### Basic Usage
70
+
71
+ ```bash
72
+ # 1. Register your branch when you start working
73
+ spidersan register my-feature --files "src/component.tsx"
74
+
75
+ # 2. Check for conflicts before you go too deep
76
+ spidersan conflicts
77
+
78
+ # 3. When done, verify you're merge-ready
79
+ spidersan ready-check
80
+
81
+ # 4. Get optimal merge order for the team
82
+ spidersan merge-order
83
+ ```
84
+
85
+ ---
86
+
87
+ ## ✨ Features
88
+
89
+ ### Free (MIT License)
90
+
91
+ | Command | Description |
92
+ |---------|-------------|
93
+ | `spidersan list` | List all registered branches |
94
+ | `spidersan register` | Register a branch with files being modified |
95
+ | `spidersan conflicts` | Show file conflicts between branches |
96
+ | `spidersan merge-order` | Get topologically-sorted merge order |
97
+ | `spidersan ready-check` | Verify branch is ready (no WIP, no conflicts) |
98
+ | `spidersan watch` | **NEW!** Daemon mode - watch files and auto-register |
99
+ | `spidersan who-touched` | **NEW!** Show git history + agent activity for files |
100
+
101
+
102
+ ### Watch Mode (Daemon)
103
+
104
+ Real-time file monitoring with auto-registration:
105
+
106
+ ```bash
107
+ # Start watching (auto-registers file changes)
108
+ spidersan watch --agent myagent
109
+
110
+ # With Hub integration for real-time conflict warnings
111
+ spidersan watch --agent myagent --hub
112
+
113
+ # Quiet mode (only show conflicts)
114
+ spidersan watch --agent myagent --hub --quiet
115
+ ```
116
+
117
+ **Features:**
118
+ - 📁 Auto-registers files when you edit them
119
+ - ⚠️ Real-time conflict detection
120
+ - 🔌 Hub integration for team visibility
121
+ - 🕐 Debounced (1s) to prevent spam
122
+
123
+ ### 🦺 Rescue Mode
124
+
125
+ Got a repo with 10+ abandoned branches? Let Spidersan clean up the mess:
126
+
127
+ ```bash
128
+ # 1. Start rescue mission
129
+ spidersan rescue
130
+
131
+ # 2. Scan and categorize all branches
132
+ spidersan scan --all
133
+ spidersan triage # → MERGE / SALVAGE / ABANDON
134
+
135
+ # 3. Extract good code from broken branches
136
+ spidersan salvage feature/old-auth --components src/auth/jwt.ts
137
+
138
+ # 4. See your progress
139
+ spidersan rescue-status
140
+ ```
141
+
142
+ **Perfect for:** Post-hackathon cleanup, onboarding to chaotic repos, AI agent disasters.
143
+
144
+ ### Pro (License Required)
145
+
146
+ | Feature | Description |
147
+ |---------|-------------|
148
+ | **Unlimited Branches** | No limit on concurrent registered branches |
149
+ | **Conflict Prediction** | Proactive detection before conflicts occur |
150
+ | **MCP Server** | Model Context Protocol integration for AI agents |
151
+
152
+ ---
153
+
154
+ ## 📖 Documentation
155
+
156
+ - [One Pager](docs/ONE_PAGER.md) - Product overview
157
+ - [Implementation Plan](docs/implementation_plan.md) - Technical architecture
158
+ - [Data Collection](docs/DATA_COLLECTION.md) - Privacy & data practices
159
+
160
+ ---
161
+
162
+ ## 💎 Pro
163
+
164
+ Spidersan Pro unlocks advanced features for teams running multiple AI agents.
165
+
166
+ | Feature | Free | Pro ($9/mo) |
167
+ |---------|------|-------------|
168
+ | Core commands | ✅ All | ✅ All |
169
+ | Concurrent branches | 5 max | ✅ Unlimited |
170
+ | MCP Server | ❌ | ✅ |
171
+ | Conflict prediction | ❌ | ✅ Coming soon |
172
+ | Priority support | ❌ | ✅ |
173
+
174
+ **Activate Pro:**
175
+ ```bash
176
+ spidersan activate <your-license-key>
177
+ spidersan status # Check your plan
178
+ ```
179
+
180
+ Get a license: [spidersan.dev/pro](https://spidersan.dev/pro)
181
+
182
+ > **Note:** One Pro license unlocks the entire Treebird ecosystem (Spidersan + Myceliumail).
183
+
184
+ ---
185
+
186
+ ## 🗣️ Feedback & Support
187
+
188
+ We're building this in public and want to hear from you!
189
+
190
+ - **Issues & Features:** [GitHub Issues](https://github.com/treebird7/Spidersan/issues)
191
+ - **Email:** treebird7@proton.me
192
+ - **Twitter/X:** [@treebird7](https://twitter.com/treebird7)
193
+
194
+ Tell us what's working, what's broken, and what you'd love to see next.
195
+
196
+ ---
197
+
198
+ ## 🤝 Contributing
199
+
200
+ Contributions welcome! Please read our contributing guidelines first.
201
+
202
+ ---
203
+
204
+ ## 📄 License
205
+
206
+ - **Core CLI**: [MIT License](LICENSE.md)
207
+ - **Pro Features**: [Business Source License 1.1](LICENSE.md)
208
+
209
+ ---
210
+
211
+ <div align="center">
212
+
213
+ **Made with 🕷️ for AI-first development teams**
214
+
215
+ Part of the [Treebird Ecosystem](https://github.com/treebird7) 🌲
216
+
217
+ </div>
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Spidersan CLI Entry Point
4
+ *
5
+ * Branch coordination for AI coding agents.
6
+ */
7
+ import 'dotenv/config';
8
+ export declare const isDebugMode: () => boolean;
9
+ //# sourceMappingURL=spidersan.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spidersan.d.ts","sourceRoot":"","sources":["../../src/bin/spidersan.ts"],"names":[],"mappings":";AACA;;;;GAIG;AAEH,OAAO,eAAe,CAAC;AAyEvB,eAAO,MAAM,WAAW,eAAkB,CAAC"}
@@ -0,0 +1,152 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Spidersan CLI Entry Point
4
+ *
5
+ * Branch coordination for AI coding agents.
6
+ */
7
+ import 'dotenv/config';
8
+ import { Command } from 'commander';
9
+ import { createRequire } from 'module';
10
+ import { initCommand, registerCommand, listCommand, conflictsCommand, mergeOrderCommand, readyCheckCommand, dependsCommand, staleCommand, cleanupCommand, abandonCommand, mergedCommand, syncCommand,
11
+ // Messaging
12
+ sendCommand, inboxCommand, msgReadCommand,
13
+ // Key management
14
+ keygenCommand, keyImportCommand, keysCommand,
15
+ // License
16
+ activateCommand, statusCommand,
17
+ // Session lifecycle
18
+ wakeCommand, closeCommand, collabCommand,
19
+ // Diagnostics
20
+ doctorCommand, pulseCommand, completionsCommand,
21
+ // Security Pipeline
22
+ tensionCommand, auditMarkCommand,
23
+ // Session logging
24
+ logCommand,
25
+ // Daemon mode
26
+ watchCommand, radarCommand,
27
+ // Demo/Onboarding
28
+ demoCommand,
29
+ // MCP Health
30
+ mcpHealthCommand, mcpRestartCommand,
31
+ // Task Torrenting
32
+ torrentCommand,
33
+ // Collab Sync
34
+ collabSyncCommand,
35
+ // Global Sync
36
+ syncAllCommand,
37
+ // Layer 3+4 Conflict Detection
38
+ intentScanCommand, activeWindowsCommand,
39
+ // Semantic Locking (CRDT)
40
+ lockCommand,
41
+ // Terminal UI
42
+ tuiCommand,
43
+ // File History
44
+ whoTouchedCommand, } from '../commands/index.js';
45
+ // Read version from package.json dynamically
46
+ const require = createRequire(import.meta.url);
47
+ const pkg = require('../../package.json');
48
+ const program = new Command();
49
+ // Global debug mode flag
50
+ let debugMode = false;
51
+ export const isDebugMode = () => debugMode;
52
+ // Global error handler for debug mode
53
+ process.on('uncaughtException', (error) => {
54
+ if (debugMode) {
55
+ console.error('\n🔴 UNCAUGHT EXCEPTION:');
56
+ console.error(error.stack || error.message);
57
+ }
58
+ else {
59
+ console.error(`❌ ${error.message}`);
60
+ console.error(' Run with --debug for full stack trace');
61
+ }
62
+ process.exit(1);
63
+ });
64
+ process.on('unhandledRejection', (reason) => {
65
+ if (debugMode) {
66
+ console.error('\n🔴 UNHANDLED REJECTION:');
67
+ console.error(reason);
68
+ }
69
+ else {
70
+ console.error(`❌ Unhandled error: ${reason}`);
71
+ console.error(' Run with --debug for full stack trace');
72
+ }
73
+ process.exit(1);
74
+ });
75
+ program
76
+ .name('spidersan')
77
+ .description('🕷️ Branch coordination for AI coding agents')
78
+ .version(pkg.version)
79
+ .option('-D, --debug', 'Enable verbose debug output with stack traces')
80
+ .hook('preAction', (thisCommand) => {
81
+ const opts = thisCommand.opts();
82
+ if (opts.debug) {
83
+ debugMode = true;
84
+ console.log('🐛 Debug mode enabled\n');
85
+ }
86
+ });
87
+ // Core commands (Free tier)
88
+ program.addCommand(initCommand);
89
+ program.addCommand(registerCommand);
90
+ program.addCommand(listCommand);
91
+ program.addCommand(conflictsCommand);
92
+ program.addCommand(mergeOrderCommand);
93
+ program.addCommand(readyCheckCommand);
94
+ // Branch lifecycle
95
+ program.addCommand(dependsCommand);
96
+ program.addCommand(staleCommand);
97
+ program.addCommand(cleanupCommand);
98
+ program.addCommand(abandonCommand);
99
+ program.addCommand(mergedCommand);
100
+ program.addCommand(syncCommand);
101
+ // Messaging (requires Supabase)
102
+ program.addCommand(sendCommand);
103
+ program.addCommand(inboxCommand);
104
+ program.addCommand(msgReadCommand);
105
+ // Key management (for encrypted messaging)
106
+ program.addCommand(keygenCommand);
107
+ program.addCommand(keyImportCommand);
108
+ program.addCommand(keysCommand);
109
+ // License management
110
+ program.addCommand(activateCommand);
111
+ program.addCommand(statusCommand);
112
+ // Session lifecycle
113
+ program.addCommand(wakeCommand);
114
+ program.addCommand(closeCommand);
115
+ collabCommand(program);
116
+ // Diagnostics
117
+ program.addCommand(doctorCommand);
118
+ program.addCommand(pulseCommand);
119
+ program.addCommand(completionsCommand);
120
+ // Security Pipeline (ssan + srlk)
121
+ program.addCommand(tensionCommand);
122
+ program.addCommand(auditMarkCommand);
123
+ // Session logging
124
+ program.addCommand(logCommand);
125
+ // Daemon mode
126
+ program.addCommand(watchCommand);
127
+ program.addCommand(radarCommand);
128
+ // Demo/Onboarding
129
+ program.addCommand(demoCommand);
130
+ // MCP Health
131
+ program.addCommand(mcpHealthCommand);
132
+ program.addCommand(mcpRestartCommand);
133
+ // Task Torrenting
134
+ program.addCommand(torrentCommand);
135
+ // Collab Sync (prevents merge conflicts)
136
+ program.addCommand(collabSyncCommand);
137
+ // Global Sync (all repos)
138
+ program.addCommand(syncAllCommand);
139
+ // Layer 3+4 Conflict Detection
140
+ program.addCommand(intentScanCommand);
141
+ program.addCommand(activeWindowsCommand);
142
+ // Semantic Locking (CRDT-based)
143
+ program.addCommand(lockCommand);
144
+ // Terminal UI
145
+ program.addCommand(tuiCommand);
146
+ // File History (forensics)
147
+ program.addCommand(whoTouchedCommand);
148
+ // Check for updates (non-blocking)
149
+ import { checkForUpdates } from '../lib/update-check.js';
150
+ checkForUpdates().catch(() => { });
151
+ program.parse();
152
+ //# sourceMappingURL=spidersan.js.map
@@ -0,0 +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,EA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AAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * spidersan abandon
3
+ *
4
+ * Mark a branch as abandoned.
5
+ */
6
+ import { Command } from 'commander';
7
+ export declare const abandonCommand: Command;
8
+ //# sourceMappingURL=abandon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"abandon.d.ts","sourceRoot":"","sources":["../../src/commands/abandon.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAYpC,eAAO,MAAM,cAAc,SAoCrB,CAAC"}
@@ -0,0 +1,49 @@
1
+ /**
2
+ * spidersan abandon
3
+ *
4
+ * Mark a branch as abandoned.
5
+ */
6
+ import { Command } from 'commander';
7
+ import { execSync } from 'child_process';
8
+ import { getStorage } from '../storage/index.js';
9
+ function getCurrentBranch() {
10
+ try {
11
+ return execSync('git rev-parse --abbrev-ref HEAD', { encoding: 'utf-8' }).trim();
12
+ }
13
+ catch {
14
+ throw new Error('Not in a git repository');
15
+ }
16
+ }
17
+ export const abandonCommand = new Command('abandon')
18
+ .description('Mark a branch as abandoned')
19
+ .argument('[branch]', 'Branch to abandon (default: current)')
20
+ .option('-f, --force', 'Skip confirmation')
21
+ .option('--dry-run', 'Show what would be abandoned without doing it')
22
+ .action(async (branchArg, options) => {
23
+ const storage = await getStorage();
24
+ if (!await storage.isInitialized()) {
25
+ console.error('❌ Spidersan not initialized. Run: spidersan init');
26
+ process.exit(1);
27
+ }
28
+ const branchName = branchArg || getCurrentBranch();
29
+ // Check if branch exists
30
+ const branch = await storage.get(branchName);
31
+ if (!branch) {
32
+ console.error(`❌ Branch "${branchName}" not found in registry.`);
33
+ process.exit(1);
34
+ }
35
+ if (options.dryRun) {
36
+ console.log(`🕷️ Would abandon: ${branchName}`);
37
+ console.log(` Files: ${branch.files.join(', ') || 'none'}`);
38
+ return;
39
+ }
40
+ const success = await storage.unregister(branchName);
41
+ if (success) {
42
+ console.log(`🕷️ Abandoned: ${branchName}`);
43
+ }
44
+ else {
45
+ console.error(`❌ Failed to abandon "${branchName}".`);
46
+ process.exit(1);
47
+ }
48
+ });
49
+ //# sourceMappingURL=abandon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"abandon.js","sourceRoot":"","sources":["../../src/commands/abandon.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,SAAS,gBAAgB;IACrB,IAAI,CAAC;QACD,OAAO,QAAQ,CAAC,iCAAiC,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;IACrF,CAAC;IAAC,MAAM,CAAC;QACL,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC/C,CAAC;AACL,CAAC;AAED,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,OAAO,CAAC,SAAS,CAAC;KAC/C,WAAW,CAAC,4BAA4B,CAAC;KACzC,QAAQ,CAAC,UAAU,EAAE,sCAAsC,CAAC;KAC5D,MAAM,CAAC,aAAa,EAAE,mBAAmB,CAAC;KAC1C,MAAM,CAAC,WAAW,EAAE,+CAA+C,CAAC;KACpE,MAAM,CAAC,KAAK,EAAE,SAA6B,EAAE,OAAO,EAAE,EAAE;IACrD,MAAM,OAAO,GAAG,MAAM,UAAU,EAAE,CAAC;IAEnC,IAAI,CAAC,MAAM,OAAO,CAAC,aAAa,EAAE,EAAE,CAAC;QACjC,OAAO,CAAC,KAAK,CAAC,kDAAkD,CAAC,CAAC;QAClE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACpB,CAAC;IAED,MAAM,UAAU,GAAG,SAAS,IAAI,gBAAgB,EAAE,CAAC;IAEnD,yBAAyB;IACzB,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IAC7C,IAAI,CAAC,MAAM,EAAE,CAAC;QACV,OAAO,CAAC,KAAK,CAAC,aAAa,UAAU,0BAA0B,CAAC,CAAC;QACjE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACpB,CAAC;IAED,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;QACjB,OAAO,CAAC,GAAG,CAAC,sBAAsB,UAAU,EAAE,CAAC,CAAC;QAChD,OAAO,CAAC,GAAG,CAAC,aAAa,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,MAAM,EAAE,CAAC,CAAC;QAC9D,OAAO;IACX,CAAC;IAED,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;IAErD,IAAI,OAAO,EAAE,CAAC;QACV,OAAO,CAAC,GAAG,CAAC,kBAAkB,UAAU,EAAE,CAAC,CAAC;IAChD,CAAC;SAAM,CAAC;QACJ,OAAO,CAAC,KAAK,CAAC,wBAAwB,UAAU,IAAI,CAAC,CAAC;QACtD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACpB,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * License Activation Command
3
+ *
4
+ * Activates a Pro license key.
5
+ * Usage: spidersan activate <license-key>
6
+ */
7
+ import { Command } from 'commander';
8
+ export declare const activateCommand: Command;
9
+ //# sourceMappingURL=activate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"activate.d.ts","sourceRoot":"","sources":["../../src/commands/activate.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGpC,eAAO,MAAM,eAAe,SAwCtB,CAAC"}