@yaklabs-ai/plugin-protocol 0.39.0 → 0.41.0

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.39.0"
14
+ "@bonsai/plugin-protocol": "npm:@yaklabs-ai/plugin-protocol@^0.41.0"
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.39.0",
4
+ "version": "0.41.0",
5
5
  "target": "npm",
6
6
  "firstPartyLicense": "MIT",
7
7
  "bundled": [],
package/dist/index.d.ts CHANGED
@@ -2807,11 +2807,7 @@ declare const canonicalContributionSchemas: {
2807
2807
  "artifacts.read": "artifacts.read";
2808
2808
  "artifacts.preview": "artifacts.preview";
2809
2809
  "markdown.document-view": "markdown.document-view";
2810
- "cost.read": "cost.read";
2811
2810
  "billing.read": "billing.read";
2812
- "skills.read": "skills.read";
2813
- "memory.read": "memory.read";
2814
- "self-improvement.read": "self-improvement.read";
2815
2811
  "automations.read": "automations.read";
2816
2812
  "automations.run": "automations.run";
2817
2813
  "shared-artifacts.read": "shared-artifacts.read";
@@ -2827,11 +2823,7 @@ declare const canonicalContributionSchemas: {
2827
2823
  "artifacts.read": "artifacts.read";
2828
2824
  "artifacts.preview": "artifacts.preview";
2829
2825
  "markdown.document-view": "markdown.document-view";
2830
- "cost.read": "cost.read";
2831
2826
  "billing.read": "billing.read";
2832
- "skills.read": "skills.read";
2833
- "memory.read": "memory.read";
2834
- "self-improvement.read": "self-improvement.read";
2835
2827
  "automations.read": "automations.read";
2836
2828
  "automations.run": "automations.run";
2837
2829
  "shared-artifacts.read": "shared-artifacts.read";
@@ -2839,6 +2831,7 @@ declare const canonicalContributionSchemas: {
2839
2831
  "workspace.pane-header": "workspace.pane-header";
2840
2832
  "workspace.arrange": "workspace.arrange";
2841
2833
  }>>>;
2834
+ feeds: z.ZodOptional<z.ZodArray<z.ZodString>>;
2842
2835
  }, z.core.$strict>;
2843
2836
  UiRailEntryContribution: z.ZodObject<{
2844
2837
  id: z.ZodString;
@@ -2900,11 +2893,7 @@ declare const canonicalContributionSchemas: {
2900
2893
  "artifacts.read": "artifacts.read";
2901
2894
  "artifacts.preview": "artifacts.preview";
2902
2895
  "markdown.document-view": "markdown.document-view";
2903
- "cost.read": "cost.read";
2904
2896
  "billing.read": "billing.read";
2905
- "skills.read": "skills.read";
2906
- "memory.read": "memory.read";
2907
- "self-improvement.read": "self-improvement.read";
2908
2897
  "automations.read": "automations.read";
2909
2898
  "automations.run": "automations.run";
2910
2899
  "shared-artifacts.read": "shared-artifacts.read";
@@ -2912,6 +2901,7 @@ declare const canonicalContributionSchemas: {
2912
2901
  "workspace.pane-header": "workspace.pane-header";
2913
2902
  "workspace.arrange": "workspace.arrange";
2914
2903
  }>>>;
2904
+ feeds: z.ZodOptional<z.ZodArray<z.ZodString>>;
2915
2905
  }, z.core.$strict>>;
2916
2906
  }, z.core.$strict> | z.ZodPreprocess<z.ZodObject<{
2917
2907
  localId: z.ZodString;
@@ -2937,11 +2927,7 @@ declare const canonicalContributionSchemas: {
2937
2927
  "artifacts.read": "artifacts.read";
2938
2928
  "artifacts.preview": "artifacts.preview";
2939
2929
  "markdown.document-view": "markdown.document-view";
2940
- "cost.read": "cost.read";
2941
2930
  "billing.read": "billing.read";
2942
- "skills.read": "skills.read";
2943
- "memory.read": "memory.read";
2944
- "self-improvement.read": "self-improvement.read";
2945
2931
  "automations.read": "automations.read";
2946
2932
  "automations.run": "automations.run";
2947
2933
  "shared-artifacts.read": "shared-artifacts.read";
@@ -2949,6 +2935,7 @@ declare const canonicalContributionSchemas: {
2949
2935
  "workspace.pane-header": "workspace.pane-header";
2950
2936
  "workspace.arrange": "workspace.arrange";
2951
2937
  }>>>;
2938
+ feeds: z.ZodOptional<z.ZodArray<z.ZodString>>;
2952
2939
  }, z.core.$strict>>;
2953
2940
  }, z.core.$strict>, unknown>;
2954
2941
  ThemeContribution: z.ZodObject<{
@@ -4243,8 +4230,17 @@ export declare const KAY_PLUGIN_PROTOCOL_VERSION: "kay.plugin.v1";
4243
4230
  * 0.39.0 lets a plugin word its own addresses (#15750). A reference presentation gains `words`, and
4244
4231
  * `open` and `resourceKind` become an optional pair, so a module can name its rows, tallies and live
4245
4232
  * phrases without its addresses opening. Additive. A plugin that declares words declares ^0.39.0.
4233
+ *
4234
+ * 0.40.0 lets a `kay.ui` app list the feeds it reads (#15909). `capabilities.feeds` names each one,
4235
+ * resolved at load to the plugin's own feed by that name or otherwise the daemon's, and a session
4236
+ * feed may now declare a `store`. It removes the `cost.read`, `skills.read`, `memory.read` and
4237
+ * `self-improvement.read` host capabilities, so a manifest still listing one no longer parses and
4238
+ * lists the feed instead. A plugin that lists feeds declares ^0.40.0.
4239
+ *
4240
+ * 0.41.0 adds app.mcp.callTool for background calls to a plugin's own manifest-declared MCP
4241
+ * servers, using Bonsai's managed connection without a session or working directory (#16172).
4246
4242
  */
4247
- export declare const KAY_PLUGIN_SDK_VERSION: "0.39.0";
4243
+ export declare const KAY_PLUGIN_SDK_VERSION: "0.41.0";
4248
4244
 
4249
4245
  export declare const KAY_PLUGIN_TARGET_NAMES: readonly ["kay.agent", "kay.app", "kay.ui"];
4250
4246
 
@@ -5844,11 +5840,7 @@ export declare const KayPluginManifestV1: z.ZodObject<{
5844
5840
  "artifacts.read": "artifacts.read";
5845
5841
  "artifacts.preview": "artifacts.preview";
5846
5842
  "markdown.document-view": "markdown.document-view";
5847
- "cost.read": "cost.read";
5848
5843
  "billing.read": "billing.read";
5849
- "skills.read": "skills.read";
5850
- "memory.read": "memory.read";
5851
- "self-improvement.read": "self-improvement.read";
5852
5844
  "automations.read": "automations.read";
5853
5845
  "automations.run": "automations.run";
5854
5846
  "shared-artifacts.read": "shared-artifacts.read";
@@ -5856,6 +5848,7 @@ export declare const KayPluginManifestV1: z.ZodObject<{
5856
5848
  "workspace.pane-header": "workspace.pane-header";
5857
5849
  "workspace.arrange": "workspace.arrange";
5858
5850
  }>>>;
5851
+ feeds: z.ZodOptional<z.ZodArray<z.ZodString>>;
5859
5852
  }, z.core.$strict>>;
5860
5853
  }, z.core.$strict> | z.ZodPreprocess<z.ZodObject<{
5861
5854
  localId: z.ZodString;
@@ -5881,11 +5874,7 @@ export declare const KayPluginManifestV1: z.ZodObject<{
5881
5874
  "artifacts.read": "artifacts.read";
5882
5875
  "artifacts.preview": "artifacts.preview";
5883
5876
  "markdown.document-view": "markdown.document-view";
5884
- "cost.read": "cost.read";
5885
5877
  "billing.read": "billing.read";
5886
- "skills.read": "skills.read";
5887
- "memory.read": "memory.read";
5888
- "self-improvement.read": "self-improvement.read";
5889
5878
  "automations.read": "automations.read";
5890
5879
  "automations.run": "automations.run";
5891
5880
  "shared-artifacts.read": "shared-artifacts.read";
@@ -5893,6 +5882,7 @@ export declare const KayPluginManifestV1: z.ZodObject<{
5893
5882
  "workspace.pane-header": "workspace.pane-header";
5894
5883
  "workspace.arrange": "workspace.arrange";
5895
5884
  }>>>;
5885
+ feeds: z.ZodOptional<z.ZodArray<z.ZodString>>;
5896
5886
  }, z.core.$strict>>;
5897
5887
  }, z.core.$strict>, unknown>>>;
5898
5888
  railEntries: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -6752,11 +6742,7 @@ export declare const KayUiAppHostCapability: z.ZodEnum<{
6752
6742
  "artifacts.read": "artifacts.read";
6753
6743
  "artifacts.preview": "artifacts.preview";
6754
6744
  "markdown.document-view": "markdown.document-view";
6755
- "cost.read": "cost.read";
6756
6745
  "billing.read": "billing.read";
6757
- "skills.read": "skills.read";
6758
- "memory.read": "memory.read";
6759
- "self-improvement.read": "self-improvement.read";
6760
6746
  "automations.read": "automations.read";
6761
6747
  "automations.run": "automations.run";
6762
6748
  "shared-artifacts.read": "shared-artifacts.read";
@@ -7008,11 +6994,7 @@ export declare const KayUiTargetManifest: z.ZodObject<{
7008
6994
  "artifacts.read": "artifacts.read";
7009
6995
  "artifacts.preview": "artifacts.preview";
7010
6996
  "markdown.document-view": "markdown.document-view";
7011
- "cost.read": "cost.read";
7012
6997
  "billing.read": "billing.read";
7013
- "skills.read": "skills.read";
7014
- "memory.read": "memory.read";
7015
- "self-improvement.read": "self-improvement.read";
7016
6998
  "automations.read": "automations.read";
7017
6999
  "automations.run": "automations.run";
7018
7000
  "shared-artifacts.read": "shared-artifacts.read";
@@ -7020,6 +7002,7 @@ export declare const KayUiTargetManifest: z.ZodObject<{
7020
7002
  "workspace.pane-header": "workspace.pane-header";
7021
7003
  "workspace.arrange": "workspace.arrange";
7022
7004
  }>>>;
7005
+ feeds: z.ZodOptional<z.ZodArray<z.ZodString>>;
7023
7006
  }, z.core.$strict>>;
7024
7007
  }, z.core.$strict> | z.ZodPreprocess<z.ZodObject<{
7025
7008
  localId: z.ZodString;
@@ -7045,11 +7028,7 @@ export declare const KayUiTargetManifest: z.ZodObject<{
7045
7028
  "artifacts.read": "artifacts.read";
7046
7029
  "artifacts.preview": "artifacts.preview";
7047
7030
  "markdown.document-view": "markdown.document-view";
7048
- "cost.read": "cost.read";
7049
7031
  "billing.read": "billing.read";
7050
- "skills.read": "skills.read";
7051
- "memory.read": "memory.read";
7052
- "self-improvement.read": "self-improvement.read";
7053
7032
  "automations.read": "automations.read";
7054
7033
  "automations.run": "automations.run";
7055
7034
  "shared-artifacts.read": "shared-artifacts.read";
@@ -7057,6 +7036,7 @@ export declare const KayUiTargetManifest: z.ZodObject<{
7057
7036
  "workspace.pane-header": "workspace.pane-header";
7058
7037
  "workspace.arrange": "workspace.arrange";
7059
7038
  }>>>;
7039
+ feeds: z.ZodOptional<z.ZodArray<z.ZodString>>;
7060
7040
  }, z.core.$strict>>;
7061
7041
  }, z.core.$strict>, unknown>>>;
7062
7042
  railEntries: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -11382,11 +11362,7 @@ export declare const ResolvedKayUiApp: z.ZodObject<{
11382
11362
  "artifacts.read": "artifacts.read";
11383
11363
  "artifacts.preview": "artifacts.preview";
11384
11364
  "markdown.document-view": "markdown.document-view";
11385
- "cost.read": "cost.read";
11386
11365
  "billing.read": "billing.read";
11387
- "skills.read": "skills.read";
11388
- "memory.read": "memory.read";
11389
- "self-improvement.read": "self-improvement.read";
11390
11366
  "automations.read": "automations.read";
11391
11367
  "automations.run": "automations.run";
11392
11368
  "shared-artifacts.read": "shared-artifacts.read";
@@ -11394,6 +11370,7 @@ export declare const ResolvedKayUiApp: z.ZodObject<{
11394
11370
  "workspace.pane-header": "workspace.pane-header";
11395
11371
  "workspace.arrange": "workspace.arrange";
11396
11372
  }>>>;
11373
+ feeds: z.ZodOptional<z.ZodArray<z.ZodString>>;
11397
11374
  }, z.core.$strict>>;
11398
11375
  }, z.core.$strict>;
11399
11376
 
@@ -12720,11 +12697,7 @@ export declare const ResolvedPluginContractV1: z.ZodObject<{
12720
12697
  "artifacts.read": "artifacts.read";
12721
12698
  "artifacts.preview": "artifacts.preview";
12722
12699
  "markdown.document-view": "markdown.document-view";
12723
- "cost.read": "cost.read";
12724
12700
  "billing.read": "billing.read";
12725
- "skills.read": "skills.read";
12726
- "memory.read": "memory.read";
12727
- "self-improvement.read": "self-improvement.read";
12728
12701
  "automations.read": "automations.read";
12729
12702
  "automations.run": "automations.run";
12730
12703
  "shared-artifacts.read": "shared-artifacts.read";
@@ -12732,6 +12705,7 @@ export declare const ResolvedPluginContractV1: z.ZodObject<{
12732
12705
  "workspace.pane-header": "workspace.pane-header";
12733
12706
  "workspace.arrange": "workspace.arrange";
12734
12707
  }>>>;
12708
+ feeds: z.ZodOptional<z.ZodArray<z.ZodString>>;
12735
12709
  }, z.core.$strict>>;
12736
12710
  }, z.core.$strict>>>;
12737
12711
  }, z.core.$strict>;
