@leaflow/sdk 0.193.0 → 0.194.0

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 (205) hide show
  1. package/dist/fleet/v1/generated/functions.d.ts +49 -7
  2. package/dist/fleet/v1/generated/functions.js +46 -3
  3. package/dist/fleet/v1/generated/models.d.ts +21 -8
  4. package/dist/fleet/v1/generated/schemas.zod.d.ts +43 -6
  5. package/dist/fleet/v1/generated/schemas.zod.js +52 -6
  6. package/dist/fleet/v1/generated/validators/accountList.zod.d.ts +6 -3
  7. package/dist/fleet/v1/generated/validators/accountList.zod.js +6 -3
  8. package/dist/fleet/v1/generated/validators/accountResource.zod.d.ts +6 -3
  9. package/dist/fleet/v1/generated/validators/accountResource.zod.js +6 -3
  10. package/dist/fleet/v1/generated/validators/approveEnrollmentRequest.zod.d.ts +6 -3
  11. package/dist/fleet/v1/generated/validators/approveEnrollmentRequest.zod.js +6 -3
  12. package/dist/fleet/v1/generated/validators/callMcpToolRequest.zod.d.ts +6 -3
  13. package/dist/fleet/v1/generated/validators/callMcpToolRequest.zod.js +6 -3
  14. package/dist/fleet/v1/generated/validators/callMcpToolResponse.zod.d.ts +6 -3
  15. package/dist/fleet/v1/generated/validators/callMcpToolResponse.zod.js +6 -3
  16. package/dist/fleet/v1/generated/validators/createGroupMemberRequest.zod.d.ts +6 -3
  17. package/dist/fleet/v1/generated/validators/createGroupMemberRequest.zod.js +6 -3
  18. package/dist/fleet/v1/generated/validators/createGroupRequest.zod.d.ts +6 -3
  19. package/dist/fleet/v1/generated/validators/createGroupRequest.zod.js +6 -3
  20. package/dist/fleet/v1/generated/validators/createMachineRegistrationRequest.zod.d.ts +6 -3
  21. package/dist/fleet/v1/generated/validators/createMachineRegistrationRequest.zod.js +6 -3
  22. package/dist/fleet/v1/generated/validators/createMachineRegistrationResponse.zod.d.ts +6 -3
  23. package/dist/fleet/v1/generated/validators/createMachineRegistrationResponse.zod.js +6 -3
  24. package/dist/fleet/v1/generated/validators/createParticipantRequest.zod.d.ts +6 -3
  25. package/dist/fleet/v1/generated/validators/createParticipantRequest.zod.js +6 -3
  26. package/dist/fleet/v1/generated/validators/createParticipantResponse.zod.d.ts +7 -3
  27. package/dist/fleet/v1/generated/validators/createParticipantResponse.zod.js +6 -3
  28. package/dist/fleet/v1/generated/validators/createPeerConnectionCandidatesRequest.zod.d.ts +6 -3
  29. package/dist/fleet/v1/generated/validators/createPeerConnectionCandidatesRequest.zod.js +6 -3
  30. package/dist/fleet/v1/generated/validators/createPeerConnectionRequest.zod.d.ts +6 -3
  31. package/dist/fleet/v1/generated/validators/createPeerConnectionRequest.zod.js +6 -3
  32. package/dist/fleet/v1/generated/validators/createSessionRequest.zod.d.ts +6 -3
  33. package/dist/fleet/v1/generated/validators/createSessionRequest.zod.js +6 -3
  34. package/dist/fleet/v1/generated/validators/cursorPagination.zod.d.ts +6 -3
  35. package/dist/fleet/v1/generated/validators/cursorPagination.zod.js +6 -3
  36. package/dist/fleet/v1/generated/validators/deleteMcpServerParams.zod.d.ts +6 -3
  37. package/dist/fleet/v1/generated/validators/deleteMcpServerParams.zod.js +6 -3
  38. package/dist/fleet/v1/generated/validators/denyPrivilegeRequestRequest.zod.d.ts +6 -3
  39. package/dist/fleet/v1/generated/validators/denyPrivilegeRequestRequest.zod.js +6 -3
  40. package/dist/fleet/v1/generated/validators/desktopOptions.zod.d.ts +6 -3
  41. package/dist/fleet/v1/generated/validators/desktopOptions.zod.js +6 -3
  42. package/dist/fleet/v1/generated/validators/desktopState.zod.d.ts +6 -3
  43. package/dist/fleet/v1/generated/validators/desktopState.zod.js +6 -3
  44. package/dist/fleet/v1/generated/validators/directoryName.zod.d.ts +6 -3
  45. package/dist/fleet/v1/generated/validators/directoryName.zod.js +6 -3
  46. package/dist/fleet/v1/generated/validators/enrollmentResource.zod.d.ts +6 -3
  47. package/dist/fleet/v1/generated/validators/enrollmentResource.zod.js +6 -3
  48. package/dist/fleet/v1/generated/validators/enrollmentState.zod.d.ts +6 -3
  49. package/dist/fleet/v1/generated/validators/enrollmentState.zod.js +6 -3
  50. package/dist/fleet/v1/generated/validators/error.zod.d.ts +6 -3
  51. package/dist/fleet/v1/generated/validators/error.zod.js +6 -3
  52. package/dist/fleet/v1/generated/validators/errorStatus.zod.d.ts +6 -3
  53. package/dist/fleet/v1/generated/validators/errorStatus.zod.js +6 -3
  54. package/dist/fleet/v1/generated/validators/featureState.zod.d.ts +6 -3
  55. package/dist/fleet/v1/generated/validators/featureState.zod.js +6 -3
  56. package/dist/fleet/v1/generated/validators/fieldViolation.zod.d.ts +6 -3
  57. package/dist/fleet/v1/generated/validators/fieldViolation.zod.js +6 -3
  58. package/dist/fleet/v1/generated/validators/findEnrollmentByPairingCodeParams.zod.d.ts +6 -3
  59. package/dist/fleet/v1/generated/validators/findEnrollmentByPairingCodeParams.zod.js +6 -3
  60. package/dist/fleet/v1/generated/validators/findEnrollmentResponse.zod.d.ts +6 -3
  61. package/dist/fleet/v1/generated/validators/findEnrollmentResponse.zod.js +6 -3
  62. package/dist/fleet/v1/generated/validators/getPeerConnectionParams.zod.d.ts +248 -0
  63. package/dist/fleet/v1/generated/validators/getPeerConnectionParams.zod.js +250 -0
  64. package/dist/fleet/v1/generated/validators/groupList.zod.d.ts +6 -3
  65. package/dist/fleet/v1/generated/validators/groupList.zod.js +6 -3
  66. package/dist/fleet/v1/generated/validators/groupResource.zod.d.ts +6 -3
  67. package/dist/fleet/v1/generated/validators/groupResource.zod.js +6 -3
  68. package/dist/fleet/v1/generated/validators/iceCandidate.zod.d.ts +6 -3
  69. package/dist/fleet/v1/generated/validators/iceCandidate.zod.js +6 -3
  70. package/dist/fleet/v1/generated/validators/iceServer.zod.d.ts +6 -3
  71. package/dist/fleet/v1/generated/validators/iceServer.zod.js +6 -3
  72. package/dist/fleet/v1/generated/validators/listAccountsParams.zod.d.ts +6 -3
  73. package/dist/fleet/v1/generated/validators/listAccountsParams.zod.js +6 -3
  74. package/dist/fleet/v1/generated/validators/listGroupMembersParams.zod.d.ts +6 -3
  75. package/dist/fleet/v1/generated/validators/listGroupMembersParams.zod.js +6 -3
  76. package/dist/fleet/v1/generated/validators/listGroupsParams.zod.d.ts +6 -3
  77. package/dist/fleet/v1/generated/validators/listGroupsParams.zod.js +6 -3
  78. package/dist/fleet/v1/generated/validators/listMachineEventsParams.zod.d.ts +6 -3
  79. package/dist/fleet/v1/generated/validators/listMachineEventsParams.zod.js +6 -3
  80. package/dist/fleet/v1/generated/validators/listMachineRegistrationsParams.zod.d.ts +6 -3
  81. package/dist/fleet/v1/generated/validators/listMachineRegistrationsParams.zod.js +6 -3
  82. package/dist/fleet/v1/generated/validators/listMachinesParams.zod.d.ts +6 -3
  83. package/dist/fleet/v1/generated/validators/listMachinesParams.zod.js +6 -3
  84. package/dist/fleet/v1/generated/validators/listMcpToolsParams.zod.d.ts +6 -3
  85. package/dist/fleet/v1/generated/validators/listMcpToolsParams.zod.js +6 -3
  86. package/dist/fleet/v1/generated/validators/listPrivilegeAutoApprovalsParams.zod.d.ts +6 -3
  87. package/dist/fleet/v1/generated/validators/listPrivilegeAutoApprovalsParams.zod.js +6 -3
  88. package/dist/fleet/v1/generated/validators/listPrivilegeRequestsParams.zod.d.ts +6 -3
  89. package/dist/fleet/v1/generated/validators/listPrivilegeRequestsParams.zod.js +6 -3
  90. package/dist/fleet/v1/generated/validators/listSessionsParams.zod.d.ts +6 -3
  91. package/dist/fleet/v1/generated/validators/listSessionsParams.zod.js +6 -3
  92. package/dist/fleet/v1/generated/validators/machineEventList.zod.d.ts +6 -3
  93. package/dist/fleet/v1/generated/validators/machineEventList.zod.js +6 -3
  94. package/dist/fleet/v1/generated/validators/machineEventResource.zod.d.ts +6 -3
  95. package/dist/fleet/v1/generated/validators/machineEventResource.zod.js +6 -3
  96. package/dist/fleet/v1/generated/validators/machineEventType.zod.d.ts +6 -3
  97. package/dist/fleet/v1/generated/validators/machineEventType.zod.js +6 -3
  98. package/dist/fleet/v1/generated/validators/machineFeature.zod.d.ts +6 -3
  99. package/dist/fleet/v1/generated/validators/machineFeature.zod.js +6 -3
  100. package/dist/fleet/v1/generated/validators/machineList.zod.d.ts +6 -3
  101. package/dist/fleet/v1/generated/validators/machineList.zod.js +6 -3
  102. package/dist/fleet/v1/generated/validators/machineRegistrationList.zod.d.ts +6 -3
  103. package/dist/fleet/v1/generated/validators/machineRegistrationList.zod.js +6 -3
  104. package/dist/fleet/v1/generated/validators/machineRegistrationResource.zod.d.ts +6 -3
  105. package/dist/fleet/v1/generated/validators/machineRegistrationResource.zod.js +6 -3
  106. package/dist/fleet/v1/generated/validators/machineRegistrationState.zod.d.ts +6 -3
  107. package/dist/fleet/v1/generated/validators/machineRegistrationState.zod.js +6 -3
  108. package/dist/fleet/v1/generated/validators/machineResource.zod.d.ts +6 -3
  109. package/dist/fleet/v1/generated/validators/machineResource.zod.js +6 -3
  110. package/dist/fleet/v1/generated/validators/mcpConfigurationFile.zod.d.ts +6 -3
  111. package/dist/fleet/v1/generated/validators/mcpConfigurationFile.zod.js +6 -3
  112. package/dist/fleet/v1/generated/validators/mcpConfigurationResource.zod.d.ts +6 -3
  113. package/dist/fleet/v1/generated/validators/mcpConfigurationResource.zod.js +6 -3
  114. package/dist/fleet/v1/generated/validators/mcpImplementation.zod.d.ts +6 -3
  115. package/dist/fleet/v1/generated/validators/mcpImplementation.zod.js +6 -3
  116. package/dist/fleet/v1/generated/validators/mcpServerFailure.zod.d.ts +6 -3
  117. package/dist/fleet/v1/generated/validators/mcpServerFailure.zod.js +6 -3
  118. package/dist/fleet/v1/generated/validators/mcpServerResource.zod.d.ts +6 -3
  119. package/dist/fleet/v1/generated/validators/mcpServerResource.zod.js +6 -3
  120. package/dist/fleet/v1/generated/validators/mcpToolList.zod.d.ts +6 -3
  121. package/dist/fleet/v1/generated/validators/mcpToolList.zod.js +6 -3
  122. package/dist/fleet/v1/generated/validators/mcpToolResource.zod.d.ts +6 -3
  123. package/dist/fleet/v1/generated/validators/mcpToolResource.zod.js +6 -3
  124. package/dist/fleet/v1/generated/validators/mcpTransport.zod.d.ts +6 -3
  125. package/dist/fleet/v1/generated/validators/mcpTransport.zod.js +6 -3
  126. package/dist/fleet/v1/generated/validators/mcpUnavailableServer.zod.d.ts +6 -3
  127. package/dist/fleet/v1/generated/validators/mcpUnavailableServer.zod.js +6 -3
  128. package/dist/fleet/v1/generated/validators/migrationStep.zod.d.ts +6 -3
  129. package/dist/fleet/v1/generated/validators/migrationStep.zod.js +6 -3
  130. package/dist/fleet/v1/generated/validators/namedIdentity.zod.d.ts +6 -3
  131. package/dist/fleet/v1/generated/validators/namedIdentity.zod.js +6 -3
  132. package/dist/fleet/v1/generated/validators/offsetPagination.zod.d.ts +6 -3
  133. package/dist/fleet/v1/generated/validators/offsetPagination.zod.js +6 -3
  134. package/dist/fleet/v1/generated/validators/operatingSystem.zod.d.ts +6 -3
  135. package/dist/fleet/v1/generated/validators/operatingSystem.zod.js +6 -3
  136. package/dist/fleet/v1/generated/validators/participantList.zod.d.ts +6 -3
  137. package/dist/fleet/v1/generated/validators/participantList.zod.js +6 -3
  138. package/dist/fleet/v1/generated/validators/participantResource.zod.d.ts +6 -3
  139. package/dist/fleet/v1/generated/validators/participantResource.zod.js +6 -3
  140. package/dist/fleet/v1/generated/validators/peerConnection.zod.d.ts +8 -3
  141. package/dist/fleet/v1/generated/validators/peerConnection.zod.js +12 -4
  142. package/dist/fleet/v1/generated/validators/privilegeAutoApprovalList.zod.d.ts +6 -3
  143. package/dist/fleet/v1/generated/validators/privilegeAutoApprovalList.zod.js +6 -3
  144. package/dist/fleet/v1/generated/validators/privilegeAutoApprovalMode.zod.d.ts +6 -3
  145. package/dist/fleet/v1/generated/validators/privilegeAutoApprovalMode.zod.js +6 -3
  146. package/dist/fleet/v1/generated/validators/privilegeAutoApprovalResource.zod.d.ts +6 -3
  147. package/dist/fleet/v1/generated/validators/privilegeAutoApprovalResource.zod.js +6 -3
  148. package/dist/fleet/v1/generated/validators/privilegeDecider.zod.d.ts +6 -3
  149. package/dist/fleet/v1/generated/validators/privilegeDecider.zod.js +6 -3
  150. package/dist/fleet/v1/generated/validators/privilegeRequestList.zod.d.ts +6 -3
  151. package/dist/fleet/v1/generated/validators/privilegeRequestList.zod.js +6 -3
  152. package/dist/fleet/v1/generated/validators/privilegeRequestResource.zod.d.ts +6 -3
  153. package/dist/fleet/v1/generated/validators/privilegeRequestResource.zod.js +6 -3
  154. package/dist/fleet/v1/generated/validators/privilegeRequestState.zod.d.ts +6 -3
  155. package/dist/fleet/v1/generated/validators/privilegeRequestState.zod.js +6 -3
  156. package/dist/fleet/v1/generated/validators/publicKey.zod.d.ts +6 -3
  157. package/dist/fleet/v1/generated/validators/publicKey.zod.js +6 -3
  158. package/dist/fleet/v1/generated/validators/renewParticipantRequest.zod.d.ts +6 -3
  159. package/dist/fleet/v1/generated/validators/renewParticipantRequest.zod.js +6 -3
  160. package/dist/fleet/v1/generated/validators/renewParticipantResponse.zod.d.ts +6 -3
  161. package/dist/fleet/v1/generated/validators/renewParticipantResponse.zod.js +6 -3
  162. package/dist/fleet/v1/generated/validators/replaceMcpConfigurationRequest.zod.d.ts +6 -3
  163. package/dist/fleet/v1/generated/validators/replaceMcpConfigurationRequest.zod.js +6 -3
  164. package/dist/fleet/v1/generated/validators/rtcConfiguration.zod.d.ts +6 -3
  165. package/dist/fleet/v1/generated/validators/rtcConfiguration.zod.js +6 -3
  166. package/dist/fleet/v1/generated/validators/runCommandRequest.zod.d.ts +6 -3
  167. package/dist/fleet/v1/generated/validators/runCommandRequest.zod.js +6 -3
  168. package/dist/fleet/v1/generated/validators/runCommandResponse.zod.d.ts +6 -3
  169. package/dist/fleet/v1/generated/validators/runCommandResponse.zod.js +6 -3
  170. package/dist/fleet/v1/generated/validators/sendMcpRequestRequest.zod.d.ts +6 -3
  171. package/dist/fleet/v1/generated/validators/sendMcpRequestRequest.zod.js +6 -3
  172. package/dist/fleet/v1/generated/validators/sendMcpRequestResponse.zod.d.ts +6 -3
  173. package/dist/fleet/v1/generated/validators/sendMcpRequestResponse.zod.js +6 -3
  174. package/dist/fleet/v1/generated/validators/sessionCloseReason.zod.d.ts +6 -3
  175. package/dist/fleet/v1/generated/validators/sessionCloseReason.zod.js +6 -3
  176. package/dist/fleet/v1/generated/validators/sessionList.zod.d.ts +6 -3
  177. package/dist/fleet/v1/generated/validators/sessionList.zod.js +6 -3
  178. package/dist/fleet/v1/generated/validators/sessionMode.zod.d.ts +6 -3
  179. package/dist/fleet/v1/generated/validators/sessionMode.zod.js +6 -3
  180. package/dist/fleet/v1/generated/validators/sessionResource.zod.d.ts +6 -3
  181. package/dist/fleet/v1/generated/validators/sessionResource.zod.js +6 -3
  182. package/dist/fleet/v1/generated/validators/sessionState.zod.d.ts +6 -3
  183. package/dist/fleet/v1/generated/validators/sessionState.zod.js +6 -3
  184. package/dist/fleet/v1/generated/validators/signedMessage.zod.d.ts +6 -3
  185. package/dist/fleet/v1/generated/validators/signedMessage.zod.js +6 -3
  186. package/dist/fleet/v1/generated/validators/signingKey.zod.d.ts +6 -3
  187. package/dist/fleet/v1/generated/validators/signingKey.zod.js +6 -3
  188. package/dist/fleet/v1/generated/validators/updateAccountRequest.zod.d.ts +6 -3
  189. package/dist/fleet/v1/generated/validators/updateAccountRequest.zod.js +6 -3
  190. package/dist/fleet/v1/generated/validators/updateGroupRequest.zod.d.ts +6 -3
  191. package/dist/fleet/v1/generated/validators/updateGroupRequest.zod.js +6 -3
  192. package/dist/fleet/v1/generated/validators/updateMachineRequest.zod.d.ts +6 -3
  193. package/dist/fleet/v1/generated/validators/updateMachineRequest.zod.js +6 -3
  194. package/dist/fleet/v1/generated/validators/updateMcpServerRequest.zod.d.ts +6 -3
  195. package/dist/fleet/v1/generated/validators/updateMcpServerRequest.zod.js +6 -3
  196. package/dist/fleet/v1/generated/validators/updateMcpServerResponse.zod.d.ts +6 -3
  197. package/dist/fleet/v1/generated/validators/updateMcpServerResponse.zod.js +6 -3
  198. package/dist/fleet/v1/generated/validators/updatePrivilegeAutoApprovalRequest.zod.d.ts +6 -3
  199. package/dist/fleet/v1/generated/validators/updatePrivilegeAutoApprovalRequest.zod.js +6 -3
  200. package/dist/proto/leaflow/fleet/control/v1/control_pb.d.ts +13 -0
  201. package/dist/proto/leaflow/fleet/control/v1/control_pb.js +1 -1
  202. package/dist/proto/leaflow/fleet/transport/v1/transport_pb.d.ts +6 -9
  203. package/dist/routes.d.ts +8 -0
  204. package/dist/routes.js +9 -0
  205. package/package.json +1 -1
