@yaklabs-ai/plugin-protocol 0.13.2 → 0.13.3
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 +2 -2
- package/THIRD-PARTY-INVENTORY.json +1 -1
- package/dist/index.d.ts +27 -18
- package/dist/index.js +7 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -11,7 +11,7 @@ flow.
|
|
|
11
11
|
```json
|
|
12
12
|
{
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@
|
|
14
|
+
"@bonsai/plugin-protocol": "npm:@yaklabs-ai/plugin-protocol@^0.13.3"
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
```
|
|
@@ -22,7 +22,7 @@ Validate your manifest in your own CI, against the real schema, instead of a
|
|
|
22
22
|
hand-written approximation:
|
|
23
23
|
|
|
24
24
|
```js
|
|
25
|
-
import { KayPluginManifestV1 } from "@
|
|
25
|
+
import { KayPluginManifestV1 } from "@bonsai/plugin-protocol";
|
|
26
26
|
|
|
27
27
|
const parsed = KayPluginManifestV1.safeParse(
|
|
28
28
|
JSON.parse(await readFile("kay-plugin.json", "utf8")),
|
package/dist/index.d.ts
CHANGED
|
@@ -1413,7 +1413,7 @@ export declare type CliBinaryName = z.infer<typeof CliBinaryName>;
|
|
|
1413
1413
|
*
|
|
1414
1414
|
* `provider` (decision 007) selects where the binary comes from:
|
|
1415
1415
|
*
|
|
1416
|
-
* - `"vendored"` (the default when omitted) — a binary from `@
|
|
1416
|
+
* - `"vendored"` (the default when omitted) — a binary from `@bonsai/vendored-cli`'s
|
|
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).
|
|
@@ -1510,7 +1510,7 @@ export declare type CommandContribution = z.infer<typeof CommandContribution>;
|
|
|
1510
1510
|
* no real tool accepts its wire shape.
|
|
1511
1511
|
*
|
|
1512
1512
|
* NO `promptTemplate` variant, deliberately (tracked as #1420): the wire type this composes into
|
|
1513
|
-
* (`@
|
|
1513
|
+
* (`@bonsai/agent-runtime-protocol`'s `AgentRuntimeCommandHandler`) still carries a `promptTemplate`
|
|
1514
1514
|
* kind, but only the daemon's own
|
|
1515
1515
|
* per-session discovery (a user-authored `commands/*.md` file, `AgentRuntimeCommandProvenance`
|
|
1516
1516
|
* `"discovered"`) ever produces one — a plugin's compiled-in/directory `.md` has no equivalent
|
|
@@ -1973,9 +1973,9 @@ export declare const KAY_APP_DATA_SNAPSHOT_MAX_BYTES: number;
|
|
|
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", "0.13.0", "0.13.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", "0.12.4", "0.12.5", "0.13.0", "0.13.1", "0.13.2"];
|
|
1977
1977
|
|
|
1978
|
-
export declare const KAY_PLUGIN_PROTOCOL_PACKAGE_NAME: "@
|
|
1978
|
+
export declare const KAY_PLUGIN_PROTOCOL_PACKAGE_NAME: "@bonsai/plugin-protocol";
|
|
1979
1979
|
|
|
1980
1980
|
export declare const KAY_PLUGIN_PROTOCOL_VERSION: "kay.plugin.v1";
|
|
1981
1981
|
|
|
@@ -1984,14 +1984,14 @@ export declare const KAY_PLUGIN_PROTOCOL_VERSION: "kay.plugin.v1";
|
|
|
1984
1984
|
* `compatibility.sdk` range is matched against.
|
|
1985
1985
|
*
|
|
1986
1986
|
* ── Why this is the compatibility axis, and the app version is not ──────────
|
|
1987
|
-
* A plugin never bundles the SDK: the host injects its own `@
|
|
1987
|
+
* A plugin never bundles the SDK: the host injects its own `@bonsai/plugin-sdk`
|
|
1988
1988
|
* dist at import time. So the SDK surface a plugin was written against is the
|
|
1989
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 ────────────────────────────────────────
|
|
1993
1993
|
* This continues the published `@yaklabs-ai/plugin-sdk` line, currently in 0.x.
|
|
1994
|
-
* `KAY_UI_SDK_VERSION` in `@
|
|
1994
|
+
* `KAY_UI_SDK_VERSION` in `@bonsai/protocol` is a SEPARATE line at its own number,
|
|
1995
1995
|
* and the two are never compared: a `kay.ui` app package declares against the
|
|
1996
1996
|
* UI SDK, a plugin manifest declares `compatibility.sdk` against this one, and
|
|
1997
1997
|
* no manifest field takes both. Unifying them would have to publish the plugin
|
|
@@ -2008,7 +2008,7 @@ export declare const KAY_PLUGIN_PROTOCOL_VERSION: "kay.plugin.v1";
|
|
|
2008
2008
|
* the minor the breaking slot, so a minor bump refuses
|
|
2009
2009
|
* (`sdk-range-unsatisfied`) every plugin still declaring the previous one — a
|
|
2010
2010
|
* fleet-wide break, never the price of one new entrypoint. 0.7.1 carried the
|
|
2011
|
-
* additive `@
|
|
2011
|
+
* additive `@bonsai/plugin-sdk/phase-shift` surface that way, while `^0.7.0`
|
|
2012
2012
|
* plugins kept loading.
|
|
2013
2013
|
*
|
|
2014
2014
|
* 0.8.0 IS that fleet-wide break, deliberately, and it spends the one break on
|
|
@@ -2039,7 +2039,7 @@ export declare const KAY_PLUGIN_PROTOCOL_VERSION: "kay.plugin.v1";
|
|
|
2039
2039
|
* was not written to.
|
|
2040
2040
|
*
|
|
2041
2041
|
* 0.8.1 takes the PATCH slot under the addition rule above: `api.withJev`
|
|
2042
|
-
* (`@
|
|
2042
|
+
* (`@bonsai/plugin-sdk/jev`) — Jev typed-decision inference with a required
|
|
2043
2043
|
* fallback — is one new member on an api a plugin RECEIVES. A `^0.8.0` plugin
|
|
2044
2044
|
* keeps loading and keeps compiling; it simply never reaches for the member.
|
|
2045
2045
|
* The member is non-optional for the same reason 0.8.0 made every brokered
|
|
@@ -2056,7 +2056,7 @@ export declare const KAY_PLUGIN_PROTOCOL_VERSION: "kay.plugin.v1";
|
|
|
2056
2056
|
* older host refuses it at load instead of failing at the call. 0.8.3's
|
|
2057
2057
|
* `observe` also answers `invalid`, recording nothing, for a detector id,
|
|
2058
2058
|
* version, question name, choice label, or source id outside the recorded-name
|
|
2059
|
-
* grammar (`invalidObservation` in `@
|
|
2059
|
+
* grammar (`invalidObservation` in `@bonsai/plugin-sdk/signals`): names a reader
|
|
2060
2060
|
* could not later address, filter on, or copy back. A 0.8.2 host recorded such
|
|
2061
2061
|
* names, so a plugin moving to 0.8.3 checks its names against that grammar.
|
|
2062
2062
|
*
|
|
@@ -2115,7 +2115,7 @@ 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 Bonsai's own `JevClient` (`@
|
|
2118
|
+
* now receives Bonsai's own `JevClient` (`@bonsai/plugin-sdk/jev`): one method,
|
|
2119
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
|
|
@@ -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 `@
|
|
2181
|
+
* 0.13.0 adds `@bonsai/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
|
|
@@ -2186,7 +2186,7 @@ export declare const KAY_PLUGIN_PROTOCOL_VERSION: "kay.plugin.v1";
|
|
|
2186
2186
|
* session family's Whiteboard, and makes it a required member of `KayAgentPluginApi`. It removes
|
|
2187
2187
|
* the `kay.agent` api's `filesystem` broker, the `filesystem.read` / `filesystem.write`
|
|
2188
2188
|
* permissions it was gated by, the `{ root: "filesystem", selector }` URI backing and the URI
|
|
2189
|
-
* module `verbs` that went with it: plugins use `@
|
|
2189
|
+
* module `verbs` that went with it: plugins use `@bonsai/plugin-sdk/fs`, `userFiles` or
|
|
2190
2190
|
* `familyFolder` instead. No plugin used them. Stored grants naming the retired permissions are
|
|
2191
2191
|
* ignored, not refused. For the api surface this is a clean break with no shim and deliberately
|
|
2192
2192
|
* NOT a load refusal, like 0.12.0: every earlier release stays in the retention list, so a
|
|
@@ -2194,10 +2194,10 @@ export declare const KAY_PLUGIN_PROTOCOL_VERSION: "kay.plugin.v1";
|
|
|
2194
2194
|
* manifest is different: a manifest that still declares URI-module `verbs` or
|
|
2195
2195
|
* `filesystemBacking: { root: "filesystem" }` fails to parse and is refused at load (no plugin
|
|
2196
2196
|
* declared either). A plugin that imports
|
|
2197
|
-
* `@
|
|
2197
|
+
* `@bonsai/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
2199
|
*
|
|
2200
|
-
* 0.13.1 adds the signal engine to `@
|
|
2200
|
+
* 0.13.1 adds the signal engine to `@bonsai/plugin-sdk/signals`: `SignalDefinition`,
|
|
2201
2201
|
* `createSignalEngine` and `signalAnswersPass` (a plugin declares its Jev signals as data and the
|
|
2202
2202
|
* engine evaluates them, upstreams first, through `app.signals.observe`), plus `signalDigest`.
|
|
2203
2203
|
* `observe` gains three optional input fields, `subject`, `after` and `reuse`, and an observation
|
|
@@ -2213,8 +2213,17 @@ export declare const KAY_PLUGIN_PROTOCOL_VERSION: "kay.plugin.v1";
|
|
|
2213
2213
|
* member. A plugin that calls it declares `^0.13.2`, so an older host refuses a directory or
|
|
2214
2214
|
* repository plugin at load. The flag is new schema, so an older host refuses a manifest that sets
|
|
2215
2215
|
* it at parse, like 0.12.3's page open kind.
|
|
2216
|
+
*
|
|
2217
|
+
* 0.13.3 adds `app.usage` (`KayAppUsage`, `createUnavailableUsage`): `uriActivity({ prefix })`
|
|
2218
|
+
* returns read and change activity for resources under one of the plugin's OWN registered URI
|
|
2219
|
+
* schemes, checked per call (any other prefix answers `refused`). It also adds
|
|
2220
|
+
* `KayAppAgentDefinition.maintains`, the URI schemes a registered agent definition's runs maintain;
|
|
2221
|
+
* reads by such a run and its session family are not counted. Additive: a plugin compiled against
|
|
2222
|
+
* 0.13.2 never reads the member or sets the field. A plugin that calls `app.usage` or declares
|
|
2223
|
+
* `maintains` declares `^0.13.3`, so an older host refuses a directory or repository plugin at
|
|
2224
|
+
* load; an older host's strict definition schema would refuse a definition that sets `maintains`.
|
|
2216
2225
|
*/
|
|
2217
|
-
export declare const KAY_PLUGIN_SDK_VERSION: "0.13.
|
|
2226
|
+
export declare const KAY_PLUGIN_SDK_VERSION: "0.13.3";
|
|
2218
2227
|
|
|
2219
2228
|
export declare const KAY_PLUGIN_TARGET_NAMES: readonly ["kay.agent", "kay.app", "kay.ui"];
|
|
2220
2229
|
|
|
@@ -7609,14 +7618,14 @@ export declare type ScopeRequirement = z.infer<typeof ScopeRequirement>;
|
|
|
7609
7618
|
* this list. Two consequences worth knowing:
|
|
7610
7619
|
*
|
|
7611
7620
|
* - `sessions.create` and `sessions.run` are the two separately-granted plugin doors
|
|
7612
|
-
* (`@
|
|
7621
|
+
* (`@bonsai/plugin-protocol`'s `permissions.ts`: `create` mints a persisted user-visible session,
|
|
7613
7622
|
* `run` executes a hidden headless one). Each names ITSELF at the site that mints the session;
|
|
7614
7623
|
* neither is inferred from the surface string, which cannot tell them apart.
|
|
7615
7624
|
* - `sessions.create` stamps a plugin creator only for a create that declares a plugin-surfaced
|
|
7616
7625
|
* `system` origin. The SDK `create` door passes no origin today, so its sessions read as the
|
|
7617
7626
|
* ordinary chats they are; the value is still the honest one for that door when it does.
|
|
7618
7627
|
* - `agents.run` (G1, 2026-09) is the generic session-event run door
|
|
7619
|
-
* (`app.agents.run(ref, input, cause, {fork?})`, `@
|
|
7628
|
+
* (`app.agents.run(ref, input, cause, {fork?})`, `@bonsai/plugin-sdk`'s `kay-app/agents.ts`): a
|
|
7620
7629
|
* plugin's `app.sessionEvents.subscribe` handler spins up a bounded agent run in response to a
|
|
7621
7630
|
* published session event. `callerSessionId` carries the cause's `sourceSessionId` — the session
|
|
7622
7631
|
* whose event caused this run — and {@link SessionProvenanceRecord.causedByEvent} carries the
|
|
@@ -7798,7 +7807,7 @@ export declare type SessionHealthEntry = z.infer<typeof sessionHealthEntrySchema
|
|
|
7798
7807
|
* treats that failure as a validate-and-drop, never a throw.
|
|
7799
7808
|
*
|
|
7800
7809
|
* The telemetry lane's own `runtime.usage.session_health.observed` payload
|
|
7801
|
-
* (`@
|
|
7810
|
+
* (`@bonsai/agent-runtime`, `kay/telemetry/schema.ts`) is a SEPARATE bounded
|
|
7802
7811
|
* projection of this record, not a copy: no entry ids, no timestamps, no
|
|
7803
7812
|
* free text cross from here onto that event.
|
|
7804
7813
|
*/
|
package/dist/index.js
CHANGED
|
@@ -114,8 +114,8 @@ import { z as z2 } from "zod";
|
|
|
114
114
|
// packages/plugin-protocol/dist/common.js
|
|
115
115
|
import { z } from "zod";
|
|
116
116
|
var KAY_PLUGIN_PROTOCOL_VERSION = "kay.plugin.v1";
|
|
117
|
-
var KAY_PLUGIN_PROTOCOL_PACKAGE_NAME = "@
|
|
118
|
-
var KAY_PLUGIN_SDK_VERSION = "0.13.
|
|
117
|
+
var KAY_PLUGIN_PROTOCOL_PACKAGE_NAME = "@bonsai/plugin-protocol";
|
|
118
|
+
var KAY_PLUGIN_SDK_VERSION = "0.13.3";
|
|
119
119
|
var KAY_PLUGIN_COMPATIBLE_SDK_VERSIONS = [
|
|
120
120
|
"0.8.0",
|
|
121
121
|
"0.8.1",
|
|
@@ -135,7 +135,8 @@ var KAY_PLUGIN_COMPATIBLE_SDK_VERSIONS = [
|
|
|
135
135
|
"0.12.4",
|
|
136
136
|
"0.12.5",
|
|
137
137
|
"0.13.0",
|
|
138
|
-
"0.13.1"
|
|
138
|
+
"0.13.1",
|
|
139
|
+
"0.13.2"
|
|
139
140
|
];
|
|
140
141
|
var KAY_PLUGIN_TARGET_NAMES = [
|
|
141
142
|
"kay.agent",
|
|
@@ -307,7 +308,7 @@ var SessionCreator = z3.discriminatedUnion("kind", [
|
|
|
307
308
|
* An automation binding that fired.
|
|
308
309
|
*
|
|
309
310
|
* `triggerKind` names what the binding matched on, and `uri-change` is in the list because a
|
|
310
|
-
* durable watcher is a real condition kind (`@
|
|
311
|
+
* durable watcher is a real condition kind (`@bonsai/automations`'s `AutomationMatch`) with no
|
|
311
312
|
* spelling among the other four: it watches the world OUTSIDE the session, so it is neither a
|
|
312
313
|
* schedule nor a session-fact occurrence. Added 2026-08-19, when the automation producers
|
|
313
314
|
* landed and a watcher's report session had nothing honest to stamp.
|
|
@@ -353,7 +354,7 @@ var SessionCausedByEventShape = z3.strictObject({
|
|
|
353
354
|
kind: z3.enum(["session-event", "backfill"]).optional(),
|
|
354
355
|
/** Required when `kind` is `"session-event"` or absent; must be omitted when `kind` is `"backfill"`. */
|
|
355
356
|
event: z3.strictObject({
|
|
356
|
-
/** {@link KayAppSessionEventType} in `@
|
|
357
|
+
/** {@link KayAppSessionEventType} in `@bonsai/plugin-sdk`, mirrored: a closed, extensible union. */
|
|
357
358
|
type: z3.enum([
|
|
358
359
|
"turn-settled",
|
|
359
360
|
"phase-shift",
|
|
@@ -2590,7 +2591,7 @@ var KayUiAppHostCapability = z7.enum([
|
|
|
2590
2591
|
"automations.read",
|
|
2591
2592
|
"automations.run",
|
|
2592
2593
|
// Grants exactly `panes.place` (see `WORKSPACE_VERB_TIERS`/`KayWorkspaceCommand` in
|
|
2593
|
-
// `@
|
|
2594
|
+
// `@bonsai/agent-runtime-protocol`) through the `kay.ui` capability broker's `workspace.place`.
|
|
2594
2595
|
"workspace.place-pane",
|
|
2595
2596
|
// Grants presentation into the native header of the pane hosting this app instance.
|
|
2596
2597
|
"workspace.pane-header",
|
package/package.json
CHANGED