@leaflow/sdk 0.202.0 → 0.203.1

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 (211) hide show
  1. package/dist/fleet/v1/generated/functions.d.ts +36 -23
  2. package/dist/fleet/v1/generated/functions.js +28 -18
  3. package/dist/fleet/v1/generated/models.d.ts +40 -23
  4. package/dist/fleet/v1/generated/models.js +1 -1
  5. package/dist/fleet/v1/generated/schemas.zod.d.ts +37 -31
  6. package/dist/fleet/v1/generated/schemas.zod.js +57 -28
  7. package/dist/fleet/v1/generated/validators/accountList.zod.d.ts +8 -5
  8. package/dist/fleet/v1/generated/validators/accountList.zod.js +8 -5
  9. package/dist/fleet/v1/generated/validators/accountResource.zod.d.ts +8 -5
  10. package/dist/fleet/v1/generated/validators/accountResource.zod.js +8 -5
  11. package/dist/fleet/v1/generated/validators/approveEnrollmentRequest.zod.d.ts +8 -5
  12. package/dist/fleet/v1/generated/validators/approveEnrollmentRequest.zod.js +8 -5
  13. package/dist/fleet/v1/generated/validators/callMcpToolRequest.zod.d.ts +8 -5
  14. package/dist/fleet/v1/generated/validators/callMcpToolRequest.zod.js +8 -5
  15. package/dist/fleet/v1/generated/validators/callMcpToolResponse.zod.d.ts +8 -5
  16. package/dist/fleet/v1/generated/validators/callMcpToolResponse.zod.js +8 -5
  17. package/dist/fleet/v1/generated/validators/callToolRequest.zod.d.ts +10 -13
  18. package/dist/fleet/v1/generated/validators/callToolRequest.zod.js +14 -7
  19. package/dist/fleet/v1/generated/validators/callToolResponse.zod.d.ts +8 -5
  20. package/dist/fleet/v1/generated/validators/callToolResponse.zod.js +8 -5
  21. package/dist/fleet/v1/generated/validators/createGroupMemberRequest.zod.d.ts +8 -5
  22. package/dist/fleet/v1/generated/validators/createGroupMemberRequest.zod.js +8 -5
  23. package/dist/fleet/v1/generated/validators/createGroupRequest.zod.d.ts +8 -5
  24. package/dist/fleet/v1/generated/validators/createGroupRequest.zod.js +8 -5
  25. package/dist/fleet/v1/generated/validators/createMachineRegistrationRequest.zod.d.ts +8 -5
  26. package/dist/fleet/v1/generated/validators/createMachineRegistrationRequest.zod.js +8 -5
  27. package/dist/fleet/v1/generated/validators/createMachineRegistrationResponse.zod.d.ts +8 -5
  28. package/dist/fleet/v1/generated/validators/createMachineRegistrationResponse.zod.js +8 -5
  29. package/dist/fleet/v1/generated/validators/createParticipantRequest.zod.d.ts +8 -5
  30. package/dist/fleet/v1/generated/validators/createParticipantRequest.zod.js +8 -5
  31. package/dist/fleet/v1/generated/validators/createParticipantResponse.zod.d.ts +8 -5
  32. package/dist/fleet/v1/generated/validators/createParticipantResponse.zod.js +8 -5
  33. package/dist/fleet/v1/generated/validators/createPeerConnectionCandidatesRequest.zod.d.ts +8 -5
  34. package/dist/fleet/v1/generated/validators/createPeerConnectionCandidatesRequest.zod.js +8 -5
  35. package/dist/fleet/v1/generated/validators/createPeerConnectionRequest.zod.d.ts +8 -5
  36. package/dist/fleet/v1/generated/validators/createPeerConnectionRequest.zod.js +8 -5
  37. package/dist/fleet/v1/generated/validators/createSessionRequest.zod.d.ts +8 -5
  38. package/dist/fleet/v1/generated/validators/createSessionRequest.zod.js +8 -5
  39. package/dist/fleet/v1/generated/validators/cursorPagination.zod.d.ts +8 -5
  40. package/dist/fleet/v1/generated/validators/cursorPagination.zod.js +8 -5
  41. package/dist/fleet/v1/generated/validators/deleteMcpServerParams.zod.d.ts +8 -5
  42. package/dist/fleet/v1/generated/validators/deleteMcpServerParams.zod.js +8 -5
  43. package/dist/fleet/v1/generated/validators/denyPrivilegeRequestRequest.zod.d.ts +8 -5
  44. package/dist/fleet/v1/generated/validators/denyPrivilegeRequestRequest.zod.js +8 -5
  45. package/dist/fleet/v1/generated/validators/desktopOptions.zod.d.ts +8 -5
  46. package/dist/fleet/v1/generated/validators/desktopOptions.zod.js +8 -5
  47. package/dist/fleet/v1/generated/validators/desktopState.zod.d.ts +8 -5
  48. package/dist/fleet/v1/generated/validators/desktopState.zod.js +8 -5
  49. package/dist/fleet/v1/generated/validators/directoryName.zod.d.ts +8 -5
  50. package/dist/fleet/v1/generated/validators/directoryName.zod.js +8 -5
  51. package/dist/fleet/v1/generated/validators/enrollmentResource.zod.d.ts +8 -5
  52. package/dist/fleet/v1/generated/validators/enrollmentResource.zod.js +8 -5
  53. package/dist/fleet/v1/generated/validators/enrollmentState.zod.d.ts +8 -5
  54. package/dist/fleet/v1/generated/validators/enrollmentState.zod.js +8 -5
  55. package/dist/fleet/v1/generated/validators/error.zod.d.ts +8 -5
  56. package/dist/fleet/v1/generated/validators/error.zod.js +8 -5
  57. package/dist/fleet/v1/generated/validators/errorStatus.zod.d.ts +8 -5
  58. package/dist/fleet/v1/generated/validators/errorStatus.zod.js +8 -5
  59. package/dist/fleet/v1/generated/validators/featureState.zod.d.ts +8 -5
  60. package/dist/fleet/v1/generated/validators/featureState.zod.js +8 -5
  61. package/dist/fleet/v1/generated/validators/fieldViolation.zod.d.ts +8 -5
  62. package/dist/fleet/v1/generated/validators/fieldViolation.zod.js +8 -5
  63. package/dist/fleet/v1/generated/validators/findEnrollmentByPairingCodeParams.zod.d.ts +8 -5
  64. package/dist/fleet/v1/generated/validators/findEnrollmentByPairingCodeParams.zod.js +8 -5
  65. package/dist/fleet/v1/generated/validators/findEnrollmentResponse.zod.d.ts +8 -5
  66. package/dist/fleet/v1/generated/validators/findEnrollmentResponse.zod.js +8 -5
  67. package/dist/fleet/v1/generated/validators/getPeerConnectionParams.zod.d.ts +8 -5
  68. package/dist/fleet/v1/generated/validators/getPeerConnectionParams.zod.js +8 -5
  69. package/dist/fleet/v1/generated/validators/groupList.zod.d.ts +8 -5
  70. package/dist/fleet/v1/generated/validators/groupList.zod.js +8 -5
  71. package/dist/fleet/v1/generated/validators/groupResource.zod.d.ts +8 -5
  72. package/dist/fleet/v1/generated/validators/groupResource.zod.js +8 -5
  73. package/dist/fleet/v1/generated/validators/iceCandidate.zod.d.ts +8 -5
  74. package/dist/fleet/v1/generated/validators/iceCandidate.zod.js +8 -5
  75. package/dist/fleet/v1/generated/validators/iceServer.zod.d.ts +8 -5
  76. package/dist/fleet/v1/generated/validators/iceServer.zod.js +8 -5
  77. package/dist/fleet/v1/generated/validators/listAccountsParams.zod.d.ts +8 -5
  78. package/dist/fleet/v1/generated/validators/listAccountsParams.zod.js +8 -5
  79. package/dist/fleet/v1/generated/validators/listGroupMembersParams.zod.d.ts +8 -5
  80. package/dist/fleet/v1/generated/validators/listGroupMembersParams.zod.js +8 -5
  81. package/dist/fleet/v1/generated/validators/listGroupsParams.zod.d.ts +8 -5
  82. package/dist/fleet/v1/generated/validators/listGroupsParams.zod.js +8 -5
  83. package/dist/fleet/v1/generated/validators/listMachineEventsParams.zod.d.ts +8 -5
  84. package/dist/fleet/v1/generated/validators/listMachineEventsParams.zod.js +8 -5
  85. package/dist/fleet/v1/generated/validators/listMachineRegistrationsParams.zod.d.ts +8 -5
  86. package/dist/fleet/v1/generated/validators/listMachineRegistrationsParams.zod.js +8 -5
  87. package/dist/fleet/v1/generated/validators/listMachinesParams.zod.d.ts +8 -5
  88. package/dist/fleet/v1/generated/validators/listMachinesParams.zod.js +8 -5
  89. package/dist/fleet/v1/generated/validators/listPrivilegeAutoApprovalsParams.zod.d.ts +8 -5
  90. package/dist/fleet/v1/generated/validators/listPrivilegeAutoApprovalsParams.zod.js +8 -5
  91. package/dist/fleet/v1/generated/validators/listPrivilegeRequestsParams.zod.d.ts +8 -5
  92. package/dist/fleet/v1/generated/validators/listPrivilegeRequestsParams.zod.js +8 -5
  93. package/dist/fleet/v1/generated/validators/listSessionsParams.zod.d.ts +8 -5
  94. package/dist/fleet/v1/generated/validators/listSessionsParams.zod.js +8 -5
  95. package/dist/fleet/v1/generated/validators/listToolsParams.zod.d.ts +8 -5
  96. package/dist/fleet/v1/generated/validators/listToolsParams.zod.js +8 -5
  97. package/dist/fleet/v1/generated/validators/machineEventList.zod.d.ts +8 -5
  98. package/dist/fleet/v1/generated/validators/machineEventList.zod.js +8 -5
  99. package/dist/fleet/v1/generated/validators/machineEventResource.zod.d.ts +8 -5
  100. package/dist/fleet/v1/generated/validators/machineEventResource.zod.js +8 -5
  101. package/dist/fleet/v1/generated/validators/machineEventType.zod.d.ts +8 -5
  102. package/dist/fleet/v1/generated/validators/machineEventType.zod.js +8 -5
  103. package/dist/fleet/v1/generated/validators/machineFeature.zod.d.ts +8 -5
  104. package/dist/fleet/v1/generated/validators/machineFeature.zod.js +8 -5
  105. package/dist/fleet/v1/generated/validators/machineList.zod.d.ts +8 -5
  106. package/dist/fleet/v1/generated/validators/machineList.zod.js +8 -5
  107. package/dist/fleet/v1/generated/validators/machineRegistrationList.zod.d.ts +8 -5
  108. package/dist/fleet/v1/generated/validators/machineRegistrationList.zod.js +8 -5
  109. package/dist/fleet/v1/generated/validators/machineRegistrationResource.zod.d.ts +8 -5
  110. package/dist/fleet/v1/generated/validators/machineRegistrationResource.zod.js +8 -5
  111. package/dist/fleet/v1/generated/validators/machineRegistrationState.zod.d.ts +8 -5
  112. package/dist/fleet/v1/generated/validators/machineRegistrationState.zod.js +8 -5
  113. package/dist/fleet/v1/generated/validators/machineResource.zod.d.ts +8 -5
  114. package/dist/fleet/v1/generated/validators/machineResource.zod.js +8 -5
  115. package/dist/fleet/v1/generated/validators/mcpConfigurationFile.zod.d.ts +8 -5
  116. package/dist/fleet/v1/generated/validators/mcpConfigurationFile.zod.js +8 -5
  117. package/dist/fleet/v1/generated/validators/mcpConfigurationResource.zod.d.ts +8 -5
  118. package/dist/fleet/v1/generated/validators/mcpConfigurationResource.zod.js +8 -5
  119. package/dist/fleet/v1/generated/validators/mcpImplementation.zod.d.ts +8 -5
  120. package/dist/fleet/v1/generated/validators/mcpImplementation.zod.js +8 -5
  121. package/dist/fleet/v1/generated/validators/mcpServerFailure.zod.d.ts +8 -5
  122. package/dist/fleet/v1/generated/validators/mcpServerFailure.zod.js +8 -5
  123. package/dist/fleet/v1/generated/validators/mcpServerResource.zod.d.ts +8 -5
  124. package/dist/fleet/v1/generated/validators/mcpServerResource.zod.js +8 -5
  125. package/dist/fleet/v1/generated/validators/mcpTransport.zod.d.ts +8 -5
  126. package/dist/fleet/v1/generated/validators/mcpTransport.zod.js +8 -5
  127. package/dist/fleet/v1/generated/validators/migrationStep.zod.d.ts +8 -5
  128. package/dist/fleet/v1/generated/validators/migrationStep.zod.js +8 -5
  129. package/dist/fleet/v1/generated/validators/namedIdentity.zod.d.ts +8 -5
  130. package/dist/fleet/v1/generated/validators/namedIdentity.zod.js +8 -5
  131. package/dist/fleet/v1/generated/validators/offsetPagination.zod.d.ts +8 -5
  132. package/dist/fleet/v1/generated/validators/offsetPagination.zod.js +8 -5
  133. package/dist/fleet/v1/generated/validators/operatingSystem.zod.d.ts +8 -5
  134. package/dist/fleet/v1/generated/validators/operatingSystem.zod.js +8 -5
  135. package/dist/fleet/v1/generated/validators/participantList.zod.d.ts +8 -5
  136. package/dist/fleet/v1/generated/validators/participantList.zod.js +8 -5
  137. package/dist/fleet/v1/generated/validators/participantResource.zod.d.ts +8 -5
  138. package/dist/fleet/v1/generated/validators/participantResource.zod.js +8 -5
  139. package/dist/fleet/v1/generated/validators/peerConnection.zod.d.ts +8 -5
  140. package/dist/fleet/v1/generated/validators/peerConnection.zod.js +8 -5
  141. package/dist/fleet/v1/generated/validators/privilegeAutoApprovalList.zod.d.ts +8 -5
  142. package/dist/fleet/v1/generated/validators/privilegeAutoApprovalList.zod.js +8 -5
  143. package/dist/fleet/v1/generated/validators/privilegeAutoApprovalMode.zod.d.ts +8 -5
  144. package/dist/fleet/v1/generated/validators/privilegeAutoApprovalMode.zod.js +8 -5
  145. package/dist/fleet/v1/generated/validators/privilegeAutoApprovalResource.zod.d.ts +8 -5
  146. package/dist/fleet/v1/generated/validators/privilegeAutoApprovalResource.zod.js +8 -5
  147. package/dist/fleet/v1/generated/validators/privilegeDecider.zod.d.ts +8 -5
  148. package/dist/fleet/v1/generated/validators/privilegeDecider.zod.js +8 -5
  149. package/dist/fleet/v1/generated/validators/privilegeRequestList.zod.d.ts +8 -5
  150. package/dist/fleet/v1/generated/validators/privilegeRequestList.zod.js +8 -5
  151. package/dist/fleet/v1/generated/validators/privilegeRequestResource.zod.d.ts +8 -5
  152. package/dist/fleet/v1/generated/validators/privilegeRequestResource.zod.js +8 -5
  153. package/dist/fleet/v1/generated/validators/privilegeRequestState.zod.d.ts +8 -5
  154. package/dist/fleet/v1/generated/validators/privilegeRequestState.zod.js +8 -5
  155. package/dist/fleet/v1/generated/validators/publicKey.zod.d.ts +8 -5
  156. package/dist/fleet/v1/generated/validators/publicKey.zod.js +8 -5
  157. package/dist/fleet/v1/generated/validators/renewParticipantRequest.zod.d.ts +8 -5
  158. package/dist/fleet/v1/generated/validators/renewParticipantRequest.zod.js +8 -5
  159. package/dist/fleet/v1/generated/validators/renewParticipantResponse.zod.d.ts +8 -5
  160. package/dist/fleet/v1/generated/validators/renewParticipantResponse.zod.js +8 -5
  161. package/dist/fleet/v1/generated/validators/replaceMcpConfigurationRequest.zod.d.ts +8 -5
  162. package/dist/fleet/v1/generated/validators/replaceMcpConfigurationRequest.zod.js +8 -5
  163. package/dist/fleet/v1/generated/validators/rtcConfiguration.zod.d.ts +8 -5
  164. package/dist/fleet/v1/generated/validators/rtcConfiguration.zod.js +8 -5
  165. package/dist/fleet/v1/generated/validators/runCommandRequest.zod.d.ts +8 -5
  166. package/dist/fleet/v1/generated/validators/runCommandRequest.zod.js +8 -5
  167. package/dist/fleet/v1/generated/validators/runCommandResponse.zod.d.ts +8 -5
  168. package/dist/fleet/v1/generated/validators/runCommandResponse.zod.js +8 -5
  169. package/dist/fleet/v1/generated/validators/sendMcpRequestRequest.zod.d.ts +8 -5
  170. package/dist/fleet/v1/generated/validators/sendMcpRequestRequest.zod.js +8 -5
  171. package/dist/fleet/v1/generated/validators/sendMcpRequestResponse.zod.d.ts +8 -5
  172. package/dist/fleet/v1/generated/validators/sendMcpRequestResponse.zod.js +8 -5
  173. package/dist/fleet/v1/generated/validators/sessionCloseReason.zod.d.ts +8 -5
  174. package/dist/fleet/v1/generated/validators/sessionCloseReason.zod.js +8 -5
  175. package/dist/fleet/v1/generated/validators/sessionList.zod.d.ts +8 -5
  176. package/dist/fleet/v1/generated/validators/sessionList.zod.js +8 -5
  177. package/dist/fleet/v1/generated/validators/sessionMode.zod.d.ts +8 -5
  178. package/dist/fleet/v1/generated/validators/sessionMode.zod.js +8 -5
  179. package/dist/fleet/v1/generated/validators/sessionResource.zod.d.ts +8 -5
  180. package/dist/fleet/v1/generated/validators/sessionResource.zod.js +8 -5
  181. package/dist/fleet/v1/generated/validators/sessionState.zod.d.ts +8 -5
  182. package/dist/fleet/v1/generated/validators/sessionState.zod.js +8 -5
  183. package/dist/fleet/v1/generated/validators/signedMessage.zod.d.ts +8 -5
  184. package/dist/fleet/v1/generated/validators/signedMessage.zod.js +8 -5
  185. package/dist/fleet/v1/generated/validators/signingKey.zod.d.ts +8 -5
  186. package/dist/fleet/v1/generated/validators/signingKey.zod.js +8 -5
  187. package/dist/fleet/v1/generated/validators/toolActivityList.zod.d.ts +8 -5
  188. package/dist/fleet/v1/generated/validators/toolActivityList.zod.js +8 -5
  189. package/dist/fleet/v1/generated/validators/toolContent.zod.d.ts +8 -5
  190. package/dist/fleet/v1/generated/validators/toolContent.zod.js +8 -5
  191. package/dist/fleet/v1/generated/validators/toolDescriptor.zod.d.ts +13 -13
  192. package/dist/fleet/v1/generated/validators/toolDescriptor.zod.js +17 -8
  193. package/dist/fleet/v1/generated/validators/toolImage.zod.d.ts +8 -5
  194. package/dist/fleet/v1/generated/validators/toolImage.zod.js +8 -5
  195. package/dist/fleet/v1/generated/validators/toolList.zod.d.ts +12 -13
  196. package/dist/fleet/v1/generated/validators/toolList.zod.js +8 -5
  197. package/dist/fleet/v1/generated/validators/updateAccountRequest.zod.d.ts +8 -5
  198. package/dist/fleet/v1/generated/validators/updateAccountRequest.zod.js +8 -5
  199. package/dist/fleet/v1/generated/validators/updateGroupRequest.zod.d.ts +8 -5
  200. package/dist/fleet/v1/generated/validators/updateGroupRequest.zod.js +8 -5
  201. package/dist/fleet/v1/generated/validators/updateMachineRequest.zod.d.ts +8 -5
  202. package/dist/fleet/v1/generated/validators/updateMachineRequest.zod.js +8 -5
  203. package/dist/fleet/v1/generated/validators/updateMcpServerRequest.zod.d.ts +8 -5
  204. package/dist/fleet/v1/generated/validators/updateMcpServerRequest.zod.js +8 -5
  205. package/dist/fleet/v1/generated/validators/updateMcpServerResponse.zod.d.ts +8 -5
  206. package/dist/fleet/v1/generated/validators/updateMcpServerResponse.zod.js +8 -5
  207. package/dist/fleet/v1/generated/validators/updatePrivilegeAutoApprovalRequest.zod.d.ts +8 -5
  208. package/dist/fleet/v1/generated/validators/updatePrivilegeAutoApprovalRequest.zod.js +8 -5
  209. package/package.json +1 -1
  210. package/dist/fleet/v1/generated/validators/toolRef.zod.d.ts +0 -257
  211. package/dist/fleet/v1/generated/validators/toolRef.zod.js +0 -257
