@yaklabs-ai/plugin-protocol 0.44.0 → 0.45.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 +89 -2
- package/dist/index.js +96 -6
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1669,6 +1669,7 @@ declare namespace authoringContributionSchemas {
|
|
|
1669
1669
|
EntityResolverContribution,
|
|
1670
1670
|
AgentRenderContribution,
|
|
1671
1671
|
EndpointContribution,
|
|
1672
|
+
PluginCardContribution,
|
|
1672
1673
|
WorkflowContribution,
|
|
1673
1674
|
McpServerUrl,
|
|
1674
1675
|
McpServerAuthMode,
|
|
@@ -1706,7 +1707,8 @@ declare namespace authoringContributionSchemas {
|
|
|
1706
1707
|
CommandHandler,
|
|
1707
1708
|
CommandContribution,
|
|
1708
1709
|
PluginContributionKind,
|
|
1709
|
-
canonicalContributionSchemas
|
|
1710
|
+
canonicalContributionSchemas,
|
|
1711
|
+
PluginCardResult
|
|
1710
1712
|
}
|
|
1711
1713
|
}
|
|
1712
1714
|
|
|
@@ -2541,6 +2543,14 @@ declare const canonicalContributionSchemas: {
|
|
|
2541
2543
|
}, z.core.$strict>>;
|
|
2542
2544
|
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
2543
2545
|
}, z.core.$strict>;
|
|
2546
|
+
PluginCardContribution: z.ZodObject<{
|
|
2547
|
+
localId: z.ZodString;
|
|
2548
|
+
description: z.ZodString;
|
|
2549
|
+
inputs: z.ZodRecord<z.ZodString, z.ZodType<authoringCommonSchemas.JsonValue, unknown, z.core.$ZodTypeInternals<authoringCommonSchemas.JsonValue, unknown>>>;
|
|
2550
|
+
readEndpoint: z.ZodString;
|
|
2551
|
+
submitEndpoint: z.ZodString;
|
|
2552
|
+
authService: z.ZodOptional<z.ZodString>;
|
|
2553
|
+
}, z.core.$strict>;
|
|
2544
2554
|
WorkflowContribution: z.ZodObject<{
|
|
2545
2555
|
localId: z.ZodString;
|
|
2546
2556
|
name: z.ZodString;
|
|
@@ -3048,6 +3058,7 @@ declare const canonicalContributionSchemas: {
|
|
|
3048
3058
|
interactionDriver: "interactionDriver";
|
|
3049
3059
|
entityResolver: "entityResolver";
|
|
3050
3060
|
agentRenderer: "agentRenderer";
|
|
3061
|
+
pluginCard: "pluginCard";
|
|
3051
3062
|
eventDefinition: "eventDefinition";
|
|
3052
3063
|
eventSubscription: "eventSubscription";
|
|
3053
3064
|
appDataSource: "appDataSource";
|
|
@@ -4315,8 +4326,10 @@ export declare const KAY_PLUGIN_PROTOCOL_VERSION: "kay.plugin.v1";
|
|
|
4315
4326
|
*
|
|
4316
4327
|
* 0.44.0 adds `words.kinds` to a reference presentation (#15905): an ordered list of address patterns
|
|
4317
4328
|
* and the kind each one names. Additive: a plugin that lists them declares ^0.44.0.
|
|
4329
|
+
*
|
|
4330
|
+
* 0.45.0 adds declared plugin cards and app.implementCard for their read/submit endpoints.
|
|
4318
4331
|
*/
|
|
4319
|
-
export declare const KAY_PLUGIN_SDK_VERSION: "0.
|
|
4332
|
+
export declare const KAY_PLUGIN_SDK_VERSION: "0.45.0";
|
|
4320
4333
|
|
|
4321
4334
|
export declare const KAY_PLUGIN_TARGET_NAMES: readonly ["kay.agent", "kay.app", "kay.ui"];
|
|
4322
4335
|
|
|
@@ -4671,6 +4684,14 @@ export declare const KayAppTargetManifest: z.ZodObject<{
|
|
|
4671
4684
|
}, z.core.$strict>>;
|
|
4672
4685
|
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
4673
4686
|
}, z.core.$strict>>>;
|
|
4687
|
+
cards: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
4688
|
+
localId: z.ZodString;
|
|
4689
|
+
description: z.ZodString;
|
|
4690
|
+
inputs: z.ZodRecord<z.ZodString, z.ZodType<authoringCommonSchemas.JsonValue, unknown, z.core.$ZodTypeInternals<authoringCommonSchemas.JsonValue, unknown>>>;
|
|
4691
|
+
readEndpoint: z.ZodString;
|
|
4692
|
+
submitEndpoint: z.ZodString;
|
|
4693
|
+
authService: z.ZodOptional<z.ZodString>;
|
|
4694
|
+
}, z.core.$strict>>>;
|
|
4674
4695
|
uriModules: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
4675
4696
|
description: z.ZodExactOptional<z.ZodString>;
|
|
4676
4697
|
localId: z.ZodString;
|
|
@@ -5464,6 +5485,14 @@ export declare const KayPluginManifestV1: z.ZodObject<{
|
|
|
5464
5485
|
}, z.core.$strict>>;
|
|
5465
5486
|
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
5466
5487
|
}, z.core.$strict>>>;
|
|
5488
|
+
cards: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
5489
|
+
localId: z.ZodString;
|
|
5490
|
+
description: z.ZodString;
|
|
5491
|
+
inputs: z.ZodRecord<z.ZodString, z.ZodType<authoringCommonSchemas.JsonValue, unknown, z.core.$ZodTypeInternals<authoringCommonSchemas.JsonValue, unknown>>>;
|
|
5492
|
+
readEndpoint: z.ZodString;
|
|
5493
|
+
submitEndpoint: z.ZodString;
|
|
5494
|
+
authService: z.ZodOptional<z.ZodString>;
|
|
5495
|
+
}, z.core.$strict>>>;
|
|
5467
5496
|
uriModules: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
5468
5497
|
description: z.ZodExactOptional<z.ZodString>;
|
|
5469
5498
|
localId: z.ZodString;
|
|
@@ -9715,6 +9744,26 @@ export declare type PluginCapabilityRefusalV1 = z.infer<typeof PluginCapabilityR
|
|
|
9715
9744
|
|
|
9716
9745
|
export declare type PluginCapabilitySlug = (typeof PLUGIN_CAPABILITY_SLUGS)[number];
|
|
9717
9746
|
|
|
9747
|
+
export declare const PluginCardContribution: z.ZodObject<{
|
|
9748
|
+
localId: z.ZodString;
|
|
9749
|
+
description: z.ZodString;
|
|
9750
|
+
inputs: z.ZodRecord<z.ZodString, z.ZodType<authoringCommonSchemas.JsonValue, unknown, z.core.$ZodTypeInternals<authoringCommonSchemas.JsonValue, unknown>>>;
|
|
9751
|
+
readEndpoint: z.ZodString;
|
|
9752
|
+
submitEndpoint: z.ZodString;
|
|
9753
|
+
authService: z.ZodOptional<z.ZodString>;
|
|
9754
|
+
}, z.core.$strict>;
|
|
9755
|
+
|
|
9756
|
+
export declare type PluginCardContribution = z.infer<typeof PluginCardContribution>;
|
|
9757
|
+
|
|
9758
|
+
export declare type PluginCardResult<T> = {
|
|
9759
|
+
readonly ok: true;
|
|
9760
|
+
readonly data: T;
|
|
9761
|
+
} | {
|
|
9762
|
+
readonly ok: false;
|
|
9763
|
+
readonly reason: "needs-auth" | "failed";
|
|
9764
|
+
readonly message: string;
|
|
9765
|
+
};
|
|
9766
|
+
|
|
9718
9767
|
export declare const PluginCompatibilityManifest: z.ZodObject<{
|
|
9719
9768
|
supportedProtocols: z.ZodOptional<z.ZodArray<z.ZodLiteral<"kay.plugin.v1">>>;
|
|
9720
9769
|
minKayVersion: z.ZodOptional<z.ZodString>;
|
|
@@ -9779,6 +9828,7 @@ export declare const PluginContributionKind: z.ZodEnum<{
|
|
|
9779
9828
|
interactionDriver: "interactionDriver";
|
|
9780
9829
|
entityResolver: "entityResolver";
|
|
9781
9830
|
agentRenderer: "agentRenderer";
|
|
9831
|
+
pluginCard: "pluginCard";
|
|
9782
9832
|
eventDefinition: "eventDefinition";
|
|
9783
9833
|
eventSubscription: "eventSubscription";
|
|
9784
9834
|
appDataSource: "appDataSource";
|
|
@@ -12002,6 +12052,25 @@ export declare const ResolvedPluginAuthService: z.ZodObject<{
|
|
|
12002
12052
|
|
|
12003
12053
|
export declare type ResolvedPluginAuthService = z.infer<typeof ResolvedPluginAuthService>;
|
|
12004
12054
|
|
|
12055
|
+
export declare const ResolvedPluginCard: z.ZodObject<{
|
|
12056
|
+
localId: z.ZodString;
|
|
12057
|
+
globalId: z.ZodString;
|
|
12058
|
+
pluginId: z.ZodString;
|
|
12059
|
+
description: z.ZodString;
|
|
12060
|
+
inputs: z.ZodRecord<z.ZodString, z.ZodType<authoringCommonSchemas.JsonValue, unknown, z.core.$ZodTypeInternals<authoringCommonSchemas.JsonValue, unknown>>>;
|
|
12061
|
+
readEndpoint: z.ZodObject<{
|
|
12062
|
+
localId: z.ZodString;
|
|
12063
|
+
globalId: z.ZodString;
|
|
12064
|
+
}, z.core.$strict>;
|
|
12065
|
+
submitEndpoint: z.ZodObject<{
|
|
12066
|
+
localId: z.ZodString;
|
|
12067
|
+
globalId: z.ZodString;
|
|
12068
|
+
}, z.core.$strict>;
|
|
12069
|
+
authService: z.ZodOptional<z.ZodString>;
|
|
12070
|
+
}, z.core.$strict>;
|
|
12071
|
+
|
|
12072
|
+
export declare type ResolvedPluginCard = z.infer<typeof ResolvedPluginCard>;
|
|
12073
|
+
|
|
12005
12074
|
export declare const ResolvedPluginContractV1: z.ZodObject<{
|
|
12006
12075
|
protocol: z.ZodLiteral<"kay.plugin.v1">;
|
|
12007
12076
|
pluginId: z.ZodString;
|
|
@@ -12030,6 +12099,7 @@ export declare const ResolvedPluginContractV1: z.ZodObject<{
|
|
|
12030
12099
|
interactionDriver: "interactionDriver";
|
|
12031
12100
|
entityResolver: "entityResolver";
|
|
12032
12101
|
agentRenderer: "agentRenderer";
|
|
12102
|
+
pluginCard: "pluginCard";
|
|
12033
12103
|
eventDefinition: "eventDefinition";
|
|
12034
12104
|
eventSubscription: "eventSubscription";
|
|
12035
12105
|
appDataSource: "appDataSource";
|
|
@@ -12827,6 +12897,22 @@ export declare const ResolvedPluginContractV1: z.ZodObject<{
|
|
|
12827
12897
|
scopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
12828
12898
|
}, z.core.$strict>>;
|
|
12829
12899
|
}, z.core.$strict>>>;
|
|
12900
|
+
kayAppCards: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
12901
|
+
localId: z.ZodString;
|
|
12902
|
+
globalId: z.ZodString;
|
|
12903
|
+
pluginId: z.ZodString;
|
|
12904
|
+
description: z.ZodString;
|
|
12905
|
+
inputs: z.ZodRecord<z.ZodString, z.ZodType<authoringCommonSchemas.JsonValue, unknown, z.core.$ZodTypeInternals<authoringCommonSchemas.JsonValue, unknown>>>;
|
|
12906
|
+
readEndpoint: z.ZodObject<{
|
|
12907
|
+
localId: z.ZodString;
|
|
12908
|
+
globalId: z.ZodString;
|
|
12909
|
+
}, z.core.$strict>;
|
|
12910
|
+
submitEndpoint: z.ZodObject<{
|
|
12911
|
+
localId: z.ZodString;
|
|
12912
|
+
globalId: z.ZodString;
|
|
12913
|
+
}, z.core.$strict>;
|
|
12914
|
+
authService: z.ZodOptional<z.ZodString>;
|
|
12915
|
+
}, z.core.$strict>>>;
|
|
12830
12916
|
kayAppDataSources: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
12831
12917
|
localId: z.ZodString;
|
|
12832
12918
|
globalId: z.ZodString;
|
|
@@ -13066,6 +13152,7 @@ export declare const ResolvedPluginContributionId: z.ZodObject<{
|
|
|
13066
13152
|
interactionDriver: "interactionDriver";
|
|
13067
13153
|
entityResolver: "entityResolver";
|
|
13068
13154
|
agentRenderer: "agentRenderer";
|
|
13155
|
+
pluginCard: "pluginCard";
|
|
13069
13156
|
eventDefinition: "eventDefinition";
|
|
13070
13157
|
eventSubscription: "eventSubscription";
|
|
13071
13158
|
appDataSource: "appDataSource";
|
package/dist/index.js
CHANGED
|
@@ -254,11 +254,12 @@ var JsonSchema = z4.record(z4.string(), JsonValue);
|
|
|
254
254
|
var KAY_PLUGIN_MANIFEST_SIZE_CAP_BYTES = 1024 * 1024;
|
|
255
255
|
var KAY_PLUGIN_PROTOCOL_VERSION = "kay.plugin.v1";
|
|
256
256
|
var KAY_PLUGIN_PROTOCOL_PACKAGE_NAME = "@bonsai/plugin-protocol";
|
|
257
|
-
var KAY_PLUGIN_SDK_VERSION = "0.
|
|
257
|
+
var KAY_PLUGIN_SDK_VERSION = "0.45.0";
|
|
258
258
|
var KAY_PLUGIN_COMPATIBLE_SDK_VERSIONS = [
|
|
259
259
|
"0.42.0",
|
|
260
260
|
"0.42.1",
|
|
261
|
-
"0.43.0"
|
|
261
|
+
"0.43.0",
|
|
262
|
+
"0.44.0"
|
|
262
263
|
];
|
|
263
264
|
var KAY_PLUGIN_TARGET_NAMES = [
|
|
264
265
|
"kay.agent",
|
|
@@ -2754,6 +2755,7 @@ __export(contributions_exports, {
|
|
|
2754
2755
|
McpServerContributions: () => McpServerContributions,
|
|
2755
2756
|
McpServerUrl: () => McpServerUrl,
|
|
2756
2757
|
PLUGIN_NOTIFICATION_RULE_HOST_KEYS: () => PLUGIN_NOTIFICATION_RULE_HOST_KEYS,
|
|
2758
|
+
PluginCardContribution: () => PluginCardContribution,
|
|
2757
2759
|
PluginContributionKind: () => PluginContributionKind,
|
|
2758
2760
|
PluginEventDefinitionContribution: () => PluginEventDefinitionContribution,
|
|
2759
2761
|
PluginNotificationRuleContribution: () => PluginNotificationRuleContribution,
|
|
@@ -3636,6 +3638,14 @@ function createContributionsSchemas(canonical) {
|
|
|
3636
3638
|
localId: LocalContributionId2,
|
|
3637
3639
|
resultKinds: z12.array(NonEmptyString3).min(1)
|
|
3638
3640
|
});
|
|
3641
|
+
const PluginCardContribution2 = z12.strictObject({
|
|
3642
|
+
localId: LocalContributionId2,
|
|
3643
|
+
description: NonEmptyString3,
|
|
3644
|
+
inputs: JsonSchema,
|
|
3645
|
+
readEndpoint: LocalContributionId2,
|
|
3646
|
+
submitEndpoint: LocalContributionId2,
|
|
3647
|
+
authService: AuthServiceReference2.optional()
|
|
3648
|
+
});
|
|
3639
3649
|
const EndpointContribution2 = z12.strictObject({
|
|
3640
3650
|
localId: LocalContributionId2,
|
|
3641
3651
|
displayName: OptionalDisplayName,
|
|
@@ -4138,6 +4148,7 @@ function createContributionsSchemas(canonical) {
|
|
|
4138
4148
|
"entityResolver",
|
|
4139
4149
|
"agentRenderer",
|
|
4140
4150
|
"endpoint",
|
|
4151
|
+
"pluginCard",
|
|
4141
4152
|
"command",
|
|
4142
4153
|
"eventDefinition",
|
|
4143
4154
|
"eventSubscription",
|
|
@@ -4188,6 +4199,7 @@ function createContributionsSchemas(canonical) {
|
|
|
4188
4199
|
EntityResolverContribution: EntityResolverContribution2,
|
|
4189
4200
|
AgentRenderContribution: AgentRenderContribution2,
|
|
4190
4201
|
EndpointContribution: EndpointContribution2,
|
|
4202
|
+
PluginCardContribution: PluginCardContribution2,
|
|
4191
4203
|
WorkflowContribution: WorkflowContribution2,
|
|
4192
4204
|
McpServerUrl: McpServerUrl2,
|
|
4193
4205
|
McpServerAuthMode: McpServerAuthMode2,
|
|
@@ -4227,7 +4239,7 @@ function createContributionsSchemas(canonical) {
|
|
|
4227
4239
|
PluginContributionKind: PluginContributionKind2
|
|
4228
4240
|
};
|
|
4229
4241
|
}
|
|
4230
|
-
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, PluginProductEventContribution, UiEventSubscriptionContribution, DeviceDelegationContribution, SessionReaderContribution, UiCommandContribution, UiSlotContribution, SettingsPanelContribution, ResultRendererContribution, ReferenceOpenBehavior, ReferencePresentationVariant, ReferencePresentationVariants, ReferencePresentationUriPattern, ReferencePresentationUrlClaim, ReferencePresentationTooltip, ReferencePresentationAddress, ReferencePresentationWords, ReferencePresentationContribution, RichViewContribution, KayUiAppHostCapability, UiAppCapabilities, UiRailEntryContribution, UiToastPreviewContribution, UiPageContribution, UiAppContribution, ThemeContribution, CommandHandler, CommandContribution, PluginContributionKind } = createContributionsSchemas(false);
|
|
4242
|
+
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, PluginCardContribution, WorkflowContribution, McpServerUrl, McpServerAuthMode, McpServerContribution, McpServerContributions, AppEventSubscription, ContextContributorContribution, PluginEventDefinitionContribution, PluginNotificationRuleContribution, PluginProductEventContribution, UiEventSubscriptionContribution, DeviceDelegationContribution, SessionReaderContribution, UiCommandContribution, UiSlotContribution, SettingsPanelContribution, ResultRendererContribution, ReferenceOpenBehavior, ReferencePresentationVariant, ReferencePresentationVariants, ReferencePresentationUriPattern, ReferencePresentationUrlClaim, ReferencePresentationTooltip, ReferencePresentationAddress, ReferencePresentationWords, ReferencePresentationContribution, RichViewContribution, KayUiAppHostCapability, UiAppCapabilities, UiRailEntryContribution, UiToastPreviewContribution, UiPageContribution, UiAppContribution, ThemeContribution, CommandHandler, CommandContribution, PluginContributionKind } = createContributionsSchemas(false);
|
|
4231
4243
|
var canonicalContributionSchemas = createContributionsSchemas(true);
|
|
4232
4244
|
|
|
4233
4245
|
// packages/plugin-protocol/dist/icon-shape.js
|
|
@@ -4301,7 +4313,7 @@ var KAY_UI_NATIVE_EVENT_SUBSCRIPTIONS = [
|
|
|
4301
4313
|
var KAY_UI_NATIVE_EVENT_ALLOWLIST = new Set(KAY_UI_NATIVE_EVENT_SUBSCRIPTIONS);
|
|
4302
4314
|
var RETIRED_COMPATIBILITY_KEYS = ["policy"];
|
|
4303
4315
|
function createManifestSchemas(canonical) {
|
|
4304
|
-
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, PluginProductEventContribution: PluginProductEventContribution2, 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, UiToastPreviewContribution: UiToastPreviewContribution2, UiPageContribution: UiPageContribution2, UiEventSubscriptionContribution: UiEventSubscriptionContribution2, UiSlotContribution: UiSlotContribution2, UriModuleContribution: UriModuleContribution2, WhiteboardTypeContribution: WhiteboardTypeContribution2 } = canonical ? canonicalContributionSchemas : contributions_exports;
|
|
4316
|
+
const { AgentRenderContribution: AgentRenderContribution2, ApprovalTypeContribution: ApprovalTypeContribution2, WorkflowContribution: WorkflowContribution2, PluginCardContribution: PluginCardContribution2, 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, PluginProductEventContribution: PluginProductEventContribution2, 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, UiToastPreviewContribution: UiToastPreviewContribution2, UiPageContribution: UiPageContribution2, UiEventSubscriptionContribution: UiEventSubscriptionContribution2, UiSlotContribution: UiSlotContribution2, UriModuleContribution: UriModuleContribution2, WhiteboardTypeContribution: WhiteboardTypeContribution2 } = canonical ? canonicalContributionSchemas : contributions_exports;
|
|
4305
4317
|
const { HttpsUrl: HttpsUrl2, LocalContributionId: LocalContributionId2, NonEmptyString: NonEmptyString3, PackageAssetPath: PackageAssetPath2, PluginId: PluginId2, PluginNamespace: PluginNamespace2, RegistrableDomain: RegistrableDomain2, SignedInStatusCode: SignedInStatusCode2, TargetEntrypoint: TargetEntrypoint2 } = canonical ? canonicalCommonSchemas : common_exports;
|
|
4306
4318
|
const { PluginPermissionManifest: PluginPermissionManifest2 } = canonical ? canonicalPermissionSchemas : permissions_exports;
|
|
4307
4319
|
const KayAgentTargetManifest2 = z13.strictObject({
|
|
@@ -4390,6 +4402,7 @@ function createManifestSchemas(canonical) {
|
|
|
4390
4402
|
// namespace with them (enforced by the manifest-level refinement below).
|
|
4391
4403
|
tools: z13.array(ToolContribution2).optional(),
|
|
4392
4404
|
endpoints: z13.array(EndpointContribution2).optional(),
|
|
4405
|
+
cards: z13.array(PluginCardContribution2).optional(),
|
|
4393
4406
|
uriModules: z13.array(AppUriModuleContribution2).optional(),
|
|
4394
4407
|
dataSources: z13.array(AppDataSourceContribution2).optional(),
|
|
4395
4408
|
whiteboardTypes: z13.array(WhiteboardTypeContribution2).optional(),
|
|
@@ -5120,6 +5133,39 @@ function createManifestSchemas(canonical) {
|
|
|
5120
5133
|
message: `signal event ${definition.localId} must use a URI scheme one of this plugin's own URI modules serves; '${definition.uriScheme}' is not among them`
|
|
5121
5134
|
});
|
|
5122
5135
|
}
|
|
5136
|
+
for (const [index, card] of (manifest.targets?.kay?.app?.contributes?.cards ?? []).entries()) {
|
|
5137
|
+
const path = ["targets", "kay", "app", "contributes", "cards", index];
|
|
5138
|
+
if (manifest.targets?.kay?.app?.entrypoint === void 0) {
|
|
5139
|
+
ctx.addIssue({
|
|
5140
|
+
code: "custom",
|
|
5141
|
+
path,
|
|
5142
|
+
message: `plugin card ${card.localId} needs a kay.app entrypoint to implement it`
|
|
5143
|
+
});
|
|
5144
|
+
}
|
|
5145
|
+
for (const field of ["readEndpoint", "submitEndpoint"]) {
|
|
5146
|
+
if (!endpointIds.has(card[field])) {
|
|
5147
|
+
ctx.addIssue({
|
|
5148
|
+
code: "custom",
|
|
5149
|
+
path: [...path, field],
|
|
5150
|
+
message: `plugin card ${card.localId} references unknown endpoint ${card[field]}`
|
|
5151
|
+
});
|
|
5152
|
+
}
|
|
5153
|
+
}
|
|
5154
|
+
if (card.readEndpoint === card.submitEndpoint) {
|
|
5155
|
+
ctx.addIssue({
|
|
5156
|
+
code: "custom",
|
|
5157
|
+
path: [...path, "submitEndpoint"],
|
|
5158
|
+
message: `plugin card ${card.localId} needs distinct read and submit endpoints`
|
|
5159
|
+
});
|
|
5160
|
+
}
|
|
5161
|
+
if (card.authService !== void 0 && !isQualifiedAuthServiceRef(card.authService) && !authServices.has(card.authService)) {
|
|
5162
|
+
ctx.addIssue({
|
|
5163
|
+
code: "custom",
|
|
5164
|
+
path: [...path, "authService"],
|
|
5165
|
+
message: `plugin card ${card.localId} references unknown auth service ${card.authService}`
|
|
5166
|
+
});
|
|
5167
|
+
}
|
|
5168
|
+
}
|
|
5123
5169
|
reportDuplicateLocalIds(ctx, ["targets", "kay", "app", "contributes", "workflows"], manifest.targets?.kay?.app?.contributes?.workflows, "workflow");
|
|
5124
5170
|
for (const [index, workflow] of (manifest.targets?.kay?.app?.contributes?.workflows ?? []).entries()) {
|
|
5125
5171
|
const path = [
|
|
@@ -5744,6 +5790,7 @@ function collectKayAppContributionIds(manifest) {
|
|
|
5744
5790
|
const contributes = manifest.targets?.kay?.app?.contributes;
|
|
5745
5791
|
const output = [];
|
|
5746
5792
|
pushContributionIds(output, ["targets", "kay", "app", "contributes", "approvalTypes"], contributes?.approvalTypes);
|
|
5793
|
+
pushContributionIds(output, ["targets", "kay", "app", "contributes", "cards"], contributes?.cards);
|
|
5747
5794
|
pushContributionIds(output, ["targets", "kay", "app", "contributes", "workflows"], contributes?.workflows);
|
|
5748
5795
|
pushContributionIds(output, ["targets", "kay", "app", "contributes", "tools"], contributes?.tools);
|
|
5749
5796
|
pushContributionIds(output, ["targets", "kay", "app", "contributes", "endpoints"], contributes?.endpoints);
|
|
@@ -5905,6 +5952,22 @@ function createResolvedContractSchemas(canonical) {
|
|
|
5905
5952
|
/** The auth service that module signs in through, whose accounts a card may send from. */
|
|
5906
5953
|
authService: GlobalContributionId2.optional()
|
|
5907
5954
|
});
|
|
5955
|
+
const ResolvedPluginCard2 = z14.strictObject({
|
|
5956
|
+
localId: LocalContributionId2,
|
|
5957
|
+
globalId: GlobalContributionId2,
|
|
5958
|
+
pluginId: PluginId2,
|
|
5959
|
+
description: NonEmptyString3,
|
|
5960
|
+
inputs: JsonSchema,
|
|
5961
|
+
readEndpoint: z14.strictObject({
|
|
5962
|
+
localId: LocalContributionId2,
|
|
5963
|
+
globalId: GlobalContributionId2
|
|
5964
|
+
}),
|
|
5965
|
+
submitEndpoint: z14.strictObject({
|
|
5966
|
+
localId: LocalContributionId2,
|
|
5967
|
+
globalId: GlobalContributionId2
|
|
5968
|
+
}),
|
|
5969
|
+
authService: GlobalContributionId2.optional()
|
|
5970
|
+
});
|
|
5908
5971
|
const ResolvedKayAppWorkflow2 = z14.strictObject({
|
|
5909
5972
|
localId: LocalContributionId2,
|
|
5910
5973
|
globalId: GlobalContributionId2,
|
|
@@ -6143,7 +6206,7 @@ function createResolvedContractSchemas(canonical) {
|
|
|
6143
6206
|
contributions: z14.array(ResolvedPluginContributionId2),
|
|
6144
6207
|
// The deduplicated set of qualified (dotted) external auth-service ids this
|
|
6145
6208
|
// plugin references, from agent uriModule, tool and cliBinding
|
|
6146
|
-
// `authService` refs, and auth-grant `service` refs. Always present - a plugin
|
|
6209
|
+
// `authService` refs, card sign-in refs, and auth-grant `service` refs. Always present - a plugin
|
|
6147
6210
|
// that only references its own local services carries an empty array. This
|
|
6148
6211
|
// is a recorded dependency, not a resolution: there is no runtime plugin
|
|
6149
6212
|
// loader in v1, so nothing here verifies the reference resolves within a
|
|
@@ -6168,6 +6231,7 @@ function createResolvedContractSchemas(canonical) {
|
|
|
6168
6231
|
kayAppTools: z14.array(ResolvedKayAppTool2).optional(),
|
|
6169
6232
|
kayAppApprovalTypes: z14.array(ResolvedKayAppApprovalType2).optional(),
|
|
6170
6233
|
kayAppWorkflows: z14.array(ResolvedKayAppWorkflow2).optional(),
|
|
6234
|
+
kayAppCards: z14.array(ResolvedPluginCard2).optional(),
|
|
6171
6235
|
kayAppDataSources: z14.array(ResolvedKayAppDataSource2).optional(),
|
|
6172
6236
|
kayAppWhiteboardTypes: z14.array(ResolvedKayAppWhiteboardType2).optional(),
|
|
6173
6237
|
kayAppMcpServers: z14.array(ResolvedKayAppMcpServer2).optional(),
|
|
@@ -6181,6 +6245,7 @@ function createResolvedContractSchemas(canonical) {
|
|
|
6181
6245
|
ResolvedKayAppTool: ResolvedKayAppTool2,
|
|
6182
6246
|
ResolvedKayAppApprovalType: ResolvedKayAppApprovalType2,
|
|
6183
6247
|
ResolvedKayAppWorkflow: ResolvedKayAppWorkflow2,
|
|
6248
|
+
ResolvedPluginCard: ResolvedPluginCard2,
|
|
6184
6249
|
ResolvedKayAppDataSource: ResolvedKayAppDataSource2,
|
|
6185
6250
|
ResolvedKayAppWhiteboardType: ResolvedKayAppWhiteboardType2,
|
|
6186
6251
|
ResolvedKayAppMcpServer: ResolvedKayAppMcpServer2,
|
|
@@ -6199,7 +6264,7 @@ function createResolvedContractSchemas(canonical) {
|
|
|
6199
6264
|
ResolvedPluginContractV1: ResolvedPluginContractV12
|
|
6200
6265
|
};
|
|
6201
6266
|
}
|
|
6202
|
-
var { ResolvedKayAppApprovalType, ResolvedKayAppWorkflow, ResolvedPluginContributionId, ResolvedKayAgentTool, ResolvedKayAppTool, ResolvedKayAppDataSource, ResolvedKayAppWhiteboardType, ResolvedKayAppMcpServer, ResolvedKayAgentUriModule, ResolvedKayAgentArtifactUriModule, ResolvedKayAgentEntityResolver, ResolvedKayAgentGitHostClaim, ResolvedKayAgentConverter, ResolvedReferencePresentation, ResolvedPluginProvisioningRequirement, ResolvedPluginAuthScheme, ResolvedPluginWebSession, ResolvedPluginAuthService, ResolvedKayUiAppEndpointCapability, ResolvedKayUiApp, ResolvedPluginContractV1 } = createResolvedContractSchemas(false);
|
|
6267
|
+
var { ResolvedKayAppApprovalType, ResolvedKayAppWorkflow, ResolvedPluginCard, ResolvedPluginContributionId, ResolvedKayAgentTool, ResolvedKayAppTool, ResolvedKayAppDataSource, ResolvedKayAppWhiteboardType, ResolvedKayAppMcpServer, ResolvedKayAgentUriModule, ResolvedKayAgentArtifactUriModule, ResolvedKayAgentEntityResolver, ResolvedKayAgentGitHostClaim, ResolvedKayAgentConverter, ResolvedReferencePresentation, ResolvedPluginProvisioningRequirement, ResolvedPluginAuthScheme, ResolvedPluginWebSession, ResolvedPluginAuthService, ResolvedKayUiAppEndpointCapability, ResolvedKayUiApp, ResolvedPluginContractV1 } = createResolvedContractSchemas(false);
|
|
6203
6268
|
var canonicalResolvedContractSchemas = createResolvedContractSchemas(true);
|
|
6204
6269
|
function narrowestAccountSelectors() {
|
|
6205
6270
|
return [{ kind: "active" }];
|
|
@@ -6235,6 +6300,7 @@ function collectContributionSources(manifest) {
|
|
|
6235
6300
|
const app = manifest.targets?.kay?.app?.contributes;
|
|
6236
6301
|
pushAll(output, "kay.app", "tool", app?.tools);
|
|
6237
6302
|
pushAll(output, "kay.app", "endpoint", app?.endpoints);
|
|
6303
|
+
pushAll(output, "kay.app", "pluginCard", app?.cards);
|
|
6238
6304
|
pushAll(output, "kay.app", "uriModule", app?.uriModules);
|
|
6239
6305
|
pushAll(output, "kay.app", "appDataSource", app?.dataSources);
|
|
6240
6306
|
pushAll(output, "kay.app", "whiteboardType", app?.whiteboardTypes);
|
|
@@ -6339,6 +6405,9 @@ function collectConsumedAuthServiceIds(manifest) {
|
|
|
6339
6405
|
for (const binding of manifest.targets?.kay?.agent?.contributes?.cliBindings ?? []) {
|
|
6340
6406
|
add(binding.authService);
|
|
6341
6407
|
}
|
|
6408
|
+
for (const card of manifest.targets?.kay?.app?.contributes?.cards ?? []) {
|
|
6409
|
+
add(card.authService);
|
|
6410
|
+
}
|
|
6342
6411
|
for (const target of KAY_PLUGIN_TARGET_NAMES) {
|
|
6343
6412
|
for (const grant of manifest.permissions?.byTarget[target]?.auth ?? []) {
|
|
6344
6413
|
add(grant.service);
|
|
@@ -6521,6 +6590,24 @@ function resolveKayPluginContractV1(manifest) {
|
|
|
6521
6590
|
globalId: resolveGlobalContributionId(namespace, tool.localId),
|
|
6522
6591
|
toolName: tool.toolName
|
|
6523
6592
|
}));
|
|
6593
|
+
const kayAppCards = manifest.targets?.kay?.app?.contributes?.cards?.map((card) => ({
|
|
6594
|
+
localId: card.localId,
|
|
6595
|
+
globalId: resolveGlobalContributionId(namespace, card.localId),
|
|
6596
|
+
pluginId: manifest.id,
|
|
6597
|
+
description: card.description,
|
|
6598
|
+
inputs: card.inputs,
|
|
6599
|
+
readEndpoint: {
|
|
6600
|
+
localId: card.readEndpoint,
|
|
6601
|
+
globalId: resolveGlobalContributionId(namespace, card.readEndpoint)
|
|
6602
|
+
},
|
|
6603
|
+
submitEndpoint: {
|
|
6604
|
+
localId: card.submitEndpoint,
|
|
6605
|
+
globalId: resolveGlobalContributionId(namespace, card.submitEndpoint)
|
|
6606
|
+
},
|
|
6607
|
+
...card.authService === void 0 ? {} : {
|
|
6608
|
+
authService: isQualifiedAuthServiceRef(card.authService) ? card.authService : resolveGlobalContributionId(namespace, card.authService)
|
|
6609
|
+
}
|
|
6610
|
+
}));
|
|
6524
6611
|
const kayAppWorkflows = manifest.targets?.kay?.app?.contributes?.workflows?.map(({ auth, ...workflow }) => ({
|
|
6525
6612
|
...workflow,
|
|
6526
6613
|
globalId: resolveGlobalContributionId(namespace, workflow.localId),
|
|
@@ -6689,6 +6776,7 @@ function resolveKayPluginContractV1(manifest) {
|
|
|
6689
6776
|
...kayAgentGitHostClaims.length > 0 ? { kayAgentGitHostClaims } : {},
|
|
6690
6777
|
...kayAgentTools && kayAgentTools.length > 0 ? { kayAgentTools } : {},
|
|
6691
6778
|
...kayAppTools && kayAppTools.length > 0 ? { kayAppTools } : {},
|
|
6779
|
+
...kayAppCards && kayAppCards.length > 0 ? { kayAppCards } : {},
|
|
6692
6780
|
...kayAppApprovalTypes && kayAppApprovalTypes.length > 0 ? { kayAppApprovalTypes } : {},
|
|
6693
6781
|
...kayAppWorkflows && kayAppWorkflows.length > 0 ? { kayAppWorkflows } : {},
|
|
6694
6782
|
...kayAppDataSources && kayAppDataSources.length > 0 ? { kayAppDataSources } : {},
|
|
@@ -7616,6 +7704,7 @@ export {
|
|
|
7616
7704
|
PluginCapabilityRefusalCode,
|
|
7617
7705
|
PluginCapabilityRefusalLayer,
|
|
7618
7706
|
PluginCapabilityRefusalV1,
|
|
7707
|
+
PluginCardContribution,
|
|
7619
7708
|
PluginCompatibilityManifest,
|
|
7620
7709
|
PluginConfigManifest,
|
|
7621
7710
|
PluginConfigScope,
|
|
@@ -7684,6 +7773,7 @@ export {
|
|
|
7684
7773
|
ResolvedKayUiAppEndpointCapability,
|
|
7685
7774
|
ResolvedPluginAuthScheme,
|
|
7686
7775
|
ResolvedPluginAuthService,
|
|
7776
|
+
ResolvedPluginCard,
|
|
7687
7777
|
ResolvedPluginContractV1,
|
|
7688
7778
|
ResolvedPluginContributionId,
|
|
7689
7779
|
ResolvedPluginGrants,
|
package/package.json
CHANGED