@leaflow/sdk 0.188.0 → 0.189.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (201) hide show
  1. package/dist/fleet/v1/generated/functions.d.ts +28 -14
  2. package/dist/fleet/v1/generated/functions.js +27 -8
  3. package/dist/fleet/v1/generated/models.d.ts +55 -8
  4. package/dist/fleet/v1/generated/models.js +6 -1
  5. package/dist/fleet/v1/generated/schemas.zod.d.ts +33 -12
  6. package/dist/fleet/v1/generated/schemas.zod.js +28 -12
  7. package/dist/fleet/v1/generated/validators/accountList.zod.d.ts +17 -5
  8. package/dist/fleet/v1/generated/validators/accountList.zod.js +17 -5
  9. package/dist/fleet/v1/generated/validators/accountResource.zod.d.ts +17 -5
  10. package/dist/fleet/v1/generated/validators/accountResource.zod.js +17 -5
  11. package/dist/fleet/v1/generated/validators/approveEnrollmentRequest.zod.d.ts +17 -5
  12. package/dist/fleet/v1/generated/validators/approveEnrollmentRequest.zod.js +17 -5
  13. package/dist/fleet/v1/generated/validators/callMcpToolRequest.zod.d.ts +17 -5
  14. package/dist/fleet/v1/generated/validators/callMcpToolRequest.zod.js +17 -5
  15. package/dist/fleet/v1/generated/validators/callMcpToolResponse.zod.d.ts +17 -5
  16. package/dist/fleet/v1/generated/validators/callMcpToolResponse.zod.js +17 -5
  17. package/dist/fleet/v1/generated/validators/createGroupMemberRequest.zod.d.ts +17 -5
  18. package/dist/fleet/v1/generated/validators/createGroupMemberRequest.zod.js +17 -5
  19. package/dist/fleet/v1/generated/validators/createGroupRequest.zod.d.ts +17 -5
  20. package/dist/fleet/v1/generated/validators/createGroupRequest.zod.js +17 -5
  21. package/dist/fleet/v1/generated/validators/createMachineRegistrationRequest.zod.d.ts +17 -5
  22. package/dist/fleet/v1/generated/validators/createMachineRegistrationRequest.zod.js +17 -5
  23. package/dist/fleet/v1/generated/validators/createMachineRegistrationResponse.zod.d.ts +17 -5
  24. package/dist/fleet/v1/generated/validators/createMachineRegistrationResponse.zod.js +17 -5
  25. package/dist/fleet/v1/generated/validators/createParticipantRequest.zod.d.ts +17 -5
  26. package/dist/fleet/v1/generated/validators/createParticipantRequest.zod.js +17 -5
  27. package/dist/fleet/v1/generated/validators/createParticipantResponse.zod.d.ts +17 -5
  28. package/dist/fleet/v1/generated/validators/createParticipantResponse.zod.js +17 -5
  29. package/dist/fleet/v1/generated/validators/createPeerConnectionCandidatesRequest.zod.d.ts +17 -5
  30. package/dist/fleet/v1/generated/validators/createPeerConnectionCandidatesRequest.zod.js +17 -5
  31. package/dist/fleet/v1/generated/validators/createPeerConnectionRequest.zod.d.ts +17 -5
  32. package/dist/fleet/v1/generated/validators/createPeerConnectionRequest.zod.js +17 -5
  33. package/dist/fleet/v1/generated/validators/createSessionRequest.zod.d.ts +17 -5
  34. package/dist/fleet/v1/generated/validators/createSessionRequest.zod.js +17 -5
  35. package/dist/fleet/v1/generated/validators/cursorPagination.zod.d.ts +17 -5
  36. package/dist/fleet/v1/generated/validators/cursorPagination.zod.js +17 -5
  37. package/dist/fleet/v1/generated/validators/deleteMcpServerParams.zod.d.ts +17 -5
  38. package/dist/fleet/v1/generated/validators/deleteMcpServerParams.zod.js +17 -5
  39. package/dist/fleet/v1/generated/validators/denyPrivilegeRequestRequest.zod.d.ts +244 -0
  40. package/dist/fleet/v1/generated/validators/denyPrivilegeRequestRequest.zod.js +246 -0
  41. package/dist/fleet/v1/generated/validators/desktopOptions.zod.d.ts +17 -5
  42. package/dist/fleet/v1/generated/validators/desktopOptions.zod.js +17 -5
  43. package/dist/fleet/v1/generated/validators/desktopState.zod.d.ts +17 -5
  44. package/dist/fleet/v1/generated/validators/desktopState.zod.js +17 -5
  45. package/dist/fleet/v1/generated/validators/directoryName.zod.d.ts +17 -5
  46. package/dist/fleet/v1/generated/validators/directoryName.zod.js +17 -5
  47. package/dist/fleet/v1/generated/validators/enrollmentResource.zod.d.ts +17 -5
  48. package/dist/fleet/v1/generated/validators/enrollmentResource.zod.js +17 -5
  49. package/dist/fleet/v1/generated/validators/enrollmentState.zod.d.ts +17 -5
  50. package/dist/fleet/v1/generated/validators/enrollmentState.zod.js +17 -5
  51. package/dist/fleet/v1/generated/validators/error.zod.d.ts +17 -5
  52. package/dist/fleet/v1/generated/validators/error.zod.js +17 -5
  53. package/dist/fleet/v1/generated/validators/errorStatus.zod.d.ts +17 -5
  54. package/dist/fleet/v1/generated/validators/errorStatus.zod.js +17 -5
  55. package/dist/fleet/v1/generated/validators/featureState.zod.d.ts +17 -5
  56. package/dist/fleet/v1/generated/validators/featureState.zod.js +17 -5
  57. package/dist/fleet/v1/generated/validators/fieldViolation.zod.d.ts +17 -5
  58. package/dist/fleet/v1/generated/validators/fieldViolation.zod.js +17 -5
  59. package/dist/fleet/v1/generated/validators/findEnrollmentByPairingCodeParams.zod.d.ts +17 -5
  60. package/dist/fleet/v1/generated/validators/findEnrollmentByPairingCodeParams.zod.js +17 -5
  61. package/dist/fleet/v1/generated/validators/findEnrollmentResponse.zod.d.ts +17 -5
  62. package/dist/fleet/v1/generated/validators/findEnrollmentResponse.zod.js +17 -5
  63. package/dist/fleet/v1/generated/validators/groupList.zod.d.ts +17 -5
  64. package/dist/fleet/v1/generated/validators/groupList.zod.js +17 -5
  65. package/dist/fleet/v1/generated/validators/groupResource.zod.d.ts +17 -5
  66. package/dist/fleet/v1/generated/validators/groupResource.zod.js +17 -5
  67. package/dist/fleet/v1/generated/validators/iceCandidate.zod.d.ts +17 -5
  68. package/dist/fleet/v1/generated/validators/iceCandidate.zod.js +17 -5
  69. package/dist/fleet/v1/generated/validators/iceServer.zod.d.ts +17 -5
  70. package/dist/fleet/v1/generated/validators/iceServer.zod.js +17 -5
  71. package/dist/fleet/v1/generated/validators/listAccountsParams.zod.d.ts +17 -5
  72. package/dist/fleet/v1/generated/validators/listAccountsParams.zod.js +17 -5
  73. package/dist/fleet/v1/generated/validators/listGroupMembersParams.zod.d.ts +17 -5
  74. package/dist/fleet/v1/generated/validators/listGroupMembersParams.zod.js +17 -5
  75. package/dist/fleet/v1/generated/validators/listGroupsParams.zod.d.ts +17 -5
  76. package/dist/fleet/v1/generated/validators/listGroupsParams.zod.js +17 -5
  77. package/dist/fleet/v1/generated/validators/listMachineEventsParams.zod.d.ts +17 -5
  78. package/dist/fleet/v1/generated/validators/listMachineEventsParams.zod.js +17 -5
  79. package/dist/fleet/v1/generated/validators/listMachineRegistrationsParams.zod.d.ts +17 -5
  80. package/dist/fleet/v1/generated/validators/listMachineRegistrationsParams.zod.js +17 -5
  81. package/dist/fleet/v1/generated/validators/listMachinesParams.zod.d.ts +17 -5
  82. package/dist/fleet/v1/generated/validators/listMachinesParams.zod.js +17 -5
  83. package/dist/fleet/v1/generated/validators/listMcpToolsParams.zod.d.ts +17 -5
  84. package/dist/fleet/v1/generated/validators/listMcpToolsParams.zod.js +17 -5
  85. package/dist/fleet/v1/generated/validators/listPrivilegeAutoApprovalsParams.zod.d.ts +17 -5
  86. package/dist/fleet/v1/generated/validators/listPrivilegeAutoApprovalsParams.zod.js +17 -5
  87. package/dist/fleet/v1/generated/validators/listPrivilegeRequestsParams.zod.d.ts +17 -5
  88. package/dist/fleet/v1/generated/validators/listPrivilegeRequestsParams.zod.js +17 -5
  89. package/dist/fleet/v1/generated/validators/listSessionsParams.zod.d.ts +17 -5
  90. package/dist/fleet/v1/generated/validators/listSessionsParams.zod.js +17 -5
  91. package/dist/fleet/v1/generated/validators/machineEventList.zod.d.ts +17 -5
  92. package/dist/fleet/v1/generated/validators/machineEventList.zod.js +17 -5
  93. package/dist/fleet/v1/generated/validators/machineEventResource.zod.d.ts +17 -5
  94. package/dist/fleet/v1/generated/validators/machineEventResource.zod.js +17 -5
  95. package/dist/fleet/v1/generated/validators/machineEventType.zod.d.ts +17 -5
  96. package/dist/fleet/v1/generated/validators/machineEventType.zod.js +17 -5
  97. package/dist/fleet/v1/generated/validators/machineFeature.zod.d.ts +17 -5
  98. package/dist/fleet/v1/generated/validators/machineFeature.zod.js +17 -5
  99. package/dist/fleet/v1/generated/validators/machineList.zod.d.ts +17 -5
  100. package/dist/fleet/v1/generated/validators/machineList.zod.js +17 -5
  101. package/dist/fleet/v1/generated/validators/machineRegistrationList.zod.d.ts +17 -5
  102. package/dist/fleet/v1/generated/validators/machineRegistrationList.zod.js +17 -5
  103. package/dist/fleet/v1/generated/validators/machineRegistrationResource.zod.d.ts +17 -5
  104. package/dist/fleet/v1/generated/validators/machineRegistrationResource.zod.js +17 -5
  105. package/dist/fleet/v1/generated/validators/machineRegistrationState.zod.d.ts +17 -5
  106. package/dist/fleet/v1/generated/validators/machineRegistrationState.zod.js +17 -5
  107. package/dist/fleet/v1/generated/validators/machineResource.zod.d.ts +17 -5
  108. package/dist/fleet/v1/generated/validators/machineResource.zod.js +17 -5
  109. package/dist/fleet/v1/generated/validators/mcpConfigurationFile.zod.d.ts +17 -5
  110. package/dist/fleet/v1/generated/validators/mcpConfigurationFile.zod.js +17 -5
  111. package/dist/fleet/v1/generated/validators/mcpConfigurationResource.zod.d.ts +17 -5
  112. package/dist/fleet/v1/generated/validators/mcpConfigurationResource.zod.js +17 -5
  113. package/dist/fleet/v1/generated/validators/mcpImplementation.zod.d.ts +17 -5
  114. package/dist/fleet/v1/generated/validators/mcpImplementation.zod.js +17 -5
  115. package/dist/fleet/v1/generated/validators/mcpServerFailure.zod.d.ts +17 -5
  116. package/dist/fleet/v1/generated/validators/mcpServerFailure.zod.js +17 -5
  117. package/dist/fleet/v1/generated/validators/mcpServerResource.zod.d.ts +17 -5
  118. package/dist/fleet/v1/generated/validators/mcpServerResource.zod.js +17 -5
  119. package/dist/fleet/v1/generated/validators/mcpToolList.zod.d.ts +17 -5
  120. package/dist/fleet/v1/generated/validators/mcpToolList.zod.js +17 -5
  121. package/dist/fleet/v1/generated/validators/mcpToolResource.zod.d.ts +17 -5
  122. package/dist/fleet/v1/generated/validators/mcpToolResource.zod.js +17 -5
  123. package/dist/fleet/v1/generated/validators/mcpTransport.zod.d.ts +17 -5
  124. package/dist/fleet/v1/generated/validators/mcpTransport.zod.js +17 -5
  125. package/dist/fleet/v1/generated/validators/mcpUnavailableServer.zod.d.ts +17 -5
  126. package/dist/fleet/v1/generated/validators/mcpUnavailableServer.zod.js +17 -5
  127. package/dist/fleet/v1/generated/validators/migrationStep.zod.d.ts +17 -5
  128. package/dist/fleet/v1/generated/validators/migrationStep.zod.js +17 -5
  129. package/dist/fleet/v1/generated/validators/namedIdentity.zod.d.ts +17 -5
  130. package/dist/fleet/v1/generated/validators/namedIdentity.zod.js +17 -5
  131. package/dist/fleet/v1/generated/validators/offsetPagination.zod.d.ts +17 -5
  132. package/dist/fleet/v1/generated/validators/offsetPagination.zod.js +17 -5
  133. package/dist/fleet/v1/generated/validators/operatingSystem.zod.d.ts +17 -5
  134. package/dist/fleet/v1/generated/validators/operatingSystem.zod.js +17 -5
  135. package/dist/fleet/v1/generated/validators/participantList.zod.d.ts +17 -5
  136. package/dist/fleet/v1/generated/validators/participantList.zod.js +17 -5
  137. package/dist/fleet/v1/generated/validators/participantResource.zod.d.ts +17 -5
  138. package/dist/fleet/v1/generated/validators/participantResource.zod.js +17 -5
  139. package/dist/fleet/v1/generated/validators/peerConnection.zod.d.ts +17 -5
  140. package/dist/fleet/v1/generated/validators/peerConnection.zod.js +17 -5
  141. package/dist/fleet/v1/generated/validators/privilegeAutoApprovalList.zod.d.ts +21 -5
  142. package/dist/fleet/v1/generated/validators/privilegeAutoApprovalList.zod.js +17 -5
  143. package/dist/fleet/v1/generated/validators/privilegeAutoApprovalMode.zod.d.ts +244 -0
  144. package/dist/fleet/v1/generated/validators/privilegeAutoApprovalMode.zod.js +241 -0
  145. package/dist/fleet/v1/generated/validators/privilegeAutoApprovalResource.zod.d.ts +21 -5
  146. package/dist/fleet/v1/generated/validators/privilegeAutoApprovalResource.zod.js +19 -5
  147. package/dist/fleet/v1/generated/validators/privilegeDecider.zod.d.ts +19 -6
  148. package/dist/fleet/v1/generated/validators/privilegeDecider.zod.js +19 -7
  149. package/dist/fleet/v1/generated/validators/privilegeRequestList.zod.d.ts +20 -6
  150. package/dist/fleet/v1/generated/validators/privilegeRequestList.zod.js +17 -5
  151. package/dist/fleet/v1/generated/validators/privilegeRequestResource.zod.d.ts +21 -6
  152. package/dist/fleet/v1/generated/validators/privilegeRequestResource.zod.js +23 -5
  153. package/dist/fleet/v1/generated/validators/privilegeRequestState.zod.d.ts +17 -5
  154. package/dist/fleet/v1/generated/validators/privilegeRequestState.zod.js +17 -5
  155. package/dist/fleet/v1/generated/validators/publicKey.zod.d.ts +17 -5
  156. package/dist/fleet/v1/generated/validators/publicKey.zod.js +17 -5
  157. package/dist/fleet/v1/generated/validators/renewParticipantRequest.zod.d.ts +17 -5
  158. package/dist/fleet/v1/generated/validators/renewParticipantRequest.zod.js +17 -5
  159. package/dist/fleet/v1/generated/validators/renewParticipantResponse.zod.d.ts +17 -5
  160. package/dist/fleet/v1/generated/validators/renewParticipantResponse.zod.js +17 -5
  161. package/dist/fleet/v1/generated/validators/replaceMcpConfigurationRequest.zod.d.ts +17 -5
  162. package/dist/fleet/v1/generated/validators/replaceMcpConfigurationRequest.zod.js +17 -5
  163. package/dist/fleet/v1/generated/validators/rtcConfiguration.zod.d.ts +17 -5
  164. package/dist/fleet/v1/generated/validators/rtcConfiguration.zod.js +17 -5
  165. package/dist/fleet/v1/generated/validators/runCommandRequest.zod.d.ts +17 -5
  166. package/dist/fleet/v1/generated/validators/runCommandRequest.zod.js +17 -5
  167. package/dist/fleet/v1/generated/validators/runCommandResponse.zod.d.ts +17 -5
  168. package/dist/fleet/v1/generated/validators/runCommandResponse.zod.js +17 -5
  169. package/dist/fleet/v1/generated/validators/sendMcpRequestRequest.zod.d.ts +17 -5
  170. package/dist/fleet/v1/generated/validators/sendMcpRequestRequest.zod.js +17 -5
  171. package/dist/fleet/v1/generated/validators/sendMcpRequestResponse.zod.d.ts +17 -5
  172. package/dist/fleet/v1/generated/validators/sendMcpRequestResponse.zod.js +17 -5
  173. package/dist/fleet/v1/generated/validators/sessionCloseReason.zod.d.ts +17 -5
  174. package/dist/fleet/v1/generated/validators/sessionCloseReason.zod.js +17 -5
  175. package/dist/fleet/v1/generated/validators/sessionList.zod.d.ts +17 -5
  176. package/dist/fleet/v1/generated/validators/sessionList.zod.js +17 -5
  177. package/dist/fleet/v1/generated/validators/sessionMode.zod.d.ts +17 -5
  178. package/dist/fleet/v1/generated/validators/sessionMode.zod.js +17 -5
  179. package/dist/fleet/v1/generated/validators/sessionResource.zod.d.ts +17 -5
  180. package/dist/fleet/v1/generated/validators/sessionResource.zod.js +17 -5
  181. package/dist/fleet/v1/generated/validators/sessionState.zod.d.ts +17 -5
  182. package/dist/fleet/v1/generated/validators/sessionState.zod.js +17 -5
  183. package/dist/fleet/v1/generated/validators/signedMessage.zod.d.ts +17 -5
  184. package/dist/fleet/v1/generated/validators/signedMessage.zod.js +17 -5
  185. package/dist/fleet/v1/generated/validators/signingKey.zod.d.ts +17 -5
  186. package/dist/fleet/v1/generated/validators/signingKey.zod.js +17 -5
  187. package/dist/fleet/v1/generated/validators/updateAccountRequest.zod.d.ts +17 -5
  188. package/dist/fleet/v1/generated/validators/updateAccountRequest.zod.js +17 -5
  189. package/dist/fleet/v1/generated/validators/updateGroupRequest.zod.d.ts +17 -5
  190. package/dist/fleet/v1/generated/validators/updateGroupRequest.zod.js +17 -5
  191. package/dist/fleet/v1/generated/validators/updateMachineRequest.zod.d.ts +17 -5
  192. package/dist/fleet/v1/generated/validators/updateMachineRequest.zod.js +17 -5
  193. package/dist/fleet/v1/generated/validators/updateMcpServerRequest.zod.d.ts +17 -5
  194. package/dist/fleet/v1/generated/validators/updateMcpServerRequest.zod.js +17 -5
  195. package/dist/fleet/v1/generated/validators/updateMcpServerResponse.zod.d.ts +17 -5
  196. package/dist/fleet/v1/generated/validators/updateMcpServerResponse.zod.js +17 -5
  197. package/dist/fleet/v1/generated/validators/updatePrivilegeAutoApprovalRequest.zod.d.ts +21 -5
  198. package/dist/fleet/v1/generated/validators/updatePrivilegeAutoApprovalRequest.zod.js +19 -5
  199. package/dist/proto/leaflow/fleet/privilege/v1/privilege_pb.d.ts +20 -5
  200. package/dist/proto/leaflow/fleet/privilege/v1/privilege_pb.js +1 -1
  201. package/package.json +1 -1
