@yaklabs-ai/plugin-sdk 0.13.3 → 0.13.5

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.13.3"
16
+ "@bonsai/plugin-sdk": "npm:@yaklabs-ai/plugin-sdk@^0.13.5"
17
17
  }
18
18
  }
19
19
  ```
@@ -51,13 +51,47 @@ the diagnostics to read when a plugin does not load. Point your agent at
51
51
  `node_modules/@bonsai/plugin-sdk/skills/directory-plugin-authoring/SKILL.md`
52
52
  before it writes any plugin code.
53
53
 
54
+ A plugin is a directory with a manifest, `kay-plugin.json`, and an entrypoint.
55
+ Every tool the entrypoint registers is declared in the manifest too:
56
+
57
+ ```json
58
+ {
59
+ "protocol": "kay.plugin.v1",
60
+ "id": "com.example.widgets",
61
+ "displayName": "Widgets",
62
+ "description": "Greets people by name.",
63
+ "version": "0.1.0",
64
+ "namespace": "widgets",
65
+ "compatibility": { "sdk": "^0.13.5" },
66
+ "targets": {
67
+ "kay": {
68
+ "agent": {
69
+ "entrypoint": { "module": "./entrypoint.ts" },
70
+ "contributes": {
71
+ "tools": [
72
+ {
73
+ "localId": "greet",
74
+ "toolName": "widgets_greet",
75
+ "description": "Greet someone by name."
76
+ }
77
+ ]
78
+ }
79
+ }
80
+ }
81
+ }
82
+ }
83
+ ```
84
+
85
+ The entrypoint, `entrypoint.ts`, default-exports the function Bonsai calls with
86
+ the plugin API:
87
+
54
88
  ```ts
55
89
  import {
56
90
  defineTool,
57
91
  textResult,
58
92
  toolParameters,
59
93
  z,
60
- type KayAgentActivate,
94
+ type KayAgentPluginApi,
61
95
  } from "@bonsai/plugin-sdk/kay-agent";
62
96
 
