fivocell 4.9.0 → 5.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/dist/__tests__/code-health.test.d.ts +2 -0
  2. package/dist/__tests__/code-health.test.d.ts.map +1 -0
  3. package/dist/__tests__/code-health.test.js +90 -0
  4. package/dist/__tests__/code-health.test.js.map +1 -0
  5. package/dist/__tests__/context-compression.test.d.ts +2 -0
  6. package/dist/__tests__/context-compression.test.d.ts.map +1 -0
  7. package/dist/__tests__/context-compression.test.js +77 -0
  8. package/dist/__tests__/context-compression.test.js.map +1 -0
  9. package/dist/__tests__/developer-velocity.test.d.ts +2 -0
  10. package/dist/__tests__/developer-velocity.test.d.ts.map +1 -0
  11. package/dist/__tests__/developer-velocity.test.js +66 -0
  12. package/dist/__tests__/developer-velocity.test.js.map +1 -0
  13. package/dist/__tests__/error-trends.test.d.ts +2 -0
  14. package/dist/__tests__/error-trends.test.d.ts.map +1 -0
  15. package/dist/__tests__/error-trends.test.js +61 -0
  16. package/dist/__tests__/error-trends.test.js.map +1 -0
  17. package/dist/__tests__/memory-automation.test.d.ts +2 -0
  18. package/dist/__tests__/memory-automation.test.d.ts.map +1 -0
  19. package/dist/__tests__/memory-automation.test.js +136 -0
  20. package/dist/__tests__/memory-automation.test.js.map +1 -0
  21. package/dist/__tests__/memory-growth.test.d.ts +2 -0
  22. package/dist/__tests__/memory-growth.test.d.ts.map +1 -0
  23. package/dist/__tests__/memory-growth.test.js +61 -0
  24. package/dist/__tests__/memory-growth.test.js.map +1 -0
  25. package/dist/__tests__/memory-health.test.d.ts +2 -0
  26. package/dist/__tests__/memory-health.test.d.ts.map +1 -0
  27. package/dist/__tests__/memory-health.test.js +66 -0
  28. package/dist/__tests__/memory-health.test.js.map +1 -0
  29. package/dist/__tests__/smart-recommendations.test.d.ts +2 -0
  30. package/dist/__tests__/smart-recommendations.test.d.ts.map +1 -0
  31. package/dist/__tests__/smart-recommendations.test.js +74 -0
  32. package/dist/__tests__/smart-recommendations.test.js.map +1 -0
  33. package/dist/walls/06-memory/automation/memory-automation.d.ts +49 -0
  34. package/dist/walls/06-memory/automation/memory-automation.d.ts.map +1 -0
  35. package/dist/walls/06-memory/automation/memory-automation.js +396 -0
  36. package/dist/walls/06-memory/automation/memory-automation.js.map +1 -0
  37. package/dist/walls/06-memory/stores/code-health.d.ts +40 -0
  38. package/dist/walls/06-memory/stores/code-health.d.ts.map +1 -0
  39. package/dist/walls/06-memory/stores/code-health.js +344 -0
  40. package/dist/walls/06-memory/stores/code-health.js.map +1 -0
  41. package/dist/walls/06-memory/stores/context-compression.d.ts +33 -0
  42. package/dist/walls/06-memory/stores/context-compression.d.ts.map +1 -0
  43. package/dist/walls/06-memory/stores/context-compression.js +265 -0
  44. package/dist/walls/06-memory/stores/context-compression.js.map +1 -0
  45. package/dist/walls/06-memory/stores/developer-velocity.d.ts +53 -0
  46. package/dist/walls/06-memory/stores/developer-velocity.d.ts.map +1 -0
  47. package/dist/walls/06-memory/stores/developer-velocity.js +225 -0
  48. package/dist/walls/06-memory/stores/developer-velocity.js.map +1 -0
  49. package/dist/walls/06-memory/stores/error-trends.d.ts +53 -0
  50. package/dist/walls/06-memory/stores/error-trends.d.ts.map +1 -0
  51. package/dist/walls/06-memory/stores/error-trends.js +232 -0
  52. package/dist/walls/06-memory/stores/error-trends.js.map +1 -0
  53. package/dist/walls/06-memory/stores/memory-growth.d.ts +34 -0
  54. package/dist/walls/06-memory/stores/memory-growth.d.ts.map +1 -0
  55. package/dist/walls/06-memory/stores/memory-growth.js +150 -0
  56. package/dist/walls/06-memory/stores/memory-growth.js.map +1 -0
  57. package/dist/walls/06-memory/stores/memory-health.d.ts +32 -0
  58. package/dist/walls/06-memory/stores/memory-health.d.ts.map +1 -0
  59. package/dist/walls/06-memory/stores/memory-health.js +221 -0
  60. package/dist/walls/06-memory/stores/memory-health.js.map +1 -0
  61. package/dist/walls/06-memory/stores/smart-recommendations.d.ts +30 -0
  62. package/dist/walls/06-memory/stores/smart-recommendations.d.ts.map +1 -0
  63. package/dist/walls/06-memory/stores/smart-recommendations.js +222 -0
  64. package/dist/walls/06-memory/stores/smart-recommendations.js.map +1 -0
  65. package/dist/walls/06-memory/stores/weekly-report.js +1 -1
  66. package/dist/walls/07-runtime/cli/cli.js +159 -0
  67. package/dist/walls/07-runtime/cli/cli.js.map +1 -1
  68. package/dist/walls/07-runtime/daemon/server.d.ts.map +1 -1
  69. package/dist/walls/07-runtime/daemon/server.js +61 -0
  70. package/dist/walls/07-runtime/daemon/server.js.map +1 -1
  71. package/package.json +1 -1
