@pyxmate/memory 1.18.0 → 1.18.2

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,6 +1,6 @@
1
1
  import {
2
2
  MemoryClient
3
- } from "./chunk-SLYCVO4C.mjs";
3
+ } from "./chunk-LWFCE4OS.mjs";
4
4
 
5
5
  // ../dashboard/src/aggregations/consolidation-analytics.ts
6
6
  function analyzeConsolidationLog(entries) {
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  assertGraphExtractionPayload,
6
6
  mergeExtractedEntities
7
- } from "./chunk-3OLH3HYR.mjs";
7
+ } from "./chunk-VORP6NHJ.mjs";
8
8
 
9
9
  // ../client/src/disabled-memory.ts
10
10
  var DEFAULT_PAGE_LIMIT = 20;
@@ -150,6 +150,7 @@ var DATA_PLANE_OPERATION_COVERAGE = {
150
150
  },
151
151
  "rest:get_synthesis_entity": { support: "sqlite_atomic_one_step" },
152
152
  "rest:list": { support: "sqlite_atomic_one_step" },
153
+ "rest:insights": { support: "sqlite_atomic_one_step" },
153
154
  "rest:batch_store": {
154
155
  support: "journal_multi_step"
155
156
  },
@@ -166,6 +167,9 @@ var DATA_PLANE_OPERATION_COVERAGE = {
166
167
  "rest:graph_subgraph": {
167
168
  support: "journal_multi_step"
168
169
  },
170
+ "rest:graph_taxonomy": {
171
+ support: "journal_multi_step"
172
+ },
169
173
  "rest:embedding_map": {
170
174
  support: "not_execution_ready",
171
175
  reasonCode: "corpus_dependent_execution_not_ready",
@@ -1003,6 +1007,8 @@ function normalizeSupportedInput(operation, input, context) {
1003
1007
  case "rest:graph_relationships":
1004
1008
  case "rest:graph_subgraph":
1005
1009
  return normalizeGraphRead(input, operation);
1010
+ case "rest:insights":
1011
+ case "rest:graph_taxonomy":
1006
1012
  case "mcp:get_taxonomy_state": {
1007
1013
  const value = requireObject(input, "input");
1008
1014
  requireExactKeys(value, [], "input");
@@ -1334,6 +1340,7 @@ function compileDataPlaneRequest(request) {
1334
1340
  case "rest:graph_nodes":
1335
1341
  case "rest:graph_relationships":
1336
1342
  case "rest:graph_subgraph":
1343
+ case "rest:graph_taxonomy":
1337
1344
  case "mcp:get_taxonomy_state":
1338
1345
  case "mcp:name_cluster":
1339
1346
  return ["graph", "sqlite"];
@@ -10,7 +10,7 @@ import {
10
10
  TAXONOMY_MAX_SAMPLE_TOPICS,
11
11
  TAXONOMY_MAX_TOP_ENTITIES
12
12
  } from "../chunk-KVYCISUI.mjs";
13
- import "../chunk-3OLH3HYR.mjs";
13
+ import "../chunk-VORP6NHJ.mjs";
14
14
 
15
15
  // src/cli/exit-codes.ts
16
16
  var EXIT = {
@@ -540,15 +540,13 @@ async function readSurface(opts) {
540
540
  idempotencyKey: `cli-${opts.surface}-${randomUUID2()}`
541
541
  });
542
542
  if (!response.ok) {
543
- const signedOut = response.status === 401;
544
- return {
545
- ok: false,
546
- exit: signedOut ? EXIT.NOT_LOGGED_IN : EXIT.DOCTOR_FAIL,
547
- state: signedOut ? "signed_out" : "error",
548
- endpoint: credentials.endpoint,
549
- keySource: "keychain",
550
- problem: requestFailure(opts.surface, response.status)
551
- };
543
+ return failedSurfaceRequest(
544
+ opts.surface,
545
+ response.status,
546
+ credentials.endpoint,
547
+ opts.minimumServiceVersion,
548
+ http
549
+ );
552
550
  }
553
551
  const parsed = opts.schema.safeParse(response.data);
554
552
  if (!parsed.success) {
@@ -563,6 +561,55 @@ async function readSurface(opts) {
563
561
  }
564
562
  return { ok: true, endpoint: credentials.endpoint, data: parsed.data };
565
563
  }
564
+ async function failedSurfaceRequest(surface, status, endpoint, minimumServiceVersion, http) {
565
+ if (status === 401) {
566
+ return {
567
+ ok: false,
568
+ exit: EXIT.NOT_LOGGED_IN,
569
+ state: "signed_out",
570
+ endpoint,
571
+ keySource: "keychain",
572
+ problem: requestFailure(surface, status)
573
+ };
574
+ }
575
+ const serviceVersion = minimumServiceVersion ? await probeServiceVersion(http) : null;
576
+ const serviceOutdated = serviceVersion !== null && minimumServiceVersion !== void 0 && isVersionOlder(serviceVersion, minimumServiceVersion);
577
+ return {
578
+ ok: false,
579
+ exit: EXIT.DOCTOR_FAIL,
580
+ state: serviceOutdated ? "service_outdated" : "error",
581
+ endpoint,
582
+ keySource: "keychain",
583
+ problem: serviceOutdated ? `pyx-memory ${surface} requires service ${minimumServiceVersion} or newer; the connected service reports ${serviceVersion}. Update the hosted pyx-memory service or dashboard integration, then retry.` : requestFailure(surface, status)
584
+ };
585
+ }
586
+ async function probeServiceVersion(http) {
587
+ const response = await http.requestJson({ method: "GET", path: "/status" });
588
+ if (!response.ok) return null;
589
+ const payload = plainObject(response.data);
590
+ const topology = plainObject(payload?.success === true ? plainObject(payload.data) : payload);
591
+ const version = payload?.version ?? plainObject(topology?.service)?.version;
592
+ return typeof version === "string" && parseVersion(version) ? version : null;
593
+ }
594
+ function plainObject(value) {
595
+ return value !== null && typeof value === "object" && !Array.isArray(value) ? value : null;
596
+ }
597
+ function isVersionOlder(actual, minimum) {
598
+ const left = parseVersion(actual);
599
+ const right = parseVersion(minimum);
600
+ if (!left || !right) return false;
601
+ if (left.core[0] !== right.core[0]) return left.core[0] < right.core[0];
602
+ if (left.core[1] !== right.core[1]) return left.core[1] < right.core[1];
603
+ if (left.core[2] !== right.core[2]) return left.core[2] < right.core[2];
604
+ return left.prerelease !== null && right.prerelease === null;
605
+ }
606
+ function parseVersion(value) {
607
+ if (value.length > 64) return null;
608
+ const match = /^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?(?:\+[0-9A-Za-z.-]+)?$/.exec(value);
609
+ if (!match) return null;
610
+ const core = [Number(match[1]), Number(match[2]), Number(match[3])];
611
+ return core.every(Number.isSafeInteger) ? { core, prerelease: match[4] ?? null } : null;
612
+ }
566
613
  function requestFailure(surface, status) {
567
614
  if (status === 401) {
568
615
  return "Stored pyx-memory credentials were rejected. Run: pyx-mem login";
@@ -641,6 +688,7 @@ async function insightsCommand(opts = {}) {
641
688
  surface: "insights",
642
689
  request: { method: "GET", path: "/api/memory/insights" },
643
690
  schema: insightsResponseSchema,
691
+ minimumServiceVersion: "1.18.1",
644
692
  keychain: opts.keychain,
645
693
  fetchImpl: opts.fetchImpl
646
694
  });
@@ -1030,7 +1078,7 @@ function createProxyServer(client, version, uploadLocalFile) {
1030
1078
  return server;
1031
1079
  }
1032
1080
  async function runMcpProxyServer(opts) {
1033
- const version = opts.version ?? (true ? "1.18.0" : "0.0.0-dev");
1081
+ const version = opts.version ?? (true ? "1.18.2" : "0.0.0-dev");
1034
1082
  const read = await opts.readCredentials();
1035
1083
  if (!read.ok) {
1036
1084
  const text = read.result.content.map((c) => c.type === "text" ? c.text : "").join(" ").trim();
@@ -2034,6 +2082,7 @@ ${err.guidance}
2034
2082
  // src/cli/commands/taxonomy.ts
2035
2083
  import { z as z3 } from "zod";
2036
2084
  var TAXONOMY_SCHEMA_VERSION = 1;
2085
+ var TAXONOMY_MAX_RETURNED_CATEGORIES = TAXONOMY_MAX_CATEGORIES + 1;
2037
2086
  var taxonomyStateSchema = z3.object({
2038
2087
  clusters: z3.array(
2039
2088
  z3.object({
@@ -2055,7 +2104,7 @@ var taxonomyStateSchema = z3.object({
2055
2104
  })
2056
2105
  ).max(TAXONOMY_MAX_TOP_ENTITIES)
2057
2106
  })
2058
- ).max(TAXONOMY_MAX_CATEGORIES),
2107
+ ).max(TAXONOMY_MAX_RETURNED_CATEGORIES),
2059
2108
  totals: z3.object({
2060
2109
  clusters: z3.number().int().nonnegative(),
2061
2110
  unnamed: z3.number().int().nonnegative(),
@@ -2071,6 +2120,7 @@ async function taxonomyCommand(opts = {}) {
2071
2120
  surface: "taxonomy",
2072
2121
  request: { method: "GET", path: "/api/memory/graph/taxonomy" },
2073
2122
  schema: taxonomyResponseSchema,
2123
+ minimumServiceVersion: "1.18.1",
2074
2124
  keychain: opts.keychain,
2075
2125
  fetchImpl: opts.fetchImpl
2076
2126
  });
@@ -11,10 +11,10 @@ import {
11
11
  toGraphologyFormat,
12
12
  transformGraphData,
13
13
  unreachableHealth
14
- } from "./chunk-ACFPMLNO.mjs";
15
- import "./chunk-SLYCVO4C.mjs";
14
+ } from "./chunk-FIRMGTFX.mjs";
15
+ import "./chunk-LWFCE4OS.mjs";
16
16
  import "./chunk-KVYCISUI.mjs";
17
- import "./chunk-3OLH3HYR.mjs";
17
+ import "./chunk-VORP6NHJ.mjs";
18
18
  export {
19
19
  DashboardClient,
20
20
  Poller,
@@ -111,6 +111,9 @@ declare const DATA_PLANE_OPERATION_COVERAGE: {
111
111
  readonly 'rest:list': {
112
112
  readonly support: "sqlite_atomic_one_step";
113
113
  };
114
+ readonly 'rest:insights': {
115
+ readonly support: "sqlite_atomic_one_step";
116
+ };
114
117
  readonly 'rest:batch_store': {
115
118
  readonly support: "journal_multi_step";
116
119
  };
@@ -129,6 +132,9 @@ declare const DATA_PLANE_OPERATION_COVERAGE: {
129
132
  readonly 'rest:graph_subgraph': {
130
133
  readonly support: "journal_multi_step";
131
134
  };
135
+ readonly 'rest:graph_taxonomy': {
136
+ readonly support: "journal_multi_step";
137
+ };
132
138
  readonly 'rest:embedding_map': {
133
139
  readonly support: "not_execution_ready";
134
140
  readonly reasonCode: "corpus_dependent_execution_not_ready";
@@ -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-fDvTm9bF.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, S as SupportedDataPlaneCatalogOperation, r as canonicalDataPlaneJson, s as compileDataPlaneRequest, t as hashDataPlaneHttpResponseV1, u as hashDataPlaneManifestV1, v as hashDataPlaneStepInputV1 } from './data-plane-contract-CmosA5XV.js';
@@ -13,7 +13,7 @@ import {
13
13
  hashDataPlaneHttpResponseV1,
14
14
  hashDataPlaneManifestV1,
15
15
  hashDataPlaneStepInputV1
16
- } from "./chunk-3OLH3HYR.mjs";
16
+ } from "./chunk-VORP6NHJ.mjs";
17
17
  export {
18
18
  DATA_PLANE_CATALOG_VERSION,
19
19
  DATA_PLANE_COMPILER_LIMITS,
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
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';
2
2
  export { documentContentSource, documentGraphSource, documentImageSource } from '@pyx-memory/shared';
3
- export { e as encodeListCursorToken, p as parseListCursorToken } from './data-plane-contract-fDvTm9bF.js';
3
+ export { e as encodeListCursorToken, p as parseListCursorToken } from './data-plane-contract-CmosA5XV.js';
4
4
 
5
5
  /** Parameters for paginated entry listing. */
6
6
  interface MemoryListParams {
package/dist/index.mjs CHANGED
@@ -2,7 +2,7 @@ import {
2
2
  DisabledMemory,
3
3
  MemoryClient,
4
4
  MemoryServerError
5
- } from "./chunk-SLYCVO4C.mjs";
5
+ } from "./chunk-LWFCE4OS.mjs";
6
6
  import {
7
7
  DEFAULTS,
8
8
  DEPRECATED_RAG_STRATEGIES,
@@ -35,7 +35,7 @@ import {
35
35
  normalizeGraphLabel,
36
36
  normalizeNameKey,
37
37
  parseListCursorToken
38
- } from "./chunk-3OLH3HYR.mjs";
38
+ } from "./chunk-VORP6NHJ.mjs";
39
39
 
40
40
  // src/preset.ts
41
41
  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-ACFPMLNO.mjs";
15
- import "./chunk-SLYCVO4C.mjs";
14
+ } from "./chunk-FIRMGTFX.mjs";
15
+ import "./chunk-LWFCE4OS.mjs";
16
16
  import "./chunk-KVYCISUI.mjs";
17
- import "./chunk-3OLH3HYR.mjs";
17
+ import "./chunk-VORP6NHJ.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.18.0",
3
+ "version": "1.18.2",
4
4
  "type": "module",
5
5
  "description": "SDK for pyx-memory — Memory as a Service for AI agents",
6
6
  "license": "MIT",