@yaklabs-ai/plugin-sdk 0.13.9 → 0.13.10

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.9"
16
+ "@bonsai/plugin-sdk": "npm:@yaklabs-ai/plugin-sdk@^0.13.10"
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.13.9" },
65
+ "compatibility": { "sdk": "^0.13.10" },
66
66
  "targets": {
67
67
  "kay": {
68
68
  "agent": {
@@ -139,6 +139,14 @@ sign-in names one of the plugin's auth services in `authService`; that service m
139
139
  one `delegated` scheme, which Bonsai uses to sign the person in to the server. Bonsai declares that
140
140
  scheme at runtime; the plugin's code must not declare it again.
141
141
 
142
+ From 0.13.10 the manifest schema carries two facts Bonsai reads for its own plugins only; another
143
+ plugin's are ignored, with a load diagnostic. An `external-cli` auth scheme's `cli` says how Bonsai
144
+ connects a local CLI: the `binary`, the `probe` argv (a zero exit is the connection) with the CLI's
145
+ signed-out marker (required with `login`), an optional `login` argv the CLI runs itself, the `hints` a person reads, and the
146
+ `install` argv, which Bonsai only shows or hands to an agent session and never runs. A `kay.agent`
147
+ auth grant on another plugin's sign-in (`google.account`) can carry a `frontDoor`: the door `id` and
148
+ label a product is offered under, and an optional file picker.
149
+
142
150
  `kay-agent/host` is intentionally not published; it is Bonsai's own loading
143
151
  machinery, not an authoring API.
144
152
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "package": "@yaklabs-ai/plugin-sdk",
4
- "version": "0.13.9",
4
+ "version": "0.13.10",
5
5
  "target": "npm",
6
6
  "firstPartyLicense": "MIT",
7
7
  "bundled": [
@@ -3918,18 +3918,10 @@ declare function ReturnType_2<Type extends TSchema>(type: Type, options?: TSchem
3918
3918
  /** Creates a deferred ReturnType action. */
3919
3919
  declare function ReturnTypeDeferred<Type extends TSchema>(type: Type, options?: TSchemaOptions): TReturnTypeDeferred<Type>;
3920
3920
 
3921
- /**
3922
- * ---
3923
- * responsibility: The closed vocabulary of why a model run failed, as plain data.
3924
- * owns:
3925
- * - {@link RunFailureReason}.
3926
- * does_not_own:
3927
- * - Classifying a failure into a reason (`./run-failure-classifier.ts`), or the engine's
3928
- * run-error mapping and recovery policy (`@herd/herd-agent`).
3929
- * ---
3930
- */
3931
- /** Provider-neutral factual category for a failed model run. */
3932
- declare type RunFailureReason = "auth" | "content_blocked" | "context_overflow" | "invalid_request" | "model_disabled" | "model_unavailable" | "network" | "overloaded" | "quota_exhausted" | "rate_limit" | "safeguard_block" | "seat_unpaid" | "server_error" | "stream_interrupted" | "timeout" | "unknown";
3921
+ /** Observed cause of a failed request or interrupted run. */
3922
+ declare const RUN_FAILURE_REASONS: readonly ["auth", "cancelled", "content_blocked", "context_overflow", "invalid_request", "model_disabled", "model_unavailable", "network", "organization_unavailable", "overloaded", "quota_exhausted", "rate_limit", "runtime_interrupted", "safeguard_block", "seat_unpaid", "server_error", "sign_in_required", "stream_interrupted", "timeout", "unknown"];
3923
+
3924
+ declare type RunFailureReason = (typeof RUN_FAILURE_REASONS)[number];
3933
3925
 
3934
3926
  declare namespace S {
3935
3927
  export {
@@ -3829,18 +3829,10 @@ declare function ReturnType_2<Type extends TSchema>(type: Type, options?: TSchem
3829
3829
  /** Creates a deferred ReturnType action. */
3830
3830
  declare function ReturnTypeDeferred<Type extends TSchema>(type: Type, options?: TSchemaOptions): TReturnTypeDeferred<Type>;
3831
3831
 
3832
- /**
3833
- * ---
3834
- * responsibility: The closed vocabulary of why a model run failed, as plain data.
3835
- * owns:
3836
- * - {@link RunFailureReason}.
3837
- * does_not_own:
3838
- * - Classifying a failure into a reason (`./run-failure-classifier.ts`), or the engine's
3839
- * run-error mapping and recovery policy (`@herd/herd-agent`).
3840
- * ---
3841
- */
3842
- /** Provider-neutral factual category for a failed model run. */
3843
- declare type RunFailureReason = "auth" | "content_blocked" | "context_overflow" | "invalid_request" | "model_disabled" | "model_unavailable" | "network" | "overloaded" | "quota_exhausted" | "rate_limit" | "safeguard_block" | "seat_unpaid" | "server_error" | "stream_interrupted" | "timeout" | "unknown";
3832
+ /** Observed cause of a failed request or interrupted run. */
3833
+ declare const RUN_FAILURE_REASONS: readonly ["auth", "cancelled", "content_blocked", "context_overflow", "invalid_request", "model_disabled", "model_unavailable", "network", "organization_unavailable", "overloaded", "quota_exhausted", "rate_limit", "runtime_interrupted", "safeguard_block", "seat_unpaid", "server_error", "sign_in_required", "stream_interrupted", "timeout", "unknown"];
3834
+
3835
+ declare type RunFailureReason = (typeof RUN_FAILURE_REASONS)[number];
3844
3836
 
3845
3837
  declare namespace S {
3846
3838
  export {
@@ -3021,9 +3021,9 @@ declare const KayPluginManifestV1: z.ZodObject<{
3021
3021
  responseSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<JsonValue_3, unknown, z.core.$ZodTypeInternals<JsonValue_3, unknown>>>>;
3022
3022
  }, z.core.$strict>>>;
3023
3023
  uriModules: z.ZodOptional<z.ZodArray<z.ZodObject<{
3024
+ displayName: z.ZodOptional<z.ZodString>;
3024
3025
  schemes: z.ZodArray<z.ZodString>;
3025
3026
  localId: z.ZodString;
3026
- displayName: z.ZodOptional<z.ZodString>;
3027
3027
  }, z.core.$strict>>>;
3028
3028
  dataSources: z.ZodOptional<z.ZodArray<z.ZodObject<{
3029
3029
  localId: z.ZodString;
@@ -3364,6 +3364,26 @@ declare const KayPluginManifestV1: z.ZodObject<{
3364
3364
  localId: z.ZodString;
3365
3365
  kind: z.ZodLiteral<"external-cli">;
3366
3366
  scopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
3367
+ cli: z.ZodOptional<z.ZodObject<{
3368
+ binary: z.ZodString;
3369
+ probe: z.ZodObject<{
3370
+ args: z.ZodArray<z.ZodString>;
3371
+ timeoutMs: z.ZodOptional<z.ZodNumber>;
3372
+ signedOutMarker: z.ZodOptional<z.ZodString>;
3373
+ }, z.core.$strict>;
3374
+ login: z.ZodOptional<z.ZodObject<{
3375
+ args: z.ZodArray<z.ZodString>;
3376
+ timeoutMs: z.ZodOptional<z.ZodNumber>;
3377
+ }, z.core.$strict>>;
3378
+ install: z.ZodOptional<z.ZodObject<{
3379
+ command: z.ZodString;
3380
+ args: z.ZodArray<z.ZodString>;
3381
+ }, z.core.$strict>>;
3382
+ hints: z.ZodObject<{
3383
+ install: z.ZodString;
3384
+ login: z.ZodString;
3385
+ }, z.core.$strict>;
3386
+ }, z.core.$strict>>;
3367
3387
  displayName: z.ZodOptional<z.ZodString>;
3368
3388
  agentHint: z.ZodOptional<z.ZodString>;
3369
3389
  summary: z.ZodOptional<z.ZodString>;
@@ -3431,6 +3451,18 @@ declare const KayPluginManifestV1: z.ZodObject<{
3431
3451
  kind: z.ZodLiteral<"record-id">;
3432
3452
  recordId: z.ZodString;
3433
3453
  }, z.core.$strict>], "kind">>>;
3454
+ frontDoor: z.ZodOptional<z.ZodObject<{
3455
+ id: z.ZodString;
3456
+ displayName: z.ZodString;
3457
+ resourcePicker: z.ZodOptional<z.ZodObject<{
3458
+ effect: z.ZodEnum<{
3459
+ selection: "selection";
3460
+ "resource-grant": "resource-grant";
3461
+ }>;
3462
+ mimeTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
3463
+ successNote: z.ZodOptional<z.ZodString>;
3464
+ }, z.core.$strict>>;
3465
+ }, z.core.$strict>>;
3434
3466
  }, z.core.$strict>>>;
3435
3467
  storage: z.ZodOptional<z.ZodArray<z.ZodObject<{
3436
3468
  kind: z.ZodEnum<{
@@ -3513,6 +3545,18 @@ declare const KayPluginManifestV1: z.ZodObject<{
3513
3545
  kind: z.ZodLiteral<"record-id">;
3514
3546
  recordId: z.ZodString;
3515
3547
  }, z.core.$strict>], "kind">>>;
3548
+ frontDoor: z.ZodOptional<z.ZodObject<{
3549
+ id: z.ZodString;
3550
+ displayName: z.ZodString;
3551
+ resourcePicker: z.ZodOptional<z.ZodObject<{
3552
+ effect: z.ZodEnum<{
3553
+ selection: "selection";
3554
+ "resource-grant": "resource-grant";
3555
+ }>;
3556
+ mimeTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
3557
+ successNote: z.ZodOptional<z.ZodString>;
3558
+ }, z.core.$strict>>;
3559
+ }, z.core.$strict>>;
3516
3560
  }, z.core.$strict>>>;
3517
3561
  storage: z.ZodOptional<z.ZodArray<z.ZodObject<{
3518
3562
  kind: z.ZodEnum<{
@@ -3595,6 +3639,18 @@ declare const KayPluginManifestV1: z.ZodObject<{
3595
3639
  kind: z.ZodLiteral<"record-id">;
3596
3640
  recordId: z.ZodString;
3597
3641
  }, z.core.$strict>], "kind">>>;
3642
+ frontDoor: z.ZodOptional<z.ZodObject<{
3643
+ id: z.ZodString;
3644
+ displayName: z.ZodString;
3645
+ resourcePicker: z.ZodOptional<z.ZodObject<{
3646
+ effect: z.ZodEnum<{
3647
+ selection: "selection";
3648
+ "resource-grant": "resource-grant";
3649
+ }>;
3650
+ mimeTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
3651
+ successNote: z.ZodOptional<z.ZodString>;
3652
+ }, z.core.$strict>>;
3653
+ }, z.core.$strict>>;
3598
3654
  }, z.core.$strict>>>;
3599
3655
  storage: z.ZodOptional<z.ZodArray<z.ZodObject<{
3600
3656
  kind: z.ZodEnum<{
@@ -5766,18 +5822,10 @@ declare function ReturnType_2<Type extends TSchema>(type: Type, options?: TSchem
5766
5822
  /** Creates a deferred ReturnType action. */
5767
5823
  declare function ReturnTypeDeferred<Type extends TSchema>(type: Type, options?: TSchemaOptions): TReturnTypeDeferred<Type>;
5768
5824
 
5769
- /**
5770
- * ---
5771
- * responsibility: The closed vocabulary of why a model run failed, as plain data.
5772
- * owns:
5773
- * - {@link RunFailureReason}.
5774
- * does_not_own:
5775
- * - Classifying a failure into a reason (`./run-failure-classifier.ts`), or the engine's
5776
- * run-error mapping and recovery policy (`@herd/herd-agent`).
5777
- * ---
5778
- */
5779
- /** Provider-neutral factual category for a failed model run. */
5780
- declare type RunFailureReason = "auth" | "content_blocked" | "context_overflow" | "invalid_request" | "model_disabled" | "model_unavailable" | "network" | "overloaded" | "quota_exhausted" | "rate_limit" | "safeguard_block" | "seat_unpaid" | "server_error" | "stream_interrupted" | "timeout" | "unknown";
5825
+ /** Observed cause of a failed request or interrupted run. */
5826
+ declare const RUN_FAILURE_REASONS: readonly ["auth", "cancelled", "content_blocked", "context_overflow", "invalid_request", "model_disabled", "model_unavailable", "network", "organization_unavailable", "overloaded", "quota_exhausted", "rate_limit", "runtime_interrupted", "safeguard_block", "seat_unpaid", "server_error", "sign_in_required", "stream_interrupted", "timeout", "unknown"];
5827
+
5828
+ declare type RunFailureReason = (typeof RUN_FAILURE_REASONS)[number];
5781
5829
 
5782
5830
  declare namespace S {
5783
5831
  export {
package/dist/kay-app.d.ts CHANGED
@@ -7641,18 +7641,10 @@ declare function ReturnType_2<Type extends TSchema>(type: Type, options?: TSchem
7641
7641
  /** Creates a deferred ReturnType action. */
7642
7642
  declare function ReturnTypeDeferred<Type extends TSchema>(type: Type, options?: TSchemaOptions): TReturnTypeDeferred<Type>;
7643
7643
 
7644
- /**
7645
- * ---
7646
- * responsibility: The closed vocabulary of why a model run failed, as plain data.
7647
- * owns:
7648
- * - {@link RunFailureReason}.
7649
- * does_not_own:
7650
- * - Classifying a failure into a reason (`./run-failure-classifier.ts`), or the engine's
7651
- * run-error mapping and recovery policy (`@herd/herd-agent`).
7652
- * ---
7653
- */
7654
- /** Provider-neutral factual category for a failed model run. */
7655
- declare type RunFailureReason = "auth" | "content_blocked" | "context_overflow" | "invalid_request" | "model_disabled" | "model_unavailable" | "network" | "overloaded" | "quota_exhausted" | "rate_limit" | "safeguard_block" | "seat_unpaid" | "server_error" | "stream_interrupted" | "timeout" | "unknown";
7644
+ /** Observed cause of a failed request or interrupted run. */
7645
+ declare const RUN_FAILURE_REASONS: readonly ["auth", "cancelled", "content_blocked", "context_overflow", "invalid_request", "model_disabled", "model_unavailable", "network", "organization_unavailable", "overloaded", "quota_exhausted", "rate_limit", "runtime_interrupted", "safeguard_block", "seat_unpaid", "server_error", "sign_in_required", "stream_interrupted", "timeout", "unknown"];
7646
+
7647
+ declare type RunFailureReason = (typeof RUN_FAILURE_REASONS)[number];
7656
7648
 
7657
7649
  /**
7658
7650
  * A durable runtime notice: the daemon telling the HUMAN, in the transcript,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yaklabs-ai/plugin-sdk",
3
- "version": "0.13.9",
3
+ "version": "0.13.10",
4
4
  "description": "The Kay plugin SDK — types and helpers for authoring a Kay directory plugin.",
5
5
  "author": "YakLabs",
6
6
  "type": "module",
@@ -92,6 +92,12 @@ It never reads the declared files or applies the roster's rules: a missing entry
92
92
  file, an `activate()` that throws, the disclosure audit, and an id another installed plugin already
93
93
  claims all show only after enabling, in `read plugin://<id>`.
94
94
 
95
+ Two manifest fields parse for any plugin but work for Bonsai's own plugins only (SDK 0.13.10): an
96
+ `external-cli` scheme's `cli` (how a local CLI is probed, signed in to and installed) and an auth
97
+ grant's `frontDoor` (a product door onto a shared sign-in). Bonsai drops either from any other
98
+ plugin at load, with a `release-only-connect-facts-ignored` diagnostic, so do not reach for them in
99
+ a plugin you install yourself.
100
+
95
101
  ## The SDK resolution contract
96
102
 
97
103
  - Plugin source imports `@bonsai/plugin-sdk/<subpath>` as a **bare specifier**