@breign/client 1.0.177 → 1.0.179
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/apis/McpApi.d.ts +33 -0
- package/dist/apis/McpApi.js +88 -0
- package/dist/apis/ScheduledTasksApi.d.ts +78 -1
- package/dist/apis/ScheduledTasksApi.js +192 -0
- package/dist/models/AgentBuilderMcpConfigurationUio.d.ts +32 -0
- package/dist/models/AgentBuilderMcpConfigurationUio.js +48 -0
- package/dist/models/AgentPatchUio.d.ts +7 -0
- package/dist/models/AgentPatchUio.js +3 -0
- package/dist/models/AgentUio.d.ts +7 -0
- package/dist/models/AgentUio.js +3 -0
- package/dist/models/ScheduledTaskCreateUio.d.ts +1 -1
- package/dist/models/ScheduledTaskRunTriggerUio.d.ts +37 -12
- package/dist/models/ScheduledTaskRunTriggerUio.js +21 -34
- package/dist/models/ScheduledTaskUio.d.ts +8 -1
- package/dist/models/ScheduledTaskUio.js +3 -0
- package/dist/models/TaskTriggerUio.d.ts +8 -1
- package/dist/models/TaskTriggerUio.js +4 -1
- package/dist/models/ToolAllowedToolsRequestUio.d.ts +16 -0
- package/dist/models/ToolAllowedToolsRequestUio.js +10 -0
- package/dist/models/ToolAllowedToolsResponseUio.d.ts +16 -0
- package/dist/models/ToolAllowedToolsResponseUio.js +10 -0
- package/dist/models/ToolApprovalUio.d.ts +2 -1
- package/dist/models/ToolApprovalUio.js +2 -1
- package/dist/models/ToolCallResultRequestUio.d.ts +1 -1
- package/dist/models/ToolCallUio.d.ts +1 -1
- package/dist/models/ToolSecureMcpUio.d.ts +16 -0
- package/dist/models/ToolSecureMcpUio.js +10 -0
- package/dist/models/WebhookEndpointUio.d.ts +82 -0
- package/dist/models/WebhookEndpointUio.js +84 -0
- package/dist/models/WebhookEndpointUpdateUio.d.ts +46 -0
- package/dist/models/WebhookEndpointUpdateUio.js +58 -0
- package/dist/models/WebhookEventListUio.d.ts +33 -0
- package/dist/models/WebhookEventListUio.js +51 -0
- package/dist/models/WebhookEventUio.d.ts +87 -0
- package/dist/models/WebhookEventUio.js +87 -0
- package/dist/models/WebhookTestRequestUio.d.ts +38 -0
- package/dist/models/WebhookTestRequestUio.js +50 -0
- package/dist/models/WebhookTestResponseUio.d.ts +32 -0
- package/dist/models/WebhookTestResponseUio.js +50 -0
- package/dist/models/index.d.ts +7 -0
- package/dist/models/index.js +7 -0
- package/dist/openapi.json +610 -11
- package/package.json +1 -1
package/dist/apis/McpApi.d.ts
CHANGED
|
@@ -17,6 +17,9 @@ export interface DeleteMcpSessionRequest {
|
|
|
17
17
|
export interface GetMcpStreamRequest {
|
|
18
18
|
organizationId: string;
|
|
19
19
|
}
|
|
20
|
+
export interface HandleBuilderMcpRequestRequest {
|
|
21
|
+
mcpJsonRpcRequestUio: McpJsonRpcRequestUio;
|
|
22
|
+
}
|
|
20
23
|
export interface HandleMcpRequestRequest {
|
|
21
24
|
organizationId: string;
|
|
22
25
|
mcpJsonRpcRequestUio: McpJsonRpcRequestUio;
|
|
@@ -25,6 +28,16 @@ export interface HandleMcpRequestRequest {
|
|
|
25
28
|
*
|
|
26
29
|
*/
|
|
27
30
|
export declare class McpApi extends runtime.BaseAPI {
|
|
31
|
+
/**
|
|
32
|
+
* Aucune session à clore : le transport est sans état.
|
|
33
|
+
* Not supported (stateless MCP server)
|
|
34
|
+
*/
|
|
35
|
+
deleteBuilderMcpSessionRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
36
|
+
/**
|
|
37
|
+
* Aucune session à clore : le transport est sans état.
|
|
38
|
+
* Not supported (stateless MCP server)
|
|
39
|
+
*/
|
|
40
|
+
deleteBuilderMcpSession(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
28
41
|
/**
|
|
29
42
|
* Aucune session à clore : le transport est sans état.
|
|
30
43
|
* Not supported (stateless MCP server)
|
|
@@ -35,6 +48,16 @@ export declare class McpApi extends runtime.BaseAPI {
|
|
|
35
48
|
* Not supported (stateless MCP server)
|
|
36
49
|
*/
|
|
37
50
|
deleteMcpSession(organizationId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
51
|
+
/**
|
|
52
|
+
* Pas de flux SSE côté serveur : le transport est sans état.
|
|
53
|
+
* Not supported (stateless MCP server)
|
|
54
|
+
*/
|
|
55
|
+
getBuilderMcpStreamRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
56
|
+
/**
|
|
57
|
+
* Pas de flux SSE côté serveur : le transport est sans état.
|
|
58
|
+
* Not supported (stateless MCP server)
|
|
59
|
+
*/
|
|
60
|
+
getBuilderMcpStream(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
38
61
|
/**
|
|
39
62
|
* Pas de flux SSE côté serveur : le transport est sans état.
|
|
40
63
|
* Not supported (stateless MCP server)
|
|
@@ -45,6 +68,16 @@ export declare class McpApi extends runtime.BaseAPI {
|
|
|
45
68
|
* Not supported (stateless MCP server)
|
|
46
69
|
*/
|
|
47
70
|
getMcpStream(organizationId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
71
|
+
/**
|
|
72
|
+
* Serveur MCP (Model Context Protocol, transport Streamable HTTP, sans état) qui crée et édite les agents des organisations de l\'utilisateur : de quoi brancher Claude Code, ou tout client MCP, sur la configuration de Breign. Lié à la clé et non à une organisation : chaque outil vérifie que l\'utilisateur est membre de celle qu\'il touche. Distinct du serveur `/organizations/{organizationId}/mcp`, qui ne sert qu\'à interroger les agents : brancher l\'un ne donne pas les droits d\'écriture de l\'autre. Authentification par clé API personnelle (`x-api-key` ou `Authorization: Bearer ai-…`) ; les credentials d\'app et la clé maître sans `x-user-id` sont refusés. Chaque action est faite au nom du propriétaire de la clé, avec ses droits. Outils exposés — lecture : - `list_organizations` — organisations dont l\'utilisateur est membre. - `list_agents` `{ organizationId }` — agents de l\'organisation. - `get_agent` `{ agentId }` — configuration d\'un agent : textes, moteur, skills et bases de connaissance rattachés. - `list_engines` `{ organizationId }` — providers de l\'organisation et leurs modèles. - `list_skills` `{ organizationId }` — skills de l\'organisation. - `list_knowledge_bases` `{ organizationId }` — bases de connaissance de l\'organisation. Outils exposés — écriture (jamais de suppression ni de détachement) : - `create_agent` `{ organizationId, name, persona, promptInit?, description?, role?, defaultLanguage? }`. - `update_agent` `{ agentId, name?, description?, role?, defaultLanguage?, persona?, promptInit?, isActivated? }` — `null` ou absent : champ inchangé. - `set_agent_engine` `{ agentId, providerId, model }`. - `attach_skill` `{ agentId, skillId }` — ajoute un skill, sans retirer les autres. - `attach_knowledge_base` `{ agentId, knowledgeBaseId }` — ajoute une base, sans retirer les autres. Un agent Breign dont `builderMcpConfiguration.enabled` est vrai reçoit les mêmes outils, au nom de l\'utilisateur de la conversation, bornés à l\'organisation de l\'agent (ni `list_organizations` ni `organizationId`) ; chaque écriture lui demande alors son approbation. Configuration d\'un client, par exemple Claude Code : `claude mcp add --transport http breign-builder https://<api>/mcp/builder --header \"Authorization: Bearer ai-…\"`. Le client doit accepter `application/json` et `text/event-stream` (header `Accept`).
|
|
73
|
+
* Builder MCP server
|
|
74
|
+
*/
|
|
75
|
+
handleBuilderMcpRequestRaw(requestParameters: HandleBuilderMcpRequestRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<McpJsonRpcResponseUio>>;
|
|
76
|
+
/**
|
|
77
|
+
* Serveur MCP (Model Context Protocol, transport Streamable HTTP, sans état) qui crée et édite les agents des organisations de l\'utilisateur : de quoi brancher Claude Code, ou tout client MCP, sur la configuration de Breign. Lié à la clé et non à une organisation : chaque outil vérifie que l\'utilisateur est membre de celle qu\'il touche. Distinct du serveur `/organizations/{organizationId}/mcp`, qui ne sert qu\'à interroger les agents : brancher l\'un ne donne pas les droits d\'écriture de l\'autre. Authentification par clé API personnelle (`x-api-key` ou `Authorization: Bearer ai-…`) ; les credentials d\'app et la clé maître sans `x-user-id` sont refusés. Chaque action est faite au nom du propriétaire de la clé, avec ses droits. Outils exposés — lecture : - `list_organizations` — organisations dont l\'utilisateur est membre. - `list_agents` `{ organizationId }` — agents de l\'organisation. - `get_agent` `{ agentId }` — configuration d\'un agent : textes, moteur, skills et bases de connaissance rattachés. - `list_engines` `{ organizationId }` — providers de l\'organisation et leurs modèles. - `list_skills` `{ organizationId }` — skills de l\'organisation. - `list_knowledge_bases` `{ organizationId }` — bases de connaissance de l\'organisation. Outils exposés — écriture (jamais de suppression ni de détachement) : - `create_agent` `{ organizationId, name, persona, promptInit?, description?, role?, defaultLanguage? }`. - `update_agent` `{ agentId, name?, description?, role?, defaultLanguage?, persona?, promptInit?, isActivated? }` — `null` ou absent : champ inchangé. - `set_agent_engine` `{ agentId, providerId, model }`. - `attach_skill` `{ agentId, skillId }` — ajoute un skill, sans retirer les autres. - `attach_knowledge_base` `{ agentId, knowledgeBaseId }` — ajoute une base, sans retirer les autres. Un agent Breign dont `builderMcpConfiguration.enabled` est vrai reçoit les mêmes outils, au nom de l\'utilisateur de la conversation, bornés à l\'organisation de l\'agent (ni `list_organizations` ni `organizationId`) ; chaque écriture lui demande alors son approbation. Configuration d\'un client, par exemple Claude Code : `claude mcp add --transport http breign-builder https://<api>/mcp/builder --header \"Authorization: Bearer ai-…\"`. Le client doit accepter `application/json` et `text/event-stream` (header `Accept`).
|
|
78
|
+
* Builder MCP server
|
|
79
|
+
*/
|
|
80
|
+
handleBuilderMcpRequest(mcpJsonRpcRequestUio: McpJsonRpcRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<McpJsonRpcResponseUio | null | undefined>;
|
|
48
81
|
/**
|
|
49
82
|
* Serveur MCP (Model Context Protocol, transport Streamable HTTP, sans état) par lequel les agents locaux — Claude Code, Pi, Hermes… — interrogent les agents Breign de l\'organisation. Authentification par clé API personnelle (`x-api-key` ou `Authorization: Bearer ai-…`) ; les credentials d\'app et la clé maître sans `x-user-id` sont refusés. Seuls les agents dont `mcpExposureConfiguration.enabled` est vrai sont joignables. Outils exposés : - `list_agents` — agents joignables, avec leur rôle et leur description. - `ask_agent` `{ agentId, message, conversationId?, waitSeconds? }` — pose une question ; attend la réponse jusqu\'à `waitSeconds` (25 s par défaut, 50 s max), sinon rend un ticket. - `wait_for_reply` `{ ticket, timeoutSeconds? }` — attend la réponse d\'un ticket (45 s par défaut, 50 s max). Chaque question vit dans une conversation de tâche au nom du propriétaire de la clé. L\'agent interrogé peut consulter d\'autres agents ou poser une question à un humain (outil Human_ask) : le statut vaut alors `waiting_human`, parfois pendant des heures. Configuration d\'un client, par exemple Claude Code : `claude mcp add --transport http breign https://<api>/organizations/<organizationId>/mcp --header \"Authorization: Bearer ai-…\"`. Le client doit accepter `application/json` et `text/event-stream` (header `Accept`).
|
|
50
83
|
* MCP server for local agents
|
package/dist/apis/McpApi.js
CHANGED
|
@@ -53,6 +53,31 @@ const index_1 = require("../models/index");
|
|
|
53
53
|
*
|
|
54
54
|
*/
|
|
55
55
|
class McpApi extends runtime.BaseAPI {
|
|
56
|
+
/**
|
|
57
|
+
* Aucune session à clore : le transport est sans état.
|
|
58
|
+
* Not supported (stateless MCP server)
|
|
59
|
+
*/
|
|
60
|
+
async deleteBuilderMcpSessionRaw(initOverrides) {
|
|
61
|
+
const queryParameters = {};
|
|
62
|
+
const headerParameters = {};
|
|
63
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
64
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
65
|
+
}
|
|
66
|
+
const response = await this.request({
|
|
67
|
+
path: `/mcp/builder`,
|
|
68
|
+
method: 'DELETE',
|
|
69
|
+
headers: headerParameters,
|
|
70
|
+
query: queryParameters,
|
|
71
|
+
}, initOverrides);
|
|
72
|
+
return new runtime.VoidApiResponse(response);
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Aucune session à clore : le transport est sans état.
|
|
76
|
+
* Not supported (stateless MCP server)
|
|
77
|
+
*/
|
|
78
|
+
async deleteBuilderMcpSession(initOverrides) {
|
|
79
|
+
await this.deleteBuilderMcpSessionRaw(initOverrides);
|
|
80
|
+
}
|
|
56
81
|
/**
|
|
57
82
|
* Aucune session à clore : le transport est sans état.
|
|
58
83
|
* Not supported (stateless MCP server)
|
|
@@ -81,6 +106,31 @@ class McpApi extends runtime.BaseAPI {
|
|
|
81
106
|
async deleteMcpSession(organizationId, initOverrides) {
|
|
82
107
|
await this.deleteMcpSessionRaw({ organizationId: organizationId }, initOverrides);
|
|
83
108
|
}
|
|
109
|
+
/**
|
|
110
|
+
* Pas de flux SSE côté serveur : le transport est sans état.
|
|
111
|
+
* Not supported (stateless MCP server)
|
|
112
|
+
*/
|
|
113
|
+
async getBuilderMcpStreamRaw(initOverrides) {
|
|
114
|
+
const queryParameters = {};
|
|
115
|
+
const headerParameters = {};
|
|
116
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
117
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
118
|
+
}
|
|
119
|
+
const response = await this.request({
|
|
120
|
+
path: `/mcp/builder`,
|
|
121
|
+
method: 'GET',
|
|
122
|
+
headers: headerParameters,
|
|
123
|
+
query: queryParameters,
|
|
124
|
+
}, initOverrides);
|
|
125
|
+
return new runtime.VoidApiResponse(response);
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Pas de flux SSE côté serveur : le transport est sans état.
|
|
129
|
+
* Not supported (stateless MCP server)
|
|
130
|
+
*/
|
|
131
|
+
async getBuilderMcpStream(initOverrides) {
|
|
132
|
+
await this.getBuilderMcpStreamRaw(initOverrides);
|
|
133
|
+
}
|
|
84
134
|
/**
|
|
85
135
|
* Pas de flux SSE côté serveur : le transport est sans état.
|
|
86
136
|
* Not supported (stateless MCP server)
|
|
@@ -109,6 +159,44 @@ class McpApi extends runtime.BaseAPI {
|
|
|
109
159
|
async getMcpStream(organizationId, initOverrides) {
|
|
110
160
|
await this.getMcpStreamRaw({ organizationId: organizationId }, initOverrides);
|
|
111
161
|
}
|
|
162
|
+
/**
|
|
163
|
+
* Serveur MCP (Model Context Protocol, transport Streamable HTTP, sans état) qui crée et édite les agents des organisations de l\'utilisateur : de quoi brancher Claude Code, ou tout client MCP, sur la configuration de Breign. Lié à la clé et non à une organisation : chaque outil vérifie que l\'utilisateur est membre de celle qu\'il touche. Distinct du serveur `/organizations/{organizationId}/mcp`, qui ne sert qu\'à interroger les agents : brancher l\'un ne donne pas les droits d\'écriture de l\'autre. Authentification par clé API personnelle (`x-api-key` ou `Authorization: Bearer ai-…`) ; les credentials d\'app et la clé maître sans `x-user-id` sont refusés. Chaque action est faite au nom du propriétaire de la clé, avec ses droits. Outils exposés — lecture : - `list_organizations` — organisations dont l\'utilisateur est membre. - `list_agents` `{ organizationId }` — agents de l\'organisation. - `get_agent` `{ agentId }` — configuration d\'un agent : textes, moteur, skills et bases de connaissance rattachés. - `list_engines` `{ organizationId }` — providers de l\'organisation et leurs modèles. - `list_skills` `{ organizationId }` — skills de l\'organisation. - `list_knowledge_bases` `{ organizationId }` — bases de connaissance de l\'organisation. Outils exposés — écriture (jamais de suppression ni de détachement) : - `create_agent` `{ organizationId, name, persona, promptInit?, description?, role?, defaultLanguage? }`. - `update_agent` `{ agentId, name?, description?, role?, defaultLanguage?, persona?, promptInit?, isActivated? }` — `null` ou absent : champ inchangé. - `set_agent_engine` `{ agentId, providerId, model }`. - `attach_skill` `{ agentId, skillId }` — ajoute un skill, sans retirer les autres. - `attach_knowledge_base` `{ agentId, knowledgeBaseId }` — ajoute une base, sans retirer les autres. Un agent Breign dont `builderMcpConfiguration.enabled` est vrai reçoit les mêmes outils, au nom de l\'utilisateur de la conversation, bornés à l\'organisation de l\'agent (ni `list_organizations` ni `organizationId`) ; chaque écriture lui demande alors son approbation. Configuration d\'un client, par exemple Claude Code : `claude mcp add --transport http breign-builder https://<api>/mcp/builder --header \"Authorization: Bearer ai-…\"`. Le client doit accepter `application/json` et `text/event-stream` (header `Accept`).
|
|
164
|
+
* Builder MCP server
|
|
165
|
+
*/
|
|
166
|
+
async handleBuilderMcpRequestRaw(requestParameters, initOverrides) {
|
|
167
|
+
if (requestParameters['mcpJsonRpcRequestUio'] == null) {
|
|
168
|
+
throw new runtime.RequiredError('mcpJsonRpcRequestUio', 'Required parameter "mcpJsonRpcRequestUio" was null or undefined when calling handleBuilderMcpRequest().');
|
|
169
|
+
}
|
|
170
|
+
const queryParameters = {};
|
|
171
|
+
const headerParameters = {};
|
|
172
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
173
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
174
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
175
|
+
}
|
|
176
|
+
const response = await this.request({
|
|
177
|
+
path: `/mcp/builder`,
|
|
178
|
+
method: 'POST',
|
|
179
|
+
headers: headerParameters,
|
|
180
|
+
query: queryParameters,
|
|
181
|
+
body: (0, index_1.McpJsonRpcRequestUioToJSON)(requestParameters['mcpJsonRpcRequestUio']),
|
|
182
|
+
}, initOverrides);
|
|
183
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.McpJsonRpcResponseUioFromJSON)(jsonValue));
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Serveur MCP (Model Context Protocol, transport Streamable HTTP, sans état) qui crée et édite les agents des organisations de l\'utilisateur : de quoi brancher Claude Code, ou tout client MCP, sur la configuration de Breign. Lié à la clé et non à une organisation : chaque outil vérifie que l\'utilisateur est membre de celle qu\'il touche. Distinct du serveur `/organizations/{organizationId}/mcp`, qui ne sert qu\'à interroger les agents : brancher l\'un ne donne pas les droits d\'écriture de l\'autre. Authentification par clé API personnelle (`x-api-key` ou `Authorization: Bearer ai-…`) ; les credentials d\'app et la clé maître sans `x-user-id` sont refusés. Chaque action est faite au nom du propriétaire de la clé, avec ses droits. Outils exposés — lecture : - `list_organizations` — organisations dont l\'utilisateur est membre. - `list_agents` `{ organizationId }` — agents de l\'organisation. - `get_agent` `{ agentId }` — configuration d\'un agent : textes, moteur, skills et bases de connaissance rattachés. - `list_engines` `{ organizationId }` — providers de l\'organisation et leurs modèles. - `list_skills` `{ organizationId }` — skills de l\'organisation. - `list_knowledge_bases` `{ organizationId }` — bases de connaissance de l\'organisation. Outils exposés — écriture (jamais de suppression ni de détachement) : - `create_agent` `{ organizationId, name, persona, promptInit?, description?, role?, defaultLanguage? }`. - `update_agent` `{ agentId, name?, description?, role?, defaultLanguage?, persona?, promptInit?, isActivated? }` — `null` ou absent : champ inchangé. - `set_agent_engine` `{ agentId, providerId, model }`. - `attach_skill` `{ agentId, skillId }` — ajoute un skill, sans retirer les autres. - `attach_knowledge_base` `{ agentId, knowledgeBaseId }` — ajoute une base, sans retirer les autres. Un agent Breign dont `builderMcpConfiguration.enabled` est vrai reçoit les mêmes outils, au nom de l\'utilisateur de la conversation, bornés à l\'organisation de l\'agent (ni `list_organizations` ni `organizationId`) ; chaque écriture lui demande alors son approbation. Configuration d\'un client, par exemple Claude Code : `claude mcp add --transport http breign-builder https://<api>/mcp/builder --header \"Authorization: Bearer ai-…\"`. Le client doit accepter `application/json` et `text/event-stream` (header `Accept`).
|
|
187
|
+
* Builder MCP server
|
|
188
|
+
*/
|
|
189
|
+
async handleBuilderMcpRequest(mcpJsonRpcRequestUio, initOverrides) {
|
|
190
|
+
const response = await this.handleBuilderMcpRequestRaw({ mcpJsonRpcRequestUio: mcpJsonRpcRequestUio }, initOverrides);
|
|
191
|
+
switch (response.raw.status) {
|
|
192
|
+
case 200:
|
|
193
|
+
return await response.value();
|
|
194
|
+
case 202:
|
|
195
|
+
return null;
|
|
196
|
+
default:
|
|
197
|
+
return await response.value();
|
|
198
|
+
}
|
|
199
|
+
}
|
|
112
200
|
/**
|
|
113
201
|
* Serveur MCP (Model Context Protocol, transport Streamable HTTP, sans état) par lequel les agents locaux — Claude Code, Pi, Hermes… — interrogent les agents Breign de l\'organisation. Authentification par clé API personnelle (`x-api-key` ou `Authorization: Bearer ai-…`) ; les credentials d\'app et la clé maître sans `x-user-id` sont refusés. Seuls les agents dont `mcpExposureConfiguration.enabled` est vrai sont joignables. Outils exposés : - `list_agents` — agents joignables, avec leur rôle et leur description. - `ask_agent` `{ agentId, message, conversationId?, waitSeconds? }` — pose une question ; attend la réponse jusqu\'à `waitSeconds` (25 s par défaut, 50 s max), sinon rend un ticket. - `wait_for_reply` `{ ticket, timeoutSeconds? }` — attend la réponse d\'un ticket (45 s par défaut, 50 s max). Chaque question vit dans une conversation de tâche au nom du propriétaire de la clé. L\'agent interrogé peut consulter d\'autres agents ou poser une question à un humain (outil Human_ask) : le statut vaut alors `waiting_human`, parfois pendant des heures. Configuration d\'un client, par exemple Claude Code : `claude mcp add --transport http breign https://<api>/organizations/<organizationId>/mcp --header \"Authorization: Bearer ai-…\"`. Le client doit accepter `application/json` et `text/event-stream` (header `Accept`).
|
|
114
202
|
* MCP server for local agents
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { ScheduledTaskCreateUio, ScheduledTaskListUio, ScheduledTaskManualRunResponseUio, ScheduledTaskRunListUio, ScheduledTaskRunTriggerUio, ScheduledTaskRunUio, ScheduledTaskStatusResponseUio, ScheduledTaskStatusToggleUio, ScheduledTaskUio } from '../models/index';
|
|
13
|
+
import type { ScheduledTaskCreateUio, ScheduledTaskListUio, ScheduledTaskManualRunResponseUio, ScheduledTaskRunListUio, ScheduledTaskRunTriggerUio, ScheduledTaskRunUio, ScheduledTaskStatusResponseUio, ScheduledTaskStatusToggleUio, ScheduledTaskUio, WebhookEndpointUio, WebhookEndpointUpdateUio, WebhookEventListUio, WebhookTestRequestUio, WebhookTestResponseUio } from '../models/index';
|
|
14
14
|
export interface CreateScheduledTaskRequest {
|
|
15
15
|
agentId: string;
|
|
16
16
|
scheduledTaskCreateUio: ScheduledTaskCreateUio;
|
|
@@ -33,6 +33,10 @@ export interface GetScheduledTaskRunTriggerRequest {
|
|
|
33
33
|
taskId: string;
|
|
34
34
|
runId: string;
|
|
35
35
|
}
|
|
36
|
+
export interface GetScheduledTaskWebhookRequest {
|
|
37
|
+
agentId: string;
|
|
38
|
+
taskId: string;
|
|
39
|
+
}
|
|
36
40
|
export interface ListAgentScheduledTaskRunsRequest {
|
|
37
41
|
agentId: string;
|
|
38
42
|
from: Date;
|
|
@@ -44,6 +48,11 @@ export interface ListScheduledTaskRunsRequest {
|
|
|
44
48
|
limit?: number;
|
|
45
49
|
before?: Date;
|
|
46
50
|
}
|
|
51
|
+
export interface ListScheduledTaskWebhookEventsRequest {
|
|
52
|
+
agentId: string;
|
|
53
|
+
taskId: string;
|
|
54
|
+
limit?: number;
|
|
55
|
+
}
|
|
47
56
|
export interface ListScheduledTasksRequest {
|
|
48
57
|
agentId: string;
|
|
49
58
|
status?: ListScheduledTasksStatusEnum;
|
|
@@ -51,6 +60,19 @@ export interface ListScheduledTasksRequest {
|
|
|
51
60
|
limit?: number;
|
|
52
61
|
before?: Date;
|
|
53
62
|
}
|
|
63
|
+
export interface RegenerateScheduledTaskWebhookUrlRequest {
|
|
64
|
+
agentId: string;
|
|
65
|
+
taskId: string;
|
|
66
|
+
}
|
|
67
|
+
export interface RotateScheduledTaskWebhookSecretRequest {
|
|
68
|
+
agentId: string;
|
|
69
|
+
taskId: string;
|
|
70
|
+
}
|
|
71
|
+
export interface TestScheduledTaskWebhookRequest {
|
|
72
|
+
agentId: string;
|
|
73
|
+
taskId: string;
|
|
74
|
+
webhookTestRequestUio?: WebhookTestRequestUio;
|
|
75
|
+
}
|
|
54
76
|
export interface ToggleScheduledTaskStatusRequest {
|
|
55
77
|
agentId: string;
|
|
56
78
|
taskId: string;
|
|
@@ -65,6 +87,11 @@ export interface UpdateScheduledTaskRequest {
|
|
|
65
87
|
taskId: string;
|
|
66
88
|
scheduledTaskCreateUio: ScheduledTaskCreateUio;
|
|
67
89
|
}
|
|
90
|
+
export interface UpdateScheduledTaskWebhookRequest {
|
|
91
|
+
agentId: string;
|
|
92
|
+
taskId: string;
|
|
93
|
+
webhookEndpointUpdateUio: WebhookEndpointUpdateUio;
|
|
94
|
+
}
|
|
68
95
|
/**
|
|
69
96
|
*
|
|
70
97
|
*/
|
|
@@ -109,6 +136,14 @@ export declare class ScheduledTasksApi extends runtime.BaseAPI {
|
|
|
109
136
|
* The external event that triggered a run (« Déclenché par »)
|
|
110
137
|
*/
|
|
111
138
|
getScheduledTaskRunTrigger(agentId: string, taskId: string, runId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ScheduledTaskRunTriggerUio>;
|
|
139
|
+
/**
|
|
140
|
+
* The webhook of an automation triggered by a webhook
|
|
141
|
+
*/
|
|
142
|
+
getScheduledTaskWebhookRaw(requestParameters: GetScheduledTaskWebhookRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WebhookEndpointUio>>;
|
|
143
|
+
/**
|
|
144
|
+
* The webhook of an automation triggered by a webhook
|
|
145
|
+
*/
|
|
146
|
+
getScheduledTaskWebhook(agentId: string, taskId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WebhookEndpointUio>;
|
|
112
147
|
/**
|
|
113
148
|
* List all runs for an agent\'s scheduled tasks within a date range
|
|
114
149
|
*/
|
|
@@ -125,6 +160,14 @@ export declare class ScheduledTasksApi extends runtime.BaseAPI {
|
|
|
125
160
|
* List runs for a scheduled task
|
|
126
161
|
*/
|
|
127
162
|
listScheduledTaskRuns(agentId: string, taskId: string, limit?: number, before?: Date, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ScheduledTaskRunListUio>;
|
|
163
|
+
/**
|
|
164
|
+
* The latest calls received on the webhook
|
|
165
|
+
*/
|
|
166
|
+
listScheduledTaskWebhookEventsRaw(requestParameters: ListScheduledTaskWebhookEventsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WebhookEventListUio>>;
|
|
167
|
+
/**
|
|
168
|
+
* The latest calls received on the webhook
|
|
169
|
+
*/
|
|
170
|
+
listScheduledTaskWebhookEvents(agentId: string, taskId: string, limit?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WebhookEventListUio>;
|
|
128
171
|
/**
|
|
129
172
|
* List scheduled tasks for an agent
|
|
130
173
|
*/
|
|
@@ -133,6 +176,32 @@ export declare class ScheduledTasksApi extends runtime.BaseAPI {
|
|
|
133
176
|
* List scheduled tasks for an agent
|
|
134
177
|
*/
|
|
135
178
|
listScheduledTasks(agentId: string, status?: ListScheduledTasksStatusEnum, q?: string, limit?: number, before?: Date, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ScheduledTaskListUio>;
|
|
179
|
+
/**
|
|
180
|
+
* Give the webhook a new URL (the old one answers 404)
|
|
181
|
+
*/
|
|
182
|
+
regenerateScheduledTaskWebhookUrlRaw(requestParameters: RegenerateScheduledTaskWebhookUrlRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WebhookEndpointUio>>;
|
|
183
|
+
/**
|
|
184
|
+
* Give the webhook a new URL (the old one answers 404)
|
|
185
|
+
*/
|
|
186
|
+
regenerateScheduledTaskWebhookUrl(agentId: string, taskId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WebhookEndpointUio>;
|
|
187
|
+
/**
|
|
188
|
+
* Rotate the webhook secret (the old one stops working)
|
|
189
|
+
*/
|
|
190
|
+
rotateScheduledTaskWebhookSecretRaw(requestParameters: RotateScheduledTaskWebhookSecretRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WebhookEndpointUio>>;
|
|
191
|
+
/**
|
|
192
|
+
* Rotate the webhook secret (the old one stops working)
|
|
193
|
+
*/
|
|
194
|
+
rotateScheduledTaskWebhookSecret(agentId: string, taskId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WebhookEndpointUio>;
|
|
195
|
+
/**
|
|
196
|
+
* The call goes through the same ingestion as a real one, and the agent runs for real.
|
|
197
|
+
* Send a test call to the webhook, signed by the server
|
|
198
|
+
*/
|
|
199
|
+
testScheduledTaskWebhookRaw(requestParameters: TestScheduledTaskWebhookRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WebhookTestResponseUio>>;
|
|
200
|
+
/**
|
|
201
|
+
* The call goes through the same ingestion as a real one, and the agent runs for real.
|
|
202
|
+
* Send a test call to the webhook, signed by the server
|
|
203
|
+
*/
|
|
204
|
+
testScheduledTaskWebhook(agentId: string, taskId: string, webhookTestRequestUio?: WebhookTestRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WebhookTestResponseUio>;
|
|
136
205
|
/**
|
|
137
206
|
* Toggle scheduled task status (active/paused)
|
|
138
207
|
*/
|
|
@@ -157,6 +226,14 @@ export declare class ScheduledTasksApi extends runtime.BaseAPI {
|
|
|
157
226
|
* Update a scheduled task
|
|
158
227
|
*/
|
|
159
228
|
updateScheduledTask(agentId: string, taskId: string, scheduledTaskCreateUio: ScheduledTaskCreateUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ScheduledTaskUio>;
|
|
229
|
+
/**
|
|
230
|
+
* Disable the webhook or change its service user
|
|
231
|
+
*/
|
|
232
|
+
updateScheduledTaskWebhookRaw(requestParameters: UpdateScheduledTaskWebhookRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WebhookEndpointUio>>;
|
|
233
|
+
/**
|
|
234
|
+
* Disable the webhook or change its service user
|
|
235
|
+
*/
|
|
236
|
+
updateScheduledTaskWebhook(agentId: string, taskId: string, webhookEndpointUpdateUio: WebhookEndpointUpdateUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WebhookEndpointUio>;
|
|
160
237
|
}
|
|
161
238
|
/**
|
|
162
239
|
* @export
|
|
@@ -210,6 +210,36 @@ class ScheduledTasksApi extends runtime.BaseAPI {
|
|
|
210
210
|
const response = await this.getScheduledTaskRunTriggerRaw({ agentId: agentId, taskId: taskId, runId: runId }, initOverrides);
|
|
211
211
|
return await response.value();
|
|
212
212
|
}
|
|
213
|
+
/**
|
|
214
|
+
* The webhook of an automation triggered by a webhook
|
|
215
|
+
*/
|
|
216
|
+
async getScheduledTaskWebhookRaw(requestParameters, initOverrides) {
|
|
217
|
+
if (requestParameters['agentId'] == null) {
|
|
218
|
+
throw new runtime.RequiredError('agentId', 'Required parameter "agentId" was null or undefined when calling getScheduledTaskWebhook().');
|
|
219
|
+
}
|
|
220
|
+
if (requestParameters['taskId'] == null) {
|
|
221
|
+
throw new runtime.RequiredError('taskId', 'Required parameter "taskId" was null or undefined when calling getScheduledTaskWebhook().');
|
|
222
|
+
}
|
|
223
|
+
const queryParameters = {};
|
|
224
|
+
const headerParameters = {};
|
|
225
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
226
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
227
|
+
}
|
|
228
|
+
const response = await this.request({
|
|
229
|
+
path: `/agents/{agentId}/scheduled-tasks/{taskId}/webhook`.replace(`{${"agentId"}}`, encodeURIComponent(String(requestParameters['agentId']))).replace(`{${"taskId"}}`, encodeURIComponent(String(requestParameters['taskId']))),
|
|
230
|
+
method: 'GET',
|
|
231
|
+
headers: headerParameters,
|
|
232
|
+
query: queryParameters,
|
|
233
|
+
}, initOverrides);
|
|
234
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.WebhookEndpointUioFromJSON)(jsonValue));
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* The webhook of an automation triggered by a webhook
|
|
238
|
+
*/
|
|
239
|
+
async getScheduledTaskWebhook(agentId, taskId, initOverrides) {
|
|
240
|
+
const response = await this.getScheduledTaskWebhookRaw({ agentId: agentId, taskId: taskId }, initOverrides);
|
|
241
|
+
return await response.value();
|
|
242
|
+
}
|
|
213
243
|
/**
|
|
214
244
|
* List all runs for an agent\'s scheduled tasks within a date range
|
|
215
245
|
*/
|
|
@@ -285,6 +315,39 @@ class ScheduledTasksApi extends runtime.BaseAPI {
|
|
|
285
315
|
const response = await this.listScheduledTaskRunsRaw({ agentId: agentId, taskId: taskId, limit: limit, before: before }, initOverrides);
|
|
286
316
|
return await response.value();
|
|
287
317
|
}
|
|
318
|
+
/**
|
|
319
|
+
* The latest calls received on the webhook
|
|
320
|
+
*/
|
|
321
|
+
async listScheduledTaskWebhookEventsRaw(requestParameters, initOverrides) {
|
|
322
|
+
if (requestParameters['agentId'] == null) {
|
|
323
|
+
throw new runtime.RequiredError('agentId', 'Required parameter "agentId" was null or undefined when calling listScheduledTaskWebhookEvents().');
|
|
324
|
+
}
|
|
325
|
+
if (requestParameters['taskId'] == null) {
|
|
326
|
+
throw new runtime.RequiredError('taskId', 'Required parameter "taskId" was null or undefined when calling listScheduledTaskWebhookEvents().');
|
|
327
|
+
}
|
|
328
|
+
const queryParameters = {};
|
|
329
|
+
if (requestParameters['limit'] != null) {
|
|
330
|
+
queryParameters['limit'] = requestParameters['limit'];
|
|
331
|
+
}
|
|
332
|
+
const headerParameters = {};
|
|
333
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
334
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
335
|
+
}
|
|
336
|
+
const response = await this.request({
|
|
337
|
+
path: `/agents/{agentId}/scheduled-tasks/{taskId}/webhook/events`.replace(`{${"agentId"}}`, encodeURIComponent(String(requestParameters['agentId']))).replace(`{${"taskId"}}`, encodeURIComponent(String(requestParameters['taskId']))),
|
|
338
|
+
method: 'GET',
|
|
339
|
+
headers: headerParameters,
|
|
340
|
+
query: queryParameters,
|
|
341
|
+
}, initOverrides);
|
|
342
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.WebhookEventListUioFromJSON)(jsonValue));
|
|
343
|
+
}
|
|
344
|
+
/**
|
|
345
|
+
* The latest calls received on the webhook
|
|
346
|
+
*/
|
|
347
|
+
async listScheduledTaskWebhookEvents(agentId, taskId, limit, initOverrides) {
|
|
348
|
+
const response = await this.listScheduledTaskWebhookEventsRaw({ agentId: agentId, taskId: taskId, limit: limit }, initOverrides);
|
|
349
|
+
return await response.value();
|
|
350
|
+
}
|
|
288
351
|
/**
|
|
289
352
|
* List scheduled tasks for an agent
|
|
290
353
|
*/
|
|
@@ -324,6 +387,100 @@ class ScheduledTasksApi extends runtime.BaseAPI {
|
|
|
324
387
|
const response = await this.listScheduledTasksRaw({ agentId: agentId, status: status, q: q, limit: limit, before: before }, initOverrides);
|
|
325
388
|
return await response.value();
|
|
326
389
|
}
|
|
390
|
+
/**
|
|
391
|
+
* Give the webhook a new URL (the old one answers 404)
|
|
392
|
+
*/
|
|
393
|
+
async regenerateScheduledTaskWebhookUrlRaw(requestParameters, initOverrides) {
|
|
394
|
+
if (requestParameters['agentId'] == null) {
|
|
395
|
+
throw new runtime.RequiredError('agentId', 'Required parameter "agentId" was null or undefined when calling regenerateScheduledTaskWebhookUrl().');
|
|
396
|
+
}
|
|
397
|
+
if (requestParameters['taskId'] == null) {
|
|
398
|
+
throw new runtime.RequiredError('taskId', 'Required parameter "taskId" was null or undefined when calling regenerateScheduledTaskWebhookUrl().');
|
|
399
|
+
}
|
|
400
|
+
const queryParameters = {};
|
|
401
|
+
const headerParameters = {};
|
|
402
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
403
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
404
|
+
}
|
|
405
|
+
const response = await this.request({
|
|
406
|
+
path: `/agents/{agentId}/scheduled-tasks/{taskId}/webhook/regenerate-url`.replace(`{${"agentId"}}`, encodeURIComponent(String(requestParameters['agentId']))).replace(`{${"taskId"}}`, encodeURIComponent(String(requestParameters['taskId']))),
|
|
407
|
+
method: 'POST',
|
|
408
|
+
headers: headerParameters,
|
|
409
|
+
query: queryParameters,
|
|
410
|
+
}, initOverrides);
|
|
411
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.WebhookEndpointUioFromJSON)(jsonValue));
|
|
412
|
+
}
|
|
413
|
+
/**
|
|
414
|
+
* Give the webhook a new URL (the old one answers 404)
|
|
415
|
+
*/
|
|
416
|
+
async regenerateScheduledTaskWebhookUrl(agentId, taskId, initOverrides) {
|
|
417
|
+
const response = await this.regenerateScheduledTaskWebhookUrlRaw({ agentId: agentId, taskId: taskId }, initOverrides);
|
|
418
|
+
return await response.value();
|
|
419
|
+
}
|
|
420
|
+
/**
|
|
421
|
+
* Rotate the webhook secret (the old one stops working)
|
|
422
|
+
*/
|
|
423
|
+
async rotateScheduledTaskWebhookSecretRaw(requestParameters, initOverrides) {
|
|
424
|
+
if (requestParameters['agentId'] == null) {
|
|
425
|
+
throw new runtime.RequiredError('agentId', 'Required parameter "agentId" was null or undefined when calling rotateScheduledTaskWebhookSecret().');
|
|
426
|
+
}
|
|
427
|
+
if (requestParameters['taskId'] == null) {
|
|
428
|
+
throw new runtime.RequiredError('taskId', 'Required parameter "taskId" was null or undefined when calling rotateScheduledTaskWebhookSecret().');
|
|
429
|
+
}
|
|
430
|
+
const queryParameters = {};
|
|
431
|
+
const headerParameters = {};
|
|
432
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
433
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
434
|
+
}
|
|
435
|
+
const response = await this.request({
|
|
436
|
+
path: `/agents/{agentId}/scheduled-tasks/{taskId}/webhook/rotate-secret`.replace(`{${"agentId"}}`, encodeURIComponent(String(requestParameters['agentId']))).replace(`{${"taskId"}}`, encodeURIComponent(String(requestParameters['taskId']))),
|
|
437
|
+
method: 'POST',
|
|
438
|
+
headers: headerParameters,
|
|
439
|
+
query: queryParameters,
|
|
440
|
+
}, initOverrides);
|
|
441
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.WebhookEndpointUioFromJSON)(jsonValue));
|
|
442
|
+
}
|
|
443
|
+
/**
|
|
444
|
+
* Rotate the webhook secret (the old one stops working)
|
|
445
|
+
*/
|
|
446
|
+
async rotateScheduledTaskWebhookSecret(agentId, taskId, initOverrides) {
|
|
447
|
+
const response = await this.rotateScheduledTaskWebhookSecretRaw({ agentId: agentId, taskId: taskId }, initOverrides);
|
|
448
|
+
return await response.value();
|
|
449
|
+
}
|
|
450
|
+
/**
|
|
451
|
+
* The call goes through the same ingestion as a real one, and the agent runs for real.
|
|
452
|
+
* Send a test call to the webhook, signed by the server
|
|
453
|
+
*/
|
|
454
|
+
async testScheduledTaskWebhookRaw(requestParameters, initOverrides) {
|
|
455
|
+
if (requestParameters['agentId'] == null) {
|
|
456
|
+
throw new runtime.RequiredError('agentId', 'Required parameter "agentId" was null or undefined when calling testScheduledTaskWebhook().');
|
|
457
|
+
}
|
|
458
|
+
if (requestParameters['taskId'] == null) {
|
|
459
|
+
throw new runtime.RequiredError('taskId', 'Required parameter "taskId" was null or undefined when calling testScheduledTaskWebhook().');
|
|
460
|
+
}
|
|
461
|
+
const queryParameters = {};
|
|
462
|
+
const headerParameters = {};
|
|
463
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
464
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
465
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
466
|
+
}
|
|
467
|
+
const response = await this.request({
|
|
468
|
+
path: `/agents/{agentId}/scheduled-tasks/{taskId}/webhook/test`.replace(`{${"agentId"}}`, encodeURIComponent(String(requestParameters['agentId']))).replace(`{${"taskId"}}`, encodeURIComponent(String(requestParameters['taskId']))),
|
|
469
|
+
method: 'POST',
|
|
470
|
+
headers: headerParameters,
|
|
471
|
+
query: queryParameters,
|
|
472
|
+
body: (0, index_1.WebhookTestRequestUioToJSON)(requestParameters['webhookTestRequestUio']),
|
|
473
|
+
}, initOverrides);
|
|
474
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.WebhookTestResponseUioFromJSON)(jsonValue));
|
|
475
|
+
}
|
|
476
|
+
/**
|
|
477
|
+
* The call goes through the same ingestion as a real one, and the agent runs for real.
|
|
478
|
+
* Send a test call to the webhook, signed by the server
|
|
479
|
+
*/
|
|
480
|
+
async testScheduledTaskWebhook(agentId, taskId, webhookTestRequestUio, initOverrides) {
|
|
481
|
+
const response = await this.testScheduledTaskWebhookRaw({ agentId: agentId, taskId: taskId, webhookTestRequestUio: webhookTestRequestUio }, initOverrides);
|
|
482
|
+
return await response.value();
|
|
483
|
+
}
|
|
327
484
|
/**
|
|
328
485
|
* Toggle scheduled task status (active/paused)
|
|
329
486
|
*/
|
|
@@ -424,6 +581,41 @@ class ScheduledTasksApi extends runtime.BaseAPI {
|
|
|
424
581
|
const response = await this.updateScheduledTaskRaw({ agentId: agentId, taskId: taskId, scheduledTaskCreateUio: scheduledTaskCreateUio }, initOverrides);
|
|
425
582
|
return await response.value();
|
|
426
583
|
}
|
|
584
|
+
/**
|
|
585
|
+
* Disable the webhook or change its service user
|
|
586
|
+
*/
|
|
587
|
+
async updateScheduledTaskWebhookRaw(requestParameters, initOverrides) {
|
|
588
|
+
if (requestParameters['agentId'] == null) {
|
|
589
|
+
throw new runtime.RequiredError('agentId', 'Required parameter "agentId" was null or undefined when calling updateScheduledTaskWebhook().');
|
|
590
|
+
}
|
|
591
|
+
if (requestParameters['taskId'] == null) {
|
|
592
|
+
throw new runtime.RequiredError('taskId', 'Required parameter "taskId" was null or undefined when calling updateScheduledTaskWebhook().');
|
|
593
|
+
}
|
|
594
|
+
if (requestParameters['webhookEndpointUpdateUio'] == null) {
|
|
595
|
+
throw new runtime.RequiredError('webhookEndpointUpdateUio', 'Required parameter "webhookEndpointUpdateUio" was null or undefined when calling updateScheduledTaskWebhook().');
|
|
596
|
+
}
|
|
597
|
+
const queryParameters = {};
|
|
598
|
+
const headerParameters = {};
|
|
599
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
600
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
601
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
602
|
+
}
|
|
603
|
+
const response = await this.request({
|
|
604
|
+
path: `/agents/{agentId}/scheduled-tasks/{taskId}/webhook`.replace(`{${"agentId"}}`, encodeURIComponent(String(requestParameters['agentId']))).replace(`{${"taskId"}}`, encodeURIComponent(String(requestParameters['taskId']))),
|
|
605
|
+
method: 'PATCH',
|
|
606
|
+
headers: headerParameters,
|
|
607
|
+
query: queryParameters,
|
|
608
|
+
body: (0, index_1.WebhookEndpointUpdateUioToJSON)(requestParameters['webhookEndpointUpdateUio']),
|
|
609
|
+
}, initOverrides);
|
|
610
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.WebhookEndpointUioFromJSON)(jsonValue));
|
|
611
|
+
}
|
|
612
|
+
/**
|
|
613
|
+
* Disable the webhook or change its service user
|
|
614
|
+
*/
|
|
615
|
+
async updateScheduledTaskWebhook(agentId, taskId, webhookEndpointUpdateUio, initOverrides) {
|
|
616
|
+
const response = await this.updateScheduledTaskWebhookRaw({ agentId: agentId, taskId: taskId, webhookEndpointUpdateUio: webhookEndpointUpdateUio }, initOverrides);
|
|
617
|
+
return await response.value();
|
|
618
|
+
}
|
|
427
619
|
}
|
|
428
620
|
exports.ScheduledTasksApi = ScheduledTasksApi;
|
|
429
621
|
/**
|
|
@@ -0,0 +1,32 @@
|
|
|
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
|
+
* Access to Breign's builder MCP server (create and edit the organisation's agents) from inside a conversation, acting as the user of that conversation. Opt-in; only an organisation admin can change it. Every write the agent makes through it asks the user for approval first.
|
|
14
|
+
* @export
|
|
15
|
+
* @interface AgentBuilderMcpConfigurationUio
|
|
16
|
+
*/
|
|
17
|
+
export interface AgentBuilderMcpConfigurationUio {
|
|
18
|
+
/**
|
|
19
|
+
* Gives this agent the builder tools.
|
|
20
|
+
* @type {boolean}
|
|
21
|
+
* @memberof AgentBuilderMcpConfigurationUio
|
|
22
|
+
*/
|
|
23
|
+
enabled?: boolean;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Check if a given object implements the AgentBuilderMcpConfigurationUio interface.
|
|
27
|
+
*/
|
|
28
|
+
export declare function instanceOfAgentBuilderMcpConfigurationUio(value: object): value is AgentBuilderMcpConfigurationUio;
|
|
29
|
+
export declare function AgentBuilderMcpConfigurationUioFromJSON(json: any): AgentBuilderMcpConfigurationUio;
|
|
30
|
+
export declare function AgentBuilderMcpConfigurationUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): AgentBuilderMcpConfigurationUio;
|
|
31
|
+
export declare function AgentBuilderMcpConfigurationUioToJSON(json: any): AgentBuilderMcpConfigurationUio;
|
|
32
|
+
export declare function AgentBuilderMcpConfigurationUioToJSONTyped(value?: AgentBuilderMcpConfigurationUio | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,48 @@
|
|
|
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.instanceOfAgentBuilderMcpConfigurationUio = instanceOfAgentBuilderMcpConfigurationUio;
|
|
17
|
+
exports.AgentBuilderMcpConfigurationUioFromJSON = AgentBuilderMcpConfigurationUioFromJSON;
|
|
18
|
+
exports.AgentBuilderMcpConfigurationUioFromJSONTyped = AgentBuilderMcpConfigurationUioFromJSONTyped;
|
|
19
|
+
exports.AgentBuilderMcpConfigurationUioToJSON = AgentBuilderMcpConfigurationUioToJSON;
|
|
20
|
+
exports.AgentBuilderMcpConfigurationUioToJSONTyped = AgentBuilderMcpConfigurationUioToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the AgentBuilderMcpConfigurationUio interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfAgentBuilderMcpConfigurationUio(value) {
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
function AgentBuilderMcpConfigurationUioFromJSON(json) {
|
|
28
|
+
return AgentBuilderMcpConfigurationUioFromJSONTyped(json, false);
|
|
29
|
+
}
|
|
30
|
+
function AgentBuilderMcpConfigurationUioFromJSONTyped(json, ignoreDiscriminator) {
|
|
31
|
+
if (json == null) {
|
|
32
|
+
return json;
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
'enabled': json['enabled'] == null ? undefined : json['enabled'],
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
function AgentBuilderMcpConfigurationUioToJSON(json) {
|
|
39
|
+
return AgentBuilderMcpConfigurationUioToJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
function AgentBuilderMcpConfigurationUioToJSONTyped(value, ignoreDiscriminator = false) {
|
|
42
|
+
if (value == null) {
|
|
43
|
+
return value;
|
|
44
|
+
}
|
|
45
|
+
return {
|
|
46
|
+
'enabled': value['enabled'],
|
|
47
|
+
};
|
|
48
|
+
}
|
|
@@ -17,6 +17,7 @@ import type { AgentSandboxConfigurationUio } from './AgentSandboxConfigurationUi
|
|
|
17
17
|
import type { AgentMcpExposureConfigurationUio } from './AgentMcpExposureConfigurationUio';
|
|
18
18
|
import type { AgentSubscriptionUio } from './AgentSubscriptionUio';
|
|
19
19
|
import type { AgentCodeModeConfigurationUio } from './AgentCodeModeConfigurationUio';
|
|
20
|
+
import type { AgentBuilderMcpConfigurationUio } from './AgentBuilderMcpConfigurationUio';
|
|
20
21
|
import type { SpeechToTextConfigUio } from './SpeechToTextConfigUio';
|
|
21
22
|
import type { AgentMemoryConfigurationUio } from './AgentMemoryConfigurationUio';
|
|
22
23
|
import type { AgentPatchEngineUio } from './AgentPatchEngineUio';
|
|
@@ -201,6 +202,12 @@ export interface AgentPatchUio {
|
|
|
201
202
|
* @memberof AgentPatchUio
|
|
202
203
|
*/
|
|
203
204
|
mcpExposureConfiguration?: AgentMcpExposureConfigurationUio | null;
|
|
205
|
+
/**
|
|
206
|
+
*
|
|
207
|
+
* @type {AgentBuilderMcpConfigurationUio}
|
|
208
|
+
* @memberof AgentPatchUio
|
|
209
|
+
*/
|
|
210
|
+
builderMcpConfiguration?: AgentBuilderMcpConfigurationUio | null;
|
|
204
211
|
/**
|
|
205
212
|
*
|
|
206
213
|
* @type {AgentHumanEscalationConfigurationUio}
|