@leaflow/sdk 0.0.0-dev.451.gfd4baf5 → 0.0.0-dev.453.gab53eb4

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 (274) hide show
  1. package/README.md +15 -0
  2. package/dist/fleet/v1/generated/functions.d.ts +1710 -0
  3. package/dist/fleet/v1/generated/functions.js +1655 -0
  4. package/dist/fleet/v1/generated/models.d.ts +1534 -0
  5. package/dist/fleet/v1/generated/models.js +97 -0
  6. package/dist/fleet/v1/generated/schemas.zod.d.ts +1172 -0
  7. package/dist/fleet/v1/generated/schemas.zod.js +1291 -0
  8. package/dist/fleet/v1/generated/validators/accountList.zod.d.ts +250 -0
  9. package/dist/fleet/v1/generated/validators/accountList.zod.js +234 -0
  10. package/dist/fleet/v1/generated/validators/accountResource.zod.d.ts +244 -0
  11. package/dist/fleet/v1/generated/validators/accountResource.zod.js +242 -0
  12. package/dist/fleet/v1/generated/validators/approveEnrollmentRequest.zod.d.ts +232 -0
  13. package/dist/fleet/v1/generated/validators/approveEnrollmentRequest.zod.js +234 -0
  14. package/dist/fleet/v1/generated/validators/callMcpToolRequest.zod.d.ts +234 -0
  15. package/dist/fleet/v1/generated/validators/callMcpToolRequest.zod.js +240 -0
  16. package/dist/fleet/v1/generated/validators/callMcpToolResponse.zod.d.ts +231 -0
  17. package/dist/fleet/v1/generated/validators/callMcpToolResponse.zod.js +231 -0
  18. package/dist/fleet/v1/generated/validators/createGroupMemberRequest.zod.d.ts +231 -0
  19. package/dist/fleet/v1/generated/validators/createGroupMemberRequest.zod.js +229 -0
  20. package/dist/fleet/v1/generated/validators/createGroupRequest.zod.d.ts +231 -0
  21. package/dist/fleet/v1/generated/validators/createGroupRequest.zod.js +230 -0
  22. package/dist/fleet/v1/generated/validators/createMachineRegistrationRequest.zod.d.ts +236 -0
  23. package/dist/fleet/v1/generated/validators/createMachineRegistrationRequest.zod.js +243 -0
  24. package/dist/fleet/v1/generated/validators/createMachineRegistrationResponse.zod.d.ts +247 -0
  25. package/dist/fleet/v1/generated/validators/createMachineRegistrationResponse.zod.js +233 -0
  26. package/dist/fleet/v1/generated/validators/createParticipantRequest.zod.d.ts +248 -0
  27. package/dist/fleet/v1/generated/validators/createParticipantRequest.zod.js +261 -0
  28. package/dist/fleet/v1/generated/validators/createParticipantResponse.zod.d.ts +277 -0
  29. package/dist/fleet/v1/generated/validators/createParticipantResponse.zod.js +241 -0
  30. package/dist/fleet/v1/generated/validators/createPeerConnectionCandidatesRequest.zod.d.ts +236 -0
  31. package/dist/fleet/v1/generated/validators/createPeerConnectionCandidatesRequest.zod.js +238 -0
  32. package/dist/fleet/v1/generated/validators/createPeerConnectionRequest.zod.d.ts +232 -0
  33. package/dist/fleet/v1/generated/validators/createPeerConnectionRequest.zod.js +233 -0
  34. package/dist/fleet/v1/generated/validators/createSessionRequest.zod.d.ts +240 -0
  35. package/dist/fleet/v1/generated/validators/createSessionRequest.zod.js +231 -0
  36. package/dist/fleet/v1/generated/validators/cursorPagination.zod.d.ts +232 -0
  37. package/dist/fleet/v1/generated/validators/cursorPagination.zod.js +232 -0
  38. package/dist/fleet/v1/generated/validators/deleteMcpServerParams.zod.d.ts +232 -0
  39. package/dist/fleet/v1/generated/validators/deleteMcpServerParams.zod.js +230 -0
  40. package/dist/fleet/v1/generated/validators/desktopOptions.zod.d.ts +242 -0
  41. package/dist/fleet/v1/generated/validators/desktopOptions.zod.js +254 -0
  42. package/dist/fleet/v1/generated/validators/desktopState.zod.d.ts +235 -0
  43. package/dist/fleet/v1/generated/validators/desktopState.zod.js +231 -0
  44. package/dist/fleet/v1/generated/validators/directoryName.zod.d.ts +231 -0
  45. package/dist/fleet/v1/generated/validators/directoryName.zod.js +234 -0
  46. package/dist/fleet/v1/generated/validators/enrollmentResource.zod.d.ts +243 -0
  47. package/dist/fleet/v1/generated/validators/enrollmentResource.zod.js +241 -0
  48. package/dist/fleet/v1/generated/validators/enrollmentState.zod.d.ts +233 -0
  49. package/dist/fleet/v1/generated/validators/enrollmentState.zod.js +229 -0
  50. package/dist/fleet/v1/generated/validators/error.zod.d.ts +243 -0
  51. package/dist/fleet/v1/generated/validators/error.zod.js +232 -0
  52. package/dist/fleet/v1/generated/validators/errorStatus.zod.d.ts +241 -0
  53. package/dist/fleet/v1/generated/validators/errorStatus.zod.js +256 -0
  54. package/dist/fleet/v1/generated/validators/featureState.zod.d.ts +232 -0
  55. package/dist/fleet/v1/generated/validators/featureState.zod.js +229 -0
  56. package/dist/fleet/v1/generated/validators/fieldViolation.zod.d.ts +232 -0
  57. package/dist/fleet/v1/generated/validators/fieldViolation.zod.js +235 -0
  58. package/dist/fleet/v1/generated/validators/findEnrollmentByPairingCodeParams.zod.d.ts +232 -0
  59. package/dist/fleet/v1/generated/validators/findEnrollmentByPairingCodeParams.zod.js +230 -0
  60. package/dist/fleet/v1/generated/validators/findEnrollmentResponse.zod.d.ts +245 -0
  61. package/dist/fleet/v1/generated/validators/findEnrollmentResponse.zod.js +232 -0
  62. package/dist/fleet/v1/generated/validators/groupList.zod.d.ts +242 -0
  63. package/dist/fleet/v1/generated/validators/groupList.zod.js +234 -0
  64. package/dist/fleet/v1/generated/validators/groupResource.zod.d.ts +237 -0
  65. package/dist/fleet/v1/generated/validators/groupResource.zod.js +235 -0
  66. package/dist/fleet/v1/generated/validators/iceCandidate.zod.d.ts +234 -0
  67. package/dist/fleet/v1/generated/validators/iceCandidate.zod.js +241 -0
  68. package/dist/fleet/v1/generated/validators/iceServer.zod.d.ts +233 -0
  69. package/dist/fleet/v1/generated/validators/iceServer.zod.js +236 -0
  70. package/dist/fleet/v1/generated/validators/listAccountsParams.zod.d.ts +239 -0
  71. package/dist/fleet/v1/generated/validators/listAccountsParams.zod.js +241 -0
  72. package/dist/fleet/v1/generated/validators/listGroupMembersParams.zod.d.ts +236 -0
  73. package/dist/fleet/v1/generated/validators/listGroupMembersParams.zod.js +242 -0
  74. package/dist/fleet/v1/generated/validators/listGroupsParams.zod.d.ts +236 -0
  75. package/dist/fleet/v1/generated/validators/listGroupsParams.zod.js +238 -0
  76. package/dist/fleet/v1/generated/validators/listMachineEventsParams.zod.d.ts +240 -0
  77. package/dist/fleet/v1/generated/validators/listMachineEventsParams.zod.js +244 -0
  78. package/dist/fleet/v1/generated/validators/listMachineRegistrationsParams.zod.d.ts +236 -0
  79. package/dist/fleet/v1/generated/validators/listMachineRegistrationsParams.zod.js +242 -0
  80. package/dist/fleet/v1/generated/validators/listMachinesParams.zod.d.ts +238 -0
  81. package/dist/fleet/v1/generated/validators/listMachinesParams.zod.js +240 -0
  82. package/dist/fleet/v1/generated/validators/listMcpToolsParams.zod.d.ts +239 -0
  83. package/dist/fleet/v1/generated/validators/listMcpToolsParams.zod.js +241 -0
  84. package/dist/fleet/v1/generated/validators/listPrivilegeAutoApprovalsParams.zod.d.ts +236 -0
  85. package/dist/fleet/v1/generated/validators/listPrivilegeAutoApprovalsParams.zod.js +242 -0
  86. package/dist/fleet/v1/generated/validators/listPrivilegeRequestsParams.zod.d.ts +244 -0
  87. package/dist/fleet/v1/generated/validators/listPrivilegeRequestsParams.zod.js +245 -0
  88. package/dist/fleet/v1/generated/validators/listSessionsParams.zod.d.ts +240 -0
  89. package/dist/fleet/v1/generated/validators/listSessionsParams.zod.js +242 -0
  90. package/dist/fleet/v1/generated/validators/machineEventList.zod.d.ts +244 -0
  91. package/dist/fleet/v1/generated/validators/machineEventList.zod.js +234 -0
  92. package/dist/fleet/v1/generated/validators/machineEventResource.zod.d.ts +238 -0
  93. package/dist/fleet/v1/generated/validators/machineEventResource.zod.js +238 -0
  94. package/dist/fleet/v1/generated/validators/machineEventType.zod.d.ts +232 -0
  95. package/dist/fleet/v1/generated/validators/machineEventType.zod.js +229 -0
  96. package/dist/fleet/v1/generated/validators/machineFeature.zod.d.ts +237 -0
  97. package/dist/fleet/v1/generated/validators/machineFeature.zod.js +239 -0
  98. package/dist/fleet/v1/generated/validators/machineList.zod.d.ts +261 -0
  99. package/dist/fleet/v1/generated/validators/machineList.zod.js +234 -0
  100. package/dist/fleet/v1/generated/validators/machineRegistrationList.zod.d.ts +250 -0
  101. package/dist/fleet/v1/generated/validators/machineRegistrationList.zod.js +234 -0
  102. package/dist/fleet/v1/generated/validators/machineRegistrationResource.zod.d.ts +244 -0
  103. package/dist/fleet/v1/generated/validators/machineRegistrationResource.zod.js +249 -0
  104. package/dist/fleet/v1/generated/validators/machineRegistrationState.zod.d.ts +234 -0
  105. package/dist/fleet/v1/generated/validators/machineRegistrationState.zod.js +229 -0
  106. package/dist/fleet/v1/generated/validators/machineResource.zod.d.ts +256 -0
  107. package/dist/fleet/v1/generated/validators/machineResource.zod.js +257 -0
  108. package/dist/fleet/v1/generated/validators/mcpConfigurationFile.zod.d.ts +240 -0
  109. package/dist/fleet/v1/generated/validators/mcpConfigurationFile.zod.js +246 -0
  110. package/dist/fleet/v1/generated/validators/mcpConfigurationResource.zod.d.ts +279 -0
  111. package/dist/fleet/v1/generated/validators/mcpConfigurationResource.zod.js +232 -0
  112. package/dist/fleet/v1/generated/validators/mcpImplementation.zod.d.ts +233 -0
  113. package/dist/fleet/v1/generated/validators/mcpImplementation.zod.js +231 -0
  114. package/dist/fleet/v1/generated/validators/mcpServerFailure.zod.d.ts +237 -0
  115. package/dist/fleet/v1/generated/validators/mcpServerFailure.zod.js +237 -0
  116. package/dist/fleet/v1/generated/validators/mcpServerResource.zod.d.ts +265 -0
  117. package/dist/fleet/v1/generated/validators/mcpServerResource.zod.js +256 -0
  118. package/dist/fleet/v1/generated/validators/mcpToolList.zod.d.ts +252 -0
  119. package/dist/fleet/v1/generated/validators/mcpToolList.zod.js +235 -0
  120. package/dist/fleet/v1/generated/validators/mcpToolResource.zod.d.ts +237 -0
  121. package/dist/fleet/v1/generated/validators/mcpToolResource.zod.js +243 -0
  122. package/dist/fleet/v1/generated/validators/mcpTransport.zod.d.ts +233 -0
  123. package/dist/fleet/v1/generated/validators/mcpTransport.zod.js +229 -0
  124. package/dist/fleet/v1/generated/validators/mcpUnavailableServer.zod.d.ts +240 -0
  125. package/dist/fleet/v1/generated/validators/mcpUnavailableServer.zod.js +231 -0
  126. package/dist/fleet/v1/generated/validators/migrationStep.zod.d.ts +232 -0
  127. package/dist/fleet/v1/generated/validators/migrationStep.zod.js +233 -0
  128. package/dist/fleet/v1/generated/validators/namedIdentity.zod.d.ts +233 -0
  129. package/dist/fleet/v1/generated/validators/namedIdentity.zod.js +233 -0
  130. package/dist/fleet/v1/generated/validators/offsetPagination.zod.d.ts +234 -0
  131. package/dist/fleet/v1/generated/validators/offsetPagination.zod.js +234 -0
  132. package/dist/fleet/v1/generated/validators/operatingSystem.zod.d.ts +233 -0
  133. package/dist/fleet/v1/generated/validators/operatingSystem.zod.js +233 -0
  134. package/dist/fleet/v1/generated/validators/participantList.zod.d.ts +242 -0
  135. package/dist/fleet/v1/generated/validators/participantList.zod.js +230 -0
  136. package/dist/fleet/v1/generated/validators/participantResource.zod.d.ts +240 -0
  137. package/dist/fleet/v1/generated/validators/participantResource.zod.js +242 -0
  138. package/dist/fleet/v1/generated/validators/peerConnection.zod.d.ts +241 -0
  139. package/dist/fleet/v1/generated/validators/peerConnection.zod.js +242 -0
  140. package/dist/fleet/v1/generated/validators/privilegeAutoApprovalList.zod.d.ts +241 -0
  141. package/dist/fleet/v1/generated/validators/privilegeAutoApprovalList.zod.js +234 -0
  142. package/dist/fleet/v1/generated/validators/privilegeAutoApprovalResource.zod.d.ts +235 -0
  143. package/dist/fleet/v1/generated/validators/privilegeAutoApprovalResource.zod.js +236 -0
  144. package/dist/fleet/v1/generated/validators/privilegeDecider.zod.d.ts +232 -0
  145. package/dist/fleet/v1/generated/validators/privilegeDecider.zod.js +229 -0
  146. package/dist/fleet/v1/generated/validators/privilegeRequestList.zod.d.ts +258 -0
  147. package/dist/fleet/v1/generated/validators/privilegeRequestList.zod.js +234 -0
  148. package/dist/fleet/v1/generated/validators/privilegeRequestResource.zod.d.ts +253 -0
  149. package/dist/fleet/v1/generated/validators/privilegeRequestResource.zod.js +255 -0
  150. package/dist/fleet/v1/generated/validators/privilegeRequestState.zod.d.ts +235 -0
  151. package/dist/fleet/v1/generated/validators/privilegeRequestState.zod.js +229 -0
  152. package/dist/fleet/v1/generated/validators/publicKey.zod.d.ts +230 -0
  153. package/dist/fleet/v1/generated/validators/publicKey.zod.js +231 -0
  154. package/dist/fleet/v1/generated/validators/renewParticipantRequest.zod.d.ts +236 -0
  155. package/dist/fleet/v1/generated/validators/renewParticipantRequest.zod.js +235 -0
  156. package/dist/fleet/v1/generated/validators/renewParticipantResponse.zod.d.ts +257 -0
  157. package/dist/fleet/v1/generated/validators/renewParticipantResponse.zod.js +238 -0
  158. package/dist/fleet/v1/generated/validators/replaceMcpConfigurationRequest.zod.d.ts +233 -0
  159. package/dist/fleet/v1/generated/validators/replaceMcpConfigurationRequest.zod.js +237 -0
  160. package/dist/fleet/v1/generated/validators/rtcConfiguration.zod.d.ts +240 -0
  161. package/dist/fleet/v1/generated/validators/rtcConfiguration.zod.js +236 -0
  162. package/dist/fleet/v1/generated/validators/runCommandRequest.zod.d.ts +235 -0
  163. package/dist/fleet/v1/generated/validators/runCommandRequest.zod.js +242 -0
  164. package/dist/fleet/v1/generated/validators/runCommandResponse.zod.d.ts +237 -0
  165. package/dist/fleet/v1/generated/validators/runCommandResponse.zod.js +245 -0
  166. package/dist/fleet/v1/generated/validators/sendMcpRequestRequest.zod.d.ts +234 -0
  167. package/dist/fleet/v1/generated/validators/sendMcpRequestRequest.zod.js +239 -0
  168. package/dist/fleet/v1/generated/validators/sendMcpRequestResponse.zod.d.ts +231 -0
  169. package/dist/fleet/v1/generated/validators/sendMcpRequestResponse.zod.js +231 -0
  170. package/dist/fleet/v1/generated/validators/sessionCloseReason.zod.d.ts +242 -0
  171. package/dist/fleet/v1/generated/validators/sessionCloseReason.zod.js +242 -0
  172. package/dist/fleet/v1/generated/validators/sessionList.zod.d.ts +274 -0
  173. package/dist/fleet/v1/generated/validators/sessionList.zod.js +234 -0
  174. package/dist/fleet/v1/generated/validators/sessionMode.zod.d.ts +232 -0
  175. package/dist/fleet/v1/generated/validators/sessionMode.zod.js +229 -0
  176. package/dist/fleet/v1/generated/validators/sessionResource.zod.d.ts +268 -0
  177. package/dist/fleet/v1/generated/validators/sessionResource.zod.js +254 -0
  178. package/dist/fleet/v1/generated/validators/sessionState.zod.d.ts +234 -0
  179. package/dist/fleet/v1/generated/validators/sessionState.zod.js +229 -0
  180. package/dist/fleet/v1/generated/validators/signedMessage.zod.d.ts +233 -0
  181. package/dist/fleet/v1/generated/validators/signedMessage.zod.js +235 -0
  182. package/dist/fleet/v1/generated/validators/signingKey.zod.d.ts +232 -0
  183. package/dist/fleet/v1/generated/validators/signingKey.zod.js +233 -0
  184. package/dist/fleet/v1/generated/validators/updateAccountRequest.zod.d.ts +235 -0
  185. package/dist/fleet/v1/generated/validators/updateAccountRequest.zod.js +240 -0
  186. package/dist/fleet/v1/generated/validators/updateGroupRequest.zod.d.ts +231 -0
  187. package/dist/fleet/v1/generated/validators/updateGroupRequest.zod.js +230 -0
  188. package/dist/fleet/v1/generated/validators/updateMachineRequest.zod.d.ts +232 -0
  189. package/dist/fleet/v1/generated/validators/updateMachineRequest.zod.js +230 -0
  190. package/dist/fleet/v1/generated/validators/updateMcpServerRequest.zod.d.ts +254 -0
  191. package/dist/fleet/v1/generated/validators/updateMcpServerRequest.zod.js +282 -0
  192. package/dist/fleet/v1/generated/validators/updateMcpServerResponse.zod.d.ts +279 -0
  193. package/dist/fleet/v1/generated/validators/updateMcpServerResponse.zod.js +232 -0
  194. package/dist/fleet/v1/generated/validators/updatePrivilegeAutoApprovalRequest.zod.d.ts +231 -0
  195. package/dist/fleet/v1/generated/validators/updatePrivilegeAutoApprovalRequest.zod.js +232 -0
  196. package/dist/fleet/v1/index.d.ts +3 -0
  197. package/dist/fleet/v1/index.js +3 -0
  198. package/dist/index.d.ts +1 -0
  199. package/dist/index.js +1 -0
  200. package/dist/proto/google/rpc/status_pb.d.ts +48 -0
  201. package/dist/proto/google/rpc/status_pb.js +24 -0
  202. package/dist/proto/leaflow/fleet/audio/v1/audio_pb.d.ts +262 -0
  203. package/dist/proto/leaflow/fleet/audio/v1/audio_pb.js +51 -0
  204. package/dist/proto/leaflow/fleet/camera/v1/camera_pb.d.ts +265 -0
  205. package/dist/proto/leaflow/fleet/camera/v1/camera_pb.js +70 -0
  206. package/dist/proto/leaflow/fleet/command/v1/command_pb.d.ts +158 -0
  207. package/dist/proto/leaflow/fleet/command/v1/command_pb.js +25 -0
  208. package/dist/proto/leaflow/fleet/control/v1/control_pb.d.ts +1226 -0
  209. package/dist/proto/leaflow/fleet/control/v1/control_pb.js +354 -0
  210. package/dist/proto/leaflow/fleet/device/v1/device_pb.d.ts +422 -0
  211. package/dist/proto/leaflow/fleet/device/v1/device_pb.js +183 -0
  212. package/dist/proto/leaflow/fleet/directory/v1/directory_pb.d.ts +429 -0
  213. package/dist/proto/leaflow/fleet/directory/v1/directory_pb.js +78 -0
  214. package/dist/proto/leaflow/fleet/exec/v1/exec_pb.d.ts +287 -0
  215. package/dist/proto/leaflow/fleet/exec/v1/exec_pb.js +78 -0
  216. package/dist/proto/leaflow/fleet/filetransfer/v1/filetransfer_pb.d.ts +731 -0
  217. package/dist/proto/leaflow/fleet/filetransfer/v1/filetransfer_pb.js +163 -0
  218. package/dist/proto/leaflow/fleet/gamepad/v1/gamepad_pb.d.ts +347 -0
  219. package/dist/proto/leaflow/fleet/gamepad/v1/gamepad_pb.js +124 -0
  220. package/dist/proto/leaflow/fleet/host/v1/host_pb.d.ts +619 -0
  221. package/dist/proto/leaflow/fleet/host/v1/host_pb.js +206 -0
  222. package/dist/proto/leaflow/fleet/logs/v1/logs_pb.d.ts +293 -0
  223. package/dist/proto/leaflow/fleet/logs/v1/logs_pb.js +90 -0
  224. package/dist/proto/leaflow/fleet/machine/v1/machine_pb.d.ts +448 -0
  225. package/dist/proto/leaflow/fleet/machine/v1/machine_pb.js +157 -0
  226. package/dist/proto/leaflow/fleet/mcp/v1/mcp_pb.d.ts +891 -0
  227. package/dist/proto/leaflow/fleet/mcp/v1/mcp_pb.js +306 -0
  228. package/dist/proto/leaflow/fleet/portforward/v1/portforward_pb.d.ts +688 -0
  229. package/dist/proto/leaflow/fleet/portforward/v1/portforward_pb.js +209 -0
  230. package/dist/proto/leaflow/fleet/printing/v1/printing_pb.d.ts +741 -0
  231. package/dist/proto/leaflow/fleet/printing/v1/printing_pb.js +260 -0
  232. package/dist/proto/leaflow/fleet/privilege/v1/privilege_pb.d.ts +569 -0
  233. package/dist/proto/leaflow/fleet/privilege/v1/privilege_pb.js +168 -0
  234. package/dist/proto/leaflow/fleet/rpc/v1/rpc_pb.d.ts +234 -0
  235. package/dist/proto/leaflow/fleet/rpc/v1/rpc_pb.js +70 -0
  236. package/dist/proto/leaflow/fleet/session/v1/session_pb.d.ts +411 -0
  237. package/dist/proto/leaflow/fleet/session/v1/session_pb.js +130 -0
  238. package/dist/proto/leaflow/fleet/sshagent/v1/sshagent_pb.d.ts +163 -0
  239. package/dist/proto/leaflow/fleet/sshagent/v1/sshagent_pb.js +64 -0
  240. package/dist/proto/leaflow/fleet/terminal/v1/terminal_pb.d.ts +297 -0
  241. package/dist/proto/leaflow/fleet/terminal/v1/terminal_pb.js +54 -0
  242. package/dist/proto/leaflow/fleet/transport/v1/transport_pb.d.ts +1055 -0
  243. package/dist/proto/leaflow/fleet/transport/v1/transport_pb.js +251 -0
  244. package/dist/proto/leaflow/fleet/virtualdesktop/accessibility/v1/accessibility_pb.d.ts +1298 -0
  245. package/dist/proto/leaflow/fleet/virtualdesktop/accessibility/v1/accessibility_pb.js +437 -0
  246. package/dist/proto/leaflow/fleet/virtualdesktop/application/v1/application_pb.d.ts +888 -0
  247. package/dist/proto/leaflow/fleet/virtualdesktop/application/v1/application_pb.js +210 -0
  248. package/dist/proto/leaflow/fleet/virtualdesktop/capture/v1/capture_pb.d.ts +231 -0
  249. package/dist/proto/leaflow/fleet/virtualdesktop/capture/v1/capture_pb.js +63 -0
  250. package/dist/proto/leaflow/fleet/virtualdesktop/change/v1/change_pb.d.ts +965 -0
  251. package/dist/proto/leaflow/fleet/virtualdesktop/change/v1/change_pb.js +239 -0
  252. package/dist/proto/leaflow/fleet/virtualdesktop/cursor/v1/cursor_pb.d.ts +201 -0
  253. package/dist/proto/leaflow/fleet/virtualdesktop/cursor/v1/cursor_pb.js +34 -0
  254. package/dist/proto/leaflow/fleet/virtualdesktop/datatransfer/v1/datatransfer_pb.d.ts +1489 -0
  255. package/dist/proto/leaflow/fleet/virtualdesktop/datatransfer/v1/datatransfer_pb.js +256 -0
  256. package/dist/proto/leaflow/fleet/virtualdesktop/display/v1/display_pb.d.ts +380 -0
  257. package/dist/proto/leaflow/fleet/virtualdesktop/display/v1/display_pb.js +89 -0
  258. package/dist/proto/leaflow/fleet/virtualdesktop/draw/v1/draw_pb.d.ts +587 -0
  259. package/dist/proto/leaflow/fleet/virtualdesktop/draw/v1/draw_pb.js +139 -0
  260. package/dist/proto/leaflow/fleet/virtualdesktop/host/v1/host_pb.d.ts +69 -0
  261. package/dist/proto/leaflow/fleet/virtualdesktop/host/v1/host_pb.js +19 -0
  262. package/dist/proto/leaflow/fleet/virtualdesktop/input/v1/input_pb.d.ts +1463 -0
  263. package/dist/proto/leaflow/fleet/virtualdesktop/input/v1/input_pb.js +321 -0
  264. package/dist/proto/leaflow/fleet/virtualdesktop/lease/v1/lease_pb.d.ts +93 -0
  265. package/dist/proto/leaflow/fleet/virtualdesktop/lease/v1/lease_pb.js +24 -0
  266. package/dist/proto/leaflow/fleet/virtualdesktop/notification/v1/notification_pb.d.ts +414 -0
  267. package/dist/proto/leaflow/fleet/virtualdesktop/notification/v1/notification_pb.js +137 -0
  268. package/dist/proto/leaflow/fleet/virtualdesktop/tray/v1/tray_pb.d.ts +928 -0
  269. package/dist/proto/leaflow/fleet/virtualdesktop/tray/v1/tray_pb.js +413 -0
  270. package/dist/proto/leaflow/fleet/virtualdesktop/window/v1/window_pb.d.ts +1559 -0
  271. package/dist/proto/leaflow/fleet/virtualdesktop/window/v1/window_pb.js +664 -0
  272. package/dist/routes.d.ts +440 -0
  273. package/dist/routes.js +495 -0
  274. package/package.json +11 -3
