@yaklabs-ai/plugin-protocol 0.35.0 → 0.36.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/THIRD-PARTY-INVENTORY.json +1 -1
- package/dist/index.d.ts +175 -7
- package/dist/index.js +114 -12
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1683,11 +1683,13 @@ declare namespace authoringContributionSchemas {
|
|
|
1683
1683
|
ReferencePresentationUriPattern,
|
|
1684
1684
|
ReferencePresentationUrlClaim,
|
|
1685
1685
|
ReferencePresentationTooltip,
|
|
1686
|
+
ReferencePresentationAddress,
|
|
1686
1687
|
ReferencePresentationContribution,
|
|
1687
1688
|
RichViewContribution,
|
|
1688
1689
|
KayUiAppHostCapability,
|
|
1689
1690
|
UiAppCapabilities,
|
|
1690
1691
|
UiRailEntryContribution,
|
|
1692
|
+
UiPageContribution,
|
|
1691
1693
|
UiAppContribution,
|
|
1692
1694
|
ThemeContribution,
|
|
1693
1695
|
CommandHandler,
|
|
@@ -2665,9 +2667,34 @@ declare const canonicalContributionSchemas: {
|
|
|
2665
2667
|
search: z.ZodOptional<z.ZodString>;
|
|
2666
2668
|
}, z.core.$strict>;
|
|
2667
2669
|
}, z.core.$strict>;
|
|
2670
|
+
ReferencePresentationAddress: z.ZodObject<{
|
|
2671
|
+
pattern: z.ZodObject<{
|
|
2672
|
+
protocol: z.ZodString;
|
|
2673
|
+
hostname: z.ZodString;
|
|
2674
|
+
pathname: z.ZodOptional<z.ZodString>;
|
|
2675
|
+
search: z.ZodOptional<z.ZodString>;
|
|
2676
|
+
}, z.core.$strict>;
|
|
2677
|
+
objectId: z.ZodOptional<z.ZodString>;
|
|
2678
|
+
open: z.ZodOptional<z.ZodObject<{
|
|
2679
|
+
kind: z.ZodLiteral<"none">;
|
|
2680
|
+
}, z.core.$strict>>;
|
|
2681
|
+
}, z.core.$strict>;
|
|
2668
2682
|
ReferencePresentationContribution: z.ZodObject<{
|
|
2669
2683
|
localId: z.ZodString;
|
|
2670
|
-
uriModule: z.ZodString
|
|
2684
|
+
uriModule: z.ZodOptional<z.ZodString>;
|
|
2685
|
+
scheme: z.ZodOptional<z.ZodString>;
|
|
2686
|
+
addresses: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2687
|
+
pattern: z.ZodObject<{
|
|
2688
|
+
protocol: z.ZodString;
|
|
2689
|
+
hostname: z.ZodString;
|
|
2690
|
+
pathname: z.ZodOptional<z.ZodString>;
|
|
2691
|
+
search: z.ZodOptional<z.ZodString>;
|
|
2692
|
+
}, z.core.$strict>;
|
|
2693
|
+
objectId: z.ZodOptional<z.ZodString>;
|
|
2694
|
+
open: z.ZodOptional<z.ZodObject<{
|
|
2695
|
+
kind: z.ZodLiteral<"none">;
|
|
2696
|
+
}, z.core.$strict>>;
|
|
2697
|
+
}, z.core.$strict>>>;
|
|
2671
2698
|
resourceKind: z.ZodString;
|
|
2672
2699
|
open: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2673
2700
|
kind: z.ZodLiteral<"working-document">;
|
|
@@ -2714,6 +2741,7 @@ declare const canonicalContributionSchemas: {
|
|
|
2714
2741
|
"sessions.create": "sessions.create";
|
|
2715
2742
|
"artifacts.read": "artifacts.read";
|
|
2716
2743
|
"artifacts.preview": "artifacts.preview";
|
|
2744
|
+
"markdown.document-view": "markdown.document-view";
|
|
2717
2745
|
"cost.read": "cost.read";
|
|
2718
2746
|
"billing.read": "billing.read";
|
|
2719
2747
|
"skills.read": "skills.read";
|
|
@@ -2733,6 +2761,7 @@ declare const canonicalContributionSchemas: {
|
|
|
2733
2761
|
"sessions.create": "sessions.create";
|
|
2734
2762
|
"artifacts.read": "artifacts.read";
|
|
2735
2763
|
"artifacts.preview": "artifacts.preview";
|
|
2764
|
+
"markdown.document-view": "markdown.document-view";
|
|
2736
2765
|
"cost.read": "cost.read";
|
|
2737
2766
|
"billing.read": "billing.read";
|
|
2738
2767
|
"skills.read": "skills.read";
|
|
@@ -2770,6 +2799,13 @@ declare const canonicalContributionSchemas: {
|
|
|
2770
2799
|
body: z.ZodString;
|
|
2771
2800
|
}, z.core.$strict>>;
|
|
2772
2801
|
}, z.core.$strict>;
|
|
2802
|
+
UiPageContribution: z.ZodObject<{
|
|
2803
|
+
id: z.ZodString;
|
|
2804
|
+
title: z.ZodOptional<z.ZodString>;
|
|
2805
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
2806
|
+
companion: z.ZodOptional<z.ZodBoolean>;
|
|
2807
|
+
openedEvent: z.ZodOptional<z.ZodString>;
|
|
2808
|
+
}, z.core.$strict>;
|
|
2773
2809
|
UiAppContribution: z.ZodObject<{
|
|
2774
2810
|
localId: z.ZodString;
|
|
2775
2811
|
displayName: z.ZodString;
|
|
@@ -2793,6 +2829,7 @@ declare const canonicalContributionSchemas: {
|
|
|
2793
2829
|
"sessions.create": "sessions.create";
|
|
2794
2830
|
"artifacts.read": "artifacts.read";
|
|
2795
2831
|
"artifacts.preview": "artifacts.preview";
|
|
2832
|
+
"markdown.document-view": "markdown.document-view";
|
|
2796
2833
|
"cost.read": "cost.read";
|
|
2797
2834
|
"billing.read": "billing.read";
|
|
2798
2835
|
"skills.read": "skills.read";
|
|
@@ -2829,6 +2866,7 @@ declare const canonicalContributionSchemas: {
|
|
|
2829
2866
|
"sessions.create": "sessions.create";
|
|
2830
2867
|
"artifacts.read": "artifacts.read";
|
|
2831
2868
|
"artifacts.preview": "artifacts.preview";
|
|
2869
|
+
"markdown.document-view": "markdown.document-view";
|
|
2832
2870
|
"cost.read": "cost.read";
|
|
2833
2871
|
"billing.read": "billing.read";
|
|
2834
2872
|
"skills.read": "skills.read";
|
|
@@ -3193,6 +3231,17 @@ export declare interface DeclaredKayPluginCompatibility {
|
|
|
3193
3231
|
readonly sdk?: string | undefined;
|
|
3194
3232
|
}
|
|
3195
3233
|
|
|
3234
|
+
/**
|
|
3235
|
+
* Every plugin's reference presentations. The daemon delivers this one kind from the resolved
|
|
3236
|
+
* contract rather than the manifest, so its rows carry `schemes`.
|
|
3237
|
+
*/
|
|
3238
|
+
export declare function declaredReferencePresentations<TPlugin extends {
|
|
3239
|
+
readonly contributes: Readonly<Record<string, unknown>>;
|
|
3240
|
+
}>(plugins: readonly TPlugin[]): readonly {
|
|
3241
|
+
readonly plugin: TPlugin;
|
|
3242
|
+
readonly declaration: ResolvedReferencePresentation;
|
|
3243
|
+
}[];
|
|
3244
|
+
|
|
3196
3245
|
export declare const DeclaredSkillSourceEnvelope: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
3197
3246
|
channel: z.ZodLiteral<"git-clone">;
|
|
3198
3247
|
locator: z.ZodString;
|
|
@@ -4087,8 +4136,13 @@ export declare const KAY_PLUGIN_PROTOCOL_VERSION: "kay.plugin.v1";
|
|
|
4087
4136
|
* names one of the plugin's `rows` data sources, an optional `where` and a plural `label`.
|
|
4088
4137
|
* `app.skills` gains `listPendingSuggestions` and `subscribeSuggestions` under `skills.read`. A plugin
|
|
4089
4138
|
* that declares a badge declares ^0.35.0.
|
|
4139
|
+
*
|
|
4140
|
+
* 0.36.0 lets a plugin declare its pages and which page an address opens (#15897, #15898). `pages`
|
|
4141
|
+
* under `kay.ui` `contributes` names each page's title, icon file, companion status and opened
|
|
4142
|
+
* event. A reference presentation that opens a page gains `scheme` and `addresses`, and may leave
|
|
4143
|
+
* out `uriModule` when another layer serves the address. A plugin using these declares ^0.36.0.
|
|
4090
4144
|
*/
|
|
4091
|
-
export declare const KAY_PLUGIN_SDK_VERSION: "0.
|
|
4145
|
+
export declare const KAY_PLUGIN_SDK_VERSION: "0.36.0";
|
|
4092
4146
|
|
|
4093
4147
|
export declare const KAY_PLUGIN_TARGET_NAMES: readonly ["kay.agent", "kay.app", "kay.ui"];
|
|
4094
4148
|
|
|
@@ -5576,7 +5630,20 @@ export declare const KayPluginManifestV1: z.ZodObject<{
|
|
|
5576
5630
|
}, z.core.$strict>>>;
|
|
5577
5631
|
referencePresentations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
5578
5632
|
localId: z.ZodString;
|
|
5579
|
-
uriModule: z.ZodString
|
|
5633
|
+
uriModule: z.ZodOptional<z.ZodString>;
|
|
5634
|
+
scheme: z.ZodOptional<z.ZodString>;
|
|
5635
|
+
addresses: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
5636
|
+
pattern: z.ZodObject<{
|
|
5637
|
+
protocol: z.ZodString;
|
|
5638
|
+
hostname: z.ZodString;
|
|
5639
|
+
pathname: z.ZodOptional<z.ZodString>;
|
|
5640
|
+
search: z.ZodOptional<z.ZodString>;
|
|
5641
|
+
}, z.core.$strict>;
|
|
5642
|
+
objectId: z.ZodOptional<z.ZodString>;
|
|
5643
|
+
open: z.ZodOptional<z.ZodObject<{
|
|
5644
|
+
kind: z.ZodLiteral<"none">;
|
|
5645
|
+
}, z.core.$strict>>;
|
|
5646
|
+
}, z.core.$strict>>>;
|
|
5580
5647
|
resourceKind: z.ZodString;
|
|
5581
5648
|
open: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
5582
5649
|
kind: z.ZodLiteral<"working-document">;
|
|
@@ -5641,6 +5708,7 @@ export declare const KayPluginManifestV1: z.ZodObject<{
|
|
|
5641
5708
|
"sessions.create": "sessions.create";
|
|
5642
5709
|
"artifacts.read": "artifacts.read";
|
|
5643
5710
|
"artifacts.preview": "artifacts.preview";
|
|
5711
|
+
"markdown.document-view": "markdown.document-view";
|
|
5644
5712
|
"cost.read": "cost.read";
|
|
5645
5713
|
"billing.read": "billing.read";
|
|
5646
5714
|
"skills.read": "skills.read";
|
|
@@ -5677,6 +5745,7 @@ export declare const KayPluginManifestV1: z.ZodObject<{
|
|
|
5677
5745
|
"sessions.create": "sessions.create";
|
|
5678
5746
|
"artifacts.read": "artifacts.read";
|
|
5679
5747
|
"artifacts.preview": "artifacts.preview";
|
|
5748
|
+
"markdown.document-view": "markdown.document-view";
|
|
5680
5749
|
"cost.read": "cost.read";
|
|
5681
5750
|
"billing.read": "billing.read";
|
|
5682
5751
|
"skills.read": "skills.read";
|
|
@@ -5715,6 +5784,13 @@ export declare const KayPluginManifestV1: z.ZodObject<{
|
|
|
5715
5784
|
body: z.ZodString;
|
|
5716
5785
|
}, z.core.$strict>>;
|
|
5717
5786
|
}, z.core.$strict>>>;
|
|
5787
|
+
pages: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
5788
|
+
id: z.ZodString;
|
|
5789
|
+
title: z.ZodOptional<z.ZodString>;
|
|
5790
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
5791
|
+
companion: z.ZodOptional<z.ZodBoolean>;
|
|
5792
|
+
openedEvent: z.ZodOptional<z.ZodString>;
|
|
5793
|
+
}, z.core.$strict>>>;
|
|
5718
5794
|
themes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
5719
5795
|
localId: z.ZodString;
|
|
5720
5796
|
displayName: z.ZodString;
|
|
@@ -6535,6 +6611,7 @@ export declare const KayUiAppHostCapability: z.ZodEnum<{
|
|
|
6535
6611
|
"sessions.create": "sessions.create";
|
|
6536
6612
|
"artifacts.read": "artifacts.read";
|
|
6537
6613
|
"artifacts.preview": "artifacts.preview";
|
|
6614
|
+
"markdown.document-view": "markdown.document-view";
|
|
6538
6615
|
"cost.read": "cost.read";
|
|
6539
6616
|
"billing.read": "billing.read";
|
|
6540
6617
|
"skills.read": "skills.read";
|
|
@@ -6681,7 +6758,20 @@ export declare const KayUiTargetManifest: z.ZodObject<{
|
|
|
6681
6758
|
}, z.core.$strict>>>;
|
|
6682
6759
|
referencePresentations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
6683
6760
|
localId: z.ZodString;
|
|
6684
|
-
uriModule: z.ZodString
|
|
6761
|
+
uriModule: z.ZodOptional<z.ZodString>;
|
|
6762
|
+
scheme: z.ZodOptional<z.ZodString>;
|
|
6763
|
+
addresses: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
6764
|
+
pattern: z.ZodObject<{
|
|
6765
|
+
protocol: z.ZodString;
|
|
6766
|
+
hostname: z.ZodString;
|
|
6767
|
+
pathname: z.ZodOptional<z.ZodString>;
|
|
6768
|
+
search: z.ZodOptional<z.ZodString>;
|
|
6769
|
+
}, z.core.$strict>;
|
|
6770
|
+
objectId: z.ZodOptional<z.ZodString>;
|
|
6771
|
+
open: z.ZodOptional<z.ZodObject<{
|
|
6772
|
+
kind: z.ZodLiteral<"none">;
|
|
6773
|
+
}, z.core.$strict>>;
|
|
6774
|
+
}, z.core.$strict>>>;
|
|
6685
6775
|
resourceKind: z.ZodString;
|
|
6686
6776
|
open: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
6687
6777
|
kind: z.ZodLiteral<"working-document">;
|
|
@@ -6746,6 +6836,7 @@ export declare const KayUiTargetManifest: z.ZodObject<{
|
|
|
6746
6836
|
"sessions.create": "sessions.create";
|
|
6747
6837
|
"artifacts.read": "artifacts.read";
|
|
6748
6838
|
"artifacts.preview": "artifacts.preview";
|
|
6839
|
+
"markdown.document-view": "markdown.document-view";
|
|
6749
6840
|
"cost.read": "cost.read";
|
|
6750
6841
|
"billing.read": "billing.read";
|
|
6751
6842
|
"skills.read": "skills.read";
|
|
@@ -6782,6 +6873,7 @@ export declare const KayUiTargetManifest: z.ZodObject<{
|
|
|
6782
6873
|
"sessions.create": "sessions.create";
|
|
6783
6874
|
"artifacts.read": "artifacts.read";
|
|
6784
6875
|
"artifacts.preview": "artifacts.preview";
|
|
6876
|
+
"markdown.document-view": "markdown.document-view";
|
|
6785
6877
|
"cost.read": "cost.read";
|
|
6786
6878
|
"billing.read": "billing.read";
|
|
6787
6879
|
"skills.read": "skills.read";
|
|
@@ -6820,6 +6912,13 @@ export declare const KayUiTargetManifest: z.ZodObject<{
|
|
|
6820
6912
|
body: z.ZodString;
|
|
6821
6913
|
}, z.core.$strict>>;
|
|
6822
6914
|
}, z.core.$strict>>>;
|
|
6915
|
+
pages: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
6916
|
+
id: z.ZodString;
|
|
6917
|
+
title: z.ZodOptional<z.ZodString>;
|
|
6918
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
6919
|
+
companion: z.ZodOptional<z.ZodBoolean>;
|
|
6920
|
+
openedEvent: z.ZodOptional<z.ZodString>;
|
|
6921
|
+
}, z.core.$strict>>>;
|
|
6823
6922
|
themes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
6824
6923
|
localId: z.ZodString;
|
|
6825
6924
|
displayName: z.ZodString;
|
|
@@ -10213,9 +10312,37 @@ export declare const ReferenceOpenBehavior: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
10213
10312
|
|
|
10214
10313
|
export declare type ReferenceOpenBehavior = z.infer<typeof ReferenceOpenBehavior>;
|
|
10215
10314
|
|
|
10315
|
+
export declare const ReferencePresentationAddress: z.ZodObject<{
|
|
10316
|
+
pattern: z.ZodObject<{
|
|
10317
|
+
protocol: z.ZodString;
|
|
10318
|
+
hostname: z.ZodString;
|
|
10319
|
+
pathname: z.ZodOptional<z.ZodString>;
|
|
10320
|
+
search: z.ZodOptional<z.ZodString>;
|
|
10321
|
+
}, z.core.$strict>;
|
|
10322
|
+
objectId: z.ZodOptional<z.ZodString>;
|
|
10323
|
+
open: z.ZodOptional<z.ZodObject<{
|
|
10324
|
+
kind: z.ZodLiteral<"none">;
|
|
10325
|
+
}, z.core.$strict>>;
|
|
10326
|
+
}, z.core.$strict>;
|
|
10327
|
+
|
|
10328
|
+
export declare type ReferencePresentationAddress = z.infer<typeof ReferencePresentationAddress>;
|
|
10329
|
+
|
|
10216
10330
|
export declare const ReferencePresentationContribution: z.ZodObject<{
|
|
10217
10331
|
localId: z.ZodString;
|
|
10218
|
-
uriModule: z.ZodString
|
|
10332
|
+
uriModule: z.ZodOptional<z.ZodString>;
|
|
10333
|
+
scheme: z.ZodOptional<z.ZodString>;
|
|
10334
|
+
addresses: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
10335
|
+
pattern: z.ZodObject<{
|
|
10336
|
+
protocol: z.ZodString;
|
|
10337
|
+
hostname: z.ZodString;
|
|
10338
|
+
pathname: z.ZodOptional<z.ZodString>;
|
|
10339
|
+
search: z.ZodOptional<z.ZodString>;
|
|
10340
|
+
}, z.core.$strict>;
|
|
10341
|
+
objectId: z.ZodOptional<z.ZodString>;
|
|
10342
|
+
open: z.ZodOptional<z.ZodObject<{
|
|
10343
|
+
kind: z.ZodLiteral<"none">;
|
|
10344
|
+
}, z.core.$strict>>;
|
|
10345
|
+
}, z.core.$strict>>>;
|
|
10219
10346
|
resourceKind: z.ZodString;
|
|
10220
10347
|
open: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
10221
10348
|
kind: z.ZodLiteral<"working-document">;
|
|
@@ -10882,6 +11009,7 @@ export declare const ResolvedKayUiApp: z.ZodObject<{
|
|
|
10882
11009
|
"sessions.create": "sessions.create";
|
|
10883
11010
|
"artifacts.read": "artifacts.read";
|
|
10884
11011
|
"artifacts.preview": "artifacts.preview";
|
|
11012
|
+
"markdown.document-view": "markdown.document-view";
|
|
10885
11013
|
"cost.read": "cost.read";
|
|
10886
11014
|
"billing.read": "billing.read";
|
|
10887
11015
|
"skills.read": "skills.read";
|
|
@@ -12110,7 +12238,20 @@ export declare const ResolvedPluginContractV1: z.ZodObject<{
|
|
|
12110
12238
|
referencePresentations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
12111
12239
|
localId: z.ZodString;
|
|
12112
12240
|
globalId: z.ZodString;
|
|
12113
|
-
uriModule: z.ZodString
|
|
12241
|
+
uriModule: z.ZodOptional<z.ZodString>;
|
|
12242
|
+
schemes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
12243
|
+
addresses: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
12244
|
+
pattern: z.ZodObject<{
|
|
12245
|
+
protocol: z.ZodString;
|
|
12246
|
+
hostname: z.ZodString;
|
|
12247
|
+
pathname: z.ZodOptional<z.ZodString>;
|
|
12248
|
+
search: z.ZodOptional<z.ZodString>;
|
|
12249
|
+
}, z.core.$strict>;
|
|
12250
|
+
objectId: z.ZodOptional<z.ZodString>;
|
|
12251
|
+
open: z.ZodOptional<z.ZodObject<{
|
|
12252
|
+
kind: z.ZodLiteral<"none">;
|
|
12253
|
+
}, z.core.$strict>>;
|
|
12254
|
+
}, z.core.$strict>>>;
|
|
12114
12255
|
resourceKind: z.ZodString;
|
|
12115
12256
|
open: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
12116
12257
|
kind: z.ZodLiteral<"working-document">;
|
|
@@ -12174,6 +12315,7 @@ export declare const ResolvedPluginContractV1: z.ZodObject<{
|
|
|
12174
12315
|
"sessions.create": "sessions.create";
|
|
12175
12316
|
"artifacts.read": "artifacts.read";
|
|
12176
12317
|
"artifacts.preview": "artifacts.preview";
|
|
12318
|
+
"markdown.document-view": "markdown.document-view";
|
|
12177
12319
|
"cost.read": "cost.read";
|
|
12178
12320
|
"billing.read": "billing.read";
|
|
12179
12321
|
"skills.read": "skills.read";
|
|
@@ -12576,7 +12718,20 @@ export declare type ResolvedPluginWebSession = z.infer<typeof ResolvedPluginWebS
|
|
|
12576
12718
|
export declare const ResolvedReferencePresentation: z.ZodObject<{
|
|
12577
12719
|
localId: z.ZodString;
|
|
12578
12720
|
globalId: z.ZodString;
|
|
12579
|
-
uriModule: z.ZodString
|
|
12721
|
+
uriModule: z.ZodOptional<z.ZodString>;
|
|
12722
|
+
schemes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
12723
|
+
addresses: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
12724
|
+
pattern: z.ZodObject<{
|
|
12725
|
+
protocol: z.ZodString;
|
|
12726
|
+
hostname: z.ZodString;
|
|
12727
|
+
pathname: z.ZodOptional<z.ZodString>;
|
|
12728
|
+
search: z.ZodOptional<z.ZodString>;
|
|
12729
|
+
}, z.core.$strict>;
|
|
12730
|
+
objectId: z.ZodOptional<z.ZodString>;
|
|
12731
|
+
open: z.ZodOptional<z.ZodObject<{
|
|
12732
|
+
kind: z.ZodLiteral<"none">;
|
|
12733
|
+
}, z.core.$strict>>;
|
|
12734
|
+
}, z.core.$strict>>>;
|
|
12580
12735
|
resourceKind: z.ZodString;
|
|
12581
12736
|
open: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
12582
12737
|
kind: z.ZodLiteral<"working-document">;
|
|
@@ -13761,6 +13916,7 @@ export declare const UiAppCapabilities: z.ZodObject<{
|
|
|
13761
13916
|
"sessions.create": "sessions.create";
|
|
13762
13917
|
"artifacts.read": "artifacts.read";
|
|
13763
13918
|
"artifacts.preview": "artifacts.preview";
|
|
13919
|
+
"markdown.document-view": "markdown.document-view";
|
|
13764
13920
|
"cost.read": "cost.read";
|
|
13765
13921
|
"billing.read": "billing.read";
|
|
13766
13922
|
"skills.read": "skills.read";
|
|
@@ -13800,6 +13956,7 @@ export declare const UiAppContribution: z.ZodObject<{
|
|
|
13800
13956
|
"sessions.create": "sessions.create";
|
|
13801
13957
|
"artifacts.read": "artifacts.read";
|
|
13802
13958
|
"artifacts.preview": "artifacts.preview";
|
|
13959
|
+
"markdown.document-view": "markdown.document-view";
|
|
13803
13960
|
"cost.read": "cost.read";
|
|
13804
13961
|
"billing.read": "billing.read";
|
|
13805
13962
|
"skills.read": "skills.read";
|
|
@@ -13836,6 +13993,7 @@ export declare const UiAppContribution: z.ZodObject<{
|
|
|
13836
13993
|
"sessions.create": "sessions.create";
|
|
13837
13994
|
"artifacts.read": "artifacts.read";
|
|
13838
13995
|
"artifacts.preview": "artifacts.preview";
|
|
13996
|
+
"markdown.document-view": "markdown.document-view";
|
|
13839
13997
|
"cost.read": "cost.read";
|
|
13840
13998
|
"billing.read": "billing.read";
|
|
13841
13999
|
"skills.read": "skills.read";
|
|
@@ -13877,6 +14035,16 @@ export declare const UiEventSubscriptionContribution: z.ZodObject<{
|
|
|
13877
14035
|
|
|
13878
14036
|
export declare type UiEventSubscriptionContribution = z.infer<typeof UiEventSubscriptionContribution>;
|
|
13879
14037
|
|
|
14038
|
+
export declare const UiPageContribution: z.ZodObject<{
|
|
14039
|
+
id: z.ZodString;
|
|
14040
|
+
title: z.ZodOptional<z.ZodString>;
|
|
14041
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
14042
|
+
companion: z.ZodOptional<z.ZodBoolean>;
|
|
14043
|
+
openedEvent: z.ZodOptional<z.ZodString>;
|
|
14044
|
+
}, z.core.$strict>;
|
|
14045
|
+
|
|
14046
|
+
export declare type UiPageContribution = z.infer<typeof UiPageContribution>;
|
|
14047
|
+
|
|
13880
14048
|
export declare const UiRailEntryContribution: z.ZodObject<{
|
|
13881
14049
|
id: z.ZodString;
|
|
13882
14050
|
title: z.ZodString;
|
package/dist/index.js
CHANGED
|
@@ -30,6 +30,7 @@ function declaredUiIconPaths(manifest) {
|
|
|
30
30
|
const contributes = manifest.targets?.kay?.ui?.contributes;
|
|
31
31
|
return [
|
|
32
32
|
...(contributes?.railEntries ?? []).flatMap((entry) => entry.icon === void 0 ? [] : [{ label: `kay.ui rail entry '${entry.id}' icon`, path: entry.icon }]),
|
|
33
|
+
...(contributes?.pages ?? []).flatMap((page) => page.icon === void 0 ? [] : [{ label: `kay.ui page '${page.id}' icon`, path: page.icon }]),
|
|
33
34
|
...(contributes?.commands ?? []).flatMap((command) => command.icon === void 0 ? [] : [
|
|
34
35
|
{
|
|
35
36
|
label: `kay.ui command '${command.localId}' icon`,
|
|
@@ -253,7 +254,7 @@ var JsonSchema = z4.record(z4.string(), JsonValue);
|
|
|
253
254
|
var KAY_PLUGIN_MANIFEST_SIZE_CAP_BYTES = 1024 * 1024;
|
|
254
255
|
var KAY_PLUGIN_PROTOCOL_VERSION = "kay.plugin.v1";
|
|
255
256
|
var KAY_PLUGIN_PROTOCOL_PACKAGE_NAME = "@bonsai/plugin-protocol";
|
|
256
|
-
var KAY_PLUGIN_SDK_VERSION = "0.
|
|
257
|
+
var KAY_PLUGIN_SDK_VERSION = "0.36.0";
|
|
257
258
|
var KAY_PLUGIN_COMPATIBLE_SDK_VERSIONS = [
|
|
258
259
|
"0.26.3",
|
|
259
260
|
"0.27.1",
|
|
@@ -263,7 +264,8 @@ var KAY_PLUGIN_COMPATIBLE_SDK_VERSIONS = [
|
|
|
263
264
|
"0.31.0",
|
|
264
265
|
"0.32.0",
|
|
265
266
|
"0.33.0",
|
|
266
|
-
"0.34.0"
|
|
267
|
+
"0.34.0",
|
|
268
|
+
"0.35.0"
|
|
267
269
|
];
|
|
268
270
|
var KAY_PLUGIN_TARGET_NAMES = [
|
|
269
271
|
"kay.agent",
|
|
@@ -2736,6 +2738,7 @@ __export(contributions_exports, {
|
|
|
2736
2738
|
PluginNotificationRuleContribution: () => PluginNotificationRuleContribution,
|
|
2737
2739
|
PluginSkillSourceDeclaration: () => PluginSkillSourceDeclaration,
|
|
2738
2740
|
ReferenceOpenBehavior: () => ReferenceOpenBehavior,
|
|
2741
|
+
ReferencePresentationAddress: () => ReferencePresentationAddress,
|
|
2739
2742
|
ReferencePresentationContribution: () => ReferencePresentationContribution,
|
|
2740
2743
|
ReferencePresentationTooltip: () => ReferencePresentationTooltip,
|
|
2741
2744
|
ReferencePresentationUriPattern: () => ReferencePresentationUriPattern,
|
|
@@ -2756,6 +2759,7 @@ __export(contributions_exports, {
|
|
|
2756
2759
|
UiAppContribution: () => UiAppContribution,
|
|
2757
2760
|
UiCommandContribution: () => UiCommandContribution,
|
|
2758
2761
|
UiEventSubscriptionContribution: () => UiEventSubscriptionContribution,
|
|
2762
|
+
UiPageContribution: () => UiPageContribution,
|
|
2759
2763
|
UiRailEntryContribution: () => UiRailEntryContribution,
|
|
2760
2764
|
UiSlotContribution: () => UiSlotContribution,
|
|
2761
2765
|
UriModuleContribution: () => UriModuleContribution,
|
|
@@ -3012,6 +3016,9 @@ function declarationsOfKind(plugins, kind) {
|
|
|
3012
3016
|
declaration
|
|
3013
3017
|
})));
|
|
3014
3018
|
}
|
|
3019
|
+
function declaredReferencePresentations(plugins) {
|
|
3020
|
+
return plugins.flatMap((plugin) => (plugin.contributes["referencePresentations"] ?? []).map((declaration) => ({ plugin, declaration })));
|
|
3021
|
+
}
|
|
3015
3022
|
function declaredCommandId(pluginId, localId) {
|
|
3016
3023
|
return `${pluginId}/${localId}`;
|
|
3017
3024
|
}
|
|
@@ -3647,9 +3654,9 @@ function createContributionsSchemas(canonical) {
|
|
|
3647
3654
|
z12.strictObject({ kind: z12.literal("working-document") }),
|
|
3648
3655
|
z12.strictObject({ kind: z12.literal("browser-pane") }),
|
|
3649
3656
|
/**
|
|
3650
|
-
* Open one of the
|
|
3651
|
-
*
|
|
3652
|
-
* Needs no web address, so a plugin-only resource (`user-todo://items/3`) can pill.
|
|
3657
|
+
* Open one of the pages this manifest declares in `pages`. The window answers this from the
|
|
3658
|
+
* manifest, and the page gets the whole address as its `objectId` unless `addresses` says
|
|
3659
|
+
* otherwise. Needs no web address, so a plugin-only resource (`user-todo://items/3`) can pill.
|
|
3653
3660
|
*/
|
|
3654
3661
|
z12.strictObject({ kind: z12.literal("page"), pageId: NonEmptyString3 })
|
|
3655
3662
|
]);
|
|
@@ -3677,9 +3684,23 @@ function createContributionsSchemas(canonical) {
|
|
|
3677
3684
|
app: LocalContributionId2,
|
|
3678
3685
|
pattern: ReferencePresentationUriPattern2
|
|
3679
3686
|
});
|
|
3687
|
+
const ReferencePresentationAddress2 = z12.strictObject({
|
|
3688
|
+
pattern: ReferencePresentationUriPattern2,
|
|
3689
|
+
objectId: NonEmptyString3.optional(),
|
|
3690
|
+
open: z12.strictObject({ kind: z12.literal("none") }).optional()
|
|
3691
|
+
});
|
|
3680
3692
|
const ReferencePresentationContribution2 = z12.strictObject({
|
|
3681
3693
|
localId: LocalContributionId2,
|
|
3682
|
-
|
|
3694
|
+
/** This manifest's URI module. Leave it out only for an address another layer serves. */
|
|
3695
|
+
uriModule: LocalContributionId2.optional(),
|
|
3696
|
+
/**
|
|
3697
|
+
* The scheme this presentation opens, for an address with no module in this manifest. A
|
|
3698
|
+
* module's own schemes are filled in for the window. Every address of the scheme with something
|
|
3699
|
+
* after `://` opens the page, unless `addresses` narrows it.
|
|
3700
|
+
*/
|
|
3701
|
+
scheme: UriScheme2.optional(),
|
|
3702
|
+
/** Which of the addresses open the page, and on what. Read by the window. */
|
|
3703
|
+
addresses: z12.array(ReferencePresentationAddress2).min(1).optional(),
|
|
3683
3704
|
resourceKind: NonEmptyString3,
|
|
3684
3705
|
open: ReferenceOpenBehavior2,
|
|
3685
3706
|
/** MIME-specific resource kinds; absent keys use the base presentation. */
|
|
@@ -3696,6 +3717,38 @@ function createContributionsSchemas(canonical) {
|
|
|
3696
3717
|
message: "URL claims require browser-pane opening."
|
|
3697
3718
|
});
|
|
3698
3719
|
}
|
|
3720
|
+
if (value.uriModule === void 0 && value.scheme === void 0) {
|
|
3721
|
+
ctx.addIssue({
|
|
3722
|
+
code: "custom",
|
|
3723
|
+
path: ["uriModule"],
|
|
3724
|
+
message: "A reference presentation names a uriModule or a scheme."
|
|
3725
|
+
});
|
|
3726
|
+
}
|
|
3727
|
+
if ((value.scheme !== void 0 || value.addresses !== void 0) && value.open.kind !== "page") {
|
|
3728
|
+
ctx.addIssue({
|
|
3729
|
+
code: "custom",
|
|
3730
|
+
path: ["open"],
|
|
3731
|
+
message: "scheme and addresses require page opening."
|
|
3732
|
+
});
|
|
3733
|
+
}
|
|
3734
|
+
if (value.tooltip !== void 0 && value.open.kind === "page") {
|
|
3735
|
+
ctx.addIssue({
|
|
3736
|
+
code: "custom",
|
|
3737
|
+
path: ["tooltip"],
|
|
3738
|
+
message: "A presentation that opens a page has no tooltip."
|
|
3739
|
+
});
|
|
3740
|
+
}
|
|
3741
|
+
const protocols = [
|
|
3742
|
+
...value.scheme === void 0 ? [] : [value.scheme],
|
|
3743
|
+
...(value.addresses ?? []).map((row) => row.pattern.protocol)
|
|
3744
|
+
];
|
|
3745
|
+
if (protocols.some((protocol) => /^https?:?$/iu.test(protocol))) {
|
|
3746
|
+
ctx.addIssue({
|
|
3747
|
+
code: "custom",
|
|
3748
|
+
path: ["addresses"],
|
|
3749
|
+
message: "A web link never opens a page: use a plugin scheme."
|
|
3750
|
+
});
|
|
3751
|
+
}
|
|
3699
3752
|
});
|
|
3700
3753
|
const RichViewContribution2 = z12.strictObject({
|
|
3701
3754
|
localId: LocalContributionId2,
|
|
@@ -3709,6 +3762,9 @@ function createContributionsSchemas(canonical) {
|
|
|
3709
3762
|
"sessions.create",
|
|
3710
3763
|
"artifacts.read",
|
|
3711
3764
|
"artifacts.preview",
|
|
3765
|
+
// Draws Bonsai's markdown document view in the app's page (`BonsaiMarkdownDocumentView`).
|
|
3766
|
+
// It reads and saves nothing: the app supplies the text and keeps the edits.
|
|
3767
|
+
"markdown.document-view",
|
|
3712
3768
|
"cost.read",
|
|
3713
3769
|
// Server-rated organization billing, distinct from local/provider cost.
|
|
3714
3770
|
"billing.read",
|
|
@@ -3787,6 +3843,13 @@ function createContributionsSchemas(canonical) {
|
|
|
3787
3843
|
badge: UiRailBadge.optional(),
|
|
3788
3844
|
panel: z12.strictObject({ body: LocalContributionId2 }).optional()
|
|
3789
3845
|
});
|
|
3846
|
+
const UiPageContribution2 = z12.strictObject({
|
|
3847
|
+
id: NonEmptyString3,
|
|
3848
|
+
title: NonEmptyString3.optional(),
|
|
3849
|
+
icon: PackageAssetPath2.optional(),
|
|
3850
|
+
companion: z12.boolean().optional(),
|
|
3851
|
+
openedEvent: NonEmptyString3.optional()
|
|
3852
|
+
});
|
|
3790
3853
|
const UiAppFields = z12.strictObject({
|
|
3791
3854
|
localId: LocalContributionId2,
|
|
3792
3855
|
displayName: NonEmptyString3,
|
|
@@ -3923,11 +3986,13 @@ function createContributionsSchemas(canonical) {
|
|
|
3923
3986
|
ReferencePresentationUriPattern: ReferencePresentationUriPattern2,
|
|
3924
3987
|
ReferencePresentationUrlClaim: ReferencePresentationUrlClaim2,
|
|
3925
3988
|
ReferencePresentationTooltip: ReferencePresentationTooltip2,
|
|
3989
|
+
ReferencePresentationAddress: ReferencePresentationAddress2,
|
|
3926
3990
|
ReferencePresentationContribution: ReferencePresentationContribution2,
|
|
3927
3991
|
RichViewContribution: RichViewContribution2,
|
|
3928
3992
|
KayUiAppHostCapability: KayUiAppHostCapability2,
|
|
3929
3993
|
UiAppCapabilities: UiAppCapabilities2,
|
|
3930
3994
|
UiRailEntryContribution: UiRailEntryContribution2,
|
|
3995
|
+
UiPageContribution: UiPageContribution2,
|
|
3931
3996
|
UiAppContribution: UiAppContribution2,
|
|
3932
3997
|
ThemeContribution: ThemeContribution2,
|
|
3933
3998
|
CommandHandler: CommandHandler2,
|
|
@@ -3935,7 +4000,7 @@ function createContributionsSchemas(canonical) {
|
|
|
3935
4000
|
PluginContributionKind: PluginContributionKind2
|
|
3936
4001
|
};
|
|
3937
4002
|
}
|
|
3938
|
-
var { ApprovalCardForm, ApprovalCardStoredForm, ApprovalTypeContribution, UriModuleFacts, ToolContribution, ToolPermission, AgentToolContribution, ConverterContribution, UriModuleContribution, AppUriModuleContribution, AppDataSourceContribution, WhiteboardTypeStorage, WhiteboardTypeContribution, AppDataMaterializerContribution, ArtifactUriModuleContribution, CliBindingContribution, GitHostContribution, ResourceContribution, SkillContribution, PluginSkillSourceDeclaration, SearchProviderContribution, InteractionDriverContribution, EntityResolverContribution, AgentRenderContribution, EndpointContribution, WorkflowContribution, McpServerUrl, McpServerAuthMode, McpServerContribution, McpServerContributions, AppEventSubscription, ContextContributorContribution, PluginEventDefinitionContribution, PluginNotificationRuleContribution, UiEventSubscriptionContribution, DeviceDelegationContribution, SessionReaderContribution, UiCommandContribution, UiSlotContribution, SettingsPanelContribution, ResultRendererContribution, ReferenceOpenBehavior, ReferencePresentationVariant, ReferencePresentationVariants, ReferencePresentationUriPattern, ReferencePresentationUrlClaim, ReferencePresentationTooltip, ReferencePresentationContribution, RichViewContribution, KayUiAppHostCapability, UiAppCapabilities, UiRailEntryContribution, UiAppContribution, ThemeContribution, CommandHandler, CommandContribution, PluginContributionKind } = createContributionsSchemas(false);
|
|
4003
|
+
var { ApprovalCardForm, ApprovalCardStoredForm, ApprovalTypeContribution, UriModuleFacts, ToolContribution, ToolPermission, AgentToolContribution, ConverterContribution, UriModuleContribution, AppUriModuleContribution, AppDataSourceContribution, WhiteboardTypeStorage, WhiteboardTypeContribution, AppDataMaterializerContribution, ArtifactUriModuleContribution, CliBindingContribution, GitHostContribution, ResourceContribution, SkillContribution, PluginSkillSourceDeclaration, SearchProviderContribution, InteractionDriverContribution, EntityResolverContribution, AgentRenderContribution, EndpointContribution, WorkflowContribution, McpServerUrl, McpServerAuthMode, McpServerContribution, McpServerContributions, AppEventSubscription, ContextContributorContribution, PluginEventDefinitionContribution, PluginNotificationRuleContribution, UiEventSubscriptionContribution, DeviceDelegationContribution, SessionReaderContribution, UiCommandContribution, UiSlotContribution, SettingsPanelContribution, ResultRendererContribution, ReferenceOpenBehavior, ReferencePresentationVariant, ReferencePresentationVariants, ReferencePresentationUriPattern, ReferencePresentationUrlClaim, ReferencePresentationTooltip, ReferencePresentationAddress, ReferencePresentationContribution, RichViewContribution, KayUiAppHostCapability, UiAppCapabilities, UiRailEntryContribution, UiPageContribution, UiAppContribution, ThemeContribution, CommandHandler, CommandContribution, PluginContributionKind } = createContributionsSchemas(false);
|
|
3939
4004
|
var canonicalContributionSchemas = createContributionsSchemas(true);
|
|
3940
4005
|
|
|
3941
4006
|
// packages/plugin-protocol/dist/icon-shape.js
|
|
@@ -4009,7 +4074,7 @@ var KAY_UI_NATIVE_EVENT_SUBSCRIPTIONS = [
|
|
|
4009
4074
|
var KAY_UI_NATIVE_EVENT_ALLOWLIST = new Set(KAY_UI_NATIVE_EVENT_SUBSCRIPTIONS);
|
|
4010
4075
|
var RETIRED_COMPATIBILITY_KEYS = ["policy"];
|
|
4011
4076
|
function createManifestSchemas(canonical) {
|
|
4012
|
-
const { AgentRenderContribution: AgentRenderContribution2, ApprovalTypeContribution: ApprovalTypeContribution2, WorkflowContribution: WorkflowContribution2, AppDataMaterializerContribution: AppDataMaterializerContribution2, AppDataSourceContribution: AppDataSourceContribution2, AppUriModuleContribution: AppUriModuleContribution2, AppEventSubscription: AppEventSubscription2, ArtifactUriModuleContribution: ArtifactUriModuleContribution2, CliBindingContribution: CliBindingContribution2, CommandContribution: CommandContribution2, ContextContributorContribution: ContextContributorContribution2, ConverterContribution: ConverterContribution2, SessionReaderContribution: SessionReaderContribution2, DeviceDelegationContribution: DeviceDelegationContribution2, EndpointContribution: EndpointContribution2, EntityResolverContribution: EntityResolverContribution2, GitHostContribution: GitHostContribution2, McpServerContributions: McpServerContributions2, PluginEventDefinitionContribution: PluginEventDefinitionContribution2, PluginNotificationRuleContribution: PluginNotificationRuleContribution2, ResourceContribution: ResourceContribution2, ReferencePresentationContribution: ReferencePresentationContribution2, ResultRendererContribution: ResultRendererContribution2, RichViewContribution: RichViewContribution2, PluginSkillSourceDeclaration: PluginSkillSourceDeclaration2, InteractionDriverContribution: InteractionDriverContribution2, SearchProviderContribution: SearchProviderContribution2, SkillContribution: SkillContribution2, SettingsPanelContribution: SettingsPanelContribution2, ThemeContribution: ThemeContribution2, AgentToolContribution: AgentToolContribution2, ToolContribution: ToolContribution2, UiCommandContribution: UiCommandContribution2, UiAppContribution: UiAppContribution2, UiRailEntryContribution: UiRailEntryContribution2, UiEventSubscriptionContribution: UiEventSubscriptionContribution2, UiSlotContribution: UiSlotContribution2, UriModuleContribution: UriModuleContribution2, WhiteboardTypeContribution: WhiteboardTypeContribution2 } = canonical ? canonicalContributionSchemas : contributions_exports;
|
|
4077
|
+
const { AgentRenderContribution: AgentRenderContribution2, ApprovalTypeContribution: ApprovalTypeContribution2, WorkflowContribution: WorkflowContribution2, AppDataMaterializerContribution: AppDataMaterializerContribution2, AppDataSourceContribution: AppDataSourceContribution2, AppUriModuleContribution: AppUriModuleContribution2, AppEventSubscription: AppEventSubscription2, ArtifactUriModuleContribution: ArtifactUriModuleContribution2, CliBindingContribution: CliBindingContribution2, CommandContribution: CommandContribution2, ContextContributorContribution: ContextContributorContribution2, ConverterContribution: ConverterContribution2, SessionReaderContribution: SessionReaderContribution2, DeviceDelegationContribution: DeviceDelegationContribution2, EndpointContribution: EndpointContribution2, EntityResolverContribution: EntityResolverContribution2, GitHostContribution: GitHostContribution2, McpServerContributions: McpServerContributions2, PluginEventDefinitionContribution: PluginEventDefinitionContribution2, PluginNotificationRuleContribution: PluginNotificationRuleContribution2, ResourceContribution: ResourceContribution2, ReferencePresentationContribution: ReferencePresentationContribution2, ResultRendererContribution: ResultRendererContribution2, RichViewContribution: RichViewContribution2, PluginSkillSourceDeclaration: PluginSkillSourceDeclaration2, InteractionDriverContribution: InteractionDriverContribution2, SearchProviderContribution: SearchProviderContribution2, SkillContribution: SkillContribution2, SettingsPanelContribution: SettingsPanelContribution2, ThemeContribution: ThemeContribution2, AgentToolContribution: AgentToolContribution2, ToolContribution: ToolContribution2, UiCommandContribution: UiCommandContribution2, UiAppContribution: UiAppContribution2, UiRailEntryContribution: UiRailEntryContribution2, UiPageContribution: UiPageContribution2, UiEventSubscriptionContribution: UiEventSubscriptionContribution2, UiSlotContribution: UiSlotContribution2, UriModuleContribution: UriModuleContribution2, WhiteboardTypeContribution: WhiteboardTypeContribution2 } = canonical ? canonicalContributionSchemas : contributions_exports;
|
|
4013
4078
|
const { HttpsUrl: HttpsUrl2, LocalContributionId: LocalContributionId2, NonEmptyString: NonEmptyString3, PackageAssetPath: PackageAssetPath2, PluginId: PluginId2, PluginNamespace: PluginNamespace2, RegistrableDomain: RegistrableDomain2, SignedInStatusCode: SignedInStatusCode2, TargetEntrypoint: TargetEntrypoint2 } = canonical ? canonicalCommonSchemas : common_exports;
|
|
4014
4079
|
const { PluginPermissionManifest: PluginPermissionManifest2 } = canonical ? canonicalPermissionSchemas : permissions_exports;
|
|
4015
4080
|
const KayAgentTargetManifest2 = z13.strictObject({
|
|
@@ -4132,6 +4197,7 @@ function createManifestSchemas(canonical) {
|
|
|
4132
4197
|
views: z13.array(RichViewContribution2).optional(),
|
|
4133
4198
|
apps: z13.array(UiAppContribution2).optional(),
|
|
4134
4199
|
railEntries: z13.array(UiRailEntryContribution2).optional(),
|
|
4200
|
+
pages: z13.array(UiPageContribution2).optional(),
|
|
4135
4201
|
themes: z13.array(ThemeContribution2).optional(),
|
|
4136
4202
|
eventSubscriptions: z13.array(UiEventSubscriptionContribution2).optional(),
|
|
4137
4203
|
dataMaterializers: z13.array(AppDataMaterializerContribution2).optional()
|
|
@@ -4687,6 +4753,10 @@ function createManifestSchemas(canonical) {
|
|
|
4687
4753
|
...manifest.targets?.kay?.app?.contributes?.uriModules ?? []
|
|
4688
4754
|
].map((module) => module.localId));
|
|
4689
4755
|
const presentationByUriModule = /* @__PURE__ */ new Map();
|
|
4756
|
+
const declaredPageIds = /* @__PURE__ */ new Set([
|
|
4757
|
+
...(manifest.targets?.kay?.ui?.contributes?.pages ?? []).map((page) => page.id),
|
|
4758
|
+
...(manifest.targets?.kay?.ui?.contributes?.railEntries ?? []).map((entry) => entry.page)
|
|
4759
|
+
]);
|
|
4690
4760
|
for (const [index, presentation] of (manifest.targets?.kay?.ui?.contributes?.referencePresentations ?? []).entries()) {
|
|
4691
4761
|
const path = [
|
|
4692
4762
|
"targets",
|
|
@@ -4696,7 +4766,7 @@ function createManifestSchemas(canonical) {
|
|
|
4696
4766
|
"referencePresentations",
|
|
4697
4767
|
index
|
|
4698
4768
|
];
|
|
4699
|
-
if (!uriModuleIds.has(presentation.uriModule)) {
|
|
4769
|
+
if (presentation.uriModule !== void 0 && !uriModuleIds.has(presentation.uriModule)) {
|
|
4700
4770
|
ctx.addIssue({
|
|
4701
4771
|
code: "custom",
|
|
4702
4772
|
path: [...path, "uriModule"],
|
|
@@ -4710,6 +4780,15 @@ function createManifestSchemas(canonical) {
|
|
|
4710
4780
|
message: `reference presentation ${presentation.localId} references unknown ui app ${presentation.tooltip.app}`
|
|
4711
4781
|
});
|
|
4712
4782
|
}
|
|
4783
|
+
if (presentation.open.kind === "page" && !declaredPageIds.has(presentation.open.pageId)) {
|
|
4784
|
+
ctx.addIssue({
|
|
4785
|
+
code: "custom",
|
|
4786
|
+
path: [...path, "open", "pageId"],
|
|
4787
|
+
message: `reference presentation ${presentation.localId} opens page ${presentation.open.pageId}, which this manifest declares in neither pages nor railEntries`
|
|
4788
|
+
});
|
|
4789
|
+
}
|
|
4790
|
+
if (presentation.uriModule === void 0)
|
|
4791
|
+
continue;
|
|
4713
4792
|
const existing = presentationByUriModule.get(presentation.uriModule);
|
|
4714
4793
|
if (existing !== void 0) {
|
|
4715
4794
|
ctx.addIssue({
|
|
@@ -5400,7 +5479,7 @@ function boundPluginDiagnosticMessage(message) {
|
|
|
5400
5479
|
import { z as z14 } from "zod";
|
|
5401
5480
|
function createResolvedContractSchemas(canonical) {
|
|
5402
5481
|
const { PluginEventLocalId: PluginEventLocalId2 } = canonical ? canonicalPluginEventSchemas : plugin_events_exports;
|
|
5403
|
-
const { ApprovalTypeContribution: ApprovalTypeContribution2, KayUiAppHostCapability: KayUiAppHostCapability2, McpServerAuthMode: McpServerAuthMode2, McpServerUrl: McpServerUrl2, PluginContributionKind: PluginContributionKindSchema, ReferenceOpenBehavior: ReferenceOpenBehavior2, ReferencePresentationUriPattern: ReferencePresentationUriPattern2, ReferencePresentationUrlClaim: ReferencePresentationUrlClaim2, ReferencePresentationVariants: ReferencePresentationVariants2, UriModuleFacts: UriModuleFacts2, WhiteboardTypeStorage: WhiteboardTypeStorage2 } = canonical ? canonicalContributionSchemas : contributions_exports;
|
|
5482
|
+
const { ApprovalTypeContribution: ApprovalTypeContribution2, KayUiAppHostCapability: KayUiAppHostCapability2, McpServerAuthMode: McpServerAuthMode2, McpServerUrl: McpServerUrl2, PluginContributionKind: PluginContributionKindSchema, ReferenceOpenBehavior: ReferenceOpenBehavior2, ReferencePresentationUriPattern: ReferencePresentationUriPattern2, ReferencePresentationAddress: ReferencePresentationAddress2, ReferencePresentationUrlClaim: ReferencePresentationUrlClaim2, ReferencePresentationVariants: ReferencePresentationVariants2, UriModuleFacts: UriModuleFacts2, WhiteboardTypeStorage: WhiteboardTypeStorage2 } = canonical ? canonicalContributionSchemas : contributions_exports;
|
|
5404
5483
|
const { FileExtensionToken: FileExtensionToken2, GitBasicAuthUser: GitBasicAuthUser2, GitHostName: GitHostName2, GlobalContributionId: GlobalContributionId2, HttpsUrl: HttpsUrl2, LocalContributionId: LocalContributionId2, MimeTypeString: MimeTypeString2, NonEmptyString: NonEmptyString3, PackageAssetPath: PackageAssetPath2, PluginId: PluginId2, PluginNamespace: PluginNamespace2, PluginToolName: PluginToolName2, RegistrableDomain: RegistrableDomain2, SignedInStatusCode: SignedInStatusCode2, TargetEntrypoint: TargetEntrypoint2, UriScheme: UriScheme2 } = canonical ? canonicalCommonSchemas : common_exports;
|
|
5405
5484
|
const { PluginExternalCliConnect: PluginExternalCliConnect2, PluginOAuthClientSupplier: PluginOAuthClientSupplier2 } = canonical ? canonicalManifestSchemas : manifest_exports;
|
|
5406
5485
|
const { ResolvedPluginGrants: ResolvedPluginGrants2 } = canonical ? canonicalPermissionSchemas : permissions_exports;
|
|
@@ -5563,7 +5642,10 @@ function createResolvedContractSchemas(canonical) {
|
|
|
5563
5642
|
const ResolvedReferencePresentation2 = z14.strictObject({
|
|
5564
5643
|
localId: LocalContributionId2,
|
|
5565
5644
|
globalId: GlobalContributionId2,
|
|
5566
|
-
uriModule: GlobalContributionId2,
|
|
5645
|
+
uriModule: GlobalContributionId2.optional(),
|
|
5646
|
+
/** The schemes a page-opening presentation answers for: its `scheme`, or its module's. */
|
|
5647
|
+
schemes: z14.array(UriScheme2).min(1).optional(),
|
|
5648
|
+
addresses: z14.array(ReferencePresentationAddress2).min(1).optional(),
|
|
5567
5649
|
resourceKind: NonEmptyString3,
|
|
5568
5650
|
open: ReferenceOpenBehavior2,
|
|
5569
5651
|
/** MIME-specific resource kinds; absent keys use the base presentation. */
|
|
@@ -6185,7 +6267,11 @@ function resolveKayPluginContractV1(manifest) {
|
|
|
6185
6267
|
const referencePresentations = manifest.targets?.kay?.ui?.contributes?.referencePresentations?.map((presentation) => ({
|
|
6186
6268
|
localId: presentation.localId,
|
|
6187
6269
|
globalId: resolveGlobalContributionId(namespace, presentation.localId),
|
|
6188
|
-
uriModule:
|
|
6270
|
+
...presentation.uriModule === void 0 ? {} : {
|
|
6271
|
+
uriModule: resolveGlobalContributionId(namespace, presentation.uriModule)
|
|
6272
|
+
},
|
|
6273
|
+
...presentationSchemes(manifest, presentation),
|
|
6274
|
+
...presentation.addresses === void 0 ? {} : { addresses: presentation.addresses },
|
|
6189
6275
|
resourceKind: presentation.resourceKind,
|
|
6190
6276
|
open: presentation.open,
|
|
6191
6277
|
...presentation.tooltip === void 0 ? {} : {
|
|
@@ -6270,6 +6356,19 @@ function safeResolveKayPluginContractV1(manifest) {
|
|
|
6270
6356
|
throw error;
|
|
6271
6357
|
}
|
|
6272
6358
|
}
|
|
6359
|
+
function presentationSchemes(manifest, presentation) {
|
|
6360
|
+
if (presentation.scheme !== void 0) {
|
|
6361
|
+
return { schemes: [presentation.scheme] };
|
|
6362
|
+
}
|
|
6363
|
+
if (presentation.open.kind !== "page")
|
|
6364
|
+
return {};
|
|
6365
|
+
const contributes = manifest.targets?.kay;
|
|
6366
|
+
const module = [
|
|
6367
|
+
...contributes?.agent?.contributes?.uriModules ?? [],
|
|
6368
|
+
...contributes?.app?.contributes?.uriModules ?? []
|
|
6369
|
+
].find((candidate) => candidate.localId === presentation.uriModule);
|
|
6370
|
+
return module === void 0 ? {} : { schemes: [...module.schemes] };
|
|
6371
|
+
}
|
|
6273
6372
|
function uriModuleFacts({ localId: _localId, schemes: _schemes, displayName: _displayName, authService: _authService, authScheme: _authScheme, knownResources: _knownResources, describesOperations: _describesOperations, ...facts }) {
|
|
6274
6373
|
return facts;
|
|
6275
6374
|
}
|
|
@@ -7115,6 +7214,7 @@ export {
|
|
|
7115
7214
|
RETIRED_PLUGIN_CAPABILITY_SLUGS,
|
|
7116
7215
|
RETIRED_WEB_SESSION_ROW_KEYS,
|
|
7117
7216
|
ReferenceOpenBehavior,
|
|
7217
|
+
ReferencePresentationAddress,
|
|
7118
7218
|
ReferencePresentationContribution,
|
|
7119
7219
|
ReferencePresentationTooltip,
|
|
7120
7220
|
ReferencePresentationUriPattern,
|
|
@@ -7182,6 +7282,7 @@ export {
|
|
|
7182
7282
|
UiAppContribution,
|
|
7183
7283
|
UiCommandContribution,
|
|
7184
7284
|
UiEventSubscriptionContribution,
|
|
7285
|
+
UiPageContribution,
|
|
7185
7286
|
UiRailEntryContribution,
|
|
7186
7287
|
UiSlotContribution,
|
|
7187
7288
|
UriModuleContribution,
|
|
@@ -7214,6 +7315,7 @@ export {
|
|
|
7214
7315
|
configSectionKeysForManifest,
|
|
7215
7316
|
declarationsOfKind,
|
|
7216
7317
|
declaredCommandId,
|
|
7318
|
+
declaredReferencePresentations,
|
|
7217
7319
|
declaredUiIconPaths,
|
|
7218
7320
|
dedupeClaims,
|
|
7219
7321
|
deriveDirectoryPluginToolName,
|
package/package.json
CHANGED