@stackmemoryai/stackmemory 0.8.1 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (788) hide show
  1. package/LICENSE +64 -0
  2. package/README.md +15 -3
  3. package/dist/src/agents/core/agent-task-manager.js +0 -1
  4. package/dist/src/agents/verifiers/base-verifier.js +0 -1
  5. package/dist/src/agents/verifiers/formatter-verifier.js +0 -1
  6. package/dist/src/agents/verifiers/llm-judge.js +0 -1
  7. package/dist/src/cli/auto-detect.js +0 -1
  8. package/dist/src/cli/claude-sm-danger.js +0 -1
  9. package/dist/src/cli/claude-sm.js +0 -1
  10. package/dist/src/cli/codex-sm-danger.js +0 -1
  11. package/dist/src/cli/codex-sm.js +0 -1
  12. package/dist/src/cli/commands/api.js +0 -1
  13. package/dist/src/cli/commands/auto-background.js +0 -1
  14. package/dist/src/cli/commands/cleanup-processes.js +0 -1
  15. package/dist/src/cli/commands/clear.js +0 -1
  16. package/dist/src/cli/commands/config.js +0 -1
  17. package/dist/src/cli/commands/context-rehydrate.js +0 -1
  18. package/dist/src/cli/commands/context.js +0 -1
  19. package/dist/src/cli/commands/daemon.js +0 -1
  20. package/dist/src/cli/commands/dashboard.js +4 -5
  21. package/dist/src/cli/commands/db.js +0 -1
  22. package/dist/src/cli/commands/decision.js +0 -1
  23. package/dist/src/cli/commands/discovery.js +0 -1
  24. package/dist/src/cli/commands/handoff.js +0 -1
  25. package/dist/src/cli/commands/hooks.js +0 -1
  26. package/dist/src/cli/commands/linear.js +0 -1
  27. package/dist/src/cli/commands/log.js +0 -1
  28. package/dist/src/cli/commands/login.js +0 -1
  29. package/dist/src/cli/commands/migrate.js +0 -1
  30. package/dist/src/cli/commands/model.js +0 -1
  31. package/dist/src/cli/commands/onboard.js +0 -1
  32. package/dist/src/cli/commands/ping.js +0 -1
  33. package/dist/src/cli/commands/projects.js +0 -1
  34. package/dist/src/cli/commands/ralph.js +0 -1
  35. package/dist/src/cli/commands/retrieval.js +0 -1
  36. package/dist/src/cli/commands/search.js +0 -1
  37. package/dist/src/cli/commands/service.js +0 -1
  38. package/dist/src/cli/commands/session.js +0 -1
  39. package/dist/src/cli/commands/setup.js +0 -4
  40. package/dist/src/cli/commands/shell.js +0 -1
  41. package/dist/src/cli/commands/signup.js +0 -1
  42. package/dist/src/cli/commands/skills.js +4 -3
  43. package/dist/src/cli/commands/storage-tier.js +0 -1
  44. package/dist/src/cli/commands/sweep.js +0 -1
  45. package/dist/src/cli/commands/tasks.js +0 -1
  46. package/dist/src/cli/commands/worktree.js +10 -5
  47. package/dist/src/cli/index.js +8 -5
  48. package/dist/src/cli/opencode-sm.js +0 -1
  49. package/dist/src/cli/utils/viewer.js +0 -1
  50. package/dist/src/core/config/config-manager.js +0 -1
  51. package/dist/src/core/config/feature-flags.js +0 -1
  52. package/dist/src/core/config/storage-config.js +0 -1
  53. package/dist/src/core/config/types.js +0 -1
  54. package/dist/src/core/context/auto-context.js +0 -1
  55. package/dist/src/core/context/dual-stack-manager.js +0 -1
  56. package/dist/src/core/context/enhanced-rehydration.js +0 -2
  57. package/dist/src/core/context/frame-database.js +60 -6
  58. package/dist/src/core/context/frame-digest.js +0 -1
  59. package/dist/src/core/context/frame-handoff-manager.js +0 -1
  60. package/dist/src/core/context/frame-lifecycle-hooks.js +0 -1
  61. package/dist/src/core/context/frame-recovery.js +0 -1
  62. package/dist/src/core/context/frame-stack.js +0 -1
  63. package/dist/src/core/context/frame-types.js +0 -1
  64. package/dist/src/core/context/index.js +0 -1
  65. package/dist/src/core/context/permission-manager.js +0 -1
  66. package/dist/src/core/context/recursive-context-manager.js +3 -2
  67. package/dist/src/core/context/refactored-frame-manager.js +0 -1
  68. package/dist/src/core/context/shared-context-layer.js +0 -1
  69. package/dist/src/core/context/stack-merge-resolver.js +0 -1
  70. package/dist/src/core/context/validation.js +0 -1
  71. package/dist/src/core/database/batch-operations.js +0 -1
  72. package/dist/src/core/database/connection-pool.js +0 -1
  73. package/dist/src/core/database/database-adapter.js +0 -1
  74. package/dist/src/core/database/embedding-provider-factory.js +0 -1
  75. package/dist/src/core/database/embedding-provider.js +0 -1
  76. package/dist/src/core/database/migration-manager.js +0 -1
  77. package/dist/src/core/database/ollama-embedding-provider.js +0 -1
  78. package/dist/src/core/database/openai-embedding-provider.js +0 -1
  79. package/dist/src/core/database/query-cache.js +0 -1
  80. package/dist/src/core/database/query-router.js +0 -1
  81. package/dist/src/core/database/sqlite-adapter.js +18 -108
  82. package/dist/src/core/database/transformers-embedding-provider.js +0 -1
  83. package/dist/src/core/digest/enhanced-hybrid-digest.js +0 -1
  84. package/dist/src/core/digest/frame-digest-integration.js +0 -1
  85. package/dist/src/core/digest/hybrid-digest-generator.js +0 -1
  86. package/dist/src/core/digest/index.js +0 -1
  87. package/dist/src/core/digest/types.js +0 -1
  88. package/dist/src/core/errors/error-utils.js +0 -1
  89. package/dist/src/core/errors/index.js +0 -1
  90. package/dist/src/core/errors/recovery.js +0 -1
  91. package/dist/src/core/execution/parallel-executor.js +0 -1
  92. package/dist/src/core/extensions/custom-tools.js +0 -1
  93. package/dist/src/core/extensions/index.js +0 -1
  94. package/dist/src/core/extensions/loader.js +0 -1
  95. package/dist/src/core/extensions/plugin-system.js +0 -1
  96. package/dist/src/core/extensions/provider-adapter.js +0 -1
  97. package/dist/src/core/extensions/sandbox-runtime.js +0 -1
  98. package/dist/src/core/extensions/types.js +0 -1
  99. package/dist/src/core/frame/workflow-templates.js +0 -1
  100. package/dist/src/core/merge/conflict-detector.js +0 -1
  101. package/dist/src/core/merge/index.js +0 -1
  102. package/dist/src/core/merge/resolution-engine.js +0 -1
  103. package/dist/src/core/merge/stack-diff.js +0 -1
  104. package/dist/src/core/merge/types.js +0 -1
  105. package/dist/src/core/merge/unified-merge-resolver.js +0 -1
  106. package/dist/src/core/models/fallback-monitor.js +0 -1
  107. package/dist/src/core/models/model-router.js +0 -1
  108. package/dist/src/core/monitoring/error-handler.js +0 -1
  109. package/dist/src/core/monitoring/logger.js +0 -1
  110. package/dist/src/core/monitoring/metrics.js +0 -1
  111. package/dist/src/core/monitoring/progress-tracker.js +0 -1
  112. package/dist/src/core/monitoring/session-monitor.js +0 -1
  113. package/dist/src/core/performance/context-cache.js +0 -1
  114. package/dist/src/core/performance/index.js +0 -1
  115. package/dist/src/core/performance/lazy-context-loader.js +3 -8
  116. package/dist/src/core/performance/monitor.js +0 -1
  117. package/dist/src/core/performance/optimized-frame-context.js +0 -1
  118. package/dist/src/core/performance/performance-benchmark.js +0 -1
  119. package/dist/src/core/performance/performance-profiler.js +0 -1
  120. package/dist/src/core/performance/streaming-jsonl-parser.js +0 -1
  121. package/dist/src/core/persistence/postgres-adapter.js +0 -1
  122. package/dist/src/core/projects/project-isolation.js +0 -1
  123. package/dist/src/core/projects/project-manager.js +0 -1
  124. package/dist/src/core/query/query-parser.js +0 -1
  125. package/dist/src/core/query/query-templates.js +0 -1
  126. package/dist/src/core/retrieval/context-retriever.js +0 -1
  127. package/dist/src/core/retrieval/index.js +0 -1
  128. package/dist/src/core/retrieval/llm-context-retrieval.js +0 -1
  129. package/dist/src/core/retrieval/llm-provider.js +0 -1
  130. package/dist/src/core/retrieval/privacy-filter.js +0 -1
  131. package/dist/src/core/retrieval/retrieval-audit.js +0 -1
  132. package/dist/src/core/retrieval/summary-generator.js +15 -6
  133. package/dist/src/core/retrieval/types.js +0 -1
  134. package/dist/src/core/retrieval/unified-context-assembler.js +0 -1
  135. package/dist/src/core/security/index.js +0 -1
  136. package/dist/src/core/security/input-sanitizer.js +0 -1
  137. package/dist/src/core/session/clear-survival.js +0 -1
  138. package/dist/src/core/session/enhanced-handoff.js +0 -1
  139. package/dist/src/core/session/handoff-generator.js +0 -1
  140. package/dist/src/core/session/index.js +0 -1
  141. package/dist/src/core/session/session-manager.js +0 -1
  142. package/dist/src/core/skills/index.js +0 -1
  143. package/dist/src/core/skills/skill-storage.js +0 -1
  144. package/dist/src/core/skills/types.js +0 -1
  145. package/dist/src/core/storage/chromadb-adapter.js +0 -1
  146. package/dist/src/core/storage/infinite-storage.js +0 -1
  147. package/dist/src/core/storage/project-registry.js +0 -1
  148. package/dist/src/core/storage/remote-storage.js +4 -2
  149. package/dist/src/core/storage/storage-tier-manager.js +0 -1
  150. package/dist/src/core/storage/two-tier-storage.js +0 -1
  151. package/dist/src/core/trace/cli-trace-wrapper.js +0 -1
  152. package/dist/src/core/trace/db-trace-wrapper.js +0 -1
  153. package/dist/src/core/trace/debug-trace.js +0 -1
  154. package/dist/src/core/trace/index.js +0 -1
  155. package/dist/src/core/trace/linear-api-wrapper.js +0 -1
  156. package/dist/src/core/trace/trace-detector.js +0 -1
  157. package/dist/src/core/trace/trace-store.js +4 -5
  158. package/dist/src/core/trace/types.js +0 -1
  159. package/dist/src/core/types.js +0 -1
  160. package/dist/src/core/utils/async-mutex.js +0 -1
  161. package/dist/src/core/utils/compression.js +0 -1
  162. package/dist/src/core/utils/update-checker.js +0 -1
  163. package/dist/src/core/worktree/worktree-manager.js +0 -1
  164. package/dist/src/daemon/daemon-config.js +0 -1
  165. package/dist/src/daemon/services/context-service.js +0 -1
  166. package/dist/src/daemon/services/linear-service.js +0 -1
  167. package/dist/src/daemon/services/maintenance-service.js +0 -1
  168. package/dist/src/daemon/services/memory-service.js +0 -1
  169. package/dist/src/daemon/session-daemon.js +0 -1
  170. package/dist/src/daemon/unified-daemon.js +0 -1
  171. package/dist/src/features/analytics/api/analytics-api.js +0 -1
  172. package/dist/src/features/analytics/core/analytics-service.js +1 -2
  173. package/dist/src/features/analytics/index.js +0 -1
  174. package/dist/src/features/analytics/queries/metrics-queries.js +8 -9
  175. package/dist/src/features/analytics/types/metrics.js +0 -1
  176. package/dist/src/features/browser/browser-mcp.js +0 -1
  177. package/dist/src/features/sweep/index.js +0 -1
  178. package/dist/src/features/sweep/prediction-client.js +0 -1
  179. package/dist/src/features/sweep/prompt-builder.js +0 -1
  180. package/dist/src/features/sweep/pty-wrapper.js +0 -1
  181. package/dist/src/features/sweep/state-watcher.js +0 -1
  182. package/dist/src/features/sweep/status-bar.js +0 -1
  183. package/dist/src/features/sweep/sweep-server-manager.js +0 -1
  184. package/dist/src/features/sweep/tab-interceptor.js +0 -1
  185. package/dist/src/features/sweep/types.js +0 -1
  186. package/dist/src/features/tasks/linear-task-manager.js +0 -1
  187. package/dist/src/features/tasks/task-aware-context.js +0 -1
  188. package/dist/src/features/tui/simple-monitor.js +0 -1
  189. package/dist/src/features/tui/swarm-monitor.js +0 -1
  190. package/dist/src/features/web/client/stores/task-store.js +0 -1
  191. package/dist/src/features/web/server/index.js +0 -1
  192. package/dist/src/features/workers/tmux-manager.js +0 -1
  193. package/dist/src/features/workers/worker-registry.js +0 -1
  194. package/dist/src/hooks/auto-background.js +0 -1
  195. package/dist/src/hooks/config.js +0 -1
  196. package/dist/src/hooks/daemon.js +0 -1
  197. package/dist/src/hooks/diffmem-hooks.js +0 -1
  198. package/dist/src/hooks/events.js +0 -1
  199. package/dist/src/hooks/index.js +0 -1
  200. package/dist/src/hooks/linear-task-picker.js +0 -1
  201. package/dist/src/hooks/schemas.js +0 -1
  202. package/dist/src/hooks/secure-fs.js +0 -1
  203. package/dist/src/hooks/security-logger.js +0 -1
  204. package/dist/src/hooks/session-summary.js +0 -1
  205. package/dist/src/index.js +0 -1
  206. package/dist/src/integrations/anthropic/client.js +0 -1
  207. package/dist/src/integrations/claude-code/agent-bridge.js +0 -1
  208. package/dist/src/integrations/claude-code/enhanced-pre-clear-hooks.js +0 -1
  209. package/dist/src/integrations/claude-code/lifecycle-hooks.js +0 -1
  210. package/dist/src/integrations/claude-code/post-task-hooks.js +0 -1
  211. package/dist/src/integrations/claude-code/subagent-client-stub.js +0 -1
  212. package/dist/src/integrations/claude-code/subagent-client.js +0 -1
  213. package/dist/src/integrations/claude-code/task-coordinator.js +0 -1
  214. package/dist/src/integrations/diffmem/client.js +0 -1
  215. package/dist/src/integrations/diffmem/config.js +0 -1
  216. package/dist/src/integrations/diffmem/index.js +0 -1
  217. package/dist/src/integrations/diffmem/types.js +0 -1
  218. package/dist/src/integrations/linear/auth.js +0 -1
  219. package/dist/src/integrations/linear/auto-sync.js +0 -1
  220. package/dist/src/integrations/linear/client.js +0 -1
  221. package/dist/src/integrations/linear/config.js +0 -1
  222. package/dist/src/integrations/linear/migration.js +0 -1
  223. package/dist/src/integrations/linear/oauth-server.js +0 -1
  224. package/dist/src/integrations/linear/rest-client.js +0 -1
  225. package/dist/src/integrations/linear/sync-manager.js +0 -1
  226. package/dist/src/integrations/linear/sync-service.js +0 -1
  227. package/dist/src/integrations/linear/sync.js +0 -1
  228. package/dist/src/integrations/linear/types.js +0 -1
  229. package/dist/src/integrations/linear/unified-sync.js +0 -1
  230. package/dist/src/integrations/linear/webhook-handler.js +0 -1
  231. package/dist/src/integrations/linear/webhook-server.js +0 -1
  232. package/dist/src/integrations/linear/webhook.js +0 -1
  233. package/dist/src/integrations/mcp/handlers/code-execution-handlers.js +0 -1
  234. package/dist/src/integrations/mcp/handlers/context-handlers.js +43 -30
  235. package/dist/src/integrations/mcp/handlers/diffmem-handlers.js +0 -1
  236. package/dist/src/integrations/mcp/handlers/discovery-handlers.js +0 -1
  237. package/dist/src/integrations/mcp/handlers/index.js +1 -3
  238. package/dist/src/integrations/mcp/handlers/linear-handlers.js +24 -61
  239. package/dist/src/integrations/mcp/handlers/skill-handlers.js +0 -1
  240. package/dist/src/integrations/mcp/handlers/task-handlers.js +0 -1
  241. package/dist/src/integrations/mcp/handlers/trace-handlers.js +0 -1
  242. package/dist/src/integrations/mcp/index.js +0 -1
  243. package/dist/src/integrations/mcp/middleware/tool-scoring.js +3 -2
  244. package/dist/src/integrations/mcp/pending-utils.js +0 -1
  245. package/dist/src/integrations/mcp/refactored-server.js +0 -1
  246. package/dist/src/integrations/mcp/remote-server.js +0 -1
  247. package/dist/src/integrations/mcp/schemas.js +0 -1
  248. package/dist/src/integrations/mcp/server.js +20 -24
  249. package/dist/src/integrations/mcp/tool-definitions-code.js +0 -1
  250. package/dist/src/integrations/mcp/tool-definitions.js +0 -1
  251. package/dist/src/integrations/ralph/bridge/ralph-stackmemory-bridge.js +0 -1
  252. package/dist/src/integrations/ralph/context/context-budget-manager.js +0 -1
  253. package/dist/src/integrations/ralph/context/stackmemory-context-loader.js +0 -1
  254. package/dist/src/integrations/ralph/coordination/enhanced-coordination.js +0 -1
  255. package/dist/src/integrations/ralph/index.js +0 -1
  256. package/dist/src/integrations/ralph/learning/pattern-learner.js +0 -1
  257. package/dist/src/integrations/ralph/lifecycle/iteration-lifecycle.js +5 -5
  258. package/dist/src/integrations/ralph/monitoring/swarm-dashboard.js +0 -1
  259. package/dist/src/integrations/ralph/monitoring/swarm-registry.js +0 -1
  260. package/dist/src/integrations/ralph/orchestration/multi-loop-orchestrator.js +0 -1
  261. package/dist/src/integrations/ralph/patterns/compounding-engineering-pattern.js +0 -1
  262. package/dist/src/integrations/ralph/patterns/extended-coherence-sessions.js +0 -1
  263. package/dist/src/integrations/ralph/patterns/oracle-worker-pattern.js +0 -1
  264. package/dist/src/integrations/ralph/performance/performance-optimizer.js +0 -1
  265. package/dist/src/integrations/ralph/recovery/crash-recovery.js +0 -1
  266. package/dist/src/integrations/ralph/state/state-reconciler.js +25 -9
  267. package/dist/src/integrations/ralph/swarm/git-workflow-manager.js +0 -1
  268. package/dist/src/integrations/ralph/swarm/swarm-coordinator.js +0 -1
  269. package/dist/src/integrations/ralph/types.js +0 -1
  270. package/dist/src/integrations/ralph/visualization/ralph-debugger.js +0 -1
  271. package/dist/src/mcp/stackmemory-mcp-server.js +0 -1
  272. package/dist/src/middleware/exponential-rate-limiter.js +0 -1
  273. package/dist/src/models/user.model.js +0 -1
  274. package/dist/src/orchestrators/multimodal/constants.js +0 -1
  275. package/dist/src/orchestrators/multimodal/harness.js +0 -1
  276. package/dist/src/orchestrators/multimodal/providers.js +0 -1
  277. package/dist/src/orchestrators/multimodal/types.js +0 -1
  278. package/dist/src/orchestrators/multimodal/utils.js +0 -1
  279. package/dist/src/servers/production/auth-middleware.js +0 -1
  280. package/dist/src/services/config-service.js +0 -1
  281. package/dist/src/services/context-service.js +0 -1
  282. package/dist/src/skills/api-discovery.js +0 -1
  283. package/dist/src/skills/api-skill.js +0 -1
  284. package/dist/src/skills/claude-skills.js +0 -1
  285. package/dist/src/skills/dashboard-launcher.js +0 -1
  286. package/dist/src/skills/linear-task-runner.js +0 -1
  287. package/dist/src/skills/recursive-agent-orchestrator.js +0 -1
  288. package/dist/src/skills/repo-ingestion-skill.js +0 -1
  289. package/dist/src/skills/spec-generator-skill.js +0 -1
  290. package/dist/src/skills/unified-rlm-orchestrator.js +0 -1
  291. package/dist/src/types/task.js +0 -1
  292. package/dist/src/utils/env.js +0 -1
  293. package/dist/src/utils/formatting.js +0 -1
  294. package/dist/src/utils/process-cleanup.js +0 -1
  295. package/package.json +32 -7
  296. package/dist/scripts/benchmark-performance.js +0 -48
  297. package/dist/scripts/benchmark-performance.js.map +0 -7
  298. package/dist/scripts/check-redis.js +0 -42
  299. package/dist/scripts/check-redis.js.map +0 -7
  300. package/dist/scripts/initialize.js +0 -183
  301. package/dist/scripts/initialize.js.map +0 -7
  302. package/dist/scripts/list-linear-tasks.js +0 -124
  303. package/dist/scripts/list-linear-tasks.js.map +0 -7
  304. package/dist/scripts/measure-handoff-impact.js +0 -340
  305. package/dist/scripts/measure-handoff-impact.js.map +0 -7
  306. package/dist/scripts/query-chromadb.js +0 -160
  307. package/dist/scripts/query-chromadb.js.map +0 -7
  308. package/dist/scripts/show-linear-summary.js +0 -119
  309. package/dist/scripts/show-linear-summary.js.map +0 -7
  310. package/dist/scripts/simple-swarm-demo.js +0 -90
  311. package/dist/scripts/simple-swarm-demo.js.map +0 -7
  312. package/dist/scripts/status.js +0 -155
  313. package/dist/scripts/status.js.map +0 -7
  314. package/dist/scripts/test-chromadb-sync.js +0 -192
  315. package/dist/scripts/test-chromadb-sync.js.map +0 -7
  316. package/dist/scripts/test-ralph-iteration-fix.js +0 -86
  317. package/dist/scripts/test-ralph-iteration-fix.js.map +0 -7
  318. package/dist/scripts/test-ralph-iterations.js +0 -121
  319. package/dist/scripts/test-ralph-iterations.js.map +0 -7
  320. package/dist/scripts/test-redis-storage.js +0 -389
  321. package/dist/scripts/test-redis-storage.js.map +0 -7
  322. package/dist/scripts/test-simple-ralph-state-sync.js +0 -115
  323. package/dist/scripts/test-simple-ralph-state-sync.js.map +0 -7
  324. package/dist/scripts/test-swarm-fixes.js +0 -125
  325. package/dist/scripts/test-swarm-fixes.js.map +0 -7
  326. package/dist/scripts/test-swarm-tui.js +0 -23
  327. package/dist/scripts/test-swarm-tui.js.map +0 -7
  328. package/dist/scripts/test-tui-shortcuts.js +0 -52
  329. package/dist/scripts/test-tui-shortcuts.js.map +0 -7
  330. package/dist/scripts/validate-tui-shortcuts.js +0 -60
  331. package/dist/scripts/validate-tui-shortcuts.js.map +0 -7
  332. package/dist/src/agents/core/agent-task-manager.js.map +0 -7
  333. package/dist/src/agents/verifiers/base-verifier.js.map +0 -7
  334. package/dist/src/agents/verifiers/formatter-verifier.js.map +0 -7
  335. package/dist/src/agents/verifiers/llm-judge.js.map +0 -7
  336. package/dist/src/cli/auto-detect.js.map +0 -7
  337. package/dist/src/cli/claude-sm-danger.js.map +0 -7
  338. package/dist/src/cli/claude-sm.js.map +0 -7
  339. package/dist/src/cli/codex-sm-danger.js.map +0 -7
  340. package/dist/src/cli/codex-sm.js.map +0 -7
  341. package/dist/src/cli/commands/api.js.map +0 -7
  342. package/dist/src/cli/commands/auto-background.js.map +0 -7
  343. package/dist/src/cli/commands/cleanup-processes.js.map +0 -7
  344. package/dist/src/cli/commands/clear.js.map +0 -7
  345. package/dist/src/cli/commands/config.js.map +0 -7
  346. package/dist/src/cli/commands/context-rehydrate.js.map +0 -7
  347. package/dist/src/cli/commands/context.js.map +0 -7
  348. package/dist/src/cli/commands/daemon.js.map +0 -7
  349. package/dist/src/cli/commands/dashboard.js.map +0 -7
  350. package/dist/src/cli/commands/db.js.map +0 -7
  351. package/dist/src/cli/commands/decision.js.map +0 -7
  352. package/dist/src/cli/commands/discovery.js.map +0 -7
  353. package/dist/src/cli/commands/handoff.js.map +0 -7
  354. package/dist/src/cli/commands/hooks.js.map +0 -7
  355. package/dist/src/cli/commands/linear.js.map +0 -7
  356. package/dist/src/cli/commands/log.js.map +0 -7
  357. package/dist/src/cli/commands/login.js.map +0 -7
  358. package/dist/src/cli/commands/migrate.js.map +0 -7
  359. package/dist/src/cli/commands/model.js.map +0 -7
  360. package/dist/src/cli/commands/onboard.js.map +0 -7
  361. package/dist/src/cli/commands/ping.js.map +0 -7
  362. package/dist/src/cli/commands/projects.js.map +0 -7
  363. package/dist/src/cli/commands/ralph.js.map +0 -7
  364. package/dist/src/cli/commands/retrieval.js.map +0 -7
  365. package/dist/src/cli/commands/search.js.map +0 -7
  366. package/dist/src/cli/commands/service.js.map +0 -7
  367. package/dist/src/cli/commands/session.js.map +0 -7
  368. package/dist/src/cli/commands/settings.js +0 -306
  369. package/dist/src/cli/commands/settings.js.map +0 -7
  370. package/dist/src/cli/commands/setup.js.map +0 -7
  371. package/dist/src/cli/commands/shell.js.map +0 -7
  372. package/dist/src/cli/commands/signup.js.map +0 -7
  373. package/dist/src/cli/commands/skills.js.map +0 -7
  374. package/dist/src/cli/commands/sms-notify.js +0 -795
  375. package/dist/src/cli/commands/sms-notify.js.map +0 -7
  376. package/dist/src/cli/commands/storage-tier.js.map +0 -7
  377. package/dist/src/cli/commands/sweep.js.map +0 -7
  378. package/dist/src/cli/commands/tasks.js.map +0 -7
  379. package/dist/src/cli/commands/worktree.js.map +0 -7
  380. package/dist/src/cli/index.js.map +0 -7
  381. package/dist/src/cli/opencode-sm.js.map +0 -7
  382. package/dist/src/cli/utils/viewer.js.map +0 -7
  383. package/dist/src/core/config/config-manager.js.map +0 -7
  384. package/dist/src/core/config/feature-flags.js.map +0 -7
  385. package/dist/src/core/config/storage-config.js.map +0 -7
  386. package/dist/src/core/config/types.js.map +0 -7
  387. package/dist/src/core/context/auto-context.js.map +0 -7
  388. package/dist/src/core/context/dual-stack-manager.js.map +0 -7
  389. package/dist/src/core/context/enhanced-rehydration.js.map +0 -7
  390. package/dist/src/core/context/frame-database.js.map +0 -7
  391. package/dist/src/core/context/frame-digest.js.map +0 -7
  392. package/dist/src/core/context/frame-handoff-manager.js.map +0 -7
  393. package/dist/src/core/context/frame-lifecycle-hooks.js.map +0 -7
  394. package/dist/src/core/context/frame-recovery.js.map +0 -7
  395. package/dist/src/core/context/frame-stack.js.map +0 -7
  396. package/dist/src/core/context/frame-types.js.map +0 -7
  397. package/dist/src/core/context/index.js.map +0 -7
  398. package/dist/src/core/context/permission-manager.js.map +0 -7
  399. package/dist/src/core/context/recursive-context-manager.js.map +0 -7
  400. package/dist/src/core/context/refactored-frame-manager.js.map +0 -7
  401. package/dist/src/core/context/shared-context-layer.js.map +0 -7
  402. package/dist/src/core/context/stack-merge-resolver.js.map +0 -7
  403. package/dist/src/core/context/validation.js.map +0 -7
  404. package/dist/src/core/database/batch-operations.js.map +0 -7
  405. package/dist/src/core/database/connection-pool.js.map +0 -7
  406. package/dist/src/core/database/database-adapter.js.map +0 -7
  407. package/dist/src/core/database/embedding-provider-factory.js.map +0 -7
  408. package/dist/src/core/database/embedding-provider.js.map +0 -7
  409. package/dist/src/core/database/migration-manager.js.map +0 -7
  410. package/dist/src/core/database/ollama-embedding-provider.js.map +0 -7
  411. package/dist/src/core/database/openai-embedding-provider.js.map +0 -7
  412. package/dist/src/core/database/query-cache.js.map +0 -7
  413. package/dist/src/core/database/query-router.js.map +0 -7
  414. package/dist/src/core/database/sqlite-adapter.js.map +0 -7
  415. package/dist/src/core/database/transformers-embedding-provider.js.map +0 -7
  416. package/dist/src/core/digest/enhanced-hybrid-digest.js.map +0 -7
  417. package/dist/src/core/digest/frame-digest-integration.js.map +0 -7
  418. package/dist/src/core/digest/hybrid-digest-generator.js.map +0 -7
  419. package/dist/src/core/digest/index.js.map +0 -7
  420. package/dist/src/core/digest/types.js.map +0 -7
  421. package/dist/src/core/errors/error-utils.js.map +0 -7
  422. package/dist/src/core/errors/index.js.map +0 -7
  423. package/dist/src/core/errors/recovery.js.map +0 -7
  424. package/dist/src/core/execution/parallel-executor.js.map +0 -7
  425. package/dist/src/core/extensions/custom-tools.js.map +0 -7
  426. package/dist/src/core/extensions/index.js.map +0 -7
  427. package/dist/src/core/extensions/loader.js.map +0 -7
  428. package/dist/src/core/extensions/plugin-system.js.map +0 -7
  429. package/dist/src/core/extensions/provider-adapter.js.map +0 -7
  430. package/dist/src/core/extensions/sandbox-runtime.js.map +0 -7
  431. package/dist/src/core/extensions/types.js.map +0 -7
  432. package/dist/src/core/frame/workflow-templates.js.map +0 -7
  433. package/dist/src/core/merge/conflict-detector.js.map +0 -7
  434. package/dist/src/core/merge/index.js.map +0 -7
  435. package/dist/src/core/merge/resolution-engine.js.map +0 -7
  436. package/dist/src/core/merge/stack-diff.js.map +0 -7
  437. package/dist/src/core/merge/types.js.map +0 -7
  438. package/dist/src/core/merge/unified-merge-resolver.js.map +0 -7
  439. package/dist/src/core/models/fallback-monitor.js.map +0 -7
  440. package/dist/src/core/models/model-router.js.map +0 -7
  441. package/dist/src/core/monitoring/error-handler.js.map +0 -7
  442. package/dist/src/core/monitoring/logger.js.map +0 -7
  443. package/dist/src/core/monitoring/metrics.js.map +0 -7
  444. package/dist/src/core/monitoring/progress-tracker.js.map +0 -7
  445. package/dist/src/core/monitoring/session-monitor.js.map +0 -7
  446. package/dist/src/core/performance/context-cache.js.map +0 -7
  447. package/dist/src/core/performance/index.js.map +0 -7
  448. package/dist/src/core/performance/lazy-context-loader.js.map +0 -7
  449. package/dist/src/core/performance/monitor.js.map +0 -7
  450. package/dist/src/core/performance/optimized-frame-context.js.map +0 -7
  451. package/dist/src/core/performance/performance-benchmark.js.map +0 -7
  452. package/dist/src/core/performance/performance-profiler.js.map +0 -7
  453. package/dist/src/core/performance/streaming-jsonl-parser.js.map +0 -7
  454. package/dist/src/core/persistence/postgres-adapter.js.map +0 -7
  455. package/dist/src/core/projects/project-isolation.js.map +0 -7
  456. package/dist/src/core/projects/project-manager.js.map +0 -7
  457. package/dist/src/core/query/query-parser.js.map +0 -7
  458. package/dist/src/core/query/query-templates.js.map +0 -7
  459. package/dist/src/core/retrieval/context-retriever.js.map +0 -7
  460. package/dist/src/core/retrieval/index.js.map +0 -7
  461. package/dist/src/core/retrieval/llm-context-retrieval.js.map +0 -7
  462. package/dist/src/core/retrieval/llm-provider.js.map +0 -7
  463. package/dist/src/core/retrieval/privacy-filter.js.map +0 -7
  464. package/dist/src/core/retrieval/retrieval-audit.js.map +0 -7
  465. package/dist/src/core/retrieval/summary-generator.js.map +0 -7
  466. package/dist/src/core/retrieval/types.js.map +0 -7
  467. package/dist/src/core/retrieval/unified-context-assembler.js.map +0 -7
  468. package/dist/src/core/security/index.js.map +0 -7
  469. package/dist/src/core/security/input-sanitizer.js.map +0 -7
  470. package/dist/src/core/session/clear-survival.js.map +0 -7
  471. package/dist/src/core/session/enhanced-handoff.js.map +0 -7
  472. package/dist/src/core/session/handoff-generator.js.map +0 -7
  473. package/dist/src/core/session/index.js.map +0 -7
  474. package/dist/src/core/session/session-manager.js.map +0 -7
  475. package/dist/src/core/skills/index.js.map +0 -7
  476. package/dist/src/core/skills/skill-storage.js.map +0 -7
  477. package/dist/src/core/skills/types.js.map +0 -7
  478. package/dist/src/core/storage/chromadb-adapter.js.map +0 -7
  479. package/dist/src/core/storage/infinite-storage.js.map +0 -7
  480. package/dist/src/core/storage/project-registry.js.map +0 -7
  481. package/dist/src/core/storage/remote-storage.js.map +0 -7
  482. package/dist/src/core/storage/storage-tier-manager.js.map +0 -7
  483. package/dist/src/core/storage/two-tier-storage.js.map +0 -7
  484. package/dist/src/core/trace/cli-trace-wrapper.js.map +0 -7
  485. package/dist/src/core/trace/db-trace-wrapper.js.map +0 -7
  486. package/dist/src/core/trace/debug-trace.js.map +0 -7
  487. package/dist/src/core/trace/index.js.map +0 -7
  488. package/dist/src/core/trace/linear-api-wrapper.js.map +0 -7
  489. package/dist/src/core/trace/trace-detector.js.map +0 -7
  490. package/dist/src/core/trace/trace-store.js.map +0 -7
  491. package/dist/src/core/trace/types.js.map +0 -7
  492. package/dist/src/core/types.js.map +0 -7
  493. package/dist/src/core/utils/async-mutex.js.map +0 -7
  494. package/dist/src/core/utils/compression.js.map +0 -7
  495. package/dist/src/core/utils/update-checker.js.map +0 -7
  496. package/dist/src/core/worktree/worktree-manager.js.map +0 -7
  497. package/dist/src/daemon/daemon-config.js.map +0 -7
  498. package/dist/src/daemon/services/context-service.js.map +0 -7
  499. package/dist/src/daemon/services/linear-service.js.map +0 -7
  500. package/dist/src/daemon/services/maintenance-service.js.map +0 -7
  501. package/dist/src/daemon/services/memory-service.js.map +0 -7
  502. package/dist/src/daemon/session-daemon.js.map +0 -7
  503. package/dist/src/daemon/unified-daemon.js.map +0 -7
  504. package/dist/src/features/analytics/api/analytics-api.js.map +0 -7
  505. package/dist/src/features/analytics/core/analytics-service.js.map +0 -7
  506. package/dist/src/features/analytics/index.js.map +0 -7
  507. package/dist/src/features/analytics/queries/metrics-queries.js.map +0 -7
  508. package/dist/src/features/analytics/types/metrics.js.map +0 -7
  509. package/dist/src/features/browser/browser-mcp.js.map +0 -7
  510. package/dist/src/features/sweep/index.js.map +0 -7
  511. package/dist/src/features/sweep/prediction-client.js.map +0 -7
  512. package/dist/src/features/sweep/prompt-builder.js.map +0 -7
  513. package/dist/src/features/sweep/pty-wrapper.js.map +0 -7
  514. package/dist/src/features/sweep/state-watcher.js.map +0 -7
  515. package/dist/src/features/sweep/status-bar.js.map +0 -7
  516. package/dist/src/features/sweep/sweep-server-manager.js.map +0 -7
  517. package/dist/src/features/sweep/tab-interceptor.js.map +0 -7
  518. package/dist/src/features/sweep/types.js.map +0 -7
  519. package/dist/src/features/tasks/linear-task-manager.js.map +0 -7
  520. package/dist/src/features/tasks/task-aware-context.js.map +0 -7
  521. package/dist/src/features/tui/simple-monitor.js.map +0 -7
  522. package/dist/src/features/tui/swarm-monitor.js.map +0 -7
  523. package/dist/src/features/web/client/stores/task-store.js.map +0 -7
  524. package/dist/src/features/web/server/index.js.map +0 -7
  525. package/dist/src/features/workers/tmux-manager.js.map +0 -7
  526. package/dist/src/features/workers/worker-registry.js.map +0 -7
  527. package/dist/src/hooks/auto-background.js.map +0 -7
  528. package/dist/src/hooks/claude-code-whatsapp-hook.js +0 -197
  529. package/dist/src/hooks/claude-code-whatsapp-hook.js.map +0 -7
  530. package/dist/src/hooks/config.js.map +0 -7
  531. package/dist/src/hooks/daemon.js.map +0 -7
  532. package/dist/src/hooks/diffmem-hooks.js.map +0 -7
  533. package/dist/src/hooks/events.js.map +0 -7
  534. package/dist/src/hooks/index.js.map +0 -7
  535. package/dist/src/hooks/linear-task-picker.js.map +0 -7
  536. package/dist/src/hooks/schemas.js.map +0 -7
  537. package/dist/src/hooks/secure-fs.js.map +0 -7
  538. package/dist/src/hooks/security-logger.js.map +0 -7
  539. package/dist/src/hooks/session-summary.js.map +0 -7
  540. package/dist/src/hooks/sms-action-runner.js +0 -371
  541. package/dist/src/hooks/sms-action-runner.js.map +0 -7
  542. package/dist/src/hooks/sms-notify.js +0 -506
  543. package/dist/src/hooks/sms-notify.js.map +0 -7
  544. package/dist/src/hooks/sms-watcher.js +0 -93
  545. package/dist/src/hooks/sms-watcher.js.map +0 -7
  546. package/dist/src/hooks/sms-webhook.js +0 -555
  547. package/dist/src/hooks/sms-webhook.js.map +0 -7
  548. package/dist/src/hooks/whatsapp-commands.js +0 -479
  549. package/dist/src/hooks/whatsapp-commands.js.map +0 -7
  550. package/dist/src/hooks/whatsapp-scheduler.js +0 -317
  551. package/dist/src/hooks/whatsapp-scheduler.js.map +0 -7
  552. package/dist/src/hooks/whatsapp-sync.js +0 -409
  553. package/dist/src/hooks/whatsapp-sync.js.map +0 -7
  554. package/dist/src/index.js.map +0 -7
  555. package/dist/src/integrations/anthropic/client.js.map +0 -7
  556. package/dist/src/integrations/claude-code/agent-bridge.js.map +0 -7
  557. package/dist/src/integrations/claude-code/enhanced-pre-clear-hooks.js.map +0 -7
  558. package/dist/src/integrations/claude-code/lifecycle-hooks.js.map +0 -7
  559. package/dist/src/integrations/claude-code/post-task-hooks.js.map +0 -7
  560. package/dist/src/integrations/claude-code/subagent-client-stub.js.map +0 -7
  561. package/dist/src/integrations/claude-code/subagent-client.js.map +0 -7
  562. package/dist/src/integrations/claude-code/task-coordinator.js.map +0 -7
  563. package/dist/src/integrations/diffmem/client.js.map +0 -7
  564. package/dist/src/integrations/diffmem/config.js.map +0 -7
  565. package/dist/src/integrations/diffmem/index.js.map +0 -7
  566. package/dist/src/integrations/diffmem/types.js.map +0 -7
  567. package/dist/src/integrations/linear/auth.js.map +0 -7
  568. package/dist/src/integrations/linear/auto-sync.js.map +0 -7
  569. package/dist/src/integrations/linear/client.js.map +0 -7
  570. package/dist/src/integrations/linear/config.js.map +0 -7
  571. package/dist/src/integrations/linear/migration.js.map +0 -7
  572. package/dist/src/integrations/linear/oauth-server.js.map +0 -7
  573. package/dist/src/integrations/linear/rest-client.js.map +0 -7
  574. package/dist/src/integrations/linear/sync-manager.js.map +0 -7
  575. package/dist/src/integrations/linear/sync-service.js.map +0 -7
  576. package/dist/src/integrations/linear/sync.js.map +0 -7
  577. package/dist/src/integrations/linear/types.js.map +0 -7
  578. package/dist/src/integrations/linear/unified-sync.js.map +0 -7
  579. package/dist/src/integrations/linear/webhook-handler.js.map +0 -7
  580. package/dist/src/integrations/linear/webhook-server.js.map +0 -7
  581. package/dist/src/integrations/linear/webhook.js.map +0 -7
  582. package/dist/src/integrations/mcp/handlers/code-execution-handlers.js.map +0 -7
  583. package/dist/src/integrations/mcp/handlers/context-handlers.js.map +0 -7
  584. package/dist/src/integrations/mcp/handlers/diffmem-handlers.js.map +0 -7
  585. package/dist/src/integrations/mcp/handlers/discovery-handlers.js.map +0 -7
  586. package/dist/src/integrations/mcp/handlers/index.js.map +0 -7
  587. package/dist/src/integrations/mcp/handlers/linear-handlers.js.map +0 -7
  588. package/dist/src/integrations/mcp/handlers/skill-handlers.js.map +0 -7
  589. package/dist/src/integrations/mcp/handlers/task-handlers.js.map +0 -7
  590. package/dist/src/integrations/mcp/handlers/trace-handlers.js.map +0 -7
  591. package/dist/src/integrations/mcp/index.js.map +0 -7
  592. package/dist/src/integrations/mcp/middleware/tool-scoring.js.map +0 -7
  593. package/dist/src/integrations/mcp/pending-utils.js.map +0 -7
  594. package/dist/src/integrations/mcp/refactored-server.js.map +0 -7
  595. package/dist/src/integrations/mcp/remote-server.js.map +0 -7
  596. package/dist/src/integrations/mcp/schemas.js.map +0 -7
  597. package/dist/src/integrations/mcp/server.js.map +0 -7
  598. package/dist/src/integrations/mcp/tool-definitions-code.js.map +0 -7
  599. package/dist/src/integrations/mcp/tool-definitions.js.map +0 -7
  600. package/dist/src/integrations/ralph/bridge/ralph-stackmemory-bridge.js.map +0 -7
  601. package/dist/src/integrations/ralph/context/context-budget-manager.js.map +0 -7
  602. package/dist/src/integrations/ralph/context/stackmemory-context-loader.js.map +0 -7
  603. package/dist/src/integrations/ralph/coordination/enhanced-coordination.js.map +0 -7
  604. package/dist/src/integrations/ralph/index.js.map +0 -7
  605. package/dist/src/integrations/ralph/learning/pattern-learner.js.map +0 -7
  606. package/dist/src/integrations/ralph/lifecycle/iteration-lifecycle.js.map +0 -7
  607. package/dist/src/integrations/ralph/monitoring/swarm-dashboard.js.map +0 -7
  608. package/dist/src/integrations/ralph/monitoring/swarm-registry.js.map +0 -7
  609. package/dist/src/integrations/ralph/orchestration/multi-loop-orchestrator.js.map +0 -7
  610. package/dist/src/integrations/ralph/patterns/compounding-engineering-pattern.js.map +0 -7
  611. package/dist/src/integrations/ralph/patterns/extended-coherence-sessions.js.map +0 -7
  612. package/dist/src/integrations/ralph/patterns/oracle-worker-pattern.js.map +0 -7
  613. package/dist/src/integrations/ralph/performance/performance-optimizer.js.map +0 -7
  614. package/dist/src/integrations/ralph/recovery/crash-recovery.js.map +0 -7
  615. package/dist/src/integrations/ralph/state/state-reconciler.js.map +0 -7
  616. package/dist/src/integrations/ralph/swarm/git-workflow-manager.js.map +0 -7
  617. package/dist/src/integrations/ralph/swarm/swarm-coordinator.js.map +0 -7
  618. package/dist/src/integrations/ralph/types.js.map +0 -7
  619. package/dist/src/integrations/ralph/visualization/ralph-debugger.js.map +0 -7
  620. package/dist/src/mcp/stackmemory-mcp-server.js.map +0 -7
  621. package/dist/src/middleware/exponential-rate-limiter.js.map +0 -7
  622. package/dist/src/models/user.model.js.map +0 -7
  623. package/dist/src/orchestrators/multimodal/constants.js.map +0 -7
  624. package/dist/src/orchestrators/multimodal/harness.js.map +0 -7
  625. package/dist/src/orchestrators/multimodal/providers.js.map +0 -7
  626. package/dist/src/orchestrators/multimodal/types.js.map +0 -7
  627. package/dist/src/orchestrators/multimodal/utils.js.map +0 -7
  628. package/dist/src/servers/production/auth-middleware.js.map +0 -7
  629. package/dist/src/services/config-service.js.map +0 -7
  630. package/dist/src/services/context-service.js.map +0 -7
  631. package/dist/src/skills/api-discovery.js.map +0 -7
  632. package/dist/src/skills/api-skill.js.map +0 -7
  633. package/dist/src/skills/claude-skills.js.map +0 -7
  634. package/dist/src/skills/dashboard-launcher.js.map +0 -7
  635. package/dist/src/skills/linear-task-runner.js.map +0 -7
  636. package/dist/src/skills/recursive-agent-orchestrator.js.map +0 -7
  637. package/dist/src/skills/repo-ingestion-skill.js.map +0 -7
  638. package/dist/src/skills/spec-generator-skill.js.map +0 -7
  639. package/dist/src/skills/unified-rlm-orchestrator.js.map +0 -7
  640. package/dist/src/types/task.js.map +0 -7
  641. package/dist/src/utils/env.js.map +0 -7
  642. package/dist/src/utils/formatting.js.map +0 -7
  643. package/dist/src/utils/process-cleanup.js.map +0 -7
  644. package/scripts/README-TESTING.md +0 -186
  645. package/scripts/analyze-cli-security.js +0 -288
  646. package/scripts/archive/add-phase-tasks-to-linear.js +0 -163
  647. package/scripts/archive/analyze-linear-duplicates.js +0 -214
  648. package/scripts/archive/analyze-remaining-duplicates.js +0 -230
  649. package/scripts/archive/analyze-sta-duplicates.js +0 -292
  650. package/scripts/archive/analyze-sta-graphql.js +0 -399
  651. package/scripts/archive/cancel-duplicate-tasks.ts +0 -246
  652. package/scripts/archive/check-all-duplicates.ts +0 -419
  653. package/scripts/archive/clean-duplicate-tasks.js +0 -114
  654. package/scripts/archive/cleanup-duplicate-tasks.ts +0 -286
  655. package/scripts/archive/create-phase-tasks.js +0 -387
  656. package/scripts/archive/delete-linear-duplicates.js +0 -182
  657. package/scripts/archive/delete-remaining-duplicates.js +0 -158
  658. package/scripts/archive/delete-sta-duplicates.js +0 -201
  659. package/scripts/archive/delete-sta-oauth.js +0 -201
  660. package/scripts/archive/export-sta-tasks.js +0 -62
  661. package/scripts/archive/install-auto-sync.js +0 -266
  662. package/scripts/archive/install-chromadb-hooks.sh +0 -133
  663. package/scripts/archive/install-enhanced-clear-hooks.sh +0 -431
  664. package/scripts/archive/install-post-task-hooks.sh +0 -289
  665. package/scripts/archive/install-stackmemory-hooks.sh +0 -420
  666. package/scripts/archive/merge-linear-duplicates-safe.ts +0 -362
  667. package/scripts/archive/merge-linear-duplicates.ts +0 -182
  668. package/scripts/archive/remove-sta-tasks.js +0 -70
  669. package/scripts/archive/setup-background-sync.sh +0 -168
  670. package/scripts/archive/setup-claude-auto-triggers.sh +0 -181
  671. package/scripts/archive/setup-claude-autostart.sh +0 -305
  672. package/scripts/archive/setup-git-hooks.sh +0 -25
  673. package/scripts/archive/setup-linear-oauth.sh +0 -46
  674. package/scripts/archive/setup-mcp.sh +0 -113
  675. package/scripts/archive/setup-railway-deployment.sh +0 -81
  676. package/scripts/auto-handoff.sh +0 -262
  677. package/scripts/background-sync-manager.js +0 -478
  678. package/scripts/benchmark-performance.ts +0 -57
  679. package/scripts/check-redis.ts +0 -48
  680. package/scripts/chromadb-auto-loader.sh +0 -128
  681. package/scripts/chromadb-context-loader.js +0 -479
  682. package/scripts/claude-chromadb-hook.js +0 -460
  683. package/scripts/claude-linear-skill.js +0 -455
  684. package/scripts/claude-pre-commit.sh +0 -302
  685. package/scripts/claude-sm-autostart.js +0 -579
  686. package/scripts/claude-with-chromadb.sh +0 -69
  687. package/scripts/clean-linear-backlog.js +0 -273
  688. package/scripts/cleanup-old-sessions.sh +0 -57
  689. package/scripts/create-cleanup-issues.js +0 -302
  690. package/scripts/create-sandbox.sh +0 -269
  691. package/scripts/debug-linear-update.js +0 -174
  692. package/scripts/delete-linear-tasks.js +0 -167
  693. package/scripts/demos/browser-test.ts +0 -39
  694. package/scripts/demos/ralph-integration-demo.ts +0 -245
  695. package/scripts/demos/trace-demo.ts +0 -200
  696. package/scripts/demos/trace-detector.demo.ts +0 -171
  697. package/scripts/demos/trace-test.ts +0 -79
  698. package/scripts/deploy-ralph-swarm.sh +0 -365
  699. package/scripts/deploy.sh +0 -89
  700. package/scripts/deployment/test-deployment.js +0 -194
  701. package/scripts/detect-and-rehydrate.js +0 -162
  702. package/scripts/detect-and-rehydrate.mjs +0 -165
  703. package/scripts/development/create-demo-tasks.js +0 -143
  704. package/scripts/development/debug-frame-test.js +0 -16
  705. package/scripts/development/demo-auto-sync.js +0 -128
  706. package/scripts/development/fix-all-imports.js +0 -213
  707. package/scripts/development/fix-imports.js +0 -229
  708. package/scripts/development/fix-lint-loop.cjs +0 -103
  709. package/scripts/development/fix-project-id.ts +0 -161
  710. package/scripts/development/fix-strict-mode-issues.ts +0 -291
  711. package/scripts/development/reorganize-structure.sh +0 -228
  712. package/scripts/development/test-persistence-direct.js +0 -148
  713. package/scripts/development/test-persistence.js +0 -114
  714. package/scripts/development/test-tasks.js +0 -93
  715. package/scripts/development/update-imports.js +0 -212
  716. package/scripts/fetch-linear-status.js +0 -125
  717. package/scripts/initialize.ts +0 -220
  718. package/scripts/linear-auto-sync.js +0 -262
  719. package/scripts/linear-auto-sync.sh +0 -161
  720. package/scripts/linear-sync-daemon.js +0 -150
  721. package/scripts/linear-task-review.js +0 -237
  722. package/scripts/list-linear-tasks.ts +0 -178
  723. package/scripts/mcp-proxy.js +0 -66
  724. package/scripts/measure-handoff-impact.mjs +0 -395
  725. package/scripts/measure-handoff-impact.ts +0 -450
  726. package/scripts/publish-local.js +0 -74
  727. package/scripts/query-chromadb.ts +0 -201
  728. package/scripts/ralph-integration-test.js +0 -274
  729. package/scripts/reconcile-local-tasks.js +0 -170
  730. package/scripts/recreate-frames-db.js +0 -89
  731. package/scripts/show-linear-summary.ts +0 -172
  732. package/scripts/simple-swarm-demo.ts +0 -114
  733. package/scripts/stackmemory-auto-handoff.sh +0 -231
  734. package/scripts/start-linear-sync-daemon.sh +0 -141
  735. package/scripts/start-temporal-paradox.sh +0 -214
  736. package/scripts/status.ts +0 -224
  737. package/scripts/stop-notify-webhook.sh +0 -19
  738. package/scripts/swarm-monitor.js +0 -509
  739. package/scripts/sync-and-clean-tasks.js +0 -258
  740. package/scripts/sync-linear-graphql.js +0 -303
  741. package/scripts/sync-linear-tasks.js +0 -186
  742. package/scripts/test-auto-triggers.sh +0 -57
  743. package/scripts/test-browser-mcp.js +0 -74
  744. package/scripts/test-chromadb-full.js +0 -115
  745. package/scripts/test-chromadb-hooks.sh +0 -28
  746. package/scripts/test-chromadb-sync.ts +0 -245
  747. package/scripts/test-claude-config.sh +0 -123
  748. package/scripts/test-cli-security.js +0 -293
  749. package/scripts/test-code-execution.js +0 -143
  750. package/scripts/test-hooks-persistence.sh +0 -220
  751. package/scripts/test-installation-scenarios.sh +0 -359
  752. package/scripts/test-installation.sh +0 -224
  753. package/scripts/test-mcp.js +0 -163
  754. package/scripts/test-parallel-swarms.js +0 -443
  755. package/scripts/test-pre-publish-quick.sh +0 -69
  756. package/scripts/test-quality-gates.sh +0 -263
  757. package/scripts/test-ralph-iteration-fix.ts +0 -118
  758. package/scripts/test-ralph-iterations.ts +0 -164
  759. package/scripts/test-redis-storage.ts +0 -490
  760. package/scripts/test-rlm-basic.sh +0 -122
  761. package/scripts/test-rlm-comprehensive.sh +0 -260
  762. package/scripts/test-rlm-e2e.sh +0 -268
  763. package/scripts/test-rlm-simple.js +0 -90
  764. package/scripts/test-rlm.js +0 -110
  765. package/scripts/test-session-handoff.sh +0 -165
  766. package/scripts/test-setup-e2e.sh +0 -154
  767. package/scripts/test-shell-integration.sh +0 -275
  768. package/scripts/test-simple-ralph-state-sync.ts +0 -178
  769. package/scripts/test-swarm-fixes.ts +0 -161
  770. package/scripts/test-swarm-git-workflow.js +0 -338
  771. package/scripts/test-swarm-tui.ts +0 -34
  772. package/scripts/test-tui-shortcuts.ts +0 -66
  773. package/scripts/testing/ab-test-runner.ts +0 -510
  774. package/scripts/testing/collect-metrics.ts +0 -457
  775. package/scripts/testing/quick-effectiveness-demo.js +0 -187
  776. package/scripts/testing/ralph-cli-test.js +0 -88
  777. package/scripts/testing/ralph-integration-validation.js +0 -727
  778. package/scripts/testing/ralph-swarm-test-scenarios.js +0 -613
  779. package/scripts/testing/real-performance-test.js +0 -422
  780. package/scripts/testing/results/real-performance-results.json +0 -90
  781. package/scripts/testing/run-effectiveness-tests.sh +0 -176
  782. package/scripts/testing/simple-effectiveness-test.js +0 -310
  783. package/scripts/testing/test-tier-migration.js +0 -100
  784. package/scripts/update-linear-status.js +0 -268
  785. package/scripts/update-linear-tasks-fixed.js +0 -284
  786. package/scripts/validate-claude-config.sh +0 -155
  787. package/scripts/validate-swarm-implementation.js +0 -467
  788. package/scripts/validate-tui-shortcuts.ts +0 -83
