@yaklabs-ai/plugin-protocol 0.12.2 → 0.12.4
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 +49 -3
- package/dist/index.js +15 -4
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1396,9 +1396,21 @@ export declare type CliBinaryName = z.infer<typeof CliBinaryName>;
|
|
|
1396
1396
|
* `aliases`) carry a read/write split the approval policy honors, and — for a
|
|
1397
1397
|
* vendored binary — a credential injected into the child process env under
|
|
1398
1398
|
* `authEnvVar`, resolved from `authService`. `readOnly`/`write` are argv prefix
|
|
1399
|
-
* strings (e.g. `"apps list"`) the plugin advertises as read vs write
|
|
1399
|
+
* strings (e.g. `"apps list"`) the plugin advertises as read vs write: contract
|
|
1400
1400
|
* data consumed by approval policy and the prompt, not enforced here.
|
|
1401
1401
|
*
|
|
1402
|
+
* How the host matches a prefix (#10220): it splits the prefix on single spaces
|
|
1403
|
+
* and compares each word with the command's argv at the same position, starting
|
|
1404
|
+
* with the first argument after the binary. Options are never skipped or
|
|
1405
|
+
* interpreted, so `"apps list"` matches `fly apps list --json` but not
|
|
1406
|
+
* `fly --verbose apps list` or `fly apps --org x list`. A command that matches
|
|
1407
|
+
* no prefix is unknown and goes through the user's approval policy. A `write`
|
|
1408
|
+
* match wins over a `readOnly` match. A prefix with an empty word (a leading,
|
|
1409
|
+
* trailing or doubled space) never matches. So list a read only when its
|
|
1410
|
+
* leading words alone make it a read, and expect a command written option-first
|
|
1411
|
+
* to ask: that is the price of an option value never posing as a subcommand
|
|
1412
|
+
* (`vercel --cwd ls deploy` deploys from the directory `ls`).
|
|
1413
|
+
*
|
|
1402
1414
|
* `provider` (decision 007) selects where the binary comes from:
|
|
1403
1415
|
*
|
|
1404
1416
|
* - `"vendored"` (the default when omitted) — a binary from `@kay/vendored-cli`'s
|
|
@@ -1961,7 +1973,7 @@ export declare const KAY_APP_DATA_SNAPSHOT_MAX_BYTES: number;
|
|
|
1961
1973
|
export declare const KAY_EVENT_PUBLISHER_ID: "kay";
|
|
1962
1974
|
|
|
1963
1975
|
/** Released SDK contracts still implemented by the host, alongside its current SDK. */
|
|
1964
|
-
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", "0.10.0", "0.11.0", "0.11.1", "0.12.0", "0.12.1"];
|
|
1976
|
+
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", "0.10.0", "0.11.0", "0.11.1", "0.12.0", "0.12.1", "0.12.2", "0.12.3"];
|
|
1965
1977
|
|
|
1966
1978
|
export declare const KAY_PLUGIN_PROTOCOL_PACKAGE_NAME: "@kay/plugin-protocol";
|
|
1967
1979
|
|
|
@@ -2142,8 +2154,24 @@ export declare const KAY_PLUGIN_PROTOCOL_VERSION: "kay.plugin.v1";
|
|
|
2142
2154
|
* plugin that subscribes to it declares `^0.12.2`, so an older host refuses a directory or
|
|
2143
2155
|
* repository plugin at load instead of the subscription never firing. That check never runs for a
|
|
2144
2156
|
* bundled plugin, which ships with the SDK it calls.
|
|
2157
|
+
*
|
|
2158
|
+
* 0.12.3 adds the `page` reference open kind (`{ kind: "page", pageId }` on a
|
|
2159
|
+
* `referencePresentations` entry), and lets a presentation name a `kay.app` URI module as well as a
|
|
2160
|
+
* `kay.agent` one. A plugin's own `scheme://` references then pill with its icon and the module's
|
|
2161
|
+
* `describe` title, and a click opens the plugin's own registered page with the reference URI as
|
|
2162
|
+
* the page's `objectId`. Additive: a `^0.12.2` plugin keeps loading. The value is new schema, so an
|
|
2163
|
+
* older host refuses the whole manifest at parse (`manifest-schema-invalid`), before any range
|
|
2164
|
+
* check runs. A plugin that declares it still declares `^0.12.3`, so the install-time version
|
|
2165
|
+
* checks name the mismatch instead of a schema error.
|
|
2166
|
+
*
|
|
2167
|
+
* 0.12.4 adds `app.repos` (`KayAppRepos`): `resolve(folder)` answers which git checkout encloses a
|
|
2168
|
+
* folder (repo root, primary checkout, common dir, remotes, origin), and `linkedWorktrees(commonDir)`
|
|
2169
|
+
* lists git's linked-worktree registry, both read by the host asynchronously under a time limit and
|
|
2170
|
+
* answering `unknown` rather than throwing. Always present and ungated, like `app.paths`. Additive:
|
|
2171
|
+
* a plugin compiled against 0.12.3 never reads it. A plugin that calls it declares `^0.12.4`, so an
|
|
2172
|
+
* older host refuses a directory or repository plugin at load instead of the call failing.
|
|
2145
2173
|
*/
|
|
2146
|
-
export declare const KAY_PLUGIN_SDK_VERSION: "0.12.
|
|
2174
|
+
export declare const KAY_PLUGIN_SDK_VERSION: "0.12.4";
|
|
2147
2175
|
|
|
2148
2176
|
export declare const KAY_PLUGIN_TARGET_NAMES: readonly ["kay.agent", "kay.app", "kay.ui"];
|
|
2149
2177
|
|
|
@@ -2814,6 +2842,9 @@ export declare const KayPluginManifestV1: z.ZodObject<{
|
|
|
2814
2842
|
kind: z.ZodLiteral<"working-document">;
|
|
2815
2843
|
}, z.core.$strict>, z.ZodObject<{
|
|
2816
2844
|
kind: z.ZodLiteral<"browser-pane">;
|
|
2845
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
2846
|
+
kind: z.ZodLiteral<"page">;
|
|
2847
|
+
pageId: z.ZodString;
|
|
2817
2848
|
}, z.core.$strict>], "kind">;
|
|
2818
2849
|
variants: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
2819
2850
|
resourceKind: z.ZodString;
|
|
@@ -3396,6 +3427,9 @@ export declare const KayUiTargetManifest: z.ZodObject<{
|
|
|
3396
3427
|
kind: z.ZodLiteral<"working-document">;
|
|
3397
3428
|
}, z.core.$strict>, z.ZodObject<{
|
|
3398
3429
|
kind: z.ZodLiteral<"browser-pane">;
|
|
3430
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
3431
|
+
kind: z.ZodLiteral<"page">;
|
|
3432
|
+
pageId: z.ZodString;
|
|
3399
3433
|
}, z.core.$strict>], "kind">;
|
|
3400
3434
|
variants: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
3401
3435
|
resourceKind: z.ZodString;
|
|
@@ -5647,6 +5681,9 @@ export declare const ReferenceOpenBehavior: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
5647
5681
|
kind: z.ZodLiteral<"working-document">;
|
|
5648
5682
|
}, z.core.$strict>, z.ZodObject<{
|
|
5649
5683
|
kind: z.ZodLiteral<"browser-pane">;
|
|
5684
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
5685
|
+
kind: z.ZodLiteral<"page">;
|
|
5686
|
+
pageId: z.ZodString;
|
|
5650
5687
|
}, z.core.$strict>], "kind">;
|
|
5651
5688
|
|
|
5652
5689
|
export declare type ReferenceOpenBehavior = z.infer<typeof ReferenceOpenBehavior>;
|
|
@@ -5659,6 +5696,9 @@ export declare const ReferencePresentationContribution: z.ZodObject<{
|
|
|
5659
5696
|
kind: z.ZodLiteral<"working-document">;
|
|
5660
5697
|
}, z.core.$strict>, z.ZodObject<{
|
|
5661
5698
|
kind: z.ZodLiteral<"browser-pane">;
|
|
5699
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
5700
|
+
kind: z.ZodLiteral<"page">;
|
|
5701
|
+
pageId: z.ZodString;
|
|
5662
5702
|
}, z.core.$strict>], "kind">;
|
|
5663
5703
|
variants: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
5664
5704
|
resourceKind: z.ZodString;
|
|
@@ -6850,6 +6890,9 @@ export declare const ResolvedPluginContractV1: z.ZodObject<{
|
|
|
6850
6890
|
kind: z.ZodLiteral<"working-document">;
|
|
6851
6891
|
}, z.core.$strict>, z.ZodObject<{
|
|
6852
6892
|
kind: z.ZodLiteral<"browser-pane">;
|
|
6893
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
6894
|
+
kind: z.ZodLiteral<"page">;
|
|
6895
|
+
pageId: z.ZodString;
|
|
6853
6896
|
}, z.core.$strict>], "kind">;
|
|
6854
6897
|
variants: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
6855
6898
|
resourceKind: z.ZodString;
|
|
@@ -7283,6 +7326,9 @@ export declare const ResolvedReferencePresentation: z.ZodObject<{
|
|
|
7283
7326
|
kind: z.ZodLiteral<"working-document">;
|
|
7284
7327
|
}, z.core.$strict>, z.ZodObject<{
|
|
7285
7328
|
kind: z.ZodLiteral<"browser-pane">;
|
|
7329
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
7330
|
+
kind: z.ZodLiteral<"page">;
|
|
7331
|
+
pageId: z.ZodString;
|
|
7286
7332
|
}, z.core.$strict>], "kind">;
|
|
7287
7333
|
variants: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
7288
7334
|
resourceKind: 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.12.
|
|
118
|
+
var KAY_PLUGIN_SDK_VERSION = "0.12.4";
|
|
119
119
|
var KAY_PLUGIN_COMPATIBLE_SDK_VERSIONS = [
|
|
120
120
|
"0.8.0",
|
|
121
121
|
"0.8.1",
|
|
@@ -129,7 +129,9 @@ var KAY_PLUGIN_COMPATIBLE_SDK_VERSIONS = [
|
|
|
129
129
|
"0.11.0",
|
|
130
130
|
"0.11.1",
|
|
131
131
|
"0.12.0",
|
|
132
|
-
"0.12.1"
|
|
132
|
+
"0.12.1",
|
|
133
|
+
"0.12.2",
|
|
134
|
+
"0.12.3"
|
|
133
135
|
];
|
|
134
136
|
var KAY_PLUGIN_TARGET_NAMES = [
|
|
135
137
|
"kay.agent",
|
|
@@ -2540,7 +2542,13 @@ var ResultRendererContribution = z7.strictObject({
|
|
|
2540
2542
|
});
|
|
2541
2543
|
var ReferenceOpenBehavior = z7.discriminatedUnion("kind", [
|
|
2542
2544
|
z7.strictObject({ kind: z7.literal("working-document") }),
|
|
2543
|
-
z7.strictObject({ kind: z7.literal("browser-pane") })
|
|
2545
|
+
z7.strictObject({ kind: z7.literal("browser-pane") }),
|
|
2546
|
+
/**
|
|
2547
|
+
* Open one of the presenting plugin's OWN registered pages (`registerPage`'s
|
|
2548
|
+
* descriptor id) with the reference's canonical URI as the page's `objectId`.
|
|
2549
|
+
* Needs no web address, so a plugin-only resource (`user-todo://items/3`) can pill.
|
|
2550
|
+
*/
|
|
2551
|
+
z7.strictObject({ kind: z7.literal("page"), pageId: NonEmptyString })
|
|
2544
2552
|
]);
|
|
2545
2553
|
var ReferencePresentationVariant = z7.strictObject({
|
|
2546
2554
|
resourceKind: NonEmptyString,
|
|
@@ -3250,7 +3258,10 @@ var KayPluginManifestV1 = z8.strictObject({
|
|
|
3250
3258
|
}
|
|
3251
3259
|
const subscribedUiEvents = new Set(manifest.targets?.kay?.ui?.contributes?.eventSubscriptions?.map((subscription) => subscription.event) ?? []);
|
|
3252
3260
|
const invokedUiEndpoints = new Set(manifest.permissions?.byTarget["kay.ui"]?.endpoints?.filter((grant) => grant.operations.includes("invoke")).map((grant) => grant.endpoint) ?? []);
|
|
3253
|
-
const uriModuleIds = new Set(
|
|
3261
|
+
const uriModuleIds = new Set([
|
|
3262
|
+
...manifest.targets?.kay?.agent?.contributes?.uriModules ?? [],
|
|
3263
|
+
...manifest.targets?.kay?.app?.contributes?.uriModules ?? []
|
|
3264
|
+
].map((module) => module.localId));
|
|
3254
3265
|
const presentationByUriModule = /* @__PURE__ */ new Map();
|
|
3255
3266
|
for (const [index, presentation] of (manifest.targets?.kay?.ui?.contributes?.referencePresentations ?? []).entries()) {
|
|
3256
3267
|
const path = [
|
package/package.json
CHANGED