@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.
@@ -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.91";
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 interface UiQueryArgs extends UiOrgRenderArgs {
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 any org-scoped component slot (`org.page`, conversation and agent slots
465
- * alike). The result is JSON of at most `UI_LIMITS.componentQueryBytes` bytes and the call's
466
- * params at most `UI_LIMITS.componentQueryParamsBytes`. Push refresh reaches queries only
467
- * through org-stream invalidations (`invalidate({ orgId, contribution })` without a
468
- * `conversationId`): a conversation-scoped invalidation does not refetch them, so a component
469
- * in a conversation slot refetches through an action result's `invalidate` query names (or
470
- * its own `refetch`).
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
@@ -1,4 +1,4 @@
1
- export declare const SDK_VERSION = "0.1.0-rc.91";
1
+ export declare const SDK_VERSION = "0.1.0-rc.92";
2
2
  export * from "./agent-template.js";
3
3
  export * from "./agents-ctx.js";
4
4
  export * from "./avatar-presets.js";
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- export const SDK_VERSION = "0.1.0-rc.91";
1
+ export const SDK_VERSION = "0.1.0-rc.92";
2
2
  export * from "./agent-template.js";
3
3
  export * from "./agents-ctx.js";
4
4
  export * from "./avatar-presets.js";
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
- * The args of a `ctx.ui.query` handler: the org position of the call, the query id and its params
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).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capybara-hq/plugin-sdk",
3
- "version": "0.1.0-rc.91",
3
+ "version": "0.1.0-rc.92",
4
4
  "description": "Capybara plugin SDK: the types and pure functions plugins are written against",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {