@yaklabs-ai/plugin-protocol 0.52.0 → 0.52.1

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/README.md CHANGED
@@ -11,7 +11,7 @@ flow.
11
11
  ```json
12
12
  {
13
13
  "dependencies": {
14
- "@bonsai/plugin-protocol": "npm:@yaklabs-ai/plugin-protocol@^0.52.0"
14
+ "@bonsai/plugin-protocol": "npm:@yaklabs-ai/plugin-protocol@^0.52.1"
15
15
  }
16
16
  }
17
17
  ```
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "package": "@yaklabs-ai/plugin-protocol",
4
- "version": "0.52.0",
4
+ "version": "0.52.1",
5
5
  "target": "npm",
6
6
  "firstPartyLicense": "MIT",
7
7
  "bundled": [
package/dist/index.d.ts CHANGED
@@ -1837,6 +1837,7 @@ declare namespace authoringContributionSchemas {
1837
1837
  ReferencePresentationWords,
1838
1838
  ReferencePresentationContribution,
1839
1839
  KayUiAppHostCapability,
1840
+ UiAppCapabilityReference,
1840
1841
  UiAppCapabilities,
1841
1842
  UiRailEntryContribution,
1842
1843
  UiToastPreviewContribution,
@@ -3222,8 +3223,15 @@ declare const canonicalContributionSchemas: {
3222
3223
  "workspace.pane-header": "workspace.pane-header";
3223
3224
  "workspace.arrange": "workspace.arrange";
3224
3225
  }>;
3226
+ UiAppCapabilityReference: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
3227
+ pluginId: z.ZodString;
3228
+ localId: z.ZodString;
3229
+ }, z.core.$strict>]>;
3225
3230
  UiAppCapabilities: z.ZodObject<{
3226
- endpoints: z.ZodOptional<z.ZodArray<z.ZodString>>;
3231
+ endpoints: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
3232
+ pluginId: z.ZodString;
3233
+ localId: z.ZodString;
3234
+ }, z.core.$strict>]>>>;
3227
3235
  host: z.ZodOptional<z.ZodArray<z.ZodEnum<{
3228
3236
  "navigation.open-session": "navigation.open-session";
3229
3237
  "sessions.create": "sessions.create";
@@ -3241,7 +3249,10 @@ declare const canonicalContributionSchemas: {
3241
3249
  "workspace.pane-header": "workspace.pane-header";
3242
3250
  "workspace.arrange": "workspace.arrange";
3243
3251
  }>>>;
3244
- feeds: z.ZodOptional<z.ZodArray<z.ZodString>>;
3252
+ feeds: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
3253
+ pluginId: z.ZodString;
3254
+ localId: z.ZodString;
3255
+ }, z.core.$strict>]>>>;
3245
3256
  }, z.core.$strict>;
3246
3257
  UiRailEntryContribution: z.ZodObject<{
3247
3258
  id: z.ZodString;
@@ -3302,7 +3313,10 @@ declare const canonicalContributionSchemas: {
3302
3313
  styles: z.ZodOptional<z.ZodArray<z.ZodString>>;
3303
3314
  assets: z.ZodOptional<z.ZodArray<z.ZodString>>;
3304
3315
  capabilities: z.ZodOptional<z.ZodObject<{
3305
- endpoints: z.ZodOptional<z.ZodArray<z.ZodString>>;
3316
+ endpoints: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
3317
+ pluginId: z.ZodString;
3318
+ localId: z.ZodString;
3319
+ }, z.core.$strict>]>>>;
3306
3320
  host: z.ZodOptional<z.ZodArray<z.ZodEnum<{
3307
3321
  "navigation.open-session": "navigation.open-session";
3308
3322
  "sessions.create": "sessions.create";
@@ -3320,7 +3334,10 @@ declare const canonicalContributionSchemas: {
3320
3334
  "workspace.pane-header": "workspace.pane-header";
3321
3335
  "workspace.arrange": "workspace.arrange";
3322
3336
  }>>>;
3323
- feeds: z.ZodOptional<z.ZodArray<z.ZodString>>;
3337
+ feeds: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
3338
+ pluginId: z.ZodString;
3339
+ localId: z.ZodString;
3340
+ }, z.core.$strict>]>>>;
3324
3341
  }, z.core.$strict>>;
3325
3342
  }, z.core.$strict> | z.ZodPreprocess<z.ZodObject<{
3326
3343
  localId: z.ZodString;
@@ -3339,7 +3356,10 @@ declare const canonicalContributionSchemas: {
3339
3356
  styles: z.ZodOptional<z.ZodArray<z.ZodString>>;
3340
3357
  assets: z.ZodOptional<z.ZodArray<z.ZodString>>;
3341
3358
  capabilities: z.ZodOptional<z.ZodObject<{
3342
- endpoints: z.ZodOptional<z.ZodArray<z.ZodString>>;
3359
+ endpoints: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
3360
+ pluginId: z.ZodString;
3361
+ localId: z.ZodString;
3362
+ }, z.core.$strict>]>>>;
3343
3363
  host: z.ZodOptional<z.ZodArray<z.ZodEnum<{
3344
3364
  "navigation.open-session": "navigation.open-session";
3345
3365
  "sessions.create": "sessions.create";
@@ -3357,7 +3377,10 @@ declare const canonicalContributionSchemas: {
3357
3377
  "workspace.pane-header": "workspace.pane-header";
3358
3378
  "workspace.arrange": "workspace.arrange";
3359
3379
  }>>>;
3360
- feeds: z.ZodOptional<z.ZodArray<z.ZodString>>;
3380
+ feeds: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
3381
+ pluginId: z.ZodString;
3382
+ localId: z.ZodString;
3383
+ }, z.core.$strict>]>>>;
3361
3384
  }, z.core.$strict>>;
3362
3385
  }, z.core.$strict>, unknown>;
