frinus-mcp 3.6.0 → 3.6.1
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 +1 -1
- package/dist/tools/definitions.js +13 -1
- package/dist/tools/handlers.js +24 -0
- package/manifest.json +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -39,7 +39,19 @@ Scopes:
|
|
|
39
39
|
},
|
|
40
40
|
content: {
|
|
41
41
|
type: "string",
|
|
42
|
-
|
|
42
|
+
// MIRRORS memory/src/config.py::MAX_MEMORY_CONTENT_CHARS, which is the
|
|
43
|
+
// single source of truth and where the derivation is documented.
|
|
44
|
+
// This is a cross-language copy — if the backend constant changes,
|
|
45
|
+
// change it here too (and in the description below). The live value
|
|
46
|
+
// is also served at GET / as limits.memory_content_max_chars.
|
|
47
|
+
maxLength: 16000,
|
|
48
|
+
description: "The memory content to store. HARD LIMIT: 16000 characters — " +
|
|
49
|
+
"content above this is REJECTED (HTTP 422), nothing is saved. " +
|
|
50
|
+
"Check the length before calling. If your text is longer, split " +
|
|
51
|
+
"it into several smaller, self-contained memories (one fact, " +
|
|
52
|
+
"decision or procedure each) and store them one by one; do not " +
|
|
53
|
+
"truncate it into a single call. Smaller memories are also " +
|
|
54
|
+
"retrieved more accurately by semantic search.",
|
|
43
55
|
},
|
|
44
56
|
memory_type: {
|
|
45
57
|
type: "string",
|
package/dist/tools/handlers.js
CHANGED
|
@@ -194,6 +194,30 @@ export function handleApiError(error) {
|
|
|
194
194
|
isError: true,
|
|
195
195
|
};
|
|
196
196
|
}
|
|
197
|
+
if (status === 422) {
|
|
198
|
+
// Request validation failure. The backend's `detail` carries the ONLY
|
|
199
|
+
// actionable part (e.g. the memory-content size limit: what the ceiling
|
|
200
|
+
// is, what was received, and to split the text into smaller memories).
|
|
201
|
+
// Without this branch the raw axios error propagates as the useless
|
|
202
|
+
// "Request failed with status code 422" and that guidance never reaches
|
|
203
|
+
// the caller — which is the whole point of returning it.
|
|
204
|
+
const detail = error?.response?.data?.detail;
|
|
205
|
+
const text = Array.isArray(detail)
|
|
206
|
+
? detail
|
|
207
|
+
.map((d) => {
|
|
208
|
+
const field = Array.isArray(d?.loc) ? d.loc.filter((p) => p !== "body").join(".") : null;
|
|
209
|
+
const msg = String(d?.msg ?? "invalid value").replace(/^Value error,\s*/, "");
|
|
210
|
+
return field ? `${field}: ${msg}` : msg;
|
|
211
|
+
})
|
|
212
|
+
.join("\n")
|
|
213
|
+
: typeof detail === "string"
|
|
214
|
+
? detail
|
|
215
|
+
: "The request was rejected as invalid.";
|
|
216
|
+
return {
|
|
217
|
+
content: [{ type: "text", text: `Validation error (422). Nothing was saved.\n${text}` }],
|
|
218
|
+
isError: true,
|
|
219
|
+
};
|
|
220
|
+
}
|
|
197
221
|
return null; // Not a known error, let it propagate
|
|
198
222
|
}
|
|
199
223
|
// ---------------------------------------------------------------------------
|
package/manifest.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"manifest_version": "0.3",
|
|
3
3
|
"name": "frinus",
|
|
4
4
|
"display_name": "Frinus — Memória Cognitiva",
|
|
5
|
-
"version": "3.6.
|
|
5
|
+
"version": "3.6.1",
|
|
6
6
|
"description": "Memória cognitiva de longo prazo para o Claude (φρήν + νοῦς). 83 ferramentas de memória, sessões, agentes e conhecimento.",
|
|
7
7
|
"long_description": "O Frinus dá ao Claude memória de longo prazo, identidade e inteligência persistente entre conversas. Conecta o Claude Desktop à plataforma Frinus (Memory Engine, Control Plane e Agent Service) via MCP. Basta colar sua chave de API pessoal — nada para instalar ou compilar.",
|
|
8
8
|
"author": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "frinus-mcp",
|
|
3
|
-
"version": "3.6.
|
|
3
|
+
"version": "3.6.1",
|
|
4
4
|
"description": "Frinus - MCP Server for Cognitive Memory (φρήν + νοῦς). Long-term memory, sessions, agents and knowledge for Claude and any MCP client.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|