@pstdio/sdk 0.25.0 → 0.36.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 +56 -0
- package/dist/api/index.js +2409 -896
- package/dist/api.d.ts +15 -3787
- package/dist/client/index.js +27 -9
- package/dist/client.d.ts +3 -1728
- package/dist/data/index.js +4 -4
- package/dist/data.d.ts +27 -49
- package/dist/extensions/index.js +200 -4
- package/dist/extensions-react.d.ts +18 -23
- package/dist/extensions.d.ts +3 -3940
- package/dist/hooks.d.ts +95 -1789
- package/dist/index-CR17_9lz.d.ts +7907 -0
- package/dist/index-DHgymE3o.d.ts +7 -0
- package/dist/index-ec4rxUeY.d.ts +264 -0
- package/dist/prompts.d.ts +4 -3
- package/dist/resources/index.js +2409 -896
- package/dist/resources.d.ts +4 -426
- package/dist/sessions-BfZI6tY0.d.ts +2 -0
- package/dist/skills-BfZI6tY0.d.ts +2 -0
- package/dist/testing/index.js +15 -2
- package/dist/testing.d.ts +27 -921
- package/package.json +1 -1
package/dist/testing.d.ts
CHANGED
|
@@ -1,921 +1,27 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
readonly source?: CommandSource;
|
|
29
|
-
readonly attachment?: WorkbenchAttachmentInvocationContext;
|
|
30
|
-
readonly slot?: SlotInvocationContext;
|
|
31
|
-
readonly metadata?: JsonObject;
|
|
32
|
-
};
|
|
33
|
-
resource?: ResourceRef;
|
|
34
|
-
attachment?: WorkbenchAttachmentInvocationContext;
|
|
35
|
-
slot?: SlotInvocationContext;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export declare interface CommandContextInput<TParams extends Record<string, unknown>> {
|
|
39
|
-
storage: ExtensionStorageApi;
|
|
40
|
-
params: TParams;
|
|
41
|
-
projectId?: string;
|
|
42
|
-
resourcePrefixes?: Record<string, string>;
|
|
43
|
-
overrides?: CommandContextOverrides;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export declare type CommandContextOverrides = {
|
|
47
|
-
[K in keyof CommandContext]?: Partial<CommandContext[K]>;
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
declare interface CommandContinue {
|
|
51
|
-
type: "continue";
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
declare interface CommandDiagnostic {
|
|
55
|
-
code: string;
|
|
56
|
-
message: string;
|
|
57
|
-
severity: "info" | "warning" | "error";
|
|
58
|
-
extensionId?: string;
|
|
59
|
-
commandId?: string;
|
|
60
|
-
metadata?: JsonObject;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
declare interface CommandHelpersApi {
|
|
64
|
-
execute<TParams extends Struct = Struct, TResult = unknown>(command: CommandRef<TParams, TResult>, invocation: CommandInvocation<TParams>): Promise<CommandOutcome<TResult>>;
|
|
65
|
-
continue(): CommandContinue;
|
|
66
|
-
patchParams<TParams extends Struct = Struct>(params: Partial<TParams>): CommandPatchParams<TParams>;
|
|
67
|
-
replaceParams<TParams extends Struct = Struct>(params: TParams): CommandReplaceParams<TParams>;
|
|
68
|
-
replaceInvocation<TParams extends Struct = Struct>(invocation: CommandInvocation<TParams>): CommandReplaceInvocation<TParams>;
|
|
69
|
-
reject(input: Omit<CommandReject, "type">): CommandReject;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
declare interface CommandInvocation<TParams extends Struct = Struct> {
|
|
73
|
-
params: TParams;
|
|
74
|
-
resource?: ResourceRef;
|
|
75
|
-
repoId?: string;
|
|
76
|
-
repoPath?: string;
|
|
77
|
-
attachment?: WorkbenchAttachmentInvocationContext;
|
|
78
|
-
slot?: SlotInvocationContext;
|
|
79
|
-
metadata?: JsonObject;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
declare interface CommandNotice {
|
|
83
|
-
type: "info" | "success" | "warning" | "error";
|
|
84
|
-
title?: string;
|
|
85
|
-
message: string;
|
|
86
|
-
metadata?: JsonObject;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
declare type CommandOutcome<TResult = unknown> = {
|
|
90
|
-
ok: true;
|
|
91
|
-
status: "success";
|
|
92
|
-
value: TResult;
|
|
93
|
-
navigationRequests?: NavigationTarget[];
|
|
94
|
-
notices?: CommandNotice[];
|
|
95
|
-
diagnostics?: CommandDiagnostic[];
|
|
96
|
-
} | {
|
|
97
|
-
ok: false;
|
|
98
|
-
status: "rejected";
|
|
99
|
-
code?: string;
|
|
100
|
-
reason: string;
|
|
101
|
-
data?: JsonObject;
|
|
102
|
-
notices?: CommandNotice[];
|
|
103
|
-
diagnostics?: CommandDiagnostic[];
|
|
104
|
-
} | {
|
|
105
|
-
ok: false;
|
|
106
|
-
status: "error";
|
|
107
|
-
code?: string;
|
|
108
|
-
reason: string;
|
|
109
|
-
error?: SerializedError;
|
|
110
|
-
notices?: CommandNotice[];
|
|
111
|
-
diagnostics?: CommandDiagnostic[];
|
|
112
|
-
};
|
|
113
|
-
|
|
114
|
-
export declare const commandParamsFor: <TParams extends Record<string, unknown>>(context: CommandContext) => TParams;
|
|
115
|
-
|
|
116
|
-
declare interface CommandPatchParams<TParams extends Struct = Struct> {
|
|
117
|
-
type: "patchParams";
|
|
118
|
-
params: Partial<TParams>;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
declare interface CommandRef<TParams extends Struct = Struct, TResult = unknown> extends ContributionRef<"command"> {
|
|
122
|
-
params?: TParams;
|
|
123
|
-
result?: TResult;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
declare interface CommandReject {
|
|
127
|
-
type: "reject";
|
|
128
|
-
code?: string;
|
|
129
|
-
reason: string;
|
|
130
|
-
data?: JsonObject;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
declare interface CommandReplaceInvocation<TParams extends Struct = Struct> {
|
|
134
|
-
type: "replaceInvocation";
|
|
135
|
-
invocation: CommandInvocation<TParams>;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
declare interface CommandReplaceParams<TParams extends Struct = Struct> {
|
|
139
|
-
type: "replaceParams";
|
|
140
|
-
params: TParams;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
declare type CommandSource = "cli" | "dashboard" | "api" | "schedule" | "event" | "automation" | "command-panel";
|
|
144
|
-
|
|
145
|
-
declare interface CommandTarget<TParams extends Struct = Struct> {
|
|
146
|
-
command: CommandRef<TParams, unknown>;
|
|
147
|
-
params?: TParams;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
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";
|
|
151
|
-
|
|
152
|
-
declare interface ContributionRef<Kind extends ContributionKind> {
|
|
153
|
-
readonly extensionId?: string;
|
|
154
|
-
readonly kind: Kind;
|
|
155
|
-
readonly id: string;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
declare interface CreateExtensionWorkspaceInput {
|
|
159
|
-
project_id?: string;
|
|
160
|
-
shorthand_base: string;
|
|
161
|
-
provider_id?: string;
|
|
162
|
-
params?: JsonObject;
|
|
163
|
-
anchors?: ResourceAnchor[];
|
|
164
|
-
repo_id?: string;
|
|
165
|
-
base?: string;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
export declare const createMemoryRepoFiles: () => ArtifactMount & {
|
|
169
|
-
files: Map<string, Uint8Array>;
|
|
170
|
-
};
|
|
171
|
-
|
|
172
|
-
export declare const createMemoryResources: (prefixes: Record<string, string>, sequences?: Map<string, number>) => ExtensionResourcesApi;
|
|
173
|
-
|
|
174
|
-
export declare const createMemoryStorage: () => ExtensionStorageApi;
|
|
175
|
-
|
|
176
|
-
declare interface CreateNotificationInput {
|
|
177
|
-
projectId: string;
|
|
178
|
-
title: string;
|
|
179
|
-
body?: string;
|
|
180
|
-
kind: NotificationKind;
|
|
181
|
-
priority?: NotificationPriority;
|
|
182
|
-
target?: ResourceRef;
|
|
183
|
-
related?: ResourceRef[];
|
|
184
|
-
actions?: NotificationAction[];
|
|
185
|
-
dedupeKey?: string;
|
|
186
|
-
expiresAt?: string;
|
|
187
|
-
snoozedUntil?: string;
|
|
188
|
-
metadata?: JsonObject;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
declare interface EventDeliveryResult {
|
|
192
|
-
delivered: number;
|
|
193
|
-
diagnostics?: CommandDiagnostic[];
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
declare interface EventRef<TPayload extends Struct = Struct> {
|
|
197
|
-
readonly extensionId?: string;
|
|
198
|
-
readonly kind: "event";
|
|
199
|
-
readonly id: string;
|
|
200
|
-
payload?: TPayload;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
declare interface ExtensionActivityApi {
|
|
204
|
-
record(input: {
|
|
205
|
-
message: string;
|
|
206
|
-
target?: ResourceRef;
|
|
207
|
-
related?: ResourceRef[];
|
|
208
|
-
metadata?: JsonObject;
|
|
209
|
-
}): Promise<{
|
|
210
|
-
id: string;
|
|
211
|
-
}>;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
declare interface ExtensionArtifactApi {
|
|
215
|
-
mount(key: string): ArtifactMount;
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
declare interface ExtensionBlobInput {
|
|
219
|
-
name: string;
|
|
220
|
-
data: Uint8Array | ArrayBuffer;
|
|
221
|
-
mimeType?: string | null;
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
declare interface ExtensionBlobRef {
|
|
225
|
-
id: string;
|
|
226
|
-
name: string;
|
|
227
|
-
mimeType: string | null;
|
|
228
|
-
size: number;
|
|
229
|
-
hash: string | null;
|
|
230
|
-
url: string;
|
|
231
|
-
createdAt: string;
|
|
232
|
-
updatedAt: string;
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
declare interface ExtensionBlobsApi {
|
|
236
|
-
put(input: ExtensionBlobInput): Promise<ExtensionBlobRef>;
|
|
237
|
-
get(id: string): Promise<ExtensionBlobRef | undefined>;
|
|
238
|
-
getBytes(id: string): Promise<Uint8Array>;
|
|
239
|
-
list(): Promise<ExtensionBlobRef[]>;
|
|
240
|
-
delete(id: string): Promise<void>;
|
|
241
|
-
urlFor(id: string): string;
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
declare type ExtensionConnectionMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
|
|
245
|
-
|
|
246
|
-
declare interface ExtensionConnectionRequest {
|
|
247
|
-
method: ExtensionConnectionMethod;
|
|
248
|
-
path: string;
|
|
249
|
-
headers?: Record<string, string>;
|
|
250
|
-
body?: JsonValue;
|
|
251
|
-
timeoutMs?: number;
|
|
252
|
-
signal?: AbortSignal;
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
declare interface ExtensionConnectionResponse<TBody = JsonValue> {
|
|
256
|
-
status: number;
|
|
257
|
-
headers: Record<string, string>;
|
|
258
|
-
body: TBody;
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
declare interface ExtensionConnectionsApi {
|
|
262
|
-
request<TBody = JsonValue>(connectionId: string, input: ExtensionConnectionRequest): Promise<ExtensionConnectionResponse<TBody>>;
|
|
263
|
-
stream(connectionId: string, input: ExtensionConnectionRequest): AsyncIterable<ExtensionConnectionStreamEvent>;
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
declare type ExtensionConnectionStreamEvent = {
|
|
267
|
-
type: "response";
|
|
268
|
-
status: number;
|
|
269
|
-
headers: Record<string, string>;
|
|
270
|
-
} | {
|
|
271
|
-
type: "data";
|
|
272
|
-
data: Uint8Array;
|
|
273
|
-
} | {
|
|
274
|
-
type: "end";
|
|
275
|
-
};
|
|
276
|
-
|
|
277
|
-
declare interface ExtensionContextBase<TSettings extends Record<string, unknown> = Record<string, unknown>> {
|
|
278
|
-
projectId: string;
|
|
279
|
-
/** Host workspace id when the command runs from inside a worktree-backed workspace. */
|
|
280
|
-
workspaceId?: string;
|
|
281
|
-
project: ExtensionProjectContext;
|
|
282
|
-
extensionId: string;
|
|
283
|
-
/** Extension package name. Used for grouping/prefixing user-facing references. */
|
|
284
|
-
name: string;
|
|
285
|
-
repo?: RepoContext;
|
|
286
|
-
source?: CommandSource;
|
|
287
|
-
storage: ExtensionStorageApi;
|
|
288
|
-
resources: ExtensionResourcesApi;
|
|
289
|
-
/** Records navigation for the invoking UI; headless execution opens nothing. */
|
|
290
|
-
navigation: {
|
|
291
|
-
open(target: NavigationTarget): void;
|
|
292
|
-
};
|
|
293
|
-
artifacts: ExtensionArtifactApi;
|
|
294
|
-
/** Working tree of the invocation's repo, scoped to its root. Absent for non-repo (event/hook) invocations. */
|
|
295
|
-
repoFiles?: ArtifactMount;
|
|
296
|
-
/** Files of the workspace this context targets, scoped to its working dir. */
|
|
297
|
-
workspaceFiles?: WorkspaceFilesMount;
|
|
298
|
-
/** Read-only files packaged with the installed extension, scoped to its package root. */
|
|
299
|
-
packageFiles: ExtensionPackageFilesApi;
|
|
300
|
-
/** Repo directory allocated to this extension. Present wherever repoFiles is present. */
|
|
301
|
-
extensionFiles?: ArtifactMount;
|
|
302
|
-
files: ExtensionFilesApi;
|
|
303
|
-
/** Project skill catalog. Present where the host wires it (command/event contexts). */
|
|
304
|
-
skills?: ExtensionSkillsApi;
|
|
305
|
-
sessions: ExtensionSessionsApi;
|
|
306
|
-
workspaces: ExtensionWorkspacesApi;
|
|
307
|
-
repos: ExtensionReposApi;
|
|
308
|
-
commands: CommandHelpersApi;
|
|
309
|
-
events: ExtensionEventsApi;
|
|
310
|
-
activity: ExtensionActivityApi;
|
|
311
|
-
notify: ExtensionNotifyApi;
|
|
312
|
-
process: ExtensionProcessApi;
|
|
313
|
-
/** Interactive PTY sessions. Present only where the host wires a terminal supervisor (e.g. the workbench panel). */
|
|
314
|
-
terminal?: ExtensionTerminalApi;
|
|
315
|
-
net: ExtensionNetApi;
|
|
316
|
-
connections: ExtensionConnectionsApi;
|
|
317
|
-
logger: ExtensionLoggerApi;
|
|
318
|
-
settings: ExtensionSettingsApi<TSettings>;
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
declare interface ExtensionEventsApi {
|
|
322
|
-
emit<TPayload extends Struct>(event: EventRef<TPayload> | string, payload: TPayload): Promise<EventDeliveryResult>;
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
declare interface ExtensionFilesApi {
|
|
326
|
-
readText(fileId: string): Promise<string>;
|
|
327
|
-
writeText(fileId: string, value: string): Promise<void>;
|
|
328
|
-
createText(input: {
|
|
329
|
-
name: string;
|
|
330
|
-
content: string;
|
|
331
|
-
metadata?: JsonObject;
|
|
332
|
-
}): Promise<{
|
|
333
|
-
id: string;
|
|
334
|
-
}>;
|
|
335
|
-
delete(fileId: string): Promise<void>;
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
declare interface ExtensionHarnessInput {
|
|
339
|
-
harnessId: string;
|
|
340
|
-
model?: string;
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
declare interface ExtensionLoggerApi {
|
|
344
|
-
info(message: string, metadata?: JsonObject): void;
|
|
345
|
-
warn(message: string, metadata?: JsonObject): void;
|
|
346
|
-
error(message: string, metadata?: JsonObject): void;
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
declare interface ExtensionNetApi {
|
|
350
|
-
findFreePort(input?: {
|
|
351
|
-
host?: string;
|
|
352
|
-
}): Promise<number>;
|
|
353
|
-
}
|
|
354
|
-
|
|
355
|
-
declare interface ExtensionNotifyApi {
|
|
356
|
-
toast(notice: CommandNotice): Promise<void>;
|
|
357
|
-
action(input: Omit<CreateNotificationInput, "projectId">): Promise<Notification_2>;
|
|
358
|
-
resolve(input: {
|
|
359
|
-
id?: string;
|
|
360
|
-
dedupeKey?: string;
|
|
361
|
-
status?: Extract<NotificationStatus, "done" | "dismissed" | "expired">;
|
|
362
|
-
}): Promise<Notification_2[]>;
|
|
363
|
-
dismiss(input: {
|
|
364
|
-
id?: string;
|
|
365
|
-
dedupeKey?: string;
|
|
366
|
-
}): Promise<Notification_2[]>;
|
|
367
|
-
}
|
|
368
|
-
|
|
369
|
-
declare type ExtensionPackageFilesApi = Pick<ArtifactMount, "exists" | "readText" | "readBytes" | "list" | "listDirs">;
|
|
370
|
-
|
|
371
|
-
declare interface ExtensionProcessApi {
|
|
372
|
-
run(input: ProcessRunInput): Promise<ProcessRunResult>;
|
|
373
|
-
runOrThrow(input: ProcessRunInput): Promise<ProcessRunResult>;
|
|
374
|
-
/**
|
|
375
|
-
* Starts an independent process with no attached standard streams.
|
|
376
|
-
* It survives runtime and desktop shutdown and does not delay host exit.
|
|
377
|
-
* The extension owns the child's lifetime and must arrange its cleanup.
|
|
378
|
-
*/
|
|
379
|
-
spawnDetached(input: {
|
|
380
|
-
command: string[];
|
|
381
|
-
cwd?: string;
|
|
382
|
-
env?: Record<string, string>;
|
|
383
|
-
}): Promise<{
|
|
384
|
-
pid?: number;
|
|
385
|
-
}>;
|
|
386
|
-
}
|
|
387
|
-
|
|
388
|
-
declare interface ExtensionProjectContext {
|
|
389
|
-
id: string;
|
|
390
|
-
name: string;
|
|
391
|
-
shorthand: string;
|
|
392
|
-
}
|
|
393
|
-
|
|
394
|
-
declare interface ExtensionReposApi {
|
|
395
|
-
list(): Promise<RepoContext[]>;
|
|
396
|
-
get(repoId: string): Promise<RepoContext>;
|
|
397
|
-
getDefault(): Promise<RepoContext | undefined>;
|
|
398
|
-
resolvePath(repoId: string, relativePath: string, options?: {
|
|
399
|
-
basePath?: string;
|
|
400
|
-
}): Promise<string>;
|
|
401
|
-
}
|
|
402
|
-
|
|
403
|
-
declare interface ExtensionResourcesApi {
|
|
404
|
-
/** Publish a committed removal to clients displaying this project resource. */
|
|
405
|
-
removed(resource: ResourceRef): Promise<void>;
|
|
406
|
-
allocate(input: {
|
|
407
|
-
kind: string;
|
|
408
|
-
}): Promise<{
|
|
409
|
-
id: string;
|
|
410
|
-
shorthand: string;
|
|
411
|
-
}>;
|
|
412
|
-
}
|
|
413
|
-
|
|
414
|
-
declare interface ExtensionSessionResource {
|
|
415
|
-
type: "session";
|
|
416
|
-
id: string;
|
|
417
|
-
title: string;
|
|
418
|
-
status: SessionStatus;
|
|
419
|
-
}
|
|
420
|
-
|
|
421
|
-
declare interface ExtensionSessionsApi {
|
|
422
|
-
get(id: string): Promise<{
|
|
423
|
-
id: string;
|
|
424
|
-
title: string;
|
|
425
|
-
status?: string;
|
|
426
|
-
original_session_id?: string | null;
|
|
427
|
-
cwd?: string | null;
|
|
428
|
-
updated_at?: string | null;
|
|
429
|
-
anchors_json?: ResourceAnchor[];
|
|
430
|
-
} | null>;
|
|
431
|
-
list(): Promise<Array<{
|
|
432
|
-
id: string;
|
|
433
|
-
title: string;
|
|
434
|
-
status: SessionStatus;
|
|
435
|
-
last_request_started?: string | null;
|
|
436
|
-
last_request_ended?: string | null;
|
|
437
|
-
updated_at?: string | null;
|
|
438
|
-
anchors_json?: ResourceAnchor[];
|
|
439
|
-
}>>;
|
|
440
|
-
/** Sessions linked to a workspace (via the workspace-session join), oldest first. */
|
|
441
|
-
listByWorkspace(workspaceId: string): Promise<Array<{
|
|
442
|
-
id: string;
|
|
443
|
-
title: string;
|
|
444
|
-
status: SessionStatus;
|
|
445
|
-
created_at?: string | null;
|
|
446
|
-
updated_at?: string | null;
|
|
447
|
-
anchors_json?: ResourceAnchor[];
|
|
448
|
-
}>>;
|
|
449
|
-
create(input: {
|
|
450
|
-
title: string;
|
|
451
|
-
prompt?: string;
|
|
452
|
-
harness?: ExtensionHarnessInput;
|
|
453
|
-
workspaceId?: string;
|
|
454
|
-
repoId?: string;
|
|
455
|
-
anchors?: ResourceAnchor[];
|
|
456
|
-
attachments?: SessionAttachmentRef[];
|
|
457
|
-
originalSessionId?: string;
|
|
458
|
-
}): Promise<ExtensionSessionResource>;
|
|
459
|
-
followup(input: {
|
|
460
|
-
sessionId: string;
|
|
461
|
-
prompt?: string;
|
|
462
|
-
attachments?: SessionAttachmentRef[];
|
|
463
|
-
}): Promise<void>;
|
|
464
|
-
addAnchors(sessionId: string, anchors: ResourceAnchor[]): Promise<void>;
|
|
465
|
-
}
|
|
466
|
-
|
|
467
|
-
declare interface ExtensionSettingsApi<TSettings extends Record<string, unknown> = Record<string, unknown>> {
|
|
468
|
-
all(): Promise<Partial<TSettings>>;
|
|
469
|
-
get<TKey extends keyof TSettings & string>(key: TKey): Promise<TSettings[TKey] | undefined>;
|
|
470
|
-
set<TKey extends keyof TSettings & string>(key: TKey, value: TSettings[TKey]): Promise<void>;
|
|
471
|
-
delete<TKey extends keyof TSettings & string>(key: TKey): Promise<void>;
|
|
472
|
-
}
|
|
473
|
-
|
|
474
|
-
declare interface ExtensionSkillsApi {
|
|
475
|
-
/** The project's resolved skill catalog (DB skills + extension-contributed skills, deduped). */
|
|
476
|
-
list(): Promise<Skill[]>;
|
|
477
|
-
}
|
|
478
|
-
|
|
479
|
-
declare interface ExtensionStorageApi {
|
|
480
|
-
scope(scope: StorageScope): ExtensionStorageApi;
|
|
481
|
-
files: ExtensionBlobsApi;
|
|
482
|
-
get<T = unknown>(key: string): Promise<T | undefined>;
|
|
483
|
-
set<T = unknown>(key: string, value: T): Promise<void>;
|
|
484
|
-
delete(key: string): Promise<void>;
|
|
485
|
-
collection<TItem = unknown>(name: string): ExtensionStorageCollectionApi<TItem>;
|
|
486
|
-
}
|
|
487
|
-
|
|
488
|
-
declare interface ExtensionStorageCollectionApi<TItem = unknown> {
|
|
489
|
-
get(id: string): Promise<TItem | undefined>;
|
|
490
|
-
list(): Promise<TItem[]>;
|
|
491
|
-
put(id: string, value: TItem): Promise<void>;
|
|
492
|
-
/** Replace an existing item atomically. Throws if the item was deleted. */
|
|
493
|
-
update(id: string, value: TItem): Promise<void>;
|
|
494
|
-
createIfAbsent(id: string, value: TItem): Promise<boolean>;
|
|
495
|
-
deleteIfValue(id: string, value: TItem): Promise<boolean>;
|
|
496
|
-
create(value: TItem): Promise<TItem & {
|
|
497
|
-
id: string;
|
|
498
|
-
}>;
|
|
499
|
-
delete(id: string): Promise<void>;
|
|
500
|
-
attachments(itemId: string): ExtensionBlobsApi;
|
|
501
|
-
}
|
|
502
|
-
|
|
503
|
-
/** Opens long-lived, interactive PTY sessions. Complements {@link ExtensionProcessApi}'s run-to-completion model. */
|
|
504
|
-
declare interface ExtensionTerminalApi {
|
|
505
|
-
openSession(request: TerminalSessionRequest): TerminalSessionHandle;
|
|
506
|
-
}
|
|
507
|
-
|
|
508
|
-
declare interface ExtensionWorkspace {
|
|
509
|
-
id: string;
|
|
510
|
-
name?: string;
|
|
511
|
-
project_id?: string;
|
|
512
|
-
workspace_shorthand?: string;
|
|
513
|
-
branch?: string | null;
|
|
514
|
-
worktree_path?: string | null;
|
|
515
|
-
provider_id?: string;
|
|
516
|
-
provider_state?: WorkspaceProviderState;
|
|
517
|
-
execution_kind?: "local" | "remote";
|
|
518
|
-
display_path?: string | null;
|
|
519
|
-
provider_capabilities_json?: WorkspaceCapabilities;
|
|
520
|
-
anchors_json?: ResourceAnchor[];
|
|
521
|
-
initializing?: boolean;
|
|
522
|
-
created_at?: string;
|
|
523
|
-
updated_at?: string;
|
|
524
|
-
}
|
|
525
|
-
|
|
526
|
-
declare interface ExtensionWorkspacesApi {
|
|
527
|
-
list(): Promise<ExtensionWorkspace[]>;
|
|
528
|
-
get(id: string): Promise<ExtensionWorkspace | null>;
|
|
529
|
-
getByShorthand(shorthand: string): Promise<ExtensionWorkspace | null>;
|
|
530
|
-
create(input: CreateExtensionWorkspaceInput): Promise<ExtensionWorkspace>;
|
|
531
|
-
resolve(id: string): Promise<WorkspaceProviderResult>;
|
|
532
|
-
cancel(id: string): Promise<ExtensionWorkspace>;
|
|
533
|
-
archive(id: string): Promise<ExtensionWorkspace>;
|
|
534
|
-
removeWorktree(id: string): Promise<{
|
|
535
|
-
removed: boolean;
|
|
536
|
-
}>;
|
|
537
|
-
delete(id: string): Promise<void>;
|
|
538
|
-
}
|
|
539
|
-
|
|
540
|
-
declare interface FileRendererSectionAnchor {
|
|
541
|
-
/** Stable extension-owned tree node id. */
|
|
542
|
-
id: string;
|
|
543
|
-
/** Plain heading text as it appears in the Markdown document. */
|
|
544
|
-
heading: string;
|
|
545
|
-
/** Zero-based occurrence when the document repeats the same heading text. */
|
|
546
|
-
occurrence?: number;
|
|
547
|
-
}
|
|
548
|
-
|
|
549
|
-
declare interface FileRendererSectionTarget {
|
|
550
|
-
/** The document outline used for deep-linking and active-heading sync. */
|
|
551
|
-
anchors: FileRendererSectionAnchor[];
|
|
552
|
-
}
|
|
553
|
-
|
|
554
|
-
declare type JsonObject = {
|
|
555
|
-
[key: string]: JsonValue;
|
|
556
|
-
};
|
|
557
|
-
|
|
558
|
-
declare type JsonPrimitive = string | number | boolean | null;
|
|
559
|
-
|
|
560
|
-
declare type JsonValue = JsonPrimitive | JsonValue[] | JsonObject;
|
|
561
|
-
|
|
562
|
-
export declare const makeCommandArgs: <TParams extends Record<string, unknown>>(input: CommandContextInput<TParams>) => readonly [CommandContext<Record<string, unknown>>, TParams];
|
|
563
|
-
|
|
564
|
-
export declare const makeCommandContext: <TParams extends Record<string, unknown>>(input: CommandContextInput<TParams>) => CommandContext<Record<string, unknown>>;
|
|
565
|
-
|
|
566
|
-
declare type NavigationTarget = NavigationTargetItem | NavigationTargetCompound;
|
|
567
|
-
|
|
568
|
-
declare interface NavigationTargetCommand {
|
|
569
|
-
kind: "command";
|
|
570
|
-
target: CommandTarget<JsonObject>;
|
|
571
|
-
}
|
|
572
|
-
|
|
573
|
-
declare interface NavigationTargetCompound {
|
|
574
|
-
kind: "compound";
|
|
575
|
-
targets: readonly (NavigationTargetPage | NavigationTargetPanel)[];
|
|
576
|
-
}
|
|
577
|
-
|
|
578
|
-
declare interface NavigationTargetHref {
|
|
579
|
-
kind: "href";
|
|
580
|
-
href: string;
|
|
581
|
-
}
|
|
582
|
-
|
|
583
|
-
declare type NavigationTargetItem = NavigationTargetPage | NavigationTargetPanel | NavigationTargetCommand | NavigationTargetHref;
|
|
584
|
-
|
|
585
|
-
declare interface NavigationTargetPage {
|
|
586
|
-
kind: "page";
|
|
587
|
-
page: PageRef;
|
|
588
|
-
resource?: ResourceRef;
|
|
589
|
-
section?: FileRendererSectionTarget;
|
|
590
|
-
open?: PageOpenIntent;
|
|
591
|
-
parent?: NavigationTargetPage;
|
|
592
|
-
}
|
|
593
|
-
|
|
594
|
-
declare interface NavigationTargetPanel {
|
|
595
|
-
kind: "panel";
|
|
596
|
-
panel: PanelRef;
|
|
597
|
-
resource?: ResourceRef;
|
|
598
|
-
open?: PageOpenIntent;
|
|
599
|
-
}
|
|
600
|
-
|
|
601
|
-
declare interface Notification_2 {
|
|
602
|
-
id: string;
|
|
603
|
-
projectId: string;
|
|
604
|
-
title: string;
|
|
605
|
-
body?: string | null;
|
|
606
|
-
kind: NotificationKind;
|
|
607
|
-
status: NotificationStatus;
|
|
608
|
-
priority: NotificationPriority;
|
|
609
|
-
source: CommandSource;
|
|
610
|
-
origin: NotificationOrigin;
|
|
611
|
-
sourceExtensionId?: string | null;
|
|
612
|
-
actorType?: NotificationActorType | null;
|
|
613
|
-
actorId?: string | null;
|
|
614
|
-
target?: ResourceRef | null;
|
|
615
|
-
related: ResourceRef[];
|
|
616
|
-
actions: NotificationAction[];
|
|
617
|
-
dedupeKey?: string | null;
|
|
618
|
-
metadata?: JsonObject | null;
|
|
619
|
-
createdAt: string;
|
|
620
|
-
updatedAt: string;
|
|
621
|
-
readAt?: string | null;
|
|
622
|
-
resolvedAt?: string | null;
|
|
623
|
-
snoozedUntil?: string | null;
|
|
624
|
-
expiresAt?: string | null;
|
|
625
|
-
}
|
|
626
|
-
|
|
627
|
-
declare type NotificationAction = {
|
|
628
|
-
id: string;
|
|
629
|
-
label: string;
|
|
630
|
-
kind: "navigate";
|
|
631
|
-
target: NavigationTarget;
|
|
632
|
-
primary?: boolean;
|
|
633
|
-
} | {
|
|
634
|
-
id: string;
|
|
635
|
-
label: string;
|
|
636
|
-
kind: "command";
|
|
637
|
-
command: string;
|
|
638
|
-
params?: JsonObject;
|
|
639
|
-
primary?: boolean;
|
|
640
|
-
destructive?: boolean;
|
|
641
|
-
} | {
|
|
642
|
-
id: string;
|
|
643
|
-
label: string;
|
|
644
|
-
kind: "url";
|
|
645
|
-
href: string;
|
|
646
|
-
primary?: boolean;
|
|
647
|
-
};
|
|
648
|
-
|
|
649
|
-
declare type NotificationActorType = "user" | "agent" | "system";
|
|
650
|
-
|
|
651
|
-
declare type NotificationKind = "needs_review" | "ready_to_merge" | "blocked" | "approval_required" | "failed" | "info";
|
|
652
|
-
|
|
653
|
-
declare type NotificationOrigin = "core" | "extension" | "agent";
|
|
654
|
-
|
|
655
|
-
declare type NotificationPriority = "low" | "normal" | "high" | "urgent";
|
|
656
|
-
|
|
657
|
-
declare type NotificationStatus = "open" | "read" | "snoozed" | "done" | "dismissed" | "expired";
|
|
658
|
-
|
|
659
|
-
declare type PageOpenIntent = "preview" | "pin";
|
|
660
|
-
|
|
661
|
-
declare type PageRef = ContributionRef<"page">;
|
|
662
|
-
|
|
663
|
-
declare interface PageSlotRef {
|
|
664
|
-
readonly kind: "page-slot";
|
|
665
|
-
readonly page: PageRef;
|
|
666
|
-
readonly id: string;
|
|
667
|
-
}
|
|
668
|
-
|
|
669
|
-
declare type PanelRef = PlacementRef | PageSlotRef;
|
|
670
|
-
|
|
671
|
-
declare type PlacementRef = ContributionRef<"placement">;
|
|
672
|
-
|
|
673
|
-
declare interface ProcessRunInput {
|
|
674
|
-
command: string[];
|
|
675
|
-
cwd?: string;
|
|
676
|
-
env?: Record<string, string>;
|
|
677
|
-
timeoutMs?: number;
|
|
678
|
-
}
|
|
679
|
-
|
|
680
|
-
declare interface ProcessRunResult {
|
|
681
|
-
exitCode: number;
|
|
682
|
-
stdout: string;
|
|
683
|
-
stderr: string;
|
|
684
|
-
}
|
|
685
|
-
|
|
686
|
-
declare interface RepoContext {
|
|
687
|
-
projectId: string;
|
|
688
|
-
repoId: string;
|
|
689
|
-
path: string;
|
|
690
|
-
remote?: string | null;
|
|
691
|
-
role?: "default" | "selected" | "workspace";
|
|
692
|
-
}
|
|
693
|
-
|
|
694
|
-
declare interface ResourceAnchor extends ResourceRef {
|
|
695
|
-
role?: ResourceRole;
|
|
696
|
-
}
|
|
697
|
-
|
|
698
|
-
declare interface ResourceRef {
|
|
699
|
-
type: string;
|
|
700
|
-
id: string;
|
|
701
|
-
shorthand?: string;
|
|
702
|
-
projectId?: string;
|
|
703
|
-
label?: string;
|
|
704
|
-
icon?: string;
|
|
705
|
-
extensionId?: string;
|
|
706
|
-
metadata?: JsonObject;
|
|
707
|
-
}
|
|
708
|
-
|
|
709
|
-
declare type ResourceRole = "primary" | "context" | "source" | "result";
|
|
710
|
-
|
|
711
|
-
declare interface SerializedError {
|
|
712
|
-
name?: string;
|
|
713
|
-
message: string;
|
|
714
|
-
stack?: string;
|
|
715
|
-
cause?: JsonValue;
|
|
716
|
-
}
|
|
717
|
-
|
|
718
|
-
declare type SessionAttachmentRef = z.infer<typeof sessionAttachmentRefSchema>;
|
|
719
|
-
|
|
720
|
-
declare const sessionAttachmentRefSchema: z.ZodObject<{
|
|
721
|
-
file_id: z.ZodString;
|
|
722
|
-
}, z.core.$strip>;
|
|
723
|
-
|
|
724
|
-
declare type SessionStatus = z.infer<typeof sessionStatusSchema>;
|
|
725
|
-
|
|
726
|
-
declare const sessionStatusSchema: z.ZodEnum<{
|
|
727
|
-
completed: "completed";
|
|
728
|
-
failed: "failed";
|
|
729
|
-
in_progress: "in_progress";
|
|
730
|
-
awaiting_input: "awaiting_input";
|
|
731
|
-
queued: "queued";
|
|
732
|
-
cancelled: "cancelled";
|
|
733
|
-
disconnected: "disconnected";
|
|
734
|
-
}>;
|
|
735
|
-
|
|
736
|
-
declare type Skill = z.infer<typeof skillSchema>;
|
|
737
|
-
|
|
738
|
-
declare const skillSchema: z.ZodObject<{
|
|
739
|
-
id: z.ZodString;
|
|
740
|
-
project_id: z.ZodString;
|
|
741
|
-
name: z.ZodString;
|
|
742
|
-
title: z.ZodString;
|
|
743
|
-
description: z.ZodString;
|
|
744
|
-
source_kind: z.ZodEnum<{
|
|
745
|
-
project: "project";
|
|
746
|
-
extension: "extension";
|
|
747
|
-
}>;
|
|
748
|
-
files: z.ZodArray<z.ZodObject<{
|
|
749
|
-
path: z.ZodString;
|
|
750
|
-
content: z.ZodString;
|
|
751
|
-
encoding: z.ZodLiteral<"utf8">;
|
|
752
|
-
}, z.core.$strip>>;
|
|
753
|
-
editable: z.ZodBoolean;
|
|
754
|
-
extension_instance_id: z.ZodOptional<z.ZodString>;
|
|
755
|
-
extension_id: z.ZodOptional<z.ZodString>;
|
|
756
|
-
installed_extension_id: z.ZodOptional<z.ZodString>;
|
|
757
|
-
install_name: z.ZodOptional<z.ZodString>;
|
|
758
|
-
key: z.ZodOptional<z.ZodString>;
|
|
759
|
-
source: z.ZodOptional<z.ZodObject<{
|
|
760
|
-
kind: z.ZodLiteral<"package-asset">;
|
|
761
|
-
path: z.ZodString;
|
|
762
|
-
baseUrl: z.ZodString;
|
|
763
|
-
}, z.core.$strip>>;
|
|
764
|
-
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
765
|
-
created_at: z.ZodString;
|
|
766
|
-
updated_at: z.ZodString;
|
|
767
|
-
deleted_at: z.ZodNullable<z.ZodString>;
|
|
768
|
-
}, z.core.$strip>;
|
|
769
|
-
|
|
770
|
-
declare interface SlotInvocationContext<TContext extends Struct = Struct> {
|
|
771
|
-
id: string;
|
|
772
|
-
kind: UiSlotKind;
|
|
773
|
-
context: TContext;
|
|
774
|
-
}
|
|
775
|
-
|
|
776
|
-
declare type StorageScope = {
|
|
777
|
-
type: "project";
|
|
778
|
-
} | {
|
|
779
|
-
type: "repo";
|
|
780
|
-
repoId: string;
|
|
781
|
-
} | {
|
|
782
|
-
type: "resource";
|
|
783
|
-
resource: ResourceRef;
|
|
784
|
-
} | {
|
|
785
|
-
type: string;
|
|
786
|
-
id: string;
|
|
787
|
-
};
|
|
788
|
-
|
|
789
|
-
declare type Struct = object;
|
|
790
|
-
|
|
791
|
-
declare type TerminalEvent = {
|
|
792
|
-
kind: "data";
|
|
793
|
-
chunk: Uint8Array;
|
|
794
|
-
} | {
|
|
795
|
-
kind: "title";
|
|
796
|
-
title: string;
|
|
797
|
-
} | {
|
|
798
|
-
kind: "exit";
|
|
799
|
-
code: number | null;
|
|
800
|
-
signal: string | null;
|
|
801
|
-
} | {
|
|
802
|
-
kind: "error";
|
|
803
|
-
message: string;
|
|
804
|
-
};
|
|
805
|
-
|
|
806
|
-
declare interface TerminalSessionHandle {
|
|
807
|
-
/** Stable session id. */
|
|
808
|
-
readonly id: string;
|
|
809
|
-
/** Send stdin to the PTY. */
|
|
810
|
-
write(data: string | Uint8Array): void;
|
|
811
|
-
/** Adjust the PTY geometry. */
|
|
812
|
-
resize(cols: number, rows: number): void;
|
|
813
|
-
/** Terminate the child and clean up host resources. */
|
|
814
|
-
kill(signal?: string): Promise<void>;
|
|
815
|
-
/**
|
|
816
|
-
* Async iterable of output / exit / error events. A single iterator is
|
|
817
|
-
* supported per session — calling this twice throws. `exit` is always the
|
|
818
|
-
* last event delivered for a session.
|
|
819
|
-
*/
|
|
820
|
-
events(): AsyncIterable<TerminalEvent>;
|
|
821
|
-
}
|
|
822
|
-
|
|
823
|
-
declare interface TerminalSessionRequest {
|
|
824
|
-
/** Command + args to run; defaults to the user's login shell when omitted. */
|
|
825
|
-
command?: string[];
|
|
826
|
-
/** Working directory; falls back to the extension's workspace root. */
|
|
827
|
-
cwd?: string;
|
|
828
|
-
/** Extra env vars merged over the inherited environment. */
|
|
829
|
-
env?: Record<string, string>;
|
|
830
|
-
/** Initial column count; the renderer can resize later. */
|
|
831
|
-
cols: number;
|
|
832
|
-
/** Initial row count; the renderer can resize later. */
|
|
833
|
-
rows: number;
|
|
834
|
-
}
|
|
835
|
-
|
|
836
|
-
declare type UiSlotKind = "menu" | "panel" | "settings" | "renderer" | "kanbanRenderer" | "dataTableRenderer";
|
|
837
|
-
|
|
838
|
-
declare interface WorkbenchAttachmentInvocationContext {
|
|
839
|
-
target: WorkbenchAttachmentTarget;
|
|
840
|
-
mode?: string;
|
|
841
|
-
projectId?: string;
|
|
842
|
-
resource?: ResourceRef;
|
|
843
|
-
}
|
|
844
|
-
|
|
845
|
-
declare type WorkbenchAttachmentTarget = WorkbenchMenuTarget | WorkbenchTreeTarget | WorkbenchViewTarget | WorkbenchSettingsTarget;
|
|
846
|
-
|
|
847
|
-
declare type WorkbenchMenuTarget = (typeof workbenchMenuTargets)[number];
|
|
848
|
-
|
|
849
|
-
declare const workbenchMenuTargets: readonly ["workbench.nav.actions", "workbench.nav.overflow"];
|
|
850
|
-
|
|
851
|
-
declare type WorkbenchSettingsTarget = (typeof workbenchSettingsTargets)[number];
|
|
852
|
-
|
|
853
|
-
declare const workbenchSettingsTargets: readonly ["workbench.settings"];
|
|
854
|
-
|
|
855
|
-
declare type WorkbenchTreeTarget = (typeof workbenchTreeTargets)[number];
|
|
856
|
-
|
|
857
|
-
declare const workbenchTreeTargets: readonly ["workbench.left.tree", "workbench.main.left.tree", "workbench.main.right.tree"];
|
|
858
|
-
|
|
859
|
-
declare type WorkbenchViewTarget = (typeof workbenchViewTargets)[number];
|
|
860
|
-
|
|
861
|
-
declare const workbenchViewTargets: readonly ["workbench.main", "workbench.main.left", "workbench.main.right", "workbench.secondary"];
|
|
862
|
-
|
|
863
|
-
declare interface WorkspaceCapabilities {
|
|
864
|
-
files: "none" | "read" | "write";
|
|
865
|
-
diff: boolean;
|
|
866
|
-
merge: boolean;
|
|
867
|
-
rebase: boolean;
|
|
868
|
-
archive: boolean;
|
|
869
|
-
delete: boolean;
|
|
870
|
-
}
|
|
871
|
-
|
|
872
|
-
declare type WorkspaceExecutionTarget = {
|
|
873
|
-
kind: "local";
|
|
874
|
-
rootPath: string;
|
|
875
|
-
displayPath?: string;
|
|
876
|
-
} | {
|
|
877
|
-
kind: "remote";
|
|
878
|
-
providerId: string;
|
|
879
|
-
providerRef: WorkspaceProviderRef;
|
|
880
|
-
displayPath?: string;
|
|
881
|
-
};
|
|
882
|
-
|
|
883
|
-
declare interface WorkspaceFilesMount extends ArtifactMount {
|
|
884
|
-
/**
|
|
885
|
-
* Write each file atomically (temp + rename) and prune files managed by an earlier sync that are no
|
|
886
|
-
* longer present. Other files under `dir` are preserved. Idempotent and safe to re-run on every
|
|
887
|
-
* catalog change; a live agent's dir-watcher only ever sees complete files.
|
|
888
|
-
*/
|
|
889
|
-
syncDir(dir: string, files: WorkspaceSyncFile[]): Promise<void>;
|
|
890
|
-
}
|
|
891
|
-
|
|
892
|
-
declare interface WorkspaceProviderRef {
|
|
893
|
-
version: number;
|
|
894
|
-
data: JsonObject;
|
|
895
|
-
}
|
|
896
|
-
|
|
897
|
-
declare interface WorkspaceProviderResult {
|
|
898
|
-
providerRef?: WorkspaceProviderRef;
|
|
899
|
-
/** Git branch exposed to host merge and diff features. Provider refs stay opaque. */
|
|
900
|
-
branch?: string;
|
|
901
|
-
state: WorkspaceProviderState;
|
|
902
|
-
executionKind: "local" | "remote";
|
|
903
|
-
executionTarget?: WorkspaceExecutionTarget;
|
|
904
|
-
displayPath?: string;
|
|
905
|
-
capabilities: WorkspaceCapabilities;
|
|
906
|
-
error?: {
|
|
907
|
-
code: string;
|
|
908
|
-
message: string;
|
|
909
|
-
retryable: boolean;
|
|
910
|
-
};
|
|
911
|
-
}
|
|
912
|
-
|
|
913
|
-
declare type WorkspaceProviderState = "provisioning" | "ready" | "failed" | "cancelled" | "archiving" | "archived" | "deleting" | "provider_missing";
|
|
914
|
-
|
|
915
|
-
declare interface WorkspaceSyncFile {
|
|
916
|
-
/** Path relative to the `dir` passed to {@link WorkspaceFilesMount.syncDir}. */
|
|
917
|
-
path: string;
|
|
918
|
-
content: string;
|
|
919
|
-
}
|
|
920
|
-
|
|
921
|
-
export { }
|
|
1
|
+
import { Gu as ExtensionResourcesApi, Ir as ArtifactMount, Lr as CommandContext, oi as ExtensionStorageApi } from "./index-CR17_9lz.js";
|
|
2
|
+
//#region src/testing/command-context.d.ts
|
|
3
|
+
type CommandContextOverrides = { [K in keyof CommandContext]?: Partial<CommandContext[K]>; };
|
|
4
|
+
interface CommandContextInput<TParams extends Record<string, unknown>> {
|
|
5
|
+
storage: ExtensionStorageApi;
|
|
6
|
+
params: TParams;
|
|
7
|
+
projectId?: string;
|
|
8
|
+
resourcePrefixes?: Record<string, string>;
|
|
9
|
+
overrides?: CommandContextOverrides;
|
|
10
|
+
}
|
|
11
|
+
export declare const makeCommandContext: <TParams extends Record<string, unknown>>(input: CommandContextInput<TParams>) => CommandContext<Record<string, unknown>>;
|
|
12
|
+
export declare const commandParamsFor: <TParams extends Record<string, unknown>>(context: CommandContext) => TParams;
|
|
13
|
+
export declare const makeCommandArgs: <TParams extends Record<string, unknown>>(input: CommandContextInput<TParams>) => readonly [CommandContext<Record<string, unknown>>, TParams];
|
|
14
|
+
//#endregion
|
|
15
|
+
//#region src/testing/memory-repo-files.d.ts
|
|
16
|
+
export declare const createMemoryRepoFiles: () => ArtifactMount & {
|
|
17
|
+
files: Map<string, Uint8Array>;
|
|
18
|
+
};
|
|
19
|
+
//#endregion
|
|
20
|
+
//#region src/testing/memory-resources.d.ts
|
|
21
|
+
export declare const createMemoryResources: (prefixes: Record<string, string>, sequences?: Map<string, number>) => ExtensionResourcesApi;
|
|
22
|
+
//#endregion
|
|
23
|
+
//#region src/testing/memory-storage.d.ts
|
|
24
|
+
export declare const createMemoryStorage: () => ExtensionStorageApi;
|
|
25
|
+
//#endregion
|
|
26
|
+
export type { CommandContextInput, CommandContextOverrides };
|
|
27
|
+
export {};
|