+36
![github-actions[bot]](/assets/img/avatar_default.png)








Julius Marminge
maria-rcks
Bilal Bakr
shivam
Vitalii Yehorov
Jake Leventhal
Claude Opus 5
Alex Southwell
github-actions[bot]
Nicholas Wasmiller
PB
Exotic
Yash Singh
Devin
Theo Browne
Gabriel De Andrade
Dara Adedeji
scratchyone
Dominic Roy
chukfinley
Primož Ajdišek
benthecarman
NaveDanan
aaditagrawal
Aditya Garud
Nick Anisimov
MacKinley Smith
Yordis Prieto
t3-code[bot]
AKolenda
Guillermo Casanova
Otavio Salvador
Shirish Pothi
Ishaan Kothari
Bob Fowler
Anton Bezdenezhnykh
ValeraZSD
Ephraim
Ryan Ilano
Alex
maco
Cursor
Tristan Knight
PR Batch Tester
oliver
kamkm
de34391427
Co-authored-by: maria-rcks <[email protected]> Co-authored-by: Bilal Bakr <[email protected]> Co-authored-by: shivam <[email protected]> Co-authored-by: Vitalii Yehorov <[email protected]> Co-authored-by: Jake Leventhal <[email protected]> Co-authored-by: Claude Opus 5 (1M context) <[email protected]> Co-authored-by: Alex Southwell <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Nicholas Wasmiller <[email protected]> Co-authored-by: PB <[email protected]> Co-authored-by: Exotic <[email protected]> Co-authored-by: Yash Singh <[email protected]> Co-authored-by: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Theo Browne <[email protected]> Co-authored-by: Gabriel De Andrade <[email protected]> Co-authored-by: Dara Adedeji <[email protected]> Co-authored-by: scratchyone <[email protected]> Co-authored-by: Dominic Roy <[email protected]> Co-authored-by: chukfinley <[email protected]> Co-authored-by: Primož Ajdišek <[email protected]> Co-authored-by: benthecarman <[email protected]> Co-authored-by: NaveDanan <[email protected]> Co-authored-by: aaditagrawal <[email protected]> Co-authored-by: Aditya Garud <[email protected]> Co-authored-by: Nick Anisimov <[email protected]> Co-authored-by: MacKinley Smith <[email protected]> Co-authored-by: Yordis Prieto <[email protected]> Co-authored-by: t3-code[bot] <269035359+t3-code[bot]@users.noreply.github.com> Co-authored-by: AKolenda <[email protected]> Co-authored-by: Guillermo Casanova <[email protected]> Co-authored-by: Otavio Salvador <[email protected]> Co-authored-by: Shirish Pothi <[email protected]> Co-authored-by: Ishaan Kothari <[email protected]> Co-authored-by: Bob Fowler <[email protected]> Co-authored-by: Anton Bezdenezhnykh <[email protected]> Co-authored-by: ValeraZSD <[email protected]> Co-authored-by: Ephraim <[email protected]> Co-authored-by: Ryan Ilano <[email protected]> Co-authored-by: Alex <[email protected]> Co-authored-by: maco <[email protected]> Co-authored-by: Cursor <[email protected]> Co-authored-by: Tristan Knight <[email protected]> Co-authored-by: PR Batch Tester <[email protected]> Co-authored-by: oliver <[email protected]> Co-authored-by: kamkm <[email protected]> Signed-off-by: Yordis Prieto <[email protected]>
1860 lines
63 KiB
TypeScript
1860 lines
63 KiB
TypeScript
import { OrchestrationDispatchCommandError } from "./orchestrationDispatch.ts";
|
|
import {
|
|
ChatGptReconnectProfileInput,
|
|
ChatGptReconnectProfile,
|
|
ChatGptImportProfileInput,
|
|
ChatGptHandoffInput,
|
|
ChatGptHandoffState,
|
|
} from "./providerSetup.ts";
|
|
import * as Schema from "effect/Schema";
|
|
import * as Rpc from "effect/unstable/rpc/Rpc";
|
|
import * as RpcGroup from "effect/unstable/rpc/RpcGroup";
|
|
import { NonNegativeInt, TrimmedNonEmptyString } from "./baseSchemas.ts";
|
|
import {
|
|
CodexAuthCallbackInput,
|
|
CodexAuthCallbackState,
|
|
ProviderAuthCancelInput,
|
|
ProviderAuthCompleteInput,
|
|
ProviderAuthState,
|
|
ProviderAuthStartInput,
|
|
ProviderAuthRespondInput,
|
|
ProviderInstallCancelInput,
|
|
ProviderInstallState,
|
|
ProviderSetupError,
|
|
ProviderSetupInput,
|
|
} from "./providerSetup.ts";
|
|
|
|
import {
|
|
AcpRegistryAcceptUrlAuthInput,
|
|
AcpRegistryAcceptUrlAuthResult,
|
|
AcpRegistryDeleteSessionInput,
|
|
AcpRegistryDeleteSessionResult,
|
|
AcpRegistryDisableProviderInput,
|
|
AcpRegistryDisableProviderResult,
|
|
AcpRegistryImportSessionInput,
|
|
AcpRegistryImportSessionResult,
|
|
AcpRegistryListSessionsInput,
|
|
AcpRegistryListSessionsResult,
|
|
AcpRegistryListProvidersInput,
|
|
AcpRegistryListProvidersResult,
|
|
AcpRegistryLogoutInput,
|
|
AcpRegistryLogoutResult,
|
|
AcpRegistryManagedBinaryUninstallInput,
|
|
AcpRegistryManagedBinaryUninstallResult,
|
|
AcpRegistryOperationError,
|
|
AcpRegistryPrepareInput,
|
|
AcpRegistryPrepareResult,
|
|
AcpRegistrySearchInput,
|
|
AcpRegistrySearchResult,
|
|
AcpRegistrySetProviderInput,
|
|
AcpRegistrySetProviderResult,
|
|
} from "./acpRegistry.ts";
|
|
import { ExternalLauncherError, LaunchEditorInput } from "./editor.ts";
|
|
import {
|
|
AuthAccessStreamError,
|
|
AuthAccessStreamEvent,
|
|
EnvironmentAuthorizationError,
|
|
} from "./auth.ts";
|
|
import {
|
|
BackgroundPolicySnapshot,
|
|
ClientActivityReportInput,
|
|
HostPowerSnapshot,
|
|
} from "./background.ts";
|
|
import {
|
|
FilesystemBrowseInput,
|
|
FilesystemBrowseResult,
|
|
FilesystemBrowseError,
|
|
} from "./filesystem.ts";
|
|
import {
|
|
AgentSessionImportInput,
|
|
AgentSessionImportProjectChangedError,
|
|
AgentSessionImportProjectNotFoundError,
|
|
AgentSessionImportResult,
|
|
AgentSessionScanInput,
|
|
AgentSessionScanResult,
|
|
AgentSessionScanError,
|
|
} from "./agentSessions.ts";
|
|
import {
|
|
AssetAccessError,
|
|
AssetCreateUrlInput,
|
|
AssetCreateUrlResult,
|
|
AttachmentCreateUploadUrlInput,
|
|
AttachmentCreateUploadUrlResult,
|
|
AttachmentDeleteInput,
|
|
AttachmentUploadSigningKeyError,
|
|
} from "./assets.ts";
|
|
import {
|
|
PersistChatAttachmentsError,
|
|
PersistChatAttachmentsInput,
|
|
PersistChatAttachmentsResult,
|
|
} from "./chatAttachment.ts";
|
|
import {
|
|
OrchestrationGetFullThreadDiffError,
|
|
OrchestrationGetTurnDiffError,
|
|
} from "./checkpointDiff.ts";
|
|
import {
|
|
WorktreeSetupCancelInput,
|
|
WorktreeSetupCancelResult,
|
|
WorktreeSetupStreamEvent,
|
|
WorktreeSetupSubscribeInput,
|
|
} from "./worktreeSetup.ts";
|
|
import {
|
|
GitActionProgressEvent,
|
|
VcsSwitchRefInput,
|
|
VcsSwitchRefResult,
|
|
GitCommandError,
|
|
VcsCreateRefInput,
|
|
VcsCreateRefResult,
|
|
VcsCreateWorktreeInput,
|
|
VcsCreateWorktreeResult,
|
|
VcsInitInput,
|
|
VcsListRefsInput,
|
|
VcsListRefsResult,
|
|
GitManagerServiceError,
|
|
GitPreparePullRequestThreadInput,
|
|
GitPreparePullRequestThreadResult,
|
|
VcsPullInput,
|
|
GitPullRequestRefInput,
|
|
VcsPullResult,
|
|
VcsRemoveWorktreeInput,
|
|
GitResolvePullRequestResult,
|
|
GitRunStackedActionInput,
|
|
VcsStatusInput,
|
|
VcsStatusResult,
|
|
VcsStatusStreamEvent,
|
|
} from "./git.ts";
|
|
import {
|
|
ReviewDiffFileContentsInput,
|
|
ReviewDiffFileContentsResult,
|
|
ReviewDiffPreviewError,
|
|
ReviewDiffPreviewInput,
|
|
ReviewDiffPreviewResult,
|
|
} from "./review.ts";
|
|
import { KeybindingsConfigError } from "./keybindings.ts";
|
|
import {
|
|
OrchestrationSearchThreadsError,
|
|
OrchestrationSearchThreadsInput,
|
|
OrchestrationSearchThreadsResult,
|
|
} from "./threadSearch.ts";
|
|
import {
|
|
ProviderUploadFeedbackError,
|
|
ProviderUploadFeedbackInput,
|
|
ProviderUploadFeedbackResult,
|
|
} from "./provider.ts";
|
|
import { ProviderInstanceId, ProviderInstanceMutation } from "./providerInstance.ts";
|
|
import {
|
|
PullRequestActionInput,
|
|
PullRequestActivity,
|
|
PullRequestCommentInput,
|
|
PullRequestCommentUpdateInput,
|
|
PullRequestDetail,
|
|
PullRequestPreview,
|
|
PullRequestChecks,
|
|
PullRequestDiffFileContentsInput,
|
|
PullRequestDiffFileContentsResult,
|
|
PullRequestFilesViewedResult,
|
|
PullRequestInvalidateInput,
|
|
PullRequestListInput,
|
|
PullRequestListResult,
|
|
PullRequestListStatsInput,
|
|
PullRequestListStatsResult,
|
|
PullRequestOperationError,
|
|
PullRequestReactionInput,
|
|
PullRequestRef,
|
|
PullRequestRoutingResult,
|
|
PullRequestRoutingIdentityInput,
|
|
PullRequestRoutingIdentityResult,
|
|
PullRequestStack,
|
|
PullRequestLinkedThreadsResult,
|
|
PullRequestSummary,
|
|
PullRequestReviewerCandidateList,
|
|
PullRequestReviewerRequestInput,
|
|
PullRequestLabelCandidateList,
|
|
PullRequestLabelChangeInput,
|
|
PullRequestSetFilesViewedInput,
|
|
PullRequestSubmitReviewInput,
|
|
PullRequestThreadCommentsInput,
|
|
PullRequestThreadCommentsResult,
|
|
PullRequestThreadReplyInput,
|
|
PullRequestThreadResolutionInput,
|
|
PullRequestUnavailableError,
|
|
PullRequestUpdateInput,
|
|
} from "./pullRequest.ts";
|
|
import {
|
|
RelayClientInstallFailedError,
|
|
RelayClientInstallProgressEventSchema,
|
|
RelayClientStatusSchema,
|
|
} from "./relayClient.ts";
|
|
import {
|
|
ORCHESTRATION_V2_WS_METHODS,
|
|
OrchestrationGetWorkflowScriptError,
|
|
OrchestrationV2DispatchCommandError,
|
|
OrchestrationV2GetShellSnapshotError,
|
|
OrchestrationV2GetThreadProjectionError,
|
|
OrchestrationV2RpcSchemas,
|
|
OrchestrationV2ThreadLaunchError,
|
|
} from "./orchestrationV2.ts";
|
|
import {
|
|
ProjectCreateNewInput,
|
|
ProjectCreateNewResult,
|
|
ProjectEnsureScratchResult,
|
|
ProjectListEntriesError,
|
|
ProjectListEntriesInput,
|
|
ProjectListEntriesResult,
|
|
ProjectReadFileError,
|
|
ProjectReadFileInput,
|
|
ProjectReadFileResult,
|
|
ProjectSearchContentsError,
|
|
ProjectSearchContentsInput,
|
|
ProjectSearchContentsResult,
|
|
ProjectSearchEntriesError,
|
|
ProjectSearchEntriesInput,
|
|
ProjectSearchEntriesResult,
|
|
ProjectWriteFileError,
|
|
ProjectWriteFileInput,
|
|
ProjectWriteFileResult,
|
|
} from "./project.ts";
|
|
import {
|
|
TerminalAttachInput,
|
|
TerminalAttachStreamEvent,
|
|
TerminalClearInput,
|
|
TerminalCloseInput,
|
|
TerminalError,
|
|
TerminalEvent,
|
|
TerminalMetadataStreamEvent,
|
|
TerminalOpenInput,
|
|
TerminalResizeInput,
|
|
TerminalRestartInput,
|
|
TerminalSessionSnapshot,
|
|
TerminalWriteInput,
|
|
} from "./terminal.ts";
|
|
import {
|
|
DiscoveredLocalServerList,
|
|
ConfiguredLocalServerUrls,
|
|
PreviewCloseInput,
|
|
PreviewError,
|
|
PreviewEvent,
|
|
PreviewListInput,
|
|
PreviewListResult,
|
|
PreviewNavigateInput,
|
|
PreviewOpenInput,
|
|
PreviewRefreshInput,
|
|
PreviewReportStatusInput,
|
|
PreviewResizeInput,
|
|
PreviewSessionSnapshot,
|
|
} from "./preview.ts";
|
|
import {
|
|
DeviceActionInput,
|
|
DeviceCloseInput,
|
|
DeviceConfigureInput,
|
|
DeviceDetail,
|
|
DeviceDetailInput,
|
|
DeviceError,
|
|
DeviceListInput,
|
|
SshDeviceHostConfig,
|
|
DeviceHostSummary,
|
|
DeviceOpenInput,
|
|
DeviceServiceState,
|
|
DeviceSession,
|
|
DeviceShutdownInput,
|
|
} from "./device.ts";
|
|
import {
|
|
PreviewAutomationError,
|
|
PreviewAutomationHost,
|
|
PreviewAutomationHostFocus,
|
|
PreviewAutomationResponse,
|
|
PreviewAutomationStreamEvent,
|
|
} from "./previewAutomation.ts";
|
|
import {
|
|
ServerConfigStreamEvent,
|
|
DesktopUpdateCommitInput,
|
|
ServerConfig,
|
|
ServerProviderUpdateError,
|
|
ServerProviderUpdateInput,
|
|
ServerLifecycleStreamEvent,
|
|
ServerRemoveKeybindingInput,
|
|
ServerRemoveKeybindingResult,
|
|
ServerProviderUpdatedPayload,
|
|
ServerSelfUpdateError,
|
|
ServerSelfUpdateInput,
|
|
ServerSelfUpdateProgressEvent,
|
|
ServerSelfUpdateResult,
|
|
ServerTraceDiagnosticsResult,
|
|
ServerProcessDiagnosticsResult,
|
|
ServerProcessResourceHistoryInput,
|
|
ServerProcessResourceHistoryResult,
|
|
ServerSignalProcessInput,
|
|
ServerSignalProcessResult,
|
|
ServerUpsertKeybindingInput,
|
|
ServerUpsertKeybindingResult,
|
|
} from "./server.ts";
|
|
import {
|
|
HostResourcesSnapshot,
|
|
ResourceTelemetryHistory,
|
|
ResourceTelemetryHistoryInput,
|
|
ResourceTelemetryRetryResult,
|
|
ResourceTelemetrySnapshot,
|
|
} from "./resourceTelemetry.ts";
|
|
import {
|
|
UsageLimitSourceError,
|
|
ProviderConsumeResetCreditInput,
|
|
ProviderConsumeResetCreditResult,
|
|
} from "./providerUsageLimits.ts";
|
|
import { UsagePricing, UsageReadError, UsageSummary, UsageSummaryInput } from "./usage.ts";
|
|
import { ServerSettings, ServerSettingsError, ServerSettingsPatch } from "./settings.ts";
|
|
import {
|
|
ScheduledTaskDeleteInput,
|
|
ScheduledTaskDeleteResult,
|
|
ScheduledTaskError,
|
|
ScheduledTaskListInput,
|
|
ScheduledTaskListResult,
|
|
ScheduledTaskRunNowInput,
|
|
ScheduledTaskRunNowResult,
|
|
ScheduledTaskSetEnabledInput,
|
|
ScheduledTaskUpsertInput,
|
|
ScheduledTaskMutationResult,
|
|
} from "./scheduledTask.ts";
|
|
import {
|
|
ProjectCloneActionInput,
|
|
ProjectCloneActionResult,
|
|
ProjectCloneListEvent,
|
|
ProjectCloneStartInput,
|
|
ProjectCloneStartResult,
|
|
ProjectCloneSubscribeInput,
|
|
} from "./projectClone.ts";
|
|
import {
|
|
SourceControlCloneRepositoryInput,
|
|
SourceControlCloneRepositoryResult,
|
|
SourceControlDiscoveryResult,
|
|
SourceControlPublishRepositoryInput,
|
|
SourceControlPublishRepositoryResult,
|
|
SourceControlRepositoryError,
|
|
SourceControlRepositoryInfo,
|
|
SourceControlRepositoryLookupInput,
|
|
} from "./sourceControl.ts";
|
|
import { VcsError } from "./vcs.ts";
|
|
import { Project, ProjectMutation, ProjectMutationError } from "./project.ts";
|
|
|
|
export const WS_METHODS = {
|
|
// Project registry methods
|
|
projectsList: "projects.list",
|
|
projectsAdd: "projects.add",
|
|
projectsRemove: "projects.remove",
|
|
projectsListEntries: "projects.listEntries",
|
|
projectsReadFile: "projects.readFile",
|
|
projectsSearchContents: "projects.searchContents",
|
|
projectsSearchEntries: "projects.searchEntries",
|
|
projectsWriteFile: "projects.writeFile",
|
|
projectsMutate: "projects.mutate",
|
|
projectsEnsureScratch: "projects.ensureScratch",
|
|
projectsCreateNew: "projects.createNew",
|
|
|
|
// Shell methods
|
|
shellOpenInEditor: "shell.openInEditor",
|
|
|
|
// Filesystem methods
|
|
filesystemBrowse: "filesystem.browse",
|
|
agentSessionsScan: "agentSessions.scan",
|
|
agentSessionsImport: "agentSessions.import",
|
|
assetsCreateUrl: "assets.createUrl",
|
|
assetsPersistChatAttachments: "assets.persistChatAttachments",
|
|
attachmentsCreateUploadUrl: "attachments.createUploadUrl",
|
|
attachmentsDelete: "attachments.delete",
|
|
|
|
// Provider methods
|
|
providerUploadFeedback: "provider.uploadFeedback",
|
|
providerAuthStart: "provider.auth.start",
|
|
providerConsumeResetCredit: "provider.consumeResetCredit",
|
|
providerAuthComplete: "provider.auth.complete",
|
|
chatGptReconnectProfile: "provider.chatgpt.reconnect-profile",
|
|
chatGptImportProfile: "provider.chatgpt.import-profile",
|
|
chatGptHandoffSubscribe: "provider.chatgpt.handoff.subscribe",
|
|
codexAuthCallbackSubscribe: "provider.codex.auth-callback.subscribe",
|
|
providerAuthRespond: "provider.auth.respond",
|
|
providerAuthCancel: "provider.auth.cancel",
|
|
providerAuthLogout: "provider.auth.logout",
|
|
providerAuthSubscribe: "provider.auth.subscribe",
|
|
providerInstallStart: "provider.install.start",
|
|
providerInstallCancel: "provider.install.cancel",
|
|
providerInstallSubscribe: "provider.install.subscribe",
|
|
providerInstallRemove: "provider.install.remove",
|
|
|
|
// VCS methods
|
|
vcsPull: "vcs.pull",
|
|
vcsRefreshStatus: "vcs.refreshStatus",
|
|
vcsListRefs: "vcs.listRefs",
|
|
vcsCreateWorktree: "vcs.createWorktree",
|
|
vcsRemoveWorktree: "vcs.removeWorktree",
|
|
vcsCreateRef: "vcs.createRef",
|
|
vcsSwitchRef: "vcs.switchRef",
|
|
vcsInit: "vcs.init",
|
|
|
|
// Git workflow methods
|
|
gitRunStackedAction: "git.runStackedAction",
|
|
gitResolvePullRequest: "git.resolvePullRequest",
|
|
gitPreparePullRequestThread: "git.preparePullRequestThread",
|
|
|
|
// Review methods
|
|
reviewGetDiffPreview: "review.getDiffPreview",
|
|
reviewGetDiffFileContents: "review.getDiffFileContents",
|
|
|
|
// Terminal methods
|
|
terminalOpen: "terminal.open",
|
|
terminalAttach: "terminal.attach",
|
|
terminalWrite: "terminal.write",
|
|
terminalResize: "terminal.resize",
|
|
terminalClear: "terminal.clear",
|
|
terminalRestart: "terminal.restart",
|
|
terminalClose: "terminal.close",
|
|
|
|
// Preview methods
|
|
previewOpen: "preview.open",
|
|
previewNavigate: "preview.navigate",
|
|
previewResize: "preview.resize",
|
|
previewRefresh: "preview.refresh",
|
|
previewClose: "preview.close",
|
|
previewList: "preview.list",
|
|
previewReportStatus: "preview.reportStatus",
|
|
previewAutomationConnect: "previewAutomation.connect",
|
|
previewAutomationRespond: "previewAutomation.respond",
|
|
previewAutomationFocusHost: "previewAutomation.focusHost",
|
|
|
|
// Device methods
|
|
deviceConfigure: "device.configure",
|
|
deviceList: "device.list",
|
|
deviceTestHost: "device.testHost",
|
|
deviceOpen: "device.open",
|
|
deviceClose: "device.close",
|
|
deviceShutdown: "device.shutdown",
|
|
deviceDetail: "device.detail",
|
|
deviceAction: "device.action",
|
|
|
|
// Server meta
|
|
serverProbe: "server.probe",
|
|
serverGetConfig: "server.getConfig",
|
|
serverRefreshProviders: "server.refreshProviders",
|
|
serverUpdateProvider: "server.updateProvider",
|
|
serverUpdateServer: "server.updateServer",
|
|
serverUpdateServerWithProgress: "server.updateServerWithProgress",
|
|
serverCommitDesktopUpdate: "server.commitDesktopUpdate",
|
|
serverUpsertKeybinding: "server.upsertKeybinding",
|
|
serverRemoveKeybinding: "server.removeKeybinding",
|
|
serverGetSettings: "server.getSettings",
|
|
serverUpdateSettings: "server.updateSettings",
|
|
serverDiscoverSourceControl: "server.discoverSourceControl",
|
|
serverSearchAcpRegistry: "server.searchAcpRegistry",
|
|
serverPrepareAcpRegistryAgent: "server.prepareAcpRegistryAgent",
|
|
serverUninstallAcpRegistryManagedBinary: "server.uninstallAcpRegistryManagedBinary",
|
|
serverAcceptAcpRegistryUrlAuth: "server.acceptAcpRegistryUrlAuth",
|
|
serverListAcpRegistrySessions: "server.listAcpRegistrySessions",
|
|
serverImportAcpRegistrySession: "server.importAcpRegistrySession",
|
|
serverDeleteAcpRegistrySession: "server.deleteAcpRegistrySession",
|
|
serverListAcpRegistryProviders: "server.listAcpRegistryProviders",
|
|
serverSetAcpRegistryProvider: "server.setAcpRegistryProvider",
|
|
serverDisableAcpRegistryProvider: "server.disableAcpRegistryProvider",
|
|
serverLogoutAcpRegistry: "server.logoutAcpRegistry",
|
|
serverGetTraceDiagnostics: "server.getTraceDiagnostics",
|
|
serverGetProcessDiagnostics: "server.getProcessDiagnostics",
|
|
serverGetHostResources: "server.getHostResources",
|
|
serverGetProcessResourceHistory: "server.getProcessResourceHistory",
|
|
serverGetResourceTelemetryHistory: "server.getResourceTelemetryHistory",
|
|
serverRetryResourceTelemetry: "server.retryResourceTelemetry",
|
|
serverSignalProcess: "server.signalProcess",
|
|
serverReportClientActivity: "server.reportClientActivity",
|
|
serverReportHostPowerState: "server.reportHostPowerState",
|
|
serverGetBackgroundPolicy: "server.getBackgroundPolicy",
|
|
serverGetUsageSummary: "server.getUsageSummary",
|
|
serverRefreshUsageRates: "server.refreshUsageRates",
|
|
|
|
// Scheduled tasks
|
|
scheduledTasksList: "scheduledTasks.list",
|
|
scheduledTasksSubscribe: "scheduledTasks.subscribe",
|
|
scheduledTasksUpsert: "scheduledTasks.upsert",
|
|
scheduledTasksSetEnabled: "scheduledTasks.setEnabled",
|
|
scheduledTasksDelete: "scheduledTasks.delete",
|
|
scheduledTasksRunNow: "scheduledTasks.runNow",
|
|
|
|
// Cloud environment methods
|
|
cloudGetRelayClientStatus: "cloud.getRelayClientStatus",
|
|
cloudInstallRelayClient: "cloud.installRelayClient",
|
|
|
|
// Pull request methods
|
|
pullRequestsList: "pullRequests.list",
|
|
pullRequestsListStats: "pullRequests.listStats",
|
|
pullRequestsSummary: "pullRequests.summary",
|
|
pullRequestsRouting: "pullRequests.routing",
|
|
pullRequestsRoutingIdentity: "pullRequests.routingIdentity",
|
|
pullRequestsStack: "pullRequests.stack",
|
|
pullRequestsLinkedThreads: "pullRequests.linkedThreads",
|
|
pullRequestsDetail: "pullRequests.detail",
|
|
pullRequestsPreview: "pullRequests.preview",
|
|
pullRequestsChecks: "pullRequests.checks",
|
|
pullRequestsActivity: "pullRequests.activity",
|
|
pullRequestsThreadComments: "pullRequests.threadComments",
|
|
pullRequestsDiffFileContents: "pullRequests.diffFileContents",
|
|
pullRequestsFilesViewed: "pullRequests.filesViewed",
|
|
pullRequestsSetFilesViewed: "pullRequests.setFilesViewed",
|
|
pullRequestsRunAction: "pullRequests.runAction",
|
|
pullRequestsUpdate: "pullRequests.update",
|
|
pullRequestsComment: "pullRequests.comment",
|
|
pullRequestsUpdateComment: "pullRequests.updateComment",
|
|
pullRequestsSubmitReview: "pullRequests.submitReview",
|
|
pullRequestsReplyToThread: "pullRequests.replyToThread",
|
|
pullRequestsSetThreadResolution: "pullRequests.setThreadResolution",
|
|
pullRequestsSetReaction: "pullRequests.setReaction",
|
|
pullRequestsInvalidate: "pullRequests.invalidate",
|
|
pullRequestsSubscribeRefreshes: "pullRequests.subscribeRefreshes",
|
|
pullRequestsReviewerCandidates: "pullRequests.reviewerCandidates",
|
|
pullRequestsRequestReviewers: "pullRequests.requestReviewers",
|
|
pullRequestsLabelCandidates: "pullRequests.labelCandidates",
|
|
pullRequestsSetLabels: "pullRequests.setLabels",
|
|
|
|
// Source control methods
|
|
sourceControlLookupRepository: "sourceControl.lookupRepository",
|
|
sourceControlCloneRepository: "sourceControl.cloneRepository",
|
|
sourceControlPublishRepository: "sourceControl.publishRepository",
|
|
projectCloneStart: "projectClone.start",
|
|
projectCloneCancel: "projectClone.cancel",
|
|
projectCloneRetry: "projectClone.retry",
|
|
subscribeProjectClones: "subscribeProjectClones",
|
|
|
|
// Streaming subscriptions
|
|
subscribeVcsStatus: "subscribeVcsStatus",
|
|
subscribeWorktreeSetup: "subscribeWorktreeSetup",
|
|
worktreeSetupCancel: "worktreeSetup.cancel",
|
|
subscribeTerminalEvents: "subscribeTerminalEvents",
|
|
subscribeTerminalMetadata: "subscribeTerminalMetadata",
|
|
subscribePreviewEvents: "subscribePreviewEvents",
|
|
subscribeDiscoveredLocalServers: "subscribeDiscoveredLocalServers",
|
|
subscribeDeviceState: "subscribeDeviceState",
|
|
subscribeServerConfig: "subscribeServerConfig",
|
|
subscribeServerLifecycle: "subscribeServerLifecycle",
|
|
subscribeAuthAccess: "subscribeAuthAccess",
|
|
subscribeBackgroundPolicy: "subscribeBackgroundPolicy",
|
|
subscribeResourceTelemetry: "subscribeResourceTelemetry",
|
|
} as const;
|
|
|
|
const WsServerUpsertKeybindingRpc = Rpc.make(WS_METHODS.serverUpsertKeybinding, {
|
|
payload: ServerUpsertKeybindingInput,
|
|
success: ServerUpsertKeybindingResult,
|
|
error: Schema.Union([KeybindingsConfigError, EnvironmentAuthorizationError]),
|
|
});
|
|
|
|
const WsServerRemoveKeybindingRpc = Rpc.make(WS_METHODS.serverRemoveKeybinding, {
|
|
payload: ServerRemoveKeybindingInput,
|
|
success: ServerRemoveKeybindingResult,
|
|
error: Schema.Union([KeybindingsConfigError, EnvironmentAuthorizationError]),
|
|
});
|
|
|
|
const WsServerProbeRpc = Rpc.make(WS_METHODS.serverProbe, {
|
|
payload: Schema.Struct({}),
|
|
success: Schema.Struct({}),
|
|
error: EnvironmentAuthorizationError,
|
|
});
|
|
|
|
const WsServerGetConfigRpc = Rpc.make(WS_METHODS.serverGetConfig, {
|
|
payload: Schema.Struct({}),
|
|
success: ServerConfig,
|
|
error: Schema.Union([KeybindingsConfigError, ServerSettingsError, EnvironmentAuthorizationError]),
|
|
});
|
|
|
|
const WsServerRefreshProvidersRpc = Rpc.make(WS_METHODS.serverRefreshProviders, {
|
|
payload: Schema.Struct({
|
|
/**
|
|
* When supplied, only refresh this specific provider instance. When
|
|
* omitted, refresh all configured instances — the legacy `refresh()`
|
|
* behaviour retained for transports that still dispatch untargeted
|
|
* refreshes.
|
|
*/
|
|
instanceId: Schema.optional(ProviderInstanceId),
|
|
cwd: Schema.optional(TrimmedNonEmptyString),
|
|
/** With `instanceId` and `cwd`: rescan the workspace's skills and slash
|
|
* commands even when a snapshot for that cwd already exists. */
|
|
fresh: Schema.optional(Schema.Boolean),
|
|
/** Explicit user request: bypass T3-owned caches and rediscover models.
|
|
* Background status refreshes must not open agent sessions. */
|
|
refreshModels: Schema.optional(Schema.Boolean),
|
|
}),
|
|
success: ServerProviderUpdatedPayload,
|
|
error: Schema.Union([EnvironmentAuthorizationError, ProviderSetupError]),
|
|
});
|
|
|
|
const WsServerUpdateProviderRpc = Rpc.make(WS_METHODS.serverUpdateProvider, {
|
|
payload: ServerProviderUpdateInput,
|
|
success: ServerProviderUpdatedPayload,
|
|
error: Schema.Union([ServerProviderUpdateError, EnvironmentAuthorizationError]),
|
|
});
|
|
|
|
const ProviderSetupRpcError = Schema.Union([ProviderSetupError, EnvironmentAuthorizationError]);
|
|
|
|
const WsProviderConsumeResetCreditRpc = Rpc.make(WS_METHODS.providerConsumeResetCredit, {
|
|
payload: ProviderConsumeResetCreditInput,
|
|
success: ProviderConsumeResetCreditResult,
|
|
error: Schema.Union([ProviderSetupError, UsageLimitSourceError, EnvironmentAuthorizationError]),
|
|
});
|
|
|
|
const WsProviderAuthStartRpc = Rpc.make(WS_METHODS.providerAuthStart, {
|
|
payload: ProviderAuthStartInput,
|
|
success: ProviderAuthState,
|
|
error: ProviderSetupRpcError,
|
|
});
|
|
|
|
const WsProviderAuthRespondRpc = Rpc.make(WS_METHODS.providerAuthRespond, {
|
|
payload: ProviderAuthRespondInput,
|
|
success: ProviderAuthState,
|
|
error: ProviderSetupRpcError,
|
|
});
|
|
|
|
const WsProviderAuthCompleteRpc = Rpc.make(WS_METHODS.providerAuthComplete, {
|
|
payload: ProviderAuthCompleteInput,
|
|
success: ProviderAuthState,
|
|
error: ProviderSetupRpcError,
|
|
});
|
|
|
|
const WsChatGptReconnectProfileRpc = Rpc.make(WS_METHODS.chatGptReconnectProfile, {
|
|
payload: ChatGptReconnectProfileInput,
|
|
success: Schema.NullOr(ChatGptReconnectProfile),
|
|
error: ProviderSetupRpcError,
|
|
});
|
|
const WsChatGptImportProfileRpc = Rpc.make(WS_METHODS.chatGptImportProfile, {
|
|
payload: ChatGptImportProfileInput,
|
|
success: ProviderAuthState,
|
|
error: ProviderSetupRpcError,
|
|
});
|
|
const WsChatGptHandoffSubscribeRpc = Rpc.make(WS_METHODS.chatGptHandoffSubscribe, {
|
|
payload: ChatGptHandoffInput,
|
|
success: ChatGptHandoffState,
|
|
error: ProviderSetupRpcError,
|
|
stream: true,
|
|
});
|
|
const WsCodexAuthCallbackSubscribeRpc = Rpc.make(WS_METHODS.codexAuthCallbackSubscribe, {
|
|
payload: CodexAuthCallbackInput,
|
|
success: CodexAuthCallbackState,
|
|
error: ProviderSetupRpcError,
|
|
stream: true,
|
|
});
|
|
|
|
const WsProviderAuthCancelRpc = Rpc.make(WS_METHODS.providerAuthCancel, {
|
|
payload: ProviderAuthCancelInput,
|
|
success: ProviderAuthState,
|
|
error: ProviderSetupRpcError,
|
|
});
|
|
|
|
const WsProviderAuthLogoutRpc = Rpc.make(WS_METHODS.providerAuthLogout, {
|
|
payload: ProviderSetupInput,
|
|
success: ProviderAuthState,
|
|
error: ProviderSetupRpcError,
|
|
});
|
|
|
|
const WsProviderAuthSubscribeRpc = Rpc.make(WS_METHODS.providerAuthSubscribe, {
|
|
payload: ProviderSetupInput,
|
|
success: ProviderAuthState,
|
|
error: ProviderSetupRpcError,
|
|
stream: true,
|
|
});
|
|
|
|
const WsProviderInstallStartRpc = Rpc.make(WS_METHODS.providerInstallStart, {
|
|
payload: ProviderSetupInput,
|
|
success: ProviderInstallState,
|
|
error: ProviderSetupRpcError,
|
|
});
|
|
|
|
const WsProviderInstallCancelRpc = Rpc.make(WS_METHODS.providerInstallCancel, {
|
|
payload: ProviderInstallCancelInput,
|
|
success: ProviderInstallState,
|
|
error: ProviderSetupRpcError,
|
|
});
|
|
|
|
const WsProviderInstallSubscribeRpc = Rpc.make(WS_METHODS.providerInstallSubscribe, {
|
|
payload: ProviderSetupInput,
|
|
success: ProviderInstallState,
|
|
error: ProviderSetupRpcError,
|
|
stream: true,
|
|
});
|
|
|
|
const WsProviderInstallRemoveRpc = Rpc.make(WS_METHODS.providerInstallRemove, {
|
|
payload: ProviderSetupInput,
|
|
success: ProviderInstallState,
|
|
error: ProviderSetupRpcError,
|
|
});
|
|
|
|
const WsServerUpdateServerRpc = Rpc.make(WS_METHODS.serverUpdateServer, {
|
|
payload: ServerSelfUpdateInput,
|
|
success: ServerSelfUpdateResult,
|
|
error: Schema.Union([ServerSelfUpdateError, EnvironmentAuthorizationError]),
|
|
});
|
|
|
|
const WsServerUpdateServerWithProgressRpc = Rpc.make(WS_METHODS.serverUpdateServerWithProgress, {
|
|
payload: ServerSelfUpdateInput,
|
|
success: ServerSelfUpdateProgressEvent,
|
|
error: Schema.Union([ServerSelfUpdateError, EnvironmentAuthorizationError]),
|
|
stream: true,
|
|
});
|
|
|
|
const WsServerCommitDesktopUpdateRpc = Rpc.make(WS_METHODS.serverCommitDesktopUpdate, {
|
|
payload: DesktopUpdateCommitInput,
|
|
success: ServerSelfUpdateResult,
|
|
error: Schema.Union([ServerSelfUpdateError, EnvironmentAuthorizationError]),
|
|
});
|
|
|
|
const WsServerGetSettingsRpc = Rpc.make(WS_METHODS.serverGetSettings, {
|
|
payload: Schema.Struct({}),
|
|
success: ServerSettings,
|
|
error: Schema.Union([ServerSettingsError, EnvironmentAuthorizationError]),
|
|
});
|
|
|
|
const WsServerUpdateSettingsRpc = Rpc.make(WS_METHODS.serverUpdateSettings, {
|
|
payload: Schema.Struct({
|
|
patch: ServerSettingsPatch,
|
|
providerInstanceMutation: Schema.optionalKey(ProviderInstanceMutation),
|
|
}),
|
|
success: ServerSettings,
|
|
error: Schema.Union([ServerSettingsError, EnvironmentAuthorizationError]),
|
|
});
|
|
|
|
const WsServerDiscoverSourceControlRpc = Rpc.make(WS_METHODS.serverDiscoverSourceControl, {
|
|
payload: Schema.Struct({}),
|
|
success: SourceControlDiscoveryResult,
|
|
error: EnvironmentAuthorizationError,
|
|
});
|
|
|
|
const WsServerSearchAcpRegistryRpc = Rpc.make(WS_METHODS.serverSearchAcpRegistry, {
|
|
payload: AcpRegistrySearchInput,
|
|
success: AcpRegistrySearchResult,
|
|
error: Schema.Union([AcpRegistryOperationError, EnvironmentAuthorizationError]),
|
|
});
|
|
|
|
const WsServerPrepareAcpRegistryAgentRpc = Rpc.make(WS_METHODS.serverPrepareAcpRegistryAgent, {
|
|
payload: AcpRegistryPrepareInput,
|
|
success: AcpRegistryPrepareResult,
|
|
error: Schema.Union([AcpRegistryOperationError, EnvironmentAuthorizationError]),
|
|
});
|
|
|
|
const WsServerUninstallAcpRegistryManagedBinaryRpc = Rpc.make(
|
|
WS_METHODS.serverUninstallAcpRegistryManagedBinary,
|
|
{
|
|
payload: AcpRegistryManagedBinaryUninstallInput,
|
|
success: AcpRegistryManagedBinaryUninstallResult,
|
|
error: Schema.Union([AcpRegistryOperationError, EnvironmentAuthorizationError]),
|
|
},
|
|
);
|
|
|
|
const WsServerAcceptAcpRegistryUrlAuthRpc = Rpc.make(WS_METHODS.serverAcceptAcpRegistryUrlAuth, {
|
|
payload: AcpRegistryAcceptUrlAuthInput,
|
|
success: AcpRegistryAcceptUrlAuthResult,
|
|
error: EnvironmentAuthorizationError,
|
|
});
|
|
|
|
const WsServerListAcpRegistrySessionsRpc = Rpc.make(WS_METHODS.serverListAcpRegistrySessions, {
|
|
payload: AcpRegistryListSessionsInput,
|
|
success: AcpRegistryListSessionsResult,
|
|
error: Schema.Union([AcpRegistryOperationError, EnvironmentAuthorizationError]),
|
|
});
|
|
|
|
const WsServerImportAcpRegistrySessionRpc = Rpc.make(WS_METHODS.serverImportAcpRegistrySession, {
|
|
payload: AcpRegistryImportSessionInput,
|
|
success: AcpRegistryImportSessionResult,
|
|
error: Schema.Union([AcpRegistryOperationError, EnvironmentAuthorizationError]),
|
|
});
|
|
|
|
const WsServerDeleteAcpRegistrySessionRpc = Rpc.make(WS_METHODS.serverDeleteAcpRegistrySession, {
|
|
payload: AcpRegistryDeleteSessionInput,
|
|
success: AcpRegistryDeleteSessionResult,
|
|
error: Schema.Union([AcpRegistryOperationError, EnvironmentAuthorizationError]),
|
|
});
|
|
|
|
const WsServerListAcpRegistryProvidersRpc = Rpc.make(WS_METHODS.serverListAcpRegistryProviders, {
|
|
payload: AcpRegistryListProvidersInput,
|
|
success: AcpRegistryListProvidersResult,
|
|
error: Schema.Union([AcpRegistryOperationError, EnvironmentAuthorizationError]),
|
|
});
|
|
|
|
const WsServerSetAcpRegistryProviderRpc = Rpc.make(WS_METHODS.serverSetAcpRegistryProvider, {
|
|
payload: AcpRegistrySetProviderInput,
|
|
success: AcpRegistrySetProviderResult,
|
|
error: Schema.Union([AcpRegistryOperationError, EnvironmentAuthorizationError]),
|
|
});
|
|
|
|
const WsServerDisableAcpRegistryProviderRpc = Rpc.make(
|
|
WS_METHODS.serverDisableAcpRegistryProvider,
|
|
{
|
|
payload: AcpRegistryDisableProviderInput,
|
|
success: AcpRegistryDisableProviderResult,
|
|
error: Schema.Union([AcpRegistryOperationError, EnvironmentAuthorizationError]),
|
|
},
|
|
);
|
|
|
|
const WsServerLogoutAcpRegistryRpc = Rpc.make(WS_METHODS.serverLogoutAcpRegistry, {
|
|
payload: AcpRegistryLogoutInput,
|
|
success: AcpRegistryLogoutResult,
|
|
error: Schema.Union([AcpRegistryOperationError, EnvironmentAuthorizationError]),
|
|
});
|
|
|
|
const WsServerGetTraceDiagnosticsRpc = Rpc.make(WS_METHODS.serverGetTraceDiagnostics, {
|
|
payload: Schema.Struct({}),
|
|
success: ServerTraceDiagnosticsResult,
|
|
error: EnvironmentAuthorizationError,
|
|
});
|
|
|
|
const WsServerGetProcessDiagnosticsRpc = Rpc.make(WS_METHODS.serverGetProcessDiagnostics, {
|
|
payload: Schema.Struct({}),
|
|
success: ServerProcessDiagnosticsResult,
|
|
error: EnvironmentAuthorizationError,
|
|
});
|
|
|
|
const WsServerGetHostResourcesRpc = Rpc.make(WS_METHODS.serverGetHostResources, {
|
|
payload: Schema.Struct({}),
|
|
success: HostResourcesSnapshot,
|
|
error: EnvironmentAuthorizationError,
|
|
});
|
|
|
|
const WsServerGetProcessResourceHistoryRpc = Rpc.make(WS_METHODS.serverGetProcessResourceHistory, {
|
|
payload: ServerProcessResourceHistoryInput,
|
|
success: ServerProcessResourceHistoryResult,
|
|
error: EnvironmentAuthorizationError,
|
|
});
|
|
|
|
const WsServerGetResourceTelemetryHistoryRpc = Rpc.make(
|
|
WS_METHODS.serverGetResourceTelemetryHistory,
|
|
{
|
|
payload: ResourceTelemetryHistoryInput,
|
|
success: ResourceTelemetryHistory,
|
|
error: EnvironmentAuthorizationError,
|
|
},
|
|
);
|
|
|
|
const WsServerRetryResourceTelemetryRpc = Rpc.make(WS_METHODS.serverRetryResourceTelemetry, {
|
|
payload: Schema.Struct({}),
|
|
success: ResourceTelemetryRetryResult,
|
|
error: EnvironmentAuthorizationError,
|
|
});
|
|
|
|
const WsServerGetUsageSummaryRpc = Rpc.make(WS_METHODS.serverGetUsageSummary, {
|
|
payload: UsageSummaryInput,
|
|
success: UsageSummary,
|
|
error: Schema.Union([EnvironmentAuthorizationError, UsageReadError]),
|
|
});
|
|
|
|
/**
|
|
* Refetches the model rate table ahead of its daily TTL, so a model released
|
|
* since the last fetch gets priced. The next usage summary uses the new table.
|
|
*/
|
|
const WsServerRefreshUsageRatesRpc = Rpc.make(WS_METHODS.serverRefreshUsageRates, {
|
|
payload: Schema.Struct({}),
|
|
success: UsagePricing,
|
|
error: EnvironmentAuthorizationError,
|
|
});
|
|
|
|
const WsServerSignalProcessRpc = Rpc.make(WS_METHODS.serverSignalProcess, {
|
|
payload: ServerSignalProcessInput,
|
|
success: ServerSignalProcessResult,
|
|
error: EnvironmentAuthorizationError,
|
|
});
|
|
|
|
const WsCloudGetRelayClientStatusRpc = Rpc.make(WS_METHODS.cloudGetRelayClientStatus, {
|
|
payload: Schema.Struct({}),
|
|
success: RelayClientStatusSchema,
|
|
error: EnvironmentAuthorizationError,
|
|
});
|
|
|
|
const WsCloudInstallRelayClientRpc = Rpc.make(WS_METHODS.cloudInstallRelayClient, {
|
|
payload: Schema.Struct({}),
|
|
success: RelayClientInstallProgressEventSchema,
|
|
error: Schema.Union([RelayClientInstallFailedError, EnvironmentAuthorizationError]),
|
|
stream: true,
|
|
});
|
|
|
|
const WsServerReportClientActivityRpc = Rpc.make(WS_METHODS.serverReportClientActivity, {
|
|
payload: ClientActivityReportInput,
|
|
error: EnvironmentAuthorizationError,
|
|
});
|
|
|
|
const WsServerReportHostPowerStateRpc = Rpc.make(WS_METHODS.serverReportHostPowerState, {
|
|
payload: HostPowerSnapshot,
|
|
error: EnvironmentAuthorizationError,
|
|
});
|
|
|
|
const WsServerGetBackgroundPolicyRpc = Rpc.make(WS_METHODS.serverGetBackgroundPolicy, {
|
|
payload: Schema.Struct({}),
|
|
success: BackgroundPolicySnapshot,
|
|
error: EnvironmentAuthorizationError,
|
|
});
|
|
|
|
const PullRequestRpcError = Schema.Union([
|
|
PullRequestUnavailableError,
|
|
PullRequestOperationError,
|
|
EnvironmentAuthorizationError,
|
|
]);
|
|
|
|
const WsPullRequestsListRpc = Rpc.make(WS_METHODS.pullRequestsList, {
|
|
payload: PullRequestListInput,
|
|
success: PullRequestListResult,
|
|
error: PullRequestRpcError,
|
|
});
|
|
|
|
/**
|
|
* The line counts for rows already on the page. Its own call because on GitHub the pair costs
|
|
* 40-60% of the listing read that answers everything else on the row, so the rows arrive first
|
|
* and their stats a moment later.
|
|
*/
|
|
const WsPullRequestsListStatsRpc = Rpc.make(WS_METHODS.pullRequestsListStats, {
|
|
payload: PullRequestListStatsInput,
|
|
success: PullRequestListStatsResult,
|
|
error: PullRequestRpcError,
|
|
});
|
|
|
|
const WsPullRequestsRoutingRpc = Rpc.make(WS_METHODS.pullRequestsRouting, {
|
|
payload: PullRequestRef,
|
|
success: PullRequestRoutingResult,
|
|
error: PullRequestRpcError,
|
|
});
|
|
|
|
const WsPullRequestsRoutingIdentityRpc = Rpc.make(WS_METHODS.pullRequestsRoutingIdentity, {
|
|
payload: PullRequestRoutingIdentityInput,
|
|
success: PullRequestRoutingIdentityResult,
|
|
error: PullRequestRpcError,
|
|
});
|
|
|
|
const WsPullRequestsSummaryRpc = Rpc.make(WS_METHODS.pullRequestsSummary, {
|
|
payload: PullRequestRef,
|
|
success: PullRequestSummary,
|
|
error: PullRequestRpcError,
|
|
});
|
|
|
|
const WsPullRequestsStackRpc = Rpc.make(WS_METHODS.pullRequestsStack, {
|
|
payload: PullRequestRef,
|
|
success: Schema.NullOr(PullRequestStack),
|
|
error: PullRequestRpcError,
|
|
});
|
|
|
|
const WsPullRequestsLinkedThreadsRpc = Rpc.make(WS_METHODS.pullRequestsLinkedThreads, {
|
|
payload: PullRequestRef,
|
|
success: PullRequestLinkedThreadsResult,
|
|
error: PullRequestRpcError,
|
|
});
|
|
|
|
const WsPullRequestsDetailRpc = Rpc.make(WS_METHODS.pullRequestsDetail, {
|
|
payload: PullRequestRef,
|
|
success: PullRequestDetail,
|
|
error: PullRequestRpcError,
|
|
});
|
|
|
|
const WsPullRequestsPreviewRpc = Rpc.make(WS_METHODS.pullRequestsPreview, {
|
|
payload: PullRequestRef,
|
|
success: PullRequestPreview,
|
|
error: PullRequestRpcError,
|
|
});
|
|
|
|
const WsPullRequestsChecksRpc = Rpc.make(WS_METHODS.pullRequestsChecks, {
|
|
payload: PullRequestRef,
|
|
success: Schema.NullOr(PullRequestChecks),
|
|
error: PullRequestRpcError,
|
|
});
|
|
|
|
const WsPullRequestsActivityRpc = Rpc.make(WS_METHODS.pullRequestsActivity, {
|
|
payload: PullRequestRef,
|
|
success: PullRequestActivity,
|
|
error: PullRequestRpcError,
|
|
});
|
|
|
|
const WsPullRequestsThreadCommentsRpc = Rpc.make(WS_METHODS.pullRequestsThreadComments, {
|
|
payload: PullRequestThreadCommentsInput,
|
|
success: PullRequestThreadCommentsResult,
|
|
error: PullRequestRpcError,
|
|
});
|
|
|
|
const WsPullRequestsDiffFileContentsRpc = Rpc.make(WS_METHODS.pullRequestsDiffFileContents, {
|
|
payload: PullRequestDiffFileContentsInput,
|
|
success: PullRequestDiffFileContentsResult,
|
|
error: PullRequestRpcError,
|
|
});
|
|
|
|
const WsPullRequestsFilesViewedRpc = Rpc.make(WS_METHODS.pullRequestsFilesViewed, {
|
|
payload: PullRequestRef,
|
|
success: PullRequestFilesViewedResult,
|
|
error: PullRequestRpcError,
|
|
});
|
|
|
|
const WsPullRequestsSetFilesViewedRpc = Rpc.make(WS_METHODS.pullRequestsSetFilesViewed, {
|
|
payload: PullRequestSetFilesViewedInput,
|
|
success: Schema.Void,
|
|
error: PullRequestRpcError,
|
|
});
|
|
|
|
const WsPullRequestsRunActionRpc = Rpc.make(WS_METHODS.pullRequestsRunAction, {
|
|
payload: PullRequestActionInput,
|
|
success: Schema.Void,
|
|
error: PullRequestRpcError,
|
|
});
|
|
|
|
const WsPullRequestsUpdateRpc = Rpc.make(WS_METHODS.pullRequestsUpdate, {
|
|
payload: PullRequestUpdateInput,
|
|
success: Schema.Void,
|
|
error: PullRequestRpcError,
|
|
});
|
|
|
|
const WsPullRequestsCommentRpc = Rpc.make(WS_METHODS.pullRequestsComment, {
|
|
payload: PullRequestCommentInput,
|
|
success: Schema.Void,
|
|
error: PullRequestRpcError,
|
|
});
|
|
|
|
const WsPullRequestsUpdateCommentRpc = Rpc.make(WS_METHODS.pullRequestsUpdateComment, {
|
|
payload: PullRequestCommentUpdateInput,
|
|
success: Schema.Void,
|
|
error: PullRequestRpcError,
|
|
});
|
|
|
|
const WsPullRequestsSubmitReviewRpc = Rpc.make(WS_METHODS.pullRequestsSubmitReview, {
|
|
payload: PullRequestSubmitReviewInput,
|
|
success: Schema.Void,
|
|
error: PullRequestRpcError,
|
|
});
|
|
|
|
const WsPullRequestsReplyToThreadRpc = Rpc.make(WS_METHODS.pullRequestsReplyToThread, {
|
|
payload: PullRequestThreadReplyInput,
|
|
success: Schema.Void,
|
|
error: PullRequestRpcError,
|
|
});
|
|
|
|
const WsPullRequestsSetThreadResolutionRpc = Rpc.make(WS_METHODS.pullRequestsSetThreadResolution, {
|
|
payload: PullRequestThreadResolutionInput,
|
|
success: Schema.Void,
|
|
error: PullRequestRpcError,
|
|
});
|
|
|
|
const WsPullRequestsSetReactionRpc = Rpc.make(WS_METHODS.pullRequestsSetReaction, {
|
|
payload: PullRequestReactionInput,
|
|
success: Schema.Void,
|
|
error: PullRequestRpcError,
|
|
});
|
|
|
|
const WsPullRequestsInvalidateRpc = Rpc.make(WS_METHODS.pullRequestsInvalidate, {
|
|
payload: PullRequestInvalidateInput,
|
|
success: Schema.Void,
|
|
error: PullRequestRpcError,
|
|
});
|
|
|
|
const WsPullRequestsSubscribeRefreshesRpc = Rpc.make(WS_METHODS.pullRequestsSubscribeRefreshes, {
|
|
payload: Schema.Struct({}),
|
|
success: NonNegativeInt,
|
|
error: EnvironmentAuthorizationError,
|
|
stream: true,
|
|
});
|
|
|
|
/**
|
|
* Read on its own rather than as part of the detail: the people who may be asked are only wanted
|
|
* once somebody opens the menu, and reading them with every change request would spend a request
|
|
* per host on a list nobody looked at.
|
|
*/
|
|
const WsPullRequestsReviewerCandidatesRpc = Rpc.make(WS_METHODS.pullRequestsReviewerCandidates, {
|
|
payload: PullRequestRef,
|
|
success: PullRequestReviewerCandidateList,
|
|
error: PullRequestRpcError,
|
|
});
|
|
|
|
const WsPullRequestsRequestReviewersRpc = Rpc.make(WS_METHODS.pullRequestsRequestReviewers, {
|
|
payload: PullRequestReviewerRequestInput,
|
|
success: Schema.Void,
|
|
error: PullRequestRpcError,
|
|
});
|
|
|
|
/** Read when the label menu opens, for the same reason the reviewer candidates are. */
|
|
const WsPullRequestsLabelCandidatesRpc = Rpc.make(WS_METHODS.pullRequestsLabelCandidates, {
|
|
payload: PullRequestRef,
|
|
success: PullRequestLabelCandidateList,
|
|
error: PullRequestRpcError,
|
|
});
|
|
|
|
const WsPullRequestsSetLabelsRpc = Rpc.make(WS_METHODS.pullRequestsSetLabels, {
|
|
payload: PullRequestLabelChangeInput,
|
|
success: Schema.Void,
|
|
error: PullRequestRpcError,
|
|
});
|
|
|
|
const WsSourceControlLookupRepositoryRpc = Rpc.make(WS_METHODS.sourceControlLookupRepository, {
|
|
payload: SourceControlRepositoryLookupInput,
|
|
success: SourceControlRepositoryInfo,
|
|
error: Schema.Union([SourceControlRepositoryError, EnvironmentAuthorizationError]),
|
|
});
|
|
|
|
const WsSourceControlCloneRepositoryRpc = Rpc.make(WS_METHODS.sourceControlCloneRepository, {
|
|
payload: SourceControlCloneRepositoryInput,
|
|
success: SourceControlCloneRepositoryResult,
|
|
error: Schema.Union([SourceControlRepositoryError, EnvironmentAuthorizationError]),
|
|
});
|
|
|
|
// Clone-backed project creation. `start` returns once the project exists and
|
|
// the clone is running; progress arrives on the subscription.
|
|
const WsProjectCloneStartRpc = Rpc.make(WS_METHODS.projectCloneStart, {
|
|
payload: ProjectCloneStartInput,
|
|
success: ProjectCloneStartResult,
|
|
error: Schema.Union([
|
|
SourceControlRepositoryError,
|
|
OrchestrationDispatchCommandError,
|
|
EnvironmentAuthorizationError,
|
|
]),
|
|
});
|
|
|
|
const WsProjectCloneCancelRpc = Rpc.make(WS_METHODS.projectCloneCancel, {
|
|
payload: ProjectCloneActionInput,
|
|
success: ProjectCloneActionResult,
|
|
error: EnvironmentAuthorizationError,
|
|
});
|
|
|
|
const WsProjectCloneRetryRpc = Rpc.make(WS_METHODS.projectCloneRetry, {
|
|
payload: ProjectCloneActionInput,
|
|
success: ProjectCloneActionResult,
|
|
error: Schema.Union([SourceControlRepositoryError, EnvironmentAuthorizationError]),
|
|
});
|
|
|
|
const WsSubscribeProjectClonesRpc = Rpc.make(WS_METHODS.subscribeProjectClones, {
|
|
payload: ProjectCloneSubscribeInput,
|
|
success: ProjectCloneListEvent,
|
|
error: EnvironmentAuthorizationError,
|
|
stream: true,
|
|
});
|
|
|
|
const WsSourceControlPublishRepositoryRpc = Rpc.make(WS_METHODS.sourceControlPublishRepository, {
|
|
payload: SourceControlPublishRepositoryInput,
|
|
success: SourceControlPublishRepositoryResult,
|
|
error: Schema.Union([SourceControlRepositoryError, EnvironmentAuthorizationError]),
|
|
});
|
|
|
|
const WsProjectsSearchEntriesRpc = Rpc.make(WS_METHODS.projectsSearchEntries, {
|
|
payload: ProjectSearchEntriesInput,
|
|
success: ProjectSearchEntriesResult,
|
|
error: Schema.Union([ProjectSearchEntriesError, EnvironmentAuthorizationError]),
|
|
});
|
|
|
|
const WsProjectsSearchContentsRpc = Rpc.make(WS_METHODS.projectsSearchContents, {
|
|
payload: ProjectSearchContentsInput,
|
|
success: ProjectSearchContentsResult,
|
|
error: Schema.Union([ProjectSearchContentsError, EnvironmentAuthorizationError]),
|
|
});
|
|
|
|
const WsProjectsListEntriesRpc = Rpc.make(WS_METHODS.projectsListEntries, {
|
|
payload: ProjectListEntriesInput,
|
|
success: ProjectListEntriesResult,
|
|
error: Schema.Union([ProjectListEntriesError, EnvironmentAuthorizationError]),
|
|
});
|
|
|
|
const WsProjectsReadFileRpc = Rpc.make(WS_METHODS.projectsReadFile, {
|
|
payload: ProjectReadFileInput,
|
|
success: ProjectReadFileResult,
|
|
error: Schema.Union([ProjectReadFileError, EnvironmentAuthorizationError]),
|
|
});
|
|
|
|
const WsProjectsWriteFileRpc = Rpc.make(WS_METHODS.projectsWriteFile, {
|
|
payload: ProjectWriteFileInput,
|
|
success: ProjectWriteFileResult,
|
|
error: Schema.Union([ProjectWriteFileError, EnvironmentAuthorizationError]),
|
|
});
|
|
|
|
const WsProjectsMutateRpc = Rpc.make(WS_METHODS.projectsMutate, {
|
|
payload: ProjectMutation,
|
|
success: Project,
|
|
error: Schema.Union([ProjectMutationError, EnvironmentAuthorizationError]),
|
|
});
|
|
|
|
// Finds or creates the Scratch project rooted at ServerConfig.scratchWorkspaceRoot.
|
|
const WsProjectsEnsureScratchRpc = Rpc.make(WS_METHODS.projectsEnsureScratch, {
|
|
payload: Schema.Struct({}),
|
|
success: ProjectEnsureScratchResult,
|
|
error: Schema.Union([OrchestrationDispatchCommandError, EnvironmentAuthorizationError]),
|
|
});
|
|
|
|
// Makes a folder under ServerConfig.newProjectsRoot with a first commit, then the project.
|
|
const WsProjectsCreateNewRpc = Rpc.make(WS_METHODS.projectsCreateNew, {
|
|
payload: ProjectCreateNewInput,
|
|
success: ProjectCreateNewResult,
|
|
error: Schema.Union([OrchestrationDispatchCommandError, EnvironmentAuthorizationError]),
|
|
});
|
|
|
|
const WsShellOpenInEditorRpc = Rpc.make(WS_METHODS.shellOpenInEditor, {
|
|
payload: LaunchEditorInput,
|
|
error: Schema.Union([ExternalLauncherError, EnvironmentAuthorizationError]),
|
|
});
|
|
|
|
const WsFilesystemBrowseRpc = Rpc.make(WS_METHODS.filesystemBrowse, {
|
|
payload: FilesystemBrowseInput,
|
|
success: FilesystemBrowseResult,
|
|
error: Schema.Union([FilesystemBrowseError, EnvironmentAuthorizationError]),
|
|
});
|
|
|
|
const WsAgentSessionsScanRpc = Rpc.make(WS_METHODS.agentSessionsScan, {
|
|
payload: AgentSessionScanInput,
|
|
success: AgentSessionScanResult,
|
|
error: Schema.Union([AgentSessionScanError, EnvironmentAuthorizationError]),
|
|
});
|
|
|
|
const WsAgentSessionsImportRpc = Rpc.make(WS_METHODS.agentSessionsImport, {
|
|
payload: AgentSessionImportInput,
|
|
success: AgentSessionImportResult,
|
|
error: Schema.Union([
|
|
AgentSessionImportProjectChangedError,
|
|
AgentSessionImportProjectNotFoundError,
|
|
AgentSessionScanError,
|
|
EnvironmentAuthorizationError,
|
|
]),
|
|
});
|
|
|
|
const WsAssetsCreateUrlRpc = Rpc.make(WS_METHODS.assetsCreateUrl, {
|
|
payload: AssetCreateUrlInput,
|
|
success: AssetCreateUrlResult,
|
|
error: Schema.Union([AssetAccessError, EnvironmentAuthorizationError]),
|
|
});
|
|
|
|
const WsAssetsPersistChatAttachmentsRpc = Rpc.make(WS_METHODS.assetsPersistChatAttachments, {
|
|
payload: PersistChatAttachmentsInput,
|
|
success: PersistChatAttachmentsResult,
|
|
error: Schema.Union([PersistChatAttachmentsError, EnvironmentAuthorizationError]),
|
|
});
|
|
|
|
const WsAttachmentsCreateUploadUrlRpc = Rpc.make(WS_METHODS.attachmentsCreateUploadUrl, {
|
|
payload: AttachmentCreateUploadUrlInput,
|
|
success: AttachmentCreateUploadUrlResult,
|
|
error: Schema.Union([AttachmentUploadSigningKeyError, EnvironmentAuthorizationError]),
|
|
});
|
|
|
|
const WsAttachmentsDeleteRpc = Rpc.make(WS_METHODS.attachmentsDelete, {
|
|
payload: AttachmentDeleteInput,
|
|
error: EnvironmentAuthorizationError,
|
|
});
|
|
|
|
const WsProviderUploadFeedbackRpc = Rpc.make(WS_METHODS.providerUploadFeedback, {
|
|
payload: ProviderUploadFeedbackInput,
|
|
success: ProviderUploadFeedbackResult,
|
|
error: Schema.Union([ProviderUploadFeedbackError, EnvironmentAuthorizationError]),
|
|
});
|
|
|
|
const WsSubscribeVcsStatusRpc = Rpc.make(WS_METHODS.subscribeVcsStatus, {
|
|
payload: VcsStatusInput,
|
|
success: VcsStatusStreamEvent,
|
|
error: Schema.Union([GitManagerServiceError, EnvironmentAuthorizationError]),
|
|
stream: true,
|
|
});
|
|
|
|
const WsVcsPullRpc = Rpc.make(WS_METHODS.vcsPull, {
|
|
payload: VcsPullInput,
|
|
success: VcsPullResult,
|
|
error: Schema.Union([GitCommandError, EnvironmentAuthorizationError]),
|
|
});
|
|
|
|
const WsVcsRefreshStatusRpc = Rpc.make(WS_METHODS.vcsRefreshStatus, {
|
|
payload: VcsStatusInput,
|
|
success: VcsStatusResult,
|
|
error: Schema.Union([GitManagerServiceError, EnvironmentAuthorizationError]),
|
|
});
|
|
|
|
const WsSubscribeWorktreeSetupRpc = Rpc.make(WS_METHODS.subscribeWorktreeSetup, {
|
|
payload: WorktreeSetupSubscribeInput,
|
|
success: WorktreeSetupStreamEvent,
|
|
error: EnvironmentAuthorizationError,
|
|
stream: true,
|
|
});
|
|
|
|
const WsWorktreeSetupCancelRpc = Rpc.make(WS_METHODS.worktreeSetupCancel, {
|
|
payload: WorktreeSetupCancelInput,
|
|
success: WorktreeSetupCancelResult,
|
|
error: EnvironmentAuthorizationError,
|
|
});
|
|
|
|
const WsGitRunStackedActionRpc = Rpc.make(WS_METHODS.gitRunStackedAction, {
|
|
payload: GitRunStackedActionInput,
|
|
success: GitActionProgressEvent,
|
|
error: Schema.Union([GitManagerServiceError, EnvironmentAuthorizationError]),
|
|
stream: true,
|
|
});
|
|
|
|
const WsGitResolvePullRequestRpc = Rpc.make(WS_METHODS.gitResolvePullRequest, {
|
|
payload: GitPullRequestRefInput,
|
|
success: GitResolvePullRequestResult,
|
|
error: Schema.Union([GitManagerServiceError, EnvironmentAuthorizationError]),
|
|
});
|
|
|
|
const WsGitPreparePullRequestThreadRpc = Rpc.make(WS_METHODS.gitPreparePullRequestThread, {
|
|
payload: GitPreparePullRequestThreadInput,
|
|
success: GitPreparePullRequestThreadResult,
|
|
error: Schema.Union([GitManagerServiceError, EnvironmentAuthorizationError]),
|
|
});
|
|
|
|
const WsVcsListRefsRpc = Rpc.make(WS_METHODS.vcsListRefs, {
|
|
payload: VcsListRefsInput,
|
|
success: VcsListRefsResult,
|
|
error: Schema.Union([GitCommandError, EnvironmentAuthorizationError]),
|
|
});
|
|
|
|
const WsVcsCreateWorktreeRpc = Rpc.make(WS_METHODS.vcsCreateWorktree, {
|
|
payload: VcsCreateWorktreeInput,
|
|
success: VcsCreateWorktreeResult,
|
|
error: Schema.Union([GitCommandError, EnvironmentAuthorizationError]),
|
|
});
|
|
|
|
const WsVcsRemoveWorktreeRpc = Rpc.make(WS_METHODS.vcsRemoveWorktree, {
|
|
payload: VcsRemoveWorktreeInput,
|
|
error: Schema.Union([GitCommandError, EnvironmentAuthorizationError]),
|
|
});
|
|
|
|
const WsVcsCreateRefRpc = Rpc.make(WS_METHODS.vcsCreateRef, {
|
|
payload: VcsCreateRefInput,
|
|
success: VcsCreateRefResult,
|
|
error: Schema.Union([GitCommandError, EnvironmentAuthorizationError]),
|
|
});
|
|
|
|
const WsVcsSwitchRefRpc = Rpc.make(WS_METHODS.vcsSwitchRef, {
|
|
payload: VcsSwitchRefInput,
|
|
success: VcsSwitchRefResult,
|
|
error: Schema.Union([GitCommandError, EnvironmentAuthorizationError]),
|
|
});
|
|
|
|
const WsVcsInitRpc = Rpc.make(WS_METHODS.vcsInit, {
|
|
payload: VcsInitInput,
|
|
error: Schema.Union([VcsError, EnvironmentAuthorizationError]),
|
|
});
|
|
|
|
/**
|
|
* Ephemeral live diff preview for compact/mobile surfaces.
|
|
* Not the persisted T3 Review model. Future review sessions should use
|
|
* review.open* + review.getSnapshot.
|
|
*/
|
|
const WsReviewGetDiffPreviewRpc = Rpc.make(WS_METHODS.reviewGetDiffPreview, {
|
|
payload: ReviewDiffPreviewInput,
|
|
success: ReviewDiffPreviewResult,
|
|
error: Schema.Union([ReviewDiffPreviewError, EnvironmentAuthorizationError]),
|
|
});
|
|
|
|
const WsReviewGetDiffFileContentsRpc = Rpc.make(WS_METHODS.reviewGetDiffFileContents, {
|
|
payload: ReviewDiffFileContentsInput,
|
|
success: ReviewDiffFileContentsResult,
|
|
error: Schema.Union([ReviewDiffPreviewError, EnvironmentAuthorizationError]),
|
|
});
|
|
|
|
const WsTerminalOpenRpc = Rpc.make(WS_METHODS.terminalOpen, {
|
|
payload: TerminalOpenInput,
|
|
success: TerminalSessionSnapshot,
|
|
error: Schema.Union([TerminalError, EnvironmentAuthorizationError]),
|
|
});
|
|
|
|
const WsTerminalAttachRpc = Rpc.make(WS_METHODS.terminalAttach, {
|
|
payload: TerminalAttachInput,
|
|
success: TerminalAttachStreamEvent,
|
|
error: Schema.Union([TerminalError, EnvironmentAuthorizationError]),
|
|
stream: true,
|
|
});
|
|
|
|
const WsTerminalWriteRpc = Rpc.make(WS_METHODS.terminalWrite, {
|
|
payload: TerminalWriteInput,
|
|
error: Schema.Union([TerminalError, EnvironmentAuthorizationError]),
|
|
});
|
|
|
|
const WsTerminalResizeRpc = Rpc.make(WS_METHODS.terminalResize, {
|
|
payload: TerminalResizeInput,
|
|
error: Schema.Union([TerminalError, EnvironmentAuthorizationError]),
|
|
});
|
|
|
|
const WsTerminalClearRpc = Rpc.make(WS_METHODS.terminalClear, {
|
|
payload: TerminalClearInput,
|
|
error: Schema.Union([TerminalError, EnvironmentAuthorizationError]),
|
|
});
|
|
|
|
const WsTerminalRestartRpc = Rpc.make(WS_METHODS.terminalRestart, {
|
|
payload: TerminalRestartInput,
|
|
success: TerminalSessionSnapshot,
|
|
error: Schema.Union([TerminalError, EnvironmentAuthorizationError]),
|
|
});
|
|
|
|
const WsTerminalCloseRpc = Rpc.make(WS_METHODS.terminalClose, {
|
|
payload: TerminalCloseInput,
|
|
error: Schema.Union([TerminalError, EnvironmentAuthorizationError]),
|
|
});
|
|
|
|
const WsPreviewOpenRpc = Rpc.make(WS_METHODS.previewOpen, {
|
|
payload: PreviewOpenInput,
|
|
success: PreviewSessionSnapshot,
|
|
error: Schema.Union([PreviewError, EnvironmentAuthorizationError]),
|
|
});
|
|
|
|
const WsPreviewNavigateRpc = Rpc.make(WS_METHODS.previewNavigate, {
|
|
payload: PreviewNavigateInput,
|
|
success: PreviewSessionSnapshot,
|
|
error: Schema.Union([PreviewError, EnvironmentAuthorizationError]),
|
|
});
|
|
|
|
const WsPreviewResizeRpc = Rpc.make(WS_METHODS.previewResize, {
|
|
payload: PreviewResizeInput,
|
|
success: PreviewSessionSnapshot,
|
|
error: Schema.Union([PreviewError, EnvironmentAuthorizationError]),
|
|
});
|
|
|
|
const WsPreviewRefreshRpc = Rpc.make(WS_METHODS.previewRefresh, {
|
|
payload: PreviewRefreshInput,
|
|
error: Schema.Union([PreviewError, EnvironmentAuthorizationError]),
|
|
});
|
|
|
|
const WsPreviewCloseRpc = Rpc.make(WS_METHODS.previewClose, {
|
|
payload: PreviewCloseInput,
|
|
error: Schema.Union([PreviewError, EnvironmentAuthorizationError]),
|
|
});
|
|
|
|
const WsPreviewListRpc = Rpc.make(WS_METHODS.previewList, {
|
|
payload: PreviewListInput,
|
|
success: PreviewListResult,
|
|
error: EnvironmentAuthorizationError,
|
|
});
|
|
|
|
const WsPreviewReportStatusRpc = Rpc.make(WS_METHODS.previewReportStatus, {
|
|
payload: PreviewReportStatusInput,
|
|
error: Schema.Union([PreviewError, EnvironmentAuthorizationError]),
|
|
});
|
|
|
|
const WsPreviewAutomationConnectRpc = Rpc.make(WS_METHODS.previewAutomationConnect, {
|
|
payload: PreviewAutomationHost,
|
|
success: PreviewAutomationStreamEvent,
|
|
error: Schema.Union([PreviewAutomationError, EnvironmentAuthorizationError]),
|
|
stream: true,
|
|
});
|
|
|
|
const WsPreviewAutomationRespondRpc = Rpc.make(WS_METHODS.previewAutomationRespond, {
|
|
payload: PreviewAutomationResponse,
|
|
error: Schema.Union([PreviewAutomationError, EnvironmentAuthorizationError]),
|
|
});
|
|
|
|
const WsPreviewAutomationFocusHostRpc = Rpc.make(WS_METHODS.previewAutomationFocusHost, {
|
|
payload: PreviewAutomationHostFocus,
|
|
error: EnvironmentAuthorizationError,
|
|
});
|
|
|
|
const WsSubscribePreviewEventsRpc = Rpc.make(WS_METHODS.subscribePreviewEvents, {
|
|
payload: Schema.Struct({}),
|
|
success: PreviewEvent,
|
|
error: EnvironmentAuthorizationError,
|
|
stream: true,
|
|
});
|
|
|
|
const WsSubscribeDiscoveredLocalServersRpc = Rpc.make(WS_METHODS.subscribeDiscoveredLocalServers, {
|
|
payload: Schema.Struct({
|
|
configuredUrls: Schema.optional(ConfiguredLocalServerUrls),
|
|
}),
|
|
success: DiscoveredLocalServerList,
|
|
error: EnvironmentAuthorizationError,
|
|
stream: true,
|
|
});
|
|
|
|
const WsDeviceTestHostRpc = Rpc.make(WS_METHODS.deviceTestHost, {
|
|
payload: SshDeviceHostConfig,
|
|
success: DeviceHostSummary,
|
|
error: Schema.Union([DeviceError, EnvironmentAuthorizationError]),
|
|
});
|
|
|
|
const WsDeviceListRpc = Rpc.make(WS_METHODS.deviceList, {
|
|
payload: DeviceListInput,
|
|
success: DeviceServiceState,
|
|
error: Schema.Union([DeviceError, EnvironmentAuthorizationError]),
|
|
});
|
|
|
|
const WsDeviceConfigureRpc = Rpc.make(WS_METHODS.deviceConfigure, {
|
|
payload: DeviceConfigureInput,
|
|
success: DeviceServiceState,
|
|
error: Schema.Union([DeviceError, EnvironmentAuthorizationError]),
|
|
});
|
|
|
|
const WsDeviceOpenRpc = Rpc.make(WS_METHODS.deviceOpen, {
|
|
payload: DeviceOpenInput,
|
|
success: DeviceSession,
|
|
error: Schema.Union([DeviceError, EnvironmentAuthorizationError]),
|
|
});
|
|
|
|
const WsDeviceCloseRpc = Rpc.make(WS_METHODS.deviceClose, {
|
|
payload: DeviceCloseInput,
|
|
error: Schema.Union([DeviceError, EnvironmentAuthorizationError]),
|
|
});
|
|
|
|
const WsDeviceShutdownRpc = Rpc.make(WS_METHODS.deviceShutdown, {
|
|
payload: DeviceShutdownInput,
|
|
error: Schema.Union([DeviceError, EnvironmentAuthorizationError]),
|
|
});
|
|
|
|
const WsDeviceDetailRpc = Rpc.make(WS_METHODS.deviceDetail, {
|
|
payload: DeviceDetailInput,
|
|
success: DeviceDetail,
|
|
error: Schema.Union([DeviceError, EnvironmentAuthorizationError]),
|
|
});
|
|
|
|
const WsDeviceActionRpc = Rpc.make(WS_METHODS.deviceAction, {
|
|
payload: DeviceActionInput,
|
|
success: DeviceDetail,
|
|
error: Schema.Union([DeviceError, EnvironmentAuthorizationError]),
|
|
});
|
|
|
|
const WsSubscribeDeviceStateRpc = Rpc.make(WS_METHODS.subscribeDeviceState, {
|
|
payload: Schema.Struct({}),
|
|
success: DeviceServiceState,
|
|
error: EnvironmentAuthorizationError,
|
|
stream: true,
|
|
});
|
|
|
|
const WsOrchestrationV2DispatchCommandRpc = Rpc.make(ORCHESTRATION_V2_WS_METHODS.dispatchCommand, {
|
|
payload: OrchestrationV2RpcSchemas.dispatchCommand.input,
|
|
success: OrchestrationV2RpcSchemas.dispatchCommand.output,
|
|
error: Schema.Union([OrchestrationV2DispatchCommandError, EnvironmentAuthorizationError]),
|
|
});
|
|
|
|
const WsOrchestrationV2GetTurnDiffRpc = Rpc.make(ORCHESTRATION_V2_WS_METHODS.getTurnDiff, {
|
|
payload: OrchestrationV2RpcSchemas.getTurnDiff.input,
|
|
success: OrchestrationV2RpcSchemas.getTurnDiff.output,
|
|
error: Schema.Union([OrchestrationGetTurnDiffError, EnvironmentAuthorizationError]),
|
|
});
|
|
|
|
const WsOrchestrationV2GetFullThreadDiffRpc = Rpc.make(
|
|
ORCHESTRATION_V2_WS_METHODS.getFullThreadDiff,
|
|
{
|
|
payload: OrchestrationV2RpcSchemas.getFullThreadDiff.input,
|
|
success: OrchestrationV2RpcSchemas.getFullThreadDiff.output,
|
|
error: Schema.Union([OrchestrationGetFullThreadDiffError, EnvironmentAuthorizationError]),
|
|
},
|
|
);
|
|
|
|
const WsOrchestrationV2SearchThreadsRpc = Rpc.make(ORCHESTRATION_V2_WS_METHODS.searchThreads, {
|
|
payload: OrchestrationSearchThreadsInput,
|
|
success: OrchestrationSearchThreadsResult,
|
|
error: Schema.Union([OrchestrationSearchThreadsError, EnvironmentAuthorizationError]),
|
|
});
|
|
|
|
const WsOrchestrationV2GetArchivedShellSnapshotRpc = Rpc.make(
|
|
ORCHESTRATION_V2_WS_METHODS.getArchivedShellSnapshot,
|
|
{
|
|
payload: OrchestrationV2RpcSchemas.getArchivedShellSnapshot.input,
|
|
success: OrchestrationV2RpcSchemas.getArchivedShellSnapshot.output,
|
|
error: Schema.Union([OrchestrationV2GetShellSnapshotError, EnvironmentAuthorizationError]),
|
|
},
|
|
);
|
|
|
|
const WsOrchestrationV2GetThreadProjectionRpc = Rpc.make(
|
|
ORCHESTRATION_V2_WS_METHODS.getThreadProjection,
|
|
{
|
|
payload: OrchestrationV2RpcSchemas.getThreadProjection.input,
|
|
success: OrchestrationV2RpcSchemas.getThreadProjection.output,
|
|
error: Schema.Union([OrchestrationV2GetThreadProjectionError, EnvironmentAuthorizationError]),
|
|
},
|
|
);
|
|
|
|
const WsOrchestrationV2GetWorkflowScriptRpc = Rpc.make(
|
|
ORCHESTRATION_V2_WS_METHODS.getWorkflowScript,
|
|
{
|
|
payload: OrchestrationV2RpcSchemas.getWorkflowScript.input,
|
|
success: OrchestrationV2RpcSchemas.getWorkflowScript.output,
|
|
error: Schema.Union([OrchestrationGetWorkflowScriptError, EnvironmentAuthorizationError]),
|
|
},
|
|
);
|
|
|
|
const WsOrchestrationV2LaunchThreadRpc = Rpc.make(ORCHESTRATION_V2_WS_METHODS.launchThread, {
|
|
payload: OrchestrationV2RpcSchemas.launchThread.input,
|
|
success: OrchestrationV2RpcSchemas.launchThread.output,
|
|
error: Schema.Union([OrchestrationV2ThreadLaunchError, EnvironmentAuthorizationError]),
|
|
});
|
|
|
|
const WsOrchestrationV2SubscribeArchivedShellRpc = Rpc.make(
|
|
ORCHESTRATION_V2_WS_METHODS.subscribeArchivedShell,
|
|
{
|
|
payload: OrchestrationV2RpcSchemas.subscribeArchivedShell.input,
|
|
success: OrchestrationV2RpcSchemas.subscribeArchivedShell.output,
|
|
error: Schema.Union([OrchestrationV2GetShellSnapshotError, EnvironmentAuthorizationError]),
|
|
stream: true,
|
|
},
|
|
);
|
|
|
|
const WsOrchestrationV2SubscribeShellRpc = Rpc.make(ORCHESTRATION_V2_WS_METHODS.subscribeShell, {
|
|
payload: OrchestrationV2RpcSchemas.subscribeShell.input,
|
|
success: OrchestrationV2RpcSchemas.subscribeShell.output,
|
|
error: Schema.Union([OrchestrationV2GetShellSnapshotError, EnvironmentAuthorizationError]),
|
|
stream: true,
|
|
});
|
|
|
|
const WsOrchestrationV2SubscribeThreadRpc = Rpc.make(ORCHESTRATION_V2_WS_METHODS.subscribeThread, {
|
|
payload: OrchestrationV2RpcSchemas.subscribeThread.input,
|
|
success: OrchestrationV2RpcSchemas.subscribeThread.output,
|
|
error: Schema.Union([OrchestrationV2GetThreadProjectionError, EnvironmentAuthorizationError]),
|
|
stream: true,
|
|
});
|
|
|
|
const WsSubscribeTerminalEventsRpc = Rpc.make(WS_METHODS.subscribeTerminalEvents, {
|
|
payload: Schema.Struct({}),
|
|
success: TerminalEvent,
|
|
error: EnvironmentAuthorizationError,
|
|
stream: true,
|
|
});
|
|
|
|
const WsSubscribeTerminalMetadataRpc = Rpc.make(WS_METHODS.subscribeTerminalMetadata, {
|
|
payload: Schema.Struct({}),
|
|
success: TerminalMetadataStreamEvent,
|
|
error: EnvironmentAuthorizationError,
|
|
stream: true,
|
|
});
|
|
|
|
export const WsSubscribeServerConfigRpc = Rpc.make(WS_METHODS.subscribeServerConfig, {
|
|
payload: Schema.Struct({
|
|
/**
|
|
* Whether this client understands `environmentThemesUpdated` events.
|
|
* Already-shipped clients decode the stream against the old event union
|
|
* and would die on an unknown member, so the server emits the theme
|
|
* stream only to subscribers that ask for it. Absent on old clients;
|
|
* dropped by old servers.
|
|
*/
|
|
environmentThemes: Schema.optional(Schema.Boolean),
|
|
/** Whether this client understands `usageLimitSourcesUpdated` events. */
|
|
usageLimitSources: Schema.optional(Schema.Boolean),
|
|
/**
|
|
* Whether this client answers `/usage-limits` itself. The server injects
|
|
* that command into provider catalogs only for such clients; an older
|
|
* client would send it to the provider as an ordinary prompt.
|
|
*/
|
|
usageLimitsCommand: Schema.optional(Schema.Boolean),
|
|
}),
|
|
success: ServerConfigStreamEvent,
|
|
error: Schema.Union([KeybindingsConfigError, ServerSettingsError, EnvironmentAuthorizationError]),
|
|
stream: true,
|
|
});
|
|
|
|
const WsSubscribeServerLifecycleRpc = Rpc.make(WS_METHODS.subscribeServerLifecycle, {
|
|
payload: Schema.Struct({}),
|
|
success: ServerLifecycleStreamEvent,
|
|
error: EnvironmentAuthorizationError,
|
|
stream: true,
|
|
});
|
|
|
|
const WsScheduledTasksListRpc = Rpc.make(WS_METHODS.scheduledTasksList, {
|
|
payload: ScheduledTaskListInput,
|
|
success: ScheduledTaskListResult,
|
|
error: Schema.Union([ScheduledTaskError, EnvironmentAuthorizationError]),
|
|
});
|
|
|
|
/** Streams the full scheduled-task list: one snapshot on subscribe, then a fresh list after every change. */
|
|
const WsScheduledTasksSubscribeRpc = Rpc.make(WS_METHODS.scheduledTasksSubscribe, {
|
|
payload: ScheduledTaskListInput,
|
|
success: ScheduledTaskListResult,
|
|
error: Schema.Union([ScheduledTaskError, EnvironmentAuthorizationError]),
|
|
stream: true,
|
|
});
|
|
|
|
const WsScheduledTasksUpsertRpc = Rpc.make(WS_METHODS.scheduledTasksUpsert, {
|
|
payload: ScheduledTaskUpsertInput,
|
|
success: ScheduledTaskMutationResult,
|
|
error: Schema.Union([ScheduledTaskError, EnvironmentAuthorizationError]),
|
|
});
|
|
|
|
const WsScheduledTasksSetEnabledRpc = Rpc.make(WS_METHODS.scheduledTasksSetEnabled, {
|
|
payload: ScheduledTaskSetEnabledInput,
|
|
success: ScheduledTaskMutationResult,
|
|
error: Schema.Union([ScheduledTaskError, EnvironmentAuthorizationError]),
|
|
});
|
|
|
|
const WsScheduledTasksDeleteRpc = Rpc.make(WS_METHODS.scheduledTasksDelete, {
|
|
payload: ScheduledTaskDeleteInput,
|
|
success: ScheduledTaskDeleteResult,
|
|
error: Schema.Union([ScheduledTaskError, EnvironmentAuthorizationError]),
|
|
});
|
|
|
|
const WsScheduledTasksRunNowRpc = Rpc.make(WS_METHODS.scheduledTasksRunNow, {
|
|
payload: ScheduledTaskRunNowInput,
|
|
success: ScheduledTaskRunNowResult,
|
|
error: Schema.Union([ScheduledTaskError, EnvironmentAuthorizationError]),
|
|
});
|
|
|
|
const WsSubscribeAuthAccessRpc = Rpc.make(WS_METHODS.subscribeAuthAccess, {
|
|
payload: Schema.Struct({}),
|
|
success: AuthAccessStreamEvent,
|
|
error: Schema.Union([AuthAccessStreamError, EnvironmentAuthorizationError]),
|
|
stream: true,
|
|
});
|
|
|
|
const WsSubscribeBackgroundPolicyRpc = Rpc.make(WS_METHODS.subscribeBackgroundPolicy, {
|
|
payload: Schema.Struct({}),
|
|
success: BackgroundPolicySnapshot,
|
|
error: EnvironmentAuthorizationError,
|
|
stream: true,
|
|
});
|
|
|
|
const WsSubscribeResourceTelemetryRpc = Rpc.make(WS_METHODS.subscribeResourceTelemetry, {
|
|
payload: Schema.Struct({}),
|
|
success: ResourceTelemetrySnapshot,
|
|
error: EnvironmentAuthorizationError,
|
|
stream: true,
|
|
});
|
|
|
|
export const WsRpcGroup = RpcGroup.make(
|
|
WsServerProbeRpc,
|
|
WsServerGetConfigRpc,
|
|
WsServerRefreshProvidersRpc,
|
|
WsServerUpdateProviderRpc,
|
|
WsProviderConsumeResetCreditRpc,
|
|
WsProviderAuthStartRpc,
|
|
WsProviderAuthCompleteRpc,
|
|
WsChatGptReconnectProfileRpc,
|
|
WsChatGptImportProfileRpc,
|
|
WsChatGptHandoffSubscribeRpc,
|
|
WsCodexAuthCallbackSubscribeRpc,
|
|
WsProviderAuthRespondRpc,
|
|
WsProviderAuthCancelRpc,
|
|
WsProviderAuthLogoutRpc,
|
|
WsProviderAuthSubscribeRpc,
|
|
WsProviderInstallStartRpc,
|
|
WsProviderInstallCancelRpc,
|
|
WsProviderInstallSubscribeRpc,
|
|
WsProviderInstallRemoveRpc,
|
|
WsServerUpdateServerRpc,
|
|
WsServerUpdateServerWithProgressRpc,
|
|
WsServerCommitDesktopUpdateRpc,
|
|
WsServerUpsertKeybindingRpc,
|
|
WsServerRemoveKeybindingRpc,
|
|
WsServerGetSettingsRpc,
|
|
WsServerUpdateSettingsRpc,
|
|
WsServerDiscoverSourceControlRpc,
|
|
WsServerSearchAcpRegistryRpc,
|
|
WsServerPrepareAcpRegistryAgentRpc,
|
|
WsServerUninstallAcpRegistryManagedBinaryRpc,
|
|
WsServerAcceptAcpRegistryUrlAuthRpc,
|
|
WsServerListAcpRegistrySessionsRpc,
|
|
WsServerImportAcpRegistrySessionRpc,
|
|
WsServerDeleteAcpRegistrySessionRpc,
|
|
WsServerListAcpRegistryProvidersRpc,
|
|
WsServerSetAcpRegistryProviderRpc,
|
|
WsServerDisableAcpRegistryProviderRpc,
|
|
WsServerLogoutAcpRegistryRpc,
|
|
WsServerGetTraceDiagnosticsRpc,
|
|
WsServerGetProcessDiagnosticsRpc,
|
|
WsServerGetHostResourcesRpc,
|
|
WsServerGetProcessResourceHistoryRpc,
|
|
WsServerGetResourceTelemetryHistoryRpc,
|
|
WsServerRetryResourceTelemetryRpc,
|
|
WsServerGetUsageSummaryRpc,
|
|
WsServerRefreshUsageRatesRpc,
|
|
WsServerSignalProcessRpc,
|
|
WsScheduledTasksListRpc,
|
|
WsScheduledTasksSubscribeRpc,
|
|
WsScheduledTasksUpsertRpc,
|
|
WsScheduledTasksSetEnabledRpc,
|
|
WsScheduledTasksDeleteRpc,
|
|
WsScheduledTasksRunNowRpc,
|
|
WsServerReportClientActivityRpc,
|
|
WsServerReportHostPowerStateRpc,
|
|
WsServerGetBackgroundPolicyRpc,
|
|
WsCloudGetRelayClientStatusRpc,
|
|
WsCloudInstallRelayClientRpc,
|
|
WsPullRequestsListRpc,
|
|
WsPullRequestsListStatsRpc,
|
|
WsPullRequestsSummaryRpc,
|
|
WsPullRequestsRoutingRpc,
|
|
WsPullRequestsRoutingIdentityRpc,
|
|
WsPullRequestsStackRpc,
|
|
WsPullRequestsLinkedThreadsRpc,
|
|
WsPullRequestsDetailRpc,
|
|
WsPullRequestsPreviewRpc,
|
|
WsPullRequestsChecksRpc,
|
|
WsPullRequestsActivityRpc,
|
|
WsPullRequestsThreadCommentsRpc,
|
|
WsPullRequestsDiffFileContentsRpc,
|
|
WsPullRequestsFilesViewedRpc,
|
|
WsPullRequestsSetFilesViewedRpc,
|
|
WsPullRequestsRunActionRpc,
|
|
WsPullRequestsUpdateRpc,
|
|
WsPullRequestsCommentRpc,
|
|
WsPullRequestsUpdateCommentRpc,
|
|
WsPullRequestsSubmitReviewRpc,
|
|
WsPullRequestsReplyToThreadRpc,
|
|
WsPullRequestsSetThreadResolutionRpc,
|
|
WsPullRequestsSetReactionRpc,
|
|
WsPullRequestsInvalidateRpc,
|
|
WsPullRequestsSubscribeRefreshesRpc,
|
|
WsPullRequestsReviewerCandidatesRpc,
|
|
WsPullRequestsRequestReviewersRpc,
|
|
WsPullRequestsLabelCandidatesRpc,
|
|
WsPullRequestsSetLabelsRpc,
|
|
WsSourceControlLookupRepositoryRpc,
|
|
WsSourceControlCloneRepositoryRpc,
|
|
WsSourceControlPublishRepositoryRpc,
|
|
WsProjectCloneStartRpc,
|
|
WsProjectCloneCancelRpc,
|
|
WsProjectCloneRetryRpc,
|
|
WsSubscribeProjectClonesRpc,
|
|
WsProjectsListEntriesRpc,
|
|
WsProjectsReadFileRpc,
|
|
WsProjectsSearchContentsRpc,
|
|
WsProjectsSearchEntriesRpc,
|
|
WsProjectsEnsureScratchRpc,
|
|
WsProjectsCreateNewRpc,
|
|
WsProjectsWriteFileRpc,
|
|
WsProjectsMutateRpc,
|
|
WsShellOpenInEditorRpc,
|
|
WsFilesystemBrowseRpc,
|
|
WsAgentSessionsScanRpc,
|
|
WsAgentSessionsImportRpc,
|
|
WsAssetsCreateUrlRpc,
|
|
WsAssetsPersistChatAttachmentsRpc,
|
|
WsAttachmentsCreateUploadUrlRpc,
|
|
WsAttachmentsDeleteRpc,
|
|
WsProviderUploadFeedbackRpc,
|
|
WsSubscribeVcsStatusRpc,
|
|
WsSubscribeWorktreeSetupRpc,
|
|
WsWorktreeSetupCancelRpc,
|
|
WsVcsPullRpc,
|
|
WsVcsRefreshStatusRpc,
|
|
WsGitRunStackedActionRpc,
|
|
WsGitResolvePullRequestRpc,
|
|
WsGitPreparePullRequestThreadRpc,
|
|
WsVcsListRefsRpc,
|
|
WsVcsCreateWorktreeRpc,
|
|
WsVcsRemoveWorktreeRpc,
|
|
WsVcsCreateRefRpc,
|
|
WsVcsSwitchRefRpc,
|
|
WsVcsInitRpc,
|
|
WsReviewGetDiffPreviewRpc,
|
|
WsReviewGetDiffFileContentsRpc,
|
|
WsTerminalOpenRpc,
|
|
WsTerminalAttachRpc,
|
|
WsTerminalWriteRpc,
|
|
WsTerminalResizeRpc,
|
|
WsTerminalClearRpc,
|
|
WsTerminalRestartRpc,
|
|
WsTerminalCloseRpc,
|
|
WsSubscribeTerminalEventsRpc,
|
|
WsSubscribeTerminalMetadataRpc,
|
|
WsPreviewOpenRpc,
|
|
WsPreviewNavigateRpc,
|
|
WsPreviewResizeRpc,
|
|
WsPreviewRefreshRpc,
|
|
WsPreviewCloseRpc,
|
|
WsPreviewListRpc,
|
|
WsPreviewReportStatusRpc,
|
|
WsPreviewAutomationConnectRpc,
|
|
WsPreviewAutomationRespondRpc,
|
|
WsPreviewAutomationFocusHostRpc,
|
|
WsSubscribePreviewEventsRpc,
|
|
WsSubscribeDiscoveredLocalServersRpc,
|
|
WsDeviceConfigureRpc,
|
|
WsDeviceListRpc,
|
|
WsDeviceTestHostRpc,
|
|
WsDeviceOpenRpc,
|
|
WsDeviceCloseRpc,
|
|
WsDeviceShutdownRpc,
|
|
WsDeviceDetailRpc,
|
|
WsDeviceActionRpc,
|
|
WsSubscribeDeviceStateRpc,
|
|
WsSubscribeServerConfigRpc,
|
|
WsSubscribeServerLifecycleRpc,
|
|
WsSubscribeAuthAccessRpc,
|
|
WsSubscribeBackgroundPolicyRpc,
|
|
WsSubscribeResourceTelemetryRpc,
|
|
WsOrchestrationV2DispatchCommandRpc,
|
|
WsOrchestrationV2GetWorkflowScriptRpc,
|
|
WsOrchestrationV2GetTurnDiffRpc,
|
|
WsOrchestrationV2GetFullThreadDiffRpc,
|
|
WsOrchestrationV2SearchThreadsRpc,
|
|
WsOrchestrationV2GetArchivedShellSnapshotRpc,
|
|
WsOrchestrationV2GetThreadProjectionRpc,
|
|
WsOrchestrationV2LaunchThreadRpc,
|
|
WsOrchestrationV2SubscribeArchivedShellRpc,
|
|
WsOrchestrationV2SubscribeShellRpc,
|
|
WsOrchestrationV2SubscribeThreadRpc,
|
|
);
|