@@ -139,16 +139,28 @@
139
139
  * applies:
140
140
  *
141
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`);
142
+ * - by the user's automatic approval for the machine, for a while or until removed
143
+ * (`PUT /api/v1/machines/{machineId}/privilege-auto-approval`), in one of two modes:
144
+ * - `automatic_review`, the recommended one: a large language model reviews each request and
145
+ * approves or denies it with a reason. It stops most dangerous requests, but not all of
146
+ * them. Each review is a request to Canopy, the model platform, through the project's
147
+ * Canopy service, and may incur Canopy charges; the project needs Canopy enabled. A
148
+ * request that cannot be reviewed, such as when the project has not enabled Canopy or the
149
+ * review does not complete in time, is denied with a reason saying so;
150
+ * - `always_approve`: every request is approved at once. This is dangerous: any program that
151
+ * runs as the account, such as a script or an AI agent, becomes root without anyone being
152
+ * asked;
144
153
  * - by the user, on any of their devices, for a request listed by `GET /api/v1/privilege-requests`
145
154
  * (`POST …:approve` or `…:deny`), or on a participant of the session the asking process belongs
146
155
  * to. A request nobody decides expires, and sudo fails.
147
156
  *
157
+ * A denied sudo shows whoever ran it the reason, when the denial gave one.
158
+ *
148
159
  * 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
160
+ * `leaflow.fleet.privilege.requested` when one waits for the user and
161
+ * `leaflow.fleet.privilege.decided` when it ends, each addressed to the user in the current
162
+ * project and carrying the request's `id`. Requests decided without asking the user raise
163
+ * neither. A client that subscribes to them needs no polling; one that does not can list the
152
164
  * pending requests.
153
165
  *
154
166
  * ## Connections that drop
@@ -139,16 +139,28 @@
139
139
  * applies:
140
140
  *
141
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`);
142
+ * - by the user's automatic approval for the machine, for a while or until removed
143
+ * (`PUT /api/v1/machines/{machineId}/privilege-auto-approval`), in one of two modes:
144
+ * - `automatic_review`, the recommended one: a large language model reviews each request and
145
+ * approves or denies it with a reason. It stops most dangerous requests, but not all of
146
+ * them. Each review is a request to Canopy, the model platform, through the project's
147
+ * Canopy service, and may incur Canopy charges; the project needs Canopy enabled. A
148
+ * request that cannot be reviewed, such as when the project has not enabled Canopy or the
149
+ * review does not complete in time, is denied with a reason saying so;
150
+ * - `always_approve`: every request is approved at once. This is dangerous: any program that
151
+ * runs as the account, such as a script or an AI agent, becomes root without anyone being
152
+ * asked;
144
153
  * - by the user, on any of their devices, for a request listed by `GET /api/v1/privilege-requests`
