@yaklabs-ai/plugin-protocol 0.9.1 → 0.10.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 +53 -2
- package/dist/index.js +38 -6
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1935,7 +1935,7 @@ export declare const KAY_APP_DATA_SNAPSHOT_MAX_BYTES: number;
|
|
|
1935
1935
|
export declare const KAY_EVENT_PUBLISHER_ID: "kay";
|
|
1936
1936
|
|
|
1937
1937
|
/** Released SDK contracts still implemented by the host, alongside its current SDK. */
|
|
1938
|
-
export declare const KAY_PLUGIN_COMPATIBLE_SDK_VERSIONS: readonly ["0.8.0", "0.8.1", "0.8.2", "0.8.3", "0.8.4", "0.8.5", "0.9.0"];
|
|
1938
|
+
export declare const KAY_PLUGIN_COMPATIBLE_SDK_VERSIONS: readonly ["0.8.0", "0.8.1", "0.8.2", "0.8.3", "0.8.4", "0.8.5", "0.9.0", "0.9.1"];
|
|
1939
1939
|
|
|
1940
1940
|
export declare const KAY_PLUGIN_PROTOCOL_PACKAGE_NAME: "@kay/plugin-protocol";
|
|
1941
1941
|
|
|
@@ -2039,8 +2039,30 @@ export declare const KAY_PLUGIN_PROTOCOL_VERSION: "kay.plugin.v1";
|
|
|
2039
2039
|
* EXISTING apis; the type contract does not change. It still takes the patch
|
|
2040
2040
|
* slot: nothing a `^0.8.1`/`^0.8.3` plugin already compiles against changes
|
|
2041
2041
|
* shape, and the fix is which bytes reach npm, not what the contract promises.
|
|
2042
|
+
*
|
|
2043
|
+
* 0.9.0 adds timer_cancelled and requires workflow descriptions and summary
|
|
2044
|
+
* returns. This is an authoring-type break only: the host retains the 0.8
|
|
2045
|
+
* runtime contracts.
|
|
2046
|
+
*
|
|
2047
|
+
* 0.9.1 adds bounded corpus invocation reads (`app.corpus.listResourceInvocations`).
|
|
2048
|
+
* Existing received APIs are unchanged, so this is additive only.
|
|
2049
|
+
*
|
|
2050
|
+
* 0.10.0 removes the `spawn-session` variant from `KayAppAutomationEffectInput`
|
|
2051
|
+
* (and its daemon-facing mirror, `KayAutomationEffectInput`): an agent or
|
|
2052
|
+
* plugin can no longer create a spawn-session automation binding (owner
|
|
2053
|
+
* ruling, 2026-09-28) — durable recurring agent work is a plugin workflow
|
|
2054
|
+
* (`app.workflows.define` + `ctx.runAgent`) or a direct `session/run`. A
|
|
2055
|
+
* binding created before this version, or by daemon-internal code, still
|
|
2056
|
+
* stores and reads the effect fine (`KayAppAutomationEffect` keeps it); only
|
|
2057
|
+
* the create-time input type is narrower. Mostly an authoring-type break —
|
|
2058
|
+
* 0.9.0 and 0.9.1 stay in the runtime-contract retention list below, so a
|
|
2059
|
+
* plugin still running bytecode compiled against either keeps loading and
|
|
2060
|
+
* working — except for the one call this ruling actually closes:
|
|
2061
|
+
* `app.automations.create` with a `spawn-session` effect now throws
|
|
2062
|
+
* explicitly at the call site instead of being accepted, for any plugin
|
|
2063
|
+
* regardless of its declared SDK range.
|
|
2042
2064
|
*/
|
|
2043
|
-
export declare const KAY_PLUGIN_SDK_VERSION: "0.
|
|
2065
|
+
export declare const KAY_PLUGIN_SDK_VERSION: "0.10.0";
|
|
2044
2066
|
|
|
2045
2067
|
export declare const KAY_PLUGIN_TARGET_NAMES: readonly ["kay.agent", "kay.app", "kay.ui"];
|
|
2046
2068
|
|
|
@@ -3562,6 +3584,9 @@ export declare function parseSemver(value: string): ParsedSemver | undefined;
|
|
|
3562
3584
|
/** Every capability slug {@link PluginCapabilityClaimV1} can express, for exhaustive table checks. */
|
|
3563
3585
|
export declare const PLUGIN_CAPABILITY_SLUGS: readonly ["sessions.run", "network.connect", "web-session.request", "web-session.download", "filesystem.read", "filesystem.write", "process.spawn", "corpus.read", "signals.read", "workspace.command", "sessions.create", "sessions.update", "models.complete", "jev.use", "automations.write", "automations.run", "workflows.define", "session-events.subscribe", "agents.run", "dynamic-context.register", "app-data.register", "account.assert", "account.update", "agents.permissions", "tool-interception.register", "config.declare-section", "auth.own-service", "auth.shared-identity", "cli.bind", "whiteboard.discover", "whiteboard.read", "whiteboard.create", "whiteboard.update", "whiteboard.remove"];
|
|
3564
3586
|
|
|
3587
|
+
/** The root `<svg>` attribute a tile icon declares itself with. */
|
|
3588
|
+
export declare const PLUGIN_ICON_SHAPE_ATTRIBUTE = "data-icon-shape";
|
|
3589
|
+
|
|
3565
3590
|
/** Rule-body keys the host stamps, so a manifest's `rule` may not carry them. */
|
|
3566
3591
|
export declare const PLUGIN_NOTIFICATION_RULE_HOST_KEYS: readonly ["id", "match", "sender"];
|
|
3567
3592
|
|
|
@@ -4912,6 +4937,29 @@ export declare const PluginEventDefinitionContribution: z.ZodObject<{
|
|
|
4912
4937
|
|
|
4913
4938
|
export declare type PluginEventDefinitionContribution = z.infer<typeof PluginEventDefinitionContribution>;
|
|
4914
4939
|
|
|
4940
|
+
/**
|
|
4941
|
+
* How a plugin icon asks to be drawn.
|
|
4942
|
+
*
|
|
4943
|
+
* - `"mark"` (the default): a logo or glyph on a transparent field. The host frames it, inset
|
|
4944
|
+
* on a white tile, so marks of every shape and color read at one size.
|
|
4945
|
+
* - `"tile"`: a tile icon, artwork that is already a complete tile (its own background, edge to
|
|
4946
|
+
* edge). The host draws it full-bleed in its tile's shape, with no white field, border, or
|
|
4947
|
+
* inset.
|
|
4948
|
+
*
|
|
4949
|
+
* The icon declares this itself with `data-icon-shape="tile"` on its root `<svg>` element, so
|
|
4950
|
+
* any plugin (first- or third-party) opts in the same way and a host keeps no list of which
|
|
4951
|
+
* plugins do. It lives in the markup, not the manifest: the manifest is a strict schema, and a
|
|
4952
|
+
* new field there would make every older host reject the plugin.
|
|
4953
|
+
*/
|
|
4954
|
+
export declare type PluginIconShape = "mark" | "tile";
|
|
4955
|
+
|
|
4956
|
+
/**
|
|
4957
|
+
* Read a plugin icon's declared {@link PluginIconShape}. Only the ROOT element's attribute
|
|
4958
|
+
* counts (a nested `<svg>`, a comment, or text never turns a mark into a tile); anything
|
|
4959
|
+
* undeclared or unparseable is a `"mark"`.
|
|
4960
|
+
*/
|
|
4961
|
+
export declare function pluginIconShape(svg: string): PluginIconShape;
|
|
4962
|
+
|
|
4915
4963
|
export declare const PluginId: z.ZodString;
|
|
4916
4964
|
|
|
4917
4965
|
export declare type PluginId = z.infer<typeof PluginId>;
|
|
@@ -7777,6 +7825,9 @@ export declare const StorageGrantRequest: z.ZodObject<{
|
|
|
7777
7825
|
|
|
7778
7826
|
export declare type StorageGrantRequest = z.infer<typeof StorageGrantRequest>;
|
|
7779
7827
|
|
|
7828
|
+
/** Markup that opens an SVG document: the prolog, then the root `<svg` start tag. */
|
|
7829
|
+
export declare const SVG_DOCUMENT_START: RegExp;
|
|
7830
|
+
|
|
7780
7831
|
export declare const TargetEntrypoint: z.ZodObject<{
|
|
7781
7832
|
module: z.ZodString;
|
|
7782
7833
|
export: z.ZodOptional<z.ZodString>;
|
package/dist/index.js
CHANGED
|
@@ -115,7 +115,7 @@ import { z as z2 } from "zod";
|
|
|
115
115
|
import { z } from "zod";
|
|
116
116
|
var KAY_PLUGIN_PROTOCOL_VERSION = "kay.plugin.v1";
|
|
117
117
|
var KAY_PLUGIN_PROTOCOL_PACKAGE_NAME = "@kay/plugin-protocol";
|
|
118
|
-
var KAY_PLUGIN_SDK_VERSION = "0.
|
|
118
|
+
var KAY_PLUGIN_SDK_VERSION = "0.10.0";
|
|
119
119
|
var KAY_PLUGIN_COMPATIBLE_SDK_VERSIONS = [
|
|
120
120
|
"0.8.0",
|
|
121
121
|
"0.8.1",
|
|
@@ -123,7 +123,8 @@ var KAY_PLUGIN_COMPATIBLE_SDK_VERSIONS = [
|
|
|
123
123
|
"0.8.3",
|
|
124
124
|
"0.8.4",
|
|
125
125
|
"0.8.5",
|
|
126
|
-
"0.9.0"
|
|
126
|
+
"0.9.0",
|
|
127
|
+
"0.9.1"
|
|
127
128
|
];
|
|
128
129
|
var KAY_PLUGIN_TARGET_NAMES = [
|
|
129
130
|
"kay.agent",
|
|
@@ -2667,6 +2668,24 @@ var PluginContributionKind = z7.enum([
|
|
|
2667
2668
|
"configSection"
|
|
2668
2669
|
]);
|
|
2669
2670
|
|
|
2671
|
+
// packages/plugin-protocol/dist/icon-shape.js
|
|
2672
|
+
var SVG_PROLOG = String.raw`^\s*(?:<\?xml[^>]*>\s*)?(?:<!--[\s\S]*?-->\s*)*(?:<!DOCTYPE[^>]*>\s*)?`;
|
|
2673
|
+
var SVG_DOCUMENT_START = new RegExp(`${SVG_PROLOG}<svg[\\s>]`, "iu");
|
|
2674
|
+
var SVG_ROOT_START_TAG = new RegExp(`${SVG_PROLOG}<svg((?:\\s+[^\\s=>/]+(?:\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s"'>]+))?)*)\\s*/?>`, "iu");
|
|
2675
|
+
var ATTRIBUTE = /([^\s=>/]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'>]+)))?/gu;
|
|
2676
|
+
var PLUGIN_ICON_SHAPE_ATTRIBUTE = "data-icon-shape";
|
|
2677
|
+
function pluginIconShape(svg) {
|
|
2678
|
+
const attributes = SVG_ROOT_START_TAG.exec(svg)?.[1];
|
|
2679
|
+
if (attributes === void 0)
|
|
2680
|
+
return "mark";
|
|
2681
|
+
for (const [, name, double, single, bare] of attributes.matchAll(ATTRIBUTE)) {
|
|
2682
|
+
if (name === PLUGIN_ICON_SHAPE_ATTRIBUTE) {
|
|
2683
|
+
return (double ?? single ?? bare) === "tile" ? "tile" : "mark";
|
|
2684
|
+
}
|
|
2685
|
+
}
|
|
2686
|
+
return "mark";
|
|
2687
|
+
}
|
|
2688
|
+
|
|
2670
2689
|
// packages/plugin-protocol/dist/ids.js
|
|
2671
2690
|
function resolvePluginNamespace(pluginId, namespace) {
|
|
2672
2691
|
return namespace ?? pluginId;
|
|
@@ -3033,10 +3052,20 @@ var KayPluginManifestV1 = z8.strictObject({
|
|
|
3033
3052
|
*/
|
|
3034
3053
|
description: NonEmptyString,
|
|
3035
3054
|
// Display icons resolved relative to the package root and traversal-guarded
|
|
3036
|
-
// by `PackageAssetPath`.
|
|
3037
|
-
//
|
|
3038
|
-
//
|
|
3039
|
-
//
|
|
3055
|
+
// by `PackageAssetPath`. This is a *raster/asset* icon — distinct from the
|
|
3056
|
+
// *symbolic* `UiCommandContribution.icon` (an icon-set name), see LEXICON
|
|
3057
|
+
// `icon`. By default the host treats the SVG as a mark and frames it, inset
|
|
3058
|
+
// on a white tile. An SVG whose artwork is already a complete tile (its own
|
|
3059
|
+
// background, edge to edge) says so with `data-icon-shape="tile"` on its
|
|
3060
|
+
// root `<svg>` element, and the host then draws it full-bleed in its tile
|
|
3061
|
+
// shape (LEXICON `tile icon`; `pluginIconShape` in `./icon-shape.ts`). The
|
|
3062
|
+
// signal lives in the asset, not here, so older hosts keep parsing the
|
|
3063
|
+
// manifest.
|
|
3064
|
+
//
|
|
3065
|
+
// `iconDark` is accepted and containment-checked, but no host reads or
|
|
3066
|
+
// renders it today. The supported dark variant lives inside `icon` itself:
|
|
3067
|
+
// an internal `@media (prefers-color-scheme: dark)` rule, which follows the
|
|
3068
|
+
// app theme (docs/directory-plugins.md).
|
|
3040
3069
|
icon: PackageAssetPath.optional(),
|
|
3041
3070
|
iconDark: PackageAssetPath.optional(),
|
|
3042
3071
|
namespace: PluginNamespace.optional(),
|
|
@@ -4685,6 +4714,7 @@ export {
|
|
|
4685
4714
|
MimeTypeString,
|
|
4686
4715
|
NonEmptyString,
|
|
4687
4716
|
PLUGIN_CAPABILITY_SLUGS,
|
|
4717
|
+
PLUGIN_ICON_SHAPE_ATTRIBUTE,
|
|
4688
4718
|
PLUGIN_NOTIFICATION_RULE_HOST_KEYS,
|
|
4689
4719
|
PackageAssetPath,
|
|
4690
4720
|
PluginAgentDefinitionPermissionRule,
|
|
@@ -4756,6 +4786,7 @@ export {
|
|
|
4756
4786
|
SESSION_HEALTH_CUSTOM_TYPE,
|
|
4757
4787
|
SESSION_HEALTH_ENTRY_NAME,
|
|
4758
4788
|
SESSION_HEALTH_EXTENSION_ID,
|
|
4789
|
+
SVG_DOCUMENT_START,
|
|
4759
4790
|
ScopeAlternative,
|
|
4760
4791
|
ScopeNeed,
|
|
4761
4792
|
ScopeRequirement,
|
|
@@ -4824,6 +4855,7 @@ export {
|
|
|
4824
4855
|
parseKayUiBundleIndexV1,
|
|
4825
4856
|
parseResolvedPluginContractV1,
|
|
4826
4857
|
parseSemver,
|
|
4858
|
+
pluginIconShape,
|
|
4827
4859
|
precedingPersonMessages,
|
|
4828
4860
|
refineWebSessionScopeConfined,
|
|
4829
4861
|
resolveAdapterId,
|
package/package.json
CHANGED