@pyxmate/memory 1.11.0 → 1.12.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.
@@ -19,8 +19,8 @@ declare const AGENT_TARGETS: readonly [{
19
19
  readonly tool: "Any other tool";
20
20
  readonly instructionsFile: "that tool's user-scope (global) instructions/rules file";
21
21
  }];
22
- declare const STORE_ENTITIES_DESC = "Named entities mentioned by the content. Pass entities and relationships when you can (caller-wins). You build the graph \u2014 the server does not extract it for you unless a self-host operator has configured a BYO extraction endpoint (then caller-passed graph still wins). On a multi-entity store, include at least one relationship connecting the entities, or the store is refused so isolated nodes never accumulate (set entitiesOnly for a deliberate lone entity); triples make edges impossible to omit. Use specific durable entities; never a catch-all hub (\"me\", \"health\") linked to everything \u2014 bounded IS_A category nodes are the deliberate exception.";
23
- declare const STORE_RELATIONSHIPS_DESC = "Edges between entities; source and target must be entity names from this request. Pass entities and relationships when you can (caller-wins). You build the graph \u2014 the server does not extract it for you unless a self-host operator has configured a BYO extraction endpoint (then caller-passed graph still wins). On a multi-entity store, include at least one relationship connecting the entities, or the store is refused so isolated nodes never accumulate (set entitiesOnly for a deliberate lone entity); triples make edges impossible to omit. 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.";
22
+ declare const STORE_ENTITIES_DESC = "Named entities mentioned by the content. Pass entities and relationships when you can (caller-wins). On a multi-entity store, include at least one relationship connecting the entities, or the store is refused so isolated nodes never accumulate (set entitiesOnly for a deliberate lone entity); triples make edges impossible to omit. Use specific durable entities; never a catch-all hub (\"me\", \"health\") linked to everything \u2014 bounded IS_A category nodes are the deliberate exception.";
23
+ declare const STORE_RELATIONSHIPS_DESC = "Edges between entities; source and target must be entity names from this request. Pass entities and relationships when you can (caller-wins). On a multi-entity store, include at least one relationship connecting the entities, or the store is refused so isolated nodes never accumulate (set entitiesOnly for a deliberate lone entity); triples make edges impossible to omit. 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.";
24
24
  declare const STORE_TRIPLES_DESC = "Graph facts as subject\u2013relation\u2013object triples; each is materialized into the two entity nodes plus the edge that connects them, so a node cannot be added without its relationship. Use this (or entities + relationships) to populate the knowledge graph \u2014 for weak hosts triples make edges unavoidable. subject/object each have a name and a type (from the entity-type set); relation is a freeform label. Merged with any entities/relationships you also pass (caller-wins); duplicates within one call are collapsed.";
25
25
  declare const STORE_EVENT_TIME_DESC = "ISO-8601 time the fact happened or took effect (bi-temporal). Pass for any fact that can change or go stale \u2014 recency ordering, dated (\"as of\") queries, and stale-vs-current conflict resolution key off it.";
26
26
  declare const STORE_TOOL_DESC = "Store one concise factual memory \u2014 a decision, not deliberation. Required: content, topic, project; default type is long-term (use episodic for a milestone/handoff snapshot, summary for a rollup). Entity-free memories are valid: omit graph fields, or set extractEntities:false, when there are no graph facts. When content does name people, organizations, tools, places, events, or key concepts, pass entities and relationships (caller-wins); on a multi-entity store include at least one relationship connecting them, or the store is refused so isolated nodes never accumulate (set entitiesOnly for a deliberate lone entity), and triples make edges impossible to omit. Relationships (edges) matter as much as entities because graph traversal needs edges to connect related memories. You build the graph \u2014 the server does not extract it unless a self-host operator has configured a BYO extraction endpoint (then caller-passed graph still wins). Aggregate high-frequency streams (wearable/sensor samples, metrics) into the dated fact or summary they support (with eventTime) \u2014 never one memory per sample.";
