@breign/client 1.0.192 → 1.0.193

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.
@@ -20,6 +20,7 @@ import type { ConversationHumanRequestUio } from './ConversationHumanRequestUio'
20
20
  import type { ToolResultsUio } from './ToolResultsUio';
21
21
  import type { TokenUsageUio } from './TokenUsageUio';
22
22
  import type { ConversationTicketProposalUio } from './ConversationTicketProposalUio';
23
+ import type { ConversationMessageQuestionnaireUio } from './ConversationMessageQuestionnaireUio';
23
24
  /**
24
25
  *
25
26
  * @export
@@ -80,6 +81,12 @@ export interface ChatMessageUio {
80
81
  * @memberof ChatMessageUio
81
82
  */
82
83
  approvals?: Array<ConversationMessageApprovalUio>;
84
+ /**
85
+ *
86
+ * @type {Array<ConversationMessageQuestionnaireUio>}
87
+ * @memberof ChatMessageUio
88
+ */
89
+ questionnaires?: Array<ConversationMessageQuestionnaireUio>;
83
90
  /**
84
91
  *
85
92
  * @type {ConversationHumanRequestUio}
@@ -30,6 +30,7 @@ const ConversationHumanRequestUio_1 = require("./ConversationHumanRequestUio");
30
30
  const ToolResultsUio_1 = require("./ToolResultsUio");
31
31
  const TokenUsageUio_1 = require("./TokenUsageUio");
32
32
  const ConversationTicketProposalUio_1 = require("./ConversationTicketProposalUio");
33
+ const ConversationMessageQuestionnaireUio_1 = require("./ConversationMessageQuestionnaireUio");
33
34
  /**
34
35
  * @export
35
36
  */
