@yaklabs-ai/plugin-protocol 0.13.1 → 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 CHANGED
@@ -11,7 +11,7 @@ flow.
11
11
  ```json
12
12
  {
13
13
  "dependencies": {
14
- "@kay/plugin-protocol": "npm:@yaklabs-ai/plugin-protocol@^0.13.1"
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 "@kay/plugin-protocol";
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")),
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "package": "@yaklabs-ai/plugin-protocol",
4
- "version": "0.13.1",
4
+ "version": "0.13.3",
5
5
  "target": "npm",
6
6
  "firstPartyLicense": "MIT",
7
7
  "bundled": [],
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 `@kay/vendored-cli`'s
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
- * (`@kay/agent-runtime-protocol`'s `AgentRuntimeCommandHandler`) still carries a `promptTemplate`
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"];
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: "@kay/plugin-protocol";
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 `@kay/plugin-sdk`
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 `@kay/protocol` is a SEPARATE line at its own number,
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 `@kay/plugin-sdk/phase-shift` surface that way, while `^0.7.0`
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
- * (`@kay/plugin-sdk/jev`) — Jev typed-decision inference with a required
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 `@kay/plugin-sdk/signals`): names a reader
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` (`@kay/plugin-sdk/jev`): one method,
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 `@kay/plugin-sdk/fs`, Bonsai's own `node:fs/promises`: the same functions, arguments,
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 `@kay/plugin-sdk/fs`, `userFiles` or
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,18 +2194,36 @@ 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
- * `@kay/plugin-sdk/fs` or calls `familyFolder` declares `^0.13.0`, so an older host refuses a
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 `@kay/plugin-sdk/signals`: `SignalDefinition`,
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
2204
2204
  * and a read signal carry the stored `subject` and `upstreamId` back. Additive: a plugin compiled
2205
2205
  * against 0.13.0 never sends or reads them. A plugin that imports the engine declares `^0.13.1`,
