@breign/client 1.0.176 → 1.0.178

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.
Files changed (80) hide show
  1. package/dist/apis/IntegrationsApi.d.ts +174 -0
  2. package/dist/apis/IntegrationsApi.js +445 -0
  3. package/dist/apis/McpApi.d.ts +33 -0
  4. package/dist/apis/McpApi.js +88 -0
  5. package/dist/apis/ScheduledTasksApi.d.ts +14 -1
  6. package/dist/apis/ScheduledTasksApi.js +33 -0
  7. package/dist/apis/index.d.ts +1 -0
  8. package/dist/apis/index.js +1 -0
  9. package/dist/models/AgentBuilderMcpConfigurationUio.d.ts +32 -0
  10. package/dist/models/AgentBuilderMcpConfigurationUio.js +48 -0
  11. package/dist/models/AgentPatchUio.d.ts +7 -0
  12. package/dist/models/AgentPatchUio.js +3 -0
  13. package/dist/models/AgentUio.d.ts +7 -0
  14. package/dist/models/AgentUio.js +3 -0
  15. package/dist/models/ExternalEventRoutingUio.d.ts +53 -0
  16. package/dist/models/ExternalEventRoutingUio.js +67 -0
  17. package/dist/models/ExternalEventStatusUio.d.ts +33 -0
  18. package/dist/models/ExternalEventStatusUio.js +59 -0
  19. package/dist/models/ExternalEventUio.d.ts +135 -0
  20. package/dist/models/ExternalEventUio.js +123 -0
  21. package/dist/models/GitlabAccessLevelUio.d.ts +28 -0
  22. package/dist/models/GitlabAccessLevelUio.js +54 -0
  23. package/dist/models/GitlabBotAccountCreateUio.d.ts +50 -0
  24. package/dist/models/GitlabBotAccountCreateUio.js +58 -0
  25. package/dist/models/GitlabBotAccountSummaryUio.d.ts +77 -0
  26. package/dist/models/GitlabBotAccountSummaryUio.js +83 -0
  27. package/dist/models/GitlabBotAccountUio.d.ts +125 -0
  28. package/dist/models/GitlabBotAccountUio.js +115 -0
  29. package/dist/models/GitlabBotAccountUpdateUio.d.ts +64 -0
  30. package/dist/models/GitlabBotAccountUpdateUio.js +64 -0
  31. package/dist/models/GitlabConnectionTestResultUio.d.ts +50 -0
  32. package/dist/models/GitlabConnectionTestResultUio.js +62 -0
  33. package/dist/models/GitlabIntegrationCreateUio.d.ts +45 -0
  34. package/dist/models/GitlabIntegrationCreateUio.js +57 -0
  35. package/dist/models/GitlabIntegrationDetailUio.d.ts +120 -0
  36. package/dist/models/GitlabIntegrationDetailUio.js +112 -0
  37. package/dist/models/GitlabIntegrationUio.d.ts +107 -0
  38. package/dist/models/GitlabIntegrationUio.js +103 -0
  39. package/dist/models/GitlabIntegrationUpdateUio.d.ts +65 -0
  40. package/dist/models/GitlabIntegrationUpdateUio.js +65 -0
  41. package/dist/models/GitlabRoutingTestResultAgentUio.d.ts +38 -0
  42. package/dist/models/GitlabRoutingTestResultAgentUio.js +54 -0
  43. package/dist/models/GitlabRoutingTestResultAutomationsInnerUio.d.ts +38 -0
  44. package/dist/models/GitlabRoutingTestResultAutomationsInnerUio.js +54 -0
  45. package/dist/models/GitlabRoutingTestResultBotAccountUio.d.ts +38 -0
  46. package/dist/models/GitlabRoutingTestResultBotAccountUio.js +54 -0
  47. package/dist/models/GitlabRoutingTestResultRunAsUserUio.d.ts +38 -0
  48. package/dist/models/GitlabRoutingTestResultRunAsUserUio.js +54 -0
  49. package/dist/models/GitlabRoutingTestResultUio.d.ts +77 -0
  50. package/dist/models/GitlabRoutingTestResultUio.js +85 -0
  51. package/dist/models/GitlabRoutingTestUio.d.ts +32 -0
  52. package/dist/models/GitlabRoutingTestUio.js +50 -0
  53. package/dist/models/ScheduledTaskCreateUio.d.ts +9 -2
  54. package/dist/models/ScheduledTaskCreateUio.js +4 -3
  55. package/dist/models/ScheduledTaskRunTriggerAuthorUio.d.ts +38 -0
  56. package/dist/models/ScheduledTaskRunTriggerAuthorUio.js +54 -0
  57. package/dist/models/ScheduledTaskRunTriggerUio.d.ts +142 -0
  58. package/dist/models/ScheduledTaskRunTriggerUio.js +129 -0
  59. package/dist/models/ScheduledTaskRunUio.d.ts +20 -0
  60. package/dist/models/ScheduledTaskRunUio.js +12 -1
  61. package/dist/models/ScheduledTaskUio.d.ts +9 -2
  62. package/dist/models/ScheduledTaskUio.js +3 -0
  63. package/dist/models/TaskTriggerReplyUio.d.ts +38 -0
  64. package/dist/models/TaskTriggerReplyUio.js +54 -0
  65. package/dist/models/TaskTriggerUio.d.ts +88 -0
  66. package/dist/models/TaskTriggerUio.js +84 -0
  67. package/dist/models/ToolAllowedToolsRequestUio.d.ts +16 -0
  68. package/dist/models/ToolAllowedToolsRequestUio.js +10 -0
  69. package/dist/models/ToolAllowedToolsResponseUio.d.ts +16 -0
  70. package/dist/models/ToolAllowedToolsResponseUio.js +10 -0
  71. package/dist/models/ToolApprovalUio.d.ts +2 -1
  72. package/dist/models/ToolApprovalUio.js +2 -1
  73. package/dist/models/ToolCallResultRequestUio.d.ts +1 -1
  74. package/dist/models/ToolCallUio.d.ts +1 -1
  75. package/dist/models/ToolSecureMcpUio.d.ts +16 -0
  76. package/dist/models/ToolSecureMcpUio.js +10 -0
  77. package/dist/models/index.d.ts +24 -0
  78. package/dist/models/index.js +24 -0
  79. package/dist/openapi.json +1401 -38
  80. package/package.json +1 -1
package/dist/openapi.json CHANGED
@@ -72,6 +72,9 @@
72
72
  }, {
73
73
  "description" : "Scheduled task management endpoints",
74
74
  "name" : "scheduled-tasks"
75
+ }, {
76
+ "description" : "GitLab integrations whose mentions trigger automations",
77
+ "name" : "integrations"
75
78
  }, {
76
79
  "description" : "User management endpoints",
77
80
  "name" : "users"
@@ -3010,6 +3013,60 @@
3010
3013
  "tags" : [ "scheduledTasks" ]
3011
3014
  }
3012
3015
  },
3016
+ "/agents/{agentId}/scheduled-tasks/{taskId}/runs/{runId}/trigger" : {
3017
+ "get" : {
3018
+ "operationId" : "getScheduledTaskRunTrigger",
3019
+ "parameters" : [ {
3020
+ "description" : "ID of the agent",
3021
+ "in" : "path",
3022
+ "name" : "agentId",
3023
+ "required" : true,
3024
+ "schema" : {
3025
+ "format" : "uuid",
3026
+ "type" : "string"
3027
+ }
3028
+ }, {
3029
+ "description" : "ID of the scheduled task",
3030
+ "in" : "path",
3031
+ "name" : "taskId",
3032
+ "required" : true,
3033
+ "schema" : {
3034
+ "type" : "string"
3035
+ }
3036
+ }, {
3037
+ "description" : "ID of the scheduled task run",
3038
+ "in" : "path",
3039
+ "name" : "runId",
3040
+ "required" : true,
3041
+ "schema" : {
3042
+ "type" : "string"
3043
+ }
3044
+ } ],
3045
+ "responses" : {
3046
+ "200" : {
3047
+ "content" : {
3048
+ "application/json" : {
3049
+ "schema" : {
3050
+ "$ref" : "#/components/schemas/ScheduledTaskRunTrigger"
3051
+ }
3052
+ }
3053
+ },
3054
+ "description" : "The GitLab mention behind the run"
3055
+ },
3056
+ "401" : {
3057
+ "description" : "Unauthorized"
3058
+ },
3059
+ "403" : {
3060
+ "description" : "Forbidden"
3061
+ },
3062
+ "404" : {
3063
+ "description" : "Run not found, or not triggered by an event"
3064
+ }
3065
+ },
3066
+ "summary" : "The external event that triggered a run (« Déclenché par »)",
3067
+ "tags" : [ "scheduledTasks" ]
3068
+ }
3069
+ },
3013
3070
  "/agents/{agentId}/apps" : {
3014
3071
  "get" : {
3015
3072
  "description" : "Get apps for agent id",
@@ -6097,6 +6154,85 @@
6097
6154
  "tags" : [ "mcp" ]
6098
6155
  }
6099
6156
  },
