@pstdio/sdk 0.20.0 → 0.21.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/extensions.d.ts +1 -1
- package/dist/api/index.d.ts +2 -3
- package/dist/api/index.js +798 -470
- package/dist/client/automation.d.ts +12 -0
- package/dist/client/client.d.ts +2 -2
- package/dist/client/extensions.d.ts +5 -2
- package/dist/client/index.d.ts +1 -1
- package/dist/client/index.js +20 -14
- package/dist/extensions/define-command.d.ts +13 -11
- package/dist/extensions/define-contribution.d.ts +36 -0
- package/dist/extensions/define-extension.d.ts +7 -37
- package/dist/extensions/index.d.ts +2 -1
- package/dist/extensions/index.js +156 -135
- package/dist/extensions/params.d.ts +1 -4
- package/dist/extensions/when.d.ts +3 -1
- package/dist/resources/index.d.ts +0 -1
- package/dist/resources/index.js +798 -470
- package/package.json +2 -2
- package/dist/api/templates.d.ts +0 -1
- package/dist/client/templates.d.ts +0 -11
- package/dist/resources/template.d.ts +0 -1
package/dist/extensions/index.js
CHANGED
|
@@ -13,9 +13,51 @@ var __export = (target, all) => {
|
|
|
13
13
|
});
|
|
14
14
|
};
|
|
15
15
|
|
|
16
|
+
// ../pstdio-api-contracts/src/extension-kernel/builtin-refs.ts
|
|
17
|
+
var hostRef = (kind, id) => ({ extensionId: "pstdio", kind, id });
|
|
18
|
+
var workbenchCommands = {
|
|
19
|
+
switchMode: hostRef("command", "workbench.action.switchMode")
|
|
20
|
+
};
|
|
21
|
+
var workbenchModes = {
|
|
22
|
+
project: hostRef("mode", "project"),
|
|
23
|
+
settings: hostRef("mode", "settings")
|
|
24
|
+
};
|
|
25
|
+
var hostResourceKind = (id, label, menuSlots) => ({
|
|
26
|
+
id,
|
|
27
|
+
ref: hostRef("resource-kind", id),
|
|
28
|
+
surface: "primary",
|
|
29
|
+
label,
|
|
30
|
+
menuSlots
|
|
31
|
+
});
|
|
32
|
+
var headerMenuSlots = [
|
|
33
|
+
{ id: "headerPrimary", placement: "header-primary", access: "public" },
|
|
34
|
+
{ id: "headerOverflow", placement: "header-overflow", access: "public" }
|
|
35
|
+
];
|
|
36
|
+
var workbenchResourceKindDefinitions = {
|
|
37
|
+
project: hostResourceKind("project", "Extension", headerMenuSlots),
|
|
38
|
+
session: hostResourceKind("session", "Session", headerMenuSlots),
|
|
39
|
+
workspace: hostResourceKind("workspace", "Workspace", headerMenuSlots)
|
|
40
|
+
};
|
|
41
|
+
var workbenchResourceKinds = {
|
|
42
|
+
project: workbenchResourceKindDefinitions.project.ref,
|
|
43
|
+
session: workbenchResourceKindDefinitions.session.ref,
|
|
44
|
+
workspace: workbenchResourceKindDefinitions.workspace.ref
|
|
45
|
+
};
|
|
46
|
+
var workbenchSlots = {
|
|
47
|
+
projectNavigation: hostRef("navigation-item", "project.navigation"),
|
|
48
|
+
projectSettings: hostRef("settings-panel", "project.settings"),
|
|
49
|
+
statusBarLeading: hostRef("status-bar-item", "status-bar.leading"),
|
|
50
|
+
statusBarTrailing: hostRef("status-bar-item", "status-bar.trailing")
|
|
51
|
+
};
|
|
16
52
|
// ../pstdio-api-contracts/src/extension-kernel/refs.ts
|
|
17
|
-
var
|
|
18
|
-
var
|
|
53
|
+
var createCommandRef = (input) => ({ ...input, kind: "command" });
|
|
54
|
+
var commandRef = Object.assign(createCommandRef, {
|
|
55
|
+
forExtension: (owner) => (id) => createCommandRef({ extensionId: `${owner.publisher}.${owner.name}`, id })
|
|
56
|
+
});
|
|
57
|
+
var eventRef = (input) => ({
|
|
58
|
+
...input,
|
|
59
|
+
kind: "event"
|
|
60
|
+
});
|
|
19
61
|
|
|
20
62
|
// ../pstdio-api-contracts/src/extension-kernel/slots.ts
|
|
21
63
|
var defineSlot = (id, options) => ({
|
|
@@ -27,48 +69,49 @@ var defineSlot = (id, options) => ({
|
|
|
27
69
|
});
|
|
28
70
|
|
|
29
71
|
// ../pstdio-api-contracts/src/extension-kernel/kernel-slots.ts
|
|
72
|
+
var hostEventRef = (id) => eventRef({ extensionId: "pstdio", id });
|
|
73
|
+
var resourceMenuSlotRef = (resourceKind, id) => defineSlot(`${resourceKind.id}.${id}`, { kind: "menu" });
|
|
30
74
|
var projectSlots = {
|
|
31
75
|
sidenav: defineSlot("project.sidenav", { kind: "panel" }),
|
|
32
|
-
headerPrimary:
|
|
33
|
-
headerOverflow:
|
|
76
|
+
headerPrimary: resourceMenuSlotRef(workbenchResourceKinds.project, "headerPrimary"),
|
|
77
|
+
headerOverflow: resourceMenuSlotRef(workbenchResourceKinds.project, "headerOverflow"),
|
|
34
78
|
settingsPanels: defineSlot("project.settingsPanels", { kind: "settings" })
|
|
35
79
|
};
|
|
36
80
|
var sessionSlots = {
|
|
37
|
-
headerPrimary:
|
|
38
|
-
headerOverflow:
|
|
39
|
-
transcriptActions: defineSlot("session.transcriptActions", { kind: "menu" })
|
|
81
|
+
headerPrimary: resourceMenuSlotRef(workbenchResourceKinds.session, "headerPrimary"),
|
|
82
|
+
headerOverflow: resourceMenuSlotRef(workbenchResourceKinds.session, "headerOverflow")
|
|
40
83
|
};
|
|
41
84
|
var workspaceSlots = {
|
|
42
|
-
headerPrimary:
|
|
43
|
-
headerOverflow:
|
|
85
|
+
headerPrimary: resourceMenuSlotRef(workbenchResourceKinds.workspace, "headerPrimary"),
|
|
86
|
+
headerOverflow: resourceMenuSlotRef(workbenchResourceKinds.workspace, "headerOverflow"),
|
|
44
87
|
sidenav: defineSlot("workspace.sidenav", { kind: "panel" })
|
|
45
88
|
};
|
|
46
89
|
var projectEvents = {
|
|
47
|
-
opened:
|
|
90
|
+
opened: hostEventRef("project.opened")
|
|
48
91
|
};
|
|
49
92
|
var sessionEvents = {
|
|
50
|
-
started:
|
|
51
|
-
resumed:
|
|
52
|
-
awaitingInput:
|
|
53
|
-
succeeded:
|
|
54
|
-
failed:
|
|
55
|
-
completed:
|
|
93
|
+
started: hostEventRef("session.started"),
|
|
94
|
+
resumed: hostEventRef("session.resumed"),
|
|
95
|
+
awaitingInput: hostEventRef("session.awaitingInput"),
|
|
96
|
+
succeeded: hostEventRef("session.succeeded"),
|
|
97
|
+
failed: hostEventRef("session.failed"),
|
|
98
|
+
completed: hostEventRef("session.completed")
|
|
56
99
|
};
|
|
57
100
|
var workspaceEvents = {
|
|
58
|
-
created:
|
|
59
|
-
provision:
|
|
60
|
-
ready:
|
|
61
|
-
archived:
|
|
62
|
-
deleted:
|
|
101
|
+
created: hostEventRef("workspace.created"),
|
|
102
|
+
provision: hostEventRef("workspace.provision"),
|
|
103
|
+
ready: hostEventRef("workspace.ready"),
|
|
104
|
+
archived: hostEventRef("workspace.archived"),
|
|
105
|
+
deleted: hostEventRef("workspace.deleted")
|
|
63
106
|
};
|
|
64
107
|
var worktreeEvents = {
|
|
65
|
-
removed:
|
|
108
|
+
removed: hostEventRef("worktree.removed")
|
|
66
109
|
};
|
|
67
110
|
var gitEvents = {
|
|
68
|
-
committed:
|
|
69
|
-
rebased:
|
|
70
|
-
merged:
|
|
71
|
-
conflicted:
|
|
111
|
+
committed: hostEventRef("git.committed"),
|
|
112
|
+
rebased: hostEventRef("git.rebased"),
|
|
113
|
+
merged: hostEventRef("git.merged"),
|
|
114
|
+
conflicted: hostEventRef("git.conflicted")
|
|
72
115
|
};
|
|
73
116
|
// ../pstdio-api-contracts/src/extension-kernel/l10n.ts
|
|
74
117
|
var l10n = (key, defaultValue) => ({
|
|
@@ -85,7 +128,7 @@ var packageAsset = (path, baseUrl) => ({
|
|
|
85
128
|
// ../pstdio-api-contracts/src/extension-kernel/types/composition.ts
|
|
86
129
|
var dockedWorkbenchRegions = ["sidenav", "main", "secondary", "side"];
|
|
87
130
|
// ../pstdio-api-contracts/src/extension-kernel/types/extension.ts
|
|
88
|
-
var EXTENSION_API_VERSION = "1.0.0-alpha.
|
|
131
|
+
var EXTENSION_API_VERSION = "1.0.0-alpha.5";
|
|
89
132
|
// ../pstdio-api-contracts/src/extension-kernel/types/webview-capabilities.ts
|
|
90
133
|
var WEBVIEW_HOST_CAPABILITY_VERSION = 1;
|
|
91
134
|
var WEBVIEW_DECLARABLE_CAPABILITIES = [
|
|
@@ -111,90 +154,6 @@ var WEBVIEW_HOST_CAPABILITIES = [
|
|
|
111
154
|
...WEBVIEW_DECLARABLE_CAPABILITIES,
|
|
112
155
|
...ALWAYS_AVAILABLE_WEBVIEW_CAPABILITIES
|
|
113
156
|
];
|
|
114
|
-
// ../pstdio-api-contracts/src/extension-kernel/workbench-targets.ts
|
|
115
|
-
var workbenchMenuTargets = ["workbench.nav.actions", "workbench.nav.overflow"];
|
|
116
|
-
var workbenchTreeTargets = [
|
|
117
|
-
"workbench.left.tree",
|
|
118
|
-
"workbench.main.left.tree",
|
|
119
|
-
"workbench.main.right.tree"
|
|
120
|
-
];
|
|
121
|
-
var workbenchRegions = [
|
|
122
|
-
"nav",
|
|
123
|
-
"activity",
|
|
124
|
-
"sidenav-header",
|
|
125
|
-
"sidenav",
|
|
126
|
-
"main-header",
|
|
127
|
-
"main",
|
|
128
|
-
"secondary-header",
|
|
129
|
-
"secondary",
|
|
130
|
-
"side-header",
|
|
131
|
-
"side",
|
|
132
|
-
"status",
|
|
133
|
-
"overlay"
|
|
134
|
-
];
|
|
135
|
-
var workbenchViewTargets = [
|
|
136
|
-
"workbench.main",
|
|
137
|
-
"workbench.main.left",
|
|
138
|
-
"workbench.main.right",
|
|
139
|
-
"workbench.secondary"
|
|
140
|
-
];
|
|
141
|
-
var workbenchSettingsTargets = ["workbench.settings"];
|
|
142
|
-
var workbenchSettingsScopes = ["project", "global"];
|
|
143
|
-
var workbenchModePanels = ["main", "secondary", "side"];
|
|
144
|
-
var workbenchModeLayoutTargets = [
|
|
145
|
-
"workbench.left",
|
|
146
|
-
"workbench.main.left",
|
|
147
|
-
"workbench.main",
|
|
148
|
-
"workbench.main.right",
|
|
149
|
-
"workbench.secondary"
|
|
150
|
-
];
|
|
151
|
-
var workbenchModeLayoutTargetPanels = {
|
|
152
|
-
"workbench.left": undefined,
|
|
153
|
-
"workbench.main.left": "main",
|
|
154
|
-
"workbench.main": "main",
|
|
155
|
-
"workbench.main.right": "main",
|
|
156
|
-
"workbench.secondary": "secondary"
|
|
157
|
-
};
|
|
158
|
-
var getWorkbenchModeLayoutTargetPanel = (target) => workbenchModeLayoutTargetPanels[target];
|
|
159
|
-
var workbenchTargets = [
|
|
160
|
-
{
|
|
161
|
-
id: "workbench.nav.actions",
|
|
162
|
-
allowedKinds: ["menu"],
|
|
163
|
-
granularity: "surface",
|
|
164
|
-
rationale: "Primary command surface in the host-owned nav (top) workbench chrome."
|
|
165
|
-
},
|
|
166
|
-
{
|
|
167
|
-
id: "workbench.nav.overflow",
|
|
168
|
-
allowedKinds: ["menu"],
|
|
169
|
-
granularity: "surface",
|
|
170
|
-
rationale: "Secondary command surface in the host-owned nav (top) workbench chrome."
|
|
171
|
-
},
|
|
172
|
-
{
|
|
173
|
-
id: "workbench.left.tree",
|
|
174
|
-
allowedKinds: ["treeItem"],
|
|
175
|
-
granularity: "areaTree",
|
|
176
|
-
rationale: "Tree entries for the active tree renderer mounted in the left area."
|
|
177
|
-
},
|
|
178
|
-
{
|
|
179
|
-
id: "workbench.main.left.tree",
|
|
180
|
-
allowedKinds: ["treeItem"],
|
|
181
|
-
granularity: "areaTree",
|
|
182
|
-
rationale: "Tree entries for the active tree renderer mounted in the main-left area."
|
|
183
|
-
},
|
|
184
|
-
{
|
|
185
|
-
id: "workbench.main.right.tree",
|
|
186
|
-
allowedKinds: ["treeItem"],
|
|
187
|
-
granularity: "areaTree",
|
|
188
|
-
rationale: "Tree entries for the active tree renderer mounted in the main-right area."
|
|
189
|
-
},
|
|
190
|
-
{
|
|
191
|
-
id: "workbench.settings",
|
|
192
|
-
allowedKinds: ["settings"],
|
|
193
|
-
granularity: "surface",
|
|
194
|
-
rationale: "Settings panel placement in host-owned settings navigation."
|
|
195
|
-
}
|
|
196
|
-
];
|
|
197
|
-
var getWorkbenchTargetDefinition = (id) => workbenchTargets.find((target) => target.id === id);
|
|
198
157
|
// src/extensions/command-outcome.ts
|
|
199
158
|
var unwrapCommandOutcome = (response, fallbackReason = "Command failed.") => {
|
|
200
159
|
const { outcome } = response;
|
|
@@ -204,9 +163,55 @@ var unwrapCommandOutcome = (response, fallbackReason = "Command failed.") => {
|
|
|
204
163
|
return outcome.value;
|
|
205
164
|
};
|
|
206
165
|
// src/extensions/define-command.ts
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
166
|
+
function defineCommand(definition) {
|
|
167
|
+
return { ...definition, ref: { kind: "command", id: definition.id } };
|
|
168
|
+
}
|
|
169
|
+
var defineMiddleware = (definition) => ({
|
|
170
|
+
...definition,
|
|
171
|
+
ref: { kind: "middleware", id: definition.id }
|
|
172
|
+
});
|
|
173
|
+
var defineHook = (definition) => ({
|
|
174
|
+
...definition,
|
|
175
|
+
ref: { kind: "hook", id: definition.id }
|
|
176
|
+
});
|
|
177
|
+
// src/extensions/define-contribution.ts
|
|
178
|
+
var defineContribution = (_kind) => (definition) => ({
|
|
179
|
+
...definition,
|
|
180
|
+
ref: { kind: _kind, id: definition.id }
|
|
181
|
+
});
|
|
182
|
+
var defineView = defineContribution("view");
|
|
183
|
+
var defineViewMenu = defineContribution("view-menu");
|
|
184
|
+
var definePlacement = defineContribution("placement");
|
|
185
|
+
var defineResourceKind = defineContribution("resource-kind");
|
|
186
|
+
var resourceSlotRef = (resourceKind, id) => ({
|
|
187
|
+
resourceKind,
|
|
188
|
+
id
|
|
189
|
+
});
|
|
190
|
+
var resourceMenuSlotRef2 = (resourceKind, id) => defineSlot(`${resourceKind.id}.${id}`, { kind: "menu" });
|
|
191
|
+
var defineResourceView = defineContribution("resource-view");
|
|
192
|
+
var defineNavigationItem = defineContribution("navigation-item");
|
|
193
|
+
var defineMode = defineContribution("mode");
|
|
194
|
+
var defineStatusBarItem = defineContribution("status-bar-item");
|
|
195
|
+
var defineStatuses = defineContribution("status");
|
|
196
|
+
var defineSettingsPanel = defineContribution("settings-panel");
|
|
197
|
+
var defineActivityItem = defineContribution("activity-item");
|
|
198
|
+
var defineSettingsSection = defineContribution("settings-section");
|
|
199
|
+
var defineCommandPaletteResource = defineContribution("command-palette-resource");
|
|
200
|
+
var defineKeybinding = defineContribution("keybinding");
|
|
201
|
+
var defineSchedule = defineContribution("schedule");
|
|
202
|
+
var defineArtifactMount = defineContribution("artifact-mount");
|
|
203
|
+
var defineTemplateType = defineContribution("template-type");
|
|
204
|
+
var defineTemplate = defineContribution("template");
|
|
205
|
+
var defineSkill = defineContribution("skill");
|
|
206
|
+
var defineTheme = defineContribution("theme");
|
|
207
|
+
var defineFileIconTheme = defineContribution("file-icon-theme");
|
|
208
|
+
var defineWorkspaceType = defineContribution("workspace-type");
|
|
209
|
+
var defineHarness = defineContribution("harness");
|
|
210
|
+
var defineConnection = defineContribution("connection");
|
|
211
|
+
var defineResourceHierarchyProvider = (definition) => ({
|
|
212
|
+
...definition,
|
|
213
|
+
ref: { kind: "resource-hierarchy-provider", id: definition.id }
|
|
214
|
+
});
|
|
210
215
|
// src/extensions/define-extension.ts
|
|
211
216
|
var defineExtension = (extension) => extension;
|
|
212
217
|
// src/extensions/define-extension-view.ts
|
|
@@ -288,21 +293,14 @@ var params = {
|
|
|
288
293
|
}),
|
|
289
294
|
repo: (options) => ({ type: "repo", ...options }),
|
|
290
295
|
harness: (options) => ({ type: "harness", ...options }),
|
|
291
|
-
template: (options) => ({
|
|
292
|
-
label: options.label,
|
|
293
|
-
description: options.description,
|
|
294
|
-
required: options.required,
|
|
295
|
-
defaultValue: options.defaultValue,
|
|
296
|
-
metadata: options.metadata,
|
|
297
|
-
type: "template",
|
|
298
|
-
templateType: options.type
|
|
299
|
-
}),
|
|
300
296
|
resource: (options) => ({ type: "resource", ...options }),
|
|
301
297
|
json: (options) => ({ type: "json", ...options }),
|
|
302
298
|
list: (options) => ({ type: "list", ...options })
|
|
303
299
|
};
|
|
304
300
|
// src/extensions/refs.ts
|
|
305
301
|
var commandEvent = (command, phase) => ({
|
|
302
|
+
...command.extensionId ? { extensionId: command.extensionId } : {},
|
|
303
|
+
kind: "event",
|
|
306
304
|
id: `command.${phase}:${command.id}`
|
|
307
305
|
});
|
|
308
306
|
// src/extensions/terminal-session-bridge.ts
|
|
@@ -385,7 +383,7 @@ var createWebviewClient = (host, options) => {
|
|
|
385
383
|
}
|
|
386
384
|
const runCommand = async (commandKey, params2) => {
|
|
387
385
|
const response = await host.call("commands.execute", {
|
|
388
|
-
commandId: `${extensionId}.${commandKey}`,
|
|
386
|
+
commandId: `${extensionId}.command.${commandKey}`,
|
|
389
387
|
params: params2
|
|
390
388
|
});
|
|
391
389
|
return unwrapCommandOutcome(response);
|
|
@@ -411,23 +409,22 @@ var matchesResourceWhen = (when, resourceType) => {
|
|
|
411
409
|
const resourceTypes = when?.resourceType;
|
|
412
410
|
if (!resourceTypes?.length)
|
|
413
411
|
return true;
|
|
414
|
-
return resourceType ? resourceTypes.
|
|
412
|
+
return resourceType ? resourceTypes.some((candidate) => (typeof candidate === "string" ? candidate : candidate.id) === resourceType) : false;
|
|
415
413
|
};
|
|
416
414
|
export {
|
|
417
415
|
worktreeEvents,
|
|
418
416
|
workspaceSlots,
|
|
419
417
|
workspaceEvents,
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
workbenchModePanels,
|
|
426
|
-
workbenchModeLayoutTargets,
|
|
427
|
-
workbenchMenuTargets,
|
|
418
|
+
workbenchSlots,
|
|
419
|
+
workbenchResourceKinds,
|
|
420
|
+
workbenchResourceKindDefinitions,
|
|
421
|
+
workbenchModes,
|
|
422
|
+
workbenchCommands,
|
|
428
423
|
unwrapCommandOutcome,
|
|
429
424
|
sessionSlots,
|
|
430
425
|
sessionEvents,
|
|
426
|
+
resourceSlotRef,
|
|
427
|
+
resourceMenuSlotRef2 as resourceMenuSlotRef,
|
|
431
428
|
projectSlots,
|
|
432
429
|
projectEvents,
|
|
433
430
|
params,
|
|
@@ -436,15 +433,39 @@ export {
|
|
|
436
433
|
l10n,
|
|
437
434
|
isLocalizedString,
|
|
438
435
|
gitEvents,
|
|
439
|
-
getWorkbenchTargetDefinition,
|
|
440
|
-
getWorkbenchModeLayoutTargetPanel,
|
|
441
436
|
eventRef,
|
|
442
437
|
dockedWorkbenchRegions,
|
|
438
|
+
defineWorkspaceType,
|
|
439
|
+
defineViewMenu,
|
|
440
|
+
defineView,
|
|
441
|
+
defineTheme,
|
|
442
|
+
defineTemplateType,
|
|
443
|
+
defineTemplate,
|
|
444
|
+
defineStatuses,
|
|
445
|
+
defineStatusBarItem,
|
|
446
|
+
defineSlot,
|
|
447
|
+
defineSkill,
|
|
448
|
+
defineSettingsSection,
|
|
449
|
+
defineSettingsPanel,
|
|
450
|
+
defineSchedule,
|
|
451
|
+
defineResourceView,
|
|
452
|
+
defineResourceKind,
|
|
453
|
+
defineResourceHierarchyProvider,
|
|
454
|
+
definePlacement,
|
|
455
|
+
defineNavigationItem,
|
|
456
|
+
defineMode,
|
|
443
457
|
defineMiddleware,
|
|
458
|
+
defineKeybinding,
|
|
444
459
|
defineHook,
|
|
460
|
+
defineHarness,
|
|
461
|
+
defineFileIconTheme,
|
|
445
462
|
defineExtensionView,
|
|
446
463
|
defineExtension,
|
|
464
|
+
defineConnection,
|
|
465
|
+
defineCommandPaletteResource,
|
|
447
466
|
defineCommand,
|
|
467
|
+
defineArtifactMount,
|
|
468
|
+
defineActivityItem,
|
|
448
469
|
createWebviewClient,
|
|
449
470
|
createTerminalSessionBridge,
|
|
450
471
|
commandRef,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { BooleanParam, FilesParam, HarnessParam, JsonParam, ListParam, LongTextParam, MarkdownParam, MultiSelectParam, NumberParam, RepoParam, ResourceParam, SelectParam,
|
|
1
|
+
import type { BooleanParam, FilesParam, HarnessParam, JsonParam, ListParam, LongTextParam, MarkdownParam, MultiSelectParam, NumberParam, RepoParam, ResourceParam, SelectParam, TextParam } from "pstdio-api-contracts/extension-kernel";
|
|
2
2
|
type RequiredOf<TOptions> = TOptions extends {
|
|
3
3
|
required: infer TRequired extends boolean;
|
|
4
4
|
} ? TRequired : undefined;
|
|
@@ -26,9 +26,6 @@ export declare const params: {
|
|
|
26
26
|
multiSelect: <const TOptions extends ParamOptions<MultiSelectParam>>(options: TOptions) => MultiSelectParam<RequiredOf<TOptions>>;
|
|
27
27
|
repo: <const TOptions extends ParamOptions<RepoParam> | undefined = undefined>(options?: TOptions) => RepoParam<RequiredOf<TOptions>>;
|
|
28
28
|
harness: <const TOptions extends ParamOptions<HarnessParam> | undefined = undefined>(options?: TOptions) => HarnessParam<RequiredOf<TOptions>>;
|
|
29
|
-
template: <const TOptions extends Omit<TemplateParam, "type" | "templateType"> & {
|
|
30
|
-
type: string;
|
|
31
|
-
}>(options: TOptions) => TemplateParam<RequiredOf<TOptions>>;
|
|
32
29
|
resource: <const TOptions extends ParamOptions<ResourceParam>>(options: TOptions) => ResourceParam<RequiredOf<TOptions>>;
|
|
33
30
|
json: <T = unknown, const TOptions extends ParamOptions<JsonParam<T>> | undefined = undefined>(options?: TOptions) => JsonParam<T, RequiredOf<TOptions>>;
|
|
34
31
|
list: <const TOptions extends ParamOptions<ListParam> | undefined = undefined>(options?: TOptions) => ListParam<RequiredOf<TOptions>>;
|
|
@@ -6,4 +6,6 @@ import type { WhenExpression } from "pstdio-api-contracts/extension-kernel";
|
|
|
6
6
|
* resolve from the active resource alone (`mode`/`source`/`metadata` require execution context the
|
|
7
7
|
* palette does not have).
|
|
8
8
|
*/
|
|
9
|
-
export declare const matchesResourceWhen: (when: Pick<WhenExpression, "resourceType"> |
|
|
9
|
+
export declare const matchesResourceWhen: (when: Pick<WhenExpression, "resourceType"> | {
|
|
10
|
+
resourceType?: readonly string[];
|
|
11
|
+
} | undefined, resourceType: string | undefined) => boolean;
|
|
@@ -6,5 +6,4 @@ export type { Project } from "./project";
|
|
|
6
6
|
export type { Session, SessionStatus } from "./session";
|
|
7
7
|
export type { Settings } from "./settings";
|
|
8
8
|
export type { Skill, SkillFile, SkillWithContent } from "./skill";
|
|
9
|
-
export type { Template, TemplateType, TemplateWithContent } from "./template";
|
|
10
9
|
export type { Workspace, WorkspaceListItem } from "./workspace";
|