@stackmemoryai/stackmemory 0.8.1 → 1.0.1
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/LICENSE +64 -0
- package/README.md +81 -273
- package/dist/src/agents/core/agent-task-manager.js +0 -1
- package/dist/src/agents/verifiers/base-verifier.js +0 -1
- package/dist/src/agents/verifiers/formatter-verifier.js +0 -1
- package/dist/src/agents/verifiers/llm-judge.js +0 -1
- package/dist/src/cli/auto-detect.js +0 -1
- package/dist/src/cli/claude-sm-danger.js +0 -1
- package/dist/src/cli/claude-sm.js +9 -1
- package/dist/src/cli/codex-sm-danger.js +0 -1
- package/dist/src/cli/codex-sm.js +9 -1
- package/dist/src/cli/commands/api.js +0 -1
- package/dist/src/cli/commands/auto-background.js +0 -1
- package/dist/src/cli/commands/cleanup-processes.js +0 -1
- package/dist/src/cli/commands/clear.js +0 -1
- package/dist/src/cli/commands/config.js +0 -1
- package/dist/src/cli/commands/context-rehydrate.js +0 -1
- package/dist/src/cli/commands/context.js +0 -1
- package/dist/src/cli/commands/daemon.js +0 -1
- package/dist/src/cli/commands/dashboard.js +4 -5
- package/dist/src/cli/commands/db.js +0 -1
- package/dist/src/cli/commands/decision.js +0 -1
- package/dist/src/cli/commands/discovery.js +0 -1
- package/dist/src/cli/commands/handoff.js +0 -1
- package/dist/src/cli/commands/hooks.js +0 -1
- package/dist/src/cli/commands/linear.js +0 -1
- package/dist/src/cli/commands/log.js +0 -1
- package/dist/src/cli/commands/login.js +0 -1
- package/dist/src/cli/commands/migrate.js +0 -1
- package/dist/src/cli/commands/model.js +0 -1
- package/dist/src/cli/commands/onboard.js +0 -1
- package/dist/src/cli/commands/ping.js +0 -1
- package/dist/src/cli/commands/projects.js +0 -1
- package/dist/src/cli/commands/ralph.js +0 -1
- package/dist/src/cli/commands/retrieval.js +0 -1
- package/dist/src/cli/commands/search.js +0 -1
- package/dist/src/cli/commands/service.js +0 -1
- package/dist/src/cli/commands/session.js +0 -1
- package/dist/src/cli/commands/setup.js +0 -4
- package/dist/src/cli/commands/shell.js +0 -1
- package/dist/src/cli/commands/signup.js +0 -1
- package/dist/src/cli/commands/skills.js +4 -3
- package/dist/src/cli/commands/storage-tier.js +0 -1
- package/dist/src/cli/commands/sweep.js +0 -1
- package/dist/src/cli/commands/tasks.js +0 -1
- package/dist/src/cli/commands/worktree.js +10 -5
- package/dist/src/cli/index.js +8 -5
- package/dist/src/cli/opencode-sm.js +0 -1
- package/dist/src/cli/utils/viewer.js +0 -1
- package/dist/src/core/config/config-manager.js +0 -1
- package/dist/src/core/config/feature-flags.js +0 -1
- package/dist/src/core/config/storage-config.js +0 -1
- package/dist/src/core/config/types.js +0 -1
- package/dist/src/core/context/auto-context.js +0 -1
- package/dist/src/core/context/dual-stack-manager.js +0 -1
- package/dist/src/core/context/enhanced-rehydration.js +0 -2
- package/dist/src/core/context/frame-database.js +60 -6
- package/dist/src/core/context/frame-digest.js +0 -1
- package/dist/src/core/context/frame-handoff-manager.js +0 -1
- package/dist/src/core/context/frame-lifecycle-hooks.js +0 -1
- package/dist/src/core/context/frame-recovery.js +0 -1
- package/dist/src/core/context/frame-stack.js +0 -1
- package/dist/src/core/context/frame-types.js +0 -1
- package/dist/src/core/context/index.js +0 -1
- package/dist/src/core/context/permission-manager.js +0 -1
- package/dist/src/core/context/recursive-context-manager.js +3 -2
- package/dist/src/core/context/refactored-frame-manager.js +0 -1
- package/dist/src/core/context/shared-context-layer.js +0 -1
- package/dist/src/core/context/stack-merge-resolver.js +0 -1
- package/dist/src/core/context/validation.js +0 -1
- package/dist/src/core/database/batch-operations.js +0 -1
- package/dist/src/core/database/connection-pool.js +0 -1
- package/dist/src/core/database/database-adapter.js +0 -1
- package/dist/src/core/database/embedding-provider-factory.js +0 -1
- package/dist/src/core/database/embedding-provider.js +0 -1
- package/dist/src/core/database/migration-manager.js +0 -1
- package/dist/src/core/database/ollama-embedding-provider.js +0 -1
- package/dist/src/core/database/openai-embedding-provider.js +0 -1
- package/dist/src/core/database/query-cache.js +0 -1
- package/dist/src/core/database/query-router.js +0 -1
- package/dist/src/core/database/sqlite-adapter.js +18 -108
- package/dist/src/core/database/transformers-embedding-provider.js +0 -1
- package/dist/src/core/digest/enhanced-hybrid-digest.js +0 -1
- package/dist/src/core/digest/frame-digest-integration.js +0 -1
- package/dist/src/core/digest/hybrid-digest-generator.js +0 -1
- package/dist/src/core/digest/index.js +0 -1
- package/dist/src/core/digest/types.js +0 -1
- package/dist/src/core/errors/error-utils.js +0 -1
- package/dist/src/core/errors/index.js +0 -1
- package/dist/src/core/errors/recovery.js +0 -1
- package/dist/src/core/execution/parallel-executor.js +0 -1
- package/dist/src/core/extensions/custom-tools.js +0 -1
- package/dist/src/core/extensions/index.js +0 -1
- package/dist/src/core/extensions/loader.js +0 -1
- package/dist/src/core/extensions/plugin-system.js +0 -1
- package/dist/src/core/extensions/provider-adapter.js +0 -1
- package/dist/src/core/extensions/sandbox-runtime.js +0 -1
- package/dist/src/core/extensions/types.js +0 -1
- package/dist/src/core/frame/workflow-templates.js +0 -1
- package/dist/src/core/merge/conflict-detector.js +0 -1
- package/dist/src/core/merge/index.js +0 -1
- package/dist/src/core/merge/resolution-engine.js +0 -1
- package/dist/src/core/merge/stack-diff.js +0 -1
- package/dist/src/core/merge/types.js +0 -1
- package/dist/src/core/merge/unified-merge-resolver.js +0 -1
- package/dist/src/core/models/fallback-monitor.js +0 -1
- package/dist/src/core/models/model-router.js +0 -1
- package/dist/src/core/monitoring/error-handler.js +0 -1
- package/dist/src/core/monitoring/logger.js +0 -1
- package/dist/src/core/monitoring/metrics.js +0 -1
- package/dist/src/core/monitoring/progress-tracker.js +0 -1
- package/dist/src/core/monitoring/session-monitor.js +0 -1
- package/dist/src/core/performance/context-cache.js +0 -1
- package/dist/src/core/performance/index.js +0 -1
- package/dist/src/core/performance/lazy-context-loader.js +3 -8
- package/dist/src/core/performance/monitor.js +0 -1
- package/dist/src/core/performance/optimized-frame-context.js +0 -1
- package/dist/src/core/performance/performance-benchmark.js +0 -1
- package/dist/src/core/performance/performance-profiler.js +0 -1
- package/dist/src/core/performance/streaming-jsonl-parser.js +0 -1
- package/dist/src/core/persistence/postgres-adapter.js +0 -1
- package/dist/src/core/projects/project-isolation.js +0 -1
- package/dist/src/core/projects/project-manager.js +0 -1
- package/dist/src/core/query/query-parser.js +0 -1
- package/dist/src/core/query/query-templates.js +0 -1
- package/dist/src/core/retrieval/context-retriever.js +0 -1
- package/dist/src/core/retrieval/index.js +0 -1
- package/dist/src/core/retrieval/llm-context-retrieval.js +0 -1
- package/dist/src/core/retrieval/llm-provider.js +0 -1
- package/dist/src/core/retrieval/privacy-filter.js +0 -1
- package/dist/src/core/retrieval/retrieval-audit.js +0 -1
- package/dist/src/core/retrieval/summary-generator.js +15 -6
- package/dist/src/core/retrieval/types.js +0 -1
- package/dist/src/core/retrieval/unified-context-assembler.js +0 -1
- package/dist/src/core/security/index.js +0 -1
- package/dist/src/core/security/input-sanitizer.js +0 -1
- package/dist/src/core/session/clear-survival.js +0 -1
- package/dist/src/core/session/enhanced-handoff.js +0 -1
- package/dist/src/core/session/handoff-generator.js +0 -1
- package/dist/src/core/session/index.js +0 -1
- package/dist/src/core/session/session-manager.js +0 -1
- package/dist/src/core/skills/index.js +0 -1
- package/dist/src/core/skills/skill-storage.js +0 -1
- package/dist/src/core/skills/types.js +0 -1
- package/dist/src/core/storage/chromadb-adapter.js +0 -1
- package/dist/src/core/storage/infinite-storage.js +0 -1
- package/dist/src/core/storage/project-registry.js +0 -1
- package/dist/src/core/storage/remote-storage.js +4 -2
- package/dist/src/core/storage/storage-tier-manager.js +0 -1
- package/dist/src/core/storage/two-tier-storage.js +0 -1
- package/dist/src/core/trace/cli-trace-wrapper.js +0 -1
- package/dist/src/core/trace/db-trace-wrapper.js +0 -1
- package/dist/src/core/trace/debug-trace.js +0 -1
- package/dist/src/core/trace/index.js +0 -1
- package/dist/src/core/trace/linear-api-wrapper.js +0 -1
- package/dist/src/core/trace/trace-detector.js +0 -1
- package/dist/src/core/trace/trace-store.js +4 -5
- package/dist/src/core/trace/types.js +0 -1
- package/dist/src/core/types.js +0 -1
- package/dist/src/core/utils/async-mutex.js +0 -1
- package/dist/src/core/utils/compression.js +0 -1
- package/dist/src/core/utils/update-checker.js +0 -1
- package/dist/src/core/worktree/worktree-manager.js +0 -1
- package/dist/src/daemon/daemon-config.js +0 -1
- package/dist/src/daemon/services/context-service.js +0 -1
- package/dist/src/daemon/services/linear-service.js +0 -1
- package/dist/src/daemon/services/maintenance-service.js +0 -1
- package/dist/src/daemon/services/memory-service.js +0 -1
- package/dist/src/daemon/session-daemon.js +0 -1
- package/dist/src/daemon/unified-daemon.js +0 -1
- package/dist/src/features/analytics/api/analytics-api.js +0 -1
- package/dist/src/features/analytics/core/analytics-service.js +1 -2
- package/dist/src/features/analytics/index.js +0 -1
- package/dist/src/features/analytics/queries/metrics-queries.js +8 -9
- package/dist/src/features/analytics/types/metrics.js +0 -1
- package/dist/src/features/browser/browser-mcp.js +0 -1
- package/dist/src/features/sweep/index.js +0 -1
- package/dist/src/features/sweep/prediction-client.js +0 -1
- package/dist/src/features/sweep/prompt-builder.js +0 -1
- package/dist/src/features/sweep/pty-wrapper.js +9 -1
- package/dist/src/features/sweep/state-watcher.js +0 -1
- package/dist/src/features/sweep/status-bar.js +0 -1
- package/dist/src/features/sweep/sweep-server-manager.js +0 -1
- package/dist/src/features/sweep/tab-interceptor.js +0 -1
- package/dist/src/features/sweep/types.js +0 -1
- package/dist/src/features/tasks/linear-task-manager.js +0 -1
- package/dist/src/features/tasks/task-aware-context.js +0 -1
- package/dist/src/features/tui/simple-monitor.js +0 -1
- package/dist/src/features/tui/swarm-monitor.js +0 -1
- package/dist/src/features/web/client/stores/task-store.js +0 -1
- package/dist/src/features/web/server/index.js +0 -1
- package/dist/src/features/workers/tmux-manager.js +0 -1
- package/dist/src/features/workers/worker-registry.js +0 -1
- package/dist/src/hooks/auto-background.js +0 -1
- package/dist/src/hooks/config.js +0 -1
- package/dist/src/hooks/daemon.js +8 -1
- package/dist/src/hooks/diffmem-hooks.js +0 -1
- package/dist/src/hooks/events.js +0 -1
- package/dist/src/hooks/graphiti-hooks.js +104 -0
- package/dist/src/hooks/index.js +0 -1
- package/dist/src/hooks/linear-task-picker.js +0 -1
- package/dist/src/hooks/schemas.js +0 -1
- package/dist/src/hooks/secure-fs.js +0 -1
- package/dist/src/hooks/security-logger.js +0 -1
- package/dist/src/hooks/session-summary.js +0 -1
- package/dist/src/index.js +0 -1
- package/dist/src/integrations/anthropic/client.js +0 -1
- package/dist/src/integrations/claude-code/agent-bridge.js +0 -1
- package/dist/src/integrations/claude-code/enhanced-pre-clear-hooks.js +0 -1
- package/dist/src/integrations/claude-code/lifecycle-hooks.js +0 -1
- package/dist/src/integrations/claude-code/post-task-hooks.js +0 -1
- package/dist/src/integrations/claude-code/subagent-client-stub.js +0 -1
- package/dist/src/integrations/claude-code/subagent-client.js +0 -1
- package/dist/src/integrations/claude-code/task-coordinator.js +0 -1
- package/dist/src/integrations/diffmem/client.js +0 -1
- package/dist/src/integrations/diffmem/config.js +0 -1
- package/dist/src/integrations/diffmem/index.js +0 -1
- package/dist/src/integrations/diffmem/types.js +0 -1
- package/dist/src/integrations/graphiti/client.js +103 -0
- package/dist/src/integrations/graphiti/config.js +17 -0
- package/dist/src/integrations/graphiti/types.js +4 -0
- package/dist/src/integrations/linear/auth.js +0 -1
- package/dist/src/integrations/linear/auto-sync.js +0 -1
- package/dist/src/integrations/linear/client.js +0 -1
- package/dist/src/integrations/linear/config.js +0 -1
- package/dist/src/integrations/linear/migration.js +0 -1
- package/dist/src/integrations/linear/oauth-server.js +0 -1
- package/dist/src/integrations/linear/rest-client.js +0 -1
- package/dist/src/integrations/linear/sync-manager.js +0 -1
- package/dist/src/integrations/linear/sync-service.js +0 -1
- package/dist/src/integrations/linear/sync.js +0 -1
- package/dist/src/integrations/linear/types.js +0 -1
- package/dist/src/integrations/linear/unified-sync.js +0 -1
- package/dist/src/integrations/linear/webhook-handler.js +0 -1
- package/dist/src/integrations/linear/webhook-server.js +0 -1
- package/dist/src/integrations/linear/webhook.js +0 -1
- package/dist/src/integrations/mcp/handlers/code-execution-handlers.js +0 -1
- package/dist/src/integrations/mcp/handlers/context-handlers.js +43 -30
- package/dist/src/integrations/mcp/handlers/diffmem-handlers.js +0 -1
- package/dist/src/integrations/mcp/handlers/discovery-handlers.js +0 -1
- package/dist/src/integrations/mcp/handlers/index.js +1 -3
- package/dist/src/integrations/mcp/handlers/linear-handlers.js +24 -61
- package/dist/src/integrations/mcp/handlers/skill-handlers.js +0 -1
- package/dist/src/integrations/mcp/handlers/task-handlers.js +0 -1
- package/dist/src/integrations/mcp/handlers/trace-handlers.js +0 -1
- package/dist/src/integrations/mcp/index.js +0 -1
- package/dist/src/integrations/mcp/middleware/tool-scoring.js +3 -2
- package/dist/src/integrations/mcp/pending-utils.js +0 -1
- package/dist/src/integrations/mcp/refactored-server.js +0 -1
- package/dist/src/integrations/mcp/remote-server.js +0 -1
- package/dist/src/integrations/mcp/schemas.js +0 -1
- package/dist/src/integrations/mcp/server.js +20 -24
- package/dist/src/integrations/mcp/tool-definitions-code.js +0 -1
- package/dist/src/integrations/mcp/tool-definitions.js +0 -1
- package/dist/src/integrations/ralph/bridge/ralph-stackmemory-bridge.js +0 -1
- package/dist/src/integrations/ralph/context/context-budget-manager.js +0 -1
- package/dist/src/integrations/ralph/context/stackmemory-context-loader.js +0 -1
- package/dist/src/integrations/ralph/coordination/enhanced-coordination.js +0 -1
- package/dist/src/integrations/ralph/index.js +0 -1
- package/dist/src/integrations/ralph/learning/pattern-learner.js +0 -1
- package/dist/src/integrations/ralph/lifecycle/iteration-lifecycle.js +5 -5
- package/dist/src/integrations/ralph/monitoring/swarm-dashboard.js +0 -1
- package/dist/src/integrations/ralph/monitoring/swarm-registry.js +0 -1
- package/dist/src/integrations/ralph/orchestration/multi-loop-orchestrator.js +0 -1
- package/dist/src/integrations/ralph/patterns/compounding-engineering-pattern.js +0 -1
- package/dist/src/integrations/ralph/patterns/extended-coherence-sessions.js +0 -1
- package/dist/src/integrations/ralph/patterns/oracle-worker-pattern.js +0 -1
- package/dist/src/integrations/ralph/performance/performance-optimizer.js +0 -1
- package/dist/src/integrations/ralph/recovery/crash-recovery.js +0 -1
- package/dist/src/integrations/ralph/state/state-reconciler.js +25 -9
- package/dist/src/integrations/ralph/swarm/git-workflow-manager.js +0 -1
- package/dist/src/integrations/ralph/swarm/swarm-coordinator.js +0 -1
- package/dist/src/integrations/ralph/types.js +0 -1
- package/dist/src/integrations/ralph/visualization/ralph-debugger.js +0 -1
- package/dist/src/mcp/stackmemory-mcp-server.js +0 -1
- package/dist/src/middleware/exponential-rate-limiter.js +0 -1
- package/dist/src/models/user.model.js +0 -1
- package/dist/src/orchestrators/multimodal/constants.js +0 -1
- package/dist/src/orchestrators/multimodal/harness.js +0 -1
- package/dist/src/orchestrators/multimodal/providers.js +0 -1
- package/dist/src/orchestrators/multimodal/types.js +0 -1
- package/dist/src/orchestrators/multimodal/utils.js +0 -1
- package/dist/src/servers/production/auth-middleware.js +0 -1
- package/dist/src/services/config-service.js +0 -1
- package/dist/src/services/context-service.js +0 -1
- package/dist/src/skills/api-discovery.js +0 -1
- package/dist/src/skills/api-skill.js +0 -1
- package/dist/src/skills/claude-skills.js +0 -1
- package/dist/src/skills/dashboard-launcher.js +0 -1
- package/dist/src/skills/linear-task-runner.js +0 -1
- package/dist/src/skills/recursive-agent-orchestrator.js +0 -1
- package/dist/src/skills/repo-ingestion-skill.js +0 -1
- package/dist/src/skills/spec-generator-skill.js +0 -1
- package/dist/src/skills/unified-rlm-orchestrator.js +0 -1
- package/dist/src/types/task.js +0 -1
- package/dist/src/utils/env.js +0 -1
- package/dist/src/utils/formatting.js +0 -1
- package/dist/src/utils/process-cleanup.js +0 -1
- package/package.json +32 -7
- package/dist/scripts/benchmark-performance.js +0 -48
- package/dist/scripts/benchmark-performance.js.map +0 -7
- package/dist/scripts/check-redis.js +0 -42
- package/dist/scripts/check-redis.js.map +0 -7
- package/dist/scripts/initialize.js +0 -183
- package/dist/scripts/initialize.js.map +0 -7
- package/dist/scripts/list-linear-tasks.js +0 -124
- package/dist/scripts/list-linear-tasks.js.map +0 -7
- package/dist/scripts/measure-handoff-impact.js +0 -340
- package/dist/scripts/measure-handoff-impact.js.map +0 -7
- package/dist/scripts/query-chromadb.js +0 -160
- package/dist/scripts/query-chromadb.js.map +0 -7
- package/dist/scripts/show-linear-summary.js +0 -119
- package/dist/scripts/show-linear-summary.js.map +0 -7
- package/dist/scripts/simple-swarm-demo.js +0 -90
- package/dist/scripts/simple-swarm-demo.js.map +0 -7
- package/dist/scripts/status.js +0 -155
- package/dist/scripts/status.js.map +0 -7
- package/dist/scripts/test-chromadb-sync.js +0 -192
- package/dist/scripts/test-chromadb-sync.js.map +0 -7
- package/dist/scripts/test-ralph-iteration-fix.js +0 -86
- package/dist/scripts/test-ralph-iteration-fix.js.map +0 -7
- package/dist/scripts/test-ralph-iterations.js +0 -121
- package/dist/scripts/test-ralph-iterations.js.map +0 -7
- package/dist/scripts/test-redis-storage.js +0 -389
- package/dist/scripts/test-redis-storage.js.map +0 -7
- package/dist/scripts/test-simple-ralph-state-sync.js +0 -115
- package/dist/scripts/test-simple-ralph-state-sync.js.map +0 -7
- package/dist/scripts/test-swarm-fixes.js +0 -125
- package/dist/scripts/test-swarm-fixes.js.map +0 -7
- package/dist/scripts/test-swarm-tui.js +0 -23
- package/dist/scripts/test-swarm-tui.js.map +0 -7
- package/dist/scripts/test-tui-shortcuts.js +0 -52
- package/dist/scripts/test-tui-shortcuts.js.map +0 -7
- package/dist/scripts/validate-tui-shortcuts.js +0 -60
- package/dist/scripts/validate-tui-shortcuts.js.map +0 -7
- package/dist/src/agents/core/agent-task-manager.js.map +0 -7
- package/dist/src/agents/verifiers/base-verifier.js.map +0 -7
- package/dist/src/agents/verifiers/formatter-verifier.js.map +0 -7
- package/dist/src/agents/verifiers/llm-judge.js.map +0 -7
- package/dist/src/cli/auto-detect.js.map +0 -7
- package/dist/src/cli/claude-sm-danger.js.map +0 -7
- package/dist/src/cli/claude-sm.js.map +0 -7
- package/dist/src/cli/codex-sm-danger.js.map +0 -7
- package/dist/src/cli/codex-sm.js.map +0 -7
- package/dist/src/cli/commands/api.js.map +0 -7
- package/dist/src/cli/commands/auto-background.js.map +0 -7
- package/dist/src/cli/commands/cleanup-processes.js.map +0 -7
- package/dist/src/cli/commands/clear.js.map +0 -7
- package/dist/src/cli/commands/config.js.map +0 -7
- package/dist/src/cli/commands/context-rehydrate.js.map +0 -7
- package/dist/src/cli/commands/context.js.map +0 -7
- package/dist/src/cli/commands/daemon.js.map +0 -7
- package/dist/src/cli/commands/dashboard.js.map +0 -7
- package/dist/src/cli/commands/db.js.map +0 -7
- package/dist/src/cli/commands/decision.js.map +0 -7
- package/dist/src/cli/commands/discovery.js.map +0 -7
- package/dist/src/cli/commands/handoff.js.map +0 -7
- package/dist/src/cli/commands/hooks.js.map +0 -7
- package/dist/src/cli/commands/linear.js.map +0 -7
- package/dist/src/cli/commands/log.js.map +0 -7
- package/dist/src/cli/commands/login.js.map +0 -7
- package/dist/src/cli/commands/migrate.js.map +0 -7
- package/dist/src/cli/commands/model.js.map +0 -7
- package/dist/src/cli/commands/onboard.js.map +0 -7
- package/dist/src/cli/commands/ping.js.map +0 -7
- package/dist/src/cli/commands/projects.js.map +0 -7
- package/dist/src/cli/commands/ralph.js.map +0 -7
- package/dist/src/cli/commands/retrieval.js.map +0 -7
- package/dist/src/cli/commands/search.js.map +0 -7
- package/dist/src/cli/commands/service.js.map +0 -7
- package/dist/src/cli/commands/session.js.map +0 -7
- package/dist/src/cli/commands/settings.js +0 -306
- package/dist/src/cli/commands/settings.js.map +0 -7
- package/dist/src/cli/commands/setup.js.map +0 -7
- package/dist/src/cli/commands/shell.js.map +0 -7
- package/dist/src/cli/commands/signup.js.map +0 -7
- package/dist/src/cli/commands/skills.js.map +0 -7
- package/dist/src/cli/commands/sms-notify.js +0 -795
- package/dist/src/cli/commands/sms-notify.js.map +0 -7
- package/dist/src/cli/commands/storage-tier.js.map +0 -7
- package/dist/src/cli/commands/sweep.js.map +0 -7
- package/dist/src/cli/commands/tasks.js.map +0 -7
- package/dist/src/cli/commands/worktree.js.map +0 -7
- package/dist/src/cli/index.js.map +0 -7
- package/dist/src/cli/opencode-sm.js.map +0 -7
- package/dist/src/cli/utils/viewer.js.map +0 -7
- package/dist/src/core/config/config-manager.js.map +0 -7
- package/dist/src/core/config/feature-flags.js.map +0 -7
- package/dist/src/core/config/storage-config.js.map +0 -7
- package/dist/src/core/config/types.js.map +0 -7
- package/dist/src/core/context/auto-context.js.map +0 -7
- package/dist/src/core/context/dual-stack-manager.js.map +0 -7
- package/dist/src/core/context/enhanced-rehydration.js.map +0 -7
- package/dist/src/core/context/frame-database.js.map +0 -7
- package/dist/src/core/context/frame-digest.js.map +0 -7
- package/dist/src/core/context/frame-handoff-manager.js.map +0 -7
- package/dist/src/core/context/frame-lifecycle-hooks.js.map +0 -7
- package/dist/src/core/context/frame-recovery.js.map +0 -7
- package/dist/src/core/context/frame-stack.js.map +0 -7
- package/dist/src/core/context/frame-types.js.map +0 -7
- package/dist/src/core/context/index.js.map +0 -7
- package/dist/src/core/context/permission-manager.js.map +0 -7
- package/dist/src/core/context/recursive-context-manager.js.map +0 -7
- package/dist/src/core/context/refactored-frame-manager.js.map +0 -7
- package/dist/src/core/context/shared-context-layer.js.map +0 -7
- package/dist/src/core/context/stack-merge-resolver.js.map +0 -7
- package/dist/src/core/context/validation.js.map +0 -7
- package/dist/src/core/database/batch-operations.js.map +0 -7
- package/dist/src/core/database/connection-pool.js.map +0 -7
- package/dist/src/core/database/database-adapter.js.map +0 -7
- package/dist/src/core/database/embedding-provider-factory.js.map +0 -7
- package/dist/src/core/database/embedding-provider.js.map +0 -7
- package/dist/src/core/database/migration-manager.js.map +0 -7
- package/dist/src/core/database/ollama-embedding-provider.js.map +0 -7
- package/dist/src/core/database/openai-embedding-provider.js.map +0 -7
- package/dist/src/core/database/query-cache.js.map +0 -7
- package/dist/src/core/database/query-router.js.map +0 -7
- package/dist/src/core/database/sqlite-adapter.js.map +0 -7
- package/dist/src/core/database/transformers-embedding-provider.js.map +0 -7
- package/dist/src/core/digest/enhanced-hybrid-digest.js.map +0 -7
- package/dist/src/core/digest/frame-digest-integration.js.map +0 -7
- package/dist/src/core/digest/hybrid-digest-generator.js.map +0 -7
- package/dist/src/core/digest/index.js.map +0 -7
- package/dist/src/core/digest/types.js.map +0 -7
- package/dist/src/core/errors/error-utils.js.map +0 -7
- package/dist/src/core/errors/index.js.map +0 -7
- package/dist/src/core/errors/recovery.js.map +0 -7
- package/dist/src/core/execution/parallel-executor.js.map +0 -7
- package/dist/src/core/extensions/custom-tools.js.map +0 -7
- package/dist/src/core/extensions/index.js.map +0 -7
- package/dist/src/core/extensions/loader.js.map +0 -7
- package/dist/src/core/extensions/plugin-system.js.map +0 -7
- package/dist/src/core/extensions/provider-adapter.js.map +0 -7
- package/dist/src/core/extensions/sandbox-runtime.js.map +0 -7
- package/dist/src/core/extensions/types.js.map +0 -7
- package/dist/src/core/frame/workflow-templates.js.map +0 -7
- package/dist/src/core/merge/conflict-detector.js.map +0 -7
- package/dist/src/core/merge/index.js.map +0 -7
- package/dist/src/core/merge/resolution-engine.js.map +0 -7
- package/dist/src/core/merge/stack-diff.js.map +0 -7
- package/dist/src/core/merge/types.js.map +0 -7
- package/dist/src/core/merge/unified-merge-resolver.js.map +0 -7
- package/dist/src/core/models/fallback-monitor.js.map +0 -7
- package/dist/src/core/models/model-router.js.map +0 -7
- package/dist/src/core/monitoring/error-handler.js.map +0 -7
- package/dist/src/core/monitoring/logger.js.map +0 -7
- package/dist/src/core/monitoring/metrics.js.map +0 -7
- package/dist/src/core/monitoring/progress-tracker.js.map +0 -7
- package/dist/src/core/monitoring/session-monitor.js.map +0 -7
- package/dist/src/core/performance/context-cache.js.map +0 -7
- package/dist/src/core/performance/index.js.map +0 -7
- package/dist/src/core/performance/lazy-context-loader.js.map +0 -7
- package/dist/src/core/performance/monitor.js.map +0 -7
- package/dist/src/core/performance/optimized-frame-context.js.map +0 -7
- package/dist/src/core/performance/performance-benchmark.js.map +0 -7
- package/dist/src/core/performance/performance-profiler.js.map +0 -7
- package/dist/src/core/performance/streaming-jsonl-parser.js.map +0 -7
- package/dist/src/core/persistence/postgres-adapter.js.map +0 -7
- package/dist/src/core/projects/project-isolation.js.map +0 -7
- package/dist/src/core/projects/project-manager.js.map +0 -7
- package/dist/src/core/query/query-parser.js.map +0 -7
- package/dist/src/core/query/query-templates.js.map +0 -7
- package/dist/src/core/retrieval/context-retriever.js.map +0 -7
- package/dist/src/core/retrieval/index.js.map +0 -7
- package/dist/src/core/retrieval/llm-context-retrieval.js.map +0 -7
- package/dist/src/core/retrieval/llm-provider.js.map +0 -7
- package/dist/src/core/retrieval/privacy-filter.js.map +0 -7
- package/dist/src/core/retrieval/retrieval-audit.js.map +0 -7
- package/dist/src/core/retrieval/summary-generator.js.map +0 -7
- package/dist/src/core/retrieval/types.js.map +0 -7
- package/dist/src/core/retrieval/unified-context-assembler.js.map +0 -7
- package/dist/src/core/security/index.js.map +0 -7
- package/dist/src/core/security/input-sanitizer.js.map +0 -7
- package/dist/src/core/session/clear-survival.js.map +0 -7
- package/dist/src/core/session/enhanced-handoff.js.map +0 -7
- package/dist/src/core/session/handoff-generator.js.map +0 -7
- package/dist/src/core/session/index.js.map +0 -7
- package/dist/src/core/session/session-manager.js.map +0 -7
- package/dist/src/core/skills/index.js.map +0 -7
- package/dist/src/core/skills/skill-storage.js.map +0 -7
- package/dist/src/core/skills/types.js.map +0 -7
- package/dist/src/core/storage/chromadb-adapter.js.map +0 -7
- package/dist/src/core/storage/infinite-storage.js.map +0 -7
- package/dist/src/core/storage/project-registry.js.map +0 -7
- package/dist/src/core/storage/remote-storage.js.map +0 -7
- package/dist/src/core/storage/storage-tier-manager.js.map +0 -7
- package/dist/src/core/storage/two-tier-storage.js.map +0 -7
- package/dist/src/core/trace/cli-trace-wrapper.js.map +0 -7
- package/dist/src/core/trace/db-trace-wrapper.js.map +0 -7
- package/dist/src/core/trace/debug-trace.js.map +0 -7
- package/dist/src/core/trace/index.js.map +0 -7
- package/dist/src/core/trace/linear-api-wrapper.js.map +0 -7
- package/dist/src/core/trace/trace-detector.js.map +0 -7
- package/dist/src/core/trace/trace-store.js.map +0 -7
- package/dist/src/core/trace/types.js.map +0 -7
- package/dist/src/core/types.js.map +0 -7
- package/dist/src/core/utils/async-mutex.js.map +0 -7
- package/dist/src/core/utils/compression.js.map +0 -7
- package/dist/src/core/utils/update-checker.js.map +0 -7
- package/dist/src/core/worktree/worktree-manager.js.map +0 -7
- package/dist/src/daemon/daemon-config.js.map +0 -7
- package/dist/src/daemon/services/context-service.js.map +0 -7
- package/dist/src/daemon/services/linear-service.js.map +0 -7
- package/dist/src/daemon/services/maintenance-service.js.map +0 -7
- package/dist/src/daemon/services/memory-service.js.map +0 -7
- package/dist/src/daemon/session-daemon.js.map +0 -7
- package/dist/src/daemon/unified-daemon.js.map +0 -7
- package/dist/src/features/analytics/api/analytics-api.js.map +0 -7
- package/dist/src/features/analytics/core/analytics-service.js.map +0 -7
- package/dist/src/features/analytics/index.js.map +0 -7
- package/dist/src/features/analytics/queries/metrics-queries.js.map +0 -7
- package/dist/src/features/analytics/types/metrics.js.map +0 -7
- package/dist/src/features/browser/browser-mcp.js.map +0 -7
- package/dist/src/features/sweep/index.js.map +0 -7
- package/dist/src/features/sweep/prediction-client.js.map +0 -7
- package/dist/src/features/sweep/prompt-builder.js.map +0 -7
- package/dist/src/features/sweep/pty-wrapper.js.map +0 -7
- package/dist/src/features/sweep/state-watcher.js.map +0 -7
- package/dist/src/features/sweep/status-bar.js.map +0 -7
- package/dist/src/features/sweep/sweep-server-manager.js.map +0 -7
- package/dist/src/features/sweep/tab-interceptor.js.map +0 -7
- package/dist/src/features/sweep/types.js.map +0 -7
- package/dist/src/features/tasks/linear-task-manager.js.map +0 -7
- package/dist/src/features/tasks/task-aware-context.js.map +0 -7
- package/dist/src/features/tui/simple-monitor.js.map +0 -7
- package/dist/src/features/tui/swarm-monitor.js.map +0 -7
- package/dist/src/features/web/client/stores/task-store.js.map +0 -7
- package/dist/src/features/web/server/index.js.map +0 -7
- package/dist/src/features/workers/tmux-manager.js.map +0 -7
- package/dist/src/features/workers/worker-registry.js.map +0 -7
- package/dist/src/hooks/auto-background.js.map +0 -7
- package/dist/src/hooks/claude-code-whatsapp-hook.js +0 -197
- package/dist/src/hooks/claude-code-whatsapp-hook.js.map +0 -7
- package/dist/src/hooks/config.js.map +0 -7
- package/dist/src/hooks/daemon.js.map +0 -7
- package/dist/src/hooks/diffmem-hooks.js.map +0 -7
- package/dist/src/hooks/events.js.map +0 -7
- package/dist/src/hooks/index.js.map +0 -7
- package/dist/src/hooks/linear-task-picker.js.map +0 -7
- package/dist/src/hooks/schemas.js.map +0 -7
- package/dist/src/hooks/secure-fs.js.map +0 -7
- package/dist/src/hooks/security-logger.js.map +0 -7
- package/dist/src/hooks/session-summary.js.map +0 -7
- package/dist/src/hooks/sms-action-runner.js +0 -371
- package/dist/src/hooks/sms-action-runner.js.map +0 -7
- package/dist/src/hooks/sms-notify.js +0 -506
- package/dist/src/hooks/sms-notify.js.map +0 -7
- package/dist/src/hooks/sms-watcher.js +0 -93
- package/dist/src/hooks/sms-watcher.js.map +0 -7
- package/dist/src/hooks/sms-webhook.js +0 -555
- package/dist/src/hooks/sms-webhook.js.map +0 -7
- package/dist/src/hooks/whatsapp-commands.js +0 -479
- package/dist/src/hooks/whatsapp-commands.js.map +0 -7
- package/dist/src/hooks/whatsapp-scheduler.js +0 -317
- package/dist/src/hooks/whatsapp-scheduler.js.map +0 -7
- package/dist/src/hooks/whatsapp-sync.js +0 -409
- package/dist/src/hooks/whatsapp-sync.js.map +0 -7
- package/dist/src/index.js.map +0 -7
- package/dist/src/integrations/anthropic/client.js.map +0 -7
- package/dist/src/integrations/claude-code/agent-bridge.js.map +0 -7
- package/dist/src/integrations/claude-code/enhanced-pre-clear-hooks.js.map +0 -7
- package/dist/src/integrations/claude-code/lifecycle-hooks.js.map +0 -7
- package/dist/src/integrations/claude-code/post-task-hooks.js.map +0 -7
- package/dist/src/integrations/claude-code/subagent-client-stub.js.map +0 -7
- package/dist/src/integrations/claude-code/subagent-client.js.map +0 -7
- package/dist/src/integrations/claude-code/task-coordinator.js.map +0 -7
- package/dist/src/integrations/diffmem/client.js.map +0 -7
- package/dist/src/integrations/diffmem/config.js.map +0 -7
- package/dist/src/integrations/diffmem/index.js.map +0 -7
- package/dist/src/integrations/diffmem/types.js.map +0 -7
- package/dist/src/integrations/linear/auth.js.map +0 -7
- package/dist/src/integrations/linear/auto-sync.js.map +0 -7
- package/dist/src/integrations/linear/client.js.map +0 -7
- package/dist/src/integrations/linear/config.js.map +0 -7
- package/dist/src/integrations/linear/migration.js.map +0 -7
- package/dist/src/integrations/linear/oauth-server.js.map +0 -7
- package/dist/src/integrations/linear/rest-client.js.map +0 -7
- package/dist/src/integrations/linear/sync-manager.js.map +0 -7
- package/dist/src/integrations/linear/sync-service.js.map +0 -7
- package/dist/src/integrations/linear/sync.js.map +0 -7
- package/dist/src/integrations/linear/types.js.map +0 -7
- package/dist/src/integrations/linear/unified-sync.js.map +0 -7
- package/dist/src/integrations/linear/webhook-handler.js.map +0 -7
- package/dist/src/integrations/linear/webhook-server.js.map +0 -7
- package/dist/src/integrations/linear/webhook.js.map +0 -7
- package/dist/src/integrations/mcp/handlers/code-execution-handlers.js.map +0 -7
- package/dist/src/integrations/mcp/handlers/context-handlers.js.map +0 -7
- package/dist/src/integrations/mcp/handlers/diffmem-handlers.js.map +0 -7
- package/dist/src/integrations/mcp/handlers/discovery-handlers.js.map +0 -7
- package/dist/src/integrations/mcp/handlers/index.js.map +0 -7
- package/dist/src/integrations/mcp/handlers/linear-handlers.js.map +0 -7
- package/dist/src/integrations/mcp/handlers/skill-handlers.js.map +0 -7
- package/dist/src/integrations/mcp/handlers/task-handlers.js.map +0 -7
- package/dist/src/integrations/mcp/handlers/trace-handlers.js.map +0 -7
- package/dist/src/integrations/mcp/index.js.map +0 -7
- package/dist/src/integrations/mcp/middleware/tool-scoring.js.map +0 -7
- package/dist/src/integrations/mcp/pending-utils.js.map +0 -7
- package/dist/src/integrations/mcp/refactored-server.js.map +0 -7
- package/dist/src/integrations/mcp/remote-server.js.map +0 -7
- package/dist/src/integrations/mcp/schemas.js.map +0 -7
- package/dist/src/integrations/mcp/server.js.map +0 -7
- package/dist/src/integrations/mcp/tool-definitions-code.js.map +0 -7
- package/dist/src/integrations/mcp/tool-definitions.js.map +0 -7
- package/dist/src/integrations/ralph/bridge/ralph-stackmemory-bridge.js.map +0 -7
- package/dist/src/integrations/ralph/context/context-budget-manager.js.map +0 -7
- package/dist/src/integrations/ralph/context/stackmemory-context-loader.js.map +0 -7
- package/dist/src/integrations/ralph/coordination/enhanced-coordination.js.map +0 -7
- package/dist/src/integrations/ralph/index.js.map +0 -7
- package/dist/src/integrations/ralph/learning/pattern-learner.js.map +0 -7
- package/dist/src/integrations/ralph/lifecycle/iteration-lifecycle.js.map +0 -7
- package/dist/src/integrations/ralph/monitoring/swarm-dashboard.js.map +0 -7
- package/dist/src/integrations/ralph/monitoring/swarm-registry.js.map +0 -7
- package/dist/src/integrations/ralph/orchestration/multi-loop-orchestrator.js.map +0 -7
- package/dist/src/integrations/ralph/patterns/compounding-engineering-pattern.js.map +0 -7
- package/dist/src/integrations/ralph/patterns/extended-coherence-sessions.js.map +0 -7
- package/dist/src/integrations/ralph/patterns/oracle-worker-pattern.js.map +0 -7
- package/dist/src/integrations/ralph/performance/performance-optimizer.js.map +0 -7
- package/dist/src/integrations/ralph/recovery/crash-recovery.js.map +0 -7
- package/dist/src/integrations/ralph/state/state-reconciler.js.map +0 -7
- package/dist/src/integrations/ralph/swarm/git-workflow-manager.js.map +0 -7
- package/dist/src/integrations/ralph/swarm/swarm-coordinator.js.map +0 -7
- package/dist/src/integrations/ralph/types.js.map +0 -7
- package/dist/src/integrations/ralph/visualization/ralph-debugger.js.map +0 -7
- package/dist/src/mcp/stackmemory-mcp-server.js.map +0 -7
- package/dist/src/middleware/exponential-rate-limiter.js.map +0 -7
- package/dist/src/models/user.model.js.map +0 -7
- package/dist/src/orchestrators/multimodal/constants.js.map +0 -7
- package/dist/src/orchestrators/multimodal/harness.js.map +0 -7
- package/dist/src/orchestrators/multimodal/providers.js.map +0 -7
- package/dist/src/orchestrators/multimodal/types.js.map +0 -7
- package/dist/src/orchestrators/multimodal/utils.js.map +0 -7
- package/dist/src/servers/production/auth-middleware.js.map +0 -7
- package/dist/src/services/config-service.js.map +0 -7
- package/dist/src/services/context-service.js.map +0 -7
- package/dist/src/skills/api-discovery.js.map +0 -7
- package/dist/src/skills/api-skill.js.map +0 -7
- package/dist/src/skills/claude-skills.js.map +0 -7
- package/dist/src/skills/dashboard-launcher.js.map +0 -7
- package/dist/src/skills/linear-task-runner.js.map +0 -7
- package/dist/src/skills/recursive-agent-orchestrator.js.map +0 -7
- package/dist/src/skills/repo-ingestion-skill.js.map +0 -7
- package/dist/src/skills/spec-generator-skill.js.map +0 -7
- package/dist/src/skills/unified-rlm-orchestrator.js.map +0 -7
- package/dist/src/types/task.js.map +0 -7
- package/dist/src/utils/env.js.map +0 -7
- package/dist/src/utils/formatting.js.map +0 -7
- package/dist/src/utils/process-cleanup.js.map +0 -7
- package/scripts/README-TESTING.md +0 -186
- package/scripts/analyze-cli-security.js +0 -288
- package/scripts/archive/add-phase-tasks-to-linear.js +0 -163
- package/scripts/archive/analyze-linear-duplicates.js +0 -214
- package/scripts/archive/analyze-remaining-duplicates.js +0 -230
- package/scripts/archive/analyze-sta-duplicates.js +0 -292
- package/scripts/archive/analyze-sta-graphql.js +0 -399
- package/scripts/archive/cancel-duplicate-tasks.ts +0 -246
- package/scripts/archive/check-all-duplicates.ts +0 -419
- package/scripts/archive/clean-duplicate-tasks.js +0 -114
- package/scripts/archive/cleanup-duplicate-tasks.ts +0 -286
- package/scripts/archive/create-phase-tasks.js +0 -387
- package/scripts/archive/delete-linear-duplicates.js +0 -182
- package/scripts/archive/delete-remaining-duplicates.js +0 -158
- package/scripts/archive/delete-sta-duplicates.js +0 -201
- package/scripts/archive/delete-sta-oauth.js +0 -201
- package/scripts/archive/export-sta-tasks.js +0 -62
- package/scripts/archive/install-auto-sync.js +0 -266
- package/scripts/archive/install-chromadb-hooks.sh +0 -133
- package/scripts/archive/install-enhanced-clear-hooks.sh +0 -431
- package/scripts/archive/install-post-task-hooks.sh +0 -289
- package/scripts/archive/install-stackmemory-hooks.sh +0 -420
- package/scripts/archive/merge-linear-duplicates-safe.ts +0 -362
- package/scripts/archive/merge-linear-duplicates.ts +0 -182
- package/scripts/archive/remove-sta-tasks.js +0 -70
- package/scripts/archive/setup-background-sync.sh +0 -168
- package/scripts/archive/setup-claude-auto-triggers.sh +0 -181
- package/scripts/archive/setup-claude-autostart.sh +0 -305
- package/scripts/archive/setup-git-hooks.sh +0 -25
- package/scripts/archive/setup-linear-oauth.sh +0 -46
- package/scripts/archive/setup-mcp.sh +0 -113
- package/scripts/archive/setup-railway-deployment.sh +0 -81
- package/scripts/auto-handoff.sh +0 -262
- package/scripts/background-sync-manager.js +0 -478
- package/scripts/benchmark-performance.ts +0 -57
- package/scripts/check-redis.ts +0 -48
- package/scripts/chromadb-auto-loader.sh +0 -128
- package/scripts/chromadb-context-loader.js +0 -479
- package/scripts/claude-chromadb-hook.js +0 -460
- package/scripts/claude-linear-skill.js +0 -455
- package/scripts/claude-pre-commit.sh +0 -302
- package/scripts/claude-sm-autostart.js +0 -579
- package/scripts/claude-with-chromadb.sh +0 -69
- package/scripts/clean-linear-backlog.js +0 -273
- package/scripts/cleanup-old-sessions.sh +0 -57
- package/scripts/create-cleanup-issues.js +0 -302
- package/scripts/create-sandbox.sh +0 -269
- package/scripts/debug-linear-update.js +0 -174
- package/scripts/delete-linear-tasks.js +0 -167
- package/scripts/demos/browser-test.ts +0 -39
- package/scripts/demos/ralph-integration-demo.ts +0 -245
- package/scripts/demos/trace-demo.ts +0 -200
- package/scripts/demos/trace-detector.demo.ts +0 -171
- package/scripts/demos/trace-test.ts +0 -79
- package/scripts/deploy-ralph-swarm.sh +0 -365
- package/scripts/deploy.sh +0 -89
- package/scripts/deployment/test-deployment.js +0 -194
- package/scripts/detect-and-rehydrate.js +0 -162
- package/scripts/detect-and-rehydrate.mjs +0 -165
- package/scripts/development/create-demo-tasks.js +0 -143
- package/scripts/development/debug-frame-test.js +0 -16
- package/scripts/development/demo-auto-sync.js +0 -128
- package/scripts/development/fix-all-imports.js +0 -213
- package/scripts/development/fix-imports.js +0 -229
- package/scripts/development/fix-lint-loop.cjs +0 -103
- package/scripts/development/fix-project-id.ts +0 -161
- package/scripts/development/fix-strict-mode-issues.ts +0 -291
- package/scripts/development/reorganize-structure.sh +0 -228
- package/scripts/development/test-persistence-direct.js +0 -148
- package/scripts/development/test-persistence.js +0 -114
- package/scripts/development/test-tasks.js +0 -93
- package/scripts/development/update-imports.js +0 -212
- package/scripts/fetch-linear-status.js +0 -125
- package/scripts/initialize.ts +0 -220
- package/scripts/linear-auto-sync.js +0 -262
- package/scripts/linear-auto-sync.sh +0 -161
- package/scripts/linear-sync-daemon.js +0 -150
- package/scripts/linear-task-review.js +0 -237
- package/scripts/list-linear-tasks.ts +0 -178
- package/scripts/mcp-proxy.js +0 -66
- package/scripts/measure-handoff-impact.mjs +0 -395
- package/scripts/measure-handoff-impact.ts +0 -450
- package/scripts/publish-local.js +0 -74
- package/scripts/query-chromadb.ts +0 -201
- package/scripts/ralph-integration-test.js +0 -274
- package/scripts/reconcile-local-tasks.js +0 -170
- package/scripts/recreate-frames-db.js +0 -89
- package/scripts/show-linear-summary.ts +0 -172
- package/scripts/simple-swarm-demo.ts +0 -114
- package/scripts/stackmemory-auto-handoff.sh +0 -231
- package/scripts/start-linear-sync-daemon.sh +0 -141
- package/scripts/start-temporal-paradox.sh +0 -214
- package/scripts/status.ts +0 -224
- package/scripts/stop-notify-webhook.sh +0 -19
- package/scripts/swarm-monitor.js +0 -509
- package/scripts/sync-and-clean-tasks.js +0 -258
- package/scripts/sync-linear-graphql.js +0 -303
- package/scripts/sync-linear-tasks.js +0 -186
- package/scripts/test-auto-triggers.sh +0 -57
- package/scripts/test-browser-mcp.js +0 -74
- package/scripts/test-chromadb-full.js +0 -115
- package/scripts/test-chromadb-hooks.sh +0 -28
- package/scripts/test-chromadb-sync.ts +0 -245
- package/scripts/test-claude-config.sh +0 -123
- package/scripts/test-cli-security.js +0 -293
- package/scripts/test-code-execution.js +0 -143
- package/scripts/test-hooks-persistence.sh +0 -220
- package/scripts/test-installation-scenarios.sh +0 -359
- package/scripts/test-installation.sh +0 -224
- package/scripts/test-mcp.js +0 -163
- package/scripts/test-parallel-swarms.js +0 -443
- package/scripts/test-pre-publish-quick.sh +0 -69
- package/scripts/test-quality-gates.sh +0 -263
- package/scripts/test-ralph-iteration-fix.ts +0 -118
- package/scripts/test-ralph-iterations.ts +0 -164
- package/scripts/test-redis-storage.ts +0 -490
- package/scripts/test-rlm-basic.sh +0 -122
- package/scripts/test-rlm-comprehensive.sh +0 -260
- package/scripts/test-rlm-e2e.sh +0 -268
- package/scripts/test-rlm-simple.js +0 -90
- package/scripts/test-rlm.js +0 -110
- package/scripts/test-session-handoff.sh +0 -165
- package/scripts/test-setup-e2e.sh +0 -154
- package/scripts/test-shell-integration.sh +0 -275
- package/scripts/test-simple-ralph-state-sync.ts +0 -178
- package/scripts/test-swarm-fixes.ts +0 -161
- package/scripts/test-swarm-git-workflow.js +0 -338
- package/scripts/test-swarm-tui.ts +0 -34
- package/scripts/test-tui-shortcuts.ts +0 -66
- package/scripts/testing/ab-test-runner.ts +0 -510
- package/scripts/testing/collect-metrics.ts +0 -457
- package/scripts/testing/quick-effectiveness-demo.js +0 -187
- package/scripts/testing/ralph-cli-test.js +0 -88
- package/scripts/testing/ralph-integration-validation.js +0 -727
- package/scripts/testing/ralph-swarm-test-scenarios.js +0 -613
- package/scripts/testing/real-performance-test.js +0 -422
- package/scripts/testing/results/real-performance-results.json +0 -90
- package/scripts/testing/run-effectiveness-tests.sh +0 -176
- package/scripts/testing/simple-effectiveness-test.js +0 -310
- package/scripts/testing/test-tier-migration.js +0 -100
- package/scripts/update-linear-status.js +0 -268
- package/scripts/update-linear-tasks-fixed.js +0 -284
- package/scripts/validate-claude-config.sh +0 -155
- package/scripts/validate-swarm-implementation.js +0 -467
- package/scripts/validate-tui-shortcuts.ts +0 -83
|
@@ -1,289 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
|
|
3
|
-
# StackMemory Post-Task Quality Gates Setup
|
|
4
|
-
# Automatically runs tests and code review after Claude completes tasks
|
|
5
|
-
|
|
6
|
-
set -e
|
|
7
|
-
|
|
8
|
-
echo "🧪 StackMemory Post-Task Quality Gates Setup"
|
|
9
|
-
echo "============================================="
|
|
10
|
-
echo ""
|
|
11
|
-
|
|
12
|
-
# Check if StackMemory is installed
|
|
13
|
-
if ! command -v stackmemory &> /dev/null; then
|
|
14
|
-
echo "❌ StackMemory is not installed"
|
|
15
|
-
echo "Install with: npm install -g @stackmemoryai/stackmemory"
|
|
16
|
-
exit 1
|
|
17
|
-
fi
|
|
18
|
-
|
|
19
|
-
# Check if in a project directory
|
|
20
|
-
if [ ! -d ".stackmemory" ]; then
|
|
21
|
-
echo "⚠️ StackMemory not initialized in this directory"
|
|
22
|
-
echo "Run: stackmemory init"
|
|
23
|
-
read -p "Initialize now? (y/n): " -n 1 -r
|
|
24
|
-
echo
|
|
25
|
-
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
|
26
|
-
stackmemory init
|
|
27
|
-
else
|
|
28
|
-
exit 1
|
|
29
|
-
fi
|
|
30
|
-
fi
|
|
31
|
-
|
|
32
|
-
echo "✅ StackMemory detected"
|
|
33
|
-
echo ""
|
|
34
|
-
|
|
35
|
-
# Detect project type and test frameworks
|
|
36
|
-
echo "🔍 Detecting project configuration..."
|
|
37
|
-
|
|
38
|
-
PROJECT_TYPE="unknown"
|
|
39
|
-
TEST_FRAMEWORK=""
|
|
40
|
-
LINT_COMMAND=""
|
|
41
|
-
TEST_COMMAND=""
|
|
42
|
-
|
|
43
|
-
if [ -f "package.json" ]; then
|
|
44
|
-
echo " 📦 Found package.json"
|
|
45
|
-
|
|
46
|
-
# Detect project type
|
|
47
|
-
if grep -q '"react"' package.json; then
|
|
48
|
-
PROJECT_TYPE="React"
|
|
49
|
-
elif grep -q '"vue"' package.json; then
|
|
50
|
-
PROJECT_TYPE="Vue"
|
|
51
|
-
elif grep -q '"@angular/core"' package.json; then
|
|
52
|
-
PROJECT_TYPE="Angular"
|
|
53
|
-
elif grep -q '"express"' package.json; then
|
|
54
|
-
PROJECT_TYPE="Node.js API"
|
|
55
|
-
elif grep -q '"next"' package.json; then
|
|
56
|
-
PROJECT_TYPE="Next.js"
|
|
57
|
-
fi
|
|
58
|
-
|
|
59
|
-
# Detect test frameworks
|
|
60
|
-
if grep -q '"jest"' package.json; then
|
|
61
|
-
TEST_FRAMEWORK="Jest"
|
|
62
|
-
TEST_COMMAND="npm test"
|
|
63
|
-
elif grep -q '"vitest"' package.json; then
|
|
64
|
-
TEST_FRAMEWORK="Vitest"
|
|
65
|
-
TEST_COMMAND="npm run test"
|
|
66
|
-
elif grep -q '"mocha"' package.json; then
|
|
67
|
-
TEST_FRAMEWORK="Mocha"
|
|
68
|
-
TEST_COMMAND="npm test"
|
|
69
|
-
fi
|
|
70
|
-
|
|
71
|
-
# Detect linters
|
|
72
|
-
if grep -q '"eslint"' package.json; then
|
|
73
|
-
LINT_COMMAND="npm run lint"
|
|
74
|
-
fi
|
|
75
|
-
|
|
76
|
-
elif [ -f "Cargo.toml" ]; then
|
|
77
|
-
echo " 🦀 Found Cargo.toml (Rust project)"
|
|
78
|
-
PROJECT_TYPE="Rust"
|
|
79
|
-
TEST_COMMAND="cargo test"
|
|
80
|
-
LINT_COMMAND="cargo clippy"
|
|
81
|
-
|
|
82
|
-
elif [ -f "go.mod" ]; then
|
|
83
|
-
echo " 🐹 Found go.mod (Go project)"
|
|
84
|
-
PROJECT_TYPE="Go"
|
|
85
|
-
TEST_COMMAND="go test ./..."
|
|
86
|
-
LINT_COMMAND="golangci-lint run"
|
|
87
|
-
|
|
88
|
-
elif [ -f "pyproject.toml" ] || [ -f "requirements.txt" ]; then
|
|
89
|
-
echo " 🐍 Found Python project"
|
|
90
|
-
PROJECT_TYPE="Python"
|
|
91
|
-
TEST_COMMAND="pytest"
|
|
92
|
-
LINT_COMMAND="ruff check"
|
|
93
|
-
fi
|
|
94
|
-
|
|
95
|
-
echo " 🎯 Project type: $PROJECT_TYPE"
|
|
96
|
-
[ -n "$TEST_FRAMEWORK" ] && echo " 🧪 Test framework: $TEST_FRAMEWORK"
|
|
97
|
-
[ -n "$TEST_COMMAND" ] && echo " ▶️ Test command: $TEST_COMMAND"
|
|
98
|
-
[ -n "$LINT_COMMAND" ] && echo " 🔍 Lint command: $LINT_COMMAND"
|
|
99
|
-
echo ""
|
|
100
|
-
|
|
101
|
-
# Create/update StackMemory config
|
|
102
|
-
echo "📝 Configuring quality gates..."
|
|
103
|
-
|
|
104
|
-
CONFIG_FILE=".stackmemory/config.json"
|
|
105
|
-
if [ ! -f "$CONFIG_FILE" ]; then
|
|
106
|
-
echo '{}' > "$CONFIG_FILE"
|
|
107
|
-
fi
|
|
108
|
-
|
|
109
|
-
# Update config with quality gate settings
|
|
110
|
-
cat > "$CONFIG_FILE" << EOF
|
|
111
|
-
{
|
|
112
|
-
"monitor": {
|
|
113
|
-
"contextWarningThreshold": 0.6,
|
|
114
|
-
"contextCriticalThreshold": 0.7,
|
|
115
|
-
"contextAutoSaveThreshold": 0.85,
|
|
116
|
-
"checkIntervalSeconds": 30,
|
|
117
|
-
"idleTimeoutMinutes": 5,
|
|
118
|
-
"autoSaveLedger": true,
|
|
119
|
-
"autoGenerateHandoff": true,
|
|
120
|
-
"sessionEndHandoff": true
|
|
121
|
-
},
|
|
122
|
-
"qualityGates": {
|
|
123
|
-
"runTests": true,
|
|
124
|
-
"requireTestCoverage": false,
|
|
125
|
-
"runCodeReview": true,
|
|
126
|
-
"runLinter": true,
|
|
127
|
-
"blockOnFailure": false
|
|
128
|
-
},
|
|
129
|
-
"testFrameworks": {
|
|
130
|
-
"detected": ["$TEST_FRAMEWORK"],
|
|
131
|
-
"testCommand": "$TEST_COMMAND",
|
|
132
|
-
"lintCommand": "$LINT_COMMAND"
|
|
133
|
-
},
|
|
134
|
-
"reviewConfig": {
|
|
135
|
-
"reviewOnEveryChange": false,
|
|
136
|
-
"reviewOnTaskComplete": true,
|
|
137
|
-
"focusAreas": ["security", "performance", "maintainability", "correctness"],
|
|
138
|
-
"skipPatterns": ["*.test.ts", "*.spec.js", "dist/", "node_modules/", "__pycache__/"]
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
EOF
|
|
142
|
-
|
|
143
|
-
echo "✅ Configuration updated"
|
|
144
|
-
echo ""
|
|
145
|
-
|
|
146
|
-
# Install enhanced Claude Code hooks
|
|
147
|
-
echo "📦 Installing enhanced Claude Code hooks..."
|
|
148
|
-
|
|
149
|
-
CLAUDE_HOOKS_DIR="$HOME/.claude/hooks"
|
|
150
|
-
mkdir -p "$CLAUDE_HOOKS_DIR"
|
|
151
|
-
|
|
152
|
-
# Enhanced on-task-complete hook
|
|
153
|
-
cat > "$CLAUDE_HOOKS_DIR/on-task-complete" << 'EOF'
|
|
154
|
-
#!/bin/bash
|
|
155
|
-
# Enhanced post-task quality gates hook
|
|
156
|
-
# Runs tests, linter, and code review after task completion
|
|
157
|
-
|
|
158
|
-
echo "🔍 Task completed - running quality gates..."
|
|
159
|
-
|
|
160
|
-
# Check if quality gates are enabled
|
|
161
|
-
if [ ! -f ".stackmemory/config.json" ] || ! jq -e '.qualityGates.runTests or .qualityGates.runLinter or .qualityGates.runCodeReview' .stackmemory/config.json >/dev/null 2>&1; then
|
|
162
|
-
echo "⚠️ Quality gates not enabled. Run: stackmemory quality --setup"
|
|
163
|
-
exit 0
|
|
164
|
-
fi
|
|
165
|
-
|
|
166
|
-
# Run quality gates
|
|
167
|
-
stackmemory quality --run 2>&1 | while IFS= read -r line; do
|
|
168
|
-
echo " $line"
|
|
169
|
-
done
|
|
170
|
-
|
|
171
|
-
# Check if any gates failed
|
|
172
|
-
if [ $? -ne 0 ]; then
|
|
173
|
-
echo "❌ Some quality gates failed"
|
|
174
|
-
echo "💡 Fix issues or run: stackmemory quality --history"
|
|
175
|
-
else
|
|
176
|
-
echo "✅ All quality gates passed"
|
|
177
|
-
fi
|
|
178
|
-
EOF
|
|
179
|
-
chmod +x "$CLAUDE_HOOKS_DIR/on-task-complete"
|
|
180
|
-
|
|
181
|
-
# Enhanced on-file-save hook
|
|
182
|
-
cat > "$CLAUDE_HOOKS_DIR/on-file-save" << 'EOF'
|
|
183
|
-
#!/bin/bash
|
|
184
|
-
# Run linter on file save if enabled
|
|
185
|
-
|
|
186
|
-
FILE="$1" # Claude Code passes the saved file path
|
|
187
|
-
|
|
188
|
-
# Skip if not a source file
|
|
189
|
-
case "$FILE" in
|
|
190
|
-
*.ts|*.tsx|*.js|*.jsx|*.py|*.go|*.rs|*.java|*.cpp|*.c) ;;
|
|
191
|
-
*) exit 0 ;;
|
|
192
|
-
esac
|
|
193
|
-
|
|
194
|
-
# Check if linting enabled
|
|
195
|
-
if [ -f ".stackmemory/config.json" ] && jq -e '.qualityGates.runLinter' .stackmemory/config.json >/dev/null 2>&1; then
|
|
196
|
-
LINT_CMD=$(jq -r '.testFrameworks.lintCommand // "echo No lint command configured"' .stackmemory/config.json)
|
|
197
|
-
|
|
198
|
-
if [ "$LINT_CMD" != "echo No lint command configured" ]; then
|
|
199
|
-
echo "🔍 Running linter on $FILE..."
|
|
200
|
-
$LINT_CMD "$FILE" 2>&1 | head -10 # Limit output
|
|
201
|
-
fi
|
|
202
|
-
fi
|
|
203
|
-
EOF
|
|
204
|
-
chmod +x "$CLAUDE_HOOKS_DIR/on-file-save"
|
|
205
|
-
|
|
206
|
-
# Enhanced on-code-change hook
|
|
207
|
-
cat > "$CLAUDE_HOOKS_DIR/on-code-change" << 'EOF'
|
|
208
|
-
#!/bin/bash
|
|
209
|
-
# Trigger quality checks on significant code changes
|
|
210
|
-
|
|
211
|
-
# Get changed files from git
|
|
212
|
-
CHANGED_FILES=$(git diff --name-only HEAD~1 2>/dev/null | wc -l)
|
|
213
|
-
|
|
214
|
-
# If many files changed, run full quality gates
|
|
215
|
-
if [ "${CHANGED_FILES:-0}" -gt 5 ]; then
|
|
216
|
-
echo "🚨 Significant changes detected ($CHANGED_FILES files)"
|
|
217
|
-
echo "🔍 Running comprehensive quality gates..."
|
|
218
|
-
|
|
219
|
-
if command -v stackmemory >/dev/null 2>&1; then
|
|
220
|
-
stackmemory quality --run
|
|
221
|
-
fi
|
|
222
|
-
fi
|
|
223
|
-
EOF
|
|
224
|
-
chmod +x "$CLAUDE_HOOKS_DIR/on-code-change"
|
|
225
|
-
|
|
226
|
-
# Enhanced on-frame-close hook
|
|
227
|
-
cat > "$CLAUDE_HOOKS_DIR/on-frame-close" << 'EOF'
|
|
228
|
-
#!/bin/bash
|
|
229
|
-
# Run quality gates when Claude closes a frame (task completion)
|
|
230
|
-
|
|
231
|
-
FRAME_TYPE="$1"
|
|
232
|
-
FRAME_NAME="$2"
|
|
233
|
-
|
|
234
|
-
# Only run on task-like frames
|
|
235
|
-
case "$FRAME_TYPE" in
|
|
236
|
-
task|implementation|bugfix|feature)
|
|
237
|
-
echo "📋 Frame closed: $FRAME_NAME"
|
|
238
|
-
echo "🔍 Running post-task quality gates..."
|
|
239
|
-
|
|
240
|
-
if command -v stackmemory >/dev/null 2>&1 && [ -f ".stackmemory/config.json" ]; then
|
|
241
|
-
# Update activity
|
|
242
|
-
stackmemory monitor --activity 2>/dev/null
|
|
243
|
-
|
|
244
|
-
# Run quality gates
|
|
245
|
-
if jq -e '.qualityGates.runTests or .qualityGates.runCodeReview' .stackmemory/config.json >/dev/null 2>&1; then
|
|
246
|
-
stackmemory quality --run
|
|
247
|
-
fi
|
|
248
|
-
fi
|
|
249
|
-
;;
|
|
250
|
-
esac
|
|
251
|
-
EOF
|
|
252
|
-
chmod +x "$CLAUDE_HOOKS_DIR/on-frame-close"
|
|
253
|
-
|
|
254
|
-
echo "✅ Enhanced Claude Code hooks installed"
|
|
255
|
-
echo ""
|
|
256
|
-
|
|
257
|
-
# Enable quality gates
|
|
258
|
-
echo "🔧 Enabling quality gates..."
|
|
259
|
-
stackmemory quality --enable 2>&1 || echo "⚠️ Quality gates will be available after next build"
|
|
260
|
-
|
|
261
|
-
echo ""
|
|
262
|
-
echo "✅ Post-Task Quality Gates Setup Complete!"
|
|
263
|
-
echo ""
|
|
264
|
-
echo "📋 What's been configured:"
|
|
265
|
-
echo " • Auto-run tests after task completion"
|
|
266
|
-
echo " • Auto-run linter on file saves"
|
|
267
|
-
echo " • Auto-trigger code review for significant changes"
|
|
268
|
-
echo " • Quality gate monitoring on frame closure"
|
|
269
|
-
echo " • Comprehensive change detection"
|
|
270
|
-
echo ""
|
|
271
|
-
echo "🪝 Installed hooks:"
|
|
272
|
-
echo " ~/.claude/hooks/on-task-complete # Main quality gate runner"
|
|
273
|
-
echo " ~/.claude/hooks/on-file-save # Linter on save"
|
|
274
|
-
echo " ~/.claude/hooks/on-code-change # Change detection"
|
|
275
|
-
echo " ~/.claude/hooks/on-frame-close # Frame completion trigger"
|
|
276
|
-
echo ""
|
|
277
|
-
echo "📝 Available commands:"
|
|
278
|
-
echo " stackmemory quality --status # Check quality gate status"
|
|
279
|
-
echo " stackmemory quality --run # Run quality gates manually"
|
|
280
|
-
echo " stackmemory quality --config # Configure quality gates"
|
|
281
|
-
echo " stackmemory quality --history # View quality gate history"
|
|
282
|
-
echo ""
|
|
283
|
-
echo "🎯 Next steps:"
|
|
284
|
-
echo " 1. Quality gates will run automatically after Claude tasks"
|
|
285
|
-
echo " 2. Check results with: stackmemory quality --status"
|
|
286
|
-
echo " 3. Configure with: stackmemory quality --config"
|
|
287
|
-
echo ""
|
|
288
|
-
echo "💡 Tip: Quality gates help maintain code quality automatically!"
|
|
289
|
-
echo " They run tests, linting, and code review after each task."
|
|
@@ -1,420 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
# StackMemory Git Hooks Installer
|
|
3
|
-
# Installs and manages StackMemory git hooks for automated workflow
|
|
4
|
-
|
|
5
|
-
set -e
|
|
6
|
-
|
|
7
|
-
# Colors for output
|
|
8
|
-
RED='\033[0;31m'
|
|
9
|
-
GREEN='\033[0;32m'
|
|
10
|
-
YELLOW='\033[1;33m'
|
|
11
|
-
BLUE='\033[0;34m'
|
|
12
|
-
NC='\033[0m' # No Color
|
|
13
|
-
|
|
14
|
-
log_info() {
|
|
15
|
-
echo -e "${BLUE}ℹ️ $1${NC}"
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
log_success() {
|
|
19
|
-
echo -e "${GREEN}✅ $1${NC}"
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
log_warning() {
|
|
23
|
-
echo -e "${YELLOW}⚠️ $1${NC}"
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
log_error() {
|
|
27
|
-
echo -e "${RED}❌ $1${NC}"
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
# Configuration
|
|
31
|
-
BACKUP_EXISTING_HOOKS=true
|
|
32
|
-
FORCE_INSTALL=false
|
|
33
|
-
INSTALL_ALL_HOOKS=true
|
|
34
|
-
HOOK_PREFIX="stackmemory"
|
|
35
|
-
|
|
36
|
-
# Script directory
|
|
37
|
-
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
38
|
-
HOOKS_SOURCE_DIR="$SCRIPT_DIR/git-hooks"
|
|
39
|
-
REPO_ROOT="$(git rev-parse --show-toplevel 2>/dev/null || echo "$PWD")"
|
|
40
|
-
HOOKS_DIR="$REPO_ROOT/.git/hooks"
|
|
41
|
-
|
|
42
|
-
# Help function
|
|
43
|
-
show_help() {
|
|
44
|
-
cat << EOF
|
|
45
|
-
StackMemory Git Hooks Installer
|
|
46
|
-
|
|
47
|
-
Usage: $0 [OPTIONS] [COMMAND]
|
|
48
|
-
|
|
49
|
-
COMMANDS:
|
|
50
|
-
install Install StackMemory git hooks (default)
|
|
51
|
-
uninstall Remove StackMemory git hooks
|
|
52
|
-
status Show hook installation status
|
|
53
|
-
backup Backup existing hooks
|
|
54
|
-
restore Restore backed up hooks
|
|
55
|
-
|
|
56
|
-
OPTIONS:
|
|
57
|
-
-f, --force Force installation (overwrite existing hooks)
|
|
58
|
-
-n, --no-backup Don't backup existing hooks
|
|
59
|
-
-s, --selective Install only specific hooks (interactive)
|
|
60
|
-
-h, --help Show this help message
|
|
61
|
-
|
|
62
|
-
EXAMPLES:
|
|
63
|
-
$0 # Install all hooks with backup
|
|
64
|
-
$0 install --force # Force install, overwrite existing
|
|
65
|
-
$0 --selective # Choose which hooks to install
|
|
66
|
-
$0 uninstall # Remove StackMemory hooks
|
|
67
|
-
$0 status # Check installation status
|
|
68
|
-
|
|
69
|
-
EOF
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
# Check if we're in a git repository
|
|
73
|
-
check_git_repo() {
|
|
74
|
-
if [ ! -d ".git" ] && ! git rev-parse --git-dir >/dev/null 2>&1; then
|
|
75
|
-
log_error "Not in a git repository. Please run this from the project root."
|
|
76
|
-
exit 1
|
|
77
|
-
fi
|
|
78
|
-
|
|
79
|
-
if [ ! -d "$HOOKS_DIR" ]; then
|
|
80
|
-
log_error "Git hooks directory not found: $HOOKS_DIR"
|
|
81
|
-
exit 1
|
|
82
|
-
fi
|
|
83
|
-
|
|
84
|
-
return 0
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
# Check if StackMemory is available
|
|
88
|
-
check_stackmemory() {
|
|
89
|
-
if ! command -v stackmemory >/dev/null 2>&1; then
|
|
90
|
-
log_warning "StackMemory CLI not found. Hooks will be installed but may not function until StackMemory is installed."
|
|
91
|
-
log_info "Install StackMemory with: npm install -g @stackmemoryai/stackmemory"
|
|
92
|
-
return 1
|
|
93
|
-
fi
|
|
94
|
-
|
|
95
|
-
if [ ! -d ".stackmemory" ]; then
|
|
96
|
-
log_warning "StackMemory not initialized in this repo. Run 'stackmemory init' after installation."
|
|
97
|
-
return 1
|
|
98
|
-
fi
|
|
99
|
-
|
|
100
|
-
return 0
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
# Backup existing hook
|
|
104
|
-
backup_hook() {
|
|
105
|
-
local hook_name="$1"
|
|
106
|
-
local hook_file="$HOOKS_DIR/$hook_name"
|
|
107
|
-
local backup_file="$hook_file.backup-$(date +%Y%m%d-%H%M%S)"
|
|
108
|
-
|
|
109
|
-
if [ -f "$hook_file" ] && [ "$BACKUP_EXISTING_HOOKS" = "true" ]; then
|
|
110
|
-
cp "$hook_file" "$backup_file"
|
|
111
|
-
log_info "Backed up existing $hook_name to $(basename "$backup_file")"
|
|
112
|
-
return 0
|
|
113
|
-
fi
|
|
114
|
-
|
|
115
|
-
return 1
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
# Install a single hook
|
|
119
|
-
install_hook() {
|
|
120
|
-
local hook_name="$1"
|
|
121
|
-
local source_file="$HOOKS_SOURCE_DIR/${hook_name}-${HOOK_PREFIX}.sh"
|
|
122
|
-
local target_file="$HOOKS_DIR/$hook_name"
|
|
123
|
-
|
|
124
|
-
if [ ! -f "$source_file" ]; then
|
|
125
|
-
log_warning "Source hook not found: $source_file"
|
|
126
|
-
return 1
|
|
127
|
-
fi
|
|
128
|
-
|
|
129
|
-
# Check if hook already exists
|
|
130
|
-
if [ -f "$target_file" ] && [ "$FORCE_INSTALL" != "true" ]; then
|
|
131
|
-
log_warning "Hook already exists: $hook_name"
|
|
132
|
-
log_info "Use --force to overwrite or run uninstall first"
|
|
133
|
-
return 1
|
|
134
|
-
fi
|
|
135
|
-
|
|
136
|
-
# Backup existing hook
|
|
137
|
-
backup_hook "$hook_name"
|
|
138
|
-
|
|
139
|
-
# Install the hook
|
|
140
|
-
cp "$source_file" "$target_file"
|
|
141
|
-
chmod +x "$target_file"
|
|
142
|
-
|
|
143
|
-
log_success "Installed $hook_name hook"
|
|
144
|
-
return 0
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
# Install wrapper hook (combines existing with StackMemory)
|
|
148
|
-
install_wrapper_hook() {
|
|
149
|
-
local hook_name="$1"
|
|
150
|
-
local source_file="$HOOKS_SOURCE_DIR/${hook_name}-${HOOK_PREFIX}.sh"
|
|
151
|
-
local target_file="$HOOKS_DIR/$hook_name"
|
|
152
|
-
local existing_backup=""
|
|
153
|
-
|
|
154
|
-
if [ ! -f "$source_file" ]; then
|
|
155
|
-
log_warning "Source hook not found: $source_file"
|
|
156
|
-
return 1
|
|
157
|
-
fi
|
|
158
|
-
|
|
159
|
-
# If hook exists, create wrapper that calls both
|
|
160
|
-
if [ -f "$target_file" ] && [ "$FORCE_INSTALL" != "true" ]; then
|
|
161
|
-
# Create wrapper hook
|
|
162
|
-
existing_backup="$target_file.original"
|
|
163
|
-
|
|
164
|
-
if [ ! -f "$existing_backup" ]; then
|
|
165
|
-
cp "$target_file" "$existing_backup"
|
|
166
|
-
log_info "Preserved existing $hook_name as ${hook_name}.original"
|
|
167
|
-
fi
|
|
168
|
-
|
|
169
|
-
# Create wrapper
|
|
170
|
-
cat > "$target_file" << EOF
|
|
171
|
-
#!/bin/bash
|
|
172
|
-
# StackMemory Git Hook Wrapper
|
|
173
|
-
# This hook combines existing functionality with StackMemory integration
|
|
174
|
-
|
|
175
|
-
# Run original hook if it exists
|
|
176
|
-
if [ -f ".git/hooks/${hook_name}.original" ]; then
|
|
177
|
-
.git/hooks/${hook_name}.original "\$@"
|
|
178
|
-
original_exit_code=\$?
|
|
179
|
-
if [ \$original_exit_code -ne 0 ]; then
|
|
180
|
-
exit \$original_exit_code
|
|
181
|
-
fi
|
|
182
|
-
fi
|
|
183
|
-
|
|
184
|
-
# Run StackMemory hook
|
|
185
|
-
if [ -f "$source_file" ]; then
|
|
186
|
-
"$source_file" "\$@"
|
|
187
|
-
else
|
|
188
|
-
echo "⚠️ StackMemory hook not found: $source_file"
|
|
189
|
-
exit 0
|
|
190
|
-
fi
|
|
191
|
-
EOF
|
|
192
|
-
|
|
193
|
-
chmod +x "$target_file"
|
|
194
|
-
log_success "Created wrapper for $hook_name (preserves existing functionality)"
|
|
195
|
-
else
|
|
196
|
-
# Direct installation
|
|
197
|
-
backup_hook "$hook_name"
|
|
198
|
-
cp "$source_file" "$target_file"
|
|
199
|
-
chmod +x "$target_file"
|
|
200
|
-
log_success "Installed $hook_name hook"
|
|
201
|
-
fi
|
|
202
|
-
|
|
203
|
-
return 0
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
# Install all hooks
|
|
207
|
-
install_all_hooks() {
|
|
208
|
-
log_info "Installing StackMemory git hooks..."
|
|
209
|
-
|
|
210
|
-
local hooks_installed=0
|
|
211
|
-
local hooks_failed=0
|
|
212
|
-
|
|
213
|
-
# List of hooks to install
|
|
214
|
-
local hooks=("pre-commit" "post-commit" "post-checkout")
|
|
215
|
-
|
|
216
|
-
for hook in "${hooks[@]}"; do
|
|
217
|
-
log_info "Installing $hook hook..."
|
|
218
|
-
|
|
219
|
-
if install_wrapper_hook "$hook"; then
|
|
220
|
-
hooks_installed=$((hooks_installed + 1))
|
|
221
|
-
else
|
|
222
|
-
hooks_failed=$((hooks_failed + 1))
|
|
223
|
-
fi
|
|
224
|
-
done
|
|
225
|
-
|
|
226
|
-
log_info "Hook installation summary:"
|
|
227
|
-
log_success "$hooks_installed hooks installed successfully"
|
|
228
|
-
|
|
229
|
-
if [ $hooks_failed -gt 0 ]; then
|
|
230
|
-
log_warning "$hooks_failed hooks failed to install"
|
|
231
|
-
fi
|
|
232
|
-
|
|
233
|
-
return 0
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
# Selective hook installation
|
|
237
|
-
install_selective_hooks() {
|
|
238
|
-
log_info "Selective hook installation - choose which hooks to install:"
|
|
239
|
-
|
|
240
|
-
local hooks=("pre-commit" "post-commit" "post-checkout")
|
|
241
|
-
local selected_hooks=()
|
|
242
|
-
|
|
243
|
-
for hook in "${hooks[@]}"; do
|
|
244
|
-
echo -n "Install $hook hook? [y/N]: "
|
|
245
|
-
read -r response
|
|
246
|
-
|
|
247
|
-
if [[ "$response" =~ ^[Yy]$ ]]; then
|
|
248
|
-
selected_hooks+=("$hook")
|
|
249
|
-
fi
|
|
250
|
-
done
|
|
251
|
-
|
|
252
|
-
if [ ${#selected_hooks[@]} -eq 0 ]; then
|
|
253
|
-
log_info "No hooks selected for installation"
|
|
254
|
-
return 0
|
|
255
|
-
fi
|
|
256
|
-
|
|
257
|
-
log_info "Installing selected hooks: ${selected_hooks[*]}"
|
|
258
|
-
|
|
259
|
-
for hook in "${selected_hooks[@]}"; do
|
|
260
|
-
install_wrapper_hook "$hook"
|
|
261
|
-
done
|
|
262
|
-
|
|
263
|
-
return 0
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
# Uninstall hooks
|
|
267
|
-
uninstall_hooks() {
|
|
268
|
-
log_info "Uninstalling StackMemory git hooks..."
|
|
269
|
-
|
|
270
|
-
local hooks=("pre-commit" "post-commit" "post-checkout")
|
|
271
|
-
local hooks_removed=0
|
|
272
|
-
|
|
273
|
-
for hook in "${hooks[@]}"; do
|
|
274
|
-
local hook_file="$HOOKS_DIR/$hook"
|
|
275
|
-
local original_file="$HOOKS_DIR/$hook.original"
|
|
276
|
-
|
|
277
|
-
if [ -f "$hook_file" ]; then
|
|
278
|
-
# Check if it's a StackMemory hook
|
|
279
|
-
if grep -q "StackMemory" "$hook_file" 2>/dev/null; then
|
|
280
|
-
# Restore original if exists
|
|
281
|
-
if [ -f "$original_file" ]; then
|
|
282
|
-
mv "$original_file" "$hook_file"
|
|
283
|
-
log_success "Restored original $hook hook"
|
|
284
|
-
else
|
|
285
|
-
rm -f "$hook_file"
|
|
286
|
-
log_success "Removed $hook hook"
|
|
287
|
-
fi
|
|
288
|
-
hooks_removed=$((hooks_removed + 1))
|
|
289
|
-
else
|
|
290
|
-
log_info "$hook hook exists but is not from StackMemory"
|
|
291
|
-
fi
|
|
292
|
-
fi
|
|
293
|
-
done
|
|
294
|
-
|
|
295
|
-
if [ $hooks_removed -eq 0 ]; then
|
|
296
|
-
log_info "No StackMemory hooks found to remove"
|
|
297
|
-
else
|
|
298
|
-
log_success "Removed $hooks_removed StackMemory hooks"
|
|
299
|
-
fi
|
|
300
|
-
|
|
301
|
-
return 0
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
# Show installation status
|
|
305
|
-
show_status() {
|
|
306
|
-
log_info "StackMemory Git Hooks Status:"
|
|
307
|
-
echo ""
|
|
308
|
-
|
|
309
|
-
local hooks=("pre-commit" "post-commit" "post-checkout")
|
|
310
|
-
|
|
311
|
-
for hook in "${hooks[@]}"; do
|
|
312
|
-
local hook_file="$HOOKS_DIR/$hook"
|
|
313
|
-
local original_file="$HOOKS_DIR/$hook.original"
|
|
314
|
-
|
|
315
|
-
printf "%-15s " "$hook:"
|
|
316
|
-
|
|
317
|
-
if [ -f "$hook_file" ]; then
|
|
318
|
-
if grep -q "StackMemory" "$hook_file" 2>/dev/null; then
|
|
319
|
-
echo -e "${GREEN}✅ Installed${NC}"
|
|
320
|
-
|
|
321
|
-
if [ -f "$original_file" ]; then
|
|
322
|
-
echo " (with original preserved)"
|
|
323
|
-
fi
|
|
324
|
-
else
|
|
325
|
-
echo -e "${YELLOW}⚠️ Exists (not StackMemory)${NC}"
|
|
326
|
-
fi
|
|
327
|
-
else
|
|
328
|
-
echo -e "${RED}❌ Not installed${NC}"
|
|
329
|
-
fi
|
|
330
|
-
done
|
|
331
|
-
|
|
332
|
-
echo ""
|
|
333
|
-
|
|
334
|
-
# Check StackMemory availability
|
|
335
|
-
echo "StackMemory CLI:"
|
|
336
|
-
if command -v stackmemory >/dev/null 2>&1; then
|
|
337
|
-
echo -e " ${GREEN}✅ Available${NC} ($(stackmemory --version 2>/dev/null || echo "unknown version"))"
|
|
338
|
-
else
|
|
339
|
-
echo -e " ${RED}❌ Not found${NC}"
|
|
340
|
-
fi
|
|
341
|
-
|
|
342
|
-
echo "StackMemory Init:"
|
|
343
|
-
if [ -d ".stackmemory" ]; then
|
|
344
|
-
echo -e " ${GREEN}✅ Initialized${NC}"
|
|
345
|
-
else
|
|
346
|
-
echo -e " ${YELLOW}⚠️ Not initialized${NC}"
|
|
347
|
-
fi
|
|
348
|
-
|
|
349
|
-
return 0
|
|
350
|
-
}
|
|
351
|
-
|
|
352
|
-
# Main execution
|
|
353
|
-
main() {
|
|
354
|
-
local command="install"
|
|
355
|
-
local selective=false
|
|
356
|
-
|
|
357
|
-
# Parse arguments
|
|
358
|
-
while [[ $# -gt 0 ]]; do
|
|
359
|
-
case $1 in
|
|
360
|
-
install|uninstall|status|backup|restore)
|
|
361
|
-
command="$1"
|
|
362
|
-
shift
|
|
363
|
-
;;
|
|
364
|
-
-f|--force)
|
|
365
|
-
FORCE_INSTALL=true
|
|
366
|
-
shift
|
|
367
|
-
;;
|
|
368
|
-
-n|--no-backup)
|
|
369
|
-
BACKUP_EXISTING_HOOKS=false
|
|
370
|
-
shift
|
|
371
|
-
;;
|
|
372
|
-
-s|--selective)
|
|
373
|
-
selective=true
|
|
374
|
-
shift
|
|
375
|
-
;;
|
|
376
|
-
-h|--help)
|
|
377
|
-
show_help
|
|
378
|
-
exit 0
|
|
379
|
-
;;
|
|
380
|
-
*)
|
|
381
|
-
log_error "Unknown option: $1"
|
|
382
|
-
show_help
|
|
383
|
-
exit 1
|
|
384
|
-
;;
|
|
385
|
-
esac
|
|
386
|
-
done
|
|
387
|
-
|
|
388
|
-
# Check prerequisites
|
|
389
|
-
check_git_repo
|
|
390
|
-
check_stackmemory
|
|
391
|
-
|
|
392
|
-
# Execute command
|
|
393
|
-
case "$command" in
|
|
394
|
-
"install")
|
|
395
|
-
if [ "$selective" = "true" ]; then
|
|
396
|
-
install_selective_hooks
|
|
397
|
-
else
|
|
398
|
-
install_all_hooks
|
|
399
|
-
fi
|
|
400
|
-
show_status
|
|
401
|
-
;;
|
|
402
|
-
"uninstall")
|
|
403
|
-
uninstall_hooks
|
|
404
|
-
;;
|
|
405
|
-
"status")
|
|
406
|
-
show_status
|
|
407
|
-
;;
|
|
408
|
-
*)
|
|
409
|
-
log_error "Unknown command: $command"
|
|
410
|
-
show_help
|
|
411
|
-
exit 1
|
|
412
|
-
;;
|
|
413
|
-
esac
|
|
414
|
-
|
|
415
|
-
log_info "For more information, see: scripts/git-hooks/README.md"
|
|
416
|
-
return 0
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
# Run main function
|
|
420
|
-
main "$@"
|