@@ -87,11 +87,14 @@
87
87
  * - `leaflow.fleet.tool.v1`: live session tools. Builtin `computer.*` tools are exposed only while
88
88
  * the virtual desktop capability is actually available; MCP is a separate source.
89
89
  *
90
- * A graphical backend does not require a full desktop environment. Terminal logins, commands
91
- * and MCP server initialization prepare or reuse the account's lightweight graphical context,
92
- * in addition to their own session or job. Configuration reads and writes do not initialize a
93
- * server and do not require this preparation. A request that needs a feature the machine does
94
- * not report available fails with `FEATURE_UNAVAILABLE`, whose `metadata.feature` names it.
90
+ * A graphical backend does not require a full desktop environment. When the machine reports
91
+ * graphical capability available, terminal logins and commands prepare or reuse the account's
92
+ * lightweight graphical context, in addition to their own session or job. Without graphical
93
+ * capability, ordinary commands and terminal sessions run without creating a graphical context
94
+ * or injecting X environment variables. MCP server initialization prepares or reuses a graphical
95
+ * context; configuration reads and writes do not initialize a server or require this preparation.
96
+ * A request that needs a feature the machine does not report available fails with
97
+ * `FEATURE_UNAVAILABLE`, whose `metadata.feature` names it.
95
98
  *