3363
3386
  ThemeContribution: z.ZodObject<{
@@ -4790,8 +4813,12 @@ export declare const KAY_PLUGIN_PROTOCOL_VERSION: "kay.plugin.v1";
4790
4813
  * contract remains served.
4791
4814
  *
4792
4815
  * 0.51.0 adds flag-dependent title, icon and panel presence on rail entries.
4816
+ *
4817
+ * 0.52.0 adds plugin-owned operational facts through existing manifests and registrations.
4818
+ *
4819
+ * 0.52.1 adds owner-qualified page feed and endpoint references and their kay.ui claims.
4793
4820
  */
4794
- export declare const KAY_PLUGIN_SDK_VERSION: "0.52.0";
4821
+ export declare const KAY_PLUGIN_SDK_VERSION: "0.52.1";
4795
4822
 
4796
4823
  export declare const KAY_PLUGIN_TARGET_NAMES: readonly ["kay.agent", "kay.app", "kay.ui"];
4797
4824
 
@@ -6696,7 +6723,10 @@ export declare const KayPluginManifestV1: z.ZodObject<{
6696
6723
  styles: z.ZodOptional<z.ZodArray<z.ZodString>>;
6697
6724
  assets: z.ZodOptional<z.ZodArray<z.ZodString>>;
6698
6725
  capabilities: z.ZodOptional<z.ZodObject<{
6699
- endpoints: z.ZodOptional<z.ZodArray<z.ZodString>>;
6726
+ endpoints: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
6727
+ pluginId: z.ZodString;
6728
+ localId: z.ZodString;
6729
+ }, z.core.$strict>]>>>;
6700
6730
  host: z.ZodOptional<z.ZodArray<z.ZodEnum<{
6701
6731
  "navigation.open-session": "navigation.open-session";
6702
6732
  "sessions.create": "sessions.create";
@@ -6714,7 +6744,10 @@ export declare const KayPluginManifestV1: z.ZodObject<{
6714
6744
  "workspace.pane-header": "workspace.pane-header";
6715
6745
  "workspace.arrange": "workspace.arrange";
6716
6746
  }>>>;
6717
- feeds: z.ZodOptional<z.ZodArray<z.ZodString>>;
6747
+ feeds: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
6748
+ pluginId: z.ZodString;
6749
+ localId: z.ZodString;
6750
+ }, z.core.$strict>]>>>;
6718
6751
  }, z.core.$strict>>;
6719
6752
  }, z.core.$strict> | z.ZodPreprocess<z.ZodObject<{
6720
6753
  localId: z.ZodString;
@@ -6733,7 +6766,10 @@ export declare const KayPluginManifestV1: z.ZodObject<{
6733
6766
  styles: z.ZodOptional<z.ZodArray<z.ZodString>>;
6734
6767
  assets: z.ZodOptional<z.ZodArray<z.ZodString>>;
6735
6768
  capabilities: z.ZodOptional<z.ZodObject<{
6736
- endpoints: z.ZodOptional<z.ZodArray<z.ZodString>>;
6769
+ endpoints: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
6770
+ pluginId: z.ZodString;
6771
+ localId: z.ZodString;
6772
+ }, z.core.$strict>]>>>;
6737
6773
  host: z.ZodOptional<z.ZodArray<z.ZodEnum<{
6738
6774
  "navigation.open-session": "navigation.open-session";
6739
6775
  "sessions.create": "sessions.create";
@@ -6751,7 +6787,10 @@ export declare const KayPluginManifestV1: z.ZodObject<{
6751
6787
  "workspace.pane-header": "workspace.pane-header";
6752
6788
  "workspace.arrange": "workspace.arrange";
6753
6789
  }>>>;
6754
- feeds: z.ZodOptional<z.ZodArray<z.ZodString>>;
6790
+ feeds: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
6791
+ pluginId: z.ZodString;
6792
+ localId: z.ZodString;
6793
+ }, z.core.$strict>]>>>;
6755
6794
  }, z.core.$strict>>;
6756
6795
  }, z.core.$strict>, unknown>>>;
6757
6796
  railEntries: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -8002,7 +8041,10 @@ export declare const KayUiTargetManifest: z.ZodObject<{
8002
8041
  styles: z.ZodOptional<z.ZodArray<z.ZodString>>;
8003
8042
  assets: z.ZodOptional<z.ZodArray<z.ZodString>>;
8004
8043
  capabilities: z.ZodOptional<z.ZodObject<{
8005
- endpoints: z.ZodOptional<z.ZodArray<z.ZodString>>;
8044
+ endpoints: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
8045
+ pluginId: z.ZodString;
8046
+ localId: z.ZodString;
8047
+ }, z.core.$strict>]>>>;
8006
8048
  host: z.ZodOptional<z.ZodArray<z.ZodEnum<{
8007
8049
  "navigation.open-session": "navigation.open-session";
8008
8050
  "sessions.create": "sessions.create";
@@ -8020,7 +8062,10 @@ export declare const KayUiTargetManifest: z.ZodObject<{
8020
8062
  "workspace.pane-header": "workspace.pane-header";
8021
8063
  "workspace.arrange": "workspace.arrange";
8022
8064
  }>>>;
8023
- feeds: z.ZodOptional<z.ZodArray<z.ZodString>>;
8065
+ feeds: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
8066
+ pluginId: z.ZodString;
8067
+ localId: z.ZodString;
8068
+ }, z.core.$strict>]>>>;
8024
8069
  }, z.core.$strict>>;
