noverload-mcp 0.7.1 ā 0.7.3
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 +124 -40
- package/dist/index.js.map +1 -1
- package/dist/tools/implementations/build-narrative.d.ts.map +1 -1
- package/dist/tools/implementations/build-narrative.js +99 -50
- package/dist/tools/implementations/build-narrative.js.map +1 -1
- package/dist/tools/implementations/expand-search.d.ts.map +1 -1
- package/dist/tools/implementations/expand-search.js +223 -46
- package/dist/tools/implementations/expand-search.js.map +1 -1
- package/dist/tools/implementations/extract-frameworks.d.ts.map +1 -1
- package/dist/tools/implementations/extract-frameworks.js +82 -32
- package/dist/tools/implementations/extract-frameworks.js.map +1 -1
- package/dist/tools/implementations/find-examples.d.ts.map +1 -1
- package/dist/tools/implementations/find-examples.js +113 -46
- package/dist/tools/implementations/find-examples.js.map +1 -1
- package/dist/tools/implementations/smart-sections.d.ts.map +1 -1
- package/dist/tools/implementations/smart-sections.js +173 -62
- package/dist/tools/implementations/smart-sections.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,35 +1,183 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
const inputSchema = z.object({
|
|
3
|
-
originalQuery: z
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
originalQuery: z
|
|
4
|
+
.string()
|
|
5
|
+
.describe("The original search query that returned few/no results"),
|
|
6
|
+
noResultsFound: z
|
|
7
|
+
.boolean()
|
|
8
|
+
.optional()
|
|
9
|
+
.default(false)
|
|
10
|
+
.describe("Whether the original search returned no results"),
|
|
11
|
+
context: z
|
|
12
|
+
.string()
|
|
13
|
+
.optional()
|
|
14
|
+
.describe("Additional context about what the user is looking for"),
|
|
15
|
+
limit: z
|
|
16
|
+
.number()
|
|
17
|
+
.optional()
|
|
18
|
+
.default(5)
|
|
19
|
+
.describe("Maximum number of expanded queries to return"),
|
|
7
20
|
});
|
|
8
21
|
// Concept mapping for semantic expansion
|
|
9
22
|
const CONCEPT_MAP = {
|
|
10
23
|
// Business & Growth
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
24
|
+
storytelling: [
|
|
25
|
+
"narrative",
|
|
26
|
+
"pitch",
|
|
27
|
+
"story",
|
|
28
|
+
"presentation",
|
|
29
|
+
"messaging",
|
|
30
|
+
"communication",
|
|
31
|
+
"branding",
|
|
32
|
+
],
|
|
33
|
+
growth: [
|
|
34
|
+
"scaling",
|
|
35
|
+
"expansion",
|
|
36
|
+
"increase",
|
|
37
|
+
"development",
|
|
38
|
+
"progress",
|
|
39
|
+
"evolution",
|
|
40
|
+
"traction",
|
|
41
|
+
],
|
|
42
|
+
marketing: [
|
|
43
|
+
"promotion",
|
|
44
|
+
"advertising",
|
|
45
|
+
"branding",
|
|
46
|
+
"outreach",
|
|
47
|
+
"campaign",
|
|
48
|
+
"content",
|
|
49
|
+
"social media",
|
|
50
|
+
],
|
|
51
|
+
sales: [
|
|
52
|
+
"selling",
|
|
53
|
+
"revenue",
|
|
54
|
+
"conversion",
|
|
55
|
+
"closing",
|
|
56
|
+
"pipeline",
|
|
57
|
+
"deals",
|
|
58
|
+
"customers",
|
|
59
|
+
],
|
|
60
|
+
startup: [
|
|
61
|
+
"founder",
|
|
62
|
+
"entrepreneur",
|
|
63
|
+
"venture",
|
|
64
|
+
"bootstrap",
|
|
65
|
+
"launch",
|
|
66
|
+
"MVP",
|
|
67
|
+
"product-market fit",
|
|
68
|
+
],
|
|
16
69
|
// Technology
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
70
|
+
ai: [
|
|
71
|
+
"artificial intelligence",
|
|
72
|
+
"machine learning",
|
|
73
|
+
"ML",
|
|
74
|
+
"deep learning",
|
|
75
|
+
"neural network",
|
|
76
|
+
"LLM",
|
|
77
|
+
"GPT",
|
|
78
|
+
],
|
|
79
|
+
framework: [
|
|
80
|
+
"methodology",
|
|
81
|
+
"system",
|
|
82
|
+
"process",
|
|
83
|
+
"structure",
|
|
84
|
+
"approach",
|
|
85
|
+
"model",
|
|
86
|
+
"pattern",
|
|
87
|
+
],
|
|
88
|
+
api: [
|
|
89
|
+
"interface",
|
|
90
|
+
"endpoint",
|
|
91
|
+
"integration",
|
|
92
|
+
"webhook",
|
|
93
|
+
"REST",
|
|
94
|
+
"GraphQL",
|
|
95
|
+
"service",
|
|
96
|
+
],
|
|
97
|
+
database: [
|
|
98
|
+
"DB",
|
|
99
|
+
"SQL",
|
|
100
|
+
"NoSQL",
|
|
101
|
+
"data storage",
|
|
102
|
+
"postgres",
|
|
103
|
+
"mongodb",
|
|
104
|
+
"schema",
|
|
105
|
+
],
|
|
21
106
|
// Content & Learning
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
107
|
+
tutorial: [
|
|
108
|
+
"guide",
|
|
109
|
+
"how-to",
|
|
110
|
+
"walkthrough",
|
|
111
|
+
"instruction",
|
|
112
|
+
"lesson",
|
|
113
|
+
"course",
|
|
114
|
+
"training",
|
|
115
|
+
],
|
|
116
|
+
example: [
|
|
117
|
+
"case study",
|
|
118
|
+
"instance",
|
|
119
|
+
"sample",
|
|
120
|
+
"demonstration",
|
|
121
|
+
"illustration",
|
|
122
|
+
"use case",
|
|
123
|
+
"scenario",
|
|
124
|
+
],
|
|
125
|
+
"best practices": [
|
|
126
|
+
"guidelines",
|
|
127
|
+
"standards",
|
|
128
|
+
"recommendations",
|
|
129
|
+
"tips",
|
|
130
|
+
"advice",
|
|
131
|
+
"patterns",
|
|
132
|
+
"conventions",
|
|
133
|
+
],
|
|
25
134
|
// Strategy & Planning
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
135
|
+
strategy: [
|
|
136
|
+
"plan",
|
|
137
|
+
"approach",
|
|
138
|
+
"tactics",
|
|
139
|
+
"roadmap",
|
|
140
|
+
"blueprint",
|
|
141
|
+
"methodology",
|
|
142
|
+
"framework",
|
|
143
|
+
],
|
|
144
|
+
metrics: [
|
|
145
|
+
"KPIs",
|
|
146
|
+
"analytics",
|
|
147
|
+
"measurements",
|
|
148
|
+
"data",
|
|
149
|
+
"statistics",
|
|
150
|
+
"tracking",
|
|
151
|
+
"performance",
|
|
152
|
+
],
|
|
153
|
+
optimization: [
|
|
154
|
+
"improvement",
|
|
155
|
+
"enhancement",
|
|
156
|
+
"efficiency",
|
|
157
|
+
"performance",
|
|
158
|
+
"refinement",
|
|
159
|
+
"tuning",
|
|
160
|
+
],
|
|
29
161
|
// Product & Development
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
162
|
+
feature: [
|
|
163
|
+
"functionality",
|
|
164
|
+
"capability",
|
|
165
|
+
"component",
|
|
166
|
+
"module",
|
|
167
|
+
"tool",
|
|
168
|
+
"service",
|
|
169
|
+
"option",
|
|
170
|
+
],
|
|
171
|
+
bug: ["issue", "problem", "error", "defect", "glitch", "fault", "failure"],
|
|
172
|
+
design: [
|
|
173
|
+
"UX",
|
|
174
|
+
"UI",
|
|
175
|
+
"interface",
|
|
176
|
+
"layout",
|
|
177
|
+
"architecture",
|
|
178
|
+
"structure",
|
|
179
|
+
"pattern",
|
|
180
|
+
],
|
|
33
181
|
};
|
|
34
182
|
// Reverse mapping for bidirectional expansion
|
|
35
183
|
const REVERSE_MAP = new Map();
|
|
@@ -49,27 +197,27 @@ function expandConcepts(query) {
|
|
|
49
197
|
for (const word of words) {
|
|
50
198
|
// Check direct mappings
|
|
51
199
|
if (CONCEPT_MAP[word]) {
|
|
52
|
-
CONCEPT_MAP[word].forEach(term => expandedTerms.add(term));
|
|
200
|
+
CONCEPT_MAP[word].forEach((term) => expandedTerms.add(term));
|
|
53
201
|
}
|
|
54
202
|
// Check reverse mappings
|
|
55
203
|
if (REVERSE_MAP.has(word)) {
|
|
56
|
-
REVERSE_MAP.get(word).forEach(term => expandedTerms.add(term));
|
|
204
|
+
REVERSE_MAP.get(word).forEach((term) => expandedTerms.add(term));
|
|
57
205
|
}
|
|
58
206
|
// Check if word is part of any concept
|
|
59
207
|
for (const [concept, related] of Object.entries(CONCEPT_MAP)) {
|
|
60
208
|
if (concept.includes(word) || word.includes(concept)) {
|
|
61
|
-
related.forEach(term => expandedTerms.add(term));
|
|
209
|
+
related.forEach((term) => expandedTerms.add(term));
|
|
62
210
|
}
|
|
63
211
|
for (const rel of related) {
|
|
64
212
|
if (rel.includes(word) || word.includes(rel)) {
|
|
65
213
|
expandedTerms.add(concept);
|
|
66
|
-
related.forEach(term => expandedTerms.add(term));
|
|
214
|
+
related.forEach((term) => expandedTerms.add(term));
|
|
67
215
|
}
|
|
68
216
|
}
|
|
69
217
|
}
|
|
70
218
|
}
|
|
71
219
|
// Remove original words and return unique expansions
|
|
72
|
-
words.forEach(w => expandedTerms.delete(w));
|
|
220
|
+
words.forEach((w) => expandedTerms.delete(w));
|
|
73
221
|
return Array.from(expandedTerms);
|
|
74
222
|
}
|
|
75
223
|
function generateRelatedQueries(originalQuery, expansions) {
|
|
@@ -77,10 +225,11 @@ function generateRelatedQueries(originalQuery, expansions) {
|
|
|
77
225
|
const words = originalQuery.toLowerCase().split(/\s+/);
|
|
78
226
|
// Replace each word with its expansions
|
|
79
227
|
for (let i = 0; i < words.length; i++) {
|
|
80
|
-
for (const expansion of expansions.slice(0, 3)) {
|
|
228
|
+
for (const expansion of expansions.slice(0, 3)) {
|
|
229
|
+
// Limit to top 3 expansions per word
|
|
81
230
|
const newWords = [...words];
|
|
82
231
|
newWords[i] = expansion;
|
|
83
|
-
queries.push(newWords.join(
|
|
232
|
+
queries.push(newWords.join(" "));
|
|
84
233
|
}
|
|
85
234
|
}
|
|
86
235
|
// Add queries with appended expansions
|
|
@@ -89,12 +238,35 @@ function generateRelatedQueries(originalQuery, expansions) {
|
|
|
89
238
|
queries.push(`${expansion} ${originalQuery}`);
|
|
90
239
|
}
|
|
91
240
|
// Remove duplicates and original
|
|
92
|
-
return [...new Set(queries)].filter(q => q.toLowerCase() !== originalQuery.toLowerCase());
|
|
241
|
+
return [...new Set(queries)].filter((q) => q.toLowerCase() !== originalQuery.toLowerCase());
|
|
93
242
|
}
|
|
94
243
|
export const expandSearchTool = {
|
|
95
244
|
name: "noverload_expand_search",
|
|
96
245
|
description: "Intelligently expand search queries to find related content when original searches return few results. Uses concept mapping and semantic expansion.",
|
|
97
|
-
inputSchema:
|
|
246
|
+
inputSchema: {
|
|
247
|
+
type: "object",
|
|
248
|
+
properties: {
|
|
249
|
+
originalQuery: {
|
|
250
|
+
type: "string",
|
|
251
|
+
description: "The original search query that returned few/no results",
|
|
252
|
+
},
|
|
253
|
+
noResultsFound: {
|
|
254
|
+
type: "boolean",
|
|
255
|
+
description: "Whether the original search returned no results",
|
|
256
|
+
default: false,
|
|
257
|
+
},
|
|
258
|
+
context: {
|
|
259
|
+
type: "string",
|
|
260
|
+
description: "Additional context about what the user is looking for",
|
|
261
|
+
},
|
|
262
|
+
limit: {
|
|
263
|
+
type: "number",
|
|
264
|
+
description: "Maximum number of expanded queries to return",
|
|
265
|
+
default: 5,
|
|
266
|
+
},
|
|
267
|
+
},
|
|
268
|
+
required: ["originalQuery"],
|
|
269
|
+
},
|
|
98
270
|
modifies: false,
|
|
99
271
|
handler: async (client, args) => {
|
|
100
272
|
const input = inputSchema.parse(args);
|
|
@@ -135,25 +307,27 @@ export const expandSearchTool = {
|
|
|
135
307
|
}
|
|
136
308
|
// Step 5: Try to understand intent and add specific suggestions
|
|
137
309
|
const queryLower = input.originalQuery.toLowerCase();
|
|
138
|
-
if (queryLower.includes("how") ||
|
|
310
|
+
if (queryLower.includes("how") ||
|
|
311
|
+
queryLower.includes("guide") ||
|
|
312
|
+
queryLower.includes("tutorial")) {
|
|
139
313
|
suggestions.push({
|
|
140
314
|
query: `${input.originalQuery} step by step`,
|
|
141
315
|
rationale: "Looking for instructional content",
|
|
142
|
-
confidence: "high"
|
|
316
|
+
confidence: "high",
|
|
143
317
|
});
|
|
144
318
|
}
|
|
145
319
|
if (queryLower.includes("example") || queryLower.includes("case")) {
|
|
146
320
|
suggestions.push({
|
|
147
321
|
query: `${input.originalQuery} case study success story`,
|
|
148
322
|
rationale: "Looking for real-world examples",
|
|
149
|
-
confidence: "high"
|
|
323
|
+
confidence: "high",
|
|
150
324
|
});
|
|
151
325
|
}
|
|
152
326
|
if (queryLower.includes("best") || queryLower.includes("top")) {
|
|
153
327
|
suggestions.push({
|
|
154
328
|
query: `${input.originalQuery} recommendations tips`,
|
|
155
329
|
rationale: "Looking for curated advice",
|
|
156
|
-
confidence: "medium"
|
|
330
|
+
confidence: "medium",
|
|
157
331
|
});
|
|
158
332
|
}
|
|
159
333
|
// Format response
|
|
@@ -167,13 +341,16 @@ export const expandSearchTool = {
|
|
|
167
341
|
// Add expanded concepts
|
|
168
342
|
if (conceptExpansions.length > 0) {
|
|
169
343
|
responseText += `**Related Concepts Found:**\n`;
|
|
170
|
-
responseText += `${conceptExpansions.slice(0, 10).join(
|
|
344
|
+
responseText += `${conceptExpansions.slice(0, 10).join(", ")}\n\n`;
|
|
171
345
|
}
|
|
172
346
|
// Add suggested queries
|
|
173
347
|
responseText += `**Suggested Searches:**\n\n`;
|
|
174
348
|
for (const suggestion of suggestions.slice(0, input.limit)) {
|
|
175
|
-
const icon = suggestion.confidence === "high"
|
|
176
|
-
|
|
349
|
+
const icon = suggestion.confidence === "high"
|
|
350
|
+
? "šÆ"
|
|
351
|
+
: suggestion.confidence === "medium"
|
|
352
|
+
? "š¹"
|
|
353
|
+
: "ā½";
|
|
177
354
|
responseText += `${icon} **"${suggestion.query}"**\n`;
|
|
178
355
|
responseText += ` *${suggestion.rationale}*\n\n`;
|
|
179
356
|
}
|
|
@@ -194,16 +371,16 @@ export const expandSearchTool = {
|
|
|
194
371
|
content: [
|
|
195
372
|
{
|
|
196
373
|
type: "text",
|
|
197
|
-
text: responseText
|
|
198
|
-
}
|
|
374
|
+
text: responseText,
|
|
375
|
+
},
|
|
199
376
|
],
|
|
200
377
|
data: {
|
|
201
378
|
originalQuery: input.originalQuery,
|
|
202
379
|
expandedConcepts: conceptExpansions,
|
|
203
380
|
suggestedQueries: suggestions,
|
|
204
381
|
totalExpansions: expandedQueries.length,
|
|
205
|
-
strategies: strategies
|
|
206
|
-
}
|
|
382
|
+
strategies: strategies,
|
|
383
|
+
},
|
|
207
384
|
};
|
|
208
385
|
}
|
|
209
386
|
catch (error) {
|
|
@@ -212,12 +389,12 @@ export const expandSearchTool = {
|
|
|
212
389
|
content: [
|
|
213
390
|
{
|
|
214
391
|
type: "text",
|
|
215
|
-
text: `ā Error expanding search: ${error instanceof Error ? error.message :
|
|
216
|
-
}
|
|
392
|
+
text: `ā Error expanding search: ${error instanceof Error ? error.message : "Unknown error"}`,
|
|
393
|
+
},
|
|
217
394
|
],
|
|
218
|
-
error: true
|
|
395
|
+
error: true,
|
|
219
396
|
};
|
|
220
397
|
}
|
|
221
|
-
}
|
|
398
|
+
},
|
|
222
399
|
};
|
|
223
400
|
//# sourceMappingURL=expand-search.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expand-search.js","sourceRoot":"","sources":["../../../src/tools/implementations/expand-search.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3B,aAAa,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"expand-search.js","sourceRoot":"","sources":["../../../src/tools/implementations/expand-search.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3B,aAAa,EAAE,CAAC;SACb,MAAM,EAAE;SACR,QAAQ,CAAC,wDAAwD,CAAC;IACrE,cAAc,EAAE,CAAC;SACd,OAAO,EAAE;SACT,QAAQ,EAAE;SACV,OAAO,CAAC,KAAK,CAAC;SACd,QAAQ,CAAC,iDAAiD,CAAC;IAC9D,OAAO,EAAE,CAAC;SACP,MAAM,EAAE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OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CAAC,yBAAyB,EAAE,KAAK,CAAC,CAAC;YAEhD,OAAO;gBACL,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,6BAA6B,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,EAAE;qBAC9F;iBACF;gBACD,KAAK,EAAE,IAAI;aACZ,CAAC;QACJ,CAAC;IACH,CAAC;CACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extract-frameworks.d.ts","sourceRoot":"","sources":["../../../src/tools/implementations/extract-frameworks.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"extract-frameworks.d.ts","sourceRoot":"","sources":["../../../src/tools/implementations/extract-frameworks.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAsDnC,eAAO,MAAM,qBAAqB,EAAE,IA6PnC,CAAC"}
|
|
@@ -1,24 +1,65 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
const inputSchema = z.object({
|
|
3
|
-
query: z
|
|
4
|
-
|
|
3
|
+
query: z
|
|
4
|
+
.string()
|
|
5
|
+
.optional()
|
|
6
|
+
.describe("Optional: specific framework type to find"),
|
|
7
|
+
contentTypes: z
|
|
8
|
+
.array(z.enum(["youtube", "x_twitter", "reddit", "article", "pdf"]))
|
|
5
9
|
.optional()
|
|
6
10
|
.describe("Filter by content types"),
|
|
7
|
-
minConfidence: z
|
|
11
|
+
minConfidence: z
|
|
12
|
+
.number()
|
|
13
|
+
.min(0)
|
|
14
|
+
.max(1)
|
|
15
|
+
.optional()
|
|
16
|
+
.default(0.7)
|
|
8
17
|
.describe("Minimum confidence score for frameworks (0-1)"),
|
|
9
|
-
limit: z
|
|
18
|
+
limit: z
|
|
19
|
+
.number()
|
|
20
|
+
.optional()
|
|
21
|
+
.default(20)
|
|
10
22
|
.describe("Maximum number of frameworks to return"),
|
|
11
23
|
});
|
|
12
24
|
export const extractFrameworksTool = {
|
|
13
25
|
name: "noverload_extract_frameworks",
|
|
14
26
|
description: "Extract methodologies, frameworks, and step-by-step processes from your saved content. Finds structured approaches, patterns, and repeatable techniques.",
|
|
15
|
-
inputSchema:
|
|
27
|
+
inputSchema: {
|
|
28
|
+
type: "object",
|
|
29
|
+
properties: {
|
|
30
|
+
query: {
|
|
31
|
+
type: "string",
|
|
32
|
+
description: "Optional: specific framework type to find",
|
|
33
|
+
},
|
|
34
|
+
contentTypes: {
|
|
35
|
+
type: "array",
|
|
36
|
+
items: {
|
|
37
|
+
type: "string",
|
|
38
|
+
enum: ["youtube", "x_twitter", "reddit", "article", "pdf"],
|
|
39
|
+
},
|
|
40
|
+
description: "Filter by content types",
|
|
41
|
+
},
|
|
42
|
+
minConfidence: {
|
|
43
|
+
type: "number",
|
|
44
|
+
minimum: 0,
|
|
45
|
+
maximum: 1,
|
|
46
|
+
default: 0.7,
|
|
47
|
+
description: "Minimum confidence score for frameworks (0-1)",
|
|
48
|
+
},
|
|
49
|
+
limit: {
|
|
50
|
+
type: "number",
|
|
51
|
+
default: 20,
|
|
52
|
+
description: "Maximum number of frameworks to return",
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
},
|
|
16
56
|
modifies: false,
|
|
17
57
|
handler: async (client, args) => {
|
|
18
58
|
const input = inputSchema.parse(args);
|
|
19
59
|
try {
|
|
20
60
|
// First, get content that might contain frameworks
|
|
21
|
-
const searchQuery = input.query ||
|
|
61
|
+
const searchQuery = input.query ||
|
|
62
|
+
"framework methodology process steps guide how to tutorial";
|
|
22
63
|
// Search for relevant content
|
|
23
64
|
const searchResults = await client.searchContentV2({
|
|
24
65
|
query: searchQuery,
|
|
@@ -31,14 +72,14 @@ export const extractFrameworksTool = {
|
|
|
31
72
|
content: [
|
|
32
73
|
{
|
|
33
74
|
type: "text",
|
|
34
|
-
text: "š No content found that might contain frameworks. Try saving content about methodologies, tutorials, or how-to guides first."
|
|
35
|
-
}
|
|
75
|
+
text: "š No content found that might contain frameworks. Try saving content about methodologies, tutorials, or how-to guides first.",
|
|
76
|
+
},
|
|
36
77
|
],
|
|
37
78
|
data: {
|
|
38
79
|
frameworks: [],
|
|
39
80
|
totalFound: 0,
|
|
40
|
-
searchQuery: searchQuery
|
|
41
|
-
}
|
|
81
|
+
searchQuery: searchQuery,
|
|
82
|
+
},
|
|
42
83
|
};
|
|
43
84
|
}
|
|
44
85
|
// Collect all frameworks from content with ai_insights
|
|
@@ -56,8 +97,8 @@ export const extractFrameworksTool = {
|
|
|
56
97
|
id: result.id,
|
|
57
98
|
title: result.title || "Untitled",
|
|
58
99
|
url: result.url,
|
|
59
|
-
type: result.contentType
|
|
60
|
-
}
|
|
100
|
+
type: result.contentType,
|
|
101
|
+
},
|
|
61
102
|
});
|
|
62
103
|
}
|
|
63
104
|
}
|
|
@@ -83,15 +124,16 @@ export const extractFrameworksTool = {
|
|
|
83
124
|
content: [
|
|
84
125
|
{
|
|
85
126
|
type: "text",
|
|
86
|
-
text: extractionMessage +
|
|
87
|
-
|
|
127
|
+
text: extractionMessage +
|
|
128
|
+
"\nš” Tip: Content processing will extract frameworks automatically. Try again in a few moments, or use the 'noverload_process_content' tool to trigger processing.",
|
|
129
|
+
},
|
|
88
130
|
],
|
|
89
131
|
data: {
|
|
90
132
|
frameworks: [],
|
|
91
133
|
totalFound: 0,
|
|
92
134
|
contentNeedingExtraction: topResults.map((r) => r.id),
|
|
93
|
-
searchQuery: searchQuery
|
|
94
|
-
}
|
|
135
|
+
searchQuery: searchQuery,
|
|
136
|
+
},
|
|
95
137
|
};
|
|
96
138
|
}
|
|
97
139
|
// Sort frameworks by confidence and limit
|
|
@@ -131,22 +173,30 @@ export const extractFrameworksTool = {
|
|
|
131
173
|
if (fw.components && fw.components.length > 0) {
|
|
132
174
|
responseText += `**Components:**\n`;
|
|
133
175
|
for (const comp of fw.components) {
|
|
134
|
-
const importance = comp.importance ===
|
|
135
|
-
|
|
176
|
+
const importance = comp.importance === "critical"
|
|
177
|
+
? "š“"
|
|
178
|
+
: comp.importance === "important"
|
|
179
|
+
? "š”"
|
|
180
|
+
: "āŖ";
|
|
136
181
|
responseText += `- ${importance} **${comp.name}**: ${comp.description}\n`;
|
|
137
182
|
}
|
|
138
183
|
responseText += `\n`;
|
|
139
184
|
}
|
|
140
185
|
// Add use cases
|
|
141
186
|
if (fw.useCases && fw.useCases.length > 0) {
|
|
142
|
-
responseText += `**Use Cases:** ${fw.useCases.join(
|
|
187
|
+
responseText += `**Use Cases:** ${fw.useCases.join(", ")}\n`;
|
|
143
188
|
}
|
|
144
189
|
// Add source
|
|
145
190
|
if (fw.sourceContent) {
|
|
146
|
-
const icon = fw.sourceContent.type ===
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
191
|
+
const icon = fw.sourceContent.type === "youtube"
|
|
192
|
+
? "šŗ"
|
|
193
|
+
: fw.sourceContent.type === "x_twitter"
|
|
194
|
+
? "š"
|
|
195
|
+
: fw.sourceContent.type === "reddit"
|
|
196
|
+
? "š "
|
|
197
|
+
: fw.sourceContent.type === "pdf"
|
|
198
|
+
? "š"
|
|
199
|
+
: "š";
|
|
150
200
|
responseText += `*Source: ${icon} [${fw.sourceContent.title}](${fw.sourceContent.url})*\n\n`;
|
|
151
201
|
}
|
|
152
202
|
}
|
|
@@ -154,7 +204,7 @@ export const extractFrameworksTool = {
|
|
|
154
204
|
// Add summary statistics
|
|
155
205
|
responseText += `\n---\nš **Summary:**\n`;
|
|
156
206
|
responseText += `- Total frameworks found: ${allFrameworks.length}\n`;
|
|
157
|
-
responseText += `- High confidence (>90%): ${allFrameworks.filter(f => f.confidence > 0.9).length}\n`;
|
|
207
|
+
responseText += `- High confidence (>90%): ${allFrameworks.filter((f) => f.confidence > 0.9).length}\n`;
|
|
158
208
|
responseText += `- Content sources analyzed: ${contentWithFrameworks.length}\n`;
|
|
159
209
|
if (allFrameworks.length > input.limit) {
|
|
160
210
|
responseText += `\n*Showing top ${input.limit} frameworks. Increase limit to see more.*`;
|
|
@@ -163,16 +213,16 @@ export const extractFrameworksTool = {
|
|
|
163
213
|
content: [
|
|
164
214
|
{
|
|
165
215
|
type: "text",
|
|
166
|
-
text: responseText
|
|
167
|
-
}
|
|
216
|
+
text: responseText,
|
|
217
|
+
},
|
|
168
218
|
],
|
|
169
219
|
data: {
|
|
170
220
|
frameworks: limitedFrameworks,
|
|
171
221
|
totalFound: allFrameworks.length,
|
|
172
222
|
byType: Object.fromEntries(Object.entries(byType).map(([type, fws]) => [type, fws.length])),
|
|
173
223
|
contentSources: contentWithFrameworks,
|
|
174
|
-
searchQuery: searchQuery
|
|
175
|
-
}
|
|
224
|
+
searchQuery: searchQuery,
|
|
225
|
+
},
|
|
176
226
|
};
|
|
177
227
|
}
|
|
178
228
|
catch (error) {
|
|
@@ -181,12 +231,12 @@ export const extractFrameworksTool = {
|
|
|
181
231
|
content: [
|
|
182
232
|
{
|
|
183
233
|
type: "text",
|
|
184
|
-
text: `ā Error extracting frameworks: ${error instanceof Error ? error.message :
|
|
185
|
-
}
|
|
234
|
+
text: `ā Error extracting frameworks: ${error instanceof Error ? error.message : "Unknown error"}`,
|
|
235
|
+
},
|
|
186
236
|
],
|
|
187
|
-
error: true
|
|
237
|
+
error: true,
|
|
188
238
|
};
|
|
189
239
|
}
|
|
190
|
-
}
|
|
240
|
+
},
|
|
191
241
|
};
|
|
192
242
|
//# sourceMappingURL=extract-frameworks.js.map
|