@yaklabs-ai/plugin-protocol 0.52.1 → 0.53.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/dist/index.js CHANGED
@@ -266,8 +266,9 @@ var JsonSchema = z4.record(z4.string(), JsonValue);
266
266
  var KAY_PLUGIN_MANIFEST_SIZE_CAP_BYTES = 1024 * 1024;
267
267
  var KAY_PLUGIN_PROTOCOL_VERSION = "kay.plugin.v1";
268
268
  var KAY_PLUGIN_PROTOCOL_PACKAGE_NAME = "@bonsai/plugin-protocol";
269
- var KAY_PLUGIN_SDK_VERSION = "0.52.1";
269
+ var KAY_PLUGIN_SDK_VERSION = "0.53.0";
270
270
  var KAY_PLUGIN_COMPATIBLE_SDK_VERSIONS = [
271
+ "0.52.1",
271
272
  "0.52.0",
272
273
  "0.51.0",
273
274
  "0.50.0",
@@ -1840,6 +1841,7 @@ var PLUGIN_CAPABILITY_SLUGS = [
1840
1841
  "mcp.host-server",
1841
1842
  "prompt.resident",
1842
1843
  "skills.declared-source",
1844
+ "family-folder.root",
1843
1845
  "whiteboard.discover",
1844
1846
  "whiteboard.read",
1845
1847
  "whiteboard.create",
@@ -2238,6 +2240,11 @@ function createAuthoritySchemas(canonical) {
2238
2240
  slug: z11.literal("skills.declared-source"),
2239
2241
  envelope: DeclaredSkillSourceEnvelope2
2240
2242
  }),
2243
+ z11.strictObject({
2244
+ target: z11.literal("kay.agent"),
2245
+ slug: z11.literal("family-folder.root"),
2246
+ envelope: z11.strictObject({})
2247
+ }),
2241
2248
  WhiteboardCapabilityClaimV12
2242
2249
  ]);
2243
2250
  const PluginCapabilityRefusalLayer2 = z11.enum(["grant", "binding", "release"]);
