@pyxmate/memory 1.0.0 → 1.0.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.
@@ -1,7 +1,68 @@
1
1
  import {
2
+ RAGStrategy,
2
3
  mergeExtractedEntities
3
4
  } from "./chunk-X6AYWXW7.mjs";
4
5
 
6
+ // ../client/src/disabled-memory.ts
7
+ var DEFAULT_PAGE_LIMIT = 20;
8
+ var DisabledMemory = class {
9
+ async initialize() {
10
+ console.warn("[pyx-memory] No memory backend configured \u2014 running without memory.");
11
+ }
12
+ async store(entry) {
13
+ return {
14
+ id: "disabled",
15
+ content: entry.content,
16
+ type: entry.type,
17
+ metadata: {},
18
+ createdAt: (/* @__PURE__ */ new Date()).toISOString()
19
+ };
20
+ }
21
+ async search() {
22
+ return { entries: [], totalCount: 0, strategy: RAGStrategy.NAIVE };
23
+ }
24
+ async list(params = {}) {
25
+ return {
26
+ entries: [],
27
+ totalCount: 0,
28
+ page: params.page ?? 1,
29
+ limit: params.limit ?? DEFAULT_PAGE_LIMIT
30
+ };
31
+ }
32
+ async get() {
33
+ return null;
34
+ }
35
+ async delete() {
36
+ return false;
37
+ }
38
+ async clearSession() {
39
+ return 0;
40
+ }
41
+ async stats() {
42
+ return {
43
+ totalEntries: 0,
44
+ storageUsedBytes: 0,
45
+ vectorCount: 0,
46
+ recentAccessCount: 0,
47
+ connected: false
48
+ };
49
+ }
50
+ async queryAsOf() {
51
+ return [];
52
+ }
53
+ async lineage() {
54
+ return { versions: [], source: "chain" };
55
+ }
56
+ async reinforce() {
57
+ return { updated: [] };
58
+ }
59
+ async queryByEventTime() {
60
+ return [];
61
+ }
62
+ async shutdown() {
63
+ }
64
+ };
65
+
5
66
  // ../client/src/memory-client.ts
6
67
  var MemoryServerError = class extends Error {
7
68
  status;
@@ -789,6 +850,7 @@ var MemoryClient = class {
789
850
  };
790
851
 
791
852
  export {
853
+ DisabledMemory,
792
854
  MemoryServerError,
793
855
  MemoryClient
794
856
  };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  MemoryClient
3
- } from "./chunk-PXQLVQAA.mjs";
3
+ } from "./chunk-U3U4MHWS.mjs";
4
4
 
5
5
  // ../dashboard/src/aggregations/consolidation-analytics.ts