@@ -14359,11 +14333,7 @@ export declare const UiAppCapabilities: z.ZodObject<{
14359
14333
  "artifacts.read": "artifacts.read";
14360
14334
  "artifacts.preview": "artifacts.preview";
14361
14335
  "markdown.document-view": "markdown.document-view";
14362
- "cost.read": "cost.read";
14363
14336
  "billing.read": "billing.read";
14364
- "skills.read": "skills.read";
14365
- "memory.read": "memory.read";
14366
- "self-improvement.read": "self-improvement.read";
14367
14337
  "automations.read": "automations.read";
14368
14338
  "automations.run": "automations.run";
14369
14339
  "shared-artifacts.read": "shared-artifacts.read";
@@ -14371,6 +14341,7 @@ export declare const UiAppCapabilities: z.ZodObject<{
14371
14341
  "workspace.pane-header": "workspace.pane-header";
14372
14342
  "workspace.arrange": "workspace.arrange";
14373
14343
  }>>>;
14344
+ feeds: z.ZodOptional<z.ZodArray<z.ZodString>>;
14374
14345
  }, z.core.$strict>;
14375
14346
 
14376
14347
  export declare type UiAppCapabilities = z.infer<typeof UiAppCapabilities>;
@@ -14399,11 +14370,7 @@ export declare const UiAppContribution: z.ZodObject<{
14399
14370
  "artifacts.read": "artifacts.read";
14400
14371
  "artifacts.preview": "artifacts.preview";
14401
14372
  "markdown.document-view": "markdown.document-view";
14402
- "cost.read": "cost.read";
14403
14373
  "billing.read": "billing.read";
14404
- "skills.read": "skills.read";
14405
- "memory.read": "memory.read";
14406
- "self-improvement.read": "self-improvement.read";
14407
14374
  "automations.read": "automations.read";
14408
14375
  "automations.run": "automations.run";
14409
14376
  "shared-artifacts.read": "shared-artifacts.read";
@@ -14411,6 +14378,7 @@ export declare const UiAppContribution: z.ZodObject<{
14411
14378
  "workspace.pane-header": "workspace.pane-header";
14412
14379
  "workspace.arrange": "workspace.arrange";
14413
14380
  }>>>;
14381
+ feeds: z.ZodOptional<z.ZodArray<z.ZodString>>;
14414
14382
  }, z.core.$strict>>;
