frinus-mcp 3.4.0 → 3.5.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.
- package/README.md +1 -1
- package/dist/index.js +1 -1
- package/dist/tools/definitions.js +13 -7
- package/dist/tools/handlers.js +60 -31
- package/manifest.json +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -11,7 +11,7 @@ It does **not** run on its own. It stores nothing locally: every tool call is fo
|
|
|
11
11
|
|
|
12
12
|
With those in place, the server exposes **70 tools** spanning cognitive memory, working memory, sessions, agents, the L0–L3 knowledge hierarchy, orchestration tasks, and training pipelines. It speaks stdio and works with any MCP-aware client.
|
|
13
13
|
|
|
14
|
-
- **Version:** 3.
|
|
14
|
+
- **Version:** 3.4.1
|
|
15
15
|
- **Tools:** 70 (see [Tools Reference](#tools-reference))
|
|
16
16
|
- **Platform:** https://frinus.rdxsec.com.br (hosted SaaS — the backend this server talks to)
|
|
17
17
|
- **npm package:** [`frinus-mcp`](https://www.npmjs.com/package/frinus-mcp)
|
package/dist/index.js
CHANGED
|
@@ -10,11 +10,15 @@ Use this to record important information, learnings, decisions, or procedures
|
|
|
10
10
|
that should be remembered for future reference.
|
|
11
11
|
|
|
12
12
|
The backend classifies the memory by content at write time and returns a
|
|
13
|
-
SUGGESTION (status "proposed") of which universe/context node it
|
|
14
|
-
nothing is moved automatically. Review pending suggestions with
|
|
13
|
+
SUGGESTION (status "proposed"/"universe_only") of which universe/context node it
|
|
14
|
+
belongs to — nothing is moved automatically. Review pending suggestions with
|
|
15
15
|
memory_classification_pending and apply them with memory_classification_approve.
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
|
|
17
|
+
Passing universe_id or context_id anchors the memory THERE directly (status
|
|
18
|
+
"manual"): auto-classification is skipped entirely, so no suggestion is returned
|
|
19
|
+
and nothing may later move it. The response always reports the destination the
|
|
20
|
+
memory actually landed in — a suggestion, when present, is labelled as pending
|
|
21
|
+
and not applied.
|
|
18
22
|
|
|
19
23
|
Memory types:
|
|
20
24
|
- episodic: Specific experiences and events (what happened)
|
|
@@ -45,7 +49,7 @@ Scopes:
|
|
|
45
49
|
scope: {
|
|
46
50
|
type: "string",
|
|
47
51
|
enum: ["user", "agent", "universe", "organization"],
|
|
48
|
-
description: "Optional explicit visibility scope
|
|
52
|
+
description: "Optional explicit visibility scope — WHO can see the memory, independent of WHERE it is filed in the hierarchy (that is universe_id/context_id). 'organization' (org-wide), 'user' (private), 'universe' (department-shared — requires a universe, via universe_id/context_id or the agent's own), 'agent' (agent-only). Default: 'user'.",
|
|
49
53
|
},
|
|
50
54
|
importance: {
|
|
51
55
|
type: "number",
|
|
@@ -65,7 +69,7 @@ Scopes:
|
|
|
65
69
|
},
|
|
66
70
|
universe_id: {
|
|
67
71
|
type: "string",
|
|
68
|
-
description: "Optional UUID of a universe to
|
|
72
|
+
description: "Optional UUID of a universe to file the memory under explicitly. Anchors it there as ground-truth (status 'manual'): auto-classification is skipped and nothing may later move it. Omit to let the backend suggest one.",
|
|
69
73
|
},
|
|
70
74
|
context_id: {
|
|
71
75
|
type: "string",
|
|
@@ -830,7 +834,9 @@ Memories created by the agent are NOT deleted.`,
|
|
|
830
834
|
name: "agent_bootstrap",
|
|
831
835
|
description: `Bootstrap completo do agente — chame no início da sessão para carregar identidade, system prompt e contexto runtime. O agente thin-client chama isto como regra única de boot.
|
|
832
836
|
|
|
833
|
-
Retorna identity, system_prompt, runtime (working_memory, recent_memories, skills,
|
|
837
|
+
Retorna identity, system_prompt, runtime (working_memory, recent_memories, skills, delegate_digest) e persona_version em uma única chamada.
|
|
838
|
+
|
|
839
|
+
O roster de especialistas NÃO vem no bootstrap — apenas um resumo (quantos e em quais universos). Use \`agent_list\` no momento da delegação para obter nomes e IDs.`,
|
|
834
840
|
inputSchema: {
|
|
835
841
|
type: "object",
|
|
836
842
|
properties: {
|
package/dist/tools/handlers.js
CHANGED
|
@@ -269,39 +269,67 @@ function destinationLabel(result) {
|
|
|
269
269
|
return "";
|
|
270
270
|
}
|
|
271
271
|
/**
|
|
272
|
-
*
|
|
273
|
-
*
|
|
274
|
-
*
|
|
275
|
-
|
|
272
|
+
* Breadcrumb for a hierarchy chain returned by the backend as a list of nodes
|
|
273
|
+
* ({ id, level, name, context_path }), e.g. "Operacoes › Contratos › Gain-share".
|
|
274
|
+
* Falls back to the raw id for legacy FK-only nodes with no contexts row.
|
|
275
|
+
*/
|
|
276
|
+
function hierarchyLabel(nodes) {
|
|
277
|
+
if (!Array.isArray(nodes) || nodes.length === 0)
|
|
278
|
+
return "";
|
|
279
|
+
return nodes
|
|
280
|
+
.map((n) => (typeof n?.name === "string" && n.name ? n.name : n?.id))
|
|
281
|
+
.filter((s) => typeof s === "string" && s)
|
|
282
|
+
.join(" › ");
|
|
283
|
+
}
|
|
284
|
+
/** Where the memory ACTUALLY landed — never the classifier's suggestion. */
|
|
285
|
+
function appliedLabel(result) {
|
|
286
|
+
const fromChain = hierarchyLabel(result?.hierarchy);
|
|
287
|
+
if (fromChain)
|
|
288
|
+
return fromChain;
|
|
289
|
+
// Older backend without `hierarchy`: fall back to the real FK column. Still
|
|
290
|
+
// the applied destination — NOT classified_universe (that is a proposal).
|
|
291
|
+
const uni = result?.universe_id;
|
|
292
|
+
return typeof uni === "string" && uni ? uni : "";
|
|
293
|
+
}
|
|
294
|
+
/**
|
|
295
|
+
* Render the memory_store response.
|
|
296
|
+
*
|
|
297
|
+
* Hard rule: the ONLY thing reported as the destination is where the memory was
|
|
298
|
+
* actually written (`hierarchy` / `universe_id`). `classified_*` and
|
|
299
|
+
* `proposed_hierarchy` are the auto-classifier's SUGGESTION and are always
|
|
300
|
+
* labelled as such — never as the destination. Reporting a pending suggestion
|
|
301
|
+
* as the destination is what made an explicit `universe_id` look ignored when
|
|
302
|
+
* the write had in fact honoured it.
|
|
276
303
|
*/
|
|
277
304
|
function renderStoreResult(result) {
|
|
278
305
|
const id = result?.id;
|
|
279
306
|
const status = result?.classification_status;
|
|
280
307
|
const head = `✓ Salva`;
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
308
|
+
const applied = appliedLabel(result);
|
|
309
|
+
const pending = status === "proposed" || status === "universe_only";
|
|
310
|
+
// Anchored: a real destination exists. Report it, and only then mention a
|
|
311
|
+
// still-pending suggestion (which cannot have been applied, by definition).
|
|
312
|
+
if (applied) {
|
|
313
|
+
let out = `${head} em: ${applied}`;
|
|
314
|
+
if (pending) {
|
|
315
|
+
const sug = hierarchyLabel(result?.proposed_hierarchy) || suggestionLabel(result);
|
|
316
|
+
if (sug && sug !== applied) {
|
|
317
|
+
out += `\n ↳ sugestão pendente (NÃO aplicada): ${sug} — revise com memory_classification_pending`;
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
return out;
|
|
284
321
|
}
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
const
|
|
288
|
-
const conf = confidenceLabel(result?.
|
|
289
|
-
|
|
290
|
-
if (uni && ctx) {
|
|
322
|
+
// Not anchored anywhere: the suggestion is all we have to offer.
|
|
323
|
+
if (pending) {
|
|
324
|
+
const sug = hierarchyLabel(result?.proposed_hierarchy) || suggestionLabel(result);
|
|
325
|
+
const conf = confidenceLabel(result?.classification_confidence);
|
|
326
|
+
if (sug) {
|
|
291
327
|
const confTxt = conf ? `, confiança ${conf}` : "";
|
|
292
|
-
return `${head} · sugestão: ${
|
|
328
|
+
return `${head} · sem destino aplicado · sugestão: ${sug} (auto${confTxt}) — aprove com memory_classification_approve`;
|
|
293
329
|
}
|
|
294
|
-
|
|
295
|
-
if (uni) {
|
|
296
|
-
return `${head} · sugestão de universo: ${uni} (nó específico não identificado) — aprove com memory_classification_approve`;
|
|
297
|
-
}
|
|
298
|
-
// Low / no confidence: no reliable suggestion.
|
|
299
|
-
return `${head} · sem sugestão confiável — use memory_classification_pending para revisar`;
|
|
330
|
+
return `${head} · sem destino aplicado e sem sugestão confiável — use memory_classification_pending para revisar`;
|
|
300
331
|
}
|
|
301
|
-
//
|
|
302
|
-
const dest = destinationLabel(result);
|
|
303
|
-
if (dest)
|
|
304
|
-
return `${head} · classificada em: ${dest}`;
|
|
332
|
+
// Defensive: older backend without classification fields, or no hierarchy at all.
|
|
305
333
|
return `${head}\nID: ${id}\nType: ${result?.memory_type}\nScope: ${result?.scope}`;
|
|
306
334
|
}
|
|
307
335
|
const handlers = {
|
|
@@ -1201,13 +1229,14 @@ const handlers = {
|
|
|
1201
1229
|
formatted += `- ${name}${s.permission ? ` (${s.permission})` : ""}\n`;
|
|
1202
1230
|
});
|
|
1203
1231
|
}
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1232
|
+
// The roster itself is deliberately NOT inlined — it costs thousands of
|
|
1233
|
+
// tokens on a mid-size org and carries no agent IDs. Boot only needs to
|
|
1234
|
+
// know a team exists and how big it is; `agent_list` serves the rest.
|
|
1235
|
+
// The summary is composed server-side, already in the agent's own
|
|
1236
|
+
// language — do not build prose here.
|
|
1237
|
+
const delegateDigest = runtime.delegate_digest;
|
|
1238
|
+
if (delegateDigest && delegateDigest.count > 0 && delegateDigest.summary) {
|
|
1239
|
+
formatted += `\n### Delegate Targets\n${delegateDigest.summary}\n`;
|
|
1211
1240
|
}
|
|
1212
1241
|
return { content: [{ type: "text", text: formatted }] };
|
|
1213
1242
|
}
|
package/manifest.json
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
"manifest_version": "0.3",
|
|
3
3
|
"name": "frinus",
|
|
4
4
|
"display_name": "Frinus — Memória Cognitiva",
|
|
5
|
-
"version": "3.
|
|
6
|
-
"description": "Memória cognitiva de longo prazo para o Claude (φρήν + νοῦς).
|
|
5
|
+
"version": "3.5.0",
|
|
6
|
+
"description": "Memória cognitiva de longo prazo para o Claude (φρήν + νοῦς). 80 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": {
|
|
9
9
|
"name": "Frinus",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "frinus-mcp",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.5.0",
|
|
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",
|