@breign/client 1.0.210 → 1.0.211

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.
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { AccessRoleCreateRequestUio, AccessRolePermissionsRequestUio, AccessRoleUio, AccessRoleUpdateRequestUio, CreateToolApprovalRequestUio, DeleteOrganizationUser200ResponseUio, EditToolApprovalRequestUio, MemberAccessRolesUio, OrganizationEngineUio, OrganizationMemberUio, OrganizationOcrConfigUio, OrganizationOcrConfigUpdateRequestUio, OrganizationUio, OrganizationUserInviteRequestUio, OrganizationUserInviteResponseUio, RoleCreateRequestUio, RoleUio, ToolApprovalUio, ToolApprovalsResponseUio, UserAccessRolesRequestUio, UserAccessUio, UserAgentAccessRequestUio, UserAgentAccessUio, UserDirectPermissionsRequestUio } from '../models/index';
13
+ import type { AccessRoleCreateRequestUio, AccessRolePermissionsRequestUio, AccessRoleUio, AccessRoleUpdateRequestUio, CreateToolApprovalRequestUio, DeleteOrganizationUser200ResponseUio, EditToolApprovalRequestUio, MemberAccessRolesUio, MemoryFileContentUio, MemoryFileEntryUio, MemoryFileWriteRequestUio, OrganizationEngineUio, OrganizationMemberUio, OrganizationOcrConfigUio, OrganizationOcrConfigUpdateRequestUio, OrganizationUio, OrganizationUserInviteRequestUio, OrganizationUserInviteResponseUio, RoleCreateRequestUio, RoleUio, ToolApprovalUio, ToolApprovalsResponseUio, UserAccessRolesRequestUio, UserAccessUio, UserAgentAccessRequestUio, UserAgentAccessUio, UserDirectPermissionsRequestUio } from '../models/index';
14
14
  export interface CreateOrganizationAccessRoleRequest {
15
15
  organizationId: string;
16
16
  accessRoleCreateRequestUio: AccessRoleCreateRequestUio;
@@ -30,6 +30,11 @@ export interface DeleteOrganizationAccessRoleRequest {
30
30
  organizationId: string;
31
31
  roleId: string;
32
32
  }
33
+ export interface DeleteOrganizationMemoryFileRequest {
34
+ organizationId: string;
35
+ path: string;
36
+ agentId?: string;
37
+ }
33
38
  export interface DeleteOrganizationRoleRequest {
34
39
  organizationId: string;
35
40
  roleId: string;
@@ -38,6 +43,10 @@ export interface DeleteOrganizationUserRequest {
38
43
  organizationId: string;
39
44
  userId: string;
40
45
  }
46
+ export interface EditOrganizationMemoryFileContentRequest {
47
+ organizationId: string;
48
+ memoryFileWriteRequestUio: MemoryFileWriteRequestUio;
49
+ }
41
50
  export interface EditToolApprovalRequest {
42
51
  organizationId: string;
43
52
  approvalId: string;
@@ -56,6 +65,11 @@ export interface GetOrganizationMemberPermissionsRequest {
56
65
  organizationId: string;
57
66
  agentId?: string;
58
67
  }
68
+ export interface GetOrganizationMemoryFileContentRequest {
69
+ organizationId: string;
70
+ path: string;
71
+ agentId?: string;
72
+ }
59
73
  export interface GetOrganizationOcrConfigRequest {
60
74
  organizationId: string;
61
75
  }
@@ -77,6 +91,9 @@ export interface ListOrganizationAccessRolesRequest {
77
91
  export interface ListOrganizationMemberAccessRolesRequest {
78
92
  organizationId: string;
79
93
  }
94
+ export interface ListOrganizationMemoryFilesRequest {
95
+ organizationId: string;
96
+ }
80
97
  export interface ListOrganizationRolesRequest {
81
98
  organizationId: string;
82
99
  }
@@ -175,6 +192,16 @@ export declare class OrganizationsApi extends runtime.BaseAPI {
175
192
  * Delete an access role from an organization
176
193
  */
177
194
  deleteOrganizationAccessRole(organizationId: string, roleId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
195
+ /**
196
+ * Deletes one file, or every file of a personal space when the path is its root (/shared, or /memories with `agentId`) — the user\'s \"forget everything\". The organisation\'s memory is deleted file by file only. Cannot be undone.
197
+ * Delete a memory file, or a whole personal memory space
198
+ */
199
+ deleteOrganizationMemoryFileRaw(requestParameters: DeleteOrganizationMemoryFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
200
+ /**
201
+ * Deletes one file, or every file of a personal space when the path is its root (/shared, or /memories with `agentId`) — the user\'s \"forget everything\". The organisation\'s memory is deleted file by file only. Cannot be undone.
202
+ * Delete a memory file, or a whole personal memory space
203
+ */
204
+ deleteOrganizationMemoryFile(organizationId: string, path: string, agentId?: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
178
205
  /**
179
206
  * Deletes an agent role from the specified organization
180
207
  * Delete a role from an organization
@@ -193,6 +220,16 @@ export declare class OrganizationsApi extends runtime.BaseAPI {
193
220
  * Remove a user from an organization
194
221
  */
195
222
  deleteOrganizationUser(organizationId: string, userId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DeleteOrganizationUser200ResponseUio>;
223
+ /**
224
+ * Saves a user edit. Optimistic concurrency: the write only lands if the file is still at `expectedVersion`, otherwise a 409 is returned carrying the current version so the client can re-read. The edit is signed by the caller.
225
+ * Edit a memory file
226
+ */
227
+ editOrganizationMemoryFileContentRaw(requestParameters: EditOrganizationMemoryFileContentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<MemoryFileContentUio>>;
228
+ /**
229
+ * Saves a user edit. Optimistic concurrency: the write only lands if the file is still at `expectedVersion`, otherwise a 409 is returned carrying the current version so the client can re-read. The edit is signed by the caller.
230
+ * Edit a memory file
231
+ */
232
+ editOrganizationMemoryFileContent(organizationId: string, memoryFileWriteRequestUio: MemoryFileWriteRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<MemoryFileContentUio>;
196
233
  /**
197
234
  * Rewrites what one approval covers — widening an address into a pattern, or correcting a command. Only an approval the caller granted himself, and only its resource: the scope, the agent and the author never change. An approval cannot be created this way; a right only ever starts with a question the agent actually asked.
198
235
  * Edit an approval the caller granted
@@ -245,6 +282,14 @@ export declare class OrganizationsApi extends runtime.BaseAPI {
245
282
  getOrganizationMemberPermissions(organizationId: string, agentId?: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{
246
283
  [key: string]: boolean;
247
284
  }>;
285
+ /**
286
+ * Read a memory file
287
+ */
288
+ getOrganizationMemoryFileContentRaw(requestParameters: GetOrganizationMemoryFileContentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<MemoryFileContentUio>>;
289
+ /**
290
+ * Read a memory file
291
+ */
292
+ getOrganizationMemoryFileContent(organizationId: string, path: string, agentId?: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<MemoryFileContentUio>;
248
293
  /**
249
294
  * Retourne la configuration OCR (mode, providerId, modelId) de l\'organisation. Une organisation sans configuration renvoie une configuration désactivée (mode DISABLED) : l\'absence de configuration vaut OCR désactivé.
250
295
  * Get an organization OCR configuration
@@ -295,6 +340,16 @@ export declare class OrganizationsApi extends runtime.BaseAPI {
295
340
  * List access roles of every organization member
296
341
  */
297
342
  listOrganizationMemberAccessRoles(organizationId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<MemberAccessRolesUio>>;
343
+ /**
344
+ * The organisation\'s memory (/org) and the caller\'s own personal memory: /shared, and /memories of every agent, whatever the agents\' memory settings (a disabled space still holds what it retained). Never another user\'s personal memory. The content is not returned here; use the content endpoint for that.
345
+ * List the memory files the caller can manage in the organisation
346
+ */
347
+ listOrganizationMemoryFilesRaw(requestParameters: ListOrganizationMemoryFilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<MemoryFileEntryUio>>>;
348
+ /**
349
+ * The organisation\'s memory (/org) and the caller\'s own personal memory: /shared, and /memories of every agent, whatever the agents\' memory settings (a disabled space still holds what it retained). Never another user\'s personal memory. The content is not returned here; use the content endpoint for that.
350
+ * List the memory files the caller can manage in the organisation
351
+ */
352
+ listOrganizationMemoryFiles(organizationId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<MemoryFileEntryUio>>;
298
353
  /**
299
354
  * Retrieves all roles configured for the given organization
300
355
  * List roles of an organization
@@ -210,6 +210,43 @@ class OrganizationsApi extends runtime.BaseAPI {
210
210
  async deleteOrganizationAccessRole(organizationId, roleId, initOverrides) {
211
211
  await this.deleteOrganizationAccessRoleRaw({ organizationId: organizationId, roleId: roleId }, initOverrides);
212
212
  }
213
+ /**
214
+ * Deletes one file, or every file of a personal space when the path is its root (/shared, or /memories with `agentId`) — the user\'s \"forget everything\". The organisation\'s memory is deleted file by file only. Cannot be undone.
215
+ * Delete a memory file, or a whole personal memory space
216
+ */
217
+ async deleteOrganizationMemoryFileRaw(requestParameters, initOverrides) {
218
+ if (requestParameters['organizationId'] == null) {
219
+ throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling deleteOrganizationMemoryFile().');
220
+ }
221
+ if (requestParameters['path'] == null) {
222
+ throw new runtime.RequiredError('path', 'Required parameter "path" was null or undefined when calling deleteOrganizationMemoryFile().');
223
+ }
224
+ const queryParameters = {};
225
+ if (requestParameters['path'] != null) {
226
+ queryParameters['path'] = requestParameters['path'];
227
+ }
228
+ if (requestParameters['agentId'] != null) {
229
+ queryParameters['agentId'] = requestParameters['agentId'];
230
+ }
231
+ const headerParameters = {};
232
+ if (this.configuration && this.configuration.apiKey) {
233
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
234
+ }
235
+ const response = await this.request({
236
+ path: `/organizations/{organizationId}/memory/files`.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId']))),
237
+ method: 'DELETE',
238
+ headers: headerParameters,
239
+ query: queryParameters,
240
+ }, initOverrides);
241
+ return new runtime.VoidApiResponse(response);
242
+ }
243
+ /**
244
+ * Deletes one file, or every file of a personal space when the path is its root (/shared, or /memories with `agentId`) — the user\'s \"forget everything\". The organisation\'s memory is deleted file by file only. Cannot be undone.
245
+ * Delete a memory file, or a whole personal memory space
246
+ */
247
+ async deleteOrganizationMemoryFile(organizationId, path, agentId, initOverrides) {
248
+ await this.deleteOrganizationMemoryFileRaw({ organizationId: organizationId, path: path, agentId: agentId }, initOverrides);
249
+ }
213
250
  /**
214
251
  * Deletes an agent role from the specified organization
215
252
  * Delete a role from an organization
@@ -271,6 +308,40 @@ class OrganizationsApi extends runtime.BaseAPI {
271
308
  const response = await this.deleteOrganizationUserRaw({ organizationId: organizationId, userId: userId }, initOverrides);
272
309
  return await response.value();
273
310
  }
311
+ /**
312
+ * Saves a user edit. Optimistic concurrency: the write only lands if the file is still at `expectedVersion`, otherwise a 409 is returned carrying the current version so the client can re-read. The edit is signed by the caller.
313
+ * Edit a memory file
314
+ */
315
+ async editOrganizationMemoryFileContentRaw(requestParameters, initOverrides) {
316
+ if (requestParameters['organizationId'] == null) {
317
+ throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling editOrganizationMemoryFileContent().');
318
+ }
319
+ if (requestParameters['memoryFileWriteRequestUio'] == null) {
320
+ throw new runtime.RequiredError('memoryFileWriteRequestUio', 'Required parameter "memoryFileWriteRequestUio" was null or undefined when calling editOrganizationMemoryFileContent().');
321
+ }
322
+ const queryParameters = {};
323
+ const headerParameters = {};
324
+ headerParameters['Content-Type'] = 'application/json';
325
+ if (this.configuration && this.configuration.apiKey) {
326
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
327
+ }
328
+ const response = await this.request({
329
+ path: `/organizations/{organizationId}/memory/files/content`.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId']))),
330
+ method: 'PUT',
331
+ headers: headerParameters,
332
+ query: queryParameters,
333
+ body: (0, index_1.MemoryFileWriteRequestUioToJSON)(requestParameters['memoryFileWriteRequestUio']),
334
+ }, initOverrides);
335
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.MemoryFileContentUioFromJSON)(jsonValue));
336
+ }
337
+ /**
338
+ * Saves a user edit. Optimistic concurrency: the write only lands if the file is still at `expectedVersion`, otherwise a 409 is returned carrying the current version so the client can re-read. The edit is signed by the caller.
339
+ * Edit a memory file
340
+ */
341
+ async editOrganizationMemoryFileContent(organizationId, memoryFileWriteRequestUio, initOverrides) {
342
+ const response = await this.editOrganizationMemoryFileContentRaw({ organizationId: organizationId, memoryFileWriteRequestUio: memoryFileWriteRequestUio }, initOverrides);
343
+ return await response.value();
344
+ }
274
345
  /**
275
346
  * Rewrites what one approval covers — widening an address into a pattern, or correcting a command. Only an approval the caller granted himself, and only its resource: the scope, the agent and the author never change. An approval cannot be created this way; a right only ever starts with a question the agent actually asked.
276
347
  * Edit an approval the caller granted
@@ -425,6 +496,42 @@ class OrganizationsApi extends runtime.BaseAPI {
425
496
  const response = await this.getOrganizationMemberPermissionsRaw({ organizationId: organizationId, agentId: agentId }, initOverrides);
426
497
  return await response.value();
427
498
  }
499
+ /**
500
+ * Read a memory file
501
+ */
502
+ async getOrganizationMemoryFileContentRaw(requestParameters, initOverrides) {
503
+ if (requestParameters['organizationId'] == null) {
504
+ throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling getOrganizationMemoryFileContent().');
505
+ }
506
+ if (requestParameters['path'] == null) {
507
+ throw new runtime.RequiredError('path', 'Required parameter "path" was null or undefined when calling getOrganizationMemoryFileContent().');
508
+ }
509
+ const queryParameters = {};
510
+ if (requestParameters['path'] != null) {
511
+ queryParameters['path'] = requestParameters['path'];
512
+ }
513
+ if (requestParameters['agentId'] != null) {
514
+ queryParameters['agentId'] = requestParameters['agentId'];
515
+ }
516
+ const headerParameters = {};
517
+ if (this.configuration && this.configuration.apiKey) {
518
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
519
+ }
520
+ const response = await this.request({
521
+ path: `/organizations/{organizationId}/memory/files/content`.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId']))),
522
+ method: 'GET',
523
+ headers: headerParameters,
524
+ query: queryParameters,
525
+ }, initOverrides);
526
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.MemoryFileContentUioFromJSON)(jsonValue));
527
+ }
528
+ /**
529
+ * Read a memory file
530
+ */
531
+ async getOrganizationMemoryFileContent(organizationId, path, agentId, initOverrides) {
532
+ const response = await this.getOrganizationMemoryFileContentRaw({ organizationId: organizationId, path: path, agentId: agentId }, initOverrides);
533
+ return await response.value();
534
+ }
428
535
  /**
429
536
  * Retourne la configuration OCR (mode, providerId, modelId) de l\'organisation. Une organisation sans configuration renvoie une configuration désactivée (mode DISABLED) : l\'absence de configuration vaut OCR désactivé.
430
537
  * Get an organization OCR configuration
@@ -600,6 +707,35 @@ class OrganizationsApi extends runtime.BaseAPI {
600
707
  const response = await this.listOrganizationMemberAccessRolesRaw({ organizationId: organizationId }, initOverrides);
601
708
  return await response.value();
602
709
  }
710
+ /**
711
+ * The organisation\'s memory (/org) and the caller\'s own personal memory: /shared, and /memories of every agent, whatever the agents\' memory settings (a disabled space still holds what it retained). Never another user\'s personal memory. The content is not returned here; use the content endpoint for that.
712
+ * List the memory files the caller can manage in the organisation
713
+ */
714
+ async listOrganizationMemoryFilesRaw(requestParameters, initOverrides) {
715
+ if (requestParameters['organizationId'] == null) {
716
+ throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling listOrganizationMemoryFiles().');
717
+ }
718
+ const queryParameters = {};
719
+ const headerParameters = {};
720
+ if (this.configuration && this.configuration.apiKey) {
721
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
722
+ }
723
+ const response = await this.request({
724
+ path: `/organizations/{organizationId}/memory/files`.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId']))),
725
+ method: 'GET',
726
+ headers: headerParameters,
727
+ query: queryParameters,
728
+ }, initOverrides);
729
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.MemoryFileEntryUioFromJSON));
730
+ }
731
+ /**
732
+ * The organisation\'s memory (/org) and the caller\'s own personal memory: /shared, and /memories of every agent, whatever the agents\' memory settings (a disabled space still holds what it retained). Never another user\'s personal memory. The content is not returned here; use the content endpoint for that.
733
+ * List the memory files the caller can manage in the organisation
734
+ */
735
+ async listOrganizationMemoryFiles(organizationId, initOverrides) {
736
+ const response = await this.listOrganizationMemoryFilesRaw({ organizationId: organizationId }, initOverrides);
737
+ return await response.value();
738
+ }
603
739
  /**
604
740
  * Retrieves all roles configured for the given organization
605
741
  * List roles of an organization
@@ -0,0 +1,44 @@
1
+ /**
2
+ * brain-client
3
+ * Api ands models for brain-app and brain-app
4
+ *
5
+ * The version of the OpenAPI document: 0.0.0-SNAPSHOT
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface EditOrganizationMemoryFileContent409ResponseUio
16
+ */
17
+ export interface EditOrganizationMemoryFileContent409ResponseUio {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof EditOrganizationMemoryFileContent409ResponseUio
22
+ */
23
+ code: string;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof EditOrganizationMemoryFileContent409ResponseUio
28
+ */
29
+ message: string;
30
+ /**
31
+ *
32
+ * @type {number}
33
+ * @memberof EditOrganizationMemoryFileContent409ResponseUio
34
+ */
35
+ currentVersion: number;
36
+ }
37
+ /**
38
+ * Check if a given object implements the EditOrganizationMemoryFileContent409ResponseUio interface.
39
+ */
40
+ export declare function instanceOfEditOrganizationMemoryFileContent409ResponseUio(value: object): value is EditOrganizationMemoryFileContent409ResponseUio;
41
+ export declare function EditOrganizationMemoryFileContent409ResponseUioFromJSON(json: any): EditOrganizationMemoryFileContent409ResponseUio;
42
+ export declare function EditOrganizationMemoryFileContent409ResponseUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): EditOrganizationMemoryFileContent409ResponseUio;
43
+ export declare function EditOrganizationMemoryFileContent409ResponseUioToJSON(json: any): EditOrganizationMemoryFileContent409ResponseUio;
44
+ export declare function EditOrganizationMemoryFileContent409ResponseUioToJSONTyped(value?: EditOrganizationMemoryFileContent409ResponseUio | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * brain-client
6
+ * Api ands models for brain-app and brain-app
7
+ *
8
+ * The version of the OpenAPI document: 0.0.0-SNAPSHOT
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.instanceOfEditOrganizationMemoryFileContent409ResponseUio = instanceOfEditOrganizationMemoryFileContent409ResponseUio;
17
+ exports.EditOrganizationMemoryFileContent409ResponseUioFromJSON = EditOrganizationMemoryFileContent409ResponseUioFromJSON;
18
+ exports.EditOrganizationMemoryFileContent409ResponseUioFromJSONTyped = EditOrganizationMemoryFileContent409ResponseUioFromJSONTyped;
19
+ exports.EditOrganizationMemoryFileContent409ResponseUioToJSON = EditOrganizationMemoryFileContent409ResponseUioToJSON;
20
+ exports.EditOrganizationMemoryFileContent409ResponseUioToJSONTyped = EditOrganizationMemoryFileContent409ResponseUioToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the EditOrganizationMemoryFileContent409ResponseUio interface.
23
+ */
24
+ function instanceOfEditOrganizationMemoryFileContent409ResponseUio(value) {
25
+ if (!('code' in value) || value['code'] === undefined)
26
+ return false;
27
+ if (!('message' in value) || value['message'] === undefined)
28
+ return false;
29
+ if (!('currentVersion' in value) || value['currentVersion'] === undefined)
30
+ return false;
31
+ return true;
32
+ }
33
+ function EditOrganizationMemoryFileContent409ResponseUioFromJSON(json) {
34
+ return EditOrganizationMemoryFileContent409ResponseUioFromJSONTyped(json, false);
35
+ }
36
+ function EditOrganizationMemoryFileContent409ResponseUioFromJSONTyped(json, ignoreDiscriminator) {
37
+ if (json == null) {
38
+ return json;
39
+ }
40
+ return {
41
+ 'code': json['code'],
42
+ 'message': json['message'],
43
+ 'currentVersion': json['currentVersion'],
44
+ };
45
+ }
46
+ function EditOrganizationMemoryFileContent409ResponseUioToJSON(json) {
47
+ return EditOrganizationMemoryFileContent409ResponseUioToJSONTyped(json, false);
48
+ }
49
+ function EditOrganizationMemoryFileContent409ResponseUioToJSONTyped(value, ignoreDiscriminator = false) {
50
+ if (value == null) {
51
+ return value;
52
+ }
53
+ return {
54
+ 'code': value['code'],
55
+ 'message': value['message'],
56
+ 'currentVersion': value['currentVersion'],
57
+ };
58
+ }
@@ -0,0 +1,62 @@
1
+ /**
2
+ * brain-client
3
+ * Api ands models for brain-app and brain-app
4
+ *
5
+ * The version of the OpenAPI document: 0.0.0-SNAPSHOT
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ * The current state of a memory file. There is no history.
14
+ * @export
15
+ * @interface MemoryFileContentUio
16
+ */
17
+ export interface MemoryFileContentUio {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof MemoryFileContentUio
22
+ */
23
+ path: string;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof MemoryFileContentUio
28
+ */
29
+ agentId: string | null;
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof MemoryFileContentUio
34
+ */
35
+ content: string;
36
+ /**
37
+ * Length of the content, in characters.
38
+ * @type {number}
39
+ * @memberof MemoryFileContentUio
40
+ */
41
+ size: number;
42
+ /**
43
+ * Incremented on every write, by an agent or a user.
44
+ * @type {number}
45
+ * @memberof MemoryFileContentUio
46
+ */
47
+ version: number;
48
+ /**
49
+ *
50
+ * @type {string}
51
+ * @memberof MemoryFileContentUio
52
+ */
53
+ updatedAt: string;
54
+ }
55
+ /**
56
+ * Check if a given object implements the MemoryFileContentUio interface.
57
+ */
58
+ export declare function instanceOfMemoryFileContentUio(value: object): value is MemoryFileContentUio;
59
+ export declare function MemoryFileContentUioFromJSON(json: any): MemoryFileContentUio;
60
+ export declare function MemoryFileContentUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): MemoryFileContentUio;
61
+ export declare function MemoryFileContentUioToJSON(json: any): MemoryFileContentUio;
62
+ export declare function MemoryFileContentUioToJSONTyped(value?: MemoryFileContentUio | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,70 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * brain-client
6
+ * Api ands models for brain-app and brain-app
7
+ *
8
+ * The version of the OpenAPI document: 0.0.0-SNAPSHOT
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.instanceOfMemoryFileContentUio = instanceOfMemoryFileContentUio;
17
+ exports.MemoryFileContentUioFromJSON = MemoryFileContentUioFromJSON;
18
+ exports.MemoryFileContentUioFromJSONTyped = MemoryFileContentUioFromJSONTyped;
19
+ exports.MemoryFileContentUioToJSON = MemoryFileContentUioToJSON;
20
+ exports.MemoryFileContentUioToJSONTyped = MemoryFileContentUioToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the MemoryFileContentUio interface.
23
+ */
24
+ function instanceOfMemoryFileContentUio(value) {
25
+ if (!('path' in value) || value['path'] === undefined)
26
+ return false;
27
+ if (!('agentId' in value) || value['agentId'] === undefined)
28
+ return false;
29
+ if (!('content' in value) || value['content'] === undefined)
30
+ return false;
31
+ if (!('size' in value) || value['size'] === undefined)
32
+ return false;
33
+ if (!('version' in value) || value['version'] === undefined)
34
+ return false;
35
+ if (!('updatedAt' in value) || value['updatedAt'] === undefined)
36
+ return false;
37
+ return true;
38
+ }
39
+ function MemoryFileContentUioFromJSON(json) {
40
+ return MemoryFileContentUioFromJSONTyped(json, false);
41
+ }
42
+ function MemoryFileContentUioFromJSONTyped(json, ignoreDiscriminator) {
43
+ if (json == null) {
44
+ return json;
45
+ }
46
+ return {
47
+ 'path': json['path'],
48
+ 'agentId': json['agentId'],
49
+ 'content': json['content'],
50
+ 'size': json['size'],
51
+ 'version': json['version'],
52
+ 'updatedAt': json['updatedAt'],
53
+ };
54
+ }
55
+ function MemoryFileContentUioToJSON(json) {
56
+ return MemoryFileContentUioToJSONTyped(json, false);
57
+ }
58
+ function MemoryFileContentUioToJSONTyped(value, ignoreDiscriminator = false) {
59
+ if (value == null) {
60
+ return value;
61
+ }
62
+ return {
63
+ 'path': value['path'],
64
+ 'agentId': value['agentId'],
65
+ 'content': value['content'],
66
+ 'size': value['size'],
67
+ 'version': value['version'],
68
+ 'updatedAt': value['updatedAt'],
69
+ };
70
+ }
@@ -0,0 +1,56 @@
1
+ /**
2
+ * brain-client
3
+ * Api ands models for brain-app and brain-app
4
+ *
5
+ * The version of the OpenAPI document: 0.0.0-SNAPSHOT
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ * One memory file the caller can manage in the organisation. Listing entry: it carries only the start of the content (`preview`), enough to recognise the file without opening it.
14
+ * @export
15
+ * @interface MemoryFileEntryUio
16
+ */
17
+ export interface MemoryFileEntryUio {
18
+ /**
19
+ * Virtual path. Its root names the space: /org (the organisation's memory), /shared (the caller's memory shared by all their agents) or /memories (the caller's memory with one agent).
20
+ * @type {string}
21
+ * @memberof MemoryFileEntryUio
22
+ */
23
+ path: string;
24
+ /**
25
+ * The agent a /memories file belongs to; null for /org and /shared.
26
+ * @type {string}
27
+ * @memberof MemoryFileEntryUio
28
+ */
29
+ agentId: string | null;
30
+ /**
31
+ * Length of the content, in characters.
32
+ * @type {number}
33
+ * @memberof MemoryFileEntryUio
34
+ */
35
+ size: number;
36
+ /**
37
+ * Last write, by an agent or a user (ISO 8601).
38
+ * @type {string}
39
+ * @memberof MemoryFileEntryUio
40
+ */
41
+ updatedAt: string;
42
+ /**
43
+ * The first 200 characters of the content.
44
+ * @type {string}
45
+ * @memberof MemoryFileEntryUio
46
+ */
47
+ preview: string;
48
+ }
49
+ /**
50
+ * Check if a given object implements the MemoryFileEntryUio interface.
51
+ */
52
+ export declare function instanceOfMemoryFileEntryUio(value: object): value is MemoryFileEntryUio;
53
+ export declare function MemoryFileEntryUioFromJSON(json: any): MemoryFileEntryUio;
54
+ export declare function MemoryFileEntryUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): MemoryFileEntryUio;
55
+ export declare function MemoryFileEntryUioToJSON(json: any): MemoryFileEntryUio;
56
+ export declare function MemoryFileEntryUioToJSONTyped(value?: MemoryFileEntryUio | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * brain-client
6
+ * Api ands models for brain-app and brain-app
7
+ *
8
+ * The version of the OpenAPI document: 0.0.0-SNAPSHOT
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.instanceOfMemoryFileEntryUio = instanceOfMemoryFileEntryUio;
17
+ exports.MemoryFileEntryUioFromJSON = MemoryFileEntryUioFromJSON;
18
+ exports.MemoryFileEntryUioFromJSONTyped = MemoryFileEntryUioFromJSONTyped;
19
+ exports.MemoryFileEntryUioToJSON = MemoryFileEntryUioToJSON;
20
+ exports.MemoryFileEntryUioToJSONTyped = MemoryFileEntryUioToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the MemoryFileEntryUio interface.
23
+ */
24
+ function instanceOfMemoryFileEntryUio(value) {
25
+ if (!('path' in value) || value['path'] === undefined)
26
+ return false;
27
+ if (!('agentId' in value) || value['agentId'] === undefined)
28
+ return false;
29
+ if (!('size' in value) || value['size'] === undefined)
30
+ return false;
31
+ if (!('updatedAt' in value) || value['updatedAt'] === undefined)
32
+ return false;
33
+ if (!('preview' in value) || value['preview'] === undefined)
34
+ return false;
35
+ return true;
36
+ }
37
+ function MemoryFileEntryUioFromJSON(json) {
38
+ return MemoryFileEntryUioFromJSONTyped(json, false);
39
+ }
40
+ function MemoryFileEntryUioFromJSONTyped(json, ignoreDiscriminator) {
41
+ if (json == null) {
42
+ return json;
43
+ }
44
+ return {
45
+ 'path': json['path'],
46
+ 'agentId': json['agentId'],
47
+ 'size': json['size'],
48
+ 'updatedAt': json['updatedAt'],
49
+ 'preview': json['preview'],
50
+ };
51
+ }
52
+ function MemoryFileEntryUioToJSON(json) {
53
+ return MemoryFileEntryUioToJSONTyped(json, false);
54
+ }
55
+ function MemoryFileEntryUioToJSONTyped(value, ignoreDiscriminator = false) {
56
+ if (value == null) {
57
+ return value;
58
+ }
59
+ return {
60
+ 'path': value['path'],
61
+ 'agentId': value['agentId'],
62
+ 'size': value['size'],
63
+ 'updatedAt': value['updatedAt'],
64
+ 'preview': value['preview'],
65
+ };
66
+ }
@@ -0,0 +1,50 @@
1
+ /**
2
+ * brain-client
3
+ * Api ands models for brain-app and brain-app
4
+ *
5
+ * The version of the OpenAPI document: 0.0.0-SNAPSHOT
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ * A user edit of a memory file. Optimistic: `expectedVersion` is the version the client read, and the write is refused with a 409 if an agent wrote since. The file must already exist; this never creates one.
14
+ * @export
15
+ * @interface MemoryFileWriteRequestUio
16
+ */
17
+ export interface MemoryFileWriteRequestUio {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof MemoryFileWriteRequestUio
22
+ */
23
+ path: string;
24
+ /**
25
+ * Required for a /memories path, rejected otherwise.
26
+ * @type {string}
27
+ * @memberof MemoryFileWriteRequestUio
28
+ */
29
+ agentId?: string | null;
30
+ /**
31
+ * Bounded by the same length limit as the agents' own writes.
32
+ * @type {string}
33
+ * @memberof MemoryFileWriteRequestUio
34
+ */
35
+ content: string;
36
+ /**
37
+ * The version the client last read. A mismatch yields a 409.
38
+ * @type {number}
39
+ * @memberof MemoryFileWriteRequestUio
40
+ */
41
+ expectedVersion: number;
42
+ }
43
+ /**
44
+ * Check if a given object implements the MemoryFileWriteRequestUio interface.
45
+ */
46
+ export declare function instanceOfMemoryFileWriteRequestUio(value: object): value is MemoryFileWriteRequestUio;
47
+ export declare function MemoryFileWriteRequestUioFromJSON(json: any): MemoryFileWriteRequestUio;
48
+ export declare function MemoryFileWriteRequestUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): MemoryFileWriteRequestUio;
49
+ export declare function MemoryFileWriteRequestUioToJSON(json: any): MemoryFileWriteRequestUio;
50
+ export declare function MemoryFileWriteRequestUioToJSONTyped(value?: MemoryFileWriteRequestUio | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * brain-client
6
+ * Api ands models for brain-app and brain-app
7
+ *
8
+ * The version of the OpenAPI document: 0.0.0-SNAPSHOT
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.instanceOfMemoryFileWriteRequestUio = instanceOfMemoryFileWriteRequestUio;
17
+ exports.MemoryFileWriteRequestUioFromJSON = MemoryFileWriteRequestUioFromJSON;
18
+ exports.MemoryFileWriteRequestUioFromJSONTyped = MemoryFileWriteRequestUioFromJSONTyped;
19
+ exports.MemoryFileWriteRequestUioToJSON = MemoryFileWriteRequestUioToJSON;
20
+ exports.MemoryFileWriteRequestUioToJSONTyped = MemoryFileWriteRequestUioToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the MemoryFileWriteRequestUio interface.
23
+ */
24
+ function instanceOfMemoryFileWriteRequestUio(value) {
25
+ if (!('path' in value) || value['path'] === undefined)
26
+ return false;
27
+ if (!('content' in value) || value['content'] === undefined)
28
+ return false;
29
+ if (!('expectedVersion' in value) || value['expectedVersion'] === undefined)
30
+ return false;
31
+ return true;
32
+ }
33
+ function MemoryFileWriteRequestUioFromJSON(json) {
34
+ return MemoryFileWriteRequestUioFromJSONTyped(json, false);
35
+ }
36
+ function MemoryFileWriteRequestUioFromJSONTyped(json, ignoreDiscriminator) {
37
+ if (json == null) {
38
+ return json;
39
+ }
40
+ return {
41
+ 'path': json['path'],
42
+ 'agentId': json['agentId'] == null ? undefined : json['agentId'],
43
+ 'content': json['content'],
44
+ 'expectedVersion': json['expectedVersion'],
45
+ };
46
+ }
47
+ function MemoryFileWriteRequestUioToJSON(json) {
48
+ return MemoryFileWriteRequestUioToJSONTyped(json, false);
49
+ }
50
+ function MemoryFileWriteRequestUioToJSONTyped(value, ignoreDiscriminator = false) {
51
+ if (value == null) {
52
+ return value;
53
+ }
54
+ return {
55
+ 'path': value['path'],
56
+ 'agentId': value['agentId'],
57
+ 'content': value['content'],
58
+ 'expectedVersion': value['expectedVersion'],
59
+ };
60
+ }
@@ -290,6 +290,7 @@ export * from './DeletePlatformEngineResponseUio';
290
290
  export * from './DeleteProvider200ResponseKnowledgeBasesAffectedInnerUio';
291
291
  export * from './DeleteProvider200ResponseUio';
292
292
  export * from './EditConversationWorkspaceFileContent409ResponseUio';
293
+ export * from './EditOrganizationMemoryFileContent409ResponseUio';
293
294
  export * from './EditToolApprovalRequestUio';
294
295
  export * from './EmbeddingProviderModelsInnerUio';
295
296
  export * from './EmbeddingProviderUio';
@@ -481,6 +482,9 @@ export * from './McpTicketViewUio';
481
482
  export * from './MemberAccessRolesUio';
482
483
  export * from './MemberRefUio';
483
484
  export * from './MemberTypeUio';
485
+ export * from './MemoryFileContentUio';
486
+ export * from './MemoryFileEntryUio';
487
+ export * from './MemoryFileWriteRequestUio';
484
488
  export * from './MessageAnonymizationUio';
485
489
  export * from './MessageAudioDownloadUrlUio';
486
490
  export * from './MessageStatusErrorUio';
@@ -308,6 +308,7 @@ __exportStar(require("./DeletePlatformEngineResponseUio"), exports);
308
308
  __exportStar(require("./DeleteProvider200ResponseKnowledgeBasesAffectedInnerUio"), exports);
309
309
  __exportStar(require("./DeleteProvider200ResponseUio"), exports);
310
310
  __exportStar(require("./EditConversationWorkspaceFileContent409ResponseUio"), exports);
311
+ __exportStar(require("./EditOrganizationMemoryFileContent409ResponseUio"), exports);
311
312
  __exportStar(require("./EditToolApprovalRequestUio"), exports);
312
313
  __exportStar(require("./EmbeddingProviderModelsInnerUio"), exports);
313
314
  __exportStar(require("./EmbeddingProviderUio"), exports);
@@ -499,6 +500,9 @@ __exportStar(require("./McpTicketViewUio"), exports);
499
500
  __exportStar(require("./MemberAccessRolesUio"), exports);
500
501
  __exportStar(require("./MemberRefUio"), exports);
501
502
  __exportStar(require("./MemberTypeUio"), exports);
503
+ __exportStar(require("./MemoryFileContentUio"), exports);
504
+ __exportStar(require("./MemoryFileEntryUio"), exports);
505
+ __exportStar(require("./MemoryFileWriteRequestUio"), exports);
502
506
  __exportStar(require("./MessageAnonymizationUio"), exports);
503
507
  __exportStar(require("./MessageAudioDownloadUrlUio"), exports);
504
508
  __exportStar(require("./MessageStatusErrorUio"), exports);
package/dist/openapi.json CHANGED
@@ -10344,6 +10344,221 @@
10344
10344
  "tags" : [ "organizations" ]
10345
10345
  }
10346
10346
  },
10347
+ "/organizations/{organizationId}/memory/files" : {
10348
+ "delete" : {
10349
+ "description" : "Deletes one file, or every file of a personal space when the path is its root (/shared, or /memories with `agentId`) — the user's \"forget everything\". The organisation's memory is deleted file by file only. Cannot be undone.",
10350
+ "operationId" : "deleteOrganizationMemoryFile",
10351
+ "parameters" : [ {
10352
+ "description" : "ID of the organization",
10353
+ "in" : "path",
10354
+ "name" : "organizationId",
10355
+ "required" : true,
10356
+ "schema" : {
10357
+ "type" : "string"
10358
+ }
10359
+ }, {
10360
+ "description" : "Virtual path of a memory file. Its root names the space: /org (the organisation's memory), /shared (the caller's memory shared by all their agents) or /memories (the caller's memory with one agent, which then requires `agentId`). Rejected with 400 when it contains a traversal or uses characters outside [A-Za-z0-9._-].",
10361
+ "example" : "/org/core.md",
10362
+ "in" : "query",
10363
+ "name" : "path",
10364
+ "required" : true,
10365
+ "schema" : {
10366
+ "type" : "string"
10367
+ }
10368
+ }, {
10369
+ "description" : "The agent a /memories path belongs to. Required for /memories, rejected for /org and /shared.",
10370
+ "in" : "query",
10371
+ "name" : "agentId",
10372
+ "required" : false,
10373
+ "schema" : {
10374
+ "type" : "string"
10375
+ }
10376
+ } ],
10377
+ "responses" : {
10378
+ "204" : {
10379
+ "description" : "Successfully deleted."
10380
+ },
10381
+ "400" : {
10382
+ "description" : "Missing or invalid path or agentId, or /org as a whole"
10383
+ },
10384
+ "401" : {
10385
+ "description" : "Unauthorized"
10386
+ },
10387
+ "403" : {
10388
+ "description" : "Forbidden - Not a member of the organisation, or a service identity"
10389
+ },
10390
+ "500" : {
10391
+ "description" : "Server error"
10392
+ }
10393
+ },
10394
+ "summary" : "Delete a memory file, or a whole personal memory space",
10395
+ "tags" : [ "organizations" ]
10396
+ },
10397
+ "get" : {
10398
+ "description" : "The organisation's memory (/org) and the caller's own personal memory: /shared, and /memories of every agent, whatever the agents' memory settings (a disabled space still holds what it retained). Never another user's personal memory. The content is not returned here; use the content endpoint for that.",
10399
+ "operationId" : "listOrganizationMemoryFiles",
10400
+ "parameters" : [ {
10401
+ "description" : "ID of the organization",
10402
+ "in" : "path",
10403
+ "name" : "organizationId",
10404
+ "required" : true,
10405
+ "schema" : {
10406
+ "type" : "string"
10407
+ }
10408
+ } ],
10409
+ "responses" : {
10410
+ "200" : {
10411
+ "content" : {
10412
+ "application/json" : {
10413
+ "schema" : {
10414
+ "items" : {
10415
+ "$ref" : "#/components/schemas/MemoryFileEntry"
10416
+ },
10417
+ "type" : "array"
10418
+ }
10419
+ }
10420
+ },
10421
+ "description" : "Successfully retrieved the listing, sorted by path."
10422
+ },
10423
+ "401" : {
10424
+ "description" : "Unauthorized"
10425
+ },
10426
+ "403" : {
10427
+ "description" : "Forbidden - Not a member of the organisation, or a service identity"
10428
+ },
10429
+ "500" : {
10430
+ "description" : "Server error"
10431
+ }
10432
+ },
10433
+ "summary" : "List the memory files the caller can manage in the organisation",
10434
+ "tags" : [ "organizations" ]
10435
+ }
10436
+ },
10437
+ "/organizations/{organizationId}/memory/files/content" : {
10438
+ "get" : {
10439
+ "operationId" : "getOrganizationMemoryFileContent",
10440
+ "parameters" : [ {
10441
+ "description" : "ID of the organization",
10442
+ "in" : "path",
10443
+ "name" : "organizationId",
10444
+ "required" : true,
10445
+ "schema" : {
10446
+ "type" : "string"
10447
+ }
10448
+ }, {
10449
+ "description" : "Virtual path of a memory file. Its root names the space: /org (the organisation's memory), /shared (the caller's memory shared by all their agents) or /memories (the caller's memory with one agent, which then requires `agentId`). Rejected with 400 when it contains a traversal or uses characters outside [A-Za-z0-9._-].",
10450
+ "example" : "/org/core.md",
10451
+ "in" : "query",
10452
+ "name" : "path",
10453
+ "required" : true,
10454
+ "schema" : {
10455
+ "type" : "string"
10456
+ }
10457
+ }, {
10458
+ "description" : "The agent a /memories path belongs to. Required for /memories, rejected for /org and /shared.",
10459
+ "in" : "query",
10460
+ "name" : "agentId",
10461
+ "required" : false,
10462
+ "schema" : {
10463
+ "type" : "string"
10464
+ }
10465
+ } ],
10466
+ "responses" : {
10467
+ "200" : {
10468
+ "content" : {
10469
+ "application/json" : {
10470
+ "schema" : {
10471
+ "$ref" : "#/components/schemas/MemoryFileContent"
10472
+ }
10473
+ }
10474
+ },
10475
+ "description" : "Successfully retrieved the file."
10476
+ },
10477
+ "400" : {
10478
+ "description" : "Missing or invalid path or agentId"
10479
+ },
10480
+ "401" : {
10481
+ "description" : "Unauthorized"
10482
+ },
10483
+ "403" : {
10484
+ "description" : "Forbidden - Not a member of the organisation, or a service identity"
10485
+ },
10486
+ "404" : {
10487
+ "description" : "Memory file not found"
10488
+ },
10489
+ "500" : {
10490
+ "description" : "Server error"
10491
+ }
10492
+ },
10493
+ "summary" : "Read a memory file",
10494
+ "tags" : [ "organizations" ]
10495
+ },
10496
+ "put" : {
10497
+ "description" : "Saves a user edit. Optimistic concurrency: the write only lands if the file is still at `expectedVersion`, otherwise a 409 is returned carrying the current version so the client can re-read. The edit is signed by the caller.",
10498
+ "operationId" : "editOrganizationMemoryFileContent",
10499
+ "parameters" : [ {
10500
+ "description" : "ID of the organization",
10501
+ "in" : "path",
10502
+ "name" : "organizationId",
10503
+ "required" : true,
10504
+ "schema" : {
10505
+ "type" : "string"
10506
+ }
10507
+ } ],
10508
+ "requestBody" : {
10509
+ "content" : {
10510
+ "application/json" : {
10511
+ "schema" : {
10512
+ "$ref" : "#/components/schemas/MemoryFileWriteRequest"
10513
+ }
10514
+ }
10515
+ },
10516
+ "required" : true
10517
+ },
10518
+ "responses" : {
10519
+ "200" : {
10520
+ "content" : {
10521
+ "application/json" : {
10522
+ "schema" : {
10523
+ "$ref" : "#/components/schemas/MemoryFileContent"
10524
+ }
10525
+ }
10526
+ },
10527
+ "description" : "Successfully saved. Returns the file at its new version."
10528
+ },
10529
+ "400" : {
10530
+ "description" : "Invalid path, agentId or body (the content must be plain text)"
10531
+ },
10532
+ "401" : {
10533
+ "description" : "Unauthorized"
10534
+ },
10535
+ "403" : {
10536
+ "description" : "Forbidden - Not a member of the organisation, or a service identity"
10537
+ },
10538
+ "404" : {
10539
+ "description" : "Memory file not found"
10540
+ },
10541
+ "409" : {
10542
+ "content" : {
10543
+ "application/json" : {
10544
+ "schema" : {
10545
+ "$ref" : "#/components/schemas/editOrganizationMemoryFileContent_409_response"
10546
+ }
10547
+ }
10548
+ },
10549
+ "description" : "An agent wrote the file since it was read. Besides the usual error `code` and `message`, the body carries `currentVersion` so the client can re-read."
10550
+ },
10551
+ "413" : {
10552
+ "description" : "Content exceeds the memory length limit"
10553
+ },
10554
+ "500" : {
10555
+ "description" : "Server error"
10556
+ }
10557
+ },
10558
+ "summary" : "Edit a memory file",
10559
+ "tags" : [ "organizations" ]
10560
+ }
10561
+ },
10347
10562
  "/organizations/{organizationId}/member-access-roles" : {
10348
10563
  "get" : {
10349
10564
  "operationId" : "listOrganizationMemberAccessRoles",
@@ -24625,6 +24840,25 @@
24625
24840
  "type" : "string"
24626
24841
  }
24627
24842
  },
24843
+ "memoryPathQuery" : {
24844
+ "description" : "Virtual path of a memory file. Its root names the space: /org (the organisation's memory), /shared (the caller's memory shared by all their agents) or /memories (the caller's memory with one agent, which then requires `agentId`). Rejected with 400 when it contains a traversal or uses characters outside [A-Za-z0-9._-].",
24845
+ "example" : "/org/core.md",
24846
+ "in" : "query",
24847
+ "name" : "path",
24848
+ "required" : true,
24849
+ "schema" : {
24850
+ "type" : "string"
24851
+ }
24852
+ },
24853
+ "memoryAgentIdQuery" : {
24854
+ "description" : "The agent a /memories path belongs to. Required for /memories, rejected for /org and /shared.",
24855
+ "in" : "query",
24856
+ "name" : "agentId",
24857
+ "required" : false,
24858
+ "schema" : {
24859
+ "type" : "string"
24860
+ }
24861
+ },
24628
24862
  "manifestIdPath" : {
24629
24863
  "description" : "ID of the manifest",
24630
24864
  "in" : "path",
@@ -31420,6 +31654,90 @@
31420
31654
  },
31421
31655
  "type" : "object"
31422
31656
  },
31657
+ "MemoryFileEntry" : {
31658
+ "description" : "One memory file the caller can manage in the organisation. Listing entry: it carries only the start of the content (`preview`), enough to recognise the file without opening it.",
31659
+ "properties" : {
31660
+ "path" : {
31661
+ "description" : "Virtual path. Its root names the space: /org (the organisation's memory), /shared (the caller's memory shared by all their agents) or /memories (the caller's memory with one agent).",
31662
+ "example" : "/memories/core.md",
31663
+ "type" : "string"
31664
+ },
31665
+ "agentId" : {
31666
+ "description" : "The agent a /memories file belongs to; null for /org and /shared.",
31667
+ "nullable" : true,
31668
+ "type" : "string"
31669
+ },
31670
+ "size" : {
31671
+ "description" : "Length of the content, in characters.",
31672
+ "type" : "integer"
31673
+ },
31674
+ "updatedAt" : {
31675
+ "description" : "Last write, by an agent or a user (ISO 8601).",
31676
+ "type" : "string"
31677
+ },
31678
+ "preview" : {
31679
+ "description" : "The first 200 characters of the content.",
31680
+ "type" : "string"
31681
+ }
31682
+ },
31683
+ "required" : [ "agentId", "path", "preview", "size", "updatedAt" ],
31684
+ "type" : "object"
31685
+ },
31686
+ "MemoryFileContent" : {
31687
+ "description" : "The current state of a memory file. There is no history.",
31688
+ "properties" : {
31689
+ "path" : {
31690
+ "example" : "/org/core.md",
31691
+ "type" : "string"
31692
+ },
31693
+ "agentId" : {
31694
+ "nullable" : true,
31695
+ "type" : "string"
31696
+ },
31697
+ "content" : {
31698
+ "type" : "string"
31699
+ },
31700
+ "size" : {
31701
+ "description" : "Length of the content, in characters.",
31702
+ "type" : "integer"
31703
+ },
31704
+ "version" : {
31705
+ "description" : "Incremented on every write, by an agent or a user.",
31706
+ "type" : "integer"
31707
+ },
31708
+ "updatedAt" : {
31709
+ "type" : "string"
31710
+ }
31711
+ },
31712
+ "required" : [ "agentId", "content", "path", "size", "updatedAt", "version" ],
31713
+ "type" : "object"
31714
+ },
31715
+ "MemoryFileWriteRequest" : {
31716
+ "additionalProperties" : false,
31717
+ "description" : "A user edit of a memory file. Optimistic: `expectedVersion` is the version the client read, and the write is refused with a 409 if an agent wrote since. The file must already exist; this never creates one.",
31718
+ "properties" : {
31719
+ "path" : {
31720
+ "example" : "/org/core.md",
31721
+ "type" : "string"
31722
+ },
31723
+ "agentId" : {
31724
+ "description" : "Required for a /memories path, rejected otherwise.",
31725
+ "nullable" : true,
31726
+ "type" : "string"
31727
+ },
31728
+ "content" : {
31729
+ "description" : "Bounded by the same length limit as the agents' own writes.",
31730
+ "type" : "string"
31731
+ },
31732
+ "expectedVersion" : {
31733
+ "description" : "The version the client last read. A mismatch yields a 409.",
31734
+ "minimum" : 1,
31735
+ "type" : "integer"
31736
+ }
31737
+ },
31738
+ "required" : [ "content", "expectedVersion", "path" ],
31739
+ "type" : "object"
31740
+ },
31423
31741
  "MemberAccessRoles" : {
31424
31742
  "description" : "Explicit access roles of one member (none means the default role for their legacy role).",
31425
31743
  "properties" : {
@@ -40814,6 +41132,21 @@
40814
41132
  "required" : [ "success" ],
40815
41133
  "type" : "object"
40816
41134
  },
41135
+ "editOrganizationMemoryFileContent_409_response" : {
41136
+ "properties" : {
41137
+ "code" : {
41138
+ "type" : "string"
41139
+ },
41140
+ "message" : {
41141
+ "type" : "string"
41142
+ },
41143
+ "currentVersion" : {
41144
+ "type" : "integer"
41145
+ }
41146
+ },
41147
+ "required" : [ "code", "currentVersion", "message" ],
41148
+ "type" : "object"
41149
+ },
40817
41150
  "createToolApproval_request" : {
40818
41151
  "additionalProperties" : false,
40819
41152
  "properties" : {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@breign/client",
3
- "version": "1.0.210",
3
+ "version": "1.0.211",
4
4
  "main": "dist/index.js",
5
5
  "exports": {
6
6
  ".": "./dist/index.js",