@pyxmate/memory 0.26.0 → 0.26.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.
@@ -0,0 +1,118 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __export = (target, all) => {
3
+ for (var name in all)
4
+ __defProp(target, name, { get: all[name], enumerable: true });
5
+ };
6
+
7
+ // ../shared/src/constants/defaults.ts
8
+ var DEFAULTS = {
9
+ DATA_DIR: "./data",
10
+ VECTOR_PROVIDER: "lancedb",
11
+ MEMORY_SERVER_PORT: 7822
12
+ };
13
+
14
+ // ../shared/src/graph/extraction.ts
15
+ function mergeExtractedEntities(callerEntities, callerRelationships, extracted) {
16
+ const entities = [...callerEntities ?? []];
17
+ const relationships = [...callerRelationships ?? []];
18
+ const nameByLowercase = /* @__PURE__ */ new Map();
19
+ for (const entity of entities) {
20
+ const key = entity.name.toLowerCase();
21
+ if (!nameByLowercase.has(key)) nameByLowercase.set(key, entity.name);
22
+ }
23
+ for (const entity of extracted.entities) {
24
+ const key = entity.name.toLowerCase();
25
+ if (nameByLowercase.has(key)) continue;
26
+ entities.push(entity);
27
+ nameByLowercase.set(key, entity.name);
28
+ }
29
+ for (const relationship of extracted.relations) {
30
+ const source = nameByLowercase.get(relationship.source.toLowerCase());
31
+ const target = nameByLowercase.get(relationship.target.toLowerCase());
32
+ if (source && target) {
33
+ relationships.push({ ...relationship, source, target });
34
+ }
35
+ }
36
+ return { entities, relationships };
37
+ }
38
+
39
+ // ../shared/src/types/isolation.ts
40
+ var NamespaceIsolation = {
41
+ SHARED: "shared",
42
+ STRICT: "strict"
43
+ };
44
+
45
+ // ../shared/src/types/memory.ts
46
+ var MemoryType = {
47
+ SHORT_TERM: "short-term",
48
+ LONG_TERM: "long-term",
49
+ WORKING: "working",
50
+ EPISODIC: "episodic",
51
+ SUMMARY: "summary"
52
+ };
53
+ var SensitivityLevel = {
54
+ PUBLIC: "public",
55
+ INTERNAL: "internal",
56
+ SECRET: "secret"
57
+ };
58
+ var RAGStrategy = {
59
+ NAIVE: "naive",
60
+ GRAPH: "graph",
61
+ AGENTIC: "agentic",
62
+ HYBRID: "hybrid"
63
+ };
64
+ var VectorProvider = {
65
+ LANCEDB: "lancedb"
66
+ };
67
+ var EmbeddingProviderName = {
68
+ STUB: "stub",
69
+ /** @deprecated Vestigial — pyx-memory uses internal EmbeddingGemma embeddings. */
70
+ ANTHROPIC: "anthropic",
71
+ /** @deprecated Vestigial — pyx-memory uses internal EmbeddingGemma embeddings. */
72
+ OPENAI: "openai",
73
+ /** In-process ONNX model (default: EmbeddingGemma-300M). */
74
+ LOCAL: "local",
75
+ /** Remote OpenAI-compatible embedding service (pyx-cloud shared, custom, etc.). */
76
+ HTTP: "http"
77
+ };
78
+ var StoreTarget = {
79
+ SQLITE: "sqlite",
80
+ VECTOR: "vector",
81
+ GRAPH: "graph"
82
+ };
83
+
84
+ // ../shared/src/types/move.ts
85
+ var MoveFailureReason = {
86
+ /** Entry not found in the caller's tenant. */
87
+ NOT_FOUND: "not_found",
88
+ /** Move would cross tenant boundary (always forbidden). */
89
+ CROSS_TENANT_FORBIDDEN: "cross_tenant_forbidden",
90
+ /** Target namespace ID does not exist in the caller's tenant. */
91
+ TARGET_NAMESPACE_NOT_FOUND: "target_namespace_not_found",
92
+ /** SQLite metadata update failed; no compensation needed. */
93
+ SQLITE_UPDATE_FAILED: "sqlite_update_failed",
94
+ /** Vector store metadata update failed; SQLite reverted. */
95
+ VECTOR_UPDATE_FAILED: "vector_update_failed",
96
+ /** Graph edge namespace update failed; SQLite + vector reverted. */
97
+ GRAPH_UPDATE_FAILED: "graph_update_failed",
98
+ /** Compensation itself failed — manual intervention required. */
99
+ COMPENSATION_FAILED: "compensation_failed"
100
+ };
101
+
102
+ // ../shared/src/types/principal.ts
103
+ var SINGLE_TENANT_ID = "_single";
104
+
105
+ export {
106
+ __export,
107
+ DEFAULTS,
108
+ mergeExtractedEntities,
109
+ NamespaceIsolation,
110
+ MemoryType,
111
+ SensitivityLevel,
112
+ RAGStrategy,
113
+ VectorProvider,
114
+ EmbeddingProviderName,
115
+ StoreTarget,
116
+ MoveFailureReason,
117
+ SINGLE_TENANT_ID
118
+ };
@@ -1,7 +1,8 @@
1
- // ../client/src/memory-client.ts
2
1
  import {
3
2
  mergeExtractedEntities
4
- } from "@pyx-memory/shared";
3
+ } from "./chunk-573W637Y.mjs";
4
+
5
+ // ../client/src/memory-client.ts
5
6
  var MemoryServerError = class extends Error {
6
7
  status;
7
8
  constructor(message, status) {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  MemoryClient
3
- } from "./chunk-N6IRAUXH.mjs";
3
+ } from "./chunk-AKQIZAFT.mjs";
4
4
 