96
99
  * ## Directory
97
100
  *
@@ -381,14 +384,16 @@ export declare const getRunMachineCommandUrl: (machineId: string) => string;
381
384
  * redirection and `&&` work; there is no terminal and no standard input. The machine admits
382
385
  * the account through PAM as for a login. The account is created if the caller has none yet.
383
386
  * A command that fails is still a successful request: its exit status is its result.
384
- * Before starting it, Fleet prepares or reuses the account's ready lightweight graphical
385
- * session, without starting a full desktop environment. The command has its own job scope;
386
- * its timeout or exit must not close the account's graphical context.
387
+ * When the machine reports graphical capability available, Fleet first prepares or reuses
388
+ * the account's ready lightweight graphical session, without starting a full desktop
389
+ * environment. Otherwise the command runs without creating a graphical session or injecting
390
+ * X environment variables. The command has its own job scope; its timeout or exit must not
391
+ * close an existing account graphical context.
387
392
  *
388
393
  * Inside the command, `sudo` works without a prompt while the caller has
389
394
  * `fleet:machines.admin` on the machine, and refuses otherwise.
390
395
  *
391
- * After graphical context preparation, the request is held until the command ends, at most
396
+ * After any required context preparation, the request is held until the command ends, at most
392
397
  * `timeout_seconds` and a few seconds more. Neither the command nor its output is hidden from the platform: do not put secrets