@@ -13,7 +13,7 @@ import {
13
13
  buildAgentSnippet,
14
14
  buildDesignGuide,
15
15
  buildGraphStructuringPrompt
16
- } from "./chunk-LJ7OORIM.mjs";
16
+ } from "./chunk-OUSGU272.mjs";
17
17
  export {
18
18
  AGENT_TARGETS,
19
19
  PERSISTENT_MEMORY_SECTION,
@@ -11,10 +11,11 @@ var PERSISTENT_MEMORY_SECTION = [
11
11
  "- Before suggesting an approach, search for prior decisions that might contradict it.",
12
12
  "- When the user references prior work, search for it.",
13
13
  "- When investigating a bug, search for prior occurrences and fixes.",
14
- '- When a question names a time \u2014 explicit or relative ("last year") \u2014 resolve it to an absolute ISO-8601 timestamp and pass it as search `anchorTime`: results rank by proximity to that time, without excluding other results.',
15
- "- Match search `effort` to risk: use `quick` for routine recall; use `deep` when quick returns nothing, when prior state may be archived/superseded, or when full history matters.",
14
+ '- When a question names a time \u2014 explicit or relative ("last year") \u2014 resolve it to an absolute ISO-8601 timestamp and pass it as search `anchorTime`: results rank by proximity to that time (soft \u2014 never excludes).',
15
+ "- Match search `effort` to risk: use `quick` for routine recall; use `deep` when quick returns nothing, prior state may be archived/superseded, or full history matters.",
16
+ "- For count/list questions pass `enumerationConcept` (the category phrase, any language); for Korean/cross-lingual recall add `enableRerank: true` (hybrid-only, slower).",
16
17
  '- To trace how a fact changed ("what did X use before Y", how it evolved), call `lineage` with `subject` + `relation` or an `entryId` instead of stitching together searches.',
17
- "- Recalled memories reflect what was true when written \u2014 if one names a file, function, flag, or version, verify it still exists before acting on it.",
18
+ "- Recalled memories reflect what was true when written \u2014 verify named files, functions, flags, and versions before acting.",
18
19
  "",
19
20
  "Reinforce and correct:",
20
21
  "",
@@ -22,7 +23,7 @@ var PERSISTENT_MEMORY_SECTION = [
22
23
  "- When the user corrects a mistake, call `record_correction` with what was wrong, what to do instead, and when it applies.",
23
24
  "- Before starting a task, call `fetch_applicable_corrections` with the task shape; pyx never auto-applies them, so decide which corrections fit.",
24
25
  "",
25
- "Store when durable state settles \u2014 usually before a final response or handoff. Treat that moment as a check, not an automatic write: sparse and high-value beats dense and noisy, so if nothing durable changed, store nothing. When it did, capture only what applies:",
26
+ "Store when durable state settles \u2014 usually before a final response/handoff. Treat it as a check, not automatic: if nothing durable changed, store nothing. When it did, capture only:",
26
27
  "",
27
28
  '- Facts (default) \u2014 corrections/preferences; bug fixes with root cause and fix; architecture/design decisions with reasoning; integration/API/auth/endpoint details; gotchas with what broke and the fix; explicit "remember this" requests. One fact per memory.',
28
29
  "- Process (`type: long-term`) \u2014 a reusable workflow, convention, or playbook a fresh session should follow. Store it once stabilized or adopted.",
@@ -34,13 +35,14 @@ var PERSISTENT_MEMORY_SECTION = [
34
35
  "- Always include `topic` and `project`.",
35
36
  "- Store concise facts and decisions, not deliberation.",
36
37
  "- Keep one memory per concept; do not bundle unrelated facts.",
37
- "- Do not store ephemeral file contents, raw logs, or step-by-step progress as it happens. High-frequency streams (sensor/wearable samples, metrics) must be aggregated into the dated fact or summary they support (with `eventTime`), never stored as one memory or graph node per sample.",
38
+ "- Do not store ephemeral file contents, raw logs, or step-by-step progress. Aggregate high-frequency streams into the dated fact or summary they support (with `eventTime`), never one memory or graph node per sample.",
38
39
  '- Pass `eventTime` (ISO-8601, when the fact happened or took effect) for facts that can change or go stale. Recency ordering, dated ("as of") queries, and stale-vs-current resolution key off it.',
39
- "- Graph is a retrieval structure. When content names people, organizations, tools, places, events, or key concepts, pass `entities` and `relationships` when you can (caller-wins). On a multi-entity store, include at least one relationship connecting them, or use `triples` so edges are explicit. Relationships matter as much as entities for traversal. Entity-free memories are valid.",
40
+ "- Graph is a retrieval structure. When content names people, organizations, tools, places, events, or key concepts, pass `entities` and `relationships` when you can (caller-wins). For multi-entity stores, connect them with at least one relationship, or use `triples`. Relationships matter as much as entities. Entity-free memories are valid.",
40
41
  '- Use specific durable entities. Never create a catch-all hub node ("me", "health") linked to everything; mega-hubs degrade traversal. Bounded `IS_A` category nodes are the exception.',
41
42
  '- For countable categories the user may later enumerate, add a canonical category `CONCEPT` node and an `IS_A` edge from each member to it (`"yoga"` IS_A `"fitness classes"`).',
42
- "- Taxonomy: when a store response reports unnamed clusters, call get_taxonomy_state and name each cluster via name_cluster \u2014 short, domain-true names in the user's language; rename (previousName) only when composition clearly changed.",
43
- "- Ingest documents/images only when they are worth persisting; images require a short description so they are searchable."
43
+ "- Taxonomy: when a store response reports unnamed clusters, call get_taxonomy_state and name each via name_cluster (short, domain-true, user's language); rename only when composition clearly changed.",
44
+ "- Ingest documents/images only when they are worth persisting; images require a short description so they are searchable.",
45
+ "- Before ingesting docx/xlsx/pptx, prefer pre-extracting to `.md`; headings preserve section context."
44
46
  ].join("\n");
45
47
  function buildDesignGuide({ appName }) {
46
48
  const name = appName.trim() || "your app";
@@ -101,8 +103,8 @@ var AGENT_TARGETS = [
101
103
  instructionsFile: "that tool's user-scope (global) instructions/rules file"
102
104
  }
103
105
  ];
104
- var STORE_ENTITIES_DESC = 'Named entities mentioned by the content. Pass entities and relationships when you can (caller-wins). You build the graph \u2014 the server does not extract it for you unless a self-host operator has configured a BYO extraction endpoint (then caller-passed graph still wins). On a multi-entity store, include at least one relationship connecting the entities, or the store is refused so isolated nodes never accumulate (set entitiesOnly for a deliberate lone entity); triples make edges impossible to omit. Use specific durable entities; never a catch-all hub ("me", "health") linked to everything \u2014 bounded IS_A category nodes are the deliberate exception.';
105
- var STORE_RELATIONSHIPS_DESC = 'Edges between entities; source and target must be entity names from this request. Pass entities and relationships when you can (caller-wins). You build the graph \u2014 the server does not extract it for you unless a self-host operator has configured a BYO extraction endpoint (then caller-passed graph still wins). On a multi-entity store, include at least one relationship connecting the entities, or the store is refused so isolated nodes never accumulate (set entitiesOnly for a deliberate lone entity); triples make edges impossible to omit. 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.';
106
+ var STORE_ENTITIES_DESC = 'Named entities mentioned by the content. Pass entities and relationships when you can (caller-wins). On a multi-entity store, include at least one relationship connecting the entities, or the store is refused so isolated nodes never accumulate (set entitiesOnly for a deliberate lone entity); triples make edges impossible to omit. Use specific durable entities; never a catch-all hub ("me", "health") linked to everything \u2014 bounded IS_A category nodes are the deliberate exception.';
107
+ var STORE_RELATIONSHIPS_DESC = 'Edges between entities; source and target must be entity names from this request. Pass entities and relationships when you can (caller-wins). On a multi-entity store, include at least one relationship connecting the entities, or the store is refused so isolated nodes never accumulate (set entitiesOnly for a deliberate lone entity); triples make edges impossible to omit. 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.';
106
108
  var STORE_TRIPLES_DESC = "Graph facts as subject\u2013relation\u2013object triples; each is materialized into the two entity nodes plus the edge that connects them, so a node cannot be added without its relationship. Use this (or entities + relationships) to populate the knowledge graph \u2014 for weak hosts triples make edges unavoidable. subject/object each have a name and a type (from the entity-type set); relation is a freeform label. Merged with any entities/relationships you also pass (caller-wins); duplicates within one call are collapsed.";
107
109
  var STORE_EVENT_TIME_DESC = 'ISO-8601 time the fact happened or took effect (bi-temporal). Pass for any fact that can change or go stale \u2014 recency ordering, dated ("as of") queries, and stale-vs-current conflict resolution key off it.';
108
110
  var STORE_TOOL_DESC = "Store one concise factual memory \u2014 a decision, not deliberation. Required: content, topic, project; default type is long-term (use episodic for a milestone/handoff snapshot, summary for a rollup). Entity-free memories are valid: omit graph fields, or set extractEntities:false, when there are no graph facts. When content does name people, organizations, tools, places, events, or key concepts, pass entities and relationships (caller-wins); on a multi-entity store include at least one relationship connecting them, or the store is refused so isolated nodes never accumulate (set entitiesOnly for a deliberate lone entity), and triples make edges impossible to omit. Relationships (edges) matter as much as entities because graph traversal needs edges to connect related memories. You build the graph \u2014 the server does not extract it unless a self-host operator has configured a BYO extraction endpoint (then caller-passed graph still wins). Aggregate high-frequency streams (wearable/sensor samples, metrics) into the dated fact or summary they support (with eventTime) \u2014 never one memory per sample.";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  PERSISTENT_MEMORY_SECTION,
4
4
  buildDesignGuide
5
- } from "../chunk-LJ7OORIM.mjs";
5
+ } from "../chunk-OUSGU272.mjs";
6
6
 
7
7
  // src/cli/exit-codes.ts
8
8
  var EXIT = {
@@ -529,7 +529,7 @@ function mcpEnvelopeError(message) {
529
529
  return mcpText(message, true);
530
530
  }
531
531
  function mcpJson(payload) {
532
- return mcpText(JSON.stringify(payload, null, 2));
532
+ return mcpText(JSON.stringify(payload));
533
533
  }
534
534
 
535
535
  // src/mcp/credentials.ts
@@ -798,7 +798,7 @@ function createProxyServer(client, version, uploadLocalFile) {
798
798
  return server;
799
799
  }
800
800
  async function runMcpProxyServer(opts) {
801
- const version = opts.version ?? (true ? "1.11.0" : "0.0.0-dev");
801
+ const version = opts.version ?? (true ? "1.12.0" : "0.0.0-dev");
802
802
  const read = await opts.readCredentials();
803
803
  if (!read.ok) {
804
804
  const text = read.result.content.map((c) => c.type === "text" ? c.text : "").join(" ").trim();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pyxmate/memory",
3
- "version": "1.11.0",
3
+ "version": "1.12.0",
4
4
  "type": "module",
5
5
  "description": "SDK for pyx-memory — Memory as a Service for AI agents",
6
6
  "license": "MIT",