@@ -201,9 +201,12 @@
201
201
  * one second has passed, so that the offer carries them.
202
202
  * 3. Join with `POST /api/v1/sessions/{sessionId}/participants`, sending the public key and the
203
203
  * offer. The answer carries the participant's signed authorization, the keys the service
204
- * signs with, and the first PeerConnection: the session's SDP answer, its ICE candidates and
205
- * the signed PeerAuthorization. Pass candidates gathered later with
206
- * `POST …/participants/{participantId}/peer-connections/{peerConnectionId}/candidates`.
204
+ * signs with, and the first PeerConnection: the session's SDP answer, the ICE candidates it
205
+ * has passed so far and the signed PeerAuthorization. Pass candidates gathered later with
206
+ * `POST …/participants/{participantId}/peer-connections/{peerConnectionId}/candidates`, and
207
+ * read the session's later ones with
208
+ * `GET …/participants/{participantId}/peer-connections/{peerConnectionId}` until
209
+ * `candidates_complete`.
207
210
  * 4. Renew the participant with `POST …/participants/{participantId}:renew` well before
208
211
  * `lease_expires_at`, every 15 seconds, presenting the PeerAuthorization of each
209
212
  * PeerConnection; the answer renews them. A participant whose lease runs out ends, and its
@@ -201,9 +201,12 @@
201
201
  * one second has passed, so that the offer carries them.
