@breign/client 1.0.173 → 1.0.175

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/openapi.json CHANGED
@@ -4157,6 +4157,58 @@
4157
4157
  "tags" : [ "app" ]
4158
4158
  }
4159
4159
  },
4160
+ "/apps/{appId}/instances/{instanceId}/token" : {
4161
+ "post" : {
4162
+ "description" : "Issue a new token for an ephemeral instance, authenticated either by the instance's own still-valid token or by a user with access to the app. The previous token is revoked. An active instance is simply extended; an inactive one is reactivated (status back to IDLE) only if the app's maximum number of active instances is not reached.\n",
4163
+ "operationId" : "refreshInstanceToken",
4164
+ "parameters" : [ {
4165
+ "description" : "ID of the app",
4166
+ "in" : "path",
4167
+ "name" : "appId",
4168
+ "required" : true,
4169
+ "schema" : {
4170
+ "type" : "string"
4171
+ }
4172
+ }, {
4173
+ "description" : "Instance identifier",
4174
+ "in" : "path",
4175
+ "name" : "instanceId",
4176
+ "required" : true,
4177
+ "schema" : {
4178
+ "type" : "string"
4179
+ }
4180
+ } ],
4181
+ "responses" : {
4182
+ "200" : {
4183
+ "content" : {
4184
+ "application/json" : {
4185
+ "schema" : {
4186
+ "$ref" : "#/components/schemas/EphemeralInstanceToken"
4187
+ }
4188
+ }
4189
+ },
4190
+ "description" : "Token refreshed"
4191
+ },
4192
+ "400" : {
4193
+ "description" : "Maximum number of active instances reached (MAX_INSTANCES_REACHED)"
4194
+ },
4195
+ "401" : {
4196
+ "description" : "Unauthorized"
4197
+ },
4198
+ "403" : {
4199
+ "description" : "Forbidden - no access to this instance, or ephemeral instances not allowed for this app"
4200
+ },
4201
+ "404" : {
4202
+ "description" : "App or ephemeral instance not found"
4203
+ },
4204
+ "409" : {
4205
+ "description" : "Instance changed during the refresh (e.g. deactivated concurrently), retry (INSTANCE_CHANGED)"
4206
+ }
4207
+ },
4208
+ "summary" : "Refresh ephemeral instance token",
4209
+ "tags" : [ "app" ]
4210
+ }
4211
+ },
4160
4212
  "/instances/{instanceId}/context" : {
4161
4213
  "get" : {
4162
4214
  "description" : "Returns the custom context variables for an app instance.",
@@ -18258,6 +18310,247 @@
18258
18310
  "tags" : [ "execution-nodes" ]
18259
18311
  }
18260
18312
  },
