@breign/client 1.0.140 → 1.0.142

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 { AgentChatOverviewEntryUio, AttachmentCreateRequestUio, AttachmentCreateResponseUio, AttachmentDetailsResponseUio, AttachmentProcessedRequestUio, BodyWithMessageUio, ContextLocationRequestUio, ContextUio, ConversationSummaryUio, CreateCustomVariable200ResponseUio, MarkConversationReadRequestUio, MessageAnonymizationUio, SetUserAgentConversationRequestUio, ToolCallResultRequestUio, ToolCallResultResponseUio, ToolCallsResponseUio, UpdateConversationTitleRequestUio, UpdateUserChatPreferencesRequestUio, UserChatPreferencesUio, WorkspaceFileContentUio, WorkspaceFileEntryUio } from '../models/index';
13
+ import type { AgentChatOverviewEntryUio, AttachmentCreateRequestUio, AttachmentCreateResponseUio, AttachmentDetailsResponseUio, AttachmentProcessedRequestUio, BodyWithMessageUio, ContextLocationRequestUio, ContextUio, ConversationSummaryUio, CreateCustomVariable200ResponseUio, MarkConversationReadRequestUio, MessageAnonymizationUio, SetUserAgentConversationRequestUio, ToolCallResultRequestUio, ToolCallResultResponseUio, ToolCallsResponseUio, UpdateConversationTitleRequestUio, UpdateUserChatPreferencesRequestUio, UserChatPreferencesUio, WorkspaceFileContentUio, WorkspaceFileEntryUio, WorkspaceFileWriteRequestUio } from '../models/index';
14
14
  export interface ArchiveConversationByIdRequest {
15
15
  conversationId: string;
16
16
  }
@@ -39,6 +39,10 @@ export interface DeleteConversationWorkspaceFileRequest {
39
39
  conversationId: string;
40
40
  path: string;
41
41
  }
42
+ export interface EditConversationWorkspaceFileContentRequest {
43
+ conversationId: string;
44
+ workspaceFileWriteRequestUio: WorkspaceFileWriteRequestUio;
45
+ }
42
46
  export interface GetAgentChatOverviewRequest {
43
47
  organizationId: string;
44
48
  }