202
202
  * 3. Join with `POST /api/v1/sessions/{sessionId}/participants`, sending the public key and the
203
203
  * offer. The answer carries the participant's signed authorization, the keys the service
204
- * signs with, and the first PeerConnection: the session's SDP answer, its ICE candidates and
205
- * the signed PeerAuthorization. Pass candidates gathered later with
206
- * `POST …/participants/{participantId}/peer-connections/{peerConnectionId}/candidates`.
204
+ * signs with, and the first PeerConnection: the session's SDP answer, the ICE candidates it
205
+ * has passed so far and the signed PeerAuthorization. Pass candidates gathered later with
206
+ * `POST …/participants/{participantId}/peer-connections/{peerConnectionId}/candidates`, and
207
+ * read the session's later ones with
208
+ * `GET …/participants/{participantId}/peer-connections/{peerConnectionId}` until
209
+ * `candidates_complete`.
207
210
  * 4. Renew the participant with `POST …/participants/{participantId}:renew` well before
208
211
  * `lease_expires_at`, every 15 seconds, presenting the PeerAuthorization of each
209
212
  * PeerConnection; the answer renews them. A participant whose lease runs out ends, and its
@@ -201,9 +201,12 @@
201
201
  * one second has passed, so that the offer carries them.
202
202
  * 3. Join with `POST /api/v1/sessions/{sessionId}/participants`, sending the public key and the