2206
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.
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`.
2207
2225
  */
2208
- export declare const KAY_PLUGIN_SDK_VERSION: "0.13.1";
2226
+ export declare const KAY_PLUGIN_SDK_VERSION: "0.13.3";
2209
2227
 
2210
2228
  export declare const KAY_PLUGIN_TARGET_NAMES: readonly ["kay.agent", "kay.app", "kay.ui"];
2211
2229
 
@@ -3329,6 +3347,7 @@ export declare const KayPluginManifestV1: z.ZodObject<{
3329
3347
  minKayVersion: z.ZodOptional<z.ZodString>;
3330
3348
  sdk: z.ZodOptional<z.ZodString>;
3331
3349
  }, z.core.$strict>>>;
3350
+ ownedByBonsai: z.ZodOptional<z.ZodBoolean>;
3332
3351
  dependencies: z.ZodOptional<z.ZodObject<{
3333
3352
  plugins: z.ZodOptional<z.ZodArray<z.ZodString>>;
3334
3353
  }, z.core.$strict>>;
@@ -3731,7 +3750,7 @@ export declare function parseResolvedPluginContractV1(value: unknown): ResolvedP
3731
3750
  export declare function parseSemver(value: string): ParsedSemver | undefined;
3732
3751
 
3733
3752
  /** Every capability slug {@link PluginCapabilityClaimV1} can express, for exhaustive table checks. */
3734
- 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"];
3753
+ 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"];
3735
3754
 
3736
3755
  /** The root `<svg>` attribute a tile icon declares itself with. */
3737
3756
  export declare const PLUGIN_ICON_SHAPE_ATTRIBUTE = "data-icon-shape";
@@ -4159,6 +4178,10 @@ export declare const PluginCapabilityClaimV1: z.ZodDiscriminatedUnion<[z.ZodObje
4159
4178
  target: z.ZodLiteral<"kay.app">;
4160
4179
  slug: z.ZodLiteral<"skills.read">;
4161
4180
  envelope: z.ZodObject<{}, z.core.$strict>;
4181
+ }, z.core.$strict>, z.ZodObject<{
4182
+ target: z.ZodLiteral<"kay.app">;
4183
+ slug: z.ZodLiteral<"tools.describe">;
4184
+ envelope: z.ZodObject<{}, z.core.$strict>;
4162
4185
  }, z.core.$strict>, z.ZodObject<{
4163
4186
  target: z.ZodLiteral<"kay.app">;
4164
4187
  slug: z.ZodLiteral<"workspace.command">;
@@ -4367,6 +4390,10 @@ export declare const PluginCapabilityDecisionV1: z.ZodDiscriminatedUnion<[z.ZodO
4367
4390
  target: z.ZodLiteral<"kay.app">;
4368
4391
  slug: z.ZodLiteral<"skills.read">;
4369
4392
  envelope: z.ZodObject<{}, z.core.$strict>;
4393
+ }, z.core.$strict>, z.ZodObject<{
4394
+ target: z.ZodLiteral<"kay.app">;
4395
+ slug: z.ZodLiteral<"tools.describe">;
4396
+ envelope: z.ZodObject<{}, z.core.$strict>;
4370
4397
  }, z.core.$strict>, z.ZodObject<{
4371
4398
  target: z.ZodLiteral<"kay.app">;
4372
4399
  slug: z.ZodLiteral<"workspace.command">;
@@ -4570,6 +4597,10 @@ export declare const PluginCapabilityDecisionV1: z.ZodDiscriminatedUnion<[z.ZodO
4570
4597
  target: z.ZodLiteral<"kay.app">;
4571
4598
  slug: z.ZodLiteral<"skills.read">;
4572
4599
  envelope: z.ZodObject<{}, z.core.$strict>;
4600
+ }, z.core.$strict>, z.ZodObject<{
4601
+ target: z.ZodLiteral<"kay.app">;
4602
+ slug: z.ZodLiteral<"tools.describe">;
4603
+ envelope: z.ZodObject<{}, z.core.$strict>;
4573
4604
  }, z.core.$strict>, z.ZodObject<{
4574
4605
  target: z.ZodLiteral<"kay.app">;
4575
4606
  slug: z.ZodLiteral<"workspace.command">;
@@ -4836,6 +4867,10 @@ export declare const PluginCapabilityRefusalV1: z.ZodObject<{
4836
4867
  target: z.ZodLiteral<"kay.app">;
4837
4868
  slug: z.ZodLiteral<"skills.read">;
4838
4869
  envelope: z.ZodObject<{}, z.core.$strict>;
4870
+ }, z.core.$strict>, z.ZodObject<{
4871
+ target: z.ZodLiteral<"kay.app">;
4872
+ slug: z.ZodLiteral<"tools.describe">;
4873
+ envelope: z.ZodObject<{}, z.core.$strict>;
4839
4874
  }, z.core.$strict>, z.ZodObject<{
4840
4875
  target: z.ZodLiteral<"kay.app">;
4841
4876
  slug: z.ZodLiteral<"workspace.command">;
@@ -7583,14 +7618,14 @@ export declare type ScopeRequirement = z.infer<typeof ScopeRequirement>;
7583
7618
  * this list. Two consequences worth knowing:
7584
7619
  *
7585
7620
  * - `sessions.create` and `sessions.run` are the two separately-granted plugin doors
7586
- * (`@kay/plugin-protocol`'s `permissions.ts`: `create` mints a persisted user-visible session,
7621
+ * (`@bonsai/plugin-protocol`'s `permissions.ts`: `create` mints a persisted user-visible session,
7587
7622
  * `run` executes a hidden headless one). Each names ITSELF at the site that mints the session;
7588
7623
  * neither is inferred from the surface string, which cannot tell them apart.
7589
7624
  * - `sessions.create` stamps a plugin creator only for a create that declares a plugin-surfaced
7590
7625
  * `system` origin. The SDK `create` door passes no origin today, so its sessions read as the
7591
7626
  * ordinary chats they are; the value is still the honest one for that door when it does.
7592
7627
  * - `agents.run` (G1, 2026-09) is the generic session-event run door
7593
- * (`app.agents.run(ref, input, cause, {fork?})`, `@kay/plugin-sdk`'s `kay-app/agents.ts`): a
7628
+ * (`app.agents.run(ref, input, cause, {fork?})`, `@bonsai/plugin-sdk`'s `kay-app/agents.ts`): a
7594
7629
  * plugin's `app.sessionEvents.subscribe` handler spins up a bounded agent run in response to a
7595
7630
  * published session event. `callerSessionId` carries the cause's `sourceSessionId` — the session
7596
7631
  * whose event caused this run — and {@link SessionProvenanceRecord.causedByEvent} carries the
@@ -7772,7 +7807,7 @@ export declare type SessionHealthEntry = z.infer<typeof sessionHealthEntrySchema
7772
7807
  * treats that failure as a validate-and-drop, never a throw.
7773
7808
  *
7774
7809
  * The telemetry lane's own `runtime.usage.session_health.observed` payload
7775
- * (`@kay/agent-runtime`, `kay/telemetry/schema.ts`) is a SEPARATE bounded
7810
+ * (`@bonsai/agent-runtime`, `kay/telemetry/schema.ts`) is a SEPARATE bounded
7776
7811
  * projection of this record, not a copy: no entry ids, no timestamps, no
7777
7812
  * free text cross from here onto that event.
7778
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 = "@kay/plugin-protocol";
118
- var KAY_PLUGIN_SDK_VERSION = "0.13.1";
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",
@@ -134,7 +134,9 @@ var KAY_PLUGIN_COMPATIBLE_SDK_VERSIONS = [
134
134
  "0.12.3",
135
135
  "0.12.4",
136
136
  "0.12.5",
137
- "0.13.0"
137
+ "0.13.0",
138
+ "0.13.1",
139
+ "0.13.2"
138
140
  ];
139
141
  var KAY_PLUGIN_TARGET_NAMES = [
140
142
  "kay.agent",
@@ -306,7 +308,7 @@ var SessionCreator = z3.discriminatedUnion("kind", [
306
308
  * An automation binding that fired.
307
309
  *
308
310
  * `triggerKind` names what the binding matched on, and `uri-change` is in the list because a
309
- * durable watcher is a real condition kind (`@kay/automations`'s `AutomationMatch`) with no
311
+ * durable watcher is a real condition kind (`@bonsai/automations`'s `AutomationMatch`) with no
310
312
  * spelling among the other four: it watches the world OUTSIDE the session, so it is neither a
311
313
  * schedule nor a session-fact occurrence. Added 2026-08-19, when the automation producers
312
314
  * landed and a watcher's report session had nothing honest to stamp.
@@ -352,7 +354,7 @@ var SessionCausedByEventShape = z3.strictObject({
352
354
  kind: z3.enum(["session-event", "backfill"]).optional(),
353
355
  /** Required when `kind` is `"session-event"` or absent; must be omitted when `kind` is `"backfill"`. */
354
356
  event: z3.strictObject({
355
- /** {@link KayAppSessionEventType} in `@kay/plugin-sdk`, mirrored: a closed, extensible union. */
357
+ /** {@link KayAppSessionEventType} in `@bonsai/plugin-sdk`, mirrored: a closed, extensible union. */
356
358
  type: z3.enum([
357
359
  "turn-settled",
358
360
  "phase-shift",
@@ -1528,6 +1530,14 @@ var PluginCapabilityClaimV1 = z6.discriminatedUnion("slug", [
1528
1530
  slug: z6.literal("skills.read"),
1529
1531
  envelope: z6.strictObject({})
1530
1532
  }),
1533
+ z6.strictObject({
1534
+ // The text an agent sees for a tool or an address in a live session, where each comes from,
1535
+ // and whether it is one of Bonsai's own. Read-only and never a call. An empty envelope because
1536
+ // the grant itself is the visibility decision, as with `skills.read`.
1537
+ target: z6.literal("kay.app"),
1538
+ slug: z6.literal("tools.describe"),
1539
+ envelope: z6.strictObject({})
1540
+ }),
1531
1541
  z6.strictObject({
1532
1542
  target: z6.literal("kay.app"),
1533
1543
  slug: z6.literal("workspace.command"),
@@ -1671,6 +1681,7 @@ var PLUGIN_CAPABILITY_SLUGS = [
1671
1681
  "corpus.read",
1672
1682
  "signals.read",
1673
1683
  "skills.read",
1684
+ "tools.describe",
1674
1685
  "workspace.command",
1675
1686
  "sessions.create",
1676
1687
  "sessions.update",
@@ -1777,6 +1788,7 @@ function sameClaim(a, b) {
1777
1788
  case "corpus.read":
1778
1789
  case "signals.read":
1779
1790
  case "skills.read":
1791
+ case "tools.describe":
1780
1792
  case "workspace.command":
1781
1793
  case "models.complete":
1782
1794
  case "jev.use":
@@ -1841,6 +1853,7 @@ function envelopePairs(a, b) {
1841
1853
  case "corpus.read":
1842
1854
  case "signals.read":
1843
1855
  case "skills.read":
1856
+ case "tools.describe":
1844
1857
  case "workspace.command":
1845
1858
  case "models.complete":
1846
1859
  case "jev.use":
@@ -2578,7 +2591,7 @@ var KayUiAppHostCapability = z7.enum([
2578
2591
  "automations.read",
2579
2592
  "automations.run",
2580
2593
  // Grants exactly `panes.place` (see `WORKSPACE_VERB_TIERS`/`KayWorkspaceCommand` in
2581
- // `@kay/agent-runtime-protocol`) through the `kay.ui` capability broker's `workspace.place`.
2594
+ // `@bonsai/agent-runtime-protocol`) through the `kay.ui` capability broker's `workspace.place`.
2582
2595
  "workspace.place-pane",
2583
2596
  // Grants presentation into the native header of the pane hosting this app instance.
2584
2597
  "workspace.pane-header",
@@ -3096,6 +3109,13 @@ var KayPluginManifestV1 = z8.strictObject({
3096
3109
  auth: PluginAuthManifest.optional(),
3097
3110
  permissions: PluginPermissionManifest.optional(),
3098
3111
  compatibility: PluginCompatibilityManifest.optional(),
3112
+ /**
3113
+ * Whether this plugin is part of Bonsai's own workbench (memory, sessions, the workspace) rather
3114
+ * than a connection to the user's outside world or a general-purpose tool. Its tools and URI
3115
+ * schemes then report `ownedByBonsai`. Honoured only for a plugin that ships with Bonsai: the
3116
+ * host reads any other plugin's flag as false. Absent ⇒ false.
3117
+ */
3118
+ ownedByBonsai: z8.boolean().optional(),
3099
3119
  /**
3100
3120
  * Explicit plugin-level dependencies — other plugins this plugin requires to be present in the
3101
3121
  * composed roster. At composition time the runtime checks each id against the accepted
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yaklabs-ai/plugin-protocol",
3
- "version": "0.13.1",
3
+ "version": "0.13.3",
4
4
  "description": "The Kay plugin manifest schema (`kay.plugin.v1`) — parse and validate a kay-plugin.json.",
5
5
  "author": "YakLabs",
6
6
  "type": "module",