@@ -194,6 +198,16 @@ export declare class ConversationsApi extends runtime.BaseAPI {
194
198
  * Delete a file from a conversation workspace
195
199
  */
196
200
  deleteConversationWorkspaceFile(conversationId: string, path: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
201
+ /**
202
+ * 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 agent\'s own writes are unconditional by contrast — it overwrites, then reads the user\'s edit at its next turn. Saving also discards any running sandbox session for this conversation, so the agent cannot write the file back from a stale in-memory copy.
203
+ * Edit the content of a conversation workspace file
204
+ */
205
+ editConversationWorkspaceFileContentRaw(requestParameters: EditConversationWorkspaceFileContentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WorkspaceFileContentUio>>;
206
+ /**
207
+ * 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 agent\'s own writes are unconditional by contrast — it overwrites, then reads the user\'s edit at its next turn. Saving also discards any running sandbox session for this conversation, so the agent cannot write the file back from a stale in-memory copy.
208
+ * Edit the content of a conversation workspace file
209
+ */
210
+ editConversationWorkspaceFileContent(conversationId: string, workspaceFileWriteRequestUio: WorkspaceFileWriteRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WorkspaceFileContentUio>;
197
211
  /**
198
212
  * Pour chaque agent de l\'organisation avec lequel l\'utilisateur a une conversation, renvoie sa conversation la plus récente, le nombre de messages non lus et l\'indication d\'une réponse en cours de génération.
199
213
  * Get the multi-agent chat overview
@@ -273,6 +273,40 @@ class ConversationsApi extends runtime.BaseAPI {
273
273
  async deleteConversationWorkspaceFile(conversationId, path, initOverrides) {
274
274
  await this.deleteConversationWorkspaceFileRaw({ conversationId: conversationId, path: path }, initOverrides);
275
275
  }
276
+ /**
277
+ * 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 agent\'s own writes are unconditional by contrast — it overwrites, then reads the user\'s edit at its next turn. Saving also discards any running sandbox session for this conversation, so the agent cannot write the file back from a stale in-memory copy.
278
+ * Edit the content of a conversation workspace file
279
+ */
280
+ async editConversationWorkspaceFileContentRaw(requestParameters, initOverrides) {
281
+ if (requestParameters['conversationId'] == null) {
282
+ throw new runtime.RequiredError('conversationId', 'Required parameter "conversationId" was null or undefined when calling editConversationWorkspaceFileContent().');
283
+ }
284
+ if (requestParameters['workspaceFileWriteRequestUio'] == null) {
285
+ throw new runtime.RequiredError('workspaceFileWriteRequestUio', 'Required parameter "workspaceFileWriteRequestUio" was null or undefined when calling editConversationWorkspaceFileContent().');
286
+ }
287
+ const queryParameters = {};
288
+ const headerParameters = {};
289
+ headerParameters['Content-Type'] = 'application/json';
290
+ if (this.configuration && this.configuration.apiKey) {
291
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
292
+ }
293
+ const response = await this.request({
294
+ path: `/conversations/{conversationId}/workspace/files/content`.replace(`{${"conversationId"}}`, encodeURIComponent(String(requestParameters['conversationId']))),
295
+ method: 'PUT',
296
+ headers: headerParameters,
297
+ query: queryParameters,
298
+ body: (0, index_1.WorkspaceFileWriteRequestUioToJSON)(requestParameters['workspaceFileWriteRequestUio']),
299
+ }, initOverrides);
300
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.WorkspaceFileContentUioFromJSON)(jsonValue));
301
+ }
302
+ /**
303
+ * 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 agent\'s own writes are unconditional by contrast — it overwrites, then reads the user\'s edit at its next turn. Saving also discards any running sandbox session for this conversation, so the agent cannot write the file back from a stale in-memory copy.
304
+ * Edit the content of a conversation workspace file
305
+ */
306
+ async editConversationWorkspaceFileContent(conversationId, workspaceFileWriteRequestUio, initOverrides) {
307
+ const response = await this.editConversationWorkspaceFileContentRaw({ conversationId: conversationId, workspaceFileWriteRequestUio: workspaceFileWriteRequestUio }, initOverrides);
308
+ return await response.value();
309
+ }
276
310
  /**
277
311
  * Pour chaque agent de l\'organisation avec lequel l\'utilisateur a une conversation, renvoie sa conversation la plus récente, le nombre de messages non lus et l\'indication d\'une réponse en cours de génération.
278
312
  * Get the multi-agent chat overview
@@ -0,0 +1,38 @@
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
+ * Per-agent activation of agent-to-agent calls. Opt-in: the agent may question the agents listed in allowedAgentIds, and no other. An empty list keeps the tool out of its toolbox.
14
+ * @export
15
+ * @interface AgentCallConfigurationUio
16
+ */
17
+ export interface AgentCallConfigurationUio {
18
+ /**
19
+ * Enables the Agent_ask tool for this agent.
20
+ * @type {boolean}
21
+ * @memberof AgentCallConfigurationUio
22
+ */
23
+ enabled?: boolean;
24
+ /**
25
+ * Agents this agent is allowed to question. Same organisation only, enforced server-side.
26
+ * @type {Array<string>}
27
+ * @memberof AgentCallConfigurationUio
28
+ */
29
+ allowedAgentIds?: Array<string>;
30
+ }
31
+ /**
32
+ * Check if a given object implements the AgentCallConfigurationUio interface.
33
+ */
34
+ export declare function instanceOfAgentCallConfigurationUio(value: object): value is AgentCallConfigurationUio;
35
+ export declare function AgentCallConfigurationUioFromJSON(json: any): AgentCallConfigurationUio;
36
+ export declare function AgentCallConfigurationUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): AgentCallConfigurationUio;
37
+ export declare function AgentCallConfigurationUioToJSON(json: any): AgentCallConfigurationUio;
38
+ export declare function AgentCallConfigurationUioToJSONTyped(value?: AgentCallConfigurationUio | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,50 @@
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.instanceOfAgentCallConfigurationUio = instanceOfAgentCallConfigurationUio;
17
+ exports.AgentCallConfigurationUioFromJSON = AgentCallConfigurationUioFromJSON;
18
+ exports.AgentCallConfigurationUioFromJSONTyped = AgentCallConfigurationUioFromJSONTyped;
19
+ exports.AgentCallConfigurationUioToJSON = AgentCallConfigurationUioToJSON;
20
+ exports.AgentCallConfigurationUioToJSONTyped = AgentCallConfigurationUioToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the AgentCallConfigurationUio interface.
23
+ */
24
+ function instanceOfAgentCallConfigurationUio(value) {
25
+ return true;
26
+ }
27
+ function AgentCallConfigurationUioFromJSON(json) {
28
+ return AgentCallConfigurationUioFromJSONTyped(json, false);
29
+ }
30
+ function AgentCallConfigurationUioFromJSONTyped(json, ignoreDiscriminator) {
31
+ if (json == null) {
32
+ return json;
33
+ }
34
+ return {
35
+ 'enabled': json['enabled'] == null ? undefined : json['enabled'],
36
+ 'allowedAgentIds': json['allowedAgentIds'] == null ? undefined : json['allowedAgentIds'],
37
+ };
38
+ }
39
+ function AgentCallConfigurationUioToJSON(json) {
40
+ return AgentCallConfigurationUioToJSONTyped(json, false);
41
+ }
42
+ function AgentCallConfigurationUioToJSONTyped(value, ignoreDiscriminator = false) {
43
+ if (value == null) {
44
+ return value;
45
+ }
46
+ return {
47
+ 'enabled': value['enabled'],
48
+ 'allowedAgentIds': value['allowedAgentIds'],
49
+ };
50
+ }
@@ -19,6 +19,7 @@ import type { AgentPatchEngineUio } from './AgentPatchEngineUio';
19
19
  import type { AgentSandboxConfigurationUio } from './AgentSandboxConfigurationUio';
20
20
  import type { AgentTypeUio } from './AgentTypeUio';
21
21
  import type { AgentComputerUseConfigurationUio } from './AgentComputerUseConfigurationUio';
22
+ import type { AgentCallConfigurationUio } from './AgentCallConfigurationUio';
22
23
  /**
23
24
  *
24
25
  * @export
@@ -185,6 +186,12 @@ export interface AgentPatchUio {
185
186
  * @memberof AgentPatchUio
186
187
  */
187
188
  computerUseConfiguration?: AgentComputerUseConfigurationUio | null;
189
+ /**
190
+ *
191
+ * @type {AgentCallConfigurationUio}
192
+ * @memberof AgentPatchUio
193
+ */
194
+ agentCallConfiguration?: AgentCallConfigurationUio | null;
188
195
  }
189
196
  /**
190
197
  * Check if a given object implements the AgentPatchUio interface.
@@ -28,6 +28,7 @@ const AgentPatchEngineUio_1 = require("./AgentPatchEngineUio");
28
28
  const AgentSandboxConfigurationUio_1 = require("./AgentSandboxConfigurationUio");
29
29
  const AgentTypeUio_1 = require("./AgentTypeUio");
30
30
  const AgentComputerUseConfigurationUio_1 = require("./AgentComputerUseConfigurationUio");
31
+ const AgentCallConfigurationUio_1 = require("./AgentCallConfigurationUio");
31
32
  /**
32
33
  * Check if a given object implements the AgentPatchUio interface.
33
34
  */
@@ -68,6 +69,7 @@ function AgentPatchUioFromJSONTyped(json, ignoreDiscriminator) {
68
69
  'speechToText': json['speechToText'] == null ? undefined : (0, SpeechToTextConfigUio_1.SpeechToTextConfigUioFromJSON)(json['speechToText']),
69
70
  'sandboxConfiguration': json['sandboxConfiguration'] == null ? undefined : (0, AgentSandboxConfigurationUio_1.AgentSandboxConfigurationUioFromJSON)(json['sandboxConfiguration']),
70
71
  'computerUseConfiguration': json['computerUseConfiguration'] == null ? undefined : (0, AgentComputerUseConfigurationUio_1.AgentComputerUseConfigurationUioFromJSON)(json['computerUseConfiguration']),
72
+ 'agentCallConfiguration': json['agentCallConfiguration'] == null ? undefined : (0, AgentCallConfigurationUio_1.AgentCallConfigurationUioFromJSON)(json['agentCallConfiguration']),
71
73
  };
72
74
  }
