@pyxmate/memory 0.24.0 → 0.24.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.
@@ -101,6 +101,18 @@ var MemoryClient = class {
101
101
  const stats = await this.fetchApi("/api/memory/stats");
102
102
  return { ...stats, connected: true };
103
103
  }
104
+ /**
105
+ * Fetch the running server's topology snapshot (build variant, declared
106
+ * role, embedding location, active model profile). Round-trips the
107
+ * server's `GET /status` envelope through {@link fetchApi}, surfacing any
108
+ * non-success response as {@link MemoryServerError}. Auth-header
109
+ * forwarding is unchanged from other client methods even though `/status`
110
+ * is server-side public — the server simply ignores credentials on that
111
+ * route.
112
+ */
113
+ async status() {
114
+ return this.fetchApi("/status");
115
+ }
104
116
  async shutdown() {
105
117
  }
106
118
  async list(params = {}) {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  MemoryClient
3
- } from "./chunk-D5PMQYZM.mjs";
3
+ } from "./chunk-CCGW6QRX.mjs";
4
4
 
5
5
  // ../dashboard/src/aggregations/consolidation-analytics.ts
6
6
  function analyzeConsolidationLog(entries) {
@@ -15343,6 +15343,25 @@ var searchMemoriesTool = {
15343
15343
  }
15344
15344
  };
15345
15345
 
15346
+ // src/mcp/tools/status.ts
15347
+ var inputShape6 = {};
15348
+ var statusTool = {
15349
+ name: "status",
15350
+ config: {
15351
+ title: "Get pyx-memory topology",
15352
+ description: "Fetch the running pyx-memory server topology: build variant (cloud|full), declared deployment role, server version, embedding location (inline|remote), and active model profile. HTTP proxy to GET /status \u2014 no in-process branch.",
15353
+ inputSchema: inputShape6,
15354
+ annotations: { readOnlyHint: true, openWorldHint: true }
15355
+ },
15356
+ handler: (deps) => async () => {
15357
+ const creds = await deps.readCredentials();
15358
+ if (!creds.ok) return creds.result;
15359
+ const http = createHttpClient(creds.credentials, deps.fetchImpl);
15360
+ const res = await http.requestJson({ method: "GET", path: "/status" });
15361
+ return res.ok ? mcpJson(res.data) : res.result;
15362
+ }
15363
+ };
15364
+
15346
15365
  // src/mcp/tools/store.ts
15347
15366
  var entityTypes = ["PERSON", "ORGANIZATION", "CONCEPT", "TOOL", "LOCATION", "EVENT"];