8025
8070
  }, z.core.$strict> | z.ZodPreprocess<z.ZodObject<{
8026
8071
  localId: z.ZodString;
@@ -8039,7 +8084,10 @@ export declare const KayUiTargetManifest: z.ZodObject<{
8039
8084
  styles: z.ZodOptional<z.ZodArray<z.ZodString>>;
8040
8085
  assets: z.ZodOptional<z.ZodArray<z.ZodString>>;
8041
8086
  capabilities: z.ZodOptional<z.ZodObject<{
8042
- endpoints: z.ZodOptional<z.ZodArray<z.ZodString>>;
8087
+ endpoints: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
8088
+ pluginId: z.ZodString;
8089
+ localId: z.ZodString;
8090
+ }, z.core.$strict>]>>>;
8043
8091
  host: z.ZodOptional<z.ZodArray<z.ZodEnum<{
8044
8092
  "navigation.open-session": "navigation.open-session";
8045
8093
  "sessions.create": "sessions.create";
@@ -8057,7 +8105,10 @@ export declare const KayUiTargetManifest: z.ZodObject<{
8057
8105
  "workspace.pane-header": "workspace.pane-header";
8058
8106
  "workspace.arrange": "workspace.arrange";
8059
8107
  }>>>;
8060
- feeds: z.ZodOptional<z.ZodArray<z.ZodString>>;
8108
+ feeds: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
8109
+ pluginId: z.ZodString;
8110
+ localId: z.ZodString;
8111
+ }, z.core.$strict>]>>>;
8061
8112
  }, z.core.$strict>>;
8062
8113
  }, z.core.$strict>, unknown>>>;
8063
8114
  railEntries: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -8317,7 +8368,7 @@ export declare function parseSemver(value: string): ParsedSemver | undefined;
8317
8368
  export declare function parseWhere(source: string, keyTypes?: WhereKeyTypes): WhereParseResult;
8318
8369
 
8319
8370
  /** Every capability slug {@link PluginCapabilityClaimV1} can express, for exhaustive table checks. */
8320
- export declare const PLUGIN_CAPABILITY_SLUGS: readonly ["sessions.run", "network.connect", "web-session.request", "web-session.download", "process.spawn", "sessions.read", "signals.read", "uri.call", "endpoints.invoke", "skills.read", "skills.write", "skills.share", "plugins.set-enabled", "sessions.annotate", "sessions.compact", "soul.write", "tools.describe", "workspace.command", "sessions.create", "sessions.update", "models.complete", "systemOne.use", "automations.write", "automations.run", "workflows.define", "workflows.signals", "session-events.subscribe", "agents.run", "dynamic-context.register", "app-data.register", "knowledge-source.register", "artifacts.read", "session-artifacts.read", "session-artifacts.create", "account.assert", "account.update", "agents.permissions", "tool-interception.register", "interaction.surface", "config.declare-section", "auth.own-service", "auth.shared-identity", "cli.bind", "mcp.host-server", "prompt.resident", "skills.declared-source", "whiteboard.discover", "whiteboard.read", "whiteboard.create", "whiteboard.update", "whiteboard.remove", "model-selection.register", "system-prompt.register"];
8371
+ export declare const PLUGIN_CAPABILITY_SLUGS: readonly ["sessions.run", "network.connect", "web-session.request", "web-session.download", "process.spawn", "sessions.read", "signals.read", "uri.call", "endpoints.invoke", "skills.read", "skills.write", "skills.share", "plugins.set-enabled", "sessions.annotate", "sessions.compact", "soul.write", "tools.describe", "workspace.command", "sessions.create", "sessions.update", "models.complete", "systemOne.use", "automations.write", "automations.run", "workflows.define", "workflows.signals", "session-events.subscribe", "agents.run", "dynamic-context.register", "app-data.register", "app-data.read", "knowledge-source.register", "artifacts.read", "session-artifacts.read", "session-artifacts.create", "account.assert", "account.update", "agents.permissions", "tool-interception.register", "interaction.surface", "config.declare-section", "auth.own-service", "auth.shared-identity", "cli.bind", "mcp.host-server", "prompt.resident", "skills.declared-source", "whiteboard.discover", "whiteboard.read", "whiteboard.create", "whiteboard.update", "whiteboard.remove", "model-selection.register", "system-prompt.register"];
8321
8372
 
8322
8373
  /** Diagnostic messages carry plugin-controlled text (parse errors, module errors); bound it so a
8323
8374
  * hostile or accidental multi-megabyte error can never blow up a log line or a render surface. */
@@ -8982,7 +9033,7 @@ export declare const PluginCapabilityClaimInputV1: z.ZodCustom<{
8982
9033
  verb: "search" | "read" | "list" | "write" | "edit" | "delete";
8983
9034
  };