@@ -0,0 +1,1291 @@
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 keys they own among the project's SSH keys, while they may
109
+ * 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
+ * - at once, while the user has approved their requests on the machine without asking, for a
143
+ * while or until removed (`PUT /api/v1/machines/{machineId}/privilege-auto-approval`);
144
+ * - by the user, on any of their devices, for a request listed by `GET /api/v1/privilege-requests`
145
+ * (`POST …:approve` or `…:deny`), or on a participant of the session the asking process belongs
146
+ * to. A request nobody decides expires, and sudo fails.
147
+ *
148
+ * Requests reach the user's devices as they happen through EventBus: the event
149
+ * `leaflow.fleet.privilege.requested` when one is waiting and `leaflow.fleet.privilege.decided`
150
+ * when it ends, each addressed to the user in the current project and carrying the request's
151
+ * `id`. A client that subscribes to them needs no polling; one that does not can list the
152
+ * pending requests.
153
+ *
154
+ * ## Connections that drop
155
+ *
156
+ * A machine's Agent and a session's process each keep a connection to the service, and on a poor
157
+ * network it may drop and come back within seconds. Requests do not fail for that:
158
+ *
159
+ * - A request that needs the machine or the session's process waits while it connects again,
160
+ * for as long as the request would wait for its answer, and fails with `MACHINE_OFFLINE` or
161
+ * `SESSION_UNAVAILABLE` only when it does not come back in that time.
162
+ * - What the machine or the session's process received before its connection dropped, such as a
163
+ * command or a session being opened, goes on, and its result is returned once it has
164
+ * connected again within that time.
165
+ *
166
+ * A machine stays `online` for up to a minute after its connection was lost, while its Agent
167
+ * connects again; a machine whose Agent stops is offline at once.
168
+ *
169
+ * ## Operations that do not exist
170
+ *
171
+ * Some resources lack an operation on purpose:
172
+ *
173
+ * - Accounts are created when they are first needed and are never deleted, so that files keep
174
+ * their owner.
175
+ * - Enrollment requests are made only by machines.
176
+ * - A machine registration cannot be changed; revoke it and create another.
177
+ * - Machine events are a log: they are listed, never changed, and kept for 30 days.
178
+ * - A privilege request is decided only by the user whose account asks, or on a participant of
179
+ * the session it comes from.
180
+ *
181
+ * ## Joining a session
182
+ *
183
+ * 1. Have an Ed25519 key, for as long as the client wants: one per participant or one kept by
184
+ * the client. The private key must never leave the client; in a browser, use a
185
+ * non-extractable WebCrypto key.
186
+ * 2. Get the ICE servers with `GET /api/v1/sessions/{sessionId}/rtc-configuration`, create a
187
+ * PeerConnection with them and its data channels (`leaflow/fleet/transport/v1/transport.proto`)
188
+ * and make an offer. Wait briefly for ICE candidates, such as until gathering completes or
189
+ * one second has passed, so that the offer carries them.
190
+ * 3. Join with `POST /api/v1/sessions/{sessionId}/participants`, sending the public key and the
191
+ * offer. The answer carries the participant's signed authorization, the keys the service
192
+ * signs with, and the first PeerConnection: the session's SDP answer, its ICE candidates and
193
+ * the signed PeerAuthorization. Pass candidates gathered later with
194
+ * `POST …/participants/{participantId}/peer-connections/{peerConnectionId}/candidates`.
195
+ * 4. Renew the participant with `POST …/participants/{participantId}:renew` well before
196
+ * `lease_expires_at`, every 15 seconds, presenting the PeerAuthorization of each
197
+ * PeerConnection; the answer renews them. A participant whose lease runs out ends, and its
198
+ * PeerConnections stop within 30 seconds of their last lease.
199
+ * 5. When a path fails, start another PeerConnection with
200
+ * `POST …/participants/{participantId}/peer-connections` and move the connection to it with
201
+ * `:prepareMigration` and `:commitMigration`. Abandon a PeerConnection that does not
202
+ * connect with `DELETE …/peer-connections/{peerConnectionId}`.
203
+ * 6. Leave with `DELETE …/participants/{participantId}`.
204
+ *
205
+ * Signaling travels only through these requests; a participant holds no other connection to
206
+ * the service.
207
+ *
208
+ * What a participant may do in a session is decided when it is created, from the caller's
209
+ * permissions and what the request asks for, and does not change afterwards. Participants are not
210
+ * told apart by kind: a person in a browser and a program that operates the session are both
211
+ * participants, named by the `client_name` they choose, and either can be disconnected.
212
+ *
213
+ * Every participant that ends, including through `DELETE`, is announced through EventBus as
214
+ * `leaflow.fleet.participant.ended`, addressed to its user in the current project, with its
215
+ * `session_id`, `participant_id` (a decimal string) and `reason`: `left` when its user ended it,
216
+ * `removed` when someone else did, `lease_expired` when it was not renewed in time,
217
+ * `session_ended` when its session ended, `session_process_lost` when the session's process did
218
+ * not come back in time, `permission_revoked` when a permission it was created with was revoked
219
+ * from its user, `membership_ended` when its user is no longer a member of the project,
220
+ * `user_inactive` when its user's account was suspended or banned or its deletion was requested,
221
+ * `project_deletion_requested` when deletion of the project was requested, `machine_removed` when
222
+ * its machine was removed, or `key_revoked` when the key that signed its authorization was
223
+ * revoked. A participant whose creation failed is not announced.
224
+ * OpenAPI spec version: 1.0.0
225
+ */
226
+ import * as zod from "zod";
227
+ import { ApproveEnrollmentRequest } from "./validators/approveEnrollmentRequest.zod.js";
228
+ import { CallMcpToolRequest } from "./validators/callMcpToolRequest.zod.js";
229
+ import { CreateGroupMemberRequest } from "./validators/createGroupMemberRequest.zod.js";
230
+ import { CreateGroupRequest } from "./validators/createGroupRequest.zod.js";
231
+ import { CreateMachineRegistrationRequest } from "./validators/createMachineRegistrationRequest.zod.js";
232
+ import { CreateParticipantRequest } from "./validators/createParticipantRequest.zod.js";
233
+ import { CreatePeerConnectionCandidatesRequest } from "./validators/createPeerConnectionCandidatesRequest.zod.js";
234
+ import { CreatePeerConnectionRequest } from "./validators/createPeerConnectionRequest.zod.js";
235
+ import { CreateSessionRequest } from "./validators/createSessionRequest.zod.js";
236
+ import { MigrationStep } from "./validators/migrationStep.zod.js";
237
+ import { RenewParticipantRequest } from "./validators/renewParticipantRequest.zod.js";
238
+ import { ReplaceMcpConfigurationRequest } from "./validators/replaceMcpConfigurationRequest.zod.js";
239
+ import { RunCommandRequest } from "./validators/runCommandRequest.zod.js";
240
+ import { SendMcpRequestRequest } from "./validators/sendMcpRequestRequest.zod.js";
241
+ import { UpdateAccountRequest } from "./validators/updateAccountRequest.zod.js";
242
+ import { UpdateGroupRequest } from "./validators/updateGroupRequest.zod.js";
243
+ import { UpdateMachineRequest } from "./validators/updateMachineRequest.zod.js";
244
+ import { UpdateMcpServerRequest } from "./validators/updateMcpServerRequest.zod.js";
245
+ import { UpdatePrivilegeAutoApprovalRequest } from "./validators/updatePrivilegeAutoApprovalRequest.zod.js";
246
+ /**
247
+ * Returns the machines of the current project, newest first.
248
+ * @summary List machines
249
+ */
250
+ export const listMachinesQueryPageDefault = 1;
251
+ export const listMachinesQueryPageMax = 2147483647;
252
+ export const listMachinesQueryPageSizeDefault = 50;
253
+ export const listMachinesQueryPageSizeMax = 200;
254
+ export const listMachinesQueryKeywordMax = 128;
255
+ export const ListMachinesQueryParams = zod.strictObject({
256
+ page: zod
257
+ .int()
258
+ .min(1)
259
+ .max(listMachinesQueryPageMax)
260
+ .default(listMachinesQueryPageDefault)
261
+ .describe("1-based page number. Defaults to 1."),
262
+ page_size: zod
263
+ .int()
264
+ .min(1)
265
+ .max(listMachinesQueryPageSizeMax)
266
+ .default(listMachinesQueryPageSizeDefault)
267
+ .describe("Items per page. Defaults to 50; at most 200."),
268
+ keyword: zod
269
+ .string()
270
+ .max(listMachinesQueryKeywordMax)
271
+ .optional()
272
+ .describe("Match the machine name or host name, case-insensitively"),
273
+ });
274
+ /**
275
+ * @summary Get a machine
276
+ */
277
+ export const GetMachineParams = zod.strictObject({
278
+ machineId: zod.uuid(),
279
+ });
280
+ /**
281
+ * Changes the machine's name. Requires `fleet:machines.manage`.
282
+ * @summary Update a machine
283
+ */
284
+ export const UpdateMachineParams = zod.strictObject({
285
+ machineId: zod.uuid(),
286
+ });
287
+ export const UpdateMachineBody = UpdateMachineRequest;
288
+ /**
289
+ * Removes the machine from the project. Every participant of its sessions is disconnected at
290
+ * once and the Agent is refused from then on; to use the machine again, enroll it again.
291
+ * Sessions still open on the machine can no longer be reached and end according to their own
292
+ * timeouts. Nothing on the machine is deleted.
293
+ *
294
+ * Requires `fleet:machines.manage`.
295
+ * @summary Remove a machine
296
+ */
297
+ export const DeleteMachineParams = zod.strictObject({
298
+ machineId: zod.uuid(),
299
+ });
300
+ /**
301
+ * Returns what the machine reported about itself, newest first, such as a directory account
302
+ * it does not serve because a local account uses its name. Events are kept for 30 days.
303
+ * @summary List the events of a machine
304
+ */
305
+ export const ListMachineEventsParams = zod.strictObject({
306
+ machineId: zod.uuid(),
307
+ });
308
+ export const listMachineEventsQueryPageDefault = 1;
309
+ export const listMachineEventsQueryPageMax = 2147483647;
310
+ export const listMachineEventsQueryPageSizeDefault = 50;
311
+ export const listMachineEventsQueryPageSizeMax = 200;
312
+ export const ListMachineEventsQueryParams = zod.strictObject({
313
+ page: zod
314
+ .int()
315
+ .min(1)
316
+ .max(listMachineEventsQueryPageMax)
317
+ .default(listMachineEventsQueryPageDefault)
318
+ .describe("1-based page number. Defaults to 1."),
319
+ page_size: zod
320
+ .int()
321
+ .min(1)
322
+ .max(listMachineEventsQueryPageSizeMax)
323
+ .default(listMachineEventsQueryPageSizeDefault)
324
+ .describe("Items per page. Defaults to 50; at most 200."),
325
+ type: zod
326
+ .enum(["directory_account_conflict", "directory_group_conflict"])
327
+ .optional()
328
+ .describe("Return only events of this type"),
329
+ });
330
+ /**
331
+ * Runs one command line on the machine as the caller's account, with its login shell, and
332
+ * returns once it exited or was killed, with its exit status and what it wrote. Pipes,
333
+ * redirection and `&&` work; there is no terminal and no standard input. The machine admits
334
+ * the account through PAM as for a login. The account is created if the caller has none yet.
335
+ * A command that fails is still a successful request: its exit status is its result.
336
+ *
337
+ * Inside the command, `sudo` works without a prompt while the caller has
338
+ * `fleet:machines.admin` on the machine, and refuses otherwise.
339
+ *
340
+ * The request is held until the command ends, at most `timeout_seconds` and a few seconds
341
+ * more. Neither the command nor its output is hidden from the platform: do not put secrets
342
+ * into either.
343
+ *
344
+ * Requires `fleet:machines.login` on the machine.
345
+ *
346
+ * Fails with:
347
+ * - `MACHINE_OFFLINE` when the machine is not connected and does not connect again in time;
348
+ * - `FEATURE_UNAVAILABLE` when the machine does not offer `leaflow.fleet.command.v1`;
349
+ * - `USER_NOT_FOUND`, `USER_NOT_ALLOWED`, `ACCOUNT_EXPIRED` or `PAM_PERMISSION_DENIED` when
350
+ * the machine refuses the account, as for opening a session;
351
+ * - `COMMAND_START_FAILED` when the shell could not start; nothing ran;
352
+ * - `COMMAND_LOST` when the machine lost the command while it ran. The command may have run
353
+ * in part, and its output is lost;
354
+ * - `MACHINE_TIMEOUT` when the machine did not answer in time. The command may have run.
355
+ * @summary Run a command
356
+ */
357
+ export const RunMachineCommandParams = zod.strictObject({
358
+ machineId: zod.uuid(),
359
+ });
360
+ export const RunMachineCommandBody = RunCommandRequest;
361
+ /**
362
+ * Returns the caller's MCP configuration file on the machine and every server in it, with
363
+ * what each is doing now. The values of `env` and `headers` are never returned, only their
364
+ * keys. Requires `fleet:machines.login` on the machine.
365
+ *
366
+ * Fails with:
367
+ * - `MACHINE_OFFLINE` when the machine is not connected and does not connect again in time;
368
+ * - `FEATURE_UNAVAILABLE` when the machine does not offer `leaflow.fleet.mcp.v1`;
369
+ * - `USER_NOT_FOUND`, `USER_NOT_ALLOWED`, `ACCOUNT_EXPIRED` or `PAM_PERMISSION_DENIED` when
370
+ * the machine refuses the account, as for opening a session;
371
+ * - `MACHINE_TIMEOUT` when the machine did not answer in time.
372
+ * @summary Get the caller's MCP configuration on a machine
373
+ */
374
+ export const GetMcpConfigurationParams = zod.strictObject({
375
+ machineId: zod.uuid(),
376
+ });
377
+ /**
378
+ * Replaces the caller's MCP configuration file on the machine as a whole, also one that cannot
379
+ * be read or is not valid. The machine starts the servers that were added, stops the ones
380
+ * that were removed and restarts the ones that changed when they are next used. The account
381
+ * is created if the caller has none yet. The content, secrets included, passes through the
382
+ * platform. Requires `fleet:machines.login` on the machine.
383
+ *
384
+ * Fails with:
385
+ * - `MCP_CONFIGURATION_CHANGED` when the file is no longer at `expected_revision`;
386
+ * - `MCP_CONFIGURATION_INVALID` when `content` is not an object with an object `mcpServers`,
387
+ * with `metadata.line` and `metadata.column`;
388
+ * - `MACHINE_OFFLINE` when the machine is not connected and does not connect again in time;
389
+ * - `FEATURE_UNAVAILABLE` when the machine does not offer `leaflow.fleet.mcp.v1`;
390
+ * - `USER_NOT_FOUND`, `USER_NOT_ALLOWED`, `ACCOUNT_EXPIRED` or `PAM_PERMISSION_DENIED` when
391
+ * the machine refuses the account, as for opening a session;
392
+ * - `MACHINE_TIMEOUT` when the machine did not answer in time.
393
+ * @summary Replace the caller's MCP configuration on a machine
394
+ */
395
+ export const ReplaceMcpConfigurationParams = zod.strictObject({
396
+ machineId: zod.uuid(),
397
+ });
398
+ export const ReplaceMcpConfigurationBody = ReplaceMcpConfigurationRequest;
399
+ /**
400
+ * Adds a server to the caller's MCP configuration on the machine, or replaces the one with
401
+ * the same name. The values of `env` and `headers` the request gives, secrets included, pass
402
+ * through the platform; those named in `keep_env` and `keep_headers` stay as they are on the
403
+ * machine. The account is created if the caller has none yet. Requires
404
+ * `fleet:machines.login` on the machine.
405
+ *
406
+ * Fails with:
407
+ * - `MCP_CONFIGURATION_CHANGED` when the file is no longer at `expected_revision`;
408
+ * - `MCP_CONFIGURATION_INVALID` when the file cannot be read or is not valid; replace it
409
+ * whole first;
410
+ * - `MACHINE_OFFLINE` when the machine is not connected and does not connect again in time;
411
+ * - `FEATURE_UNAVAILABLE` when the machine does not offer `leaflow.fleet.mcp.v1`;
412
+ * - `USER_NOT_FOUND`, `USER_NOT_ALLOWED`, `ACCOUNT_EXPIRED` or `PAM_PERMISSION_DENIED` when
413
+ * the machine refuses the account, as for opening a session;
414
+ * - `MACHINE_TIMEOUT` when the machine did not answer in time.
415
+ * @summary Add or replace an MCP server
416
+ */
417
+ export const updateMcpServerPathServerNameRegExp = new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$");
418
+ export const UpdateMcpServerParams = zod.strictObject({
419
+ machineId: zod.uuid(),
420
+ serverName: zod
421
+ .string()
422
+ .regex(updateMcpServerPathServerNameRegExp)
423
+ .describe("The server's key in `mcpServers`: a letter or digit, then up to 63 letters, digits, `_`\nor `-`, without `__`, since the tools of all servers are named `<server>__<tool>` together"),
424
+ });
425
+ export const UpdateMcpServerBody = UpdateMcpServerRequest;
426
+ /**
427
+ * Removes a server from the caller's MCP configuration on the machine and stops it. Removing
428
+ * one that is not configured succeeds. Requires `fleet:machines.login` on the machine.
429
+ *
430
+ * Fails as replacing a server does.
431
+ * @summary Remove an MCP server
432
+ */
433
+ export const deleteMcpServerPathServerNameRegExp = new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$");
434
+ export const DeleteMcpServerParams = zod.strictObject({
435
+ machineId: zod.uuid(),
436
+ serverName: zod
437
+ .string()
438
+ .regex(deleteMcpServerPathServerNameRegExp)
439
+ .describe("The server's key in `mcpServers`: a letter or digit, then up to 63 letters, digits, `_`\nor `-`, without `__`, since the tools of all servers are named `<server>__<tool>` together"),
440
+ });
441
+ export const deleteMcpServerQueryExpectedRevisionMax = 64;
442
+ export const DeleteMcpServerQueryParams = zod.strictObject({
443
+ expected_revision: zod
444
+ .string()
445
+ .max(deleteMcpServerQueryExpectedRevisionMax)
446
+ .optional()
447
+ .describe("The configuration's `revision` as last read; absent only for one that was `missing`"),
448
+ });
449
+ /**
450
+ * Sends one JSON-RPC request of MCP to one of the caller's servers on the machine, such as
451
+ * `tools/call`, `resources/read` or `prompts/get`, and returns the server's response. The
452
+ * machine starts or connects to the server if it is not running, and handles its
453
+ * initialization itself; a request still running when `timeout_seconds` passes is cancelled
454
+ * at the server. Requests the server makes of the client, such as for sampling, are refused,
455
+ * and its notifications, such as of progress, are dropped. A response with a JSON-RPC error
456
+ * is a successful request. Neither the request nor the response is hidden from the
457
+ * platform. Requires `fleet:machines.login` on the machine.
458
+ *
459
+ * Fails with:
460
+ * - `MCP_SERVER_NOT_FOUND` when the server is not configured;
461
+ * - `MCP_SERVER_UNAVAILABLE` when it could not be started or reached, with
462
+ * `metadata.failure`, an `McpServerFailure`;
463
+ * - `INVALID_ARGUMENT` when `request` is not one JSON-RPC request, such as a notification, or
464
+ * is one of initialization;
465
+ * - `RESULT_TOO_LARGE` when the response is larger than 8 MiB;
466
+ * - `MACHINE_OFFLINE` when the machine is not connected and does not connect again in time;
467
+ * - `FEATURE_UNAVAILABLE` when the machine does not offer `leaflow.fleet.mcp.v1`;
468
+ * - `USER_NOT_FOUND`, `USER_NOT_ALLOWED`, `ACCOUNT_EXPIRED` or `PAM_PERMISSION_DENIED` when
469
+ * the machine refuses the account, as for opening a session;
470
+ * - `MACHINE_TIMEOUT` when the machine did not answer in time.
471
+ * @summary Send an MCP request to a server
472
+ */
473
+ export const sendMcpRequestPathServerNameRegExp = new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$");
474
+ export const SendMcpRequestParams = zod.strictObject({
475
+ machineId: zod.uuid(),
476
+ serverName: zod
477
+ .string()
478
+ .regex(sendMcpRequestPathServerNameRegExp)
479
+ .describe("The server's key in `mcpServers`: a letter or digit, then up to 63 letters, digits, `_`\nor `-`, without `__`, since the tools of all servers are named `<server>__<tool>` together"),
480
+ });
481
+ export const SendMcpRequestBody = SendMcpRequestRequest;
482
+ /**
483
+ * Calls one tool of one of the caller's servers on the machine and returns its MCP
484
+ * `CallToolResult`. A tool that reports an error, with `isError`, is a successful request. A
485
+ * tool whose name cannot appear in a path is called with `send-mcp-request`. Neither the
486
+ * arguments nor the result is hidden from the platform. Requires `fleet:machines.login` on
487
+ * the machine.
488
+ *
489
+ * Fails as sending a request does, and with `MCP_REQUEST_FAILED` when the server answers
490
+ * with a JSON-RPC error, such as for a tool it does not offer or arguments it does not
491
+ * accept, with the error's `metadata.code` and `metadata.message`.
492
+ * @summary Call an MCP tool
493
+ */
494
+ export const callMcpToolPathServerNameRegExp = new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$");
495
+ export const callMcpToolPathToolNameMax = 128;
496
+ export const CallMcpToolParams = zod.strictObject({
497
+ machineId: zod.uuid(),
498
+ serverName: zod
499
+ .string()
500
+ .regex(callMcpToolPathServerNameRegExp)
501
+ .describe("The server's key in `mcpServers`: a letter or digit, then up to 63 letters, digits, `_`\nor `-`, without `__`, since the tools of all servers are named `<server>__<tool>` together"),
502
+ toolName: zod.string().min(1).max(callMcpToolPathToolNameMax),
503
+ });
504
+ export const CallMcpToolBody = CallMcpToolRequest;
505
+ /**
506
+ * Lists the tools of the caller's servers on the machine, or of one of them, that match
507
+ * `query`: every word of it, ignoring case, in the tool's name, title or description. They
508
+ * are ordered by server, then by tool name. Servers that are not running are started to
509
+ * learn their tools; one that cannot be is named in `unavailable_servers`, and the others are
510
+ * listed anyway. Slow servers do not hold the request up: those still starting are named
511
+ * with `timeout` and go on starting, so that a later request lists their tools. Requires
512
+ * `fleet:machines.login` on the machine.
513
+ *
514
+ * Fails with:
515
+ * - `MCP_SERVER_NOT_FOUND` when `server` is not configured;
516
+ * - `MACHINE_OFFLINE` when the machine is not connected and does not connect again in time;
517
+ * - `FEATURE_UNAVAILABLE` when the machine does not offer `leaflow.fleet.mcp.v1`;
518
+ * - `USER_NOT_FOUND`, `USER_NOT_ALLOWED`, `ACCOUNT_EXPIRED` or `PAM_PERMISSION_DENIED` when
519
+ * the machine refuses the account, as for opening a session;
520
+ * - `MACHINE_TIMEOUT` when the machine did not answer in time.
521
+ * @summary List the caller's MCP tools on a machine
522
+ */
523
+ export const ListMcpToolsParams = zod.strictObject({
524
+ machineId: zod.uuid(),
525
+ });
526
+ export const listMcpToolsQueryServerMax = 64;
527
+ export const listMcpToolsQueryQueryMax = 256;
528
+ export const listMcpToolsQueryPageSizeDefault = 100;
529
+ export const listMcpToolsQueryPageSizeMax = 500;
530
+ export const listMcpToolsQueryPageTokenMax = 1024;
531
+ export const ListMcpToolsQueryParams = zod.strictObject({
532
+ server: zod
533
+ .string()
534
+ .max(listMcpToolsQueryServerMax)
535
+ .optional()
536
+ .describe("Only this server's tools"),
537
+ query: zod
538
+ .string()
539
+ .max(listMcpToolsQueryQueryMax)
540
+ .optional()
541
+ .describe("Words that each must occur in a tool's name, title or description"),
542
+ page_size: zod
543
+ .int()
544
+ .min(1)
545
+ .max(listMcpToolsQueryPageSizeMax)
546
+ .default(listMcpToolsQueryPageSizeDefault),
547
+ page_token: zod
548
+ .string()
549
+ .max(listMcpToolsQueryPageTokenMax)
550
+ .optional()
551
+ .describe("`next_page_token` of the previous page"),
552
+ });
553
+ /**
554
+ * Returns the caller's automatic approval of their privilege requests on the machine. Fails
555
+ * with `PRIVILEGE_AUTO_APPROVAL_NOT_FOUND` while the caller is asked every time, including
556
+ * after its `expires_at` has passed.
557
+ * @summary Get the caller's automatic approval for a machine
558
+ */
559
+ export const GetPrivilegeAutoApprovalParams = zod.strictObject({
560
+ machineId: zod.uuid(),
561
+ });
562
+ /**
563
+ * Approves the caller's privilege requests on the machine at once, until `expires_at`, or
564
+ * until removed when `expires_at` is null, replacing any earlier automatic approval. It
565
+ * applies to the caller's own account only, which is created if the caller has none yet,
566
+ * and only while they may become root on the machine. Fails with `INVALID_ARGUMENT` when
567
+ * `expires_at` has passed.
568
+ * @summary Approve the caller's privilege requests on a machine without asking
569
+ */
570
+ export const UpdatePrivilegeAutoApprovalParams = zod.strictObject({
571
+ machineId: zod.uuid(),
572
+ });
573
+ export const UpdatePrivilegeAutoApprovalBody = UpdatePrivilegeAutoApprovalRequest;
574
+ /**
575
+ * Removes it: the caller is asked about every later privilege request on the machine.
576
+ * Removing one that does not exist succeeds.
577
+ * @summary Remove the caller's automatic approval for a machine
578
+ */
579
+ export const DeletePrivilegeAutoApprovalParams = zod.strictObject({
580
+ machineId: zod.uuid(),
581
+ });
582
+ /**
583
+ * Returns the caller's automatic approvals on the machines of the current project that are
584
+ * in effect, the most recently set first.
585
+ * @summary List the caller's automatic approvals
586
+ */
587
+ export const listPrivilegeAutoApprovalsQueryPageDefault = 1;
588
+ export const listPrivilegeAutoApprovalsQueryPageMax = 2147483647;
589
+ export const listPrivilegeAutoApprovalsQueryPageSizeDefault = 50;
590
+ export const listPrivilegeAutoApprovalsQueryPageSizeMax = 200;
591
+ export const ListPrivilegeAutoApprovalsQueryParams = zod.strictObject({
592
+ page: zod
593
+ .int()
594
+ .min(1)
595
+ .max(listPrivilegeAutoApprovalsQueryPageMax)
596
+ .default(listPrivilegeAutoApprovalsQueryPageDefault)
597
+ .describe("1-based page number. Defaults to 1."),
598
+ page_size: zod
599
+ .int()
600
+ .min(1)
601
+ .max(listPrivilegeAutoApprovalsQueryPageSizeMax)
602
+ .default(listPrivilegeAutoApprovalsQueryPageSizeDefault)
603
+ .describe("Items per page. Defaults to 50; at most 200."),
604
+ });
605
+ /**
606
+ * Returns the caller's privilege requests on the project's machines, newest first. Requests
607
+ * are kept for 30 days.
608
+ * @summary List the caller's privilege requests
609
+ */
610
+ export const listPrivilegeRequestsQueryPageDefault = 1;
611
+ export const listPrivilegeRequestsQueryPageMax = 2147483647;
612
+ export const listPrivilegeRequestsQueryPageSizeDefault = 50;
613
+ export const listPrivilegeRequestsQueryPageSizeMax = 200;
614
+ export const ListPrivilegeRequestsQueryParams = zod.strictObject({
615
+ page: zod
616
+ .int()
617
+ .min(1)
618
+ .max(listPrivilegeRequestsQueryPageMax)
619
+ .default(listPrivilegeRequestsQueryPageDefault)
620
+ .describe("1-based page number. Defaults to 1."),
621
+ page_size: zod
622
+ .int()
623
+ .min(1)
624
+ .max(listPrivilegeRequestsQueryPageSizeMax)
625
+ .default(listPrivilegeRequestsQueryPageSizeDefault)
626
+ .describe("Items per page. Defaults to 50; at most 200."),
627
+ state: zod
628
+ .enum(["pending", "approved", "denied", "expired", "cancelled"])
629
+ .optional()
630
+ .describe("Return only the requests in this state"),
631
+ machine_id: zod.uuid().optional().describe("Return only the requests on this machine"),
632
+ });
633
+ /**
634
+ * Returns one of the caller's privilege requests.
635
+ * @summary Get a privilege request
636
+ */
637
+ export const GetPrivilegeRequestParams = zod.strictObject({
638
+ requestId: zod.uuid(),
639
+ });
640
+ /**
641
+ * Approves one of the caller's pending requests; the waiting sudo goes on as root. Fails with
642
+ * `PRIVILEGE_REQUEST_CLOSED` when the request is no longer pending, with `metadata.state`
643
+ * giving how it ended.
644
+ * @summary Approve a privilege request
645
+ */
646
+ export const ApprovePrivilegeRequestParams = zod.strictObject({
647
+ requestId: zod.uuid(),
648
+ });
649
+ /**
650
+ * Denies one of the caller's pending requests; the waiting sudo fails. Fails with
651
+ * `PRIVILEGE_REQUEST_CLOSED` as for approving.
652
+ * @summary Deny a privilege request
653
+ */
654
+ export const DenyPrivilegeRequestParams = zod.strictObject({
655
+ requestId: zod.uuid(),
656
+ });
657
+ /**
658
+ * Returns the pending enrollment request whose pairing code matches, or no enrollment when
659
+ * none does. Mistyped codes are expected and are not an error. Letters are matched
660
+ * case-insensitively, `I` and `L` are read as `1`, `O` as `0`, and spaces and hyphens are
661
+ * ignored.
662
+ *
663
+ * Only requests that are still pending are found. A request is pending while its machine
664
+ * keeps polling; one it stops polling expires after a few hours.
665
+ *
666
+ * Requires `fleet:machines.manage`.
667
+ * @summary Find an enrollment request by its pairing code
668
+ */
669
+ export const findEnrollmentByPairingCodeQueryPairingCodeMax = 32;
670
+ export const FindEnrollmentByPairingCodeQueryParams = zod.strictObject({
671
+ pairing_code: zod
672
+ .string()
673
+ .min(1)
674
+ .max(findEnrollmentByPairingCodeQueryPairingCodeMax)
675
+ .describe("The code the machine shows, such as `7K2QM-9XWTD`"),
676
+ });
677
+ /**
678
+ * Adds the machine to the current project under the given name and returns it. The Agent
679
+ * learns the decision the next time it polls.
680
+ *
681
+ * A request that is no longer pending is rejected with `ENROLLMENT_NOT_PENDING`.
682
+ *
683
+ * Requires `fleet:machines.manage`.
684
+ * @summary Approve an enrollment request
685
+ */
686
+ export const ApproveEnrollmentParams = zod.strictObject({
687
+ enrollmentId: zod.uuid(),
688
+ });
689
+ export const ApproveEnrollmentBody = ApproveEnrollmentRequest;
690
+ /**
691
+ * Refuses the request. The decision is final for the machine's key: the Agent stops
692
+ * polling and reports that it was denied.
693
+ *
694
+ * A request that is no longer pending is rejected with `ENROLLMENT_NOT_PENDING`.
695
+ *
696
+ * Requires `fleet:machines.manage`.
697
+ * @summary Deny an enrollment request
698
+ */
699
+ export const DenyEnrollmentParams = zod.strictObject({
700
+ enrollmentId: zod.uuid(),
701
+ });
702
+ /**
703
+ * Returns the registrations of the current project, newest first. Registrations are kept
704
+ * for 30 days.
705
+ *
706
+ * Requires `fleet:machines.manage`.
707
+ * @summary List machine registrations
708
+ */
709
+ export const listMachineRegistrationsQueryPageDefault = 1;
710
+ export const listMachineRegistrationsQueryPageMax = 2147483647;
711
+ export const listMachineRegistrationsQueryPageSizeDefault = 50;
712
+ export const listMachineRegistrationsQueryPageSizeMax = 200;
713
+ export const ListMachineRegistrationsQueryParams = zod.strictObject({
714
+ page: zod
715
+ .int()
716
+ .min(1)
717
+ .max(listMachineRegistrationsQueryPageMax)
718
+ .default(listMachineRegistrationsQueryPageDefault)
719
+ .describe("1-based page number. Defaults to 1."),
720
+ page_size: zod
721
+ .int()
722
+ .min(1)
723
+ .max(listMachineRegistrationsQueryPageSizeMax)
724
+ .default(listMachineRegistrationsQueryPageSizeDefault)
725
+ .describe("Items per page. Defaults to 50; at most 200."),
726
+ });
727
+ /**
728
+ * Reserves a machine in the current project under the given name and returns the
729
+ * registration with a one-time token. A machine that presents the token when it enrolls
730
+ * joins the project as `registration.machine_id` without approval. The token is returned
731
+ * only in this response and cannot be read again.
732
+ *
733
+ * Requires `fleet:machines.manage`.
734
+ * @summary Create a machine registration
735
+ */
736
+ export const CreateMachineRegistrationBody = CreateMachineRegistrationRequest;
737
+ /**
738
+ * Requires `fleet:machines.manage`.
739
+ * @summary Get a machine registration
740
+ */
741
+ export const GetMachineRegistrationParams = zod.strictObject({
742
+ registrationId: zod.uuid(),
743
+ });
744
+ /**
745
+ * Revokes the registration: its token no longer enrolls a machine. Revoking a registration
746
+ * that is already revoked or expired succeeds and changes nothing else. A registration that
747
+ * a machine has used is rejected with `MACHINE_REGISTRATION_USED`; to remove that machine,
748
+ * delete the machine.
749
+ *
750
+ * Requires `fleet:machines.manage`.
751
+ * @summary Revoke a machine registration
752
+ */
753
+ export const DeleteMachineRegistrationParams = zod.strictObject({
754
+ registrationId: zod.uuid(),
755
+ });
756
+ /**
757
+ * Returns the accounts of the project's members, ordered by username. A member who has never
758
+ * been able to log in to a machine has no account yet.
759
+ * @summary List accounts
760
+ */
761
+ export const listAccountsQueryPageDefault = 1;
762
+ export const listAccountsQueryPageMax = 2147483647;
763
+ export const listAccountsQueryPageSizeDefault = 50;
764
+ export const listAccountsQueryPageSizeMax = 200;
765
+ export const listAccountsQueryKeywordMax = 128;
766
+ export const ListAccountsQueryParams = zod.strictObject({
767
+ page: zod
768
+ .int()
769
+ .min(1)
770
+ .max(listAccountsQueryPageMax)
771
+ .default(listAccountsQueryPageDefault)
772
+ .describe("1-based page number. Defaults to 1."),
773
+ page_size: zod
774
+ .int()
775
+ .min(1)
776
+ .max(listAccountsQueryPageSizeMax)
777
+ .default(listAccountsQueryPageSizeDefault)
778
+ .describe("Items per page. Defaults to 50; at most 200."),
779
+ user_id: zod.uuid().optional().describe("Return only the account of this member"),
780
+ keyword: zod
781
+ .string()
782
+ .max(listAccountsQueryKeywordMax)
783
+ .optional()
784
+ .describe("Match the username or the display name, case-insensitively"),
785
+ });
786
+ /**
787
+ * Returns the account of a member of the project.
788
+ * @summary Get an account
789
+ */
790
+ export const GetAccountParams = zod.strictObject({
791
+ accountId: zod.uuid(),
792
+ });
793
+ /**
794
+ * Changes the caller's own account, only the fields present in the request. The account is
795
+ * the same in every project, and a new username takes effect on the machines of all of them
796
+ * within about a minute; the uid stays, so files keep their owner.
797
+ *
798
+ * Fails with:
799
+ * - `ACCOUNT_NOT_OWNED` when the account is another member's;
800
+ * - `DIRECTORY_NAME_TAKEN` when another account or a group uses the username.
801
+ * @summary Update an account
802
+ */
803
+ export const UpdateAccountParams = zod.strictObject({
804
+ accountId: zod.uuid(),
805
+ });
806
+ export const UpdateAccountBody = UpdateAccountRequest;
807
+ /**
808
+ * Returns the groups of the project's directory, ordered by name.
809
+ * @summary List groups
810
+ */
811
+ export const listGroupsQueryPageDefault = 1;
812
+ export const listGroupsQueryPageMax = 2147483647;
813
+ export const listGroupsQueryPageSizeDefault = 50;
814
+ export const listGroupsQueryPageSizeMax = 200;
815
+ export const ListGroupsQueryParams = zod.strictObject({
816
+ page: zod
817
+ .int()
818
+ .min(1)
819
+ .max(listGroupsQueryPageMax)
820
+ .default(listGroupsQueryPageDefault)
821
+ .describe("1-based page number. Defaults to 1."),
822
+ page_size: zod
823
+ .int()
824
+ .min(1)
825
+ .max(listGroupsQueryPageSizeMax)
826
+ .default(listGroupsQueryPageSizeDefault)
827
+ .describe("Items per page. Defaults to 50; at most 200."),
828
+ });
829
+ /**
830
+ * Creates a group in the project's directory. It reaches the machines within about a minute.
831
+ *
832
+ * Fails with `DIRECTORY_NAME_TAKEN` when an account, or another group of the project, uses the
833
+ * name.
834
+ *
835
+ * Requires `fleet:directory.manage`.
836
+ * @summary Create a group
837
+ */
838
+ export const CreateGroupBody = CreateGroupRequest;
839
+ /**
840
+ * @summary Get a group
841
+ */
842
+ export const GetGroupParams = zod.strictObject({
843
+ groupId: zod.uuid(),
844
+ });
845
+ /**
846
+ * The gid stays, so files keep their group. Fails with `DIRECTORY_NAME_TAKEN` as for creating
847
+ * a group.
848
+ *
849
+ * Requires `fleet:directory.manage`.
850
+ * @summary Rename a group
851
+ */
852
+ export const UpdateGroupParams = zod.strictObject({
853
+ groupId: zod.uuid(),
854
+ });
855
+ export const UpdateGroupBody = UpdateGroupRequest;
856
+ /**
857
+ * Removes the group from the directory. Machines stop resolving it within about a minute;
858
+ * files keep its gid.
859
+ *
860
+ * Requires `fleet:directory.manage`.
861
+ * @summary Delete a group
862
+ */
863
+ export const DeleteGroupParams = zod.strictObject({
864
+ groupId: zod.uuid(),
865
+ });
866
+ /**
867
+ * Returns the accounts in the group, ordered by username.
868
+ * @summary List the members of a group
869
+ */
870
+ export const ListGroupMembersParams = zod.strictObject({
871
+ groupId: zod.uuid(),
872
+ });
873
+ export const listGroupMembersQueryPageDefault = 1;
874
+ export const listGroupMembersQueryPageMax = 2147483647;
875
+ export const listGroupMembersQueryPageSizeDefault = 50;
876
+ export const listGroupMembersQueryPageSizeMax = 200;
877
+ export const ListGroupMembersQueryParams = zod.strictObject({
878
+ page: zod
879
+ .int()
880
+ .min(1)
881
+ .max(listGroupMembersQueryPageMax)
882
+ .default(listGroupMembersQueryPageDefault)
883
+ .describe("1-based page number. Defaults to 1."),
884
+ page_size: zod
885
+ .int()
886
+ .min(1)
887
+ .max(listGroupMembersQueryPageSizeMax)
888
+ .default(listGroupMembersQueryPageSizeDefault)
889
+ .describe("Items per page. Defaults to 50; at most 200."),
890
+ });
891
+ /**
892
+ * The account must be a member's. Fails with `GROUP_MEMBER_EXISTS` when the account is
893
+ * already in the group.
894
+ *
895
+ * Requires `fleet:directory.manage`.
896
+ * @summary Add an account to a group
897
+ */
898
+ export const CreateGroupMemberParams = zod.strictObject({
899
+ groupId: zod.uuid(),
900
+ });
901
+ export const CreateGroupMemberBody = CreateGroupMemberRequest;
902
+ /**
903
+ * Removing an account that is not in the group succeeds.
904
+ *
905
+ * Requires `fleet:directory.manage`.
906
+ * @summary Remove an account from a group
907
+ */
908
+ export const DeleteGroupMemberParams = zod.strictObject({
909
+ groupId: zod.uuid(),
910
+ accountId: zod.uuid(),
911
+ });
912
+ /**
913
+ * Returns the sessions of the current project's machines, newest first. Closed sessions are
914
+ * omitted unless `include_closed` is true.
915
+ * @summary List sessions
916
+ */
917
+ export const listSessionsQueryPageDefault = 1;
918
+ export const listSessionsQueryPageMax = 2147483647;
919
+ export const listSessionsQueryPageSizeDefault = 50;
920
+ export const listSessionsQueryPageSizeMax = 200;
921
+ export const listSessionsQueryIncludeClosedDefault = false;
922
+ export const ListSessionsQueryParams = zod.strictObject({
923
+ page: zod
924
+ .int()
925
+ .min(1)
926
+ .max(listSessionsQueryPageMax)
927
+ .default(listSessionsQueryPageDefault)
928
+ .describe("1-based page number. Defaults to 1."),
929
+ page_size: zod
930
+ .int()
931
+ .min(1)
932
+ .max(listSessionsQueryPageSizeMax)
933
+ .default(listSessionsQueryPageSizeDefault)
934
+ .describe("Items per page. Defaults to 50; at most 200."),
935
+ machine_id: zod.uuid().optional().describe("Return only the sessions of this machine"),
936
+ user_id: zod.uuid().optional().describe("Return only the sessions of this member"),
937
+ include_closed: zod
938
+ .boolean()
939
+ .default(listSessionsQueryIncludeClosedDefault)
940
+ .describe("Include closed sessions; defaults to false"),
941
+ });
942
+ /**
943
+ * Opens a session for the caller on a machine, as the caller's account, and returns once it
944
+ * is ready. With `desktop` the session has a desktop. Without, it is a terminal session: its
945
+ * one terminal runs the caller's login shell from the start, every participant attaches to
946
+ * that terminal, and the session ends when the shell exits; a caller who wants another
947
+ * terminal opens another session. Either kind also offers programs, files, ports, sound,
948
+ * devices, printers and privilege approvals. The account is created if the caller has none
949
+ * yet. Requires `fleet:machines.login` on the machine.
950
+ *
951
+ * On a machine an account has at most one session with a desktop and at most 8 sessions in
952
+ * all. Sessions without a desktop run side by side, such as one for a program and one for a
953
+ * person; several participants can also share one session.
954
+ *
955
+ * Fails with:
956
+ * - `MACHINE_OFFLINE` when the machine is not connected and does not connect again in time;
957
+ * - `FEATURE_UNAVAILABLE` when the machine does not offer sessions, or with `desktop`,
958
+ * desktops;
959
+ * - `USER_HAS_DESKTOP_SESSION` with `desktop` when the account already has a session with a
960
+ * desktop on the machine, which `metadata.sessionId` names; connect to it instead;
961
+ * - `SESSION_LIMIT_REACHED` when the account already has 8 open sessions on the machine;
962
+ * close one first;
963
+ * - `USER_NOT_FOUND`, `USER_NOT_ALLOWED`, `ACCOUNT_EXPIRED` or `PAM_PERMISSION_DENIED` when
964
+ * the machine refuses the account, such as while it has not received the account yet or a
965
+ * local account uses its name; `PAM_PERMISSION_DENIED` carries the machine's message in
966
+ * `metadata.pamMessage`;
967
+ * - `SESSION_CONFLICT` with `desktop` when the account has a graphical session on the
968
+ * machine that Fleet did not open;
969
+ * - `DISPLAY_UNAVAILABLE` or `SESSION_START_FAILED` when the machine could not start it;
970
+ * - `MACHINE_TIMEOUT` when the machine did not answer in time. The session may still open;
971
+ * list the sessions before trying again.
972
+ * @summary Open a session
973
+ */
974
+ export const CreateSessionBody = CreateSessionRequest;
975
+ /**
976
+ * @summary Get a session
977
+ */
978
+ export const getSessionPathSessionIdMax = 40;
979
+ export const getSessionPathSessionIdRegExp = new RegExp("^[a-z0-9-]+$");
980
+ export const GetSessionParams = zod.strictObject({
981
+ sessionId: zod
982
+ .string()
983
+ .min(1)
984
+ .max(getSessionPathSessionIdMax)
985
+ .regex(getSessionPathSessionIdRegExp),
986
+ });
987
+ /**
988
+ * Ends the session in order: its applications are asked to exit and get a grace period
989
+ * before the session is terminated. Returns once the session is closed. Closing a closed
990
+ * session succeeds.
991
+ *
992
+ * The owner may close their own session; closing another member's requires
993
+ * `fleet:sessions.manage`. Fails with `MACHINE_OFFLINE` or `MACHINE_TIMEOUT` as
994
+ * for opening a session.
995
+ * @summary Close a session
996
+ */
997
+ export const closeSessionPathSessionIdMax = 40;
998
+ export const closeSessionPathSessionIdRegExp = new RegExp("^[a-z0-9-]+$");
999
+ export const CloseSessionParams = zod.strictObject({
1000
+ sessionId: zod
1001
+ .string()
1002
+ .min(1)
1003
+ .max(closeSessionPathSessionIdMax)
1004
+ .regex(closeSessionPathSessionIdRegExp),
1005
+ });
1006
+ /**
1007
+ * Ends the session at once, killing every process in it. Returns once the session is
1008
+ * closed. Terminating a closed session succeeds.
1009
+ *
1010
+ * The owner may terminate their own session; terminating another member's requires
1011
+ * `fleet:sessions.manage`. Fails with `MACHINE_OFFLINE` or `MACHINE_TIMEOUT` as
1012
+ * for opening a session.
1013
+ * @summary Terminate a session
1014
+ */
1015
+ export const terminateSessionPathSessionIdMax = 40;
1016
+ export const terminateSessionPathSessionIdRegExp = new RegExp("^[a-z0-9-]+$");
1017
+ export const TerminateSessionParams = zod.strictObject({
1018
+ sessionId: zod
1019
+ .string()
1020
+ .min(1)
1021
+ .max(terminateSessionPathSessionIdMax)
1022
+ .regex(terminateSessionPathSessionIdRegExp),
1023
+ });
1024
+ /**
1025
+ * Returns the STUN and TURN servers for the PeerConnections the caller starts to the session,
1026
+ * with TURN credentials of its own, and the policy for using them. Ask again once
1027
+ * `expires_at` has passed; the credentials of a PeerConnection already relayed last longer.
1028
+ *
1029
+ * Requires that the caller may join the session, as for `create-participant`.
1030
+ *
1031
+ * Fails with:
1032
+ * - `SESSION_CLOSED` when the session has ended;
1033
+ * - `SESSION_ACCESS_DENIED` when the caller may not join the session.
1034
+ * @summary Get the ICE servers for a session
1035
+ */
1036
+ export const getSessionRtcConfigurationPathSessionIdMax = 40;
1037
+ export const getSessionRtcConfigurationPathSessionIdRegExp = new RegExp("^[a-z0-9-]+$");
1038
+ export const GetSessionRtcConfigurationParams = zod.strictObject({
1039
+ sessionId: zod
1040
+ .string()
1041
+ .min(1)
1042
+ .max(getSessionRtcConfigurationPathSessionIdMax)
1043
+ .regex(getSessionRtcConfigurationPathSessionIdRegExp),
1044
+ });
1045
+ /**
1046
+ * Admits one participant with the given public key to the session: signs its authorization,
1047
+ * has the session accept it, and starts its first PeerConnection with the offer. The answer
1048
+ * carries the participant, its authorization and the PeerConnection with the session's
1049
+ * answer. The participant lasts while it is renewed.
1050
+ *
1051
+ * Joining again with the public key of one of the caller's participants of the session that
1052
+ * has not ended, with the same `client_name`, `read_only` and `permissions`, returns that
1053
+ * participant with a new PeerConnection for the offer, and the session gains no second
1054
+ * participant: a request whose answer was lost, such as on an unreliable network, is sent
1055
+ * again as it was. Its earlier PeerConnection, whose answer the client never received, is
1056
+ * given up by the session once it fails.
1057
+ *
1058
+ * The owner of a session may operate it. Joining another member's session requires
1059
+ * `fleet:sessions.view`, which admits watching only, or
1060
+ * `fleet:sessions.control`, which also admits operating it. Each further capability
1061
+ * of the session — file transfer, the clipboard, terminals and programs, port forwarding,
1062
+ * devices and audio, printing, SSH agent forwarding, approving privilege requests and
1063
+ * reading logs — is granted only with its permission; a participant that may only watch gets
1064
+ * none of them. A request may ask for less: to watch only, or for some of the capabilities.
1065
+ *
1066
+ * Fails with the following, and then no participant was created:
1067
+ * - `SESSION_CLOSED` when the session has ended;
1068
+ * - `SESSION_ACCESS_DENIED` when the caller may not join the session;
1069
+ * - `OFFER_INVALID` when the offer is not an SDP offer that names a SHA-256 DTLS fingerprint;
1070
+ * - `SESSION_UNAVAILABLE` when the session's process is not connected and does not connect
1071
+ * again in time, or did not answer in time; try again after the error's `retry_delay`;
1072
+ * - `PARTICIPANT_LIMIT_REACHED` when the session has as many participants as it admits;
1073
+ * - `PARTICIPANT_REFUSED` when the session refused the participant;
1074
+ * - `PARTICIPANT_KEY_IN_USE` when the public key belongs to a participant of the session that
1075
+ * another user holds, or that was created with another `client_name`, `read_only` or
1076
+ * `permissions`; join with a new key;
1077
+ * - `PEER_CONNECTION_ABORTED` when the session gave up the PeerConnection; try again with a
1078
+ * new offer. The participant of a repeated request stays.
1079
+ * @summary Join a session
1080
+ */
1081
+ export const createParticipantPathSessionIdMax = 40;
1082
+ export const createParticipantPathSessionIdRegExp = new RegExp("^[a-z0-9-]+$");
1083
+ export const CreateParticipantParams = zod.strictObject({
1084
+ sessionId: zod
1085
+ .string()
1086
+ .min(1)
1087
+ .max(createParticipantPathSessionIdMax)
1088
+ .regex(createParticipantPathSessionIdRegExp),
1089
+ });
1090
+ export const CreateParticipantBody = CreateParticipantRequest;
1091
+ /**
1092
+ * Returns the participants of the session, in the order they joined.
1093
+ * @summary List the participants of a session
1094
+ */
1095
+ export const listSessionParticipantsPathSessionIdMax = 40;
1096
+ export const listSessionParticipantsPathSessionIdRegExp = new RegExp("^[a-z0-9-]+$");
1097
+ export const ListSessionParticipantsParams = zod.strictObject({
1098
+ sessionId: zod
1099
+ .string()
1100
+ .min(1)
1101
+ .max(listSessionParticipantsPathSessionIdMax)
1102
+ .regex(listSessionParticipantsPathSessionIdRegExp),
1103
+ });
1104
+ /**
1105
+ * Extends the participant's lease and returns renewed PeerAuthorizations for the
1106
+ * PeerConnections whose current ones the request presents. The service sends them to the
1107
+ * session as well, and the participant passes each one to the session over its PeerConnection
1108
+ * (`Packet.peer_authorization` of the transport protocol), so that the lease holds while
1109
+ * either path to the session is down. A
1110
+ * presented authorization that the service did not sign for this participant, or whose
1111
+ * PeerConnection has ended, is left out of the answer. When the participant's authorization
1112
+ * nears its end, the answer carries a renewed one, which the session already holds.
1113
+ *
1114
+ * Only the participant's user may renew it.
1115
+ *
1116
+ * Fails with:
1117
+ * - `PARTICIPANT_NOT_FOUND` when the participant has ended; create another;
1118
+ * - `PARTICIPANT_PERMISSION_REVOKED` when a permission the participant was created with has
1119
+ * been revoked from the caller; it has ended, and another can be created with the
1120
+ * permissions the caller holds now;
1121
+ * - `PROJECT_MEMBERSHIP_REQUIRED` when the caller is no longer a member of the project; the
1122
+ * participant has ended.
1123
+ * @summary Renew a participant
1124
+ */
1125
+ export const renewParticipantPathSessionIdMax = 40;
1126
+ export const renewParticipantPathSessionIdRegExp = new RegExp("^[a-z0-9-]+$");
1127
+ export const RenewParticipantParams = zod.strictObject({
1128
+ sessionId: zod
1129
+ .string()
1130
+ .min(1)
1131
+ .max(renewParticipantPathSessionIdMax)
1132
+ .regex(renewParticipantPathSessionIdRegExp),
1133
+ participantId: zod.int().min(1),
1134
+ });
1135
+ export const RenewParticipantBody = RenewParticipantRequest;
1136
+ /**
1137
+ * Passes the participant's checkpoint for the next epoch to the session and returns the
1138
+ * session's checkpoint for it: the `prepare` and `prepared` steps of `Migration` in
1139
+ * `leaflow/fleet/transport/v1/transport.proto`. Repeating the step returns the same answer.
1140
+ *
1141
+ * Only the participant's user may migrate it.
1142
+ *
1143
+ * Fails with:
1144
+ * - `PARTICIPANT_NOT_FOUND` when the participant has ended;
1145
+ * - `CHECKPOINT_INVALID` when the checkpoint is not a serialized `Checkpoint`;
1146
+ * - `SESSION_UNAVAILABLE` when the session's process is not connected and does not connect
1147
+ * again in time, or did not answer in time; try again after the error's `retry_delay`.
1148
+ * @summary Prepare a migration
1149
+ */
1150
+ export const prepareParticipantMigrationPathSessionIdMax = 40;
1151
+ export const prepareParticipantMigrationPathSessionIdRegExp = new RegExp("^[a-z0-9-]+$");
1152
+ export const PrepareParticipantMigrationParams = zod.strictObject({
1153
+ sessionId: zod
1154
+ .string()
1155
+ .min(1)
1156
+ .max(prepareParticipantMigrationPathSessionIdMax)
1157
+ .regex(prepareParticipantMigrationPathSessionIdRegExp),
1158
+ participantId: zod.int().min(1),
1159
+ });
1160
+ export const PrepareParticipantMigrationBody = MigrationStep;
1161
+ /**
1162
+ * Commits the epoch the participant prepared and returns the session's checkpoint once it
1163
+ * committed it: the `commit` and `committed` steps of `Migration` in
1164
+ * `leaflow/fleet/transport/v1/transport.proto`. Repeating the step returns the same answer.
1165
+ *
1166
+ * Only the participant's user may migrate it.
1167
+ *
1168
+ * Fails with:
1169
+ * - `PARTICIPANT_NOT_FOUND` when the participant has ended;
1170
+ * - `CHECKPOINT_INVALID` when the checkpoint is not a serialized `Checkpoint`;
1171
+ * - `SESSION_UNAVAILABLE` when the session's process is not connected and does not connect
1172
+ * again in time, or did not answer in time; try again after the error's `retry_delay`.
1173
+ * @summary Commit a migration
1174
+ */
1175
+ export const commitParticipantMigrationPathSessionIdMax = 40;
1176
+ export const commitParticipantMigrationPathSessionIdRegExp = new RegExp("^[a-z0-9-]+$");
1177
+ export const CommitParticipantMigrationParams = zod.strictObject({
1178
+ sessionId: zod
1179
+ .string()
1180
+ .min(1)
1181
+ .max(commitParticipantMigrationPathSessionIdMax)
1182
+ .regex(commitParticipantMigrationPathSessionIdRegExp),
1183
+ participantId: zod.int().min(1),
1184
+ });
1185
+ export const CommitParticipantMigrationBody = MigrationStep;
1186
+ /**
1187
+ * Starts another PeerConnection of the participant with the offer, such as after a path
1188
+ * failed, and returns the session's answer, its ICE candidates and the signed
1189
+ * PeerAuthorization. Move the participant's connection to it with
1190
+ * `prepare-participant-migration` and `commit-participant-migration`.
1191
+ *
1192
+ * Only the participant's user may start one.
1193
+ *
1194
+ * Fails with:
1195
+ * - `PARTICIPANT_NOT_FOUND` when the participant has ended;
1196
+ * - `OFFER_INVALID` when the offer is not an SDP offer that names a SHA-256 DTLS fingerprint;
1197
+ * - `RATE_LIMIT_EXCEEDED` when the participant started too many PeerConnections in the
1198
+ * last minute; try again after the error's `retry_delay`;
1199
+ * - `SESSION_UNAVAILABLE` when the session's process is not connected and does not connect
1200
+ * again in time, or did not answer in time; try again after the error's `retry_delay`;
1201
+ * - `PEER_CONNECTION_ABORTED` when the session gave up the PeerConnection; start another.
1202
+ * @summary Start a PeerConnection
1203
+ */
1204
+ export const createPeerConnectionPathSessionIdMax = 40;
1205
+ export const createPeerConnectionPathSessionIdRegExp = new RegExp("^[a-z0-9-]+$");
1206
+ export const CreatePeerConnectionParams = zod.strictObject({
1207
+ sessionId: zod
1208
+ .string()
1209
+ .min(1)
1210
+ .max(createPeerConnectionPathSessionIdMax)
1211
+ .regex(createPeerConnectionPathSessionIdRegExp),
1212
+ participantId: zod.int().min(1),
1213
+ });
1214
+ export const CreatePeerConnectionBody = CreatePeerConnectionRequest;
1215
+ /**
1216
+ * Tells the session to give up the PeerConnection and close it. Abandoning a PeerConnection
1217
+ * that has ended succeeds.
1218
+ *
1219
+ * Only the participant's user may abandon it.
1220
+ *
1221
+ * Fails with `PARTICIPANT_NOT_FOUND` when the participant has ended.
1222
+ * @summary Abandon a PeerConnection
1223
+ */
1224
+ export const deletePeerConnectionPathSessionIdMax = 40;
1225
+ export const deletePeerConnectionPathSessionIdRegExp = new RegExp("^[a-z0-9-]+$");
1226
+ export const DeletePeerConnectionParams = zod.strictObject({
1227
+ sessionId: zod
1228
+ .string()
1229
+ .min(1)
1230
+ .max(deletePeerConnectionPathSessionIdMax)
1231
+ .regex(deletePeerConnectionPathSessionIdRegExp),
1232
+ participantId: zod.int().min(1),
1233
+ peerConnectionId: zod.uuid(),
1234
+ });
1235
+ /**
1236
+ * Passes the ICE candidates the participant gathered after its offer to the session, and with
1237
+ * `end_of_candidates`, that it has gathered all (RFC 8838). The session ignores those of a
1238
+ * PeerConnection that has ended.
1239
+ *
1240
+ * Only the participant's user may add them.
1241
+ *
1242
+ * Fails with:
1243
+ * - `PARTICIPANT_NOT_FOUND` when the participant has ended;
1244
+ * - `SESSION_UNAVAILABLE` when the session's process is not connected and does not connect
1245
+ * again in time; try again after the error's `retry_delay`.
1246
+ * @summary Add ICE candidates to a PeerConnection
1247
+ */
1248
+ export const createPeerConnectionCandidatesPathSessionIdMax = 40;
1249
+ export const createPeerConnectionCandidatesPathSessionIdRegExp = new RegExp("^[a-z0-9-]+$");
1250
+ export const CreatePeerConnectionCandidatesParams = zod.strictObject({
1251
+ sessionId: zod
1252
+ .string()
1253
+ .min(1)
1254
+ .max(createPeerConnectionCandidatesPathSessionIdMax)
1255
+ .regex(createPeerConnectionCandidatesPathSessionIdRegExp),
1256
+ participantId: zod.int().min(1),
1257
+ peerConnectionId: zod.uuid(),
1258
+ });
1259
+ export const CreatePeerConnectionCandidatesBody = CreatePeerConnectionCandidatesRequest;
1260
+ /**
1261
+ * Returns a participant of the session.
1262
+ * @summary Get a participant of a session
1263
+ */
1264
+ export const getParticipantPathSessionIdMax = 40;
1265
+ export const getParticipantPathSessionIdRegExp = new RegExp("^[a-z0-9-]+$");
1266
+ export const GetParticipantParams = zod.strictObject({
1267
+ sessionId: zod
1268
+ .string()
1269
+ .min(1)
1270
+ .max(getParticipantPathSessionIdMax)
1271
+ .regex(getParticipantPathSessionIdRegExp),
1272
+ participantId: zod.int().min(1),
1273
+ });
1274
+ /**
1275
+ * Ends the participant: the session detaches it and closes its PeerConnections, and the
1276
+ * session goes on. A participant leaves this way; others are disconnected this way.
1277
+ *
1278
+ * The participant's user and the owner of the session may end it; otherwise this
1279
+ * requires `fleet:sessions.manage`.
1280
+ * @summary End a participant
1281
+ */
1282
+ export const deleteParticipantPathSessionIdMax = 40;
1283
+ export const deleteParticipantPathSessionIdRegExp = new RegExp("^[a-z0-9-]+$");
1284
+ export const DeleteParticipantParams = zod.strictObject({
1285
+ sessionId: zod
1286
+ .string()
1287
+ .min(1)
1288
+ .max(deleteParticipantPathSessionIdMax)
1289
+ .regex(deleteParticipantPathSessionIdRegExp),
1290
+ participantId: zod.int().min(1),
1291
+ });