6
6
  function analyzeConsolidationLog(entries) {
@@ -1377,7 +1377,7 @@ var ALL_TOOL_NAMES = ALL_TOOLS.map((t) => t.name);
1377
1377
  // src/mcp/server.ts
1378
1378
  async function runMcpServer(opts) {
1379
1379
  const fetchImpl = opts.fetchImpl ?? fetch;
1380
- const version = opts.version ?? (true ? "1.0.0" : "0.0.0-dev");
1380
+ const version = opts.version ?? (true ? "1.0.1" : "0.0.0-dev");
1381
1381
  const server = new McpServer(
1382
1382
  { name: "pyx-memory", version },
1383
1383
  { instructions: PYX_MEMORY_INSTRUCTIONS, capabilities: { tools: {}, prompts: {} } }
@@ -11,8 +11,8 @@ import {
11
11
  toGraphologyFormat,
12
12
  transformGraphData,
13
13
  unreachableHealth
14
- } from "./chunk-ZCGJGI2O.mjs";
15
- import "./chunk-PXQLVQAA.mjs";
14
+ } from "./chunk-ZILXBWWH.mjs";
15
+ import "./chunk-U3U4MHWS.mjs";
16
16
  import "./chunk-X6AYWXW7.mjs";
17
17
  export {
18
18
  DashboardClient,
package/dist/index.d.ts CHANGED
@@ -149,6 +149,37 @@ interface ExtendedMemoryInterface extends MemoryInterface {
149
149
  getEntitySynthesis(name: string): Promise<MemoryEntry$1 | null>;
150
150
  }
151
151
 
152
+ /**
153
+ * No-op {@link MemoryInterface} for hosts that run without a memory backend
154
+ * (e.g. `MEMORY_URL` is unset). Every method returns a safe default, so the
155
+ * rest of the system functions without branching on `memory == null`.
156
+ *
157
+ * Canonical single source: this lives in the SAME package as `MemoryInterface`,
158
+ * so any method added to the interface fails THIS class's compile in the same
159
+ * build. The null-object can never silently drift behind the contract — the
160
+ * failure mode that left hand-rolled copies in downstream repos missing
161
+ * `lineage`/`reinforce` after the interface grew them.
162
+ *
163
+ * `initialize()` emits a single `console.warn`; pass nothing else — it is a
164
+ * pure null-object. Hosts wanting structured logging should log at the wiring
165
+ * site where they choose `DisabledMemory` over a real client.
166
+ */
167
+ declare class DisabledMemory implements MemoryInterface {
168
+ initialize(): Promise<void>;
169
+ store(entry: StoreInput$1): Promise<MemoryEntry$1>;
170
+ search(): Promise<MemorySearchResult$1>;
171
+ list(params?: MemoryListParams): Promise<MemoryListResult>;
172
+ get(): Promise<MemoryEntry$1 | null>;
173
+ delete(): Promise<boolean>;
174
+ clearSession(): Promise<number>;
175
+ stats(): Promise<MemoryStats$1>;
176
+ queryAsOf(): Promise<MemoryEntry$1[]>;
177
+ lineage(): Promise<LineageResult$1>;
178
+ reinforce(): Promise<ReinforceResult$1>;
179
+ queryByEventTime(): Promise<MemoryEntry$1[]>;
180
+ shutdown(): Promise<void>;
181
+ }
182
+
152
183
  /**
153
184
  * Callbacks for two-phase file enrichment. All callbacks are optional:
154
185
  * - Image-rich PDF + describeImage only → describes images, no entity extraction
@@ -1431,4 +1462,4 @@ interface CreatePyxMemoryOptions {
1431
1462
  }
1432
1463
  declare function createPyxMemory(opts?: CreatePyxMemoryOptions): MemoryClient;
1433
1464
 
1434
- export { type AgentId, type ApiResponse, type ConsolidationRunResult, type CorrectionInput, type CorrectionRecord, type CreatePyxMemoryOptions, DEFAULTS, DEPRECATED_RAG_STRATEGIES, type DroppedGraphRelationship, EmbeddingProviderName, type EnrichmentCallbacks, type EntityExtractionResult, type ExtendedMemoryInterface, type FetchCorrectionsInput, type GraphEnrichment, type GraphEnrichmentStatus, type GraphFailureMode, type GraphNode, type GraphRelationship, type GraphRepairResult, type GraphTraversalResult, type IngestEntity, type IngestErrorEvent, type IngestEvent, type IngestFileOptions, type IngestHeartbeatEvent, type IngestProgressEvent, type IngestRelationship, type IngestResultEvent, type IngestStage, type IngestionResult, type LineageParams, type LineageResult, type LineageVersion, MemoryClient, type MemoryClientOptions, type MemoryEntry, type MemoryIngestRequest, type MemoryInterface, type MemoryListParams, type MemoryListResult, type MemoryLogFilters, type MemorySearchParams, type MemorySearchResult, MemoryServerError, type MemoryStats, MemoryType, type MoveEntriesFilter, MoveFailureReason, type MoveResult, type MoveTarget, NamespaceIsolation, type PrincipalContext, RAGStrategy, type ReinforceParams, type ReinforceResult, type ReinforceSignal, SINGLE_TENANT_ID, SensitivityLevel, type SourceEvidence, type StoreInput, StoreTarget, type TemporalQueryFilters, type TenantScopeOptions, type Timestamp, type Topology, type TopologyExtractionProvider, type TopologyServiceVariant, VectorProvider, type WikiLintReport, createPyxMemory, mergeExtractedEntities, normalizeGraphLabel, normalizeNameKey };
1465
+ export { type AgentId, type ApiResponse, type ConsolidationRunResult, type CorrectionInput, type CorrectionRecord, type CreatePyxMemoryOptions, DEFAULTS, DEPRECATED_RAG_STRATEGIES, DisabledMemory, type DroppedGraphRelationship, EmbeddingProviderName, type EnrichmentCallbacks, type EntityExtractionResult, type ExtendedMemoryInterface, type FetchCorrectionsInput, type GraphEnrichment, type GraphEnrichmentStatus, type GraphFailureMode, type GraphNode, type GraphRelationship, type GraphRepairResult, type GraphTraversalResult, type IngestEntity, type IngestErrorEvent, type IngestEvent, type IngestFileOptions, type IngestHeartbeatEvent, type IngestProgressEvent, type IngestRelationship, type IngestResultEvent, type IngestStage, type IngestionResult, type LineageParams, type LineageResult, type LineageVersion, MemoryClient, type MemoryClientOptions, type MemoryEntry, type MemoryIngestRequest, type MemoryInterface, type MemoryListParams, type MemoryListResult, type MemoryLogFilters, type MemorySearchParams, type MemorySearchResult, MemoryServerError, type MemoryStats, MemoryType, type MoveEntriesFilter, MoveFailureReason, type MoveResult, type MoveTarget, NamespaceIsolation, type PrincipalContext, RAGStrategy, type ReinforceParams, type ReinforceResult, type ReinforceSignal, SINGLE_TENANT_ID, SensitivityLevel, type SourceEvidence, type StoreInput, StoreTarget, type TemporalQueryFilters, type TenantScopeOptions, type Timestamp, type Topology, type TopologyExtractionProvider, type TopologyServiceVariant, VectorProvider, type WikiLintReport, createPyxMemory, mergeExtractedEntities, normalizeGraphLabel, normalizeNameKey };
package/dist/index.mjs CHANGED
@@ -1,7 +1,8 @@
1
1
  import {
2
+ DisabledMemory,
2
3
  MemoryClient,
3
4
  MemoryServerError
4
- } from "./chunk-PXQLVQAA.mjs";
5
+ } from "./chunk-U3U4MHWS.mjs";
5
6
  import {
6
7
  DEFAULTS,
7
8
  DEPRECATED_RAG_STRATEGIES,
@@ -35,6 +36,7 @@ function createPyxMemory(opts = {}) {
35
36
  export {
36
37
  DEFAULTS,
37
38
  DEPRECATED_RAG_STRATEGIES,
39
+ DisabledMemory,
38
40
  EmbeddingProviderName,
39
41
  MemoryClient,
40
42
  MemoryServerError,
package/dist/react.mjs CHANGED
@@ -11,8 +11,8 @@ import {
11
11
  toGraphologyFormat,
12
12
  transformGraphData,
13
13
  unreachableHealth
14
- } from "./chunk-ZCGJGI2O.mjs";
15
- import "./chunk-PXQLVQAA.mjs";
14
+ } from "./chunk-ZILXBWWH.mjs";
15
+ import "./chunk-U3U4MHWS.mjs";
16
16
  import "./chunk-X6AYWXW7.mjs";
17
17
 
18
18
  // ../dashboard/src/hooks/use-consolidation-log.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pyxmate/memory",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "type": "module",
5
5
  "description": "SDK for pyx-memory — Memory as a Service for AI agents",
6
6
  "license": "MIT",