8984
9035
  } | {
8985
- target: "kay.agent" | "kay.app";
9036
+ target: "kay.agent" | "kay.app" | "kay.ui";
8986
9037
  slug: "endpoints.invoke";
8987
9038
  envelope: {
8988
9039
  pluginId: string;
@@ -9070,6 +9121,13 @@ export declare const PluginCapabilityClaimInputV1: z.ZodCustom<{
9070
9121
  envelope: {
9071
9122
  contributor: string;
9072
9123
  };
9124
+ } | {
9125
+ target: "kay.ui";
9126
+ slug: "app-data.read";
9127
+ envelope: {
9128
+ pluginId: string;
9129
+ sourceId: string;
9130
+ };
9073
9131
  } | {
9074
9132
  target: "kay.app";
9075
9133
  slug: "app-data.register";
@@ -9249,7 +9307,7 @@ export declare const PluginCapabilityClaimInputV1: z.ZodCustom<{
9249
9307
  verb: "search" | "read" | "list" | "write" | "edit" | "delete";
9250
9308
  };
9251
9309
  } | {
9252
- target: "kay.agent" | "kay.app";
9310
+ target: "kay.agent" | "kay.app" | "kay.ui";
9253
9311
  slug: "endpoints.invoke";
9254
9312
  envelope: {
9255
9313
  pluginId: string;
@@ -9337,6 +9395,13 @@ export declare const PluginCapabilityClaimInputV1: z.ZodCustom<{
9337
9395
  envelope: {
9338
9396
  contributor: string;
9339
9397
  };
9398
+ } | {
9399
+ target: "kay.ui";
9400
+ slug: "app-data.read";
9401
+ envelope: {
9402
+ pluginId: string;
9403
+ sourceId: string;
9404
+ };
9340
9405
  } | {
9341
9406
  target: "kay.app";
9342
9407
  slug: "app-data.register";
@@ -9525,6 +9590,7 @@ export declare const PluginCapabilityClaimV1: z.ZodDiscriminatedUnion<[z.ZodObje
9525
9590
  target: z.ZodEnum<{
9526
9591
  "kay.agent": "kay.agent";
9527
9592
  "kay.app": "kay.app";
9593
+ "kay.ui": "kay.ui";
9528
9594
  }>;
9529
9595
  slug: z.ZodLiteral<"endpoints.invoke">;
9530
9596
  envelope: z.ZodObject<{
@@ -9613,6 +9679,13 @@ export declare const PluginCapabilityClaimV1: z.ZodDiscriminatedUnion<[z.ZodObje
9613
9679
  envelope: z.ZodObject<{
9614
9680
  contributor: z.ZodString;
9615
9681
  }, z.core.$strict>;
9682
+ }, z.core.$strict>, z.ZodObject<{
9683
+ target: z.ZodLiteral<"kay.ui">;
9684
+ slug: z.ZodLiteral<"app-data.read">;
9685
+ envelope: z.ZodObject<{
9686
+ pluginId: z.ZodString;
9687
+ sourceId: z.ZodString;
9688
+ }, z.core.$strict>;
9616
9689
  }, z.core.$strict>, z.ZodObject<{
9617
9690
  target: z.ZodLiteral<"kay.app">;
9618
9691
  slug: z.ZodLiteral<"app-data.register">;
@@ -9847,6 +9920,7 @@ export declare const PluginCapabilityDecisionV1: z.ZodDiscriminatedUnion<[z.ZodO
9847
9920
  target: z.ZodEnum<{
9848
9921
  "kay.agent": "kay.agent";
9849
9922
  "kay.app": "kay.app";
9923
+ "kay.ui": "kay.ui";
9850
9924
  }>;
9851
9925
  slug: z.ZodLiteral<"endpoints.invoke">;
9852
9926
  envelope: z.ZodObject<{
@@ -9935,6 +10009,13 @@ export declare const PluginCapabilityDecisionV1: z.ZodDiscriminatedUnion<[z.ZodO
9935
10009
  envelope: z.ZodObject<{
9936
10010
  contributor: z.ZodString;
9937
10011
  }, z.core.$strict>;
10012
+ }, z.core.$strict>, z.ZodObject<{
10013
+ target: z.ZodLiteral<"kay.ui">;
10014
+ slug: z.ZodLiteral<"app-data.read">;
10015
+ envelope: z.ZodObject<{
10016
+ pluginId: z.ZodString;
10017
+ sourceId: z.ZodString;
10018
+ }, z.core.$strict>;
9938
10019
  }, z.core.$strict>, z.ZodObject<{
9939
10020
  target: z.ZodLiteral<"kay.app">;
9940
10021
  slug: z.ZodLiteral<"app-data.register">;
@@ -10168,6 +10249,7 @@ export declare const PluginCapabilityDecisionV1: z.ZodDiscriminatedUnion<[z.ZodO
10168
10249
  target: z.ZodEnum<{
10169
10250
  "kay.agent": "kay.agent";
10170
10251
  "kay.app": "kay.app";
10252
+ "kay.ui": "kay.ui";
10171
10253
  }>;
10172
10254
  slug: z.ZodLiteral<"endpoints.invoke">;
10173
10255
  envelope: z.ZodObject<{
@@ -10256,6 +10338,13 @@ export declare const PluginCapabilityDecisionV1: z.ZodDiscriminatedUnion<[z.ZodO
10256
10338
  envelope: z.ZodObject<{
10257
10339
  contributor: z.ZodString;
10258
10340
  }, z.core.$strict>;
10341
+ }, z.core.$strict>, z.ZodObject<{
10342
+ target: z.ZodLiteral<"kay.ui">;
10343
+ slug: z.ZodLiteral<"app-data.read">;
10344
+ envelope: z.ZodObject<{
10345
+ pluginId: z.ZodString;
10346
+ sourceId: z.ZodString;
10347
+ }, z.core.$strict>;
10259
10348
  }, z.core.$strict>, z.ZodObject<{
10260
10349
  target: z.ZodLiteral<"kay.app">;
10261
10350
  slug: z.ZodLiteral<"app-data.register">;
@@ -10523,6 +10612,7 @@ export declare const PluginCapabilityRefusalV1: z.ZodObject<{
10523
10612
  target: z.ZodEnum<{
10524
10613
  "kay.agent": "kay.agent";
10525
10614
  "kay.app": "kay.app";
10615
+ "kay.ui": "kay.ui";
10526
10616
  }>;
10527
10617
  slug: z.ZodLiteral<"endpoints.invoke">;
10528
10618
  envelope: z.ZodObject<{
@@ -10611,6 +10701,13 @@ export declare const PluginCapabilityRefusalV1: z.ZodObject<{
10611
10701
  envelope: z.ZodObject<{
10612
10702
  contributor: z.ZodString;
10613
10703
  }, z.core.$strict>;
10704
+ }, z.core.$strict>, z.ZodObject<{
10705
+ target: z.ZodLiteral<"kay.ui">;
10706
+ slug: z.ZodLiteral<"app-data.read">;
10707
+ envelope: z.ZodObject<{
10708
+ pluginId: z.ZodString;
10709
+ sourceId: z.ZodString;
10710
+ }, z.core.$strict>;
10614
10711
  }, z.core.$strict>, z.ZodObject<{
10615
10712
  target: z.ZodLiteral<"kay.app">;
10616
10713
  slug: z.ZodLiteral<"app-data.register">;
@@ -13049,10 +13146,13 @@ export declare const ResolvedKayUiApp: z.ZodObject<{
13049
13146
  styles: z.ZodOptional<z.ZodArray<z.ZodString>>;
13050
13147
  assets: z.ZodOptional<z.ZodArray<z.ZodString>>;
13051
13148
  capabilities: z.ZodOptional<z.ZodObject<{
13052
- endpoints: z.ZodOptional<z.ZodArray<z.ZodObject<{
13149
+ endpoints: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
13053
13150
  localId: z.ZodString;
13054
13151
  globalId: z.ZodString;
13055
- }, z.core.$strict>>>;
13152
+ }, z.core.$strict>, z.ZodObject<{
13153
+ pluginId: z.ZodString;
13154
+ localId: z.ZodString;
13155
+ }, z.core.$strict>]>>>;
13056
13156
  host: z.ZodOptional<z.ZodArray<z.ZodEnum<{
13057
13157
  "navigation.open-session": "navigation.open-session";
13058
13158
  "sessions.create": "sessions.create";
@@ -13070,16 +13170,22 @@ export declare const ResolvedKayUiApp: z.ZodObject<{
13070
13170
  "workspace.pane-header": "workspace.pane-header";
13071
13171
  "workspace.arrange": "workspace.arrange";
13072
13172
  }>>>;
13073
- feeds: z.ZodOptional<z.ZodArray<z.ZodString>>;
13173
+ feeds: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
13174
+ pluginId: z.ZodString;
13175
+ localId: z.ZodString;
13176
+ }, z.core.$strict>]>>>;
13074
13177
  }, z.core.$strict>>;
13075
13178
  }, z.core.$strict>;
13076
13179
 
13077
13180
  export declare type ResolvedKayUiApp = z.infer<typeof ResolvedKayUiApp>;
13078
13181
 
13079
- export declare const ResolvedKayUiAppEndpointCapability: z.ZodObject<{
13182
+ export declare const ResolvedKayUiAppEndpointCapability: z.ZodUnion<readonly [z.ZodObject<{
13080
13183
  localId: z.ZodString;
13081
13184
  globalId: z.ZodString;
13082
- }, z.core.$strict>;
13185
+ }, z.core.$strict>, z.ZodObject<{
13186
+ pluginId: z.ZodString;
13187
+ localId: z.ZodString;
13188
+ }, z.core.$strict>]>;
13083
13189
 
13084
13190
  export declare type ResolvedKayUiAppEndpointCapability = z.infer<typeof ResolvedKayUiAppEndpointCapability>;
13085
13191
 
@@ -14681,10 +14787,13 @@ export declare const ResolvedPluginContractV1: z.ZodObject<{
14681
14787
  styles: z.ZodOptional<z.ZodArray<z.ZodString>>;
14682
14788
  assets: z.ZodOptional<z.ZodArray<z.ZodString>>;
14683
14789
  capabilities: z.ZodOptional<z.ZodObject<{
14684
- endpoints: z.ZodOptional<z.ZodArray<z.ZodObject<{
14790
+ endpoints: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
14685
14791
  localId: z.ZodString;
14686
14792
  globalId: z.ZodString;
14687
- }, z.core.$strict>>>;
14793
+ }, z.core.$strict>, z.ZodObject<{
14794
+ pluginId: z.ZodString;
14795
+ localId: z.ZodString;
14796
+ }, z.core.$strict>]>>>;
14688
14797
  host: z.ZodOptional<z.ZodArray<z.ZodEnum<{
14689
14798
  "navigation.open-session": "navigation.open-session";
14690
14799
  "sessions.create": "sessions.create";
@@ -14702,7 +14811,10 @@ export declare const ResolvedPluginContractV1: z.ZodObject<{
14702
14811
  "workspace.pane-header": "workspace.pane-header";
14703
14812
  "workspace.arrange": "workspace.arrange";
14704
14813
  }>>>;
14705
- feeds: z.ZodOptional<z.ZodArray<z.ZodString>>;
14814
+ feeds: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
14815
+ pluginId: z.ZodString;
14816
+ localId: z.ZodString;
14817
+ }, z.core.$strict>]>>>;
14706
14818
  }, z.core.$strict>>;
14707
14819
  }, z.core.$strict>>>;
14708
14820
  }, z.core.$strict>;
@@ -16559,7 +16671,10 @@ export declare interface TurnPacketMessage {
16559
16671
  }
16560
16672
 
16561
16673
  export declare const UiAppCapabilities: z.ZodObject<{
16562
- endpoints: z.ZodOptional<z.ZodArray<z.ZodString>>;
16674
+ endpoints: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
16675
+ pluginId: z.ZodString;
16676
+ localId: z.ZodString;
16677
+ }, z.core.$strict>]>>>;
16563
16678
  host: z.ZodOptional<z.ZodArray<z.ZodEnum<{
16564
16679
  "navigation.open-session": "navigation.open-session";
16565
16680
  "sessions.create": "sessions.create";
@@ -16577,11 +16692,21 @@ export declare const UiAppCapabilities: z.ZodObject<{
16577
16692
  "workspace.pane-header": "workspace.pane-header";
16578
16693
  "workspace.arrange": "workspace.arrange";
16579
16694
  }>>>;
16580
- feeds: z.ZodOptional<z.ZodArray<z.ZodString>>;
16695
+ feeds: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
16696
+ pluginId: z.ZodString;
16697
+ localId: z.ZodString;
16698
+ }, z.core.$strict>]>>>;
16581
16699
  }, z.core.$strict>;
16582
16700
 
16583
16701
  export declare type UiAppCapabilities = z.infer<typeof UiAppCapabilities>;
16584
16702
 
16703
+ export declare const UiAppCapabilityReference: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
16704
+ pluginId: z.ZodString;
16705
+ localId: z.ZodString;
16706
+ }, z.core.$strict>]>;
16707
+
16708
+ export declare type UiAppCapabilityReference = z.infer<typeof UiAppCapabilityReference>;
16709
+
16585
16710
  export declare const UiAppContribution: z.ZodObject<{
16586
16711
  localId: z.ZodString;
16587
16712
  displayName: z.ZodString;
@@ -16599,7 +16724,10 @@ export declare const UiAppContribution: z.ZodObject<{
16599
16724
  styles: z.ZodOptional<z.ZodArray<z.ZodString>>;
16600
16725
  assets: z.ZodOptional<z.ZodArray<z.ZodString>>;
16601
16726
  capabilities: z.ZodOptional<z.ZodObject<{
16602
- endpoints: z.ZodOptional<z.ZodArray<z.ZodString>>;
16727
+ endpoints: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
16728
+ pluginId: z.ZodString;
16729
+ localId: z.ZodString;
16730
+ }, z.core.$strict>]>>>;
16603
16731
  host: z.ZodOptional<z.ZodArray<z.ZodEnum<{
16604
16732
  "navigation.open-session": "navigation.open-session";
16605
16733
  "sessions.create": "sessions.create";
@@ -16617,7 +16745,10 @@ export declare const UiAppContribution: z.ZodObject<{
16617
16745
  "workspace.pane-header": "workspace.pane-header";
16618
16746
  "workspace.arrange": "workspace.arrange";
16619
16747
  }>>>;
16620
- feeds: z.ZodOptional<z.ZodArray<z.ZodString>>;
16748
+ feeds: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
16749
+ pluginId: z.ZodString;
16750
+ localId: z.ZodString;
16751
+ }, z.core.$strict>]>>>;
16621
16752
  }, z.core.$strict>>;
16622
16753
  }, z.core.$strict> | z.ZodPreprocess<z.ZodObject<{
16623
16754
  localId: z.ZodString;
@@ -16636,7 +16767,10 @@ export declare const UiAppContribution: z.ZodObject<{
16636
16767
  styles: z.ZodOptional<z.ZodArray<z.ZodString>>;
16637
16768
  assets: z.ZodOptional<z.ZodArray<z.ZodString>>;
16638
16769
  capabilities: z.ZodOptional<z.ZodObject<{
16639
- endpoints: z.ZodOptional<z.ZodArray<z.ZodString>>;
16770
+ endpoints: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
16771
+ pluginId: z.ZodString;
16772
+ localId: z.ZodString;
16773
+ }, z.core.$strict>]>>>;
16640
16774
  host: z.ZodOptional<z.ZodArray<z.ZodEnum<{
16641
16775
  "navigation.open-session": "navigation.open-session";
16642
16776
  "sessions.create": "sessions.create";
@@ -16654,7 +16788,10 @@ export declare const UiAppContribution: z.ZodObject<{
16654
16788
  "workspace.pane-header": "workspace.pane-header";
16655
16789
  "workspace.arrange": "workspace.arrange";
16656
16790
  }>>>;
16657
- feeds: z.ZodOptional<z.ZodArray<z.ZodString>>;
16791
+ feeds: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
16792
+ pluginId: z.ZodString;
16793
+ localId: z.ZodString;
16794
+ }, z.core.$strict>]>>>;
16658
16795
  }, z.core.$strict>>;
16659
16796
  }, z.core.$strict>, unknown>;
16660
16797
 
package/dist/index.js CHANGED
@@ -266,8 +266,9 @@ var JsonSchema = z4.record(z4.string(), JsonValue);
266
266
  var KAY_PLUGIN_MANIFEST_SIZE_CAP_BYTES = 1024 * 1024;
267
267
  var KAY_PLUGIN_PROTOCOL_VERSION = "kay.plugin.v1";
268
268
  var KAY_PLUGIN_PROTOCOL_PACKAGE_NAME = "@bonsai/plugin-protocol";
269
- var KAY_PLUGIN_SDK_VERSION = "0.52.0";
269
+ var KAY_PLUGIN_SDK_VERSION = "0.52.1";
270
270
  var KAY_PLUGIN_COMPATIBLE_SDK_VERSIONS = [
271
+ "0.52.0",
271
272
  "0.51.0",
272
273
  "0.50.0",
273
274
  "0.49.0"
@@ -1822,6 +1823,7 @@ var PLUGIN_CAPABILITY_SLUGS = [
1822
1823
  "agents.run",
1823
1824
  "dynamic-context.register",
1824
1825
  "app-data.register",
1826
+ "app-data.read",
1825
1827
  "knowledge-source.register",
1826
1828
  "artifacts.read",
1827
1829
  "session-artifacts.read",
@@ -1965,7 +1967,7 @@ function createAuthoritySchemas(canonical) {
1965
1967
  })
1966
1968
  }),
