@pyxmate/memory 0.19.0 → 0.20.4

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/index.d.ts CHANGED
@@ -356,11 +356,14 @@ declare const VectorProvider: {
356
356
  type VectorProvider = (typeof VectorProvider)[keyof typeof VectorProvider];
357
357
  declare const EmbeddingProviderName: {
358
358
  readonly STUB: "stub";
359
- /** @deprecated Vestigial — pyx-memory uses internal BGE-M3 embeddings. */
359
+ /** @deprecated Vestigial — pyx-memory uses internal EmbeddingGemma embeddings. */
360
360
  readonly ANTHROPIC: "anthropic";
361
- /** @deprecated Vestigial — pyx-memory uses internal BGE-M3 embeddings. */
361
+ /** @deprecated Vestigial — pyx-memory uses internal EmbeddingGemma embeddings. */
362
362
  readonly OPENAI: "openai";
363
+ /** In-process ONNX model (default: EmbeddingGemma-300M). */
363
364
  readonly LOCAL: "local";
365
+ /** Remote OpenAI-compatible embedding service (pyx-cloud shared, custom, etc.). */
366
+ readonly HTTP: "http";
364
367
  };
365
368
  type EmbeddingProviderName = (typeof EmbeddingProviderName)[keyof typeof EmbeddingProviderName];
366
369
  interface MemoryEntry {
package/dist/index.mjs CHANGED
@@ -40,11 +40,14 @@ var VectorProvider = {
40
40
  };
41
41
  var EmbeddingProviderName = {
42
42
  STUB: "stub",
43
- /** @deprecated Vestigial — pyx-memory uses internal BGE-M3 embeddings. */
43
+ /** @deprecated Vestigial — pyx-memory uses internal EmbeddingGemma embeddings. */
44
44
  ANTHROPIC: "anthropic",
45
- /** @deprecated Vestigial — pyx-memory uses internal BGE-M3 embeddings. */
45
+ /** @deprecated Vestigial — pyx-memory uses internal EmbeddingGemma embeddings. */
46
46
  OPENAI: "openai",
47
- LOCAL: "local"
47
+ /** In-process ONNX model (default: EmbeddingGemma-300M). */
48
+ LOCAL: "local",
49
+ /** Remote OpenAI-compatible embedding service (pyx-cloud shared, custom, etc.). */
50
+ HTTP: "http"
48
51
  };
49
52
  var StoreTarget = {
50
53
  SQLITE: "sqlite",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pyxmate/memory",
3
- "version": "0.19.0",
3
+ "version": "0.20.4",
4
4
  "type": "module",
5
5
  "description": "SDK for pyx-memory — Memory as a Service for AI agents",
6
6
  "license": "MIT",
@@ -1,23 +1,28 @@
1
1
  ---
2
2
  name: pyx-memory
3
3
  description: >
4
- Persistent memory system for AI agents. Use this skill to store and retrieve
5
- knowledge across conversations via pyx-memory. Triggers whenever you need to
6
- remember something, recall prior context, store a decision or bug fix, ingest
7
- files or images, or search for what was discussed before. Also use when
8
- integrating the pyx-memory SDK into code, working with MemoryClient, or using
9
- the HTTP API. Covers multi-tenant isolation (tenantId, TENANT_MODE),
10
- fine-grained ReBAC (namespaces, principals, authz tuples, AuthzPlan),
11
- sensitivity classification, encryption at rest, and confidence/abstention.
12
- Triggers on: 'remember', 'recall', 'store memory', 'search memory',
13
- 'ingest file', 'store this image', 'remember this document',
14
- 'what did we decide', 'pyx-memory', 'memory', 'MemoryClient',
15
- 'integrate memory', 'memory consolidation', 'multi-tenant',
16
- 'tenant isolation', 'sensitivity', 'encryption', 'confidence',
17
- 'abstention', 'access control', 'RBAC', 'ReBAC', 'Zanzibar',
18
- 'namespace', 'principal', 'authz tuple', 'permission', 'permissions',
19
- 'role', 'role-based access', 'read-only', 'agent isolation',
20
- 'per-agent memory'.
4
+ Persistent memory system for AI agents store and retrieve knowledge across
5
+ conversations via pyx-memory. Use this skill whenever you need to remember
6
+ something for later, recall what was discussed or decided in a prior session,
7
+ search stored memory before assuming, store a decision or bug-fix root cause,
8
+ or ingest files, documents, or images into long-term memory. Also use it for
9
+ the lifecycle and wiki primitives: building a per-entity profile or "wiki
10
+ page" (summarizeEntity / getEntitySynthesis an amortized "tell me about
11
+ X / give me a profile of this customer" synthesis that is computed once and
12
+ reused); browsing a chronological feed of what was added and when (memory
13
+ log "what has the agent learned", "what's new since last week"); linting
14
+ memory health (orphaned graph nodes, stale syntheses, dedup candidates); and
15
+ consolidation, decay, or session summarization. Use it for any integration
16
+ work with the pyx-memory SDK, MemoryClient, or HTTP API — including
17
+ multi-tenant isolation, fine-grained ReBAC (namespaces, principals, authz
18
+ tuples, AuthzPlan), sensitivity classification, encryption at rest, and
19
+ confidence/abstention scoring. Trigger this skill even when the user does
20
+ not say "pyx-memory" by name: phrases like "remember this", "what did we
21
+ decide", "recall earlier context", "store this decision", "search memory",
22
+ "give me a profile of <person/customer>", "summarize everything we know
23
+ about X", "what has the agent learned", or "set up per-agent / per-tenant
24
+ memory isolation" all indicate this skill should be used. When in doubt
25
+ about whether a request involves agent memory, prefer using this skill.
21
26
  allowed-tools: Read, Grep, Glob, Edit, Write, Bash(curl *)
22
27
  argument-hint: "[store|search|ingest] <content or query>"
23
28
  ---
@@ -46,7 +46,7 @@ const client = new MemoryClient('http://localhost:7822', process.env.MEMORY_API_
46
46
  | POST | `/api/memory/graph/query` | Traverse (JSON: `{ nodeId, depth? }`) |
47
47
  | POST | `/api/memory/graph/clear` | Clear all graph nodes and edges (admin) |
48
48
 
49
- ## Lifecycle (9 endpoints)
49
+ ## Lifecycle (13 endpoints)
50
50
 
51
51
  | Method | Endpoint | Description |
52
52
  |--------|----------|-------------|
@@ -59,6 +59,10 @@ const client = new MemoryClient('http://localhost:7822', process.env.MEMORY_API_
59
59
  | GET | `/api/memory/consolidation-log` | Audit trail |
60
60
  | GET | `/api/memory/query-as-of?asOf=...` | Bi-temporal point-in-time query (asOf, type, agentId, source, limit) |
61
61
  | GET | `/api/memory/query-by-event-time?startTime=...&endTime=...` | Bi-temporal event time range query (startTime, endTime, type, agentId, source, limit) |
62
+ | GET | `/api/memory/lint` | Read-only memory-wide lint report — graph orphans, decay candidates, stale syntheses, dedup candidates (v0.18.0) |
63
+ | GET | `/api/memory/log?since=...` | Chronological feed (Karpathy `log.md`). Cursor-style via `since` created_at lower bound; also `limit`, `type`, `agentId`, `source`. Returns `{ entries, count, since? }` (v0.18.1) |
64
+ | POST | `/api/memory/synthesis/entity` | Synthesize a per-entity profile (Karpathy "wiki page"). JSON: `{ name }`. LLM-driven; stores a pinned `_kind:'entity-summary'` entry with `_search_visibility:'on-demand'`. Returns the entry, 201 (v0.19.0) |
65
+ | GET | `/api/memory/synthesis/entity?name=...` | Fetch a previously-synthesized entity profile. Returns `{ entry }` (`null` if none) (v0.19.0) |
62
66
 
63
67
  ## ReBAC Admin (11 endpoints)
64
68
 
@@ -3,7 +3,7 @@
3
3
  ## Contents
4
4
  - Type Cheat Sheet
5
5
  - MemoryInterface (9 methods)
6
- - ExtendedMemoryInterface (6 lifecycle methods)
6
+ - ExtendedMemoryInterface (10 lifecycle methods)
7
7
  - MemoryClient Constructor and Concrete Methods
8
8
  - DashboardClient
9
9
  - MemorySearchResult, MemoryEntry, MemorySearchParams
@@ -62,7 +62,7 @@ interface MemoryInterface {
62
62
  }
63
63
  ```
64
64
 
65
- ## ExtendedMemoryInterface (adds 6 lifecycle methods)
65
+ ## ExtendedMemoryInterface (adds 10 lifecycle methods)
66
66
 
67
67
  ```typescript
68
68
  interface ExtendedMemoryInterface extends MemoryInterface {
@@ -72,9 +72,34 @@ interface ExtendedMemoryInterface extends MemoryInterface {
72
72
  runDecay(): Promise<number>;
73
73
  reindex(): Promise<void>;
74
74
  deleteBySource(source: string): Promise<number>;
75
+ // v0.18.0 — read-only memory-wide lint report (graph orphans, decay
76
+ // candidates, stale syntheses, content-hash dedup candidates).
77
+ lint(options?: { limit?: number }): Promise<WikiLintReport>;
78
+ // v0.18.1 — chronological feed (Karpathy log.md primitive). Cursor-style
79
+ // via `since` (created_at lower bound). No totalCount.
80
+ log(filters?: MemoryLogFilters): Promise<MemoryEntry[]>;
81
+ // v0.19.0 — entity synthesis (Karpathy "wiki page" primitive).
82
+ // summarizeEntity is LLM-driven and caller-triggered; it stores a pinned
83
+ // `_kind:'entity-summary'` entry with `_search_visibility:'on-demand'`
84
+ // (excluded from search). getEntitySynthesis is the O(1) read path.
85
+ summarizeEntity(name: string): Promise<MemoryEntry>;
86
+ getEntitySynthesis(name: string): Promise<MemoryEntry | null>;
75
87
  }
76
88
  ```
77
89
 
90
+ `MemoryLogFilters` = `{ since?: string; limit?: number; type?: MemoryType; agentId?: string; source?: string }`.
91
+
92
+ ### Reserved metadata conventions
93
+
94
+ Some `metadata` keys carry behavior, not just data:
95
+
96
+ | Key | Value | Effect |
97
+ |-----|-------|--------|
98
+ | `_search_visibility` | `'on-demand'` | Entry is excluded from every RAG engine's retrieval pool (v0.18.2 hook). Still reachable via `get` / `list` / `log` and deterministic-id fetch. Field absent ⇒ visible. |
99
+ | `_kind` | `'entity-summary'` | Marks an entity synthesis. `Memory.lint` flags stale ones; the `synthesis:` id prefix is reserved for entries carrying this. |
100
+ | `_sourceEntryIds` | `string[]` | Provenance — the entries a synthesis was built from. |
101
+ | `_maxEventTime` | ISO string \| null | Staleness contract — `lint` flags the synthesis when a source's eventTime later exceeds this. |
102
+
78
103
  ## MemoryClient Constructor and Concrete Methods
79
104
 
80
105
  ```typescript
@@ -100,7 +125,7 @@ Graph queries and file ingestion are available without `@pyx-memory/core`.
100
125
 
101
126
  ```typescript
102
127
  class MemoryClient implements ExtendedMemoryInterface {
103
- // ... all 15 interface methods (9 base + 6 lifecycle) ...
128
+ // ... all 19 interface methods (9 base + 10 lifecycle) ...
104
129
 
105
130
  // Graph operations (call pyx-memory server's graph endpoints)
106
131
  graphNodes(): Promise<GraphNode[]>;