145
154
  * (`POST …:approve` or `…:deny`), or on a participant of the session the asking process belongs
146
155
  * to. A request nobody decides expires, and sudo fails.
147
156
  *
157
+ * A denied sudo shows whoever ran it the reason, when the denial gave one.
158
+ *
148
159
  * 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
160
+ * `leaflow.fleet.privilege.requested` when one waits for the user and
161
+ * `leaflow.fleet.privilege.decided` when it ends, each addressed to the user in the current
162
+ * project and carrying the request's `id`. Requests decided without asking the user raise
163
+ * neither. A client that subscribes to them needs no polling; one that does not can list the
152
164
  * pending requests.
153
165
  *
154
166
  * ## Connections that drop
@@ -139,16 +139,28 @@
139
139
  * applies:
140
140
  *
141
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`);
142
+ * - by the user's automatic approval for the machine, for a while or until removed
143
+ * (`PUT /api/v1/machines/{machineId}/privilege-auto-approval`), in one of two modes:
144
+ * - `automatic_review`, the recommended one: a large language model reviews each request and
145
+ * approves or denies it with a reason. It stops most dangerous requests, but not all of
146
+ * them. Each review is a request to Canopy, the model platform, through the project's
147
+ * Canopy service, and may incur Canopy charges; the project needs Canopy enabled. A
148
+ * request that cannot be reviewed, such as when the project has not enabled Canopy or the
149
+ * review does not complete in time, is denied with a reason saying so;
150
+ * - `always_approve`: every request is approved at once. This is dangerous: any program that
151
+ * runs as the account, such as a script or an AI agent, becomes root without anyone being
152
+ * asked;
144
153
  * - by the user, on any of their devices, for a request listed by `GET /api/v1/privilege-requests`
145
154
  * (`POST …:approve` or `…:deny`), or on a participant of the session the asking process belongs
146
155
  * to. A request nobody decides expires, and sudo fails.
147
156
  *
157
+ * A denied sudo shows whoever ran it the reason, when the denial gave one.
158
+ *
148
159
  * 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
160
+ * `leaflow.fleet.privilege.requested` when one waits for the user and
161
+ * `leaflow.fleet.privilege.decided` when it ends, each addressed to the user in the current
162
+ * project and carrying the request's `id`. Requests decided without asking the user raise
163
+ * neither. A client that subscribes to them needs no polling; one that does not can list the
152
164
  * pending requests.
153
165
  *
154
166
  * ## Connections that drop
@@ -139,16 +139,28 @@
139
139
  * applies:
140
140
  *
141
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`);
142
+ * - by the user's automatic approval for the machine, for a while or until removed
143
+ * (`PUT /api/v1/machines/{machineId}/privilege-auto-approval`), in one of two modes:
144
+ * - `automatic_review`, the recommended one: a large language model reviews each request and
145
+ * approves or denies it with a reason. It stops most dangerous requests, but not all of
146
+ * them. Each review is a request to Canopy, the model platform, through the project's
147
+ * Canopy service, and may incur Canopy charges; the project needs Canopy enabled. A
148
+ * request that cannot be reviewed, such as when the project has not enabled Canopy or the
149
+ * review does not complete in time, is denied with a reason saying so;
150
+ * - `always_approve`: every request is approved at once. This is dangerous: any program that
151
+ * runs as the account, such as a script or an AI agent, becomes root without anyone being
152
+ * asked;
144
153
  * - by the user, on any of their devices, for a request listed by `GET /api/v1/privilege-requests`