6157
+ "/mcp/builder" : {
6158
+ "delete" : {
6159
+ "description" : "Aucune session à clore : le transport est sans état.",
6160
+ "operationId" : "deleteBuilderMcpSession",
6161
+ "responses" : {
6162
+ "405" : {
6163
+ "content" : {
6164
+ "application/json" : {
6165
+ "schema" : {
6166
+ "$ref" : "#/components/schemas/McpJsonRpcResponse"
6167
+ }
6168
+ }
6169
+ },
6170
+ "description" : "Method not allowed"
6171
+ }
6172
+ },
6173
+ "summary" : "Not supported (stateless MCP server)",
6174
+ "tags" : [ "mcp" ]
6175
+ },
6176
+ "get" : {
6177
+ "description" : "Pas de flux SSE côté serveur : le transport est sans état.",
6178
+ "operationId" : "getBuilderMcpStream",
6179
+ "responses" : {
6180
+ "405" : {
6181
+ "content" : {
6182
+ "application/json" : {
6183
+ "schema" : {
6184
+ "$ref" : "#/components/schemas/McpJsonRpcResponse"
6185
+ }
6186
+ }
6187
+ },
6188
+ "description" : "Method not allowed"
6189
+ }
6190
+ },
6191
+ "summary" : "Not supported (stateless MCP server)",
6192
+ "tags" : [ "mcp" ]
6193
+ },
6194
+ "post" : {
6195
+ "description" : "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.\n\nAuthentification 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.\n\nOutils exposés — lecture :\n- `list_organizations` — organisations dont l'utilisateur est membre.\n- `list_agents` `{ organizationId }` — agents de l'organisation.\n- `get_agent` `{ agentId }` — configuration d'un agent : textes, moteur, skills et bases de\n connaissance rattachés.\n\n- `list_engines` `{ organizationId }` — providers de l'organisation et leurs modèles.\n- `list_skills` `{ organizationId }` — skills de l'organisation.\n- `list_knowledge_bases` `{ organizationId }` — bases de connaissance de l'organisation.\n\nOutils exposés — écriture (jamais de suppression ni de détachement) :\n- `create_agent` `{ organizationId, name, persona, promptInit?, description?, role?,\n defaultLanguage? }`.\n\n- `update_agent` `{ agentId, name?, description?, role?, defaultLanguage?, persona?,\n promptInit?, isActivated? }` — `null` ou absent : champ inchangé.\n\n- `set_agent_engine` `{ agentId, providerId, model }`.\n- `attach_skill` `{ agentId, skillId }` — ajoute un skill, sans retirer les autres.\n- `attach_knowledge_base` `{ agentId, knowledgeBaseId }` — ajoute une base, sans retirer les\n autres.\n\n\nUn 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.\n\nConfiguration 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`).",
6196
+ "operationId" : "handleBuilderMcpRequest",
6197
+ "requestBody" : {
6198
+ "content" : {
6199
+ "application/json" : {
6200
+ "schema" : {
6201
+ "$ref" : "#/components/schemas/McpJsonRpcRequest"
6202
+ }
6203
+ }
6204
+ },
6205
+ "required" : true
6206
+ },
6207
+ "responses" : {
6208
+ "200" : {
6209
+ "content" : {
6210
+ "application/json" : {
6211
+ "schema" : {
6212
+ "$ref" : "#/components/schemas/McpJsonRpcResponse"
6213
+ }
6214
+ }
6215
+ },
6216
+ "description" : "Réponse JSON-RPC"
6217
+ },
6218
+ "202" : {
6219
+ "description" : "Notification acceptée, sans corps"
6220
+ },
6221
+ "401" : {
6222
+ "content" : {
6223
+ "application/json" : {
6224
+ "schema" : {
6225
+ "$ref" : "#/components/schemas/McpJsonRpcResponse"
6226
+ }
6227
+ }
6228
+ },
6229
+ "description" : "Clé API personnelle requise"
6230
+ }
6231
+ },
6232
+ "summary" : "Builder MCP server",
6233
+ "tags" : [ "mcp" ]
6234
+ }
6235
+ },
6100
6236
  "/conversations/{conversationId}/read" : {
6101
6237
  "post" : {
6102
6238
  "description" : "Positionne la marque de lecture de l'utilisateur sur la conversation.",
@@ -19243,6 +19379,547 @@
19243
19379
  "tags" : [ "tickets" ]
19244
19380
  }
19245
19381
  },