203
203
  * offer. The answer carries the participant's signed authorization, the keys the service
204
- * signs with, and the first PeerConnection: the session's SDP answer, its ICE candidates and
205
- * the signed PeerAuthorization. Pass candidates gathered later with
206
- * `POST …/participants/{participantId}/peer-connections/{peerConnectionId}/candidates`.
204
+ * signs with, and the first PeerConnection: the session's SDP answer, the ICE candidates it
205
+ * has passed so far and the signed PeerAuthorization. Pass candidates gathered later with
206
+ * `POST …/participants/{participantId}/peer-connections/{peerConnectionId}/candidates`, and
207
+ * read the session's later ones with
208
+ * `GET …/participants/{participantId}/peer-connections/{peerConnectionId}` until
209
+ * `candidates_complete`.
207
210
  * 4. Renew the participant with `POST …/participants/{participantId}:renew` well before
208
211
  * `lease_expires_at`, every 15 seconds, presenting the PeerAuthorization of each
209
212
  * PeerConnection; the answer renews them. A participant whose lease runs out ends, and its
@@ -201,9 +201,12 @@
201
201
  * one second has passed, so that the offer carries them.
202
202
  * 3. Join with `POST /api/v1/sessions/{sessionId}/participants`, sending the public key and the
203
203
  * offer. The answer carries the participant's signed authorization, the keys the service