145
154
  * (`POST …:approve` or `…:deny`), or on a participant of the session the asking process belongs
146
155
  * to. A request nobody decides expires, and sudo fails.
147
156
  *
157
+ * A denied sudo shows whoever ran it the reason, when the denial gave one.
158
+ *
148
159
  * 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
160
+ * `leaflow.fleet.privilege.requested` when one waits for the user and
161
+ * `leaflow.fleet.privilege.decided` when it ends, each addressed to the user in the current
162
+ * project and carrying the request's `id`. Requests decided without asking the user raise
163
+ * neither. A client that subscribes to them needs no polling; one that does not can list the
152
164
  * pending requests.
153
165
  *
154
166
  * ## Connections that drop
@@ -139,16 +139,28 @@
139
139
  * applies:
140
140
  *
141
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`);
142
+ * - by the user's automatic approval for the machine, for a while or until removed
143
+ * (`PUT /api/v1/machines/{machineId}/privilege-auto-approval`), in one of two modes:
144
+ * - `automatic_review`, the recommended one: a large language model reviews each request and
145
+ * approves or denies it with a reason. It stops most dangerous requests, but not all of
146
+ * them. Each review is a request to Canopy, the model platform, through the project's
147
+ * Canopy service, and may incur Canopy charges; the project needs Canopy enabled. A
148
+ * request that cannot be reviewed, such as when the project has not enabled Canopy or the
149
+ * review does not complete in time, is denied with a reason saying so;
150
+ * - `always_approve`: every request is approved at once. This is dangerous: any program that
151
+ * runs as the account, such as a script or an AI agent, becomes root without anyone being
152
+ * asked;
144
153
  * - by the user, on any of their devices, for a request listed by `GET /api/v1/privilege-requests`
145
154
  * (`POST …:approve` or `…:deny`), or on a participant of the session the asking process belongs
146
155
  * to. A request nobody decides expires, and sudo fails.
147
156
  *
157
+ * A denied sudo shows whoever ran it the reason, when the denial gave one.
158
+ *
148
159
  * 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
160
+ * `leaflow.fleet.privilege.requested` when one waits for the user and
161
+ * `leaflow.fleet.privilege.decided` when it ends, each addressed to the user in the current
162
+ * project and carrying the request's `id`. Requests decided without asking the user raise
163
+ * neither. A client that subscribes to them needs no polling; one that does not can list the
152
164
  * pending requests.
153
165
  *
154
166
  * ## Connections that drop
@@ -139,16 +139,28 @@
139
139
  * applies:
140
140
  *
141
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`);
142
+ * - by the user's automatic approval for the machine, for a while or until removed
143
+ * (`PUT /api/v1/machines/{machineId}/privilege-auto-approval`), in one of two modes:
144
+ * - `automatic_review`, the recommended one: a large language model reviews each request and
145
+ * approves or denies it with a reason. It stops most dangerous requests, but not all of
146
+ * them. Each review is a request to Canopy, the model platform, through the project's
147
+ * Canopy service, and may incur Canopy charges; the project needs Canopy enabled. A
148
+ * request that cannot be reviewed, such as when the project has not enabled Canopy or the
149
+ * review does not complete in time, is denied with a reason saying so;
150
+ * - `always_approve`: every request is approved at once. This is dangerous: any program that
151
+ * runs as the account, such as a script or an AI agent, becomes root without anyone being
152
+ * asked;
144
153
  * - by the user, on any of their devices, for a request listed by `GET /api/v1/privilege-requests`
