@yaklabs-ai/plugin-sdk 0.15.2 → 0.26.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
@@ -13,7 +13,7 @@ it under the name your plugin code actually imports:
13
13
  ```json
14
14
  {
15
15
  "dependencies": {
16
- "@bonsai/plugin-sdk": "npm:@yaklabs-ai/plugin-sdk@^0.15.2"
16
+ "@bonsai/plugin-sdk": "npm:@yaklabs-ai/plugin-sdk@^0.26.3"
17
17
  }
18
18
  }
19
19
  ```
@@ -62,7 +62,7 @@ Every tool the entrypoint registers is declared in the manifest too:
62
62
  "description": "Greets people by name.",
63
63
  "version": "0.1.0",
64
64
  "namespace": "widgets",
65
- "compatibility": { "sdk": "^0.15.2" },
65
+ "compatibility": { "sdk": "^0.26.3" },
66
66
  "targets": {
67
67
  "kay": {
68
68
  "agent": {
@@ -109,6 +109,24 @@ export default function activate(api: KayAgentPluginApi): void {
109
109
  }
110
110
  ```
111
111
 
112
+ The manifest can instead describe the tool whole. Give the entry `parameters` (a JSON Schema,
113
+ here `{ "type": "object", "properties": { "name": { "type": "string" } }, "required": ["name"] }`),
114
+ and the entrypoint supplies only the call. Bonsai builds the tool from the manifest entry:
115
+
116
+ ```ts
117
+ import { textResult, toolExecute, z } from "@bonsai/plugin-sdk/kay-agent";
118
+ import type { KayAgentPluginApi } from "@bonsai/plugin-sdk/kay-agent";
119
+
120
+ export default function activate(api: KayAgentPluginApi): void {
121
+ api.implementTool(
122
+ "greet",
123
+ toolExecute(z.object({ name: z.string() }), async (_toolCallId, params) =>
124
+ textResult(`Hello, ${params.name}!`, undefined),
125
+ ),
126
+ );
127
+ }
128
+ ```
129
+
112
130
  An entrypoint that exports a named `activate` instead, as older plugins do,
113
131
  still loads. Bonsai reads the default export from plugin SDK 0.13.5 on, and the
114
132
  `compatibility.sdk` range makes an older Bonsai refuse the plugin with a message
@@ -131,13 +149,15 @@ naming both versions, instead of loading it and finding no `activate`.
131
149
  | `@bonsai/plugin-sdk/system-one` | The types and error class for `api.systemOne` / `app.systemOne`, from 0.13.8 |
132
150
  | `@bonsai/plugin-sdk/zod` | `z` (the host's in the daemon), on an entry with no other import, from 0.13.9 |
133
151
 
134
- A plugin that imports a subpath declares at least the version its row names (`^0.13.7` for the
135
- four from 0.13.7, `^0.13.8` for `system-one`, `^0.13.9` for `zod`). `vendored-mcp` builds the plugin's URI module (its link cards and help); hosting the
152
+ A plugin that imports these subpaths declares the current supported SDK range (`^0.19.0`).
153
+ The rows record when each subpath appeared, not retained runtime compatibility. `vendored-mcp` builds the plugin's URI module (its link cards and help); hosting the
136
154
  vendor's MCP server itself is a separate host decision: Bonsai hosts it once a person approves
137
155
  the plugin's `mcp.host-server` grant for that server's name and URL. A server that needs an OAuth
138
156
  sign-in names one of the plugin's auth services in `authService`; that service must declare exactly
139
157
  one `delegated` scheme, which Bonsai uses to sign the person in to the server. Bonsai declares that
140
- scheme at runtime; the plugin's code must not declare it again.
158
+ scheme at runtime; the plugin's code must not declare it again. From 0.16.2 a plugin's code can also
159
+ call the server's tools through `api.vendoredMcp.port(<server>)`, typed by this subpath's
160
+ `VendoredMcpPort` and `VendoredMcpOutcome` (declare `^0.19.0`).
141
161
 
142
162
  From 0.13.10 the manifest schema carries two facts Bonsai reads for its own plugins only; another
143
163
  plugin's are ignored, with a load diagnostic. An `external-cli` auth scheme's `cli` says how Bonsai
@@ -1,28 +1,28 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "package": "@yaklabs-ai/plugin-sdk",
4
- "version": "0.15.2",
4
+ "version": "0.26.3",
5
5
  "target": "npm",
6
6
  "firstPartyLicense": "MIT",
7
7
  "bundled": [
8
8
  {
9
9
  "name": "@earendil-works/pi-ai",
10
- "version": "1.3.0",
10
+ "version": "1.4.0",
11
11
  "license": "MIT",
12
12
  "copyright": "Copyright (c) 2025 Mario Zechner",
13
- "source": "https://github.com/earendil-works/pi/tree/v1.3.0/packages/ai",
14
- "licenseSource": "https://github.com/earendil-works/pi/blob/v1.3.0/LICENSE",
15
- "upstreamCommit": "71023aec1546d6d677a65669c5665c0927ce0dd0",
13
+ "source": "https://github.com/earendil-works/pi/tree/v1.4.0/packages/ai",
14
+ "licenseSource": "https://github.com/earendil-works/pi/blob/v1.4.0/LICENSE",
15
+ "upstreamCommit": "4a080252f06caf63a525d7873c5d94d3c23887e0",
16
16
  "noticeFile": "THIRD-PARTY-NOTICES.md"
17
17
  },
18
18
  {
19
19
  "name": "@earendil-works/chord",
20
- "version": "1.3.0",
20
+ "version": "1.4.0",
21
21
  "license": "MIT",
22
22
  "copyright": "Copyright (c) 2025 Mario Zechner",
23
- "source": "https://github.com/earendil-works/pi/tree/v1.3.0/packages/chord",
24
- "licenseSource": "https://github.com/earendil-works/pi/blob/v1.3.0/LICENSE",
25
- "upstreamCommit": "71023aec1546d6d677a65669c5665c0927ce0dd0",
23
+ "source": "https://github.com/earendil-works/pi/tree/v1.4.0/packages/chord",
24
+ "licenseSource": "https://github.com/earendil-works/pi/blob/v1.4.0/LICENSE",
25
+ "upstreamCommit": "4a080252f06caf63a525d7873c5d94d3c23887e0",
26
26
  "noticeFile": "THIRD-PARTY-NOTICES.md"
27
27
  },
28
28
  {
@@ -2,17 +2,17 @@
2
2
 
3
3
  This package bundles 3 first-party-selected component(s). The notices below are reproduced verbatim from each component's upstream MIT license source.
4
4
 
5
- ## @earendil-works/pi-ai@1.3.0
5
+ ## @earendil-works/pi-ai@1.4.0
6
6
 
7
- - Source: https://github.com/earendil-works/pi/tree/v1.3.0/packages/ai
8
- - License source: https://github.com/earendil-works/pi/blob/v1.3.0/LICENSE
9
- - Upstream commit: 71023aec1546d6d677a65669c5665c0927ce0dd0
7
+ - Source: https://github.com/earendil-works/pi/tree/v1.4.0/packages/ai
8
+ - License source: https://github.com/earendil-works/pi/blob/v1.4.0/LICENSE
9
+ - Upstream commit: 4a080252f06caf63a525d7873c5d94d3c23887e0
10
10
 
11
- ## @earendil-works/chord@1.3.0
11
+ ## @earendil-works/chord@1.4.0
12
12
 
13
- - Source: https://github.com/earendil-works/pi/tree/v1.3.0/packages/chord
14
- - License source: https://github.com/earendil-works/pi/blob/v1.3.0/LICENSE
15
- - Upstream commit: 71023aec1546d6d677a65669c5665c0927ce0dd0
13
+ - Source: https://github.com/earendil-works/pi/tree/v1.4.0/packages/chord
14
+ - License source: https://github.com/earendil-works/pi/blob/v1.4.0/LICENSE
15
+ - Upstream commit: 4a080252f06caf63a525d7873c5d94d3c23887e0
16
16
 
17
17
  License text for the component(s) above, verbatim from the license source:
18
18
 
@@ -8,7 +8,7 @@ export declare function admittedSendSessionId(details: unknown): string | undefi
8
8
  * forever: version 2 (the messaging contract) writes
9
9
  * `{ version: 2, sessionId, displayName, backgroundTaskId }` and exists only
10
10
  * for admitted spawns (rejections are tool errors and stamp nothing);
11
- * version 1 wrote `{ version: 1, accepted, childSessionId, label, … }`, where
11
+ * version 1 wrote `{ version: 1, accepted, childSessionId, label, ... }`, where
12
12
  * `accepted: false` carries no child session.
13
13
  */
14
14
  export declare function admittedSpawnSessionId(details: unknown): string | undefined;