@breign/client 1.0.138 → 1.0.139
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/OrganizationsApi.d.ts +58 -1
- package/dist/apis/OrganizationsApi.js +134 -0
- package/dist/models/AgentSandboxNetworkConfigurationUio.d.ts +2 -2
- package/dist/models/ChatMessageUio.d.ts +7 -0
- package/dist/models/ChatMessageUio.js +3 -0
- package/dist/models/ConversationMessageApprovalUio.d.ts +70 -0
- package/dist/models/ConversationMessageApprovalUio.js +74 -0
- package/dist/models/ConversationMessagesInnerUio.d.ts +7 -0
- package/dist/models/ConversationMessagesInnerUio.js +3 -0
- package/dist/models/CreateToolApprovalRequestUio.d.ts +53 -0
- package/dist/models/CreateToolApprovalRequestUio.js +67 -0
- package/dist/models/EditToolApprovalRequestUio.d.ts +47 -0
- package/dist/models/EditToolApprovalRequestUio.js +63 -0
- package/dist/models/ToolApprovalUio.d.ts +85 -0
- package/dist/models/ToolApprovalUio.js +88 -0
- package/dist/models/ToolApprovalsResponseUio.d.ts +33 -0
- package/dist/models/ToolApprovalsResponseUio.js +51 -0
- package/dist/models/ToolCallResultRequestUio.d.ts +28 -0
- package/dist/models/ToolCallResultRequestUio.js +19 -1
- package/dist/models/ToolCallUio.d.ts +4 -4
- package/dist/models/ToolCallUio.js +2 -4
- package/dist/models/index.d.ts +5 -0
- package/dist/models/index.js +5 -0
- package/dist/openapi.json +354 -5
- package/package.json +1 -1
|
@@ -0,0 +1,47 @@
|
|
|
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 EditToolApprovalRequestUio
|
|
16
|
+
*/
|
|
17
|
+
export interface EditToolApprovalRequestUio {
|
|
18
|
+
/**
|
|
19
|
+
* The family the edited value belongs to. Changing it is allowed and is the point: an approved address becomes a pattern this way.
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof EditToolApprovalRequestUio
|
|
22
|
+
*/
|
|
23
|
+
resourceKind: EditToolApprovalRequestUioResourceKindEnum;
|
|
24
|
+
/**
|
|
25
|
+
* The new value. An address is re-normalised server-side (https only, no credentials, no ambiguous separators) and stored as a prefix; a pattern is a glob — a star stands for any text up to the next slash, everything else is literal — that must start with https://, close its host with a slash and end with a slash or a star; a command is stored exactly as written, whitespace normalised.
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof EditToolApprovalRequestUio
|
|
28
|
+
*/
|
|
29
|
+
resource: string;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* @export
|
|
33
|
+
*/
|
|
34
|
+
export declare const EditToolApprovalRequestUioResourceKindEnum: {
|
|
35
|
+
readonly Url: "url";
|
|
36
|
+
readonly Command: "command";
|
|
37
|
+
readonly UrlPattern: "urlPattern";
|
|
38
|
+
};
|
|
39
|
+
export type EditToolApprovalRequestUioResourceKindEnum = typeof EditToolApprovalRequestUioResourceKindEnum[keyof typeof EditToolApprovalRequestUioResourceKindEnum];
|
|
40
|
+
/**
|
|
41
|
+
* Check if a given object implements the EditToolApprovalRequestUio interface.
|
|
42
|
+
*/
|
|
43
|
+
export declare function instanceOfEditToolApprovalRequestUio(value: object): value is EditToolApprovalRequestUio;
|
|
44
|
+
export declare function EditToolApprovalRequestUioFromJSON(json: any): EditToolApprovalRequestUio;
|
|
45
|
+
export declare function EditToolApprovalRequestUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): EditToolApprovalRequestUio;
|
|
46
|
+
export declare function EditToolApprovalRequestUioToJSON(json: any): EditToolApprovalRequestUio;
|
|
47
|
+
export declare function EditToolApprovalRequestUioToJSONTyped(value?: EditToolApprovalRequestUio | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,63 @@
|
|
|
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.EditToolApprovalRequestUioResourceKindEnum = void 0;
|
|
17
|
+
exports.instanceOfEditToolApprovalRequestUio = instanceOfEditToolApprovalRequestUio;
|
|
18
|
+
exports.EditToolApprovalRequestUioFromJSON = EditToolApprovalRequestUioFromJSON;
|
|
19
|
+
exports.EditToolApprovalRequestUioFromJSONTyped = EditToolApprovalRequestUioFromJSONTyped;
|
|
20
|
+
exports.EditToolApprovalRequestUioToJSON = EditToolApprovalRequestUioToJSON;
|
|
21
|
+
exports.EditToolApprovalRequestUioToJSONTyped = EditToolApprovalRequestUioToJSONTyped;
|
|
22
|
+
/**
|
|
23
|
+
* @export
|
|
24
|
+
*/
|
|
25
|
+
exports.EditToolApprovalRequestUioResourceKindEnum = {
|
|
26
|
+
Url: 'url',
|
|
27
|
+
Command: 'command',
|
|
28
|
+
UrlPattern: 'urlPattern'
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Check if a given object implements the EditToolApprovalRequestUio interface.
|
|
32
|
+
*/
|
|
33
|
+
function instanceOfEditToolApprovalRequestUio(value) {
|
|
34
|
+
if (!('resourceKind' in value) || value['resourceKind'] === undefined)
|
|
35
|
+
return false;
|
|
36
|
+
if (!('resource' in value) || value['resource'] === undefined)
|
|
37
|
+
return false;
|
|
38
|
+
return true;
|
|
39
|
+
}
|
|
40
|
+
function EditToolApprovalRequestUioFromJSON(json) {
|
|
41
|
+
return EditToolApprovalRequestUioFromJSONTyped(json, false);
|
|
42
|
+
}
|
|
43
|
+
function EditToolApprovalRequestUioFromJSONTyped(json, ignoreDiscriminator) {
|
|
44
|
+
if (json == null) {
|
|
45
|
+
return json;
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
'resourceKind': json['resourceKind'],
|
|
49
|
+
'resource': json['resource'],
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
function EditToolApprovalRequestUioToJSON(json) {
|
|
53
|
+
return EditToolApprovalRequestUioToJSONTyped(json, false);
|
|
54
|
+
}
|
|
55
|
+
function EditToolApprovalRequestUioToJSONTyped(value, ignoreDiscriminator = false) {
|
|
56
|
+
if (value == null) {
|
|
57
|
+
return value;
|
|
58
|
+
}
|
|
59
|
+
return {
|
|
60
|
+
'resourceKind': value['resourceKind'],
|
|
61
|
+
'resource': value['resource'],
|
|
62
|
+
};
|
|
63
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
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 operation the user has authorised an agent to perform. Two families share this shape: an address the agent sandbox may reach, and a python command it may run. An address is stored normalised — query string, fragment and credentials removed — so a token carried by the URL the user saw is not kept here; a command is stored as it was approved, since the command itself is what was judged.
|
|
14
|
+
* @export
|
|
15
|
+
* @interface ToolApprovalUio
|
|
16
|
+
*/
|
|
17
|
+
export interface ToolApprovalUio {
|
|
18
|
+
/**
|
|
19
|
+
* Identifier to revoke the approval with.
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof ToolApprovalUio
|
|
22
|
+
*/
|
|
23
|
+
id: string;
|
|
24
|
+
/**
|
|
25
|
+
* What the approval covers. agentUser — this agent, for this user, across all of their conversations — is the only scope stored today. user is still listed because rows stored under it remain in force and readable. A one-off "allow once" answer creates no row here at all: it is recorded on the tool call it answered, see ToolCallApproval.
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof ToolApprovalUio
|
|
28
|
+
*/
|
|
29
|
+
scopeKind: ToolApprovalUioScopeKindEnum;
|
|
30
|
+
/**
|
|
31
|
+
* The tool the approval applies to. Approvals never cross tools.
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof ToolApprovalUio
|
|
34
|
+
*/
|
|
35
|
+
toolName: string;
|
|
36
|
+
/**
|
|
37
|
+
* Which family the approval belongs to. url is an address the agent sandbox may reach; urlPattern is a glob covering a whole site, subdomains included; command is one exact command line it may run.
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof ToolApprovalUio
|
|
40
|
+
*/
|
|
41
|
+
resourceKind: ToolApprovalUioResourceKindEnum;
|
|
42
|
+
/**
|
|
43
|
+
* What is granted, in the family's own notation. A url is a PREFIX: it covers any path below it, with any query parameters. A urlPattern is a GLOB, not a regular expression: a star stands for any text up to the next slash, everything else is literal, the pattern covers the start of the address and is matched case-insensitively. It must start with https://, close its host with a slash, and end with a slash or a star. A command is matched exactly, whitespace aside — a command that differs at all is asked about again.
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof ToolApprovalUio
|
|
46
|
+
*/
|
|
47
|
+
resource: string;
|
|
48
|
+
/**
|
|
49
|
+
* Present on an agentUser-scoped approval.
|
|
50
|
+
* @type {string}
|
|
51
|
+
* @memberof ToolApprovalUio
|
|
52
|
+
*/
|
|
53
|
+
agentId?: string;
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
* @type {Date}
|
|
57
|
+
* @memberof ToolApprovalUio
|
|
58
|
+
*/
|
|
59
|
+
createdAt: Date;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* @export
|
|
63
|
+
*/
|
|
64
|
+
export declare const ToolApprovalUioScopeKindEnum: {
|
|
65
|
+
readonly AgentUser: "agentUser";
|
|
66
|
+
readonly User: "user";
|
|
67
|
+
};
|
|
68
|
+
export type ToolApprovalUioScopeKindEnum = typeof ToolApprovalUioScopeKindEnum[keyof typeof ToolApprovalUioScopeKindEnum];
|
|
69
|
+
/**
|
|
70
|
+
* @export
|
|
71
|
+
*/
|
|
72
|
+
export declare const ToolApprovalUioResourceKindEnum: {
|
|
73
|
+
readonly Url: "url";
|
|
74
|
+
readonly Command: "command";
|
|
75
|
+
readonly UrlPattern: "urlPattern";
|
|
76
|
+
};
|
|
77
|
+
export type ToolApprovalUioResourceKindEnum = typeof ToolApprovalUioResourceKindEnum[keyof typeof ToolApprovalUioResourceKindEnum];
|
|
78
|
+
/**
|
|
79
|
+
* Check if a given object implements the ToolApprovalUio interface.
|
|
80
|
+
*/
|
|
81
|
+
export declare function instanceOfToolApprovalUio(value: object): value is ToolApprovalUio;
|
|
82
|
+
export declare function ToolApprovalUioFromJSON(json: any): ToolApprovalUio;
|
|
83
|
+
export declare function ToolApprovalUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): ToolApprovalUio;
|
|
84
|
+
export declare function ToolApprovalUioToJSON(json: any): ToolApprovalUio;
|
|
85
|
+
export declare function ToolApprovalUioToJSONTyped(value?: ToolApprovalUio | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,88 @@
|
|
|
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.ToolApprovalUioResourceKindEnum = exports.ToolApprovalUioScopeKindEnum = void 0;
|
|
17
|
+
exports.instanceOfToolApprovalUio = instanceOfToolApprovalUio;
|
|
18
|
+
exports.ToolApprovalUioFromJSON = ToolApprovalUioFromJSON;
|
|
19
|
+
exports.ToolApprovalUioFromJSONTyped = ToolApprovalUioFromJSONTyped;
|
|
20
|
+
exports.ToolApprovalUioToJSON = ToolApprovalUioToJSON;
|
|
21
|
+
exports.ToolApprovalUioToJSONTyped = ToolApprovalUioToJSONTyped;
|
|
22
|
+
/**
|
|
23
|
+
* @export
|
|
24
|
+
*/
|
|
25
|
+
exports.ToolApprovalUioScopeKindEnum = {
|
|
26
|
+
AgentUser: 'agentUser',
|
|
27
|
+
User: 'user'
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* @export
|
|
31
|
+
*/
|
|
32
|
+
exports.ToolApprovalUioResourceKindEnum = {
|
|
33
|
+
Url: 'url',
|
|
34
|
+
Command: 'command',
|
|
35
|
+
UrlPattern: 'urlPattern'
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Check if a given object implements the ToolApprovalUio interface.
|
|
39
|
+
*/
|
|
40
|
+
function instanceOfToolApprovalUio(value) {
|
|
41
|
+
if (!('id' in value) || value['id'] === undefined)
|
|
42
|
+
return false;
|
|
43
|
+
if (!('scopeKind' in value) || value['scopeKind'] === undefined)
|
|
44
|
+
return false;
|
|
45
|
+
if (!('toolName' in value) || value['toolName'] === undefined)
|
|
46
|
+
return false;
|
|
47
|
+
if (!('resourceKind' in value) || value['resourceKind'] === undefined)
|
|
48
|
+
return false;
|
|
49
|
+
if (!('resource' in value) || value['resource'] === undefined)
|
|
50
|
+
return false;
|
|
51
|
+
if (!('createdAt' in value) || value['createdAt'] === undefined)
|
|
52
|
+
return false;
|
|
53
|
+
return true;
|
|
54
|
+
}
|
|
55
|
+
function ToolApprovalUioFromJSON(json) {
|
|
56
|
+
return ToolApprovalUioFromJSONTyped(json, false);
|
|
57
|
+
}
|
|
58
|
+
function ToolApprovalUioFromJSONTyped(json, ignoreDiscriminator) {
|
|
59
|
+
if (json == null) {
|
|
60
|
+
return json;
|
|
61
|
+
}
|
|
62
|
+
return {
|
|
63
|
+
'id': json['id'],
|
|
64
|
+
'scopeKind': json['scopeKind'],
|
|
65
|
+
'toolName': json['toolName'],
|
|
66
|
+
'resourceKind': json['resourceKind'],
|
|
67
|
+
'resource': json['resource'],
|
|
68
|
+
'agentId': json['agentId'] == null ? undefined : json['agentId'],
|
|
69
|
+
'createdAt': (new Date(json['createdAt'])),
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
function ToolApprovalUioToJSON(json) {
|
|
73
|
+
return ToolApprovalUioToJSONTyped(json, false);
|
|
74
|
+
}
|
|
75
|
+
function ToolApprovalUioToJSONTyped(value, ignoreDiscriminator = false) {
|
|
76
|
+
if (value == null) {
|
|
77
|
+
return value;
|
|
78
|
+
}
|
|
79
|
+
return {
|
|
80
|
+
'id': value['id'],
|
|
81
|
+
'scopeKind': value['scopeKind'],
|
|
82
|
+
'toolName': value['toolName'],
|
|
83
|
+
'resourceKind': value['resourceKind'],
|
|
84
|
+
'resource': value['resource'],
|
|
85
|
+
'agentId': value['agentId'],
|
|
86
|
+
'createdAt': ((value['createdAt']).toISOString()),
|
|
87
|
+
};
|
|
88
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
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
|
+
import type { ToolApprovalUio } from './ToolApprovalUio';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface ToolApprovalsResponseUio
|
|
17
|
+
*/
|
|
18
|
+
export interface ToolApprovalsResponseUio {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {Array<ToolApprovalUio>}
|
|
22
|
+
* @memberof ToolApprovalsResponseUio
|
|
23
|
+
*/
|
|
24
|
+
approvals: Array<ToolApprovalUio>;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Check if a given object implements the ToolApprovalsResponseUio interface.
|
|
28
|
+
*/
|
|
29
|
+
export declare function instanceOfToolApprovalsResponseUio(value: object): value is ToolApprovalsResponseUio;
|
|
30
|
+
export declare function ToolApprovalsResponseUioFromJSON(json: any): ToolApprovalsResponseUio;
|
|
31
|
+
export declare function ToolApprovalsResponseUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): ToolApprovalsResponseUio;
|
|
32
|
+
export declare function ToolApprovalsResponseUioToJSON(json: any): ToolApprovalsResponseUio;
|
|
33
|
+
export declare function ToolApprovalsResponseUioToJSONTyped(value?: ToolApprovalsResponseUio | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,51 @@
|
|
|
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.instanceOfToolApprovalsResponseUio = instanceOfToolApprovalsResponseUio;
|
|
17
|
+
exports.ToolApprovalsResponseUioFromJSON = ToolApprovalsResponseUioFromJSON;
|
|
18
|
+
exports.ToolApprovalsResponseUioFromJSONTyped = ToolApprovalsResponseUioFromJSONTyped;
|
|
19
|
+
exports.ToolApprovalsResponseUioToJSON = ToolApprovalsResponseUioToJSON;
|
|
20
|
+
exports.ToolApprovalsResponseUioToJSONTyped = ToolApprovalsResponseUioToJSONTyped;
|
|
21
|
+
const ToolApprovalUio_1 = require("./ToolApprovalUio");
|
|
22
|
+
/**
|
|
23
|
+
* Check if a given object implements the ToolApprovalsResponseUio interface.
|
|
24
|
+
*/
|
|
25
|
+
function instanceOfToolApprovalsResponseUio(value) {
|
|
26
|
+
if (!('approvals' in value) || value['approvals'] === undefined)
|
|
27
|
+
return false;
|
|
28
|
+
return true;
|
|
29
|
+
}
|
|
30
|
+
function ToolApprovalsResponseUioFromJSON(json) {
|
|
31
|
+
return ToolApprovalsResponseUioFromJSONTyped(json, false);
|
|
32
|
+
}
|
|
33
|
+
function ToolApprovalsResponseUioFromJSONTyped(json, ignoreDiscriminator) {
|
|
34
|
+
if (json == null) {
|
|
35
|
+
return json;
|
|
36
|
+
}
|
|
37
|
+
return {
|
|
38
|
+
'approvals': (json['approvals'].map(ToolApprovalUio_1.ToolApprovalUioFromJSON)),
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
function ToolApprovalsResponseUioToJSON(json) {
|
|
42
|
+
return ToolApprovalsResponseUioToJSONTyped(json, false);
|
|
43
|
+
}
|
|
44
|
+
function ToolApprovalsResponseUioToJSONTyped(value, ignoreDiscriminator = false) {
|
|
45
|
+
if (value == null) {
|
|
46
|
+
return value;
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
'approvals': (value['approvals'].map(ToolApprovalUio_1.ToolApprovalUioToJSON)),
|
|
50
|
+
};
|
|
51
|
+
}
|
|
@@ -40,6 +40,18 @@ export interface ToolCallResultRequestUio {
|
|
|
40
40
|
* @memberof ToolCallResultRequestUio
|
|
41
41
|
*/
|
|
42
42
|
error?: string;
|
|
43
|
+
/**
|
|
44
|
+
* Only read when resolving a bash_network_approval or bash_python_approval call with status completed: how far the approval reaches. once — the suspended reply and nothing after it, so the same request is asked about again next time — is the default, and nothing is stored. agentUser covers this agent, for this user, across all of their conversations, and is kept until revoked. Any other value is refused with a 400. Never widens what the agent is allowed to do: the server-side lock and the per-agent switch remain prerequisites. Only the user the question was asked of may answer it: an approval is a personal consent, so another caller — an admin included — gets a 403.
|
|
45
|
+
* @type {string}
|
|
46
|
+
* @memberof ToolCallResultRequestUio
|
|
47
|
+
*/
|
|
48
|
+
approvalScope?: ToolCallResultRequestUioApprovalScopeEnum;
|
|
49
|
+
/**
|
|
50
|
+
* Only read when resolving a bash_network_approval call with status completed: how wide the approval is. prefix (the default) grants the prefix shown in the request — origin plus first path segment; origin grants the whole domain. Nothing narrower is offered: nobody can predict the paths an API will serve, and an approval that is too fine is paid for in repeated questions. The server recomputes both from the URL it recorded, so a client cannot submit a prefix of its own. Ignored on a bash_python_approval call, which has a single width: the exact command the server already recorded.
|
|
51
|
+
* @type {string}
|
|
52
|
+
* @memberof ToolCallResultRequestUio
|
|
53
|
+
*/
|
|
54
|
+
approvalWidth?: ToolCallResultRequestUioApprovalWidthEnum;
|
|
43
55
|
}
|
|
44
56
|
/**
|
|
45
57
|
* @export
|
|
@@ -50,6 +62,22 @@ export declare const ToolCallResultRequestUioStatusEnum: {
|
|
|
50
62
|
readonly Refused: "refused";
|
|
51
63
|
};
|
|
52
64
|
export type ToolCallResultRequestUioStatusEnum = typeof ToolCallResultRequestUioStatusEnum[keyof typeof ToolCallResultRequestUioStatusEnum];
|
|
65
|
+
/**
|
|
66
|
+
* @export
|
|
67
|
+
*/
|
|
68
|
+
export declare const ToolCallResultRequestUioApprovalScopeEnum: {
|
|
69
|
+
readonly Once: "once";
|
|
70
|
+
readonly AgentUser: "agentUser";
|
|
71
|
+
};
|
|
72
|
+
export type ToolCallResultRequestUioApprovalScopeEnum = typeof ToolCallResultRequestUioApprovalScopeEnum[keyof typeof ToolCallResultRequestUioApprovalScopeEnum];
|
|
73
|
+
/**
|
|
74
|
+
* @export
|
|
75
|
+
*/
|
|
76
|
+
export declare const ToolCallResultRequestUioApprovalWidthEnum: {
|
|
77
|
+
readonly Prefix: "prefix";
|
|
78
|
+
readonly Origin: "origin";
|
|
79
|
+
};
|
|
80
|
+
export type ToolCallResultRequestUioApprovalWidthEnum = typeof ToolCallResultRequestUioApprovalWidthEnum[keyof typeof ToolCallResultRequestUioApprovalWidthEnum];
|
|
53
81
|
/**
|
|
54
82
|
* Check if a given object implements the ToolCallResultRequestUio interface.
|
|
55
83
|
*/
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* Do not edit the class manually.
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.ToolCallResultRequestUioStatusEnum = void 0;
|
|
16
|
+
exports.ToolCallResultRequestUioApprovalWidthEnum = exports.ToolCallResultRequestUioApprovalScopeEnum = exports.ToolCallResultRequestUioStatusEnum = void 0;
|
|
17
17
|
exports.instanceOfToolCallResultRequestUio = instanceOfToolCallResultRequestUio;
|
|
18
18
|
exports.ToolCallResultRequestUioFromJSON = ToolCallResultRequestUioFromJSON;
|
|
19
19
|
exports.ToolCallResultRequestUioFromJSONTyped = ToolCallResultRequestUioFromJSONTyped;
|
|
@@ -28,6 +28,20 @@ exports.ToolCallResultRequestUioStatusEnum = {
|
|
|
28
28
|
Failed: 'failed',
|
|
29
29
|
Refused: 'refused'
|
|
30
30
|
};
|
|
31
|
+
/**
|
|
32
|
+
* @export
|
|
33
|
+
*/
|
|
34
|
+
exports.ToolCallResultRequestUioApprovalScopeEnum = {
|
|
35
|
+
Once: 'once',
|
|
36
|
+
AgentUser: 'agentUser'
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* @export
|
|
40
|
+
*/
|
|
41
|
+
exports.ToolCallResultRequestUioApprovalWidthEnum = {
|
|
42
|
+
Prefix: 'prefix',
|
|
43
|
+
Origin: 'origin'
|
|
44
|
+
};
|
|
31
45
|
/**
|
|
32
46
|
* Check if a given object implements the ToolCallResultRequestUio interface.
|
|
33
47
|
*/
|
|
@@ -48,6 +62,8 @@ function ToolCallResultRequestUioFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
48
62
|
'output': json['output'] == null ? undefined : json['output'],
|
|
49
63
|
'attachments': json['attachments'] == null ? undefined : (json['attachments'].map(ToolCallAttachmentUio_1.ToolCallAttachmentUioFromJSON)),
|
|
50
64
|
'error': json['error'] == null ? undefined : json['error'],
|
|
65
|
+
'approvalScope': json['approvalScope'] == null ? undefined : json['approvalScope'],
|
|
66
|
+
'approvalWidth': json['approvalWidth'] == null ? undefined : json['approvalWidth'],
|
|
51
67
|
};
|
|
52
68
|
}
|
|
53
69
|
function ToolCallResultRequestUioToJSON(json) {
|
|
@@ -62,5 +78,7 @@ function ToolCallResultRequestUioToJSONTyped(value, ignoreDiscriminator = false)
|
|
|
62
78
|
'output': value['output'],
|
|
63
79
|
'attachments': value['attachments'] == null ? undefined : (value['attachments'].map(ToolCallAttachmentUio_1.ToolCallAttachmentUioToJSON)),
|
|
64
80
|
'error': value['error'],
|
|
81
|
+
'approvalScope': value['approvalScope'],
|
|
82
|
+
'approvalWidth': value['approvalWidth'],
|
|
65
83
|
};
|
|
66
84
|
}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
/**
|
|
13
|
-
* A tool call whose result does not come from the server. The conversation turn stays suspended until a client posts the result, or until expiresAt passes.
|
|
13
|
+
* A tool call whose result does not come from the server. The conversation turn stays suspended until a client posts the result, or until expiresAt passes when the call carries one.
|
|
14
14
|
* @export
|
|
15
15
|
* @interface ToolCallUio
|
|
16
16
|
*/
|
|
@@ -22,7 +22,7 @@ export interface ToolCallUio {
|
|
|
22
22
|
*/
|
|
23
23
|
callId: string;
|
|
24
24
|
/**
|
|
25
|
-
* Name of the tool the model called.
|
|
25
|
+
* Name of the tool the model called. Three values are produced by the server today. take_screenshot asks the client to capture the screen. bash_network_approval is an agent sandbox asking permission to reach an address: arguments carries url (the full address, to be shown as-is), urlPrefix (what a yes actually grants), origin, host and method. bash_python_approval is an agent sandbox asking permission to run a python command: arguments carries command, which is both what has to be shown in full and exactly what a yes grants — nothing ran, so a refusal leaves the sandbox untouched.
|
|
26
26
|
* @type {string}
|
|
27
27
|
* @memberof ToolCallUio
|
|
28
28
|
*/
|
|
@@ -66,11 +66,11 @@ export interface ToolCallUio {
|
|
|
66
66
|
*/
|
|
67
67
|
createdAt?: Date;
|
|
68
68
|
/**
|
|
69
|
-
*
|
|
69
|
+
* Optional, and set tool by tool: a call with no deadline never expires, and none of the tools produced today carries one. When present, past this point the call is expired and the conversation turn is released.
|
|
70
70
|
* @type {Date}
|
|
71
71
|
* @memberof ToolCallUio
|
|
72
72
|
*/
|
|
73
|
-
expiresAt
|
|
73
|
+
expiresAt?: Date;
|
|
74
74
|
}
|
|
75
75
|
/**
|
|
76
76
|
* @export
|
|
@@ -39,8 +39,6 @@ function instanceOfToolCallUio(value) {
|
|
|
39
39
|
return false;
|
|
40
40
|
if (!('status' in value) || value['status'] === undefined)
|
|
41
41
|
return false;
|
|
42
|
-
if (!('expiresAt' in value) || value['expiresAt'] === undefined)
|
|
43
|
-
return false;
|
|
44
42
|
return true;
|
|
45
43
|
}
|
|
46
44
|
function ToolCallUioFromJSON(json) {
|
|
@@ -59,7 +57,7 @@ function ToolCallUioFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
59
57
|
'deviceId': json['deviceId'] == null ? undefined : json['deviceId'],
|
|
60
58
|
'arguments': json['arguments'] == null ? undefined : json['arguments'],
|
|
61
59
|
'createdAt': json['createdAt'] == null ? undefined : (new Date(json['createdAt'])),
|
|
62
|
-
'expiresAt': (new Date(json['expiresAt'])),
|
|
60
|
+
'expiresAt': json['expiresAt'] == null ? undefined : (new Date(json['expiresAt'])),
|
|
63
61
|
};
|
|
64
62
|
}
|
|
65
63
|
function ToolCallUioToJSON(json) {
|
|
@@ -78,6 +76,6 @@ function ToolCallUioToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
78
76
|
'deviceId': value['deviceId'],
|
|
79
77
|
'arguments': value['arguments'],
|
|
80
78
|
'createdAt': value['createdAt'] == null ? undefined : ((value['createdAt']).toISOString()),
|
|
81
|
-
'expiresAt': ((value['expiresAt']).toISOString()),
|
|
79
|
+
'expiresAt': value['expiresAt'] == null ? undefined : ((value['expiresAt']).toISOString()),
|
|
82
80
|
};
|
|
83
81
|
}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -168,6 +168,7 @@ export * from './ContextualKnowledgeConversationEmbeddingUio';
|
|
|
168
168
|
export * from './ContextualKnowledgeConversationUio';
|
|
169
169
|
export * from './ConversationAttachmentDownloadUrlUio';
|
|
170
170
|
export * from './ConversationDetailUio';
|
|
171
|
+
export * from './ConversationMessageApprovalUio';
|
|
171
172
|
export * from './ConversationMessagesInnerFlowNodeEntrypointsUio';
|
|
172
173
|
export * from './ConversationMessagesInnerFlowNodeUio';
|
|
173
174
|
export * from './ConversationMessagesInnerSuggestionsInnerUio';
|
|
@@ -186,6 +187,7 @@ export * from './CreateCustomVariable200ResponseUio';
|
|
|
186
187
|
export * from './CreateKnowledgeBaseRequestEmbeddingConfigUio';
|
|
187
188
|
export * from './CreateKnowledgeBaseRequestUio';
|
|
188
189
|
export * from './CreateKnowledgeBaseResponseUio';
|
|
190
|
+
export * from './CreateToolApprovalRequestUio';
|
|
189
191
|
export * from './DefaultClientPricesUio';
|
|
190
192
|
export * from './DefaultEngineRequestUio';
|
|
191
193
|
export * from './DeleteKnowledgeSitePage200ResponseUio';
|
|
@@ -193,6 +195,7 @@ export * from './DeleteMessageAudio200ResponseUio';
|
|
|
193
195
|
export * from './DeleteOrganizationUser200ResponseUio';
|
|
194
196
|
export * from './DeleteProvider200ResponseKnowledgeBasesAffectedInnerUio';
|
|
195
197
|
export * from './DeleteProvider200ResponseUio';
|
|
198
|
+
export * from './EditToolApprovalRequestUio';
|
|
196
199
|
export * from './EmbeddingProviderModelsInnerUio';
|
|
197
200
|
export * from './EmbeddingProviderUio';
|
|
198
201
|
export * from './EngineOptionsUio';
|
|
@@ -398,6 +401,8 @@ export * from './TokenUsageUio';
|
|
|
398
401
|
export * from './ToolActionUio';
|
|
399
402
|
export * from './ToolAllowedToolsRequestUio';
|
|
400
403
|
export * from './ToolAllowedToolsResponseUio';
|
|
404
|
+
export * from './ToolApprovalUio';
|
|
405
|
+
export * from './ToolApprovalsResponseUio';
|
|
401
406
|
export * from './ToolCallAttachmentUio';
|
|
402
407
|
export * from './ToolCallResultRequestUio';
|
|
403
408
|
export * from './ToolCallResultResponseUio';
|
package/dist/models/index.js
CHANGED
|
@@ -186,6 +186,7 @@ __exportStar(require("./ContextualKnowledgeConversationEmbeddingUio"), exports);
|
|
|
186
186
|
__exportStar(require("./ContextualKnowledgeConversationUio"), exports);
|
|
187
187
|
__exportStar(require("./ConversationAttachmentDownloadUrlUio"), exports);
|
|
188
188
|
__exportStar(require("./ConversationDetailUio"), exports);
|
|
189
|
+
__exportStar(require("./ConversationMessageApprovalUio"), exports);
|
|
189
190
|
__exportStar(require("./ConversationMessagesInnerFlowNodeEntrypointsUio"), exports);
|
|
190
191
|
__exportStar(require("./ConversationMessagesInnerFlowNodeUio"), exports);
|
|
191
192
|
__exportStar(require("./ConversationMessagesInnerSuggestionsInnerUio"), exports);
|
|
@@ -204,6 +205,7 @@ __exportStar(require("./CreateCustomVariable200ResponseUio"), exports);
|
|
|
204
205
|
__exportStar(require("./CreateKnowledgeBaseRequestEmbeddingConfigUio"), exports);
|
|
205
206
|
__exportStar(require("./CreateKnowledgeBaseRequestUio"), exports);
|
|
206
207
|
__exportStar(require("./CreateKnowledgeBaseResponseUio"), exports);
|
|
208
|
+
__exportStar(require("./CreateToolApprovalRequestUio"), exports);
|
|
207
209
|
__exportStar(require("./DefaultClientPricesUio"), exports);
|
|
208
210
|
__exportStar(require("./DefaultEngineRequestUio"), exports);
|
|
209
211
|
__exportStar(require("./DeleteKnowledgeSitePage200ResponseUio"), exports);
|
|
@@ -211,6 +213,7 @@ __exportStar(require("./DeleteMessageAudio200ResponseUio"), exports);
|
|
|
211
213
|
__exportStar(require("./DeleteOrganizationUser200ResponseUio"), exports);
|
|
212
214
|
__exportStar(require("./DeleteProvider200ResponseKnowledgeBasesAffectedInnerUio"), exports);
|
|
213
215
|
__exportStar(require("./DeleteProvider200ResponseUio"), exports);
|
|
216
|
+
__exportStar(require("./EditToolApprovalRequestUio"), exports);
|
|
214
217
|
__exportStar(require("./EmbeddingProviderModelsInnerUio"), exports);
|
|
215
218
|
__exportStar(require("./EmbeddingProviderUio"), exports);
|
|
216
219
|
__exportStar(require("./EngineOptionsUio"), exports);
|
|
@@ -416,6 +419,8 @@ __exportStar(require("./TokenUsageUio"), exports);
|
|
|
416
419
|
__exportStar(require("./ToolActionUio"), exports);
|
|
417
420
|
__exportStar(require("./ToolAllowedToolsRequestUio"), exports);
|
|
418
421
|
__exportStar(require("./ToolAllowedToolsResponseUio"), exports);
|
|
422
|
+
__exportStar(require("./ToolApprovalUio"), exports);
|
|
423
|
+
__exportStar(require("./ToolApprovalsResponseUio"), exports);
|
|
419
424
|
__exportStar(require("./ToolCallAttachmentUio"), exports);
|
|
420
425
|
__exportStar(require("./ToolCallResultRequestUio"), exports);
|
|
421
426
|
__exportStar(require("./ToolCallResultResponseUio"), exports);
|