@pyxmate/memory 1.17.13 → 1.17.15

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.
@@ -62,6 +62,40 @@ function projectSearchResponseForMcp(payload) {
62
62
  return projectSearchResultRecord(payload);
63
63
  }
64
64
 
65
+ // ../shared/src/mcp/secret-elevation-notice.ts
66
+ function isRecord2(value) {
67
+ return value !== null && typeof value === "object" && !Array.isArray(value);
68
+ }
69
+ function elevationMessage(credentialTypes) {
70
+ const types = credentialTypes.length > 0 ? credentialTypes.join(", ") : "unspecified";
71
+ return `Auto-classified sensitivity=secret because credential patterns were detected (credentialTypes: ${types}). Secret entries are invisible to hosted MCP reads \u2014 search, get and list all cap MCP callers at internal. When an encryption key is configured the content is also encrypted at rest and embedded as a placeholder, so REST callers lose semantic search recall for it too (REST list/get still return the row). If this is a false positive: delete the entry by id, or store it again under the same id with the credential-shaped notation rephrased \u2014 a same-id re-store re-classifies the content. A canonical entry carrying metadata.dbRef.revision must advance that revision on the re-store, or it fails with revision_reuse_conflict.`;
72
+ }
73
+ function secretElevationNoticeFor(entry) {
74
+ if (!isRecord2(entry) || entry.sensitivity !== "secret") return void 0;
75
+ const metadata = entry.metadata;
76
+ if (!isRecord2(metadata) || metadata.credentialsDetected !== true) return void 0;
77
+ const credentialTypes = Array.isArray(metadata.credentialTypes) ? metadata.credentialTypes.filter((type) => typeof type === "string") : [];
78
+ return { sensitivity: "secret", credentialTypes, message: elevationMessage(credentialTypes) };
79
+ }
80
+ function withSecretElevationNotice(payload) {
81
+ if (!isRecord2(payload)) return payload;
82
+ const entry = isRecord2(payload.data) ? payload.data : payload;
83
+ const notice = secretElevationNoticeFor(entry);
84
+ if (!notice) return payload;
85
+ const elevated = { ...entry, secretElevation: notice };
86
+ return entry === payload ? elevated : { ...payload, data: elevated };
87
+ }
88
+ function secretElevationAggregate(elevated) {
89
+ if (elevated.length === 0) return void 0;
90
+ const credentialTypes = [...new Set(elevated.flatMap((item) => item.notice.credentialTypes))];
91
+ return {
92
+ count: elevated.length,
93
+ entryIds: elevated.map((item) => item.entryId),
94
+ credentialTypes,
95
+ message: `${elevated.length} stored chunk(s) were auto-elevated. ${elevationMessage(credentialTypes)}`
96
+ };
97
+ }
98
+
65
99
  // ../shared/src/types/isolation.ts
66
100
  var NamespaceIsolation = {
67
101
  SHARED: "shared",
@@ -1022,6 +1056,9 @@ export {
1022
1056
  DEFAULTS,
1023
1057
  TAXONOMY_MAX_CATEGORIES,
1024
1058
  projectSearchResponseForMcp,
1059
+ secretElevationNoticeFor,
1060
+ withSecretElevationNotice,
1061
+ secretElevationAggregate,
1025
1062
  NamespaceIsolation,
1026
1063
  MemoryType,
1027
1064
  SensitivityLevel,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  MemoryClient
3
- } from "./chunk-3QDXACBV.mjs";
3
+ } from "./chunk-LGNSLDGB.mjs";
4
4
 
5
5
  // ../dashboard/src/aggregations/consolidation-analytics.ts
