@xpert-ai/plugin-sdk 3.36.0 → 3.37.2
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/index.cjs.js +216 -95
- package/index.esm.js +209 -97
- package/package.json +2 -2
- package/src/lib/agent/handoff/agent-runtime-message.contract.d.ts +4 -4
- package/src/lib/agent/middleware/strategy.interface.d.ts +2 -0
- package/src/lib/agent/runtime/dispatch.d.ts +6 -6
- package/src/lib/agent-event/index.d.ts +36 -2
- package/src/lib/artifact-type/definition.schema.d.ts +11 -39
- package/src/lib/channel/strategy.interface.d.ts +20 -0
- package/src/lib/content-resource/catalog.d.ts +17 -1
- package/src/lib/project-pipeline/registry.d.ts +13 -5
- package/src/lib/sandbox/file-edit-command.d.ts +2 -1
- package/src/lib/sandbox/file-edits.d.ts +1 -0
- package/src/lib/sandbox/protocol.d.ts +7 -1
- package/src/lib/view-extension/index.d.ts +1 -0
- package/src/lib/view-extension/workbench-decision.d.ts +10 -0
|
@@ -9,18 +9,11 @@ export declare const artifactTypeDefinitionSchema: z.ZodEffects<z.ZodEffects<z.Z
|
|
|
9
9
|
size: z.ZodOptional<z.ZodNumber>;
|
|
10
10
|
alt: z.ZodOptional<z.ZodString>;
|
|
11
11
|
style: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
12
|
-
}, "strip", z.ZodTypeAny, {
|
|
13
|
-
value?: string;
|
|
14
|
-
type?: "image" | "svg" | "font" | "emoji" | "lottie";
|
|
12
|
+
}, "strip", z.ZodTypeAny, import("@xpert-ai/contracts").IconDefinition, {
|
|
15
13
|
size?: number;
|
|
16
14
|
color?: string;
|
|
17
|
-
alt?: string;
|
|
18
|
-
style?: Record<string, string>;
|
|
19
|
-
}, {
|
|
20
|
-
value?: string;
|
|
21
15
|
type?: "image" | "svg" | "font" | "emoji" | "lottie";
|
|
22
|
-
|
|
23
|
-
color?: string;
|
|
16
|
+
value?: string;
|
|
24
17
|
alt?: string;
|
|
25
18
|
style?: Record<string, string>;
|
|
26
19
|
}>>;
|
|
@@ -119,14 +112,7 @@ export declare const artifactTypeDefinitionSchema: z.ZodEffects<z.ZodEffects<z.Z
|
|
|
119
112
|
collection?: {
|
|
120
113
|
allowCopy?: boolean;
|
|
121
114
|
};
|
|
122
|
-
icon?:
|
|
123
|
-
value?: string;
|
|
124
|
-
type?: "image" | "svg" | "font" | "emoji" | "lottie";
|
|
125
|
-
size?: number;
|
|
126
|
-
color?: string;
|
|
127
|
-
alt?: string;
|
|
128
|
-
style?: Record<string, string>;
|
|
129
|
-
};
|
|
115
|
+
icon?: import("@xpert-ai/contracts").IconDefinition;
|
|
130
116
|
content?: {
|
|
131
117
|
mimeTypes?: string[];
|
|
132
118
|
maxBytes?: number;
|
|
@@ -164,10 +150,10 @@ export declare const artifactTypeDefinitionSchema: z.ZodEffects<z.ZodEffects<z.Z
|
|
|
164
150
|
allowCopy?: boolean;
|
|
165
151
|
};
|
|
166
152
|
icon?: {
|
|
167
|
-
value?: string;
|
|
168
|
-
type?: "image" | "svg" | "font" | "emoji" | "lottie";
|
|
169
153
|
size?: number;
|
|
170
154
|
color?: string;
|
|
155
|
+
type?: "image" | "svg" | "font" | "emoji" | "lottie";
|
|
156
|
+
value?: string;
|
|
171
157
|
alt?: string;
|
|
172
158
|
style?: Record<string, string>;
|
|
173
159
|
};
|
|
@@ -207,14 +193,7 @@ export declare const artifactTypeDefinitionSchema: z.ZodEffects<z.ZodEffects<z.Z
|
|
|
207
193
|
collection?: {
|
|
208
194
|
allowCopy?: boolean;
|
|
209
195
|
};
|
|
210
|
-
icon?:
|
|
211
|
-
value?: string;
|
|
212
|
-
type?: "image" | "svg" | "font" | "emoji" | "lottie";
|
|
213
|
-
size?: number;
|
|
214
|
-
color?: string;
|
|
215
|
-
alt?: string;
|
|
216
|
-
style?: Record<string, string>;
|
|
217
|
-
};
|
|
196
|
+
icon?: import("@xpert-ai/contracts").IconDefinition;
|
|
218
197
|
content?: {
|
|
219
198
|
mimeTypes?: string[];
|
|
220
199
|
maxBytes?: number;
|
|
@@ -252,10 +231,10 @@ export declare const artifactTypeDefinitionSchema: z.ZodEffects<z.ZodEffects<z.Z
|
|
|
252
231
|
allowCopy?: boolean;
|
|
253
232
|
};
|
|
254
233
|
icon?: {
|
|
255
|
-
value?: string;
|
|
256
|
-
type?: "image" | "svg" | "font" | "emoji" | "lottie";
|
|
257
234
|
size?: number;
|
|
258
235
|
color?: string;
|
|
236
|
+
type?: "image" | "svg" | "font" | "emoji" | "lottie";
|
|
237
|
+
value?: string;
|
|
259
238
|
alt?: string;
|
|
260
239
|
style?: Record<string, string>;
|
|
261
240
|
};
|
|
@@ -295,14 +274,7 @@ export declare const artifactTypeDefinitionSchema: z.ZodEffects<z.ZodEffects<z.Z
|
|
|
295
274
|
collection?: {
|
|
296
275
|
allowCopy?: boolean;
|
|
297
276
|
};
|
|
298
|
-
icon?:
|
|
299
|
-
value?: string;
|
|
300
|
-
type?: "image" | "svg" | "font" | "emoji" | "lottie";
|
|
301
|
-
size?: number;
|
|
302
|
-
color?: string;
|
|
303
|
-
alt?: string;
|
|
304
|
-
style?: Record<string, string>;
|
|
305
|
-
};
|
|
277
|
+
icon?: import("@xpert-ai/contracts").IconDefinition;
|
|
306
278
|
content?: {
|
|
307
279
|
mimeTypes?: string[];
|
|
308
280
|
maxBytes?: number;
|
|
@@ -340,10 +312,10 @@ export declare const artifactTypeDefinitionSchema: z.ZodEffects<z.ZodEffects<z.Z
|
|
|
340
312
|
allowCopy?: boolean;
|
|
341
313
|
};
|
|
342
314
|
icon?: {
|
|
343
|
-
value?: string;
|
|
344
|
-
type?: "image" | "svg" | "font" | "emoji" | "lottie";
|
|
345
315
|
size?: number;
|
|
346
316
|
color?: string;
|
|
317
|
+
type?: "image" | "svg" | "font" | "emoji" | "lottie";
|
|
318
|
+
value?: string;
|
|
347
319
|
alt?: string;
|
|
348
320
|
style?: Record<string, string>;
|
|
349
321
|
};
|
|
@@ -225,6 +225,26 @@ export interface IChatChannel<TConfig = any, TEvent = any> {
|
|
|
225
225
|
* @returns Send result
|
|
226
226
|
*/
|
|
227
227
|
sendText(ctx: TChatContext, content: string): Promise<TChatSendResult>;
|
|
228
|
+
/** Verify the bound account in this installation. The app-specific ID is never supplied by the model. */
|
|
229
|
+
resolvePrivateDestination?(integration: IIntegration, subjectId: string): Promise<{
|
|
230
|
+
appId: string;
|
|
231
|
+
recipient: string;
|
|
232
|
+
} | null>;
|
|
233
|
+
/** Send to the verified private recipient using the host's attempt ID. Return unknown when acceptance is uncertain. */
|
|
234
|
+
sendPrivateDecision?(integration: IIntegration, recipient: string, card: import('@xpert-ai/contracts').PrivateDecisionCard, attemptId: string): Promise<{
|
|
235
|
+
status: 'accepted';
|
|
236
|
+
messageId: string;
|
|
237
|
+
chatId: string;
|
|
238
|
+
} | {
|
|
239
|
+
status: 'failed' | 'unknown';
|
|
240
|
+
}>;
|
|
241
|
+
updatePrivateDecision?(integration: IIntegration, messageId: string, status: import('@xpert-ai/contracts').PrivateDecisionFeedbackStatus, choiceLabel: string): Promise<void>;
|
|
242
|
+
sendPrivateNotification?(integration: IIntegration, recipient: string, text: string, attemptId: string): Promise<{
|
|
243
|
+
status: 'accepted';
|
|
244
|
+
messageId: string;
|
|
245
|
+
} | {
|
|
246
|
+
status: 'failed' | 'unknown';
|
|
247
|
+
}>;
|
|
228
248
|
/**
|
|
229
249
|
* Send Markdown message
|
|
230
250
|
*
|
|
@@ -67,7 +67,20 @@ export interface ContentCatalogApi {
|
|
|
67
67
|
types(scope: ContentDocumentScope): Promise<Array<ContentTypeImplementation & {
|
|
68
68
|
providerKey: string;
|
|
69
69
|
}>>;
|
|
70
|
-
/**
|
|
70
|
+
/** Rebuild derived catalog metadata explicitly, outside the first-page read path. */
|
|
71
|
+
refresh(scope: ContentDocumentScope & {
|
|
72
|
+
excludedProviderKeys?: string[];
|
|
73
|
+
}): Promise<void>;
|
|
74
|
+
/** Project-scoped suppression metadata, including tombstones. These paths only hide
|
|
75
|
+
* duplicate file entries; they must never be displayed or treated as access grants. */
|
|
76
|
+
coverage(scope: ContentDocumentScope & {
|
|
77
|
+
excludedProviderKeys?: string[];
|
|
78
|
+
}): Promise<Array<{
|
|
79
|
+
path: string;
|
|
80
|
+
recursive: boolean;
|
|
81
|
+
}>>;
|
|
82
|
+
/** Reads an authorized page. Use indexed discovery for interactive lists and refresh
|
|
83
|
+
* separately. The default retains synchronous discovery for existing callers. */
|
|
71
84
|
list(scope: ContentDocumentScope & {
|
|
72
85
|
excludedProviderKeys?: string[];
|
|
73
86
|
contentIds?: string[];
|
|
@@ -76,9 +89,12 @@ export interface ContentCatalogApi {
|
|
|
76
89
|
deleted?: boolean;
|
|
77
90
|
offset?: number;
|
|
78
91
|
limit?: number;
|
|
92
|
+
discovery?: 'refresh' | 'indexed';
|
|
93
|
+
cursor?: string;
|
|
79
94
|
}): Promise<{
|
|
80
95
|
items: ContentCatalogItem[];
|
|
81
96
|
hasMore: boolean;
|
|
97
|
+
nextCursor?: string;
|
|
82
98
|
}>;
|
|
83
99
|
register(input: ContentDocumentScope & {
|
|
84
100
|
source: ContentResourceReference;
|
|
@@ -65,9 +65,9 @@ export declare class ProjectPipelineContributionRegistry extends BaseStrategyReg
|
|
|
65
65
|
version: string;
|
|
66
66
|
lanes: {
|
|
67
67
|
key: string;
|
|
68
|
+
label: string;
|
|
68
69
|
order: number;
|
|
69
70
|
roleKey: string;
|
|
70
|
-
label: string;
|
|
71
71
|
}[];
|
|
72
72
|
executionAuthority: "provider";
|
|
73
73
|
providerRef: string;
|
|
@@ -86,8 +86,8 @@ export declare class ProjectPipelineContributionRegistry extends BaseStrategyReg
|
|
|
86
86
|
}[];
|
|
87
87
|
stages: {
|
|
88
88
|
key: string;
|
|
89
|
-
order: number;
|
|
90
89
|
label: string;
|
|
90
|
+
order: number;
|
|
91
91
|
icon?: "code" | "layers" | "file-text" | "folder-open" | "list-checks" | "search" | "scan-search" | "boxes" | "package" | "settings" | "clipboard-check" | "shield-check" | "git-pull-request" | "test-tube" | "git-merge" | "calculator" | "file-check" | "truck" | undefined;
|
|
92
92
|
}[];
|
|
93
93
|
presentation?: {
|
|
@@ -110,9 +110,9 @@ export declare class ProjectPipelineContributionRegistry extends BaseStrategyReg
|
|
|
110
110
|
version: string;
|
|
111
111
|
lanes: {
|
|
112
112
|
key: string;
|
|
113
|
+
label: string;
|
|
113
114
|
order: number;
|
|
114
115
|
roleKey: string;
|
|
115
|
-
label: string;
|
|
116
116
|
}[];
|
|
117
117
|
executionAuthority: "platform";
|
|
118
118
|
topology: {
|
|
@@ -129,8 +129,8 @@ export declare class ProjectPipelineContributionRegistry extends BaseStrategyReg
|
|
|
129
129
|
}[];
|
|
130
130
|
stages: {
|
|
131
131
|
key: string;
|
|
132
|
-
order: number;
|
|
133
132
|
label: string;
|
|
133
|
+
order: number;
|
|
134
134
|
icon?: "code" | "layers" | "file-text" | "folder-open" | "list-checks" | "search" | "scan-search" | "boxes" | "package" | "settings" | "clipboard-check" | "shield-check" | "git-pull-request" | "test-tube" | "git-merge" | "calculator" | "file-check" | "truck" | undefined;
|
|
135
135
|
}[];
|
|
136
136
|
nodes: ({
|
|
@@ -141,10 +141,10 @@ export declare class ProjectPipelineContributionRegistry extends BaseStrategyReg
|
|
|
141
141
|
executorSlot: string;
|
|
142
142
|
completionRef: string;
|
|
143
143
|
stageKey: string;
|
|
144
|
+
label?: string | undefined;
|
|
144
145
|
presentation?: {
|
|
145
146
|
foldIntoApproval: string;
|
|
146
147
|
} | undefined;
|
|
147
|
-
label?: string | undefined;
|
|
148
148
|
resourceResolverRef?: string | undefined;
|
|
149
149
|
outputSchemaRef?: string | undefined;
|
|
150
150
|
inputBindings?: Record<string, {
|
|
@@ -351,6 +351,14 @@ export declare class ProjectPipelineContributionRegistry extends BaseStrategyReg
|
|
|
351
351
|
metricRefs: string[];
|
|
352
352
|
} | undefined;
|
|
353
353
|
};
|
|
354
|
+
nativeModelBudgetPolicy?: {
|
|
355
|
+
maximum: {
|
|
356
|
+
maxCalls: number;
|
|
357
|
+
maxTokens: number;
|
|
358
|
+
reservationTokens: number;
|
|
359
|
+
};
|
|
360
|
+
maxTokensDefaultSource: "configuration" | "host";
|
|
361
|
+
} | undefined;
|
|
354
362
|
}[];
|
|
355
363
|
descriptors: ({
|
|
356
364
|
kind: "schema";
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import type { EditOperation } from './protocol';
|
|
2
2
|
export declare function buildEditCommand(filePath: string, oldString: string, newString: string, replaceAll: boolean): string;
|
|
3
|
+
export declare function buildBatchEditCommand(filePath: string, edits: EditOperation[]): string;
|
|
@@ -2,3 +2,4 @@ import type { EditOperation, EditResult, ExecuteResponse, MaybePromise, MultiEdi
|
|
|
2
2
|
export declare function editCommandResult(filePath: string, result: ExecuteResponse): EditResult;
|
|
3
3
|
/** Stops on failure; never promises rollback or silently reapplies completed edits. */
|
|
4
4
|
export declare function sequentialFileEdits(filePath: string, edits: EditOperation[], apply: (edit: EditOperation) => MaybePromise<EditResult>): Promise<MultiEditResult>;
|
|
5
|
+
export declare function groupedFileEdits(path: string, edits: EditOperation[], execute: (command: string) => MaybePromise<ExecuteResponse>): Promise<MultiEditResult>;
|
|
@@ -151,11 +151,17 @@ export interface MultiEditResult {
|
|
|
151
151
|
filesUpdate?: Record<string, FileData> | null;
|
|
152
152
|
/** Results from each individual edit operation */
|
|
153
153
|
results?: EditResult[];
|
|
154
|
-
/**
|
|
154
|
+
/** Indices are one-based. appliedEdits counts only the confirmed prefix. */
|
|
155
155
|
progress?: {
|
|
156
156
|
mode: 'sequential';
|
|
157
157
|
appliedEdits: number;
|
|
158
|
+
/** An edit was confirmed to have failed (for example, its old text did not match). */
|
|
158
159
|
failedEdit?: number;
|
|
160
|
+
/** Inclusive range of the submitted batch with unknown persistence. Later edits were not sent. */
|
|
161
|
+
unconfirmedEdits?: {
|
|
162
|
+
from: number;
|
|
163
|
+
to: number;
|
|
164
|
+
};
|
|
159
165
|
};
|
|
160
166
|
/** Metadata for the multi-edit operation, attached to the ToolMessage */
|
|
161
167
|
metadata?: Record<string, unknown>;
|
|
@@ -4,4 +4,5 @@ export * from './provider.registry';
|
|
|
4
4
|
export * from './remote-component-html';
|
|
5
5
|
export * from './tokens';
|
|
6
6
|
export * from './middleware-runtime';
|
|
7
|
+
export * from './workbench-decision';
|
|
7
8
|
export { ASSISTANT_CHAT_SEND_MESSAGE_COMMAND, ASSISTANT_CONTEXT_SET_COMMAND } from '@xpert-ai/contracts';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { HumanDecisionInput, HumanDecisionResult } from '@xpert-ai/contracts';
|
|
2
|
+
/**
|
|
3
|
+
* Lets a plugin's server-side View provider submit a human decision during an authorized
|
|
4
|
+
* assistant or project workbench action. The host takes the actor and plugin identity from
|
|
5
|
+
* the current action and routes the submission to their active source binding.
|
|
6
|
+
* The event source checks who can decide the business matter and records the choice.
|
|
7
|
+
*/
|
|
8
|
+
export declare const WorkbenchDecisionCapability: import("../core/runtime-capability").RuntimeCapabilityKey<{
|
|
9
|
+
submit(adapter: string, sourceBindingRef: string, input: HumanDecisionInput): Promise<HumanDecisionResult>;
|
|
10
|
+
}>;
|