@pyxmate/memory 0.40.0 → 0.41.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/{chunk-OTNDFYEI.mjs → chunk-J3HY44AP.mjs} +1 -1
- package/dist/{chunk-YHE5343S.mjs → chunk-YT46GYB3.mjs} +2 -0
- package/dist/cli/pyx-mem.mjs +9 -5
- package/dist/dashboard.mjs +2 -2
- package/dist/index.d.ts +8 -0
- package/dist/index.mjs +1 -1
- package/dist/react.mjs +2 -2
- package/package.json +1 -1
|
@@ -107,6 +107,8 @@ var MemoryClient = class {
|
|
|
107
107
|
}
|
|
108
108
|
if (params.asOf) searchParams.set("asOf", params.asOf);
|
|
109
109
|
if (params.anchorTime) searchParams.set("anchorTime", params.anchorTime);
|
|
110
|
+
const enumerationConcept = params.enumerationConcept?.trim();
|
|
111
|
+
if (enumerationConcept) searchParams.set("enumerationConcept", enumerationConcept);
|
|
110
112
|
if (params.abstentionThreshold != null)
|
|
111
113
|
searchParams.set("abstentionThreshold", String(params.abstentionThreshold));
|
|
112
114
|
return this.fetchApi(`/api/memory/search?${searchParams}`);
|
package/dist/cli/pyx-mem.mjs
CHANGED
|
@@ -555,7 +555,7 @@ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
|
555
555
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
556
556
|
|
|
557
557
|
// src/mcp/instructions.ts
|
|
558
|
-
var PYX_MEMORY_INSTRUCTIONS = `Use pyx-memory to search durable project/user memory before assuming prior decisions, and to store concise facts after corrections, bug fixes, design decisions, integration discoveries, gotchas, explicit preferences, or "remember this" requests. Store decisions, not deliberation. Include topic and project. Pass eventTime (ISO-8601, when the fact happened or took effect) for any fact that can change or go stale \u2014 job/status changes, decisions that supersede earlier ones, dated events; recency ordering, dated ("as of") queries, and stale-vs-current conflict resolution all key off it. Search effort is retrieval depth: quick=strongest, deep=everything including archived/superseded. Use reinforce after memories were actually used, so they surface in quick/medium effort tiers. Use lineage for the history of how a fact changed; pass subject+relation for graph lineage or entryId for a superseded chain. When a question names a time \u2014 explicit or relative ("last year", "\uB450 \uB2EC \uC804") \u2014 resolve it to an absolute ISO-8601 timestamp yourself and pass it as search anchorTime: results then rank by proximity to this time instead of now, without excluding anything. When content names people, organizations, tools, places, events, or key concepts, you (the caller) must extract and pass both entities and relationships \u2014 the server does not auto-extract them. Edges matter as much as nodes: without relationships the graph cannot connect related memories. Use file ingest for documents/images worth persisting; images require a description.`;
|
|
558
|
+
var PYX_MEMORY_INSTRUCTIONS = `Use pyx-memory to search durable project/user memory before assuming prior decisions, and to store concise facts after corrections, bug fixes, design decisions, integration discoveries, gotchas, explicit preferences, or "remember this" requests. Store decisions, not deliberation. Include topic and project. Pass eventTime (ISO-8601, when the fact happened or took effect) for any fact that can change or go stale \u2014 job/status changes, decisions that supersede earlier ones, dated events; recency ordering, dated ("as of") queries, and stale-vs-current conflict resolution all key off it. Search effort is retrieval depth: quick=strongest, deep=everything including archived/superseded. Use reinforce after memories were actually used, so they surface in quick/medium effort tiers. Use lineage for the history of how a fact changed; pass subject+relation for graph lineage or entryId for a superseded chain. Use record_correction when the user corrects a mistake you made (what was wrong, what to do instead, when it applies); call fetch_applicable_corrections before a task to retrieve the corrections that match it, then decide which to follow \u2014 pyx never auto-applies them. When a question names a time \u2014 explicit or relative ("last year", "\uB450 \uB2EC \uC804") \u2014 resolve it to an absolute ISO-8601 timestamp yourself and pass it as search anchorTime: results then rank by proximity to this time instead of now, without excluding anything. For count/list questions about a category, pass \`enumerationConcept\` = the language-agnostic/global category phrase (e.g. "fitness classes" / "\uC6B4\uB3D9 \uC218\uC5C5"); the caller-supplied hint is resolved by the embedding model, which covers a broad range of languages. pyx also auto-detects English/Korean count phrasing as a best-effort fallback when the hint is omitted. When content names people, organizations, tools, places, events, or key concepts, you (the caller) must extract and pass both entities and relationships \u2014 the server does not auto-extract them. Edges matter as much as nodes: without relationships the graph cannot connect related memories. For countable categories the user may later enumerate ("how many fitness classes / streaming services / pets do I have?"), add a canonical category CONCEPT node and an IS_A edge from each member to it. A language/synonym variant gives zero-cost exact-match resolution only when it is also a memberful CONCEPT node with member IS_A edges; there is no query-time alias\u2192canonical resolver. pyx resolves count/list category hints at query time via strict embedding over memberful CONCEPT nodes. Use file ingest for documents/images worth persisting; images require a description.`;
|
|
559
559
|
|
|
560
560
|
// src/mcp/sampling.ts
|
|
561
561
|
function createSamplingClient(server) {
|
|
@@ -1091,7 +1091,7 @@ import { z as z10 } from "zod";
|
|
|
1091
1091
|
var inputShape7 = {
|
|
1092
1092
|
query: z10.string().min(1).describe("Required natural-language search text."),
|
|
1093
1093
|
limit: z10.number().int().min(1).max(100).optional().describe(
|
|
1094
|
-
|
|
1094
|
+
"Target result count; server clamps to 1\u2013100. Default 10. The hybrid strategy may widen count/list searches up to 30 for set-completeness recall when the caller passes `enumerationConcept`; English/Korean marker auto-detect is a best-effort fallback."
|
|
1095
1095
|
),
|
|
1096
1096
|
strategy: z10.enum(["naive", "graph", "hybrid"]).optional().describe(
|
|
1097
1097
|
"RAG strategy. Defaults to `hybrid` (cross-encoder reranking, multi-entity decomposition, confidence scoring) and is sent explicitly when omitted; pass `naive` for a lighter vector-only search or `graph` for graph-augmented retrieval."
|
|
@@ -1108,6 +1108,9 @@ var inputShape7 = {
|
|
|
1108
1108
|
anchorTime: z10.string().optional().describe(
|
|
1109
1109
|
'Soft recency ANCHOR (ISO-8601) \u2014 ranks results by proximity to this time instead of now; never excludes anything. When the question names a relative time ("two months ago", "last year", "3\uB144 \uC804"), resolve it against the current date yourself and pass the absolute timestamp here; prefer this over eventTimeStart/End unless a strict window is required, because hard filters drop last-known-before facts.'
|
|
1110
1110
|
),
|
|
1111
|
+
enumerationConcept: z10.string().trim().min(1).optional().describe(
|
|
1112
|
+
'For count/list questions about a category, pass the language-agnostic/global category phrase here (for example, "fitness classes" or "\uC6B4\uB3D9 \uC218\uC5C5"). The embedding model resolves the caller-supplied hint across a broad range of languages.'
|
|
1113
|
+
),
|
|
1111
1114
|
...scopeShape
|
|
1112
1115
|
};
|
|
1113
1116
|
var searchMemoriesTool = {
|
|
@@ -1141,7 +1144,8 @@ var searchMemoriesTool = {
|
|
|
1141
1144
|
eventTimeStart: args.eventTimeStart,
|
|
1142
1145
|
eventTimeEnd: args.eventTimeEnd,
|
|
1143
1146
|
asOf: args.asOf,
|
|
1144
|
-
anchorTime: args.anchorTime
|
|
1147
|
+
anchorTime: args.anchorTime,
|
|
1148
|
+
enumerationConcept: args.enumerationConcept
|
|
1145
1149
|
},
|
|
1146
1150
|
scope: args
|
|
1147
1151
|
});
|
|
@@ -1283,7 +1287,7 @@ var inputShape9 = {
|
|
|
1283
1287
|
type: z12.enum(relationshipTypes).describe("Relationship type.")
|
|
1284
1288
|
})
|
|
1285
1289
|
).optional().describe(
|
|
1286
|
-
|
|
1290
|
+
'Edges between entities; source and target must be entity names from this request. Relationships matter as much as entities because graph traversal needs edges to connect related memories. For countable categories the user may later enumerate ("how many fitness classes / streaming services / pets do I have?"), add a canonical category CONCEPT node and an IS_A edge from each member to it. A language/synonym variant gives zero-cost exact-match resolution only when it is also a memberful CONCEPT node with member IS_A edges; there is no query-time alias\u2192canonical resolver. pyx resolves un-enumerated count-noun variants at query time via strict embedding over memberful CONCEPT nodes.'
|
|
1287
1291
|
),
|
|
1288
1292
|
extractEntities: z12.boolean().optional().describe(
|
|
1289
1293
|
"Override extraction: false skips caller-side extraction; true requires caller entities or MCP sampling and errors loudly if neither is available."
|
|
@@ -1420,7 +1424,7 @@ var ALL_TOOL_NAMES = ALL_TOOLS.map((t) => t.name);
|
|
|
1420
1424
|
// src/mcp/server.ts
|
|
1421
1425
|
async function runMcpServer(opts) {
|
|
1422
1426
|
const fetchImpl = opts.fetchImpl ?? fetch;
|
|
1423
|
-
const version = opts.version ?? (true ? "0.
|
|
1427
|
+
const version = opts.version ?? (true ? "0.41.0" : "0.0.0-dev");
|
|
1424
1428
|
const server = new McpServer(
|
|
1425
1429
|
{ name: "pyx-memory", version },
|
|
1426
1430
|
{ instructions: PYX_MEMORY_INSTRUCTIONS, capabilities: { tools: {} } }
|
package/dist/dashboard.mjs
CHANGED
|
@@ -11,8 +11,8 @@ import {
|
|
|
11
11
|
toGraphologyFormat,
|
|
12
12
|
transformGraphData,
|
|
13
13
|
unreachableHealth
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-J3HY44AP.mjs";
|
|
15
|
+
import "./chunk-YT46GYB3.mjs";
|
|
16
16
|
import "./chunk-KSTI4M52.mjs";
|
|
17
17
|
export {
|
|
18
18
|
DashboardClient,
|
package/dist/index.d.ts
CHANGED
|
@@ -587,6 +587,14 @@ interface MemorySearchParams {
|
|
|
587
587
|
* over the query-text year parse (hybrid strategy).
|
|
588
588
|
*/
|
|
589
589
|
anchorTime?: string;
|
|
590
|
+
/**
|
|
591
|
+
* The category the user is asking to count/list (e.g. "fitness classes",
|
|
592
|
+
* "운동 수업", any language). Presence signals enumeration intent and supplies
|
|
593
|
+
* the category for graph resolution; the caller (which understands the user's
|
|
594
|
+
* language) sets it. When omitted, pyx falls back to a deterministic EN/KO
|
|
595
|
+
* marker detector.
|
|
596
|
+
*/
|
|
597
|
+
enumerationConcept?: string;
|
|
590
598
|
/** Confidence threshold below which the system recommends abstention (0.0–1.0). Default: 0.3. */
|
|
591
599
|
abstentionThreshold?: number;
|
|
592
600
|
/**
|
package/dist/index.mjs
CHANGED
package/dist/react.mjs
CHANGED
|
@@ -11,8 +11,8 @@ import {
|
|
|
11
11
|
toGraphologyFormat,
|
|
12
12
|
transformGraphData,
|
|
13
13
|
unreachableHealth
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-J3HY44AP.mjs";
|
|
15
|
+
import "./chunk-YT46GYB3.mjs";
|
|
16
16
|
import "./chunk-KSTI4M52.mjs";
|
|
17
17
|
|
|
18
18
|
// ../dashboard/src/hooks/use-consolidation-log.ts
|