5
5
  // ../dashboard/src/aggregations/consolidation-analytics.ts
6
6
  function analyzeConsolidationLog(entries) {
@@ -1,7 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
- __export
4
- } from "../chunk-7P6ASYW6.mjs";
3
+ __export,
4
+ mergeExtractedEntities
5
+ } from "../chunk-573W637Y.mjs";
5
6
 
6
7
  // src/cli/exit-codes.ts
7
8
  var EXIT = {
@@ -15400,9 +15401,6 @@ var statusTool = {
15400
15401
  }
15401
15402
  };
15402
15403
 
15403
- // src/mcp/tools/store.ts
15404
- import { mergeExtractedEntities } from "@pyx-memory/shared";
15405
-
15406
15404
  // src/mcp/extraction-prompt.ts
15407
15405
  var ENTITY_TYPES = ["PERSON", "ORGANIZATION", "CONCEPT", "TOOL", "LOCATION", "EVENT"];
15408
15406
  var RELATION_TYPES = [
@@ -15623,7 +15621,7 @@ var ALL_TOOL_NAMES = ALL_TOOLS.map((t) => t.name);
15623
15621
  // src/mcp/server.ts
15624
15622
  async function runMcpServer(opts) {
15625
15623
  const fetchImpl = opts.fetchImpl ?? fetch;
15626
- const version2 = opts.version ?? (true ? "0.26.0" : "0.0.0-dev");
15624
+ const version2 = opts.version ?? (true ? "0.26.1" : "0.0.0-dev");
15627
15625
  const server = new McpServer(
15628
15626
  { name: "pyx-memory", version: version2 },
15629
15627
  { instructions: PYX_MEMORY_INSTRUCTIONS, capabilities: { tools: {} } }
@@ -11,9 +11,9 @@ import {
11
11
  toGraphologyFormat,
12
12
  transformGraphData,
13
13
  unreachableHealth
14
- } from "./chunk-47O2JYAP.mjs";
15
- import "./chunk-N6IRAUXH.mjs";
16
- import "./chunk-7P6ASYW6.mjs";
14
+ } from "./chunk-CE3ZBDTM.mjs";
15
+ import "./chunk-AKQIZAFT.mjs";
16
+ import "./chunk-573W637Y.mjs";
17
17
  export {
18
18
  DashboardClient,
19
19
  Poller,
package/dist/index.mjs CHANGED
@@ -1,106 +1,20 @@
1
1
  import {
2
2
  MemoryClient,
3
3
  MemoryServerError
4
- } from "./chunk-N6IRAUXH.mjs";
5
- import "./chunk-7P6ASYW6.mjs";
6
-
7
- // ../shared/src/constants/defaults.ts
8
- var DEFAULTS = {
9
- DATA_DIR: "./data",
10
- VECTOR_PROVIDER: "lancedb",
11
- MEMORY_SERVER_PORT: 7822
12
- };
13
-
14
- // ../shared/src/graph/extraction.ts
15
- function mergeExtractedEntities(callerEntities, callerRelationships, extracted) {
16
- const entities = [...callerEntities ?? []];
17
- const relationships = [...callerRelationships ?? []];
18
- const nameByLowercase = /* @__PURE__ */ new Map();
19
- for (const entity of entities) {
20
- const key = entity.name.toLowerCase();
21
- if (!nameByLowercase.has(key)) nameByLowercase.set(key, entity.name);
22
- }
23
- for (const entity of extracted.entities) {
24
- const key = entity.name.toLowerCase();
25
- if (nameByLowercase.has(key)) continue;
26
- entities.push(entity);
27
- nameByLowercase.set(key, entity.name);
28
- }
29
- for (const relationship of extracted.relations) {
30
- const source = nameByLowercase.get(relationship.source.toLowerCase());
31
- const target = nameByLowercase.get(relationship.target.toLowerCase());
32
- if (source && target) {
33
- relationships.push({ ...relationship, source, target });
34
- }
35
- }
36
- return { entities, relationships };
37
- }
38
-
39
- // ../shared/src/types/isolation.ts
40
- var NamespaceIsolation = {
41
- SHARED: "shared",
42
- STRICT: "strict"
43
- };
44
-
45
- // ../shared/src/types/memory.ts
46
- var MemoryType = {
47
- SHORT_TERM: "short-term",
48
- LONG_TERM: "long-term",
49
- WORKING: "working",
50
- EPISODIC: "episodic",
51
- SUMMARY: "summary"
52
- };
53
- var SensitivityLevel = {
54
- PUBLIC: "public",
55
- INTERNAL: "internal",
56
- SECRET: "secret"
57
- };
58
- var RAGStrategy = {
59
- NAIVE: "naive",
60
- GRAPH: "graph",
61
- AGENTIC: "agentic",
62
- HYBRID: "hybrid"
63
- };
64
- var VectorProvider = {
65
- LANCEDB: "lancedb"
66
- };
67
- var EmbeddingProviderName = {
68
- STUB: "stub",
69
- /** @deprecated Vestigial — pyx-memory uses internal EmbeddingGemma embeddings. */
70
- ANTHROPIC: "anthropic",
71
- /** @deprecated Vestigial — pyx-memory uses internal EmbeddingGemma embeddings. */
72
- OPENAI: "openai",
73
- /** In-process ONNX model (default: EmbeddingGemma-300M). */
74
- LOCAL: "local",
75
- /** Remote OpenAI-compatible embedding service (pyx-cloud shared, custom, etc.). */
76
- HTTP: "http"
77
- };
78
- var StoreTarget = {
79
- SQLITE: "sqlite",
80
- VECTOR: "vector",
81
- GRAPH: "graph"
82
- };
83
-
84
- // ../shared/src/types/move.ts
85
- var MoveFailureReason = {
86
- /** Entry not found in the caller's tenant. */
87
- NOT_FOUND: "not_found",
88
- /** Move would cross tenant boundary (always forbidden). */
89
- CROSS_TENANT_FORBIDDEN: "cross_tenant_forbidden",
90
- /** Target namespace ID does not exist in the caller's tenant. */
91
- TARGET_NAMESPACE_NOT_FOUND: "target_namespace_not_found",
92
- /** SQLite metadata update failed; no compensation needed. */
93
- SQLITE_UPDATE_FAILED: "sqlite_update_failed",
94
- /** Vector store metadata update failed; SQLite reverted. */
95
- VECTOR_UPDATE_FAILED: "vector_update_failed",
96
- /** Graph edge namespace update failed; SQLite + vector reverted. */
97
- GRAPH_UPDATE_FAILED: "graph_update_failed",
98
- /** Compensation itself failed — manual intervention required. */
99
- COMPENSATION_FAILED: "compensation_failed"
100
- };
101
-
102
- // ../shared/src/types/principal.ts
103
- var SINGLE_TENANT_ID = "_single";
4
+ } from "./chunk-AKQIZAFT.mjs";
5
+ import {
6
+ DEFAULTS,
7
+ EmbeddingProviderName,
8
+ MemoryType,
9
+ MoveFailureReason,
10
+ NamespaceIsolation,
11
+ RAGStrategy,
12
+ SINGLE_TENANT_ID,
13
+ SensitivityLevel,
14
+ StoreTarget,
15
+ VectorProvider,
16
+ mergeExtractedEntities
17
+ } from "./chunk-573W637Y.mjs";
104
18
  export {
105
19
  DEFAULTS,
106
20
  EmbeddingProviderName,
package/dist/react.mjs CHANGED
@@ -11,9 +11,9 @@ import {
11
11
  toGraphologyFormat,
12
12
  transformGraphData,
13
13
  unreachableHealth
14
- } from "./chunk-47O2JYAP.mjs";
15
- import "./chunk-N6IRAUXH.mjs";
16
- import "./chunk-7P6ASYW6.mjs";
14
+ } from "./chunk-CE3ZBDTM.mjs";
15
+ import "./chunk-AKQIZAFT.mjs";
16
+ import "./chunk-573W637Y.mjs";
17
17
 
18
18
  // ../dashboard/src/hooks/use-consolidation-log.ts
19
19
  import { useCallback as useCallback2, useMemo } from "react";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pyxmate/memory",
3
- "version": "0.26.0",
3
+ "version": "0.26.1",
4
4
  "type": "module",
5
5
  "description": "SDK for pyx-memory — Memory as a Service for AI agents",
6
6
  "license": "MIT",
@@ -57,10 +57,10 @@
57
57
  },
58
58
  "dependencies": {
59
59
  "@modelcontextprotocol/sdk": "^1.29.0",
60
- "@napi-rs/keyring": "^1.3.0",
61
- "@pyx-memory/shared": "workspace:*"
60
+ "@napi-rs/keyring": "^1.3.0"
62
61
  },
63
62
  "devDependencies": {
63
+ "@pyx-memory/shared": "workspace:*",
64
64
  "tsup": "^8.4.0"
65
65
  }
66
66
  }
@@ -1,9 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __export = (target, all) => {
3
- for (var name in all)
4
- __defProp(target, name, { get: all[name], enumerable: true });
5
- };
6
-
7
- export {
8
- __export
9
- };