393
398
  * into either.
394
399
  *
@@ -396,7 +401,8 @@ export declare const getRunMachineCommandUrl: (machineId: string) => string;
396
401
  *
397
402
  * Fails with:
398
403
  * - `MACHINE_OFFLINE` when the machine is not connected and does not connect again in time;
399
- * - `FEATURE_UNAVAILABLE` when the command, session or graphical backend is unavailable;
404
+ * - `FEATURE_UNAVAILABLE` when a required capability is unavailable; an absent graphical
405
+ * backend alone does not block a command;
400
406
  * - `SESSION_UNAVAILABLE` or `SESSION_CLOSED` when the account context is not ready or closing;
401
407
  * - `USER_NOT_FOUND`, `USER_NOT_ALLOWED`, `ACCOUNT_EXPIRED` or `PAM_PERMISSION_DENIED` when
402
408
  * the machine refuses the account, as for opening a session;
@@ -554,7 +560,9 @@ export type listToolsResponse = listToolsResponseSuccess | listToolsResponseErro
554
560
  export declare const getListToolsUrl: (machineId: string, params: ListToolsParams) => string;
555
561
  /**
556
562
  * Queries Agent's builtin tools and the caller's configured MCP servers live. No directory,
557
- * result or image is cached. Requires fleet:machines.login; builtin capabilities retain
563
+ * result or image is cached. Each tool has one callable name: builtin tools are named
564
+ * computer.*, MCP tools are named `<server>__<tool>`; source only filters the list and is not
565
+ * part of a tool's identity. Requires fleet:machines.login; builtin capabilities retain
558
566
  * their native policies and read-only restrictions. Ensures or reuses the caller's single
559
567
  * open graphical session, without launching a desktop environment. The client instance is
560
568
  * a UUID generated once per running client, not an authorization credential. Each request
@@ -583,18 +591,19 @@ export type callToolResponse = callToolResponseSuccess | callToolResponseError;
583
591
  export declare const getCallToolUrl: (machineId: string) => string;
584
592
  /**
585
593
  * Uses the same current permissions, directory account and graphical session as list-tools.
586
- * Listing is not a precondition: callers may use a previously discovered ToolRef, and this
594
+ * Listing is not a precondition: callers may use a previously discovered tool name, and this
587
595
  * operation never sends a discovery request or refreshes schemas before executing it.
588
596
  * A removed tool or MCP server returns TOOL_NOT_FOUND, as does a direct builtin computer.*
589
597
  * call while virtual desktop capability is unavailable. Actual permission errors remain
590
598
  * permission errors; a missing target window is not a missing tool. Use list-tools only when
591
599
  * discovery or refresh is needed, and do not cache or reuse execution results.
592
- * Source is explicit: MCP names never select or impersonate builtin tools. The arguments
593
- * object is at most 256 KiB. The complete result is at most 8 MiB in the protobuf transport,
594
- * with each encoded image at most 4 MiB; images are converted to base64 once at this JSON
595
- * boundary, without recompression or persistence. Cancellation is propagated. A timeout,
596
- * disconnect or failed response does not prove that side effects did not happen; do not
597
- * automatically replay. operation_id only correlates live activity, not idempotency.
600
+ * The name selects exactly one tool: builtin tools are computer.*, MCP tools are
601
+ * `<server>__<tool>`. The arguments object is at most 256 KiB. The complete result is at most
602
+ * 8 MiB in the protobuf transport, with each encoded image at most 4 MiB; images are converted
603
+ * to base64 once at this JSON boundary, without recompression or persistence. Cancellation is
604
+ * propagated. A timeout, disconnect or failed response does not prove that side effects did
605
+ * not happen; do not automatically replay. operation_id only correlates live activity, not
606
+ * idempotency.
598
607
  * @summary Call a live builtin or external MCP tool
599
608
  */