@@ -2349,6 +2356,7 @@ function sameClaim(a, b) {
2349
2356
  case "prompt.resident":
2350
2357
  case "model-selection.register":
2351
2358
  case "system-prompt.register":
2359
+ case "family-folder.root":
2352
2360
  return true;
2353
2361
  case "uri.call":
2354
2362
  return b.slug === "uri.call" && a.envelope.scheme === b.envelope.scheme && a.envelope.verb === b.envelope.verb;
@@ -2440,6 +2448,7 @@ function envelopePairs(a, b) {
2440
2448
  case "prompt.resident":
2441
2449
  case "model-selection.register":
2442
2450
  case "system-prompt.register":
2451
+ case "family-folder.root":
2443
2452
  return [];
2444
2453
  case "uri.call":
2445
2454
  return b.slug === "uri.call" ? [
@@ -2898,7 +2907,7 @@ __export(contributions_exports, {
2898
2907
  isUiAppSourceModule: () => isUiAppSourceModule,
2899
2908
  uiAppSourceStylePath: () => uiAppSourceStylePath
2900
2909
  });
2901
- import { z as z13 } from "zod";
2910
+ import { z as z14 } from "zod";
2902
2911
 
2903
2912
  // packages/plugin-protocol/dist/plugin-events.js
2904
2913
  var plugin_events_exports = {};
@@ -3052,6 +3061,53 @@ function pluginSignalPayloadJsonSchema() {
3052
3061
  });
3053
3062
  }
3054
3063
 
3064
+ // packages/plugin-protocol/dist/whiteboard.js
3065
+ import { z as z13 } from "zod";
3066
+ var WhiteboardEntryReference = z13.strictObject({
3067
+ uriTemplate: z13.string().regex(/^[a-z][a-z0-9+.-]*:\/\/[^\s?#{}]+\/\{name\}$/u)
3068
+ });
3069
+ var WhiteboardValue = JsonValue;
3070
+ var WhiteboardEntryEnvelope = z13.strictObject({
3071
+ id: NonEmptyString,
3072
+ typeId: GlobalContributionId,
3073
+ schemaVersion: z13.number().int().positive(),
3074
+ title: z13.string(),
3075
+ authorSessionId: NonEmptyString.nullable()
3076
+ });
3077
+ var WhiteboardEntrySummary = z13.strictObject({
3078
+ name: NonEmptyString,
3079
+ entry: WhiteboardEntryEnvelope,
3080
+ revision: NonEmptyString
3081
+ });
3082
+ var WhiteboardEntrySnapshot = WhiteboardEntrySummary.extend({
3083
+ value: WhiteboardValue
3084
+ });
3085
+ var WhiteboardDiagnostic = z13.strictObject({
3086
+ ruleId: NonEmptyString,
3087
+ severity: z13.enum(["error", "warning"]),
3088
+ message: NonEmptyString
3089
+ });
3090
+ var WhiteboardEntryInfo = z13.strictObject({
3091
+ name: NonEmptyString,
3092
+ revision: NonEmptyString,
3093
+ entry: WhiteboardEntryEnvelope.optional(),
3094
+ state: z13.enum(["available", "unavailable", "unsupported-version", "invalid"]),
3095
+ mutable: z13.boolean(),
3096
+ diagnostics: z13.array(z13.string())
3097
+ });
3098
+ var WhiteboardEntryInspection = WhiteboardEntryInfo.extend({
3099
+ value: WhiteboardValue.optional(),
3100
+ text: z13.string(),
3101
+ truncated: z13.boolean()
3102
+ });
3103
+ var WhiteboardTypeInfo = z13.strictObject({
3104
+ typeId: GlobalContributionId,
3105
+ displayName: NonEmptyString,
3106
+ schemaVersion: z13.number().int().positive(),
3107
+ available: z13.boolean(),
3108
+ reference: WhiteboardEntryReference.optional()
3109
+ });
3110
+
3055
3111
  // packages/plugin-protocol/dist/where-expression.js
3056
3112
  var NUMBER_SOURCE = String.raw`-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?`;
3057
3113
  var SEGMENT_SOURCE = "[A-Za-z0-9_][A-Za-z0-9_-]*";
@@ -3401,22 +3457,22 @@ function createContributionsSchemas(canonical) {
3401
3457
  const { AuthSchemeReference: AuthSchemeReference2, AuthServiceReference: AuthServiceReference2, CliAuthEnvVarName: CliAuthEnvVarName2, CliBinaryName: CliBinaryName2, FileExtensionToken: FileExtensionToken2, GitBasicAuthUser: GitBasicAuthUser2, GitHostName: GitHostName2, LocalContributionId: LocalContributionId2, MimeTypeString: MimeTypeString2, NonEmptyString: NonEmptyString3, PackageAssetPath: PackageAssetPath2, PluginId: PluginId2, PluginToolName: PluginToolName2, TargetEntrypoint: TargetEntrypoint2, UriScheme: UriScheme2 } = canonical ? canonicalCommonSchemas : common_exports;
3402
3458
  const { ScopeRequirement: ScopeRequirement2 } = canonical ? canonicalPermissionSchemas : permissions_exports;
3403
3459
  const OptionalDisplayName = NonEmptyString3.optional();
3404
- const ApprovalCardValueName = z13.string().regex(/^[A-Za-z][A-Za-z0-9_]{0,63}$/u, "must be a plain field name");
3405
- const ApprovalCardForm2 = z13.strictObject({
3460
+ const ApprovalCardValueName = z14.string().regex(/^[A-Za-z][A-Za-z0-9_]{0,63}$/u, "must be a plain field name");
3461
+ const ApprovalCardForm2 = z14.strictObject({
3406
3462
  /** Where the write goes: a fixed address, or the card value that names one. */
3407
- uri: z13.union([
3408
- z13.strictObject({ fixed: NonEmptyString3 }),
3409
- z13.strictObject({ value: ApprovalCardValueName })
3463
+ uri: z14.union([
3464
+ z14.strictObject({ fixed: NonEmptyString3 }),
3465
+ z14.strictObject({ value: ApprovalCardValueName })
3410
3466
  ]),
3411
3467
  /** The delivery request fields this kind of card accepts, beyond provider and account. */
3412
- requestFields: z13.array(ApprovalCardValueName).optional(),
3468
+ requestFields: z14.array(ApprovalCardValueName).optional(),
3413
3469
  /** Payload field to the card value it is filled from. An absent value or empty list is left out. */
3414
- payload: z13.record(ApprovalCardValueName, ApprovalCardValueName),
3470
+ payload: z14.record(ApprovalCardValueName, ApprovalCardValueName),
3415
3471
  /** Payload fields with a constant value. */
3416
- fixed: z13.record(ApprovalCardValueName, z13.union([z13.string(), z13.boolean()])).optional()
3472
+ fixed: z14.record(ApprovalCardValueName, z14.union([z14.string(), z14.boolean()])).optional()
3417
3473
  });
3418
3474
  const ApprovalCardStoredForm2 = ApprovalCardForm2.extend({
3419
- read: z13.strictObject({
3475
+ read: z14.strictObject({
3420
3476
  revision: ApprovalCardValueName,
3421
3477
  body: ApprovalCardValueName,
3422
3478
  subject: ApprovalCardValueName.optional(),
@@ -3427,13 +3483,13 @@ function createContributionsSchemas(canonical) {
3427
3483
  attachments: ApprovalCardValueName.optional()
3428
3484
  })
3429
3485
  });
3430
- const ApprovalCardField = z13.strictObject({
3486
+ const ApprovalCardField = z14.strictObject({
3431
3487
  key: ApprovalCardValueName,
3432
- max: z13.number().int().positive()
3488
+ max: z14.number().int().positive()
3433
3489
  });
3434
- const ApprovalTypeContribution2 = z13.strictObject({
3490
+ const ApprovalTypeContribution2 = z14.strictObject({
3435
3491
  localId: LocalContributionId2,
3436
- kind: z13.literal("message"),
3492
+ kind: z14.literal("message"),
3437
3493
  /** The URI scheme of `uriModule` that cards of this type write to. */
3438
3494
  provider: UriScheme2,
3439
3495
  /** The local id of this plugin's URI module that handles the write. */
@@ -3441,82 +3497,82 @@ function createContributionsSchemas(canonical) {
3441
3497
  /** Shown when a send's outcome cannot be confirmed: where the person checks. */
3442
3498
  unknownMessage: NonEmptyString3,
3443
3499
  /** The payload fields holding the text a person may edit. A `subject` makes this a mail type. */
3444
- fields: z13.strictObject({
3500
+ fields: z14.strictObject({
3445
3501
  body: ApprovalCardField,
3446
3502
  subject: ApprovalCardField.optional()
3447
3503
  }),
3448
- presentation: z13.strictObject({
3449
- showAccount: z13.boolean(),
3450
- recipient: z13.enum(["person", "target"])
3504
+ presentation: z14.strictObject({
3505
+ showAccount: z14.boolean(),
3506
+ recipient: z14.enum(["person", "target"])
3451
3507
  }),
3452
3508
  /** One form per kind of card this provider supports. A kind left out is never bound. */
3453
- forms: z13.strictObject({
3509
+ forms: z14.strictObject({
3454
3510
  inline: ApprovalCardForm2.optional(),
3455
3511
  saved: ApprovalCardForm2.optional(),
3456
3512
  stored: ApprovalCardStoredForm2.optional()
3457
3513
  }),
3458
3514
  /** What the card shows beyond its text, read from the delivery request. */
3459
- display: z13.strictObject({
3515
+ display: z14.strictObject({
3460
3516
  /** How the renderer reads the body. Absent is Markdown, or plain for a stored draft. */
3461
- bodyFormat: z13.literal("mrkdwn").optional(),
3517
+ bodyFormat: z14.literal("mrkdwn").optional(),
3462
3518
  /** The request field naming what this card replies to. */
3463
3519
  replyField: ApprovalCardValueName.optional(),
3464
3520
  /** Shown instead of the reply's id when that id means nothing to a person. */
3465
3521
  replyLabel: NonEmptyString3.optional(),
3466
3522
  /** Further request fields shown as labelled lines. */
3467
- facts: z13.array(z13.strictObject({
3523
+ facts: z14.array(z14.strictObject({
3468
3524
  label: NonEmptyString3,
3469
3525
  field: ApprovalCardValueName
3470
3526
  })).optional()
3471
3527
  }).optional()
3472
3528
  });
3473
- const ToolIdentity = z13.strictObject({
3529
+ const ToolIdentity = z14.strictObject({
3474
3530
  localId: LocalContributionId2,
3475
3531
  toolName: PluginToolName2,
3476
3532
  displayName: OptionalDisplayName,
3477
3533
  description: NonEmptyString3.optional()
3478
3534
  });
3479
- const ToolPermission2 = z13.strictObject({
3480
- kind: z13.enum(["read", "mutate", "destructive", "execute"]),
3535
+ const ToolPermission2 = z14.strictObject({
3536
+ kind: z14.enum(["read", "mutate", "destructive", "execute"]),
3481
3537
  ruleKey: NonEmptyString3.optional(),
3482
3538
  scheme: NonEmptyString3.optional(),
3483
- resourcePrefix: z13.string().max(256).optional(),
3539
+ resourcePrefix: z14.string().max(256).optional(),
3484
3540
  // Arguments whose string values name the resources a call touches.
3485
- resourceArgs: z13.array(NonEmptyString3).min(1).optional(),
3486
- resourceTrim: z13.literal(true).optional(),
3487
- defaultPermission: z13.enum(["allow", "ask", "never"]).optional(),
3541
+ resourceArgs: z14.array(NonEmptyString3).min(1).optional(),
3542
+ resourceTrim: z14.literal(true).optional(),
3543
+ defaultPermission: z14.enum(["allow", "ask", "never"]).optional(),
3488
3544
  /** First matching rule wins; every condition in its when list must hold. */
3489
- classificationRules: z13.array(z13.strictObject({
3490
- when: z13.array(z13.union([
3491
- z13.strictObject({
3545
+ classificationRules: z14.array(z14.strictObject({
3546
+ when: z14.array(z14.union([
3547
+ z14.strictObject({
3492
3548
  arg: NonEmptyString3,
3493
- equals: z13.union([
3494
- z13.string(),
3495
- z13.number(),
3496
- z13.boolean(),
3497
- z13.null()
3549
+ equals: z14.union([
3550
+ z14.string(),
3551
+ z14.number(),
3552
+ z14.boolean(),
3553
+ z14.null()
3498
3554
  ])
3499
3555
  }),
3500
- z13.strictObject({ arg: NonEmptyString3, present: z13.boolean() })
3556
+ z14.strictObject({ arg: NonEmptyString3, present: z14.boolean() })
3501
3557
  ])).min(1).max(32),
3502
- kind: z13.enum(["read", "mutate", "destructive", "execute"]),
3558
+ kind: z14.enum(["read", "mutate", "destructive", "execute"]),
3503
3559
  ruleKey: NonEmptyString3.optional()
3504
3560
  })).min(1).max(64).optional()
3505
3561
  });
3506
- const ToolContribution2 = z13.strictObject({
3562
+ const ToolContribution2 = z14.strictObject({
3507
3563
  ...ToolIdentity.shape,
3508
3564
  parameters: JsonSchema.optional(),
3509
- executionMode: z13.enum(["sequential", "parallel"]).optional(),
3565
+ executionMode: z14.enum(["sequential", "parallel"]).optional(),
3510
3566
  promptSnippet: NonEmptyString3.optional(),
3511
- promptGuidelines: z13.array(NonEmptyString3).optional(),
3567
+ promptGuidelines: z14.array(NonEmptyString3).optional(),
3512
3568
  permission: ToolPermission2.optional()
3513
3569
  });
3514
- const AgentToolContribution2 = z13.strictObject({
3570
+ const AgentToolContribution2 = z14.strictObject({
3515
3571
  ...ToolContribution2.shape,
3516
3572
  parameters: JsonSchema.optional(),
3517
- executionMode: z13.enum(["sequential", "parallel"]).optional(),
3573
+ executionMode: z14.enum(["sequential", "parallel"]).optional(),
3518
3574
  promptSnippet: NonEmptyString3.optional(),
3519
- promptGuidelines: z13.array(NonEmptyString3).optional(),
3575
+ promptGuidelines: z14.array(NonEmptyString3).optional(),
3520
3576
  // A local ref names an auth service declared in this manifest; a dotted ref names another
3521
3577
  // plugin's service, as `UriModuleContribution.authService` does.
3522
3578
  authService: AuthServiceReference2.optional(),
@@ -3524,17 +3580,17 @@ function createContributionsSchemas(canonical) {
3524
3580
  authScheme: LocalContributionId2.optional(),
3525
3581
  permission: ToolPermission2.optional()
3526
3582
  });
3527
- const ConverterContribution2 = z13.strictObject({
3583
+ const ConverterContribution2 = z14.strictObject({
3528
3584
  localId: LocalContributionId2,
3529
3585
  displayName: OptionalDisplayName,
3530
3586
  description: NonEmptyString3.optional(),
3531
3587
  /** MIME types this converter claims - contract data for introspection and
3532
3588
  * collision checks; runtime match behavior stays the converter's `matches()`. */
3533
- mimeTypes: z13.array(MimeTypeString2).min(1),
3589
+ mimeTypes: z14.array(MimeTypeString2).min(1),
3534
3590
  /** Extension fallbacks (no dot) used when a probe has no usable MIME type. */
3535
- extensions: z13.array(FileExtensionToken2).min(1).optional()
3591
+ extensions: z14.array(FileExtensionToken2).min(1).optional()
3536
3592
  });
3537
- const UriOperationName = z13.enum([
3593
+ const UriOperationName = z14.enum([
3538
3594
  "help",
3539
3595
  "read",
3540
3596
  "write",
@@ -3543,8 +3599,8 @@ function createContributionsSchemas(canonical) {
3543
3599
  "search",
3544
3600
  "delete"
3545
3601
  ]);
3546
- const UriPermissionDefault = z13.enum(["allow", "ask", "never"]);
3547
- const UriVerbSentences = z13.strictObject({
3602
+ const UriPermissionDefault = z14.enum(["allow", "ask", "never"]);
3603
+ const UriVerbSentences = z14.strictObject({
3548
3604
  read: NonEmptyString3.exactOptional(),
3549
3605
  list: NonEmptyString3.exactOptional(),
3550
3606
  search: NonEmptyString3.exactOptional(),
@@ -3552,83 +3608,83 @@ function createContributionsSchemas(canonical) {
3552
3608
  edit: NonEmptyString3.exactOptional(),
3553
3609
  delete: NonEmptyString3.exactOptional()
3554
3610
  });
3555
- const UriPatternInit = z13.strictObject({
3611
+ const UriPatternInit = z14.strictObject({
3556
3612
  protocol: NonEmptyString3.exactOptional(),
3557
3613
  hostname: NonEmptyString3.exactOptional(),
3558
3614
  pathname: NonEmptyString3.exactOptional(),
3559
- search: z13.string().exactOptional()
3615
+ search: z14.string().exactOptional()
3560
3616
  });
3561
- const UriClaimContribution = z13.discriminatedUnion("kind", [
3562
- z13.strictObject({ kind: z13.literal("scheme"), scheme: UriScheme2 }),
3563
- z13.strictObject({
3564
- kind: z13.literal("uriPattern"),
3617
+ const UriClaimContribution = z14.discriminatedUnion("kind", [
3618
+ z14.strictObject({ kind: z14.literal("scheme"), scheme: UriScheme2 }),
3619
+ z14.strictObject({
3620
+ kind: z14.literal("uriPattern"),
3565
3621
  pattern: UriPatternInit,
3566
3622
  normalizeTo: NonEmptyString3.exactOptional(),
3567
3623
  route: LocalContributionId2.exactOptional(),
3568
3624
  sourceUrl: NonEmptyString3.exactOptional(),
3569
3625
  title: NonEmptyString3.exactOptional(),
3570
- examples: z13.array(NonEmptyString3).exactOptional()
3626
+ examples: z14.array(NonEmptyString3).exactOptional()
3571
3627
  }),
3572
- z13.strictObject({
3573
- kind: z13.literal("urlPattern"),
3628
+ z14.strictObject({
3629
+ kind: z14.literal("urlPattern"),
3574
3630
  pattern: UriPatternInit,
3575
3631
  normalizeTo: NonEmptyString3.exactOptional(),
3576
3632
  route: LocalContributionId2.exactOptional(),
3577
- examples: z13.array(NonEmptyString3).exactOptional()
3633
+ examples: z14.array(NonEmptyString3).exactOptional()
3578
3634
  })
3579
3635
  ]);
3580
- const UriTemplateContribution = z13.strictObject({
3636
+ const UriTemplateContribution = z14.strictObject({
3581
3637
  uri: NonEmptyString3,
3582
3638
  description: NonEmptyString3,
3583
- operations: z13.array(UriOperationName).exactOptional(),
3584
- operationDocs: z13.partialRecord(UriOperationName, NonEmptyString3).exactOptional(),
3585
- operationDefaults: z13.partialRecord(UriOperationName, UriPermissionDefault).exactOptional()
3639
+ operations: z14.array(UriOperationName).exactOptional(),
3640
+ operationDocs: z14.partialRecord(UriOperationName, NonEmptyString3).exactOptional(),
3641
+ operationDefaults: z14.partialRecord(UriOperationName, UriPermissionDefault).exactOptional()
3586
3642
  });
3587
3643
  const UriAuthActionRuleConditions = {
3588
- operations: z13.array(UriOperationName).min(1).exactOptional(),
3589
- routes: z13.array(LocalContributionId2).min(1).exactOptional(),
3590
- query: z13.record(NonEmptyString3, z13.string()).exactOptional()
3644
+ operations: z14.array(UriOperationName).min(1).exactOptional(),
3645
+ routes: z14.array(LocalContributionId2).min(1).exactOptional(),
3646
+ query: z14.record(NonEmptyString3, z14.string()).exactOptional()
3591
3647
  };
3592
- const UriAuthActionRule = z13.union([
3593
- z13.strictObject({ ...UriAuthActionRuleConditions, action: NonEmptyString3 }),
3594
- z13.strictObject({ ...UriAuthActionRuleConditions, public: z13.literal(true) })
3648
+ const UriAuthActionRule = z14.union([
3649
+ z14.strictObject({ ...UriAuthActionRuleConditions, action: NonEmptyString3 }),
3650
+ z14.strictObject({ ...UriAuthActionRuleConditions, public: z14.literal(true) })
3595
3651
  ]);
3596
- const UriAgentHintContribution = z13.strictObject({
3652
+ const UriAgentHintContribution = z14.strictObject({
3597
3653
  summary: NonEmptyString3,
3598
- commonFlows: z13.array(z13.strictObject({
3654
+ commonFlows: z14.array(z14.strictObject({
3599
3655
  label: NonEmptyString3,
3600
3656
  when: NonEmptyString3.exactOptional(),
3601
3657
  example: NonEmptyString3
3602
3658
  })).exactOptional(),
3603
3659
  helpUri: NonEmptyString3.exactOptional(),
3604
- triggers: z13.strictObject({
3605
- keywords: z13.array(NonEmptyString3).exactOptional(),
3606
- patterns: z13.array(NonEmptyString3).exactOptional()
3660
+ triggers: z14.strictObject({
3661
+ keywords: z14.array(NonEmptyString3).exactOptional(),
3662
+ patterns: z14.array(NonEmptyString3).exactOptional()
3607
3663
  }).exactOptional(),
3608
- skills: z13.array(NonEmptyString3).exactOptional()
3664
+ skills: z14.array(NonEmptyString3).exactOptional()
3609
3665
  });
3610
- const ScreenActionOption = z13.discriminatedUnion("kind", [
3611
- z13.strictObject({
3612
- kind: z13.literal("exact"),
3666
+ const ScreenActionOption = z14.discriminatedUnion("kind", [
3667
+ z14.strictObject({
3668
+ kind: z14.literal("exact"),
3613
3669
  description: NonEmptyString3,
3614
- verb: z13.enum(["read", "write", "edit", "delete"]),
3670
+ verb: z14.enum(["read", "write", "edit", "delete"]),
3615
3671
  uri: NonEmptyString3
3616
3672
  }),
3617
- z13.strictObject({
3618
- kind: z13.literal("catch-all"),
3673
+ z14.strictObject({
3674
+ kind: z14.literal("catch-all"),
3619
3675
  description: NonEmptyString3,
3620
- verb: z13.enum(["read", "write", "edit", "delete"])
3676
+ verb: z14.enum(["read", "write", "edit", "delete"])
3621
3677
  })
3622
3678
  ]);
3623
3679
  const UriModuleFactsShape = {
3624
- revisionBacked: z13.literal(true).optional(),
3625
- mailCalibrationSource: z13.literal(true).optional(),
3626
- screenActions: z13.strictObject({
3680
+ revisionBacked: z14.literal(true).optional(),
3681
+ mailCalibrationSource: z14.literal(true).optional(),
3682
+ screenActions: z14.strictObject({
3627
3683
  scheme: UriScheme2,
3628
- hosts: z13.array(NonEmptyString3),
3629
- paths: z13.array(NonEmptyString3).min(1).optional(),
3630
- apps: z13.array(NonEmptyString3),
3631
- options: z13.record(NonEmptyString3, ScreenActionOption)
3684
+ hosts: z14.array(NonEmptyString3),
3685
+ paths: z14.array(NonEmptyString3).min(1).optional(),
3686
+ apps: z14.array(NonEmptyString3),
3687
+ options: z14.record(NonEmptyString3, ScreenActionOption)
3632
3688
  }).superRefine((catalog, ctx) => {
3633
3689
  if (catalog.hosts.length === 0 && catalog.apps.length === 0) {
3634
3690
  ctx.addIssue({
@@ -3653,29 +3709,29 @@ function createContributionsSchemas(canonical) {
3653
3709
  }
3654
3710
  }).exactOptional(),
3655
3711
  /** Addresses the module answers, in match order; see `@herd/uri`'s `UriClaim`. */
3656
- claims: z13.array(UriClaimContribution).min(1).exactOptional(),
3712
+ claims: z14.array(UriClaimContribution).min(1).exactOptional(),
3657
3713
  /** The module's routes, as its scheme-root `help` lists them. */
3658
- templates: z13.array(UriTemplateContribution).exactOptional(),
3659
- verbs: z13.strictObject({
3660
- readable: z13.boolean(),
3661
- writable: z13.boolean(),
3662
- editable: z13.boolean(),
3663
- deletable: z13.boolean().exactOptional(),
3664
- listable: z13.boolean(),
3714
+ templates: z14.array(UriTemplateContribution).exactOptional(),
3715
+ verbs: z14.strictObject({
3716
+ readable: z14.boolean(),
3717
+ writable: z14.boolean(),
3718
+ editable: z14.boolean(),
3719
+ deletable: z14.boolean().exactOptional(),
3720
+ listable: z14.boolean(),
3665
3721
  /** The module answers `search`. */
3666
- searchable: z13.boolean().exactOptional()
3722
+ searchable: z14.boolean().exactOptional()
3667
3723
  }).exactOptional(),
3668
3724
  verbDocs: UriVerbSentences.exactOptional(),
3669
- permissionDefaults: z13.strictObject({
3725
+ permissionDefaults: z14.strictObject({
3670
3726
  read: UriPermissionDefault.exactOptional(),
3671
3727
  write: UriPermissionDefault.exactOptional(),
3672
3728
  edit: UriPermissionDefault.exactOptional(),
3673
3729
  delete: UriPermissionDefault.exactOptional()
3674
3730
  }).exactOptional(),
3675
3731
  /** Which sign-in action each call needs: the action table and the rules that pick one. */
3676
- authActions: z13.strictObject({
3677
- actions: z13.record(NonEmptyString3, ScopeRequirement2),
3678
- rules: z13.array(UriAuthActionRule).min(1)
3732
+ authActions: z14.strictObject({
3733
+ actions: z14.record(NonEmptyString3, ScopeRequirement2),
3734
+ rules: z14.array(UriAuthActionRule).min(1)
3679
3735
  }).superRefine((policy, ctx) => {
3680
3736
  policy.rules.forEach((rule, index) => {
3681
3737
  if ("action" in rule && !(rule.action in policy.actions)) {
@@ -3687,18 +3743,18 @@ function createContributionsSchemas(canonical) {
3687
3743
  }
3688
3744
  });
3689
3745
  }).exactOptional(),
3690
- requiresConnection: z13.literal(true).exactOptional(),
3691
- acceptsSourceCopy: z13.literal(false).exactOptional(),
3692
- acceptsWriteSources: z13.literal(true).exactOptional(),
3693
- acceptsBytes: z13.literal(true).exactOptional(),
3694
- ownsLineSelectors: z13.literal(true).exactOptional(),
3746
+ requiresConnection: z14.literal(true).exactOptional(),
3747
+ acceptsSourceCopy: z14.literal(false).exactOptional(),
3748
+ acceptsWriteSources: z14.literal(true).exactOptional(),
3749
+ acceptsBytes: z14.literal(true).exactOptional(),
3750
+ ownsLineSelectors: z14.literal(true).exactOptional(),
3695
3751
  description: NonEmptyString3.exactOptional(),
3696
3752
  agentHint: UriAgentHintContribution.exactOptional()
3697
3753
  };
3698
- const UriModuleFacts2 = z13.strictObject(UriModuleFactsShape);
3699
- const UriModuleContribution2 = z13.strictObject({
3754
+ const UriModuleFacts2 = z14.strictObject(UriModuleFactsShape);
3755
+ const UriModuleContribution2 = z14.strictObject({
3700
3756
  localId: LocalContributionId2,
3701
- schemes: z13.array(UriScheme2).min(1),
3757
+ schemes: z14.array(UriScheme2).min(1),
3702
3758
  displayName: OptionalDisplayName,
3703
3759
  ...UriModuleFactsShape,
3704
3760
  // A local ref (no dot) must name an auth service declared in this same
@@ -3721,15 +3777,15 @@ function createContributionsSchemas(canonical) {
3721
3777
  // `knownResources` permission grant (`api.knownResources`). Present-means-on
3722
3778
  // (`true` or absent; `false` is not a state). Decision record:
3723
3779
  // `lab/user-plugins/decisions/014-known-resources-ledger.md`.
3724
- knownResources: z13.literal(true).optional(),
3780
+ knownResources: z14.literal(true).optional(),
3725
3781
  // The module's code defines `describeOperation`, the approval card's facts for a call. The
3726
3782
  // daemon reads it here because it may hold only the manifest (a plugin that runs in the
3727
3783
  // plugin host), and the host refuses a module whose code disagrees.
3728
- describesOperations: z13.literal(true).optional(),
3784
+ describesOperations: z14.literal(true).optional(),
3729
3785
  // The module's code defines `lookupWebLink`, which finds a resource's page when someone opens
3730
3786
  // it. The daemon reads it here for the same reason, and the host refuses a module whose code
3731
3787
  // disagrees.
3732
- looksUpWebLinks: z13.literal(true).optional()
3788
+ looksUpWebLinks: z14.literal(true).optional()
3733
3789
  });
3734
3790
  const AppUriModuleContribution2 = UriModuleContribution2.omit({
3735
3791
  authActions: true,
@@ -3739,35 +3795,36 @@ function createContributionsSchemas(canonical) {
3739
3795
  describesOperations: true,
3740
3796
  looksUpWebLinks: true
3741
3797
  });
3742
- const AppDataSourceStore = z13.discriminatedUnion("shape", [
3743
- z13.strictObject({
3744
- shape: z13.literal("rows"),
3798
+ const AppDataSourceStore = z14.discriminatedUnion("shape", [
3799
+ z14.strictObject({
3800
+ shape: z14.literal("rows"),
3745
3801
  rowsField: NonEmptyString3,
3746
- key: z13.array(NonEmptyString3).min(1)
3802
+ key: z14.array(NonEmptyString3).min(1)
3747
3803
  }),
3748
- z13.strictObject({ shape: z13.literal("value") })
3804
+ z14.strictObject({ shape: z14.literal("value") })
3749
3805
  ]);
3750
- const AppDataSourceContribution2 = z13.strictObject({
3806
+ const AppDataSourceContribution2 = z14.strictObject({
3751
3807
  localId: LocalContributionId2,
3752
- scope: z13.enum(["runtime", "account", "session"]),
3753
- snapshot: z13.strictObject({
3754
- version: z13.number().int().positive(),
3808
+ scope: z14.enum(["runtime", "account", "session"]),
3809
+ snapshot: z14.strictObject({
3810
+ version: z14.number().int().positive(),
3755
3811
  schema: JsonSchema
3756
3812
  }),
3757
- change: z13.strictObject({
3758
- version: z13.number().int().positive(),
3813
+ change: z14.strictObject({
3814
+ version: z14.number().int().positive(),
3759
3815
  schema: JsonSchema,
3760
3816
  /** Review-only claim; source schemas and behavioral tests enforce it because the daemon treats changes as opaque. */
3761
- semantics: z13.discriminatedUnion("kind", [
3762
- z13.strictObject({ kind: z13.literal("incremental") }),
3763
- z13.strictObject({
3764
- kind: z13.literal("snapshot-replacement"),
3765
- maxEncodedBytes: z13.number().int().positive(),
3817
+ semantics: z14.discriminatedUnion("kind", [
3818
+ z14.strictObject({ kind: z14.literal("incremental") }),
3819
+ z14.strictObject({
3820
+ kind: z14.literal("snapshot-replacement"),
3821
+ maxEncodedBytes: z14.number().int().positive(),
3766
3822
  rationale: pluginString(canonical).min(1).max(1024)
3767
3823
  })
3768
3824
  ]).optional()
3769
3825
  }),
3770
3826
  read: AppDataSourceRead.optional(),
3827
+ messageDraft: z14.strictObject({ schemes: z14.array(UriScheme2).min(1) }).optional(),
3771
3828
  store: AppDataSourceStore.optional()
3772
3829
  }).superRefine((source, ctx) => {
3773
3830
  if (source.read !== void 0 && source.scope !== "session") {
@@ -3777,6 +3834,13 @@ function createContributionsSchemas(canonical) {
3777
3834
  message: "App-data read operations require session scope."
3778
3835
  });
3779
3836
  }
3837
+ if (source.messageDraft !== void 0 && source.read === void 0) {
3838
+ ctx.addIssue({
3839
+ code: "custom",
3840
+ path: ["messageDraft"],
3841
+ message: "Message draft projections require a session read operation."
3842
+ });
3843
+ }
3780
3844
  if (source.store === void 0)
3781
3845
  return;
3782
3846
  const replaces = source.change.semantics?.kind === "snapshot-replacement";
@@ -3788,25 +3852,36 @@ function createContributionsSchemas(canonical) {
3788
3852
  });
3789
3853
  }
3790
3854
  });
3791
- const WhiteboardTypeStorage2 = z13.discriminatedUnion("kind", [
3792
- z13.strictObject({ kind: z13.literal("json") }),
3793
- z13.strictObject({ kind: z13.literal("payload") }),
3794
- z13.strictObject({
3795
- kind: z13.literal("markdown"),
3855
+ const WhiteboardTypeStorage2 = z14.discriminatedUnion("kind", [
3856
+ z14.strictObject({ kind: z14.literal("json") }),
3857
+ z14.strictObject({ kind: z14.literal("payload") }),
3858
+ z14.strictObject({
3859
+ kind: z14.literal("markdown"),
3796
3860
  bodyField: NonEmptyString3
3797
3861
  })
3798
3862
  ]);
3799
- const WhiteboardTypeContribution2 = z13.strictObject({
3863
+ const WhiteboardTypeContribution2 = z14.strictObject({
3800
3864
  localId: LocalContributionId2,
3801
3865
  displayName: NonEmptyString3,
3802
- schemaVersion: z13.number().int().positive(),
3866
+ schemaVersion: z14.number().int().positive(),
3803
3867
  storage: WhiteboardTypeStorage2,
3804
- valueSchema: JsonSchema
3868
+ valueSchema: JsonSchema,
3869
+ directory: z14.array(z14.string().regex(/^[A-Za-z0-9][A-Za-z0-9_-]*$/u)).min(1).optional(),
3870
+ reference: WhiteboardEntryReference.optional(),
3871
+ handover: z14.literal(true).optional()
3872
+ }).superRefine((type, ctx) => {
3873
+ if (type.handover === true && type.storage.kind !== "markdown") {
3874
+ ctx.addIssue({
3875
+ code: "custom",
3876
+ path: ["handover"],
3877
+ message: "Handover content requires Markdown storage."
3878
+ });
3879
+ }
3805
3880
  });
3806
- const AppDataMaterializerContribution2 = z13.strictObject({
3881
+ const AppDataMaterializerContribution2 = z14.strictObject({
3807
3882
  source: LocalContributionId2
3808
3883
  });
3809
- const ArtifactUriModuleContribution2 = z13.strictObject({
3884
+ const ArtifactUriModuleContribution2 = z14.strictObject({
3810
3885
  localId: LocalContributionId2,
3811
3886
  /** The single `scheme://` this module owns; also the on-disk artifact kind. */
3812
3887
  scheme: UriScheme2,
@@ -3820,17 +3895,17 @@ function createContributionsSchemas(canonical) {
3820
3895
  * composes its description from the plugin's own display name + scheme - a per-scheme label
3821
3896
  * would have no path to matter, so it is intentionally omitted rather than accepted-and-ignored.
3822
3897
  */
3823
- editable: z13.boolean().optional(),
3898
+ editable: z14.boolean().optional(),
3824
3899
  /** Opt in to `list` over the kind's stored names. Default false. Mirrors
3825
3900
  * `CreateArtifactUriModuleOptions.listable`. */
3826
- listable: z13.boolean().optional(),
3901
+ listable: z14.boolean().optional(),
3827
3902
  /**
3828
3903
  * Opt in to `delete` for same-session entries. Default false. Deletion
3829
3904
  * unlinks the stored file - no trash tier; a kind that wants recoverable
3830
3905
  * deletion is not artifact-backed. Mirrors
3831
3906
  * `CreateArtifactUriModuleOptions.deletable`.
3832
3907
  */
3833
- deletable: z13.boolean().optional(),
3908
+ deletable: z14.boolean().optional(),
3834
3909
  /**
3835
3910
  * Opt in to the `{ content, mode: "append" }` write envelope, which extends
3836
3911
  * stored text instead of replacing it (concurrent-appender-safe: the host
@@ -3838,7 +3913,7 @@ function createContributionsSchemas(canonical) {
3838
3913
  * keep their verbatim round-trip. Mirrors
3839
3914
  * `CreateArtifactUriModuleOptions.appendable`.
3840
3915
  */
3841
- appendable: z13.boolean().optional(),
3916
+ appendable: z14.boolean().optional(),
3842
3917
  /**
3843
3918
  * Which sessions share one storage namespace. Default `"session"` - the existing
3844
3919
  * per-session behavior (each session gets its own kind directory; other sessions'
@@ -3849,14 +3924,14 @@ function createContributionsSchemas(canonical) {
3849
3924
  * the scope; the host derives the family root from provenance it already holds, so
3850
3925
  * family identity never crosses the SDK boundary.
3851
3926
  */
3852
- storageScope: z13.enum(["session", "family"]).optional()
3927
+ storageScope: z14.enum(["session", "family"]).optional()
3853
3928
  });
3854
- const CliBindingContribution2 = z13.strictObject({
3929
+ const CliBindingContribution2 = z14.strictObject({
3855
3930
  localId: LocalContributionId2,
3856
3931
  binary: CliBinaryName2,
3857
- aliases: z13.array(CliBinaryName2).optional(),
3932
+ aliases: z14.array(CliBinaryName2).optional(),
3858
3933
  /** Where the binary comes from. Omitted => `"vendored"` (decision 007). */
3859
- provider: z13.enum(["vendored", "path"]).optional(),
3934
+ provider: z14.enum(["vendored", "path"]).optional(),
3860
3935
  // A local ref (no dot) must name an auth service declared in this same
3861
3936
  // manifest; a qualified ref (dotted, e.g. `google.account`) names another
3862
3937
  // plugin's already-minted global id and is recorded, not resolved, here (see
@@ -3869,20 +3944,20 @@ function createContributionsSchemas(canonical) {
3869
3944
  * MUST be absent for a `path` binding, which can never receive a token.
3870
3945
  */
3871
3946
  authEnvVar: CliAuthEnvVarName2.optional(),
3872
- readOnly: z13.array(NonEmptyString3),
3873
- write: z13.array(NonEmptyString3)
3947
+ readOnly: z14.array(NonEmptyString3),
3948
+ write: z14.array(NonEmptyString3)
3874
3949
  });
3875
- const GitHostContribution2 = z13.strictObject({
3950
+ const GitHostContribution2 = z14.strictObject({
3876
3951
  host: GitHostName2,
3877
3952
  authService: LocalContributionId2,
3878
3953
  basicAuthUser: GitBasicAuthUser2
3879
3954
  });
3880
- const ResourceContribution2 = z13.strictObject({
3955
+ const ResourceContribution2 = z14.strictObject({
3881
3956
  localId: LocalContributionId2,
3882
3957
  displayName: OptionalDisplayName,
3883
3958
  description: NonEmptyString3.optional()
3884
3959
  });
3885
- const SkillContribution2 = z13.strictObject({
3960
+ const SkillContribution2 = z14.strictObject({
3886
3961
  localId: LocalContributionId2,
3887
3962
  displayName: OptionalDisplayName,
3888
3963
  /** Model-visible one-liner: when to reach for this skill. */
@@ -3890,18 +3965,18 @@ function createContributionsSchemas(canonical) {
3890
3965
  /** The SKILL.md-style file inside the package carrying the full instructions. */
3891
3966
  path: PackageAssetPath2
3892
3967
  });
3893
- const PluginSkillSourceDeclaration2 = z13.discriminatedUnion("channel", [
3894
- z13.strictObject({
3895
- channel: z13.literal("installer"),
3968
+ const PluginSkillSourceDeclaration2 = z14.discriminatedUnion("channel", [
3969
+ z14.strictObject({
3970
+ channel: z14.literal("installer"),
3896
3971
  localId: LocalContributionId2,
3897
3972
  displayName: OptionalDisplayName,
3898
3973
  /** The package-runner executable, e.g. `npx` - checked against the daemon's allowlist. */
3899
3974
  command: NonEmptyString3,
3900
3975
  /** Its argv, e.g. `["skills", "add", "clerk/skills"]`. */
3901
- args: z13.array(NonEmptyString3)
3976
+ args: z14.array(NonEmptyString3)
3902
3977
  }),
3903
- z13.strictObject({
3904
- channel: z13.literal("git-clone"),
3978
+ z14.strictObject({
3979
+ channel: z14.literal("git-clone"),
3905
3980
  localId: LocalContributionId2,
3906
3981
  displayName: OptionalDisplayName,
3907
3982
  /** The repository locator - canonicalized and hygiene-checked by the daemon. */
@@ -3912,17 +3987,17 @@ function createContributionsSchemas(canonical) {
3912
3987
  subdir: NonEmptyString3.optional()
3913
3988
  })
3914
3989
  ]);
3915
- const SearchProviderContribution2 = z13.strictObject({
3990
+ const SearchProviderContribution2 = z14.strictObject({
3916
3991
  localId: LocalContributionId2,
3917
3992
  displayName: OptionalDisplayName,
3918
- schemes: z13.array(UriScheme2).optional()
3993
+ schemes: z14.array(UriScheme2).optional()
3919
3994
  });
3920
- const InteractionDriverContribution2 = z13.strictObject({
3995
+ const InteractionDriverContribution2 = z14.strictObject({
3921
3996
  localId: LocalContributionId2,
3922
3997
  displayName: OptionalDisplayName,
3923
- kind: z13.enum(["browser", "computer-use"])
3998
+ kind: z14.enum(["browser", "computer-use"])
3924
3999
  });
3925
- const EntityResolverContribution2 = z13.strictObject({
4000
+ const EntityResolverContribution2 = z14.strictObject({
3926
4001
  localId: LocalContributionId2,
3927
4002
  displayName: OptionalDisplayName,
3928
4003
  /** The `kay.agent` URI module (this manifest's own `contributes.uriModules[].localId`) whose
@@ -3930,17 +4005,17 @@ function createContributionsSchemas(canonical) {
3930
4005
  uriModule: LocalContributionId2,
3931
4006
  /** `person` | `channel` | `repo` | `pull-request` | ... -- drives avatar-first vs glyph-first row
3932
4007
  * anatomy (N10-R2) and lets the renderer request a narrower `entityTypes` filter. */
3933
- entityTypes: z13.array(NonEmptyString3).min(1),
4008
+ entityTypes: z14.array(NonEmptyString3).min(1),
3934
4009
  /** The URI namespace/route `search()` is called against, e.g. `slack://directory` or
3935
4010
  * `github://search/repositories` -- the resolver's fixed search scope; the live user query is
3936
4011
  * the `search()` call's `query` param, never concatenated into this string. */
3937
4012
  uriHint: NonEmptyString3
3938
4013
  });
3939
- const AgentRenderContribution2 = z13.strictObject({
4014
+ const AgentRenderContribution2 = z14.strictObject({
3940
4015
  localId: LocalContributionId2,
3941
- resultKinds: z13.array(NonEmptyString3).min(1)
4016
+ resultKinds: z14.array(NonEmptyString3).min(1)
3942
4017
  });
3943
- const PluginCardContribution2 = z13.strictObject({
4018
+ const PluginCardContribution2 = z14.strictObject({
3944
4019
  localId: LocalContributionId2,
3945
4020
  description: NonEmptyString3,
3946
4021
  inputs: JsonSchema,
@@ -3948,26 +4023,26 @@ function createContributionsSchemas(canonical) {
3948
4023
  submitEndpoint: LocalContributionId2,
3949
4024
  authService: AuthServiceReference2.optional()
3950
4025
  });
3951
- const EndpointContribution2 = z13.strictObject({
4026
+ const EndpointContribution2 = z14.strictObject({
3952
4027
  localId: LocalContributionId2,
3953
4028
  displayName: OptionalDisplayName,
3954
4029
  requestSchema: JsonSchema.optional(),
3955
4030
  responseSchema: JsonSchema.optional(),
3956
- auth: z13.strictObject({
4031
+ auth: z14.strictObject({
3957
4032
  service: AuthServiceReference2,
3958
- schemes: z13.array(AuthSchemeReference2).min(1),
4033
+ schemes: z14.array(AuthSchemeReference2).min(1),
3959
4034
  purpose: NonEmptyString3
3960
4035
  }).optional(),
3961
- timeoutMs: z13.number().int().positive().optional()
4036
+ timeoutMs: z14.number().int().positive().optional()
3962
4037
  });
3963
- const WorkflowContribution2 = z13.strictObject({
4038
+ const WorkflowContribution2 = z14.strictObject({
3964
4039
  localId: LocalContributionId2,
3965
4040
  name: NonEmptyString3,
3966
4041
  /** Plain-text purpose, at most 280 characters. */
3967
4042
  description: NonEmptyString3,
3968
4043
  /** How often it runs. The automations engine enforces its scheduling floor. */
3969
- everyMs: z13.number().int().positive(),
3970
- auth: z13.strictObject({
4044
+ everyMs: z14.number().int().positive(),
4045
+ auth: z14.strictObject({
3971
4046
  /** A local ref names a service in this manifest; a dotted ref names another plugin's. */
3972
4047
  service: AuthServiceReference2,
3973
4048
  scheme: AuthSchemeReference2,
@@ -3975,7 +4050,7 @@ function createContributionsSchemas(canonical) {
3975
4050
  * Scopes each account's token must hold. Omitted, the host asks for the first scope of the
3976
4051
  * `background-job` grant's `allowedScopes` that the account holds.
3977
4052
  */
3978
- scopes: z13.array(NonEmptyString3).min(1).optional()
4053
+ scopes: z14.array(NonEmptyString3).min(1).optional()
3979
4054
  }).optional()
3980
4055
  });
3981
4056
  const McpServerUrl2 = pluginString(canonical).min(1).refine((value) => {
@@ -3991,8 +4066,8 @@ function createContributionsSchemas(canonical) {
3991
4066
  }, {
3992
4067
  message: "mcp server url must be https://, or http:// only for localhost/127.0.0.1 test servers"
3993
4068
  });
3994
- const McpServerAuthMode2 = z13.enum(["oauth", "api-key", "none"]);
3995
- const McpServerContribution2 = z13.strictObject({
4069
+ const McpServerAuthMode2 = z14.enum(["oauth", "api-key", "none"]);
4070
+ const McpServerContribution2 = z14.strictObject({
3996
4071
  url: McpServerUrl2,
3997
4072
  auth: McpServerAuthMode2.optional(),
3998
4073
  authService: LocalContributionId2.optional()
@@ -4005,24 +4080,24 @@ function createContributionsSchemas(canonical) {
4005
4080
  });
4006
4081
  }
4007
4082
  });
4008
- const McpServerContributions2 = z13.record(LocalContributionId2, McpServerContribution2);
4009
- const AppEventSubscription2 = z13.strictObject({
4083
+ const McpServerContributions2 = z14.record(LocalContributionId2, McpServerContribution2);
4084
+ const AppEventSubscription2 = z14.strictObject({
4010
4085
  localId: LocalContributionId2,
4011
4086
  event: NonEmptyString3
4012
4087
  });
4013
- const ContextContributorContribution2 = z13.strictObject({
4088
+ const ContextContributorContribution2 = z14.strictObject({
4014
4089
  localId: LocalContributionId2.max(64),
4015
4090
  displayName: OptionalDisplayName,
4016
4091
  description: NonEmptyString3.optional()
4017
4092
  });
4018
- const EventDefinitionVersion = z13.number().int().positive();
4019
- const PluginEventDefinitionContribution2 = z13.strictObject({
4093
+ const EventDefinitionVersion = z14.number().int().positive();
4094
+ const PluginEventDefinitionContribution2 = z14.strictObject({
4020
4095
  localId: PluginEventLocalId2,
4021
4096
  displayName: OptionalDisplayName,
4022
4097
  description: NonEmptyString3.optional(),
4023
4098
  version: canonical ? EventDefinitionVersion : EventDefinitionVersion.default(1),
4024
4099
  uriScheme: UriScheme2,
4025
- relatedKeys: z13.array(NonEmptyString3).readonly().optional(),
4100
+ relatedKeys: z14.array(NonEmptyString3).readonly().optional(),
4026
4101
  payloadSchema: JsonSchema.optional(),
4027
4102
  /**
4028
4103
  * This event is a signal: its payload is the shared `PluginSignal` v1 and every publish
@@ -4031,7 +4106,7 @@ function createContributionsSchemas(canonical) {
4031
4106
  * and `relatedKeys` holds `thread` plus any of `from`, `to`, `cc`. Turning it on changes
4032
4107
  * the payload, so bump `version` with it.
4033
4108
  */
4034
- signal: z13.boolean().optional()
4109
+ signal: z14.boolean().optional()
4035
4110
  }).superRefine((definition, context) => {
4036
4111
  if (definition.signal !== true)
4037
4112
  return;
@@ -4052,42 +4127,42 @@ function createContributionsSchemas(canonical) {
4052
4127
  });
4053
4128
  }
4054
4129
  });
4055
- const PluginNotificationRuleContribution2 = z13.strictObject({
4130
+ const PluginNotificationRuleContribution2 = z14.strictObject({
4056
4131
  localId: LocalContributionId2,
4057
4132
  /** The same-plugin `eventDefinitions` local id this rule matches. */
4058
4133
  event: PluginEventLocalId2,
4059
- where: z13.string({ error: (issue) => whereNotAStringMessage(issue.input) }).optional(),
4134
+ where: z14.string({ error: (issue) => whereNotAStringMessage(issue.input) }).optional(),
4060
4135
  rule: JsonObject
4061
4136
  });
4062
- const PluginProductEventContribution2 = z13.union([
4063
- z13.strictObject({
4137
+ const PluginProductEventContribution2 = z14.union([
4138
+ z14.strictObject({
4064
4139
  name: NonEmptyString3,
4065
4140
  description: NonEmptyString3.optional(),
4066
- fields: z13.record(z13.string(), JsonObject).optional()
4141
+ fields: z14.record(z14.string(), JsonObject).optional()
4067
4142
  }),
4068
- z13.strictObject({ catalogEvent: NonEmptyString3 })
4143
+ z14.strictObject({ catalogEvent: NonEmptyString3 })
4069
4144
  ]);
4070
- const UiEventSubscriptionContribution2 = z13.strictObject({
4145
+ const UiEventSubscriptionContribution2 = z14.strictObject({
4071
4146
  localId: LocalContributionId2,
4072
4147
  event: NonEmptyString3
4073
4148
  });
4074
- const DeviceDelegationContribution2 = z13.strictObject({
4149
+ const DeviceDelegationContribution2 = z14.strictObject({
4075
4150
  localId: LocalContributionId2,
4076
- device: z13.enum(["microphone"]),
4077
- delegateAs: z13.enum(["clip", "stream", "status"])
4151
+ device: z14.enum(["microphone"]),
4152
+ delegateAs: z14.enum(["clip", "stream", "status"])
4078
4153
  });
4079
- const CorpusAccess = z13.enum(["read"]);
4080
- const SessionReaderContribution2 = z13.strictObject({
4154
+ const CorpusAccess = z14.enum(["read"]);
4155
+ const SessionReaderContribution2 = z14.strictObject({
4081
4156
  localId: LocalContributionId2,
4082
4157
  displayName: OptionalDisplayName,
4083
4158
  access: canonical ? CorpusAccess : CorpusAccess.default("read")
4084
4159
  });
4085
- const UiCommandContribution2 = z13.strictObject({
4160
+ const UiCommandContribution2 = z14.strictObject({
4086
4161
  localId: LocalContributionId2,
4087
4162
  title: NonEmptyString3,
4088
4163
  icon: PackageAssetPath2.optional(),
4089
- button: z13.enum(["tabStrip"]).optional(),
4090
- menu: z13.enum(["help"]).optional(),
4164
+ button: z14.enum(["tabStrip"]).optional(),
4165
+ menu: z14.enum(["help"]).optional(),
4091
4166
  where: NonEmptyString3.optional()
4092
4167
  }).superRefine((command, ctx) => {
4093
4168
  if (command.where === void 0)
@@ -4108,7 +4183,7 @@ function createContributionsSchemas(canonical) {
4108
4183
  });
4109
4184
  }
4110
4185
  });
4111
- const UiSlotContribution2 = z13.strictObject({
4186
+ const UiSlotContribution2 = z14.strictObject({
4112
4187
  localId: LocalContributionId2,
4113
4188
  slot: NonEmptyString3,
4114
4189
  title: NonEmptyString3.optional()
@@ -4122,84 +4197,86 @@ function createContributionsSchemas(canonical) {
4122
4197
  "blob",
4123
4198
  "about"
4124
4199
  ]);
4125
- const ReferenceOpenBehavior2 = z13.discriminatedUnion("kind", [
4126
- z13.strictObject({ kind: z13.literal("working-document") }),
4127
- z13.strictObject({ kind: z13.literal("browser-pane") }),
4200
+ const ReferenceOpenBehavior2 = z14.discriminatedUnion("kind", [
4201
+ z14.strictObject({ kind: z14.literal("working-document") }),
4202
+ z14.strictObject({ kind: z14.literal("browser-pane") }),
4128
4203
  /**
4129
4204
  * Open one of the pages this manifest declares in `pages`. The window answers this from the
4130
4205
  * manifest, and the page gets the whole address as its `objectId` unless `addresses` says
4131
4206
  * otherwise. Needs no web address, so a plugin-only resource (`user-todo://items/3`) can pill.
4132
4207
  */
4133
- z13.strictObject({ kind: z13.literal("page"), pageId: NonEmptyString3 }),
4208
+ z14.strictObject({ kind: z14.literal("page"), pageId: NonEmptyString3 }),
4134
4209
  /**
4135
4210
  * Hand the address's link to an app on this machine. The module's claims fill the link as its
4136
4211
  * `sourceUrl`, and `schemes` names every scheme those links may use: main opens a link only when
4137
4212
  * a loaded plugin declares its scheme here. A plugin the person installed can't declare this.
4138
4213
  */
4139
- z13.strictObject({
4140
- kind: z13.literal("local-app"),
4141
- schemes: z13.array(UriScheme2.refine((scheme) => !NOT_LOCAL_APP_SCHEMES.has(scheme), "Names the web, a file or script, not an app on this machine")).min(1)
4214
+ z14.strictObject({
4215
+ kind: z14.literal("local-app"),
4216
+ schemes: z14.array(UriScheme2.refine((scheme) => !NOT_LOCAL_APP_SCHEMES.has(scheme), "Names the web, a file or script, not an app on this machine")).min(1)
4142
4217
  })
4143
4218
  ]);
4144
- const ReferencePresentationVariant2 = z13.strictObject({
4219
+ const ReferencePresentationVariant2 = z14.strictObject({
4145
4220
  resourceKind: NonEmptyString3,
4146
4221
  presentationPluginId: PluginId2.optional()
4147
4222
  });
4148
- const ReferencePresentationVariants2 = z13.record(MimeTypeString2, ReferencePresentationVariant2);
4149
- const ReferencePresentationUriPattern2 = z13.strictObject({
4223
+ const ReferencePresentationVariants2 = z14.record(MimeTypeString2, ReferencePresentationVariant2);
4224
+ const ReferencePresentationUriPattern2 = z14.strictObject({
4150
4225
  protocol: NonEmptyString3,
4151
- hostname: NonEmptyString3,
4152
- pathname: z13.string().optional(),
4153
- search: z13.string().optional()
4226
+ hostname: z14.string(),
4227
+ pathname: z14.string().optional(),
4228
+ search: z14.string().optional()
4154
4229
  });
4155
- const ReferencePresentationUrlClaim2 = z13.strictObject({
4156
- kind: z13.literal("urlPattern"),
4230
+ const ReferencePresentationUrlClaim2 = z14.strictObject({
4231
+ kind: z14.literal("urlPattern"),
4157
4232
  pattern: ReferencePresentationUriPattern2.extend({
4158
- protocol: z13.enum(["http", "https"])
4233
+ protocol: z14.enum(["http", "https"])
4159
4234
  }),
4160
4235
  /** The claim's mark: an SVG file in the plugin, drawn in its own colours. */
4161
4236
  brandIcon: PackageAssetPath2.optional()
4162
4237
  });
4163
- const ReferencePresentationTooltip2 = z13.strictObject({
4238
+ const ReferencePresentationTooltip2 = z14.strictObject({
4164
4239
  /** Same-plugin kay.ui app mounted with read-only reference URI context. */
4165
4240
  app: LocalContributionId2,
4166
4241
  pattern: ReferencePresentationUriPattern2
4167
4242
  });
4168
- const ReferencePresentationAddress2 = z13.strictObject({
4243
+ const ReferencePresentationAddress2 = z14.strictObject({
4169
4244
  pattern: ReferencePresentationUriPattern2,
4170
4245
  objectId: NonEmptyString3.optional(),
4171
- open: z13.strictObject({ kind: z13.literal("none") }).optional()
4246
+ resourceKind: NonEmptyString3.optional(),
4247
+ label: NonEmptyString3.optional(),
4248
+ open: z14.strictObject({ kind: z14.literal("none") }).optional()
4172
4249
  });
4173
- const ReferencePresentationAccountLinkPage = z13.strictObject({
4250
+ const ReferencePresentationAccountLinkPage = z14.strictObject({
4174
4251
  /** A literal host name. */
4175
- hostname: z13.string().regex(/^[a-z0-9.-]+$/, "An account link's hostname is a literal lower-case host name."),
4176
- pathname: z13.string().optional(),
4252
+ hostname: z14.string().regex(/^[a-z0-9.-]+$/, "An account link's hostname is a literal lower-case host name."),
4253
+ pathname: z14.string().optional(),
4177
4254
  /** A page matching one of these already names its account, so it stays as it is. */
4178
- unlessPathname: z13.array(z13.string()).min(1).optional(),
4255
+ unlessPathname: z14.array(z14.string()).min(1).optional(),
4179
4256
  /** The path the page opens at, in place of its own. */
4180
- setPathname: z13.string().startsWith("/").optional(),
4257
+ setPathname: z14.string().startsWith("/").optional(),
4181
4258
  /** Query values to add. A page that already has one of these names stays as it is. */
4182
- addQuery: z13.record(NonEmptyString3, NonEmptyString3)
4259
+ addQuery: z14.record(NonEmptyString3, NonEmptyString3)
4183
4260
  });
4184
- const ReferencePresentationAccountLinkAddress = z13.strictObject({
4261
+ const ReferencePresentationAccountLinkAddress = z14.strictObject({
4185
4262
  pattern: ReferencePresentationUriPattern2,
4186
- url: z13.string().regex(/^https?:\/\//, "An account link's url is a web page.")
4263
+ url: z14.string().regex(/^https?:\/\//, "An account link's url is a web page.")
4187
4264
  });
4188
- const ReferencePresentationAccountLinks2 = z13.strictObject({
4189
- label: z13.enum(["email", "name"]).optional(),
4190
- pages: z13.array(ReferencePresentationAccountLinkPage).min(1).optional(),
4191
- addresses: z13.array(ReferencePresentationAccountLinkAddress).min(1).optional()
4265
+ const ReferencePresentationAccountLinks2 = z14.strictObject({
4266
+ label: z14.enum(["email", "name"]).optional(),
4267
+ pages: z14.array(ReferencePresentationAccountLinkPage).min(1).optional(),
4268
+ addresses: z14.array(ReferencePresentationAccountLinkAddress).min(1).optional()
4192
4269
  });
4193
- const ReferencePresentationWords2 = z13.strictObject({
4270
+ const ReferencePresentationWords2 = z14.strictObject({
4194
4271
  /** The row's mark, for a source with no icon of its own. Left out: the plugin's main icon. */
4195
- glyph: z13.enum(TOOL_GLYPHS).optional(),
4272
+ glyph: z14.enum(TOOL_GLYPHS).optional(),
4196
4273
  /** The thing an address names ("channel" in "Read Slack channel"). Left out: the row reads the scheme's own name. */
4197
4274
  kind: NonEmptyString3.optional(),
4198
4275
  /**
4199
4276
  * A more specific kind by the address's shape. The first row that matches decides, and an
4200
4277
  * address no row matches reads `kind`.
4201
4278
  */
4202
- kinds: z13.array(z13.strictObject({
4279
+ kinds: z14.array(z14.strictObject({
4203
4280
  pattern: ReferencePresentationUriPattern2,
4204
4281
  kind: NonEmptyString3
4205
4282
  })).min(1).optional(),
@@ -4208,7 +4285,7 @@ function createContributionsSchemas(canonical) {
4208
4285
  /** What the live phrase names ("Slack" in "Reading Slack"). Left out: the bare verb ("Reading"). */
4209
4286
  target: NonEmptyString3.optional(),
4210
4287
  /** `kind` already says which source this is: "Edited plan", not "Edited Plan plan". */
4211
- kindNamesSource: z13.literal(true).optional()
4288
+ kindNamesSource: z14.literal(true).optional()
4212
4289
  }).superRefine((value, ctx) => {
4213
4290
  if (value.kind === void 0 && (value.glyph !== void 0 || value.kindNamesSource !== void 0 || value.kinds !== void 0)) {
4214
4291
  ctx.addIssue({
@@ -4218,7 +4295,7 @@ function createContributionsSchemas(canonical) {
4218
4295
  });
4219
4296
  }
4220
4297
  });
4221
- const ReferencePresentationContribution2 = z13.strictObject({
4298
+ const ReferencePresentationContribution2 = z14.strictObject({
4222
4299
  localId: LocalContributionId2,
4223
4300
  /** This manifest's URI module. Leave it out only for an address another layer serves. */
4224
4301
  uriModule: LocalContributionId2.optional(),
@@ -4229,7 +4306,7 @@ function createContributionsSchemas(canonical) {
4229
4306
  */
4230
4307
  scheme: UriScheme2.optional(),
4231
4308
  /** Which of the addresses open the page, and on what. Read by the window. */
4232
- addresses: z13.array(ReferencePresentationAddress2).min(1).optional(),
4309
+ addresses: z14.array(ReferencePresentationAddress2).min(1).optional(),
4233
4310
  /** Comes with `open`. A presentation with neither only words its module's addresses. */
4234
4311
  resourceKind: NonEmptyString3.optional(),
4235
4312
  /** How the address opens. Left out, it stays plain text. */
@@ -4237,7 +4314,7 @@ function createContributionsSchemas(canonical) {
4237
4314
  /** MIME-specific resource kinds; absent keys use the base presentation. */
4238
4315
  variants: ReferencePresentationVariants2.optional(),
4239
4316
  /** Lexical public URL claims used only for host-rendered browser presentations. */
4240
- claims: z13.array(ReferencePresentationUrlClaim2).optional(),
4317
+ claims: z14.array(ReferencePresentationUrlClaim2).optional(),
4241
4318
  /** Informational app presentation matched against the canonical resource URI. */
4242
4319
  tooltip: ReferencePresentationTooltip2.optional(),
4243
4320
  /** What the transcript calls this module's addresses. Needs a `uriModule`. */
@@ -4320,7 +4397,7 @@ function createContributionsSchemas(canonical) {
4320
4397
  });
4321
4398
  }
4322
4399
  });
4323
- const KayUiAppHostCapability2 = z13.enum([
4400
+ const KayUiAppHostCapability2 = z14.enum([
4324
4401
  "navigation.open-session",
4325
4402
  // Lets `navigation.openChat` create a blank chat (no message, no model
4326
4403
  // turn) when no session id is given. It never sends anything.
@@ -4367,16 +4444,16 @@ function createContributionsSchemas(canonical) {
4367
4444
  // rearrange the workspace but never remove something the user would have to notice going missing.
4368
4445
  "workspace.arrange"
4369
4446
  ]);
4370
- const UiAppCapabilityReference2 = z13.union([
4447
+ const UiAppCapabilityReference2 = z14.union([
4371
4448
  LocalContributionId2,
4372
- z13.strictObject({ pluginId: PluginId2, localId: LocalContributionId2 })
4449
+ z14.strictObject({ pluginId: PluginId2, localId: LocalContributionId2 })
4373
4450
  ]);
4374
- const UiAppCapabilities2 = z13.strictObject({
4375
- endpoints: z13.array(UiAppCapabilityReference2).optional(),
4376
- host: z13.array(KayUiAppHostCapability2).optional(),
4451
+ const UiAppCapabilities2 = z14.strictObject({
4452
+ endpoints: z14.array(UiAppCapabilityReference2).optional(),
4453
+ host: z14.array(KayUiAppHostCapability2).optional(),
4377
4454
  // A local name selects this plugin's source first, otherwise the daemon's.
4378
4455
  // An explicit reference selects only the named plugin.
4379
- feeds: z13.array(UiAppCapabilityReference2).optional()
4456
+ feeds: z14.array(UiAppCapabilityReference2).optional()
4380
4457
  }).superRefine((capabilities, ctx) => {
4381
4458
  for (const field of ["endpoints", "host", "feeds"]) {
4382
4459
  const seen = /* @__PURE__ */ new Set();
@@ -4393,10 +4470,10 @@ function createContributionsSchemas(canonical) {
4393
4470
  }
4394
4471
  }
4395
4472
  });
4396
- const UiRailBadge = z13.strictObject({
4473
+ const UiRailBadge = z14.strictObject({
4397
4474
  source: LocalContributionId2,
4398
4475
  where: NonEmptyString3.optional(),
4399
- label: z13.strictObject({
4476
+ label: z14.strictObject({
4400
4477
  one: NonEmptyString3.optional(),
4401
4478
  other: NonEmptyString3
4402
4479
  })
@@ -4412,48 +4489,50 @@ function createContributionsSchemas(canonical) {
4412
4489
  });
4413
4490
  }
4414
4491
  });
4415
- const UiRailEntryContribution2 = z13.strictObject({
4492
+ const UiRailEntryContribution2 = z14.strictObject({
4416
4493
  id: LocalContributionId2,
4417
4494
  title: NonEmptyString3,
4418
4495
  icon: PackageAssetPath2.optional(),
4419
4496
  page: NonEmptyString3,
4420
4497
  homeLocation: NonEmptyString3.optional(),
4421
4498
  shortcut: NonEmptyString3.optional(),
4422
- order: z13.number().finite().optional(),
4423
- section: z13.enum(["primary", "plugins"]).optional(),
4499
+ order: z14.number().finite().optional(),
4500
+ section: z14.enum(["primary", "plugins"]).optional(),
4424
4501
  badge: UiRailBadge.optional(),
4425
- panel: z13.strictObject({ body: LocalContributionId2 }).optional(),
4426
- featureFlagVariant: z13.strictObject({
4502
+ panel: z14.strictObject({ body: LocalContributionId2 }).optional(),
4503
+ featureFlagVariant: z14.strictObject({
4427
4504
  flag: NonEmptyString3,
4428
4505
  title: NonEmptyString3.optional(),
4429
4506
  icon: PackageAssetPath2.optional(),
4430
- panel: z13.literal(false).optional()
4507
+ panel: z14.literal(false).optional()
4431
4508
  }).optional()
4432
4509
  });
4433
- const UiToastPreviewContribution2 = z13.strictObject({
4510
+ const UiToastPreviewContribution2 = z14.strictObject({
4434
4511
  rule: LocalContributionId2,
4435
4512
  body: LocalContributionId2,
4436
4513
  address: NonEmptyString3
4437
4514
  });
4438
- const UiPageContribution2 = z13.strictObject({
4515
+ const UiPageContribution2 = z14.strictObject({
4439
4516
  id: NonEmptyString3,
4440
4517
  title: NonEmptyString3.optional(),
4441
4518
  icon: PackageAssetPath2.optional(),
4442
- companion: z13.boolean().optional(),
4519
+ companion: z14.boolean().optional(),
4520
+ sessionBinding: z14.enum(["session", "family"]).optional(),
4521
+ aliases: z14.array(NonEmptyString3).optional(),
4443
4522
  openedEvent: NonEmptyString3.optional()
4444
4523
  });
4445
- const UiAppFields = z13.strictObject({
4524
+ const UiAppFields = z14.strictObject({
4446
4525
  localId: LocalContributionId2,
4447
4526
  displayName: NonEmptyString3,
4448
4527
  description: NonEmptyString3.optional(),
4449
4528
  icon: PackageAssetPath2.optional(),
4450
- runtime: z13.literal("kay.react-app.v1"),
4529
+ runtime: z14.literal("kay.react-app.v1"),
4451
4530
  /** Mounted only by a host-supplied context; never a standalone navigation destination. */
4452
- contextOnly: z13.literal(true).optional(),
4453
- sdk: z13.strictObject({ range: NonEmptyString3 }),
4531
+ contextOnly: z14.literal(true).optional(),
4532
+ sdk: z14.strictObject({ range: NonEmptyString3 }),
4454
4533
  entrypoint: TargetEntrypoint2,
4455
- styles: z13.array(PackageAssetPath2).optional(),
4456
- assets: z13.array(PackageAssetPath2).optional(),
4534
+ styles: z14.array(PackageAssetPath2).optional(),
4535
+ assets: z14.array(PackageAssetPath2).optional(),
4457
4536
  capabilities: UiAppCapabilities2.optional()
4458
4537
  });
4459
4538
  function stripRetiredUiAppFields(value) {
@@ -4464,36 +4543,36 @@ function createContributionsSchemas(canonical) {
4464
4543
  delete remaining["activityRail"];
4465
4544
  return remaining;
4466
4545
  }
4467
- const UiAppContribution2 = canonical ? UiAppFields : z13.preprocess(stripRetiredUiAppFields, UiAppFields);
4468
- const ThemeContribution2 = z13.strictObject({
4546
+ const UiAppContribution2 = canonical ? UiAppFields : z14.preprocess(stripRetiredUiAppFields, UiAppFields);
4547
+ const ThemeContribution2 = z14.strictObject({
4469
4548
  localId: LocalContributionId2,
4470
4549
  displayName: NonEmptyString3,
4471
- appearance: z13.enum(["light", "dark"]),
4550
+ appearance: z14.enum(["light", "dark"]),
4472
4551
  tokens: PackageAssetPath2
4473
4552
  });
4474
- const CommandHandler2 = z13.discriminatedUnion("kind", [
4475
- z13.strictObject({ kind: z13.literal("skill"), skill: LocalContributionId2 }),
4476
- z13.strictObject({
4477
- kind: z13.literal("tool"),
4553
+ const CommandHandler2 = z14.discriminatedUnion("kind", [
4554
+ z14.strictObject({ kind: z14.literal("skill"), skill: LocalContributionId2 }),
4555
+ z14.strictObject({
4556
+ kind: z14.literal("tool"),
4478
4557
  tool: PluginToolName2,
4479
4558
  /** Positional mapping from tokenized `argsText` onto the tool's own input fields - see this
4480
4559
  * union's doc for the exact tokenize/map/last-field-absorbs rule. */
4481
- argumentFields: z13.array(NonEmptyString3)
4560
+ argumentFields: z14.array(NonEmptyString3)
4482
4561
  }),
4483
- z13.strictObject({
4484
- kind: z13.literal("endpoint"),
4562
+ z14.strictObject({
4563
+ kind: z14.literal("endpoint"),
4485
4564
  endpoint: LocalContributionId2
4486
4565
  })
4487
4566
  ]);
4488
- const CommandContribution2 = z13.strictObject({
4567
+ const CommandContribution2 = z14.strictObject({
4489
4568
  localId: LocalContributionId2,
4490
4569
  displayName: OptionalDisplayName,
4491
4570
  description: NonEmptyString3,
4492
- aliases: z13.array(LocalContributionId2).optional(),
4571
+ aliases: z14.array(LocalContributionId2).optional(),
4493
4572
  argumentHint: NonEmptyString3.optional(),
4494
4573
  handler: CommandHandler2
4495
4574
  });
4496
- const PluginContributionKind2 = z13.enum([
4575
+ const PluginContributionKind2 = z14.enum([
4497
4576
  "tool",
4498
4577
  "converter",
4499
4578
  "uriModule",
@@ -4654,27 +4733,27 @@ __export(manifest_exports, {
4654
4733
  });
4655
4734
 
4656
4735
  // packages/plugin-protocol/dist/shell-commands.js
4657
- import { z as z14 } from "zod";
4658
- var PluginShellCommand = z14.strictObject({
4659
- name: z14.string().regex(/^[a-z][a-z0-9-]*$/),
4660
- aliases: z14.array(z14.string().regex(/^[a-z][a-z0-9-]*$/)).optional(),
4661
- endpoint: z14.string().min(1),
4662
- usage: z14.string().min(1)
4736
+ import { z as z15 } from "zod";
4737
+ var PluginShellCommand = z15.strictObject({
4738
+ name: z15.string().regex(/^[a-z][a-z0-9-]*$/),
4739
+ aliases: z15.array(z15.string().regex(/^[a-z][a-z0-9-]*$/)).optional(),
4740
+ endpoint: z15.string().min(1),
4741
+ usage: z15.string().min(1)
4663
4742
  });
4664
- var ShellCommandOutcome = z14.strictObject({
4665
- exitCode: z14.number().int(),
4743
+ var ShellCommandOutcome = z15.strictObject({
4744
+ exitCode: z15.number().int(),
4666
4745
  envelope: JsonValue,
4667
4746
  result: JsonValue.optional()
4668
4747
  });
4669
- var ShellCommandRequest = z14.strictObject({
4670
- argv: z14.array(z14.string()),
4671
- cwd: z14.string(),
4672
- outcomes: z14.array(ShellCommandOutcome).max(3)
4748
+ var ShellCommandRequest = z15.strictObject({
4749
+ argv: z15.array(z15.string()),
4750
+ cwd: z15.string(),
4751
+ outcomes: z15.array(ShellCommandOutcome).max(3)
4673
4752
  });
4674
- var ShellCommandStep = z14.discriminatedUnion("kind", [
4675
- z14.strictObject({
4676
- kind: z14.literal("invoke"),
4677
- toolName: z14.enum([
4753
+ var ShellCommandStep = z15.discriminatedUnion("kind", [
4754
+ z15.strictObject({
4755
+ kind: z15.literal("invoke"),
4756
+ toolName: z15.enum([
4678
4757
  "read",
4679
4758
  "list",
4680
4759
  "search",
@@ -4683,24 +4762,24 @@ var ShellCommandStep = z14.discriminatedUnion("kind", [
4683
4762
  "delete",
4684
4763
  "help"
4685
4764
  ]),
4686
- input: z14.record(z14.string(), JsonValue),
4687
- flags: z14.record(z14.string(), z14.string())
4765
+ input: z15.record(z15.string(), JsonValue),
4766
+ flags: z15.record(z15.string(), z15.string())
4688
4767
  }),
4689
- z14.strictObject({
4690
- kind: z14.literal("finish"),
4691
- exitCode: z14.number().int(),
4692
- stdout: z14.string()
4768
+ z15.strictObject({
4769
+ kind: z15.literal("finish"),
4770
+ exitCode: z15.number().int(),
4771
+ stdout: z15.string()
4693
4772
  })
4694
4773
  ]);
4695
4774
 
4696
4775
  // packages/plugin-protocol/dist/manifest.js
4697
- import { z as z16 } from "zod";
4776
+ import { z as z17 } from "zod";
4698
4777
 
4699
4778
  // packages/plugin-protocol/dist/workload-purposes.js
4700
- import { z as z15 } from "zod";
4701
- var PluginWorkloadPurpose = z15.strictObject({
4702
- purpose: z15.string().regex(/^[a-z][a-z0-9-]*$/),
4703
- workloadClass: z15.enum(["dreaming", "hindsight"])
4779
+ import { z as z16 } from "zod";
4780
+ var PluginWorkloadPurpose = z16.strictObject({
4781
+ purpose: z16.string().regex(/^[a-z][a-z0-9-]*$/),
4782
+ workloadClass: z16.enum(["dreaming", "hindsight"])
4704
4783
  });
4705
4784
 
4706
4785
  // packages/plugin-protocol/dist/synthetic-contributions.js
@@ -4726,34 +4805,34 @@ function createManifestSchemas(canonical) {
4726
4805
  const { AgentRenderContribution: AgentRenderContribution2, ApprovalTypeContribution: ApprovalTypeContribution2, WorkflowContribution: WorkflowContribution2, PluginCardContribution: PluginCardContribution2, AppDataMaterializerContribution: AppDataMaterializerContribution2, AppDataSourceContribution: AppDataSourceContribution2, AppUriModuleContribution: AppUriModuleContribution2, AppEventSubscription: AppEventSubscription2, ArtifactUriModuleContribution: ArtifactUriModuleContribution2, CliBindingContribution: CliBindingContribution2, CommandContribution: CommandContribution2, ContextContributorContribution: ContextContributorContribution2, ConverterContribution: ConverterContribution2, SessionReaderContribution: SessionReaderContribution2, DeviceDelegationContribution: DeviceDelegationContribution2, EndpointContribution: EndpointContribution2, EntityResolverContribution: EntityResolverContribution2, GitHostContribution: GitHostContribution2, McpServerContributions: McpServerContributions2, PluginEventDefinitionContribution: PluginEventDefinitionContribution2, PluginNotificationRuleContribution: PluginNotificationRuleContribution2, PluginProductEventContribution: PluginProductEventContribution2, ResourceContribution: ResourceContribution2, ReferencePresentationContribution: ReferencePresentationContribution2, PluginSkillSourceDeclaration: PluginSkillSourceDeclaration2, InteractionDriverContribution: InteractionDriverContribution2, SearchProviderContribution: SearchProviderContribution2, SkillContribution: SkillContribution2, ThemeContribution: ThemeContribution2, AgentToolContribution: AgentToolContribution2, ToolContribution: ToolContribution2, UiCommandContribution: UiCommandContribution2, UiAppContribution: UiAppContribution2, UiRailEntryContribution: UiRailEntryContribution2, UiToastPreviewContribution: UiToastPreviewContribution2, UiPageContribution: UiPageContribution2, UiEventSubscriptionContribution: UiEventSubscriptionContribution2, UiSlotContribution: UiSlotContribution2, UriModuleContribution: UriModuleContribution2, WhiteboardTypeContribution: WhiteboardTypeContribution2 } = canonical ? canonicalContributionSchemas : contributions_exports;
4727
4806
  const { HttpsUrl: HttpsUrl2, LocalContributionId: LocalContributionId2, NonEmptyString: NonEmptyString3, PackageAssetPath: PackageAssetPath2, PluginId: PluginId2, PluginNamespace: PluginNamespace2, RegistrableDomain: RegistrableDomain2, SignedInStatusCode: SignedInStatusCode2, TargetEntrypoint: TargetEntrypoint2 } = canonical ? canonicalCommonSchemas : common_exports;
4728
4807
  const { PluginPermissionManifest: PluginPermissionManifest2 } = canonical ? canonicalPermissionSchemas : permissions_exports;
4729
- const KayAgentTargetManifest2 = z16.strictObject({
4808
+ const KayAgentTargetManifest2 = z17.strictObject({
4730
4809
  entrypoint: TargetEntrypoint2,
4731
- contributes: z16.strictObject({
4732
- tools: z16.array(AgentToolContribution2).optional(),
4733
- converters: z16.array(ConverterContribution2).optional(),
4734
- uriModules: z16.array(UriModuleContribution2).optional(),
4810
+ contributes: z17.strictObject({
4811
+ tools: z17.array(AgentToolContribution2).optional(),
4812
+ converters: z17.array(ConverterContribution2).optional(),
4813
+ uriModules: z17.array(UriModuleContribution2).optional(),
4735
4814
  // Host-composed artifact-backed schemes (see `ArtifactUriModuleContribution`): the plugin
4736
4815
  // declares scheme + editability; the daemon binds each to the kernel's artifact lifecycle
4737
4816
  // per session. Separate from `uriModules` (plugin-implemented backends) precisely because
4738
4817
  // the plugin registers NOTHING for these at activation.
4739
- artifactUriModules: z16.array(ArtifactUriModuleContribution2).optional(),
4740
- cliBindings: z16.array(CliBindingContribution2).optional(),
4818
+ artifactUriModules: z17.array(ArtifactUriModuleContribution2).optional(),
4819
+ cliBindings: z17.array(CliBindingContribution2).optional(),
4741
4820
  // Which git hosts this plugin's credential serves (see `GitHostContribution`): a
4742
4821
  // declaration, so a plugin for any git backend gets credentialed clones without
4743
4822
  // the daemon learning its name. Sibling of `cliBindings` because both answer the
4744
4823
  // same question - which of this plugin's auth services a host-side consumer
4745
4824
  // resolves - for two different transports.
4746
- gitHosts: z16.array(GitHostContribution2).optional(),
4747
- resources: z16.array(ResourceContribution2).optional(),
4748
- skills: z16.array(SkillContribution2).optional(),
4749
- searchProviders: z16.array(SearchProviderContribution2).optional(),
4750
- interactionDrivers: z16.array(InteractionDriverContribution2).optional(),
4751
- entityResolvers: z16.array(EntityResolverContribution2).optional(),
4752
- renderers: z16.array(AgentRenderContribution2).optional(),
4825
+ gitHosts: z17.array(GitHostContribution2).optional(),
4826
+ resources: z17.array(ResourceContribution2).optional(),
4827
+ skills: z17.array(SkillContribution2).optional(),
4828
+ searchProviders: z17.array(SearchProviderContribution2).optional(),
4829
+ interactionDrivers: z17.array(InteractionDriverContribution2).optional(),
4830
+ entityResolvers: z17.array(EntityResolverContribution2).optional(),
4831
+ renderers: z17.array(AgentRenderContribution2).optional(),
4753
4832
  // Handler restricted to skill | tool by the manifest-level refinement below (see
4754
4833
  // `CommandContribution`'s doc for why the restriction is not expressed in the type, and
4755
4834
  // `CommandHandler`'s doc for why there is no promptTemplate variant to declare here).
4756
- commands: z16.array(CommandContribution2).optional()
4835
+ commands: z17.array(CommandContribution2).optional()
4757
4836
  }).optional(),
4758
4837
  /**
4759
4838
  * The plugin's primer skill - the `localId` of one of its own declared
@@ -4789,6 +4868,8 @@ function createManifestSchemas(canonical) {
4789
4868
  * grant a person approved), and a body over 500 words is dropped.
4790
4869
  */
4791
4870
  prompt: PackageAssetPath2.optional(),
4871
+ promptOrder: z17.number().finite().optional(),
4872
+ familyFolder: z17.strictObject({ scope: z17.literal("root") }).optional(),
4792
4873
  /**
4793
4874
  * External origins of skills this plugin claims as its own (see
4794
4875
  * {@link PluginSkillSourceDeclaration}). Acquired by the daemon at boot and landed under the
@@ -4799,61 +4880,61 @@ function createManifestSchemas(canonical) {
4799
4880
  * acquisition, not declared here, so there is nothing for the resolved contract to mint a
4800
4881
  * `globalId` for at parse time.
4801
4882
  */
4802
- skillSources: z16.array(PluginSkillSourceDeclaration2).optional()
4883
+ skillSources: z17.array(PluginSkillSourceDeclaration2).optional()
4803
4884
  });
4804
- const KayAppTargetManifest2 = z16.strictObject({
4885
+ const KayAppTargetManifest2 = z17.strictObject({
4805
4886
  // Optional, like `kay.ui`'s: a target may carry only declarative `contributes` (e.g. a plugin
4806
4887
  // that ships nothing but `mcpServers`) with no app-lifetime module for the host to load.
4807
4888
  entrypoint: TargetEntrypoint2.optional(),
4808
- contributes: z16.strictObject({
4889
+ contributes: z17.strictObject({
4809
4890
  // Session tools implemented by the app-lifetime activation (registered once, injected into
4810
4891
  // every session with a host-stamped session context) - the tool counterpart of `uriModules`
4811
4892
  // below. Same descriptor shape as kay.agent tools; `toolName` shares ONE flat session
4812
4893
  // namespace with them (enforced by the manifest-level refinement below).
4813
- tools: z16.array(ToolContribution2).optional(),
4814
- endpoints: z16.array(EndpointContribution2).optional(),
4815
- cards: z16.array(PluginCardContribution2).optional(),
4816
- uriModules: z16.array(AppUriModuleContribution2).optional(),
4817
- dataSources: z16.array(AppDataSourceContribution2).optional(),
4818
- whiteboardTypes: z16.array(WhiteboardTypeContribution2).optional(),
4819
- approvalTypes: z16.array(ApprovalTypeContribution2).optional(),
4820
- workflows: z16.array(WorkflowContribution2).optional(),
4821
- eventDefinitions: z16.array(PluginEventDefinitionContribution2).optional(),
4894
+ tools: z17.array(ToolContribution2).optional(),
4895
+ endpoints: z17.array(EndpointContribution2).optional(),
4896
+ cards: z17.array(PluginCardContribution2).optional(),
4897
+ uriModules: z17.array(AppUriModuleContribution2).optional(),
4898
+ dataSources: z17.array(AppDataSourceContribution2).optional(),
4899
+ whiteboardTypes: z17.array(WhiteboardTypeContribution2).optional(),
4900
+ approvalTypes: z17.array(ApprovalTypeContribution2).optional(),
4901
+ workflows: z17.array(WorkflowContribution2).optional(),
4902
+ eventDefinitions: z17.array(PluginEventDefinitionContribution2).optional(),
4822
4903
  // Default notification rules over this plugin's own `eventDefinitions`; seeded by the host
4823
4904
  // (see `PluginNotificationRuleContribution`).
4824
- notificationRules: z16.array(PluginNotificationRuleContribution2).optional(),
4825
- productEvents: z16.array(PluginProductEventContribution2).optional(),
4826
- eventSubscriptions: z16.array(AppEventSubscription2).optional(),
4827
- deviceDelegations: z16.array(DeviceDelegationContribution2).optional(),
4828
- sessionReaders: z16.array(SessionReaderContribution2).optional(),
4829
- contextContributors: z16.array(ContextContributorContribution2).optional(),
4905
+ notificationRules: z17.array(PluginNotificationRuleContribution2).optional(),
4906
+ productEvents: z17.array(PluginProductEventContribution2).optional(),
4907
+ eventSubscriptions: z17.array(AppEventSubscription2).optional(),
4908
+ deviceDelegations: z17.array(DeviceDelegationContribution2).optional(),
4909
+ sessionReaders: z17.array(SessionReaderContribution2).optional(),
4910
+ contextContributors: z17.array(ContextContributorContribution2).optional(),
4830
4911
  // Vendored MCP servers this plugin ships (see `McpServerContributions`). Each is hosted only
4831
4912
  // for a plugin holding `mcp.host-server` for its name and URL; that is decided at
4832
4913
  // composition, not here (see ARCHITECTURE.md "Validation Law").
4833
4914
  mcpServers: McpServerContributions2.optional(),
4834
4915
  // Handler restricted to endpoint-only by the manifest-level refinement below.
4835
- commands: z16.array(CommandContribution2).optional()
4916
+ commands: z17.array(CommandContribution2).optional()
4836
4917
  }).optional()
4837
4918
  });
4838
- const KayUiTargetManifest2 = z16.strictObject({
4919
+ const KayUiTargetManifest2 = z17.strictObject({
4839
4920
  entrypoint: TargetEntrypoint2.extend({
4840
- format: z16.literal("compiled-bundle").optional()
4921
+ format: z17.literal("compiled-bundle").optional()
4841
4922
  }).optional(),
4842
- contributes: z16.strictObject({
4843
- commands: z16.array(UiCommandContribution2).optional(),
4844
- slots: z16.array(UiSlotContribution2).optional(),
4845
- referencePresentations: z16.array(ReferencePresentationContribution2).optional(),
4846
- apps: z16.array(UiAppContribution2).optional(),
4847
- railEntries: z16.array(UiRailEntryContribution2).optional(),
4848
- toastPreviews: z16.array(UiToastPreviewContribution2).optional(),
4849
- pages: z16.array(UiPageContribution2).optional(),
4850
- themes: z16.array(ThemeContribution2).optional(),
4851
- eventSubscriptions: z16.array(UiEventSubscriptionContribution2).optional(),
4852
- dataMaterializers: z16.array(AppDataMaterializerContribution2).optional()
4923
+ contributes: z17.strictObject({
4924
+ commands: z17.array(UiCommandContribution2).optional(),
4925
+ slots: z17.array(UiSlotContribution2).optional(),
4926
+ referencePresentations: z17.array(ReferencePresentationContribution2).optional(),
4927
+ apps: z17.array(UiAppContribution2).optional(),
4928
+ railEntries: z17.array(UiRailEntryContribution2).optional(),
4929
+ toastPreviews: z17.array(UiToastPreviewContribution2).optional(),
4930
+ pages: z17.array(UiPageContribution2).optional(),
4931
+ themes: z17.array(ThemeContribution2).optional(),
4932
+ eventSubscriptions: z17.array(UiEventSubscriptionContribution2).optional(),
4933
+ dataMaterializers: z17.array(AppDataMaterializerContribution2).optional()
4853
4934
  }).optional()
4854
4935
  });
4855
- const PluginConfigScope2 = z16.enum(["global", "project", "agent"]);
4856
- const PluginConfigSectionManifest2 = z16.strictObject({
4936
+ const PluginConfigScope2 = z17.enum(["global", "project", "agent"]);
4937
+ const PluginConfigSectionManifest2 = z17.strictObject({
4857
4938
  section: NonEmptyString3.optional(),
4858
4939
  schema: JsonSchema,
4859
4940
  /**
@@ -4871,23 +4952,23 @@ function createManifestSchemas(canonical) {
4871
4952
  * is the baseline every section has; `agent` has no runtime mapping (the
4872
4953
  * agent/entity fold is downstream of the document protocol).
4873
4954
  */
4874
- scopes: z16.array(PluginConfigScope2).optional()
4955
+ scopes: z17.array(PluginConfigScope2).optional()
4875
4956
  });
4876
- const PluginConfigManifest2 = z16.array(PluginConfigSectionManifest2).min(1);
4877
- const PluginStorageManifest2 = z16.strictObject({
4878
- sqlite: z16.strictObject({
4879
- enabled: z16.boolean(),
4880
- ownerTarget: z16.literal("kay.app").optional(),
4957
+ const PluginConfigManifest2 = z17.array(PluginConfigSectionManifest2).min(1);
4958
+ const PluginStorageManifest2 = z17.strictObject({
4959
+ sqlite: z17.strictObject({
4960
+ enabled: z17.boolean(),
4961
+ ownerTarget: z17.literal("kay.app").optional(),
4881
4962
  migrations: NonEmptyString3.optional()
4882
4963
  }).optional(),
4883
- dataDir: z16.strictObject({
4884
- enabled: z16.boolean(),
4885
- ownerTarget: z16.literal("kay.app").optional(),
4964
+ dataDir: z17.strictObject({
4965
+ enabled: z17.boolean(),
4966
+ ownerTarget: z17.literal("kay.app").optional(),
4886
4967
  sharedWith: PluginId2.optional()
4887
4968
  }).optional()
4888
4969
  });
4889
- const PluginOAuthClientSupplier2 = z16.enum(["kay", "user"]);
4890
- const PluginProvisioningProbe2 = z16.strictObject({
4970
+ const PluginOAuthClientSupplier2 = z17.enum(["kay", "user"]);
4971
+ const PluginProvisioningProbe2 = z17.strictObject({
4891
4972
  /**
4892
4973
  * The API endpoint that answers the question. The host sends the service's OWN credential here,
4893
4974
  * so this must belong to the provider that minted it - enforced by the daemon against the
@@ -4895,13 +4976,13 @@ function createManifestSchemas(canonical) {
4895
4976
  */
4896
4977
  url: HttpsUrl2,
4897
4978
  /** Absent => `GET`. */
4898
- method: z16.enum(["GET"]).optional(),
4979
+ method: z17.enum(["GET"]).optional(),
4899
4980
  /**
4900
4981
  * The statuses that make the response a VERDICT at all. Anything else (a 401 from a stale
4901
4982
  * token, a 5xx, a rate limit) means the probe learned nothing and reports `unknown` - never
4902
4983
  * `unsatisfied`, which would tell a user to go fix setup that is fine.
4903
4984
  */
4904
- verdictStatuses: z16.array(SignedInStatusCode2).min(1),
4985
+ verdictStatuses: z17.array(SignedInStatusCode2).min(1),
4905
4986
  /**
4906
4987
  * Dot-path to a JSON array in the response body that must be NON-EMPTY for the requirement to
4907
4988
  * count as satisfied (e.g. `installations`). Absent means a verdict status alone is enough.
@@ -4910,7 +4991,7 @@ function createManifestSchemas(canonical) {
4910
4991
  */
4911
4992
  nonEmptyArrayAt: NonEmptyString3.optional()
4912
4993
  });
4913
- const PluginProvisioningRequirement2 = z16.strictObject({
4994
+ const PluginProvisioningRequirement2 = z17.strictObject({
4914
4995
  /** Stable id, unique within the scheme. */
4915
4996
  id: LocalContributionId2,
4916
4997
  /** Human-facing requirement name, e.g. "GitHub App installation". */
@@ -4927,7 +5008,7 @@ function createManifestSchemas(canonical) {
4927
5008
  probe: PluginProvisioningProbe2
4928
5009
  });
4929
5010
  const PluginProvisioningField = {
4930
- provisioning: z16.array(PluginProvisioningRequirement2).optional()
5011
+ provisioning: z17.array(PluginProvisioningRequirement2).optional()
4931
5012
  };
4932
5013
  const PluginAuthSchemeDescriptionFields = {
4933
5014
  /** Human-facing flow name; absent, the service's name stands in. */
@@ -4944,16 +5025,16 @@ function createManifestSchemas(canonical) {
4944
5025
  authorizationUrl: HttpsUrl2,
4945
5026
  tokenUrl: HttpsUrl2,
4946
5027
  /** Provider-specific query parameters added to the authorize URL. */
4947
- extraAuthorizeParams: z16.record(NonEmptyString3, z16.string()).optional()
5028
+ extraAuthorizeParams: z17.record(NonEmptyString3, z17.string()).optional()
4948
5029
  };
4949
- const PluginAuthSchemeAccountLookup = z16.literal("lookup");
4950
- const PluginAuthSchemeOAuthPkce = z16.strictObject({
5030
+ const PluginAuthSchemeAccountLookup = z17.literal("lookup");
5031
+ const PluginAuthSchemeOAuthPkce = z17.strictObject({
4951
5032
  ...PluginProvisioningField,
4952
5033
  ...PluginAuthSchemeDescriptionFields,
4953
5034
  ...PluginAuthSchemeOAuthEndpointFields,
4954
5035
  localId: LocalContributionId2,
4955
- kind: z16.literal("oauth2"),
4956
- exchange: z16.literal("pkce"),
5036
+ kind: z17.literal("oauth2"),
5037
+ exchange: z17.literal("pkce"),
4957
5038
  byoocProfile: PluginByoocProfile.optional(),
4958
5039
  /**
4959
5040
  * A public client id the plugin ships for its own sign-in. Only an installed plugin's is used:
@@ -4977,7 +5058,7 @@ function createManifestSchemas(canonical) {
4977
5058
  * runs on an untrusted manifest, so a hand-built `["kay","kay"]` must be refused here, not
4978
5059
  * silently normalized).
4979
5060
  */
4980
- clientSuppliers: z16.array(PluginOAuthClientSupplier2).nonempty().superRefine((suppliers, ctx) => {
5061
+ clientSuppliers: z17.array(PluginOAuthClientSupplier2).nonempty().superRefine((suppliers, ctx) => {
4981
5062
  if (new Set(suppliers).size !== suppliers.length) {
4982
5063
  ctx.addIssue({
4983
5064
  code: "custom",
@@ -4985,7 +5066,7 @@ function createManifestSchemas(canonical) {
4985
5066
  });
4986
5067
  }
4987
5068
  }),
4988
- scopes: z16.array(NonEmptyString3).optional()
5069
+ scopes: z17.array(NonEmptyString3).optional()
4989
5070
  }).refine((scheme) => scheme.byoocProfile === void 0 || scheme.clientSuppliers.includes("user"), {
4990
5071
  message: "An own-client profile requires the user client supplier.",
4991
5072
  path: ["byoocProfile"]
@@ -4996,33 +5077,33 @@ function createManifestSchemas(canonical) {
4996
5077
  message: "a scheme with its own clientId names where its account comes from (`account`)",
4997
5078
  path: ["account"]
4998
5079
  });
4999
- const PluginAuthSchemeOAuthConfidential = z16.strictObject({
5080
+ const PluginAuthSchemeOAuthConfidential = z17.strictObject({
5000
5081
  ...PluginProvisioningField,
5001
5082
  ...PluginAuthSchemeDescriptionFields,
5002
5083
  ...PluginAuthSchemeOAuthEndpointFields,
5003
5084
  localId: LocalContributionId2,
5004
- kind: z16.literal("oauth2"),
5005
- exchange: z16.literal("confidential"),
5085
+ kind: z17.literal("oauth2"),
5086
+ exchange: z17.literal("confidential"),
5006
5087
  /** Absent means `["kay"]` - a confidential exchange's secret may only ever be Bonsai's. */
5007
- clientSuppliers: z16.tuple([z16.literal("kay")]).optional(),
5008
- scopes: z16.array(NonEmptyString3).optional(),
5088
+ clientSuppliers: z17.tuple([z17.literal("kay")]).optional(),
5089
+ scopes: z17.array(NonEmptyString3).optional(),
5009
5090
  /** Where the account comes from (see {@link PluginAuthSchemeAccountLookup}). */
5010
- account: z16.union([PluginAuthSchemeAccountLookup, z16.literal("sign-in")])
5091
+ account: z17.union([PluginAuthSchemeAccountLookup, z17.literal("sign-in")])
5011
5092
  });
5012
- const PluginAuthSchemeOAuth2 = z16.discriminatedUnion("exchange", [
5093
+ const PluginAuthSchemeOAuth2 = z17.discriminatedUnion("exchange", [
5013
5094
  PluginAuthSchemeOAuthPkce,
5014
5095
  PluginAuthSchemeOAuthConfidential
5015
5096
  ]);
5016
- const PluginAuthSchemeApiKey = z16.strictObject({
5097
+ const PluginAuthSchemeApiKey = z17.strictObject({
5017
5098
  ...PluginProvisioningField,
5018
5099
  ...PluginAuthSchemeDescriptionFields,
5019
5100
  localId: LocalContributionId2,
5020
- kind: z16.literal("api-key"),
5021
- scopes: z16.array(NonEmptyString3).optional(),
5101
+ kind: z17.literal("api-key"),
5102
+ scopes: z17.array(NonEmptyString3).optional(),
5022
5103
  /** The connect prompt's label for the key. Absent: "<service name> API key". */
5023
5104
  inputLabel: NonEmptyString3.optional(),
5024
5105
  /** Two or more labeled inputs for a secret that comes in parts; absent asks for one key. */
5025
- fields: z16.array(z16.strictObject({ id: LocalContributionId2, label: NonEmptyString3 })).min(2).superRefine((fields, ctx) => {
5106
+ fields: z17.array(z17.strictObject({ id: LocalContributionId2, label: NonEmptyString3 })).min(2).superRefine((fields, ctx) => {
5026
5107
  if (new Set(fields.map((field) => field.id)).size !== fields.length) {
5027
5108
  ctx.addIssue({
5028
5109
  code: "custom",
@@ -5031,7 +5112,7 @@ function createManifestSchemas(canonical) {
5031
5112
  }
5032
5113
  }).optional(),
5033
5114
  /** Where and how the person creates the key outside Bonsai. */
5034
- setup: z16.strictObject({ instructions: NonEmptyString3, url: HttpsUrl2 }).optional(),
5115
+ setup: z17.strictObject({ instructions: NonEmptyString3, url: HttpsUrl2 }).optional(),
5035
5116
  /**
5036
5117
  * `"lookup"`: the plugin checks a key before it is saved and names its account, with the function
5037
5118
  * it registers (`api.auth.registerAccountLookup`). Absent: the key is saved unchecked, under the
@@ -5039,27 +5120,27 @@ function createManifestSchemas(canonical) {
5039
5120
  */
5040
5121
  account: PluginAuthSchemeAccountLookup.optional()
5041
5122
  });
5042
- const PluginAuthSchemeDelegated = z16.strictObject({
5123
+ const PluginAuthSchemeDelegated = z17.strictObject({
5043
5124
  ...PluginAuthSchemeDescriptionFields,
5044
5125
  localId: LocalContributionId2,
5045
- kind: z16.literal("delegated"),
5046
- scopes: z16.array(NonEmptyString3).optional()
5126
+ kind: z17.literal("delegated"),
5127
+ scopes: z17.array(NonEmptyString3).optional()
5047
5128
  });
5048
- const ExternalCliArgument = z16.string().min(1).max(16384).refine((value) => ![...value].some(isUnsafeArgumentCharacter), {
5129
+ const ExternalCliArgument = z17.string().min(1).max(16384).refine((value) => ![...value].some(isUnsafeArgumentCharacter), {
5049
5130
  message: "an argument may hold tabs and line breaks, but no other control character, no invisible character and no bidirectional override"
5050
5131
  });
5051
- const ExternalCliCommand = z16.string().max(128).regex(/^[A-Za-z0-9][A-Za-z0-9._+-]*$/, {
5132
+ const ExternalCliCommand = z17.string().max(128).regex(/^[A-Za-z0-9][A-Za-z0-9._+-]*$/, {
5052
5133
  message: "a command is an executable's basename (letters, digits, '.', '_', '+', '-'), never a path"
5053
5134
  });
5054
5135
  const ExternalCliHint = NonEmptyString3.max(2048);
5055
- const ExternalCliArguments = z16.array(ExternalCliArgument).max(64);
5136
+ const ExternalCliArguments = z17.array(ExternalCliArgument).max(64);
5056
5137
  const SignedOutMarker = ExternalCliArgument.refine((value) => value.trim() !== "", { message: "a signed-out marker needs text beyond whitespace" });
5057
- const PluginExternalCliConnect2 = z16.strictObject({
5138
+ const PluginExternalCliConnect2 = z17.strictObject({
5058
5139
  /** A basename the host finds on `PATH` (`osascript`, `wrangler`), never a path. */
5059
5140
  binary: ExternalCliCommand,
5060
- probe: z16.strictObject({
5141
+ probe: z17.strictObject({
5061
5142
  args: ExternalCliArguments.min(1),
5062
- timeoutMs: z16.number().int().min(1).max(12e4).optional(),
5143
+ timeoutMs: z17.number().int().min(1).max(12e4).optional(),
5063
5144
  /**
5064
5145
  * The CLI's own signed-out marker: text a failed probe's output (stderr, else stdout) contains
5065
5146
  * when the CLI is signed out. A failure that carries it is a sign-in problem, and only such a
@@ -5067,13 +5148,13 @@ function createManifestSchemas(canonical) {
5067
5148
  * unavailable. Required when `login` is declared, so a timeout never starts a sign-in. A list
5068
5149
  * is for a CLI with several signed-out messages; any one of them counts.
5069
5150
  */
5070
- signedOutMarker: z16.union([SignedOutMarker, z16.array(SignedOutMarker).min(1)]).optional()
5151
+ signedOutMarker: z17.union([SignedOutMarker, z17.array(SignedOutMarker).min(1)]).optional()
5071
5152
  }),
5072
5153
  /** The CLI's interactive sign-in. Absent: connect only probes and reports. */
5073
- login: z16.strictObject({
5154
+ login: z17.strictObject({
5074
5155
  args: ExternalCliArguments.min(1),
5075
- timeoutMs: z16.number().int().min(1).max(6e5).optional(),
5076
- pasteCode: z16.strictObject({
5156
+ timeoutMs: z17.number().int().min(1).max(6e5).optional(),
5157
+ pasteCode: z17.strictObject({
5077
5158
  /** The redeeming argv; the host appends the code as its last argument. */
5078
5159
  args: ExternalCliArguments.min(1),
5079
5160
  /** What the prompt says, for a person. */
@@ -5085,12 +5166,12 @@ function createManifestSchemas(canonical) {
5085
5166
  * for display, or hands it to an agent session that runs it behind the ordinary bash approval.
5086
5167
  * Absent for a binary the OS ships (`osascript`).
5087
5168
  */
5088
- install: z16.strictObject({
5169
+ install: z17.strictObject({
5089
5170
  command: ExternalCliCommand,
5090
5171
  args: ExternalCliArguments
5091
5172
  }).optional(),
5092
5173
  /** Prose for a person: `install` when the binary is missing, `login` when the probe fails. */
5093
- hints: z16.strictObject({
5174
+ hints: z17.strictObject({
5094
5175
  install: ExternalCliHint,
5095
5176
  login: ExternalCliHint
5096
5177
  })
@@ -5103,50 +5184,50 @@ function createManifestSchemas(canonical) {
5103
5184
  });
5104
5185
  }
5105
5186
  });
5106
- const PluginAuthSchemeExternalCli = z16.strictObject({
5187
+ const PluginAuthSchemeExternalCli = z17.strictObject({
5107
5188
  ...PluginAuthSchemeDescriptionFields,
5108
5189
  localId: LocalContributionId2,
5109
- kind: z16.literal("external-cli"),
5110
- scopes: z16.array(NonEmptyString3).optional(),
5190
+ kind: z17.literal("external-cli"),
5191
+ scopes: z17.array(NonEmptyString3).optional(),
5111
5192
  cli: PluginExternalCliConnect2.optional()
5112
5193
  });
5113
- const PluginAuthScheme2 = z16.discriminatedUnion("kind", [
5194
+ const PluginAuthScheme2 = z17.discriminatedUnion("kind", [
5114
5195
  PluginAuthSchemeOAuth2,
5115
5196
  PluginAuthSchemeApiKey,
5116
5197
  PluginAuthSchemeDelegated,
5117
5198
  PluginAuthSchemeExternalCli
5118
5199
  ]);
5119
- const PluginWebSessionProbe2 = z16.strictObject({
5200
+ const PluginWebSessionProbe2 = z17.strictObject({
5120
5201
  url: HttpsUrl2,
5121
5202
  /** Absent => `GET`. `POST` sends an empty JSON object body. */
5122
- method: z16.enum(["GET", "POST"]).optional(),
5123
- signedInStatuses: z16.array(SignedInStatusCode2).min(1)
5203
+ method: z17.enum(["GET", "POST"]).optional(),
5204
+ signedInStatuses: z17.array(SignedInStatusCode2).min(1)
5124
5205
  });
5125
- const PluginWebSessionDeclaration2 = z16.strictObject({
5206
+ const PluginWebSessionDeclaration2 = z17.strictObject({
5126
5207
  /** `required`: capabilities degrade without the site login; `recommended`: it only smooths UX. */
5127
- importance: z16.enum(["required", "recommended"]),
5208
+ importance: z17.enum(["required", "recommended"]),
5128
5209
  loginUrl: HttpsUrl2,
5129
- cookieDomains: z16.array(RegistrableDomain2).min(1),
5210
+ cookieDomains: z17.array(RegistrableDomain2).min(1),
5130
5211
  probe: PluginWebSessionProbe2,
5131
- oauthVenue: z16.enum(["embedded", "external"]),
5212
+ oauthVenue: z17.enum(["embedded", "external"]),
5132
5213
  /**
5133
5214
  * Where a page goes first when it opens in one of Bonsai's browser panes and this site login
5134
5215
  * is missing: a sign-in page that continues to the page. A template with `:email` and `:url`
5135
5216
  * (see `UriClaimTemplate`), on a host within `cookieDomains`.
5136
5217
  */
5137
- signInFirst: z16.string().optional()
5218
+ signInFirst: z17.string().optional()
5138
5219
  }).superRefine(refineWebSessionScopeConfined);
5139
- const PluginAuthService2 = z16.strictObject({
5220
+ const PluginAuthService2 = z17.strictObject({
5140
5221
  localId: LocalContributionId2,
5141
5222
  displayName: NonEmptyString3,
5142
5223
  /** One plain sentence on what connecting this service gives Bonsai. */
5143
5224
  summary: NonEmptyString3.optional(),
5144
- schemes: z16.array(PluginAuthScheme2).min(1),
5145
- purposes: z16.array(NonEmptyString3).min(1),
5225
+ schemes: z17.array(PluginAuthScheme2).min(1),
5226
+ purposes: z17.array(NonEmptyString3).min(1),
5146
5227
  webSession: PluginWebSessionDeclaration2.optional()
5147
5228
  });
5148
- const PluginAuthManifest2 = z16.strictObject({
5149
- services: z16.array(PluginAuthService2).optional()
5229
+ const PluginAuthManifest2 = z17.strictObject({
5230
+ services: z17.array(PluginAuthService2).optional()
5150
5231
  });
5151
5232
  function stripRetiredCompatibilityKeys(value) {
5152
5233
  if (typeof value !== "object" || value === null || Array.isArray(value)) {
@@ -5157,17 +5238,17 @@ function createManifestSchemas(canonical) {
5157
5238
  delete remaining[key];
5158
5239
  return remaining;
5159
5240
  }
5160
- const PluginCompatibilityFields = z16.strictObject({
5161
- supportedProtocols: z16.array(KayPluginProtocolVersion).optional(),
5241
+ const PluginCompatibilityFields = z17.strictObject({
5242
+ supportedProtocols: z17.array(KayPluginProtocolVersion).optional(),
5162
5243
  minKayVersion: NonEmptyString3.optional(),
5163
5244
  sdk: NonEmptyString3.optional()
5164
5245
  });
5165
- const PluginCompatibilityManifest2 = canonical ? PluginCompatibilityFields : z16.preprocess(stripRetiredCompatibilityKeys, PluginCompatibilityFields);
5246
+ const PluginCompatibilityManifest2 = canonical ? PluginCompatibilityFields : z17.preprocess(stripRetiredCompatibilityKeys, PluginCompatibilityFields);
5166
5247
  const KayVersionString2 = NonEmptyString3.regex(SEMVER_PATTERN, {
5167
5248
  message: "version must be semver, for example 1.2.3"
5168
5249
  });
5169
- const KayPluginManifestV12 = z16.strictObject({
5170
- protocol: z16.literal(KAY_PLUGIN_PROTOCOL_VERSION),
5250
+ const KayPluginManifestV12 = z17.strictObject({
5251
+ protocol: z17.literal(KAY_PLUGIN_PROTOCOL_VERSION),
5171
5252
  id: PluginId2,
5172
5253
  displayName: NonEmptyString3,
5173
5254
  version: KayVersionString2,
@@ -5195,8 +5276,8 @@ function createManifestSchemas(canonical) {
5195
5276
  icon: PackageAssetPath2.optional(),
5196
5277
  iconDark: PackageAssetPath2.optional(),
5197
5278
  namespace: PluginNamespace2.optional(),
5198
- targets: z16.strictObject({
5199
- kay: z16.strictObject({
5279
+ targets: z17.strictObject({
5280
+ kay: z17.strictObject({
5200
5281
  agent: KayAgentTargetManifest2.optional(),
5201
5282
  app: KayAppTargetManifest2.optional(),
5202
5283
  ui: KayUiTargetManifest2.optional()
@@ -5204,8 +5285,8 @@ function createManifestSchemas(canonical) {
5204
5285
  }).optional(),
5205
5286
  config: PluginConfigManifest2.optional(),
5206
5287
  storage: PluginStorageManifest2.optional(),
5207
- workloadPurposes: z16.array(PluginWorkloadPurpose).optional(),
5208
- shellCommands: z16.array(PluginShellCommand).optional(),
5288
+ workloadPurposes: z17.array(PluginWorkloadPurpose).optional(),
5289
+ shellCommands: z17.array(PluginShellCommand).optional(),
5209
5290
  auth: PluginAuthManifest2.optional(),
5210
5291
  permissions: PluginPermissionManifest2.optional(),
5211
5292
  compatibility: PluginCompatibilityManifest2.optional(),
@@ -5215,15 +5296,15 @@ function createManifestSchemas(canonical) {
5215
5296
  * schemes then report `ownedByBonsai`. Honoured only for a plugin that ships with Bonsai: the
5216
5297
  * host reads any other plugin's flag as false. Absent => false.
5217
5298
  */
5218
- ownedByBonsai: z16.boolean().optional(),
5299
+ ownedByBonsai: z17.boolean().optional(),
5219
5300
  /**
5220
5301
  * Explicit plugin-level dependencies - other plugins this plugin requires to be present in the
5221
5302
  * composed roster. At composition time the runtime checks each id against the accepted
5222
5303
  * registration list and derives a provenance-complete dependency graph (together with implicit
5223
5304
  * auth-service edges from `consumesAuthServices`). Absent => no explicit dependencies.
5224
5305
  */
5225
- dependencies: z16.strictObject({
5226
- plugins: z16.array(PluginId2).optional()
5306
+ dependencies: z17.strictObject({
5307
+ plugins: z17.array(PluginId2).optional()
5227
5308
  }).optional()
5228
5309
  }).superRefine((manifest, ctx) => {
5229
5310
  const sharedWith = manifest.storage?.dataDir?.sharedWith;
@@ -5484,6 +5565,89 @@ function createManifestSchemas(canonical) {
5484
5565
  ...(manifest.targets?.kay?.ui?.contributes?.pages ?? []).map((page) => page.id),
5485
5566
  ...(manifest.targets?.kay?.ui?.contributes?.railEntries ?? []).map((entry) => entry.page)
5486
5567
  ]);
5568
+ const pageAliases = /* @__PURE__ */ new Set();
5569
+ for (const [index, page] of (manifest.targets?.kay?.ui?.contributes?.pages ?? []).entries()) {
5570
+ for (const alias of page.aliases ?? []) {
5571
+ if (declaredPageIds.has(alias) || pageAliases.has(alias)) {
5572
+ ctx.addIssue({
5573
+ code: "custom",
5574
+ path: [
5575
+ "targets",
5576
+ "kay",
5577
+ "ui",
5578
+ "contributes",
5579
+ "pages",
5580
+ index,
5581
+ "aliases"
5582
+ ],
5583
+ message: `Page alias ${alias} conflicts with a declared page or alias.`
5584
+ });
5585
+ }
5586
+ pageAliases.add(alias);
5587
+ }
5588
+ }
5589
+ const types = manifest.targets?.kay?.app?.contributes?.whiteboardTypes ?? [];
5590
+ if (types.filter((type) => type.handover === true).length > 1) {
5591
+ ctx.addIssue({
5592
+ code: "custom",
5593
+ path: ["targets", "kay", "app", "contributes", "whiteboardTypes"],
5594
+ message: "A plugin may declare only one handover type."
5595
+ });
5596
+ }
5597
+ const servedSchemes = new Set([
5598
+ ...manifest.targets?.kay?.agent?.contributes?.uriModules ?? [],
5599
+ ...manifest.targets?.kay?.app?.contributes?.uriModules ?? []
5600
+ ].flatMap((module) => module.schemes));
5601
+ for (const [index, type] of types.entries()) {
5602
+ if ((type.directory !== void 0 || type.handover === true) && manifest.targets?.kay?.agent?.familyFolder?.scope !== "root") {
5603
+ ctx.addIssue({
5604
+ code: "custom",
5605
+ path: [
5606
+ "targets",
5607
+ "kay",
5608
+ "app",
5609
+ "contributes",
5610
+ "whiteboardTypes",
5611
+ index,
5612
+ "directory"
5613
+ ],
5614
+ message: "A root content directory requires a declared family-folder root role."
5615
+ });
5616
+ }
5617
+ const scheme = type.reference?.uriTemplate.split(":", 1)[0];
5618
+ if (scheme !== void 0 && !servedSchemes.has(scheme)) {
5619
+ ctx.addIssue({
5620
+ code: "custom",
5621
+ path: [
5622
+ "targets",
5623
+ "kay",
5624
+ "app",
5625
+ "contributes",
5626
+ "whiteboardTypes",
5627
+ index,
5628
+ "reference"
5629
+ ],
5630
+ message: "A content reference must use a scheme this plugin serves."
5631
+ });
5632
+ }
5633
+ }
5634
+ for (const [index, source] of (manifest.targets?.kay?.app?.contributes?.dataSources ?? []).entries()) {
5635
+ if (source.messageDraft?.schemes.some((scheme) => !servedSchemes.has(scheme))) {
5636
+ ctx.addIssue({
5637
+ code: "custom",
5638
+ path: [
5639
+ "targets",
5640
+ "kay",
5641
+ "app",
5642
+ "contributes",
5643
+ "dataSources",
5644
+ index,
5645
+ "messageDraft"
5646
+ ],
5647
+ message: "A message draft projection must use schemes this plugin serves."
5648
+ });
5649
+ }
5650
+ }
5487
5651
  for (const [index, presentation] of (manifest.targets?.kay?.ui?.contributes?.referencePresentations ?? []).entries()) {
5488
5652
  const path = [
5489
5653
  "targets",
@@ -6333,7 +6497,7 @@ function pushContributionIds(output, path, items) {
6333
6497
  }
6334
6498
 
6335
6499
  // packages/plugin-protocol/dist/plugin-directory-verdict.js
6336
- import { z as z18 } from "zod";
6500
+ import { z as z19 } from "zod";
6337
6501
 
6338
6502
  // packages/plugin-protocol/dist/plugin-load-diagnostic.js
6339
6503
  var PLUGIN_DIAGNOSTIC_MESSAGE_CAP = 300;
@@ -6342,14 +6506,14 @@ function boundPluginDiagnosticMessage(message) {
6342
6506
  }
6343
6507
 
6344
6508
  // packages/plugin-protocol/dist/resolved-contract.js
6345
- import { z as z17 } from "zod";
6509
+ import { z as z18 } from "zod";
6346
6510
  function createResolvedContractSchemas(canonical) {
6347
6511
  const { PluginEventLocalId: PluginEventLocalId2 } = canonical ? canonicalPluginEventSchemas : plugin_events_exports;
6348
- const { ApprovalTypeContribution: ApprovalTypeContribution2, KayUiAppHostCapability: KayUiAppHostCapability2, McpServerAuthMode: McpServerAuthMode2, McpServerUrl: McpServerUrl2, PluginContributionKind: PluginContributionKindSchema, ReferenceOpenBehavior: ReferenceOpenBehavior2, ReferencePresentationUriPattern: ReferencePresentationUriPattern2, ReferencePresentationAccountLinks: ReferencePresentationAccountLinks2, ReferencePresentationAddress: ReferencePresentationAddress2, ReferencePresentationUrlClaim: ReferencePresentationUrlClaim2, ReferencePresentationVariants: ReferencePresentationVariants2, ReferencePresentationWords: ReferencePresentationWords2, UriModuleFacts: UriModuleFacts2, WhiteboardTypeStorage: WhiteboardTypeStorage2 } = canonical ? canonicalContributionSchemas : contributions_exports;
6512
+ const { ApprovalTypeContribution: ApprovalTypeContribution2, KayUiAppHostCapability: KayUiAppHostCapability2, McpServerAuthMode: McpServerAuthMode2, McpServerUrl: McpServerUrl2, PluginContributionKind: PluginContributionKindSchema, ReferenceOpenBehavior: ReferenceOpenBehavior2, ReferencePresentationUriPattern: ReferencePresentationUriPattern2, ReferencePresentationAccountLinks: ReferencePresentationAccountLinks2, ReferencePresentationAddress: ReferencePresentationAddress2, ReferencePresentationUrlClaim: ReferencePresentationUrlClaim2, ReferencePresentationVariants: ReferencePresentationVariants2, ReferencePresentationWords: ReferencePresentationWords2, UriModuleFacts: UriModuleFacts2, WhiteboardTypeContribution: WhiteboardTypeContribution2 } = canonical ? canonicalContributionSchemas : contributions_exports;
6349
6513
  const { FileExtensionToken: FileExtensionToken2, GitBasicAuthUser: GitBasicAuthUser2, GitHostName: GitHostName2, GlobalContributionId: GlobalContributionId2, HttpsUrl: HttpsUrl2, LocalContributionId: LocalContributionId2, MimeTypeString: MimeTypeString2, NonEmptyString: NonEmptyString3, PackageAssetPath: PackageAssetPath2, PluginId: PluginId2, PluginNamespace: PluginNamespace2, PluginToolName: PluginToolName2, RegistrableDomain: RegistrableDomain2, SignedInStatusCode: SignedInStatusCode2, TargetEntrypoint: TargetEntrypoint2, UriScheme: UriScheme2 } = canonical ? canonicalCommonSchemas : common_exports;
6350
6514
  const { PluginExternalCliConnect: PluginExternalCliConnect2, PluginOAuthClientSupplier: PluginOAuthClientSupplier2 } = canonical ? canonicalManifestSchemas : manifest_exports;
6351
6515
  const { ResolvedPluginGrants: ResolvedPluginGrants2 } = canonical ? canonicalPermissionSchemas : permissions_exports;
6352
- const ResolvedPluginContributionId2 = z17.strictObject({
6516
+ const ResolvedPluginContributionId2 = z18.strictObject({
6353
6517
  target: PluginTargetName,
6354
6518
  kind: PluginContributionKindSchema,
6355
6519
  localId: PluginEventLocalId2,
@@ -6363,54 +6527,55 @@ function createResolvedContractSchemas(canonical) {
6363
6527
  });
6364
6528
  }
6365
6529
  });
6366
- const ResolvedKayToolId = z17.strictObject({
6530
+ const ResolvedKayToolId = z18.strictObject({
6367
6531
  localId: LocalContributionId2,
6368
6532
  globalId: GlobalContributionId2,
6369
6533
  toolName: PluginToolName2
6370
6534
  });
6371
- const ResolvedKayAgentTool2 = z17.strictObject({
6535
+ const ResolvedKayAgentTool2 = z18.strictObject({
6372
6536
  ...ResolvedKayToolId.shape,
6373
6537
  displayName: NonEmptyString3.optional(),
6374
6538
  description: NonEmptyString3.optional(),
6375
6539
  parameters: JsonSchema.optional(),
6376
- executionMode: z17.enum(["sequential", "parallel"]).optional(),
6540
+ executionMode: z18.enum(["sequential", "parallel"]).optional(),
6377
6541
  promptSnippet: NonEmptyString3.optional(),
6378
- promptGuidelines: z17.array(NonEmptyString3).optional(),
6379
- requiresAuth: z17.strictObject({
6542
+ promptGuidelines: z18.array(NonEmptyString3).optional(),
6543
+ requiresAuth: z18.strictObject({
6380
6544
  serviceId: GlobalContributionId2,
6381
6545
  schemeId: GlobalContributionId2.optional()
6382
6546
  }).optional(),
6383
6547
  permission: canonical ? canonicalContributionSchemas.ToolPermission.optional() : ToolPermission.optional()
6384
6548
  });
6385
6549
  const ResolvedKayAppTool2 = ResolvedKayAgentTool2.omit({ requiresAuth: true });
6386
- const ResolvedKayAppDataSource2 = z17.strictObject({
6550
+ const ResolvedKayAppDataSource2 = z18.strictObject({
6387
6551
  localId: LocalContributionId2,
6388
6552
  globalId: GlobalContributionId2,
6389
- scope: z17.enum(["runtime", "account", "session"]),
6390
- snapshot: z17.strictObject({
6391
- version: z17.number().int().positive(),
6392
- schema: z17.record(z17.string(), z17.unknown())
6553
+ scope: z18.enum(["runtime", "account", "session"]),
6554
+ snapshot: z18.strictObject({
6555
+ version: z18.number().int().positive(),
6556
+ schema: z18.record(z18.string(), z18.unknown())
6393
6557
  }),
6394
- change: z17.strictObject({
6395
- version: z17.number().int().positive(),
6396
- schema: z17.record(z17.string(), z17.unknown()),
6397
- semantics: z17.discriminatedUnion("kind", [
6398
- z17.strictObject({ kind: z17.literal("incremental") }),
6399
- z17.strictObject({
6400
- kind: z17.literal("snapshot-replacement"),
6401
- maxEncodedBytes: z17.number().int().positive(),
6558
+ change: z18.strictObject({
6559
+ version: z18.number().int().positive(),
6560
+ schema: z18.record(z18.string(), z18.unknown()),
6561
+ semantics: z18.discriminatedUnion("kind", [
6562
+ z18.strictObject({ kind: z18.literal("incremental") }),
6563
+ z18.strictObject({
6564
+ kind: z18.literal("snapshot-replacement"),
6565
+ maxEncodedBytes: z18.number().int().positive(),
6402
6566
  rationale: pluginString(canonical).min(1).max(1024)
6403
6567
  })
6404
6568
  ]).optional()
6405
6569
  }),
6406
6570
  read: AppDataSourceRead.optional(),
6407
- store: z17.discriminatedUnion("shape", [
6408
- z17.strictObject({
6409
- shape: z17.literal("rows"),
6410
- rowsField: z17.string().min(1),
6411
- key: z17.array(z17.string().min(1)).min(1)
6571
+ messageDraft: z18.strictObject({ schemes: z18.array(UriScheme2).min(1) }).optional(),
6572
+ store: z18.discriminatedUnion("shape", [
6573
+ z18.strictObject({
6574
+ shape: z18.literal("rows"),
6575
+ rowsField: z18.string().min(1),
6576
+ key: z18.array(z18.string().min(1)).min(1)
6412
6577
  }),
6413
- z17.strictObject({ shape: z17.literal("value") })
6578
+ z18.strictObject({ shape: z18.literal("value") })
6414
6579
  ]).optional()
6415
6580
  }).superRefine((source, ctx) => {
6416
6581
  if (source.read !== void 0 && source.scope !== "session") {
@@ -6430,127 +6595,122 @@ function createResolvedContractSchemas(canonical) {
6430
6595
  /** The auth service that module signs in through, whose accounts a card may send from. */
6431
6596
  authService: GlobalContributionId2.optional()
6432
6597
  });
6433
- const ResolvedPluginCard2 = z17.strictObject({
6598
+ const ResolvedPluginCard2 = z18.strictObject({
6434
6599
  localId: LocalContributionId2,
6435
6600
  globalId: GlobalContributionId2,
6436
6601
  pluginId: PluginId2,
6437
6602
  description: NonEmptyString3,
6438
6603
  inputs: JsonSchema,
6439
- readEndpoint: z17.strictObject({
6604
+ readEndpoint: z18.strictObject({
6440
6605
  localId: LocalContributionId2,
6441
6606
  globalId: GlobalContributionId2
6442
6607
  }),
6443
- submitEndpoint: z17.strictObject({
6608
+ submitEndpoint: z18.strictObject({
6444
6609
  localId: LocalContributionId2,
6445
6610
  globalId: GlobalContributionId2
6446
6611
  }),
6447
6612
  authService: GlobalContributionId2.optional()
6448
6613
  });
6449
- const ResolvedKayAppWorkflow2 = z17.strictObject({
6614
+ const ResolvedKayAppWorkflow2 = z18.strictObject({
6450
6615
  localId: LocalContributionId2,
6451
6616
  globalId: GlobalContributionId2,
6452
6617
  name: NonEmptyString3,
6453
6618
  description: NonEmptyString3,
6454
- everyMs: z17.number().int().positive(),
6455
- auth: z17.strictObject({
6619
+ everyMs: z18.number().int().positive(),
6620
+ auth: z18.strictObject({
6456
6621
  serviceId: GlobalContributionId2,
6457
6622
  schemeId: GlobalContributionId2,
6458
- scopes: z17.array(NonEmptyString3).min(1).optional()
6623
+ scopes: z18.array(NonEmptyString3).min(1).optional()
6459
6624
  }).optional()
6460
6625
  });
6461
- const ResolvedKayAppWhiteboardType2 = z17.strictObject({
6462
- localId: LocalContributionId2,
6463
- globalId: GlobalContributionId2,
6464
- displayName: NonEmptyString3,
6465
- schemaVersion: z17.number().int().positive(),
6466
- storage: WhiteboardTypeStorage2,
6467
- valueSchema: JsonSchema
6626
+ const ResolvedKayAppWhiteboardType2 = WhiteboardTypeContribution2.safeExtend({
6627
+ globalId: GlobalContributionId2
6468
6628
  });
6469
- const ResolvedKayAppMcpServer2 = z17.strictObject({
6629
+ const ResolvedKayAppMcpServer2 = z18.strictObject({
6470
6630
  name: LocalContributionId2,
6471
6631
  pluginId: PluginId2,
6472
6632
  url: McpServerUrl2,
6473
6633
  auth: McpServerAuthMode2,
6474
6634
  authServiceId: GlobalContributionId2.optional()
6475
6635
  });
6476
- const ResolvedKayAgentUriModule2 = z17.strictObject({
6636
+ const ResolvedKayAgentUriModule2 = z18.strictObject({
6477
6637
  localId: LocalContributionId2,
6478
6638
  globalId: GlobalContributionId2,
6479
- schemes: z17.array(UriScheme2).min(1),
6639
+ schemes: z18.array(UriScheme2).min(1),
6480
6640
  displayName: NonEmptyString3.optional(),
6481
6641
  authServiceId: GlobalContributionId2.optional(),
6482
6642
  /** Mirrors `UriModuleContribution.authScheme`; a local ref takes the plugin's namespace. */
6483
6643
  authSchemeId: GlobalContributionId2.optional(),
6484
6644
  /** Mirrors `UriModuleContribution.knownResources` (host-side recording opt-in). */
6485
- knownResources: z17.literal(true).optional(),
6645
+ knownResources: z18.literal(true).optional(),
6486
6646
  /** Mirrors `UriModuleContribution.describesOperations`. */
6487
- describesOperations: z17.literal(true).optional(),
6647
+ describesOperations: z18.literal(true).optional(),
6488
6648
  /** Mirrors `UriModuleContribution.looksUpWebLinks`. */
6489
- looksUpWebLinks: z17.literal(true).optional(),
6649
+ looksUpWebLinks: z18.literal(true).optional(),
6490
6650
  ...UriModuleFacts2.shape
6491
6651
  });
6492
- const ResolvedKayAgentArtifactUriModule2 = z17.strictObject({
6652
+ const ResolvedKayAgentArtifactUriModule2 = z18.strictObject({
6493
6653
  localId: LocalContributionId2,
6494
6654
  globalId: GlobalContributionId2,
6495
6655
  scheme: UriScheme2,
6496
- editable: z17.boolean(),
6497
- listable: z17.boolean(),
6498
- deletable: z17.boolean(),
6499
- appendable: z17.boolean(),
6500
- storageScope: z17.enum(["session", "family"])
6656
+ editable: z18.boolean(),
6657
+ listable: z18.boolean(),
6658
+ deletable: z18.boolean(),
6659
+ appendable: z18.boolean(),
6660
+ storageScope: z18.enum(["session", "family"])
6501
6661
  });
6502
- const ResolvedKayAgentEntityResolver2 = z17.strictObject({
6662
+ const ResolvedKayAgentEntityResolver2 = z18.strictObject({
6503
6663
  localId: LocalContributionId2,
6504
6664
  globalId: GlobalContributionId2,
6505
6665
  displayName: NonEmptyString3.optional(),
6506
6666
  uriModule: GlobalContributionId2,
6507
- entityTypes: z17.array(NonEmptyString3).min(1),
6667
+ entityTypes: z18.array(NonEmptyString3).min(1),
6508
6668
  uriHint: NonEmptyString3
6509
6669
  });
6510
- const ResolvedKayAgentGitHostClaim2 = z17.strictObject({
6670
+ const ResolvedKayAgentGitHostClaim2 = z18.strictObject({
6511
6671
  host: GitHostName2,
6512
6672
  authServiceId: GlobalContributionId2,
6513
6673
  /** Manifest-declared order; the clone ladder tries them in sequence. */
6514
- authSchemeIds: z17.array(GlobalContributionId2).min(1),
6674
+ authSchemeIds: z18.array(GlobalContributionId2).min(1),
6515
6675
  /** Non-secret display copy for the claiming service, for clone failure text. */
6516
- authServiceDisplayName: z17.string(),
6676
+ authServiceDisplayName: z18.string(),
6517
6677
  basicAuthUser: GitBasicAuthUser2
6518
6678
  });
6519
- const ResolvedKayAgentConverter2 = z17.strictObject({
6679
+ const ResolvedKayAgentConverter2 = z18.strictObject({
6520
6680
  localId: LocalContributionId2,
6521
6681
  globalId: GlobalContributionId2,
6522
6682
  description: NonEmptyString3.optional(),
6523
- mimeTypes: z17.array(MimeTypeString2).min(1),
6524
- extensions: z17.array(FileExtensionToken2).min(1).optional()
6683
+ mimeTypes: z18.array(MimeTypeString2).min(1),
6684
+ extensions: z18.array(FileExtensionToken2).min(1).optional()
6525
6685
  });
6526
6686
  const ResolvedReferencePresentationUrlClaim = ReferencePresentationUrlClaim2.extend({
6527
- brandIcon: z17.string().max(64 * 1024).optional()
6687
+ brandIcon: z18.string().max(64 * 1024).optional()
6528
6688
  });
6529
- const ResolvedReferencePresentation2 = z17.strictObject({
6689
+ const ResolvedReferencePresentation2 = z18.strictObject({
6530
6690
  localId: LocalContributionId2,
6531
6691
  globalId: GlobalContributionId2,
6532
6692
  uriModule: GlobalContributionId2.optional(),
6533
6693
  /** The schemes this presentation is about: its `scheme`, or its module's. */
6534
- schemes: z17.array(UriScheme2).min(1).optional(),
6694
+ schemes: z18.array(UriScheme2).min(1).optional(),
6535
6695
  /** The module's `displayName`: the source's name in a row. */
6536
6696
  displayName: NonEmptyString3.optional(),
6537
6697
  /** The module's auth service, qualified: whose accounts `accountLinks` reads. */
6538
6698
  authService: GlobalContributionId2.optional(),
6539
6699
  accountLinks: ReferencePresentationAccountLinks2.optional(),
6540
- addresses: z17.array(ReferencePresentationAddress2).min(1).optional(),
6700
+ addresses: z18.array(ReferencePresentationAddress2).min(1).optional(),
6541
6701
  /** Comes with `open`. A presentation with neither only words its module's addresses. */
6542
6702
  resourceKind: NonEmptyString3.optional(),
6543
6703
  open: ReferenceOpenBehavior2.optional(),
6544
6704
  /** MIME-specific resource kinds; absent keys use the base presentation. */
6545
6705
  variants: ReferencePresentationVariants2.optional(),
6546
- claims: z17.array(ResolvedReferencePresentationUrlClaim).optional(),
6547
- tooltip: z17.strictObject({
6706
+ claims: z18.array(ResolvedReferencePresentationUrlClaim).optional(),
6707
+ tooltip: z18.strictObject({
6548
6708
  app: GlobalContributionId2,
6549
6709
  pattern: ReferencePresentationUriPattern2
6550
6710
  }).optional(),
6551
6711
  words: ReferencePresentationWords2.optional()
6552
6712
  });
6553
- const ResolvedPluginProvisioningRequirement2 = z17.strictObject({
6713
+ const ResolvedPluginProvisioningRequirement2 = z18.strictObject({
6554
6714
  id: LocalContributionId2,
6555
6715
  displayName: NonEmptyString3,
6556
6716
  description: NonEmptyString3,
@@ -6560,15 +6720,15 @@ function createResolvedContractSchemas(canonical) {
6560
6720
  * URL degrades to "Reconnect" in the UI instead of a broken link.
6561
6721
  */
6562
6722
  remediationUrl: HttpsUrl2.optional(),
6563
- probe: z17.strictObject({
6723
+ probe: z18.strictObject({
6564
6724
  url: HttpsUrl2,
6565
- method: z17.enum(["GET"]),
6566
- verdictStatuses: z17.array(SignedInStatusCode2).min(1),
6725
+ method: z18.enum(["GET"]),
6726
+ verdictStatuses: z18.array(SignedInStatusCode2).min(1),
6567
6727
  nonEmptyArrayAt: NonEmptyString3.optional()
6568
6728
  })
6569
6729
  });
6570
6730
  const ResolvedProvisioningField = {
6571
- provisioning: z17.array(ResolvedPluginProvisioningRequirement2).optional()
6731
+ provisioning: z18.array(ResolvedPluginProvisioningRequirement2).optional()
6572
6732
  };
6573
6733
  const ResolvedPluginAuthSchemeDescriptionFields = {
6574
6734
  displayName: NonEmptyString3.optional(),
@@ -6580,118 +6740,118 @@ function createResolvedContractSchemas(canonical) {
6580
6740
  ...ResolvedPluginAuthSchemeDescriptionFields,
6581
6741
  localId: LocalContributionId2,
6582
6742
  globalId: GlobalContributionId2,
6583
- kind: z17.literal("oauth2"),
6584
- scopes: z17.array(z17.string()).optional(),
6743
+ kind: z18.literal("oauth2"),
6744
+ scopes: z18.array(z18.string()).optional(),
6585
6745
  authorizationUrl: HttpsUrl2,
6586
6746
  tokenUrl: HttpsUrl2,
6587
- extraAuthorizeParams: z17.record(z17.string(), z17.string()).optional()
6747
+ extraAuthorizeParams: z18.record(z18.string(), z18.string()).optional()
6588
6748
  };
6589
- const ResolvedPluginAuthSchemeOAuthPkce = z17.strictObject({
6749
+ const ResolvedPluginAuthSchemeOAuthPkce = z18.strictObject({
6590
6750
  ...ResolvedPluginAuthSchemeOAuthBase,
6591
- exchange: z17.literal("pkce"),
6751
+ exchange: z18.literal("pkce"),
6592
6752
  byoocProfile: PluginByoocProfile.optional(),
6593
- clientSuppliers: z17.array(PluginOAuthClientSupplier2).nonempty(),
6753
+ clientSuppliers: z18.array(PluginOAuthClientSupplier2).nonempty(),
6594
6754
  clientId: NonEmptyString3.optional(),
6595
6755
  clientSecret: NonEmptyString3.optional(),
6596
- account: z17.literal("lookup").optional()
6756
+ account: z18.literal("lookup").optional()
6597
6757
  });
6598
- const ResolvedPluginAuthSchemeOAuthConfidential = z17.strictObject({
6758
+ const ResolvedPluginAuthSchemeOAuthConfidential = z18.strictObject({
6599
6759
  ...ResolvedPluginAuthSchemeOAuthBase,
6600
- exchange: z17.literal("confidential"),
6601
- clientSuppliers: z17.tuple([z17.literal("kay")]),
6602
- account: z17.enum(["lookup", "sign-in"])
6760
+ exchange: z18.literal("confidential"),
6761
+ clientSuppliers: z18.tuple([z18.literal("kay")]),
6762
+ account: z18.enum(["lookup", "sign-in"])
6603
6763
  });
6604
- const ResolvedPluginAuthSchemeOAuth2 = z17.discriminatedUnion("exchange", [
6764
+ const ResolvedPluginAuthSchemeOAuth2 = z18.discriminatedUnion("exchange", [
6605
6765
  ResolvedPluginAuthSchemeOAuthPkce,
6606
6766
  ResolvedPluginAuthSchemeOAuthConfidential
6607
6767
  ]);
6608
- const ResolvedPluginAuthSchemeApiKey = z17.strictObject({
6768
+ const ResolvedPluginAuthSchemeApiKey = z18.strictObject({
6609
6769
  ...ResolvedProvisioningField,
6610
6770
  ...ResolvedPluginAuthSchemeDescriptionFields,
6611
6771
  localId: LocalContributionId2,
6612
6772
  globalId: GlobalContributionId2,
6613
- kind: z17.literal("api-key"),
6614
- scopes: z17.array(z17.string()).optional(),
6773
+ kind: z18.literal("api-key"),
6774
+ scopes: z18.array(z18.string()).optional(),
6615
6775
  /** Resolution applies the manifest's default, "<service name> API key". */
6616
6776
  inputLabel: NonEmptyString3,
6617
- fields: z17.array(z17.strictObject({ id: z17.string(), label: z17.string() })).optional(),
6618
- setup: z17.strictObject({ instructions: z17.string(), url: HttpsUrl2 }).optional(),
6619
- account: z17.literal("lookup").optional()
6777
+ fields: z18.array(z18.strictObject({ id: z18.string(), label: z18.string() })).optional(),
6778
+ setup: z18.strictObject({ instructions: z18.string(), url: HttpsUrl2 }).optional(),
6779
+ account: z18.literal("lookup").optional()
6620
6780
  });
6621
- const ResolvedPluginAuthSchemeDelegated = z17.strictObject({
6781
+ const ResolvedPluginAuthSchemeDelegated = z18.strictObject({
6622
6782
  ...ResolvedPluginAuthSchemeDescriptionFields,
6623
6783
  localId: LocalContributionId2,
6624
6784
  globalId: GlobalContributionId2,
6625
- kind: z17.literal("delegated"),
6626
- scopes: z17.array(z17.string()).optional()
6785
+ kind: z18.literal("delegated"),
6786
+ scopes: z18.array(z18.string()).optional()
6627
6787
  });
6628
- const ResolvedPluginAuthSchemeExternalCli = z17.strictObject({
6788
+ const ResolvedPluginAuthSchemeExternalCli = z18.strictObject({
6629
6789
  ...ResolvedPluginAuthSchemeDescriptionFields,
6630
6790
  localId: LocalContributionId2,
6631
6791
  globalId: GlobalContributionId2,
6632
- kind: z17.literal("external-cli"),
6633
- scopes: z17.array(z17.string()).optional(),
6792
+ kind: z18.literal("external-cli"),
6793
+ scopes: z18.array(z18.string()).optional(),
6634
6794
  /** The manifest's connect facts, verbatim. */
6635
6795
  cli: PluginExternalCliConnect2.optional()
6636
6796
  });
6637
- const ResolvedPluginAuthScheme2 = z17.discriminatedUnion("kind", [
6797
+ const ResolvedPluginAuthScheme2 = z18.discriminatedUnion("kind", [
6638
6798
  ResolvedPluginAuthSchemeOAuth2,
6639
6799
  ResolvedPluginAuthSchemeApiKey,
6640
6800
  ResolvedPluginAuthSchemeDelegated,
6641
6801
  ResolvedPluginAuthSchemeExternalCli
6642
6802
  ]);
6643
- const ResolvedPluginWebSession2 = z17.strictObject({
6644
- importance: z17.enum(["required", "recommended"]),
6803
+ const ResolvedPluginWebSession2 = z18.strictObject({
6804
+ importance: z18.enum(["required", "recommended"]),
6645
6805
  loginUrl: HttpsUrl2,
6646
- cookieDomains: z17.array(RegistrableDomain2).min(1),
6647
- probe: z17.strictObject({
6806
+ cookieDomains: z18.array(RegistrableDomain2).min(1),
6807
+ probe: z18.strictObject({
6648
6808
  url: HttpsUrl2,
6649
- method: z17.enum(["GET", "POST"]),
6650
- signedInStatuses: z17.array(SignedInStatusCode2).min(1)
6809
+ method: z18.enum(["GET", "POST"]),
6810
+ signedInStatuses: z18.array(SignedInStatusCode2).min(1)
6651
6811
  }),
6652
- oauthVenue: z17.enum(["embedded", "external"]),
6653
- signInFirst: z17.string().optional()
6812
+ oauthVenue: z18.enum(["embedded", "external"]),
6813
+ signInFirst: z18.string().optional()
6654
6814
  }).superRefine(refineWebSessionScopeConfined);
6655
- const ResolvedPluginAuthService2 = z17.strictObject({
6815
+ const ResolvedPluginAuthService2 = z18.strictObject({
6656
6816
  localId: LocalContributionId2,
6657
6817
  globalId: GlobalContributionId2,
6658
- displayName: z17.string(),
6659
- summary: z17.string().optional(),
6660
- schemes: z17.array(ResolvedPluginAuthScheme2).min(1),
6661
- purposes: z17.array(z17.string()).min(1),
6818
+ displayName: z18.string(),
6819
+ summary: z18.string().optional(),
6820
+ schemes: z18.array(ResolvedPluginAuthScheme2).min(1),
6821
+ purposes: z18.array(z18.string()).min(1),
6662
6822
  /** The service's browser half, when the manifest declares one. */
6663
6823
  webSession: ResolvedPluginWebSession2.optional()
6664
6824
  });
6665
- const ResolvedKayUiAppEndpointCapability2 = z17.union([
6666
- z17.strictObject({
6825
+ const ResolvedKayUiAppEndpointCapability2 = z18.union([
6826
+ z18.strictObject({
6667
6827
  localId: LocalContributionId2,
6668
6828
  globalId: GlobalContributionId2
6669
6829
  }),
6670
- z17.strictObject({ pluginId: PluginId2, localId: LocalContributionId2 })
6830
+ z18.strictObject({ pluginId: PluginId2, localId: LocalContributionId2 })
6671
6831
  ]);
6672
- const ResolvedKayUiApp2 = z17.strictObject({
6832
+ const ResolvedKayUiApp2 = z18.strictObject({
6673
6833
  localId: LocalContributionId2,
6674
6834
  globalId: GlobalContributionId2,
6675
6835
  displayName: NonEmptyString3,
6676
- contextOnly: z17.literal(true).optional(),
6836
+ contextOnly: z18.literal(true).optional(),
6677
6837
  description: NonEmptyString3.optional(),
6678
6838
  icon: PackageAssetPath2.optional(),
6679
- runtime: z17.literal("kay.react-app.v1"),
6680
- sdk: z17.strictObject({ range: NonEmptyString3 }),
6839
+ runtime: z18.literal("kay.react-app.v1"),
6840
+ sdk: z18.strictObject({ range: NonEmptyString3 }),
6681
6841
  entrypoint: TargetEntrypoint2,
6682
- styles: z17.array(PackageAssetPath2).optional(),
6683
- assets: z17.array(PackageAssetPath2).optional(),
6684
- capabilities: z17.strictObject({
6685
- endpoints: z17.array(ResolvedKayUiAppEndpointCapability2).optional(),
6686
- host: z17.array(KayUiAppHostCapability2).optional(),
6687
- feeds: z17.array((canonical ? canonicalContributionSchemas : contributions_exports).UiAppCapabilityReference).optional()
6842
+ styles: z18.array(PackageAssetPath2).optional(),
6843
+ assets: z18.array(PackageAssetPath2).optional(),
6844
+ capabilities: z18.strictObject({
6845
+ endpoints: z18.array(ResolvedKayUiAppEndpointCapability2).optional(),
6846
+ host: z18.array(KayUiAppHostCapability2).optional(),
6847
+ feeds: z18.array((canonical ? canonicalContributionSchemas : contributions_exports).UiAppCapabilityReference).optional()
6688
6848
  }).optional()
6689
6849
  });
6690
- const ResolvedPluginContractV12 = z17.strictObject({
6691
- protocol: z17.literal("kay.plugin.v1"),
6850
+ const ResolvedPluginContractV12 = z18.strictObject({
6851
+ protocol: z18.literal("kay.plugin.v1"),
6692
6852
  pluginId: PluginId2,
6693
6853
  namespace: PluginNamespace2,
6694
- contributions: z17.array(ResolvedPluginContributionId2),
6854
+ contributions: z18.array(ResolvedPluginContributionId2),
6695
6855
  // The deduplicated set of qualified (dotted) external auth-service ids this
6696
6856
  // plugin references, from agent uriModule, tool and cliBinding
6697
6857
  // `authService` refs, card sign-in refs, and auth-grant `service` refs. Always present - a plugin
@@ -6699,38 +6859,39 @@ function createResolvedContractSchemas(canonical) {
6699
6859
  // is a recorded dependency, not a resolution: there is no runtime plugin
6700
6860
  // loader in v1, so nothing here verifies the reference resolves within a
6701
6861
  // composed roster (a composition-time concern owned elsewhere).
6702
- consumesAuthServices: z17.array(GlobalContributionId2),
6862
+ consumesAuthServices: z18.array(GlobalContributionId2),
6703
6863
  // The explicit plugin-level dependency ids declared in `dependencies.plugins` on the manifest,
6704
6864
  // deduped and validated at parse time. Always present; a plugin with no explicit dependencies
6705
6865
  // carries an empty array. Composition checks each id against the accepted roster and derives the
6706
6866
  // full dependency graph together with auth-inferred edges from `consumesAuthServices`.
6707
- explicitDependencies: z17.array(PluginId2),
6867
+ explicitDependencies: z18.array(PluginId2),
6708
6868
  dataDirSharedWith: PluginId2.optional(),
6709
- workloadPurposes: z17.array(PluginWorkloadPurpose).optional(),
6710
- shellCommands: z17.array(PluginShellCommand.omit({ endpoint: true }).extend({
6869
+ workloadPurposes: z18.array(PluginWorkloadPurpose).optional(),
6870
+ shellCommands: z18.array(PluginShellCommand.omit({ endpoint: true }).extend({
6711
6871
  endpointId: GlobalContributionId2
6712
6872
  })).optional(),
6713
6873
  // The auth services this plugin OWNS, carrying the global ids its harness
6714
6874
  // target must register and the credential authority keys on. Always present;
6715
6875
  // a plugin that declares no `auth.services` carries an empty array. The dual
6716
6876
  // of `consumesAuthServices` (services it merely references).
6717
- authServices: z17.array(ResolvedPluginAuthService2),
6877
+ authServices: z18.array(ResolvedPluginAuthService2),
6718
6878
  grants: ResolvedPluginGrants2.optional(),
6719
- kayAgentUriModules: z17.array(ResolvedKayAgentUriModule2).optional(),
6720
- kayAgentArtifactUriModules: z17.array(ResolvedKayAgentArtifactUriModule2).optional(),
6721
- kayAgentEntityResolvers: z17.array(ResolvedKayAgentEntityResolver2).optional(),
6722
- kayAgentGitHostClaims: z17.array(ResolvedKayAgentGitHostClaim2).optional(),
6723
- kayAgentTools: z17.array(ResolvedKayAgentTool2).optional(),
6724
- kayAppTools: z17.array(ResolvedKayAppTool2).optional(),
6725
- kayAppApprovalTypes: z17.array(ResolvedKayAppApprovalType2).optional(),
6726
- kayAppWorkflows: z17.array(ResolvedKayAppWorkflow2).optional(),
6727
- kayAppCards: z17.array(ResolvedPluginCard2).optional(),
6728
- kayAppDataSources: z17.array(ResolvedKayAppDataSource2).optional(),
6729
- kayAppWhiteboardTypes: z17.array(ResolvedKayAppWhiteboardType2).optional(),
6730
- kayAppMcpServers: z17.array(ResolvedKayAppMcpServer2).optional(),
6731
- kayAgentConverters: z17.array(ResolvedKayAgentConverter2).optional(),
6732
- referencePresentations: z17.array(ResolvedReferencePresentation2).optional(),
6733
- kayUiApps: z17.array(ResolvedKayUiApp2).optional()
6879
+ kayAgentFamilyFolder: z18.strictObject({ scope: z18.literal("root") }).optional(),
6880
+ kayAgentUriModules: z18.array(ResolvedKayAgentUriModule2).optional(),
6881
+ kayAgentArtifactUriModules: z18.array(ResolvedKayAgentArtifactUriModule2).optional(),
6882
+ kayAgentEntityResolvers: z18.array(ResolvedKayAgentEntityResolver2).optional(),
6883
+ kayAgentGitHostClaims: z18.array(ResolvedKayAgentGitHostClaim2).optional(),
6884
+ kayAgentTools: z18.array(ResolvedKayAgentTool2).optional(),
6885
+ kayAppTools: z18.array(ResolvedKayAppTool2).optional(),
6886
+ kayAppApprovalTypes: z18.array(ResolvedKayAppApprovalType2).optional(),
6887
+ kayAppWorkflows: z18.array(ResolvedKayAppWorkflow2).optional(),
6888
+ kayAppCards: z18.array(ResolvedPluginCard2).optional(),
6889
+ kayAppDataSources: z18.array(ResolvedKayAppDataSource2).optional(),
6890
+ kayAppWhiteboardTypes: z18.array(ResolvedKayAppWhiteboardType2).optional(),
6891
+ kayAppMcpServers: z18.array(ResolvedKayAppMcpServer2).optional(),
6892
+ kayAgentConverters: z18.array(ResolvedKayAgentConverter2).optional(),
6893
+ referencePresentations: z18.array(ResolvedReferencePresentation2).optional(),
6894
+ kayUiApps: z18.array(ResolvedKayUiApp2).optional()
6734
6895
  });
6735
6896
  return {
6736
6897
  ResolvedPluginContributionId: ResolvedPluginContributionId2,
@@ -7119,6 +7280,7 @@ function resolveKayPluginContractV1(manifest) {
7119
7280
  snapshot: source.snapshot,
7120
7281
  change: source.change,
7121
7282
  ...source.read === void 0 ? {} : { read: source.read },
7283
+ ...source.messageDraft === void 0 ? {} : { messageDraft: source.messageDraft },
7122
7284
  ...source.store === void 0 ? {} : { store: source.store }
7123
7285
  }));
7124
7286
  const kayAppApprovalTypes = manifest.targets?.kay?.app?.contributes?.approvalTypes?.map(({ uriModule, ...type }) => {
@@ -7138,7 +7300,10 @@ function resolveKayPluginContractV1(manifest) {
7138
7300
  displayName: type.displayName,
7139
7301
  schemaVersion: type.schemaVersion,
7140
7302
  storage: type.storage,
7141
- valueSchema: type.valueSchema
7303
+ valueSchema: type.valueSchema,
7304
+ ...type.directory === void 0 ? {} : { directory: type.directory },
7305
+ ...type.reference === void 0 ? {} : { reference: type.reference },
7306
+ ...type.handover === void 0 ? {} : { handover: type.handover }
7142
7307
  }));
7143
7308
  const kayAppMcpServers = Object.entries(manifest.targets?.kay?.app?.contributes?.mcpServers ?? {}).map(([name, server]) => ({
7144
7309
  name,
@@ -7268,6 +7433,7 @@ function resolveKayPluginContractV1(manifest) {
7268
7433
  }))
7269
7434
  },
7270
7435
  ...grants && Object.keys(grants.byTarget).length > 0 ? { grants } : {},
7436
+ ...manifest.targets?.kay?.agent?.familyFolder === void 0 ? {} : { kayAgentFamilyFolder: manifest.targets.kay.agent.familyFolder },
7271
7437
  ...kayAgentUriModules && kayAgentUriModules.length > 0 ? { kayAgentUriModules } : {},
7272
7438
  ...kayAgentArtifactUriModules && kayAgentArtifactUriModules.length > 0 ? { kayAgentArtifactUriModules } : {},
7273
7439
  ...kayAgentEntityResolvers && kayAgentEntityResolvers.length > 0 ? { kayAgentEntityResolvers } : {},
@@ -7450,14 +7616,14 @@ function kayPluginCompatibilityAdvisories(input) {
7450
7616
  message: boundPluginDiagnosticMessage(`${manifest.displayName} (${manifest.id}) ${advisory.message}`)
7451
7617
  }));
7452
7618
  }
7453
- var ReadableCompatibility = z18.object({
7454
- supportedProtocols: z18.array(z18.string()).optional().catch(void 0),
7619
+ var ReadableCompatibility = z19.object({
7620
+ supportedProtocols: z19.array(z19.string()).optional().catch(void 0),
7455
7621
  minKayVersion: NonEmptyString.optional().catch(void 0),
7456
7622
  sdk: NonEmptyString.optional().catch(void 0)
7457
7623
  });
7458
- var ReadableManifestHead = z18.object({
7459
- id: z18.string().optional().catch(void 0),
7460
- displayName: z18.string().optional().catch(void 0),
7624
+ var ReadableManifestHead = z19.object({
7625
+ id: z19.string().optional().catch(void 0),
7626
+ displayName: z19.string().optional().catch(void 0),
7461
7627
  compatibility: ReadableCompatibility.optional().catch(void 0)
7462
7628
  });
7463
7629
  function keepNamespaceDerivedTools(contract, grandfathered) {
@@ -7561,28 +7727,28 @@ function errorText(error) {
7561
7727
  }
7562
7728
 
7563
7729
  // packages/plugin-protocol/dist/session-health.js
7564
- import { z as z19 } from "zod";
7730
+ import { z as z20 } from "zod";
7565
7731
  var SESSION_HEALTH_EXTENSION_ID = "kay.session-health";
7566
7732
  var SESSION_HEALTH_ENTRY_NAME = "session_health";
7567
7733
  var SESSION_HEALTH_CUSTOM_TYPE = `ext:${SESSION_HEALTH_EXTENSION_ID}:${SESSION_HEALTH_ENTRY_NAME}`;
7568
7734
  var SESSION_HEALTH_CLASSIFIER_IDS = ["jev"];
7569
- var sessionHealthEntrySchema = z19.object({
7570
- v: z19.literal(1),
7571
- verdict: z19.enum(["well", "bad", "unknown"]),
7735
+ var sessionHealthEntrySchema = z20.object({
7736
+ v: z20.literal(1),
7737
+ verdict: z20.enum(["well", "bad", "unknown"]),
7572
7738
  /**
7573
7739
  * The model's calibrated confidence in `well`, 0..1, or null when the
7574
7740
  * classifier declined to produce one. Never exported raw: the telemetry
7575
7741
  * event carries only the decile bucket.
7576
7742
  */
7577
- p_well: z19.number().min(0).max(1).nullable(),
7578
- classifier: z19.enum(SESSION_HEALTH_CLASSIFIER_IDS),
7579
- classifier_version: z19.string().min(1).max(64),
7580
- judged_at: z19.number().int().nonnegative(),
7581
- user_entry_id: z19.string().min(1).max(256),
7582
- through_entry_id: z19.string().min(1).max(256),
7583
- usage: z19.strictObject({
7584
- input_tokens: z19.number().int().nonnegative(),
7585
- output_tokens: z19.number().int().nonnegative()
7743
+ p_well: z20.number().min(0).max(1).nullable(),
7744
+ classifier: z20.enum(SESSION_HEALTH_CLASSIFIER_IDS),
7745
+ classifier_version: z20.string().min(1).max(64),
7746
+ judged_at: z20.number().int().nonnegative(),
7747
+ user_entry_id: z20.string().min(1).max(256),
7748
+ through_entry_id: z20.string().min(1).max(256),
7749
+ usage: z20.strictObject({
7750
+ input_tokens: z20.number().int().nonnegative(),
7751
+ output_tokens: z20.number().int().nonnegative()
7586
7752
  }).optional()
7587
7753
  });
7588
7754
  function sessionHealthPWellDecile(pWell) {
@@ -7592,23 +7758,23 @@ function sessionHealthPWellDecile(pWell) {
7592
7758
  }
7593
7759
 
7594
7760
  // packages/plugin-protocol/dist/resource-invocations.js
7595
- import { z as z20 } from "zod";
7596
- var CorpusResourceKind = z20.enum([
7761
+ import { z as z21 } from "zod";
7762
+ var CorpusResourceKind = z21.enum([
7597
7763
  "skill",
7598
7764
  "context-file",
7599
7765
  "prompt-command"
7600
7766
  ]);
7601
- var CorpusResourceInvocationCursor = z20.strictObject({
7602
- at: z20.iso.datetime({ offset: true }),
7603
- eventId: z20.string().min(1)
7767
+ var CorpusResourceInvocationCursor = z21.strictObject({
7768
+ at: z21.iso.datetime({ offset: true }),
7769
+ eventId: z21.string().min(1)
7604
7770
  });
7605
- var CorpusResourceInvocationQuery = z20.strictObject({
7771
+ var CorpusResourceInvocationQuery = z21.strictObject({
7606
7772
  kind: CorpusResourceKind,
7607
- since: z20.iso.datetime({ offset: true }),
7608
- until: z20.iso.datetime({ offset: true }),
7773
+ since: z21.iso.datetime({ offset: true }),
7774
+ until: z21.iso.datetime({ offset: true }),
7609
7775
  after: CorpusResourceInvocationCursor.optional(),
7610
- limit: z20.number().int().min(1).max(1e3).optional(),
7611
- rootCreatedByKind: z20.enum(AGENT_RUNTIME_SESSION_CREATOR_KINDS).optional()
7776
+ limit: z21.number().int().min(1).max(1e3).optional(),
7777
+ rootCreatedByKind: z21.enum(AGENT_RUNTIME_SESSION_CREATOR_KINDS).optional()
7612
7778
  }).refine((value) => Date.parse(value.since) < Date.parse(value.until), {
7613
7779
  message: "since must precede until"
7614
7780
  });
@@ -7788,14 +7954,14 @@ function skillSuggestionEvidenceItems(evidence, options = {}) {
7788
7954
  }
7789
7955
 
7790
7956
  // packages/plugin-protocol/dist/ui-app-package.js
7791
- import { z as z21 } from "zod";
7957
+ import { z as z22 } from "zod";
7792
7958
  var KAY_UI_APP_PACKAGE_PROTOCOL = "kay.ui.app-package.v1";
7793
7959
  var KAY_UI_BUNDLE_INDEX_PROTOCOL = "kay.ui.bundle-index.v1";
7794
- var KayUiBundleOutputPath = z21.string().trim().min(1).refine((value) => !value.startsWith("/") && !value.startsWith("./") && !value.includes("\\") && !value.split("/").includes(".."), { message: "bundle output path must stay relative to the bundle root" });
7795
- var KayUiBundleIndexV1 = z21.strictObject({
7796
- protocol: z21.literal(KAY_UI_BUNDLE_INDEX_PROTOCOL),
7960
+ var KayUiBundleOutputPath = z22.string().trim().min(1).refine((value) => !value.startsWith("/") && !value.startsWith("./") && !value.includes("\\") && !value.split("/").includes(".."), { message: "bundle output path must stay relative to the bundle root" });
7961
+ var KayUiBundleIndexV1 = z22.strictObject({
7962
+ protocol: z22.literal(KAY_UI_BUNDLE_INDEX_PROTOCOL),
7797
7963
  entryPath: KayUiBundleOutputPath,
7798
- files: z21.array(z21.strictObject({
7964
+ files: z22.array(z22.strictObject({
7799
7965
  path: KayUiBundleOutputPath,
7800
7966
  mediaType: NonEmptyString
7801
7967
  })).min(1)
@@ -7822,19 +7988,19 @@ var KayUiBundleIndexV1 = z21.strictObject({
7822
7988
  function parseKayUiBundleIndexV1(input) {
7823
7989
  return KayUiBundleIndexV1.parse(input);
7824
7990
  }
7825
- var KayUiAppPackageFile = z21.strictObject({
7991
+ var KayUiAppPackageFile = z22.strictObject({
7826
7992
  path: PackageAssetPath,
7827
7993
  mediaType: NonEmptyString,
7828
- bytes: z21.instanceof(Uint8Array).refine((bytes) => bytes.byteLength > 0, {
7994
+ bytes: z22.instanceof(Uint8Array).refine((bytes) => bytes.byteLength > 0, {
7829
7995
  message: "app package file bytes must not be empty"
7830
7996
  })
7831
7997
  });
7832
- var KayUiAppPackageV1 = z21.strictObject({
7833
- protocol: z21.literal(KAY_UI_APP_PACKAGE_PROTOCOL),
7998
+ var KayUiAppPackageV1 = z22.strictObject({
7999
+ protocol: z22.literal(KAY_UI_APP_PACKAGE_PROTOCOL),
7834
8000
  appLocalId: LocalContributionId,
7835
8001
  entry: KayUiAppPackageFile,
7836
- styles: z21.array(KayUiAppPackageFile).optional(),
7837
- assets: z21.array(KayUiAppPackageFile).optional()
8002
+ styles: z22.array(KayUiAppPackageFile).optional(),
8003
+ assets: z22.array(KayUiAppPackageFile).optional()
7838
8004
  }).superRefine((appPackage, ctx) => {
7839
8005
  if (appPackage.entry.mediaType !== "application/javascript") {
7840
8006
  ctx.addIssue({
@@ -7870,49 +8036,6 @@ function parseKayUiAppPackageV1(input) {
7870
8036
  return KayUiAppPackageV1.parse(input);
7871
8037
  }
7872
8038
 
7873
- // packages/plugin-protocol/dist/whiteboard.js
7874
- import { z as z22 } from "zod";
7875
- var WhiteboardValue = JsonValue;
7876
- var WhiteboardEntryEnvelope = z22.strictObject({
7877
- id: NonEmptyString,
7878
- typeId: GlobalContributionId,
7879
- schemaVersion: z22.number().int().positive(),
7880
- title: z22.string(),
7881
- authorSessionId: NonEmptyString.nullable()
7882
- });
7883
- var WhiteboardEntrySummary = z22.strictObject({
7884
- name: NonEmptyString,
7885
- entry: WhiteboardEntryEnvelope,
7886
- revision: NonEmptyString
7887
- });
7888
- var WhiteboardEntrySnapshot = WhiteboardEntrySummary.extend({
7889
- value: WhiteboardValue
7890
- });
7891
- var WhiteboardDiagnostic = z22.strictObject({
7892
- ruleId: NonEmptyString,
7893
- severity: z22.enum(["error", "warning"]),
7894
- message: NonEmptyString
7895
- });
7896
- var WhiteboardEntryInfo = z22.strictObject({
7897
- name: NonEmptyString,
7898
- revision: NonEmptyString,
7899
- entry: WhiteboardEntryEnvelope.optional(),
7900
- state: z22.enum(["available", "unavailable", "unsupported-version", "invalid"]),
7901
- mutable: z22.boolean(),
7902
- diagnostics: z22.array(z22.string())
7903
- });
7904
- var WhiteboardEntryInspection = WhiteboardEntryInfo.extend({
7905
- value: WhiteboardValue.optional(),
7906
- text: z22.string(),
7907
- truncated: z22.boolean()
7908
- });
7909
- var WhiteboardTypeInfo = z22.strictObject({
7910
- typeId: GlobalContributionId,
7911
- displayName: NonEmptyString,
7912
- schemaVersion: z22.number().int().positive(),
7913
- available: z22.boolean()
7914
- });
7915
-
7916
8039
  // packages/plugin-protocol/dist/product-events.js
7917
8040
  import { z as z23 } from "zod";
7918
8041
  var exportable = {
@@ -8338,6 +8461,7 @@ export {
8338
8461
  WhiteboardEntryEnvelope,
8339
8462
  WhiteboardEntryInfo,
8340
8463
  WhiteboardEntryInspection,
8464
+ WhiteboardEntryReference,
8341
8465
  WhiteboardEntrySnapshot,
8342
8466
  WhiteboardEntrySummary,
8343
8467
  WhiteboardTypeContribution,