145
154
  * (`POST …:approve` or `…:deny`), or on a participant of the session the asking process belongs
146
155
  * to. A request nobody decides expires, and sudo fails.
147
156
  *
157
+ * A denied sudo shows whoever ran it the reason, when the denial gave one.
158
+ *
148
159
  * 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
160
+ * `leaflow.fleet.privilege.requested` when one waits for the user and
161
+ * `leaflow.fleet.privilege.decided` when it ends, each addressed to the user in the current
162
+ * project and carrying the request's `id`. Requests decided without asking the user raise
163
+ * neither. A client that subscribes to them needs no polling; one that does not can list the
152
164
  * pending requests.
153
165
  *
154
166
  * ## Connections that drop
@@ -139,16 +139,28 @@
139
139
  * applies:
140
140
  *
141
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`);
142
+ * - by the user's automatic approval for the machine, for a while or until removed
143
+ * (`PUT /api/v1/machines/{machineId}/privilege-auto-approval`), in one of two modes:
144
+ * - `automatic_review`, the recommended one: a large language model reviews each request and
145
+ * approves or denies it with a reason. It stops most dangerous requests, but not all of
146
+ * them. Each review is a request to Canopy, the model platform, through the project's
147
+ * Canopy service, and may incur Canopy charges; the project needs Canopy enabled. A
148
+ * request that cannot be reviewed, such as when the project has not enabled Canopy or the
149
+ * review does not complete in time, is denied with a reason saying so;
150
+ * - `always_approve`: every request is approved at once. This is dangerous: any program that
151
+ * runs as the account, such as a script or an AI agent, becomes root without anyone being
152
+ * asked;
144
153
  * - by the user, on any of their devices, for a request listed by `GET /api/v1/privilege-requests`
145
154
  * (`POST …:approve` or `…:deny`), or on a participant of the session the asking process belongs
146
155
  * to. A request nobody decides expires, and sudo fails.
147
156
  *
157
+ * A denied sudo shows whoever ran it the reason, when the denial gave one.
158
+ *
148
159
  * 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
160
+ * `leaflow.fleet.privilege.requested` when one waits for the user and
161
+ * `leaflow.fleet.privilege.decided` when it ends, each addressed to the user in the current
162
+ * project and carrying the request's `id`. Requests decided without asking the user raise
163
+ * neither. A client that subscribes to them needs no polling; one that does not can list the
152
164
  * pending requests.
153
165
  *
154
166
  * ## Connections that drop
@@ -139,16 +139,28 @@
139
139
  * applies:
140
140
  *
141
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`);
142
+ * - by the user's automatic approval for the machine, for a while or until removed
143
+ * (`PUT /api/v1/machines/{machineId}/privilege-auto-approval`), in one of two modes:
144
+ * - `automatic_review`, the recommended one: a large language model reviews each request and
145
+ * approves or denies it with a reason. It stops most dangerous requests, but not all of
146
+ * them. Each review is a request to Canopy, the model platform, through the project's
147
+ * Canopy service, and may incur Canopy charges; the project needs Canopy enabled. A
148
+ * request that cannot be reviewed, such as when the project has not enabled Canopy or the
149
+ * review does not complete in time, is denied with a reason saying so;
150
+ * - `always_approve`: every request is approved at once. This is dangerous: any program that
151
+ * runs as the account, such as a script or an AI agent, becomes root without anyone being
152
+ * asked;
144
153
  * - by the user, on any of their devices, for a request listed by `GET /api/v1/privilege-requests`
