@pstdio/sdk 0.11.0 → 0.12.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/dist/api/index.d.ts +0 -1
- package/dist/client/agents.d.ts +2 -7
- package/dist/client/index.js +1 -6
- package/dist/extensions/command-outcome.d.ts +1 -1
- package/dist/extensions/define-command.d.ts +1 -3
- package/dist/extensions/define-extension-view.d.ts +2 -2
- package/dist/extensions/define-extension.d.ts +1 -4
- package/dist/extensions/index.d.ts +3 -8
- package/dist/extensions/index.js +131 -130
- package/dist/extensions/params.d.ts +1 -1
- package/dist/extensions/refs.d.ts +2 -14
- package/dist/extensions/when.d.ts +1 -1
- package/dist/resources/agent.d.ts +1 -1
- package/dist/resources/index.d.ts +2 -2
- package/dist/resources/index.js +3 -1
- package/dist/resources/known-agents.d.ts +2 -0
- package/package.json +2 -2
- package/dist/api/agents.d.ts +0 -1
- package/dist/extensions/kernel-slots.d.ts +0 -112
- package/dist/extensions/l10n.d.ts +0 -10
- package/dist/extensions/package-asset.d.ts +0 -10
- package/dist/extensions/slots.d.ts +0 -6
- package/dist/extensions/types/commands.d.ts +0 -125
- package/dist/extensions/types/context.d.ts +0 -258
- package/dist/extensions/types/contributions.d.ts +0 -374
- package/dist/extensions/types/events.d.ts +0 -10
- package/dist/extensions/types/extension.d.ts +0 -183
- package/dist/extensions/types/index.d.ts +0 -11
- package/dist/extensions/types/json.d.ts +0 -7
- package/dist/extensions/types/params.d.ts +0 -83
- package/dist/extensions/types/resources.d.ts +0 -25
- package/dist/extensions/types/slots.d.ts +0 -22
- package/dist/extensions/types/tree-renderer.d.ts +0 -89
- package/dist/extensions/types/webview-capabilities.d.ts +0 -93
- package/dist/extensions/workbench-targets.d.ts +0 -124
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import type { JsonObject } from "./json";
|
|
2
|
-
export type ResourceRole = "primary" | "context" | "source" | "result";
|
|
3
|
-
export interface ResourceRef {
|
|
4
|
-
type: string;
|
|
5
|
-
id: string;
|
|
6
|
-
projectId?: string;
|
|
7
|
-
label?: string;
|
|
8
|
-
extensionId?: string;
|
|
9
|
-
metadata?: JsonObject;
|
|
10
|
-
}
|
|
11
|
-
export interface ResourceAnchor extends ResourceRef {
|
|
12
|
-
role?: ResourceRole;
|
|
13
|
-
}
|
|
14
|
-
export interface RepoContext {
|
|
15
|
-
projectId: string;
|
|
16
|
-
repoId: string;
|
|
17
|
-
path: string;
|
|
18
|
-
remote?: string | null;
|
|
19
|
-
role?: "default" | "selected" | "workspace";
|
|
20
|
-
}
|
|
21
|
-
export interface PackageAssetDescriptor {
|
|
22
|
-
kind: "package-asset";
|
|
23
|
-
path: string;
|
|
24
|
-
baseUrl: string;
|
|
25
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { JsonObject, Struct } from "./json";
|
|
2
|
-
export type UiSlotKind = "menu" | "view" | "settings" | "renderer" | "dataRenderer";
|
|
3
|
-
export interface SlotOptions<TKind extends UiSlotKind = UiSlotKind> {
|
|
4
|
-
kind: TKind;
|
|
5
|
-
label?: string;
|
|
6
|
-
description?: string;
|
|
7
|
-
metadata?: JsonObject;
|
|
8
|
-
}
|
|
9
|
-
export interface SlotRef<TContext extends Struct = Struct, TKind extends UiSlotKind = UiSlotKind> {
|
|
10
|
-
id: string;
|
|
11
|
-
kind: TKind;
|
|
12
|
-
label?: string;
|
|
13
|
-
description?: string;
|
|
14
|
-
metadata?: JsonObject;
|
|
15
|
-
/** Phantom field used to constrain compatible contributions; never populated at runtime. */
|
|
16
|
-
context?: TContext;
|
|
17
|
-
}
|
|
18
|
-
export interface SlotInvocationContext<TContext extends Struct = Struct> {
|
|
19
|
-
id: string;
|
|
20
|
-
kind: UiSlotKind;
|
|
21
|
-
context: TContext;
|
|
22
|
-
}
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import type { Localizable } from "../l10n";
|
|
2
|
-
import type { CommandRef } from "./commands";
|
|
3
|
-
import type { JsonObject, JsonValue } from "./json";
|
|
4
|
-
import type { ParamObjectSchema } from "./params";
|
|
5
|
-
export interface TreeRendererResourceRef {
|
|
6
|
-
type: string;
|
|
7
|
-
id: string;
|
|
8
|
-
projectId?: string;
|
|
9
|
-
label?: string;
|
|
10
|
-
extensionId?: string;
|
|
11
|
-
metadata?: JsonObject;
|
|
12
|
-
}
|
|
13
|
-
export interface TreeRendererState {
|
|
14
|
-
expandedNodeIds: string[];
|
|
15
|
-
expandedSectionIds: string[];
|
|
16
|
-
selectedNodeId?: string;
|
|
17
|
-
}
|
|
18
|
-
export interface TreeRendererQueryParams {
|
|
19
|
-
projectId?: string;
|
|
20
|
-
modeId?: string;
|
|
21
|
-
resource?: TreeRendererResourceRef;
|
|
22
|
-
treeId: string;
|
|
23
|
-
state?: TreeRendererState;
|
|
24
|
-
filter?: string;
|
|
25
|
-
}
|
|
26
|
-
export interface TreeRendererChildrenParams extends TreeRendererQueryParams {
|
|
27
|
-
node: TreeNode;
|
|
28
|
-
}
|
|
29
|
-
export interface TreeRendererActionParams extends TreeRendererQueryParams {
|
|
30
|
-
actionId: string;
|
|
31
|
-
node?: TreeNode;
|
|
32
|
-
}
|
|
33
|
-
export type TreeNodeTarget = {
|
|
34
|
-
kind: "command";
|
|
35
|
-
commandId: string;
|
|
36
|
-
args?: JsonObject;
|
|
37
|
-
} | {
|
|
38
|
-
kind: "resource";
|
|
39
|
-
resource: TreeRendererResourceRef;
|
|
40
|
-
} | {
|
|
41
|
-
kind: "view";
|
|
42
|
-
widgetId: string;
|
|
43
|
-
};
|
|
44
|
-
export interface TreeAction {
|
|
45
|
-
id: string;
|
|
46
|
-
label?: Localizable<string>;
|
|
47
|
-
icon?: string;
|
|
48
|
-
commandId?: string;
|
|
49
|
-
args?: JsonObject;
|
|
50
|
-
params?: ParamObjectSchema;
|
|
51
|
-
when?: string;
|
|
52
|
-
disabled?: boolean;
|
|
53
|
-
}
|
|
54
|
-
export interface TreeNode {
|
|
55
|
-
id: string;
|
|
56
|
-
label: Localizable<string>;
|
|
57
|
-
icon?: string;
|
|
58
|
-
iconColor?: string;
|
|
59
|
-
iconTooltip?: string;
|
|
60
|
-
resource?: TreeRendererResourceRef;
|
|
61
|
-
target?: TreeNodeTarget;
|
|
62
|
-
actions?: TreeAction[];
|
|
63
|
-
contextMenuActions?: TreeAction[];
|
|
64
|
-
collapsible?: boolean;
|
|
65
|
-
disabled?: boolean;
|
|
66
|
-
children?: TreeNode[];
|
|
67
|
-
description?: string;
|
|
68
|
-
contextValue?: string;
|
|
69
|
-
hiddenByDefault?: boolean;
|
|
70
|
-
metadata?: JsonObject;
|
|
71
|
-
}
|
|
72
|
-
export interface TreeViewSection {
|
|
73
|
-
id: string;
|
|
74
|
-
label?: Localizable<string>;
|
|
75
|
-
actions?: TreeAction[];
|
|
76
|
-
collapsible?: boolean;
|
|
77
|
-
nodes: TreeNode[];
|
|
78
|
-
hiddenByDefault?: boolean;
|
|
79
|
-
}
|
|
80
|
-
export interface TreeRendererContribution {
|
|
81
|
-
title: Localizable<string>;
|
|
82
|
-
icon?: string;
|
|
83
|
-
bodyCommand: CommandRef<TreeRendererQueryParams, TreeViewSection[]> | string;
|
|
84
|
-
childrenCommand?: CommandRef<TreeRendererChildrenParams, TreeNode[]> | string;
|
|
85
|
-
footerCommand?: CommandRef<TreeRendererQueryParams, TreeNode[]> | string;
|
|
86
|
-
defaultExpandedSectionIds?: string[];
|
|
87
|
-
defaultExpandedNodeIds?: string[];
|
|
88
|
-
}
|
|
89
|
-
export type TreeRendererCommandResult = TreeViewSection[] | TreeNode[] | JsonValue;
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import type { JsonObject } from "./json";
|
|
2
|
-
import type { RepoContext, ResourceRef } from "./resources";
|
|
3
|
-
export type { ExtensionBlobRef } from "./context";
|
|
4
|
-
export declare const WEBVIEW_HOST_CAPABILITY_VERSION = 1;
|
|
5
|
-
export declare const WEBVIEW_DECLARABLE_CAPABILITIES: readonly ["commands.execute", "resource.open", "notification.show", "preferences.get", "preferences.set", "extension.settings.all", "extension.settings.get", "extension.settings.set", "extension.settings.delete", "files.upload", "files.list", "files.delete"];
|
|
6
|
-
export declare const ALWAYS_AVAILABLE_WEBVIEW_CAPABILITIES: readonly ["host.dispatchKeyboardEvent"];
|
|
7
|
-
export declare const WEBVIEW_HOST_CAPABILITIES: readonly ["commands.execute", "resource.open", "notification.show", "preferences.get", "preferences.set", "extension.settings.all", "extension.settings.get", "extension.settings.set", "extension.settings.delete", "files.upload", "files.list", "files.delete", "host.dispatchKeyboardEvent"];
|
|
8
|
-
export type WebviewHostCapability = (typeof WEBVIEW_HOST_CAPABILITIES)[number];
|
|
9
|
-
export type WebviewDeclarableCapability = (typeof WEBVIEW_DECLARABLE_CAPABILITIES)[number];
|
|
10
|
-
export type WebviewCapabilityDeclaration = WebviewDeclarableCapability | `${WebviewDeclarableCapability}@${typeof WEBVIEW_HOST_CAPABILITY_VERSION}`;
|
|
11
|
-
export interface WebviewCommandsExecuteParams {
|
|
12
|
-
commandId: string;
|
|
13
|
-
params?: JsonObject;
|
|
14
|
-
resource?: ResourceRef;
|
|
15
|
-
repo?: RepoContext;
|
|
16
|
-
metadata?: JsonObject;
|
|
17
|
-
}
|
|
18
|
-
export interface WebviewResourceOpenParams {
|
|
19
|
-
href?: string;
|
|
20
|
-
resource?: ResourceRef;
|
|
21
|
-
input?: {
|
|
22
|
-
replaceActive?: boolean;
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
export interface WebviewNotificationShowParams {
|
|
26
|
-
level: "info" | "success" | "warning" | "error";
|
|
27
|
-
title: string;
|
|
28
|
-
message?: string;
|
|
29
|
-
}
|
|
30
|
-
export interface WebviewPreferencesGetParams {
|
|
31
|
-
name: string;
|
|
32
|
-
scope?: {
|
|
33
|
-
scope: "default" | "user" | "project" | "repo" | "workspace" | "extension" | "session";
|
|
34
|
-
scopeId?: string;
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
export interface WebviewPreferencesSetParams extends WebviewPreferencesGetParams {
|
|
38
|
-
value: boolean | number | string | string[] | number[] | boolean[] | Record<string, unknown>;
|
|
39
|
-
}
|
|
40
|
-
export interface WebviewExtensionSettingKeyParams {
|
|
41
|
-
key: string;
|
|
42
|
-
}
|
|
43
|
-
export interface WebviewExtensionSettingSetParams extends WebviewExtensionSettingKeyParams {
|
|
44
|
-
value: unknown;
|
|
45
|
-
}
|
|
46
|
-
export type WebviewFileScope = {
|
|
47
|
-
type: "project";
|
|
48
|
-
} | {
|
|
49
|
-
type: "repo";
|
|
50
|
-
id: string;
|
|
51
|
-
} | {
|
|
52
|
-
type: "resource";
|
|
53
|
-
id: string;
|
|
54
|
-
} | {
|
|
55
|
-
type: string;
|
|
56
|
-
id?: string;
|
|
57
|
-
};
|
|
58
|
-
export interface WebviewFilesUploadParams {
|
|
59
|
-
name: string;
|
|
60
|
-
data: Uint8Array | ArrayBuffer;
|
|
61
|
-
mimeType?: string;
|
|
62
|
-
scope?: WebviewFileScope;
|
|
63
|
-
}
|
|
64
|
-
export interface WebviewFilesListParams {
|
|
65
|
-
scope?: WebviewFileScope;
|
|
66
|
-
}
|
|
67
|
-
export interface WebviewFilesDeleteParams {
|
|
68
|
-
id: string;
|
|
69
|
-
}
|
|
70
|
-
export interface WebviewKeyboardEventParams {
|
|
71
|
-
key?: string;
|
|
72
|
-
code?: string;
|
|
73
|
-
ctrlKey?: boolean;
|
|
74
|
-
metaKey?: boolean;
|
|
75
|
-
altKey?: boolean;
|
|
76
|
-
shiftKey?: boolean;
|
|
77
|
-
repeat?: boolean;
|
|
78
|
-
}
|
|
79
|
-
export interface WebviewHostCapabilityParams {
|
|
80
|
-
"commands.execute": WebviewCommandsExecuteParams;
|
|
81
|
-
"resource.open": WebviewResourceOpenParams;
|
|
82
|
-
"notification.show": WebviewNotificationShowParams;
|
|
83
|
-
"preferences.get": WebviewPreferencesGetParams;
|
|
84
|
-
"preferences.set": WebviewPreferencesSetParams;
|
|
85
|
-
"extension.settings.all": Record<string, never>;
|
|
86
|
-
"extension.settings.get": WebviewExtensionSettingKeyParams;
|
|
87
|
-
"extension.settings.set": WebviewExtensionSettingSetParams;
|
|
88
|
-
"extension.settings.delete": WebviewExtensionSettingKeyParams;
|
|
89
|
-
"files.upload": WebviewFilesUploadParams;
|
|
90
|
-
"files.list": WebviewFilesListParams;
|
|
91
|
-
"files.delete": WebviewFilesDeleteParams;
|
|
92
|
-
"host.dispatchKeyboardEvent": WebviewKeyboardEventParams;
|
|
93
|
-
}
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
export declare const workbenchMenuTargets: readonly ["workbench.nav.actions", "workbench.nav.overflow"];
|
|
2
|
-
export declare const workbenchTreeTargets: readonly ["workbench.left.tree", "workbench.main.left.tree", "workbench.main.right.tree"];
|
|
3
|
-
export declare const workbenchViewTargets: readonly ["workbench.main", "workbench.main.left", "workbench.main.right", "workbench.secondary"];
|
|
4
|
-
export declare const workbenchSettingsTargets: readonly ["workbench.settings"];
|
|
5
|
-
export declare const workbenchSettingsScopes: readonly ["project", "global"];
|
|
6
|
-
export declare const workbenchModeLayoutTargets: readonly ["workbench.left", "workbench.main.left", "workbench.main", "workbench.main.right", "workbench.secondary"];
|
|
7
|
-
export type WorkbenchMenuTarget = (typeof workbenchMenuTargets)[number];
|
|
8
|
-
export type WorkbenchTreeTarget = (typeof workbenchTreeTargets)[number];
|
|
9
|
-
export type WorkbenchViewTarget = (typeof workbenchViewTargets)[number];
|
|
10
|
-
export type WorkbenchSettingsTarget = (typeof workbenchSettingsTargets)[number];
|
|
11
|
-
export type WorkbenchSettingsScope = (typeof workbenchSettingsScopes)[number];
|
|
12
|
-
export type WorkbenchModeLayoutTarget = (typeof workbenchModeLayoutTargets)[number];
|
|
13
|
-
export type WorkbenchLayoutTarget = WorkbenchModeLayoutTarget;
|
|
14
|
-
export type WorkbenchAttachmentTarget = WorkbenchMenuTarget | WorkbenchTreeTarget | WorkbenchViewTarget | WorkbenchSettingsTarget;
|
|
15
|
-
export type WorkbenchContributionKind = "menu" | "treeItem" | "view" | "settings";
|
|
16
|
-
export type WorkbenchTargetGranularity = "surface" | "area" | "areaTree";
|
|
17
|
-
export interface WorkbenchTargetDefinition {
|
|
18
|
-
id: WorkbenchAttachmentTarget;
|
|
19
|
-
allowedKinds: readonly WorkbenchContributionKind[];
|
|
20
|
-
granularity: WorkbenchTargetGranularity;
|
|
21
|
-
rationale: string;
|
|
22
|
-
}
|
|
23
|
-
export declare const workbenchTargets: readonly [{
|
|
24
|
-
readonly id: "workbench.nav.actions";
|
|
25
|
-
readonly allowedKinds: readonly ["menu"];
|
|
26
|
-
readonly granularity: "surface";
|
|
27
|
-
readonly rationale: "Primary command surface in the host-owned nav (top) workbench chrome.";
|
|
28
|
-
}, {
|
|
29
|
-
readonly id: "workbench.nav.overflow";
|
|
30
|
-
readonly allowedKinds: readonly ["menu"];
|
|
31
|
-
readonly granularity: "surface";
|
|
32
|
-
readonly rationale: "Secondary command surface in the host-owned nav (top) workbench chrome.";
|
|
33
|
-
}, {
|
|
34
|
-
readonly id: "workbench.left.tree";
|
|
35
|
-
readonly allowedKinds: readonly ["treeItem"];
|
|
36
|
-
readonly granularity: "areaTree";
|
|
37
|
-
readonly rationale: "Tree entries for the active tree renderer mounted in the left area.";
|
|
38
|
-
}, {
|
|
39
|
-
readonly id: "workbench.main.left.tree";
|
|
40
|
-
readonly allowedKinds: readonly ["treeItem"];
|
|
41
|
-
readonly granularity: "areaTree";
|
|
42
|
-
readonly rationale: "Tree entries for the active tree renderer mounted in the main-left area.";
|
|
43
|
-
}, {
|
|
44
|
-
readonly id: "workbench.main.right.tree";
|
|
45
|
-
readonly allowedKinds: readonly ["treeItem"];
|
|
46
|
-
readonly granularity: "areaTree";
|
|
47
|
-
readonly rationale: "Tree entries for the active tree renderer mounted in the main-right area.";
|
|
48
|
-
}, {
|
|
49
|
-
readonly id: "workbench.main";
|
|
50
|
-
readonly allowedKinds: readonly ["view"];
|
|
51
|
-
readonly granularity: "area";
|
|
52
|
-
readonly rationale: "Direct extension view placement in the main area.";
|
|
53
|
-
}, {
|
|
54
|
-
readonly id: "workbench.main.left";
|
|
55
|
-
readonly allowedKinds: readonly ["view"];
|
|
56
|
-
readonly granularity: "area";
|
|
57
|
-
readonly rationale: "Direct extension view placement in the main-left area.";
|
|
58
|
-
}, {
|
|
59
|
-
readonly id: "workbench.main.right";
|
|
60
|
-
readonly allowedKinds: readonly ["view"];
|
|
61
|
-
readonly granularity: "area";
|
|
62
|
-
readonly rationale: "Direct extension view placement in the main-right area.";
|
|
63
|
-
}, {
|
|
64
|
-
readonly id: "workbench.secondary";
|
|
65
|
-
readonly allowedKinds: readonly ["view"];
|
|
66
|
-
readonly granularity: "area";
|
|
67
|
-
readonly rationale: "Direct extension view placement in the secondary area.";
|
|
68
|
-
}, {
|
|
69
|
-
readonly id: "workbench.settings";
|
|
70
|
-
readonly allowedKinds: readonly ["settings"];
|
|
71
|
-
readonly granularity: "surface";
|
|
72
|
-
readonly rationale: "Settings panel placement in host-owned settings navigation.";
|
|
73
|
-
}];
|
|
74
|
-
export declare const getWorkbenchTargetDefinition: (id: string) => {
|
|
75
|
-
readonly id: "workbench.nav.actions";
|
|
76
|
-
readonly allowedKinds: readonly ["menu"];
|
|
77
|
-
readonly granularity: "surface";
|
|
78
|
-
readonly rationale: "Primary command surface in the host-owned nav (top) workbench chrome.";
|
|
79
|
-
} | {
|
|
80
|
-
readonly id: "workbench.nav.overflow";
|
|
81
|
-
readonly allowedKinds: readonly ["menu"];
|
|
82
|
-
readonly granularity: "surface";
|
|
83
|
-
readonly rationale: "Secondary command surface in the host-owned nav (top) workbench chrome.";
|
|
84
|
-
} | {
|
|
85
|
-
readonly id: "workbench.left.tree";
|
|
86
|
-
readonly allowedKinds: readonly ["treeItem"];
|
|
87
|
-
readonly granularity: "areaTree";
|
|
88
|
-
readonly rationale: "Tree entries for the active tree renderer mounted in the left area.";
|
|
89
|
-
} | {
|
|
90
|
-
readonly id: "workbench.main.left.tree";
|
|
91
|
-
readonly allowedKinds: readonly ["treeItem"];
|
|
92
|
-
readonly granularity: "areaTree";
|
|
93
|
-
readonly rationale: "Tree entries for the active tree renderer mounted in the main-left area.";
|
|
94
|
-
} | {
|
|
95
|
-
readonly id: "workbench.main.right.tree";
|
|
96
|
-
readonly allowedKinds: readonly ["treeItem"];
|
|
97
|
-
readonly granularity: "areaTree";
|
|
98
|
-
readonly rationale: "Tree entries for the active tree renderer mounted in the main-right area.";
|
|
99
|
-
} | {
|
|
100
|
-
readonly id: "workbench.main";
|
|
101
|
-
readonly allowedKinds: readonly ["view"];
|
|
102
|
-
readonly granularity: "area";
|
|
103
|
-
readonly rationale: "Direct extension view placement in the main area.";
|
|
104
|
-
} | {
|
|
105
|
-
readonly id: "workbench.main.left";
|
|
106
|
-
readonly allowedKinds: readonly ["view"];
|
|
107
|
-
readonly granularity: "area";
|
|
108
|
-
readonly rationale: "Direct extension view placement in the main-left area.";
|
|
109
|
-
} | {
|
|
110
|
-
readonly id: "workbench.main.right";
|
|
111
|
-
readonly allowedKinds: readonly ["view"];
|
|
112
|
-
readonly granularity: "area";
|
|
113
|
-
readonly rationale: "Direct extension view placement in the main-right area.";
|
|
114
|
-
} | {
|
|
115
|
-
readonly id: "workbench.secondary";
|
|
116
|
-
readonly allowedKinds: readonly ["view"];
|
|
117
|
-
readonly granularity: "area";
|
|
118
|
-
readonly rationale: "Direct extension view placement in the secondary area.";
|
|
119
|
-
} | {
|
|
120
|
-
readonly id: "workbench.settings";
|
|
121
|
-
readonly allowedKinds: readonly ["settings"];
|
|
122
|
-
readonly granularity: "surface";
|
|
123
|
-
readonly rationale: "Settings panel placement in host-owned settings navigation.";
|
|
124
|
-
} | undefined;
|