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