145
154
  * (`POST …:approve` or `…:deny`), or on a participant of the session the asking process belongs
146
155
  * to. A request nobody decides expires, and sudo fails.
147
156
  *
157
+ * A denied sudo shows whoever ran it the reason, when the denial gave one.
158
+ *
148
159
  * 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
160
+ * `leaflow.fleet.privilege.requested` when one waits for the user and
161
+ * `leaflow.fleet.privilege.decided` when it ends, each addressed to the user in the current
162
+ * project and carrying the request's `id`. Requests decided without asking the user raise
163
+ * neither. A client that subscribes to them needs no polling; one that does not can list the
152
164
  * pending requests.
153
165
  *
154
166
  * ## Connections that drop
@@ -139,16 +139,28 @@
139
139
  * applies:
140
140
  *
141
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`);
142
+ * - by the user's automatic approval for the machine, for a while or until removed
143
+ * (`PUT /api/v1/machines/{machineId}/privilege-auto-approval`), in one of two modes:
144
+ * - `automatic_review`, the recommended one: a large language model reviews each request and
145
+ * approves or denies it with a reason. It stops most dangerous requests, but not all of
146
+ * them. Each review is a request to Canopy, the model platform, through the project's
147
+ * Canopy service, and may incur Canopy charges; the project needs Canopy enabled. A
148
+ * request that cannot be reviewed, such as when the project has not enabled Canopy or the
149
+ * review does not complete in time, is denied with a reason saying so;
150
+ * - `always_approve`: every request is approved at once. This is dangerous: any program that
151
+ * runs as the account, such as a script or an AI agent, becomes root without anyone being
152
+ * asked;
144
153
  * - by the user, on any of their devices, for a request listed by `GET /api/v1/privilege-requests`
145
154
  * (`POST …:approve` or `…:deny`), or on a participant of the session the asking process belongs
146
155
  * to. A request nobody decides expires, and sudo fails.
147
156
  *
157
+ * A denied sudo shows whoever ran it the reason, when the denial gave one.
158
+ *
148
159
  * 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
160
+ * `leaflow.fleet.privilege.requested` when one waits for the user and
161
+ * `leaflow.fleet.privilege.decided` when it ends, each addressed to the user in the current
162
+ * project and carrying the request's `id`. Requests decided without asking the user raise
163
+ * neither. A client that subscribes to them needs no polling; one that does not can list the
152
164
  * pending requests.
153
165
  *
154
166
  * ## Connections that drop
@@ -139,16 +139,28 @@
139
139
  * applies:
140
140
  *
141
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`);
142
+ * - by the user's automatic approval for the machine, for a while or until removed
143
+ * (`PUT /api/v1/machines/{machineId}/privilege-auto-approval`), in one of two modes:
144
+ * - `automatic_review`, the recommended one: a large language model reviews each request and
145
+ * approves or denies it with a reason. It stops most dangerous requests, but not all of
146
+ * them. Each review is a request to Canopy, the model platform, through the project's
147
+ * Canopy service, and may incur Canopy charges; the project needs Canopy enabled. A
148
+ * request that cannot be reviewed, such as when the project has not enabled Canopy or the
149
+ * review does not complete in time, is denied with a reason saying so;
150
+ * - `always_approve`: every request is approved at once. This is dangerous: any program that
151
+ * runs as the account, such as a script or an AI agent, becomes root without anyone being
152
+ * asked;
144
153
  * - by the user, on any of their devices, for a request listed by `GET /api/v1/privilege-requests`
145
154
  * (`POST …:approve` or `…:deny`), or on a participant of the session the asking process belongs
146
155
  * to. A request nobody decides expires, and sudo fails.
147
156
  *
157
+ * A denied sudo shows whoever ran it the reason, when the denial gave one.
158
+ *
148
159
  * 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