73
75
  function AgentPatchUioToJSON(json) {
@@ -104,5 +106,6 @@ function AgentPatchUioToJSONTyped(value, ignoreDiscriminator = false) {
104
106
  'speechToText': (0, SpeechToTextConfigUio_1.SpeechToTextConfigUioToJSON)(value['speechToText']),
105
107
  'sandboxConfiguration': (0, AgentSandboxConfigurationUio_1.AgentSandboxConfigurationUioToJSON)(value['sandboxConfiguration']),
106
108
  'computerUseConfiguration': (0, AgentComputerUseConfigurationUio_1.AgentComputerUseConfigurationUioToJSON)(value['computerUseConfiguration']),
109
+ 'agentCallConfiguration': (0, AgentCallConfigurationUio_1.AgentCallConfigurationUioToJSON)(value['agentCallConfiguration']),
107
110
  };
108
111
  }
@@ -22,6 +22,7 @@ import type { SpeechToTextConfigUio } from './SpeechToTextConfigUio';
22
22
  import type { AgentMemoryConfigurationUio } from './AgentMemoryConfigurationUio';
23
23
  import type { AgentTypeUio } from './AgentTypeUio';
24
24
  import type { AgentComputerUseConfigurationUio } from './AgentComputerUseConfigurationUio';
