@breign/client 1.0.148 → 1.0.150
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/models/AgentSandboxConfigurationUio.d.ts +8 -2
- package/dist/models/AgentSandboxConfigurationUio.js +2 -0
- package/dist/models/ChatUio.d.ts +7 -0
- package/dist/models/ChatUio.js +3 -0
- package/dist/models/ConversationContextUsageUio.d.ts +59 -0
- package/dist/models/ConversationContextUsageUio.js +69 -0
- package/dist/models/ConversationMessageApprovalUio.d.ts +1 -1
- package/dist/models/MessageStatusUio.d.ts +7 -0
- package/dist/models/MessageStatusUio.js +3 -0
- package/dist/models/ToolApprovalUio.d.ts +1 -1
- package/dist/models/ToolCallResultRequestUio.d.ts +2 -2
- package/dist/models/ToolCallUio.d.ts +1 -1
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.js +1 -0
- package/dist/openapi.json +45 -7
- package/package.json +1 -1
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
*/
|
|
12
12
|
import type { AgentSandboxNetworkConfigurationUio } from './AgentSandboxNetworkConfigurationUio';
|
|
13
13
|
/**
|
|
14
|
-
* Per-agent activation of the bash sandbox and of its
|
|
14
|
+
* Per-agent activation of the bash sandbox and of its three risky capabilities. Separate switches because the risk surfaces are unrelated. The server configuration can only narrow this: an agent may enable, never widen.
|
|
15
15
|
* @export
|
|
16
16
|
* @interface AgentSandboxConfigurationUio
|
|
17
17
|
*/
|
|
@@ -23,11 +23,17 @@ export interface AgentSandboxConfigurationUio {
|
|
|
23
23
|
*/
|
|
24
24
|
enabled?: boolean;
|
|
25
25
|
/**
|
|
26
|
-
* Enables python3 inside the sandbox. Also requires the server-side lock; the cost is arbitrary code execution.
|
|
26
|
+
* Enables python3 inside the sandbox. Also requires the server-side lock; the cost is arbitrary code execution, so every python command is approved by the user before it runs.
|
|
27
27
|
* @type {boolean}
|
|
28
28
|
* @memberof AgentSandboxConfigurationUio
|
|
29
29
|
*/
|
|
30
30
|
pythonEnabled?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Enables js-exec (JavaScript and TypeScript, in QuickJS) inside the sandbox. Same two extra locks as pythonEnabled, and the same per-command approval: running code IS the effect, so there is nothing to refuse afterwards.
|
|
33
|
+
* @type {boolean}
|
|
34
|
+
* @memberof AgentSandboxConfigurationUio
|
|
35
|
+
*/
|
|
36
|
+
javascriptEnabled?: boolean;
|
|
31
37
|
/**
|
|
32
38
|
*
|
|
33
39
|
* @type {AgentSandboxNetworkConfigurationUio}
|
|
@@ -42,6 +42,7 @@ function AgentSandboxConfigurationUioFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
42
42
|
return {
|
|
43
43
|
'enabled': json['enabled'] == null ? undefined : json['enabled'],
|
|
44
44
|
'pythonEnabled': json['pythonEnabled'] == null ? undefined : json['pythonEnabled'],
|
|
45
|
+
'javascriptEnabled': json['javascriptEnabled'] == null ? undefined : json['javascriptEnabled'],
|
|
45
46
|
'network': json['network'] == null ? undefined : (0, AgentSandboxNetworkConfigurationUio_1.AgentSandboxNetworkConfigurationUioFromJSON)(json['network']),
|
|
46
47
|
'workspaceScope': json['workspaceScope'] == null ? undefined : json['workspaceScope'],
|
|
47
48
|
};
|
|
@@ -56,6 +57,7 @@ function AgentSandboxConfigurationUioToJSONTyped(value, ignoreDiscriminator = fa
|
|
|
56
57
|
return {
|
|
57
58
|
'enabled': value['enabled'],
|
|
58
59
|
'pythonEnabled': value['pythonEnabled'],
|
|
60
|
+
'javascriptEnabled': value['javascriptEnabled'],
|
|
59
61
|
'network': (0, AgentSandboxNetworkConfigurationUio_1.AgentSandboxNetworkConfigurationUioToJSON)(value['network']),
|
|
60
62
|
'workspaceScope': value['workspaceScope'],
|
|
61
63
|
};
|
package/dist/models/ChatUio.d.ts
CHANGED
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
+
import type { ConversationContextUsageUio } from './ConversationContextUsageUio';
|
|
12
13
|
import type { TokenUsageUio } from './TokenUsageUio';
|
|
13
14
|
import type { ChatContextUio } from './ChatContextUio';
|
|
14
15
|
import type { ChatMessageUio } from './ChatMessageUio';
|
|
@@ -96,6 +97,12 @@ export interface ChatUio {
|
|
|
96
97
|
* @memberof ChatUio
|
|
97
98
|
*/
|
|
98
99
|
usage?: TokenUsageUio;
|
|
100
|
+
/**
|
|
101
|
+
*
|
|
102
|
+
* @type {ConversationContextUsageUio}
|
|
103
|
+
* @memberof ChatUio
|
|
104
|
+
*/
|
|
105
|
+
contextUsage?: ConversationContextUsageUio;
|
|
99
106
|
/**
|
|
100
107
|
*
|
|
101
108
|
* @type {string}
|
package/dist/models/ChatUio.js
CHANGED
|
@@ -19,6 +19,7 @@ exports.ChatUioFromJSON = ChatUioFromJSON;
|
|
|
19
19
|
exports.ChatUioFromJSONTyped = ChatUioFromJSONTyped;
|
|
20
20
|
exports.ChatUioToJSON = ChatUioToJSON;
|
|
21
21
|
exports.ChatUioToJSONTyped = ChatUioToJSONTyped;
|
|
22
|
+
const ConversationContextUsageUio_1 = require("./ConversationContextUsageUio");
|
|
22
23
|
const TokenUsageUio_1 = require("./TokenUsageUio");
|
|
23
24
|
const ChatContextUio_1 = require("./ChatContextUio");
|
|
24
25
|
const ChatMessageUio_1 = require("./ChatMessageUio");
|
|
@@ -70,6 +71,7 @@ function ChatUioFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
70
71
|
'init': json['init'] == null ? undefined : json['init'],
|
|
71
72
|
'messages': (json['messages'].map(ChatMessageUio_1.ChatMessageUioFromJSON)),
|
|
72
73
|
'usage': json['usage'] == null ? undefined : (0, TokenUsageUio_1.TokenUsageUioFromJSON)(json['usage']),
|
|
74
|
+
'contextUsage': json['contextUsage'] == null ? undefined : (0, ConversationContextUsageUio_1.ConversationContextUsageUioFromJSON)(json['contextUsage']),
|
|
73
75
|
'createdAt': json['createdAt'],
|
|
74
76
|
'updatedAt': json['updatedAt'],
|
|
75
77
|
'context': (0, ChatContextUio_1.ChatContextUioFromJSON)(json['context']),
|
|
@@ -96,6 +98,7 @@ function ChatUioToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
96
98
|
'init': value['init'],
|
|
97
99
|
'messages': (value['messages'].map(ChatMessageUio_1.ChatMessageUioToJSON)),
|
|
98
100
|
'usage': (0, TokenUsageUio_1.TokenUsageUioToJSON)(value['usage']),
|
|
101
|
+
'contextUsage': (0, ConversationContextUsageUio_1.ConversationContextUsageUioToJSON)(value['contextUsage']),
|
|
99
102
|
'createdAt': value['createdAt'],
|
|
100
103
|
'updatedAt': value['updatedAt'],
|
|
101
104
|
'context': (0, ChatContextUio_1.ChatContextUioToJSON)(value['context']),
|
|
@@ -0,0 +1,59 @@
|
|
|
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
|
+
* How much of the model's context window this conversation occupies: the prompt of the last generation call, not the conversation's cumulated token count. Absent until a turn has been measured — an unmeasured conversation has an unknown occupancy, not an empty window.
|
|
14
|
+
* @export
|
|
15
|
+
* @interface ConversationContextUsageUio
|
|
16
|
+
*/
|
|
17
|
+
export interface ConversationContextUsageUio {
|
|
18
|
+
/**
|
|
19
|
+
* Prompt of the last generation call, in tokens, as reported by the provider. Always > 0.
|
|
20
|
+
* @type {number}
|
|
21
|
+
* @memberof ConversationContextUsageUio
|
|
22
|
+
*/
|
|
23
|
+
usedTokens: number;
|
|
24
|
+
/**
|
|
25
|
+
* Context window of the conversation's model, in tokens. Always greater than 0.
|
|
26
|
+
* @type {number}
|
|
27
|
+
* @memberof ConversationContextUsageUio
|
|
28
|
+
*/
|
|
29
|
+
contextWindow: number;
|
|
30
|
+
/**
|
|
31
|
+
* Where the window above comes from. `declared`: carried by the model definition. `catalog`: known to the backend only. `fallback`: unknown, shown as an approximation.
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof ConversationContextUsageUio
|
|
34
|
+
*/
|
|
35
|
+
contextWindowConfidence: ConversationContextUsageUioContextWindowConfidenceEnum;
|
|
36
|
+
/**
|
|
37
|
+
* Model the conversation runs on, absent when its engine reference resolves to none.
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof ConversationContextUsageUio
|
|
40
|
+
*/
|
|
41
|
+
modelName?: string;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* @export
|
|
45
|
+
*/
|
|
46
|
+
export declare const ConversationContextUsageUioContextWindowConfidenceEnum: {
|
|
47
|
+
readonly Declared: "declared";
|
|
48
|
+
readonly Catalog: "catalog";
|
|
49
|
+
readonly Fallback: "fallback";
|
|
50
|
+
};
|
|
51
|
+
export type ConversationContextUsageUioContextWindowConfidenceEnum = typeof ConversationContextUsageUioContextWindowConfidenceEnum[keyof typeof ConversationContextUsageUioContextWindowConfidenceEnum];
|
|
52
|
+
/**
|
|
53
|
+
* Check if a given object implements the ConversationContextUsageUio interface.
|
|
54
|
+
*/
|
|
55
|
+
export declare function instanceOfConversationContextUsageUio(value: object): value is ConversationContextUsageUio;
|
|
56
|
+
export declare function ConversationContextUsageUioFromJSON(json: any): ConversationContextUsageUio;
|
|
57
|
+
export declare function ConversationContextUsageUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConversationContextUsageUio;
|
|
58
|
+
export declare function ConversationContextUsageUioToJSON(json: any): ConversationContextUsageUio;
|
|
59
|
+
export declare function ConversationContextUsageUioToJSONTyped(value?: ConversationContextUsageUio | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,69 @@
|
|
|
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.ConversationContextUsageUioContextWindowConfidenceEnum = void 0;
|
|
17
|
+
exports.instanceOfConversationContextUsageUio = instanceOfConversationContextUsageUio;
|
|
18
|
+
exports.ConversationContextUsageUioFromJSON = ConversationContextUsageUioFromJSON;
|
|
19
|
+
exports.ConversationContextUsageUioFromJSONTyped = ConversationContextUsageUioFromJSONTyped;
|
|
20
|
+
exports.ConversationContextUsageUioToJSON = ConversationContextUsageUioToJSON;
|
|
21
|
+
exports.ConversationContextUsageUioToJSONTyped = ConversationContextUsageUioToJSONTyped;
|
|
22
|
+
/**
|
|
23
|
+
* @export
|
|
24
|
+
*/
|
|
25
|
+
exports.ConversationContextUsageUioContextWindowConfidenceEnum = {
|
|
26
|
+
Declared: 'declared',
|
|
27
|
+
Catalog: 'catalog',
|
|
28
|
+
Fallback: 'fallback'
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Check if a given object implements the ConversationContextUsageUio interface.
|
|
32
|
+
*/
|
|
33
|
+
function instanceOfConversationContextUsageUio(value) {
|
|
34
|
+
if (!('usedTokens' in value) || value['usedTokens'] === undefined)
|
|
35
|
+
return false;
|
|
36
|
+
if (!('contextWindow' in value) || value['contextWindow'] === undefined)
|
|
37
|
+
return false;
|
|
38
|
+
if (!('contextWindowConfidence' in value) || value['contextWindowConfidence'] === undefined)
|
|
39
|
+
return false;
|
|
40
|
+
return true;
|
|
41
|
+
}
|
|
42
|
+
function ConversationContextUsageUioFromJSON(json) {
|
|
43
|
+
return ConversationContextUsageUioFromJSONTyped(json, false);
|
|
44
|
+
}
|
|
45
|
+
function ConversationContextUsageUioFromJSONTyped(json, ignoreDiscriminator) {
|
|
46
|
+
if (json == null) {
|
|
47
|
+
return json;
|
|
48
|
+
}
|
|
49
|
+
return {
|
|
50
|
+
'usedTokens': json['usedTokens'],
|
|
51
|
+
'contextWindow': json['contextWindow'],
|
|
52
|
+
'contextWindowConfidence': json['contextWindowConfidence'],
|
|
53
|
+
'modelName': json['modelName'] == null ? undefined : json['modelName'],
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
function ConversationContextUsageUioToJSON(json) {
|
|
57
|
+
return ConversationContextUsageUioToJSONTyped(json, false);
|
|
58
|
+
}
|
|
59
|
+
function ConversationContextUsageUioToJSONTyped(value, ignoreDiscriminator = false) {
|
|
60
|
+
if (value == null) {
|
|
61
|
+
return value;
|
|
62
|
+
}
|
|
63
|
+
return {
|
|
64
|
+
'usedTokens': value['usedTokens'],
|
|
65
|
+
'contextWindow': value['contextWindow'],
|
|
66
|
+
'contextWindowConfidence': value['contextWindowConfidence'],
|
|
67
|
+
'modelName': value['modelName'],
|
|
68
|
+
};
|
|
69
|
+
}
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
*/
|
|
17
17
|
export interface ConversationMessageApprovalUio {
|
|
18
18
|
/**
|
|
19
|
-
* The tool whose use was submitted for approval. It also says which family the decision belongs to: bash_network_approval an address,
|
|
19
|
+
* The tool whose use was submitted for approval. It also says which family the decision belongs to: bash_network_approval an address, bash_command_approval a command (and bash_python_approval, its former name, on decisions taken before the rename).
|
|
20
20
|
* @type {string}
|
|
21
21
|
* @memberof ConversationMessageApprovalUio
|
|
22
22
|
*/
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import type { MessageStatusErrorUio } from './MessageStatusErrorUio';
|
|
13
|
+
import type { ConversationContextUsageUio } from './ConversationContextUsageUio';
|
|
13
14
|
import type { MessageStatusToolCallUio } from './MessageStatusToolCallUio';
|
|
14
15
|
import type { ToolUsedUio } from './ToolUsedUio';
|
|
15
16
|
/**
|
|
@@ -18,6 +19,12 @@ import type { ToolUsedUio } from './ToolUsedUio';
|
|
|
18
19
|
* @interface MessageStatusUio
|
|
19
20
|
*/
|
|
20
21
|
export interface MessageStatusUio {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {ConversationContextUsageUio}
|
|
25
|
+
* @memberof MessageStatusUio
|
|
26
|
+
*/
|
|
27
|
+
contextUsage?: ConversationContextUsageUio;
|
|
21
28
|
/**
|
|
22
29
|
*
|
|
23
30
|
* @type {string}
|
|
@@ -20,6 +20,7 @@ exports.MessageStatusUioFromJSONTyped = MessageStatusUioFromJSONTyped;
|
|
|
20
20
|
exports.MessageStatusUioToJSON = MessageStatusUioToJSON;
|
|
21
21
|
exports.MessageStatusUioToJSONTyped = MessageStatusUioToJSONTyped;
|
|
22
22
|
const MessageStatusErrorUio_1 = require("./MessageStatusErrorUio");
|
|
23
|
+
const ConversationContextUsageUio_1 = require("./ConversationContextUsageUio");
|
|
23
24
|
const MessageStatusToolCallUio_1 = require("./MessageStatusToolCallUio");
|
|
24
25
|
const ToolUsedUio_1 = require("./ToolUsedUio");
|
|
25
26
|
/**
|
|
@@ -45,6 +46,7 @@ function MessageStatusUioFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
45
46
|
return json;
|
|
46
47
|
}
|
|
47
48
|
return {
|
|
49
|
+
'contextUsage': json['contextUsage'] == null ? undefined : (0, ConversationContextUsageUio_1.ConversationContextUsageUioFromJSON)(json['contextUsage']),
|
|
48
50
|
'status': json['status'],
|
|
49
51
|
'content': json['content'] == null ? undefined : json['content'],
|
|
50
52
|
'reasoning': json['reasoning'] == null ? undefined : json['reasoning'],
|
|
@@ -62,6 +64,7 @@ function MessageStatusUioToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
62
64
|
return value;
|
|
63
65
|
}
|
|
64
66
|
return {
|
|
67
|
+
'contextUsage': (0, ConversationContextUsageUio_1.ConversationContextUsageUioToJSON)(value['contextUsage']),
|
|
65
68
|
'status': value['status'],
|
|
66
69
|
'content': value['content'],
|
|
67
70
|
'reasoning': value['reasoning'],
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
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
|
|
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 command it may run through one of its interpreters — python3 or js-exec. 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
14
|
* @export
|
|
15
15
|
* @interface ToolApprovalUio
|
|
16
16
|
*/
|
|
@@ -41,13 +41,13 @@ export interface ToolCallResultRequestUio {
|
|
|
41
41
|
*/
|
|
42
42
|
error?: string;
|
|
43
43
|
/**
|
|
44
|
-
* Only read when resolving a bash_network_approval or
|
|
44
|
+
* Only read when resolving a bash_network_approval or bash_command_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
45
|
* @type {string}
|
|
46
46
|
* @memberof ToolCallResultRequestUio
|
|
47
47
|
*/
|
|
48
48
|
approvalScope?: ToolCallResultRequestUioApprovalScopeEnum;
|
|
49
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
|
|
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_command_approval call, which has a single width: the exact command the server already recorded.
|
|
51
51
|
* @type {string}
|
|
52
52
|
* @memberof ToolCallResultRequestUio
|
|
53
53
|
*/
|
|
@@ -22,7 +22,7 @@ export interface ToolCallUio {
|
|
|
22
22
|
*/
|
|
23
23
|
callId: string;
|
|
24
24
|
/**
|
|
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.
|
|
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_command_approval is an agent sandbox asking permission to run a command through one of its interpreters — python3 or js-exec: 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. Calls named bash_python_approval, the name this last one carried while python was the only interpreter, may still be waiting in older conversations and resolve exactly the same way.
|
|
26
26
|
* @type {string}
|
|
27
27
|
* @memberof ToolCallUio
|
|
28
28
|
*/
|
package/dist/models/index.d.ts
CHANGED
|
@@ -170,6 +170,7 @@ export * from './ContextUio';
|
|
|
170
170
|
export * from './ContextualKnowledgeConversationEmbeddingUio';
|
|
171
171
|
export * from './ContextualKnowledgeConversationUio';
|
|
172
172
|
export * from './ConversationAttachmentDownloadUrlUio';
|
|
173
|
+
export * from './ConversationContextUsageUio';
|
|
173
174
|
export * from './ConversationDetailUio';
|
|
174
175
|
export * from './ConversationMessageApprovalUio';
|
|
175
176
|
export * from './ConversationMessagesInnerFlowNodeEntrypointsUio';
|
package/dist/models/index.js
CHANGED
|
@@ -188,6 +188,7 @@ __exportStar(require("./ContextUio"), exports);
|
|
|
188
188
|
__exportStar(require("./ContextualKnowledgeConversationEmbeddingUio"), exports);
|
|
189
189
|
__exportStar(require("./ContextualKnowledgeConversationUio"), exports);
|
|
190
190
|
__exportStar(require("./ConversationAttachmentDownloadUrlUio"), exports);
|
|
191
|
+
__exportStar(require("./ConversationContextUsageUio"), exports);
|
|
191
192
|
__exportStar(require("./ConversationDetailUio"), exports);
|
|
192
193
|
__exportStar(require("./ConversationMessageApprovalUio"), exports);
|
|
193
194
|
__exportStar(require("./ConversationMessagesInnerFlowNodeEntrypointsUio"), exports);
|
package/dist/openapi.json
CHANGED
|
@@ -16033,14 +16033,18 @@
|
|
|
16033
16033
|
"type" : "object"
|
|
16034
16034
|
},
|
|
16035
16035
|
"AgentSandboxConfiguration" : {
|
|
16036
|
-
"description" : "Per-agent activation of the bash sandbox and of its
|
|
16036
|
+
"description" : "Per-agent activation of the bash sandbox and of its three risky capabilities. Separate switches because the risk surfaces are unrelated. The server configuration can only narrow this: an agent may enable, never widen.",
|
|
16037
16037
|
"properties" : {
|
|
16038
16038
|
"enabled" : {
|
|
16039
16039
|
"description" : "Enables the Bash_exec tool for this agent.",
|
|
16040
16040
|
"type" : "boolean"
|
|
16041
16041
|
},
|
|
16042
16042
|
"pythonEnabled" : {
|
|
16043
|
-
"description" : "Enables python3 inside the sandbox. Also requires the server-side lock; the cost is arbitrary code execution.",
|
|
16043
|
+
"description" : "Enables python3 inside the sandbox. Also requires the server-side lock; the cost is arbitrary code execution, so every python command is approved by the user before it runs.",
|
|
16044
|
+
"type" : "boolean"
|
|
16045
|
+
},
|
|
16046
|
+
"javascriptEnabled" : {
|
|
16047
|
+
"description" : "Enables js-exec (JavaScript and TypeScript, in QuickJS) inside the sandbox. Same two extra locks as pythonEnabled, and the same per-command approval: running code IS the effect, so there is nothing to refuse afterwards.",
|
|
16044
16048
|
"type" : "boolean"
|
|
16045
16049
|
},
|
|
16046
16050
|
"network" : {
|
|
@@ -17250,6 +17254,9 @@
|
|
|
17250
17254
|
"usage" : {
|
|
17251
17255
|
"$ref" : "#/components/schemas/TokenUsage"
|
|
17252
17256
|
},
|
|
17257
|
+
"contextUsage" : {
|
|
17258
|
+
"$ref" : "#/components/schemas/ConversationContextUsage"
|
|
17259
|
+
},
|
|
17253
17260
|
"createdAt" : {
|
|
17254
17261
|
"type" : "string"
|
|
17255
17262
|
},
|
|
@@ -17422,7 +17429,7 @@
|
|
|
17422
17429
|
"description" : "One authorisation decision taken during this message: which tool, over what, by whom, when. Carried by the message so the history reads as it stands, with no extra request. For a decision granted once it is the only lasting trace there is — a one-off creates no standing approval. Deliberately beside toolResults rather than inside it: toolResults is replayed to the model every turn, and a one-off appearing there would later suggest a right that has expired.",
|
|
17423
17430
|
"properties" : {
|
|
17424
17431
|
"tool" : {
|
|
17425
|
-
"description" : "The tool whose use was submitted for approval. It also says which family the decision belongs to: bash_network_approval an address,
|
|
17432
|
+
"description" : "The tool whose use was submitted for approval. It also says which family the decision belongs to: bash_network_approval an address, bash_command_approval a command (and bash_python_approval, its former name, on decisions taken before the rename).",
|
|
17426
17433
|
"type" : "string"
|
|
17427
17434
|
},
|
|
17428
17435
|
"granted" : {
|
|
@@ -17536,6 +17543,34 @@
|
|
|
17536
17543
|
"required" : [ "inputTokens", "outputTokens", "reasoningTokens", "totalTokens" ],
|
|
17537
17544
|
"type" : "object"
|
|
17538
17545
|
},
|
|
17546
|
+
"ConversationContextUsage" : {
|
|
17547
|
+
"additionalProperties" : false,
|
|
17548
|
+
"description" : "How much of the model's context window this conversation occupies: the prompt of the last generation call, not the conversation's cumulated token count. Absent until a turn has been measured — an unmeasured conversation has an unknown occupancy, not an empty window.",
|
|
17549
|
+
"properties" : {
|
|
17550
|
+
"usedTokens" : {
|
|
17551
|
+
"description" : "Prompt of the last generation call, in tokens, as reported by the provider. Always > 0.",
|
|
17552
|
+
"example" : 18342,
|
|
17553
|
+
"type" : "number"
|
|
17554
|
+
},
|
|
17555
|
+
"contextWindow" : {
|
|
17556
|
+
"description" : "Context window of the conversation's model, in tokens. Always greater than 0.",
|
|
17557
|
+
"example" : 128000,
|
|
17558
|
+
"type" : "number"
|
|
17559
|
+
},
|
|
17560
|
+
"contextWindowConfidence" : {
|
|
17561
|
+
"description" : "Where the window above comes from. `declared`: carried by the model definition. `catalog`: known to the backend only. `fallback`: unknown, shown as an approximation.",
|
|
17562
|
+
"enum" : [ "declared", "catalog", "fallback" ],
|
|
17563
|
+
"type" : "string"
|
|
17564
|
+
},
|
|
17565
|
+
"modelName" : {
|
|
17566
|
+
"description" : "Model the conversation runs on, absent when its engine reference resolves to none.",
|
|
17567
|
+
"type" : "string"
|
|
17568
|
+
}
|
|
17569
|
+
},
|
|
17570
|
+
"required" : [ "contextWindow", "contextWindowConfidence", "usedTokens" ],
|
|
17571
|
+
"title" : "ConversationContextUsage",
|
|
17572
|
+
"type" : "object"
|
|
17573
|
+
},
|
|
17539
17574
|
"ChatContext" : {
|
|
17540
17575
|
"properties" : {
|
|
17541
17576
|
"attachments" : {
|
|
@@ -20246,7 +20281,7 @@
|
|
|
20246
20281
|
},
|
|
20247
20282
|
"ToolApproval" : {
|
|
20248
20283
|
"additionalProperties" : false,
|
|
20249
|
-
"description" : "One operation the user has authorised an agent to perform. Two families share this shape: an address the agent sandbox may reach, and a
|
|
20284
|
+
"description" : "One operation the user has authorised an agent to perform. Two families share this shape: an address the agent sandbox may reach, and a command it may run through one of its interpreters — python3 or js-exec. 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.",
|
|
20250
20285
|
"properties" : {
|
|
20251
20286
|
"id" : {
|
|
20252
20287
|
"description" : "Identifier to revoke the approval with.",
|
|
@@ -22033,6 +22068,9 @@
|
|
|
22033
22068
|
},
|
|
22034
22069
|
"MessageStatus" : {
|
|
22035
22070
|
"properties" : {
|
|
22071
|
+
"contextUsage" : {
|
|
22072
|
+
"$ref" : "#/components/schemas/ConversationContextUsage"
|
|
22073
|
+
},
|
|
22036
22074
|
"status" : {
|
|
22037
22075
|
"type" : "string"
|
|
22038
22076
|
},
|
|
@@ -22085,7 +22123,7 @@
|
|
|
22085
22123
|
"type" : "string"
|
|
22086
22124
|
},
|
|
22087
22125
|
"tool" : {
|
|
22088
|
-
"description" : "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.
|
|
22126
|
+
"description" : "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_command_approval is an agent sandbox asking permission to run a command through one of its interpreters — python3 or js-exec: 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. Calls named bash_python_approval, the name this last one carried while python was the only interpreter, may still be waiting in older conversations and resolve exactly the same way.",
|
|
22089
22127
|
"type" : "string"
|
|
22090
22128
|
},
|
|
22091
22129
|
"status" : {
|
|
@@ -22148,12 +22186,12 @@
|
|
|
22148
22186
|
"type" : "string"
|
|
22149
22187
|
},
|
|
22150
22188
|
"approvalScope" : {
|
|
22151
|
-
"description" : "Only read when resolving a bash_network_approval or
|
|
22189
|
+
"description" : "Only read when resolving a bash_network_approval or bash_command_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.",
|
|
22152
22190
|
"enum" : [ "once", "agentUser" ],
|
|
22153
22191
|
"type" : "string"
|
|
22154
22192
|
},
|
|
22155
22193
|
"approvalWidth" : {
|
|
22156
|
-
"description" : "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
|
|
22194
|
+
"description" : "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_command_approval call, which has a single width: the exact command the server already recorded.",
|
|
22157
22195
|
"enum" : [ "prefix", "origin" ],
|
|
22158
22196
|
"type" : "string"
|
|
22159
22197
|
}
|