@yaklabs-ai/plugin-sdk 0.51.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
@@ -13,7 +13,7 @@ it under the name your plugin code actually imports:
13
13
  ```json
14
14
  {
15
15
  "dependencies": {
16
- "@bonsai/plugin-sdk": "npm:@yaklabs-ai/plugin-sdk@^0.51.0"
16
+ "@bonsai/plugin-sdk": "npm:@yaklabs-ai/plugin-sdk@^0.52.1"
17
17
  }
18
18
  }
19
19
  ```
@@ -62,7 +62,7 @@ Every tool the entrypoint registers is declared in the manifest too:
62
62
  "description": "Greets people by name.",
63
63
  "version": "0.1.0",
64
64
  "namespace": "widgets",
65
- "compatibility": { "sdk": "^0.51.0" },
65
+ "compatibility": { "sdk": "^0.52.1" },
66
66
  "targets": {
67
67
  "kay": {
68
68
  "agent": {
@@ -151,7 +151,7 @@ naming both versions, instead of loading it and finding no `activate`.
151
151
  | `@bonsai/plugin-sdk/system-one` | The types and error class for `api.systemOne` / `app.systemOne`, from 0.13.8 |
152
152
  | `@bonsai/plugin-sdk/zod` | `z` (the host's in the daemon), on an entry with no other import, from 0.13.9 |
153
153
 
154
- A plugin that imports these subpaths declares the current supported SDK range (`^0.51.0`).
154
+ A plugin that imports these subpaths declares the current supported SDK range (`^0.52.1`).
155
155
  The rows record when each subpath appeared, not retained runtime compatibility. `vendored-mcp` builds the plugin's URI module (its link cards and help); hosting the
156
156
  vendor's MCP server itself is a separate host decision: Bonsai hosts it once a person approves
157
157
  the plugin's `mcp.host-server` grant for that server's name and URL. A server that needs an OAuth
@@ -159,7 +159,7 @@ sign-in names one of the plugin's auth services in `authService`; that service m
159
159
  one `delegated` scheme, which Bonsai uses to sign the person in to the server. Bonsai declares that
160
160
  scheme at runtime; the plugin's code must not declare it again. From 0.16.2 a plugin's code can also
161
161
  call the server's tools through `api.vendoredMcp.port(<server>)`, typed by this subpath's
162
- `VendoredMcpPort` and `VendoredMcpOutcome` (declare `^0.51.0`).
162
+ `VendoredMcpPort` and `VendoredMcpOutcome` (declare `^0.52.1`).
163
163
 
164
164
  From 0.13.10 the manifest schema carries two facts Bonsai reads for its own plugins only; another
165
165
  plugin's are ignored, with a load diagnostic. An `external-cli` auth scheme's `cli` says how Bonsai
@@ -241,7 +241,7 @@ Provider schemas remain authoritative; declaring a dependency grants no authorit
241
241
  through `app.uri`, parse returned Markdown in the consuming plugin, and retain the read's
242
242
  revision (or `contentDigest` from `/uri`) for edits. The old `memory.read` and `memory.write`
243
243
  grants do not authorize the replacement scheme-and-verb calls. Contracts before 0.49.0 are
244
- refused; migrate and declare `^0.51.0`. The current host also serves the 0.49.0 resource contract.
244
+ refused; migrate and declare `^0.52.1`. The current host also serves the 0.49.0 resource contract.
245
245
 
246
246
  ## What this package is, and is not, at runtime
247
247
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "package": "@yaklabs-ai/plugin-sdk",
4
- "version": "0.51.0",
4
+ "version": "0.52.1",
5
5
  "target": "npm",
6
6
  "firstPartyLicense": "MIT",
7
7
  "bundled": [
@@ -2458,8 +2458,12 @@ declare const KAY_PLUGIN_PROTOCOL_VERSION: "kay.plugin.v1";
2458
2458
  * contract remains served.
2459
2459
  *
2460
2460
  * 0.51.0 adds flag-dependent title, icon and panel presence on rail entries.
2461
+ *
2462
+ * 0.52.0 adds plugin-owned operational facts through existing manifests and registrations.
2463
+ *
2464
+ * 0.52.1 adds owner-qualified page feed and endpoint references and their kay.ui claims.
2461
2465
  */
2462
- declare const KAY_PLUGIN_SDK_VERSION: "0.51.0";
2466
+ declare const KAY_PLUGIN_SDK_VERSION: "0.52.1";
2463
2467
 
2464
2468
  declare const KAY_PLUGIN_TARGET_NAMES: readonly ["kay.agent", "kay.app", "kay.ui"];
2465
2469
 
@@ -2512,8 +2512,12 @@ declare const KAY_PLUGIN_PROTOCOL_VERSION: "kay.plugin.v1";
2512
2512
  * contract remains served.
2513
2513
  *
2514
2514
  * 0.51.0 adds flag-dependent title, icon and panel presence on rail entries.
2515
+ *
2516
+ * 0.52.0 adds plugin-owned operational facts through existing manifests and registrations.
2517
+ *
2518
+ * 0.52.1 adds owner-qualified page feed and endpoint references and their kay.ui claims.
2515
2519
  */
2516
- declare const KAY_PLUGIN_SDK_VERSION: "0.51.0";
2520
+ declare const KAY_PLUGIN_SDK_VERSION: "0.52.1";
2517
2521
 
2518
2522
  declare const KAY_PLUGIN_TARGET_NAMES: readonly ["kay.agent", "kay.app", "kay.ui"];
2519
2523
 
@@ -4937,6 +4941,20 @@ declare const ResolvedPluginContractV1: z.ZodObject<{
4937
4941
  }, z.core.$strict>>;
4938
4942
  consumesAuthServices: z.ZodArray<z.ZodString>;
4939
4943
  explicitDependencies: z.ZodArray<z.ZodString>;
4944
+ dataDirSharedWith: z.ZodOptional<z.ZodString>;
4945
+ workloadPurposes: z.ZodOptional<z.ZodArray<z.ZodObject<{
4946
+ purpose: z.ZodString;
4947
+ workloadClass: z.ZodEnum<{
4948
+ dreaming: "dreaming";
4949
+ hindsight: "hindsight";
4950
+ }>;
4951
+ }, z.core.$strict>>>;
4952
+ shellCommands: z.ZodOptional<z.ZodArray<z.ZodObject<{
4953
+ name: z.ZodString;
4954
+ aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
4955
+ usage: z.ZodString;
4956
+ endpointId: z.ZodString;
4957
+ }, z.core.$strict>>>;
4940
4958
  authServices: z.ZodArray<z.ZodObject<{
4941
4959
  localId: z.ZodString;
4942
4960
  globalId: z.ZodString;
@@ -4944,6 +4962,30 @@ declare const ResolvedPluginContractV1: z.ZodObject<{
4944
4962
  summary: z.ZodOptional<z.ZodString>;
4945
4963
  schemes: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[z.ZodObject<{
4946
4964
  exchange: z.ZodLiteral<"pkce">;
4965
+ byoocProfile: z.ZodOptional<z.ZodObject<{
4966
+ displayName: z.ZodString;
4967
+ fields: z.ZodArray<z.ZodObject<{
4968
+ id: z.ZodString;
4969
+ label: z.ZodString;
4970
+ optional: z.ZodOptional<z.ZodBoolean>;
4971
+ validation: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
4972
+ kind: z.ZodLiteral<"uuid">;
4973
+ }, z.core.$strict>, z.ZodObject<{
4974
+ kind: z.ZodLiteral<"suffix">;
4975
+ value: z.ZodString;
4976
+ }, z.core.$strict>], "kind">>;
4977
+ failureMessage: z.ZodOptional<z.ZodString>;
4978
+ }, z.core.$strict>>;
4979
+ setup: z.ZodObject<{
4980
+ steps: z.ZodArray<z.ZodString>;
4981
+ notes: z.ZodArray<z.ZodString>;
4982
+ url: z.ZodURL;
4983
+ }, z.core.$strict>;
4984
+ endpointTemplates: z.ZodOptional<z.ZodObject<{
4985
+ authorizationUrl: z.ZodString;
4986
+ tokenUrl: z.ZodString;
4987
+ }, z.core.$strict>>;
4988
+ }, z.core.$strict>>;
4947
4989
  clientSuppliers: z.ZodArray<z.ZodEnum<{
4948
4990
  user: "user";
4949
4991
  kay: "kay";
@@ -5142,6 +5184,19 @@ declare const ResolvedPluginContractV1: z.ZodObject<{
5142
5184
  }>;
5143
5185
  mimeTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
5144
5186
  successNote: z.ZodOptional<z.ZodString>;
5187
+ round: z.ZodOptional<z.ZodObject<{
5188
+ scopes: z.ZodArray<z.ZodString>;
5189
+ extraAuthorizeParams: z.ZodRecord<z.ZodString, z.ZodString>;
5190
+ redirectParam: z.ZodString;
5191
+ requiresGrantedScope: z.ZodString;
5192
+ supersededByScopes: z.ZodArray<z.ZodString>;
5193
+ purpose: z.ZodString;
5194
+ displayNoun: z.ZodString;
5195
+ }, z.core.$strict>>;
5196
+ completion: z.ZodOptional<z.ZodObject<{
5197
+ pluginId: z.ZodString;
5198
+ moduleId: z.ZodString;
5199
+ }, z.core.$strict>>;
5145
5200
  }, z.core.$strict>>;
5146
5201
  }, z.core.$strict>>;
5147
5202
  service: z.ZodString;
@@ -5162,9 +5217,9 @@ declare const ResolvedPluginContractV1: z.ZodObject<{
5162
5217
  dataDir: "dataDir";
5163
5218
  }>;
5164
5219
  operations: z.ZodArray<z.ZodEnum<{
5165
- open: "open";
5166
5220
  read: "read";
5167
5221
  write: "write";
5222
+ open: "open";
5168
5223
  }>>;
5169
5224
  }, z.core.$strict>>>;
5170
5225
  events: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -5176,8 +5231,8 @@ declare const ResolvedPluginContractV1: z.ZodObject<{
5176
5231
  }, z.core.$strict>>>;
5177
5232
  endpoints: z.ZodOptional<z.ZodArray<z.ZodObject<{
5178
5233
  operations: z.ZodArray<z.ZodEnum<{
5179
- register: "register";
5180
5234
  invoke: "invoke";
5235
+ register: "register";
5181
5236
  }>>;
5182
5237
  endpoint: z.ZodString;
5183
5238
  }, z.core.$strict>>>;
@@ -5237,6 +5292,19 @@ declare const ResolvedPluginContractV1: z.ZodObject<{
5237
5292
  }>;
5238
5293
  mimeTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
5239
5294
  successNote: z.ZodOptional<z.ZodString>;
5295
+ round: z.ZodOptional<z.ZodObject<{
5296
+ scopes: z.ZodArray<z.ZodString>;
5297
+ extraAuthorizeParams: z.ZodRecord<z.ZodString, z.ZodString>;
5298
+ redirectParam: z.ZodString;
5299
+ requiresGrantedScope: z.ZodString;
5300
+ supersededByScopes: z.ZodArray<z.ZodString>;
5301
+ purpose: z.ZodString;
5302
+ displayNoun: z.ZodString;
5303
+ }, z.core.$strict>>;
5304
+ completion: z.ZodOptional<z.ZodObject<{
5305
+ pluginId: z.ZodString;
5306
+ moduleId: z.ZodString;
5307
+ }, z.core.$strict>>;
5240
5308
  }, z.core.$strict>>;
5241
5309
  }, z.core.$strict>>;
5242
5310
  service: z.ZodString;
@@ -5257,9 +5325,9 @@ declare const ResolvedPluginContractV1: z.ZodObject<{
5257
5325
  dataDir: "dataDir";
5258
5326
  }>;
5259
5327
  operations: z.ZodArray<z.ZodEnum<{
5260
- open: "open";
5261
5328
  read: "read";
5262
5329
  write: "write";
5330
+ open: "open";
5263
5331
  }>>;
5264
5332
  }, z.core.$strict>>>;
5265
5333
  events: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -5271,8 +5339,8 @@ declare const ResolvedPluginContractV1: z.ZodObject<{
5271
5339
  }, z.core.$strict>>>;
5272
5340
  endpoints: z.ZodOptional<z.ZodArray<z.ZodObject<{
5273
5341
  operations: z.ZodArray<z.ZodEnum<{
5274
- register: "register";
5275
5342
  invoke: "invoke";
5343
+ register: "register";
5276
5344
  }>>;
5277
5345
  endpoint: z.ZodString;
5278
5346
  }, z.core.$strict>>>;
@@ -5332,6 +5400,19 @@ declare const ResolvedPluginContractV1: z.ZodObject<{
5332
5400
  }>;
5333
5401
  mimeTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
5334
5402
  successNote: z.ZodOptional<z.ZodString>;
5403
+ round: z.ZodOptional<z.ZodObject<{
5404
+ scopes: z.ZodArray<z.ZodString>;
5405
+ extraAuthorizeParams: z.ZodRecord<z.ZodString, z.ZodString>;
5406
+ redirectParam: z.ZodString;
5407
+ requiresGrantedScope: z.ZodString;
5408
+ supersededByScopes: z.ZodArray<z.ZodString>;
5409
+ purpose: z.ZodString;
5410
+ displayNoun: z.ZodString;
5411
+ }, z.core.$strict>>;
5412
+ completion: z.ZodOptional<z.ZodObject<{
5413
+ pluginId: z.ZodString;
5414
+ moduleId: z.ZodString;
5415
+ }, z.core.$strict>>;
5335
5416
  }, z.core.$strict>>;
5336
5417
  }, z.core.$strict>>;
