noverload-mcp 0.8.4 → 0.9.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/index.js +39 -19
- package/dist/index.js.map +1 -1
- package/dist/tools/implementations/_archived/estimate-tokens.d.ts +3 -0
- package/dist/tools/implementations/_archived/estimate-tokens.d.ts.map +1 -0
- package/dist/tools/implementations/_archived/estimate-tokens.js +54 -0
- package/dist/tools/implementations/_archived/estimate-tokens.js.map +1 -0
- package/dist/tools/implementations/_archived/expand-search.d.ts +3 -0
- package/dist/tools/implementations/_archived/expand-search.d.ts.map +1 -0
- package/dist/tools/implementations/_archived/expand-search.js +400 -0
- package/dist/tools/implementations/_archived/expand-search.js.map +1 -0
- package/dist/tools/implementations/_archived/extract-insights.d.ts +3 -0
- package/dist/tools/implementations/_archived/extract-insights.d.ts.map +1 -0
- package/dist/tools/implementations/_archived/extract-insights.js +130 -0
- package/dist/tools/implementations/_archived/extract-insights.js.map +1 -0
- package/dist/tools/implementations/_archived/find-connections.d.ts +3 -0
- package/dist/tools/implementations/_archived/find-connections.d.ts.map +1 -0
- package/dist/tools/implementations/_archived/find-connections.js +106 -0
- package/dist/tools/implementations/_archived/find-connections.js.map +1 -0
- package/dist/tools/implementations/_archived/instructions.d.ts +3 -0
- package/dist/tools/implementations/_archived/instructions.d.ts.map +1 -0
- package/dist/tools/implementations/_archived/instructions.js +88 -0
- package/dist/tools/implementations/_archived/instructions.js.map +1 -0
- package/dist/tools/implementations/_archived/knowledge-graph.d.ts +3 -0
- package/dist/tools/implementations/_archived/knowledge-graph.d.ts.map +1 -0
- package/dist/tools/implementations/_archived/knowledge-graph.js +278 -0
- package/dist/tools/implementations/_archived/knowledge-graph.js.map +1 -0
- package/dist/tools/implementations/_archived/plan-query.d.ts +3 -0
- package/dist/tools/implementations/_archived/plan-query.d.ts.map +1 -0
- package/dist/tools/implementations/_archived/plan-query.js +63 -0
- package/dist/tools/implementations/_archived/plan-query.js.map +1 -0
- package/dist/tools/implementations/_archived/raw-content.d.ts +3 -0
- package/dist/tools/implementations/_archived/raw-content.d.ts.map +1 -0
- package/dist/tools/implementations/_archived/raw-content.js +210 -0
- package/dist/tools/implementations/_archived/raw-content.js.map +1 -0
- package/dist/tools/implementations/_archived/similar-content.d.ts +3 -0
- package/dist/tools/implementations/_archived/similar-content.d.ts.map +1 -0
- package/dist/tools/implementations/_archived/similar-content.js +64 -0
- package/dist/tools/implementations/_archived/similar-content.js.map +1 -0
- package/dist/tools/implementations/_archived/smart-sections.d.ts +3 -0
- package/dist/tools/implementations/_archived/smart-sections.d.ts.map +1 -0
- package/dist/tools/implementations/_archived/smart-sections.js +471 -0
- package/dist/tools/implementations/_archived/smart-sections.js.map +1 -0
- package/dist/tools/implementations/_archived/synthesize.d.ts +3 -0
- package/dist/tools/implementations/_archived/synthesize.d.ts.map +1 -0
- package/dist/tools/implementations/_archived/synthesize.js +193 -0
- package/dist/tools/implementations/_archived/synthesize.js.map +1 -0
- package/dist/tools/implementations/_archived/timeline.d.ts +3 -0
- package/dist/tools/implementations/_archived/timeline.d.ts.map +1 -0
- package/dist/tools/implementations/_archived/timeline.js +191 -0
- package/dist/tools/implementations/_archived/timeline.js.map +1 -0
- package/dist/tools/index.d.ts +3 -15
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +31 -57
- package/dist/tools/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export const synthesizeContentTool = {
|
|
3
|
+
name: "synthesize_content",
|
|
4
|
+
description: "Analyze multiple content sources to generate actionable insights, find patterns, connections, and contradictions. Creates structured synthesis with timeline, next steps, and confidence scores.",
|
|
5
|
+
inputSchema: {
|
|
6
|
+
type: "object",
|
|
7
|
+
properties: {
|
|
8
|
+
query: {
|
|
9
|
+
type: "string",
|
|
10
|
+
description: "Topic or question to synthesize insights about",
|
|
11
|
+
},
|
|
12
|
+
contentIds: {
|
|
13
|
+
type: "array",
|
|
14
|
+
items: {
|
|
15
|
+
type: "string",
|
|
16
|
+
},
|
|
17
|
+
description: "Specific content IDs to analyze (optional, otherwise uses search)",
|
|
18
|
+
},
|
|
19
|
+
synthesisMode: {
|
|
20
|
+
type: "string",
|
|
21
|
+
enum: ["overview", "deep", "actionable", "comparison"],
|
|
22
|
+
description: "Type of synthesis to perform (default: actionable)",
|
|
23
|
+
default: "actionable",
|
|
24
|
+
},
|
|
25
|
+
findContradictions: {
|
|
26
|
+
type: "boolean",
|
|
27
|
+
description: "Look for contradictions between sources",
|
|
28
|
+
default: false,
|
|
29
|
+
},
|
|
30
|
+
findConnections: {
|
|
31
|
+
type: "boolean",
|
|
32
|
+
description: "Find connections and patterns across sources",
|
|
33
|
+
default: true,
|
|
34
|
+
},
|
|
35
|
+
maxSources: {
|
|
36
|
+
type: "number",
|
|
37
|
+
description: "Maximum number of sources to analyze",
|
|
38
|
+
default: 10,
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
required: ["query"],
|
|
42
|
+
},
|
|
43
|
+
modifies: false,
|
|
44
|
+
handler: async (client, args) => {
|
|
45
|
+
const schema = z.object({
|
|
46
|
+
query: z.string(),
|
|
47
|
+
contentIds: z.array(z.string()).optional(),
|
|
48
|
+
synthesisMode: z.enum(["overview", "deep", "actionable", "comparison"]).optional().default("actionable"),
|
|
49
|
+
findContradictions: z.boolean().optional().default(false),
|
|
50
|
+
findConnections: z.boolean().optional().default(true),
|
|
51
|
+
maxSources: z.number().optional().default(10),
|
|
52
|
+
});
|
|
53
|
+
const params = schema.parse(args);
|
|
54
|
+
const result = await client.synthesizeContent(params);
|
|
55
|
+
// Handle the API v2 response format
|
|
56
|
+
const synthesis = result.synthesis || result;
|
|
57
|
+
const metadata = result.metadata || {};
|
|
58
|
+
const sources = metadata.sources || result.sources || [];
|
|
59
|
+
let responseText = `# 🎯 Synthesis: "${params.query}"\n`;
|
|
60
|
+
responseText += `**Mode:** ${synthesis.mode || params.synthesisMode} | **Sources:** ${metadata.sourceCount || sources.length}`;
|
|
61
|
+
// Add confidence indicator - check multiple possible locations
|
|
62
|
+
const confidenceValue = metadata.confidence ||
|
|
63
|
+
(synthesis.confidence?.overall ? Math.round(synthesis.confidence.overall * 100) : null);
|
|
64
|
+
if (confidenceValue) {
|
|
65
|
+
const confidenceIcon = confidenceValue >= 80 ? "🟢" : confidenceValue >= 60 ? "🟡" : "🔴";
|
|
66
|
+
responseText += ` | **Confidence:** ${confidenceIcon} ${confidenceValue}%`;
|
|
67
|
+
}
|
|
68
|
+
responseText += `\n\n`;
|
|
69
|
+
// Summary Section - check multiple possible field names
|
|
70
|
+
const summaryText = synthesis.summary || synthesis.executiveSummary;
|
|
71
|
+
if (summaryText) {
|
|
72
|
+
responseText += `## 📋 Summary\n${summaryText}\n\n`;
|
|
73
|
+
}
|
|
74
|
+
// Insights Section - check multiple possible formats
|
|
75
|
+
const insights = synthesis.insights || synthesis.actionableInsights || [];
|
|
76
|
+
if (insights.length > 0) {
|
|
77
|
+
responseText += `## 💡 Key Insights\n`;
|
|
78
|
+
insights.forEach((insight, idx) => {
|
|
79
|
+
// Handle various insight formats
|
|
80
|
+
if (typeof insight === 'string') {
|
|
81
|
+
responseText += `${idx + 1}. ${insight}\n`;
|
|
82
|
+
}
|
|
83
|
+
else if (insight.insight) {
|
|
84
|
+
// Format from actionableInsights
|
|
85
|
+
const priorityIcon = insight.priority === "high" ? "🔴" : insight.priority === "medium" ? "🟡" : "🟢";
|
|
86
|
+
responseText += `${idx + 1}. ${priorityIcon} **${insight.insight}**`;
|
|
87
|
+
if (insight.category) {
|
|
88
|
+
responseText += ` *(${insight.category})*`;
|
|
89
|
+
}
|
|
90
|
+
responseText += `\n`;
|
|
91
|
+
if (insight.supportingEvidence && insight.supportingEvidence.length > 0) {
|
|
92
|
+
responseText += ` - Evidence: ${insight.supportingEvidence[0]}\n`;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
else if (insight.text) {
|
|
96
|
+
responseText += `${idx + 1}. **${insight.text}**`;
|
|
97
|
+
if (insight.sourceTitle) {
|
|
98
|
+
responseText += ` *(from: ${insight.sourceTitle})*`;
|
|
99
|
+
}
|
|
100
|
+
responseText += `\n`;
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
responseText += `\n`;
|
|
104
|
+
}
|
|
105
|
+
// Key Themes (from enhanced synthesis)
|
|
106
|
+
if (synthesis.keyThemes && synthesis.keyThemes.length > 0) {
|
|
107
|
+
responseText += `## 🎨 Key Themes\n`;
|
|
108
|
+
synthesis.keyThemes.forEach((theme, idx) => {
|
|
109
|
+
responseText += `${idx + 1}. **${theme.theme}** (${theme.frequency} sources)\n`;
|
|
110
|
+
if (theme.insight) {
|
|
111
|
+
responseText += ` - ${theme.insight}\n`;
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
responseText += `\n`;
|
|
115
|
+
}
|
|
116
|
+
// Action Plan - check multiple formats
|
|
117
|
+
const actionPlan = synthesis.actionPlan;
|
|
118
|
+
const nextSteps = synthesis.recommendedNextSteps || [];
|
|
119
|
+
if (actionPlan || nextSteps.length > 0) {
|
|
120
|
+
responseText += `## 🚀 Action Plan\n`;
|
|
121
|
+
if (actionPlan?.summary) {
|
|
122
|
+
responseText += `${actionPlan.summary}\n\n`;
|
|
123
|
+
}
|
|
124
|
+
if (actionPlan?.nextAction) {
|
|
125
|
+
responseText += `**🎯 Next Action:** ${actionPlan.nextAction.action || actionPlan.nextAction}\n\n`;
|
|
126
|
+
}
|
|
127
|
+
if (actionPlan?.steps && actionPlan.steps.length > 0) {
|
|
128
|
+
responseText += `### Steps\n`;
|
|
129
|
+
actionPlan.steps.forEach((step, idx) => {
|
|
130
|
+
const priorityIcon = step.priority === "high" ? "🔴" : step.priority === "medium" ? "🟡" : "🟢";
|
|
131
|
+
responseText += `${idx + 1}. ${priorityIcon} **${step.action}**`;
|
|
132
|
+
if (step.timeframe) {
|
|
133
|
+
responseText += ` *(${step.timeframe})*`;
|
|
134
|
+
}
|
|
135
|
+
if (step.reasoning) {
|
|
136
|
+
responseText += `\n - Reasoning: ${step.reasoning}`;
|
|
137
|
+
}
|
|
138
|
+
responseText += `\n`;
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
// recommendedNextSteps from enhanced synthesis
|
|
142
|
+
if (nextSteps.length > 0) {
|
|
143
|
+
responseText += `${nextSteps.length} actionable steps identified\n`;
|
|
144
|
+
nextSteps.forEach((step, idx) => {
|
|
145
|
+
responseText += `${idx + 1}. ${step}\n`;
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
responseText += `\n`;
|
|
149
|
+
}
|
|
150
|
+
// Knowledge Gaps (from enhanced synthesis)
|
|
151
|
+
if (synthesis.knowledgeGaps && synthesis.knowledgeGaps.length > 0) {
|
|
152
|
+
responseText += `## ❓ Knowledge Gaps\n`;
|
|
153
|
+
responseText += `Consider researching:\n`;
|
|
154
|
+
synthesis.knowledgeGaps.forEach((gap) => {
|
|
155
|
+
responseText += `- ${gap}\n`;
|
|
156
|
+
});
|
|
157
|
+
responseText += `\n`;
|
|
158
|
+
}
|
|
159
|
+
// Source Information
|
|
160
|
+
if (sources && sources.length > 0) {
|
|
161
|
+
responseText += `## 📚 Sources Analyzed\n`;
|
|
162
|
+
sources.forEach((source, idx) => {
|
|
163
|
+
const typeIcons = {
|
|
164
|
+
youtube: "📺",
|
|
165
|
+
x_twitter: "𝕏",
|
|
166
|
+
reddit: "🔗",
|
|
167
|
+
article: "📄",
|
|
168
|
+
pdf: "📑"
|
|
169
|
+
};
|
|
170
|
+
const typeIcon = typeIcons[source.type] || "📄";
|
|
171
|
+
responseText += `${idx + 1}. ${typeIcon} [${source.title}](${source.url})\n`;
|
|
172
|
+
});
|
|
173
|
+
responseText += `\n`;
|
|
174
|
+
}
|
|
175
|
+
// Metadata Footer
|
|
176
|
+
responseText += `---\n`;
|
|
177
|
+
responseText += `*Analysis completed in ${metadata.executionTime ? `${metadata.executionTime}ms` : 'N/A'}`;
|
|
178
|
+
if (metadata.totalTokens) {
|
|
179
|
+
responseText += ` | Processed ${metadata.totalTokens.toLocaleString()} tokens`;
|
|
180
|
+
}
|
|
181
|
+
responseText += `*\n`;
|
|
182
|
+
return {
|
|
183
|
+
content: [
|
|
184
|
+
{
|
|
185
|
+
type: "text",
|
|
186
|
+
text: responseText,
|
|
187
|
+
},
|
|
188
|
+
],
|
|
189
|
+
data: result,
|
|
190
|
+
};
|
|
191
|
+
},
|
|
192
|
+
};
|
|
193
|
+
//# sourceMappingURL=synthesize.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"synthesize.js","sourceRoot":"","sources":["../../../../src/tools/implementations/_archived/synthesize.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,MAAM,CAAC,MAAM,qBAAqB,GAAS;IACzC,IAAI,EAAE,oBAAoB;IAC1B,WAAW,EAAE,kMAAkM;IAC/M,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,gDAAgD;aAC9D;YACD,UAAU,EAAE;gBACV,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE;oBACL,IAAI,EAAE,QAAQ;iBACf;gBACD,WAAW,EAAE,mEAAmE;aACjF;YACD,aAAa,EAAE;gBACb,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,YAAY,EAAE,YAAY,CAAC;gBACtD,WAAW,EAAE,oDAAoD;gBACjE,OAAO,EAAE,YAAY;aACtB;YACD,kBAAkB,EAAE;gBAClB,IAAI,EAAE,SAAS;gBACf,WAAW,EAAE,yCAAyC;gBACtD,OAAO,EAAE,KAAK;aACf;YACD,eAAe,EAAE;gBACf,IAAI,EAAE,SAAS;gBACf,WAAW,EAAE,8CAA8C;gBAC3D,OAAO,EAAE,IAAI;aACd;Y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gBAC3C,MAAM,SAAS,GAA2B;oBACxC,OAAO,EAAE,IAAI;oBACb,SAAS,EAAE,IAAI;oBACf,MAAM,EAAE,IAAI;oBACZ,OAAO,EAAE,IAAI;oBACb,GAAG,EAAE,IAAI;iBACV,CAAC;gBACF,MAAM,QAAQ,GAAG,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC;gBAEhD,YAAY,IAAI,GAAG,GAAG,GAAG,CAAC,KAAK,QAAQ,KAAK,MAAM,CAAC,KAAK,KAAK,MAAM,CAAC,GAAG,KAAK,CAAC;YAC/E,CAAC,CAAC,CAAC;YACH,YAAY,IAAI,IAAI,CAAC;QACvB,CAAC;QAED,kBAAkB;QAClB,YAAY,IAAI,OAAO,CAAC;QACxB,YAAY,IAAI,0BAA0B,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,aAAa,IAAI,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC;QAC3G,IAAI,QAAQ,CAAC,WAAW,EAAE,CAAC;YACzB,YAAY,IAAI,gBAAgB,QAAQ,CAAC,WAAW,CAAC,cAAc,EAAE,SAAS,CAAC;QACjF,CAAC;QACD,YAAY,IAAI,KAAK,CAAC;QAEtB,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,YAAY;iBACnB;aACF;YACD,IAAI,EAAE,MAAM;SACb,CAAC;IACJ,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"timeline.d.ts","sourceRoot":"","sources":["../../../../src/tools/implementations/_archived/timeline.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAEnC,eAAO,MAAM,eAAe,EAAE,IAuN7B,CAAC"}
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export const getTimelineTool = {
|
|
3
|
+
name: "get_timeline",
|
|
4
|
+
description: "Get chronological understanding of how a topic has evolved over time across your saved content",
|
|
5
|
+
inputSchema: {
|
|
6
|
+
type: "object",
|
|
7
|
+
properties: {
|
|
8
|
+
topic: {
|
|
9
|
+
type: "string",
|
|
10
|
+
description: "The topic to track over time",
|
|
11
|
+
},
|
|
12
|
+
groupBy: {
|
|
13
|
+
type: "string",
|
|
14
|
+
enum: ["day", "week", "month", "year"],
|
|
15
|
+
description: "How to group the timeline",
|
|
16
|
+
default: "month",
|
|
17
|
+
},
|
|
18
|
+
includeInsights: {
|
|
19
|
+
type: "boolean",
|
|
20
|
+
description: "Include key insights for each time period",
|
|
21
|
+
default: true,
|
|
22
|
+
},
|
|
23
|
+
maxItems: {
|
|
24
|
+
type: "number",
|
|
25
|
+
description: "Maximum number of timeline items",
|
|
26
|
+
default: 20,
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
required: ["topic"],
|
|
30
|
+
},
|
|
31
|
+
modifies: false,
|
|
32
|
+
handler: async (client, args) => {
|
|
33
|
+
const schema = z.object({
|
|
34
|
+
topic: z.string(),
|
|
35
|
+
groupBy: z.enum(["day", "week", "month", "year"]).optional().default("month"),
|
|
36
|
+
includeInsights: z.boolean().optional().default(true),
|
|
37
|
+
maxItems: z.number().optional().default(20),
|
|
38
|
+
});
|
|
39
|
+
const params = schema.parse(args);
|
|
40
|
+
// Search for content related to the topic
|
|
41
|
+
const searchResults = await client.searchContent(params.topic, {
|
|
42
|
+
limit: 50, // Get more results for timeline
|
|
43
|
+
enableConceptExpansion: false, // More precise for timeline
|
|
44
|
+
});
|
|
45
|
+
if (!searchResults || searchResults.length === 0) {
|
|
46
|
+
return {
|
|
47
|
+
content: [
|
|
48
|
+
{
|
|
49
|
+
type: "text",
|
|
50
|
+
text: `No content found for topic: "${params.topic}". Timeline cannot be generated without saved content.`,
|
|
51
|
+
},
|
|
52
|
+
],
|
|
53
|
+
data: null,
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
// Sort by date and group
|
|
57
|
+
const sorted = searchResults
|
|
58
|
+
.filter((r) => r.createdAt)
|
|
59
|
+
.sort((a, b) => new Date(a.createdAt).getTime() - new Date(b.createdAt).getTime());
|
|
60
|
+
// Group by time period
|
|
61
|
+
const timeline = new Map();
|
|
62
|
+
sorted.forEach((item) => {
|
|
63
|
+
const date = new Date(item.createdAt);
|
|
64
|
+
let key;
|
|
65
|
+
switch (params.groupBy) {
|
|
66
|
+
case "day":
|
|
67
|
+
key = date.toISOString().split('T')[0];
|
|
68
|
+
break;
|
|
69
|
+
case "week":
|
|
70
|
+
const weekStart = new Date(date);
|
|
71
|
+
weekStart.setDate(date.getDate() - date.getDay());
|
|
72
|
+
key = `Week of ${weekStart.toISOString().split('T')[0]}`;
|
|
73
|
+
break;
|
|
74
|
+
case "month":
|
|
75
|
+
key = `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, '0')}`;
|
|
76
|
+
break;
|
|
77
|
+
case "year":
|
|
78
|
+
key = String(date.getFullYear());
|
|
79
|
+
break;
|
|
80
|
+
default:
|
|
81
|
+
key = date.toISOString().split('T')[0];
|
|
82
|
+
}
|
|
83
|
+
if (!timeline.has(key)) {
|
|
84
|
+
timeline.set(key, []);
|
|
85
|
+
}
|
|
86
|
+
timeline.get(key).push(item);
|
|
87
|
+
});
|
|
88
|
+
let responseText = `# ⏱️ Timeline: "${params.topic}"\n`;
|
|
89
|
+
responseText += `**Period:** Grouped by ${params.groupBy}\n`;
|
|
90
|
+
responseText += `**Content Found:** ${sorted.length} items across ${timeline.size} time periods\n\n`;
|
|
91
|
+
// Generate timeline
|
|
92
|
+
let itemCount = 0;
|
|
93
|
+
const timelineData = [];
|
|
94
|
+
Array.from(timeline.entries())
|
|
95
|
+
.slice(-params.maxItems) // Get most recent periods
|
|
96
|
+
.forEach(([period, items]) => {
|
|
97
|
+
if (itemCount >= params.maxItems)
|
|
98
|
+
return;
|
|
99
|
+
responseText += `## 📅 ${period}\n`;
|
|
100
|
+
responseText += `*${items.length} item${items.length > 1 ? 's' : ''} saved*\n\n`;
|
|
101
|
+
const periodData = {
|
|
102
|
+
period,
|
|
103
|
+
itemCount: items.length,
|
|
104
|
+
items: [],
|
|
105
|
+
};
|
|
106
|
+
// Show key items from this period
|
|
107
|
+
items.slice(0, 3).forEach((item) => {
|
|
108
|
+
const typeIcons = {
|
|
109
|
+
youtube: "📺",
|
|
110
|
+
x_twitter: "𝕏",
|
|
111
|
+
reddit: "🔗",
|
|
112
|
+
article: "📄",
|
|
113
|
+
pdf: "📑"
|
|
114
|
+
};
|
|
115
|
+
const icon = typeIcons[item.contentType] || "📄";
|
|
116
|
+
responseText += `### ${icon} ${item.title || "Untitled"}\n`;
|
|
117
|
+
if (params.includeInsights && item.summary) {
|
|
118
|
+
const summary = typeof item.summary === 'string'
|
|
119
|
+
? item.summary
|
|
120
|
+
: item.summary.one_sentence || item.summary.text;
|
|
121
|
+
if (summary) {
|
|
122
|
+
responseText += `💡 ${summary.slice(0, 200)}${summary.length > 200 ? '...' : ''}\n`;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
responseText += `🔗 [Link](${item.url})\n\n`;
|
|
126
|
+
periodData.items.push({
|
|
127
|
+
id: item.id,
|
|
128
|
+
title: item.title,
|
|
129
|
+
type: item.contentType,
|
|
130
|
+
summary: item.summary,
|
|
131
|
+
url: item.url,
|
|
132
|
+
});
|
|
133
|
+
});
|
|
134
|
+
if (items.length > 3) {
|
|
135
|
+
responseText += `*... and ${items.length - 3} more items from this period*\n\n`;
|
|
136
|
+
}
|
|
137
|
+
// Evolution insights
|
|
138
|
+
if (params.includeInsights && items.length > 1) {
|
|
139
|
+
const tags = new Set();
|
|
140
|
+
items.forEach((item) => {
|
|
141
|
+
if (item.tags) {
|
|
142
|
+
item.tags.forEach((tag) => tags.add(tag));
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
if (tags.size > 0) {
|
|
146
|
+
responseText += `**Key themes:** ${Array.from(tags).slice(0, 5).join(', ')}\n\n`;
|
|
147
|
+
periodData.themes = Array.from(tags);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
responseText += `---\n\n`;
|
|
151
|
+
timelineData.push(periodData);
|
|
152
|
+
itemCount++;
|
|
153
|
+
});
|
|
154
|
+
// Add evolution summary
|
|
155
|
+
if (timeline.size > 1) {
|
|
156
|
+
responseText += `## 📈 Evolution Summary\n`;
|
|
157
|
+
const firstPeriod = Array.from(timeline.keys())[0];
|
|
158
|
+
const lastPeriod = Array.from(timeline.keys())[timeline.size - 1];
|
|
159
|
+
responseText += `- **Timespan:** ${firstPeriod} to ${lastPeriod}\n`;
|
|
160
|
+
responseText += `- **Total Periods:** ${timeline.size}\n`;
|
|
161
|
+
responseText += `- **Average per ${params.groupBy}:** ${(sorted.length / timeline.size).toFixed(1)} items\n`;
|
|
162
|
+
// Find peak period
|
|
163
|
+
let peakPeriod = "";
|
|
164
|
+
let peakCount = 0;
|
|
165
|
+
timeline.forEach((items, period) => {
|
|
166
|
+
if (items.length > peakCount) {
|
|
167
|
+
peakCount = items.length;
|
|
168
|
+
peakPeriod = period;
|
|
169
|
+
}
|
|
170
|
+
});
|
|
171
|
+
responseText += `- **Most Active Period:** ${peakPeriod} (${peakCount} items)\n\n`;
|
|
172
|
+
responseText += `💡 **Tip:** Use \`explore_topic\` for deeper analysis of specific time periods.\n`;
|
|
173
|
+
}
|
|
174
|
+
return {
|
|
175
|
+
content: [
|
|
176
|
+
{
|
|
177
|
+
type: "text",
|
|
178
|
+
text: responseText,
|
|
179
|
+
},
|
|
180
|
+
],
|
|
181
|
+
data: {
|
|
182
|
+
topic: params.topic,
|
|
183
|
+
groupBy: params.groupBy,
|
|
184
|
+
timeline: timelineData,
|
|
185
|
+
totalItems: sorted.length,
|
|
186
|
+
totalPeriods: timeline.size,
|
|
187
|
+
},
|
|
188
|
+
};
|
|
189
|
+
},
|
|
190
|
+
};
|
|
191
|
+
//# sourceMappingURL=timeline.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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G,MAAM,CAAC;gBACtB,CAAC;YACH,CAAC,CAAC,CAAC;YAEH,YAAY,IAAI,6BAA6B,UAAU,KAAK,SAAS,aAAa,CAAC;YAEnF,YAAY,IAAI,mFAAmF,CAAC;QACtG,CAAC;QAED,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,YAAY;iBACnB;aACF;YACD,IAAI,EAAE;gBACJ,KAAK,EAAE,MAAM,CAAC,KAAK;gBACnB,OAAO,EAAE,MAAM,CAAC,OAAO;gBACvB,QAAQ,EAAE,YAAY;gBACtB,UAAU,EAAE,MAAM,CAAC,MAAM;gBACzB,YAAY,EAAE,QAAQ,CAAC,IAAI;aAC5B;SACF,CAAC;IACJ,CAAC;CACF,CAAC"}
|
package/dist/tools/index.d.ts
CHANGED
|
@@ -3,23 +3,11 @@ import { listSavedContentTool } from "./implementations/list-content.js";
|
|
|
3
3
|
import { getContentDetailsTool } from "./implementations/get-content.js";
|
|
4
4
|
import { searchContentTool } from "./implementations/search.js";
|
|
5
5
|
import { saveContentTool } from "./implementations/save-content.js";
|
|
6
|
-
import { listActionsTool, completeActionTool } from "./implementations/actions.js";
|
|
7
|
-
import { listGoalsTool } from "./implementations/goals.js";
|
|
8
|
-
import { estimateSearchTokensTool } from "./implementations/estimate-tokens.js";
|
|
9
|
-
import { synthesizeContentTool } from "./implementations/synthesize.js";
|
|
10
|
-
import { findSimilarContentTool } from "./implementations/similar-content.js";
|
|
11
6
|
import { batchGetContentTool } from "./implementations/batch-get.js";
|
|
12
|
-
import { getInstructionsTool } from "./implementations/instructions.js";
|
|
13
|
-
import { planQueryTool } from "./implementations/plan-query.js";
|
|
14
|
-
import { getRawContentTool } from "./implementations/raw-content.js";
|
|
15
7
|
import { exploreTopicTool } from "./implementations/explore-topic.js";
|
|
16
|
-
import { findConnectionsTool } from "./implementations/find-connections.js";
|
|
17
|
-
import { extractInsightsTool } from "./implementations/extract-insights.js";
|
|
18
|
-
import { getTimelineTool } from "./implementations/timeline.js";
|
|
19
|
-
import { buildKnowledgeGraphTool } from "./implementations/knowledge-graph.js";
|
|
20
8
|
import { extractFrameworksTool } from "./implementations/extract-frameworks.js";
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
9
|
+
import { listActionsTool, completeActionTool } from "./implementations/actions.js";
|
|
10
|
+
import { listGoalsTool } from "./implementations/goals.js";
|
|
23
11
|
export declare const tools: Tool[];
|
|
24
|
-
export { listSavedContentTool, getContentDetailsTool, searchContentTool, saveContentTool,
|
|
12
|
+
export { listSavedContentTool, getContentDetailsTool, searchContentTool, saveContentTool, batchGetContentTool, exploreTopicTool, extractFrameworksTool, listActionsTool, completeActionTool, listGoalsTool, };
|
|
25
13
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAIlC,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AACtE,OAAO,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAChF,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AACnF,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAiB3D,eAAO,MAAM,KAAK,EAAE,IAAI,EA0BvB,CAAC;AAGF,OAAO,EACL,oBAAoB,EACpB,qBAAqB,EACrB,iBAAiB,EACjB,eAAe,EACf,mBAAmB,EACnB,gBAAgB,EAChB,qBAAqB,EACrB,eAAe,EACf,kBAAkB,EAClB,aAAa,GACd,CAAC"}
|
package/dist/tools/index.js
CHANGED
|
@@ -1,74 +1,48 @@
|
|
|
1
|
-
//
|
|
1
|
+
// CORE TOOLS - Focused minimal set (10 tools)
|
|
2
|
+
// Based on user feedback: "Noverload handles storage and retrieval. LLM handles thinking."
|
|
2
3
|
import { listSavedContentTool } from "./implementations/list-content.js";
|
|
3
4
|
import { getContentDetailsTool } from "./implementations/get-content.js";
|
|
4
5
|
import { searchContentTool } from "./implementations/search.js";
|
|
5
6
|
import { saveContentTool } from "./implementations/save-content.js";
|
|
6
|
-
import { listActionsTool, completeActionTool } from "./implementations/actions.js";
|
|
7
|
-
import { listGoalsTool } from "./implementations/goals.js";
|
|
8
|
-
import { estimateSearchTokensTool } from "./implementations/estimate-tokens.js";
|
|
9
|
-
import { synthesizeContentTool } from "./implementations/synthesize.js";
|
|
10
|
-
import { findSimilarContentTool } from "./implementations/similar-content.js";
|
|
11
7
|
import { batchGetContentTool } from "./implementations/batch-get.js";
|
|
12
|
-
import { getInstructionsTool } from "./implementations/instructions.js";
|
|
13
|
-
import { planQueryTool } from "./implementations/plan-query.js";
|
|
14
|
-
import { getRawContentTool } from "./implementations/raw-content.js";
|
|
15
8
|
import { exploreTopicTool } from "./implementations/explore-topic.js";
|
|
16
|
-
import { findConnectionsTool } from "./implementations/find-connections.js";
|
|
17
|
-
import { extractInsightsTool } from "./implementations/extract-insights.js";
|
|
18
|
-
import { getTimelineTool } from "./implementations/timeline.js";
|
|
19
|
-
import { buildKnowledgeGraphTool } from "./implementations/knowledge-graph.js";
|
|
20
9
|
import { extractFrameworksTool } from "./implementations/extract-frameworks.js";
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
// ARCHIVED
|
|
24
|
-
//
|
|
25
|
-
//
|
|
26
|
-
//
|
|
10
|
+
import { listActionsTool, completeActionTool } from "./implementations/actions.js";
|
|
11
|
+
import { listGoalsTool } from "./implementations/goals.js";
|
|
12
|
+
// ARCHIVED TOOLS (in _archived/ folder for potential future use):
|
|
13
|
+
// - synthesize.ts: explore_topic does this better
|
|
14
|
+
// - extract-insights.ts: LLMs can extract insights from raw content
|
|
15
|
+
// - knowledge-graph.ts: Limited results, LLMs can map relationships
|
|
16
|
+
// - smart-sections.ts: Content extraction issues
|
|
17
|
+
// - raw-content.ts: Redundant with get-content.ts
|
|
18
|
+
// - find-connections.ts: LLMs can find connections
|
|
19
|
+
// - expand-search.ts: LLMs can reformulate queries
|
|
20
|
+
// - plan-query.ts: LLMs can plan queries
|
|
21
|
+
// - estimate-tokens.ts: Nice-to-have but not essential
|
|
22
|
+
// - instructions.ts: Guidance now in MCP system prompt
|
|
23
|
+
// - similar-content.ts: search_content covers most cases
|
|
24
|
+
// - timeline.ts: Niche use case
|
|
27
25
|
// Export all tools as a single array
|
|
28
26
|
export const tools = [
|
|
29
|
-
//
|
|
30
|
-
// Content retrieval and listing
|
|
27
|
+
// 1. Discovery: "What do I have?"
|
|
31
28
|
listSavedContentTool,
|
|
32
|
-
|
|
33
|
-
getRawContentTool,
|
|
34
|
-
batchGetContentTool,
|
|
35
|
-
// Search and discovery
|
|
29
|
+
// 2. Search: "Find relevant content" (RAG-powered)
|
|
36
30
|
searchContentTool,
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
//
|
|
40
|
-
|
|
31
|
+
// 3. Retrieval: "Give me this article" (includes full content)
|
|
32
|
+
getContentDetailsTool,
|
|
33
|
+
// 4. Batch Retrieval: "Give me these articles"
|
|
34
|
+
batchGetContentTool,
|
|
35
|
+
// 5. Synthesis: "Explore topic X" (context-efficient pre-processed insights)
|
|
41
36
|
exploreTopicTool,
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
// ARCHIVED - IN DEVELOPMENT
|
|
48
|
-
// findExamplesTool, // Needs database schema updates
|
|
49
|
-
// buildNarrativeTool, // Needs refinement
|
|
50
|
-
// Actions and goals
|
|
37
|
+
// 6. Frameworks: "Extract methodologies and frameworks"
|
|
38
|
+
extractFrameworksTool,
|
|
39
|
+
// 7. Save: "Save this URL"
|
|
40
|
+
saveContentTool,
|
|
41
|
+
// 8-10. Actions and goals
|
|
51
42
|
listActionsTool,
|
|
52
43
|
completeActionTool,
|
|
53
44
|
listGoalsTool,
|
|
54
|
-
// Content management
|
|
55
|
-
saveContentTool,
|
|
56
|
-
smartSectionsTool,
|
|
57
|
-
// Utility and planning
|
|
58
|
-
estimateSearchTokensTool,
|
|
59
|
-
getInstructionsTool,
|
|
60
|
-
planQueryTool,
|
|
61
45
|
];
|
|
62
|
-
// Export individual tools for testing
|
|
63
|
-
export {
|
|
64
|
-
// Core content tools
|
|
65
|
-
listSavedContentTool, getContentDetailsTool, searchContentTool, saveContentTool,
|
|
66
|
-
// Actions and goals
|
|
67
|
-
listActionsTool, completeActionTool, listGoalsTool,
|
|
68
|
-
// Analysis tools
|
|
69
|
-
estimateSearchTokensTool, synthesizeContentTool, findSimilarContentTool, batchGetContentTool, getInstructionsTool, planQueryTool, getRawContentTool, exploreTopicTool, findConnectionsTool, extractInsightsTool, getTimelineTool, buildKnowledgeGraphTool, extractFrameworksTool, expandSearchTool, smartSectionsTool,
|
|
70
|
-
// ARCHIVED - Available for testing but not in production
|
|
71
|
-
// findExamplesTool,
|
|
72
|
-
// buildNarrativeTool,
|
|
73
|
-
};
|
|
46
|
+
// Export individual tools for testing
|
|
47
|
+
export { listSavedContentTool, getContentDetailsTool, searchContentTool, saveContentTool, batchGetContentTool, exploreTopicTool, extractFrameworksTool, listActionsTool, completeActionTool, listGoalsTool, };
|
|
74
48
|
//# sourceMappingURL=index.js.map
|
package/dist/tools/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAEA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAEA,8CAA8C;AAC9C,2FAA2F;AAC3F,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AACtE,OAAO,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAChF,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AACnF,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAE3D,kEAAkE;AAClE,kDAAkD;AAClD,oEAAoE;AACpE,oEAAoE;AACpE,iDAAiD;AACjD,kDAAkD;AAClD,mDAAmD;AACnD,mDAAmD;AACnD,yCAAyC;AACzC,uDAAuD;AACvD,uDAAuD;AACvD,yDAAyD;AACzD,gCAAgC;AAEhC,qCAAqC;AACrC,MAAM,CAAC,MAAM,KAAK,GAAW;IAC3B,kCAAkC;IAClC,oBAAoB;IAEpB,mDAAmD;IACnD,iBAAiB;IAEjB,+DAA+D;IAC/D,qBAAqB;IAErB,+CAA+C;IAC/C,mBAAmB;IAEnB,6EAA6E;IAC7E,gBAAgB;IAEhB,wDAAwD;IACxD,qBAAqB;IAErB,2BAA2B;IAC3B,eAAe;IAEf,0BAA0B;IAC1B,eAAe;IACf,kBAAkB;IAClB,aAAa;CACd,CAAC;AAEF,sCAAsC;AACtC,OAAO,EACL,oBAAoB,EAC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