1967
1969
  z11.strictObject({
1968
- target: z11.enum(["kay.agent", "kay.app"]),
1970
+ target: z11.enum(["kay.agent", "kay.app", "kay.ui"]),
1969
1971
  slug: z11.literal("endpoints.invoke"),
1970
1972
  envelope: z11.strictObject({
1971
1973
  pluginId: PluginId2,
@@ -2108,6 +2110,14 @@ function createAuthoritySchemas(canonical) {
2108
2110
  // section tag at the model boundary - so the row a human consents to names the section.
2109
2111
  envelope: z11.strictObject({ contributor: NonEmptyString3 })
2110
2112
  }),
2113
+ z11.strictObject({
2114
+ target: z11.literal("kay.ui"),
2115
+ slug: z11.literal("app-data.read"),
2116
+ envelope: z11.strictObject({
2117
+ pluginId: PluginId2,
2118
+ sourceId: LocalContributionId2
2119
+ })
2120
+ }),
2111
2121
  z11.strictObject({
2112
2122
  target: z11.literal("kay.app"),
2113
2123
  slug: z11.literal("app-data.register"),
@@ -2361,6 +2371,8 @@ function sameClaim(a, b) {
2361
2371
  return b.slug === a.slug && a.envelope.kind === b.envelope.kind;
2362
2372
  case "knowledge-source.register":
2363
2373
  return b.slug === "knowledge-source.register" && a.envelope.source === b.envelope.source;
2374
+ case "app-data.read":
2375
+ return b.slug === "app-data.read" && a.envelope.pluginId === b.envelope.pluginId && a.envelope.sourceId === b.envelope.sourceId;
2364
2376
  case "app-data.register":
2365
2377
  return b.slug === "app-data.register" && a.envelope.source === b.envelope.source;
2366
2378
  case "agents.permissions":
@@ -2462,6 +2474,11 @@ function envelopePairs(a, b) {
2462
2474
  return b.slug === a.slug ? [[a.envelope.kind, b.envelope.kind]] : [];
2463
2475
  case "knowledge-source.register":
2464
2476
  return b.slug === "knowledge-source.register" ? [[a.envelope.source, b.envelope.source]] : [];
2477
+ case "app-data.read":
2478
+ return b.slug === "app-data.read" ? [
2479
+ [a.envelope.pluginId, b.envelope.pluginId],
2480
+ [a.envelope.sourceId, b.envelope.sourceId]
2481
+ ] : [];
2465
2482
  case "app-data.register":
2466
2483
  return b.slug === "app-data.register" ? [[a.envelope.source, b.envelope.source]] : [];
2467
2484
  case "agents.permissions":
@@ -2864,6 +2881,7 @@ __export(contributions_exports, {
2864
2881
  ToolContribution: () => ToolContribution,
2865
2882
  ToolPermission: () => ToolPermission,
2866
2883
  UiAppCapabilities: () => UiAppCapabilities,
2884
+ UiAppCapabilityReference: () => UiAppCapabilityReference,
2867
2885
  UiAppContribution: () => UiAppContribution,
2868
2886
  UiCommandContribution: () => UiCommandContribution,
2869
2887
  UiEventSubscriptionContribution: () => UiEventSubscriptionContribution,
@@ -4349,24 +4367,29 @@ function createContributionsSchemas(canonical) {
4349
4367
  // rearrange the workspace but never remove something the user would have to notice going missing.
4350
4368
  "workspace.arrange"
4351
4369
  ]);
4370
+ const UiAppCapabilityReference2 = z13.union([
4371
+ LocalContributionId2,
4372
+ z13.strictObject({ pluginId: PluginId2, localId: LocalContributionId2 })
4373
+ ]);
4352
4374
  const UiAppCapabilities2 = z13.strictObject({
4353
- endpoints: z13.array(LocalContributionId2).optional(),
4375
+ endpoints: z13.array(UiAppCapabilityReference2).optional(),
4354
4376
  host: z13.array(KayUiAppHostCapability2).optional(),
4355
- // The feeds this app's pages read with `useBonsaiFeed`. A name means this plugin's own
4356
- // `kay.app` data source if it declares one, otherwise the feed the daemon publishes.
4357
- feeds: z13.array(LocalContributionId2).optional()
4377
+ // A local name selects this plugin's source first, otherwise the daemon's.
4378
+ // An explicit reference selects only the named plugin.
4379
+ feeds: z13.array(UiAppCapabilityReference2).optional()
4358
4380
  }).superRefine((capabilities, ctx) => {
4359
4381
  for (const field of ["endpoints", "host", "feeds"]) {
4360
4382
  const seen = /* @__PURE__ */ new Set();
4361
4383
  for (const [index, value] of (capabilities[field] ?? []).entries()) {
4362
- if (seen.has(value)) {
4384
+ const key = typeof value === "string" ? value : JSON.stringify([value.pluginId, value.localId]);
4385
+ if (seen.has(key)) {
4363
4386
  ctx.addIssue({
4364
4387
  code: "custom",
4365
4388
  path: [field, index],
4366
- message: `duplicate ui app ${field} capability ${value}`
4389
+ message: `duplicate ui app ${field} capability ${key}`
4367
4390
  });
4368
4391
  }
4369
- seen.add(value);
4392
+ seen.add(key);
4370
4393
  }
4371
4394
  }
4372
4395
  });
@@ -4558,6 +4581,7 @@ function createContributionsSchemas(canonical) {
4558
4581
  ReferencePresentationWords: ReferencePresentationWords2,
4559
4582
  ReferencePresentationContribution: ReferencePresentationContribution2,
4560
4583
  KayUiAppHostCapability: KayUiAppHostCapability2,
4584
+ UiAppCapabilityReference: UiAppCapabilityReference2,
4561
4585
  UiAppCapabilities: UiAppCapabilities2,
4562
4586
  UiRailEntryContribution: UiRailEntryContribution2,
4563
4587
  UiToastPreviewContribution: UiToastPreviewContribution2,
@@ -4569,7 +4593,7 @@ function createContributionsSchemas(canonical) {
4569
4593
  PluginContributionKind: PluginContributionKind2
4570
4594
  };
4571
4595
  }
4572
- var { ApprovalCardForm, ApprovalCardStoredForm, ApprovalTypeContribution, UriModuleFacts, ToolContribution, ToolPermission, AgentToolContribution, ConverterContribution, UriModuleContribution, AppUriModuleContribution, AppDataSourceContribution, WhiteboardTypeStorage, WhiteboardTypeContribution, AppDataMaterializerContribution, ArtifactUriModuleContribution, CliBindingContribution, GitHostContribution, ResourceContribution, SkillContribution, PluginSkillSourceDeclaration, SearchProviderContribution, InteractionDriverContribution, EntityResolverContribution, AgentRenderContribution, EndpointContribution, PluginCardContribution, WorkflowContribution, McpServerUrl, McpServerAuthMode, McpServerContribution, McpServerContributions, AppEventSubscription, ContextContributorContribution, PluginEventDefinitionContribution, PluginNotificationRuleContribution, PluginProductEventContribution, UiEventSubscriptionContribution, DeviceDelegationContribution, SessionReaderContribution, UiCommandContribution, UiSlotContribution, ReferenceOpenBehavior, ReferencePresentationVariant, ReferencePresentationVariants, ReferencePresentationUriPattern, ReferencePresentationUrlClaim, ReferencePresentationTooltip, ReferencePresentationAddress, ReferencePresentationAccountLinks, ReferencePresentationWords, ReferencePresentationContribution, KayUiAppHostCapability, UiAppCapabilities, UiRailEntryContribution, UiToastPreviewContribution, UiPageContribution, UiAppContribution, ThemeContribution, CommandHandler, CommandContribution, PluginContributionKind } = createContributionsSchemas(false);
4596
+ var { ApprovalCardForm, ApprovalCardStoredForm, ApprovalTypeContribution, UriModuleFacts, ToolContribution, ToolPermission, AgentToolContribution, ConverterContribution, UriModuleContribution, AppUriModuleContribution, AppDataSourceContribution, WhiteboardTypeStorage, WhiteboardTypeContribution, AppDataMaterializerContribution, ArtifactUriModuleContribution, CliBindingContribution, GitHostContribution, ResourceContribution, SkillContribution, PluginSkillSourceDeclaration, SearchProviderContribution, InteractionDriverContribution, EntityResolverContribution, AgentRenderContribution, EndpointContribution, PluginCardContribution, WorkflowContribution, McpServerUrl, McpServerAuthMode, McpServerContribution, McpServerContributions, AppEventSubscription, ContextContributorContribution, PluginEventDefinitionContribution, PluginNotificationRuleContribution, PluginProductEventContribution, UiEventSubscriptionContribution, DeviceDelegationContribution, SessionReaderContribution, UiCommandContribution, UiSlotContribution, ReferenceOpenBehavior, ReferencePresentationVariant, ReferencePresentationVariants, ReferencePresentationUriPattern, ReferencePresentationUrlClaim, ReferencePresentationTooltip, ReferencePresentationAddress, ReferencePresentationAccountLinks, ReferencePresentationWords, ReferencePresentationContribution, KayUiAppHostCapability, UiAppCapabilityReference, UiAppCapabilities, UiRailEntryContribution, UiToastPreviewContribution, UiPageContribution, UiAppContribution, ThemeContribution, CommandHandler, CommandContribution, PluginContributionKind } = createContributionsSchemas(false);
4573
4597
  var canonicalContributionSchemas = createContributionsSchemas(true);
4574
4598
  var UI_APP_SOURCE_MODULE = /\.(?:tsx|ts|jsx)$/;
4575
4599
  function isUiAppSourceModule(module) {
@@ -6007,6 +6031,8 @@ function createManifestSchemas(canonical) {
6007
6031
  "endpoints",
6008
6032
  endpointIndex
6009
6033
  ];
6034
+ if (typeof endpoint !== "string")
6035
+ continue;
6010
6036
  if (!endpointIds.has(endpoint)) {
6011
6037
  ctx.addIssue({
6012
6038
  code: "custom",
@@ -6636,10 +6662,13 @@ function createResolvedContractSchemas(canonical) {
6636
6662
  /** The service's browser half, when the manifest declares one. */
6637
6663
  webSession: ResolvedPluginWebSession2.optional()
6638
6664
  });
6639
- const ResolvedKayUiAppEndpointCapability2 = z17.strictObject({
6640
- localId: LocalContributionId2,
6641
- globalId: GlobalContributionId2
6642
- });
6665
+ const ResolvedKayUiAppEndpointCapability2 = z17.union([
6666
+ z17.strictObject({
6667
+ localId: LocalContributionId2,
6668
+ globalId: GlobalContributionId2
6669
+ }),
6670
+ z17.strictObject({ pluginId: PluginId2, localId: LocalContributionId2 })
6671
+ ]);
6643
6672
  const ResolvedKayUiApp2 = z17.strictObject({
6644
6673
  localId: LocalContributionId2,
6645
6674
  globalId: GlobalContributionId2,
@@ -6655,7 +6684,7 @@ function createResolvedContractSchemas(canonical) {
6655
6684
  capabilities: z17.strictObject({
6656
6685
  endpoints: z17.array(ResolvedKayUiAppEndpointCapability2).optional(),
6657
6686
  host: z17.array(KayUiAppHostCapability2).optional(),
6658
- feeds: z17.array(LocalContributionId2).optional()
6687
+ feeds: z17.array((canonical ? canonicalContributionSchemas : contributions_exports).UiAppCapabilityReference).optional()
6659
6688
  }).optional()
6660
6689
  });
6661
6690
  const ResolvedPluginContractV12 = z17.strictObject({
@@ -7208,10 +7237,10 @@ function resolveKayPluginContractV1(manifest) {
7208
7237
  ...app.capabilities === void 0 ? {} : {
7209
7238
  capabilities: {
7210
7239
  ...app.capabilities.endpoints === void 0 ? {} : {
7211
- endpoints: app.capabilities.endpoints.map((endpoint) => ({
7240
+ endpoints: app.capabilities.endpoints.map((endpoint) => typeof endpoint === "string" ? {
7212
7241
  localId: endpoint,
7213
7242
  globalId: resolveGlobalContributionId(namespace, endpoint)
7214
- }))
7243
+ } : endpoint)
7215
7244
  },
7216
7245
  ...app.capabilities.host === void 0 ? {} : { host: [...app.capabilities.host] },
7217
7246
  ...app.capabilities.feeds === void 0 ? {} : { feeds: [...app.capabilities.feeds] }
@@ -8288,6 +8317,7 @@ export {
8288
8317
  ToolContribution,
8289
8318
  ToolPermission,
8290
8319
  UiAppCapabilities,
8320
+ UiAppCapabilityReference,
8291
8321
  UiAppContribution,
8292
8322
  UiCommandContribution,
8293
8323
  UiEventSubscriptionContribution,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yaklabs-ai/plugin-protocol",
3
- "version": "0.52.0",
3
+ "version": "0.52.1",
4
4
  "description": "The Kay plugin manifest schema (`kay.plugin.v1`) — parse and validate a kay-plugin.json.",
5
5
  "author": "YakLabs",
6
6
  "type": "module",