@yaklabs-ai/plugin-protocol 0.14.0 → 0.15.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
@@ -136,37 +136,8 @@ var JsonSchema = z2.record(z2.string(), JsonValue);
136
136
  // packages/plugin-protocol/dist/common.js
137
137
  var KAY_PLUGIN_PROTOCOL_VERSION = "kay.plugin.v1";
138
138
  var KAY_PLUGIN_PROTOCOL_PACKAGE_NAME = "@bonsai/plugin-protocol";
139
- var KAY_PLUGIN_SDK_VERSION = "0.14.0";
140
- var KAY_PLUGIN_COMPATIBLE_SDK_VERSIONS = [
141
- "0.8.0",
142
- "0.8.1",
143
- "0.8.2",
144
- "0.8.3",
145
- "0.8.4",
146
- "0.8.5",
147
- "0.9.0",
148
- "0.9.1",
149
- "0.10.0",
150
- "0.11.0",
151
- "0.11.1",
152
- "0.12.0",
153
- "0.12.1",
154
- "0.12.2",
155
- "0.12.3",
156
- "0.12.4",
157
- "0.12.5",
158
- "0.13.0",
159
- "0.13.1",
160
- "0.13.2",
161
- "0.13.3",
162
- "0.13.4",
163
- "0.13.5",
164
- "0.13.6",
165
- "0.13.7",
166
- "0.13.8",
167
- "0.13.9",
168
- "0.13.10"
169
- ];
139
+ var KAY_PLUGIN_SDK_VERSION = "0.15.0";
140
+ var KAY_PLUGIN_COMPATIBLE_SDK_VERSIONS = [];
170
141
  var KAY_PLUGIN_TARGET_NAMES = [
171
142
  "kay.agent",
172
143
  "kay.app",
@@ -1122,6 +1093,7 @@ function resolveAdapterId(globalId, declaredAdapterId) {
1122
1093
  // packages/plugin-protocol/dist/permissions.js
1123
1094
  var AuthGrantOperation = z7.enum([
1124
1095
  "status",
1096
+ "list",
1125
1097
  "connect",
1126
1098
  "disconnect",
1127
1099
  "resolve"
@@ -2348,31 +2320,83 @@ function checkKayPluginHostCompatibility(compatibility, host) {
2348
2320
  return { refusal: void 0, advisories };
2349
2321
  }
2350
2322
 
2351
- // packages/plugin-protocol/dist/contributions.js
2323
+ // packages/plugin-protocol/dist/plugin-events.js
2352
2324
  import { z as z9 } from "zod";
2325
+ var PluginEventLocalId = z9.string().regex(/^[a-z][a-z0-9-]*(?:\.[a-z][a-z0-9-]*)*$/);
2326
+ var PluginEventUri = z9.string().refine((value) => {
2327
+ if (!/^[a-z][a-z0-9+.-]*:/i.test(value) || /[\s\p{Cc}\\<>"{}|^`]/u.test(value) || /%(?![a-f0-9]{2})/i.test(value))
2328
+ return false;
2329
+ try {
2330
+ return new URL(value).protocol.length > 1;
2331
+ } catch {
2332
+ return false;
2333
+ }
2334
+ }, { message: "Expected an absolute resource URI" });
2335
+ var PluginEventTimestamp = z9.iso.datetime().refine((value) => !/\.\d{10}/.test(value), {
2336
+ message: "Expected an ISO instant with at most nanosecond precision"
2337
+ });
2338
+ var PluginEventRelated = z9.record(NonEmptyString, z9.union([PluginEventUri, z9.array(PluginEventUri)]));
2339
+ var PluginEventPublishSource = z9.strictObject({
2340
+ poller: NonEmptyString.optional(),
2341
+ runId: NonEmptyString.optional()
2342
+ });
2343
+ var PluginEventSource = z9.strictObject({
2344
+ layer: z9.literal("runtime"),
2345
+ pluginId: NonEmptyString,
2346
+ sessionId: NonEmptyString.optional(),
2347
+ ...PluginEventPublishSource.shape
2348
+ });
2349
+ var PLUGIN_EVENT_ID_MAX_BYTES = 1024;
2350
+ var PluginEventId = z9.string().min(1).refine((value) => value === value.trim() && !/\p{Cc}/u.test(value) && new TextEncoder().encode(value).length <= PLUGIN_EVENT_ID_MAX_BYTES, {
2351
+ message: "Event identity must be control-free, unpadded, and at most 1024 UTF-8 bytes"
2352
+ });
2353
+ var PluginEventPublishInput = z9.strictObject({
2354
+ uri: PluginEventUri,
2355
+ related: PluginEventRelated.optional(),
2356
+ key: PluginEventId.optional(),
2357
+ occurredAt: PluginEventTimestamp.optional(),
2358
+ source: PluginEventPublishSource.optional(),
2359
+ payload: JsonValue.optional()
2360
+ });
2361
+ var PluginEventEnvelope = z9.strictObject({
2362
+ id: PluginEventId,
2363
+ localId: PluginEventLocalId,
2364
+ type: GlobalContributionId,
2365
+ version: z9.number().int().positive(),
2366
+ uri: PluginEventUri,
2367
+ related: PluginEventRelated.optional(),
2368
+ key: PluginEventPublishInput.shape.key,
2369
+ occurredAt: PluginEventTimestamp,
2370
+ publishedAt: PluginEventTimestamp,
2371
+ source: PluginEventSource,
2372
+ payload: JsonValue.optional()
2373
+ });
2374
+
2375
+ // packages/plugin-protocol/dist/contributions.js
2376
+ import { z as z10 } from "zod";
2353
2377
  var OptionalDisplayName = NonEmptyString.optional();
2354
- var UriFilesystemBacking = z9.strictObject({
2355
- root: z9.literal("dataDir")
2378
+ var UriFilesystemBacking = z10.strictObject({
2379
+ root: z10.literal("dataDir")
2356
2380
  });
2357
- var ToolContribution = z9.strictObject({
2381
+ var ToolContribution = z10.strictObject({
2358
2382
  localId: LocalContributionId,
2359
2383
  toolName: PluginToolName,
2360
2384
  displayName: OptionalDisplayName,
2361
2385
  description: NonEmptyString.optional()
2362
2386
  });
2363
- var ConverterContribution = z9.strictObject({
2387
+ var ConverterContribution = z10.strictObject({
2364
2388
  localId: LocalContributionId,
2365
2389
  displayName: OptionalDisplayName,
2366
2390
  description: NonEmptyString.optional(),
2367
2391
  /** MIME types this converter claims — contract data for introspection and
2368
2392
  * collision checks; runtime match behavior stays the converter's `matches()`. */
2369
- mimeTypes: z9.array(MimeTypeString).min(1),
2393
+ mimeTypes: z10.array(MimeTypeString).min(1),
2370
2394
  /** Extension fallbacks (no dot) used when a probe has no usable MIME type. */
2371
- extensions: z9.array(FileExtensionToken).min(1).optional()
2395
+ extensions: z10.array(FileExtensionToken).min(1).optional()
2372
2396
  });
2373
- var UriModuleContribution = z9.strictObject({
2397
+ var UriModuleContribution = z10.strictObject({
2374
2398
  localId: LocalContributionId,
2375
- schemes: z9.array(UriScheme).min(1),
2399
+ schemes: z10.array(UriScheme).min(1),
2376
2400
  displayName: OptionalDisplayName,
2377
2401
  // The plugin only requests a projection. The daemon binds the effective root
2378
2402
  // and retains access control at finalization.
@@ -2391,30 +2415,30 @@ var UriModuleContribution = z9.strictObject({
2391
2415
  // `knownResources` permission grant (`api.knownResources`). Present-means-on
2392
2416
  // (`true` or absent; `false` is not a state). Decision record:
2393
2417
  // `lab/user-plugins/decisions/014-known-resources-ledger.md`.
2394
- knownResources: z9.literal(true).optional()
2418
+ knownResources: z10.literal(true).optional()
2395
2419
  });
2396
2420
  var AppUriModuleContribution = UriModuleContribution.omit({
2397
2421
  authService: true,
2398
2422
  filesystemBacking: true,
2399
2423
  knownResources: true
2400
2424
  });
2401
- var AppDataSourceContribution = z9.strictObject({
2425
+ var AppDataSourceContribution = z10.strictObject({
2402
2426
  localId: LocalContributionId,
2403
- scope: z9.enum(["runtime", "account", "session"]),
2404
- snapshot: z9.strictObject({
2405
- version: z9.number().int().positive(),
2427
+ scope: z10.enum(["runtime", "account", "session"]),
2428
+ snapshot: z10.strictObject({
2429
+ version: z10.number().int().positive(),
2406
2430
  schema: JsonSchema
2407
2431
  }),
2408
- change: z9.strictObject({
2409
- version: z9.number().int().positive(),
2432
+ change: z10.strictObject({
2433
+ version: z10.number().int().positive(),
2410
2434
  schema: JsonSchema,
2411
2435
  /** Review-only claim; source schemas and behavioral tests enforce it because the daemon treats changes as opaque. */
2412
- semantics: z9.discriminatedUnion("kind", [
2413
- z9.strictObject({ kind: z9.literal("incremental") }),
2414
- z9.strictObject({
2415
- kind: z9.literal("snapshot-replacement"),
2416
- maxEncodedBytes: z9.number().int().positive(),
2417
- rationale: z9.string().trim().min(1).max(1024)
2436
+ semantics: z10.discriminatedUnion("kind", [
2437
+ z10.strictObject({ kind: z10.literal("incremental") }),
2438
+ z10.strictObject({
2439
+ kind: z10.literal("snapshot-replacement"),
2440
+ maxEncodedBytes: z10.number().int().positive(),
2441
+ rationale: z10.string().trim().min(1).max(1024)
2418
2442
  })
2419
2443
  ]).optional()
2420
2444
  }),
@@ -2428,28 +2452,28 @@ var AppDataSourceContribution = z9.strictObject({
2428
2452
  });
2429
2453
  }
2430
2454
  });
2431
- var WhiteboardTypeStorage = z9.discriminatedUnion("kind", [
2432
- z9.strictObject({ kind: z9.literal("json") }),
2433
- z9.strictObject({ kind: z9.literal("payload") }),
2434
- z9.strictObject({
2435
- kind: z9.literal("markdown"),
2455
+ var WhiteboardTypeStorage = z10.discriminatedUnion("kind", [
2456
+ z10.strictObject({ kind: z10.literal("json") }),
2457
+ z10.strictObject({ kind: z10.literal("payload") }),
2458
+ z10.strictObject({
2459
+ kind: z10.literal("markdown"),
2436
2460
  bodyField: NonEmptyString
2437
2461
  })
2438
2462
  ]);
2439
- var WhiteboardTypeContribution = z9.strictObject({
2463
+ var WhiteboardTypeContribution = z10.strictObject({
2440
2464
  localId: LocalContributionId,
2441
2465
  displayName: NonEmptyString,
2442
- schemaVersion: z9.number().int().positive(),
2466
+ schemaVersion: z10.number().int().positive(),
2443
2467
  storage: WhiteboardTypeStorage,
2444
2468
  valueSchema: JsonSchema,
2445
- presentation: z9.strictObject({
2469
+ presentation: z10.strictObject({
2446
2470
  app: LocalContributionId
2447
2471
  }).optional()
2448
2472
  });
2449
- var AppDataMaterializerContribution = z9.strictObject({
2473
+ var AppDataMaterializerContribution = z10.strictObject({
2450
2474
  source: LocalContributionId
2451
2475
  });
2452
- var ArtifactUriModuleContribution = z9.strictObject({
2476
+ var ArtifactUriModuleContribution = z10.strictObject({
2453
2477
  localId: LocalContributionId,
2454
2478
  /** The single `scheme://` this module owns; also the on-disk artifact kind. */
2455
2479
  scheme: UriScheme,
@@ -2463,17 +2487,17 @@ var ArtifactUriModuleContribution = z9.strictObject({
2463
2487
  * composes its description from the plugin's own display name + scheme — a per-scheme label
2464
2488
  * would have no path to matter, so it is intentionally omitted rather than accepted-and-ignored.
2465
2489
  */
2466
- editable: z9.boolean().optional(),
2490
+ editable: z10.boolean().optional(),
2467
2491
  /** Opt in to `list` over the kind's stored names. Default false. Mirrors
2468
2492
  * `CreateArtifactUriModuleOptions.listable`. */
2469
- listable: z9.boolean().optional(),
2493
+ listable: z10.boolean().optional(),
2470
2494
  /**
2471
2495
  * Opt in to `delete` for same-session entries. Default false. Deletion
2472
2496
  * unlinks the stored file — no trash tier; a kind that wants recoverable
2473
2497
  * deletion is not artifact-backed. Mirrors
2474
2498
  * `CreateArtifactUriModuleOptions.deletable`.
2475
2499
  */
2476
- deletable: z9.boolean().optional(),
2500
+ deletable: z10.boolean().optional(),
2477
2501
  /**
2478
2502
  * Opt in to the `{ content, mode: "append" }` write envelope, which extends
2479
2503
  * stored text instead of replacing it (concurrent-appender-safe: the host
@@ -2481,7 +2505,7 @@ var ArtifactUriModuleContribution = z9.strictObject({
2481
2505
  * keep their verbatim round-trip. Mirrors
2482
2506
  * `CreateArtifactUriModuleOptions.appendable`.
2483
2507
  */
2484
- appendable: z9.boolean().optional(),
2508
+ appendable: z10.boolean().optional(),
2485
2509
  /**
2486
2510
  * Which sessions share one storage namespace. Default `"session"` — the existing
2487
2511
  * per-session behavior (each session gets its own kind directory; other sessions'
@@ -2492,14 +2516,14 @@ var ArtifactUriModuleContribution = z9.strictObject({
2492
2516
  * the scope; the host derives the family root from provenance it already holds, so
2493
2517
  * family identity never crosses the SDK boundary.
2494
2518
  */
2495
- storageScope: z9.enum(["session", "family"]).optional()
2519
+ storageScope: z10.enum(["session", "family"]).optional()
2496
2520
  });
2497
- var CliBindingContribution = z9.strictObject({
2521
+ var CliBindingContribution = z10.strictObject({
2498
2522
  localId: LocalContributionId,
2499
2523
  binary: CliBinaryName,
2500
- aliases: z9.array(CliBinaryName).optional(),
2524
+ aliases: z10.array(CliBinaryName).optional(),
2501
2525
  /** Where the binary comes from. Omitted ⇒ `"vendored"` (decision 007). */
2502
- provider: z9.enum(["vendored", "path"]).optional(),
2526
+ provider: z10.enum(["vendored", "path"]).optional(),
2503
2527
  // A local ref (no dot) must name an auth service declared in this same
2504
2528
  // manifest; a qualified ref (dotted, e.g. `google.account`) names another
2505
2529
  // plugin's already-minted global id and is recorded, not resolved, here (see
@@ -2512,20 +2536,20 @@ var CliBindingContribution = z9.strictObject({
2512
2536
  * MUST be absent for a `path` binding, which can never receive a token.
2513
2537
  */
2514
2538
  authEnvVar: CliAuthEnvVarName.optional(),
2515
- readOnly: z9.array(NonEmptyString),
2516
- write: z9.array(NonEmptyString)
2539
+ readOnly: z10.array(NonEmptyString),
2540
+ write: z10.array(NonEmptyString)
2517
2541
  });
2518
- var GitHostContribution = z9.strictObject({
2542
+ var GitHostContribution = z10.strictObject({
2519
2543
  host: GitHostName,
2520
2544
  authService: LocalContributionId,
2521
2545
  basicAuthUser: GitBasicAuthUser
2522
2546
  });
2523
- var ResourceContribution = z9.strictObject({
2547
+ var ResourceContribution = z10.strictObject({
2524
2548
  localId: LocalContributionId,
2525
2549
  displayName: OptionalDisplayName,
2526
2550
  description: NonEmptyString.optional()
2527
2551
  });
2528
- var SkillContribution = z9.strictObject({
2552
+ var SkillContribution = z10.strictObject({
2529
2553
  localId: LocalContributionId,
2530
2554
  displayName: OptionalDisplayName,
2531
2555
  /** Model-visible one-liner: when to reach for this skill. */
@@ -2533,18 +2557,18 @@ var SkillContribution = z9.strictObject({
2533
2557
  /** The SKILL.md-style file inside the package carrying the full instructions. */
2534
2558
  path: PackageAssetPath
2535
2559
  });
2536
- var PluginSkillSourceDeclaration = z9.discriminatedUnion("channel", [
2537
- z9.strictObject({
2538
- channel: z9.literal("installer"),
2560
+ var PluginSkillSourceDeclaration = z10.discriminatedUnion("channel", [
2561
+ z10.strictObject({
2562
+ channel: z10.literal("installer"),
2539
2563
  localId: LocalContributionId,
2540
2564
  displayName: OptionalDisplayName,
2541
2565
  /** The package-runner executable, e.g. `npx` — checked against the daemon's allowlist. */
2542
2566
  command: NonEmptyString,
2543
2567
  /** Its argv, e.g. `["skills", "add", "clerk/skills"]`. */
2544
- args: z9.array(NonEmptyString)
2568
+ args: z10.array(NonEmptyString)
2545
2569
  }),
2546
- z9.strictObject({
2547
- channel: z9.literal("git-clone"),
2570
+ z10.strictObject({
2571
+ channel: z10.literal("git-clone"),
2548
2572
  localId: LocalContributionId,
2549
2573
  displayName: OptionalDisplayName,
2550
2574
  /** The repository locator — canonicalized and hygiene-checked by the daemon. */
@@ -2555,17 +2579,17 @@ var PluginSkillSourceDeclaration = z9.discriminatedUnion("channel", [
2555
2579
  subdir: NonEmptyString.optional()
2556
2580
  })
2557
2581
  ]);
2558
- var SearchProviderContribution = z9.strictObject({
2582
+ var SearchProviderContribution = z10.strictObject({
2559
2583
  localId: LocalContributionId,
2560
2584
  displayName: OptionalDisplayName,
2561
- schemes: z9.array(UriScheme).optional()
2585
+ schemes: z10.array(UriScheme).optional()
2562
2586
  });
2563
- var InteractionDriverContribution = z9.strictObject({
2587
+ var InteractionDriverContribution = z10.strictObject({
2564
2588
  localId: LocalContributionId,
2565
2589
  displayName: OptionalDisplayName,
2566
- kind: z9.enum(["browser", "computer-use"])
2590
+ kind: z10.enum(["browser", "computer-use"])
2567
2591
  });
2568
- var EntityResolverContribution = z9.strictObject({
2592
+ var EntityResolverContribution = z10.strictObject({
2569
2593
  localId: LocalContributionId,
2570
2594
  displayName: OptionalDisplayName,
2571
2595
  /** The `kay.agent` URI module (this manifest's own `contributes.uriModules[].localId`) whose
@@ -2573,24 +2597,24 @@ var EntityResolverContribution = z9.strictObject({
2573
2597
  uriModule: LocalContributionId,
2574
2598
  /** `person` | `channel` | `repo` | `pull-request` | ... -- drives avatar-first vs glyph-first row
2575
2599
  * anatomy (N10-R2) and lets the renderer request a narrower `entityTypes` filter. */
2576
- entityTypes: z9.array(NonEmptyString).min(1),
2600
+ entityTypes: z10.array(NonEmptyString).min(1),
2577
2601
  /** The URI namespace/route `search()` is called against, e.g. `slack://directory` or
2578
2602
  * `github://search/repositories` -- the resolver's fixed search scope; the live user query is
2579
2603
  * the `search()` call's `query` param, never concatenated into this string. */
2580
2604
  uriHint: NonEmptyString
2581
2605
  });
2582
- var AgentRenderContribution = z9.strictObject({
2606
+ var AgentRenderContribution = z10.strictObject({
2583
2607
  localId: LocalContributionId,
2584
- resultKinds: z9.array(NonEmptyString).min(1)
2608
+ resultKinds: z10.array(NonEmptyString).min(1)
2585
2609
  });
2586
- var EndpointContribution = z9.strictObject({
2610
+ var EndpointContribution = z10.strictObject({
2587
2611
  localId: LocalContributionId,
2588
2612
  displayName: OptionalDisplayName,
2589
2613
  requestSchema: JsonSchema.optional(),
2590
2614
  responseSchema: JsonSchema.optional()
2591
2615
  });
2592
2616
  var MCP_SERVER_LOCAL_HTTP_HOSTNAMES = /* @__PURE__ */ new Set(["localhost", "127.0.0.1"]);
2593
- var McpServerUrl = z9.string().trim().min(1).refine((value) => {
2617
+ var McpServerUrl = z10.string().trim().min(1).refine((value) => {
2594
2618
  let parsed;
2595
2619
  try {
2596
2620
  parsed = new URL(value);
@@ -2603,8 +2627,12 @@ var McpServerUrl = z9.string().trim().min(1).refine((value) => {
2603
2627
  }, {
2604
2628
  message: "mcp server url must be https://, or http:// only for localhost/127.0.0.1 test servers"
2605
2629
  });
2606
- var McpServerAuthMode = z9.enum(["oauth", "none"]);
2607
- var McpServerContribution = z9.strictObject({
2630
+ var McpServerAuthMode = z10.enum(["oauth", "api-key", "none"]);
2631
+ var MCP_SIGN_IN_SCHEME_KIND = {
2632
+ oauth: "delegated",
2633
+ "api-key": "api-key"
2634
+ };
2635
+ var McpServerContribution = z10.strictObject({
2608
2636
  url: McpServerUrl,
2609
2637
  auth: McpServerAuthMode.optional(),
2610
2638
  authService: LocalContributionId.optional()
@@ -2613,32 +2641,34 @@ var McpServerContribution = z9.strictObject({
2613
2641
  ctx.addIssue({
2614
2642
  code: "custom",
2615
2643
  path: ["authService"],
2616
- message: "oauth mcp servers must name an authService"
2644
+ message: `${server.auth ?? "oauth"} mcp servers must name an authService`
2617
2645
  });
2618
2646
  }
2619
2647
  });
2620
- var McpServerContributions = z9.record(LocalContributionId, McpServerContribution);
2621
- var AppEventSubscription = z9.strictObject({
2648
+ var McpServerContributions = z10.record(LocalContributionId, McpServerContribution);
2649
+ var AppEventSubscription = z10.strictObject({
2622
2650
  localId: LocalContributionId,
2623
2651
  event: NonEmptyString
2624
2652
  });
2625
- var ContextContributorContribution = z9.strictObject({
2653
+ var ContextContributorContribution = z10.strictObject({
2626
2654
  localId: LocalContributionId.max(64),
2627
2655
  displayName: OptionalDisplayName,
2628
2656
  description: NonEmptyString.optional()
2629
2657
  });
2630
- var PluginEventDefinitionContribution = z9.strictObject({
2631
- localId: LocalContributionId,
2658
+ var PluginEventDefinitionContribution = z10.strictObject({
2659
+ localId: PluginEventLocalId,
2632
2660
  displayName: OptionalDisplayName,
2633
2661
  description: NonEmptyString.optional(),
2634
- version: z9.number().int().positive().default(1),
2635
- payloadSchema: JsonSchema
2662
+ version: z10.number().int().positive().default(1),
2663
+ uriScheme: UriScheme,
2664
+ relatedKeys: z10.array(NonEmptyString).readonly().optional(),
2665
+ payloadSchema: JsonSchema.optional()
2636
2666
  });
2637
- var PluginNotificationRuleContribution = z9.strictObject({
2667
+ var PluginNotificationRuleContribution = z10.strictObject({
2638
2668
  localId: LocalContributionId,
2639
2669
  /** The same-plugin `eventDefinitions` local id this rule matches. */
2640
- event: LocalContributionId,
2641
- where: z9.array(JsonObject).optional(),
2670
+ event: PluginEventLocalId,
2671
+ where: z10.array(JsonObject).optional(),
2642
2672
  rule: JsonObject
2643
2673
  });
2644
2674
  var PLUGIN_NOTIFICATION_RULE_HOST_KEYS = [
@@ -2646,67 +2676,67 @@ var PLUGIN_NOTIFICATION_RULE_HOST_KEYS = [
2646
2676
  "match",
2647
2677
  "sender"
2648
2678
  ];
2649
- var UiEventSubscriptionContribution = z9.strictObject({
2679
+ var UiEventSubscriptionContribution = z10.strictObject({
2650
2680
  localId: LocalContributionId,
2651
2681
  event: NonEmptyString
2652
2682
  });
2653
- var DeviceDelegationContribution = z9.strictObject({
2683
+ var DeviceDelegationContribution = z10.strictObject({
2654
2684
  localId: LocalContributionId,
2655
- device: z9.enum(["microphone"]),
2656
- delegateAs: z9.enum(["clip", "stream", "status"])
2685
+ device: z10.enum(["microphone"]),
2686
+ delegateAs: z10.enum(["clip", "stream", "status"])
2657
2687
  });
2658
- var CorpusContribution = z9.strictObject({
2688
+ var CorpusContribution = z10.strictObject({
2659
2689
  localId: LocalContributionId,
2660
2690
  displayName: OptionalDisplayName,
2661
- access: z9.enum(["read"]).default("read")
2691
+ access: z10.enum(["read"]).default("read")
2662
2692
  });
2663
- var UiCommandContribution = z9.strictObject({
2693
+ var UiCommandContribution = z10.strictObject({
2664
2694
  localId: LocalContributionId,
2665
2695
  title: NonEmptyString,
2666
2696
  icon: NonEmptyString.optional(),
2667
2697
  placement: NonEmptyString.optional()
2668
2698
  });
2669
- var UiSlotContribution = z9.strictObject({
2699
+ var UiSlotContribution = z10.strictObject({
2670
2700
  localId: LocalContributionId,
2671
2701
  slot: NonEmptyString,
2672
2702
  title: NonEmptyString.optional()
2673
2703
  });
2674
- var SettingsPanelContribution = z9.strictObject({
2704
+ var SettingsPanelContribution = z10.strictObject({
2675
2705
  localId: LocalContributionId,
2676
2706
  title: NonEmptyString,
2677
2707
  configSection: NonEmptyString.optional()
2678
2708
  });
2679
- var ResultRendererContribution = z9.strictObject({
2709
+ var ResultRendererContribution = z10.strictObject({
2680
2710
  localId: LocalContributionId,
2681
- resultKinds: z9.array(NonEmptyString).min(1)
2711
+ resultKinds: z10.array(NonEmptyString).min(1)
2682
2712
  });
2683
- var ReferenceOpenBehavior = z9.discriminatedUnion("kind", [
2684
- z9.strictObject({ kind: z9.literal("working-document") }),
2685
- z9.strictObject({ kind: z9.literal("browser-pane") }),
2713
+ var ReferenceOpenBehavior = z10.discriminatedUnion("kind", [
2714
+ z10.strictObject({ kind: z10.literal("working-document") }),
2715
+ z10.strictObject({ kind: z10.literal("browser-pane") }),
2686
2716
  /**
2687
2717
  * Open one of the presenting plugin's OWN registered pages (`registerPage`'s
2688
2718
  * descriptor id) with the reference's canonical URI as the page's `objectId`.
2689
2719
  * Needs no web address, so a plugin-only resource (`user-todo://items/3`) can pill.
2690
2720
  */
2691
- z9.strictObject({ kind: z9.literal("page"), pageId: NonEmptyString })
2721
+ z10.strictObject({ kind: z10.literal("page"), pageId: NonEmptyString })
2692
2722
  ]);
2693
- var ReferencePresentationVariant = z9.strictObject({
2723
+ var ReferencePresentationVariant = z10.strictObject({
2694
2724
  resourceKind: NonEmptyString,
2695
2725
  presentationPluginId: PluginId.optional()
2696
2726
  });
2697
- var ReferencePresentationVariants = z9.record(MimeTypeString, ReferencePresentationVariant);
2698
- var InlineSvg = z9.string().max(64 * 1024).refine((value) => /^\s*(?:<\?xml[^>]*>\s*)?(?:<!--[\s\S]*?-->\s*)*(?:<!DOCTYPE[^>]*>\s*)?<svg[\s>]/iu.test(value), { message: "brandIcon must be inline SVG markup." });
2699
- var ReferencePresentationUrlClaim = z9.strictObject({
2700
- kind: z9.literal("urlPattern"),
2701
- pattern: z9.strictObject({
2702
- protocol: z9.enum(["http", "https"]),
2727
+ var ReferencePresentationVariants = z10.record(MimeTypeString, ReferencePresentationVariant);
2728
+ var InlineSvg = z10.string().max(64 * 1024).refine((value) => /^\s*(?:<\?xml[^>]*>\s*)?(?:<!--[\s\S]*?-->\s*)*(?:<!DOCTYPE[^>]*>\s*)?<svg[\s>]/iu.test(value), { message: "brandIcon must be inline SVG markup." });
2729
+ var ReferencePresentationUrlClaim = z10.strictObject({
2730
+ kind: z10.literal("urlPattern"),
2731
+ pattern: z10.strictObject({
2732
+ protocol: z10.enum(["http", "https"]),
2703
2733
  hostname: NonEmptyString,
2704
- pathname: z9.string().optional(),
2705
- search: z9.string().optional()
2734
+ pathname: z10.string().optional(),
2735
+ search: z10.string().optional()
2706
2736
  }),
2707
2737
  brandIcon: InlineSvg.optional()
2708
2738
  });
2709
- var ReferencePresentationContribution = z9.strictObject({
2739
+ var ReferencePresentationContribution = z10.strictObject({
2710
2740
  localId: LocalContributionId,
2711
2741
  uriModule: LocalContributionId,
2712
2742
  resourceKind: NonEmptyString,
@@ -2714,7 +2744,7 @@ var ReferencePresentationContribution = z9.strictObject({
2714
2744
  /** MIME-specific resource kinds; absent keys use the base presentation. */
2715
2745
  variants: ReferencePresentationVariants.optional(),
2716
2746
  /** Lexical public URL claims used only for host-rendered browser presentations. */
2717
- claims: z9.array(ReferencePresentationUrlClaim).optional()
2747
+ claims: z10.array(ReferencePresentationUrlClaim).optional()
2718
2748
  }).superRefine((value, ctx) => {
2719
2749
  if (value.claims !== void 0 && value.claims.length > 0 && value.open.kind !== "browser-pane") {
2720
2750
  ctx.addIssue({
@@ -2724,13 +2754,15 @@ var ReferencePresentationContribution = z9.strictObject({
2724
2754
  });
2725
2755
  }
2726
2756
  });
2727
- var RichViewContribution = z9.strictObject({
2757
+ var RichViewContribution = z10.strictObject({
2728
2758
  localId: LocalContributionId,
2729
2759
  title: NonEmptyString,
2730
2760
  route: NonEmptyString.optional()
2731
2761
  });
2732
- var KayUiAppHostCapability = z9.enum([
2762
+ var KayUiAppHostCapability = z10.enum([
2733
2763
  "navigation.open-session",
2764
+ "artifacts.read",
2765
+ "artifacts.preview",
2734
2766
  "cost.read",
2735
2767
  // Server-rated organization billing, distinct from local/provider cost.
2736
2768
  "billing.read",
@@ -2760,9 +2792,9 @@ var KayUiAppHostCapability = z9.enum([
2760
2792
  // rearrange the workspace but never remove something the user would have to notice going missing.
2761
2793
  "workspace.arrange"
2762
2794
  ]);
2763
- var UiAppCapabilities = z9.strictObject({
2764
- endpoints: z9.array(LocalContributionId).optional(),
2765
- host: z9.array(KayUiAppHostCapability).optional()
2795
+ var UiAppCapabilities = z10.strictObject({
2796
+ endpoints: z10.array(LocalContributionId).optional(),
2797
+ host: z10.array(KayUiAppHostCapability).optional()
2766
2798
  }).superRefine((capabilities, ctx) => {
2767
2799
  for (const field of ["endpoints", "host"]) {
2768
2800
  const seen = /* @__PURE__ */ new Set();
@@ -2778,47 +2810,53 @@ var UiAppCapabilities = z9.strictObject({
2778
2810
  }
2779
2811
  }
2780
2812
  });
2781
- var UiAppContribution = z9.strictObject({
2813
+ var UiAppActivityRail = z10.strictObject({
2814
+ section: z10.enum(["primary", "plugins"]).optional(),
2815
+ order: z10.number().finite().optional(),
2816
+ icon: z10.union([NonEmptyString, z10.strictObject({ svg: NonEmptyString })]).optional()
2817
+ });
2818
+ var UiAppContribution = z10.strictObject({
2782
2819
  localId: LocalContributionId,
2783
2820
  displayName: NonEmptyString,
2784
2821
  description: NonEmptyString.optional(),
2785
2822
  icon: PackageAssetPath.optional(),
2786
- runtime: z9.literal("kay.react-app.v1"),
2787
- sdk: z9.strictObject({ range: NonEmptyString }),
2823
+ runtime: z10.literal("kay.react-app.v1"),
2824
+ sdk: z10.strictObject({ range: NonEmptyString }),
2788
2825
  entrypoint: TargetEntrypoint,
2789
- styles: z9.array(PackageAssetPath).optional(),
2790
- assets: z9.array(PackageAssetPath).optional(),
2791
- capabilities: UiAppCapabilities.optional()
2826
+ styles: z10.array(PackageAssetPath).optional(),
2827
+ assets: z10.array(PackageAssetPath).optional(),
2828
+ capabilities: UiAppCapabilities.optional(),
2829
+ activityRail: UiAppActivityRail.optional()
2792
2830
  });
2793
- var ThemeContribution = z9.strictObject({
2831
+ var ThemeContribution = z10.strictObject({
2794
2832
  localId: LocalContributionId,
2795
2833
  displayName: NonEmptyString,
2796
- appearance: z9.enum(["light", "dark"]),
2834
+ appearance: z10.enum(["light", "dark"]),
2797
2835
  tokens: PackageAssetPath
2798
2836
  });
2799
- var CommandHandler = z9.discriminatedUnion("kind", [
2800
- z9.strictObject({ kind: z9.literal("skill"), skill: LocalContributionId }),
2801
- z9.strictObject({
2802
- kind: z9.literal("tool"),
2837
+ var CommandHandler = z10.discriminatedUnion("kind", [
2838
+ z10.strictObject({ kind: z10.literal("skill"), skill: LocalContributionId }),
2839
+ z10.strictObject({
2840
+ kind: z10.literal("tool"),
2803
2841
  tool: PluginToolName,
2804
2842
  /** Positional mapping from tokenized `argsText` onto the tool's own input fields — see this
2805
2843
  * union's doc for the exact tokenize/map/last-field-absorbs rule. */
2806
- argumentFields: z9.array(NonEmptyString)
2844
+ argumentFields: z10.array(NonEmptyString)
2807
2845
  }),
2808
- z9.strictObject({
2809
- kind: z9.literal("endpoint"),
2846
+ z10.strictObject({
2847
+ kind: z10.literal("endpoint"),
2810
2848
  endpoint: LocalContributionId
2811
2849
  })
2812
2850
  ]);
2813
- var CommandContribution = z9.strictObject({
2851
+ var CommandContribution = z10.strictObject({
2814
2852
  localId: LocalContributionId,
2815
2853
  displayName: OptionalDisplayName,
2816
2854
  description: NonEmptyString,
2817
- aliases: z9.array(LocalContributionId).optional(),
2855
+ aliases: z10.array(LocalContributionId).optional(),
2818
2856
  argumentHint: NonEmptyString.optional(),
2819
2857
  handler: CommandHandler
2820
2858
  });
2821
- var PluginContributionKind = z9.enum([
2859
+ var PluginContributionKind = z10.enum([
2822
2860
  "tool",
2823
2861
  "converter",
2824
2862
  "uriModule",
@@ -2873,7 +2911,7 @@ function pluginIconShape(svg) {
2873
2911
  }
2874
2912
 
2875
2913
  // packages/plugin-protocol/dist/manifest.js
2876
- import { z as z10 } from "zod";
2914
+ import { z as z11 } from "zod";
2877
2915
 
2878
2916
  // packages/plugin-protocol/dist/synthetic-contributions.js
2879
2917
  function resolveConfigSectionContributionLocalId(section) {
@@ -2893,34 +2931,34 @@ var KAY_UI_NATIVE_EVENT_SUBSCRIPTIONS = [
2893
2931
  "native:renderer.contributions.changed"
2894
2932
  ];
2895
2933
  var KAY_UI_NATIVE_EVENT_ALLOWLIST = new Set(KAY_UI_NATIVE_EVENT_SUBSCRIPTIONS);
2896
- var KayAgentTargetManifest = z10.strictObject({
2934
+ var KayAgentTargetManifest = z11.strictObject({
2897
2935
  entrypoint: TargetEntrypoint,
2898
- contributes: z10.strictObject({
2899
- tools: z10.array(ToolContribution).optional(),
2900
- converters: z10.array(ConverterContribution).optional(),
2901
- uriModules: z10.array(UriModuleContribution).optional(),
2936
+ contributes: z11.strictObject({
2937
+ tools: z11.array(ToolContribution).optional(),
2938
+ converters: z11.array(ConverterContribution).optional(),
2939
+ uriModules: z11.array(UriModuleContribution).optional(),
2902
2940
  // Host-composed artifact-backed schemes (see `ArtifactUriModuleContribution`): the plugin
2903
2941
  // declares scheme + editability; the daemon binds each to the kernel's artifact lifecycle
2904
2942
  // per session. Separate from `uriModules` (plugin-implemented backends) precisely because
2905
2943
  // the plugin registers NOTHING for these at activation.
2906
- artifactUriModules: z10.array(ArtifactUriModuleContribution).optional(),
2907
- cliBindings: z10.array(CliBindingContribution).optional(),
2944
+ artifactUriModules: z11.array(ArtifactUriModuleContribution).optional(),
2945
+ cliBindings: z11.array(CliBindingContribution).optional(),
2908
2946
  // Which git hosts this plugin's credential serves (see `GitHostContribution`): a
2909
2947
  // declaration, so a plugin for any git backend gets credentialed clones without
2910
2948
  // the daemon learning its name. Sibling of `cliBindings` because both answer the
2911
2949
  // same question — which of this plugin's auth services a host-side consumer
2912
2950
  // resolves — for two different transports.
2913
- gitHosts: z10.array(GitHostContribution).optional(),
2914
- resources: z10.array(ResourceContribution).optional(),
2915
- skills: z10.array(SkillContribution).optional(),
2916
- searchProviders: z10.array(SearchProviderContribution).optional(),
2917
- interactionDrivers: z10.array(InteractionDriverContribution).optional(),
2918
- entityResolvers: z10.array(EntityResolverContribution).optional(),
2919
- renderers: z10.array(AgentRenderContribution).optional(),
2951
+ gitHosts: z11.array(GitHostContribution).optional(),
2952
+ resources: z11.array(ResourceContribution).optional(),
2953
+ skills: z11.array(SkillContribution).optional(),
2954
+ searchProviders: z11.array(SearchProviderContribution).optional(),
2955
+ interactionDrivers: z11.array(InteractionDriverContribution).optional(),
2956
+ entityResolvers: z11.array(EntityResolverContribution).optional(),
2957
+ renderers: z11.array(AgentRenderContribution).optional(),
2920
2958
  // Handler restricted to skill | tool by the manifest-level refinement below (see
2921
2959
  // `CommandContribution`'s doc for why the restriction is not expressed in the type, and
2922
2960
  // `CommandHandler`'s doc for why there is no promptTemplate variant to declare here).
2923
- commands: z10.array(CommandContribution).optional()
2961
+ commands: z11.array(CommandContribution).optional()
2924
2962
  }).optional(),
2925
2963
  /**
2926
2964
  * The plugin's primer skill — the `localId` of one of its own declared
@@ -2966,55 +3004,55 @@ var KayAgentTargetManifest = z10.strictObject({
2966
3004
  * acquisition, not declared here, so there is nothing for the resolved contract to mint a
2967
3005
  * `globalId` for at parse time.
2968
3006
  */
2969
- skillSources: z10.array(PluginSkillSourceDeclaration).optional()
3007
+ skillSources: z11.array(PluginSkillSourceDeclaration).optional()
2970
3008
  });
2971
- var KayAppTargetManifest = z10.strictObject({
3009
+ var KayAppTargetManifest = z11.strictObject({
2972
3010
  // Optional, like `kay.ui`'s: a target may carry only declarative `contributes` (e.g. a plugin
2973
3011
  // that ships nothing but `mcpServers`) with no app-lifetime module for the host to load.
2974
3012
  entrypoint: TargetEntrypoint.optional(),
2975
- contributes: z10.strictObject({
3013
+ contributes: z11.strictObject({
2976
3014
  // Session tools implemented by the app-lifetime activation (registered once, injected into
2977
3015
  // every session with a host-stamped session context) — the tool counterpart of `uriModules`
2978
3016
  // below. Same descriptor shape as kay.agent tools; `toolName` shares ONE flat session
2979
3017
  // namespace with them (enforced by the manifest-level refinement below).
2980
- tools: z10.array(ToolContribution).optional(),
2981
- endpoints: z10.array(EndpointContribution).optional(),
2982
- uriModules: z10.array(AppUriModuleContribution).optional(),
2983
- dataSources: z10.array(AppDataSourceContribution).optional(),
2984
- whiteboardTypes: z10.array(WhiteboardTypeContribution).optional(),
2985
- eventDefinitions: z10.array(PluginEventDefinitionContribution).optional(),
3018
+ tools: z11.array(ToolContribution).optional(),
3019
+ endpoints: z11.array(EndpointContribution).optional(),
3020
+ uriModules: z11.array(AppUriModuleContribution).optional(),
3021
+ dataSources: z11.array(AppDataSourceContribution).optional(),
3022
+ whiteboardTypes: z11.array(WhiteboardTypeContribution).optional(),
3023
+ eventDefinitions: z11.array(PluginEventDefinitionContribution).optional(),
2986
3024
  // Default notification rules over this plugin's own `eventDefinitions`; seeded by the host
2987
3025
  // (see `PluginNotificationRuleContribution`).
2988
- notificationRules: z10.array(PluginNotificationRuleContribution).optional(),
2989
- eventSubscriptions: z10.array(AppEventSubscription).optional(),
2990
- deviceDelegations: z10.array(DeviceDelegationContribution).optional(),
2991
- corpusConsumers: z10.array(CorpusContribution).optional(),
2992
- contextContributors: z10.array(ContextContributorContribution).optional(),
3026
+ notificationRules: z11.array(PluginNotificationRuleContribution).optional(),
3027
+ eventSubscriptions: z11.array(AppEventSubscription).optional(),
3028
+ deviceDelegations: z11.array(DeviceDelegationContribution).optional(),
3029
+ corpusConsumers: z11.array(CorpusContribution).optional(),
3030
+ contextContributors: z11.array(ContextContributorContribution).optional(),
2993
3031
  // Vendored MCP servers this plugin ships (see `McpServerContributions`). Each is hosted only
2994
3032
  // for a plugin holding `mcp.host-server` for its name and URL; that is decided at
2995
3033
  // composition, not here (see ARCHITECTURE.md "Validation Law").
2996
3034
  mcpServers: McpServerContributions.optional(),
2997
3035
  // Handler restricted to endpoint-only by the manifest-level refinement below.
2998
- commands: z10.array(CommandContribution).optional()
3036
+ commands: z11.array(CommandContribution).optional()
2999
3037
  }).optional()
3000
3038
  });
3001
- var KayUiTargetManifest = z10.strictObject({
3039
+ var KayUiTargetManifest = z11.strictObject({
3002
3040
  entrypoint: TargetEntrypoint.optional(),
3003
- contributes: z10.strictObject({
3004
- commands: z10.array(UiCommandContribution).optional(),
3005
- slots: z10.array(UiSlotContribution).optional(),
3006
- settingsPanels: z10.array(SettingsPanelContribution).optional(),
3007
- resultRenderers: z10.array(ResultRendererContribution).optional(),
3008
- referencePresentations: z10.array(ReferencePresentationContribution).optional(),
3009
- views: z10.array(RichViewContribution).optional(),
3010
- apps: z10.array(UiAppContribution).optional(),
3011
- themes: z10.array(ThemeContribution).optional(),
3012
- eventSubscriptions: z10.array(UiEventSubscriptionContribution).optional(),
3013
- dataMaterializers: z10.array(AppDataMaterializerContribution).optional()
3041
+ contributes: z11.strictObject({
3042
+ commands: z11.array(UiCommandContribution).optional(),
3043
+ slots: z11.array(UiSlotContribution).optional(),
3044
+ settingsPanels: z11.array(SettingsPanelContribution).optional(),
3045
+ resultRenderers: z11.array(ResultRendererContribution).optional(),
3046
+ referencePresentations: z11.array(ReferencePresentationContribution).optional(),
3047
+ views: z11.array(RichViewContribution).optional(),
3048
+ apps: z11.array(UiAppContribution).optional(),
3049
+ themes: z11.array(ThemeContribution).optional(),
3050
+ eventSubscriptions: z11.array(UiEventSubscriptionContribution).optional(),
3051
+ dataMaterializers: z11.array(AppDataMaterializerContribution).optional()
3014
3052
  }).optional()
3015
3053
  });
3016
- var PluginConfigScope = z10.enum(["global", "project", "agent"]);
3017
- var PluginConfigSectionManifest = z10.strictObject({
3054
+ var PluginConfigScope = z11.enum(["global", "project", "agent"]);
3055
+ var PluginConfigSectionManifest = z11.strictObject({
3018
3056
  section: NonEmptyString.optional(),
3019
3057
  schema: JsonSchema,
3020
3058
  /**
@@ -3032,25 +3070,25 @@ var PluginConfigSectionManifest = z10.strictObject({
3032
3070
  * is the baseline every section has; `agent` has no runtime mapping (the
3033
3071
  * agent/entity fold is downstream of the document protocol).
3034
3072
  */
3035
- scopes: z10.array(PluginConfigScope).optional()
3073
+ scopes: z11.array(PluginConfigScope).optional()
3036
3074
  });
3037
- var PluginConfigManifest = z10.array(PluginConfigSectionManifest).min(1);
3075
+ var PluginConfigManifest = z11.array(PluginConfigSectionManifest).min(1);
3038
3076
  function configSectionKeysForManifest(manifest) {
3039
3077
  return manifest.config?.map((config) => config.section ?? `plugins.${manifest.id}`) ?? [];
3040
3078
  }
3041
- var PluginStorageManifest = z10.strictObject({
3042
- sqlite: z10.strictObject({
3043
- enabled: z10.boolean(),
3044
- ownerTarget: z10.literal("kay.app").optional(),
3079
+ var PluginStorageManifest = z11.strictObject({
3080
+ sqlite: z11.strictObject({
3081
+ enabled: z11.boolean(),
3082
+ ownerTarget: z11.literal("kay.app").optional(),
3045
3083
  migrations: NonEmptyString.optional()
3046
3084
  }).optional(),
3047
- dataDir: z10.strictObject({
3048
- enabled: z10.boolean(),
3049
- ownerTarget: z10.literal("kay.app").optional()
3085
+ dataDir: z11.strictObject({
3086
+ enabled: z11.boolean(),
3087
+ ownerTarget: z11.literal("kay.app").optional()
3050
3088
  }).optional()
3051
3089
  });
3052
- var PluginOAuthClientSupplier = z10.enum(["kay", "user"]);
3053
- var PluginProvisioningProbe = z10.strictObject({
3090
+ var PluginOAuthClientSupplier = z11.enum(["kay", "user"]);
3091
+ var PluginProvisioningProbe = z11.strictObject({
3054
3092
  /**
3055
3093
  * The API endpoint that answers the question. The host sends the service's OWN credential here,
3056
3094
  * so this must belong to the provider that minted it — enforced by the daemon against the
@@ -3058,13 +3096,13 @@ var PluginProvisioningProbe = z10.strictObject({
3058
3096
  */
3059
3097
  url: HttpsUrl,
3060
3098
  /** Absent ⇒ `GET`. */
3061
- method: z10.enum(["GET"]).optional(),
3099
+ method: z11.enum(["GET"]).optional(),
3062
3100
  /**
3063
3101
  * The statuses that make the response a VERDICT at all. Anything else (a 401 from a stale
3064
3102
  * token, a 5xx, a rate limit) means the probe learned nothing and reports `unknown` — never
3065
3103
  * `unsatisfied`, which would tell a user to go fix setup that is fine.
3066
3104
  */
3067
- verdictStatuses: z10.array(SignedInStatusCode).min(1),
3105
+ verdictStatuses: z11.array(SignedInStatusCode).min(1),
3068
3106
  /**
3069
3107
  * Dot-path to a JSON array in the response body that must be NON-EMPTY for the requirement to
3070
3108
  * count as satisfied (e.g. `installations`). Absent means a verdict status alone is enough.
@@ -3073,7 +3111,7 @@ var PluginProvisioningProbe = z10.strictObject({
3073
3111
  */
3074
3112
  nonEmptyArrayAt: NonEmptyString.optional()
3075
3113
  });
3076
- var PluginProvisioningRequirement = z10.strictObject({
3114
+ var PluginProvisioningRequirement = z11.strictObject({
3077
3115
  /** Stable id, unique within the scheme. */
3078
3116
  id: LocalContributionId,
3079
3117
  /** Human-facing requirement name, e.g. "GitHub App installation". */
@@ -3090,7 +3128,7 @@ var PluginProvisioningRequirement = z10.strictObject({
3090
3128
  probe: PluginProvisioningProbe
3091
3129
  });
3092
3130
  var PluginProvisioningField = {
3093
- provisioning: z10.array(PluginProvisioningRequirement).optional()
3131
+ provisioning: z11.array(PluginProvisioningRequirement).optional()
3094
3132
  };
3095
3133
  var PluginAuthSchemeDescriptionFields = {
3096
3134
  /** Human-facing flow name; the runtime scheme name is the fallback. */
@@ -3103,19 +3141,19 @@ var PluginAuthSchemeDescriptionFields = {
3103
3141
  */
3104
3142
  summary: NonEmptyString.optional()
3105
3143
  };
3106
- var PluginAuthSchemeOAuthPkce = z10.strictObject({
3144
+ var PluginAuthSchemeOAuthPkce = z11.strictObject({
3107
3145
  ...PluginProvisioningField,
3108
3146
  ...PluginAuthSchemeDescriptionFields,
3109
3147
  localId: LocalContributionId,
3110
- kind: z10.literal("oauth2"),
3111
- exchange: z10.literal("pkce"),
3148
+ kind: z11.literal("oauth2"),
3149
+ exchange: z11.literal("pkce"),
3112
3150
  /**
3113
3151
  * Unordered SET of who may supply the client — non-empty, and every entry must be distinct
3114
3152
  * (fail-closed re-assertion of the kernel's construction-time dedupe: TS exhaustiveness never
3115
3153
  * runs on an untrusted manifest, so a hand-built `["kay","kay"]` must be refused here, not
3116
3154
  * silently normalized).
3117
3155
  */
3118
- clientSuppliers: z10.array(PluginOAuthClientSupplier).nonempty().superRefine((suppliers, ctx) => {
3156
+ clientSuppliers: z11.array(PluginOAuthClientSupplier).nonempty().superRefine((suppliers, ctx) => {
3119
3157
  if (new Set(suppliers).size !== suppliers.length) {
3120
3158
  ctx.addIssue({
3121
3159
  code: "custom",
@@ -3123,53 +3161,53 @@ var PluginAuthSchemeOAuthPkce = z10.strictObject({
3123
3161
  });
3124
3162
  }
3125
3163
  }),
3126
- scopes: z10.array(NonEmptyString).optional()
3164
+ scopes: z11.array(NonEmptyString).optional()
3127
3165
  });
3128
- var PluginAuthSchemeOAuthConfidential = z10.strictObject({
3166
+ var PluginAuthSchemeOAuthConfidential = z11.strictObject({
3129
3167
  ...PluginProvisioningField,
3130
3168
  ...PluginAuthSchemeDescriptionFields,
3131
3169
  localId: LocalContributionId,
3132
- kind: z10.literal("oauth2"),
3133
- exchange: z10.literal("confidential"),
3170
+ kind: z11.literal("oauth2"),
3171
+ exchange: z11.literal("confidential"),
3134
3172
  /** Absent means `["kay"]` — a confidential exchange's secret may only ever be Bonsai's. */
3135
- clientSuppliers: z10.tuple([z10.literal("kay")]).optional(),
3136
- scopes: z10.array(NonEmptyString).optional()
3173
+ clientSuppliers: z11.tuple([z11.literal("kay")]).optional(),
3174
+ scopes: z11.array(NonEmptyString).optional()
3137
3175
  });
3138
- var PluginAuthSchemeOAuth2 = z10.discriminatedUnion("exchange", [
3176
+ var PluginAuthSchemeOAuth2 = z11.discriminatedUnion("exchange", [
3139
3177
  PluginAuthSchemeOAuthPkce,
3140
3178
  PluginAuthSchemeOAuthConfidential
3141
3179
  ]);
3142
- var PluginAuthSchemeApiKey = z10.strictObject({
3180
+ var PluginAuthSchemeApiKey = z11.strictObject({
3143
3181
  ...PluginProvisioningField,
3144
3182
  ...PluginAuthSchemeDescriptionFields,
3145
3183
  localId: LocalContributionId,
3146
- kind: z10.literal("api-key"),
3147
- scopes: z10.array(NonEmptyString).optional()
3184
+ kind: z11.literal("api-key"),
3185
+ scopes: z11.array(NonEmptyString).optional()
3148
3186
  });
3149
- var PluginAuthSchemeDelegated = z10.strictObject({
3187
+ var PluginAuthSchemeDelegated = z11.strictObject({
3150
3188
  ...PluginAuthSchemeDescriptionFields,
3151
3189
  localId: LocalContributionId,
3152
- kind: z10.literal("delegated"),
3153
- scopes: z10.array(NonEmptyString).optional()
3190
+ kind: z11.literal("delegated"),
3191
+ scopes: z11.array(NonEmptyString).optional()
3154
3192
  });
3155
- var ExternalCliArgument = z10.string().min(1).max(16384).refine((value) => ![...value].some(isUnsafeArgumentCharacter), {
3193
+ var ExternalCliArgument = z11.string().min(1).max(16384).refine((value) => ![...value].some(isUnsafeArgumentCharacter), {
3156
3194
  message: "an argument may hold tabs and line breaks, but no other control character, no invisible character and no bidirectional override"
3157
3195
  });
3158
3196
  function isUnsafeArgumentCharacter(character) {
3159
3197
  const code = character.codePointAt(0) ?? 0;
3160
3198
  return code <= 31 && code !== 9 && code !== 10 || code >= 127 && code <= 159 || code === 1564 || code >= 8203 && code <= 8207 || code === 8232 || code === 8233 || code >= 8234 && code <= 8238 || code >= 8288 && code <= 8297 || code === 65279;
3161
3199
  }
3162
- var ExternalCliCommand = z10.string().max(128).regex(/^[A-Za-z0-9][A-Za-z0-9._+-]*$/, {
3200
+ var ExternalCliCommand = z11.string().max(128).regex(/^[A-Za-z0-9][A-Za-z0-9._+-]*$/, {
3163
3201
  message: "a command is an executable's basename (letters, digits, '.', '_', '+', '-'), never a path"
3164
3202
  });
3165
3203
  var ExternalCliHint = NonEmptyString.max(2048);
3166
- var ExternalCliArguments = z10.array(ExternalCliArgument).max(64);
3167
- var PluginExternalCliConnect = z10.strictObject({
3204
+ var ExternalCliArguments = z11.array(ExternalCliArgument).max(64);
3205
+ var PluginExternalCliConnect = z11.strictObject({
3168
3206
  /** A basename the host finds on `PATH` (`osascript`, `wrangler`), never a path. */
3169
3207
  binary: ExternalCliCommand,
3170
- probe: z10.strictObject({
3208
+ probe: z11.strictObject({
3171
3209
  args: ExternalCliArguments.min(1),
3172
- timeoutMs: z10.number().int().min(1).max(12e4).optional(),
3210
+ timeoutMs: z11.number().int().min(1).max(12e4).optional(),
3173
3211
  /**
3174
3212
  * The CLI's own signed-out marker: text a failed probe's output (stderr, else stdout) contains
3175
3213
  * when the CLI is signed out. A failure that carries it is a sign-in problem, and only such a
@@ -3179,18 +3217,18 @@ var PluginExternalCliConnect = z10.strictObject({
3179
3217
  signedOutMarker: ExternalCliArgument.refine((value) => value.trim() !== "", { message: "a signed-out marker needs text beyond whitespace" }).optional()
3180
3218
  }),
3181
3219
  /** The CLI's interactive sign-in. Absent: connect only probes and reports. */
3182
- login: z10.strictObject({
3220
+ login: z11.strictObject({
3183
3221
  args: ExternalCliArguments.min(1),
3184
- timeoutMs: z10.number().int().min(1).max(6e5).optional()
3222
+ timeoutMs: z11.number().int().min(1).max(6e5).optional()
3185
3223
  }).optional(),
3186
3224
  /**
3187
3225
  * The command that installs `binary`, as an argv. Bonsai never runs it: a surface shows it, joined
3188
3226
  * for display, or hands it to an agent session that runs it behind the ordinary bash approval.
3189
3227
  * Absent for a binary the OS ships (`osascript`).
3190
3228
  */
3191
- install: z10.strictObject({ command: ExternalCliCommand, args: ExternalCliArguments }).optional(),
3229
+ install: z11.strictObject({ command: ExternalCliCommand, args: ExternalCliArguments }).optional(),
3192
3230
  /** Prose for a person: `install` when the binary is missing, `login` when the probe fails. */
3193
- hints: z10.strictObject({ install: ExternalCliHint, login: ExternalCliHint })
3231
+ hints: z11.strictObject({ install: ExternalCliHint, login: ExternalCliHint })
3194
3232
  }).superRefine((cli, ctx) => {
3195
3233
  if (cli.login !== void 0 && cli.probe.signedOutMarker === void 0) {
3196
3234
  ctx.addIssue({
@@ -3200,42 +3238,42 @@ var PluginExternalCliConnect = z10.strictObject({
3200
3238
  });
3201
3239
  }
3202
3240
  });
3203
- var PluginAuthSchemeExternalCli = z10.strictObject({
3241
+ var PluginAuthSchemeExternalCli = z11.strictObject({
3204
3242
  ...PluginAuthSchemeDescriptionFields,
3205
3243
  localId: LocalContributionId,
3206
- kind: z10.literal("external-cli"),
3207
- scopes: z10.array(NonEmptyString).optional(),
3244
+ kind: z11.literal("external-cli"),
3245
+ scopes: z11.array(NonEmptyString).optional(),
3208
3246
  cli: PluginExternalCliConnect.optional()
3209
3247
  });
3210
- var PluginAuthScheme = z10.discriminatedUnion("kind", [
3248
+ var PluginAuthScheme = z11.discriminatedUnion("kind", [
3211
3249
  PluginAuthSchemeOAuth2,
3212
3250
  PluginAuthSchemeApiKey,
3213
3251
  PluginAuthSchemeDelegated,
3214
3252
  PluginAuthSchemeExternalCli
3215
3253
  ]);
3216
- var PluginWebSessionProbe = z10.strictObject({
3254
+ var PluginWebSessionProbe = z11.strictObject({
3217
3255
  url: HttpsUrl,
3218
3256
  /** Absent ⇒ `GET`. `POST` sends an empty JSON object body. */
3219
- method: z10.enum(["GET", "POST"]).optional(),
3220
- signedInStatuses: z10.array(SignedInStatusCode).min(1)
3257
+ method: z11.enum(["GET", "POST"]).optional(),
3258
+ signedInStatuses: z11.array(SignedInStatusCode).min(1)
3221
3259
  });
3222
- var PluginWebSessionDeclaration = z10.strictObject({
3260
+ var PluginWebSessionDeclaration = z11.strictObject({
3223
3261
  /** `required`: capabilities degrade without the site login; `recommended`: it only smooths UX. */
3224
- importance: z10.enum(["required", "recommended"]),
3262
+ importance: z11.enum(["required", "recommended"]),
3225
3263
  loginUrl: HttpsUrl,
3226
- cookieDomains: z10.array(RegistrableDomain).min(1),
3264
+ cookieDomains: z11.array(RegistrableDomain).min(1),
3227
3265
  probe: PluginWebSessionProbe,
3228
- oauthVenue: z10.enum(["embedded", "external"])
3266
+ oauthVenue: z11.enum(["embedded", "external"])
3229
3267
  }).superRefine(refineWebSessionScopeConfined);
3230
- var PluginAuthService = z10.strictObject({
3268
+ var PluginAuthService = z11.strictObject({
3231
3269
  localId: LocalContributionId,
3232
3270
  displayName: NonEmptyString,
3233
- schemes: z10.array(PluginAuthScheme).min(1),
3234
- purposes: z10.array(NonEmptyString).min(1),
3271
+ schemes: z11.array(PluginAuthScheme).min(1),
3272
+ purposes: z11.array(NonEmptyString).min(1),
3235
3273
  webSession: PluginWebSessionDeclaration.optional()
3236
3274
  });
3237
- var PluginAuthManifest = z10.strictObject({
3238
- services: z10.array(PluginAuthService).optional()
3275
+ var PluginAuthManifest = z11.strictObject({
3276
+ services: z11.array(PluginAuthService).optional()
3239
3277
  });
3240
3278
  var RETIRED_COMPATIBILITY_KEYS = ["policy"];
3241
3279
  function stripRetiredCompatibilityKeys(value) {
@@ -3247,8 +3285,8 @@ function stripRetiredCompatibilityKeys(value) {
3247
3285
  delete remaining[key];
3248
3286
  return remaining;
3249
3287
  }
3250
- var PluginCompatibilityManifest = z10.preprocess(stripRetiredCompatibilityKeys, z10.strictObject({
3251
- supportedProtocols: z10.array(KayPluginProtocolVersion).optional(),
3288
+ var PluginCompatibilityManifest = z11.preprocess(stripRetiredCompatibilityKeys, z11.strictObject({
3289
+ supportedProtocols: z11.array(KayPluginProtocolVersion).optional(),
3252
3290
  minKayVersion: NonEmptyString.optional(),
3253
3291
  sdk: NonEmptyString.optional()
3254
3292
  }));
@@ -3264,8 +3302,8 @@ function retiredCompatibilityKeysIn(rawManifest) {
3264
3302
  var KayVersionString = NonEmptyString.regex(SEMVER_PATTERN, {
3265
3303
  message: "version must be semver, for example 1.2.3"
3266
3304
  });
3267
- var KayPluginManifestV1 = z10.strictObject({
3268
- protocol: z10.literal(KAY_PLUGIN_PROTOCOL_VERSION),
3305
+ var KayPluginManifestV1 = z11.strictObject({
3306
+ protocol: z11.literal(KAY_PLUGIN_PROTOCOL_VERSION),
3269
3307
  id: PluginId,
3270
3308
  displayName: NonEmptyString,
3271
3309
  version: KayVersionString,
@@ -3295,8 +3333,8 @@ var KayPluginManifestV1 = z10.strictObject({
3295
3333
  icon: PackageAssetPath.optional(),
3296
3334
  iconDark: PackageAssetPath.optional(),
3297
3335
  namespace: PluginNamespace.optional(),
3298
- targets: z10.strictObject({
3299
- kay: z10.strictObject({
3336
+ targets: z11.strictObject({
3337
+ kay: z11.strictObject({
3300
3338
  agent: KayAgentTargetManifest.optional(),
3301
3339
  app: KayAppTargetManifest.optional(),
3302
3340
  ui: KayUiTargetManifest.optional()
@@ -3313,15 +3351,15 @@ var KayPluginManifestV1 = z10.strictObject({
3313
3351
  * schemes then report `ownedByBonsai`. Honoured only for a plugin that ships with Bonsai: the
3314
3352
  * host reads any other plugin's flag as false. Absent ⇒ false.
3315
3353
  */
3316
- ownedByBonsai: z10.boolean().optional(),
3354
+ ownedByBonsai: z11.boolean().optional(),
3317
3355
  /**
3318
3356
  * Explicit plugin-level dependencies — other plugins this plugin requires to be present in the
3319
3357
  * composed roster. At composition time the runtime checks each id against the accepted
3320
3358
  * registration list and derives a provenance-complete dependency graph (together with implicit
3321
3359
  * auth-service edges from `consumesAuthServices`). Absent ⇒ no explicit dependencies.
3322
3360
  */
3323
- dependencies: z10.strictObject({
3324
- plugins: z10.array(PluginId).optional()
3361
+ dependencies: z11.strictObject({
3362
+ plugins: z11.array(PluginId).optional()
3325
3363
  }).optional()
3326
3364
  }).superRefine((manifest, ctx) => {
3327
3365
  const authServices = new Set(manifest.auth?.services?.map((service) => service.localId) ?? []);
@@ -4006,7 +4044,7 @@ function pushContributionIds(output, path, items) {
4006
4044
  }
4007
4045
 
4008
4046
  // packages/plugin-protocol/dist/plugin-directory-verdict.js
4009
- import { z as z12 } from "zod";
4047
+ import { z as z13 } from "zod";
4010
4048
 
4011
4049
  // packages/plugin-protocol/dist/plugin-load-diagnostic.js
4012
4050
  var PLUGIN_DIAGNOSTIC_MESSAGE_CAP = 300;
@@ -4015,36 +4053,44 @@ function boundPluginDiagnosticMessage(message) {
4015
4053
  }
4016
4054
 
4017
4055
  // packages/plugin-protocol/dist/resolved-contract.js
4018
- import { z as z11 } from "zod";
4019
- var ResolvedPluginContributionId = z11.strictObject({
4056
+ import { z as z12 } from "zod";
4057
+ var ResolvedPluginContributionId = z12.strictObject({
4020
4058
  target: PluginTargetName,
4021
4059
  kind: PluginContributionKind,
4022
- localId: LocalContributionId,
4060
+ localId: PluginEventLocalId,
4023
4061
  globalId: GlobalContributionId
4062
+ }).superRefine((value, ctx) => {
4063
+ if (value.kind !== "eventDefinition" && !LocalContributionId.safeParse(value.localId).success) {
4064
+ ctx.addIssue({
4065
+ code: "custom",
4066
+ path: ["localId"],
4067
+ message: "Only event definitions may use dotted local ids"
4068
+ });
4069
+ }
4024
4070
  });
4025
- var ResolvedKayAgentTool = z11.strictObject({
4071
+ var ResolvedKayAgentTool = z12.strictObject({
4026
4072
  localId: LocalContributionId,
4027
4073
  globalId: GlobalContributionId,
4028
4074
  toolName: PluginToolName
4029
4075
  });
4030
4076
  var ResolvedKayAppTool = ResolvedKayAgentTool;
4031
- var ResolvedKayAppDataSource = z11.strictObject({
4077
+ var ResolvedKayAppDataSource = z12.strictObject({
4032
4078
  localId: LocalContributionId,
4033
4079
  globalId: GlobalContributionId,
4034
- scope: z11.enum(["runtime", "account", "session"]),
4035
- snapshot: z11.strictObject({
4036
- version: z11.number().int().positive(),
4037
- schema: z11.record(z11.string(), z11.unknown())
4080
+ scope: z12.enum(["runtime", "account", "session"]),
4081
+ snapshot: z12.strictObject({
4082
+ version: z12.number().int().positive(),
4083
+ schema: z12.record(z12.string(), z12.unknown())
4038
4084
  }),
4039
- change: z11.strictObject({
4040
- version: z11.number().int().positive(),
4041
- schema: z11.record(z11.string(), z11.unknown()),
4042
- semantics: z11.discriminatedUnion("kind", [
4043
- z11.strictObject({ kind: z11.literal("incremental") }),
4044
- z11.strictObject({
4045
- kind: z11.literal("snapshot-replacement"),
4046
- maxEncodedBytes: z11.number().int().positive(),
4047
- rationale: z11.string().trim().min(1).max(1024)
4085
+ change: z12.strictObject({
4086
+ version: z12.number().int().positive(),
4087
+ schema: z12.record(z12.string(), z12.unknown()),
4088
+ semantics: z12.discriminatedUnion("kind", [
4089
+ z12.strictObject({ kind: z12.literal("incremental") }),
4090
+ z12.strictObject({
4091
+ kind: z12.literal("snapshot-replacement"),
4092
+ maxEncodedBytes: z12.number().int().positive(),
4093
+ rationale: z12.string().trim().min(1).max(1024)
4048
4094
  })
4049
4095
  ]).optional()
4050
4096
  }),
@@ -4058,66 +4104,66 @@ var ResolvedKayAppDataSource = z11.strictObject({
4058
4104
  });
4059
4105
  }
4060
4106
  });
4061
- var ResolvedKayAppWhiteboardType = z11.strictObject({
4107
+ var ResolvedKayAppWhiteboardType = z12.strictObject({
4062
4108
  localId: LocalContributionId,
4063
4109
  globalId: GlobalContributionId,
4064
4110
  displayName: NonEmptyString,
4065
- schemaVersion: z11.number().int().positive(),
4111
+ schemaVersion: z12.number().int().positive(),
4066
4112
  storage: WhiteboardTypeStorage,
4067
4113
  valueSchema: JsonSchema,
4068
- presentation: z11.strictObject({
4114
+ presentation: z12.strictObject({
4069
4115
  app: GlobalContributionId
4070
4116
  }).optional()
4071
4117
  });
4072
- var ResolvedKayAppMcpServer = z11.strictObject({
4118
+ var ResolvedKayAppMcpServer = z12.strictObject({
4073
4119
  name: LocalContributionId,
4074
4120
  pluginId: PluginId,
4075
4121
  url: McpServerUrl,
4076
4122
  auth: McpServerAuthMode,
4077
4123
  authServiceId: GlobalContributionId.optional()
4078
4124
  });
4079
- var ResolvedKayAgentUriModule = z11.strictObject({
4125
+ var ResolvedKayAgentUriModule = z12.strictObject({
4080
4126
  localId: LocalContributionId,
4081
4127
  globalId: GlobalContributionId,
4082
- schemes: z11.array(UriScheme).min(1),
4128
+ schemes: z12.array(UriScheme).min(1),
4083
4129
  filesystemBacking: UriFilesystemBacking.optional(),
4084
4130
  /** Mirrors `UriModuleContribution.knownResources` (host-side recording opt-in). */
4085
- knownResources: z11.literal(true).optional()
4131
+ knownResources: z12.literal(true).optional()
4086
4132
  });
4087
- var ResolvedKayAgentArtifactUriModule = z11.strictObject({
4133
+ var ResolvedKayAgentArtifactUriModule = z12.strictObject({
4088
4134
  localId: LocalContributionId,
4089
4135
  globalId: GlobalContributionId,
4090
4136
  scheme: UriScheme,
4091
- editable: z11.boolean(),
4092
- listable: z11.boolean(),
4093
- deletable: z11.boolean(),
4094
- appendable: z11.boolean(),
4095
- storageScope: z11.enum(["session", "family"])
4137
+ editable: z12.boolean(),
4138
+ listable: z12.boolean(),
4139
+ deletable: z12.boolean(),
4140
+ appendable: z12.boolean(),
4141
+ storageScope: z12.enum(["session", "family"])
4096
4142
  });
4097
- var ResolvedKayAgentEntityResolver = z11.strictObject({
4143
+ var ResolvedKayAgentEntityResolver = z12.strictObject({
4098
4144
  localId: LocalContributionId,
4099
4145
  globalId: GlobalContributionId,
4100
4146
  displayName: NonEmptyString.optional(),
4101
4147
  uriModule: GlobalContributionId,
4102
- entityTypes: z11.array(NonEmptyString).min(1),
4148
+ entityTypes: z12.array(NonEmptyString).min(1),
4103
4149
  uriHint: NonEmptyString
4104
4150
  });
4105
- var ResolvedKayAgentGitHostClaim = z11.strictObject({
4151
+ var ResolvedKayAgentGitHostClaim = z12.strictObject({
4106
4152
  host: GitHostName,
4107
4153
  authServiceId: GlobalContributionId,
4108
4154
  /** Manifest-declared order; the clone ladder tries them in sequence. */
4109
- authSchemeIds: z11.array(GlobalContributionId).min(1),
4155
+ authSchemeIds: z12.array(GlobalContributionId).min(1),
4110
4156
  /** Non-secret display copy for the claiming service, for clone failure text. */
4111
- authServiceDisplayName: z11.string(),
4157
+ authServiceDisplayName: z12.string(),
4112
4158
  basicAuthUser: GitBasicAuthUser
4113
4159
  });
4114
- var ResolvedKayAgentConverter = z11.strictObject({
4160
+ var ResolvedKayAgentConverter = z12.strictObject({
4115
4161
  localId: LocalContributionId,
4116
4162
  globalId: GlobalContributionId,
4117
- mimeTypes: z11.array(MimeTypeString).min(1),
4118
- extensions: z11.array(FileExtensionToken).min(1).optional()
4163
+ mimeTypes: z12.array(MimeTypeString).min(1),
4164
+ extensions: z12.array(FileExtensionToken).min(1).optional()
4119
4165
  });
4120
- var ResolvedReferencePresentation = z11.strictObject({
4166
+ var ResolvedReferencePresentation = z12.strictObject({
4121
4167
  localId: LocalContributionId,
4122
4168
  globalId: GlobalContributionId,
4123
4169
  uriModule: GlobalContributionId,
@@ -4125,9 +4171,9 @@ var ResolvedReferencePresentation = z11.strictObject({
4125
4171
  open: ReferenceOpenBehavior,
4126
4172
  /** MIME-specific resource kinds; absent keys use the base presentation. */
4127
4173
  variants: ReferencePresentationVariants.optional(),
4128
- claims: z11.array(ReferencePresentationUrlClaim).optional()
4174
+ claims: z12.array(ReferencePresentationUrlClaim).optional()
4129
4175
  });
4130
- var ResolvedPluginProvisioningRequirement = z11.strictObject({
4176
+ var ResolvedPluginProvisioningRequirement = z12.strictObject({
4131
4177
  id: LocalContributionId,
4132
4178
  displayName: NonEmptyString,
4133
4179
  description: NonEmptyString,
@@ -4137,15 +4183,15 @@ var ResolvedPluginProvisioningRequirement = z11.strictObject({
4137
4183
  * URL degrades to "Reconnect" in the UI instead of a broken link.
4138
4184
  */
4139
4185
  remediationUrl: HttpsUrl.optional(),
4140
- probe: z11.strictObject({
4186
+ probe: z12.strictObject({
4141
4187
  url: HttpsUrl,
4142
- method: z11.enum(["GET"]),
4143
- verdictStatuses: z11.array(SignedInStatusCode).min(1),
4188
+ method: z12.enum(["GET"]),
4189
+ verdictStatuses: z12.array(SignedInStatusCode).min(1),
4144
4190
  nonEmptyArrayAt: NonEmptyString.optional()
4145
4191
  })
4146
4192
  });
4147
4193
  var ResolvedProvisioningField = {
4148
- provisioning: z11.array(ResolvedPluginProvisioningRequirement).optional()
4194
+ provisioning: z12.array(ResolvedPluginProvisioningRequirement).optional()
4149
4195
  };
4150
4196
  var ResolvedPluginAuthSchemeDescriptionFields = {
4151
4197
  displayName: NonEmptyString.optional(),
@@ -4157,98 +4203,99 @@ var ResolvedPluginAuthSchemeOAuthBase = {
4157
4203
  ...ResolvedPluginAuthSchemeDescriptionFields,
4158
4204
  localId: LocalContributionId,
4159
4205
  globalId: GlobalContributionId,
4160
- kind: z11.literal("oauth2"),
4161
- scopes: z11.array(z11.string()).optional()
4206
+ kind: z12.literal("oauth2"),
4207
+ scopes: z12.array(z12.string()).optional()
4162
4208
  };
4163
- var ResolvedPluginAuthSchemeOAuthPkce = z11.strictObject({
4209
+ var ResolvedPluginAuthSchemeOAuthPkce = z12.strictObject({
4164
4210
  ...ResolvedPluginAuthSchemeOAuthBase,
4165
- exchange: z11.literal("pkce"),
4166
- clientSuppliers: z11.array(PluginOAuthClientSupplier).nonempty()
4211
+ exchange: z12.literal("pkce"),
4212
+ clientSuppliers: z12.array(PluginOAuthClientSupplier).nonempty()
4167
4213
  });
4168
- var ResolvedPluginAuthSchemeOAuthConfidential = z11.strictObject({
4214
+ var ResolvedPluginAuthSchemeOAuthConfidential = z12.strictObject({
4169
4215
  ...ResolvedPluginAuthSchemeOAuthBase,
4170
- exchange: z11.literal("confidential"),
4171
- clientSuppliers: z11.tuple([z11.literal("kay")])
4216
+ exchange: z12.literal("confidential"),
4217
+ clientSuppliers: z12.tuple([z12.literal("kay")])
4172
4218
  });
4173
- var ResolvedPluginAuthSchemeOAuth2 = z11.discriminatedUnion("exchange", [
4219
+ var ResolvedPluginAuthSchemeOAuth2 = z12.discriminatedUnion("exchange", [
4174
4220
  ResolvedPluginAuthSchemeOAuthPkce,
4175
4221
  ResolvedPluginAuthSchemeOAuthConfidential
4176
4222
  ]);
4177
- var ResolvedPluginAuthSchemeApiKey = z11.strictObject({
4223
+ var ResolvedPluginAuthSchemeApiKey = z12.strictObject({
4178
4224
  ...ResolvedProvisioningField,
4179
4225
  ...ResolvedPluginAuthSchemeDescriptionFields,
4180
4226
  localId: LocalContributionId,
4181
4227
  globalId: GlobalContributionId,
4182
- kind: z11.literal("api-key"),
4183
- scopes: z11.array(z11.string()).optional()
4228
+ kind: z12.literal("api-key"),
4229
+ scopes: z12.array(z12.string()).optional()
4184
4230
  });
4185
- var ResolvedPluginAuthSchemeDelegated = z11.strictObject({
4231
+ var ResolvedPluginAuthSchemeDelegated = z12.strictObject({
4186
4232
  ...ResolvedPluginAuthSchemeDescriptionFields,
4187
4233
  localId: LocalContributionId,
4188
4234
  globalId: GlobalContributionId,
4189
- kind: z11.literal("delegated"),
4190
- scopes: z11.array(z11.string()).optional()
4235
+ kind: z12.literal("delegated"),
4236
+ scopes: z12.array(z12.string()).optional()
4191
4237
  });
4192
- var ResolvedPluginAuthSchemeExternalCli = z11.strictObject({
4238
+ var ResolvedPluginAuthSchemeExternalCli = z12.strictObject({
4193
4239
  ...ResolvedPluginAuthSchemeDescriptionFields,
4194
4240
  localId: LocalContributionId,
4195
4241
  globalId: GlobalContributionId,
4196
- kind: z11.literal("external-cli"),
4197
- scopes: z11.array(z11.string()).optional(),
4242
+ kind: z12.literal("external-cli"),
4243
+ scopes: z12.array(z12.string()).optional(),
4198
4244
  /** The manifest's connect facts, verbatim. */
4199
4245
  cli: PluginExternalCliConnect.optional()
4200
4246
  });
4201
- var ResolvedPluginAuthScheme = z11.discriminatedUnion("kind", [
4247
+ var ResolvedPluginAuthScheme = z12.discriminatedUnion("kind", [
4202
4248
  ResolvedPluginAuthSchemeOAuth2,
4203
4249
  ResolvedPluginAuthSchemeApiKey,
4204
4250
  ResolvedPluginAuthSchemeDelegated,
4205
4251
  ResolvedPluginAuthSchemeExternalCli
4206
4252
  ]);
4207
- var ResolvedPluginWebSession = z11.strictObject({
4208
- importance: z11.enum(["required", "recommended"]),
4253
+ var ResolvedPluginWebSession = z12.strictObject({
4254
+ importance: z12.enum(["required", "recommended"]),
4209
4255
  loginUrl: HttpsUrl,
4210
- cookieDomains: z11.array(RegistrableDomain).min(1),
4211
- probe: z11.strictObject({
4256
+ cookieDomains: z12.array(RegistrableDomain).min(1),
4257
+ probe: z12.strictObject({
4212
4258
  url: HttpsUrl,
4213
- method: z11.enum(["GET", "POST"]),
4214
- signedInStatuses: z11.array(SignedInStatusCode).min(1)
4259
+ method: z12.enum(["GET", "POST"]),
4260
+ signedInStatuses: z12.array(SignedInStatusCode).min(1)
4215
4261
  }),
4216
- oauthVenue: z11.enum(["embedded", "external"])
4262
+ oauthVenue: z12.enum(["embedded", "external"])
4217
4263
  }).superRefine(refineWebSessionScopeConfined);
4218
- var ResolvedPluginAuthService = z11.strictObject({
4264
+ var ResolvedPluginAuthService = z12.strictObject({
4219
4265
  localId: LocalContributionId,
4220
4266
  globalId: GlobalContributionId,
4221
- displayName: z11.string(),
4222
- schemes: z11.array(ResolvedPluginAuthScheme).min(1),
4223
- purposes: z11.array(z11.string()).min(1),
4267
+ displayName: z12.string(),
4268
+ schemes: z12.array(ResolvedPluginAuthScheme).min(1),
4269
+ purposes: z12.array(z12.string()).min(1),
4224
4270
  /** The service's browser half, when the manifest declares one. */
4225
4271
  webSession: ResolvedPluginWebSession.optional()
4226
4272
  });
4227
- var ResolvedKayUiAppEndpointCapability = z11.strictObject({
4273
+ var ResolvedKayUiAppEndpointCapability = z12.strictObject({
4228
4274
  localId: LocalContributionId,
4229
4275
  globalId: GlobalContributionId
4230
4276
  });
4231
- var ResolvedKayUiApp = z11.strictObject({
4277
+ var ResolvedKayUiApp = z12.strictObject({
4232
4278
  localId: LocalContributionId,
4233
4279
  globalId: GlobalContributionId,
4234
4280
  displayName: NonEmptyString,
4281
+ activityRail: UiAppActivityRail.optional(),
4235
4282
  description: NonEmptyString.optional(),
4236
4283
  icon: PackageAssetPath.optional(),
4237
- runtime: z11.literal("kay.react-app.v1"),
4238
- sdk: z11.strictObject({ range: NonEmptyString }),
4284
+ runtime: z12.literal("kay.react-app.v1"),
4285
+ sdk: z12.strictObject({ range: NonEmptyString }),
4239
4286
  entrypoint: TargetEntrypoint,
4240
- styles: z11.array(PackageAssetPath).optional(),
4241
- assets: z11.array(PackageAssetPath).optional(),
4242
- capabilities: z11.strictObject({
4243
- endpoints: z11.array(ResolvedKayUiAppEndpointCapability).optional(),
4244
- host: z11.array(KayUiAppHostCapability).optional()
4287
+ styles: z12.array(PackageAssetPath).optional(),
4288
+ assets: z12.array(PackageAssetPath).optional(),
4289
+ capabilities: z12.strictObject({
4290
+ endpoints: z12.array(ResolvedKayUiAppEndpointCapability).optional(),
4291
+ host: z12.array(KayUiAppHostCapability).optional()
4245
4292
  }).optional()
4246
4293
  });
4247
- var ResolvedPluginContractV1 = z11.strictObject({
4248
- protocol: z11.literal("kay.plugin.v1"),
4294
+ var ResolvedPluginContractV1 = z12.strictObject({
4295
+ protocol: z12.literal("kay.plugin.v1"),
4249
4296
  pluginId: PluginId,
4250
4297
  namespace: PluginNamespace,
4251
- contributions: z11.array(ResolvedPluginContributionId),
4298
+ contributions: z12.array(ResolvedPluginContributionId),
4252
4299
  // The deduplicated set of qualified (dotted) external auth-service ids this
4253
4300
  // plugin references, from agent uriModule `authService` refs, cliBinding
4254
4301
  // `authService` refs, and auth-grant `service` refs. Always present — a plugin
@@ -4256,30 +4303,30 @@ var ResolvedPluginContractV1 = z11.strictObject({
4256
4303
  // is a recorded dependency, not a resolution: there is no runtime plugin
4257
4304
  // loader in v1, so nothing here verifies the reference resolves within a
4258
4305
  // composed roster (a composition-time concern owned elsewhere).
4259
- consumesAuthServices: z11.array(GlobalContributionId),
4306
+ consumesAuthServices: z12.array(GlobalContributionId),
4260
4307
  // The explicit plugin-level dependency ids declared in `dependencies.plugins` on the manifest,
4261
4308
  // deduped and validated at parse time. Always present; a plugin with no explicit dependencies
4262
4309
  // carries an empty array. Composition checks each id against the accepted roster and derives the
4263
4310
  // full dependency graph together with auth-inferred edges from `consumesAuthServices`.
4264
- explicitDependencies: z11.array(PluginId),
4311
+ explicitDependencies: z12.array(PluginId),
4265
4312
  // The auth services this plugin OWNS, carrying the global ids its harness
4266
4313
  // target must register and the credential authority keys on. Always present;
4267
4314
  // a plugin that declares no `auth.services` carries an empty array. The dual
4268
4315
  // of `consumesAuthServices` (services it merely references).
4269
- authServices: z11.array(ResolvedPluginAuthService),
4316
+ authServices: z12.array(ResolvedPluginAuthService),
4270
4317
  grants: ResolvedPluginGrants.optional(),
4271
- kayAgentUriModules: z11.array(ResolvedKayAgentUriModule).optional(),
4272
- kayAgentArtifactUriModules: z11.array(ResolvedKayAgentArtifactUriModule).optional(),
4273
- kayAgentEntityResolvers: z11.array(ResolvedKayAgentEntityResolver).optional(),
4274
- kayAgentGitHostClaims: z11.array(ResolvedKayAgentGitHostClaim).optional(),
4275
- kayAgentTools: z11.array(ResolvedKayAgentTool).optional(),
4276
- kayAppTools: z11.array(ResolvedKayAppTool).optional(),
4277
- kayAppDataSources: z11.array(ResolvedKayAppDataSource).optional(),
4278
- kayAppWhiteboardTypes: z11.array(ResolvedKayAppWhiteboardType).optional(),
4279
- kayAppMcpServers: z11.array(ResolvedKayAppMcpServer).optional(),
4280
- kayAgentConverters: z11.array(ResolvedKayAgentConverter).optional(),
4281
- referencePresentations: z11.array(ResolvedReferencePresentation).optional(),
4282
- kayUiApps: z11.array(ResolvedKayUiApp).optional()
4318
+ kayAgentUriModules: z12.array(ResolvedKayAgentUriModule).optional(),
4319
+ kayAgentArtifactUriModules: z12.array(ResolvedKayAgentArtifactUriModule).optional(),
4320
+ kayAgentEntityResolvers: z12.array(ResolvedKayAgentEntityResolver).optional(),
4321
+ kayAgentGitHostClaims: z12.array(ResolvedKayAgentGitHostClaim).optional(),
4322
+ kayAgentTools: z12.array(ResolvedKayAgentTool).optional(),
4323
+ kayAppTools: z12.array(ResolvedKayAppTool).optional(),
4324
+ kayAppDataSources: z12.array(ResolvedKayAppDataSource).optional(),
4325
+ kayAppWhiteboardTypes: z12.array(ResolvedKayAppWhiteboardType).optional(),
4326
+ kayAppMcpServers: z12.array(ResolvedKayAppMcpServer).optional(),
4327
+ kayAgentConverters: z12.array(ResolvedKayAgentConverter).optional(),
4328
+ referencePresentations: z12.array(ResolvedReferencePresentation).optional(),
4329
+ kayUiApps: z12.array(ResolvedKayUiApp).optional()
4283
4330
  });
4284
4331
  function narrowestAccountSelectors() {
4285
4332
  return [{ kind: "active" }];
@@ -4637,6 +4684,7 @@ function resolveKayPluginContractV1(manifest) {
4637
4684
  const kayUiApps = manifest.targets?.kay?.ui?.contributes?.apps?.map((app) => ({
4638
4685
  localId: app.localId,
4639
4686
  globalId: resolveGlobalContributionId(namespace, app.localId),
4687
+ ...app.activityRail === void 0 ? {} : { activityRail: app.activityRail },
4640
4688
  displayName: app.displayName,
4641
4689
  ...app.description === void 0 ? {} : { description: app.description },
4642
4690
  ...app.icon === void 0 ? {} : { icon: app.icon },
@@ -4790,7 +4838,7 @@ async function judgeKayPluginDirectory(input) {
4790
4838
  if (!resolved.success) {
4791
4839
  return refuse("contract-resolve", "contract-unresolvable", `contract could not be resolved: ${resolved.error.message}`);
4792
4840
  }
4793
- const { contract, misnamedTools } = keepNamespaceDerivedTools(resolved.data);
4841
+ const { contract, misnamedTools } = keepNamespaceDerivedTools(resolved.data, new Set(input.grandfatheredToolNames?.(manifest.id) ?? []));
4794
4842
  for (const tool of misnamedTools) {
4795
4843
  warnings.push({
4796
4844
  stage: "contract-resolve",
@@ -4831,23 +4879,23 @@ function kayPluginCompatibilityAdvisories(input) {
4831
4879
  message: boundPluginDiagnosticMessage(`${manifest.displayName} (${manifest.id}) ${advisory.message}`)
4832
4880
  }));
4833
4881
  }
4834
- var ReadableCompatibility = z12.object({
4835
- supportedProtocols: z12.array(z12.string()).optional().catch(void 0),
4882
+ var ReadableCompatibility = z13.object({
4883
+ supportedProtocols: z13.array(z13.string()).optional().catch(void 0),
4836
4884
  minKayVersion: NonEmptyString.optional().catch(void 0),
4837
4885
  sdk: NonEmptyString.optional().catch(void 0)
4838
4886
  });
4839
- var ReadableManifestHead = z12.object({
4840
- id: z12.string().optional().catch(void 0),
4841
- displayName: z12.string().optional().catch(void 0),
4887
+ var ReadableManifestHead = z13.object({
4888
+ id: z13.string().optional().catch(void 0),
4889
+ displayName: z13.string().optional().catch(void 0),
4842
4890
  compatibility: ReadableCompatibility.optional().catch(void 0)
4843
4891
  });
4844
- function keepNamespaceDerivedTools(contract) {
4892
+ function keepNamespaceDerivedTools(contract, grandfathered) {
4845
4893
  const misnamedTools = [];
4846
4894
  const droppedGlobalIds = /* @__PURE__ */ new Set();
4847
4895
  const keep = (tools) => {
4848
4896
  const kept = tools?.filter((tool) => {
4849
4897
  const expected = deriveDirectoryPluginToolName(contract.namespace, tool.localId);
4850
- if (tool.toolName === expected)
4898
+ if (tool.toolName === expected || grandfathered.has(tool.toolName))
4851
4899
  return true;
4852
4900
  misnamedTools.push({
4853
4901
  localId: tool.localId,
@@ -4937,28 +4985,28 @@ function errorText(error) {
4937
4985
  }
4938
4986
 
4939
4987
  // packages/plugin-protocol/dist/session-health.js
4940
- import { z as z13 } from "zod";
4988
+ import { z as z14 } from "zod";
4941
4989
  var SESSION_HEALTH_EXTENSION_ID = "kay.session-health";
4942
4990
  var SESSION_HEALTH_ENTRY_NAME = "session_health";
4943
4991
  var SESSION_HEALTH_CUSTOM_TYPE = `ext:${SESSION_HEALTH_EXTENSION_ID}:${SESSION_HEALTH_ENTRY_NAME}`;
4944
4992
  var SESSION_HEALTH_CLASSIFIER_IDS = ["jev"];
4945
- var sessionHealthEntrySchema = z13.object({
4946
- v: z13.literal(1),
4947
- verdict: z13.enum(["well", "bad", "unknown"]),
4993
+ var sessionHealthEntrySchema = z14.object({
4994
+ v: z14.literal(1),
4995
+ verdict: z14.enum(["well", "bad", "unknown"]),
4948
4996
  /**
4949
4997
  * The model's calibrated confidence in `well`, 0..1, or null when the
4950
4998
  * classifier declined to produce one. Never exported raw: the telemetry
4951
4999
  * event carries only the decile bucket.
4952
5000
  */
4953
- p_well: z13.number().min(0).max(1).nullable(),
4954
- classifier: z13.enum(SESSION_HEALTH_CLASSIFIER_IDS),
4955
- classifier_version: z13.string().min(1).max(64),
4956
- judged_at: z13.number().int().nonnegative(),
4957
- user_entry_id: z13.string().min(1).max(256),
4958
- through_entry_id: z13.string().min(1).max(256),
4959
- usage: z13.strictObject({
4960
- input_tokens: z13.number().int().nonnegative(),
4961
- output_tokens: z13.number().int().nonnegative()
5001
+ p_well: z14.number().min(0).max(1).nullable(),
5002
+ classifier: z14.enum(SESSION_HEALTH_CLASSIFIER_IDS),
5003
+ classifier_version: z14.string().min(1).max(64),
5004
+ judged_at: z14.number().int().nonnegative(),
5005
+ user_entry_id: z14.string().min(1).max(256),
5006
+ through_entry_id: z14.string().min(1).max(256),
5007
+ usage: z14.strictObject({
5008
+ input_tokens: z14.number().int().nonnegative(),
5009
+ output_tokens: z14.number().int().nonnegative()
4962
5010
  }).optional()
4963
5011
  });
4964
5012
  function sessionHealthPWellDecile(pWell) {
@@ -4968,23 +5016,23 @@ function sessionHealthPWellDecile(pWell) {
4968
5016
  }
4969
5017
 
4970
5018
  // packages/plugin-protocol/dist/resource-invocations.js
4971
- import { z as z14 } from "zod";
4972
- var CorpusResourceKind = z14.enum([
5019
+ import { z as z15 } from "zod";
5020
+ var CorpusResourceKind = z15.enum([
4973
5021
  "skill",
4974
5022
  "context-file",
4975
5023
  "prompt-command"
4976
5024
  ]);
4977
- var CorpusResourceInvocationCursor = z14.strictObject({
4978
- at: z14.iso.datetime({ offset: true }),
4979
- eventId: z14.string().min(1)
5025
+ var CorpusResourceInvocationCursor = z15.strictObject({
5026
+ at: z15.iso.datetime({ offset: true }),
5027
+ eventId: z15.string().min(1)
4980
5028
  });
4981
- var CorpusResourceInvocationQuery = z14.strictObject({
5029
+ var CorpusResourceInvocationQuery = z15.strictObject({
4982
5030
  kind: CorpusResourceKind,
4983
- since: z14.iso.datetime({ offset: true }),
4984
- until: z14.iso.datetime({ offset: true }),
5031
+ since: z15.iso.datetime({ offset: true }),
5032
+ until: z15.iso.datetime({ offset: true }),
4985
5033
  after: CorpusResourceInvocationCursor.optional(),
4986
- limit: z14.number().int().min(1).max(1e3).optional(),
4987
- rootCreatedByKind: z14.enum(AGENT_RUNTIME_SESSION_CREATOR_KINDS).optional()
5034
+ limit: z15.number().int().min(1).max(1e3).optional(),
5035
+ rootCreatedByKind: z15.enum(AGENT_RUNTIME_SESSION_CREATOR_KINDS).optional()
4988
5036
  }).refine((value) => Date.parse(value.since) < Date.parse(value.until), {
4989
5037
  message: "since must precede until"
4990
5038
  });
@@ -5164,14 +5212,14 @@ function skillSuggestionEvidenceItems(evidence, options = {}) {
5164
5212
  }
5165
5213
 
5166
5214
  // packages/plugin-protocol/dist/ui-app-package.js
5167
- import { z as z15 } from "zod";
5215
+ import { z as z16 } from "zod";
5168
5216
  var KAY_UI_APP_PACKAGE_PROTOCOL = "kay.ui.app-package.v1";
5169
5217
  var KAY_UI_BUNDLE_INDEX_PROTOCOL = "kay.ui.bundle-index.v1";
5170
- var KayUiBundleOutputPath = z15.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" });
5171
- var KayUiBundleIndexV1 = z15.strictObject({
5172
- protocol: z15.literal(KAY_UI_BUNDLE_INDEX_PROTOCOL),
5218
+ var KayUiBundleOutputPath = z16.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" });
5219
+ var KayUiBundleIndexV1 = z16.strictObject({
5220
+ protocol: z16.literal(KAY_UI_BUNDLE_INDEX_PROTOCOL),
5173
5221
  entryPath: KayUiBundleOutputPath,
5174
- files: z15.array(z15.strictObject({
5222
+ files: z16.array(z16.strictObject({
5175
5223
  path: KayUiBundleOutputPath,
5176
5224
  mediaType: NonEmptyString
5177
5225
  })).min(1)
@@ -5198,19 +5246,19 @@ var KayUiBundleIndexV1 = z15.strictObject({
5198
5246
  function parseKayUiBundleIndexV1(input) {
5199
5247
  return KayUiBundleIndexV1.parse(input);
5200
5248
  }
5201
- var KayUiAppPackageFile = z15.strictObject({
5249
+ var KayUiAppPackageFile = z16.strictObject({
5202
5250
  path: PackageAssetPath,
5203
5251
  mediaType: NonEmptyString,
5204
- bytes: z15.instanceof(Uint8Array).refine((bytes) => bytes.byteLength > 0, {
5252
+ bytes: z16.instanceof(Uint8Array).refine((bytes) => bytes.byteLength > 0, {
5205
5253
  message: "app package file bytes must not be empty"
5206
5254
  })
5207
5255
  });
5208
- var KayUiAppPackageV1 = z15.strictObject({
5209
- protocol: z15.literal(KAY_UI_APP_PACKAGE_PROTOCOL),
5256
+ var KayUiAppPackageV1 = z16.strictObject({
5257
+ protocol: z16.literal(KAY_UI_APP_PACKAGE_PROTOCOL),
5210
5258
  appLocalId: LocalContributionId,
5211
5259
  entry: KayUiAppPackageFile,
5212
- styles: z15.array(KayUiAppPackageFile).optional(),
5213
- assets: z15.array(KayUiAppPackageFile).optional()
5260
+ styles: z16.array(KayUiAppPackageFile).optional(),
5261
+ assets: z16.array(KayUiAppPackageFile).optional()
5214
5262
  }).superRefine((appPackage, ctx) => {
5215
5263
  if (appPackage.entry.mediaType !== "application/javascript") {
5216
5264
  ctx.addIssue({
@@ -5247,16 +5295,16 @@ function parseKayUiAppPackageV1(input) {
5247
5295
  }
5248
5296
 
5249
5297
  // packages/plugin-protocol/dist/whiteboard.js
5250
- import { z as z16 } from "zod";
5298
+ import { z as z17 } from "zod";
5251
5299
  var WhiteboardValue = JsonValue;
5252
- var WhiteboardEntryEnvelope = z16.strictObject({
5300
+ var WhiteboardEntryEnvelope = z17.strictObject({
5253
5301
  id: NonEmptyString,
5254
5302
  typeId: GlobalContributionId,
5255
- schemaVersion: z16.number().int().positive(),
5256
- title: z16.string(),
5303
+ schemaVersion: z17.number().int().positive(),
5304
+ title: z17.string(),
5257
5305
  authorSessionId: NonEmptyString.nullable()
5258
5306
  });
5259
- var WhiteboardEntrySummary = z16.strictObject({
5307
+ var WhiteboardEntrySummary = z17.strictObject({
5260
5308
  name: NonEmptyString,
5261
5309
  entry: WhiteboardEntryEnvelope,
5262
5310
  revision: NonEmptyString
@@ -5264,31 +5312,31 @@ var WhiteboardEntrySummary = z16.strictObject({
5264
5312
  var WhiteboardEntrySnapshot = WhiteboardEntrySummary.extend({
5265
5313
  value: WhiteboardValue
5266
5314
  });
5267
- var WhiteboardDiagnostic = z16.strictObject({
5315
+ var WhiteboardDiagnostic = z17.strictObject({
5268
5316
  ruleId: NonEmptyString,
5269
- severity: z16.enum(["error", "warning"]),
5317
+ severity: z17.enum(["error", "warning"]),
5270
5318
  message: NonEmptyString
5271
5319
  });
5272
- var WhiteboardEntryInfo = z16.strictObject({
5320
+ var WhiteboardEntryInfo = z17.strictObject({
5273
5321
  name: NonEmptyString,
5274
5322
  revision: NonEmptyString,
5275
5323
  entry: WhiteboardEntryEnvelope.optional(),
5276
- state: z16.enum(["available", "unavailable", "unsupported-version", "invalid"]),
5277
- mutable: z16.boolean(),
5278
- diagnostics: z16.array(z16.string())
5324
+ state: z17.enum(["available", "unavailable", "unsupported-version", "invalid"]),
5325
+ mutable: z17.boolean(),
5326
+ diagnostics: z17.array(z17.string())
5279
5327
  });
5280
5328
  var WhiteboardEntryInspection = WhiteboardEntryInfo.extend({
5281
5329
  value: WhiteboardValue.optional(),
5282
- text: z16.string(),
5283
- truncated: z16.boolean()
5330
+ text: z17.string(),
5331
+ truncated: z17.boolean()
5284
5332
  });
5285
- var WhiteboardTypeInfo = z16.strictObject({
5333
+ var WhiteboardTypeInfo = z17.strictObject({
5286
5334
  typeId: GlobalContributionId,
5287
5335
  displayName: NonEmptyString,
5288
- schemaVersion: z16.number().int().positive(),
5289
- available: z16.boolean(),
5336
+ schemaVersion: z17.number().int().positive(),
5337
+ available: z17.boolean(),
5290
5338
  /** A plugin-owned readonly presentation; absent types use the host fallback. */
5291
- presentation: z16.strictObject({
5339
+ presentation: z17.strictObject({
5292
5340
  app: GlobalContributionId
5293
5341
  }).optional()
5294
5342
  });
@@ -5381,6 +5429,7 @@ export {
5381
5429
  KnowledgeSearchGrantRequest,
5382
5430
  KnownResourcesGrantRequest,
5383
5431
  LocalContributionId,
5432
+ MCP_SIGN_IN_SCHEME_KIND,
5384
5433
  McpServerAuthMode,
5385
5434
  McpServerContribution,
5386
5435
  McpServerContributions,
@@ -5389,6 +5438,7 @@ export {
5389
5438
  NonEmptyString,
5390
5439
  PLUGIN_CAPABILITY_SLUGS,
5391
5440
  PLUGIN_DIAGNOSTIC_MESSAGE_CAP,
5441
+ PLUGIN_EVENT_ID_MAX_BYTES,
5392
5442
  PLUGIN_ICON_SHAPE_ATTRIBUTE,
5393
5443
  PLUGIN_NOTIFICATION_RULE_HOST_KEYS,
5394
5444
  PackageAssetPath,
@@ -5407,6 +5457,15 @@ export {
5407
5457
  PluginConfigSectionManifest,
5408
5458
  PluginContributionKind,
5409
5459
  PluginEventDefinitionContribution,
5460
+ PluginEventEnvelope,
5461
+ PluginEventId,
5462
+ PluginEventLocalId,
5463
+ PluginEventPublishInput,
5464
+ PluginEventPublishSource,
5465
+ PluginEventRelated,
5466
+ PluginEventSource,
5467
+ PluginEventTimestamp,
5468
+ PluginEventUri,
5410
5469
  PluginExternalCliConnect,
5411
5470
  PluginId,
5412
5471
  PluginNamespace,
@@ -5486,6 +5545,7 @@ export {
5486
5545
  TargetPermissionWiring,
5487
5546
  ThemeContribution,
5488
5547
  ToolContribution,
5548
+ UiAppActivityRail,
5489
5549
  UiAppCapabilities,
5490
5550
  UiAppContribution,
5491
5551
  UiCommandContribution,