@breign/client 1.0.152 → 1.0.153

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { AddModuleRequestUio, AdvancedFlowEditorUio, AdvancedFlowEditorUpdateRequestUio, AgentDuplicateRequestUio, AgentFlowCreateUio, AgentFlowUio, AgentImportRequestUio, AgentImportResponseUio, AgentMetricsEventUio, AgentMetricsOverviewUio, AgentModuleUio, AgentPatchUio, AgentRequestUio, AgentSubscriptionUio, AgentUio, AgentUsageMetricsUio, BodyWithIdUio, ChatUio, ConversationAttachmentDownloadUrlUio, DeleteMessageAudio200ResponseUio, EphemeralInstancesMetricsResponseUio, FileCreationRequestUio, FileCreationResponseUio, FlowEditorUio, FlowEditorUpdateRequestUio, MessageAudioDownloadUrlUio, OrgUsageMetricsResponseUio, S3UploadBodyUio, STTResponseUio } from '../models/index';
13
+ import type { AddModuleRequestUio, AdvancedFlowEditorUio, AdvancedFlowEditorUpdateRequestUio, AgentDuplicateRequestUio, AgentFlowCreateUio, AgentFlowUio, AgentImportRequestUio, AgentImportResponseUio, AgentMetricsEventUio, AgentMetricsOverviewUio, AgentModuleUio, AgentPatchUio, AgentRequestUio, AgentSubscriptionUio, AgentToolAllowedMethodsRequestUio, AgentUio, AgentUsageMetricsUio, BodyWithIdUio, ChatUio, ConversationAttachmentDownloadUrlUio, DeleteMessageAudio200ResponseUio, EphemeralInstancesMetricsResponseUio, FileCreationRequestUio, FileCreationResponseUio, FlowEditorUio, FlowEditorUpdateRequestUio, MessageAudioDownloadUrlUio, OrgUsageMetricsResponseUio, S3UploadBodyUio, STTResponseUio } from '../models/index';
14
14
  export interface AddModuleRequest {
15
15
  agentId: string;
16
16
  addModuleRequestUio: AddModuleRequestUio;
@@ -176,6 +176,11 @@ export interface UpdateAgentSubscriptionRequest {
176
176
  agentId: string;
177
177
  agentSubscriptionUio: AgentSubscriptionUio;
178
178
  }
179
+ export interface UpdateAgentToolAllowedMethodsRequest {
180
+ agentId: string;
181
+ toolId: string;
182
+ agentToolAllowedMethodsRequestUio: AgentToolAllowedMethodsRequestUio;
183
+ }
179
184
  export interface UpdateFlowRequest {
180
185
  agentId: string;
181
186
  flowId: string;
@@ -549,6 +554,16 @@ export declare class AgentApi extends runtime.BaseAPI {
549
554
  * Update agent subscription
550
555
  */
551
556
  updateAgentSubscription(agentId: string, agentSubscriptionUio: AgentSubscriptionUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AgentSubscriptionUio>;
557
+ /**
558
+ * Narrows a linked tool down to a subset of its methods, for this agent only. Names are the raw method names: MCP action names for an `mcp` tool, manifest function names for a `tool_api` one. The organization stays the ceiling — a name it does not authorize is rejected, and the effective set is always the intersection of both. Send `null` to clear the selection, which puts the agent back to inheriting every method the organization authorizes. An empty array is a different thing: the tool stays linked but the agent can call nothing on it.
559
+ * Replace the methods this agent may call on this tool
560
+ */
561
+ updateAgentToolAllowedMethodsRaw(requestParameters: UpdateAgentToolAllowedMethodsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
562
+ /**
563
+ * Narrows a linked tool down to a subset of its methods, for this agent only. Names are the raw method names: MCP action names for an `mcp` tool, manifest function names for a `tool_api` one. The organization stays the ceiling — a name it does not authorize is rejected, and the effective set is always the intersection of both. Send `null` to clear the selection, which puts the agent back to inheriting every method the organization authorizes. An empty array is a different thing: the tool stays linked but the agent can call nothing on it.
564
+ * Replace the methods this agent may call on this tool
565
+ */
566
+ updateAgentToolAllowedMethods(agentId: string, toolId: string, agentToolAllowedMethodsRequestUio: AgentToolAllowedMethodsRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
552
567
  /**
553
568
  * Updates an existing conversation flow
554
569
  * Update a flow
@@ -1275,6 +1275,42 @@ class AgentApi extends runtime.BaseAPI {
1275
1275
  const response = await this.updateAgentSubscriptionRaw({ agentId: agentId, agentSubscriptionUio: agentSubscriptionUio }, initOverrides);
1276
1276
  return await response.value();
1277
1277
  }
1278
+ /**
1279
+ * Narrows a linked tool down to a subset of its methods, for this agent only. Names are the raw method names: MCP action names for an `mcp` tool, manifest function names for a `tool_api` one. The organization stays the ceiling — a name it does not authorize is rejected, and the effective set is always the intersection of both. Send `null` to clear the selection, which puts the agent back to inheriting every method the organization authorizes. An empty array is a different thing: the tool stays linked but the agent can call nothing on it.
1280
+ * Replace the methods this agent may call on this tool
1281
+ */
1282
+ async updateAgentToolAllowedMethodsRaw(requestParameters, initOverrides) {
1283
+ if (requestParameters['agentId'] == null) {
1284
+ throw new runtime.RequiredError('agentId', 'Required parameter "agentId" was null or undefined when calling updateAgentToolAllowedMethods().');
1285
+ }
1286
+ if (requestParameters['toolId'] == null) {
1287
+ throw new runtime.RequiredError('toolId', 'Required parameter "toolId" was null or undefined when calling updateAgentToolAllowedMethods().');
1288
+ }
1289
+ if (requestParameters['agentToolAllowedMethodsRequestUio'] == null) {
1290
+ throw new runtime.RequiredError('agentToolAllowedMethodsRequestUio', 'Required parameter "agentToolAllowedMethodsRequestUio" was null or undefined when calling updateAgentToolAllowedMethods().');
1291
+ }
1292
+ const queryParameters = {};
1293
+ const headerParameters = {};
1294
+ headerParameters['Content-Type'] = 'application/json';
1295
+ if (this.configuration && this.configuration.apiKey) {
1296
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
1297
+ }
1298
+ const response = await this.request({
1299
+ path: `/agents/{agentId}/tools/{toolId}/allowed-methods`.replace(`{${"agentId"}}`, encodeURIComponent(String(requestParameters['agentId']))).replace(`{${"toolId"}}`, encodeURIComponent(String(requestParameters['toolId']))),
1300
+ method: 'PUT',
1301
+ headers: headerParameters,
1302
+ query: queryParameters,
1303
+ body: (0, index_1.AgentToolAllowedMethodsRequestUioToJSON)(requestParameters['agentToolAllowedMethodsRequestUio']),
1304
+ }, initOverrides);
1305
+ return new runtime.VoidApiResponse(response);
1306
+ }
1307
+ /**
1308
+ * Narrows a linked tool down to a subset of its methods, for this agent only. Names are the raw method names: MCP action names for an `mcp` tool, manifest function names for a `tool_api` one. The organization stays the ceiling — a name it does not authorize is rejected, and the effective set is always the intersection of both. Send `null` to clear the selection, which puts the agent back to inheriting every method the organization authorizes. An empty array is a different thing: the tool stays linked but the agent can call nothing on it.
1309
+ * Replace the methods this agent may call on this tool
1310
+ */
1311
+ async updateAgentToolAllowedMethods(agentId, toolId, agentToolAllowedMethodsRequestUio, initOverrides) {
1312
+ await this.updateAgentToolAllowedMethodsRaw({ agentId: agentId, toolId: toolId, agentToolAllowedMethodsRequestUio: agentToolAllowedMethodsRequestUio }, initOverrides);
1313
+ }
1278
1314
  /**
1279
1315
  * Updates an existing conversation flow
1280
1316
  * Update a flow
@@ -0,0 +1,54 @@
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 AgentImportReportKnowledgeBasesInnerUio
16
+ */
17
+ export interface AgentImportReportKnowledgeBasesInnerUio {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof AgentImportReportKnowledgeBasesInnerUio
22
+ */
23
+ name: string;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof AgentImportReportKnowledgeBasesInnerUio
28
+ */
29
+ status: AgentImportReportKnowledgeBasesInnerUioStatusEnum;
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof AgentImportReportKnowledgeBasesInnerUio
34
+ */
35
+ reason?: string;
36
+ }
37
+ /**
38
+ * @export
39
+ */
40
+ export declare const AgentImportReportKnowledgeBasesInnerUioStatusEnum: {
41
+ readonly Linked: "linked";
42
+ readonly Created: "created";
43
+ readonly Renamed: "renamed";
44
+ readonly Skipped: "skipped";
45
+ };
46
+ export type AgentImportReportKnowledgeBasesInnerUioStatusEnum = typeof AgentImportReportKnowledgeBasesInnerUioStatusEnum[keyof typeof AgentImportReportKnowledgeBasesInnerUioStatusEnum];
47
+ /**
48
+ * Check if a given object implements the AgentImportReportKnowledgeBasesInnerUio interface.
49
+ */
50
+ export declare function instanceOfAgentImportReportKnowledgeBasesInnerUio(value: object): value is AgentImportReportKnowledgeBasesInnerUio;
51
+ export declare function AgentImportReportKnowledgeBasesInnerUioFromJSON(json: any): AgentImportReportKnowledgeBasesInnerUio;
52
+ export declare function AgentImportReportKnowledgeBasesInnerUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): AgentImportReportKnowledgeBasesInnerUio;
53
+ export declare function AgentImportReportKnowledgeBasesInnerUioToJSON(json: any): AgentImportReportKnowledgeBasesInnerUio;
54
+ export declare function AgentImportReportKnowledgeBasesInnerUioToJSONTyped(value?: AgentImportReportKnowledgeBasesInnerUio | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,66 @@
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.AgentImportReportKnowledgeBasesInnerUioStatusEnum = void 0;
17
+ exports.instanceOfAgentImportReportKnowledgeBasesInnerUio = instanceOfAgentImportReportKnowledgeBasesInnerUio;
18
+ exports.AgentImportReportKnowledgeBasesInnerUioFromJSON = AgentImportReportKnowledgeBasesInnerUioFromJSON;
19
+ exports.AgentImportReportKnowledgeBasesInnerUioFromJSONTyped = AgentImportReportKnowledgeBasesInnerUioFromJSONTyped;
20
+ exports.AgentImportReportKnowledgeBasesInnerUioToJSON = AgentImportReportKnowledgeBasesInnerUioToJSON;
21
+ exports.AgentImportReportKnowledgeBasesInnerUioToJSONTyped = AgentImportReportKnowledgeBasesInnerUioToJSONTyped;
22
+ /**
23
+ * @export
24
+ */
25
+ exports.AgentImportReportKnowledgeBasesInnerUioStatusEnum = {
26
+ Linked: 'linked',
27
+ Created: 'created',
28
+ Renamed: 'renamed',
29
+ Skipped: 'skipped'
30
+ };
31
+ /**
32
+ * Check if a given object implements the AgentImportReportKnowledgeBasesInnerUio interface.
33
+ */
34
+ function instanceOfAgentImportReportKnowledgeBasesInnerUio(value) {
35
+ if (!('name' in value) || value['name'] === undefined)
36
+ return false;
37
+ if (!('status' in value) || value['status'] === undefined)
38
+ return false;
39
+ return true;
40
+ }
41
+ function AgentImportReportKnowledgeBasesInnerUioFromJSON(json) {
42
+ return AgentImportReportKnowledgeBasesInnerUioFromJSONTyped(json, false);
43
+ }
44
+ function AgentImportReportKnowledgeBasesInnerUioFromJSONTyped(json, ignoreDiscriminator) {
45
+ if (json == null) {
46
+ return json;
47
+ }
48
+ return {
49
+ 'name': json['name'],
50
+ 'status': json['status'],
51
+ 'reason': json['reason'] == null ? undefined : json['reason'],
52
+ };
53
+ }
54
+ function AgentImportReportKnowledgeBasesInnerUioToJSON(json) {
55
+ return AgentImportReportKnowledgeBasesInnerUioToJSONTyped(json, false);
56
+ }
57
+ function AgentImportReportKnowledgeBasesInnerUioToJSONTyped(value, ignoreDiscriminator = false) {
58
+ if (value == null) {
59
+ return value;
60
+ }
61
+ return {
62
+ 'name': value['name'],
63
+ 'status': value['status'],
64
+ 'reason': value['reason'],
65
+ };
66
+ }
@@ -33,6 +33,15 @@ export interface AgentImportReportToolsInnerUio {
33
33
  * @memberof AgentImportReportToolsInnerUio
34
34
  */
35
35
  reason?: string;
36
+ /**
37
+ * Methods the bundle granted on this tool that the target organization does not
38
+ * authorize. The agent was imported without them, so it is less capable than the
39
+ * one that was exported.
40
+ *
41
+ * @type {Array<string>}
42
+ * @memberof AgentImportReportToolsInnerUio
43
+ */
44
+ droppedMethods?: Array<string>;
36
45
  }
37
46
  /**
38
47
  * @export
@@ -49,6 +49,7 @@ function AgentImportReportToolsInnerUioFromJSONTyped(json, ignoreDiscriminator)
49
49
  'name': json['name'],
50
50
  'status': json['status'],
51
51
  'reason': json['reason'] == null ? undefined : json['reason'],
52
+ 'droppedMethods': json['droppedMethods'] == null ? undefined : json['droppedMethods'],
52
53
  };
53
54
  }
54
55
  function AgentImportReportToolsInnerUioToJSON(json) {
@@ -62,5 +63,6 @@ function AgentImportReportToolsInnerUioToJSONTyped(value, ignoreDiscriminator =
62
63
  'name': value['name'],
63
64
  'status': value['status'],
64
65
  'reason': value['reason'],
66
+ 'droppedMethods': value['droppedMethods'],
65
67
  };
66
68
  }
@@ -10,6 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import type { AgentImportReportFlowUio } from './AgentImportReportFlowUio';
13
+ import type { AgentImportReportKnowledgeBasesInnerUio } from './AgentImportReportKnowledgeBasesInnerUio';
13
14
  import type { AgentImportReportSkillsInnerUio } from './AgentImportReportSkillsInnerUio';
14
15
  import type { AgentImportReportContextualKnowledgeUio } from './AgentImportReportContextualKnowledgeUio';
15
16
  import type { AgentImportReportAgentRenamedUio } from './AgentImportReportAgentRenamedUio';
@@ -41,16 +42,16 @@ export interface AgentImportReportUio {
41
42
  skills: Array<AgentImportReportSkillsInnerUio>;
42
43
  /**
43
44
  *
44
- * @type {Array<AgentImportReportToolsInnerUio>}
45
+ * @type {Array<AgentImportReportKnowledgeBasesInnerUio>}
45
46
  * @memberof AgentImportReportUio
46
47
  */
47
- knowledgeBases: Array<AgentImportReportToolsInnerUio>;
48
+ knowledgeBases: Array<AgentImportReportKnowledgeBasesInnerUio>;
48
49
  /**
49
50
  *
50
- * @type {Array<AgentImportReportToolsInnerUio>}
51
+ * @type {Array<AgentImportReportKnowledgeBasesInnerUio>}
51
52
  * @memberof AgentImportReportUio
52
53
  */
53
- apps: Array<AgentImportReportToolsInnerUio>;
54
+ apps: Array<AgentImportReportKnowledgeBasesInnerUio>;
54
55
  /**
55
56
  *
56
57
  * @type {AgentImportReportEngineUio}
@@ -19,6 +19,7 @@ exports.AgentImportReportUioFromJSONTyped = AgentImportReportUioFromJSONTyped;
19
19
  exports.AgentImportReportUioToJSON = AgentImportReportUioToJSON;
20
20
  exports.AgentImportReportUioToJSONTyped = AgentImportReportUioToJSONTyped;
21
21
  const AgentImportReportFlowUio_1 = require("./AgentImportReportFlowUio");
22
+ const AgentImportReportKnowledgeBasesInnerUio_1 = require("./AgentImportReportKnowledgeBasesInnerUio");
22
23
  const AgentImportReportSkillsInnerUio_1 = require("./AgentImportReportSkillsInnerUio");
23
24
  const AgentImportReportContextualKnowledgeUio_1 = require("./AgentImportReportContextualKnowledgeUio");
24
25
  const AgentImportReportAgentRenamedUio_1 = require("./AgentImportReportAgentRenamedUio");
@@ -53,8 +54,8 @@ function AgentImportReportUioFromJSONTyped(json, ignoreDiscriminator) {
53
54
  'agentRenamed': json['agentRenamed'] == null ? undefined : (0, AgentImportReportAgentRenamedUio_1.AgentImportReportAgentRenamedUioFromJSON)(json['agentRenamed']),
54
55
  'tools': (json['tools'].map(AgentImportReportToolsInnerUio_1.AgentImportReportToolsInnerUioFromJSON)),
55
56
  'skills': (json['skills'].map(AgentImportReportSkillsInnerUio_1.AgentImportReportSkillsInnerUioFromJSON)),
56
- 'knowledgeBases': (json['knowledgeBases'].map(AgentImportReportToolsInnerUio_1.AgentImportReportToolsInnerUioFromJSON)),
57
- 'apps': (json['apps'].map(AgentImportReportToolsInnerUio_1.AgentImportReportToolsInnerUioFromJSON)),
57
+ 'knowledgeBases': (json['knowledgeBases'].map(AgentImportReportKnowledgeBasesInnerUio_1.AgentImportReportKnowledgeBasesInnerUioFromJSON)),
58
+ 'apps': (json['apps'].map(AgentImportReportKnowledgeBasesInnerUio_1.AgentImportReportKnowledgeBasesInnerUioFromJSON)),
58
59
  'engine': (0, AgentImportReportEngineUio_1.AgentImportReportEngineUioFromJSON)(json['engine']),
59
60
  'contextualKnowledge': json['contextualKnowledge'] == null ? undefined : (0, AgentImportReportContextualKnowledgeUio_1.AgentImportReportContextualKnowledgeUioFromJSON)(json['contextualKnowledge']),
60
61
  'flow': (0, AgentImportReportFlowUio_1.AgentImportReportFlowUioFromJSON)(json['flow']),
@@ -71,8 +72,8 @@ function AgentImportReportUioToJSONTyped(value, ignoreDiscriminator = false) {
71
72
  'agentRenamed': (0, AgentImportReportAgentRenamedUio_1.AgentImportReportAgentRenamedUioToJSON)(value['agentRenamed']),
72
73
  'tools': (value['tools'].map(AgentImportReportToolsInnerUio_1.AgentImportReportToolsInnerUioToJSON)),
73
74
  'skills': (value['skills'].map(AgentImportReportSkillsInnerUio_1.AgentImportReportSkillsInnerUioToJSON)),
74
- 'knowledgeBases': (value['knowledgeBases'].map(AgentImportReportToolsInnerUio_1.AgentImportReportToolsInnerUioToJSON)),
75
- 'apps': (value['apps'].map(AgentImportReportToolsInnerUio_1.AgentImportReportToolsInnerUioToJSON)),
75
+ 'knowledgeBases': (value['knowledgeBases'].map(AgentImportReportKnowledgeBasesInnerUio_1.AgentImportReportKnowledgeBasesInnerUioToJSON)),
76
+ 'apps': (value['apps'].map(AgentImportReportKnowledgeBasesInnerUio_1.AgentImportReportKnowledgeBasesInnerUioToJSON)),
76
77
  'engine': (0, AgentImportReportEngineUio_1.AgentImportReportEngineUioToJSON)(value['engine']),
77
78
  'contextualKnowledge': (0, AgentImportReportContextualKnowledgeUio_1.AgentImportReportContextualKnowledgeUioToJSON)(value['contextualKnowledge']),
78
79
  'flow': (0, AgentImportReportFlowUio_1.AgentImportReportFlowUioToJSON)(value['flow']),
@@ -0,0 +1,34 @@
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 AgentToolAllowedMethodsRequestUio
16
+ */
17
+ export interface AgentToolAllowedMethodsRequestUio {
18
+ /**
19
+ * Raw method names to grant, or `null` to clear the selection and go back to inheriting
20
+ * every method the organization authorizes.
21
+ *
22
+ * @type {Set<string>}
23
+ * @memberof AgentToolAllowedMethodsRequestUio
24
+ */
25
+ allowedMethods: Set<string> | null;
26
+ }
27
+ /**
28
+ * Check if a given object implements the AgentToolAllowedMethodsRequestUio interface.
29
+ */
30
+ export declare function instanceOfAgentToolAllowedMethodsRequestUio(value: object): value is AgentToolAllowedMethodsRequestUio;
31
+ export declare function AgentToolAllowedMethodsRequestUioFromJSON(json: any): AgentToolAllowedMethodsRequestUio;
32
+ export declare function AgentToolAllowedMethodsRequestUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): AgentToolAllowedMethodsRequestUio;
33
+ export declare function AgentToolAllowedMethodsRequestUioToJSON(json: any): AgentToolAllowedMethodsRequestUio;
34
+ export declare function AgentToolAllowedMethodsRequestUioToJSONTyped(value?: AgentToolAllowedMethodsRequestUio | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * brain-client
6
+ * Api ands models for brain-app and brain-app
7
+ *
8
+ * The version of the OpenAPI document: 0.0.0-SNAPSHOT
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.instanceOfAgentToolAllowedMethodsRequestUio = instanceOfAgentToolAllowedMethodsRequestUio;
17
+ exports.AgentToolAllowedMethodsRequestUioFromJSON = AgentToolAllowedMethodsRequestUioFromJSON;
18
+ exports.AgentToolAllowedMethodsRequestUioFromJSONTyped = AgentToolAllowedMethodsRequestUioFromJSONTyped;
19
+ exports.AgentToolAllowedMethodsRequestUioToJSON = AgentToolAllowedMethodsRequestUioToJSON;
20
+ exports.AgentToolAllowedMethodsRequestUioToJSONTyped = AgentToolAllowedMethodsRequestUioToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the AgentToolAllowedMethodsRequestUio interface.
23
+ */
24
+ function instanceOfAgentToolAllowedMethodsRequestUio(value) {
25
+ if (!('allowedMethods' in value) || value['allowedMethods'] === undefined)
26
+ return false;
27
+ return true;
28
+ }
29
+ function AgentToolAllowedMethodsRequestUioFromJSON(json) {
30
+ return AgentToolAllowedMethodsRequestUioFromJSONTyped(json, false);
31
+ }
32
+ function AgentToolAllowedMethodsRequestUioFromJSONTyped(json, ignoreDiscriminator) {
33
+ if (json == null) {
34
+ return json;
35
+ }
36
+ return {
37
+ 'allowedMethods': json['allowedMethods'] == null ? null : new Set(json['allowedMethods']),
38
+ };
39
+ }
40
+ function AgentToolAllowedMethodsRequestUioToJSON(json) {
41
+ return AgentToolAllowedMethodsRequestUioToJSONTyped(json, false);
42
+ }
43
+ function AgentToolAllowedMethodsRequestUioToJSONTyped(value, ignoreDiscriminator = false) {
44
+ if (value == null) {
45
+ return value;
46
+ }
47
+ return {
48
+ 'allowedMethods': value['allowedMethods'] == null ? null : Array.from(value['allowedMethods']),
49
+ };
50
+ }
@@ -87,6 +87,14 @@ export interface AgentToolUio {
87
87
  * @memberof AgentToolUio
88
88
  */
89
89
  isSetup?: boolean;
90
+ /**
91
+ * Methods of this tool the agent may call. Absent means the agent inherits every method
92
+ * the organization authorizes; an empty array means the tool is linked but mute.
93
+ *
94
+ * @type {Array<string>}
95
+ * @memberof AgentToolUio
96
+ */
97
+ allowedMethods?: Array<string> | null;
90
98
  }
91
99
  /**
92
100
  * @export
@@ -61,6 +61,7 @@ function AgentToolUioFromJSONTyped(json, ignoreDiscriminator) {
61
61
  'mcp': json['mcp'] == null ? undefined : json['mcp'],
62
62
  'restricted': json['restricted'] == null ? undefined : json['restricted'],
63
63
  'isSetup': json['isSetup'] == null ? undefined : json['isSetup'],
64
+ 'allowedMethods': json['allowedMethods'] == null ? undefined : json['allowedMethods'],
64
65
  };
65
66
  }
66
67
  function AgentToolUioToJSON(json) {
@@ -82,5 +83,6 @@ function AgentToolUioToJSONTyped(value, ignoreDiscriminator = false) {
82
83
  'mcp': value['mcp'],
83
84
  'restricted': value['restricted'],
84
85
  'isSetup': value['isSetup'],
86
+ 'allowedMethods': value['allowedMethods'],
85
87
  };
86
88
  }
@@ -25,6 +25,7 @@ export * from './AgentImportReportContextualKnowledgeUio';
25
25
  export * from './AgentImportReportEngineRequestedUio';
26
26
  export * from './AgentImportReportEngineUio';
27
27
  export * from './AgentImportReportFlowUio';
28
+ export * from './AgentImportReportKnowledgeBasesInnerUio';
28
29
  export * from './AgentImportReportSkillsInnerUio';
29
30
  export * from './AgentImportReportToolsInnerUio';
30
31
  export * from './AgentImportReportUio';
@@ -57,6 +58,7 @@ export * from './AgentSubscriptionUio';
57
58
  export * from './AgentTokenBreakdownUio';
58
59
  export * from './AgentTokenUsageByTaskUio';
59
60
  export * from './AgentTokenUsageMetricUio';
61
+ export * from './AgentToolAllowedMethodsRequestUio';
60
62
  export * from './AgentToolUio';
61
63
  export * from './AgentToolUsageMetricUio';
62
64
  export * from './AgentTypeUio';
@@ -43,6 +43,7 @@ __exportStar(require("./AgentImportReportContextualKnowledgeUio"), exports);
43
43
  __exportStar(require("./AgentImportReportEngineRequestedUio"), exports);
44
44
  __exportStar(require("./AgentImportReportEngineUio"), exports);
45
45
  __exportStar(require("./AgentImportReportFlowUio"), exports);
46
+ __exportStar(require("./AgentImportReportKnowledgeBasesInnerUio"), exports);
46
47
  __exportStar(require("./AgentImportReportSkillsInnerUio"), exports);
47
48
  __exportStar(require("./AgentImportReportToolsInnerUio"), exports);
48
49
  __exportStar(require("./AgentImportReportUio"), exports);
@@ -75,6 +76,7 @@ __exportStar(require("./AgentSubscriptionUio"), exports);
75
76
  __exportStar(require("./AgentTokenBreakdownUio"), exports);
76
77
  __exportStar(require("./AgentTokenUsageByTaskUio"), exports);
77
78
  __exportStar(require("./AgentTokenUsageMetricUio"), exports);
79
+ __exportStar(require("./AgentToolAllowedMethodsRequestUio"), exports);
78
80
  __exportStar(require("./AgentToolUio"), exports);
79
81
  __exportStar(require("./AgentToolUsageMetricUio"), exports);
80
82
  __exportStar(require("./AgentTypeUio"), exports);
package/dist/openapi.json CHANGED
@@ -1862,6 +1862,62 @@
1862
1862
  "tags" : [ "agent" ]
1863
1863
  }
1864
1864
  },
1865
+ "/agents/{agentId}/tools/{toolId}/allowed-methods" : {
1866
+ "put" : {
1867
+ "description" : "Narrows a linked tool down to a subset of its methods, for this agent only. Names are the raw\nmethod names: MCP action names for an `mcp` tool, manifest function names for a `tool_api` one.\nThe organization stays the ceiling — a name it does not authorize is rejected, and the\neffective set is always the intersection of both.\n\nSend `null` to clear the selection, which puts the agent back to inheriting every method the\norganization authorizes. An empty array is a different thing: the tool stays linked but the\nagent can call nothing on it.\n",
1868
+ "operationId" : "updateAgentToolAllowedMethods",
1869
+ "parameters" : [ {
1870
+ "description" : "ID of the agent",
1871
+ "in" : "path",
1872
+ "name" : "agentId",
1873
+ "required" : true,
1874
+ "schema" : {
1875
+ "format" : "uuid",
1876
+ "type" : "string"
1877
+ }
1878
+ }, {
1879
+ "description" : "ID of the linked tool",
1880
+ "in" : "path",
1881
+ "name" : "toolId",
1882
+ "required" : true,
1883
+ "schema" : {
1884
+ "type" : "string"
1885
+ }
1886
+ } ],
1887
+ "requestBody" : {
1888
+ "content" : {
1889
+ "application/json" : {
1890
+ "schema" : {
1891
+ "$ref" : "#/components/schemas/AgentToolAllowedMethodsRequest"
1892
+ }
1893
+ }
1894
+ },
1895
+ "required" : true
1896
+ },
1897
+ "responses" : {
1898
+ "204" : {
1899
+ "description" : "Selection updated"
1900
+ },
1901
+ "400" : {
1902
+ "description" : "Unknown method names, or the tool has no usable method catalog"
1903
+ },
1904
+ "401" : {
1905
+ "description" : "Unauthorized"
1906
+ },
1907
+ "403" : {
1908
+ "description" : "Forbidden - User is not an admin of the agent's organization"
1909
+ },
1910
+ "404" : {
1911
+ "description" : "Agent or tool not found, or the tool is not linked to the agent"
1912
+ },
1913
+ "500" : {
1914
+ "description" : "Internal server error"
1915
+ }
1916
+ },
1917
+ "summary" : "Replace the methods this agent may call on this tool",
1918
+ "tags" : [ "agent" ]
1919
+ }
1920
+ },
1865
1921
  "/agents/{agentId}/knowledge-bases/{knowledgeBaseId}" : {
1866
1922
  "delete" : {
1867
1923
  "description" : "Removes the association between a knowledge base and the specified agent",
@@ -16190,6 +16246,14 @@
16190
16246
  },
16191
16247
  "isSetup" : {
16192
16248
  "type" : "boolean"
16249
+ },
16250
+ "allowedMethods" : {
16251
+ "description" : "Methods of this tool the agent may call. Absent means the agent inherits every method\nthe organization authorizes; an empty array means the tool is linked but mute.\n",
16252
+ "items" : {
16253
+ "type" : "string"
16254
+ },
16255
+ "nullable" : true,
16256
+ "type" : "array"
16193
16257
  }
16194
16258
  },
16195
16259
  "required" : [ "description", "id", "name", "orgId", "type" ],
@@ -17237,6 +17301,21 @@
17237
17301
  "required" : [ "transcription" ],
17238
17302
  "type" : "object"
17239
17303
  },
17304
+ "AgentToolAllowedMethodsRequest" : {
17305
+ "properties" : {
17306
+ "allowedMethods" : {
17307
+ "description" : "Raw method names to grant, or `null` to clear the selection and go back to inheriting\nevery method the organization authorizes.\n",
17308
+ "items" : {
17309
+ "type" : "string"
17310
+ },
17311
+ "nullable" : true,
17312
+ "type" : "array",
17313
+ "uniqueItems" : true
17314
+ }
17315
+ },
17316
+ "required" : [ "allowedMethods" ],
17317
+ "type" : "object"
17318
+ },
17240
17319
  "Chat" : {
17241
17320
  "properties" : {
17242
17321
  "id" : {
@@ -23470,13 +23549,13 @@
23470
23549
  },
23471
23550
  "knowledgeBases" : {
23472
23551
  "items" : {
23473
- "$ref" : "#/components/schemas/AgentImportReport_tools_inner"
23552
+ "$ref" : "#/components/schemas/AgentImportReport_knowledgeBases_inner"
23474
23553
  },
23475
23554
  "type" : "array"
23476
23555
  },
23477
23556
  "apps" : {
23478
23557
  "items" : {
23479
- "$ref" : "#/components/schemas/AgentImportReport_tools_inner"
23558
+ "$ref" : "#/components/schemas/AgentImportReport_knowledgeBases_inner"
23480
23559
  },
23481
23560
  "type" : "array"
23482
23561
  },
@@ -25645,6 +25724,13 @@
25645
25724
  },
25646
25725
  "reason" : {
25647
25726
  "type" : "string"
25727
+ },
25728
+ "droppedMethods" : {
25729
+ "description" : "Methods the bundle granted on this tool that the target organization does not\nauthorize. The agent was imported without them, so it is less capable than the\none that was exported.\n",
25730
+ "items" : {
25731
+ "type" : "string"
25732
+ },
25733
+ "type" : "array"
25648
25734
  }
25649
25735
  },
25650
25736
  "required" : [ "name", "status" ],
@@ -25669,6 +25755,22 @@
25669
25755
  "required" : [ "slug", "status" ],
25670
25756
  "type" : "object"
25671
25757
  },
25758
+ "AgentImportReport_knowledgeBases_inner" : {
25759
+ "properties" : {
25760
+ "name" : {
25761
+ "type" : "string"
25762
+ },
25763
+ "status" : {
25764
+ "enum" : [ "linked", "created", "renamed", "skipped" ],
25765
+ "type" : "string"
25766
+ },
25767
+ "reason" : {
25768
+ "type" : "string"
25769
+ }
25770
+ },
25771
+ "required" : [ "name", "status" ],
25772
+ "type" : "object"
25773
+ },
25672
25774
  "AgentImportReport_engine_requested" : {
25673
25775
  "properties" : {
25674
25776
  "providerType" : {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@breign/client",
3
- "version": "1.0.152",
3
+ "version": "1.0.153",
4
4
  "main": "dist/index.js",
5
5
  "exports": {
6
6
  ".": "./dist/index.js",