@xemahq/memory-api-client 0.1.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.
Files changed (132) hide show
  1. package/LICENSE +201 -0
  2. package/dist/custom-fetch.d.ts +52 -0
  3. package/dist/custom-fetch.js +152 -0
  4. package/dist/endpoints/health/health.d.ts +15 -0
  5. package/dist/endpoints/health/health.js +53 -0
  6. package/dist/endpoints/memory/memory.d.ts +53 -0
  7. package/dist/endpoints/memory/memory.js +214 -0
  8. package/dist/endpoints/memory-embedding-migration-admin/memory-embedding-migration-admin.d.ts +13 -0
  9. package/dist/endpoints/memory-embedding-migration-admin/memory-embedding-migration-admin.js +20 -0
  10. package/dist/endpoints/memory-internal/memory-internal.d.ts +26 -0
  11. package/dist/endpoints/memory-internal/memory-internal.js +55 -0
  12. package/dist/endpoints/memory-maintenance-admin/memory-maintenance-admin.d.ts +38 -0
  13. package/dist/endpoints/memory-maintenance-admin/memory-maintenance-admin.js +111 -0
  14. package/dist/index.d.ts +7 -0
  15. package/dist/index.js +29 -0
  16. package/dist/models/appendEntryBodyDto.d.ts +12 -0
  17. package/dist/models/appendEntryBodyDto.js +9 -0
  18. package/dist/models/applyMaintenanceProposalBodyDto.d.ts +20 -0
  19. package/dist/models/applyMaintenanceProposalBodyDto.js +2 -0
  20. package/dist/models/applyMaintenanceProposalBodyDtoKind.d.ts +18 -0
  21. package/dist/models/applyMaintenanceProposalBodyDtoKind.js +17 -0
  22. package/dist/models/applyMaintenanceProposalBodyDtoPayload.d.ts +13 -0
  23. package/dist/models/applyMaintenanceProposalBodyDtoPayload.js +9 -0
  24. package/dist/models/createMemoryBodyDto.d.ts +12 -0
  25. package/dist/models/createMemoryBodyDto.js +9 -0
  26. package/dist/models/index.d.ts +57 -0
  27. package/dist/models/index.js +74 -0
  28. package/dist/models/maintenanceControllerListRunsParams.d.ts +16 -0
  29. package/dist/models/maintenanceControllerListRunsParams.js +9 -0
  30. package/dist/models/maintenanceProposalResponseDto.d.ts +24 -0
  31. package/dist/models/maintenanceProposalResponseDto.js +2 -0
  32. package/dist/models/maintenanceProposalResponseDtoAppliedAt.d.ts +13 -0
  33. package/dist/models/maintenanceProposalResponseDtoAppliedAt.js +9 -0
  34. package/dist/models/maintenanceProposalResponseDtoDataEnvelope.d.ts +11 -0
  35. package/dist/models/maintenanceProposalResponseDtoDataEnvelope.js +2 -0
  36. package/dist/models/maintenanceProposalResponseDtoKind.d.ts +15 -0
  37. package/dist/models/maintenanceProposalResponseDtoKind.js +17 -0
  38. package/dist/models/maintenanceProposalResponseDtoPayload.d.ts +10 -0
  39. package/dist/models/maintenanceProposalResponseDtoPayload.js +9 -0
  40. package/dist/models/maintenanceProposalResponseDtoReason.d.ts +13 -0
  41. package/dist/models/maintenanceProposalResponseDtoReason.js +9 -0
  42. package/dist/models/maintenanceProposalResponseDtoStatus.d.ts +16 -0
  43. package/dist/models/maintenanceProposalResponseDtoStatus.js +18 -0
  44. package/dist/models/maintenanceRunDetailDto.d.ts +28 -0
  45. package/dist/models/maintenanceRunDetailDto.js +2 -0
  46. package/dist/models/maintenanceRunDetailDtoCompletedAt.d.ts +13 -0
  47. package/dist/models/maintenanceRunDetailDtoCompletedAt.js +9 -0
  48. package/dist/models/maintenanceRunDetailDtoDataEnvelope.d.ts +11 -0
  49. package/dist/models/maintenanceRunDetailDtoDataEnvelope.js +2 -0
  50. package/dist/models/maintenanceRunDetailDtoMode.d.ts +12 -0
  51. package/dist/models/maintenanceRunDetailDtoMode.js +14 -0
  52. package/dist/models/maintenanceRunDetailDtoStatus.d.ts +13 -0
  53. package/dist/models/maintenanceRunDetailDtoStatus.js +15 -0
  54. package/dist/models/maintenanceRunDetailDtoTotals.d.ts +14 -0
  55. package/dist/models/maintenanceRunDetailDtoTotals.js +9 -0
  56. package/dist/models/maintenanceRunResponseDto.d.ts +26 -0
  57. package/dist/models/maintenanceRunResponseDto.js +2 -0
  58. package/dist/models/maintenanceRunResponseDtoCompletedAt.d.ts +13 -0
  59. package/dist/models/maintenanceRunResponseDtoCompletedAt.js +9 -0
  60. package/dist/models/maintenanceRunResponseDtoDataArrayEnvelope.d.ts +11 -0
  61. package/dist/models/maintenanceRunResponseDtoDataArrayEnvelope.js +2 -0
  62. package/dist/models/maintenanceRunResponseDtoDataEnvelope.d.ts +11 -0
  63. package/dist/models/maintenanceRunResponseDtoDataEnvelope.js +2 -0
  64. package/dist/models/maintenanceRunResponseDtoMode.d.ts +12 -0
  65. package/dist/models/maintenanceRunResponseDtoMode.js +14 -0
  66. package/dist/models/maintenanceRunResponseDtoStatus.d.ts +13 -0
  67. package/dist/models/maintenanceRunResponseDtoStatus.js +15 -0
  68. package/dist/models/maintenanceRunResponseDtoTotals.d.ts +14 -0
  69. package/dist/models/maintenanceRunResponseDtoTotals.js +9 -0
  70. package/dist/models/memoriesUiControllerDeleteFileParams.d.ts +13 -0
  71. package/dist/models/memoriesUiControllerDeleteFileParams.js +9 -0
  72. package/dist/models/memoriesUiControllerGetFileParams.d.ts +13 -0
  73. package/dist/models/memoriesUiControllerGetFileParams.js +9 -0
  74. package/dist/models/memoriesUiControllerListParams.d.ts +18 -0
  75. package/dist/models/memoriesUiControllerListParams.js +2 -0
  76. package/dist/models/memoriesUiControllerSearchParams.d.ts +20 -0
  77. package/dist/models/memoriesUiControllerSearchParams.js +2 -0
  78. package/dist/models/memoryDetailDto.d.ts +28 -0
  79. package/dist/models/memoryDetailDto.js +2 -0
  80. package/dist/models/memoryDetailDtoDataEnvelope.d.ts +11 -0
  81. package/dist/models/memoryDetailDtoDataEnvelope.js +2 -0
  82. package/dist/models/memoryKind.d.ts +14 -0
  83. package/dist/models/memoryKind.js +16 -0
  84. package/dist/models/memoryListResponseDto.d.ts +13 -0
  85. package/dist/models/memoryListResponseDto.js +2 -0
  86. package/dist/models/memoryListResponseDtoDataEnvelope.d.ts +11 -0
  87. package/dist/models/memoryListResponseDtoDataEnvelope.js +2 -0
  88. package/dist/models/memoryProjectDto.d.ts +13 -0
  89. package/dist/models/memoryProjectDto.js +9 -0
  90. package/dist/models/memoryProjectListResponseDto.d.ts +11 -0
  91. package/dist/models/memoryProjectListResponseDto.js +2 -0
  92. package/dist/models/memoryProjectListResponseDtoDataEnvelope.d.ts +11 -0
  93. package/dist/models/memoryProjectListResponseDtoDataEnvelope.js +2 -0
  94. package/dist/models/memoryRecallBodyDto.d.ts +23 -0
  95. package/dist/models/memoryRecallBodyDto.js +2 -0
  96. package/dist/models/memoryRelateBodyDto.d.ts +17 -0
  97. package/dist/models/memoryRelateBodyDto.js +9 -0
  98. package/dist/models/memoryScope.d.ts +13 -0
  99. package/dist/models/memoryScope.js +15 -0
  100. package/dist/models/memorySearchResponseDto.d.ts +17 -0
  101. package/dist/models/memorySearchResponseDto.js +2 -0
  102. package/dist/models/memorySearchResponseDtoDataEnvelope.d.ts +11 -0
  103. package/dist/models/memorySearchResponseDtoDataEnvelope.js +2 -0
  104. package/dist/models/memoryStoreBodyDto.d.ts +23 -0
  105. package/dist/models/memoryStoreBodyDto.js +2 -0
  106. package/dist/models/memorySummaryDto.d.ts +23 -0
  107. package/dist/models/memorySummaryDto.js +2 -0
  108. package/dist/models/memorySummaryDtoDataEnvelope.d.ts +11 -0
  109. package/dist/models/memorySummaryDtoDataEnvelope.js +2 -0
  110. package/dist/models/memorySurface.d.ts +12 -0
  111. package/dist/models/memorySurface.js +14 -0
  112. package/dist/models/renameMemoryBodyDto.d.ts +11 -0
  113. package/dist/models/renameMemoryBodyDto.js +9 -0
  114. package/dist/models/startMaintenanceRunBodyDto.d.ts +14 -0
  115. package/dist/models/startMaintenanceRunBodyDto.js +2 -0
  116. package/dist/models/startMaintenanceRunBodyDtoMode.d.ts +15 -0
  117. package/dist/models/startMaintenanceRunBodyDtoMode.js +14 -0
  118. package/dist/models/startMaintenanceRunResponseDto.d.ts +13 -0
  119. package/dist/models/startMaintenanceRunResponseDto.js +2 -0
  120. package/dist/models/startMaintenanceRunResponseDtoDataEnvelope.d.ts +11 -0
  121. package/dist/models/startMaintenanceRunResponseDtoDataEnvelope.js +2 -0
  122. package/dist/models/strReplaceBodyDto.d.ts +12 -0
  123. package/dist/models/strReplaceBodyDto.js +9 -0
  124. package/dist/models/triggerEmbeddingMigrationBodyDto.d.ts +11 -0
  125. package/dist/models/triggerEmbeddingMigrationBodyDto.js +9 -0
  126. package/dist/models/triggerEmbeddingMigrationResponseDto.d.ts +17 -0
  127. package/dist/models/triggerEmbeddingMigrationResponseDto.js +2 -0
  128. package/dist/models/triggerEmbeddingMigrationResponseDtoDataEnvelope.d.ts +11 -0
  129. package/dist/models/triggerEmbeddingMigrationResponseDtoDataEnvelope.js +2 -0
  130. package/dist/models/triggerEmbeddingMigrationResponseDtoReason.d.ts +14 -0
  131. package/dist/models/triggerEmbeddingMigrationResponseDtoReason.js +9 -0
  132. package/package.json +18 -0
