@eworkbase/sdk 0.3.2 → 0.3.4
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/index.d.ts +2 -2
- package/dist/index.js +17 -1
- package/dist/{types-BIVvX6Nh.d.ts → types--jTA_mHn.d.ts} +47 -2
- package/dist/ui/index.d.ts +23 -2
- package/dist/ui/index.js +11 -1
- package/package.json +7 -7
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as PluginAgentContextCatalogEntry, A as PluginLifecycleOutcome, At as PluginToolsService, B as PluginRepositoryStatus, C as PluginExecutionStatus, Ct as PluginTaskDescriptor, D as PluginInvocationContext, Dt as PluginToastLevel, E as PluginHookResult, Et as PluginToastApi, F as PluginProcessOutputMode, Ft as roleToolsAppliedSchema, G as PluginStatusDefinition, H as PluginSharedChangeKind, I as PluginProcessResult, It as roleToolsProposalSchema, J as PluginViewDefinition, K as PluginToolContribution, L as PluginProcessRunOptions, M as PluginLifecycleStatus, Mt as RoleToolsApplied, N as PluginLogger, Nt as RoleToolsProposal, O as PluginLifecycleDispatchResult, Ot as PluginToastOptions, P as PluginProcessApi, Pt as roleToolEnvironmentSchema, Q as WorkbasePluginDefinition, R as PluginProject, S as PluginExecutionSnapshot, St as PluginSystemContextService, T as PluginHookId, Tt as PluginTaskService, U as PluginSharedChanges, V as PluginSetupHooks, W as PluginStatusContribution, X as PluginViewRequest, Y as PluginViewLayout, Z as PluginWorkspace, _ as PluginContext, _t as PluginPromptQuestion, a as PluginCapabilityReference, at as PluginColoredMessage, b as PluginDisposable, bt as PluginStatusCatalogEntry, c as PluginCommandContext, ct as PluginExecutionService, d as PluginCommandDetails, dt as PluginLogEntry, et as PluginAgentPolicy, f as PluginCommandEffect, ft as PluginLogQueryRequest, g as PluginCommandTransaction, gt as PluginPromptChoice, h as PluginCommandOption, ht as PluginPromptApi, i as PluginCapabilityKind, it as PluginCapabilityService, j as PluginLifecyclePolicy, jt as RoleToolEnvironment, k as PluginLifecycleHook, kt as PluginViewCatalogEntry, l as PluginCommandContribution, lt as PluginHostServices, m as PluginCommandExecutionResult, mt as PluginLogService, n as PluginAgentContextDefinition, nt as PluginCapabilityCommandRequest, o as PluginCommandArgument, ot as PluginCommandCatalogEntry, p as PluginCommandExecutionMode, pt as PluginLogQueryResult, q as PluginViewContribution, r as PluginAgentScope, rt as PluginCapabilityResolveRequest, s as PluginCommandCategory, st as PluginConfigApi, t as PluginAgentContextContribution, tt as PluginCapabilityCatalog, u as PluginCommandDefinition, ut as PluginInteractiveLogger, v as PluginContextExposure, vt as PluginPromptType, w as PluginFileChange, wt as PluginTaskResult, x as PluginExecutionEvidence, xt as PluginStoreApi, y as PluginContributionSnapshot, yt as PluginPromptViewRequest, z as PluginRepository } from "./types--jTA_mHn.js";
|
|
2
2
|
export * from "zod";
|
|
3
3
|
//#region src/definition.d.ts
|
|
4
4
|
export declare const PLUGIN_API_VERSION = 2;
|
|
@@ -6,4 +6,4 @@ type DefinedWorkbasePlugin = Readonly<WorkbasePluginDefinition>;
|
|
|
6
6
|
export declare function definePlugin(definition: WorkbasePluginDefinition): DefinedWorkbasePlugin;
|
|
7
7
|
export declare function isDefinedPlugin(value: unknown): value is DefinedWorkbasePlugin;
|
|
8
8
|
//#endregion
|
|
9
|
-
export { type DefinedWorkbasePlugin, type PluginAgentContextCatalogEntry, type PluginAgentContextContribution, type PluginAgentContextDefinition, type PluginAgentPolicy, type PluginCapabilityCatalog, type PluginCapabilityCommandRequest, type PluginCapabilityResolveRequest, type PluginCapabilityService, type PluginColoredMessage, type PluginCommandArgument, type PluginCommandCatalogEntry, PluginCommandCategory, type PluginCommandContext, type PluginCommandContribution, type PluginCommandDefinition, type PluginCommandDetails, PluginCommandEffect, PluginCommandExecutionMode, type PluginCommandExecutionResult, type PluginCommandOption, PluginCommandTransaction, type PluginConfigApi, type PluginContext, PluginContextExposure, type PluginContributionSnapshot, type PluginDisposable, type PluginExecutionService, type PluginExecutionSnapshot, PluginExecutionStatus, type PluginFileChange, PluginHookId, type PluginHookResult, type PluginHostServices, type PluginInteractiveLogger, type PluginInvocationContext, type PluginLifecycleDispatchResult, type PluginLifecycleHook, type PluginLifecycleOutcome, PluginLifecyclePolicy, PluginLifecycleStatus, type PluginLogEntry, type PluginLogQueryRequest, type PluginLogQueryResult, type PluginLogService, type PluginLogger, type PluginProcessApi, type PluginProcessResult, type PluginProcessRunOptions, type PluginProject, type PluginPromptApi, type PluginPromptChoice, type PluginPromptQuestion, type PluginPromptType, type PluginPromptViewRequest, type PluginRepository, PluginRepositoryStatus, type PluginSetupHooks, PluginSharedChangeKind, type PluginSharedChanges, type PluginStatusCatalogEntry, type PluginStatusContribution, type PluginStatusDefinition, type PluginStoreApi, type PluginSystemContextService, type PluginTaskDescriptor, type PluginTaskResult, type PluginTaskService, type PluginToastApi, type PluginToastLevel, type PluginToastOptions, type PluginToolContribution, PluginToolsService, type PluginViewCatalogEntry, type PluginViewContribution, type PluginViewDefinition, PluginViewLayout, type PluginViewRequest, type PluginWorkspace, RoleToolEnvironment, RoleToolsApplied, RoleToolsProposal, type WorkbasePluginDefinition, roleToolEnvironmentSchema, roleToolsAppliedSchema, roleToolsProposalSchema };
|
|
9
|
+
export { type DefinedWorkbasePlugin, type PluginAgentContextCatalogEntry, type PluginAgentContextContribution, type PluginAgentContextDefinition, type PluginAgentPolicy, PluginAgentScope, type PluginCapabilityCatalog, type PluginCapabilityCommandRequest, PluginCapabilityKind, type PluginCapabilityReference, type PluginCapabilityResolveRequest, type PluginCapabilityService, type PluginColoredMessage, type PluginCommandArgument, type PluginCommandCatalogEntry, PluginCommandCategory, type PluginCommandContext, type PluginCommandContribution, type PluginCommandDefinition, type PluginCommandDetails, PluginCommandEffect, PluginCommandExecutionMode, type PluginCommandExecutionResult, type PluginCommandOption, PluginCommandTransaction, type PluginConfigApi, type PluginContext, PluginContextExposure, type PluginContributionSnapshot, type PluginDisposable, type PluginExecutionEvidence, type PluginExecutionService, type PluginExecutionSnapshot, PluginExecutionStatus, type PluginFileChange, PluginHookId, type PluginHookResult, type PluginHostServices, type PluginInteractiveLogger, type PluginInvocationContext, type PluginLifecycleDispatchResult, type PluginLifecycleHook, type PluginLifecycleOutcome, PluginLifecyclePolicy, PluginLifecycleStatus, type PluginLogEntry, type PluginLogQueryRequest, type PluginLogQueryResult, type PluginLogService, type PluginLogger, type PluginProcessApi, PluginProcessOutputMode, type PluginProcessResult, type PluginProcessRunOptions, type PluginProject, type PluginPromptApi, type PluginPromptChoice, type PluginPromptQuestion, type PluginPromptType, type PluginPromptViewRequest, type PluginRepository, PluginRepositoryStatus, type PluginSetupHooks, PluginSharedChangeKind, type PluginSharedChanges, type PluginStatusCatalogEntry, type PluginStatusContribution, type PluginStatusDefinition, type PluginStoreApi, type PluginSystemContextService, type PluginTaskDescriptor, type PluginTaskResult, type PluginTaskService, type PluginToastApi, type PluginToastLevel, type PluginToastOptions, type PluginToolContribution, PluginToolsService, type PluginViewCatalogEntry, type PluginViewContribution, type PluginViewDefinition, PluginViewLayout, type PluginViewRequest, type PluginWorkspace, RoleToolEnvironment, RoleToolsApplied, RoleToolsProposal, type WorkbasePluginDefinition, roleToolEnvironmentSchema, roleToolsAppliedSchema, roleToolsProposalSchema };
|
package/dist/index.js
CHANGED
|
@@ -53,6 +53,17 @@ let PluginExecutionStatus = /* @__PURE__ */ function(PluginExecutionStatus) {
|
|
|
53
53
|
PluginExecutionStatus["Interrupted"] = "interrupted";
|
|
54
54
|
return PluginExecutionStatus;
|
|
55
55
|
}({});
|
|
56
|
+
let PluginCapabilityKind = /* @__PURE__ */ function(PluginCapabilityKind) {
|
|
57
|
+
PluginCapabilityKind["Command"] = "command";
|
|
58
|
+
PluginCapabilityKind["Status"] = "status";
|
|
59
|
+
PluginCapabilityKind["Context"] = "context";
|
|
60
|
+
return PluginCapabilityKind;
|
|
61
|
+
}({});
|
|
62
|
+
let PluginAgentScope = /* @__PURE__ */ function(PluginAgentScope) {
|
|
63
|
+
PluginAgentScope["Workspace"] = "workspace";
|
|
64
|
+
PluginAgentScope["Execution"] = "execution";
|
|
65
|
+
return PluginAgentScope;
|
|
66
|
+
}({});
|
|
56
67
|
let PluginCommandEffect = /* @__PURE__ */ function(PluginCommandEffect) {
|
|
57
68
|
PluginCommandEffect["Immediate"] = "immediate";
|
|
58
69
|
PluginCommandEffect["LongRunning"] = "longRunning";
|
|
@@ -96,6 +107,11 @@ let PluginViewLayout = /* @__PURE__ */ function(PluginViewLayout) {
|
|
|
96
107
|
PluginViewLayout["Fill"] = "fill";
|
|
97
108
|
return PluginViewLayout;
|
|
98
109
|
}({});
|
|
110
|
+
let PluginProcessOutputMode = /* @__PURE__ */ function(PluginProcessOutputMode) {
|
|
111
|
+
PluginProcessOutputMode["Log"] = "log";
|
|
112
|
+
PluginProcessOutputMode["Content"] = "content";
|
|
113
|
+
return PluginProcessOutputMode;
|
|
114
|
+
}({});
|
|
99
115
|
let PluginSharedChangeKind = /* @__PURE__ */ function(PluginSharedChangeKind) {
|
|
100
116
|
PluginSharedChangeKind["None"] = "none";
|
|
101
117
|
PluginSharedChangeKind["Files"] = "files";
|
|
@@ -189,4 +205,4 @@ const roleToolsAppliedSchema = z.object({
|
|
|
189
205
|
requiresPreparation: z.boolean()
|
|
190
206
|
});
|
|
191
207
|
//#endregion
|
|
192
|
-
export { PLUGIN_API_VERSION, PluginCommandCategory, PluginCommandEffect, PluginCommandExecutionMode, PluginCommandTransaction, PluginContextExposure, PluginExecutionStatus, PluginHookId, PluginLifecyclePolicy, PluginLifecycleStatus, PluginRepositoryStatus, PluginSharedChangeKind, PluginViewLayout, definePlugin, isDefinedPlugin, roleToolEnvironmentSchema, roleToolsAppliedSchema, roleToolsProposalSchema };
|
|
208
|
+
export { PLUGIN_API_VERSION, PluginAgentScope, PluginCapabilityKind, PluginCommandCategory, PluginCommandEffect, PluginCommandExecutionMode, PluginCommandTransaction, PluginContextExposure, PluginExecutionStatus, PluginHookId, PluginLifecyclePolicy, PluginLifecycleStatus, PluginProcessOutputMode, PluginRepositoryStatus, PluginSharedChangeKind, PluginViewLayout, definePlugin, isDefinedPlugin, roleToolEnvironmentSchema, roleToolsAppliedSchema, roleToolsProposalSchema };
|
|
@@ -188,6 +188,7 @@ interface PluginCommandCatalogEntry {
|
|
|
188
188
|
readonly transaction: PluginCommandTransaction;
|
|
189
189
|
}
|
|
190
190
|
interface PluginAgentPolicy {
|
|
191
|
+
readonly scope?: PluginAgentScope;
|
|
191
192
|
readonly callable: boolean;
|
|
192
193
|
readonly destructive?: boolean;
|
|
193
194
|
readonly idempotent?: boolean;
|
|
@@ -292,10 +293,16 @@ interface PluginExecutionService {
|
|
|
292
293
|
readonly grant: (options: {
|
|
293
294
|
readonly readOnly: boolean;
|
|
294
295
|
readonly tasks: readonly string[];
|
|
296
|
+
readonly capabilities: readonly PluginCapabilityReference[];
|
|
295
297
|
}) => Promise<string>;
|
|
298
|
+
/** Verified parent, available only inside a host-delegated command. */
|
|
299
|
+
readonly identity: () => Promise<{
|
|
300
|
+
readonly executionId: string;
|
|
301
|
+
readonly pluginId: string;
|
|
302
|
+
} | null>;
|
|
296
303
|
readonly revoke: (token: string) => Promise<void>;
|
|
297
304
|
readonly delegate: (token: string, request: {
|
|
298
|
-
readonly method: "tasks.list" | "tasks.run" | "commands.execute" | "commands.start" | "commands.query";
|
|
305
|
+
readonly method: "capabilities.list" | "statuses.resolve" | "contexts.resolve" | "tasks.list" | "tasks.run" | "commands.execute" | "commands.start" | "commands.query";
|
|
299
306
|
readonly input: unknown;
|
|
300
307
|
}) => Promise<unknown>;
|
|
301
308
|
}
|
|
@@ -334,7 +341,35 @@ declare enum PluginExecutionStatus {
|
|
|
334
341
|
Cancelled = "cancelled",
|
|
335
342
|
Interrupted = "interrupted"
|
|
336
343
|
}
|
|
344
|
+
declare enum PluginCapabilityKind {
|
|
345
|
+
Command = "command",
|
|
346
|
+
Status = "status",
|
|
347
|
+
Context = "context"
|
|
348
|
+
}
|
|
349
|
+
declare enum PluginAgentScope {
|
|
350
|
+
Workspace = "workspace",
|
|
351
|
+
Execution = "execution"
|
|
352
|
+
}
|
|
353
|
+
interface PluginCapabilityReference {
|
|
354
|
+
readonly pluginId: string;
|
|
355
|
+
readonly kind: PluginCapabilityKind;
|
|
356
|
+
readonly id: string;
|
|
357
|
+
}
|
|
358
|
+
/** Host-owned receipts; plugin progress and Agent output cannot replace these. */
|
|
359
|
+
interface PluginExecutionEvidence {
|
|
360
|
+
readonly callId: string;
|
|
361
|
+
readonly kind: PluginCapabilityKind | "task";
|
|
362
|
+
readonly pluginId: string;
|
|
363
|
+
readonly id: string;
|
|
364
|
+
readonly status: "running" | "succeeded" | "failed";
|
|
365
|
+
readonly time: string;
|
|
366
|
+
readonly childExecutionId?: string | null;
|
|
367
|
+
readonly logId?: string | null;
|
|
368
|
+
readonly error?: string | null;
|
|
369
|
+
}
|
|
337
370
|
interface PluginExecutionSnapshot {
|
|
371
|
+
readonly evidence?: readonly PluginExecutionEvidence[];
|
|
372
|
+
readonly evidenceIncomplete?: boolean;
|
|
338
373
|
readonly afterExecutionId?: string | null;
|
|
339
374
|
readonly revision: number;
|
|
340
375
|
readonly tasks: readonly {
|
|
@@ -420,7 +455,13 @@ interface PluginLogger {
|
|
|
420
455
|
readonly info: (...values: readonly unknown[]) => void;
|
|
421
456
|
readonly warn: (...values: readonly unknown[]) => void;
|
|
422
457
|
}
|
|
458
|
+
declare enum PluginProcessOutputMode {
|
|
459
|
+
Log = "log",
|
|
460
|
+
Content = "content"
|
|
461
|
+
}
|
|
423
462
|
interface PluginProcessRunOptions {
|
|
463
|
+
/** Content preserves final characters and fails on bounded output overflow. */
|
|
464
|
+
readonly outputMode?: PluginProcessOutputMode;
|
|
424
465
|
readonly program: string;
|
|
425
466
|
readonly arguments?: readonly string[];
|
|
426
467
|
readonly currentDirectory?: string;
|
|
@@ -434,6 +475,9 @@ interface PluginProcessResult {
|
|
|
434
475
|
readonly failed: boolean;
|
|
435
476
|
readonly standardError: string;
|
|
436
477
|
readonly standardOutput: string;
|
|
478
|
+
/** Absent on older runtimes; content consumers must check support explicitly. */
|
|
479
|
+
readonly standardOutputTruncated?: boolean;
|
|
480
|
+
readonly standardErrorTruncated?: boolean;
|
|
437
481
|
readonly timedOut: boolean;
|
|
438
482
|
readonly wasCancelled: boolean;
|
|
439
483
|
}
|
|
@@ -478,6 +522,7 @@ interface PluginCommandDetails {
|
|
|
478
522
|
readonly warnings?: readonly string[];
|
|
479
523
|
}
|
|
480
524
|
interface PluginCommandExecutionResult<Value = unknown> {
|
|
525
|
+
readonly success?: boolean | null;
|
|
481
526
|
readonly value: Value;
|
|
482
527
|
readonly executionId: string;
|
|
483
528
|
readonly parentExecutionId: string | null;
|
|
@@ -649,4 +694,4 @@ interface PluginContributionSnapshot {
|
|
|
649
694
|
readonly views: readonly PluginViewContribution[];
|
|
650
695
|
}
|
|
651
696
|
//#endregion
|
|
652
|
-
export {
|
|
697
|
+
export { PluginAgentContextCatalogEntry as $, PluginLifecycleOutcome as A, PluginToolsService as At, PluginRepositoryStatus as B, PluginExecutionStatus as C, PluginTaskDescriptor as Ct, PluginInvocationContext as D, PluginToastLevel as Dt, PluginHookResult as E, PluginToastApi as Et, PluginProcessOutputMode as F, roleToolsAppliedSchema as Ft, PluginStatusDefinition as G, PluginSharedChangeKind as H, PluginProcessResult as I, roleToolsProposalSchema as It, PluginViewDefinition as J, PluginToolContribution as K, PluginProcessRunOptions as L, PluginLifecycleStatus as M, RoleToolsApplied as Mt, PluginLogger as N, RoleToolsProposal as Nt, PluginLifecycleDispatchResult as O, PluginToastOptions as Ot, PluginProcessApi as P, roleToolEnvironmentSchema as Pt, WorkbasePluginDefinition as Q, PluginProject as R, PluginExecutionSnapshot as S, PluginSystemContextService as St, PluginHookId as T, PluginTaskService as Tt, PluginSharedChanges as U, PluginSetupHooks as V, PluginStatusContribution as W, PluginViewRequest as X, PluginViewLayout as Y, PluginWorkspace as Z, PluginContext as _, PluginPromptQuestion as _t, PluginCapabilityReference as a, PluginColoredMessage as at, PluginDisposable as b, PluginStatusCatalogEntry as bt, PluginCommandContext as c, PluginExecutionService as ct, PluginCommandDetails as d, PluginLogEntry as dt, PluginAgentPolicy as et, PluginCommandEffect as f, PluginLogQueryRequest as ft, PluginCommandTransaction as g, PluginPromptChoice as gt, PluginCommandOption as h, PluginPromptApi as ht, PluginCapabilityKind as i, PluginCapabilityService as it, PluginLifecyclePolicy as j, RoleToolEnvironment as jt, PluginLifecycleHook as k, PluginViewCatalogEntry as kt, PluginCommandContribution as l, PluginHostServices as lt, PluginCommandExecutionResult as m, PluginLogService as mt, PluginAgentContextDefinition as n, PluginCapabilityCommandRequest as nt, PluginCommandArgument as o, PluginCommandCatalogEntry as ot, PluginCommandExecutionMode as p, PluginLogQueryResult as pt, PluginViewContribution as q, PluginAgentScope as r, PluginCapabilityResolveRequest as rt, PluginCommandCategory as s, PluginConfigApi as st, PluginAgentContextContribution as t, PluginCapabilityCatalog as tt, PluginCommandDefinition as u, PluginInteractiveLogger as ut, PluginContextExposure as v, PluginPromptType as vt, PluginFileChange as w, PluginTaskResult as wt, PluginExecutionEvidence as x, PluginStoreApi as xt, PluginContributionSnapshot as y, PluginPromptViewRequest as yt, PluginRepository as z };
|
package/dist/ui/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { S as PluginExecutionSnapshot, m as PluginCommandExecutionResult } from "../types--jTA_mHn.js";
|
|
2
2
|
//#region src/ui/types.d.ts
|
|
3
3
|
/**
|
|
4
4
|
* Browser authoring API and transport contracts for Workbase plugin views.
|
|
@@ -90,6 +90,23 @@ interface PluginUiStatus {
|
|
|
90
90
|
interface PluginUiView {
|
|
91
91
|
readonly call: <Result = unknown>(method: string, input: unknown) => Promise<Result>;
|
|
92
92
|
}
|
|
93
|
+
export declare enum PluginDesktopTarget {
|
|
94
|
+
Editor = "editor",
|
|
95
|
+
Terminal = "terminal",
|
|
96
|
+
Folder = "folder",
|
|
97
|
+
Chatgpt = "chatgpt"
|
|
98
|
+
}
|
|
99
|
+
interface PluginUiDesktopOpenOptions {
|
|
100
|
+
readonly target: PluginDesktopTarget;
|
|
101
|
+
/** Omit to use the current workspace root. */
|
|
102
|
+
readonly repositoryId?: string;
|
|
103
|
+
/** Existing path relative to the selected repository/workspace; defaults to its root. */
|
|
104
|
+
readonly path?: string;
|
|
105
|
+
}
|
|
106
|
+
interface PluginUiDesktopOpenResult {
|
|
107
|
+
readonly path: string;
|
|
108
|
+
readonly targetId: string;
|
|
109
|
+
}
|
|
93
110
|
interface WorkbasePluginUi {
|
|
94
111
|
/** Hides a resumable interaction without answering or cancelling it. */
|
|
95
112
|
readonly dismiss: () => Promise<void>;
|
|
@@ -97,6 +114,10 @@ interface WorkbasePluginUi {
|
|
|
97
114
|
readonly respond: (value: unknown | null) => Promise<void>;
|
|
98
115
|
readonly closeOutput: <Result = unknown>(id: string) => Promise<Result>;
|
|
99
116
|
readonly commands: PluginUiCommands;
|
|
117
|
+
/** Available in ordinary plugin pages/tabs, including their detached windows. */
|
|
118
|
+
readonly desktop: {
|
|
119
|
+
readonly open: (options: PluginUiDesktopOpenOptions) => Promise<PluginUiDesktopOpenResult>;
|
|
120
|
+
};
|
|
100
121
|
readonly navigate: <Result = unknown>(to: string, options?: PluginUiNavigateOptions) => Promise<Result>;
|
|
101
122
|
readonly openOutput: <Result = unknown>(options: PluginUiOutputOptions) => Promise<Result>;
|
|
102
123
|
readonly selectFiles: (options?: PluginUiFileSelectOptions) => Promise<string | readonly string[] | null>;
|
|
@@ -133,4 +154,4 @@ export declare function createPluginUiController(definition: WorkbasePluginUiDef
|
|
|
133
154
|
//#region src/ui/index.d.ts
|
|
134
155
|
export declare function defineWorkbasePluginUi(definition: WorkbasePluginUiDefinition): WorkbasePluginUi;
|
|
135
156
|
//#endregion
|
|
136
|
-
export type { PluginUiClientMethods, PluginUiCommandExecuteOptions, PluginUiCommands, PluginUiContextIdentity, PluginUiControllerOptions, PluginUiExecutionChange, PluginUiFileFilter, PluginUiFileSelectOptions, PluginUiFileSelectionItemType, PluginUiFileSelectionScope, PluginUiHostError, PluginUiHostMethods, PluginUiInitializationPayload, PluginUiNavigateOptions, PluginUiOutputOptions, PluginUiPromptChoice, PluginUiPromptOptions, PluginUiPromptType, PluginUiStatus, PluginUiToastOptions, PluginUiTransportConnection, PluginUiView, PluginUiViewIdentity, WorkbasePluginUi, WorkbasePluginUiDefinition };
|
|
157
|
+
export type { PluginUiClientMethods, PluginUiCommandExecuteOptions, PluginUiCommands, PluginUiContextIdentity, PluginUiControllerOptions, PluginUiDesktopOpenOptions, PluginUiDesktopOpenResult, PluginUiExecutionChange, PluginUiFileFilter, PluginUiFileSelectOptions, PluginUiFileSelectionItemType, PluginUiFileSelectionScope, PluginUiHostError, PluginUiHostMethods, PluginUiInitializationPayload, PluginUiNavigateOptions, PluginUiOutputOptions, PluginUiPromptChoice, PluginUiPromptOptions, PluginUiPromptType, PluginUiStatus, PluginUiToastOptions, PluginUiTransportConnection, PluginUiView, PluginUiViewIdentity, WorkbasePluginUi, WorkbasePluginUiDefinition };
|
package/dist/ui/index.js
CHANGED
|
@@ -106,6 +106,7 @@ function createPluginUiApi(request, { targetWindow, subscribe }) {
|
|
|
106
106
|
respond: (value) => request("interaction.respond", { value }),
|
|
107
107
|
closeOutput: (id) => request("output.close", { id }),
|
|
108
108
|
commands,
|
|
109
|
+
desktop: Object.freeze({ open: (options) => request("desktop.open", options) }),
|
|
109
110
|
navigate: (to, { replace = false } = {}) => request("navigate", {
|
|
110
111
|
replace,
|
|
111
112
|
to
|
|
@@ -210,6 +211,15 @@ function getFatalMessage(error) {
|
|
|
210
211
|
return "Plugin UI failed.";
|
|
211
212
|
}
|
|
212
213
|
//#endregion
|
|
214
|
+
//#region src/ui/types.ts
|
|
215
|
+
let PluginDesktopTarget = /* @__PURE__ */ function(PluginDesktopTarget) {
|
|
216
|
+
PluginDesktopTarget["Editor"] = "editor";
|
|
217
|
+
PluginDesktopTarget["Terminal"] = "terminal";
|
|
218
|
+
PluginDesktopTarget["Folder"] = "folder";
|
|
219
|
+
PluginDesktopTarget["Chatgpt"] = "chatgpt";
|
|
220
|
+
return PluginDesktopTarget;
|
|
221
|
+
}({});
|
|
222
|
+
//#endregion
|
|
213
223
|
//#region src/ui/index.ts
|
|
214
224
|
/**
|
|
215
225
|
* Penpal browser entry for trusted Workbase plugin views.
|
|
@@ -242,4 +252,4 @@ function resolveParentOrigins(targetWindow) {
|
|
|
242
252
|
return hostOrigin && hostOrigin !== "null" ? [hostOrigin] : ["*"];
|
|
243
253
|
}
|
|
244
254
|
//#endregion
|
|
245
|
-
export { createPluginUiController, defineWorkbasePluginUi };
|
|
255
|
+
export { PluginDesktopTarget, createPluginUiController, defineWorkbasePluginUi };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eworkbase/sdk",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -25,6 +25,11 @@
|
|
|
25
25
|
},
|
|
26
26
|
"./ui/theme.css": "./dist/ui/theme.css"
|
|
27
27
|
},
|
|
28
|
+
"scripts": {
|
|
29
|
+
"build": "tsdown",
|
|
30
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
31
|
+
"pack:local": "pnpm build && pnpm pack"
|
|
32
|
+
},
|
|
28
33
|
"engines": {
|
|
29
34
|
"node": ">=22"
|
|
30
35
|
},
|
|
@@ -42,10 +47,5 @@
|
|
|
42
47
|
"@types/node": "^24.0.3",
|
|
43
48
|
"tsdown": "0.23.0",
|
|
44
49
|
"typescript": "^5.8.3"
|
|
45
|
-
},
|
|
46
|
-
"scripts": {
|
|
47
|
-
"build": "tsdown",
|
|
48
|
-
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
49
|
-
"pack:local": "pnpm build && pnpm pack"
|
|
50
50
|
}
|
|
51
|
-
}
|
|
51
|
+
}
|