25
+ import type { AgentCallConfigurationUio } from './AgentCallConfigurationUio';
25
26
  /**
26
27
  *
27
28
  * @export
@@ -206,6 +207,12 @@ export interface AgentUio {
206
207
  * @memberof AgentUio
207
208
  */
208
209
  computerUseConfiguration?: AgentComputerUseConfigurationUio | null;
210
+ /**
211
+ *
212
+ * @type {AgentCallConfigurationUio}
213
+ * @memberof AgentUio
214
+ */
215
+ agentCallConfiguration?: AgentCallConfigurationUio | null;
209
216
  /**
210
217
  *
211
218
  * @type {AgentCreatorUio}
@@ -32,6 +32,7 @@ const SpeechToTextConfigUio_1 = require("./SpeechToTextConfigUio");
32
32
  const AgentMemoryConfigurationUio_1 = require("./AgentMemoryConfigurationUio");
33
33
  const AgentTypeUio_1 = require("./AgentTypeUio");
34
34
  const AgentComputerUseConfigurationUio_1 = require("./AgentComputerUseConfigurationUio");
35
+ const AgentCallConfigurationUio_1 = require("./AgentCallConfigurationUio");
35
36
  /**
36
37
  * @export
37
38
  */
@@ -101,6 +102,7 @@ function AgentUioFromJSONTyped(json, ignoreDiscriminator) {
101
102
  'speechToText': json['speechToText'] == null ? undefined : (0, SpeechToTextConfigUio_1.SpeechToTextConfigUioFromJSON)(json['speechToText']),
102
103
  'sandboxConfiguration': json['sandboxConfiguration'] == null ? undefined : (0, AgentSandboxConfigurationUio_1.AgentSandboxConfigurationUioFromJSON)(json['sandboxConfiguration']),
103
104
  'computerUseConfiguration': json['computerUseConfiguration'] == null ? undefined : (0, AgentComputerUseConfigurationUio_1.AgentComputerUseConfigurationUioFromJSON)(json['computerUseConfiguration']),
105
+ 'agentCallConfiguration': json['agentCallConfiguration'] == null ? undefined : (0, AgentCallConfigurationUio_1.AgentCallConfigurationUioFromJSON)(json['agentCallConfiguration']),
104
106
  'creator': json['creator'] == null ? undefined : (0, AgentCreatorUio_1.AgentCreatorUioFromJSON)(json['creator']),
105
107
  'engineSource': json['engineSource'] == null ? undefined : json['engineSource'],
106
108
  'providerSource': json['providerSource'] == null ? undefined : json['providerSource'],
@@ -144,6 +146,7 @@ function AgentUioToJSONTyped(value, ignoreDiscriminator = false) {
144
146
  'speechToText': (0, SpeechToTextConfigUio_1.SpeechToTextConfigUioToJSON)(value['speechToText']),
145
147
  'sandboxConfiguration': (0, AgentSandboxConfigurationUio_1.AgentSandboxConfigurationUioToJSON)(value['sandboxConfiguration']),
146
148
  'computerUseConfiguration': (0, AgentComputerUseConfigurationUio_1.AgentComputerUseConfigurationUioToJSON)(value['computerUseConfiguration']),
149
+ 'agentCallConfiguration': (0, AgentCallConfigurationUio_1.AgentCallConfigurationUioToJSON)(value['agentCallConfiguration']),
147
150
  'creator': (0, AgentCreatorUio_1.AgentCreatorUioToJSON)(value['creator']),
148
151
  'engineSource': value['engineSource'],
149
152
  'providerSource': value['providerSource'],
@@ -0,0 +1,38 @@
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 EditConversationWorkspaceFileContent409ResponseUio
16
+ */
17
+ export interface EditConversationWorkspaceFileContent409ResponseUio {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof EditConversationWorkspaceFileContent409ResponseUio
22
+ */
23
+ error?: string;
24
+ /**
25
+ *
26
+ * @type {number}
27
+ * @memberof EditConversationWorkspaceFileContent409ResponseUio
28
+ */
29
+ currentVersion?: number | null;
30
+ }
31
+ /**
32
+ * Check if a given object implements the EditConversationWorkspaceFileContent409ResponseUio interface.
33
+ */
34
+ export declare function instanceOfEditConversationWorkspaceFileContent409ResponseUio(value: object): value is EditConversationWorkspaceFileContent409ResponseUio;
35
+ export declare function EditConversationWorkspaceFileContent409ResponseUioFromJSON(json: any): EditConversationWorkspaceFileContent409ResponseUio;
36
+ export declare function EditConversationWorkspaceFileContent409ResponseUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): EditConversationWorkspaceFileContent409ResponseUio;
37
+ export declare function EditConversationWorkspaceFileContent409ResponseUioToJSON(json: any): EditConversationWorkspaceFileContent409ResponseUio;
38
+ export declare function EditConversationWorkspaceFileContent409ResponseUioToJSONTyped(value?: EditConversationWorkspaceFileContent409ResponseUio | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,50 @@
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.instanceOfEditConversationWorkspaceFileContent409ResponseUio = instanceOfEditConversationWorkspaceFileContent409ResponseUio;
17
+ exports.EditConversationWorkspaceFileContent409ResponseUioFromJSON = EditConversationWorkspaceFileContent409ResponseUioFromJSON;
18
+ exports.EditConversationWorkspaceFileContent409ResponseUioFromJSONTyped = EditConversationWorkspaceFileContent409ResponseUioFromJSONTyped;
19
+ exports.EditConversationWorkspaceFileContent409ResponseUioToJSON = EditConversationWorkspaceFileContent409ResponseUioToJSON;
20
+ exports.EditConversationWorkspaceFileContent409ResponseUioToJSONTyped = EditConversationWorkspaceFileContent409ResponseUioToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the EditConversationWorkspaceFileContent409ResponseUio interface.
23
+ */
24
+ function instanceOfEditConversationWorkspaceFileContent409ResponseUio(value) {
25
+ return true;
26
+ }
27
+ function EditConversationWorkspaceFileContent409ResponseUioFromJSON(json) {
28
+ return EditConversationWorkspaceFileContent409ResponseUioFromJSONTyped(json, false);
29
+ }
30
+ function EditConversationWorkspaceFileContent409ResponseUioFromJSONTyped(json, ignoreDiscriminator) {
31
+ if (json == null) {
32
+ return json;
33
+ }
34
+ return {
35
+ 'error': json['error'] == null ? undefined : json['error'],
36
+ 'currentVersion': json['currentVersion'] == null ? undefined : json['currentVersion'],
37
+ };
38
+ }
39
+ function EditConversationWorkspaceFileContent409ResponseUioToJSON(json) {
40
+ return EditConversationWorkspaceFileContent409ResponseUioToJSONTyped(json, false);
41
+ }
42
+ function EditConversationWorkspaceFileContent409ResponseUioToJSONTyped(value, ignoreDiscriminator = false) {
43
+ if (value == null) {
44
+ return value;
45
+ }
46
+ return {
47
+ 'error': value['error'],
48
+ 'currentVersion': value['currentVersion'],
49
+ };
50
+ }
@@ -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
+ * A user edit of a workspace file. Optimistic: `expectedVersion` is the version the client read, and the write is refused with a 409 if the store has moved since — the agent may have rewritten the file between the read and the save. The file must already exist; this never creates one. `mimeType` is not accepted: the server derives it from the extension.
14
+ * @export
15
+ * @interface WorkspaceFileWriteRequestUio
16
+ */
17
+ export interface WorkspaceFileWriteRequestUio {
18
+ /**
19
+ * Absolute path inside the sandbox, always under /home/user.
20
+ * @type {string}
21
+ * @memberof WorkspaceFileWriteRequestUio
22
+ */
23
+ path: string;
24
+ /**
25
+ * UTF-8 text, without NUL bytes. Bounded by the same per-file limit as the agent's own writes.
26
+ * @type {string}
27
+ * @memberof WorkspaceFileWriteRequestUio
28
+ */
29
+ content: string;
30
+ /**
31
+ * The version the client last read. A mismatch yields a 409.
32
+ * @type {number}
33
+ * @memberof WorkspaceFileWriteRequestUio
34
+ */
35
+ expectedVersion: number;
36
+ }
37
+ /**
38
+ * Check if a given object implements the WorkspaceFileWriteRequestUio interface.
39
+ */
40
+ export declare function instanceOfWorkspaceFileWriteRequestUio(value: object): value is WorkspaceFileWriteRequestUio;
41
+ export declare function WorkspaceFileWriteRequestUioFromJSON(json: any): WorkspaceFileWriteRequestUio;
42
+ export declare function WorkspaceFileWriteRequestUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): WorkspaceFileWriteRequestUio;
43
+ export declare function WorkspaceFileWriteRequestUioToJSON(json: any): WorkspaceFileWriteRequestUio;
44
+ export declare function WorkspaceFileWriteRequestUioToJSONTyped(value?: WorkspaceFileWriteRequestUio | 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.instanceOfWorkspaceFileWriteRequestUio = instanceOfWorkspaceFileWriteRequestUio;
17
+ exports.WorkspaceFileWriteRequestUioFromJSON = WorkspaceFileWriteRequestUioFromJSON;
18
+ exports.WorkspaceFileWriteRequestUioFromJSONTyped = WorkspaceFileWriteRequestUioFromJSONTyped;
19
+ exports.WorkspaceFileWriteRequestUioToJSON = WorkspaceFileWriteRequestUioToJSON;
20
+ exports.WorkspaceFileWriteRequestUioToJSONTyped = WorkspaceFileWriteRequestUioToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the WorkspaceFileWriteRequestUio interface.
23
+ */
24
+ function instanceOfWorkspaceFileWriteRequestUio(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 WorkspaceFileWriteRequestUioFromJSON(json) {
34
+ return WorkspaceFileWriteRequestUioFromJSONTyped(json, false);
35
+ }
36
+ function WorkspaceFileWriteRequestUioFromJSONTyped(json, ignoreDiscriminator) {
37
+ if (json == null) {
38
+ return json;
39
+ }
40
+ return {
41
+ 'path': json['path'],
42
+ 'content': json['content'],
43
+ 'expectedVersion': json['expectedVersion'],
44
+ };
45
+ }
46
+ function WorkspaceFileWriteRequestUioToJSON(json) {
47
+ return WorkspaceFileWriteRequestUioToJSONTyped(json, false);
48
+ }
49
+ function WorkspaceFileWriteRequestUioToJSONTyped(value, ignoreDiscriminator = false) {
50
+ if (value == null) {
51
+ return value;
52
+ }
53
+ return {
54
+ 'path': value['path'],
55
+ 'content': value['content'],
56
+ 'expectedVersion': value['expectedVersion'],
57
+ };
58
+ }
@@ -10,6 +10,7 @@ export * from './AdvancedFlowEditorUio';
10
10
  export * from './AdvancedFlowEditorUpdateRequestUio';
11
11
  export * from './AgentBundleDiffUio';
12
12
  export * from './AgentBundleListDiffUio';
13
+ export * from './AgentCallConfigurationUio';
13
14
  export * from './AgentChatOverviewEntryUio';
14
15
  export * from './AgentComputerUseConfigurationUio';
15
16
  export * from './AgentCreatorUio';
@@ -195,6 +196,7 @@ export * from './DeleteMessageAudio200ResponseUio';
195
196
  export * from './DeleteOrganizationUser200ResponseUio';
196
197
  export * from './DeleteProvider200ResponseKnowledgeBasesAffectedInnerUio';
197
198
  export * from './DeleteProvider200ResponseUio';
199
+ export * from './EditConversationWorkspaceFileContent409ResponseUio';
198
200
  export * from './EditToolApprovalRequestUio';
199
201
  export * from './EmbeddingProviderModelsInnerUio';
200
202
  export * from './EmbeddingProviderUio';
@@ -451,3 +453,4 @@ export * from './UserLockRequestUio';
451
453
  export * from './UserUpdateRequestUio';
452
454
  export * from './WorkspaceFileContentUio';
453
455
  export * from './WorkspaceFileEntryUio';
456
+ export * from './WorkspaceFileWriteRequestUio';
@@ -28,6 +28,7 @@ __exportStar(require("./AdvancedFlowEditorUio"), exports);
28
28
  __exportStar(require("./AdvancedFlowEditorUpdateRequestUio"), exports);
29
29
  __exportStar(require("./AgentBundleDiffUio"), exports);
30
30
  __exportStar(require("./AgentBundleListDiffUio"), exports);
31
+ __exportStar(require("./AgentCallConfigurationUio"), exports);
31
32
  __exportStar(require("./AgentChatOverviewEntryUio"), exports);
32
33
  __exportStar(require("./AgentComputerUseConfigurationUio"), exports);
33
34
  __exportStar(require("./AgentCreatorUio"), exports);
@@ -213,6 +214,7 @@ __exportStar(require("./DeleteMessageAudio200ResponseUio"), exports);
213
214
  __exportStar(require("./DeleteOrganizationUser200ResponseUio"), exports);
214
215
  __exportStar(require("./DeleteProvider200ResponseKnowledgeBasesAffectedInnerUio"), exports);
215
216
  __exportStar(require("./DeleteProvider200ResponseUio"), exports);
217
+ __exportStar(require("./EditConversationWorkspaceFileContent409ResponseUio"), exports);
216
218
  __exportStar(require("./EditToolApprovalRequestUio"), exports);
217
219
  __exportStar(require("./EmbeddingProviderModelsInnerUio"), exports);
218
220
  __exportStar(require("./EmbeddingProviderUio"), exports);
@@ -469,3 +471,4 @@ __exportStar(require("./UserLockRequestUio"), exports);
469
471
  __exportStar(require("./UserUpdateRequestUio"), exports);
470
472
  __exportStar(require("./WorkspaceFileContentUio"), exports);
471
473
  __exportStar(require("./WorkspaceFileEntryUio"), exports);
474
+ __exportStar(require("./WorkspaceFileWriteRequestUio"), exports);
package/dist/openapi.json CHANGED
@@ -6077,6 +6077,71 @@
6077
6077
  },
6078
6078
  "summary" : "Read the content of a conversation workspace file",
6079
6079
  "tags" : [ "conversations" ]
6080
+ },
6081
+ "put" : {
6082
+ "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 agent's own writes are unconditional by contrast — it overwrites, then reads the user's edit at its next turn. Saving also discards any running sandbox session for this conversation, so the agent cannot write the file back from a stale in-memory copy.",
6083
+ "operationId" : "editConversationWorkspaceFileContent",
6084
+ "parameters" : [ {
6085
+ "description" : "The ID of the conversation",
6086
+ "in" : "path",
6087
+ "name" : "conversationId",
6088
+ "required" : true,
6089
+ "schema" : {
6090
+ "type" : "string"
6091
+ }
6092
+ } ],
6093
+ "requestBody" : {
6094
+ "content" : {
6095
+ "application/json" : {
6096
+ "schema" : {
6097
+ "$ref" : "#/components/schemas/WorkspaceFileWriteRequest"
6098
+ }
6099
+ }
6100
+ },
6101
+ "required" : true
6102
+ },
6103
+ "responses" : {
6104
+ "200" : {
6105
+ "content" : {
6106
+ "application/json" : {
6107
+ "schema" : {
6108
+ "$ref" : "#/components/schemas/WorkspaceFileContent"
6109
+ }
6110
+ }
6111
+ },
6112
+ "description" : "Successfully saved. Returns the file at its new version."
6113
+ },
6114
+ "400" : {
6115
+ "description" : "Invalid path, non-text content, or invalid expectedVersion"
6116
+ },
6117
+ "401" : {
6118
+ "description" : "Unauthorized"
6119
+ },
6120
+ "403" : {
6121
+ "description" : "Forbidden - User cannot access this conversation"
6122
+ },
6123
+ "404" : {
6124
+ "description" : "Conversation or workspace file not found"
6125
+ },
6126
+ "409" : {
6127
+ "content" : {
6128
+ "application/json" : {
6129
+ "schema" : {
6130
+ "$ref" : "#/components/schemas/editConversationWorkspaceFileContent_409_response"
6131
+ }
6132
+ }
6133
+ },
6134
+ "description" : "The file was modified since it was read. The body carries `currentVersion` so the client can re-read and let the user reconcile."
6135
+ },
6136
+ "413" : {
6137
+ "description" : "Content exceeds the per-file limit, or the workspace quota is reached"
6138
+ },
6139
+ "500" : {
6140
+ "description" : "Server error"
6141
+ }
6142
+ },
6143
+ "summary" : "Edit the content of a conversation workspace file",
6144
+ "tags" : [ "conversations" ]
6080
6145
  }
6081
6146
  },