5337
5418
  service: z.ZodString;
@@ -5352,9 +5433,9 @@ declare const ResolvedPluginContractV1: z.ZodObject<{
5352
5433
  dataDir: "dataDir";
5353
5434
  }>;
5354
5435
  operations: z.ZodArray<z.ZodEnum<{
5355
- open: "open";
5356
5436
  read: "read";
5357
5437
  write: "write";
5438
+ open: "open";
5358
5439
  }>>;
5359
5440
  }, z.core.$strict>>>;
5360
5441
  events: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -5366,8 +5447,8 @@ declare const ResolvedPluginContractV1: z.ZodObject<{
5366
5447
  }, z.core.$strict>>>;
5367
5448
  endpoints: z.ZodOptional<z.ZodArray<z.ZodObject<{
5368
5449
  operations: z.ZodArray<z.ZodEnum<{
5369
- register: "register";
5370
5450
  invoke: "invoke";
5451
+ register: "register";
5371
5452
  }>>;
5372
5453
  endpoint: z.ZodString;
5373
5454
  }, z.core.$strict>>>;
@@ -5392,6 +5473,8 @@ declare const ResolvedPluginContractV1: z.ZodObject<{
5392
5473
  }, z.core.$strict>;
5393
5474
  }, z.core.$strict>>;