600
609
  export declare const callTool: (machineId: string, callToolRequest: CallToolRequest, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<callToolResponse>;
@@ -1352,10 +1361,13 @@ export type createSessionResponse = createSessionResponseSuccess | createSession
1352
1361
  export declare const getCreateSessionUrl: () => string;
1353
1362
  /**
1354
1363
  * Opens a session for the caller on a machine, as the caller's account, and returns once it
1355
- * is ready. With `desktop` the session has a desktop. Without, Fleet first prepares or reuses
1356
- * the account's separate ready lightweight graphical session, then creates a terminal session
1357
- * with its own SID and lifetime; closing that terminal does not close the account context. Its
1358
- * one terminal runs the caller's login shell from the start, every participant attaches to
1364
+ * is ready. With `desktop` the session requires graphical capability and has a desktop.
1365
+ * Without `desktop`, Fleet creates a terminal session with its own SID and lifetime. If
1366
+ * graphical capability is available, Fleet first prepares or reuses the account's separate
1367
+ * ready lightweight graphical session; otherwise the terminal runs without creating a
1368
+ * graphical context or injecting X environment variables. Closing a terminal does not close
1369
+ * an existing account graphical context. Its one terminal runs the caller's login shell from
1370
+ * the start, every participant attaches to
1359
1371
  * that terminal, and the session ends when the shell exits; a caller who wants another
1360
1372
  * terminal opens another session. Either kind also offers programs, files, ports, sound,
1361
1373
  * devices, printers and privilege approvals. The account is created if the caller has none
@@ -1372,7 +1384,8 @@ export declare const getCreateSessionUrl: () => string;
1372
1384
  *
1373
1385
  * Fails with:
1374
1386
  * - `MACHINE_OFFLINE` when the machine is not connected and does not connect again in time;
1375
- * - `FEATURE_UNAVAILABLE` when the machine does not offer sessions or the graphical backend;
1387
+ * - `FEATURE_UNAVAILABLE` when the machine does not offer the requested session capability;
1388
+ * a terminal-only request does not require a graphical backend;
1376
1389
  * - `SESSION_UNAVAILABLE` or `SESSION_CLOSED` when its shared account context is not ready or closing;
1377
1390
  * - `USER_HAS_DESKTOP_SESSION` with `desktop` when the account already has a session with a
1378
1391
  * desktop on the machine, which `metadata.sessionId` names; connect to it instead;
@@ -127,14 +127,16 @@ export const getRunMachineCommandUrl = (machineId) => {
127
127
  * redirection and `&&` work; there is no terminal and no standard input. The machine admits
128
128
  * the account through PAM as for a login. The account is created if the caller has none yet.
129
129
  * A command that fails is still a successful request: its exit status is its result.
130
- * Before starting it, Fleet prepares or reuses the account's ready lightweight graphical
131
- * session, without starting a full desktop environment. The command has its own job scope;
132
- * its timeout or exit must not close the account's graphical context.
130
+ * When the machine reports graphical capability available, Fleet first prepares or reuses
131
+ * the account's ready lightweight graphical session, without starting a full desktop
132
+ * environment. Otherwise the command runs without creating a graphical session or injecting
133
+ * X environment variables. The command has its own job scope; its timeout or exit must not
134
+ * close an existing account graphical context.
133
135
  *
134
136
  * Inside the command, `sudo` works without a prompt while the caller has
135
137
  * `fleet:machines.admin` on the machine, and refuses otherwise.
136
138
  *
137
- * After graphical context preparation, the request is held until the command ends, at most
139
+ * After any required context preparation, the request is held until the command ends, at most
138
140
  * `timeout_seconds` and a few seconds more. Neither the command nor its output is hidden from the platform: do not put secrets
139
141
  * into either.
140
142
  *
@@ -142,7 +144,8 @@ export const getRunMachineCommandUrl = (machineId) => {
142
144
  *
143
145
  * Fails with:
144
146
  * - `MACHINE_OFFLINE` when the machine is not connected and does not connect again in time;
145
- * - `FEATURE_UNAVAILABLE` when the command, session or graphical backend is unavailable;
147
+ * - `FEATURE_UNAVAILABLE` when a required capability is unavailable; an absent graphical
148
+ * backend alone does not block a command;
146
149
  * - `SESSION_UNAVAILABLE` or `SESSION_CLOSED` when the account context is not ready or closing;
147
150
  * - `USER_NOT_FOUND`, `USER_NOT_ALLOWED`, `ACCOUNT_EXPIRED` or `PAM_PERMISSION_DENIED` when
148
151
  * the machine refuses the account, as for opening a session;
@@ -344,7 +347,9 @@ export const getListToolsUrl = (machineId, params) => {
344
347
  };
345
348
  /**
346
349
  * Queries Agent's builtin tools and the caller's configured MCP servers live. No directory,
347
- * result or image is cached. Requires fleet:machines.login; builtin capabilities retain
350
+ * result or image is cached. Each tool has one callable name: builtin tools are named
351
+ * computer.*, MCP tools are named `<server>__<tool>`; source only filters the list and is not
352
+ * part of a tool's identity. Requires fleet:machines.login; builtin capabilities retain
348
353
  * their native policies and read-only restrictions. Ensures or reuses the caller's single
349
354
  * open graphical session, without launching a desktop environment. The client instance is
350
355
  * a UUID generated once per running client, not an authorization credential. Each request
@@ -368,18 +373,19 @@ export const getCallToolUrl = (machineId) => {
368
373
  };
369
374
  /**
370
375
  * Uses the same current permissions, directory account and graphical session as list-tools.
371
- * Listing is not a precondition: callers may use a previously discovered ToolRef, and this
376
+ * Listing is not a precondition: callers may use a previously discovered tool name, and this
372
377
  * operation never sends a discovery request or refreshes schemas before executing it.
373
378
  * A removed tool or MCP server returns TOOL_NOT_FOUND, as does a direct builtin computer.*
374
379
  * call while virtual desktop capability is unavailable. Actual permission errors remain
375
380
  * permission errors; a missing target window is not a missing tool. Use list-tools only when
376
381
  * discovery or refresh is needed, and do not cache or reuse execution results.
377
- * Source is explicit: MCP names never select or impersonate builtin tools. The arguments
378
- * object is at most 256 KiB. The complete result is at most 8 MiB in the protobuf transport,
379
- * with each encoded image at most 4 MiB; images are converted to base64 once at this JSON
380
- * boundary, without recompression or persistence. Cancellation is propagated. A timeout,
381
- * disconnect or failed response does not prove that side effects did not happen; do not
382
- * automatically replay. operation_id only correlates live activity, not idempotency.
382
+ * The name selects exactly one tool: builtin tools are computer.*, MCP tools are
383
+ * `<server>__<tool>`. The arguments object is at most 256 KiB. The complete result is at most
384
+ * 8 MiB in the protobuf transport, with each encoded image at most 4 MiB; images are converted
385
+ * to base64 once at this JSON boundary, without recompression or persistence. Cancellation is
386
+ * propagated. A timeout, disconnect or failed response does not prove that side effects did
387
+ * not happen; do not automatically replay. operation_id only correlates live activity, not
388
+ * idempotency.
383
389
  * @summary Call a live builtin or external MCP tool
384
390
  */
385
391
  export const callTool = async (machineId, callToolRequest, options, fetchFn) => {
@@ -1241,10 +1247,13 @@ export const getCreateSessionUrl = () => {
1241
1247
  };
1242
1248
  /**
1243
1249
  * Opens a session for the caller on a machine, as the caller's account, and returns once it
1244
- * is ready. With `desktop` the session has a desktop. Without, Fleet first prepares or reuses
1245
- * the account's separate ready lightweight graphical session, then creates a terminal session
1246
- * with its own SID and lifetime; closing that terminal does not close the account context. Its
1247
- * one terminal runs the caller's login shell from the start, every participant attaches to
1250
+ * is ready. With `desktop` the session requires graphical capability and has a desktop.
1251
+ * Without `desktop`, Fleet creates a terminal session with its own SID and lifetime. If
1252
+ * graphical capability is available, Fleet first prepares or reuses the account's separate
1253
+ * ready lightweight graphical session; otherwise the terminal runs without creating a
1254
+ * graphical context or injecting X environment variables. Closing a terminal does not close
1255
+ * an existing account graphical context. Its one terminal runs the caller's login shell from
1256
+ * the start, every participant attaches to
1248
1257
  * that terminal, and the session ends when the shell exits; a caller who wants another
1249
1258
  * terminal opens another session. Either kind also offers programs, files, ports, sound,
1250
1259
  * devices, printers and privilege approvals. The account is created if the caller has none
@@ -1261,7 +1270,8 @@ export const getCreateSessionUrl = () => {
1261
1270
  *
1262
1271
  * Fails with:
1263
1272
  * - `MACHINE_OFFLINE` when the machine is not connected and does not connect again in time;
1264
- * - `FEATURE_UNAVAILABLE` when the machine does not offer sessions or the graphical backend;
1273
+ * - `FEATURE_UNAVAILABLE` when the machine does not offer the requested session capability;
1274
+ * a terminal-only request does not require a graphical backend;
1265
1275
  * - `SESSION_UNAVAILABLE` or `SESSION_CLOSED` when its shared account context is not ready or closing;
1266
1276
  * - `USER_HAS_DESKTOP_SESSION` with `desktop` when the account already has a session with a
1267
1277
  * desktop on the machine, which `metadata.sessionId` names; connect to it instead;
@@ -87,11 +87,14 @@
87
87
  * - `leaflow.fleet.tool.v1`: live session tools. Builtin `computer.*` tools are exposed only while
88
88
  * the virtual desktop capability is actually available; MCP is a separate source.
89
89
  *
90
- * A graphical backend does not require a full desktop environment. Terminal logins, commands
91
- * and MCP server initialization prepare or reuse the account's lightweight graphical context,
92
- * in addition to their own session or job. Configuration reads and writes do not initialize a
93
- * server and do not require this preparation. A request that needs a feature the machine does
94
- * not report available fails with `FEATURE_UNAVAILABLE`, whose `metadata.feature` names it.
90
+ * A graphical backend does not require a full desktop environment. When the machine reports
91
+ * graphical capability available, terminal logins and commands prepare or reuse the account's
92
+ * lightweight graphical context, in addition to their own session or job. Without graphical
93
+ * capability, ordinary commands and terminal sessions run without creating a graphical context
94
+ * or injecting X environment variables. MCP server initialization prepares or reuses a graphical
95
+ * context; configuration reads and writes do not initialize a server or require this preparation.
96
+ * A request that needs a feature the machine does not report available fails with
97
+ * `FEATURE_UNAVAILABLE`, whose `metadata.feature` names it.
95
98
  *
96
99
  * ## Directory
97
100
  *
@@ -979,25 +982,14 @@ export interface SendMcpRequestResponse {
979
982
  /** The server's JSON-RPC 2.0 response, with the id of the request */
980
983
  response: SendMcpRequestResponseResponse;
981
984
  }
982
- export type ToolRefSource = (typeof ToolRefSource)[keyof typeof ToolRefSource];
983
- export declare const ToolRefSource: {
985
+ /**
986
+ * Whether the tool is builtin or comes from an MCP server. For filtering only.
987
+ */
988
+ export type ToolDescriptorSource = (typeof ToolDescriptorSource)[keyof typeof ToolDescriptorSource];
989
+ export declare const ToolDescriptorSource: {
984
990
  readonly builtin: "builtin";
985
991
  readonly mcp: "mcp";
986
992
  };
987
- export interface ToolRef {
988
- source: ToolRefSource;
989
- /**
990
- * @minLength 1
991
- * @maxLength 128
992
- */
993
- name: string;
994
- /**
995
- * Required only for mcp; forbidden for builtin
996
- * @minLength 1
997
- * @maxLength 64
998
- */
999
- server?: string;
1000
- }
1001
993
  export type ToolDescriptorInputSchema = {
1002
994
  [key: string]: unknown;
1003
995
  };
@@ -1011,8 +1003,15 @@ export type ToolDescriptorMetadata = {
1011
1003
  [key: string]: unknown;
1012
1004
  };
1013
1005
  export interface ToolDescriptor {
1014
- tool: ToolRef;
1006
+ /**
1007
+ * The name to call it by. Builtin tools are named computer.*; MCP tools are named
1008
+ * `<server>__<tool>`, so a name selects exactly one tool.
1009
+ * @minLength 1
1010
+ * @maxLength 194
1011
+ */
1015
1012
  name: string;
1013
+ /** Whether the tool is builtin or comes from an MCP server. For filtering only. */
1014
+ source: ToolDescriptorSource;
1016
1015
  title: string;
1017
1016
  description: string;
1018
1017
  input_schema: ToolDescriptorInputSchema;
@@ -1045,7 +1044,13 @@ export type CallToolRequestArguments = {
1045
1044
  };
1046
1045
  export interface CallToolRequest {
1047
1046
  client_instance_id: string;
1048
- tool: ToolRef;
1047
+ /**
1048
+ * The name from list-tools. Builtin tools are computer.*; MCP tools are
1049
+ * `<server>__<tool>`. The name selects the tool; source is not part of the call.
1050
+ * @minLength 1
1051
+ * @maxLength 194
1052
+ */
1053
+ tool: string;
1049
1054
  /** A JSON object, at most 256 KiB when encoded */
1050
1055
  arguments: CallToolRequestArguments;
1051
1056
  read_only?: boolean;
@@ -1539,16 +1544,28 @@ export type DeleteMcpServerParams = {
1539
1544
  expected_revision?: string;
1540
1545
  };
1541
1546
  export type ListToolsParams = {
1547
+ /**
1548
+ * A UUID generated once per running client and reused for its lifetime. It separates
1549
+ * concurrent callers of the same user and is not an authorization credential.
1550
+ */
1542
1551
  client_instance_id: string;
1552
+ /**
1553
+ * Return only tools of this source. A filter, not part of a tool's identity.
1554
+ */
1543
1555
  source?: ListToolsSource;
1544
1556
  /**
1557
+ * Return only this MCP server's tools.
1545
1558
  * @maxLength 64
1546
1559
  */
1547
1560
  mcp_server?: string;
1548
1561
  /**
1562
+ * Words that each must occur in a tool's name, title or description, ignoring case.
1549
1563
  * @maxLength 256
1550
1564
  */
1551
1565
  query?: string;
1566
+ /**
1567
+ * Sign the control authorization as read-only, so mutating tools are refused.
1568
+ */
1552
1569
  read_only?: boolean;
1553
1570
  /**
1554
1571
  * @minimum 1
@@ -68,7 +68,7 @@ export const McpServerFailure = {
68
68
  protocol_error: "protocol_error",
69
69
  timeout: "timeout",
70
70
  };
71
- export const ToolRefSource = {
71
+ export const ToolDescriptorSource = {
72
72
  builtin: "builtin",
73
73
  mcp: "mcp",
74
74
  };
@@ -87,11 +87,14 @@
87
87
  * - `leaflow.fleet.tool.v1`: live session tools. Builtin `computer.*` tools are exposed only while
88
88
  * the virtual desktop capability is actually available; MCP is a separate source.
89
89
  *
90
- * A graphical backend does not require a full desktop environment. Terminal logins, commands
91
- * and MCP server initialization prepare or reuse the account's lightweight graphical context,
92
- * in addition to their own session or job. Configuration reads and writes do not initialize a
93
- * server and do not require this preparation. A request that needs a feature the machine does
94
- * not report available fails with `FEATURE_UNAVAILABLE`, whose `metadata.feature` names it.
90
+ * A graphical backend does not require a full desktop environment. When the machine reports
91
+ * graphical capability available, terminal logins and commands prepare or reuse the account's
92
+ * lightweight graphical context, in addition to their own session or job. Without graphical
93
+ * capability, ordinary commands and terminal sessions run without creating a graphical context
94
+ * or injecting X environment variables. MCP server initialization prepares or reuses a graphical
95
+ * context; configuration reads and writes do not initialize a server or require this preparation.
96
+ * A request that needs a feature the machine does not report available fails with
97
+ * `FEATURE_UNAVAILABLE`, whose `metadata.feature` names it.
95
98
  *
96
99
  * ## Directory
97
100
  *
@@ -311,14 +314,16 @@ export declare const ListMachineEventsQueryParams: zod.ZodObject<{
311
314
  * redirection and `&&` work; there is no terminal and no standard input. The machine admits
312
315
  * the account through PAM as for a login. The account is created if the caller has none yet.
313
316
  * A command that fails is still a successful request: its exit status is its result.
314
- * Before starting it, Fleet prepares or reuses the account's ready lightweight graphical
315
- * session, without starting a full desktop environment. The command has its own job scope;
316
- * its timeout or exit must not close the account's graphical context.
317
+ * When the machine reports graphical capability available, Fleet first prepares or reuses
318
+ * the account's ready lightweight graphical session, without starting a full desktop
319
+ * environment. Otherwise the command runs without creating a graphical session or injecting
320
+ * X environment variables. The command has its own job scope; its timeout or exit must not
321
+ * close an existing account graphical context.
317
322
  *
318
323
  * Inside the command, `sudo` works without a prompt while the caller has
319
324
  * `fleet:machines.admin` on the machine, and refuses otherwise.
320
325
  *
321
- * After graphical context preparation, the request is held until the command ends, at most
326
+ * After any required context preparation, the request is held until the command ends, at most
322
327
  * `timeout_seconds` and a few seconds more. Neither the command nor its output is hidden from the platform: do not put secrets
323
328
  * into either.
324
329
  *
@@ -326,7 +331,8 @@ export declare const ListMachineEventsQueryParams: zod.ZodObject<{
326
331
  *
327
332
  * Fails with:
328
333
  * - `MACHINE_OFFLINE` when the machine is not connected and does not connect again in time;
329
- * - `FEATURE_UNAVAILABLE` when the command, session or graphical backend is unavailable;
334
+ * - `FEATURE_UNAVAILABLE` when a required capability is unavailable; an absent graphical
335
+ * backend alone does not block a command;
330
336
  * - `SESSION_UNAVAILABLE` or `SESSION_CLOSED` when the account context is not ready or closing;
331
337
  * - `USER_NOT_FOUND`, `USER_NOT_ALLOWED`, `ACCOUNT_EXPIRED` or `PAM_PERMISSION_DENIED` when
332
338
  * the machine refuses the account, as for opening a session;
@@ -445,7 +451,9 @@ export declare const DeleteMcpServerQueryParams: zod.ZodObject<{
445
451
  }, zod.z.core.$strict>;
446
452
  /**
447
453
  * Queries Agent's builtin tools and the caller's configured MCP servers live. No directory,
448
- * result or image is cached. Requires fleet:machines.login; builtin capabilities retain
454
+ * result or image is cached. Each tool has one callable name: builtin tools are named
455
+ * computer.*, MCP tools are named `<server>__<tool>`; source only filters the list and is not
456
+ * part of a tool's identity. Requires fleet:machines.login; builtin capabilities retain
449
457
  * their native policies and read-only restrictions. Ensures or reuses the caller's single
450
458
  * open graphical session, without launching a desktop environment. The client instance is
451
459
  * a UUID generated once per running client, not an authorization credential. Each request
@@ -480,18 +488,19 @@ export declare const ListToolsQueryParams: zod.ZodObject<{
480
488
  }, zod.z.core.$strict>;
481
489
  /**
482
490
  * Uses the same current permissions, directory account and graphical session as list-tools.
483
- * Listing is not a precondition: callers may use a previously discovered ToolRef, and this
491
+ * Listing is not a precondition: callers may use a previously discovered tool name, and this
484
492
  * operation never sends a discovery request or refreshes schemas before executing it.
485
493
  * A removed tool or MCP server returns TOOL_NOT_FOUND, as does a direct builtin computer.*
486
494
  * call while virtual desktop capability is unavailable. Actual permission errors remain
487
495
  * permission errors; a missing target window is not a missing tool. Use list-tools only when
488
496
  * discovery or refresh is needed, and do not cache or reuse execution results.
489
- * Source is explicit: MCP names never select or impersonate builtin tools. The arguments
490
- * object is at most 256 KiB. The complete result is at most 8 MiB in the protobuf transport,
491
- * with each encoded image at most 4 MiB; images are converted to base64 once at this JSON
492
- * boundary, without recompression or persistence. Cancellation is propagated. A timeout,
493
- * disconnect or failed response does not prove that side effects did not happen; do not
494
- * automatically replay. operation_id only correlates live activity, not idempotency.
497
+ * The name selects exactly one tool: builtin tools are computer.*, MCP tools are
498
+ * `<server>__<tool>`. The arguments object is at most 256 KiB. The complete result is at most
499
+ * 8 MiB in the protobuf transport, with each encoded image at most 4 MiB; images are converted
500
+ * to base64 once at this JSON boundary, without recompression or persistence. Cancellation is
501
+ * propagated. A timeout, disconnect or failed response does not prove that side effects did
502
+ * not happen; do not automatically replay. operation_id only correlates live activity, not
503
+ * idempotency.
495
504
  * @summary Call a live builtin or external MCP tool
496
505
  */
497
506
  export declare const CallToolParams: zod.ZodObject<{
@@ -499,14 +508,7 @@ export declare const CallToolParams: zod.ZodObject<{
499
508
  }, zod.z.core.$strict>;
500
509
  export declare const CallToolBody: zod.ZodObject<{
501
510
  client_instance_id: zod.ZodUUID;
502
- tool: zod.ZodObject<{
503
- source: zod.ZodEnum<{
504
- builtin: "builtin";
505
- mcp: "mcp";
506
- }>;
507
- name: zod.ZodString;
508
- server: zod.ZodOptional<zod.ZodString>;
509
- }, zod.z.core.$strict>;
511
+ tool: zod.ZodString;
510
512
  arguments: zod.ZodRecord<zod.ZodString, zod.ZodUnknown>;
511
513
  read_only: zod.ZodDefault<zod.ZodBoolean>;
512
514
  timeout_seconds: zod.ZodDefault<zod.ZodInt>;
@@ -924,10 +926,13 @@ export declare const ListSessionsQueryParams: zod.ZodObject<{
924
926
  }, zod.z.core.$strict>;
925
927
  /**
926
928
  * Opens a session for the caller on a machine, as the caller's account, and returns once it
927
- * is ready. With `desktop` the session has a desktop. Without, Fleet first prepares or reuses
928
- * the account's separate ready lightweight graphical session, then creates a terminal session
929
- * with its own SID and lifetime; closing that terminal does not close the account context. Its
930
- * one terminal runs the caller's login shell from the start, every participant attaches to
929
+ * is ready. With `desktop` the session requires graphical capability and has a desktop.
930
+ * Without `desktop`, Fleet creates a terminal session with its own SID and lifetime. If
931
+ * graphical capability is available, Fleet first prepares or reuses the account's separate
932
+ * ready lightweight graphical session; otherwise the terminal runs without creating a
933
+ * graphical context or injecting X environment variables. Closing a terminal does not close
934
+ * an existing account graphical context. Its one terminal runs the caller's login shell from
935
+ * the start, every participant attaches to
931
936
  * that terminal, and the session ends when the shell exits; a caller who wants another
932
937
  * terminal opens another session. Either kind also offers programs, files, ports, sound,
933
938
  * devices, printers and privilege approvals. The account is created if the caller has none
@@ -944,7 +949,8 @@ export declare const ListSessionsQueryParams: zod.ZodObject<{
944
949
  *
945
950
  * Fails with:
946
951
  * - `MACHINE_OFFLINE` when the machine is not connected and does not connect again in time;
947
- * - `FEATURE_UNAVAILABLE` when the machine does not offer sessions or the graphical backend;
952
+ * - `FEATURE_UNAVAILABLE` when the machine does not offer the requested session capability;
953
+ * a terminal-only request does not require a graphical backend;
948
954
  * - `SESSION_UNAVAILABLE` or `SESSION_CLOSED` when its shared account context is not ready or closing;
949
955
  * - `USER_HAS_DESKTOP_SESSION` with `desktop` when the account already has a session with a
950
956
  * desktop on the machine, which `metadata.sessionId` names; connect to it instead;
@@ -87,11 +87,14 @@
87
87
  * - `leaflow.fleet.tool.v1`: live session tools. Builtin `computer.*` tools are exposed only while
88
88
  * the virtual desktop capability is actually available; MCP is a separate source.
89
89
  *
90
- * A graphical backend does not require a full desktop environment. Terminal logins, commands
91
- * and MCP server initialization prepare or reuse the account's lightweight graphical context,
92
- * in addition to their own session or job. Configuration reads and writes do not initialize a
93
- * server and do not require this preparation. A request that needs a feature the machine does
94
- * not report available fails with `FEATURE_UNAVAILABLE`, whose `metadata.feature` names it.
90
+ * A graphical backend does not require a full desktop environment. When the machine reports
91
+ * graphical capability available, terminal logins and commands prepare or reuse the account's
92
+ * lightweight graphical context, in addition to their own session or job. Without graphical
93
+ * capability, ordinary commands and terminal sessions run without creating a graphical context
94
+ * or injecting X environment variables. MCP server initialization prepares or reuses a graphical
95
+ * context; configuration reads and writes do not initialize a server or require this preparation.
96
+ * A request that needs a feature the machine does not report available fails with
97
+ * `FEATURE_UNAVAILABLE`, whose `metadata.feature` names it.
95
98
  *
96
99
  * ## Directory
97
100
  *
@@ -354,14 +357,16 @@ export const ListMachineEventsQueryParams = zod.strictObject({
354
357
  * redirection and `&&` work; there is no terminal and no standard input. The machine admits
355
358
  * the account through PAM as for a login. The account is created if the caller has none yet.
356
359
  * A command that fails is still a successful request: its exit status is its result.
357
- * Before starting it, Fleet prepares or reuses the account's ready lightweight graphical
358
- * session, without starting a full desktop environment. The command has its own job scope;
359
- * its timeout or exit must not close the account's graphical context.
360
+ * When the machine reports graphical capability available, Fleet first prepares or reuses
361
+ * the account's ready lightweight graphical session, without starting a full desktop
362
+ * environment. Otherwise the command runs without creating a graphical session or injecting
363
+ * X environment variables. The command has its own job scope; its timeout or exit must not
364
+ * close an existing account graphical context.
360
365
  *
361
366
  * Inside the command, `sudo` works without a prompt while the caller has
362
367
  * `fleet:machines.admin` on the machine, and refuses otherwise.
363
368
  *
364
- * After graphical context preparation, the request is held until the command ends, at most
369
+ * After any required context preparation, the request is held until the command ends, at most
365
370
  * `timeout_seconds` and a few seconds more. Neither the command nor its output is hidden from the platform: do not put secrets
366
371
  * into either.
367
372
  *
@@ -369,7 +374,8 @@ export const ListMachineEventsQueryParams = zod.strictObject({
369
374
  *
370
375
  * Fails with:
371
376
  * - `MACHINE_OFFLINE` when the machine is not connected and does not connect again in time;
372
- * - `FEATURE_UNAVAILABLE` when the command, session or graphical backend is unavailable;
377
+ * - `FEATURE_UNAVAILABLE` when a required capability is unavailable; an absent graphical
378
+ * backend alone does not block a command;
373
379
  * - `SESSION_UNAVAILABLE` or `SESSION_CLOSED` when the account context is not ready or closing;
374
380
  * - `USER_NOT_FOUND`, `USER_NOT_ALLOWED`, `ACCOUNT_EXPIRED` or `PAM_PERMISSION_DENIED` when
375
381
  * the machine refuses the account, as for opening a session;
@@ -478,7 +484,9 @@ export const DeleteMcpServerQueryParams = zod.strictObject({
478
484
  });
479
485
  /**
480
486
  * Queries Agent's builtin tools and the caller's configured MCP servers live. No directory,
481
- * result or image is cached. Requires fleet:machines.login; builtin capabilities retain
487
+ * result or image is cached. Each tool has one callable name: builtin tools are named
488
+ * computer.*, MCP tools are named `<server>__<tool>`; source only filters the list and is not
489
+ * part of a tool's identity. Requires fleet:machines.login; builtin capabilities retain
482
490
  * their native policies and read-only restrictions. Ensures or reuses the caller's single
483
491
  * open graphical session, without launching a desktop environment. The client instance is
484
492
  * a UUID generated once per running client, not an authorization credential. Each request
@@ -499,28 +507,45 @@ export const listToolsQueryPageSizeDefault = 100;
499
507
  export const listToolsQueryPageSizeMax = 100;
500
508
  export const listToolsQueryPageTokenMax = 4096;
501
509
  export const ListToolsQueryParams = zod.strictObject({
502
- client_instance_id: zod.uuid(),
503
- source: zod.enum(["all", "builtin", "mcp"]).default(listToolsQuerySourceDefault),
504
- mcp_server: zod.string().max(listToolsQueryMcpServerMax).optional(),
505
- query: zod.string().max(listToolsQueryQueryMax).optional(),
506
- read_only: zod.boolean().default(listToolsQueryReadOnlyDefault),
510
+ client_instance_id: zod
511
+ .uuid()
512
+ .describe("A UUID generated once per running client and reused for its lifetime. It separates\nconcurrent callers of the same user and is not an authorization credential."),
513
+ source: zod
514
+ .enum(["all", "builtin", "mcp"])
515
+ .default(listToolsQuerySourceDefault)
516
+ .describe("Return only tools of this source. A filter, not part of a tool's identity."),
517
+ mcp_server: zod
518
+ .string()
519
+ .max(listToolsQueryMcpServerMax)
520
+ .optional()
521
+ .describe("Return only this MCP server's tools."),
522
+ query: zod
523
+ .string()
524
+ .max(listToolsQueryQueryMax)
525
+ .optional()
526
+ .describe("Words that each must occur in a tool's name, title or description, ignoring case."),
527
+ read_only: zod
528
+ .boolean()
529
+ .default(listToolsQueryReadOnlyDefault)
530
+ .describe("Sign the control authorization as read-only, so mutating tools are refused."),
507
531
  page_size: zod.int().min(1).max(listToolsQueryPageSizeMax).default(listToolsQueryPageSizeDefault),
508
532
  page_token: zod.string().max(listToolsQueryPageTokenMax).optional(),
509
533
  });
510
534
  /**
511
535
  * Uses the same current permissions, directory account and graphical session as list-tools.
512
- * Listing is not a precondition: callers may use a previously discovered ToolRef, and this
536
+ * Listing is not a precondition: callers may use a previously discovered tool name, and this
513
537
  * operation never sends a discovery request or refreshes schemas before executing it.
514
538
  * A removed tool or MCP server returns TOOL_NOT_FOUND, as does a direct builtin computer.*
515
539
  * call while virtual desktop capability is unavailable. Actual permission errors remain
516
540
  * permission errors; a missing target window is not a missing tool. Use list-tools only when
517
541
  * discovery or refresh is needed, and do not cache or reuse execution results.
518
- * Source is explicit: MCP names never select or impersonate builtin tools. The arguments
519
- * object is at most 256 KiB. The complete result is at most 8 MiB in the protobuf transport,
520
- * with each encoded image at most 4 MiB; images are converted to base64 once at this JSON
521
- * boundary, without recompression or persistence. Cancellation is propagated. A timeout,
522
- * disconnect or failed response does not prove that side effects did not happen; do not
523
- * automatically replay. operation_id only correlates live activity, not idempotency.
542
+ * The name selects exactly one tool: builtin tools are computer.*, MCP tools are
543
+ * `<server>__<tool>`. The arguments object is at most 256 KiB. The complete result is at most
544
+ * 8 MiB in the protobuf transport, with each encoded image at most 4 MiB; images are converted
545
+ * to base64 once at this JSON boundary, without recompression or persistence. Cancellation is
546
+ * propagated. A timeout, disconnect or failed response does not prove that side effects did
547
+ * not happen; do not automatically replay. operation_id only correlates live activity, not
548
+ * idempotency.
524
549
  * @summary Call a live builtin or external MCP tool
525
550
  */
526
551
  export const CallToolParams = zod.strictObject({
@@ -1000,10 +1025,13 @@ export const ListSessionsQueryParams = zod.strictObject({
1000
1025
  });
1001
1026
  /**
1002
1027
  * Opens a session for the caller on a machine, as the caller's account, and returns once it
1003
- * is ready. With `desktop` the session has a desktop. Without, Fleet first prepares or reuses
1004
- * the account's separate ready lightweight graphical session, then creates a terminal session
1005
- * with its own SID and lifetime; closing that terminal does not close the account context. Its
1006
- * one terminal runs the caller's login shell from the start, every participant attaches to
1028
+ * is ready. With `desktop` the session requires graphical capability and has a desktop.
1029
+ * Without `desktop`, Fleet creates a terminal session with its own SID and lifetime. If
1030
+ * graphical capability is available, Fleet first prepares or reuses the account's separate
1031
+ * ready lightweight graphical session; otherwise the terminal runs without creating a
1032
+ * graphical context or injecting X environment variables. Closing a terminal does not close
1033
+ * an existing account graphical context. Its one terminal runs the caller's login shell from
1034
+ * the start, every participant attaches to
1007
1035
  * that terminal, and the session ends when the shell exits; a caller who wants another
1008
1036
  * terminal opens another session. Either kind also offers programs, files, ports, sound,
1009
1037
  * devices, printers and privilege approvals. The account is created if the caller has none
@@ -1020,7 +1048,8 @@ export const ListSessionsQueryParams = zod.strictObject({
1020
1048
  *
1021
1049
  * Fails with:
1022
1050
  * - `MACHINE_OFFLINE` when the machine is not connected and does not connect again in time;
1023
- * - `FEATURE_UNAVAILABLE` when the machine does not offer sessions or the graphical backend;
1051
+ * - `FEATURE_UNAVAILABLE` when the machine does not offer the requested session capability;
1052
+ * a terminal-only request does not require a graphical backend;
1024
1053
  * - `SESSION_UNAVAILABLE` or `SESSION_CLOSED` when its shared account context is not ready or closing;
1025
1054
  * - `USER_HAS_DESKTOP_SESSION` with `desktop` when the account already has a session with a
1026
1055
  * desktop on the machine, which `metadata.sessionId` names; connect to it instead;