@yaklabs-ai/plugin-protocol 0.13.0 → 0.13.2
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 +7 -7
- package/THIRD-PARTY-INVENTORY.json +1 -1
- package/dist/index.d.ts +52 -18
- package/dist/index.js +32 -12
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @yaklabs-ai/plugin-protocol
|
|
2
2
|
|
|
3
|
-
The **`kay.plugin.v1` manifest schema** — the same Zod schema
|
|
3
|
+
The **`kay.plugin.v1` manifest schema** — the same Zod schema Bonsai's daemon uses
|
|
4
4
|
to parse `kay-plugin.json` at load time.
|
|
5
5
|
|
|
6
6
|
Published to the public npm registry under the MIT licence, always at the same
|
|
@@ -11,7 +11,7 @@ flow.
|
|
|
11
11
|
```json
|
|
12
12
|
{
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@kay/plugin-protocol": "npm:@yaklabs-ai/plugin-protocol@^0.13.
|
|
14
|
+
"@kay/plugin-protocol": "npm:@yaklabs-ai/plugin-protocol@^0.13.2"
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
```
|
|
@@ -37,22 +37,22 @@ if (!parsed.success) {
|
|
|
37
37
|
|
|
38
38
|
A hand-rolled field check drifts from the contract it claims to enforce and
|
|
39
39
|
passes while the host rejects the plugin at load. This is the host's own schema,
|
|
40
|
-
so it cannot drift — and unlike resolving it out of a
|
|
40
|
+
so it cannot drift — and unlike resolving it out of a Bonsai checkout, it needs no
|
|
41
41
|
clone, no build, and no `KAY_REPO` environment variable.
|
|
42
42
|
|
|
43
|
-
## Version it against your
|
|
43
|
+
## Version it against your Bonsai app
|
|
44
44
|
|
|
45
45
|
The schema changes over time — it gains fields, and it can also **remove** one.
|
|
46
46
|
Three skews follow, and only the first two fail on your machine:
|
|
47
47
|
|
|
48
|
-
- Validating against a **newer** schema than your
|
|
48
|
+
- Validating against a **newer** schema than your Bonsai app runs can accept a
|
|
49
49
|
manifest the host will reject.
|
|
50
50
|
- Validating against an **older** schema can reject a manifest the host would
|
|
51
51
|
happily load.
|
|
52
52
|
- Validating against an **older** schema can also _accept_ a field the host has
|
|
53
53
|
since removed. `KayPluginManifestV1` parses with `strictObject`, so an
|
|
54
54
|
unrecognized key is a hard rejection: your local validation goes green, and
|
|
55
|
-
|
|
55
|
+
Bonsai drops the plugin at load with a diagnostic you never see.
|
|
56
56
|
|
|
57
|
-
Keep this package in step with the
|
|
57
|
+
Keep this package in step with the Bonsai version you target — the third skew is
|
|
58
58
|
the one a green local run will not warn you about.
|
package/dist/index.d.ts
CHANGED
|
@@ -1417,7 +1417,7 @@ export declare type CliBinaryName = z.infer<typeof CliBinaryName>;
|
|
|
1417
1417
|
* catalog, pinned and checksum-verified. Credential injection is available, and
|
|
1418
1418
|
* gated on the binary actually being materialized in `vendoredToolsDir`
|
|
1419
1419
|
* (constraint 12, vendored-or-nothing).
|
|
1420
|
-
* - `"path"` — a binary the USER OR AGENT installed on `PATH`.
|
|
1420
|
+
* - `"path"` — a binary the USER OR AGENT installed on `PATH`. Bonsai ships nothing,
|
|
1421
1421
|
* pins nothing, and verifies nothing, so this binding is structurally barred from
|
|
1422
1422
|
* receiving a secret: `authEnvVar` must be absent, and `authService` must declare
|
|
1423
1423
|
* only `external-cli` schemes. `buildCliBindingRoster` throws on either violation.
|
|
@@ -1792,7 +1792,7 @@ export declare function finalizeArtifactProvenanceEnvelope(capture: ArtifactProv
|
|
|
1792
1792
|
* The Basic-auth USERNAME a git host expects beside an injected token
|
|
1793
1793
|
* (`x-access-token` for GitHub, `oauth2` for GitLab). The token is the password
|
|
1794
1794
|
* half, so this is a fixed per-vendor literal rather than a user identity, and
|
|
1795
|
-
* it is the only per-vendor variance in
|
|
1795
|
+
* it is the only per-vendor variance in Bonsai's git transport.
|
|
1796
1796
|
*
|
|
1797
1797
|
* Restricted to unreserved URL characters: a colon would move the `user:token`
|
|
1798
1798
|
* boundary the `Authorization: Basic` header encodes, and whitespace or control
|
|
@@ -1965,15 +1965,15 @@ export declare const KAY_APP_DATA_READ_RESULT_MAX_BYTES: number;
|
|
|
1965
1965
|
export declare const KAY_APP_DATA_SNAPSHOT_MAX_BYTES: number;
|
|
1966
1966
|
|
|
1967
1967
|
/**
|
|
1968
|
-
* The publisher id
|
|
1968
|
+
* The publisher id Bonsai's own subsystems publish declared events under (skill
|
|
1969
1969
|
* changes, wallet notices, automation failures). A notification rule matches a
|
|
1970
1970
|
* declared event by (publisher id, event local id), so no plugin may take this
|
|
1971
|
-
* id or it could publish events that
|
|
1971
|
+
* id or it could publish events that Bonsai's default rules read as Bonsai's own.
|
|
1972
1972
|
*/
|
|
1973
1973
|
export declare const KAY_EVENT_PUBLISHER_ID: "kay";
|
|
1974
1974
|
|
|
1975
1975
|
/** Released SDK contracts still implemented by the host, alongside its current SDK. */
|
|
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", "0.12.4", "0.12.5"];
|
|
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", "0.12.4", "0.12.5", "0.13.0", "0.13.1"];
|
|
1977
1977
|
|
|
1978
1978
|
export declare const KAY_PLUGIN_PROTOCOL_PACKAGE_NAME: "@kay/plugin-protocol";
|
|
1979
1979
|
|
|
@@ -1986,7 +1986,7 @@ export declare const KAY_PLUGIN_PROTOCOL_VERSION: "kay.plugin.v1";
|
|
|
1986
1986
|
* ── Why this is the compatibility axis, and the app version is not ──────────
|
|
1987
1987
|
* A plugin never bundles the SDK: the host injects its own `@kay/plugin-sdk`
|
|
1988
1988
|
* dist at import time. So the SDK surface a plugin was written against is the
|
|
1989
|
-
* thing that can break under it, and the
|
|
1989
|
+
* thing that can break under it, and the Bonsai app version is only correlated
|
|
1990
1990
|
* with that — it moves for reasons a plugin cannot observe.
|
|
1991
1991
|
*
|
|
1992
1992
|
* ── Two lines, deliberately, not one ────────────────────────────────────────
|
|
@@ -2115,8 +2115,8 @@ export declare const KAY_PLUGIN_PROTOCOL_VERSION: "kay.plugin.v1";
|
|
|
2115
2115
|
* failing.
|
|
2116
2116
|
*
|
|
2117
2117
|
* 0.12.0 replaces the vendor client `api.withJev` hands its callback. `use`
|
|
2118
|
-
* now receives
|
|
2119
|
-
* `classify({state, questions})`, in
|
|
2118
|
+
* now receives Bonsai's own `JevClient` (`@kay/plugin-sdk/jev`): one method,
|
|
2119
|
+
* `classify({state, questions})`, in Bonsai's question and answer vocabulary
|
|
2120
2120
|
* (yes/no is `bool` answering `probability`; instructions and criteria are
|
|
2121
2121
|
* text; the state is a JSON object), rejecting with a classified
|
|
2122
2122
|
* `JevCallError`. TypeSafe's `TypeSafeClient`, `SystemOneRequest`,
|
|
@@ -2178,7 +2178,7 @@ export declare const KAY_PLUGIN_PROTOCOL_VERSION: "kay.plugin.v1";
|
|
|
2178
2178
|
* that calls it declares `^0.12.5`, so an older host refuses a directory or repository plugin at
|
|
2179
2179
|
* load instead of the call failing.
|
|
2180
2180
|
*
|
|
2181
|
-
* 0.13.0 adds `@kay/plugin-sdk/fs`,
|
|
2181
|
+
* 0.13.0 adds `@kay/plugin-sdk/fs`, Bonsai's own `node:fs/promises`: the same functions, arguments,
|
|
2182
2182
|
* return types and errors, with every call run on the host's user-files workers under a deadline
|
|
2183
2183
|
* (`ERR_KAY_FS_DEADLINE` and siblings when the host gives up or does not try), plus
|
|
2184
2184
|
* `writeFileAtomic` and `withTimeout`. With no host installed it is Node's own module. It adds
|
|
@@ -2196,8 +2196,25 @@ export declare const KAY_PLUGIN_PROTOCOL_VERSION: "kay.plugin.v1";
|
|
|
2196
2196
|
* declared either). A plugin that imports
|
|
2197
2197
|
* `@kay/plugin-sdk/fs` or calls `familyFolder` declares `^0.13.0`, so an older host refuses a
|
|
2198
2198
|
* directory or repository plugin at load.
|
|
2199
|
+
*
|
|
2200
|
+
* 0.13.1 adds the signal engine to `@kay/plugin-sdk/signals`: `SignalDefinition`,
|
|
2201
|
+
* `createSignalEngine` and `signalAnswersPass` (a plugin declares its Jev signals as data and the
|
|
2202
|
+
* engine evaluates them, upstreams first, through `app.signals.observe`), plus `signalDigest`.
|
|
2203
|
+
* `observe` gains three optional input fields, `subject`, `after` and `reuse`, and an observation
|
|
2204
|
+
* and a read signal carry the stored `subject` and `upstreamId` back. Additive: a plugin compiled
|
|
2205
|
+
* against 0.13.0 never sends or reads them. A plugin that imports the engine declares `^0.13.1`,
|
|
2206
|
+
* so an older host refuses a directory or repository plugin at load.
|
|
2207
|
+
*
|
|
2208
|
+
* 0.13.2 adds `app.tools` (`KayAppTools`): `describe(sessionId, refs)` returns, for each tool name
|
|
2209
|
+
* or address a live session can use, the text the agent sees for it, where it comes from, and
|
|
2210
|
+
* whether it is one of Bonsai's own (`ownedByBonsai`). Checked per call against the new
|
|
2211
|
+
* `tools.describe` claim. It also adds the manifest's top-level `ownedByBonsai` flag, honoured only
|
|
2212
|
+
* for a plugin that ships with Bonsai. Additive: a plugin compiled against 0.13.1 never reads the
|
|
2213
|
+
* member. A plugin that calls it declares `^0.13.2`, so an older host refuses a directory or
|
|
2214
|
+
* repository plugin at load. The flag is new schema, so an older host refuses a manifest that sets
|
|
2215
|
+
* it at parse, like 0.12.3's page open kind.
|
|
2199
2216
|
*/
|
|
2200
|
-
export declare const KAY_PLUGIN_SDK_VERSION: "0.13.
|
|
2217
|
+
export declare const KAY_PLUGIN_SDK_VERSION: "0.13.2";
|
|
2201
2218
|
|
|
2202
2219
|
export declare const KAY_PLUGIN_TARGET_NAMES: readonly ["kay.agent", "kay.app", "kay.ui"];
|
|
2203
2220
|
|
|
@@ -2520,10 +2537,10 @@ export declare interface KayPluginHostCompatibility {
|
|
|
2520
2537
|
readonly sdkVersion: string;
|
|
2521
2538
|
/** Older SDK releases whose runtime contracts this host still implements; absent means none. */
|
|
2522
2539
|
readonly compatibleSdkVersions?: readonly string[];
|
|
2523
|
-
/** The
|
|
2540
|
+
/** The Bonsai app version. Advisory only — never a refusal. */
|
|
2524
2541
|
readonly appVersion: string;
|
|
2525
2542
|
/**
|
|
2526
|
-
* Whether the plugin ships WITH
|
|
2543
|
+
* Whether the plugin ships WITH Bonsai. A bundled plugin is cut from this tree,
|
|
2527
2544
|
* so declaring no SDK range is a property of how it ships rather than a gap
|
|
2528
2545
|
* its author left, and the undeclared-range advisory is suppressed for it.
|
|
2529
2546
|
*
|
|
@@ -3321,6 +3338,7 @@ export declare const KayPluginManifestV1: z.ZodObject<{
|
|
|
3321
3338
|
minKayVersion: z.ZodOptional<z.ZodString>;
|
|
3322
3339
|
sdk: z.ZodOptional<z.ZodString>;
|
|
3323
3340
|
}, z.core.$strict>>>;
|
|
3341
|
+
ownedByBonsai: z.ZodOptional<z.ZodBoolean>;
|
|
3324
3342
|
dependencies: z.ZodOptional<z.ZodObject<{
|
|
3325
3343
|
plugins: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
3326
3344
|
}, z.core.$strict>>;
|
|
@@ -3533,7 +3551,7 @@ export declare type KayVersionString = z.infer<typeof KayVersionString>;
|
|
|
3533
3551
|
*
|
|
3534
3552
|
* Distinct from raw session-transcript streaming (`app.corpus`, authorized per call by the
|
|
3535
3553
|
* `corpus.read` claim) and from `registerSearchProvider` (a plugin registering a backend behind
|
|
3536
|
-
*
|
|
3554
|
+
* Bonsai's own web-search tool) — this grant is the reverse direction: a plugin READING the shared
|
|
3537
3555
|
* knowledge index that OTHER ingest lanes (skills, URIs) already populate, confined to its own
|
|
3538
3556
|
* address space.
|
|
3539
3557
|
*/
|
|
@@ -3712,7 +3730,7 @@ export declare interface ParsedSemver {
|
|
|
3712
3730
|
|
|
3713
3731
|
export declare function parseKayPluginManifestV1(value: unknown): KayPluginManifestV1;
|
|
3714
3732
|
|
|
3715
|
-
/** Parses one origin-agnostic, loadable
|
|
3733
|
+
/** Parses one origin-agnostic, loadable Bonsai React app package. */
|
|
3716
3734
|
export declare function parseKayUiAppPackageV1(input: unknown): KayUiAppPackageV1;
|
|
3717
3735
|
|
|
3718
3736
|
export declare function parseKayUiBundleIndexV1(input: unknown): KayUiBundleIndexV1;
|
|
@@ -3723,7 +3741,7 @@ export declare function parseResolvedPluginContractV1(value: unknown): ResolvedP
|
|
|
3723
3741
|
export declare function parseSemver(value: string): ParsedSemver | undefined;
|
|
3724
3742
|
|
|
3725
3743
|
/** Every capability slug {@link PluginCapabilityClaimV1} can express, for exhaustive table checks. */
|
|
3726
|
-
export declare const PLUGIN_CAPABILITY_SLUGS: readonly ["sessions.run", "network.connect", "web-session.request", "web-session.download", "process.spawn", "corpus.read", "signals.read", "skills.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", "interaction.surface", "config.declare-section", "auth.own-service", "auth.shared-identity", "cli.bind", "whiteboard.discover", "whiteboard.read", "whiteboard.create", "whiteboard.update", "whiteboard.remove"];
|
|
3744
|
+
export declare const PLUGIN_CAPABILITY_SLUGS: readonly ["sessions.run", "network.connect", "web-session.request", "web-session.download", "process.spawn", "corpus.read", "signals.read", "skills.read", "tools.describe", "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", "interaction.surface", "config.declare-section", "auth.own-service", "auth.shared-identity", "cli.bind", "whiteboard.discover", "whiteboard.read", "whiteboard.create", "whiteboard.update", "whiteboard.remove"];
|
|
3727
3745
|
|
|
3728
3746
|
/** The root `<svg>` attribute a tile icon declares itself with. */
|
|
3729
3747
|
export declare const PLUGIN_ICON_SHAPE_ATTRIBUTE = "data-icon-shape";
|
|
@@ -4151,6 +4169,10 @@ export declare const PluginCapabilityClaimV1: z.ZodDiscriminatedUnion<[z.ZodObje
|
|
|
4151
4169
|
target: z.ZodLiteral<"kay.app">;
|
|
4152
4170
|
slug: z.ZodLiteral<"skills.read">;
|
|
4153
4171
|
envelope: z.ZodObject<{}, z.core.$strict>;
|
|
4172
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
4173
|
+
target: z.ZodLiteral<"kay.app">;
|
|
4174
|
+
slug: z.ZodLiteral<"tools.describe">;
|
|
4175
|
+
envelope: z.ZodObject<{}, z.core.$strict>;
|
|
4154
4176
|
}, z.core.$strict>, z.ZodObject<{
|
|
4155
4177
|
target: z.ZodLiteral<"kay.app">;
|
|
4156
4178
|
slug: z.ZodLiteral<"workspace.command">;
|
|
@@ -4359,6 +4381,10 @@ export declare const PluginCapabilityDecisionV1: z.ZodDiscriminatedUnion<[z.ZodO
|
|
|
4359
4381
|
target: z.ZodLiteral<"kay.app">;
|
|
4360
4382
|
slug: z.ZodLiteral<"skills.read">;
|
|
4361
4383
|
envelope: z.ZodObject<{}, z.core.$strict>;
|
|
4384
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
4385
|
+
target: z.ZodLiteral<"kay.app">;
|
|
4386
|
+
slug: z.ZodLiteral<"tools.describe">;
|
|
4387
|
+
envelope: z.ZodObject<{}, z.core.$strict>;
|
|
4362
4388
|
}, z.core.$strict>, z.ZodObject<{
|
|
4363
4389
|
target: z.ZodLiteral<"kay.app">;
|
|
4364
4390
|
slug: z.ZodLiteral<"workspace.command">;
|
|
@@ -4562,6 +4588,10 @@ export declare const PluginCapabilityDecisionV1: z.ZodDiscriminatedUnion<[z.ZodO
|
|
|
4562
4588
|
target: z.ZodLiteral<"kay.app">;
|
|
4563
4589
|
slug: z.ZodLiteral<"skills.read">;
|
|
4564
4590
|
envelope: z.ZodObject<{}, z.core.$strict>;
|
|
4591
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
4592
|
+
target: z.ZodLiteral<"kay.app">;
|
|
4593
|
+
slug: z.ZodLiteral<"tools.describe">;
|
|
4594
|
+
envelope: z.ZodObject<{}, z.core.$strict>;
|
|
4565
4595
|
}, z.core.$strict>, z.ZodObject<{
|
|
4566
4596
|
target: z.ZodLiteral<"kay.app">;
|
|
4567
4597
|
slug: z.ZodLiteral<"workspace.command">;
|
|
@@ -4828,6 +4858,10 @@ export declare const PluginCapabilityRefusalV1: z.ZodObject<{
|
|
|
4828
4858
|
target: z.ZodLiteral<"kay.app">;
|
|
4829
4859
|
slug: z.ZodLiteral<"skills.read">;
|
|
4830
4860
|
envelope: z.ZodObject<{}, z.core.$strict>;
|
|
4861
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
4862
|
+
target: z.ZodLiteral<"kay.app">;
|
|
4863
|
+
slug: z.ZodLiteral<"tools.describe">;
|
|
4864
|
+
envelope: z.ZodObject<{}, z.core.$strict>;
|
|
4831
4865
|
}, z.core.$strict>, z.ZodObject<{
|
|
4832
4866
|
target: z.ZodLiteral<"kay.app">;
|
|
4833
4867
|
slug: z.ZodLiteral<"workspace.command">;
|
|
@@ -5491,7 +5525,7 @@ export declare type PluginProvisioningRequirement = z.infer<typeof PluginProvisi
|
|
|
5491
5525
|
*
|
|
5492
5526
|
* ── What this schema deliberately does NOT validate ─────────────────────────────────────────
|
|
5493
5527
|
* Structure and bounds only. WHICH installer commands are legal, and whether a git locator is
|
|
5494
|
-
* canonical/safe, are
|
|
5528
|
+
* canonical/safe, are Bonsai-layer POLICY that already has exactly one home each
|
|
5495
5529
|
* (`installer-skill-source.ts`'s executable allowlist, `remote-skill-source.ts`'s locator
|
|
5496
5530
|
* hygiene). Re-stating either here would fork the policy: this package would then hold a second
|
|
5497
5531
|
* answer that drifts from the one the daemon enforces. The daemon applies those validators to a
|
|
@@ -5523,7 +5557,7 @@ export declare type PluginSkillSourceDeclaration = z.infer<typeof PluginSkillSou
|
|
|
5523
5557
|
* generation `freeform`.
|
|
5524
5558
|
*
|
|
5525
5559
|
* Five classes, ordered loosely by how much the host knows about the author:
|
|
5526
|
-
* `bundled` (compiled into
|
|
5560
|
+
* `bundled` (compiled into Bonsai), `org-shared` (distributed inside the user's
|
|
5527
5561
|
* organization), `user-local` (the user put it in their own plugins root),
|
|
5528
5562
|
* `verified-marketplace` (a reviewed marketplace artifact), `freeform`
|
|
5529
5563
|
* (anything else — today, a plugin repository generation). Two of them
|
|
@@ -5531,7 +5565,7 @@ export declare type PluginSkillSourceDeclaration = z.infer<typeof PluginSkillSou
|
|
|
5531
5565
|
*
|
|
5532
5566
|
* IT DECIDES NOTHING. There is no ceiling table keyed on this and no capability a class grants or
|
|
5533
5567
|
* withholds: authority is the user's grant ledger, one exact claim at a time, plus the one rule
|
|
5534
|
-
* that a plugin
|
|
5568
|
+
* that a plugin Bonsai itself bundles holds every grant. A future gate that wants to read this is a
|
|
5535
5569
|
* new decision to argue for, not a use this type already sanctions.
|
|
5536
5570
|
*/
|
|
5537
5571
|
export declare const PluginSourceClass: z.ZodEnum<{
|
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.13.
|
|
118
|
+
var KAY_PLUGIN_SDK_VERSION = "0.13.2";
|
|
119
119
|
var KAY_PLUGIN_COMPATIBLE_SDK_VERSIONS = [
|
|
120
120
|
"0.8.0",
|
|
121
121
|
"0.8.1",
|
|
@@ -133,7 +133,9 @@ var KAY_PLUGIN_COMPATIBLE_SDK_VERSIONS = [
|
|
|
133
133
|
"0.12.2",
|
|
134
134
|
"0.12.3",
|
|
135
135
|
"0.12.4",
|
|
136
|
-
"0.12.5"
|
|
136
|
+
"0.12.5",
|
|
137
|
+
"0.13.0",
|
|
138
|
+
"0.13.1"
|
|
137
139
|
];
|
|
138
140
|
var KAY_PLUGIN_TARGET_NAMES = [
|
|
139
141
|
"kay.agent",
|
|
@@ -1527,6 +1529,14 @@ var PluginCapabilityClaimV1 = z6.discriminatedUnion("slug", [
|
|
|
1527
1529
|
slug: z6.literal("skills.read"),
|
|
1528
1530
|
envelope: z6.strictObject({})
|
|
1529
1531
|
}),
|
|
1532
|
+
z6.strictObject({
|
|
1533
|
+
// The text an agent sees for a tool or an address in a live session, where each comes from,
|
|
1534
|
+
// and whether it is one of Bonsai's own. Read-only and never a call. An empty envelope because
|
|
1535
|
+
// the grant itself is the visibility decision, as with `skills.read`.
|
|
1536
|
+
target: z6.literal("kay.app"),
|
|
1537
|
+
slug: z6.literal("tools.describe"),
|
|
1538
|
+
envelope: z6.strictObject({})
|
|
1539
|
+
}),
|
|
1530
1540
|
z6.strictObject({
|
|
1531
1541
|
target: z6.literal("kay.app"),
|
|
1532
1542
|
slug: z6.literal("workspace.command"),
|
|
@@ -1628,7 +1638,7 @@ var PluginCapabilityClaimV1 = z6.discriminatedUnion("slug", [
|
|
|
1628
1638
|
z6.strictObject({
|
|
1629
1639
|
target: z6.literal("kay.agent"),
|
|
1630
1640
|
slug: z6.literal("interaction.surface"),
|
|
1631
|
-
/** The one
|
|
1641
|
+
/** The one Bonsai-shipped interaction surface this plugin may drive; one claim per surface. */
|
|
1632
1642
|
envelope: z6.strictObject({ surface: z6.enum(["browser-pane", "desktop"]) })
|
|
1633
1643
|
}),
|
|
1634
1644
|
z6.strictObject({
|
|
@@ -1670,6 +1680,7 @@ var PLUGIN_CAPABILITY_SLUGS = [
|
|
|
1670
1680
|
"corpus.read",
|
|
1671
1681
|
"signals.read",
|
|
1672
1682
|
"skills.read",
|
|
1683
|
+
"tools.describe",
|
|
1673
1684
|
"workspace.command",
|
|
1674
1685
|
"sessions.create",
|
|
1675
1686
|
"sessions.update",
|
|
@@ -1776,6 +1787,7 @@ function sameClaim(a, b) {
|
|
|
1776
1787
|
case "corpus.read":
|
|
1777
1788
|
case "signals.read":
|
|
1778
1789
|
case "skills.read":
|
|
1790
|
+
case "tools.describe":
|
|
1779
1791
|
case "workspace.command":
|
|
1780
1792
|
case "models.complete":
|
|
1781
1793
|
case "jev.use":
|
|
@@ -1840,6 +1852,7 @@ function envelopePairs(a, b) {
|
|
|
1840
1852
|
case "corpus.read":
|
|
1841
1853
|
case "signals.read":
|
|
1842
1854
|
case "skills.read":
|
|
1855
|
+
case "tools.describe":
|
|
1843
1856
|
case "workspace.command":
|
|
1844
1857
|
case "models.complete":
|
|
1845
1858
|
case "jev.use":
|
|
@@ -2102,7 +2115,7 @@ function checkKayPluginHostCompatibility(compatibility, host) {
|
|
|
2102
2115
|
return {
|
|
2103
2116
|
refusal: {
|
|
2104
2117
|
code: "unsupported-protocol",
|
|
2105
|
-
message: `declares support for ${declared} but this
|
|
2118
|
+
message: `declares support for ${declared} but this Bonsai speaks ${host.protocolVersion}`
|
|
2106
2119
|
},
|
|
2107
2120
|
advisories
|
|
2108
2121
|
};
|
|
@@ -2113,19 +2126,19 @@ function checkKayPluginHostCompatibility(compatibility, host) {
|
|
|
2113
2126
|
if (parseSemver(minKayVersion) === void 0) {
|
|
2114
2127
|
advisories.push({
|
|
2115
2128
|
code: "min-kay-version-unparseable",
|
|
2116
|
-
message: `declares a minimum
|
|
2129
|
+
message: `declares a minimum Bonsai version of "${minKayVersion}", which is not a version Bonsai can compare`
|
|
2117
2130
|
});
|
|
2118
2131
|
} else {
|
|
2119
2132
|
const order = compareSemver(host.appVersion, minKayVersion);
|
|
2120
2133
|
if (order === void 0) {
|
|
2121
2134
|
advisories.push({
|
|
2122
2135
|
code: "min-kay-version-unparseable",
|
|
2123
|
-
message: `asks for
|
|
2136
|
+
message: `asks for Bonsai ${minKayVersion} or newer, which cannot be checked against this Bonsai's version "${host.appVersion}"`
|
|
2124
2137
|
});
|
|
2125
2138
|
} else if (order < 0) {
|
|
2126
2139
|
advisories.push({
|
|
2127
2140
|
code: "min-kay-version-unmet",
|
|
2128
|
-
message: `asks for
|
|
2141
|
+
message: `asks for Bonsai ${minKayVersion} or newer; this is ${host.appVersion}`
|
|
2129
2142
|
});
|
|
2130
2143
|
}
|
|
2131
2144
|
}
|
|
@@ -2135,7 +2148,7 @@ function checkKayPluginHostCompatibility(compatibility, host) {
|
|
|
2135
2148
|
if (host.bundled !== true) {
|
|
2136
2149
|
advisories.push({
|
|
2137
2150
|
code: "sdk-range-undeclared",
|
|
2138
|
-
message: `declares no compatibility.sdk range; this
|
|
2151
|
+
message: `declares no compatibility.sdk range; this Bonsai ships plugin SDK ${host.sdkVersion}`
|
|
2139
2152
|
});
|
|
2140
2153
|
}
|
|
2141
2154
|
return { refusal: void 0, advisories };
|
|
@@ -2149,7 +2162,7 @@ function checkKayPluginHostCompatibility(compatibility, host) {
|
|
|
2149
2162
|
return {
|
|
2150
2163
|
refusal: {
|
|
2151
2164
|
code: "host-sdk-version-invalid",
|
|
2152
|
-
message: `cannot be checked: this
|
|
2165
|
+
message: `cannot be checked: this Bonsai reports plugin SDK "${invalidVersion}", which is not valid semver`
|
|
2153
2166
|
},
|
|
2154
2167
|
advisories
|
|
2155
2168
|
};
|
|
@@ -2158,7 +2171,7 @@ function checkKayPluginHostCompatibility(compatibility, host) {
|
|
|
2158
2171
|
return {
|
|
2159
2172
|
refusal: {
|
|
2160
2173
|
code: "sdk-range-unsupported",
|
|
2161
|
-
message: `declares an SDK range of "${range}", which
|
|
2174
|
+
message: `declares an SDK range of "${range}", which Bonsai cannot interpret (use a caret, tilde, or comparator range such as ^${host.sdkVersion})`
|
|
2162
2175
|
},
|
|
2163
2176
|
advisories
|
|
2164
2177
|
};
|
|
@@ -2167,7 +2180,7 @@ function checkKayPluginHostCompatibility(compatibility, host) {
|
|
|
2167
2180
|
return {
|
|
2168
2181
|
refusal: {
|
|
2169
2182
|
code: "sdk-range-unsatisfied",
|
|
2170
|
-
message: `needs plugin SDK ${range}, this
|
|
2183
|
+
message: `needs plugin SDK ${range}, this Bonsai ships ${host.sdkVersion}`
|
|
2171
2184
|
},
|
|
2172
2185
|
advisories
|
|
2173
2186
|
};
|
|
@@ -2968,7 +2981,7 @@ var PluginAuthSchemeOAuthConfidential = z8.strictObject({
|
|
|
2968
2981
|
localId: LocalContributionId,
|
|
2969
2982
|
kind: z8.literal("oauth2"),
|
|
2970
2983
|
exchange: z8.literal("confidential"),
|
|
2971
|
-
/** Absent means `["kay"]` — a confidential exchange's secret may only ever be
|
|
2984
|
+
/** Absent means `["kay"]` — a confidential exchange's secret may only ever be Bonsai's. */
|
|
2972
2985
|
clientSuppliers: z8.tuple([z8.literal("kay")]).optional(),
|
|
2973
2986
|
scopes: z8.array(NonEmptyString).optional()
|
|
2974
2987
|
});
|
|
@@ -3095,6 +3108,13 @@ var KayPluginManifestV1 = z8.strictObject({
|
|
|
3095
3108
|
auth: PluginAuthManifest.optional(),
|
|
3096
3109
|
permissions: PluginPermissionManifest.optional(),
|
|
3097
3110
|
compatibility: PluginCompatibilityManifest.optional(),
|
|
3111
|
+
/**
|
|
3112
|
+
* Whether this plugin is part of Bonsai's own workbench (memory, sessions, the workspace) rather
|
|
3113
|
+
* than a connection to the user's outside world or a general-purpose tool. Its tools and URI
|
|
3114
|
+
* schemes then report `ownedByBonsai`. Honoured only for a plugin that ships with Bonsai: the
|
|
3115
|
+
* host reads any other plugin's flag as false. Absent ⇒ false.
|
|
3116
|
+
*/
|
|
3117
|
+
ownedByBonsai: z8.boolean().optional(),
|
|
3098
3118
|
/**
|
|
3099
3119
|
* Explicit plugin-level dependencies — other plugins this plugin requires to be present in the
|
|
3100
3120
|
* composed roster. At composition time the runtime checks each id against the accepted
|
package/package.json
CHANGED