@capybara-hq/plugin-sdk 0.1.0-rc.91 → 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 +13 -2
- 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
|
@@ -4423,7 +4423,7 @@ export function sanitizeThemeSvg(bytes: Uint8Array): {
|
|
|
4423
4423
|
};
|
|
4424
4424
|
|
|
4425
4425
|
// @public
|
|
4426
|
-
export const SDK_VERSION = "0.1.0-rc.
|
|
4426
|
+
export const SDK_VERSION = "0.1.0-rc.92";
|
|
4427
4427
|
|
|
4428
4428
|
// @public
|
|
4429
4429
|
export function secret<T extends z.ZodTypeAny>(schema: T): T;
|
|
@@ -5641,6 +5641,10 @@ export interface UiOpen {
|
|
|
5641
5641
|
export interface UiOrgActionArgs extends UiOrgRenderArgs, UiActionInput {
|
|
5642
5642
|
}
|
|
5643
5643
|
|
|
5644
|
+
// @public
|
|
5645
|
+
export interface UiOrgQueryArgs extends UiOrgRenderArgs, UiQueryInput {
|
|
5646
|
+
}
|
|
5647
|
+
|
|
5644
5648
|
// @public
|
|
5645
5649
|
export interface UiOrgRenderArgs extends UiRenderArgsBase {
|
|
5646
5650
|
agentId?: string;
|
|
@@ -5686,6 +5690,10 @@ export type UiPartState = "aria-current" | "aria-selected" | "aria-expanded" | "
|
|
|
5686
5690
|
export interface UiPlatformActionArgs extends UiPlatformRenderArgs, UiActionInput {
|
|
5687
5691
|
}
|
|
5688
5692
|
|
|
5693
|
+
// @public
|
|
5694
|
+
export interface UiPlatformQueryArgs extends UiPlatformRenderArgs, UiQueryInput {
|
|
5695
|
+
}
|
|
5696
|
+
|
|
5689
5697
|
// @public
|
|
5690
5698
|
export interface UiPlatformRenderArgs extends UiRenderArgsBase {
|
|
5691
5699
|
agentId?: undefined;
|
|
@@ -5698,7 +5706,10 @@ export interface UiPlatformRenderArgs extends UiRenderArgsBase {
|
|
|
5698
5706
|
}
|
|
5699
5707
|
|
|
5700
5708
|
// @public
|
|
5701
|
-
export
|
|
5709
|
+
export type UiQueryArgs = UiOrgQueryArgs | UiPlatformQueryArgs;
|
|
5710
|
+
|
|
5711
|
+
// @public
|
|
5712
|
+
export interface UiQueryInput {
|
|
5702
5713
|
params: JsonValue;
|
|
5703
5714
|
query: string;
|
|
5704
5715
|
signal: AbortSignal;
|
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).
|