@@ -68,6 +69,7 @@ function ChatMessageUioFromJSONTyped(json, ignoreDiscriminator) {
68
69
  'confirmationLink': json['confirmationLink'] == null ? undefined : json['confirmationLink'],
69
70
  'toolResults': json['toolResults'] == null ? undefined : (json['toolResults'].map(ToolResultsUio_1.ToolResultsUioFromJSON)),
70
71
  'approvals': json['approvals'] == null ? undefined : (json['approvals'].map(ConversationMessageApprovalUio_1.ConversationMessageApprovalUioFromJSON)),
72
+ 'questionnaires': json['questionnaires'] == null ? undefined : (json['questionnaires'].map(ConversationMessageQuestionnaireUio_1.ConversationMessageQuestionnaireUioFromJSON)),
71
73
  'humanRequest': json['humanRequest'] == null ? undefined : (0, ConversationHumanRequestUio_1.ConversationHumanRequestUioFromJSON)(json['humanRequest']),
72
74
  'ticketProposal': json['ticketProposal'] == null ? undefined : (0, ConversationTicketProposalUio_1.ConversationTicketProposalUioFromJSON)(json['ticketProposal']),
73
75
  'suggestions': json['suggestions'] == null ? undefined : (json['suggestions'].map(SuggestionUio_1.SuggestionUioFromJSON)),
@@ -104,6 +106,7 @@ function ChatMessageUioToJSONTyped(value, ignoreDiscriminator = false) {
104
106
  'confirmationLink': value['confirmationLink'],
105
107
  'toolResults': value['toolResults'] == null ? undefined : (value['toolResults'].map(ToolResultsUio_1.ToolResultsUioToJSON)),
106
108
  'approvals': value['approvals'] == null ? undefined : (value['approvals'].map(ConversationMessageApprovalUio_1.ConversationMessageApprovalUioToJSON)),
109
+ 'questionnaires': value['questionnaires'] == null ? undefined : (value['questionnaires'].map(ConversationMessageQuestionnaireUio_1.ConversationMessageQuestionnaireUioToJSON)),
107
110
  'humanRequest': (0, ConversationHumanRequestUio_1.ConversationHumanRequestUioToJSON)(value['humanRequest']),
108
111
  'ticketProposal': (0, ConversationTicketProposalUio_1.ConversationTicketProposalUioToJSON)(value['ticketProposal']),
109
112
  'suggestions': value['suggestions'] == null ? undefined : (value['suggestions'].map(SuggestionUio_1.SuggestionUioToJSON)),
@@ -0,0 +1,67 @@
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 { UserQuestionAnswerUio } from './UserQuestionAnswerUio';
13
+ import type { UserQuestionUio } from './UserQuestionUio';
14
+ /**
15
+ * An ask_user questionnaire closed during this message, carried by the message so the history shows the card as it was answered. answered — the user submitted answers; skipped — they declined; ignored — they wrote a new message instead.
16
+ * @export
17
+ * @interface ConversationMessageQuestionnaireUio
18
+ */
19
+ export interface ConversationMessageQuestionnaireUio {
20
+ /**
21
+ *
22
+ * @type {string}
23
+ * @memberof ConversationMessageQuestionnaireUio
24
+ */
25
+ callId: string;
26
+ /**
27
+ *
28
+ * @type {Array<UserQuestionUio>}
29
+ * @memberof ConversationMessageQuestionnaireUio
30
+ */
31
+ questions: Array<UserQuestionUio>;
32
+ /**
33
+ *
34
+ * @type {string}
35
+ * @memberof ConversationMessageQuestionnaireUio
36
+ */
37
+ status: ConversationMessageQuestionnaireUioStatusEnum;
38
+ /**
39
+ * Present when answered, aligned with questions.
40
+ * @type {Array<UserQuestionAnswerUio>}
41
+ * @memberof ConversationMessageQuestionnaireUio
42
+ */
43
+ answers?: Array<UserQuestionAnswerUio>;
44
+ /**
45
+ *
46
+ * @type {string}
47
+ * @memberof ConversationMessageQuestionnaireUio
48
+ */
49
+ at: string;
50
+ }
51
+ /**
52
+ * @export
53
+ */
54
+ export declare const ConversationMessageQuestionnaireUioStatusEnum: {
55
+ readonly Answered: "answered";
56
+ readonly Skipped: "skipped";
57
+ readonly Ignored: "ignored";
58
+ };
59
+ export type ConversationMessageQuestionnaireUioStatusEnum = typeof ConversationMessageQuestionnaireUioStatusEnum[keyof typeof ConversationMessageQuestionnaireUioStatusEnum];
60
+ /**
61
+ * Check if a given object implements the ConversationMessageQuestionnaireUio interface.
62
+ */
63
+ export declare function instanceOfConversationMessageQuestionnaireUio(value: object): value is ConversationMessageQuestionnaireUio;
64
+ export declare function ConversationMessageQuestionnaireUioFromJSON(json: any): ConversationMessageQuestionnaireUio;
65
+ export declare function ConversationMessageQuestionnaireUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConversationMessageQuestionnaireUio;
66
+ export declare function ConversationMessageQuestionnaireUioToJSON(json: any): ConversationMessageQuestionnaireUio;
67
+ export declare function ConversationMessageQuestionnaireUioToJSONTyped(value?: ConversationMessageQuestionnaireUio | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,75 @@
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.ConversationMessageQuestionnaireUioStatusEnum = void 0;
17
+ exports.instanceOfConversationMessageQuestionnaireUio = instanceOfConversationMessageQuestionnaireUio;
18
+ exports.ConversationMessageQuestionnaireUioFromJSON = ConversationMessageQuestionnaireUioFromJSON;
19
+ exports.ConversationMessageQuestionnaireUioFromJSONTyped = ConversationMessageQuestionnaireUioFromJSONTyped;
20
+ exports.ConversationMessageQuestionnaireUioToJSON = ConversationMessageQuestionnaireUioToJSON;
21
+ exports.ConversationMessageQuestionnaireUioToJSONTyped = ConversationMessageQuestionnaireUioToJSONTyped;
22
+ const UserQuestionAnswerUio_1 = require("./UserQuestionAnswerUio");
23
+ const UserQuestionUio_1 = require("./UserQuestionUio");
24
+ /**
25
+ * @export
26
+ */
27
+ exports.ConversationMessageQuestionnaireUioStatusEnum = {
28
+ Answered: 'answered',
29
+ Skipped: 'skipped',
30
+ Ignored: 'ignored'
31
+ };
32
+ /**
33
+ * Check if a given object implements the ConversationMessageQuestionnaireUio interface.
34
+ */
35
+ function instanceOfConversationMessageQuestionnaireUio(value) {
36
+ if (!('callId' in value) || value['callId'] === undefined)
37
+ return false;
38
+ if (!('questions' in value) || value['questions'] === undefined)
39
+ return false;
40
+ if (!('status' in value) || value['status'] === undefined)
41
+ return false;
42
+ if (!('at' in value) || value['at'] === undefined)
43
+ return false;
44
+ return true;
45
+ }
46
+ function ConversationMessageQuestionnaireUioFromJSON(json) {
47
+ return ConversationMessageQuestionnaireUioFromJSONTyped(json, false);
48
+ }
49
+ function ConversationMessageQuestionnaireUioFromJSONTyped(json, ignoreDiscriminator) {
50
+ if (json == null) {
51
+ return json;
52
+ }
53
+ return {
54
+ 'callId': json['callId'],
55
+ 'questions': (json['questions'].map(UserQuestionUio_1.UserQuestionUioFromJSON)),
56
+ 'status': json['status'],
57
+ 'answers': json['answers'] == null ? undefined : (json['answers'].map(UserQuestionAnswerUio_1.UserQuestionAnswerUioFromJSON)),
58
+ 'at': json['at'],
59
+ };
60
+ }
61
+ function ConversationMessageQuestionnaireUioToJSON(json) {
62
+ return ConversationMessageQuestionnaireUioToJSONTyped(json, false);
63
+ }
64
+ function ConversationMessageQuestionnaireUioToJSONTyped(value, ignoreDiscriminator = false) {
65
+ if (value == null) {
66
+ return value;
67
+ }
68
+ return {
69
+ 'callId': value['callId'],
70
+ 'questions': (value['questions'].map(UserQuestionUio_1.UserQuestionUioToJSON)),
71
+ 'status': value['status'],
72
+ 'answers': value['answers'] == null ? undefined : (value['answers'].map(UserQuestionAnswerUio_1.UserQuestionAnswerUioToJSON)),
73
+ 'at': value['at'],
74
+ };
75
+ }
@@ -15,6 +15,7 @@ import type { ConversationMessageApprovalUio } from './ConversationMessageApprov
15
15
  import type { ConversationMessagesInnerFlowNodeUio } from './ConversationMessagesInnerFlowNodeUio';
16
16
  import type { ToolResultsUio } from './ToolResultsUio';
17
17
  import type { TokenUsageUio } from './TokenUsageUio';
18
+ import type { ConversationMessageQuestionnaireUio } from './ConversationMessageQuestionnaireUio';
18
19
  /**
19
20
  *
20
21
  * @export
@@ -89,6 +90,12 @@ export interface ConversationMessagesInnerUio {
89
90
  * @memberof ConversationMessagesInnerUio
90
91
  */
91
92
  approvals?: Array<ConversationMessageApprovalUio>;
93
+ /**
94
+ *
95
+ * @type {Array<ConversationMessageQuestionnaireUio>}
96
+ * @memberof ConversationMessagesInnerUio
97
+ */
98
+ questionnaires?: Array<ConversationMessageQuestionnaireUio>;
92
99
  /**
93
100
  *
94
101
  * @type {Array<string>}
@@ -24,6 +24,7 @@ const ConversationMessageApprovalUio_1 = require("./ConversationMessageApprovalU
24
24
  const ConversationMessagesInnerFlowNodeUio_1 = require("./ConversationMessagesInnerFlowNodeUio");
25
25
  const ToolResultsUio_1 = require("./ToolResultsUio");
26
26
  const TokenUsageUio_1 = require("./TokenUsageUio");
27
+ const ConversationMessageQuestionnaireUio_1 = require("./ConversationMessageQuestionnaireUio");
27
28
  /**
28
29
  * Check if a given object implements the ConversationMessagesInnerUio interface.
29
30
  */
@@ -57,6 +58,7 @@ function ConversationMessagesInnerUioFromJSONTyped(json, ignoreDiscriminator) {
57
58
  'usage': json['usage'] == null ? undefined : (0, TokenUsageUio_1.TokenUsageUioFromJSON)(json['usage']),
58
59
  'toolResults': json['toolResults'] == null ? undefined : (json['toolResults'].map(ToolResultsUio_1.ToolResultsUioFromJSON)),
59
60
  'approvals': json['approvals'] == null ? undefined : (json['approvals'].map(ConversationMessageApprovalUio_1.ConversationMessageApprovalUioFromJSON)),
61
+ 'questionnaires': json['questionnaires'] == null ? undefined : (json['questionnaires'].map(ConversationMessageQuestionnaireUio_1.ConversationMessageQuestionnaireUioFromJSON)),
60
62
  'workspaceFiles': json['workspaceFiles'] == null ? undefined : json['workspaceFiles'],
61
63
  };
62
64
  }
@@ -79,6 +81,7 @@ function ConversationMessagesInnerUioToJSONTyped(value, ignoreDiscriminator = fa
79
81
  'usage': (0, TokenUsageUio_1.TokenUsageUioToJSON)(value['usage']),
80
82
  'toolResults': value['toolResults'] == null ? undefined : (value['toolResults'].map(ToolResultsUio_1.ToolResultsUioToJSON)),
81
83
  'approvals': value['approvals'] == null ? undefined : (value['approvals'].map(ConversationMessageApprovalUio_1.ConversationMessageApprovalUioToJSON)),
84
+ 'questionnaires': value['questionnaires'] == null ? undefined : (value['questionnaires'].map(ConversationMessageQuestionnaireUio_1.ConversationMessageQuestionnaireUioToJSON)),
82
85
  'workspaceFiles': value['workspaceFiles'],
83
86
  };
84
87
  }
@@ -10,6 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import type { ToolCallAttachmentUio } from './ToolCallAttachmentUio';
13
+ import type { UserQuestionAnswerUio } from './UserQuestionAnswerUio';
13
14
  /**
14
15
  * Result of a tool call, whatever the tool. output is handed to the model as the tool result; attachments are stored and added to the conversation context so the model can see them.
15
16
  * @export
@@ -52,6 +53,12 @@ export interface ToolCallResultRequestUio {
52
53
  * @memberof ToolCallResultRequestUio
53
54
  */
54
55
  approvalWidth?: ToolCallResultRequestUioApprovalWidthEnum;
56
+ /**
57
+ * Only read when resolving an ask_user call with status completed, and required there: one answer per question, in the order of arguments.questions. selected holds labels of the options offered, at least one unless other is filled, a single one when the question is not multiSelect. Any other shape is refused with a 400. To skip the questionnaire, post status refused without answers.
58
+ * @type {Array<UserQuestionAnswerUio>}
59
+ * @memberof ToolCallResultRequestUio
60
+ */
61
+ answers?: Array<UserQuestionAnswerUio>;
55
62
  }
