spidersan 0.10.0 ā 0.20.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.
- package/CHANGELOG.md +171 -0
- package/README.md +39 -280
- package/dist/bin/command-registry.d.ts +25 -0
- package/dist/bin/command-registry.d.ts.map +1 -0
- package/dist/bin/command-registry.js +29 -0
- package/dist/bin/command-registry.js.map +1 -0
- package/dist/bin/spidersan.d.ts +7 -0
- package/dist/bin/spidersan.d.ts.map +1 -1
- package/dist/bin/spidersan.js +38 -57
- package/dist/bin/spidersan.js.map +1 -1
- package/dist/commands/cleanup.d.ts.map +1 -1
- package/dist/commands/cleanup.js +17 -3
- package/dist/commands/cleanup.js.map +1 -1
- package/dist/commands/config.d.ts.map +1 -1
- package/dist/commands/config.js +11 -39
- package/dist/commands/config.js.map +1 -1
- package/dist/commands/conflicts.d.ts +22 -0
- package/dist/commands/conflicts.d.ts.map +1 -1
- package/dist/commands/conflicts.js +459 -256
- package/dist/commands/conflicts.js.map +1 -1
- package/dist/commands/cross-conflicts.d.ts.map +1 -1
- package/dist/commands/cross-conflicts.js +7 -8
- package/dist/commands/cross-conflicts.js.map +1 -1
- package/dist/commands/depends.d.ts +4 -1
- package/dist/commands/depends.d.ts.map +1 -1
- package/dist/commands/depends.js +35 -8
- package/dist/commands/depends.js.map +1 -1
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +25 -7
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/git-watch.d.ts +1 -1
- package/dist/commands/git-watch.js +1 -1
- package/dist/commands/github-sync.d.ts +33 -0
- package/dist/commands/github-sync.d.ts.map +1 -1
- package/dist/commands/github-sync.js +68 -57
- package/dist/commands/github-sync.js.map +1 -1
- package/dist/commands/index.d.ts +2 -13
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/index.js +5 -20
- package/dist/commands/index.js.map +1 -1
- package/dist/commands/merge-order.d.ts.map +1 -1
- package/dist/commands/merge-order.js +8 -4
- package/dist/commands/merge-order.js.map +1 -1
- package/dist/commands/merged.d.ts.map +1 -1
- package/dist/commands/merged.js +5 -1
- package/dist/commands/merged.js.map +1 -1
- package/dist/commands/pr-check.d.ts +24 -0
- package/dist/commands/pr-check.d.ts.map +1 -0
- package/dist/commands/pr-check.js +85 -0
- package/dist/commands/pr-check.js.map +1 -0
- package/dist/commands/ready-check.d.ts.map +1 -1
- package/dist/commands/ready-check.js +6 -3
- package/dist/commands/ready-check.js.map +1 -1
- package/dist/commands/register.d.ts +5 -0
- package/dist/commands/register.d.ts.map +1 -1
- package/dist/commands/register.js +14 -1
- package/dist/commands/register.js.map +1 -1
- package/dist/commands/registry-sync.d.ts.map +1 -1
- package/dist/commands/registry-sync.js +12 -46
- package/dist/commands/registry-sync.js.map +1 -1
- package/dist/commands/stale.d.ts.map +1 -1
- package/dist/commands/stale.js +8 -3
- package/dist/commands/stale.js.map +1 -1
- package/dist/commands/sync.d.ts +14 -1
- package/dist/commands/sync.d.ts.map +1 -1
- package/dist/commands/sync.js +49 -31
- package/dist/commands/sync.js.map +1 -1
- package/dist/commands/verify-trunk.d.ts +18 -0
- package/dist/commands/verify-trunk.d.ts.map +1 -0
- package/dist/commands/verify-trunk.js +77 -0
- package/dist/commands/verify-trunk.js.map +1 -0
- package/dist/commands/watch.d.ts +0 -1
- package/dist/commands/watch.d.ts.map +1 -1
- package/dist/commands/watch.js +50 -77
- package/dist/commands/watch.js.map +1 -1
- package/dist/index.d.ts +0 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -3
- package/dist/index.js.map +1 -1
- package/dist/lib/activity.d.ts.map +1 -1
- package/dist/lib/activity.js +6 -2
- package/dist/lib/activity.js.map +1 -1
- package/dist/lib/ai/context-builder.d.ts.map +1 -1
- package/dist/lib/ai/context-builder.js +19 -6
- package/dist/lib/ai/context-builder.js.map +1 -1
- package/dist/lib/ai/event-handler.d.ts.map +1 -1
- package/dist/lib/ai/event-handler.js +15 -2
- package/dist/lib/ai/event-handler.js.map +1 -1
- package/dist/lib/ai/reasoner.d.ts.map +1 -1
- package/dist/lib/ai/reasoner.js +63 -82
- package/dist/lib/ai/reasoner.js.map +1 -1
- package/dist/lib/ai/setup.d.ts +1 -1
- package/dist/lib/ai/setup.d.ts.map +1 -1
- package/dist/lib/ai/types.d.ts.map +1 -1
- package/dist/lib/ai/types.js +5 -2
- package/dist/lib/ai/types.js.map +1 -1
- package/dist/lib/ast.d.ts +10 -2
- package/dist/lib/ast.d.ts.map +1 -1
- package/dist/lib/ast.js +52 -27
- package/dist/lib/ast.js.map +1 -1
- package/dist/lib/carries.d.ts +22 -0
- package/dist/lib/carries.d.ts.map +1 -0
- package/dist/lib/carries.js +56 -0
- package/dist/lib/carries.js.map +1 -0
- package/dist/lib/colony-subscriber.d.ts +1 -1
- package/dist/lib/colony-subscriber.js +1 -1
- package/dist/lib/config.d.ts +2 -2
- package/dist/lib/config.d.ts.map +1 -1
- package/dist/lib/config.js +13 -8
- package/dist/lib/config.js.map +1 -1
- package/dist/lib/conflict-renderer.d.ts.map +1 -1
- package/dist/lib/conflict-renderer.js +17 -34
- package/dist/lib/conflict-renderer.js.map +1 -1
- package/dist/lib/ecosystem-env.d.ts +33 -0
- package/dist/lib/ecosystem-env.d.ts.map +1 -0
- package/dist/lib/ecosystem-env.js +62 -0
- package/dist/lib/ecosystem-env.js.map +1 -0
- package/dist/lib/git-events-subscriber.d.ts +27 -0
- package/dist/lib/git-events-subscriber.d.ts.map +1 -1
- package/dist/lib/git-events-subscriber.js +149 -58
- package/dist/lib/git-events-subscriber.js.map +1 -1
- package/dist/lib/git-merge-analyzer.d.ts +38 -0
- package/dist/lib/git-merge-analyzer.d.ts.map +1 -0
- package/dist/lib/git-merge-analyzer.js +23 -0
- package/dist/lib/git-merge-analyzer.js.map +1 -0
- package/dist/lib/git.d.ts +88 -0
- package/dist/lib/git.d.ts.map +1 -1
- package/dist/lib/git.js +499 -9
- package/dist/lib/git.js.map +1 -1
- package/dist/lib/github.d.ts +69 -1
- package/dist/lib/github.d.ts.map +1 -1
- package/dist/lib/github.js +230 -16
- package/dist/lib/github.js.map +1 -1
- package/dist/lib/graph.d.ts +15 -0
- package/dist/lib/graph.d.ts.map +1 -1
- package/dist/lib/graph.js +31 -0
- package/dist/lib/graph.js.map +1 -1
- package/dist/lib/machine.d.ts +14 -0
- package/dist/lib/machine.d.ts.map +1 -0
- package/dist/lib/machine.js +38 -0
- package/dist/lib/machine.js.map +1 -0
- package/dist/lib/notify.d.ts +68 -0
- package/dist/lib/notify.d.ts.map +1 -0
- package/dist/lib/notify.js +111 -0
- package/dist/lib/notify.js.map +1 -0
- package/dist/lib/outline.d.ts +6 -0
- package/dist/lib/outline.d.ts.map +1 -0
- package/dist/lib/outline.js +60 -0
- package/dist/lib/outline.js.map +1 -0
- package/dist/lib/push-registry.d.ts +22 -0
- package/dist/lib/push-registry.d.ts.map +1 -0
- package/dist/lib/push-registry.js +21 -0
- package/dist/lib/push-registry.js.map +1 -0
- package/dist/lib/reconcile.d.ts +100 -0
- package/dist/lib/reconcile.d.ts.map +1 -0
- package/dist/lib/reconcile.js +121 -0
- package/dist/lib/reconcile.js.map +1 -0
- package/dist/lib/security.d.ts +1 -6
- package/dist/lib/security.d.ts.map +1 -1
- package/dist/lib/security.js +1 -11
- package/dist/lib/security.js.map +1 -1
- package/dist/lib/semantic-analysis.d.ts +31 -0
- package/dist/lib/semantic-analysis.d.ts.map +1 -0
- package/dist/lib/semantic-analysis.js +120 -0
- package/dist/lib/semantic-analysis.js.map +1 -0
- package/dist/lib/supabase-credentials.d.ts +36 -0
- package/dist/lib/supabase-credentials.d.ts.map +1 -0
- package/dist/lib/supabase-credentials.js +43 -0
- package/dist/lib/supabase-credentials.js.map +1 -0
- package/dist/lib/trunk.d.ts +39 -0
- package/dist/lib/trunk.d.ts.map +1 -0
- package/dist/lib/trunk.js +116 -0
- package/dist/lib/trunk.js.map +1 -0
- package/dist/storage/adapter.d.ts +20 -1
- package/dist/storage/adapter.d.ts.map +1 -1
- package/dist/storage/branch-registry-store.d.ts +1 -1
- package/dist/storage/branch-registry-store.d.ts.map +1 -1
- package/dist/storage/factory.d.ts +0 -4
- package/dist/storage/factory.d.ts.map +1 -1
- package/dist/storage/factory.js +2 -26
- package/dist/storage/factory.js.map +1 -1
- package/dist/storage/json-branch-registry-store.d.ts +1 -1
- package/dist/storage/json-branch-registry-store.d.ts.map +1 -1
- package/dist/storage/json-branch-registry-store.js +33 -7
- package/dist/storage/json-branch-registry-store.js.map +1 -1
- package/dist/storage/local.d.ts +1 -1
- package/dist/storage/local.d.ts.map +1 -1
- package/dist/storage/local.js +2 -2
- package/dist/storage/local.js.map +1 -1
- package/dist/storage/memory-branch-registry-store.d.ts +1 -1
- package/dist/storage/memory-branch-registry-store.d.ts.map +1 -1
- package/dist/storage/memory-branch-registry-store.js +4 -1
- package/dist/storage/memory-branch-registry-store.js.map +1 -1
- package/dist/storage/supabase-registry-sync-client-impl.d.ts +1 -7
- package/dist/storage/supabase-registry-sync-client-impl.d.ts.map +1 -1
- package/dist/storage/supabase-registry-sync-client-impl.js +17 -61
- package/dist/storage/supabase-registry-sync-client-impl.js.map +1 -1
- package/dist/storage/supabase-registry-sync-client.d.ts +1 -1
- package/dist/storage/supabase-registry-sync-client.d.ts.map +1 -1
- package/dist/storage/supabase.d.ts +3 -9
- package/dist/storage/supabase.d.ts.map +1 -1
- package/dist/storage/supabase.js +4 -22
- package/dist/storage/supabase.js.map +1 -1
- package/dist/types/cloud.d.ts +1 -0
- package/dist/types/cloud.d.ts.map +1 -1
- package/package.json +88 -90
- package/dist/commands/activate.d.ts +0 -9
- package/dist/commands/activate.d.ts.map +0 -1
- package/dist/commands/activate.js +0 -45
- package/dist/commands/activate.js.map +0 -1
- package/dist/commands/active-windows.d.ts +0 -16
- package/dist/commands/active-windows.d.ts.map +0 -1
- package/dist/commands/active-windows.js +0 -373
- package/dist/commands/active-windows.js.map +0 -1
- package/dist/commands/ai.d.ts +0 -15
- package/dist/commands/ai.d.ts.map +0 -1
- package/dist/commands/ai.js +0 -498
- package/dist/commands/ai.js.map +0 -1
- package/dist/commands/audit-mark.d.ts +0 -12
- package/dist/commands/audit-mark.d.ts.map +0 -1
- package/dist/commands/audit-mark.js +0 -204
- package/dist/commands/audit-mark.js.map +0 -1
- package/dist/commands/auto.d.ts +0 -8
- package/dist/commands/auto.d.ts.map +0 -1
- package/dist/commands/auto.js +0 -207
- package/dist/commands/auto.js.map +0 -1
- package/dist/commands/bot.d.ts +0 -16
- package/dist/commands/bot.d.ts.map +0 -1
- package/dist/commands/bot.js +0 -416
- package/dist/commands/bot.js.map +0 -1
- package/dist/commands/close.d.ts +0 -9
- package/dist/commands/close.d.ts.map +0 -1
- package/dist/commands/close.js +0 -129
- package/dist/commands/close.js.map +0 -1
- package/dist/commands/collab-sync.d.ts +0 -14
- package/dist/commands/collab-sync.d.ts.map +0 -1
- package/dist/commands/collab-sync.js +0 -264
- package/dist/commands/collab-sync.js.map +0 -1
- package/dist/commands/collab.d.ts +0 -6
- package/dist/commands/collab.d.ts.map +0 -1
- package/dist/commands/collab.js +0 -103
- package/dist/commands/collab.js.map +0 -1
- package/dist/commands/completions.d.ts +0 -8
- package/dist/commands/completions.d.ts.map +0 -1
- package/dist/commands/completions.js +0 -83
- package/dist/commands/completions.js.map +0 -1
- package/dist/commands/daily.d.ts +0 -7
- package/dist/commands/daily.d.ts.map +0 -1
- package/dist/commands/daily.js +0 -171
- package/dist/commands/daily.js.map +0 -1
- package/dist/commands/dashboard.d.ts +0 -22
- package/dist/commands/dashboard.d.ts.map +0 -1
- package/dist/commands/dashboard.js +0 -401
- package/dist/commands/dashboard.js.map +0 -1
- package/dist/commands/demo.d.ts +0 -3
- package/dist/commands/demo.d.ts.map +0 -1
- package/dist/commands/demo.js +0 -118
- package/dist/commands/demo.js.map +0 -1
- package/dist/commands/ecosystem-loader.d.ts +0 -14
- package/dist/commands/ecosystem-loader.d.ts.map +0 -1
- package/dist/commands/ecosystem-loader.js +0 -90
- package/dist/commands/ecosystem-loader.js.map +0 -1
- package/dist/commands/fleet-status.d.ts +0 -14
- package/dist/commands/fleet-status.d.ts.map +0 -1
- package/dist/commands/fleet-status.js +0 -127
- package/dist/commands/fleet-status.js.map +0 -1
- package/dist/commands/inbox.d.ts +0 -3
- package/dist/commands/inbox.d.ts.map +0 -1
- package/dist/commands/inbox.js +0 -120
- package/dist/commands/inbox.js.map +0 -1
- package/dist/commands/intent-scan.d.ts +0 -17
- package/dist/commands/intent-scan.d.ts.map +0 -1
- package/dist/commands/intent-scan.js +0 -336
- package/dist/commands/intent-scan.js.map +0 -1
- package/dist/commands/key-import.d.ts +0 -3
- package/dist/commands/key-import.d.ts.map +0 -1
- package/dist/commands/key-import.js +0 -54
- package/dist/commands/key-import.js.map +0 -1
- package/dist/commands/keygen.d.ts +0 -3
- package/dist/commands/keygen.d.ts.map +0 -1
- package/dist/commands/keygen.js +0 -53
- package/dist/commands/keygen.js.map +0 -1
- package/dist/commands/keys.d.ts +0 -3
- package/dist/commands/keys.d.ts.map +0 -1
- package/dist/commands/keys.js +0 -56
- package/dist/commands/keys.js.map +0 -1
- package/dist/commands/lock.d.ts +0 -11
- package/dist/commands/lock.d.ts.map +0 -1
- package/dist/commands/lock.js +0 -257
- package/dist/commands/lock.js.map +0 -1
- package/dist/commands/mcp-health.d.ts +0 -3
- package/dist/commands/mcp-health.d.ts.map +0 -1
- package/dist/commands/mcp-health.js +0 -305
- package/dist/commands/mcp-health.js.map +0 -1
- package/dist/commands/mcp-restart.d.ts +0 -3
- package/dist/commands/mcp-restart.d.ts.map +0 -1
- package/dist/commands/mcp-restart.js +0 -176
- package/dist/commands/mcp-restart.js.map +0 -1
- package/dist/commands/monitor.d.ts +0 -3
- package/dist/commands/monitor.d.ts.map +0 -1
- package/dist/commands/monitor.js +0 -153
- package/dist/commands/monitor.js.map +0 -1
- package/dist/commands/msg-read.d.ts +0 -3
- package/dist/commands/msg-read.d.ts.map +0 -1
- package/dist/commands/msg-read.js +0 -95
- package/dist/commands/msg-read.js.map +0 -1
- package/dist/commands/pulse.d.ts +0 -13
- package/dist/commands/pulse.d.ts.map +0 -1
- package/dist/commands/pulse.js +0 -174
- package/dist/commands/pulse.js.map +0 -1
- package/dist/commands/queen.d.ts +0 -25
- package/dist/commands/queen.d.ts.map +0 -1
- package/dist/commands/queen.js +0 -326
- package/dist/commands/queen.js.map +0 -1
- package/dist/commands/radar.d.ts +0 -3
- package/dist/commands/radar.d.ts.map +0 -1
- package/dist/commands/radar.js +0 -147
- package/dist/commands/radar.js.map +0 -1
- package/dist/commands/rescue.d.ts +0 -11
- package/dist/commands/rescue.d.ts.map +0 -1
- package/dist/commands/rescue.js +0 -147
- package/dist/commands/rescue.js.map +0 -1
- package/dist/commands/semantic.d.ts +0 -3
- package/dist/commands/semantic.d.ts.map +0 -1
- package/dist/commands/semantic.js +0 -62
- package/dist/commands/semantic.js.map +0 -1
- package/dist/commands/send.d.ts +0 -3
- package/dist/commands/send.d.ts.map +0 -1
- package/dist/commands/send.js +0 -121
- package/dist/commands/send.js.map +0 -1
- package/dist/commands/status.d.ts +0 -9
- package/dist/commands/status.d.ts.map +0 -1
- package/dist/commands/status.js +0 -41
- package/dist/commands/status.js.map +0 -1
- package/dist/commands/sync-advisor.d.ts +0 -14
- package/dist/commands/sync-advisor.d.ts.map +0 -1
- package/dist/commands/sync-advisor.js +0 -110
- package/dist/commands/sync-advisor.js.map +0 -1
- package/dist/commands/tension.d.ts +0 -12
- package/dist/commands/tension.d.ts.map +0 -1
- package/dist/commands/tension.js +0 -262
- package/dist/commands/tension.js.map +0 -1
- package/dist/commands/torrent.d.ts +0 -9
- package/dist/commands/torrent.d.ts.map +0 -1
- package/dist/commands/torrent.js +0 -470
- package/dist/commands/torrent.js.map +0 -1
- package/dist/commands/tui.d.ts +0 -8
- package/dist/commands/tui.d.ts.map +0 -1
- package/dist/commands/tui.js +0 -15
- package/dist/commands/tui.js.map +0 -1
- package/dist/commands/wake.d.ts +0 -9
- package/dist/commands/wake.d.ts.map +0 -1
- package/dist/commands/wake.js +0 -188
- package/dist/commands/wake.js.map +0 -1
- package/dist/commands/welcome.d.ts +0 -8
- package/dist/commands/welcome.d.ts.map +0 -1
- package/dist/commands/welcome.js +0 -85
- package/dist/commands/welcome.js.map +0 -1
- package/dist/commands/who-owns.d.ts +0 -3
- package/dist/commands/who-owns.d.ts.map +0 -1
- package/dist/commands/who-owns.js +0 -68
- package/dist/commands/who-owns.js.map +0 -1
- package/dist/commands/who-touched.d.ts +0 -9
- package/dist/commands/who-touched.d.ts.map +0 -1
- package/dist/commands/who-touched.js +0 -198
- package/dist/commands/who-touched.js.map +0 -1
- package/dist/lib/crdt.d.ts +0 -83
- package/dist/lib/crdt.d.ts.map +0 -1
- package/dist/lib/crdt.js +0 -160
- package/dist/lib/crdt.js.map +0 -1
- package/dist/lib/daily-bridge.d.ts +0 -41
- package/dist/lib/daily-bridge.d.ts.map +0 -1
- package/dist/lib/daily-bridge.js +0 -186
- package/dist/lib/daily-bridge.js.map +0 -1
- package/dist/lib/hub.d.ts +0 -31
- package/dist/lib/hub.d.ts.map +0 -1
- package/dist/lib/hub.js +0 -92
- package/dist/lib/hub.js.map +0 -1
- package/dist/lib/license.d.ts +0 -61
- package/dist/lib/license.d.ts.map +0 -1
- package/dist/lib/license.js +0 -171
- package/dist/lib/license.js.map +0 -1
- package/dist/lib/pulse-renderer.d.ts +0 -19
- package/dist/lib/pulse-renderer.d.ts.map +0 -1
- package/dist/lib/pulse-renderer.js +0 -108
- package/dist/lib/pulse-renderer.js.map +0 -1
- package/dist/lib/repo-scanner.d.ts +0 -32
- package/dist/lib/repo-scanner.d.ts.map +0 -1
- package/dist/lib/repo-scanner.js +0 -160
- package/dist/lib/repo-scanner.js.map +0 -1
- package/dist/lib/salvage-analyzer.d.ts +0 -29
- package/dist/lib/salvage-analyzer.d.ts.map +0 -1
- package/dist/lib/salvage-analyzer.js +0 -121
- package/dist/lib/salvage-analyzer.js.map +0 -1
- package/dist/lib/session-logger.d.ts +0 -54
- package/dist/lib/session-logger.d.ts.map +0 -1
- package/dist/lib/session-logger.js +0 -136
- package/dist/lib/session-logger.js.map +0 -1
- package/dist/lib/symbol-extractor.d.ts +0 -41
- package/dist/lib/symbol-extractor.d.ts.map +0 -1
- package/dist/lib/symbol-extractor.js +0 -78
- package/dist/lib/symbol-extractor.js.map +0 -1
- package/dist/storage/git-messages.d.ts +0 -53
- package/dist/storage/git-messages.d.ts.map +0 -1
- package/dist/storage/git-messages.js +0 -376
- package/dist/storage/git-messages.js.map +0 -1
- package/dist/storage/local-messages.d.ts +0 -37
- package/dist/storage/local-messages.d.ts.map +0 -1
- package/dist/storage/local-messages.js +0 -151
- package/dist/storage/local-messages.js.map +0 -1
- package/dist/storage/message-adapter.d.ts +0 -86
- package/dist/storage/message-adapter.d.ts.map +0 -1
- package/dist/storage/message-adapter.js +0 -28
- package/dist/storage/message-adapter.js.map +0 -1
- package/dist/storage/message-factory.d.ts +0 -36
- package/dist/storage/message-factory.d.ts.map +0 -1
- package/dist/storage/message-factory.js +0 -99
- package/dist/storage/message-factory.js.map +0 -1
- package/dist/storage/mycmail-adapter.d.ts +0 -38
- package/dist/storage/mycmail-adapter.d.ts.map +0 -1
- package/dist/storage/mycmail-adapter.js +0 -300
- package/dist/storage/mycmail-adapter.js.map +0 -1
- package/dist/tui/dashboard.d.ts +0 -35
- package/dist/tui/dashboard.d.ts.map +0 -1
- package/dist/tui/dashboard.js +0 -199
- package/dist/tui/dashboard.js.map +0 -1
- package/dist/tui/screen.d.ts +0 -14
- package/dist/tui/screen.d.ts.map +0 -1
- package/dist/tui/screen.js +0 -138
- package/dist/tui/screen.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,91 +1,89 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
"
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
"
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
"
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
"
|
|
89
|
-
|
|
90
|
-
}
|
|
91
|
-
}
|
|
2
|
+
"name": "spidersan",
|
|
3
|
+
"version": "0.20.2",
|
|
4
|
+
"description": "Branch coordination for AI coding agents",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"bin": {
|
|
9
|
+
"spidersan": "dist/bin/spidersan.js"
|
|
10
|
+
},
|
|
11
|
+
"files": [
|
|
12
|
+
"dist",
|
|
13
|
+
"README.md",
|
|
14
|
+
"LICENSE",
|
|
15
|
+
"LICENSE.md",
|
|
16
|
+
"CHANGELOG.md"
|
|
17
|
+
],
|
|
18
|
+
"publishConfig": {
|
|
19
|
+
"access": "public"
|
|
20
|
+
},
|
|
21
|
+
"funding": {
|
|
22
|
+
"type": "individual",
|
|
23
|
+
"url": "https://github.com/sponsors/treebird7"
|
|
24
|
+
},
|
|
25
|
+
"scripts": {
|
|
26
|
+
"build": "tsc",
|
|
27
|
+
"dev": "tsc --watch",
|
|
28
|
+
"start": "node dist/bin/spidersan.js",
|
|
29
|
+
"test": "vitest",
|
|
30
|
+
"test:run": "vitest run",
|
|
31
|
+
"test:coverage": "vitest run --coverage",
|
|
32
|
+
"lint": "eslint 'src/**/*.ts'",
|
|
33
|
+
"typecheck": "tsc --noEmit",
|
|
34
|
+
"prepublishOnly": "npm run typecheck && npm run lint && npm run build",
|
|
35
|
+
"prepare": "npm run build",
|
|
36
|
+
"stress-test": "node scripts/stress-test.js",
|
|
37
|
+
"stress-test:clean": "node scripts/stress-test.js --clean",
|
|
38
|
+
"stress-test:report": "node scripts/stress-test.js --report"
|
|
39
|
+
},
|
|
40
|
+
"keywords": [
|
|
41
|
+
"ai",
|
|
42
|
+
"agents",
|
|
43
|
+
"git",
|
|
44
|
+
"branch",
|
|
45
|
+
"coordination",
|
|
46
|
+
"merge",
|
|
47
|
+
"conflicts",
|
|
48
|
+
"claude",
|
|
49
|
+
"cursor",
|
|
50
|
+
"copilot",
|
|
51
|
+
"mcp",
|
|
52
|
+
"cli"
|
|
53
|
+
],
|
|
54
|
+
"author": "treebird7",
|
|
55
|
+
"license": "MIT",
|
|
56
|
+
"repository": {
|
|
57
|
+
"type": "git",
|
|
58
|
+
"url": "git+https://github.com/treebird7/spidersan-oss.git"
|
|
59
|
+
},
|
|
60
|
+
"bugs": {
|
|
61
|
+
"url": "https://github.com/treebird7/spidersan-oss/issues"
|
|
62
|
+
},
|
|
63
|
+
"homepage": "https://github.com/treebird7/spidersan-oss#readme",
|
|
64
|
+
"engines": {
|
|
65
|
+
"node": ">=20.0.0"
|
|
66
|
+
},
|
|
67
|
+
"dependencies": {
|
|
68
|
+
"chalk": "^5.6.2",
|
|
69
|
+
"chokidar": "^5.0.0",
|
|
70
|
+
"commander": "^12.1.0",
|
|
71
|
+
"dotenv": "^17.2.3",
|
|
72
|
+
"execa": "^9.6.1",
|
|
73
|
+
"minimatch": "^10.2.4",
|
|
74
|
+
"moment": "^2.30.1",
|
|
75
|
+
"tree-sitter": "^0.21.1",
|
|
76
|
+
"tree-sitter-typescript": "^0.23.2",
|
|
77
|
+
"tweetnacl": "^1.0.3",
|
|
78
|
+
"tweetnacl-util": "^0.15.1"
|
|
79
|
+
},
|
|
80
|
+
"devDependencies": {
|
|
81
|
+
"@eslint/js": "^10.0.1",
|
|
82
|
+
"@types/node": "^20.0.0",
|
|
83
|
+
"eslint": "^10.8.0",
|
|
84
|
+
"typescript": "^5.3.0",
|
|
85
|
+
"typescript-eslint": "^8.65.0",
|
|
86
|
+
"vitest": "^4.1.8"
|
|
87
|
+
},
|
|
88
|
+
"packageManager": "npm@11.6.1"
|
|
89
|
+
}
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,45 +0,0 @@
|
|
|
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
|
-
import { verifyLicense, saveLicense, getLicenseStatus } from '../lib/license.js';
|
|
9
|
-
export const activateCommand = new Command('activate')
|
|
10
|
-
.description('Activate a Pro license key')
|
|
11
|
-
.argument('<license-key>', 'Your license key from spidersan.dev/pro')
|
|
12
|
-
.action(async (licenseKey) => {
|
|
13
|
-
console.log('š·ļø Activating license...\n');
|
|
14
|
-
// Verify the license
|
|
15
|
-
const license = verifyLicense(licenseKey);
|
|
16
|
-
if (!license) {
|
|
17
|
-
console.error('ā Invalid license key');
|
|
18
|
-
console.error(' Please check your key and try again.');
|
|
19
|
-
console.error(' Get a license at: spidersan.dev/pro');
|
|
20
|
-
process.exit(1);
|
|
21
|
-
}
|
|
22
|
-
if (license.isExpired) {
|
|
23
|
-
console.error('ā This license has expired');
|
|
24
|
-
console.error(` Expired on: ${new Date(license.data.expiresAt).toLocaleDateString()}`);
|
|
25
|
-
console.error(' Renew at: spidersan.dev/pro');
|
|
26
|
-
process.exit(1);
|
|
27
|
-
}
|
|
28
|
-
// Save the license
|
|
29
|
-
const saved = saveLicense(licenseKey);
|
|
30
|
-
if (!saved) {
|
|
31
|
-
console.error('ā Failed to save license');
|
|
32
|
-
console.error(' Please check file permissions for ~/.spidersan/');
|
|
33
|
-
process.exit(1);
|
|
34
|
-
}
|
|
35
|
-
// Show success
|
|
36
|
-
const status = getLicenseStatus();
|
|
37
|
-
console.log('ā
Pro License activated!\n');
|
|
38
|
-
console.log(` Email: ${status.email}`);
|
|
39
|
-
console.log(` Plan: ${status.plan.toUpperCase()}`);
|
|
40
|
-
console.log(` Expires: ${new Date(status.expiresAt).toLocaleDateString()}`);
|
|
41
|
-
console.log(` Features: ${status.features.join(', ')}`);
|
|
42
|
-
console.log('');
|
|
43
|
-
console.log('š·ļø Thank you for supporting Spidersan!');
|
|
44
|
-
});
|
|
45
|
-
//# sourceMappingURL=activate.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"activate.js","sourceRoot":"","sources":["../../src/commands/activate.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAEjF,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,OAAO,CAAC,UAAU,CAAC;KACjD,WAAW,CAAC,4BAA4B,CAAC;KACzC,QAAQ,CAAC,eAAe,EAAE,yCAAyC,CAAC;KACpE,MAAM,CAAC,KAAK,EAAE,UAAkB,EAAE,EAAE;IACjC,OAAO,CAAC,GAAG,CAAC,6BAA6B,CAAC,CAAC;IAE3C,qBAAqB;IACrB,MAAM,OAAO,GAAG,aAAa,CAAC,UAAU,CAAC,CAAC;IAE1C,IAAI,CAAC,OAAO,EAAE,CAAC;QACX,OAAO,CAAC,KAAK,CAAC,uBAAuB,CAAC,CAAC;QACvC,OAAO,CAAC,KAAK,CAAC,yCAAyC,CAAC,CAAC;QACzD,OAAO,CAAC,KAAK,CAAC,wCAAwC,CAAC,CAAC;QACxD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACpB,CAAC;IAED,IAAI,OAAO,CAAC,SAAS,EAAE,CAAC;QACpB,OAAO,CAAC,KAAK,CAAC,4BAA4B,CAAC,CAAC;QAC5C,OAAO,CAAC,KAAK,CAAC,kBAAkB,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,kBAAkB,EAAE,EAAE,CAAC,CAAC;QACzF,OAAO,CAAC,KAAK,CAAC,gCAAgC,CAAC,CAAC;QAChD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACpB,CAAC;IAED,mBAAmB;IACnB,MAAM,KAAK,GAAG,WAAW,CAAC,UAAU,CAAC,CAAC;IACtC,IAAI,CAAC,KAAK,EAAE,CAAC;QACT,OAAO,CAAC,KAAK,CAAC,0BAA0B,CAAC,CAAC;QAC1C,OAAO,CAAC,KAAK,CAAC,oDAAoD,CAAC,CAAC;QACpE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACpB,CAAC;IAED,eAAe;IACf,MAAM,MAAM,GAAG,gBAAgB,EAAE,CAAC;IAClC,OAAO,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC;IAC1C,OAAO,CAAC,GAAG,CAAC,gBAAgB,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC;IAC5C,OAAO,CAAC,GAAG,CAAC,gBAAgB,MAAM,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;IACzD,OAAO,CAAC,GAAG,CAAC,gBAAgB,IAAI,IAAI,CAAC,MAAM,CAAC,SAAU,CAAC,CAAC,kBAAkB,EAAE,EAAE,CAAC,CAAC;IAChF,OAAO,CAAC,GAAG,CAAC,gBAAgB,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC1D,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAChB,OAAO,CAAC,GAAG,CAAC,yCAAyC,CAAC,CAAC;AAC3D,CAAC,CAAC,CAAC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* spidersan active-windows
|
|
3
|
-
*
|
|
4
|
-
* Layer 4: Temporal Conflict Detection
|
|
5
|
-
*
|
|
6
|
-
* Tracks when agents are actively working and detects
|
|
7
|
-
* overlapping work sessions on the same files/areas.
|
|
8
|
-
*
|
|
9
|
-
* Usage:
|
|
10
|
-
* spidersan active-windows # Show current active sessions
|
|
11
|
-
* spidersan active-windows --history # Show recent session overlaps
|
|
12
|
-
* spidersan active-windows --files # Group by files touched
|
|
13
|
-
*/
|
|
14
|
-
import { Command } from 'commander';
|
|
15
|
-
export declare const activeWindowsCommand: Command;
|
|
16
|
-
//# sourceMappingURL=active-windows.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"active-windows.d.ts","sourceRoot":"","sources":["../../src/commands/active-windows.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAiSpC,eAAO,MAAM,oBAAoB,SA2I3B,CAAC"}
|
|
@@ -1,373 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* spidersan active-windows
|
|
3
|
-
*
|
|
4
|
-
* Layer 4: Temporal Conflict Detection
|
|
5
|
-
*
|
|
6
|
-
* Tracks when agents are actively working and detects
|
|
7
|
-
* overlapping work sessions on the same files/areas.
|
|
8
|
-
*
|
|
9
|
-
* Usage:
|
|
10
|
-
* spidersan active-windows # Show current active sessions
|
|
11
|
-
* spidersan active-windows --history # Show recent session overlaps
|
|
12
|
-
* spidersan active-windows --files # Group by files touched
|
|
13
|
-
*/
|
|
14
|
-
import { Command } from 'commander';
|
|
15
|
-
import { readFileSync, readdirSync, existsSync } from 'fs';
|
|
16
|
-
import { join } from 'path';
|
|
17
|
-
import { execSync } from 'child_process';
|
|
18
|
-
import chalk from 'chalk';
|
|
19
|
-
// Parse collab for dawn/close entries
|
|
20
|
-
function findSessionBoundaries(collabDir) {
|
|
21
|
-
const sessions = new Map();
|
|
22
|
-
const files = readdirSync(collabDir)
|
|
23
|
-
.filter(f => f.match(/^\d{4}-\d{2}-\d{2}-daily\.md$/))
|
|
24
|
-
.sort()
|
|
25
|
-
.slice(-3); // Last 3 days
|
|
26
|
-
for (const file of files) {
|
|
27
|
-
const dateMatch = file.match(/^(\d{4}-\d{2}-\d{2})/);
|
|
28
|
-
if (!dateMatch)
|
|
29
|
-
continue;
|
|
30
|
-
const dateStr = dateMatch[1];
|
|
31
|
-
const content = readFileSync(join(collabDir, file), 'utf-8');
|
|
32
|
-
// Find agent entries with times
|
|
33
|
-
const entryPattern = /^##\s+([\p{Emoji}]+)\s+(\w+)\s*[ā-]\s*(\d{1,2}):(\d{2})/gmu;
|
|
34
|
-
let match;
|
|
35
|
-
while ((match = entryPattern.exec(content)) !== null) {
|
|
36
|
-
const agent = match[2];
|
|
37
|
-
const hour = parseInt(match[3]);
|
|
38
|
-
const minute = parseInt(match[4]);
|
|
39
|
-
const entryTime = new Date(`${dateStr}T${hour.toString().padStart(2, '0')}:${minute.toString().padStart(2, '0')}:00`);
|
|
40
|
-
// Check if it's a dawn or close entry
|
|
41
|
-
const contextStart = match.index;
|
|
42
|
-
const contextEnd = Math.min(content.length, contextStart + 500);
|
|
43
|
-
const context = content.substring(contextStart, contextEnd).toLowerCase();
|
|
44
|
-
if (!sessions.has(agent)) {
|
|
45
|
-
sessions.set(agent, []);
|
|
46
|
-
}
|
|
47
|
-
const agentSessions = sessions.get(agent);
|
|
48
|
-
if (context.includes('dawn') || context.includes('morning') || context.includes('joining')) {
|
|
49
|
-
// Start of session
|
|
50
|
-
agentSessions.push({ dawn: entryTime });
|
|
51
|
-
}
|
|
52
|
-
else if (context.includes('close') || context.includes('closing') || context.includes('night')) {
|
|
53
|
-
// End of session
|
|
54
|
-
const lastSession = agentSessions[agentSessions.length - 1];
|
|
55
|
-
if (lastSession && !lastSession.close) {
|
|
56
|
-
lastSession.close = entryTime;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
return sessions;
|
|
62
|
-
}
|
|
63
|
-
// Get recent git activity per author
|
|
64
|
-
function getGitActivity(repoPath, hours) {
|
|
65
|
-
const activity = new Map();
|
|
66
|
-
try {
|
|
67
|
-
const since = new Date(Date.now() - hours * 60 * 60 * 1000);
|
|
68
|
-
const sinceStr = since.toISOString();
|
|
69
|
-
// Get commits with files changed
|
|
70
|
-
const log = execSync(`git log --since="${sinceStr}" --name-only --pretty=format:"COMMIT:%h|%an|%ai" 2>/dev/null`, { cwd: repoPath, encoding: 'utf-8', maxBuffer: 10 * 1024 * 1024 });
|
|
71
|
-
const lines = log.split('\n');
|
|
72
|
-
let currentAuthor = '';
|
|
73
|
-
let currentTime = null;
|
|
74
|
-
let currentFiles = [];
|
|
75
|
-
for (const line of lines) {
|
|
76
|
-
if (line.startsWith('COMMIT:')) {
|
|
77
|
-
// Save previous commit
|
|
78
|
-
if (currentAuthor && currentFiles.length > 0 && currentTime) {
|
|
79
|
-
if (!activity.has(currentAuthor)) {
|
|
80
|
-
activity.set(currentAuthor, []);
|
|
81
|
-
}
|
|
82
|
-
activity.get(currentAuthor).push({
|
|
83
|
-
files: [...currentFiles],
|
|
84
|
-
timestamp: currentTime
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
|
-
// Parse new commit
|
|
88
|
-
const parts = line.substring(7).split('|');
|
|
89
|
-
currentAuthor = parts[1] || 'Unknown';
|
|
90
|
-
currentTime = new Date(parts[2]);
|
|
91
|
-
currentFiles = [];
|
|
92
|
-
}
|
|
93
|
-
else if (line.trim()) {
|
|
94
|
-
currentFiles.push(line.trim());
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
// Don't forget last commit
|
|
98
|
-
if (currentAuthor && currentFiles.length > 0 && currentTime) {
|
|
99
|
-
if (!activity.has(currentAuthor)) {
|
|
100
|
-
activity.set(currentAuthor, []);
|
|
101
|
-
}
|
|
102
|
-
activity.get(currentAuthor).push({
|
|
103
|
-
files: [...currentFiles],
|
|
104
|
-
timestamp: currentTime
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
catch (e) {
|
|
109
|
-
// Not a git repo or no commits
|
|
110
|
-
}
|
|
111
|
-
return activity;
|
|
112
|
-
}
|
|
113
|
-
// Build work windows from git activity
|
|
114
|
-
function buildWorkWindows(repoPath, hours) {
|
|
115
|
-
const activity = getGitActivity(repoPath, hours);
|
|
116
|
-
const windows = [];
|
|
117
|
-
// Get machine name from hostname
|
|
118
|
-
let machine = 'Unknown';
|
|
119
|
-
try {
|
|
120
|
-
machine = execSync('hostname', { encoding: 'utf-8' }).trim();
|
|
121
|
-
}
|
|
122
|
-
catch {
|
|
123
|
-
// Ignore errors getting hostname
|
|
124
|
-
}
|
|
125
|
-
for (const [author, commits] of activity) {
|
|
126
|
-
if (commits.length === 0)
|
|
127
|
-
continue;
|
|
128
|
-
// Sort by time
|
|
129
|
-
commits.sort((a, b) => a.timestamp.getTime() - b.timestamp.getTime());
|
|
130
|
-
// Group commits into windows (gap > 30 min = new window)
|
|
131
|
-
let windowStart = commits[0].timestamp;
|
|
132
|
-
let windowEnd = commits[0].timestamp;
|
|
133
|
-
let windowFiles = new Set(commits[0].files);
|
|
134
|
-
for (let i = 1; i < commits.length; i++) {
|
|
135
|
-
const gap = commits[i].timestamp.getTime() - windowEnd.getTime();
|
|
136
|
-
if (gap > 30 * 60 * 1000) { // 30 min gap
|
|
137
|
-
// Save current window
|
|
138
|
-
windows.push({
|
|
139
|
-
agent: author,
|
|
140
|
-
machine,
|
|
141
|
-
startTime: windowStart,
|
|
142
|
-
endTime: windowEnd,
|
|
143
|
-
filesModified: Array.from(windowFiles),
|
|
144
|
-
areasWorked: extractAreas(Array.from(windowFiles))
|
|
145
|
-
});
|
|
146
|
-
// Start new window
|
|
147
|
-
windowStart = commits[i].timestamp;
|
|
148
|
-
windowEnd = commits[i].timestamp;
|
|
149
|
-
windowFiles = new Set(commits[i].files);
|
|
150
|
-
}
|
|
151
|
-
else {
|
|
152
|
-
windowEnd = commits[i].timestamp;
|
|
153
|
-
commits[i].files.forEach(f => windowFiles.add(f));
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
// Check if last window is still active (last commit < 2 hours ago)
|
|
157
|
-
const isActive = Date.now() - windowEnd.getTime() < 2 * 60 * 60 * 1000;
|
|
158
|
-
windows.push({
|
|
159
|
-
agent: author,
|
|
160
|
-
machine,
|
|
161
|
-
startTime: windowStart,
|
|
162
|
-
endTime: isActive ? null : windowEnd,
|
|
163
|
-
filesModified: Array.from(windowFiles),
|
|
164
|
-
areasWorked: extractAreas(Array.from(windowFiles))
|
|
165
|
-
});
|
|
166
|
-
}
|
|
167
|
-
return windows;
|
|
168
|
-
}
|
|
169
|
-
function extractAreas(files) {
|
|
170
|
-
const areas = new Set();
|
|
171
|
-
for (const file of files) {
|
|
172
|
-
const parts = file.split('/');
|
|
173
|
-
if (parts.length > 1) {
|
|
174
|
-
areas.add(parts[0]); // Top level directory
|
|
175
|
-
if (parts.length > 2) {
|
|
176
|
-
areas.add(`${parts[0]}/${parts[1]}`); // Second level
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
return Array.from(areas);
|
|
181
|
-
}
|
|
182
|
-
function findWindowOverlaps(windows) {
|
|
183
|
-
const overlaps = [];
|
|
184
|
-
for (let i = 0; i < windows.length; i++) {
|
|
185
|
-
for (let j = i + 1; j < windows.length; j++) {
|
|
186
|
-
const w1 = windows[i];
|
|
187
|
-
const w2 = windows[j];
|
|
188
|
-
// Same agent can't conflict with self
|
|
189
|
-
if (w1.agent === w2.agent)
|
|
190
|
-
continue;
|
|
191
|
-
// Calculate time overlap
|
|
192
|
-
const start1 = w1.startTime.getTime();
|
|
193
|
-
const end1 = (w1.endTime || new Date()).getTime();
|
|
194
|
-
const start2 = w2.startTime.getTime();
|
|
195
|
-
const end2 = (w2.endTime || new Date()).getTime();
|
|
196
|
-
const overlapStart = Math.max(start1, start2);
|
|
197
|
-
const overlapEnd = Math.min(end1, end2);
|
|
198
|
-
if (overlapStart >= overlapEnd)
|
|
199
|
-
continue; // No time overlap
|
|
200
|
-
const overlapMinutes = Math.round((overlapEnd - overlapStart) / (60 * 1000));
|
|
201
|
-
// Check file/area overlap
|
|
202
|
-
const sharedFiles = w1.filesModified.filter(f => w2.filesModified.includes(f));
|
|
203
|
-
const sharedAreas = w1.areasWorked.filter(a => w2.areasWorked.includes(a));
|
|
204
|
-
// Determine severity
|
|
205
|
-
let severity = 'safe';
|
|
206
|
-
if (sharedFiles.length > 0) {
|
|
207
|
-
severity = 'conflict';
|
|
208
|
-
}
|
|
209
|
-
else if (sharedAreas.length > 0) {
|
|
210
|
-
severity = 'warn';
|
|
211
|
-
}
|
|
212
|
-
if (severity !== 'safe') {
|
|
213
|
-
overlaps.push({
|
|
214
|
-
window1: w1,
|
|
215
|
-
window2: w2,
|
|
216
|
-
overlapMinutes,
|
|
217
|
-
sharedFiles,
|
|
218
|
-
sharedAreas,
|
|
219
|
-
severity
|
|
220
|
-
});
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
return overlaps.sort((a, b) => {
|
|
225
|
-
if (a.severity === 'conflict' && b.severity !== 'conflict')
|
|
226
|
-
return -1;
|
|
227
|
-
if (b.severity === 'conflict' && a.severity !== 'conflict')
|
|
228
|
-
return 1;
|
|
229
|
-
return b.overlapMinutes - a.overlapMinutes;
|
|
230
|
-
});
|
|
231
|
-
}
|
|
232
|
-
function formatDuration(start, end) {
|
|
233
|
-
const endTime = end || new Date();
|
|
234
|
-
const minutes = Math.round((endTime.getTime() - start.getTime()) / (60 * 1000));
|
|
235
|
-
if (minutes < 60)
|
|
236
|
-
return `${minutes}m`;
|
|
237
|
-
const hours = Math.floor(minutes / 60);
|
|
238
|
-
const mins = minutes % 60;
|
|
239
|
-
return `${hours}h${mins > 0 ? ` ${mins}m` : ''}`;
|
|
240
|
-
}
|
|
241
|
-
function formatTime(date) {
|
|
242
|
-
return date.toLocaleTimeString('en-GB', { hour: '2-digit', minute: '2-digit' });
|
|
243
|
-
}
|
|
244
|
-
export const activeWindowsCommand = new Command('active-windows')
|
|
245
|
-
.description('Detect overlapping work sessions (Layer 4)')
|
|
246
|
-
.option('--hours <n>', 'Hours to look back', '24')
|
|
247
|
-
.option('--repo <path>', 'Repository to analyze', process.cwd())
|
|
248
|
-
.option('--json', 'Output as JSON')
|
|
249
|
-
.option('--files', 'Group by files touched')
|
|
250
|
-
.option('--all-repos', 'Scan all /Dev repositories')
|
|
251
|
-
.addHelpText('after', `
|
|
252
|
-
Examples:
|
|
253
|
-
spidersan active-windows # Show sessions in current repo
|
|
254
|
-
spidersan active-windows --hours 48 # Look back 48 hours
|
|
255
|
-
spidersan active-windows --all-repos # Scan all repos
|
|
256
|
-
spidersan active-windows --files # Show files per session
|
|
257
|
-
|
|
258
|
-
Layer 4 of Spidersan's 7-layer conflict detection:
|
|
259
|
-
L1: File-level (git conflicts)
|
|
260
|
-
L2: Semantic (code dependencies)
|
|
261
|
-
L3: Intent (collab entries)
|
|
262
|
-
L4: Temporal (active windows) ā THIS
|
|
263
|
-
L5: Cross-repo (breaking changes)
|
|
264
|
-
L6: Predictive (pattern analysis)
|
|
265
|
-
L7: Resolution (auto-merge)
|
|
266
|
-
`)
|
|
267
|
-
.action((options) => {
|
|
268
|
-
const hours = parseInt(options.hours) || 24;
|
|
269
|
-
const isJson = options.json;
|
|
270
|
-
let allWindows = [];
|
|
271
|
-
if (options.allRepos) {
|
|
272
|
-
// Scan all /Dev repos
|
|
273
|
-
const devDir = join(process.env.HOME || '', 'Dev');
|
|
274
|
-
if (existsSync(devDir)) {
|
|
275
|
-
const repos = readdirSync(devDir)
|
|
276
|
-
.filter(d => existsSync(join(devDir, d, '.git')));
|
|
277
|
-
for (const repo of repos) {
|
|
278
|
-
const repoPath = join(devDir, repo);
|
|
279
|
-
const windows = buildWorkWindows(repoPath, hours);
|
|
280
|
-
// Tag windows with repo name
|
|
281
|
-
windows.forEach(w => {
|
|
282
|
-
w.areasWorked = w.areasWorked.map(a => `${repo}/${a}`);
|
|
283
|
-
w.filesModified = w.filesModified.map(f => `${repo}/${f}`);
|
|
284
|
-
});
|
|
285
|
-
allWindows.push(...windows);
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
|
-
}
|
|
289
|
-
else {
|
|
290
|
-
allWindows = buildWorkWindows(options.repo, hours);
|
|
291
|
-
}
|
|
292
|
-
// Find overlaps
|
|
293
|
-
const overlaps = findWindowOverlaps(allWindows);
|
|
294
|
-
if (isJson) {
|
|
295
|
-
console.log(JSON.stringify({
|
|
296
|
-
windows: allWindows.map(w => ({
|
|
297
|
-
...w,
|
|
298
|
-
startTime: w.startTime.toISOString(),
|
|
299
|
-
endTime: w.endTime?.toISOString() || null
|
|
300
|
-
})),
|
|
301
|
-
overlaps: overlaps.map(o => ({
|
|
302
|
-
...o,
|
|
303
|
-
window1: {
|
|
304
|
-
agent: o.window1.agent,
|
|
305
|
-
startTime: o.window1.startTime.toISOString()
|
|
306
|
-
},
|
|
307
|
-
window2: {
|
|
308
|
-
agent: o.window2.agent,
|
|
309
|
-
startTime: o.window2.startTime.toISOString()
|
|
310
|
-
}
|
|
311
|
-
})),
|
|
312
|
-
summary: {
|
|
313
|
-
totalWindows: allWindows.length,
|
|
314
|
-
activeNow: allWindows.filter(w => !w.endTime).length,
|
|
315
|
-
conflicts: overlaps.filter(o => o.severity === 'conflict').length,
|
|
316
|
-
warnings: overlaps.filter(o => o.severity === 'warn').length
|
|
317
|
-
}
|
|
318
|
-
}, null, 2));
|
|
319
|
-
return;
|
|
320
|
-
}
|
|
321
|
-
console.log(chalk.bold('\nš·ļø ACTIVE WINDOWS ā Layer 4 Conflict Detection\n'));
|
|
322
|
-
// Show active sessions
|
|
323
|
-
const active = allWindows.filter(w => !w.endTime);
|
|
324
|
-
const recent = allWindows.filter(w => w.endTime);
|
|
325
|
-
if (active.length > 0) {
|
|
326
|
-
console.log(chalk.bold.green('š¢ Currently Active:\n'));
|
|
327
|
-
for (const w of active) {
|
|
328
|
-
console.log(` ${chalk.cyan(w.agent)} (${w.machine})`);
|
|
329
|
-
console.log(` Started: ${formatTime(w.startTime)} (${formatDuration(w.startTime, null)} ago)`);
|
|
330
|
-
console.log(` Areas: ${chalk.gray(w.areasWorked.join(', ') || 'none')}`);
|
|
331
|
-
if (options.files && w.filesModified.length > 0) {
|
|
332
|
-
console.log(` Files: ${chalk.gray(w.filesModified.slice(0, 5).join(', '))}`);
|
|
333
|
-
}
|
|
334
|
-
console.log();
|
|
335
|
-
}
|
|
336
|
-
}
|
|
337
|
-
else {
|
|
338
|
-
console.log(chalk.gray('No active sessions detected\n'));
|
|
339
|
-
}
|
|
340
|
-
// Show recent sessions
|
|
341
|
-
if (recent.length > 0) {
|
|
342
|
-
console.log(chalk.bold('š Recent Sessions:\n'));
|
|
343
|
-
for (const w of recent.slice(-10)) {
|
|
344
|
-
console.log(` ${chalk.cyan(w.agent)} (${w.machine})`);
|
|
345
|
-
console.log(` ${formatTime(w.startTime)} - ${formatTime(w.endTime)} (${formatDuration(w.startTime, w.endTime)})`);
|
|
346
|
-
console.log(` Areas: ${chalk.gray(w.areasWorked.join(', ') || 'none')}`);
|
|
347
|
-
console.log();
|
|
348
|
-
}
|
|
349
|
-
}
|
|
350
|
-
// Show overlaps
|
|
351
|
-
if (overlaps.length > 0) {
|
|
352
|
-
console.log(chalk.bold.yellow('\nā ļø Session Overlaps Detected:\n'));
|
|
353
|
-
for (const overlap of overlaps) {
|
|
354
|
-
const icon = overlap.severity === 'conflict' ? 'š“' : 'š ';
|
|
355
|
-
const label = overlap.severity === 'conflict' ? 'FILE CONFLICT' : 'AREA OVERLAP';
|
|
356
|
-
console.log(`${icon} ${chalk.bold(label)} (${overlap.overlapMinutes} min overlap)`);
|
|
357
|
-
console.log(` ${chalk.cyan(overlap.window1.agent)} ā ${chalk.cyan(overlap.window2.agent)}`);
|
|
358
|
-
if (overlap.sharedFiles.length > 0) {
|
|
359
|
-
console.log(` Shared files: ${chalk.red(overlap.sharedFiles.join(', '))}`);
|
|
360
|
-
}
|
|
361
|
-
if (overlap.sharedAreas.length > 0) {
|
|
362
|
-
console.log(` Shared areas: ${chalk.yellow(overlap.sharedAreas.join(', '))}`);
|
|
363
|
-
}
|
|
364
|
-
console.log();
|
|
365
|
-
}
|
|
366
|
-
}
|
|
367
|
-
else {
|
|
368
|
-
console.log(chalk.green('\nā
No overlapping sessions detected\n'));
|
|
369
|
-
}
|
|
370
|
-
// Summary
|
|
371
|
-
console.log(chalk.gray(`Scanned ${hours}h of activity, found ${allWindows.length} session(s)\n`));
|
|
372
|
-
});
|
|
373
|
-
//# sourceMappingURL=active-windows.js.map
|