@eworkbase/sdk 0.1.1 → 0.3.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.
@@ -0,0 +1,634 @@
1
+ import { ZodType, z } from "zod";
2
+ //#region src/Tools.dto.d.ts
3
+ declare const roleToolEnvironmentSchema: z.ZodObject<{
4
+ roleId: z.ZodString;
5
+ roleLabel: z.ZodString;
6
+ revision: z.ZodString;
7
+ assignedToolIds: z.ZodArray<z.ZodString>;
8
+ tools: z.ZodArray<z.ZodObject<{
9
+ id: z.ZodString;
10
+ label: z.ZodString;
11
+ kind: z.ZodEnum<{
12
+ runtime: "runtime";
13
+ cli: "cli";
14
+ desktop: "desktop";
15
+ }>;
16
+ version: z.ZodNullable<z.ZodString>;
17
+ assigned: z.ZodBoolean;
18
+ shared: z.ZodBoolean;
19
+ assignable: z.ZodBoolean;
20
+ }, z.core.$strip>>;
21
+ runtimes: z.ZodObject<{
22
+ projectRoot: z.ZodString;
23
+ miseVersion: z.ZodNullable<z.ZodString>;
24
+ status: z.ZodEnum<{
25
+ missing: "missing";
26
+ outdated: "outdated";
27
+ "not-prepared": "not-prepared";
28
+ ready: "ready";
29
+ failed: "failed";
30
+ }>;
31
+ detail: z.ZodString;
32
+ runtimes: z.ZodArray<z.ZodObject<{
33
+ id: z.ZodString;
34
+ label: z.ZodString;
35
+ runtimeId: z.ZodString;
36
+ version: z.ZodString;
37
+ installed: z.ZodBoolean;
38
+ terminalApplied: z.ZodBoolean;
39
+ }, z.core.$strip>>;
40
+ }, z.core.$strip>;
41
+ nativeTools: z.ZodArray<z.ZodObject<{
42
+ id: z.ZodString;
43
+ label: z.ZodString;
44
+ kind: z.ZodEnum<{
45
+ runtime: "runtime";
46
+ cli: "cli";
47
+ desktop: "desktop";
48
+ }>;
49
+ currentVersion: z.ZodNullable<z.ZodString>;
50
+ status: z.ZodEnum<{
51
+ unknown: "unknown";
52
+ missing: "missing";
53
+ ready: "ready";
54
+ failed: "failed";
55
+ running: "running";
56
+ prepared: "prepared";
57
+ "unsupported-platform": "unsupported-platform";
58
+ "manual-action-required": "manual-action-required";
59
+ cancelled: "cancelled";
60
+ interrupted: "interrupted";
61
+ }>;
62
+ detail: z.ZodString;
63
+ manualActionMessage: z.ZodNullable<z.ZodString>;
64
+ }, z.core.$strip>>;
65
+ }, z.core.$strip>;
66
+ declare const roleToolsProposalSchema: z.ZodObject<{
67
+ id: z.ZodString;
68
+ roleId: z.ZodString;
69
+ roleLabel: z.ZodString;
70
+ revision: z.ZodString;
71
+ toolIds: z.ZodArray<z.ZodString>;
72
+ before: z.ZodArray<z.ZodString>;
73
+ after: z.ZodArray<z.ZodString>;
74
+ labels: z.ZodArray<z.ZodString>;
75
+ reason: z.ZodString;
76
+ }, z.core.$strip>;
77
+ declare const roleToolsAppliedSchema: z.ZodObject<{
78
+ roleId: z.ZodString;
79
+ toolIds: z.ZodArray<z.ZodString>;
80
+ applied: z.ZodLiteral<true>;
81
+ requiresPreparation: z.ZodBoolean;
82
+ }, z.core.$strip>;
83
+ type RoleToolEnvironment = z.infer<typeof roleToolEnvironmentSchema>;
84
+ type RoleToolsProposal = z.infer<typeof roleToolsProposalSchema>;
85
+ type RoleToolsApplied = z.infer<typeof roleToolsAppliedSchema> | {
86
+ readonly applied: false;
87
+ };
88
+ interface PluginToolsService {
89
+ /** Detects the active role and platform tools without installing anything. */
90
+ readonly inspectEnvironment: () => Promise<RoleToolEnvironment>;
91
+ /** Plans additions to project-declared tools; does not apply shared configuration. */
92
+ readonly proposeRoleTools: (request: {
93
+ readonly toolIds: readonly string[];
94
+ readonly reason: string;
95
+ }) => Promise<RoleToolsProposal>;
96
+ readonly roleToolsProposal: () => Promise<RoleToolsProposal | null>;
97
+ /** Collects explicit confirmation before applying this exact proposal in a foreground project.yaml transaction. */
98
+ readonly applyRoleTools: (proposalId: string) => Promise<RoleToolsApplied>;
99
+ }
100
+ //#endregion
101
+ //#region src/host-services.d.ts
102
+ interface PluginColoredMessage {
103
+ readonly color?: string;
104
+ readonly text: string;
105
+ }
106
+ interface PluginLogEntry {
107
+ readonly level: "log" | "success" | "warn" | "error" | "debug" | "custom";
108
+ readonly message: string;
109
+ readonly segments?: readonly PluginColoredMessage[];
110
+ readonly timestamp: number;
111
+ }
112
+ interface PluginInteractiveLogger extends PluginLogger {
113
+ readonly custom: (segments: readonly PluginColoredMessage[]) => void;
114
+ readonly getEntries: () => readonly PluginLogEntry[];
115
+ readonly log: (message: string) => void;
116
+ readonly success: (message: string) => void;
117
+ }
118
+ interface PluginPromptChoice<Value = unknown> {
119
+ readonly description?: string;
120
+ readonly key?: string;
121
+ readonly name: string;
122
+ readonly short?: string;
123
+ readonly value: Value;
124
+ }
125
+ type PluginPromptType = "input" | "confirm" | "list" | "rawlist" | "search-list" | "search-checkbox" | "fuzzy-path";
126
+ interface PluginPromptQuestion<Key = string, Value = unknown, Choice = unknown> {
127
+ /** Allows a list answer outside its choices, returned as the entered string. */
128
+ readonly allowCustomInput?: boolean;
129
+ readonly choices?: readonly PluginPromptChoice<Choice>[] | readonly string[];
130
+ readonly default?: Value;
131
+ readonly details?: string;
132
+ readonly excludePath?: (path: string) => boolean;
133
+ readonly itemType?: "file" | "directory" | "any";
134
+ readonly message: string;
135
+ readonly title?: string;
136
+ readonly purpose?: "input" | "approval";
137
+ readonly name: Key;
138
+ readonly pageSize?: number;
139
+ readonly rootPath?: string;
140
+ readonly type: PluginPromptType;
141
+ readonly validate?: (value: unknown) => boolean | string;
142
+ }
143
+ /** Plugin-owned UI; the host owns identity, cancellation and response delivery. */
144
+ interface PluginPromptViewRequest {
145
+ readonly viewId: string;
146
+ readonly title: string;
147
+ readonly input: unknown;
148
+ readonly purpose?: "input" | "approval";
149
+ }
150
+ interface PluginPromptApi<Parameters extends Record<string, unknown> = Record<string, unknown>> {
151
+ readonly open: (request: PluginPromptViewRequest) => Promise<unknown>;
152
+ readonly ask: <Key extends keyof Parameters>(question: PluginPromptQuestion<Key, Parameters[Key]>) => Promise<{ [Property in Key]: Parameters[Property]; }>;
153
+ }
154
+ type PluginToastLevel = "info" | "warn" | "error" | "success";
155
+ interface PluginToastOptions {
156
+ readonly duration?: number;
157
+ }
158
+ interface PluginToastApi {
159
+ readonly dismiss: (id: number) => void;
160
+ readonly show: (message: string, level?: PluginToastLevel, options?: PluginToastOptions) => number;
161
+ readonly update: (id: number, message: string, level?: PluginToastLevel, options?: PluginToastOptions) => number;
162
+ }
163
+ interface PluginStoreApi {
164
+ /** Private workspace/plugin directory, allocated and validated by the host. */
165
+ readonly directory: () => string;
166
+ readonly getState: () => Readonly<Record<string, unknown>>;
167
+ readonly setState: (partial: Readonly<Record<string, unknown>>) => void;
168
+ readonly subscribe: (listener: () => void) => () => void;
169
+ }
170
+ interface PluginConfigApi {
171
+ readonly patch: (patch: Readonly<Record<string, unknown>>) => Promise<Readonly<Record<string, unknown>>>;
172
+ readonly replace: (config: Readonly<Record<string, unknown>>) => Promise<Readonly<Record<string, unknown>>>;
173
+ }
174
+ interface PluginCommandCatalogEntry {
175
+ readonly background?: boolean;
176
+ readonly agent?: PluginAgentPolicy;
177
+ readonly arguments?: readonly PluginCommandArgument[];
178
+ readonly category?: PluginCommandCategory;
179
+ readonly description?: string;
180
+ readonly executionMode?: PluginCommandDefinition["executionMode"];
181
+ readonly id: string;
182
+ readonly input?: ZodType;
183
+ readonly options?: readonly PluginCommandOption[];
184
+ readonly pluginId: string;
185
+ readonly title: string;
186
+ readonly transaction: PluginCommandTransaction;
187
+ }
188
+ interface PluginAgentPolicy {
189
+ readonly callable: boolean;
190
+ readonly destructive?: boolean;
191
+ readonly idempotent?: boolean;
192
+ readonly openWorld?: boolean;
193
+ readonly readOnly: boolean;
194
+ }
195
+ interface PluginCapabilityCommandRequest {
196
+ readonly commandId: string;
197
+ readonly executionId?: string;
198
+ readonly input?: unknown;
199
+ readonly pluginId: string;
200
+ readonly signal?: AbortSignal;
201
+ }
202
+ interface PluginCapabilityResolveRequest {
203
+ readonly id: string;
204
+ readonly input?: unknown;
205
+ readonly pluginId: string;
206
+ }
207
+ interface PluginStatusCatalogEntry {
208
+ readonly description: string;
209
+ readonly id: string;
210
+ readonly input?: ZodType;
211
+ readonly label: string;
212
+ readonly pluginId: string;
213
+ }
214
+ interface PluginAgentContextCatalogEntry {
215
+ readonly exposure: PluginContextExposure;
216
+ readonly description: string;
217
+ readonly id: string;
218
+ readonly input?: ZodType;
219
+ readonly pluginId: string;
220
+ readonly title: string;
221
+ }
222
+ interface PluginViewCatalogEntry {
223
+ readonly description?: string;
224
+ readonly id: string;
225
+ readonly pluginId: string;
226
+ readonly slot: string;
227
+ readonly title: string;
228
+ }
229
+ interface PluginCapabilityCatalog {
230
+ readonly commands: readonly PluginCommandCatalogEntry[];
231
+ readonly contexts: readonly PluginAgentContextCatalogEntry[];
232
+ readonly statuses: readonly PluginStatusCatalogEntry[];
233
+ readonly views: readonly PluginViewCatalogEntry[];
234
+ }
235
+ interface PluginCapabilityService {
236
+ readonly catalog: () => PluginCapabilityCatalog;
237
+ readonly executeCommand: (request: PluginCapabilityCommandRequest) => Promise<PluginCommandExecutionResult>;
238
+ readonly resolveContext: (request: PluginCapabilityResolveRequest) => Promise<unknown>;
239
+ readonly resolveStatus: (request: PluginCapabilityResolveRequest) => Promise<unknown>;
240
+ }
241
+ interface PluginSystemContextService {
242
+ /** @deprecated Use services.tools.inspectEnvironment. */
243
+ readonly inspectEnvironment: () => Promise<Readonly<Record<string, unknown>>>;
244
+ /** Requires a foreground ProjectMutation command declaring project.yaml and a reviewed configuration revision. */
245
+ readonly applyRoleTools: (request: {
246
+ readonly roleId: string;
247
+ readonly revision: string;
248
+ readonly toolIds: readonly string[];
249
+ }) => Promise<Readonly<Record<string, unknown>>>;
250
+ /** Finds an installed desktop app by its platform identity without launching it. */
251
+ readonly findApplication: (applicationId: string) => Promise<string | null>;
252
+ readonly getContext: () => Promise<Readonly<Record<string, unknown>>>;
253
+ }
254
+ interface PluginLogQueryRequest {
255
+ readonly cursor?: string;
256
+ readonly limit?: number;
257
+ readonly workspaceId?: string;
258
+ }
259
+ interface PluginLogQueryResult {
260
+ readonly items: readonly unknown[];
261
+ readonly nextCursor: string | null;
262
+ }
263
+ interface PluginLogService {
264
+ readonly query: (request?: PluginLogQueryRequest) => Promise<PluginLogQueryResult>;
265
+ }
266
+ interface PluginTaskDescriptor {
267
+ readonly id: string;
268
+ readonly description: string | null;
269
+ readonly depends: readonly string[];
270
+ }
271
+ interface PluginTaskResult {
272
+ readonly success: boolean;
273
+ readonly stdout: string;
274
+ readonly stderr: string;
275
+ readonly logId: string;
276
+ }
277
+ interface PluginTaskService {
278
+ readonly list: () => Promise<readonly PluginTaskDescriptor[]>;
279
+ readonly run: (taskId: string) => Promise<PluginTaskResult>;
280
+ }
281
+ /** Opaque delegation is usable only while its verified parent execution remains active. */
282
+ interface PluginExecutionService {
283
+ readonly report: (details: PluginCommandDetails) => Promise<void>;
284
+ readonly start: (request: PluginCapabilityCommandRequest) => Promise<PluginExecutionSnapshot>;
285
+ readonly query: (executionId?: string) => Promise<readonly PluginExecutionSnapshot[]>;
286
+ readonly grant: (options: {
287
+ readonly readOnly: boolean;
288
+ readonly tasks: readonly string[];
289
+ }) => Promise<string>;
290
+ readonly revoke: (token: string) => Promise<void>;
291
+ readonly delegate: (token: string, request: {
292
+ readonly method: "tasks.list" | "tasks.run" | "commands.execute" | "commands.start" | "commands.query";
293
+ readonly input: unknown;
294
+ }) => Promise<unknown>;
295
+ }
296
+ interface PluginHostServices {
297
+ readonly executions: PluginExecutionService;
298
+ readonly capabilities: PluginCapabilityService;
299
+ readonly config: PluginConfigApi;
300
+ readonly logger: PluginInteractiveLogger;
301
+ readonly logs: PluginLogService;
302
+ readonly prompt: PluginPromptApi;
303
+ readonly store: PluginStoreApi;
304
+ readonly system: PluginSystemContextService;
305
+ readonly toast: PluginToastApi;
306
+ readonly tasks: PluginTaskService;
307
+ readonly tools: PluginToolsService;
308
+ }
309
+ //#endregion
310
+ //#region src/types.d.ts
311
+ declare enum PluginHookId {
312
+ ProjectReconcile = "project.reconcile",
313
+ WorkspaceActivate = "workspace.activate",
314
+ WorkspaceAfterPrepare = "workspace.afterPrepare",
315
+ WorkspaceDeactivate = "workspace.deactivate",
316
+ WorkspaceProvision = "workspace.provision",
317
+ Cleanup = "cleanup"
318
+ }
319
+ declare enum PluginExecutionStatus {
320
+ Starting = "starting",
321
+ Running = "running",
322
+ WaitingInput = "waitingInput",
323
+ WaitingApproval = "waitingApproval",
324
+ Cancelling = "cancelling",
325
+ Succeeded = "succeeded",
326
+ Failed = "failed",
327
+ Cancelled = "cancelled",
328
+ Interrupted = "interrupted"
329
+ }
330
+ interface PluginExecutionSnapshot {
331
+ readonly revision: number;
332
+ readonly tasks: readonly {
333
+ readonly taskId: string;
334
+ readonly success: boolean;
335
+ readonly logId: string;
336
+ }[];
337
+ readonly executionId: string;
338
+ readonly projectId: string;
339
+ readonly workspaceId: string;
340
+ readonly activationGeneration: number;
341
+ readonly pluginId: string;
342
+ readonly commandId: string;
343
+ readonly title: string;
344
+ readonly status: PluginExecutionStatus;
345
+ readonly startedAt: string;
346
+ readonly finishedAt: string | null;
347
+ readonly logId: string;
348
+ readonly error: string | null;
349
+ readonly details: PluginCommandDetails | null;
350
+ readonly result: PluginCommandExecutionResult | null;
351
+ }
352
+ declare enum PluginCommandEffect {
353
+ Immediate = "immediate",
354
+ LongRunning = "longRunning"
355
+ }
356
+ declare enum PluginCommandTransaction {
357
+ None = "none",
358
+ ProjectMutation = "projectMutation"
359
+ }
360
+ declare enum PluginCommandCategory {
361
+ Build = "build",
362
+ Publish = "publish",
363
+ Run = "run",
364
+ Settings = "settings"
365
+ }
366
+ declare enum PluginCommandExecutionMode {
367
+ Async = "async",
368
+ Persistent = "persistent",
369
+ Sync = "sync"
370
+ }
371
+ declare enum PluginLifecyclePolicy {
372
+ BestEffort = "bestEffort",
373
+ FailFast = "failFast"
374
+ }
375
+ declare enum PluginLifecycleStatus {
376
+ Failed = "failed",
377
+ Succeeded = "succeeded"
378
+ }
379
+ declare enum PluginRepositoryStatus {
380
+ NotPrepared = "not-prepared",
381
+ Ready = "ready"
382
+ }
383
+ declare enum PluginViewLayout {
384
+ Content = "content",
385
+ Fill = "fill"
386
+ }
387
+ interface PluginDisposable {
388
+ readonly dispose: () => void;
389
+ }
390
+ interface PluginProject {
391
+ readonly id: string;
392
+ readonly root: string;
393
+ readonly workbaseRoot: string;
394
+ }
395
+ interface PluginRepository {
396
+ readonly baseBranch: string;
397
+ readonly branch: string;
398
+ readonly id: string;
399
+ readonly label: string;
400
+ readonly root: string;
401
+ readonly status: PluginRepositoryStatus;
402
+ }
403
+ interface PluginWorkspace {
404
+ readonly id: string;
405
+ readonly repositories: readonly PluginRepository[];
406
+ readonly root: string;
407
+ }
408
+ interface PluginLogger {
409
+ readonly debug: (...values: readonly unknown[]) => void;
410
+ readonly error: (...values: readonly unknown[]) => void;
411
+ readonly info: (...values: readonly unknown[]) => void;
412
+ readonly warn: (...values: readonly unknown[]) => void;
413
+ }
414
+ interface PluginProcessRunOptions {
415
+ readonly program: string;
416
+ readonly arguments?: readonly string[];
417
+ readonly currentDirectory?: string;
418
+ readonly environment?: Readonly<Record<string, string | undefined>>;
419
+ readonly timeoutMilliseconds?: number;
420
+ }
421
+ interface PluginProcessResult {
422
+ readonly command: string;
423
+ readonly errorMessage: string | null;
424
+ readonly exitCode: number | null;
425
+ readonly failed: boolean;
426
+ readonly standardError: string;
427
+ readonly standardOutput: string;
428
+ readonly timedOut: boolean;
429
+ readonly wasCancelled: boolean;
430
+ }
431
+ interface PluginProcessApi {
432
+ readonly run: (options: PluginProcessRunOptions, signal?: AbortSignal) => Promise<PluginProcessResult>;
433
+ }
434
+ interface PluginContext {
435
+ readonly config: Readonly<Record<string, unknown>>;
436
+ readonly logger: PluginLogger;
437
+ readonly pluginId: string;
438
+ readonly process: PluginProcessApi;
439
+ readonly project: PluginProject;
440
+ readonly services: PluginHostServices;
441
+ readonly workspace: PluginWorkspace;
442
+ }
443
+ interface PluginInvocationContext {
444
+ readonly report?: (details: PluginCommandDetails) => void;
445
+ readonly process: PluginProcessApi;
446
+ readonly services: PluginHostServices;
447
+ readonly signal: AbortSignal;
448
+ }
449
+ declare enum PluginSharedChangeKind {
450
+ None = "none",
451
+ Files = "files"
452
+ }
453
+ /** Finite files relative to project.workbaseRoot; workspace files are local. */
454
+ type PluginSharedChanges = {
455
+ readonly kind: PluginSharedChangeKind.None;
456
+ } | {
457
+ readonly kind: PluginSharedChangeKind.Files;
458
+ readonly paths: readonly string[];
459
+ };
460
+ /** Explicit, sanitized business details for the command execution record. */
461
+ interface PluginCommandDetails {
462
+ /** Bounded, sanitized plugin-owned progress; never credentials or pending answers. */
463
+ readonly metadata?: unknown;
464
+ readonly success: boolean;
465
+ readonly summary?: string;
466
+ readonly command?: string;
467
+ readonly standardOutput?: string;
468
+ readonly standardError?: string;
469
+ readonly warnings?: readonly string[];
470
+ }
471
+ interface PluginCommandExecutionResult<Value = unknown> {
472
+ readonly value: Value;
473
+ readonly executionId: string;
474
+ readonly parentExecutionId: string | null;
475
+ readonly logId: string | null;
476
+ readonly publication: {
477
+ readonly status: "local" | "synced" | "pending";
478
+ readonly warning: string | null;
479
+ };
480
+ readonly diagnostics: readonly string[];
481
+ }
482
+ interface PluginCommandContext extends PluginInvocationContext {
483
+ readonly report: (details: PluginCommandDetails) => void;
484
+ readonly executionId: string;
485
+ }
486
+ interface PluginCommandDefinition {
487
+ /** Explicit host-owned background execution; transaction must be None. */
488
+ readonly background?: boolean;
489
+ /** Required for ProjectMutation; read-only and evaluated before the write lease is used. */
490
+ readonly plan?: (input: unknown) => PluginSharedChanges | Promise<PluginSharedChanges>;
491
+ readonly agent?: PluginAgentPolicy;
492
+ readonly arguments?: readonly PluginCommandArgument[];
493
+ readonly category?: PluginCommandCategory;
494
+ readonly description?: string;
495
+ readonly effect?: PluginCommandEffect;
496
+ readonly executionMode?: PluginCommandExecutionMode | ((input: Readonly<Record<string, unknown>>) => PluginCommandExecutionMode);
497
+ readonly id: string;
498
+ readonly input?: ZodType;
499
+ readonly options?: readonly PluginCommandOption[];
500
+ readonly run: (input: unknown, context: PluginCommandContext) => unknown | Promise<unknown>;
501
+ readonly title: string;
502
+ readonly transaction?: PluginCommandTransaction;
503
+ }
504
+ interface PluginCommandArgument {
505
+ readonly description: string;
506
+ readonly name: string;
507
+ readonly required?: boolean;
508
+ }
509
+ interface PluginCommandOption {
510
+ readonly default?: unknown;
511
+ readonly description: string;
512
+ readonly flags: string;
513
+ }
514
+ declare enum PluginContextExposure {
515
+ Agent = "agent",
516
+ Internal = "internal"
517
+ }
518
+ interface PluginAgentContextDefinition {
519
+ readonly exposure: PluginContextExposure;
520
+ readonly description: string;
521
+ readonly id: string;
522
+ readonly input?: ZodType;
523
+ readonly title: string;
524
+ readonly resolve: (input: unknown, context: PluginInvocationContext) => unknown | Promise<unknown>;
525
+ }
526
+ interface PluginViewRequest {
527
+ readonly input: unknown;
528
+ readonly method: string;
529
+ }
530
+ interface PluginViewDefinition {
531
+ readonly description?: string;
532
+ readonly entry: string;
533
+ readonly handlers?: Readonly<Record<string, (input: unknown, context: PluginInvocationContext) => unknown | Promise<unknown>>>;
534
+ readonly id: string;
535
+ readonly layout?: PluginViewLayout;
536
+ readonly order?: number;
537
+ readonly request?: (request: PluginViewRequest, context: PluginInvocationContext) => unknown | Promise<unknown>;
538
+ readonly slot: string;
539
+ readonly title?: string;
540
+ }
541
+ interface PluginStatusDefinition {
542
+ readonly description: string;
543
+ readonly id: string;
544
+ readonly input?: ZodType;
545
+ readonly label: string;
546
+ readonly resolve: (input: unknown, context: PluginInvocationContext) => unknown | Promise<unknown>;
547
+ }
548
+ interface PluginToolContribution {
549
+ readonly id: string;
550
+ readonly pluginId: string;
551
+ readonly version?: string;
552
+ }
553
+ interface PluginLifecycleOutcome {
554
+ readonly code: string | null;
555
+ readonly details: unknown | null;
556
+ readonly durationMilliseconds: number;
557
+ readonly error: string | null;
558
+ readonly pluginId: string;
559
+ readonly retryable: boolean;
560
+ readonly standardError: string;
561
+ readonly standardOutput: string;
562
+ readonly status: PluginLifecycleStatus;
563
+ readonly tap: string;
564
+ readonly warnings: readonly string[];
565
+ }
566
+ interface PluginHookResult {
567
+ readonly standardError?: string;
568
+ readonly standardOutput?: string;
569
+ readonly warnings?: readonly string[];
570
+ }
571
+ interface PluginLifecycleDispatchResult {
572
+ readonly hookId: PluginHookId;
573
+ readonly outcomes: readonly PluginLifecycleOutcome[];
574
+ readonly policy: PluginLifecyclePolicy;
575
+ }
576
+ interface PluginLifecycleHook {
577
+ readonly tap: (name: string, handler: (payload: unknown, context: PluginInvocationContext) => void | PluginHookResult | Promise<void | PluginHookResult>) => void;
578
+ }
579
+ interface PluginSetupHooks {
580
+ readonly onCleanup: PluginLifecycleHook;
581
+ readonly onProjectReconcile: PluginLifecycleHook;
582
+ readonly onWorkspaceActivate: PluginLifecycleHook;
583
+ readonly onWorkspaceAfterPrepare: PluginLifecycleHook;
584
+ readonly onWorkspaceDeactivate: PluginLifecycleHook;
585
+ readonly onWorkspaceProvision: PluginLifecycleHook;
586
+ readonly registerAgentContext: (definition: PluginAgentContextDefinition) => void;
587
+ readonly registerCommand: (definition: PluginCommandDefinition) => void;
588
+ readonly registerStatus: (definition: PluginStatusDefinition) => void;
589
+ readonly registerView: (definition: PluginViewDefinition) => void;
590
+ }
591
+ interface WorkbasePluginDefinition {
592
+ readonly dependencies?: readonly string[];
593
+ readonly id: string;
594
+ readonly setup: (context: PluginContext, hooks: PluginSetupHooks) => void | Promise<void>;
595
+ readonly title: string;
596
+ }
597
+ interface PluginCommandContribution {
598
+ readonly background?: boolean;
599
+ readonly agent?: PluginAgentPolicy;
600
+ readonly description?: string;
601
+ readonly effect: PluginCommandEffect;
602
+ readonly id: string;
603
+ readonly pluginId: string;
604
+ readonly title: string;
605
+ readonly transaction: PluginCommandTransaction;
606
+ }
607
+ interface PluginAgentContextContribution {
608
+ readonly exposure: PluginContextExposure;
609
+ readonly id: string;
610
+ readonly pluginId: string;
611
+ }
612
+ interface PluginViewContribution {
613
+ readonly entry: string;
614
+ readonly id: string;
615
+ readonly layout: PluginViewLayout;
616
+ readonly order: number;
617
+ readonly pluginId: string;
618
+ readonly slot: string;
619
+ readonly title: string;
620
+ }
621
+ interface PluginStatusContribution {
622
+ readonly id: string;
623
+ readonly label: string;
624
+ readonly pluginId: string;
625
+ }
626
+ interface PluginContributionSnapshot {
627
+ readonly agentContexts: readonly PluginAgentContextContribution[];
628
+ readonly commands: readonly PluginCommandContribution[];
629
+ readonly statuses: readonly PluginStatusContribution[];
630
+ readonly tools: readonly PluginToolContribution[];
631
+ readonly views: readonly PluginViewContribution[];
632
+ }
633
+ //#endregion
634
+ export { PluginColoredMessage as $, PluginProcessResult as A, roleToolsProposalSchema as At, PluginToolContribution as B, PluginLifecycleDispatchResult as C, PluginViewCatalogEntry as Ct, PluginLifecycleStatus as D, RoleToolsProposal as Dt, PluginLifecyclePolicy as E, RoleToolsApplied as Et, PluginSetupHooks as F, PluginWorkspace as G, PluginViewDefinition as H, PluginSharedChangeKind as I, PluginAgentPolicy as J, WorkbasePluginDefinition as K, PluginSharedChanges as L, PluginProject as M, PluginRepository as N, PluginLogger as O, roleToolEnvironmentSchema as Ot, PluginRepositoryStatus as P, PluginCapabilityService as Q, PluginStatusContribution as R, PluginInvocationContext as S, PluginToastOptions as St, PluginLifecycleOutcome as T, RoleToolEnvironment as Tt, PluginViewLayout as U, PluginViewContribution as V, PluginViewRequest as W, PluginCapabilityCommandRequest as X, PluginCapabilityCatalog as Y, PluginCapabilityResolveRequest as Z, PluginDisposable as _, PluginTaskDescriptor as _t, PluginCommandContext as a, PluginLogEntry as at, PluginHookId as b, PluginToastApi as bt, PluginCommandDetails as c, PluginLogService as ct, PluginCommandExecutionResult as d, PluginPromptQuestion as dt, PluginCommandCatalogEntry as et, PluginCommandOption as f, PluginPromptType as ft, PluginContributionSnapshot as g, PluginSystemContextService as gt, PluginContextExposure as h, PluginStoreApi as ht, PluginCommandCategory as i, PluginInteractiveLogger as it, PluginProcessRunOptions as j, PluginProcessApi as k, roleToolsAppliedSchema as kt, PluginCommandEffect as l, PluginPromptApi as lt, PluginContext as m, PluginStatusCatalogEntry as mt, PluginAgentContextDefinition as n, PluginExecutionService as nt, PluginCommandContribution as o, PluginLogQueryRequest as ot, PluginCommandTransaction as p, PluginPromptViewRequest as pt, PluginAgentContextCatalogEntry as q, PluginCommandArgument as r, PluginHostServices as rt, PluginCommandDefinition as s, PluginLogQueryResult as st, PluginAgentContextContribution as t, PluginConfigApi as tt, PluginCommandExecutionMode as u, PluginPromptChoice as ut, PluginExecutionSnapshot as v, PluginTaskResult as vt, PluginLifecycleHook as w, PluginToolsService as wt, PluginHookResult as x, PluginToastLevel as xt, PluginExecutionStatus as y, PluginTaskService as yt, PluginStatusDefinition as z };