160
+ * `leaflow.fleet.privilege.requested` when one waits for the user and
161
+ * `leaflow.fleet.privilege.decided` when it ends, each addressed to the user in the current
162
+ * project and carrying the request's `id`. Requests decided without asking the user raise
163
+ * neither. A client that subscribes to them needs no polling; one that does not can list the
152
164
  * pending requests.
153
165
  *
154
166
  * ## Connections that drop
@@ -139,16 +139,28 @@
139
139
  * applies:
140
140
  *
141
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`);
142
+ * - by the user's automatic approval for the machine, for a while or until removed
143
+ * (`PUT /api/v1/machines/{machineId}/privilege-auto-approval`), in one of two modes:
144
+ * - `automatic_review`, the recommended one: a large language model reviews each request and
145
+ * approves or denies it with a reason. It stops most dangerous requests, but not all of
146
+ * them. Each review is a request to Canopy, the model platform, through the project's
147
+ * Canopy service, and may incur Canopy charges; the project needs Canopy enabled. A
148
+ * request that cannot be reviewed, such as when the project has not enabled Canopy or the
149
+ * review does not complete in time, is denied with a reason saying so;
150
+ * - `always_approve`: every request is approved at once. This is dangerous: any program that
151
+ * runs as the account, such as a script or an AI agent, becomes root without anyone being
152
+ * asked;
144
153
  * - by the user, on any of their devices, for a request listed by `GET /api/v1/privilege-requests`
145
154
  * (`POST …:approve` or `…:deny`), or on a participant of the session the asking process belongs
146
155
  * to. A request nobody decides expires, and sudo fails.
147
156
  *
157
+ * A denied sudo shows whoever ran it the reason, when the denial gave one.
158
+ *
148
159
  * 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
160
+ * `leaflow.fleet.privilege.requested` when one waits for the user and
161
+ * `leaflow.fleet.privilege.decided` when it ends, each addressed to the user in the current
162
+ * project and carrying the request's `id`. Requests decided without asking the user raise
163
+ * neither. A client that subscribes to them needs no polling; one that does not can list the
152
164
  * pending requests.
153
165
  *
154
166
  * ## Connections that drop
@@ -139,16 +139,28 @@
139
139
  * applies:
140
140
  *
141
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`);
142
+ * - by the user's automatic approval for the machine, for a while or until removed
143
+ * (`PUT /api/v1/machines/{machineId}/privilege-auto-approval`), in one of two modes:
144
+ * - `automatic_review`, the recommended one: a large language model reviews each request and
145
+ * approves or denies it with a reason. It stops most dangerous requests, but not all of
146
+ * them. Each review is a request to Canopy, the model platform, through the project's
147
+ * Canopy service, and may incur Canopy charges; the project needs Canopy enabled. A
148
+ * request that cannot be reviewed, such as when the project has not enabled Canopy or the
149
+ * review does not complete in time, is denied with a reason saying so;
150
+ * - `always_approve`: every request is approved at once. This is dangerous: any program that
151
+ * runs as the account, such as a script or an AI agent, becomes root without anyone being
152
+ * asked;
144
153
  * - by the user, on any of their devices, for a request listed by `GET /api/v1/privilege-requests`
145
154
  * (`POST …:approve` or `…:deny`), or on a participant of the session the asking process belongs
146
155
  * to. A request nobody decides expires, and sudo fails.
147
156
  *
157
+ * A denied sudo shows whoever ran it the reason, when the denial gave one.
158
+ *
148
159
  * 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
160
+ * `leaflow.fleet.privilege.requested` when one waits for the user and
161
+ * `leaflow.fleet.privilege.decided` when it ends, each addressed to the user in the current
162
+ * project and carrying the request's `id`. Requests decided without asking the user raise
163
+ * neither. A client that subscribes to them needs no polling; one that does not can list the
152
164
  * pending requests.
153
165
  *
154
166
  * ## Connections that drop
@@ -139,16 +139,28 @@
139
139
  * applies:
140
140
  *
141
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`);
142
+ * - by the user's automatic approval for the machine, for a while or until removed
143
+ * (`PUT /api/v1/machines/{machineId}/privilege-auto-approval`), in one of two modes:
144
+ * - `automatic_review`, the recommended one: a large language model reviews each request and
145
+ * approves or denies it with a reason. It stops most dangerous requests, but not all of
146
+ * them. Each review is a request to Canopy, the model platform, through the project's
147
+ * Canopy service, and may incur Canopy charges; the project needs Canopy enabled. A
148
+ * request that cannot be reviewed, such as when the project has not enabled Canopy or the
149
+ * review does not complete in time, is denied with a reason saying so;
150
+ * - `always_approve`: every request is approved at once. This is dangerous: any program that
151
+ * runs as the account, such as a script or an AI agent, becomes root without anyone being
152
+ * asked;
144
153
  * - by the user, on any of their devices, for a request listed by `GET /api/v1/privilege-requests`
145
154
  * (`POST …:approve` or `…:deny`), or on a participant of the session the asking process belongs
146
155
  * to. A request nobody decides expires, and sudo fails.
147
156
  *
157
+ * A denied sudo shows whoever ran it the reason, when the denial gave one.
158
+ *
148
159
  * 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
160
+ * `leaflow.fleet.privilege.requested` when one waits for the user and
161
+ * `leaflow.fleet.privilege.decided` when it ends, each addressed to the user in the current
162
+ * project and carrying the request's `id`. Requests decided without asking the user raise
163
+ * neither. A client that subscribes to them needs no polling; one that does not can list the
152
164
  * pending requests.
153
165
  *
154
166
  * ## Connections that drop
@@ -139,16 +139,28 @@
139
139
  * applies:
140
140
  *
141
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`);
142
+ * - by the user's automatic approval for the machine, for a while or until removed
143
+ * (`PUT /api/v1/machines/{machineId}/privilege-auto-approval`), in one of two modes:
144
+ * - `automatic_review`, the recommended one: a large language model reviews each request and
145
+ * approves or denies it with a reason. It stops most dangerous requests, but not all of
146
+ * them. Each review is a request to Canopy, the model platform, through the project's
147
+ * Canopy service, and may incur Canopy charges; the project needs Canopy enabled. A
148
+ * request that cannot be reviewed, such as when the project has not enabled Canopy or the
149
+ * review does not complete in time, is denied with a reason saying so;
150
+ * - `always_approve`: every request is approved at once. This is dangerous: any program that
151
+ * runs as the account, such as a script or an AI agent, becomes root without anyone being
152
+ * asked;
144
153
  * - by the user, on any of their devices, for a request listed by `GET /api/v1/privilege-requests`
