@yaklabs-ai/plugin-sdk 0.55.3 → 0.55.4
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 +5 -5
- package/THIRD-PARTY-INVENTORY.json +1 -1
- package/dist/canonical-transcript.d.ts +15 -0
- package/dist/disclosure.d.ts +7 -2
- package/dist/kay-agent-testing.d.ts +6 -1
- package/dist/kay-agent.d.ts +10 -1
- package/dist/kay-app.d.ts +46 -13
- package/package.json +1 -1
- package/skills/directory-plugin-authoring/SKILL.md +1 -1
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.55.
|
|
16
|
+
"@bonsai/plugin-sdk": "npm:@yaklabs-ai/plugin-sdk@^0.55.4"
|
|
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.55.
|
|
65
|
+
"compatibility": { "sdk": "^0.55.4" },
|
|
66
66
|
"targets": {
|
|
67
67
|
"kay": {
|
|
68
68
|
"agent": {
|
|
@@ -153,7 +153,7 @@ naming both versions, instead of loading it and finding no `activate`.
|
|
|
153
153
|
| `@bonsai/plugin-sdk/system-one` | The types and error class for `api.systemOne` / `app.systemOne`, from 0.13.8 |
|
|
154
154
|
| `@bonsai/plugin-sdk/zod` | `z` (the host's in the daemon), on an entry with no other import, from 0.13.9 |
|
|
155
155
|
|
|
156
|
-
A plugin that imports these subpaths declares the current supported SDK range (`^0.55.
|
|
156
|
+
A plugin that imports these subpaths declares the current supported SDK range (`^0.55.4`).
|
|
157
157
|
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
|
|
158
158
|
vendor's MCP server itself is a separate host decision: Bonsai hosts it once a person approves
|
|
159
159
|
the plugin's `mcp.host-server` grant for that server's name and URL. A server that needs an OAuth
|
|
@@ -161,7 +161,7 @@ sign-in names one of the plugin's auth services in `authService`; that service m
|
|
|
161
161
|
one `delegated` scheme, which Bonsai uses to sign the person in to the server. Bonsai declares that
|
|
162
162
|
scheme at runtime; the plugin's code must not declare it again. From 0.16.2 a plugin's code can also
|
|
163
163
|
call the server's tools through `api.vendoredMcp.port(<server>)`, typed by this subpath's
|
|
164
|
-
`VendoredMcpPort` and `VendoredMcpOutcome` (declare `^0.55.
|
|
164
|
+
`VendoredMcpPort` and `VendoredMcpOutcome` (declare `^0.55.4`).
|
|
165
165
|
|
|
166
166
|
From 0.13.10 the manifest schema carries two facts Bonsai reads for its own plugins only; another
|
|
167
167
|
plugin's are ignored, with a load diagnostic. An `external-cli` auth scheme's `cli` says how Bonsai
|
|
@@ -243,7 +243,7 @@ Provider schemas remain authoritative; declaring a dependency grants no authorit
|
|
|
243
243
|
through `app.uri`, parse returned Markdown in the consuming plugin, and retain the read's
|
|
244
244
|
revision (or `contentDigest` from `/uri`) for edits. The old `memory.read` and `memory.write`
|
|
245
245
|
grants do not authorize the replacement scheme-and-verb calls. Contracts before 0.49.0 are
|
|
246
|
-
refused; migrate and declare `^0.55.
|
|
246
|
+
refused; migrate and declare `^0.55.4`. The current host also serves the 0.49.0 resource contract.
|
|
247
247
|
|
|
248
248
|
## What this package is, and is not, at runtime
|
|
249
249
|
|
|
@@ -805,6 +805,13 @@ declare interface CollaborationMessageDetails {
|
|
|
805
805
|
readonly kind: "message" | "progress";
|
|
806
806
|
}
|
|
807
807
|
|
|
808
|
+
/**
|
|
809
|
+
* Why a compaction committed the code-written fallback text instead of a model-written summary:
|
|
810
|
+
* the standalone executor's reasons, with every provider failure folded into `provider`. A closed
|
|
811
|
+
* set, so the reason can leave the device; `other` holds anything the executor adds later.
|
|
812
|
+
*/
|
|
813
|
+
declare const COMPACTION_FALLBACK_REASONS: readonly ["deadline", "invalid-cut", "no-callable-model", "insufficient-context", "provider", "unusable-output", "unsupported-stop-directive", "preparation", "model-resolution", "prompt-preparation", "output-validation", "other"];
|
|
814
|
+
|
|
808
815
|
declare interface CompactionEntry extends EntryBase {
|
|
809
816
|
type: "compaction";
|
|
810
817
|
summary: string;
|
|
@@ -826,6 +833,8 @@ declare interface CompactionFailedSessionEvent {
|
|
|
826
833
|
readonly durationMs: number;
|
|
827
834
|
}
|
|
828
835
|
|
|
836
|
+
declare type CompactionFallbackReason = (typeof COMPACTION_FALLBACK_REASONS)[number];
|
|
837
|
+
|
|
829
838
|
/**
|
|
830
839
|
* Why a session-initiated compaction ran. `threshold` is the pluggable-policy
|
|
831
840
|
* usage check, now consulted at TWO points - every tool-batch boundary inside a
|
|
@@ -1841,6 +1850,12 @@ declare type HerdHarnessEvent = {
|
|
|
1841
1850
|
readonly type: "session_compact";
|
|
1842
1851
|
readonly compactionEntry: CompactionEntry;
|
|
1843
1852
|
readonly fromHook: boolean;
|
|
1853
|
+
/** The measurements `herd.context.compacted` carries; see its payload. */
|
|
1854
|
+
readonly tokensBefore?: number;
|
|
1855
|
+
readonly durationMs?: number;
|
|
1856
|
+
readonly fallbackReason?: CompactionFallbackReason;
|
|
1857
|
+
readonly fallbackProviderReason?: RunFailureReason;
|
|
1858
|
+
readonly operationId?: string;
|
|
1844
1859
|
} | {
|
|
1845
1860
|
readonly type: "summary_operation_settled";
|
|
1846
1861
|
} | {
|
package/dist/disclosure.d.ts
CHANGED
|
@@ -227,7 +227,7 @@ export declare interface AuditPluginDisclosureInput {
|
|
|
227
227
|
|
|
228
228
|
/**
|
|
229
229
|
* The codegen-pair equivalence check every bundled-skill plugin hand-rolled (see
|
|
230
|
-
* `plugins/
|
|
230
|
+
* `plugins/gmail/test/gmail-plugin.test.ts`): every exported `PluginSkillDefinition`
|
|
231
231
|
* must have a matching manifest declaration (same `localId`, same `description`), and the
|
|
232
232
|
* declared `SKILL.md` file's decoded YAML name and description must match the export.
|
|
233
233
|
* The body is compared byte-for-byte after trimming surrounding whitespace.
|
|
@@ -2687,8 +2687,13 @@ declare const KAY_PLUGIN_PROTOCOL_VERSION: "kay.plugin.v1";
|
|
|
2687
2687
|
* text, at most `PLUGIN_SIGNAL_BODY_MAX` (20,000) characters. Gmail puts a mail's text there, so
|
|
2688
2688
|
* Flows can keep the messages a task came from. Additive: a plugin that publishes a body declares
|
|
2689
2689
|
* ^0.55.3.
|
|
2690
|
+
*
|
|
2691
|
+
* 0.55.4 adds `app.plugins.listServices()` under the new `plugins.read` claim: every auth service
|
|
2692
|
+
* of the installed, enabled plugins, with the plugin's id and display name and whether the person
|
|
2693
|
+
* has connected it. No account, identity or scope. Built-ins hold the claim; any other plugin needs
|
|
2694
|
+
* a grant. Additive; plugins calling it declare ^0.55.4.
|
|
2690
2695
|
*/
|
|
2691
|
-
declare const KAY_PLUGIN_SDK_VERSION: "0.55.
|
|
2696
|
+
declare const KAY_PLUGIN_SDK_VERSION: "0.55.4";
|
|
2692
2697
|
|
|
2693
2698
|
declare const KAY_PLUGIN_TARGET_NAMES: readonly ["kay.agent", "kay.app", "kay.ui"];
|
|
2694
2699
|
|
|
@@ -2741,8 +2741,13 @@ declare const KAY_PLUGIN_PROTOCOL_VERSION: "kay.plugin.v1";
|
|
|
2741
2741
|
* text, at most `PLUGIN_SIGNAL_BODY_MAX` (20,000) characters. Gmail puts a mail's text there, so
|
|
2742
2742
|
* Flows can keep the messages a task came from. Additive: a plugin that publishes a body declares
|
|
2743
2743
|
* ^0.55.3.
|
|
2744
|
+
*
|
|
2745
|
+
* 0.55.4 adds `app.plugins.listServices()` under the new `plugins.read` claim: every auth service
|
|
2746
|
+
* of the installed, enabled plugins, with the plugin's id and display name and whether the person
|
|
2747
|
+
* has connected it. No account, identity or scope. Built-ins hold the claim; any other plugin needs
|
|
2748
|
+
* a grant. Additive; plugins calling it declare ^0.55.4.
|
|
2744
2749
|
*/
|
|
2745
|
-
declare const KAY_PLUGIN_SDK_VERSION: "0.55.
|
|
2750
|
+
declare const KAY_PLUGIN_SDK_VERSION: "0.55.4";
|
|
2746
2751
|
|
|
2747
2752
|
declare const KAY_PLUGIN_TARGET_NAMES: readonly ["kay.agent", "kay.app", "kay.ui"];
|
|
2748
2753
|
|
package/dist/kay-agent.d.ts
CHANGED
|
@@ -3095,8 +3095,13 @@ declare const KAY_PLUGIN_PROTOCOL_VERSION: "kay.plugin.v1";
|
|
|
3095
3095
|
* text, at most `PLUGIN_SIGNAL_BODY_MAX` (20,000) characters. Gmail puts a mail's text there, so
|
|
3096
3096
|
* Flows can keep the messages a task came from. Additive: a plugin that publishes a body declares
|
|
3097
3097
|
* ^0.55.3.
|
|
3098
|
+
*
|
|
3099
|
+
* 0.55.4 adds `app.plugins.listServices()` under the new `plugins.read` claim: every auth service
|
|
3100
|
+
* of the installed, enabled plugins, with the plugin's id and display name and whether the person
|
|
3101
|
+
* has connected it. No account, identity or scope. Built-ins hold the claim; any other plugin needs
|
|
3102
|
+
* a grant. Additive; plugins calling it declare ^0.55.4.
|
|
3098
3103
|
*/
|
|
3099
|
-
declare const KAY_PLUGIN_SDK_VERSION: "0.55.
|
|
3104
|
+
declare const KAY_PLUGIN_SDK_VERSION: "0.55.4";
|
|
3100
3105
|
|
|
3101
3106
|
declare const KAY_PLUGIN_TARGET_NAMES: readonly ["kay.agent", "kay.app", "kay.ui"];
|
|
3102
3107
|
|
|
@@ -5441,6 +5446,10 @@ declare const PluginCapabilityRefusalV1: z.ZodObject<{
|
|
|
5441
5446
|
target: z.ZodLiteral<"kay.app">;
|
|
5442
5447
|
slug: z.ZodLiteral<"plugins.set-enabled">;
|
|
5443
5448
|
envelope: z.ZodObject<{}, z.core.$strict>;
|
|
5449
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
5450
|
+
target: z.ZodLiteral<"kay.app">;
|
|
5451
|
+
slug: z.ZodLiteral<"plugins.read">;
|
|
5452
|
+
envelope: z.ZodObject<{}, z.core.$strict>;
|
|
5444
5453
|
}, z.core.$strict>, z.ZodObject<{
|
|
5445
5454
|
target: z.ZodLiteral<"kay.app">;
|
|
5446
5455
|
slug: z.ZodLiteral<"sessions.assign-project">;
|
package/dist/kay-app.d.ts
CHANGED
|
@@ -1045,7 +1045,7 @@ declare type AgentRuntimeSessionOutcomeConfidence = z.infer<typeof AgentRuntimeS
|
|
|
1045
1045
|
|
|
1046
1046
|
/**
|
|
1047
1047
|
* How a session's work is judged to have served the user (telemetry lane
|
|
1048
|
-
* PR 5, `docs/telemetry-lane-pr5-contracts.md` §2.1).
|
|
1048
|
+
* PR 5, `docs/records/telemetry-lane-pr5-contracts.md` §2.1).
|
|
1049
1049
|
*
|
|
1050
1050
|
* `"unclear"` is a FIRST-CLASS verdict, not an error code: a judge that cannot
|
|
1051
1051
|
* tell must say so rather than guess, and the share of `unclear` is itself a
|
|
@@ -4397,8 +4397,13 @@ declare const KAY_PLUGIN_PROTOCOL_VERSION: "kay.plugin.v1";
|
|
|
4397
4397
|
* text, at most `PLUGIN_SIGNAL_BODY_MAX` (20,000) characters. Gmail puts a mail's text there, so
|
|
4398
4398
|
* Flows can keep the messages a task came from. Additive: a plugin that publishes a body declares
|
|
4399
4399
|
* ^0.55.3.
|
|
4400
|
+
*
|
|
4401
|
+
* 0.55.4 adds `app.plugins.listServices()` under the new `plugins.read` claim: every auth service
|
|
4402
|
+
* of the installed, enabled plugins, with the plugin's id and display name and whether the person
|
|
4403
|
+
* has connected it. No account, identity or scope. Built-ins hold the claim; any other plugin needs
|
|
4404
|
+
* a grant. Additive; plugins calling it declare ^0.55.4.
|
|
4400
4405
|
*/
|
|
4401
|
-
declare const KAY_PLUGIN_SDK_VERSION: "0.55.
|
|
4406
|
+
declare const KAY_PLUGIN_SDK_VERSION: "0.55.4";
|
|
4402
4407
|
|
|
4403
4408
|
declare const KAY_PLUGIN_TARGET_NAMES: readonly ["kay.agent", "kay.app", "kay.ui"];
|
|
4404
4409
|
|
|
@@ -6736,7 +6741,7 @@ export declare interface KayAppPluginApi {
|
|
|
6736
6741
|
* in the daemon process and could walk the disk to find these directories anyway, so withholding
|
|
6737
6742
|
* the path would buy friction rather than safety. It is not a containment boundary. Expect this
|
|
6738
6743
|
* posture to tighten if plugin execution is ever isolated (deferred: D1 in
|
|
6739
|
-
* `docs/plugins
|
|
6744
|
+
* `docs/decisions/2026-08-24-plugins-trust-model-decisions.md`).
|
|
6740
6745
|
*/
|
|
6741
6746
|
readonly paths: KayAppPaths;
|
|
6742
6747
|
/**
|
|
@@ -6912,9 +6917,11 @@ export declare interface KayAppPluginApi {
|
|
|
6912
6917
|
*/
|
|
6913
6918
|
readonly soul?: KayAppSoul;
|
|
6914
6919
|
/**
|
|
6915
|
-
*
|
|
6916
|
-
*
|
|
6917
|
-
*
|
|
6920
|
+
* The installed plugins. `listServices()` answers each enabled plugin's auth services and whether
|
|
6921
|
+
* each is connected, checked against `plugins.read`. `setEnabled()` is private API (only plugins
|
|
6922
|
+
* Bonsai ships; refused for any other): it turns installed plugins on and off, checked against
|
|
6923
|
+
* `plugins.set-enabled`. Absent when the host composed neither; a method the host did not
|
|
6924
|
+
* compose rejects.
|
|
6918
6925
|
*/
|
|
6919
6926
|
readonly plugins?: KayAppPlugins;
|
|
6920
6927
|
/**
|
|
@@ -7002,16 +7009,14 @@ export declare interface KayAppPluginEvents {
|
|
|
7002
7009
|
}
|
|
7003
7010
|
|
|
7004
7011
|
/**
|
|
7005
|
-
*
|
|
7006
|
-
|
|
7007
|
-
/**
|
|
7008
|
-
* Private API: only plugins Bonsai ships; refused for any other. Each call is checked against
|
|
7009
|
-
* `plugins.set-enabled`. A refused call rejects with an `Error`.
|
|
7012
|
+
* Each method is checked against its own claim at the call. A refused call rejects with an
|
|
7013
|
+
* `Error`.
|
|
7010
7014
|
*/
|
|
7011
7015
|
export declare interface KayAppPlugins {
|
|
7012
7016
|
/**
|
|
7013
|
-
*
|
|
7014
|
-
*
|
|
7017
|
+
* Private API: only plugins Bonsai ships; refused for any other. Checked against
|
|
7018
|
+
* `plugins.set-enabled`. Turn an installed plugin on, which starts its code under the grants the
|
|
7019
|
+
* user gave it, or off, which stops it. `changed` is false when it was already in that state.
|
|
7015
7020
|
*/
|
|
7016
7021
|
setEnabled(request: {
|
|
7017
7022
|
readonly pluginId: string;
|
|
@@ -7019,6 +7024,34 @@ export declare interface KayAppPlugins {
|
|
|
7019
7024
|
}): Promise<{
|
|
7020
7025
|
readonly changed: boolean;
|
|
7021
7026
|
}>;
|
|
7027
|
+
/**
|
|
7028
|
+
* Checked against `plugins.read`. Every auth service of the installed, enabled plugins, one row
|
|
7029
|
+
* per service, sorted by plugin name then service id. A plugin with no auth service is not
|
|
7030
|
+
* listed. Never resolves, decrypts, refreshes or calls a provider.
|
|
7031
|
+
*/
|
|
7032
|
+
listServices(): Promise<readonly KayAppPluginService[]>;
|
|
7033
|
+
}
|
|
7034
|
+
|
|
7035
|
+
/**
|
|
7036
|
+
* The `kay.app` plugins contract (`app.plugins`): the user's installed plugins.
|
|
7037
|
+
*/
|
|
7038
|
+
/**
|
|
7039
|
+
* One auth service an installed, enabled plugin declares, and whether the person has connected
|
|
7040
|
+
* it. Metadata only: no account, identity, scope or credential.
|
|
7041
|
+
*/
|
|
7042
|
+
export declare interface KayAppPluginService {
|
|
7043
|
+
/** The plugin that declares the service: `com.kay.integration.ramp`. */
|
|
7044
|
+
readonly pluginId: string;
|
|
7045
|
+
/** The plugin's display name, as the person reads it: `Ramp`. */
|
|
7046
|
+
readonly pluginName: string;
|
|
7047
|
+
/** The service's global id, the one a connect card names: `ramp.account`. */
|
|
7048
|
+
readonly serviceId: string;
|
|
7049
|
+
/**
|
|
7050
|
+
* True when any scheme of the service has a usable account. An account that needs reconnecting
|
|
7051
|
+
* does not count, so a service with only such accounts reads as not connected. Not proof that a
|
|
7052
|
+
* provider call will authenticate.
|
|
7053
|
+
*/
|
|
7054
|
+
readonly connected: boolean;
|
|
7022
7055
|
}
|
|
7023
7056
|
|
|
7024
7057
|
export declare interface KayAppPollerEvent {
|
package/package.json
CHANGED
|
@@ -145,7 +145,7 @@ the plugin (`"./assets/rail.svg"`). Only its shape is used, painted in the rail'
|
|
|
145
145
|
in the file are ignored, and it must be transparent where nothing should draw. A missing file is a
|
|
146
146
|
load diagnostic and the entry falls back to the plugin icon. The page the entry opens wears the same
|
|
147
147
|
icon. Full
|
|
148
|
-
precedence: `packages/kay-
|
|
148
|
+
precedence: `packages/kay-renderer/src/renderer/src/shell/contribution-icons.ts`.
|
|
149
149
|
|
|
150
150
|
`ui.tsx` has no `node_modules` of its own. Bonsai compiles it and rewrites its `react` and
|
|
151
151
|
`@bonsai/plugin-ui-sdk` imports to the host's `__KAY_UI_RUNTIME__` singletons, so the agent `tsconfig.json`
|