@yaklabs-ai/plugin-sdk 0.33.0 → 0.34.0

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.33.0"
16
+ "@bonsai/plugin-sdk": "npm:@yaklabs-ai/plugin-sdk@^0.34.0"
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.33.0" },
65
+ "compatibility": { "sdk": "^0.34.0" },
66
66
  "targets": {
67
67
  "kay": {
68
68
  "agent": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "package": "@yaklabs-ai/plugin-sdk",
4
- "version": "0.33.0",
4
+ "version": "0.34.0",
5
5
  "target": "npm",
6
6
  "firstPartyLicense": "MIT",
7
7
  "bundled": [
@@ -304,6 +304,8 @@ declare interface BackgroundTaskFailedEvent {
304
304
  readonly errorStack?: string;
305
305
  /** An agent task's run failure reason; see `BackgroundTaskCompletion.failureReason` in `@herd/plugin-primitives`. */
306
306
  readonly failureReason?: RunFailureReason;
307
+ /** The run failure record the task relays; see `BackgroundTaskCompletion.failureRef`. */
308
+ readonly failureRef?: FailureRef;
307
309
  readonly snapshot?: BackgroundTaskSnapshot;
308
310
  }
309
311
 
@@ -681,7 +681,15 @@ var TOOL_CALL_FAILURE_CODES = [
681
681
  "uri.not_connected.sign_in_expired",
682
682
  "tool.blocked.by_user",
683
683
  "tool.blocked.by_rule",
684
- "tool.blocked.by_bonsai"
684
+ "tool.blocked.by_bonsai",
685
+ // Situation codes that split the settings block (`by_rule` now means a
686
+ // Permissions rule only) and the Bonsai block further. Same reading rules
687
+ // as above.
688
+ "tool.blocked.by_mode",
689
+ "tool.blocked.protected_path",
690
+ "tool.blocked.approval_not_shown",
691
+ "tool.blocked.unverified",
692
+ "tool.blocked.edits_not_applied"
685
693
  ];
686
694
  var count = z5.number().int().nonnegative();
687
695
  var toolCallFailureDetailsSchema = z5.strictObject({
@@ -337,6 +337,11 @@ declare interface BackgroundTaskCompletion {
337
337
  readonly errorStack?: string;
338
338
  /** Why a failed AGENT task's run failed, classified from what it threw; absent for other kinds. */
339
339
  readonly failureReason?: RunFailureReason;
340
+ /** The run failure record a failed agent task relays, when its run already recorded one. */
341
+ readonly failureRef?: {
342
+ readonly authority: string;
343
+ readonly id: string;
344
+ };
340
345
  }
341
346
 
342
347
  declare type BackgroundTaskInspector = () => Promise<string> | string;
@@ -2371,8 +2376,12 @@ declare const KAY_PLUGIN_PROTOCOL_VERSION: "kay.plugin.v1";
2371
2376
  * under `kay.ui` `contributes` names each command's title, icon file, `button`, `menu` and `where`,
2372
2377
  * and `api.implementCommand(localId, handler)` supplies what it does. `placement` is gone and `icon`
2373
2378
  * is now a file path: nothing ever read either. A plugin that declares a command declares ^0.33.0.
2379
+ *
2380
+ * 0.34.0 lets a rail entry declare a sidebar (#15901). `panel.body` on a `railEntries` entry names
2381
+ * what fills it, either a `contextOnly` app in the plugin or a body the host ships. Additive: a rail
2382
+ * entry with no `panel` still opens its page alone. A plugin that declares a panel declares ^0.34.0.
2374
2383
  */
2375
- declare const KAY_PLUGIN_SDK_VERSION: "0.33.0";
2384
+ declare const KAY_PLUGIN_SDK_VERSION: "0.34.0";
2376
2385
 
2377
2386
  declare const KAY_PLUGIN_TARGET_NAMES: readonly ["kay.agent", "kay.app", "kay.ui"];
2378
2387
 
@@ -7625,7 +7634,7 @@ declare type TOmitInstantiate<Context extends TProperties, State extends TState,
7625
7634
  * classification (the engine records the rejection on an unexplained failure),
7626
7635
  * and a stored record with one reads as none.
7627
7636
  */
7628
- declare const TOOL_CALL_FAILURE_CODES: readonly ["tool.invalid_input", "tool.blocked", "tool.cancelled", "tool.timeout", "tool.not_found", "tool.unavailable", "tool.execution_failed", "tool.auth_unavailable", "tool.replies_owed", "provider.http", "provider.api", "provider.transport", "uri.not_found", "uri.unsupported_operation", "uri.not_connected", "uri.auth_unavailable", "permission.denied", "edit.empty_edits", "edit.text_not_found", "edit.text_not_unique", "edit.empty_old_text", "edit.overlapping_edits", "edit.no_change", "uri.not_connected.pick_account", "uri.not_connected.account_not_allowed", "uri.not_connected.sign_in_expired", "tool.blocked.by_user", "tool.blocked.by_rule", "tool.blocked.by_bonsai"];
7637
+ declare const TOOL_CALL_FAILURE_CODES: readonly ["tool.invalid_input", "tool.blocked", "tool.cancelled", "tool.timeout", "tool.not_found", "tool.unavailable", "tool.execution_failed", "tool.auth_unavailable", "tool.replies_owed", "provider.http", "provider.api", "provider.transport", "uri.not_found", "uri.unsupported_operation", "uri.not_connected", "uri.auth_unavailable", "permission.denied", "edit.empty_edits", "edit.text_not_found", "edit.text_not_unique", "edit.empty_old_text", "edit.overlapping_edits", "edit.no_change", "uri.not_connected.pick_account", "uri.not_connected.account_not_allowed", "uri.not_connected.sign_in_expired", "tool.blocked.by_user", "tool.blocked.by_rule", "tool.blocked.by_bonsai", "tool.blocked.by_mode", "tool.blocked.protected_path", "tool.blocked.approval_not_shown", "tool.blocked.unverified", "tool.blocked.edits_not_applied"];
7629
7638
 
7630
7639
  /**
7631
7640
  * ---
@@ -312,6 +312,11 @@ declare interface BackgroundTaskCompletion {
312
312
  readonly errorStack?: string;
313
313
  /** Why a failed AGENT task's run failed, classified from what it threw; absent for other kinds. */
314
314
  readonly failureReason?: RunFailureReason;
315
+ /** The run failure record a failed agent task relays, when its run already recorded one. */
316
+ readonly failureRef?: {
317
+ readonly authority: string;
318
+ readonly id: string;
319
+ };
315
320
  }
316
321
 
317
322
  declare type BackgroundTaskInspector = () => Promise<string> | string;
@@ -2425,8 +2430,12 @@ declare const KAY_PLUGIN_PROTOCOL_VERSION: "kay.plugin.v1";
2425
2430
  * under `kay.ui` `contributes` names each command's title, icon file, `button`, `menu` and `where`,
2426
2431
  * and `api.implementCommand(localId, handler)` supplies what it does. `placement` is gone and `icon`
2427
2432
  * is now a file path: nothing ever read either. A plugin that declares a command declares ^0.33.0.
2433
+ *
2434
+ * 0.34.0 lets a rail entry declare a sidebar (#15901). `panel.body` on a `railEntries` entry names
2435
+ * what fills it, either a `contextOnly` app in the plugin or a body the host ships. Additive: a rail
2436
+ * entry with no `panel` still opens its page alone. A plugin that declares a panel declares ^0.34.0.
2428
2437
  */
2429
- declare const KAY_PLUGIN_SDK_VERSION: "0.33.0";
2438
+ declare const KAY_PLUGIN_SDK_VERSION: "0.34.0";
2430
2439
 
2431
2440
  declare const KAY_PLUGIN_TARGET_NAMES: readonly ["kay.agent", "kay.app", "kay.ui"];
2432
2441
 
@@ -8696,7 +8705,7 @@ declare type TOmitInstantiate<Context extends TProperties, State extends TState,
8696
8705
  * classification (the engine records the rejection on an unexplained failure),
8697
8706
  * and a stored record with one reads as none.
8698
8707
  */
8699
- declare const TOOL_CALL_FAILURE_CODES: readonly ["tool.invalid_input", "tool.blocked", "tool.cancelled", "tool.timeout", "tool.not_found", "tool.unavailable", "tool.execution_failed", "tool.auth_unavailable", "tool.replies_owed", "provider.http", "provider.api", "provider.transport", "uri.not_found", "uri.unsupported_operation", "uri.not_connected", "uri.auth_unavailable", "permission.denied", "edit.empty_edits", "edit.text_not_found", "edit.text_not_unique", "edit.empty_old_text", "edit.overlapping_edits", "edit.no_change", "uri.not_connected.pick_account", "uri.not_connected.account_not_allowed", "uri.not_connected.sign_in_expired", "tool.blocked.by_user", "tool.blocked.by_rule", "tool.blocked.by_bonsai"];
8708
+ declare const TOOL_CALL_FAILURE_CODES: readonly ["tool.invalid_input", "tool.blocked", "tool.cancelled", "tool.timeout", "tool.not_found", "tool.unavailable", "tool.execution_failed", "tool.auth_unavailable", "tool.replies_owed", "provider.http", "provider.api", "provider.transport", "uri.not_found", "uri.unsupported_operation", "uri.not_connected", "uri.auth_unavailable", "permission.denied", "edit.empty_edits", "edit.text_not_found", "edit.text_not_unique", "edit.empty_old_text", "edit.overlapping_edits", "edit.no_change", "uri.not_connected.pick_account", "uri.not_connected.account_not_allowed", "uri.not_connected.sign_in_expired", "tool.blocked.by_user", "tool.blocked.by_rule", "tool.blocked.by_bonsai", "tool.blocked.by_mode", "tool.blocked.protected_path", "tool.blocked.approval_not_shown", "tool.blocked.unverified", "tool.blocked.edits_not_applied"];
8700
8709
 
8701
8710
  /**
8702
8711
  * ---
@@ -405,6 +405,11 @@ declare interface BackgroundTaskCompletion {
405
405
  readonly errorStack?: string;
406
406
  /** Why a failed AGENT task's run failed, classified from what it threw; absent for other kinds. */
407
407
  readonly failureReason?: RunFailureReason;
408
+ /** The run failure record a failed agent task relays, when its run already recorded one. */
409
+ readonly failureRef?: {
410
+ readonly authority: string;
411
+ readonly id: string;
412
+ };
408
413
  }
409
414
 
410
415
  declare type BackgroundTaskInspector = () => Promise<string> | string;
@@ -2700,8 +2705,12 @@ declare const KAY_PLUGIN_PROTOCOL_VERSION: "kay.plugin.v1";
2700
2705
  * under `kay.ui` `contributes` names each command's title, icon file, `button`, `menu` and `where`,
2701
2706
  * and `api.implementCommand(localId, handler)` supplies what it does. `placement` is gone and `icon`
2702
2707
  * is now a file path: nothing ever read either. A plugin that declares a command declares ^0.33.0.
2708
+ *
2709
+ * 0.34.0 lets a rail entry declare a sidebar (#15901). `panel.body` on a `railEntries` entry names
2710
+ * what fills it, either a `contextOnly` app in the plugin or a body the host ships. Additive: a rail
2711
+ * entry with no `panel` still opens its page alone. A plugin that declares a panel declares ^0.34.0.
2703
2712
  */
2704
- declare const KAY_PLUGIN_SDK_VERSION: "0.33.0";
2713
+ declare const KAY_PLUGIN_SDK_VERSION: "0.34.0";
2705
2714
 
2706
2715
  declare const KAY_PLUGIN_TARGET_NAMES: readonly ["kay.agent", "kay.app", "kay.ui"];
2707
2716
 
@@ -8836,7 +8845,7 @@ declare type TOmitInstantiate<Context extends TProperties, State extends TState,
8836
8845
  * classification (the engine records the rejection on an unexplained failure),
8837
8846
  * and a stored record with one reads as none.
8838
8847
  */
8839
- declare const TOOL_CALL_FAILURE_CODES: readonly ["tool.invalid_input", "tool.blocked", "tool.cancelled", "tool.timeout", "tool.not_found", "tool.unavailable", "tool.execution_failed", "tool.auth_unavailable", "tool.replies_owed", "provider.http", "provider.api", "provider.transport", "uri.not_found", "uri.unsupported_operation", "uri.not_connected", "uri.auth_unavailable", "permission.denied", "edit.empty_edits", "edit.text_not_found", "edit.text_not_unique", "edit.empty_old_text", "edit.overlapping_edits", "edit.no_change", "uri.not_connected.pick_account", "uri.not_connected.account_not_allowed", "uri.not_connected.sign_in_expired", "tool.blocked.by_user", "tool.blocked.by_rule", "tool.blocked.by_bonsai"];
8848
+ declare const TOOL_CALL_FAILURE_CODES: readonly ["tool.invalid_input", "tool.blocked", "tool.cancelled", "tool.timeout", "tool.not_found", "tool.unavailable", "tool.execution_failed", "tool.auth_unavailable", "tool.replies_owed", "provider.http", "provider.api", "provider.transport", "uri.not_found", "uri.unsupported_operation", "uri.not_connected", "uri.auth_unavailable", "permission.denied", "edit.empty_edits", "edit.text_not_found", "edit.text_not_unique", "edit.empty_old_text", "edit.overlapping_edits", "edit.no_change", "uri.not_connected.pick_account", "uri.not_connected.account_not_allowed", "uri.not_connected.sign_in_expired", "tool.blocked.by_user", "tool.blocked.by_rule", "tool.blocked.by_bonsai", "tool.blocked.by_mode", "tool.blocked.protected_path", "tool.blocked.approval_not_shown", "tool.blocked.unverified", "tool.blocked.edits_not_applied"];
8840
8849
 
8841
8850
  /**
8842
8851
  * ---
package/dist/kay-app.d.ts CHANGED
@@ -390,6 +390,11 @@ declare interface BackgroundTaskCompletion {
390
390
  readonly errorStack?: string;
391
391
  /** Why a failed AGENT task's run failed, classified from what it threw; absent for other kinds. */
392
392
  readonly failureReason?: RunFailureReason;
393
+ /** The run failure record a failed agent task relays, when its run already recorded one. */
394
+ readonly failureRef?: {
395
+ readonly authority: string;
396
+ readonly id: string;
397
+ };
393
398
  }
394
399
 
395
400
  declare type BackgroundTaskInspector = () => Promise<string> | string;
@@ -2655,8 +2660,12 @@ declare const KAY_PLUGIN_PROTOCOL_VERSION: "kay.plugin.v1";
2655
2660
  * under `kay.ui` `contributes` names each command's title, icon file, `button`, `menu` and `where`,
2656
2661
  * and `api.implementCommand(localId, handler)` supplies what it does. `placement` is gone and `icon`
2657
2662
  * is now a file path: nothing ever read either. A plugin that declares a command declares ^0.33.0.
2663
+ *
2664
+ * 0.34.0 lets a rail entry declare a sidebar (#15901). `panel.body` on a `railEntries` entry names
2665
+ * what fills it, either a `contextOnly` app in the plugin or a body the host ships. Additive: a rail
2666
+ * entry with no `panel` still opens its page alone. A plugin that declares a panel declares ^0.34.0.
2658
2667
  */
2659
- declare const KAY_PLUGIN_SDK_VERSION: "0.33.0";
2668
+ declare const KAY_PLUGIN_SDK_VERSION: "0.34.0";
2660
2669
 
2661
2670
  declare const KAY_PLUGIN_TARGET_NAMES: readonly ["kay.agent", "kay.app", "kay.ui"];
2662
2671
 
@@ -13565,7 +13574,7 @@ declare interface Tool<TParameters extends TSchema = TSchema> {
13565
13574
  * classification (the engine records the rejection on an unexplained failure),
13566
13575
  * and a stored record with one reads as none.
13567
13576
  */
13568
- declare const TOOL_CALL_FAILURE_CODES: readonly ["tool.invalid_input", "tool.blocked", "tool.cancelled", "tool.timeout", "tool.not_found", "tool.unavailable", "tool.execution_failed", "tool.auth_unavailable", "tool.replies_owed", "provider.http", "provider.api", "provider.transport", "uri.not_found", "uri.unsupported_operation", "uri.not_connected", "uri.auth_unavailable", "permission.denied", "edit.empty_edits", "edit.text_not_found", "edit.text_not_unique", "edit.empty_old_text", "edit.overlapping_edits", "edit.no_change", "uri.not_connected.pick_account", "uri.not_connected.account_not_allowed", "uri.not_connected.sign_in_expired", "tool.blocked.by_user", "tool.blocked.by_rule", "tool.blocked.by_bonsai"];
13577
+ declare const TOOL_CALL_FAILURE_CODES: readonly ["tool.invalid_input", "tool.blocked", "tool.cancelled", "tool.timeout", "tool.not_found", "tool.unavailable", "tool.execution_failed", "tool.auth_unavailable", "tool.replies_owed", "provider.http", "provider.api", "provider.transport", "uri.not_found", "uri.unsupported_operation", "uri.not_connected", "uri.auth_unavailable", "permission.denied", "edit.empty_edits", "edit.text_not_found", "edit.text_not_unique", "edit.empty_old_text", "edit.overlapping_edits", "edit.no_change", "uri.not_connected.pick_account", "uri.not_connected.account_not_allowed", "uri.not_connected.sign_in_expired", "tool.blocked.by_user", "tool.blocked.by_rule", "tool.blocked.by_bonsai", "tool.blocked.by_mode", "tool.blocked.protected_path", "tool.blocked.approval_not_shown", "tool.blocked.unverified", "tool.blocked.edits_not_applied"];
13569
13578
 
13570
13579
  /**
13571
13580
  * ---
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yaklabs-ai/plugin-sdk",
3
- "version": "0.33.0",
3
+ "version": "0.34.0",
4
4
  "description": "The Kay plugin SDK — types and helpers for authoring a Kay directory plugin.",
5
5
  "author": "YakLabs",
6
6
  "type": "module",
@@ -129,7 +129,9 @@ plugin UI contributes through `api.slots` (`registerPage`, `registerSidebarItem`
129
129
  `packages/kay-renderer/src/renderer/src/extension-loader/build-extension-api.ts`). A page gets its own
130
130
  activity-rail button when the manifest declares it: `railEntries` under `targets.kay.ui.contributes`,
131
131
  with `id`, `title` and `page`, and optionally `icon`, `shortcut`, `order` and `section`. That
132
- declaration works with no `ui.tsx` at all.
132
+ declaration works with no `ui.tsx` at all. To give the entry a sidebar, add `panel: { body }` naming
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.
133
135
 
134
136
  **Icons: declare one plugin icon, override only where you mean it.** Set the manifest `icon` (a
135
137
  package-relative SVG) and every surface the plugin contributes inherits it: reference pills, its