56
63
  /**
57
64
  * @export
@@ -20,6 +20,7 @@ exports.ToolCallResultRequestUioFromJSONTyped = ToolCallResultRequestUioFromJSON
20
20
  exports.ToolCallResultRequestUioToJSON = ToolCallResultRequestUioToJSON;
21
21
  exports.ToolCallResultRequestUioToJSONTyped = ToolCallResultRequestUioToJSONTyped;
22
22
  const ToolCallAttachmentUio_1 = require("./ToolCallAttachmentUio");
23
+ const UserQuestionAnswerUio_1 = require("./UserQuestionAnswerUio");
23
24
  /**
24
25
  * @export
25
26
  */
@@ -64,6 +65,7 @@ function ToolCallResultRequestUioFromJSONTyped(json, ignoreDiscriminator) {
64
65
  'error': json['error'] == null ? undefined : json['error'],
65
66
  'approvalScope': json['approvalScope'] == null ? undefined : json['approvalScope'],
66
67
  'approvalWidth': json['approvalWidth'] == null ? undefined : json['approvalWidth'],
68
+ 'answers': json['answers'] == null ? undefined : (json['answers'].map(UserQuestionAnswerUio_1.UserQuestionAnswerUioFromJSON)),
67
69
  };
68
70
  }
69
71
  function ToolCallResultRequestUioToJSON(json) {
@@ -80,5 +82,6 @@ function ToolCallResultRequestUioToJSONTyped(value, ignoreDiscriminator = false)
80
82
  'error': value['error'],
81
83
  'approvalScope': value['approvalScope'],
82
84
  'approvalWidth': value['approvalWidth'],
85
+ 'answers': value['answers'] == null ? undefined : (value['answers'].map(UserQuestionAnswerUio_1.UserQuestionAnswerUioToJSON)),
83
86
  };