14415
14383
  }, z.core.$strict> | z.ZodPreprocess<z.ZodObject<{
14416
14384
  localId: z.ZodString;
@@ -14436,11 +14404,7 @@ export declare const UiAppContribution: z.ZodObject<{
14436
14404
  "artifacts.read": "artifacts.read";
14437
14405
  "artifacts.preview": "artifacts.preview";
14438
14406
  "markdown.document-view": "markdown.document-view";
14439
- "cost.read": "cost.read";
14440
14407
  "billing.read": "billing.read";
14441
- "skills.read": "skills.read";
14442
- "memory.read": "memory.read";
14443
- "self-improvement.read": "self-improvement.read";
14444
14408
  "automations.read": "automations.read";
14445
14409
  "automations.run": "automations.run";
14446
14410
  "shared-artifacts.read": "shared-artifacts.read";
@@ -14448,6 +14412,7 @@ export declare const UiAppContribution: z.ZodObject<{
14448
14412
  "workspace.pane-header": "workspace.pane-header";
14449
14413
  "workspace.arrange": "workspace.arrange";
14450
14414
  }>>>;
14415
+ feeds: z.ZodOptional<z.ZodArray<z.ZodString>>;
14451
14416
  }, z.core.$strict>>;
14452
14417
  }, z.core.$strict>, unknown>;