18313
+ "/execution-nodes/{nodeId}/organizations/{organizationId}" : {
18314
+ "delete" : {
18315
+ "description" : "Retire le nœud de l'organisation : les agents de l'organisation qui y tournaient repassent sur le serveur Breign, et leurs tours ouverts sur ce nœud sont clos (`node_dissociated`) et annulés sur le poste. Les autres organisations du nœud ne sont pas touchées.",
18316
+ "operationId" : "dissociateExecutionNode",
18317
+ "parameters" : [ {
18318
+ "description" : "ID of the Breign Mate execution node",
18319
+ "in" : "path",
18320
+ "name" : "nodeId",
18321
+ "required" : true,
18322
+ "schema" : {
18323
+ "format" : "uuid",
18324
+ "type" : "string"
18325
+ }
18326
+ }, {
18327
+ "description" : "ID of the organization",
18328
+ "in" : "path",
18329
+ "name" : "organizationId",
18330
+ "required" : true,
18331
+ "schema" : {
18332
+ "type" : "string"
18333
+ }
18334
+ } ],
18335
+ "responses" : {
18336
+ "204" : {
18337
+ "description" : "Dissociated"
18338
+ },
18339
+ "401" : {
18340
+ "description" : "Unauthenticated"
18341
+ },
18342
+ "404" : {
18343
+ "description" : "Not found — or not a node of the caller"
18344
+ }
18345
+ },
18346
+ "summary" : "Dissociate my execution node from an organization",
18347
+ "tags" : [ "execution-nodes" ]
18348
+ },
18349
+ "put" : {
18350
+ "description" : "Associe le nœud à l'organisation, depuis Breign Mate : ses agents pourront y tourner. Réservé au propriétaire du nœud, membre de l'organisation — ou admin, selon le réglage de l'organisation. Sans effet sur une association déjà posée.",
18351
+ "operationId" : "associateExecutionNode",
18352
+ "parameters" : [ {
18353
+ "description" : "ID of the Breign Mate execution node",
18354
+ "in" : "path",
18355
+ "name" : "nodeId",
18356
+ "required" : true,
18357
+ "schema" : {
18358
+ "format" : "uuid",
18359
+ "type" : "string"
18360
+ }
18361
+ }, {
18362
+ "description" : "ID of the organization",
18363
+ "in" : "path",
18364
+ "name" : "organizationId",
18365
+ "required" : true,
18366
+ "schema" : {
18367
+ "type" : "string"
18368
+ }
18369
+ } ],
18370
+ "responses" : {
18371
+ "200" : {
18372
+ "content" : {
18373
+ "application/json" : {
18374
+ "schema" : {
18375
+ "$ref" : "#/components/schemas/ExecutionNodeOrganization"
18376
+ }
18377
+ }
18378
+ },
18379
+ "description" : "OK"
18380
+ },
18381
+ "401" : {
18382
+ "description" : "Unauthenticated"
18383
+ },
18384
+ "403" : {
18385
+ "description" : "Pas membre de l'organisation, ou réglage de l'organisation : NODE_ASSOCIATION_ADMINS_ONLY (réservé aux admins), NODE_ASSOCIATION_DISABLED (plus aucun nouveau nœud)."
18386
+ },
18387
+ "404" : {
18388
+ "description" : "Not found — or not a node of the caller"
18389
+ }
18390
+ },
18391
+ "summary" : "Associate my execution node with an organization",
18392
+ "tags" : [ "execution-nodes" ]
18393
+ }
18394
+ },
18395
+ "/organizations/{organizationId}/execution-nodes" : {
18396
+ "get" : {
18397
+ "description" : "Les nœuds Breign Mate associés à l'organisation, avec leur propriétaire, qui les a associés et les agents de l'organisation qui y tournent. Réservé aux admins de l'organisation.",
18398
+ "operationId" : "listOrganizationExecutionNodes",
18399
+ "parameters" : [ {
18400
+ "description" : "ID of the organization",
18401
+ "in" : "path",
18402
+ "name" : "organizationId",
18403
+ "required" : true,
18404
+ "schema" : {
18405
+ "type" : "string"
18406
+ }
18407
+ } ],
18408
+ "responses" : {
18409
+ "200" : {
18410
+ "content" : {
18411
+ "application/json" : {
18412
+ "schema" : {
18413
+ "items" : {
18414
+ "$ref" : "#/components/schemas/OrganizationExecutionNode"
18415
+ },
18416
+ "type" : "array"
18417
+ }
18418
+ }
18419
+ },
18420
+ "description" : "OK"
18421
+ },
18422
+ "401" : {
18423
+ "description" : "Unauthenticated"
18424
+ },
18425
+ "403" : {
18426
+ "description" : "Not an admin of the organization"
18427
+ }
18428
+ },
18429
+ "summary" : "List the execution nodes of an organization",
18430
+ "tags" : [ "execution-nodes" ]
18431
+ }
18432
+ },
18433
+ "/organizations/{organizationId}/execution-nodes/{nodeId}" : {
18434
+ "delete" : {
18435
+ "description" : "Retire le nœud de l'organisation : les agents de l'organisation qui y tournaient repassent sur le serveur Breign, et leurs tours ouverts sur ce nœud sont clos (`node_dissociated`) et annulés sur le poste. Le nœud reste associé à ses autres organisations. Réservé aux admins de l'organisation.",
18436
+ "operationId" : "removeOrganizationExecutionNode",
18437
+ "parameters" : [ {
18438
+ "description" : "ID of the organization",
18439
+ "in" : "path",
18440
+ "name" : "organizationId",
18441
+ "required" : true,
18442
+ "schema" : {
18443
+ "type" : "string"
18444
+ }
18445
+ }, {
18446
+ "description" : "ID of the Breign Mate execution node",
18447
+ "in" : "path",
18448
+ "name" : "nodeId",
18449
+ "required" : true,
18450
+ "schema" : {
18451
+ "format" : "uuid",
18452
+ "type" : "string"
18453
+ }
18454
+ } ],
18455
+ "responses" : {
18456
+ "204" : {
18457
+ "description" : "Removed"
18458
+ },
18459
+ "401" : {
18460
+ "description" : "Unauthenticated"
18461
+ },
18462
+ "403" : {
18463
+ "description" : "Not an admin of the organization"
18464
+ },
18465
+ "404" : {
18466
+ "description" : "Not associated with the organization"
18467
+ }
18468
+ },
18469
+ "summary" : "Remove an execution node from an organization",
18470
+ "tags" : [ "execution-nodes" ]
18471
+ }
18472
+ },
18473
+ "/organizations/{organizationId}/execution-node-settings" : {
18474
+ "get" : {
18475
+ "description" : "Qui peut associer un nœud à l'organisation. Réservé aux admins de l'organisation.",
18476
+ "operationId" : "getOrganizationExecutionNodeSettings",
18477
+ "parameters" : [ {
18478
+ "description" : "ID of the organization",
18479
+ "in" : "path",
18480
+ "name" : "organizationId",
18481
+ "required" : true,
18482
+ "schema" : {
18483
+ "type" : "string"
18484
+ }
18485
+ } ],
18486
+ "responses" : {
18487
+ "200" : {
18488
+ "content" : {
18489
+ "application/json" : {
18490
+ "schema" : {
18491
+ "$ref" : "#/components/schemas/ExecutionNodeSettings"
18492
+ }
18493
+ }
18494
+ },
18495
+ "description" : "OK"
18496
+ },
18497
+ "401" : {
18498
+ "description" : "Unauthenticated"
18499
+ },
18500
+ "403" : {
18501
+ "description" : "Not an admin of the organization"
18502
+ }
18503
+ },
18504
+ "summary" : "Get the execution node settings of an organization",
18505
+ "tags" : [ "execution-nodes" ]
18506
+ },
18507
+ "put" : {
18508
+ "description" : "Change qui peut associer un nœud à l'organisation. Réservé aux admins de l'organisation.",
18509
+ "operationId" : "updateOrganizationExecutionNodeSettings",
18510
+ "parameters" : [ {
18511
+ "description" : "ID of the organization",
18512
+ "in" : "path",
18513
+ "name" : "organizationId",
18514
+ "required" : true,
18515
+ "schema" : {
18516
+ "type" : "string"
18517
+ }
18518
+ } ],
18519
+ "requestBody" : {
18520
+ "content" : {
18521
+ "application/json" : {
18522
+ "schema" : {
18523
+ "$ref" : "#/components/schemas/ExecutionNodeSettings"
18524
+ }
18525
+ }
18526
+ },
18527
+ "required" : true
18528
+ },
18529
+ "responses" : {
18530
+ "200" : {
18531
+ "content" : {
18532
+ "application/json" : {
18533
+ "schema" : {
18534
+ "$ref" : "#/components/schemas/ExecutionNodeSettings"
18535
+ }
18536
+ }
18537
+ },
18538
+ "description" : "OK"
18539
+ },
18540
+ "400" : {
18541
+ "description" : "Unknown policy"
18542
+ },
18543
+ "401" : {
18544
+ "description" : "Unauthenticated"
18545
+ },
18546
+ "403" : {
18547
+ "description" : "Not an admin of the organization"
18548
+ }
18549
+ },
18550
+ "summary" : "Update the execution node settings of an organization",
18551
+ "tags" : [ "execution-nodes" ]
18552
+ }
18553
+ },
18261
18554
  "/execution-nodes/{nodeId}/sessions/{sessionId}" : {
18262
18555
  "get" : {
18263
18556
  "operationId" : "getExecutionNodeSession",
@@ -23221,6 +23514,19 @@
23221
23514
  "required" : [ "message" ],
23222
23515
  "type" : "object"
23223
23516
  },
23517
+ "EphemeralInstanceToken" : {
23518
+ "allOf" : [ {
23519
+ "$ref" : "#/components/schemas/EphemeralInstance"
23520
+ }, {
23521
+ "properties" : {
23522
+ "expiresAt" : {
23523
+ "type" : "string"
23524
+ }
23525
+ },
23526
+ "required" : [ "expiresAt" ],
23527
+ "type" : "object"
23528
+ } ]
23529
+ },
23224
23530
  "InstanceContext" : {
23225
23531
  "additionalProperties" : false,
23226
23532
  "properties" : {
@@ -29783,6 +30089,13 @@
29783
30089
  "createdAt" : {
29784
30090
  "type" : "string"
29785
30091
  },
30092
+ "organizations" : {
30093
+ "description" : "Les organisations auxquelles le nœud est associé, par date d'association.",
30094
+ "items" : {
30095
+ "$ref" : "#/components/schemas/ExecutionNodeOrganization"
30096
+ },
30097
+ "type" : "array"
30098
+ },
29786
30099
  "agents" : {
29787
30100
  "items" : {
29788
30101
  "$ref" : "#/components/schemas/ExecutionNodeAgent"
@@ -29790,7 +30103,7 @@
29790
30103
  "type" : "array"
29791
30104
  }
29792
30105
  },
29793
- "required" : [ "appVersion", "connected", "createdAt", "id", "lastSeenAt", "name", "os", "revokedAt", "runtimes", "workspaces" ],
30106
+ "required" : [ "appVersion", "connected", "createdAt", "id", "lastSeenAt", "name", "organizations", "os", "revokedAt", "runtimes", "workspaces" ],
29794
30107
  "type" : "object"
29795
30108
  },
29796
30109
  "ExecutionNodeRuntime" : {
@@ -29819,6 +30132,24 @@
29819
30132
  "required" : [ "alias", "label" ],
29820
30133
  "type" : "object"
29821
30134
  },
30135
+ "ExecutionNodeOrganization" : {
30136
+ "description" : "Une organisation à laquelle le nœud est associé : seuls les agents de ces organisations peuvent y tourner. Le propriétaire associe son nœud depuis Breign Mate, organisation par organisation.",
30137
+ "properties" : {
30138
+ "organizationId" : {
30139
+ "type" : "string"
30140
+ },
30141
+ "organizationName" : {
30142
+ "description" : "Nom de l'organisation, résolu par l'API. Null pour une organisation supprimée.",
30143
+ "nullable" : true,
30144
+ "type" : "string"
30145
+ },
30146
+ "associatedAt" : {
30147
+ "type" : "string"
30148
+ }
30149
+ },
30150
+ "required" : [ "associatedAt", "organizationId", "organizationName" ],
30151
+ "type" : "object"
30152
+ },
29822
30153
  "ExecutionNodeAgent" : {
29823
30154
  "description" : "Un agent rattaché au nœud, avec le runtime et le dossier où il tourne.",
29824
30155
  "properties" : {
@@ -29901,7 +30232,7 @@
29901
30232
  "$ref" : "#/components/schemas/NodeSessionState"
29902
30233
  },
29903
30234
  "reason" : {
29904
- "description" : "Motif d'un tour interrompu ou en échec : cancelled, host_restart, unpaired, runtime_missing, runtime_failed, workdir_refused, invalid_task, node_unreachable, lost_on_node…",
30235
+ "description" : "Motif d'un tour interrompu ou en échec : cancelled, host_restart, unpaired, runtime_missing, runtime_failed, workdir_refused, invalid_task, node_unreachable, lost_on_node, node_dissociated (nœud retiré de l'organisation du tour)…",
29905
30236
  "nullable" : true,
29906
30237
  "type" : "string"
29907
30238
  },
@@ -29983,6 +30314,94 @@
29983
30314
  "required" : [ "label" ],
29984
30315
  "type" : "object"
29985
30316
  },
30317
+ "OrganizationExecutionNode" : {
30318
+ "description" : "Un nœud associé à l'organisation, vu par ses admins.",
30319
+ "properties" : {
30320
+ "id" : {
30321
+ "format" : "uuid",
30322
+ "type" : "string"
30323
+ },
30324
+ "name" : {
30325
+ "type" : "string"
30326
+ },
30327
+ "os" : {
30328
+ "enum" : [ "macos", "windows", "linux" ],
30329
+ "type" : "string"
30330
+ },
30331
+ "appVersion" : {
30332
+ "type" : "string"
30333
+ },
30334
+ "connected" : {
30335
+ "type" : "boolean"
30336
+ },
30337
+ "lastSeenAt" : {
30338
+ "nullable" : true,
30339
+ "type" : "string"
30340
+ },
30341
+ "owner" : {
30342
+ "$ref" : "#/components/schemas/OrganizationExecutionNodeUser"
30343
+ },
30344
+ "associatedBy" : {
30345
+ "$ref" : "#/components/schemas/OrganizationExecutionNodeUser"
30346
+ },
30347
+ "associatedAt" : {
30348
+ "type" : "string"
30349
+ },
30350
+ "agents" : {
30351
+ "description" : "Les agents de cette organisation rattachés au nœud ; ceux des autres n'y figurent pas.",
30352
+ "items" : {
30353
+ "$ref" : "#/components/schemas/OrganizationExecutionNodeAgent"
30354
+ },
30355
+ "type" : "array"
30356
+ }
30357
+ },
30358
+ "required" : [ "agents", "appVersion", "associatedAt", "associatedBy", "connected", "id", "lastSeenAt", "name", "os", "owner" ],
30359
+ "type" : "object"
30360
+ },
30361
+ "OrganizationExecutionNodeUser" : {
30362
+ "properties" : {
30363
+ "id" : {
30364
+ "type" : "string"
30365
+ },
30366
+ "email" : {
30367
+ "nullable" : true,
30368
+ "type" : "string"
30369
+ }
30370
+ },
30371
+ "required" : [ "email", "id" ],
30372
+ "type" : "object"
30373
+ },
30374
+ "OrganizationExecutionNodeAgent" : {
30375
+ "properties" : {
30376
+ "agentId" : {
30377
+ "type" : "string"
30378
+ },
30379
+ "agentName" : {
30380
+ "nullable" : true,
30381
+ "type" : "string"
30382
+ },
30383
+ "runtime" : {
30384
+ "enum" : [ "claude", "opencode" ],
30385
+ "type" : "string"
30386
+ }
30387
+ },
30388
+ "required" : [ "agentId", "agentName", "runtime" ],
30389
+ "type" : "object"
30390
+ },
30391
+ "ExecutionNodeSettings" : {
30392
+ "properties" : {
30393
+ "associationPolicy" : {
30394
+ "$ref" : "#/components/schemas/NodeAssociationPolicy"
30395
+ }
30396
+ },
30397
+ "required" : [ "associationPolicy" ],
30398
+ "type" : "object"
30399
+ },
30400
+ "NodeAssociationPolicy" : {
30401
+ "description" : "Qui peut associer un nœud à l'organisation : tous ses membres, ses admins seulement, ou personne. Les nœuds déjà associés ne sont pas touchés par un changement.",
30402
+ "enum" : [ "members", "admins", "none" ],
30403
+ "type" : "string"
30404
+ },
29986
30405
  "NodeSessionDetail" : {
29987
30406
  "allOf" : [ {
29988
30407
  "$ref" : "#/components/schemas/NodeSession"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@breign/client",
3
- "version": "1.0.173",
3
+ "version": "1.0.175",
4
4
  "main": "dist/index.js",
5
5
  "exports": {
6
6
  ".": "./dist/index.js",