@yaklabs-ai/plugin-protocol 0.42.0 → 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 +229 -2
- package/dist/index.js +106 -24
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -48,6 +48,12 @@ export declare type AgentRuntimeSessionCreatorKind = (typeof AGENT_RUNTIME_SESSI
|
|
|
48
48
|
|
|
49
49
|
export declare const AgentToolContribution: z.ZodObject<{
|
|
50
50
|
parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<authoringCommonSchemas.JsonValue, unknown, z.core.$ZodTypeInternals<authoringCommonSchemas.JsonValue, unknown>>>>;
|
|
51
|
+
executionMode: z.ZodOptional<z.ZodEnum<{
|
|
52
|
+
sequential: "sequential";
|
|
53
|
+
parallel: "parallel";
|
|
54
|
+
}>>;
|
|
55
|
+
promptSnippet: z.ZodOptional<z.ZodString>;
|
|
56
|
+
promptGuidelines: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
51
57
|
authService: z.ZodOptional<z.ZodString>;
|
|
52
58
|
authScheme: z.ZodOptional<z.ZodString>;
|
|
53
59
|
permission: z.ZodOptional<z.ZodObject<{
|
|
@@ -58,6 +64,8 @@ export declare const AgentToolContribution: z.ZodObject<{
|
|
|
58
64
|
execute: "execute";
|
|
59
65
|
}>;
|
|
60
66
|
ruleKey: z.ZodOptional<z.ZodString>;
|
|
67
|
+
scheme: z.ZodOptional<z.ZodString>;
|
|
68
|
+
resourcePrefix: z.ZodOptional<z.ZodString>;
|
|
61
69
|
resourceArgs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
62
70
|
}, z.core.$strict>>;
|
|
63
71
|
localId: z.ZodString;
|
|
@@ -1670,6 +1678,7 @@ declare namespace authoringContributionSchemas {
|
|
|
1670
1678
|
ContextContributorContribution,
|
|
1671
1679
|
PluginEventDefinitionContribution,
|
|
1672
1680
|
PluginNotificationRuleContribution,
|
|
1681
|
+
PluginProductEventContribution,
|
|
1673
1682
|
UiEventSubscriptionContribution,
|
|
1674
1683
|
DeviceDelegationContribution,
|
|
1675
1684
|
SessionReaderContribution,
|
|
@@ -2041,10 +2050,18 @@ declare const canonicalContributionSchemas: {
|
|
|
2041
2050
|
execute: "execute";
|
|
2042
2051
|
}>;
|
|
2043
2052
|
ruleKey: z.ZodOptional<z.ZodString>;
|
|
2053
|
+
scheme: z.ZodOptional<z.ZodString>;
|
|
2054
|
+
resourcePrefix: z.ZodOptional<z.ZodString>;
|
|
2044
2055
|
resourceArgs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2045
2056
|
}, z.core.$strict>;
|
|
2046
2057
|
AgentToolContribution: z.ZodObject<{
|
|
2047
2058
|
parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<authoringCommonSchemas.JsonValue, unknown, z.core.$ZodTypeInternals<authoringCommonSchemas.JsonValue, unknown>>>>;
|
|
2059
|
+
executionMode: z.ZodOptional<z.ZodEnum<{
|
|
2060
|
+
sequential: "sequential";
|
|
2061
|
+
parallel: "parallel";
|
|
2062
|
+
}>>;
|
|
2063
|
+
promptSnippet: z.ZodOptional<z.ZodString>;
|
|
2064
|
+
promptGuidelines: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2048
2065
|
authService: z.ZodOptional<z.ZodString>;
|
|
2049
2066
|
authScheme: z.ZodOptional<z.ZodString>;
|
|
2050
2067
|
permission: z.ZodOptional<z.ZodObject<{
|
|
@@ -2055,6 +2072,8 @@ declare const canonicalContributionSchemas: {
|
|
|
2055
2072
|
execute: "execute";
|
|
2056
2073
|
}>;
|
|
2057
2074
|
ruleKey: z.ZodOptional<z.ZodString>;
|
|
2075
|
+
scheme: z.ZodOptional<z.ZodString>;
|
|
2076
|
+
resourcePrefix: z.ZodOptional<z.ZodString>;
|
|
2058
2077
|
resourceArgs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2059
2078
|
}, z.core.$strict>>;
|
|
2060
2079
|
localId: z.ZodString;
|
|
@@ -2582,6 +2601,13 @@ declare const canonicalContributionSchemas: {
|
|
|
2582
2601
|
where: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodType<authoringCommonSchemas.JsonValue, unknown, z.core.$ZodTypeInternals<authoringCommonSchemas.JsonValue, unknown>>>>>;
|
|
2583
2602
|
rule: z.ZodRecord<z.ZodString, z.ZodType<authoringCommonSchemas.JsonValue, unknown, z.core.$ZodTypeInternals<authoringCommonSchemas.JsonValue, unknown>>>;
|
|
2584
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>]>;
|
|
2585
2611
|
UiEventSubscriptionContribution: z.ZodObject<{
|
|
2586
2612
|
localId: z.ZodString;
|
|
2587
2613
|
event: z.ZodString;
|
|
@@ -3521,6 +3547,9 @@ export declare function isCredentialShapedText(value: unknown): boolean;
|
|
|
3521
3547
|
*/
|
|
3522
3548
|
export declare function isKayPluginCompatibilityRefusal(code: string): code is KayPluginCompatibilityRefusalCode;
|
|
3523
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
|
+
|
|
3524
3553
|
/** Whether only plugins the release carries may hold `claim` ({@link PRIVATE_PLUGIN_CAPABILITY_SLUGS}). */
|
|
3525
3554
|
export declare function isPrivateCapabilityClaim(claim: PluginCapabilityClaimV1): boolean;
|
|
3526
3555
|
|
|
@@ -4259,8 +4288,14 @@ export declare const KAY_PLUGIN_PROTOCOL_VERSION: "kay.plugin.v1";
|
|
|
4259
4288
|
* 0.42.0 hands background work the shared ResolvedCredential in auth.credential. Workflow
|
|
4260
4289
|
* accounts carry auth resolution outcomes, and Poller callbacks receive only the credential.
|
|
4261
4290
|
* Older SDK ranges are refused because their background success shape is no longer served.
|
|
4291
|
+
*
|
|
4292
|
+
* 0.42.1 adds current-session tool lifetimes and invocation-bound artifact reads/new outputs,
|
|
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.
|
|
4262
4297
|
*/
|
|
4263
|
-
export declare const KAY_PLUGIN_SDK_VERSION: "0.
|
|
4298
|
+
export declare const KAY_PLUGIN_SDK_VERSION: "0.43.0";
|
|
4264
4299
|
|
|
4265
4300
|
export declare const KAY_PLUGIN_TARGET_NAMES: readonly ["kay.agent", "kay.app", "kay.ui"];
|
|
4266
4301
|
|
|
@@ -4286,6 +4321,12 @@ export declare const KayAgentTargetManifest: z.ZodObject<{
|
|
|
4286
4321
|
contributes: z.ZodOptional<z.ZodObject<{
|
|
4287
4322
|
tools: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
4288
4323
|
parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<authoringCommonSchemas.JsonValue, unknown, z.core.$ZodTypeInternals<authoringCommonSchemas.JsonValue, unknown>>>>;
|
|
4324
|
+
executionMode: z.ZodOptional<z.ZodEnum<{
|
|
4325
|
+
sequential: "sequential";
|
|
4326
|
+
parallel: "parallel";
|
|
4327
|
+
}>>;
|
|
4328
|
+
promptSnippet: z.ZodOptional<z.ZodString>;
|
|
4329
|
+
promptGuidelines: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
4289
4330
|
authService: z.ZodOptional<z.ZodString>;
|
|
4290
4331
|
authScheme: z.ZodOptional<z.ZodString>;
|
|
4291
4332
|
permission: z.ZodOptional<z.ZodObject<{
|
|
@@ -4296,6 +4337,8 @@ export declare const KayAgentTargetManifest: z.ZodObject<{
|
|
|
4296
4337
|
execute: "execute";
|
|
4297
4338
|
}>;
|
|
4298
4339
|
ruleKey: z.ZodOptional<z.ZodString>;
|
|
4340
|
+
scheme: z.ZodOptional<z.ZodString>;
|
|
4341
|
+
resourcePrefix: z.ZodOptional<z.ZodString>;
|
|
4299
4342
|
resourceArgs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
4300
4343
|
}, z.core.$strict>>;
|
|
4301
4344
|
localId: z.ZodString;
|
|
@@ -4891,6 +4934,13 @@ export declare const KayAppTargetManifest: z.ZodObject<{
|
|
|
4891
4934
|
where: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodType<authoringCommonSchemas.JsonValue, unknown, z.core.$ZodTypeInternals<authoringCommonSchemas.JsonValue, unknown>>>>>;
|
|
4892
4935
|
rule: z.ZodRecord<z.ZodString, z.ZodType<authoringCommonSchemas.JsonValue, unknown, z.core.$ZodTypeInternals<authoringCommonSchemas.JsonValue, unknown>>>;
|
|
4893
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>]>>>;
|
|
4894
4944
|
eventSubscriptions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
4895
4945
|
localId: z.ZodString;
|
|
4896
4946
|
event: z.ZodString;
|
|
@@ -5067,6 +5117,12 @@ export declare const KayPluginManifestV1: z.ZodObject<{
|
|
|
5067
5117
|
contributes: z.ZodOptional<z.ZodObject<{
|
|
5068
5118
|
tools: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
5069
5119
|
parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<authoringCommonSchemas.JsonValue, unknown, z.core.$ZodTypeInternals<authoringCommonSchemas.JsonValue, unknown>>>>;
|
|
5120
|
+
executionMode: z.ZodOptional<z.ZodEnum<{
|
|
5121
|
+
sequential: "sequential";
|
|
5122
|
+
parallel: "parallel";
|
|
5123
|
+
}>>;
|
|
5124
|
+
promptSnippet: z.ZodOptional<z.ZodString>;
|
|
5125
|
+
promptGuidelines: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
5070
5126
|
authService: z.ZodOptional<z.ZodString>;
|
|
5071
5127
|
authScheme: z.ZodOptional<z.ZodString>;
|
|
5072
5128
|
permission: z.ZodOptional<z.ZodObject<{
|
|
@@ -5077,6 +5133,8 @@ export declare const KayPluginManifestV1: z.ZodObject<{
|
|
|
5077
5133
|
execute: "execute";
|
|
5078
5134
|
}>;
|
|
5079
5135
|
ruleKey: z.ZodOptional<z.ZodString>;
|
|
5136
|
+
scheme: z.ZodOptional<z.ZodString>;
|
|
5137
|
+
resourcePrefix: z.ZodOptional<z.ZodString>;
|
|
5080
5138
|
resourceArgs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
5081
5139
|
}, z.core.$strict>>;
|
|
5082
5140
|
localId: z.ZodString;
|
|
@@ -5669,6 +5727,13 @@ export declare const KayPluginManifestV1: z.ZodObject<{
|
|
|
5669
5727
|
where: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodType<authoringCommonSchemas.JsonValue, unknown, z.core.$ZodTypeInternals<authoringCommonSchemas.JsonValue, unknown>>>>>;
|
|
5670
5728
|
rule: z.ZodRecord<z.ZodString, z.ZodType<authoringCommonSchemas.JsonValue, unknown, z.core.$ZodTypeInternals<authoringCommonSchemas.JsonValue, unknown>>>;
|
|
5671
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>]>>>;
|
|
5672
5737
|
eventSubscriptions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
5673
5738
|
localId: z.ZodString;
|
|
5674
5739
|
event: z.ZodString;
|
|
@@ -7317,7 +7382,7 @@ export declare function parseSemver(value: string): ParsedSemver | undefined;
|
|
|
7317
7382
|
export declare function parseWhere(source: string, keyTypes?: WhereKeyTypes): WhereParseResult;
|
|
7318
7383
|
|
|
7319
7384
|
/** Every capability slug {@link PluginCapabilityClaimV1} can express, for exhaustive table checks. */
|
|
7320
|
-
export declare const PLUGIN_CAPABILITY_SLUGS: readonly ["sessions.run", "network.connect", "web-session.request", "web-session.download", "process.spawn", "sessions.read", "signals.read", "memory.read", "memory.write", "skills.read", "skills.write", "skills.share", "plugins.set-enabled", "sessions.annotate", "sessions.compact", "soul.write", "tools.describe", "workspace.command", "sessions.create", "sessions.update", "models.complete", "systemOne.use", "automations.write", "automations.run", "workflows.define", "workflows.signals", "session-events.subscribe", "agents.run", "dynamic-context.register", "app-data.register", "knowledge-source.register", "artifacts.read", "account.assert", "account.update", "agents.permissions", "tool-interception.register", "interaction.surface", "config.declare-section", "auth.own-service", "auth.shared-identity", "cli.bind", "mcp.host-server", "prompt.resident", "skills.declared-source", "whiteboard.discover", "whiteboard.read", "whiteboard.create", "whiteboard.update", "whiteboard.remove", "model-selection.register", "system-prompt.register"];
|
|
7385
|
+
export declare const PLUGIN_CAPABILITY_SLUGS: readonly ["sessions.run", "network.connect", "web-session.request", "web-session.download", "process.spawn", "sessions.read", "signals.read", "memory.read", "memory.write", "skills.read", "skills.write", "skills.share", "plugins.set-enabled", "sessions.annotate", "sessions.compact", "soul.write", "tools.describe", "workspace.command", "sessions.create", "sessions.update", "models.complete", "systemOne.use", "automations.write", "automations.run", "workflows.define", "workflows.signals", "session-events.subscribe", "agents.run", "dynamic-context.register", "app-data.register", "knowledge-source.register", "artifacts.read", "session-artifacts.read", "session-artifacts.create", "account.assert", "account.update", "agents.permissions", "tool-interception.register", "interaction.surface", "config.declare-section", "auth.own-service", "auth.shared-identity", "cli.bind", "mcp.host-server", "prompt.resident", "skills.declared-source", "whiteboard.discover", "whiteboard.read", "whiteboard.create", "whiteboard.update", "whiteboard.remove", "model-selection.register", "system-prompt.register"];
|
|
7321
7386
|
|
|
7322
7387
|
/** Diagnostic messages carry plugin-controlled text (parse errors, module errors); bound it so a
|
|
7323
7388
|
* hostile or accidental multi-megabyte error can never blow up a log line or a render surface. */
|
|
@@ -7337,6 +7402,12 @@ export declare const PLUGIN_ICON_SHAPE_ATTRIBUTE = "data-icon-shape";
|
|
|
7337
7402
|
/** Rule-body keys the host stamps, so a manifest's `rule` may not carry them. */
|
|
7338
7403
|
export declare const PLUGIN_NOTIFICATION_RULE_HOST_KEYS: readonly ["id", "match", "sender"];
|
|
7339
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
|
+
|
|
7340
7411
|
/** The `kind` values of `PluginSignal` v1. `status` is system state that clears itself. */
|
|
7341
7412
|
export declare const PLUGIN_SIGNAL_KINDS: readonly ["message", "request", "mention", "invite", "status"];
|
|
7342
7413
|
|
|
@@ -7963,6 +8034,18 @@ export declare const PluginCapabilityClaimInputV1: z.ZodCustom<{
|
|
|
7963
8034
|
envelope: {
|
|
7964
8035
|
source: string;
|
|
7965
8036
|
};
|
|
8037
|
+
} | {
|
|
8038
|
+
target: "kay.agent";
|
|
8039
|
+
slug: "session-artifacts.read";
|
|
8040
|
+
envelope: {
|
|
8041
|
+
kind: "output" | "upload";
|
|
8042
|
+
};
|
|
8043
|
+
} | {
|
|
8044
|
+
target: "kay.agent";
|
|
8045
|
+
slug: "session-artifacts.create";
|
|
8046
|
+
envelope: {
|
|
8047
|
+
kind: "output";
|
|
8048
|
+
};
|
|
7966
8049
|
} | {
|
|
7967
8050
|
target: "kay.app";
|
|
7968
8051
|
slug: "artifacts.read";
|
|
@@ -8212,6 +8295,18 @@ export declare const PluginCapabilityClaimInputV1: z.ZodCustom<{
|
|
|
8212
8295
|
envelope: {
|
|
8213
8296
|
source: string;
|
|
8214
8297
|
};
|
|
8298
|
+
} | {
|
|
8299
|
+
target: "kay.agent";
|
|
8300
|
+
slug: "session-artifacts.read";
|
|
8301
|
+
envelope: {
|
|
8302
|
+
kind: "output" | "upload";
|
|
8303
|
+
};
|
|
8304
|
+
} | {
|
|
8305
|
+
target: "kay.agent";
|
|
8306
|
+
slug: "session-artifacts.create";
|
|
8307
|
+
envelope: {
|
|
8308
|
+
kind: "output";
|
|
8309
|
+
};
|
|
8215
8310
|
} | {
|
|
8216
8311
|
target: "kay.app";
|
|
8217
8312
|
slug: "artifacts.read";
|
|
@@ -8457,6 +8552,21 @@ export declare const PluginCapabilityClaimV1: z.ZodDiscriminatedUnion<[z.ZodObje
|
|
|
8457
8552
|
envelope: z.ZodObject<{
|
|
8458
8553
|
source: z.ZodString;
|
|
8459
8554
|
}, z.core.$strict>;
|
|
8555
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
8556
|
+
target: z.ZodLiteral<"kay.agent">;
|
|
8557
|
+
slug: z.ZodLiteral<"session-artifacts.read">;
|
|
8558
|
+
envelope: z.ZodObject<{
|
|
8559
|
+
kind: z.ZodEnum<{
|
|
8560
|
+
output: "output";
|
|
8561
|
+
upload: "upload";
|
|
8562
|
+
}>;
|
|
8563
|
+
}, z.core.$strict>;
|
|
8564
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
8565
|
+
target: z.ZodLiteral<"kay.agent">;
|
|
8566
|
+
slug: z.ZodLiteral<"session-artifacts.create">;
|
|
8567
|
+
envelope: z.ZodObject<{
|
|
8568
|
+
kind: z.ZodLiteral<"output">;
|
|
8569
|
+
}, z.core.$strict>;
|
|
8460
8570
|
}, z.core.$strict>, z.ZodObject<{
|
|
8461
8571
|
target: z.ZodLiteral<"kay.app">;
|
|
8462
8572
|
slug: z.ZodLiteral<"artifacts.read">;
|
|
@@ -8745,6 +8855,21 @@ export declare const PluginCapabilityDecisionV1: z.ZodDiscriminatedUnion<[z.ZodO
|
|
|
8745
8855
|
envelope: z.ZodObject<{
|
|
8746
8856
|
source: z.ZodString;
|
|
8747
8857
|
}, z.core.$strict>;
|
|
8858
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
8859
|
+
target: z.ZodLiteral<"kay.agent">;
|
|
8860
|
+
slug: z.ZodLiteral<"session-artifacts.read">;
|
|
8861
|
+
envelope: z.ZodObject<{
|
|
8862
|
+
kind: z.ZodEnum<{
|
|
8863
|
+
output: "output";
|
|
8864
|
+
upload: "upload";
|
|
8865
|
+
}>;
|
|
8866
|
+
}, z.core.$strict>;
|
|
8867
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
8868
|
+
target: z.ZodLiteral<"kay.agent">;
|
|
8869
|
+
slug: z.ZodLiteral<"session-artifacts.create">;
|
|
8870
|
+
envelope: z.ZodObject<{
|
|
8871
|
+
kind: z.ZodLiteral<"output">;
|
|
8872
|
+
}, z.core.$strict>;
|
|
8748
8873
|
}, z.core.$strict>, z.ZodObject<{
|
|
8749
8874
|
target: z.ZodLiteral<"kay.app">;
|
|
8750
8875
|
slug: z.ZodLiteral<"artifacts.read">;
|
|
@@ -9032,6 +9157,21 @@ export declare const PluginCapabilityDecisionV1: z.ZodDiscriminatedUnion<[z.ZodO
|
|
|
9032
9157
|
envelope: z.ZodObject<{
|
|
9033
9158
|
source: z.ZodString;
|
|
9034
9159
|
}, z.core.$strict>;
|
|
9160
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
9161
|
+
target: z.ZodLiteral<"kay.agent">;
|
|
9162
|
+
slug: z.ZodLiteral<"session-artifacts.read">;
|
|
9163
|
+
envelope: z.ZodObject<{
|
|
9164
|
+
kind: z.ZodEnum<{
|
|
9165
|
+
output: "output";
|
|
9166
|
+
upload: "upload";
|
|
9167
|
+
}>;
|
|
9168
|
+
}, z.core.$strict>;
|
|
9169
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
9170
|
+
target: z.ZodLiteral<"kay.agent">;
|
|
9171
|
+
slug: z.ZodLiteral<"session-artifacts.create">;
|
|
9172
|
+
envelope: z.ZodObject<{
|
|
9173
|
+
kind: z.ZodLiteral<"output">;
|
|
9174
|
+
}, z.core.$strict>;
|
|
9035
9175
|
}, z.core.$strict>, z.ZodObject<{
|
|
9036
9176
|
target: z.ZodLiteral<"kay.app">;
|
|
9037
9177
|
slug: z.ZodLiteral<"artifacts.read">;
|
|
@@ -9353,6 +9493,21 @@ export declare const PluginCapabilityRefusalV1: z.ZodObject<{
|
|
|
9353
9493
|
envelope: z.ZodObject<{
|
|
9354
9494
|
source: z.ZodString;
|
|
9355
9495
|
}, z.core.$strict>;
|
|
9496
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
9497
|
+
target: z.ZodLiteral<"kay.agent">;
|
|
9498
|
+
slug: z.ZodLiteral<"session-artifacts.read">;
|
|
9499
|
+
envelope: z.ZodObject<{
|
|
9500
|
+
kind: z.ZodEnum<{
|
|
9501
|
+
output: "output";
|
|
9502
|
+
upload: "upload";
|
|
9503
|
+
}>;
|
|
9504
|
+
}, z.core.$strict>;
|
|
9505
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
9506
|
+
target: z.ZodLiteral<"kay.agent">;
|
|
9507
|
+
slug: z.ZodLiteral<"session-artifacts.create">;
|
|
9508
|
+
envelope: z.ZodObject<{
|
|
9509
|
+
kind: z.ZodLiteral<"output">;
|
|
9510
|
+
}, z.core.$strict>;
|
|
9356
9511
|
}, z.core.$strict>, z.ZodObject<{
|
|
9357
9512
|
target: z.ZodLiteral<"kay.app">;
|
|
9358
9513
|
slug: z.ZodLiteral<"artifacts.read">;
|
|
@@ -10396,6 +10551,60 @@ export declare const PluginPermissionManifest: z.ZodObject<{
|
|
|
10396
10551
|
|
|
10397
10552
|
export declare type PluginPermissionManifest = z.infer<typeof PluginPermissionManifest>;
|
|
10398
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
|
+
|
|
10399
10608
|
export declare const PluginProvisioningProbe: z.ZodObject<{
|
|
10400
10609
|
url: z.ZodURL;
|
|
10401
10610
|
method: z.ZodOptional<z.ZodEnum<{
|
|
@@ -10997,6 +11206,12 @@ export declare const ResolvedKayAgentTool: z.ZodObject<{
|
|
|
10997
11206
|
displayName: z.ZodOptional<z.ZodString>;
|
|
10998
11207
|
description: z.ZodOptional<z.ZodString>;
|
|
10999
11208
|
parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<authoringCommonSchemas.JsonValue, unknown, z.core.$ZodTypeInternals<authoringCommonSchemas.JsonValue, unknown>>>>;
|
|
11209
|
+
executionMode: z.ZodOptional<z.ZodEnum<{
|
|
11210
|
+
sequential: "sequential";
|
|
11211
|
+
parallel: "parallel";
|
|
11212
|
+
}>>;
|
|
11213
|
+
promptSnippet: z.ZodOptional<z.ZodString>;
|
|
11214
|
+
promptGuidelines: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
11000
11215
|
requiresAuth: z.ZodOptional<z.ZodObject<{
|
|
11001
11216
|
serviceId: z.ZodString;
|
|
11002
11217
|
schemeId: z.ZodOptional<z.ZodString>;
|
|
@@ -11009,6 +11224,8 @@ export declare const ResolvedKayAgentTool: z.ZodObject<{
|
|
|
11009
11224
|
execute: "execute";
|
|
11010
11225
|
}>;
|
|
11011
11226
|
ruleKey: z.ZodOptional<z.ZodString>;
|
|
11227
|
+
scheme: z.ZodOptional<z.ZodString>;
|
|
11228
|
+
resourcePrefix: z.ZodOptional<z.ZodString>;
|
|
11012
11229
|
resourceArgs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
11013
11230
|
}, z.core.$strict>>;
|
|
11014
11231
|
localId: z.ZodString;
|
|
@@ -12434,6 +12651,12 @@ export declare const ResolvedPluginContractV1: z.ZodObject<{
|
|
|
12434
12651
|
displayName: z.ZodOptional<z.ZodString>;
|
|
12435
12652
|
description: z.ZodOptional<z.ZodString>;
|
|
12436
12653
|
parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<authoringCommonSchemas.JsonValue, unknown, z.core.$ZodTypeInternals<authoringCommonSchemas.JsonValue, unknown>>>>;
|
|
12654
|
+
executionMode: z.ZodOptional<z.ZodEnum<{
|
|
12655
|
+
sequential: "sequential";
|
|
12656
|
+
parallel: "parallel";
|
|
12657
|
+
}>>;
|
|
12658
|
+
promptSnippet: z.ZodOptional<z.ZodString>;
|
|
12659
|
+
promptGuidelines: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
12437
12660
|
requiresAuth: z.ZodOptional<z.ZodObject<{
|
|
12438
12661
|
serviceId: z.ZodString;
|
|
12439
12662
|
schemeId: z.ZodOptional<z.ZodString>;
|
|
@@ -12446,6 +12669,8 @@ export declare const ResolvedPluginContractV1: z.ZodObject<{
|
|
|
12446
12669
|
execute: "execute";
|
|
12447
12670
|
}>;
|
|
12448
12671
|
ruleKey: z.ZodOptional<z.ZodString>;
|
|
12672
|
+
scheme: z.ZodOptional<z.ZodString>;
|
|
12673
|
+
resourcePrefix: z.ZodOptional<z.ZodString>;
|
|
12449
12674
|
resourceArgs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
12450
12675
|
}, z.core.$strict>>;
|
|
12451
12676
|
localId: z.ZodString;
|
|
@@ -14282,6 +14507,8 @@ export declare const ToolPermission: z.ZodObject<{
|
|
|
14282
14507
|
execute: "execute";
|
|
14283
14508
|
}>;
|
|
14284
14509
|
ruleKey: z.ZodOptional<z.ZodString>;
|
|
14510
|
+
scheme: z.ZodOptional<z.ZodString>;
|
|
14511
|
+
resourcePrefix: z.ZodOptional<z.ZodString>;
|
|
14285
14512
|
resourceArgs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
14286
14513
|
}, z.core.$strict>;
|
|
14287
14514
|
|
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",
|
|
@@ -1750,6 +1753,8 @@ var PLUGIN_CAPABILITY_SLUGS = [
|
|
|
1750
1753
|
"app-data.register",
|
|
1751
1754
|
"knowledge-source.register",
|
|
1752
1755
|
"artifacts.read",
|
|
1756
|
+
"session-artifacts.read",
|
|
1757
|
+
"session-artifacts.create",
|
|
1753
1758
|
"account.assert",
|
|
1754
1759
|
"account.update",
|
|
1755
1760
|
"agents.permissions",
|
|
@@ -2032,6 +2037,16 @@ function createAuthoritySchemas(canonical) {
|
|
|
2032
2037
|
/** The declared `contributes.dataSources` localId. */
|
|
2033
2038
|
envelope: z10.strictObject({ source: NonEmptyString3 })
|
|
2034
2039
|
}),
|
|
2040
|
+
z10.strictObject({
|
|
2041
|
+
target: z10.literal("kay.agent"),
|
|
2042
|
+
slug: z10.literal("session-artifacts.read"),
|
|
2043
|
+
envelope: z10.strictObject({ kind: z10.enum(["upload", "output"]) })
|
|
2044
|
+
}),
|
|
2045
|
+
z10.strictObject({
|
|
2046
|
+
target: z10.literal("kay.agent"),
|
|
2047
|
+
slug: z10.literal("session-artifacts.create"),
|
|
2048
|
+
envelope: z10.strictObject({ kind: z10.literal("output") })
|
|
2049
|
+
}),
|
|
2035
2050
|
z10.strictObject({
|
|
2036
2051
|
target: z10.literal("kay.app"),
|
|
2037
2052
|
slug: z10.literal("artifacts.read"),
|
|
@@ -2261,8 +2276,10 @@ function sameClaim(a, b) {
|
|
|
2261
2276
|
return b.slug === "interaction.surface" && a.envelope.surface === b.envelope.surface;
|
|
2262
2277
|
case "dynamic-context.register":
|
|
2263
2278
|
return b.slug === "dynamic-context.register" && a.envelope.contributor === b.envelope.contributor;
|
|
2279
|
+
case "session-artifacts.read":
|
|
2280
|
+
case "session-artifacts.create":
|
|
2264
2281
|
case "artifacts.read":
|
|
2265
|
-
return b.slug ===
|
|
2282
|
+
return b.slug === a.slug && a.envelope.kind === b.envelope.kind;
|
|
2266
2283
|
case "knowledge-source.register":
|
|
2267
2284
|
return b.slug === "knowledge-source.register" && a.envelope.source === b.envelope.source;
|
|
2268
2285
|
case "app-data.register":
|
|
@@ -2352,8 +2369,10 @@ function envelopePairs(a, b) {
|
|
|
2352
2369
|
return b.slug === "interaction.surface" ? [[a.envelope.surface, b.envelope.surface]] : [];
|
|
2353
2370
|
case "dynamic-context.register":
|
|
2354
2371
|
return b.slug === "dynamic-context.register" ? [[a.envelope.contributor, b.envelope.contributor]] : [];
|
|
2372
|
+
case "session-artifacts.read":
|
|
2373
|
+
case "session-artifacts.create":
|
|
2355
2374
|
case "artifacts.read":
|
|
2356
|
-
return b.slug ===
|
|
2375
|
+
return b.slug === a.slug ? [[a.envelope.kind, b.envelope.kind]] : [];
|
|
2357
2376
|
case "knowledge-source.register":
|
|
2358
2377
|
return b.slug === "knowledge-source.register" ? [[a.envelope.source, b.envelope.source]] : [];
|
|
2359
2378
|
case "app-data.register":
|
|
@@ -2737,6 +2756,7 @@ __export(contributions_exports, {
|
|
|
2737
2756
|
PluginContributionKind: () => PluginContributionKind,
|
|
2738
2757
|
PluginEventDefinitionContribution: () => PluginEventDefinitionContribution,
|
|
2739
2758
|
PluginNotificationRuleContribution: () => PluginNotificationRuleContribution,
|
|
2759
|
+
PluginProductEventContribution: () => PluginProductEventContribution,
|
|
2740
2760
|
PluginSkillSourceDeclaration: () => PluginSkillSourceDeclaration,
|
|
2741
2761
|
ReferenceOpenBehavior: () => ReferenceOpenBehavior,
|
|
2742
2762
|
ReferencePresentationAddress: () => ReferencePresentationAddress,
|
|
@@ -3227,12 +3247,17 @@ function createContributionsSchemas(canonical) {
|
|
|
3227
3247
|
const ToolPermission2 = z12.strictObject({
|
|
3228
3248
|
kind: z12.enum(["read", "mutate", "destructive", "execute"]),
|
|
3229
3249
|
ruleKey: NonEmptyString3.optional(),
|
|
3250
|
+
scheme: NonEmptyString3.optional(),
|
|
3251
|
+
resourcePrefix: z12.string().max(256).optional(),
|
|
3230
3252
|
// Arguments whose string values name the resources a call touches.
|
|
3231
3253
|
resourceArgs: z12.array(NonEmptyString3).min(1).optional()
|
|
3232
3254
|
});
|
|
3233
3255
|
const AgentToolContribution2 = z12.strictObject({
|
|
3234
3256
|
...ToolContribution2.shape,
|
|
3235
3257
|
parameters: JsonSchema.optional(),
|
|
3258
|
+
executionMode: z12.enum(["sequential", "parallel"]).optional(),
|
|
3259
|
+
promptSnippet: NonEmptyString3.optional(),
|
|
3260
|
+
promptGuidelines: z12.array(NonEmptyString3).optional(),
|
|
3236
3261
|
// A local ref names an auth service declared in this manifest; a dotted ref names another
|
|
3237
3262
|
// plugin's service, as `UriModuleContribution.authService` does.
|
|
3238
3263
|
authService: AuthServiceReference2.optional(),
|
|
@@ -3721,6 +3746,14 @@ function createContributionsSchemas(canonical) {
|
|
|
3721
3746
|
where: z12.array(JsonObject).optional(),
|
|
3722
3747
|
rule: JsonObject
|
|
3723
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
|
+
]);
|
|
3724
3757
|
const UiEventSubscriptionContribution2 = z12.strictObject({
|
|
3725
3758
|
localId: LocalContributionId2,
|
|
3726
3759
|
event: NonEmptyString3
|
|
@@ -4155,6 +4188,7 @@ function createContributionsSchemas(canonical) {
|
|
|
4155
4188
|
ContextContributorContribution: ContextContributorContribution2,
|
|
4156
4189
|
PluginEventDefinitionContribution: PluginEventDefinitionContribution2,
|
|
4157
4190
|
PluginNotificationRuleContribution: PluginNotificationRuleContribution2,
|
|
4191
|
+
PluginProductEventContribution: PluginProductEventContribution2,
|
|
4158
4192
|
UiEventSubscriptionContribution: UiEventSubscriptionContribution2,
|
|
4159
4193
|
DeviceDelegationContribution: DeviceDelegationContribution2,
|
|
4160
4194
|
SessionReaderContribution: SessionReaderContribution2,
|
|
@@ -4184,7 +4218,7 @@ function createContributionsSchemas(canonical) {
|
|
|
4184
4218
|
PluginContributionKind: PluginContributionKind2
|
|
4185
4219
|
};
|
|
4186
4220
|
}
|
|
4187
|
-
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);
|
|
4188
4222
|
var canonicalContributionSchemas = createContributionsSchemas(true);
|
|
4189
4223
|
|
|
4190
4224
|
// packages/plugin-protocol/dist/icon-shape.js
|
|
@@ -4258,7 +4292,7 @@ var KAY_UI_NATIVE_EVENT_SUBSCRIPTIONS = [
|
|
|
4258
4292
|
var KAY_UI_NATIVE_EVENT_ALLOWLIST = new Set(KAY_UI_NATIVE_EVENT_SUBSCRIPTIONS);
|
|
4259
4293
|
var RETIRED_COMPATIBILITY_KEYS = ["policy"];
|
|
4260
4294
|
function createManifestSchemas(canonical) {
|
|
4261
|
-
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;
|
|
4262
4296
|
const { HttpsUrl: HttpsUrl2, LocalContributionId: LocalContributionId2, NonEmptyString: NonEmptyString3, PackageAssetPath: PackageAssetPath2, PluginId: PluginId2, PluginNamespace: PluginNamespace2, RegistrableDomain: RegistrableDomain2, SignedInStatusCode: SignedInStatusCode2, TargetEntrypoint: TargetEntrypoint2 } = canonical ? canonicalCommonSchemas : common_exports;
|
|
4263
4297
|
const { PluginPermissionManifest: PluginPermissionManifest2 } = canonical ? canonicalPermissionSchemas : permissions_exports;
|
|
4264
4298
|
const KayAgentTargetManifest2 = z13.strictObject({
|
|
@@ -4356,6 +4390,7 @@ function createManifestSchemas(canonical) {
|
|
|
4356
4390
|
// Default notification rules over this plugin's own `eventDefinitions`; seeded by the host
|
|
4357
4391
|
// (see `PluginNotificationRuleContribution`).
|
|
4358
4392
|
notificationRules: z13.array(PluginNotificationRuleContribution2).optional(),
|
|
4393
|
+
productEvents: z13.array(PluginProductEventContribution2).optional(),
|
|
4359
4394
|
eventSubscriptions: z13.array(AppEventSubscription2).optional(),
|
|
4360
4395
|
deviceDelegations: z13.array(DeviceDelegationContribution2).optional(),
|
|
4361
4396
|
sessionReaders: z13.array(SessionReaderContribution2).optional(),
|
|
@@ -5804,6 +5839,9 @@ function createResolvedContractSchemas(canonical) {
|
|
|
5804
5839
|
displayName: NonEmptyString3.optional(),
|
|
5805
5840
|
description: NonEmptyString3.optional(),
|
|
5806
5841
|
parameters: JsonSchema.optional(),
|
|
5842
|
+
executionMode: z14.enum(["sequential", "parallel"]).optional(),
|
|
5843
|
+
promptSnippet: NonEmptyString3.optional(),
|
|
5844
|
+
promptGuidelines: z14.array(NonEmptyString3).optional(),
|
|
5807
5845
|
requiresAuth: z14.strictObject({
|
|
5808
5846
|
serviceId: GlobalContributionId2,
|
|
5809
5847
|
schemeId: GlobalContributionId2.optional()
|
|
@@ -6456,6 +6494,9 @@ function resolveKayPluginContractV1(manifest) {
|
|
|
6456
6494
|
...tool.displayName === void 0 ? {} : { displayName: tool.displayName },
|
|
6457
6495
|
...tool.description === void 0 ? {} : { description: tool.description },
|
|
6458
6496
|
...tool.parameters === void 0 ? {} : { parameters: tool.parameters },
|
|
6497
|
+
...tool.executionMode === void 0 ? {} : { executionMode: tool.executionMode },
|
|
6498
|
+
...tool.promptSnippet === void 0 ? {} : { promptSnippet: tool.promptSnippet },
|
|
6499
|
+
...tool.promptGuidelines === void 0 ? {} : { promptGuidelines: tool.promptGuidelines },
|
|
6459
6500
|
...tool.authService === void 0 ? {} : {
|
|
6460
6501
|
requiresAuth: {
|
|
6461
6502
|
serviceId: isQualifiedAuthServiceRef(tool.authService) ? tool.authService : resolveGlobalContributionId(namespace, tool.authService),
|
|
@@ -7277,10 +7318,47 @@ var WhiteboardTypeInfo = z19.strictObject({
|
|
|
7277
7318
|
}).optional()
|
|
7278
7319
|
});
|
|
7279
7320
|
|
|
7280
|
-
// packages/plugin-protocol/dist/
|
|
7321
|
+
// packages/plugin-protocol/dist/product-events.js
|
|
7281
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";
|
|
7282
7360
|
var ARTIFACT_OUTPUT_PAGE_MAX = 200;
|
|
7283
|
-
var Segment =
|
|
7361
|
+
var Segment = z21.string().min(1).max(1024).refine((value) => !/[^A-Za-z0-9._-]/.test(value)).refine((value) => value !== "." && value !== "..");
|
|
7284
7362
|
function parseArtifactOutputUri(uri) {
|
|
7285
7363
|
const match = /^output:\/\/([^/]+)\/([^/]+)$/.exec(uri);
|
|
7286
7364
|
if (match === null || !Segment.safeParse(match[1]).success || !Segment.safeParse(match[2]).success)
|
|
@@ -7290,12 +7368,12 @@ function parseArtifactOutputUri(uri) {
|
|
|
7290
7368
|
function isCanonicalArtifactOutputUri(uri) {
|
|
7291
7369
|
return parseArtifactOutputUri(uri) !== void 0;
|
|
7292
7370
|
}
|
|
7293
|
-
var ArtifactOutputUri =
|
|
7294
|
-
var ArtifactOutputChange =
|
|
7295
|
-
|
|
7296
|
-
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)
|
|
7297
7375
|
}),
|
|
7298
|
-
|
|
7376
|
+
z21.strictObject({ sessionId: Segment })
|
|
7299
7377
|
]);
|
|
7300
7378
|
|
|
7301
7379
|
// packages/plugin-protocol/dist/credential-text.js
|
|
@@ -7338,25 +7416,25 @@ function isCredentialShapedText(value) {
|
|
|
7338
7416
|
}
|
|
7339
7417
|
|
|
7340
7418
|
// packages/plugin-protocol/dist/ui-module-bundle.js
|
|
7341
|
-
import { z as
|
|
7419
|
+
import { z as z22 } from "zod";
|
|
7342
7420
|
var KAY_UI_MODULE_BUNDLE_PROTOCOL = "kay.ui.module-bundle.v1";
|
|
7343
7421
|
var KAY_UI_MODULE_FILE_MAX_BYTES = 8 * 1024 * 1024;
|
|
7344
7422
|
var KAY_UI_MODULE_BUNDLE_MAX_BYTES = 32 * 1024 * 1024;
|
|
7345
7423
|
var KAY_UI_MODULE_BUNDLE_MAX_FILES = 256;
|
|
7346
|
-
var OutputPath =
|
|
7424
|
+
var OutputPath = z22.string().min(1).max(1024).refine((value) => {
|
|
7347
7425
|
const parsed = KayUiBundleIndexV1.shape.entryPath.safeParse(value);
|
|
7348
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.
|
|
7349
7427
|
!/[\u0000-\u001f?#:%]/.test(value);
|
|
7350
7428
|
}, { message: "bundle path must contain only unambiguous relative segments" });
|
|
7351
|
-
var Sha256 =
|
|
7352
|
-
var KayUiModuleBundleIndexV1 =
|
|
7353
|
-
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),
|
|
7354
7432
|
entryPath: OutputPath,
|
|
7355
|
-
stylePaths:
|
|
7356
|
-
files:
|
|
7433
|
+
stylePaths: z22.array(OutputPath).max(KAY_UI_MODULE_BUNDLE_MAX_FILES),
|
|
7434
|
+
files: z22.array(z22.strictObject({
|
|
7357
7435
|
path: OutputPath,
|
|
7358
|
-
mediaType:
|
|
7359
|
-
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),
|
|
7360
7438
|
sha256: Sha256
|
|
7361
7439
|
})).min(1).max(KAY_UI_MODULE_BUNDLE_MAX_FILES)
|
|
7362
7440
|
}).superRefine((index, ctx) => {
|
|
@@ -7386,9 +7464,9 @@ var KayUiModuleBundleIndexV1 = z21.strictObject({
|
|
|
7386
7464
|
message: "bundle exceeds byte cap"
|
|
7387
7465
|
});
|
|
7388
7466
|
});
|
|
7389
|
-
var KayUiModuleBundleReference =
|
|
7467
|
+
var KayUiModuleBundleReference = z22.strictObject({
|
|
7390
7468
|
generationId: Sha256,
|
|
7391
|
-
revision:
|
|
7469
|
+
revision: z22.string().min(1).max(4096).refine((value) => value.trim() === value),
|
|
7392
7470
|
index: KayUiModuleBundleIndexV1
|
|
7393
7471
|
});
|
|
7394
7472
|
export {
|
|
@@ -7510,6 +7588,7 @@ export {
|
|
|
7510
7588
|
PLUGIN_EVENT_REFUSED_ERROR_NAME,
|
|
7511
7589
|
PLUGIN_ICON_SHAPE_ATTRIBUTE,
|
|
7512
7590
|
PLUGIN_NOTIFICATION_RULE_HOST_KEYS,
|
|
7591
|
+
PLUGIN_PRODUCT_EVENT_NAME_PATTERN,
|
|
7513
7592
|
PLUGIN_SIGNAL_KINDS,
|
|
7514
7593
|
PLUGIN_SIGNAL_LABELS_MAX,
|
|
7515
7594
|
PLUGIN_SIGNAL_LABEL_MAX,
|
|
@@ -7549,6 +7628,8 @@ export {
|
|
|
7549
7628
|
PluginNotificationRuleContribution,
|
|
7550
7629
|
PluginOAuthClientSupplier,
|
|
7551
7630
|
PluginPermissionManifest,
|
|
7631
|
+
PluginProductEventContribution,
|
|
7632
|
+
PluginProductEventField,
|
|
7552
7633
|
PluginProvisioningProbe,
|
|
7553
7634
|
PluginProvisioningRequirement,
|
|
7554
7635
|
PluginSignal,
|
|
@@ -7685,6 +7766,7 @@ export {
|
|
|
7685
7766
|
isCompatible,
|
|
7686
7767
|
isCredentialShapedText,
|
|
7687
7768
|
isKayPluginCompatibilityRefusal,
|
|
7769
|
+
isPluginProductEventName,
|
|
7688
7770
|
isPrivateCapabilityClaim,
|
|
7689
7771
|
isQualifiedAuthSchemeRef,
|
|
7690
7772
|
isQualifiedAuthServiceRef,
|
package/package.json
CHANGED