5394
5475
  kayAgentUriModules: z.ZodOptional<z.ZodArray<z.ZodObject<{
5476
+ revisionBacked: z.ZodOptional<z.ZodLiteral<true>>;
5477
+ mailCalibrationSource: z.ZodOptional<z.ZodLiteral<true>>;
5395
5478
  screenActions: z.ZodExactOptional<z.ZodObject<{
5396
5479
  scheme: z.ZodString;
5397
5480
  hosts: z.ZodArray<z.ZodString>;
@@ -5451,8 +5534,8 @@ declare const ResolvedPluginContractV1: z.ZodObject<{
5451
5534
  description: z.ZodString;
5452
5535
  operations: z.ZodExactOptional<z.ZodArray<z.ZodEnum<{
5453
5536
  search: "search";
5454
- list: "list";
5455
5537
  read: "read";
5538
+ list: "list";
5456
5539
  write: "write";
5457
5540
  edit: "edit";
5458
5541
  delete: "delete";
@@ -5460,8 +5543,8 @@ declare const ResolvedPluginContractV1: z.ZodObject<{
5460
5543
  }>>>;
5461
5544
  operationDocs: z.ZodExactOptional<z.ZodRecord<z.ZodEnum<{
5462
5545
  search: "search";
5463
- list: "list";
5464
5546
  read: "read";
5547
+ list: "list";
5465
5548
  write: "write";
5466
5549
  edit: "edit";
5467
5550
  delete: "delete";
@@ -5469,8 +5552,8 @@ declare const ResolvedPluginContractV1: z.ZodObject<{
5469
5552
  }> & z.core.$partial, z.ZodString>>;
5470
5553
  operationDefaults: z.ZodExactOptional<z.ZodRecord<z.ZodEnum<{
5471
5554
  search: "search";
5472
- list: "list";
5473
5555
  read: "read";
5556
+ list: "list";
5474
5557
  write: "write";
5475
5558
  edit: "edit";
5476
5559
  delete: "delete";
@@ -5533,8 +5616,8 @@ declare const ResolvedPluginContractV1: z.ZodObject<{
5533
5616
  action: z.ZodString;
5534
5617
  operations: z.ZodExactOptional<z.ZodArray<z.ZodEnum<{
5535
5618
  search: "search";
5536
- list: "list";
5537
5619
  read: "read";
5620
+ list: "list";
5538
5621
  write: "write";
5539
5622
  edit: "edit";
5540
5623
  delete: "delete";
@@ -5546,8 +5629,8 @@ declare const ResolvedPluginContractV1: z.ZodObject<{
5546
5629
  public: z.ZodLiteral<true>;
5547
5630
  operations: z.ZodExactOptional<z.ZodArray<z.ZodEnum<{
5548
5631
  search: "search";
5549
- list: "list";
5550
5632
  read: "read";
5633
+ list: "list";
5551
5634
  write: "write";
5552
5635
  edit: "edit";
5553
5636
  delete: "delete";
@@ -5669,9 +5752,9 @@ declare const ResolvedPluginContractV1: z.ZodObject<{
5669
5752
  }, z.core.$strict>>>;
5670
5753
  kayAppTools: z.ZodOptional<z.ZodArray<z.ZodObject<{
5671
5754
  description: z.ZodOptional<z.ZodString>;
5672
- localId: z.ZodString;
5673
- displayName: z.ZodOptional<z.ZodString>;
5674
5755
  toolName: z.ZodString;
5756
+ displayName: z.ZodOptional<z.ZodString>;
5757
+ localId: z.ZodString;
5675
5758
  parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<authoringCommonSchemas.JsonValue, unknown, z.core.$ZodTypeInternals<authoringCommonSchemas.JsonValue, unknown>>>>;
5676
5759
  executionMode: z.ZodOptional<z.ZodEnum<{
5677
5760
  sequential: "sequential";
@@ -5717,9 +5800,6 @@ declare const ResolvedPluginContractV1: z.ZodObject<{
5717
5800
  }, z.core.$strict>>>;
5718
5801
  kayAppApprovalTypes: z.ZodOptional<z.ZodArray<z.ZodObject<{
5719
5802
  kind: z.ZodLiteral<"message">;
5720
- localId: z.ZodString;
5721
- provider: z.ZodString;
5722
- unknownMessage: z.ZodString;
5723
5803
  fields: z.ZodObject<{
5724
5804
  body: z.ZodObject<{
5725
5805
  key: z.ZodString;
@@ -5730,6 +5810,9 @@ declare const ResolvedPluginContractV1: z.ZodObject<{
5730
5810
  max: z.ZodNumber;
5731
5811
  }, z.core.$strict>>;
5732
5812
  }, z.core.$strict>;
5813
+ localId: z.ZodString;
5814
+ provider: z.ZodString;
5815
+ unknownMessage: z.ZodString;
5733
5816
  presentation: z.ZodObject<{
5734
5817
  showAccount: z.ZodBoolean;
5735
5818
  recipient: z.ZodEnum<{
@@ -6031,10 +6114,13 @@ declare const ResolvedPluginContractV1: z.ZodObject<{
6031
6114
  styles: z.ZodOptional<z.ZodArray<z.ZodString>>;
6032
6115
  assets: z.ZodOptional<z.ZodArray<z.ZodString>>;
6033
6116
  capabilities: z.ZodOptional<z.ZodObject<{
6034
- endpoints: z.ZodOptional<z.ZodArray<z.ZodObject<{
6117
+ endpoints: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
6035
6118
  localId: z.ZodString;
6036
6119
  globalId: z.ZodString;
6037
- }, z.core.$strict>>>;
6120
+ }, z.core.$strict>, z.ZodObject<{
6121
+ pluginId: z.ZodString;
6122
+ localId: z.ZodString;
6123
+ }, z.core.$strict>]>>>;
6038
6124
  host: z.ZodOptional<z.ZodArray<z.ZodEnum<{
6039
6125
  "navigation.open-session": "navigation.open-session";
6040
6126
  "sessions.create": "sessions.create";
@@ -6047,11 +6133,15 @@ declare const ResolvedPluginContractV1: z.ZodObject<{
6047
6133
  "automations.read": "automations.read";
6048
6134
  "automations.run": "automations.run";
6049
6135
  "shared-artifacts.read": "shared-artifacts.read";
6136
+ "projects.manage": "projects.manage";
6050
6137
  "workspace.place-pane": "workspace.place-pane";
6051
6138
  "workspace.pane-header": "workspace.pane-header";
6052
6139
  "workspace.arrange": "workspace.arrange";
6053
6140
  }>>>;
6054
- feeds: z.ZodOptional<z.ZodArray<z.ZodString>>;
6141
+ feeds: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
6142
+ pluginId: z.ZodString;
6143
+ localId: z.ZodString;
6144
+ }, z.core.$strict>]>>>;
6055
6145
  }, z.core.$strict>>;
6056
6146
  }, z.core.$strict>>>;
6057
6147
  }, z.core.$strict>;
@@ -2791,8 +2791,12 @@ declare const KAY_PLUGIN_PROTOCOL_VERSION: "kay.plugin.v1";
2791
2791
  * contract remains served.
2792
2792
  *
2793
2793
  * 0.51.0 adds flag-dependent title, icon and panel presence on rail entries.
2794
+ *
2795
+ * 0.52.0 adds plugin-owned operational facts through existing manifests and registrations.
2796
+ *
2797
+ * 0.52.1 adds owner-qualified page feed and endpoint references and their kay.ui claims.
2794
2798
  */
2795
- declare const KAY_PLUGIN_SDK_VERSION: "0.51.0";
2799
+ declare const KAY_PLUGIN_SDK_VERSION: "0.52.1";
2796
2800
 
2797
2801
  declare const KAY_PLUGIN_TARGET_NAMES: readonly ["kay.agent", "kay.app", "kay.ui"];
2798
2802
 
@@ -5092,8 +5096,8 @@ declare const PluginCapabilityRefusalV1: z.ZodObject<{
5092
5096
  scheme: z.ZodString;
5093
5097
  verb: z.ZodEnum<{
5094
5098
  search: "search";
5095
- list: "list";
5096
5099
  read: "read";
5100
+ list: "list";
5097
5101
  write: "write";
5098
5102
  edit: "edit";
5099
5103
  delete: "delete";
@@ -5103,6 +5107,7 @@ declare const PluginCapabilityRefusalV1: z.ZodObject<{
5103
5107
  target: z.ZodEnum<{
5104
5108
  "kay.agent": "kay.agent";
5105
5109
  "kay.app": "kay.app";
5110
+ "kay.ui": "kay.ui";
5106
5111
  }>;
5107
5112
  slug: z.ZodLiteral<"endpoints.invoke">;
5108
5113
  envelope: z.ZodObject<{
@@ -5191,6 +5196,13 @@ declare const PluginCapabilityRefusalV1: z.ZodObject<{
5191
5196
  envelope: z.ZodObject<{
5192
5197
  contributor: z.ZodString;
5193
5198
  }, z.core.$strict>;
5199
+ }, z.core.$strict>, z.ZodObject<{
5200
+ target: z.ZodLiteral<"kay.ui">;
5201
+ slug: z.ZodLiteral<"app-data.read">;
5202
+ envelope: z.ZodObject<{
5203
+ pluginId: z.ZodString;
5204
+ sourceId: z.ZodString;
5205
+ }, z.core.$strict>;
5194
5206
  }, z.core.$strict>, z.ZodObject<{
5195
5207
  target: z.ZodLiteral<"kay.app">;
5196
5208
  slug: z.ZodLiteral<"app-data.register">;
@@ -5509,6 +5521,34 @@ declare const PluginNamespace: z.ZodString;
5509
5521
 
5510
5522
  declare type PluginNamespace = z.infer<typeof PluginNamespace>;
5511
5523
 
5524
+ export declare interface PluginResourcePickCompletion {
5525
+ readonly serviceId: string;
5526
+ readonly schemeId: string;
5527
+ readonly accountId: string;
5528
+ readonly capabilityServiceId?: string;
5529
+ readonly identityEmail?: string;
5530
+ readonly pickedResourceIds: readonly string[];
5531
+ readonly accessToken: string;
5532
+ readonly accountAccessToken: string;
5533
+ readonly traceId: string;
5534
+ }
5535
+
5536
+ export declare type PluginResourcePickHandler = (completion: PluginResourcePickCompletion) => Promise<PluginResourcePickResult>;
5537
+
5538
+ export declare type PluginResourcePickResult = {
5539
+ readonly ok: true;
5540
+ readonly recorded: number;
5541
+ readonly resources: readonly {
5542
+ readonly id: string;
5543
+ readonly uri: string;
5544
+ readonly title?: string;
5545
+ readonly mimeType?: string;
5546
+ }[];
5547
+ } | {
5548
+ readonly ok: false;
5549
+ readonly reason: string;
5550
+ };
5551
+
5512
5552
  /** What one connection flow unlocks and when an agent should choose it; grants no authority. */
5513
5553
  export declare type PluginSchemeAgentHint = string;
5514
5554
 
package/dist/kay-app.d.ts CHANGED
@@ -2907,8 +2907,12 @@ declare const KAY_PLUGIN_PROTOCOL_VERSION: "kay.plugin.v1";
2907
2907
  * contract remains served.
2908
2908
  *
2909
2909
  * 0.51.0 adds flag-dependent title, icon and panel presence on rail entries.
2910
+ *
2911
+ * 0.52.0 adds plugin-owned operational facts through existing manifests and registrations.
2912
+ *
2913
+ * 0.52.1 adds owner-qualified page feed and endpoint references and their kay.ui claims.
2910
2914
  */
2911
- declare const KAY_PLUGIN_SDK_VERSION: "0.51.0";
2915
+ declare const KAY_PLUGIN_SDK_VERSION: "0.52.1";
2912
2916
 
2913
2917
  declare const KAY_PLUGIN_TARGET_NAMES: readonly ["kay.agent", "kay.app", "kay.ui"];
2914
2918
 
@@ -3230,6 +3234,8 @@ export declare type KayAppActivate = (app: KayAppPluginApi) => void | Promise<vo
3230
3234
  */
3231
3235
  export declare interface KayAppAgentDefinition {
3232
3236
  readonly name: string;
3237
+ readonly promptLayout?: "no-tool-judgment" | "outcome-handler";
3238
+ readonly idleReplies?: readonly string[];
3233
3239
  readonly description?: string;
3234
3240
  readonly icon?: string;
3235
3241
  /** Defaults to `hidden` when absent - see {@link KayAppAgentDefinitionVisibility}. */
@@ -5268,6 +5274,9 @@ export declare interface KayAppPhaseShiftSessionEvent extends KayAppSessionEvent
5268
5274
  * physical sandbox against ambient Node imports.
5269
5275
  */
5270
5276
  export declare interface KayAppPluginApi {
5277
+ readonly resourcePicks?: {
5278
+ registerCompletion(moduleId: string, handler: PluginResourcePickHandler): void;
5279
+ };
5271
5280
  readonly mcp: KayAppMcp;
5272
5281
  /** This plugin's canonical id (already validated by the host registry). */
5273
5282
  readonly id: string;
@@ -7660,6 +7669,7 @@ export declare interface KayAppSystemPrompt {
7660
7669
  }
7661
7670
 
7662
7671
  export declare interface KayAppSystemPromptFragment {
7672
+ readonly analyticsFamily?: string;
7663
7673
  /**
7664
7674
  * The facts the text varies by. Chats with the same values share one rendered text, so the
7665
7675
  * text must depend on nothing else about the chat.
@@ -10065,6 +10075,34 @@ export declare interface PluginProductEventSend {
10065
10075
  readonly subjectUri?: string;
10066
10076
  }
10067
10077
 
10078
+ declare interface PluginResourcePickCompletion {
10079
+ readonly serviceId: string;
10080
+ readonly schemeId: string;
10081
+ readonly accountId: string;
10082
+ readonly capabilityServiceId?: string;
10083
+ readonly identityEmail?: string;
10084
+ readonly pickedResourceIds: readonly string[];
10085
+ readonly accessToken: string;
10086
+ readonly accountAccessToken: string;
10087
+ readonly traceId: string;
10088
+ }
10089
+
10090
+ declare type PluginResourcePickHandler = (completion: PluginResourcePickCompletion) => Promise<PluginResourcePickResult>;
10091
+
10092
+ declare type PluginResourcePickResult = {
10093
+ readonly ok: true;
10094
+ readonly recorded: number;
10095
+ readonly resources: readonly {
10096
+ readonly id: string;
10097
+ readonly uri: string;
10098
+ readonly title?: string;
10099
+ readonly mimeType?: string;
10100
+ }[];
10101
+ } | {
10102
+ readonly ok: false;
10103
+ readonly reason: string;
10104
+ };
10105
+
10068
10106
  export declare const PluginSignal: z.ZodObject<{
10069
10107
  kind: z.ZodEnum<{
10070
10108
  message: "message";
@@ -10561,9 +10599,6 @@ export declare interface ResolvedCredential {
10561
10599
 
10562
10600
  declare const ResolvedKayAppApprovalType: z.ZodObject<{
10563
10601
  kind: z.ZodLiteral<"message">;
10564
- localId: z.ZodString;
10565
- provider: z.ZodString;
10566
- unknownMessage: z.ZodString;
10567
10602
  fields: z.ZodObject<{
10568
10603
  body: z.ZodObject<{
10569
10604
  key: z.ZodString;
@@ -10574,6 +10609,9 @@ declare const ResolvedKayAppApprovalType: z.ZodObject<{
10574
10609
  max: z.ZodNumber;
10575
10610
  }, z.core.$strict>>;
10576
10611
  }, z.core.$strict>;
10612
+ localId: z.ZodString;
10613
+ provider: z.ZodString;
10614
+ unknownMessage: z.ZodString;
10577
10615
  presentation: z.ZodObject<{
10578
10616
  showAccount: z.ZodBoolean;
10579
10617
  recipient: z.ZodEnum<{
@@ -11487,6 +11525,47 @@ declare const SessionRelationship: z.ZodDiscriminatedUnion<[z.ZodObject<{
11487
11525
 
11488
11526
  declare type SessionRelationship = z.infer<typeof SessionRelationship>;
11489
11527
 
11528
+ export declare const ShellCommandOutcome: z.ZodObject<{
11529
+ exitCode: z.ZodNumber;
11530
+ envelope: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
11531
+ result: z.ZodOptional<z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
11532
+ }, z.core.$strict>;
11533
+
11534
+ export declare type ShellCommandOutcome = z.infer<typeof ShellCommandOutcome>;
11535
+
11536
+ export declare const ShellCommandRequest: z.ZodObject<{
11537
+ argv: z.ZodArray<z.ZodString>;
11538
+ cwd: z.ZodString;
11539
+ outcomes: z.ZodArray<z.ZodObject<{
11540
+ exitCode: z.ZodNumber;
11541
+ envelope: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
11542
+ result: z.ZodOptional<z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
11543
+ }, z.core.$strict>>;
11544
+ }, z.core.$strict>;
11545
+
11546
+ export declare type ShellCommandRequest = z.infer<typeof ShellCommandRequest>;
11547
+
11548
+ export declare const ShellCommandStep: z.ZodDiscriminatedUnion<[z.ZodObject<{
11549
+ kind: z.ZodLiteral<"invoke">;
11550
+ toolName: z.ZodEnum<{
11551
+ search: "search";
11552
+ read: "read";
11553
+ list: "list";
11554
+ write: "write";
11555
+ edit: "edit";
11556
+ delete: "delete";
11557
+ help: "help";
11558
+ }>;
11559
+ input: z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
11560
+ flags: z.ZodRecord<z.ZodString, z.ZodString>;
11561
+ }, z.core.$strict>, z.ZodObject<{
11562
+ kind: z.ZodLiteral<"finish">;
11563
+ exitCode: z.ZodNumber;
11564
+ stdout: z.ZodString;
11565
+ }, z.core.$strict>], "kind">;
11566
+
11567
+ export declare type ShellCommandStep = z.infer<typeof ShellCommandStep>;
11568
+
11490
11569
  /**
11491
11570
  * The largest epoch-millisecond time a `Date` can hold (about the year 275,760). A time outside
11492
11571
  * 0 to this bound has no date to show, so neither `observe` nor a read window accepts one.
package/dist/kay-app.js CHANGED
@@ -387,6 +387,46 @@ var JsonValue = z5.lazy(() => z5.union([
387
387
  var JsonObject = z5.record(z5.string(), JsonValue);
388
388
  var JsonSchema = z5.record(z5.string(), JsonValue);
389
389
 
390
+ // packages/plugin-protocol/dist/shell-commands.js
391
+ import { z as z6 } from "zod";
392
+ var PluginShellCommand = z6.strictObject({
393
+ name: z6.string().regex(/^[a-z][a-z0-9-]*$/),
394
+ aliases: z6.array(z6.string().regex(/^[a-z][a-z0-9-]*$/)).optional(),
395
+ endpoint: z6.string().min(1),
396
+ usage: z6.string().min(1)
397
+ });
398
+ var ShellCommandOutcome = z6.strictObject({
399
+ exitCode: z6.number().int(),
400
+ envelope: JsonValue,
401
+ result: JsonValue.optional()
402
+ });
403
+ var ShellCommandRequest = z6.strictObject({
404
+ argv: z6.array(z6.string()),
405
+ cwd: z6.string(),
406
+ outcomes: z6.array(ShellCommandOutcome).max(3)
407
+ });
408
+ var ShellCommandStep = z6.discriminatedUnion("kind", [
409
+ z6.strictObject({
410
+ kind: z6.literal("invoke"),
411
+ toolName: z6.enum([
412
+ "read",
413
+ "list",
414
+ "search",
415
+ "write",
416
+ "edit",
417
+ "delete",
418
+ "help"
419
+ ]),
420
+ input: z6.record(z6.string(), JsonValue),
421
+ flags: z6.record(z6.string(), z6.string())
422
+ }),
423
+ z6.strictObject({
424
+ kind: z6.literal("finish"),
425
+ exitCode: z6.number().int(),
426
+ stdout: z6.string()
427
+ })
428
+ ]);
429
+
390
430
  // packages/plugin-sdk/dist/kay-app/card-layout.js
391
431
  function element(type, props) {
392
432
  return { root: "root", elements: { root: { type, props } } };
@@ -447,7 +487,7 @@ function submit(label) {
447
487
  }
448
488
 
449
489
  // packages/plugin-sdk/dist/signals.js
450
- import { z as z6 } from "zod";
490
+ import { z as z7 } from "zod";
451
491
  function createFallbackOnlySignals() {
452
492
  const noStore = { status: "unavailable", reason: "no-store" };
453
493
  return {
@@ -477,23 +517,23 @@ var POINTER = /^[^\s\p{C}/?#]+$/u;
477
517
  var LABEL = /^[^\s,@\p{C}]+(?: [^\s,@\p{C}]+)*$/u;
478
518
  var RUN_ID = /^\P{Cc}+$/u;
479
519
  var POINTER_RULE = `1 to ${MAX_POINTER} characters with no whitespace, \`/\`, \`?\`, \`#\`, or control or invisible character`;
480
- var ObserveShape = z6.looseObject({
481
- detector: z6.looseObject({ id: z6.string(), version: z6.string() }),
482
- subject: z6.looseObject({ kind: z6.string(), key: z6.string().optional() }).optional(),
483
- after: z6.looseObject({ observationId: z6.unknown() }).optional(),
484
- reuse: z6.looseObject({ maxAgeMs: z6.unknown() }).optional(),
485
- source: z6.looseObject({
486
- sessionId: z6.string(),
487
- entryId: z6.string(),
488
- openerEntryId: z6.string().optional(),
489
- runId: z6.string().optional(),
490
- occurredAtMs: z6.unknown().optional()
520
+ var ObserveShape = z7.looseObject({
521
+ detector: z7.looseObject({ id: z7.string(), version: z7.string() }),
522
+ subject: z7.looseObject({ kind: z7.string(), key: z7.string().optional() }).optional(),
523
+ after: z7.looseObject({ observationId: z7.unknown() }).optional(),
524
+ reuse: z7.looseObject({ maxAgeMs: z7.unknown() }).optional(),
525
+ source: z7.looseObject({
526
+ sessionId: z7.string(),
527
+ entryId: z7.string(),
528
+ openerEntryId: z7.string().optional(),
529
+ runId: z7.string().optional(),
530
+ occurredAtMs: z7.unknown().optional()
491
531
  }),
492
- questions: z6.record(z6.string(), z6.unknown())
532
+ questions: z7.record(z7.string(), z7.unknown())
493
533
  });
494
- var ChoiceQuestion = z6.looseObject({
495
- type: z6.literal("choice"),
496
- criteria: z6.record(z6.string(), z6.unknown())
534
+ var ChoiceQuestion = z7.looseObject({
535
+ type: z7.literal("choice"),
536
+ criteria: z7.record(z7.string(), z7.unknown())
497
537
  });
498
538
  var fits = (value, grammar) => value.length <= MAX_NAME && grammar.test(value);
499
539
  var isWhole = (value, min) => typeof value === "number" && Number.isSafeInteger(value) && value >= min && value <= SIGNAL_TIME_MAX_MS;
@@ -573,10 +613,10 @@ function grammarProblem(input) {
573
613
  }
574
614
  return void 0;
575
615
  }
576
- var EchoText = z6.string().catch("");
577
- var Echo = z6.object({
578
- detector: z6.object({ id: EchoText, version: EchoText }).catch({ id: "", version: "" }),
579
- source: z6.object({ sessionId: EchoText, entryId: EchoText }).catch({ sessionId: "", entryId: "" })
616
+ var EchoText = z7.string().catch("");
617
+ var Echo = z7.object({
618
+ detector: z7.object({ id: EchoText, version: EchoText }).catch({ id: "", version: "" }),
619
+ source: z7.object({ sessionId: EchoText, entryId: EchoText }).catch({ sessionId: "", entryId: "" })
580
620
  }).catch({
581
621
  detector: { id: "", version: "" },
582
622
  source: { sessionId: "", entryId: "" }
@@ -1103,6 +1143,9 @@ export {
1103
1143
  SIGNAL_TIME_MAX_MS,
1104
1144
  STORED_TRANSCRIPT_MESSAGE_FILTER,
1105
1145
  STORED_TRANSCRIPT_MESSAGE_KINDS,
1146
+ ShellCommandOutcome,
1147
+ ShellCommandRequest,
1148
+ ShellCommandStep,
1106
1149
  UriConflictError,
1107
1150
  UriNotFoundError,
1108
1151
  UriProviderError,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yaklabs-ai/plugin-sdk",
3
- "version": "0.51.0",
3
+ "version": "0.52.1",
4
4
  "description": "The Kay plugin SDK — types and helpers for authoring a Kay directory plugin.",
5
5
  "author": "YakLabs",
6
6
  "type": "module",