@4da/mcp-server 3.2.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 (123) hide show
  1. package/README.md +135 -0
  2. package/dist/db.d.ts +64 -0
  3. package/dist/db.d.ts.map +1 -0
  4. package/dist/db.js +578 -0
  5. package/dist/db.js.map +1 -0
  6. package/dist/index.d.ts +37 -0
  7. package/dist/index.d.ts.map +1 -0
  8. package/dist/index.js +422 -0
  9. package/dist/index.js.map +1 -0
  10. package/dist/llm.d.ts +144 -0
  11. package/dist/llm.d.ts.map +1 -0
  12. package/dist/llm.js +447 -0
  13. package/dist/llm.js.map +1 -0
  14. package/dist/output-manager.d.ts +156 -0
  15. package/dist/output-manager.d.ts.map +1 -0
  16. package/dist/output-manager.js +156 -0
  17. package/dist/output-manager.js.map +1 -0
  18. package/dist/schema-registry.d.ts +46 -0
  19. package/dist/schema-registry.d.ts.map +1 -0
  20. package/dist/schema-registry.js +133 -0
  21. package/dist/schema-registry.js.map +1 -0
  22. package/dist/schemas/config-validator.json +18 -0
  23. package/dist/schemas/context-analysis.json +25 -0
  24. package/dist/schemas/daily-briefing.json +34 -0
  25. package/dist/schemas/explain-relevance.json +19 -0
  26. package/dist/schemas/get-actionable-signals.json +29 -0
  27. package/dist/schemas/get-context.json +17 -0
  28. package/dist/schemas/get-relevant-content.json +26 -0
  29. package/dist/schemas/llm-status.json +13 -0
  30. package/dist/schemas/record-feedback.json +24 -0
  31. package/dist/schemas/score-autopsy.json +30 -0
  32. package/dist/schemas/source-health.json +17 -0
  33. package/dist/schemas/topic-connections.json +34 -0
  34. package/dist/schemas/trend-analysis.json +29 -0
  35. package/dist/tools/attention-report.d.ts +39 -0
  36. package/dist/tools/attention-report.d.ts.map +1 -0
  37. package/dist/tools/attention-report.js +72 -0
  38. package/dist/tools/attention-report.js.map +1 -0
  39. package/dist/tools/config-validator.d.ts +59 -0
  40. package/dist/tools/config-validator.d.ts.map +1 -0
  41. package/dist/tools/config-validator.js +375 -0
  42. package/dist/tools/config-validator.js.map +1 -0
  43. package/dist/tools/context-analysis.d.ts +108 -0
  44. package/dist/tools/context-analysis.d.ts.map +1 -0
  45. package/dist/tools/context-analysis.js +300 -0
  46. package/dist/tools/context-analysis.js.map +1 -0
  47. package/dist/tools/daily-briefing.d.ts +103 -0
  48. package/dist/tools/daily-briefing.d.ts.map +1 -0
  49. package/dist/tools/daily-briefing.js +278 -0
  50. package/dist/tools/daily-briefing.js.map +1 -0
  51. package/dist/tools/explain-relevance.d.ts +36 -0
  52. package/dist/tools/explain-relevance.d.ts.map +1 -0
  53. package/dist/tools/explain-relevance.js +50 -0
  54. package/dist/tools/explain-relevance.js.map +1 -0
  55. package/dist/tools/export-context.d.ts +43 -0
  56. package/dist/tools/export-context.d.ts.map +1 -0
  57. package/dist/tools/export-context.js +104 -0
  58. package/dist/tools/export-context.js.map +1 -0
  59. package/dist/tools/get-actionable-signals.d.ts +65 -0
  60. package/dist/tools/get-actionable-signals.d.ts.map +1 -0
  61. package/dist/tools/get-actionable-signals.js +268 -0
  62. package/dist/tools/get-actionable-signals.js.map +1 -0
  63. package/dist/tools/get-context.d.ts +34 -0
  64. package/dist/tools/get-context.d.ts.map +1 -0
  65. package/dist/tools/get-context.js +43 -0
  66. package/dist/tools/get-context.js.map +1 -0
  67. package/dist/tools/get-relevant-content.d.ts +44 -0
  68. package/dist/tools/get-relevant-content.d.ts.map +1 -0
  69. package/dist/tools/get-relevant-content.js +56 -0
  70. package/dist/tools/get-relevant-content.js.map +1 -0
  71. package/dist/tools/index.d.ts +40 -0
  72. package/dist/tools/index.d.ts.map +1 -0
  73. package/dist/tools/index.js +44 -0
  74. package/dist/tools/index.js.map +1 -0
  75. package/dist/tools/knowledge-gaps.d.ts +36 -0
  76. package/dist/tools/knowledge-gaps.d.ts.map +1 -0
  77. package/dist/tools/knowledge-gaps.js +76 -0
  78. package/dist/tools/knowledge-gaps.js.map +1 -0
  79. package/dist/tools/llm-status.d.ts +45 -0
  80. package/dist/tools/llm-status.d.ts.map +1 -0
  81. package/dist/tools/llm-status.js +92 -0
  82. package/dist/tools/llm-status.js.map +1 -0
  83. package/dist/tools/project-health.d.ts +41 -0
  84. package/dist/tools/project-health.d.ts.map +1 -0
  85. package/dist/tools/project-health.js +71 -0
  86. package/dist/tools/project-health.js.map +1 -0
  87. package/dist/tools/record-feedback.d.ts +39 -0
  88. package/dist/tools/record-feedback.d.ts.map +1 -0
  89. package/dist/tools/record-feedback.js +60 -0
  90. package/dist/tools/record-feedback.js.map +1 -0
  91. package/dist/tools/reverse-mentions.d.ts +38 -0
  92. package/dist/tools/reverse-mentions.d.ts.map +1 -0
  93. package/dist/tools/reverse-mentions.js +57 -0
  94. package/dist/tools/reverse-mentions.js.map +1 -0
  95. package/dist/tools/score-autopsy.d.ts +93 -0
  96. package/dist/tools/score-autopsy.d.ts.map +1 -0
  97. package/dist/tools/score-autopsy.js +288 -0
  98. package/dist/tools/score-autopsy.js.map +1 -0
  99. package/dist/tools/semantic-shifts.d.ts +37 -0
  100. package/dist/tools/semantic-shifts.d.ts.map +1 -0
  101. package/dist/tools/semantic-shifts.js +73 -0
  102. package/dist/tools/semantic-shifts.js.map +1 -0
  103. package/dist/tools/signal-chains.d.ts +45 -0
  104. package/dist/tools/signal-chains.d.ts.map +1 -0
  105. package/dist/tools/signal-chains.js +60 -0
  106. package/dist/tools/signal-chains.js.map +1 -0
  107. package/dist/tools/source-health.d.ts +64 -0
  108. package/dist/tools/source-health.d.ts.map +1 -0
  109. package/dist/tools/source-health.js +176 -0
  110. package/dist/tools/source-health.js.map +1 -0
  111. package/dist/tools/topic-connections.d.ts +112 -0
  112. package/dist/tools/topic-connections.d.ts.map +1 -0
  113. package/dist/tools/topic-connections.js +318 -0
  114. package/dist/tools/topic-connections.js.map +1 -0
  115. package/dist/tools/trend-analysis.d.ts +105 -0
  116. package/dist/tools/trend-analysis.d.ts.map +1 -0
  117. package/dist/tools/trend-analysis.js +295 -0
  118. package/dist/tools/trend-analysis.js.map +1 -0
  119. package/dist/types.d.ts +163 -0
  120. package/dist/types.d.ts.map +1 -0
  121. package/dist/types.js +7 -0
  122. package/dist/types.js.map +1 -0
  123. package/package.json +61 -0
