fivocell 4.3.1 → 4.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +45 -23
- package/bin/cell.js +1 -1
- package/dist/__tests__/agents-md.test.js +1 -1
- package/dist/__tests__/agents-md.test.js.map +1 -1
- package/dist/__tests__/antigravity-rich-format.test.js +2 -2
- package/dist/__tests__/antigravity-rich-format.test.js.map +1 -1
- package/dist/__tests__/atcell-live-fallback.test.js +2 -2
- package/dist/__tests__/atcell-live-fallback.test.js.map +1 -1
- package/dist/__tests__/autostart.test.d.ts +2 -0
- package/dist/__tests__/autostart.test.d.ts.map +1 -0
- package/dist/__tests__/autostart.test.js +47 -0
- package/dist/__tests__/autostart.test.js.map +1 -0
- package/dist/__tests__/behavior-intelligence-bug.test.js +1 -1
- package/dist/__tests__/behavior-intelligence-bug.test.js.map +1 -1
- package/dist/__tests__/branch-context.test.d.ts +2 -0
- package/dist/__tests__/branch-context.test.d.ts.map +1 -0
- package/dist/__tests__/branch-context.test.js +215 -0
- package/dist/__tests__/branch-context.test.js.map +1 -0
- package/dist/__tests__/cell-state-setup.test.d.ts +2 -0
- package/dist/__tests__/cell-state-setup.test.d.ts.map +1 -0
- package/dist/__tests__/cell-state-setup.test.js +190 -0
- package/dist/__tests__/cell-state-setup.test.js.map +1 -0
- package/dist/__tests__/cli-regression.test.d.ts +2 -0
- package/dist/__tests__/cli-regression.test.d.ts.map +1 -0
- package/dist/__tests__/cli-regression.test.js +105 -0
- package/dist/__tests__/cli-regression.test.js.map +1 -0
- package/dist/__tests__/cli-smoke.test.d.ts +2 -0
- package/dist/__tests__/cli-smoke.test.d.ts.map +1 -0
- package/dist/__tests__/cli-smoke.test.js +79 -0
- package/dist/__tests__/cli-smoke.test.js.map +1 -0
- package/dist/__tests__/code-scanner-blindspot.test.js +1 -1
- package/dist/__tests__/code-scanner-blindspot.test.js.map +1 -1
- package/dist/__tests__/code-scanner-error-recovery.test.js +1 -1
- package/dist/__tests__/code-scanner-error-recovery.test.js.map +1 -1
- package/dist/__tests__/code-scanner-sql-fix.test.js +1 -1
- package/dist/__tests__/code-scanner-sql-fix.test.js.map +1 -1
- package/dist/__tests__/community-store.test.js +20 -20
- package/dist/__tests__/community-store.test.js.map +1 -1
- package/dist/__tests__/cross-memory-continue.test.d.ts +8 -0
- package/dist/__tests__/cross-memory-continue.test.d.ts.map +1 -0
- package/dist/__tests__/cross-memory-continue.test.js +179 -0
- package/dist/__tests__/cross-memory-continue.test.js.map +1 -0
- package/dist/__tests__/cross-memory-editor-monitor.test.d.ts +6 -0
- package/dist/__tests__/cross-memory-editor-monitor.test.d.ts.map +1 -0
- package/dist/__tests__/cross-memory-editor-monitor.test.js +109 -0
- package/dist/__tests__/cross-memory-editor-monitor.test.js.map +1 -0
- package/dist/__tests__/cross-memory-event-capture.test.d.ts +2 -0
- package/dist/__tests__/cross-memory-event-capture.test.d.ts.map +1 -0
- package/dist/__tests__/cross-memory-event-capture.test.js +530 -0
- package/dist/__tests__/cross-memory-event-capture.test.js.map +1 -0
- package/dist/__tests__/cross-memory-replay.test.d.ts +2 -0
- package/dist/__tests__/cross-memory-replay.test.d.ts.map +1 -0
- package/dist/__tests__/cross-memory-replay.test.js +362 -0
- package/dist/__tests__/cross-memory-replay.test.js.map +1 -0
- package/dist/__tests__/cross-memory-socket-bridge.test.d.ts +9 -0
- package/dist/__tests__/cross-memory-socket-bridge.test.d.ts.map +1 -0
- package/dist/__tests__/cross-memory-socket-bridge.test.js +633 -0
- package/dist/__tests__/cross-memory-socket-bridge.test.js.map +1 -0
- package/dist/__tests__/enhanced-blind-spots.test.js +89 -1
- package/dist/__tests__/enhanced-blind-spots.test.js.map +1 -1
- package/dist/__tests__/failure-memory.test.d.ts +2 -0
- package/dist/__tests__/failure-memory.test.d.ts.map +1 -0
- package/dist/__tests__/failure-memory.test.js +108 -0
- package/dist/__tests__/failure-memory.test.js.map +1 -0
- package/dist/__tests__/journey-memory.test.d.ts +2 -0
- package/dist/__tests__/journey-memory.test.d.ts.map +1 -0
- package/dist/__tests__/journey-memory.test.js +141 -0
- package/dist/__tests__/journey-memory.test.js.map +1 -0
- package/dist/__tests__/knowledge-graph-store.test.js +3 -3
- package/dist/__tests__/knowledge-graph-store.test.js.map +1 -1
- package/dist/__tests__/live-watcher.test.js +65 -24
- package/dist/__tests__/live-watcher.test.js.map +1 -1
- package/dist/__tests__/mcp-cell-tools.test.js +2 -2
- package/dist/__tests__/mcp-cell-tools.test.js.map +1 -1
- package/dist/__tests__/multi-project.test.js +1 -1
- package/dist/__tests__/multi-project.test.js.map +1 -1
- package/dist/__tests__/pc-scanner-paths.test.js +1 -1
- package/dist/__tests__/pc-scanner-paths.test.js.map +1 -1
- package/dist/__tests__/prelaunch-reality-check.test.js +27 -27
- package/dist/__tests__/prelaunch-reality-check.test.js.map +1 -1
- package/dist/__tests__/project-name-override.test.js +2 -2
- package/dist/__tests__/project-name-override.test.js.map +1 -1
- package/dist/__tests__/prompt-builder-realdata.test.js +90 -2
- package/dist/__tests__/prompt-builder-realdata.test.js.map +1 -1
- package/dist/__tests__/prompt-builder-sessions.test.js +2 -2
- package/dist/__tests__/prompt-builder-sessions.test.js.map +1 -1
- package/dist/__tests__/repl.test.js +3 -3
- package/dist/__tests__/repl.test.js.map +1 -1
- package/dist/__tests__/security.test.js +19 -19
- package/dist/__tests__/security.test.js.map +1 -1
- package/dist/__tests__/session-bridge.test.js +2 -2
- package/dist/__tests__/session-bridge.test.js.map +1 -1
- package/dist/__tests__/session-memory-tables.test.js +2 -2
- package/dist/__tests__/session-memory-tables.test.js.map +1 -1
- package/dist/__tests__/setup.test.js +1 -1
- package/dist/__tests__/setup.test.js.map +1 -1
- package/dist/__tests__/staleness-detection.test.js +3 -3
- package/dist/__tests__/staleness-detection.test.js.map +1 -1
- package/dist/__tests__/team-collaboration.test.js +10 -10
- package/dist/__tests__/team-collaboration.test.js.map +1 -1
- package/dist/__tests__/tool-specific-format.test.js +2 -2
- package/dist/__tests__/tool-specific-format.test.js.map +1 -1
- package/dist/__tests__/usage-intelligence-store.test.js +23 -23
- package/dist/__tests__/usage-intelligence-store.test.js.map +1 -1
- package/dist/__tests__/watch-cli.test.js +1 -1
- package/dist/__tests__/watch-cli.test.js.map +1 -1
- package/dist/core/__tests__/ab-test-framework.test.js +1 -1
- package/dist/core/__tests__/ab-test-framework.test.js.map +1 -1
- package/dist/core/__tests__/ai-memory.test.js +1 -1
- package/dist/core/__tests__/ai-memory.test.js.map +1 -1
- package/dist/core/__tests__/ast-differ.test.d.ts +2 -0
- package/dist/core/__tests__/ast-differ.test.d.ts.map +1 -0
- package/dist/core/__tests__/ast-differ.test.js +68 -0
- package/dist/core/__tests__/ast-differ.test.js.map +1 -0
- package/dist/core/__tests__/build-failure-predictor.test.js +1 -1
- package/dist/core/__tests__/build-failure-predictor.test.js.map +1 -1
- package/dist/core/__tests__/chapter3-verify.test.js +3 -3
- package/dist/core/__tests__/chapter3-verify.test.js.map +1 -1
- package/dist/core/__tests__/chapter4-hostile.test.js +2 -2
- package/dist/core/__tests__/chapter4-hostile.test.js.map +1 -1
- package/dist/core/__tests__/chapter4-verify.test.js +3 -3
- package/dist/core/__tests__/chapter4-verify.test.js.map +1 -1
- package/dist/core/__tests__/community-full.test.js +1 -1
- package/dist/core/__tests__/community-full.test.js.map +1 -1
- package/dist/core/__tests__/community-live.test.js +1 -1
- package/dist/core/__tests__/community-live.test.js.map +1 -1
- package/dist/core/__tests__/config-attribution.test.js +1 -1
- package/dist/core/__tests__/config-attribution.test.js.map +1 -1
- package/dist/core/__tests__/convention-detector.test.js +1 -1
- package/dist/core/__tests__/convention-detector.test.js.map +1 -1
- package/dist/core/__tests__/cost-optimizer.test.js +1 -1
- package/dist/core/__tests__/cost-optimizer.test.js.map +1 -1
- package/dist/core/__tests__/cross-domain-projections.test.js +1 -1
- package/dist/core/__tests__/cross-domain-projections.test.js.map +1 -1
- package/dist/core/__tests__/cross-project-sync.test.js +1 -1
- package/dist/core/__tests__/cross-project-sync.test.js.map +1 -1
- package/dist/core/__tests__/error-predictor.test.js +1 -1
- package/dist/core/__tests__/error-predictor.test.js.map +1 -1
- package/dist/core/__tests__/explainability.test.js +3 -3
- package/dist/core/__tests__/explainability.test.js.map +1 -1
- package/dist/core/__tests__/extraction-cascade.test.d.ts +2 -0
- package/dist/core/__tests__/extraction-cascade.test.d.ts.map +1 -0
- package/dist/core/__tests__/extraction-cascade.test.js +59 -0
- package/dist/core/__tests__/extraction-cascade.test.js.map +1 -0
- package/dist/core/__tests__/failure-memory.test.js +1 -1
- package/dist/core/__tests__/failure-memory.test.js.map +1 -1
- package/dist/core/__tests__/git-branch-pregenerator.test.js +1 -1
- package/dist/core/__tests__/git-branch-pregenerator.test.js.map +1 -1
- package/dist/core/__tests__/interruption-recovery.test.js +1 -1
- package/dist/core/__tests__/interruption-recovery.test.js.map +1 -1
- package/dist/core/__tests__/knowledge-graph.test.js +1 -1
- package/dist/core/__tests__/knowledge-graph.test.js.map +1 -1
- package/dist/core/__tests__/marketplace.test.js +1 -1
- package/dist/core/__tests__/marketplace.test.js.map +1 -1
- package/dist/core/__tests__/merge-conflict-predictor.test.js +1 -1
- package/dist/core/__tests__/merge-conflict-predictor.test.js.map +1 -1
- package/dist/core/__tests__/performance-predictor.test.js +1 -1
- package/dist/core/__tests__/performance-predictor.test.js.map +1 -1
- package/dist/core/__tests__/playbook-generator.test.js +1 -1
- package/dist/core/__tests__/playbook-generator.test.js.map +1 -1
- package/dist/core/__tests__/pr-review-assistant.test.js +1 -1
- package/dist/core/__tests__/pr-review-assistant.test.js.map +1 -1
- package/dist/core/__tests__/privacy-manager.test.js +1 -1
- package/dist/core/__tests__/privacy-manager.test.js.map +1 -1
- package/dist/core/__tests__/project-dna.test.js +1 -1
- package/dist/core/__tests__/project-dna.test.js.map +1 -1
- package/dist/core/__tests__/reputation.test.js +1 -1
- package/dist/core/__tests__/reputation.test.js.map +1 -1
- package/dist/core/__tests__/security-predictor.test.js +1 -1
- package/dist/core/__tests__/security-predictor.test.js.map +1 -1
- package/dist/core/__tests__/signal-capture.test.js +1 -1
- package/dist/core/__tests__/signal-capture.test.js.map +1 -1
- package/dist/core/__tests__/team-composer.test.js +1 -1
- package/dist/core/__tests__/team-composer.test.js.map +1 -1
- package/dist/core/__tests__/time-saved.test.js +1 -1
- package/dist/core/__tests__/time-saved.test.js.map +1 -1
- package/dist/core/__tests__/validation-run.test.js +1 -1
- package/dist/core/__tests__/validation-run.test.js.map +1 -1
- package/dist/core/__tests__/workflow-outcome-graph.test.js +1 -1
- package/dist/core/__tests__/workflow-outcome-graph.test.js.map +1 -1
- package/dist/core/architecture-engine.js +1 -1
- package/dist/core/architecture-engine.js.map +1 -1
- package/dist/core/backend-engine.js +1 -1
- package/dist/core/backend-engine.js.map +1 -1
- package/dist/core/cross-project-sync.d.ts +1 -1
- package/dist/core/cross-project-sync.d.ts.map +1 -1
- package/dist/core/enhanced-blind-spots.d.ts +8 -0
- package/dist/core/enhanced-blind-spots.d.ts.map +1 -1
- package/dist/core/enhanced-blind-spots.js +59 -0
- package/dist/core/enhanced-blind-spots.js.map +1 -1
- package/dist/core/extraction-cascade.d.ts +2 -2
- package/dist/core/extraction-cascade.d.ts.map +1 -1
- package/dist/core/extraction-cascade.js +2 -2
- package/dist/core/extraction-cascade.js.map +1 -1
- package/dist/core/frontend-engine.js +1 -1
- package/dist/core/frontend-engine.js.map +1 -1
- package/dist/core/learning-layer.d.ts +1 -1
- package/dist/core/learning-layer.d.ts.map +1 -1
- package/dist/core/naming-engine.js +1 -1
- package/dist/core/naming-engine.js.map +1 -1
- package/dist/core/productivity-engine.js +1 -1
- package/dist/core/productivity-engine.js.map +1 -1
- package/dist/core/project-registry.js +1 -1
- package/dist/core/project-registry.js.map +1 -1
- package/dist/core/search-engine.js +1 -1
- package/dist/core/search-engine.js.map +1 -1
- package/dist/core/similarity-engine.d.ts +1 -1
- package/dist/core/similarity-engine.d.ts.map +1 -1
- package/dist/core/structure-engine.js +1 -1
- package/dist/core/structure-engine.js.map +1 -1
- package/dist/core/syntax-engine.js +1 -1
- package/dist/core/syntax-engine.js.map +1 -1
- package/dist/core/team-advanced-engine.js +1 -1
- package/dist/core/team-advanced-engine.js.map +1 -1
- package/dist/core/team-composer.d.ts +1 -1
- package/dist/core/team-composer.d.ts.map +1 -1
- package/dist/core/team-engine.js +1 -1
- package/dist/core/team-engine.js.map +1 -1
- package/dist/index.d.ts +40 -46
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +33 -65
- package/dist/index.js.map +1 -1
- package/dist/validation/quick-run.js +1 -1
- package/dist/validation/quick-run.js.map +1 -1
- package/dist/walls/01-context/context/agents-md.d.ts.map +1 -0
- package/dist/walls/01-context/context/agents-md.js.map +1 -0
- package/dist/walls/01-context/context/ide-intelligence.d.ts.map +1 -0
- package/dist/{ide-intelligence.js → walls/01-context/context/ide-intelligence.js} +1 -1
- package/dist/walls/01-context/context/ide-intelligence.js.map +1 -0
- package/dist/walls/01-context/context/prompt-builder.d.ts.map +1 -0
- package/dist/{core → walls/01-context/context}/prompt-builder.js +27 -3
- package/dist/walls/01-context/context/prompt-builder.js.map +1 -0
- package/dist/walls/01-context/context/user-intelligence.d.ts.map +1 -0
- package/dist/walls/01-context/context/user-intelligence.js.map +1 -0
- package/dist/walls/01-context/sessions/event-capture.d.ts +126 -0
- package/dist/walls/01-context/sessions/event-capture.d.ts.map +1 -0
- package/dist/walls/01-context/sessions/event-capture.js +418 -0
- package/dist/walls/01-context/sessions/event-capture.js.map +1 -0
- package/dist/walls/01-context/sessions/interruption-recovery.d.ts.map +1 -0
- package/dist/walls/01-context/sessions/interruption-recovery.js.map +1 -0
- package/dist/walls/01-context/sessions/replay.d.ts +50 -0
- package/dist/walls/01-context/sessions/replay.d.ts.map +1 -0
- package/dist/walls/01-context/sessions/replay.js +426 -0
- package/dist/walls/01-context/sessions/replay.js.map +1 -0
- package/dist/walls/01-context/sessions/session-memory.d.ts.map +1 -0
- package/dist/{core → walls/01-context/sessions}/session-memory.js +2 -2
- package/dist/walls/01-context/sessions/session-memory.js.map +1 -0
- package/dist/walls/02-scanner/blindspots/code-scanner.d.ts.map +1 -0
- package/dist/{code-scanner.js → walls/02-scanner/blindspots/code-scanner.js} +15 -10
- package/dist/walls/02-scanner/blindspots/code-scanner.js.map +1 -0
- package/dist/{developer-intelligence.d.ts → walls/02-scanner/profile/developer-intelligence.d.ts} +3 -3
- package/dist/walls/02-scanner/profile/developer-intelligence.d.ts.map +1 -0
- package/dist/{developer-intelligence.js → walls/02-scanner/profile/developer-intelligence.js} +4 -4
- package/dist/walls/02-scanner/profile/developer-intelligence.js.map +1 -0
- package/dist/walls/02-scanner/stack/pc-scanner.d.ts.map +1 -0
- package/dist/{pc-scanner.js → walls/02-scanner/stack/pc-scanner.js} +1 -1
- package/dist/walls/02-scanner/stack/pc-scanner.js.map +1 -0
- package/dist/walls/02-scanner/stack/stack-detector.d.ts.map +1 -0
- package/dist/walls/02-scanner/stack/stack-detector.js.map +1 -0
- package/dist/walls/02-scanner/style/style-pull.d.ts.map +1 -0
- package/dist/walls/02-scanner/style/style-pull.js.map +1 -0
- package/dist/walls/03-knowledge/decisions/ab-test-framework.d.ts.map +1 -0
- package/dist/walls/03-knowledge/decisions/ab-test-framework.js.map +1 -0
- package/dist/walls/03-knowledge/decisions/ai-bridge.d.ts.map +1 -0
- package/dist/{ai-bridge.js → walls/03-knowledge/decisions/ai-bridge.js} +68 -68
- package/dist/walls/03-knowledge/decisions/ai-bridge.js.map +1 -0
- package/dist/{core → walls/03-knowledge/decisions}/ai-memory.d.ts +1 -1
- package/dist/walls/03-knowledge/decisions/ai-memory.d.ts.map +1 -0
- package/dist/{core → walls/03-knowledge/decisions}/ai-memory.js +1 -1
- package/dist/walls/03-knowledge/decisions/ai-memory.js.map +1 -0
- package/dist/walls/03-knowledge/decisions/behavior-intelligence.d.ts.map +1 -0
- package/dist/walls/03-knowledge/decisions/behavior-intelligence.js.map +1 -0
- package/dist/walls/03-knowledge/decisions/behavioral-tracker.d.ts.map +1 -0
- package/dist/{behavioral-tracker.js → walls/03-knowledge/decisions/behavioral-tracker.js} +80 -80
- package/dist/walls/03-knowledge/decisions/behavioral-tracker.js.map +1 -0
- package/dist/walls/03-knowledge/decisions/branch-snapshot.d.ts +20 -0
- package/dist/walls/03-knowledge/decisions/branch-snapshot.d.ts.map +1 -0
- package/dist/walls/03-knowledge/decisions/branch-snapshot.js +175 -0
- package/dist/walls/03-knowledge/decisions/branch-snapshot.js.map +1 -0
- package/dist/walls/03-knowledge/decisions/build-failure-predictor.d.ts.map +1 -0
- package/dist/walls/03-knowledge/decisions/build-failure-predictor.js.map +1 -0
- package/dist/walls/03-knowledge/decisions/cost-optimizer.d.ts.map +1 -0
- package/dist/{core → walls/03-knowledge/decisions}/cost-optimizer.js +1 -1
- package/dist/walls/03-knowledge/decisions/cost-optimizer.js.map +1 -0
- package/dist/walls/03-knowledge/decisions/cross-model-engine.d.ts.map +1 -0
- package/dist/{cross-model-engine.js → walls/03-knowledge/decisions/cross-model-engine.js} +23 -23
- package/dist/walls/03-knowledge/decisions/cross-model-engine.js.map +1 -0
- package/dist/walls/03-knowledge/decisions/cross-model-memory.d.ts.map +1 -0
- package/dist/{cross-model-memory.js → walls/03-knowledge/decisions/cross-model-memory.js} +1 -1
- package/dist/walls/03-knowledge/decisions/cross-model-memory.js.map +1 -0
- package/dist/walls/03-knowledge/decisions/developer-profile.d.ts +6 -0
- package/dist/walls/03-knowledge/decisions/developer-profile.d.ts.map +1 -0
- package/dist/walls/03-knowledge/decisions/developer-profile.js.map +1 -0
- package/dist/walls/03-knowledge/decisions/error-predictor.d.ts.map +1 -0
- package/dist/walls/03-knowledge/decisions/error-predictor.js.map +1 -0
- package/dist/{core → walls/03-knowledge/decisions}/failure-memory.d.ts +7 -6
- package/dist/walls/03-knowledge/decisions/failure-memory.d.ts.map +1 -0
- package/dist/walls/03-knowledge/decisions/failure-memory.js +288 -0
- package/dist/walls/03-knowledge/decisions/failure-memory.js.map +1 -0
- package/dist/walls/03-knowledge/decisions/focus-report.d.ts.map +1 -0
- package/dist/walls/03-knowledge/decisions/focus-report.js.map +1 -0
- package/dist/{core → walls/03-knowledge/decisions}/git-branch-pregenerator.d.ts +1 -1
- package/dist/walls/03-knowledge/decisions/git-branch-pregenerator.d.ts.map +1 -0
- package/dist/walls/03-knowledge/decisions/git-branch-pregenerator.js.map +1 -0
- package/dist/walls/03-knowledge/decisions/insight-generator.d.ts.map +1 -0
- package/dist/walls/03-knowledge/decisions/insight-generator.js.map +1 -0
- package/dist/walls/03-knowledge/decisions/journey-memory.d.ts.map +1 -0
- package/dist/walls/03-knowledge/decisions/journey-memory.js.map +1 -0
- package/dist/walls/03-knowledge/decisions/merge-conflict-predictor.d.ts.map +1 -0
- package/dist/walls/03-knowledge/decisions/merge-conflict-predictor.js.map +1 -0
- package/dist/walls/03-knowledge/decisions/model-intelligence.d.ts.map +1 -0
- package/dist/walls/03-knowledge/decisions/model-intelligence.js.map +1 -0
- package/dist/{core → walls/03-knowledge/decisions}/outcome-engine.d.ts +2 -2
- package/dist/walls/03-knowledge/decisions/outcome-engine.d.ts.map +1 -0
- package/dist/walls/03-knowledge/decisions/outcome-engine.js.map +1 -0
- package/dist/{core → walls/03-knowledge/decisions}/outcome-recorder.d.ts +1 -1
- package/dist/walls/03-knowledge/decisions/outcome-recorder.d.ts.map +1 -0
- package/dist/walls/03-knowledge/decisions/outcome-recorder.js.map +1 -0
- package/dist/walls/03-knowledge/decisions/performance-predictor.d.ts.map +1 -0
- package/dist/walls/03-knowledge/decisions/performance-predictor.js.map +1 -0
- package/dist/walls/03-knowledge/decisions/platt-calibration.d.ts.map +1 -0
- package/dist/walls/03-knowledge/decisions/platt-calibration.js.map +1 -0
- package/dist/walls/03-knowledge/decisions/predictive-engine.d.ts.map +1 -0
- package/dist/{predictive-engine.js → walls/03-knowledge/decisions/predictive-engine.js} +1 -1
- package/dist/walls/03-knowledge/decisions/predictive-engine.js.map +1 -0
- package/dist/walls/03-knowledge/decisions/predictive-intelligence.d.ts.map +1 -0
- package/dist/{predictive-intelligence.js → walls/03-knowledge/decisions/predictive-intelligence.js} +1 -1
- package/dist/walls/03-knowledge/decisions/predictive-intelligence.js.map +1 -0
- package/dist/walls/03-knowledge/decisions/realtime-guardian.d.ts.map +1 -0
- package/dist/walls/03-knowledge/decisions/realtime-guardian.js.map +1 -0
- package/dist/{core → walls/03-knowledge/decisions}/recommendation-engine.d.ts +5 -5
- package/dist/walls/03-knowledge/decisions/recommendation-engine.d.ts.map +1 -0
- package/dist/{core → walls/03-knowledge/decisions}/recommendation-engine.js +1 -1
- package/dist/walls/03-knowledge/decisions/recommendation-engine.js.map +1 -0
- package/dist/walls/03-knowledge/decisions/security-predictor.d.ts.map +1 -0
- package/dist/walls/03-knowledge/decisions/security-predictor.js.map +1 -0
- package/dist/walls/03-knowledge/decisions/time-saved.d.ts.map +1 -0
- package/dist/walls/03-knowledge/decisions/time-saved.js.map +1 -0
- package/dist/walls/03-knowledge/decisions/workflow-outcome-graph.d.ts.map +1 -0
- package/dist/walls/03-knowledge/decisions/workflow-outcome-graph.js.map +1 -0
- package/dist/{core → walls/03-knowledge/decisions}/workflow-tracker.d.ts +1 -1
- package/dist/walls/03-knowledge/decisions/workflow-tracker.d.ts.map +1 -0
- package/dist/walls/03-knowledge/decisions/workflow-tracker.js.map +1 -0
- package/dist/{core → walls/03-knowledge/dna}/config-attribution.d.ts +1 -1
- package/dist/walls/03-knowledge/dna/config-attribution.d.ts.map +1 -0
- package/dist/walls/03-knowledge/dna/config-attribution.js.map +1 -0
- package/dist/{core → walls/03-knowledge/dna}/convention-detector.d.ts +1 -1
- package/dist/walls/03-knowledge/dna/convention-detector.d.ts.map +1 -0
- package/dist/{core → walls/03-knowledge/dna}/convention-detector.js +1 -1
- package/dist/walls/03-knowledge/dna/convention-detector.js.map +1 -0
- package/dist/walls/03-knowledge/dna/cross-domain-projections.d.ts.map +1 -0
- package/dist/walls/03-knowledge/dna/cross-domain-projections.js.map +1 -0
- package/dist/walls/03-knowledge/dna/cross-language-mappings.d.ts.map +1 -0
- package/dist/walls/03-knowledge/dna/cross-language-mappings.js.map +1 -0
- package/dist/{core → walls/03-knowledge/dna}/explainability.d.ts +1 -1
- package/dist/walls/03-knowledge/dna/explainability.d.ts.map +1 -0
- package/dist/{core → walls/03-knowledge/dna}/explainability.js +2 -2
- package/dist/walls/03-knowledge/dna/explainability.js.map +1 -0
- package/dist/walls/03-knowledge/dna/personal-intelligence.d.ts.map +1 -0
- package/dist/{personal-intelligence.js → walls/03-knowledge/dna/personal-intelligence.js} +1 -1
- package/dist/walls/03-knowledge/dna/personal-intelligence.js.map +1 -0
- package/dist/{core → walls/03-knowledge/dna}/project-dna.d.ts +2 -2
- package/dist/walls/03-knowledge/dna/project-dna.d.ts.map +1 -0
- package/dist/{core → walls/03-knowledge/dna}/project-dna.js +1 -1
- package/dist/walls/03-knowledge/dna/project-dna.js.map +1 -0
- package/dist/walls/03-knowledge/dna/proof-engine.d.ts.map +1 -0
- package/dist/{core → walls/03-knowledge/dna}/proof-engine.js +1 -1
- package/dist/walls/03-knowledge/dna/proof-engine.js.map +1 -0
- package/dist/walls/03-knowledge/graph/knowledge-graph-builder.d.ts.map +1 -0
- package/dist/walls/03-knowledge/graph/knowledge-graph-builder.js.map +1 -0
- package/dist/walls/03-knowledge/graph/knowledge-graph-engine.d.ts.map +1 -0
- package/dist/{core → walls/03-knowledge/graph}/knowledge-graph-engine.js +1 -1
- package/dist/walls/03-knowledge/graph/knowledge-graph-engine.js.map +1 -0
- package/dist/walls/03-knowledge/graph/knowledge-graph.d.ts.map +1 -0
- package/dist/{core → walls/03-knowledge/graph}/knowledge-graph.js +1 -1
- package/dist/walls/03-knowledge/graph/knowledge-graph.js.map +1 -0
- package/dist/walls/04-team/collab/team-collaboration.d.ts.map +1 -0
- package/dist/{team-collaboration.js → walls/04-team/collab/team-collaboration.js} +1 -1
- package/dist/walls/04-team/collab/team-collaboration.js.map +1 -0
- package/dist/walls/04-team/collab/team-git.d.ts.map +1 -0
- package/dist/{team-git.js → walls/04-team/collab/team-git.js} +1 -1
- package/dist/walls/04-team/collab/team-git.js.map +1 -0
- package/dist/walls/04-team/collab/team-intel.d.ts.map +1 -0
- package/dist/walls/04-team/collab/team-intel.js.map +1 -0
- package/dist/{core → walls/04-team/review}/pr-review-assistant.d.ts +1 -1
- package/dist/walls/04-team/review/pr-review-assistant.d.ts.map +1 -0
- package/dist/walls/04-team/review/pr-review-assistant.js.map +1 -0
- package/dist/walls/05-community/privacy/privacy-manager.d.ts.map +1 -0
- package/dist/walls/05-community/privacy/privacy-manager.js.map +1 -0
- package/dist/walls/05-community/privacy/security.d.ts.map +1 -0
- package/dist/walls/05-community/privacy/security.js.map +1 -0
- package/dist/walls/05-community/share/identity-resolver.d.ts.map +1 -0
- package/dist/walls/05-community/share/identity-resolver.js.map +1 -0
- package/dist/walls/05-community/share/marketplace.d.ts.map +1 -0
- package/dist/walls/05-community/share/marketplace.js.map +1 -0
- package/dist/walls/05-community/share/reputation.d.ts.map +1 -0
- package/dist/walls/05-community/share/reputation.js.map +1 -0
- package/dist/{core → walls/05-community/share}/signal-capture.d.ts +1 -1
- package/dist/walls/05-community/share/signal-capture.d.ts.map +1 -0
- package/dist/{core → walls/05-community/share}/signal-capture.js +2 -2
- package/dist/walls/05-community/share/signal-capture.js.map +1 -0
- package/dist/walls/05-community/stats/community-advanced-engine.d.ts.map +1 -0
- package/dist/{core → walls/05-community/stats}/community-advanced-engine.js +1 -1
- package/dist/walls/05-community/stats/community-advanced-engine.js.map +1 -0
- package/dist/walls/05-community/stats/community-engine.d.ts.map +1 -0
- package/dist/{core → walls/05-community/stats}/community-engine.js +1 -1
- package/dist/walls/05-community/stats/community-engine.js.map +1 -0
- package/dist/{core → walls/05-community/stats}/community-full.d.ts +1 -1
- package/dist/walls/05-community/stats/community-full.d.ts.map +1 -0
- package/dist/walls/05-community/stats/community-full.js.map +1 -0
- package/dist/walls/05-community/stats/community-intel.d.ts.map +1 -0
- package/dist/{community-intel.js → walls/05-community/stats/community-intel.js} +1 -1
- package/dist/walls/05-community/stats/community-intel.js.map +1 -0
- package/dist/walls/05-community/stats/community-intelligence.d.ts.map +1 -0
- package/dist/walls/05-community/stats/community-intelligence.js.map +1 -0
- package/dist/walls/05-community/stats/community-live.d.ts.map +1 -0
- package/dist/walls/05-community/stats/community-live.js.map +1 -0
- package/dist/{core → walls/05-community/stats}/community-prior.d.ts +1 -1
- package/dist/walls/05-community/stats/community-prior.d.ts.map +1 -0
- package/dist/walls/05-community/stats/community-prior.js.map +1 -0
- package/dist/walls/05-community/stats/community-v2.d.ts.map +1 -0
- package/dist/{community-v2.js → walls/05-community/stats/community-v2.js} +1 -1
- package/dist/walls/05-community/stats/community-v2.js.map +1 -0
- package/dist/walls/05-community/stats/layers.d.ts.map +1 -0
- package/dist/walls/05-community/stats/layers.js.map +1 -0
- package/dist/{core → walls/05-community/stats}/playbook-generator.d.ts +1 -1
- package/dist/walls/05-community/stats/playbook-generator.d.ts.map +1 -0
- package/dist/walls/05-community/stats/playbook-generator.js.map +1 -0
- package/dist/walls/06-memory/database/database.d.ts.map +1 -0
- package/dist/{core → walls/06-memory/database}/database.js +37 -2
- package/dist/walls/06-memory/database/database.js.map +1 -0
- package/dist/walls/06-memory/database/logger.d.ts.map +1 -0
- package/dist/walls/06-memory/database/logger.js.map +1 -0
- package/dist/walls/06-memory/stores/cell-store.d.ts.map +1 -0
- package/dist/walls/06-memory/stores/cell-store.js.map +1 -0
- package/dist/walls/06-memory/stores/community-store.d.ts.map +1 -0
- package/dist/{core → walls/06-memory/stores}/community-store.js +1 -1
- package/dist/walls/06-memory/stores/community-store.js.map +1 -0
- package/dist/walls/06-memory/stores/decay-engine.d.ts.map +1 -0
- package/dist/walls/06-memory/stores/decay-engine.js.map +1 -0
- package/dist/{core → walls/06-memory/stores}/knowledge-graph-store.d.ts +1 -1
- package/dist/walls/06-memory/stores/knowledge-graph-store.d.ts.map +1 -0
- package/dist/{core → walls/06-memory/stores}/knowledge-graph-store.js +47 -47
- package/dist/walls/06-memory/stores/knowledge-graph-store.js.map +1 -0
- package/dist/walls/06-memory/stores/outcome-store.d.ts.map +1 -0
- package/dist/walls/06-memory/stores/outcome-store.js.map +1 -0
- package/dist/walls/06-memory/stores/outcome-types.d.ts.map +1 -0
- package/dist/walls/06-memory/stores/outcome-types.js.map +1 -0
- package/dist/{core → walls/06-memory/stores}/pattern-store.d.ts +4 -4
- package/dist/walls/06-memory/stores/pattern-store.d.ts.map +1 -0
- package/dist/{core → walls/06-memory/stores}/pattern-store.js +9 -9
- package/dist/walls/06-memory/stores/pattern-store.js.map +1 -0
- package/dist/walls/06-memory/stores/recommendation-store.d.ts.map +1 -0
- package/dist/walls/06-memory/stores/recommendation-store.js.map +1 -0
- package/dist/walls/06-memory/stores/recommendation-types.d.ts.map +1 -0
- package/dist/walls/06-memory/stores/recommendation-types.js.map +1 -0
- package/dist/walls/06-memory/stores/usage-intelligence-store.d.ts.map +1 -0
- package/dist/{core → walls/06-memory/stores}/usage-intelligence-store.js +1 -1
- package/dist/walls/06-memory/stores/usage-intelligence-store.js.map +1 -0
- package/dist/walls/07-runtime/cli/cli-repl.d.ts.map +1 -0
- package/dist/{cli-repl.js → walls/07-runtime/cli/cli-repl.js} +11 -0
- package/dist/walls/07-runtime/cli/cli-repl.js.map +1 -0
- package/dist/walls/07-runtime/cli/cli.d.ts.map +1 -0
- package/dist/{cli.js → walls/07-runtime/cli/cli.js} +1629 -74
- package/dist/walls/07-runtime/cli/cli.js.map +1 -0
- package/dist/walls/07-runtime/daemon/lifecycle.d.ts.map +1 -0
- package/dist/walls/07-runtime/daemon/lifecycle.js.map +1 -0
- package/dist/walls/07-runtime/daemon/server.d.ts +83 -0
- package/dist/walls/07-runtime/daemon/server.d.ts.map +1 -0
- package/dist/{daemon → walls/07-runtime/daemon}/server.js +221 -279
- package/dist/walls/07-runtime/daemon/server.js.map +1 -0
- package/dist/walls/07-runtime/daemon/watchdog.d.ts.map +1 -0
- package/dist/walls/07-runtime/daemon/watchdog.js.map +1 -0
- package/dist/walls/07-runtime/daemon/websocket.d.ts.map +1 -0
- package/dist/{daemon → walls/07-runtime/daemon}/websocket.js +1 -1
- package/dist/walls/07-runtime/daemon/websocket.js.map +1 -0
- package/dist/walls/07-runtime/setup/autostart.d.ts +19 -0
- package/dist/walls/07-runtime/setup/autostart.d.ts.map +1 -0
- package/dist/walls/07-runtime/setup/autostart.js +111 -0
- package/dist/walls/07-runtime/setup/autostart.js.map +1 -0
- package/dist/walls/07-runtime/setup/cell-state.d.ts +17 -0
- package/dist/walls/07-runtime/setup/cell-state.d.ts.map +1 -0
- package/dist/walls/07-runtime/setup/cell-state.js +94 -0
- package/dist/walls/07-runtime/setup/cell-state.js.map +1 -0
- package/dist/walls/07-runtime/setup/first-run.d.ts.map +1 -0
- package/dist/walls/07-runtime/setup/first-run.js.map +1 -0
- package/dist/walls/07-runtime/setup/production.d.ts.map +1 -0
- package/dist/{production.js → walls/07-runtime/setup/production.js} +2 -2
- package/dist/walls/07-runtime/setup/production.js.map +1 -0
- package/dist/walls/07-runtime/setup/setup.d.ts.map +1 -0
- package/dist/{core → walls/07-runtime/setup}/setup.js +5 -5
- package/dist/walls/07-runtime/setup/setup.js.map +1 -0
- package/dist/walls/07-runtime/watcher/editor-monitor.d.ts +93 -0
- package/dist/walls/07-runtime/watcher/editor-monitor.d.ts.map +1 -0
- package/dist/walls/07-runtime/watcher/editor-monitor.js +497 -0
- package/dist/walls/07-runtime/watcher/editor-monitor.js.map +1 -0
- package/dist/{core → walls/07-runtime/watcher}/live-watcher.d.ts +11 -1
- package/dist/walls/07-runtime/watcher/live-watcher.d.ts.map +1 -0
- package/dist/{core → walls/07-runtime/watcher}/live-watcher.js +88 -49
- package/dist/walls/07-runtime/watcher/live-watcher.js.map +1 -0
- package/dist/walls/07-runtime/watcher/socket-bridge.d.ts +139 -0
- package/dist/walls/07-runtime/watcher/socket-bridge.d.ts.map +1 -0
- package/dist/walls/07-runtime/watcher/socket-bridge.js +566 -0
- package/dist/walls/07-runtime/watcher/socket-bridge.js.map +1 -0
- package/dist/walls/07-runtime/watcher/watch-cli.d.ts.map +1 -0
- package/dist/walls/07-runtime/watcher/watch-cli.js.map +1 -0
- package/dist/walls/08-cloud-bridge/sync/ai-bridge.d.ts +20 -0
- package/dist/walls/08-cloud-bridge/sync/ai-bridge.d.ts.map +1 -0
- package/dist/walls/08-cloud-bridge/sync/ai-bridge.js +250 -0
- package/dist/walls/08-cloud-bridge/sync/ai-bridge.js.map +1 -0
- package/dist/walls/08-cloud-bridge/sync/cloud-client.d.ts.map +1 -0
- package/dist/{core → walls/08-cloud-bridge/sync}/cloud-client.js +1 -1
- package/dist/walls/08-cloud-bridge/sync/cloud-client.js.map +1 -0
- package/dist/walls/08-cloud-bridge/sync/cloud-sync.d.ts.map +1 -0
- package/dist/{cloud-sync.js → walls/08-cloud-bridge/sync/cloud-sync.js} +2 -2
- package/dist/walls/08-cloud-bridge/sync/cloud-sync.js.map +1 -0
- package/package.json +4 -5
- package/dist/ai-bridge.d.ts.map +0 -1
- package/dist/ai-bridge.js.map +0 -1
- package/dist/behavior-intelligence.d.ts.map +0 -1
- package/dist/behavior-intelligence.js.map +0 -1
- package/dist/behavioral-tracker.d.ts.map +0 -1
- package/dist/behavioral-tracker.js.map +0 -1
- package/dist/cli-repl.d.ts.map +0 -1
- package/dist/cli-repl.js.map +0 -1
- package/dist/cli.d.ts.map +0 -1
- package/dist/cli.js.map +0 -1
- package/dist/cloud-sync.d.ts.map +0 -1
- package/dist/cloud-sync.js.map +0 -1
- package/dist/code-scanner.d.ts.map +0 -1
- package/dist/code-scanner.js.map +0 -1
- package/dist/community-intel.d.ts.map +0 -1
- package/dist/community-intel.js.map +0 -1
- package/dist/community-intelligence.d.ts.map +0 -1
- package/dist/community-intelligence.js.map +0 -1
- package/dist/community-v2.d.ts.map +0 -1
- package/dist/community-v2.js.map +0 -1
- package/dist/core/ab-test-framework.d.ts.map +0 -1
- package/dist/core/ab-test-framework.js.map +0 -1
- package/dist/core/agents-md.d.ts.map +0 -1
- package/dist/core/agents-md.js.map +0 -1
- package/dist/core/ai-memory.d.ts.map +0 -1
- package/dist/core/ai-memory.js.map +0 -1
- package/dist/core/build-failure-predictor.d.ts.map +0 -1
- package/dist/core/build-failure-predictor.js.map +0 -1
- package/dist/core/cell-store.d.ts.map +0 -1
- package/dist/core/cell-store.js.map +0 -1
- package/dist/core/cloud-client.d.ts.map +0 -1
- package/dist/core/cloud-client.js.map +0 -1
- package/dist/core/community-advanced-engine.d.ts.map +0 -1
- package/dist/core/community-advanced-engine.js.map +0 -1
- package/dist/core/community-engine.d.ts.map +0 -1
- package/dist/core/community-engine.js.map +0 -1
- package/dist/core/community-full.d.ts.map +0 -1
- package/dist/core/community-full.js.map +0 -1
- package/dist/core/community-live.d.ts.map +0 -1
- package/dist/core/community-live.js.map +0 -1
- package/dist/core/community-prior.d.ts.map +0 -1
- package/dist/core/community-prior.js.map +0 -1
- package/dist/core/community-store.d.ts.map +0 -1
- package/dist/core/community-store.js.map +0 -1
- package/dist/core/config-attribution.d.ts.map +0 -1
- package/dist/core/config-attribution.js.map +0 -1
- package/dist/core/convention-detector.d.ts.map +0 -1
- package/dist/core/convention-detector.js.map +0 -1
- package/dist/core/cost-optimizer.d.ts.map +0 -1
- package/dist/core/cost-optimizer.js.map +0 -1
- package/dist/core/cross-domain-projections.d.ts.map +0 -1
- package/dist/core/cross-domain-projections.js.map +0 -1
- package/dist/core/cross-language-mappings.d.ts.map +0 -1
- package/dist/core/cross-language-mappings.js.map +0 -1
- package/dist/core/database.d.ts.map +0 -1
- package/dist/core/database.js.map +0 -1
- package/dist/core/decay-engine.d.ts.map +0 -1
- package/dist/core/decay-engine.js.map +0 -1
- package/dist/core/developer-profile.d.ts +0 -6
- package/dist/core/developer-profile.d.ts.map +0 -1
- package/dist/core/developer-profile.js.map +0 -1
- package/dist/core/error-predictor.d.ts.map +0 -1
- package/dist/core/error-predictor.js.map +0 -1
- package/dist/core/explainability.d.ts.map +0 -1
- package/dist/core/explainability.js.map +0 -1
- package/dist/core/failure-memory.d.ts.map +0 -1
- package/dist/core/failure-memory.js +0 -113
- package/dist/core/failure-memory.js.map +0 -1
- package/dist/core/git-branch-pregenerator.d.ts.map +0 -1
- package/dist/core/git-branch-pregenerator.js.map +0 -1
- package/dist/core/identity-resolver.d.ts.map +0 -1
- package/dist/core/identity-resolver.js.map +0 -1
- package/dist/core/interruption-recovery.d.ts.map +0 -1
- package/dist/core/interruption-recovery.js.map +0 -1
- package/dist/core/knowledge-graph-engine.d.ts.map +0 -1
- package/dist/core/knowledge-graph-engine.js.map +0 -1
- package/dist/core/knowledge-graph-store.d.ts.map +0 -1
- package/dist/core/knowledge-graph-store.js.map +0 -1
- package/dist/core/knowledge-graph.d.ts.map +0 -1
- package/dist/core/knowledge-graph.js.map +0 -1
- package/dist/core/live-watcher.d.ts.map +0 -1
- package/dist/core/live-watcher.js.map +0 -1
- package/dist/core/logger.d.ts.map +0 -1
- package/dist/core/logger.js.map +0 -1
- package/dist/core/marketplace.d.ts.map +0 -1
- package/dist/core/marketplace.js.map +0 -1
- package/dist/core/merge-conflict-predictor.d.ts.map +0 -1
- package/dist/core/merge-conflict-predictor.js.map +0 -1
- package/dist/core/model-intelligence.d.ts.map +0 -1
- package/dist/core/model-intelligence.js.map +0 -1
- package/dist/core/outcome-engine.d.ts.map +0 -1
- package/dist/core/outcome-engine.js.map +0 -1
- package/dist/core/outcome-recorder.d.ts.map +0 -1
- package/dist/core/outcome-recorder.js.map +0 -1
- package/dist/core/outcome-store.d.ts.map +0 -1
- package/dist/core/outcome-store.js.map +0 -1
- package/dist/core/outcome-types.d.ts.map +0 -1
- package/dist/core/outcome-types.js.map +0 -1
- package/dist/core/pattern-store.d.ts.map +0 -1
- package/dist/core/pattern-store.js.map +0 -1
- package/dist/core/performance-predictor.d.ts.map +0 -1
- package/dist/core/performance-predictor.js.map +0 -1
- package/dist/core/platt-calibration.d.ts.map +0 -1
- package/dist/core/platt-calibration.js.map +0 -1
- package/dist/core/playbook-generator.d.ts.map +0 -1
- package/dist/core/playbook-generator.js.map +0 -1
- package/dist/core/pr-review-assistant.d.ts.map +0 -1
- package/dist/core/pr-review-assistant.js.map +0 -1
- package/dist/core/privacy-manager.d.ts.map +0 -1
- package/dist/core/privacy-manager.js.map +0 -1
- package/dist/core/project-dna.d.ts.map +0 -1
- package/dist/core/project-dna.js.map +0 -1
- package/dist/core/prompt-builder.d.ts.map +0 -1
- package/dist/core/prompt-builder.js.map +0 -1
- package/dist/core/proof-engine.d.ts.map +0 -1
- package/dist/core/proof-engine.js.map +0 -1
- package/dist/core/realtime-guardian.d.ts.map +0 -1
- package/dist/core/realtime-guardian.js.map +0 -1
- package/dist/core/recommendation-engine.d.ts.map +0 -1
- package/dist/core/recommendation-engine.js.map +0 -1
- package/dist/core/recommendation-store.d.ts.map +0 -1
- package/dist/core/recommendation-store.js.map +0 -1
- package/dist/core/recommendation-types.d.ts.map +0 -1
- package/dist/core/recommendation-types.js.map +0 -1
- package/dist/core/reputation.d.ts.map +0 -1
- package/dist/core/reputation.js.map +0 -1
- package/dist/core/security-predictor.d.ts.map +0 -1
- package/dist/core/security-predictor.js.map +0 -1
- package/dist/core/security.d.ts.map +0 -1
- package/dist/core/security.js.map +0 -1
- package/dist/core/session-memory.d.ts.map +0 -1
- package/dist/core/session-memory.js.map +0 -1
- package/dist/core/setup.d.ts.map +0 -1
- package/dist/core/setup.js.map +0 -1
- package/dist/core/signal-capture.d.ts.map +0 -1
- package/dist/core/signal-capture.js.map +0 -1
- package/dist/core/time-saved.d.ts.map +0 -1
- package/dist/core/time-saved.js.map +0 -1
- package/dist/core/usage-intelligence-store.d.ts.map +0 -1
- package/dist/core/usage-intelligence-store.js.map +0 -1
- package/dist/core/watch-cli.d.ts.map +0 -1
- package/dist/core/watch-cli.js.map +0 -1
- package/dist/core/workflow-outcome-graph.d.ts.map +0 -1
- package/dist/core/workflow-outcome-graph.js.map +0 -1
- package/dist/core/workflow-tracker.d.ts.map +0 -1
- package/dist/core/workflow-tracker.js.map +0 -1
- package/dist/cross-model-engine.d.ts.map +0 -1
- package/dist/cross-model-engine.js.map +0 -1
- package/dist/cross-model-memory.d.ts.map +0 -1
- package/dist/cross-model-memory.js.map +0 -1
- package/dist/daemon/lifecycle.d.ts.map +0 -1
- package/dist/daemon/lifecycle.js.map +0 -1
- package/dist/daemon/server.d.ts +0 -83
- package/dist/daemon/server.d.ts.map +0 -1
- package/dist/daemon/server.js.map +0 -1
- package/dist/daemon/watchdog.d.ts.map +0 -1
- package/dist/daemon/watchdog.js.map +0 -1
- package/dist/daemon/websocket.d.ts.map +0 -1
- package/dist/daemon/websocket.js.map +0 -1
- package/dist/developer-intelligence.d.ts.map +0 -1
- package/dist/developer-intelligence.js.map +0 -1
- package/dist/first-run.d.ts.map +0 -1
- package/dist/first-run.js.map +0 -1
- package/dist/focus-report.d.ts.map +0 -1
- package/dist/focus-report.js.map +0 -1
- package/dist/ide-intelligence.d.ts.map +0 -1
- package/dist/ide-intelligence.js.map +0 -1
- package/dist/insight-generator.d.ts.map +0 -1
- package/dist/insight-generator.js.map +0 -1
- package/dist/journey-memory.d.ts.map +0 -1
- package/dist/journey-memory.js.map +0 -1
- package/dist/knowledge-graph-builder.d.ts.map +0 -1
- package/dist/knowledge-graph-builder.js.map +0 -1
- package/dist/layers.d.ts.map +0 -1
- package/dist/layers.js.map +0 -1
- package/dist/mcp-server.d.ts +0 -406
- package/dist/mcp-server.d.ts.map +0 -1
- package/dist/mcp-server.js +0 -414
- package/dist/mcp-server.js.map +0 -1
- package/dist/onboarding-scan.d.ts +0 -174
- package/dist/onboarding-scan.d.ts.map +0 -1
- package/dist/onboarding-scan.js +0 -1039
- package/dist/onboarding-scan.js.map +0 -1
- package/dist/pc-scanner.d.ts.map +0 -1
- package/dist/pc-scanner.js.map +0 -1
- package/dist/personal-intelligence.d.ts.map +0 -1
- package/dist/personal-intelligence.js.map +0 -1
- package/dist/predictive-engine.d.ts.map +0 -1
- package/dist/predictive-engine.js.map +0 -1
- package/dist/predictive-intelligence.d.ts.map +0 -1
- package/dist/predictive-intelligence.js.map +0 -1
- package/dist/production.d.ts.map +0 -1
- package/dist/production.js.map +0 -1
- package/dist/senior-features.d.ts +0 -63
- package/dist/senior-features.d.ts.map +0 -1
- package/dist/senior-features.js +0 -325
- package/dist/senior-features.js.map +0 -1
- package/dist/stack-detector.d.ts.map +0 -1
- package/dist/stack-detector.js.map +0 -1
- package/dist/store.d.ts +0 -4
- package/dist/store.d.ts.map +0 -1
- package/dist/store.js +0 -47
- package/dist/store.js.map +0 -1
- package/dist/style-pull.d.ts.map +0 -1
- package/dist/style-pull.js.map +0 -1
- package/dist/team-collaboration.d.ts.map +0 -1
- package/dist/team-collaboration.js.map +0 -1
- package/dist/team-git.d.ts.map +0 -1
- package/dist/team-git.js.map +0 -1
- package/dist/team-intel.d.ts.map +0 -1
- package/dist/team-intel.js.map +0 -1
- package/dist/team-intelligence.d.ts +0 -64
- package/dist/team-intelligence.d.ts.map +0 -1
- package/dist/team-intelligence.js +0 -289
- package/dist/team-intelligence.js.map +0 -1
- package/dist/test-touch-145026.d.ts +0 -1
- package/dist/test-touch-145026.d.ts.map +0 -1
- package/dist/test-touch-145026.js +0 -2
- package/dist/test-touch-145026.js.map +0 -1
- package/dist/test-watch.d.ts +0 -2
- package/dist/test-watch.d.ts.map +0 -1
- package/dist/test-watch.js +0 -8
- package/dist/test-watch.js.map +0 -1
- package/dist/user-intelligence.d.ts.map +0 -1
- package/dist/user-intelligence.js.map +0 -1
- package/dist/verify-145929.d.ts +0 -1
- package/dist/verify-145929.d.ts.map +0 -1
- package/dist/verify-145929.js +0 -2
- package/dist/verify-145929.js.map +0 -1
- package/dist/verify2-150021.d.ts +0 -1
- package/dist/verify2-150021.d.ts.map +0 -1
- package/dist/verify2-150021.js +0 -2
- package/dist/verify2-150021.js.map +0 -1
- package/dist/work-style.d.ts +0 -49
- package/dist/work-style.d.ts.map +0 -1
- package/dist/work-style.js +0 -247
- package/dist/work-style.js.map +0 -1
- /package/dist/{core → walls/01-context/context}/agents-md.d.ts +0 -0
- /package/dist/{core → walls/01-context/context}/agents-md.js +0 -0
- /package/dist/{ide-intelligence.d.ts → walls/01-context/context/ide-intelligence.d.ts} +0 -0
- /package/dist/{core → walls/01-context/context}/prompt-builder.d.ts +0 -0
- /package/dist/{user-intelligence.d.ts → walls/01-context/context/user-intelligence.d.ts} +0 -0
- /package/dist/{user-intelligence.js → walls/01-context/context/user-intelligence.js} +0 -0
- /package/dist/{core → walls/01-context/sessions}/interruption-recovery.d.ts +0 -0
- /package/dist/{core → walls/01-context/sessions}/interruption-recovery.js +0 -0
- /package/dist/{core → walls/01-context/sessions}/session-memory.d.ts +0 -0
- /package/dist/{code-scanner.d.ts → walls/02-scanner/blindspots/code-scanner.d.ts} +0 -0
- /package/dist/{pc-scanner.d.ts → walls/02-scanner/stack/pc-scanner.d.ts} +0 -0
- /package/dist/{stack-detector.d.ts → walls/02-scanner/stack/stack-detector.d.ts} +0 -0
- /package/dist/{stack-detector.js → walls/02-scanner/stack/stack-detector.js} +0 -0
- /package/dist/{style-pull.d.ts → walls/02-scanner/style/style-pull.d.ts} +0 -0
- /package/dist/{style-pull.js → walls/02-scanner/style/style-pull.js} +0 -0
- /package/dist/{core → walls/03-knowledge/decisions}/ab-test-framework.d.ts +0 -0
- /package/dist/{core → walls/03-knowledge/decisions}/ab-test-framework.js +0 -0
- /package/dist/{ai-bridge.d.ts → walls/03-knowledge/decisions/ai-bridge.d.ts} +0 -0
- /package/dist/{behavior-intelligence.d.ts → walls/03-knowledge/decisions/behavior-intelligence.d.ts} +0 -0
- /package/dist/{behavior-intelligence.js → walls/03-knowledge/decisions/behavior-intelligence.js} +0 -0
- /package/dist/{behavioral-tracker.d.ts → walls/03-knowledge/decisions/behavioral-tracker.d.ts} +0 -0
- /package/dist/{core → walls/03-knowledge/decisions}/build-failure-predictor.d.ts +0 -0
- /package/dist/{core → walls/03-knowledge/decisions}/build-failure-predictor.js +0 -0
- /package/dist/{core → walls/03-knowledge/decisions}/cost-optimizer.d.ts +0 -0
- /package/dist/{cross-model-engine.d.ts → walls/03-knowledge/decisions/cross-model-engine.d.ts} +0 -0
- /package/dist/{cross-model-memory.d.ts → walls/03-knowledge/decisions/cross-model-memory.d.ts} +0 -0
- /package/dist/{core → walls/03-knowledge/decisions}/developer-profile.js +0 -0
- /package/dist/{core → walls/03-knowledge/decisions}/error-predictor.d.ts +0 -0
- /package/dist/{core → walls/03-knowledge/decisions}/error-predictor.js +0 -0
- /package/dist/{focus-report.d.ts → walls/03-knowledge/decisions/focus-report.d.ts} +0 -0
- /package/dist/{focus-report.js → walls/03-knowledge/decisions/focus-report.js} +0 -0
- /package/dist/{core → walls/03-knowledge/decisions}/git-branch-pregenerator.js +0 -0
- /package/dist/{insight-generator.d.ts → walls/03-knowledge/decisions/insight-generator.d.ts} +0 -0
- /package/dist/{insight-generator.js → walls/03-knowledge/decisions/insight-generator.js} +0 -0
- /package/dist/{journey-memory.d.ts → walls/03-knowledge/decisions/journey-memory.d.ts} +0 -0
- /package/dist/{journey-memory.js → walls/03-knowledge/decisions/journey-memory.js} +0 -0
- /package/dist/{core → walls/03-knowledge/decisions}/merge-conflict-predictor.d.ts +0 -0
- /package/dist/{core → walls/03-knowledge/decisions}/merge-conflict-predictor.js +0 -0
- /package/dist/{core → walls/03-knowledge/decisions}/model-intelligence.d.ts +0 -0
- /package/dist/{core → walls/03-knowledge/decisions}/model-intelligence.js +0 -0
- /package/dist/{core → walls/03-knowledge/decisions}/outcome-engine.js +0 -0
- /package/dist/{core → walls/03-knowledge/decisions}/outcome-recorder.js +0 -0
- /package/dist/{core → walls/03-knowledge/decisions}/performance-predictor.d.ts +0 -0
- /package/dist/{core → walls/03-knowledge/decisions}/performance-predictor.js +0 -0
- /package/dist/{core → walls/03-knowledge/decisions}/platt-calibration.d.ts +0 -0
- /package/dist/{core → walls/03-knowledge/decisions}/platt-calibration.js +0 -0
- /package/dist/{predictive-engine.d.ts → walls/03-knowledge/decisions/predictive-engine.d.ts} +0 -0
- /package/dist/{predictive-intelligence.d.ts → walls/03-knowledge/decisions/predictive-intelligence.d.ts} +0 -0
- /package/dist/{core → walls/03-knowledge/decisions}/realtime-guardian.d.ts +0 -0
- /package/dist/{core → walls/03-knowledge/decisions}/realtime-guardian.js +0 -0
- /package/dist/{core → walls/03-knowledge/decisions}/security-predictor.d.ts +0 -0
- /package/dist/{core → walls/03-knowledge/decisions}/security-predictor.js +0 -0
- /package/dist/{core → walls/03-knowledge/decisions}/time-saved.d.ts +0 -0
- /package/dist/{core → walls/03-knowledge/decisions}/time-saved.js +0 -0
- /package/dist/{core → walls/03-knowledge/decisions}/workflow-outcome-graph.d.ts +0 -0
- /package/dist/{core → walls/03-knowledge/decisions}/workflow-outcome-graph.js +0 -0
- /package/dist/{core → walls/03-knowledge/decisions}/workflow-tracker.js +0 -0
- /package/dist/{core → walls/03-knowledge/dna}/config-attribution.js +0 -0
- /package/dist/{core → walls/03-knowledge/dna}/cross-domain-projections.d.ts +0 -0
- /package/dist/{core → walls/03-knowledge/dna}/cross-domain-projections.js +0 -0
- /package/dist/{core → walls/03-knowledge/dna}/cross-language-mappings.d.ts +0 -0
- /package/dist/{core → walls/03-knowledge/dna}/cross-language-mappings.js +0 -0
- /package/dist/{personal-intelligence.d.ts → walls/03-knowledge/dna/personal-intelligence.d.ts} +0 -0
- /package/dist/{core → walls/03-knowledge/dna}/proof-engine.d.ts +0 -0
- /package/dist/{knowledge-graph-builder.d.ts → walls/03-knowledge/graph/knowledge-graph-builder.d.ts} +0 -0
- /package/dist/{knowledge-graph-builder.js → walls/03-knowledge/graph/knowledge-graph-builder.js} +0 -0
- /package/dist/{core → walls/03-knowledge/graph}/knowledge-graph-engine.d.ts +0 -0
- /package/dist/{core → walls/03-knowledge/graph}/knowledge-graph.d.ts +0 -0
- /package/dist/{team-collaboration.d.ts → walls/04-team/collab/team-collaboration.d.ts} +0 -0
- /package/dist/{team-git.d.ts → walls/04-team/collab/team-git.d.ts} +0 -0
- /package/dist/{team-intel.d.ts → walls/04-team/collab/team-intel.d.ts} +0 -0
- /package/dist/{team-intel.js → walls/04-team/collab/team-intel.js} +0 -0
- /package/dist/{core → walls/04-team/review}/pr-review-assistant.js +0 -0
- /package/dist/{core → walls/05-community/privacy}/privacy-manager.d.ts +0 -0
- /package/dist/{core → walls/05-community/privacy}/privacy-manager.js +0 -0
- /package/dist/{core → walls/05-community/privacy}/security.d.ts +0 -0
- /package/dist/{core → walls/05-community/privacy}/security.js +0 -0
- /package/dist/{core → walls/05-community/share}/identity-resolver.d.ts +0 -0
- /package/dist/{core → walls/05-community/share}/identity-resolver.js +0 -0
- /package/dist/{core → walls/05-community/share}/marketplace.d.ts +0 -0
- /package/dist/{core → walls/05-community/share}/marketplace.js +0 -0
- /package/dist/{core → walls/05-community/share}/reputation.d.ts +0 -0
- /package/dist/{core → walls/05-community/share}/reputation.js +0 -0
- /package/dist/{core → walls/05-community/stats}/community-advanced-engine.d.ts +0 -0
- /package/dist/{core → walls/05-community/stats}/community-engine.d.ts +0 -0
- /package/dist/{core → walls/05-community/stats}/community-full.js +0 -0
- /package/dist/{community-intel.d.ts → walls/05-community/stats/community-intel.d.ts} +0 -0
- /package/dist/{community-intelligence.d.ts → walls/05-community/stats/community-intelligence.d.ts} +0 -0
- /package/dist/{community-intelligence.js → walls/05-community/stats/community-intelligence.js} +0 -0
- /package/dist/{core → walls/05-community/stats}/community-live.d.ts +0 -0
- /package/dist/{core → walls/05-community/stats}/community-live.js +0 -0
- /package/dist/{core → walls/05-community/stats}/community-prior.js +0 -0
- /package/dist/{community-v2.d.ts → walls/05-community/stats/community-v2.d.ts} +0 -0
- /package/dist/{layers.d.ts → walls/05-community/stats/layers.d.ts} +0 -0
- /package/dist/{layers.js → walls/05-community/stats/layers.js} +0 -0
- /package/dist/{core → walls/05-community/stats}/playbook-generator.js +0 -0
- /package/dist/{core → walls/06-memory/database}/database.d.ts +0 -0
- /package/dist/{core → walls/06-memory/database}/logger.d.ts +0 -0
- /package/dist/{core → walls/06-memory/database}/logger.js +0 -0
- /package/dist/{core → walls/06-memory/stores}/cell-store.d.ts +0 -0
- /package/dist/{core → walls/06-memory/stores}/cell-store.js +0 -0
- /package/dist/{core → walls/06-memory/stores}/community-store.d.ts +0 -0
- /package/dist/{core → walls/06-memory/stores}/decay-engine.d.ts +0 -0
- /package/dist/{core → walls/06-memory/stores}/decay-engine.js +0 -0
- /package/dist/{core → walls/06-memory/stores}/outcome-store.d.ts +0 -0
- /package/dist/{core → walls/06-memory/stores}/outcome-store.js +0 -0
- /package/dist/{core → walls/06-memory/stores}/outcome-types.d.ts +0 -0
- /package/dist/{core → walls/06-memory/stores}/outcome-types.js +0 -0
- /package/dist/{core → walls/06-memory/stores}/recommendation-store.d.ts +0 -0
- /package/dist/{core → walls/06-memory/stores}/recommendation-store.js +0 -0
- /package/dist/{core → walls/06-memory/stores}/recommendation-types.d.ts +0 -0
- /package/dist/{core → walls/06-memory/stores}/recommendation-types.js +0 -0
- /package/dist/{core → walls/06-memory/stores}/usage-intelligence-store.d.ts +0 -0
- /package/dist/{cli-repl.d.ts → walls/07-runtime/cli/cli-repl.d.ts} +0 -0
- /package/dist/{cli.d.ts → walls/07-runtime/cli/cli.d.ts} +0 -0
- /package/dist/{daemon → walls/07-runtime/daemon}/lifecycle.d.ts +0 -0
- /package/dist/{daemon → walls/07-runtime/daemon}/lifecycle.js +0 -0
- /package/dist/{daemon → walls/07-runtime/daemon}/watchdog.d.ts +0 -0
- /package/dist/{daemon → walls/07-runtime/daemon}/watchdog.js +0 -0
- /package/dist/{daemon → walls/07-runtime/daemon}/websocket.d.ts +0 -0
- /package/dist/{first-run.d.ts → walls/07-runtime/setup/first-run.d.ts} +0 -0
- /package/dist/{first-run.js → walls/07-runtime/setup/first-run.js} +0 -0
- /package/dist/{production.d.ts → walls/07-runtime/setup/production.d.ts} +0 -0
- /package/dist/{core → walls/07-runtime/setup}/setup.d.ts +0 -0
- /package/dist/{core → walls/07-runtime/watcher}/watch-cli.d.ts +0 -0
- /package/dist/{core → walls/07-runtime/watcher}/watch-cli.js +0 -0
- /package/dist/{core → walls/08-cloud-bridge/sync}/cloud-client.d.ts +0 -0
- /package/dist/{cloud-sync.d.ts → walls/08-cloud-bridge/sync/cloud-sync.d.ts} +0 -0
|
@@ -43,8 +43,8 @@ const os = __importStar(require("os"));
|
|
|
43
43
|
const chalk_1 = __importDefault(require("chalk"));
|
|
44
44
|
const figlet_1 = __importDefault(require("figlet"));
|
|
45
45
|
const gradient_string_1 = __importDefault(require("gradient-string"));
|
|
46
|
-
const database_1 = require("
|
|
47
|
-
const layers_1 = require("
|
|
46
|
+
const database_1 = require("../../06-memory/database/database");
|
|
47
|
+
const layers_1 = require("../../05-community/stats/layers");
|
|
48
48
|
const cli_repl_1 = require("./cli-repl");
|
|
49
49
|
(0, database_1.initializeDatabase)();
|
|
50
50
|
const C = {
|
|
@@ -88,6 +88,18 @@ function parseArgs(argv) {
|
|
|
88
88
|
}
|
|
89
89
|
const args = parseArgs(process.argv.slice(2));
|
|
90
90
|
const cmd = args[0] || '';
|
|
91
|
+
// Module-level state for watch-editor (must be declared before switch)
|
|
92
|
+
let activeMonitor = null;
|
|
93
|
+
let monitorStateFile = null;
|
|
94
|
+
function isPidAlive(pid) {
|
|
95
|
+
try {
|
|
96
|
+
process.kill(pid, 0);
|
|
97
|
+
return true;
|
|
98
|
+
}
|
|
99
|
+
catch {
|
|
100
|
+
return false;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
91
103
|
switch (cmd) {
|
|
92
104
|
case '--version':
|
|
93
105
|
case '-v':
|
|
@@ -134,12 +146,49 @@ switch (cmd) {
|
|
|
134
146
|
case 'blindspots':
|
|
135
147
|
doBlindspots();
|
|
136
148
|
break;
|
|
149
|
+
case 'doctor':
|
|
150
|
+
doDoctor().catch((e) => {
|
|
151
|
+
const msg = e instanceof Error ? e.message : String(e);
|
|
152
|
+
console.log(C.warn(' Doctor failed: ' + msg));
|
|
153
|
+
process.exit(1);
|
|
154
|
+
});
|
|
155
|
+
break;
|
|
137
156
|
case 'context':
|
|
138
157
|
doContext();
|
|
139
158
|
break;
|
|
140
159
|
case 'mcp-config':
|
|
141
160
|
doMcpConfig();
|
|
142
161
|
break;
|
|
162
|
+
case 'replay':
|
|
163
|
+
doReplay();
|
|
164
|
+
break;
|
|
165
|
+
case 'continue':
|
|
166
|
+
doContinue();
|
|
167
|
+
break;
|
|
168
|
+
case 'bridge':
|
|
169
|
+
doBridge();
|
|
170
|
+
break;
|
|
171
|
+
case 'watch-editor':
|
|
172
|
+
doWatchEditor();
|
|
173
|
+
break;
|
|
174
|
+
case 'switch-back':
|
|
175
|
+
doSwitchBack();
|
|
176
|
+
break;
|
|
177
|
+
case 'branches':
|
|
178
|
+
doBranches();
|
|
179
|
+
break;
|
|
180
|
+
case 'lessons':
|
|
181
|
+
doLessons();
|
|
182
|
+
break;
|
|
183
|
+
case 'evolution':
|
|
184
|
+
doEvolution();
|
|
185
|
+
break;
|
|
186
|
+
case 'focus':
|
|
187
|
+
doFocus();
|
|
188
|
+
break;
|
|
189
|
+
case 'why':
|
|
190
|
+
doWhy();
|
|
191
|
+
break;
|
|
143
192
|
case 'repl':
|
|
144
193
|
case '-i':
|
|
145
194
|
case '--interactive':
|
|
@@ -162,12 +211,27 @@ switch (cmd) {
|
|
|
162
211
|
}
|
|
163
212
|
// ─── cell start ─────────────────────────────────────────────────────────────
|
|
164
213
|
function doStart() {
|
|
165
|
-
const
|
|
166
|
-
|
|
167
|
-
|
|
214
|
+
const fromAutostart = args.includes('--from-autostart');
|
|
215
|
+
if (fromAutostart) {
|
|
216
|
+
console.log('[cell] Autostart: starting daemon...');
|
|
217
|
+
}
|
|
218
|
+
else {
|
|
219
|
+
const banner = figlet_1.default.textSync('CELL', { font: 'ANSI Shadow', horizontalLayout: 'fitted' });
|
|
220
|
+
console.log((0, gradient_string_1.default)(['#FF6B35', '#FFAB91'])(banner));
|
|
221
|
+
console.log(C.dim(' Starting everything...\n'));
|
|
222
|
+
try {
|
|
223
|
+
const { registerAutostart } = require('../setup/autostart');
|
|
224
|
+
const auto = registerAutostart();
|
|
225
|
+
if (auto.ok && !auto.skipped)
|
|
226
|
+
console.log(C.success(' ' + auto.message));
|
|
227
|
+
else if (!auto.ok)
|
|
228
|
+
console.log(C.warn(' ' + auto.message));
|
|
229
|
+
}
|
|
230
|
+
catch { }
|
|
231
|
+
}
|
|
168
232
|
// 0. First-run greeting
|
|
169
233
|
try {
|
|
170
|
-
const { firstRunGreeting } = require('
|
|
234
|
+
const { firstRunGreeting } = require('../setup/first-run');
|
|
171
235
|
firstRunGreeting();
|
|
172
236
|
}
|
|
173
237
|
catch { }
|
|
@@ -204,7 +268,7 @@ function doStart() {
|
|
|
204
268
|
function startDaemon() {
|
|
205
269
|
// 1. Kill any stale daemon (clean restart)
|
|
206
270
|
try {
|
|
207
|
-
const { stopDaemon } = require('
|
|
271
|
+
const { stopDaemon } = require('../daemon/lifecycle');
|
|
208
272
|
stopDaemon();
|
|
209
273
|
// Wait for port to be released
|
|
210
274
|
const { execSync } = require('child_process');
|
|
@@ -228,7 +292,7 @@ function startDaemon() {
|
|
|
228
292
|
const pathMod = require('path');
|
|
229
293
|
const fsMod = require('fs');
|
|
230
294
|
const osMod = require('os');
|
|
231
|
-
const serverPath = pathMod.join(__dirname, 'daemon', 'server.js');
|
|
295
|
+
const serverPath = pathMod.join(__dirname, '..', 'daemon', 'server.js');
|
|
232
296
|
const logFile = pathMod.join(osMod.homedir(), '.fivo', 'cell', 'daemon.log');
|
|
233
297
|
fsMod.mkdirSync(pathMod.dirname(logFile), { recursive: true });
|
|
234
298
|
const out = fsMod.openSync(logFile, 'a');
|
|
@@ -256,7 +320,7 @@ function startDaemon() {
|
|
|
256
320
|
}
|
|
257
321
|
function printProjectStatusAndExit() {
|
|
258
322
|
try {
|
|
259
|
-
const { detectProject, checkScanState, checkWatchState, checkMcpState, isDaemonRunning } = require('
|
|
323
|
+
const { detectProject, checkScanState, checkWatchState, checkMcpState, isDaemonRunning } = require('../setup/setup');
|
|
260
324
|
const httpMod = require('http');
|
|
261
325
|
const project = detectProject(process.cwd());
|
|
262
326
|
const scan = checkScanState(process.cwd());
|
|
@@ -290,13 +354,22 @@ function printProjectStatusAndExit() {
|
|
|
290
354
|
function doStop() {
|
|
291
355
|
console.log(C.dim(' Stopping Cell daemon...'));
|
|
292
356
|
try {
|
|
293
|
-
const { stopDaemon } = require('
|
|
357
|
+
const { stopDaemon } = require('../daemon/lifecycle');
|
|
294
358
|
const result = stopDaemon();
|
|
295
359
|
console.log(result.success ? C.success(` ${result.message}`) : C.warn(` ${result.message}`));
|
|
296
360
|
}
|
|
297
361
|
catch (e) {
|
|
298
362
|
console.log(C.warn(' Stop failed: ' + String(e)));
|
|
299
363
|
}
|
|
364
|
+
try {
|
|
365
|
+
const { unregisterAutostart } = require('../setup/autostart');
|
|
366
|
+
const auto = unregisterAutostart();
|
|
367
|
+
if (auto.ok && !auto.skipped)
|
|
368
|
+
console.log(C.success(' ' + auto.message));
|
|
369
|
+
else if (!auto.ok)
|
|
370
|
+
console.log(C.warn(' ' + auto.message));
|
|
371
|
+
}
|
|
372
|
+
catch { }
|
|
300
373
|
console.log();
|
|
301
374
|
}
|
|
302
375
|
// ─── cell analyze ───────────────────────────────────────────────────────────
|
|
@@ -318,7 +391,7 @@ function doAnalyze() {
|
|
|
318
391
|
process.stdin.on('end', () => {
|
|
319
392
|
const content = Buffer.concat(chunks).toString().trim();
|
|
320
393
|
if (content) {
|
|
321
|
-
const { saveAIInsight } = require('
|
|
394
|
+
const { saveAIInsight } = require('../../03-knowledge/decisions/ai-bridge');
|
|
322
395
|
saveAIInsight(project, category, content);
|
|
323
396
|
console.log(C.success(` Insights saved: ${category}`));
|
|
324
397
|
console.log(C.dim(` .cell/personal/insights/${category}.md`));
|
|
@@ -336,7 +409,7 @@ function doAnalyze() {
|
|
|
336
409
|
}
|
|
337
410
|
// ─── Show insights ─────────────────────────────────────────────────
|
|
338
411
|
if (sub === '--show') {
|
|
339
|
-
const { getAIInsights } = require('
|
|
412
|
+
const { getAIInsights } = require('../../03-knowledge/decisions/ai-bridge');
|
|
340
413
|
const insights = getAIInsights(project);
|
|
341
414
|
if (insights.length === 0) {
|
|
342
415
|
console.log(C.dim(' No AI insights yet. Run: cell analyze'));
|
|
@@ -353,7 +426,7 @@ function doAnalyze() {
|
|
|
353
426
|
return;
|
|
354
427
|
}
|
|
355
428
|
// ─── Default: Generate prompts ─────────────────────────────────────
|
|
356
|
-
const { getAnalysisCommand } = require('
|
|
429
|
+
const { getAnalysisCommand } = require('../../03-knowledge/decisions/ai-bridge');
|
|
357
430
|
const { intro, prompts } = getAnalysisCommand(process.cwd());
|
|
358
431
|
console.log(C.dim(intro));
|
|
359
432
|
console.log();
|
|
@@ -390,9 +463,14 @@ function doScan() {
|
|
|
390
463
|
// path.basename(cwd) which is a *name*, not a directory path.
|
|
391
464
|
const scanPathArg = args.find((a, i) => i >= 1 && !a.startsWith('--'));
|
|
392
465
|
const scanCwd = scanPathArg ? path.resolve(scanPathArg) : process.cwd();
|
|
393
|
-
|
|
466
|
+
let scanProject = path.basename(scanCwd);
|
|
394
467
|
try {
|
|
395
|
-
const {
|
|
468
|
+
const { detectProject } = require('../setup/setup');
|
|
469
|
+
scanProject = detectProject(scanCwd).name;
|
|
470
|
+
}
|
|
471
|
+
catch { }
|
|
472
|
+
try {
|
|
473
|
+
const { scanCodebase } = require('../../02-scanner/blindspots/code-scanner');
|
|
396
474
|
const result = scanCodebase(scanCwd, scanProject);
|
|
397
475
|
console.log(C.success(` [1/2] Scanned ${result.filesScanned} files, ${result.totalLines.toLocaleString()} lines`));
|
|
398
476
|
(0, layers_1.populateAllLayers)({
|
|
@@ -406,7 +484,7 @@ function doScan() {
|
|
|
406
484
|
console.log(C.dim(' .cell/community/ — community patterns, trends'));
|
|
407
485
|
// ─── AI rules files (AGENTS.md, .cursorrules) ─────────────────────────
|
|
408
486
|
if (!noRules) {
|
|
409
|
-
const { writeCellRules } = require('
|
|
487
|
+
const { writeCellRules } = require('../../01-context/context/agents-md');
|
|
410
488
|
const rulesResult = writeCellRules(scanCwd, { overwrite: forceRules });
|
|
411
489
|
const lines = [];
|
|
412
490
|
if (rulesResult.agentsMd === 'written')
|
|
@@ -423,9 +501,43 @@ function doScan() {
|
|
|
423
501
|
else {
|
|
424
502
|
console.log(C.dim(' [3/3] AI rules: skipped (--no-rules)'));
|
|
425
503
|
}
|
|
504
|
+
// ─── Top 5 fixes ────────────────────────────────────────────────────
|
|
505
|
+
try {
|
|
506
|
+
const { scanDirectoryForBlindSpots, getTopFixes, getCategorySummary } = require('../../../core/enhanced-blind-spots');
|
|
507
|
+
const spots = scanDirectoryForBlindSpots(scanCwd, 200);
|
|
508
|
+
const topFixes = getTopFixes(spots, 5);
|
|
509
|
+
if (topFixes.length > 0) {
|
|
510
|
+
console.log();
|
|
511
|
+
console.log(C.bold(' Top 5 fixes first:'));
|
|
512
|
+
for (let i = 0; i < topFixes.length; i++) {
|
|
513
|
+
const s = topFixes[i];
|
|
514
|
+
console.log(` ${C.num(String(i + 1))}. ${s.message}`);
|
|
515
|
+
console.log(` ${C.dim(s.filePath + ':' + s.lineNumber)}`);
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
const catSummary = getCategorySummary(spots);
|
|
519
|
+
if (catSummary.length > 0) {
|
|
520
|
+
console.log();
|
|
521
|
+
console.log(C.dim(' Category breakdown:'));
|
|
522
|
+
for (const c of catSummary.slice(0, 6)) {
|
|
523
|
+
console.log(C.dim(` ${c.category}: ${c.count} (${c.topSeverity})`));
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
catch { }
|
|
426
528
|
console.log();
|
|
427
529
|
console.log(C.dim(' Run: cell status'));
|
|
428
530
|
console.log();
|
|
531
|
+
try {
|
|
532
|
+
const { markFirstScan } = require('../setup/cell-state');
|
|
533
|
+
markFirstScan();
|
|
534
|
+
}
|
|
535
|
+
catch { }
|
|
536
|
+
try {
|
|
537
|
+
const { captureCurrentBranchSnapshot } = require('../../03-knowledge/decisions/branch-snapshot');
|
|
538
|
+
captureCurrentBranchSnapshot(scanProject, scanCwd);
|
|
539
|
+
}
|
|
540
|
+
catch { }
|
|
429
541
|
}
|
|
430
542
|
catch (e) {
|
|
431
543
|
console.log(C.warn(' Scan failed: ' + String(e)));
|
|
@@ -464,7 +576,7 @@ async function doSetup() {
|
|
|
464
576
|
const dirIdx = args.indexOf('--dir');
|
|
465
577
|
const dir = dirIdx > 0 ? args[dirIdx + 1] : undefined;
|
|
466
578
|
try {
|
|
467
|
-
const { runSetup, detectProject, checkScanState, checkWatchState, checkMcpState, isDaemonRunning, } = require('
|
|
579
|
+
const { runSetup, detectProject, checkScanState, checkWatchState, checkMcpState, isDaemonRunning, } = require('../setup/setup');
|
|
468
580
|
const cwd = process.cwd();
|
|
469
581
|
const project = detectProject(cwd, projectName);
|
|
470
582
|
console.log(C.bold(` Project: ${C.num(project.name)}`));
|
|
@@ -474,13 +586,28 @@ async function doSetup() {
|
|
|
474
586
|
console.log(C.warn(' Mode: DRY RUN (no changes will be made)'));
|
|
475
587
|
console.log();
|
|
476
588
|
// ─── Daemon check ────────────────────────────────────────────────────
|
|
477
|
-
|
|
589
|
+
let daemonUp = await isDaemonRunning();
|
|
478
590
|
if (daemonUp) {
|
|
479
591
|
console.log(C.success(' [daemon] running on http://localhost:9876'));
|
|
480
592
|
}
|
|
481
593
|
else {
|
|
482
|
-
console.log(C.warn(' [daemon] not running
|
|
483
|
-
|
|
594
|
+
console.log(C.warn(' [daemon] not running'));
|
|
595
|
+
if (!skipWatch && !dryRun) {
|
|
596
|
+
try {
|
|
597
|
+
console.log(C.primary(' [daemon] starting now so watcher can be registered...'));
|
|
598
|
+
const { startDaemon } = require('../daemon/lifecycle');
|
|
599
|
+
await startDaemon();
|
|
600
|
+
daemonUp = await isDaemonRunning();
|
|
601
|
+
if (daemonUp)
|
|
602
|
+
console.log(C.success(' [daemon] running on http://localhost:9876'));
|
|
603
|
+
}
|
|
604
|
+
catch (e) {
|
|
605
|
+
console.log(C.warn(' [daemon] start failed: ' + String(e)));
|
|
606
|
+
}
|
|
607
|
+
}
|
|
608
|
+
else {
|
|
609
|
+
console.log(C.dim(' run `cell start` to bring it up when ready'));
|
|
610
|
+
}
|
|
484
611
|
}
|
|
485
612
|
console.log();
|
|
486
613
|
// ─── Pre-flight state report ────────────────────────────────────────
|
|
@@ -496,6 +623,17 @@ async function doSetup() {
|
|
|
496
623
|
const allDone = scan.done && watch.done && mcp.done === mcp.total;
|
|
497
624
|
if (allDone) {
|
|
498
625
|
console.log(C.success(' Already fully set up — nothing to do.'));
|
|
626
|
+
try {
|
|
627
|
+
const { registerAutostart } = require('../setup/autostart');
|
|
628
|
+
const auto = registerAutostart({ dryRun });
|
|
629
|
+
if (auto.ok && !auto.skipped)
|
|
630
|
+
console.log(C.success(' [autostart] ' + auto.message));
|
|
631
|
+
else if (auto.ok && auto.skipped)
|
|
632
|
+
console.log(C.dim(' [autostart] ' + auto.message));
|
|
633
|
+
else
|
|
634
|
+
console.log(C.warn(' [autostart] ' + auto.message));
|
|
635
|
+
}
|
|
636
|
+
catch { }
|
|
499
637
|
console.log(C.dim(' Tip: re-run anytime; it is safe and idempotent.'));
|
|
500
638
|
console.log();
|
|
501
639
|
return;
|
|
@@ -539,13 +677,35 @@ async function doSetup() {
|
|
|
539
677
|
const allGood = result.scan.done && result.watch.done && mcpOk && result.errors.length === 0;
|
|
540
678
|
if (allGood) {
|
|
541
679
|
console.log(C.success(` Setup complete in ${ms}ms. Cell is ready.`));
|
|
680
|
+
try {
|
|
681
|
+
const { markSetupCompleted } = require('../setup/cell-state');
|
|
682
|
+
markSetupCompleted();
|
|
683
|
+
}
|
|
684
|
+
catch { }
|
|
542
685
|
}
|
|
543
686
|
else {
|
|
544
687
|
console.log(C.warn(` Setup finished in ${ms}ms with warnings (see above).`));
|
|
545
688
|
}
|
|
546
689
|
console.log();
|
|
547
|
-
|
|
548
|
-
|
|
690
|
+
try {
|
|
691
|
+
const { registerAutostart } = require('../setup/autostart');
|
|
692
|
+
const auto = registerAutostart({ dryRun });
|
|
693
|
+
if (auto.ok && !auto.skipped)
|
|
694
|
+
console.log(C.success(' [autostart] ' + auto.message));
|
|
695
|
+
else if (auto.ok && auto.skipped)
|
|
696
|
+
console.log(C.dim(' [autostart] ' + auto.message));
|
|
697
|
+
else
|
|
698
|
+
console.log(C.warn(' [autostart] ' + auto.message));
|
|
699
|
+
console.log();
|
|
700
|
+
}
|
|
701
|
+
catch { }
|
|
702
|
+
console.log(C.bold(' Next commands:'));
|
|
703
|
+
console.log(` ${C.num('1.')} ${C.primary('cell context')} See what Cell knows about your project`);
|
|
704
|
+
console.log(` ${C.num('2.')} ${C.primary('cell blindspots --top')} See your top fixes`);
|
|
705
|
+
console.log(` ${C.primary('3.')} ${C.primary('cell bridge start')} Connect your IDE`);
|
|
706
|
+
console.log(` ${C.num('4.')} ${C.primary('cell continue')} Resume your last session`);
|
|
707
|
+
console.log();
|
|
708
|
+
console.log(C.dim(' Run cell doctor anytime to check health.'));
|
|
549
709
|
console.log();
|
|
550
710
|
}
|
|
551
711
|
catch (e) {
|
|
@@ -567,7 +727,7 @@ function semiLabel(s) {
|
|
|
567
727
|
}
|
|
568
728
|
// ─── cell --version / -v / version ───────────────────────────────────────────
|
|
569
729
|
function doVersion() {
|
|
570
|
-
const pkg = require('
|
|
730
|
+
const pkg = require('../../../../package.json');
|
|
571
731
|
console.log(`${C.primary('cell')} v${C.num(pkg.version)}`);
|
|
572
732
|
console.log(C.dim(` ${pkg.description}`));
|
|
573
733
|
console.log();
|
|
@@ -629,7 +789,7 @@ function doStatus() {
|
|
|
629
789
|
}
|
|
630
790
|
}
|
|
631
791
|
function showProjectStatus() {
|
|
632
|
-
const { getDeveloperProfile } = require('
|
|
792
|
+
const { getDeveloperProfile } = require('../../02-scanner/blindspots/code-scanner');
|
|
633
793
|
const profile = getDeveloperProfile(project);
|
|
634
794
|
if (!profile) {
|
|
635
795
|
console.log(C.warn(`\n No profile for "${project}". Run: cell start`));
|
|
@@ -644,7 +804,7 @@ function showProjectStatus() {
|
|
|
644
804
|
console.log(C.dim(' ─────────────────'));
|
|
645
805
|
// Stack fingerprint (from stack-detector)
|
|
646
806
|
try {
|
|
647
|
-
const { detectProjectDNA } = require('
|
|
807
|
+
const { detectProjectDNA } = require('../../02-scanner/stack/stack-detector');
|
|
648
808
|
const dna = detectProjectDNA(process.cwd());
|
|
649
809
|
if (dna && dna.stack.trustScore > 0) {
|
|
650
810
|
const s = dna.stack;
|
|
@@ -677,7 +837,7 @@ function showProjectStatus() {
|
|
|
677
837
|
}
|
|
678
838
|
// Behavioral data
|
|
679
839
|
try {
|
|
680
|
-
const { getBehaviorSummary } = require('
|
|
840
|
+
const { getBehaviorSummary } = require('../../03-knowledge/decisions/behavioral-tracker');
|
|
681
841
|
const b = getBehaviorSummary(project);
|
|
682
842
|
if (b.totalErrors > 0 || b.totalDecisions > 0 || b.currentContext || b.stuckIssues.length > 0) {
|
|
683
843
|
console.log(C.bold(' Behavior:'));
|
|
@@ -694,7 +854,7 @@ function showProjectStatus() {
|
|
|
694
854
|
catch { }
|
|
695
855
|
// ─── Git Intelligence ────────────────────────────────────────────────────
|
|
696
856
|
try {
|
|
697
|
-
const { buildDeveloperIntelligence } = require('
|
|
857
|
+
const { buildDeveloperIntelligence } = require('../../02-scanner/profile/developer-intelligence');
|
|
698
858
|
const gitIntel = buildDeveloperIntelligence(process.cwd());
|
|
699
859
|
if (gitIntel) {
|
|
700
860
|
console.log();
|
|
@@ -727,7 +887,7 @@ function showProjectStatus() {
|
|
|
727
887
|
catch { }
|
|
728
888
|
// ─── Predictions ─────────────────────────────────────────────────────────
|
|
729
889
|
try {
|
|
730
|
-
const { getQuickWarnings } = require('
|
|
890
|
+
const { getQuickWarnings } = require('../../03-knowledge/decisions/predictive-engine');
|
|
731
891
|
const warnings = getQuickWarnings(project);
|
|
732
892
|
if (warnings.length > 0) {
|
|
733
893
|
console.log();
|
|
@@ -788,7 +948,7 @@ function doSession() {
|
|
|
788
948
|
console.log(C.dim(' ───────────────────────────────'));
|
|
789
949
|
console.log();
|
|
790
950
|
try {
|
|
791
|
-
const { getLastTouchedFile, getPatternCounts, getBehaviorSummary } = require('
|
|
951
|
+
const { getLastTouchedFile, getPatternCounts, getBehaviorSummary } = require('../../03-knowledge/decisions/behavioral-tracker');
|
|
792
952
|
const last = getLastTouchedFile(project);
|
|
793
953
|
const patterns = getPatternCounts(project);
|
|
794
954
|
const behavior = getBehaviorSummary(project);
|
|
@@ -825,7 +985,7 @@ function doDecisions() {
|
|
|
825
985
|
console.log(C.dim(' ─────────────────────────────────'));
|
|
826
986
|
console.log();
|
|
827
987
|
try {
|
|
828
|
-
const { getRecentDecisionsWithAgo, getBehaviorSummary } = require('
|
|
988
|
+
const { getRecentDecisionsWithAgo, getBehaviorSummary } = require('../../03-knowledge/decisions/behavioral-tracker');
|
|
829
989
|
const decisions = getRecentDecisionsWithAgo(project, 5);
|
|
830
990
|
const behavior = getBehaviorSummary(project);
|
|
831
991
|
if (decisions.length === 0) {
|
|
@@ -903,7 +1063,7 @@ function doTeam() {
|
|
|
903
1063
|
// ─── team push ──────────────────────────────────────────────────────
|
|
904
1064
|
if (sub === 'push') {
|
|
905
1065
|
console.log(C.primary(' Pushing your patterns to team...'));
|
|
906
|
-
const { teamPush } = require('
|
|
1066
|
+
const { teamPush } = require('../../04-team/collab/team-git');
|
|
907
1067
|
const name = args[2];
|
|
908
1068
|
if (!name) {
|
|
909
1069
|
console.log(C.warn(' Usage: cell team push <your-name> [role]'));
|
|
@@ -919,7 +1079,7 @@ function doTeam() {
|
|
|
919
1079
|
// ─── team pull ──────────────────────────────────────────────────────
|
|
920
1080
|
if (sub === 'pull') {
|
|
921
1081
|
console.log(C.primary(' Pulling team data...'));
|
|
922
|
-
const { teamPull } = require('
|
|
1082
|
+
const { teamPull } = require('../../04-team/collab/team-git');
|
|
923
1083
|
const result = teamPull();
|
|
924
1084
|
if (result.success) {
|
|
925
1085
|
console.log(C.success(` ${result.message}`));
|
|
@@ -936,7 +1096,7 @@ function doTeam() {
|
|
|
936
1096
|
const newMember = args[2];
|
|
937
1097
|
const teamPath = path.join(process.cwd(), '.cell', 'team');
|
|
938
1098
|
console.log(C.primary(` Generating onboarding guide for ${newMember}...`));
|
|
939
|
-
const { generateOnboardingGuide, formatOnboardingText } = require('
|
|
1099
|
+
const { generateOnboardingGuide, formatOnboardingText } = require('../../04-team/collab/team-intel');
|
|
940
1100
|
const guide = generateOnboardingGuide(teamPath, newMember);
|
|
941
1101
|
if (guide) {
|
|
942
1102
|
console.log(formatOnboardingText(guide));
|
|
@@ -949,7 +1109,7 @@ function doTeam() {
|
|
|
949
1109
|
}
|
|
950
1110
|
// ─── team status ────────────────────────────────────────────────────
|
|
951
1111
|
if (sub === 'status') {
|
|
952
|
-
const { teamStatus } = require('
|
|
1112
|
+
const { teamStatus } = require('../../04-team/collab/team-git');
|
|
953
1113
|
const intel = teamStatus();
|
|
954
1114
|
if (!intel) {
|
|
955
1115
|
console.log(C.dim(' No team data. Run: cell team push <your-name>'));
|
|
@@ -990,7 +1150,7 @@ function doTeam() {
|
|
|
990
1150
|
// Team pattern library
|
|
991
1151
|
const teamPath = path.join(process.cwd(), '.cell', 'team');
|
|
992
1152
|
try {
|
|
993
|
-
const { buildTeamPatternLibrary } = require('
|
|
1153
|
+
const { buildTeamPatternLibrary } = require('../../04-team/collab/team-intel');
|
|
994
1154
|
const rules = buildTeamPatternLibrary(teamPath);
|
|
995
1155
|
if (rules.length > 0) {
|
|
996
1156
|
console.log(C.bold(' 📋 Pattern Library:'));
|
|
@@ -1012,7 +1172,7 @@ function doTeam() {
|
|
|
1012
1172
|
}
|
|
1013
1173
|
// ─── team silos ─────────────────────────────────────────────────────
|
|
1014
1174
|
if (sub === 'silos') {
|
|
1015
|
-
const { detectKnowledgeSilos } = require('
|
|
1175
|
+
const { detectKnowledgeSilos } = require('../../04-team/collab/team-collaboration');
|
|
1016
1176
|
const silos = detectKnowledgeSilos();
|
|
1017
1177
|
console.log(C.bold(` Knowledge Silos: ${silos.length}`));
|
|
1018
1178
|
console.log();
|
|
@@ -1031,7 +1191,7 @@ function doTeam() {
|
|
|
1031
1191
|
}
|
|
1032
1192
|
// ─── team bus-factor ───────────────────────────────────────────────
|
|
1033
1193
|
if (sub === 'bus-factor') {
|
|
1034
|
-
const { calculateBusFactor } = require('
|
|
1194
|
+
const { calculateBusFactor } = require('../../04-team/collab/team-collaboration');
|
|
1035
1195
|
const report = calculateBusFactor();
|
|
1036
1196
|
console.log(C.bold(` Bus Factor: ${report.overallScore}/100`));
|
|
1037
1197
|
console.log();
|
|
@@ -1053,7 +1213,7 @@ function doTeam() {
|
|
|
1053
1213
|
}
|
|
1054
1214
|
// ─── team health ───────────────────────────────────────────────────
|
|
1055
1215
|
if (sub === 'health') {
|
|
1056
|
-
const { getTeamHealth } = require('
|
|
1216
|
+
const { getTeamHealth } = require('../../04-team/collab/team-collaboration');
|
|
1057
1217
|
const health = getTeamHealth(args[2]);
|
|
1058
1218
|
console.log(C.bold(` Team Health: ${health.score}/100`));
|
|
1059
1219
|
console.log();
|
|
@@ -1080,7 +1240,7 @@ function doTeam() {
|
|
|
1080
1240
|
if (sub === 'community' || sub === 'comm') {
|
|
1081
1241
|
const csub = args[2];
|
|
1082
1242
|
if (csub === 'stats') {
|
|
1083
|
-
const { getCommunityStats } = require('
|
|
1243
|
+
const { getCommunityStats } = require('../../06-memory/stores/community-store');
|
|
1084
1244
|
const stats = getCommunityStats();
|
|
1085
1245
|
console.log(C.bold(' Community Stats'));
|
|
1086
1246
|
console.log(C.dim(` Patterns: ${stats.totalPatterns}, Insights: ${stats.totalInsights}, Benchmarks: ${stats.totalBenchmarks}`));
|
|
@@ -1095,7 +1255,7 @@ function doTeam() {
|
|
|
1095
1255
|
return;
|
|
1096
1256
|
}
|
|
1097
1257
|
if (csub === 'share' && args[3]) {
|
|
1098
|
-
const { shareCommunityPattern, validatePrivacy } = require('
|
|
1258
|
+
const { shareCommunityPattern, validatePrivacy } = require('../../06-memory/stores/community-store');
|
|
1099
1259
|
const rule = args[3];
|
|
1100
1260
|
const category = args[4] || 'general';
|
|
1101
1261
|
const language = args[5];
|
|
@@ -1118,7 +1278,7 @@ function doTeam() {
|
|
|
1118
1278
|
return;
|
|
1119
1279
|
}
|
|
1120
1280
|
if (csub === 'trends') {
|
|
1121
|
-
const { getTechEvolution } = require('
|
|
1281
|
+
const { getTechEvolution } = require('../../06-memory/stores/community-store');
|
|
1122
1282
|
const trends = getTechEvolution();
|
|
1123
1283
|
console.log(C.bold(' Technology Trends'));
|
|
1124
1284
|
for (const t of trends.slice(0, 10)) {
|
|
@@ -1134,7 +1294,7 @@ function doTeam() {
|
|
|
1134
1294
|
}
|
|
1135
1295
|
// ─── team usage (Phase 6) ──────────────────────────────────────────
|
|
1136
1296
|
if (sub === 'usage') {
|
|
1137
|
-
const { getUsageDashboard, getDecisionPatterns, detectRepeatMistakes, getBurnoutSignals } = require('
|
|
1297
|
+
const { getUsageDashboard, getDecisionPatterns, detectRepeatMistakes, getBurnoutSignals } = require('../../06-memory/stores/usage-intelligence-store');
|
|
1138
1298
|
const project = args[2] || 'Fivo-Cell';
|
|
1139
1299
|
const dash = getUsageDashboard(project);
|
|
1140
1300
|
console.log(C.bold(` Usage Dashboard — ${project}`));
|
|
@@ -1229,9 +1389,9 @@ function doWatch() {
|
|
|
1229
1389
|
// cell watch events fivo-cell --type file_save
|
|
1230
1390
|
// cell watch events --limit 5 --type file_create
|
|
1231
1391
|
const watchArgs = args.slice(2);
|
|
1232
|
-
const { positional } = require('
|
|
1233
|
-
const watchLimit = require('
|
|
1234
|
-
const watchEventType = require('
|
|
1392
|
+
const { positional } = require('../watcher/watch-cli').parseWatchFlags(watchArgs);
|
|
1393
|
+
const watchLimit = require('../watcher/watch-cli').parseWatchLimit(watchArgs);
|
|
1394
|
+
const watchEventType = require('../watcher/watch-cli').parseWatchEventType(watchArgs);
|
|
1235
1395
|
const project = positional[0] || path.basename(process.cwd());
|
|
1236
1396
|
const dir = positional[1] || process.cwd();
|
|
1237
1397
|
// If invoked with no subcommand: run as a long-lived watcher daemon (for .bat auto-restart loop)
|
|
@@ -1240,7 +1400,7 @@ function doWatch() {
|
|
|
1240
1400
|
return;
|
|
1241
1401
|
}
|
|
1242
1402
|
try {
|
|
1243
|
-
const liveWatcher = require('
|
|
1403
|
+
const liveWatcher = require('../watcher/live-watcher');
|
|
1244
1404
|
const http = require('http');
|
|
1245
1405
|
function callDaemon(toolName, toolArgs) {
|
|
1246
1406
|
return new Promise((resolve, reject) => {
|
|
@@ -1281,7 +1441,7 @@ function doWatch() {
|
|
|
1281
1441
|
return;
|
|
1282
1442
|
}
|
|
1283
1443
|
if (sub === 'events') {
|
|
1284
|
-
const { isValidEventType } = require('
|
|
1444
|
+
const { isValidEventType } = require('../watcher/watch-cli');
|
|
1285
1445
|
const typeFilter = isValidEventType(watchEventType) ? watchEventType : undefined;
|
|
1286
1446
|
const events = liveWatcher.getLiveEvents(project, watchLimit, typeFilter);
|
|
1287
1447
|
if (events.length === 0) {
|
|
@@ -1343,20 +1503,41 @@ function doBlindspots() {
|
|
|
1343
1503
|
console.log(C.bold(' Cell Blind Spots'));
|
|
1344
1504
|
console.log(C.dim(' ────────────────'));
|
|
1345
1505
|
console.log();
|
|
1346
|
-
const
|
|
1347
|
-
const
|
|
1506
|
+
const showTop = args.includes('--top');
|
|
1507
|
+
const topN = (() => {
|
|
1508
|
+
const idx = args.indexOf('--top');
|
|
1509
|
+
if (idx >= 0 && args[idx + 1] && /^\d+$/.test(args[idx + 1]))
|
|
1510
|
+
return parseInt(args[idx + 1], 10);
|
|
1511
|
+
return 5;
|
|
1512
|
+
})();
|
|
1513
|
+
const dirArg = args.find((a, i) => i >= 1 && !a.startsWith('--') && a !== String(topN));
|
|
1514
|
+
const dir = dirArg || process.cwd();
|
|
1515
|
+
const maxFiles = parseInt(args.find((a, i) => i >= 1 && !a.startsWith('--') && /^\d+$/.test(a) && a !== String(topN)) || '200', 10);
|
|
1348
1516
|
try {
|
|
1349
|
-
const { scanDirectoryForBlindSpots, formatBlindSpotReport, summarizeBlindSpots } = require('
|
|
1517
|
+
const { scanDirectoryForBlindSpots, formatBlindSpotReport, summarizeBlindSpots, getTopFixes, getCategorySummary } = require('../../../core/enhanced-blind-spots');
|
|
1350
1518
|
console.log(C.dim(` Scanning ${dir} (max ${maxFiles} files)...`));
|
|
1351
1519
|
const spots = scanDirectoryForBlindSpots(dir, maxFiles);
|
|
1352
1520
|
console.log();
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1521
|
+
if (showTop) {
|
|
1522
|
+
const topFixes = getTopFixes(spots, topN);
|
|
1523
|
+
console.log(C.bold(` Top ${topFixes.length} fixes first:`));
|
|
1524
|
+
for (let i = 0; i < topFixes.length; i++) {
|
|
1525
|
+
const s = topFixes[i];
|
|
1526
|
+
const score = s.priorityScore ? ` (score ${s.priorityScore.toFixed(1)})` : '';
|
|
1527
|
+
console.log(` ${C.num(String(i + 1))}. ${s.message}${score}`);
|
|
1528
|
+
console.log(` ${C.dim(s.filePath + ':' + s.lineNumber)} → ${s.recommendation}`);
|
|
1529
|
+
}
|
|
1530
|
+
console.log();
|
|
1531
|
+
}
|
|
1532
|
+
else {
|
|
1533
|
+
console.log(formatBlindSpotReport(spots));
|
|
1534
|
+
}
|
|
1535
|
+
const catSummary = getCategorySummary(spots);
|
|
1536
|
+
if (catSummary.length > 0) {
|
|
1356
1537
|
console.log();
|
|
1357
|
-
console.log(C.
|
|
1358
|
-
for (const
|
|
1359
|
-
console.log(` ${C.num(String(count))} ${
|
|
1538
|
+
console.log(C.bold(' By category:'));
|
|
1539
|
+
for (const c of catSummary) {
|
|
1540
|
+
console.log(` ${C.num(String(c.count))} ${c.category} (top: ${c.topSeverity})`);
|
|
1360
1541
|
}
|
|
1361
1542
|
}
|
|
1362
1543
|
}
|
|
@@ -1366,10 +1547,207 @@ function doBlindspots() {
|
|
|
1366
1547
|
}
|
|
1367
1548
|
console.log();
|
|
1368
1549
|
}
|
|
1550
|
+
// ─── cell doctor ─────────────────────────────────────────────────────────────
|
|
1551
|
+
async function doDoctor() {
|
|
1552
|
+
console.log();
|
|
1553
|
+
console.log(C.bold(' Cell Doctor — Health Check'));
|
|
1554
|
+
console.log(C.dim(' ─────────────────────────'));
|
|
1555
|
+
console.log();
|
|
1556
|
+
const { detectProject, checkScanState, checkWatchState, checkMcpState, isDaemonRunning, } = require('../setup/setup');
|
|
1557
|
+
const cwd = process.cwd();
|
|
1558
|
+
const project = detectProject(cwd);
|
|
1559
|
+
const issues = [];
|
|
1560
|
+
const passes = [];
|
|
1561
|
+
// 1. Git repo
|
|
1562
|
+
const gitDir = path.join(cwd, '.git');
|
|
1563
|
+
if (fs.existsSync(gitDir)) {
|
|
1564
|
+
console.log(` ${C.success('OK')} Git repo detected`);
|
|
1565
|
+
passes.push('git');
|
|
1566
|
+
}
|
|
1567
|
+
else {
|
|
1568
|
+
console.log(` ${C.warn('--')} Git repo not found (optional, but recommended)`);
|
|
1569
|
+
issues.push('git');
|
|
1570
|
+
}
|
|
1571
|
+
// 2. Node/TypeScript project
|
|
1572
|
+
const pkgJson = path.join(cwd, 'package.json');
|
|
1573
|
+
const tsconfig = path.join(cwd, 'tsconfig.json');
|
|
1574
|
+
if (fs.existsSync(pkgJson)) {
|
|
1575
|
+
console.log(` ${C.success('OK')} Node.js project detected (package.json)`);
|
|
1576
|
+
passes.push('node');
|
|
1577
|
+
}
|
|
1578
|
+
else {
|
|
1579
|
+
console.log(` ${C.warn('--')} No package.json found (non-Node project?)`);
|
|
1580
|
+
issues.push('node');
|
|
1581
|
+
}
|
|
1582
|
+
if (fs.existsSync(tsconfig)) {
|
|
1583
|
+
console.log(` ${C.success('OK')} TypeScript project detected (tsconfig.json)`);
|
|
1584
|
+
passes.push('typescript');
|
|
1585
|
+
}
|
|
1586
|
+
// 3. .cell folder
|
|
1587
|
+
const cellDir = path.join(cwd, '.cell');
|
|
1588
|
+
if (fs.existsSync(cellDir)) {
|
|
1589
|
+
const personalDir = path.join(cellDir, 'personal');
|
|
1590
|
+
const fileCount = fs.existsSync(personalDir) ? fs.readdirSync(personalDir).length : 0;
|
|
1591
|
+
console.log(` ${C.success('OK')} .cell/ folder exists (${fileCount} personal files)`);
|
|
1592
|
+
passes.push('cell-dir');
|
|
1593
|
+
}
|
|
1594
|
+
else {
|
|
1595
|
+
console.log(` ${C.warn('--')} No .cell/ folder found`);
|
|
1596
|
+
issues.push('cell-dir');
|
|
1597
|
+
}
|
|
1598
|
+
// 4. SQLite DB
|
|
1599
|
+
const dbPath = path.join(os.homedir(), '.fivo', 'cell', 'cell.db');
|
|
1600
|
+
if (fs.existsSync(dbPath)) {
|
|
1601
|
+
try {
|
|
1602
|
+
const stat = fs.statSync(dbPath);
|
|
1603
|
+
const sizeMB = (stat.size / 1024 / 1024).toFixed(1);
|
|
1604
|
+
console.log(` ${C.success('OK')} SQLite DB exists (${sizeMB} MB)`);
|
|
1605
|
+
passes.push('db');
|
|
1606
|
+
}
|
|
1607
|
+
catch {
|
|
1608
|
+
console.log(` ${C.warn('--')} SQLite DB exists but not readable`);
|
|
1609
|
+
issues.push('db');
|
|
1610
|
+
}
|
|
1611
|
+
}
|
|
1612
|
+
else {
|
|
1613
|
+
console.log(` ${C.warn('--')} No SQLite DB found`);
|
|
1614
|
+
issues.push('db');
|
|
1615
|
+
}
|
|
1616
|
+
// 5. Last scan
|
|
1617
|
+
const scan = checkScanState(cwd);
|
|
1618
|
+
if (scan.done) {
|
|
1619
|
+
console.log(` ${C.success('OK')} Scan completed (${scan.reason})`);
|
|
1620
|
+
passes.push('scan');
|
|
1621
|
+
}
|
|
1622
|
+
else {
|
|
1623
|
+
console.log(` ${C.warn('--')} No scan found (${scan.reason})`);
|
|
1624
|
+
issues.push('scan');
|
|
1625
|
+
}
|
|
1626
|
+
// 6. Daemon / bridge status
|
|
1627
|
+
const daemonUp = await isDaemonRunning();
|
|
1628
|
+
if (daemonUp) {
|
|
1629
|
+
console.log(` ${C.success('OK')} Daemon running on http://localhost:9876`);
|
|
1630
|
+
passes.push('daemon');
|
|
1631
|
+
}
|
|
1632
|
+
else {
|
|
1633
|
+
console.log(` ${C.warn('--')} Daemon not running`);
|
|
1634
|
+
issues.push('daemon');
|
|
1635
|
+
}
|
|
1636
|
+
// 7. Watcher status
|
|
1637
|
+
const watch = checkWatchState(project.name);
|
|
1638
|
+
if (watch.done) {
|
|
1639
|
+
console.log(` ${C.success('OK')} Watcher active (${watch.reason})`);
|
|
1640
|
+
passes.push('watcher');
|
|
1641
|
+
}
|
|
1642
|
+
else {
|
|
1643
|
+
console.log(` ${C.warn('--')} Watcher not active (${watch.reason})`);
|
|
1644
|
+
if (daemonUp)
|
|
1645
|
+
issues.push('watcher');
|
|
1646
|
+
}
|
|
1647
|
+
// 8. Bridge status
|
|
1648
|
+
try {
|
|
1649
|
+
const { discoverBridgePort } = require('../watcher/socket-bridge');
|
|
1650
|
+
const port = discoverBridgePort();
|
|
1651
|
+
if (port) {
|
|
1652
|
+
console.log(` ${C.success('OK')} Bridge reachable (port ${port})`);
|
|
1653
|
+
passes.push('bridge');
|
|
1654
|
+
}
|
|
1655
|
+
else {
|
|
1656
|
+
console.log(` ${C.warn('--')} Bridge not running`);
|
|
1657
|
+
issues.push('bridge');
|
|
1658
|
+
}
|
|
1659
|
+
}
|
|
1660
|
+
catch {
|
|
1661
|
+
console.log(` ${C.warn('--')} Bridge not running`);
|
|
1662
|
+
issues.push('bridge');
|
|
1663
|
+
}
|
|
1664
|
+
// 9. AGENTS.md / .cursorrules
|
|
1665
|
+
const agentsMd = path.join(cwd, 'AGENTS.md');
|
|
1666
|
+
const cursorRules = path.join(cwd, '.cursorrules');
|
|
1667
|
+
const rulesFound = [];
|
|
1668
|
+
if (fs.existsSync(agentsMd))
|
|
1669
|
+
rulesFound.push('AGENTS.md');
|
|
1670
|
+
if (fs.existsSync(cursorRules))
|
|
1671
|
+
rulesFound.push('.cursorrules');
|
|
1672
|
+
if (rulesFound.length > 0) {
|
|
1673
|
+
console.log(` ${C.success('OK')} AI rules: ${rulesFound.join(', ')}`);
|
|
1674
|
+
passes.push('rules');
|
|
1675
|
+
}
|
|
1676
|
+
else {
|
|
1677
|
+
console.log(` ${C.warn('--')} No AGENTS.md or .cursorrules found`);
|
|
1678
|
+
issues.push('rules');
|
|
1679
|
+
}
|
|
1680
|
+
// 10. MCP config
|
|
1681
|
+
const mcp = checkMcpState(os.homedir());
|
|
1682
|
+
if (mcp.done > 0) {
|
|
1683
|
+
console.log(` ${C.success('OK')} MCP config: ${mcp.done}/${mcp.total} IDEs wired`);
|
|
1684
|
+
passes.push('mcp');
|
|
1685
|
+
}
|
|
1686
|
+
else {
|
|
1687
|
+
console.log(` ${C.warn('--')} No MCP configs found (run: cell mcp-config)`);
|
|
1688
|
+
issues.push('mcp');
|
|
1689
|
+
}
|
|
1690
|
+
// 11. First-run state
|
|
1691
|
+
const firstRunFile = path.join(os.homedir(), '.fivo', 'cell', '.first-run-shown');
|
|
1692
|
+
const stateFile = path.join(os.homedir(), '.fivo', 'cell', 'cell-state.json');
|
|
1693
|
+
if (fs.existsSync(stateFile)) {
|
|
1694
|
+
try {
|
|
1695
|
+
const state = JSON.parse(fs.readFileSync(stateFile, 'utf8'));
|
|
1696
|
+
console.log(` ${C.success('OK')} First-run state: setup at ${state.setup_completed || 'unknown'}`);
|
|
1697
|
+
passes.push('first-run');
|
|
1698
|
+
}
|
|
1699
|
+
catch {
|
|
1700
|
+
console.log(` ${C.dim('--')} First-run state file exists but unreadable`);
|
|
1701
|
+
}
|
|
1702
|
+
}
|
|
1703
|
+
else if (fs.existsSync(firstRunFile)) {
|
|
1704
|
+
console.log(` ${C.success('OK')} First-run greeting shown`);
|
|
1705
|
+
passes.push('first-run');
|
|
1706
|
+
}
|
|
1707
|
+
else {
|
|
1708
|
+
console.log(` ${C.dim('--')} First-run not completed yet`);
|
|
1709
|
+
issues.push('first-run');
|
|
1710
|
+
}
|
|
1711
|
+
// ─── Summary ──────────────────────────────────────────────────────────
|
|
1712
|
+
console.log();
|
|
1713
|
+
const total = passes.length + issues.length;
|
|
1714
|
+
if (issues.length === 0) {
|
|
1715
|
+
console.log(C.success(` All ${total} checks passed. Cell is fully healthy.`));
|
|
1716
|
+
}
|
|
1717
|
+
else {
|
|
1718
|
+
console.log(C.warn(` ${passes.length}/${total} checks passed, ${issues.length} need attention:`));
|
|
1719
|
+
console.log();
|
|
1720
|
+
const recovery = {
|
|
1721
|
+
'cell-dir': 'cell scan',
|
|
1722
|
+
'db': 'cell start',
|
|
1723
|
+
'scan': 'cell scan',
|
|
1724
|
+
'daemon': 'cell start',
|
|
1725
|
+
'watcher': 'cell start (then: cell watch start)',
|
|
1726
|
+
'bridge': 'cell bridge start',
|
|
1727
|
+
'rules': 'cell scan (writes AGENTS.md + .cursorrules)',
|
|
1728
|
+
'mcp': 'cell mcp-config',
|
|
1729
|
+
'first-run': 'cell setup',
|
|
1730
|
+
'git': 'git init',
|
|
1731
|
+
'node': 'npm init -y',
|
|
1732
|
+
};
|
|
1733
|
+
for (const issue of issues) {
|
|
1734
|
+
const fix = recovery[issue];
|
|
1735
|
+
if (fix) {
|
|
1736
|
+
console.log(` ${C.warn('!')} ${issue}: Run ${C.primary(fix)}`);
|
|
1737
|
+
}
|
|
1738
|
+
}
|
|
1739
|
+
}
|
|
1740
|
+
console.log();
|
|
1741
|
+
try {
|
|
1742
|
+
const { markDoctorRun } = require('../setup/cell-state');
|
|
1743
|
+
markDoctorRun();
|
|
1744
|
+
}
|
|
1745
|
+
catch { }
|
|
1746
|
+
}
|
|
1369
1747
|
// Long-lived watcher daemon — auto-attaches to current project, runs forever.
|
|
1370
1748
|
// Used by fivo-cell-daemon.bat to keep a watcher alive in the background.
|
|
1371
1749
|
function runWatchDaemon(project, dir) {
|
|
1372
|
-
const liveWatcher = require('
|
|
1750
|
+
const liveWatcher = require('../watcher/live-watcher');
|
|
1373
1751
|
const result = liveWatcher.startWatcher(project, dir);
|
|
1374
1752
|
if (!result.started) {
|
|
1375
1753
|
// "already running" means the daemon process already has a watcher; keep this process alive anyway
|
|
@@ -1404,7 +1782,7 @@ function doCommunity() {
|
|
|
1404
1782
|
const sub = args[1] || '';
|
|
1405
1783
|
if (sub === 'share') {
|
|
1406
1784
|
try {
|
|
1407
|
-
const { sharePatterns } = require('
|
|
1785
|
+
const { sharePatterns } = require('../../05-community/stats/community-intel');
|
|
1408
1786
|
const result = sharePatterns();
|
|
1409
1787
|
console.log(result.success ? C.success(` ${result.message}`) : C.warn(` ${result.message}`));
|
|
1410
1788
|
console.log(C.dim(' Anonymous — only pattern types shared, zero code.'));
|
|
@@ -1417,7 +1795,7 @@ function doCommunity() {
|
|
|
1417
1795
|
}
|
|
1418
1796
|
if (sub === 'browse' || sub === '') {
|
|
1419
1797
|
try {
|
|
1420
|
-
const { generateCommunityReport } = require('
|
|
1798
|
+
const { generateCommunityReport } = require('../../05-community/stats/community-intel');
|
|
1421
1799
|
const report = generateCommunityReport();
|
|
1422
1800
|
if (report.patterns.length > 0) {
|
|
1423
1801
|
console.log(C.bold(` 📊 Top Patterns (${report.patterns.length} total):`));
|
|
@@ -1460,21 +1838,696 @@ function doCommunity() {
|
|
|
1460
1838
|
}
|
|
1461
1839
|
// ─── cell context ───────────────────────────────────────────────────────────
|
|
1462
1840
|
function doContext() {
|
|
1463
|
-
|
|
1464
|
-
|
|
1841
|
+
const positionalArgs = args.slice(1).filter(a => !a.startsWith('--'));
|
|
1842
|
+
const projectArg = positionalArgs[0] || project;
|
|
1843
|
+
const toolArg = positionalArgs[1] || 'claude-code';
|
|
1844
|
+
let showLive = true;
|
|
1845
|
+
let asJson = false;
|
|
1846
|
+
let port = null;
|
|
1847
|
+
let host = '127.0.0.1';
|
|
1848
|
+
let shortMode = false;
|
|
1849
|
+
let fullMode = false;
|
|
1850
|
+
for (let i = 2; i < args.length; i++) {
|
|
1851
|
+
const a = args[i];
|
|
1852
|
+
if (a === '--no-live') {
|
|
1853
|
+
showLive = false;
|
|
1854
|
+
continue;
|
|
1855
|
+
}
|
|
1856
|
+
if (a === '--json') {
|
|
1857
|
+
asJson = true;
|
|
1858
|
+
continue;
|
|
1859
|
+
}
|
|
1860
|
+
if (a === '--short') {
|
|
1861
|
+
shortMode = true;
|
|
1862
|
+
continue;
|
|
1863
|
+
}
|
|
1864
|
+
if (a === '--full') {
|
|
1865
|
+
fullMode = true;
|
|
1866
|
+
continue;
|
|
1867
|
+
}
|
|
1868
|
+
if (typeof a === 'string' && a.startsWith('--port='))
|
|
1869
|
+
port = parseInt(a.split('=')[1], 10) || null;
|
|
1870
|
+
if (typeof a === 'string' && a.startsWith('--host='))
|
|
1871
|
+
host = a.split('=')[1] || '127.0.0.1';
|
|
1872
|
+
}
|
|
1873
|
+
// Try to discover bridge port from pid file if not specified
|
|
1874
|
+
if (port === null) {
|
|
1875
|
+
try {
|
|
1876
|
+
const { discoverBridgePort } = require('../watcher/socket-bridge');
|
|
1877
|
+
const discovered = discoverBridgePort();
|
|
1878
|
+
if (discovered)
|
|
1879
|
+
port = discovered;
|
|
1880
|
+
}
|
|
1881
|
+
catch { /* ignore */ }
|
|
1882
|
+
}
|
|
1883
|
+
if (port === null)
|
|
1884
|
+
port = 9877;
|
|
1885
|
+
// Async wrapper to print live state then static context (in order).
|
|
1886
|
+
const run = async () => {
|
|
1887
|
+
let liveStates = [];
|
|
1888
|
+
let liveError;
|
|
1889
|
+
if (showLive) {
|
|
1890
|
+
try {
|
|
1891
|
+
const { queryBridgeEditorStates } = require('../watcher/socket-bridge');
|
|
1892
|
+
const result = await queryBridgeEditorStates(projectArg, port, host);
|
|
1893
|
+
liveStates = result.states;
|
|
1894
|
+
liveError = result.error;
|
|
1895
|
+
}
|
|
1896
|
+
catch (e) {
|
|
1897
|
+
liveError = e?.message || String(e);
|
|
1898
|
+
}
|
|
1899
|
+
}
|
|
1900
|
+
if (asJson) {
|
|
1901
|
+
let ctx;
|
|
1902
|
+
try {
|
|
1903
|
+
const { buildContext } = require('../../01-context/context/prompt-builder');
|
|
1904
|
+
ctx = buildContext(projectArg, toolArg);
|
|
1905
|
+
}
|
|
1906
|
+
catch (e) {
|
|
1907
|
+
console.log(JSON.stringify({ error: e?.message || String(e) }));
|
|
1908
|
+
return;
|
|
1909
|
+
}
|
|
1910
|
+
console.log(JSON.stringify({
|
|
1911
|
+
...ctx,
|
|
1912
|
+
liveEditorStates: liveStates,
|
|
1913
|
+
liveError: liveError,
|
|
1914
|
+
}, null, 2));
|
|
1915
|
+
return;
|
|
1916
|
+
}
|
|
1917
|
+
// Print live state at top
|
|
1918
|
+
if (showLive) {
|
|
1919
|
+
if (liveStates.length > 0) {
|
|
1920
|
+
console.log(C.bold(' ── Live Editor State (Feature #2) ──'));
|
|
1921
|
+
for (const s of liveStates) {
|
|
1922
|
+
const dirtyMark = s.isDirty ? C.warn(' [unsaved]') : '';
|
|
1923
|
+
console.log(` ${C.primary(s.editorName)}: ${s.filePath}:${s.line}:${s.column}${dirtyMark}`);
|
|
1924
|
+
if (s.language)
|
|
1925
|
+
console.log(C.dim(` language: ${s.language}`));
|
|
1926
|
+
if (s.unsavedBuffer) {
|
|
1927
|
+
const allLines = s.unsavedBuffer.split('\n');
|
|
1928
|
+
const head = allLines.slice(0, 5);
|
|
1929
|
+
console.log(C.dim(` unsaved (${s.unsavedLength || s.unsavedBuffer.length} chars):`));
|
|
1930
|
+
for (const line of head) {
|
|
1931
|
+
console.log(C.dim(` ${line.length > 80 ? line.slice(0, 77) + '...' : line}`));
|
|
1932
|
+
}
|
|
1933
|
+
if (allLines.length > 5) {
|
|
1934
|
+
console.log(C.dim(` ... ${allLines.length - 5} more lines`));
|
|
1935
|
+
}
|
|
1936
|
+
}
|
|
1937
|
+
}
|
|
1938
|
+
console.log('');
|
|
1939
|
+
}
|
|
1940
|
+
else if (liveError) {
|
|
1941
|
+
console.log(C.dim(' ── Live Editor State ──'));
|
|
1942
|
+
console.log(C.dim(` Bridge not reachable (${liveError}). Start with: cell bridge start`));
|
|
1943
|
+
console.log('');
|
|
1944
|
+
}
|
|
1945
|
+
else {
|
|
1946
|
+
console.log(C.dim(' ── Live Editor State ──'));
|
|
1947
|
+
console.log(C.dim(` No editors connected for "${projectArg}"`));
|
|
1948
|
+
console.log(C.dim(' Start an editor that pushes to the bridge (or run cell bridge status)'));
|
|
1949
|
+
console.log('');
|
|
1950
|
+
}
|
|
1951
|
+
}
|
|
1952
|
+
// Static project context
|
|
1953
|
+
try {
|
|
1954
|
+
const { buildContext, formatContextForTool } = require('../../01-context/context/prompt-builder');
|
|
1955
|
+
const ctx = buildContext(projectArg, toolArg);
|
|
1956
|
+
const text = formatContextForTool(ctx, toolArg, projectArg);
|
|
1957
|
+
if (shortMode) {
|
|
1958
|
+
const lines = text.split('\n');
|
|
1959
|
+
const shortLines = [];
|
|
1960
|
+
let inCore = false;
|
|
1961
|
+
let coreCount = 0;
|
|
1962
|
+
for (const line of lines) {
|
|
1963
|
+
if (line.startsWith('## ') || line.startsWith('# ')) {
|
|
1964
|
+
if (coreCount > 0)
|
|
1965
|
+
break;
|
|
1966
|
+
inCore = true;
|
|
1967
|
+
}
|
|
1968
|
+
if (inCore) {
|
|
1969
|
+
shortLines.push(line);
|
|
1970
|
+
if (line.trim() && !line.startsWith('#') && !line.startsWith('─'))
|
|
1971
|
+
coreCount++;
|
|
1972
|
+
}
|
|
1973
|
+
}
|
|
1974
|
+
if (shortLines.length === 0) {
|
|
1975
|
+
const first5 = lines.slice(0, 5);
|
|
1976
|
+
console.log(first5.join('\n'));
|
|
1977
|
+
console.log(C.dim(` ... (${lines.length} total lines. Use --full to see all)`));
|
|
1978
|
+
}
|
|
1979
|
+
else {
|
|
1980
|
+
console.log(shortLines.join('\n'));
|
|
1981
|
+
console.log(C.dim(` ... (${lines.length} total lines. Use --full or no flag for default)`));
|
|
1982
|
+
}
|
|
1983
|
+
}
|
|
1984
|
+
else if (fullMode) {
|
|
1985
|
+
console.log(text);
|
|
1986
|
+
}
|
|
1987
|
+
else {
|
|
1988
|
+
console.log(text);
|
|
1989
|
+
}
|
|
1990
|
+
try {
|
|
1991
|
+
const { markFirstContext } = require('../setup/cell-state');
|
|
1992
|
+
markFirstContext();
|
|
1993
|
+
}
|
|
1994
|
+
catch { }
|
|
1995
|
+
try {
|
|
1996
|
+
const { captureCurrentBranchSnapshot } = require('../../03-knowledge/decisions/branch-snapshot');
|
|
1997
|
+
captureCurrentBranchSnapshot(projectArg, process.cwd());
|
|
1998
|
+
}
|
|
1999
|
+
catch { }
|
|
2000
|
+
}
|
|
2001
|
+
catch (e) {
|
|
2002
|
+
console.log(C.warn(' No context available yet.'));
|
|
2003
|
+
console.log(C.dim(' Run these commands first:'));
|
|
2004
|
+
console.log(C.primary(' cell scan'));
|
|
2005
|
+
console.log(C.primary(' cell doctor'));
|
|
2006
|
+
}
|
|
2007
|
+
};
|
|
2008
|
+
run();
|
|
2009
|
+
}
|
|
2010
|
+
// ─── cell replay — show full session timeline ──────────────────────────────
|
|
2011
|
+
function doReplay() {
|
|
2012
|
+
// args[1] = project (optional, defaults to cwd)
|
|
2013
|
+
// args[2] = sessionId (optional)
|
|
2014
|
+
// --since <ISO>
|
|
2015
|
+
// --until <ISO>
|
|
2016
|
+
// --type file_save,cursor_move,...
|
|
2017
|
+
// --file <path>
|
|
2018
|
+
// --format text|json|markdown|compact
|
|
2019
|
+
// --group minute|hour|file|type
|
|
2020
|
+
// --limit <n>
|
|
2021
|
+
// --recent <n> (replay last N events, ignoring other filters)
|
|
2022
|
+
// --summary (just show session summary, no events)
|
|
2023
|
+
// --last (shorthand for --recent 50)
|
|
1465
2024
|
const projectArg = args[1] || project;
|
|
1466
|
-
|
|
1467
|
-
let
|
|
2025
|
+
let sessionId;
|
|
2026
|
+
let since;
|
|
2027
|
+
let until;
|
|
2028
|
+
let eventTypes;
|
|
2029
|
+
let filePath;
|
|
2030
|
+
let filePattern;
|
|
2031
|
+
let format = 'text';
|
|
2032
|
+
let groupBy = 'none';
|
|
2033
|
+
let limit;
|
|
2034
|
+
let recent;
|
|
2035
|
+
let summaryOnly = false;
|
|
2036
|
+
for (let i = 2; i < args.length; i++) {
|
|
2037
|
+
const a = args[i];
|
|
2038
|
+
if (a === '--since' && i + 1 < args.length) {
|
|
2039
|
+
since = args[++i];
|
|
2040
|
+
continue;
|
|
2041
|
+
}
|
|
2042
|
+
if (a.startsWith('--since=')) {
|
|
2043
|
+
since = a.slice('--since='.length);
|
|
2044
|
+
continue;
|
|
2045
|
+
}
|
|
2046
|
+
if (a === '--until' && i + 1 < args.length) {
|
|
2047
|
+
until = args[++i];
|
|
2048
|
+
continue;
|
|
2049
|
+
}
|
|
2050
|
+
if (a.startsWith('--until=')) {
|
|
2051
|
+
until = a.slice('--until='.length);
|
|
2052
|
+
continue;
|
|
2053
|
+
}
|
|
2054
|
+
if (a === '--type' && i + 1 < args.length) {
|
|
2055
|
+
eventTypes = args[++i].split(',');
|
|
2056
|
+
continue;
|
|
2057
|
+
}
|
|
2058
|
+
if (a.startsWith('--type=')) {
|
|
2059
|
+
eventTypes = a.slice('--type='.length).split(',');
|
|
2060
|
+
continue;
|
|
2061
|
+
}
|
|
2062
|
+
if (a === '--file' && i + 1 < args.length) {
|
|
2063
|
+
filePath = args[++i];
|
|
2064
|
+
continue;
|
|
2065
|
+
}
|
|
2066
|
+
if (a.startsWith('--file=')) {
|
|
2067
|
+
filePath = a.slice('--file='.length);
|
|
2068
|
+
continue;
|
|
2069
|
+
}
|
|
2070
|
+
if (a === '--pattern' && i + 1 < args.length) {
|
|
2071
|
+
filePattern = args[++i];
|
|
2072
|
+
continue;
|
|
2073
|
+
}
|
|
2074
|
+
if (a.startsWith('--pattern=')) {
|
|
2075
|
+
filePattern = a.slice('--pattern='.length);
|
|
2076
|
+
continue;
|
|
2077
|
+
}
|
|
2078
|
+
if (a === '--format' && i + 1 < args.length) {
|
|
2079
|
+
format = args[++i];
|
|
2080
|
+
continue;
|
|
2081
|
+
}
|
|
2082
|
+
if (a.startsWith('--format=')) {
|
|
2083
|
+
format = a.slice('--format='.length);
|
|
2084
|
+
continue;
|
|
2085
|
+
}
|
|
2086
|
+
if (a === '--group' && i + 1 < args.length) {
|
|
2087
|
+
groupBy = args[++i];
|
|
2088
|
+
continue;
|
|
2089
|
+
}
|
|
2090
|
+
if (a.startsWith('--group=')) {
|
|
2091
|
+
groupBy = a.slice('--group='.length);
|
|
2092
|
+
continue;
|
|
2093
|
+
}
|
|
2094
|
+
if (a === '--limit' && i + 1 < args.length) {
|
|
2095
|
+
limit = parseInt(args[++i], 10);
|
|
2096
|
+
continue;
|
|
2097
|
+
}
|
|
2098
|
+
if (a.startsWith('--limit=')) {
|
|
2099
|
+
limit = parseInt(a.slice('--limit='.length), 10);
|
|
2100
|
+
continue;
|
|
2101
|
+
}
|
|
2102
|
+
if (a === '--recent' && i + 1 < args.length) {
|
|
2103
|
+
recent = parseInt(args[++i], 10);
|
|
2104
|
+
continue;
|
|
2105
|
+
}
|
|
2106
|
+
if (a.startsWith('--recent=')) {
|
|
2107
|
+
recent = parseInt(a.slice('--recent='.length), 10);
|
|
2108
|
+
continue;
|
|
2109
|
+
}
|
|
2110
|
+
if (a === '--last') {
|
|
2111
|
+
recent = 50;
|
|
2112
|
+
continue;
|
|
2113
|
+
}
|
|
2114
|
+
if (a === '--summary') {
|
|
2115
|
+
summaryOnly = true;
|
|
2116
|
+
continue;
|
|
2117
|
+
}
|
|
2118
|
+
if (a === '--session' && i + 1 < args.length) {
|
|
2119
|
+
sessionId = parseInt(args[++i], 10);
|
|
2120
|
+
continue;
|
|
2121
|
+
}
|
|
2122
|
+
if (a.startsWith('--session=')) {
|
|
2123
|
+
sessionId = parseInt(a.slice('--session='.length), 10);
|
|
2124
|
+
continue;
|
|
2125
|
+
}
|
|
2126
|
+
if (/^\d+$/.test(a) && sessionId === undefined) {
|
|
2127
|
+
sessionId = parseInt(a, 10);
|
|
2128
|
+
continue;
|
|
2129
|
+
}
|
|
2130
|
+
}
|
|
2131
|
+
let result;
|
|
1468
2132
|
try {
|
|
1469
|
-
const {
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
2133
|
+
const { replay, replayRecent, summarizeSession, renderSessionSummary } = require('../../01-context/sessions/replay');
|
|
2134
|
+
if (recent !== undefined) {
|
|
2135
|
+
result = replayRecent(projectArg, recent, format);
|
|
2136
|
+
}
|
|
2137
|
+
else {
|
|
2138
|
+
result = replay({
|
|
2139
|
+
project: projectArg,
|
|
2140
|
+
sessionId,
|
|
2141
|
+
eventTypes: eventTypes,
|
|
2142
|
+
since,
|
|
2143
|
+
until,
|
|
2144
|
+
filePath,
|
|
2145
|
+
filePattern,
|
|
2146
|
+
limit,
|
|
2147
|
+
format,
|
|
2148
|
+
groupBy,
|
|
2149
|
+
});
|
|
2150
|
+
}
|
|
2151
|
+
if (summaryOnly && sessionId !== undefined) {
|
|
2152
|
+
const summary = summarizeSession(projectArg, sessionId);
|
|
2153
|
+
if (!summary) {
|
|
2154
|
+
console.log(C.warn(` No session #${sessionId} found for project "${projectArg}".`));
|
|
2155
|
+
return;
|
|
2156
|
+
}
|
|
2157
|
+
console.log(renderSessionSummary(summary));
|
|
2158
|
+
return;
|
|
2159
|
+
}
|
|
2160
|
+
if (result.filteredCount === 0) {
|
|
2161
|
+
console.log(C.warn(` No${eventTypes ? ' ' + eventTypes.join(',') : ''} events to replay yet.`));
|
|
2162
|
+
console.log(C.dim(` Project: ${projectArg}`));
|
|
2163
|
+
console.log(C.dim(' Start capturing by running:'));
|
|
2164
|
+
console.log(C.primary(' cell scan'));
|
|
2165
|
+
console.log(C.primary(' cell session start --tool claude-code'));
|
|
2166
|
+
console.log(C.primary(' cell bridge start'));
|
|
2167
|
+
return;
|
|
2168
|
+
}
|
|
2169
|
+
console.log(result.formatted);
|
|
1473
2170
|
}
|
|
1474
2171
|
catch (e) {
|
|
1475
|
-
console.log(C.warn('
|
|
1476
|
-
|
|
1477
|
-
|
|
2172
|
+
console.log(C.warn(' Replay failed: ' + (e?.message || String(e))));
|
|
2173
|
+
}
|
|
2174
|
+
}
|
|
2175
|
+
// ─── cell continue — resume last session with full context ────────────────
|
|
2176
|
+
function doContinue() {
|
|
2177
|
+
// args[1] = project (optional, defaults to cwd)
|
|
2178
|
+
// args[2] = tool (optional, e.g. 'cursor', 'claude-code')
|
|
2179
|
+
// --tool <name> tool to format context for
|
|
2180
|
+
// --no-snapshot skip writing the session-end snapshot
|
|
2181
|
+
const projectArg = args[1] || project;
|
|
2182
|
+
let toolArg = args[2] || 'claude-code';
|
|
2183
|
+
let writeSnapshot = true;
|
|
2184
|
+
for (let i = 2; i < args.length; i++) {
|
|
2185
|
+
const a = args[i];
|
|
2186
|
+
if (a === '--tool' && i + 1 < args.length) {
|
|
2187
|
+
toolArg = args[++i];
|
|
2188
|
+
continue;
|
|
2189
|
+
}
|
|
2190
|
+
if (a.startsWith('--tool=')) {
|
|
2191
|
+
toolArg = a.slice('--tool='.length);
|
|
2192
|
+
continue;
|
|
2193
|
+
}
|
|
2194
|
+
if (a === '--no-snapshot') {
|
|
2195
|
+
writeSnapshot = false;
|
|
2196
|
+
continue;
|
|
2197
|
+
}
|
|
2198
|
+
}
|
|
2199
|
+
try {
|
|
2200
|
+
const { SessionMemory } = require('../../01-context/sessions/session-memory');
|
|
2201
|
+
const { linkSessionToRecentEvents, recordSessionStart, recordSessionEnd, recordFileFocus } = require('../../01-context/sessions/event-capture');
|
|
2202
|
+
const { summarizeSession, renderSessionSummary } = require('../../01-context/sessions/replay');
|
|
2203
|
+
const { buildContext, formatContextForTool } = require('../../01-context/context/prompt-builder');
|
|
2204
|
+
const mem = new SessionMemory();
|
|
2205
|
+
// 1) Find the last session for this project
|
|
2206
|
+
const lastSession = mem.getLastSessionForProject(projectArg);
|
|
2207
|
+
if (!lastSession) {
|
|
2208
|
+
console.log(C.warn(' No previous session found for this project.'));
|
|
2209
|
+
console.log(C.dim(' Start one with:'));
|
|
2210
|
+
console.log(C.primary(' cell session start --tool claude-code'));
|
|
2211
|
+
console.log(C.dim(' Then: cell continue (resume anytime)'));
|
|
2212
|
+
return;
|
|
2213
|
+
}
|
|
2214
|
+
// 2) Show summary of the last session
|
|
2215
|
+
const summary = summarizeSession(projectArg, lastSession.id);
|
|
2216
|
+
if (summary) {
|
|
2217
|
+
console.log(C.bold(' ── Last Session ──'));
|
|
2218
|
+
console.log(renderSessionSummary(summary));
|
|
2219
|
+
console.log('');
|
|
2220
|
+
}
|
|
2221
|
+
// 3) Open a new session
|
|
2222
|
+
const newSessionId = mem.startSession(toolArg, projectArg);
|
|
2223
|
+
recordSessionStart({ project: projectArg, sessionId: newSessionId, toolName: toolArg });
|
|
2224
|
+
const linked = linkSessionToRecentEvents(projectArg, newSessionId, true);
|
|
2225
|
+
console.log(C.success(` ✓ New session #${newSessionId} started in ${toolArg}`));
|
|
2226
|
+
if (linked > 0) {
|
|
2227
|
+
console.log(C.dim(` Linked ${linked} recent events to this session`));
|
|
2228
|
+
}
|
|
2229
|
+
console.log('');
|
|
2230
|
+
// 4) Build and show the cross-tool context block
|
|
2231
|
+
try {
|
|
2232
|
+
const ctx = buildContext(projectArg, toolArg);
|
|
2233
|
+
const text = formatContextForTool(ctx, toolArg, projectArg);
|
|
2234
|
+
console.log(C.bold(' ── Context to inject ──'));
|
|
2235
|
+
console.log(text);
|
|
2236
|
+
}
|
|
2237
|
+
catch (e) {
|
|
2238
|
+
console.log(C.warn(' Could not build context (run cell scan first).'));
|
|
2239
|
+
}
|
|
2240
|
+
// 5) Print session ID for later use with `cell replay --session <id>`
|
|
2241
|
+
console.log('');
|
|
2242
|
+
console.log(C.dim(` To replay this session later: cell replay ${projectArg} ${newSessionId}`));
|
|
2243
|
+
console.log(C.dim(` To end this session: cell session end ${newSessionId} ${projectArg}`));
|
|
2244
|
+
}
|
|
2245
|
+
catch (e) {
|
|
2246
|
+
console.log(C.warn(' Continue failed: ' + (e?.message || String(e))));
|
|
2247
|
+
}
|
|
2248
|
+
}
|
|
2249
|
+
// ─── cell bridge — bidirectional editor↔daemon socket ────────────────────
|
|
2250
|
+
function doBridge() {
|
|
2251
|
+
// args[1] = subcommand: start | stop | status | kill (default: status)
|
|
2252
|
+
// --port <n> port to bind (default 9877)
|
|
2253
|
+
// --host <ip> host to bind (default 127.0.0.1)
|
|
2254
|
+
// --foreground don't detach (default for tests/debug)
|
|
2255
|
+
const sub = args[1] || 'status';
|
|
2256
|
+
let port = 9877;
|
|
2257
|
+
let host = '127.0.0.1';
|
|
2258
|
+
for (let i = 2; i < args.length; i++) {
|
|
2259
|
+
const a = args[i];
|
|
2260
|
+
if (a === '--port' && i + 1 < args.length) {
|
|
2261
|
+
port = parseInt(args[++i], 10);
|
|
2262
|
+
continue;
|
|
2263
|
+
}
|
|
2264
|
+
if (a.startsWith('--port=')) {
|
|
2265
|
+
port = parseInt(a.slice('--port='.length), 10);
|
|
2266
|
+
continue;
|
|
2267
|
+
}
|
|
2268
|
+
if (a === '--host' && i + 1 < args.length) {
|
|
2269
|
+
host = args[++i];
|
|
2270
|
+
continue;
|
|
2271
|
+
}
|
|
2272
|
+
if (a.startsWith('--host=')) {
|
|
2273
|
+
host = a.slice('--host='.length);
|
|
2274
|
+
continue;
|
|
2275
|
+
}
|
|
2276
|
+
}
|
|
2277
|
+
try {
|
|
2278
|
+
const { startBridge, stopBridge, getBridgeInfo, isBridgeRunning, killStaleBridge, discoverBridgePort, } = require('../watcher/socket-bridge');
|
|
2279
|
+
if (sub === 'start') {
|
|
2280
|
+
if (isBridgeRunning()) {
|
|
2281
|
+
const info = getBridgeInfo();
|
|
2282
|
+
console.log(C.warn(` Bridge already running on port ${info.port} (${info.clientCount} clients, ${info.totalEventsReceived} events received)`));
|
|
2283
|
+
return;
|
|
2284
|
+
}
|
|
2285
|
+
startBridge(port, host)
|
|
2286
|
+
.then((info) => {
|
|
2287
|
+
console.log(C.success(` ✓ Bridge started on ${info.host}:${info.port}`));
|
|
2288
|
+
console.log(C.dim(` Editors can connect to ws://${info.host}:${info.port} (newline-delimited JSON)`));
|
|
2289
|
+
console.log(C.dim(` To stop: cell bridge stop`));
|
|
2290
|
+
try {
|
|
2291
|
+
const { markBridgeStarted } = require('../setup/cell-state');
|
|
2292
|
+
markBridgeStarted();
|
|
2293
|
+
}
|
|
2294
|
+
catch { }
|
|
2295
|
+
})
|
|
2296
|
+
.catch((e) => {
|
|
2297
|
+
console.log(C.warn(' Bridge start failed: ' + e.message));
|
|
2298
|
+
});
|
|
2299
|
+
}
|
|
2300
|
+
else if (sub === 'stop') {
|
|
2301
|
+
const ok = stopBridge();
|
|
2302
|
+
if (ok) {
|
|
2303
|
+
console.log(C.success(' ✓ Bridge stopped'));
|
|
2304
|
+
}
|
|
2305
|
+
else {
|
|
2306
|
+
console.log(C.dim(' Bridge was not running'));
|
|
2307
|
+
}
|
|
2308
|
+
}
|
|
2309
|
+
else if (sub === 'kill') {
|
|
2310
|
+
const killed = killStaleBridge();
|
|
2311
|
+
if (killed) {
|
|
2312
|
+
console.log(C.success(' ✓ Killed stale bridge process'));
|
|
2313
|
+
}
|
|
2314
|
+
else {
|
|
2315
|
+
console.log(C.dim(' No stale bridge found'));
|
|
2316
|
+
}
|
|
2317
|
+
}
|
|
2318
|
+
else {
|
|
2319
|
+
// status
|
|
2320
|
+
const info = getBridgeInfo();
|
|
2321
|
+
const discovered = discoverBridgePort();
|
|
2322
|
+
const liveInfo = discovered && !info.running
|
|
2323
|
+
? { running: true, port: discovered, host: host, startedAt: C.dim('(another process)'), clientCount: -1, totalEventsReceived: -1, clients: [] }
|
|
2324
|
+
: info;
|
|
2325
|
+
const i = liveInfo;
|
|
2326
|
+
console.log(C.bold(' Cell Bridge'));
|
|
2327
|
+
console.log(' ───────────');
|
|
2328
|
+
console.log(` Running: ${i.running ? C.success('yes') : C.dim('no')}`);
|
|
2329
|
+
console.log(` Port: ${i.port}`);
|
|
2330
|
+
console.log(` Host: ${i.host}`);
|
|
2331
|
+
console.log(` Started: ${i.startedAt || C.dim('(never)')}`);
|
|
2332
|
+
console.log(` Clients: ${i.clientCount >= 0 ? i.clientCount : '?'}`);
|
|
2333
|
+
console.log(` Events rx: ${i.totalEventsReceived >= 0 ? i.totalEventsReceived : '?'}`);
|
|
2334
|
+
if (i.clients && i.clients.length > 0) {
|
|
2335
|
+
console.log('');
|
|
2336
|
+
console.log(C.dim(' Connected clients:'));
|
|
2337
|
+
for (const c of i.clients) {
|
|
2338
|
+
console.log(C.dim(` #${c.id} ${c.remoteAddress}:${c.remotePort} project=${c.project} events=${c.eventsReceived}`));
|
|
2339
|
+
}
|
|
2340
|
+
}
|
|
2341
|
+
if (!info.running) {
|
|
2342
|
+
console.log('');
|
|
2343
|
+
console.log(C.dim(' To start: cell bridge start [--port 9877] [--host 127.0.0.1]'));
|
|
2344
|
+
}
|
|
2345
|
+
}
|
|
2346
|
+
}
|
|
2347
|
+
catch (e) {
|
|
2348
|
+
console.log(C.warn(' Bridge failed: ' + (e?.message || String(e))));
|
|
2349
|
+
}
|
|
2350
|
+
}
|
|
2351
|
+
// ─── cell watch-editor (Feature #2: push active editor state to bridge) ────
|
|
2352
|
+
function monitorStatePath(project) {
|
|
2353
|
+
const os = require('os');
|
|
2354
|
+
const path = require('path');
|
|
2355
|
+
const fs = require('fs');
|
|
2356
|
+
const dir = path.join(os.tmpdir(), 'fivo-cell');
|
|
2357
|
+
if (!fs.existsSync(dir))
|
|
2358
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
2359
|
+
return path.join(dir, `watch-editor-${project}.json`);
|
|
2360
|
+
}
|
|
2361
|
+
function readMonitorState(project) {
|
|
2362
|
+
const fs = require('fs');
|
|
2363
|
+
const p = monitorStatePath(project);
|
|
2364
|
+
try {
|
|
2365
|
+
if (!fs.existsSync(p))
|
|
2366
|
+
return null;
|
|
2367
|
+
return JSON.parse(fs.readFileSync(p, 'utf8'));
|
|
2368
|
+
}
|
|
2369
|
+
catch {
|
|
2370
|
+
return null;
|
|
2371
|
+
}
|
|
2372
|
+
}
|
|
2373
|
+
function writeMonitorState(project, data) {
|
|
2374
|
+
const fs = require('fs');
|
|
2375
|
+
try {
|
|
2376
|
+
fs.writeFileSync(monitorStatePath(project), JSON.stringify(data, null, 2));
|
|
2377
|
+
}
|
|
2378
|
+
catch { /* ignore */ }
|
|
2379
|
+
}
|
|
2380
|
+
function clearMonitorState(project) {
|
|
2381
|
+
const fs = require('fs');
|
|
2382
|
+
try {
|
|
2383
|
+
fs.unlinkSync(monitorStatePath(project));
|
|
2384
|
+
}
|
|
2385
|
+
catch { /* ignore */ }
|
|
2386
|
+
}
|
|
2387
|
+
function doWatchEditor() {
|
|
2388
|
+
const sub = (args[1] || 'status').toString();
|
|
2389
|
+
// Find --project=... flag, or fall back to positional args[2] or cwd basename
|
|
2390
|
+
const projectFlag = args.find((a) => typeof a === 'string' && a.startsWith('--project='));
|
|
2391
|
+
const project = projectFlag ? projectFlag.split('=')[1] : ((args[2] && !String(args[2]).startsWith('--')) ? String(args[2]) : path.basename(process.cwd()));
|
|
2392
|
+
const intervalArg = args.find((a) => typeof a === 'string' && a.startsWith('--interval='));
|
|
2393
|
+
const portArg = args.find((a) => typeof a === 'string' && a.startsWith('--port='));
|
|
2394
|
+
const hostArg = args.find((a) => typeof a === 'string' && a.startsWith('--host='));
|
|
2395
|
+
const interval = parseInt(intervalArg ? intervalArg.split('=')[1] : '3000', 10);
|
|
2396
|
+
let port = portArg ? parseInt(portArg.split('=')[1], 10) : null;
|
|
2397
|
+
const host = (hostArg ? hostArg.split('=')[1] : '127.0.0.1') || '127.0.0.1';
|
|
2398
|
+
// Try to discover bridge port from pid file if not specified
|
|
2399
|
+
if (port === null) {
|
|
2400
|
+
try {
|
|
2401
|
+
const { discoverBridgePort } = require('../watcher/socket-bridge');
|
|
2402
|
+
const discovered = discoverBridgePort();
|
|
2403
|
+
if (discovered)
|
|
2404
|
+
port = discovered;
|
|
2405
|
+
}
|
|
2406
|
+
catch { /* ignore */ }
|
|
2407
|
+
}
|
|
2408
|
+
if (port === null)
|
|
2409
|
+
port = 9877;
|
|
2410
|
+
try {
|
|
2411
|
+
const { EditorMonitor, getActiveWindow, parseTitleToState } = require('../watcher/editor-monitor');
|
|
2412
|
+
if (sub === 'start') {
|
|
2413
|
+
if (activeMonitor) {
|
|
2414
|
+
console.log(C.warn(' Monitor already running in this process'));
|
|
2415
|
+
return;
|
|
2416
|
+
}
|
|
2417
|
+
const prev = readMonitorState(project);
|
|
2418
|
+
if (prev && prev.running) {
|
|
2419
|
+
console.log(C.warn(` Monitor for "${project}" already started at ${prev.startTime}`));
|
|
2420
|
+
console.log(C.dim(' Use `cell watch-editor stop --project ' + project + '` first'));
|
|
2421
|
+
return;
|
|
2422
|
+
}
|
|
2423
|
+
const monitor = new EditorMonitor({
|
|
2424
|
+
project,
|
|
2425
|
+
intervalMs: interval,
|
|
2426
|
+
bridgeHost: host,
|
|
2427
|
+
bridgePort: port,
|
|
2428
|
+
fileBaseDir: process.cwd(),
|
|
2429
|
+
watchFiles: true,
|
|
2430
|
+
onState: (s) => {
|
|
2431
|
+
if (process.env.CELL_VERBOSE) {
|
|
2432
|
+
console.log(C.dim(` [${new Date().toISOString()}] ${s.editorName}: ${s.filePath} [${s.isDirty ? 'unsaved' : 'clean'}]`));
|
|
2433
|
+
}
|
|
2434
|
+
},
|
|
2435
|
+
onError: (e) => {
|
|
2436
|
+
if (process.env.CELL_VERBOSE)
|
|
2437
|
+
console.error(C.warn(' ' + e.message));
|
|
2438
|
+
},
|
|
2439
|
+
onSkip: (reason) => {
|
|
2440
|
+
if (process.env.CELL_VERBOSE)
|
|
2441
|
+
console.log(C.dim(' skip: ' + reason));
|
|
2442
|
+
},
|
|
2443
|
+
});
|
|
2444
|
+
monitor.start();
|
|
2445
|
+
activeMonitor = monitor;
|
|
2446
|
+
monitorStateFile = project;
|
|
2447
|
+
writeMonitorState(project, { running: true, startTime: new Date().toISOString(), pid: process.pid, project, port, host, interval });
|
|
2448
|
+
console.log(C.success(` Watch-editor started for project "${project}"`));
|
|
2449
|
+
console.log(C.dim(` Bridge: ${host}:${port} | Interval: ${interval}ms`));
|
|
2450
|
+
console.log(C.dim(' State will appear in `cell context ' + project + '`'));
|
|
2451
|
+
console.log(C.dim(' Press Ctrl+C to stop'));
|
|
2452
|
+
// Keep the process alive
|
|
2453
|
+
process.on('SIGINT', () => {
|
|
2454
|
+
console.log(C.dim('\n Stopping watch-editor...'));
|
|
2455
|
+
if (activeMonitor)
|
|
2456
|
+
activeMonitor.stop();
|
|
2457
|
+
clearMonitorState(project);
|
|
2458
|
+
process.exit(0);
|
|
2459
|
+
});
|
|
2460
|
+
process.on('SIGTERM', () => {
|
|
2461
|
+
if (activeMonitor)
|
|
2462
|
+
activeMonitor.stop();
|
|
2463
|
+
clearMonitorState(project);
|
|
2464
|
+
process.exit(0);
|
|
2465
|
+
});
|
|
2466
|
+
}
|
|
2467
|
+
else if (sub === 'stop') {
|
|
2468
|
+
if (activeMonitor) {
|
|
2469
|
+
activeMonitor.stop();
|
|
2470
|
+
activeMonitor = null;
|
|
2471
|
+
}
|
|
2472
|
+
clearMonitorState(project);
|
|
2473
|
+
console.log(C.success(` Watch-editor stopped for "${project}"`));
|
|
2474
|
+
}
|
|
2475
|
+
else if (sub === 'status') {
|
|
2476
|
+
const local = activeMonitor ? activeMonitor.getInfo() : null;
|
|
2477
|
+
const saved = readMonitorState(project);
|
|
2478
|
+
if (local) {
|
|
2479
|
+
console.log(C.bold(` Watch-editor (in-process) — ${project}`));
|
|
2480
|
+
console.log(` Running: ${C.success('yes')}`);
|
|
2481
|
+
console.log(` Started: ${local.startTime}`);
|
|
2482
|
+
console.log(` Polls: ${local.pollsCompleted}`);
|
|
2483
|
+
console.log(` Detected: ${local.statesDetected}`);
|
|
2484
|
+
console.log(` Pushed: ${local.statesPushed}`);
|
|
2485
|
+
console.log(` Bridge: ${local.bridgeConnected ? C.success('connected') : C.warn('not connected')}`);
|
|
2486
|
+
if (local.lastState) {
|
|
2487
|
+
console.log(` Last: ${local.lastState.editorName} → ${local.lastState.filePath}${local.lastState.isDirty ? ' [unsaved]' : ''}`);
|
|
2488
|
+
}
|
|
2489
|
+
}
|
|
2490
|
+
else if (saved) {
|
|
2491
|
+
console.log(C.bold(` Watch-editor (saved state) — ${project}`));
|
|
2492
|
+
console.log(` Started: ${saved.startTime}`);
|
|
2493
|
+
console.log(` PID: ${saved.pid}${saved.pid && !isPidAlive(saved.pid) ? C.warn(' (not running)') : ''}`);
|
|
2494
|
+
console.log(` Bridge: ${saved.host}:${saved.port}`);
|
|
2495
|
+
console.log(` Interval: ${saved.interval}ms`);
|
|
2496
|
+
}
|
|
2497
|
+
else {
|
|
2498
|
+
console.log(C.dim(` No watch-editor session for "${project}"`));
|
|
2499
|
+
console.log(C.dim(' Start with: cell watch-editor start --project ' + project));
|
|
2500
|
+
}
|
|
2501
|
+
}
|
|
2502
|
+
else if (sub === 'check') {
|
|
2503
|
+
// One-shot check — useful for testing
|
|
2504
|
+
getActiveWindow().then((win) => {
|
|
2505
|
+
if (!win) {
|
|
2506
|
+
console.log(C.dim(' No active window detected'));
|
|
2507
|
+
return;
|
|
2508
|
+
}
|
|
2509
|
+
console.log(` Active: ${win.processName} (PID ${win.pid})`);
|
|
2510
|
+
console.log(` Title: ${win.title}`);
|
|
2511
|
+
const state = parseTitleToState(win.title, win.processName, project, process.cwd());
|
|
2512
|
+
if (state) {
|
|
2513
|
+
console.log(C.success(' Parsed:'));
|
|
2514
|
+
console.log(` editor: ${state.editorName}`);
|
|
2515
|
+
console.log(` file: ${state.filePath}`);
|
|
2516
|
+
console.log(` line: ${state.line}`);
|
|
2517
|
+
console.log(` dirty: ${state.isDirty}`);
|
|
2518
|
+
console.log(` lang: ${state.language || 'unknown'}`);
|
|
2519
|
+
}
|
|
2520
|
+
else {
|
|
2521
|
+
console.log(C.warn(' Could not parse title into editor state'));
|
|
2522
|
+
}
|
|
2523
|
+
});
|
|
2524
|
+
}
|
|
2525
|
+
else {
|
|
2526
|
+
console.log(C.dim(' Usage: cell watch-editor <start|stop|status|check> [--project NAME] [--interval 3000] [--port 9877] [--host 127.0.0.1]'));
|
|
2527
|
+
}
|
|
2528
|
+
}
|
|
2529
|
+
catch (e) {
|
|
2530
|
+
console.log(C.warn(' watch-editor failed: ' + (e?.message || String(e))));
|
|
1478
2531
|
}
|
|
1479
2532
|
}
|
|
1480
2533
|
// ─── cell mcp-config (Pre-Launch: auto-register all IDEs) ────────────────────
|
|
@@ -1494,7 +2547,7 @@ function doMcpConfig() {
|
|
|
1494
2547
|
console.log(C.bold(' Cell MCP Auto-Config'));
|
|
1495
2548
|
console.log(C.dim(' ─────────────────────'));
|
|
1496
2549
|
console.log();
|
|
1497
|
-
const { writeMcpConfig, getMcpTargets } = require('
|
|
2550
|
+
const { writeMcpConfig, getMcpTargets } = require('../../../core/mcp-config');
|
|
1498
2551
|
const homedir = os.homedir();
|
|
1499
2552
|
const targets = getMcpTargets(homedir);
|
|
1500
2553
|
const result = writeMcpConfig(homedir);
|
|
@@ -1555,7 +2608,7 @@ function doRepl() {
|
|
|
1555
2608
|
console.log();
|
|
1556
2609
|
// First-run greeting
|
|
1557
2610
|
try {
|
|
1558
|
-
const { firstRunGreeting } = require('
|
|
2611
|
+
const { firstRunGreeting } = require('../setup/first-run');
|
|
1559
2612
|
firstRunGreeting();
|
|
1560
2613
|
}
|
|
1561
2614
|
catch { }
|
|
@@ -1614,7 +2667,7 @@ function doRepl() {
|
|
|
1614
2667
|
// In-REPL version (avoid child spawn for trivial info)
|
|
1615
2668
|
if (cmd === 'version' || cmd === '--version' || cmd === '-v') {
|
|
1616
2669
|
try {
|
|
1617
|
-
const pkg = require('
|
|
2670
|
+
const pkg = require('../../../../package.json');
|
|
1618
2671
|
console.log(`${C.primary('cell')} v${C.num(pkg.version)}`);
|
|
1619
2672
|
}
|
|
1620
2673
|
catch { }
|
|
@@ -1655,6 +2708,338 @@ function doRepl() {
|
|
|
1655
2708
|
process.exit(0);
|
|
1656
2709
|
});
|
|
1657
2710
|
}
|
|
2711
|
+
// ─── cell switch-back ──────────────────────────────────────────────────────
|
|
2712
|
+
function doSwitchBack() {
|
|
2713
|
+
const switchArgs = process.argv.slice(3);
|
|
2714
|
+
const branch = switchArgs[0];
|
|
2715
|
+
if (!branch) {
|
|
2716
|
+
console.log();
|
|
2717
|
+
console.log(C.bold(' Branch Context Recovery'));
|
|
2718
|
+
console.log(C.dim(' ──────────────────────'));
|
|
2719
|
+
console.log();
|
|
2720
|
+
console.log(' Usage: cell switch-back <branch-name>');
|
|
2721
|
+
console.log();
|
|
2722
|
+
console.log(' Shows saved context for a branch (goal, files, errors, decisions).');
|
|
2723
|
+
console.log();
|
|
2724
|
+
console.log(' Examples:');
|
|
2725
|
+
console.log(' cell switch-back feature-auth');
|
|
2726
|
+
console.log(' cell switch-back fix/login-bug');
|
|
2727
|
+
console.log();
|
|
2728
|
+
return;
|
|
2729
|
+
}
|
|
2730
|
+
console.log();
|
|
2731
|
+
console.log(C.bold(` Branch: ${branch}`));
|
|
2732
|
+
console.log(C.dim(' ──────────────────────'));
|
|
2733
|
+
console.log();
|
|
2734
|
+
let project = path.basename(process.cwd());
|
|
2735
|
+
try {
|
|
2736
|
+
const { detectProject } = require('../setup/setup');
|
|
2737
|
+
const detected = detectProject(process.cwd());
|
|
2738
|
+
project = detected.name;
|
|
2739
|
+
}
|
|
2740
|
+
catch { }
|
|
2741
|
+
// Try real saved context first
|
|
2742
|
+
try {
|
|
2743
|
+
const { loadBranchSnapshot } = require('../../03-knowledge/decisions/branch-snapshot');
|
|
2744
|
+
const snapshot = loadBranchSnapshot(project, branch);
|
|
2745
|
+
if (snapshot) {
|
|
2746
|
+
if (snapshot.goal)
|
|
2747
|
+
console.log(` Goal: ${C.primary(snapshot.goal)}`);
|
|
2748
|
+
if (snapshot.filesTouched && snapshot.filesTouched.length > 0) {
|
|
2749
|
+
console.log(` Files: ${C.num(String(snapshot.filesTouched.length))} touched`);
|
|
2750
|
+
for (const f of snapshot.filesTouched.slice(0, 8)) {
|
|
2751
|
+
console.log(C.dim(` - ${f}`));
|
|
2752
|
+
}
|
|
2753
|
+
if (snapshot.filesTouched.length > 8) {
|
|
2754
|
+
console.log(C.dim(` ... ${snapshot.filesTouched.length - 8} more`));
|
|
2755
|
+
}
|
|
2756
|
+
}
|
|
2757
|
+
if (snapshot.pendingTasks && snapshot.pendingTasks.length > 0) {
|
|
2758
|
+
console.log(` Pending: ${snapshot.pendingTasks.length} task(s)`);
|
|
2759
|
+
for (const t of snapshot.pendingTasks.slice(0, 5)) {
|
|
2760
|
+
console.log(C.warn(` ! ${t}`));
|
|
2761
|
+
}
|
|
2762
|
+
}
|
|
2763
|
+
if (snapshot.recentErrors && snapshot.recentErrors.length > 0) {
|
|
2764
|
+
console.log(` Errors: ${snapshot.recentErrors.length} recent`);
|
|
2765
|
+
for (const e of snapshot.recentErrors.slice(0, 3)) {
|
|
2766
|
+
console.log(C.warn(` x ${e}`));
|
|
2767
|
+
}
|
|
2768
|
+
}
|
|
2769
|
+
if (snapshot.recentDecisions && snapshot.recentDecisions.length > 0) {
|
|
2770
|
+
console.log(` Recent commits:`);
|
|
2771
|
+
for (const d of snapshot.recentDecisions.slice(0, 5)) {
|
|
2772
|
+
console.log(C.dim(` - ${d}`));
|
|
2773
|
+
}
|
|
2774
|
+
}
|
|
2775
|
+
if (snapshot.lastActiveAt) {
|
|
2776
|
+
console.log(C.dim(` Last active: ${snapshot.lastActiveAt}`));
|
|
2777
|
+
}
|
|
2778
|
+
console.log();
|
|
2779
|
+
console.log(C.dim(' Restore context:'));
|
|
2780
|
+
console.log(' 1. git checkout ' + branch);
|
|
2781
|
+
console.log(' 2. cell context');
|
|
2782
|
+
console.log();
|
|
2783
|
+
return;
|
|
2784
|
+
}
|
|
2785
|
+
}
|
|
2786
|
+
catch { }
|
|
2787
|
+
// Fallback to name parser
|
|
2788
|
+
const { GitBranchPreGenerator } = require('../../03-knowledge/decisions/git-branch-pregenerator');
|
|
2789
|
+
const gen = new GitBranchPreGenerator();
|
|
2790
|
+
const summary = gen.getIntentSummary(branch);
|
|
2791
|
+
const parsed = gen.parseBranchName(branch);
|
|
2792
|
+
console.log(C.dim(' (No saved context for this branch — showing inferred intent)'));
|
|
2793
|
+
console.log();
|
|
2794
|
+
console.log(` Type: ${C.primary(parsed.type)}`);
|
|
2795
|
+
console.log(` Intent: ${parsed.intent}`);
|
|
2796
|
+
console.log(` Summary: ${summary}`);
|
|
2797
|
+
console.log();
|
|
2798
|
+
const patterns = gen.generateFiles(branch, [], 'typescript');
|
|
2799
|
+
if (patterns.length > 0) {
|
|
2800
|
+
console.log(C.dim(' Expected files:'));
|
|
2801
|
+
for (const f of patterns) {
|
|
2802
|
+
console.log(` ${C.primary(f.path)} (${f.type})`);
|
|
2803
|
+
}
|
|
2804
|
+
console.log();
|
|
2805
|
+
}
|
|
2806
|
+
console.log(C.dim(' Save real context by running:'));
|
|
2807
|
+
console.log(C.primary(' cell scan'));
|
|
2808
|
+
console.log(C.primary(' cell context'));
|
|
2809
|
+
console.log();
|
|
2810
|
+
console.log(C.dim(' Restore context:'));
|
|
2811
|
+
console.log(' 1. git checkout ' + branch);
|
|
2812
|
+
console.log(' 2. cell context');
|
|
2813
|
+
console.log();
|
|
2814
|
+
}
|
|
2815
|
+
// ─── cell branches ──────────────────────────────────────────────────────────
|
|
2816
|
+
function doBranches() {
|
|
2817
|
+
console.log();
|
|
2818
|
+
console.log(C.bold(' Known Branches'));
|
|
2819
|
+
console.log(C.dim(' ──────────────'));
|
|
2820
|
+
console.log();
|
|
2821
|
+
let project = path.basename(process.cwd());
|
|
2822
|
+
try {
|
|
2823
|
+
const { detectProject } = require('../setup/setup');
|
|
2824
|
+
const detected = detectProject(process.cwd());
|
|
2825
|
+
project = detected.name;
|
|
2826
|
+
}
|
|
2827
|
+
catch { }
|
|
2828
|
+
try {
|
|
2829
|
+
const { listBranchSnapshots } = require('../../03-knowledge/decisions/branch-snapshot');
|
|
2830
|
+
const snapshots = listBranchSnapshots(project);
|
|
2831
|
+
if (snapshots.length === 0) {
|
|
2832
|
+
console.log(C.dim(' No branch context saved yet.'));
|
|
2833
|
+
console.log();
|
|
2834
|
+
console.log(C.dim(' Save context by running cell scan or cell context on a branch.'));
|
|
2835
|
+
console.log();
|
|
2836
|
+
return;
|
|
2837
|
+
}
|
|
2838
|
+
for (const s of snapshots) {
|
|
2839
|
+
const active = s.lastActiveAt ? s.lastActiveAt.slice(0, 10) : 'unknown';
|
|
2840
|
+
const goalStr = s.goal ? ` — ${s.goal}` : '';
|
|
2841
|
+
const fileCount = s.filesTouched?.length || 0;
|
|
2842
|
+
console.log(` ${C.primary(s.branch)}${goalStr}`);
|
|
2843
|
+
console.log(C.dim(` Last active: ${active} | Files: ${fileCount} | Commits: ${s.recentDecisions?.length || 0}`));
|
|
2844
|
+
}
|
|
2845
|
+
console.log();
|
|
2846
|
+
console.log(C.dim(` ${snapshots.length} branch(es) tracked. Run cell switch-back <branch> for details.`));
|
|
2847
|
+
}
|
|
2848
|
+
catch (err) {
|
|
2849
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
2850
|
+
console.log(C.warn(` Branch list failed: ${msg}`));
|
|
2851
|
+
}
|
|
2852
|
+
// Also show git branches
|
|
2853
|
+
try {
|
|
2854
|
+
const { execSync } = require('child_process');
|
|
2855
|
+
const gitBranches = execSync('git branch --list', { encoding: 'utf8' }).trim();
|
|
2856
|
+
if (gitBranches) {
|
|
2857
|
+
console.log();
|
|
2858
|
+
console.log(C.dim(' Git branches:'));
|
|
2859
|
+
for (const line of gitBranches.split('\n').filter(Boolean)) {
|
|
2860
|
+
console.log(C.dim(` ${line}`));
|
|
2861
|
+
}
|
|
2862
|
+
}
|
|
2863
|
+
}
|
|
2864
|
+
catch { }
|
|
2865
|
+
console.log();
|
|
2866
|
+
}
|
|
2867
|
+
// ─── cell lessons ──────────────────────────────────────────────────────────
|
|
2868
|
+
function doLessons() {
|
|
2869
|
+
const { getAvoidSuggestions, getFailureStats, getAllFailureRecords } = require('../../03-knowledge/decisions/failure-memory');
|
|
2870
|
+
const lessonArgs = process.argv.slice(3);
|
|
2871
|
+
const topic = lessonArgs[0];
|
|
2872
|
+
let lessonProject = project;
|
|
2873
|
+
try {
|
|
2874
|
+
const { detectProject } = require('../setup/setup');
|
|
2875
|
+
lessonProject = detectProject().name;
|
|
2876
|
+
}
|
|
2877
|
+
catch { }
|
|
2878
|
+
console.log();
|
|
2879
|
+
console.log(C.bold(' Engineering Lessons'));
|
|
2880
|
+
console.log(C.dim(' ──────────────────'));
|
|
2881
|
+
console.log();
|
|
2882
|
+
const stats = getFailureStats(lessonProject);
|
|
2883
|
+
if (stats.totalTracked === 0) {
|
|
2884
|
+
console.log(C.warn(' No lessons recorded yet.'));
|
|
2885
|
+
console.log();
|
|
2886
|
+
console.log(C.dim(' Lessons are learned from pattern rejections during:'));
|
|
2887
|
+
console.log(C.dim(' - AI code suggestions'));
|
|
2888
|
+
console.log(C.dim(' - Code review feedback'));
|
|
2889
|
+
console.log(C.dim(' - Scanner repeat issues'));
|
|
2890
|
+
console.log();
|
|
2891
|
+
console.log(C.dim(' Start collecting:'));
|
|
2892
|
+
console.log(C.primary(' cell scan'));
|
|
2893
|
+
console.log(C.primary(' cell blindspots --top'));
|
|
2894
|
+
return;
|
|
2895
|
+
}
|
|
2896
|
+
console.log(` Tracked: ${stats.totalTracked} patterns`);
|
|
2897
|
+
console.log(` Critical: ${stats.criticalCount} | High: ${stats.highCount} | Medium: ${stats.mediumCount} | Low: ${stats.lowCount}`);
|
|
2898
|
+
console.log(` Avg failure rate: ${Math.round(stats.avgFailureRate * 100)}%`);
|
|
2899
|
+
console.log();
|
|
2900
|
+
const suggestions = getAvoidSuggestions(0.5, lessonProject);
|
|
2901
|
+
if (topic) {
|
|
2902
|
+
const filtered = suggestions.filter((s) => s.description.toLowerCase().includes(topic.toLowerCase()) ||
|
|
2903
|
+
s.patternId.toLowerCase().includes(topic.toLowerCase()));
|
|
2904
|
+
if (filtered.length === 0) {
|
|
2905
|
+
console.log(` No lessons found for "${topic}".`);
|
|
2906
|
+
}
|
|
2907
|
+
else {
|
|
2908
|
+
console.log(C.bold(` Lessons for "${topic}":`));
|
|
2909
|
+
console.log();
|
|
2910
|
+
for (const s of filtered.slice(0, 10)) {
|
|
2911
|
+
const icon = s.severity === 'critical' ? '!!!' : s.severity === 'high' ? '!!' : s.severity === 'medium' ? '!' : '-';
|
|
2912
|
+
console.log(` ${C.warn(icon)} ${s.description}`);
|
|
2913
|
+
console.log(` Failure rate: ${Math.round(s.failureRate * 100)}% (${s.severity})`);
|
|
2914
|
+
console.log(` ${s.alternativeDescription}`);
|
|
2915
|
+
console.log();
|
|
2916
|
+
}
|
|
2917
|
+
}
|
|
2918
|
+
}
|
|
2919
|
+
else {
|
|
2920
|
+
if (suggestions.length === 0) {
|
|
2921
|
+
console.log(' No lessons to show yet. Keep building!');
|
|
2922
|
+
}
|
|
2923
|
+
else {
|
|
2924
|
+
console.log(C.bold(' Top lessons (patterns to avoid):'));
|
|
2925
|
+
console.log();
|
|
2926
|
+
for (const s of suggestions.slice(0, 10)) {
|
|
2927
|
+
const icon = s.severity === 'critical' ? '!!!' : s.severity === 'high' ? '!!' : s.severity === 'medium' ? '!' : '-';
|
|
2928
|
+
console.log(` ${C.warn(icon)} ${s.description}`);
|
|
2929
|
+
console.log(` Failure rate: ${Math.round(s.failureRate * 100)}% (${s.severity})`);
|
|
2930
|
+
console.log(` ${s.alternativeDescription}`);
|
|
2931
|
+
console.log();
|
|
2932
|
+
}
|
|
2933
|
+
}
|
|
2934
|
+
}
|
|
2935
|
+
console.log(C.dim(' Use: cell lessons <topic> to filter by topic'));
|
|
2936
|
+
console.log();
|
|
2937
|
+
}
|
|
2938
|
+
// ─── cell evolution ────────────────────────────────────────────────────────
|
|
2939
|
+
function doEvolution() {
|
|
2940
|
+
const { buildJourneyReport, saveJourneyReport } = require('../../03-knowledge/decisions/journey-memory');
|
|
2941
|
+
const evoArgs = process.argv.slice(3);
|
|
2942
|
+
const dir = evoArgs[0] || process.cwd();
|
|
2943
|
+
const showStack = evoArgs.includes('--stack');
|
|
2944
|
+
let evoProject = project;
|
|
2945
|
+
try {
|
|
2946
|
+
const { detectProject } = require('../setup/setup');
|
|
2947
|
+
evoProject = detectProject(dir).name;
|
|
2948
|
+
}
|
|
2949
|
+
catch {
|
|
2950
|
+
try {
|
|
2951
|
+
const pkgPath = require('path').join(dir, 'package.json');
|
|
2952
|
+
const pkg = JSON.parse(require('fs').readFileSync(pkgPath, 'utf-8'));
|
|
2953
|
+
if (pkg.name)
|
|
2954
|
+
evoProject = pkg.name;
|
|
2955
|
+
}
|
|
2956
|
+
catch { }
|
|
2957
|
+
}
|
|
2958
|
+
console.log();
|
|
2959
|
+
console.log(C.bold(' Project Evolution Map'));
|
|
2960
|
+
console.log(C.dim(' ────────────────────'));
|
|
2961
|
+
console.log();
|
|
2962
|
+
if (showStack) {
|
|
2963
|
+
try {
|
|
2964
|
+
const rows = (0, database_1.getDb)().prepare(`SELECT stack_json, file_count, line_count, scanned_at FROM stack_history WHERE LOWER(project) = LOWER(?) ORDER BY scanned_at ASC`).all(evoProject);
|
|
2965
|
+
if (rows.length === 0) {
|
|
2966
|
+
console.log(C.dim(' No stack history yet. Run: cell scan'));
|
|
2967
|
+
}
|
|
2968
|
+
else {
|
|
2969
|
+
console.log(C.bold(' Stack Timeline:'));
|
|
2970
|
+
console.log();
|
|
2971
|
+
let prevStack = '';
|
|
2972
|
+
for (const row of rows) {
|
|
2973
|
+
const date = String(row.scanned_at).slice(0, 10);
|
|
2974
|
+
let langs = {};
|
|
2975
|
+
try {
|
|
2976
|
+
langs = JSON.parse(String(row.stack_json));
|
|
2977
|
+
}
|
|
2978
|
+
catch { }
|
|
2979
|
+
const langList = Object.entries(langs).sort((a, b) => b[1] - a[1]).slice(0, 5).map(([l, c]) => `${l}(${c})`).join(', ');
|
|
2980
|
+
const currentStack = Object.keys(langs).sort().join(',');
|
|
2981
|
+
const changed = prevStack && prevStack !== currentStack;
|
|
2982
|
+
const marker = changed ? C.warn('CHANGED') : C.dim('same');
|
|
2983
|
+
console.log(` ${date} ${langList || 'unknown'} ${row.file_count} files ${row.line_count} lines ${marker}`);
|
|
2984
|
+
prevStack = currentStack;
|
|
2985
|
+
}
|
|
2986
|
+
}
|
|
2987
|
+
}
|
|
2988
|
+
catch (e) {
|
|
2989
|
+
console.log(C.warn(` Stack history failed: ${e?.message || String(e)}`));
|
|
2990
|
+
}
|
|
2991
|
+
console.log();
|
|
2992
|
+
return;
|
|
2993
|
+
}
|
|
2994
|
+
console.log(' Building journey report...');
|
|
2995
|
+
try {
|
|
2996
|
+
const report = buildJourneyReport(dir);
|
|
2997
|
+
const savedPath = saveJourneyReport(report);
|
|
2998
|
+
console.log();
|
|
2999
|
+
console.log(C.bold(' Summary'));
|
|
3000
|
+
console.log(` Projects: ${report.summary.totalProjects}`);
|
|
3001
|
+
console.log(` Active since: ${report.summary.activeSince}`);
|
|
3002
|
+
console.log(` Languages: ${report.summary.languagesLearned}`);
|
|
3003
|
+
console.log(` Total commits: ${report.summary.totalCommits}`);
|
|
3004
|
+
console.log(` Top language: ${report.summary.mostUsedLanguage}`);
|
|
3005
|
+
console.log(` Top skill: ${report.summary.topSkill}`);
|
|
3006
|
+
console.log(` Growth: ${report.summary.growthRate}`);
|
|
3007
|
+
console.log();
|
|
3008
|
+
if (report.skills.length > 0) {
|
|
3009
|
+
console.log(C.bold(' Skill Progression'));
|
|
3010
|
+
console.log();
|
|
3011
|
+
for (const s of report.skills.slice(0, 8)) {
|
|
3012
|
+
const bar = '█'.repeat(Math.min(s.metrics.cleanFileRatio / 10, 10));
|
|
3013
|
+
console.log(` ${s.area.padEnd(15)} ${s.currentLevel.padEnd(14)} ${bar} ${s.metrics.cleanFileRatio}% clean`);
|
|
3014
|
+
}
|
|
3015
|
+
console.log();
|
|
3016
|
+
}
|
|
3017
|
+
if (report.chains.length > 0) {
|
|
3018
|
+
console.log(C.bold(' Reused Patterns'));
|
|
3019
|
+
console.log();
|
|
3020
|
+
for (const c of report.chains.slice(0, 5)) {
|
|
3021
|
+
console.log(` ${c.pattern} (${Math.round(c.successRate * 100)}% success)`);
|
|
3022
|
+
console.log(` Used in: ${c.firstUsed.project}${c.reusedIn.length > 0 ? ', ' + c.reusedIn.map((r) => r.project).join(', ') : ''}`);
|
|
3023
|
+
}
|
|
3024
|
+
console.log();
|
|
3025
|
+
}
|
|
3026
|
+
if (report.goals.recommendations.length > 0) {
|
|
3027
|
+
console.log(C.bold(' Recommendations'));
|
|
3028
|
+
console.log();
|
|
3029
|
+
for (const rec of report.goals.recommendations.slice(0, 5)) {
|
|
3030
|
+
console.log(` -> ${rec}`);
|
|
3031
|
+
}
|
|
3032
|
+
console.log();
|
|
3033
|
+
}
|
|
3034
|
+
console.log(C.dim(` Full report: ${savedPath}`));
|
|
3035
|
+
console.log(C.dim(' Also saved as: ~/.fivo/cell/journey.md'));
|
|
3036
|
+
console.log();
|
|
3037
|
+
}
|
|
3038
|
+
catch (e) {
|
|
3039
|
+
console.log(C.warn(` Failed to build evolution map: ${e instanceof Error ? e.message : String(e)}`));
|
|
3040
|
+
console.log();
|
|
3041
|
+
}
|
|
3042
|
+
}
|
|
1658
3043
|
// ─── cell help ──────────────────────────────────────────────────────────────
|
|
1659
3044
|
function doHelp() {
|
|
1660
3045
|
console.log();
|
|
@@ -1664,6 +3049,7 @@ function doHelp() {
|
|
|
1664
3049
|
console.log(` ${C.primary('cell start')} Start daemon + MCP (port 9876) — re-run safe`);
|
|
1665
3050
|
console.log(` ${C.primary('cell stop')} Stop daemon`);
|
|
1666
3051
|
console.log(` ${C.primary('cell setup')} One-time project setup: scan + watcher + MCP (idempotent)`);
|
|
3052
|
+
console.log(` ${C.primary('cell doctor')} Health check — diagnose what's missing and how to fix`);
|
|
1667
3053
|
console.log(` ${C.primary('cell --version')} Print version + daemon status`);
|
|
1668
3054
|
console.log(` ${C.primary('cell mcp-config')} Auto-register cell MCP in Cursor/Antigravity/Codex/OpenCode`);
|
|
1669
3055
|
console.log(` ${C.primary('cell scan')} Scan codebase + build layers`);
|
|
@@ -1678,7 +3064,14 @@ function doHelp() {
|
|
|
1678
3064
|
console.log(` ${C.primary('cell watch [start|stop|events|check|status] [proj] [dir]')} Live file watcher`);
|
|
1679
3065
|
console.log(` ${C.primary('cell watch daemon [proj] [dir]')} Run as long-lived watcher (for .bat)`);
|
|
1680
3066
|
console.log(` ${C.primary('cell blindspots [dir] [maxFiles]')} Scan for blind spots (15+ types)`);
|
|
1681
|
-
console.log(` ${C.primary('cell
|
|
3067
|
+
console.log(` ${C.primary('cell blindspots --top [N]')} Show top N prioritized fixes (default 5)`);
|
|
3068
|
+
console.log(` ${C.primary('cell context [project] [tool] [--short|--full]')} Inject @cell context block`);
|
|
3069
|
+
console.log(` ${C.primary('cell switch-back <branch>')} Restore branch context`);
|
|
3070
|
+
console.log(` ${C.primary('cell branches')} List known branches with last context`);
|
|
3071
|
+
console.log(` ${C.primary('cell lessons [topic]')} Engineering lessons from failures`);
|
|
3072
|
+
console.log(` ${C.primary('cell evolution [dir] [--stack]')} Project evolution map + stack timeline`);
|
|
3073
|
+
console.log(` ${C.primary('cell focus [dir]')} Focus report — active/stalled/abandoned projects`);
|
|
3074
|
+
console.log(` ${C.primary('cell why <topic>')} Search decisions by topic`);
|
|
1682
3075
|
console.log(` ${C.primary('cell repl')} Interactive REPL with / completion (or just run \`cell\` in a TTY)`);
|
|
1683
3076
|
console.log(` ${C.primary('cell help')} Show this help`);
|
|
1684
3077
|
console.log();
|
|
@@ -1686,5 +3079,167 @@ function doHelp() {
|
|
|
1686
3079
|
console.log(C.dim(' Then: cell start'));
|
|
1687
3080
|
console.log();
|
|
1688
3081
|
}
|
|
3082
|
+
// ─── cell focus ────────────────────────────────────────────────────────────
|
|
3083
|
+
function doFocus() {
|
|
3084
|
+
const { buildFocusReport, renderFocusMd } = require('../../03-knowledge/decisions/focus-report');
|
|
3085
|
+
const focusArgs = process.argv.slice(3);
|
|
3086
|
+
const rootDir = focusArgs[0] || path.dirname(process.cwd());
|
|
3087
|
+
const asJson = focusArgs.includes('--json');
|
|
3088
|
+
console.log();
|
|
3089
|
+
console.log(C.bold(' Focus Report — Project Activity'));
|
|
3090
|
+
console.log(C.dim(' ───────────────────────────────'));
|
|
3091
|
+
console.log();
|
|
3092
|
+
try {
|
|
3093
|
+
const report = buildFocusReport(rootDir);
|
|
3094
|
+
if (asJson) {
|
|
3095
|
+
console.log(JSON.stringify(report, null, 2));
|
|
3096
|
+
return;
|
|
3097
|
+
}
|
|
3098
|
+
console.log(` Total: ${report.totalProjects} projects`);
|
|
3099
|
+
console.log(` Active: ${C.success(String(report.active))} | Stalled: ${C.warn(String(report.stalled))} | Abandoned: ${C.primary(String(report.abandoned))} | Fresh: ${report.fresh}`);
|
|
3100
|
+
console.log();
|
|
3101
|
+
if (report.topPicks.length > 0) {
|
|
3102
|
+
console.log(C.bold(' Keep doing this:'));
|
|
3103
|
+
for (const p of report.topPicks) {
|
|
3104
|
+
console.log(` ${C.success('>>')} ${p.name} — ${p.reason}`);
|
|
3105
|
+
}
|
|
3106
|
+
console.log();
|
|
3107
|
+
}
|
|
3108
|
+
if (report.shouldPause.length > 0) {
|
|
3109
|
+
console.log(C.bold(' Pause / Decide:'));
|
|
3110
|
+
for (const p of report.shouldPause) {
|
|
3111
|
+
console.log(` ${C.warn('??')} ${p.name} (${p.lastModifiedDays}d silent) — ${p.reason}`);
|
|
3112
|
+
}
|
|
3113
|
+
console.log();
|
|
3114
|
+
}
|
|
3115
|
+
if (report.shouldArchive.length > 0) {
|
|
3116
|
+
console.log(C.bold(' Archive:'));
|
|
3117
|
+
for (const p of report.shouldArchive) {
|
|
3118
|
+
console.log(` ${C.dim('..')} ${p.name} (${p.lastModifiedDays}d silent) — ${p.reason}`);
|
|
3119
|
+
}
|
|
3120
|
+
console.log();
|
|
3121
|
+
}
|
|
3122
|
+
if (report.shouldResurrect.length > 0) {
|
|
3123
|
+
console.log(C.bold(' Resurrect:'));
|
|
3124
|
+
for (const p of report.shouldResurrect) {
|
|
3125
|
+
console.log(` ${C.primary('!!')} ${p.name} (${p.lastModifiedDays}d silent) — ${p.reason}`);
|
|
3126
|
+
}
|
|
3127
|
+
console.log();
|
|
3128
|
+
}
|
|
3129
|
+
if (report.overallAdvice.length > 0) {
|
|
3130
|
+
console.log(C.bold(' Advice:'));
|
|
3131
|
+
for (const a of report.overallAdvice) {
|
|
3132
|
+
console.log(` ${C.dim('>')} ${a}`);
|
|
3133
|
+
}
|
|
3134
|
+
}
|
|
3135
|
+
}
|
|
3136
|
+
catch (e) {
|
|
3137
|
+
console.log(C.warn(` Focus report failed: ${e?.message || String(e)}`));
|
|
3138
|
+
console.log(C.dim(' Tip: run from a parent directory containing multiple projects'));
|
|
3139
|
+
}
|
|
3140
|
+
console.log();
|
|
3141
|
+
}
|
|
3142
|
+
// ─── cell why <topic> ──────────────────────────────────────────────────────
|
|
3143
|
+
function doWhy() {
|
|
3144
|
+
const whyArgs = process.argv.slice(3);
|
|
3145
|
+
const topic = whyArgs[0];
|
|
3146
|
+
if (!topic) {
|
|
3147
|
+
console.log();
|
|
3148
|
+
console.log(C.bold(' Cell Why — Decision Search'));
|
|
3149
|
+
console.log(C.dim(' ───────────────────────────'));
|
|
3150
|
+
console.log();
|
|
3151
|
+
console.log(C.dim(' Usage: cell why <topic>'));
|
|
3152
|
+
console.log(C.dim(' Example: cell why typescript'));
|
|
3153
|
+
console.log(C.dim(' Example: cell why testing'));
|
|
3154
|
+
console.log();
|
|
3155
|
+
return;
|
|
3156
|
+
}
|
|
3157
|
+
const db = (0, database_1.getDb)();
|
|
3158
|
+
console.log();
|
|
3159
|
+
console.log(C.bold(` Why — Decisions about "${topic}"`));
|
|
3160
|
+
console.log(C.dim(' ─────────────────────────────'));
|
|
3161
|
+
console.log();
|
|
3162
|
+
const likeTopic = `%${topic}%`;
|
|
3163
|
+
try {
|
|
3164
|
+
const decisionRows = db.prepare(`
|
|
3165
|
+
SELECT technology, reason, outcome, was_right, project, created_at
|
|
3166
|
+
FROM decisions
|
|
3167
|
+
WHERE technology LIKE ? OR reason LIKE ? OR outcome LIKE ?
|
|
3168
|
+
ORDER BY created_at DESC LIMIT 10
|
|
3169
|
+
`).all(likeTopic, likeTopic, likeTopic);
|
|
3170
|
+
const decisionOutcomeRows = db.prepare(`
|
|
3171
|
+
SELECT technology, reason, outcome, was_right, confidence, context, project, created_at
|
|
3172
|
+
FROM decision_outcomes
|
|
3173
|
+
WHERE technology LIKE ? OR reason LIKE ? OR outcome LIKE ? OR context LIKE ?
|
|
3174
|
+
ORDER BY created_at DESC LIMIT 10
|
|
3175
|
+
`).all(likeTopic, likeTopic, likeTopic, likeTopic);
|
|
3176
|
+
const logRows = db.prepare(`
|
|
3177
|
+
SELECT decision, approach, result, worked, file_path as file, decided_at
|
|
3178
|
+
FROM decision_log
|
|
3179
|
+
WHERE decision LIKE ? OR approach LIKE ? OR result LIKE ?
|
|
3180
|
+
ORDER BY decided_at DESC LIMIT 10
|
|
3181
|
+
`).all(likeTopic, likeTopic, likeTopic);
|
|
3182
|
+
let found = 0;
|
|
3183
|
+
if (decisionRows.length > 0) {
|
|
3184
|
+
console.log(C.bold(' Technology Decisions:'));
|
|
3185
|
+
for (const r of decisionRows) {
|
|
3186
|
+
const verdict = Number(r.was_right) ? C.success('Right') : C.warn('Wrong');
|
|
3187
|
+
console.log(` ${verdict} ${r.technology || r.reason}`);
|
|
3188
|
+
if (r.reason)
|
|
3189
|
+
console.log(C.dim(` Reason: ${r.reason}`));
|
|
3190
|
+
if (r.outcome)
|
|
3191
|
+
console.log(C.dim(` Outcome: ${r.outcome}`));
|
|
3192
|
+
if (r.project)
|
|
3193
|
+
console.log(C.dim(` Project: ${r.project}`));
|
|
3194
|
+
console.log();
|
|
3195
|
+
}
|
|
3196
|
+
found += decisionRows.length;
|
|
3197
|
+
}
|
|
3198
|
+
if (decisionOutcomeRows.length > 0) {
|
|
3199
|
+
console.log(C.bold(' Decision Outcomes:'));
|
|
3200
|
+
for (const r of decisionOutcomeRows) {
|
|
3201
|
+
const verdict = Number(r.was_right) ? C.success('Right') : C.warn('Wrong');
|
|
3202
|
+
console.log(` ${verdict} ${r.technology || r.reason}`);
|
|
3203
|
+
if (r.reason)
|
|
3204
|
+
console.log(C.dim(` Reason: ${r.reason}`));
|
|
3205
|
+
if (r.outcome)
|
|
3206
|
+
console.log(C.dim(` Outcome: ${r.outcome}`));
|
|
3207
|
+
if (r.context)
|
|
3208
|
+
console.log(C.dim(` Context: ${r.context}`));
|
|
3209
|
+
if (r.confidence)
|
|
3210
|
+
console.log(C.dim(` Confidence: ${r.confidence}%`));
|
|
3211
|
+
console.log();
|
|
3212
|
+
}
|
|
3213
|
+
found += decisionOutcomeRows.length;
|
|
3214
|
+
}
|
|
3215
|
+
if (logRows.length > 0) {
|
|
3216
|
+
console.log(C.bold(' Session Decisions:'));
|
|
3217
|
+
for (const r of logRows) {
|
|
3218
|
+
const verdict = Number(r.worked) ? C.success('Worked') : C.warn("Didn't");
|
|
3219
|
+
console.log(` ${verdict} ${r.decision}`);
|
|
3220
|
+
if (r.approach)
|
|
3221
|
+
console.log(C.dim(` Approach: ${r.approach}`));
|
|
3222
|
+
if (r.result)
|
|
3223
|
+
console.log(C.dim(` Result: ${r.result}`));
|
|
3224
|
+
if (r.file)
|
|
3225
|
+
console.log(C.dim(` File: ${r.file}`));
|
|
3226
|
+
console.log();
|
|
3227
|
+
}
|
|
3228
|
+
found += logRows.length;
|
|
3229
|
+
}
|
|
3230
|
+
if (found === 0) {
|
|
3231
|
+
console.log(C.dim(` No decisions found about "${topic}".`));
|
|
3232
|
+
console.log();
|
|
3233
|
+
console.log(C.dim(' Decisions are logged when you:'));
|
|
3234
|
+
console.log(C.dim(' - Accept/reject AI suggestions in your IDE'));
|
|
3235
|
+
console.log(C.dim(' - Run cell scan + cell setup'));
|
|
3236
|
+
console.log(C.dim(' - Use the decision MCP tool'));
|
|
3237
|
+
}
|
|
3238
|
+
}
|
|
3239
|
+
catch (e) {
|
|
3240
|
+
console.log(C.warn(` Search failed: ${e?.message || String(e)}`));
|
|
3241
|
+
}
|
|
3242
|
+
console.log();
|
|
3243
|
+
}
|
|
1689
3244
|
// test touch 14:40:59
|
|
1690
3245
|
//# sourceMappingURL=cli.js.map
|