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