@pyxmate/memory 1.23.2 → 1.25.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.
@@ -11,10 +11,10 @@ import {
11
11
  toGraphologyFormat,
12
12
  transformGraphData,
13
13
  unreachableHealth
14
- } from "./chunk-7YHCNO3N.mjs";
15
- import "./chunk-SGL73IY5.mjs";
14
+ } from "./chunk-GLQGLTMK.mjs";
15
+ import "./chunk-EHFEPWCL.mjs";
16
16
  import "./chunk-KZKGRND2.mjs";
17
- import "./chunk-C46EE5BH.mjs";
17
+ import "./chunk-VXXRCAKS.mjs";
18
18
  export {
19
19
  DashboardClient,
20
20
  Poller,
@@ -14,6 +14,87 @@ declare const DATA_PLANE_COMPILER_LIMITS: {
14
14
  readonly graphEntities: 1000;
15
15
  readonly graphRelationships: 2000;
16
16
  };
17
+ /**
18
+ * Hosted file ingest protocol v1 (docs/specs/hosted-file-ingest/spec.md). The
19
+ * tenant enforces these absolute caps; the gateway enforces per-plan caps.
20
+ */
21
+ declare const HOSTED_FILE_INGEST_PROTOCOL: {
22
+ readonly version: 1;
23
+ readonly capability: "hosted-file-ingest-v1";
24
+ readonly capabilityHeader: "X-Pyx-Gateway-Capabilities";
25
+ readonly uploadTokenHeader: "X-Pyx-Upload-Token";
26
+ readonly metaKey: "pyx.dev/hosted-file-ingest";
27
+ readonly routeBase: "/api/memory/file-ingests";
28
+ readonly preparationVersion: "pyx-file-prepare-v1";
29
+ };
30
+ declare const HOSTED_FILE_INGEST_LIMITS: {
31
+ readonly maxFileBytes: number;
32
+ readonly maxFilenameBytes: 255;
33
+ readonly maxExtractedUtf8Bytes: number;
34
+ readonly maxChunks: 4096;
35
+ readonly maxChunkUtf8Bytes: number;
36
+ readonly maxPageEntries: 50;
37
+ readonly maxPageEmbeddingUtf8Bytes: number;
38
+ readonly maxPageCanonicalBytes: number;
39
+ readonly maxManifestCanonicalBytes: number;
40
+ readonly uploadTokenTtlMs: number;
41
+ readonly prepareTimeoutMs: number;
42
+ readonly jobTtlMs: number;
43
+ };
44
+ declare const HOSTED_FILE_INGEST_JOB_STATES: readonly ["awaiting_upload", "uploaded", "prepared", "published", "failed", "cancelled", "expired"];
45
+ type HostedFileIngestJobState = (typeof HOSTED_FILE_INGEST_JOB_STATES)[number];
46
+ interface HostedFileIngestPageDescriptor {
47
+ pageIndex: number;
48
+ firstChunkIndex: number;
49
+ chunkCount: number;
50
+ pageSha256: string;
51
+ embeddingInputSha256: string;
52
+ embeddingUnicodeScalars: number;
53
+ embeddingUtf8Bytes: number;
54
+ }
55
+ interface HostedFileIngestManifest {
56
+ manifestSha256: string;
57
+ preparationVersion: string;
58
+ entryCount: number;
59
+ pageCount: number;
60
+ extractedUtf8Bytes: number;
61
+ embeddingUnicodeScalars: number;
62
+ pages: HostedFileIngestPageDescriptor[];
63
+ }
64
+ interface HostedFileIngestJobView {
65
+ jobId: string;
66
+ state: HostedFileIngestJobState;
67
+ filename: string;
68
+ byteLength: number;
69
+ sha256: string;
70
+ expiresAt: string;
71
+ upload?: {
72
+ token: string;
73
+ expiresAt: string;
74
+ };
75
+ manifest?: HostedFileIngestManifest;
76
+ committedPages?: number[];
77
+ publication?: HostedFileIngestPublication;
78
+ error?: {
79
+ code: string;
80
+ message: string;
81
+ };
82
+ }
83
+ interface HostedFileIngestPublication {
84
+ entryCount: number;
85
+ retiredCount: number;
86
+ fileId: string;
87
+ }
88
+ interface HostedFileIngestCommitResult {
89
+ jobId: string;
90
+ pageIndex: number;
91
+ state: 'committed';
92
+ alreadyCommitted: boolean;
93
+ }
94
+ interface HostedFileIngestPublishResult extends HostedFileIngestPublication {
95
+ jobId: string;
96
+ state: 'published';
97
+ }
17
98
  declare const SENSITIVITY_LEVELS: readonly ["public", "internal", "secret"];
18
99
  declare const PRINCIPAL_KINDS: readonly ["api_key", "user"];
19
100
  declare const TENANT_MODES: readonly ["single", "multi"];
@@ -117,6 +198,18 @@ declare const DATA_PLANE_OPERATION_COVERAGE: {
117
198
  readonly 'rest:batch_store': {
118
199
  readonly support: "journal_multi_step";
119
200
  };
201
+ readonly 'rest:file_ingest_begin': {
202
+ readonly support: "journal_multi_step";
203
+ };
204
+ readonly 'rest:file_ingest_prepare': {
205
+ readonly support: "journal_multi_step";
206
+ };
207
+ readonly 'rest:file_ingest_commit': {
208
+ readonly support: "journal_multi_step";
209
+ };
210
+ readonly 'rest:file_ingest_publish': {
211
+ readonly support: "journal_multi_step";
212
+ };
120
213
  readonly 'rest:get': {
121
214
  readonly support: "sqlite_atomic_one_step";
122
215
  };
@@ -243,6 +336,9 @@ declare function parseListCursorToken(token: string): {
243
336
  createdAt: string;
244
337
  id: string;
245
338
  };
339
+ /** The document key of a hosted file: a bare filename, never a path. */
340
+ declare function requireHostedFileIngestFilename(value: unknown, field: string): string;
341
+ declare function normalizeHostedFileIngestPageDescriptor(input: unknown, field: string): HostedFileIngestPageDescriptor;
246
342
  declare function canonicalDataPlaneJson(value: unknown): string;
247
343
  declare function hashDataPlaneStepInputV1(value: unknown): {
248
344
  canonicalJson: string;
@@ -258,5 +354,29 @@ declare function hashDataPlaneManifestV1(value: unknown): {
258
354
  */
259
355
  declare function hashDataPlaneHttpResponseV1(statusCode: number, contentType: string, body: Uint8Array): string;
260
356
  declare function compileDataPlaneRequest(request: CompileDataPlaneRequest): CompileDataPlaneResult;
357
+ /** Strict parse of a tenant job view (begin/prepare responses, proxy + gateway). */
358
+ declare function parseHostedFileIngestJobView(input: unknown): HostedFileIngestJobView;
359
+ declare function parseHostedFileIngestCommitResult(input: unknown): HostedFileIngestCommitResult;
360
+ declare function parseHostedFileIngestPublishResult(input: unknown): HostedFileIngestPublishResult;
361
+ declare const HOSTED_FILE_INGEST_GATEWAY_STATES: readonly ["active", "limit_exceeded", "quota_paused", "published", "failed", "cancel_requested", "cancelled", "expired"];
362
+ type HostedFileIngestGatewayState = (typeof HOSTED_FILE_INGEST_GATEWAY_STATES)[number];
363
+ /** Error codes a client may retry after `Retry-After`; every other failure is surfaced. */
364
+ declare const HOSTED_FILE_INGEST_RETRYABLE_CODES: readonly ["prepare_in_progress", "page_commit_in_progress", "publish_in_progress"];
365
+ /**
366
+ * The gateway's free `authorize` view of one job. Money is in microcents
367
+ * (1 cent = 1,000,000, the gateway wallet unit), as decimal strings.
368
+ */
369
+ interface HostedFileIngestAuthorization {
370
+ jobId: string;
371
+ state: HostedFileIngestGatewayState;
372
+ allocated: boolean;
373
+ revision: number;
374
+ ceilingMicrocents: string | null;
375
+ estimateMicrocents: string | null;
376
+ settledMicrocents: string;
377
+ outstandingMicrocents: string;
378
+ authorized: boolean;
379
+ }
380
+ declare function parseHostedFileIngestAuthorization(input: unknown): HostedFileIngestAuthorization;
261
381
 
262
- export { type CanonicalDataPlaneObject as C, DATA_PLANE_CATALOG_VERSION as D, type SupportedDataPlaneCatalogOperation as S, type CanonicalDataPlaneValue as a, type CompileContext as b, type CompileDataPlaneRequest as c, type CompileDataPlaneResult as d, encodeListCursorToken as e, type CompiledDataPlaneExecutionPlan as f, DATA_PLANE_COMPILER_LIMITS as g, DATA_PLANE_CONTRACT_VERSION as h, DATA_PLANE_HTTP_RESPONSE_FRAME as i, DATA_PLANE_MANIFEST_FRAME as j, DATA_PLANE_MANIFEST_VERSION as k, DATA_PLANE_OPERATION_COVERAGE as l, DATA_PLANE_SEARCH_EMBEDDING_CONTRACT as m, DATA_PLANE_STEP_INPUT_FRAME as n, type DataPlaneCatalogOperation as o, parseListCursorToken as p, type DataPlaneUnsupportedReasonCode as q, canonicalDataPlaneJson as r, compileDataPlaneRequest as s, hashDataPlaneHttpResponseV1 as t, hashDataPlaneManifestV1 as u, hashDataPlaneStepInputV1 as v };
382
+ export { type HostedFileIngestManifest as A, type HostedFileIngestPageDescriptor as B, type CanonicalDataPlaneObject as C, DATA_PLANE_CATALOG_VERSION as D, type HostedFileIngestPublishResult as E, canonicalDataPlaneJson as F, compileDataPlaneRequest as G, HOSTED_FILE_INGEST_GATEWAY_STATES as H, hashDataPlaneHttpResponseV1 as I, hashDataPlaneManifestV1 as J, hashDataPlaneStepInputV1 as K, normalizeHostedFileIngestPageDescriptor as L, parseHostedFileIngestAuthorization as M, parseHostedFileIngestCommitResult as N, parseHostedFileIngestJobView as O, parseHostedFileIngestPublishResult as P, requireHostedFileIngestFilename as Q, type SupportedDataPlaneCatalogOperation as S, type CanonicalDataPlaneValue as a, type CompileContext as b, type CompileDataPlaneRequest as c, type CompileDataPlaneResult as d, encodeListCursorToken as e, type CompiledDataPlaneExecutionPlan as f, DATA_PLANE_COMPILER_LIMITS as g, DATA_PLANE_CONTRACT_VERSION as h, DATA_PLANE_HTTP_RESPONSE_FRAME as i, DATA_PLANE_MANIFEST_FRAME as j, DATA_PLANE_MANIFEST_VERSION as k, DATA_PLANE_OPERATION_COVERAGE as l, DATA_PLANE_SEARCH_EMBEDDING_CONTRACT as m, DATA_PLANE_STEP_INPUT_FRAME as n, type DataPlaneCatalogOperation as o, parseListCursorToken as p, type DataPlaneUnsupportedReasonCode as q, HOSTED_FILE_INGEST_JOB_STATES as r, HOSTED_FILE_INGEST_LIMITS as s, HOSTED_FILE_INGEST_PROTOCOL as t, HOSTED_FILE_INGEST_RETRYABLE_CODES as u, type HostedFileIngestAuthorization as v, type HostedFileIngestCommitResult as w, type HostedFileIngestGatewayState as x, type HostedFileIngestJobState as y, type HostedFileIngestJobView as z };
@@ -1 +1 @@
1
- export { C as CanonicalDataPlaneObject, a as CanonicalDataPlaneValue, b as CompileContext, c as CompileDataPlaneRequest, d as CompileDataPlaneResult, f as CompiledDataPlaneExecutionPlan, D as DATA_PLANE_CATALOG_VERSION, g as DATA_PLANE_COMPILER_LIMITS, h as DATA_PLANE_CONTRACT_VERSION, i as DATA_PLANE_HTTP_RESPONSE_FRAME, j as DATA_PLANE_MANIFEST_FRAME, k as DATA_PLANE_MANIFEST_VERSION, l as DATA_PLANE_OPERATION_COVERAGE, m as DATA_PLANE_SEARCH_EMBEDDING_CONTRACT, n as DATA_PLANE_STEP_INPUT_FRAME, o as DataPlaneCatalogOperation, q as DataPlaneUnsupportedReasonCode, S as SupportedDataPlaneCatalogOperation, r as canonicalDataPlaneJson, s as compileDataPlaneRequest, t as hashDataPlaneHttpResponseV1, u as hashDataPlaneManifestV1, v as hashDataPlaneStepInputV1 } from './data-plane-contract-C5VqxrpF.js';
1
+ export { C as CanonicalDataPlaneObject, a as CanonicalDataPlaneValue, b as CompileContext, c as CompileDataPlaneRequest, d as CompileDataPlaneResult, f as CompiledDataPlaneExecutionPlan, D as DATA_PLANE_CATALOG_VERSION, g as DATA_PLANE_COMPILER_LIMITS, h as DATA_PLANE_CONTRACT_VERSION, i as DATA_PLANE_HTTP_RESPONSE_FRAME, j as DATA_PLANE_MANIFEST_FRAME, k as DATA_PLANE_MANIFEST_VERSION, l as DATA_PLANE_OPERATION_COVERAGE, m as DATA_PLANE_SEARCH_EMBEDDING_CONTRACT, n as DATA_PLANE_STEP_INPUT_FRAME, o as DataPlaneCatalogOperation, q as DataPlaneUnsupportedReasonCode, H as HOSTED_FILE_INGEST_GATEWAY_STATES, r as HOSTED_FILE_INGEST_JOB_STATES, s as HOSTED_FILE_INGEST_LIMITS, t as HOSTED_FILE_INGEST_PROTOCOL, u as HOSTED_FILE_INGEST_RETRYABLE_CODES, v as HostedFileIngestAuthorization, w as HostedFileIngestCommitResult, x as HostedFileIngestGatewayState, y as HostedFileIngestJobState, z as HostedFileIngestJobView, A as HostedFileIngestManifest, B as HostedFileIngestPageDescriptor, E as HostedFileIngestPublishResult, S as SupportedDataPlaneCatalogOperation, F as canonicalDataPlaneJson, G as compileDataPlaneRequest, I as hashDataPlaneHttpResponseV1, J as hashDataPlaneManifestV1, K as hashDataPlaneStepInputV1, L as normalizeHostedFileIngestPageDescriptor, M as parseHostedFileIngestAuthorization, N as parseHostedFileIngestCommitResult, O as parseHostedFileIngestJobView, P as parseHostedFileIngestPublishResult, Q as requireHostedFileIngestFilename } from './data-plane-contract-CGU0qjv4.js';
@@ -1,3 +1,4 @@
1
+ import "./chunk-6EEEOV6B.mjs";
1
2
  import {
2
3
  DATA_PLANE_CATALOG_VERSION,
3
4
  DATA_PLANE_COMPILER_LIMITS,
@@ -8,12 +9,23 @@ import {
8
9
  DATA_PLANE_OPERATION_COVERAGE,
9
10
  DATA_PLANE_SEARCH_EMBEDDING_CONTRACT,
10
11
  DATA_PLANE_STEP_INPUT_FRAME,
12
+ HOSTED_FILE_INGEST_GATEWAY_STATES,
13
+ HOSTED_FILE_INGEST_JOB_STATES,
14
+ HOSTED_FILE_INGEST_LIMITS,
15
+ HOSTED_FILE_INGEST_PROTOCOL,
16
+ HOSTED_FILE_INGEST_RETRYABLE_CODES,
11
17
  canonicalDataPlaneJson,
12
18
  compileDataPlaneRequest,
13
19
  hashDataPlaneHttpResponseV1,
14
20
  hashDataPlaneManifestV1,
15
- hashDataPlaneStepInputV1
16
- } from "./chunk-C46EE5BH.mjs";
21
+ hashDataPlaneStepInputV1,
22
+ normalizeHostedFileIngestPageDescriptor,
23
+ parseHostedFileIngestAuthorization,
24
+ parseHostedFileIngestCommitResult,
25
+ parseHostedFileIngestJobView,
26
+ parseHostedFileIngestPublishResult,
27
+ requireHostedFileIngestFilename
28
+ } from "./chunk-VXXRCAKS.mjs";
17
29
  export {
18
30
  DATA_PLANE_CATALOG_VERSION,
19
31
  DATA_PLANE_COMPILER_LIMITS,
@@ -24,9 +36,20 @@ export {
24
36
  DATA_PLANE_OPERATION_COVERAGE,
25
37
  DATA_PLANE_SEARCH_EMBEDDING_CONTRACT,
26
38
  DATA_PLANE_STEP_INPUT_FRAME,
39
+ HOSTED_FILE_INGEST_GATEWAY_STATES,
40
+ HOSTED_FILE_INGEST_JOB_STATES,
41
+ HOSTED_FILE_INGEST_LIMITS,
42
+ HOSTED_FILE_INGEST_PROTOCOL,
43
+ HOSTED_FILE_INGEST_RETRYABLE_CODES,
27
44
  canonicalDataPlaneJson,
28
45
  compileDataPlaneRequest,
29
46
  hashDataPlaneHttpResponseV1,
30
47
  hashDataPlaneManifestV1,
31
- hashDataPlaneStepInputV1
48
+ hashDataPlaneStepInputV1,
49
+ normalizeHostedFileIngestPageDescriptor,
50
+ parseHostedFileIngestAuthorization,
51
+ parseHostedFileIngestCommitResult,
52
+ parseHostedFileIngestJobView,
53
+ parseHostedFileIngestPublishResult,
54
+ requireHostedFileIngestFilename
32
55
  };
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { StoreInput as StoreInput$1, MemoryEntry as MemoryEntry$1, MemorySearchParams as MemorySearchParams$1, MemorySearchResult as MemorySearchResult$1, MemoryType as MemoryType$1, PrincipalContext as PrincipalContext$1, SensitivityLevel as SensitivityLevel$1, MemoryStats as MemoryStats$1, MemoryInsights as MemoryInsights$1, LineageParams as LineageParams$1, LineageResult as LineageResult$1, ReinforceParams as ReinforceParams$1, ReinforceResult as ReinforceResult$1, WikiLintReport as WikiLintReport$1, GraphRepairResult as GraphRepairResult$1, ExtractedImageMeta as ExtractedImageMeta$1, IngestEntity as IngestEntity$1, IngestRelationship as IngestRelationship$1, EntityExtractionResult as EntityExtractionResult$1, Topology as Topology$1, IngestEvent as IngestEvent$1, GraphEnrichEvent as GraphEnrichEvent$1, GraphNode as GraphNode$1, GraphTraversalResult as GraphTraversalResult$1, CorrectionRecord as CorrectionRecord$1 } from '@pyx-memory/shared';
1
+ import { MemoryType as MemoryType$1, StoreInput as StoreInput$1, MemoryEntry as MemoryEntry$1, MemorySearchParams as MemorySearchParams$1, MemorySearchResult as MemorySearchResult$1, PrincipalContext as PrincipalContext$1, SensitivityLevel as SensitivityLevel$1, MemoryStats as MemoryStats$1, MemoryInsights as MemoryInsights$1, LineageParams as LineageParams$1, LineageResult as LineageResult$1, ReinforceParams as ReinforceParams$1, ReinforceResult as ReinforceResult$1, WikiLintReport as WikiLintReport$1, GraphRepairResult as GraphRepairResult$1, ExtractedImageMeta as ExtractedImageMeta$1, IngestEntity as IngestEntity$1, IngestRelationship as IngestRelationship$1, EntityExtractionResult as EntityExtractionResult$1, Topology as Topology$1, IngestEvent as IngestEvent$1, GraphEnrichEvent as GraphEnrichEvent$1, GraphNode as GraphNode$1, GraphTraversalResult as GraphTraversalResult$1, CorrectionRecord as CorrectionRecord$1 } from '@pyx-memory/shared';
2
2
  export { documentContentSource, documentGraphSource, documentImageSource } from '@pyx-memory/shared';
3
- export { e as encodeListCursorToken, p as parseListCursorToken } from './data-plane-contract-C5VqxrpF.js';
3
+ export { e as encodeListCursorToken, p as parseListCursorToken } from './data-plane-contract-CGU0qjv4.js';
4
4
 
5
5
  /** ISO 8601 timestamp string */
6
6
  type Timestamp = string;
@@ -204,8 +204,8 @@ interface MemoryEntry {
204
204
  * UPDATE replaced this one during consolidation. `'archived'` (1b) means decay
205
205
  * retired it (no successor) — kept, strength 0, `deep`-tier only. All three
206
206
  * are kept (history / lineage / deep recall) but `superseded`/`archived` are
207
- * excluded from default/quick/medium search. Only `forget()` and exact-byte-
208
- * duplicate collapse hard-delete. See `docs/H8-MEMORY-MODEL-DESIGN.md`.
207
+ * excluded from default/quick/medium search. Only `forget()` hard-deletes.
208
+ * See `docs/H8-MEMORY-MODEL-DESIGN.md`.
209
209
  */
210
210
  status?: 'active' | 'superseded' | 'archived';
211
211
  /**
@@ -966,12 +966,70 @@ interface MemoryInterface {
966
966
  queryByEventTime(startTime: string, endTime: string, filters?: TemporalQueryFilters): Promise<MemoryEntry$1[]>;
967
967
  shutdown(): Promise<void>;
968
968
  }
969
+ /** One side of a {@link ConsolidationPair}, as a judge needs to read it. */
970
+ interface ConsolidationPairSide {
971
+ content: string;
972
+ source?: string;
973
+ metadata: Record<string, unknown>;
974
+ agentId?: string;
975
+ createdAt: string;
976
+ eventTime?: string;
977
+ }
978
+ /**
979
+ * Two active, unpinned, unencrypted rows of the same tenant, namespace and type
980
+ * that consolidation proposes to merge: equal content hash (`exact`) or cosine
981
+ * above 0.9. A merge supersedes `olderId` by `newerId` (by eventTime, else createdAt).
982
+ */
983
+ interface ConsolidationPair {
984
+ olderId: string;
985
+ newerId: string;
986
+ /** null for rows written before content hashing; a caller judge cannot merge those. */
987
+ olderHash: string | null;
988
+ newerHash: string | null;
989
+ exact: boolean;
990
+ cosine: number;
991
+ type: MemoryType$1;
992
+ namespaceId: string | null;
993
+ older: ConsolidationPairSide;
994
+ newer: ConsolidationPairSide;
995
+ }
996
+ /** A pair the caller's judge decided to merge; the hashes are the pair's, so a changed row is refused. */
997
+ interface ConsolidationMerge {
998
+ olderId: string;
999
+ newerId: string;
1000
+ olderHash: string;
1001
+ newerHash: string;
1002
+ }
1003
+ /** What `POST /api/memory/consolidate/judgements` applied. */
1004
+ interface ConsolidationJudgementsResult {
1005
+ /** Older ids now superseded by their newer partner. */
1006
+ merged: string[];
1007
+ /** Merges refused because the pair no longer holds; nothing changed for them. */
1008
+ rejected: Array<ConsolidationMerge & {
1009
+ reason: string;
1010
+ }>;
1011
+ /** Superseded rows whose vector status sync failed; default search still hides them. */
1012
+ vectorFailures: Array<{
1013
+ entryId: string;
1014
+ error: string;
1015
+ }>;
1016
+ }
969
1017
  /** Consolidation run result. */
970
1018
  interface ConsolidationRunResult {
971
1019
  entriesProcessed: number;
1020
+ /** Supersessions this run; consolidation never deletes. */
972
1021
  entriesMerged: number;
973
1022
  entriesArchived: number;
974
1023
  durationMs: number;
1024
+ /** Proposed pairs by kind; only a judge turns a pair into a merge. */
1025
+ pairsExact: number;
1026
+ pairsNear: number;
1027
+ /** Who judged the pairs: the server's LLM, the caller, or nobody (nothing merges). */
1028
+ judge: 'llm' | 'caller' | 'none';
1029
+ /** The proposed pairs, returned only to a caller judge. */
1030
+ pairs?: ConsolidationPair[];
1031
+ /** `MemoryClient.consolidate({ judge })` only: what applying the judge's merges did. */
1032
+ judgements?: ConsolidationJudgementsResult;
975
1033
  }
976
1034
  /** Extended interface with lifecycle operations. Non-breaking for existing consumers. */
977
1035
  interface ExtendedMemoryInterface extends MemoryInterface {
@@ -1345,7 +1403,16 @@ declare class MemoryClient implements ExtendedMemoryInterface {
1345
1403
  nodeId: string;
1346
1404
  depth?: number;
1347
1405
  }): Promise<GraphTraversalResult$1>;
1348
- consolidate(): Promise<ConsolidationRunResult>;
1406
+ /**
1407
+ * Without `judge` the server's own judge decides (none on a plain server, so
1408
+ * nothing merges). With `judge`, the server only proposes pairs; `judge`
1409
+ * returns the ones to merge and only those merges are posted. If `judge`
1410
+ * throws, nothing is posted and the call rejects. A server without caller
1411
+ * judging answers 404 and changes nothing.
1412
+ */
1413
+ consolidate(options?: {
1414
+ judge?: (pairs: ConsolidationPair[]) => Promise<ConsolidationMerge[]>;
1415
+ }): Promise<ConsolidationRunResult>;
1349
1416
  forget(id: string, reason?: string): Promise<boolean>;
1350
1417
  summarizeSession(sessionId: string): Promise<MemoryEntry$1 | null>;
1351
1418
  lint(options?: {
@@ -1936,4 +2003,4 @@ interface CreatePyxMemoryOptions {
1936
2003
  }
1937
2004
  declare function createPyxMemory(opts?: CreatePyxMemoryOptions): MemoryClient;
1938
2005
 
1939
- export { type AgentId, type ApiResponse, type ConsolidationRunResult, type CorrectionInput, type CorrectionRecord, type CreatePyxMemoryOptions, DEFAULTS, DEPRECATED_RAG_STRATEGIES, DisabledMemory, type DroppedGraphRelationship, type DueScanInput, EmbeddingProviderName, type EnrichmentCallbacks, type EnrichmentPurpose, type EntityExtractionResult, type ExpandAnchorStatus, type ExpandParams, type ExpandResult, type ExtendedMemoryInterface, type FetchCorrectionsInput, type FileDownloadOptions, type GraphEnrichEvent, type GraphEnrichFileOptions, type GraphEnrichPreparedEvent, type GraphEnrichResult, type GraphEnrichResultEvent, type GraphEnrichment, type GraphEnrichmentStatus, type GraphExtractionPayload, 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, MEMORY_PROJECT_LABEL_MAX_CHARS, MemoryClient, type MemoryClientOptions, type MemoryEntry, type MemoryIngestRequest, type MemoryInsightMetrics, type MemoryInsights, type MemoryInterface, type MemoryListParams, type MemoryListResult, type MemoryLogFilters, type MemoryProjectInsight, 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, SESSION_ORDINAL_MAX, SINGLE_TENANT_ID, type SecretElevationAggregate, type SecretElevationNotice, SensitivityLevel, type SourceEvidence, type StoreInput, StoreTarget, TAXONOMY_MAX_CATEGORIES, TAXONOMY_MAX_PROJECTS, TAXONOMY_MAX_SAMPLE_TOPICS, TAXONOMY_MAX_TOP_ENTITIES, type TemporalQueryFilters, type TenantScopeOptions, type Timestamp, type Topology, type TopologyExtractionProvider, type TopologyServiceVariant, type UsageHygieneSnapshot, VectorProvider, type VectorStatus, type WikiLintReport, assertGraphExtractionPayload, createPyxMemory, isSessionOrdinal, mergeExtractedEntities, normalizeGraphLabel, normalizeNameKey, projectSearchResponseForMcp, secretElevationAggregate, secretElevationNoticeFor, withSecretElevationNotice };
2006
+ export { type AgentId, type ApiResponse, type ConsolidationJudgementsResult, type ConsolidationMerge, type ConsolidationPair, type ConsolidationPairSide, type ConsolidationRunResult, type CorrectionInput, type CorrectionRecord, type CreatePyxMemoryOptions, DEFAULTS, DEPRECATED_RAG_STRATEGIES, DisabledMemory, type DroppedGraphRelationship, type DueScanInput, EmbeddingProviderName, type EnrichmentCallbacks, type EnrichmentPurpose, type EntityExtractionResult, type ExpandAnchorStatus, type ExpandParams, type ExpandResult, type ExtendedMemoryInterface, type FetchCorrectionsInput, type FileDownloadOptions, type GraphEnrichEvent, type GraphEnrichFileOptions, type GraphEnrichPreparedEvent, type GraphEnrichResult, type GraphEnrichResultEvent, type GraphEnrichment, type GraphEnrichmentStatus, type GraphExtractionPayload, 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, MEMORY_PROJECT_LABEL_MAX_CHARS, MemoryClient, type MemoryClientOptions, type MemoryEntry, type MemoryIngestRequest, type MemoryInsightMetrics, type MemoryInsights, type MemoryInterface, type MemoryListParams, type MemoryListResult, type MemoryLogFilters, type MemoryProjectInsight, 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, SESSION_ORDINAL_MAX, SINGLE_TENANT_ID, type SecretElevationAggregate, type SecretElevationNotice, SensitivityLevel, type SourceEvidence, type StoreInput, StoreTarget, TAXONOMY_MAX_CATEGORIES, TAXONOMY_MAX_PROJECTS, TAXONOMY_MAX_SAMPLE_TOPICS, TAXONOMY_MAX_TOP_ENTITIES, type TemporalQueryFilters, type TenantScopeOptions, type Timestamp, type Topology, type TopologyExtractionProvider, type TopologyServiceVariant, type UsageHygieneSnapshot, VectorProvider, type VectorStatus, type WikiLintReport, assertGraphExtractionPayload, createPyxMemory, isSessionOrdinal, mergeExtractedEntities, normalizeGraphLabel, normalizeNameKey, projectSearchResponseForMcp, secretElevationAggregate, secretElevationNoticeFor, withSecretElevationNotice };
package/dist/index.mjs CHANGED
@@ -2,7 +2,7 @@ import {
2
2
  DisabledMemory,
3
3
  MemoryClient,
4
4
  MemoryServerError
5
- } from "./chunk-SGL73IY5.mjs";
5
+ } from "./chunk-EHFEPWCL.mjs";
6
6
  import {
7
7
  DEFAULTS,
8
8
  MEMORY_PROJECT_LABEL_MAX_CHARS,
@@ -37,7 +37,7 @@ import {
37
37
  normalizeGraphLabel,
38
38
  normalizeNameKey,
39
39
  parseListCursorToken
40
- } from "./chunk-C46EE5BH.mjs";
40
+ } from "./chunk-VXXRCAKS.mjs";
41
41
 
42
42
  // src/preset.ts
43
43
  var DEFAULT_MEMORY_URL = `http://localhost:${DEFAULTS.MEMORY_SERVER_PORT}`;
package/dist/react.mjs CHANGED
@@ -11,10 +11,10 @@ import {
11
11
  toGraphologyFormat,
12
12
  transformGraphData,
13
13
  unreachableHealth
14
- } from "./chunk-7YHCNO3N.mjs";
15
- import "./chunk-SGL73IY5.mjs";
14
+ } from "./chunk-GLQGLTMK.mjs";
15
+ import "./chunk-EHFEPWCL.mjs";
16
16
  import "./chunk-KZKGRND2.mjs";
17
- import "./chunk-C46EE5BH.mjs";
17
+ import "./chunk-VXXRCAKS.mjs";
18
18
 
19
19
  // ../dashboard/src/hooks/use-consolidation-log.ts
20
20
  import { useCallback as useCallback2, useMemo } from "react";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pyxmate/memory",
3
- "version": "1.23.2",
3
+ "version": "1.25.0",
4
4
  "type": "module",
5
5
  "description": "SDK for pyx-memory — Memory as a Service for AI agents",
6
6
  "license": "MIT",