@pstdio/sdk 0.20.0 → 0.22.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 +22 -192
- package/dist/api/index.js +932 -483
- package/dist/api.d.ts +3767 -0
- package/dist/client/index.js +21 -14
- package/dist/client.d.ts +1714 -0
- package/dist/extensions/index.js +262 -140
- package/dist/extensions/react/index.js +2 -1
- package/dist/{extensions/react/index.d.ts → extensions-react.d.ts} +23 -16
- package/dist/extensions.d.ts +3826 -0
- package/dist/hooks.d.ts +1775 -0
- package/dist/{prompts/render-prompt.d.ts → prompts.d.ts} +3 -1
- package/dist/resources/index.js +932 -483
- package/dist/resources.d.ts +422 -0
- package/package.json +12 -31
- package/dist/api/extensions.d.ts +0 -1
- package/dist/api/index.d.ts +0 -10
- package/dist/api/projects.d.ts +0 -1
- package/dist/api/sessions.d.ts +0 -2
- package/dist/api/settings.d.ts +0 -1
- package/dist/api/skills.d.ts +0 -1
- package/dist/api/templates.d.ts +0 -1
- package/dist/api/terminal.d.ts +0 -49
- package/dist/api/workspaces.d.ts +0 -12
- package/dist/client/agents.d.ts +0 -10
- package/dist/client/client.d.ts +0 -26
- package/dist/client/extensions.d.ts +0 -12
- package/dist/client/index.d.ts +0 -14
- package/dist/client/notifications.d.ts +0 -23
- package/dist/client/projects.d.ts +0 -14
- package/dist/client/request.d.ts +0 -25
- package/dist/client/runtime.d.ts +0 -5
- package/dist/client/sessions.d.ts +0 -45
- package/dist/client/settings.d.ts +0 -7
- package/dist/client/skills.d.ts +0 -9
- package/dist/client/sse.d.ts +0 -15
- package/dist/client/sync.d.ts +0 -35
- package/dist/client/templates.d.ts +0 -11
- package/dist/client/workspaces.d.ts +0 -20
- package/dist/extensions/command-outcome.d.ts +0 -5
- package/dist/extensions/define-command.d.ts +0 -26
- package/dist/extensions/define-extension-view.d.ts +0 -58
- package/dist/extensions/define-extension.d.ts +0 -54
- package/dist/extensions/index.d.ts +0 -13
- package/dist/extensions/params.d.ts +0 -36
- package/dist/extensions/refs.d.ts +0 -8
- package/dist/extensions/terminal-session-bridge.d.ts +0 -32
- package/dist/extensions/webview-client.d.ts +0 -41
- package/dist/extensions/when.d.ts +0 -9
- package/dist/hooks/base.d.ts +0 -17
- package/dist/hooks/entities.d.ts +0 -8
- package/dist/hooks/index.d.ts +0 -3
- package/dist/hooks/session.d.ts +0 -12
- package/dist/hooks/worktree.d.ts +0 -53
- package/dist/prompts/index.d.ts +0 -1
- package/dist/resources/agent.d.ts +0 -2
- package/dist/resources/file.d.ts +0 -1
- package/dist/resources/index.d.ts +0 -10
- package/dist/resources/project.d.ts +0 -1
- package/dist/resources/session.d.ts +0 -1
- package/dist/resources/settings.d.ts +0 -1
- package/dist/resources/skill.d.ts +0 -1
- package/dist/resources/template.d.ts +0 -1
- package/dist/resources/workspace.d.ts +0 -3
|
@@ -0,0 +1,3826 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
export declare interface ActionOption {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
icon?: string;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/** Compact command set rendered as an action button row. */
|
|
11
|
+
export declare interface ActionsControl extends BaseControl {
|
|
12
|
+
type: "actions";
|
|
13
|
+
defaultValue?: string;
|
|
14
|
+
options: ActionOption[];
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export declare interface ActivityItemContribution<TParams extends Struct = Struct> extends ContributionDefinition<"activity-item"> {
|
|
18
|
+
title: Localizable<string>;
|
|
19
|
+
icon: string;
|
|
20
|
+
/** Mode ids whose activity rail shows this item. */
|
|
21
|
+
modes: readonly ModeRef[];
|
|
22
|
+
placement?: "first" | "default" | "last";
|
|
23
|
+
command: CommandRef<TParams, unknown>;
|
|
24
|
+
params?: Partial<TParams>;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export declare type AgentCapability = "SessionFork" | "ContextUsage" | "Approvals" | "SessionReattach";
|
|
28
|
+
|
|
29
|
+
export declare type AgentModel = z.infer<typeof agentModelSchema>;
|
|
30
|
+
|
|
31
|
+
declare const agentModelSchema: z.ZodObject<{
|
|
32
|
+
id: z.ZodString;
|
|
33
|
+
label: z.ZodOptional<z.ZodString>;
|
|
34
|
+
description: z.ZodOptional<z.ZodString>;
|
|
35
|
+
isDefault: z.ZodOptional<z.ZodBoolean>;
|
|
36
|
+
paramOverrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodUnion<readonly [z.ZodObject<{
|
|
37
|
+
label: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
38
|
+
$l10n: z.ZodString;
|
|
39
|
+
default: z.ZodOptional<z.ZodString>;
|
|
40
|
+
}, z.core.$strip>]>>;
|
|
41
|
+
description: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
42
|
+
$l10n: z.ZodString;
|
|
43
|
+
default: z.ZodOptional<z.ZodString>;
|
|
44
|
+
}, z.core.$strip>]>>;
|
|
45
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
46
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
47
|
+
type: z.ZodLiteral<"select">;
|
|
48
|
+
defaultValue: z.ZodOptional<z.ZodString>;
|
|
49
|
+
options: z.ZodArray<z.ZodObject<{
|
|
50
|
+
label: z.ZodString;
|
|
51
|
+
value: z.ZodString;
|
|
52
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
53
|
+
}, z.core.$strip>>;
|
|
54
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
55
|
+
label: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
56
|
+
$l10n: z.ZodString;
|
|
57
|
+
default: z.ZodOptional<z.ZodString>;
|
|
58
|
+
}, z.core.$strip>]>>;
|
|
59
|
+
description: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
60
|
+
$l10n: z.ZodString;
|
|
61
|
+
default: z.ZodOptional<z.ZodString>;
|
|
62
|
+
}, z.core.$strip>]>>;
|
|
63
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
64
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
65
|
+
type: z.ZodLiteral<"boolean">;
|
|
66
|
+
defaultValue: z.ZodOptional<z.ZodBoolean>;
|
|
67
|
+
}, z.core.$strip>]>>>>;
|
|
68
|
+
}, z.core.$strip>;
|
|
69
|
+
|
|
70
|
+
export declare const ALWAYS_AVAILABLE_WEBVIEW_CAPABILITIES: readonly ["host.dispatchKeyboardEvent"];
|
|
71
|
+
|
|
72
|
+
/** Nine-point alignment picker. */
|
|
73
|
+
export declare interface AnchorGridControl extends BaseControl {
|
|
74
|
+
type: "anchorGrid";
|
|
75
|
+
defaultValue: AnchorGridValue;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export declare type AnchorGridValue = "top-left" | "top" | "top-right" | "left" | "center" | "right" | "bottom-left" | "bottom" | "bottom-right";
|
|
79
|
+
|
|
80
|
+
export declare type ApprovalRequest = {
|
|
81
|
+
id: string;
|
|
82
|
+
toolName: string;
|
|
83
|
+
toolInput: unknown;
|
|
84
|
+
toolUseId: string;
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
export declare type ApprovalResponse = {
|
|
88
|
+
id: string;
|
|
89
|
+
decision: "approve" | "deny" | "timeout";
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
export declare interface ArtifactFile {
|
|
93
|
+
path: string;
|
|
94
|
+
size?: number;
|
|
95
|
+
updatedAt?: string;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export declare interface ArtifactMount {
|
|
99
|
+
exists(path: string): Promise<boolean>;
|
|
100
|
+
readText(path: string): Promise<string>;
|
|
101
|
+
writeText(path: string, value: string): Promise<void>;
|
|
102
|
+
readBytes(path: string): Promise<Uint8Array>;
|
|
103
|
+
writeBytes(path: string, value: Uint8Array): Promise<void>;
|
|
104
|
+
list(pattern?: string): Promise<ArtifactFile[]>;
|
|
105
|
+
listDirs(path?: string): Promise<string[]>;
|
|
106
|
+
delete(path: string): Promise<void>;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export declare interface ArtifactMountContribution extends ContributionDefinition<"artifact-mount"> {
|
|
110
|
+
/** Relative path under .pstdio/<extension.name>/. */
|
|
111
|
+
path: string;
|
|
112
|
+
label: Localizable<string>;
|
|
113
|
+
repoRole?: "default" | "selected" | "workspace";
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export declare const artifactMountId: (mount: ArtifactMountKey) => string;
|
|
117
|
+
|
|
118
|
+
/** An artifact mount reference: the contribution, its ref, or the mount's local id. */
|
|
119
|
+
export declare type ArtifactMountKey = string | {
|
|
120
|
+
id: string;
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Declare webview read access to one artifact mount the extension defines.
|
|
125
|
+
* Each mount is a separate grant; there is no wildcard.
|
|
126
|
+
*
|
|
127
|
+
* @example
|
|
128
|
+
* capabilities: ["commands.execute", artifactsRead(runArtifacts)]
|
|
129
|
+
*/
|
|
130
|
+
export declare const artifactsRead: (mount: ArtifactMountKey) => WebviewCapabilityDeclaration;
|
|
131
|
+
|
|
132
|
+
/** Static asset contributions: artifact mounts, templates, skills. */
|
|
133
|
+
export declare interface AssetContributions {
|
|
134
|
+
artifactMounts?: readonly ArtifactMountContribution[];
|
|
135
|
+
templateTypes?: readonly TemplateTypeContribution[];
|
|
136
|
+
templates?: readonly TemplateContribution[];
|
|
137
|
+
skills?: readonly SkillContribution[];
|
|
138
|
+
themes?: readonly ThemeContribution[];
|
|
139
|
+
fileIconThemes?: readonly FileIconThemeContribution[];
|
|
140
|
+
translations?: Record<string, PackageAssetDescriptor>;
|
|
141
|
+
defaultLocale?: string;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
export declare interface BaseControl {
|
|
145
|
+
id: string;
|
|
146
|
+
name: string;
|
|
147
|
+
description?: string;
|
|
148
|
+
/** Locks this one param while the rest of the editor stays editable. */
|
|
149
|
+
readOnly?: boolean;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/** Behavioural surface: commands, middleware, hooks, schedules. */
|
|
153
|
+
export declare interface BehaviourContributions {
|
|
154
|
+
commands?: readonly CommandDefinition<any, any, any>[];
|
|
155
|
+
middlewares?: readonly MiddlewareDefinition<any, any>[];
|
|
156
|
+
hooks?: readonly HookDefinition<any>[];
|
|
157
|
+
schedules?: readonly ScheduleContribution<any>[];
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
export declare interface BooleanControl extends BaseControl {
|
|
161
|
+
type: "boolean";
|
|
162
|
+
defaultValue: boolean;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
export declare type BooleanParam<TRequired extends boolean | undefined = boolean | undefined> = ParamBase<boolean, TRequired> & {
|
|
166
|
+
type: "boolean";
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
export declare interface CliContribution {
|
|
170
|
+
path?: string[];
|
|
171
|
+
globalAliases?: string[][];
|
|
172
|
+
description?: Localizable<string>;
|
|
173
|
+
examples?: string[];
|
|
174
|
+
hidden?: boolean;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
declare type ClientSettingsMap<TSettings> = TSettings extends {
|
|
178
|
+
properties: unknown;
|
|
179
|
+
} ? SettingsMap<TSettings> : Record<never, never>;
|
|
180
|
+
|
|
181
|
+
export declare interface CollectionBadgeItem {
|
|
182
|
+
id: string;
|
|
183
|
+
label: string;
|
|
184
|
+
icon?: string;
|
|
185
|
+
resource?: ResourceRef;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
export declare interface ColorControl extends BaseControl {
|
|
189
|
+
type: "color";
|
|
190
|
+
defaultValue: string;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
export declare interface CommandCompletedEvent<TParams extends Struct = Struct, TResult = unknown> extends CommandStartedEvent<TParams> {
|
|
194
|
+
result: TResult;
|
|
195
|
+
elapsedMs: number;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
export declare interface CommandContext<TSettings extends Record<string, unknown> = Record<string, unknown>> extends ExtensionContextBase<TSettings> {
|
|
199
|
+
commandId: string;
|
|
200
|
+
invocationId: string;
|
|
201
|
+
/** Aborts when the host cancels this command run. Handlers must stop external side effects when it fires. */
|
|
202
|
+
signal: AbortSignal;
|
|
203
|
+
invocation: {
|
|
204
|
+
readonly source?: CommandSource;
|
|
205
|
+
readonly attachment?: WorkbenchAttachmentInvocationContext;
|
|
206
|
+
readonly slot?: SlotInvocationContext;
|
|
207
|
+
readonly metadata?: JsonObject;
|
|
208
|
+
};
|
|
209
|
+
resource?: ResourceRef;
|
|
210
|
+
attachment?: WorkbenchAttachmentInvocationContext;
|
|
211
|
+
slot?: SlotInvocationContext;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
export declare interface CommandContinue {
|
|
215
|
+
type: "continue";
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
declare type CommandContribution<TSchema extends ParamObjectSchema | undefined, TResult> = CommandDefinition<TSchema, TResult> & ContributionDefinition<"command">;
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* A command exposed by an extension. The `params` schema (typed via `params.*`) drives
|
|
222
|
+
* the inferred shape of the second argument passed to `run`.
|
|
223
|
+
*/
|
|
224
|
+
export declare interface CommandDefinition<TSchema extends ParamObjectSchema | undefined = ParamObjectSchema | undefined, TResult = unknown, TSettings extends Record<string, unknown> = Record<string, unknown>> extends ContributionDefinition<"command"> {
|
|
225
|
+
readonly ref: CommandRef<SchemaParams<TSchema>, TResult>;
|
|
226
|
+
title: Localizable<string>;
|
|
227
|
+
description?: Localizable<string>;
|
|
228
|
+
params?: TSchema;
|
|
229
|
+
menus?: readonly MenuContribution[];
|
|
230
|
+
palette?: readonly CommandPaletteContribution<SchemaParams<TSchema>>[];
|
|
231
|
+
cli?: true | CliContribution;
|
|
232
|
+
/** Exposes this exact command and its params schema to scoped machine tokens. */
|
|
233
|
+
automation?: true;
|
|
234
|
+
/** Records CLI invocations of this command as mutations. */
|
|
235
|
+
mutating?: true;
|
|
236
|
+
run: CommandRunHandler<SchemaParams<TSchema>, TResult, TSettings>;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
export declare interface CommandDiagnostic {
|
|
240
|
+
code: string;
|
|
241
|
+
message: string;
|
|
242
|
+
severity: "info" | "warning" | "error";
|
|
243
|
+
extensionId?: string;
|
|
244
|
+
commandId?: string;
|
|
245
|
+
metadata?: JsonObject;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* Build an `EventRef` for a command lifecycle phase (`requested`, `started`, `completed`,
|
|
250
|
+
* `rejected`, `failed`). The payload type is inferred from the command ref so hooks see
|
|
251
|
+
* the correct shape.
|
|
252
|
+
*/
|
|
253
|
+
export declare const commandEvent: <TPhase extends CommandLifecyclePhase, TParams extends Struct = Struct, TResult = unknown>(command: CommandRef<TParams, TResult>, phase: TPhase) => EventRef<CommandLifecycleEventPayload<TPhase, TParams, TResult>>;
|
|
254
|
+
|
|
255
|
+
export declare interface CommandFailedEvent<TParams extends Struct = Struct> extends CommandRequestedEvent<TParams> {
|
|
256
|
+
code?: string;
|
|
257
|
+
reason: string;
|
|
258
|
+
error?: SerializedError;
|
|
259
|
+
elapsedMs: number;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
declare type CommandFn<TDefinition> = TDefinition extends CommandDefinition<infer TSchema, infer TResult, infer _TSettings> ? TSchema extends ParamObjectSchema ? Partial<ParamsOf<TSchema>> extends ParamsOf<TSchema> ? (params?: ParamsOf<TSchema>) => Promise<TResult> : (params: ParamsOf<TSchema>) => Promise<TResult> : () => Promise<TResult> : never;
|
|
263
|
+
|
|
264
|
+
export declare interface CommandHelpersApi {
|
|
265
|
+
execute<TParams extends Struct = Struct, TResult = unknown>(command: CommandRef<TParams, TResult>, invocation: CommandInvocation<TParams>): Promise<CommandOutcome<TResult>>;
|
|
266
|
+
continue(): CommandContinue;
|
|
267
|
+
patchParams<TParams extends Struct = Struct>(params: Partial<TParams>): CommandPatchParams<TParams>;
|
|
268
|
+
replaceParams<TParams extends Struct = Struct>(params: TParams): CommandReplaceParams<TParams>;
|
|
269
|
+
replaceInvocation<TParams extends Struct = Struct>(invocation: CommandInvocation<TParams>): CommandReplaceInvocation<TParams>;
|
|
270
|
+
reject(input: Omit<CommandReject, "type">): CommandReject;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
declare type CommandInput<TSchema extends ParamObjectSchema | undefined, TResult> = Omit<CommandDefinition<TSchema, TResult>, "ref">;
|
|
274
|
+
|
|
275
|
+
export declare interface CommandInvocation<TParams extends Struct = Struct> {
|
|
276
|
+
params: TParams;
|
|
277
|
+
resource?: ResourceRef;
|
|
278
|
+
repoId?: string;
|
|
279
|
+
repoPath?: string;
|
|
280
|
+
attachment?: WorkbenchAttachmentInvocationContext;
|
|
281
|
+
slot?: SlotInvocationContext;
|
|
282
|
+
metadata?: JsonObject;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
export declare type CommandLifecycleEventPayload<TPhase extends CommandLifecyclePhase, TParams extends Struct = Struct, TResult = unknown> = TPhase extends "requested" ? CommandRequestedEvent<TParams> : TPhase extends "started" ? CommandStartedEvent<TParams> : TPhase extends "completed" ? CommandCompletedEvent<TParams, TResult> : TPhase extends "rejected" ? CommandRejectedEvent<TParams> : CommandFailedEvent<TParams>;
|
|
286
|
+
|
|
287
|
+
export declare type CommandLifecyclePhase = "requested" | "started" | "completed" | "rejected" | "failed";
|
|
288
|
+
|
|
289
|
+
export declare type CommandMiddlewareContext = CommandContext;
|
|
290
|
+
|
|
291
|
+
export declare type CommandMiddlewareHandler<TParams extends Struct = Struct> = (ctx: CommandMiddlewareContext, params: TParams) => MaybePromise<CommandMiddlewareResult<TParams>>;
|
|
292
|
+
|
|
293
|
+
export declare type CommandMiddlewareResult<TParams extends Struct = Struct> = void | CommandContinue | CommandPatchParams<TParams> | CommandReplaceParams<TParams> | CommandReplaceInvocation<TParams> | CommandReject;
|
|
294
|
+
|
|
295
|
+
export declare interface CommandNotice {
|
|
296
|
+
type: "info" | "success" | "warning" | "error";
|
|
297
|
+
title?: string;
|
|
298
|
+
message: string;
|
|
299
|
+
metadata?: JsonObject;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
export declare type CommandOutcome<TResult = unknown> = {
|
|
303
|
+
ok: true;
|
|
304
|
+
status: "success";
|
|
305
|
+
value: TResult;
|
|
306
|
+
notices?: CommandNotice[];
|
|
307
|
+
diagnostics?: CommandDiagnostic[];
|
|
308
|
+
} | {
|
|
309
|
+
ok: false;
|
|
310
|
+
status: "rejected";
|
|
311
|
+
code?: string;
|
|
312
|
+
reason: string;
|
|
313
|
+
data?: JsonObject;
|
|
314
|
+
notices?: CommandNotice[];
|
|
315
|
+
diagnostics?: CommandDiagnostic[];
|
|
316
|
+
} | {
|
|
317
|
+
ok: false;
|
|
318
|
+
status: "error";
|
|
319
|
+
code?: string;
|
|
320
|
+
reason: string;
|
|
321
|
+
error?: SerializedError;
|
|
322
|
+
notices?: CommandNotice[];
|
|
323
|
+
diagnostics?: CommandDiagnostic[];
|
|
324
|
+
};
|
|
325
|
+
|
|
326
|
+
export declare interface CommandPaletteContribution<TParams extends Struct = Struct> {
|
|
327
|
+
label?: Localizable<string>;
|
|
328
|
+
group?: string;
|
|
329
|
+
placement?: "first" | "default" | "last";
|
|
330
|
+
icon?: string;
|
|
331
|
+
when?: WhenExpression;
|
|
332
|
+
params?: Partial<TParams>;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
export declare interface CommandPaletteResourceContribution extends ContributionDefinition<"command-palette-resource"> {
|
|
336
|
+
title: Localizable<string>;
|
|
337
|
+
resourceKind?: ResourceKindRef;
|
|
338
|
+
query: RendererCallback<CommandPaletteResourceQueryParams, CommandPaletteResourceQueryResult>;
|
|
339
|
+
refreshEvents?: readonly RendererEventReference[];
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
export declare interface CommandPaletteResourceItem {
|
|
343
|
+
id: string;
|
|
344
|
+
label: string;
|
|
345
|
+
description?: string;
|
|
346
|
+
icon?: string;
|
|
347
|
+
keywords?: string[];
|
|
348
|
+
target: CommandPaletteResourceTarget;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
/**
|
|
352
|
+
* Command palette resource providers contribute dynamic, searchable palette results
|
|
353
|
+
* (e.g. slides in a presentation) backed by a private query callback. The host queries
|
|
354
|
+
* matching providers as the user types and refreshes results when a declared event fires.
|
|
355
|
+
*/
|
|
356
|
+
export declare interface CommandPaletteResourceQueryParams {
|
|
357
|
+
projectId?: string;
|
|
358
|
+
modeId?: string;
|
|
359
|
+
activeResource?: ResourceRef;
|
|
360
|
+
providerId: string;
|
|
361
|
+
query: string;
|
|
362
|
+
limit: number;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
export declare interface CommandPaletteResourceQueryResult {
|
|
366
|
+
items: CommandPaletteResourceItem[];
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
export declare type CommandPaletteResourceTarget = NavigationTarget;
|
|
370
|
+
|
|
371
|
+
export declare interface CommandPatchParams<TParams extends Struct = Struct> {
|
|
372
|
+
type: "patchParams";
|
|
373
|
+
params: Partial<TParams>;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
export declare interface CommandRef<TParams extends Struct = Struct, TResult = unknown> extends ContributionRef<"command"> {
|
|
377
|
+
params?: TParams;
|
|
378
|
+
result?: TResult;
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
/** Build a typed cross-extension command reference. */
|
|
382
|
+
export declare const commandRef: CommandRefFactory;
|
|
383
|
+
|
|
384
|
+
declare interface CommandRefFactory {
|
|
385
|
+
<TParams extends Struct = Struct, TResult = unknown>(input: ExternalRefInput): CommandRef<TParams, TResult>;
|
|
386
|
+
forExtension(owner: ExtensionOwner): <TParams extends Struct = Struct, TResult = unknown>(id: string) => CommandRef<TParams, TResult>;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
export declare interface CommandReject {
|
|
390
|
+
type: "reject";
|
|
391
|
+
code?: string;
|
|
392
|
+
reason: string;
|
|
393
|
+
data?: JsonObject;
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
export declare interface CommandRejectedEvent<TParams extends Struct = Struct> extends CommandRequestedEvent<TParams> {
|
|
397
|
+
code?: string;
|
|
398
|
+
reason: string;
|
|
399
|
+
data?: JsonObject;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
export declare interface CommandReplaceInvocation<TParams extends Struct = Struct> {
|
|
403
|
+
type: "replaceInvocation";
|
|
404
|
+
invocation: CommandInvocation<TParams>;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
export declare interface CommandReplaceParams<TParams extends Struct = Struct> {
|
|
408
|
+
type: "replaceParams";
|
|
409
|
+
params: TParams;
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
export declare interface CommandRequestedEvent<TParams extends Struct = Struct> {
|
|
413
|
+
commandId: string;
|
|
414
|
+
invocationId: string;
|
|
415
|
+
source?: CommandSource;
|
|
416
|
+
params: TParams;
|
|
417
|
+
resource?: ResourceRef;
|
|
418
|
+
repo?: RepoContext;
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
export declare type CommandResponse<TResult = unknown> = {
|
|
422
|
+
outcome: CommandOutcome<TResult>;
|
|
423
|
+
};
|
|
424
|
+
|
|
425
|
+
export declare type CommandRunHandler<TParams extends Struct = Struct, TResult = unknown, TSettings extends Record<string, unknown> = Record<string, unknown>> = (ctx: CommandContext<TSettings>, params: TParams) => MaybePromise<TResult>;
|
|
426
|
+
|
|
427
|
+
export declare type CommandSource = "cli" | "dashboard" | "api" | "schedule" | "event" | "automation" | "command-panel";
|
|
428
|
+
|
|
429
|
+
export declare interface CommandStartedEvent<TParams extends Struct = Struct> extends CommandRequestedEvent<TParams> {
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
export declare interface CommandTarget<TParams extends Struct = Struct> {
|
|
433
|
+
command: CommandRef<TParams, unknown>;
|
|
434
|
+
params?: TParams;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
export declare interface CommitPayload {
|
|
438
|
+
projectId: string;
|
|
439
|
+
repoPath?: string;
|
|
440
|
+
worktreePath?: string;
|
|
441
|
+
branch?: string;
|
|
442
|
+
commitSha?: string;
|
|
443
|
+
workspace?: ExtensionWorkspace;
|
|
444
|
+
anchors?: ResourceAnchor[];
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
export declare interface ConflictPayload {
|
|
448
|
+
projectId: string;
|
|
449
|
+
operation: "rebase" | "merge";
|
|
450
|
+
repoPath?: string;
|
|
451
|
+
worktreePath?: string;
|
|
452
|
+
branch?: string;
|
|
453
|
+
workspace?: ExtensionWorkspace;
|
|
454
|
+
anchors?: ResourceAnchor[];
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
export declare type ConnectionRef = ContributionRef<"connection">;
|
|
458
|
+
|
|
459
|
+
export declare interface ContributionDefinition<Kind extends ContributionKind> {
|
|
460
|
+
readonly id: string;
|
|
461
|
+
readonly ref: ContributionRef<Kind>;
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
export declare type ContributionInput<Kind extends ContributionKind> = Omit<ContributionDefinition<Kind>, "ref">;
|
|
465
|
+
|
|
466
|
+
export declare type ContributionKind = "activity-item" | "artifact-mount" | "command" | "command-palette-resource" | "connection" | "file-icon-theme" | "harness" | "hook" | "keybinding" | "middleware" | "mode" | "navigation-item" | "navigation-tree" | "page" | "placement" | "resource-hierarchy-provider" | "resource-kind" | "schedule" | "settings-panel" | "settings-section" | "skill" | "status" | "status-bar-item" | "template" | "template-type" | "theme" | "view" | "view-menu" | "workspace-type";
|
|
467
|
+
|
|
468
|
+
export declare interface ContributionRef<Kind extends ContributionKind> {
|
|
469
|
+
readonly extensionId?: string;
|
|
470
|
+
readonly kind: Kind;
|
|
471
|
+
readonly id: string;
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
export declare interface ControlGroup {
|
|
475
|
+
id: string;
|
|
476
|
+
title: string;
|
|
477
|
+
description?: string;
|
|
478
|
+
params: ControlParam[];
|
|
479
|
+
collapsible?: boolean;
|
|
480
|
+
defaultCollapsed?: boolean;
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
export declare type ControlParam = NumberControl | BooleanControl | TextControl | MarkdownControl | SelectionControl | DateControl | ColorControl | ReadOnlyControl | ResourceControl | RangeControl | SegmentedControl | ActionsControl | AnchorGridControl | VectorControl;
|
|
484
|
+
|
|
485
|
+
export declare interface ControlsApplyInput {
|
|
486
|
+
renderer: RendererContext;
|
|
487
|
+
values: ControlValueMap;
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
export declare interface ControlsQueryParams {
|
|
491
|
+
renderer: RendererContext;
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
export declare interface ControlsQueryResult {
|
|
495
|
+
params?: ControlParam[];
|
|
496
|
+
groups?: ControlGroup[];
|
|
497
|
+
values?: ControlValueMap;
|
|
498
|
+
readOnly?: boolean;
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
/** A native controls view. Its query supplies serializable fields and their current values. */
|
|
502
|
+
export declare interface ControlsRendererContribution extends RendererContributionBase {
|
|
503
|
+
query: RendererCallback<ControlsQueryParams, ControlsQueryResult>;
|
|
504
|
+
onValueChange?: RendererCallback<ControlsUpdateValueInput, unknown>;
|
|
505
|
+
onApply?: RendererCallback<ControlsApplyInput, unknown>;
|
|
506
|
+
onReset?: RendererCallback<ControlsResetInput, unknown>;
|
|
507
|
+
defaultValues?: ControlValueMap;
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
export declare interface ControlsResetInput {
|
|
511
|
+
renderer: RendererContext;
|
|
512
|
+
controlIds?: string[];
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
export declare type ControlsResourceRef = ResourceRef;
|
|
516
|
+
|
|
517
|
+
export declare interface ControlsUpdateValueInput {
|
|
518
|
+
renderer: RendererContext;
|
|
519
|
+
controlId: string;
|
|
520
|
+
value: ControlValue;
|
|
521
|
+
values: ControlValueMap;
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
export declare type ControlsViewBody = NativeViewBody<"controls", ControlsRendererContribution>;
|
|
525
|
+
|
|
526
|
+
export declare type ControlValue = number | string | boolean | null | string[] | RangeValue | VectorValue;
|
|
527
|
+
|
|
528
|
+
export declare type ControlValueMap = Record<string, ControlValue>;
|
|
529
|
+
|
|
530
|
+
export declare interface CreateExtensionWorkspaceInput {
|
|
531
|
+
project_id?: string;
|
|
532
|
+
shorthand_base: string;
|
|
533
|
+
provider_id?: string;
|
|
534
|
+
params?: JsonObject;
|
|
535
|
+
anchors?: ResourceAnchor[];
|
|
536
|
+
repo_id?: string;
|
|
537
|
+
base?: string;
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
export declare interface CreateNotificationInput {
|
|
541
|
+
projectId: string;
|
|
542
|
+
title: string;
|
|
543
|
+
body?: string;
|
|
544
|
+
kind: NotificationKind;
|
|
545
|
+
priority?: NotificationPriority;
|
|
546
|
+
target?: ResourceRef;
|
|
547
|
+
related?: ResourceRef[];
|
|
548
|
+
actions?: NotificationAction[];
|
|
549
|
+
dedupeKey?: string;
|
|
550
|
+
expiresAt?: string;
|
|
551
|
+
snoozedUntil?: string;
|
|
552
|
+
metadata?: JsonObject;
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
/**
|
|
556
|
+
* Builds a terminal bridge for an extension webview from its `GuestHost`.
|
|
557
|
+
* Operations go through `host.call("terminal.session", ...)`; output and exit
|
|
558
|
+
* events arrive through the host event channel. The webview must declare the
|
|
559
|
+
* `terminal.session` capability or every call is rejected by the host gate.
|
|
560
|
+
*/
|
|
561
|
+
export declare const createTerminalSessionBridge: (host: GuestHost) => TerminalSessionBridge;
|
|
562
|
+
|
|
563
|
+
/**
|
|
564
|
+
* Typed guest-side client over the host bridge. Command params and results come from
|
|
565
|
+
* the extension's exported commands record (`defineCommand` values); settings come
|
|
566
|
+
* from its exported settings contribution. Command outcomes are unwrapped, so
|
|
567
|
+
* failures throw.
|
|
568
|
+
*
|
|
569
|
+
* Import both as types only, so no server code enters the webview bundle:
|
|
570
|
+
*
|
|
571
|
+
* @example
|
|
572
|
+
* import type { commands } from "../commands";
|
|
573
|
+
* import type { settings } from "../settings";
|
|
574
|
+
*
|
|
575
|
+
* const client = createWebviewClient<typeof commands, typeof settings>(host);
|
|
576
|
+
* const { statuses } = await client.commands["ticket-status.read"]();
|
|
577
|
+
* const enabled = await client.settings.get("counter.enabled");
|
|
578
|
+
*/
|
|
579
|
+
export declare const createWebviewClient: <TCommands extends object, TSettings = undefined>(host: GuestHost, options?: WebviewClientOptions) => WebviewClient<TCommands, TSettings>;
|
|
580
|
+
|
|
581
|
+
export declare interface DataTableRendererColumn {
|
|
582
|
+
id: string;
|
|
583
|
+
label?: Localizable<string>;
|
|
584
|
+
description?: Localizable<string>;
|
|
585
|
+
icon?: string;
|
|
586
|
+
hidden?: boolean;
|
|
587
|
+
stat?: DataTableRendererColumnStat;
|
|
588
|
+
renderer?: DataTableRendererColumnRenderer;
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
export declare type DataTableRendererColumnRenderer = {
|
|
592
|
+
type: "json";
|
|
593
|
+
} | {
|
|
594
|
+
type: "color-scale";
|
|
595
|
+
stops: Array<{
|
|
596
|
+
value: number;
|
|
597
|
+
color: DataTableRendererThemeColor;
|
|
598
|
+
}>;
|
|
599
|
+
} | {
|
|
600
|
+
type: "categorical-color";
|
|
601
|
+
categories: Array<{
|
|
602
|
+
value: string | number | boolean | null;
|
|
603
|
+
color: DataTableRendererThemeColor;
|
|
604
|
+
}>;
|
|
605
|
+
};
|
|
606
|
+
|
|
607
|
+
export declare type DataTableRendererColumnStat = {
|
|
608
|
+
type: "unique";
|
|
609
|
+
} | {
|
|
610
|
+
type: "histogram";
|
|
611
|
+
bins?: number;
|
|
612
|
+
} | {
|
|
613
|
+
type: "top-values";
|
|
614
|
+
limit?: number;
|
|
615
|
+
};
|
|
616
|
+
|
|
617
|
+
export declare interface DataTableRendererContribution extends RendererContributionBase {
|
|
618
|
+
columns?: DataTableRendererColumn[];
|
|
619
|
+
query: RendererCallback<DataTableRendererQueryParams, DataTableRendererQueryResult>;
|
|
620
|
+
selectionMode?: "none" | "multiple";
|
|
621
|
+
selectionActions?: DataTableRendererSelectionAction[];
|
|
622
|
+
rowActions?: DataTableRendererRowAction[];
|
|
623
|
+
onRowActivate?: DataTableRendererRowActivationHandler;
|
|
624
|
+
initialPageSize?: number;
|
|
625
|
+
pageSizeOptions?: number[];
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
export declare interface DataTableRendererQueryParams {
|
|
629
|
+
renderer: RendererContext;
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
export declare interface DataTableRendererQueryResult {
|
|
633
|
+
rows: DataTableRendererRow[];
|
|
634
|
+
columns?: DataTableRendererColumn[];
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
export declare type DataTableRendererResourceRef = ResourceRef;
|
|
638
|
+
|
|
639
|
+
export declare interface DataTableRendererRow {
|
|
640
|
+
id: string;
|
|
641
|
+
values: Record<string, JsonValue>;
|
|
642
|
+
resource?: DataTableRendererResourceRef;
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
export declare interface DataTableRendererRowAction<TParams extends Struct = Struct> {
|
|
646
|
+
id: string;
|
|
647
|
+
label: Localizable<string>;
|
|
648
|
+
icon?: string;
|
|
649
|
+
destructive?: boolean;
|
|
650
|
+
command: CommandRef<TParams, unknown>;
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
export declare type DataTableRendererRowActivationHandler = RendererCallback<{
|
|
654
|
+
row: DataTableRendererRow;
|
|
655
|
+
}, undefined | NavigationTarget>;
|
|
656
|
+
|
|
657
|
+
export declare interface DataTableRendererSelectionAction<TParams extends Struct = Struct> {
|
|
658
|
+
id: string;
|
|
659
|
+
label: Localizable<string>;
|
|
660
|
+
icon?: string;
|
|
661
|
+
destructive?: boolean;
|
|
662
|
+
command: CommandRef<TParams, unknown>;
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
export declare interface DataTableRendererThemeColor {
|
|
666
|
+
light: string;
|
|
667
|
+
dark: string;
|
|
668
|
+
foreground?: {
|
|
669
|
+
light: string;
|
|
670
|
+
dark: string;
|
|
671
|
+
};
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
export declare type DataTableViewBody = NativeViewBody<"dataTable", DataTableRendererContribution>;
|
|
675
|
+
|
|
676
|
+
export declare interface DateControl extends BaseControl {
|
|
677
|
+
type: "date";
|
|
678
|
+
defaultValue: string;
|
|
679
|
+
min?: string;
|
|
680
|
+
max?: string;
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
export declare const defineActivityItem: <Definition extends Omit<ActivityItemContribution, "ref">>(definition: Definition) => Definition & ContributionDefinition<"activity-item">;
|
|
684
|
+
|
|
685
|
+
export declare const defineArtifactMount: <Definition extends Omit<ArtifactMountContribution, "ref">>(definition: Definition) => Definition & ContributionDefinition<"artifact-mount">;
|
|
686
|
+
|
|
687
|
+
/**
|
|
688
|
+
* Define a single command outside an extension's object literal. Use this when commands
|
|
689
|
+
* grow large enough to split into separate files, or when you need to share a command
|
|
690
|
+
* shape across extensions. The `params` schema drives the inferred shape of the
|
|
691
|
+
* handler's second argument.
|
|
692
|
+
*
|
|
693
|
+
* @example
|
|
694
|
+
* export const sayHello = defineCommand({
|
|
695
|
+
* title: "Say hello",
|
|
696
|
+
* params: { name: params.text({ required: true }) },
|
|
697
|
+
* async run(ctx, commandParams) {
|
|
698
|
+
* commandParams.name; // string
|
|
699
|
+
* },
|
|
700
|
+
* });
|
|
701
|
+
*/
|
|
702
|
+
export declare function defineCommand<const TSchema extends ParamObjectSchema | undefined = undefined, TResult = unknown>(definition: CommandInput<TSchema, TResult>): CommandContribution<TSchema, TResult>;
|
|
703
|
+
|
|
704
|
+
export declare const defineCommandPaletteResource: <Definition extends Omit<CommandPaletteResourceContribution, "ref">>(definition: Definition) => Definition & ContributionDefinition<"command-palette-resource">;
|
|
705
|
+
|
|
706
|
+
export declare const defineConnection: <Definition extends Omit<ExtensionConnectionContribution, "ref">>(definition: Definition) => Definition & ContributionDefinition<"connection">;
|
|
707
|
+
|
|
708
|
+
/**
|
|
709
|
+
* Type an extension's contribution arrays. Package identity stays in package.json.
|
|
710
|
+
* Use the contribution helpers so every independently addressable item has a local
|
|
711
|
+
* id and typed ref before it reaches this boundary.
|
|
712
|
+
*/
|
|
713
|
+
export declare const defineExtension: <const TDefinition extends ExtensionDefinition>(extension: NoExtraFields_2<TDefinition, ExtensionDefinition>) => NoExtraFields_2<TDefinition, ExtensionDefinition>;
|
|
714
|
+
|
|
715
|
+
export declare const defineExtensionView: <TProps = unknown>(definition: {
|
|
716
|
+
render: ExtensionViewRender<TProps>;
|
|
717
|
+
}) => ExtensionViewModule<TProps>;
|
|
718
|
+
|
|
719
|
+
export declare const defineFileIconTheme: <Definition extends Omit<FileIconThemeContribution, "ref">>(definition: Definition) => Definition & ContributionDefinition<"file-icon-theme">;
|
|
720
|
+
|
|
721
|
+
export declare const defineHarness: <Definition extends Omit<HarnessProvider, "ref">>(definition: Definition) => Definition & ContributionDefinition<"harness">;
|
|
722
|
+
|
|
723
|
+
/**
|
|
724
|
+
* Define a hook for an event.
|
|
725
|
+
*/
|
|
726
|
+
export declare const defineHook: <TPayload extends Struct = Struct>(definition: Omit<HookDefinition<TPayload>, "ref">) => HookDefinition<TPayload>;
|
|
727
|
+
|
|
728
|
+
export declare const defineKeybinding: <Definition extends Omit<KeybindingContribution, "ref">>(definition: Definition) => Definition & ContributionDefinition<"keybinding">;
|
|
729
|
+
|
|
730
|
+
/**
|
|
731
|
+
* Define middleware for a command.
|
|
732
|
+
*/
|
|
733
|
+
export declare const defineMiddleware: <TParams extends Struct = Struct, TResult = unknown>(definition: Omit<MiddlewareDefinition<TParams, TResult>, "ref">) => MiddlewareDefinition<TParams, TResult>;
|
|
734
|
+
|
|
735
|
+
export declare const defineMode: <const Definition extends ModeDefinition>(definition: NoExtraFields<Definition, ModeDefinition>) => Definition & ContributionDefinition<"mode">;
|
|
736
|
+
|
|
737
|
+
export declare const defineNavigationItem: <const Definition extends NavigationItemDefinition>(definition: NoExtraFields<Definition, NavigationItemDefinition>) => Definition & ContributionDefinition<"navigation-item">;
|
|
738
|
+
|
|
739
|
+
export declare const defineNavigationTree: <const Definition extends NavigationTreeDefinition>(definition: NoExtraFields<Definition, NavigationTreeDefinition>) => Definition & ContributionDefinition<"navigation-tree">;
|
|
740
|
+
|
|
741
|
+
export declare const definePage: <const Definition extends PageDefinition>(definition: NoExtraFields<Definition, PageDefinition> & RequiredPageParent<Definition> & RequiredPageResource<Definition>) => Definition & ContributionDefinition<"page"> & {
|
|
742
|
+
readonly panels: PagePanelRefs<Definition["slots"]>;
|
|
743
|
+
};
|
|
744
|
+
|
|
745
|
+
export declare const definePlacement: <const Definition extends PlacementDefinition>(definition: NoExtraFields<Definition, PlacementDefinition>) => Definition & ContributionDefinition<"placement">;
|
|
746
|
+
|
|
747
|
+
export declare const defineResourceHierarchyProvider: (definition: Omit<ResourceHierarchyProvider, "ref">) => {
|
|
748
|
+
ref: {
|
|
749
|
+
kind: "resource-hierarchy-provider";
|
|
750
|
+
id: string;
|
|
751
|
+
};
|
|
752
|
+
id: string;
|
|
753
|
+
resourceKind: ResourceKindRef;
|
|
754
|
+
parent: (ctx: ExtensionContextBase, resource: ResourceRef) => MaybePromise<ResourceRef | ViewHierarchyParent | null>;
|
|
755
|
+
};
|
|
756
|
+
|
|
757
|
+
export declare const defineResourceKind: <const Definition extends ResourceKindDefinitionInput>(definition: NoExtraFields<Definition, ResourceKindDefinitionInput>) => Definition & ContributionDefinition<"resource-kind">;
|
|
758
|
+
|
|
759
|
+
export declare const defineSchedule: <Definition extends Omit<ScheduleContribution, "ref">>(definition: Definition) => Definition & ContributionDefinition<"schedule">;
|
|
760
|
+
|
|
761
|
+
export declare const defineSettingsPanel: <Definition extends Omit<SettingsPanelContribution, "ref">>(definition: Definition) => Definition & ContributionDefinition<"settings-panel">;
|
|
762
|
+
|
|
763
|
+
export declare const defineSettingsSection: <Definition extends Omit<SettingsSectionContribution, "ref">>(definition: Definition) => Definition & ContributionDefinition<"settings-section">;
|
|
764
|
+
|
|
765
|
+
export declare const defineSkill: <Definition extends Omit<SkillContribution, "ref">>(definition: Definition) => Definition & ContributionDefinition<"skill">;
|
|
766
|
+
|
|
767
|
+
/**
|
|
768
|
+
* Define a host-owned UI slot that extension contributions can target.
|
|
769
|
+
*/
|
|
770
|
+
export declare const defineSlot: <TContext extends Struct = Struct, TKind extends UiSlotKind = UiSlotKind>(id: string, options: SlotOptions<TKind>) => SlotRef<TContext, TKind>;
|
|
771
|
+
|
|
772
|
+
export declare const defineStatusBarItem: <Definition extends Omit<StatusBarItemContribution, "ref">>(definition: Definition) => Definition & ContributionDefinition<"status-bar-item">;
|
|
773
|
+
|
|
774
|
+
export declare const defineStatuses: <Definition extends Omit<StatusContribution, "ref">>(definition: Definition) => Definition & ContributionDefinition<"status">;
|
|
775
|
+
|
|
776
|
+
export declare const defineTemplate: <Definition extends Omit<TemplateContribution, "ref">>(definition: Definition) => Definition & ContributionDefinition<"template">;
|
|
777
|
+
|
|
778
|
+
export declare const defineTemplateType: <Definition extends Omit<TemplateTypeContribution, "ref">>(definition: Definition) => Definition & ContributionDefinition<"template-type">;
|
|
779
|
+
|
|
780
|
+
export declare const defineTheme: <Definition extends Omit<ThemeContribution, "ref">>(definition: Definition) => Definition & ContributionDefinition<"theme">;
|
|
781
|
+
|
|
782
|
+
export declare const defineView: <const Definition extends ViewDefinition>(definition: NoExtraFields<Definition, ViewDefinition>) => Definition & ContributionDefinition<"view">;
|
|
783
|
+
|
|
784
|
+
export declare const defineViewMenu: <const Definition extends ViewMenuDefinition>(definition: NoExtraFields<Definition, ViewMenuDefinition>) => Definition & ContributionDefinition<"view-menu">;
|
|
785
|
+
|
|
786
|
+
export declare const defineWorkspaceType: <Definition extends Omit<WorkspaceTypeProvider, "ref">>(definition: Definition) => Definition & ContributionDefinition<"workspace-type">;
|
|
787
|
+
|
|
788
|
+
export declare type DockedWorkbenchRegion = (typeof dockedWorkbenchRegions)[number];
|
|
789
|
+
|
|
790
|
+
export declare const dockedWorkbenchRegions: readonly ["sidenav", "main", "secondary", "side"];
|
|
791
|
+
|
|
792
|
+
export declare type ErrorPart = {
|
|
793
|
+
type: "error";
|
|
794
|
+
errorType: "timeout" | "crash" | "permission" | "other";
|
|
795
|
+
message?: string;
|
|
796
|
+
};
|
|
797
|
+
|
|
798
|
+
export declare interface EventContext extends ExtensionContextBase {
|
|
799
|
+
eventId: string;
|
|
800
|
+
deliveryId: string;
|
|
801
|
+
}
|
|
802
|
+
|
|
803
|
+
export declare interface EventDeliveryResult {
|
|
804
|
+
delivered: number;
|
|
805
|
+
diagnostics?: CommandDiagnostic[];
|
|
806
|
+
}
|
|
807
|
+
|
|
808
|
+
export declare interface EventRef<TPayload extends Struct = Struct> {
|
|
809
|
+
readonly extensionId?: string;
|
|
810
|
+
readonly kind: "event";
|
|
811
|
+
readonly id: string;
|
|
812
|
+
payload?: TPayload;
|
|
813
|
+
}
|
|
814
|
+
|
|
815
|
+
/** Build a typed event reference from separate ownership and local identity. */
|
|
816
|
+
export declare const eventRef: <TPayload extends Struct = Struct>(input: ExternalRefInput) => EventRef<TPayload>;
|
|
817
|
+
|
|
818
|
+
declare type ExactOptions<Definition, Contract> = unknown extends Contract ? Definition : [Contract] extends [Definition] ? Definition : Contract extends unknown ? Definition extends Contract ? Contract extends EventRef ? Definition : Definition extends (...args: never[]) => unknown ? Definition : Definition extends readonly unknown[] ? Contract extends readonly (infer Item)[] ? {
|
|
819
|
+
[Index in keyof Definition]: ExactOptions<Definition[Index], Item>;
|
|
820
|
+
} : never : Definition extends object ? {
|
|
821
|
+
[Key in keyof Definition]: Key extends keyof Contract ? ExactOptions<Definition[Key], Contract[Key]> : never;
|
|
822
|
+
} : Definition : never : never;
|
|
823
|
+
|
|
824
|
+
/** Current host extension API version. `engines.pstdio` in package.json is a semver range checked against this. */
|
|
825
|
+
export declare const EXTENSION_API_VERSION = "1.0.0-alpha.10";
|
|
826
|
+
|
|
827
|
+
export declare interface ExtensionActivityApi {
|
|
828
|
+
record(input: {
|
|
829
|
+
message: string;
|
|
830
|
+
target?: ResourceRef;
|
|
831
|
+
related?: ResourceRef[];
|
|
832
|
+
metadata?: JsonObject;
|
|
833
|
+
}): Promise<{
|
|
834
|
+
id: string;
|
|
835
|
+
}>;
|
|
836
|
+
}
|
|
837
|
+
|
|
838
|
+
export declare interface ExtensionArtifactApi {
|
|
839
|
+
mount(key: string): ArtifactMount;
|
|
840
|
+
}
|
|
841
|
+
|
|
842
|
+
export declare interface ExtensionBlobInput {
|
|
843
|
+
name: string;
|
|
844
|
+
data: Uint8Array | ArrayBuffer;
|
|
845
|
+
mimeType?: string | null;
|
|
846
|
+
}
|
|
847
|
+
|
|
848
|
+
export declare interface ExtensionBlobRef {
|
|
849
|
+
id: string;
|
|
850
|
+
name: string;
|
|
851
|
+
mimeType: string | null;
|
|
852
|
+
size: number;
|
|
853
|
+
hash: string | null;
|
|
854
|
+
url: string;
|
|
855
|
+
createdAt: string;
|
|
856
|
+
updatedAt: string;
|
|
857
|
+
}
|
|
858
|
+
|
|
859
|
+
export declare interface ExtensionBlobsApi {
|
|
860
|
+
put(input: ExtensionBlobInput): Promise<ExtensionBlobRef>;
|
|
861
|
+
get(id: string): Promise<ExtensionBlobRef | undefined>;
|
|
862
|
+
getBytes(id: string): Promise<Uint8Array>;
|
|
863
|
+
list(): Promise<ExtensionBlobRef[]>;
|
|
864
|
+
delete(id: string): Promise<void>;
|
|
865
|
+
urlFor(id: string): string;
|
|
866
|
+
}
|
|
867
|
+
|
|
868
|
+
export declare interface ExtensionConnectionContribution extends ContributionDefinition<"connection"> {
|
|
869
|
+
label: Localizable<string>;
|
|
870
|
+
transport: "http";
|
|
871
|
+
auth: {
|
|
872
|
+
type: "bearer";
|
|
873
|
+
} | {
|
|
874
|
+
type: "header";
|
|
875
|
+
headerName: string;
|
|
876
|
+
};
|
|
877
|
+
allowedMethods: readonly ("GET" | "POST" | "PUT" | "PATCH" | "DELETE")[];
|
|
878
|
+
allowedPathPrefixes: readonly string[];
|
|
879
|
+
check?: {
|
|
880
|
+
method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
|
|
881
|
+
path: string;
|
|
882
|
+
};
|
|
883
|
+
supportsStreaming?: boolean;
|
|
884
|
+
}
|
|
885
|
+
|
|
886
|
+
export declare type ExtensionConnectionMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
|
|
887
|
+
|
|
888
|
+
export declare interface ExtensionConnectionRequest {
|
|
889
|
+
method: ExtensionConnectionMethod;
|
|
890
|
+
path: string;
|
|
891
|
+
headers?: Record<string, string>;
|
|
892
|
+
body?: JsonValue;
|
|
893
|
+
timeoutMs?: number;
|
|
894
|
+
signal?: AbortSignal;
|
|
895
|
+
}
|
|
896
|
+
|
|
897
|
+
export declare interface ExtensionConnectionResponse<TBody = JsonValue> {
|
|
898
|
+
status: number;
|
|
899
|
+
headers: Record<string, string>;
|
|
900
|
+
body: TBody;
|
|
901
|
+
}
|
|
902
|
+
|
|
903
|
+
export declare interface ExtensionConnectionsApi {
|
|
904
|
+
request<TBody = JsonValue>(connectionId: string, input: ExtensionConnectionRequest): Promise<ExtensionConnectionResponse<TBody>>;
|
|
905
|
+
stream(connectionId: string, input: ExtensionConnectionRequest): AsyncIterable<ExtensionConnectionStreamEvent>;
|
|
906
|
+
}
|
|
907
|
+
|
|
908
|
+
export declare type ExtensionConnectionStreamEvent = {
|
|
909
|
+
type: "response";
|
|
910
|
+
status: number;
|
|
911
|
+
headers: Record<string, string>;
|
|
912
|
+
} | {
|
|
913
|
+
type: "data";
|
|
914
|
+
data: Uint8Array;
|
|
915
|
+
} | {
|
|
916
|
+
type: "end";
|
|
917
|
+
};
|
|
918
|
+
|
|
919
|
+
export declare interface ExtensionContextBase<TSettings extends Record<string, unknown> = Record<string, unknown>> {
|
|
920
|
+
projectId: string;
|
|
921
|
+
/** Host workspace id when the command runs from inside a worktree-backed workspace. */
|
|
922
|
+
workspaceId?: string;
|
|
923
|
+
project: ExtensionProjectContext;
|
|
924
|
+
extensionId: string;
|
|
925
|
+
/** Extension package name. Used for grouping/prefixing user-facing references. */
|
|
926
|
+
name: string;
|
|
927
|
+
repo?: RepoContext;
|
|
928
|
+
source?: CommandSource;
|
|
929
|
+
storage: ExtensionStorageApi;
|
|
930
|
+
artifacts: ExtensionArtifactApi;
|
|
931
|
+
/** Working tree of the invocation's repo, scoped to its root. Absent for non-repo (event/hook) invocations. */
|
|
932
|
+
repoFiles?: ArtifactMount;
|
|
933
|
+
/** Files of the workspace this context targets, scoped to its working dir. */
|
|
934
|
+
workspaceFiles?: WorkspaceFilesMount;
|
|
935
|
+
/** Read-only files packaged with the installed extension, scoped to its package root. */
|
|
936
|
+
packageFiles: ExtensionPackageFilesApi;
|
|
937
|
+
/** Repo directory allocated to this extension. Present wherever repoFiles is present. */
|
|
938
|
+
extensionFiles?: ArtifactMount;
|
|
939
|
+
files: ExtensionFilesApi;
|
|
940
|
+
/** Project skill catalog. Present where the host wires it (command/event contexts). */
|
|
941
|
+
skills?: ExtensionSkillsApi;
|
|
942
|
+
sessions: ExtensionSessionsApi;
|
|
943
|
+
workspaces: ExtensionWorkspacesApi;
|
|
944
|
+
repos: ExtensionReposApi;
|
|
945
|
+
commands: CommandHelpersApi;
|
|
946
|
+
events: ExtensionEventsApi;
|
|
947
|
+
activity: ExtensionActivityApi;
|
|
948
|
+
notify: ExtensionNotifyApi;
|
|
949
|
+
process: ExtensionProcessApi;
|
|
950
|
+
/** Interactive PTY sessions. Present only where the host wires a terminal supervisor (e.g. the workbench panel). */
|
|
951
|
+
terminal?: ExtensionTerminalApi;
|
|
952
|
+
net: ExtensionNetApi;
|
|
953
|
+
connections: ExtensionConnectionsApi;
|
|
954
|
+
logger: ExtensionLoggerApi;
|
|
955
|
+
settings: ExtensionSettingsApi<TSettings>;
|
|
956
|
+
}
|
|
957
|
+
|
|
958
|
+
/**
|
|
959
|
+
* The full shape of an extension's contributions module. Identity (id, name, version,
|
|
960
|
+
* description, etc.) lives in `package.json`; `defineExtension` only accepts
|
|
961
|
+
* contribution surfaces.
|
|
962
|
+
*/
|
|
963
|
+
export declare interface ExtensionDefinition extends UiContributions, BehaviourContributions, AssetContributions, ProviderContributions {
|
|
964
|
+
settings?: ExtensionSettingsContribution;
|
|
965
|
+
}
|
|
966
|
+
|
|
967
|
+
export declare interface ExtensionEventsApi {
|
|
968
|
+
emit<TPayload extends Struct>(event: EventRef<TPayload> | string, payload: TPayload): Promise<EventDeliveryResult>;
|
|
969
|
+
}
|
|
970
|
+
|
|
971
|
+
export declare interface ExtensionFilesApi {
|
|
972
|
+
readText(fileId: string): Promise<string>;
|
|
973
|
+
writeText(fileId: string, value: string): Promise<void>;
|
|
974
|
+
createText(input: {
|
|
975
|
+
name: string;
|
|
976
|
+
content: string;
|
|
977
|
+
metadata?: JsonObject;
|
|
978
|
+
}): Promise<{
|
|
979
|
+
id: string;
|
|
980
|
+
}>;
|
|
981
|
+
delete(fileId: string): Promise<void>;
|
|
982
|
+
}
|
|
983
|
+
|
|
984
|
+
export declare interface ExtensionHarnessInput {
|
|
985
|
+
harnessId: string;
|
|
986
|
+
model?: string;
|
|
987
|
+
}
|
|
988
|
+
|
|
989
|
+
export declare type ExtensionLoadScope = "user" | "repo";
|
|
990
|
+
|
|
991
|
+
export declare interface ExtensionLoggerApi {
|
|
992
|
+
info(message: string, metadata?: JsonObject): void;
|
|
993
|
+
warn(message: string, metadata?: JsonObject): void;
|
|
994
|
+
error(message: string, metadata?: JsonObject): void;
|
|
995
|
+
}
|
|
996
|
+
|
|
997
|
+
export declare interface ExtensionNetApi {
|
|
998
|
+
findFreePort(input?: {
|
|
999
|
+
host?: string;
|
|
1000
|
+
}): Promise<number>;
|
|
1001
|
+
}
|
|
1002
|
+
|
|
1003
|
+
export declare interface ExtensionNotifyApi {
|
|
1004
|
+
toast(notice: CommandNotice): Promise<void>;
|
|
1005
|
+
action(input: Omit<CreateNotificationInput, "projectId">): Promise<Notification_2>;
|
|
1006
|
+
resolve(input: {
|
|
1007
|
+
id?: string;
|
|
1008
|
+
dedupeKey?: string;
|
|
1009
|
+
status?: Extract<NotificationStatus, "done" | "dismissed" | "expired">;
|
|
1010
|
+
}): Promise<Notification_2[]>;
|
|
1011
|
+
dismiss(input: {
|
|
1012
|
+
id?: string;
|
|
1013
|
+
dedupeKey?: string;
|
|
1014
|
+
}): Promise<Notification_2[]>;
|
|
1015
|
+
}
|
|
1016
|
+
|
|
1017
|
+
declare interface ExtensionOwner {
|
|
1018
|
+
publisher: string;
|
|
1019
|
+
name: string;
|
|
1020
|
+
}
|
|
1021
|
+
|
|
1022
|
+
export declare type ExtensionPackageFilesApi = Pick<ArtifactMount, "exists" | "readText" | "readBytes" | "list" | "listDirs">;
|
|
1023
|
+
|
|
1024
|
+
export declare type ExtensionPanelRegion = (typeof extensionPanelRegions)[number];
|
|
1025
|
+
|
|
1026
|
+
export declare const extensionPanelRegions: readonly ["main", "secondary", "side"];
|
|
1027
|
+
|
|
1028
|
+
export declare interface ExtensionProcessApi {
|
|
1029
|
+
run(input: ProcessRunInput): Promise<ProcessRunResult>;
|
|
1030
|
+
runOrThrow(input: ProcessRunInput): Promise<ProcessRunResult>;
|
|
1031
|
+
spawnDetached(input: {
|
|
1032
|
+
command: string[];
|
|
1033
|
+
cwd?: string;
|
|
1034
|
+
env?: Record<string, string>;
|
|
1035
|
+
}): Promise<{
|
|
1036
|
+
pid?: number;
|
|
1037
|
+
}>;
|
|
1038
|
+
}
|
|
1039
|
+
|
|
1040
|
+
export declare interface ExtensionProjectContext {
|
|
1041
|
+
id: string;
|
|
1042
|
+
name: string;
|
|
1043
|
+
shorthand: string;
|
|
1044
|
+
}
|
|
1045
|
+
|
|
1046
|
+
export declare interface ExtensionReposApi {
|
|
1047
|
+
list(): Promise<RepoContext[]>;
|
|
1048
|
+
get(repoId: string): Promise<RepoContext>;
|
|
1049
|
+
getDefault(): Promise<RepoContext | undefined>;
|
|
1050
|
+
resolvePath(repoId: string, relativePath: string, options?: {
|
|
1051
|
+
basePath?: string;
|
|
1052
|
+
}): Promise<string>;
|
|
1053
|
+
}
|
|
1054
|
+
|
|
1055
|
+
export declare interface ExtensionSessionResource {
|
|
1056
|
+
type: "session";
|
|
1057
|
+
id: string;
|
|
1058
|
+
title: string;
|
|
1059
|
+
status: SessionStatus;
|
|
1060
|
+
}
|
|
1061
|
+
|
|
1062
|
+
export declare interface ExtensionSessionsApi {
|
|
1063
|
+
get(id: string): Promise<{
|
|
1064
|
+
id: string;
|
|
1065
|
+
title: string;
|
|
1066
|
+
status?: string;
|
|
1067
|
+
original_session_id?: string | null;
|
|
1068
|
+
cwd?: string | null;
|
|
1069
|
+
updated_at?: string | null;
|
|
1070
|
+
anchors_json?: ResourceAnchor[];
|
|
1071
|
+
} | null>;
|
|
1072
|
+
list(): Promise<Array<{
|
|
1073
|
+
id: string;
|
|
1074
|
+
title: string;
|
|
1075
|
+
status: SessionStatus;
|
|
1076
|
+
last_request_started?: string | null;
|
|
1077
|
+
last_request_ended?: string | null;
|
|
1078
|
+
updated_at?: string | null;
|
|
1079
|
+
anchors_json?: ResourceAnchor[];
|
|
1080
|
+
}>>;
|
|
1081
|
+
/** Sessions linked to a workspace (via the workspace-session join), oldest first. */
|
|
1082
|
+
listByWorkspace(workspaceId: string): Promise<Array<{
|
|
1083
|
+
id: string;
|
|
1084
|
+
title: string;
|
|
1085
|
+
status: SessionStatus;
|
|
1086
|
+
created_at?: string | null;
|
|
1087
|
+
updated_at?: string | null;
|
|
1088
|
+
anchors_json?: ResourceAnchor[];
|
|
1089
|
+
}>>;
|
|
1090
|
+
create(input: {
|
|
1091
|
+
title: string;
|
|
1092
|
+
prompt?: string;
|
|
1093
|
+
harness?: ExtensionHarnessInput;
|
|
1094
|
+
workspaceId?: string;
|
|
1095
|
+
repoId?: string;
|
|
1096
|
+
anchors?: ResourceAnchor[];
|
|
1097
|
+
attachments?: SessionAttachmentRef[];
|
|
1098
|
+
originalSessionId?: string;
|
|
1099
|
+
}): Promise<ExtensionSessionResource>;
|
|
1100
|
+
followup(input: {
|
|
1101
|
+
sessionId: string;
|
|
1102
|
+
prompt?: string;
|
|
1103
|
+
attachments?: SessionAttachmentRef[];
|
|
1104
|
+
}): Promise<void>;
|
|
1105
|
+
addAnchors(sessionId: string, anchors: ResourceAnchor[]): Promise<void>;
|
|
1106
|
+
}
|
|
1107
|
+
|
|
1108
|
+
export declare type ExtensionSettingProperty<TType extends ExtensionSettingValueType = ExtensionSettingValueType> = {
|
|
1109
|
+
[TSettingType in TType]: {
|
|
1110
|
+
type: TSettingType;
|
|
1111
|
+
scope: ExtensionSettingScope;
|
|
1112
|
+
default?: ExtensionSettingValueForType<TSettingType>;
|
|
1113
|
+
enum?: ExtensionSettingValueForType<TSettingType>[];
|
|
1114
|
+
title?: Localizable<string>;
|
|
1115
|
+
description?: Localizable<string>;
|
|
1116
|
+
};
|
|
1117
|
+
}[TType];
|
|
1118
|
+
|
|
1119
|
+
export declare interface ExtensionSettingsApi<TSettings extends Record<string, unknown> = Record<string, unknown>> {
|
|
1120
|
+
all(): Promise<Partial<TSettings>>;
|
|
1121
|
+
get<TKey extends keyof TSettings & string>(key: TKey): Promise<TSettings[TKey] | undefined>;
|
|
1122
|
+
set<TKey extends keyof TSettings & string>(key: TKey, value: TSettings[TKey]): Promise<void>;
|
|
1123
|
+
delete<TKey extends keyof TSettings & string>(key: TKey): Promise<void>;
|
|
1124
|
+
}
|
|
1125
|
+
|
|
1126
|
+
export declare interface ExtensionSettingsContribution<TProperties extends Record<string, ExtensionSettingProperty> = Record<string, ExtensionSettingProperty>> {
|
|
1127
|
+
properties: TProperties;
|
|
1128
|
+
}
|
|
1129
|
+
|
|
1130
|
+
export declare type ExtensionSettingScope = "global" | "project";
|
|
1131
|
+
|
|
1132
|
+
export declare type ExtensionSettingValueForType<TType extends ExtensionSettingValueType> = TType extends "boolean" ? boolean : TType extends "number" ? number : TType extends "string" ? string : TType extends "array" ? JsonValue[] : JsonObject;
|
|
1133
|
+
|
|
1134
|
+
export declare type ExtensionSettingValueType = "boolean" | "number" | "string" | "array" | "object";
|
|
1135
|
+
|
|
1136
|
+
export declare interface ExtensionSkillsApi {
|
|
1137
|
+
/** The project's resolved skill catalog (DB skills + extension-contributed skills, deduped). */
|
|
1138
|
+
list(): Promise<Skill[]>;
|
|
1139
|
+
}
|
|
1140
|
+
|
|
1141
|
+
export declare type ExtensionSourceKind = "local_path" | "git" | "registry";
|
|
1142
|
+
|
|
1143
|
+
export declare interface ExtensionStorageApi {
|
|
1144
|
+
scope(scope: StorageScope): ExtensionStorageApi;
|
|
1145
|
+
files: ExtensionBlobsApi;
|
|
1146
|
+
get<T = unknown>(key: string): Promise<T | undefined>;
|
|
1147
|
+
set<T = unknown>(key: string, value: T): Promise<void>;
|
|
1148
|
+
delete(key: string): Promise<void>;
|
|
1149
|
+
collection<TItem = unknown>(name: string): ExtensionStorageCollectionApi<TItem>;
|
|
1150
|
+
}
|
|
1151
|
+
|
|
1152
|
+
export declare interface ExtensionStorageCollectionApi<TItem = unknown> {
|
|
1153
|
+
get(id: string): Promise<TItem | undefined>;
|
|
1154
|
+
list(): Promise<TItem[]>;
|
|
1155
|
+
put(id: string, value: TItem): Promise<void>;
|
|
1156
|
+
createIfAbsent(id: string, value: TItem): Promise<boolean>;
|
|
1157
|
+
deleteIfValue(id: string, value: TItem): Promise<boolean>;
|
|
1158
|
+
create(value: TItem): Promise<TItem & {
|
|
1159
|
+
id: string;
|
|
1160
|
+
}>;
|
|
1161
|
+
delete(id: string): Promise<void>;
|
|
1162
|
+
attachments(itemId: string): ExtensionBlobsApi;
|
|
1163
|
+
}
|
|
1164
|
+
|
|
1165
|
+
/** Opens long-lived, interactive PTY sessions. Complements {@link ExtensionProcessApi}'s run-to-completion model. */
|
|
1166
|
+
export declare interface ExtensionTerminalApi {
|
|
1167
|
+
openSession(request: TerminalSessionRequest): TerminalSessionHandle;
|
|
1168
|
+
}
|
|
1169
|
+
|
|
1170
|
+
export declare type ExtensionViewModule<TProps = unknown> = {
|
|
1171
|
+
mount: (mount: HTMLElement, host: GuestHost, propsStore: PropsStore<TProps>) => Promise<() => void> | (() => void) | void;
|
|
1172
|
+
};
|
|
1173
|
+
|
|
1174
|
+
export declare type ExtensionViewRender<TProps = unknown> = (context: ExtensionViewRenderContext<TProps>) => void | (() => void) | Promise<void | (() => void)>;
|
|
1175
|
+
|
|
1176
|
+
export declare type ExtensionViewRenderContext<TProps = unknown> = {
|
|
1177
|
+
mount: HTMLElement;
|
|
1178
|
+
host: GuestHost;
|
|
1179
|
+
files: WebviewFilesClient;
|
|
1180
|
+
propsStore: PropsStore<TProps>;
|
|
1181
|
+
locale: string;
|
|
1182
|
+
t: (key: string, defaultValue?: string, args?: Record<string, unknown>) => string;
|
|
1183
|
+
};
|
|
1184
|
+
|
|
1185
|
+
export declare interface ExtensionWorkspace {
|
|
1186
|
+
id: string;
|
|
1187
|
+
name?: string;
|
|
1188
|
+
project_id?: string;
|
|
1189
|
+
workspace_shorthand?: string;
|
|
1190
|
+
branch?: string | null;
|
|
1191
|
+
worktree_path?: string | null;
|
|
1192
|
+
provider_id?: string;
|
|
1193
|
+
provider_state?: WorkspaceProviderState;
|
|
1194
|
+
execution_kind?: "local" | "remote";
|
|
1195
|
+
display_path?: string | null;
|
|
1196
|
+
provider_capabilities_json?: WorkspaceCapabilities;
|
|
1197
|
+
anchors_json?: ResourceAnchor[];
|
|
1198
|
+
initializing?: boolean;
|
|
1199
|
+
created_at?: string;
|
|
1200
|
+
updated_at?: string;
|
|
1201
|
+
}
|
|
1202
|
+
|
|
1203
|
+
export declare interface ExtensionWorkspacesApi {
|
|
1204
|
+
list(): Promise<ExtensionWorkspace[]>;
|
|
1205
|
+
get(id: string): Promise<ExtensionWorkspace | null>;
|
|
1206
|
+
getByShorthand(shorthand: string): Promise<ExtensionWorkspace | null>;
|
|
1207
|
+
create(input: CreateExtensionWorkspaceInput): Promise<ExtensionWorkspace>;
|
|
1208
|
+
resolve(id: string): Promise<WorkspaceProviderResult>;
|
|
1209
|
+
cancel(id: string): Promise<ExtensionWorkspace>;
|
|
1210
|
+
archive(id: string): Promise<ExtensionWorkspace>;
|
|
1211
|
+
removeWorktree(id: string): Promise<{
|
|
1212
|
+
removed: boolean;
|
|
1213
|
+
}>;
|
|
1214
|
+
delete(id: string): Promise<void>;
|
|
1215
|
+
}
|
|
1216
|
+
|
|
1217
|
+
declare interface ExternalRefInput {
|
|
1218
|
+
extensionId: string;
|
|
1219
|
+
id: string;
|
|
1220
|
+
}
|
|
1221
|
+
|
|
1222
|
+
export declare interface FileIconThemeContribution extends ContributionDefinition<"file-icon-theme"> {
|
|
1223
|
+
title: Localizable<string>;
|
|
1224
|
+
source: PackageAssetDescriptor;
|
|
1225
|
+
format: "vscode-file-icon-theme";
|
|
1226
|
+
description?: Localizable<string>;
|
|
1227
|
+
}
|
|
1228
|
+
|
|
1229
|
+
export declare type FilePart = {
|
|
1230
|
+
type: "file";
|
|
1231
|
+
fileId?: string;
|
|
1232
|
+
mediaType?: string;
|
|
1233
|
+
filename?: string;
|
|
1234
|
+
size?: number;
|
|
1235
|
+
url: string;
|
|
1236
|
+
};
|
|
1237
|
+
|
|
1238
|
+
export declare interface FileRendererContribution extends RendererContributionBase {
|
|
1239
|
+
load: RendererCallback<FileRendererLoadParams, FileRendererLoadResult>;
|
|
1240
|
+
save?: RendererCallback<FileRendererSaveParams, unknown>;
|
|
1241
|
+
}
|
|
1242
|
+
|
|
1243
|
+
export declare interface FileRendererLoadParams {
|
|
1244
|
+
renderer: RendererContext;
|
|
1245
|
+
}
|
|
1246
|
+
|
|
1247
|
+
export declare interface FileRendererLoadResult {
|
|
1248
|
+
fileName?: string;
|
|
1249
|
+
mimeType?: string;
|
|
1250
|
+
content?: string;
|
|
1251
|
+
dataUrl?: string;
|
|
1252
|
+
placeholder?: string;
|
|
1253
|
+
/** Override contribution-level save support for one loaded file. */
|
|
1254
|
+
editable?: boolean;
|
|
1255
|
+
/** Request Monaco for text that automatic dispatch would open as markdown. */
|
|
1256
|
+
textRenderer?: "automatic" | "monaco";
|
|
1257
|
+
/** Represent a deliberate no-file selection without an editable blank document. */
|
|
1258
|
+
emptyState?: {
|
|
1259
|
+
title: string;
|
|
1260
|
+
description?: string;
|
|
1261
|
+
};
|
|
1262
|
+
}
|
|
1263
|
+
|
|
1264
|
+
export declare type FileRendererResourceRef = ResourceRef;
|
|
1265
|
+
|
|
1266
|
+
export declare interface FileRendererSaveParams {
|
|
1267
|
+
renderer: RendererContext;
|
|
1268
|
+
content: string;
|
|
1269
|
+
}
|
|
1270
|
+
|
|
1271
|
+
export declare interface FileRendererSectionAnchor {
|
|
1272
|
+
/** Stable extension-owned tree node id. */
|
|
1273
|
+
id: string;
|
|
1274
|
+
/** Plain heading text as it appears in the Markdown document. */
|
|
1275
|
+
heading: string;
|
|
1276
|
+
/** Zero-based occurrence when the document repeats the same heading text. */
|
|
1277
|
+
occurrence?: number;
|
|
1278
|
+
}
|
|
1279
|
+
|
|
1280
|
+
export declare interface FileRendererSectionTarget {
|
|
1281
|
+
/** The document outline used for deep-linking and active-heading sync. */
|
|
1282
|
+
anchors: FileRendererSectionAnchor[];
|
|
1283
|
+
}
|
|
1284
|
+
|
|
1285
|
+
export declare type FilesParam<TRequired extends boolean | undefined = boolean | undefined> = ParamBase<string[], TRequired> & {
|
|
1286
|
+
type: "files";
|
|
1287
|
+
multiple?: boolean;
|
|
1288
|
+
/** Passed through to the picker, e.g. "image/*". */
|
|
1289
|
+
accept?: string;
|
|
1290
|
+
};
|
|
1291
|
+
|
|
1292
|
+
export declare type FileViewBody = NativeViewBody<"file", FileRendererContribution>;
|
|
1293
|
+
|
|
1294
|
+
export declare const gitEvents: {
|
|
1295
|
+
committed: EventRef<CommitPayload>;
|
|
1296
|
+
rebased: EventRef<RebasePayload>;
|
|
1297
|
+
merged: EventRef<MergePayload>;
|
|
1298
|
+
conflicted: EventRef<ConflictPayload>;
|
|
1299
|
+
};
|
|
1300
|
+
|
|
1301
|
+
export declare interface GuestHost {
|
|
1302
|
+
call<Capability extends WebviewHostCapability, const Params extends WebviewHostCapabilityParams[Capability] = WebviewHostCapabilityParams[Capability]>(method: Capability, ...args: {} extends WebviewHostCapabilityParams[Capability] ? [params?: Params] : [params: Params]): Promise<WebviewHostCapabilityResult<Capability, Params>>;
|
|
1303
|
+
onEvent(scope: string, handler: (payload: unknown) => void): () => void;
|
|
1304
|
+
/** The extension that owns this webview. */
|
|
1305
|
+
extensionId?: string;
|
|
1306
|
+
}
|
|
1307
|
+
|
|
1308
|
+
export declare type HarnessApprovalChannel = {
|
|
1309
|
+
requestApproval(request: ApprovalRequest): Promise<ApprovalResponse>;
|
|
1310
|
+
};
|
|
1311
|
+
|
|
1312
|
+
export declare type HarnessAttachment = {
|
|
1313
|
+
fileId: string;
|
|
1314
|
+
fileName: string;
|
|
1315
|
+
mimeType: string | null;
|
|
1316
|
+
sizeBytes: number;
|
|
1317
|
+
localPath: string;
|
|
1318
|
+
url: string;
|
|
1319
|
+
};
|
|
1320
|
+
|
|
1321
|
+
/**
|
|
1322
|
+
* Host context a harness runs against. A structural subset of ExtensionContextBase,
|
|
1323
|
+
* so richer host APIs can be passed without a contract change.
|
|
1324
|
+
*/
|
|
1325
|
+
export declare interface HarnessContext {
|
|
1326
|
+
/** Present when the harness runs on behalf of a project session. */
|
|
1327
|
+
projectId?: string;
|
|
1328
|
+
extensionId: string;
|
|
1329
|
+
/** Extension package name. */
|
|
1330
|
+
name: string;
|
|
1331
|
+
process: ExtensionProcessApi;
|
|
1332
|
+
net: ExtensionNetApi;
|
|
1333
|
+
connections: ExtensionConnectionsApi;
|
|
1334
|
+
logger: ExtensionLoggerApi;
|
|
1335
|
+
state: HarnessStateApi;
|
|
1336
|
+
}
|
|
1337
|
+
|
|
1338
|
+
export declare interface HarnessDetectionResult {
|
|
1339
|
+
available: boolean;
|
|
1340
|
+
version?: string;
|
|
1341
|
+
reason?: string;
|
|
1342
|
+
}
|
|
1343
|
+
|
|
1344
|
+
export declare type HarnessEventSink = {
|
|
1345
|
+
push(patch: JsonPatch): void;
|
|
1346
|
+
};
|
|
1347
|
+
|
|
1348
|
+
export declare type HarnessExit = {
|
|
1349
|
+
status: HarnessExitStatus;
|
|
1350
|
+
};
|
|
1351
|
+
|
|
1352
|
+
export declare type HarnessExitStatus = "completed" | "failed" | "cancelled" | "disconnected";
|
|
1353
|
+
|
|
1354
|
+
export declare type HarnessMessagesInput = {
|
|
1355
|
+
agentSessionId: string;
|
|
1356
|
+
cwd?: string;
|
|
1357
|
+
workspace?: HarnessWorkspaceContext;
|
|
1358
|
+
};
|
|
1359
|
+
|
|
1360
|
+
export declare type HarnessParam<TRequired extends boolean | undefined = boolean | undefined> = ParamBase<{
|
|
1361
|
+
harnessId: string;
|
|
1362
|
+
model?: string;
|
|
1363
|
+
params?: Record<string, string | boolean>;
|
|
1364
|
+
}, TRequired> & {
|
|
1365
|
+
type: "harness";
|
|
1366
|
+
};
|
|
1367
|
+
|
|
1368
|
+
export declare type HarnessParamDescriptor = SelectParam | BooleanParam;
|
|
1369
|
+
|
|
1370
|
+
export declare type HarnessParams = Record<string, HarnessParamValue>;
|
|
1371
|
+
|
|
1372
|
+
export declare type HarnessParamsSchema = Record<string, HarnessParamDescriptor>;
|
|
1373
|
+
|
|
1374
|
+
export declare type HarnessParamValue = string | boolean;
|
|
1375
|
+
|
|
1376
|
+
/**
|
|
1377
|
+
* An agent harness contributed by an extension. The host injects the event sink
|
|
1378
|
+
* (and approval channel) and owns the session lifecycle: timeouts, persistence,
|
|
1379
|
+
* and status transitions are keyed off the returned HarnessSession.
|
|
1380
|
+
*/
|
|
1381
|
+
export declare interface HarnessProvider extends ContributionDefinition<"harness"> {
|
|
1382
|
+
label: Localizable<string>;
|
|
1383
|
+
/** Declares skill directories so the host installs project skills for this agent. Absent = no skill setup. */
|
|
1384
|
+
skills?: HarnessSkillsLayout;
|
|
1385
|
+
/** Discrete run params the host can render, persist as defaults, validate, and pass to start/resume. */
|
|
1386
|
+
params?: HarnessParamsSchema;
|
|
1387
|
+
/** Defaults to required. Optional harnesses can run against remote workspace execution targets. */
|
|
1388
|
+
cwdRequirement?: "required" | "optional";
|
|
1389
|
+
capabilities(ctx: HarnessContext): MaybePromise<AgentCapability[]>;
|
|
1390
|
+
detect?(ctx: HarnessContext): MaybePromise<HarnessDetectionResult>;
|
|
1391
|
+
listModels?(ctx: HarnessContext): MaybePromise<AgentModel[]>;
|
|
1392
|
+
start(ctx: HarnessContext, input: HarnessStartInput): MaybePromise<HarnessSession>;
|
|
1393
|
+
resume(ctx: HarnessContext, input: HarnessResumeInput): MaybePromise<HarnessSession>;
|
|
1394
|
+
/** Re-bind after a host restart. Throw a `RetryableHarnessReattachError` only when another attempt may succeed. */
|
|
1395
|
+
reattach?(ctx: HarnessContext, input: HarnessReattachInput): MaybePromise<HarnessSession>;
|
|
1396
|
+
getMessages?(ctx: HarnessContext, input: HarnessMessagesInput): MaybePromise<SessionMessage[]>;
|
|
1397
|
+
}
|
|
1398
|
+
|
|
1399
|
+
export declare type HarnessReattachInput = {
|
|
1400
|
+
sessionId: string;
|
|
1401
|
+
agentSessionId: string;
|
|
1402
|
+
cwd?: string;
|
|
1403
|
+
workspace?: HarnessWorkspaceContext;
|
|
1404
|
+
events: HarnessEventSink;
|
|
1405
|
+
/** Aborted when the host stops orphan recovery, including during shutdown. */
|
|
1406
|
+
signal?: AbortSignal;
|
|
1407
|
+
};
|
|
1408
|
+
|
|
1409
|
+
export declare type HarnessResumeInput = HarnessStartInput & {
|
|
1410
|
+
agentSessionId: string;
|
|
1411
|
+
/** Index offset so resumed streams align message patches with existing history. */
|
|
1412
|
+
messageOffset?: number;
|
|
1413
|
+
questionResponse?: QuestionResponse;
|
|
1414
|
+
approvals?: HarnessApprovalChannel;
|
|
1415
|
+
};
|
|
1416
|
+
|
|
1417
|
+
export declare type HarnessSession = {
|
|
1418
|
+
/** Provider-side session id, used to resume/reattach later. */
|
|
1419
|
+
agentSessionId?: string;
|
|
1420
|
+
/** Settles exactly once; the host keys status transitions and persistence off it. */
|
|
1421
|
+
done: Promise<HarnessExit>;
|
|
1422
|
+
/** Called by the host on cancel or on its own activity timeout. */
|
|
1423
|
+
stop(): void | Promise<void>;
|
|
1424
|
+
timeoutStrategy?: TimeoutStrategy;
|
|
1425
|
+
/** Observability only. */
|
|
1426
|
+
pid?: number;
|
|
1427
|
+
};
|
|
1428
|
+
|
|
1429
|
+
/** Where the harness's agent discovers skills. Paths are relative to the repo (dir) and home (globalDir). */
|
|
1430
|
+
export declare interface HarnessSkillsLayout {
|
|
1431
|
+
dir: string;
|
|
1432
|
+
/** Defaults to `dir` when omitted. */
|
|
1433
|
+
globalDir?: string;
|
|
1434
|
+
}
|
|
1435
|
+
|
|
1436
|
+
export declare type HarnessStartInput = {
|
|
1437
|
+
prompt: string;
|
|
1438
|
+
/** Host session id (correlation / env injection). */
|
|
1439
|
+
sessionId: string;
|
|
1440
|
+
cwd?: string;
|
|
1441
|
+
workspace?: HarnessWorkspaceContext;
|
|
1442
|
+
model?: string | null;
|
|
1443
|
+
params?: HarnessParams;
|
|
1444
|
+
attachments?: HarnessAttachment[];
|
|
1445
|
+
events: HarnessEventSink;
|
|
1446
|
+
/** Aborted when the host cancels the request that started or resumed this session. */
|
|
1447
|
+
signal?: AbortSignal;
|
|
1448
|
+
};
|
|
1449
|
+
|
|
1450
|
+
export declare interface HarnessStateApi {
|
|
1451
|
+
get<T = unknown>(key: string): Promise<T | undefined>;
|
|
1452
|
+
set<T = unknown>(key: string, value: T): Promise<void>;
|
|
1453
|
+
delete(key: string): Promise<void>;
|
|
1454
|
+
}
|
|
1455
|
+
|
|
1456
|
+
declare type HarnessWorkspaceContext = {
|
|
1457
|
+
workspaceId: string;
|
|
1458
|
+
executionTarget: WorkspaceExecutionTarget;
|
|
1459
|
+
};
|
|
1460
|
+
|
|
1461
|
+
/**
|
|
1462
|
+
* A handler for an event.
|
|
1463
|
+
*/
|
|
1464
|
+
export declare interface HookDefinition<TPayload extends Struct = Struct> extends ContributionDefinition<"hook"> {
|
|
1465
|
+
event: EventRef<TPayload>;
|
|
1466
|
+
run(ctx: EventContext, payload: TPayload): MaybePromise<void>;
|
|
1467
|
+
}
|
|
1468
|
+
|
|
1469
|
+
export declare const isLocalizedString: (value: unknown) => value is LocalizedString;
|
|
1470
|
+
|
|
1471
|
+
export declare const isValidLocalContributionId: (id: string) => boolean;
|
|
1472
|
+
|
|
1473
|
+
export declare type JsonObject = {
|
|
1474
|
+
[key: string]: JsonValue;
|
|
1475
|
+
};
|
|
1476
|
+
|
|
1477
|
+
export declare type JsonParam<T = unknown, TRequired extends boolean | undefined = boolean | undefined> = ParamBase<T, TRequired> & {
|
|
1478
|
+
type: "json";
|
|
1479
|
+
};
|
|
1480
|
+
|
|
1481
|
+
export declare type JsonPatch = {
|
|
1482
|
+
op: "add" | "replace" | "remove";
|
|
1483
|
+
path: string;
|
|
1484
|
+
value?: unknown;
|
|
1485
|
+
};
|
|
1486
|
+
|
|
1487
|
+
export declare type JsonPrimitive = string | number | boolean | null;
|
|
1488
|
+
|
|
1489
|
+
export declare type JsonValue = JsonPrimitive | JsonValue[] | JsonObject;
|
|
1490
|
+
|
|
1491
|
+
export declare interface KanbanRendererAttributeDescriptor {
|
|
1492
|
+
id: string;
|
|
1493
|
+
label: Localizable<string>;
|
|
1494
|
+
type: KanbanRendererAttributeType;
|
|
1495
|
+
filterable?: boolean;
|
|
1496
|
+
groupable?: boolean;
|
|
1497
|
+
sortable?: boolean;
|
|
1498
|
+
displayable?: boolean;
|
|
1499
|
+
editable?: boolean;
|
|
1500
|
+
display?: KanbanRendererAttributeDisplay;
|
|
1501
|
+
}
|
|
1502
|
+
|
|
1503
|
+
export declare type KanbanRendererAttributeDisplay = {
|
|
1504
|
+
kind: "badge-list";
|
|
1505
|
+
itemsAttributeId: string;
|
|
1506
|
+
};
|
|
1507
|
+
|
|
1508
|
+
export declare type KanbanRendererAttributeType = {
|
|
1509
|
+
kind: "enum";
|
|
1510
|
+
options: KanbanRendererEnumOption[];
|
|
1511
|
+
} | {
|
|
1512
|
+
kind: "enum-multi";
|
|
1513
|
+
options: KanbanRendererEnumOption[];
|
|
1514
|
+
} | {
|
|
1515
|
+
kind: "status";
|
|
1516
|
+
statuses: StatusRef;
|
|
1517
|
+
} | {
|
|
1518
|
+
kind: "string";
|
|
1519
|
+
} | {
|
|
1520
|
+
kind: "date";
|
|
1521
|
+
} | {
|
|
1522
|
+
kind: "number";
|
|
1523
|
+
} | {
|
|
1524
|
+
kind: "user";
|
|
1525
|
+
};
|
|
1526
|
+
|
|
1527
|
+
export declare interface KanbanRendererBoardColumnConfig {
|
|
1528
|
+
color?: string;
|
|
1529
|
+
canDragIn?: boolean;
|
|
1530
|
+
canDragOut?: boolean;
|
|
1531
|
+
canCreate?: boolean;
|
|
1532
|
+
actions?: KanbanRendererColumnAction[];
|
|
1533
|
+
}
|
|
1534
|
+
|
|
1535
|
+
export declare interface KanbanRendererColumnAction {
|
|
1536
|
+
id: string;
|
|
1537
|
+
label: Localizable<string>;
|
|
1538
|
+
icon?: string;
|
|
1539
|
+
}
|
|
1540
|
+
|
|
1541
|
+
export declare interface KanbanRendererContribution extends RendererContributionBase {
|
|
1542
|
+
attributes?: KanbanRendererAttributeDescriptor[];
|
|
1543
|
+
query: RendererCallback<KanbanRendererQueryParams, KanbanRendererQueryResult>;
|
|
1544
|
+
onAttributeChange?: RendererCallback<{
|
|
1545
|
+
rowId: string;
|
|
1546
|
+
attributeId: string;
|
|
1547
|
+
value: unknown;
|
|
1548
|
+
}, unknown>;
|
|
1549
|
+
onReorder?: RendererCallback<{
|
|
1550
|
+
rowId: string;
|
|
1551
|
+
beforeRowId?: string;
|
|
1552
|
+
}, unknown>;
|
|
1553
|
+
onColumnAction?: RendererCallback<{
|
|
1554
|
+
columnId: string;
|
|
1555
|
+
actionId: string;
|
|
1556
|
+
}, unknown>;
|
|
1557
|
+
createRow?: KanbanRendererCreateRowContribution;
|
|
1558
|
+
rowActions?: KanbanRendererRowAction[];
|
|
1559
|
+
onRowActivate?: KanbanRendererRowActivationHandler;
|
|
1560
|
+
defaultSettings?: Partial<KanbanRendererSettings>;
|
|
1561
|
+
defaultFilters?: KanbanRendererFilterState;
|
|
1562
|
+
defaultViews?: KanbanRendererSavedView[];
|
|
1563
|
+
defaultActiveViewId?: string;
|
|
1564
|
+
hideToolbar?: boolean;
|
|
1565
|
+
}
|
|
1566
|
+
|
|
1567
|
+
export declare interface KanbanRendererCreateRowContribution<TParams extends ParamObjectSchema = ParamObjectSchema> {
|
|
1568
|
+
command: CommandRef<Struct, unknown>;
|
|
1569
|
+
title?: Localizable<string>;
|
|
1570
|
+
submitLabel?: Localizable<string>;
|
|
1571
|
+
columnParam?: string;
|
|
1572
|
+
params?: TParams;
|
|
1573
|
+
attributesParam?: string;
|
|
1574
|
+
attachments?: {
|
|
1575
|
+
command: CommandRef<Struct, unknown>;
|
|
1576
|
+
resourceParam: string;
|
|
1577
|
+
fileParam: string;
|
|
1578
|
+
};
|
|
1579
|
+
labels?: {
|
|
1580
|
+
cancel?: Localizable<string>;
|
|
1581
|
+
properties?: Localizable<string>;
|
|
1582
|
+
submitError?: Localizable<string>;
|
|
1583
|
+
removeFile?: Localizable<string>;
|
|
1584
|
+
};
|
|
1585
|
+
}
|
|
1586
|
+
|
|
1587
|
+
export declare interface KanbanRendererEnumOption {
|
|
1588
|
+
value: string;
|
|
1589
|
+
label: Localizable<string>;
|
|
1590
|
+
color?: string;
|
|
1591
|
+
icon?: string | null;
|
|
1592
|
+
}
|
|
1593
|
+
|
|
1594
|
+
export declare type KanbanRendererFilterState = Record<string, string[]>;
|
|
1595
|
+
|
|
1596
|
+
export declare interface KanbanRendererQueryParams {
|
|
1597
|
+
renderer: RendererContext;
|
|
1598
|
+
settings: KanbanRendererSettings;
|
|
1599
|
+
filters: KanbanRendererFilterState;
|
|
1600
|
+
}
|
|
1601
|
+
|
|
1602
|
+
export declare interface KanbanRendererQueryResult {
|
|
1603
|
+
rows: KanbanRendererRow[];
|
|
1604
|
+
attributes?: KanbanRendererAttributeDescriptor[];
|
|
1605
|
+
boardColumnConfigs?: Record<string, KanbanRendererBoardColumnConfig>;
|
|
1606
|
+
}
|
|
1607
|
+
|
|
1608
|
+
export declare type KanbanRendererResourceRef = ResourceRef;
|
|
1609
|
+
|
|
1610
|
+
export declare interface KanbanRendererRow {
|
|
1611
|
+
id: string;
|
|
1612
|
+
title: string;
|
|
1613
|
+
resource?: KanbanRendererResourceRef;
|
|
1614
|
+
attributes: Record<string, unknown>;
|
|
1615
|
+
}
|
|
1616
|
+
|
|
1617
|
+
export declare interface KanbanRendererRowAction<TParams extends Struct = Struct> {
|
|
1618
|
+
id: string;
|
|
1619
|
+
label: Localizable<string>;
|
|
1620
|
+
icon?: string;
|
|
1621
|
+
command: CommandRef<TParams, unknown>;
|
|
1622
|
+
destructive?: boolean;
|
|
1623
|
+
}
|
|
1624
|
+
|
|
1625
|
+
export declare type KanbanRendererRowActivationHandler = RendererCallback<{
|
|
1626
|
+
row: KanbanRendererRow;
|
|
1627
|
+
}, undefined | NavigationTarget>;
|
|
1628
|
+
|
|
1629
|
+
export declare interface KanbanRendererSavedView {
|
|
1630
|
+
id: string;
|
|
1631
|
+
title: Localizable<string>;
|
|
1632
|
+
settings: KanbanRendererSettings;
|
|
1633
|
+
filters: KanbanRendererFilterState;
|
|
1634
|
+
isDefault?: boolean;
|
|
1635
|
+
}
|
|
1636
|
+
|
|
1637
|
+
export declare interface KanbanRendererSettings {
|
|
1638
|
+
viewMode: KanbanRendererViewMode;
|
|
1639
|
+
columnGrouping: string;
|
|
1640
|
+
rowGrouping: string;
|
|
1641
|
+
ordering: {
|
|
1642
|
+
attributeId: string;
|
|
1643
|
+
direction: KanbanRendererSortDirection;
|
|
1644
|
+
};
|
|
1645
|
+
displayProperties: string[];
|
|
1646
|
+
}
|
|
1647
|
+
|
|
1648
|
+
export declare type KanbanRendererSortDirection = "asc" | "desc";
|
|
1649
|
+
|
|
1650
|
+
export declare type KanbanRendererViewMode = "board" | "list";
|
|
1651
|
+
|
|
1652
|
+
export declare type KanbanViewBody = NativeViewBody<"kanban", KanbanRendererContribution>;
|
|
1653
|
+
|
|
1654
|
+
/**
|
|
1655
|
+
* Chord string in TanStack Hotkeys syntax (e.g. "mod+shift+p"). `mod` is
|
|
1656
|
+
* Cmd on macOS and Ctrl elsewhere. Parsing, validation, canonicalization,
|
|
1657
|
+
* and display labels are all delegated to `@tanstack/hotkeys`.
|
|
1658
|
+
*/
|
|
1659
|
+
export declare type KeybindingChord = string;
|
|
1660
|
+
|
|
1661
|
+
export declare interface KeybindingContribution extends ContributionDefinition<"keybinding"> {
|
|
1662
|
+
/** Default chord. Used on every platform unless an override is provided. */
|
|
1663
|
+
key: KeybindingChord;
|
|
1664
|
+
/** macOS override. */
|
|
1665
|
+
mac?: KeybindingChord;
|
|
1666
|
+
/** Linux override. */
|
|
1667
|
+
linux?: KeybindingChord;
|
|
1668
|
+
/** Windows override. */
|
|
1669
|
+
win?: KeybindingChord;
|
|
1670
|
+
/** Action this chord executes through the shared navigation executor. */
|
|
1671
|
+
action: NavigationTarget;
|
|
1672
|
+
/** Optional gating predicate. The host evaluates it at dispatch time. */
|
|
1673
|
+
when?: WhenExpression;
|
|
1674
|
+
}
|
|
1675
|
+
|
|
1676
|
+
export declare const l10n: (key: string, defaultValue?: string) => {
|
|
1677
|
+
default?: string | undefined;
|
|
1678
|
+
$l10n: string;
|
|
1679
|
+
};
|
|
1680
|
+
|
|
1681
|
+
export declare interface ListNotificationsQuery {
|
|
1682
|
+
status?: NotificationStatus | NotificationStatus[];
|
|
1683
|
+
priority?: NotificationPriority | NotificationPriority[];
|
|
1684
|
+
sourceExtensionId?: string;
|
|
1685
|
+
resourceType?: string;
|
|
1686
|
+
resourceId?: string;
|
|
1687
|
+
cursor?: string;
|
|
1688
|
+
limit?: number;
|
|
1689
|
+
}
|
|
1690
|
+
|
|
1691
|
+
export declare interface ListNotificationsResponse {
|
|
1692
|
+
items: Notification_2[];
|
|
1693
|
+
nextCursor?: string | null;
|
|
1694
|
+
}
|
|
1695
|
+
|
|
1696
|
+
export declare type ListParam<TRequired extends boolean | undefined = boolean | undefined> = ParamBase<string[], TRequired> & {
|
|
1697
|
+
type: "list";
|
|
1698
|
+
};
|
|
1699
|
+
|
|
1700
|
+
export declare type LoadingPart = {
|
|
1701
|
+
type: "loading";
|
|
1702
|
+
};
|
|
1703
|
+
|
|
1704
|
+
export declare const localContributionIdGrammar = "lowercase kebab-case segments separated by dots, such as \"ticket-status.create\"";
|
|
1705
|
+
|
|
1706
|
+
export declare const localContributionIdPattern: RegExp;
|
|
1707
|
+
|
|
1708
|
+
export declare interface LocalExtensionSource {
|
|
1709
|
+
name: string;
|
|
1710
|
+
path: string;
|
|
1711
|
+
origin?: string;
|
|
1712
|
+
installedAt: string;
|
|
1713
|
+
updatedAt: string;
|
|
1714
|
+
}
|
|
1715
|
+
|
|
1716
|
+
export declare type Localizable<T extends string = string> = T | LocalizedString;
|
|
1717
|
+
|
|
1718
|
+
export declare interface LocalizedString {
|
|
1719
|
+
readonly $l10n: string;
|
|
1720
|
+
readonly default?: string;
|
|
1721
|
+
}
|
|
1722
|
+
|
|
1723
|
+
export declare type LongTextParam<TRequired extends boolean | undefined = boolean | undefined> = ParamBase<string, TRequired> & {
|
|
1724
|
+
type: "longtext";
|
|
1725
|
+
};
|
|
1726
|
+
|
|
1727
|
+
export declare interface MarkdownControl extends BaseControl {
|
|
1728
|
+
type: "markdown";
|
|
1729
|
+
defaultValue: string;
|
|
1730
|
+
placeholder?: string;
|
|
1731
|
+
}
|
|
1732
|
+
|
|
1733
|
+
export declare type MarkdownParam<TRequired extends boolean | undefined = boolean | undefined> = ParamBase<string, TRequired> & {
|
|
1734
|
+
type: "markdown";
|
|
1735
|
+
placeholder?: Localizable<string>;
|
|
1736
|
+
};
|
|
1737
|
+
|
|
1738
|
+
/**
|
|
1739
|
+
* Resource-scoped visibility for command-palette contributions. Both the workbench host and the
|
|
1740
|
+
* dashboard palette gate the same way, so the rule lives here once instead of being re-derived per
|
|
1741
|
+
* surface. Only `resourceType` is evaluated: it is the sole `when` field a palette surface can
|
|
1742
|
+
* resolve from the active resource alone (`mode`/`source`/`metadata` require execution context the
|
|
1743
|
+
* palette does not have).
|
|
1744
|
+
*/
|
|
1745
|
+
export declare const matchesResourceWhen: (when: Pick<WhenExpression, "resourceType"> | {
|
|
1746
|
+
resourceType?: readonly string[];
|
|
1747
|
+
} | undefined, resourceType: string | undefined) => boolean;
|
|
1748
|
+
|
|
1749
|
+
export declare type MaybePromise<T> = T | Promise<T>;
|
|
1750
|
+
|
|
1751
|
+
export declare interface MenuContribution<TSlotContext extends Struct = Struct, TParams extends Struct = Struct> {
|
|
1752
|
+
slot: SlotRef<TSlotContext, "menu">;
|
|
1753
|
+
label?: Localizable<string>;
|
|
1754
|
+
group?: string;
|
|
1755
|
+
placement?: "first" | "default" | "last";
|
|
1756
|
+
icon?: string;
|
|
1757
|
+
when?: WhenExpression;
|
|
1758
|
+
params?: Partial<TParams>;
|
|
1759
|
+
presentation?: "menu-item" | "button" | "icon-button";
|
|
1760
|
+
}
|
|
1761
|
+
|
|
1762
|
+
export declare interface MergePayload extends CommitPayload {
|
|
1763
|
+
}
|
|
1764
|
+
|
|
1765
|
+
/**
|
|
1766
|
+
* Middleware that runs before a command.
|
|
1767
|
+
*/
|
|
1768
|
+
export declare interface MiddlewareDefinition<TParams extends Struct = Struct, TResult = unknown> extends ContributionDefinition<"middleware"> {
|
|
1769
|
+
command: CommandRef<TParams, TResult>;
|
|
1770
|
+
run: CommandMiddlewareHandler<TParams>;
|
|
1771
|
+
}
|
|
1772
|
+
|
|
1773
|
+
export declare type MigrationContext = ExtensionContextBase;
|
|
1774
|
+
|
|
1775
|
+
export declare interface ModeContribution extends ContributionDefinition<"mode"> {
|
|
1776
|
+
label: Localizable<string>;
|
|
1777
|
+
icon?: string;
|
|
1778
|
+
regions: readonly ExtensionPanelRegion[];
|
|
1779
|
+
/** Default theme for this mode. An explicit user choice for the mode takes precedence. */
|
|
1780
|
+
defaultTheme?: ThemeRef;
|
|
1781
|
+
/** Whether side panels may float while this mode is active. Defaults to visible. */
|
|
1782
|
+
floatingPanels?: "visible" | "hidden";
|
|
1783
|
+
/** Replace host chrome with a view, or hide it with false, while the mode is active. */
|
|
1784
|
+
chrome?: Partial<Record<"nav" | "sidenav" | "activity" | "status", ViewRef | false>>;
|
|
1785
|
+
/** Region-level layout policy. The mode owns it; placements cannot set it. */
|
|
1786
|
+
regionSettings?: Readonly<Partial<Record<DockedWorkbenchRegion, ModeRegionSettings>>>;
|
|
1787
|
+
}
|
|
1788
|
+
|
|
1789
|
+
declare type ModeDefinition = Omit<ModeContribution, "ref">;
|
|
1790
|
+
|
|
1791
|
+
export declare type ModeRef = ContributionRef<"mode">;
|
|
1792
|
+
|
|
1793
|
+
export declare interface ModeRegionSettings {
|
|
1794
|
+
/** Hide the panel header when the mode supplies its own controls. */
|
|
1795
|
+
readonly showHeader?: boolean;
|
|
1796
|
+
readonly size?: RegionSize;
|
|
1797
|
+
/** Allow dragging this region closed. Explicit hide/show is always available. */
|
|
1798
|
+
readonly collapsible?: boolean;
|
|
1799
|
+
/** Keep a tab visible when this region has only one visible item. */
|
|
1800
|
+
readonly alwaysShowTabs?: boolean;
|
|
1801
|
+
}
|
|
1802
|
+
|
|
1803
|
+
export declare type MultiSelectParam<TRequired extends boolean | undefined = boolean | undefined> = ParamBase<string[], TRequired> & {
|
|
1804
|
+
type: "multi-select";
|
|
1805
|
+
options: ParamOption[];
|
|
1806
|
+
};
|
|
1807
|
+
|
|
1808
|
+
declare type NativeViewBody<Kind extends string, Definition> = {
|
|
1809
|
+
readonly kind: Kind;
|
|
1810
|
+
} & Omit<Definition, "title" | "icon" | "resourceKind">;
|
|
1811
|
+
|
|
1812
|
+
export declare interface NavigationItemContribution extends ContributionDefinition<"navigation-item"> {
|
|
1813
|
+
readonly owner: NavigationOwnerRef;
|
|
1814
|
+
readonly slot?: NavigationTreeSlot;
|
|
1815
|
+
readonly label: Localizable<string>;
|
|
1816
|
+
readonly icon?: string;
|
|
1817
|
+
readonly group?: string;
|
|
1818
|
+
readonly when?: WhenExpression;
|
|
1819
|
+
readonly action: NavigationTarget;
|
|
1820
|
+
}
|
|
1821
|
+
|
|
1822
|
+
declare type NavigationItemDefinition = Omit<NavigationItemContribution, "ref">;
|
|
1823
|
+
|
|
1824
|
+
export declare type NavigationOwnerRef = ModeRef | PageRef;
|
|
1825
|
+
|
|
1826
|
+
export declare type NavigationTarget = NavigationTargetItem | NavigationTargetCompound;
|
|
1827
|
+
|
|
1828
|
+
export declare interface NavigationTargetCommand {
|
|
1829
|
+
kind: "command";
|
|
1830
|
+
target: CommandTarget<JsonObject>;
|
|
1831
|
+
}
|
|
1832
|
+
|
|
1833
|
+
export declare interface NavigationTargetCompound {
|
|
1834
|
+
kind: "compound";
|
|
1835
|
+
targets: readonly (NavigationTargetPage | NavigationTargetPanel)[];
|
|
1836
|
+
}
|
|
1837
|
+
|
|
1838
|
+
export declare interface NavigationTargetHref {
|
|
1839
|
+
kind: "href";
|
|
1840
|
+
href: string;
|
|
1841
|
+
}
|
|
1842
|
+
|
|
1843
|
+
export declare type NavigationTargetItem = NavigationTargetPage | NavigationTargetPanel | NavigationTargetCommand | NavigationTargetHref;
|
|
1844
|
+
|
|
1845
|
+
export declare interface NavigationTargetPage {
|
|
1846
|
+
kind: "page";
|
|
1847
|
+
page: PageRef;
|
|
1848
|
+
resource?: ResourceRef;
|
|
1849
|
+
section?: FileRendererSectionTarget;
|
|
1850
|
+
open?: PageOpenIntent;
|
|
1851
|
+
parent?: NavigationTargetPage;
|
|
1852
|
+
}
|
|
1853
|
+
|
|
1854
|
+
export declare interface NavigationTargetPanel {
|
|
1855
|
+
kind: "panel";
|
|
1856
|
+
panel: PanelRef;
|
|
1857
|
+
resource?: ResourceRef;
|
|
1858
|
+
open?: PageOpenIntent;
|
|
1859
|
+
}
|
|
1860
|
+
|
|
1861
|
+
export declare interface NavigationTreeContribution extends ContributionDefinition<"navigation-tree"> {
|
|
1862
|
+
readonly owner: NavigationOwnerRef;
|
|
1863
|
+
readonly slot?: NavigationTreeSlot;
|
|
1864
|
+
readonly view: ViewRef;
|
|
1865
|
+
}
|
|
1866
|
+
|
|
1867
|
+
declare type NavigationTreeDefinition = Omit<NavigationTreeContribution, "ref">;
|
|
1868
|
+
|
|
1869
|
+
export declare type NavigationTreeSlot = "header" | "content" | "footer";
|
|
1870
|
+
|
|
1871
|
+
declare type NoExtraFields<Definition, Contract> = Definition & ExactOptions<Definition, Contract>;
|
|
1872
|
+
|
|
1873
|
+
declare type NoExtraFields_2<Definition, Contract> = Definition & Record<Exclude<keyof Definition, keyof Contract>, never>;
|
|
1874
|
+
|
|
1875
|
+
declare interface Notification_2 {
|
|
1876
|
+
id: string;
|
|
1877
|
+
projectId: string;
|
|
1878
|
+
title: string;
|
|
1879
|
+
body?: string | null;
|
|
1880
|
+
kind: NotificationKind;
|
|
1881
|
+
status: NotificationStatus;
|
|
1882
|
+
priority: NotificationPriority;
|
|
1883
|
+
source: CommandSource;
|
|
1884
|
+
origin: NotificationOrigin;
|
|
1885
|
+
sourceExtensionId?: string | null;
|
|
1886
|
+
actorType?: NotificationActorType | null;
|
|
1887
|
+
actorId?: string | null;
|
|
1888
|
+
target?: ResourceRef | null;
|
|
1889
|
+
related: ResourceRef[];
|
|
1890
|
+
actions: NotificationAction[];
|
|
1891
|
+
dedupeKey?: string | null;
|
|
1892
|
+
metadata?: JsonObject | null;
|
|
1893
|
+
createdAt: string;
|
|
1894
|
+
updatedAt: string;
|
|
1895
|
+
readAt?: string | null;
|
|
1896
|
+
resolvedAt?: string | null;
|
|
1897
|
+
snoozedUntil?: string | null;
|
|
1898
|
+
expiresAt?: string | null;
|
|
1899
|
+
}
|
|
1900
|
+
export { Notification_2 as Notification }
|
|
1901
|
+
|
|
1902
|
+
export declare type NotificationAction = {
|
|
1903
|
+
id: string;
|
|
1904
|
+
label: string;
|
|
1905
|
+
kind: "navigate";
|
|
1906
|
+
target: NavigationTarget;
|
|
1907
|
+
primary?: boolean;
|
|
1908
|
+
} | {
|
|
1909
|
+
id: string;
|
|
1910
|
+
label: string;
|
|
1911
|
+
kind: "command";
|
|
1912
|
+
command: string;
|
|
1913
|
+
params?: JsonObject;
|
|
1914
|
+
primary?: boolean;
|
|
1915
|
+
destructive?: boolean;
|
|
1916
|
+
} | {
|
|
1917
|
+
id: string;
|
|
1918
|
+
label: string;
|
|
1919
|
+
kind: "url";
|
|
1920
|
+
href: string;
|
|
1921
|
+
primary?: boolean;
|
|
1922
|
+
};
|
|
1923
|
+
|
|
1924
|
+
export declare type NotificationActorType = "user" | "agent" | "system";
|
|
1925
|
+
|
|
1926
|
+
export declare type NotificationKind = "needs_review" | "ready_to_merge" | "blocked" | "approval_required" | "failed" | "info";
|
|
1927
|
+
|
|
1928
|
+
export declare type NotificationOrigin = "core" | "extension" | "agent";
|
|
1929
|
+
|
|
1930
|
+
export declare type NotificationPriority = "low" | "normal" | "high" | "urgent";
|
|
1931
|
+
|
|
1932
|
+
export declare type NotificationStatus = "open" | "read" | "snoozed" | "done" | "dismissed" | "expired";
|
|
1933
|
+
|
|
1934
|
+
export declare interface NumberControl extends BaseControl {
|
|
1935
|
+
type: "number";
|
|
1936
|
+
defaultValue: number;
|
|
1937
|
+
min?: number;
|
|
1938
|
+
max?: number;
|
|
1939
|
+
step?: number;
|
|
1940
|
+
}
|
|
1941
|
+
|
|
1942
|
+
export declare type NumberParam<TRequired extends boolean | undefined = boolean | undefined> = ParamBase<number, TRequired> & {
|
|
1943
|
+
type: "number";
|
|
1944
|
+
};
|
|
1945
|
+
|
|
1946
|
+
declare type OptionalParamKeys<TSchema extends ParamObjectSchema> = Exclude<keyof TSchema, RequiredParamKeys<TSchema>>;
|
|
1947
|
+
|
|
1948
|
+
/**
|
|
1949
|
+
* Reference an asset shipped alongside the extension's compiled output. `path` is
|
|
1950
|
+
* resolved relative to `baseUrl`; in practice authors always pass `import.meta.url`
|
|
1951
|
+
* so the runtime can locate the file no matter where the extension is installed.
|
|
1952
|
+
*
|
|
1953
|
+
* @example
|
|
1954
|
+
* webview: { entry: packageAsset("./src/page.tsx", import.meta.url) }
|
|
1955
|
+
*/
|
|
1956
|
+
export declare const packageAsset: (path: string, baseUrl: string) => PackageAssetDescriptor;
|
|
1957
|
+
|
|
1958
|
+
export declare interface PackageAssetDescriptor {
|
|
1959
|
+
kind: "package-asset";
|
|
1960
|
+
path: string;
|
|
1961
|
+
baseUrl: string;
|
|
1962
|
+
}
|
|
1963
|
+
|
|
1964
|
+
/** Validated panel of an extension's package.json identity fields. */
|
|
1965
|
+
export declare interface PackageManifest {
|
|
1966
|
+
/** Extension package name. Matches `^[a-z][a-z0-9-]*$`. */
|
|
1967
|
+
name: string;
|
|
1968
|
+
/** Package version (semver). */
|
|
1969
|
+
version: string;
|
|
1970
|
+
/** Optional human-friendly name. Falls back to `name`. */
|
|
1971
|
+
displayName?: string;
|
|
1972
|
+
/** Optional package description. */
|
|
1973
|
+
description?: string;
|
|
1974
|
+
/** Publisher segment of the extension id. Matches `^[a-z][a-z0-9-]*$`. */
|
|
1975
|
+
publisher: string;
|
|
1976
|
+
/** Relative path to the contributions entry module. */
|
|
1977
|
+
main: string;
|
|
1978
|
+
/** Semver range checked against the host extension API version. */
|
|
1979
|
+
enginesPstdio: string;
|
|
1980
|
+
/** Prompt Studio-specific package metadata. */
|
|
1981
|
+
pstdio?: {
|
|
1982
|
+
/** Install/load scope. Defaults to "user" when omitted. */
|
|
1983
|
+
scope?: ExtensionLoadScope;
|
|
1984
|
+
};
|
|
1985
|
+
/** Derived `${publisher}.${name}`. */
|
|
1986
|
+
id: string;
|
|
1987
|
+
}
|
|
1988
|
+
|
|
1989
|
+
export declare interface PageContribution extends ContributionDefinition<"page"> {
|
|
1990
|
+
readonly title: Localizable<string>;
|
|
1991
|
+
readonly icon?: string;
|
|
1992
|
+
readonly path: string;
|
|
1993
|
+
readonly mode: ModeRef;
|
|
1994
|
+
readonly parent?: PageRef;
|
|
1995
|
+
readonly resource?: ResourceConstraint;
|
|
1996
|
+
readonly main: PageMain;
|
|
1997
|
+
readonly slots: readonly PageSlot[];
|
|
1998
|
+
readonly panels: Readonly<Record<string, PageSlotRef>>;
|
|
1999
|
+
}
|
|
2000
|
+
|
|
2001
|
+
declare type PageDefinition = Omit<PageContribution, "ref" | "panels">;
|
|
2002
|
+
|
|
2003
|
+
export declare interface PageLocation {
|
|
2004
|
+
readonly page: PageRef;
|
|
2005
|
+
readonly resource?: ResourceRef;
|
|
2006
|
+
readonly section?: FileRendererSectionTarget;
|
|
2007
|
+
readonly parent?: PageLocation;
|
|
2008
|
+
}
|
|
2009
|
+
|
|
2010
|
+
export declare type PageMain = PageMainView | PageMainPanels;
|
|
2011
|
+
|
|
2012
|
+
export declare interface PageMainPanels {
|
|
2013
|
+
readonly kind: "panels";
|
|
2014
|
+
readonly empty: ViewRef;
|
|
2015
|
+
}
|
|
2016
|
+
|
|
2017
|
+
export declare interface PageMainView extends PlacementPresentation {
|
|
2018
|
+
readonly kind: "view";
|
|
2019
|
+
readonly view: ViewRef;
|
|
2020
|
+
readonly cardinality: PageSlotCardinality;
|
|
2021
|
+
}
|
|
2022
|
+
|
|
2023
|
+
export declare type PageOpenIntent = "preview" | "pin";
|
|
2024
|
+
|
|
2025
|
+
declare type PagePanelRefs<Slots extends readonly PageSlot[]> = {
|
|
2026
|
+
readonly [Id in Slots[number]["id"]]: PageSlotRef;
|
|
2027
|
+
};
|
|
2028
|
+
|
|
2029
|
+
export declare type PageRef = ContributionRef<"page">;
|
|
2030
|
+
|
|
2031
|
+
/** A page-owned panel. Main presentation and routed context belong to the page. */
|
|
2032
|
+
export declare interface PageSlot extends PlacementPresentation {
|
|
2033
|
+
readonly id: string;
|
|
2034
|
+
readonly region: PageSlotRegion;
|
|
2035
|
+
readonly order?: number;
|
|
2036
|
+
readonly item: PlacementItem;
|
|
2037
|
+
readonly openOn?: "page-resource";
|
|
2038
|
+
}
|
|
2039
|
+
|
|
2040
|
+
export declare type PageSlotCardinality = "one" | "many";
|
|
2041
|
+
|
|
2042
|
+
export declare interface PageSlotRef {
|
|
2043
|
+
readonly kind: "page-slot";
|
|
2044
|
+
readonly page: PageRef;
|
|
2045
|
+
readonly id: string;
|
|
2046
|
+
}
|
|
2047
|
+
|
|
2048
|
+
export declare type PageSlotRegion = ExtensionPanelRegion;
|
|
2049
|
+
|
|
2050
|
+
export declare type PageSlotRole = "primary" | "auxiliary";
|
|
2051
|
+
|
|
2052
|
+
export declare type PanelRef = PlacementRef | PageSlotRef;
|
|
2053
|
+
|
|
2054
|
+
declare type ParamBase<TValue, TRequired extends boolean | undefined = boolean | undefined> = {
|
|
2055
|
+
label?: Localizable<string>;
|
|
2056
|
+
description?: Localizable<string>;
|
|
2057
|
+
defaultValue?: TValue;
|
|
2058
|
+
metadata?: JsonObject;
|
|
2059
|
+
resolvedFrom?: "resource";
|
|
2060
|
+
} & ParamRequired<TRequired>;
|
|
2061
|
+
|
|
2062
|
+
export declare type ParamDescriptor<TValue = unknown, TRequired extends boolean | undefined = boolean | undefined> = TextParam<TRequired> | LongTextParam<TRequired> | MarkdownParam<TRequired> | NumberParam<TRequired> | BooleanParam<TRequired> | SelectParam<TRequired> | MultiSelectParam<TRequired> | FilesParam<TRequired> | RepoParam<TRequired> | HarnessParam<TRequired> | TemplateParam<TRequired> | ResourceParam<TRequired> | JsonParam<TValue, TRequired> | ListParam<TRequired>;
|
|
2063
|
+
|
|
2064
|
+
export declare type ParamEditorReadOnlyContent = string | number | boolean | null | Array<string | number | boolean | null> | {
|
|
2065
|
+
type: "image";
|
|
2066
|
+
src: string;
|
|
2067
|
+
alt: string;
|
|
2068
|
+
} | {
|
|
2069
|
+
type: "image-gallery";
|
|
2070
|
+
images: ParamEditorReadOnlyImage[];
|
|
2071
|
+
};
|
|
2072
|
+
|
|
2073
|
+
export declare interface ParamEditorReadOnlyImage {
|
|
2074
|
+
src: string;
|
|
2075
|
+
alt: string;
|
|
2076
|
+
}
|
|
2077
|
+
|
|
2078
|
+
export declare type ParamObjectSchema = Record<string, ParamDescriptor>;
|
|
2079
|
+
|
|
2080
|
+
declare type ParamOption = {
|
|
2081
|
+
label: string;
|
|
2082
|
+
value: string;
|
|
2083
|
+
icon?: string;
|
|
2084
|
+
};
|
|
2085
|
+
|
|
2086
|
+
declare type ParamOptions<TParam extends {
|
|
2087
|
+
type: string;
|
|
2088
|
+
}> = Omit<TParam, "type">;
|
|
2089
|
+
|
|
2090
|
+
declare type ParamRequired<TRequired extends boolean | undefined> = TRequired extends true ? {
|
|
2091
|
+
required: true;
|
|
2092
|
+
} : TRequired extends false ? {
|
|
2093
|
+
required: false;
|
|
2094
|
+
} : {
|
|
2095
|
+
required?: boolean;
|
|
2096
|
+
};
|
|
2097
|
+
|
|
2098
|
+
/**
|
|
2099
|
+
* Builders for typed parameter descriptors. Each builder produces a discriminated
|
|
2100
|
+
* `ParamDescriptor` so the runtime and editor only see fields valid for that type.
|
|
2101
|
+
*
|
|
2102
|
+
* @example
|
|
2103
|
+
* params: {
|
|
2104
|
+
* amount: params.number({ defaultValue: 1 }),
|
|
2105
|
+
* mode: params.select({ options: [{ label: "Fast", value: "fast" }] }),
|
|
2106
|
+
* }
|
|
2107
|
+
*/
|
|
2108
|
+
export declare const params: {
|
|
2109
|
+
text: <const TOptions extends ParamOptions<TextParam> | undefined = undefined>(options?: TOptions) => TextParam<RequiredOf<TOptions>>;
|
|
2110
|
+
longText: <const TOptions extends ParamOptions<LongTextParam> | undefined = undefined>(options?: TOptions) => LongTextParam<RequiredOf<TOptions>>;
|
|
2111
|
+
markdown: <const TOptions extends ParamOptions<MarkdownParam> | undefined = undefined>(options?: TOptions) => MarkdownParam<RequiredOf<TOptions>>;
|
|
2112
|
+
files: <const TOptions extends ParamOptions<FilesParam> | undefined = undefined>(options?: TOptions) => FilesParam<RequiredOf<TOptions>>;
|
|
2113
|
+
number: <const TOptions extends ParamOptions<NumberParam> | undefined = undefined>(options?: TOptions) => NumberParam<RequiredOf<TOptions>>;
|
|
2114
|
+
boolean: <const TOptions extends ParamOptions<BooleanParam> | undefined = undefined>(options?: TOptions) => BooleanParam<RequiredOf<TOptions>>;
|
|
2115
|
+
select: <const TOptions extends ParamOptions<SelectParam>>(options: TOptions) => SelectParam<RequiredOf<TOptions>>;
|
|
2116
|
+
multiSelect: <const TOptions extends ParamOptions<MultiSelectParam>>(options: TOptions) => MultiSelectParam<RequiredOf<TOptions>>;
|
|
2117
|
+
repo: <const TOptions extends ParamOptions<RepoParam> | undefined = undefined>(options?: TOptions) => RepoParam<RequiredOf<TOptions>>;
|
|
2118
|
+
harness: <const TOptions extends ParamOptions<HarnessParam> | undefined = undefined>(options?: TOptions) => HarnessParam<RequiredOf<TOptions>>;
|
|
2119
|
+
template: <const TOptions extends Omit<TemplateParam, "type" | "templateType"> & {
|
|
2120
|
+
type: string;
|
|
2121
|
+
}>(options: TOptions) => TemplateParam<RequiredOf<TOptions>>;
|
|
2122
|
+
resource: <const TOptions extends ParamOptions<ResourceParam>>(options: TOptions) => ResourceParam<RequiredOf<TOptions>>;
|
|
2123
|
+
json: <T = unknown, const TOptions extends ParamOptions<JsonParam<T>> | undefined = undefined>(options?: TOptions) => JsonParam<T, RequiredOf<TOptions>>;
|
|
2124
|
+
list: <const TOptions extends ParamOptions<ListParam> | undefined = undefined>(options?: TOptions) => ListParam<RequiredOf<TOptions>>;
|
|
2125
|
+
};
|
|
2126
|
+
|
|
2127
|
+
export declare type ParamsOf<TSchema extends ParamObjectSchema> = {
|
|
2128
|
+
[K in RequiredParamKeys<TSchema>]: ParamValue<TSchema[K]>;
|
|
2129
|
+
} & {
|
|
2130
|
+
[K in OptionalParamKeys<TSchema>]?: ParamValue<TSchema[K]>;
|
|
2131
|
+
};
|
|
2132
|
+
|
|
2133
|
+
export declare type ParamType = "text" | "longtext" | "markdown" | "number" | "boolean" | "select" | "multi-select" | "files" | "repo" | "harness" | "template" | "resource" | "json" | "list";
|
|
2134
|
+
|
|
2135
|
+
export declare type ParamValue<TDescriptor extends ParamDescriptor> = TDescriptor extends ParamDescriptor<infer V> ? V : never;
|
|
2136
|
+
|
|
2137
|
+
export declare type PatchPart = {
|
|
2138
|
+
type: "patch";
|
|
2139
|
+
hash?: string;
|
|
2140
|
+
files?: unknown;
|
|
2141
|
+
};
|
|
2142
|
+
|
|
2143
|
+
export declare interface PlacementContribution extends ContributionDefinition<"placement">, PlacementPresentation {
|
|
2144
|
+
readonly mode: ModeRef;
|
|
2145
|
+
readonly item: PlacementItem;
|
|
2146
|
+
readonly region: ExtensionPanelRegion;
|
|
2147
|
+
readonly order?: number;
|
|
2148
|
+
readonly movableTo?: readonly ExtensionPanelRegion[];
|
|
2149
|
+
}
|
|
2150
|
+
|
|
2151
|
+
declare type PlacementDefinition = Omit<PlacementContribution, "ref">;
|
|
2152
|
+
|
|
2153
|
+
export declare type PlacementIdentity = PlacementOwner & {
|
|
2154
|
+
readonly instanceKey: string;
|
|
2155
|
+
};
|
|
2156
|
+
|
|
2157
|
+
export declare type PlacementItem = {
|
|
2158
|
+
readonly kind: "view";
|
|
2159
|
+
readonly view: ViewRef;
|
|
2160
|
+
readonly presence: PlacementPresence;
|
|
2161
|
+
} | {
|
|
2162
|
+
readonly kind: "binding";
|
|
2163
|
+
readonly binding: ResourceBinding;
|
|
2164
|
+
};
|
|
2165
|
+
|
|
2166
|
+
export declare type PlacementMountStrategy = "active" | "keep-mounted";
|
|
2167
|
+
|
|
2168
|
+
export declare type PlacementOwner = {
|
|
2169
|
+
readonly kind: "shell";
|
|
2170
|
+
readonly placementId: string;
|
|
2171
|
+
} | {
|
|
2172
|
+
readonly kind: "mode";
|
|
2173
|
+
readonly modeId: string;
|
|
2174
|
+
readonly placementId: string;
|
|
2175
|
+
} | {
|
|
2176
|
+
readonly kind: "page";
|
|
2177
|
+
readonly pageId: string;
|
|
2178
|
+
readonly slotId: string;
|
|
2179
|
+
};
|
|
2180
|
+
|
|
2181
|
+
/**
|
|
2182
|
+
* Initial presence of a static placement inside its owner scope.
|
|
2183
|
+
* - "fixed": always open while the owner is active; the user cannot close it.
|
|
2184
|
+
* - "open": open when the owner has no saved state; the user may close it.
|
|
2185
|
+
* - "closed": closed until the user opens it (for example through the Add panel).
|
|
2186
|
+
* A saved user choice wins over "open" and "closed" on the next visit.
|
|
2187
|
+
*/
|
|
2188
|
+
export declare type PlacementPresence = "fixed" | "open" | "closed";
|
|
2189
|
+
|
|
2190
|
+
export declare interface PlacementPresentation {
|
|
2191
|
+
readonly mountStrategy?: PlacementMountStrategy;
|
|
2192
|
+
readonly hiddenByDefault?: boolean;
|
|
2193
|
+
readonly headerBorderBottom?: boolean;
|
|
2194
|
+
readonly tab?: PlacementTabPresentation;
|
|
2195
|
+
}
|
|
2196
|
+
|
|
2197
|
+
export declare type PlacementRef = ContributionRef<"placement">;
|
|
2198
|
+
|
|
2199
|
+
export declare interface PlacementTabMenuGroup {
|
|
2200
|
+
readonly id: string;
|
|
2201
|
+
readonly rows: readonly PlacementTabMenuRow[];
|
|
2202
|
+
}
|
|
2203
|
+
|
|
2204
|
+
export declare interface PlacementTabMenuRow {
|
|
2205
|
+
readonly id: string;
|
|
2206
|
+
readonly label: Localizable<string>;
|
|
2207
|
+
readonly icon?: string;
|
|
2208
|
+
readonly iconColor?: string;
|
|
2209
|
+
readonly selected?: boolean;
|
|
2210
|
+
readonly disabled?: boolean;
|
|
2211
|
+
readonly action?: NavigationTarget;
|
|
2212
|
+
}
|
|
2213
|
+
|
|
2214
|
+
export declare interface PlacementTabPresentation {
|
|
2215
|
+
readonly query: RendererCallback<JsonObject, PlacementTabSnapshot>;
|
|
2216
|
+
readonly refreshEvents?: readonly RendererEventReference[];
|
|
2217
|
+
}
|
|
2218
|
+
|
|
2219
|
+
export declare interface PlacementTabSnapshot extends Struct {
|
|
2220
|
+
readonly label?: Localizable<string>;
|
|
2221
|
+
readonly icon?: string;
|
|
2222
|
+
readonly indicator?: {
|
|
2223
|
+
readonly icon: string;
|
|
2224
|
+
readonly color?: string;
|
|
2225
|
+
readonly label?: Localizable<string>;
|
|
2226
|
+
};
|
|
2227
|
+
readonly menu?: readonly PlacementTabMenuGroup[];
|
|
2228
|
+
}
|
|
2229
|
+
|
|
2230
|
+
export declare interface ProcessRunInput {
|
|
2231
|
+
command: string[];
|
|
2232
|
+
cwd?: string;
|
|
2233
|
+
env?: Record<string, string>;
|
|
2234
|
+
timeoutMs?: number;
|
|
2235
|
+
}
|
|
2236
|
+
|
|
2237
|
+
export declare interface ProcessRunResult {
|
|
2238
|
+
exitCode: number;
|
|
2239
|
+
stdout: string;
|
|
2240
|
+
stderr: string;
|
|
2241
|
+
}
|
|
2242
|
+
|
|
2243
|
+
export declare const projectEvents: {
|
|
2244
|
+
opened: EventRef< {
|
|
2245
|
+
projectId: string;
|
|
2246
|
+
}>;
|
|
2247
|
+
};
|
|
2248
|
+
|
|
2249
|
+
export declare const projectSlots: {
|
|
2250
|
+
sidenav: SlotRef<object, "panel">;
|
|
2251
|
+
headerPrimary: SlotRef<object, "menu">;
|
|
2252
|
+
headerOverflow: SlotRef<object, "menu">;
|
|
2253
|
+
settingsPanels: SlotRef<object, "settings">;
|
|
2254
|
+
};
|
|
2255
|
+
|
|
2256
|
+
export declare type PropsStore<TProps = unknown> = {
|
|
2257
|
+
get: () => TProps;
|
|
2258
|
+
subscribe: (listener: (props: TProps) => void) => () => void;
|
|
2259
|
+
};
|
|
2260
|
+
|
|
2261
|
+
/** Provider contributions: harnesses, workspace types. */
|
|
2262
|
+
export declare interface ProviderContributions {
|
|
2263
|
+
connections?: readonly ExtensionConnectionContribution[];
|
|
2264
|
+
workspaceTypes?: readonly WorkspaceTypeProvider[];
|
|
2265
|
+
harnesses?: readonly HarnessProvider[];
|
|
2266
|
+
resourceHierarchyProviders?: readonly ResourceHierarchyProvider[];
|
|
2267
|
+
}
|
|
2268
|
+
|
|
2269
|
+
declare type QualifiableRef = ContributionRef<ContributionKind> | PageSlotRef;
|
|
2270
|
+
|
|
2271
|
+
export declare type QualifiedRef<Ref extends QualifiableRef> = Ref extends PageSlotRef ? Omit<Ref, "page"> & {
|
|
2272
|
+
readonly page: QualifiedRef<Ref["page"]>;
|
|
2273
|
+
} : Ref & {
|
|
2274
|
+
readonly extensionId: string;
|
|
2275
|
+
};
|
|
2276
|
+
|
|
2277
|
+
/** Publish a provider-owned reference without changing the local contribution definition. */
|
|
2278
|
+
export declare function qualifyRef<Ref extends QualifiableRef>(owner: string, ref: Ref): QualifiedRef<Ref>;
|
|
2279
|
+
|
|
2280
|
+
export declare type QuestionResponse = {
|
|
2281
|
+
answers: string[][];
|
|
2282
|
+
};
|
|
2283
|
+
|
|
2284
|
+
/** Two-handle numeric range control. Values normalize to ordered `[start, end]`. */
|
|
2285
|
+
export declare interface RangeControl extends BaseControl {
|
|
2286
|
+
type: "range";
|
|
2287
|
+
defaultValue: RangeValue;
|
|
2288
|
+
min: number;
|
|
2289
|
+
max: number;
|
|
2290
|
+
step?: number;
|
|
2291
|
+
unit?: string;
|
|
2292
|
+
markerCount?: number;
|
|
2293
|
+
}
|
|
2294
|
+
|
|
2295
|
+
export declare type RangeValue = [number, number];
|
|
2296
|
+
|
|
2297
|
+
/** Serializable display-only value rendered by the read-only Param Editor. */
|
|
2298
|
+
export declare interface ReadOnlyControl extends BaseControl {
|
|
2299
|
+
type: "readOnly";
|
|
2300
|
+
value: ParamEditorReadOnlyContent;
|
|
2301
|
+
}
|
|
2302
|
+
|
|
2303
|
+
export declare type ReasoningPart = {
|
|
2304
|
+
type: "reasoning";
|
|
2305
|
+
text: string;
|
|
2306
|
+
};
|
|
2307
|
+
|
|
2308
|
+
export declare interface RebasePayload {
|
|
2309
|
+
projectId: string;
|
|
2310
|
+
repoPath?: string;
|
|
2311
|
+
worktreePath?: string;
|
|
2312
|
+
branch?: string;
|
|
2313
|
+
workspace?: ExtensionWorkspace;
|
|
2314
|
+
anchors?: ResourceAnchor[];
|
|
2315
|
+
}
|
|
2316
|
+
|
|
2317
|
+
export declare interface RegionSize {
|
|
2318
|
+
readonly defaultPx?: number;
|
|
2319
|
+
readonly minPx?: number;
|
|
2320
|
+
readonly maxPx?: number;
|
|
2321
|
+
}
|
|
2322
|
+
|
|
2323
|
+
export declare type RendererCallback<TInput extends Struct = Struct, TResult = unknown, TSettings extends Record<string, unknown> = Record<string, unknown>> = (ctx: ExtensionContextBase<TSettings>, input: TInput & {
|
|
2324
|
+
renderer: RendererContext;
|
|
2325
|
+
}) => MaybePromise<TResult>;
|
|
2326
|
+
|
|
2327
|
+
export declare interface RendererContext {
|
|
2328
|
+
rendererId: string;
|
|
2329
|
+
projectId?: string;
|
|
2330
|
+
modeId?: string;
|
|
2331
|
+
resource?: ResourceRef;
|
|
2332
|
+
invocation?: RendererInvocationContext;
|
|
2333
|
+
}
|
|
2334
|
+
|
|
2335
|
+
export declare interface RendererContributionBase {
|
|
2336
|
+
title: Localizable<string>;
|
|
2337
|
+
icon?: string;
|
|
2338
|
+
resourceKind?: string;
|
|
2339
|
+
refreshEvents?: readonly RendererEventReference[];
|
|
2340
|
+
emptyTitle?: Localizable<string>;
|
|
2341
|
+
emptyDescription?: Localizable<string>;
|
|
2342
|
+
}
|
|
2343
|
+
|
|
2344
|
+
/** A raw cross-extension id must be namespaced. Local events use an EventRef. */
|
|
2345
|
+
export declare type RendererEventReference = EventRef | `${string}.${string}`;
|
|
2346
|
+
|
|
2347
|
+
export declare interface RendererInvocationContext {
|
|
2348
|
+
placement: "visible" | "background";
|
|
2349
|
+
}
|
|
2350
|
+
|
|
2351
|
+
export declare interface RepoContext {
|
|
2352
|
+
projectId: string;
|
|
2353
|
+
repoId: string;
|
|
2354
|
+
path: string;
|
|
2355
|
+
remote?: string | null;
|
|
2356
|
+
role?: "default" | "selected" | "workspace";
|
|
2357
|
+
}
|
|
2358
|
+
|
|
2359
|
+
export declare type RepoParam<TRequired extends boolean | undefined = boolean | undefined> = ParamBase<{
|
|
2360
|
+
repoId: string;
|
|
2361
|
+
branch?: string;
|
|
2362
|
+
}, TRequired> & {
|
|
2363
|
+
type: "repo";
|
|
2364
|
+
};
|
|
2365
|
+
|
|
2366
|
+
export declare interface RepoRef {
|
|
2367
|
+
readonly id: string;
|
|
2368
|
+
}
|
|
2369
|
+
|
|
2370
|
+
declare type RequiredOf<TOptions> = TOptions extends {
|
|
2371
|
+
required: infer TRequired extends boolean;
|
|
2372
|
+
} ? TRequired : undefined;
|
|
2373
|
+
|
|
2374
|
+
declare type RequiredPageParent<Definition extends PageDefinition> = Definition extends {
|
|
2375
|
+
resource: unknown;
|
|
2376
|
+
main: {
|
|
2377
|
+
kind: "view";
|
|
2378
|
+
};
|
|
2379
|
+
} ? {
|
|
2380
|
+
readonly parent: PageRef;
|
|
2381
|
+
} : unknown;
|
|
2382
|
+
|
|
2383
|
+
declare type RequiredPageResource<Definition extends PageDefinition> = Definition extends {
|
|
2384
|
+
main: {
|
|
2385
|
+
kind: "view";
|
|
2386
|
+
cardinality: "many";
|
|
2387
|
+
};
|
|
2388
|
+
} ? {
|
|
2389
|
+
readonly resource: NonNullable<PageDefinition["resource"]>;
|
|
2390
|
+
} : unknown;
|
|
2391
|
+
|
|
2392
|
+
declare type RequiredParamKeys<TSchema extends ParamObjectSchema> = {
|
|
2393
|
+
[K in keyof TSchema]: TSchema[K] extends {
|
|
2394
|
+
required: true;
|
|
2395
|
+
} ? K : never;
|
|
2396
|
+
}[keyof TSchema];
|
|
2397
|
+
|
|
2398
|
+
export declare interface ResourceAnchor extends ResourceRef {
|
|
2399
|
+
role?: ResourceRole;
|
|
2400
|
+
}
|
|
2401
|
+
|
|
2402
|
+
export declare interface ResourceBinding extends ResourceConstraint {
|
|
2403
|
+
readonly view: ViewRef;
|
|
2404
|
+
readonly cardinality: "one" | "many";
|
|
2405
|
+
readonly add?: NavigationTarget;
|
|
2406
|
+
}
|
|
2407
|
+
|
|
2408
|
+
export declare interface ResourceConstraint {
|
|
2409
|
+
readonly kinds: readonly ResourceKindRef[];
|
|
2410
|
+
}
|
|
2411
|
+
|
|
2412
|
+
/**
|
|
2413
|
+
* Resource references rendered as tags/chips. View-only by default; set `editable`
|
|
2414
|
+
* to pick from `options` via a dropdown. Value is the selected option id(s), mirroring
|
|
2415
|
+
* {@link SelectionControl}, so it stays JSON-safe across the controls-command boundary.
|
|
2416
|
+
*/
|
|
2417
|
+
export declare interface ResourceControl extends BaseControl {
|
|
2418
|
+
type: "resource";
|
|
2419
|
+
defaultValue: string | string[];
|
|
2420
|
+
options: ResourceOption[];
|
|
2421
|
+
multiSelect?: boolean;
|
|
2422
|
+
editable?: boolean;
|
|
2423
|
+
placeholder?: string;
|
|
2424
|
+
emptyText?: string;
|
|
2425
|
+
}
|
|
2426
|
+
|
|
2427
|
+
export declare interface ResourceHierarchyProvider extends ContributionDefinition<"resource-hierarchy-provider"> {
|
|
2428
|
+
resourceKind: ResourceKindRef;
|
|
2429
|
+
parent(ctx: ExtensionContextBase, resource: ResourceRef): MaybePromise<ResourceRef | ViewHierarchyParent | null>;
|
|
2430
|
+
}
|
|
2431
|
+
|
|
2432
|
+
/** Stable identity for selection and reuse; labels and metadata do not change identity. */
|
|
2433
|
+
export declare function resourceKey(resource: ResourceRef): string;
|
|
2434
|
+
|
|
2435
|
+
export declare function resourceKey(resource: ResourceRef | undefined): string | undefined;
|
|
2436
|
+
|
|
2437
|
+
export declare interface ResourceKindDefinition extends ContributionDefinition<"resource-kind"> {
|
|
2438
|
+
readonly label?: Localizable<string>;
|
|
2439
|
+
readonly icon?: string;
|
|
2440
|
+
readonly menuSlots?: readonly ResourceMenuSlotDefinition[];
|
|
2441
|
+
}
|
|
2442
|
+
|
|
2443
|
+
declare type ResourceKindDefinitionInput = Omit<ResourceKindDefinition, "ref">;
|
|
2444
|
+
|
|
2445
|
+
export declare type ResourceKindRef = ContributionRef<"resource-kind">;
|
|
2446
|
+
|
|
2447
|
+
export declare interface ResourceMenuSlotDefinition {
|
|
2448
|
+
readonly id: string;
|
|
2449
|
+
readonly placement: "header-primary" | "header-overflow" | "context-menu";
|
|
2450
|
+
readonly label?: Localizable<string>;
|
|
2451
|
+
readonly access: "owner" | "public";
|
|
2452
|
+
readonly order?: number;
|
|
2453
|
+
}
|
|
2454
|
+
|
|
2455
|
+
export declare const resourceMenuSlotRef: (resourceKind: ResourceKindRef, id: string) => SlotRef<object, "menu">;
|
|
2456
|
+
|
|
2457
|
+
/**
|
|
2458
|
+
* Serializable resource chip. Clicking it opens `href` externally, opens `ref` via
|
|
2459
|
+
* `onOpenResource`, or copies `copyText` to the clipboard — whichever is set.
|
|
2460
|
+
*/
|
|
2461
|
+
export declare interface ResourceOption {
|
|
2462
|
+
id: string;
|
|
2463
|
+
name: string;
|
|
2464
|
+
icon?: string;
|
|
2465
|
+
color?: string;
|
|
2466
|
+
description?: string;
|
|
2467
|
+
href?: string;
|
|
2468
|
+
ref?: ResourceRefValue;
|
|
2469
|
+
copyText?: string;
|
|
2470
|
+
}
|
|
2471
|
+
|
|
2472
|
+
export declare type ResourceParam<TRequired extends boolean | undefined = boolean | undefined> = ParamBase<ResourceRef, TRequired> & {
|
|
2473
|
+
type: "resource";
|
|
2474
|
+
resourceType: string;
|
|
2475
|
+
};
|
|
2476
|
+
|
|
2477
|
+
export declare interface ResourceRef {
|
|
2478
|
+
type: string;
|
|
2479
|
+
id: string;
|
|
2480
|
+
projectId?: string;
|
|
2481
|
+
label?: string;
|
|
2482
|
+
icon?: string;
|
|
2483
|
+
extensionId?: string;
|
|
2484
|
+
metadata?: JsonObject;
|
|
2485
|
+
}
|
|
2486
|
+
|
|
2487
|
+
/** A reference the host can open (e.g. another resource tab). */
|
|
2488
|
+
export declare type ResourceRefValue = ResourceRef;
|
|
2489
|
+
|
|
2490
|
+
export declare type ResourceRole = "primary" | "context" | "source" | "result";
|
|
2491
|
+
|
|
2492
|
+
/** A reattach error is permanent unless the provider explicitly marks it retryable. */
|
|
2493
|
+
export declare type RetryableHarnessReattachError = Error & {
|
|
2494
|
+
readonly retryable: true;
|
|
2495
|
+
};
|
|
2496
|
+
|
|
2497
|
+
export declare interface ScheduleContribution<TParams extends Struct = Struct> extends ContributionDefinition<"schedule"> {
|
|
2498
|
+
title: Localizable<string>;
|
|
2499
|
+
schedule: ScheduleExpression;
|
|
2500
|
+
command: CommandRef<TParams, unknown>;
|
|
2501
|
+
params?: TParams;
|
|
2502
|
+
repo?: RepoRef;
|
|
2503
|
+
disabled?: boolean;
|
|
2504
|
+
}
|
|
2505
|
+
|
|
2506
|
+
export declare type ScheduleExpression = string;
|
|
2507
|
+
|
|
2508
|
+
declare type SchemaParams<TSchema extends ParamObjectSchema | undefined> = TSchema extends ParamObjectSchema ? ParamsOf<TSchema> : Record<string, never>;
|
|
2509
|
+
|
|
2510
|
+
/** Mutually-exclusive mode control rendered as a segmented button group. */
|
|
2511
|
+
export declare interface SegmentedControl extends BaseControl {
|
|
2512
|
+
type: "segmented";
|
|
2513
|
+
defaultValue: string;
|
|
2514
|
+
options: SegmentedOption[];
|
|
2515
|
+
variant?: "default" | "dots";
|
|
2516
|
+
}
|
|
2517
|
+
|
|
2518
|
+
export declare interface SegmentedOption {
|
|
2519
|
+
id: string;
|
|
2520
|
+
name: string;
|
|
2521
|
+
icon?: string;
|
|
2522
|
+
indicatorColor?: string;
|
|
2523
|
+
}
|
|
2524
|
+
|
|
2525
|
+
export declare interface SelectionControl extends BaseControl {
|
|
2526
|
+
type: "selection";
|
|
2527
|
+
defaultValue: string | string[];
|
|
2528
|
+
options: SelectionOption[];
|
|
2529
|
+
multiSelect?: boolean;
|
|
2530
|
+
placeholder?: string;
|
|
2531
|
+
searchable?: boolean;
|
|
2532
|
+
searchPlaceholder?: string;
|
|
2533
|
+
emptyText?: string;
|
|
2534
|
+
group?: SelectionGroup;
|
|
2535
|
+
/** Adds a "clear" row so a single-select can be returned to unset. */
|
|
2536
|
+
clearable?: boolean;
|
|
2537
|
+
/**
|
|
2538
|
+
* Renders the control inert but still as a control — unlike `readOnly`, which
|
|
2539
|
+
* collapses it to plain text and drops the option's icon.
|
|
2540
|
+
*/
|
|
2541
|
+
disabled?: boolean;
|
|
2542
|
+
}
|
|
2543
|
+
|
|
2544
|
+
/** Parent selector used to swap the option set of a grouped selection. */
|
|
2545
|
+
export declare interface SelectionGroup {
|
|
2546
|
+
id: string;
|
|
2547
|
+
name: string;
|
|
2548
|
+
defaultValue: string;
|
|
2549
|
+
options: SelectionOption[];
|
|
2550
|
+
placeholder?: string;
|
|
2551
|
+
searchable?: boolean;
|
|
2552
|
+
searchPlaceholder?: string;
|
|
2553
|
+
emptyText?: string;
|
|
2554
|
+
disabled?: boolean;
|
|
2555
|
+
}
|
|
2556
|
+
|
|
2557
|
+
export declare interface SelectionOption {
|
|
2558
|
+
id: string;
|
|
2559
|
+
name: string;
|
|
2560
|
+
icon?: string;
|
|
2561
|
+
/** Palette key (e.g. "blue") applied to the option's icon. */
|
|
2562
|
+
color?: string;
|
|
2563
|
+
description?: string;
|
|
2564
|
+
disabled?: boolean;
|
|
2565
|
+
}
|
|
2566
|
+
|
|
2567
|
+
export declare type SelectParam<TRequired extends boolean | undefined = boolean | undefined> = ParamBase<string, TRequired> & {
|
|
2568
|
+
type: "select";
|
|
2569
|
+
options: ParamOption[];
|
|
2570
|
+
};
|
|
2571
|
+
|
|
2572
|
+
export declare interface SerializedError {
|
|
2573
|
+
name?: string;
|
|
2574
|
+
message: string;
|
|
2575
|
+
stack?: string;
|
|
2576
|
+
cause?: JsonValue;
|
|
2577
|
+
}
|
|
2578
|
+
|
|
2579
|
+
declare type SessionAttachmentRef = z.infer<typeof sessionAttachmentRefSchema>;
|
|
2580
|
+
|
|
2581
|
+
declare const sessionAttachmentRefSchema: z.ZodObject<{
|
|
2582
|
+
file_id: z.ZodString;
|
|
2583
|
+
}, z.core.$strip>;
|
|
2584
|
+
|
|
2585
|
+
export declare const sessionEvents: {
|
|
2586
|
+
started: EventRef<SessionLifecyclePayload & {
|
|
2587
|
+
anchors?: ResourceAnchor[];
|
|
2588
|
+
}>;
|
|
2589
|
+
resumed: EventRef<SessionLifecyclePayload>;
|
|
2590
|
+
awaitingInput: EventRef<SessionLifecyclePayload>;
|
|
2591
|
+
succeeded: EventRef<SessionLifecyclePayload>;
|
|
2592
|
+
failed: EventRef<SessionLifecyclePayload>;
|
|
2593
|
+
completed: EventRef<SessionLifecyclePayload & {
|
|
2594
|
+
anchors?: ResourceAnchor[];
|
|
2595
|
+
}>;
|
|
2596
|
+
};
|
|
2597
|
+
|
|
2598
|
+
export declare interface SessionLifecyclePayload {
|
|
2599
|
+
projectId: string;
|
|
2600
|
+
sessionId: string;
|
|
2601
|
+
sessionStatus?: string;
|
|
2602
|
+
originalSessionId?: string;
|
|
2603
|
+
workspace?: ExtensionWorkspace;
|
|
2604
|
+
workspaceId?: string;
|
|
2605
|
+
worktreePath?: string;
|
|
2606
|
+
branch?: string;
|
|
2607
|
+
anchors?: ResourceAnchor[];
|
|
2608
|
+
}
|
|
2609
|
+
|
|
2610
|
+
export declare type SessionMessage = {
|
|
2611
|
+
id: string;
|
|
2612
|
+
role: SessionMessageRole;
|
|
2613
|
+
parts: SessionMessagePart[];
|
|
2614
|
+
index?: number;
|
|
2615
|
+
createdAt?: number;
|
|
2616
|
+
modelId?: string;
|
|
2617
|
+
providerId?: string;
|
|
2618
|
+
tokens?: {
|
|
2619
|
+
input?: number;
|
|
2620
|
+
output?: number;
|
|
2621
|
+
reasoning?: number;
|
|
2622
|
+
cache?: {
|
|
2623
|
+
read?: number;
|
|
2624
|
+
write?: number;
|
|
2625
|
+
};
|
|
2626
|
+
};
|
|
2627
|
+
};
|
|
2628
|
+
|
|
2629
|
+
export declare type SessionMessagePart = TextPart | ReasoningPart | ToolPart | StepStartPart | StepFinishPart | PatchPart | FilePart | LoadingPart | ErrorPart | TokenUsagePart;
|
|
2630
|
+
|
|
2631
|
+
export declare type SessionMessageRole = "user" | "assistant" | "tool" | "system" | "developer";
|
|
2632
|
+
|
|
2633
|
+
export declare const sessionSlots: {
|
|
2634
|
+
headerPrimary: SlotRef<object, "menu">;
|
|
2635
|
+
headerOverflow: SlotRef<object, "menu">;
|
|
2636
|
+
};
|
|
2637
|
+
|
|
2638
|
+
declare type SessionStatus = z.infer<typeof sessionStatusSchema>;
|
|
2639
|
+
|
|
2640
|
+
declare const sessionStatusSchema: z.ZodEnum<{
|
|
2641
|
+
completed: "completed";
|
|
2642
|
+
failed: "failed";
|
|
2643
|
+
in_progress: "in_progress";
|
|
2644
|
+
awaiting_input: "awaiting_input";
|
|
2645
|
+
queued: "queued";
|
|
2646
|
+
cancelled: "cancelled";
|
|
2647
|
+
disconnected: "disconnected";
|
|
2648
|
+
}>;
|
|
2649
|
+
|
|
2650
|
+
declare type SettingsMap<TSettings> = TSettings extends {
|
|
2651
|
+
properties: infer TProperties extends Record<string, ExtensionSettingProperty>;
|
|
2652
|
+
} ? {
|
|
2653
|
+
[K in keyof TProperties & string]: SettingValue<TProperties[K]>;
|
|
2654
|
+
} : Record<string, never>;
|
|
2655
|
+
|
|
2656
|
+
export declare interface SettingsPanelContribution extends ContributionDefinition<"settings-panel"> {
|
|
2657
|
+
view: ViewRef;
|
|
2658
|
+
slot: SettingsSlotRef;
|
|
2659
|
+
section?: SettingsSectionRef;
|
|
2660
|
+
}
|
|
2661
|
+
|
|
2662
|
+
/** A named group in the settings navigation that an extension's panels can sit under. */
|
|
2663
|
+
export declare interface SettingsSectionContribution extends ContributionDefinition<"settings-section"> {
|
|
2664
|
+
title: Localizable<string>;
|
|
2665
|
+
/** Lower sorts first among sibling sections. */
|
|
2666
|
+
order?: number;
|
|
2667
|
+
}
|
|
2668
|
+
|
|
2669
|
+
export declare type SettingsSectionRef = ContributionRef<"settings-section">;
|
|
2670
|
+
|
|
2671
|
+
export declare interface SettingsSlotRef {
|
|
2672
|
+
readonly id: string;
|
|
2673
|
+
}
|
|
2674
|
+
|
|
2675
|
+
declare type SettingValue<TProperty> = TProperty extends {
|
|
2676
|
+
type: "boolean";
|
|
2677
|
+
} ? boolean : TProperty extends {
|
|
2678
|
+
type: "number";
|
|
2679
|
+
} ? number : TProperty extends {
|
|
2680
|
+
type: "string";
|
|
2681
|
+
} ? string : TProperty extends {
|
|
2682
|
+
type: "array";
|
|
2683
|
+
} ? unknown[] : TProperty extends {
|
|
2684
|
+
type: "object";
|
|
2685
|
+
} ? Record<string, unknown> : unknown;
|
|
2686
|
+
|
|
2687
|
+
export declare type SetupContext = ExtensionContextBase;
|
|
2688
|
+
|
|
2689
|
+
declare type Skill = z.infer<typeof skillSchema>;
|
|
2690
|
+
|
|
2691
|
+
export declare interface SkillContribution extends ContributionDefinition<"skill"> {
|
|
2692
|
+
title: Localizable<string>;
|
|
2693
|
+
source: PackageAssetDescriptor;
|
|
2694
|
+
description?: Localizable<string>;
|
|
2695
|
+
}
|
|
2696
|
+
|
|
2697
|
+
declare const skillSchema: z.ZodObject<{
|
|
2698
|
+
id: z.ZodString;
|
|
2699
|
+
project_id: z.ZodString;
|
|
2700
|
+
name: z.ZodString;
|
|
2701
|
+
title: z.ZodString;
|
|
2702
|
+
description: z.ZodString;
|
|
2703
|
+
source_kind: z.ZodEnum<{
|
|
2704
|
+
project: "project";
|
|
2705
|
+
extension: "extension";
|
|
2706
|
+
}>;
|
|
2707
|
+
files: z.ZodArray<z.ZodObject<{
|
|
2708
|
+
path: z.ZodString;
|
|
2709
|
+
content: z.ZodString;
|
|
2710
|
+
encoding: z.ZodLiteral<"utf8">;
|
|
2711
|
+
}, z.core.$strip>>;
|
|
2712
|
+
editable: z.ZodBoolean;
|
|
2713
|
+
extension_instance_id: z.ZodOptional<z.ZodString>;
|
|
2714
|
+
extension_id: z.ZodOptional<z.ZodString>;
|
|
2715
|
+
installed_extension_id: z.ZodOptional<z.ZodString>;
|
|
2716
|
+
install_name: z.ZodOptional<z.ZodString>;
|
|
2717
|
+
key: z.ZodOptional<z.ZodString>;
|
|
2718
|
+
source: z.ZodOptional<z.ZodObject<{
|
|
2719
|
+
kind: z.ZodLiteral<"package-asset">;
|
|
2720
|
+
path: z.ZodString;
|
|
2721
|
+
baseUrl: z.ZodString;
|
|
2722
|
+
}, z.core.$strip>>;
|
|
2723
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
2724
|
+
created_at: z.ZodString;
|
|
2725
|
+
updated_at: z.ZodString;
|
|
2726
|
+
deleted_at: z.ZodNullable<z.ZodString>;
|
|
2727
|
+
}, z.core.$strip>;
|
|
2728
|
+
|
|
2729
|
+
export declare interface SlotInvocationContext<TContext extends Struct = Struct> {
|
|
2730
|
+
id: string;
|
|
2731
|
+
kind: UiSlotKind;
|
|
2732
|
+
context: TContext;
|
|
2733
|
+
}
|
|
2734
|
+
|
|
2735
|
+
export declare interface SlotOptions<TKind extends UiSlotKind = UiSlotKind> {
|
|
2736
|
+
kind: TKind;
|
|
2737
|
+
label?: string;
|
|
2738
|
+
description?: string;
|
|
2739
|
+
metadata?: JsonObject;
|
|
2740
|
+
}
|
|
2741
|
+
|
|
2742
|
+
export declare interface SlotRef<TContext extends Struct = Struct, TKind extends UiSlotKind = UiSlotKind> {
|
|
2743
|
+
id: string;
|
|
2744
|
+
kind: TKind;
|
|
2745
|
+
label?: string;
|
|
2746
|
+
description?: string;
|
|
2747
|
+
metadata?: JsonObject;
|
|
2748
|
+
/** Phantom field used to constrain compatible contributions; never populated at runtime. */
|
|
2749
|
+
context?: TContext;
|
|
2750
|
+
}
|
|
2751
|
+
|
|
2752
|
+
export declare interface StatusActionDefinition {
|
|
2753
|
+
readonly id: string;
|
|
2754
|
+
readonly label: Localizable<string>;
|
|
2755
|
+
readonly icon?: string;
|
|
2756
|
+
}
|
|
2757
|
+
|
|
2758
|
+
export declare interface StatusBarItemContribution extends ContributionDefinition<"status-bar-item"> {
|
|
2759
|
+
readonly view: ViewRef;
|
|
2760
|
+
readonly slot: StatusBarSlotRef;
|
|
2761
|
+
readonly order?: number;
|
|
2762
|
+
readonly when?: WhenExpression;
|
|
2763
|
+
}
|
|
2764
|
+
|
|
2765
|
+
export declare interface StatusBarSlotRef {
|
|
2766
|
+
readonly id: string;
|
|
2767
|
+
}
|
|
2768
|
+
|
|
2769
|
+
export declare interface StatusContribution extends ContributionDefinition<"status"> {
|
|
2770
|
+
readonly title: Localizable<string>;
|
|
2771
|
+
readonly actions?: readonly StatusActionDefinition[];
|
|
2772
|
+
readonly query: (ctx: ExtensionContextBase, input: Record<string, never>) => MaybePromise<{
|
|
2773
|
+
statuses: readonly WorkflowStatus[];
|
|
2774
|
+
}>;
|
|
2775
|
+
readonly save?: (ctx: ExtensionContextBase, input: {
|
|
2776
|
+
statuses: readonly WorkflowStatus[];
|
|
2777
|
+
}) => MaybePromise<{
|
|
2778
|
+
statuses: readonly WorkflowStatus[];
|
|
2779
|
+
}>;
|
|
2780
|
+
}
|
|
2781
|
+
|
|
2782
|
+
export declare type StatusRef = ContributionRef<"status">;
|
|
2783
|
+
|
|
2784
|
+
export declare type StepFinishPart = {
|
|
2785
|
+
type: "step-finish";
|
|
2786
|
+
reason?: string;
|
|
2787
|
+
snapshot?: string;
|
|
2788
|
+
cost?: number;
|
|
2789
|
+
tokens?: unknown;
|
|
2790
|
+
};
|
|
2791
|
+
|
|
2792
|
+
export declare type StepStartPart = {
|
|
2793
|
+
type: "step-start";
|
|
2794
|
+
snapshot?: string;
|
|
2795
|
+
};
|
|
2796
|
+
|
|
2797
|
+
export declare type StorageScope = {
|
|
2798
|
+
type: "project";
|
|
2799
|
+
} | {
|
|
2800
|
+
type: "repo";
|
|
2801
|
+
repoId: string;
|
|
2802
|
+
} | {
|
|
2803
|
+
type: "resource";
|
|
2804
|
+
resource: ResourceRef;
|
|
2805
|
+
} | {
|
|
2806
|
+
type: string;
|
|
2807
|
+
id: string;
|
|
2808
|
+
};
|
|
2809
|
+
|
|
2810
|
+
export declare type Struct = object;
|
|
2811
|
+
|
|
2812
|
+
export declare interface TemplateContribution extends ContributionDefinition<"template"> {
|
|
2813
|
+
title: Localizable<string>;
|
|
2814
|
+
type: string;
|
|
2815
|
+
source: PackageAssetDescriptor;
|
|
2816
|
+
description?: Localizable<string>;
|
|
2817
|
+
}
|
|
2818
|
+
|
|
2819
|
+
export declare type TemplateParam<TRequired extends boolean | undefined = boolean | undefined> = ParamBase<string, TRequired> & {
|
|
2820
|
+
type: "template";
|
|
2821
|
+
templateType: string;
|
|
2822
|
+
};
|
|
2823
|
+
|
|
2824
|
+
export declare interface TemplateTypeContribution extends ContributionDefinition<"template-type"> {
|
|
2825
|
+
label: Localizable<string>;
|
|
2826
|
+
description?: Localizable<string>;
|
|
2827
|
+
order?: number;
|
|
2828
|
+
commands?: {
|
|
2829
|
+
list: CommandRef;
|
|
2830
|
+
read: CommandRef;
|
|
2831
|
+
save: CommandRef;
|
|
2832
|
+
delete: CommandRef;
|
|
2833
|
+
};
|
|
2834
|
+
}
|
|
2835
|
+
|
|
2836
|
+
export declare type TerminalEvent = {
|
|
2837
|
+
kind: "data";
|
|
2838
|
+
chunk: Uint8Array;
|
|
2839
|
+
} | {
|
|
2840
|
+
kind: "title";
|
|
2841
|
+
title: string;
|
|
2842
|
+
} | {
|
|
2843
|
+
kind: "exit";
|
|
2844
|
+
code: number | null;
|
|
2845
|
+
signal: string | null;
|
|
2846
|
+
} | {
|
|
2847
|
+
kind: "error";
|
|
2848
|
+
message: string;
|
|
2849
|
+
};
|
|
2850
|
+
|
|
2851
|
+
/**
|
|
2852
|
+
* Renderer-side session over the `terminal.session` capability. Structurally
|
|
2853
|
+
* compatible with the `TerminalSessionAdapter` contract of `@pstdio/ui/terminal`,
|
|
2854
|
+
* so it plugs straight into the `Terminal` component's `bridge` prop.
|
|
2855
|
+
*/
|
|
2856
|
+
export declare interface TerminalSessionAdapter {
|
|
2857
|
+
readonly id: string;
|
|
2858
|
+
write(data: string | Uint8Array): void;
|
|
2859
|
+
resize(cols: number, rows: number): void;
|
|
2860
|
+
kill(signal?: string): Promise<void>;
|
|
2861
|
+
onData(handler: (chunk: Uint8Array) => void): () => void;
|
|
2862
|
+
onExit(handler: (exit: TerminalSessionExit) => void): () => void;
|
|
2863
|
+
onError(handler: (error: {
|
|
2864
|
+
message: string;
|
|
2865
|
+
}) => void): () => void;
|
|
2866
|
+
}
|
|
2867
|
+
|
|
2868
|
+
export declare interface TerminalSessionBridge {
|
|
2869
|
+
openSession(request: TerminalSessionRequest_2): Promise<TerminalSessionAdapter>;
|
|
2870
|
+
}
|
|
2871
|
+
|
|
2872
|
+
export declare interface TerminalSessionExit {
|
|
2873
|
+
code: number | null;
|
|
2874
|
+
signal: string | null;
|
|
2875
|
+
}
|
|
2876
|
+
|
|
2877
|
+
export declare interface TerminalSessionHandle {
|
|
2878
|
+
/** Stable session id. */
|
|
2879
|
+
readonly id: string;
|
|
2880
|
+
/** Send stdin to the PTY. */
|
|
2881
|
+
write(data: string | Uint8Array): void;
|
|
2882
|
+
/** Adjust the PTY geometry. */
|
|
2883
|
+
resize(cols: number, rows: number): void;
|
|
2884
|
+
/** Terminate the child and clean up host resources. */
|
|
2885
|
+
kill(signal?: string): Promise<void>;
|
|
2886
|
+
/**
|
|
2887
|
+
* Async iterable of output / exit / error events. A single iterator is
|
|
2888
|
+
* supported per session — calling this twice throws. `exit` is always the
|
|
2889
|
+
* last event delivered for a session.
|
|
2890
|
+
*/
|
|
2891
|
+
events(): AsyncIterable<TerminalEvent>;
|
|
2892
|
+
}
|
|
2893
|
+
|
|
2894
|
+
declare type TerminalSessionOperation = {
|
|
2895
|
+
operation: "open";
|
|
2896
|
+
request: TerminalSessionRequest;
|
|
2897
|
+
} | {
|
|
2898
|
+
operation: "write";
|
|
2899
|
+
sessionId: string;
|
|
2900
|
+
data: string | Uint8Array;
|
|
2901
|
+
} | {
|
|
2902
|
+
operation: "resize";
|
|
2903
|
+
sessionId: string;
|
|
2904
|
+
cols: number;
|
|
2905
|
+
rows: number;
|
|
2906
|
+
} | {
|
|
2907
|
+
operation: "kill";
|
|
2908
|
+
sessionId: string;
|
|
2909
|
+
signal?: string;
|
|
2910
|
+
} | {
|
|
2911
|
+
operation: "subscribe";
|
|
2912
|
+
sessionId: string;
|
|
2913
|
+
};
|
|
2914
|
+
|
|
2915
|
+
export declare interface TerminalSessionRequest {
|
|
2916
|
+
/** Command + args to run; defaults to the user's login shell when omitted. */
|
|
2917
|
+
command?: string[];
|
|
2918
|
+
/** Working directory; falls back to the extension's workspace root. */
|
|
2919
|
+
cwd?: string;
|
|
2920
|
+
/** Extra env vars merged over the inherited environment. */
|
|
2921
|
+
env?: Record<string, string>;
|
|
2922
|
+
/** Initial column count; the renderer can resize later. */
|
|
2923
|
+
cols: number;
|
|
2924
|
+
/** Initial row count; the renderer can resize later. */
|
|
2925
|
+
rows: number;
|
|
2926
|
+
}
|
|
2927
|
+
|
|
2928
|
+
declare interface TerminalSessionRequest_2 {
|
|
2929
|
+
/** Command + args to run; defaults to the user's login shell when omitted. */
|
|
2930
|
+
command?: string[];
|
|
2931
|
+
/** Working directory; falls back to the extension's workspace root. */
|
|
2932
|
+
cwd?: string;
|
|
2933
|
+
/** Extra env vars merged over the inherited environment. */
|
|
2934
|
+
env?: Record<string, string>;
|
|
2935
|
+
/** Initial column count; the renderer can resize later. */
|
|
2936
|
+
cols: number;
|
|
2937
|
+
/** Initial row count; the renderer can resize later. */
|
|
2938
|
+
rows: number;
|
|
2939
|
+
}
|
|
2940
|
+
|
|
2941
|
+
declare type TerminalSessionResult = {
|
|
2942
|
+
operation: "open";
|
|
2943
|
+
sessionId: string;
|
|
2944
|
+
} | {
|
|
2945
|
+
operation: "write" | "resize" | "kill" | "subscribe";
|
|
2946
|
+
accepted: true;
|
|
2947
|
+
};
|
|
2948
|
+
|
|
2949
|
+
export declare interface TextControl extends BaseControl {
|
|
2950
|
+
type: "text";
|
|
2951
|
+
defaultValue: string;
|
|
2952
|
+
singleLine?: boolean;
|
|
2953
|
+
}
|
|
2954
|
+
|
|
2955
|
+
export declare type TextParam<TRequired extends boolean | undefined = boolean | undefined> = ParamBase<string, TRequired> & {
|
|
2956
|
+
type: "text";
|
|
2957
|
+
};
|
|
2958
|
+
|
|
2959
|
+
export declare type TextPart = {
|
|
2960
|
+
type: "text";
|
|
2961
|
+
text: string;
|
|
2962
|
+
};
|
|
2963
|
+
|
|
2964
|
+
export declare interface ThemeContribution extends ContributionDefinition<"theme"> {
|
|
2965
|
+
title: Localizable<string>;
|
|
2966
|
+
source: PackageAssetDescriptor;
|
|
2967
|
+
format: "vscode-color-theme";
|
|
2968
|
+
mode?: ThemeMode;
|
|
2969
|
+
description?: Localizable<string>;
|
|
2970
|
+
}
|
|
2971
|
+
|
|
2972
|
+
export declare type ThemeMode = "light" | "dark";
|
|
2973
|
+
|
|
2974
|
+
export declare type ThemeRef = ContributionRef<"theme">;
|
|
2975
|
+
|
|
2976
|
+
/** "activity": the host kills the session when no events arrive for a while; "provider": the provider self-terminates. */
|
|
2977
|
+
export declare type TimeoutStrategy = "activity" | "provider";
|
|
2978
|
+
|
|
2979
|
+
export declare type TokenUsagePart = {
|
|
2980
|
+
type: "token_usage";
|
|
2981
|
+
inputTokens: number;
|
|
2982
|
+
outputTokens: number;
|
|
2983
|
+
cacheReadTokens?: number;
|
|
2984
|
+
cacheWriteTokens?: number;
|
|
2985
|
+
};
|
|
2986
|
+
|
|
2987
|
+
export declare type ToolPart = {
|
|
2988
|
+
type: "tool";
|
|
2989
|
+
tool: string;
|
|
2990
|
+
callId?: string;
|
|
2991
|
+
actionType?: ToolPartActionType;
|
|
2992
|
+
status?: ToolPartStatus;
|
|
2993
|
+
state?: {
|
|
2994
|
+
status?: string;
|
|
2995
|
+
input?: unknown;
|
|
2996
|
+
output?: unknown;
|
|
2997
|
+
errorText?: string;
|
|
2998
|
+
metadata?: unknown;
|
|
2999
|
+
};
|
|
3000
|
+
};
|
|
3001
|
+
|
|
3002
|
+
export declare type ToolPartActionType = "read" | "write" | "execute" | "network" | "other";
|
|
3003
|
+
|
|
3004
|
+
export declare type ToolPartStatus = "pending" | "running" | "completed" | "failed" | "denied";
|
|
3005
|
+
|
|
3006
|
+
export declare interface TreeAction {
|
|
3007
|
+
id: string;
|
|
3008
|
+
label?: Localizable<string>;
|
|
3009
|
+
icon?: string;
|
|
3010
|
+
command?: CommandRef<Struct, unknown>;
|
|
3011
|
+
params?: Struct;
|
|
3012
|
+
input?: ParamObjectSchema;
|
|
3013
|
+
submitLabel?: string;
|
|
3014
|
+
when?: string;
|
|
3015
|
+
disabled?: boolean;
|
|
3016
|
+
}
|
|
3017
|
+
|
|
3018
|
+
export declare interface TreeNode {
|
|
3019
|
+
id: string;
|
|
3020
|
+
label: Localizable<string>;
|
|
3021
|
+
icon?: string;
|
|
3022
|
+
iconColor?: string;
|
|
3023
|
+
iconTooltip?: string;
|
|
3024
|
+
resource?: TreeRendererResourceRef;
|
|
3025
|
+
target?: TreeNodeTarget;
|
|
3026
|
+
/** Visual row variant for non-data rows such as placeholders. */
|
|
3027
|
+
rowVariant?: TreeNodeRowVariant;
|
|
3028
|
+
actions?: TreeAction[];
|
|
3029
|
+
contextMenuActions?: TreeAction[];
|
|
3030
|
+
collapsible?: boolean;
|
|
3031
|
+
disabled?: boolean;
|
|
3032
|
+
selected?: boolean;
|
|
3033
|
+
children?: TreeNode[];
|
|
3034
|
+
description?: string;
|
|
3035
|
+
contextValue?: string;
|
|
3036
|
+
hiddenByDefault?: boolean;
|
|
3037
|
+
/** Opt in to the tree's hide/show customization menu (header/footer rows). Off by default. */
|
|
3038
|
+
canHide?: boolean;
|
|
3039
|
+
metadata?: JsonObject;
|
|
3040
|
+
}
|
|
3041
|
+
|
|
3042
|
+
export declare type TreeNodeRowVariant = "empty-state";
|
|
3043
|
+
|
|
3044
|
+
export declare type TreeNodeTarget = NavigationTarget;
|
|
3045
|
+
|
|
3046
|
+
export declare interface TreeRendererActionParams extends TreeRendererQueryParams {
|
|
3047
|
+
actionId: string;
|
|
3048
|
+
node?: TreeNode;
|
|
3049
|
+
}
|
|
3050
|
+
|
|
3051
|
+
export declare interface TreeRendererChildrenParams extends TreeRendererQueryParams {
|
|
3052
|
+
node: TreeNode;
|
|
3053
|
+
}
|
|
3054
|
+
|
|
3055
|
+
export declare type TreeRendererCommandResult = TreeViewSection[] | TreeNode[] | JsonValue;
|
|
3056
|
+
|
|
3057
|
+
export declare interface TreeRendererContribution extends RendererContributionBase {
|
|
3058
|
+
searchable?: boolean;
|
|
3059
|
+
searchPlaceholder?: Localizable<string>;
|
|
3060
|
+
header?: RendererCallback<TreeRendererQueryParams, TreeViewSection[]>;
|
|
3061
|
+
body: RendererCallback<TreeRendererQueryParams, TreeViewSection[]>;
|
|
3062
|
+
children?: RendererCallback<TreeRendererChildrenParams, TreeNode[]>;
|
|
3063
|
+
footer?: RendererCallback<TreeRendererQueryParams, TreeViewSection[]>;
|
|
3064
|
+
defaultExpandedSectionIds?: string[];
|
|
3065
|
+
defaultExpandedNodeIds?: string[];
|
|
3066
|
+
}
|
|
3067
|
+
|
|
3068
|
+
export declare interface TreeRendererQueryParams {
|
|
3069
|
+
renderer: RendererContext;
|
|
3070
|
+
state?: TreeRendererState;
|
|
3071
|
+
filter?: string;
|
|
3072
|
+
}
|
|
3073
|
+
|
|
3074
|
+
export declare type TreeRendererResourceRef = ResourceRef;
|
|
3075
|
+
|
|
3076
|
+
export declare interface TreeRendererState {
|
|
3077
|
+
expandedNodeIds: string[];
|
|
3078
|
+
expandedSectionIds: string[];
|
|
3079
|
+
selectedNodeId?: string;
|
|
3080
|
+
}
|
|
3081
|
+
|
|
3082
|
+
export declare interface TreeSectionEmptyState {
|
|
3083
|
+
title: Localizable<string>;
|
|
3084
|
+
description?: Localizable<string>;
|
|
3085
|
+
icon?: string;
|
|
3086
|
+
}
|
|
3087
|
+
|
|
3088
|
+
export declare type TreeViewBody = NativeViewBody<"tree", TreeRendererContribution>;
|
|
3089
|
+
|
|
3090
|
+
export declare interface TreeViewSection {
|
|
3091
|
+
id: string;
|
|
3092
|
+
label?: Localizable<string>;
|
|
3093
|
+
actions?: TreeAction[];
|
|
3094
|
+
collapsible?: boolean;
|
|
3095
|
+
emptyState?: TreeSectionEmptyState;
|
|
3096
|
+
nodes: TreeNode[];
|
|
3097
|
+
hiddenByDefault?: boolean;
|
|
3098
|
+
/** Opt in to the tree's hide/show customization menu (a category). Off by default. */
|
|
3099
|
+
canHide?: boolean;
|
|
3100
|
+
}
|
|
3101
|
+
|
|
3102
|
+
/** UI surface contributions: views, typed references, and placements. */
|
|
3103
|
+
export declare interface UiContributions {
|
|
3104
|
+
views?: readonly ViewContribution[];
|
|
3105
|
+
viewMenus?: readonly ViewMenuContribution[];
|
|
3106
|
+
placements?: readonly PlacementContribution[];
|
|
3107
|
+
navigationItems?: readonly NavigationItemContribution[];
|
|
3108
|
+
navigationTrees?: readonly NavigationTreeContribution[];
|
|
3109
|
+
statusBarItems?: readonly StatusBarItemContribution[];
|
|
3110
|
+
statuses?: readonly StatusContribution[];
|
|
3111
|
+
modes?: readonly ModeContribution[];
|
|
3112
|
+
pages?: readonly PageContribution[];
|
|
3113
|
+
resourceKinds?: readonly ResourceKindDefinition[];
|
|
3114
|
+
activityItems?: readonly ActivityItemContribution[];
|
|
3115
|
+
settingsSections?: readonly SettingsSectionContribution[];
|
|
3116
|
+
settingsPanels?: readonly SettingsPanelContribution[];
|
|
3117
|
+
commandPaletteResources?: readonly CommandPaletteResourceContribution[];
|
|
3118
|
+
keybindings?: readonly KeybindingContribution[];
|
|
3119
|
+
}
|
|
3120
|
+
|
|
3121
|
+
export declare type UiSlotKind = "menu" | "panel" | "settings" | "renderer" | "kanbanRenderer" | "dataTableRenderer";
|
|
3122
|
+
|
|
3123
|
+
export declare const unwrapCommandOutcome: <TResult>(response: CommandResponse<TResult>, fallbackReason?: string) => TResult;
|
|
3124
|
+
|
|
3125
|
+
export declare interface UpdateNotificationInput {
|
|
3126
|
+
priority?: NotificationPriority;
|
|
3127
|
+
snoozedUntil?: string | null;
|
|
3128
|
+
metadata?: JsonObject;
|
|
3129
|
+
}
|
|
3130
|
+
|
|
3131
|
+
/** Paired x/y numeric control. */
|
|
3132
|
+
export declare interface VectorControl extends BaseControl {
|
|
3133
|
+
type: "vector";
|
|
3134
|
+
defaultValue: VectorValue;
|
|
3135
|
+
coordinateMode?: "cartesian" | "screen";
|
|
3136
|
+
xLabel?: string;
|
|
3137
|
+
yLabel?: string;
|
|
3138
|
+
min?: number;
|
|
3139
|
+
max?: number;
|
|
3140
|
+
step?: number;
|
|
3141
|
+
}
|
|
3142
|
+
|
|
3143
|
+
export declare type VectorValue = {
|
|
3144
|
+
x: number;
|
|
3145
|
+
y: number;
|
|
3146
|
+
};
|
|
3147
|
+
|
|
3148
|
+
export declare type ViewBody = WebviewViewBody | TreeViewBody | FileViewBody | ControlsViewBody | KanbanViewBody | DataTableViewBody;
|
|
3149
|
+
|
|
3150
|
+
export declare interface ViewContribution extends ContributionDefinition<"view"> {
|
|
3151
|
+
readonly title: Localizable<string>;
|
|
3152
|
+
readonly icon?: string;
|
|
3153
|
+
readonly body: ViewBody;
|
|
3154
|
+
}
|
|
3155
|
+
|
|
3156
|
+
declare type ViewDefinition = Omit<ViewContribution, "ref">;
|
|
3157
|
+
|
|
3158
|
+
export declare interface ViewHierarchyParent {
|
|
3159
|
+
type: "view";
|
|
3160
|
+
viewId: string;
|
|
3161
|
+
}
|
|
3162
|
+
|
|
3163
|
+
export declare interface ViewMenuContribution extends ContributionDefinition<"view-menu"> {
|
|
3164
|
+
readonly owner: ViewRef;
|
|
3165
|
+
readonly view: ViewRef;
|
|
3166
|
+
readonly side: "left" | "right";
|
|
3167
|
+
readonly group?: string;
|
|
3168
|
+
readonly placement?: "first" | "default" | "last";
|
|
3169
|
+
readonly hostTreeHeader?: "default" | "none";
|
|
3170
|
+
readonly hostTreeFooter?: "default" | "none";
|
|
3171
|
+
}
|
|
3172
|
+
|
|
3173
|
+
declare type ViewMenuDefinition = Omit<ViewMenuContribution, "ref">;
|
|
3174
|
+
|
|
3175
|
+
export declare type ViewRef = ContributionRef<"view">;
|
|
3176
|
+
|
|
3177
|
+
export declare const WEBVIEW_DECLARABLE_CAPABILITIES: readonly ["commands.execute", "navigation.open", "placement.close", "notification.show", "notification.action", "notification.resolve", "notification.dismiss", "preferences.get", "preferences.set", "extension.settings.all", "extension.settings.get", "extension.settings.set", "extension.settings.delete", "terminal.session", "files.upload", "files.list", "files.delete"];
|
|
3178
|
+
|
|
3179
|
+
export declare const WEBVIEW_HOST_CAPABILITIES: readonly ["commands.execute", "navigation.open", "placement.close", "notification.show", "notification.action", "notification.resolve", "notification.dismiss", "preferences.get", "preferences.set", "extension.settings.all", "extension.settings.get", "extension.settings.set", "extension.settings.delete", "terminal.session", "files.upload", "files.list", "files.delete", "artifacts.read", "host.dispatchKeyboardEvent"];
|
|
3180
|
+
|
|
3181
|
+
export declare const WEBVIEW_HOST_CAPABILITY_VERSION = 1;
|
|
3182
|
+
|
|
3183
|
+
export declare const WEBVIEW_SCOPED_DECLARABLE_CAPABILITIES: readonly ["artifacts.read"];
|
|
3184
|
+
|
|
3185
|
+
export declare interface WebviewArtifactFile {
|
|
3186
|
+
path: string;
|
|
3187
|
+
size: number;
|
|
3188
|
+
mediaType: string;
|
|
3189
|
+
}
|
|
3190
|
+
|
|
3191
|
+
export declare type WebviewArtifactsClient = {
|
|
3192
|
+
list: (mount: ArtifactMountKey, prefix?: string) => Promise<WebviewArtifactFile[]>;
|
|
3193
|
+
readText: (mount: ArtifactMountKey, path: string) => Promise<string>;
|
|
3194
|
+
/** Short-lived URL for an allowlisted raster image, usable in `<img src>`. */
|
|
3195
|
+
imageUrl: (mount: ArtifactMountKey, path: string) => Promise<string>;
|
|
3196
|
+
};
|
|
3197
|
+
|
|
3198
|
+
export declare type WebviewArtifactsReadParams = {
|
|
3199
|
+
op: "list";
|
|
3200
|
+
mount: string;
|
|
3201
|
+
prefix?: string;
|
|
3202
|
+
} | {
|
|
3203
|
+
op: "readText";
|
|
3204
|
+
mount: string;
|
|
3205
|
+
path: string;
|
|
3206
|
+
} | {
|
|
3207
|
+
op: "imageUrl";
|
|
3208
|
+
mount: string;
|
|
3209
|
+
path: string;
|
|
3210
|
+
};
|
|
3211
|
+
|
|
3212
|
+
export declare type WebviewCapabilityDeclaration = WebviewDeclarableCapability | `${WebviewDeclarableCapability}@${typeof WEBVIEW_HOST_CAPABILITY_VERSION}` | `${WebviewScopedDeclarableCapability}:${string}`;
|
|
3213
|
+
|
|
3214
|
+
export declare type WebviewClient<TCommands, TSettings = undefined> = {
|
|
3215
|
+
artifacts: WebviewArtifactsClient;
|
|
3216
|
+
commands: WebviewCommandsClient<TCommands>;
|
|
3217
|
+
settings: WebviewSettingsClient<ClientSettingsMap<TSettings>>;
|
|
3218
|
+
};
|
|
3219
|
+
|
|
3220
|
+
export declare interface WebviewClientOptions {
|
|
3221
|
+
/** Overrides the extension id provided by the host bridge (e.g. in tests). */
|
|
3222
|
+
extensionId?: string;
|
|
3223
|
+
}
|
|
3224
|
+
|
|
3225
|
+
export declare type WebviewCommandsClient<TCommands> = {
|
|
3226
|
+
[K in keyof TCommands & string]: CommandFn<TCommands[K]>;
|
|
3227
|
+
};
|
|
3228
|
+
|
|
3229
|
+
export declare interface WebviewCommandsExecuteParams {
|
|
3230
|
+
commandId: string;
|
|
3231
|
+
params?: JsonObject;
|
|
3232
|
+
resource?: ResourceRef;
|
|
3233
|
+
repo?: RepoContext;
|
|
3234
|
+
metadata?: JsonObject;
|
|
3235
|
+
}
|
|
3236
|
+
|
|
3237
|
+
export declare interface WebviewContribution {
|
|
3238
|
+
entry: PackageAssetDescriptor;
|
|
3239
|
+
title?: Localizable<string>;
|
|
3240
|
+
capabilities?: WebviewCapabilityDeclaration[];
|
|
3241
|
+
}
|
|
3242
|
+
|
|
3243
|
+
export declare type WebviewDeclarableCapability = (typeof WEBVIEW_DECLARABLE_CAPABILITIES)[number];
|
|
3244
|
+
|
|
3245
|
+
export declare interface WebviewExtensionSettingKeyParams {
|
|
3246
|
+
key: string;
|
|
3247
|
+
}
|
|
3248
|
+
|
|
3249
|
+
export declare interface WebviewExtensionSettingSetParams extends WebviewExtensionSettingKeyParams {
|
|
3250
|
+
value: unknown;
|
|
3251
|
+
}
|
|
3252
|
+
|
|
3253
|
+
export declare interface WebviewFilesClient {
|
|
3254
|
+
pick(opts?: {
|
|
3255
|
+
accept?: string;
|
|
3256
|
+
multiple?: boolean;
|
|
3257
|
+
}): Promise<File[]>;
|
|
3258
|
+
upload(input: {
|
|
3259
|
+
name: string;
|
|
3260
|
+
data: Uint8Array | ArrayBuffer;
|
|
3261
|
+
mimeType?: string;
|
|
3262
|
+
scope?: {
|
|
3263
|
+
type: string;
|
|
3264
|
+
id?: string;
|
|
3265
|
+
};
|
|
3266
|
+
}): Promise<ExtensionBlobRef>;
|
|
3267
|
+
list(input?: {
|
|
3268
|
+
scope?: {
|
|
3269
|
+
type: string;
|
|
3270
|
+
id?: string;
|
|
3271
|
+
};
|
|
3272
|
+
}): Promise<ExtensionBlobRef[]>;
|
|
3273
|
+
delete(id: string): Promise<void>;
|
|
3274
|
+
}
|
|
3275
|
+
|
|
3276
|
+
export declare type WebviewFileScope = {
|
|
3277
|
+
type: "project";
|
|
3278
|
+
} | {
|
|
3279
|
+
type: "repo";
|
|
3280
|
+
id: string;
|
|
3281
|
+
} | {
|
|
3282
|
+
type: "resource";
|
|
3283
|
+
id: string;
|
|
3284
|
+
} | {
|
|
3285
|
+
type: string;
|
|
3286
|
+
id?: string;
|
|
3287
|
+
};
|
|
3288
|
+
|
|
3289
|
+
export declare interface WebviewFilesDeleteParams {
|
|
3290
|
+
id: string;
|
|
3291
|
+
}
|
|
3292
|
+
|
|
3293
|
+
export declare interface WebviewFilesListParams {
|
|
3294
|
+
scope?: WebviewFileScope;
|
|
3295
|
+
}
|
|
3296
|
+
|
|
3297
|
+
export declare interface WebviewFilesUploadParams {
|
|
3298
|
+
name: string;
|
|
3299
|
+
data: Uint8Array | ArrayBuffer;
|
|
3300
|
+
mimeType?: string;
|
|
3301
|
+
scope?: WebviewFileScope;
|
|
3302
|
+
}
|
|
3303
|
+
|
|
3304
|
+
export declare type WebviewHostCapability = (typeof WEBVIEW_HOST_CAPABILITIES)[number];
|
|
3305
|
+
|
|
3306
|
+
export declare interface WebviewHostCapabilityParams {
|
|
3307
|
+
"commands.execute": WebviewCommandsExecuteParams;
|
|
3308
|
+
"navigation.open": WebviewNavigationOpenParams;
|
|
3309
|
+
"placement.close": Record<string, never>;
|
|
3310
|
+
"notification.show": WebviewNotificationShowParams;
|
|
3311
|
+
"notification.action": WebviewNotificationActionParams;
|
|
3312
|
+
"notification.resolve": WebviewNotificationResolveParams;
|
|
3313
|
+
"notification.dismiss": WebviewNotificationDismissParams;
|
|
3314
|
+
"preferences.get": WebviewPreferencesGetParams;
|
|
3315
|
+
"preferences.set": WebviewPreferencesSetParams;
|
|
3316
|
+
"extension.settings.all": Record<string, never>;
|
|
3317
|
+
"extension.settings.get": WebviewExtensionSettingKeyParams;
|
|
3318
|
+
"extension.settings.set": WebviewExtensionSettingSetParams;
|
|
3319
|
+
"extension.settings.delete": WebviewExtensionSettingKeyParams;
|
|
3320
|
+
"terminal.session": TerminalSessionOperation;
|
|
3321
|
+
"files.upload": WebviewFilesUploadParams;
|
|
3322
|
+
"files.list": WebviewFilesListParams;
|
|
3323
|
+
"files.delete": WebviewFilesDeleteParams;
|
|
3324
|
+
"artifacts.read": WebviewArtifactsReadParams;
|
|
3325
|
+
"host.dispatchKeyboardEvent": WebviewKeyboardEventParams;
|
|
3326
|
+
}
|
|
3327
|
+
|
|
3328
|
+
export declare type WebviewHostCapabilityResult<Capability extends WebviewHostCapability, Params extends WebviewHostCapabilityParams[Capability] = WebviewHostCapabilityParams[Capability]> = Capability extends "artifacts.read" ? Params extends {
|
|
3329
|
+
op: "list";
|
|
3330
|
+
} ? WebviewArtifactFile[] : Params extends {
|
|
3331
|
+
op: "readText" | "imageUrl";
|
|
3332
|
+
} ? string : WebviewHostCapabilityResults[Capability] : Capability extends "terminal.session" ? Params extends {
|
|
3333
|
+
operation: "open";
|
|
3334
|
+
} ? Extract<TerminalSessionResult, {
|
|
3335
|
+
operation: "open";
|
|
3336
|
+
}> : Params extends {
|
|
3337
|
+
operation: "write" | "resize" | "kill" | "subscribe";
|
|
3338
|
+
} ? Exclude<TerminalSessionResult, {
|
|
3339
|
+
operation: "open";
|
|
3340
|
+
}> : TerminalSessionResult : WebviewHostCapabilityResults[Capability];
|
|
3341
|
+
|
|
3342
|
+
export declare interface WebviewHostCapabilityResults {
|
|
3343
|
+
"commands.execute": {
|
|
3344
|
+
outcome: CommandOutcome;
|
|
3345
|
+
};
|
|
3346
|
+
"navigation.open": void;
|
|
3347
|
+
"placement.close": void;
|
|
3348
|
+
"notification.show": void;
|
|
3349
|
+
"notification.action": Notification_2;
|
|
3350
|
+
"notification.resolve": Notification_2 | {
|
|
3351
|
+
resolved: number;
|
|
3352
|
+
notifications: Notification_2[];
|
|
3353
|
+
};
|
|
3354
|
+
"notification.dismiss": Notification_2 | {
|
|
3355
|
+
resolved: number;
|
|
3356
|
+
notifications: Notification_2[];
|
|
3357
|
+
};
|
|
3358
|
+
"preferences.get": WebviewPreferencesSetParams["value"] | undefined;
|
|
3359
|
+
"preferences.set": {
|
|
3360
|
+
name: string;
|
|
3361
|
+
value: WebviewPreferencesSetParams["value"];
|
|
3362
|
+
};
|
|
3363
|
+
"extension.settings.all": Record<string, unknown>;
|
|
3364
|
+
"extension.settings.get": unknown;
|
|
3365
|
+
"extension.settings.set": void;
|
|
3366
|
+
"extension.settings.delete": void;
|
|
3367
|
+
"terminal.session": TerminalSessionResult;
|
|
3368
|
+
"files.upload": ExtensionBlobRef;
|
|
3369
|
+
"files.list": {
|
|
3370
|
+
files: ExtensionBlobRef[];
|
|
3371
|
+
};
|
|
3372
|
+
"files.delete": void;
|
|
3373
|
+
"artifacts.read": WebviewArtifactFile[] | string;
|
|
3374
|
+
"host.dispatchKeyboardEvent": void;
|
|
3375
|
+
}
|
|
3376
|
+
|
|
3377
|
+
export declare interface WebviewKeyboardEventParams {
|
|
3378
|
+
key?: string;
|
|
3379
|
+
code?: string;
|
|
3380
|
+
ctrlKey?: boolean;
|
|
3381
|
+
metaKey?: boolean;
|
|
3382
|
+
altKey?: boolean;
|
|
3383
|
+
shiftKey?: boolean;
|
|
3384
|
+
repeat?: boolean;
|
|
3385
|
+
}
|
|
3386
|
+
|
|
3387
|
+
export declare interface WebviewNavigationOpenParams {
|
|
3388
|
+
target: NavigationTarget;
|
|
3389
|
+
}
|
|
3390
|
+
|
|
3391
|
+
export declare type WebviewNotificationActionParams = Omit<CreateNotificationInput, "projectId">;
|
|
3392
|
+
|
|
3393
|
+
export declare type WebviewNotificationDismissParams = Pick<WebviewNotificationResolveParams, "id" | "dedupeKey">;
|
|
3394
|
+
|
|
3395
|
+
export declare interface WebviewNotificationResolveParams {
|
|
3396
|
+
id?: string;
|
|
3397
|
+
dedupeKey?: string;
|
|
3398
|
+
status?: Extract<NotificationStatus, "done" | "dismissed" | "expired">;
|
|
3399
|
+
}
|
|
3400
|
+
|
|
3401
|
+
export declare interface WebviewNotificationShowParams {
|
|
3402
|
+
level: "info" | "success" | "warning" | "error";
|
|
3403
|
+
title: string;
|
|
3404
|
+
message?: string;
|
|
3405
|
+
}
|
|
3406
|
+
|
|
3407
|
+
export declare interface WebviewPreferencesGetParams {
|
|
3408
|
+
name: string;
|
|
3409
|
+
scope?: {
|
|
3410
|
+
scope: "default" | "user" | "project" | "repo" | "workspace" | "extension" | "session";
|
|
3411
|
+
scopeId?: string;
|
|
3412
|
+
};
|
|
3413
|
+
}
|
|
3414
|
+
|
|
3415
|
+
export declare interface WebviewPreferencesSetParams extends WebviewPreferencesGetParams {
|
|
3416
|
+
value: boolean | number | string | string[] | number[] | boolean[] | Record<string, unknown>;
|
|
3417
|
+
}
|
|
3418
|
+
|
|
3419
|
+
export declare type WebviewScopedDeclarableCapability = (typeof WEBVIEW_SCOPED_DECLARABLE_CAPABILITIES)[number];
|
|
3420
|
+
|
|
3421
|
+
export declare type WebviewSettingsClient<TSettings> = {
|
|
3422
|
+
all: () => Promise<Partial<TSettings>>;
|
|
3423
|
+
get: <K extends keyof TSettings & string>(key: K) => Promise<TSettings[K] | undefined>;
|
|
3424
|
+
set: <K extends keyof TSettings & string>(key: K, value: TSettings[K]) => Promise<void>;
|
|
3425
|
+
};
|
|
3426
|
+
|
|
3427
|
+
export declare type WebviewViewBody = {
|
|
3428
|
+
readonly kind: "webview";
|
|
3429
|
+
} & WebviewContribution;
|
|
3430
|
+
|
|
3431
|
+
export declare interface WhenExpression {
|
|
3432
|
+
mode?: ModeRef | readonly ModeRef[];
|
|
3433
|
+
source?: CommandSource[];
|
|
3434
|
+
view?: ViewRef | readonly ViewRef[];
|
|
3435
|
+
resourceType?: readonly ResourceKindRef[];
|
|
3436
|
+
metadata?: JsonObject;
|
|
3437
|
+
}
|
|
3438
|
+
|
|
3439
|
+
export declare interface WorkbenchAttachmentInvocationContext {
|
|
3440
|
+
target: WorkbenchAttachmentTarget;
|
|
3441
|
+
mode?: string;
|
|
3442
|
+
projectId?: string;
|
|
3443
|
+
resource?: ResourceRef;
|
|
3444
|
+
}
|
|
3445
|
+
|
|
3446
|
+
declare type WorkbenchAttachmentTarget = WorkbenchMenuTarget | WorkbenchTreeTarget | WorkbenchViewTarget | WorkbenchSettingsTarget;
|
|
3447
|
+
|
|
3448
|
+
declare type WorkbenchMenuTarget = (typeof workbenchMenuTargets)[number];
|
|
3449
|
+
|
|
3450
|
+
declare const workbenchMenuTargets: readonly ["workbench.nav.actions", "workbench.nav.overflow"];
|
|
3451
|
+
|
|
3452
|
+
export declare const workbenchModeDefinitions: {
|
|
3453
|
+
readonly project: {
|
|
3454
|
+
readonly ref: {
|
|
3455
|
+
extensionId: string;
|
|
3456
|
+
kind: "mode";
|
|
3457
|
+
id: string;
|
|
3458
|
+
};
|
|
3459
|
+
readonly regions: readonly ["sidenav", "main", "secondary", "side"];
|
|
3460
|
+
};
|
|
3461
|
+
readonly sessions: {
|
|
3462
|
+
readonly ref: {
|
|
3463
|
+
extensionId: string;
|
|
3464
|
+
kind: "mode";
|
|
3465
|
+
id: string;
|
|
3466
|
+
};
|
|
3467
|
+
readonly regions: readonly ["sidenav", "main", "secondary", "side"];
|
|
3468
|
+
};
|
|
3469
|
+
readonly settings: {
|
|
3470
|
+
readonly ref: {
|
|
3471
|
+
extensionId: string;
|
|
3472
|
+
kind: "mode";
|
|
3473
|
+
id: string;
|
|
3474
|
+
};
|
|
3475
|
+
readonly regions: readonly ["sidenav", "main", "secondary", "side"];
|
|
3476
|
+
};
|
|
3477
|
+
};
|
|
3478
|
+
|
|
3479
|
+
export declare const workbenchModes: {
|
|
3480
|
+
project: {
|
|
3481
|
+
extensionId: string;
|
|
3482
|
+
kind: "mode";
|
|
3483
|
+
id: string;
|
|
3484
|
+
};
|
|
3485
|
+
sessions: {
|
|
3486
|
+
extensionId: string;
|
|
3487
|
+
kind: "mode";
|
|
3488
|
+
id: string;
|
|
3489
|
+
};
|
|
3490
|
+
settings: {
|
|
3491
|
+
extensionId: string;
|
|
3492
|
+
kind: "mode";
|
|
3493
|
+
id: string;
|
|
3494
|
+
};
|
|
3495
|
+
};
|
|
3496
|
+
|
|
3497
|
+
export declare const workbenchPageDefinitions: {
|
|
3498
|
+
readonly start: {
|
|
3499
|
+
readonly ref: {
|
|
3500
|
+
extensionId: string;
|
|
3501
|
+
kind: "page";
|
|
3502
|
+
id: string;
|
|
3503
|
+
};
|
|
3504
|
+
readonly mode: {
|
|
3505
|
+
extensionId: string;
|
|
3506
|
+
kind: "mode";
|
|
3507
|
+
id: string;
|
|
3508
|
+
};
|
|
3509
|
+
readonly path: "";
|
|
3510
|
+
readonly primary: {
|
|
3511
|
+
readonly cardinality: "one";
|
|
3512
|
+
readonly resourceKinds: readonly [];
|
|
3513
|
+
};
|
|
3514
|
+
};
|
|
3515
|
+
readonly sessions: {
|
|
3516
|
+
readonly ref: {
|
|
3517
|
+
extensionId: string;
|
|
3518
|
+
kind: "page";
|
|
3519
|
+
id: string;
|
|
3520
|
+
};
|
|
3521
|
+
readonly mode: {
|
|
3522
|
+
extensionId: string;
|
|
3523
|
+
kind: "mode";
|
|
3524
|
+
id: string;
|
|
3525
|
+
};
|
|
3526
|
+
readonly path: "sessions";
|
|
3527
|
+
readonly primary: {
|
|
3528
|
+
readonly cardinality: "one";
|
|
3529
|
+
readonly resourceKinds: readonly [];
|
|
3530
|
+
};
|
|
3531
|
+
};
|
|
3532
|
+
readonly session: {
|
|
3533
|
+
readonly ref: {
|
|
3534
|
+
extensionId: string;
|
|
3535
|
+
kind: "page";
|
|
3536
|
+
id: string;
|
|
3537
|
+
};
|
|
3538
|
+
readonly mode: {
|
|
3539
|
+
extensionId: string;
|
|
3540
|
+
kind: "mode";
|
|
3541
|
+
id: string;
|
|
3542
|
+
};
|
|
3543
|
+
readonly path: "session";
|
|
3544
|
+
readonly primary: {
|
|
3545
|
+
readonly cardinality: "one";
|
|
3546
|
+
readonly resourceKinds: readonly ["session", "session-draft"];
|
|
3547
|
+
};
|
|
3548
|
+
};
|
|
3549
|
+
readonly workspaces: {
|
|
3550
|
+
readonly ref: {
|
|
3551
|
+
extensionId: string;
|
|
3552
|
+
kind: "page";
|
|
3553
|
+
id: string;
|
|
3554
|
+
};
|
|
3555
|
+
readonly mode: {
|
|
3556
|
+
extensionId: string;
|
|
3557
|
+
kind: "mode";
|
|
3558
|
+
id: string;
|
|
3559
|
+
};
|
|
3560
|
+
readonly path: "workspaces";
|
|
3561
|
+
readonly primary: {
|
|
3562
|
+
readonly cardinality: "one";
|
|
3563
|
+
readonly resourceKinds: readonly [];
|
|
3564
|
+
};
|
|
3565
|
+
};
|
|
3566
|
+
readonly workspace: {
|
|
3567
|
+
readonly ref: {
|
|
3568
|
+
extensionId: string;
|
|
3569
|
+
kind: "page";
|
|
3570
|
+
id: string;
|
|
3571
|
+
};
|
|
3572
|
+
readonly mode: {
|
|
3573
|
+
extensionId: string;
|
|
3574
|
+
kind: "mode";
|
|
3575
|
+
id: string;
|
|
3576
|
+
};
|
|
3577
|
+
readonly path: "workspace";
|
|
3578
|
+
readonly primary: {
|
|
3579
|
+
readonly cardinality: "many";
|
|
3580
|
+
readonly resourceKinds: readonly ["workspace"];
|
|
3581
|
+
};
|
|
3582
|
+
};
|
|
3583
|
+
};
|
|
3584
|
+
|
|
3585
|
+
export declare const workbenchPages: {
|
|
3586
|
+
start: {
|
|
3587
|
+
extensionId: string;
|
|
3588
|
+
kind: "page";
|
|
3589
|
+
id: string;
|
|
3590
|
+
};
|
|
3591
|
+
sessions: {
|
|
3592
|
+
extensionId: string;
|
|
3593
|
+
kind: "page";
|
|
3594
|
+
id: string;
|
|
3595
|
+
};
|
|
3596
|
+
session: {
|
|
3597
|
+
extensionId: string;
|
|
3598
|
+
kind: "page";
|
|
3599
|
+
id: string;
|
|
3600
|
+
};
|
|
3601
|
+
workspaces: {
|
|
3602
|
+
extensionId: string;
|
|
3603
|
+
kind: "page";
|
|
3604
|
+
id: string;
|
|
3605
|
+
};
|
|
3606
|
+
workspace: {
|
|
3607
|
+
extensionId: string;
|
|
3608
|
+
kind: "page";
|
|
3609
|
+
id: string;
|
|
3610
|
+
};
|
|
3611
|
+
};
|
|
3612
|
+
|
|
3613
|
+
export declare const workbenchPanelDefinitions: {
|
|
3614
|
+
readonly projectSession: {
|
|
3615
|
+
readonly ref: {
|
|
3616
|
+
extensionId: string;
|
|
3617
|
+
kind: "placement";
|
|
3618
|
+
id: string;
|
|
3619
|
+
};
|
|
3620
|
+
readonly mode: {
|
|
3621
|
+
extensionId: string;
|
|
3622
|
+
kind: "mode";
|
|
3623
|
+
id: string;
|
|
3624
|
+
};
|
|
3625
|
+
readonly cardinality: "many";
|
|
3626
|
+
readonly resourceKinds: readonly ["session", "session-draft"];
|
|
3627
|
+
};
|
|
3628
|
+
};
|
|
3629
|
+
|
|
3630
|
+
export declare const workbenchPanels: {
|
|
3631
|
+
projectSession: {
|
|
3632
|
+
extensionId: string;
|
|
3633
|
+
kind: "placement";
|
|
3634
|
+
id: string;
|
|
3635
|
+
};
|
|
3636
|
+
};
|
|
3637
|
+
|
|
3638
|
+
export declare const workbenchResourceKindDefinitions: {
|
|
3639
|
+
project: ResourceKindDefinition;
|
|
3640
|
+
session: ResourceKindDefinition;
|
|
3641
|
+
workspace: ResourceKindDefinition;
|
|
3642
|
+
};
|
|
3643
|
+
|
|
3644
|
+
export declare const workbenchResourceKinds: {
|
|
3645
|
+
project: ContributionRef<"resource-kind">;
|
|
3646
|
+
session: ContributionRef<"resource-kind">;
|
|
3647
|
+
workspace: ContributionRef<"resource-kind">;
|
|
3648
|
+
};
|
|
3649
|
+
|
|
3650
|
+
declare type WorkbenchSettingsTarget = (typeof workbenchSettingsTargets)[number];
|
|
3651
|
+
|
|
3652
|
+
declare const workbenchSettingsTargets: readonly ["workbench.settings"];
|
|
3653
|
+
|
|
3654
|
+
export declare const workbenchSlots: {
|
|
3655
|
+
projectSettings: {
|
|
3656
|
+
extensionId: string;
|
|
3657
|
+
kind: "settings-panel";
|
|
3658
|
+
id: string;
|
|
3659
|
+
};
|
|
3660
|
+
statusBarLeading: {
|
|
3661
|
+
extensionId: string;
|
|
3662
|
+
kind: "status-bar-item";
|
|
3663
|
+
id: string;
|
|
3664
|
+
};
|
|
3665
|
+
statusBarTrailing: {
|
|
3666
|
+
extensionId: string;
|
|
3667
|
+
kind: "status-bar-item";
|
|
3668
|
+
id: string;
|
|
3669
|
+
};
|
|
3670
|
+
};
|
|
3671
|
+
|
|
3672
|
+
declare type WorkbenchTreeTarget = (typeof workbenchTreeTargets)[number];
|
|
3673
|
+
|
|
3674
|
+
declare const workbenchTreeTargets: readonly ["workbench.left.tree", "workbench.main.left.tree", "workbench.main.right.tree"];
|
|
3675
|
+
|
|
3676
|
+
declare type WorkbenchViewTarget = (typeof workbenchViewTargets)[number];
|
|
3677
|
+
|
|
3678
|
+
declare const workbenchViewTargets: readonly ["workbench.main", "workbench.main.left", "workbench.main.right", "workbench.secondary"];
|
|
3679
|
+
|
|
3680
|
+
export declare interface WorkflowStatus {
|
|
3681
|
+
readonly id: string;
|
|
3682
|
+
readonly label: string;
|
|
3683
|
+
readonly color: string;
|
|
3684
|
+
readonly icon?: string | null;
|
|
3685
|
+
readonly sortOrder: number;
|
|
3686
|
+
readonly isDefault?: boolean;
|
|
3687
|
+
readonly actions?: readonly string[];
|
|
3688
|
+
}
|
|
3689
|
+
|
|
3690
|
+
export declare interface WorkspaceCapabilities {
|
|
3691
|
+
files: "none" | "read" | "write";
|
|
3692
|
+
diff: boolean;
|
|
3693
|
+
merge: boolean;
|
|
3694
|
+
rebase: boolean;
|
|
3695
|
+
archive: boolean;
|
|
3696
|
+
delete: boolean;
|
|
3697
|
+
}
|
|
3698
|
+
|
|
3699
|
+
export declare const workspaceEvents: {
|
|
3700
|
+
created: EventRef< {
|
|
3701
|
+
workspace: ExtensionWorkspace;
|
|
3702
|
+
}>;
|
|
3703
|
+
/** Awaited: harness extensions sync their agent dir into the working tree. Gates workspace readiness. */
|
|
3704
|
+
provision: EventRef<WorkspaceProvisionPayload>;
|
|
3705
|
+
/** Fire-and-forget after the workspace is ready: background setup (deps install, builds). */
|
|
3706
|
+
ready: EventRef<WorkspaceProvisionPayload>;
|
|
3707
|
+
archived: EventRef< {
|
|
3708
|
+
workspace: ExtensionWorkspace;
|
|
3709
|
+
}>;
|
|
3710
|
+
deleted: EventRef< {
|
|
3711
|
+
workspace: ExtensionWorkspace;
|
|
3712
|
+
}>;
|
|
3713
|
+
};
|
|
3714
|
+
|
|
3715
|
+
export declare type WorkspaceExecutionTarget = {
|
|
3716
|
+
kind: "local";
|
|
3717
|
+
rootPath: string;
|
|
3718
|
+
displayPath?: string;
|
|
3719
|
+
} | {
|
|
3720
|
+
kind: "remote";
|
|
3721
|
+
providerId: string;
|
|
3722
|
+
providerRef: WorkspaceProviderRef;
|
|
3723
|
+
displayPath?: string;
|
|
3724
|
+
};
|
|
3725
|
+
|
|
3726
|
+
export declare interface WorkspaceFilesMount extends ArtifactMount {
|
|
3727
|
+
/**
|
|
3728
|
+
* Write each file atomically (temp + rename) and prune files managed by an earlier sync that are no
|
|
3729
|
+
* longer present. Other files under `dir` are preserved. Idempotent and safe to re-run on every
|
|
3730
|
+
* catalog change; a live agent's dir-watcher only ever sees complete files.
|
|
3731
|
+
*/
|
|
3732
|
+
syncDir(dir: string, files: WorkspaceSyncFile[]): Promise<void>;
|
|
3733
|
+
}
|
|
3734
|
+
|
|
3735
|
+
export declare interface WorkspaceProviderCreateInput {
|
|
3736
|
+
operationId: string;
|
|
3737
|
+
projectId: string;
|
|
3738
|
+
workspaceId: string;
|
|
3739
|
+
params: JsonObject;
|
|
3740
|
+
/** Host-owned cancellation for the workspace creation request. */
|
|
3741
|
+
signal?: AbortSignal;
|
|
3742
|
+
}
|
|
3743
|
+
|
|
3744
|
+
export declare interface WorkspaceProviderMutationInput extends WorkspaceProviderResolveInput {
|
|
3745
|
+
operationId: string;
|
|
3746
|
+
}
|
|
3747
|
+
|
|
3748
|
+
export declare interface WorkspaceProviderRef {
|
|
3749
|
+
version: number;
|
|
3750
|
+
data: JsonObject;
|
|
3751
|
+
}
|
|
3752
|
+
|
|
3753
|
+
export declare interface WorkspaceProviderResolveInput {
|
|
3754
|
+
projectId: string;
|
|
3755
|
+
workspaceId: string;
|
|
3756
|
+
providerRef: WorkspaceProviderRef;
|
|
3757
|
+
}
|
|
3758
|
+
|
|
3759
|
+
export declare interface WorkspaceProviderResult {
|
|
3760
|
+
providerRef?: WorkspaceProviderRef;
|
|
3761
|
+
/** Git branch exposed to host merge and diff features. Provider refs stay opaque. */
|
|
3762
|
+
branch?: string;
|
|
3763
|
+
state: WorkspaceProviderState;
|
|
3764
|
+
executionKind: "local" | "remote";
|
|
3765
|
+
executionTarget?: WorkspaceExecutionTarget;
|
|
3766
|
+
displayPath?: string;
|
|
3767
|
+
capabilities: WorkspaceCapabilities;
|
|
3768
|
+
error?: {
|
|
3769
|
+
code: string;
|
|
3770
|
+
message: string;
|
|
3771
|
+
retryable: boolean;
|
|
3772
|
+
};
|
|
3773
|
+
}
|
|
3774
|
+
|
|
3775
|
+
export declare type WorkspaceProviderState = "provisioning" | "ready" | "failed" | "cancelled" | "archiving" | "archived" | "deleting" | "provider_missing";
|
|
3776
|
+
|
|
3777
|
+
export declare interface WorkspaceProvisionPayload {
|
|
3778
|
+
projectId: string;
|
|
3779
|
+
workspaceId: string;
|
|
3780
|
+
workspace: ExtensionWorkspace;
|
|
3781
|
+
/** Absolute working directory to materialize files into — a worktree path or the repo root. */
|
|
3782
|
+
workspaceDir: string;
|
|
3783
|
+
repoPath: string;
|
|
3784
|
+
branch?: string;
|
|
3785
|
+
type: WorkspaceType;
|
|
3786
|
+
}
|
|
3787
|
+
|
|
3788
|
+
export declare const workspaceSlots: {
|
|
3789
|
+
headerPrimary: SlotRef<object, "menu">;
|
|
3790
|
+
headerOverflow: SlotRef<object, "menu">;
|
|
3791
|
+
sidenav: SlotRef<object, "panel">;
|
|
3792
|
+
};
|
|
3793
|
+
|
|
3794
|
+
export declare interface WorkspaceSyncFile {
|
|
3795
|
+
/** Path relative to the `dir` passed to {@link WorkspaceFilesMount.syncDir}. */
|
|
3796
|
+
path: string;
|
|
3797
|
+
content: string;
|
|
3798
|
+
}
|
|
3799
|
+
|
|
3800
|
+
/** How a workspace's working tree is backed. `root` = the repo checkout itself; `cloud` is reserved. */
|
|
3801
|
+
export declare type WorkspaceType = "worktree" | "root" | "cloud";
|
|
3802
|
+
|
|
3803
|
+
export declare interface WorkspaceTypeProvider extends ContributionDefinition<"workspace-type"> {
|
|
3804
|
+
label: Localizable<string>;
|
|
3805
|
+
params?: ParamObjectSchema;
|
|
3806
|
+
create(ctx: ExtensionContextBase, input: WorkspaceProviderCreateInput): MaybePromise<WorkspaceProviderResult>;
|
|
3807
|
+
resolve(ctx: ExtensionContextBase, input: WorkspaceProviderResolveInput): MaybePromise<WorkspaceProviderResult>;
|
|
3808
|
+
cancel?(ctx: ExtensionContextBase, input: WorkspaceProviderMutationInput): MaybePromise<WorkspaceProviderResult>;
|
|
3809
|
+
archive?(ctx: ExtensionContextBase, input: WorkspaceProviderMutationInput): MaybePromise<WorkspaceProviderResult>;
|
|
3810
|
+
delete?(ctx: ExtensionContextBase, input: WorkspaceProviderMutationInput): MaybePromise<void>;
|
|
3811
|
+
}
|
|
3812
|
+
|
|
3813
|
+
export declare const worktreeEvents: {
|
|
3814
|
+
removed: EventRef<WorktreeRemovedPayload>;
|
|
3815
|
+
};
|
|
3816
|
+
|
|
3817
|
+
export declare interface WorktreeRemovedPayload {
|
|
3818
|
+
projectId: string;
|
|
3819
|
+
repoPath?: string;
|
|
3820
|
+
worktreePath: string;
|
|
3821
|
+
workspace?: ExtensionWorkspace;
|
|
3822
|
+
workspaceId?: string;
|
|
3823
|
+
anchors?: ResourceAnchor[];
|
|
3824
|
+
}
|
|
3825
|
+
|
|
3826
|
+
export { }
|