6
6
  function analyzeConsolidationLog(entries) {
@@ -835,7 +835,7 @@ function createProxyServer(client, version, uploadLocalFile) {
835
835
  return server;
836
836
  }
837
837
  async function runMcpProxyServer(opts) {
838
- const version = opts.version ?? (true ? "1.17.13" : "0.0.0-dev");
838
+ const version = opts.version ?? (true ? "1.17.15" : "0.0.0-dev");
839
839
  const read = await opts.readCredentials();
840
840
  if (!read.ok) {
841
841
  const text = read.result.content.map((c) => c.type === "text" ? c.text : "").join(" ").trim();
@@ -11,8 +11,8 @@ import {
11
11
  toGraphologyFormat,
12
12
  transformGraphData,
13
13
  unreachableHealth
14
- } from "./chunk-X3QODOJV.mjs";
15
- import "./chunk-3QDXACBV.mjs";
14
+ } from "./chunk-WDF5LAZS.mjs";
15
+ import "./chunk-LGNSLDGB.mjs";
16
16
  import "./chunk-A3L46P2G.mjs";
17
17
  export {
18
18
  DashboardClient,
package/dist/index.d.ts CHANGED
@@ -1307,6 +1307,47 @@ declare function mergeExtractedEntities(callerEntities: IngestEntity[] | undefin
1307
1307
 
1308
1308
  declare function projectSearchResponseForMcp(payload: unknown): unknown;
1309
1309
 
1310
+ /**
1311
+ * Secret-elevation notice — one implementation of the predicate and the notice
1312
+ * text for every store surface that can silently lose an entry to automatic
1313
+ * credential classification: the strict hosted MCP store branch, the self-host
1314
+ * MCP store tool, and file ingestion. Three copies of this text drifting apart
1315
+ * is the failure mode this module exists to prevent.
1316
+ */
1317
+ /** Notice attached to a single auto-elevated store response. */
1318
+ interface SecretElevationNotice {
1319
+ sensitivity: 'secret';
1320
+ credentialTypes: string[];
1321
+ message: string;
1322
+ }
1323
+ /** Aggregate notice for one file ingest, where many chunks store at once. */
1324
+ interface SecretElevationAggregate {
1325
+ count: number;
1326
+ entryIds: string[];
1327
+ credentialTypes: string[];
1328
+ message: string;
1329
+ }
1330
+ /**
1331
+ * D3 predicate: the entry was elevated by the classifier, not by the caller.
1332
+ * A deliberate `sensitivity: 'secret'` store carries no `credentialsDetected`
1333
+ * flag and gets no notice.
1334
+ */
1335
+ declare function secretElevationNoticeFor(entry: unknown): SecretElevationNotice | undefined;
1336
+ /**
1337
+ * Attach the notice to a store response, returning the payload untouched when
1338
+ * the entry was not auto-elevated. Accepts either the bare stored entry (strict
1339
+ * hosted path) or the `{ success, data }` envelope the SDK http client surfaces
1340
+ * (`http-client.ts` sets `res.data` to the whole envelope, so the entry sits at
1341
+ * `payload.data`). Never mutates its argument: the stored entry and the
1342
+ * canonical payload the receipt digest covers must stay byte-identical.
1343
+ */
1344
+ declare function withSecretElevationNotice(payload: unknown): unknown;
1345
+ /** Aggregate one file ingest's per-chunk notices. Undefined when nothing elevated. */
1346
+ declare function secretElevationAggregate(elevated: Array<{
1347
+ entryId: string;
1348
+ notice: SecretElevationNotice;
1349
+ }>): SecretElevationAggregate | undefined;
1350
+
1310
1351
  interface ApiResponse<T> {
1311
1352
  success: boolean;
1312
1353
  data?: T;
@@ -1419,6 +1460,8 @@ interface FileIngestResult {
1419
1460
  totalCharacters: number;
1420
1461
  /** Present when images were extracted (v1) OR text windows / images were emitted (v2). */
1421
1462
  enrichment?: EnrichmentPending;
1463
+ /** Present only when ≥1 stored chunk was auto-classified secret by credential detection. */
1464
+ secretElevation?: SecretElevationAggregate;
1422
1465
  }
1423
1466
  /** Coarse pipeline stages. Stable vocabulary — finer detail goes in counters/message. */
1424
1467
  type IngestStage = 'parsing' | 'storing' | 'enrichment' | 'complete';
@@ -1593,4 +1636,4 @@ interface CreatePyxMemoryOptions {
1593
1636
  }
1594
1637
  declare function createPyxMemory(opts?: CreatePyxMemoryOptions): MemoryClient;
1595
1638
 
1596
- 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 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, projectSearchResponseForMcp };
1639
+ 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 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, type SecretElevationAggregate, type SecretElevationNotice, 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, projectSearchResponseForMcp, secretElevationAggregate, secretElevationNoticeFor, withSecretElevationNotice };
package/dist/index.mjs CHANGED
@@ -14,8 +14,11 @@ import {
14
14
  StoreTarget,
15
15
  TAXONOMY_MAX_CATEGORIES,
16
16
  VectorProvider,
17
- projectSearchResponseForMcp
18
- } from "./chunk-3QDXACBV.mjs";
17
+ projectSearchResponseForMcp,
18
+ secretElevationAggregate,
19
+ secretElevationNoticeFor,
20
+ withSecretElevationNotice
21
+ } from "./chunk-LGNSLDGB.mjs";
19
22
  import {
20
23
  mergeExtractedEntities,
21
24
  normalizeGraphLabel,
@@ -55,5 +58,8 @@ export {
55
58
  mergeExtractedEntities,
56
59
  normalizeGraphLabel,
57
60
  normalizeNameKey,
58
- projectSearchResponseForMcp
61
+ projectSearchResponseForMcp,
62
+ secretElevationAggregate,
63
+ secretElevationNoticeFor,
64
+ withSecretElevationNotice
59
65
  };
package/dist/react.mjs CHANGED
@@ -11,8 +11,8 @@ import {
11
11
  toGraphologyFormat,
12
12
  transformGraphData,
13
13
  unreachableHealth
14
- } from "./chunk-X3QODOJV.mjs";
15
- import "./chunk-3QDXACBV.mjs";
14
+ } from "./chunk-WDF5LAZS.mjs";
15
+ import "./chunk-LGNSLDGB.mjs";
16
16
  import "./chunk-A3L46P2G.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": "1.17.13",
3
+ "version": "1.17.15",
4
4
  "type": "module",
5
5
  "description": "SDK for pyx-memory — Memory as a Service for AI agents",
6
6
  "license": "MIT",