@yaklabs-ai/plugin-protocol 0.34.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,14 @@ 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>>;
2742
2769
  panel: z.ZodOptional<z.ZodObject<{
2743
2770
  body: z.ZodString;
2744
2771
  }, z.core.$strict>>;
@@ -2762,17 +2789,17 @@ declare const canonicalContributionSchemas: {
2762
2789
  capabilities: z.ZodOptional<z.ZodObject<{
2763
2790
  endpoints: z.ZodOptional<z.ZodArray<z.ZodString>>;
2764
2791
  host: z.ZodOptional<z.ZodArray<z.ZodEnum<{
2792
+ "navigation.open-session": "navigation.open-session";
2765
2793
  "sessions.create": "sessions.create";
2766
- "memory.read": "memory.read";
2767
- "skills.read": "skills.read";
2768
- "automations.run": "automations.run";
2769
2794
  "artifacts.read": "artifacts.read";
2770
- "navigation.open-session": "navigation.open-session";
2771
2795
  "artifacts.preview": "artifacts.preview";
2772
2796
  "cost.read": "cost.read";
2773
2797
  "billing.read": "billing.read";
2798
+ "skills.read": "skills.read";
2799
+ "memory.read": "memory.read";
2774
2800
  "self-improvement.read": "self-improvement.read";
2775
2801
  "automations.read": "automations.read";
2802
+ "automations.run": "automations.run";
2776
2803
  "shared-artifacts.read": "shared-artifacts.read";
2777
2804
  "workspace.place-pane": "workspace.place-pane";
2778
2805
  "workspace.pane-header": "workspace.pane-header";
@@ -2798,17 +2825,17 @@ declare const canonicalContributionSchemas: {
2798
2825
  capabilities: z.ZodOptional<z.ZodObject<{
2799
2826
  endpoints: z.ZodOptional<z.ZodArray<z.ZodString>>;
2800
2827
  host: z.ZodOptional<z.ZodArray<z.ZodEnum<{
2828
+ "navigation.open-session": "navigation.open-session";
2801
2829
  "sessions.create": "sessions.create";
2802
- "memory.read": "memory.read";
2803
- "skills.read": "skills.read";
2804
- "automations.run": "automations.run";
2805
2830
  "artifacts.read": "artifacts.read";
2806
- "navigation.open-session": "navigation.open-session";
2807
2831
  "artifacts.preview": "artifacts.preview";
2808
2832
  "cost.read": "cost.read";
2809
2833
  "billing.read": "billing.read";
2834
+ "skills.read": "skills.read";
2835
+ "memory.read": "memory.read";
2810
2836
  "self-improvement.read": "self-improvement.read";
2811
2837
  "automations.read": "automations.read";
2838
+ "automations.run": "automations.run";
2812
2839
  "shared-artifacts.read": "shared-artifacts.read";
2813
2840
  "workspace.place-pane": "workspace.place-pane";
2814
2841
  "workspace.pane-header": "workspace.pane-header";
@@ -2855,14 +2882,14 @@ declare const canonicalContributionSchemas: {
2855
2882
  }, z.core.$strict>], "kind">;
2856
2883
  }, z.core.$strict>;
2857
2884
  PluginContributionKind: z.ZodEnum<{
2885
+ endpoint: "endpoint";
2858
2886
  tool: "tool";
2859
2887
  resource: "resource";
2860
- endpoint: "endpoint";
2861
2888
  storage: "storage";
2862
- command: "command";
2863
2889
  uriModule: "uriModule";
2864
2890
  authService: "authService";
2865
2891
  app: "app";
2892
+ command: "command";
2866
2893
  configSection: "configSection";
2867
2894
  skill: "skill";
2868
2895
  converter: "converter";
@@ -3000,36 +3027,8 @@ export declare const CommandHandler: z.ZodDiscriminatedUnion<[z.ZodObject<{
3000
3027
 
3001
3028
  export declare type CommandHandler = z.infer<typeof CommandHandler>;
3002
3029
 
3003
- export declare type CommandWhere = {
3004
- readonly kind: "literal";
3005
- readonly value: boolean;
3006
- } | {
3007
- readonly kind: "key";
3008
- readonly key: CommandWhereKey;
3009
- } | {
3010
- readonly kind: "equals";
3011
- readonly key: CommandWhereKey;
3012
- readonly value: boolean | string;
3013
- readonly negated: boolean;
3014
- } | {
3015
- readonly kind: "not";
3016
- readonly operand: CommandWhere;
3017
- } | {
3018
- readonly kind: "and" | "or";
3019
- readonly left: CommandWhere;
3020
- readonly right: CommandWhere;
3021
- };
3022
-
3023
3030
  export declare type CommandWhereKey = keyof typeof WHERE_KEY_TYPES;
3024
3031
 
3025
- export declare type CommandWhereParseResult = {
3026
- readonly ok: true;
3027
- readonly where: CommandWhere;
3028
- } | {
3029
- readonly ok: false;
3030
- readonly message: string;
3031
- };
3032
-
3033
3032
  /** The values a `where` reads. A key left out isn't known yet, for example while it loads. */
3034
3033
  export declare type CommandWhereValues = {
3035
3034
  readonly [K in CommandWhereKey]?: (typeof WHERE_KEY_TYPES)[K] extends "boolean" ? boolean : string;
@@ -3145,9 +3144,9 @@ export declare const CorpusResourceInvocationQuery: z.ZodObject<{
3145
3144
  }, z.core.$strict>>;
3146
3145
  limit: z.ZodOptional<z.ZodNumber>;
3147
3146
  rootCreatedByKind: z.ZodOptional<z.ZodEnum<{
3147
+ agent: "agent";
3148
3148
  plugin: "plugin";
3149
3149
  human: "human";
3150
- agent: "agent";
3151
3150
  trigger: "trigger";
3152
3151
  daemon: "daemon";
3153
3152
  }>>;
@@ -3282,12 +3281,15 @@ export declare const EntityResolverContribution: z.ZodObject<{
3282
3281
 
3283
3282
  export declare type EntityResolverContribution = z.infer<typeof EntityResolverContribution>;
3284
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
+
3285
3287
  /**
3286
- * Whether a `where` holds. When the answer depends on a value not known yet the result is false,
3287
- * so a button stays hidden while a value loads rather than flashing on: `true || app.channel == 'x'`
3288
- * 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.
3289
3291
  */
3290
- export declare function evaluateCommandWhere(where: CommandWhere, values: CommandWhereValues): boolean;
3292
+ export declare function evaluateWhere(where: Where, read: (key: string) => unknown): boolean;
3291
3293
 
3292
3294
  export declare const EventGrantRequest: z.ZodObject<{
3293
3295
  event: z.ZodString;
@@ -4080,8 +4082,13 @@ export declare const KAY_PLUGIN_PROTOCOL_VERSION: "kay.plugin.v1";
4080
4082
  * 0.34.0 lets a rail entry declare a sidebar (#15901). `panel.body` on a `railEntries` entry names
4081
4083
  * what fills it, either a `contextOnly` app in the plugin or a body the host ships. Additive: a rail
4082
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.
4083
4090
  */
4084
- export declare const KAY_PLUGIN_SDK_VERSION: "0.34.0";
4091
+ export declare const KAY_PLUGIN_SDK_VERSION: "0.35.0";
4085
4092
 
4086
4093
  export declare const KAY_PLUGIN_TARGET_NAMES: readonly ["kay.agent", "kay.app", "kay.ui"];
4087
4094
 
@@ -4169,30 +4176,30 @@ export declare const KayAgentTargetManifest: z.ZodObject<{
4169
4176
  description: z.ZodString;
4170
4177
  operations: z.ZodExactOptional<z.ZodArray<z.ZodEnum<{
4171
4178
  search: "search";
4172
- delete: "delete";
4173
4179
  list: "list";
4174
4180
  read: "read";
4175
4181
  write: "write";
4176
4182
  help: "help";
4177
4183
  edit: "edit";
4184
+ delete: "delete";
4178
4185
  }>>>;
4179
4186
  operationDocs: z.ZodExactOptional<z.ZodRecord<z.ZodEnum<{
4180
4187
  search: "search";
4181
- delete: "delete";
4182
4188
  list: "list";
4183
4189
  read: "read";
4184
4190
  write: "write";
4185
4191
  help: "help";
4186
4192
  edit: "edit";
4193
+ delete: "delete";
4187
4194
  }> & z.core.$partial, z.ZodString>>;
4188
4195
  operationDefaults: z.ZodExactOptional<z.ZodRecord<z.ZodEnum<{
4189
4196
  search: "search";
4190
- delete: "delete";
4191
4197
  list: "list";
4192
4198
  read: "read";
4193
4199
  write: "write";
4194
4200
  help: "help";
4195
4201
  edit: "edit";
4202
+ delete: "delete";
4196
4203
  }> & z.core.$partial, z.ZodEnum<{
4197
4204
  never: "never";
4198
4205
  allow: "allow";
@@ -4251,12 +4258,12 @@ export declare const KayAgentTargetManifest: z.ZodObject<{
4251
4258
  action: z.ZodString;
4252
4259
  operations: z.ZodExactOptional<z.ZodArray<z.ZodEnum<{
4253
4260
  search: "search";
4254
- delete: "delete";
4255
4261
  list: "list";
4256
4262
  read: "read";
4257
4263
  write: "write";
4258
4264
  help: "help";
4259
4265
  edit: "edit";
4266
+ delete: "delete";
4260
4267
  }>>>;
4261
4268
  routes: z.ZodExactOptional<z.ZodArray<z.ZodString>>;
4262
4269
  query: z.ZodExactOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
@@ -4264,12 +4271,12 @@ export declare const KayAgentTargetManifest: z.ZodObject<{
4264
4271
  public: z.ZodLiteral<true>;
4265
4272
  operations: z.ZodExactOptional<z.ZodArray<z.ZodEnum<{
4266
4273
  search: "search";
4267
- delete: "delete";
4268
4274
  list: "list";
4269
4275
  read: "read";
4270
4276
  write: "write";
4271
4277
  help: "help";
4272
4278
  edit: "edit";
4279
+ delete: "delete";
4273
4280
  }>>>;
4274
4281
  routes: z.ZodExactOptional<z.ZodArray<z.ZodString>>;
4275
4282
  query: z.ZodExactOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
@@ -4460,30 +4467,30 @@ export declare const KayAppTargetManifest: z.ZodObject<{
4460
4467
  description: z.ZodString;
4461
4468
  operations: z.ZodExactOptional<z.ZodArray<z.ZodEnum<{
4462
4469
  search: "search";
4463
- delete: "delete";
4464
4470
  list: "list";
4465
4471
  read: "read";
4466
4472
  write: "write";
4467
4473
  help: "help";
4468
4474
  edit: "edit";
4475
+ delete: "delete";
4469
4476
  }>>>;
4470
4477
  operationDocs: z.ZodExactOptional<z.ZodRecord<z.ZodEnum<{
4471
4478
  search: "search";
4472
- delete: "delete";
4473
4479
  list: "list";
4474
4480
  read: "read";
4475
4481
  write: "write";
4476
4482
  help: "help";
4477
4483
  edit: "edit";
4484
+ delete: "delete";
4478
4485
  }> & z.core.$partial, z.ZodString>>;
4479
4486
  operationDefaults: z.ZodExactOptional<z.ZodRecord<z.ZodEnum<{
4480
4487
  search: "search";
4481
- delete: "delete";
4482
4488
  list: "list";
4483
4489
  read: "read";
4484
4490
  write: "write";
4485
4491
  help: "help";
4486
4492
  edit: "edit";
4493
+ delete: "delete";
4487
4494
  }> & z.core.$partial, z.ZodEnum<{
4488
4495
  never: "never";
4489
4496
  allow: "allow";
@@ -4551,9 +4558,9 @@ export declare const KayAppTargetManifest: z.ZodObject<{
4551
4558
  dataSources: z.ZodOptional<z.ZodArray<z.ZodObject<{
4552
4559
  localId: z.ZodString;
4553
4560
  scope: z.ZodEnum<{
4554
- session: "session";
4555
4561
  runtime: "runtime";
4556
4562
  account: "account";
4563
+ session: "session";
4557
4564
  }>;
4558
4565
  snapshot: z.ZodObject<{
4559
4566
  version: z.ZodNumber;
@@ -4943,30 +4950,30 @@ export declare const KayPluginManifestV1: z.ZodObject<{
4943
4950
  description: z.ZodString;
4944
4951
  operations: z.ZodExactOptional<z.ZodArray<z.ZodEnum<{
4945
4952
  search: "search";
4946
- delete: "delete";
4947
4953
  list: "list";
4948
4954
  read: "read";
4949
4955
  write: "write";
4950
4956
  help: "help";
4951
4957
  edit: "edit";
4958
+ delete: "delete";
4952
4959
  }>>>;
4953
4960
  operationDocs: z.ZodExactOptional<z.ZodRecord<z.ZodEnum<{
4954
4961
  search: "search";
4955
- delete: "delete";
4956
4962
  list: "list";
4957
4963
  read: "read";
4958
4964
  write: "write";
4959
4965
  help: "help";
4960
4966
  edit: "edit";
4967
+ delete: "delete";
4961
4968
  }> & z.core.$partial, z.ZodString>>;
4962
4969
  operationDefaults: z.ZodExactOptional<z.ZodRecord<z.ZodEnum<{
4963
4970
  search: "search";
4964
- delete: "delete";
4965
4971
  list: "list";
4966
4972
  read: "read";
4967
4973
  write: "write";
4968
4974
  help: "help";
4969
4975
  edit: "edit";
4976
+ delete: "delete";
4970
4977
  }> & z.core.$partial, z.ZodEnum<{
4971
4978
  never: "never";
4972
4979
  allow: "allow";
@@ -5025,12 +5032,12 @@ export declare const KayPluginManifestV1: z.ZodObject<{
5025
5032
  action: z.ZodString;
5026
5033
  operations: z.ZodExactOptional<z.ZodArray<z.ZodEnum<{
5027
5034
  search: "search";
5028
- delete: "delete";
5029
5035
  list: "list";
5030
5036
  read: "read";
5031
5037
  write: "write";
5032
5038
  help: "help";
5033
5039
  edit: "edit";
5040
+ delete: "delete";
5034
5041
  }>>>;
5035
5042
  routes: z.ZodExactOptional<z.ZodArray<z.ZodString>>;
5036
5043
  query: z.ZodExactOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
@@ -5038,12 +5045,12 @@ export declare const KayPluginManifestV1: z.ZodObject<{
5038
5045
  public: z.ZodLiteral<true>;
5039
5046
  operations: z.ZodExactOptional<z.ZodArray<z.ZodEnum<{
5040
5047
  search: "search";
5041
- delete: "delete";
5042
5048
  list: "list";
5043
5049
  read: "read";
5044
5050
  write: "write";
5045
5051
  help: "help";
5046
5052
  edit: "edit";
5053
+ delete: "delete";
5047
5054
  }>>>;
5048
5055
  routes: z.ZodExactOptional<z.ZodArray<z.ZodString>>;
5049
5056
  query: z.ZodExactOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
@@ -5231,30 +5238,30 @@ export declare const KayPluginManifestV1: z.ZodObject<{
5231
5238
  description: z.ZodString;
5232
5239
  operations: z.ZodExactOptional<z.ZodArray<z.ZodEnum<{
5233
5240
  search: "search";
5234
- delete: "delete";
5235
5241
  list: "list";
5236
5242
  read: "read";
5237
5243
  write: "write";
5238
5244
  help: "help";
5239
5245
  edit: "edit";
5246
+ delete: "delete";
5240
5247
  }>>>;
5241
5248
  operationDocs: z.ZodExactOptional<z.ZodRecord<z.ZodEnum<{
5242
5249
  search: "search";
5243
- delete: "delete";
5244
5250
  list: "list";
5245
5251
  read: "read";
5246
5252
  write: "write";
5247
5253
  help: "help";
5248
5254
  edit: "edit";
5255
+ delete: "delete";
5249
5256
  }> & z.core.$partial, z.ZodString>>;
5250
5257
  operationDefaults: z.ZodExactOptional<z.ZodRecord<z.ZodEnum<{
5251
5258
  search: "search";
5252
- delete: "delete";
5253
5259
  list: "list";
5254
5260
  read: "read";
5255
5261
  write: "write";
5256
5262
  help: "help";
5257
5263
  edit: "edit";
5264
+ delete: "delete";
5258
5265
  }> & z.core.$partial, z.ZodEnum<{
5259
5266
  never: "never";
5260
5267
  allow: "allow";
@@ -5322,9 +5329,9 @@ export declare const KayPluginManifestV1: z.ZodObject<{
5322
5329
  dataSources: z.ZodOptional<z.ZodArray<z.ZodObject<{
5323
5330
  localId: z.ZodString;
5324
5331
  scope: z.ZodEnum<{
5325
- session: "session";
5326
5332
  runtime: "runtime";
5327
5333
  account: "account";
5334
+ session: "session";
5328
5335
  }>;
5329
5336
  snapshot: z.ZodObject<{
5330
5337
  version: z.ZodNumber;
@@ -5630,17 +5637,17 @@ export declare const KayPluginManifestV1: z.ZodObject<{
5630
5637
  capabilities: z.ZodOptional<z.ZodObject<{
5631
5638
  endpoints: z.ZodOptional<z.ZodArray<z.ZodString>>;
5632
5639
  host: z.ZodOptional<z.ZodArray<z.ZodEnum<{
5640
+ "navigation.open-session": "navigation.open-session";
5633
5641
  "sessions.create": "sessions.create";
5634
- "memory.read": "memory.read";
5635
- "skills.read": "skills.read";
5636
- "automations.run": "automations.run";
5637
5642
  "artifacts.read": "artifacts.read";
5638
- "navigation.open-session": "navigation.open-session";
5639
5643
  "artifacts.preview": "artifacts.preview";
5640
5644
  "cost.read": "cost.read";
5641
5645
  "billing.read": "billing.read";
5646
+ "skills.read": "skills.read";
5647
+ "memory.read": "memory.read";
5642
5648
  "self-improvement.read": "self-improvement.read";
5643
5649
  "automations.read": "automations.read";
5650
+ "automations.run": "automations.run";
5644
5651
  "shared-artifacts.read": "shared-artifacts.read";
5645
5652
  "workspace.place-pane": "workspace.place-pane";
5646
5653
  "workspace.pane-header": "workspace.pane-header";
@@ -5666,17 +5673,17 @@ export declare const KayPluginManifestV1: z.ZodObject<{
5666
5673
  capabilities: z.ZodOptional<z.ZodObject<{
5667
5674
  endpoints: z.ZodOptional<z.ZodArray<z.ZodString>>;
5668
5675
  host: z.ZodOptional<z.ZodArray<z.ZodEnum<{
5676
+ "navigation.open-session": "navigation.open-session";
5669
5677
  "sessions.create": "sessions.create";
5670
- "memory.read": "memory.read";
5671
- "skills.read": "skills.read";
5672
- "automations.run": "automations.run";
5673
5678
  "artifacts.read": "artifacts.read";
5674
- "navigation.open-session": "navigation.open-session";
5675
5679
  "artifacts.preview": "artifacts.preview";
5676
5680
  "cost.read": "cost.read";
5677
5681
  "billing.read": "billing.read";
5682
+ "skills.read": "skills.read";
5683
+ "memory.read": "memory.read";
5678
5684
  "self-improvement.read": "self-improvement.read";
5679
5685
  "automations.read": "automations.read";
5686
+ "automations.run": "automations.run";
5680
5687
  "shared-artifacts.read": "shared-artifacts.read";
5681
5688
  "workspace.place-pane": "workspace.place-pane";
5682
5689
  "workspace.pane-header": "workspace.pane-header";
@@ -5696,6 +5703,14 @@ export declare const KayPluginManifestV1: z.ZodObject<{
5696
5703
  primary: "primary";
5697
5704
  plugins: "plugins";
5698
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>>;
5699
5714
  panel: z.ZodOptional<z.ZodObject<{
5700
5715
  body: z.ZodString;
5701
5716
  }, z.core.$strict>>;
@@ -5725,9 +5740,9 @@ export declare const KayPluginManifestV1: z.ZodObject<{
5725
5740
  schema: z.ZodRecord<z.ZodString, z.ZodType<authoringCommonSchemas.JsonValue, unknown, z.core.$ZodTypeInternals<authoringCommonSchemas.JsonValue, unknown>>>;
5726
5741
  defaults: z.ZodOptional<z.ZodType<authoringCommonSchemas.JsonValue, unknown, z.core.$ZodTypeInternals<authoringCommonSchemas.JsonValue, unknown>>>;
5727
5742
  scopes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
5728
- agent: "agent";
5729
5743
  global: "global";
5730
5744
  project: "project";
5745
+ agent: "agent";
5731
5746
  }>>>;
5732
5747
  }, z.core.$strict>>>;
5733
5748
  storage: z.ZodOptional<z.ZodObject<{
@@ -6516,17 +6531,17 @@ export declare interface KayPluginTreeReader {
6516
6531
  }
6517
6532
 
6518
6533
  export declare const KayUiAppHostCapability: z.ZodEnum<{
6534
+ "navigation.open-session": "navigation.open-session";
6519
6535
  "sessions.create": "sessions.create";
6520
- "memory.read": "memory.read";
6521
- "skills.read": "skills.read";
6522
- "automations.run": "automations.run";
6523
6536
  "artifacts.read": "artifacts.read";
6524
- "navigation.open-session": "navigation.open-session";
6525
6537
  "artifacts.preview": "artifacts.preview";
6526
6538
  "cost.read": "cost.read";
6527
6539
  "billing.read": "billing.read";
6540
+ "skills.read": "skills.read";
6541
+ "memory.read": "memory.read";
6528
6542
  "self-improvement.read": "self-improvement.read";
6529
6543
  "automations.read": "automations.read";
6544
+ "automations.run": "automations.run";
6530
6545
  "shared-artifacts.read": "shared-artifacts.read";
6531
6546
  "workspace.place-pane": "workspace.place-pane";
6532
6547
  "workspace.pane-header": "workspace.pane-header";
@@ -6727,17 +6742,17 @@ export declare const KayUiTargetManifest: z.ZodObject<{
6727
6742
  capabilities: z.ZodOptional<z.ZodObject<{
6728
6743
  endpoints: z.ZodOptional<z.ZodArray<z.ZodString>>;
6729
6744
  host: z.ZodOptional<z.ZodArray<z.ZodEnum<{
6745
+ "navigation.open-session": "navigation.open-session";
6730
6746
  "sessions.create": "sessions.create";
6731
- "memory.read": "memory.read";
6732
- "skills.read": "skills.read";
6733
- "automations.run": "automations.run";
6734
6747
  "artifacts.read": "artifacts.read";
6735
- "navigation.open-session": "navigation.open-session";
6736
6748
  "artifacts.preview": "artifacts.preview";
6737
6749
  "cost.read": "cost.read";
6738
6750
  "billing.read": "billing.read";
6751
+ "skills.read": "skills.read";
6752
+ "memory.read": "memory.read";
6739
6753
  "self-improvement.read": "self-improvement.read";
6740
6754
  "automations.read": "automations.read";
6755
+ "automations.run": "automations.run";
6741
6756
  "shared-artifacts.read": "shared-artifacts.read";
6742
6757
  "workspace.place-pane": "workspace.place-pane";
6743
6758
  "workspace.pane-header": "workspace.pane-header";
@@ -6763,17 +6778,17 @@ export declare const KayUiTargetManifest: z.ZodObject<{
6763
6778
  capabilities: z.ZodOptional<z.ZodObject<{
6764
6779
  endpoints: z.ZodOptional<z.ZodArray<z.ZodString>>;
6765
6780
  host: z.ZodOptional<z.ZodArray<z.ZodEnum<{
6781
+ "navigation.open-session": "navigation.open-session";
6766
6782
  "sessions.create": "sessions.create";
6767
- "memory.read": "memory.read";
6768
- "skills.read": "skills.read";
6769
- "automations.run": "automations.run";
6770
6783
  "artifacts.read": "artifacts.read";
6771
- "navigation.open-session": "navigation.open-session";
6772
6784
  "artifacts.preview": "artifacts.preview";
6773
6785
  "cost.read": "cost.read";
6774
6786
  "billing.read": "billing.read";
6787
+ "skills.read": "skills.read";
6788
+ "memory.read": "memory.read";
6775
6789
  "self-improvement.read": "self-improvement.read";
6776
6790
  "automations.read": "automations.read";
6791
+ "automations.run": "automations.run";
6777
6792
  "shared-artifacts.read": "shared-artifacts.read";
6778
6793
  "workspace.place-pane": "workspace.place-pane";
6779
6794
  "workspace.pane-header": "workspace.pane-header";
@@ -6793,6 +6808,14 @@ export declare const KayUiTargetManifest: z.ZodObject<{
6793
6808
  primary: "primary";
6794
6809
  plugins: "plugins";
6795
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>>;
6796
6819
  panel: z.ZodOptional<z.ZodObject<{
6797
6820
  body: z.ZodString;
6798
6821
  }, z.core.$strict>>;
@@ -6966,10 +6989,10 @@ export declare function parseArtifactProvenanceCaptureContext(input: unknown): A
6966
6989
  export declare function parseArtifactProvenanceEnvelope(input: unknown): ArtifactProvenanceEnvelopeV1;
6967
6990
 
6968
6991
  /**
6969
- * Parses a declared command's `where`: `||`, `&&`, `!`, parentheses, `==`, `!=`, strings, `true`,
6970
- * `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.
6971
6994
  */
6972
- export declare function parseCommandWhere(source: string): CommandWhereParseResult;
6995
+ export declare function parseCommandWhere(source: string): WhereParseResult;
6973
6996
 
6974
6997
  /** A `MAJOR.MINOR.PATCH` version broken into its comparable parts. */
6975
6998
  export declare interface ParsedSemver {
@@ -6994,6 +7017,13 @@ export declare function parseResolvedPluginContractV1(value: unknown): ResolvedP
6994
7017
  /** Parses a version against {@link SEMVER_PATTERN}, or returns `undefined` if it isn't valid semver. */
6995
7018
  export declare function parseSemver(value: string): ParsedSemver | undefined;
6996
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
+
6997
7027
  /** Every capability slug {@link PluginCapabilityClaimV1} can express, for exhaustive table checks. */
6998
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"];
6999
7029
 
@@ -9172,18 +9202,18 @@ export declare const PluginConfigManifest: z.ZodArray<z.ZodObject<{
9172
9202
  schema: z.ZodRecord<z.ZodString, z.ZodType<authoringCommonSchemas.JsonValue, unknown, z.core.$ZodTypeInternals<authoringCommonSchemas.JsonValue, unknown>>>;
9173
9203
  defaults: z.ZodOptional<z.ZodType<authoringCommonSchemas.JsonValue, unknown, z.core.$ZodTypeInternals<authoringCommonSchemas.JsonValue, unknown>>>;
9174
9204
  scopes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
9175
- agent: "agent";
9176
9205
  global: "global";
9177
9206
  project: "project";
9207
+ agent: "agent";
9178
9208
  }>>>;
9179
9209
  }, z.core.$strict>>;
9180
9210
 
9181
9211
  export declare type PluginConfigManifest = z.infer<typeof PluginConfigManifest>;
9182
9212
 
9183
9213
  export declare const PluginConfigScope: z.ZodEnum<{
9184
- agent: "agent";
9185
9214
  global: "global";
9186
9215
  project: "project";
9216
+ agent: "agent";
9187
9217
  }>;
9188
9218
 
9189
9219
  export declare type PluginConfigScope = z.infer<typeof PluginConfigScope>;
@@ -9193,23 +9223,23 @@ export declare const PluginConfigSectionManifest: z.ZodObject<{
9193
9223
  schema: z.ZodRecord<z.ZodString, z.ZodType<authoringCommonSchemas.JsonValue, unknown, z.core.$ZodTypeInternals<authoringCommonSchemas.JsonValue, unknown>>>;
9194
9224
  defaults: z.ZodOptional<z.ZodType<authoringCommonSchemas.JsonValue, unknown, z.core.$ZodTypeInternals<authoringCommonSchemas.JsonValue, unknown>>>;
9195
9225
  scopes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
9196
- agent: "agent";
9197
9226
  global: "global";
9198
9227
  project: "project";
9228
+ agent: "agent";
9199
9229
  }>>>;
9200
9230
  }, z.core.$strict>;
9201
9231
 
9202
9232
  export declare type PluginConfigSectionManifest = z.infer<typeof PluginConfigSectionManifest>;
9203
9233
 
9204
9234
  export declare const PluginContributionKind: z.ZodEnum<{
9235
+ endpoint: "endpoint";
9205
9236
  tool: "tool";
9206
9237
  resource: "resource";
9207
- endpoint: "endpoint";
9208
9238
  storage: "storage";
9209
- command: "command";
9210
9239
  uriModule: "uriModule";
9211
9240
  authService: "authService";
9212
9241
  app: "app";
9242
+ command: "command";
9213
9243
  configSection: "configSection";
9214
9244
  skill: "skill";
9215
9245
  converter: "converter";
@@ -10506,30 +10536,30 @@ export declare const ResolvedKayAgentUriModule: z.ZodObject<{
10506
10536
  description: z.ZodString;
10507
10537
  operations: z.ZodExactOptional<z.ZodArray<z.ZodEnum<{
10508
10538
  search: "search";
10509
- delete: "delete";
10510
10539
  list: "list";
10511
10540
  read: "read";
10512
10541
  write: "write";
10513
10542
  help: "help";
10514
10543
  edit: "edit";
10544
+ delete: "delete";
10515
10545
  }>>>;
10516
10546
  operationDocs: z.ZodExactOptional<z.ZodRecord<z.ZodEnum<{
10517
10547
  search: "search";
10518
- delete: "delete";
10519
10548
  list: "list";
10520
10549
  read: "read";
10521
10550
  write: "write";
10522
10551
  help: "help";
10523
10552
  edit: "edit";
10553
+ delete: "delete";
10524
10554
  }> & z.core.$partial, z.ZodString>>;
10525
10555
  operationDefaults: z.ZodExactOptional<z.ZodRecord<z.ZodEnum<{
10526
10556
  search: "search";
10527
- delete: "delete";
10528
10557
  list: "list";
10529
10558
  read: "read";
10530
10559
  write: "write";
10531
10560
  help: "help";
10532
10561
  edit: "edit";
10562
+ delete: "delete";
10533
10563
  }> & z.core.$partial, z.ZodEnum<{
10534
10564
  never: "never";
10535
10565
  allow: "allow";
@@ -10588,12 +10618,12 @@ export declare const ResolvedKayAgentUriModule: z.ZodObject<{
10588
10618
  action: z.ZodString;
10589
10619
  operations: z.ZodExactOptional<z.ZodArray<z.ZodEnum<{
10590
10620
  search: "search";
10591
- delete: "delete";
10592
10621
  list: "list";
10593
10622
  read: "read";
10594
10623
  write: "write";
10595
10624
  help: "help";
10596
10625
  edit: "edit";
10626
+ delete: "delete";
10597
10627
  }>>>;
10598
10628
  routes: z.ZodExactOptional<z.ZodArray<z.ZodString>>;
10599
10629
  query: z.ZodExactOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
@@ -10601,12 +10631,12 @@ export declare const ResolvedKayAgentUriModule: z.ZodObject<{
10601
10631
  public: z.ZodLiteral<true>;
10602
10632
  operations: z.ZodExactOptional<z.ZodArray<z.ZodEnum<{
10603
10633
  search: "search";
10604
- delete: "delete";
10605
10634
  list: "list";
10606
10635
  read: "read";
10607
10636
  write: "write";
10608
10637
  help: "help";
10609
10638
  edit: "edit";
10639
+ delete: "delete";
10610
10640
  }>>>;
10611
10641
  routes: z.ZodExactOptional<z.ZodArray<z.ZodString>>;
10612
10642
  query: z.ZodExactOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
@@ -10727,9 +10757,9 @@ export declare const ResolvedKayAppDataSource: z.ZodObject<{
10727
10757
  localId: z.ZodString;
10728
10758
  globalId: z.ZodString;
10729
10759
  scope: z.ZodEnum<{
10730
- session: "session";
10731
10760
  runtime: "runtime";
10732
10761
  account: "account";
10762
+ session: "session";
10733
10763
  }>;
10734
10764
  snapshot: z.ZodObject<{
10735
10765
  version: z.ZodNumber;
@@ -10848,17 +10878,17 @@ export declare const ResolvedKayUiApp: z.ZodObject<{
10848
10878
  globalId: z.ZodString;
10849
10879
  }, z.core.$strict>>>;
10850
10880
  host: z.ZodOptional<z.ZodArray<z.ZodEnum<{
10881
+ "navigation.open-session": "navigation.open-session";
10851
10882
  "sessions.create": "sessions.create";
10852
- "memory.read": "memory.read";
10853
- "skills.read": "skills.read";
10854
- "automations.run": "automations.run";
10855
10883
  "artifacts.read": "artifacts.read";
10856
- "navigation.open-session": "navigation.open-session";
10857
10884
  "artifacts.preview": "artifacts.preview";
10858
10885
  "cost.read": "cost.read";
10859
10886
  "billing.read": "billing.read";
10887
+ "skills.read": "skills.read";
10888
+ "memory.read": "memory.read";
10860
10889
  "self-improvement.read": "self-improvement.read";
10861
10890
  "automations.read": "automations.read";
10891
+ "automations.run": "automations.run";
10862
10892
  "shared-artifacts.read": "shared-artifacts.read";
10863
10893
  "workspace.place-pane": "workspace.place-pane";
10864
10894
  "workspace.pane-header": "workspace.pane-header";
@@ -11194,14 +11224,14 @@ export declare const ResolvedPluginContractV1: z.ZodObject<{
11194
11224
  "kay.ui": "kay.ui";
11195
11225
  }>;
11196
11226
  kind: z.ZodEnum<{
11227
+ endpoint: "endpoint";
11197
11228
  tool: "tool";
11198
11229
  resource: "resource";
11199
- endpoint: "endpoint";
11200
11230
  storage: "storage";
11201
- command: "command";
11202
11231
  uriModule: "uriModule";
11203
11232
  authService: "authService";
11204
11233
  app: "app";
11234
+ command: "command";
11205
11235
  configSection: "configSection";
11206
11236
  skill: "skill";
11207
11237
  converter: "converter";
@@ -11722,30 +11752,30 @@ export declare const ResolvedPluginContractV1: z.ZodObject<{
11722
11752
  description: z.ZodString;
11723
11753
  operations: z.ZodExactOptional<z.ZodArray<z.ZodEnum<{
11724
11754
  search: "search";
11725
- delete: "delete";
11726
11755
  list: "list";
11727
11756
  read: "read";
11728
11757
  write: "write";
11729
11758
  help: "help";
11730
11759
  edit: "edit";
11760
+ delete: "delete";
11731
11761
  }>>>;
11732
11762
  operationDocs: z.ZodExactOptional<z.ZodRecord<z.ZodEnum<{
11733
11763
  search: "search";
11734
- delete: "delete";
11735
11764
  list: "list";
11736
11765
  read: "read";
11737
11766
  write: "write";
11738
11767
  help: "help";
11739
11768
  edit: "edit";
11769
+ delete: "delete";
11740
11770
  }> & z.core.$partial, z.ZodString>>;
11741
11771
  operationDefaults: z.ZodExactOptional<z.ZodRecord<z.ZodEnum<{
11742
11772
  search: "search";
11743
- delete: "delete";
11744
11773
  list: "list";
11745
11774
  read: "read";
11746
11775
  write: "write";
11747
11776
  help: "help";
11748
11777
  edit: "edit";
11778
+ delete: "delete";
11749
11779
  }> & z.core.$partial, z.ZodEnum<{
11750
11780
  never: "never";
11751
11781
  allow: "allow";
@@ -11804,12 +11834,12 @@ export declare const ResolvedPluginContractV1: z.ZodObject<{
11804
11834
  action: z.ZodString;
11805
11835
  operations: z.ZodExactOptional<z.ZodArray<z.ZodEnum<{
11806
11836
  search: "search";
11807
- delete: "delete";
11808
11837
  list: "list";
11809
11838
  read: "read";
11810
11839
  write: "write";
11811
11840
  help: "help";
11812
11841
  edit: "edit";
11842
+ delete: "delete";
11813
11843
  }>>>;
11814
11844
  routes: z.ZodExactOptional<z.ZodArray<z.ZodString>>;
11815
11845
  query: z.ZodExactOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
@@ -11817,12 +11847,12 @@ export declare const ResolvedPluginContractV1: z.ZodObject<{
11817
11847
  public: z.ZodLiteral<true>;
11818
11848
  operations: z.ZodExactOptional<z.ZodArray<z.ZodEnum<{
11819
11849
  search: "search";
11820
- delete: "delete";
11821
11850
  list: "list";
11822
11851
  read: "read";
11823
11852
  write: "write";
11824
11853
  help: "help";
11825
11854
  edit: "edit";
11855
+ delete: "delete";
11826
11856
  }>>>;
11827
11857
  routes: z.ZodExactOptional<z.ZodArray<z.ZodString>>;
11828
11858
  query: z.ZodExactOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
@@ -12004,9 +12034,9 @@ export declare const ResolvedPluginContractV1: z.ZodObject<{
12004
12034
  localId: z.ZodString;
12005
12035
  globalId: z.ZodString;
12006
12036
  scope: z.ZodEnum<{
12007
- session: "session";
12008
12037
  runtime: "runtime";
12009
12038
  account: "account";
12039
+ session: "session";
12010
12040
  }>;
12011
12041
  snapshot: z.ZodObject<{
12012
12042
  version: z.ZodNumber;
@@ -12140,17 +12170,17 @@ export declare const ResolvedPluginContractV1: z.ZodObject<{
12140
12170
  globalId: z.ZodString;
12141
12171
  }, z.core.$strict>>>;
12142
12172
  host: z.ZodOptional<z.ZodArray<z.ZodEnum<{
12173
+ "navigation.open-session": "navigation.open-session";
12143
12174
  "sessions.create": "sessions.create";
12144
- "memory.read": "memory.read";
12145
- "skills.read": "skills.read";
12146
- "automations.run": "automations.run";
12147
12175
  "artifacts.read": "artifacts.read";
12148
- "navigation.open-session": "navigation.open-session";
12149
12176
  "artifacts.preview": "artifacts.preview";
12150
12177
  "cost.read": "cost.read";
12151
12178
  "billing.read": "billing.read";
12179
+ "skills.read": "skills.read";
12180
+ "memory.read": "memory.read";
12152
12181
  "self-improvement.read": "self-improvement.read";
12153
12182
  "automations.read": "automations.read";
12183
+ "automations.run": "automations.run";
12154
12184
  "shared-artifacts.read": "shared-artifacts.read";
12155
12185
  "workspace.place-pane": "workspace.place-pane";
12156
12186
  "workspace.pane-header": "workspace.pane-header";
@@ -12169,14 +12199,14 @@ export declare const ResolvedPluginContributionId: z.ZodObject<{
12169
12199
  "kay.ui": "kay.ui";
12170
12200
  }>;
12171
12201
  kind: z.ZodEnum<{
12202
+ endpoint: "endpoint";
12172
12203
  tool: "tool";
12173
12204
  resource: "resource";
12174
- endpoint: "endpoint";
12175
12205
  storage: "storage";
12176
- command: "command";
12177
12206
  uriModule: "uriModule";
12178
12207
  authService: "authService";
12179
12208
  app: "app";
12209
+ command: "command";
12180
12210
  configSection: "configSection";
12181
12211
  skill: "skill";
12182
12212
  converter: "converter";
@@ -12802,6 +12832,9 @@ export declare const RichViewContribution: z.ZodObject<{
12802
12832
 
12803
12833
  export declare type RichViewContribution = z.infer<typeof RichViewContribution>;
12804
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
+
12805
12838
  /**
12806
12839
  * Resolves a manifest without throwing for known contract resolution failures.
12807
12840
  *
@@ -13724,17 +13757,17 @@ export declare interface TurnPacketMessage {
13724
13757
  export declare const UiAppCapabilities: z.ZodObject<{
13725
13758
  endpoints: z.ZodOptional<z.ZodArray<z.ZodString>>;
13726
13759
  host: z.ZodOptional<z.ZodArray<z.ZodEnum<{
13760
+ "navigation.open-session": "navigation.open-session";
13727
13761
  "sessions.create": "sessions.create";
13728
- "memory.read": "memory.read";
13729
- "skills.read": "skills.read";
13730
- "automations.run": "automations.run";
13731
13762
  "artifacts.read": "artifacts.read";
13732
- "navigation.open-session": "navigation.open-session";
13733
13763
  "artifacts.preview": "artifacts.preview";
13734
13764
  "cost.read": "cost.read";
13735
13765
  "billing.read": "billing.read";
13766
+ "skills.read": "skills.read";
13767
+ "memory.read": "memory.read";
13736
13768
  "self-improvement.read": "self-improvement.read";
13737
13769
  "automations.read": "automations.read";
13770
+ "automations.run": "automations.run";
13738
13771
  "shared-artifacts.read": "shared-artifacts.read";
13739
13772
  "workspace.place-pane": "workspace.place-pane";
13740
13773
  "workspace.pane-header": "workspace.pane-header";
@@ -13763,17 +13796,17 @@ export declare const UiAppContribution: z.ZodObject<{
13763
13796
  capabilities: z.ZodOptional<z.ZodObject<{
13764
13797
  endpoints: z.ZodOptional<z.ZodArray<z.ZodString>>;
13765
13798
  host: z.ZodOptional<z.ZodArray<z.ZodEnum<{
13799
+ "navigation.open-session": "navigation.open-session";
13766
13800
  "sessions.create": "sessions.create";
13767
- "memory.read": "memory.read";
13768
- "skills.read": "skills.read";
13769
- "automations.run": "automations.run";
13770
13801
  "artifacts.read": "artifacts.read";
13771
- "navigation.open-session": "navigation.open-session";
13772
13802
  "artifacts.preview": "artifacts.preview";
13773
13803
  "cost.read": "cost.read";
13774
13804
  "billing.read": "billing.read";
13805
+ "skills.read": "skills.read";
13806
+ "memory.read": "memory.read";
13775
13807
  "self-improvement.read": "self-improvement.read";
13776
13808
  "automations.read": "automations.read";
13809
+ "automations.run": "automations.run";
13777
13810
  "shared-artifacts.read": "shared-artifacts.read";
13778
13811
  "workspace.place-pane": "workspace.place-pane";
13779
13812
  "workspace.pane-header": "workspace.pane-header";
@@ -13799,17 +13832,17 @@ export declare const UiAppContribution: z.ZodObject<{
13799
13832
  capabilities: z.ZodOptional<z.ZodObject<{
13800
13833
  endpoints: z.ZodOptional<z.ZodArray<z.ZodString>>;
13801
13834
  host: z.ZodOptional<z.ZodArray<z.ZodEnum<{
13835
+ "navigation.open-session": "navigation.open-session";
13802
13836
  "sessions.create": "sessions.create";
13803
- "memory.read": "memory.read";
13804
- "skills.read": "skills.read";
13805
- "automations.run": "automations.run";
13806
13837
  "artifacts.read": "artifacts.read";
13807
- "navigation.open-session": "navigation.open-session";
13808
13838
  "artifacts.preview": "artifacts.preview";
13809
13839
  "cost.read": "cost.read";
13810
13840
  "billing.read": "billing.read";
13841
+ "skills.read": "skills.read";
13842
+ "memory.read": "memory.read";
13811
13843
  "self-improvement.read": "self-improvement.read";
13812
13844
  "automations.read": "automations.read";
13845
+ "automations.run": "automations.run";
13813
13846
  "shared-artifacts.read": "shared-artifacts.read";
13814
13847
  "workspace.place-pane": "workspace.place-pane";
13815
13848
  "workspace.pane-header": "workspace.pane-header";
@@ -13856,6 +13889,14 @@ export declare const UiRailEntryContribution: z.ZodObject<{
13856
13889
  primary: "primary";
13857
13890
  plugins: "plugins";
13858
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>>;
13859
13900
  panel: z.ZodOptional<z.ZodObject<{
13860
13901
  body: z.ZodString;
13861
13902
  }, z.core.$strict>>;
@@ -13909,30 +13950,30 @@ export declare const UriModuleContribution: z.ZodObject<{
13909
13950
  description: z.ZodString;
13910
13951
  operations: z.ZodExactOptional<z.ZodArray<z.ZodEnum<{
13911
13952
  search: "search";
13912
- delete: "delete";
13913
13953
  list: "list";
13914
13954
  read: "read";
13915
13955
  write: "write";
13916
13956
  help: "help";
13917
13957
  edit: "edit";
13958
+ delete: "delete";
13918
13959
  }>>>;
13919
13960
  operationDocs: z.ZodExactOptional<z.ZodRecord<z.ZodEnum<{
13920
13961
  search: "search";
13921
- delete: "delete";
13922
13962
  list: "list";
13923
13963
  read: "read";
13924
13964
  write: "write";
13925
13965
  help: "help";
13926
13966
  edit: "edit";
13967
+ delete: "delete";
13927
13968
  }> & z.core.$partial, z.ZodString>>;
13928
13969
  operationDefaults: z.ZodExactOptional<z.ZodRecord<z.ZodEnum<{
13929
13970
  search: "search";
13930
- delete: "delete";
13931
13971
  list: "list";
13932
13972
  read: "read";
13933
13973
  write: "write";
13934
13974
  help: "help";
13935
13975
  edit: "edit";
13976
+ delete: "delete";
13936
13977
  }> & z.core.$partial, z.ZodEnum<{
13937
13978
  never: "never";
13938
13979
  allow: "allow";
@@ -13991,12 +14032,12 @@ export declare const UriModuleContribution: z.ZodObject<{
13991
14032
  action: z.ZodString;
13992
14033
  operations: z.ZodExactOptional<z.ZodArray<z.ZodEnum<{
13993
14034
  search: "search";
13994
- delete: "delete";
13995
14035
  list: "list";
13996
14036
  read: "read";
13997
14037
  write: "write";
13998
14038
  help: "help";
13999
14039
  edit: "edit";
14040
+ delete: "delete";
14000
14041
  }>>>;
14001
14042
  routes: z.ZodExactOptional<z.ZodArray<z.ZodString>>;
14002
14043
  query: z.ZodExactOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
@@ -14004,12 +14045,12 @@ export declare const UriModuleContribution: z.ZodObject<{
14004
14045
  public: z.ZodLiteral<true>;
14005
14046
  operations: z.ZodExactOptional<z.ZodArray<z.ZodEnum<{
14006
14047
  search: "search";
14007
- delete: "delete";
14008
14048
  list: "list";
14009
14049
  read: "read";
14010
14050
  write: "write";
14011
14051
  help: "help";
14012
14052
  edit: "edit";
14053
+ delete: "delete";
14013
14054
  }>>>;
14014
14055
  routes: z.ZodExactOptional<z.ZodArray<z.ZodString>>;
14015
14056
  query: z.ZodExactOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
@@ -14076,30 +14117,30 @@ declare const UriModuleFacts: z.ZodObject<{
14076
14117
  description: z.ZodString;
14077
14118
  operations: z.ZodExactOptional<z.ZodArray<z.ZodEnum<{
14078
14119
  search: "search";
14079
- delete: "delete";
14080
14120
  list: "list";
14081
14121
  read: "read";
14082
14122
  write: "write";
14083
14123
  help: "help";
14084
14124
  edit: "edit";
14125
+ delete: "delete";
14085
14126
  }>>>;
14086
14127
  operationDocs: z.ZodExactOptional<z.ZodRecord<z.ZodEnum<{
14087
14128
  search: "search";
14088
- delete: "delete";
14089
14129
  list: "list";
14090
14130
  read: "read";
14091
14131
  write: "write";
14092
14132
  help: "help";
14093
14133
  edit: "edit";
14134
+ delete: "delete";
14094
14135
  }> & z.core.$partial, z.ZodString>>;
14095
14136
  operationDefaults: z.ZodExactOptional<z.ZodRecord<z.ZodEnum<{
14096
14137
  search: "search";
14097
- delete: "delete";
14098
14138
  list: "list";
14099
14139
  read: "read";
14100
14140
  write: "write";
14101
14141
  help: "help";
14102
14142
  edit: "edit";
14143
+ delete: "delete";
14103
14144
  }> & z.core.$partial, z.ZodEnum<{
14104
14145
  never: "never";
14105
14146
  allow: "allow";
@@ -14158,12 +14199,12 @@ declare const UriModuleFacts: z.ZodObject<{
14158
14199
  action: z.ZodString;
14159
14200
  operations: z.ZodExactOptional<z.ZodArray<z.ZodEnum<{
14160
14201
  search: "search";
14161
- delete: "delete";
14162
14202
  list: "list";
14163
14203
  read: "read";
14164
14204
  write: "write";
14165
14205
  help: "help";
14166
14206
  edit: "edit";
14207
+ delete: "delete";
14167
14208
  }>>>;
14168
14209
  routes: z.ZodExactOptional<z.ZodArray<z.ZodString>>;
14169
14210
  query: z.ZodExactOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
@@ -14171,12 +14212,12 @@ declare const UriModuleFacts: z.ZodObject<{
14171
14212
  public: z.ZodLiteral<true>;
14172
14213
  operations: z.ZodExactOptional<z.ZodArray<z.ZodEnum<{
14173
14214
  search: "search";
14174
- delete: "delete";
14175
14215
  list: "list";
14176
14216
  read: "read";
14177
14217
  write: "write";
14178
14218
  help: "help";
14179
14219
  edit: "edit";
14220
+ delete: "delete";
14180
14221
  }>>>;
14181
14222
  routes: z.ZodExactOptional<z.ZodArray<z.ZodString>>;
14182
14223
  query: z.ZodExactOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
@@ -14260,12 +14301,43 @@ export declare type WebSessionGrantRequest = z.infer<typeof WebSessionGrantReque
14260
14301
  */
14261
14302
  export declare function webSessionPathWithinPrefix(pathname: string, pathPrefix: string): boolean;
14262
14303
 
14263
- /** 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. */
14264
14325
  declare const WHERE_KEY_TYPES: {
14265
14326
  readonly "account.signedIn": "boolean";
14266
14327
  readonly "app.channel": "string";
14267
14328
  };
14268
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
+
14269
14341
  /** Construct the exact claim row for one Whiteboard scope and operation. */
14270
14342
  export declare function whiteboardCapabilityClaim(operation: WhiteboardCapabilityOperation, scope: WhiteboardCapabilityScope, target?: "kay.agent"): WhiteboardCapabilityClaimV1;
14271
14343
 
@@ -14294,9 +14366,9 @@ export declare const WhiteboardCapabilityClaimV1: z.ZodObject<{
14294
14366
  export declare type WhiteboardCapabilityClaimV1 = z.infer<typeof WhiteboardCapabilityClaimV1>;
14295
14367
 
14296
14368
  export declare const WhiteboardCapabilityOperation: z.ZodEnum<{
14369
+ read: "read";
14297
14370
  create: "create";
14298
14371
  update: "update";
14299
- read: "read";
14300
14372
  discover: "discover";
14301
14373
  remove: "remove";
14302
14374
  }>;