19382
+ "/organizations/{organizationId}/integrations/gitlab" : {
19383
+ "get" : {
19384
+ "operationId" : "listGitlabIntegrations",
19385
+ "parameters" : [ {
19386
+ "description" : "ID of the organization",
19387
+ "in" : "path",
19388
+ "name" : "organizationId",
19389
+ "required" : true,
19390
+ "schema" : {
19391
+ "type" : "string"
19392
+ }
19393
+ } ],
19394
+ "responses" : {
19395
+ "200" : {
19396
+ "content" : {
19397
+ "application/json" : {
19398
+ "schema" : {
19399
+ "items" : {
19400
+ "$ref" : "#/components/schemas/GitlabIntegration"
19401
+ },
19402
+ "type" : "array"
19403
+ }
19404
+ }
19405
+ },
19406
+ "description" : "The integrations"
19407
+ },
19408
+ "403" : {
19409
+ "description" : "Not an admin of the organization"
19410
+ }
19411
+ },
19412
+ "summary" : "List the GitLab integrations of an organization",
19413
+ "tags" : [ "integrations" ]
19414
+ },
19415
+ "post" : {
19416
+ "description" : "A webhook secret is generated; it is returned with the integration.",
19417
+ "operationId" : "createGitlabIntegration",
19418
+ "parameters" : [ {
19419
+ "description" : "ID of the organization",
19420
+ "in" : "path",
19421
+ "name" : "organizationId",
19422
+ "required" : true,
19423
+ "schema" : {
19424
+ "type" : "string"
19425
+ }
19426
+ } ],
19427
+ "requestBody" : {
19428
+ "content" : {
19429
+ "application/json" : {
19430
+ "schema" : {
19431
+ "$ref" : "#/components/schemas/GitlabIntegrationCreate"
19432
+ }
19433
+ }
19434
+ },
19435
+ "required" : true
19436
+ },
19437
+ "responses" : {
19438
+ "201" : {
19439
+ "content" : {
19440
+ "application/json" : {
19441
+ "schema" : {
19442
+ "$ref" : "#/components/schemas/GitlabIntegrationDetail"
19443
+ }
19444
+ }
19445
+ },
19446
+ "description" : "Integration created"
19447
+ },
19448
+ "400" : {
19449
+ "description" : "Invalid body"
19450
+ },
19451
+ "403" : {
19452
+ "description" : "Not an admin of the organization"
19453
+ },
19454
+ "422" : {
19455
+ "description" : "Invalid base URL, or GITLAB_HOST_NOT_ALLOWED (private or reserved network)"
19456
+ }
19457
+ },
19458
+ "summary" : "Link a GitLab instance to the organization",
19459
+ "tags" : [ "integrations" ]
19460
+ }
19461
+ },
19462
+ "/organizations/{organizationId}/integrations/gitlab/{integrationId}" : {
19463
+ "delete" : {
19464
+ "operationId" : "deleteGitlabIntegration",
19465
+ "parameters" : [ {
19466
+ "description" : "ID of the organization",
19467
+ "in" : "path",
19468
+ "name" : "organizationId",
19469
+ "required" : true,
19470
+ "schema" : {
19471
+ "type" : "string"
19472
+ }
19473
+ }, {
19474
+ "in" : "path",
19475
+ "name" : "integrationId",
19476
+ "required" : true,
19477
+ "schema" : {
19478
+ "type" : "string"
19479
+ }
19480
+ } ],
19481
+ "responses" : {
19482
+ "204" : {
19483
+ "description" : "Deleted"
19484
+ },
19485
+ "403" : {
19486
+ "description" : "Not an admin of the organization"
19487
+ },
19488
+ "404" : {
19489
+ "description" : "Integration not found"
19490
+ }
19491
+ },
19492
+ "summary" : "Delete a GitLab integration, its bot accounts and its events",
19493
+ "tags" : [ "integrations" ]
19494
+ },
19495
+ "get" : {
19496
+ "operationId" : "getGitlabIntegration",
19497
+ "parameters" : [ {
19498
+ "description" : "ID of the organization",
19499
+ "in" : "path",
19500
+ "name" : "organizationId",
19501
+ "required" : true,
19502
+ "schema" : {
19503
+ "type" : "string"
19504
+ }
19505
+ }, {
19506
+ "in" : "path",
19507
+ "name" : "integrationId",
19508
+ "required" : true,
19509
+ "schema" : {
19510
+ "type" : "string"
19511
+ }
19512
+ } ],
19513
+ "responses" : {
19514
+ "200" : {
19515
+ "content" : {
19516
+ "application/json" : {
19517
+ "schema" : {
19518
+ "$ref" : "#/components/schemas/GitlabIntegrationDetail"
19519
+ }
19520
+ }
19521
+ },
19522
+ "description" : "The integration"
19523
+ },
19524
+ "403" : {
19525
+ "description" : "Not an admin of the organization"
19526
+ },
19527
+ "404" : {
19528
+ "description" : "Integration not found"
19529
+ }
19530
+ },
19531
+ "summary" : "Get a GitLab integration, its webhook secret and its bot accounts",
19532
+ "tags" : [ "integrations" ]
19533
+ },
19534
+ "patch" : {
19535
+ "description" : "Changing `baseUrl` wipes the token of every bot account (status token_invalid, lastError BASE_URL_CHANGED): a token is never sent to another host than the one it was given for.",
19536
+ "operationId" : "updateGitlabIntegration",
19537
+ "parameters" : [ {
19538
+ "description" : "ID of the organization",
19539
+ "in" : "path",
19540
+ "name" : "organizationId",
19541
+ "required" : true,
19542
+ "schema" : {
19543
+ "type" : "string"
19544
+ }
19545
+ }, {
19546
+ "in" : "path",
19547
+ "name" : "integrationId",
19548
+ "required" : true,
19549
+ "schema" : {
19550
+ "type" : "string"
19551
+ }
19552
+ } ],
19553
+ "requestBody" : {
19554
+ "content" : {
19555
+ "application/json" : {
19556
+ "schema" : {
19557
+ "$ref" : "#/components/schemas/GitlabIntegrationUpdate"
19558
+ }
19559
+ }
19560
+ },
19561
+ "required" : true
19562
+ },
19563
+ "responses" : {
19564
+ "200" : {
19565
+ "content" : {
19566
+ "application/json" : {
19567
+ "schema" : {
19568
+ "$ref" : "#/components/schemas/GitlabIntegrationDetail"
19569
+ }
19570
+ }
19571
+ },
19572
+ "description" : "The updated integration"
19573
+ },
19574
+ "403" : {
19575
+ "description" : "Not an admin of the organization"
19576
+ },
19577
+ "404" : {
19578
+ "description" : "Integration not found"
19579
+ },
19580
+ "422" : {
19581
+ "description" : "Invalid base URL, or GITLAB_HOST_NOT_ALLOWED (private or reserved network)"
19582
+ }
19583
+ },
19584
+ "summary" : "Update a GitLab integration",
19585
+ "tags" : [ "integrations" ]
19586
+ }
19587
+ },
19588
+ "/organizations/{organizationId}/integrations/gitlab/{integrationId}/events" : {
19589
+ "get" : {
19590
+ "operationId" : "listGitlabIntegrationEvents",
19591
+ "parameters" : [ {
19592
+ "description" : "ID of the organization",
19593
+ "in" : "path",
19594
+ "name" : "organizationId",
19595
+ "required" : true,
19596
+ "schema" : {
19597
+ "type" : "string"
19598
+ }
19599
+ }, {
19600
+ "in" : "path",
19601
+ "name" : "integrationId",
19602
+ "required" : true,
19603
+ "schema" : {
19604
+ "type" : "string"
19605
+ }
19606
+ } ],
19607
+ "responses" : {
19608
+ "200" : {
19609
+ "content" : {
19610
+ "application/json" : {
19611
+ "schema" : {
19612
+ "items" : {
19613
+ "$ref" : "#/components/schemas/ExternalEvent"
19614
+ },
19615
+ "type" : "array"
19616
+ }
19617
+ }
19618
+ },
19619
+ "description" : "The 20 latest events, most recent first"
19620
+ },
19621
+ "403" : {
19622
+ "description" : "Not an admin of the organization"
19623
+ },
19624
+ "404" : {
19625
+ "description" : "Integration not found"
19626
+ }
19627
+ },
19628
+ "summary" : "The latest mentions received by a GitLab integration",
19629
+ "tags" : [ "integrations" ]
19630
+ }
19631
+ },
19632
+ "/organizations/{organizationId}/integrations/gitlab/{integrationId}/test-connection" : {
19633
+ "post" : {
19634
+ "description" : "An accepted token puts its account back in service; a rejected one marks it token_invalid.",
19635
+ "operationId" : "testGitlabConnection",
19636
+ "parameters" : [ {
19637
+ "description" : "ID of the organization",
19638
+ "in" : "path",
19639
+ "name" : "organizationId",
19640
+ "required" : true,
19641
+ "schema" : {
19642
+ "type" : "string"
19643
+ }
19644
+ }, {
19645
+ "in" : "path",
19646
+ "name" : "integrationId",
19647
+ "required" : true,
19648
+ "schema" : {
19649
+ "type" : "string"
19650
+ }
19651
+ } ],
19652
+ "responses" : {
19653
+ "200" : {
19654
+ "content" : {
19655
+ "application/json" : {
19656
+ "schema" : {
19657
+ "items" : {
19658
+ "$ref" : "#/components/schemas/GitlabConnectionTestResult"
19659
+ },
19660
+ "type" : "array"
19661
+ }
19662
+ }
19663
+ },
19664
+ "description" : "One result per bot account"
19665
+ },
19666
+ "403" : {
19667
+ "description" : "Not an admin of the organization"
19668
+ },
19669
+ "404" : {
19670
+ "description" : "Integration not found"
19671
+ }
19672
+ },
19673
+ "summary" : "Test the connection of every bot account (GET /user with its token)",
19674
+ "tags" : [ "integrations" ]
19675
+ }
19676
+ },
19677
+ "/organizations/{organizationId}/integrations/gitlab/{integrationId}/test-routing" : {
19678
+ "post" : {
19679
+ "operationId" : "testGitlabRouting",
19680
+ "parameters" : [ {
19681
+ "description" : "ID of the organization",
19682
+ "in" : "path",
19683
+ "name" : "organizationId",
19684
+ "required" : true,
19685
+ "schema" : {
19686
+ "type" : "string"
19687
+ }
19688
+ }, {
19689
+ "in" : "path",
19690
+ "name" : "integrationId",
19691
+ "required" : true,
19692
+ "schema" : {
19693
+ "type" : "string"
19694
+ }
19695
+ } ],
19696
+ "requestBody" : {
19697
+ "content" : {
19698
+ "application/json" : {
19699
+ "schema" : {
19700
+ "$ref" : "#/components/schemas/GitlabRoutingTest"
19701
+ }
19702
+ }
19703
+ },
19704
+ "required" : true
19705
+ },
19706
+ "responses" : {
19707
+ "200" : {
19708
+ "content" : {
19709
+ "application/json" : {
19710
+ "schema" : {
19711
+ "$ref" : "#/components/schemas/GitlabRoutingTestResult"
19712
+ }
19713
+ }
19714
+ },
19715
+ "description" : "The account, agent, instruction and automations the comment would reach"
19716
+ },
19717
+ "403" : {
19718
+ "description" : "Not an admin of the organization"
19719
+ },
19720
+ "404" : {
19721
+ "description" : "Integration not found"
19722
+ }
19723
+ },
19724
+ "summary" : "Preview what a GitLab comment would trigger",
19725
+ "tags" : [ "integrations" ]
19726
+ }
19727
+ },
19728
+ "/organizations/{organizationId}/integrations/gitlab/{integrationId}/bot-accounts" : {
19729
+ "post" : {
19730
+ "description" : "The token is checked against GitLab (GET /user). The service user must be a member of the organization, the named agents must belong to it, and no two callable agents may share a name once normalized (409 DUPLICATE_AGENT_NAMES, with the duplicates).",
19731
+ "operationId" : "createGitlabBotAccount",
19732
+ "parameters" : [ {
19733
+ "description" : "ID of the organization",
19734
+ "in" : "path",
19735
+ "name" : "organizationId",
19736
+ "required" : true,
19737
+ "schema" : {
19738
+ "type" : "string"
19739
+ }
19740
+ }, {
19741
+ "in" : "path",
19742
+ "name" : "integrationId",
19743
+ "required" : true,
19744
+ "schema" : {
19745
+ "type" : "string"
19746
+ }
19747
+ } ],
19748
+ "requestBody" : {
19749
+ "content" : {
19750
+ "application/json" : {
19751
+ "schema" : {
19752
+ "$ref" : "#/components/schemas/GitlabBotAccountCreate"
19753
+ }
19754
+ }
19755
+ },
19756
+ "required" : true
19757
+ },
19758
+ "responses" : {
19759
+ "201" : {
19760
+ "content" : {
19761
+ "application/json" : {
19762
+ "schema" : {
19763
+ "$ref" : "#/components/schemas/GitlabBotAccount"
19764
+ }
19765
+ }
19766
+ },
19767
+ "description" : "Bot account created"
19768
+ },
19769
+ "403" : {
19770
+ "description" : "Not an admin of the organization"
19771
+ },
19772
+ "404" : {
19773
+ "description" : "Integration not found"
19774
+ },
19775
+ "409" : {
19776
+ "description" : "Duplicate callable agent names, or this GitLab account is already configured"
19777
+ },
19778
+ "422" : {
19779
+ "description" : "Token rejected by GitLab, GitLab unreachable, service user not a member, or unknown agents"
19780
+ }
19781
+ },
19782
+ "summary" : "Add a bot account to a GitLab integration",
19783
+ "tags" : [ "integrations" ]
19784
+ }
19785
+ },
19786
+ "/organizations/{organizationId}/integrations/gitlab/{integrationId}/bot-accounts/{accountId}" : {
19787
+ "delete" : {
19788
+ "operationId" : "deleteGitlabBotAccount",
19789
+ "parameters" : [ {
19790
+ "description" : "ID of the organization",
19791
+ "in" : "path",
19792
+ "name" : "organizationId",
19793
+ "required" : true,
19794
+ "schema" : {
19795
+ "type" : "string"
19796
+ }
19797
+ }, {
19798
+ "in" : "path",
19799
+ "name" : "integrationId",
19800
+ "required" : true,
19801
+ "schema" : {
19802
+ "type" : "string"
19803
+ }
19804
+ }, {
19805
+ "in" : "path",
19806
+ "name" : "accountId",
19807
+ "required" : true,
19808
+ "schema" : {
19809
+ "type" : "string"
19810
+ }
19811
+ } ],
19812
+ "responses" : {
19813
+ "204" : {
19814
+ "description" : "Deleted"
19815
+ },
19816
+ "403" : {
19817
+ "description" : "Not an admin of the organization"
19818
+ },
19819
+ "404" : {
19820
+ "description" : "Integration or bot account not found"
19821
+ }
19822
+ },
19823
+ "summary" : "Remove a bot account",
19824
+ "tags" : [ "integrations" ]
19825
+ },
19826
+ "patch" : {
19827
+ "operationId" : "updateGitlabBotAccount",
19828
+ "parameters" : [ {
19829
+ "description" : "ID of the organization",
19830
+ "in" : "path",
19831
+ "name" : "organizationId",
19832
+ "required" : true,
19833
+ "schema" : {
19834
+ "type" : "string"
19835
+ }
19836
+ }, {
19837
+ "in" : "path",
19838
+ "name" : "integrationId",
19839
+ "required" : true,
19840
+ "schema" : {
19841
+ "type" : "string"
19842
+ }
19843
+ }, {
19844
+ "in" : "path",
19845
+ "name" : "accountId",
19846
+ "required" : true,
19847
+ "schema" : {
19848
+ "type" : "string"
19849
+ }
19850
+ } ],
19851
+ "requestBody" : {
19852
+ "content" : {
19853
+ "application/json" : {
19854
+ "schema" : {
19855
+ "$ref" : "#/components/schemas/GitlabBotAccountUpdate"
19856
+ }
19857
+ }
19858
+ },
19859
+ "required" : true
19860
+ },
19861
+ "responses" : {
19862
+ "200" : {
19863
+ "content" : {
19864
+ "application/json" : {
19865
+ "schema" : {
19866
+ "$ref" : "#/components/schemas/GitlabBotAccount"
19867
+ }
19868
+ }
19869
+ },
19870
+ "description" : "The updated bot account"
19871
+ },
19872
+ "403" : {
19873
+ "description" : "Not an admin of the organization"
19874
+ },
19875
+ "404" : {
19876
+ "description" : "Integration or bot account not found"
19877
+ },
19878
+ "409" : {
19879
+ "description" : "Duplicate callable agent names"
19880
+ },
19881
+ "422" : {
19882
+ "description" : "Token rejected by GitLab, service user not a member, or unknown agents"
19883
+ }
19884
+ },
19885
+ "summary" : "Update a bot account (agents, service user, token, status)",
19886
+ "tags" : [ "integrations" ]
19887
+ }
19888
+ },
19889
+ "/organizations/{organizationId}/gitlab-bot-accounts" : {
19890
+ "get" : {
19891
+ "operationId" : "listOrganizationGitlabBotAccounts",
19892
+ "parameters" : [ {
19893
+ "description" : "ID of the organization",
19894
+ "in" : "path",
19895
+ "name" : "organizationId",
19896
+ "required" : true,
19897
+ "schema" : {
19898
+ "type" : "string"
19899
+ }
19900
+ } ],
19901
+ "responses" : {
19902
+ "200" : {
19903
+ "content" : {
19904
+ "application/json" : {
19905
+ "schema" : {
19906
+ "items" : {
19907
+ "$ref" : "#/components/schemas/GitlabBotAccountSummary"
19908
+ },
19909
+ "type" : "array"
19910
+ }
19911
+ }
19912
+ },
19913
+ "description" : "The bot accounts, without secrets"
19914
+ },
19915
+ "403" : {
19916
+ "description" : "Not a member of the organization"
19917
+ }
19918
+ },
19919
+ "summary" : "The GitLab bot accounts of the organization, to pick one in an automation",
19920
+ "tags" : [ "integrations" ]
19921
+ }
19922
+ },
19246
19923
  "/organizations/{organizationId}/inbox" : {
19247
19924
  "get" : {
19248
19925
  "description" : "todo : actions en attente (questions, propositions, relectures, feux verts), les plus anciennes d'abord ; mentions : mentions non traitées ; done : éléments traités, les plus récents d'abord.",
@@ -20684,6 +21361,12 @@
20684
21361
  } ],
