@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/README.md CHANGED
@@ -11,7 +11,7 @@ flow.
11
11
  ```json
12
12
  {
13
13
  "dependencies": {
14
- "@bonsai/plugin-protocol": "npm:@yaklabs-ai/plugin-protocol@^0.14.0"
14
+ "@bonsai/plugin-protocol": "npm:@yaklabs-ai/plugin-protocol@^0.15.0"
15
15
  }
16
16
  }
17
17
  ```
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "package": "@yaklabs-ai/plugin-protocol",
4
- "version": "0.14.0",
4
+ "version": "0.15.0",
5
5
  "target": "npm",
6
6
  "firstPartyLicense": "MIT",
7
7
  "bundled": [],
package/dist/index.d.ts CHANGED
@@ -74,8 +74,8 @@ export declare const AppDataSourceContribution: z.ZodObject<{
74
74
  localId: z.ZodString;
75
75
  scope: z.ZodEnum<{
76
76
  session: "session";
77
- account: "account";
78
77
  runtime: "runtime";
78
+ account: "account";
79
79
  }>;
80
80
  snapshot: z.ZodObject<{
81
81
  version: z.ZodNumber;
@@ -133,9 +133,9 @@ export declare type AppEventSubscription = z.infer<typeof AppEventSubscription>;
133
133
  * `kay.agent` registration seam only).
134
134
  */
135
135
  export declare const AppUriModuleContribution: z.ZodObject<{
136
+ localId: z.ZodString;
136
137
  displayName: z.ZodOptional<z.ZodString>;
137
138
  schemes: z.ZodArray<z.ZodString>;
138
- localId: z.ZodString;
139
139
  }, z.core.$strict>;
140
140
 
141
141
  export declare type AppUriModuleContribution = z.infer<typeof AppUriModuleContribution>;
@@ -1273,6 +1273,7 @@ export declare type AuthGrantFrontDoor = z.infer<typeof AuthGrantFrontDoor>;
1273
1273
 
1274
1274
  export declare const AuthGrantOperation: z.ZodEnum<{
1275
1275
  status: "status";
1276
+ list: "list";
1276
1277
  connect: "connect";
1277
1278
  disconnect: "disconnect";
1278
1279
  resolve: "resolve";
@@ -1285,6 +1286,7 @@ export declare const AuthGrantRequest: z.ZodObject<{
1285
1286
  schemes: z.ZodOptional<z.ZodArray<z.ZodString>>;
1286
1287
  operations: z.ZodArray<z.ZodEnum<{
1287
1288
  status: "status";
1289
+ list: "list";
1288
1290
  connect: "connect";
1289
1291
  disconnect: "disconnect";
1290
1292
  resolve: "resolve";
@@ -1765,7 +1767,9 @@ export declare function dedupeClaims(claims: readonly PluginCapabilityClaimV1[])
1765
1767
  /**
1766
1768
  * The one `toolName` a directory plugin may declare for the tool `localId`: every `.` in
1767
1769
  * `namespace` becomes `_`, then one more `_` joins `localId`. The directory verdict drops a tool
1768
- * that declares anything else. Bundled plugins are not held to it.
1770
+ * that declares anything else, except a name the host grandfathers for that plugin (Bonsai's own
1771
+ * plugins keep the names they shipped with before moving to files). Compiled plugins never pass
1772
+ * through the verdict.
1769
1773
  *
1770
1774
  * Injective over every schema-valid pair, so two directory plugins can only derive the same tool
1771
1775
  * name by sharing both namespace and localId. Neither input can contain `_` (`PLUGIN_ID_PATTERN`
@@ -2070,6 +2074,12 @@ export declare interface JudgeKayPluginDirectoryInput {
2070
2074
  * manifest is a refusal naming that commit rather than "not a plugin".
2071
2075
  */
2072
2076
  readonly revision?: string | undefined;
2077
+ /**
2078
+ * The tool names the plugin the manifest names may keep although they are not
2079
+ * {@link deriveDirectoryPluginToolName}'s. The host decides: Bonsai lets its own plugins keep the
2080
+ * names they shipped with before they moved to files (the wave 2 plan's P14). Absent keeps none.
2081
+ */
2082
+ readonly grandfatheredToolNames?: ((pluginId: string) => readonly string[]) | undefined;
2073
2083
  }
2074
2084
 
2075
2085
  /** Maximum UTF-8 JSON size of one plugin app-data live change. */
@@ -2095,7 +2105,7 @@ export declare const KAY_EVENT_PUBLISHER_ID: "kay";
2095
2105
  declare const KAY_PLUGIN_COMPATIBILITY_REFUSAL_CODES: readonly ["unsupported-protocol", "sdk-range-unsatisfied", "sdk-range-unsupported", "host-sdk-version-invalid"];
2096
2106
 
2097
2107
  /** Released SDK contracts still implemented by the host, alongside its current SDK. */
2098
- export declare const KAY_PLUGIN_COMPATIBLE_SDK_VERSIONS: readonly ["0.8.0", "0.8.1", "0.8.2", "0.8.3", "0.8.4", "0.8.5", "0.9.0", "0.9.1", "0.10.0", "0.11.0", "0.11.1", "0.12.0", "0.12.1", "0.12.2", "0.12.3", "0.12.4", "0.12.5", "0.13.0", "0.13.1", "0.13.2", "0.13.3", "0.13.4", "0.13.5", "0.13.6", "0.13.7", "0.13.8", "0.13.9", "0.13.10"];
2108
+ export declare const KAY_PLUGIN_COMPATIBLE_SDK_VERSIONS: readonly string[];
2099
2109
 
2100
2110
  /** The file whose presence makes a directory a plugin. A directory without one is not a plugin. */
2101
2111
  export declare const KAY_PLUGIN_MANIFEST_FILENAME = "kay-plugin.json";
@@ -2419,8 +2429,15 @@ export declare const KAY_PLUGIN_PROTOCOL_VERSION: "kay.plugin.v1";
2419
2429
  * every earlier release stays in the retention list, so a plugin compiled against 0.13.x that
2420
2430
  * reads `api.withJev` gets `undefined` at the call, and one that imports a value from
2421
2431
  * `@bonsai/plugin-sdk/jev` fails at load. No plugin used either.
2432
+ *
2433
+ * 0.14.1 adds the owned-service `kay.app` auth list operation and `listAccounts`.
2434
+ * Existing resolve-only `has` callers retain account bounds and now probe metadata without
2435
+ * resolving credentials. Plugins using list declare `^0.14.1` so older hosts refuse at load.
2436
+ *
2437
+ * 0.15.0 replaces plugin-event publish arguments and requires resource URI declarations.
2438
+ * Older SDK contracts are no longer retained: their publishers cannot satisfy this contract.
2422
2439
  */
2423
- export declare const KAY_PLUGIN_SDK_VERSION: "0.14.0";
2440
+ export declare const KAY_PLUGIN_SDK_VERSION: "0.15.0";
2424
2441
 
2425
2442
  export declare const KAY_PLUGIN_TARGET_NAMES: readonly ["kay.agent", "kay.app", "kay.ui"];
2426
2443
 
@@ -2583,16 +2600,16 @@ export declare const KayAppTargetManifest: z.ZodObject<{
2583
2600
  responseSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>;
2584
2601
  }, z.core.$strict>>>;
2585
2602
  uriModules: z.ZodOptional<z.ZodArray<z.ZodObject<{
2603
+ localId: z.ZodString;
2586
2604
  displayName: z.ZodOptional<z.ZodString>;
2587
2605
  schemes: z.ZodArray<z.ZodString>;
2588
- localId: z.ZodString;
2589
2606
  }, z.core.$strict>>>;
2590
2607
  dataSources: z.ZodOptional<z.ZodArray<z.ZodObject<{
2591
2608
  localId: z.ZodString;
2592
2609
  scope: z.ZodEnum<{
2593
2610
  session: "session";
2594
- account: "account";
2595
2611
  runtime: "runtime";
2612
+ account: "account";
2596
2613
  }>;
2597
2614
  snapshot: z.ZodObject<{
2598
2615
  version: z.ZodNumber;
@@ -2642,7 +2659,9 @@ export declare const KayAppTargetManifest: z.ZodObject<{
2642
2659
  displayName: z.ZodOptional<z.ZodString>;
2643
2660
  description: z.ZodOptional<z.ZodString>;
2644
2661
  version: z.ZodDefault<z.ZodNumber>;
2645
- payloadSchema: z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
2662
+ uriScheme: z.ZodString;
2663
+ relatedKeys: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
2664
+ payloadSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>;
2646
2665
  }, z.core.$strict>>>;
2647
2666
  notificationRules: z.ZodOptional<z.ZodArray<z.ZodObject<{
2648
2667
  localId: z.ZodString;
@@ -2681,6 +2700,7 @@ export declare const KayAppTargetManifest: z.ZodObject<{
2681
2700
  url: z.ZodString;
2682
2701
  auth: z.ZodOptional<z.ZodEnum<{
2683
2702
  oauth: "oauth";
2703
+ "api-key": "api-key";
2684
2704
  none: "none";
2685
2705
  }>>;
2686
2706
  authService: z.ZodOptional<z.ZodString>;
@@ -2965,16 +2985,16 @@ export declare const KayPluginManifestV1: z.ZodObject<{
2965
2985
  responseSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>;
2966
2986
  }, z.core.$strict>>>;
2967
2987
  uriModules: z.ZodOptional<z.ZodArray<z.ZodObject<{
2988
+ localId: z.ZodString;
2968
2989
  displayName: z.ZodOptional<z.ZodString>;
2969
2990
  schemes: z.ZodArray<z.ZodString>;
2970
- localId: z.ZodString;
2971
2991
  }, z.core.$strict>>>;
2972
2992
  dataSources: z.ZodOptional<z.ZodArray<z.ZodObject<{
2973
2993
  localId: z.ZodString;
2974
2994
  scope: z.ZodEnum<{
2975
2995
  session: "session";
2976
- account: "account";
2977
2996
  runtime: "runtime";
2997
+ account: "account";
2978
2998
  }>;
2979
2999
  snapshot: z.ZodObject<{
2980
3000
  version: z.ZodNumber;
@@ -3024,7 +3044,9 @@ export declare const KayPluginManifestV1: z.ZodObject<{
3024
3044
  displayName: z.ZodOptional<z.ZodString>;
3025
3045
  description: z.ZodOptional<z.ZodString>;
3026
3046
  version: z.ZodDefault<z.ZodNumber>;
3027
- payloadSchema: z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
3047
+ uriScheme: z.ZodString;
3048
+ relatedKeys: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
3049
+ payloadSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>;
3028
3050
  }, z.core.$strict>>>;
3029
3051
  notificationRules: z.ZodOptional<z.ZodArray<z.ZodObject<{
3030
3052
  localId: z.ZodString;
@@ -3063,6 +3085,7 @@ export declare const KayPluginManifestV1: z.ZodObject<{
3063
3085
  url: z.ZodString;
3064
3086
  auth: z.ZodOptional<z.ZodEnum<{
3065
3087
  oauth: "oauth";
3088
+ "api-key": "api-key";
3066
3089
  none: "none";
3067
3090
  }>>;
3068
3091
  authService: z.ZodOptional<z.ZodString>;
@@ -3169,6 +3192,8 @@ export declare const KayPluginManifestV1: z.ZodObject<{
3169
3192
  "skills.read": "skills.read";
3170
3193
  "automations.run": "automations.run";
3171
3194
  "navigation.open-session": "navigation.open-session";
3195
+ "artifacts.read": "artifacts.read";
3196
+ "artifacts.preview": "artifacts.preview";
3172
3197
  "cost.read": "cost.read";
3173
3198
  "billing.read": "billing.read";
3174
3199
  "context.read": "context.read";
@@ -3181,6 +3206,16 @@ export declare const KayPluginManifestV1: z.ZodObject<{
3181
3206
  "workspace.arrange": "workspace.arrange";
3182
3207
  }>>>;
3183
3208
  }, z.core.$strict>>;
3209
+ activityRail: z.ZodOptional<z.ZodObject<{
3210
+ section: z.ZodOptional<z.ZodEnum<{
3211
+ primary: "primary";
3212
+ plugins: "plugins";
3213
+ }>>;
3214
+ order: z.ZodOptional<z.ZodNumber>;
3215
+ icon: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
3216
+ svg: z.ZodString;
3217
+ }, z.core.$strict>]>>;
3218
+ }, z.core.$strict>>;
3184
3219
  }, z.core.$strict>>>;
3185
3220
  themes: z.ZodOptional<z.ZodArray<z.ZodObject<{
3186
3221
  localId: z.ZodString;
@@ -3363,6 +3398,7 @@ export declare const KayPluginManifestV1: z.ZodObject<{
3363
3398
  schemes: z.ZodOptional<z.ZodArray<z.ZodString>>;
3364
3399
  operations: z.ZodArray<z.ZodEnum<{
3365
3400
  status: "status";
3401
+ list: "list";
3366
3402
  connect: "connect";
3367
3403
  disconnect: "disconnect";
3368
3404
  resolve: "resolve";
@@ -3457,6 +3493,7 @@ export declare const KayPluginManifestV1: z.ZodObject<{
3457
3493
  schemes: z.ZodOptional<z.ZodArray<z.ZodString>>;
3458
3494
  operations: z.ZodArray<z.ZodEnum<{
3459
3495
  status: "status";
3496
+ list: "list";
3460
3497
  connect: "connect";
3461
3498
  disconnect: "disconnect";
3462
3499
  resolve: "resolve";
@@ -3551,6 +3588,7 @@ export declare const KayPluginManifestV1: z.ZodObject<{
3551
3588
  schemes: z.ZodOptional<z.ZodArray<z.ZodString>>;
3552
3589
  operations: z.ZodArray<z.ZodEnum<{
3553
3590
  status: "status";
3591
+ list: "list";
3554
3592
  connect: "connect";
3555
3593
  disconnect: "disconnect";
3556
3594
  resolve: "resolve";
@@ -3687,6 +3725,8 @@ export declare const KayUiAppHostCapability: z.ZodEnum<{
3687
3725
  "skills.read": "skills.read";
3688
3726
  "automations.run": "automations.run";
3689
3727
  "navigation.open-session": "navigation.open-session";
3728
+ "artifacts.read": "artifacts.read";
3729
+ "artifacts.preview": "artifacts.preview";
3690
3730
  "cost.read": "cost.read";
3691
3731
  "billing.read": "billing.read";
3692
3732
  "context.read": "context.read";
@@ -3836,6 +3876,8 @@ export declare const KayUiTargetManifest: z.ZodObject<{
3836
3876
  "skills.read": "skills.read";
3837
3877
  "automations.run": "automations.run";
3838
3878
  "navigation.open-session": "navigation.open-session";
3879
+ "artifacts.read": "artifacts.read";
3880
+ "artifacts.preview": "artifacts.preview";
3839
3881
  "cost.read": "cost.read";
3840
3882
  "billing.read": "billing.read";
3841
3883
  "context.read": "context.read";
@@ -3848,6 +3890,16 @@ export declare const KayUiTargetManifest: z.ZodObject<{
3848
3890
  "workspace.arrange": "workspace.arrange";
3849
3891
  }>>>;
3850
3892
  }, z.core.$strict>>;
3893
+ activityRail: z.ZodOptional<z.ZodObject<{
3894
+ section: z.ZodOptional<z.ZodEnum<{
3895
+ primary: "primary";
3896
+ plugins: "plugins";
3897
+ }>>;
3898
+ order: z.ZodOptional<z.ZodNumber>;
3899
+ icon: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
3900
+ svg: z.ZodString;
3901
+ }, z.core.$strict>]>>;
3902
+ }, z.core.$strict>>;
3851
3903
  }, z.core.$strict>>>;
3852
3904
  themes: z.ZodOptional<z.ZodArray<z.ZodObject<{
3853
3905
  localId: z.ZodString;
@@ -3915,9 +3967,30 @@ export declare const LocalContributionId: z.ZodString;
3915
3967
 
3916
3968
  export declare type LocalContributionId = z.infer<typeof LocalContributionId>;
3917
3969
 
3918
- /** Absent ⇒ `"oauth"` (resolution always carries the applied default). */
3970
+ /**
3971
+ * The auth scheme kind each authenticated {@link McpServerAuthMode} signs in through. Composition
3972
+ * keeps a server only when its auth service declares exactly one scheme of this kind, and the MCP
3973
+ * credential port binds the server to that scheme, so the two read this one table.
3974
+ */
3975
+ export declare const MCP_SIGN_IN_SCHEME_KIND: {
3976
+ readonly oauth: "delegated";
3977
+ readonly "api-key": "api-key";
3978
+ };
3979
+
3980
+ /**
3981
+ * How a vendored MCP server authenticates. Absent ⇒ `"oauth"` (resolution always carries the
3982
+ * applied default).
3983
+ *
3984
+ * - `"oauth"`: the server runs its own OAuth. The owning auth service declares exactly one
3985
+ * `delegated` scheme, and the daemon's MCP host runs the sign-in.
3986
+ * - `"api-key"`: the person pastes a key the vendor issued. The owning auth service declares exactly
3987
+ * one `api-key` scheme, and the host sends the stored key as `Authorization: Bearer <key>` on every
3988
+ * request. Only for a vendor whose hosted server takes a static bearer token.
3989
+ * - `"none"`: the server needs no credential.
3990
+ */
3919
3991
  export declare const McpServerAuthMode: z.ZodEnum<{
3920
3992
  oauth: "oauth";
3993
+ "api-key": "api-key";
3921
3994
  none: "none";
3922
3995
  }>;
3923
3996
 
@@ -3927,9 +4000,10 @@ export declare type McpServerAuthMode = z.infer<typeof McpServerAuthMode>;
3927
4000
  * A vendored MCP server a plugin ships: a pointer to a VENDOR-HOSTED MCP endpoint, never a command
3928
4001
  * this host would spawn. v1 is hosted Streamable HTTP only — no stdio (`command`/`args`/`env`) and
3929
4002
  * no custom headers — enforced by this being a `strictObject`, so a stdio-shaped entry fails
3930
- * schema outright rather than being silently ignored. Effective OAuth (explicit `auth: "oauth"`
3931
- * or omitted `auth`) requires `authService`; `auth: "none"` may omit it. `authService` is a local
3932
- * id that must resolve within this same manifest; unlike `uriModule.authService`, qualified foreign
4003
+ * schema outright rather than being silently ignored. Every authenticated mode (`"oauth"`, which is
4004
+ * also the default, and `"api-key"`) requires `authService`; `auth: "none"` may omit it.
4005
+ * `authService` is a local id that must resolve within this same manifest; unlike
4006
+ * `uriModule.authService`, qualified foreign
3933
4007
  * service refs are not permitted because the MCP binding belongs to the plugin that ships it.
3934
4008
  * A declared server is hosted
3935
4009
  * only for a plugin holding `mcp.host-server` for its name and URL (the release's own plugins hold
@@ -3939,6 +4013,7 @@ export declare const McpServerContribution: z.ZodObject<{
3939
4013
  url: z.ZodString;
3940
4014
  auth: z.ZodOptional<z.ZodEnum<{
3941
4015
  oauth: "oauth";
4016
+ "api-key": "api-key";
3942
4017
  none: "none";
3943
4018
  }>>;
3944
4019
  authService: z.ZodOptional<z.ZodString>;
@@ -3955,6 +4030,7 @@ export declare const McpServerContributions: z.ZodRecord<z.ZodString, z.ZodObjec
3955
4030
  url: z.ZodString;
3956
4031
  auth: z.ZodOptional<z.ZodEnum<{
3957
4032
  oauth: "oauth";
4033
+ "api-key": "api-key";
3958
4034
  none: "none";
3959
4035
  }>>;
3960
4036
  authService: z.ZodOptional<z.ZodString>;
@@ -4081,6 +4157,8 @@ export declare const PLUGIN_CAPABILITY_SLUGS: readonly ["sessions.run", "network
4081
4157
  * hostile or accidental multi-megabyte error can never blow up a log line or a render surface. */
4082
4158
  export declare const PLUGIN_DIAGNOSTIC_MESSAGE_CAP = 300;
4083
4159
 
4160
+ export declare const PLUGIN_EVENT_ID_MAX_BYTES = 1024;
4161
+
4084
4162
  /** The root `<svg>` attribute a tile icon declares itself with. */
4085
4163
  export declare const PLUGIN_ICON_SHAPE_ATTRIBUTE = "data-icon-shape";
4086
4164
 
@@ -5618,11 +5696,86 @@ export declare const PluginEventDefinitionContribution: z.ZodObject<{
5618
5696
  displayName: z.ZodOptional<z.ZodString>;
5619
5697
  description: z.ZodOptional<z.ZodString>;
5620
5698
  version: z.ZodDefault<z.ZodNumber>;
5621
- payloadSchema: z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
5699
+ uriScheme: z.ZodString;
5700
+ relatedKeys: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
5701
+ payloadSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>;
5622
5702
  }, z.core.$strict>;
5623
5703
 
5624
5704
  export declare type PluginEventDefinitionContribution = z.infer<typeof PluginEventDefinitionContribution>;
5625
5705
 
5706
+ export declare const PluginEventEnvelope: z.ZodObject<{
5707
+ id: z.ZodString;
5708
+ localId: z.ZodString;
5709
+ type: z.ZodString;
5710
+ version: z.ZodNumber;
5711
+ uri: z.ZodString;
5712
+ related: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>>;
5713
+ key: z.ZodOptional<z.ZodString>;
5714
+ occurredAt: z.ZodISODateTime;
5715
+ publishedAt: z.ZodISODateTime;
5716
+ source: z.ZodObject<{
5717
+ poller: z.ZodOptional<z.ZodString>;
5718
+ runId: z.ZodOptional<z.ZodString>;
5719
+ layer: z.ZodLiteral<"runtime">;
5720
+ pluginId: z.ZodString;
5721
+ sessionId: z.ZodOptional<z.ZodString>;
5722
+ }, z.core.$strict>;
5723
+ payload: z.ZodOptional<z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
5724
+ }, z.core.$strict>;
5725
+
5726
+ export declare type PluginEventEnvelope = z.infer<typeof PluginEventEnvelope>;
5727
+
5728
+ export declare const PluginEventId: z.ZodString;
5729
+
5730
+ export declare type PluginEventId = z.infer<typeof PluginEventId>;
5731
+
5732
+ export declare const PluginEventLocalId: z.ZodString;
5733
+
5734
+ export declare type PluginEventLocalId = z.infer<typeof PluginEventLocalId>;
5735
+
5736
+ export declare const PluginEventPublishInput: z.ZodObject<{
5737
+ uri: z.ZodString;
5738
+ related: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>>;
5739
+ key: z.ZodOptional<z.ZodString>;
5740
+ occurredAt: z.ZodOptional<z.ZodISODateTime>;
5741
+ source: z.ZodOptional<z.ZodObject<{
5742
+ poller: z.ZodOptional<z.ZodString>;
5743
+ runId: z.ZodOptional<z.ZodString>;
5744
+ }, z.core.$strict>>;
5745
+ payload: z.ZodOptional<z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
5746
+ }, z.core.$strict>;
5747
+
5748
+ export declare type PluginEventPublishInput = z.infer<typeof PluginEventPublishInput>;
5749
+
5750
+ export declare const PluginEventPublishSource: z.ZodObject<{
5751
+ poller: z.ZodOptional<z.ZodString>;
5752
+ runId: z.ZodOptional<z.ZodString>;
5753
+ }, z.core.$strict>;
5754
+
5755
+ export declare type PluginEventPublishSource = z.infer<typeof PluginEventPublishSource>;
5756
+
5757
+ export declare const PluginEventRelated: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
5758
+
5759
+ export declare type PluginEventRelated = z.infer<typeof PluginEventRelated>;
5760
+
5761
+ export declare const PluginEventSource: z.ZodObject<{
5762
+ poller: z.ZodOptional<z.ZodString>;
5763
+ runId: z.ZodOptional<z.ZodString>;
5764
+ layer: z.ZodLiteral<"runtime">;
5765
+ pluginId: z.ZodString;
5766
+ sessionId: z.ZodOptional<z.ZodString>;
5767
+ }, z.core.$strict>;
5768
+
5769
+ export declare type PluginEventSource = z.infer<typeof PluginEventSource>;
5770
+
5771
+ export declare const PluginEventTimestamp: z.ZodISODateTime;
5772
+
5773
+ export declare type PluginEventTimestamp = z.infer<typeof PluginEventTimestamp>;
5774
+
5775
+ export declare const PluginEventUri: z.ZodString;
5776
+
5777
+ export declare type PluginEventUri = z.infer<typeof PluginEventUri>;
5778
+
5626
5779
  /**
5627
5780
  * How the host connects an `external-cli` scheme (SDK 0.13.10). Bonsai reads it for its own plugins
5628
5781
  * only; any other plugin's is ignored, with a load diagnostic.
@@ -5794,6 +5947,7 @@ export declare const PluginPermissionManifest: z.ZodObject<{
5794
5947
  schemes: z.ZodOptional<z.ZodArray<z.ZodString>>;
5795
5948
  operations: z.ZodArray<z.ZodEnum<{
5796
5949
  status: "status";
5950
+ list: "list";
5797
5951
  connect: "connect";
5798
5952
  disconnect: "disconnect";
5799
5953
  resolve: "resolve";
@@ -5888,6 +6042,7 @@ export declare const PluginPermissionManifest: z.ZodObject<{
5888
6042
  schemes: z.ZodOptional<z.ZodArray<z.ZodString>>;
5889
6043
  operations: z.ZodArray<z.ZodEnum<{
5890
6044
  status: "status";
6045
+ list: "list";
5891
6046
  connect: "connect";
5892
6047
  disconnect: "disconnect";
5893
6048
  resolve: "resolve";
@@ -5982,6 +6137,7 @@ export declare const PluginPermissionManifest: z.ZodObject<{
5982
6137
  schemes: z.ZodOptional<z.ZodArray<z.ZodString>>;
5983
6138
  operations: z.ZodArray<z.ZodEnum<{
5984
6139
  status: "status";
6140
+ list: "list";
5985
6141
  connect: "connect";
5986
6142
  disconnect: "disconnect";
5987
6143
  resolve: "resolve";
@@ -6443,6 +6599,7 @@ export declare function resolveAdapterId(globalId: GlobalContributionId, declare
6443
6599
  export declare const ResolvedAuthGrantRequest: z.ZodObject<{
6444
6600
  operations: z.ZodArray<z.ZodEnum<{
6445
6601
  status: "status";
6602
+ list: "list";
6446
6603
  connect: "connect";
6447
6604
  disconnect: "disconnect";
6448
6605
  resolve: "resolve";
@@ -6604,8 +6761,8 @@ export declare const ResolvedKayAppDataSource: z.ZodObject<{
6604
6761
  globalId: z.ZodString;
6605
6762
  scope: z.ZodEnum<{
6606
6763
  session: "session";
6607
- account: "account";
6608
6764
  runtime: "runtime";
6765
+ account: "account";
6609
6766
  }>;
6610
6767
  snapshot: z.ZodObject<{
6611
6768
  version: z.ZodNumber;
@@ -6657,6 +6814,7 @@ export declare const ResolvedKayAppMcpServer: z.ZodObject<{
6657
6814
  url: z.ZodString;
6658
6815
  auth: z.ZodEnum<{
6659
6816
  oauth: "oauth";
6817
+ "api-key": "api-key";
6660
6818
  none: "none";
6661
6819
  }>;
6662
6820
  authServiceId: z.ZodOptional<z.ZodString>;
@@ -6702,6 +6860,16 @@ export declare const ResolvedKayUiApp: z.ZodObject<{
6702
6860
  localId: z.ZodString;
6703
6861
  globalId: z.ZodString;
6704
6862
  displayName: z.ZodString;
6863
+ activityRail: z.ZodOptional<z.ZodObject<{
6864
+ section: z.ZodOptional<z.ZodEnum<{
6865
+ primary: "primary";
6866
+ plugins: "plugins";
6867
+ }>>;
6868
+ order: z.ZodOptional<z.ZodNumber>;
6869
+ icon: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
6870
+ svg: z.ZodString;
6871
+ }, z.core.$strict>]>>;
6872
+ }, z.core.$strict>>;
6705
6873
  description: z.ZodOptional<z.ZodString>;
6706
6874
  icon: z.ZodOptional<z.ZodString>;
6707
6875
  runtime: z.ZodLiteral<"kay.react-app.v1">;
@@ -6723,6 +6891,8 @@ export declare const ResolvedKayUiApp: z.ZodObject<{
6723
6891
  "skills.read": "skills.read";
6724
6892
  "automations.run": "automations.run";
6725
6893
  "navigation.open-session": "navigation.open-session";
6894
+ "artifacts.read": "artifacts.read";
6895
+ "artifacts.preview": "artifacts.preview";
6726
6896
  "cost.read": "cost.read";
6727
6897
  "billing.read": "billing.read";
6728
6898
  "context.read": "context.read";
@@ -7213,6 +7383,7 @@ export declare const ResolvedPluginContractV1: z.ZodObject<{
7213
7383
  auth: z.ZodOptional<z.ZodArray<z.ZodObject<{
7214
7384
  operations: z.ZodArray<z.ZodEnum<{
7215
7385
  status: "status";
7386
+ list: "list";
7216
7387
  connect: "connect";
7217
7388
  disconnect: "disconnect";
7218
7389
  resolve: "resolve";
@@ -7307,6 +7478,7 @@ export declare const ResolvedPluginContractV1: z.ZodObject<{
7307
7478
  auth: z.ZodOptional<z.ZodArray<z.ZodObject<{
7308
7479
  operations: z.ZodArray<z.ZodEnum<{
7309
7480
  status: "status";
7481
+ list: "list";
7310
7482
  connect: "connect";
7311
7483
  disconnect: "disconnect";
7312
7484
  resolve: "resolve";
@@ -7401,6 +7573,7 @@ export declare const ResolvedPluginContractV1: z.ZodObject<{
7401
7573
  auth: z.ZodOptional<z.ZodArray<z.ZodObject<{
7402
7574
  operations: z.ZodArray<z.ZodEnum<{
7403
7575
  status: "status";
7576
+ list: "list";
7404
7577
  connect: "connect";
7405
7578
  disconnect: "disconnect";
7406
7579
  resolve: "resolve";
@@ -7545,8 +7718,8 @@ export declare const ResolvedPluginContractV1: z.ZodObject<{
7545
7718
  globalId: z.ZodString;
7546
7719
  scope: z.ZodEnum<{
7547
7720
  session: "session";
7548
- account: "account";
7549
7721
  runtime: "runtime";
7722
+ account: "account";
7550
7723
  }>;
7551
7724
  snapshot: z.ZodObject<{
7552
7725
  version: z.ZodNumber;
@@ -7598,6 +7771,7 @@ export declare const ResolvedPluginContractV1: z.ZodObject<{
7598
7771
  url: z.ZodString;
7599
7772
  auth: z.ZodEnum<{
7600
7773
  oauth: "oauth";
7774
+ "api-key": "api-key";
7601
7775
  none: "none";
7602
7776
  }>;
7603
7777
  authServiceId: z.ZodOptional<z.ZodString>;
@@ -7643,6 +7817,16 @@ export declare const ResolvedPluginContractV1: z.ZodObject<{
7643
7817
  localId: z.ZodString;
7644
7818
  globalId: z.ZodString;
7645
7819
  displayName: z.ZodString;
7820
+ activityRail: z.ZodOptional<z.ZodObject<{
7821
+ section: z.ZodOptional<z.ZodEnum<{
7822
+ primary: "primary";
7823
+ plugins: "plugins";
7824
+ }>>;
7825
+ order: z.ZodOptional<z.ZodNumber>;
7826
+ icon: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
7827
+ svg: z.ZodString;
7828
+ }, z.core.$strict>]>>;
7829
+ }, z.core.$strict>>;
7646
7830
  description: z.ZodOptional<z.ZodString>;
7647
7831
  icon: z.ZodOptional<z.ZodString>;
7648
7832
  runtime: z.ZodLiteral<"kay.react-app.v1">;
@@ -7664,6 +7848,8 @@ export declare const ResolvedPluginContractV1: z.ZodObject<{
7664
7848
  "skills.read": "skills.read";
7665
7849
  "automations.run": "automations.run";
7666
7850
  "navigation.open-session": "navigation.open-session";
7851
+ "artifacts.read": "artifacts.read";
7852
+ "artifacts.preview": "artifacts.preview";
7667
7853
  "cost.read": "cost.read";
7668
7854
  "billing.read": "billing.read";
7669
7855
  "context.read": "context.read";
@@ -7734,6 +7920,7 @@ export declare const ResolvedPluginGrants: z.ZodObject<{
7734
7920
  auth: z.ZodOptional<z.ZodArray<z.ZodObject<{
7735
7921
  operations: z.ZodArray<z.ZodEnum<{
7736
7922
  status: "status";
7923
+ list: "list";
7737
7924
  connect: "connect";
7738
7925
  disconnect: "disconnect";
7739
7926
  resolve: "resolve";
@@ -7828,6 +8015,7 @@ export declare const ResolvedPluginGrants: z.ZodObject<{
7828
8015
  auth: z.ZodOptional<z.ZodArray<z.ZodObject<{
7829
8016
  operations: z.ZodArray<z.ZodEnum<{
7830
8017
  status: "status";
8018
+ list: "list";
7831
8019
  connect: "connect";
7832
8020
  disconnect: "disconnect";
7833
8021
  resolve: "resolve";
@@ -7922,6 +8110,7 @@ export declare const ResolvedPluginGrants: z.ZodObject<{
7922
8110
  auth: z.ZodOptional<z.ZodArray<z.ZodObject<{
7923
8111
  operations: z.ZodArray<z.ZodEnum<{
7924
8112
  status: "status";
8113
+ list: "list";
7925
8114
  connect: "connect";
7926
8115
  disconnect: "disconnect";
7927
8116
  resolve: "resolve";
@@ -8123,6 +8312,7 @@ export declare const ResolvedTargetGrantSet: z.ZodObject<{
8123
8312
  auth: z.ZodOptional<z.ZodArray<z.ZodObject<{
8124
8313
  operations: z.ZodArray<z.ZodEnum<{
8125
8314
  status: "status";
8315
+ list: "list";
8126
8316
  connect: "connect";
8127
8317
  disconnect: "disconnect";
8128
8318
  resolve: "resolve";
@@ -8220,7 +8410,7 @@ export declare function resolveGlobalContributionId(namespace: PluginNamespace,
8220
8410
 
8221
8411
  export declare function resolveKayPluginContractV1(manifest: KayPluginManifestV1): ResolvedPluginContractV1;
8222
8412
 
8223
- export declare function resolvePluginEventType(namespace: PluginNamespace, localId: LocalContributionId): GlobalContributionId;
8413
+ export declare function resolvePluginEventType(namespace: PluginNamespace, localId: PluginEventLocalId): GlobalContributionId;
8224
8414
 
8225
8415
  export declare function resolvePluginNamespace(pluginId: PluginNamespace, namespace?: PluginNamespace): PluginNamespace;
8226
8416
 
@@ -8873,6 +9063,7 @@ export declare const TargetPermissionSet: z.ZodPreprocess<z.ZodObject<{
8873
9063
  schemes: z.ZodOptional<z.ZodArray<z.ZodString>>;
8874
9064
  operations: z.ZodArray<z.ZodEnum<{
8875
9065
  status: "status";
9066
+ list: "list";
8876
9067
  connect: "connect";
8877
9068
  disconnect: "disconnect";
8878
9069
  resolve: "resolve";
@@ -8999,6 +9190,7 @@ export declare const TargetPermissionWiring: z.ZodObject<{
8999
9190
  schemes: z.ZodOptional<z.ZodArray<z.ZodString>>;
9000
9191
  operations: z.ZodArray<z.ZodEnum<{
9001
9192
  status: "status";
9193
+ list: "list";
9002
9194
  connect: "connect";
9003
9195
  disconnect: "disconnect";
9004
9196
  resolve: "resolve";
@@ -9187,12 +9379,28 @@ export declare interface TurnPacketMessage {
9187
9379
  readonly origin: TurnMessageOrigin;
9188
9380
  }
9189
9381
 
9382
+ /** An optional direct destination on the host activity rail; no secondary panel. */
9383
+ export declare const UiAppActivityRail: z.ZodObject<{
9384
+ section: z.ZodOptional<z.ZodEnum<{
9385
+ primary: "primary";
9386
+ plugins: "plugins";
9387
+ }>>;
9388
+ order: z.ZodOptional<z.ZodNumber>;
9389
+ icon: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
9390
+ svg: z.ZodString;
9391
+ }, z.core.$strict>]>>;
9392
+ }, z.core.$strict>;
9393
+
9394
+ export declare type UiAppActivityRail = z.infer<typeof UiAppActivityRail>;
9395
+
9190
9396
  export declare const UiAppCapabilities: z.ZodObject<{
9191
9397
  endpoints: z.ZodOptional<z.ZodArray<z.ZodString>>;
9192
9398
  host: z.ZodOptional<z.ZodArray<z.ZodEnum<{
9193
9399
  "skills.read": "skills.read";
9194
9400
  "automations.run": "automations.run";
9195
9401
  "navigation.open-session": "navigation.open-session";
9402
+ "artifacts.read": "artifacts.read";
9403
+ "artifacts.preview": "artifacts.preview";
9196
9404
  "cost.read": "cost.read";
9197
9405
  "billing.read": "billing.read";
9198
9406
  "context.read": "context.read";
@@ -9229,6 +9437,8 @@ export declare const UiAppContribution: z.ZodObject<{
9229
9437
  "skills.read": "skills.read";
9230
9438
  "automations.run": "automations.run";
9231
9439
  "navigation.open-session": "navigation.open-session";
9440
+ "artifacts.read": "artifacts.read";
9441
+ "artifacts.preview": "artifacts.preview";
9232
9442
  "cost.read": "cost.read";
9233
9443
  "billing.read": "billing.read";
9234
9444
  "context.read": "context.read";
@@ -9241,6 +9451,16 @@ export declare const UiAppContribution: z.ZodObject<{
9241
9451
  "workspace.arrange": "workspace.arrange";
9242
9452
  }>>>;
9243
9453
  }, z.core.$strict>>;
9454
+ activityRail: z.ZodOptional<z.ZodObject<{
9455
+ section: z.ZodOptional<z.ZodEnum<{
9456
+ primary: "primary";
9457
+ plugins: "plugins";
9458
+ }>>;
9459
+ order: z.ZodOptional<z.ZodNumber>;
9460
+ icon: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
9461
+ svg: z.ZodString;
9462
+ }, z.core.$strict>]>>;
9463
+ }, z.core.$strict>>;
9244
9464
  }, z.core.$strict>;
9245
9465
 
9246
9466
  export declare type UiAppContribution = z.infer<typeof UiAppContribution>;