145
154
  * (`POST …:approve` or `…:deny`), or on a participant of the session the asking process belongs
146
155
  * to. A request nobody decides expires, and sudo fails.
147
156
  *
157
+ * A denied sudo shows whoever ran it the reason, when the denial gave one.
158
+ *
148
159
  * 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
160
+ * `leaflow.fleet.privilege.requested` when one waits for the user and
161
+ * `leaflow.fleet.privilege.decided` when it ends, each addressed to the user in the current
162
+ * project and carrying the request's `id`. Requests decided without asking the user raise
163
+ * neither. A client that subscribes to them needs no polling; one that does not can list the
152
164
  * pending requests.
153
165
  *
154
166
  * ## Connections that drop
@@ -139,16 +139,28 @@
139
139
  * applies:
140
140
  *
141
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`);
142
+ * - by the user's automatic approval for the machine, for a while or until removed
143
+ * (`PUT /api/v1/machines/{machineId}/privilege-auto-approval`), in one of two modes:
144
+ * - `automatic_review`, the recommended one: a large language model reviews each request and
145
+ * approves or denies it with a reason. It stops most dangerous requests, but not all of
146
+ * them. Each review is a request to Canopy, the model platform, through the project's
147
+ * Canopy service, and may incur Canopy charges; the project needs Canopy enabled. A
148
+ * request that cannot be reviewed, such as when the project has not enabled Canopy or the
149
+ * review does not complete in time, is denied with a reason saying so;
150
+ * - `always_approve`: every request is approved at once. This is dangerous: any program that
151
+ * runs as the account, such as a script or an AI agent, becomes root without anyone being
152
+ * asked;
144
153
  * - by the user, on any of their devices, for a request listed by `GET /api/v1/privilege-requests`
145
154
  * (`POST …:approve` or `…:deny`), or on a participant of the session the asking process belongs
146
155
  * to. A request nobody decides expires, and sudo fails.
147
156
  *
157
+ * A denied sudo shows whoever ran it the reason, when the denial gave one.
158
+ *
148
159
  * 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
160
+ * `leaflow.fleet.privilege.requested` when one waits for the user and
161
+ * `leaflow.fleet.privilege.decided` when it ends, each addressed to the user in the current
162
+ * project and carrying the request's `id`. Requests decided without asking the user raise
163
+ * neither. A client that subscribes to them needs no polling; one that does not can list the
152
164
  * pending requests.
153
165
  *
154
166
  * ## Connections that drop
@@ -139,16 +139,28 @@
139
139
  * applies:
140
140
  *
141
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`);
142
+ * - by the user's automatic approval for the machine, for a while or until removed
143
+ * (`PUT /api/v1/machines/{machineId}/privilege-auto-approval`), in one of two modes:
144
+ * - `automatic_review`, the recommended one: a large language model reviews each request and
145
+ * approves or denies it with a reason. It stops most dangerous requests, but not all of
146
+ * them. Each review is a request to Canopy, the model platform, through the project's
147
+ * Canopy service, and may incur Canopy charges; the project needs Canopy enabled. A
148
+ * request that cannot be reviewed, such as when the project has not enabled Canopy or the
149
+ * review does not complete in time, is denied with a reason saying so;
150
+ * - `always_approve`: every request is approved at once. This is dangerous: any program that
151
+ * runs as the account, such as a script or an AI agent, becomes root without anyone being
152
+ * asked;
144
153
  * - by the user, on any of their devices, for a request listed by `GET /api/v1/privilege-requests`
145
154
  * (`POST …:approve` or `…:deny`), or on a participant of the session the asking process belongs
146
155
  * to. A request nobody decides expires, and sudo fails.
147
156
  *
157
+ * A denied sudo shows whoever ran it the reason, when the denial gave one.
158
+ *
148
159
  * 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
160
+ * `leaflow.fleet.privilege.requested` when one waits for the user and
161
+ * `leaflow.fleet.privilege.decided` when it ends, each addressed to the user in the current
162
+ * project and carrying the request's `id`. Requests decided without asking the user raise
163
+ * neither. A client that subscribes to them needs no polling; one that does not can list the
152
164
  * pending requests.
153
165
  *
154
166
  * ## Connections that drop
@@ -139,16 +139,28 @@
139
139
  * applies:
140
140
  *
141
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`);
142
+ * - by the user's automatic approval for the machine, for a while or until removed
143
+ * (`PUT /api/v1/machines/{machineId}/privilege-auto-approval`), in one of two modes:
144
+ * - `automatic_review`, the recommended one: a large language model reviews each request and
145
+ * approves or denies it with a reason. It stops most dangerous requests, but not all of
146
+ * them. Each review is a request to Canopy, the model platform, through the project's
147
+ * Canopy service, and may incur Canopy charges; the project needs Canopy enabled. A
148
+ * request that cannot be reviewed, such as when the project has not enabled Canopy or the
149
+ * review does not complete in time, is denied with a reason saying so;
150
+ * - `always_approve`: every request is approved at once. This is dangerous: any program that
151
+ * runs as the account, such as a script or an AI agent, becomes root without anyone being
152
+ * asked;
144
153
  * - by the user, on any of their devices, for a request listed by `GET /api/v1/privilege-requests`
145
154
  * (`POST …:approve` or `…:deny`), or on a participant of the session the asking process belongs
146
155
  * to. A request nobody decides expires, and sudo fails.
147
156
  *
157
+ * A denied sudo shows whoever ran it the reason, when the denial gave one.
158
+ *
148
159
  * 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
160
+ * `leaflow.fleet.privilege.requested` when one waits for the user and
161
+ * `leaflow.fleet.privilege.decided` when it ends, each addressed to the user in the current
162
+ * project and carrying the request's `id`. Requests decided without asking the user raise
163
+ * neither. A client that subscribes to them needs no polling; one that does not can list the
152
164
  * pending requests.
153
165
  *
154
166
  * ## Connections that drop