20685
21362
  "nullable" : true
20686
21363
  },
21364
+ "builderMcpConfiguration" : {
21365
+ "allOf" : [ {
21366
+ "$ref" : "#/components/schemas/AgentBuilderMcpConfiguration"
21367
+ } ],
21368
+ "nullable" : true
21369
+ },
20687
21370
  "humanEscalationConfiguration" : {
20688
21371
  "allOf" : [ {
20689
21372
  "$ref" : "#/components/schemas/AgentHumanEscalationConfiguration"
@@ -20930,6 +21613,16 @@
20930
21613
  },
20931
21614
  "type" : "object"
20932
21615
  },
21616
+ "AgentBuilderMcpConfiguration" : {
21617
+ "description" : "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.",
21618
+ "properties" : {
21619
+ "enabled" : {
21620
+ "description" : "Gives this agent the builder tools.",
21621
+ "type" : "boolean"
21622
+ }
21623
+ },
21624
+ "type" : "object"
21625
+ },
20933
21626
  "AgentHumanEscalationConfiguration" : {
20934
21627
  "description" : "Per-agent activation of the Human_ask tool, offered only in task conversations (a local agent or another agent asking). The question goes to the first valid referent; without one, to the user who owns the task — the person who connected the local agent.",
20935
21628
  "properties" : {
@@ -21162,6 +21855,12 @@
21162
21855
  } ],
21163
21856
  "nullable" : true
21164
21857
  },
21858
+ "builderMcpConfiguration" : {
21859
+ "allOf" : [ {
21860
+ "$ref" : "#/components/schemas/AgentBuilderMcpConfiguration"
21861
+ } ],
21862
+ "nullable" : true
21863
+ },
21165
21864
  "humanEscalationConfiguration" : {
21166
21865
  "allOf" : [ {
21167
21866
  "$ref" : "#/components/schemas/AgentHumanEscalationConfiguration"
@@ -22738,7 +23437,14 @@
22738
23437
  "type" : "string"
22739
23438
  },
22740
23439
  "schedule" : {
22741
- "$ref" : "#/components/schemas/TaskSchedule"
23440
+ "allOf" : [ {
23441
+ "$ref" : "#/components/schemas/TaskSchedule"
23442
+ } ],
23443
+ "description" : "null for an automation triggered by an event.",
23444
+ "nullable" : true
23445
+ },
23446
+ "trigger" : {
23447
+ "$ref" : "#/components/schemas/TaskTrigger"
22742
23448
  },
22743
23449
  "cronExpression" : {
22744
23450
  "type" : "string"
@@ -22840,7 +23546,45 @@
22840
23546
  } ],
22841
23547
  "type" : "object"
22842
23548
  },
