@yaklabs-ai/plugin-protocol 0.33.0 → 0.35.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.d.ts CHANGED
@@ -77,9 +77,9 @@ export declare type AppDataMaterializerContribution = z.infer<typeof AppDataMate
77
77
  export declare const AppDataSourceContribution: z.ZodObject<{
78
78
  localId: z.ZodString;
79
79
  scope: z.ZodEnum<{
80
- session: "session";
81
80
  runtime: "runtime";
82
81
  account: "account";
82
+ session: "session";
83
83
  }>;
84
84
  snapshot: z.ZodObject<{
85
85
  version: z.ZodNumber;
@@ -117,6 +117,25 @@ export declare const AppDataSourceContribution: z.ZodObject<{
117
117
 
118
118
  export declare type AppDataSourceContribution = z.infer<typeof AppDataSourceContribution>;
119
119
 
120
+ /** What the window needs to read one of a plugin's data sources, from its accepted contract. */
121
+ export declare function appDataSourceDeclaration(source: NonNullable<ResolvedPluginContractV1["kayAppDataSources"]>[number]): {
122
+ store?: {
123
+ shape: "rows";
124
+ rowsField: string;
125
+ key: string[];
126
+ } | {
127
+ shape: "value";
128
+ };
129
+ read?: {
130
+ requestVersion: number;
131
+ resultVersion: number;
132
+ };
133
+ sourceId: string;
134
+ scope: "runtime" | "account" | "session";
135
+ snapshotVersion: number;
136
+ changeVersion: number;
137
+ };
138
+
120
139
  /** Exact request and result schemas for a session source's optional read operation. */
121
140
  export declare const AppDataSourceRead: z.ZodObject<{
122
141
  request: z.ZodObject<{
@@ -183,8 +202,8 @@ export declare type ApprovalKind = (typeof APPROVAL_KINDS)[number];
183
202
 
184
203
  export declare const approvalKindSchema: z.ZodEnum<{
185
204
  message: "message";
186
- change: "change";
187
205
  action: "action";
206
+ change: "change";
188
207
  access: "access";
189
208
  }>;
190
209
 
@@ -313,30 +332,30 @@ export declare const AppUriModuleContribution: z.ZodObject<{
313
332
  description: z.ZodString;
314
333
  operations: z.ZodExactOptional<z.ZodArray<z.ZodEnum<{
315
334
  search: "search";
316
- delete: "delete";
317
335
  list: "list";
318
336
  read: "read";
319
337
  write: "write";
320
338
  help: "help";
321
339
  edit: "edit";
340
+ delete: "delete";
322
341
  }>>>;
323
342
  operationDocs: z.ZodExactOptional<z.ZodRecord<z.ZodEnum<{
324
343
  search: "search";
325
- delete: "delete";
326
344
  list: "list";
327
345
  read: "read";
328
346
  write: "write";
329
347
  help: "help";
330
348
  edit: "edit";
349
+ delete: "delete";
331
350
  }> & z.core.$partial, z.ZodString>>;
332
351
  operationDefaults: z.ZodExactOptional<z.ZodRecord<z.ZodEnum<{
333
352
  search: "search";
334
- delete: "delete";
335
353
  list: "list";
336
354
  read: "read";
337
355
  write: "write";
338
356
  help: "help";
339
357
  edit: "edit";
358
+ delete: "delete";
340
359
  }> & z.core.$partial, z.ZodEnum<{
341
360
  never: "never";
342
361
  allow: "allow";
@@ -815,10 +834,10 @@ export declare const ArtifactProvenanceEnvelopeV1: z.ZodPipe<z.ZodUnknown, z.Zod
815
834
  }, z.core.$strict>;
816
835
  artifacts: z.ZodArray<z.ZodObject<{
817
836
  kind: z.ZodEnum<{
837
+ delete: "delete";
818
838
  import: "import";
819
839
  create: "create";
820
840
  update: "update";
821
- delete: "delete";
822
841
  copy: "copy";
823
842
  harvest: "harvest";
824
843
  restore: "restore";
@@ -1107,10 +1126,10 @@ export declare type ArtifactProvenanceGap = z.infer<typeof ArtifactProvenanceGap
1107
1126
 
1108
1127
  export declare const ArtifactProvenanceMutation: z.ZodObject<{
1109
1128
  kind: z.ZodEnum<{
1129
+ delete: "delete";
1110
1130
  import: "import";
1111
1131
  create: "create";
1112
1132
  update: "update";
1113
- delete: "delete";
1114
1133
  copy: "copy";
1115
1134
  harvest: "harvest";
1116
1135
  restore: "restore";
@@ -1877,30 +1896,30 @@ declare const canonicalContributionSchemas: {
1877
1896
  description: z.ZodString;
1878
1897
  operations: z.ZodExactOptional<z.ZodArray<z.ZodEnum<{
1879
1898
  search: "search";
1880
- delete: "delete";
1881
1899
  list: "list";
1882
1900
  read: "read";
1883
1901
  write: "write";
1884
1902
  help: "help";
1885
1903
  edit: "edit";
1904
+ delete: "delete";
1886
1905
  }>>>;
1887
1906
  operationDocs: z.ZodExactOptional<z.ZodRecord<z.ZodEnum<{
1888
1907
  search: "search";
1889
- delete: "delete";
1890
1908
  list: "list";
1891
1909
  read: "read";
1892
1910
  write: "write";
1893
1911
  help: "help";
1894
1912
  edit: "edit";
1913
+ delete: "delete";
1895
1914
  }> & z.core.$partial, z.ZodString>>;
1896
1915
  operationDefaults: z.ZodExactOptional<z.ZodRecord<z.ZodEnum<{
1897
1916
  search: "search";
1898
- delete: "delete";
1899
1917
  list: "list";
1900
1918
  read: "read";
1901
1919
  write: "write";
1902
1920
  help: "help";
1903
1921
  edit: "edit";
1922
+ delete: "delete";
1904
1923
  }> & z.core.$partial, z.ZodEnum<{
1905
1924
  never: "never";
1906
1925
  allow: "allow";
@@ -1959,12 +1978,12 @@ declare const canonicalContributionSchemas: {
1959
1978
  action: z.ZodString;
1960
1979
  operations: z.ZodExactOptional<z.ZodArray<z.ZodEnum<{
1961
1980
  search: "search";
1962
- delete: "delete";
1963
1981
  list: "list";
1964
1982
  read: "read";
1965
1983
  write: "write";
1966
1984
  help: "help";
1967
1985
  edit: "edit";
1986
+ delete: "delete";
1968
1987
  }>>>;
1969
1988
  routes: z.ZodExactOptional<z.ZodArray<z.ZodString>>;
1970
1989
  query: z.ZodExactOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
@@ -1972,12 +1991,12 @@ declare const canonicalContributionSchemas: {
1972
1991
  public: z.ZodLiteral<true>;
1973
1992
  operations: z.ZodExactOptional<z.ZodArray<z.ZodEnum<{
1974
1993
  search: "search";
1975
- delete: "delete";
1976
1994
  list: "list";
1977
1995
  read: "read";
1978
1996
  write: "write";
1979
1997
  help: "help";
1980
1998
  edit: "edit";
1999
+ delete: "delete";
1981
2000
  }>>>;
1982
2001
  routes: z.ZodExactOptional<z.ZodArray<z.ZodString>>;
1983
2002
  query: z.ZodExactOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
@@ -2084,30 +2103,30 @@ declare const canonicalContributionSchemas: {
2084
2103
  description: z.ZodString;
2085
2104
  operations: z.ZodExactOptional<z.ZodArray<z.ZodEnum<{
2086
2105
  search: "search";
2087
- delete: "delete";
2088
2106
  list: "list";
2089
2107
  read: "read";
2090
2108
  write: "write";
2091
2109
  help: "help";
2092
2110
  edit: "edit";
2111
+ delete: "delete";
2093
2112
  }>>>;
2094
2113
  operationDocs: z.ZodExactOptional<z.ZodRecord<z.ZodEnum<{
2095
2114
  search: "search";
2096
- delete: "delete";
2097
2115
  list: "list";
2098
2116
  read: "read";
2099
2117
  write: "write";
2100
2118
  help: "help";
2101
2119
  edit: "edit";
2120
+ delete: "delete";
2102
2121
  }> & z.core.$partial, z.ZodString>>;
2103
2122
  operationDefaults: z.ZodExactOptional<z.ZodRecord<z.ZodEnum<{
2104
2123
  search: "search";
2105
- delete: "delete";
2106
2124
  list: "list";
2107
2125
  read: "read";
2108
2126
  write: "write";
2109
2127
  help: "help";
2110
2128
  edit: "edit";
2129
+ delete: "delete";
2111
2130
  }> & z.core.$partial, z.ZodEnum<{
2112
2131
  never: "never";
2113
2132
  allow: "allow";
@@ -2166,12 +2185,12 @@ declare const canonicalContributionSchemas: {
2166
2185
  action: z.ZodString;
2167
2186
  operations: z.ZodExactOptional<z.ZodArray<z.ZodEnum<{
2168
2187
  search: "search";
2169
- delete: "delete";
2170
2188
  list: "list";
2171
2189
  read: "read";
2172
2190
  write: "write";
2173
2191
  help: "help";
2174
2192
  edit: "edit";
2193
+ delete: "delete";
2175
2194
  }>>>;
2176
2195
  routes: z.ZodExactOptional<z.ZodArray<z.ZodString>>;
2177
2196
  query: z.ZodExactOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
@@ -2179,12 +2198,12 @@ declare const canonicalContributionSchemas: {
2179
2198
  public: z.ZodLiteral<true>;
2180
2199
  operations: z.ZodExactOptional<z.ZodArray<z.ZodEnum<{
2181
2200
  search: "search";
2182
- delete: "delete";
2183
2201
  list: "list";
2184
2202
  read: "read";
2185
2203
  write: "write";
2186
2204
  help: "help";
2187
2205
  edit: "edit";
2206
+ delete: "delete";
2188
2207
  }>>>;
2189
2208
  routes: z.ZodExactOptional<z.ZodArray<z.ZodString>>;
2190
2209
  query: z.ZodExactOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
@@ -2252,30 +2271,30 @@ declare const canonicalContributionSchemas: {
2252
2271
  description: z.ZodString;
2253
2272
  operations: z.ZodExactOptional<z.ZodArray<z.ZodEnum<{
2254
2273
  search: "search";
2255
- delete: "delete";
2256
2274
  list: "list";
2257
2275
  read: "read";
2258
2276
  write: "write";
2259
2277
  help: "help";
2260
2278
  edit: "edit";
2279
+ delete: "delete";
2261
2280
  }>>>;
2262
2281
  operationDocs: z.ZodExactOptional<z.ZodRecord<z.ZodEnum<{
2263
2282
  search: "search";
2264
- delete: "delete";
2265
2283
  list: "list";
2266
2284
  read: "read";
2267
2285
  write: "write";
2268
2286
  help: "help";
2269
2287
  edit: "edit";
2288
+ delete: "delete";
2270
2289
  }> & z.core.$partial, z.ZodString>>;
2271
2290
  operationDefaults: z.ZodExactOptional<z.ZodRecord<z.ZodEnum<{
2272
2291
  search: "search";
2273
- delete: "delete";
2274
2292
  list: "list";
2275
2293
  read: "read";
2276
2294
  write: "write";
2277
2295
  help: "help";
2278
2296
  edit: "edit";
2297
+ delete: "delete";
2279
2298
  }> & z.core.$partial, z.ZodEnum<{
2280
2299
  never: "never";
2281
2300
  allow: "allow";
@@ -2343,9 +2362,9 @@ declare const canonicalContributionSchemas: {
2343
2362
  AppDataSourceContribution: z.ZodObject<{
2344
2363
  localId: z.ZodString;
2345
2364
  scope: z.ZodEnum<{
2346
- session: "session";
2347
2365
  runtime: "runtime";
2348
2366
  account: "account";
2367
+ session: "session";
2349
2368
  }>;
2350
2369
  snapshot: z.ZodObject<{
2351
2370
  version: z.ZodNumber;
@@ -2691,17 +2710,17 @@ declare const canonicalContributionSchemas: {
2691
2710
  route: z.ZodOptional<z.ZodString>;
2692
2711
  }, z.core.$strict>;
2693
2712
  KayUiAppHostCapability: z.ZodEnum<{
2713
+ "navigation.open-session": "navigation.open-session";
2694
2714
  "sessions.create": "sessions.create";
2695
- "memory.read": "memory.read";
2696
- "skills.read": "skills.read";
2697
- "automations.run": "automations.run";
2698
2715
  "artifacts.read": "artifacts.read";
2699
- "navigation.open-session": "navigation.open-session";
2700
2716
  "artifacts.preview": "artifacts.preview";
2701
2717
  "cost.read": "cost.read";
2702
2718
  "billing.read": "billing.read";
2719
+ "skills.read": "skills.read";
2720
+ "memory.read": "memory.read";
2703
2721
  "self-improvement.read": "self-improvement.read";
2704
2722
  "automations.read": "automations.read";
2723
+ "automations.run": "automations.run";
2705
2724
  "shared-artifacts.read": "shared-artifacts.read";
2706
2725
  "workspace.place-pane": "workspace.place-pane";
2707
2726
  "workspace.pane-header": "workspace.pane-header";
@@ -2710,17 +2729,17 @@ declare const canonicalContributionSchemas: {
2710
2729
  UiAppCapabilities: z.ZodObject<{
2711
2730
  endpoints: z.ZodOptional<z.ZodArray<z.ZodString>>;
2712
2731
  host: z.ZodOptional<z.ZodArray<z.ZodEnum<{
2732
+ "navigation.open-session": "navigation.open-session";
2713
2733
  "sessions.create": "sessions.create";
2714
- "memory.read": "memory.read";
2715
- "skills.read": "skills.read";
2716
- "automations.run": "automations.run";
2717
2734
  "artifacts.read": "artifacts.read";
2718
- "navigation.open-session": "navigation.open-session";
2719
2735
  "artifacts.preview": "artifacts.preview";
2720
2736
  "cost.read": "cost.read";
2721
2737
  "billing.read": "billing.read";
2738
+ "skills.read": "skills.read";
2739
+ "memory.read": "memory.read";
2722
2740
  "self-improvement.read": "self-improvement.read";
2723
2741
  "automations.read": "automations.read";
2742
+ "automations.run": "automations.run";
2724
2743
  "shared-artifacts.read": "shared-artifacts.read";
2725
2744
  "workspace.place-pane": "workspace.place-pane";
2726
2745
  "workspace.pane-header": "workspace.pane-header";
@@ -2739,6 +2758,17 @@ declare const canonicalContributionSchemas: {
2739
2758
  primary: "primary";
2740
2759
  plugins: "plugins";
2741
2760
  }>>;
2761
+ badge: z.ZodOptional<z.ZodObject<{
2762
+ source: z.ZodString;
2763
+ where: z.ZodOptional<z.ZodString>;
2764
+ label: z.ZodObject<{
2765
+ one: z.ZodOptional<z.ZodString>;
2766
+ other: z.ZodString;
2767
+ }, z.core.$strict>;
2768
+ }, z.core.$strict>>;
2769
+ panel: z.ZodOptional<z.ZodObject<{
2770
+ body: z.ZodString;
2771
+ }, z.core.$strict>>;
2742
2772
  }, z.core.$strict>;
2743
2773
  UiAppContribution: z.ZodObject<{
2744
2774
  localId: z.ZodString;
@@ -2759,17 +2789,17 @@ declare const canonicalContributionSchemas: {
2759
2789
  capabilities: z.ZodOptional<z.ZodObject<{
2760
2790
  endpoints: z.ZodOptional<z.ZodArray<z.ZodString>>;
2761
2791
  host: z.ZodOptional<z.ZodArray<z.ZodEnum<{
2792
+ "navigation.open-session": "navigation.open-session";
2762
2793
  "sessions.create": "sessions.create";
2763
- "memory.read": "memory.read";
2764
- "skills.read": "skills.read";
2765
- "automations.run": "automations.run";
2766
2794
  "artifacts.read": "artifacts.read";
2767
- "navigation.open-session": "navigation.open-session";
2768
2795
  "artifacts.preview": "artifacts.preview";
2769
2796
  "cost.read": "cost.read";
2770
2797
  "billing.read": "billing.read";
2798
+ "skills.read": "skills.read";
2799
+ "memory.read": "memory.read";
2771
2800
  "self-improvement.read": "self-improvement.read";
2772
2801
  "automations.read": "automations.read";
2802
+ "automations.run": "automations.run";
2773
2803
  "shared-artifacts.read": "shared-artifacts.read";
2774
2804
  "workspace.place-pane": "workspace.place-pane";
2775
2805
  "workspace.pane-header": "workspace.pane-header";
@@ -2795,17 +2825,17 @@ declare const canonicalContributionSchemas: {
2795
2825
  capabilities: z.ZodOptional<z.ZodObject<{
2796
2826
  endpoints: z.ZodOptional<z.ZodArray<z.ZodString>>;
2797
2827
  host: z.ZodOptional<z.ZodArray<z.ZodEnum<{
2828
+ "navigation.open-session": "navigation.open-session";
2798
2829
  "sessions.create": "sessions.create";
2799
- "memory.read": "memory.read";
2800
- "skills.read": "skills.read";
2801
- "automations.run": "automations.run";
2802
2830
  "artifacts.read": "artifacts.read";
2803
- "navigation.open-session": "navigation.open-session";
2804
2831
  "artifacts.preview": "artifacts.preview";
2805
2832
  "cost.read": "cost.read";
2806
2833
  "billing.read": "billing.read";
2834
+ "skills.read": "skills.read";
2835
+ "memory.read": "memory.read";
2807
2836
  "self-improvement.read": "self-improvement.read";
2808
2837
  "automations.read": "automations.read";
2838
+ "automations.run": "automations.run";
2809
2839
  "shared-artifacts.read": "shared-artifacts.read";
2810
2840
  "workspace.place-pane": "workspace.place-pane";
2811
2841
  "workspace.pane-header": "workspace.pane-header";
@@ -2852,14 +2882,14 @@ declare const canonicalContributionSchemas: {
2852
2882
  }, z.core.$strict>], "kind">;
2853
2883
  }, z.core.$strict>;
2854
2884
  PluginContributionKind: z.ZodEnum<{
2885
+ endpoint: "endpoint";
2855
2886
  tool: "tool";
2856
2887
  resource: "resource";
2857
- endpoint: "endpoint";
2858
2888
  storage: "storage";
2859
- command: "command";
2860
2889
  uriModule: "uriModule";
2861
2890
  authService: "authService";
2862
2891
  app: "app";
2892
+ command: "command";
2863
2893
  configSection: "configSection";
2864
2894
  skill: "skill";
2865
2895
  converter: "converter";
@@ -2997,36 +3027,8 @@ export declare const CommandHandler: z.ZodDiscriminatedUnion<[z.ZodObject<{
2997
3027
 
2998
3028
  export declare type CommandHandler = z.infer<typeof CommandHandler>;
2999
3029
 
3000
- export declare type CommandWhere = {
3001
- readonly kind: "literal";
3002
- readonly value: boolean;
3003
- } | {
3004
- readonly kind: "key";
3005
- readonly key: CommandWhereKey;
3006
- } | {
3007
- readonly kind: "equals";
3008
- readonly key: CommandWhereKey;
3009
- readonly value: boolean | string;
3010
- readonly negated: boolean;
3011
- } | {
3012
- readonly kind: "not";
3013
- readonly operand: CommandWhere;
3014
- } | {
3015
- readonly kind: "and" | "or";
3016
- readonly left: CommandWhere;
3017
- readonly right: CommandWhere;
3018
- };
3019
-
3020
3030
  export declare type CommandWhereKey = keyof typeof WHERE_KEY_TYPES;
3021
3031
 
3022
- export declare type CommandWhereParseResult = {
3023
- readonly ok: true;
3024
- readonly where: CommandWhere;
3025
- } | {
3026
- readonly ok: false;
3027
- readonly message: string;
3028
- };
3029
-
3030
3032
  /** The values a `where` reads. A key left out isn't known yet, for example while it loads. */
3031
3033
  export declare type CommandWhereValues = {
3032
3034
  readonly [K in CommandWhereKey]?: (typeof WHERE_KEY_TYPES)[K] extends "boolean" ? boolean : string;
@@ -3142,9 +3144,9 @@ export declare const CorpusResourceInvocationQuery: z.ZodObject<{
3142
3144
  }, z.core.$strict>>;
3143
3145
  limit: z.ZodOptional<z.ZodNumber>;
3144
3146
  rootCreatedByKind: z.ZodOptional<z.ZodEnum<{
3147
+ agent: "agent";
3145
3148
  plugin: "plugin";
3146
3149
  human: "human";
3147
- agent: "agent";
3148
3150
  trigger: "trigger";
3149
3151
  daemon: "daemon";
3150
3152
  }>>;
@@ -3279,12 +3281,15 @@ export declare const EntityResolverContribution: z.ZodObject<{
3279
3281
 
3280
3282
  export declare type EntityResolverContribution = z.infer<typeof EntityResolverContribution>;
3281
3283
 
3284
+ /** Whether a command's `where` holds. A button stays hidden while a value it needs loads. */
3285
+ export declare function evaluateCommandWhere(where: Where, values: CommandWhereValues): boolean;
3286
+
3282
3287
  /**
3283
- * Whether a `where` holds. When the answer depends on a value not known yet the result is false,
3284
- * so a button stays hidden while a value loads rather than flashing on: `true || app.channel == 'x'`
3285
- * holds whatever the channel is, and `!(app.channel == 'x')` waits for it.
3288
+ * Whether a `where` holds. `read` answers `undefined` for a value not known yet, and when the answer
3289
+ * depends on one the result is false: `true || app.channel == 'x'` holds whatever the channel is,
3290
+ * and `!(app.channel == 'x')` waits for it. `null` means the value is known to be absent.
3286
3291
  */
3287
- export declare function evaluateCommandWhere(where: CommandWhere, values: CommandWhereValues): boolean;
3292
+ export declare function evaluateWhere(where: Where, read: (key: string) => unknown): boolean;
3288
3293
 
3289
3294
  export declare const EventGrantRequest: z.ZodObject<{
3290
3295
  event: z.ZodString;
@@ -4073,8 +4078,17 @@ export declare const KAY_PLUGIN_PROTOCOL_VERSION: "kay.plugin.v1";
4073
4078
  * under `kay.ui` `contributes` names each command's title, icon file, `button`, `menu` and `where`,
4074
4079
  * and `api.implementCommand(localId, handler)` supplies what it does. `placement` is gone and `icon`
4075
4080
  * is now a file path: nothing ever read either. A plugin that declares a command declares ^0.33.0.
4081
+ *
4082
+ * 0.34.0 lets a rail entry declare a sidebar (#15901). `panel.body` on a `railEntries` entry names
4083
+ * what fills it, either a `contextOnly` app in the plugin or a body the host ships. Additive: a rail
4084
+ * entry with no `panel` still opens its page alone. A plugin that declares a panel declares ^0.34.0.
4085
+ *
4086
+ * 0.35.0 lets a rail entry declare a count badge as data (#15900). `badge` on a `railEntries` entry
4087
+ * names one of the plugin's `rows` data sources, an optional `where` and a plural `label`.
4088
+ * `app.skills` gains `listPendingSuggestions` and `subscribeSuggestions` under `skills.read`. A plugin
4089
+ * that declares a badge declares ^0.35.0.
4076
4090
  */
4077
- export declare const KAY_PLUGIN_SDK_VERSION: "0.33.0";
4091
+ export declare const KAY_PLUGIN_SDK_VERSION: "0.35.0";
4078
4092
 
4079
4093
  export declare const KAY_PLUGIN_TARGET_NAMES: readonly ["kay.agent", "kay.app", "kay.ui"];
4080
4094
 
@@ -4162,30 +4176,30 @@ export declare const KayAgentTargetManifest: z.ZodObject<{
4162
4176
  description: z.ZodString;
4163
4177
  operations: z.ZodExactOptional<z.ZodArray<z.ZodEnum<{
4164
4178
  search: "search";
4165
- delete: "delete";
4166
4179
  list: "list";
4167
4180
  read: "read";
4168
4181
  write: "write";
4169
4182
  help: "help";
4170
4183
  edit: "edit";
4184
+ delete: "delete";
4171
4185
  }>>>;
4172
4186
  operationDocs: z.ZodExactOptional<z.ZodRecord<z.ZodEnum<{
4173
4187
  search: "search";
4174
- delete: "delete";
4175
4188
  list: "list";
4176
4189
  read: "read";
4177
4190
  write: "write";
4178
4191
  help: "help";
4179
4192
  edit: "edit";
4193
+ delete: "delete";
4180
4194
  }> & z.core.$partial, z.ZodString>>;
4181
4195
  operationDefaults: z.ZodExactOptional<z.ZodRecord<z.ZodEnum<{
4182
4196
  search: "search";
4183
- delete: "delete";
4184
4197
  list: "list";
4185
4198
  read: "read";
4186
4199
  write: "write";
4187
4200
  help: "help";
4188
4201
  edit: "edit";
4202
+ delete: "delete";
4189
4203
  }> & z.core.$partial, z.ZodEnum<{
4190
4204
  never: "never";
4191
4205
  allow: "allow";
@@ -4244,12 +4258,12 @@ export declare const KayAgentTargetManifest: z.ZodObject<{
4244
4258
  action: z.ZodString;
4245
4259
  operations: z.ZodExactOptional<z.ZodArray<z.ZodEnum<{
4246
4260
  search: "search";
4247
- delete: "delete";
4248
4261
  list: "list";
4249
4262
  read: "read";
4250
4263
  write: "write";
4251
4264
  help: "help";
4252
4265
  edit: "edit";
4266
+ delete: "delete";
4253
4267
  }>>>;
4254
4268
  routes: z.ZodExactOptional<z.ZodArray<z.ZodString>>;
4255
4269
  query: z.ZodExactOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
@@ -4257,12 +4271,12 @@ export declare const KayAgentTargetManifest: z.ZodObject<{
4257
4271
  public: z.ZodLiteral<true>;
4258
4272
  operations: z.ZodExactOptional<z.ZodArray<z.ZodEnum<{
4259
4273
  search: "search";
4260
- delete: "delete";
4261
4274
  list: "list";
4262
4275
  read: "read";
4263
4276
  write: "write";
4264
4277
  help: "help";
4265
4278
  edit: "edit";
4279
+ delete: "delete";
4266
4280
  }>>>;
4267
4281
  routes: z.ZodExactOptional<z.ZodArray<z.ZodString>>;
4268
4282
  query: z.ZodExactOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
@@ -4453,30 +4467,30 @@ export declare const KayAppTargetManifest: z.ZodObject<{
4453
4467
  description: z.ZodString;
4454
4468
  operations: z.ZodExactOptional<z.ZodArray<z.ZodEnum<{
4455
4469
  search: "search";
4456
- delete: "delete";
4457
4470
  list: "list";
4458
4471
  read: "read";
4459
4472
  write: "write";
4460
4473
  help: "help";
4461
4474
  edit: "edit";
4475
+ delete: "delete";
4462
4476
  }>>>;
4463
4477
  operationDocs: z.ZodExactOptional<z.ZodRecord<z.ZodEnum<{
4464
4478
  search: "search";
4465
- delete: "delete";
4466
4479
  list: "list";
4467
4480
  read: "read";
4468
4481
  write: "write";
4469
4482
  help: "help";
4470
4483
  edit: "edit";
4484
+ delete: "delete";
4471
4485
  }> & z.core.$partial, z.ZodString>>;
4472
4486
  operationDefaults: z.ZodExactOptional<z.ZodRecord<z.ZodEnum<{
4473
4487
  search: "search";
4474
- delete: "delete";
4475
4488
  list: "list";
4476
4489
  read: "read";
4477
4490
  write: "write";
4478
4491
  help: "help";
4479
4492
  edit: "edit";
4493
+ delete: "delete";
4480
4494
  }> & z.core.$partial, z.ZodEnum<{
4481
4495
  never: "never";
4482
4496
  allow: "allow";
@@ -4544,9 +4558,9 @@ export declare const KayAppTargetManifest: z.ZodObject<{
4544
4558
  dataSources: z.ZodOptional<z.ZodArray<z.ZodObject<{
4545
4559
  localId: z.ZodString;
4546
4560
  scope: z.ZodEnum<{
4547
- session: "session";
4548
4561
  runtime: "runtime";
4549
4562
  account: "account";
4563
+ session: "session";
4550
4564
  }>;
4551
4565
  snapshot: z.ZodObject<{
4552
4566
  version: z.ZodNumber;
@@ -4936,30 +4950,30 @@ export declare const KayPluginManifestV1: z.ZodObject<{
4936
4950
  description: z.ZodString;
4937
4951
  operations: z.ZodExactOptional<z.ZodArray<z.ZodEnum<{
4938
4952
  search: "search";
4939
- delete: "delete";
4940
4953
  list: "list";
4941
4954
  read: "read";
4942
4955
  write: "write";
4943
4956
  help: "help";
4944
4957
  edit: "edit";
4958
+ delete: "delete";
4945
4959
  }>>>;
4946
4960
  operationDocs: z.ZodExactOptional<z.ZodRecord<z.ZodEnum<{
4947
4961
  search: "search";
4948
- delete: "delete";
4949
4962
  list: "list";
4950
4963
  read: "read";
4951
4964
  write: "write";
4952
4965
  help: "help";
4953
4966
  edit: "edit";
4967
+ delete: "delete";
4954
4968
  }> & z.core.$partial, z.ZodString>>;
4955
4969
  operationDefaults: z.ZodExactOptional<z.ZodRecord<z.ZodEnum<{
4956
4970
  search: "search";
4957
- delete: "delete";
4958
4971
  list: "list";
4959
4972
  read: "read";
4960
4973
  write: "write";
4961
4974
  help: "help";
4962
4975
  edit: "edit";
4976
+ delete: "delete";
4963
4977
  }> & z.core.$partial, z.ZodEnum<{
4964
4978
  never: "never";
4965
4979
  allow: "allow";
@@ -5018,12 +5032,12 @@ export declare const KayPluginManifestV1: z.ZodObject<{
5018
5032
  action: z.ZodString;
5019
5033
  operations: z.ZodExactOptional<z.ZodArray<z.ZodEnum<{
5020
5034
  search: "search";
5021
- delete: "delete";
5022
5035
  list: "list";
5023
5036
  read: "read";
5024
5037
  write: "write";
5025
5038
  help: "help";
5026
5039
  edit: "edit";
5040
+ delete: "delete";
5027
5041
  }>>>;
5028
5042
  routes: z.ZodExactOptional<z.ZodArray<z.ZodString>>;
5029
5043
  query: z.ZodExactOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
@@ -5031,12 +5045,12 @@ export declare const KayPluginManifestV1: z.ZodObject<{
5031
5045
  public: z.ZodLiteral<true>;
5032
5046
  operations: z.ZodExactOptional<z.ZodArray<z.ZodEnum<{
5033
5047
  search: "search";
5034
- delete: "delete";
5035
5048
  list: "list";
5036
5049
  read: "read";
5037
5050
  write: "write";
5038
5051
  help: "help";
5039
5052
  edit: "edit";
5053
+ delete: "delete";
5040
5054
  }>>>;
5041
5055
  routes: z.ZodExactOptional<z.ZodArray<z.ZodString>>;
5042
5056
  query: z.ZodExactOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
@@ -5224,30 +5238,30 @@ export declare const KayPluginManifestV1: z.ZodObject<{
5224
5238
  description: z.ZodString;
5225
5239
  operations: z.ZodExactOptional<z.ZodArray<z.ZodEnum<{
5226
5240
  search: "search";
5227
- delete: "delete";
5228
5241
  list: "list";
5229
5242
  read: "read";
5230
5243
  write: "write";
5231
5244
  help: "help";
5232
5245
  edit: "edit";
5246
+ delete: "delete";
5233
5247
  }>>>;
5234
5248
  operationDocs: z.ZodExactOptional<z.ZodRecord<z.ZodEnum<{
5235
5249
  search: "search";
5236
- delete: "delete";
5237
5250
  list: "list";
5238
5251
  read: "read";
5239
5252
  write: "write";
5240
5253
  help: "help";
5241
5254
  edit: "edit";
5255
+ delete: "delete";
5242
5256
  }> & z.core.$partial, z.ZodString>>;
5243
5257
  operationDefaults: z.ZodExactOptional<z.ZodRecord<z.ZodEnum<{
5244
5258
  search: "search";
5245
- delete: "delete";
5246
5259
  list: "list";
5247
5260
  read: "read";
5248
5261
  write: "write";
5249
5262
  help: "help";
5250
5263
  edit: "edit";
5264
+ delete: "delete";
5251
5265
  }> & z.core.$partial, z.ZodEnum<{
5252
5266
  never: "never";
5253
5267
  allow: "allow";
@@ -5315,9 +5329,9 @@ export declare const KayPluginManifestV1: z.ZodObject<{
5315
5329
  dataSources: z.ZodOptional<z.ZodArray<z.ZodObject<{
5316
5330
  localId: z.ZodString;
5317
5331
  scope: z.ZodEnum<{
5318
- session: "session";
5319
5332
  runtime: "runtime";
5320
5333
  account: "account";
5334
+ session: "session";
5321
5335
  }>;
5322
5336
  snapshot: z.ZodObject<{
5323
5337
  version: z.ZodNumber;
@@ -5623,17 +5637,17 @@ export declare const KayPluginManifestV1: z.ZodObject<{
5623
5637
  capabilities: z.ZodOptional<z.ZodObject<{
5624
5638
  endpoints: z.ZodOptional<z.ZodArray<z.ZodString>>;
5625
5639
  host: z.ZodOptional<z.ZodArray<z.ZodEnum<{
5640
+ "navigation.open-session": "navigation.open-session";
5626
5641
  "sessions.create": "sessions.create";
5627
- "memory.read": "memory.read";
5628
- "skills.read": "skills.read";
5629
- "automations.run": "automations.run";
5630
5642
  "artifacts.read": "artifacts.read";
5631
- "navigation.open-session": "navigation.open-session";
5632
5643
  "artifacts.preview": "artifacts.preview";
5633
5644
  "cost.read": "cost.read";
5634
5645
  "billing.read": "billing.read";
5646
+ "skills.read": "skills.read";
5647
+ "memory.read": "memory.read";
5635
5648
  "self-improvement.read": "self-improvement.read";
5636
5649
  "automations.read": "automations.read";
5650
+ "automations.run": "automations.run";
5637
5651
  "shared-artifacts.read": "shared-artifacts.read";
5638
5652
  "workspace.place-pane": "workspace.place-pane";
5639
5653
  "workspace.pane-header": "workspace.pane-header";
@@ -5659,17 +5673,17 @@ export declare const KayPluginManifestV1: z.ZodObject<{
5659
5673
  capabilities: z.ZodOptional<z.ZodObject<{
5660
5674
  endpoints: z.ZodOptional<z.ZodArray<z.ZodString>>;
5661
5675
  host: z.ZodOptional<z.ZodArray<z.ZodEnum<{
5676
+ "navigation.open-session": "navigation.open-session";
5662
5677
  "sessions.create": "sessions.create";
5663
- "memory.read": "memory.read";
5664
- "skills.read": "skills.read";
5665
- "automations.run": "automations.run";
5666
5678
  "artifacts.read": "artifacts.read";
5667
- "navigation.open-session": "navigation.open-session";
5668
5679
  "artifacts.preview": "artifacts.preview";
5669
5680
  "cost.read": "cost.read";
5670
5681
  "billing.read": "billing.read";
5682
+ "skills.read": "skills.read";
5683
+ "memory.read": "memory.read";
5671
5684
  "self-improvement.read": "self-improvement.read";
5672
5685
  "automations.read": "automations.read";
5686
+ "automations.run": "automations.run";
5673
5687
  "shared-artifacts.read": "shared-artifacts.read";
5674
5688
  "workspace.place-pane": "workspace.place-pane";
5675
5689
  "workspace.pane-header": "workspace.pane-header";
@@ -5689,6 +5703,17 @@ export declare const KayPluginManifestV1: z.ZodObject<{
5689
5703
  primary: "primary";
5690
5704
  plugins: "plugins";
5691
5705
  }>>;
5706
+ badge: z.ZodOptional<z.ZodObject<{
5707
+ source: z.ZodString;
5708
+ where: z.ZodOptional<z.ZodString>;
5709
+ label: z.ZodObject<{
5710
+ one: z.ZodOptional<z.ZodString>;
5711
+ other: z.ZodString;
5712
+ }, z.core.$strict>;
5713
+ }, z.core.$strict>>;
5714
+ panel: z.ZodOptional<z.ZodObject<{
5715
+ body: z.ZodString;
5716
+ }, z.core.$strict>>;
5692
5717
  }, z.core.$strict>>>;
5693
5718
  themes: z.ZodOptional<z.ZodArray<z.ZodObject<{
5694
5719
  localId: z.ZodString;
@@ -5715,9 +5740,9 @@ export declare const KayPluginManifestV1: z.ZodObject<{
5715
5740
  schema: z.ZodRecord<z.ZodString, z.ZodType<authoringCommonSchemas.JsonValue, unknown, z.core.$ZodTypeInternals<authoringCommonSchemas.JsonValue, unknown>>>;
5716
5741
  defaults: z.ZodOptional<z.ZodType<authoringCommonSchemas.JsonValue, unknown, z.core.$ZodTypeInternals<authoringCommonSchemas.JsonValue, unknown>>>;
5717
5742
  scopes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
5718
- agent: "agent";
5719
5743
  global: "global";
5720
5744
  project: "project";
5745
+ agent: "agent";
5721
5746
  }>>>;
5722
5747
  }, z.core.$strict>>>;
5723
5748
  storage: z.ZodOptional<z.ZodObject<{
@@ -6506,17 +6531,17 @@ export declare interface KayPluginTreeReader {
6506
6531
  }
6507
6532
 
6508
6533
  export declare const KayUiAppHostCapability: z.ZodEnum<{
6534
+ "navigation.open-session": "navigation.open-session";
6509
6535
  "sessions.create": "sessions.create";
6510
- "memory.read": "memory.read";
6511
- "skills.read": "skills.read";
6512
- "automations.run": "automations.run";
6513
6536
  "artifacts.read": "artifacts.read";
6514
- "navigation.open-session": "navigation.open-session";
6515
6537
  "artifacts.preview": "artifacts.preview";
6516
6538
  "cost.read": "cost.read";
6517
6539
  "billing.read": "billing.read";
6540
+ "skills.read": "skills.read";
6541
+ "memory.read": "memory.read";
6518
6542
  "self-improvement.read": "self-improvement.read";
6519
6543
  "automations.read": "automations.read";
6544
+ "automations.run": "automations.run";
6520
6545
  "shared-artifacts.read": "shared-artifacts.read";
6521
6546
  "workspace.place-pane": "workspace.place-pane";
6522
6547
  "workspace.pane-header": "workspace.pane-header";
@@ -6717,17 +6742,17 @@ export declare const KayUiTargetManifest: z.ZodObject<{
6717
6742
  capabilities: z.ZodOptional<z.ZodObject<{
6718
6743
  endpoints: z.ZodOptional<z.ZodArray<z.ZodString>>;
6719
6744
  host: z.ZodOptional<z.ZodArray<z.ZodEnum<{
6745
+ "navigation.open-session": "navigation.open-session";
6720
6746
  "sessions.create": "sessions.create";
6721
- "memory.read": "memory.read";
6722
- "skills.read": "skills.read";
6723
- "automations.run": "automations.run";
6724
6747
  "artifacts.read": "artifacts.read";
6725
- "navigation.open-session": "navigation.open-session";
6726
6748
  "artifacts.preview": "artifacts.preview";
6727
6749
  "cost.read": "cost.read";
6728
6750
  "billing.read": "billing.read";
6751
+ "skills.read": "skills.read";
6752
+ "memory.read": "memory.read";
6729
6753
  "self-improvement.read": "self-improvement.read";
6730
6754
  "automations.read": "automations.read";
6755
+ "automations.run": "automations.run";
6731
6756
  "shared-artifacts.read": "shared-artifacts.read";
6732
6757
  "workspace.place-pane": "workspace.place-pane";
6733
6758
  "workspace.pane-header": "workspace.pane-header";
@@ -6753,17 +6778,17 @@ export declare const KayUiTargetManifest: z.ZodObject<{
6753
6778
  capabilities: z.ZodOptional<z.ZodObject<{
6754
6779
  endpoints: z.ZodOptional<z.ZodArray<z.ZodString>>;
6755
6780
  host: z.ZodOptional<z.ZodArray<z.ZodEnum<{
6781
+ "navigation.open-session": "navigation.open-session";
6756
6782
  "sessions.create": "sessions.create";
6757
- "memory.read": "memory.read";
6758
- "skills.read": "skills.read";
6759
- "automations.run": "automations.run";
6760
6783
  "artifacts.read": "artifacts.read";
6761
- "navigation.open-session": "navigation.open-session";
6762
6784
  "artifacts.preview": "artifacts.preview";
6763
6785
  "cost.read": "cost.read";
6764
6786
  "billing.read": "billing.read";
6787
+ "skills.read": "skills.read";
6788
+ "memory.read": "memory.read";
6765
6789
  "self-improvement.read": "self-improvement.read";
6766
6790
  "automations.read": "automations.read";
6791
+ "automations.run": "automations.run";
6767
6792
  "shared-artifacts.read": "shared-artifacts.read";
6768
6793
  "workspace.place-pane": "workspace.place-pane";
6769
6794
  "workspace.pane-header": "workspace.pane-header";
@@ -6783,6 +6808,17 @@ export declare const KayUiTargetManifest: z.ZodObject<{
6783
6808
  primary: "primary";
6784
6809
  plugins: "plugins";
6785
6810
  }>>;
6811
+ badge: z.ZodOptional<z.ZodObject<{
6812
+ source: z.ZodString;
6813
+ where: z.ZodOptional<z.ZodString>;
6814
+ label: z.ZodObject<{
6815
+ one: z.ZodOptional<z.ZodString>;
6816
+ other: z.ZodString;
6817
+ }, z.core.$strict>;
6818
+ }, z.core.$strict>>;
6819
+ panel: z.ZodOptional<z.ZodObject<{
6820
+ body: z.ZodString;
6821
+ }, z.core.$strict>>;
6786
6822
  }, z.core.$strict>>>;
6787
6823
  themes: z.ZodOptional<z.ZodArray<z.ZodObject<{
6788
6824
  localId: z.ZodString;
@@ -6953,10 +6989,10 @@ export declare function parseArtifactProvenanceCaptureContext(input: unknown): A
6953
6989
  export declare function parseArtifactProvenanceEnvelope(input: unknown): ArtifactProvenanceEnvelopeV1;
6954
6990
 
6955
6991
  /**
6956
- * Parses a declared command's `where`: `||`, `&&`, `!`, parentheses, `==`, `!=`, strings, `true`,
6957
- * `false` and dotted keys, for example `account.signedIn || app.channel != 'production'`.
6992
+ * Parses a declared command's `where`, for example
6993
+ * `account.signedIn || app.channel != 'production'`. Only the keys above parse.
6958
6994
  */
6959
- export declare function parseCommandWhere(source: string): CommandWhereParseResult;
6995
+ export declare function parseCommandWhere(source: string): WhereParseResult;
6960
6996
 
6961
6997
  /** A `MAJOR.MINOR.PATCH` version broken into its comparable parts. */
6962
6998
  export declare interface ParsedSemver {
@@ -6981,6 +7017,13 @@ export declare function parseResolvedPluginContractV1(value: unknown): ResolvedP
6981
7017
  /** Parses a version against {@link SEMVER_PATTERN}, or returns `undefined` if it isn't valid semver. */
6982
7018
  export declare function parseSemver(value: string): ParsedSemver | undefined;
6983
7019
 
7020
+ /**
7021
+ * Parses a `where` expression: `||`, `&&`, `!`, parentheses, `==`, `!=`, strings, `true`, `false`
7022
+ * and dotted keys, for example `markedForRetirement || proposedRewrite.stale == false`. A bare key
7023
+ * means "is set". With `keyTypes`, only those keys parse, and each is checked against its type.
7024
+ */
7025
+ export declare function parseWhere(source: string, keyTypes?: WhereKeyTypes): WhereParseResult;
7026
+
6984
7027
  /** Every capability slug {@link PluginCapabilityClaimV1} can express, for exhaustive table checks. */
6985
7028
  export declare const PLUGIN_CAPABILITY_SLUGS: readonly ["sessions.run", "network.connect", "web-session.request", "web-session.download", "process.spawn", "sessions.read", "signals.read", "memory.read", "memory.write", "skills.read", "skills.write", "skills.share", "plugins.set-enabled", "sessions.annotate", "sessions.compact", "soul.write", "tools.describe", "workspace.command", "sessions.create", "sessions.update", "models.complete", "systemOne.use", "automations.write", "automations.run", "workflows.define", "session-events.subscribe", "agents.run", "dynamic-context.register", "app-data.register", "knowledge-source.register", "artifacts.read", "account.assert", "account.update", "agents.permissions", "tool-interception.register", "interaction.surface", "config.declare-section", "auth.own-service", "auth.shared-identity", "cli.bind", "mcp.host-server", "prompt.resident", "skills.declared-source", "whiteboard.discover", "whiteboard.read", "whiteboard.create", "whiteboard.update", "whiteboard.remove", "model-selection.register", "system-prompt.register"];
6986
7029
 
@@ -9159,18 +9202,18 @@ export declare const PluginConfigManifest: z.ZodArray<z.ZodObject<{
9159
9202
  schema: z.ZodRecord<z.ZodString, z.ZodType<authoringCommonSchemas.JsonValue, unknown, z.core.$ZodTypeInternals<authoringCommonSchemas.JsonValue, unknown>>>;
9160
9203
  defaults: z.ZodOptional<z.ZodType<authoringCommonSchemas.JsonValue, unknown, z.core.$ZodTypeInternals<authoringCommonSchemas.JsonValue, unknown>>>;
9161
9204
  scopes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
9162
- agent: "agent";
9163
9205
  global: "global";
9164
9206
  project: "project";
9207
+ agent: "agent";
9165
9208
  }>>>;
9166
9209
  }, z.core.$strict>>;
9167
9210
 
9168
9211
  export declare type PluginConfigManifest = z.infer<typeof PluginConfigManifest>;
9169
9212
 
9170
9213
  export declare const PluginConfigScope: z.ZodEnum<{
9171
- agent: "agent";
9172
9214
  global: "global";
9173
9215
  project: "project";
9216
+ agent: "agent";
9174
9217
  }>;
9175
9218
 
9176
9219
  export declare type PluginConfigScope = z.infer<typeof PluginConfigScope>;
@@ -9180,23 +9223,23 @@ export declare const PluginConfigSectionManifest: z.ZodObject<{
9180
9223
  schema: z.ZodRecord<z.ZodString, z.ZodType<authoringCommonSchemas.JsonValue, unknown, z.core.$ZodTypeInternals<authoringCommonSchemas.JsonValue, unknown>>>;
9181
9224
  defaults: z.ZodOptional<z.ZodType<authoringCommonSchemas.JsonValue, unknown, z.core.$ZodTypeInternals<authoringCommonSchemas.JsonValue, unknown>>>;
9182
9225
  scopes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
9183
- agent: "agent";
9184
9226
  global: "global";
9185
9227
  project: "project";
9228
+ agent: "agent";
9186
9229
  }>>>;
9187
9230
  }, z.core.$strict>;
9188
9231
 
9189
9232
  export declare type PluginConfigSectionManifest = z.infer<typeof PluginConfigSectionManifest>;
9190
9233
 
9191
9234
  export declare const PluginContributionKind: z.ZodEnum<{
9235
+ endpoint: "endpoint";
9192
9236
  tool: "tool";
9193
9237
  resource: "resource";
9194
- endpoint: "endpoint";
9195
9238
  storage: "storage";
9196
- command: "command";
9197
9239
  uriModule: "uriModule";
9198
9240
  authService: "authService";
9199
9241
  app: "app";
9242
+ command: "command";
9200
9243
  configSection: "configSection";
9201
9244
  skill: "skill";
9202
9245
  converter: "converter";
@@ -10493,30 +10536,30 @@ export declare const ResolvedKayAgentUriModule: z.ZodObject<{
10493
10536
  description: z.ZodString;
10494
10537
  operations: z.ZodExactOptional<z.ZodArray<z.ZodEnum<{
10495
10538
  search: "search";
10496
- delete: "delete";
10497
10539
  list: "list";
10498
10540
  read: "read";
10499
10541
  write: "write";
10500
10542
  help: "help";
10501
10543
  edit: "edit";
10544
+ delete: "delete";
10502
10545
  }>>>;
10503
10546
  operationDocs: z.ZodExactOptional<z.ZodRecord<z.ZodEnum<{
10504
10547
  search: "search";
10505
- delete: "delete";
10506
10548
  list: "list";
10507
10549
  read: "read";
10508
10550
  write: "write";
10509
10551
  help: "help";
10510
10552
  edit: "edit";
10553
+ delete: "delete";
10511
10554
  }> & z.core.$partial, z.ZodString>>;
10512
10555
  operationDefaults: z.ZodExactOptional<z.ZodRecord<z.ZodEnum<{
10513
10556
  search: "search";
10514
- delete: "delete";
10515
10557
  list: "list";
10516
10558
  read: "read";
10517
10559
  write: "write";
10518
10560
  help: "help";
10519
10561
  edit: "edit";
10562
+ delete: "delete";
10520
10563
  }> & z.core.$partial, z.ZodEnum<{
10521
10564
  never: "never";
10522
10565
  allow: "allow";
@@ -10575,12 +10618,12 @@ export declare const ResolvedKayAgentUriModule: z.ZodObject<{
10575
10618
  action: z.ZodString;
10576
10619
  operations: z.ZodExactOptional<z.ZodArray<z.ZodEnum<{
10577
10620
  search: "search";
10578
- delete: "delete";
10579
10621
  list: "list";
10580
10622
  read: "read";
10581
10623
  write: "write";
10582
10624
  help: "help";
10583
10625
  edit: "edit";
10626
+ delete: "delete";
10584
10627
  }>>>;
10585
10628
  routes: z.ZodExactOptional<z.ZodArray<z.ZodString>>;
10586
10629
  query: z.ZodExactOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
@@ -10588,12 +10631,12 @@ export declare const ResolvedKayAgentUriModule: z.ZodObject<{
10588
10631
  public: z.ZodLiteral<true>;
10589
10632
  operations: z.ZodExactOptional<z.ZodArray<z.ZodEnum<{
10590
10633
  search: "search";
10591
- delete: "delete";
10592
10634
  list: "list";
10593
10635
  read: "read";
10594
10636
  write: "write";
10595
10637
  help: "help";
10596
10638
  edit: "edit";
10639
+ delete: "delete";
10597
10640
  }>>>;
10598
10641
  routes: z.ZodExactOptional<z.ZodArray<z.ZodString>>;
10599
10642
  query: z.ZodExactOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
@@ -10714,9 +10757,9 @@ export declare const ResolvedKayAppDataSource: z.ZodObject<{
10714
10757
  localId: z.ZodString;
10715
10758
  globalId: z.ZodString;
10716
10759
  scope: z.ZodEnum<{
10717
- session: "session";
10718
10760
  runtime: "runtime";
10719
10761
  account: "account";
10762
+ session: "session";
10720
10763
  }>;
10721
10764
  snapshot: z.ZodObject<{
10722
10765
  version: z.ZodNumber;
@@ -10835,17 +10878,17 @@ export declare const ResolvedKayUiApp: z.ZodObject<{
10835
10878
  globalId: z.ZodString;
10836
10879
  }, z.core.$strict>>>;
10837
10880
  host: z.ZodOptional<z.ZodArray<z.ZodEnum<{
10881
+ "navigation.open-session": "navigation.open-session";
10838
10882
  "sessions.create": "sessions.create";
10839
- "memory.read": "memory.read";
10840
- "skills.read": "skills.read";
10841
- "automations.run": "automations.run";
10842
10883
  "artifacts.read": "artifacts.read";
10843
- "navigation.open-session": "navigation.open-session";
10844
10884
  "artifacts.preview": "artifacts.preview";
10845
10885
  "cost.read": "cost.read";
10846
10886
  "billing.read": "billing.read";
10887
+ "skills.read": "skills.read";
10888
+ "memory.read": "memory.read";
10847
10889
  "self-improvement.read": "self-improvement.read";
10848
10890
  "automations.read": "automations.read";
10891
+ "automations.run": "automations.run";
10849
10892
  "shared-artifacts.read": "shared-artifacts.read";
10850
10893
  "workspace.place-pane": "workspace.place-pane";
10851
10894
  "workspace.pane-header": "workspace.pane-header";
@@ -11181,14 +11224,14 @@ export declare const ResolvedPluginContractV1: z.ZodObject<{
11181
11224
  "kay.ui": "kay.ui";
11182
11225
  }>;
11183
11226
  kind: z.ZodEnum<{
11227
+ endpoint: "endpoint";
11184
11228
  tool: "tool";
11185
11229
  resource: "resource";
11186
- endpoint: "endpoint";
11187
11230
  storage: "storage";
11188
- command: "command";
11189
11231
  uriModule: "uriModule";
11190
11232
  authService: "authService";
11191
11233
  app: "app";
11234
+ command: "command";
11192
11235
  configSection: "configSection";
11193
11236
  skill: "skill";
11194
11237
  converter: "converter";
@@ -11709,30 +11752,30 @@ export declare const ResolvedPluginContractV1: z.ZodObject<{
11709
11752
  description: z.ZodString;
11710
11753
  operations: z.ZodExactOptional<z.ZodArray<z.ZodEnum<{
11711
11754
  search: "search";
11712
- delete: "delete";
11713
11755
  list: "list";
11714
11756
  read: "read";
11715
11757
  write: "write";
11716
11758
  help: "help";
11717
11759
  edit: "edit";
11760
+ delete: "delete";
11718
11761
  }>>>;
11719
11762
  operationDocs: z.ZodExactOptional<z.ZodRecord<z.ZodEnum<{
11720
11763
  search: "search";
11721
- delete: "delete";
11722
11764
  list: "list";
11723
11765
  read: "read";
11724
11766
  write: "write";
11725
11767
  help: "help";
11726
11768
  edit: "edit";
11769
+ delete: "delete";
11727
11770
  }> & z.core.$partial, z.ZodString>>;
11728
11771
  operationDefaults: z.ZodExactOptional<z.ZodRecord<z.ZodEnum<{
11729
11772
  search: "search";
11730
- delete: "delete";
11731
11773
  list: "list";
11732
11774
  read: "read";
11733
11775
  write: "write";
11734
11776
  help: "help";
11735
11777
  edit: "edit";
11778
+ delete: "delete";
11736
11779
  }> & z.core.$partial, z.ZodEnum<{
11737
11780
  never: "never";
11738
11781
  allow: "allow";
@@ -11791,12 +11834,12 @@ export declare const ResolvedPluginContractV1: z.ZodObject<{
11791
11834
  action: z.ZodString;
11792
11835
  operations: z.ZodExactOptional<z.ZodArray<z.ZodEnum<{
11793
11836
  search: "search";
11794
- delete: "delete";
11795
11837
  list: "list";
11796
11838
  read: "read";
11797
11839
  write: "write";
11798
11840
  help: "help";
11799
11841
  edit: "edit";
11842
+ delete: "delete";
11800
11843
  }>>>;
11801
11844
  routes: z.ZodExactOptional<z.ZodArray<z.ZodString>>;
11802
11845
  query: z.ZodExactOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
@@ -11804,12 +11847,12 @@ export declare const ResolvedPluginContractV1: z.ZodObject<{
11804
11847
  public: z.ZodLiteral<true>;
11805
11848
  operations: z.ZodExactOptional<z.ZodArray<z.ZodEnum<{
11806
11849
  search: "search";
11807
- delete: "delete";
11808
11850
  list: "list";
11809
11851
  read: "read";
11810
11852
  write: "write";
11811
11853
  help: "help";
11812
11854
  edit: "edit";
11855
+ delete: "delete";
11813
11856
  }>>>;
11814
11857
  routes: z.ZodExactOptional<z.ZodArray<z.ZodString>>;
11815
11858
  query: z.ZodExactOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
@@ -11991,9 +12034,9 @@ export declare const ResolvedPluginContractV1: z.ZodObject<{
11991
12034
  localId: z.ZodString;
11992
12035
  globalId: z.ZodString;
11993
12036
  scope: z.ZodEnum<{
11994
- session: "session";
11995
12037
  runtime: "runtime";
11996
12038
  account: "account";
12039
+ session: "session";
11997
12040
  }>;
11998
12041
  snapshot: z.ZodObject<{
11999
12042
  version: z.ZodNumber;
@@ -12127,17 +12170,17 @@ export declare const ResolvedPluginContractV1: z.ZodObject<{
12127
12170
  globalId: z.ZodString;
12128
12171
  }, z.core.$strict>>>;
12129
12172
  host: z.ZodOptional<z.ZodArray<z.ZodEnum<{
12173
+ "navigation.open-session": "navigation.open-session";
12130
12174
  "sessions.create": "sessions.create";
12131
- "memory.read": "memory.read";
12132
- "skills.read": "skills.read";
12133
- "automations.run": "automations.run";
12134
12175
  "artifacts.read": "artifacts.read";
12135
- "navigation.open-session": "navigation.open-session";
12136
12176
  "artifacts.preview": "artifacts.preview";
12137
12177
  "cost.read": "cost.read";
12138
12178
  "billing.read": "billing.read";
12179
+ "skills.read": "skills.read";
12180
+ "memory.read": "memory.read";
12139
12181
  "self-improvement.read": "self-improvement.read";
12140
12182
  "automations.read": "automations.read";
12183
+ "automations.run": "automations.run";
12141
12184
  "shared-artifacts.read": "shared-artifacts.read";
12142
12185
  "workspace.place-pane": "workspace.place-pane";
12143
12186
  "workspace.pane-header": "workspace.pane-header";
@@ -12156,14 +12199,14 @@ export declare const ResolvedPluginContributionId: z.ZodObject<{
12156
12199
  "kay.ui": "kay.ui";
12157
12200
  }>;
12158
12201
  kind: z.ZodEnum<{
12202
+ endpoint: "endpoint";
12159
12203
  tool: "tool";
12160
12204
  resource: "resource";
12161
- endpoint: "endpoint";
12162
12205
  storage: "storage";
12163
- command: "command";
12164
12206
  uriModule: "uriModule";
12165
12207
  authService: "authService";
12166
12208
  app: "app";
12209
+ command: "command";
12167
12210
  configSection: "configSection";
12168
12211
  skill: "skill";
12169
12212
  converter: "converter";
@@ -12789,6 +12832,9 @@ export declare const RichViewContribution: z.ZodObject<{
12789
12832
 
12790
12833
  export declare type RichViewContribution = z.infer<typeof RichViewContribution>;
12791
12834
 
12835
+ /** Whether a `where` holds for one row. A field the row doesn't have is absent, not unknown. */
12836
+ export declare function rowMatchesWhere(where: Where, row: Readonly<Record<string, unknown>>): boolean;
12837
+
12792
12838
  /**
12793
12839
  * Resolves a manifest without throwing for known contract resolution failures.
12794
12840
  *
@@ -13711,17 +13757,17 @@ export declare interface TurnPacketMessage {
13711
13757
  export declare const UiAppCapabilities: z.ZodObject<{
13712
13758
  endpoints: z.ZodOptional<z.ZodArray<z.ZodString>>;
13713
13759
  host: z.ZodOptional<z.ZodArray<z.ZodEnum<{
13760
+ "navigation.open-session": "navigation.open-session";
13714
13761
  "sessions.create": "sessions.create";
13715
- "memory.read": "memory.read";
13716
- "skills.read": "skills.read";
13717
- "automations.run": "automations.run";
13718
13762
  "artifacts.read": "artifacts.read";
13719
- "navigation.open-session": "navigation.open-session";
13720
13763
  "artifacts.preview": "artifacts.preview";
13721
13764
  "cost.read": "cost.read";
13722
13765
  "billing.read": "billing.read";
13766
+ "skills.read": "skills.read";
13767
+ "memory.read": "memory.read";
13723
13768
  "self-improvement.read": "self-improvement.read";
13724
13769
  "automations.read": "automations.read";
13770
+ "automations.run": "automations.run";
13725
13771
  "shared-artifacts.read": "shared-artifacts.read";
13726
13772
  "workspace.place-pane": "workspace.place-pane";
13727
13773
  "workspace.pane-header": "workspace.pane-header";
@@ -13750,17 +13796,17 @@ export declare const UiAppContribution: z.ZodObject<{
13750
13796
  capabilities: z.ZodOptional<z.ZodObject<{
13751
13797
  endpoints: z.ZodOptional<z.ZodArray<z.ZodString>>;
13752
13798
  host: z.ZodOptional<z.ZodArray<z.ZodEnum<{
13799
+ "navigation.open-session": "navigation.open-session";
13753
13800
  "sessions.create": "sessions.create";
13754
- "memory.read": "memory.read";
13755
- "skills.read": "skills.read";
13756
- "automations.run": "automations.run";
13757
13801
  "artifacts.read": "artifacts.read";
13758
- "navigation.open-session": "navigation.open-session";
13759
13802
  "artifacts.preview": "artifacts.preview";
13760
13803
  "cost.read": "cost.read";
13761
13804
  "billing.read": "billing.read";
13805
+ "skills.read": "skills.read";
13806
+ "memory.read": "memory.read";
13762
13807
  "self-improvement.read": "self-improvement.read";
13763
13808
  "automations.read": "automations.read";
13809
+ "automations.run": "automations.run";
13764
13810
  "shared-artifacts.read": "shared-artifacts.read";
13765
13811
  "workspace.place-pane": "workspace.place-pane";
13766
13812
  "workspace.pane-header": "workspace.pane-header";
@@ -13786,17 +13832,17 @@ export declare const UiAppContribution: z.ZodObject<{
13786
13832
  capabilities: z.ZodOptional<z.ZodObject<{
13787
13833
  endpoints: z.ZodOptional<z.ZodArray<z.ZodString>>;
13788
13834
  host: z.ZodOptional<z.ZodArray<z.ZodEnum<{
13835
+ "navigation.open-session": "navigation.open-session";
13789
13836
  "sessions.create": "sessions.create";
13790
- "memory.read": "memory.read";
13791
- "skills.read": "skills.read";
13792
- "automations.run": "automations.run";
13793
13837
  "artifacts.read": "artifacts.read";
13794
- "navigation.open-session": "navigation.open-session";
13795
13838
  "artifacts.preview": "artifacts.preview";
13796
13839
  "cost.read": "cost.read";
13797
13840
  "billing.read": "billing.read";
13841
+ "skills.read": "skills.read";
13842
+ "memory.read": "memory.read";
13798
13843
  "self-improvement.read": "self-improvement.read";
13799
13844
  "automations.read": "automations.read";
13845
+ "automations.run": "automations.run";
13800
13846
  "shared-artifacts.read": "shared-artifacts.read";
13801
13847
  "workspace.place-pane": "workspace.place-pane";
13802
13848
  "workspace.pane-header": "workspace.pane-header";
@@ -13843,6 +13889,17 @@ export declare const UiRailEntryContribution: z.ZodObject<{
13843
13889
  primary: "primary";
13844
13890
  plugins: "plugins";
13845
13891
  }>>;
13892
+ badge: z.ZodOptional<z.ZodObject<{
13893
+ source: z.ZodString;
13894
+ where: z.ZodOptional<z.ZodString>;
13895
+ label: z.ZodObject<{
13896
+ one: z.ZodOptional<z.ZodString>;
13897
+ other: z.ZodString;
13898
+ }, z.core.$strict>;
13899
+ }, z.core.$strict>>;
13900
+ panel: z.ZodOptional<z.ZodObject<{
13901
+ body: z.ZodString;
13902
+ }, z.core.$strict>>;
13846
13903
  }, z.core.$strict>;
13847
13904
 
13848
13905
  export declare type UiRailEntryContribution = z.infer<typeof UiRailEntryContribution>;
@@ -13893,30 +13950,30 @@ export declare const UriModuleContribution: z.ZodObject<{
13893
13950
  description: z.ZodString;
13894
13951
  operations: z.ZodExactOptional<z.ZodArray<z.ZodEnum<{
13895
13952
  search: "search";
13896
- delete: "delete";
13897
13953
  list: "list";
13898
13954
  read: "read";
13899
13955
  write: "write";
13900
13956
  help: "help";
13901
13957
  edit: "edit";
13958
+ delete: "delete";
13902
13959
  }>>>;
13903
13960
  operationDocs: z.ZodExactOptional<z.ZodRecord<z.ZodEnum<{
13904
13961
  search: "search";
13905
- delete: "delete";
13906
13962
  list: "list";
13907
13963
  read: "read";
13908
13964
  write: "write";
13909
13965
  help: "help";
13910
13966
  edit: "edit";
13967
+ delete: "delete";
13911
13968
  }> & z.core.$partial, z.ZodString>>;
13912
13969
  operationDefaults: z.ZodExactOptional<z.ZodRecord<z.ZodEnum<{
13913
13970
  search: "search";
13914
- delete: "delete";
13915
13971
  list: "list";
13916
13972
  read: "read";
13917
13973
  write: "write";
13918
13974
  help: "help";
13919
13975
  edit: "edit";
13976
+ delete: "delete";
13920
13977
  }> & z.core.$partial, z.ZodEnum<{
13921
13978
  never: "never";
13922
13979
  allow: "allow";
@@ -13975,12 +14032,12 @@ export declare const UriModuleContribution: z.ZodObject<{
13975
14032
  action: z.ZodString;
13976
14033
  operations: z.ZodExactOptional<z.ZodArray<z.ZodEnum<{
13977
14034
  search: "search";
13978
- delete: "delete";
13979
14035
  list: "list";
13980
14036
  read: "read";
13981
14037
  write: "write";
13982
14038
  help: "help";
13983
14039
  edit: "edit";
14040
+ delete: "delete";
13984
14041
  }>>>;
13985
14042
  routes: z.ZodExactOptional<z.ZodArray<z.ZodString>>;
13986
14043
  query: z.ZodExactOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
@@ -13988,12 +14045,12 @@ export declare const UriModuleContribution: z.ZodObject<{
13988
14045
  public: z.ZodLiteral<true>;
13989
14046
  operations: z.ZodExactOptional<z.ZodArray<z.ZodEnum<{
13990
14047
  search: "search";
13991
- delete: "delete";
13992
14048
  list: "list";
13993
14049
  read: "read";
13994
14050
  write: "write";
13995
14051
  help: "help";
13996
14052
  edit: "edit";
14053
+ delete: "delete";
13997
14054
  }>>>;
13998
14055
  routes: z.ZodExactOptional<z.ZodArray<z.ZodString>>;
13999
14056
  query: z.ZodExactOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
@@ -14060,30 +14117,30 @@ declare const UriModuleFacts: z.ZodObject<{
14060
14117
  description: z.ZodString;
14061
14118
  operations: z.ZodExactOptional<z.ZodArray<z.ZodEnum<{
14062
14119
  search: "search";
14063
- delete: "delete";
14064
14120
  list: "list";
14065
14121
  read: "read";
14066
14122
  write: "write";
14067
14123
  help: "help";
14068
14124
  edit: "edit";
14125
+ delete: "delete";
14069
14126
  }>>>;
14070
14127
  operationDocs: z.ZodExactOptional<z.ZodRecord<z.ZodEnum<{
14071
14128
  search: "search";
14072
- delete: "delete";
14073
14129
  list: "list";
14074
14130
  read: "read";
14075
14131
  write: "write";
14076
14132
  help: "help";
14077
14133
  edit: "edit";
14134
+ delete: "delete";
14078
14135
  }> & z.core.$partial, z.ZodString>>;
14079
14136
  operationDefaults: z.ZodExactOptional<z.ZodRecord<z.ZodEnum<{
14080
14137
  search: "search";
14081
- delete: "delete";
14082
14138
  list: "list";
14083
14139
  read: "read";
14084
14140
  write: "write";
14085
14141
  help: "help";
14086
14142
  edit: "edit";
14143
+ delete: "delete";
14087
14144
  }> & z.core.$partial, z.ZodEnum<{
14088
14145
  never: "never";
14089
14146
  allow: "allow";
@@ -14142,12 +14199,12 @@ declare const UriModuleFacts: z.ZodObject<{
14142
14199
  action: z.ZodString;
14143
14200
  operations: z.ZodExactOptional<z.ZodArray<z.ZodEnum<{
14144
14201
  search: "search";
14145
- delete: "delete";
14146
14202
  list: "list";
14147
14203
  read: "read";
14148
14204
  write: "write";
14149
14205
  help: "help";
14150
14206
  edit: "edit";
14207
+ delete: "delete";
14151
14208
  }>>>;
14152
14209
  routes: z.ZodExactOptional<z.ZodArray<z.ZodString>>;
14153
14210
  query: z.ZodExactOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
@@ -14155,12 +14212,12 @@ declare const UriModuleFacts: z.ZodObject<{
14155
14212
  public: z.ZodLiteral<true>;
14156
14213
  operations: z.ZodExactOptional<z.ZodArray<z.ZodEnum<{
14157
14214
  search: "search";
14158
- delete: "delete";
14159
14215
  list: "list";
14160
14216
  read: "read";
14161
14217
  write: "write";
14162
14218
  help: "help";
14163
14219
  edit: "edit";
14220
+ delete: "delete";
14164
14221
  }>>>;
14165
14222
  routes: z.ZodExactOptional<z.ZodArray<z.ZodString>>;
14166
14223
  query: z.ZodExactOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
@@ -14244,12 +14301,43 @@ export declare type WebSessionGrantRequest = z.infer<typeof WebSessionGrantReque
14244
14301
  */
14245
14302
  export declare function webSessionPathWithinPrefix(pathname: string, pathPrefix: string): boolean;
14246
14303
 
14247
- /** What a `where` expression can read, and the type of each. */
14304
+ export declare type Where = {
14305
+ readonly kind: "literal";
14306
+ readonly value: boolean;
14307
+ } | {
14308
+ readonly kind: "key";
14309
+ readonly key: string;
14310
+ } | {
14311
+ readonly kind: "equals";
14312
+ readonly key: string;
14313
+ readonly value: boolean | string;
14314
+ readonly negated: boolean;
14315
+ } | {
14316
+ readonly kind: "not";
14317
+ readonly operand: Where;
14318
+ } | {
14319
+ readonly kind: "and" | "or";
14320
+ readonly left: Where;
14321
+ readonly right: Where;
14322
+ };
14323
+
14324
+ /** What a command's `where` can read, and the type of each. */
14248
14325
  declare const WHERE_KEY_TYPES: {
14249
14326
  readonly "account.signedIn": "boolean";
14250
14327
  readonly "app.channel": "string";
14251
14328
  };
14252
14329
 
14330
+ /** What a caller's keys are, when it has a fixed set. A bare string key must be compared. */
14331
+ export declare type WhereKeyTypes = Readonly<Record<string, "boolean" | "string">>;
14332
+
14333
+ export declare type WhereParseResult = {
14334
+ readonly ok: true;
14335
+ readonly where: Where;
14336
+ } | {
14337
+ readonly ok: false;
14338
+ readonly message: string;
14339
+ };
14340
+
14253
14341
  /** Construct the exact claim row for one Whiteboard scope and operation. */
14254
14342
  export declare function whiteboardCapabilityClaim(operation: WhiteboardCapabilityOperation, scope: WhiteboardCapabilityScope, target?: "kay.agent"): WhiteboardCapabilityClaimV1;
14255
14343
 
@@ -14278,9 +14366,9 @@ export declare const WhiteboardCapabilityClaimV1: z.ZodObject<{
14278
14366
  export declare type WhiteboardCapabilityClaimV1 = z.infer<typeof WhiteboardCapabilityClaimV1>;
14279
14367
 
14280
14368
  export declare const WhiteboardCapabilityOperation: z.ZodEnum<{
14369
+ read: "read";
14281
14370
  create: "create";
14282
14371
  update: "update";
14283
- read: "read";
14284
14372
  discover: "discover";
14285
14373
  remove: "remove";
14286
14374
  }>;