t3code-cli 0.2.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/bin.js +412 -87
- package/dist/index.js +1 -1
- package/dist/{runtime-CMPZpQaG.js → runtime-Cq64iuZr.js} +4768 -2040
- package/dist/src/application/error.d.ts +3 -0
- package/dist/src/application/layer.d.ts +776 -0
- package/dist/src/application/model-selection.d.ts +19 -0
- package/dist/src/application/models.d.ts +93 -0
- package/dist/src/application/project-commands.d.ts +15 -0
- package/dist/src/application/projects.d.ts +136 -0
- package/dist/src/application/service.d.ts +72 -0
- package/dist/src/application/shell-sequence.d.ts +91 -0
- package/dist/src/application/thread-commands.d.ts +84 -0
- package/dist/src/application/thread-wait.d.ts +104 -0
- package/dist/src/application/threads.d.ts +563 -0
- package/dist/src/auth/error.d.ts +50 -0
- package/dist/src/auth/layer.d.ts +23 -0
- package/dist/src/auth/local.d.ts +27 -0
- package/dist/src/auth/pairing.d.ts +22 -0
- package/dist/src/auth/schema.d.ts +58 -0
- package/dist/src/auth/service.d.ts +14 -0
- package/dist/src/auth/transport.d.ts +19 -0
- package/dist/src/auth/type.d.ts +25 -0
- package/dist/src/config/error.d.ts +18 -0
- package/dist/src/config/layer.d.ts +20 -0
- package/dist/src/config/service.d.ts +20 -0
- package/dist/src/config/url.d.ts +6 -0
- package/dist/src/domain/error.d.ts +31 -0
- package/dist/src/domain/helpers.d.ts +38 -0
- package/dist/src/domain/model-config.d.ts +293 -0
- package/dist/src/domain/thread-lifecycle.d.ts +114 -0
- package/dist/src/environment/layer.d.ts +3 -0
- package/dist/src/environment/service.d.ts +12 -0
- package/dist/src/index.d.ts +6 -0
- package/dist/src/orchestration/layer.d.ts +2128 -0
- package/dist/src/orchestration/service.d.ts +27 -0
- package/dist/src/rpc/error.d.ts +15 -0
- package/dist/src/rpc/layer.d.ts +4678 -0
- package/dist/src/rpc/service.d.ts +15 -0
- package/dist/src/rpc/ws-group.d.ts +2238 -0
- package/dist/src/runtime.d.ts +3 -0
- package/dist/src/sql/node-sqlite-client.d.ts +10 -0
- package/dist/src/sql/service.d.ts +17 -0
- package/dist/upstream-t3code/packages/contracts/src/auth.d.ts +441 -0
- package/dist/upstream-t3code/packages/contracts/src/baseSchemas.d.ts +38 -0
- package/dist/upstream-t3code/packages/contracts/src/desktopBootstrap.d.ts +14 -0
- package/dist/upstream-t3code/packages/contracts/src/editor.d.ts +124 -0
- package/dist/upstream-t3code/packages/contracts/src/environment.d.ts +64 -0
- package/dist/upstream-t3code/packages/contracts/src/environmentHttp.d.ts +762 -0
- package/dist/upstream-t3code/packages/contracts/src/filesystem.d.ts +26 -0
- package/dist/upstream-t3code/packages/contracts/src/git.d.ts +500 -0
- package/dist/upstream-t3code/packages/contracts/src/index.d.ts +25 -0
- package/dist/upstream-t3code/packages/contracts/src/ipc.d.ts +490 -0
- package/dist/upstream-t3code/packages/contracts/src/keybindings.d.ts +133 -0
- package/dist/upstream-t3code/packages/contracts/src/model.d.ts +112 -0
- package/dist/upstream-t3code/packages/contracts/src/orchestration.d.ts +6682 -0
- package/dist/upstream-t3code/packages/contracts/src/project.d.ts +45 -0
- package/dist/upstream-t3code/packages/contracts/src/provider.d.ts +116 -0
- package/dist/upstream-t3code/packages/contracts/src/providerInstance.d.ts +99 -0
- package/dist/upstream-t3code/packages/contracts/src/providerRuntime.d.ts +4276 -0
- package/dist/upstream-t3code/packages/contracts/src/relay.d.ts +1262 -0
- package/dist/upstream-t3code/packages/contracts/src/relayClient.d.ts +48 -0
- package/dist/upstream-t3code/packages/contracts/src/remoteAccess.d.ts +45 -0
- package/dist/upstream-t3code/packages/contracts/src/review.d.ts +37 -0
- package/dist/upstream-t3code/packages/contracts/src/rpc.d.ts +8218 -0
- package/dist/upstream-t3code/packages/contracts/src/server.d.ts +2291 -0
- package/dist/upstream-t3code/packages/contracts/src/settings.d.ts +271 -0
- package/dist/upstream-t3code/packages/contracts/src/sourceControl.d.ts +177 -0
- package/dist/upstream-t3code/packages/contracts/src/terminal.d.ts +330 -0
- package/dist/upstream-t3code/packages/contracts/src/vcs.d.ts +148 -0
- package/package.json +15 -7
- package/src/application/model-selection.ts +2 -2
- package/src/application/project-commands.ts +1 -1
- package/src/application/service.ts +1 -1
- package/src/application/shell-sequence.ts +1 -1
- package/src/application/thread-commands.ts +1 -1
- package/src/application/thread-wait.ts +1 -1
- package/src/auth/error.ts +33 -1
- package/src/auth/layer.ts +11 -76
- package/src/auth/local.ts +342 -208
- package/src/auth/pairing.ts +44 -2
- package/src/auth/schema.ts +21 -28
- package/src/auth/service.ts +2 -2
- package/src/auth/transport.ts +59 -22
- package/src/auth/type.ts +0 -1
- package/src/cli/auth.ts +1 -3
- package/src/cli/model-format.ts +1 -1
- package/src/cli/project-format.ts +1 -1
- package/src/cli/thread-format.ts +1 -1
- package/src/domain/helpers.ts +1 -1
- package/src/domain/model-config.ts +1 -1
- package/src/domain/thread-lifecycle.ts +1 -1
- package/src/index.ts +3 -3
- package/src/orchestration/layer.ts +1 -1
- package/src/orchestration/service.ts +1 -1
- package/src/rpc/error.ts +1 -1
- package/src/rpc/layer.ts +2 -2
- package/src/rpc/ws-group.ts +1 -1
- package/src/runtime.ts +14 -1
- package/src/sql/node-sqlite-client.ts +141 -0
- package/src/sql/service.ts +21 -0
|
@@ -0,0 +1,490 @@
|
|
|
1
|
+
import type { VcsCreateRefInput, VcsCreateRefResult, VcsCreateWorktreeInput, VcsCreateWorktreeResult, VcsInitInput, VcsListRefsInput, VcsListRefsResult, VcsPullInput, VcsPullResult, VcsRemoveWorktreeInput, VcsSwitchRefInput, VcsSwitchRefResult, GitPreparePullRequestThreadInput, GitPreparePullRequestThreadResult, GitPullRequestRefInput, GitResolvePullRequestResult, VcsStatusInput, VcsStatusResult } from "./git.ts";
|
|
2
|
+
import type { ReviewDiffPreviewInput, ReviewDiffPreviewResult } from "./review.ts";
|
|
3
|
+
import type { FilesystemBrowseInput, FilesystemBrowseResult } from "./filesystem.ts";
|
|
4
|
+
import type { ProjectSearchEntriesInput, ProjectSearchEntriesResult, ProjectWriteFileInput, ProjectWriteFileResult } from "./project.ts";
|
|
5
|
+
import type { ProviderInstanceId } from "./providerInstance.ts";
|
|
6
|
+
import type { ServerConfig, ServerProcessDiagnosticsResult, ServerProcessResourceHistoryInput, ServerProcessResourceHistoryResult, ServerProviderUpdateInput, ServerProviderUpdatedPayload, ServerRemoveKeybindingResult, ServerSignalProcessInput, ServerSignalProcessResult, ServerTraceDiagnosticsResult, ServerUpsertKeybindingResult } from "./server.ts";
|
|
7
|
+
import type { TerminalAttachInput, TerminalAttachStreamEvent, TerminalClearInput, TerminalCloseInput, TerminalMetadataStreamEvent, TerminalOpenInput, TerminalResizeInput, TerminalRestartInput, TerminalSessionSnapshot, TerminalWriteInput } from "./terminal.ts";
|
|
8
|
+
import type { ServerRemoveKeybindingInput, ServerUpsertKeybindingInput } from "./server.ts";
|
|
9
|
+
import * as Schema from "effect/Schema";
|
|
10
|
+
import type { ClientOrchestrationCommand, OrchestrationGetFullThreadDiffInput, OrchestrationGetFullThreadDiffResult, OrchestrationGetTurnDiffInput, OrchestrationGetTurnDiffResult, OrchestrationShellSnapshot, OrchestrationShellStreamItem, OrchestrationSubscribeThreadInput, OrchestrationThreadStreamItem } from "./orchestration.ts";
|
|
11
|
+
import { EnvironmentId } from "./baseSchemas.ts";
|
|
12
|
+
import { AuthAccessTokenResult, AuthSessionState, AuthWebSocketTicketResult } from "./auth.ts";
|
|
13
|
+
import { AdvertisedEndpoint } from "./remoteAccess.ts";
|
|
14
|
+
import { EditorId } from "./editor.ts";
|
|
15
|
+
import { ExecutionEnvironmentDescriptor } from "./environment.ts";
|
|
16
|
+
import type { ClientSettings, ServerSettings, ServerSettingsPatch } from "./settings.ts";
|
|
17
|
+
import type { SourceControlCloneRepositoryInput, SourceControlCloneRepositoryResult, SourceControlDiscoveryResult, SourceControlPublishRepositoryInput, SourceControlPublishRepositoryResult, SourceControlRepositoryInfo, SourceControlRepositoryLookupInput } from "./sourceControl.ts";
|
|
18
|
+
export interface ContextMenuItem<T extends string = string> {
|
|
19
|
+
id: T;
|
|
20
|
+
label: string;
|
|
21
|
+
destructive?: boolean;
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
children?: readonly ContextMenuItem<T>[];
|
|
24
|
+
}
|
|
25
|
+
export interface ContextMenuItemSchemaType {
|
|
26
|
+
readonly id: string;
|
|
27
|
+
readonly label: string;
|
|
28
|
+
readonly destructive?: boolean;
|
|
29
|
+
readonly disabled?: boolean;
|
|
30
|
+
readonly children?: readonly ContextMenuItemSchemaType[];
|
|
31
|
+
}
|
|
32
|
+
export declare const ContextMenuItemSchema: Schema.Codec<ContextMenuItemSchemaType>;
|
|
33
|
+
export type DesktopUpdateStatus = "disabled" | "idle" | "checking" | "up-to-date" | "available" | "downloading" | "downloaded" | "error";
|
|
34
|
+
export type DesktopRuntimeArch = "arm64" | "x64" | "other";
|
|
35
|
+
export type DesktopTheme = "light" | "dark" | "system";
|
|
36
|
+
export type DesktopUpdateChannel = "latest" | "nightly";
|
|
37
|
+
export type DesktopAppStageLabel = "Alpha" | "Dev" | "Nightly";
|
|
38
|
+
export declare const DesktopUpdateStatusSchema: Schema.Literals<readonly ["disabled", "idle", "checking", "up-to-date", "available", "downloading", "downloaded", "error"]>;
|
|
39
|
+
export declare const DesktopRuntimeArchSchema: Schema.Literals<readonly ["arm64", "x64", "other"]>;
|
|
40
|
+
export declare const DesktopThemeSchema: Schema.Literals<readonly ["light", "dark", "system"]>;
|
|
41
|
+
export declare const DesktopUpdateChannelSchema: Schema.Literals<readonly ["latest", "nightly"]>;
|
|
42
|
+
export declare const DesktopAppStageLabelSchema: Schema.Literals<readonly ["Alpha", "Dev", "Nightly"]>;
|
|
43
|
+
export interface DesktopAppBranding {
|
|
44
|
+
baseName: string;
|
|
45
|
+
stageLabel: DesktopAppStageLabel;
|
|
46
|
+
displayName: string;
|
|
47
|
+
}
|
|
48
|
+
export declare const DesktopAppBrandingSchema: Schema.Struct<{
|
|
49
|
+
readonly baseName: Schema.String;
|
|
50
|
+
readonly stageLabel: Schema.Literals<readonly ["Alpha", "Dev", "Nightly"]>;
|
|
51
|
+
readonly displayName: Schema.String;
|
|
52
|
+
}>;
|
|
53
|
+
export interface DesktopRuntimeInfo {
|
|
54
|
+
hostArch: DesktopRuntimeArch;
|
|
55
|
+
appArch: DesktopRuntimeArch;
|
|
56
|
+
runningUnderArm64Translation: boolean;
|
|
57
|
+
}
|
|
58
|
+
export declare const DesktopRuntimeInfoSchema: Schema.Struct<{
|
|
59
|
+
readonly hostArch: Schema.Literals<readonly ["arm64", "x64", "other"]>;
|
|
60
|
+
readonly appArch: Schema.Literals<readonly ["arm64", "x64", "other"]>;
|
|
61
|
+
readonly runningUnderArm64Translation: Schema.Boolean;
|
|
62
|
+
}>;
|
|
63
|
+
export interface DesktopUpdateState {
|
|
64
|
+
enabled: boolean;
|
|
65
|
+
status: DesktopUpdateStatus;
|
|
66
|
+
channel: DesktopUpdateChannel;
|
|
67
|
+
currentVersion: string;
|
|
68
|
+
hostArch: DesktopRuntimeArch;
|
|
69
|
+
appArch: DesktopRuntimeArch;
|
|
70
|
+
runningUnderArm64Translation: boolean;
|
|
71
|
+
availableVersion: string | null;
|
|
72
|
+
downloadedVersion: string | null;
|
|
73
|
+
downloadPercent: number | null;
|
|
74
|
+
checkedAt: string | null;
|
|
75
|
+
message: string | null;
|
|
76
|
+
errorContext: "check" | "download" | "install" | null;
|
|
77
|
+
canRetry: boolean;
|
|
78
|
+
}
|
|
79
|
+
export declare const DesktopUpdateStateSchema: Schema.Struct<{
|
|
80
|
+
readonly enabled: Schema.Boolean;
|
|
81
|
+
readonly status: Schema.Literals<readonly ["disabled", "idle", "checking", "up-to-date", "available", "downloading", "downloaded", "error"]>;
|
|
82
|
+
readonly channel: Schema.Literals<readonly ["latest", "nightly"]>;
|
|
83
|
+
readonly currentVersion: Schema.String;
|
|
84
|
+
readonly hostArch: Schema.Literals<readonly ["arm64", "x64", "other"]>;
|
|
85
|
+
readonly appArch: Schema.Literals<readonly ["arm64", "x64", "other"]>;
|
|
86
|
+
readonly runningUnderArm64Translation: Schema.Boolean;
|
|
87
|
+
readonly availableVersion: Schema.NullOr<Schema.String>;
|
|
88
|
+
readonly downloadedVersion: Schema.NullOr<Schema.String>;
|
|
89
|
+
readonly downloadPercent: Schema.NullOr<Schema.Number>;
|
|
90
|
+
readonly checkedAt: Schema.NullOr<Schema.String>;
|
|
91
|
+
readonly message: Schema.NullOr<Schema.String>;
|
|
92
|
+
readonly errorContext: Schema.NullOr<Schema.Literals<readonly ["check", "download", "install"]>>;
|
|
93
|
+
readonly canRetry: Schema.Boolean;
|
|
94
|
+
}>;
|
|
95
|
+
export interface DesktopUpdateActionResult {
|
|
96
|
+
accepted: boolean;
|
|
97
|
+
completed: boolean;
|
|
98
|
+
state: DesktopUpdateState;
|
|
99
|
+
}
|
|
100
|
+
export declare const DesktopUpdateActionResultSchema: Schema.Struct<{
|
|
101
|
+
readonly accepted: Schema.Boolean;
|
|
102
|
+
readonly completed: Schema.Boolean;
|
|
103
|
+
readonly state: Schema.Struct<{
|
|
104
|
+
readonly enabled: Schema.Boolean;
|
|
105
|
+
readonly status: Schema.Literals<readonly ["disabled", "idle", "checking", "up-to-date", "available", "downloading", "downloaded", "error"]>;
|
|
106
|
+
readonly channel: Schema.Literals<readonly ["latest", "nightly"]>;
|
|
107
|
+
readonly currentVersion: Schema.String;
|
|
108
|
+
readonly hostArch: Schema.Literals<readonly ["arm64", "x64", "other"]>;
|
|
109
|
+
readonly appArch: Schema.Literals<readonly ["arm64", "x64", "other"]>;
|
|
110
|
+
readonly runningUnderArm64Translation: Schema.Boolean;
|
|
111
|
+
readonly availableVersion: Schema.NullOr<Schema.String>;
|
|
112
|
+
readonly downloadedVersion: Schema.NullOr<Schema.String>;
|
|
113
|
+
readonly downloadPercent: Schema.NullOr<Schema.Number>;
|
|
114
|
+
readonly checkedAt: Schema.NullOr<Schema.String>;
|
|
115
|
+
readonly message: Schema.NullOr<Schema.String>;
|
|
116
|
+
readonly errorContext: Schema.NullOr<Schema.Literals<readonly ["check", "download", "install"]>>;
|
|
117
|
+
readonly canRetry: Schema.Boolean;
|
|
118
|
+
}>;
|
|
119
|
+
}>;
|
|
120
|
+
export interface DesktopUpdateCheckResult {
|
|
121
|
+
checked: boolean;
|
|
122
|
+
state: DesktopUpdateState;
|
|
123
|
+
}
|
|
124
|
+
export declare const DesktopUpdateCheckResultSchema: Schema.Struct<{
|
|
125
|
+
readonly checked: Schema.Boolean;
|
|
126
|
+
readonly state: Schema.Struct<{
|
|
127
|
+
readonly enabled: Schema.Boolean;
|
|
128
|
+
readonly status: Schema.Literals<readonly ["disabled", "idle", "checking", "up-to-date", "available", "downloading", "downloaded", "error"]>;
|
|
129
|
+
readonly channel: Schema.Literals<readonly ["latest", "nightly"]>;
|
|
130
|
+
readonly currentVersion: Schema.String;
|
|
131
|
+
readonly hostArch: Schema.Literals<readonly ["arm64", "x64", "other"]>;
|
|
132
|
+
readonly appArch: Schema.Literals<readonly ["arm64", "x64", "other"]>;
|
|
133
|
+
readonly runningUnderArm64Translation: Schema.Boolean;
|
|
134
|
+
readonly availableVersion: Schema.NullOr<Schema.String>;
|
|
135
|
+
readonly downloadedVersion: Schema.NullOr<Schema.String>;
|
|
136
|
+
readonly downloadPercent: Schema.NullOr<Schema.Number>;
|
|
137
|
+
readonly checkedAt: Schema.NullOr<Schema.String>;
|
|
138
|
+
readonly message: Schema.NullOr<Schema.String>;
|
|
139
|
+
readonly errorContext: Schema.NullOr<Schema.Literals<readonly ["check", "download", "install"]>>;
|
|
140
|
+
readonly canRetry: Schema.Boolean;
|
|
141
|
+
}>;
|
|
142
|
+
}>;
|
|
143
|
+
export interface DesktopEnvironmentBootstrap {
|
|
144
|
+
label: string;
|
|
145
|
+
httpBaseUrl: string | null;
|
|
146
|
+
wsBaseUrl: string | null;
|
|
147
|
+
bootstrapToken?: string;
|
|
148
|
+
}
|
|
149
|
+
export declare const DesktopEnvironmentBootstrapSchema: Schema.Struct<{
|
|
150
|
+
readonly label: Schema.String;
|
|
151
|
+
readonly httpBaseUrl: Schema.NullOr<Schema.String>;
|
|
152
|
+
readonly wsBaseUrl: Schema.NullOr<Schema.String>;
|
|
153
|
+
readonly bootstrapToken: Schema.optionalKey<Schema.String>;
|
|
154
|
+
}>;
|
|
155
|
+
export declare const DesktopSshEnvironmentTargetSchema: Schema.Struct<{
|
|
156
|
+
readonly alias: Schema.String;
|
|
157
|
+
readonly hostname: Schema.String;
|
|
158
|
+
readonly username: Schema.NullOr<Schema.String>;
|
|
159
|
+
readonly port: Schema.NullOr<Schema.Number>;
|
|
160
|
+
}>;
|
|
161
|
+
export type DesktopSshEnvironmentTarget = typeof DesktopSshEnvironmentTargetSchema.Type;
|
|
162
|
+
export type DesktopSshHostSource = "ssh-config" | "known-hosts";
|
|
163
|
+
export declare const DesktopSshHostSourceSchema: Schema.Literals<readonly ["ssh-config", "known-hosts"]>;
|
|
164
|
+
export interface DesktopDiscoveredSshHost extends DesktopSshEnvironmentTarget {
|
|
165
|
+
source: DesktopSshHostSource;
|
|
166
|
+
}
|
|
167
|
+
export declare const DesktopDiscoveredSshHostSchema: Schema.Struct<{
|
|
168
|
+
readonly alias: Schema.String;
|
|
169
|
+
readonly hostname: Schema.String;
|
|
170
|
+
readonly username: Schema.NullOr<Schema.String>;
|
|
171
|
+
readonly port: Schema.NullOr<Schema.Number>;
|
|
172
|
+
readonly source: Schema.Literals<readonly ["ssh-config", "known-hosts"]>;
|
|
173
|
+
}>;
|
|
174
|
+
export interface DesktopSshEnvironmentBootstrap {
|
|
175
|
+
target: DesktopSshEnvironmentTarget;
|
|
176
|
+
httpBaseUrl: string;
|
|
177
|
+
wsBaseUrl: string;
|
|
178
|
+
pairingToken: string | null;
|
|
179
|
+
remotePort?: number;
|
|
180
|
+
remoteServerKind?: "external" | "managed";
|
|
181
|
+
}
|
|
182
|
+
export declare const DesktopSshEnvironmentBootstrapSchema: Schema.Struct<{
|
|
183
|
+
readonly target: Schema.Struct<{
|
|
184
|
+
readonly alias: Schema.String;
|
|
185
|
+
readonly hostname: Schema.String;
|
|
186
|
+
readonly username: Schema.NullOr<Schema.String>;
|
|
187
|
+
readonly port: Schema.NullOr<Schema.Number>;
|
|
188
|
+
}>;
|
|
189
|
+
readonly httpBaseUrl: Schema.String;
|
|
190
|
+
readonly wsBaseUrl: Schema.String;
|
|
191
|
+
readonly pairingToken: Schema.NullOr<Schema.String>;
|
|
192
|
+
readonly remotePort: Schema.optionalKey<Schema.Number>;
|
|
193
|
+
readonly remoteServerKind: Schema.optionalKey<Schema.Literals<readonly ["external", "managed"]>>;
|
|
194
|
+
}>;
|
|
195
|
+
export interface DesktopSshPasswordPromptRequest {
|
|
196
|
+
requestId: string;
|
|
197
|
+
destination: string;
|
|
198
|
+
username: string | null;
|
|
199
|
+
prompt: string;
|
|
200
|
+
expiresAt: string;
|
|
201
|
+
}
|
|
202
|
+
export declare const DesktopSshPasswordPromptRequestSchema: Schema.Struct<{
|
|
203
|
+
readonly requestId: Schema.String;
|
|
204
|
+
readonly destination: Schema.String;
|
|
205
|
+
readonly username: Schema.NullOr<Schema.String>;
|
|
206
|
+
readonly prompt: Schema.String;
|
|
207
|
+
readonly expiresAt: Schema.String;
|
|
208
|
+
}>;
|
|
209
|
+
export declare const DesktopSshPasswordPromptCancelledType: "ssh-password-prompt-cancelled";
|
|
210
|
+
export declare const DesktopSshPasswordPromptCancelledResultSchema: Schema.Struct<{
|
|
211
|
+
readonly type: Schema.Literal<"ssh-password-prompt-cancelled">;
|
|
212
|
+
readonly message: Schema.String;
|
|
213
|
+
}>;
|
|
214
|
+
export declare const DesktopSshEnvironmentEnsureOptionsSchema: Schema.Struct<{
|
|
215
|
+
readonly issuePairingToken: Schema.optionalKey<Schema.Boolean>;
|
|
216
|
+
}>;
|
|
217
|
+
export declare const DesktopSshEnvironmentEnsureInputSchema: Schema.Struct<{
|
|
218
|
+
readonly target: Schema.Struct<{
|
|
219
|
+
readonly alias: Schema.String;
|
|
220
|
+
readonly hostname: Schema.String;
|
|
221
|
+
readonly username: Schema.NullOr<Schema.String>;
|
|
222
|
+
readonly port: Schema.NullOr<Schema.Number>;
|
|
223
|
+
}>;
|
|
224
|
+
readonly options: Schema.optionalKey<Schema.Struct<{
|
|
225
|
+
readonly issuePairingToken: Schema.optionalKey<Schema.Boolean>;
|
|
226
|
+
}>>;
|
|
227
|
+
}>;
|
|
228
|
+
export declare const DesktopSshEnvironmentEnsureResultSchema: Schema.Union<readonly [Schema.Struct<{
|
|
229
|
+
readonly target: Schema.Struct<{
|
|
230
|
+
readonly alias: Schema.String;
|
|
231
|
+
readonly hostname: Schema.String;
|
|
232
|
+
readonly username: Schema.NullOr<Schema.String>;
|
|
233
|
+
readonly port: Schema.NullOr<Schema.Number>;
|
|
234
|
+
}>;
|
|
235
|
+
readonly httpBaseUrl: Schema.String;
|
|
236
|
+
readonly wsBaseUrl: Schema.String;
|
|
237
|
+
readonly pairingToken: Schema.NullOr<Schema.String>;
|
|
238
|
+
readonly remotePort: Schema.optionalKey<Schema.Number>;
|
|
239
|
+
readonly remoteServerKind: Schema.optionalKey<Schema.Literals<readonly ["external", "managed"]>>;
|
|
240
|
+
}>, Schema.Struct<{
|
|
241
|
+
readonly type: Schema.Literal<"ssh-password-prompt-cancelled">;
|
|
242
|
+
readonly message: Schema.String;
|
|
243
|
+
}>]>;
|
|
244
|
+
export declare const DesktopSshHttpBaseUrlInputSchema: Schema.Struct<{
|
|
245
|
+
readonly httpBaseUrl: Schema.String;
|
|
246
|
+
}>;
|
|
247
|
+
export declare const DesktopSshBearerRequestInputSchema: Schema.Struct<{
|
|
248
|
+
readonly httpBaseUrl: Schema.String;
|
|
249
|
+
readonly bearerToken: Schema.String;
|
|
250
|
+
}>;
|
|
251
|
+
export declare const DesktopSshBearerBootstrapInputSchema: Schema.Struct<{
|
|
252
|
+
readonly httpBaseUrl: Schema.String;
|
|
253
|
+
readonly credential: Schema.String;
|
|
254
|
+
}>;
|
|
255
|
+
export declare const DesktopSshPasswordPromptResolutionInputSchema: Schema.Struct<{
|
|
256
|
+
readonly requestId: Schema.String;
|
|
257
|
+
readonly password: Schema.NullOr<Schema.String>;
|
|
258
|
+
}>;
|
|
259
|
+
export declare const PersistedSavedEnvironmentRecordSchema: Schema.Struct<{
|
|
260
|
+
readonly environmentId: Schema.brand<Schema.decodeTo<Schema.String, Schema.String, never, never>, "EnvironmentId">;
|
|
261
|
+
readonly label: Schema.String;
|
|
262
|
+
readonly wsBaseUrl: Schema.String;
|
|
263
|
+
readonly httpBaseUrl: Schema.String;
|
|
264
|
+
readonly createdAt: Schema.String;
|
|
265
|
+
readonly lastConnectedAt: Schema.NullOr<Schema.String>;
|
|
266
|
+
readonly desktopSsh: Schema.optionalKey<Schema.Struct<{
|
|
267
|
+
readonly alias: Schema.String;
|
|
268
|
+
readonly hostname: Schema.String;
|
|
269
|
+
readonly username: Schema.NullOr<Schema.String>;
|
|
270
|
+
readonly port: Schema.NullOr<Schema.Number>;
|
|
271
|
+
}>>;
|
|
272
|
+
readonly relayManaged: Schema.optionalKey<Schema.Struct<{
|
|
273
|
+
readonly relayUrl: Schema.String;
|
|
274
|
+
}>>;
|
|
275
|
+
}>;
|
|
276
|
+
export type PersistedSavedEnvironmentRecord = typeof PersistedSavedEnvironmentRecordSchema.Type;
|
|
277
|
+
export type DesktopServerExposureMode = "local-only" | "network-accessible";
|
|
278
|
+
export declare const DesktopServerExposureModeSchema: Schema.Literals<readonly ["local-only", "network-accessible"]>;
|
|
279
|
+
export interface DesktopServerExposureState {
|
|
280
|
+
mode: DesktopServerExposureMode;
|
|
281
|
+
endpointUrl: string | null;
|
|
282
|
+
advertisedHost: string | null;
|
|
283
|
+
tailscaleServeEnabled: boolean;
|
|
284
|
+
tailscaleServePort: number;
|
|
285
|
+
}
|
|
286
|
+
export declare const DesktopServerExposureStateSchema: Schema.Struct<{
|
|
287
|
+
readonly mode: Schema.Literals<readonly ["local-only", "network-accessible"]>;
|
|
288
|
+
readonly endpointUrl: Schema.NullOr<Schema.String>;
|
|
289
|
+
readonly advertisedHost: Schema.NullOr<Schema.String>;
|
|
290
|
+
readonly tailscaleServeEnabled: Schema.Boolean;
|
|
291
|
+
readonly tailscaleServePort: Schema.Number;
|
|
292
|
+
}>;
|
|
293
|
+
export interface PickFolderOptions {
|
|
294
|
+
initialPath?: string | null;
|
|
295
|
+
}
|
|
296
|
+
export declare const PickFolderOptionsSchema: Schema.Struct<{
|
|
297
|
+
readonly initialPath: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
298
|
+
}>;
|
|
299
|
+
export declare const DesktopCloudAuthFetchInputSchema: Schema.Struct<{
|
|
300
|
+
readonly url: Schema.String;
|
|
301
|
+
readonly method: Schema.optionalKey<Schema.String>;
|
|
302
|
+
readonly headers: Schema.$Record<Schema.String, Schema.String>;
|
|
303
|
+
readonly body: Schema.optionalKey<Schema.String>;
|
|
304
|
+
}>;
|
|
305
|
+
export type DesktopCloudAuthFetchInput = typeof DesktopCloudAuthFetchInputSchema.Type;
|
|
306
|
+
export declare const DesktopCloudAuthFetchResultSchema: Schema.Struct<{
|
|
307
|
+
readonly ok: Schema.Boolean;
|
|
308
|
+
readonly status: Schema.Number;
|
|
309
|
+
readonly statusText: Schema.String;
|
|
310
|
+
readonly headers: Schema.$Record<Schema.String, Schema.String>;
|
|
311
|
+
readonly body: Schema.String;
|
|
312
|
+
}>;
|
|
313
|
+
export type DesktopCloudAuthFetchResult = typeof DesktopCloudAuthFetchResultSchema.Type;
|
|
314
|
+
export interface DesktopBridge {
|
|
315
|
+
getAppBranding: () => DesktopAppBranding | null;
|
|
316
|
+
getLocalEnvironmentBootstrap: () => DesktopEnvironmentBootstrap | null;
|
|
317
|
+
getClientSettings: () => Promise<ClientSettings | null>;
|
|
318
|
+
setClientSettings: (settings: ClientSettings) => Promise<void>;
|
|
319
|
+
getSavedEnvironmentRegistry: () => Promise<readonly PersistedSavedEnvironmentRecord[]>;
|
|
320
|
+
setSavedEnvironmentRegistry: (records: readonly PersistedSavedEnvironmentRecord[]) => Promise<void>;
|
|
321
|
+
getSavedEnvironmentSecret: (environmentId: EnvironmentId) => Promise<string | null>;
|
|
322
|
+
setSavedEnvironmentSecret: (environmentId: EnvironmentId, secret: string) => Promise<boolean>;
|
|
323
|
+
removeSavedEnvironmentSecret: (environmentId: EnvironmentId) => Promise<void>;
|
|
324
|
+
discoverSshHosts: () => Promise<readonly DesktopDiscoveredSshHost[]>;
|
|
325
|
+
ensureSshEnvironment: (target: DesktopSshEnvironmentTarget, options?: {
|
|
326
|
+
issuePairingToken?: boolean;
|
|
327
|
+
}) => Promise<DesktopSshEnvironmentBootstrap>;
|
|
328
|
+
disconnectSshEnvironment: (target: DesktopSshEnvironmentTarget) => Promise<void>;
|
|
329
|
+
fetchSshEnvironmentDescriptor: (httpBaseUrl: string) => Promise<ExecutionEnvironmentDescriptor>;
|
|
330
|
+
bootstrapSshBearerSession: (httpBaseUrl: string, credential: string) => Promise<AuthAccessTokenResult>;
|
|
331
|
+
fetchSshSessionState: (httpBaseUrl: string, bearerToken: string) => Promise<AuthSessionState>;
|
|
332
|
+
issueSshWebSocketTicket: (httpBaseUrl: string, bearerToken: string) => Promise<AuthWebSocketTicketResult>;
|
|
333
|
+
onSshPasswordPrompt: (listener: (request: DesktopSshPasswordPromptRequest) => void) => () => void;
|
|
334
|
+
resolveSshPasswordPrompt: (requestId: string, password: string | null) => Promise<void>;
|
|
335
|
+
getServerExposureState: () => Promise<DesktopServerExposureState>;
|
|
336
|
+
setServerExposureMode: (mode: DesktopServerExposureMode) => Promise<DesktopServerExposureState>;
|
|
337
|
+
setTailscaleServeEnabled: (input: {
|
|
338
|
+
readonly enabled: boolean;
|
|
339
|
+
readonly port?: number;
|
|
340
|
+
}) => Promise<DesktopServerExposureState>;
|
|
341
|
+
getAdvertisedEndpoints: () => Promise<readonly AdvertisedEndpoint[]>;
|
|
342
|
+
pickFolder: (options?: PickFolderOptions) => Promise<string | null>;
|
|
343
|
+
confirm: (message: string) => Promise<boolean>;
|
|
344
|
+
setTheme: (theme: DesktopTheme) => Promise<void>;
|
|
345
|
+
showContextMenu: <T extends string>(items: readonly ContextMenuItem<T>[], position?: {
|
|
346
|
+
x: number;
|
|
347
|
+
y: number;
|
|
348
|
+
}) => Promise<T | null>;
|
|
349
|
+
openExternal: (url: string) => Promise<boolean>;
|
|
350
|
+
createCloudAuthRequest: () => Promise<string>;
|
|
351
|
+
getCloudAuthToken: () => Promise<string | null>;
|
|
352
|
+
setCloudAuthToken: (token: string) => Promise<boolean>;
|
|
353
|
+
clearCloudAuthToken: () => Promise<void>;
|
|
354
|
+
fetchCloudAuth: (input: DesktopCloudAuthFetchInput) => Promise<DesktopCloudAuthFetchResult>;
|
|
355
|
+
onCloudAuthCallback: (listener: (rawUrl: string) => void) => () => void;
|
|
356
|
+
onMenuAction: (listener: (action: string) => void) => () => void;
|
|
357
|
+
getUpdateState: () => Promise<DesktopUpdateState>;
|
|
358
|
+
setUpdateChannel: (channel: DesktopUpdateChannel) => Promise<DesktopUpdateState>;
|
|
359
|
+
checkForUpdate: () => Promise<DesktopUpdateCheckResult>;
|
|
360
|
+
downloadUpdate: () => Promise<DesktopUpdateActionResult>;
|
|
361
|
+
installUpdate: () => Promise<DesktopUpdateActionResult>;
|
|
362
|
+
onUpdateState: (listener: (state: DesktopUpdateState) => void) => () => void;
|
|
363
|
+
}
|
|
364
|
+
/**
|
|
365
|
+
* APIs bound to the local app shell, not to any particular backend environment.
|
|
366
|
+
*
|
|
367
|
+
* These capabilities describe the desktop/browser host that the user is
|
|
368
|
+
* currently running: dialogs, editor/external-link opening, context menus, and
|
|
369
|
+
* app-level settings/config access. They must not be used as a proxy for
|
|
370
|
+
* "whatever environment the user is targeting", because in a multi-environment
|
|
371
|
+
* world the local shell and a selected backend environment are distinct
|
|
372
|
+
* concepts.
|
|
373
|
+
*/
|
|
374
|
+
export interface LocalApi {
|
|
375
|
+
dialogs: {
|
|
376
|
+
pickFolder: (options?: PickFolderOptions) => Promise<string | null>;
|
|
377
|
+
confirm: (message: string) => Promise<boolean>;
|
|
378
|
+
};
|
|
379
|
+
shell: {
|
|
380
|
+
openInEditor: (cwd: string, editor: EditorId) => Promise<void>;
|
|
381
|
+
openExternal: (url: string) => Promise<void>;
|
|
382
|
+
};
|
|
383
|
+
contextMenu: {
|
|
384
|
+
show: <T extends string>(items: readonly ContextMenuItem<T>[], position?: {
|
|
385
|
+
x: number;
|
|
386
|
+
y: number;
|
|
387
|
+
}) => Promise<T | null>;
|
|
388
|
+
};
|
|
389
|
+
persistence: {
|
|
390
|
+
getClientSettings: () => Promise<ClientSettings | null>;
|
|
391
|
+
setClientSettings: (settings: ClientSettings) => Promise<void>;
|
|
392
|
+
getSavedEnvironmentRegistry: () => Promise<readonly PersistedSavedEnvironmentRecord[]>;
|
|
393
|
+
setSavedEnvironmentRegistry: (records: readonly PersistedSavedEnvironmentRecord[]) => Promise<void>;
|
|
394
|
+
getSavedEnvironmentSecret: (environmentId: EnvironmentId) => Promise<string | null>;
|
|
395
|
+
setSavedEnvironmentSecret: (environmentId: EnvironmentId, secret: string) => Promise<boolean>;
|
|
396
|
+
removeSavedEnvironmentSecret: (environmentId: EnvironmentId) => Promise<void>;
|
|
397
|
+
};
|
|
398
|
+
server: {
|
|
399
|
+
getConfig: () => Promise<ServerConfig>;
|
|
400
|
+
/**
|
|
401
|
+
* Refresh provider snapshots. When `input.instanceId` is supplied only that
|
|
402
|
+
* configured instance is probed; otherwise every configured instance is
|
|
403
|
+
* refreshed (legacy untargeted refresh).
|
|
404
|
+
*/
|
|
405
|
+
refreshProviders: (input?: {
|
|
406
|
+
readonly instanceId?: ProviderInstanceId;
|
|
407
|
+
}) => Promise<ServerProviderUpdatedPayload>;
|
|
408
|
+
updateProvider: (input: ServerProviderUpdateInput) => Promise<ServerProviderUpdatedPayload>;
|
|
409
|
+
upsertKeybinding: (input: ServerUpsertKeybindingInput) => Promise<ServerUpsertKeybindingResult>;
|
|
410
|
+
removeKeybinding: (input: ServerRemoveKeybindingInput) => Promise<ServerRemoveKeybindingResult>;
|
|
411
|
+
getSettings: () => Promise<ServerSettings>;
|
|
412
|
+
updateSettings: (patch: ServerSettingsPatch) => Promise<ServerSettings>;
|
|
413
|
+
discoverSourceControl: () => Promise<SourceControlDiscoveryResult>;
|
|
414
|
+
getTraceDiagnostics: () => Promise<ServerTraceDiagnosticsResult>;
|
|
415
|
+
getProcessDiagnostics: () => Promise<ServerProcessDiagnosticsResult>;
|
|
416
|
+
getProcessResourceHistory: (input: ServerProcessResourceHistoryInput) => Promise<ServerProcessResourceHistoryResult>;
|
|
417
|
+
signalProcess: (input: ServerSignalProcessInput) => Promise<ServerSignalProcessResult>;
|
|
418
|
+
};
|
|
419
|
+
}
|
|
420
|
+
/**
|
|
421
|
+
* APIs bound to a specific backend environment connection.
|
|
422
|
+
*
|
|
423
|
+
* These operations must always be routed with explicit environment context.
|
|
424
|
+
* They represent remote stateful capabilities such as orchestration, terminal,
|
|
425
|
+
* project, VCS, and provider operations. In multi-environment mode, each environment gets
|
|
426
|
+
* its own instance of this surface, and callers should resolve it by
|
|
427
|
+
* `environmentId` rather than reaching through the local desktop bridge.
|
|
428
|
+
*/
|
|
429
|
+
export interface EnvironmentApi {
|
|
430
|
+
terminal: {
|
|
431
|
+
open: (input: typeof TerminalOpenInput.Encoded) => Promise<TerminalSessionSnapshot>;
|
|
432
|
+
attach: (input: typeof TerminalAttachInput.Encoded, callback: (event: TerminalAttachStreamEvent) => void, options?: {
|
|
433
|
+
onResubscribe?: () => void;
|
|
434
|
+
}) => () => void;
|
|
435
|
+
write: (input: typeof TerminalWriteInput.Encoded) => Promise<void>;
|
|
436
|
+
resize: (input: typeof TerminalResizeInput.Encoded) => Promise<void>;
|
|
437
|
+
clear: (input: typeof TerminalClearInput.Encoded) => Promise<void>;
|
|
438
|
+
restart: (input: typeof TerminalRestartInput.Encoded) => Promise<TerminalSessionSnapshot>;
|
|
439
|
+
close: (input: typeof TerminalCloseInput.Encoded) => Promise<void>;
|
|
440
|
+
onMetadata: (callback: (event: TerminalMetadataStreamEvent) => void, options?: {
|
|
441
|
+
onResubscribe?: () => void;
|
|
442
|
+
}) => () => void;
|
|
443
|
+
};
|
|
444
|
+
projects: {
|
|
445
|
+
searchEntries: (input: ProjectSearchEntriesInput) => Promise<ProjectSearchEntriesResult>;
|
|
446
|
+
writeFile: (input: ProjectWriteFileInput) => Promise<ProjectWriteFileResult>;
|
|
447
|
+
};
|
|
448
|
+
filesystem: {
|
|
449
|
+
browse: (input: FilesystemBrowseInput) => Promise<FilesystemBrowseResult>;
|
|
450
|
+
};
|
|
451
|
+
sourceControl: {
|
|
452
|
+
lookupRepository: (input: SourceControlRepositoryLookupInput) => Promise<SourceControlRepositoryInfo>;
|
|
453
|
+
cloneRepository: (input: SourceControlCloneRepositoryInput) => Promise<SourceControlCloneRepositoryResult>;
|
|
454
|
+
publishRepository: (input: SourceControlPublishRepositoryInput) => Promise<SourceControlPublishRepositoryResult>;
|
|
455
|
+
};
|
|
456
|
+
vcs: {
|
|
457
|
+
listRefs: (input: VcsListRefsInput) => Promise<VcsListRefsResult>;
|
|
458
|
+
createWorktree: (input: VcsCreateWorktreeInput) => Promise<VcsCreateWorktreeResult>;
|
|
459
|
+
removeWorktree: (input: VcsRemoveWorktreeInput) => Promise<void>;
|
|
460
|
+
createRef: (input: VcsCreateRefInput) => Promise<VcsCreateRefResult>;
|
|
461
|
+
switchRef: (input: VcsSwitchRefInput) => Promise<VcsSwitchRefResult>;
|
|
462
|
+
init: (input: VcsInitInput) => Promise<void>;
|
|
463
|
+
pull: (input: VcsPullInput) => Promise<VcsPullResult>;
|
|
464
|
+
refreshStatus: (input: VcsStatusInput) => Promise<VcsStatusResult>;
|
|
465
|
+
onStatus: (input: VcsStatusInput, callback: (status: VcsStatusResult) => void, options?: {
|
|
466
|
+
onResubscribe?: () => void;
|
|
467
|
+
}) => () => void;
|
|
468
|
+
};
|
|
469
|
+
git: {
|
|
470
|
+
resolvePullRequest: (input: GitPullRequestRefInput) => Promise<GitResolvePullRequestResult>;
|
|
471
|
+
preparePullRequestThread: (input: GitPreparePullRequestThreadInput) => Promise<GitPreparePullRequestThreadResult>;
|
|
472
|
+
};
|
|
473
|
+
review: {
|
|
474
|
+
getDiffPreview: (input: ReviewDiffPreviewInput) => Promise<ReviewDiffPreviewResult>;
|
|
475
|
+
};
|
|
476
|
+
orchestration: {
|
|
477
|
+
dispatchCommand: (command: ClientOrchestrationCommand) => Promise<{
|
|
478
|
+
sequence: number;
|
|
479
|
+
}>;
|
|
480
|
+
getTurnDiff: (input: OrchestrationGetTurnDiffInput) => Promise<OrchestrationGetTurnDiffResult>;
|
|
481
|
+
getFullThreadDiff: (input: OrchestrationGetFullThreadDiffInput) => Promise<OrchestrationGetFullThreadDiffResult>;
|
|
482
|
+
getArchivedShellSnapshot: () => Promise<OrchestrationShellSnapshot>;
|
|
483
|
+
subscribeShell: (callback: (event: OrchestrationShellStreamItem) => void, options?: {
|
|
484
|
+
onResubscribe?: () => void;
|
|
485
|
+
}) => () => void;
|
|
486
|
+
subscribeThread: (input: OrchestrationSubscribeThreadInput, callback: (event: OrchestrationThreadStreamItem) => void, options?: {
|
|
487
|
+
onResubscribe?: () => void;
|
|
488
|
+
}) => () => void;
|
|
489
|
+
};
|
|
490
|
+
}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import * as Schema from "effect/Schema";
|
|
2
|
+
export declare const MAX_KEYBINDING_VALUE_LENGTH = 64;
|
|
3
|
+
export declare const MAX_KEYBINDING_WHEN_LENGTH = 256;
|
|
4
|
+
export declare const MAX_WHEN_EXPRESSION_DEPTH = 64;
|
|
5
|
+
export declare const MAX_SCRIPT_ID_LENGTH = 24;
|
|
6
|
+
export declare const MAX_KEYBINDINGS_COUNT = 256;
|
|
7
|
+
export declare const THREAD_JUMP_KEYBINDING_COMMANDS: readonly ["thread.jump.1", "thread.jump.2", "thread.jump.3", "thread.jump.4", "thread.jump.5", "thread.jump.6", "thread.jump.7", "thread.jump.8", "thread.jump.9"];
|
|
8
|
+
export type ThreadJumpKeybindingCommand = (typeof THREAD_JUMP_KEYBINDING_COMMANDS)[number];
|
|
9
|
+
export declare const MODEL_PICKER_JUMP_KEYBINDING_COMMANDS: readonly ["modelPicker.jump.1", "modelPicker.jump.2", "modelPicker.jump.3", "modelPicker.jump.4", "modelPicker.jump.5", "modelPicker.jump.6", "modelPicker.jump.7", "modelPicker.jump.8", "modelPicker.jump.9"];
|
|
10
|
+
export type ModelPickerJumpKeybindingCommand = (typeof MODEL_PICKER_JUMP_KEYBINDING_COMMANDS)[number];
|
|
11
|
+
export declare const THREAD_KEYBINDING_COMMANDS: readonly ["thread.previous", "thread.next", "thread.jump.1", "thread.jump.2", "thread.jump.3", "thread.jump.4", "thread.jump.5", "thread.jump.6", "thread.jump.7", "thread.jump.8", "thread.jump.9"];
|
|
12
|
+
export type ThreadKeybindingCommand = (typeof THREAD_KEYBINDING_COMMANDS)[number];
|
|
13
|
+
export declare const MODEL_PICKER_KEYBINDING_COMMANDS: readonly ["modelPicker.toggle", "modelPicker.jump.1", "modelPicker.jump.2", "modelPicker.jump.3", "modelPicker.jump.4", "modelPicker.jump.5", "modelPicker.jump.6", "modelPicker.jump.7", "modelPicker.jump.8", "modelPicker.jump.9"];
|
|
14
|
+
export type ModelPickerKeybindingCommand = (typeof MODEL_PICKER_KEYBINDING_COMMANDS)[number];
|
|
15
|
+
export declare const SCRIPT_RUN_COMMAND_PATTERN: Schema.TemplateLiteral<readonly [Schema.Literal<"script.">, Schema.NonEmptyString, Schema.Literal<".run">]>;
|
|
16
|
+
export declare const KeybindingCommand: Schema.Union<readonly [Schema.Literals<readonly ["terminal.toggle", "terminal.split", "terminal.new", "terminal.close", "diff.toggle", "commandPalette.toggle", "chat.new", "chat.newLocal", "editor.openFavorite", "modelPicker.toggle", "modelPicker.jump.1", "modelPicker.jump.2", "modelPicker.jump.3", "modelPicker.jump.4", "modelPicker.jump.5", "modelPicker.jump.6", "modelPicker.jump.7", "modelPicker.jump.8", "modelPicker.jump.9", "thread.previous", "thread.next", "thread.jump.1", "thread.jump.2", "thread.jump.3", "thread.jump.4", "thread.jump.5", "thread.jump.6", "thread.jump.7", "thread.jump.8", "thread.jump.9"]>, Schema.TemplateLiteral<readonly [Schema.Literal<"script.">, Schema.NonEmptyString, Schema.Literal<".run">]>]>;
|
|
17
|
+
export type KeybindingCommand = typeof KeybindingCommand.Type;
|
|
18
|
+
export declare const KeybindingValue: Schema.decodeTo<Schema.String, Schema.String, never, never>;
|
|
19
|
+
export declare const KeybindingWhen: Schema.decodeTo<Schema.String, Schema.String, never, never>;
|
|
20
|
+
export declare const KeybindingRule: Schema.Struct<{
|
|
21
|
+
readonly key: Schema.decodeTo<Schema.String, Schema.String, never, never>;
|
|
22
|
+
readonly command: Schema.Union<readonly [Schema.Literals<readonly ["terminal.toggle", "terminal.split", "terminal.new", "terminal.close", "diff.toggle", "commandPalette.toggle", "chat.new", "chat.newLocal", "editor.openFavorite", "modelPicker.toggle", "modelPicker.jump.1", "modelPicker.jump.2", "modelPicker.jump.3", "modelPicker.jump.4", "modelPicker.jump.5", "modelPicker.jump.6", "modelPicker.jump.7", "modelPicker.jump.8", "modelPicker.jump.9", "thread.previous", "thread.next", "thread.jump.1", "thread.jump.2", "thread.jump.3", "thread.jump.4", "thread.jump.5", "thread.jump.6", "thread.jump.7", "thread.jump.8", "thread.jump.9"]>, Schema.TemplateLiteral<readonly [Schema.Literal<"script.">, Schema.NonEmptyString, Schema.Literal<".run">]>]>;
|
|
23
|
+
readonly when: Schema.optional<Schema.decodeTo<Schema.String, Schema.String, never, never>>;
|
|
24
|
+
}>;
|
|
25
|
+
export type KeybindingRule = typeof KeybindingRule.Type;
|
|
26
|
+
export declare const KeybindingsConfig: Schema.$Array<Schema.Struct<{
|
|
27
|
+
readonly key: Schema.decodeTo<Schema.String, Schema.String, never, never>;
|
|
28
|
+
readonly command: Schema.Union<readonly [Schema.Literals<readonly ["terminal.toggle", "terminal.split", "terminal.new", "terminal.close", "diff.toggle", "commandPalette.toggle", "chat.new", "chat.newLocal", "editor.openFavorite", "modelPicker.toggle", "modelPicker.jump.1", "modelPicker.jump.2", "modelPicker.jump.3", "modelPicker.jump.4", "modelPicker.jump.5", "modelPicker.jump.6", "modelPicker.jump.7", "modelPicker.jump.8", "modelPicker.jump.9", "thread.previous", "thread.next", "thread.jump.1", "thread.jump.2", "thread.jump.3", "thread.jump.4", "thread.jump.5", "thread.jump.6", "thread.jump.7", "thread.jump.8", "thread.jump.9"]>, Schema.TemplateLiteral<readonly [Schema.Literal<"script.">, Schema.NonEmptyString, Schema.Literal<".run">]>]>;
|
|
29
|
+
readonly when: Schema.optional<Schema.decodeTo<Schema.String, Schema.String, never, never>>;
|
|
30
|
+
}>>;
|
|
31
|
+
export type KeybindingsConfig = typeof KeybindingsConfig.Type;
|
|
32
|
+
export declare const KeybindingShortcut: Schema.Struct<{
|
|
33
|
+
readonly key: Schema.decodeTo<Schema.String, Schema.String, never, never>;
|
|
34
|
+
readonly metaKey: Schema.Boolean;
|
|
35
|
+
readonly ctrlKey: Schema.Boolean;
|
|
36
|
+
readonly shiftKey: Schema.Boolean;
|
|
37
|
+
readonly altKey: Schema.Boolean;
|
|
38
|
+
readonly modKey: Schema.Boolean;
|
|
39
|
+
}>;
|
|
40
|
+
export type KeybindingShortcut = typeof KeybindingShortcut.Type;
|
|
41
|
+
export declare const KeybindingWhenNode: Schema.Union<readonly [Schema.Struct<{
|
|
42
|
+
readonly type: Schema.Literal<"identifier">;
|
|
43
|
+
readonly name: Schema.NonEmptyString;
|
|
44
|
+
}>, Schema.Struct<{
|
|
45
|
+
readonly type: Schema.Literal<"not">;
|
|
46
|
+
readonly node: Schema.suspend<Schema.Codec<KeybindingWhenNode, KeybindingWhenNode, never, never>>;
|
|
47
|
+
}>, Schema.Struct<{
|
|
48
|
+
readonly type: Schema.Literal<"and">;
|
|
49
|
+
readonly left: Schema.suspend<Schema.Codec<KeybindingWhenNode, KeybindingWhenNode, never, never>>;
|
|
50
|
+
readonly right: Schema.suspend<Schema.Codec<KeybindingWhenNode, KeybindingWhenNode, never, never>>;
|
|
51
|
+
}>, Schema.Struct<{
|
|
52
|
+
readonly type: Schema.Literal<"or">;
|
|
53
|
+
readonly left: Schema.suspend<Schema.Codec<KeybindingWhenNode, KeybindingWhenNode, never, never>>;
|
|
54
|
+
readonly right: Schema.suspend<Schema.Codec<KeybindingWhenNode, KeybindingWhenNode, never, never>>;
|
|
55
|
+
}>]>;
|
|
56
|
+
export type KeybindingWhenNode = {
|
|
57
|
+
type: "identifier";
|
|
58
|
+
name: string;
|
|
59
|
+
} | {
|
|
60
|
+
type: "not";
|
|
61
|
+
node: KeybindingWhenNode;
|
|
62
|
+
} | {
|
|
63
|
+
type: "and";
|
|
64
|
+
left: KeybindingWhenNode;
|
|
65
|
+
right: KeybindingWhenNode;
|
|
66
|
+
} | {
|
|
67
|
+
type: "or";
|
|
68
|
+
left: KeybindingWhenNode;
|
|
69
|
+
right: KeybindingWhenNode;
|
|
70
|
+
};
|
|
71
|
+
export declare const ResolvedKeybindingRule: Schema.Struct<{
|
|
72
|
+
readonly command: Schema.Union<readonly [Schema.Literals<readonly ["terminal.toggle", "terminal.split", "terminal.new", "terminal.close", "diff.toggle", "commandPalette.toggle", "chat.new", "chat.newLocal", "editor.openFavorite", "modelPicker.toggle", "modelPicker.jump.1", "modelPicker.jump.2", "modelPicker.jump.3", "modelPicker.jump.4", "modelPicker.jump.5", "modelPicker.jump.6", "modelPicker.jump.7", "modelPicker.jump.8", "modelPicker.jump.9", "thread.previous", "thread.next", "thread.jump.1", "thread.jump.2", "thread.jump.3", "thread.jump.4", "thread.jump.5", "thread.jump.6", "thread.jump.7", "thread.jump.8", "thread.jump.9"]>, Schema.TemplateLiteral<readonly [Schema.Literal<"script.">, Schema.NonEmptyString, Schema.Literal<".run">]>]>;
|
|
73
|
+
readonly shortcut: Schema.Struct<{
|
|
74
|
+
readonly key: Schema.decodeTo<Schema.String, Schema.String, never, never>;
|
|
75
|
+
readonly metaKey: Schema.Boolean;
|
|
76
|
+
readonly ctrlKey: Schema.Boolean;
|
|
77
|
+
readonly shiftKey: Schema.Boolean;
|
|
78
|
+
readonly altKey: Schema.Boolean;
|
|
79
|
+
readonly modKey: Schema.Boolean;
|
|
80
|
+
}>;
|
|
81
|
+
readonly whenAst: Schema.optional<Schema.Union<readonly [Schema.Struct<{
|
|
82
|
+
readonly type: Schema.Literal<"identifier">;
|
|
83
|
+
readonly name: Schema.NonEmptyString;
|
|
84
|
+
}>, Schema.Struct<{
|
|
85
|
+
readonly type: Schema.Literal<"not">;
|
|
86
|
+
readonly node: Schema.suspend<Schema.Codec<KeybindingWhenNode, KeybindingWhenNode, never, never>>;
|
|
87
|
+
}>, Schema.Struct<{
|
|
88
|
+
readonly type: Schema.Literal<"and">;
|
|
89
|
+
readonly left: Schema.suspend<Schema.Codec<KeybindingWhenNode, KeybindingWhenNode, never, never>>;
|
|
90
|
+
readonly right: Schema.suspend<Schema.Codec<KeybindingWhenNode, KeybindingWhenNode, never, never>>;
|
|
91
|
+
}>, Schema.Struct<{
|
|
92
|
+
readonly type: Schema.Literal<"or">;
|
|
93
|
+
readonly left: Schema.suspend<Schema.Codec<KeybindingWhenNode, KeybindingWhenNode, never, never>>;
|
|
94
|
+
readonly right: Schema.suspend<Schema.Codec<KeybindingWhenNode, KeybindingWhenNode, never, never>>;
|
|
95
|
+
}>]>>;
|
|
96
|
+
}>;
|
|
97
|
+
export type ResolvedKeybindingRule = typeof ResolvedKeybindingRule.Type;
|
|
98
|
+
export declare const ResolvedKeybindingsConfig: Schema.$Array<Schema.Struct<{
|
|
99
|
+
readonly command: Schema.Union<readonly [Schema.Literals<readonly ["terminal.toggle", "terminal.split", "terminal.new", "terminal.close", "diff.toggle", "commandPalette.toggle", "chat.new", "chat.newLocal", "editor.openFavorite", "modelPicker.toggle", "modelPicker.jump.1", "modelPicker.jump.2", "modelPicker.jump.3", "modelPicker.jump.4", "modelPicker.jump.5", "modelPicker.jump.6", "modelPicker.jump.7", "modelPicker.jump.8", "modelPicker.jump.9", "thread.previous", "thread.next", "thread.jump.1", "thread.jump.2", "thread.jump.3", "thread.jump.4", "thread.jump.5", "thread.jump.6", "thread.jump.7", "thread.jump.8", "thread.jump.9"]>, Schema.TemplateLiteral<readonly [Schema.Literal<"script.">, Schema.NonEmptyString, Schema.Literal<".run">]>]>;
|
|
100
|
+
readonly shortcut: Schema.Struct<{
|
|
101
|
+
readonly key: Schema.decodeTo<Schema.String, Schema.String, never, never>;
|
|
102
|
+
readonly metaKey: Schema.Boolean;
|
|
103
|
+
readonly ctrlKey: Schema.Boolean;
|
|
104
|
+
readonly shiftKey: Schema.Boolean;
|
|
105
|
+
readonly altKey: Schema.Boolean;
|
|
106
|
+
readonly modKey: Schema.Boolean;
|
|
107
|
+
}>;
|
|
108
|
+
readonly whenAst: Schema.optional<Schema.Union<readonly [Schema.Struct<{
|
|
109
|
+
readonly type: Schema.Literal<"identifier">;
|
|
110
|
+
readonly name: Schema.NonEmptyString;
|
|
111
|
+
}>, Schema.Struct<{
|
|
112
|
+
readonly type: Schema.Literal<"not">;
|
|
113
|
+
readonly node: Schema.suspend<Schema.Codec<KeybindingWhenNode, KeybindingWhenNode, never, never>>;
|
|
114
|
+
}>, Schema.Struct<{
|
|
115
|
+
readonly type: Schema.Literal<"and">;
|
|
116
|
+
readonly left: Schema.suspend<Schema.Codec<KeybindingWhenNode, KeybindingWhenNode, never, never>>;
|
|
117
|
+
readonly right: Schema.suspend<Schema.Codec<KeybindingWhenNode, KeybindingWhenNode, never, never>>;
|
|
118
|
+
}>, Schema.Struct<{
|
|
119
|
+
readonly type: Schema.Literal<"or">;
|
|
120
|
+
readonly left: Schema.suspend<Schema.Codec<KeybindingWhenNode, KeybindingWhenNode, never, never>>;
|
|
121
|
+
readonly right: Schema.suspend<Schema.Codec<KeybindingWhenNode, KeybindingWhenNode, never, never>>;
|
|
122
|
+
}>]>>;
|
|
123
|
+
}>>;
|
|
124
|
+
export type ResolvedKeybindingsConfig = typeof ResolvedKeybindingsConfig.Type;
|
|
125
|
+
declare const KeybindingsConfigError_base: Schema.Class<KeybindingsConfigError, Schema.TaggedStruct<"KeybindingsConfigParseError", {
|
|
126
|
+
readonly configPath: Schema.String;
|
|
127
|
+
readonly detail: Schema.String;
|
|
128
|
+
readonly cause: Schema.optional<Schema.Defect>;
|
|
129
|
+
}>, import("effect/Cause").YieldableError>;
|
|
130
|
+
export declare class KeybindingsConfigError extends KeybindingsConfigError_base {
|
|
131
|
+
get message(): string;
|
|
132
|
+
}
|
|
133
|
+
export {};
|