@@ -3944,6 +3944,157 @@ function doMemory() {
3944
3944
  console.log();
3945
3945
  return;
3946
3946
  }
3947
+ if (sub === 'automate' || sub === 'auto') {
3948
+ console.log(C.bold(' ── Memory Automation ──\n'));
3949
+ try {
3950
+ const { syncGitCommitsToMemory, getAutomationStatus, initAutomationConfig } = require('../../06-memory/automation/memory-automation');
3951
+ const { detectProject } = require('../setup/setup');
3952
+ const project = detectProject(cwd).name;
3953
+ const status = getAutomationStatus(cwd);
3954
+ console.log(` Git repo: ${status.isGitRepo ? C.success('yes') : C.warn('no')}`);
3955
+ console.log(` Branch: ${status.branch}`);
3956
+ console.log(` Latest commit: ${status.latestCommit ? status.latestCommit.slice(0, 8) : 'none'}`);
3957
+ console.log(` Config exists: ${status.configExists ? 'yes' : 'no'}`);
3958
+ console.log(` Last sync: ${status.lastSync || 'never'}`);
3959
+ if (status.isGitRepo) {
3960
+ console.log(C.dim('\n Syncing git commits to memory...'));
3961
+ initAutomationConfig(project, cwd);
3962
+ const result = syncGitCommitsToMemory(project, cwd);
3963
+ console.log(C.success(` Synced ${result.synced} new commits`));
3964
+ if (result.latestHash)
3965
+ console.log(C.dim(` Latest hash: ${result.latestHash.slice(0, 8)}`));
3966
+ }
3967
+ }
3968
+ catch (e) {
3969
+ console.log(C.warn(` Automation failed: ${e?.message || String(e)}`));
3970
+ }
3971
+ console.log();
3972
+ return;
3973
+ }
3974
+ if (sub === 'recommend' || sub === 'rec') {
3975
+ console.log(C.bold(' ── Smart Recommendations ──\n'));
3976
+ try {
3977
+ const { generateSmartRecommendations, getRecommendationSummary } = require('../../06-memory/stores/smart-recommendations');
3978
+ const { detectProject } = require('../setup/setup');
3979
+ const project = detectProject(cwd).name;
3980
+ const summary = getRecommendationSummary(project);
3981
+ console.log(` Total: ${summary.total} | High: ${C.warn(String(summary.high))} | Medium: ${C.primary(String(summary.medium))} | Low: ${C.dim(String(summary.low))}`);
3982
+ if (summary.top3.length > 0) {
3983
+ console.log(C.dim('\n Top recommendations:'));
3984
+ for (const r of summary.top3) {
3985
+ const prioColor = r.priority === 'high' ? C.warn : r.priority === 'medium' ? C.primary : C.dim;
3986
+ console.log(` ${prioColor(`[${r.priority}]`)} ${r.title}`);
3987
+ console.log(C.dim(` ${r.description.slice(0, 100)}`));
3988
+ }
3989
+ }
3990
+ if (Object.keys(summary.byCategory).length > 0) {
3991
+ console.log(C.dim('\n By category:'));
3992
+ for (const [cat, count] of Object.entries(summary.byCategory).sort((a, b) => b[1] - a[1])) {
3993
+ console.log(` ${cat}: ${count}`);
3994
+ }
3995
+ }
3996
+ }
3997
+ catch (e) {
3998
+ console.log(C.warn(` Recommendations failed: ${e?.message || String(e)}`));
3999
+ }
4000
+ console.log();
4001
+ return;
4002
+ }
4003
+ if (sub === 'compress' || sub === 'cx') {
4004
+ const mode = args[2] || 'compact';
4005
+ console.log(C.bold(` ── Context Compression (${mode}) ──\n`));
4006
+ try {
4007
+ const { compressContext, formatCompressedContext } = require('../../06-memory/stores/context-compression');
4008
+ const { detectProject } = require('../setup/setup');
4009
+ const project = detectProject(cwd).name;
4010
+ const ctx = compressContext({ project, mode: mode });
4011
+ console.log(formatCompressedContext(ctx));
4012
+ console.log(C.dim(` Token estimate: ~${ctx.tokenEstimate} | Sections: ${ctx.sections.length}`));
4013
+ }
4014
+ catch (e) {
4015
+ console.log(C.warn(` Compress failed: ${e?.message || String(e)}`));
4016
+ }
4017
+ console.log();
4018
+ return;
4019
+ }
4020
+ if (sub === 'score' || sub === 'sc') {
4021
+ console.log(C.bold(' ── Memory Health Score ──\n'));
4022
+ try {
4023
+ const { computeMemoryHealth, formatHealthReport } = require('../../06-memory/stores/memory-health');
4024
+ const { detectProject } = require('../setup/setup');
4025
+ const project = detectProject(cwd).name;
4026
+ const health = computeMemoryHealth(project);
4027
+ console.log(formatHealthReport(health));
4028
+ }
4029
+ catch (e) {
4030
+ console.log(C.warn(` Health score failed: ${e?.message || String(e)}`));
4031
+ }
4032
+ console.log();
4033
+ return;
4034
+ }
4035
+ if (sub === 'growth' || sub === 'gr') {
4036
+ const days = parseInt(args[2] || '30', 10);
4037
+ console.log(C.bold(` ── Memory Growth Trends (${days} days) ──\n`));
4038
+ try {
4039
+ const { computeGrowthTrends, formatGrowthTrend } = require('../../06-memory/stores/memory-growth');
4040
+ const { detectProject } = require('../setup/setup');
4041
+ const project = detectProject(cwd).name;
4042
+ const trend = computeGrowthTrends(project, days);
4043
+ console.log(formatGrowthTrend(trend));
4044
+ }
4045
+ catch (e) {
4046
+ console.log(C.warn(` Growth trends failed: ${e?.message || String(e)}`));
4047
+ }
4048
+ console.log();
4049
+ return;
4050
+ }
4051
+ if (sub === 'velocity' || sub === 'vel') {
4052
+ const days = parseInt(args[2] || '30', 10);
4053
+ console.log(C.bold(` ── Developer Velocity (${days} days) ──\n`));
4054
+ try {
4055
+ const { computeDeveloperVelocity, formatDeveloperVelocity } = require('../../06-memory/stores/developer-velocity');
4056
+ const { detectProject } = require('../setup/setup');
4057
+ const project = detectProject(cwd).name;
4058
+ const vel = computeDeveloperVelocity(project, days);
4059
+ console.log(formatDeveloperVelocity(vel));
4060
+ }
4061
+ catch (e) {
4062
+ console.log(C.warn(` Velocity failed: ${e?.message || String(e)}`));
4063
+ }
4064
+ console.log();
4065
+ return;
4066
+ }
4067
+ if (sub === 'errors' || sub === 'err') {
4068
+ const days = parseInt(args[2] || '30', 10);
4069
+ console.log(C.bold(` ── Error Trend Analysis (${days} days) ──\n`));
4070
+ try {
4071
+ const { computeErrorTrends, formatErrorTrend } = require('../../06-memory/stores/error-trends');
4072
+ const { detectProject } = require('../setup/setup');
4073
+ const project = detectProject(cwd).name;
4074
+ const trend = computeErrorTrends(project, days);
4075
+ console.log(formatErrorTrend(trend));
4076
+ }
4077
+ catch (e) {
4078
+ console.log(C.warn(` Error trends failed: ${e?.message || String(e)}`));
4079
+ }
4080
+ console.log();
4081
+ return;
4082
+ }
4083
+ if (sub === 'code-health' || sub === 'ch') {
4084
+ console.log(C.bold(' ── Code Health Score ──\n'));
4085
+ try {
4086
+ const { computeCodeHealth, formatCodeHealth } = require('../../06-memory/stores/code-health');
4087
+ const { detectProject } = require('../setup/setup');
4088
+ const project = detectProject(cwd).name;
4089
+ const health = computeCodeHealth(cwd, project);
4090
+ console.log(formatCodeHealth(health));
4091
+ }
4092
+ catch (e) {
4093
+ console.log(C.warn(` Code health failed: ${e?.message || String(e)}`));
4094
+ }
4095
+ console.log();
4096
+ return;
4097
+ }
3947
4098
  console.log(C.bold(' Cell Memory'));
