@eworkbase/sdk 0.3.3 → 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 +6 -1
- package/dist/{types-Cmfedh3f.d.ts → types--jTA_mHn.d.ts} +10 -1
- package/dist/ui/index.d.ts +23 -2
- package/dist/ui/index.js +11 -1
- package/package.json +1 -1
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, 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, 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
|
@@ -107,6 +107,11 @@ let PluginViewLayout = /* @__PURE__ */ function(PluginViewLayout) {
|
|
|
107
107
|
PluginViewLayout["Fill"] = "fill";
|
|
108
108
|
return PluginViewLayout;
|
|
109
109
|
}({});
|
|
110
|
+
let PluginProcessOutputMode = /* @__PURE__ */ function(PluginProcessOutputMode) {
|
|
111
|
+
PluginProcessOutputMode["Log"] = "log";
|
|
112
|
+
PluginProcessOutputMode["Content"] = "content";
|
|
113
|
+
return PluginProcessOutputMode;
|
|
114
|
+
}({});
|
|
110
115
|
let PluginSharedChangeKind = /* @__PURE__ */ function(PluginSharedChangeKind) {
|
|
111
116
|
PluginSharedChangeKind["None"] = "none";
|
|
112
117
|
PluginSharedChangeKind["Files"] = "files";
|
|
@@ -200,4 +205,4 @@ const roleToolsAppliedSchema = z.object({
|
|
|
200
205
|
requiresPreparation: z.boolean()
|
|
201
206
|
});
|
|
202
207
|
//#endregion
|
|
203
|
-
export { PLUGIN_API_VERSION, PluginAgentScope, PluginCapabilityKind, 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 };
|
|
@@ -455,7 +455,13 @@ interface PluginLogger {
|
|
|
455
455
|
readonly info: (...values: readonly unknown[]) => void;
|
|
456
456
|
readonly warn: (...values: readonly unknown[]) => void;
|
|
457
457
|
}
|
|
458
|
+
declare enum PluginProcessOutputMode {
|
|
459
|
+
Log = "log",
|
|
460
|
+
Content = "content"
|
|
461
|
+
}
|
|
458
462
|
interface PluginProcessRunOptions {
|
|
463
|
+
/** Content preserves final characters and fails on bounded output overflow. */
|
|
464
|
+
readonly outputMode?: PluginProcessOutputMode;
|
|
459
465
|
readonly program: string;
|
|
460
466
|
readonly arguments?: readonly string[];
|
|
461
467
|
readonly currentDirectory?: string;
|
|
@@ -469,6 +475,9 @@ interface PluginProcessResult {
|
|
|
469
475
|
readonly failed: boolean;
|
|
470
476
|
readonly standardError: string;
|
|
471
477
|
readonly standardOutput: string;
|
|
478
|
+
/** Absent on older runtimes; content consumers must check support explicitly. */
|
|
479
|
+
readonly standardOutputTruncated?: boolean;
|
|
480
|
+
readonly standardErrorTruncated?: boolean;
|
|
472
481
|
readonly timedOut: boolean;
|
|
473
482
|
readonly wasCancelled: boolean;
|
|
474
483
|
}
|
|
@@ -685,4 +694,4 @@ interface PluginContributionSnapshot {
|
|
|
685
694
|
readonly views: readonly PluginViewContribution[];
|
|
686
695
|
}
|
|
687
696
|
//#endregion
|
|
688
|
-
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 { S as PluginExecutionSnapshot, m as PluginCommandExecutionResult } from "../types
|
|
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 };
|