@yaklabs-ai/plugin-protocol 0.13.0 → 0.13.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # @yaklabs-ai/plugin-protocol
2
2
 
3
- The **`kay.plugin.v1` manifest schema** — the same Zod schema Kay's daemon uses
3
+ The **`kay.plugin.v1` manifest schema** — the same Zod schema Bonsai's daemon uses
4
4
  to parse `kay-plugin.json` at load time.
5
5
 
6
6
  Published to the public npm registry under the MIT licence, always at the same
@@ -11,7 +11,7 @@ flow.
11
11
  ```json
12
12
  {
13
13
  "dependencies": {
14
- "@kay/plugin-protocol": "npm:@yaklabs-ai/plugin-protocol@^0.13.0"
14
+ "@kay/plugin-protocol": "npm:@yaklabs-ai/plugin-protocol@^0.13.1"
15
15
  }
16
16
  }
17
17
  ```
@@ -37,22 +37,22 @@ if (!parsed.success) {
37
37
 
38
38
  A hand-rolled field check drifts from the contract it claims to enforce and
39
39
  passes while the host rejects the plugin at load. This is the host's own schema,
40
- so it cannot drift — and unlike resolving it out of a Kay checkout, it needs no
40
+ so it cannot drift — and unlike resolving it out of a Bonsai checkout, it needs no
41
41
  clone, no build, and no `KAY_REPO` environment variable.
42
42
 
43
- ## Version it against your Kay app
43
+ ## Version it against your Bonsai app
44
44
 
45
45
  The schema changes over time — it gains fields, and it can also **remove** one.
46
46
  Three skews follow, and only the first two fail on your machine:
47
47
 
48
- - Validating against a **newer** schema than your Kay app runs can accept a
48
+ - Validating against a **newer** schema than your Bonsai app runs can accept a
49
49
  manifest the host will reject.
50
50
  - Validating against an **older** schema can reject a manifest the host would
51
51
  happily load.
52
52
  - Validating against an **older** schema can also _accept_ a field the host has
53
53
  since removed. `KayPluginManifestV1` parses with `strictObject`, so an
54
54
  unrecognized key is a hard rejection: your local validation goes green, and
55
- Kay drops the plugin at load with a diagnostic you never see.
55
+ Bonsai drops the plugin at load with a diagnostic you never see.
56
56
 
57
- Keep this package in step with the Kay version you target — the third skew is
57
+ Keep this package in step with the Bonsai version you target — the third skew is
58
58
  the one a green local run will not warn you about.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "package": "@yaklabs-ai/plugin-protocol",
4
- "version": "0.13.0",
4
+ "version": "0.13.1",
5
5
  "target": "npm",
6
6
  "firstPartyLicense": "MIT",
7
7
  "bundled": [],
package/dist/index.d.ts CHANGED
@@ -1417,7 +1417,7 @@ export declare type CliBinaryName = z.infer<typeof CliBinaryName>;
1417
1417
  * catalog, pinned and checksum-verified. Credential injection is available, and
1418
1418
  * gated on the binary actually being materialized in `vendoredToolsDir`
1419
1419
  * (constraint 12, vendored-or-nothing).
1420
- * - `"path"` — a binary the USER OR AGENT installed on `PATH`. Kay ships nothing,
1420
+ * - `"path"` — a binary the USER OR AGENT installed on `PATH`. Bonsai ships nothing,
1421
1421
  * pins nothing, and verifies nothing, so this binding is structurally barred from
1422
1422
  * receiving a secret: `authEnvVar` must be absent, and `authService` must declare
1423
1423
  * only `external-cli` schemes. `buildCliBindingRoster` throws on either violation.
@@ -1792,7 +1792,7 @@ export declare function finalizeArtifactProvenanceEnvelope(capture: ArtifactProv
1792
1792
  * The Basic-auth USERNAME a git host expects beside an injected token
1793
1793
  * (`x-access-token` for GitHub, `oauth2` for GitLab). The token is the password
1794
1794
  * half, so this is a fixed per-vendor literal rather than a user identity, and
1795
- * it is the only per-vendor variance in Kay's git transport.
1795
+ * it is the only per-vendor variance in Bonsai's git transport.
1796
1796
  *
1797
1797
  * Restricted to unreserved URL characters: a colon would move the `user:token`
1798
1798
  * boundary the `Authorization: Basic` header encodes, and whitespace or control
@@ -1965,15 +1965,15 @@ export declare const KAY_APP_DATA_READ_RESULT_MAX_BYTES: number;
1965
1965
  export declare const KAY_APP_DATA_SNAPSHOT_MAX_BYTES: number;
1966
1966
 
1967
1967
  /**
1968
- * The publisher id Kay's own subsystems publish declared events under (skill
1968
+ * The publisher id Bonsai's own subsystems publish declared events under (skill
1969
1969
  * changes, wallet notices, automation failures). A notification rule matches a
1970
1970
  * declared event by (publisher id, event local id), so no plugin may take this
1971
- * id or it could publish events that Kay's default rules read as Kay's own.
1971
+ * id or it could publish events that Bonsai's default rules read as Bonsai's own.
1972
1972
  */
1973
1973
  export declare const KAY_EVENT_PUBLISHER_ID: "kay";
1974
1974
 
1975
1975
  /** Released SDK contracts still implemented by the host, alongside its current SDK. */
1976
- export declare const KAY_PLUGIN_COMPATIBLE_SDK_VERSIONS: readonly ["0.8.0", "0.8.1", "0.8.2", "0.8.3", "0.8.4", "0.8.5", "0.9.0", "0.9.1", "0.10.0", "0.11.0", "0.11.1", "0.12.0", "0.12.1", "0.12.2", "0.12.3", "0.12.4", "0.12.5"];
1976
+ export declare const KAY_PLUGIN_COMPATIBLE_SDK_VERSIONS: readonly ["0.8.0", "0.8.1", "0.8.2", "0.8.3", "0.8.4", "0.8.5", "0.9.0", "0.9.1", "0.10.0", "0.11.0", "0.11.1", "0.12.0", "0.12.1", "0.12.2", "0.12.3", "0.12.4", "0.12.5", "0.13.0"];
1977
1977
 
1978
1978
  export declare const KAY_PLUGIN_PROTOCOL_PACKAGE_NAME: "@kay/plugin-protocol";
1979
1979
 
@@ -1986,7 +1986,7 @@ export declare const KAY_PLUGIN_PROTOCOL_VERSION: "kay.plugin.v1";
1986
1986
  * ── Why this is the compatibility axis, and the app version is not ──────────
1987
1987
  * A plugin never bundles the SDK: the host injects its own `@kay/plugin-sdk`
1988
1988
  * dist at import time. So the SDK surface a plugin was written against is the
1989
- * thing that can break under it, and the Kay app version is only correlated
1989
+ * thing that can break under it, and the Bonsai app version is only correlated
1990
1990
  * with that — it moves for reasons a plugin cannot observe.
1991
1991
  *
1992
1992
  * ── Two lines, deliberately, not one ────────────────────────────────────────
@@ -2115,8 +2115,8 @@ export declare const KAY_PLUGIN_PROTOCOL_VERSION: "kay.plugin.v1";
2115
2115
  * failing.
2116
2116
  *
2117
2117
  * 0.12.0 replaces the vendor client `api.withJev` hands its callback. `use`
2118
- * now receives Kay's own `JevClient` (`@kay/plugin-sdk/jev`): one method,
2119
- * `classify({state, questions})`, in Kay's question and answer vocabulary
2118
+ * now receives Bonsai's own `JevClient` (`@kay/plugin-sdk/jev`): one method,
2119
+ * `classify({state, questions})`, in Bonsai's question and answer vocabulary
2120
2120
  * (yes/no is `bool` answering `probability`; instructions and criteria are
2121
2121
  * text; the state is a JSON object), rejecting with a classified
2122
2122
  * `JevCallError`. TypeSafe's `TypeSafeClient`, `SystemOneRequest`,
@@ -2178,7 +2178,7 @@ export declare const KAY_PLUGIN_PROTOCOL_VERSION: "kay.plugin.v1";
2178
2178
  * that calls it declares `^0.12.5`, so an older host refuses a directory or repository plugin at
2179
2179
  * load instead of the call failing.
2180
2180
  *
2181
- * 0.13.0 adds `@kay/plugin-sdk/fs`, Kay's own `node:fs/promises`: the same functions, arguments,
2181
+ * 0.13.0 adds `@kay/plugin-sdk/fs`, Bonsai's own `node:fs/promises`: the same functions, arguments,
2182
2182
  * return types and errors, with every call run on the host's user-files workers under a deadline
2183
2183
  * (`ERR_KAY_FS_DEADLINE` and siblings when the host gives up or does not try), plus
2184
2184
  * `writeFileAtomic` and `withTimeout`. With no host installed it is Node's own module. It adds
@@ -2196,8 +2196,16 @@ export declare const KAY_PLUGIN_PROTOCOL_VERSION: "kay.plugin.v1";
2196
2196
  * declared either). A plugin that imports
2197
2197
  * `@kay/plugin-sdk/fs` or calls `familyFolder` declares `^0.13.0`, so an older host refuses a
2198
2198
  * directory or repository plugin at load.
2199
+ *
2200
+ * 0.13.1 adds the signal engine to `@kay/plugin-sdk/signals`: `SignalDefinition`,
2201
+ * `createSignalEngine` and `signalAnswersPass` (a plugin declares its Jev signals as data and the
2202
+ * engine evaluates them, upstreams first, through `app.signals.observe`), plus `signalDigest`.
2203
+ * `observe` gains three optional input fields, `subject`, `after` and `reuse`, and an observation
2204
+ * and a read signal carry the stored `subject` and `upstreamId` back. Additive: a plugin compiled
2205
+ * against 0.13.0 never sends or reads them. A plugin that imports the engine declares `^0.13.1`,
2206
+ * so an older host refuses a directory or repository plugin at load.
2199
2207
  */
2200
- export declare const KAY_PLUGIN_SDK_VERSION: "0.13.0";
2208
+ export declare const KAY_PLUGIN_SDK_VERSION: "0.13.1";
2201
2209
 
2202
2210
  export declare const KAY_PLUGIN_TARGET_NAMES: readonly ["kay.agent", "kay.app", "kay.ui"];
2203
2211
 
@@ -2520,10 +2528,10 @@ export declare interface KayPluginHostCompatibility {
2520
2528
  readonly sdkVersion: string;
2521
2529
  /** Older SDK releases whose runtime contracts this host still implements; absent means none. */
2522
2530
  readonly compatibleSdkVersions?: readonly string[];
2523
- /** The Kay app version. Advisory only — never a refusal. */
2531
+ /** The Bonsai app version. Advisory only — never a refusal. */
2524
2532
  readonly appVersion: string;
2525
2533
  /**
2526
- * Whether the plugin ships WITH Kay. A bundled plugin is cut from this tree,
2534
+ * Whether the plugin ships WITH Bonsai. A bundled plugin is cut from this tree,
2527
2535
  * so declaring no SDK range is a property of how it ships rather than a gap
2528
2536
  * its author left, and the undeclared-range advisory is suppressed for it.
2529
2537
  *
@@ -3533,7 +3541,7 @@ export declare type KayVersionString = z.infer<typeof KayVersionString>;
3533
3541
  *
3534
3542
  * Distinct from raw session-transcript streaming (`app.corpus`, authorized per call by the
3535
3543
  * `corpus.read` claim) and from `registerSearchProvider` (a plugin registering a backend behind
3536
- * Kay's own web-search tool) — this grant is the reverse direction: a plugin READING the shared
3544
+ * Bonsai's own web-search tool) — this grant is the reverse direction: a plugin READING the shared
3537
3545
  * knowledge index that OTHER ingest lanes (skills, URIs) already populate, confined to its own
3538
3546
  * address space.
3539
3547
  */
@@ -3712,7 +3720,7 @@ export declare interface ParsedSemver {
3712
3720
 
3713
3721
  export declare function parseKayPluginManifestV1(value: unknown): KayPluginManifestV1;
3714
3722
 
3715
- /** Parses one origin-agnostic, loadable Kay React app package. */
3723
+ /** Parses one origin-agnostic, loadable Bonsai React app package. */
3716
3724
  export declare function parseKayUiAppPackageV1(input: unknown): KayUiAppPackageV1;
3717
3725
 
3718
3726
  export declare function parseKayUiBundleIndexV1(input: unknown): KayUiBundleIndexV1;
@@ -5491,7 +5499,7 @@ export declare type PluginProvisioningRequirement = z.infer<typeof PluginProvisi
5491
5499
  *
5492
5500
  * ── What this schema deliberately does NOT validate ─────────────────────────────────────────
5493
5501
  * Structure and bounds only. WHICH installer commands are legal, and whether a git locator is
5494
- * canonical/safe, are Kay-layer POLICY that already has exactly one home each
5502
+ * canonical/safe, are Bonsai-layer POLICY that already has exactly one home each
5495
5503
  * (`installer-skill-source.ts`'s executable allowlist, `remote-skill-source.ts`'s locator
5496
5504
  * hygiene). Re-stating either here would fork the policy: this package would then hold a second
5497
5505
  * answer that drifts from the one the daemon enforces. The daemon applies those validators to a
@@ -5523,7 +5531,7 @@ export declare type PluginSkillSourceDeclaration = z.infer<typeof PluginSkillSou
5523
5531
  * generation `freeform`.
5524
5532
  *
5525
5533
  * Five classes, ordered loosely by how much the host knows about the author:
5526
- * `bundled` (compiled into Kay), `org-shared` (distributed inside the user's
5534
+ * `bundled` (compiled into Bonsai), `org-shared` (distributed inside the user's
5527
5535
  * organization), `user-local` (the user put it in their own plugins root),
5528
5536
  * `verified-marketplace` (a reviewed marketplace artifact), `freeform`
5529
5537
  * (anything else — today, a plugin repository generation). Two of them
@@ -5531,7 +5539,7 @@ export declare type PluginSkillSourceDeclaration = z.infer<typeof PluginSkillSou
5531
5539
  *
5532
5540
  * IT DECIDES NOTHING. There is no ceiling table keyed on this and no capability a class grants or
5533
5541
  * withholds: authority is the user's grant ledger, one exact claim at a time, plus the one rule
5534
- * that a plugin Kay itself bundles holds every grant. A future gate that wants to read this is a
5542
+ * that a plugin Bonsai itself bundles holds every grant. A future gate that wants to read this is a
5535
5543
  * new decision to argue for, not a use this type already sanctions.
5536
5544
  */
5537
5545
  export declare const PluginSourceClass: z.ZodEnum<{
package/dist/index.js CHANGED
@@ -115,7 +115,7 @@ import { z as z2 } from "zod";
115
115
  import { z } from "zod";
116
116
  var KAY_PLUGIN_PROTOCOL_VERSION = "kay.plugin.v1";
117
117
  var KAY_PLUGIN_PROTOCOL_PACKAGE_NAME = "@kay/plugin-protocol";
118
- var KAY_PLUGIN_SDK_VERSION = "0.13.0";
118
+ var KAY_PLUGIN_SDK_VERSION = "0.13.1";
119
119
  var KAY_PLUGIN_COMPATIBLE_SDK_VERSIONS = [
120
120
  "0.8.0",
121
121
  "0.8.1",
@@ -133,7 +133,8 @@ var KAY_PLUGIN_COMPATIBLE_SDK_VERSIONS = [
133
133
  "0.12.2",
134
134
  "0.12.3",
135
135
  "0.12.4",
136
- "0.12.5"
136
+ "0.12.5",
137
+ "0.13.0"
137
138
  ];
138
139
  var KAY_PLUGIN_TARGET_NAMES = [
139
140
  "kay.agent",
@@ -1628,7 +1629,7 @@ var PluginCapabilityClaimV1 = z6.discriminatedUnion("slug", [
1628
1629
  z6.strictObject({
1629
1630
  target: z6.literal("kay.agent"),
1630
1631
  slug: z6.literal("interaction.surface"),
1631
- /** The one Kay-shipped interaction surface this plugin may drive; one claim per surface. */
1632
+ /** The one Bonsai-shipped interaction surface this plugin may drive; one claim per surface. */
1632
1633
  envelope: z6.strictObject({ surface: z6.enum(["browser-pane", "desktop"]) })
1633
1634
  }),
1634
1635
  z6.strictObject({
@@ -2102,7 +2103,7 @@ function checkKayPluginHostCompatibility(compatibility, host) {
2102
2103
  return {
2103
2104
  refusal: {
2104
2105
  code: "unsupported-protocol",
2105
- message: `declares support for ${declared} but this Kay speaks ${host.protocolVersion}`
2106
+ message: `declares support for ${declared} but this Bonsai speaks ${host.protocolVersion}`
2106
2107
  },
2107
2108
  advisories
2108
2109
  };
@@ -2113,19 +2114,19 @@ function checkKayPluginHostCompatibility(compatibility, host) {
2113
2114
  if (parseSemver(minKayVersion) === void 0) {
2114
2115
  advisories.push({
2115
2116
  code: "min-kay-version-unparseable",
2116
- message: `declares a minimum Kay version of "${minKayVersion}", which is not a version Kay can compare`
2117
+ message: `declares a minimum Bonsai version of "${minKayVersion}", which is not a version Bonsai can compare`
2117
2118
  });
2118
2119
  } else {
2119
2120
  const order = compareSemver(host.appVersion, minKayVersion);
2120
2121
  if (order === void 0) {
2121
2122
  advisories.push({
2122
2123
  code: "min-kay-version-unparseable",
2123
- message: `asks for Kay ${minKayVersion} or newer, which cannot be checked against this Kay's version "${host.appVersion}"`
2124
+ message: `asks for Bonsai ${minKayVersion} or newer, which cannot be checked against this Bonsai's version "${host.appVersion}"`
2124
2125
  });
2125
2126
  } else if (order < 0) {
2126
2127
  advisories.push({
2127
2128
  code: "min-kay-version-unmet",
2128
- message: `asks for Kay ${minKayVersion} or newer; this is ${host.appVersion}`
2129
+ message: `asks for Bonsai ${minKayVersion} or newer; this is ${host.appVersion}`
2129
2130
  });
2130
2131
  }
2131
2132
  }
@@ -2135,7 +2136,7 @@ function checkKayPluginHostCompatibility(compatibility, host) {
2135
2136
  if (host.bundled !== true) {
2136
2137
  advisories.push({
2137
2138
  code: "sdk-range-undeclared",
2138
- message: `declares no compatibility.sdk range; this Kay ships plugin SDK ${host.sdkVersion}`
2139
+ message: `declares no compatibility.sdk range; this Bonsai ships plugin SDK ${host.sdkVersion}`
2139
2140
  });
2140
2141
  }
2141
2142
  return { refusal: void 0, advisories };
@@ -2149,7 +2150,7 @@ function checkKayPluginHostCompatibility(compatibility, host) {
2149
2150
  return {
2150
2151
  refusal: {
2151
2152
  code: "host-sdk-version-invalid",
2152
- message: `cannot be checked: this Kay reports plugin SDK "${invalidVersion}", which is not valid semver`
2153
+ message: `cannot be checked: this Bonsai reports plugin SDK "${invalidVersion}", which is not valid semver`
2153
2154
  },
2154
2155
  advisories
2155
2156
  };
@@ -2158,7 +2159,7 @@ function checkKayPluginHostCompatibility(compatibility, host) {
2158
2159
  return {
2159
2160
  refusal: {
2160
2161
  code: "sdk-range-unsupported",
2161
- message: `declares an SDK range of "${range}", which Kay cannot interpret (use a caret, tilde, or comparator range such as ^${host.sdkVersion})`
2162
+ message: `declares an SDK range of "${range}", which Bonsai cannot interpret (use a caret, tilde, or comparator range such as ^${host.sdkVersion})`
2162
2163
  },
2163
2164
  advisories
2164
2165
  };
@@ -2167,7 +2168,7 @@ function checkKayPluginHostCompatibility(compatibility, host) {
2167
2168
  return {
2168
2169
  refusal: {
2169
2170
  code: "sdk-range-unsatisfied",
2170
- message: `needs plugin SDK ${range}, this Kay ships ${host.sdkVersion}`
2171
+ message: `needs plugin SDK ${range}, this Bonsai ships ${host.sdkVersion}`
2171
2172
  },
2172
2173
  advisories
2173
2174
  };
@@ -2968,7 +2969,7 @@ var PluginAuthSchemeOAuthConfidential = z8.strictObject({
2968
2969
  localId: LocalContributionId,
2969
2970
  kind: z8.literal("oauth2"),
2970
2971
  exchange: z8.literal("confidential"),
2971
- /** Absent means `["kay"]` — a confidential exchange's secret may only ever be Kay's. */
2972
+ /** Absent means `["kay"]` — a confidential exchange's secret may only ever be Bonsai's. */
2972
2973
  clientSuppliers: z8.tuple([z8.literal("kay")]).optional(),
2973
2974
  scopes: z8.array(NonEmptyString).optional()
2974
2975
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yaklabs-ai/plugin-protocol",
3
- "version": "0.13.0",
3
+ "version": "0.13.1",
4
4
  "description": "The Kay plugin manifest schema (`kay.plugin.v1`) — parse and validate a kay-plugin.json.",
5
5
  "author": "YakLabs",
6
6
  "type": "module",