@yaklabs-ai/plugin-protocol 0.55.0 → 0.55.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.55.0"
14
+ "@bonsai/plugin-protocol": "npm:@yaklabs-ai/plugin-protocol@^0.55.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.55.0",
4
+ "version": "0.55.1",
5
5
  "target": "npm",
6
6
  "firstPartyLicense": "MIT",
7
7
  "bundled": [
package/dist/index.d.ts CHANGED
@@ -122,6 +122,9 @@ export declare const AgentToolContribution: z.ZodObject<{
122
122
  resourcePrefix: z.ZodOptional<z.ZodString>;
123
123
  resourceArgs: z.ZodOptional<z.ZodArray<z.ZodString>>;
124
124
  resourceTrim: z.ZodOptional<z.ZodLiteral<true>>;
125
+ resourcePathNormalization: z.ZodOptional<z.ZodObject<{
126
+ preserveUriSchemes: z.ZodOptional<z.ZodArray<z.ZodString>>;
127
+ }, z.core.$strict>>;
125
128
  defaultPermission: z.ZodOptional<z.ZodEnum<{
126
129
  never: "never";
127
130
  allow: "allow";
@@ -144,10 +147,10 @@ export declare const AgentToolContribution: z.ZodObject<{
144
147
  ruleKey: z.ZodOptional<z.ZodString>;
145
148
  }, z.core.$strict>>>;
146
149
  }, z.core.$strict>>;
147
- localId: z.ZodString;
150
+ description: z.ZodOptional<z.ZodString>;
148
151
  toolName: z.ZodString;
149
152
  displayName: z.ZodOptional<z.ZodString>;
150
- description: z.ZodOptional<z.ZodString>;
153
+ localId: z.ZodString;
151
154
  }, z.core.$strict>;
152
155
 
153
156
  export declare type AgentToolContribution = z.infer<typeof AgentToolContribution>;
@@ -2232,6 +2235,9 @@ declare const canonicalContributionSchemas: {
2232
2235
  resourcePrefix: z.ZodOptional<z.ZodString>;
2233
2236
  resourceArgs: z.ZodOptional<z.ZodArray<z.ZodString>>;
2234
2237
  resourceTrim: z.ZodOptional<z.ZodLiteral<true>>;
2238
+ resourcePathNormalization: z.ZodOptional<z.ZodObject<{
2239
+ preserveUriSchemes: z.ZodOptional<z.ZodArray<z.ZodString>>;
2240
+ }, z.core.$strict>>;
2235
2241
  defaultPermission: z.ZodOptional<z.ZodEnum<{
2236
2242
  never: "never";
2237
2243
  allow: "allow";
@@ -2254,6 +2260,9 @@ declare const canonicalContributionSchemas: {
2254
2260
  ruleKey: z.ZodOptional<z.ZodString>;
2255
2261
  }, z.core.$strict>>>;
2256
2262
  }, z.core.$strict>>;
2263
+ availability: z.ZodOptional<z.ZodObject<{
2264
+ scope: z.ZodLiteral<"app">;
2265
+ }, z.core.$strict>>;
2257
2266
  localId: z.ZodString;
2258
2267
  toolName: z.ZodString;
2259
2268
  displayName: z.ZodOptional<z.ZodString>;
@@ -2271,6 +2280,9 @@ declare const canonicalContributionSchemas: {
2271
2280
  resourcePrefix: z.ZodOptional<z.ZodString>;
2272
2281
  resourceArgs: z.ZodOptional<z.ZodArray<z.ZodString>>;
2273
2282
  resourceTrim: z.ZodOptional<z.ZodLiteral<true>>;
2283
+ resourcePathNormalization: z.ZodOptional<z.ZodObject<{
2284
+ preserveUriSchemes: z.ZodOptional<z.ZodArray<z.ZodString>>;
2285
+ }, z.core.$strict>>;
2274
2286
  defaultPermission: z.ZodOptional<z.ZodEnum<{
2275
2287
  never: "never";
2276
2288
  allow: "allow";
@@ -2315,6 +2327,9 @@ declare const canonicalContributionSchemas: {
2315
2327
  resourcePrefix: z.ZodOptional<z.ZodString>;
2316
2328
  resourceArgs: z.ZodOptional<z.ZodArray<z.ZodString>>;
2317
2329
  resourceTrim: z.ZodOptional<z.ZodLiteral<true>>;
2330
+ resourcePathNormalization: z.ZodOptional<z.ZodObject<{
2331
+ preserveUriSchemes: z.ZodOptional<z.ZodArray<z.ZodString>>;
2332
+ }, z.core.$strict>>;
2318
2333
  defaultPermission: z.ZodOptional<z.ZodEnum<{
2319
2334
  never: "never";
2320
2335
  allow: "allow";
@@ -2337,10 +2352,10 @@ declare const canonicalContributionSchemas: {
2337
2352
  ruleKey: z.ZodOptional<z.ZodString>;
2338
2353
  }, z.core.$strict>>>;
2339
2354
  }, z.core.$strict>>;
2340
- localId: z.ZodString;
2355
+ description: z.ZodOptional<z.ZodString>;
2341
2356
  toolName: z.ZodString;
2342
2357
  displayName: z.ZodOptional<z.ZodString>;
2343
- description: z.ZodOptional<z.ZodString>;
2358
+ localId: z.ZodString;
2344
2359
  }, z.core.$strict>;
2345
2360
  ConverterContribution: z.ZodObject<{
2346
2361
  localId: z.ZodString;
@@ -2352,6 +2367,7 @@ declare const canonicalContributionSchemas: {
2352
2367
  UriModuleContribution: z.ZodObject<{
2353
2368
  authService: z.ZodOptional<z.ZodString>;
2354
2369
  authScheme: z.ZodOptional<z.ZodString>;
2370
+ requiredScopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
2355
2371
  knownResources: z.ZodOptional<z.ZodLiteral<true>>;
2356
2372
  describesOperations: z.ZodOptional<z.ZodLiteral<true>>;
2357
2373
  looksUpWebLinks: z.ZodOptional<z.ZodLiteral<true>>;
@@ -3248,6 +3264,7 @@ declare const canonicalContributionSchemas: {
3248
3264
  "connect-flows.read": "connect-flows.read";
3249
3265
  "connect-flows.dismiss": "connect-flows.dismiss";
3250
3266
  "support.report": "support.report";
3267
+ "report-evidence.read": "report-evidence.read";
3251
3268
  "navigation.open-page": "navigation.open-page";
3252
3269
  "sessions.create": "sessions.create";
3253
3270
  "models.complete": "models.complete";
@@ -3285,6 +3302,7 @@ declare const canonicalContributionSchemas: {
3285
3302
  "connect-flows.read": "connect-flows.read";
3286
3303
  "connect-flows.dismiss": "connect-flows.dismiss";
3287
3304
  "support.report": "support.report";
3305
+ "report-evidence.read": "report-evidence.read";
3288
3306
  "navigation.open-page": "navigation.open-page";
3289
3307
  "sessions.create": "sessions.create";
3290
3308
  "models.complete": "models.complete";
@@ -3390,6 +3408,7 @@ declare const canonicalContributionSchemas: {
3390
3408
  "connect-flows.read": "connect-flows.read";
3391
3409
  "connect-flows.dismiss": "connect-flows.dismiss";
3392
3410
  "support.report": "support.report";
3411
+ "report-evidence.read": "report-evidence.read";
3393
3412
  "navigation.open-page": "navigation.open-page";
3394
3413
  "sessions.create": "sessions.create";
3395
3414
  "models.complete": "models.complete";
@@ -3444,6 +3463,7 @@ declare const canonicalContributionSchemas: {
3444
3463
  "connect-flows.read": "connect-flows.read";
3445
3464
  "connect-flows.dismiss": "connect-flows.dismiss";
3446
3465
  "support.report": "support.report";
3466
+ "report-evidence.read": "report-evidence.read";
3447
3467
  "navigation.open-page": "navigation.open-page";
3448
3468
  "sessions.create": "sessions.create";
3449
3469
  "models.complete": "models.complete";
@@ -3514,9 +3534,9 @@ declare const canonicalContributionSchemas: {
3514
3534
  resource: "resource";
3515
3535
  storage: "storage";
3516
3536
  uriModule: "uriModule";
3537
+ app: "app";
3517
3538
  authService: "authService";
3518
3539
  command: "command";
3519
- app: "app";
3520
3540
  skill: "skill";
3521
3541
  converter: "converter";
3522
3542
  artifactUriModule: "artifactUriModule";
@@ -4924,8 +4944,12 @@ export declare const KAY_PLUGIN_PROTOCOL_VERSION: "kay.plugin.v1";
4924
4944
  *
4925
4945
  * 0.55.0 carries managed MCP calls over resource writes in both daemon and plugin-host code.
4926
4946
  * Existing agent and background MCP call shapes remain supported.
4947
+ *
4948
+ * 0.55.1 adds canonical path resources on declared tool permissions, asynchronous display-only
4949
+ * tool previews with cancellation, app-scoped availability snapshots and app-target output
4950
+ * artifact usage declarations. A plugin using these declares ^0.55.1.
4927
4951
  */
4928
- export declare const KAY_PLUGIN_SDK_VERSION: "0.55.0";
4952
+ export declare const KAY_PLUGIN_SDK_VERSION: "0.55.1";
4929
4953
 
4930
4954
  export declare const KAY_PLUGIN_TARGET_NAMES: readonly ["kay.agent", "kay.app", "kay.ui"];
4931
4955
 
@@ -4971,6 +4995,9 @@ export declare const KayAgentTargetManifest: z.ZodObject<{
4971
4995
  resourcePrefix: z.ZodOptional<z.ZodString>;
4972
4996
  resourceArgs: z.ZodOptional<z.ZodArray<z.ZodString>>;
4973
4997
  resourceTrim: z.ZodOptional<z.ZodLiteral<true>>;
4998
+ resourcePathNormalization: z.ZodOptional<z.ZodObject<{
4999
+ preserveUriSchemes: z.ZodOptional<z.ZodArray<z.ZodString>>;
5000
+ }, z.core.$strict>>;
4974
5001
  defaultPermission: z.ZodOptional<z.ZodEnum<{
4975
5002
  never: "never";
4976
5003
  allow: "allow";
@@ -4993,10 +5020,10 @@ export declare const KayAgentTargetManifest: z.ZodObject<{
4993
5020
  ruleKey: z.ZodOptional<z.ZodString>;
4994
5021
  }, z.core.$strict>>>;
4995
5022
  }, z.core.$strict>>;
4996
- localId: z.ZodString;
5023
+ description: z.ZodOptional<z.ZodString>;
4997
5024
  toolName: z.ZodString;
4998
5025
  displayName: z.ZodOptional<z.ZodString>;
4999
- description: z.ZodOptional<z.ZodString>;
5026
+ localId: z.ZodString;
5000
5027
  }, z.core.$strict>>>;
5001
5028
  converters: z.ZodOptional<z.ZodArray<z.ZodObject<{
5002
5029
  localId: z.ZodString;
@@ -5008,6 +5035,7 @@ export declare const KayAgentTargetManifest: z.ZodObject<{
5008
5035
  uriModules: z.ZodOptional<z.ZodArray<z.ZodObject<{
5009
5036
  authService: z.ZodOptional<z.ZodString>;
5010
5037
  authScheme: z.ZodOptional<z.ZodString>;
5038
+ requiredScopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
5011
5039
  knownResources: z.ZodOptional<z.ZodLiteral<true>>;
5012
5040
  describesOperations: z.ZodOptional<z.ZodLiteral<true>>;
5013
5041
  looksUpWebLinks: z.ZodOptional<z.ZodLiteral<true>>;
@@ -5317,6 +5345,9 @@ export declare const KayAppTargetManifest: z.ZodObject<{
5317
5345
  module: z.ZodString;
5318
5346
  export: z.ZodOptional<z.ZodString>;
5319
5347
  }, z.core.$strict>>;
5348
+ artifacts: z.ZodOptional<z.ZodObject<{
5349
+ outputs: z.ZodLiteral<true>;
5350
+ }, z.core.$strict>>;
5320
5351
  contributes: z.ZodOptional<z.ZodObject<{
5321
5352
  tools: z.ZodOptional<z.ZodArray<z.ZodObject<{
5322
5353
  parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<authoringCommonSchemas.JsonValue, unknown, z.core.$ZodTypeInternals<authoringCommonSchemas.JsonValue, unknown>>>>;
@@ -5338,6 +5369,9 @@ export declare const KayAppTargetManifest: z.ZodObject<{
5338
5369
  resourcePrefix: z.ZodOptional<z.ZodString>;
5339
5370
  resourceArgs: z.ZodOptional<z.ZodArray<z.ZodString>>;
5340
5371
  resourceTrim: z.ZodOptional<z.ZodLiteral<true>>;
5372
+ resourcePathNormalization: z.ZodOptional<z.ZodObject<{
5373
+ preserveUriSchemes: z.ZodOptional<z.ZodArray<z.ZodString>>;
5374
+ }, z.core.$strict>>;
5341
5375
  defaultPermission: z.ZodOptional<z.ZodEnum<{
5342
5376
  never: "never";
5343
5377
  allow: "allow";
@@ -5360,6 +5394,9 @@ export declare const KayAppTargetManifest: z.ZodObject<{
5360
5394
  ruleKey: z.ZodOptional<z.ZodString>;
5361
5395
  }, z.core.$strict>>>;
5362
5396
  }, z.core.$strict>>;
5397
+ availability: z.ZodOptional<z.ZodObject<{
5398
+ scope: z.ZodLiteral<"app">;
5399
+ }, z.core.$strict>>;
5363
5400
  localId: z.ZodString;
5364
5401
  toolName: z.ZodString;
5365
5402
  displayName: z.ZodOptional<z.ZodString>;
@@ -5926,6 +5963,9 @@ export declare const KayPluginManifestV1: z.ZodObject<{
5926
5963
  resourcePrefix: z.ZodOptional<z.ZodString>;
5927
5964
  resourceArgs: z.ZodOptional<z.ZodArray<z.ZodString>>;
5928
5965
  resourceTrim: z.ZodOptional<z.ZodLiteral<true>>;
5966
+ resourcePathNormalization: z.ZodOptional<z.ZodObject<{
5967
+ preserveUriSchemes: z.ZodOptional<z.ZodArray<z.ZodString>>;
5968
+ }, z.core.$strict>>;
5929
5969
  defaultPermission: z.ZodOptional<z.ZodEnum<{
5930
5970
  never: "never";
5931
5971
  allow: "allow";
@@ -5948,10 +5988,10 @@ export declare const KayPluginManifestV1: z.ZodObject<{
5948
5988
  ruleKey: z.ZodOptional<z.ZodString>;
5949
5989
  }, z.core.$strict>>>;
5950
5990
  }, z.core.$strict>>;
5951
- localId: z.ZodString;
5991
+ description: z.ZodOptional<z.ZodString>;
5952
5992
  toolName: z.ZodString;
5953
5993
  displayName: z.ZodOptional<z.ZodString>;
5954
- description: z.ZodOptional<z.ZodString>;
5994
+ localId: z.ZodString;
5955
5995
  }, z.core.$strict>>>;
5956
5996
  converters: z.ZodOptional<z.ZodArray<z.ZodObject<{
5957
5997
  localId: z.ZodString;
@@ -5963,6 +6003,7 @@ export declare const KayPluginManifestV1: z.ZodObject<{
5963
6003
  uriModules: z.ZodOptional<z.ZodArray<z.ZodObject<{
5964
6004
  authService: z.ZodOptional<z.ZodString>;
5965
6005
  authScheme: z.ZodOptional<z.ZodString>;
6006
+ requiredScopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
5966
6007
  knownResources: z.ZodOptional<z.ZodLiteral<true>>;
5967
6008
  describesOperations: z.ZodOptional<z.ZodLiteral<true>>;
5968
6009
  looksUpWebLinks: z.ZodOptional<z.ZodLiteral<true>>;
@@ -6269,6 +6310,9 @@ export declare const KayPluginManifestV1: z.ZodObject<{
6269
6310
  module: z.ZodString;
6270
6311
  export: z.ZodOptional<z.ZodString>;
6271
6312
  }, z.core.$strict>>;
6313
+ artifacts: z.ZodOptional<z.ZodObject<{
6314
+ outputs: z.ZodLiteral<true>;
6315
+ }, z.core.$strict>>;
6272
6316
  contributes: z.ZodOptional<z.ZodObject<{
6273
6317
  tools: z.ZodOptional<z.ZodArray<z.ZodObject<{
6274
6318
  parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<authoringCommonSchemas.JsonValue, unknown, z.core.$ZodTypeInternals<authoringCommonSchemas.JsonValue, unknown>>>>;
@@ -6290,6 +6334,9 @@ export declare const KayPluginManifestV1: z.ZodObject<{
6290
6334
  resourcePrefix: z.ZodOptional<z.ZodString>;
6291
6335
  resourceArgs: z.ZodOptional<z.ZodArray<z.ZodString>>;
6292
6336
  resourceTrim: z.ZodOptional<z.ZodLiteral<true>>;
6337
+ resourcePathNormalization: z.ZodOptional<z.ZodObject<{
6338
+ preserveUriSchemes: z.ZodOptional<z.ZodArray<z.ZodString>>;
6339
+ }, z.core.$strict>>;
6293
6340
  defaultPermission: z.ZodOptional<z.ZodEnum<{
6294
6341
  never: "never";
6295
6342
  allow: "allow";
@@ -6312,6 +6359,9 @@ export declare const KayPluginManifestV1: z.ZodObject<{
6312
6359
  ruleKey: z.ZodOptional<z.ZodString>;
6313
6360
  }, z.core.$strict>>>;
6314
6361
  }, z.core.$strict>>;
6362
+ availability: z.ZodOptional<z.ZodObject<{
6363
+ scope: z.ZodLiteral<"app">;
6364
+ }, z.core.$strict>>;
6315
6365
  localId: z.ZodString;
6316
6366
  toolName: z.ZodString;
6317
6367
  displayName: z.ZodOptional<z.ZodString>;
@@ -6908,6 +6958,7 @@ export declare const KayPluginManifestV1: z.ZodObject<{
6908
6958
  "connect-flows.read": "connect-flows.read";
6909
6959
  "connect-flows.dismiss": "connect-flows.dismiss";
6910
6960
  "support.report": "support.report";
6961
+ "report-evidence.read": "report-evidence.read";
6911
6962
  "navigation.open-page": "navigation.open-page";
6912
6963
  "sessions.create": "sessions.create";
6913
6964
  "models.complete": "models.complete";
@@ -6962,6 +7013,7 @@ export declare const KayPluginManifestV1: z.ZodObject<{
6962
7013
  "connect-flows.read": "connect-flows.read";
6963
7014
  "connect-flows.dismiss": "connect-flows.dismiss";
6964
7015
  "support.report": "support.report";
7016
+ "report-evidence.read": "report-evidence.read";
6965
7017
  "navigation.open-page": "navigation.open-page";
6966
7018
  "sessions.create": "sessions.create";
6967
7019
  "models.complete": "models.complete";
@@ -7987,6 +8039,7 @@ export declare const KayUiAppHostCapability: z.ZodEnum<{
7987
8039
  "connect-flows.read": "connect-flows.read";
7988
8040
  "connect-flows.dismiss": "connect-flows.dismiss";
7989
8041
  "support.report": "support.report";
8042
+ "report-evidence.read": "report-evidence.read";
7990
8043
  "navigation.open-page": "navigation.open-page";
7991
8044
  "sessions.create": "sessions.create";
7992
8045
  "models.complete": "models.complete";
@@ -8278,6 +8331,7 @@ export declare const KayUiTargetManifest: z.ZodObject<{
8278
8331
  "connect-flows.read": "connect-flows.read";
8279
8332
  "connect-flows.dismiss": "connect-flows.dismiss";
8280
8333
  "support.report": "support.report";
8334
+ "report-evidence.read": "report-evidence.read";
8281
8335
  "navigation.open-page": "navigation.open-page";
8282
8336
  "sessions.create": "sessions.create";
8283
8337
  "models.complete": "models.complete";
@@ -8332,6 +8386,7 @@ export declare const KayUiTargetManifest: z.ZodObject<{
8332
8386
  "connect-flows.read": "connect-flows.read";
8333
8387
  "connect-flows.dismiss": "connect-flows.dismiss";
8334
8388
  "support.report": "support.report";
8389
+ "report-evidence.read": "report-evidence.read";
8335
8390
  "navigation.open-page": "navigation.open-page";
8336
8391
  "sessions.create": "sessions.create";
8337
8392
  "models.complete": "models.complete";
@@ -11440,9 +11495,9 @@ export declare const PluginContributionKind: z.ZodEnum<{
11440
11495
  resource: "resource";
11441
11496
  storage: "storage";
11442
11497
  uriModule: "uriModule";
11498
+ app: "app";
11443
11499
  authService: "authService";
11444
11500
  command: "command";
11445
- app: "app";
11446
11501
  skill: "skill";
11447
11502
  converter: "converter";
11448
11503
  artifactUriModule: "artifactUriModule";
@@ -13190,6 +13245,9 @@ export declare const ResolvedKayAgentTool: z.ZodObject<{
13190
13245
  resourcePrefix: z.ZodOptional<z.ZodString>;
13191
13246
  resourceArgs: z.ZodOptional<z.ZodArray<z.ZodString>>;
13192
13247
  resourceTrim: z.ZodOptional<z.ZodLiteral<true>>;
13248
+ resourcePathNormalization: z.ZodOptional<z.ZodObject<{
13249
+ preserveUriSchemes: z.ZodOptional<z.ZodArray<z.ZodString>>;
13250
+ }, z.core.$strict>>;
13193
13251
  defaultPermission: z.ZodOptional<z.ZodEnum<{
13194
13252
  never: "never";
13195
13253
  allow: "allow";
@@ -13414,6 +13472,7 @@ export declare const ResolvedKayAgentUriModule: z.ZodObject<{
13414
13472
  displayName: z.ZodOptional<z.ZodString>;
13415
13473
  authServiceId: z.ZodOptional<z.ZodString>;
13416
13474
  authSchemeId: z.ZodOptional<z.ZodString>;
13475
+ requiredScopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
13417
13476
  knownResources: z.ZodOptional<z.ZodLiteral<true>>;
13418
13477
  describesOperations: z.ZodOptional<z.ZodLiteral<true>>;
13419
13478
  looksUpWebLinks: z.ZodOptional<z.ZodLiteral<true>>;
@@ -13585,6 +13644,9 @@ export declare const ResolvedKayAppTool: z.ZodObject<{
13585
13644
  resourcePrefix: z.ZodOptional<z.ZodString>;
13586
13645
  resourceArgs: z.ZodOptional<z.ZodArray<z.ZodString>>;
13587
13646
  resourceTrim: z.ZodOptional<z.ZodLiteral<true>>;
13647
+ resourcePathNormalization: z.ZodOptional<z.ZodObject<{
13648
+ preserveUriSchemes: z.ZodOptional<z.ZodArray<z.ZodString>>;
13649
+ }, z.core.$strict>>;
13588
13650
  defaultPermission: z.ZodOptional<z.ZodEnum<{
13589
13651
  never: "never";
13590
13652
  allow: "allow";
@@ -13608,6 +13670,9 @@ export declare const ResolvedKayAppTool: z.ZodObject<{
13608
13670
  }, z.core.$strict>>>;
13609
13671
  }, z.core.$strict>>;
13610
13672
  globalId: z.ZodString;
13673
+ availability: z.ZodOptional<z.ZodObject<{
13674
+ scope: z.ZodLiteral<"app">;
13675
+ }, z.core.$strict>>;
13611
13676
  }, z.core.$strict>;
13612
13677
 
13613
13678
  export declare type ResolvedKayAppTool = z.infer<typeof ResolvedKayAppTool>;
@@ -13704,6 +13769,7 @@ export declare const ResolvedKayUiApp: z.ZodObject<{
13704
13769
  "connect-flows.read": "connect-flows.read";
13705
13770
  "connect-flows.dismiss": "connect-flows.dismiss";
13706
13771
  "support.report": "support.report";
13772
+ "report-evidence.read": "report-evidence.read";
13707
13773
  "navigation.open-page": "navigation.open-page";
13708
13774
  "sessions.create": "sessions.create";
13709
13775
  "models.complete": "models.complete";
@@ -14142,9 +14208,9 @@ export declare const ResolvedPluginContractV1: z.ZodObject<{
14142
14208
  resource: "resource";
14143
14209
  storage: "storage";
14144
14210
  uriModule: "uriModule";
14211
+ app: "app";
14145
14212
  authService: "authService";
14146
14213
  command: "command";
14147
- app: "app";
14148
14214
  skill: "skill";
14149
14215
  converter: "converter";
14150
14216
  artifactUriModule: "artifactUriModule";
@@ -14918,6 +14984,7 @@ export declare const ResolvedPluginContractV1: z.ZodObject<{
14918
14984
  displayName: z.ZodOptional<z.ZodString>;
14919
14985
  authServiceId: z.ZodOptional<z.ZodString>;
14920
14986
  authSchemeId: z.ZodOptional<z.ZodString>;
14987
+ requiredScopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
14921
14988
  knownResources: z.ZodOptional<z.ZodLiteral<true>>;
14922
14989
  describesOperations: z.ZodOptional<z.ZodLiteral<true>>;
14923
14990
  looksUpWebLinks: z.ZodOptional<z.ZodLiteral<true>>;
@@ -14976,6 +15043,9 @@ export declare const ResolvedPluginContractV1: z.ZodObject<{
14976
15043
  resourcePrefix: z.ZodOptional<z.ZodString>;
14977
15044
  resourceArgs: z.ZodOptional<z.ZodArray<z.ZodString>>;
14978
15045
  resourceTrim: z.ZodOptional<z.ZodLiteral<true>>;
15046
+ resourcePathNormalization: z.ZodOptional<z.ZodObject<{
15047
+ preserveUriSchemes: z.ZodOptional<z.ZodArray<z.ZodString>>;
15048
+ }, z.core.$strict>>;
14979
15049
  defaultPermission: z.ZodOptional<z.ZodEnum<{
14980
15050
  never: "never";
14981
15051
  allow: "allow";
@@ -15002,6 +15072,209 @@ export declare const ResolvedPluginContractV1: z.ZodObject<{
15002
15072
  globalId: z.ZodString;
15003
15073
  toolName: z.ZodString;
15004
15074
  }, z.core.$strict>>>;
15075
+ kayAppArtifacts: z.ZodOptional<z.ZodObject<{
15076
+ outputs: z.ZodLiteral<true>;
15077
+ }, z.core.$strict>>;
15078
+ kayAppUriModules: z.ZodOptional<z.ZodArray<z.ZodObject<{
15079
+ revisionBacked: z.ZodOptional<z.ZodLiteral<true>>;
15080
+ mailCalibrationSource: z.ZodOptional<z.ZodLiteral<true>>;
15081
+ screenActions: z.ZodExactOptional<z.ZodObject<{
15082
+ scheme: z.ZodString;
15083
+ hosts: z.ZodArray<z.ZodString>;
15084
+ paths: z.ZodOptional<z.ZodArray<z.ZodString>>;
15085
+ apps: z.ZodArray<z.ZodString>;
15086
+ options: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
15087
+ kind: z.ZodLiteral<"exact">;
15088
+ description: z.ZodString;
15089
+ verb: z.ZodEnum<{
15090
+ read: "read";
15091
+ write: "write";
15092
+ edit: "edit";
15093
+ delete: "delete";
15094
+ }>;
15095
+ uri: z.ZodString;
15096
+ }, z.core.$strict>, z.ZodObject<{
15097
+ kind: z.ZodLiteral<"catch-all">;
15098
+ description: z.ZodString;
15099
+ verb: z.ZodEnum<{
15100
+ read: "read";
15101
+ write: "write";
15102
+ edit: "edit";
15103
+ delete: "delete";
15104
+ }>;
15105
+ }, z.core.$strict>], "kind">>;
15106
+ }, z.core.$strict>>;
15107
+ claims: z.ZodExactOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
15108
+ kind: z.ZodLiteral<"scheme">;
15109
+ scheme: z.ZodString;
15110
+ }, z.core.$strict>, z.ZodObject<{
15111
+ kind: z.ZodLiteral<"uriPattern">;
15112
+ pattern: z.ZodObject<{
15113
+ protocol: z.ZodExactOptional<z.ZodString>;
15114
+ hostname: z.ZodExactOptional<z.ZodString>;
15115
+ pathname: z.ZodExactOptional<z.ZodString>;
15116
+ search: z.ZodExactOptional<z.ZodString>;
15117
+ }, z.core.$strict>;
15118
+ normalizeTo: z.ZodExactOptional<z.ZodString>;
15119
+ route: z.ZodExactOptional<z.ZodString>;
15120
+ sourceUrl: z.ZodExactOptional<z.ZodString>;
15121
+ title: z.ZodExactOptional<z.ZodString>;
15122
+ examples: z.ZodExactOptional<z.ZodArray<z.ZodString>>;
15123
+ }, z.core.$strict>, z.ZodObject<{
15124
+ kind: z.ZodLiteral<"urlPattern">;
15125
+ pattern: z.ZodObject<{
15126
+ protocol: z.ZodExactOptional<z.ZodString>;
15127
+ hostname: z.ZodExactOptional<z.ZodString>;
15128
+ pathname: z.ZodExactOptional<z.ZodString>;
15129
+ search: z.ZodExactOptional<z.ZodString>;
15130
+ }, z.core.$strict>;
15131
+ normalizeTo: z.ZodExactOptional<z.ZodString>;
15132
+ route: z.ZodExactOptional<z.ZodString>;
15133
+ examples: z.ZodExactOptional<z.ZodArray<z.ZodString>>;
15134
+ }, z.core.$strict>], "kind">>>;
15135
+ templates: z.ZodExactOptional<z.ZodArray<z.ZodObject<{
15136
+ uri: z.ZodString;
15137
+ description: z.ZodString;
15138
+ operations: z.ZodExactOptional<z.ZodArray<z.ZodEnum<{
15139
+ search: "search";
15140
+ read: "read";
15141
+ list: "list";
15142
+ write: "write";
15143
+ edit: "edit";
15144
+ delete: "delete";
15145
+ help: "help";
15146
+ }>>>;
15147
+ operationDocs: z.ZodExactOptional<z.ZodRecord<z.ZodEnum<{
15148
+ search: "search";
15149
+ read: "read";
15150
+ list: "list";
15151
+ write: "write";
15152
+ edit: "edit";
15153
+ delete: "delete";
15154
+ help: "help";
15155
+ }> & z.core.$partial, z.ZodString>>;
15156
+ operationDefaults: z.ZodExactOptional<z.ZodRecord<z.ZodEnum<{
15157
+ search: "search";
15158
+ read: "read";
15159
+ list: "list";
15160
+ write: "write";
15161
+ edit: "edit";
15162
+ delete: "delete";
15163
+ help: "help";
15164
+ }> & z.core.$partial, z.ZodEnum<{
15165
+ never: "never";
15166
+ allow: "allow";
15167
+ ask: "ask";
15168
+ }>>>;
15169
+ }, z.core.$strict>>>;
15170
+ verbs: z.ZodExactOptional<z.ZodObject<{
15171
+ readable: z.ZodBoolean;
15172
+ writable: z.ZodBoolean;
15173
+ editable: z.ZodBoolean;
15174
+ deletable: z.ZodExactOptional<z.ZodBoolean>;
15175
+ listable: z.ZodBoolean;
15176
+ searchable: z.ZodExactOptional<z.ZodBoolean>;
15177
+ }, z.core.$strict>>;
15178
+ verbDocs: z.ZodExactOptional<z.ZodObject<{
15179
+ read: z.ZodExactOptional<z.ZodString>;
15180
+ list: z.ZodExactOptional<z.ZodString>;
15181
+ search: z.ZodExactOptional<z.ZodString>;
15182
+ write: z.ZodExactOptional<z.ZodString>;
15183
+ edit: z.ZodExactOptional<z.ZodString>;
15184
+ delete: z.ZodExactOptional<z.ZodString>;
15185
+ }, z.core.$strict>>;
15186
+ permissionDefaults: z.ZodExactOptional<z.ZodObject<{
15187
+ read: z.ZodExactOptional<z.ZodEnum<{
15188
+ never: "never";
15189
+ allow: "allow";
15190
+ ask: "ask";
15191
+ }>>;
15192
+ write: z.ZodExactOptional<z.ZodEnum<{
15193
+ never: "never";
15194
+ allow: "allow";
15195
+ ask: "ask";
15196
+ }>>;
15197
+ edit: z.ZodExactOptional<z.ZodEnum<{
15198
+ never: "never";
15199
+ allow: "allow";
15200
+ ask: "ask";
15201
+ }>>;
15202
+ delete: z.ZodExactOptional<z.ZodEnum<{
15203
+ never: "never";
15204
+ allow: "allow";
15205
+ ask: "ask";
15206
+ }>>;
15207
+ }, z.core.$strict>>;
15208
+ authActions: z.ZodExactOptional<z.ZodObject<{
15209
+ actions: z.ZodRecord<z.ZodString, z.ZodObject<{
15210
+ purpose: z.ZodString;
15211
+ alternatives: z.ZodArray<z.ZodObject<{
15212
+ allOf: z.ZodArray<z.ZodObject<{
15213
+ scope: z.ZodString;
15214
+ reason: z.ZodExactOptional<z.ZodString>;
15215
+ }, z.core.$strict>>;
15216
+ }, z.core.$strict>>;
15217
+ }, z.core.$strict>>;
15218
+ rules: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
15219
+ action: z.ZodString;
15220
+ operations: z.ZodExactOptional<z.ZodArray<z.ZodEnum<{
15221
+ search: "search";
15222
+ read: "read";
15223
+ list: "list";
15224
+ write: "write";
15225
+ edit: "edit";
15226
+ delete: "delete";
15227
+ help: "help";
15228
+ }>>>;
15229
+ routes: z.ZodExactOptional<z.ZodArray<z.ZodString>>;
15230
+ query: z.ZodExactOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
15231
+ }, z.core.$strict>, z.ZodObject<{
15232
+ public: z.ZodLiteral<true>;
15233
+ operations: z.ZodExactOptional<z.ZodArray<z.ZodEnum<{
15234
+ search: "search";
15235
+ read: "read";
15236
+ list: "list";
15237
+ write: "write";
15238
+ edit: "edit";
15239
+ delete: "delete";
15240
+ help: "help";
15241
+ }>>>;
15242
+ routes: z.ZodExactOptional<z.ZodArray<z.ZodString>>;
15243
+ query: z.ZodExactOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
15244
+ }, z.core.$strict>]>>;
15245
+ }, z.core.$strict>>;
15246
+ requiresConnection: z.ZodExactOptional<z.ZodLiteral<true>>;
15247
+ acceptsSourceCopy: z.ZodExactOptional<z.ZodLiteral<false>>;
15248
+ acceptsWriteSources: z.ZodExactOptional<z.ZodLiteral<true>>;
15249
+ acceptsBytes: z.ZodExactOptional<z.ZodLiteral<true>>;
15250
+ ownsLineSelectors: z.ZodExactOptional<z.ZodLiteral<true>>;
15251
+ description: z.ZodExactOptional<z.ZodString>;
15252
+ agentHint: z.ZodExactOptional<z.ZodObject<{
15253
+ summary: z.ZodString;
15254
+ commonFlows: z.ZodExactOptional<z.ZodArray<z.ZodObject<{
15255
+ label: z.ZodString;
15256
+ when: z.ZodExactOptional<z.ZodString>;
15257
+ example: z.ZodString;
15258
+ }, z.core.$strict>>>;
15259
+ helpUri: z.ZodExactOptional<z.ZodString>;
15260
+ triggers: z.ZodExactOptional<z.ZodObject<{
15261
+ keywords: z.ZodExactOptional<z.ZodArray<z.ZodString>>;
15262
+ patterns: z.ZodExactOptional<z.ZodArray<z.ZodString>>;
15263
+ }, z.core.$strict>>;
15264
+ skills: z.ZodExactOptional<z.ZodArray<z.ZodString>>;
15265
+ }, z.core.$strict>>;
15266
+ localId: z.ZodString;
15267
+ adapterId: z.ZodOptional<z.ZodString>;
15268
+ globalId: z.ZodString;
15269
+ schemes: z.ZodArray<z.ZodString>;
15270
+ displayName: z.ZodOptional<z.ZodString>;
15271
+ authServiceId: z.ZodOptional<z.ZodString>;
15272
+ authSchemeId: z.ZodOptional<z.ZodString>;
15273
+ requiredScopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
15274
+ knownResources: z.ZodOptional<z.ZodLiteral<true>>;
15275
+ describesOperations: z.ZodOptional<z.ZodLiteral<true>>;
15276
+ looksUpWebLinks: z.ZodOptional<z.ZodLiteral<true>>;
15277
+ }, z.core.$strict>>>;
15005
15278
  kayAppTools: z.ZodOptional<z.ZodArray<z.ZodObject<{
15006
15279
  description: z.ZodOptional<z.ZodString>;
15007
15280
  toolName: z.ZodString;
@@ -15026,6 +15299,9 @@ export declare const ResolvedPluginContractV1: z.ZodObject<{
15026
15299
  resourcePrefix: z.ZodOptional<z.ZodString>;
15027
15300
  resourceArgs: z.ZodOptional<z.ZodArray<z.ZodString>>;
15028
15301
  resourceTrim: z.ZodOptional<z.ZodLiteral<true>>;
15302
+ resourcePathNormalization: z.ZodOptional<z.ZodObject<{
15303
+ preserveUriSchemes: z.ZodOptional<z.ZodArray<z.ZodString>>;
15304
+ }, z.core.$strict>>;
15029
15305
  defaultPermission: z.ZodOptional<z.ZodEnum<{
15030
15306
  never: "never";
15031
15307
  allow: "allow";
@@ -15049,6 +15325,9 @@ export declare const ResolvedPluginContractV1: z.ZodObject<{
15049
15325
  }, z.core.$strict>>>;
15050
15326
  }, z.core.$strict>>;
15051
15327
  globalId: z.ZodString;
15328
+ availability: z.ZodOptional<z.ZodObject<{
15329
+ scope: z.ZodLiteral<"app">;
15330
+ }, z.core.$strict>>;
15052
15331
  }, z.core.$strict>>>;
15053
15332
  kayAppApprovalTypes: z.ZodOptional<z.ZodArray<z.ZodObject<{
15054
15333
  kind: z.ZodLiteral<"message">;
@@ -15409,6 +15688,7 @@ export declare const ResolvedPluginContractV1: z.ZodObject<{
15409
15688
  "connect-flows.read": "connect-flows.read";
15410
15689
  "connect-flows.dismiss": "connect-flows.dismiss";
15411
15690
  "support.report": "support.report";
15691
+ "report-evidence.read": "report-evidence.read";
15412
15692
  "navigation.open-page": "navigation.open-page";
15413
15693
  "sessions.create": "sessions.create";
15414
15694
  "models.complete": "models.complete";
@@ -15451,9 +15731,9 @@ export declare const ResolvedPluginContributionId: z.ZodObject<{
15451
15731
  resource: "resource";
15452
15732
  storage: "storage";
15453
15733
  uriModule: "uriModule";
15734
+ app: "app";
15454
15735
  authService: "authService";
15455
15736
  command: "command";
15456
- app: "app";
15457
15737
  skill: "skill";
15458
15738
  converter: "converter";
15459
15739
  artifactUriModule: "artifactUriModule";
@@ -17144,6 +17424,9 @@ export declare const ToolContribution: z.ZodObject<{
17144
17424
  resourcePrefix: z.ZodOptional<z.ZodString>;
17145
17425
  resourceArgs: z.ZodOptional<z.ZodArray<z.ZodString>>;
17146
17426
  resourceTrim: z.ZodOptional<z.ZodLiteral<true>>;
17427
+ resourcePathNormalization: z.ZodOptional<z.ZodObject<{
17428
+ preserveUriSchemes: z.ZodOptional<z.ZodArray<z.ZodString>>;
17429
+ }, z.core.$strict>>;
17147
17430
  defaultPermission: z.ZodOptional<z.ZodEnum<{
17148
17431
  never: "never";
17149
17432
  allow: "allow";
@@ -17166,6 +17449,9 @@ export declare const ToolContribution: z.ZodObject<{
17166
17449
  ruleKey: z.ZodOptional<z.ZodString>;
17167
17450
  }, z.core.$strict>>>;
17168
17451
  }, z.core.$strict>>;
17452
+ availability: z.ZodOptional<z.ZodObject<{
17453
+ scope: z.ZodLiteral<"app">;
17454
+ }, z.core.$strict>>;
17169
17455
  localId: z.ZodString;
17170
17456
  toolName: z.ZodString;
17171
17457
  displayName: z.ZodOptional<z.ZodString>;
@@ -17189,6 +17475,9 @@ export declare const ToolPermission: z.ZodObject<{
17189
17475
  resourcePrefix: z.ZodOptional<z.ZodString>;
17190
17476
  resourceArgs: z.ZodOptional<z.ZodArray<z.ZodString>>;
17191
17477
  resourceTrim: z.ZodOptional<z.ZodLiteral<true>>;
17478
+ resourcePathNormalization: z.ZodOptional<z.ZodObject<{
17479
+ preserveUriSchemes: z.ZodOptional<z.ZodArray<z.ZodString>>;
17480
+ }, z.core.$strict>>;
17192
17481
  defaultPermission: z.ZodOptional<z.ZodEnum<{
17193
17482
  never: "never";
17194
17483
  allow: "allow";
@@ -17304,6 +17593,7 @@ export declare const UiAppCapabilities: z.ZodObject<{
17304
17593
  "connect-flows.read": "connect-flows.read";
17305
17594
  "connect-flows.dismiss": "connect-flows.dismiss";
17306
17595
  "support.report": "support.report";
17596
+ "report-evidence.read": "report-evidence.read";
17307
17597
  "navigation.open-page": "navigation.open-page";
17308
17598
  "sessions.create": "sessions.create";
17309
17599
  "models.complete": "models.complete";
@@ -17368,6 +17658,7 @@ export declare const UiAppContribution: z.ZodObject<{
17368
17658
  "connect-flows.read": "connect-flows.read";
17369
17659
  "connect-flows.dismiss": "connect-flows.dismiss";
17370
17660
  "support.report": "support.report";
17661
+ "report-evidence.read": "report-evidence.read";
17371
17662
  "navigation.open-page": "navigation.open-page";
17372
17663
  "sessions.create": "sessions.create";
17373
17664
  "models.complete": "models.complete";
@@ -17422,6 +17713,7 @@ export declare const UiAppContribution: z.ZodObject<{
17422
17713
  "connect-flows.read": "connect-flows.read";
17423
17714
  "connect-flows.dismiss": "connect-flows.dismiss";
17424
17715
  "support.report": "support.report";
17716
+ "report-evidence.read": "report-evidence.read";
17425
17717
  "navigation.open-page": "navigation.open-page";
17426
17718
  "sessions.create": "sessions.create";
17427
17719
  "models.complete": "models.complete";
@@ -17576,6 +17868,7 @@ export declare type UiToastPreviewContribution = z.infer<typeof UiToastPreviewCo
17576
17868
  export declare const UriModuleContribution: z.ZodObject<{
17577
17869
  authService: z.ZodOptional<z.ZodString>;
17578
17870
  authScheme: z.ZodOptional<z.ZodString>;
17871
+ requiredScopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
17579
17872
  knownResources: z.ZodOptional<z.ZodLiteral<true>>;
17580
17873
  describesOperations: z.ZodOptional<z.ZodLiteral<true>>;
17581
17874
  looksUpWebLinks: z.ZodOptional<z.ZodLiteral<true>>;
package/dist/index.js CHANGED
@@ -260,8 +260,9 @@ var JsonSchema = z4.record(z4.string(), JsonValue);
260
260
  var KAY_PLUGIN_MANIFEST_SIZE_CAP_BYTES = 1024 * 1024;
261
261
  var KAY_PLUGIN_PROTOCOL_VERSION = "kay.plugin.v1";
262
262
  var KAY_PLUGIN_PROTOCOL_PACKAGE_NAME = "@bonsai/plugin-protocol";
263
- var KAY_PLUGIN_SDK_VERSION = "0.55.0";
263
+ var KAY_PLUGIN_SDK_VERSION = "0.55.1";
264
264
  var KAY_PLUGIN_COMPATIBLE_SDK_VERSIONS = [
265
+ "0.55.0",
265
266
  "0.54.2",
266
267
  "0.54.1",
267
268
  "0.54.0",
@@ -3592,6 +3593,9 @@ function createContributionsSchemas(canonical) {
3592
3593
  // Arguments whose string values name the resources a call touches.
3593
3594
  resourceArgs: z14.array(NonEmptyString3).min(1).optional(),
3594
3595
  resourceTrim: z14.literal(true).optional(),
3596
+ resourcePathNormalization: z14.strictObject({
3597
+ preserveUriSchemes: z14.array(UriScheme2).optional()
3598
+ }).optional(),
3595
3599
  defaultPermission: z14.enum(["allow", "ask", "never"]).optional(),
3596
3600
  /** First matching rule wins; every condition in its when list must hold. */
3597
3601
  classificationRules: z14.array(z14.strictObject({
@@ -3617,10 +3621,11 @@ function createContributionsSchemas(canonical) {
3617
3621
  executionMode: z14.enum(["sequential", "parallel"]).optional(),
3618
3622
  promptSnippet: NonEmptyString3.optional(),
3619
3623
  promptGuidelines: z14.array(NonEmptyString3).optional(),
3620
- permission: ToolPermission2.optional()
3624
+ permission: ToolPermission2.optional(),
3625
+ availability: z14.strictObject({ scope: z14.literal("app") }).optional()
3621
3626
  });
3622
3627
  const AgentToolContribution2 = z14.strictObject({
3623
- ...ToolContribution2.shape,
3628
+ ...ToolContribution2.omit({ availability: true }).shape,
3624
3629
  parameters: JsonSchema.optional(),
3625
3630
  executionMode: z14.enum(["sequential", "parallel"]).optional(),
3626
3631
  promptSnippet: NonEmptyString3.optional(),
@@ -3822,6 +3827,8 @@ function createContributionsSchemas(canonical) {
3822
3827
  // only the manifest (a plugin that runs in the plugin host), and the host refuses a module
3823
3828
  // whose code names a different one.
3824
3829
  authScheme: AuthSchemeReference2.optional(),
3830
+ // A module's minimum scopes, independent of the plugin's credential ceiling.
3831
+ requiredScopes: z14.array(NonEmptyString3).optional(),
3825
3832
  // Opt this module's traffic into the daemon's known-resources ledger: the
3826
3833
  // HOST records the canonical URIs (plus title/summary/mime facts) that flow
3827
3834
  // through the module's successful read/list/search resolutions (a read only
@@ -3846,6 +3853,7 @@ function createContributionsSchemas(canonical) {
3846
3853
  authActions: true,
3847
3854
  authService: true,
3848
3855
  authScheme: true,
3856
+ requiredScopes: true,
3849
3857
  knownResources: true,
3850
3858
  describesOperations: true,
3851
3859
  looksUpWebLinks: true
@@ -4496,6 +4504,10 @@ function createContributionsSchemas(canonical) {
4496
4504
  "connect-flows.read",
4497
4505
  "connect-flows.dismiss",
4498
4506
  "support.report",
4507
+ // Reads what a problem report attaches beyond its words: the app's version and
4508
+ // channel, the recent warning and error tail, the running plugin ids, and a
4509
+ // capture of the window. The host gathers each; the page only reads the result.
4510
+ "report-evidence.read",
4499
4511
  "navigation.open-page",
4500
4512
  // Lets `navigation.openChat` create a blank chat (no message, no model
4501
4513
  // turn) when no session id is given. It never sends anything.
@@ -5011,6 +5023,7 @@ function createManifestSchemas(canonical) {
5011
5023
  // Optional, like `kay.ui`'s: a target may carry only declarative `contributes` (e.g. a plugin
5012
5024
  // that ships nothing but `mcpServers`) with no app-lifetime module for the host to load.
5013
5025
  entrypoint: TargetEntrypoint2.optional(),
5026
+ artifacts: z18.strictObject({ outputs: z18.literal(true) }).optional(),
5014
5027
  contributes: z18.strictObject({
5015
5028
  // Session tools implemented by the app-lifetime activation (registered once, injected into
5016
5029
  // every session with a host-stamped session context) - the tool counterpart of `uriModules`
@@ -6132,6 +6145,13 @@ function createManifestSchemas(canonical) {
6132
6145
  }
6133
6146
  }
6134
6147
  for (const module of manifest.targets?.kay?.agent?.contributes?.uriModules ?? []) {
6148
+ if (module.requiredScopes !== void 0 && (module.authService === void 0 || module.authActions !== void 0)) {
6149
+ ctx.addIssue({
6150
+ code: "custom",
6151
+ path: ["targets", "kay", "agent", "contributes", "uriModules"],
6152
+ message: `uri module ${module.localId} declares requiredScopes without an authService or alongside authActions`
6153
+ });
6154
+ }
6135
6155
  if (module.authService && !isQualifiedAuthServiceRef(module.authService) && !authServices.has(module.authService)) {
6136
6156
  ctx.addIssue({
6137
6157
  code: "custom",
@@ -6734,7 +6754,11 @@ function createResolvedContractSchemas(canonical) {
6734
6754
  }).optional(),
6735
6755
  permission: canonical ? canonicalContributionSchemas.ToolPermission.optional() : ToolPermission.optional()
6736
6756
  });
6737
- const ResolvedKayAppTool2 = ResolvedKayAgentTool2.omit({ requiresAuth: true });
6757
+ const ResolvedKayAppTool2 = ResolvedKayAgentTool2.omit({
6758
+ requiresAuth: true
6759
+ }).extend({
6760
+ availability: z19.strictObject({ scope: z19.literal("app") }).optional()
6761
+ });
6738
6762
  const ResolvedKayAppDataSource2 = z19.strictObject({
6739
6763
  localId: LocalContributionId2,
6740
6764
  globalId: GlobalContributionId2,
@@ -6840,6 +6864,7 @@ function createResolvedContractSchemas(canonical) {
6840
6864
  authServiceId: GlobalContributionId2.optional(),
6841
6865
  /** Mirrors `UriModuleContribution.authScheme`; a local ref takes the plugin's namespace. */
6842
6866
  authSchemeId: GlobalContributionId2.optional(),
6867
+ requiredScopes: z19.array(NonEmptyString3).optional(),
6843
6868
  /** Mirrors `UriModuleContribution.knownResources` (host-side recording opt-in). */
6844
6869
  knownResources: z19.literal(true).optional(),
6845
6870
  /** Mirrors `UriModuleContribution.describesOperations`. */
@@ -7088,6 +7113,8 @@ function createResolvedContractSchemas(canonical) {
7088
7113
  kayAgentEntityResolvers: z19.array(ResolvedKayAgentEntityResolver2).optional(),
7089
7114
  kayAgentGitHostClaims: z19.array(ResolvedKayAgentGitHostClaim2).optional(),
7090
7115
  kayAgentTools: z19.array(ResolvedKayAgentTool2).optional(),
7116
+ kayAppArtifacts: z19.strictObject({ outputs: z19.literal(true) }).optional(),
7117
+ kayAppUriModules: z19.array(ResolvedKayAgentUriModule2).optional(),
7091
7118
  kayAppTools: z19.array(ResolvedKayAppTool2).optional(),
7092
7119
  kayAppApprovalTypes: z19.array(ResolvedKayAppApprovalType2).optional(),
7093
7120
  kayAppWorkflows: z19.array(ResolvedKayAppWorkflow2).optional(),
@@ -7558,11 +7585,19 @@ function resolveKayPluginContractV1(manifest) {
7558
7585
  ...module.authScheme === void 0 ? {} : {
7559
7586
  authSchemeId: isQualifiedAuthSchemeRef(module.authScheme) ? module.authScheme : resolveGlobalContributionId(namespace, module.authScheme)
7560
7587
  },
7588
+ ...module.requiredScopes === void 0 ? {} : { requiredScopes: [...module.requiredScopes] },
7561
7589
  ...module.knownResources === void 0 ? {} : { knownResources: module.knownResources },
7562
7590
  ...module.describesOperations === void 0 ? {} : { describesOperations: module.describesOperations },
7563
7591
  ...module.looksUpWebLinks === void 0 ? {} : { looksUpWebLinks: module.looksUpWebLinks },
7564
7592
  ...uriModuleFacts(module)
7565
7593
  }));
7594
+ const kayAppUriModules = manifest.targets?.kay?.app?.contributes?.uriModules?.map((module) => ({
7595
+ localId: module.localId,
7596
+ globalId: resolveGlobalContributionId(namespace, module.localId),
7597
+ schemes: [...module.schemes],
7598
+ ...module.displayName === void 0 ? {} : { displayName: module.displayName },
7599
+ ...uriModuleFacts(module)
7600
+ }));
7566
7601
  const kayAgentArtifactUriModules = manifest.targets?.kay?.agent?.contributes?.artifactUriModules?.map((module) => ({
7567
7602
  localId: module.localId,
7568
7603
  globalId: resolveGlobalContributionId(namespace, module.localId),
@@ -7679,6 +7714,8 @@ function resolveKayPluginContractV1(manifest) {
7679
7714
  ...kayAgentEntityResolvers && kayAgentEntityResolvers.length > 0 ? { kayAgentEntityResolvers } : {},
7680
7715
  ...kayAgentGitHostClaims.length > 0 ? { kayAgentGitHostClaims } : {},
7681
7716
  ...kayAgentTools && kayAgentTools.length > 0 ? { kayAgentTools } : {},
7717
+ ...manifest.targets?.kay?.app?.artifacts === void 0 ? {} : { kayAppArtifacts: manifest.targets.kay.app.artifacts },
7718
+ ...kayAppUriModules && kayAppUriModules.length > 0 ? { kayAppUriModules } : {},
7682
7719
  ...kayAppTools && kayAppTools.length > 0 ? { kayAppTools } : {},
7683
7720
  ...kayAppCards && kayAppCards.length > 0 ? { kayAppCards } : {},
7684
7721
  ...kayAppApprovalTypes && kayAppApprovalTypes.length > 0 ? { kayAppApprovalTypes } : {},
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yaklabs-ai/plugin-protocol",
3
- "version": "0.55.0",
3
+ "version": "0.55.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",