23549
+ "TaskTrigger" : {
23550
+ "description" : "What starts the automation. `schedule` (default): its schedule. `event`: a mention of one of the bot accounts in GitLab, in the given kinds of objects and projects (empty: all projects; `groupe/projet` or `groupe/*`).",
23551
+ "properties" : {
23552
+ "type" : {
23553
+ "enum" : [ "schedule", "event" ],
23554
+ "type" : "string"
23555
+ },
23556
+ "source" : {
23557
+ "enum" : [ "gitlab_mention" ],
23558
+ "type" : "string"
23559
+ },
23560
+ "botAccountIds" : {
23561
+ "items" : {
23562
+ "type" : "string"
23563
+ },
23564
+ "type" : "array"
23565
+ },
23566
+ "kinds" : {
23567
+ "items" : {
23568
+ "enum" : [ "merge_request", "issue", "work_item", "commit" ],
23569
+ "type" : "string"
23570
+ },
23571
+ "type" : "array"
23572
+ },
23573
+ "projects" : {
23574
+ "items" : {
23575
+ "type" : "string"
23576
+ },
23577
+ "type" : "array"
23578
+ },
23579
+ "reply" : {
23580
+ "$ref" : "#/components/schemas/TaskTrigger_reply"
23581
+ }
23582
+ },
23583
+ "required" : [ "type" ],
23584
+ "type" : "object"
23585
+ },
22843
23586
  "ScheduledTaskCreate" : {
23587
+ "description" : "`schedule` is required unless `trigger.type` is `event` (then `mode` must be `recurring`).",
22844
23588
  "properties" : {
22845
23589
  "message" : {
22846
23590
  "minLength" : 1,
@@ -22853,6 +23597,9 @@
22853
23597
  "schedule" : {
22854
23598
  "$ref" : "#/components/schemas/TaskSchedule"
22855
23599
  },
23600
+ "trigger" : {
23601
+ "$ref" : "#/components/schemas/TaskTrigger"
23602
+ },
22856
23603
  "name" : {
22857
23604
  "type" : "string"
22858
23605
  },
@@ -22868,7 +23615,7 @@
22868
23615
  "type" : "string"
22869
23616
  }
22870
23617
  },
22871
- "required" : [ "message", "mode", "schedule" ],
23618
+ "required" : [ "message", "mode" ],
22872
23619
  "type" : "object"
22873
23620
  },
22874
23621
  "ScheduledTaskStatusToggle" : {
@@ -22965,6 +23712,15 @@
22965
23712
  },
22966
23713
  "type" : "array"
22967
23714
  },
23715
+ "triggerEventId" : {
23716
+ "description" : "The external event (GitLab mention) that triggered the run.",
23717
+ "type" : "string"
23718
+ },
23719
+ "executor" : {
23720
+ "description" : "internal — run by brain-api itself (event-triggered runs); the external executor of scheduled runs must ignore them. Absent means external.",
23721
+ "enum" : [ "internal", "external" ],
23722
+ "type" : "string"
23723
+ },
22968
23724
  "createdAt" : {
22969
23725
  "format" : "date-time",
22970
23726
  "type" : "string"
@@ -22998,6 +23754,75 @@
22998
23754
  "required" : [ "at", "type" ],
22999
23755
  "type" : "object"
23000
23756
  },
23757
+ "ScheduledTaskRunTrigger" : {
23758
+ "description" : "The GitLab mention that triggered a run.",
23759
+ "properties" : {
23760
+ "eventId" : {
23761
+ "type" : "string"
23762
+ },
23763
+ "source" : {
23764
+ "enum" : [ "gitlab" ],
23765
+ "type" : "string"
23766
+ },
23767
+ "status" : {
23768
+ "$ref" : "#/components/schemas/ExternalEventStatus"
23769
+ },
23770
+ "receivedAt" : {
23771
+ "format" : "date-time",
23772
+ "type" : "string"
23773
+ },
23774
+ "projectPath" : {
23775
+ "type" : "string"
23776
+ },
23777
+ "targetType" : {
23778
+ "enum" : [ "merge_request", "issue", "work_item", "commit" ],
23779
+ "type" : "string"
23780
+ },
23781
+ "targetIid" : {
23782
+ "nullable" : true,
23783
+ "type" : "integer"
23784
+ },
23785
+ "targetTitle" : {
23786
+ "nullable" : true,
23787
+ "type" : "string"
23788
+ },
23789
+ "targetUrl" : {
23790
+ "nullable" : true,
23791
+ "type" : "string"
23792
+ },
23793
+ "noteUrl" : {
23794
+ "nullable" : true,
23795
+ "type" : "string"
23796
+ },
23797
+ "author" : {
23798
+ "$ref" : "#/components/schemas/ScheduledTaskRunTrigger_author"
23799
+ },
23800
+ "body" : {
23801
+ "description" : "The comment text (untrusted user content).",
23802
+ "type" : "string"
23803
+ },
23804
+ "botUsername" : {
23805
+ "nullable" : true,
23806
+ "type" : "string"
23807
+ },
23808
+ "routing" : {
23809
+ "allOf" : [ {
23810
+ "$ref" : "#/components/schemas/ExternalEventRouting"
23811
+ } ],
23812
+ "nullable" : true
23813
+ },
23814
+ "replyUrl" : {
23815
+ "nullable" : true,
23816
+ "type" : "string"
23817
+ },
23818
+ "conversationId" : {
23819
+ "nullable" : true,
23820
+ "type" : "string"
23821
+ }
23822
+ },
23823
+ "required" : [ "author", "body", "botUsername", "conversationId", "eventId", "noteUrl", "projectPath", "receivedAt", "replyUrl", "routing", "source", "status", "targetIid", "targetTitle", "targetType", "targetUrl" ],
23824
+ "type" : "object"
23825
+ },
23001
23826
  "AppLight" : {
23002
23827
  "properties" : {
23003
23828
  "id" : {
@@ -26184,8 +27009,8 @@
26184
27009
  "type" : "string"
26185
27010
  },
26186
27011
  "resourceKind" : {
26187
- "description" : "Which family the approval belongs to. url is an address the agent sandbox may reach; urlPattern is a glob covering a whole site, subdomains included; command is one exact command line it may run.",
26188
- "enum" : [ "url", "command", "urlPattern" ],
27012
+ "description" : "Which family the approval belongs to. url is an address the agent sandbox may reach; urlPattern is a glob covering a whole site, subdomains included; command is one exact command line it may run; mcpTool is an MCP tool that writes, as server/tool (for example builder/update_agent), whatever its arguments — stored under toolName mcp. An mcpTool approval is only ever born of a question the agent asked: it cannot be created or edited by hand.",
27013
+ "enum" : [ "url", "command", "urlPattern", "mcpTool" ],
26189
27014
  "type" : "string"
26190
27015
  },
26191
27016
  "resource" : {
@@ -26905,6 +27730,14 @@
26905
27730
  },
26906
27731
  "type" : "array",
26907
27732
  "uniqueItems" : true
27733
+ },
27734
+ "approvalModes" : {
27735
+ "additionalProperties" : {
27736
+ "enum" : [ "always", "never" ],
27737
+ "type" : "string"
27738
+ },
27739
+ "description" : "Quand un appel de l'outil demande l'approbation de l'utilisateur, par nom d'outil. Absent : automatique — demandée sauf si le serveur déclare l'outil en lecture seule (readOnlyHint). always : toujours demander, et refuser l'appel quand personne ne peut répondre (tâche planifiée, widget, appel entre agents). never : ne jamais demander.",
27740
+ "type" : "object"
26908
27741
  }
26909
27742
  },
26910
27743
  "required" : [ "allowedTools" ],
@@ -26919,6 +27752,14 @@
26919
27752
  "type" : "string"
26920
27753
  },
26921
27754
  "type" : "array"
27755
+ },
27756
+ "approvalModes" : {
27757
+ "additionalProperties" : {
27758
+ "enum" : [ "always", "never" ],
27759
+ "type" : "string"
27760
+ },
27761
+ "description" : "Quand un appel de l'outil demande l'approbation de l'utilisateur, par nom d'outil. Absent : automatique — demandée sauf si le serveur déclare l'outil en lecture seule (readOnlyHint). always : toujours demander, et refuser l'appel quand personne ne peut répondre (tâche planifiée, widget, appel entre agents). never : ne jamais demander.",
27762
+ "type" : "object"
26922
27763
  }
26923
27764
  },
26924
27765
  "required" : [ "allowedTools" ],
@@ -28342,7 +29183,7 @@
28342
29183
  "type" : "string"
28343
29184
  },
28344
29185
  "tool" : {
28345
- "description" : "Name of the tool the model called. Three values are produced by the server today. take_screenshot asks the client to capture the screen. bash_network_approval is an agent sandbox asking permission to reach an address: arguments carries url (the full address, to be shown as-is), urlPrefix (what a yes actually grants), origin, host and method. bash_command_approval is an agent sandbox asking permission to run a command through one of its interpreters — python3 or js-exec: arguments carries command, which is both what has to be shown in full and exactly what a yes grants — nothing ran, so a refusal leaves the sandbox untouched. Calls named bash_python_approval, the name this last one carried while python was the only interpreter, may still be waiting in older conversations and resolve exactly the same way.",
29186
+ "description" : "Name of the tool the model called. Four values are produced by the server today. mcp_tool_approval asks permission to run an MCP tool: a write of the builder server, which creates and edits agents, or a tool of an MCP server configured in the organisation, by its approval mode (see Tool.mcp.approvalModes). arguments carries server (builder, or the id of the organisation's tool), serverName (the name to show), tool and arguments (the exact call the model wants to make), and — builder only — preview — what the call changes, for display only: tool, agentName, changes (field, before when something existed, after, with names instead of ids, unchanged fields left out) and warnings (deactivates, rewritesInstructions, changesEngine); null when it could not be built. Allow once covers exactly these arguments; agentUser covers the tool whatever its arguments. take_screenshot asks the client to capture the screen. bash_network_approval is an agent sandbox asking permission to reach an address: arguments carries url (the full address, to be shown as-is), urlPrefix (what a yes actually grants), origin, host and method. bash_command_approval is an agent sandbox asking permission to run a command through one of its interpreters — python3 or js-exec: arguments carries command, which is both what has to be shown in full and exactly what a yes grants — nothing ran, so a refusal leaves the sandbox untouched. Calls named bash_python_approval, the name this last one carried while python was the only interpreter, may still be waiting in older conversations and resolve exactly the same way.",
28346
29187
  "type" : "string"
28347
29188
  },
