@breign/client 1.0.151 → 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;
@@ -146,6 +146,9 @@ export interface ListOrganizationAgentsRequest {
146
146
  organizationId: string;
147
147
  isCreator?: boolean;
148
148
  providerSource?: ListOrganizationAgentsProviderSourceEnum;
149
+ personal?: boolean;
150
+ includeOthersPersonal?: boolean;
151
+ visibility?: Array<ListOrganizationAgentsVisibilityEnum>;
149
152
  }
150
153
  export interface RemoveAgentProfileImageRequest {
151
154
  agentId: string;
@@ -173,6 +176,11 @@ export interface UpdateAgentSubscriptionRequest {
173
176
  agentId: string;
174
177
  agentSubscriptionUio: AgentSubscriptionUio;
175
178
  }
179
+ export interface UpdateAgentToolAllowedMethodsRequest {
180
+ agentId: string;
181
+ toolId: string;
182
+ agentToolAllowedMethodsRequestUio: AgentToolAllowedMethodsRequestUio;
183
+ }
176
184
  export interface UpdateFlowRequest {
177
185
  agentId: string;
178
186
  flowId: string;
@@ -477,7 +485,7 @@ export declare class AgentApi extends runtime.BaseAPI {
477
485
  /**
478
486
  * List agents for an organization
479
487
  */
480
- listOrganizationAgents(organizationId: string, isCreator?: boolean, providerSource?: ListOrganizationAgentsProviderSourceEnum, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<AgentUio>>;
488
+ listOrganizationAgents(organizationId: string, isCreator?: boolean, providerSource?: ListOrganizationAgentsProviderSourceEnum, personal?: boolean, includeOthersPersonal?: boolean, visibility?: Array<ListOrganizationAgentsVisibilityEnum>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<AgentUio>>;
481
489
  /**
482
490
  * Removes the profile image for an agent
483
491
  * Remove agent profile image
@@ -546,6 +554,16 @@ export declare class AgentApi extends runtime.BaseAPI {
546
554
  * Update agent subscription
547
555
  */
548
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>;
549
567
  /**
550
568
  * Updates an existing conversation flow
551
569
  * Update a flow
@@ -643,3 +661,14 @@ export declare const ListOrganizationAgentsProviderSourceEnum: {
643
661
  readonly Internal: "INTERNAL";
644
662
  };
645
663
  export type ListOrganizationAgentsProviderSourceEnum = typeof ListOrganizationAgentsProviderSourceEnum[keyof typeof ListOrganizationAgentsProviderSourceEnum];
664
+ /**
665
+ * @export
666
+ */
667
+ export declare const ListOrganizationAgentsVisibilityEnum: {
668
+ readonly MyAgents: "myAgents";
669
+ readonly Public: "public";
670
+ readonly SharedWithMe: "sharedWithMe";
671
+ readonly Personal: "personal";
672
+ readonly OthersPersonal: "othersPersonal";
673
+ };
674
+ export type ListOrganizationAgentsVisibilityEnum = typeof ListOrganizationAgentsVisibilityEnum[keyof typeof ListOrganizationAgentsVisibilityEnum];
@@ -46,7 +46,7 @@ var __importStar = (this && this.__importStar) || (function () {
46
46
  };
47
47
  })();
48
48
  Object.defineProperty(exports, "__esModule", { value: true });
49
- exports.ListOrganizationAgentsProviderSourceEnum = exports.GetConversationsForAgentMessageReactionEnum = exports.GetConversationsForAgentSortOrderEnum = exports.GetAgentsProviderSourceEnum = exports.GetAgentMetricsUsageGranularityEnum = exports.GetAgentMetricsEphemeralInstancesGranularityEnum = exports.ExportAgentFormatEnum = exports.AgentApi = void 0;
49
+ exports.ListOrganizationAgentsVisibilityEnum = exports.ListOrganizationAgentsProviderSourceEnum = exports.GetConversationsForAgentMessageReactionEnum = exports.GetConversationsForAgentSortOrderEnum = exports.GetAgentsProviderSourceEnum = exports.GetAgentMetricsUsageGranularityEnum = exports.GetAgentMetricsEphemeralInstancesGranularityEnum = exports.ExportAgentFormatEnum = exports.AgentApi = void 0;
50
50
  const runtime = __importStar(require("../runtime"));
51
51
  const index_1 = require("../models/index");
52
52
  /**
@@ -1029,6 +1029,15 @@ class AgentApi extends runtime.BaseAPI {
1029
1029
  if (requestParameters['providerSource'] != null) {
1030
1030
  queryParameters['providerSource'] = requestParameters['providerSource'];
1031
1031
  }
1032
+ if (requestParameters['personal'] != null) {
1033
+ queryParameters['personal'] = requestParameters['personal'];
1034
+ }
1035
+ if (requestParameters['includeOthersPersonal'] != null) {
1036
+ queryParameters['includeOthersPersonal'] = requestParameters['includeOthersPersonal'];
1037
+ }
1038
+ if (requestParameters['visibility'] != null) {
1039
+ queryParameters['visibility'] = requestParameters['visibility'];
1040
+ }
1032
1041
  const headerParameters = {};
1033
1042
  if (this.configuration && this.configuration.apiKey) {
1034
1043
  headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
@@ -1044,8 +1053,8 @@ class AgentApi extends runtime.BaseAPI {
1044
1053
  /**
1045
1054
  * List agents for an organization
1046
1055
  */
1047
- async listOrganizationAgents(organizationId, isCreator, providerSource, initOverrides) {
1048
- const response = await this.listOrganizationAgentsRaw({ organizationId: organizationId, isCreator: isCreator, providerSource: providerSource }, initOverrides);
1056
+ async listOrganizationAgents(organizationId, isCreator, providerSource, personal, includeOthersPersonal, visibility, initOverrides) {
1057
+ const response = await this.listOrganizationAgentsRaw({ organizationId: organizationId, isCreator: isCreator, providerSource: providerSource, personal: personal, includeOthersPersonal: includeOthersPersonal, visibility: visibility }, initOverrides);
1049
1058
  return await response.value();
1050
1059
  }
1051
1060
  /**
@@ -1266,6 +1275,42 @@ class AgentApi extends runtime.BaseAPI {
1266
1275
  const response = await this.updateAgentSubscriptionRaw({ agentId: agentId, agentSubscriptionUio: agentSubscriptionUio }, initOverrides);
1267
1276
  return await response.value();
1268
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
+ }
1269
1314
  /**
1270
1315
  * Updates an existing conversation flow
1271
1316
  * Update a flow
@@ -1454,3 +1499,13 @@ exports.ListOrganizationAgentsProviderSourceEnum = {
1454
1499
  External: 'EXTERNAL',
1455
1500
  Internal: 'INTERNAL'
1456
1501
  };
1502
+ /**
1503
+ * @export
1504
+ */
1505
+ exports.ListOrganizationAgentsVisibilityEnum = {
1506
+ MyAgents: 'myAgents',
1507
+ Public: 'public',
1508
+ SharedWithMe: 'sharedWithMe',
1509
+ Personal: 'personal',
1510
+ OthersPersonal: 'othersPersonal'
1511
+ };
@@ -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
@@ -278,6 +278,36 @@
278
278
  "enum" : [ "EXTERNAL", "INTERNAL" ],
279
279
  "type" : "string"
280
280
  }
281
+ }, {
282
+ "description" : "If true, only personal agents. If false, only organization-shared (public) agents.\n",
283
+ "in" : "query",
284
+ "name" : "personal",
285
+ "required" : false,
286
+ "schema" : {
287
+ "type" : "boolean"
288
+ }
289
+ }, {
290
+ "description" : "If true, include personal agents created by other users. Organization admins only; other callers receive 403. Default listing hides those agents.\n",
291
+ "in" : "query",
292
+ "name" : "includeOthersPersonal",
293
+ "required" : false,
294
+ "schema" : {
295
+ "type" : "boolean"
296
+ }
297
+ }, {
298
+ "description" : "Visibility scopes to include (OR). Accepted values: myAgents, public, sharedWithMe, personal, othersPersonal. Comma-separated or repeated. othersPersonal requires org admin. When omitted, returns agents created by the caller or organization-shared agents.\n",
299
+ "explode" : true,
300
+ "in" : "query",
301
+ "name" : "visibility",
302
+ "required" : false,
303
+ "schema" : {
304
+ "items" : {
305
+ "enum" : [ "myAgents", "public", "sharedWithMe", "personal", "othersPersonal" ],
306
+ "type" : "string"
307
+ },
308
+ "type" : "array"
309
+ },
310
+ "style" : "form"
281
311
  } ],
282
312
  "responses" : {
283
313
  "200" : {
@@ -1832,6 +1862,62 @@
1832
1862
  "tags" : [ "agent" ]
1833
1863
  }
1834
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
+ },
1835
1921
  "/agents/{agentId}/knowledge-bases/{knowledgeBaseId}" : {
1836
1922
  "delete" : {
1837
1923
  "description" : "Removes the association between a knowledge base and the specified agent",
@@ -16160,6 +16246,14 @@
16160
16246
  },
16161
16247
  "isSetup" : {
16162
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"
16163
16257
  }
16164
16258
  },
16165
16259
  "required" : [ "description", "id", "name", "orgId", "type" ],
@@ -17207,6 +17301,21 @@
17207
17301
  "required" : [ "transcription" ],
17208
17302
  "type" : "object"
17209
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
+ },
17210
17319
  "Chat" : {
17211
17320
  "properties" : {
17212
17321
  "id" : {
@@ -23440,13 +23549,13 @@
23440
23549
  },
23441
23550
  "knowledgeBases" : {
23442
23551
  "items" : {
23443
- "$ref" : "#/components/schemas/AgentImportReport_tools_inner"
23552
+ "$ref" : "#/components/schemas/AgentImportReport_knowledgeBases_inner"
23444
23553
  },
23445
23554
  "type" : "array"
23446
23555
  },
23447
23556
  "apps" : {
23448
23557
  "items" : {
23449
- "$ref" : "#/components/schemas/AgentImportReport_tools_inner"
23558
+ "$ref" : "#/components/schemas/AgentImportReport_knowledgeBases_inner"
23450
23559
  },
23451
23560
  "type" : "array"
23452
23561
  },
@@ -25615,6 +25724,13 @@
25615
25724
  },
25616
25725
  "reason" : {
25617
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"
25618
25734
  }
25619
25735
  },
25620
25736
  "required" : [ "name", "status" ],
@@ -25639,6 +25755,22 @@
25639
25755
  "required" : [ "slug", "status" ],
25640
25756
  "type" : "object"
25641
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
+ },
25642
25774
  "AgentImportReport_engine_requested" : {
25643
25775
  "properties" : {
25644
25776
  "providerType" : {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@breign/client",
3
- "version": "1.0.151",
3
+ "version": "1.0.153",
4
4
  "main": "dist/index.js",
5
5
  "exports": {
6
6
  ".": "./dist/index.js",