6082
6147
  "/conversations/{conversationId}/anonymization" : {
@@ -15580,6 +15645,12 @@
15580
15645
  } ],
15581
15646
  "nullable" : true
15582
15647
  },
15648
+ "agentCallConfiguration" : {
15649
+ "allOf" : [ {
15650
+ "$ref" : "#/components/schemas/AgentCallConfiguration"
15651
+ } ],
15652
+ "nullable" : true
15653
+ },
15583
15654
  "creator" : {
15584
15655
  "$ref" : "#/components/schemas/Agent_creator"
15585
15656
  },
@@ -15779,6 +15850,24 @@
15779
15850
  },
15780
15851
  "type" : "object"
15781
15852
  },
15853
+ "AgentCallConfiguration" : {
15854
+ "description" : "Per-agent activation of agent-to-agent calls. Opt-in: the agent may question the agents listed in allowedAgentIds, and no other. An empty list keeps the tool out of its toolbox.",
15855
+ "properties" : {
15856
+ "enabled" : {
15857
+ "description" : "Enables the Agent_ask tool for this agent.",
15858
+ "type" : "boolean"
15859
+ },
15860
+ "allowedAgentIds" : {
15861
+ "description" : "Agents this agent is allowed to question. Same organisation only, enforced server-side.",
15862
+ "items" : {
15863
+ "type" : "string"
15864
+ },
15865
+ "maxItems" : 20,
15866
+ "type" : "array"
15867
+ }
15868
+ },
15869
+ "type" : "object"
15870
+ },
15782
15871
  "AgentTool" : {
15783
15872
  "properties" : {
15784
15873
  "id" : {
@@ -15956,6 +16045,12 @@
15956
16045
  "$ref" : "#/components/schemas/AgentComputerUseConfiguration"
15957
16046
  } ],
15958
16047
  "nullable" : true
16048
+ },
16049
+ "agentCallConfiguration" : {
16050
+ "allOf" : [ {
16051
+ "$ref" : "#/components/schemas/AgentCallConfiguration"
16052
+ } ],
16053
+ "nullable" : true
15959
16054
  }