204
- * signs with, and the first PeerConnection: the session's SDP answer, its ICE candidates and
205
- * the signed PeerAuthorization. Pass candidates gathered later with
206
- * `POST …/participants/{participantId}/peer-connections/{peerConnectionId}/candidates`.
204
+ * signs with, and the first PeerConnection: the session's SDP answer, the ICE candidates it
205
+ * has passed so far and the signed PeerAuthorization. Pass candidates gathered later with
206
+ * `POST …/participants/{participantId}/peer-connections/{peerConnectionId}/candidates`, and
207
+ * read the session's later ones with
208
+ * `GET …/participants/{participantId}/peer-connections/{peerConnectionId}` until
209
+ * `candidates_complete`.
207
210
  * 4. Renew the participant with `POST …/participants/{participantId}:renew` well before
208
211
  * `lease_expires_at`, every 15 seconds, presenting the PeerAuthorization of each
209
212
  * PeerConnection; the answer renews them. A participant whose lease runs out ends, and its
@@ -201,9 +201,12 @@
201
201
  * one second has passed, so that the offer carries them.
202
202
  * 3. Join with `POST /api/v1/sessions/{sessionId}/participants`, sending the public key and the
203
203
  * offer. The answer carries the participant's signed authorization, the keys the service
204
- * signs with, and the first PeerConnection: the session's SDP answer, its ICE candidates and
205
- * the signed PeerAuthorization. Pass candidates gathered later with
206
- * `POST …/participants/{participantId}/peer-connections/{peerConnectionId}/candidates`.
204
+ * signs with, and the first PeerConnection: the session's SDP answer, the ICE candidates it
205
+ * has passed so far and the signed PeerAuthorization. Pass candidates gathered later with
206
+ * `POST …/participants/{participantId}/peer-connections/{peerConnectionId}/candidates`, and
207
+ * read the session's later ones with
208
+ * `GET …/participants/{participantId}/peer-connections/{peerConnectionId}` until
209
+ * `candidates_complete`.
207
210
  * 4. Renew the participant with `POST …/participants/{participantId}:renew` well before
208
211
  * `lease_expires_at`, every 15 seconds, presenting the PeerAuthorization of each
209
212
  * PeerConnection; the answer renews them. A participant whose lease runs out ends, and its
@@ -201,9 +201,12 @@
201
201
  * one second has passed, so that the offer carries them.
202
202
  * 3. Join with `POST /api/v1/sessions/{sessionId}/participants`, sending the public key and the
203
203
  * offer. The answer carries the participant's signed authorization, the keys the service
204
- * signs with, and the first PeerConnection: the session's SDP answer, its ICE candidates and
205
- * the signed PeerAuthorization. Pass candidates gathered later with
206
- * `POST …/participants/{participantId}/peer-connections/{peerConnectionId}/candidates`.
204
+ * signs with, and the first PeerConnection: the session's SDP answer, the ICE candidates it
205
+ * has passed so far and the signed PeerAuthorization. Pass candidates gathered later with
206
+ * `POST …/participants/{participantId}/peer-connections/{peerConnectionId}/candidates`, and
207
+ * read the session's later ones with
208
+ * `GET …/participants/{participantId}/peer-connections/{peerConnectionId}` until
209
+ * `candidates_complete`.
207
210
  * 4. Renew the participant with `POST …/participants/{participantId}:renew` well before
208
211
  * `lease_expires_at`, every 15 seconds, presenting the PeerAuthorization of each
209
212
  * PeerConnection; the answer renews them. A participant whose lease runs out ends, and its
@@ -201,9 +201,12 @@
201
201
  * one second has passed, so that the offer carries them.
202
202
  * 3. Join with `POST /api/v1/sessions/{sessionId}/participants`, sending the public key and the
203
203
  * offer. The answer carries the participant's signed authorization, the keys the service
204
- * signs with, and the first PeerConnection: the session's SDP answer, its ICE candidates and
205
- * the signed PeerAuthorization. Pass candidates gathered later with
206
- * `POST …/participants/{participantId}/peer-connections/{peerConnectionId}/candidates`.
204
+ * signs with, and the first PeerConnection: the session's SDP answer, the ICE candidates it
205
+ * has passed so far and the signed PeerAuthorization. Pass candidates gathered later with
206
+ * `POST …/participants/{participantId}/peer-connections/{peerConnectionId}/candidates`, and
207
+ * read the session's later ones with
208
+ * `GET …/participants/{participantId}/peer-connections/{peerConnectionId}` until
209
+ * `candidates_complete`.
207
210
  * 4. Renew the participant with `POST …/participants/{participantId}:renew` well before
208
211
  * `lease_expires_at`, every 15 seconds, presenting the PeerAuthorization of each
209
212
  * PeerConnection; the answer renews them. A participant whose lease runs out ends, and its
@@ -201,9 +201,12 @@
201
201
  * one second has passed, so that the offer carries them.
202
202
  * 3. Join with `POST /api/v1/sessions/{sessionId}/participants`, sending the public key and the
203
203
  * offer. The answer carries the participant's signed authorization, the keys the service
204
- * signs with, and the first PeerConnection: the session's SDP answer, its ICE candidates and
205
- * the signed PeerAuthorization. Pass candidates gathered later with
206
- * `POST …/participants/{participantId}/peer-connections/{peerConnectionId}/candidates`.
204
+ * signs with, and the first PeerConnection: the session's SDP answer, the ICE candidates it
205
+ * has passed so far and the signed PeerAuthorization. Pass candidates gathered later with
206
+ * `POST …/participants/{participantId}/peer-connections/{peerConnectionId}/candidates`, and
207
+ * read the session's later ones with
208
+ * `GET …/participants/{participantId}/peer-connections/{peerConnectionId}` until
209
+ * `candidates_complete`.
207
210
  * 4. Renew the participant with `POST …/participants/{participantId}:renew` well before
