@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
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { AutomationRun, CreateAutomationRunInput, IssueAutomationTokenInput, IssueAutomationTokenResponse, ListAutomationRunEventsResponse, ListAutomationTokensResponse } from "pstdio-api-contracts";
|
|
2
|
+
import type { RequestFn } from "./request";
|
|
3
|
+
export type AutomationClient = {
|
|
4
|
+
issueToken(input: IssueAutomationTokenInput): Promise<IssueAutomationTokenResponse>;
|
|
5
|
+
listTokens(projectId: string): Promise<ListAutomationTokensResponse>;
|
|
6
|
+
revokeToken(tokenId: string): Promise<void>;
|
|
7
|
+
createRun(projectId: string, idempotencyKey: string, input: CreateAutomationRunInput): Promise<AutomationRun>;
|
|
8
|
+
getRun(projectId: string, runId: string): Promise<AutomationRun>;
|
|
9
|
+
listRunEvents(projectId: string, runId: string, after?: number): Promise<ListAutomationRunEventsResponse>;
|
|
10
|
+
cancelRun(projectId: string, runId: string): Promise<AutomationRun>;
|
|
11
|
+
};
|
|
12
|
+
export declare const createAutomationClient: (request: RequestFn) => AutomationClient;
|
package/dist/client/client.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type AgentClient } from "./agents";
|
|
2
|
+
import { type AutomationClient } from "./automation";
|
|
2
3
|
import { type ExtensionClient } from "./extensions";
|
|
3
4
|
import { type NotificationsClient } from "./notifications";
|
|
4
5
|
import { type ProjectClient } from "./projects";
|
|
@@ -8,15 +9,14 @@ import { type SessionClient } from "./sessions";
|
|
|
8
9
|
import { type SettingsClient } from "./settings";
|
|
9
10
|
import { type SkillClient } from "./skills";
|
|
10
11
|
import { type SyncClient } from "./sync";
|
|
11
|
-
import { type TemplateClient } from "./templates";
|
|
12
12
|
import { type WorkspaceClient } from "./workspaces";
|
|
13
13
|
export type PstdioClient = {
|
|
14
14
|
projects: ProjectClient;
|
|
15
15
|
workspaces: WorkspaceClient;
|
|
16
16
|
sessions: SessionClient;
|
|
17
|
-
templates: TemplateClient;
|
|
18
17
|
skills: SkillClient;
|
|
19
18
|
agents: AgentClient;
|
|
19
|
+
automation: AutomationClient;
|
|
20
20
|
notifications: NotificationsClient;
|
|
21
21
|
extensions: ExtensionClient;
|
|
22
22
|
settings: SettingsClient;
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
import type { CommandExecuteRequest, CommandExecuteResponse, DispatchExtensionEventInput, EnableInstalledExtensionRequest, EnableInstalledExtensionResponse, ListExtensionAppearanceResponse, ListExtensionCommandsResponse,
|
|
1
|
+
import type { CommandExecuteRequest, CommandExecuteResponse, ConfigureExtensionConnectionInput, DispatchExtensionEventInput, EnableInstalledExtensionRequest, EnableInstalledExtensionResponse, ExtensionConnectionRecord, ListExtensionAppearanceResponse, ListExtensionCommandsResponse, ListExtensionConnectionsResponse, ListProjectExtensionsResponse } from "pstdio-api-contracts";
|
|
2
2
|
import type { RequestFn } from "./request";
|
|
3
3
|
export type ExtensionClient = {
|
|
4
4
|
enableInstalled(projectId: string, installName: string, request: EnableInstalledExtensionRequest): Promise<EnableInstalledExtensionResponse>;
|
|
5
|
-
updateInstalledTemplate(installName: string, templateKey: string, input: UpdateInstalledExtensionTemplateInput): Promise<UpdateInstalledExtensionTemplateResponse>;
|
|
6
5
|
listAppearance(projectId: string): Promise<ListExtensionAppearanceResponse>;
|
|
7
6
|
listCommands(projectId: string): Promise<ListExtensionCommandsResponse>;
|
|
8
7
|
listProject(projectId: string): Promise<ListProjectExtensionsResponse>;
|
|
8
|
+
listConnections(projectId: string): Promise<ListExtensionConnectionsResponse>;
|
|
9
|
+
configureConnection(projectId: string, extensionId: string, connectionId: string, input: ConfigureExtensionConnectionInput): Promise<ExtensionConnectionRecord>;
|
|
10
|
+
checkConnection(projectId: string, extensionId: string, connectionId: string): Promise<ExtensionConnectionRecord>;
|
|
11
|
+
deleteConnection(projectId: string, extensionId: string, connectionId: string): Promise<void>;
|
|
9
12
|
execute(commandId: string, request: CommandExecuteRequest): Promise<CommandExecuteResponse>;
|
|
10
13
|
dispatchEvent(projectId: string, input: DispatchExtensionEventInput): Promise<void>;
|
|
11
14
|
};
|
package/dist/client/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export type { AgentClient } from "./agents";
|
|
2
|
+
export type { AutomationClient } from "./automation";
|
|
2
3
|
export { createClient, type PstdioClient } from "./client";
|
|
3
4
|
export type { ExtensionClient } from "./extensions";
|
|
4
5
|
export type { NotificationsClient } from "./notifications";
|
|
@@ -10,5 +11,4 @@ export type { SettingsClient } from "./settings";
|
|
|
10
11
|
export type { SkillClient } from "./skills";
|
|
11
12
|
export type { SseEvent } from "./sse";
|
|
12
13
|
export { applySyncEvent, parseSyncDeleteEvent, type StartSyncInput, type SyncClient, type SyncConnection, type SyncRow, type SyncWriter, type SyncWriterProvider, } from "./sync";
|
|
13
|
-
export type { TemplateClient } from "./templates";
|
|
14
14
|
export type { WorkspaceClient } from "./workspaces";
|
package/dist/client/index.js
CHANGED
|
@@ -19,19 +19,34 @@ var createAgentClient = (request) => ({
|
|
|
19
19
|
models: (agentId) => request(`/v1/agents/${agentId}/models`)
|
|
20
20
|
});
|
|
21
21
|
|
|
22
|
+
// src/client/automation.ts
|
|
23
|
+
var createAutomationClient = (request) => ({
|
|
24
|
+
issueToken: (body) => request("/v1/auth/tokens", { method: "POST", body }),
|
|
25
|
+
listTokens: (projectId) => request(`/v1/auth/tokens?projectId=${encodeURIComponent(projectId)}`),
|
|
26
|
+
revokeToken: (tokenId) => request(`/v1/auth/tokens/${encodeURIComponent(tokenId)}`, { method: "DELETE" }),
|
|
27
|
+
createRun: (projectId, idempotencyKey, body) => request(`/v1/projects/${projectId}/automation-runs`, {
|
|
28
|
+
method: "POST",
|
|
29
|
+
headers: { "idempotency-key": idempotencyKey },
|
|
30
|
+
body
|
|
31
|
+
}),
|
|
32
|
+
getRun: (projectId, runId) => request(`/v1/projects/${projectId}/automation-runs/${encodeURIComponent(runId)}`),
|
|
33
|
+
listRunEvents: (projectId, runId, after = 0) => request(`/v1/projects/${projectId}/automation-runs/${encodeURIComponent(runId)}/events?after=${encodeURIComponent(after)}`),
|
|
34
|
+
cancelRun: (projectId, runId) => request(`/v1/projects/${projectId}/automation-runs/${encodeURIComponent(runId)}/cancel`, { method: "POST" })
|
|
35
|
+
});
|
|
36
|
+
|
|
22
37
|
// src/client/extensions.ts
|
|
23
38
|
var createExtensionClient = (request) => ({
|
|
24
39
|
enableInstalled: (projectId, installName, body) => request(`/v1/projects/${projectId}/extensions/installed/${encodeURIComponent(installName)}/enable`, {
|
|
25
40
|
method: "POST",
|
|
26
41
|
body
|
|
27
42
|
}),
|
|
28
|
-
updateInstalledTemplate: (installName, templateKey, body) => request(`/v1/extensions/installed/${encodeURIComponent(installName)}/templates/${encodeURIComponent(templateKey)}`, {
|
|
29
|
-
method: "PUT",
|
|
30
|
-
body
|
|
31
|
-
}),
|
|
32
43
|
listAppearance: (projectId) => request(`/v1/projects/${projectId}/extensions/appearance`),
|
|
33
44
|
listCommands: (projectId) => request(`/v1/projects/${projectId}/extensions/commands`),
|
|
34
45
|
listProject: (projectId) => request(`/v1/projects/${projectId}/extensions`),
|
|
46
|
+
listConnections: (projectId) => request(`/v1/projects/${projectId}/extension-connections`),
|
|
47
|
+
configureConnection: (projectId, extensionId, connectionId, body) => request(`/v1/projects/${projectId}/extension-connections/${encodeURIComponent(extensionId)}/${encodeURIComponent(connectionId)}`, { method: "PUT", body }),
|
|
48
|
+
checkConnection: (projectId, extensionId, connectionId) => request(`/v1/projects/${projectId}/extension-connections/${encodeURIComponent(extensionId)}/${encodeURIComponent(connectionId)}/check`, { method: "POST" }),
|
|
49
|
+
deleteConnection: (projectId, extensionId, connectionId) => request(`/v1/projects/${projectId}/extension-connections/${encodeURIComponent(extensionId)}/${encodeURIComponent(connectionId)}`, { method: "DELETE" }),
|
|
35
50
|
execute: (commandId, input) => {
|
|
36
51
|
const { projectId, ...body } = input;
|
|
37
52
|
return request(`/v1/projects/${projectId}/extensions/commands/${encodeURIComponent(commandId)}/execute`, {
|
|
@@ -521,15 +536,6 @@ var createSyncClient = (clientOptions) => ({
|
|
|
521
536
|
}
|
|
522
537
|
});
|
|
523
538
|
|
|
524
|
-
// src/client/templates.ts
|
|
525
|
-
var createTemplateClient = (request) => ({
|
|
526
|
-
list: (projectId) => request(`/v1/projects/${projectId}/templates`),
|
|
527
|
-
get: (projectId, templateId) => request(`/v1/projects/${projectId}/templates/${templateId}`),
|
|
528
|
-
create: (projectId, input) => request(`/v1/projects/${projectId}/templates`, { method: "POST", body: input }),
|
|
529
|
-
update: (projectId, templateId, input) => request(`/v1/projects/${projectId}/templates/${templateId}`, { method: "PUT", body: input }),
|
|
530
|
-
delete: (projectId, templateId) => request(`/v1/projects/${projectId}/templates/${templateId}`, { method: "DELETE" })
|
|
531
|
-
});
|
|
532
|
-
|
|
533
539
|
// src/client/workspaces.ts
|
|
534
540
|
var createWorkspaceClient = (request) => ({
|
|
535
541
|
listFiles: (workspaceId, input = {}) => {
|
|
@@ -611,9 +617,9 @@ var createClient = (options = {}) => {
|
|
|
611
617
|
projects: createProjectClient(request),
|
|
612
618
|
workspaces: createWorkspaceClient(request),
|
|
613
619
|
sessions: createSessionClient(request, options),
|
|
614
|
-
templates: createTemplateClient(request),
|
|
615
620
|
skills: createSkillClient(request),
|
|
616
621
|
agents: createAgentClient(request),
|
|
622
|
+
automation: createAutomationClient(request),
|
|
617
623
|
notifications: createNotificationsClient(request),
|
|
618
624
|
extensions: createExtensionClient(request),
|
|
619
625
|
settings: createSettingsClient(request),
|
|
@@ -1,26 +1,28 @@
|
|
|
1
|
-
import type { CommandDefinition, HookDefinition, MiddlewareDefinition, ParamObjectSchema, Struct } from "pstdio-api-contracts/extension-kernel";
|
|
1
|
+
import type { CommandDefinition, ContributionDefinition, HookDefinition, MiddlewareDefinition, ParamObjectSchema, Struct } from "pstdio-api-contracts/extension-kernel";
|
|
2
|
+
type CommandContribution<TSchema extends ParamObjectSchema | undefined, TResult> = CommandDefinition<TSchema, TResult> & ContributionDefinition<"command">;
|
|
3
|
+
type CommandInput<TSchema extends ParamObjectSchema | undefined, TResult> = Omit<CommandDefinition<TSchema, TResult>, "ref">;
|
|
2
4
|
/**
|
|
3
5
|
* Define a single command outside an extension's object literal. Use this when commands
|
|
4
6
|
* grow large enough to split into separate files, or when you need to share a command
|
|
5
|
-
* shape across extensions. The `params` schema drives the inferred shape of
|
|
7
|
+
* shape across extensions. The `params` schema drives the inferred shape of the
|
|
8
|
+
* handler's second argument.
|
|
6
9
|
*
|
|
7
10
|
* @example
|
|
8
11
|
* export const sayHello = defineCommand({
|
|
9
12
|
* title: "Say hello",
|
|
10
13
|
* params: { name: params.text({ required: true }) },
|
|
11
|
-
* async run(ctx) {
|
|
12
|
-
*
|
|
14
|
+
* async run(ctx, commandParams) {
|
|
15
|
+
* commandParams.name; // string
|
|
13
16
|
* },
|
|
14
17
|
* });
|
|
15
18
|
*/
|
|
16
|
-
export declare
|
|
19
|
+
export declare function defineCommand<const TSchema extends ParamObjectSchema | undefined, TResult>(definition: CommandInput<TSchema, TResult>): CommandContribution<TSchema, TResult>;
|
|
17
20
|
/**
|
|
18
|
-
* Define middleware for a command.
|
|
19
|
-
* `commandId` for cross-extension references where the typed ref isn't importable.
|
|
21
|
+
* Define middleware for a command.
|
|
20
22
|
*/
|
|
21
|
-
export declare const defineMiddleware: <TParams extends Struct = Struct, TResult = unknown>(definition: MiddlewareDefinition<TParams, TResult>) => MiddlewareDefinition<TParams, TResult>;
|
|
23
|
+
export declare const defineMiddleware: <TParams extends Struct = Struct, TResult = unknown>(definition: Omit<MiddlewareDefinition<TParams, TResult>, "ref">) => MiddlewareDefinition<TParams, TResult>;
|
|
22
24
|
/**
|
|
23
|
-
* Define a hook for an event.
|
|
24
|
-
* cross-extension references where the typed ref isn't importable.
|
|
25
|
+
* Define a hook for an event.
|
|
25
26
|
*/
|
|
26
|
-
export declare const defineHook: <TPayload extends Struct = Struct>(definition: HookDefinition<TPayload>) => HookDefinition<TPayload>;
|
|
27
|
+
export declare const defineHook: <TPayload extends Struct = Struct>(definition: Omit<HookDefinition<TPayload>, "ref">) => HookDefinition<TPayload>;
|
|
28
|
+
export {};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { ActivityItemContribution, ArtifactMountContribution, CommandPaletteResourceContribution, ContributionDefinition, ExtensionConnectionContribution, FileIconThemeContribution, HarnessProvider, KeybindingContribution, ModeContribution, NavigationItemContribution, PlacementContribution, ResourceHierarchyProvider, ResourceKindDefinition, ResourceKindRef, ResourceSlotRef, ResourceViewContribution, ScheduleContribution, SettingsPanelContribution, SettingsSectionContribution, SkillContribution, StatusBarItemContribution, StatusContribution, TemplateContribution, TemplateTypeContribution, ThemeContribution, ViewContribution, ViewMenuContribution, WorkspaceTypeProvider } from "pstdio-api-contracts/extension-kernel";
|
|
2
|
+
export declare const defineView: <Definition extends Omit<ViewContribution, "ref">>(definition: Definition) => Definition & ContributionDefinition<"view">;
|
|
3
|
+
export declare const defineViewMenu: <Definition extends Omit<ViewMenuContribution, "ref">>(definition: Definition) => Definition & ContributionDefinition<"view-menu">;
|
|
4
|
+
export declare const definePlacement: <Definition extends Omit<PlacementContribution, "ref">>(definition: Definition) => Definition & ContributionDefinition<"placement">;
|
|
5
|
+
export declare const defineResourceKind: <Definition extends Omit<ResourceKindDefinition, "ref">>(definition: Definition) => Definition & ContributionDefinition<"resource-kind">;
|
|
6
|
+
export declare const resourceSlotRef: (resourceKind: ResourceKindRef, id: string) => ResourceSlotRef;
|
|
7
|
+
export declare const resourceMenuSlotRef: (resourceKind: ResourceKindRef, id: string) => import("pstdio-api-contracts").SlotRef<object, "menu">;
|
|
8
|
+
export declare const defineResourceView: <Definition extends Omit<ResourceViewContribution, "ref">>(definition: Definition) => Definition & ContributionDefinition<"resource-view">;
|
|
9
|
+
export declare const defineNavigationItem: <Definition extends Omit<NavigationItemContribution, "ref">>(definition: Definition) => Definition & ContributionDefinition<"navigation-item">;
|
|
10
|
+
export declare const defineMode: <Definition extends Omit<ModeContribution, "ref">>(definition: Definition) => Definition & ContributionDefinition<"mode">;
|
|
11
|
+
export declare const defineStatusBarItem: <Definition extends Omit<StatusBarItemContribution, "ref">>(definition: Definition) => Definition & ContributionDefinition<"status-bar-item">;
|
|
12
|
+
export declare const defineStatuses: <Definition extends Omit<StatusContribution, "ref">>(definition: Definition) => Definition & ContributionDefinition<"status">;
|
|
13
|
+
export declare const defineSettingsPanel: <Definition extends Omit<SettingsPanelContribution, "ref">>(definition: Definition) => Definition & ContributionDefinition<"settings-panel">;
|
|
14
|
+
export declare const defineActivityItem: <Definition extends Omit<ActivityItemContribution, "ref">>(definition: Definition) => Definition & ContributionDefinition<"activity-item">;
|
|
15
|
+
export declare const defineSettingsSection: <Definition extends Omit<SettingsSectionContribution, "ref">>(definition: Definition) => Definition & ContributionDefinition<"settings-section">;
|
|
16
|
+
export declare const defineCommandPaletteResource: <Definition extends Omit<CommandPaletteResourceContribution, "ref">>(definition: Definition) => Definition & ContributionDefinition<"command-palette-resource">;
|
|
17
|
+
export declare const defineKeybinding: <Definition extends Omit<KeybindingContribution, "ref">>(definition: Definition) => Definition & ContributionDefinition<"keybinding">;
|
|
18
|
+
export declare const defineSchedule: <Definition extends Omit<ScheduleContribution, "ref">>(definition: Definition) => Definition & ContributionDefinition<"schedule">;
|
|
19
|
+
export declare const defineArtifactMount: <Definition extends Omit<ArtifactMountContribution, "ref">>(definition: Definition) => Definition & ContributionDefinition<"artifact-mount">;
|
|
20
|
+
export declare const defineTemplateType: <Definition extends Omit<TemplateTypeContribution, "ref">>(definition: Definition) => Definition & ContributionDefinition<"template-type">;
|
|
21
|
+
export declare const defineTemplate: <Definition extends Omit<TemplateContribution, "ref">>(definition: Definition) => Definition & ContributionDefinition<"template">;
|
|
22
|
+
export declare const defineSkill: <Definition extends Omit<SkillContribution, "ref">>(definition: Definition) => Definition & ContributionDefinition<"skill">;
|
|
23
|
+
export declare const defineTheme: <Definition extends Omit<ThemeContribution, "ref">>(definition: Definition) => Definition & ContributionDefinition<"theme">;
|
|
24
|
+
export declare const defineFileIconTheme: <Definition extends Omit<FileIconThemeContribution, "ref">>(definition: Definition) => Definition & ContributionDefinition<"file-icon-theme">;
|
|
25
|
+
export declare const defineWorkspaceType: <Definition extends Omit<WorkspaceTypeProvider, "ref">>(definition: Definition) => Definition & ContributionDefinition<"workspace-type">;
|
|
26
|
+
export declare const defineHarness: <Definition extends Omit<HarnessProvider, "ref">>(definition: Definition) => Definition & ContributionDefinition<"harness">;
|
|
27
|
+
export declare const defineConnection: <Definition extends Omit<ExtensionConnectionContribution, "ref">>(definition: Definition) => Definition & ContributionDefinition<"connection">;
|
|
28
|
+
export declare const defineResourceHierarchyProvider: (definition: Omit<ResourceHierarchyProvider, "ref">) => {
|
|
29
|
+
ref: {
|
|
30
|
+
kind: "resource-hierarchy-provider";
|
|
31
|
+
id: string;
|
|
32
|
+
};
|
|
33
|
+
id: string;
|
|
34
|
+
resourceKind: ResourceKindRef;
|
|
35
|
+
parent: (ctx: import("pstdio-api-contracts").ExtensionContextBase, resource: import("pstdio-api-contracts").ResourceRef) => import("pstdio-api-contracts").MaybePromise<import("pstdio-api-contracts").ResourceRef | import("pstdio-api-contracts").ViewHierarchyParent | null>;
|
|
36
|
+
};
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
type CommandSchemas = Record<string, ParamObjectSchema | undefined>;
|
|
3
|
-
type MiddlewareParams = Record<string, Struct>;
|
|
4
|
-
type MiddlewareResults = Record<string, unknown>;
|
|
5
|
-
type HookPayloads = Record<string, Struct>;
|
|
6
|
-
type EmptyMap = Record<string, never>;
|
|
7
|
-
type SettingProperties = Record<string, ExtensionSettingProperty>;
|
|
8
|
-
type EmptySettings = Record<string, never>;
|
|
1
|
+
import type { ExtensionDefinition, ExtensionSettingProperty } from "pstdio-api-contracts/extension-kernel";
|
|
9
2
|
type SettingValue<TProperty> = TProperty extends {
|
|
10
3
|
type: "boolean";
|
|
11
4
|
} ? boolean : TProperty extends {
|
|
@@ -18,37 +11,14 @@ type SettingValue<TProperty> = TProperty extends {
|
|
|
18
11
|
type: "object";
|
|
19
12
|
} ? Record<string, unknown> : unknown;
|
|
20
13
|
export type SettingsMap<TSettings> = TSettings extends {
|
|
21
|
-
properties: infer TProperties
|
|
14
|
+
properties: infer TProperties extends Record<string, ExtensionSettingProperty>;
|
|
22
15
|
} ? {
|
|
23
16
|
[K in keyof TProperties & string]: SettingValue<TProperties[K]>;
|
|
24
|
-
} :
|
|
25
|
-
type CommandDefinitions<TSchemas extends CommandSchemas, TSettings extends Record<string, unknown>> = {
|
|
26
|
-
[K in keyof TSchemas]: CommandDefinition<TSchemas[K], unknown, TSettings>;
|
|
27
|
-
};
|
|
28
|
-
type MiddlewareDefinitions<TParams extends MiddlewareParams, TResults extends MiddlewareResults> = {
|
|
29
|
-
[K in keyof TParams]: MiddlewareDefinition<TParams[K], K extends keyof TResults ? TResults[K] : unknown>;
|
|
30
|
-
};
|
|
31
|
-
type HookDefinitions<TPayloads extends HookPayloads> = {
|
|
32
|
-
[K in keyof TPayloads]: HookDefinition<TPayloads[K]>;
|
|
33
|
-
};
|
|
34
|
-
type ExtensionAuthoringDefinition<TCommandSchemas extends CommandSchemas, TMiddlewareParams extends MiddlewareParams, TMiddlewareResults extends MiddlewareResults, THookPayloads extends HookPayloads, TScheduleParams extends MiddlewareParams, TSettings extends ExtensionSettingsContribution<SettingProperties> | undefined> = Omit<ExtensionDefinition, "commands" | "middlewares" | "hooks" | "schedules" | "settings"> & {
|
|
35
|
-
settings?: TSettings;
|
|
36
|
-
commands?: CommandDefinitions<TCommandSchemas, SettingsMap<TSettings>>;
|
|
37
|
-
middlewares?: MiddlewareDefinitions<TMiddlewareParams, TMiddlewareResults>;
|
|
38
|
-
hooks?: HookDefinitions<THookPayloads>;
|
|
39
|
-
schedules?: {
|
|
40
|
-
[K in keyof TScheduleParams]: ScheduleContribution<TScheduleParams[K]>;
|
|
41
|
-
};
|
|
42
|
-
};
|
|
17
|
+
} : Record<string, never>;
|
|
43
18
|
/**
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
* @example
|
|
49
|
-
* export default defineExtension({
|
|
50
|
-
* commands: { ... },
|
|
51
|
-
* });
|
|
19
|
+
* Type an extension's contribution arrays. Package identity stays in package.json.
|
|
20
|
+
* Use the contribution helpers so every independently addressable item has a local
|
|
21
|
+
* id and typed ref before it reaches this boundary.
|
|
52
22
|
*/
|
|
53
|
-
export declare const defineExtension: <const
|
|
23
|
+
export declare const defineExtension: <const TDefinition extends ExtensionDefinition>(extension: TDefinition) => TDefinition;
|
|
54
24
|
export {};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
export type { CreateNotificationInput, ListNotificationsQuery, ListNotificationsResponse, Notification, NotificationAction, NotificationActionResult, NotificationActorType, NotificationKind, NotificationOrigin, NotificationPriority, NotificationStatus, UpdateNotificationInput, } from "pstdio-api-contracts";
|
|
2
2
|
export type * from "pstdio-api-contracts/extension-kernel";
|
|
3
3
|
export type { CommitPayload, ConflictPayload, MergePayload, RebasePayload, SessionLifecyclePayload, WorkspaceProvisionPayload, WorkspaceType, WorktreeRemovedPayload, } from "pstdio-api-contracts/extension-kernel";
|
|
4
|
-
export { ALWAYS_AVAILABLE_WEBVIEW_CAPABILITIES, dockedWorkbenchRegions, EXTENSION_API_VERSION,
|
|
4
|
+
export { ALWAYS_AVAILABLE_WEBVIEW_CAPABILITIES, defineSlot, dockedWorkbenchRegions, EXTENSION_API_VERSION, gitEvents, isLocalizedString, type Localizable, type LocalizedString, l10n, packageAsset, projectEvents, projectSlots, sessionEvents, sessionSlots, WEBVIEW_DECLARABLE_CAPABILITIES, WEBVIEW_HOST_CAPABILITIES, WEBVIEW_HOST_CAPABILITY_VERSION, workbenchCommands, workbenchModes, workbenchResourceKindDefinitions, workbenchResourceKinds, workbenchSlots, workspaceEvents, workspaceSlots, worktreeEvents, } from "pstdio-api-contracts/extension-kernel";
|
|
5
5
|
export { type CommandResponse, unwrapCommandOutcome } from "./command-outcome";
|
|
6
6
|
export { defineCommand, defineHook, defineMiddleware } from "./define-command";
|
|
7
|
+
export { defineActivityItem, defineArtifactMount, defineCommandPaletteResource, defineConnection, defineFileIconTheme, defineHarness, defineKeybinding, defineMode, defineNavigationItem, definePlacement, defineResourceHierarchyProvider, defineResourceKind, defineResourceView, defineSchedule, defineSettingsPanel, defineSettingsSection, defineSkill, defineStatusBarItem, defineStatuses, defineTemplate, defineTemplateType, defineTheme, defineView, defineViewMenu, defineWorkspaceType, resourceMenuSlotRef, resourceSlotRef, } from "./define-contribution";
|
|
7
8
|
export { defineExtension } from "./define-extension";
|
|
8
9
|
export { defineExtensionView, type ExtensionViewModule, type ExtensionViewRender, type ExtensionViewRenderContext, type GuestHost, type PropsStore, type WebviewFilesClient, } from "./define-extension-view";
|
|
9
10
|
export { params } from "./params";
|