@yaklabs-ai/plugin-sdk 0.51.0 → 0.52.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
@@ -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.0"
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.0" },
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.0`).
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.0`).
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.0`. 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.0",
5
5
  "target": "npm",
6
6
  "firstPartyLicense": "MIT",
7
7
  "bundled": [
@@ -2459,7 +2459,7 @@ declare const KAY_PLUGIN_PROTOCOL_VERSION: "kay.plugin.v1";
2459
2459
  *
2460
2460
  * 0.51.0 adds flag-dependent title, icon and panel presence on rail entries.
2461
2461
  */
2462
- declare const KAY_PLUGIN_SDK_VERSION: "0.51.0";
2462
+ declare const KAY_PLUGIN_SDK_VERSION: "0.52.0";
2463
2463
 
2464
2464
  declare const KAY_PLUGIN_TARGET_NAMES: readonly ["kay.agent", "kay.app", "kay.ui"];
2465
2465
 
@@ -2513,7 +2513,7 @@ declare const KAY_PLUGIN_PROTOCOL_VERSION: "kay.plugin.v1";
2513
2513
  *
2514
2514
  * 0.51.0 adds flag-dependent title, icon and panel presence on rail entries.
2515
2515
  */
2516
- declare const KAY_PLUGIN_SDK_VERSION: "0.51.0";
2516
+ declare const KAY_PLUGIN_SDK_VERSION: "0.52.0";
2517
2517
 
2518
2518
  declare const KAY_PLUGIN_TARGET_NAMES: readonly ["kay.agent", "kay.app", "kay.ui"];
2519
2519
 
@@ -4937,6 +4937,20 @@ declare const ResolvedPluginContractV1: z.ZodObject<{
4937
4937
  }, z.core.$strict>>;
4938
4938
  consumesAuthServices: z.ZodArray<z.ZodString>;
4939
4939
  explicitDependencies: z.ZodArray<z.ZodString>;
4940
+ dataDirSharedWith: z.ZodOptional<z.ZodString>;
4941
+ workloadPurposes: z.ZodOptional<z.ZodArray<z.ZodObject<{
4942
+ purpose: z.ZodString;
4943
+ workloadClass: z.ZodEnum<{
4944
+ dreaming: "dreaming";
4945
+ hindsight: "hindsight";
4946
+ }>;
4947
+ }, z.core.$strict>>>;
4948
+ shellCommands: z.ZodOptional<z.ZodArray<z.ZodObject<{
4949
+ name: z.ZodString;
4950
+ aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
4951
+ usage: z.ZodString;
4952
+ endpointId: z.ZodString;
4953
+ }, z.core.$strict>>>;
4940
4954
  authServices: z.ZodArray<z.ZodObject<{
4941
4955
  localId: z.ZodString;
4942
4956
  globalId: z.ZodString;
@@ -4944,6 +4958,30 @@ declare const ResolvedPluginContractV1: z.ZodObject<{
4944
4958
  summary: z.ZodOptional<z.ZodString>;
4945
4959
  schemes: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[z.ZodObject<{
4946
4960
  exchange: z.ZodLiteral<"pkce">;
4961
+ byoocProfile: z.ZodOptional<z.ZodObject<{
4962
+ displayName: z.ZodString;
4963
+ fields: z.ZodArray<z.ZodObject<{
4964
+ id: z.ZodString;
4965
+ label: z.ZodString;
4966
+ optional: z.ZodOptional<z.ZodBoolean>;
4967
+ validation: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
4968
+ kind: z.ZodLiteral<"uuid">;
4969
+ }, z.core.$strict>, z.ZodObject<{
4970
+ kind: z.ZodLiteral<"suffix">;
4971
+ value: z.ZodString;
4972
+ }, z.core.$strict>], "kind">>;
4973
+ failureMessage: z.ZodOptional<z.ZodString>;
4974
+ }, z.core.$strict>>;
4975
+ setup: z.ZodObject<{
4976
+ steps: z.ZodArray<z.ZodString>;
4977
+ notes: z.ZodArray<z.ZodString>;
4978
+ url: z.ZodURL;
4979
+ }, z.core.$strict>;
4980
+ endpointTemplates: z.ZodOptional<z.ZodObject<{
4981
+ authorizationUrl: z.ZodString;
4982
+ tokenUrl: z.ZodString;
4983
+ }, z.core.$strict>>;
4984
+ }, z.core.$strict>>;
4947
4985
  clientSuppliers: z.ZodArray<z.ZodEnum<{
4948
4986
  user: "user";
4949
4987
  kay: "kay";
@@ -5142,6 +5180,19 @@ declare const ResolvedPluginContractV1: z.ZodObject<{
5142
5180
  }>;
5143
5181
  mimeTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
5144
5182
  successNote: z.ZodOptional<z.ZodString>;
5183
+ round: z.ZodOptional<z.ZodObject<{
5184
+ scopes: z.ZodArray<z.ZodString>;
5185
+ extraAuthorizeParams: z.ZodRecord<z.ZodString, z.ZodString>;
5186
+ redirectParam: z.ZodString;
5187
+ requiresGrantedScope: z.ZodString;
5188
+ supersededByScopes: z.ZodArray<z.ZodString>;
5189
+ purpose: z.ZodString;
5190
+ displayNoun: z.ZodString;
5191
+ }, z.core.$strict>>;
5192
+ completion: z.ZodOptional<z.ZodObject<{
5193
+ pluginId: z.ZodString;
5194
+ moduleId: z.ZodString;
5195
+ }, z.core.$strict>>;
5145
5196
  }, z.core.$strict>>;
5146
5197
  }, z.core.$strict>>;
5147
5198
  service: z.ZodString;
@@ -5162,9 +5213,9 @@ declare const ResolvedPluginContractV1: z.ZodObject<{
5162
5213
  dataDir: "dataDir";
5163
5214
  }>;
5164
5215
  operations: z.ZodArray<z.ZodEnum<{
5165
- open: "open";
5166
5216
  read: "read";
5167
5217
  write: "write";
5218
+ open: "open";
5168
5219
  }>>;
5169
5220
  }, z.core.$strict>>>;
5170
5221
  events: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -5176,8 +5227,8 @@ declare const ResolvedPluginContractV1: z.ZodObject<{
5176
5227
  }, z.core.$strict>>>;
5177
5228
  endpoints: z.ZodOptional<z.ZodArray<z.ZodObject<{
5178
5229
  operations: z.ZodArray<z.ZodEnum<{
5179
- register: "register";
5180
5230
  invoke: "invoke";
5231
+ register: "register";
5181
5232
  }>>;
5182
5233
  endpoint: z.ZodString;
5183
5234
  }, z.core.$strict>>>;
@@ -5237,6 +5288,19 @@ declare const ResolvedPluginContractV1: z.ZodObject<{
5237
5288
  }>;
5238
5289
  mimeTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
5239
5290
  successNote: z.ZodOptional<z.ZodString>;
5291
+ round: z.ZodOptional<z.ZodObject<{
5292
+ scopes: z.ZodArray<z.ZodString>;
5293
+ extraAuthorizeParams: z.ZodRecord<z.ZodString, z.ZodString>;
5294
+ redirectParam: z.ZodString;
5295
+ requiresGrantedScope: z.ZodString;
5296
+ supersededByScopes: z.ZodArray<z.ZodString>;
5297
+ purpose: z.ZodString;
5298
+ displayNoun: z.ZodString;
5299
+ }, z.core.$strict>>;
5300
+ completion: z.ZodOptional<z.ZodObject<{
5301
+ pluginId: z.ZodString;
5302
+ moduleId: z.ZodString;
5303
+ }, z.core.$strict>>;
5240
5304
  }, z.core.$strict>>;
5241
5305
  }, z.core.$strict>>;
5242
5306
  service: z.ZodString;
@@ -5257,9 +5321,9 @@ declare const ResolvedPluginContractV1: z.ZodObject<{
5257
5321
  dataDir: "dataDir";
5258
5322
  }>;
5259
5323
  operations: z.ZodArray<z.ZodEnum<{
5260
- open: "open";
5261
5324
  read: "read";
5262
5325
  write: "write";
5326
+ open: "open";
5263
5327
  }>>;
5264
5328
  }, z.core.$strict>>>;
5265
5329
  events: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -5271,8 +5335,8 @@ declare const ResolvedPluginContractV1: z.ZodObject<{
5271
5335
  }, z.core.$strict>>>;
5272
5336
  endpoints: z.ZodOptional<z.ZodArray<z.ZodObject<{
5273
5337
  operations: z.ZodArray<z.ZodEnum<{
5274
- register: "register";
5275
5338
  invoke: "invoke";
5339
+ register: "register";
5276
5340
  }>>;
5277
5341
  endpoint: z.ZodString;
5278
5342
  }, z.core.$strict>>>;
@@ -5332,6 +5396,19 @@ declare const ResolvedPluginContractV1: z.ZodObject<{
5332
5396
  }>;
5333
5397
  mimeTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
5334
5398
  successNote: z.ZodOptional<z.ZodString>;
5399
+ round: z.ZodOptional<z.ZodObject<{
5400
+ scopes: z.ZodArray<z.ZodString>;
5401
+ extraAuthorizeParams: z.ZodRecord<z.ZodString, z.ZodString>;
5402
+ redirectParam: z.ZodString;
5403
+ requiresGrantedScope: z.ZodString;
5404
+ supersededByScopes: z.ZodArray<z.ZodString>;
5405
+ purpose: z.ZodString;
5406
+ displayNoun: z.ZodString;
5407
+ }, z.core.$strict>>;
5408
+ completion: z.ZodOptional<z.ZodObject<{
5409
+ pluginId: z.ZodString;
5410
+ moduleId: z.ZodString;
5411
+ }, z.core.$strict>>;
5335
5412
  }, z.core.$strict>>;
5336
5413
  }, z.core.$strict>>;
5337
5414
  service: z.ZodString;
@@ -5352,9 +5429,9 @@ declare const ResolvedPluginContractV1: z.ZodObject<{
5352
5429
  dataDir: "dataDir";
5353
5430
  }>;
5354
5431
  operations: z.ZodArray<z.ZodEnum<{
5355
- open: "open";
5356
5432
  read: "read";
5357
5433
  write: "write";
5434
+ open: "open";
5358
5435
  }>>;
5359
5436
  }, z.core.$strict>>>;
5360
5437
  events: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -5366,8 +5443,8 @@ declare const ResolvedPluginContractV1: z.ZodObject<{
5366
5443
  }, z.core.$strict>>>;
5367
5444
  endpoints: z.ZodOptional<z.ZodArray<z.ZodObject<{
5368
5445
  operations: z.ZodArray<z.ZodEnum<{
5369
- register: "register";
5370
5446
  invoke: "invoke";
5447
+ register: "register";
5371
5448
  }>>;
5372
5449
  endpoint: z.ZodString;
5373
5450
  }, z.core.$strict>>>;
@@ -5392,6 +5469,8 @@ declare const ResolvedPluginContractV1: z.ZodObject<{
5392
5469
  }, z.core.$strict>;
5393
5470
  }, z.core.$strict>>;
5394
5471
  kayAgentUriModules: z.ZodOptional<z.ZodArray<z.ZodObject<{
5472
+ revisionBacked: z.ZodOptional<z.ZodLiteral<true>>;
5473
+ mailCalibrationSource: z.ZodOptional<z.ZodLiteral<true>>;
5395
5474
  screenActions: z.ZodExactOptional<z.ZodObject<{
5396
5475
  scheme: z.ZodString;
5397
5476
  hosts: z.ZodArray<z.ZodString>;
@@ -5451,8 +5530,8 @@ declare const ResolvedPluginContractV1: z.ZodObject<{
5451
5530
  description: z.ZodString;
5452
5531
  operations: z.ZodExactOptional<z.ZodArray<z.ZodEnum<{
5453
5532
  search: "search";
5454
- list: "list";
5455
5533
  read: "read";
5534
+ list: "list";
5456
5535
  write: "write";
5457
5536
  edit: "edit";
5458
5537
  delete: "delete";
@@ -5460,8 +5539,8 @@ declare const ResolvedPluginContractV1: z.ZodObject<{
5460
5539
  }>>>;
5461
5540
  operationDocs: z.ZodExactOptional<z.ZodRecord<z.ZodEnum<{
5462
5541
  search: "search";
5463
- list: "list";
5464
5542
  read: "read";
5543
+ list: "list";
5465
5544
  write: "write";
5466
5545
  edit: "edit";
5467
5546
  delete: "delete";
@@ -5469,8 +5548,8 @@ declare const ResolvedPluginContractV1: z.ZodObject<{
5469
5548
  }> & z.core.$partial, z.ZodString>>;
5470
5549
  operationDefaults: z.ZodExactOptional<z.ZodRecord<z.ZodEnum<{
5471
5550
  search: "search";
5472
- list: "list";
5473
5551
  read: "read";
5552
+ list: "list";
5474
5553
  write: "write";
5475
5554
  edit: "edit";
5476
5555
  delete: "delete";
@@ -5533,8 +5612,8 @@ declare const ResolvedPluginContractV1: z.ZodObject<{
5533
5612
  action: z.ZodString;
5534
5613
  operations: z.ZodExactOptional<z.ZodArray<z.ZodEnum<{
5535
5614
  search: "search";
5536
- list: "list";
5537
5615
  read: "read";
5616
+ list: "list";
5538
5617
  write: "write";
5539
5618
  edit: "edit";
5540
5619
  delete: "delete";
@@ -5546,8 +5625,8 @@ declare const ResolvedPluginContractV1: z.ZodObject<{
5546
5625
  public: z.ZodLiteral<true>;
5547
5626
  operations: z.ZodExactOptional<z.ZodArray<z.ZodEnum<{
5548
5627
  search: "search";
5549
- list: "list";
5550
5628
  read: "read";
5629
+ list: "list";
5551
5630
  write: "write";
5552
5631
  edit: "edit";
5553
5632
  delete: "delete";
@@ -5669,9 +5748,9 @@ declare const ResolvedPluginContractV1: z.ZodObject<{
5669
5748
  }, z.core.$strict>>>;
5670
5749
  kayAppTools: z.ZodOptional<z.ZodArray<z.ZodObject<{
5671
5750
  description: z.ZodOptional<z.ZodString>;
5672
- localId: z.ZodString;
5673
- displayName: z.ZodOptional<z.ZodString>;
5674
5751
  toolName: z.ZodString;
5752
+ displayName: z.ZodOptional<z.ZodString>;
5753
+ localId: z.ZodString;
5675
5754
  parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<authoringCommonSchemas.JsonValue, unknown, z.core.$ZodTypeInternals<authoringCommonSchemas.JsonValue, unknown>>>>;
5676
5755
  executionMode: z.ZodOptional<z.ZodEnum<{
5677
5756
  sequential: "sequential";
@@ -5717,9 +5796,6 @@ declare const ResolvedPluginContractV1: z.ZodObject<{
5717
5796
  }, z.core.$strict>>>;
5718
5797
  kayAppApprovalTypes: z.ZodOptional<z.ZodArray<z.ZodObject<{
5719
5798
  kind: z.ZodLiteral<"message">;
5720
- localId: z.ZodString;
5721
- provider: z.ZodString;
5722
- unknownMessage: z.ZodString;
5723
5799
  fields: z.ZodObject<{
5724
5800
  body: z.ZodObject<{
5725
5801
  key: z.ZodString;
@@ -5730,6 +5806,9 @@ declare const ResolvedPluginContractV1: z.ZodObject<{
5730
5806
  max: z.ZodNumber;
5731
5807
  }, z.core.$strict>>;
5732
5808
  }, z.core.$strict>;
5809
+ localId: z.ZodString;
5810
+ provider: z.ZodString;
5811
+ unknownMessage: z.ZodString;
5733
5812
  presentation: z.ZodObject<{
5734
5813
  showAccount: z.ZodBoolean;
5735
5814
  recipient: z.ZodEnum<{
@@ -6047,6 +6126,7 @@ declare const ResolvedPluginContractV1: z.ZodObject<{
6047
6126
  "automations.read": "automations.read";
6048
6127
  "automations.run": "automations.run";
6049
6128
  "shared-artifacts.read": "shared-artifacts.read";
6129
+ "projects.manage": "projects.manage";
6050
6130
  "workspace.place-pane": "workspace.place-pane";
6051
6131
  "workspace.pane-header": "workspace.pane-header";
6052
6132
  "workspace.arrange": "workspace.arrange";
@@ -2792,7 +2792,7 @@ declare const KAY_PLUGIN_PROTOCOL_VERSION: "kay.plugin.v1";
2792
2792
  *
2793
2793
  * 0.51.0 adds flag-dependent title, icon and panel presence on rail entries.
2794
2794
  */
2795
- declare const KAY_PLUGIN_SDK_VERSION: "0.51.0";
2795
+ declare const KAY_PLUGIN_SDK_VERSION: "0.52.0";
2796
2796
 
2797
2797
  declare const KAY_PLUGIN_TARGET_NAMES: readonly ["kay.agent", "kay.app", "kay.ui"];
2798
2798
 
@@ -5092,8 +5092,8 @@ declare const PluginCapabilityRefusalV1: z.ZodObject<{
5092
5092
  scheme: z.ZodString;
5093
5093
  verb: z.ZodEnum<{
5094
5094
  search: "search";
5095
- list: "list";
5096
5095
  read: "read";
5096
+ list: "list";
5097
5097
  write: "write";
5098
5098
  edit: "edit";
5099
5099
  delete: "delete";
@@ -5509,6 +5509,34 @@ declare const PluginNamespace: z.ZodString;
5509
5509
 
5510
5510
  declare type PluginNamespace = z.infer<typeof PluginNamespace>;
5511
5511
 
5512
+ export declare interface PluginResourcePickCompletion {
5513
+ readonly serviceId: string;
5514
+ readonly schemeId: string;
5515
+ readonly accountId: string;
5516
+ readonly capabilityServiceId?: string;
5517
+ readonly identityEmail?: string;
5518
+ readonly pickedResourceIds: readonly string[];
5519
+ readonly accessToken: string;
5520
+ readonly accountAccessToken: string;
5521
+ readonly traceId: string;
5522
+ }
5523
+
5524
+ export declare type PluginResourcePickHandler = (completion: PluginResourcePickCompletion) => Promise<PluginResourcePickResult>;
5525
+
5526
+ export declare type PluginResourcePickResult = {
5527
+ readonly ok: true;
5528
+ readonly recorded: number;
5529
+ readonly resources: readonly {
5530
+ readonly id: string;
5531
+ readonly uri: string;
5532
+ readonly title?: string;
5533
+ readonly mimeType?: string;
5534
+ }[];
5535
+ } | {
5536
+ readonly ok: false;
5537
+ readonly reason: string;
5538
+ };
5539
+
5512
5540
  /** What one connection flow unlocks and when an agent should choose it; grants no authority. */
5513
5541
  export declare type PluginSchemeAgentHint = string;
5514
5542
 
package/dist/kay-app.d.ts CHANGED
@@ -2908,7 +2908,7 @@ declare const KAY_PLUGIN_PROTOCOL_VERSION: "kay.plugin.v1";
2908
2908
  *
2909
2909
  * 0.51.0 adds flag-dependent title, icon and panel presence on rail entries.
2910
2910
  */
2911
- declare const KAY_PLUGIN_SDK_VERSION: "0.51.0";
2911
+ declare const KAY_PLUGIN_SDK_VERSION: "0.52.0";
2912
2912
 
2913
2913
  declare const KAY_PLUGIN_TARGET_NAMES: readonly ["kay.agent", "kay.app", "kay.ui"];
2914
2914
 
@@ -3230,6 +3230,8 @@ export declare type KayAppActivate = (app: KayAppPluginApi) => void | Promise<vo
3230
3230
  */
3231
3231
  export declare interface KayAppAgentDefinition {
3232
3232
  readonly name: string;
3233
+ readonly promptLayout?: "no-tool-judgment" | "outcome-handler";
3234
+ readonly idleReplies?: readonly string[];
3233
3235
  readonly description?: string;
3234
3236
  readonly icon?: string;
3235
3237
  /** Defaults to `hidden` when absent - see {@link KayAppAgentDefinitionVisibility}. */
@@ -5268,6 +5270,9 @@ export declare interface KayAppPhaseShiftSessionEvent extends KayAppSessionEvent
5268
5270
  * physical sandbox against ambient Node imports.
5269
5271
  */
5270
5272
  export declare interface KayAppPluginApi {
5273
+ readonly resourcePicks?: {
5274
+ registerCompletion(moduleId: string, handler: PluginResourcePickHandler): void;
5275
+ };
5271
5276
  readonly mcp: KayAppMcp;
5272
5277
  /** This plugin's canonical id (already validated by the host registry). */
5273
5278
  readonly id: string;
@@ -7660,6 +7665,7 @@ export declare interface KayAppSystemPrompt {
7660
7665
  }
7661
7666
 
7662
7667
  export declare interface KayAppSystemPromptFragment {
7668
+ readonly analyticsFamily?: string;
7663
7669
  /**
7664
7670
  * The facts the text varies by. Chats with the same values share one rendered text, so the
7665
7671
  * text must depend on nothing else about the chat.
@@ -10065,6 +10071,34 @@ export declare interface PluginProductEventSend {
10065
10071
  readonly subjectUri?: string;
10066
10072
  }
10067
10073
 
10074
+ declare interface PluginResourcePickCompletion {
10075
+ readonly serviceId: string;
10076
+ readonly schemeId: string;
10077
+ readonly accountId: string;
10078
+ readonly capabilityServiceId?: string;
10079
+ readonly identityEmail?: string;
10080
+ readonly pickedResourceIds: readonly string[];
10081
+ readonly accessToken: string;
10082
+ readonly accountAccessToken: string;
10083
+ readonly traceId: string;
10084
+ }
10085
+
10086
+ declare type PluginResourcePickHandler = (completion: PluginResourcePickCompletion) => Promise<PluginResourcePickResult>;
10087
+
10088
+ declare type PluginResourcePickResult = {
10089
+ readonly ok: true;
10090
+ readonly recorded: number;
10091
+ readonly resources: readonly {
10092
+ readonly id: string;
10093
+ readonly uri: string;
10094
+ readonly title?: string;
10095
+ readonly mimeType?: string;
10096
+ }[];
10097
+ } | {
10098
+ readonly ok: false;
10099
+ readonly reason: string;
10100
+ };
10101
+
10068
10102
  export declare const PluginSignal: z.ZodObject<{
10069
10103
  kind: z.ZodEnum<{
10070
10104
  message: "message";
@@ -10561,9 +10595,6 @@ export declare interface ResolvedCredential {
10561
10595
 
10562
10596
  declare const ResolvedKayAppApprovalType: z.ZodObject<{
10563
10597
  kind: z.ZodLiteral<"message">;
10564
- localId: z.ZodString;
10565
- provider: z.ZodString;
10566
- unknownMessage: z.ZodString;
10567
10598
  fields: z.ZodObject<{
10568
10599
  body: z.ZodObject<{
10569
10600
  key: z.ZodString;
@@ -10574,6 +10605,9 @@ declare const ResolvedKayAppApprovalType: z.ZodObject<{
10574
10605
  max: z.ZodNumber;
10575
10606
  }, z.core.$strict>>;
10576
10607
  }, z.core.$strict>;
10608
+ localId: z.ZodString;
10609
+ provider: z.ZodString;
10610
+ unknownMessage: z.ZodString;
10577
10611
  presentation: z.ZodObject<{
10578
10612
  showAccount: z.ZodBoolean;
10579
10613
  recipient: z.ZodEnum<{
@@ -11487,6 +11521,47 @@ declare const SessionRelationship: z.ZodDiscriminatedUnion<[z.ZodObject<{
11487
11521
 
11488
11522
  declare type SessionRelationship = z.infer<typeof SessionRelationship>;
11489
11523
 
11524
+ export declare const ShellCommandOutcome: z.ZodObject<{
11525
+ exitCode: z.ZodNumber;
11526
+ envelope: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
11527
+ result: z.ZodOptional<z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
11528
+ }, z.core.$strict>;
11529
+
11530
+ export declare type ShellCommandOutcome = z.infer<typeof ShellCommandOutcome>;
11531
+
11532
+ export declare const ShellCommandRequest: z.ZodObject<{
11533
+ argv: z.ZodArray<z.ZodString>;
11534
+ cwd: z.ZodString;
11535
+ outcomes: z.ZodArray<z.ZodObject<{
11536
+ exitCode: z.ZodNumber;
11537
+ envelope: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
11538
+ result: z.ZodOptional<z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
11539
+ }, z.core.$strict>>;
11540
+ }, z.core.$strict>;
11541
+
11542
+ export declare type ShellCommandRequest = z.infer<typeof ShellCommandRequest>;
11543
+
11544
+ export declare const ShellCommandStep: z.ZodDiscriminatedUnion<[z.ZodObject<{
11545
+ kind: z.ZodLiteral<"invoke">;
11546
+ toolName: z.ZodEnum<{
11547
+ search: "search";
11548
+ read: "read";
11549
+ list: "list";
11550
+ write: "write";
11551
+ edit: "edit";
11552
+ delete: "delete";
11553
+ help: "help";
11554
+ }>;
11555
+ input: z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
11556
+ flags: z.ZodRecord<z.ZodString, z.ZodString>;
11557
+ }, z.core.$strict>, z.ZodObject<{
11558
+ kind: z.ZodLiteral<"finish">;
11559
+ exitCode: z.ZodNumber;
11560
+ stdout: z.ZodString;
11561
+ }, z.core.$strict>], "kind">;
11562
+
11563
+ export declare type ShellCommandStep = z.infer<typeof ShellCommandStep>;
11564
+
11490
11565
  /**
11491
11566
  * The largest epoch-millisecond time a `Date` can hold (about the year 275,760). A time outside
11492
11567
  * 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.0",
4
4
  "description": "The Kay plugin SDK — types and helpers for authoring a Kay directory plugin.",
5
5
  "author": "YakLabs",
6
6
  "type": "module",