@4da/mcp-server 5.0.1 → 5.0.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/README.md +5 -5
- package/dist/auth-context.d.ts +0 -1
- package/dist/auth-context.js +0 -1
- package/dist/auth.d.ts +0 -1
- package/dist/auth.js +0 -1
- package/dist/db.d.ts +17 -2
- package/dist/db.js +93 -66
- package/dist/doctor.d.ts +0 -1
- package/dist/doctor.js +17 -15
- package/dist/embeddings.d.ts +0 -1
- package/dist/embeddings.js +0 -1
- package/dist/http-transport.d.ts +0 -1
- package/dist/http-transport.js +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +17 -5
- package/dist/live/cache.d.ts +0 -1
- package/dist/live/cache.js +0 -1
- package/dist/live/crates-registry.d.ts +0 -1
- package/dist/live/crates-registry.js +5 -8
- package/dist/live/cvss.d.ts +0 -1
- package/dist/live/cvss.js +0 -1
- package/dist/live/go-registry.d.ts +0 -1
- package/dist/live/go-registry.js +4 -9
- package/dist/live/hn-fetcher.d.ts +0 -1
- package/dist/live/hn-fetcher.js +23 -11
- package/dist/live/http-utils.d.ts +0 -1
- package/dist/live/http-utils.js +0 -1
- package/dist/live/index.d.ts +0 -1
- package/dist/live/index.js +0 -1
- package/dist/live/npm-registry.d.ts +0 -1
- package/dist/live/npm-registry.js +4 -8
- package/dist/live/osv-scanner.d.ts +0 -1
- package/dist/live/osv-scanner.js +0 -1
- package/dist/live/platform.d.ts +0 -1
- package/dist/live/platform.js +0 -1
- package/dist/live/pypi-registry.d.ts +0 -1
- package/dist/live/pypi-registry.js +7 -10
- package/dist/live/rate-limiter.d.ts +0 -1
- package/dist/live/rate-limiter.js +0 -1
- package/dist/live/semver-utils.d.ts +11 -1
- package/dist/live/semver-utils.js +14 -1
- package/dist/live/types.d.ts +0 -1
- package/dist/live/types.js +0 -1
- package/dist/live/version-resolver.d.ts +0 -1
- package/dist/live/version-resolver.js +0 -1
- package/dist/live-singleton.d.ts +0 -1
- package/dist/live-singleton.js +0 -1
- package/dist/project-scanner.d.ts +0 -1
- package/dist/project-scanner.js +0 -1
- package/dist/schema-registry.d.ts +17 -8
- package/dist/schema-registry.js +54 -9
- package/dist/schemas/developer-dna.json +1 -1
- package/dist/schemas/get-context.json +2 -2
- package/dist/schemas/get-relevant-content.json +1 -1
- package/dist/schemas/record-feedback.json +1 -1
- package/dist/setup.d.ts +0 -1
- package/dist/setup.js +0 -1
- package/dist/tool-dispatch.d.ts +0 -1
- package/dist/tool-dispatch.js +21 -2
- package/dist/tools/agent-memory.d.ts +0 -1
- package/dist/tools/agent-memory.js +0 -1
- package/dist/tools/decision-enforcement.d.ts +0 -1
- package/dist/tools/decision-enforcement.js +0 -1
- package/dist/tools/decision-memory.d.ts +0 -1
- package/dist/tools/decision-memory.js +0 -1
- package/dist/tools/decision-recall.d.ts +0 -1
- package/dist/tools/decision-recall.js +0 -1
- package/dist/tools/dependency-health.d.ts +0 -1
- package/dist/tools/dependency-health.js +31 -5
- package/dist/tools/developer-dna.d.ts +3 -3
- package/dist/tools/developer-dna.js +63 -47
- package/dist/tools/ecosystem-pulse.d.ts +7 -2
- package/dist/tools/ecosystem-pulse.js +39 -3
- package/dist/tools/get-actionable-signals.d.ts +0 -1
- package/dist/tools/get-actionable-signals.js +0 -1
- package/dist/tools/get-context.d.ts +0 -1
- package/dist/tools/get-context.js +2 -3
- package/dist/tools/get-relevant-content.d.ts +0 -1
- package/dist/tools/get-relevant-content.js +1 -3
- package/dist/tools/index.d.ts +0 -1
- package/dist/tools/index.js +0 -1
- package/dist/tools/knowledge-gaps.d.ts +0 -1
- package/dist/tools/knowledge-gaps.js +79 -17
- package/dist/tools/recall.d.ts +0 -1
- package/dist/tools/recall.js +0 -1
- package/dist/tools/record-feedback.d.ts +1 -2
- package/dist/tools/record-feedback.js +7 -8
- package/dist/tools/upgrade-planner.d.ts +0 -1
- package/dist/tools/upgrade-planner.js +15 -3
- package/dist/tools/vulnerability-scan.d.ts +0 -1
- package/dist/tools/vulnerability-scan.js +0 -1
- package/dist/tools/what-should-i-know.d.ts +0 -1
- package/dist/tools/what-should-i-know.js +6 -3
- package/dist/types.d.ts +2 -3
- package/dist/types.js +0 -1
- package/package.json +16 -5
- package/dist/llm.d.ts +0 -162
- package/dist/llm.js +0 -502
- package/dist/output-manager.d.ts +0 -156
- package/dist/output-manager.js +0 -157
- package/dist/scheduler/core.d.ts +0 -25
- package/dist/scheduler/core.js +0 -61
- package/dist/scheduler/freshness.d.ts +0 -17
- package/dist/scheduler/freshness.js +0 -41
- package/dist/scheduler/index.d.ts +0 -21
- package/dist/scheduler/index.js +0 -32
- package/dist/scheduler/refreshers.d.ts +0 -21
- package/dist/scheduler/refreshers.js +0 -21
package/dist/types.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@4da/mcp-server",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.3",
|
|
4
4
|
"mcpName": "io.github.4DA-Systems/4da-mcp-server",
|
|
5
5
|
"description": "Dependency intelligence for AI coding agents. Live CVE scanning, dependency health, upgrade planning, ecosystem news, decision memory — zero config, privacy-first. 9 tools standalone, 14 total with desktop app.",
|
|
6
6
|
"type": "module",
|
|
@@ -19,7 +19,8 @@
|
|
|
19
19
|
"LICENSE"
|
|
20
20
|
],
|
|
21
21
|
"scripts": {
|
|
22
|
-
"
|
|
22
|
+
"clean": "node -e \"const fs=require('fs');fs.rmSync('dist',{recursive:true,force:true})\"",
|
|
23
|
+
"build": "pnpm run clean && tsc && pnpm run copy-schemas",
|
|
23
24
|
"copy-schemas": "node -e \"const fs=require('fs');const path=require('path');const src='src/schemas';const dst='dist/schemas';if(!fs.existsSync(dst))fs.mkdirSync(dst,{recursive:true});fs.readdirSync(src).filter(f=>f.endsWith('.json')).forEach(f=>fs.copyFileSync(path.join(src,f),path.join(dst,f)))\"",
|
|
24
25
|
"dev": "tsc --watch",
|
|
25
26
|
"start": "node dist/index.js",
|
|
@@ -101,12 +102,22 @@
|
|
|
101
102
|
"esbuild"
|
|
102
103
|
],
|
|
103
104
|
"overrides": {
|
|
104
|
-
"fast-uri": ">=3.1.
|
|
105
|
-
"ip-address": "
|
|
105
|
+
"fast-uri": ">=3.1.5",
|
|
106
|
+
"ip-address": ">=10.3.1 <11",
|
|
106
107
|
"vite": ">=7.3.5 <8",
|
|
107
108
|
"esbuild": ">=0.28.1",
|
|
108
109
|
"hono": ">=4.12.34 <5",
|
|
109
|
-
"@hono/node-server": ">=2.0.5 <3"
|
|
110
|
+
"@hono/node-server": ">=2.0.5 <3",
|
|
111
|
+
"minimatch@>=9.0.0 <9.0.6": ">=9.0.7",
|
|
112
|
+
"picomatch@>=4.0.0 <4.0.4": ">=4.0.4",
|
|
113
|
+
"brace-expansion@<1.1.18": ">=1.1.18 <2",
|
|
114
|
+
"brace-expansion@>=2.0.0 <2.0.3": ">=2.0.3",
|
|
115
|
+
"brace-expansion@>=3.0.0 <5.0.9": ">=5.0.9 <6",
|
|
116
|
+
"js-yaml@>=4.0.0 <4.3.1": ">=4.3.1 <5",
|
|
117
|
+
"nanoid@<3.3.18": ">=3.3.18 <4",
|
|
118
|
+
"nanoid@>=4.0.0 <5.1.16": ">=5.1.16 <6",
|
|
119
|
+
"postcss@<8.5.23": ">=8.5.23 <9",
|
|
120
|
+
"undici@>=7.0.0 <7.29.0": ">=7.29.0 <8"
|
|
110
121
|
}
|
|
111
122
|
}
|
|
112
123
|
}
|
package/dist/llm.d.ts
DELETED
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* LLM Client for 4DA MCP Server
|
|
3
|
-
*
|
|
4
|
-
* Provides intelligence synthesis over raw tool data.
|
|
5
|
-
* Supports Anthropic Claude, OpenAI, and Ollama (local).
|
|
6
|
-
*
|
|
7
|
-
* Features:
|
|
8
|
-
* - Tiered model selection (use smaller models for simpler tasks)
|
|
9
|
-
* - Optimized prompts for local models
|
|
10
|
-
* - Automatic fallback
|
|
11
|
-
*/
|
|
12
|
-
export interface LLMConfig {
|
|
13
|
-
provider: "anthropic" | "openai" | "ollama" | null;
|
|
14
|
-
anthropic_api_key?: string;
|
|
15
|
-
openai_api_key?: string;
|
|
16
|
-
ollama_url?: string;
|
|
17
|
-
model?: string;
|
|
18
|
-
model_light?: string;
|
|
19
|
-
model_heavy?: string;
|
|
20
|
-
}
|
|
21
|
-
export type TaskComplexity = "light" | "medium" | "heavy";
|
|
22
|
-
export interface SynthesisRequest {
|
|
23
|
-
system: string;
|
|
24
|
-
prompt: string;
|
|
25
|
-
max_tokens?: number;
|
|
26
|
-
complexity?: TaskComplexity;
|
|
27
|
-
}
|
|
28
|
-
export interface SynthesisResult {
|
|
29
|
-
synthesis: string;
|
|
30
|
-
model_used: string;
|
|
31
|
-
tokens_used?: number;
|
|
32
|
-
latency_ms?: number;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Default models for different task complexities
|
|
36
|
-
* Optimized for 16GB VRAM
|
|
37
|
-
*/
|
|
38
|
-
export declare const DEFAULT_OLLAMA_MODELS: {
|
|
39
|
-
light: string;
|
|
40
|
-
medium: string;
|
|
41
|
-
heavy: string;
|
|
42
|
-
};
|
|
43
|
-
/**
|
|
44
|
-
* Task complexity by tool
|
|
45
|
-
*/
|
|
46
|
-
export declare const TOOL_COMPLEXITY: Record<string, TaskComplexity>;
|
|
47
|
-
/**
|
|
48
|
-
* Get LLM configuration from settings.json file.
|
|
49
|
-
*
|
|
50
|
-
* Uses a cached approach: the file is only re-read if its mtime has changed,
|
|
51
|
-
* avoiding unnecessary filesystem reads on every tool invocation.
|
|
52
|
-
*/
|
|
53
|
-
export declare function getLLMConfig(_db?: {
|
|
54
|
-
prepare: (sql: string) => {
|
|
55
|
-
get: (...args: unknown[]) => unknown;
|
|
56
|
-
};
|
|
57
|
-
}): LLMConfig;
|
|
58
|
-
/**
|
|
59
|
-
* Check if LLM synthesis is available
|
|
60
|
-
*/
|
|
61
|
-
export declare function canSynthesize(config: LLMConfig): boolean;
|
|
62
|
-
/**
|
|
63
|
-
* Synthesize insights using LLM
|
|
64
|
-
*
|
|
65
|
-
* Accepts an optional AbortSignal to allow timeout/cancellation of the
|
|
66
|
-
* underlying fetch calls.
|
|
67
|
-
*/
|
|
68
|
-
export declare function synthesize(config: LLMConfig, request: SynthesisRequest, signal?: AbortSignal): Promise<SynthesisResult>;
|
|
69
|
-
/**
|
|
70
|
-
* Synthesize with a timeout wrapper.
|
|
71
|
-
*
|
|
72
|
-
* Wraps the LLM API call with an AbortController + configurable timeout.
|
|
73
|
-
* On timeout, throws a descriptive error so callers can fall back to
|
|
74
|
-
* data-only results.
|
|
75
|
-
*
|
|
76
|
-
* @param config - LLM provider configuration
|
|
77
|
-
* @param request - Synthesis request (system prompt, user prompt, etc.)
|
|
78
|
-
* @param timeoutMs - Timeout in milliseconds (default: 30000)
|
|
79
|
-
*/
|
|
80
|
-
export declare function synthesizeWithTimeout(config: LLMConfig, request: SynthesisRequest, timeoutMs?: number): Promise<SynthesisResult>;
|
|
81
|
-
/**
|
|
82
|
-
* Prompts are optimized for:
|
|
83
|
-
* 1. Clear structure (local models need explicit formatting)
|
|
84
|
-
* 2. Concise output (fewer tokens = faster inference)
|
|
85
|
-
* 3. Specific instructions (reduce ambiguity)
|
|
86
|
-
*/
|
|
87
|
-
export declare const SYNTHESIS_PROMPTS: {
|
|
88
|
-
/**
|
|
89
|
-
* Daily Briefing - Executive synthesis
|
|
90
|
-
* Complexity: MEDIUM
|
|
91
|
-
*/
|
|
92
|
-
dailyBriefing: {
|
|
93
|
-
complexity: TaskComplexity;
|
|
94
|
-
system: string;
|
|
95
|
-
buildPrompt: (data: unknown, context: unknown) => string;
|
|
96
|
-
};
|
|
97
|
-
/**
|
|
98
|
-
* Score Autopsy - Explain the reasoning
|
|
99
|
-
* Complexity: HEAVY (needs to reason about correctness)
|
|
100
|
-
*/
|
|
101
|
-
scoreAutopsy: {
|
|
102
|
-
complexity: TaskComplexity;
|
|
103
|
-
system: string;
|
|
104
|
-
buildPrompt: (data: unknown, context: unknown) => string;
|
|
105
|
-
};
|
|
106
|
-
/**
|
|
107
|
-
* Trend Analysis - Predict and explain
|
|
108
|
-
* Complexity: HEAVY (needs pattern recognition + prediction)
|
|
109
|
-
*/
|
|
110
|
-
trendAnalysis: {
|
|
111
|
-
complexity: TaskComplexity;
|
|
112
|
-
system: string;
|
|
113
|
-
buildPrompt: (data: unknown, context: unknown) => string;
|
|
114
|
-
};
|
|
115
|
-
/**
|
|
116
|
-
* Context Analysis - Personalized optimization advice
|
|
117
|
-
* Complexity: MEDIUM (structured recommendations)
|
|
118
|
-
*/
|
|
119
|
-
contextAnalysis: {
|
|
120
|
-
complexity: TaskComplexity;
|
|
121
|
-
system: string;
|
|
122
|
-
buildPrompt: (data: unknown) => string;
|
|
123
|
-
};
|
|
124
|
-
/**
|
|
125
|
-
* Topic Connections - Explain the knowledge graph
|
|
126
|
-
* Complexity: HEAVY (needs graph reasoning)
|
|
127
|
-
*/
|
|
128
|
-
topicConnections: {
|
|
129
|
-
complexity: TaskComplexity;
|
|
130
|
-
system: string;
|
|
131
|
-
buildPrompt: (data: unknown, context: unknown) => string;
|
|
132
|
-
};
|
|
133
|
-
};
|
|
134
|
-
/**
|
|
135
|
-
* Check if Ollama is running and has required models
|
|
136
|
-
*/
|
|
137
|
-
export declare function checkOllamaStatus(baseUrl?: string): Promise<{
|
|
138
|
-
available: boolean;
|
|
139
|
-
models: string[];
|
|
140
|
-
error?: string;
|
|
141
|
-
}>;
|
|
142
|
-
/**
|
|
143
|
-
* Recommended models for 4DA synthesis tasks
|
|
144
|
-
*/
|
|
145
|
-
export declare const RECOMMENDED_MODELS: {
|
|
146
|
-
"16GB_VRAM": {
|
|
147
|
-
primary: string;
|
|
148
|
-
fallback: string;
|
|
149
|
-
install: string;
|
|
150
|
-
};
|
|
151
|
-
"12GB_VRAM": {
|
|
152
|
-
primary: string;
|
|
153
|
-
fallback: string;
|
|
154
|
-
install: string;
|
|
155
|
-
};
|
|
156
|
-
"8GB_VRAM": {
|
|
157
|
-
primary: string;
|
|
158
|
-
fallback: string;
|
|
159
|
-
install: string;
|
|
160
|
-
};
|
|
161
|
-
};
|
|
162
|
-
//# sourceMappingURL=llm.d.ts.map
|