3948
4099
  console.log(C.dim(' ──────────'));
3949
4100
  console.log(C.dim(' cell memory search <query> Search memory events'));
@@ -3952,6 +4103,11 @@ function doMemory() {
3952
4103
  console.log(C.dim(' cell memory compact Compact & rotate'));
3953
4104
  console.log(C.dim(' cell memory verify Verify memory health'));
3954
4105
  console.log(C.dim(' cell memory health Full memory health check'));
4106
+ console.log(C.dim(' cell memory score Health score (0-100)'));
4107
+ console.log(C.dim(' cell memory growth [days] Memory growth trends'));
4108
+ console.log(C.dim(' cell memory velocity [days] Developer velocity'));
4109
+ console.log(C.dim(' cell memory errors [days] Error trend analysis'));
4110
+ console.log(C.dim(' cell memory code-health Code health score'));
3955
4111
  console.log(C.dim(' cell memory summary [daily|weekly] Generate summary'));
3956
4112
  console.log(C.dim(' cell memory insights [days] Proactive insights'));
3957
4113
  console.log(C.dim(' cell memory chart [type] [days] Visual charts'));
@@ -3960,6 +4116,9 @@ function doMemory() {
3960
4116
  console.log(C.dim(' cell memory enrich [daily|weekly] AI enriched summary'));
3961
4117
  console.log(C.dim(' cell memory handoff-auto Auto-generate handoff'));
3962
4118
  console.log(C.dim(' cell memory digest Compact dashboard digest'));
4119
+ console.log(C.dim(' cell memory automate Sync git commits'));
4120
+ console.log(C.dim(' cell memory recommend Smart recommendations'));
4121
+ console.log(C.dim(' cell memory compress [mode] Compress context'));
3963
4122
  console.log(C.dim(' cell memory export Export to JSON'));
3964
4123
  console.log(C.dim(' cell memory stats Show memory stats'));
3965
4124
  console.log();