28348
29189
  "status" : {
@@ -28405,7 +29246,7 @@
28405
29246
  "type" : "string"
28406
29247
  },
28407
29248
  "approvalScope" : {
28408
- "description" : "Only read when resolving a bash_network_approval or bash_command_approval call with status completed: how far the approval reaches. once — the suspended reply and nothing after it, so the same request is asked about again next time — is the default, and nothing is stored. agentUser covers this agent, for this user, across all of their conversations, and is kept until revoked. Any other value is refused with a 400. Never widens what the agent is allowed to do: the server-side lock and the per-agent switch remain prerequisites. Only the user the question was asked of may answer it: an approval is a personal consent, so another caller — an admin included — gets a 403.",
29249
+ "description" : "Only read when resolving a bash_network_approval, bash_command_approval or mcp_tool_approval call with status completed: how far the approval reaches. once — the suspended reply and nothing after it, so the same request is asked about again next time — is the default, and nothing is stored. agentUser covers this agent, for this user, across all of their conversations, and is kept until revoked. Any other value is refused with a 400. Never widens what the agent is allowed to do: the server-side lock and the per-agent switch remain prerequisites. Only the user the question was asked of may answer it: an approval is a personal consent, so another caller — an admin included — gets a 403.",
28409
29250
  "enum" : [ "once", "agentUser" ],
28410
29251
  "type" : "string"
28411
29252
  },
@@ -30874,77 +31715,511 @@
30874
31715
  },
30875
31716
  "type" : "object"
30876
31717
  },
