@arkheia/mcp-server 0.1.6 → 0.1.8
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 +35 -1
- package/package.json +9 -2
package/dist/index.js
CHANGED
|
@@ -91,9 +91,43 @@ function handleError(toolName, e) {
|
|
|
91
91
|
// ---------------------------------------------------------------------------
|
|
92
92
|
// Main
|
|
93
93
|
// ---------------------------------------------------------------------------
|
|
94
|
+
const CURRENT_VERSION = "0.1.7";
|
|
95
|
+
async function checkForUpdate() {
|
|
96
|
+
// Check once per day — skip if checked recently
|
|
97
|
+
const markerPath = path.join(os.homedir(), '.arkheia', '.update-check');
|
|
98
|
+
try {
|
|
99
|
+
if (fs.existsSync(markerPath)) {
|
|
100
|
+
const age = Date.now() - fs.statSync(markerPath).mtimeMs;
|
|
101
|
+
if (age < 24 * 60 * 60 * 1000)
|
|
102
|
+
return; // checked within 24h
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
catch { }
|
|
106
|
+
try {
|
|
107
|
+
const resp = await fetch('https://registry.npmjs.org/@arkheia/mcp-server/latest', {
|
|
108
|
+
signal: AbortSignal.timeout(5000),
|
|
109
|
+
});
|
|
110
|
+
if (resp.ok) {
|
|
111
|
+
const data = await resp.json();
|
|
112
|
+
if (data.version && data.version !== CURRENT_VERSION) {
|
|
113
|
+
process.stderr.write(`[arkheia] Update available: ${CURRENT_VERSION} → ${data.version}\n` +
|
|
114
|
+
`[arkheia] Run: npm update -g @arkheia/mcp-server\n`);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
// Touch marker regardless of result
|
|
118
|
+
const dir = path.dirname(markerPath);
|
|
119
|
+
if (!fs.existsSync(dir))
|
|
120
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
121
|
+
fs.writeFileSync(markerPath, new Date().toISOString());
|
|
122
|
+
}
|
|
123
|
+
catch {
|
|
124
|
+
// Network failure — silently skip, don't block startup
|
|
125
|
+
}
|
|
126
|
+
}
|
|
94
127
|
async function main() {
|
|
95
128
|
loadConfig();
|
|
96
129
|
checkCRLF();
|
|
130
|
+
checkForUpdate(); // fire-and-forget, don't await — never blocks startup
|
|
97
131
|
const ARKHEIA_PROXY_URL = process.env.ARKHEIA_PROXY_URL || "http://localhost:8098";
|
|
98
132
|
const ARKHEIA_HOSTED_URL = process.env.ARKHEIA_HOSTED_URL || "https://arkheia-proxy-production.up.railway.app";
|
|
99
133
|
const ARKHEIA_API_KEY = process.env.ARKHEIA_API_KEY;
|
|
@@ -105,7 +139,7 @@ async function main() {
|
|
|
105
139
|
const proxy = new proxy_client_js_1.ProxyClient(ARKHEIA_PROXY_URL, 10.0, ARKHEIA_HOSTED_URL, ARKHEIA_API_KEY);
|
|
106
140
|
const server = new mcp_js_1.McpServer({ name: "arkheia-trust", version: "0.1.6" });
|
|
107
141
|
// ── Detection & audit ──────────────────────────────────────────
|
|
108
|
-
server.tool("arkheia_verify", "Verify whether an AI response shows signs of fabrication. Call this on EVERY model response before acting on it.", { prompt: zod_1.z.string(), response: zod_1.z.string(), model: zod_1.z.string() }, async ({ prompt, response, model }) => {
|
|
142
|
+
server.tool("arkheia_verify", "Verify whether an AI response shows signs of fabrication. Call this on EVERY model response before acting on it. Risk guidance: HIGH = warn the user this response may be fabricated and include the detection_id, but still show them the response with the warning. MEDIUM = show with a brief confidence note. LOW = show normally. Never hide or suppress a response — always surface it to the user with the appropriate risk context.", { prompt: zod_1.z.string(), response: zod_1.z.string(), model: zod_1.z.string() }, async ({ prompt, response, model }) => {
|
|
109
143
|
try {
|
|
110
144
|
(0, tool_registry_js_1.check)("arkheia_verify");
|
|
111
145
|
const result = await proxy.verify(prompt, response, model);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arkheia/mcp-server",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
4
4
|
"description": "Arkheia MCP Server — Fabrication detection for AI agents. Know when your AI is making things up.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -17,7 +17,14 @@
|
|
|
17
17
|
"scripts/",
|
|
18
18
|
"README.md"
|
|
19
19
|
],
|
|
20
|
-
"keywords": [
|
|
20
|
+
"keywords": [
|
|
21
|
+
"mcp",
|
|
22
|
+
"ai",
|
|
23
|
+
"fabrication",
|
|
24
|
+
"detection",
|
|
25
|
+
"hallucination",
|
|
26
|
+
"governance"
|
|
27
|
+
],
|
|
21
28
|
"author": "Arkheia AI <dmurfet@arkheia.ai>",
|
|
22
29
|
"license": "MIT",
|
|
23
30
|
"engines": {
|