84
87
  }
@@ -22,7 +22,7 @@ export interface ToolCallUio {
22
22
  */
23
23
  callId: string;
24
24
  /**
25
- * Name of the tool the model called. Four values are produced by the server today. mcp_tool_approval asks permission to run an MCP tool: a write of the builder server, which creates and edits agents, or a tool of an MCP server configured in the organisation, by its approval mode (see Tool.mcp.approvalModes). arguments carries server (builder, or the id of the organisation's tool), serverName (the name to show), tool and arguments (the exact call the model wants to make), and — builder only — preview — what the call changes, for display only: tool, agentName, changes (field, before when something existed, after, with names instead of ids, unchanged fields left out) and warnings (deactivates, rewritesInstructions, changesEngine); null when it could not be built. Allow once covers exactly these arguments; agentUser covers the tool whatever its arguments. 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.
25
+ * Name of the tool the model called. Four values are produced by the server today. mcp_tool_approval asks permission to run an MCP tool: a write of the builder server, which creates and edits agents, or a tool of an MCP server configured in the organisation, by its approval mode (see Tool.mcp.approvalModes). arguments carries server (builder, or the id of the organisation's tool), serverName (the name to show), tool and arguments (the exact call the model wants to make), and — builder only — preview — what the call changes, for display only: tool, agentName, changes (field, before when something existed, after, with names instead of ids, unchanged fields left out) and warnings (deactivates, rewritesInstructions, changesEngine); null when it could not be built. Allow once covers exactly these arguments; agentUser covers the tool whatever its arguments. 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. ask_user is the agent asking the user to pick among options: arguments carries questions (1 to 4, each with question, header, multiSelect and 2 to 4 options of label and description); the client also offers a free-text other answer.
26
26
  * @type {string}
27
27
  * @memberof ToolCallUio
28
28
  */
@@ -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 UserQuestionAnswerUio
16
+ */
17
+ export interface UserQuestionAnswerUio {
18
+ /**
19
+ * Labels of the chosen options.
20
+ * @type {Array<string>}
21
+ * @memberof UserQuestionAnswerUio
22
+ */
23
+ selected: Array<string>;
24
+ /**
25
+ * Free text typed in the other answer, when filled.
26
+ * @type {string}
27
+ * @memberof UserQuestionAnswerUio
28
+ */
29
+ other?: string;
30
+ }
31
+ /**
32
+ * Check if a given object implements the UserQuestionAnswerUio interface.
33
+ */
34
+ export declare function instanceOfUserQuestionAnswerUio(value: object): value is UserQuestionAnswerUio;
35
+ export declare function UserQuestionAnswerUioFromJSON(json: any): UserQuestionAnswerUio;
36
+ export declare function UserQuestionAnswerUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserQuestionAnswerUio;
37
+ export declare function UserQuestionAnswerUioToJSON(json: any): UserQuestionAnswerUio;
38
+ export declare function UserQuestionAnswerUioToJSONTyped(value?: UserQuestionAnswerUio | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,52 @@
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.instanceOfUserQuestionAnswerUio = instanceOfUserQuestionAnswerUio;
17
+ exports.UserQuestionAnswerUioFromJSON = UserQuestionAnswerUioFromJSON;
18
+ exports.UserQuestionAnswerUioFromJSONTyped = UserQuestionAnswerUioFromJSONTyped;
19
+ exports.UserQuestionAnswerUioToJSON = UserQuestionAnswerUioToJSON;
20
+ exports.UserQuestionAnswerUioToJSONTyped = UserQuestionAnswerUioToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the UserQuestionAnswerUio interface.
23
+ */
24
+ function instanceOfUserQuestionAnswerUio(value) {
25
+ if (!('selected' in value) || value['selected'] === undefined)
26
+ return false;
27
+ return true;
28
+ }
29
+ function UserQuestionAnswerUioFromJSON(json) {
30
+ return UserQuestionAnswerUioFromJSONTyped(json, false);
31
+ }
32
+ function UserQuestionAnswerUioFromJSONTyped(json, ignoreDiscriminator) {
33
+ if (json == null) {
34
+ return json;
35
+ }
36
+ return {
37
+ 'selected': json['selected'],
38
+ 'other': json['other'] == null ? undefined : json['other'],
39
+ };
40
+ }
41
+ function UserQuestionAnswerUioToJSON(json) {
42
+ return UserQuestionAnswerUioToJSONTyped(json, false);
43
+ }
44
+ function UserQuestionAnswerUioToJSONTyped(value, ignoreDiscriminator = false) {
45
+ if (value == null) {
46
+ return value;
47
+ }
48
+ return {
49
+ 'selected': value['selected'],
50
+ 'other': value['other'],
51
+ };
52
+ }
@@ -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 UserQuestionOptionUio
16
+ */
17
+ export interface UserQuestionOptionUio {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof UserQuestionOptionUio
22
+ */
23
+ label: string;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof UserQuestionOptionUio
28
+ */
29
+ description: string;
30
+ }
31
+ /**
32
+ * Check if a given object implements the UserQuestionOptionUio interface.
33
+ */
34
+ export declare function instanceOfUserQuestionOptionUio(value: object): value is UserQuestionOptionUio;
35
+ export declare function UserQuestionOptionUioFromJSON(json: any): UserQuestionOptionUio;
36
+ export declare function UserQuestionOptionUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserQuestionOptionUio;
37
+ export declare function UserQuestionOptionUioToJSON(json: any): UserQuestionOptionUio;
38
+ export declare function UserQuestionOptionUioToJSONTyped(value?: UserQuestionOptionUio | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,54 @@
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.instanceOfUserQuestionOptionUio = instanceOfUserQuestionOptionUio;
17
+ exports.UserQuestionOptionUioFromJSON = UserQuestionOptionUioFromJSON;
18
+ exports.UserQuestionOptionUioFromJSONTyped = UserQuestionOptionUioFromJSONTyped;
19
+ exports.UserQuestionOptionUioToJSON = UserQuestionOptionUioToJSON;
20
+ exports.UserQuestionOptionUioToJSONTyped = UserQuestionOptionUioToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the UserQuestionOptionUio interface.
23
+ */
24
+ function instanceOfUserQuestionOptionUio(value) {
25
+ if (!('label' in value) || value['label'] === undefined)
26
+ return false;
27
+ if (!('description' in value) || value['description'] === undefined)
28
+ return false;
29
+ return true;
30
+ }
31
+ function UserQuestionOptionUioFromJSON(json) {
32
+ return UserQuestionOptionUioFromJSONTyped(json, false);
33
+ }
34
+ function UserQuestionOptionUioFromJSONTyped(json, ignoreDiscriminator) {
35
+ if (json == null) {
36
+ return json;
37
+ }
38
+ return {
39
+ 'label': json['label'],
40
+ 'description': json['description'],
41
+ };
42
+ }
43
+ function UserQuestionOptionUioToJSON(json) {
44
+ return UserQuestionOptionUioToJSONTyped(json, false);
45
+ }
46
+ function UserQuestionOptionUioToJSONTyped(value, ignoreDiscriminator = false) {
47
+ if (value == null) {
48
+ return value;
49
+ }
50
+ return {
51
+ 'label': value['label'],
52
+ 'description': value['description'],
53
+ };
54
+ }
@@ -0,0 +1,51 @@
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 { UserQuestionOptionUio } from './UserQuestionOptionUio';
13
+ /**
14
+ * A multiple-choice question the agent asks the chat user through the ask_user tool.
15
+ * @export
16
+ * @interface UserQuestionUio
17
+ */
18
+ export interface UserQuestionUio {
19
+ /**
20
+ *
21
+ * @type {string}
22
+ * @memberof UserQuestionUio
23
+ */
24
+ question: string;
25
+ /**
26
+ * Short label shown as a chip.
27
+ * @type {string}
28
+ * @memberof UserQuestionUio
29
+ */
30
+ header: string;
31
+ /**
32
+ *
33
+ * @type {boolean}
34
+ * @memberof UserQuestionUio
35
+ */
36
+ multiSelect: boolean;
37
+ /**
38
+ *
39
+ * @type {Array<UserQuestionOptionUio>}
40
+ * @memberof UserQuestionUio
41
+ */
42
+ options: Array<UserQuestionOptionUio>;
43
+ }
44
+ /**
45
+ * Check if a given object implements the UserQuestionUio interface.
46
+ */
47
+ export declare function instanceOfUserQuestionUio(value: object): value is UserQuestionUio;
48
+ export declare function UserQuestionUioFromJSON(json: any): UserQuestionUio;
49
+ export declare function UserQuestionUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserQuestionUio;
50
+ export declare function UserQuestionUioToJSON(json: any): UserQuestionUio;
51
+ export declare function UserQuestionUioToJSONTyped(value?: UserQuestionUio | 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.instanceOfUserQuestionUio = instanceOfUserQuestionUio;
17
+ exports.UserQuestionUioFromJSON = UserQuestionUioFromJSON;
18
+ exports.UserQuestionUioFromJSONTyped = UserQuestionUioFromJSONTyped;
19
+ exports.UserQuestionUioToJSON = UserQuestionUioToJSON;
20
+ exports.UserQuestionUioToJSONTyped = UserQuestionUioToJSONTyped;
21
+ const UserQuestionOptionUio_1 = require("./UserQuestionOptionUio");
22
+ /**
23
+ * Check if a given object implements the UserQuestionUio interface.
24
+ */
25
+ function instanceOfUserQuestionUio(value) {
26
+ if (!('question' in value) || value['question'] === undefined)
27
+ return false;
28
+ if (!('header' in value) || value['header'] === undefined)
29
+ return false;
30
+ if (!('multiSelect' in value) || value['multiSelect'] === undefined)
31
+ return false;
32
+ if (!('options' in value) || value['options'] === undefined)
33
+ return false;
34
+ return true;
35
+ }
36
+ function UserQuestionUioFromJSON(json) {
37
+ return UserQuestionUioFromJSONTyped(json, false);
38
+ }
39
+ function UserQuestionUioFromJSONTyped(json, ignoreDiscriminator) {
40
+ if (json == null) {
41
+ return json;
42
+ }
43
+ return {
44
+ 'question': json['question'],
45
+ 'header': json['header'],
46
+ 'multiSelect': json['multiSelect'],
47
+ 'options': (json['options'].map(UserQuestionOptionUio_1.UserQuestionOptionUioFromJSON)),
48
+ };
49
+ }
50
+ function UserQuestionUioToJSON(json) {
51
+ return UserQuestionUioToJSONTyped(json, false);
52
+ }
53
+ function UserQuestionUioToJSONTyped(value, ignoreDiscriminator = false) {
54
+ if (value == null) {
55
+ return value;
56
+ }
57
+ return {
58
+ 'question': value['question'],
59
+ 'header': value['header'],
60
+ 'multiSelect': value['multiSelect'],
61
+ 'options': (value['options'].map(UserQuestionOptionUio_1.UserQuestionOptionUioToJSON)),
62
+ };
63
+ }
@@ -236,6 +236,7 @@ export * from './ConversationHumanRequestUio';
236
236
  export * from './ConversationMessageApprovalUio';
237
237
  export * from './ConversationMessageImageUio';
238
238
  export * from './ConversationMessageImagesUio';
239
+ export * from './ConversationMessageQuestionnaireUio';
239
240
  export * from './ConversationMessagesInnerFlowNodeEntrypointsUio';
240
241
  export * from './ConversationMessagesInnerFlowNodeUio';
241
242
  export * from './ConversationMessagesInnerSuggestionsInnerUio';
@@ -728,6 +729,9 @@ export * from './UserDirectPermissionsRequestUio';
728
729
  export * from './UserIdentifierRequestUio';
729
730
  export * from './UserIdentifierUio';
730
731
  export * from './UserLockRequestUio';
732
+ export * from './UserQuestionAnswerUio';
733
+ export * from './UserQuestionOptionUio';
734
+ export * from './UserQuestionUio';
731
735
  export * from './UserUpdateRequestUio';
732
736
  export * from './WebhookEndpointUio';
733
737
  export * from './WebhookEndpointUpdateUio';
@@ -254,6 +254,7 @@ __exportStar(require("./ConversationHumanRequestUio"), exports);
254
254
  __exportStar(require("./ConversationMessageApprovalUio"), exports);
255
255
  __exportStar(require("./ConversationMessageImageUio"), exports);
256
256
  __exportStar(require("./ConversationMessageImagesUio"), exports);
257
+ __exportStar(require("./ConversationMessageQuestionnaireUio"), exports);
257
258
  __exportStar(require("./ConversationMessagesInnerFlowNodeEntrypointsUio"), exports);
258
259
  __exportStar(require("./ConversationMessagesInnerFlowNodeUio"), exports);
259
260
  __exportStar(require("./ConversationMessagesInnerSuggestionsInnerUio"), exports);
@@ -746,6 +747,9 @@ __exportStar(require("./UserDirectPermissionsRequestUio"), exports);
746
747
  __exportStar(require("./UserIdentifierRequestUio"), exports);
747
748
  __exportStar(require("./UserIdentifierUio"), exports);
748
749
  __exportStar(require("./UserLockRequestUio"), exports);
750
+ __exportStar(require("./UserQuestionAnswerUio"), exports);
751
+ __exportStar(require("./UserQuestionOptionUio"), exports);
752
+ __exportStar(require("./UserQuestionUio"), exports);
749
753
  __exportStar(require("./UserUpdateRequestUio"), exports);
750
754
  __exportStar(require("./WebhookEndpointUio"), exports);
751
755
  __exportStar(require("./WebhookEndpointUpdateUio"), exports);
package/dist/openapi.json CHANGED
@@ -25042,6 +25042,12 @@
25042
25042
  },
25043
25043
  "type" : "array"
25044
25044
  },
25045
+ "questionnaires" : {
25046
+ "items" : {
25047
+ "$ref" : "#/components/schemas/ConversationMessageQuestionnaire"
25048
+ },
25049
+ "type" : "array"
25050
+ },
25045
25051
  "humanRequest" : {
25046
25052
  "$ref" : "#/components/schemas/ConversationHumanRequest"
25047
25053
  },
@@ -25198,6 +25204,98 @@
25198
25204
  "title" : "ConversationMessageApproval",
25199
25205
  "type" : "object"
25200
25206
  },
25207
+ "ConversationMessageQuestionnaire" : {
25208
+ "additionalProperties" : false,
25209
+ "description" : "An ask_user questionnaire closed during this message, carried by the message so the history shows the card as it was answered. answered — the user submitted answers; skipped — they declined; ignored — they wrote a new message instead.",
25210
+ "properties" : {
25211
+ "callId" : {
25212
+ "type" : "string"
25213
+ },
25214
+ "questions" : {
25215
+ "items" : {
25216
+ "$ref" : "#/components/schemas/UserQuestion"
25217
+ },
25218
+ "type" : "array"
25219
+ },
25220
+ "status" : {
25221
+ "enum" : [ "answered", "skipped", "ignored" ],
25222
+ "type" : "string"
25223
+ },
25224
+ "answers" : {
25225
+ "description" : "Present when answered, aligned with questions.",
25226
+ "items" : {
25227
+ "$ref" : "#/components/schemas/UserQuestionAnswer"
25228
+ },
25229
+ "type" : "array"
25230
+ },
25231
+ "at" : {
25232
+ "type" : "string"
25233
+ }
25234
+ },
25235
+ "required" : [ "at", "callId", "questions", "status" ],
25236
+ "title" : "ConversationMessageQuestionnaire",
25237
+ "type" : "object"
25238
+ },
25239
+ "UserQuestion" : {
25240
+ "additionalProperties" : false,
25241
+ "description" : "A multiple-choice question the agent asks the chat user through the ask_user tool.",
25242
+ "properties" : {
25243
+ "question" : {
25244
+ "type" : "string"
25245
+ },
25246
+ "header" : {
25247
+ "description" : "Short label shown as a chip.",
25248
+ "type" : "string"
25249
+ },
25250
+ "multiSelect" : {
25251
+ "type" : "boolean"
25252
+ },
25253
+ "options" : {
25254
+ "items" : {
25255
+ "$ref" : "#/components/schemas/UserQuestionOption"
25256
+ },
25257
+ "maxItems" : 4,
25258
+ "minItems" : 2,
25259
+ "type" : "array"
25260
+ }
25261
+ },
25262
+ "required" : [ "header", "multiSelect", "options", "question" ],
25263
+ "title" : "UserQuestion",
25264
+ "type" : "object"
25265
+ },
25266
+ "UserQuestionOption" : {
25267
+ "additionalProperties" : false,
25268
+ "properties" : {
25269
+ "label" : {
25270
+ "type" : "string"
25271
+ },
25272
+ "description" : {
25273
+ "type" : "string"
25274
+ }
25275
+ },
25276
+ "required" : [ "description", "label" ],
25277
+ "title" : "UserQuestionOption",
25278
+ "type" : "object"
25279
+ },
25280
+ "UserQuestionAnswer" : {
25281
+ "additionalProperties" : false,
25282
+ "properties" : {
25283
+ "selected" : {
25284
+ "description" : "Labels of the chosen options.",
25285
+ "items" : {
25286
+ "type" : "string"
25287
+ },
25288
+ "type" : "array"
25289
+ },
25290
+ "other" : {
25291
+ "description" : "Free text typed in the other answer, when filled.",
25292
+ "type" : "string"
25293
+ }
25294
+ },
25295
+ "required" : [ "selected" ],
25296
+ "title" : "UserQuestionAnswer",
25297
+ "type" : "object"
25298
+ },
25201
25299
  "ConversationHumanRequest" : {
25202
25300
  "description" : "A question an agent asks a human from a task conversation (Human_ask tool). Carried by a mirror message in the human's chat conversation with that agent, which is where they see and answer it. The task stays suspended on the pending call callId until the answer resumes it.",
25203
25301
  "properties" : {
@@ -31652,7 +31750,7 @@
31652
31750
  "type" : "string"
31653
31751
  },
31654
31752
  "tool" : {
31655
- "description" : "Name of the tool the model called. Four values are produced by the server today. mcp_tool_approval asks permission to run an MCP tool: a write of the builder server, which creates and edits agents, or a tool of an MCP server configured in the organisation, by its approval mode (see Tool.mcp.approvalModes). arguments carries server (builder, or the id of the organisation's tool), serverName (the name to show), tool and arguments (the exact call the model wants to make), and — builder only — preview — what the call changes, for display only: tool, agentName, changes (field, before when something existed, after, with names instead of ids, unchanged fields left out) and warnings (deactivates, rewritesInstructions, changesEngine); null when it could not be built. Allow once covers exactly these arguments; agentUser covers the tool whatever its arguments. 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.",
31753
+ "description" : "Name of the tool the model called. Four values are produced by the server today. mcp_tool_approval asks permission to run an MCP tool: a write of the builder server, which creates and edits agents, or a tool of an MCP server configured in the organisation, by its approval mode (see Tool.mcp.approvalModes). arguments carries server (builder, or the id of the organisation's tool), serverName (the name to show), tool and arguments (the exact call the model wants to make), and — builder only — preview — what the call changes, for display only: tool, agentName, changes (field, before when something existed, after, with names instead of ids, unchanged fields left out) and warnings (deactivates, rewritesInstructions, changesEngine); null when it could not be built. Allow once covers exactly these arguments; agentUser covers the tool whatever its arguments. 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. ask_user is the agent asking the user to pick among options: arguments carries questions (1 to 4, each with question, header, multiSelect and 2 to 4 options of label and description); the client also offers a free-text other answer.",
31656
31754
  "type" : "string"
31657
31755
  },
31658
31756
  "status" : {
@@ -31723,6 +31821,14 @@
31723
31821
  "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.",
31724
31822
  "enum" : [ "prefix", "origin" ],
31725
31823
  "type" : "string"
31824
+ },
31825
+ "answers" : {
31826
+ "description" : "Only read when resolving an ask_user call with status completed, and required there: one answer per question, in the order of arguments.questions. selected holds labels of the options offered, at least one unless other is filled, a single one when the question is not multiSelect. Any other shape is refused with a 400. To skip the questionnaire, post status refused without answers.",
31827
+ "items" : {
31828
+ "$ref" : "#/components/schemas/UserQuestionAnswer"
31829
+ },
31830
+ "maxItems" : 4,
31831
+ "type" : "array"
31726
31832
  }
31727
31833
  },
31728
31834
  "required" : [ "status" ],
@@ -38247,6 +38353,12 @@
38247
38353
  },
38248
38354
  "type" : "array"
38249
38355
  },
38356
+ "questionnaires" : {
38357
+ "items" : {
38358
+ "$ref" : "#/components/schemas/ConversationMessageQuestionnaire"
38359
+ },
38360
+ "type" : "array"
38361
+ },
38250
38362
  "workspaceFiles" : {
38251
38363
  "items" : {
38252
38364
  "type" : "string"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@breign/client",
3
- "version": "1.0.192",
3
+ "version": "1.0.193",
4
4
  "main": "dist/index.js",
5
5
  "exports": {
6
6
  ".": "./dist/index.js",