@@ -1,795 +0,0 @@
1
- import { fileURLToPath as __fileURLToPath } from 'url';
2
- import { dirname as __pathDirname } from 'path';
3
- const __filename = __fileURLToPath(import.meta.url);
4
- const __dirname = __pathDirname(__filename);
5
- import { Command } from "commander";
6
- import chalk from "chalk";
7
- import { execSync } from "child_process";
8
- import { join } from "path";
9
- import { existsSync, readFileSync, unlinkSync } from "fs";
10
- import {
11
- loadSMSConfig,
12
- saveSMSConfig,
13
- sendNotification,
14
- sendSMSNotification,
15
- notifyReviewReady,
16
- notifyWithYesNo,
17
- notifyTaskComplete,
18
- cleanupExpiredPrompts
19
- } from "../../hooks/sms-notify.js";
20
- import {
21
- loadActionQueue,
22
- processAllPendingActions,
23
- cleanupOldActions,
24
- startActionWatcher
25
- } from "../../hooks/sms-action-runner.js";
26
- import {
27
- syncContext,
28
- syncFrame,
29
- enableAutoSync,
30
- disableAutoSync,
31
- isAutoSyncEnabled,
32
- loadSyncOptions
33
- } from "../../hooks/whatsapp-sync.js";
34
- import {
35
- loadCommandsConfig,
36
- enableCommands,
37
- disableCommands,
38
- getAvailableCommands
39
- } from "../../hooks/whatsapp-commands.js";
40
- import {
41
- listSchedules,
42
- cancelSchedule,
43
- scheduleDailyDigest,
44
- scheduleHourlyDigest,
45
- scheduleIntervalDigest,
46
- startScheduler,
47
- stopScheduler,
48
- isSchedulerRunning,
49
- runScheduledDigest
50
- } from "../../hooks/whatsapp-scheduler.js";
51
- function createSMSNotifyCommand() {
52
- const cmd = new Command("notify").description(
53
- "SMS/WhatsApp notifications with context sync and scheduled digests"
54
- ).addHelpText(
55
- "after",
56
- `
57
- Setup:
58
- 1. Create Twilio account at https://twilio.com
59
- 2. Set environment variables:
60
- export TWILIO_ACCOUNT_SID=your_sid
61
- export TWILIO_AUTH_TOKEN=your_token
62
- export TWILIO_WHATSAPP_FROM=+1234567890
63
- export TWILIO_WHATSAPP_TO=+1234567890
64
- 3. Enable: stackmemory notify enable
65
-
66
- Basic Commands:
67
- stackmemory notify status Check configuration
68
- stackmemory notify enable Enable notifications
69
- stackmemory notify channel whatsapp Switch to WhatsApp (default)
70
- stackmemory notify channel sms Switch to SMS
71
- stackmemory notify test Send test message
72
- stackmemory notify send "message" Send custom message
73
- stackmemory notify review "PR #123" Send review notification
74
- stackmemory notify ask "Deploy?" Send yes/no prompt
75
-
76
- Context Sync:
77
- Pushes development context (active frames, decisions, files) to WhatsApp.
78
- stackmemory notify sync Push current context now
79
- stackmemory notify sync --frame <id> Sync specific frame
80
- stackmemory notify sync --auto Enable auto-sync on frame close
81
- stackmemory notify sync --no-auto Disable auto-sync
82
- stackmemory notify sync-status Show sync configuration
83
-
84
- Scheduled Digests:
85
- Automatically sends context summaries at configured intervals.
86
- stackmemory notify schedule list List all schedules
87
- stackmemory notify schedule daily 09:00 Daily digest at 9 AM
88
- stackmemory notify schedule hourly Every hour
89
- stackmemory notify schedule interval 30 Every 30 minutes
90
- stackmemory notify schedule cancel <id> Remove a schedule
91
- stackmemory notify schedule run <id> Run schedule now
92
- stackmemory notify schedule start Start scheduler daemon
93
- stackmemory notify schedule stop Stop scheduler daemon
94
-
95
- Inbound Commands:
96
- Enable command processing to respond to WhatsApp messages.
97
- stackmemory notify commands List available commands
98
- stackmemory notify commands --enable Enable command processing
99
- stackmemory notify commands --disable Disable command processing
100
-
101
- Supported WhatsApp commands:
102
- status - Get current session status
103
- frames - List active frames
104
- tasks - Show pending tasks
105
- digest - Request full context digest
106
- pause - Pause notifications
107
- resume - Resume notifications
108
- `
109
- );
110
- cmd.command("status").description("Show notification configuration status").action(() => {
111
- const config = loadSMSConfig();
112
- console.log(chalk.blue("Notification Status:"));
113
- console.log();
114
- const hasCreds = config.accountSid && config.authToken;
115
- const channel = config.channel || "whatsapp";
116
- const hasWhatsApp = config.whatsappFromNumber || config.fromNumber || config.whatsappToNumber || config.toNumber;
117
- const hasSMS = config.smsFromNumber || config.fromNumber || config.smsToNumber || config.toNumber;
118
- const hasNumbers = channel === "whatsapp" ? hasWhatsApp : hasSMS;
119
- console.log(
120
- ` ${chalk.gray("Enabled:")} ${config.enabled ? chalk.green("yes") : chalk.red("no")}`
121
- );
122
- console.log(
123
- ` ${chalk.gray("Channel:")} ${channel === "whatsapp" ? chalk.cyan("WhatsApp") : chalk.blue("SMS")}`
124
- );
125
- console.log(
126
- ` ${chalk.gray("Configured:")} ${hasCreds && hasNumbers ? chalk.green("yes") : chalk.yellow("no (set env vars)")}`
127
- );
128
- console.log();
129
- console.log(chalk.blue("Numbers:"));
130
- if (channel === "whatsapp") {
131
- const from = config.whatsappFromNumber || config.fromNumber;
132
- const to = config.whatsappToNumber || config.toNumber;
133
- if (from) {
134
- console.log(` ${chalk.gray("WhatsApp From:")} ${maskPhone(from)}`);
135
- }
136
- if (to) {
137
- console.log(` ${chalk.gray("WhatsApp To:")} ${maskPhone(to)}`);
138
- }
139
- } else {
140
- const from = config.smsFromNumber || config.fromNumber;
141
- const to = config.smsToNumber || config.toNumber;
142
- if (from) {
143
- console.log(` ${chalk.gray("SMS From:")} ${maskPhone(from)}`);
144
- }
145
- if (to) {
146
- console.log(` ${chalk.gray("SMS To:")} ${maskPhone(to)}`);
147
- }
148
- }
149
- console.log();
150
- console.log(chalk.blue("Notify On:"));
151
- console.log(
152
- ` ${chalk.gray("Task Complete:")} ${config.notifyOn.taskComplete ? "yes" : "no"}`
153
- );
154
- console.log(
155
- ` ${chalk.gray("Review Ready:")} ${config.notifyOn.reviewReady ? "yes" : "no"}`
156
- );
157
- console.log(
158
- ` ${chalk.gray("Errors:")} ${config.notifyOn.error ? "yes" : "no"}`
159
- );
160
- if (config.quietHours?.enabled) {
161
- console.log();
162
- console.log(
163
- chalk.blue(
164
- `Quiet Hours: ${config.quietHours.start} - ${config.quietHours.end}`
165
- )
166
- );
167
- }
168
- console.log();
169
- console.log(
170
- ` ${chalk.gray("Pending Prompts:")} ${config.pendingPrompts.length}`
171
- );
172
- console.log(
173
- ` ${chalk.gray("Response Timeout:")} ${config.responseTimeout}s`
174
- );
175
- if (!hasCreds || !hasNumbers) {
176
- console.log();
177
- console.log(
178
- chalk.yellow("To configure, set these environment variables:")
179
- );
180
- console.log(chalk.gray(" export TWILIO_ACCOUNT_SID=your_sid"));
181
- console.log(chalk.gray(" export TWILIO_AUTH_TOKEN=your_token"));
182
- console.log();
183
- console.log(chalk.gray(" For WhatsApp (recommended):"));
184
- console.log(chalk.gray(" export TWILIO_WHATSAPP_FROM=+1234567890"));
185
- console.log(chalk.gray(" export TWILIO_WHATSAPP_TO=+1234567890"));
186
- console.log();
187
- console.log(chalk.gray(" For SMS:"));
188
- console.log(chalk.gray(" export TWILIO_SMS_FROM=+1234567890"));
189
- console.log(chalk.gray(" export TWILIO_SMS_TO=+1234567890"));
190
- }
191
- });
192
- cmd.command("enable").description("Enable SMS notifications").action(() => {
193
- const config = loadSMSConfig();
194
- config.enabled = true;
195
- saveSMSConfig(config);
196
- console.log(chalk.green("SMS notifications enabled"));
197
- const hasCreds = config.accountSid && config.authToken && config.fromNumber && config.toNumber;
198
- if (!hasCreds) {
199
- console.log(
200
- chalk.yellow(
201
- "Note: Set Twilio environment variables to send messages"
202
- )
203
- );
204
- }
205
- });
206
- cmd.command("disable").description("Disable SMS notifications").action(() => {
207
- const config = loadSMSConfig();
208
- config.enabled = false;
209
- saveSMSConfig(config);
210
- console.log(chalk.yellow("SMS notifications disabled"));
211
- });
212
- cmd.command("channel <type>").description("Set notification channel (whatsapp|sms)").action((type) => {
213
- const validChannels = ["whatsapp", "sms"];
214
- const channel = type.toLowerCase();
215
- if (!validChannels.includes(channel)) {
216
- console.log(
217
- chalk.red(`Invalid channel. Use: ${validChannels.join(", ")}`)
218
- );
219
- return;
220
- }
221
- const config = loadSMSConfig();
222
- config.channel = channel;
223
- saveSMSConfig(config);
224
- const label = channel === "whatsapp" ? "WhatsApp" : "SMS";
225
- console.log(chalk.green(`Notification channel set to ${label}`));
226
- if (channel === "whatsapp") {
227
- const hasNumbers = config.whatsappFromNumber || config.fromNumber;
228
- if (!hasNumbers) {
229
- console.log(
230
- chalk.yellow("Set TWILIO_WHATSAPP_FROM and TWILIO_WHATSAPP_TO")
231
- );
232
- }
233
- } else {
234
- const hasNumbers = config.smsFromNumber || config.fromNumber;
235
- if (!hasNumbers) {
236
- console.log(chalk.yellow("Set TWILIO_SMS_FROM and TWILIO_SMS_TO"));
237
- }
238
- }
239
- });
240
- cmd.command("test").description("Send a test notification").option("--sms", "Force SMS channel").option("--whatsapp", "Force WhatsApp channel").action(async (options) => {
241
- const config = loadSMSConfig();
242
- const channelOverride = options.sms ? "sms" : options.whatsapp ? "whatsapp" : void 0;
243
- const channelLabel = channelOverride || config.channel === "whatsapp" ? "WhatsApp" : "SMS";
244
- console.log(
245
- chalk.blue(`Sending test notification via ${channelLabel}...`)
246
- );
247
- const result = await sendNotification(
248
- {
249
- type: "custom",
250
- title: "StackMemory Test",
251
- message: "This is a test notification from StackMemory."
252
- },
253
- channelOverride
254
- );
255
- if (result.success) {
256
- const usedChannel = result.channel === "whatsapp" ? "WhatsApp" : "SMS";
257
- console.log(chalk.green(`Test message sent via ${usedChannel}!`));
258
- } else {
259
- console.log(chalk.red(`Failed: ${result.error}`));
260
- }
261
- });
262
- cmd.command("send <message>").description("Send a custom notification").option("-t, --title <title>", "Message title", "StackMemory Alert").action(async (message, options) => {
263
- const result = await sendSMSNotification({
264
- type: "custom",
265
- title: options.title,
266
- message
267
- });
268
- if (result.success) {
269
- console.log(chalk.green("Message sent!"));
270
- } else {
271
- console.log(chalk.red(`Failed: ${result.error}`));
272
- }
273
- });
274
- cmd.command("review <title>").description("Send review-ready notification with options").option("-m, --message <msg>", "Description", "Ready for your review").option(
275
- "-o, --options <opts>",
276
- "Comma-separated options",
277
- "Approve,Request Changes,Skip"
278
- ).action(
279
- async (title, options) => {
280
- const opts = options.options.split(",").map((o) => ({
281
- label: o.trim()
282
- }));
283
- console.log(chalk.blue("Sending review notification..."));
284
- const result = await notifyReviewReady(title, options.message, opts);
285
- if (result.success) {
286
- console.log(chalk.green("Review notification sent!"));
287
- if (result.promptId) {
288
- console.log(chalk.gray(`Prompt ID: ${result.promptId}`));
289
- }
290
- } else {
291
- console.log(chalk.red(`Failed: ${result.error}`));
292
- }
293
- }
294
- );
295
- cmd.command("ask <question>").description("Send a yes/no prompt").option("-t, --title <title>", "Message title", "StackMemory").action(async (question, options) => {
296
- console.log(chalk.blue("Sending yes/no prompt..."));
297
- const result = await notifyWithYesNo(options.title, question);
298
- if (result.success) {
299
- console.log(chalk.green("Prompt sent!"));
300
- if (result.promptId) {
301
- console.log(chalk.gray(`Prompt ID: ${result.promptId}`));
302
- }
303
- } else {
304
- console.log(chalk.red(`Failed: ${result.error}`));
305
- }
306
- });
307
- cmd.command("complete <task>").description("Send task completion notification").option("-s, --summary <text>", "Task summary", "").action(async (task, options) => {
308
- const result = await notifyTaskComplete(
309
- task,
310
- options.summary || `Task "${task}" has been completed.`
311
- );
312
- if (result.success) {
313
- console.log(chalk.green("Completion notification sent!"));
314
- } else {
315
- console.log(chalk.red(`Failed: ${result.error}`));
316
- }
317
- });
318
- cmd.command("quiet").description("Configure quiet hours").option("--enable", "Enable quiet hours").option("--disable", "Disable quiet hours").option("--start <time>", "Start time (HH:MM)", "22:00").option("--end <time>", "End time (HH:MM)", "08:00").action(
319
- (options) => {
320
- const config = loadSMSConfig();
321
- if (!config.quietHours) {
322
- config.quietHours = { enabled: false, start: "22:00", end: "08:00" };
323
- }
324
- if (options.enable) {
325
- config.quietHours.enabled = true;
326
- } else if (options.disable) {
327
- config.quietHours.enabled = false;
328
- }
329
- if (options.start) {
330
- config.quietHours.start = options.start;
331
- }
332
- if (options.end) {
333
- config.quietHours.end = options.end;
334
- }
335
- saveSMSConfig(config);
336
- if (config.quietHours.enabled) {
337
- console.log(
338
- chalk.green(
339
- `Quiet hours enabled: ${config.quietHours.start} - ${config.quietHours.end}`
340
- )
341
- );
342
- } else {
343
- console.log(chalk.yellow("Quiet hours disabled"));
344
- }
345
- }
346
- );
347
- cmd.command("toggle <type>").description(
348
- "Toggle notification type (taskComplete|reviewReady|error|custom)"
349
- ).action((type) => {
350
- const config = loadSMSConfig();
351
- const validTypes = ["taskComplete", "reviewReady", "error", "custom"];
352
- if (!validTypes.includes(type)) {
353
- console.log(chalk.red(`Invalid type. Use: ${validTypes.join(", ")}`));
354
- return;
355
- }
356
- const key = type;
357
- config.notifyOn[key] = !config.notifyOn[key];
358
- saveSMSConfig(config);
359
- console.log(
360
- chalk.green(
361
- `${type} notifications ${config.notifyOn[key] ? "enabled" : "disabled"}`
362
- )
363
- );
364
- });
365
- cmd.command("check").description(
366
- "Check for new SMS/WhatsApp responses (use in Claude sessions)"
367
- ).action(() => {
368
- const responsePath = join(
369
- process.env["HOME"] || "~",
370
- ".stackmemory",
371
- "sms-latest-response.json"
372
- );
373
- try {
374
- if (existsSync(responsePath)) {
375
- const data = JSON.parse(readFileSync(responsePath, "utf8"));
376
- const age = Date.now() - new Date(data.timestamp).getTime();
377
- if (age < 5 * 60 * 1e3) {
378
- console.log(chalk.green.bold("\n*** NEW SMS RESPONSE ***"));
379
- console.log(` Response: "${data.response}"`);
380
- console.log(` Prompt ID: ${data.promptId}`);
381
- console.log(` Received: ${Math.round(age / 1e3)}s ago
382
- `);
383
- unlinkSync(responsePath);
384
- return;
385
- }
386
- }
387
- } catch {
388
- }
389
- console.log(chalk.gray("No new responses"));
390
- });
391
- cmd.command("pending").description("List pending prompts awaiting response").action(() => {
392
- const config = loadSMSConfig();
393
- if (config.pendingPrompts.length === 0) {
394
- console.log(chalk.gray("No pending prompts"));
395
- return;
396
- }
397
- console.log(chalk.blue("Pending Prompts:"));
398
- config.pendingPrompts.forEach((p) => {
399
- const expires = new Date(p.expiresAt);
400
- const remaining = Math.round((expires.getTime() - Date.now()) / 1e3);
401
- console.log();
402
- console.log(` ${chalk.gray("ID:")} ${p.id}`);
403
- console.log(` ${chalk.gray("Type:")} ${p.type}`);
404
- console.log(
405
- ` ${chalk.gray("Message:")} ${p.message.substring(0, 50)}...`
406
- );
407
- console.log(
408
- ` ${chalk.gray("Expires:")} ${remaining > 0 ? `${remaining}s` : chalk.red("expired")}`
409
- );
410
- });
411
- });
412
- cmd.command("cleanup").description("Remove expired pending prompts").action(() => {
413
- const removed = cleanupExpiredPrompts();
414
- console.log(chalk.green(`Removed ${removed} expired prompt(s)`));
415
- });
416
- cmd.command("timeout <seconds>").description("Set response timeout for prompts").action((seconds) => {
417
- const config = loadSMSConfig();
418
- const timeout = parseInt(seconds, 10);
419
- if (isNaN(timeout) || timeout < 30) {
420
- console.log(chalk.red("Timeout must be at least 30 seconds"));
421
- return;
422
- }
423
- config.responseTimeout = timeout;
424
- saveSMSConfig(config);
425
- console.log(chalk.green(`Response timeout set to ${timeout} seconds`));
426
- });
427
- cmd.command("actions").description("List queued actions from SMS responses").action(() => {
428
- const queue = loadActionQueue();
429
- if (queue.actions.length === 0) {
430
- console.log(chalk.gray("No actions in queue"));
431
- return;
432
- }
433
- console.log(chalk.blue("Action Queue:"));
434
- queue.actions.forEach((a) => {
435
- const statusColor = a.status === "completed" ? chalk.green : a.status === "failed" ? chalk.red : a.status === "running" ? chalk.yellow : chalk.gray;
436
- console.log();
437
- console.log(` ${chalk.gray("ID:")} ${a.id}`);
438
- console.log(` ${chalk.gray("Status:")} ${statusColor(a.status)}`);
439
- console.log(
440
- ` ${chalk.gray("Action:")} ${a.action.substring(0, 60)}...`
441
- );
442
- console.log(` ${chalk.gray("Response:")} ${a.response}`);
443
- if (a.error) {
444
- console.log(` ${chalk.gray("Error:")} ${chalk.red(a.error)}`);
445
- }
446
- });
447
- });
448
- cmd.command("run-actions").description("Execute all pending actions from SMS responses").action(() => {
449
- console.log(chalk.blue("Processing pending actions..."));
450
- const result = processAllPendingActions();
451
- console.log(
452
- chalk.green(
453
- `Processed ${result.processed} action(s): ${result.succeeded} succeeded, ${result.failed} failed`
454
- )
455
- );
456
- });
457
- cmd.command("watch").description("Watch for and execute SMS response actions").option("-i, --interval <ms>", "Check interval in milliseconds", "5000").action((options) => {
458
- const interval = parseInt(options.interval, 10);
459
- console.log(chalk.blue(`Watching for actions (interval: ${interval}ms)`));
460
- console.log(chalk.gray("Press Ctrl+C to stop"));
461
- startActionWatcher(interval);
462
- });
463
- cmd.command("cleanup-actions").description("Remove old completed actions").action(() => {
464
- const removed = cleanupOldActions();
465
- console.log(chalk.green(`Removed ${removed} old action(s)`));
466
- });
467
- cmd.command("watch-responses").description("Watch for incoming SMS/WhatsApp responses and notify").option("-i, --interval <ms>", "Check interval in milliseconds", "2000").action(async (options) => {
468
- const { startResponseWatcher } = await import("../../hooks/sms-watcher.js");
469
- const interval = parseInt(options.interval, 10);
470
- startResponseWatcher(interval);
471
- });
472
- cmd.command("install-hook").description("Install Claude Code notification hook").action(() => {
473
- try {
474
- const scriptPath = join(
475
- __dirname,
476
- "../../../scripts/install-notify-hook.sh"
477
- );
478
- execSync(`bash "${scriptPath}"`, { stdio: "inherit" });
479
- } catch {
480
- console.error(chalk.red("Failed to install hook"));
481
- }
482
- });
483
- cmd.command("install-response-hook").description("Install Claude Code response handler hook").action(() => {
484
- try {
485
- const hooksDir = join(process.env["HOME"] || "~", ".claude", "hooks");
486
- const hookSrc = join(
487
- __dirname,
488
- "../../../templates/claude-hooks/sms-response-handler.js"
489
- );
490
- const hookDest = join(hooksDir, "sms-response-handler.js");
491
- execSync(`mkdir -p "${hooksDir}"`, { stdio: "inherit" });
492
- execSync(`cp "${hookSrc}" "${hookDest}"`, { stdio: "inherit" });
493
- execSync(`chmod +x "${hookDest}"`, { stdio: "inherit" });
494
- console.log(chalk.green("Response handler hook installed!"));
495
- console.log(chalk.gray(`Location: ${hookDest}`));
496
- console.log();
497
- console.log(chalk.blue("Add to ~/.claude/settings.json:"));
498
- console.log(
499
- chalk.gray(` "hooks": { "pre_tool_use": ["node ${hookDest}"] }`)
500
- );
501
- } catch {
502
- console.error(chalk.red("Failed to install response hook"));
503
- }
504
- });
505
- cmd.command("webhook").description("Start SMS webhook server for receiving responses").option("-p, --port <port>", "Port to listen on", "3456").action(async (options) => {
506
- const { startWebhookServer } = await import("../../hooks/sms-webhook.js");
507
- const port = parseInt(options.port, 10);
508
- startWebhookServer(port);
509
- });
510
- cmd.command("sync").description("Push current context to WhatsApp").option("--frame <id>", "Sync specific frame by ID").option("--auto", "Enable auto-sync on frame close").option("--no-auto", "Disable auto-sync").action(async (options) => {
511
- if (options.auto === true) {
512
- enableAutoSync();
513
- console.log(chalk.green("Auto-sync enabled"));
514
- return;
515
- }
516
- if (options.auto === false) {
517
- disableAutoSync();
518
- console.log(chalk.yellow("Auto-sync disabled"));
519
- return;
520
- }
521
- console.log(chalk.blue("Syncing context..."));
522
- const result = options.frame ? await syncFrame(options.frame) : await syncContext();
523
- if (result.success) {
524
- console.log(
525
- chalk.green(
526
- `Context synced via ${result.channel} (${result.digestLength} chars)`
527
- )
528
- );
529
- } else {
530
- console.log(chalk.red(`Sync failed: ${result.error}`));
531
- }
532
- });
533
- cmd.command("sync-status").description("Show sync configuration status").action(() => {
534
- const options = loadSyncOptions();
535
- const autoEnabled = isAutoSyncEnabled();
536
- console.log(chalk.blue("Sync Configuration:"));
537
- console.log();
538
- console.log(
539
- ` ${chalk.gray("Auto-sync on close:")} ${autoEnabled ? chalk.green("enabled") : chalk.yellow("disabled")}`
540
- );
541
- console.log(
542
- ` ${chalk.gray("Min frame duration:")} ${options.minFrameDuration}s`
543
- );
544
- console.log(
545
- ` ${chalk.gray("Max digest length:")} ${options.maxDigestLength} chars`
546
- );
547
- console.log(
548
- ` ${chalk.gray("Include decisions:")} ${options.includeDecisions ? "yes" : "no"}`
549
- );
550
- console.log(
551
- ` ${chalk.gray("Include files:")} ${options.includeFiles ? "yes" : "no"}`
552
- );
553
- console.log(
554
- ` ${chalk.gray("Include tests:")} ${options.includeTests ? "yes" : "no"}`
555
- );
556
- });
557
- cmd.command("schedule").description("Manage scheduled digests").argument("[action]", "Action: daily, hourly, interval, list, cancel, run").argument(
558
- "[value]",
559
- "Time (HH:MM) for daily, minutes for interval, or schedule ID"
560
- ).action(async (action, value) => {
561
- if (!action || action === "list") {
562
- const schedules = listSchedules();
563
- if (schedules.length === 0) {
564
- console.log(chalk.gray("No scheduled digests"));
565
- return;
566
- }
567
- console.log(chalk.blue("Scheduled Digests:"));
568
- schedules.forEach((s) => {
569
- const status = s.enabled ? chalk.green("active") : chalk.yellow("paused");
570
- const nextRun = s.nextRun ? new Date(s.nextRun).toLocaleString() : "N/A";
571
- console.log();
572
- console.log(` ${chalk.gray("ID:")} ${s.id}`);
573
- console.log(` ${chalk.gray("Type:")} ${s.config.type}`);
574
- console.log(` ${chalk.gray("Status:")} ${status}`);
575
- console.log(` ${chalk.gray("Next run:")} ${nextRun}`);
576
- if (s.lastRun) {
577
- console.log(
578
- ` ${chalk.gray("Last run:")} ${new Date(s.lastRun).toLocaleString()}`
579
- );
580
- }
581
- });
582
- return;
583
- }
584
- switch (action) {
585
- case "daily": {
586
- const time = value || "09:00";
587
- try {
588
- const id = scheduleDailyDigest(time);
589
- console.log(chalk.green(`Daily digest scheduled at ${time}`));
590
- console.log(chalk.gray(`Schedule ID: ${id}`));
591
- } catch (err) {
592
- console.log(
593
- chalk.red(
594
- `Error: ${err instanceof Error ? err.message : String(err)}`
595
- )
596
- );
597
- }
598
- break;
599
- }
600
- case "hourly": {
601
- const id = scheduleHourlyDigest();
602
- console.log(chalk.green("Hourly digest scheduled"));
603
- console.log(chalk.gray(`Schedule ID: ${id}`));
604
- break;
605
- }
606
- case "interval": {
607
- const minutes = parseInt(value || "60", 10);
608
- if (isNaN(minutes) || minutes < 5) {
609
- console.log(chalk.red("Interval must be at least 5 minutes"));
610
- return;
611
- }
612
- try {
613
- const id = scheduleIntervalDigest(minutes);
614
- console.log(
615
- chalk.green(`Digest scheduled every ${minutes} minutes`)
616
- );
617
- console.log(chalk.gray(`Schedule ID: ${id}`));
618
- } catch (err) {
619
- console.log(
620
- chalk.red(
621
- `Error: ${err instanceof Error ? err.message : String(err)}`
622
- )
623
- );
624
- }
625
- break;
626
- }
627
- case "cancel": {
628
- if (!value) {
629
- console.log(chalk.red("Schedule ID required"));
630
- return;
631
- }
632
- const cancelled = cancelSchedule(value);
633
- if (cancelled) {
634
- console.log(chalk.green(`Schedule ${value} cancelled`));
635
- } else {
636
- console.log(chalk.red(`Schedule not found: ${value}`));
637
- }
638
- break;
639
- }
640
- case "run": {
641
- if (!value) {
642
- console.log(chalk.red("Schedule ID required"));
643
- return;
644
- }
645
- console.log(chalk.blue(`Running schedule ${value}...`));
646
- const result = await runScheduledDigest(value);
647
- if (result.success) {
648
- if (result.sent) {
649
- console.log(chalk.green(result.message));
650
- } else {
651
- console.log(chalk.yellow(result.message));
652
- }
653
- } else {
654
- console.log(chalk.red(`Error: ${result.error}`));
655
- }
656
- break;
657
- }
658
- case "start": {
659
- if (isSchedulerRunning()) {
660
- console.log(chalk.yellow("Scheduler already running"));
661
- } else {
662
- startScheduler();
663
- console.log(chalk.green("Scheduler started"));
664
- }
665
- break;
666
- }
667
- case "stop": {
668
- if (!isSchedulerRunning()) {
669
- console.log(chalk.yellow("Scheduler not running"));
670
- } else {
671
- stopScheduler();
672
- console.log(chalk.green("Scheduler stopped"));
673
- }
674
- break;
675
- }
676
- default:
677
- console.log(chalk.red(`Unknown action: ${action}`));
678
- console.log(
679
- chalk.gray(
680
- "Available: daily, hourly, interval, list, cancel, run, start, stop"
681
- )
682
- );
683
- }
684
- });
685
- cmd.command("commands").description("Manage inbound WhatsApp command processing").option("--enable", "Enable command processing").option("--disable", "Disable command processing").action((options) => {
686
- if (options.enable) {
687
- enableCommands();
688
- console.log(chalk.green("Command processing enabled"));
689
- return;
690
- }
691
- if (options.disable) {
692
- disableCommands();
693
- console.log(chalk.yellow("Command processing disabled"));
694
- return;
695
- }
696
- const config = loadCommandsConfig();
697
- const commands = getAvailableCommands();
698
- console.log(chalk.blue("WhatsApp Commands:"));
699
- console.log();
700
- console.log(
701
- ` ${chalk.gray("Processing:")} ${config.enabled ? chalk.green("enabled") : chalk.yellow("disabled")}`
702
- );
703
- console.log();
704
- console.log(chalk.gray("Available commands:"));
705
- commands.forEach((cmd2) => {
706
- const argHint = cmd2.requiresArg ? " <arg>" : "";
707
- console.log(` ${chalk.cyan(cmd2.name)}${argHint} - ${cmd2.description}`);
708
- });
709
- console.log();
710
- console.log(chalk.gray("Users can send these as WhatsApp messages"));
711
- });
712
- cmd.command("install-whatsapp-hook").description("Install WhatsApp integration hook for Claude Code").action(async () => {
713
- const {
714
- writeFileSync,
715
- mkdirSync,
716
- existsSync: fsExists
717
- } = await import("fs");
718
- const { join: pathJoin } = await import("path");
719
- const homeDir = process.env["HOME"] || "~";
720
- const claudeDir = pathJoin(homeDir, ".claude");
721
- const settingsPath = pathJoin(claudeDir, "settings.json");
722
- const hookPath = pathJoin(
723
- __dirname,
724
- "../hooks/claude-code-whatsapp-hook.js"
725
- );
726
- console.log(chalk.blue("Installing WhatsApp hook for Claude Code..."));
727
- if (!fsExists(claudeDir)) {
728
- mkdirSync(claudeDir, { recursive: true });
729
- }
730
- let settings = {};
731
- if (fsExists(settingsPath)) {
732
- try {
733
- settings = JSON.parse(readFileSync(settingsPath, "utf8"));
734
- } catch {
735
- }
736
- }
737
- const hooks = settings["hooks"] || {};
738
- hooks["Stop"] = ["node", hookPath, "stop"];
739
- settings["hooks"] = hooks;
740
- console.log();
741
- console.log(chalk.yellow("Add to ~/.claude/settings.json:"));
742
- console.log(chalk.gray(JSON.stringify({ hooks }, null, 2)));
743
- console.log();
744
- console.log(chalk.gray("Hook will:"));
745
- console.log(
746
- chalk.gray(" - Send session digest to WhatsApp when Claude exits")
747
- );
748
- console.log(
749
- chalk.gray(" - Check for incoming WhatsApp messages during session")
750
- );
751
- console.log();
752
- console.log(
753
- chalk.green("Manual setup required - copy the hooks config above")
754
- );
755
- });
756
- cmd.command("fallback-status").description("Show auto-fallback status for Claude -> Qwen").action(async () => {
757
- const { getFallbackStatus } = await import("../../core/models/model-router.js");
758
- const status = getFallbackStatus();
759
- console.log(chalk.blue("Auto-Fallback Status:"));
760
- console.log();
761
- console.log(
762
- ` ${chalk.gray("Enabled:")} ${status.enabled ? chalk.green("yes") : chalk.yellow("no")}`
763
- );
764
- console.log(
765
- ` ${chalk.gray("Fallback provider:")} ${status.provider || "none"}`
766
- );
767
- console.log(
768
- ` ${chalk.gray("API key ready:")} ${status.hasApiKey ? chalk.green("yes") : chalk.red("no")}`
769
- );
770
- console.log(
771
- ` ${chalk.gray("Currently in fallback:")} ${status.inFallback ? chalk.yellow("YES") : "no"}`
772
- );
773
- if (status.reason) {
774
- console.log(` ${chalk.gray("Fallback reason:")} ${status.reason}`);
775
- }
776
- console.log();
777
- console.log(
778
- chalk.gray(
779
- "When Claude fails (rate limit, errors), Qwen takes over automatically."
780
- )
781
- );
782
- console.log(
783
- chalk.gray("Configure with: stackmemory model fallback --enable")
784
- );
785
- });
786
- return cmd;
787
- }
788
- function maskPhone(phone) {
789
- if (phone.length < 8) return phone;
790
- return phone.substring(0, 4) + "****" + phone.substring(phone.length - 2);
791
- }
792
- export {
793
- createSMSNotifyCommand
794
- };
795
- //# sourceMappingURL=sms-notify.js.map