@yaklabs-ai/plugin-protocol 0.42.1 → 0.43.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 -1
- package/dist/index.js +77 -22
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1678,6 +1678,7 @@ declare namespace authoringContributionSchemas {
|
|
|
1678
1678
|
ContextContributorContribution,
|
|
1679
1679
|
PluginEventDefinitionContribution,
|
|
1680
1680
|
PluginNotificationRuleContribution,
|
|
1681
|
+
PluginProductEventContribution,
|
|
1681
1682
|
UiEventSubscriptionContribution,
|
|
1682
1683
|
DeviceDelegationContribution,
|
|
1683
1684
|
SessionReaderContribution,
|
|
@@ -2600,6 +2601,13 @@ declare const canonicalContributionSchemas: {
|
|
|
2600
2601
|
where: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodType<authoringCommonSchemas.JsonValue, unknown, z.core.$ZodTypeInternals<authoringCommonSchemas.JsonValue, unknown>>>>>;
|
|
2601
2602
|
rule: z.ZodRecord<z.ZodString, z.ZodType<authoringCommonSchemas.JsonValue, unknown, z.core.$ZodTypeInternals<authoringCommonSchemas.JsonValue, unknown>>>;
|
|
2602
2603
|
}, z.core.$strict>;
|
|
2604
|
+
PluginProductEventContribution: z.ZodUnion<readonly [z.ZodObject<{
|
|
2605
|
+
name: z.ZodString;
|
|
2606
|
+
description: z.ZodOptional<z.ZodString>;
|
|
2607
|
+
fields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodType<authoringCommonSchemas.JsonValue, unknown, z.core.$ZodTypeInternals<authoringCommonSchemas.JsonValue, unknown>>>>>;
|
|
2608
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
2609
|
+
catalogEvent: z.ZodString;
|
|
2610
|
+
}, z.core.$strict>]>;
|
|
2603
2611
|
UiEventSubscriptionContribution: z.ZodObject<{
|
|
2604
2612
|
localId: z.ZodString;
|
|
2605
2613
|
event: z.ZodString;
|
|
@@ -3539,6 +3547,9 @@ export declare function isCredentialShapedText(value: unknown): boolean;
|
|
|
3539
3547
|
*/
|
|
3540
3548
|
export declare function isKayPluginCompatibilityRefusal(code: string): code is KayPluginCompatibilityRefusalCode;
|
|
3541
3549
|
|
|
3550
|
+
/** Whether `name` can name a declared event: the shape above, and not the journal's own family. */
|
|
3551
|
+
export declare function isPluginProductEventName(name: string): boolean;
|
|
3552
|
+
|
|
3542
3553
|
/** Whether only plugins the release carries may hold `claim` ({@link PRIVATE_PLUGIN_CAPABILITY_SLUGS}). */
|
|
3543
3554
|
export declare function isPrivateCapabilityClaim(claim: PluginCapabilityClaimV1): boolean;
|
|
3544
3555
|
|
|
@@ -4280,8 +4291,11 @@ export declare const KAY_PLUGIN_PROTOCOL_VERSION: "kay.plugin.v1";
|
|
|
4280
4291
|
*
|
|
4281
4292
|
* 0.42.1 adds current-session tool lifetimes and invocation-bound artifact reads/new outputs,
|
|
4282
4293
|
* plus described-tool execution, guidance and permission resource metadata.
|
|
4294
|
+
*
|
|
4295
|
+
* 0.43.0 adds product events (#15769). `productEvents` in a plugin's `kay.app` target declares them,
|
|
4296
|
+
* and `app.productEvents.send` sends them. Additive: a plugin that declares one declares ^0.43.0.
|
|
4283
4297
|
*/
|
|
4284
|
-
export declare const KAY_PLUGIN_SDK_VERSION: "0.
|
|
4298
|
+
export declare const KAY_PLUGIN_SDK_VERSION: "0.43.0";
|
|
4285
4299
|
|
|
4286
4300
|
export declare const KAY_PLUGIN_TARGET_NAMES: readonly ["kay.agent", "kay.app", "kay.ui"];
|
|
4287
4301
|
|
|
@@ -4920,6 +4934,13 @@ export declare const KayAppTargetManifest: z.ZodObject<{
|
|
|
4920
4934
|
where: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodType<authoringCommonSchemas.JsonValue, unknown, z.core.$ZodTypeInternals<authoringCommonSchemas.JsonValue, unknown>>>>>;
|
|
4921
4935
|
rule: z.ZodRecord<z.ZodString, z.ZodType<authoringCommonSchemas.JsonValue, unknown, z.core.$ZodTypeInternals<authoringCommonSchemas.JsonValue, unknown>>>;
|
|
4922
4936
|
}, z.core.$strict>>>;
|
|
4937
|
+
productEvents: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
4938
|
+
name: z.ZodString;
|
|
4939
|
+
description: z.ZodOptional<z.ZodString>;
|
|
4940
|
+
fields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodType<authoringCommonSchemas.JsonValue, unknown, z.core.$ZodTypeInternals<authoringCommonSchemas.JsonValue, unknown>>>>>;
|
|
4941
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
4942
|
+
catalogEvent: z.ZodString;
|
|
4943
|
+
}, z.core.$strict>]>>>;
|
|
4923
4944
|
eventSubscriptions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
4924
4945
|
localId: z.ZodString;
|
|
4925
4946
|
event: z.ZodString;
|
|
@@ -5706,6 +5727,13 @@ export declare const KayPluginManifestV1: z.ZodObject<{
|
|
|
5706
5727
|
where: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodType<authoringCommonSchemas.JsonValue, unknown, z.core.$ZodTypeInternals<authoringCommonSchemas.JsonValue, unknown>>>>>;
|
|
5707
5728
|
rule: z.ZodRecord<z.ZodString, z.ZodType<authoringCommonSchemas.JsonValue, unknown, z.core.$ZodTypeInternals<authoringCommonSchemas.JsonValue, unknown>>>;
|
|
5708
5729
|
}, z.core.$strict>>>;
|
|
5730
|
+
productEvents: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
5731
|
+
name: z.ZodString;
|
|
5732
|
+
description: z.ZodOptional<z.ZodString>;
|
|
5733
|
+
fields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodType<authoringCommonSchemas.JsonValue, unknown, z.core.$ZodTypeInternals<authoringCommonSchemas.JsonValue, unknown>>>>>;
|
|
5734
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
5735
|
+
catalogEvent: z.ZodString;
|
|
5736
|
+
}, z.core.$strict>]>>>;
|
|
5709
5737
|
eventSubscriptions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
5710
5738
|
localId: z.ZodString;
|
|
5711
5739
|
event: z.ZodString;
|
|
@@ -7374,6 +7402,12 @@ export declare const PLUGIN_ICON_SHAPE_ATTRIBUTE = "data-icon-shape";
|
|
|
7374
7402
|
/** Rule-body keys the host stamps, so a manifest's `rule` may not carry them. */
|
|
7375
7403
|
export declare const PLUGIN_NOTIFICATION_RULE_HOST_KEYS: readonly ["id", "match", "sender"];
|
|
7376
7404
|
|
|
7405
|
+
/**
|
|
7406
|
+
* Dot-separated lowercase words: `next_steps.decided`, `message_draft_approved`. A leading `$` is
|
|
7407
|
+
* PostHog's own namespace and cannot match. Bounded like the wire's event name.
|
|
7408
|
+
*/
|
|
7409
|
+
export declare const PLUGIN_PRODUCT_EVENT_NAME_PATTERN: RegExp;
|
|
7410
|
+
|
|
7377
7411
|
/** The `kind` values of `PluginSignal` v1. `status` is system state that clears itself. */
|
|
7378
7412
|
export declare const PLUGIN_SIGNAL_KINDS: readonly ["message", "request", "mention", "invite", "status"];
|
|
7379
7413
|
|
|
@@ -10517,6 +10551,60 @@ export declare const PluginPermissionManifest: z.ZodObject<{
|
|
|
10517
10551
|
|
|
10518
10552
|
export declare type PluginPermissionManifest = z.infer<typeof PluginPermissionManifest>;
|
|
10519
10553
|
|
|
10554
|
+
export declare const PluginProductEventContribution: z.ZodUnion<readonly [z.ZodObject<{
|
|
10555
|
+
name: z.ZodString;
|
|
10556
|
+
description: z.ZodOptional<z.ZodString>;
|
|
10557
|
+
fields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodType<authoringCommonSchemas.JsonValue, unknown, z.core.$ZodTypeInternals<authoringCommonSchemas.JsonValue, unknown>>>>>;
|
|
10558
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
10559
|
+
catalogEvent: z.ZodString;
|
|
10560
|
+
}, z.core.$strict>]>;
|
|
10561
|
+
|
|
10562
|
+
export declare type PluginProductEventContribution = z.infer<typeof PluginProductEventContribution>;
|
|
10563
|
+
|
|
10564
|
+
/**
|
|
10565
|
+
* One declared field. `exportable` fields use the product catalog's bounded kinds and may leave the
|
|
10566
|
+
* device: an enum or a number holds nothing else, and an id-like kind is one short word with no
|
|
10567
|
+
* spaces, so it cannot hold a sentence but can hold a name or a path if an author puts one there. A
|
|
10568
|
+
* `local` field is stored in the journal and never exported.
|
|
10569
|
+
*/
|
|
10570
|
+
export declare const PluginProductEventField: z.ZodUnion<readonly [z.ZodObject<{
|
|
10571
|
+
class: z.ZodLiteral<"local">;
|
|
10572
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
10573
|
+
type: z.ZodLiteral<"enum">;
|
|
10574
|
+
values: z.ZodArray<z.ZodString>;
|
|
10575
|
+
class: z.ZodLiteral<"exportable">;
|
|
10576
|
+
optional: z.ZodOptional<z.ZodBoolean>;
|
|
10577
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
10578
|
+
type: z.ZodLiteral<"number">;
|
|
10579
|
+
min: z.ZodNumber;
|
|
10580
|
+
max: z.ZodNumber;
|
|
10581
|
+
integer: z.ZodOptional<z.ZodBoolean>;
|
|
10582
|
+
class: z.ZodLiteral<"exportable">;
|
|
10583
|
+
optional: z.ZodOptional<z.ZodBoolean>;
|
|
10584
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
10585
|
+
type: z.ZodEnum<{
|
|
10586
|
+
boolean: "boolean";
|
|
10587
|
+
id: "id";
|
|
10588
|
+
identifier: "identifier";
|
|
10589
|
+
model_provider: "model_provider";
|
|
10590
|
+
model_reference: "model_reference";
|
|
10591
|
+
}>;
|
|
10592
|
+
class: z.ZodLiteral<"exportable">;
|
|
10593
|
+
optional: z.ZodOptional<z.ZodBoolean>;
|
|
10594
|
+
}, z.core.$strict>]>;
|
|
10595
|
+
|
|
10596
|
+
export declare type PluginProductEventField = z.infer<typeof PluginProductEventField>;
|
|
10597
|
+
|
|
10598
|
+
/** What a send of a product event carries, from a plugin's code or its page. */
|
|
10599
|
+
export declare interface PluginProductEventSend {
|
|
10600
|
+
/** Declared fields of either class. A field the declaration does not name is not sent. */
|
|
10601
|
+
readonly properties?: Readonly<Record<string, string | number | boolean>>;
|
|
10602
|
+
/** The session it is about, when there is one. Exported, so it must be a session id. */
|
|
10603
|
+
readonly sessionId?: string;
|
|
10604
|
+
/** The address it is about. Stays on the device. */
|
|
10605
|
+
readonly subjectUri?: string;
|
|
10606
|
+
}
|
|
10607
|
+
|
|
10520
10608
|
export declare const PluginProvisioningProbe: z.ZodObject<{
|
|
10521
10609
|
url: z.ZodURL;
|
|
10522
10610
|
method: z.ZodOptional<z.ZodEnum<{
|
package/dist/index.js
CHANGED
|
@@ -254,8 +254,11 @@ 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.
|
|
258
|
-
var KAY_PLUGIN_COMPATIBLE_SDK_VERSIONS = [
|
|
257
|
+
var KAY_PLUGIN_SDK_VERSION = "0.43.0";
|
|
258
|
+
var KAY_PLUGIN_COMPATIBLE_SDK_VERSIONS = [
|
|
259
|
+
"0.42.0",
|
|
260
|
+
"0.42.1"
|
|
261
|
+
];
|
|
259
262
|
var KAY_PLUGIN_TARGET_NAMES = [
|
|
260
263
|
"kay.agent",
|
|
261
264
|
"kay.app",
|
|
@@ -2753,6 +2756,7 @@ __export(contributions_exports, {
|
|
|
2753
2756
|
PluginContributionKind: () => PluginContributionKind,
|
|
2754
2757
|
PluginEventDefinitionContribution: () => PluginEventDefinitionContribution,
|
|
2755
2758
|
PluginNotificationRuleContribution: () => PluginNotificationRuleContribution,
|
|
2759
|
+
PluginProductEventContribution: () => PluginProductEventContribution,
|
|
2756
2760
|
PluginSkillSourceDeclaration: () => PluginSkillSourceDeclaration,
|
|
2757
2761
|
ReferenceOpenBehavior: () => ReferenceOpenBehavior,
|
|
2758
2762
|
ReferencePresentationAddress: () => ReferencePresentationAddress,
|
|
@@ -3742,6 +3746,14 @@ function createContributionsSchemas(canonical) {
|
|
|
3742
3746
|
where: z12.array(JsonObject).optional(),
|
|
3743
3747
|
rule: JsonObject
|
|
3744
3748
|
});
|
|
3749
|
+
const PluginProductEventContribution2 = z12.union([
|
|
3750
|
+
z12.strictObject({
|
|
3751
|
+
name: NonEmptyString3,
|
|
3752
|
+
description: NonEmptyString3.optional(),
|
|
3753
|
+
fields: z12.record(z12.string(), JsonObject).optional()
|
|
3754
|
+
}),
|
|
3755
|
+
z12.strictObject({ catalogEvent: NonEmptyString3 })
|
|
3756
|
+
]);
|
|
3745
3757
|
const UiEventSubscriptionContribution2 = z12.strictObject({
|
|
3746
3758
|
localId: LocalContributionId2,
|
|
3747
3759
|
event: NonEmptyString3
|
|
@@ -4176,6 +4188,7 @@ function createContributionsSchemas(canonical) {
|
|
|
4176
4188
|
ContextContributorContribution: ContextContributorContribution2,
|
|
4177
4189
|
PluginEventDefinitionContribution: PluginEventDefinitionContribution2,
|
|
4178
4190
|
PluginNotificationRuleContribution: PluginNotificationRuleContribution2,
|
|
4191
|
+
PluginProductEventContribution: PluginProductEventContribution2,
|
|
4179
4192
|
UiEventSubscriptionContribution: UiEventSubscriptionContribution2,
|
|
4180
4193
|
DeviceDelegationContribution: DeviceDelegationContribution2,
|
|
4181
4194
|
SessionReaderContribution: SessionReaderContribution2,
|
|
@@ -4205,7 +4218,7 @@ function createContributionsSchemas(canonical) {
|
|
|
4205
4218
|
PluginContributionKind: PluginContributionKind2
|
|
4206
4219
|
};
|
|
4207
4220
|
}
|
|
4208
|
-
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, ReferencePresentationWords, ReferencePresentationContribution, RichViewContribution, KayUiAppHostCapability, UiAppCapabilities, UiRailEntryContribution, UiToastPreviewContribution, UiPageContribution, UiAppContribution, ThemeContribution, CommandHandler, CommandContribution, PluginContributionKind } = createContributionsSchemas(false);
|
|
4221
|
+
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);
|
|
4209
4222
|
var canonicalContributionSchemas = createContributionsSchemas(true);
|
|
4210
4223
|
|
|
4211
4224
|
// packages/plugin-protocol/dist/icon-shape.js
|
|
@@ -4279,7 +4292,7 @@ var KAY_UI_NATIVE_EVENT_SUBSCRIPTIONS = [
|
|
|
4279
4292
|
var KAY_UI_NATIVE_EVENT_ALLOWLIST = new Set(KAY_UI_NATIVE_EVENT_SUBSCRIPTIONS);
|
|
4280
4293
|
var RETIRED_COMPATIBILITY_KEYS = ["policy"];
|
|
4281
4294
|
function createManifestSchemas(canonical) {
|
|
4282
|
-
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, UiToastPreviewContribution: UiToastPreviewContribution2, UiPageContribution: UiPageContribution2, UiEventSubscriptionContribution: UiEventSubscriptionContribution2, UiSlotContribution: UiSlotContribution2, UriModuleContribution: UriModuleContribution2, WhiteboardTypeContribution: WhiteboardTypeContribution2 } = canonical ? canonicalContributionSchemas : contributions_exports;
|
|
4295
|
+
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;
|
|
4283
4296
|
const { HttpsUrl: HttpsUrl2, LocalContributionId: LocalContributionId2, NonEmptyString: NonEmptyString3, PackageAssetPath: PackageAssetPath2, PluginId: PluginId2, PluginNamespace: PluginNamespace2, RegistrableDomain: RegistrableDomain2, SignedInStatusCode: SignedInStatusCode2, TargetEntrypoint: TargetEntrypoint2 } = canonical ? canonicalCommonSchemas : common_exports;
|
|
4284
4297
|
const { PluginPermissionManifest: PluginPermissionManifest2 } = canonical ? canonicalPermissionSchemas : permissions_exports;
|
|
4285
4298
|
const KayAgentTargetManifest2 = z13.strictObject({
|
|
@@ -4377,6 +4390,7 @@ function createManifestSchemas(canonical) {
|
|
|
4377
4390
|
// Default notification rules over this plugin's own `eventDefinitions`; seeded by the host
|
|
4378
4391
|
// (see `PluginNotificationRuleContribution`).
|
|
4379
4392
|
notificationRules: z13.array(PluginNotificationRuleContribution2).optional(),
|
|
4393
|
+
productEvents: z13.array(PluginProductEventContribution2).optional(),
|
|
4380
4394
|
eventSubscriptions: z13.array(AppEventSubscription2).optional(),
|
|
4381
4395
|
deviceDelegations: z13.array(DeviceDelegationContribution2).optional(),
|
|
4382
4396
|
sessionReaders: z13.array(SessionReaderContribution2).optional(),
|
|
@@ -7304,10 +7318,47 @@ var WhiteboardTypeInfo = z19.strictObject({
|
|
|
7304
7318
|
}).optional()
|
|
7305
7319
|
});
|
|
7306
7320
|
|
|
7307
|
-
// packages/plugin-protocol/dist/
|
|
7321
|
+
// packages/plugin-protocol/dist/product-events.js
|
|
7308
7322
|
import { z as z20 } from "zod";
|
|
7323
|
+
var exportable = {
|
|
7324
|
+
class: z20.literal("exportable"),
|
|
7325
|
+
optional: z20.boolean().optional()
|
|
7326
|
+
};
|
|
7327
|
+
var PluginProductEventField = z20.union([
|
|
7328
|
+
z20.strictObject({ class: z20.literal("local") }),
|
|
7329
|
+
z20.strictObject({
|
|
7330
|
+
...exportable,
|
|
7331
|
+
type: z20.literal("enum"),
|
|
7332
|
+
values: z20.array(z20.string())
|
|
7333
|
+
}),
|
|
7334
|
+
z20.strictObject({
|
|
7335
|
+
...exportable,
|
|
7336
|
+
type: z20.literal("number"),
|
|
7337
|
+
min: z20.number(),
|
|
7338
|
+
max: z20.number(),
|
|
7339
|
+
integer: z20.boolean().optional()
|
|
7340
|
+
}),
|
|
7341
|
+
z20.strictObject({
|
|
7342
|
+
...exportable,
|
|
7343
|
+
type: z20.enum([
|
|
7344
|
+
"boolean",
|
|
7345
|
+
"id",
|
|
7346
|
+
"identifier",
|
|
7347
|
+
"model_provider",
|
|
7348
|
+
"model_reference"
|
|
7349
|
+
])
|
|
7350
|
+
})
|
|
7351
|
+
]);
|
|
7352
|
+
var PLUGIN_PRODUCT_EVENT_NAME_PATTERN = /^[a-z][a-z0-9_]*(?:\.[a-z][a-z0-9_]*)*$/;
|
|
7353
|
+
var PLUGIN_PRODUCT_EVENT_NAME_MAX = 120;
|
|
7354
|
+
function isPluginProductEventName(name) {
|
|
7355
|
+
return name.length <= PLUGIN_PRODUCT_EVENT_NAME_MAX && PLUGIN_PRODUCT_EVENT_NAME_PATTERN.test(name) && !name.startsWith("runtime.usage.");
|
|
7356
|
+
}
|
|
7357
|
+
|
|
7358
|
+
// packages/plugin-protocol/dist/artifact-outputs.js
|
|
7359
|
+
import { z as z21 } from "zod";
|
|
7309
7360
|
var ARTIFACT_OUTPUT_PAGE_MAX = 200;
|
|
7310
|
-
var Segment =
|
|
7361
|
+
var Segment = z21.string().min(1).max(1024).refine((value) => !/[^A-Za-z0-9._-]/.test(value)).refine((value) => value !== "." && value !== "..");
|
|
7311
7362
|
function parseArtifactOutputUri(uri) {
|
|
7312
7363
|
const match = /^output:\/\/([^/]+)\/([^/]+)$/.exec(uri);
|
|
7313
7364
|
if (match === null || !Segment.safeParse(match[1]).success || !Segment.safeParse(match[2]).success)
|
|
@@ -7317,12 +7368,12 @@ function parseArtifactOutputUri(uri) {
|
|
|
7317
7368
|
function isCanonicalArtifactOutputUri(uri) {
|
|
7318
7369
|
return parseArtifactOutputUri(uri) !== void 0;
|
|
7319
7370
|
}
|
|
7320
|
-
var ArtifactOutputUri =
|
|
7321
|
-
var ArtifactOutputChange =
|
|
7322
|
-
|
|
7323
|
-
uris:
|
|
7371
|
+
var ArtifactOutputUri = z21.string().refine(isCanonicalArtifactOutputUri, "Expected a canonical output://session/name URI");
|
|
7372
|
+
var ArtifactOutputChange = z21.union([
|
|
7373
|
+
z21.strictObject({
|
|
7374
|
+
uris: z21.array(ArtifactOutputUri).min(1).max(ARTIFACT_OUTPUT_PAGE_MAX)
|
|
7324
7375
|
}),
|
|
7325
|
-
|
|
7376
|
+
z21.strictObject({ sessionId: Segment })
|
|
7326
7377
|
]);
|
|
7327
7378
|
|
|
7328
7379
|
// packages/plugin-protocol/dist/credential-text.js
|
|
@@ -7365,25 +7416,25 @@ function isCredentialShapedText(value) {
|
|
|
7365
7416
|
}
|
|
7366
7417
|
|
|
7367
7418
|
// packages/plugin-protocol/dist/ui-module-bundle.js
|
|
7368
|
-
import { z as
|
|
7419
|
+
import { z as z22 } from "zod";
|
|
7369
7420
|
var KAY_UI_MODULE_BUNDLE_PROTOCOL = "kay.ui.module-bundle.v1";
|
|
7370
7421
|
var KAY_UI_MODULE_FILE_MAX_BYTES = 8 * 1024 * 1024;
|
|
7371
7422
|
var KAY_UI_MODULE_BUNDLE_MAX_BYTES = 32 * 1024 * 1024;
|
|
7372
7423
|
var KAY_UI_MODULE_BUNDLE_MAX_FILES = 256;
|
|
7373
|
-
var OutputPath =
|
|
7424
|
+
var OutputPath = z22.string().min(1).max(1024).refine((value) => {
|
|
7374
7425
|
const parsed = KayUiBundleIndexV1.shape.entryPath.safeParse(value);
|
|
7375
7426
|
return parsed.success && parsed.data === value && value.split("/").every((part) => part !== "" && part !== ".") && // oxlint-disable-next-line eslint/no-control-regex -- Untrusted artifact paths must reject literal control characters.
|
|
7376
7427
|
!/[\u0000-\u001f?#:%]/.test(value);
|
|
7377
7428
|
}, { message: "bundle path must contain only unambiguous relative segments" });
|
|
7378
|
-
var Sha256 =
|
|
7379
|
-
var KayUiModuleBundleIndexV1 =
|
|
7380
|
-
protocol:
|
|
7429
|
+
var Sha256 = z22.string().regex(/^[a-f0-9]{64}$/);
|
|
7430
|
+
var KayUiModuleBundleIndexV1 = z22.strictObject({
|
|
7431
|
+
protocol: z22.literal(KAY_UI_MODULE_BUNDLE_PROTOCOL),
|
|
7381
7432
|
entryPath: OutputPath,
|
|
7382
|
-
stylePaths:
|
|
7383
|
-
files:
|
|
7433
|
+
stylePaths: z22.array(OutputPath).max(KAY_UI_MODULE_BUNDLE_MAX_FILES),
|
|
7434
|
+
files: z22.array(z22.strictObject({
|
|
7384
7435
|
path: OutputPath,
|
|
7385
|
-
mediaType:
|
|
7386
|
-
byteLength:
|
|
7436
|
+
mediaType: z22.string().min(1).max(128).regex(/^[a-zA-Z0-9!#$&^_.+-]+\/[a-zA-Z0-9!#$&^_.+-]+$/),
|
|
7437
|
+
byteLength: z22.number().int().min(1).max(KAY_UI_MODULE_FILE_MAX_BYTES),
|
|
7387
7438
|
sha256: Sha256
|
|
7388
7439
|
})).min(1).max(KAY_UI_MODULE_BUNDLE_MAX_FILES)
|
|
7389
7440
|
}).superRefine((index, ctx) => {
|
|
@@ -7413,9 +7464,9 @@ var KayUiModuleBundleIndexV1 = z21.strictObject({
|
|
|
7413
7464
|
message: "bundle exceeds byte cap"
|
|
7414
7465
|
});
|
|
7415
7466
|
});
|
|
7416
|
-
var KayUiModuleBundleReference =
|
|
7467
|
+
var KayUiModuleBundleReference = z22.strictObject({
|
|
7417
7468
|
generationId: Sha256,
|
|
7418
|
-
revision:
|
|
7469
|
+
revision: z22.string().min(1).max(4096).refine((value) => value.trim() === value),
|
|
7419
7470
|
index: KayUiModuleBundleIndexV1
|
|
7420
7471
|
});
|
|
7421
7472
|
export {
|
|
@@ -7537,6 +7588,7 @@ export {
|
|
|
7537
7588
|
PLUGIN_EVENT_REFUSED_ERROR_NAME,
|
|
7538
7589
|
PLUGIN_ICON_SHAPE_ATTRIBUTE,
|
|
7539
7590
|
PLUGIN_NOTIFICATION_RULE_HOST_KEYS,
|
|
7591
|
+
PLUGIN_PRODUCT_EVENT_NAME_PATTERN,
|
|
7540
7592
|
PLUGIN_SIGNAL_KINDS,
|
|
7541
7593
|
PLUGIN_SIGNAL_LABELS_MAX,
|
|
7542
7594
|
PLUGIN_SIGNAL_LABEL_MAX,
|
|
@@ -7576,6 +7628,8 @@ export {
|
|
|
7576
7628
|
PluginNotificationRuleContribution,
|
|
7577
7629
|
PluginOAuthClientSupplier,
|
|
7578
7630
|
PluginPermissionManifest,
|
|
7631
|
+
PluginProductEventContribution,
|
|
7632
|
+
PluginProductEventField,
|
|
7579
7633
|
PluginProvisioningProbe,
|
|
7580
7634
|
PluginProvisioningRequirement,
|
|
7581
7635
|
PluginSignal,
|
|
@@ -7712,6 +7766,7 @@ export {
|
|
|
7712
7766
|
isCompatible,
|
|
7713
7767
|
isCredentialShapedText,
|
|
7714
7768
|
isKayPluginCompatibilityRefusal,
|
|
7769
|
+
isPluginProductEventName,
|
|
7715
7770
|
isPrivateCapabilityClaim,
|
|
7716
7771
|
isQualifiedAuthSchemeRef,
|
|
7717
7772
|
isQualifiedAuthServiceRef,
|
package/package.json
CHANGED