@yaklabs-ai/plugin-protocol 0.42.1 → 0.44.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 +164 -1
- package/dist/index.js +88 -24
- 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;
|
|
@@ -2733,6 +2741,15 @@ declare const canonicalContributionSchemas: {
|
|
|
2733
2741
|
plugin: "plugin";
|
|
2734
2742
|
}>>;
|
|
2735
2743
|
kind: z.ZodOptional<z.ZodString>;
|
|
2744
|
+
kinds: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2745
|
+
pattern: z.ZodObject<{
|
|
2746
|
+
protocol: z.ZodString;
|
|
2747
|
+
hostname: z.ZodString;
|
|
2748
|
+
pathname: z.ZodOptional<z.ZodString>;
|
|
2749
|
+
search: z.ZodOptional<z.ZodString>;
|
|
2750
|
+
}, z.core.$strict>;
|
|
2751
|
+
kind: z.ZodString;
|
|
2752
|
+
}, z.core.$strict>>>;
|
|
2736
2753
|
noun: z.ZodOptional<z.ZodString>;
|
|
2737
2754
|
target: z.ZodOptional<z.ZodString>;
|
|
2738
2755
|
kindNamesSource: z.ZodOptional<z.ZodLiteral<true>>;
|
|
@@ -2815,6 +2832,15 @@ declare const canonicalContributionSchemas: {
|
|
|
2815
2832
|
plugin: "plugin";
|
|
2816
2833
|
}>>;
|
|
2817
2834
|
kind: z.ZodOptional<z.ZodString>;
|
|
2835
|
+
kinds: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2836
|
+
pattern: z.ZodObject<{
|
|
2837
|
+
protocol: z.ZodString;
|
|
2838
|
+
hostname: z.ZodString;
|
|
2839
|
+
pathname: z.ZodOptional<z.ZodString>;
|
|
2840
|
+
search: z.ZodOptional<z.ZodString>;
|
|
2841
|
+
}, z.core.$strict>;
|
|
2842
|
+
kind: z.ZodString;
|
|
2843
|
+
}, z.core.$strict>>>;
|
|
2818
2844
|
noun: z.ZodOptional<z.ZodString>;
|
|
2819
2845
|
target: z.ZodOptional<z.ZodString>;
|
|
2820
2846
|
kindNamesSource: z.ZodOptional<z.ZodLiteral<true>>;
|
|
@@ -3539,6 +3565,9 @@ export declare function isCredentialShapedText(value: unknown): boolean;
|
|
|
3539
3565
|
*/
|
|
3540
3566
|
export declare function isKayPluginCompatibilityRefusal(code: string): code is KayPluginCompatibilityRefusalCode;
|
|
3541
3567
|
|
|
3568
|
+
/** Whether `name` can name a declared event: the shape above, and not the journal's own family. */
|
|
3569
|
+
export declare function isPluginProductEventName(name: string): boolean;
|
|
3570
|
+
|
|
3542
3571
|
/** Whether only plugins the release carries may hold `claim` ({@link PRIVATE_PLUGIN_CAPABILITY_SLUGS}). */
|
|
3543
3572
|
export declare function isPrivateCapabilityClaim(claim: PluginCapabilityClaimV1): boolean;
|
|
3544
3573
|
|
|
@@ -4280,8 +4309,14 @@ export declare const KAY_PLUGIN_PROTOCOL_VERSION: "kay.plugin.v1";
|
|
|
4280
4309
|
*
|
|
4281
4310
|
* 0.42.1 adds current-session tool lifetimes and invocation-bound artifact reads/new outputs,
|
|
4282
4311
|
* plus described-tool execution, guidance and permission resource metadata.
|
|
4312
|
+
*
|
|
4313
|
+
* 0.43.0 adds product events (#15769). `productEvents` in a plugin's `kay.app` target declares them,
|
|
4314
|
+
* and `app.productEvents.send` sends them. Additive: a plugin that declares one declares ^0.43.0.
|
|
4315
|
+
*
|
|
4316
|
+
* 0.44.0 adds `words.kinds` to a reference presentation (#15905): an ordered list of address patterns
|
|
4317
|
+
* and the kind each one names. Additive: a plugin that lists them declares ^0.44.0.
|
|
4283
4318
|
*/
|
|
4284
|
-
export declare const KAY_PLUGIN_SDK_VERSION: "0.
|
|
4319
|
+
export declare const KAY_PLUGIN_SDK_VERSION: "0.44.0";
|
|
4285
4320
|
|
|
4286
4321
|
export declare const KAY_PLUGIN_TARGET_NAMES: readonly ["kay.agent", "kay.app", "kay.ui"];
|
|
4287
4322
|
|
|
@@ -4920,6 +4955,13 @@ export declare const KayAppTargetManifest: z.ZodObject<{
|
|
|
4920
4955
|
where: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodType<authoringCommonSchemas.JsonValue, unknown, z.core.$ZodTypeInternals<authoringCommonSchemas.JsonValue, unknown>>>>>;
|
|
4921
4956
|
rule: z.ZodRecord<z.ZodString, z.ZodType<authoringCommonSchemas.JsonValue, unknown, z.core.$ZodTypeInternals<authoringCommonSchemas.JsonValue, unknown>>>;
|
|
4922
4957
|
}, z.core.$strict>>>;
|
|
4958
|
+
productEvents: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
4959
|
+
name: z.ZodString;
|
|
4960
|
+
description: z.ZodOptional<z.ZodString>;
|
|
4961
|
+
fields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodType<authoringCommonSchemas.JsonValue, unknown, z.core.$ZodTypeInternals<authoringCommonSchemas.JsonValue, unknown>>>>>;
|
|
4962
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
4963
|
+
catalogEvent: z.ZodString;
|
|
4964
|
+
}, z.core.$strict>]>>>;
|
|
4923
4965
|
eventSubscriptions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
4924
4966
|
localId: z.ZodString;
|
|
4925
4967
|
event: z.ZodString;
|
|
@@ -5706,6 +5748,13 @@ export declare const KayPluginManifestV1: z.ZodObject<{
|
|
|
5706
5748
|
where: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodType<authoringCommonSchemas.JsonValue, unknown, z.core.$ZodTypeInternals<authoringCommonSchemas.JsonValue, unknown>>>>>;
|
|
5707
5749
|
rule: z.ZodRecord<z.ZodString, z.ZodType<authoringCommonSchemas.JsonValue, unknown, z.core.$ZodTypeInternals<authoringCommonSchemas.JsonValue, unknown>>>;
|
|
5708
5750
|
}, z.core.$strict>>>;
|
|
5751
|
+
productEvents: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
5752
|
+
name: z.ZodString;
|
|
5753
|
+
description: z.ZodOptional<z.ZodString>;
|
|
5754
|
+
fields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodType<authoringCommonSchemas.JsonValue, unknown, z.core.$ZodTypeInternals<authoringCommonSchemas.JsonValue, unknown>>>>>;
|
|
5755
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
5756
|
+
catalogEvent: z.ZodString;
|
|
5757
|
+
}, z.core.$strict>]>>>;
|
|
5709
5758
|
eventSubscriptions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
5710
5759
|
localId: z.ZodString;
|
|
5711
5760
|
event: z.ZodString;
|
|
@@ -5875,6 +5924,15 @@ export declare const KayPluginManifestV1: z.ZodObject<{
|
|
|
5875
5924
|
plugin: "plugin";
|
|
5876
5925
|
}>>;
|
|
5877
5926
|
kind: z.ZodOptional<z.ZodString>;
|
|
5927
|
+
kinds: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
5928
|
+
pattern: z.ZodObject<{
|
|
5929
|
+
protocol: z.ZodString;
|
|
5930
|
+
hostname: z.ZodString;
|
|
5931
|
+
pathname: z.ZodOptional<z.ZodString>;
|
|
5932
|
+
search: z.ZodOptional<z.ZodString>;
|
|
5933
|
+
}, z.core.$strict>;
|
|
5934
|
+
kind: z.ZodString;
|
|
5935
|
+
}, z.core.$strict>>>;
|
|
5878
5936
|
noun: z.ZodOptional<z.ZodString>;
|
|
5879
5937
|
target: z.ZodOptional<z.ZodString>;
|
|
5880
5938
|
kindNamesSource: z.ZodOptional<z.ZodLiteral<true>>;
|
|
@@ -7032,6 +7090,15 @@ export declare const KayUiTargetManifest: z.ZodObject<{
|
|
|
7032
7090
|
plugin: "plugin";
|
|
7033
7091
|
}>>;
|
|
7034
7092
|
kind: z.ZodOptional<z.ZodString>;
|
|
7093
|
+
kinds: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
7094
|
+
pattern: z.ZodObject<{
|
|
7095
|
+
protocol: z.ZodString;
|
|
7096
|
+
hostname: z.ZodString;
|
|
7097
|
+
pathname: z.ZodOptional<z.ZodString>;
|
|
7098
|
+
search: z.ZodOptional<z.ZodString>;
|
|
7099
|
+
}, z.core.$strict>;
|
|
7100
|
+
kind: z.ZodString;
|
|
7101
|
+
}, z.core.$strict>>>;
|
|
7035
7102
|
noun: z.ZodOptional<z.ZodString>;
|
|
7036
7103
|
target: z.ZodOptional<z.ZodString>;
|
|
7037
7104
|
kindNamesSource: z.ZodOptional<z.ZodLiteral<true>>;
|
|
@@ -7374,6 +7441,12 @@ export declare const PLUGIN_ICON_SHAPE_ATTRIBUTE = "data-icon-shape";
|
|
|
7374
7441
|
/** Rule-body keys the host stamps, so a manifest's `rule` may not carry them. */
|
|
7375
7442
|
export declare const PLUGIN_NOTIFICATION_RULE_HOST_KEYS: readonly ["id", "match", "sender"];
|
|
7376
7443
|
|
|
7444
|
+
/**
|
|
7445
|
+
* Dot-separated lowercase words: `next_steps.decided`, `message_draft_approved`. A leading `$` is
|
|
7446
|
+
* PostHog's own namespace and cannot match. Bounded like the wire's event name.
|
|
7447
|
+
*/
|
|
7448
|
+
export declare const PLUGIN_PRODUCT_EVENT_NAME_PATTERN: RegExp;
|
|
7449
|
+
|
|
7377
7450
|
/** The `kind` values of `PluginSignal` v1. `status` is system state that clears itself. */
|
|
7378
7451
|
export declare const PLUGIN_SIGNAL_KINDS: readonly ["message", "request", "mention", "invite", "status"];
|
|
7379
7452
|
|
|
@@ -10517,6 +10590,60 @@ export declare const PluginPermissionManifest: z.ZodObject<{
|
|
|
10517
10590
|
|
|
10518
10591
|
export declare type PluginPermissionManifest = z.infer<typeof PluginPermissionManifest>;
|
|
10519
10592
|
|
|
10593
|
+
export declare const PluginProductEventContribution: z.ZodUnion<readonly [z.ZodObject<{
|
|
10594
|
+
name: z.ZodString;
|
|
10595
|
+
description: z.ZodOptional<z.ZodString>;
|
|
10596
|
+
fields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodType<authoringCommonSchemas.JsonValue, unknown, z.core.$ZodTypeInternals<authoringCommonSchemas.JsonValue, unknown>>>>>;
|
|
10597
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
10598
|
+
catalogEvent: z.ZodString;
|
|
10599
|
+
}, z.core.$strict>]>;
|
|
10600
|
+
|
|
10601
|
+
export declare type PluginProductEventContribution = z.infer<typeof PluginProductEventContribution>;
|
|
10602
|
+
|
|
10603
|
+
/**
|
|
10604
|
+
* One declared field. `exportable` fields use the product catalog's bounded kinds and may leave the
|
|
10605
|
+
* device: an enum or a number holds nothing else, and an id-like kind is one short word with no
|
|
10606
|
+
* spaces, so it cannot hold a sentence but can hold a name or a path if an author puts one there. A
|
|
10607
|
+
* `local` field is stored in the journal and never exported.
|
|
10608
|
+
*/
|
|
10609
|
+
export declare const PluginProductEventField: z.ZodUnion<readonly [z.ZodObject<{
|
|
10610
|
+
class: z.ZodLiteral<"local">;
|
|
10611
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
10612
|
+
type: z.ZodLiteral<"enum">;
|
|
10613
|
+
values: z.ZodArray<z.ZodString>;
|
|
10614
|
+
class: z.ZodLiteral<"exportable">;
|
|
10615
|
+
optional: z.ZodOptional<z.ZodBoolean>;
|
|
10616
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
10617
|
+
type: z.ZodLiteral<"number">;
|
|
10618
|
+
min: z.ZodNumber;
|
|
10619
|
+
max: z.ZodNumber;
|
|
10620
|
+
integer: z.ZodOptional<z.ZodBoolean>;
|
|
10621
|
+
class: z.ZodLiteral<"exportable">;
|
|
10622
|
+
optional: z.ZodOptional<z.ZodBoolean>;
|
|
10623
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
10624
|
+
type: z.ZodEnum<{
|
|
10625
|
+
boolean: "boolean";
|
|
10626
|
+
id: "id";
|
|
10627
|
+
identifier: "identifier";
|
|
10628
|
+
model_provider: "model_provider";
|
|
10629
|
+
model_reference: "model_reference";
|
|
10630
|
+
}>;
|
|
10631
|
+
class: z.ZodLiteral<"exportable">;
|
|
10632
|
+
optional: z.ZodOptional<z.ZodBoolean>;
|
|
10633
|
+
}, z.core.$strict>]>;
|
|
10634
|
+
|
|
10635
|
+
export declare type PluginProductEventField = z.infer<typeof PluginProductEventField>;
|
|
10636
|
+
|
|
10637
|
+
/** What a send of a product event carries, from a plugin's code or its page. */
|
|
10638
|
+
export declare interface PluginProductEventSend {
|
|
10639
|
+
/** Declared fields of either class. A field the declaration does not name is not sent. */
|
|
10640
|
+
readonly properties?: Readonly<Record<string, string | number | boolean>>;
|
|
10641
|
+
/** The session it is about, when there is one. Exported, so it must be a session id. */
|
|
10642
|
+
readonly sessionId?: string;
|
|
10643
|
+
/** The address it is about. Stays on the device. */
|
|
10644
|
+
readonly subjectUri?: string;
|
|
10645
|
+
}
|
|
10646
|
+
|
|
10520
10647
|
export declare const PluginProvisioningProbe: z.ZodObject<{
|
|
10521
10648
|
url: z.ZodURL;
|
|
10522
10649
|
method: z.ZodOptional<z.ZodEnum<{
|
|
@@ -10850,6 +10977,15 @@ export declare const ReferencePresentationContribution: z.ZodObject<{
|
|
|
10850
10977
|
plugin: "plugin";
|
|
10851
10978
|
}>>;
|
|
10852
10979
|
kind: z.ZodOptional<z.ZodString>;
|
|
10980
|
+
kinds: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
10981
|
+
pattern: z.ZodObject<{
|
|
10982
|
+
protocol: z.ZodString;
|
|
10983
|
+
hostname: z.ZodString;
|
|
10984
|
+
pathname: z.ZodOptional<z.ZodString>;
|
|
10985
|
+
search: z.ZodOptional<z.ZodString>;
|
|
10986
|
+
}, z.core.$strict>;
|
|
10987
|
+
kind: z.ZodString;
|
|
10988
|
+
}, z.core.$strict>>>;
|
|
10853
10989
|
noun: z.ZodOptional<z.ZodString>;
|
|
10854
10990
|
target: z.ZodOptional<z.ZodString>;
|
|
10855
10991
|
kindNamesSource: z.ZodOptional<z.ZodLiteral<true>>;
|
|
@@ -10936,6 +11072,15 @@ export declare const ReferencePresentationWords: z.ZodObject<{
|
|
|
10936
11072
|
plugin: "plugin";
|
|
10937
11073
|
}>>;
|
|
10938
11074
|
kind: z.ZodOptional<z.ZodString>;
|
|
11075
|
+
kinds: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
11076
|
+
pattern: z.ZodObject<{
|
|
11077
|
+
protocol: z.ZodString;
|
|
11078
|
+
hostname: z.ZodString;
|
|
11079
|
+
pathname: z.ZodOptional<z.ZodString>;
|
|
11080
|
+
search: z.ZodOptional<z.ZodString>;
|
|
11081
|
+
}, z.core.$strict>;
|
|
11082
|
+
kind: z.ZodString;
|
|
11083
|
+
}, z.core.$strict>>>;
|
|
10939
11084
|
noun: z.ZodOptional<z.ZodString>;
|
|
10940
11085
|
target: z.ZodOptional<z.ZodString>;
|
|
10941
11086
|
kindNamesSource: z.ZodOptional<z.ZodLiteral<true>>;
|
|
@@ -12839,6 +12984,15 @@ export declare const ResolvedPluginContractV1: z.ZodObject<{
|
|
|
12839
12984
|
plugin: "plugin";
|
|
12840
12985
|
}>>;
|
|
12841
12986
|
kind: z.ZodOptional<z.ZodString>;
|
|
12987
|
+
kinds: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
12988
|
+
pattern: z.ZodObject<{
|
|
12989
|
+
protocol: z.ZodString;
|
|
12990
|
+
hostname: z.ZodString;
|
|
12991
|
+
pathname: z.ZodOptional<z.ZodString>;
|
|
12992
|
+
search: z.ZodOptional<z.ZodString>;
|
|
12993
|
+
}, z.core.$strict>;
|
|
12994
|
+
kind: z.ZodString;
|
|
12995
|
+
}, z.core.$strict>>>;
|
|
12842
12996
|
noun: z.ZodOptional<z.ZodString>;
|
|
12843
12997
|
target: z.ZodOptional<z.ZodString>;
|
|
12844
12998
|
kindNamesSource: z.ZodOptional<z.ZodLiteral<true>>;
|
|
@@ -13349,6 +13503,15 @@ export declare const ResolvedReferencePresentation: z.ZodObject<{
|
|
|
13349
13503
|
plugin: "plugin";
|
|
13350
13504
|
}>>;
|
|
13351
13505
|
kind: z.ZodOptional<z.ZodString>;
|
|
13506
|
+
kinds: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
13507
|
+
pattern: z.ZodObject<{
|
|
13508
|
+
protocol: z.ZodString;
|
|
13509
|
+
hostname: z.ZodString;
|
|
13510
|
+
pathname: z.ZodOptional<z.ZodString>;
|
|
13511
|
+
search: z.ZodOptional<z.ZodString>;
|
|
13512
|
+
}, z.core.$strict>;
|
|
13513
|
+
kind: z.ZodString;
|
|
13514
|
+
}, z.core.$strict>>>;
|
|
13352
13515
|
noun: z.ZodOptional<z.ZodString>;
|
|
13353
13516
|
target: z.ZodOptional<z.ZodString>;
|
|
13354
13517
|
kindNamesSource: z.ZodOptional<z.ZodLiteral<true>>;
|
package/dist/index.js
CHANGED
|
@@ -254,8 +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.
|
|
258
|
-
var KAY_PLUGIN_COMPATIBLE_SDK_VERSIONS = [
|
|
257
|
+
var KAY_PLUGIN_SDK_VERSION = "0.44.0";
|
|
258
|
+
var KAY_PLUGIN_COMPATIBLE_SDK_VERSIONS = [
|
|
259
|
+
"0.42.0",
|
|
260
|
+
"0.42.1",
|
|
261
|
+
"0.43.0"
|
|
262
|
+
];
|
|
259
263
|
var KAY_PLUGIN_TARGET_NAMES = [
|
|
260
264
|
"kay.agent",
|
|
261
265
|
"kay.app",
|
|
@@ -2753,6 +2757,7 @@ __export(contributions_exports, {
|
|
|
2753
2757
|
PluginContributionKind: () => PluginContributionKind,
|
|
2754
2758
|
PluginEventDefinitionContribution: () => PluginEventDefinitionContribution,
|
|
2755
2759
|
PluginNotificationRuleContribution: () => PluginNotificationRuleContribution,
|
|
2760
|
+
PluginProductEventContribution: () => PluginProductEventContribution,
|
|
2756
2761
|
PluginSkillSourceDeclaration: () => PluginSkillSourceDeclaration,
|
|
2757
2762
|
ReferenceOpenBehavior: () => ReferenceOpenBehavior,
|
|
2758
2763
|
ReferencePresentationAddress: () => ReferencePresentationAddress,
|
|
@@ -3742,6 +3747,14 @@ function createContributionsSchemas(canonical) {
|
|
|
3742
3747
|
where: z12.array(JsonObject).optional(),
|
|
3743
3748
|
rule: JsonObject
|
|
3744
3749
|
});
|
|
3750
|
+
const PluginProductEventContribution2 = z12.union([
|
|
3751
|
+
z12.strictObject({
|
|
3752
|
+
name: NonEmptyString3,
|
|
3753
|
+
description: NonEmptyString3.optional(),
|
|
3754
|
+
fields: z12.record(z12.string(), JsonObject).optional()
|
|
3755
|
+
}),
|
|
3756
|
+
z12.strictObject({ catalogEvent: NonEmptyString3 })
|
|
3757
|
+
]);
|
|
3745
3758
|
const UiEventSubscriptionContribution2 = z12.strictObject({
|
|
3746
3759
|
localId: LocalContributionId2,
|
|
3747
3760
|
event: NonEmptyString3
|
|
@@ -3841,6 +3854,14 @@ function createContributionsSchemas(canonical) {
|
|
|
3841
3854
|
glyph: z12.enum(TOOL_GLYPHS).optional(),
|
|
3842
3855
|
/** The thing an address names ("channel" in "Read Slack channel"). Left out: the row reads the scheme's own name. */
|
|
3843
3856
|
kind: NonEmptyString3.optional(),
|
|
3857
|
+
/**
|
|
3858
|
+
* A more specific kind by the address's shape. The first row that matches decides, and an
|
|
3859
|
+
* address no row matches reads `kind`.
|
|
3860
|
+
*/
|
|
3861
|
+
kinds: z12.array(z12.strictObject({
|
|
3862
|
+
pattern: ReferencePresentationUriPattern2,
|
|
3863
|
+
kind: NonEmptyString3
|
|
3864
|
+
})).min(1).optional(),
|
|
3844
3865
|
/** What a tally counts one address as ("Slack message"). Left out: `kind`, else "item". */
|
|
3845
3866
|
noun: NonEmptyString3.optional(),
|
|
3846
3867
|
/** What the live phrase names ("Slack" in "Reading Slack"). Left out: the bare verb ("Reading"). */
|
|
@@ -3848,11 +3869,11 @@ function createContributionsSchemas(canonical) {
|
|
|
3848
3869
|
/** `kind` already says which source this is: "Edited plan", not "Edited Plan plan". */
|
|
3849
3870
|
kindNamesSource: z12.literal(true).optional()
|
|
3850
3871
|
}).superRefine((value, ctx) => {
|
|
3851
|
-
if (value.kind === void 0 && (value.glyph !== void 0 || value.kindNamesSource !== void 0)) {
|
|
3872
|
+
if (value.kind === void 0 && (value.glyph !== void 0 || value.kindNamesSource !== void 0 || value.kinds !== void 0)) {
|
|
3852
3873
|
ctx.addIssue({
|
|
3853
3874
|
code: "custom",
|
|
3854
3875
|
path: ["kind"],
|
|
3855
|
-
message: "glyph and kindNamesSource describe a row, which needs a kind."
|
|
3876
|
+
message: "glyph, kinds and kindNamesSource describe a row, which needs a kind."
|
|
3856
3877
|
});
|
|
3857
3878
|
}
|
|
3858
3879
|
});
|
|
@@ -4176,6 +4197,7 @@ function createContributionsSchemas(canonical) {
|
|
|
4176
4197
|
ContextContributorContribution: ContextContributorContribution2,
|
|
4177
4198
|
PluginEventDefinitionContribution: PluginEventDefinitionContribution2,
|
|
4178
4199
|
PluginNotificationRuleContribution: PluginNotificationRuleContribution2,
|
|
4200
|
+
PluginProductEventContribution: PluginProductEventContribution2,
|
|
4179
4201
|
UiEventSubscriptionContribution: UiEventSubscriptionContribution2,
|
|
4180
4202
|
DeviceDelegationContribution: DeviceDelegationContribution2,
|
|
4181
4203
|
SessionReaderContribution: SessionReaderContribution2,
|
|
@@ -4205,7 +4227,7 @@ function createContributionsSchemas(canonical) {
|
|
|
4205
4227
|
PluginContributionKind: PluginContributionKind2
|
|
4206
4228
|
};
|
|
4207
4229
|
}
|
|
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);
|
|
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);
|
|
4209
4231
|
var canonicalContributionSchemas = createContributionsSchemas(true);
|
|
4210
4232
|
|
|
4211
4233
|
// packages/plugin-protocol/dist/icon-shape.js
|
|
@@ -4279,7 +4301,7 @@ var KAY_UI_NATIVE_EVENT_SUBSCRIPTIONS = [
|
|
|
4279
4301
|
var KAY_UI_NATIVE_EVENT_ALLOWLIST = new Set(KAY_UI_NATIVE_EVENT_SUBSCRIPTIONS);
|
|
4280
4302
|
var RETIRED_COMPATIBILITY_KEYS = ["policy"];
|
|
4281
4303
|
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;
|
|
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;
|
|
4283
4305
|
const { HttpsUrl: HttpsUrl2, LocalContributionId: LocalContributionId2, NonEmptyString: NonEmptyString3, PackageAssetPath: PackageAssetPath2, PluginId: PluginId2, PluginNamespace: PluginNamespace2, RegistrableDomain: RegistrableDomain2, SignedInStatusCode: SignedInStatusCode2, TargetEntrypoint: TargetEntrypoint2 } = canonical ? canonicalCommonSchemas : common_exports;
|
|
4284
4306
|
const { PluginPermissionManifest: PluginPermissionManifest2 } = canonical ? canonicalPermissionSchemas : permissions_exports;
|
|
4285
4307
|
const KayAgentTargetManifest2 = z13.strictObject({
|
|
@@ -4377,6 +4399,7 @@ function createManifestSchemas(canonical) {
|
|
|
4377
4399
|
// Default notification rules over this plugin's own `eventDefinitions`; seeded by the host
|
|
4378
4400
|
// (see `PluginNotificationRuleContribution`).
|
|
4379
4401
|
notificationRules: z13.array(PluginNotificationRuleContribution2).optional(),
|
|
4402
|
+
productEvents: z13.array(PluginProductEventContribution2).optional(),
|
|
4380
4403
|
eventSubscriptions: z13.array(AppEventSubscription2).optional(),
|
|
4381
4404
|
deviceDelegations: z13.array(DeviceDelegationContribution2).optional(),
|
|
4382
4405
|
sessionReaders: z13.array(SessionReaderContribution2).optional(),
|
|
@@ -7304,10 +7327,47 @@ var WhiteboardTypeInfo = z19.strictObject({
|
|
|
7304
7327
|
}).optional()
|
|
7305
7328
|
});
|
|
7306
7329
|
|
|
7307
|
-
// packages/plugin-protocol/dist/
|
|
7330
|
+
// packages/plugin-protocol/dist/product-events.js
|
|
7308
7331
|
import { z as z20 } from "zod";
|
|
7332
|
+
var exportable = {
|
|
7333
|
+
class: z20.literal("exportable"),
|
|
7334
|
+
optional: z20.boolean().optional()
|
|
7335
|
+
};
|
|
7336
|
+
var PluginProductEventField = z20.union([
|
|
7337
|
+
z20.strictObject({ class: z20.literal("local") }),
|
|
7338
|
+
z20.strictObject({
|
|
7339
|
+
...exportable,
|
|
7340
|
+
type: z20.literal("enum"),
|
|
7341
|
+
values: z20.array(z20.string())
|
|
7342
|
+
}),
|
|
7343
|
+
z20.strictObject({
|
|
7344
|
+
...exportable,
|
|
7345
|
+
type: z20.literal("number"),
|
|
7346
|
+
min: z20.number(),
|
|
7347
|
+
max: z20.number(),
|
|
7348
|
+
integer: z20.boolean().optional()
|
|
7349
|
+
}),
|
|
7350
|
+
z20.strictObject({
|
|
7351
|
+
...exportable,
|
|
7352
|
+
type: z20.enum([
|
|
7353
|
+
"boolean",
|
|
7354
|
+
"id",
|
|
7355
|
+
"identifier",
|
|
7356
|
+
"model_provider",
|
|
7357
|
+
"model_reference"
|
|
7358
|
+
])
|
|
7359
|
+
})
|
|
7360
|
+
]);
|
|
7361
|
+
var PLUGIN_PRODUCT_EVENT_NAME_PATTERN = /^[a-z][a-z0-9_]*(?:\.[a-z][a-z0-9_]*)*$/;
|
|
7362
|
+
var PLUGIN_PRODUCT_EVENT_NAME_MAX = 120;
|
|
7363
|
+
function isPluginProductEventName(name) {
|
|
7364
|
+
return name.length <= PLUGIN_PRODUCT_EVENT_NAME_MAX && PLUGIN_PRODUCT_EVENT_NAME_PATTERN.test(name) && !name.startsWith("runtime.usage.");
|
|
7365
|
+
}
|
|
7366
|
+
|
|
7367
|
+
// packages/plugin-protocol/dist/artifact-outputs.js
|
|
7368
|
+
import { z as z21 } from "zod";
|
|
7309
7369
|
var ARTIFACT_OUTPUT_PAGE_MAX = 200;
|
|
7310
|
-
var Segment =
|
|
7370
|
+
var Segment = z21.string().min(1).max(1024).refine((value) => !/[^A-Za-z0-9._-]/.test(value)).refine((value) => value !== "." && value !== "..");
|
|
7311
7371
|
function parseArtifactOutputUri(uri) {
|
|
7312
7372
|
const match = /^output:\/\/([^/]+)\/([^/]+)$/.exec(uri);
|
|
7313
7373
|
if (match === null || !Segment.safeParse(match[1]).success || !Segment.safeParse(match[2]).success)
|
|
@@ -7317,12 +7377,12 @@ function parseArtifactOutputUri(uri) {
|
|
|
7317
7377
|
function isCanonicalArtifactOutputUri(uri) {
|
|
7318
7378
|
return parseArtifactOutputUri(uri) !== void 0;
|
|
7319
7379
|
}
|
|
7320
|
-
var ArtifactOutputUri =
|
|
7321
|
-
var ArtifactOutputChange =
|
|
7322
|
-
|
|
7323
|
-
uris:
|
|
7380
|
+
var ArtifactOutputUri = z21.string().refine(isCanonicalArtifactOutputUri, "Expected a canonical output://session/name URI");
|
|
7381
|
+
var ArtifactOutputChange = z21.union([
|
|
7382
|
+
z21.strictObject({
|
|
7383
|
+
uris: z21.array(ArtifactOutputUri).min(1).max(ARTIFACT_OUTPUT_PAGE_MAX)
|
|
7324
7384
|
}),
|
|
7325
|
-
|
|
7385
|
+
z21.strictObject({ sessionId: Segment })
|
|
7326
7386
|
]);
|
|
7327
7387
|
|
|
7328
7388
|
// packages/plugin-protocol/dist/credential-text.js
|
|
@@ -7365,25 +7425,25 @@ function isCredentialShapedText(value) {
|
|
|
7365
7425
|
}
|
|
7366
7426
|
|
|
7367
7427
|
// packages/plugin-protocol/dist/ui-module-bundle.js
|
|
7368
|
-
import { z as
|
|
7428
|
+
import { z as z22 } from "zod";
|
|
7369
7429
|
var KAY_UI_MODULE_BUNDLE_PROTOCOL = "kay.ui.module-bundle.v1";
|
|
7370
7430
|
var KAY_UI_MODULE_FILE_MAX_BYTES = 8 * 1024 * 1024;
|
|
7371
7431
|
var KAY_UI_MODULE_BUNDLE_MAX_BYTES = 32 * 1024 * 1024;
|
|
7372
7432
|
var KAY_UI_MODULE_BUNDLE_MAX_FILES = 256;
|
|
7373
|
-
var OutputPath =
|
|
7433
|
+
var OutputPath = z22.string().min(1).max(1024).refine((value) => {
|
|
7374
7434
|
const parsed = KayUiBundleIndexV1.shape.entryPath.safeParse(value);
|
|
7375
7435
|
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
7436
|
!/[\u0000-\u001f?#:%]/.test(value);
|
|
7377
7437
|
}, { message: "bundle path must contain only unambiguous relative segments" });
|
|
7378
|
-
var Sha256 =
|
|
7379
|
-
var KayUiModuleBundleIndexV1 =
|
|
7380
|
-
protocol:
|
|
7438
|
+
var Sha256 = z22.string().regex(/^[a-f0-9]{64}$/);
|
|
7439
|
+
var KayUiModuleBundleIndexV1 = z22.strictObject({
|
|
7440
|
+
protocol: z22.literal(KAY_UI_MODULE_BUNDLE_PROTOCOL),
|
|
7381
7441
|
entryPath: OutputPath,
|
|
7382
|
-
stylePaths:
|
|
7383
|
-
files:
|
|
7442
|
+
stylePaths: z22.array(OutputPath).max(KAY_UI_MODULE_BUNDLE_MAX_FILES),
|
|
7443
|
+
files: z22.array(z22.strictObject({
|
|
7384
7444
|
path: OutputPath,
|
|
7385
|
-
mediaType:
|
|
7386
|
-
byteLength:
|
|
7445
|
+
mediaType: z22.string().min(1).max(128).regex(/^[a-zA-Z0-9!#$&^_.+-]+\/[a-zA-Z0-9!#$&^_.+-]+$/),
|
|
7446
|
+
byteLength: z22.number().int().min(1).max(KAY_UI_MODULE_FILE_MAX_BYTES),
|
|
7387
7447
|
sha256: Sha256
|
|
7388
7448
|
})).min(1).max(KAY_UI_MODULE_BUNDLE_MAX_FILES)
|
|
7389
7449
|
}).superRefine((index, ctx) => {
|
|
@@ -7413,9 +7473,9 @@ var KayUiModuleBundleIndexV1 = z21.strictObject({
|
|
|
7413
7473
|
message: "bundle exceeds byte cap"
|
|
7414
7474
|
});
|
|
7415
7475
|
});
|
|
7416
|
-
var KayUiModuleBundleReference =
|
|
7476
|
+
var KayUiModuleBundleReference = z22.strictObject({
|
|
7417
7477
|
generationId: Sha256,
|
|
7418
|
-
revision:
|
|
7478
|
+
revision: z22.string().min(1).max(4096).refine((value) => value.trim() === value),
|
|
7419
7479
|
index: KayUiModuleBundleIndexV1
|
|
7420
7480
|
});
|
|
7421
7481
|
export {
|
|
@@ -7537,6 +7597,7 @@ export {
|
|
|
7537
7597
|
PLUGIN_EVENT_REFUSED_ERROR_NAME,
|
|
7538
7598
|
PLUGIN_ICON_SHAPE_ATTRIBUTE,
|
|
7539
7599
|
PLUGIN_NOTIFICATION_RULE_HOST_KEYS,
|
|
7600
|
+
PLUGIN_PRODUCT_EVENT_NAME_PATTERN,
|
|
7540
7601
|
PLUGIN_SIGNAL_KINDS,
|
|
7541
7602
|
PLUGIN_SIGNAL_LABELS_MAX,
|
|
7542
7603
|
PLUGIN_SIGNAL_LABEL_MAX,
|
|
@@ -7576,6 +7637,8 @@ export {
|
|
|
7576
7637
|
PluginNotificationRuleContribution,
|
|
7577
7638
|
PluginOAuthClientSupplier,
|
|
7578
7639
|
PluginPermissionManifest,
|
|
7640
|
+
PluginProductEventContribution,
|
|
7641
|
+
PluginProductEventField,
|
|
7579
7642
|
PluginProvisioningProbe,
|
|
7580
7643
|
PluginProvisioningRequirement,
|
|
7581
7644
|
PluginSignal,
|
|
@@ -7712,6 +7775,7 @@ export {
|
|
|
7712
7775
|
isCompatible,
|
|
7713
7776
|
isCredentialShapedText,
|
|
7714
7777
|
isKayPluginCompatibilityRefusal,
|
|
7778
|
+
isPluginProductEventName,
|
|
7715
7779
|
isPrivateCapabilityClaim,
|
|
7716
7780
|
isQualifiedAuthSchemeRef,
|
|
7717
7781
|
isQualifiedAuthServiceRef,
|
package/package.json
CHANGED