@yaklabs-ai/plugin-protocol 0.49.0 → 0.51.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 +85 -2
- package/dist/index.js +36 -11
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -3230,6 +3230,12 @@ declare const canonicalContributionSchemas: {
|
|
|
3230
3230
|
panel: z.ZodOptional<z.ZodObject<{
|
|
3231
3231
|
body: z.ZodString;
|
|
3232
3232
|
}, z.core.$strict>>;
|
|
3233
|
+
featureFlagVariant: z.ZodOptional<z.ZodObject<{
|
|
3234
|
+
flag: z.ZodString;
|
|
3235
|
+
title: z.ZodOptional<z.ZodString>;
|
|
3236
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
3237
|
+
panel: z.ZodOptional<z.ZodLiteral<false>>;
|
|
3238
|
+
}, z.core.$strict>>;
|
|
3233
3239
|
}, z.core.$strict>;
|
|
3234
3240
|
UiToastPreviewContribution: z.ZodObject<{
|
|
3235
3241
|
rule: z.ZodString;
|
|
@@ -4741,8 +4747,13 @@ export declare const KAY_PLUGIN_PROTOCOL_VERSION: "kay.plugin.v1";
|
|
|
4741
4747
|
* types; callers use the resource surface instead. Previously admitted SDK contracts are no
|
|
4742
4748
|
* longer served because they included app.memory on notebook hosts. No compatibility alias
|
|
4743
4749
|
* restores it; callers migrate and declare ^0.49.0.
|
|
4750
|
+
*
|
|
4751
|
+
* 0.50.0 adds explicit cross-plugin endpoint calls on both backend targets. The URI-only 0.49.0
|
|
4752
|
+
* contract remains served.
|
|
4753
|
+
*
|
|
4754
|
+
* 0.51.0 adds flag-dependent title, icon and panel presence on rail entries.
|
|
4744
4755
|
*/
|
|
4745
|
-
export declare const KAY_PLUGIN_SDK_VERSION: "0.
|
|
4756
|
+
export declare const KAY_PLUGIN_SDK_VERSION: "0.51.0";
|
|
4746
4757
|
|
|
4747
4758
|
export declare const KAY_PLUGIN_TARGET_NAMES: readonly ["kay.agent", "kay.app", "kay.ui"];
|
|
4748
4759
|
|
|
@@ -6718,6 +6729,12 @@ export declare const KayPluginManifestV1: z.ZodObject<{
|
|
|
6718
6729
|
panel: z.ZodOptional<z.ZodObject<{
|
|
6719
6730
|
body: z.ZodString;
|
|
6720
6731
|
}, z.core.$strict>>;
|
|
6732
|
+
featureFlagVariant: z.ZodOptional<z.ZodObject<{
|
|
6733
|
+
flag: z.ZodString;
|
|
6734
|
+
title: z.ZodOptional<z.ZodString>;
|
|
6735
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
6736
|
+
panel: z.ZodOptional<z.ZodLiteral<false>>;
|
|
6737
|
+
}, z.core.$strict>>;
|
|
6721
6738
|
}, z.core.$strict>>>;
|
|
6722
6739
|
toastPreviews: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
6723
6740
|
rule: z.ZodString;
|
|
@@ -7899,6 +7916,12 @@ export declare const KayUiTargetManifest: z.ZodObject<{
|
|
|
7899
7916
|
panel: z.ZodOptional<z.ZodObject<{
|
|
7900
7917
|
body: z.ZodString;
|
|
7901
7918
|
}, z.core.$strict>>;
|
|
7919
|
+
featureFlagVariant: z.ZodOptional<z.ZodObject<{
|
|
7920
|
+
flag: z.ZodString;
|
|
7921
|
+
title: z.ZodOptional<z.ZodString>;
|
|
7922
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
7923
|
+
panel: z.ZodOptional<z.ZodLiteral<false>>;
|
|
7924
|
+
}, z.core.$strict>>;
|
|
7902
7925
|
}, z.core.$strict>>>;
|
|
7903
7926
|
toastPreviews: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
7904
7927
|
rule: z.ZodString;
|
|
@@ -8127,7 +8150,7 @@ export declare function parseSemver(value: string): ParsedSemver | undefined;
|
|
|
8127
8150
|
export declare function parseWhere(source: string, keyTypes?: WhereKeyTypes): WhereParseResult;
|
|
8128
8151
|
|
|
8129
8152
|
/** Every capability slug {@link PluginCapabilityClaimV1} can express, for exhaustive table checks. */
|
|
8130
|
-
export declare const PLUGIN_CAPABILITY_SLUGS: readonly ["sessions.run", "network.connect", "web-session.request", "web-session.download", "process.spawn", "sessions.read", "signals.read", "uri.call", "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"];
|
|
8153
|
+
export declare const PLUGIN_CAPABILITY_SLUGS: readonly ["sessions.run", "network.connect", "web-session.request", "web-session.download", "process.spawn", "sessions.read", "signals.read", "uri.call", "endpoints.invoke", "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"];
|
|
8131
8154
|
|
|
8132
8155
|
/** Diagnostic messages carry plugin-controlled text (parse errors, module errors); bound it so a
|
|
8133
8156
|
* hostile or accidental multi-megabyte error can never blow up a log line or a render surface. */
|
|
@@ -8692,6 +8715,13 @@ export declare const PluginCapabilityClaimInputV1: z.ZodCustom<{
|
|
|
8692
8715
|
scheme: string;
|
|
8693
8716
|
verb: "search" | "list" | "read" | "write" | "edit" | "delete";
|
|
8694
8717
|
};
|
|
8718
|
+
} | {
|
|
8719
|
+
target: "kay.agent" | "kay.app";
|
|
8720
|
+
slug: "endpoints.invoke";
|
|
8721
|
+
envelope: {
|
|
8722
|
+
pluginId: string;
|
|
8723
|
+
endpointId: string;
|
|
8724
|
+
};
|
|
8695
8725
|
} | {
|
|
8696
8726
|
target: "kay.app";
|
|
8697
8727
|
slug: "skills.read";
|
|
@@ -8952,6 +8982,13 @@ export declare const PluginCapabilityClaimInputV1: z.ZodCustom<{
|
|
|
8952
8982
|
scheme: string;
|
|
8953
8983
|
verb: "search" | "list" | "read" | "write" | "edit" | "delete";
|
|
8954
8984
|
};
|
|
8985
|
+
} | {
|
|
8986
|
+
target: "kay.agent" | "kay.app";
|
|
8987
|
+
slug: "endpoints.invoke";
|
|
8988
|
+
envelope: {
|
|
8989
|
+
pluginId: string;
|
|
8990
|
+
endpointId: string;
|
|
8991
|
+
};
|
|
8955
8992
|
} | {
|
|
8956
8993
|
target: "kay.app";
|
|
8957
8994
|
slug: "skills.read";
|
|
@@ -9218,6 +9255,16 @@ export declare const PluginCapabilityClaimV1: z.ZodDiscriminatedUnion<[z.ZodObje
|
|
|
9218
9255
|
delete: "delete";
|
|
9219
9256
|
}>;
|
|
9220
9257
|
}, z.core.$strict>;
|
|
9258
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
9259
|
+
target: z.ZodEnum<{
|
|
9260
|
+
"kay.agent": "kay.agent";
|
|
9261
|
+
"kay.app": "kay.app";
|
|
9262
|
+
}>;
|
|
9263
|
+
slug: z.ZodLiteral<"endpoints.invoke">;
|
|
9264
|
+
envelope: z.ZodObject<{
|
|
9265
|
+
pluginId: z.ZodString;
|
|
9266
|
+
endpointId: z.ZodString;
|
|
9267
|
+
}, z.core.$strict>;
|
|
9221
9268
|
}, z.core.$strict>, z.ZodObject<{
|
|
9222
9269
|
target: z.ZodLiteral<"kay.app">;
|
|
9223
9270
|
slug: z.ZodLiteral<"skills.read">;
|
|
@@ -9530,6 +9577,16 @@ export declare const PluginCapabilityDecisionV1: z.ZodDiscriminatedUnion<[z.ZodO
|
|
|
9530
9577
|
delete: "delete";
|
|
9531
9578
|
}>;
|
|
9532
9579
|
}, z.core.$strict>;
|
|
9580
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
9581
|
+
target: z.ZodEnum<{
|
|
9582
|
+
"kay.agent": "kay.agent";
|
|
9583
|
+
"kay.app": "kay.app";
|
|
9584
|
+
}>;
|
|
9585
|
+
slug: z.ZodLiteral<"endpoints.invoke">;
|
|
9586
|
+
envelope: z.ZodObject<{
|
|
9587
|
+
pluginId: z.ZodString;
|
|
9588
|
+
endpointId: z.ZodString;
|
|
9589
|
+
}, z.core.$strict>;
|
|
9533
9590
|
}, z.core.$strict>, z.ZodObject<{
|
|
9534
9591
|
target: z.ZodLiteral<"kay.app">;
|
|
9535
9592
|
slug: z.ZodLiteral<"skills.read">;
|
|
@@ -9841,6 +9898,16 @@ export declare const PluginCapabilityDecisionV1: z.ZodDiscriminatedUnion<[z.ZodO
|
|
|
9841
9898
|
delete: "delete";
|
|
9842
9899
|
}>;
|
|
9843
9900
|
}, z.core.$strict>;
|
|
9901
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
9902
|
+
target: z.ZodEnum<{
|
|
9903
|
+
"kay.agent": "kay.agent";
|
|
9904
|
+
"kay.app": "kay.app";
|
|
9905
|
+
}>;
|
|
9906
|
+
slug: z.ZodLiteral<"endpoints.invoke">;
|
|
9907
|
+
envelope: z.ZodObject<{
|
|
9908
|
+
pluginId: z.ZodString;
|
|
9909
|
+
endpointId: z.ZodString;
|
|
9910
|
+
}, z.core.$strict>;
|
|
9844
9911
|
}, z.core.$strict>, z.ZodObject<{
|
|
9845
9912
|
target: z.ZodLiteral<"kay.app">;
|
|
9846
9913
|
slug: z.ZodLiteral<"skills.read">;
|
|
@@ -10186,6 +10253,16 @@ export declare const PluginCapabilityRefusalV1: z.ZodObject<{
|
|
|
10186
10253
|
delete: "delete";
|
|
10187
10254
|
}>;
|
|
10188
10255
|
}, z.core.$strict>;
|
|
10256
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
10257
|
+
target: z.ZodEnum<{
|
|
10258
|
+
"kay.agent": "kay.agent";
|
|
10259
|
+
"kay.app": "kay.app";
|
|
10260
|
+
}>;
|
|
10261
|
+
slug: z.ZodLiteral<"endpoints.invoke">;
|
|
10262
|
+
envelope: z.ZodObject<{
|
|
10263
|
+
pluginId: z.ZodString;
|
|
10264
|
+
endpointId: z.ZodString;
|
|
10265
|
+
}, z.core.$strict>;
|
|
10189
10266
|
}, z.core.$strict>, z.ZodObject<{
|
|
10190
10267
|
target: z.ZodLiteral<"kay.app">;
|
|
10191
10268
|
slug: z.ZodLiteral<"skills.read">;
|
|
@@ -16015,6 +16092,12 @@ export declare const UiRailEntryContribution: z.ZodObject<{
|
|
|
16015
16092
|
panel: z.ZodOptional<z.ZodObject<{
|
|
16016
16093
|
body: z.ZodString;
|
|
16017
16094
|
}, z.core.$strict>>;
|
|
16095
|
+
featureFlagVariant: z.ZodOptional<z.ZodObject<{
|
|
16096
|
+
flag: z.ZodString;
|
|
16097
|
+
title: z.ZodOptional<z.ZodString>;
|
|
16098
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
16099
|
+
panel: z.ZodOptional<z.ZodLiteral<false>>;
|
|
16100
|
+
}, z.core.$strict>>;
|
|
16018
16101
|
}, z.core.$strict>;
|
|
16019
16102
|
|
|
16020
16103
|
export declare type UiRailEntryContribution = z.infer<typeof UiRailEntryContribution>;
|
package/dist/index.js
CHANGED
|
@@ -30,6 +30,12 @@ function declaredUiIconPaths(manifest) {
|
|
|
30
30
|
const contributes = manifest.targets?.kay?.ui?.contributes;
|
|
31
31
|
return [
|
|
32
32
|
...(contributes?.railEntries ?? []).flatMap((entry) => entry.icon === void 0 ? [] : [{ label: `kay.ui rail entry '${entry.id}' icon`, path: entry.icon }]),
|
|
33
|
+
...(contributes?.railEntries ?? []).flatMap((entry) => entry.featureFlagVariant?.icon === void 0 ? [] : [
|
|
34
|
+
{
|
|
35
|
+
label: "kay.ui rail variant icon",
|
|
36
|
+
path: entry.featureFlagVariant.icon
|
|
37
|
+
}
|
|
38
|
+
]),
|
|
33
39
|
...(contributes?.pages ?? []).flatMap((page) => page.icon === void 0 ? [] : [{ label: `kay.ui page '${page.id}' icon`, path: page.icon }]),
|
|
34
40
|
...(contributes?.commands ?? []).flatMap((command) => command.icon === void 0 ? [] : [
|
|
35
41
|
{
|
|
@@ -260,8 +266,11 @@ var JsonSchema = z4.record(z4.string(), JsonValue);
|
|
|
260
266
|
var KAY_PLUGIN_MANIFEST_SIZE_CAP_BYTES = 1024 * 1024;
|
|
261
267
|
var KAY_PLUGIN_PROTOCOL_VERSION = "kay.plugin.v1";
|
|
262
268
|
var KAY_PLUGIN_PROTOCOL_PACKAGE_NAME = "@bonsai/plugin-protocol";
|
|
263
|
-
var KAY_PLUGIN_SDK_VERSION = "0.
|
|
264
|
-
var KAY_PLUGIN_COMPATIBLE_SDK_VERSIONS = [
|
|
269
|
+
var KAY_PLUGIN_SDK_VERSION = "0.51.0";
|
|
270
|
+
var KAY_PLUGIN_COMPATIBLE_SDK_VERSIONS = [
|
|
271
|
+
"0.50.0",
|
|
272
|
+
"0.49.0"
|
|
273
|
+
];
|
|
265
274
|
var KAY_PLUGIN_TARGET_NAMES = [
|
|
266
275
|
"kay.agent",
|
|
267
276
|
"kay.app",
|
|
@@ -1741,6 +1750,7 @@ var PLUGIN_CAPABILITY_SLUGS = [
|
|
|
1741
1750
|
"sessions.read",
|
|
1742
1751
|
"signals.read",
|
|
1743
1752
|
"uri.call",
|
|
1753
|
+
"endpoints.invoke",
|
|
1744
1754
|
"skills.read",
|
|
1745
1755
|
"skills.write",
|
|
1746
1756
|
"skills.share",
|
|
@@ -1806,7 +1816,7 @@ var AGENT_PERMISSION_RULE_FIELDS = [
|
|
|
1806
1816
|
"mode"
|
|
1807
1817
|
];
|
|
1808
1818
|
function createAuthoritySchemas(canonical) {
|
|
1809
|
-
const { ArtifactGenerationId: ArtifactGenerationId2, NonEmptyString: NonEmptyString3, UriScheme: UriScheme2 } = canonical ? canonicalCommonSchemas : common_exports;
|
|
1819
|
+
const { ArtifactGenerationId: ArtifactGenerationId2, NonEmptyString: NonEmptyString3, UriScheme: UriScheme2, PluginId: PluginId2, LocalContributionId: LocalContributionId2 } = canonical ? canonicalCommonSchemas : common_exports;
|
|
1810
1820
|
const { PluginAgentDefinitionPermissionRule: PluginAgentDefinitionPermissionRule2 } = canonical ? canonicalPermissionSchemas : permissions_exports;
|
|
1811
1821
|
const WhiteboardCapabilityScope2 = z10.enum(["own-types", "all-types"]);
|
|
1812
1822
|
const WhiteboardCapabilityOperation2 = z10.enum([
|
|
@@ -1904,6 +1914,14 @@ function createAuthoritySchemas(canonical) {
|
|
|
1904
1914
|
verb: z10.enum(["read", "list", "search", "write", "edit", "delete"])
|
|
1905
1915
|
})
|
|
1906
1916
|
}),
|
|
1917
|
+
z10.strictObject({
|
|
1918
|
+
target: z10.enum(["kay.agent", "kay.app"]),
|
|
1919
|
+
slug: z10.literal("endpoints.invoke"),
|
|
1920
|
+
envelope: z10.strictObject({
|
|
1921
|
+
pluginId: PluginId2,
|
|
1922
|
+
endpointId: LocalContributionId2
|
|
1923
|
+
})
|
|
1924
|
+
}),
|
|
1907
1925
|
z10.strictObject({
|
|
1908
1926
|
// Read every managed skill and its history: identity, versions, revisions, changes against
|
|
1909
1927
|
// the source, past versions, suggestions. Never a write. An empty envelope because the
|
|
@@ -2274,6 +2292,8 @@ function sameClaim(a, b) {
|
|
|
2274
2292
|
return true;
|
|
2275
2293
|
case "uri.call":
|
|
2276
2294
|
return b.slug === "uri.call" && a.envelope.scheme === b.envelope.scheme && a.envelope.verb === b.envelope.verb;
|
|
2295
|
+
case "endpoints.invoke":
|
|
2296
|
+
return b.slug === "endpoints.invoke" && a.envelope.pluginId === b.envelope.pluginId && a.envelope.endpointId === b.envelope.endpointId;
|
|
2277
2297
|
case "network.connect":
|
|
2278
2298
|
return b.slug === "network.connect" && a.envelope.connect === b.envelope.connect;
|
|
2279
2299
|
case "web-session.request":
|
|
@@ -2364,6 +2384,11 @@ function envelopePairs(a, b) {
|
|
|
2364
2384
|
[a.envelope.scheme, b.envelope.scheme],
|
|
2365
2385
|
[a.envelope.verb, b.envelope.verb]
|
|
2366
2386
|
] : [];
|
|
2387
|
+
case "endpoints.invoke":
|
|
2388
|
+
return b.slug === "endpoints.invoke" ? [
|
|
2389
|
+
[a.envelope.pluginId, b.envelope.pluginId],
|
|
2390
|
+
[a.envelope.endpointId, b.envelope.endpointId]
|
|
2391
|
+
] : [];
|
|
2367
2392
|
case "network.connect":
|
|
2368
2393
|
return b.slug === "network.connect" ? [[a.envelope.connect, b.envelope.connect]] : [];
|
|
2369
2394
|
case "web-session.request":
|
|
@@ -4236,6 +4261,7 @@ function createContributionsSchemas(canonical) {
|
|
|
4236
4261
|
// Draws Bonsai's markdown document view in the app's page (`BonsaiMarkdownDocumentView`).
|
|
4237
4262
|
// It reads and saves nothing: the app supplies the text and keeps the edits.
|
|
4238
4263
|
"markdown.document-view",
|
|
4264
|
+
"models.complete",
|
|
4239
4265
|
// Draws links the host resolves and opens (`BonsaiReferencePill`, `BonsaiReferenceRow`,
|
|
4240
4266
|
// `BonsaiReferenceMarkdown`). A person's click on one can open a session or another plugin's page.
|
|
4241
4267
|
"references.open",
|
|
@@ -4311,7 +4337,13 @@ function createContributionsSchemas(canonical) {
|
|
|
4311
4337
|
order: z12.number().finite().optional(),
|
|
4312
4338
|
section: z12.enum(["primary", "plugins"]).optional(),
|
|
4313
4339
|
badge: UiRailBadge.optional(),
|
|
4314
|
-
panel: z12.strictObject({ body: LocalContributionId2 }).optional()
|
|
4340
|
+
panel: z12.strictObject({ body: LocalContributionId2 }).optional(),
|
|
4341
|
+
featureFlagVariant: z12.strictObject({
|
|
4342
|
+
flag: NonEmptyString3,
|
|
4343
|
+
title: NonEmptyString3.optional(),
|
|
4344
|
+
icon: PackageAssetPath2.optional(),
|
|
4345
|
+
panel: z12.literal(false).optional()
|
|
4346
|
+
}).optional()
|
|
4315
4347
|
});
|
|
4316
4348
|
const UiToastPreviewContribution2 = z12.strictObject({
|
|
4317
4349
|
rule: LocalContributionId2,
|
|
@@ -5177,13 +5209,6 @@ function createManifestSchemas(canonical) {
|
|
|
5177
5209
|
message: `rail entry ${entry.id} counts ${entry.badge.source}, which is not one of this plugin's data sources with a rows store`
|
|
5178
5210
|
});
|
|
5179
5211
|
}
|
|
5180
|
-
if (manifest.targets?.kay?.ui?.entrypoint === void 0) {
|
|
5181
|
-
ctx.addIssue({
|
|
5182
|
-
code: "custom",
|
|
5183
|
-
path,
|
|
5184
|
-
message: `rail entry ${entry.id} declares a badge, so its plugin needs a kay.ui entrypoint: the window starts a plugin's data sources when it loads that code`
|
|
5185
|
-
});
|
|
5186
|
-
}
|
|
5187
5212
|
}
|
|
5188
5213
|
for (const source of declaredAppDataSources) {
|
|
5189
5214
|
if (materializedAppDataSources.has(source) || declaredAppDataStores.has(source))
|
package/package.json
CHANGED