@breign/client 1.0.141 → 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.
- package/dist/apis/ConversationsApi.d.ts +15 -1
- package/dist/apis/ConversationsApi.js +34 -0
- package/dist/models/EditConversationWorkspaceFileContent409ResponseUio.d.ts +38 -0
- package/dist/models/EditConversationWorkspaceFileContent409ResponseUio.js +50 -0
- package/dist/models/WorkspaceFileWriteRequestUio.d.ts +44 -0
- package/dist/models/WorkspaceFileWriteRequestUio.js +58 -0
- package/dist/models/index.d.ts +2 -0
- package/dist/models/index.js +2 -0
- package/dist/openapi.json +98 -0
- package/package.json +1 -1
|
@@ -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
|
+
*
|
|
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
|
+
}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -196,6 +196,7 @@ export * from './DeleteMessageAudio200ResponseUio';
|
|
|
196
196
|
export * from './DeleteOrganizationUser200ResponseUio';
|
|
197
197
|
export * from './DeleteProvider200ResponseKnowledgeBasesAffectedInnerUio';
|
|
198
198
|
export * from './DeleteProvider200ResponseUio';
|
|
199
|
+
export * from './EditConversationWorkspaceFileContent409ResponseUio';
|
|
199
200
|
export * from './EditToolApprovalRequestUio';
|
|
200
201
|
export * from './EmbeddingProviderModelsInnerUio';
|
|
201
202
|
export * from './EmbeddingProviderUio';
|
|
@@ -452,3 +453,4 @@ export * from './UserLockRequestUio';
|
|
|
452
453
|
export * from './UserUpdateRequestUio';
|
|
453
454
|
export * from './WorkspaceFileContentUio';
|
|
454
455
|
export * from './WorkspaceFileEntryUio';
|
|
456
|
+
export * from './WorkspaceFileWriteRequestUio';
|
package/dist/models/index.js
CHANGED
|
@@ -214,6 +214,7 @@ __exportStar(require("./DeleteMessageAudio200ResponseUio"), exports);
|
|
|
214
214
|
__exportStar(require("./DeleteOrganizationUser200ResponseUio"), exports);
|
|
215
215
|
__exportStar(require("./DeleteProvider200ResponseKnowledgeBasesAffectedInnerUio"), exports);
|
|
216
216
|
__exportStar(require("./DeleteProvider200ResponseUio"), exports);
|
|
217
|
+
__exportStar(require("./EditConversationWorkspaceFileContent409ResponseUio"), exports);
|
|
217
218
|
__exportStar(require("./EditToolApprovalRequestUio"), exports);
|
|
218
219
|
__exportStar(require("./EmbeddingProviderModelsInnerUio"), exports);
|
|
219
220
|
__exportStar(require("./EmbeddingProviderUio"), exports);
|
|
@@ -470,3 +471,4 @@ __exportStar(require("./UserLockRequestUio"), exports);
|
|
|
470
471
|
__exportStar(require("./UserUpdateRequestUio"), exports);
|
|
471
472
|
__exportStar(require("./WorkspaceFileContentUio"), exports);
|
|
472
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" : {
|
|
@@ -19112,6 +19177,27 @@
|
|
|
19112
19177
|
"required" : [ "content", "mimeType", "path", "size", "updatedAt", "version" ],
|
|
19113
19178
|
"type" : "object"
|
|
19114
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
|
+
},
|
|
19115
19201
|
"MessageAnonymization" : {
|
|
19116
19202
|
"additionalProperties" : false,
|
|
19117
19203
|
"properties" : {
|
|
@@ -23274,6 +23360,18 @@
|
|
|
23274
23360
|
"required" : [ "error" ],
|
|
23275
23361
|
"type" : "object"
|
|
23276
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
|
+
},
|
|
23277
23375
|
"deleteProvider_200_response_knowledgeBasesAffected_inner" : {
|
|
23278
23376
|
"properties" : {
|
|
23279
23377
|
"id" : {
|