@pyxmate/memory 1.2.0 → 1.4.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/agent-contract.d.ts +1 -1
- package/dist/agent-contract.mjs +1 -1
- package/dist/{chunk-3SDKJ5TB.mjs → chunk-BS6K64SA.mjs} +140 -4
- package/dist/{chunk-XHEVB23R.mjs → chunk-ML6VKYAL.mjs} +3 -2
- package/dist/{chunk-3PBLTOBR.mjs → chunk-MZF55IUR.mjs} +1 -1
- package/dist/cli/pyx-mem.mjs +221 -810
- package/dist/dashboard.mjs +2 -3
- package/dist/index.mjs +4 -6
- package/dist/react.mjs +2 -3
- package/package.json +1 -1
- package/dist/chunk-X6AYWXW7.mjs +0 -143
package/dist/dashboard.mjs
CHANGED
|
@@ -11,9 +11,8 @@ import {
|
|
|
11
11
|
toGraphologyFormat,
|
|
12
12
|
transformGraphData,
|
|
13
13
|
unreachableHealth
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-X6AYWXW7.mjs";
|
|
14
|
+
} from "./chunk-MZF55IUR.mjs";
|
|
15
|
+
import "./chunk-BS6K64SA.mjs";
|
|
17
16
|
export {
|
|
18
17
|
DashboardClient,
|
|
19
18
|
Poller,
|
package/dist/index.mjs
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
DisabledMemory,
|
|
3
|
-
MemoryClient,
|
|
4
|
-
MemoryServerError
|
|
5
|
-
} from "./chunk-3SDKJ5TB.mjs";
|
|
6
1
|
import {
|
|
7
2
|
DEFAULTS,
|
|
8
3
|
DEPRECATED_RAG_STRATEGIES,
|
|
4
|
+
DisabledMemory,
|
|
9
5
|
EmbeddingProviderName,
|
|
6
|
+
MemoryClient,
|
|
7
|
+
MemoryServerError,
|
|
10
8
|
MemoryType,
|
|
11
9
|
MoveFailureReason,
|
|
12
10
|
NamespaceIsolation,
|
|
@@ -18,7 +16,7 @@ import {
|
|
|
18
16
|
mergeExtractedEntities,
|
|
19
17
|
normalizeGraphLabel,
|
|
20
18
|
normalizeNameKey
|
|
21
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-BS6K64SA.mjs";
|
|
22
20
|
|
|
23
21
|
// src/preset.ts
|
|
24
22
|
var DEFAULT_MEMORY_URL = `http://localhost:${DEFAULTS.MEMORY_SERVER_PORT}`;
|
package/dist/react.mjs
CHANGED
|
@@ -11,9 +11,8 @@ import {
|
|
|
11
11
|
toGraphologyFormat,
|
|
12
12
|
transformGraphData,
|
|
13
13
|
unreachableHealth
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-X6AYWXW7.mjs";
|
|
14
|
+
} from "./chunk-MZF55IUR.mjs";
|
|
15
|
+
import "./chunk-BS6K64SA.mjs";
|
|
17
16
|
|
|
18
17
|
// ../dashboard/src/hooks/use-consolidation-log.ts
|
|
19
18
|
import { useCallback as useCallback2, useMemo } from "react";
|
package/package.json
CHANGED
package/dist/chunk-X6AYWXW7.mjs
DELETED
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
// ../shared/src/constants/defaults.ts
|
|
2
|
-
var DEFAULTS = {
|
|
3
|
-
DATA_DIR: "./data",
|
|
4
|
-
VECTOR_PROVIDER: "lancedb",
|
|
5
|
-
MEMORY_SERVER_PORT: 7822
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
// ../shared/src/graph/extraction.ts
|
|
9
|
-
function normalizeGraphLabel(value, fallback) {
|
|
10
|
-
const normalized = value.trim().toUpperCase().replace(/[^A-Z0-9]+/g, "_").replace(/^_+|_+$/g, "");
|
|
11
|
-
return normalized.length > 0 ? normalized : fallback;
|
|
12
|
-
}
|
|
13
|
-
function normalizeNameKey(name) {
|
|
14
|
-
return name.trim().toLowerCase().replace(/\s+/g, " ");
|
|
15
|
-
}
|
|
16
|
-
function relationshipKey(relationship) {
|
|
17
|
-
return [
|
|
18
|
-
relationship.source.trim().toLowerCase(),
|
|
19
|
-
relationship.target.trim().toLowerCase(),
|
|
20
|
-
normalizeGraphLabel(relationship.type, "RELATED_TO")
|
|
21
|
-
].join("\0");
|
|
22
|
-
}
|
|
23
|
-
function mergeExtractedEntities(callerEntities, callerRelationships, extracted) {
|
|
24
|
-
const entities = [...callerEntities ?? []];
|
|
25
|
-
const relationships = [...callerRelationships ?? []];
|
|
26
|
-
const nameByLowercase = /* @__PURE__ */ new Map();
|
|
27
|
-
for (const entity of entities) {
|
|
28
|
-
const key = entity.name.toLowerCase();
|
|
29
|
-
if (!nameByLowercase.has(key)) nameByLowercase.set(key, entity.name);
|
|
30
|
-
}
|
|
31
|
-
for (const entity of extracted.entities) {
|
|
32
|
-
const key = entity.name.toLowerCase();
|
|
33
|
-
if (nameByLowercase.has(key)) continue;
|
|
34
|
-
entities.push({ ...entity, type: normalizeGraphLabel(entity.type, "CONCEPT") });
|
|
35
|
-
nameByLowercase.set(key, entity.name);
|
|
36
|
-
}
|
|
37
|
-
for (const relationship of extracted.relations) {
|
|
38
|
-
const source = nameByLowercase.get(relationship.source.toLowerCase());
|
|
39
|
-
const target = nameByLowercase.get(relationship.target.toLowerCase());
|
|
40
|
-
if (source && target) {
|
|
41
|
-
relationships.push({
|
|
42
|
-
...relationship,
|
|
43
|
-
source,
|
|
44
|
-
target,
|
|
45
|
-
type: normalizeGraphLabel(relationship.type, "RELATED_TO")
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
const seenRelationships = /* @__PURE__ */ new Set();
|
|
50
|
-
const dedupedRelationships = [];
|
|
51
|
-
for (const relationship of relationships) {
|
|
52
|
-
const key = relationshipKey(relationship);
|
|
53
|
-
if (seenRelationships.has(key)) continue;
|
|
54
|
-
seenRelationships.add(key);
|
|
55
|
-
dedupedRelationships.push(relationship);
|
|
56
|
-
}
|
|
57
|
-
return { entities, relationships: dedupedRelationships };
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
// ../shared/src/types/isolation.ts
|
|
61
|
-
var NamespaceIsolation = {
|
|
62
|
-
SHARED: "shared",
|
|
63
|
-
STRICT: "strict"
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
// ../shared/src/types/memory.ts
|
|
67
|
-
var MemoryType = {
|
|
68
|
-
SHORT_TERM: "short-term",
|
|
69
|
-
LONG_TERM: "long-term",
|
|
70
|
-
WORKING: "working",
|
|
71
|
-
EPISODIC: "episodic",
|
|
72
|
-
SUMMARY: "summary"
|
|
73
|
-
};
|
|
74
|
-
var SensitivityLevel = {
|
|
75
|
-
PUBLIC: "public",
|
|
76
|
-
INTERNAL: "internal",
|
|
77
|
-
SECRET: "secret"
|
|
78
|
-
};
|
|
79
|
-
var RAGStrategy = {
|
|
80
|
-
NAIVE: "naive",
|
|
81
|
-
GRAPH: "graph",
|
|
82
|
-
HYBRID: "hybrid"
|
|
83
|
-
};
|
|
84
|
-
var DEPRECATED_RAG_STRATEGIES = /* @__PURE__ */ new Map([
|
|
85
|
-
["agentic", "strategy.deprecated:agentic \u2014 removed in v0.26, use hybrid"]
|
|
86
|
-
]);
|
|
87
|
-
var VectorProvider = {
|
|
88
|
-
LANCEDB: "lancedb"
|
|
89
|
-
};
|
|
90
|
-
var EmbeddingProviderName = {
|
|
91
|
-
STUB: "stub",
|
|
92
|
-
/** @deprecated Vestigial — pyx-memory uses internal EmbeddingGemma embeddings. */
|
|
93
|
-
ANTHROPIC: "anthropic",
|
|
94
|
-
/** @deprecated Vestigial — pyx-memory uses internal EmbeddingGemma embeddings. */
|
|
95
|
-
OPENAI: "openai",
|
|
96
|
-
/** In-process ONNX model (default: EmbeddingGemma-300M). */
|
|
97
|
-
LOCAL: "local",
|
|
98
|
-
/** Remote OpenAI-compatible embedding service (pyx-cloud shared, custom, etc.). */
|
|
99
|
-
HTTP: "http"
|
|
100
|
-
};
|
|
101
|
-
var StoreTarget = {
|
|
102
|
-
SQLITE: "sqlite",
|
|
103
|
-
VECTOR: "vector",
|
|
104
|
-
GRAPH: "graph"
|
|
105
|
-
};
|
|
106
|
-
|
|
107
|
-
// ../shared/src/types/move.ts
|
|
108
|
-
var MoveFailureReason = {
|
|
109
|
-
/** Entry not found in the caller's tenant. */
|
|
110
|
-
NOT_FOUND: "not_found",
|
|
111
|
-
/** Move would cross tenant boundary (always forbidden). */
|
|
112
|
-
CROSS_TENANT_FORBIDDEN: "cross_tenant_forbidden",
|
|
113
|
-
/** Target namespace ID does not exist in the caller's tenant. */
|
|
114
|
-
TARGET_NAMESPACE_NOT_FOUND: "target_namespace_not_found",
|
|
115
|
-
/** SQLite metadata update failed; no compensation needed. */
|
|
116
|
-
SQLITE_UPDATE_FAILED: "sqlite_update_failed",
|
|
117
|
-
/** Vector store metadata update failed; SQLite reverted. */
|
|
118
|
-
VECTOR_UPDATE_FAILED: "vector_update_failed",
|
|
119
|
-
/** Graph edge namespace update failed; SQLite + vector reverted. */
|
|
120
|
-
GRAPH_UPDATE_FAILED: "graph_update_failed",
|
|
121
|
-
/** Compensation itself failed — manual intervention required. */
|
|
122
|
-
COMPENSATION_FAILED: "compensation_failed"
|
|
123
|
-
};
|
|
124
|
-
|
|
125
|
-
// ../shared/src/types/principal.ts
|
|
126
|
-
var SINGLE_TENANT_ID = "_single";
|
|
127
|
-
|
|
128
|
-
export {
|
|
129
|
-
DEFAULTS,
|
|
130
|
-
normalizeGraphLabel,
|
|
131
|
-
normalizeNameKey,
|
|
132
|
-
mergeExtractedEntities,
|
|
133
|
-
NamespaceIsolation,
|
|
134
|
-
MemoryType,
|
|
135
|
-
SensitivityLevel,
|
|
136
|
-
RAGStrategy,
|
|
137
|
-
DEPRECATED_RAG_STRATEGIES,
|
|
138
|
-
VectorProvider,
|
|
139
|
-
EmbeddingProviderName,
|
|
140
|
-
StoreTarget,
|
|
141
|
-
MoveFailureReason,
|
|
142
|
-
SINGLE_TENANT_ID
|
|
143
|
-
};
|