@yaklabs-ai/plugin-protocol 0.8.4 → 0.9.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 +14 -1
- package/dist/index.js +18 -4
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1829,6 +1829,9 @@ export declare const KAY_APP_DATA_SNAPSHOT_MAX_BYTES: number;
|
|
|
1829
1829
|
*/
|
|
1830
1830
|
export declare const KAY_EVENT_PUBLISHER_ID: "kay";
|
|
1831
1831
|
|
|
1832
|
+
/** Released SDK contracts still implemented by the host, alongside its current SDK. */
|
|
1833
|
+
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"];
|
|
1834
|
+
|
|
1832
1835
|
export declare const KAY_PLUGIN_PROTOCOL_PACKAGE_NAME: "@kay/plugin-protocol";
|
|
1833
1836
|
|
|
1834
1837
|
export declare const KAY_PLUGIN_PROTOCOL_VERSION: "kay.plugin.v1";
|
|
@@ -1923,8 +1926,16 @@ export declare const KAY_PLUGIN_PROTOCOL_VERSION: "kay.plugin.v1";
|
|
|
1923
1926
|
* plugin that calls it, or declares `notificationRules`, declares `^0.8.4`: a
|
|
1924
1927
|
* host still advertising 0.8.3 (signals only, landed separately) refuses it at
|
|
1925
1928
|
* load instead of failing at the call.
|
|
1929
|
+
*
|
|
1930
|
+
* 0.8.5 republishes `@yaklabs-ai/plugin-sdk` to include the `./jev` and
|
|
1931
|
+
* `./signals` entrypoints: the workspace package has exported them since 0.8.1
|
|
1932
|
+
* (`jev`) and 0.8.3 (`signals`), but `scripts/build-publishable-packages.mjs`'s
|
|
1933
|
+
* hand-maintained `entrypoints` allowlist had omitted both. This packages
|
|
1934
|
+
* EXISTING apis; the type contract does not change. It still takes the patch
|
|
1935
|
+
* slot: nothing a `^0.8.1`/`^0.8.3` plugin already compiles against changes
|
|
1936
|
+
* shape, and the fix is which bytes reach npm, not what the contract promises.
|
|
1926
1937
|
*/
|
|
1927
|
-
export declare const KAY_PLUGIN_SDK_VERSION: "0.
|
|
1938
|
+
export declare const KAY_PLUGIN_SDK_VERSION: "0.9.0";
|
|
1928
1939
|
|
|
1929
1940
|
export declare const KAY_PLUGIN_TARGET_NAMES: readonly ["kay.agent", "kay.app", "kay.ui"];
|
|
1930
1941
|
|
|
@@ -2245,6 +2256,8 @@ export declare interface KayPluginHostCompatibility {
|
|
|
2245
2256
|
readonly protocolVersion: string;
|
|
2246
2257
|
/** The plugin SDK version this host injects, e.g. `KAY_PLUGIN_SDK_VERSION`. */
|
|
2247
2258
|
readonly sdkVersion: string;
|
|
2259
|
+
/** Older SDK releases whose runtime contracts this host still implements; absent means none. */
|
|
2260
|
+
readonly compatibleSdkVersions?: readonly string[];
|
|
2248
2261
|
/** The Kay app version. Advisory only — never a refusal. */
|
|
2249
2262
|
readonly appVersion: string;
|
|
2250
2263
|
/**
|
package/dist/index.js
CHANGED
|
@@ -115,7 +115,15 @@ 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.9.0";
|
|
119
|
+
var KAY_PLUGIN_COMPATIBLE_SDK_VERSIONS = [
|
|
120
|
+
"0.8.0",
|
|
121
|
+
"0.8.1",
|
|
122
|
+
"0.8.2",
|
|
123
|
+
"0.8.3",
|
|
124
|
+
"0.8.4",
|
|
125
|
+
"0.8.5"
|
|
126
|
+
];
|
|
119
127
|
var KAY_PLUGIN_TARGET_NAMES = [
|
|
120
128
|
"kay.agent",
|
|
121
129
|
"kay.app",
|
|
@@ -2106,11 +2114,16 @@ function checkKayPluginHostCompatibility(compatibility, host) {
|
|
|
2106
2114
|
}
|
|
2107
2115
|
return { refusal: void 0, advisories };
|
|
2108
2116
|
}
|
|
2109
|
-
|
|
2117
|
+
const supportedVersions = [
|
|
2118
|
+
host.sdkVersion,
|
|
2119
|
+
...host.compatibleSdkVersions ?? []
|
|
2120
|
+
];
|
|
2121
|
+
const invalidVersion = supportedVersions.find((version) => parseSemver(version) === void 0);
|
|
2122
|
+
if (invalidVersion !== void 0) {
|
|
2110
2123
|
return {
|
|
2111
2124
|
refusal: {
|
|
2112
2125
|
code: "host-sdk-version-invalid",
|
|
2113
|
-
message: `cannot be checked: this Kay reports plugin SDK "${
|
|
2126
|
+
message: `cannot be checked: this Kay reports plugin SDK "${invalidVersion}", which is not valid semver`
|
|
2114
2127
|
},
|
|
2115
2128
|
advisories
|
|
2116
2129
|
};
|
|
@@ -2124,7 +2137,7 @@ function checkKayPluginHostCompatibility(compatibility, host) {
|
|
|
2124
2137
|
advisories
|
|
2125
2138
|
};
|
|
2126
2139
|
}
|
|
2127
|
-
if (satisfiesSemverRange(
|
|
2140
|
+
if (!supportedVersions.some((version) => satisfiesSemverRange(version, range) === true)) {
|
|
2128
2141
|
return {
|
|
2129
2142
|
refusal: {
|
|
2130
2143
|
code: "sdk-range-unsatisfied",
|
|
@@ -4615,6 +4628,7 @@ export {
|
|
|
4615
4628
|
KAY_APP_DATA_READ_RESULT_MAX_BYTES,
|
|
4616
4629
|
KAY_APP_DATA_SNAPSHOT_MAX_BYTES,
|
|
4617
4630
|
KAY_EVENT_PUBLISHER_ID,
|
|
4631
|
+
KAY_PLUGIN_COMPATIBLE_SDK_VERSIONS,
|
|
4618
4632
|
KAY_PLUGIN_PROTOCOL_PACKAGE_NAME,
|
|
4619
4633
|
KAY_PLUGIN_PROTOCOL_VERSION,
|
|
4620
4634
|
KAY_PLUGIN_SDK_VERSION,
|