fivocell 4.5.0 → 4.7.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/dist/__tests__/context-ranker.test.d.ts +2 -0
- package/dist/__tests__/context-ranker.test.d.ts.map +1 -0
- package/dist/__tests__/context-ranker.test.js +61 -0
- package/dist/__tests__/context-ranker.test.js.map +1 -0
- package/dist/__tests__/cross-project-memory.test.d.ts +2 -0
- package/dist/__tests__/cross-project-memory.test.d.ts.map +1 -0
- package/dist/__tests__/cross-project-memory.test.js +105 -0
- package/dist/__tests__/cross-project-memory.test.js.map +1 -0
- package/dist/__tests__/memory-charts.test.d.ts +2 -0
- package/dist/__tests__/memory-charts.test.d.ts.map +1 -0
- package/dist/__tests__/memory-charts.test.js +52 -0
- package/dist/__tests__/memory-charts.test.js.map +1 -0
- package/dist/__tests__/memory-compact.test.d.ts +2 -0
- package/dist/__tests__/memory-compact.test.d.ts.map +1 -0
- package/dist/__tests__/memory-compact.test.js +43 -0
- package/dist/__tests__/memory-compact.test.js.map +1 -0
- package/dist/__tests__/memory-insights.test.d.ts +2 -0
- package/dist/__tests__/memory-insights.test.d.ts.map +1 -0
- package/dist/__tests__/memory-insights.test.js +71 -0
- package/dist/__tests__/memory-insights.test.js.map +1 -0
- package/dist/__tests__/summary-generator.test.d.ts +2 -0
- package/dist/__tests__/summary-generator.test.d.ts.map +1 -0
- package/dist/__tests__/summary-generator.test.js +53 -0
- package/dist/__tests__/summary-generator.test.js.map +1 -0
- package/dist/walls/01-context/context/prompt-builder.d.ts +7 -0
- package/dist/walls/01-context/context/prompt-builder.d.ts.map +1 -1
- package/dist/walls/01-context/context/prompt-builder.js +29 -0
- package/dist/walls/01-context/context/prompt-builder.js.map +1 -1
- package/dist/walls/06-memory/archive/memory-compact.d.ts +17 -0
- package/dist/walls/06-memory/archive/memory-compact.d.ts.map +1 -0
- package/dist/walls/06-memory/archive/memory-compact.js +128 -0
- package/dist/walls/06-memory/archive/memory-compact.js.map +1 -0
- package/dist/walls/06-memory/database/database.d.ts.map +1 -1
- package/dist/walls/06-memory/database/database.js +16 -1
- package/dist/walls/06-memory/database/database.js.map +1 -1
- package/dist/walls/06-memory/stores/context-ranker.d.ts +21 -0
- package/dist/walls/06-memory/stores/context-ranker.d.ts.map +1 -0
- package/dist/walls/06-memory/stores/context-ranker.js +84 -0
- package/dist/walls/06-memory/stores/context-ranker.js.map +1 -0
- package/dist/walls/06-memory/stores/cross-project-memory.d.ts +53 -0
- package/dist/walls/06-memory/stores/cross-project-memory.d.ts.map +1 -0
- package/dist/walls/06-memory/stores/cross-project-memory.js +200 -0
- package/dist/walls/06-memory/stores/cross-project-memory.js.map +1 -0
- package/dist/walls/06-memory/stores/memory-charts.d.ts +14 -0
- package/dist/walls/06-memory/stores/memory-charts.d.ts.map +1 -0
- package/dist/walls/06-memory/stores/memory-charts.js +128 -0
- package/dist/walls/06-memory/stores/memory-charts.js.map +1 -0
- package/dist/walls/06-memory/stores/memory-insights.d.ts +26 -0
- package/dist/walls/06-memory/stores/memory-insights.d.ts.map +1 -0
- package/dist/walls/06-memory/stores/memory-insights.js +218 -0
- package/dist/walls/06-memory/stores/memory-insights.js.map +1 -0
- package/dist/walls/06-memory/stores/summary-generator.d.ts +16 -0
- package/dist/walls/06-memory/stores/summary-generator.d.ts.map +1 -0
- package/dist/walls/06-memory/stores/summary-generator.js +151 -0
- package/dist/walls/06-memory/stores/summary-generator.js.map +1 -0
- package/dist/walls/07-runtime/cli/cli.js +268 -0
- package/dist/walls/07-runtime/cli/cli.js.map +1 -1
- package/dist/walls/07-runtime/daemon/server.d.ts.map +1 -1
- package/dist/walls/07-runtime/daemon/server.js +156 -0
- package/dist/walls/07-runtime/daemon/server.js.map +1 -1
- package/dist/walls/07-runtime/watcher/live-watcher.d.ts.map +1 -1
- package/dist/walls/07-runtime/watcher/live-watcher.js +32 -0
- package/dist/walls/07-runtime/watcher/live-watcher.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 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AAiD,CAAC;AAEvF,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAEjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAC;AAE9E,OAAO,EAAE,iBAAiB,EAAE,MAAM,0CAA0C,CAAC;AAE7E,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAEnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAEpE,OAAO,EAAE,0BAA0B,EAAE,MAAM,4CAA4C,CAAC;AAExF,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AAEzE,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAEvE,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAElF,OAAO,EAAE,eAAe,EAAE,MAAM,gDAAgD,CAAC;AAEjF,OAAO,EAAE,gBAAgB,EAAE,MAAM,gDAAgD,CAAC;AAElF,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAE3D,OAAO,EAAE,sBAAsB,EAAE,MAAM,iDAAiD,CAAC;AAEzF,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AA0F3D,QAAA,MAAM,GAAG,6CAAY,CAAC;AAQtB,QAAA,MAAM,OAAO;;;mBAMuB,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0EhD,CAAC;AAm9KF,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC"}
|
|
@@ -1760,6 +1760,24 @@ const MCP_TOOLS = [
|
|
|
1760
1760
|
{ name: 'cell_predict', description: 'Predictive intelligence — repeat mistakes, decision regret, energy warnings, complexity traps', inputSchema: { type: 'object', properties: { project: { type: 'string' } }, required: [] } },
|
|
1761
1761
|
{ name: 'cell_model_track', description: 'Track AI model interaction — which tool was used, what task, accepted/rejected', inputSchema: { type: 'object', properties: { modelName: { type: 'string' }, taskType: { type: 'string' }, accepted: { type: 'boolean' }, responseTimeMs: { type: 'number' }, project: { type: 'string' }, suggestion: { type: 'string' } }, required: ['modelName', 'taskType', 'accepted'] } },
|
|
1762
1762
|
{ name: 'cell_model_recommend', description: 'Get AI model recommendations — which tool works best for which task', inputSchema: { type: 'object', properties: {} } },
|
|
1763
|
+
{ name: 'cell_handoff_current', description: 'Get current handoff context (max 200 lines, auto-rotation)', inputSchema: { type: 'object', properties: { project: { type: 'string' } } } },
|
|
1764
|
+
{ name: 'cell_handoff_log', description: 'Log a handoff entry with title, summary, status', inputSchema: { type: 'object', properties: { project: { type: 'string' }, title: { type: 'string' }, summary: { type: 'string' }, status: { type: 'string', enum: ['done', 'in-progress', 'blocked', 'pending'] }, filesChanged: { type: 'array', items: { type: 'string' } }, why: { type: 'string' }, nextSteps: { type: 'string' } }, required: ['title', 'summary', 'status'] } },
|
|
1765
|
+
{ name: 'cell_handoff_history', description: 'Get handoff history for a month (YYYY-MM)', inputSchema: { type: 'object', properties: { project: { type: 'string' }, month: { type: 'string' } } } },
|
|
1766
|
+
{ name: 'cell_memory_search', description: 'Search memory events by query (summary, topic, details)', inputSchema: { type: 'object', properties: { project: { type: 'string' }, query: { type: 'string' }, limit: { type: 'number' } }, required: ['query'] } },
|
|
1767
|
+
{ name: 'cell_memory_stats', description: 'Get memory event statistics (total, by type, avg importance)', inputSchema: { type: 'object', properties: { project: { type: 'string' } } } },
|
|
1768
|
+
{ name: 'cell_memory_timeline', description: 'Get memory activity timeline (grouped by day)', inputSchema: { type: 'object', properties: { project: { type: 'string' }, days: { type: 'number' } } } },
|
|
1769
|
+
{ name: 'cell_memory_record', description: 'Record a memory event (edit, decision, error, fix, etc.)', inputSchema: { type: 'object', properties: { project: { type: 'string' }, type: { type: 'string', enum: ['file_event', 'edit', 'decision', 'error', 'fix', 'verification', 'publish', 'handoff', 'pattern', 'style', 'session', 'branch', 'risk', 'question', 'ai_work'] }, topic: { type: 'string' }, summary: { type: 'string' }, files: { type: 'array', items: { type: 'string' } }, importance: { type: 'number' }, tool: { type: 'string' }, model: { type: 'string' } }, required: ['type', 'summary'] } },
|
|
1770
|
+
{ name: 'cell_style_get', description: 'Get developer and project style profiles', inputSchema: { type: 'object', properties: { project: { type: 'string' } }, required: ['project'] } },
|
|
1771
|
+
{ name: 'cell_style_update', description: 'Update developer style preference', inputSchema: { type: 'object', properties: { project: { type: 'string' }, key: { type: 'string' }, value: { type: 'string' } }, required: ['project', 'key', 'value'] } },
|
|
1772
|
+
{ name: 'cell_memory_compact', description: 'Compact memory — merge old events and archive chunks', inputSchema: { type: 'object', properties: { project: { type: 'string' }, olderThanDays: { type: 'number' } } } },
|
|
1773
|
+
{ name: 'cell_memory_health', description: 'Get full memory health report (events, archive, handoff)', inputSchema: { type: 'object', properties: { project: { type: 'string' } }, required: ['project'] } },
|
|
1774
|
+
{ name: 'cell_memory_summary', description: 'Generate daily or weekly memory summary', inputSchema: { type: 'object', properties: { project: { type: 'string' }, period: { type: 'string', enum: ['daily', 'weekly'] } }, required: ['project'] } },
|
|
1775
|
+
{ name: 'cell_memory_insights', description: 'Get proactive memory insights (trends, risks, recommendations)', inputSchema: { type: 'object', properties: { project: { type: 'string' }, days: { type: 'number' } }, required: ['project'] } },
|
|
1776
|
+
{ name: 'cell_memory_chart', description: 'Get memory visualization chart (activity, type, importance, timeline)', inputSchema: { type: 'object', properties: { project: { type: 'string' }, chartType: { type: 'string', enum: ['activity', 'type', 'importance', 'timeline', 'all'] }, days: { type: 'number' } }, required: ['project'] } },
|
|
1777
|
+
{ name: 'cell_cross_project_share', description: 'Share a pattern to cross-project memory', inputSchema: { type: 'object', properties: { project: { type: 'string' }, category: { type: 'string' }, rule: { type: 'string' }, language: { type: 'string' }, framework: { type: 'string' }, successRate: { type: 'number' } }, required: ['project', 'category', 'rule'] } },
|
|
1778
|
+
{ name: 'cell_cross_project_list', description: 'List shared patterns from cross-project memory', inputSchema: { type: 'object', properties: { project: { type: 'string' }, category: { type: 'string' } }, required: ['project'] } },
|
|
1779
|
+
{ name: 'cell_cross_project_insights', description: 'Get cross-project insights (compatible patterns, shared errors)', inputSchema: { type: 'object', properties: { project: { type: 'string' } }, required: ['project'] } },
|
|
1780
|
+
{ name: 'cell_cross_project_stats', description: 'Get cross-project memory statistics', inputSchema: { type: 'object', properties: {} } },
|
|
1763
1781
|
];
|
|
1764
1782
|
async function handleMCPToolCall(name, args) {
|
|
1765
1783
|
try {
|
|
@@ -2771,6 +2789,144 @@ async function handleMCPToolCall(name, args) {
|
|
|
2771
2789
|
const { getModelRecommendations } = require('../../03-knowledge/decisions/');
|
|
2772
2790
|
return { recommendations: getModelRecommendations() };
|
|
2773
2791
|
}
|
|
2792
|
+
case 'cell_handoff_current': {
|
|
2793
|
+
const { getCurrentHandoff, getHandoffStats } = require('../../06-memory/handoff/handoff-store');
|
|
2794
|
+
const projectDir = args.project || process.cwd();
|
|
2795
|
+
const content = getCurrentHandoff(projectDir);
|
|
2796
|
+
const stats = getHandoffStats(projectDir);
|
|
2797
|
+
return { content, stats };
|
|
2798
|
+
}
|
|
2799
|
+
case 'cell_handoff_log': {
|
|
2800
|
+
const { saveHandoffEntry } = require('../../06-memory/handoff/handoff-store');
|
|
2801
|
+
const projectDir = args.project || process.cwd();
|
|
2802
|
+
saveHandoffEntry(projectDir, {
|
|
2803
|
+
project: require('path').basename(projectDir),
|
|
2804
|
+
title: args.title,
|
|
2805
|
+
summary: args.summary,
|
|
2806
|
+
status: args.status || 'done',
|
|
2807
|
+
filesChanged: args.filesChanged,
|
|
2808
|
+
why: args.why,
|
|
2809
|
+
nextSteps: args.nextSteps,
|
|
2810
|
+
});
|
|
2811
|
+
return { logged: true, title: args.title };
|
|
2812
|
+
}
|
|
2813
|
+
case 'cell_handoff_history': {
|
|
2814
|
+
const { getHistoryHandoff } = require('../../06-memory/handoff/handoff-store');
|
|
2815
|
+
const projectDir = args.project || process.cwd();
|
|
2816
|
+
return { content: getHistoryHandoff(projectDir, args.month) };
|
|
2817
|
+
}
|
|
2818
|
+
case 'cell_memory_search': {
|
|
2819
|
+
const { searchMemoryEvents } = require('../../06-memory/stores/memory-event-store');
|
|
2820
|
+
const project = args.project;
|
|
2821
|
+
const results = searchMemoryEvents(args.query, project, args.limit || 20);
|
|
2822
|
+
return { results, count: results.length };
|
|
2823
|
+
}
|
|
2824
|
+
case 'cell_memory_stats': {
|
|
2825
|
+
const { getMemoryStats } = require('../../06-memory/stores/memory-event-store');
|
|
2826
|
+
return { stats: getMemoryStats(args.project) };
|
|
2827
|
+
}
|
|
2828
|
+
case 'cell_memory_timeline': {
|
|
2829
|
+
const { getMemoryTimeline } = require('../../06-memory/stores/memory-event-store');
|
|
2830
|
+
return { timeline: getMemoryTimeline(args.project, args.days || 30) };
|
|
2831
|
+
}
|
|
2832
|
+
case 'cell_memory_record': {
|
|
2833
|
+
const { recordMemoryEvent } = require('../../06-memory/stores/memory-event-store');
|
|
2834
|
+
const id = recordMemoryEvent({
|
|
2835
|
+
project: args.project || require('path').basename(process.cwd()),
|
|
2836
|
+
type: args.type,
|
|
2837
|
+
topic: args.topic,
|
|
2838
|
+
summary: args.summary,
|
|
2839
|
+
files: args.files,
|
|
2840
|
+
importance: args.importance,
|
|
2841
|
+
tool: args.tool,
|
|
2842
|
+
model: args.model,
|
|
2843
|
+
});
|
|
2844
|
+
return { recorded: true, id };
|
|
2845
|
+
}
|
|
2846
|
+
case 'cell_style_get': {
|
|
2847
|
+
const { getStyleProfile } = require('../../06-memory/style/style-memory');
|
|
2848
|
+
const projectDir = args.project || process.cwd();
|
|
2849
|
+
return { profile: getStyleProfile(projectDir) };
|
|
2850
|
+
}
|
|
2851
|
+
case 'cell_style_update': {
|
|
2852
|
+
const { updateDeveloperPreference } = require('../../06-memory/style/style-memory');
|
|
2853
|
+
const projectDir = args.project || process.cwd();
|
|
2854
|
+
updateDeveloperPreference(projectDir, args.key, args.value);
|
|
2855
|
+
return { updated: true, key: args.key, value: args.value };
|
|
2856
|
+
}
|
|
2857
|
+
case 'cell_memory_compact': {
|
|
2858
|
+
const { compactMemoryEvents, compactArchiveChunks } = require('../../06-memory/archive/memory-compact');
|
|
2859
|
+
const projectDir = args.project || process.cwd();
|
|
2860
|
+
const days = args.olderThanDays || 90;
|
|
2861
|
+
const eventsDeleted = compactMemoryEvents(days);
|
|
2862
|
+
const archiveResult = compactArchiveChunks(projectDir, days);
|
|
2863
|
+
return { eventsDeleted, archive: archiveResult };
|
|
2864
|
+
}
|
|
2865
|
+
case 'cell_memory_health': {
|
|
2866
|
+
const { getMemoryHealth } = require('../../06-memory/archive/memory-compact');
|
|
2867
|
+
const projectDir = args.project || process.cwd();
|
|
2868
|
+
return { health: getMemoryHealth(projectDir) };
|
|
2869
|
+
}
|
|
2870
|
+
case 'cell_memory_summary': {
|
|
2871
|
+
const { generateDailySummary, generateWeeklySummary } = require('../../06-memory/stores/summary-generator');
|
|
2872
|
+
const project = args.project || require('path').basename(process.cwd());
|
|
2873
|
+
const period = args.period || 'daily';
|
|
2874
|
+
const summary = period === 'weekly'
|
|
2875
|
+
? generateWeeklySummary(project, args.project || process.cwd())
|
|
2876
|
+
: generateDailySummary(project);
|
|
2877
|
+
return { summary };
|
|
2878
|
+
}
|
|
2879
|
+
case 'cell_memory_insights': {
|
|
2880
|
+
const { generateMemoryInsights, getInsightSummary } = require('../../06-memory/stores/memory-insights');
|
|
2881
|
+
const insightProject = args.project || require('path').basename(process.cwd());
|
|
2882
|
+
const days = args.days || 30;
|
|
2883
|
+
const insightSummary = getInsightSummary(insightProject, days);
|
|
2884
|
+
return { insights: insightSummary };
|
|
2885
|
+
}
|
|
2886
|
+
case 'cell_memory_chart': {
|
|
2887
|
+
const charts = require('../../06-memory/stores/memory-charts');
|
|
2888
|
+
const chartProject = args.project || require('path').basename(process.cwd());
|
|
2889
|
+
const chartType = args.chartType || 'activity';
|
|
2890
|
+
const chartDays = args.days || 14;
|
|
2891
|
+
switch (chartType) {
|
|
2892
|
+
case 'activity': return { chart: charts.renderActivityChart(chartProject, chartDays) };
|
|
2893
|
+
case 'type': return { chart: charts.renderTypeDistribution(chartProject) };
|
|
2894
|
+
case 'importance': return { chart: charts.renderImportanceChart(chartProject) };
|
|
2895
|
+
case 'timeline': return { chart: charts.renderTimelineChart(chartProject, chartDays) };
|
|
2896
|
+
case 'all': return { chart: charts.renderFullDashboard(chartProject) };
|
|
2897
|
+
default: return { error: `unknown chart type: ${chartType}` };
|
|
2898
|
+
}
|
|
2899
|
+
}
|
|
2900
|
+
case 'cell_cross_project_share': {
|
|
2901
|
+
const { sharePatternToMemory } = require('../../06-memory/stores/cross-project-memory');
|
|
2902
|
+
const shareProjectDir = args.project || process.cwd();
|
|
2903
|
+
const patternId = sharePatternToMemory(shareProjectDir, {
|
|
2904
|
+
category: args.category || 'general',
|
|
2905
|
+
rule: args.rule,
|
|
2906
|
+
language: args.language,
|
|
2907
|
+
framework: args.framework,
|
|
2908
|
+
successRate: args.successRate,
|
|
2909
|
+
});
|
|
2910
|
+
return { patternId };
|
|
2911
|
+
}
|
|
2912
|
+
case 'cell_cross_project_list': {
|
|
2913
|
+
const { getSharedPatterns } = require('../../06-memory/stores/cross-project-memory');
|
|
2914
|
+
const listProjectDir = args.project || process.cwd();
|
|
2915
|
+
const listCategory = args.category;
|
|
2916
|
+
const patterns = getSharedPatterns(listProjectDir, listCategory);
|
|
2917
|
+
return { patterns };
|
|
2918
|
+
}
|
|
2919
|
+
case 'cell_cross_project_insights': {
|
|
2920
|
+
const { getCrossProjectInsights } = require('../../06-memory/stores/cross-project-memory');
|
|
2921
|
+
const insightsProjectDir = args.project || process.cwd();
|
|
2922
|
+
const cpInsights = getCrossProjectInsights(insightsProjectDir, []);
|
|
2923
|
+
return { insights: cpInsights };
|
|
2924
|
+
}
|
|
2925
|
+
case 'cell_cross_project_stats': {
|
|
2926
|
+
const { getCrossProjectStats } = require('../../06-memory/stores/cross-project-memory');
|
|
2927
|
+
const cpStats = getCrossProjectStats();
|
|
2928
|
+
return { stats: cpStats };
|
|
2929
|
+
}
|
|
2774
2930
|
default:
|
|
2775
2931
|
return { error: `unknown tool: ${name}` };
|
|
2776
2932
|
}
|