@yaklabs-ai/plugin-sdk 0.36.0 → 0.37.1
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/disclosure.d.ts +17 -1
- package/dist/disclosure.js +1 -0
- package/dist/kay-agent-testing.d.ts +18 -2
- package/dist/kay-agent-testing.js +1 -0
- package/dist/kay-agent.d.ts +17 -1
- package/dist/kay-app.d.ts +17 -1
- package/package.json +1 -1
- package/skills/directory-plugin-authoring/SKILL.md +4 -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.
|
|
16
|
+
"@bonsai/plugin-sdk": "npm:@yaklabs-ai/plugin-sdk@^0.37.1"
|
|
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.
|
|
65
|
+
"compatibility": { "sdk": "^0.37.1" },
|
|
66
66
|
"targets": {
|
|
67
67
|
"kay": {
|
|
68
68
|
"agent": {
|
package/dist/disclosure.d.ts
CHANGED
|
@@ -2390,8 +2390,17 @@ declare const KAY_PLUGIN_PROTOCOL_VERSION: "kay.plugin.v1";
|
|
|
2390
2390
|
* under `kay.ui` `contributes` names each page's title, icon file, companion status and opened
|
|
2391
2391
|
* event. A reference presentation that opens a page gains `scheme` and `addresses`, and may leave
|
|
2392
2392
|
* out `uriModule` when another layer serves the address. A plugin using these declares ^0.36.0.
|
|
2393
|
+
*
|
|
2394
|
+
* 0.37.0 lets a notification rule's toast declare a preview (#15904). `toastPreviews` under `kay.ui`
|
|
2395
|
+
* `contributes` names the `rule`, the `body` that fills the preview, either a `contextOnly` app in
|
|
2396
|
+
* the plugin or a body the host ships, and the `address` it is about. Additive. A plugin that
|
|
2397
|
+
* declares a preview declares ^0.37.0.
|
|
2398
|
+
*
|
|
2399
|
+
* 0.37.1 adds the required, ungated `featureFlags.value(key)` reader to both backend targets.
|
|
2400
|
+
* Unknown keys return false; the host supplies evaluated values before activation and updates them.
|
|
2401
|
+
* Additive: existing plugins keep loading. A consumer declares ^0.37.1.
|
|
2393
2402
|
*/
|
|
2394
|
-
declare const KAY_PLUGIN_SDK_VERSION: "0.
|
|
2403
|
+
declare const KAY_PLUGIN_SDK_VERSION: "0.37.1";
|
|
2395
2404
|
|
|
2396
2405
|
declare const KAY_PLUGIN_TARGET_NAMES: readonly ["kay.agent", "kay.app", "kay.ui"];
|
|
2397
2406
|
|
|
@@ -2679,6 +2688,7 @@ declare interface KayAgentPluginApi {
|
|
|
2679
2688
|
* the same zone-of-record port the session stamp uses; see {@link KayAppTime.snapshot}.
|
|
2680
2689
|
*/
|
|
2681
2690
|
readonly time: KayAppTime;
|
|
2691
|
+
readonly featureFlags: PluginFeatureFlags;
|
|
2682
2692
|
/**
|
|
2683
2693
|
* File I/O in user folders, run by the host on its own worker threads under a deadline and
|
|
2684
2694
|
* answered as a typed result. Always present and ungated: it takes absolute paths and checks no
|
|
@@ -4327,6 +4337,12 @@ declare const PluginEventPublishInput: z.ZodObject<{
|
|
|
4327
4337
|
|
|
4328
4338
|
declare type PluginEventPublishInput = z.infer<typeof PluginEventPublishInput>;
|
|
4329
4339
|
|
|
4340
|
+
/** Evaluated Bonsai rollout values supplied by the host, without I/O or a grant. */
|
|
4341
|
+
declare interface PluginFeatureFlags {
|
|
4342
|
+
/** Read the current boolean; unknown keys return false. */
|
|
4343
|
+
readonly value: (key: string) => boolean;
|
|
4344
|
+
}
|
|
4345
|
+
|
|
4330
4346
|
declare const PluginId: z.ZodString;
|
|
4331
4347
|
|
|
4332
4348
|
declare type PluginId = z.infer<typeof PluginId>;
|
package/dist/disclosure.js
CHANGED
|
@@ -886,6 +886,7 @@ function createKayAgentProbeCapabilityHandles() {
|
|
|
886
886
|
// Dropped: a probe's activation is not the plugin running, so its lines are not the plugin's.
|
|
887
887
|
log: createKayPluginLog(() => {
|
|
888
888
|
}),
|
|
889
|
+
featureFlags: { value: () => false },
|
|
889
890
|
// A probe has no user-time port, so it answers the zone as unknown - the same contract the
|
|
890
891
|
// real capability keeps for a zone the host cannot read.
|
|
891
892
|
time: {
|
|
@@ -1196,7 +1196,7 @@ declare function FactorMapping(input: [unknown, unknown, unknown, unknown, unkno
|
|
|
1196
1196
|
export declare function fauxAuthContext(overrides?: Partial<ExtensionAuthContext>): ExtensionAuthContext;
|
|
1197
1197
|
|
|
1198
1198
|
/** The capability handles a `KayAgentPluginApi` always carries - authority is decided per call. */
|
|
1199
|
-
export declare type FauxKayAgentCapabilities = Pick<KayAgentPluginApi, "network" | "webSession" | "process" | "whiteboard" | "interaction" | "interceptToolCall" | "implementTool" | "systemOne" | "events" | "time" | "log" | "userFiles" | "familyFolder" | "vendoredMcp" | "endpoints" | "compiler">;
|
|
1199
|
+
export declare type FauxKayAgentCapabilities = Pick<KayAgentPluginApi, "network" | "webSession" | "process" | "whiteboard" | "interaction" | "interceptToolCall" | "implementTool" | "systemOne" | "events" | "featureFlags" | "time" | "log" | "userFiles" | "familyFolder" | "vendoredMcp" | "endpoints" | "compiler">;
|
|
1200
1200
|
|
|
1201
1201
|
export declare function fauxKayAgentCapabilities(): FauxKayAgentCapabilities;
|
|
1202
1202
|
|
|
@@ -2444,8 +2444,17 @@ declare const KAY_PLUGIN_PROTOCOL_VERSION: "kay.plugin.v1";
|
|
|
2444
2444
|
* under `kay.ui` `contributes` names each page's title, icon file, companion status and opened
|
|
2445
2445
|
* event. A reference presentation that opens a page gains `scheme` and `addresses`, and may leave
|
|
2446
2446
|
* out `uriModule` when another layer serves the address. A plugin using these declares ^0.36.0.
|
|
2447
|
+
*
|
|
2448
|
+
* 0.37.0 lets a notification rule's toast declare a preview (#15904). `toastPreviews` under `kay.ui`
|
|
2449
|
+
* `contributes` names the `rule`, the `body` that fills the preview, either a `contextOnly` app in
|
|
2450
|
+
* the plugin or a body the host ships, and the `address` it is about. Additive. A plugin that
|
|
2451
|
+
* declares a preview declares ^0.37.0.
|
|
2452
|
+
*
|
|
2453
|
+
* 0.37.1 adds the required, ungated `featureFlags.value(key)` reader to both backend targets.
|
|
2454
|
+
* Unknown keys return false; the host supplies evaluated values before activation and updates them.
|
|
2455
|
+
* Additive: existing plugins keep loading. A consumer declares ^0.37.1.
|
|
2447
2456
|
*/
|
|
2448
|
-
declare const KAY_PLUGIN_SDK_VERSION: "0.
|
|
2457
|
+
declare const KAY_PLUGIN_SDK_VERSION: "0.37.1";
|
|
2449
2458
|
|
|
2450
2459
|
declare const KAY_PLUGIN_TARGET_NAMES: readonly ["kay.agent", "kay.app", "kay.ui"];
|
|
2451
2460
|
|
|
@@ -2730,6 +2739,7 @@ declare interface KayAgentPluginApi {
|
|
|
2730
2739
|
* the same zone-of-record port the session stamp uses; see {@link KayAppTime.snapshot}.
|
|
2731
2740
|
*/
|
|
2732
2741
|
readonly time: KayAppTime;
|
|
2742
|
+
readonly featureFlags: PluginFeatureFlags;
|
|
2733
2743
|
/**
|
|
2734
2744
|
* File I/O in user folders, run by the host on its own worker threads under a deadline and
|
|
2735
2745
|
* answered as a typed result. Always present and ungated: it takes absolute paths and checks no
|
|
@@ -4342,6 +4352,12 @@ declare const PluginEventPublishInput: z.ZodObject<{
|
|
|
4342
4352
|
|
|
4343
4353
|
declare type PluginEventPublishInput = z.infer<typeof PluginEventPublishInput>;
|
|
4344
4354
|
|
|
4355
|
+
/** Evaluated Bonsai rollout values supplied by the host, without I/O or a grant. */
|
|
4356
|
+
declare interface PluginFeatureFlags {
|
|
4357
|
+
/** Read the current boolean; unknown keys return false. */
|
|
4358
|
+
readonly value: (key: string) => boolean;
|
|
4359
|
+
}
|
|
4360
|
+
|
|
4345
4361
|
declare const PluginId: z.ZodString;
|
|
4346
4362
|
|
|
4347
4363
|
declare type PluginId = z.infer<typeof PluginId>;
|
|
@@ -295,6 +295,7 @@ function fauxKayAgentCapabilities() {
|
|
|
295
295
|
// rejecting double would fail tests for a reason production never has. A test asserting what
|
|
296
296
|
// its plugin publishes overrides this handle after the spread.
|
|
297
297
|
events: { publish: () => void 0 },
|
|
298
|
+
featureFlags: { value: () => false },
|
|
298
299
|
// A test double has no user-time port, so it answers the zone as unknown - the same contract
|
|
299
300
|
// the real capability keeps for a zone the host cannot read. A test that exercises a plugin's
|
|
300
301
|
// zone-of-record path overrides this handle after the spread.
|
package/dist/kay-agent.d.ts
CHANGED
|
@@ -2719,8 +2719,17 @@ declare const KAY_PLUGIN_PROTOCOL_VERSION: "kay.plugin.v1";
|
|
|
2719
2719
|
* under `kay.ui` `contributes` names each page's title, icon file, companion status and opened
|
|
2720
2720
|
* event. A reference presentation that opens a page gains `scheme` and `addresses`, and may leave
|
|
2721
2721
|
* out `uriModule` when another layer serves the address. A plugin using these declares ^0.36.0.
|
|
2722
|
+
*
|
|
2723
|
+
* 0.37.0 lets a notification rule's toast declare a preview (#15904). `toastPreviews` under `kay.ui`
|
|
2724
|
+
* `contributes` names the `rule`, the `body` that fills the preview, either a `contextOnly` app in
|
|
2725
|
+
* the plugin or a body the host ships, and the `address` it is about. Additive. A plugin that
|
|
2726
|
+
* declares a preview declares ^0.37.0.
|
|
2727
|
+
*
|
|
2728
|
+
* 0.37.1 adds the required, ungated `featureFlags.value(key)` reader to both backend targets.
|
|
2729
|
+
* Unknown keys return false; the host supplies evaluated values before activation and updates them.
|
|
2730
|
+
* Additive: existing plugins keep loading. A consumer declares ^0.37.1.
|
|
2722
2731
|
*/
|
|
2723
|
-
declare const KAY_PLUGIN_SDK_VERSION: "0.
|
|
2732
|
+
declare const KAY_PLUGIN_SDK_VERSION: "0.37.1";
|
|
2724
2733
|
|
|
2725
2734
|
declare const KAY_PLUGIN_TARGET_NAMES: readonly ["kay.agent", "kay.app", "kay.ui"];
|
|
2726
2735
|
|
|
@@ -3037,6 +3046,7 @@ export declare interface KayAgentPluginApi {
|
|
|
3037
3046
|
* the same zone-of-record port the session stamp uses; see {@link KayAppTime.snapshot}.
|
|
3038
3047
|
*/
|
|
3039
3048
|
readonly time: KayAppTime;
|
|
3049
|
+
readonly featureFlags: PluginFeatureFlags;
|
|
3040
3050
|
/**
|
|
3041
3051
|
* File I/O in user folders, run by the host on its own worker threads under a deadline and
|
|
3042
3052
|
* answered as a typed result. Always present and ungated: it takes absolute paths and checks no
|
|
@@ -5358,6 +5368,12 @@ export declare const PluginEventPublishInput: z.ZodObject<{
|
|
|
5358
5368
|
|
|
5359
5369
|
export declare type PluginEventPublishInput = z.infer<typeof PluginEventPublishInput>;
|
|
5360
5370
|
|
|
5371
|
+
/** Evaluated Bonsai rollout values supplied by the host, without I/O or a grant. */
|
|
5372
|
+
export declare interface PluginFeatureFlags {
|
|
5373
|
+
/** Read the current boolean; unknown keys return false. */
|
|
5374
|
+
readonly value: (key: string) => boolean;
|
|
5375
|
+
}
|
|
5376
|
+
|
|
5361
5377
|
declare const PluginId: z.ZodString;
|
|
5362
5378
|
|
|
5363
5379
|
declare type PluginId = z.infer<typeof PluginId>;
|
package/dist/kay-app.d.ts
CHANGED
|
@@ -2681,8 +2681,17 @@ declare const KAY_PLUGIN_PROTOCOL_VERSION: "kay.plugin.v1";
|
|
|
2681
2681
|
* under `kay.ui` `contributes` names each page's title, icon file, companion status and opened
|
|
2682
2682
|
* event. A reference presentation that opens a page gains `scheme` and `addresses`, and may leave
|
|
2683
2683
|
* out `uriModule` when another layer serves the address. A plugin using these declares ^0.36.0.
|
|
2684
|
+
*
|
|
2685
|
+
* 0.37.0 lets a notification rule's toast declare a preview (#15904). `toastPreviews` under `kay.ui`
|
|
2686
|
+
* `contributes` names the `rule`, the `body` that fills the preview, either a `contextOnly` app in
|
|
2687
|
+
* the plugin or a body the host ships, and the `address` it is about. Additive. A plugin that
|
|
2688
|
+
* declares a preview declares ^0.37.0.
|
|
2689
|
+
*
|
|
2690
|
+
* 0.37.1 adds the required, ungated `featureFlags.value(key)` reader to both backend targets.
|
|
2691
|
+
* Unknown keys return false; the host supplies evaluated values before activation and updates them.
|
|
2692
|
+
* Additive: existing plugins keep loading. A consumer declares ^0.37.1.
|
|
2684
2693
|
*/
|
|
2685
|
-
declare const KAY_PLUGIN_SDK_VERSION: "0.
|
|
2694
|
+
declare const KAY_PLUGIN_SDK_VERSION: "0.37.1";
|
|
2686
2695
|
|
|
2687
2696
|
declare const KAY_PLUGIN_TARGET_NAMES: readonly ["kay.agent", "kay.app", "kay.ui"];
|
|
2688
2697
|
|
|
@@ -5090,6 +5099,7 @@ export declare interface KayAppPluginApi {
|
|
|
5090
5099
|
* `Intl` or `process.env.TZ`; see {@link KayAppTime.snapshot}.
|
|
5091
5100
|
*/
|
|
5092
5101
|
readonly time: KayAppTime;
|
|
5102
|
+
readonly featureFlags: PluginFeatureFlags;
|
|
5093
5103
|
/**
|
|
5094
5104
|
* A logger whose lines land in Bonsai's own log under this plugin's id. Always present and
|
|
5095
5105
|
* ungated, like {@link time}: it writes under the plugin's own name, which a plugin's console
|
|
@@ -9757,6 +9767,12 @@ export declare const PluginEventPublishInput: z.ZodObject<{
|
|
|
9757
9767
|
|
|
9758
9768
|
export declare type PluginEventPublishInput = z.infer<typeof PluginEventPublishInput>;
|
|
9759
9769
|
|
|
9770
|
+
/** Evaluated Bonsai rollout values supplied by the host, without I/O or a grant. */
|
|
9771
|
+
export declare interface PluginFeatureFlags {
|
|
9772
|
+
/** Read the current boolean; unknown keys return false. */
|
|
9773
|
+
readonly value: (key: string) => boolean;
|
|
9774
|
+
}
|
|
9775
|
+
|
|
9760
9776
|
declare const PluginId: z.ZodString;
|
|
9761
9777
|
|
|
9762
9778
|
declare type PluginId = z.infer<typeof PluginId>;
|
package/package.json
CHANGED
|
@@ -131,7 +131,10 @@ activity-rail button when the manifest declares it: `railEntries` under `targets
|
|
|
131
131
|
with `id`, `title` and `page`, and optionally `icon`, `shortcut`, `order` and `section`. That
|
|
132
132
|
declaration works with no `ui.tsx` at all. To give the entry a sidebar, add `panel: { body }` naming
|
|
133
133
|
an app in the same manifest with `contextOnly: true`. The sidebar is always there once declared, so
|
|
134
|
-
the app shows its own empty state.
|
|
134
|
+
the app shows its own empty state. To give a notification rule's toast a "Show changes" preview, add
|
|
135
|
+
a `toastPreviews` entry under `targets.kay.ui.contributes` with `rule` (the rule's `localId`), `body`
|
|
136
|
+
(a `contextOnly` app) and `address` (for example `${navigateTarget}/@diff/${revision}`). The app reads
|
|
137
|
+
the address with `useKayAppReference()`, and the toast's "Open history" opens the same address.
|
|
135
138
|
|
|
136
139
|
**Icons: declare one plugin icon, override only where you mean it.** Set the manifest `icon` (a
|
|
137
140
|
package-relative SVG) and every surface the plugin contributes inherits it: reference pills, its
|