@@ -0,0 +1,268 @@
1
+ /**
2
+ * get_actionable_signals tool
3
+ *
4
+ * Classifies source items into actionable signal types (security alerts,
5
+ * breaking changes, tool discoveries, etc.) with priority levels.
6
+ * Cross-references against the user's ACE-detected tech stack.
7
+ */
8
+ // ============================================================================
9
+ // Pattern Definitions
10
+ // ============================================================================
11
+ const SIGNAL_PATTERNS = {
12
+ security_alert: {
13
+ keywords: [
14
+ "cve", "vulnerability", "exploit", "breach", "security flaw",
15
+ "zero-day", "zero day", "0-day", "patch", "ransomware",
16
+ "malware", "rce", "injection attack", "xss", "csrf",
17
+ "privilege escalation", "backdoor", "supply chain attack",
18
+ ],
19
+ boostWords: ["critical", "urgent", "severe", "actively exploited", "emergency"],
20
+ weight: 1.0,
21
+ },
22
+ breaking_change: {
23
+ keywords: [
24
+ "breaking change", "deprecated", "end of life", "eol",
25
+ "migration guide", "major release", "drops support",
26
+ "removed in", "no longer supported", "sunset",
27
+ "backwards incompatible", "api change",
28
+ ],
29
+ boostWords: ["v2", "v3", "v4", "v5", "major version", "upgrade required"],
30
+ weight: 0.9,
31
+ },
32
+ tool_discovery: {
33
+ keywords: [
34
+ "new release", "just released", "announcing", "launch",
35
+ "alternative to", "built with", "replacement for",
36
+ "open source", "open-source", "introducing",
37
+ "we built", "i built", "show hn",
38
+ ],
39
+ boostWords: ["faster", "better", "simpler", "lightweight", "blazing"],
40
+ weight: 0.7,
41
+ },
42
+ tech_trend: {
43
+ keywords: [
44
+ "adoption", "growing", "trending", "benchmark",
45
+ "comparison", "state of", "survey", "report",
46
+ "market share", "ecosystem", "roadmap",
47
+ ],
48
+ boostWords: ["2025", "2026", "accelerating", "mainstream", "industry"],
49
+ weight: 0.6,
50
+ },
51
+ learning: {
52
+ keywords: [
53
+ "tutorial", "how to", "guide", "deep dive",
54
+ "explained", "best practices", "patterns",
55
+ "architecture", "lessons learned", "walkthrough",
56
+ "step by step", "from scratch",
57
+ ],
58
+ boostWords: ["advanced", "production", "real-world", "comprehensive"],
59
+ weight: 0.5,
60
+ },
61
+ competitive_intel: {
62
+ keywords: [
63
+ "acquired", "funding", "raised", "ipo",
64
+ "valuation", "market share", "competitor",
65
+ "pivots", "pivot", "layoffs", "shutdown",
66
+ "acqui-hire", "series a", "series b",
67
+ ],
68
+ boostWords: ["million", "billion", "disrupts", "overtakes"],
69
+ weight: 0.6,
70
+ },
71
+ };
72
+ const BASE_WEIGHTS = {
73
+ security_alert: 4,
74
+ breaking_change: 3,
75
+ tool_discovery: 2,
76
+ tech_trend: 2,
77
+ learning: 1,
78
+ competitive_intel: 2,
79
+ };
80
+ const PRIORITY_LABELS = {
81
+ security_alert: "Security Alert",
82
+ breaking_change: "Breaking Change",
83
+ tool_discovery: "Tool Discovery",
84
+ tech_trend: "Tech Trend",
85
+ learning: "Learning",
86
+ competitive_intel: "Competitive Intel",
87
+ };
88
+ const KEYWORD_MAP = new Map();
89
+ // Initialize keyword map
90
+ for (const [type, pattern] of Object.entries(SIGNAL_PATTERNS)) {
91
+ for (const kw of pattern.keywords) {
92
+ if (!KEYWORD_MAP.has(kw)) {
93
+ KEYWORD_MAP.set(kw, []);
94
+ }
95
+ KEYWORD_MAP.get(kw).push({ type, weight: pattern.weight, isBoost: false });
96
+ }
97
+ for (const bw of pattern.boostWords) {
98
+ if (!KEYWORD_MAP.has(bw)) {
99
+ KEYWORD_MAP.set(bw, []);
100
+ }
101
+ KEYWORD_MAP.get(bw).push({ type, weight: 0.2, isBoost: true });
102
+ }
103
+ }
104
+ function classify(title, content, relevanceScore, detectedTech) {
105
+ // Pre-compute lowercased text once
106
+ const textLower = `${title} ${content}`.toLowerCase();
107
+ const titleLower = title.toLowerCase();
108
+ // Track scores per signal type
109
+ const typeScores = {};
110
+ // Single pass through keyword map
111
+ for (const [keyword, entries] of KEYWORD_MAP.entries()) {
112
+ if (textLower.includes(keyword)) {
113
+ for (const entry of entries) {
114
+ if (!typeScores[entry.type]) {
115
+ typeScores[entry.type] = { score: 0, matched: [] };
116
+ }
117
+ typeScores[entry.type].score += entry.weight;
118
+ typeScores[entry.type].matched.push(keyword);
119
+ // Boost if keyword is in title (only for non-boost words)
120
+ if (!entry.isBoost && titleLower.includes(keyword)) {
121
+ typeScores[entry.type].score += entry.weight * 0.5;
122
+ }
123
+ }
124
+ }
125
+ }
126
+ // Find best type
127
+ let bestType = null;
128
+ let bestConfidence = 0;
129
+ let bestTriggers = [];
130
+ for (const [type, data] of Object.entries(typeScores)) {
131
+ const confidence = Math.min(data.score / 3.0, 1.0);
132
+ if (confidence > bestConfidence) {
133
+ bestType = type;
134
+ bestConfidence = confidence;
135
+ bestTriggers = data.matched;
136
+ }
137
+ }
138
+ if (!bestType)
139
+ return null;
140
+ // Compute priority
141
+ let priorityScore = BASE_WEIGHTS[bestType];
142
+ const techMatch = detectedTech.find((t) => textLower.includes(t.toLowerCase()));
143
+ if (techMatch)
144
+ priorityScore += 1;
145
+ if (relevanceScore > 0.7)
146
+ priorityScore += 1;
147
+ priorityScore = Math.min(priorityScore, 4);
148
+ const priority = priorityScore >= 4 ? "critical" : priorityScore === 3 ? "high" : priorityScore === 2 ? "medium" : "low";
149
+ // Generate action
150
+ const shortTitle = title.length > 60 ? title.substring(0, 60) + "..." : title;
151
+ let action;
152
+ if (bestType === "security_alert" && techMatch) {
153
+ action = `Review ${shortTitle} - affects your ${techMatch} stack`;
154
+ }
155
+ else if (bestType === "breaking_change" && techMatch) {
156
+ action = `Check migration path - ${techMatch} breaking change`;
157
+ }
158
+ else if (bestType === "tool_discovery" && techMatch) {
159
+ action = `Evaluate for your ${techMatch} workflow: ${shortTitle}`;
160
+ }
161
+ else {
162
+ action = `${PRIORITY_LABELS[bestType] || bestType}: ${shortTitle}`;
163
+ }
164
+ return {
165
+ signalType: bestType,
166
+ priority,
167
+ confidence: Math.round(bestConfidence * 100) / 100,
168
+ action,
169
+ triggers: bestTriggers,
170
+ };
171
+ }
172
+ // ============================================================================
173
+ // Tool Definition
174
+ // ============================================================================
175
+ export const getActionableSignalsTool = {
176
+ name: "get_actionable_signals",
177
+ description: `Get actionable signals classified from recent content.
178
+
179
+ Categorizes items into signal types: security_alert, breaking_change,
180
+ tool_discovery, tech_trend, learning, competitive_intel.
181
+ Each signal has a priority level (critical/high/medium/low) based on
182
+ signal type, relevance score, and tech stack match.
183
+
184
+ Use this to get prioritized, actionable intelligence from 4DA's feed.`,
185
+ inputSchema: {
186
+ type: "object",
187
+ properties: {
188
+ priority_filter: {
189
+ type: "string",
190
+ description: 'Filter by priority level: "critical", "high", "medium", "low". Leave empty for all.',
191
+ enum: ["critical", "high", "medium", "low"],
192
+ },
193
+ signal_type: {
194
+ type: "string",
195
+ description: 'Filter by signal type. Leave empty for all.',
196
+ enum: [
197
+ "security_alert", "breaking_change", "tool_discovery",
198
+ "tech_trend", "learning", "competitive_intel",
199
+ ],
200
+ },
201
+ limit: {
202
+ type: "number",
203
+ description: "Maximum number of signals to return. Default: 20",
204
+ default: 20,
205
+ },
206
+ since_hours: {
207
+ type: "number",
208
+ description: "Only include items from the last N hours. Default: 48",
209
+ default: 48,
210
+ },
211
+ },
212
+ },
213
+ };
214
+ // ============================================================================
215
+ // Execution
216
+ // ============================================================================
217
+ export function executeGetActionableSignals(db, params) {
218
+ const limit = Math.max(1, Math.min(100, params.limit ?? 20));
219
+ const sinceHours = Math.max(1, Math.min(168, params.since_hours ?? 48));
220
+ // Get items from DB (reuse existing method with low min score to get more items)
221
+ const items = db.getRelevantContent(0.1, undefined, 200, sinceHours);
222
+ // Get user's detected tech for cross-referencing
223
+ const context = db.getUserContext(true, false);
224
+ const detectedTech = (context.ace?.detected_tech || []).map((t) => t.name);
225
+ const signals = [];
226
+ for (const item of items) {
227
+ const result = classify(item.title, item.content || "", item.relevance_score, detectedTech);
228
+ if (!result)
229
+ continue;
230
+ // Apply filters
231
+ if (params.priority_filter && result.priority !== params.priority_filter)
232
+ continue;
233
+ if (params.signal_type && result.signalType !== params.signal_type)
234
+ continue;
235
+ signals.push({
236
+ id: item.id,
237
+ title: item.title,
238
+ url: item.url,
239
+ source_type: item.source_type,
240
+ relevance_score: item.relevance_score,
241
+ signal_type: result.signalType,
242
+ signal_priority: result.priority,
243
+ action: result.action,
244
+ triggers: result.triggers,
245
+ confidence: result.confidence,
246
+ discovered_ago: item.discovered_ago,
247
+ });
248
+ }
249
+ // Sort by priority (critical first), then by relevance score
250
+ const priorityOrder = { critical: 4, high: 3, medium: 2, low: 1 };
251
+ signals.sort((a, b) => {
252
+ const pd = (priorityOrder[b.signal_priority] || 0) - (priorityOrder[a.signal_priority] || 0);
253
+ if (pd !== 0)
254
+ return pd;
255
+ return b.relevance_score - a.relevance_score;
256
+ });
257
+ // Summary counts by type
258
+ const summary = {};
259
+ for (const s of signals) {
260
+ summary[s.signal_type] = (summary[s.signal_type] || 0) + 1;
261
+ }
262
+ return {
263
+ signals: signals.slice(0, limit),
264
+ total: signals.length,
265
+ summary,
266
+ };
267
+ }
268
+ //# sourceMappingURL=get-actionable-signals.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-actionable-signals.js","sourceRoot":"","sources":["../../src/tools/get-actionable-signals.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAsCH,+EAA+E;AAC/E,sBAAsB;AACtB,+EAA+E;AAE/E,MAAM,eAAe,GAAsC;IACzD,cAAc,EAAE;QACd,QAAQ,EAAE;YACR,KAAK,EAAE,eAAe,EAAE,SAAS,EAAE,QAAQ,EAAE,eAAe;YAC5D,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,YAAY;YACtD,SAAS,EAAE,KAAK,EAAE,kBAAkB,EAAE,KAAK,EAAE,MAAM;YACnD,sBAAsB,EAAE,UAAU,EAAE,qBAAqB;SAC1D;QACD,UAAU,EAAE,CAAC,UAAU,EAAE,QAAQ,EAAE,QAA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C;IAC1F,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;QACpB,MAAM,EAAE,GAAG,CAAC,aAAa,CAAC,CAAC,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC;QAC7F,IAAI,EAAE,KAAK,CAAC;YAAE,OAAO,EAAE,CAAC;QACxB,OAAO,CAAC,CAAC,eAAe,GAAG,CAAC,CAAC,eAAe,CAAC;IAC/C,CAAC,CAAC,CAAC;IAEH,yBAAyB;IACzB,MAAM,OAAO,GAA2B,EAAE,CAAC;IAC3C,KAAK,MAAM,CAAC,IAAI,OAAO,EAAE,CAAC;QACxB,OAAO,CAAC,CAAC,CAAC,WAAW,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;IAC7D,CAAC;IAED,OAAO;QACL,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC;QAChC,KAAK,EAAE,OAAO,CAAC,MAAM;QACrB,OAAO;KACR,CAAC;AACJ,CAAC"}
@@ -0,0 +1,34 @@
1
+ /**
2
+ * get_context tool
3
+ *
4
+ * Get the user's context (what 4DA knows about them).
5
+ */
6
+ import type { FourDADatabase } from "../db.js";
7
+ import type { GetContextParams, UserContext } from "../types.js";
8
+ /**
9
+ * Tool definition for MCP registration
10
+ */
11
+ export declare const getContextTool: {
12
+ name: string;
13
+ description: string;
14
+ inputSchema: {
15
+ type: "object";
16
+ properties: {
17
+ include_ace: {
18
+ type: string;
19
+ description: string;
20
+ default: boolean;
21
+ };
22
+ include_learned: {
23
+ type: string;
24
+ description: string;
25
+ default: boolean;
26
+ };
27
+ };
28
+ };
29
+ };
30
+ /**
31
+ * Execute the get_context tool
32
+ */
33
+ export declare function executeGetContext(db: FourDADatabase, params: GetContextParams): UserContext;
34
+ //# sourceMappingURL=get-context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-context.d.ts","sourceRoot":"","sources":["../../src/tools/get-context.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,KAAK,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAEjE;;GAEG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;CA2B1B,CAAC;AAEF;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,EAAE,EAAE,cAAc,EAClB,MAAM,EAAE,gBAAgB,GACvB,WAAW,CAKb"}
@@ -0,0 +1,43 @@
1
+ /**
2
+ * get_context tool
3
+ *
4
+ * Get the user's context (what 4DA knows about them).
5
+ */
6
+ /**
7
+ * Tool definition for MCP registration
8
+ */
9
+ export const getContextTool = {
10
+ name: "get_context",
11
+ description: `Get the user's context - what 4DA knows about them.
12
+
13
+ Returns information about:
14
+ - Static Identity: User-declared role, tech stack, domains, interests, and exclusions
15
+ - ACE Context (optional): Auto-detected technologies and active topics from recent activity
16
+ - Learned Preferences (optional): Topic affinities learned from user behavior
17
+
18
+ Use this to understand what the user is working on and interested in.`,
19
+ inputSchema: {
20
+ type: "object",
21
+ properties: {
22
+ include_ace: {
23
+ type: "boolean",
24
+ description: "Include ACE-detected context (detected tech, active topics). Default: true",
25
+ default: true,
26
+ },
27
+ include_learned: {
28
+ type: "boolean",
29
+ description: "Include learned preferences (topic affinities, anti-topics). Default: true",
30
+ default: true,
31
+ },
32
+ },
33
+ },
34
+ };
35
+ /**
36
+ * Execute the get_context tool
37
+ */
38
+ export function executeGetContext(db, params) {
39
+ const includeAce = params.include_ace ?? true;
40
+ const includeLearned = params.include_learned ?? true;
41
+ return db.getUserContext(includeAce, includeLearned);
42
+ }
43
+ //# sourceMappingURL=get-context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-context.js","sourceRoot":"","sources":["../../src/tools/get-context.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,IAAI,EAAE,aAAa;IACnB,WAAW,EAAE;;;;;;;sEAOuD;IACpE,WAAW,EAAE;QACX,IAAI,EAAE,QAAiB;QACvB,UAAU,EAAE;YACV,WAAW,EAAE;gBACX,IAAI,EAAE,SAAS;gBACf,WAAW,EACT,4EAA4E;gBAC9E,OAAO,EAAE,IAAI;aACd;YACD,eAAe,EAAE;gBACf,IAAI,EAAE,SAAS;gBACf,WAAW,EACT,4EAA4E;gBAC9E,OAAO,EAAE,IAAI;aACd;SACF;KACF;CACF,CAAC;AAEF;;GAEG;AACH,MAAM,UAAU,iBAAiB,CAC/B,EAAkB,EAClB,MAAwB;IAExB,MAAM,UAAU,GAAG,MAAM,CAAC,WAAW,IAAI,IAAI,CAAC;IAC9C,MAAM,cAAc,GAAG,MAAM,CAAC,eAAe,IAAI,IAAI,CAAC;IAEtD,OAAO,EAAE,CAAC,cAAc,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;AACvD,CAAC"}
@@ -0,0 +1,44 @@
1
+ /**
2
+ * get_relevant_content tool
3
+ *
4
+ * Get filtered relevant content from 4DA's personalized feed.
5
+ */
6
+ import type { FourDADatabase } from "../db.js";
7
+ import type { GetRelevantContentParams, RelevantItem } from "../types.js";
8
+ /**
9
+ * Tool definition for MCP registration
10
+ */
11
+ export declare const getRelevantContentTool: {
12
+ name: string;
13
+ description: string;
14
+ inputSchema: {
15
+ type: "object";
16
+ properties: {
17
+ min_score: {
18
+ type: string;
19
+ description: string;
20
+ default: number;
21
+ };
22
+ source_type: {
23
+ type: string;
24
+ description: string;
25
+ enum: string[];
26
+ };
27
+ limit: {
28
+ type: string;
29
+ description: string;
30
+ default: number;
31
+ };
32
+ since_hours: {
33
+ type: string;
34
+ description: string;
35
+ default: number;
36
+ };
37
+ };
38
+ };
39
+ };
40
+ /**
41
+ * Execute the get_relevant_content tool
42
+ */
43
+ export declare function executeGetRelevantContent(db: FourDADatabase, params: GetRelevantContentParams): RelevantItem[];
44
+ //# sourceMappingURL=get-relevant-content.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-relevant-content.d.ts","sourceRoot":"","sources":["../../src/tools/get-relevant-content.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,KAAK,EAAE,wBAAwB,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE1E;;GAEG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsClC,CAAC;AAEF;;GAEG;AACH,wBAAgB,yBAAyB,CACvC,EAAE,EAAE,cAAc,EAClB,MAAM,EAAE,wBAAwB,GAC/B,YAAY,EAAE,CAMhB"}
@@ -0,0 +1,56 @@
1
+ /**
2
+ * get_relevant_content tool
3
+ *
4
+ * Get filtered relevant content from 4DA's personalized feed.
5
+ */
6
+ /**
7
+ * Tool definition for MCP registration
8
+ */
9
+ export const getRelevantContentTool = {
10
+ name: "get_relevant_content",
11
+ description: `Get filtered relevant content from 4DA's personalized feed.
12
+
13
+ Returns content items that match the user's interests, tech stack, and learned preferences.
14
+ Items are scored based on:
15
+ - Explicit interests declared by the user
16
+ - Tech stack and domains
17
+ - ACE-detected context (recent files, projects, git activity)
18
+ - Learned preferences from past interactions
19
+
20
+ Use this to find content relevant to the user's current context.`,
21
+ inputSchema: {
22
+ type: "object",
23
+ properties: {
24
+ min_score: {
25
+ type: "number",
26
+ description: "Minimum relevance score (0.0-1.0). Default: 0.35",
27
+ default: 0.35,
28
+ },
29
+ source_type: {
30
+ type: "string",
31
+ description: 'Filter by source type: "hackernews", "arxiv", or "reddit". Leave empty for all sources.',
32
+ enum: ["hackernews", "arxiv", "reddit"],
33
+ },
34
+ limit: {
35
+ type: "number",
36
+ description: "Maximum number of items to return. Default: 20, max: 100",
37
+ default: 20,
38
+ },
39
+ since_hours: {
40
+ type: "number",
41
+ description: "Only include items discovered in the last N hours. Default: 24",
42
+ default: 24,
43
+ },
44
+ },
45
+ },
46
+ };
47
+ /**
48
+ * Execute the get_relevant_content tool
49
+ */
50
+ export function executeGetRelevantContent(db, params) {
51
+ const minScore = Math.max(0, Math.min(1, params.min_score ?? 0.35));
52
+ const limit = Math.max(1, Math.min(100, params.limit ?? 20));
53
+ const sinceHours = Math.max(1, Math.min(168, params.since_hours ?? 24)); // Max 1 week
54
+ return db.getRelevantContent(minScore, params.source_type, limit, sinceHours);
55
+ }
56
+ //# sourceMappingURL=get-relevant-content.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-relevant-content.js","sourceRoot":"","sources":["../../src/tools/get-relevant-content.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH;;GAEG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,IAAI,EAAE,sBAAsB;IAC5B,WAAW,EAAE;;;;;;;;;iEASkD;IAC/D,WAAW,EAAE;QACX,IAAI,EAAE,QAAiB;QACvB,UAAU,EAAE;YACV,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,kDAAkD;gBAC/D,OAAO,EAAE,IAAI;aACd;YACD,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,WAAW,EACT,yFAAyF;gBAC3F,IAAI,EAAE,CAAC,YAAY,EAAE,OAAO,EAAE,QAAQ,CAAC;aACxC;YACD,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,0DAA0D;gBACvE,OAAO,EAAE,EAAE;aACZ;YACD,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,gEAAgE;gBAC7E,OAAO,EAAE,EAAE;aACZ;SACF;KACF;CACF,CAAC;AAEF;;GAEG;AACH,MAAM,UAAU,yBAAyB,CACvC,EAAkB,EAClB,MAAgC;IAEhC,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,CAAC,SAAS,IAAI,IAAI,CAAC,CAAC,CAAC;IACpE,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,CAAC;IAC7D,MAAM,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC,WAAW,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,aAAa;IAEtF,OAAO,EAAE,CAAC,kBAAkB,CAAC,QAAQ,EAAE,MAAM,CAAC,WAAW,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC;AAChF,CAAC"}
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Tool exports for 4DA MCP Server
3
+ *
4
+ * Core Tools:
5
+ * - get_relevant_content: Query filtered content by relevance
6
+ * - get_context: Get user's interests, tech stack, learned affinities
7
+ * - explain_relevance: Understand why an item scored the way it did
8
+ * - record_feedback: Teach 4DA what you like/dislike
9
+ *
10
+ * Superpower Tools:
11
+ * - score_autopsy: Deep forensic analysis of relevance scores
12
+ * - trend_analysis: Statistical patterns and anomaly detection
13
+ * - daily_briefing: Executive summaries of discoveries
14
+ * - context_analysis: Optimize your context for better relevance
15
+ * - source_health: Diagnose source pipeline issues
16
+ * - topic_connections: Build knowledge graphs from content
17
+ * - config_validator: Validate configuration and detect issues
18
+ * - get_actionable_signals: Classify items into actionable signal types with priority
19
+ */
20
+ export { getRelevantContentTool, executeGetRelevantContent, } from "./get-relevant-content.js";
21
+ export { getContextTool, executeGetContext } from "./get-context.js";
22
+ export { explainRelevanceTool, executeExplainRelevance, } from "./explain-relevance.js";
23
+ export { recordFeedbackTool, executeRecordFeedback, } from "./record-feedback.js";
24
+ export { scoreAutopsyTool, executeScoreAutopsy, } from "./score-autopsy.js";
25
+ export { trendAnalysisTool, executeTrendAnalysis, } from "./trend-analysis.js";
26
+ export { dailyBriefingTool, executeDailyBriefing, } from "./daily-briefing.js";
27
+ export { contextAnalysisTool, executeContextAnalysis, } from "./context-analysis.js";
28
+ export { sourceHealthTool, executeSourceHealth, } from "./source-health.js";
29
+ export { topicConnectionsTool, executeTopicConnections, } from "./topic-connections.js";
30
+ export { configValidatorTool, executeConfigValidator, } from "./config-validator.js";
31
+ export { llmStatusTool, executeLLMStatus, } from "./llm-status.js";
32
+ export { getActionableSignalsTool, executeGetActionableSignals, } from "./get-actionable-signals.js";
33
+ export { exportContextPacketTool, executeExportContextPacket, } from "./export-context.js";
34
+ export { knowledgeGapsTool, executeKnowledgeGaps, } from "./knowledge-gaps.js";
35
+ export { signalChainsTool, executeSignalChains, } from "./signal-chains.js";
36
+ export { semanticShiftsTool, executeSemanticShifts, } from "./semantic-shifts.js";
37
+ export { reverseMentionsTool, executeReverseMentions, } from "./reverse-mentions.js";
38
+ export { attentionReportTool, executeAttentionReport, } from "./attention-report.js";
39
+ export { projectHealthTool, executeProjectHealth, } from "./project-health.js";
40
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EACL,sBAAsB,EACtB,yBAAyB,GAC1B,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAErE,OAAO,EACL,oBAAoB,EACpB,uBAAuB,GACxB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACL,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EACL,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACL,iBAAiB,EACjB,oBAAoB,GACrB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,iBAAiB,EACjB,oBAAoB,GACrB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,mBAAmB,EACnB,sBAAsB,GACvB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACL,oBAAoB,EACpB,uBAAuB,GACxB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACL,mBAAmB,EACnB,sBAAsB,GACvB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,aAAa,EACb,gBAAgB,GACjB,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EACL,wBAAwB,EACxB,2BAA2B,GAC5B,MAAM,6BAA6B,CAAC;AAGrC,OAAO,EACL,uBAAuB,EACvB,0BAA0B,GAC3B,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,iBAAiB,EACjB,oBAAoB,GACrB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACL,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,mBAAmB,EACnB,sBAAsB,GACvB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,mBAAmB,EACnB,sBAAsB,GACvB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,iBAAiB,EACjB,oBAAoB,GACrB,MAAM,qBAAqB,CAAC"}
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Tool exports for 4DA MCP Server
3
+ *
4
+ * Core Tools:
5
+ * - get_relevant_content: Query filtered content by relevance
6
+ * - get_context: Get user's interests, tech stack, learned affinities
7
+ * - explain_relevance: Understand why an item scored the way it did
8
+ * - record_feedback: Teach 4DA what you like/dislike
9
+ *
10
+ * Superpower Tools:
11
+ * - score_autopsy: Deep forensic analysis of relevance scores
12
+ * - trend_analysis: Statistical patterns and anomaly detection
13
+ * - daily_briefing: Executive summaries of discoveries
14
+ * - context_analysis: Optimize your context for better relevance
15
+ * - source_health: Diagnose source pipeline issues
16
+ * - topic_connections: Build knowledge graphs from content
17
+ * - config_validator: Validate configuration and detect issues
18
+ * - get_actionable_signals: Classify items into actionable signal types with priority
19
+ */
20
+ // Core Tools
21
+ export { getRelevantContentTool, executeGetRelevantContent, } from "./get-relevant-content.js";
22
+ export { getContextTool, executeGetContext } from "./get-context.js";
23
+ export { explainRelevanceTool, executeExplainRelevance, } from "./explain-relevance.js";
24
+ export { recordFeedbackTool, executeRecordFeedback, } from "./record-feedback.js";
25
+ // Superpower Tools
26
+ export { scoreAutopsyTool, executeScoreAutopsy, } from "./score-autopsy.js";
27
+ export { trendAnalysisTool, executeTrendAnalysis, } from "./trend-analysis.js";
28
+ export { dailyBriefingTool, executeDailyBriefing, } from "./daily-briefing.js";
29
+ export { contextAnalysisTool, executeContextAnalysis, } from "./context-analysis.js";
30
+ export { sourceHealthTool, executeSourceHealth, } from "./source-health.js";
31
+ export { topicConnectionsTool, executeTopicConnections, } from "./topic-connections.js";
32
+ export { configValidatorTool, executeConfigValidator, } from "./config-validator.js";
33
+ export { llmStatusTool, executeLLMStatus, } from "./llm-status.js";
34
+ // Signal Classifier
35
+ export { getActionableSignalsTool, executeGetActionableSignals, } from "./get-actionable-signals.js";
36
+ // Innovation Feature Tools
37
+ export { exportContextPacketTool, executeExportContextPacket, } from "./export-context.js";
38
+ export { knowledgeGapsTool, executeKnowledgeGaps, } from "./knowledge-gaps.js";
39
+ export { signalChainsTool, executeSignalChains, } from "./signal-chains.js";
40
+ export { semanticShiftsTool, executeSemanticShifts, } from "./semantic-shifts.js";
41
+ export { reverseMentionsTool, executeReverseMentions, } from "./reverse-mentions.js";
42
+ export { attentionReportTool, executeAttentionReport, } from "./attention-report.js";
43
+ export { projectHealthTool, executeProjectHealth, } from "./project-health.js";
44
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,aAAa;AACb,OAAO,EACL,sBAAsB,EACtB,yBAAyB,GAC1B,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAErE,OAAO,EACL,oBAAoB,EACpB,uBAAuB,GACxB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACL,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,sBAAsB,CAAC;AAE9B,mBAAmB;AACnB,OAAO,EACL,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACL,iBAAiB,EACjB,oBAAoB,GACrB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,iBAAiB,EACjB,oBAAoB,GACrB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,mBAAmB,EACnB,sBAAsB,GACvB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACL,oBAAoB,EACpB,uBAAuB,GACxB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACL,mBAAmB,EACnB,sBAAsB,GACvB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,aAAa,EACb,gBAAgB,GACjB,MAAM,iBAAiB,CAAC;AAEzB,oBAAoB;AACpB,OAAO,EACL,wBAAwB,EACxB,2BAA2B,GAC5B,MAAM,6BAA6B,CAAC;AAErC,2BAA2B;AAC3B,OAAO,EACL,uBAAuB,EACvB,0BAA0B,GAC3B,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,iBAAiB,EACjB,oBAAoB,GACrB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACL,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,mBAAmB,EACnB,sBAAsB,GACvB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,mBAAmB,EACnB,sBAAsB,GACvB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,iBAAiB,EACjB,oBAAoB,GACrB,MAAM,qBAAqB,CAAC"}
@@ -0,0 +1,36 @@
1
+ /**
2
+ * knowledge_gaps tool
3
+ *
4
+ * Detect knowledge gaps - dependencies with relevant content you haven't engaged with.
5
+ */
6
+ import type { FourDADatabase } from "../db.js";
7
+ export interface KnowledgeGapsParams {
8
+ min_severity?: string;
9
+ }
10
+ export declare const knowledgeGapsTool: {
11
+ name: string;
12
+ description: string;
13
+ inputSchema: {
14
+ type: "object";
15
+ properties: {
16
+ min_severity: {
17
+ type: string;
18
+ enum: string[];
19
+ description: string;
20
+ default: string;
21
+ };
22
+ };
23
+ };
24
+ };
25
+ export declare function executeKnowledgeGaps(db: FourDADatabase, params: KnowledgeGapsParams): {
26
+ gaps: never[];
27
+ summary: string;
28
+ total_dependencies?: undefined;
29
+ gaps_found?: undefined;
30
+ } | {
31
+ gaps: any[];
32
+ total_dependencies: number;
33
+ gaps_found: number;
34
+ summary: string;
35
+ };
36
+ //# sourceMappingURL=knowledge-gaps.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"knowledge-gaps.d.ts","sourceRoot":"","sources":["../../src/tools/knowledge-gaps.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE/C,MAAM,WAAW,mBAAmB;IAClC,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;CAc7B,CAAC;AAEF,wBAAgB,oBAAoB,CAClC,EAAE,EAAE,cAAc,EAClB,MAAM,EAAE,mBAAmB;;;;;;;;;;EAwE5B"}