208
211
  * `lease_expires_at`, every 15 seconds, presenting the PeerAuthorization of each
209
212
  * PeerConnection; the answer renews them. A participant whose lease runs out ends, and its
@@ -201,9 +201,12 @@
201
201
  * one second has passed, so that the offer carries them.
202
202
  * 3. Join with `POST /api/v1/sessions/{sessionId}/participants`, sending the public key and the
203
203
  * offer. The answer carries the participant's signed authorization, the keys the service
204
- * signs with, and the first PeerConnection: the session's SDP answer, its ICE candidates and
205
- * the signed PeerAuthorization. Pass candidates gathered later with
206
- * `POST …/participants/{participantId}/peer-connections/{peerConnectionId}/candidates`.
204
+ * signs with, and the first PeerConnection: the session's SDP answer, the ICE candidates it
205
+ * has passed so far and the signed PeerAuthorization. Pass candidates gathered later with
206
+ * `POST …/participants/{participantId}/peer-connections/{peerConnectionId}/candidates`, and
207
+ * read the session's later ones with
208
+ * `GET …/participants/{participantId}/peer-connections/{peerConnectionId}` until
209
+ * `candidates_complete`.
207
210
  * 4. Renew the participant with `POST …/participants/{participantId}:renew` well before
208
211
  * `lease_expires_at`, every 15 seconds, presenting the PeerAuthorization of each
209
212
  * PeerConnection; the answer renews them. A participant whose lease runs out ends, and its
@@ -201,9 +201,12 @@
201
201
  * one second has passed, so that the offer carries them.
202
202
  * 3. Join with `POST /api/v1/sessions/{sessionId}/participants`, sending the public key and the
203
203
  * offer. The answer carries the participant's signed authorization, the keys the service
204
- * signs with, and the first PeerConnection: the session's SDP answer, its ICE candidates and
205
- * the signed PeerAuthorization. Pass candidates gathered later with
206
- * `POST …/participants/{participantId}/peer-connections/{peerConnectionId}/candidates`.
204
+ * signs with, and the first PeerConnection: the session's SDP answer, the ICE candidates it
205
+ * has passed so far and the signed PeerAuthorization. Pass candidates gathered later with
206
+ * `POST …/participants/{participantId}/peer-connections/{peerConnectionId}/candidates`, and
207
+ * read the session's later ones with
208
+ * `GET …/participants/{participantId}/peer-connections/{peerConnectionId}` until
209
+ * `candidates_complete`.
207
210
  * 4. Renew the participant with `POST …/participants/{participantId}:renew` well before
208
211
  * `lease_expires_at`, every 15 seconds, presenting the PeerAuthorization of each
209
212
  * PeerConnection; the answer renews them. A participant whose lease runs out ends, and its