15960
16055
  },
15961
16056
  "type" : "object"
@@ -19082,6 +19177,27 @@
19082
19177
  "required" : [ "content", "mimeType", "path", "size", "updatedAt", "version" ],
19083
19178
  "type" : "object"
19084
19179
  },
19180
+ "WorkspaceFileWriteRequest" : {
19181
+ "description" : "A user edit of a workspace file. Optimistic: `expectedVersion` is the version the client read, and the write is refused with a 409 if the store has moved since — the agent may have rewritten the file between the read and the save. The file must already exist; this never creates one. `mimeType` is not accepted: the server derives it from the extension.",
19182
+ "properties" : {
19183
+ "path" : {
19184
+ "description" : "Absolute path inside the sandbox, always under /home/user.",
19185
+ "example" : "/home/user/out/rapport.md",
19186
+ "type" : "string"
19187
+ },
19188
+ "content" : {
19189
+ "description" : "UTF-8 text, without NUL bytes. Bounded by the same per-file limit as the agent's own writes.",
19190
+ "type" : "string"
19191
+ },
19192
+ "expectedVersion" : {
19193
+ "description" : "The version the client last read. A mismatch yields a 409.",
19194
+ "minimum" : 1,
19195
+ "type" : "integer"
19196
+ }
19197
+ },
19198
+ "required" : [ "content", "expectedVersion", "path" ],
19199
+ "type" : "object"
19200
+ },
19085
19201
  "MessageAnonymization" : {
19086
19202
  "additionalProperties" : false,
19087
19203
  "properties" : {
@@ -23244,6 +23360,18 @@
23244
23360
  "required" : [ "error" ],
23245
23361
  "type" : "object"
23246
23362
  },
23363
+ "editConversationWorkspaceFileContent_409_response" : {
23364
+ "properties" : {
23365
+ "error" : {
23366
+ "type" : "string"
23367
+ },
23368
+ "currentVersion" : {
23369
+ "nullable" : true,
23370
+ "type" : "integer"
23371
+ }
23372
+ },
23373
+ "type" : "object"
23374
+ },
23247
23375
  "deleteProvider_200_response_knowledgeBasesAffected_inner" : {
23248
23376
  "properties" : {
23249
23377
  "id" : {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@breign/client",
3
- "version": "1.0.140",
3
+ "version": "1.0.142",
4
4
  "main": "dist/index.js",
5
5
  "exports": {
6
6
  ".": "./dist/index.js",