15348
15367
  var relationshipTypes = [
@@ -15356,7 +15375,7 @@ var relationshipTypes = [
15356
15375
  "WORKS_AT",
15357
15376
  "LOCATED_IN"
15358
15377
  ];
15359
- var inputShape6 = {
15378
+ var inputShape7 = {
15360
15379
  content: external_exports.string().min(1).describe("Concise factual statement to persist; decision, not deliberation."),
15361
15380
  topic: external_exports.string().min(1).describe("Required metadata.topic for retrieval grouping."),
15362
15381
  project: external_exports.string().min(1).describe("Required metadata.project namespace."),
@@ -15387,7 +15406,7 @@ var storeMemoryTool = {
15387
15406
  config: {
15388
15407
  title: "Store pyx-memory entry",
15389
15408
  description: "Store one concise factual memory with required topic and project metadata. Provide entities/relationships when content names people, tools, orgs, locations, or events.",
15390
- inputSchema: inputShape6,
15409
+ inputSchema: inputShape7,
15391
15410
  annotations: { readOnlyHint: false, idempotentHint: false, openWorldHint: true }
15392
15411
  },
15393
15412
  handler: (deps) => async (raw) => {
@@ -15422,7 +15441,7 @@ var storeMemoryTool = {
15422
15441
  };
15423
15442
 
15424
15443
  // src/mcp/tools/summarize.ts
15425
- var inputShape7 = {
15444
+ var inputShape8 = {
15426
15445
  entityName: external_exports.string().min(1).describe(
15427
15446
  "Entity name to synthesize a profile for (PERSON, ORG, CONCEPT, TOOL, LOCATION, EVENT)."
15428
15447
  ),
@@ -15437,7 +15456,7 @@ var summarizeMemoryEntityTool = {
15437
15456
  config: {
15438
15457
  title: "Synthesize pyx-memory entity",
15439
15458
  description: "Fetch or refresh a reusable synthesis/profile for an entity (person, customer, project, tool, organization). Default fetches existing; set refresh:true to rebuild.",
15440
- inputSchema: inputShape7,
15459
+ inputSchema: inputShape8,
15441
15460
  annotations: { readOnlyHint: false, idempotentHint: true, openWorldHint: true }
15442
15461
  },
15443
15462
  handler: (deps) => async (raw) => {
@@ -15472,14 +15491,15 @@ var ALL_TOOLS = [
15472
15491
  listMemoriesTool,
15473
15492
  deleteMemoryTool,
15474
15493
  ingestMemoryFileTool,
15475
- summarizeMemoryEntityTool
15494
+ summarizeMemoryEntityTool,
15495
+ statusTool
15476
15496
  ];
15477
15497
  var ALL_TOOL_NAMES = ALL_TOOLS.map((t) => t.name);
15478
15498
 
15479
15499
  // src/mcp/server.ts
15480
15500
  async function runMcpServer(opts) {
15481
15501
  const fetchImpl = opts.fetchImpl ?? fetch;
15482
- const version2 = opts.version ?? (true ? "0.24.0" : "0.0.0-dev");
15502
+ const version2 = opts.version ?? (true ? "0.24.1" : "0.0.0-dev");
15483
15503
  const server = new McpServer(
15484
15504
  { name: "pyx-memory", version: version2 },
15485
15505
  { instructions: PYX_MEMORY_INSTRUCTIONS, capabilities: { tools: {} } }
@@ -11,8 +11,8 @@ import {
11
11
  toGraphologyFormat,
12
12
  transformGraphData,
13
13
  unreachableHealth
14
- } from "./chunk-4DRKAXJE.mjs";
15
- import "./chunk-D5PMQYZM.mjs";
14
+ } from "./chunk-FSFVD3MB.mjs";
15
+ import "./chunk-CCGW6QRX.mjs";
16
16
  import "./chunk-7P6ASYW6.mjs";
17
17
  export {
18
18
  DashboardClient,
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
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, MemoryStats as MemoryStats$1, WikiLintReport as WikiLintReport$1, ExtractedImageMeta as ExtractedImageMeta$1, IngestEntity as IngestEntity$1, IngestRelationship as IngestRelationship$1, IngestEvent as IngestEvent$1, GraphNode as GraphNode$1, GraphTraversalResult as GraphTraversalResult$1 } from '@pyx-memory/shared';
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, MemoryStats as MemoryStats$1, WikiLintReport as WikiLintReport$1, ExtractedImageMeta as ExtractedImageMeta$1, IngestEntity as IngestEntity$1, IngestRelationship as IngestRelationship$1, Topology as Topology$1, IngestEvent as IngestEvent$1, GraphNode as GraphNode$1, GraphTraversalResult as GraphTraversalResult$1 } from '@pyx-memory/shared';
2
2
 
3
3
  /** Parameters for paginated entry listing. */
4
4
  interface MemoryListParams {
@@ -211,6 +211,16 @@ declare class MemoryClient implements ExtendedMemoryInterface {
211
211
  delete(id: string): Promise<boolean>;
212
212
  clearSession(sessionId: string): Promise<number>;
213
213
  stats(): Promise<MemoryStats$1>;
214
+ /**
215
+ * Fetch the running server's topology snapshot (build variant, declared
216
+ * role, embedding location, active model profile). Round-trips the
217
+ * server's `GET /status` envelope through {@link fetchApi}, surfacing any
218
+ * non-success response as {@link MemoryServerError}. Auth-header
219
+ * forwarding is unchanged from other client methods even though `/status`
220
+ * is server-side public — the server simply ignores credentials on that
221
+ * route.
222
+ */
223
+ status(): Promise<Topology$1>;
214
224
  shutdown(): Promise<void>;
215
225
  list(params?: MemoryListParams): Promise<MemoryListResult>;
216
226
  /**
@@ -323,6 +333,45 @@ interface ApiResponse<T> {
323
333
  data?: T;
324
334
  error?: string;
325
335
  }
336
+ /**
337
+ * Build variant of the running pyx-memory image. Detected from the actual
338
+ * availability of `@huggingface/transformers` at boot — `full` keeps the
339
+ * local-embedding stack bundled, `cloud` has it pruned (EMBEDDING_PROVIDER=http
340
+ * is mandatory). The detected value is authoritative; the optional
341
+ * `PYX_BUILD_VARIANT` env stamp is a sanity check that throws on drift.
342
+ */
343
+ type TopologyServiceVariant = 'cloud' | 'full';
344
+ /**
345
+ * Where embedding work happens. `inline` means the server computes vectors
346
+ * in-process (EMBEDDING_PROVIDER=local); `remote` means it delegates to an
347
+ * HTTP embedding service (EMBEDDING_PROVIDER=http). The endpoint URL itself
348
+ * is internal infrastructure and is intentionally NOT exposed here.
349
+ */
350
+ type TopologyEmbeddingLocation = 'inline' | 'remote';
351
+ /**
352
+ * Public topology snapshot returned by `GET /status`. Reflects actual runtime
353
+ * capability (variant detected from import probe, embedding location derived
354
+ * from configured provider) plus the active embedding profile. Never leaks
355
+ * embedding-service URLs or other infrastructure host fragments — those stay
356
+ * behind the admin surface.
357
+ */
358
+ interface Topology {
359
+ service: {
360
+ variant: TopologyServiceVariant;
361
+ /**
362
+ * Operator-declared role label (`PYX_DEPLOYMENT_ROLE`). Free-form string.
363
+ * Structurally absent from the response when the env var is unset or empty.
364
+ */
365
+ declaredRole?: string;
366
+ version: string;
367
+ };
368
+ embedding: {
369
+ location: TopologyEmbeddingLocation;
370
+ modelKey: string;
371
+ modelId: string;
372
+ dimensions: number;
373
+ };
374
+ }
326
375
 
327
376
  /** ISO 8601 timestamp string */
328
377
  type Timestamp = string;
@@ -907,4 +956,4 @@ interface PrincipalContext {
907
956
  /** Sentinel tenant ID used in single-tenant deployments. */
908
957
  declare const SINGLE_TENANT_ID = "_single";
909
958
 
910
- export { type AgentId, type ApiResponse, type ConsolidationRunResult, DEFAULTS, EmbeddingProviderName, type EnrichmentCallbacks, type ExtendedMemoryInterface, type GraphFailureMode, type GraphNode, type GraphRelationship, type GraphTraversalResult, type IngestEntity, type IngestErrorEvent, type IngestEvent, type IngestFileOptions, type IngestHeartbeatEvent, type IngestProgressEvent, type IngestRelationship, type IngestResultEvent, type IngestStage, type IngestionResult, 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, SINGLE_TENANT_ID, SensitivityLevel, type StoreInput, StoreTarget, type TemporalQueryFilters, type TenantScopeOptions, type Timestamp, VectorProvider, type WikiLintReport };
959
+ export { type AgentId, type ApiResponse, type ConsolidationRunResult, DEFAULTS, EmbeddingProviderName, type EnrichmentCallbacks, type ExtendedMemoryInterface, type GraphFailureMode, type GraphNode, type GraphRelationship, type GraphTraversalResult, type IngestEntity, type IngestErrorEvent, type IngestEvent, type IngestFileOptions, type IngestHeartbeatEvent, type IngestProgressEvent, type IngestRelationship, type IngestResultEvent, type IngestStage, type IngestionResult, 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, SINGLE_TENANT_ID, SensitivityLevel, type StoreInput, StoreTarget, type TemporalQueryFilters, type TenantScopeOptions, type Timestamp, type Topology, type TopologyServiceVariant, VectorProvider, type WikiLintReport };
package/dist/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  MemoryClient,
3
3
  MemoryServerError
4
- } from "./chunk-D5PMQYZM.mjs";
4
+ } from "./chunk-CCGW6QRX.mjs";
5
5
  import "./chunk-7P6ASYW6.mjs";
6
6
 
7
7
  // ../shared/src/constants/defaults.ts
package/dist/react.mjs CHANGED
@@ -11,8 +11,8 @@ import {
11
11
  toGraphologyFormat,
12
12
  transformGraphData,
13
13
  unreachableHealth
14
- } from "./chunk-4DRKAXJE.mjs";
15
- import "./chunk-D5PMQYZM.mjs";
14
+ } from "./chunk-FSFVD3MB.mjs";
15
+ import "./chunk-CCGW6QRX.mjs";
16
16
  import "./chunk-7P6ASYW6.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": "0.24.0",
3
+ "version": "0.24.1",
4
4
  "type": "module",
5
5
  "description": "SDK for pyx-memory — Memory as a Service for AI agents",
6
6
  "license": "MIT",