63
97
  const greet = defineTool({
@@ -70,13 +104,16 @@ const greet = defineTool({
70
104
  },
71
105
  });
72
106
 
73
- const activate: KayAgentActivate = (api) => {
107
+ export default function activate(api: KayAgentPluginApi): void {
74
108
  api.registerTool(greet);
75
- };
76
-
77
- export default activate;
109
+ }
78
110
  ```
79
111
 
112
+ An entrypoint that exports a named `activate` instead, as older plugins do,
113
+ still loads. Bonsai reads the default export from plugin SDK 0.13.5 on, and the
114
+ `compatibility.sdk` range makes an older Bonsai refuse the plugin with a message
115
+ naming both versions, instead of loading it and finding no `activate`.
116
+
80
117
  ## Entrypoints
81
118
 
82
119
  | Import | What it gives you |
@@ -151,7 +188,7 @@ someone remembering to cut one. If the numbers differ, a newer version exists.
151
188
  Installing this SDK gives you **types, editor completion, and a runtime you can
152
189
  execute in your own tests**. It is not what runs inside Bonsai.
153
190
 
154
- When the daemon loads your plugin, chord bundles its declared target and keeps
191
+ When the daemon loads your plugin, it bundles the declared target and keeps
155
192
  `@bonsai/plugin-sdk/*` as a host external. Those imports resolve to the SDK
156
193
  **bundled with the Bonsai app**. The host's copy always wins. That is deliberate —
157
194
  one implementation, the one the daemon is built against — but it has a
@@ -204,7 +241,7 @@ checkout script is not the standalone path. The SDK's `kay-app` declarations
204
241
  use `node:sqlite`, which TypeScript cannot resolve without the Node 24
205
242
  typings.
206
243
 
207
- When Bonsai loads your plugin, chord bundles the declared entrypoint and its
244
+ When Bonsai loads your plugin, it bundles the declared entrypoint and its
208
245
  relative imports. Multi-file entrypoints are supported, and TypeScript syntax
209
246
  that native stripping cannot execute, such as enums, namespaces, constructor
210
247
  parameter properties, and decorators, is compiled into the bundle. The host
@@ -1,38 +1,28 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "package": "@yaklabs-ai/plugin-sdk",
4
- "version": "0.13.3",
4
+ "version": "0.13.5",
5
5
  "target": "npm",
6
6
  "firstPartyLicense": "MIT",
7
7
  "bundled": [
8
- {
9
- "name": "@earendil-works/pi-agent-core",
10
- "version": "0.99.1",
11
- "license": "MIT",
12
- "copyright": "Copyright (c) 2025 Mario Zechner",
13
- "source": "https://github.com/earendil-works/pi/tree/v0.99.1/packages/agent",
14
- "licenseSource": "https://github.com/earendil-works/pi/blob/v0.99.1/LICENSE",
15
- "upstreamCommit": "d86654abb8862e201933517d6f1fce9f88dd117f",
16
- "noticeFile": "THIRD-PARTY-NOTICES.md"
17
- },
18
8
  {
19
9
  "name": "@earendil-works/pi-ai",
20
- "version": "0.99.1",
10
+ "version": "1.3.0",
21
11
  "license": "MIT",
22
12
  "copyright": "Copyright (c) 2025 Mario Zechner",
23
- "source": "https://github.com/earendil-works/pi/tree/v0.99.1/packages/ai",
24
- "licenseSource": "https://github.com/earendil-works/pi/blob/v0.99.1/LICENSE",
25
- "upstreamCommit": "d86654abb8862e201933517d6f1fce9f88dd117f",
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",
26
16
  "noticeFile": "THIRD-PARTY-NOTICES.md"
27
17
  },
28
18
  {
29
19
  "name": "@earendil-works/chord",
30
- "version": "0.99.1",
20
+ "version": "1.3.0",
31
21
  "license": "MIT",
32
22
  "copyright": "Copyright (c) 2025 Mario Zechner",
33
- "source": "https://github.com/earendil-works/pi/tree/v0.99.1/packages/chord",
34
- "licenseSource": "https://github.com/earendil-works/pi/blob/v0.99.1/LICENSE",
35
- "upstreamCommit": "d86654abb8862e201933517d6f1fce9f88dd117f",
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",
36
26
  "noticeFile": "THIRD-PARTY-NOTICES.md"
37
27
  },
38
28
  {
@@ -1,24 +1,18 @@
1
1
  # Third-party notices
2
2
 
3
- This package bundles 4 first-party-selected component(s). The notices below are reproduced verbatim from each component's upstream MIT license source.
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-agent-core@0.99.1
5
+ ## @earendil-works/pi-ai@1.3.0
6
6
 
7
- - Source: https://github.com/earendil-works/pi/tree/v0.99.1/packages/agent
8
- - License source: https://github.com/earendil-works/pi/blob/v0.99.1/LICENSE
9
- - Upstream commit: d86654abb8862e201933517d6f1fce9f88dd117f
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
10
10
 
11
- ## @earendil-works/pi-ai@0.99.1
11
+ ## @earendil-works/chord@1.3.0
12
12
 
13
- - Source: https://github.com/earendil-works/pi/tree/v0.99.1/packages/ai
14
- - License source: https://github.com/earendil-works/pi/blob/v0.99.1/LICENSE
15
- - Upstream commit: d86654abb8862e201933517d6f1fce9f88dd117f
16
-
17
- ## @earendil-works/chord@0.99.1
18
-
19
- - Source: https://github.com/earendil-works/pi/tree/v0.99.1/packages/chord
20
- - License source: https://github.com/earendil-works/pi/blob/v0.99.1/LICENSE
21
- - Upstream commit: d86654abb8862e201933517d6f1fce9f88dd117f
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
22
16
 
23
17
  License text for the component(s) above, verbatim from the license source:
24
18