14453
14418
 
package/dist/index.js CHANGED
@@ -254,7 +254,7 @@ var JsonSchema = z4.record(z4.string(), JsonValue);
254
254
  var KAY_PLUGIN_MANIFEST_SIZE_CAP_BYTES = 1024 * 1024;
255
255
  var KAY_PLUGIN_PROTOCOL_VERSION = "kay.plugin.v1";
256
256
  var KAY_PLUGIN_PROTOCOL_PACKAGE_NAME = "@bonsai/plugin-protocol";
257
- var KAY_PLUGIN_SDK_VERSION = "0.39.0";
257
+ var KAY_PLUGIN_SDK_VERSION = "0.41.0";
258
258
  var KAY_PLUGIN_COMPATIBLE_SDK_VERSIONS = [
259
259
  "0.26.3",
260
260
  "0.27.1",
@@ -267,8 +267,11 @@ var KAY_PLUGIN_COMPATIBLE_SDK_VERSIONS = [
267
267
  "0.34.0",
268
268
  "0.35.0",
269
269
  "0.36.0",
270
+ "0.37.0",
270
271
  "0.37.1",
271
- "0.38.0"
272
+ "0.38.0",
273
+ "0.39.0",
274
+ "0.40.0"
272
275
  ];
273
276
  var KAY_PLUGIN_TARGET_NAMES = [
274
277
  "kay.agent",
@@ -3460,13 +3463,6 @@ function createContributionsSchemas(canonical) {
3460
3463
  }
3461
3464
  if (source.store === void 0)
3462
3465
  return;
3463
- if (source.scope === "session") {
3464
- ctx.addIssue({
3465
- code: "custom",
3466
- path: ["store"],
3467
- message: "A declared app-data store requires runtime or account scope."
3468
- });
3469
- }
3470
3466
  const replaces = source.change.semantics?.kind === "snapshot-replacement";
3471
3467
  if (replaces !== (source.store.shape === "value")) {
3472
3468
  ctx.addIssue({
@@ -3958,15 +3954,8 @@ function createContributionsSchemas(canonical) {
3958
3954
  // Draws Bonsai's markdown document view in the app's page (`BonsaiMarkdownDocumentView`).
3959
3955
  // It reads and saves nothing: the app supplies the text and keeps the edits.
3960
3956
  "markdown.document-view",
3961
- "cost.read",
3962
3957
  // Server-rated organization billing, distinct from local/provider cost.
3963
3958
  "billing.read",
3964
- // Skills and Memory analytics reads (full snapshots via the capability broker).
3965
- "skills.read",
3966
- "memory.read",
3967
- // The self-improvement lens: reads the telemetry lane's self-improvement rollup
3968
- // (memory/skill/notebook activity). Follows the same "names the data" convention.
3969
- "self-improvement.read",
3970
3959
  "automations.read",
3971
3960
  "automations.run",
3972
3961
  // Lists the shared artifacts the signed-in account may open and opens one in Bonsai's shared
@@ -3989,9 +3978,12 @@ function createContributionsSchemas(canonical) {
3989
3978
  ]);
3990
3979
  const UiAppCapabilities2 = z12.strictObject({
3991
3980
  endpoints: z12.array(LocalContributionId2).optional(),
3992
- host: z12.array(KayUiAppHostCapability2).optional()
3981
+ host: z12.array(KayUiAppHostCapability2).optional(),
3982
+ // The feeds this app's pages read with `useBonsaiFeed`. A name means this plugin's own
3983
+ // `kay.app` data source if it declares one, otherwise the feed the daemon publishes.
3984
+ feeds: z12.array(LocalContributionId2).optional()
3993
3985
  }).superRefine((capabilities, ctx) => {
3994
- for (const field of ["endpoints", "host"]) {
3986
+ for (const field of ["endpoints", "host", "feeds"]) {
3995
3987
  const seen = /* @__PURE__ */ new Set();
3996
3988
  for (const [index, value] of (capabilities[field] ?? []).entries()) {
3997
3989
  if (seen.has(value)) {
@@ -4870,7 +4862,7 @@ function createManifestSchemas(canonical) {
4870
4862
  }
4871
4863
  materializedAppDataSources.add(materializer.source);
4872
4864
  }
4873
- const declaredRowsStores = new Set(manifest.targets?.kay?.app?.contributes?.dataSources?.filter((source) => source.store?.shape === "rows").map((source) => source.localId) ?? []);
4865
+ const declaredRowsStores = new Set(manifest.targets?.kay?.app?.contributes?.dataSources?.filter((source) => source.store?.shape === "rows" && source.scope !== "session").map((source) => source.localId) ?? []);
4874
4866
  for (const [index, entry] of (manifest.targets?.kay?.ui?.contributes?.railEntries ?? []).entries()) {
4875
4867
  if (entry.badge === void 0)
4876
4868
  continue;
@@ -6054,7 +6046,8 @@ function createResolvedContractSchemas(canonical) {
6054
6046
  assets: z14.array(PackageAssetPath2).optional(),
6055
6047
  capabilities: z14.strictObject({
6056
6048
  endpoints: z14.array(ResolvedKayUiAppEndpointCapability2).optional(),
6057
- host: z14.array(KayUiAppHostCapability2).optional()
6049
+ host: z14.array(KayUiAppHostCapability2).optional(),
6050
+ feeds: z14.array(LocalContributionId2).optional()
6058
6051
  }).optional()
6059
6052
  });
6060
6053
  const ResolvedPluginContractV12 = z14.strictObject({
@@ -6583,7 +6576,8 @@ function resolveKayPluginContractV1(manifest) {
6583
6576
  globalId: resolveGlobalContributionId(namespace, endpoint)
6584
6577
  }))
6585
6578
  },
6586
- ...app.capabilities.host === void 0 ? {} : { host: [...app.capabilities.host] }
6579
+ ...app.capabilities.host === void 0 ? {} : { host: [...app.capabilities.host] },
6580
+ ...app.capabilities.feeds === void 0 ? {} : { feeds: [...app.capabilities.feeds] }
6587
6581
  }
6588
6582
  }
6589
6583
  }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yaklabs-ai/plugin-protocol",
3
- "version": "0.39.0",
3
+ "version": "0.41.0",
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",