30877
- "ConversationTicketProposal" : {
30878
- "description" : "Proposition de ticket portée par un message d'agent.",
31718
+ "ConversationTicketProposal" : {
31719
+ "description" : "Proposition de ticket portée par un message d'agent.",
31720
+ "properties" : {
31721
+ "proposalId" : {
31722
+ "format" : "uuid",
31723
+ "type" : "string"
31724
+ },
31725
+ "status" : {
31726
+ "$ref" : "#/components/schemas/TicketProposalStatus"
31727
+ },
31728
+ "mode" : {
31729
+ "$ref" : "#/components/schemas/AgentTicketCreation"
31730
+ },
31731
+ "projectId" : {
31732
+ "description" : "Projet proposé par l'agent ; null = l'humain doit en choisir un",
31733
+ "format" : "uuid",
31734
+ "nullable" : true,
31735
+ "type" : "string"
31736
+ },
31737
+ "payload" : {
31738
+ "$ref" : "#/components/schemas/TicketProposalPayload"
31739
+ },
31740
+ "ticketId" : {
31741
+ "format" : "uuid",
31742
+ "nullable" : true,
31743
+ "type" : "string"
31744
+ },
31745
+ "ticketKey" : {
31746
+ "nullable" : true,
31747
+ "type" : "string"
31748
+ }
31749
+ },
31750
+ "required" : [ "mode", "payload", "projectId", "proposalId", "status", "ticketId", "ticketKey" ],
31751
+ "type" : "object"
31752
+ },
31753
+ "TicketProposalPayload" : {
31754
+ "properties" : {
31755
+ "title" : {
31756
+ "type" : "string"
31757
+ },
31758
+ "description" : {
31759
+ "nullable" : true,
31760
+ "type" : "string"
31761
+ },
31762
+ "assignees" : {
31763
+ "items" : {
31764
+ "$ref" : "#/components/schemas/TicketAssigneeInput"
31765
+ },
31766
+ "type" : "array"
31767
+ },
31768
+ "reviewer" : {
31769
+ "allOf" : [ {
31770
+ "$ref" : "#/components/schemas/MemberRef"
31771
+ } ],
31772
+ "nullable" : true
31773
+ },
31774
+ "priority" : {
31775
+ "$ref" : "#/components/schemas/TicketPriority"
31776
+ },
31777
+ "startMode" : {
31778
+ "$ref" : "#/components/schemas/TicketStartMode"
31779
+ },
31780
+ "workspacePaths" : {
31781
+ "description" : "Fichiers du workspace de la session à joindre comme artefacts",
31782
+ "items" : {
31783
+ "type" : "string"
31784
+ },
31785
+ "type" : "array"
31786
+ }
31787
+ },
31788
+ "required" : [ "assignees", "description", "priority", "reviewer", "startMode", "title", "workspacePaths" ],
31789
+ "type" : "object"
31790
+ },
31791
+ "GitlabIntegration" : {
31792
+ "description" : "A GitLab instance linked to an organization. Its projects send webhooks to `webhookUrl`.",
30879
31793
  "properties" : {
30880
- "proposalId" : {
30881
- "format" : "uuid",
31794
+ "id" : {
31795
+ "type" : "string"
31796
+ },
31797
+ "organizationId" : {
31798
+ "type" : "string"
31799
+ },
31800
+ "name" : {
31801
+ "type" : "string"
31802
+ },
31803
+ "baseUrl" : {
31804
+ "description" : "The instance URL, without a trailing slash.",
30882
31805
  "type" : "string"
30883
31806
  },
31807
+ "minAccessLevel" : {
31808
+ "$ref" : "#/components/schemas/GitlabAccessLevel"
31809
+ },
30884
31810
  "status" : {
30885
- "$ref" : "#/components/schemas/TicketProposalStatus"
31811
+ "enum" : [ "active", "disabled" ],
31812
+ "type" : "string"
30886
31813
  },
30887
- "mode" : {
30888
- "$ref" : "#/components/schemas/AgentTicketCreation"
31814
+ "webhookUrl" : {
31815
+ "description" : "The URL to declare in GitLab, Settings › Webhooks.",
31816
+ "type" : "string"
30889
31817
  },
30890
- "projectId" : {
30891
- "description" : "Projet proposé par l'agent ; null = l'humain doit en choisir un",
30892
- "format" : "uuid",
31818
+ "lastEventAt" : {
31819
+ "format" : "date-time",
30893
31820
  "nullable" : true,
30894
31821
  "type" : "string"
30895
31822
  },
30896
- "payload" : {
30897
- "$ref" : "#/components/schemas/TicketProposalPayload"
31823
+ "botAccountCount" : {
31824
+ "type" : "integer"
30898
31825
  },
30899
- "ticketId" : {
30900
- "format" : "uuid",
30901
- "nullable" : true,
31826
+ "handledLast7Days" : {
31827
+ "description" : "Mentions answered over the last 7 days.",
31828
+ "type" : "integer"
31829
+ },
31830
+ "createdAt" : {
31831
+ "format" : "date-time",
30902
31832
  "type" : "string"
30903
31833
  },
30904
- "ticketKey" : {
30905
- "nullable" : true,
31834
+ "updatedAt" : {
31835
+ "format" : "date-time",
30906
31836
  "type" : "string"
30907
31837
  }
30908
31838
  },
30909
- "required" : [ "mode", "payload", "projectId", "proposalId", "status", "ticketId", "ticketKey" ],
31839
+ "required" : [ "baseUrl", "botAccountCount", "createdAt", "handledLast7Days", "id", "lastEventAt", "minAccessLevel", "name", "organizationId", "status", "updatedAt", "webhookUrl" ],
30910
31840
  "type" : "object"
30911
31841
  },
30912
- "TicketProposalPayload" : {
31842
+ "GitlabAccessLevel" : {
31843
+ "description" : "GitLab access level — Guest (10), Reporter (20), Developer (30), Maintainer (40), Owner (50).",
31844
+ "enum" : [ 10, 20, 30, 40, 50 ],
31845
+ "type" : "integer"
31846
+ },
31847
+ "GitlabIntegrationCreate" : {
31848
+ "additionalProperties" : false,
30913
31849
  "properties" : {
30914
- "title" : {
31850
+ "name" : {
31851
+ "maxLength" : 120,
31852
+ "minLength" : 1,
30915
31853
  "type" : "string"
30916
31854
  },
30917
- "description" : {
31855
+ "baseUrl" : {
31856
+ "maxLength" : 500,
31857
+ "minLength" : 1,
31858
+ "type" : "string"
31859
+ },
31860
+ "minAccessLevel" : {
31861
+ "$ref" : "#/components/schemas/GitlabAccessLevel"
31862
+ }
31863
+ },
31864
+ "required" : [ "baseUrl", "name" ],
31865
+ "type" : "object"
31866
+ },
31867
+ "GitlabIntegrationDetail" : {
31868
+ "allOf" : [ {
31869
+ "$ref" : "#/components/schemas/GitlabIntegration"
31870
+ }, {
31871
+ "properties" : {
31872
+ "webhookSecret" : {
31873
+ "description" : "The webhook \"Secret token\" to copy into GitLab. Only organization admins read it.",
31874
+ "type" : "string"
31875
+ },
31876
+ "botAccounts" : {
31877
+ "items" : {
31878
+ "$ref" : "#/components/schemas/GitlabBotAccount"
31879
+ },
31880
+ "type" : "array"
31881
+ }
31882
+ },
31883
+ "required" : [ "botAccounts", "webhookSecret" ],
31884
+ "type" : "object"
31885
+ } ]
31886
+ },
31887
+ "GitlabBotAccount" : {
31888
+ "description" : "A GitLab account mentioned to wake an agent. `@bot Agent …` wakes the named agent when it is callable; otherwise the whole text goes to the default agent.",
31889
+ "properties" : {
31890
+ "id" : {
31891
+ "type" : "string"
31892
+ },
31893
+ "integrationId" : {
31894
+ "type" : "string"
31895
+ },
31896
+ "organizationId" : {
31897
+ "type" : "string"
31898
+ },
31899
+ "gitlabUserId" : {
31900
+ "nullable" : true,
31901
+ "type" : "integer"
31902
+ },
31903
+ "username" : {
31904
+ "description" : "Without the `@`.",
31905
+ "type" : "string"
31906
+ },
31907
+ "tokenHint" : {
31908
+ "description" : "The end of the token (`glpat-…7f2a`); the token itself is never returned.",
31909
+ "type" : "string"
31910
+ },
31911
+ "tokenExpiresAt" : {
30918
31912
  "nullable" : true,
30919
31913
  "type" : "string"
30920
31914
  },
30921
- "assignees" : {
31915
+ "defaultAgentId" : {
31916
+ "nullable" : true,
31917
+ "type" : "string"
31918
+ },
31919
+ "callableAgentIds" : {
31920
+ "description" : "null — every (non personal) agent of the organization is callable by its name.",
30922
31921
  "items" : {
30923
- "$ref" : "#/components/schemas/TicketAssigneeInput"
31922
+ "type" : "string"
30924
31923
  },
31924
+ "nullable" : true,
30925
31925
  "type" : "array"
30926
31926
  },
30927
- "reviewer" : {
31927
+ "runAsUserId" : {
31928
+ "description" : "The organization member the conversations run as (user-scoped MCP tools, quotas).",
31929
+ "type" : "string"
31930
+ },
31931
+ "runAsUserName" : {
31932
+ "nullable" : true,
31933
+ "type" : "string"
31934
+ },
31935
+ "status" : {
31936
+ "enum" : [ "active", "token_invalid", "disabled" ],
31937
+ "type" : "string"
31938
+ },
31939
+ "lastError" : {
31940
+ "nullable" : true,
31941
+ "type" : "string"
31942
+ },
31943
+ "createdAt" : {
31944
+ "type" : "string"
31945
+ },
31946
+ "updatedAt" : {
31947
+ "type" : "string"
31948
+ }
31949
+ },
31950
+ "required" : [ "callableAgentIds", "createdAt", "defaultAgentId", "gitlabUserId", "id", "integrationId", "lastError", "organizationId", "runAsUserId", "runAsUserName", "status", "tokenExpiresAt", "tokenHint", "updatedAt", "username" ],
31951
+ "type" : "object"
31952
+ },
31953
+ "GitlabIntegrationUpdate" : {
31954
+ "additionalProperties" : false,
31955
+ "properties" : {
31956
+ "name" : {
31957
+ "maxLength" : 120,
31958
+ "minLength" : 1,
31959
+ "type" : "string"
31960
+ },
31961
+ "baseUrl" : {
31962
+ "maxLength" : 500,
31963
+ "minLength" : 1,
31964
+ "type" : "string"
31965
+ },
31966
+ "minAccessLevel" : {
31967
+ "$ref" : "#/components/schemas/GitlabAccessLevel"
31968
+ },
31969
+ "status" : {
31970
+ "enum" : [ "active", "disabled" ],
31971
+ "type" : "string"
31972
+ },
31973
+ "regenerateSecret" : {
31974
+ "description" : "Generate a new webhook secret; GitLab must then be given the new one.",
31975
+ "type" : "boolean"
31976
+ }
31977
+ },
31978
+ "type" : "object"
31979
+ },
31980
+ "ExternalEvent" : {
31981
+ "description" : "A mention received from GitLab and its way through the queue.",
31982
+ "properties" : {
31983
+ "id" : {
31984
+ "type" : "string"
31985
+ },
31986
+ "status" : {
31987
+ "$ref" : "#/components/schemas/ExternalEventStatus"
31988
+ },
31989
+ "receivedAt" : {
31990
+ "format" : "date-time",
31991
+ "type" : "string"
31992
+ },
31993
+ "ref" : {
31994
+ "description" : "groupe/projet!142, groupe/projet#88…",
31995
+ "type" : "string"
31996
+ },
31997
+ "targetType" : {
31998
+ "enum" : [ "merge_request", "issue", "work_item", "commit" ],
31999
+ "type" : "string"
32000
+ },
32001
+ "targetTitle" : {
32002
+ "nullable" : true,
32003
+ "type" : "string"
32004
+ },
32005
+ "url" : {
32006
+ "nullable" : true,
32007
+ "type" : "string"
32008
+ },
32009
+ "author" : {
32010
+ "$ref" : "#/components/schemas/ScheduledTaskRunTrigger_author"
32011
+ },
32012
+ "botAccountId" : {
32013
+ "nullable" : true,
32014
+ "type" : "string"
32015
+ },
32016
+ "agentId" : {
32017
+ "nullable" : true,
32018
+ "type" : "string"
32019
+ },
32020
+ "agentName" : {
32021
+ "nullable" : true,
32022
+ "type" : "string"
32023
+ },
32024
+ "taskId" : {
32025
+ "nullable" : true,
32026
+ "type" : "string"
32027
+ },
32028
+ "runId" : {
32029
+ "nullable" : true,
32030
+ "type" : "string"
32031
+ },
32032
+ "routing" : {
30928
32033
  "allOf" : [ {
30929
- "$ref" : "#/components/schemas/MemberRef"
32034
+ "$ref" : "#/components/schemas/ExternalEventRouting"
30930
32035
  } ],
30931
32036
  "nullable" : true
30932
32037
  },
30933
- "priority" : {
30934
- "$ref" : "#/components/schemas/TicketPriority"
32038
+ "lastError" : {
32039
+ "nullable" : true,
32040
+ "type" : "string"
30935
32041
  },
30936
- "startMode" : {
30937
- "$ref" : "#/components/schemas/TicketStartMode"
32042
+ "replyUrl" : {
32043
+ "nullable" : true,
32044
+ "type" : "string"
32045
+ }
32046
+ },
32047
+ "required" : [ "agentId", "agentName", "author", "botAccountId", "id", "lastError", "receivedAt", "ref", "replyUrl", "routing", "runId", "status", "targetTitle", "targetType", "taskId", "url" ],
32048
+ "type" : "object"
32049
+ },
32050
+ "ExternalEventStatus" : {
32051
+ "enum" : [ "received", "queued", "running", "replying", "done", "ignored", "no_automation", "expired", "dead", "dropped_overload" ],
32052
+ "type" : "string"
32053
+ },
32054
+ "ExternalEventRouting" : {
32055
+ "properties" : {
32056
+ "mode" : {
32057
+ "description" : "named — the first word was a callable agent; default — the whole text went to the default agent.",
32058
+ "enum" : [ "named", "default", "help" ],
32059
+ "type" : "string"
30938
32060
  },
30939
- "workspacePaths" : {
30940
- "description" : "Fichiers du workspace de la session à joindre comme artefacts",
32061
+ "agentName" : {
32062
+ "nullable" : true,
32063
+ "type" : "string"
32064
+ },
32065
+ "instruction" : {
32066
+ "type" : "string"
32067
+ }
32068
+ },
32069
+ "required" : [ "agentName", "instruction", "mode" ],
32070
+ "type" : "object"
32071
+ },
32072
+ "GitlabConnectionTestResult" : {
32073
+ "properties" : {
32074
+ "botAccountId" : {
32075
+ "type" : "string"
32076
+ },
32077
+ "username" : {
32078
+ "type" : "string"
32079
+ },
32080
+ "ok" : {
32081
+ "type" : "boolean"
32082
+ },
32083
+ "error" : {
32084
+ "nullable" : true,
32085
+ "type" : "string"
32086
+ }
32087
+ },
32088
+ "required" : [ "botAccountId", "error", "ok", "username" ],
32089
+ "type" : "object"
32090
+ },
32091
+ "GitlabRoutingTest" : {
32092
+ "additionalProperties" : false,
32093
+ "properties" : {
32094
+ "text" : {
32095
+ "maxLength" : 20000,
32096
+ "minLength" : 1,
32097
+ "type" : "string"
32098
+ }
32099
+ },
32100
+ "required" : [ "text" ],
32101
+ "type" : "object"
32102
+ },
32103
+ "GitlabRoutingTestResult" : {
32104
+ "description" : "What a comment would trigger, without running anything.",
32105
+ "properties" : {
32106
+ "outcome" : {
32107
+ "enum" : [ "routed", "help", "no_bot_mention", "no_automation" ],
32108
+ "type" : "string"
32109
+ },
32110
+ "botAccount" : {
32111
+ "$ref" : "#/components/schemas/GitlabRoutingTestResult_botAccount"
32112
+ },
32113
+ "agent" : {
32114
+ "$ref" : "#/components/schemas/GitlabRoutingTestResult_agent"
32115
+ },
32116
+ "routing" : {
32117
+ "allOf" : [ {
32118
+ "$ref" : "#/components/schemas/ExternalEventRouting"
32119
+ } ],
32120
+ "nullable" : true
32121
+ },
32122
+ "runAsUser" : {
32123
+ "$ref" : "#/components/schemas/GitlabRoutingTestResult_runAsUser"
32124
+ },
32125
+ "automations" : {
32126
+ "items" : {
32127
+ "$ref" : "#/components/schemas/GitlabRoutingTestResult_automations_inner"
32128
+ },
32129
+ "type" : "array"
32130
+ }
32131
+ },
32132
+ "required" : [ "agent", "automations", "botAccount", "outcome", "routing", "runAsUser" ],
32133
+ "type" : "object"
32134
+ },
32135
+ "GitlabBotAccountCreate" : {
32136
+ "additionalProperties" : false,
32137
+ "properties" : {
32138
+ "token" : {
32139
+ "description" : "A personal access token of the bot account (scope `api`). Checked against GitLab.",
32140
+ "maxLength" : 500,
32141
+ "minLength" : 8,
32142
+ "type" : "string"
32143
+ },
32144
+ "defaultAgentId" : {
32145
+ "nullable" : true,
32146
+ "type" : "string"
32147
+ },
32148
+ "callableAgentIds" : {
32149
+ "items" : {
32150
+ "type" : "string"
32151
+ },
32152
+ "nullable" : true,
32153
+ "type" : "array"
32154
+ },
32155
+ "runAsUserId" : {
32156
+ "type" : "string"
32157
+ }
32158
+ },
32159
+ "required" : [ "runAsUserId", "token" ],
32160
+ "type" : "object"
32161
+ },
32162
+ "GitlabBotAccountUpdate" : {
32163
+ "additionalProperties" : false,
32164
+ "properties" : {
32165
+ "token" : {
32166
+ "maxLength" : 500,
32167
+ "minLength" : 8,
32168
+ "type" : "string"
32169
+ },
32170
+ "defaultAgentId" : {
32171
+ "nullable" : true,
32172
+ "type" : "string"
32173
+ },
32174
+ "callableAgentIds" : {
30941
32175
  "items" : {
30942
32176
  "type" : "string"
30943
32177
  },
32178
+ "nullable" : true,
30944
32179
  "type" : "array"
32180
+ },
32181
+ "runAsUserId" : {
32182
+ "type" : "string"
32183
+ },
32184
+ "status" : {
32185
+ "enum" : [ "active", "disabled" ],
32186
+ "type" : "string"
30945
32187
  }
30946
32188
  },
30947
- "required" : [ "assignees", "description", "priority", "reviewer", "startMode", "title", "workspacePaths" ],
32189
+ "type" : "object"
32190
+ },
32191
+ "GitlabBotAccountSummary" : {
32192
+ "description" : "A bot account as members see it, to pick one in an automation. No secret.",
32193
+ "properties" : {
32194
+ "id" : {
32195
+ "type" : "string"
32196
+ },
32197
+ "username" : {
32198
+ "type" : "string"
32199
+ },
32200
+ "integrationId" : {
32201
+ "type" : "string"
32202
+ },
32203
+ "integrationName" : {
32204
+ "type" : "string"
32205
+ },
32206
+ "defaultAgentId" : {
32207
+ "nullable" : true,
32208
+ "type" : "string"
32209
+ },
32210
+ "callableAgentIds" : {
32211
+ "items" : {
32212
+ "type" : "string"
32213
+ },
32214
+ "nullable" : true,
32215
+ "type" : "array"
32216
+ },
32217
+ "status" : {
32218
+ "enum" : [ "active", "token_invalid", "disabled" ],
32219
+ "type" : "string"
32220
+ }
32221
+ },
32222
+ "required" : [ "callableAgentIds", "defaultAgentId", "id", "integrationId", "integrationName", "status", "username" ],
30948
32223
  "type" : "object"
30949
32224
  },
30950
32225
  "InboxTab" : {
@@ -32644,6 +33919,33 @@
32644
33919
  "required" : [ "date", "type" ],
32645
33920
  "type" : "object"
32646
33921
  },
33922
+ "TaskTrigger_reply" : {
33923
+ "properties" : {
33924
+ "thread" : {
33925
+ "description" : "Post the agent answer in the GitLab thread.",
33926
+ "type" : "boolean"
33927
+ },
33928
+ "ack" : {
33929
+ "description" : "React with \"eyes\" as soon as the mention is taken.",
33930
+ "type" : "boolean"
33931
+ }
33932
+ },
33933
+ "required" : [ "ack", "thread" ],
33934
+ "type" : "object"
33935
+ },
33936
+ "ScheduledTaskRunTrigger_author" : {
33937
+ "properties" : {
33938
+ "username" : {
33939
+ "type" : "string"
33940
+ },
33941
+ "name" : {
33942
+ "nullable" : true,
33943
+ "type" : "string"
33944
+ }
33945
+ },
33946
+ "required" : [ "name", "username" ],
33947
+ "type" : "object"
33948
+ },
32647
33949
  "AppCreateRequest_ephemeralInstances" : {
32648
33950
  "additionalProperties" : false,
32649
33951
  "properties" : {
@@ -33504,6 +34806,14 @@
33504
34806
  "type" : "string"
33505
34807
  },
33506
34808
  "type" : "array"
34809
+ },
34810
+ "approvalModes" : {
34811
+ "additionalProperties" : {
34812
+ "enum" : [ "always", "never" ],
34813
+ "type" : "string"
34814
+ },
34815
+ "description" : "Quand un appel de l'outil demande l'approbation de l'utilisateur, par nom d'outil. Absent : automatique — demandée sauf si le serveur déclare l'outil en lecture seule (readOnlyHint). always : toujours demander, et refuser l'appel quand personne ne peut répondre (tâche planifiée, widget, appel entre agents). never : ne jamais demander.",
34816
+ "type" : "object"
33507
34817
  }
33508
34818
  },
33509
34819
  "type" : "object"
@@ -33778,6 +35088,59 @@
33778
35088
  "required" : [ "connected", "id", "name", "ownedByMe" ],
33779
35089
  "type" : "object"
33780
35090
  },
35091
+ "GitlabRoutingTestResult_botAccount" : {
35092
+ "nullable" : true,
35093
+ "properties" : {
35094
+ "id" : {
35095
+ "type" : "string"
35096
+ },
35097
+ "username" : {
35098
+ "type" : "string"
35099
+ }
35100
+ },
35101
+ "required" : [ "id", "username" ],
35102
+ "type" : "object"
35103
+ },
35104
+ "GitlabRoutingTestResult_agent" : {
35105
+ "nullable" : true,
35106
+ "properties" : {
35107
+ "id" : {
35108
+ "type" : "string"
35109
+ },
35110
+ "name" : {
35111
+ "type" : "string"
35112
+ }
35113
+ },
35114
+ "required" : [ "id", "name" ],
35115
+ "type" : "object"
35116
+ },
35117
+ "GitlabRoutingTestResult_runAsUser" : {
35118
+ "nullable" : true,
35119
+ "properties" : {
35120
+ "id" : {
35121
+ "type" : "string"
35122
+ },
35123
+ "name" : {
35124
+ "nullable" : true,
35125
+ "type" : "string"
35126
+ }
35127
+ },
35128
+ "required" : [ "id", "name" ],
35129
+ "type" : "object"
35130
+ },
35131
+ "GitlabRoutingTestResult_automations_inner" : {
35132
+ "properties" : {
35133
+ "id" : {
35134
+ "type" : "string"
35135
+ },
35136
+ "name" : {
35137
+ "nullable" : true,
35138
+ "type" : "string"
35139
+ }
35140
+ },
35141
+ "required" : [ "id", "name" ],
35142
+ "type" : "object"
35143
+ },
33781
35144
  "InboxItem_project" : {
33782
35145
  "nullable" : true,
33783
35146
  "properties" : {