sepia-mcp 0.5.1 → 0.6.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/dist/index.js +20 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -613,6 +613,10 @@ know you need — you cannot keyword-search for a rule whose existence you have
|
|
|
613
613
|
So they are loaded unconditionally, once per session, BEFORE any work starts.
|
|
614
614
|
- core = every memory tagged "always", plus every instruction/preference at importance >= 0.9
|
|
615
615
|
- read them with manage_memory action=briefing (one call, no keywords)
|
|
616
|
+
- briefing returns CORE by DEFAULT. The tail (situational and project-scoped rules) is opt-in
|
|
617
|
+
via detail="all". Core is a handful of rules and stays small; the tail grows without bound,
|
|
618
|
+
so loading it every session gets steadily more expensive and less useful — and a long
|
|
619
|
+
constraint list is self-defeating, because the rules that matter stop standing out
|
|
616
620
|
- a rule tagged "always" applies in EVERY repo and EVERY session; a rule that is specific to
|
|
617
621
|
one project must NOT be tagged "always"
|
|
618
622
|
|
|
@@ -620,9 +624,12 @@ MANDATORY WORKFLOW — do this on ALMOST EVERY turn:
|
|
|
620
624
|
|
|
621
625
|
FIRST — once per session, before your first substantive action (NOT keyword-driven):
|
|
622
626
|
0. Call manage_memory action=briefing, and treat what it returns as BINDING for the whole
|
|
623
|
-
session.
|
|
624
|
-
|
|
625
|
-
|
|
627
|
+
session. It returns the user's CORE standing rules — the ones that must hold before you
|
|
628
|
+
know anything about the task. The response also reports other_standing: the situational
|
|
629
|
+
rules it did NOT return. BEFORE anything slow, metered, destructive, or expensive (an
|
|
630
|
+
install, build, deploy, deletion, or infra change), call it again with detail="all" and
|
|
631
|
+
read the rest — the rule that bites in those moments is exactly the one a default load
|
|
632
|
+
leaves out.
|
|
626
633
|
|
|
627
634
|
THEN — before you answer (every turn except trivial chitchat):
|
|
628
635
|
1. Call "search" with 2-5 keywords from the user's current message + task (e.g. query="auth rate limiting"). If sparse, also call "traverse_graph" from the top entity.
|
|
@@ -640,6 +647,9 @@ AFTER you answer (every turn where you learned something):
|
|
|
640
647
|
importance >= 0.8. Tag it "always" when it applies everywhere. Never file a user constraint
|
|
641
648
|
as transient. Storing it a turn later is too late — the rule exists precisely for the turn
|
|
642
649
|
in which you did not yet know you needed it.
|
|
650
|
+
A TODO is NOT a rule: work to do belongs in an observation or a project-scoped fact, never
|
|
651
|
+
in instruction/preference — those are the types the briefing loads, so filing todos as
|
|
652
|
+
instructions dilutes the rules that actually matter.
|
|
643
653
|
3. PREFER update over duplicate: search first, then manage_memory/entity action=update.
|
|
644
654
|
4. SCORE importance 0-1: 0.9+ identity/core preference, 0.6-0.8 active project fact/decision, 0.3-0.5 observation/person, ≤0.2 transient (will decay).
|
|
645
655
|
5. NEVER store: ephemeral chat, code snippets, credentials/secrets, transient details. Sepia is not a vault — refuse secrets.
|
|
@@ -704,6 +714,8 @@ var MAX_ENTITY_LINKS = 3;
|
|
|
704
714
|
var SEARCH_LIMIT_MAX = 25;
|
|
705
715
|
var QUERY_LIMIT_MAX = 50;
|
|
706
716
|
var TRAVERSE_DEPTH_MAX = 3;
|
|
717
|
+
var BRIEFING_DETAILS = ["core", "all"];
|
|
718
|
+
var BRIEFING_DETAIL_DEFAULT = "core";
|
|
707
719
|
var BRIEFING_CHARS_DEFAULT = 8000;
|
|
708
720
|
var BRIEFING_CHARS_MAX = 40000;
|
|
709
721
|
// ../shared/src/schemas.ts
|
|
@@ -872,7 +884,8 @@ var MemoryToolInput = v.object({
|
|
|
872
884
|
archived: v.optional(v.pipe(v.boolean(), v.description("query: include archived (default false)")), false),
|
|
873
885
|
tags: v.optional(v.pipe(tagsSchema, v.description("query: match memories carrying ALL of these tags"))),
|
|
874
886
|
limit: v.optional(v.pipe(v.number(), v.minValue(1), v.maxValue(QUERY_LIMIT_MAX), v.description("query: max results (default 20, max 50)")), 20),
|
|
875
|
-
|
|
887
|
+
detail: v.optional(v.pipe(v.picklist([...BRIEFING_DETAILS]), v.description('briefing: "core" (default) = the never-dropped standing rules; "all" = also return the tail of situational rules (max_chars applies only then).')), BRIEFING_DETAIL_DEFAULT),
|
|
888
|
+
max_chars: v.optional(v.pipe(v.number(), v.minValue(1000), v.maxValue(BRIEFING_CHARS_MAX), v.description(`briefing (detail="all" only): total character budget (default ${BRIEFING_CHARS_DEFAULT}, max ${BRIEFING_CHARS_MAX}). If truncated: true, raise it or fetch the ids.`)), BRIEFING_CHARS_DEFAULT),
|
|
876
889
|
where: v.optional(v.pipe(v.object({
|
|
877
890
|
type: v.optional(v.picklist(MEMORY_TYPES)),
|
|
878
891
|
namespace: v.optional(v.string()),
|
|
@@ -8704,6 +8717,8 @@ class SepiaClient {
|
|
|
8704
8717
|
const qs = new URLSearchParams;
|
|
8705
8718
|
if (params.namespace !== undefined)
|
|
8706
8719
|
qs.set("namespace", params.namespace);
|
|
8720
|
+
if (params.detail !== undefined)
|
|
8721
|
+
qs.set("detail", params.detail);
|
|
8707
8722
|
if (params.max_chars !== undefined)
|
|
8708
8723
|
qs.set("max_chars", String(params.max_chars));
|
|
8709
8724
|
const suffix = qs.size ? `?${qs.toString()}` : "";
|
|
@@ -9009,6 +9024,7 @@ function registerMemoryTools(server, client) {
|
|
|
9009
9024
|
action: "briefing",
|
|
9010
9025
|
...await client.getBriefing({
|
|
9011
9026
|
namespace: args.namespace,
|
|
9027
|
+
detail: args.detail,
|
|
9012
9028
|
max_chars: args.max_chars
|
|
9013
9029
|
})
|
|
9014
9030
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sepia-mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "Self-contained MCP server for Sepia — a personal knowledge-graph memory server. Talks to the Sepia REST API (SEPIA_URL + SEPIA_API_KEY); stdio or HTTP transport.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|