@pyxmate/memory 0.39.0 → 0.40.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.
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  MemoryClient
3
- } from "./chunk-CK7VUON3.mjs";
3
+ } from "./chunk-YHE5343S.mjs";
4
4
 
5
5
  // ../dashboard/src/aggregations/consolidation-analytics.ts
6
6
  function analyzeConsolidationLog(entries) {
@@ -733,10 +733,8 @@ var MemoryClient = class {
733
733
  * positive overlap. pyx never auto-prepends — the agent owns inclusion.
734
734
  */
735
735
  async fetchApplicableCorrections(input) {
736
- const params = new URLSearchParams({
737
- namespaceId: input.namespaceId,
738
- taskShape: input.taskShape
739
- });
736
+ const params = new URLSearchParams({ taskShape: input.taskShape });
737
+ if (input.namespaceId) params.set("namespaceId", input.namespaceId);
740
738
  if (input.project) params.set("project", input.project);
741
739
  if (input.limit !== void 0) params.set("limit", String(input.limit));
742
740
  return this.fetchApi(`/api/memory/corrections?${params}`);
@@ -713,7 +713,7 @@ var scopeShape = {
713
713
 
714
714
  // src/mcp/tools/corrections.ts
715
715
  var recordInputShape = {
716
- namespaceId: z2.string().min(1).describe("Namespace id to record the correction into."),
716
+ namespaceId: z2.string().min(1).optional().describe("Namespace id to record into. Omit in single-tenant deployments (namespace-free)."),
717
717
  whatWasWrong: z2.string().min(1).describe("What the agent did wrong."),
718
718
  whatToDoInstead: z2.string().min(1).describe("The corrective instruction to follow instead."),
719
719
  appliesWhen: z2.string().min(1).describe("When this correction applies \u2014 the task context future tasks are matched against."),
@@ -738,7 +738,7 @@ var recordCorrectionTool = {
738
738
  method: "POST",
739
739
  path: "/api/memory/corrections",
740
740
  body: {
741
- namespaceId: args.namespaceId,
741
+ ...args.namespaceId !== void 0 ? { namespaceId: args.namespaceId } : {},
742
742
  whatWasWrong: args.whatWasWrong,
743
743
  whatToDoInstead: args.whatToDoInstead,
744
744
  appliesWhen: args.appliesWhen,
@@ -751,7 +751,7 @@ var recordCorrectionTool = {
751
751
  }
752
752
  };
753
753
  var fetchInputShape = {
754
- namespaceId: z2.string().min(1).describe("Namespace id whose corrections to fetch."),
754
+ namespaceId: z2.string().min(1).optional().describe("Namespace id whose corrections to fetch. Omit in single-tenant deployments."),
755
755
  taskShape: z2.string().min(1).describe("Shape of the task about to run \u2014 scored against each correction."),
756
756
  project: z2.string().optional().describe("Optional project filter."),
757
757
  limit: z2.number().int().positive().optional().describe("Max corrections to return (cap 5)."),
@@ -1420,7 +1420,7 @@ var ALL_TOOL_NAMES = ALL_TOOLS.map((t) => t.name);
1420
1420
  // src/mcp/server.ts
1421
1421
  async function runMcpServer(opts) {
1422
1422
  const fetchImpl = opts.fetchImpl ?? fetch;
1423
- const version = opts.version ?? (true ? "0.39.0" : "0.0.0-dev");
1423
+ const version = opts.version ?? (true ? "0.40.0" : "0.0.0-dev");
1424
1424
  const server = new McpServer(
1425
1425
  { name: "pyx-memory", version },
1426
1426
  { instructions: PYX_MEMORY_INSTRUCTIONS, capabilities: { tools: {} } }
@@ -11,8 +11,8 @@ import {
11
11
  toGraphologyFormat,
12
12
  transformGraphData,
13
13
  unreachableHealth
14
- } from "./chunk-TDPGRIJW.mjs";
15
- import "./chunk-CK7VUON3.mjs";
14
+ } from "./chunk-OTNDFYEI.mjs";
15
+ import "./chunk-YHE5343S.mjs";
16
16
  import "./chunk-KSTI4M52.mjs";
17
17
  export {
18
18
  DashboardClient,
package/dist/index.d.ts CHANGED
@@ -394,7 +394,8 @@ declare class MemoryClient implements ExtendedMemoryInterface {
394
394
  * the body carries only the correction fields. Returns `{ id, createdAt }`.
395
395
  */
396
396
  recordCorrection(input: {
397
- namespaceId: string;
397
+ /** Omit in single-tenant deployments — corrections are stored namespace-free. */
398
+ namespaceId?: string;
398
399
  whatWasWrong: string;
399
400
  whatToDoInstead: string;
400
401
  appliesWhen: string;
@@ -410,7 +411,8 @@ declare class MemoryClient implements ExtendedMemoryInterface {
410
411
  * positive overlap. pyx never auto-prepends — the agent owns inclusion.
411
412
  */
412
413
  fetchApplicableCorrections(input: {
413
- namespaceId: string;
414
+ /** Omit in single-tenant deployments — reads the namespace-free scope. */
415
+ namespaceId?: string;
414
416
  taskShape: string;
415
417
  project?: string;
416
418
  limit?: number;
@@ -878,7 +880,12 @@ interface MemoryIngestRequest {
878
880
  */
879
881
  interface CorrectionInput {
880
882
  tenantId: string;
881
- namespaceId: string;
883
+ /**
884
+ * Namespace partition. Required in multi-tenant mode (the isolation
885
+ * boundary). Optional in single-tenant mode, where corrections are stored
886
+ * namespace-free (`namespace_id IS NULL`) exactly like ordinary writes.
887
+ */
888
+ namespaceId?: string;
882
889
  /** What the agent did wrong (required free text). */
883
890
  whatWasWrong: string;
884
891
  /** The corrective instruction (required free text) — stored as `entry.content`. */
@@ -895,7 +902,8 @@ interface CorrectionInput {
895
902
  /** Input to `Memory.fetchApplicableCorrections`. */
896
903
  interface FetchCorrectionsInput {
897
904
  tenantId: string;
898
- namespaceId: string;
905
+ /** Namespace partition; omit to read the namespace-free scope (single-tenant mode). */
906
+ namespaceId?: string;
899
907
  /** Shape of the task about to run — scored against each correction's `appliesWhen`. */
900
908
  taskShape: string;
901
909
  /** Optional project filter — keeps only project-matching or project-absent rows. */
package/dist/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  MemoryClient,
3
3
  MemoryServerError
4
- } from "./chunk-CK7VUON3.mjs";
4
+ } from "./chunk-YHE5343S.mjs";
5
5
  import {
6
6
  DEFAULTS,
7
7
  DEPRECATED_RAG_STRATEGIES,
package/dist/react.mjs CHANGED
@@ -11,8 +11,8 @@ import {
11
11
  toGraphologyFormat,
12
12
  transformGraphData,
13
13
  unreachableHealth
14
- } from "./chunk-TDPGRIJW.mjs";
15
- import "./chunk-CK7VUON3.mjs";
14
+ } from "./chunk-OTNDFYEI.mjs";
15
+ import "./chunk-YHE5343S.mjs";
16
16
  import "./chunk-KSTI4M52.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.39.0",
3
+ "version": "0.40.0",
4
4
  "type": "module",
5
5
  "description": "SDK for pyx-memory — Memory as a Service for AI agents",
6
6
  "license": "MIT",