@@ -0,0 +1,248 @@
1
+ /**
2
+ * Generated by orval 🍺
3
+ * Do not edit manually.
4
+ * Leaflow Fleet API
5
+ * Machines that run the Leaflow Fleet Agent (`leaflow-fleet-agent`): adding machines, the
6
+ * accounts and groups that log in to them, running commands, opening and closing sessions, with
7
+ * or without a desktop, and admitting participants to them.
8
+ *
9
+ * ## What this API sees
10
+ *
11
+ * This API coordinates. It admits participants to sessions and passes the signaling of their
12
+ * PeerConnections, but everything a session shows or receives — terminals, files, the screen,
13
+ * input, the clipboard, printing and privilege approvals on a participant — travels end to end
14
+ * between the participant and the session, encrypted with keys that never leave them. The
15
+ * platform sees which machine, which session and who is connected, and nothing of what happens
16
+ * inside.
17
+ *
18
+ * Commands and privilege requests decided on the platform are the exception: the platform passes
19
+ * a command and its output between the caller and the machine, and keeps the command line of a
20
+ * privilege request it asks the owner about; it sees both.
21
+ *
22
+ * ## Authentication
23
+ *
24
+ * Every request carries a scoped token; see the `bearerAuth` security scheme.
25
+ *
26
+ * **Neither the path nor the headers carry a `project_id`**: the current project is determined by
27
+ * the token.
28
+ *
29
+ * ## Adding a machine
30
+ *
31
+ * 1. Install the Agent and run `leaflow-fleet-agent daemon enroll` on the machine. The command
32
+ * carries no secret. The machine shows a pairing code such as `7K2QM-9XWTD`.
33
+ * 2. Find the request with `GET /api/v1/enrollments:find?pairing_code=…`. Compare its `hostname`
34
+ * and `source_address` with the machine in front of you: the pairing code is not a secret,
35
+ * and anyone can request enrollment.
36
+ * 3. Approve it with `POST /api/v1/enrollments/{enrollmentId}:approve`. The machine joins the
37
+ * current project within its next polling interval.
38
+ *
39
+ * ## Adding a machine without interaction
40
+ *
41
+ * A machine that is set up unattended, such as by cloud-init on first boot, joins with a
42
+ * registration token instead of a pairing code:
43
+ *
44
+ * 1. Create a registration with `POST /api/v1/machine-registrations`. It reserves a machine in
45
+ * the current project under the given name and returns its `machine_id` and a `token`. The
46
+ * token is returned only in this response.
47
+ * 2. Give the token to the machine in a file that only root can read, and run
48
+ * `leaflow-fleet-agent daemon enroll --url <control endpoint> --token-file <path>`. The
49
+ * machine joins the current project as `machine_id` at once, and the Agent deletes the file.
50
+ *
51
+ * A token enrolls one machine once, and only until the registration expires. Anyone who reads
52
+ * the token before the machine uses it can enroll a key of their own instead, so pass it only
53
+ * to the machine, keep its lifetime short, and compare the `public_key` of the used
54
+ * registration with the key the machine shows when that matters. Revoke a registration that
55
+ * will not be used with `DELETE /api/v1/machine-registrations/{registrationId}`.
56
+ *
57
+ * ## Trusting a machine's key
58
+ *
59
+ * Each machine has an Ed25519 key that it generates itself and that never leaves it. Participants
60
+ * verify that key end to end before they exchange any data with a session, so a client must
61
+ * decide which key belongs to a machine without relying on any party in between:
62
+ *
63
+ * - When approving an enrollment, recompute the pairing code from `public_key` and compare it
64
+ * with the code the machine shows. The code is derived as documented for
65
+ * `EnrollMachineResponse.pairing_code` in `leaflow/fleet/machine/v1/machine.proto`.
66
+ * Approve only when they match, and remember the key for the machine.
67
+ * - On any other client, remember the key the first time it connects to the machine, and
68
+ * refuse to continue whenever the machine later proves a different key. The fingerprint can
69
+ * be compared with the one the Agent prints on the machine.
70
+ *
71
+ * A machine that is reinstalled enrolls again as a new machine with a new key.
72
+ *
73
+ * ## Features
74
+ *
75
+ * A machine reports what it offers in `features`, each named after the protocol package that
76
+ * defines it:
77
+ *
78
+ * - `leaflow.fleet.directory.v1`: the accounts of the project's members and the project's groups
79
+ * exist on the machine; members log in over SSH with their keys and become root through sudo
80
+ * as their permissions allow;
81
+ * - `leaflow.fleet.command.v1`: running commands;
82
+ * - `leaflow.fleet.mcp.v1`: the MCP servers each account configures on the machine, local ones
83
+ * and remote ones it connects to;
84
+ * - `leaflow.fleet.host.v1`: terminal sessions, with programs, files, ports, sound, devices,
85
+ * printers and privilege approvals;
86
+ * - `leaflow.fleet.virtualdesktop.host.v1`: sessions with a desktop.
87
+ *
88
+ * A machine installed without a desktop does not offer `leaflow.fleet.virtualdesktop.host.v1`. A
89
+ * request that needs a feature the machine does not report available fails with
90
+ * `FEATURE_UNAVAILABLE`, whose `metadata.feature` names the feature.
91
+ *
92
+ * ## Directory
93
+ *
94
+ * Every user has one account, as with Google Cloud OS Login: a username and a uid that are the
95
+ * same on every machine of every project. The account is created the first time the user may log
96
+ * in to a machine or opens a session; its username comes from the email address, such as
97
+ * `alice_example_com` for `alice@example.com`, and its owner can change it. A project's machines
98
+ * know the accounts of the project's members and the groups the project defines. A member who
99
+ * leaves the project can no longer log in, and files keep their owner.
100
+ *
101
+ * Who may log in to which machines, and who may become root there through sudo, are permissions
102
+ * of the project's roles: `fleet:machines.login` and `fleet:machines.admin`, each for all
103
+ * machines or for chosen ones. Changes reach the machines within about a minute, and every login
104
+ * and elevation is checked against the current permissions while the machine is connected. To
105
+ * keep a member out of some machines, deny them `fleet:machines.login` on those machines.
106
+ * Elevation through sudo is never approved by a password; see "Approving sudo".
107
+ *
108
+ * Members log in over SSH with the SSH keys of their own accounts (`/account/v1/me/ssh-keys` on
109
+ * the account API), while they may log in to the machine.
110
+ *
111
+ * Machines resolve directory accounts and groups themselves and never write them into their local
112
+ * account files. A local account or group that already uses a name or id of the directory keeps
113
+ * it, and the machine records the conflict among its events.
114
+ *
115
+ * ## Running commands
116
+ *
117
+ * `POST /api/v1/machines/{machineId}:runCommand` runs one command line on the machine as the
118
+ * caller's account, as `ssh machine 'command'` would, but without SSH: the machine needs no open
119
+ * port, no distributed key and no address the caller can reach. Like logging in, it requires
120
+ * `fleet:machines.login` on the machine. Inside the command, `sudo` works without a prompt for
121
+ * a caller with `fleet:machines.admin` on the machine: the request approves the elevation.
122
+ *
123
+ * ## MCP servers
124
+ *
125
+ * A machine that offers `leaflow.fleet.mcp.v1` reaches the MCP servers its accounts configure:
126
+ * servers it runs itself and remote servers it connects to. Each account configures them in
127
+ * `~/.local/share/leaflow/agent/mcp.json` in its home directory, in the `mcpServers` format other
128
+ * MCP clients use, by hand or through this API; the machine picks up every change by itself.
129
+ * The caller's servers run as the caller's account, and the requests below act on them only.
130
+ *
131
+ * The configuration stays on the machine. The values of `env` and `headers` often hold
132
+ * credentials: this API writes them, and they then pass through the platform, but never returns
133
+ * them. Arguments, URLs, tool arguments and tool results pass through the platform as they are.
134
+ *
135
+ * ## Approving sudo
136
+ *
137
+ * An account may become root through sudo on a machine while its user has
138
+ * `fleet:machines.admin` there. Each elevation is approved, in the first of these ways that
139
+ * applies:
140
+ *
141
+ * - inside a command run through this API, by the request itself;
142
+ * - by the user's automatic approval for the machine, for a while or until removed
143
+ * (`PUT /api/v1/machines/{machineId}/privilege-auto-approval`), in one of two modes:
144
+ * - `automatic_review`, the recommended one: a large language model reviews each request and
145
+ * approves or denies it with a reason. It stops most dangerous requests, but not all of
146
+ * them. Each review is a request to Canopy, the model platform, through the project's
147
+ * Canopy service, and may incur Canopy charges; the project needs Canopy enabled. A
148
+ * request that cannot be reviewed, such as when the project has not enabled Canopy or the
149
+ * review does not complete in time, is denied with a reason saying so;
150
+ * - `always_approve`: every request is approved at once. This is dangerous: any program that
151
+ * runs as the account, such as a script or an AI agent, becomes root without anyone being
152
+ * asked;
153
+ * - by the user, on any of their devices, for a request listed by `GET /api/v1/privilege-requests`
154
+ * (`POST …:approve` or `…:deny`), or on a participant of the session the asking process belongs
155
+ * to. A request nobody decides expires, and sudo fails.
156
+ *
157
+ * A denied sudo shows whoever ran it the reason, when the denial gave one.
158
+ *
159
+ * Requests reach the user's devices as they happen through EventBus: the event
160
+ * `leaflow.fleet.privilege.requested` when one waits for the user and
161
+ * `leaflow.fleet.privilege.decided` when it ends, each addressed to the user in the current
162
+ * project and carrying the request's `id`. Requests decided without asking the user raise
163
+ * neither. A client that subscribes to them needs no polling; one that does not can list the
164
+ * pending requests.
165
+ *
166
+ * ## Connections that drop
167
+ *
168
+ * A machine's Agent and a session's process each keep a connection to the service, and on a poor
169
+ * network it may drop and come back within seconds. Requests do not fail for that:
170
+ *
171
+ * - A request that needs the machine or the session's process waits while it connects again,
172
+ * for as long as the request would wait for its answer, and fails with `MACHINE_OFFLINE` or
173
+ * `SESSION_UNAVAILABLE` only when it does not come back in that time.
174
+ * - What the machine or the session's process received before its connection dropped, such as a
175
+ * command or a session being opened, goes on, and its result is returned once it has
176
+ * connected again within that time.
177
+ *
178
+ * A machine stays `online` for up to a minute after its connection was lost, while its Agent
179
+ * connects again; a machine whose Agent stops is offline at once.
180
+ *
181
+ * ## Operations that do not exist
182
+ *
183
+ * Some resources lack an operation on purpose:
184
+ *
185
+ * - Accounts are created when they are first needed and are never deleted, so that files keep
186
+ * their owner.
187
+ * - Enrollment requests are made only by machines.
188
+ * - A machine registration cannot be changed; revoke it and create another.
189
+ * - Machine events are a log: they are listed, never changed, and kept for 30 days.
190
+ * - A privilege request is decided only by the user whose account asks, or on a participant of
191
+ * the session it comes from.
192
+ *
193
+ * ## Joining a session
194
+ *
195
+ * 1. Have an Ed25519 key, for as long as the client wants: one per participant or one kept by
196
+ * the client. The private key must never leave the client; in a browser, use a
197
+ * non-extractable WebCrypto key.
198
+ * 2. Get the ICE servers with `GET /api/v1/sessions/{sessionId}/rtc-configuration`, create a
199
+ * PeerConnection with them and its data channels (`leaflow/fleet/transport/v1/transport.proto`)
200
+ * and make an offer. Wait briefly for ICE candidates, such as until gathering completes or
201
+ * one second has passed, so that the offer carries them.
202
+ * 3. Join with `POST /api/v1/sessions/{sessionId}/participants`, sending the public key and the
203
+ * offer. The answer carries the participant's signed authorization, the keys the service
204
+ * signs with, and the first PeerConnection: the session's SDP answer, the ICE candidates it
205
+ * has passed so far and the signed PeerAuthorization. Pass candidates gathered later with
206
+ * `POST …/participants/{participantId}/peer-connections/{peerConnectionId}/candidates`, and
207
+ * read the session's later ones with
208
+ * `GET …/participants/{participantId}/peer-connections/{peerConnectionId}` until
209
+ * `candidates_complete`.
210
+ * 4. Renew the participant with `POST …/participants/{participantId}:renew` well before
211
+ * `lease_expires_at`, every 15 seconds, presenting the PeerAuthorization of each
212
+ * PeerConnection; the answer renews them. A participant whose lease runs out ends, and its
213
+ * PeerConnections stop within 30 seconds of their last lease.
214
+ * 5. When a path fails, start another PeerConnection with
215
+ * `POST …/participants/{participantId}/peer-connections` and move the connection to it with
216
+ * `:prepareMigration` and `:commitMigration`. Abandon a PeerConnection that does not
217
+ * connect with `DELETE …/peer-connections/{peerConnectionId}`.
218
+ * 6. Leave with `DELETE …/participants/{participantId}`.
219
+ *
220
+ * Signaling travels only through these requests; a participant holds no other connection to
221
+ * the service.
222
+ *
223
+ * What a participant may do in a session is decided when it is created, from the caller's
224
+ * permissions and what the request asks for, and does not change afterwards. Participants are not
225
+ * told apart by kind: a person in a browser and a program that operates the session are both
226
+ * participants, named by the `client_name` they choose, and either can be disconnected.
227
+ *
228
+ * Every participant that ends, including through `DELETE`, is announced through EventBus as
229
+ * `leaflow.fleet.participant.ended`, addressed to its user in the current project, with its
230
+ * `session_id`, `participant_id` (a decimal string) and `reason`: `left` when its user ended it,
231
+ * `removed` when someone else did, `lease_expired` when it was not renewed in time,
232
+ * `session_ended` when its session ended, `session_process_lost` when the session's process did
233
+ * not come back in time, `permission_revoked` when a permission it was created with was revoked
234
+ * from its user, `membership_ended` when its user is no longer a member of the project,
235
+ * `user_inactive` when its user's account was suspended or banned or its deletion was requested,
236
+ * `project_deletion_requested` when deletion of the project was requested, `machine_removed` when
237
+ * its machine was removed, or `key_revoked` when the key that signed its authorization was
238
+ * revoked. A participant whose creation failed is not announced.
239
+ * OpenAPI spec version: 1.0.0
240
+ */
241
+ import * as zod from "zod";
242
+ export declare const getPeerConnectionParamsKnownCandidatesMin = 0;
243
+ export declare const getPeerConnectionParamsKnownCandidatesMax = 64;
244
+ export declare const GetPeerConnectionParams: zod.ZodObject<{
245
+ known_candidates: zod.ZodOptional<zod.ZodInt>;
246
+ }, zod.z.core.$strict>;
247
+ export type GetPeerConnectionParams = zod.input<typeof GetPeerConnectionParams>;
248
+ export type GetPeerConnectionParamsOutput = zod.output<typeof GetPeerConnectionParams>;