@pyxmate/memory 1.10.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.
- package/dist/agent-contract.d.ts +2 -2
- package/dist/agent-contract.mjs +1 -1
- package/dist/{chunk-BS6K64SA.mjs → chunk-5BLT7RSY.mjs} +2 -0
- package/dist/{chunk-MZF55IUR.mjs → chunk-HOBDPIHO.mjs} +1 -1
- package/dist/{chunk-AXH45N7T.mjs → chunk-OUSGU272.mjs} +15 -12
- package/dist/cli/pyx-mem.mjs +3 -3
- package/dist/dashboard.mjs +2 -2
- package/dist/index.d.ts +6 -1
- package/dist/index.mjs +3 -1
- package/dist/react.mjs +2 -2
- package/package.json +1 -1
package/dist/agent-contract.d.ts
CHANGED
|
@@ -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).
|
|
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).
|
|
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.";
|
package/dist/agent-contract.mjs
CHANGED
|
@@ -4,6 +4,7 @@ var DEFAULTS = {
|
|
|
4
4
|
VECTOR_PROVIDER: "lancedb",
|
|
5
5
|
MEMORY_SERVER_PORT: 7822
|
|
6
6
|
};
|
|
7
|
+
var TAXONOMY_MAX_CATEGORIES = 10;
|
|
7
8
|
|
|
8
9
|
// ../shared/src/graph/extraction.ts
|
|
9
10
|
function normalizeGraphLabel(value, fallback) {
|
|
@@ -973,6 +974,7 @@ var MemoryClient = class {
|
|
|
973
974
|
|
|
974
975
|
export {
|
|
975
976
|
DEFAULTS,
|
|
977
|
+
TAXONOMY_MAX_CATEGORIES,
|
|
976
978
|
normalizeGraphLabel,
|
|
977
979
|
normalizeNameKey,
|
|
978
980
|
mergeExtractedEntities,
|
|
@@ -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"
|
|
15
|
-
"- Match search `effort` to risk: use `quick` for routine recall; use `deep` when quick returns nothing,
|
|
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
|
|
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
|
|
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,12 +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
|
|
38
|
-
'- Pass `eventTime` (ISO-8601, when the fact happened or took effect) for facts that can change or go stale
|
|
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).
|
|
40
|
-
'- Use specific durable entities
|
|
41
|
-
'- For countable categories the user may later enumerate
|
|
42
|
-
"-
|
|
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.",
|
|
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.',
|
|
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.",
|
|
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.',
|
|
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"`).',
|
|
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."
|
|
43
46
|
].join("\n");
|
|
44
47
|
function buildDesignGuide({ appName }) {
|
|
45
48
|
const name = appName.trim() || "your app";
|
|
@@ -100,8 +103,8 @@ var AGENT_TARGETS = [
|
|
|
100
103
|
instructionsFile: "that tool's user-scope (global) instructions/rules file"
|
|
101
104
|
}
|
|
102
105
|
];
|
|
103
|
-
var STORE_ENTITIES_DESC = 'Named entities mentioned by the content. Pass entities and relationships when you can (caller-wins).
|
|
104
|
-
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).
|
|
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.';
|
|
105
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.";
|
|
106
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.';
|
|
107
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.";
|
package/dist/cli/pyx-mem.mjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
PERSISTENT_MEMORY_SECTION,
|
|
4
4
|
buildDesignGuide
|
|
5
|
-
} from "../chunk-
|
|
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
|
|
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.
|
|
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/dist/dashboard.mjs
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -486,6 +486,7 @@ declare const DEFAULTS: {
|
|
|
486
486
|
readonly VECTOR_PROVIDER: "lancedb";
|
|
487
487
|
readonly MEMORY_SERVER_PORT: 7822;
|
|
488
488
|
};
|
|
489
|
+
declare const TAXONOMY_MAX_CATEGORIES = 10;
|
|
489
490
|
|
|
490
491
|
/** ISO 8601 timestamp string */
|
|
491
492
|
type Timestamp = string;
|
|
@@ -1046,6 +1047,10 @@ interface UsageHygieneSnapshot {
|
|
|
1046
1047
|
searchesZeroResults: number;
|
|
1047
1048
|
/** Total Memory.reinforce calls observed since boot. */
|
|
1048
1049
|
reinforceTotal: number;
|
|
1050
|
+
/** Total get_taxonomy_state (Memory.getTaxonomyState) calls observed since boot. */
|
|
1051
|
+
taxonomyStateReadsTotal: number;
|
|
1052
|
+
/** Total name_cluster (Memory.nameCluster) calls observed since boot. */
|
|
1053
|
+
nameClusterCallsTotal: number;
|
|
1049
1054
|
/** Reinforce calls by signal value. */
|
|
1050
1055
|
reinforceBySignal: Record<string, number>;
|
|
1051
1056
|
/** Sessions where at least one search happened before the first store. */
|
|
@@ -1513,4 +1518,4 @@ interface CreatePyxMemoryOptions {
|
|
|
1513
1518
|
}
|
|
1514
1519
|
declare function createPyxMemory(opts?: CreatePyxMemoryOptions): MemoryClient;
|
|
1515
1520
|
|
|
1516
|
-
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 GraphTelemetrySnapshot, 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, type UsageHygieneSnapshot, VectorProvider, type VectorStatus, type WikiLintReport, createPyxMemory, mergeExtractedEntities, normalizeGraphLabel, normalizeNameKey };
|
|
1521
|
+
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 GraphTelemetrySnapshot, 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, TAXONOMY_MAX_CATEGORIES, type TemporalQueryFilters, type TenantScopeOptions, type Timestamp, type Topology, type TopologyExtractionProvider, type TopologyServiceVariant, type UsageHygieneSnapshot, VectorProvider, type VectorStatus, type WikiLintReport, createPyxMemory, mergeExtractedEntities, normalizeGraphLabel, normalizeNameKey };
|
package/dist/index.mjs
CHANGED
|
@@ -12,11 +12,12 @@ import {
|
|
|
12
12
|
SINGLE_TENANT_ID,
|
|
13
13
|
SensitivityLevel,
|
|
14
14
|
StoreTarget,
|
|
15
|
+
TAXONOMY_MAX_CATEGORIES,
|
|
15
16
|
VectorProvider,
|
|
16
17
|
mergeExtractedEntities,
|
|
17
18
|
normalizeGraphLabel,
|
|
18
19
|
normalizeNameKey
|
|
19
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-5BLT7RSY.mjs";
|
|
20
21
|
|
|
21
22
|
// src/preset.ts
|
|
22
23
|
var DEFAULT_MEMORY_URL = `http://localhost:${DEFAULTS.MEMORY_SERVER_PORT}`;
|
|
@@ -45,6 +46,7 @@ export {
|
|
|
45
46
|
SINGLE_TENANT_ID,
|
|
46
47
|
SensitivityLevel,
|
|
47
48
|
StoreTarget,
|
|
49
|
+
TAXONOMY_MAX_CATEGORIES,
|
|
48
50
|
VectorProvider,
|
|
49
51
|
createPyxMemory,
|
|
50
52
|
mergeExtractedEntities,
|
package/dist/react.mjs
CHANGED
|
@@ -11,8 +11,8 @@ import {
|
|
|
11
11
|
toGraphologyFormat,
|
|
12
12
|
transformGraphData,
|
|
13
13
|
unreachableHealth
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-HOBDPIHO.mjs";
|
|
15
|
+
import "./chunk-5BLT7RSY.mjs";
|
|
16
16
|
|
|
17
17
|
// ../dashboard/src/hooks/use-consolidation-log.ts
|
|
18
18
|
import { useCallback as useCallback2, useMemo } from "react";
|