@capybara-hq/plugin-sdk 0.1.0-rc.90 → 0.1.0-rc.92
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/api/plugin-sdk.api.md +14 -2
- package/dist/connector.d.ts +5 -0
- package/dist/ctx.d.ts +8 -7
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/ui.d.ts +14 -6
- package/package.json +1 -1
package/api/plugin-sdk.api.md
CHANGED
|
@@ -819,6 +819,7 @@ export interface ConnectorSession {
|
|
|
819
819
|
name: string;
|
|
820
820
|
description?: string;
|
|
821
821
|
mimeType?: string;
|
|
822
|
+
size?: number;
|
|
822
823
|
}[]>;
|
|
823
824
|
listTools(): Promise<ToolSpec[]>;
|
|
824
825
|
readResource?(uri: string): Promise<ToolResult>;
|
|
@@ -4422,7 +4423,7 @@ export function sanitizeThemeSvg(bytes: Uint8Array): {
|
|
|
4422
4423
|
};
|
|
4423
4424
|
|
|
4424
4425
|
// @public
|
|
4425
|
-
export const SDK_VERSION = "0.1.0-rc.
|
|
4426
|
+
export const SDK_VERSION = "0.1.0-rc.92";
|
|
4426
4427
|
|
|
4427
4428
|
// @public
|
|
4428
4429
|
export function secret<T extends z.ZodTypeAny>(schema: T): T;
|
|
@@ -5640,6 +5641,10 @@ export interface UiOpen {
|
|
|
5640
5641
|
export interface UiOrgActionArgs extends UiOrgRenderArgs, UiActionInput {
|
|
5641
5642
|
}
|
|
5642
5643
|
|
|
5644
|
+
// @public
|
|
5645
|
+
export interface UiOrgQueryArgs extends UiOrgRenderArgs, UiQueryInput {
|
|
5646
|
+
}
|
|
5647
|
+
|
|
5643
5648
|
// @public
|
|
5644
5649
|
export interface UiOrgRenderArgs extends UiRenderArgsBase {
|
|
5645
5650
|
agentId?: string;
|
|
@@ -5685,6 +5690,10 @@ export type UiPartState = "aria-current" | "aria-selected" | "aria-expanded" | "
|
|
|
5685
5690
|
export interface UiPlatformActionArgs extends UiPlatformRenderArgs, UiActionInput {
|
|
5686
5691
|
}
|
|
5687
5692
|
|
|
5693
|
+
// @public
|
|
5694
|
+
export interface UiPlatformQueryArgs extends UiPlatformRenderArgs, UiQueryInput {
|
|
5695
|
+
}
|
|
5696
|
+
|
|
5688
5697
|
// @public
|
|
5689
5698
|
export interface UiPlatformRenderArgs extends UiRenderArgsBase {
|
|
5690
5699
|
agentId?: undefined;
|
|
@@ -5697,7 +5706,10 @@ export interface UiPlatformRenderArgs extends UiRenderArgsBase {
|
|
|
5697
5706
|
}
|
|
5698
5707
|
|
|
5699
5708
|
// @public
|
|
5700
|
-
export
|
|
5709
|
+
export type UiQueryArgs = UiOrgQueryArgs | UiPlatformQueryArgs;
|
|
5710
|
+
|
|
5711
|
+
// @public
|
|
5712
|
+
export interface UiQueryInput {
|
|
5701
5713
|
params: JsonValue;
|
|
5702
5714
|
query: string;
|
|
5703
5715
|
signal: AbortSignal;
|
package/dist/connector.d.ts
CHANGED
|
@@ -18,11 +18,16 @@ export interface ConnectorSession {
|
|
|
18
18
|
callTool(name: string, input: unknown, signal: AbortSignal, ctx?: {
|
|
19
19
|
spec: ToolSpec;
|
|
20
20
|
}): Promise<ToolResult>;
|
|
21
|
+
/**
|
|
22
|
+
* Optional: `size` is the remote's size in bytes when it states one; the kernel does not list a
|
|
23
|
+
* resource whose size is 0.
|
|
24
|
+
*/
|
|
21
25
|
listResources?(): Promise<{
|
|
22
26
|
uri: string;
|
|
23
27
|
name: string;
|
|
24
28
|
description?: string;
|
|
25
29
|
mimeType?: string;
|
|
30
|
+
size?: number;
|
|
26
31
|
}[]>;
|
|
27
32
|
readResource?(uri: string): Promise<ToolResult>;
|
|
28
33
|
/**
|
package/dist/ctx.d.ts
CHANGED
|
@@ -461,13 +461,14 @@ export interface ExtensionContext {
|
|
|
461
461
|
/**
|
|
462
462
|
* Registers the data source of `usePluginQuery` for a component (only during `setup`). `id`
|
|
463
463
|
* must be a component id declared in `permissions.ui.components`; the kernel refuses any other
|
|
464
|
-
* id. Queries work in
|
|
465
|
-
*
|
|
466
|
-
*
|
|
467
|
-
*
|
|
468
|
-
* `
|
|
469
|
-
*
|
|
470
|
-
*
|
|
464
|
+
* id. Queries work in org-scoped component slots (`org.page`, conversation and agent slots)
|
|
465
|
+
* and in `platform.page` (narrow on `args.scope`). The result is JSON of at most
|
|
466
|
+
* `UI_LIMITS.componentQueryBytes` bytes and the call's params at most
|
|
467
|
+
* `UI_LIMITS.componentQueryParamsBytes`. Push refresh reaches queries through stream
|
|
468
|
+
* invalidations (`invalidate({ orgId, contribution })` without a `conversationId`, or
|
|
469
|
+
* `invalidate({ contribution })` for `platform.page`): a conversation-scoped invalidation does
|
|
470
|
+
* not refetch them, so a component in a conversation slot refetches through an action result's
|
|
471
|
+
* `invalidate` query names (or its own `refetch`).
|
|
471
472
|
*/
|
|
472
473
|
query(id: string, handler: (args: UiQueryArgs) => Promise<JsonValue>): void;
|
|
473
474
|
invalidate(target: {
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
package/dist/ui.d.ts
CHANGED
|
@@ -293,16 +293,24 @@ export interface UiPlatformActionArgs extends UiPlatformRenderArgs, UiActionInpu
|
|
|
293
293
|
* `answer`.
|
|
294
294
|
*/
|
|
295
295
|
export type UiActionArgs = UiOrgActionArgs | UiPlatformActionArgs;
|
|
296
|
-
/**
|
|
297
|
-
|
|
298
|
-
* (JSON of at most `UI_LIMITS.componentQueryParamsBytes` bytes). `signal` aborts when the caller
|
|
299
|
-
* goes away.
|
|
300
|
-
*/
|
|
301
|
-
export interface UiQueryArgs extends UiOrgRenderArgs {
|
|
296
|
+
/** What a component query adds to the render args. */
|
|
297
|
+
export interface UiQueryInput {
|
|
302
298
|
query: string;
|
|
303
299
|
params: JsonValue;
|
|
304
300
|
signal: AbortSignal;
|
|
305
301
|
}
|
|
302
|
+
/** A query of an org-scope component. */
|
|
303
|
+
export interface UiOrgQueryArgs extends UiOrgRenderArgs, UiQueryInput {
|
|
304
|
+
}
|
|
305
|
+
/** A query of a `platform.page` component. */
|
|
306
|
+
export interface UiPlatformQueryArgs extends UiPlatformRenderArgs, UiQueryInput {
|
|
307
|
+
}
|
|
308
|
+
/**
|
|
309
|
+
* The args of a `ctx.ui.query` handler: the org or platform position of the call (narrow on
|
|
310
|
+
* `scope`), the query id and its params (JSON of at most `UI_LIMITS.componentQueryParamsBytes`
|
|
311
|
+
* bytes). `signal` aborts when the caller goes away.
|
|
312
|
+
*/
|
|
313
|
+
export type UiQueryArgs = UiOrgQueryArgs | UiPlatformQueryArgs;
|
|
306
314
|
/**
|
|
307
315
|
* An action result: a notice, or a new view. `invalidate` names queries the host refetches
|
|
308
316
|
* (component actions only).
|