@stackmemoryai/stackmemory 0.5.59 → 0.5.61
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +105 -1
- package/dist/src/cli/claude-sm.js +130 -50
- package/dist/src/cli/claude-sm.js.map +2 -2
- package/dist/src/cli/index.js +18 -3
- package/dist/src/cli/index.js.map +3 -3
- package/dist/src/core/extensions/custom-tools.js +567 -0
- package/dist/src/core/extensions/custom-tools.js.map +7 -0
- package/dist/src/core/extensions/index.js +55 -0
- package/dist/src/core/extensions/index.js.map +7 -0
- package/dist/src/core/extensions/loader.js +709 -0
- package/dist/src/core/extensions/loader.js.map +7 -0
- package/dist/src/core/extensions/plugin-system.js +506 -0
- package/dist/src/core/extensions/plugin-system.js.map +7 -0
- package/dist/src/core/extensions/provider-adapter.js +617 -0
- package/dist/src/core/extensions/provider-adapter.js.map +7 -0
- package/dist/src/core/extensions/sandbox-runtime.js +664 -0
- package/dist/src/core/extensions/sandbox-runtime.js.map +7 -0
- package/dist/src/core/storage/chromadb-adapter.js +32 -6
- package/dist/src/core/storage/chromadb-adapter.js.map +2 -2
- package/dist/src/skills/repo-ingestion-skill.js +35 -12
- package/dist/src/skills/repo-ingestion-skill.js.map +2 -2
- package/package.json +11 -7
- package/scripts/background-sync-manager.js +145 -83
- package/scripts/claude-sm-autostart.js +17 -12
- package/scripts/gepa/README.md +275 -0
- package/scripts/gepa/config.json +53 -0
- package/scripts/gepa/evals/coding-tasks.jsonl +5 -0
- package/scripts/gepa/evals/fixtures/buggy-loop.js +18 -0
- package/scripts/gepa/evals/fixtures/callback-hell.js +53 -0
- package/scripts/gepa/generations/gen-000/baseline.md +124 -0
- package/scripts/gepa/hooks/auto-optimize.js +494 -0
- package/scripts/gepa/hooks/eval-tracker.js +203 -0
- package/scripts/gepa/hooks/reflect.js +311 -0
- package/scripts/gepa/optimize.js +611 -0
- package/scripts/gepa/state.json +14 -0
- package/scripts/test-pre-publish-quick.sh +1 -1
- package/dist/agents/core/agent-task-manager.js +0 -527
- package/dist/agents/core/agent-task-manager.js.map +0 -7
- package/dist/agents/testing-agent.js +0 -614
- package/dist/agents/testing-agent.js.map +0 -7
- package/dist/agents/verifiers/base-verifier.js +0 -133
- package/dist/agents/verifiers/base-verifier.js.map +0 -7
- package/dist/agents/verifiers/formatter-verifier.js +0 -130
- package/dist/agents/verifiers/formatter-verifier.js.map +0 -7
- package/dist/agents/verifiers/llm-judge.js +0 -252
- package/dist/agents/verifiers/llm-judge.js.map +0 -7
- package/dist/cli/auto-detect.js +0 -321
- package/dist/cli/auto-detect.js.map +0 -7
- package/dist/cli/browser-test.js +0 -33
- package/dist/cli/browser-test.js.map +0 -7
- package/dist/cli/claude-sm-danger.js +0 -21
- package/dist/cli/claude-sm-danger.js.map +0 -7
- package/dist/cli/claude-sm.js +0 -1156
- package/dist/cli/claude-sm.js.map +0 -7
- package/dist/cli/codex-sm-danger.js +0 -21
- package/dist/cli/codex-sm-danger.js.map +0 -7
- package/dist/cli/codex-sm.js +0 -349
- package/dist/cli/codex-sm.js.map +0 -7
- package/dist/cli/commands/api.js +0 -232
- package/dist/cli/commands/api.js.map +0 -7
- package/dist/cli/commands/auto-background.js +0 -180
- package/dist/cli/commands/auto-background.js.map +0 -7
- package/dist/cli/commands/cleanup-processes.js +0 -68
- package/dist/cli/commands/cleanup-processes.js.map +0 -7
- package/dist/cli/commands/clear.js +0 -202
- package/dist/cli/commands/clear.js.map +0 -7
- package/dist/cli/commands/config.js +0 -445
- package/dist/cli/commands/config.js.map +0 -7
- package/dist/cli/commands/context-rehydrate.js +0 -751
- package/dist/cli/commands/context-rehydrate.js.map +0 -7
- package/dist/cli/commands/context.js +0 -343
- package/dist/cli/commands/context.js.map +0 -7
- package/dist/cli/commands/daemon.js +0 -392
- package/dist/cli/commands/daemon.js.map +0 -7
- package/dist/cli/commands/dashboard.js +0 -210
- package/dist/cli/commands/dashboard.js.map +0 -7
- package/dist/cli/commands/db.js +0 -147
- package/dist/cli/commands/db.js.map +0 -7
- package/dist/cli/commands/decision.js +0 -266
- package/dist/cli/commands/decision.js.map +0 -7
- package/dist/cli/commands/discovery.js +0 -279
- package/dist/cli/commands/discovery.js.map +0 -7
- package/dist/cli/commands/handoff.js +0 -624
- package/dist/cli/commands/handoff.js.map +0 -7
- package/dist/cli/commands/hooks.js +0 -298
- package/dist/cli/commands/hooks.js.map +0 -7
- package/dist/cli/commands/linear-unified.js +0 -353
- package/dist/cli/commands/linear-unified.js.map +0 -7
- package/dist/cli/commands/linear.js +0 -529
- package/dist/cli/commands/linear.js.map +0 -7
- package/dist/cli/commands/log.js +0 -169
- package/dist/cli/commands/log.js.map +0 -7
- package/dist/cli/commands/login.js +0 -172
- package/dist/cli/commands/login.js.map +0 -7
- package/dist/cli/commands/migrate.js +0 -240
- package/dist/cli/commands/migrate.js.map +0 -7
- package/dist/cli/commands/model.js +0 -533
- package/dist/cli/commands/model.js.map +0 -7
- package/dist/cli/commands/monitor.js +0 -313
- package/dist/cli/commands/monitor.js.map +0 -7
- package/dist/cli/commands/onboard.js +0 -536
- package/dist/cli/commands/onboard.js.map +0 -7
- package/dist/cli/commands/projects.js +0 -199
- package/dist/cli/commands/projects.js.map +0 -7
- package/dist/cli/commands/quality.js +0 -413
- package/dist/cli/commands/quality.js.map +0 -7
- package/dist/cli/commands/ralph.js +0 -909
- package/dist/cli/commands/ralph.js.map +0 -7
- package/dist/cli/commands/retrieval.js +0 -248
- package/dist/cli/commands/retrieval.js.map +0 -7
- package/dist/cli/commands/search.js +0 -173
- package/dist/cli/commands/search.js.map +0 -7
- package/dist/cli/commands/service.js +0 -749
- package/dist/cli/commands/service.js.map +0 -7
- package/dist/cli/commands/session.js +0 -200
- package/dist/cli/commands/session.js.map +0 -7
- package/dist/cli/commands/settings.js +0 -306
- package/dist/cli/commands/settings.js.map +0 -7
- package/dist/cli/commands/setup.js +0 -701
- package/dist/cli/commands/setup.js.map +0 -7
- package/dist/cli/commands/shell.js +0 -249
- package/dist/cli/commands/shell.js.map +0 -7
- package/dist/cli/commands/signup.js +0 -50
- package/dist/cli/commands/signup.js.map +0 -7
- package/dist/cli/commands/skills.js +0 -470
- package/dist/cli/commands/skills.js.map +0 -7
- package/dist/cli/commands/sms-notify.js +0 -795
- package/dist/cli/commands/sms-notify.js.map +0 -7
- package/dist/cli/commands/storage-tier.js +0 -183
- package/dist/cli/commands/storage-tier.js.map +0 -7
- package/dist/cli/commands/storage.js +0 -360
- package/dist/cli/commands/storage.js.map +0 -7
- package/dist/cli/commands/sweep.js +0 -249
- package/dist/cli/commands/sweep.js.map +0 -7
- package/dist/cli/commands/tasks.js +0 -213
- package/dist/cli/commands/tasks.js.map +0 -7
- package/dist/cli/commands/test.js +0 -286
- package/dist/cli/commands/test.js.map +0 -7
- package/dist/cli/commands/workflow.js +0 -142
- package/dist/cli/commands/workflow.js.map +0 -7
- package/dist/cli/commands/worktree.js +0 -319
- package/dist/cli/commands/worktree.js.map +0 -7
- package/dist/cli/index.js +0 -594
- package/dist/cli/index.js.map +0 -7
- package/dist/cli/opencode-sm.js +0 -448
- package/dist/cli/opencode-sm.js.map +0 -7
- package/dist/cli/utils/viewer.js +0 -96
- package/dist/cli/utils/viewer.js.map +0 -7
- package/dist/core/analytics/team-analytics.js +0 -378
- package/dist/core/analytics/team-analytics.js.map +0 -7
- package/dist/core/config/config-manager.js +0 -398
- package/dist/core/config/config-manager.js.map +0 -7
- package/dist/core/config/feature-flags.js +0 -76
- package/dist/core/config/feature-flags.js.map +0 -7
- package/dist/core/config/storage-config.js +0 -115
- package/dist/core/config/storage-config.js.map +0 -7
- package/dist/core/config/types.js +0 -144
- package/dist/core/config/types.js.map +0 -7
- package/dist/core/context/auto-context.js +0 -80
- package/dist/core/context/auto-context.js.map +0 -7
- package/dist/core/context/dual-stack-manager.js +0 -870
- package/dist/core/context/dual-stack-manager.js.map +0 -7
- package/dist/core/context/enhanced-rehydration.js +0 -994
- package/dist/core/context/enhanced-rehydration.js.map +0 -7
- package/dist/core/context/frame-database.js +0 -479
- package/dist/core/context/frame-database.js.map +0 -7
- package/dist/core/context/frame-digest.js +0 -250
- package/dist/core/context/frame-digest.js.map +0 -7
- package/dist/core/context/frame-handoff-manager.js +0 -778
- package/dist/core/context/frame-handoff-manager.js.map +0 -7
- package/dist/core/context/frame-lifecycle-hooks.js +0 -119
- package/dist/core/context/frame-lifecycle-hooks.js.map +0 -7
- package/dist/core/context/frame-manager.js +0 -1069
- package/dist/core/context/frame-manager.js.map +0 -7
- package/dist/core/context/frame-recovery.js +0 -302
- package/dist/core/context/frame-recovery.js.map +0 -7
- package/dist/core/context/frame-stack.js +0 -314
- package/dist/core/context/frame-stack.js.map +0 -7
- package/dist/core/context/frame-types.js +0 -5
- package/dist/core/context/frame-types.js.map +0 -7
- package/dist/core/context/incremental-gc.js +0 -290
- package/dist/core/context/incremental-gc.js.map +0 -7
- package/dist/core/context/index.js +0 -25
- package/dist/core/context/index.js.map +0 -7
- package/dist/core/context/model-aware-compaction.js +0 -623
- package/dist/core/context/model-aware-compaction.js.map +0 -7
- package/dist/core/context/permission-manager.js +0 -185
- package/dist/core/context/permission-manager.js.map +0 -7
- package/dist/core/context/recursive-context-manager.js +0 -592
- package/dist/core/context/recursive-context-manager.js.map +0 -7
- package/dist/core/context/refactored-frame-manager.js +0 -754
- package/dist/core/context/refactored-frame-manager.js.map +0 -7
- package/dist/core/context/shared-context-layer.js +0 -621
- package/dist/core/context/shared-context-layer.js.map +0 -7
- package/dist/core/context/stack-merge-resolver.js +0 -749
- package/dist/core/context/stack-merge-resolver.js.map +0 -7
- package/dist/core/context/validation.js +0 -130
- package/dist/core/context/validation.js.map +0 -7
- package/dist/core/database/batch-operations.js +0 -384
- package/dist/core/database/batch-operations.js.map +0 -7
- package/dist/core/database/connection-pool.js +0 -330
- package/dist/core/database/connection-pool.js.map +0 -7
- package/dist/core/database/database-adapter.js +0 -60
- package/dist/core/database/database-adapter.js.map +0 -7
- package/dist/core/database/migration-manager.js +0 -614
- package/dist/core/database/migration-manager.js.map +0 -7
- package/dist/core/database/paradedb-adapter.js +0 -990
- package/dist/core/database/paradedb-adapter.js.map +0 -7
- package/dist/core/database/query-cache.js +0 -298
- package/dist/core/database/query-cache.js.map +0 -7
- package/dist/core/database/query-router.js +0 -430
- package/dist/core/database/query-router.js.map +0 -7
- package/dist/core/database/sqlite-adapter.js +0 -738
- package/dist/core/database/sqlite-adapter.js.map +0 -7
- package/dist/core/digest/enhanced-hybrid-digest.js +0 -277
- package/dist/core/digest/enhanced-hybrid-digest.js.map +0 -7
- package/dist/core/digest/frame-digest-integration.js +0 -176
- package/dist/core/digest/frame-digest-integration.js.map +0 -7
- package/dist/core/digest/hybrid-digest-generator.js +0 -553
- package/dist/core/digest/hybrid-digest-generator.js.map +0 -7
- package/dist/core/digest/index.js +0 -9
- package/dist/core/digest/index.js.map +0 -7
- package/dist/core/digest/types.js +0 -25
- package/dist/core/digest/types.js.map +0 -7
- package/dist/core/errors/error-utils.js +0 -208
- package/dist/core/errors/error-utils.js.map +0 -7
- package/dist/core/errors/index.js +0 -521
- package/dist/core/errors/index.js.map +0 -7
- package/dist/core/errors/recovery.js +0 -269
- package/dist/core/errors/recovery.js.map +0 -7
- package/dist/core/execution/parallel-executor.js +0 -258
- package/dist/core/execution/parallel-executor.js.map +0 -7
- package/dist/core/frame/workflow-templates.js +0 -319
- package/dist/core/frame/workflow-templates.js.map +0 -7
- package/dist/core/merge/conflict-detector.js +0 -431
- package/dist/core/merge/conflict-detector.js.map +0 -7
- package/dist/core/merge/index.js +0 -9
- package/dist/core/merge/index.js.map +0 -7
- package/dist/core/merge/resolution-engine.js +0 -558
- package/dist/core/merge/resolution-engine.js.map +0 -7
- package/dist/core/merge/stack-diff.js +0 -532
- package/dist/core/merge/stack-diff.js.map +0 -7
- package/dist/core/merge/unified-merge-resolver.js +0 -303
- package/dist/core/merge/unified-merge-resolver.js.map +0 -7
- package/dist/core/models/fallback-monitor.js +0 -232
- package/dist/core/models/fallback-monitor.js.map +0 -7
- package/dist/core/models/model-router.js +0 -340
- package/dist/core/models/model-router.js.map +0 -7
- package/dist/core/monitoring/error-handler.js +0 -49
- package/dist/core/monitoring/error-handler.js.map +0 -7
- package/dist/core/monitoring/logger.js +0 -202
- package/dist/core/monitoring/logger.js.map +0 -7
- package/dist/core/monitoring/metrics.js +0 -172
- package/dist/core/monitoring/metrics.js.map +0 -7
- package/dist/core/monitoring/progress-tracker.js +0 -189
- package/dist/core/monitoring/progress-tracker.js.map +0 -7
- package/dist/core/monitoring/session-monitor.js +0 -300
- package/dist/core/monitoring/session-monitor.js.map +0 -7
- package/dist/core/performance/context-cache.js +0 -273
- package/dist/core/performance/context-cache.js.map +0 -7
- package/dist/core/performance/index.js +0 -11
- package/dist/core/performance/index.js.map +0 -7
- package/dist/core/performance/lazy-context-loader.js +0 -327
- package/dist/core/performance/lazy-context-loader.js.map +0 -7
- package/dist/core/performance/monitor.js +0 -221
- package/dist/core/performance/monitor.js.map +0 -7
- package/dist/core/performance/optimized-frame-context.js +0 -345
- package/dist/core/performance/optimized-frame-context.js.map +0 -7
- package/dist/core/performance/performance-benchmark.js +0 -277
- package/dist/core/performance/performance-benchmark.js.map +0 -7
- package/dist/core/performance/performance-profiler.js +0 -370
- package/dist/core/performance/performance-profiler.js.map +0 -7
- package/dist/core/performance/streaming-jsonl-parser.js +0 -195
- package/dist/core/performance/streaming-jsonl-parser.js.map +0 -7
- package/dist/core/persistence/postgres-adapter.js +0 -349
- package/dist/core/persistence/postgres-adapter.js.map +0 -7
- package/dist/core/projects/project-isolation.js +0 -201
- package/dist/core/projects/project-isolation.js.map +0 -7
- package/dist/core/projects/project-manager.js +0 -697
- package/dist/core/projects/project-manager.js.map +0 -7
- package/dist/core/query/query-parser.js +0 -370
- package/dist/core/query/query-parser.js.map +0 -7
- package/dist/core/query/query-templates.js +0 -321
- package/dist/core/query/query-templates.js.map +0 -7
- package/dist/core/retrieval/context-retriever.js +0 -479
- package/dist/core/retrieval/context-retriever.js.map +0 -7
- package/dist/core/retrieval/graph-retrieval.js +0 -662
- package/dist/core/retrieval/graph-retrieval.js.map +0 -7
- package/dist/core/retrieval/hierarchical-retrieval.js +0 -656
- package/dist/core/retrieval/hierarchical-retrieval.js.map +0 -7
- package/dist/core/retrieval/index.js +0 -8
- package/dist/core/retrieval/index.js.map +0 -7
- package/dist/core/retrieval/llm-context-retrieval.js +0 -613
- package/dist/core/retrieval/llm-context-retrieval.js.map +0 -7
- package/dist/core/retrieval/llm-provider.js +0 -151
- package/dist/core/retrieval/llm-provider.js.map +0 -7
- package/dist/core/retrieval/retrieval-audit.js +0 -236
- package/dist/core/retrieval/retrieval-audit.js.map +0 -7
- package/dist/core/retrieval/retrieval-benchmarks.js +0 -521
- package/dist/core/retrieval/retrieval-benchmarks.js.map +0 -7
- package/dist/core/retrieval/summary-generator.js +0 -589
- package/dist/core/retrieval/summary-generator.js.map +0 -7
- package/dist/core/retrieval/types.js +0 -21
- package/dist/core/retrieval/types.js.map +0 -7
- package/dist/core/security/index.js +0 -35
- package/dist/core/security/index.js.map +0 -7
- package/dist/core/security/input-sanitizer.js +0 -321
- package/dist/core/security/input-sanitizer.js.map +0 -7
- package/dist/core/session/clear-survival.js +0 -465
- package/dist/core/session/clear-survival.js.map +0 -7
- package/dist/core/session/enhanced-handoff.js +0 -792
- package/dist/core/session/enhanced-handoff.js.map +0 -7
- package/dist/core/session/handoff-generator.js +0 -343
- package/dist/core/session/handoff-generator.js.map +0 -7
- package/dist/core/session/index.js +0 -15
- package/dist/core/session/index.js.map +0 -7
- package/dist/core/session/session-manager.js +0 -347
- package/dist/core/session/session-manager.js.map +0 -7
- package/dist/core/skills/index.js +0 -7
- package/dist/core/skills/index.js.map +0 -7
- package/dist/core/skills/skill-storage.js +0 -764
- package/dist/core/skills/skill-storage.js.map +0 -7
- package/dist/core/skills/types.js +0 -193
- package/dist/core/skills/types.js.map +0 -7
- package/dist/core/storage/chromadb-adapter.js +0 -354
- package/dist/core/storage/chromadb-adapter.js.map +0 -7
- package/dist/core/storage/infinite-storage.js +0 -510
- package/dist/core/storage/infinite-storage.js.map +0 -7
- package/dist/core/storage/railway-optimized-storage.js +0 -591
- package/dist/core/storage/railway-optimized-storage.js.map +0 -7
- package/dist/core/storage/remote-storage.js +0 -489
- package/dist/core/storage/remote-storage.js.map +0 -7
- package/dist/core/storage/two-tier-storage.js +0 -766
- package/dist/core/storage/two-tier-storage.js.map +0 -7
- package/dist/core/trace/cli-trace-wrapper.js +0 -132
- package/dist/core/trace/cli-trace-wrapper.js.map +0 -7
- package/dist/core/trace/db-trace-wrapper.js +0 -247
- package/dist/core/trace/db-trace-wrapper.js.map +0 -7
- package/dist/core/trace/debug-trace.js +0 -417
- package/dist/core/trace/debug-trace.js.map +0 -7
- package/dist/core/trace/index.js +0 -109
- package/dist/core/trace/index.js.map +0 -7
- package/dist/core/trace/linear-api-wrapper.js +0 -178
- package/dist/core/trace/linear-api-wrapper.js.map +0 -7
- package/dist/core/trace/trace-demo.js +0 -154
- package/dist/core/trace/trace-demo.js.map +0 -7
- package/dist/core/trace/trace-detector.demo.js +0 -142
- package/dist/core/trace/trace-detector.demo.js.map +0 -7
- package/dist/core/trace/trace-detector.js +0 -528
- package/dist/core/trace/trace-detector.js.map +0 -7
- package/dist/core/trace/trace-store.js +0 -345
- package/dist/core/trace/trace-store.js.map +0 -7
- package/dist/core/trace/types.js +0 -77
- package/dist/core/trace/types.js.map +0 -7
- package/dist/core/types.js +0 -5
- package/dist/core/types.js.map +0 -7
- package/dist/core/utils/async-mutex.js +0 -114
- package/dist/core/utils/async-mutex.js.map +0 -7
- package/dist/core/utils/compression.js +0 -83
- package/dist/core/utils/compression.js.map +0 -7
- package/dist/core/utils/update-checker.js +0 -218
- package/dist/core/utils/update-checker.js.map +0 -7
- package/dist/core/worktree/worktree-manager.js +0 -465
- package/dist/core/worktree/worktree-manager.js.map +0 -7
- package/dist/daemon/daemon-config.js +0 -149
- package/dist/daemon/daemon-config.js.map +0 -7
- package/dist/daemon/services/context-service.js +0 -122
- package/dist/daemon/services/context-service.js.map +0 -7
- package/dist/daemon/services/linear-service.js +0 -136
- package/dist/daemon/services/linear-service.js.map +0 -7
- package/dist/daemon/session-daemon.js +0 -312
- package/dist/daemon/session-daemon.js.map +0 -7
- package/dist/daemon/unified-daemon.js +0 -276
- package/dist/daemon/unified-daemon.js.map +0 -7
- package/dist/features/analytics/api/analytics-api.js +0 -287
- package/dist/features/analytics/api/analytics-api.js.map +0 -7
- package/dist/features/analytics/core/analytics-service.js +0 -282
- package/dist/features/analytics/core/analytics-service.js.map +0 -7
- package/dist/features/analytics/index.js +0 -18
- package/dist/features/analytics/index.js.map +0 -7
- package/dist/features/analytics/queries/metrics-queries.js +0 -277
- package/dist/features/analytics/queries/metrics-queries.js.map +0 -7
- package/dist/features/analytics/types/metrics.js +0 -5
- package/dist/features/analytics/types/metrics.js.map +0 -7
- package/dist/features/browser/browser-mcp.js +0 -492
- package/dist/features/browser/browser-mcp.js.map +0 -7
- package/dist/features/sweep/index.js +0 -20
- package/dist/features/sweep/index.js.map +0 -7
- package/dist/features/sweep/prediction-client.js +0 -155
- package/dist/features/sweep/prediction-client.js.map +0 -7
- package/dist/features/sweep/prompt-builder.js +0 -85
- package/dist/features/sweep/prompt-builder.js.map +0 -7
- package/dist/features/sweep/pty-wrapper.js +0 -171
- package/dist/features/sweep/pty-wrapper.js.map +0 -7
- package/dist/features/sweep/state-watcher.js +0 -87
- package/dist/features/sweep/state-watcher.js.map +0 -7
- package/dist/features/sweep/status-bar.js +0 -88
- package/dist/features/sweep/status-bar.js.map +0 -7
- package/dist/features/sweep/sweep-server-manager.js +0 -226
- package/dist/features/sweep/sweep-server-manager.js.map +0 -7
- package/dist/features/sweep/tab-interceptor.js +0 -38
- package/dist/features/sweep/tab-interceptor.js.map +0 -7
- package/dist/features/sweep/types.js +0 -18
- package/dist/features/sweep/types.js.map +0 -7
- package/dist/features/tasks/linear-task-manager.js +0 -487
- package/dist/features/tasks/linear-task-manager.js.map +0 -7
- package/dist/features/tasks/task-aware-context.js +0 -410
- package/dist/features/tasks/task-aware-context.js.map +0 -7
- package/dist/features/tui/simple-monitor.js +0 -116
- package/dist/features/tui/simple-monitor.js.map +0 -7
- package/dist/features/tui/swarm-monitor.js +0 -648
- package/dist/features/tui/swarm-monitor.js.map +0 -7
- package/dist/features/web/client/stores/task-store.js +0 -26
- package/dist/features/web/client/stores/task-store.js.map +0 -7
- package/dist/features/web/server/index.js +0 -194
- package/dist/features/web/server/index.js.map +0 -7
- package/dist/hooks/auto-background.js +0 -151
- package/dist/hooks/auto-background.js.map +0 -7
- package/dist/hooks/claude-code-whatsapp-hook.js +0 -197
- package/dist/hooks/claude-code-whatsapp-hook.js.map +0 -7
- package/dist/hooks/config.js +0 -150
- package/dist/hooks/config.js.map +0 -7
- package/dist/hooks/daemon.js +0 -364
- package/dist/hooks/daemon.js.map +0 -7
- package/dist/hooks/events.js +0 -58
- package/dist/hooks/events.js.map +0 -7
- package/dist/hooks/index.js +0 -12
- package/dist/hooks/index.js.map +0 -7
- package/dist/hooks/linear-task-picker.js +0 -186
- package/dist/hooks/linear-task-picker.js.map +0 -7
- package/dist/hooks/schemas.js +0 -197
- package/dist/hooks/schemas.js.map +0 -7
- package/dist/hooks/secure-fs.js +0 -49
- package/dist/hooks/secure-fs.js.map +0 -7
- package/dist/hooks/security-logger.js +0 -155
- package/dist/hooks/security-logger.js.map +0 -7
- package/dist/hooks/session-summary.js +0 -222
- package/dist/hooks/session-summary.js.map +0 -7
- package/dist/hooks/sms-action-runner.js +0 -371
- package/dist/hooks/sms-action-runner.js.map +0 -7
- package/dist/hooks/sms-notify.js +0 -506
- package/dist/hooks/sms-notify.js.map +0 -7
- package/dist/hooks/sms-watcher.js +0 -93
- package/dist/hooks/sms-watcher.js.map +0 -7
- package/dist/hooks/sms-webhook.js +0 -555
- package/dist/hooks/sms-webhook.js.map +0 -7
- package/dist/hooks/whatsapp-commands.js +0 -479
- package/dist/hooks/whatsapp-commands.js.map +0 -7
- package/dist/hooks/whatsapp-scheduler.js +0 -317
- package/dist/hooks/whatsapp-scheduler.js.map +0 -7
- package/dist/hooks/whatsapp-sync.js +0 -409
- package/dist/hooks/whatsapp-sync.js.map +0 -7
- package/dist/index.js +0 -25
- package/dist/index.js.map +0 -7
- package/dist/integrations/anthropic/client.js +0 -263
- package/dist/integrations/anthropic/client.js.map +0 -7
- package/dist/integrations/claude-code/agent-bridge.js +0 -768
- package/dist/integrations/claude-code/agent-bridge.js.map +0 -7
- package/dist/integrations/claude-code/enhanced-pre-clear-hooks.js +0 -459
- package/dist/integrations/claude-code/enhanced-pre-clear-hooks.js.map +0 -7
- package/dist/integrations/claude-code/lifecycle-hooks.js +0 -254
- package/dist/integrations/claude-code/lifecycle-hooks.js.map +0 -7
- package/dist/integrations/claude-code/post-task-hooks.js +0 -545
- package/dist/integrations/claude-code/post-task-hooks.js.map +0 -7
- package/dist/integrations/claude-code/subagent-client-stub.js +0 -20
- package/dist/integrations/claude-code/subagent-client-stub.js.map +0 -7
- package/dist/integrations/claude-code/subagent-client.js +0 -511
- package/dist/integrations/claude-code/subagent-client.js.map +0 -7
- package/dist/integrations/claude-code/task-coordinator.js +0 -360
- package/dist/integrations/claude-code/task-coordinator.js.map +0 -7
- package/dist/integrations/linear/auth.js +0 -337
- package/dist/integrations/linear/auth.js.map +0 -7
- package/dist/integrations/linear/auto-sync.js +0 -258
- package/dist/integrations/linear/auto-sync.js.map +0 -7
- package/dist/integrations/linear/client.js +0 -634
- package/dist/integrations/linear/client.js.map +0 -7
- package/dist/integrations/linear/config.js +0 -130
- package/dist/integrations/linear/config.js.map +0 -7
- package/dist/integrations/linear/migration.js +0 -361
- package/dist/integrations/linear/migration.js.map +0 -7
- package/dist/integrations/linear/oauth-server.js +0 -454
- package/dist/integrations/linear/oauth-server.js.map +0 -7
- package/dist/integrations/linear/rest-client.js +0 -213
- package/dist/integrations/linear/rest-client.js.map +0 -7
- package/dist/integrations/linear/sync-manager.js +0 -236
- package/dist/integrations/linear/sync-manager.js.map +0 -7
- package/dist/integrations/linear/sync-service.js +0 -231
- package/dist/integrations/linear/sync-service.js.map +0 -7
- package/dist/integrations/linear/sync.js +0 -782
- package/dist/integrations/linear/sync.js.map +0 -7
- package/dist/integrations/linear/types.js +0 -5
- package/dist/integrations/linear/types.js.map +0 -7
- package/dist/integrations/linear/unified-sync.js +0 -589
- package/dist/integrations/linear/unified-sync.js.map +0 -7
- package/dist/integrations/linear/webhook-handler.js +0 -219
- package/dist/integrations/linear/webhook-handler.js.map +0 -7
- package/dist/integrations/linear/webhook-server.js +0 -218
- package/dist/integrations/linear/webhook-server.js.map +0 -7
- package/dist/integrations/linear/webhook.js +0 -291
- package/dist/integrations/linear/webhook.js.map +0 -7
- package/dist/integrations/mcp/handlers/code-execution-handlers.js +0 -266
- package/dist/integrations/mcp/handlers/code-execution-handlers.js.map +0 -7
- package/dist/integrations/mcp/handlers/context-handlers.js +0 -257
- package/dist/integrations/mcp/handlers/context-handlers.js.map +0 -7
- package/dist/integrations/mcp/handlers/discovery-handlers.js +0 -497
- package/dist/integrations/mcp/handlers/discovery-handlers.js.map +0 -7
- package/dist/integrations/mcp/handlers/index.js +0 -166
- package/dist/integrations/mcp/handlers/index.js.map +0 -7
- package/dist/integrations/mcp/handlers/linear-handlers.js +0 -247
- package/dist/integrations/mcp/handlers/linear-handlers.js.map +0 -7
- package/dist/integrations/mcp/handlers/skill-handlers.js +0 -529
- package/dist/integrations/mcp/handlers/skill-handlers.js.map +0 -7
- package/dist/integrations/mcp/handlers/task-handlers.js +0 -239
- package/dist/integrations/mcp/handlers/task-handlers.js.map +0 -7
- package/dist/integrations/mcp/handlers/trace-handlers.js +0 -308
- package/dist/integrations/mcp/handlers/trace-handlers.js.map +0 -7
- package/dist/integrations/mcp/index.js +0 -23
- package/dist/integrations/mcp/index.js.map +0 -7
- package/dist/integrations/mcp/middleware/tool-scoring.js +0 -356
- package/dist/integrations/mcp/middleware/tool-scoring.js.map +0 -7
- package/dist/integrations/mcp/refactored-server.js +0 -374
- package/dist/integrations/mcp/refactored-server.js.map +0 -7
- package/dist/integrations/mcp/remote-server.js +0 -682
- package/dist/integrations/mcp/remote-server.js.map +0 -7
- package/dist/integrations/mcp/schemas.js +0 -147
- package/dist/integrations/mcp/schemas.js.map +0 -7
- package/dist/integrations/mcp/server.js +0 -1975
- package/dist/integrations/mcp/server.js.map +0 -7
- package/dist/integrations/mcp/tool-definitions-code.js +0 -125
- package/dist/integrations/mcp/tool-definitions-code.js.map +0 -7
- package/dist/integrations/mcp/tool-definitions.js +0 -702
- package/dist/integrations/mcp/tool-definitions.js.map +0 -7
- package/dist/integrations/mcp/trace-test.js +0 -48
- package/dist/integrations/mcp/trace-test.js.map +0 -7
- package/dist/integrations/pg-aiguide/embedding-provider.js +0 -189
- package/dist/integrations/pg-aiguide/embedding-provider.js.map +0 -7
- package/dist/integrations/pg-aiguide/semantic-search.js +0 -187
- package/dist/integrations/pg-aiguide/semantic-search.js.map +0 -7
- package/dist/integrations/pg-aiguide/timescale-analytics.js +0 -224
- package/dist/integrations/pg-aiguide/timescale-analytics.js.map +0 -7
- package/dist/integrations/ralph/bridge/ralph-stackmemory-bridge.js +0 -860
- package/dist/integrations/ralph/bridge/ralph-stackmemory-bridge.js.map +0 -7
- package/dist/integrations/ralph/context/context-budget-manager.js +0 -301
- package/dist/integrations/ralph/context/context-budget-manager.js.map +0 -7
- package/dist/integrations/ralph/context/stackmemory-context-loader.js +0 -360
- package/dist/integrations/ralph/context/stackmemory-context-loader.js.map +0 -7
- package/dist/integrations/ralph/coordination/enhanced-coordination.js +0 -410
- package/dist/integrations/ralph/coordination/enhanced-coordination.js.map +0 -7
- package/dist/integrations/ralph/index.js +0 -18
- package/dist/integrations/ralph/index.js.map +0 -7
- package/dist/integrations/ralph/learning/pattern-learner.js +0 -401
- package/dist/integrations/ralph/learning/pattern-learner.js.map +0 -7
- package/dist/integrations/ralph/lifecycle/iteration-lifecycle.js +0 -448
- package/dist/integrations/ralph/lifecycle/iteration-lifecycle.js.map +0 -7
- package/dist/integrations/ralph/monitoring/swarm-dashboard.js +0 -294
- package/dist/integrations/ralph/monitoring/swarm-dashboard.js.map +0 -7
- package/dist/integrations/ralph/monitoring/swarm-registry.js +0 -108
- package/dist/integrations/ralph/monitoring/swarm-registry.js.map +0 -7
- package/dist/integrations/ralph/orchestration/multi-loop-orchestrator.js +0 -463
- package/dist/integrations/ralph/orchestration/multi-loop-orchestrator.js.map +0 -7
- package/dist/integrations/ralph/patterns/compounding-engineering-pattern.js +0 -400
- package/dist/integrations/ralph/patterns/compounding-engineering-pattern.js.map +0 -7
- package/dist/integrations/ralph/patterns/extended-coherence-sessions.js +0 -473
- package/dist/integrations/ralph/patterns/extended-coherence-sessions.js.map +0 -7
- package/dist/integrations/ralph/patterns/oracle-worker-pattern.js +0 -388
- package/dist/integrations/ralph/patterns/oracle-worker-pattern.js.map +0 -7
- package/dist/integrations/ralph/performance/performance-optimizer.js +0 -358
- package/dist/integrations/ralph/performance/performance-optimizer.js.map +0 -7
- package/dist/integrations/ralph/ralph-integration-demo.js +0 -182
- package/dist/integrations/ralph/ralph-integration-demo.js.map +0 -7
- package/dist/integrations/ralph/recovery/crash-recovery.js +0 -462
- package/dist/integrations/ralph/recovery/crash-recovery.js.map +0 -7
- package/dist/integrations/ralph/state/state-reconciler.js +0 -404
- package/dist/integrations/ralph/state/state-reconciler.js.map +0 -7
- package/dist/integrations/ralph/swarm/git-workflow-manager.js +0 -428
- package/dist/integrations/ralph/swarm/git-workflow-manager.js.map +0 -7
- package/dist/integrations/ralph/swarm/swarm-coordinator.js +0 -996
- package/dist/integrations/ralph/swarm/swarm-coordinator.js.map +0 -7
- package/dist/integrations/ralph/types.js +0 -5
- package/dist/integrations/ralph/types.js.map +0 -7
- package/dist/integrations/ralph/visualization/ralph-debugger.js +0 -585
- package/dist/integrations/ralph/visualization/ralph-debugger.js.map +0 -7
- package/dist/mcp/stackmemory-mcp-server.js +0 -554
- package/dist/mcp/stackmemory-mcp-server.js.map +0 -7
- package/dist/middleware/exponential-rate-limiter.js +0 -289
- package/dist/middleware/exponential-rate-limiter.js.map +0 -7
- package/dist/models/user.model.js +0 -358
- package/dist/models/user.model.js.map +0 -7
- package/dist/servers/production/auth-middleware.js +0 -528
- package/dist/servers/production/auth-middleware.js.map +0 -7
- package/dist/servers/railway/config.js +0 -55
- package/dist/servers/railway/config.js.map +0 -7
- package/dist/servers/railway/index-enhanced.js +0 -160
- package/dist/servers/railway/index-enhanced.js.map +0 -7
- package/dist/servers/railway/index.js +0 -1349
- package/dist/servers/railway/index.js.map +0 -7
- package/dist/servers/railway/simple.js +0 -64
- package/dist/servers/railway/simple.js.map +0 -7
- package/dist/servers/railway/storage-test.js +0 -459
- package/dist/servers/railway/storage-test.js.map +0 -7
- package/dist/services/config-service.js +0 -65
- package/dist/services/config-service.js.map +0 -7
- package/dist/services/context-service.js +0 -194
- package/dist/services/context-service.js.map +0 -7
- package/dist/skills/api-discovery.js +0 -354
- package/dist/skills/api-discovery.js.map +0 -7
- package/dist/skills/api-skill.js +0 -475
- package/dist/skills/api-skill.js.map +0 -7
- package/dist/skills/claude-skills.js +0 -1061
- package/dist/skills/claude-skills.js.map +0 -7
- package/dist/skills/dashboard-launcher.js +0 -216
- package/dist/skills/dashboard-launcher.js.map +0 -7
- package/dist/skills/recursive-agent-orchestrator.js +0 -575
- package/dist/skills/recursive-agent-orchestrator.js.map +0 -7
- package/dist/skills/repo-ingestion-skill.js +0 -609
- package/dist/skills/repo-ingestion-skill.js.map +0 -7
- package/dist/skills/security-secrets-scanner.js +0 -284
- package/dist/skills/security-secrets-scanner.js.map +0 -7
- package/dist/skills/unified-rlm-orchestrator.js +0 -404
- package/dist/skills/unified-rlm-orchestrator.js.map +0 -7
- package/dist/types/task.js +0 -5
- package/dist/types/task.js.map +0 -7
- package/dist/utils/env.js +0 -50
- package/dist/utils/env.js.map +0 -7
- package/dist/utils/formatting.js +0 -62
- package/dist/utils/formatting.js.map +0 -7
- package/dist/utils/process-cleanup.js +0 -136
- package/dist/utils/process-cleanup.js.map +0 -7
- package/dist/validation/schemas.js +0 -222
- package/dist/validation/schemas.js.map +0 -7
- /package/dist/{core/merge → src/core/extensions}/types.js +0 -0
- /package/dist/{core/merge → src/core/extensions}/types.js.map +0 -0
package/dist/cli/index.js
DELETED
|
@@ -1,594 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { fileURLToPath as __fileURLToPath } from 'url';
|
|
3
|
-
import { dirname as __pathDirname } from 'path';
|
|
4
|
-
const __filename = __fileURLToPath(import.meta.url);
|
|
5
|
-
const __dirname = __pathDirname(__filename);
|
|
6
|
-
process.env["STACKMEMORY_CLI"] = "true";
|
|
7
|
-
import { config as loadDotenv } from "dotenv";
|
|
8
|
-
loadDotenv({ quiet: true });
|
|
9
|
-
import { initializeTracing, trace } from "../core/trace/index.js";
|
|
10
|
-
initializeTracing();
|
|
11
|
-
import { program } from "commander";
|
|
12
|
-
import { logger } from "../core/monitoring/logger.js";
|
|
13
|
-
import { FrameManager } from "../core/context/index.js";
|
|
14
|
-
import { sessionManager, FrameQueryMode } from "../core/session/index.js";
|
|
15
|
-
import { sharedContextLayer } from "../core/context/shared-context-layer.js";
|
|
16
|
-
import { UpdateChecker } from "../core/utils/update-checker.js";
|
|
17
|
-
import { ProgressTracker } from "../core/monitoring/progress-tracker.js";
|
|
18
|
-
import { registerProjectCommands } from "./commands/projects.js";
|
|
19
|
-
import { createSessionCommands } from "./commands/session.js";
|
|
20
|
-
import { isFeatureEnabled, isLocalOnly } from "../core/config/feature-flags.js";
|
|
21
|
-
import { registerWorktreeCommands } from "./commands/worktree.js";
|
|
22
|
-
import { registerOnboardingCommand } from "./commands/onboard.js";
|
|
23
|
-
import { createTaskCommands } from "./commands/tasks.js";
|
|
24
|
-
import { createSearchCommand } from "./commands/search.js";
|
|
25
|
-
import { createLogCommand } from "./commands/log.js";
|
|
26
|
-
import { createContextCommands } from "./commands/context.js";
|
|
27
|
-
import { createConfigCommand } from "./commands/config.js";
|
|
28
|
-
import {
|
|
29
|
-
createCaptureCommand,
|
|
30
|
-
createRestoreCommand,
|
|
31
|
-
createAutoCaptureCommand
|
|
32
|
-
} from "./commands/handoff.js";
|
|
33
|
-
import {
|
|
34
|
-
createDecisionCommand,
|
|
35
|
-
createMemoryCommand
|
|
36
|
-
} from "./commands/decision.js";
|
|
37
|
-
import clearCommand from "./commands/clear.js";
|
|
38
|
-
import serviceCommand from "./commands/service.js";
|
|
39
|
-
import { registerLoginCommand } from "./commands/login.js";
|
|
40
|
-
import { registerSignupCommand } from "./commands/signup.js";
|
|
41
|
-
import { registerLogoutCommand, registerDbCommands } from "./commands/db.js";
|
|
42
|
-
import { createHooksCommand } from "./commands/hooks.js";
|
|
43
|
-
import { createDaemonCommand } from "./commands/daemon.js";
|
|
44
|
-
import { createSweepCommand } from "./commands/sweep.js";
|
|
45
|
-
import { createShellCommand } from "./commands/shell.js";
|
|
46
|
-
import { createAPICommand } from "./commands/api.js";
|
|
47
|
-
import { createCleanupProcessesCommand } from "./commands/cleanup-processes.js";
|
|
48
|
-
import { createAutoBackgroundCommand } from "./commands/auto-background.js";
|
|
49
|
-
import { createSettingsCommand } from "./commands/settings.js";
|
|
50
|
-
import { createRetrievalCommands } from "./commands/retrieval.js";
|
|
51
|
-
import { createDiscoveryCommands } from "./commands/discovery.js";
|
|
52
|
-
import { createModelCommand } from "./commands/model.js";
|
|
53
|
-
import { registerSetupCommands } from "./commands/setup.js";
|
|
54
|
-
import { ProjectManager } from "../core/projects/project-manager.js";
|
|
55
|
-
import Database from "better-sqlite3";
|
|
56
|
-
import { join } from "path";
|
|
57
|
-
import { existsSync, mkdirSync } from "fs";
|
|
58
|
-
import inquirer from "inquirer";
|
|
59
|
-
import chalk from "chalk";
|
|
60
|
-
import { enableChromaDB } from "../core/config/storage-config.js";
|
|
61
|
-
import { spawn } from "child_process";
|
|
62
|
-
import { homedir } from "os";
|
|
63
|
-
import { createRequire } from "module";
|
|
64
|
-
const require2 = createRequire(import.meta.url);
|
|
65
|
-
const pkg = require2("../../package.json");
|
|
66
|
-
const VERSION = pkg.version;
|
|
67
|
-
UpdateChecker.checkForUpdates(VERSION, true).catch(() => {
|
|
68
|
-
});
|
|
69
|
-
async function startNotificationServices() {
|
|
70
|
-
if (isLocalOnly() || !isFeatureEnabled("whatsapp")) return;
|
|
71
|
-
try {
|
|
72
|
-
const { loadSMSConfig } = await import("../hooks/sms-notify.js");
|
|
73
|
-
const config = loadSMSConfig();
|
|
74
|
-
if (!config.enabled) return;
|
|
75
|
-
const WEBHOOK_PORT = 3456;
|
|
76
|
-
let webhookStarted = false;
|
|
77
|
-
let ngrokStarted = false;
|
|
78
|
-
const webhookRunning = await fetch(
|
|
79
|
-
`http://localhost:${WEBHOOK_PORT}/health`
|
|
80
|
-
).then((r) => r.ok).catch(() => false);
|
|
81
|
-
if (!webhookRunning) {
|
|
82
|
-
const webhookPath = join(__dirname, "../hooks/sms-webhook.js");
|
|
83
|
-
const webhookProcess = spawn("node", [webhookPath], {
|
|
84
|
-
detached: true,
|
|
85
|
-
stdio: "ignore",
|
|
86
|
-
env: { ...process.env, SMS_WEBHOOK_PORT: String(WEBHOOK_PORT) }
|
|
87
|
-
});
|
|
88
|
-
webhookProcess.unref();
|
|
89
|
-
webhookStarted = true;
|
|
90
|
-
}
|
|
91
|
-
const ngrokRunning = await fetch("http://localhost:4040/api/tunnels").then((r) => r.ok).catch(() => false);
|
|
92
|
-
if (!ngrokRunning) {
|
|
93
|
-
const ngrokProcess = spawn("ngrok", ["http", String(WEBHOOK_PORT)], {
|
|
94
|
-
detached: true,
|
|
95
|
-
stdio: "ignore"
|
|
96
|
-
});
|
|
97
|
-
ngrokProcess.unref();
|
|
98
|
-
ngrokStarted = true;
|
|
99
|
-
}
|
|
100
|
-
if (webhookStarted || ngrokStarted) {
|
|
101
|
-
setTimeout(async () => {
|
|
102
|
-
try {
|
|
103
|
-
const tunnels = await fetch("http://localhost:4040/api/tunnels").then(
|
|
104
|
-
(r) => r.json()
|
|
105
|
-
);
|
|
106
|
-
const publicUrl = tunnels?.tunnels?.[0]?.public_url;
|
|
107
|
-
if (publicUrl) {
|
|
108
|
-
const configDir = join(homedir(), ".stackmemory");
|
|
109
|
-
const configPath = join(configDir, "ngrok-url.txt");
|
|
110
|
-
const { writeFileSync, mkdirSync: mkdirSync2, existsSync: existsSync2 } = await import("fs");
|
|
111
|
-
if (!existsSync2(configDir)) {
|
|
112
|
-
mkdirSync2(configDir, { recursive: true });
|
|
113
|
-
}
|
|
114
|
-
writeFileSync(configPath, publicUrl);
|
|
115
|
-
console.log(
|
|
116
|
-
chalk.gray(`[notify] Webhook: ${publicUrl}/sms/incoming`)
|
|
117
|
-
);
|
|
118
|
-
}
|
|
119
|
-
} catch {
|
|
120
|
-
}
|
|
121
|
-
}, 4e3);
|
|
122
|
-
}
|
|
123
|
-
} catch {
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
startNotificationServices();
|
|
127
|
-
program.name("stackmemory").description(
|
|
128
|
-
"Lossless memory runtime for AI coding tools - organizes context as a call stack instead of linear chat logs, with team collaboration and infinite retention"
|
|
129
|
-
).version(VERSION);
|
|
130
|
-
program.command("init").description(
|
|
131
|
-
"Initialize StackMemory in current project (zero-config by default)"
|
|
132
|
-
).option("-i, --interactive", "Interactive mode with configuration prompts").option(
|
|
133
|
-
"--chromadb",
|
|
134
|
-
"Enable ChromaDB for semantic search (prompts for API key)"
|
|
135
|
-
).option("--daemon", "Start the background daemon after initialization").action(async (options) => {
|
|
136
|
-
try {
|
|
137
|
-
const projectRoot = process.cwd();
|
|
138
|
-
const dbDir = join(projectRoot, ".stackmemory");
|
|
139
|
-
const alreadyInit = existsSync(join(dbDir, "context.db"));
|
|
140
|
-
if (alreadyInit && !options.interactive) {
|
|
141
|
-
console.log(chalk.yellow("StackMemory already initialized."));
|
|
142
|
-
console.log(chalk.gray("Run with --interactive to reconfigure."));
|
|
143
|
-
return;
|
|
144
|
-
}
|
|
145
|
-
if (!existsSync(dbDir)) {
|
|
146
|
-
mkdirSync(dbDir, { recursive: true });
|
|
147
|
-
}
|
|
148
|
-
if (options.chromadb) {
|
|
149
|
-
await promptAndEnableChromaDB();
|
|
150
|
-
} else if (options.interactive && process.stdin.isTTY) {
|
|
151
|
-
console.log(chalk.cyan("\nStorage Configuration"));
|
|
152
|
-
console.log(
|
|
153
|
-
chalk.gray("SQLite (default) is fast and requires no setup.")
|
|
154
|
-
);
|
|
155
|
-
console.log(
|
|
156
|
-
chalk.gray("ChromaDB adds semantic search but requires an API key.\n")
|
|
157
|
-
);
|
|
158
|
-
const { enableChroma } = await inquirer.prompt([
|
|
159
|
-
{
|
|
160
|
-
type: "confirm",
|
|
161
|
-
name: "enableChroma",
|
|
162
|
-
message: "Enable ChromaDB for semantic search?",
|
|
163
|
-
default: false
|
|
164
|
-
}
|
|
165
|
-
]);
|
|
166
|
-
if (enableChroma) {
|
|
167
|
-
await promptAndEnableChromaDB();
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
const dbPath = join(dbDir, "context.db");
|
|
171
|
-
const db = new Database(dbPath);
|
|
172
|
-
new FrameManager(db, "cli-project");
|
|
173
|
-
logger.info("StackMemory initialized successfully", { projectRoot });
|
|
174
|
-
console.log(chalk.green("\n[OK] StackMemory initialized"));
|
|
175
|
-
console.log(chalk.gray(` Project: ${projectRoot}`));
|
|
176
|
-
console.log(chalk.gray(` Storage: SQLite (local)`));
|
|
177
|
-
db.close();
|
|
178
|
-
if (options.daemon) {
|
|
179
|
-
console.log(chalk.cyan("\nInstalling background service..."));
|
|
180
|
-
try {
|
|
181
|
-
const { installServiceSilent } = await import("./commands/service.js");
|
|
182
|
-
const success = await installServiceSilent();
|
|
183
|
-
if (success) {
|
|
184
|
-
console.log(chalk.green("[OK] Guardian service installed"));
|
|
185
|
-
console.log(chalk.gray(" Auto-starts on login"));
|
|
186
|
-
console.log(
|
|
187
|
-
chalk.gray(" Check status: stackmemory service status")
|
|
188
|
-
);
|
|
189
|
-
} else {
|
|
190
|
-
console.log(chalk.yellow("[WARN] Could not install service"));
|
|
191
|
-
console.log(chalk.gray(" Run: stackmemory service install"));
|
|
192
|
-
}
|
|
193
|
-
} catch {
|
|
194
|
-
console.log(chalk.yellow("[WARN] Could not install service"));
|
|
195
|
-
console.log(chalk.gray(" Run: stackmemory service install"));
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
console.log(chalk.cyan("\nNext steps:"));
|
|
199
|
-
console.log(
|
|
200
|
-
chalk.white(" 1. stackmemory setup-mcp") + chalk.gray(" # Configure Claude Code integration")
|
|
201
|
-
);
|
|
202
|
-
console.log(
|
|
203
|
-
chalk.white(" 2. stackmemory status") + chalk.gray(" # Check status")
|
|
204
|
-
);
|
|
205
|
-
console.log(
|
|
206
|
-
chalk.white(" 3. stackmemory doctor") + chalk.gray(" # Diagnose issues")
|
|
207
|
-
);
|
|
208
|
-
} catch (error) {
|
|
209
|
-
logger.error("Failed to initialize StackMemory", error);
|
|
210
|
-
console.error(chalk.red("\n[ERROR] Initialization failed"));
|
|
211
|
-
console.error(chalk.gray(` Reason: ${error.message}`));
|
|
212
|
-
console.error(
|
|
213
|
-
chalk.gray(
|
|
214
|
-
" Fix: Ensure you have write permissions to the current directory"
|
|
215
|
-
)
|
|
216
|
-
);
|
|
217
|
-
console.error(chalk.gray(" Run: stackmemory doctor"));
|
|
218
|
-
process.exit(1);
|
|
219
|
-
}
|
|
220
|
-
});
|
|
221
|
-
async function promptAndEnableChromaDB() {
|
|
222
|
-
const answers = await inquirer.prompt([
|
|
223
|
-
{
|
|
224
|
-
type: "password",
|
|
225
|
-
name: "apiKey",
|
|
226
|
-
message: "Enter your ChromaDB API key:",
|
|
227
|
-
validate: (input) => {
|
|
228
|
-
if (!input || input.trim().length === 0) {
|
|
229
|
-
return "API key is required for ChromaDB";
|
|
230
|
-
}
|
|
231
|
-
return true;
|
|
232
|
-
}
|
|
233
|
-
},
|
|
234
|
-
{
|
|
235
|
-
type: "input",
|
|
236
|
-
name: "apiUrl",
|
|
237
|
-
message: "ChromaDB API URL (press Enter for default):",
|
|
238
|
-
default: "https://api.trychroma.com"
|
|
239
|
-
}
|
|
240
|
-
]);
|
|
241
|
-
enableChromaDB({
|
|
242
|
-
apiKey: answers.apiKey,
|
|
243
|
-
apiUrl: answers.apiUrl
|
|
244
|
-
});
|
|
245
|
-
console.log(chalk.green("[OK] ChromaDB enabled for semantic search."));
|
|
246
|
-
console.log(
|
|
247
|
-
chalk.gray("API key saved to ~/.stackmemory/storage-config.json")
|
|
248
|
-
);
|
|
249
|
-
}
|
|
250
|
-
program.command("status").description("Show current StackMemory status").option("--all", "Show all active frames across sessions").option("--project", "Show all active frames in current project").option("--session <id>", "Show frames for specific session").action(async (options) => {
|
|
251
|
-
return trace.command("stackmemory-status", options, async () => {
|
|
252
|
-
try {
|
|
253
|
-
const projectRoot = process.cwd();
|
|
254
|
-
const dbPath = join(projectRoot, ".stackmemory", "context.db");
|
|
255
|
-
if (!existsSync(dbPath)) {
|
|
256
|
-
console.log(
|
|
257
|
-
'\u274C StackMemory not initialized. Run "stackmemory init" first.'
|
|
258
|
-
);
|
|
259
|
-
return;
|
|
260
|
-
}
|
|
261
|
-
await UpdateChecker.checkForUpdates(VERSION);
|
|
262
|
-
await sessionManager.initialize();
|
|
263
|
-
await sharedContextLayer.initialize();
|
|
264
|
-
const session = await sessionManager.getOrCreateSession({
|
|
265
|
-
projectPath: projectRoot,
|
|
266
|
-
sessionId: options.session
|
|
267
|
-
});
|
|
268
|
-
const contextDiscovery = await sharedContextLayer.autoDiscoverContext();
|
|
269
|
-
if (contextDiscovery.hasSharedContext && contextDiscovery.sessionCount > 1) {
|
|
270
|
-
console.log(`
|
|
271
|
-
\u{1F4A1} Shared Context Available:`);
|
|
272
|
-
console.log(
|
|
273
|
-
` ${contextDiscovery.sessionCount} sessions with shared context`
|
|
274
|
-
);
|
|
275
|
-
if (contextDiscovery.recentPatterns.length > 0) {
|
|
276
|
-
console.log(` Recent patterns:`);
|
|
277
|
-
contextDiscovery.recentPatterns.slice(0, 3).forEach((p) => {
|
|
278
|
-
console.log(
|
|
279
|
-
` \u2022 ${p.type}: ${p.pattern.slice(0, 50)} (${p.frequency}x)`
|
|
280
|
-
);
|
|
281
|
-
});
|
|
282
|
-
}
|
|
283
|
-
if (contextDiscovery.lastDecisions.length > 0) {
|
|
284
|
-
console.log(
|
|
285
|
-
` Last decision: ${contextDiscovery.lastDecisions[0].decision.slice(0, 60)}`
|
|
286
|
-
);
|
|
287
|
-
}
|
|
288
|
-
}
|
|
289
|
-
const db = new Database(dbPath);
|
|
290
|
-
const frameManager = new FrameManager(db, session.projectId);
|
|
291
|
-
if (options.all) {
|
|
292
|
-
frameManager.setQueryMode(FrameQueryMode.ALL_ACTIVE);
|
|
293
|
-
} else if (options.project) {
|
|
294
|
-
frameManager.setQueryMode(FrameQueryMode.PROJECT_ACTIVE);
|
|
295
|
-
}
|
|
296
|
-
const activeFrames = frameManager.getActiveFramePath();
|
|
297
|
-
const stackDepth = frameManager.getStackDepth();
|
|
298
|
-
const totalStats = db.prepare(
|
|
299
|
-
`
|
|
300
|
-
SELECT
|
|
301
|
-
COUNT(*) as total_frames,
|
|
302
|
-
SUM(CASE WHEN state = 'active' THEN 1 ELSE 0 END) as active_frames,
|
|
303
|
-
SUM(CASE WHEN state = 'closed' THEN 1 ELSE 0 END) as closed_frames,
|
|
304
|
-
COUNT(DISTINCT run_id) as total_sessions
|
|
305
|
-
FROM frames
|
|
306
|
-
WHERE project_id = ?
|
|
307
|
-
`
|
|
308
|
-
).get(session.projectId);
|
|
309
|
-
const contextCount = db.prepare(
|
|
310
|
-
`
|
|
311
|
-
SELECT COUNT(*) as count FROM contexts
|
|
312
|
-
`
|
|
313
|
-
).get();
|
|
314
|
-
const eventCount = db.prepare(
|
|
315
|
-
`
|
|
316
|
-
SELECT COUNT(*) as count FROM events e
|
|
317
|
-
JOIN frames f ON e.frame_id = f.frame_id
|
|
318
|
-
WHERE f.project_id = ?
|
|
319
|
-
`
|
|
320
|
-
).get(session.projectId);
|
|
321
|
-
console.log("\u{1F4CA} StackMemory Status:");
|
|
322
|
-
console.log(
|
|
323
|
-
` Session: ${session.sessionId.slice(0, 8)} (${session.state}, ${Math.round((Date.now() - session.startedAt) / 1e3 / 60)}min old)`
|
|
324
|
-
);
|
|
325
|
-
console.log(` Project: ${session.projectId}`);
|
|
326
|
-
if (session.branch) {
|
|
327
|
-
console.log(` Branch: ${session.branch}`);
|
|
328
|
-
}
|
|
329
|
-
console.log(`
|
|
330
|
-
Database Statistics (this project):`);
|
|
331
|
-
console.log(
|
|
332
|
-
` Frames: ${totalStats.total_frames || 0} (${totalStats.active_frames || 0} active, ${totalStats.closed_frames || 0} closed)`
|
|
333
|
-
);
|
|
334
|
-
console.log(` Events: ${eventCount.count || 0}`);
|
|
335
|
-
console.log(` Sessions: ${totalStats.total_sessions || 0}`);
|
|
336
|
-
console.log(
|
|
337
|
-
` Cached contexts: ${contextCount.count || 0} (global)`
|
|
338
|
-
);
|
|
339
|
-
const recentFrames = db.prepare(
|
|
340
|
-
`
|
|
341
|
-
SELECT name, type, state, datetime(created_at, 'unixepoch') as created
|
|
342
|
-
FROM frames
|
|
343
|
-
WHERE project_id = ?
|
|
344
|
-
ORDER BY created_at DESC
|
|
345
|
-
LIMIT 3
|
|
346
|
-
`
|
|
347
|
-
).all(session.projectId);
|
|
348
|
-
if (recentFrames.length > 0) {
|
|
349
|
-
console.log(`
|
|
350
|
-
Recent Activity:`);
|
|
351
|
-
recentFrames.forEach((f) => {
|
|
352
|
-
const stateIcon = f.state === "active" ? "\u{1F7E2}" : "\u26AB";
|
|
353
|
-
console.log(
|
|
354
|
-
` ${stateIcon} ${f.name} [${f.type}] - ${f.created}`
|
|
355
|
-
);
|
|
356
|
-
});
|
|
357
|
-
}
|
|
358
|
-
console.log(`
|
|
359
|
-
Current Session:`);
|
|
360
|
-
console.log(` Stack depth: ${stackDepth}`);
|
|
361
|
-
console.log(` Active frames: ${activeFrames.length}`);
|
|
362
|
-
if (activeFrames.length > 0) {
|
|
363
|
-
activeFrames.forEach((frame, i) => {
|
|
364
|
-
const indent = " " + " ".repeat(frame.depth || i);
|
|
365
|
-
const prefix = i === 0 ? "\u2514\u2500" : " \u2514\u2500";
|
|
366
|
-
console.log(`${indent}${prefix} ${frame.name} [${frame.type}]`);
|
|
367
|
-
});
|
|
368
|
-
}
|
|
369
|
-
if (!options.all && !options.project) {
|
|
370
|
-
const otherSessions = await sessionManager.listSessions({
|
|
371
|
-
projectId: session.projectId,
|
|
372
|
-
state: "active"
|
|
373
|
-
});
|
|
374
|
-
const otherActive = otherSessions.filter(
|
|
375
|
-
(s) => s.sessionId !== session.sessionId
|
|
376
|
-
);
|
|
377
|
-
if (otherActive.length > 0) {
|
|
378
|
-
console.log(`
|
|
379
|
-
Other Active Sessions (same project):`);
|
|
380
|
-
otherActive.forEach((s) => {
|
|
381
|
-
const age = Math.round(
|
|
382
|
-
(Date.now() - s.lastActiveAt) / 1e3 / 60 / 60
|
|
383
|
-
);
|
|
384
|
-
console.log(
|
|
385
|
-
` - ${s.sessionId.slice(0, 8)}: ${s.branch || "main"}, ${age}h old`
|
|
386
|
-
);
|
|
387
|
-
});
|
|
388
|
-
console.log(`
|
|
389
|
-
Tip: Use --all to see frames across sessions`);
|
|
390
|
-
}
|
|
391
|
-
}
|
|
392
|
-
db.close();
|
|
393
|
-
} catch (error) {
|
|
394
|
-
logger.error("Failed to get status", error);
|
|
395
|
-
console.error("\u274C Status check failed:", error.message);
|
|
396
|
-
process.exit(1);
|
|
397
|
-
}
|
|
398
|
-
});
|
|
399
|
-
});
|
|
400
|
-
program.command("update-check").description("Check for StackMemory updates").action(async () => {
|
|
401
|
-
try {
|
|
402
|
-
console.log("\u{1F50D} Checking for updates...");
|
|
403
|
-
await UpdateChecker.forceCheck(VERSION);
|
|
404
|
-
} catch (error) {
|
|
405
|
-
logger.error("Update check failed", error);
|
|
406
|
-
console.error("\u274C Update check failed:", error.message);
|
|
407
|
-
process.exit(1);
|
|
408
|
-
}
|
|
409
|
-
});
|
|
410
|
-
program.command("progress").description("Show current progress and recent changes").action(async () => {
|
|
411
|
-
try {
|
|
412
|
-
const projectRoot = process.cwd();
|
|
413
|
-
const dbPath = join(projectRoot, ".stackmemory", "context.db");
|
|
414
|
-
if (!existsSync(dbPath)) {
|
|
415
|
-
console.log(
|
|
416
|
-
'\u274C StackMemory not initialized. Run "stackmemory init" first.'
|
|
417
|
-
);
|
|
418
|
-
return;
|
|
419
|
-
}
|
|
420
|
-
const progress = new ProgressTracker(projectRoot);
|
|
421
|
-
console.log(progress.getSummary());
|
|
422
|
-
} catch (error) {
|
|
423
|
-
logger.error("Failed to show progress", error);
|
|
424
|
-
console.error("\u274C Failed to show progress:", error.message);
|
|
425
|
-
process.exit(1);
|
|
426
|
-
}
|
|
427
|
-
});
|
|
428
|
-
program.command("mcp-server").description("Start StackMemory MCP server for Claude Desktop").option("-p, --project <path>", "Project root directory", process.cwd()).action(async (options) => {
|
|
429
|
-
try {
|
|
430
|
-
const { runMCPServer } = await import("../integrations/mcp/server.js");
|
|
431
|
-
process.env["PROJECT_ROOT"] = options.project;
|
|
432
|
-
console.log("\u{1F680} Starting StackMemory MCP Server...");
|
|
433
|
-
console.log(` Project: ${options.project}`);
|
|
434
|
-
console.log(` Version: ${VERSION}`);
|
|
435
|
-
UpdateChecker.checkForUpdates(VERSION, true).catch(() => {
|
|
436
|
-
});
|
|
437
|
-
await runMCPServer();
|
|
438
|
-
} catch (error) {
|
|
439
|
-
logger.error("Failed to start MCP server", error);
|
|
440
|
-
console.error("\u274C MCP server failed:", error.message);
|
|
441
|
-
process.exit(1);
|
|
442
|
-
}
|
|
443
|
-
});
|
|
444
|
-
program.command("mcp-remote").description(
|
|
445
|
-
"Start StackMemory Remote MCP server (HTTP/SSE) for Claude.ai web"
|
|
446
|
-
).option("-p, --port <number>", "Port to listen on", "3847").option("-d, --project <path>", "Project root directory", process.cwd()).action(async (options) => {
|
|
447
|
-
try {
|
|
448
|
-
const { runRemoteMCPServer } = await import("../integrations/mcp/remote-server.js");
|
|
449
|
-
const port = parseInt(options.port, 10);
|
|
450
|
-
console.log("Starting StackMemory Remote MCP Server...");
|
|
451
|
-
console.log(` Project: ${options.project}`);
|
|
452
|
-
console.log(` Version: ${VERSION}`);
|
|
453
|
-
console.log("");
|
|
454
|
-
await runRemoteMCPServer(port, options.project);
|
|
455
|
-
console.log("");
|
|
456
|
-
console.log("For Claude.ai web connector:");
|
|
457
|
-
console.log(` URL: http://localhost:${port}/sse`);
|
|
458
|
-
console.log("");
|
|
459
|
-
console.log("For external access (ngrok):");
|
|
460
|
-
console.log(` ngrok http ${port}`);
|
|
461
|
-
console.log(" Then use the ngrok URL + /sse in Claude.ai");
|
|
462
|
-
} catch (error) {
|
|
463
|
-
logger.error("Failed to start remote MCP server", error);
|
|
464
|
-
console.error("Remote MCP server failed:", error.message);
|
|
465
|
-
process.exit(1);
|
|
466
|
-
}
|
|
467
|
-
});
|
|
468
|
-
program.command("context:test").description("Test context persistence by creating sample frames").action(async () => {
|
|
469
|
-
try {
|
|
470
|
-
const projectRoot = process.cwd();
|
|
471
|
-
const dbPath = join(projectRoot, ".stackmemory", "context.db");
|
|
472
|
-
if (!existsSync(dbPath)) {
|
|
473
|
-
console.log(
|
|
474
|
-
'\u274C StackMemory not initialized. Run "stackmemory init" first.'
|
|
475
|
-
);
|
|
476
|
-
return;
|
|
477
|
-
}
|
|
478
|
-
const db = new Database(dbPath);
|
|
479
|
-
const frameManager = new FrameManager(db, "cli-project");
|
|
480
|
-
console.log("\u{1F4DD} Creating test context frames...");
|
|
481
|
-
const rootFrame = frameManager.createFrame({
|
|
482
|
-
type: "task",
|
|
483
|
-
name: "Test Session",
|
|
484
|
-
inputs: { test: true, timestamp: (/* @__PURE__ */ new Date()).toISOString() }
|
|
485
|
-
});
|
|
486
|
-
const taskFrame = frameManager.createFrame({
|
|
487
|
-
type: "subtask",
|
|
488
|
-
name: "Sample Task",
|
|
489
|
-
inputs: { description: "Testing context persistence" },
|
|
490
|
-
parentFrameId: rootFrame
|
|
491
|
-
});
|
|
492
|
-
const commandFrame = frameManager.createFrame({
|
|
493
|
-
type: "tool_scope",
|
|
494
|
-
name: "test-command",
|
|
495
|
-
inputs: { args: ["--test"] },
|
|
496
|
-
parentFrameId: taskFrame
|
|
497
|
-
});
|
|
498
|
-
frameManager.addEvent(
|
|
499
|
-
"observation",
|
|
500
|
-
{
|
|
501
|
-
message: "Test event recorded"
|
|
502
|
-
},
|
|
503
|
-
commandFrame
|
|
504
|
-
);
|
|
505
|
-
console.log("\u2705 Test frames created!");
|
|
506
|
-
console.log(`\u{1F4CA} Stack depth: ${frameManager.getStackDepth()}`);
|
|
507
|
-
console.log(
|
|
508
|
-
`\u{1F504} Active frames: ${frameManager.getActiveFramePath().length}`
|
|
509
|
-
);
|
|
510
|
-
frameManager.closeFrame(commandFrame);
|
|
511
|
-
console.log(
|
|
512
|
-
`\u{1F4CA} After closing command frame: depth = ${frameManager.getStackDepth()}`
|
|
513
|
-
);
|
|
514
|
-
db.close();
|
|
515
|
-
} catch (error) {
|
|
516
|
-
logger.error("Test context failed", error);
|
|
517
|
-
console.error("\u274C Test failed:", error.message);
|
|
518
|
-
process.exit(1);
|
|
519
|
-
}
|
|
520
|
-
});
|
|
521
|
-
registerOnboardingCommand(program);
|
|
522
|
-
registerSignupCommand(program);
|
|
523
|
-
registerLoginCommand(program);
|
|
524
|
-
registerLogoutCommand(program);
|
|
525
|
-
registerDbCommands(program);
|
|
526
|
-
registerProjectCommands(program);
|
|
527
|
-
registerWorktreeCommands(program);
|
|
528
|
-
if (isFeatureEnabled("linear")) {
|
|
529
|
-
import("./commands/linear.js").then(({ registerLinearCommands }) => registerLinearCommands(program)).catch(() => {
|
|
530
|
-
});
|
|
531
|
-
}
|
|
532
|
-
program.addCommand(createSessionCommands());
|
|
533
|
-
program.addCommand(createTaskCommands());
|
|
534
|
-
program.addCommand(createSearchCommand());
|
|
535
|
-
program.addCommand(createLogCommand());
|
|
536
|
-
program.addCommand(createContextCommands());
|
|
537
|
-
program.addCommand(createConfigCommand());
|
|
538
|
-
program.addCommand(createCaptureCommand());
|
|
539
|
-
program.addCommand(createRestoreCommand());
|
|
540
|
-
program.addCommand(createAutoCaptureCommand());
|
|
541
|
-
program.addCommand(createDecisionCommand());
|
|
542
|
-
program.addCommand(createMemoryCommand());
|
|
543
|
-
program.addCommand(clearCommand);
|
|
544
|
-
program.addCommand(serviceCommand);
|
|
545
|
-
program.addCommand(createHooksCommand());
|
|
546
|
-
if (isFeatureEnabled("skills")) {
|
|
547
|
-
import("./commands/skills.js").then(
|
|
548
|
-
({ createSkillsCommand }) => program.addCommand(createSkillsCommand())
|
|
549
|
-
).catch(() => {
|
|
550
|
-
});
|
|
551
|
-
}
|
|
552
|
-
if (isFeatureEnabled("ralph")) {
|
|
553
|
-
import("./commands/ralph.js").then(
|
|
554
|
-
({ default: createRalphCommand }) => program.addCommand(createRalphCommand())
|
|
555
|
-
).catch(() => {
|
|
556
|
-
});
|
|
557
|
-
}
|
|
558
|
-
program.addCommand(createDaemonCommand());
|
|
559
|
-
program.addCommand(createSweepCommand());
|
|
560
|
-
program.addCommand(createShellCommand());
|
|
561
|
-
program.addCommand(createAPICommand());
|
|
562
|
-
program.addCommand(createCleanupProcessesCommand());
|
|
563
|
-
program.addCommand(createAutoBackgroundCommand());
|
|
564
|
-
program.addCommand(createSettingsCommand());
|
|
565
|
-
if (isFeatureEnabled("whatsapp")) {
|
|
566
|
-
import("./commands/sms-notify.js").then(
|
|
567
|
-
({ createSMSNotifyCommand }) => program.addCommand(createSMSNotifyCommand())
|
|
568
|
-
).catch(() => {
|
|
569
|
-
});
|
|
570
|
-
}
|
|
571
|
-
program.addCommand(createRetrievalCommands());
|
|
572
|
-
program.addCommand(createDiscoveryCommands());
|
|
573
|
-
program.addCommand(createModelCommand());
|
|
574
|
-
registerSetupCommands(program);
|
|
575
|
-
program.command("dashboard").description("Display monitoring dashboard in terminal").option("-w, --watch", "Auto-refresh dashboard").option("-i, --interval <seconds>", "Refresh interval in seconds", "5").action(async (options) => {
|
|
576
|
-
const { dashboardCommand } = await import("./commands/dashboard.js");
|
|
577
|
-
await dashboardCommand.handler(options);
|
|
578
|
-
});
|
|
579
|
-
if (process.argv.length > 2) {
|
|
580
|
-
try {
|
|
581
|
-
const manager = ProjectManager.getInstance();
|
|
582
|
-
manager.detectProject().catch(() => {
|
|
583
|
-
});
|
|
584
|
-
} catch {
|
|
585
|
-
}
|
|
586
|
-
}
|
|
587
|
-
const isMainModule = import.meta.url === `file://${process.argv[1]}` || process.argv[1]?.endsWith("/stackmemory") || process.argv[1]?.endsWith("index.ts") || process.argv[1]?.includes("tsx");
|
|
588
|
-
if (isMainModule) {
|
|
589
|
-
program.parse();
|
|
590
|
-
}
|
|
591
|
-
export {
|
|
592
|
-
program
|
|
593
|
-
};
|
|
594
|
-
//# sourceMappingURL=index.js.map
|