@@ -0,0 +1,214 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.memoriesUiControllerRenameFile = exports.getMemoriesUiControllerRenameFileUrl = exports.memoriesUiControllerAppendEntry = exports.getMemoriesUiControllerAppendEntryUrl = exports.memoriesUiControllerDeleteFile = exports.getMemoriesUiControllerDeleteFileUrl = exports.memoriesUiControllerStrReplace = exports.getMemoriesUiControllerStrReplaceUrl = exports.memoriesUiControllerCreateFile = exports.getMemoriesUiControllerCreateFileUrl = exports.memoriesUiControllerGetFile = exports.getMemoriesUiControllerGetFileUrl = exports.memoriesUiControllerSearch = exports.getMemoriesUiControllerSearchUrl = exports.memoriesUiControllerList = exports.getMemoriesUiControllerListUrl = exports.memoriesUiControllerListProjects = exports.getMemoriesUiControllerListProjectsUrl = void 0;
4
+ const custom_fetch_1 = require("../../custom-fetch");
5
+ /**
6
+ * @summary List projects the current human actor can read memories from.
7
+ */
8
+ const getMemoriesUiControllerListProjectsUrl = () => {
9
+ return `/memory/projects`;
10
+ };
11
+ exports.getMemoriesUiControllerListProjectsUrl = getMemoriesUiControllerListProjectsUrl;
12
+ const memoriesUiControllerListProjects = async (options) => {
13
+ return (0, custom_fetch_1.customFetch)((0, exports.getMemoriesUiControllerListProjectsUrl)(), {
14
+ ...options,
15
+ method: 'GET'
16
+ });
17
+ };
18
+ exports.memoriesUiControllerListProjects = memoriesUiControllerListProjects;
19
+ /**
20
+ * @summary Flat list of memories visible to the caller (org + active project + own user). Optional filters: scope, kind, tags, projectSlug for cross-project read.
21
+ */
22
+ const getMemoriesUiControllerListUrl = (params) => {
23
+ const normalizedParams = new URLSearchParams();
24
+ Object.entries(params || {}).forEach(([key, value]) => {
25
+ if (value === undefined)
26
+ return;
27
+ if (value === null) {
28
+ normalizedParams.append(key, 'null');
29
+ return;
30
+ }
31
+ if (Array.isArray(value)) {
32
+ for (const item of value) {
33
+ if (item === undefined || item === null)
34
+ continue;
35
+ normalizedParams.append(key, item.toString());
36
+ }
37
+ return;
38
+ }
39
+ normalizedParams.append(key, value.toString());
40
+ });
41
+ const stringifiedParams = normalizedParams.toString();
42
+ return stringifiedParams.length > 0 ? `/memory/list?${stringifiedParams}` : `/memory/list`;
43
+ };
44
+ exports.getMemoriesUiControllerListUrl = getMemoriesUiControllerListUrl;
45
+ const memoriesUiControllerList = async (params, options) => {
46
+ return (0, custom_fetch_1.customFetch)((0, exports.getMemoriesUiControllerListUrl)(params), {
47
+ ...options,
48
+ method: 'GET'
49
+ });
50
+ };
51
+ exports.memoriesUiControllerList = memoriesUiControllerList;
52
+ /**
53
+ * @summary Vector search across memories the caller can read. Returns the same row shape as `GET /memory/list`.
54
+ */
55
+ const getMemoriesUiControllerSearchUrl = (params) => {
56
+ const normalizedParams = new URLSearchParams();
57
+ Object.entries(params || {}).forEach(([key, value]) => {
58
+ if (value === undefined)
59
+ return;
60
+ if (value === null) {
61
+ normalizedParams.append(key, 'null');
62
+ return;
63
+ }
64
+ if (Array.isArray(value)) {
65
+ for (const item of value) {
66
+ if (item === undefined || item === null)
67
+ continue;
68
+ normalizedParams.append(key, item.toString());
69
+ }
70
+ return;
71
+ }
72
+ normalizedParams.append(key, value.toString());
73
+ });
74
+ const stringifiedParams = normalizedParams.toString();
75
+ return stringifiedParams.length > 0 ? `/memory/search?${stringifiedParams}` : `/memory/search`;
76
+ };
77
+ exports.getMemoriesUiControllerSearchUrl = getMemoriesUiControllerSearchUrl;
78
+ const memoriesUiControllerSearch = async (params, options) => {
79
+ return (0, custom_fetch_1.customFetch)((0, exports.getMemoriesUiControllerSearchUrl)(params), {
80
+ ...options,
81
+ method: 'GET'
82
+ });
83
+ };
84
+ exports.memoriesUiControllerSearch = memoriesUiControllerSearch;
85
+ /**
86
+ * @summary Fetch the full markdown body + audit metadata for one memory.
87
+ */
88
+ const getMemoriesUiControllerGetFileUrl = (params) => {
89
+ const normalizedParams = new URLSearchParams();
90
+ Object.entries(params || {}).forEach(([key, value]) => {
91
+ if (value === undefined)
92
+ return;
93
+ if (value === null) {
94
+ normalizedParams.append(key, 'null');
95
+ return;
96
+ }
97
+ if (Array.isArray(value)) {
98
+ for (const item of value) {
99
+ if (item === undefined || item === null)
100
+ continue;
101
+ normalizedParams.append(key, item.toString());
102
+ }
103
+ return;
104
+ }
105
+ normalizedParams.append(key, value.toString());
106
+ });
107
+ const stringifiedParams = normalizedParams.toString();
108
+ return stringifiedParams.length > 0 ? `/memory/file?${stringifiedParams}` : `/memory/file`;
109
+ };
110
+ exports.getMemoriesUiControllerGetFileUrl = getMemoriesUiControllerGetFileUrl;
111
+ const memoriesUiControllerGetFile = async (params, options) => {
112
+ return (0, custom_fetch_1.customFetch)((0, exports.getMemoriesUiControllerGetFileUrl)(params), {
113
+ ...options,
114
+ method: 'GET'
115
+ });
116
+ };
117
+ exports.memoriesUiControllerGetFile = memoriesUiControllerGetFile;
118
+ /**
119
+ * @summary Create a new memory file. Same path grammar + scope rules as the MCP `memory_create` tool.
120
+ */
121
+ const getMemoriesUiControllerCreateFileUrl = () => {
122
+ return `/memory/file`;
123
+ };
124
+ exports.getMemoriesUiControllerCreateFileUrl = getMemoriesUiControllerCreateFileUrl;
125
+ const memoriesUiControllerCreateFile = async (createMemoryBodyDto, options) => {
126
+ return (0, custom_fetch_1.customFetch)((0, exports.getMemoriesUiControllerCreateFileUrl)(), {
127
+ ...options,
128
+ method: 'POST',
129
+ headers: { 'Content-Type': 'application/json', ...options?.headers },
130
+ body: JSON.stringify(createMemoryBodyDto)
131
+ });
132
+ };
133
+ exports.memoriesUiControllerCreateFile = memoriesUiControllerCreateFile;
134
+ /**
135
+ * @summary Replace `oldStr` with `newStr` in a memory file. The match must be unique within the body.
136
+ */
137
+ const getMemoriesUiControllerStrReplaceUrl = () => {
138
+ return `/memory/file`;
139
+ };
140
+ exports.getMemoriesUiControllerStrReplaceUrl = getMemoriesUiControllerStrReplaceUrl;
141
+ const memoriesUiControllerStrReplace = async (strReplaceBodyDto, options) => {
142
+ return (0, custom_fetch_1.customFetch)((0, exports.getMemoriesUiControllerStrReplaceUrl)(), {
143
+ ...options,
144
+ method: 'PATCH',
145
+ headers: { 'Content-Type': 'application/json', ...options?.headers },
146
+ body: JSON.stringify(strReplaceBodyDto)
147
+ });
148
+ };
149
+ exports.memoriesUiControllerStrReplace = memoriesUiControllerStrReplace;
150
+ /**
151
+ * @summary Delete a memory file.
152
+ */
153
+ const getMemoriesUiControllerDeleteFileUrl = (params) => {
154
+ const normalizedParams = new URLSearchParams();
155
+ Object.entries(params || {}).forEach(([key, value]) => {
156
+ if (value === undefined)
157
+ return;
158
+ if (value === null) {
159
+ normalizedParams.append(key, 'null');
160
+ return;
161
+ }
162
+ if (Array.isArray(value)) {
163
+ for (const item of value) {
164
+ if (item === undefined || item === null)
165
+ continue;
166
+ normalizedParams.append(key, item.toString());
167
+ }
168
+ return;
169
+ }
170
+ normalizedParams.append(key, value.toString());
171
+ });
172
+ const stringifiedParams = normalizedParams.toString();
173
+ return stringifiedParams.length > 0 ? `/memory/file?${stringifiedParams}` : `/memory/file`;
174
+ };
175
+ exports.getMemoriesUiControllerDeleteFileUrl = getMemoriesUiControllerDeleteFileUrl;
176
+ const memoriesUiControllerDeleteFile = async (params, options) => {
177
+ return (0, custom_fetch_1.customFetch)((0, exports.getMemoriesUiControllerDeleteFileUrl)(params), {
178
+ ...options,
179
+ method: 'DELETE'
180
+ });
181
+ };
182
+ exports.memoriesUiControllerDeleteFile = memoriesUiControllerDeleteFile;
183
+ /**
184
+ * @summary Append a new ledger entry to an existing memory. The server stamps the `## <ISO-8601>` heading.
185
+ */
186
+ const getMemoriesUiControllerAppendEntryUrl = () => {
187
+ return `/memory/file/append`;
188
+ };
189
+ exports.getMemoriesUiControllerAppendEntryUrl = getMemoriesUiControllerAppendEntryUrl;
190
+ const memoriesUiControllerAppendEntry = async (appendEntryBodyDto, options) => {
191
+ return (0, custom_fetch_1.customFetch)((0, exports.getMemoriesUiControllerAppendEntryUrl)(), {
192
+ ...options,
193
+ method: 'POST',
194
+ headers: { 'Content-Type': 'application/json', ...options?.headers },
195
+ body: JSON.stringify(appendEntryBodyDto)
196
+ });
197
+ };
198
+ exports.memoriesUiControllerAppendEntry = memoriesUiControllerAppendEntry;
199
+ /**
200
+ * @summary Rename a memory slug. Scope + kind segments are immutable; only the slug changes.
201
+ */
202
+ const getMemoriesUiControllerRenameFileUrl = () => {
203
+ return `/memory/file/rename`;
204
+ };
205
+ exports.getMemoriesUiControllerRenameFileUrl = getMemoriesUiControllerRenameFileUrl;
206
+ const memoriesUiControllerRenameFile = async (renameMemoryBodyDto, options) => {
207
+ return (0, custom_fetch_1.customFetch)((0, exports.getMemoriesUiControllerRenameFileUrl)(), {
208
+ ...options,
209
+ method: 'POST',
210
+ headers: { 'Content-Type': 'application/json', ...options?.headers },
211
+ body: JSON.stringify(renameMemoryBodyDto)
212
+ });
213
+ };
214
+ exports.memoriesUiControllerRenameFile = memoriesUiControllerRenameFile;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Generated by orval v8.6.2 🍺
3
+ * Do not edit manually.
4
+ * Memory API
5
+ * Persistent agent memory — operational insights, decisions, and patterns that survive across executions
6
+ * OpenAPI spec version: 0.1.0
7
+ */
8
+ import type { TriggerEmbeddingMigrationBodyDto, TriggerEmbeddingMigrationResponseDtoDataEnvelope } from '../../models';
9
+ /**
10
+ * @summary Run the embedding-migration walker for an org. No-op (`started=false`) when the org is not currently migrating.
11
+ */
12
+ export declare const getEmbeddingMigrationControllerRunUrl: () => string;
13
+ export declare const embeddingMigrationControllerRun: (triggerEmbeddingMigrationBodyDto: TriggerEmbeddingMigrationBodyDto, options?: RequestInit) => Promise<TriggerEmbeddingMigrationResponseDtoDataEnvelope>;
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.embeddingMigrationControllerRun = exports.getEmbeddingMigrationControllerRunUrl = void 0;
4
+ const custom_fetch_1 = require("../../custom-fetch");
5
+ /**
6
+ * @summary Run the embedding-migration walker for an org. No-op (`started=false`) when the org is not currently migrating.
7
+ */
8
+ const getEmbeddingMigrationControllerRunUrl = () => {
9
+ return `/admin/embedding-migration/run`;
10
+ };
11
+ exports.getEmbeddingMigrationControllerRunUrl = getEmbeddingMigrationControllerRunUrl;
12
+ const embeddingMigrationControllerRun = async (triggerEmbeddingMigrationBodyDto, options) => {
13
+ return (0, custom_fetch_1.customFetch)((0, exports.getEmbeddingMigrationControllerRunUrl)(), {
14
+ ...options,
15
+ method: 'POST',
16
+ headers: { 'Content-Type': 'application/json', ...options?.headers },
17
+ body: JSON.stringify(triggerEmbeddingMigrationBodyDto)
18
+ });
19
+ };
20
+ exports.embeddingMigrationControllerRun = embeddingMigrationControllerRun;
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Generated by orval v8.6.2 🍺
3
+ * Do not edit manually.
4
+ * Memory API
5
+ * Persistent agent memory — operational insights, decisions, and patterns that survive across executions
6
+ * OpenAPI spec version: 0.1.0
7
+ */
8
+ import type { MemoryRecallBodyDto, MemoryRelateBodyDto, MemoryStoreBodyDto } from '../../models';
9
+ /**
10
+ * Service-to-service endpoint. Routes via xema-capability-router memory:recall@1 capability ref. Protected by ServiceActorGuard.
11
+ * @summary Recall memories by semantic query (capability: memory:recall@1)
12
+ */
13
+ export declare const getMemoriesInternalControllerRecallUrl: () => string;
14
+ export declare const memoriesInternalControllerRecall: (memoryRecallBodyDto: MemoryRecallBodyDto, options?: RequestInit) => Promise<void>;
15
+ /**
16
+ * Service-to-service endpoint. Routes via xema-capability-router memory:store@1 capability ref. Protected by ServiceActorGuard.
17
+ * @summary Store a new memory entry (capability: memory:store@1)
18
+ */
19
+ export declare const getMemoriesInternalControllerStoreUrl: () => string;
20
+ export declare const memoriesInternalControllerStore: (memoryStoreBodyDto: MemoryStoreBodyDto, options?: RequestInit) => Promise<void>;
21
+ /**
22
+ * Service-to-service endpoint. Routes via xema-capability-router memory:relate@1 capability ref. Protected by ServiceActorGuard.
23
+ * @summary Assert a named relation between two memory nodes (capability: memory:relate@1)
24
+ */
25
+ export declare const getMemoriesInternalControllerRelateUrl: () => string;
26
+ export declare const memoriesInternalControllerRelate: (memoryRelateBodyDto: MemoryRelateBodyDto, options?: RequestInit) => Promise<void>;
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.memoriesInternalControllerRelate = exports.getMemoriesInternalControllerRelateUrl = exports.memoriesInternalControllerStore = exports.getMemoriesInternalControllerStoreUrl = exports.memoriesInternalControllerRecall = exports.getMemoriesInternalControllerRecallUrl = void 0;
4
+ const custom_fetch_1 = require("../../custom-fetch");
5
+ /**
6
+ * Service-to-service endpoint. Routes via xema-capability-router memory:recall@1 capability ref. Protected by ServiceActorGuard.
7
+ * @summary Recall memories by semantic query (capability: memory:recall@1)
8
+ */
9
+ const getMemoriesInternalControllerRecallUrl = () => {
10
+ return `/memories/recall`;
11
+ };
12
+ exports.getMemoriesInternalControllerRecallUrl = getMemoriesInternalControllerRecallUrl;
13
+ const memoriesInternalControllerRecall = async (memoryRecallBodyDto, options) => {
14
+ return (0, custom_fetch_1.customFetch)((0, exports.getMemoriesInternalControllerRecallUrl)(), {
15
+ ...options,
16
+ method: 'POST',
17
+ headers: { 'Content-Type': 'application/json', ...options?.headers },
18
+ body: JSON.stringify(memoryRecallBodyDto)
19
+ });
20
+ };
21
+ exports.memoriesInternalControllerRecall = memoriesInternalControllerRecall;
22
+ /**
23
+ * Service-to-service endpoint. Routes via xema-capability-router memory:store@1 capability ref. Protected by ServiceActorGuard.
24
+ * @summary Store a new memory entry (capability: memory:store@1)
25
+ */
26
+ const getMemoriesInternalControllerStoreUrl = () => {
27
+ return `/memories`;
28
+ };
29
+ exports.getMemoriesInternalControllerStoreUrl = getMemoriesInternalControllerStoreUrl;
30
+ const memoriesInternalControllerStore = async (memoryStoreBodyDto, options) => {
31
+ return (0, custom_fetch_1.customFetch)((0, exports.getMemoriesInternalControllerStoreUrl)(), {
32
+ ...options,
33
+ method: 'POST',
34
+ headers: { 'Content-Type': 'application/json', ...options?.headers },
35
+ body: JSON.stringify(memoryStoreBodyDto)
36
+ });
37
+ };
38
+ exports.memoriesInternalControllerStore = memoriesInternalControllerStore;
39
+ /**
40
+ * Service-to-service endpoint. Routes via xema-capability-router memory:relate@1 capability ref. Protected by ServiceActorGuard.
41
+ * @summary Assert a named relation between two memory nodes (capability: memory:relate@1)
42
+ */
43
+ const getMemoriesInternalControllerRelateUrl = () => {
44
+ return `/memories/relations`;
45
+ };
46
+ exports.getMemoriesInternalControllerRelateUrl = getMemoriesInternalControllerRelateUrl;
47
+ const memoriesInternalControllerRelate = async (memoryRelateBodyDto, options) => {
48
+ return (0, custom_fetch_1.customFetch)((0, exports.getMemoriesInternalControllerRelateUrl)(), {
49
+ ...options,
50
+ method: 'POST',
51
+ headers: { 'Content-Type': 'application/json', ...options?.headers },
52
+ body: JSON.stringify(memoryRelateBodyDto)
53
+ });
54
+ };
55
+ exports.memoriesInternalControllerRelate = memoriesInternalControllerRelate;
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Generated by orval v8.6.2 🍺
3
+ * Do not edit manually.
4
+ * Memory API
5
+ * Persistent agent memory — operational insights, decisions, and patterns that survive across executions
6
+ * OpenAPI spec version: 0.1.0
7
+ */
8
+ import type { ApplyMaintenanceProposalBodyDto, MaintenanceControllerListRunsParams, MaintenanceProposalResponseDtoDataEnvelope, MaintenanceRunDetailDtoDataEnvelope, MaintenanceRunResponseDtoDataArrayEnvelope, MaintenanceRunResponseDtoDataEnvelope, StartMaintenanceRunBodyDto, StartMaintenanceRunResponseDtoDataEnvelope } from '../../models';
9
+ /**
10
+ * @summary Start a maintenance run for an org. Returns the run row + pre-resolved candidate lists per `(scope, kind)` partition (already digest-gated).
11
+ */
12
+ export declare const getMaintenanceControllerStartRunUrl: () => string;
13
+ export declare const maintenanceControllerStartRun: (startMaintenanceRunBodyDto: StartMaintenanceRunBodyDto, options?: RequestInit) => Promise<StartMaintenanceRunResponseDtoDataEnvelope>;
14
+ /**
15
+ * @summary Apply a single proposed mutation. Fails fast with `MEMORY_MAINTENANCE_DIGEST_MISMATCH` if the target row has drifted since the workflow proposed against it.
16
+ */
17
+ export declare const getMaintenanceControllerApplyProposalUrl: () => string;
18
+ export declare const maintenanceControllerApplyProposal: (applyMaintenanceProposalBodyDto: ApplyMaintenanceProposalBodyDto, options?: RequestInit) => Promise<MaintenanceProposalResponseDtoDataEnvelope>;
19
+ /**
20
+ * @summary Mark a maintenance run as SUCCEEDED or FAILED and stamp aggregated totals. Resets the per-org write counter when status=SUCCEEDED.
21
+ */
22
+ export declare const getMaintenanceControllerCompleteRunUrl: (runId: string) => string;
23
+ export declare const maintenanceControllerCompleteRun: (runId: string, options?: RequestInit) => Promise<MaintenanceRunResponseDtoDataEnvelope>;
24
+ /**
25
+ * @summary Last N maintenance runs for an org.
26
+ */
27
+ export declare const getMaintenanceControllerListRunsUrl: (params: MaintenanceControllerListRunsParams) => string;
28
+ export declare const maintenanceControllerListRuns: (params: MaintenanceControllerListRunsParams, options?: RequestInit) => Promise<MaintenanceRunResponseDtoDataArrayEnvelope>;
29
+ /**
30
+ * @summary Single run detail with every proposal it produced (applied, skipped, failed, reverted).
31
+ */
32
+ export declare const getMaintenanceControllerGetRunDetailUrl: (runId: string) => string;
33
+ export declare const maintenanceControllerGetRunDetail: (runId: string, options?: RequestInit) => Promise<MaintenanceRunDetailDtoDataEnvelope>;
34
+ /**
35
+ * @summary Revert a single applied mutation. Supported for PRUNE / RENAME / SUMMARY_REFRESH only — MERGE and FLAG_EMPTY_ORPHAN are not reversible by design.
36
+ */
37
+ export declare const getMaintenanceControllerRevertProposalUrl: (proposalId: string) => string;
38
+ export declare const maintenanceControllerRevertProposal: (proposalId: string, options?: RequestInit) => Promise<MaintenanceProposalResponseDtoDataEnvelope>;
@@ -0,0 +1,111 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.maintenanceControllerRevertProposal = exports.getMaintenanceControllerRevertProposalUrl = exports.maintenanceControllerGetRunDetail = exports.getMaintenanceControllerGetRunDetailUrl = exports.maintenanceControllerListRuns = exports.getMaintenanceControllerListRunsUrl = exports.maintenanceControllerCompleteRun = exports.getMaintenanceControllerCompleteRunUrl = exports.maintenanceControllerApplyProposal = exports.getMaintenanceControllerApplyProposalUrl = exports.maintenanceControllerStartRun = exports.getMaintenanceControllerStartRunUrl = void 0;
4
+ const custom_fetch_1 = require("../../custom-fetch");
5
+ /**
6
+ * @summary Start a maintenance run for an org. Returns the run row + pre-resolved candidate lists per `(scope, kind)` partition (already digest-gated).
7
+ */
8
+ const getMaintenanceControllerStartRunUrl = () => {
9
+ return `/admin/maintenance/run`;
10
+ };
11
+ exports.getMaintenanceControllerStartRunUrl = getMaintenanceControllerStartRunUrl;
12
+ const maintenanceControllerStartRun = async (startMaintenanceRunBodyDto, options) => {
13
+ return (0, custom_fetch_1.customFetch)((0, exports.getMaintenanceControllerStartRunUrl)(), {
14
+ ...options,
15
+ method: 'POST',
16
+ headers: { 'Content-Type': 'application/json', ...options?.headers },
17
+ body: JSON.stringify(startMaintenanceRunBodyDto)
18
+ });
19
+ };
20
+ exports.maintenanceControllerStartRun = maintenanceControllerStartRun;
21
+ /**
22
+ * @summary Apply a single proposed mutation. Fails fast with `MEMORY_MAINTENANCE_DIGEST_MISMATCH` if the target row has drifted since the workflow proposed against it.
23
+ */
24
+ const getMaintenanceControllerApplyProposalUrl = () => {
25
+ return `/admin/maintenance/apply`;
26
+ };
27
+ exports.getMaintenanceControllerApplyProposalUrl = getMaintenanceControllerApplyProposalUrl;
28
+ const maintenanceControllerApplyProposal = async (applyMaintenanceProposalBodyDto, options) => {
29
+ return (0, custom_fetch_1.customFetch)((0, exports.getMaintenanceControllerApplyProposalUrl)(), {
30
+ ...options,
31
+ method: 'POST',
32
+ headers: { 'Content-Type': 'application/json', ...options?.headers },
33
+ body: JSON.stringify(applyMaintenanceProposalBodyDto)
34
+ });
35
+ };
36
+ exports.maintenanceControllerApplyProposal = maintenanceControllerApplyProposal;
37
+ /**
38
+ * @summary Mark a maintenance run as SUCCEEDED or FAILED and stamp aggregated totals. Resets the per-org write counter when status=SUCCEEDED.
39
+ */
40
+ const getMaintenanceControllerCompleteRunUrl = (runId) => {
41
+ return `/admin/maintenance/run/${runId}/complete`;
42
+ };
43
+ exports.getMaintenanceControllerCompleteRunUrl = getMaintenanceControllerCompleteRunUrl;
44
+ const maintenanceControllerCompleteRun = async (runId, options) => {
45
+ return (0, custom_fetch_1.customFetch)((0, exports.getMaintenanceControllerCompleteRunUrl)(runId), {
46
+ ...options,
47
+ method: 'POST'
48
+ });
49
+ };
50
+ exports.maintenanceControllerCompleteRun = maintenanceControllerCompleteRun;
51
+ /**
52
+ * @summary Last N maintenance runs for an org.
53
+ */
54
+ const getMaintenanceControllerListRunsUrl = (params) => {
55
+ const normalizedParams = new URLSearchParams();
56
+ Object.entries(params || {}).forEach(([key, value]) => {
57
+ if (value === undefined)
58
+ return;
59
+ if (value === null) {
60
+ normalizedParams.append(key, 'null');
61
+ return;
62
+ }
63
+ if (Array.isArray(value)) {
64
+ for (const item of value) {
65
+ if (item === undefined || item === null)
66
+ continue;
67
+ normalizedParams.append(key, item.toString());
68
+ }
69
+ return;
70
+ }
71
+ normalizedParams.append(key, value.toString());
72
+ });
73
+ const stringifiedParams = normalizedParams.toString();
74
+ return stringifiedParams.length > 0 ? `/admin/maintenance/runs?${stringifiedParams}` : `/admin/maintenance/runs`;
75
+ };
76
+ exports.getMaintenanceControllerListRunsUrl = getMaintenanceControllerListRunsUrl;
77
+ const maintenanceControllerListRuns = async (params, options) => {
78
+ return (0, custom_fetch_1.customFetch)((0, exports.getMaintenanceControllerListRunsUrl)(params), {
79
+ ...options,
80
+ method: 'GET'
81
+ });
82
+ };
83
+ exports.maintenanceControllerListRuns = maintenanceControllerListRuns;
84
+ /**
85
+ * @summary Single run detail with every proposal it produced (applied, skipped, failed, reverted).
86
+ */
87
+ const getMaintenanceControllerGetRunDetailUrl = (runId) => {
88
+ return `/admin/maintenance/runs/${runId}`;
89
+ };
90
+ exports.getMaintenanceControllerGetRunDetailUrl = getMaintenanceControllerGetRunDetailUrl;
91
+ const maintenanceControllerGetRunDetail = async (runId, options) => {
92
+ return (0, custom_fetch_1.customFetch)((0, exports.getMaintenanceControllerGetRunDetailUrl)(runId), {
93
+ ...options,
94
+ method: 'GET'
95
+ });
96
+ };
97
+ exports.maintenanceControllerGetRunDetail = maintenanceControllerGetRunDetail;
98
+ /**
99
+ * @summary Revert a single applied mutation. Supported for PRUNE / RENAME / SUMMARY_REFRESH only — MERGE and FLAG_EMPTY_ORPHAN are not reversible by design.
100
+ */
101
+ const getMaintenanceControllerRevertProposalUrl = (proposalId) => {
102
+ return `/admin/maintenance/proposals/${proposalId}/revert`;
103
+ };
104
+ exports.getMaintenanceControllerRevertProposalUrl = getMaintenanceControllerRevertProposalUrl;
105
+ const maintenanceControllerRevertProposal = async (proposalId, options) => {
106
+ return (0, custom_fetch_1.customFetch)((0, exports.getMaintenanceControllerRevertProposalUrl)(proposalId), {
107
+ ...options,
108
+ method: 'POST'
109
+ });
110
+ };
111
+ exports.maintenanceControllerRevertProposal = maintenanceControllerRevertProposal;
@@ -0,0 +1,7 @@
1
+ export { configureClient, getClientConfig, ClientError, customFetch, type ClientConfig } from './custom-fetch';
2
+ export * from './models';
3
+ export * from './endpoints/health/health';
4
+ export * from './endpoints/memory/memory';
5
+ export * from './endpoints/memory-embedding-migration-admin/memory-embedding-migration-admin';
6
+ export * from './endpoints/memory-internal/memory-internal';
7
+ export * from './endpoints/memory-maintenance-admin/memory-maintenance-admin';
package/dist/index.js ADDED
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.customFetch = exports.ClientError = exports.getClientConfig = exports.configureClient = void 0;
18
+ // Auto-generated by scripts/build-client-index.js — do not edit manually.
19
+ var custom_fetch_1 = require("./custom-fetch");
20
+ Object.defineProperty(exports, "configureClient", { enumerable: true, get: function () { return custom_fetch_1.configureClient; } });
21
+ Object.defineProperty(exports, "getClientConfig", { enumerable: true, get: function () { return custom_fetch_1.getClientConfig; } });
22
+ Object.defineProperty(exports, "ClientError", { enumerable: true, get: function () { return custom_fetch_1.ClientError; } });
23
+ Object.defineProperty(exports, "customFetch", { enumerable: true, get: function () { return custom_fetch_1.customFetch; } });
24
+ __exportStar(require("./models"), exports);
25
+ __exportStar(require("./endpoints/health/health"), exports);
26
+ __exportStar(require("./endpoints/memory/memory"), exports);
27
+ __exportStar(require("./endpoints/memory-embedding-migration-admin/memory-embedding-migration-admin"), exports);
28
+ __exportStar(require("./endpoints/memory-internal/memory-internal"), exports);
29
+ __exportStar(require("./endpoints/memory-maintenance-admin/memory-maintenance-admin"), exports);
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Generated by orval v8.6.2 🍺
3
+ * Do not edit manually.
4
+ * Memory API
5
+ * Persistent agent memory — operational insights, decisions, and patterns that survive across executions
6
+ * OpenAPI spec version: 0.1.0
7
+ */
8
+ export interface AppendEntryBodyDto {
9
+ path: string;
10
+ /** Markdown body of the new ledger entry. The server stamps the timestamp. */
11
+ entry: string;
12
+ }
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ /**
3
+ * Generated by orval v8.6.2 🍺
4
+ * Do not edit manually.
5
+ * Memory API
6
+ * Persistent agent memory — operational insights, decisions, and patterns that survive across executions
7
+ * OpenAPI spec version: 0.1.0
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Generated by orval v8.6.2 🍺
3
+ * Do not edit manually.
4
+ * Memory API
5
+ * Persistent agent memory — operational insights, decisions, and patterns that survive across executions
6
+ * OpenAPI spec version: 0.1.0
7
+ */
8
+ import type { ApplyMaintenanceProposalBodyDtoKind } from './applyMaintenanceProposalBodyDtoKind';
9
+ import type { ApplyMaintenanceProposalBodyDtoPayload } from './applyMaintenanceProposalBodyDtoPayload';
10
+ export interface ApplyMaintenanceProposalBodyDto {
11
+ runId: string;
12
+ /** Which mutation kind the workflow is applying. */
13
+ kind: ApplyMaintenanceProposalBodyDtoKind;
14
+ /** Target memory id. Required for every mutation kind except FLAG_EMPTY_ORPHAN (which is informational and never applies). */
15
+ memoryId: string;
16
+ /** Digest the workflow proposed against. The apply endpoint re-reads the row's contentDigest and fails fast with `MEMORY_MAINTENANCE_DIGEST_MISMATCH` if it has drifted (an agent wrote between proposal and apply). */
17
+ expectedContentDigest: string;
18
+ /** Kind-specific structured payload. Shape mirrors `MemoryMaintenanceProposal.payload` documented in schema.prisma. */
19
+ payload: ApplyMaintenanceProposalBodyDtoPayload;
20
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Generated by orval v8.6.2 🍺
3
+ * Do not edit manually.
4
+ * Memory API
5
+ * Persistent agent memory — operational insights, decisions, and patterns that survive across executions
6
+ * OpenAPI spec version: 0.1.0
7
+ */
8
+ /**
9
+ * Which mutation kind the workflow is applying.
10
+ */
11
+ export type ApplyMaintenanceProposalBodyDtoKind = typeof ApplyMaintenanceProposalBodyDtoKind[keyof typeof ApplyMaintenanceProposalBodyDtoKind];
12
+ export declare const ApplyMaintenanceProposalBodyDtoKind: {
13
+ readonly MERGE: "MERGE";
14
+ readonly PRUNE: "PRUNE";
15
+ readonly RENAME: "RENAME";
16
+ readonly SUMMARY_REFRESH: "SUMMARY_REFRESH";
17
+ readonly FLAG_EMPTY_ORPHAN: "FLAG_EMPTY_ORPHAN";
18
+ };
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ /**
3
+ * Generated by orval v8.6.2 🍺
4
+ * Do not edit manually.
5
+ * Memory API
6
+ * Persistent agent memory — operational insights, decisions, and patterns that survive across executions
7
+ * OpenAPI spec version: 0.1.0
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.ApplyMaintenanceProposalBodyDtoKind = void 0;
11
+ exports.ApplyMaintenanceProposalBodyDtoKind = {
12
+ MERGE: 'MERGE',
13
+ PRUNE: 'PRUNE',
14
+ RENAME: 'RENAME',
15
+ SUMMARY_REFRESH: 'SUMMARY_REFRESH',
16
+ FLAG_EMPTY_ORPHAN: 'FLAG_EMPTY_ORPHAN',
17
+ };
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Generated by orval v8.6.2 🍺
3
+ * Do not edit manually.
4
+ * Memory API
5
+ * Persistent agent memory — operational insights, decisions, and patterns that survive across executions
6
+ * OpenAPI spec version: 0.1.0
7
+ */
8
+ /**
9
+ * Kind-specific structured payload. Shape mirrors `MemoryMaintenanceProposal.payload` documented in schema.prisma.
10
+ */
11
+ export type ApplyMaintenanceProposalBodyDtoPayload = {
12
+ [key: string]: unknown;
13
+ };
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ /**
3
+ * Generated by orval v8.6.2 🍺
4
+ * Do not edit manually.
5
+ * Memory API
6
+ * Persistent agent memory — operational insights, decisions, and patterns that survive across executions
7
+ * OpenAPI spec version: 0.1.0
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Generated by orval v8.6.2 🍺
3
+ * Do not edit manually.
4
+ * Memory API
5
+ * Persistent agent memory — operational insights, decisions, and patterns that survive across executions
6
+ * OpenAPI spec version: 0.1.0
7
+ */
8
+ export interface CreateMemoryBodyDto {
9
+ path: string;
10
+ /** Full markdown body for the new memory file. */
11
+ fileText: string;
12
+ }