@yaklabs-ai/plugin-protocol 0.55.13 → 0.55.15

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
@@ -11,7 +11,7 @@ flow.
11
11
  ```json
12
12
  {
13
13
  "dependencies": {
14
- "@bonsai/plugin-protocol": "npm:@yaklabs-ai/plugin-protocol@^0.55.13"
14
+ "@bonsai/plugin-protocol": "npm:@yaklabs-ai/plugin-protocol@^0.55.15"
15
15
  }
16
16
  }
17
17
  ```
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "package": "@yaklabs-ai/plugin-protocol",
4
- "version": "0.55.13",
4
+ "version": "0.55.15",
5
5
  "target": "npm",
6
6
  "firstPartyLicense": "MIT",
7
7
  "bundled": [
package/dist/index.d.ts CHANGED
@@ -4193,6 +4193,17 @@ export declare type GlobalContributionId = z.infer<typeof GlobalContributionId>;
4193
4193
  /** Whether `claims` already holds `claim`, under {@link sameClaim}. */
4194
4194
  export declare function hasClaim(claims: readonly PluginCapabilityClaimV1[], claim: PluginCapabilityClaimV1): boolean;
4195
4195
 
4196
+ /**
4197
+ * A vendored MCP server as daemon composition hands it to the MCP host: the resolved row plus the
4198
+ * one fact a single manifest cannot state about itself. `bundled` is stamped by composition from
4199
+ * the shipping plugin's load origin (Bonsai ships it), never from the manifest or the plugin id, and
4200
+ * is absent for a server a user-installed plugin ships. The MCP host trusts a server's own tool
4201
+ * annotations only when it is present.
4202
+ */
4203
+ export declare type HostedKayAppMcpServer = ResolvedKayAppMcpServer & {
4204
+ readonly bundled?: true;
4205
+ };
4206
+
4196
4207
  /**
4197
4208
  * The cookie suffix rule shared by every web-session boundary: whether `host`
4198
4209
  * is `domain` or a subdomain of it. Coined ONCE here - the manifest's scope
@@ -5149,8 +5160,21 @@ export declare const KAY_PLUGIN_PROTOCOL_VERSION: "kay.plugin.v1";
5149
5160
  * Nov): a page adds text at the end of the composer of the chat its pane is bound to, and nothing is
5150
5161
  * sent. Additive; a plugin declaring it declares ^0.55.13, since an older
5151
5162
  * host refuses a manifest naming a capability it does not know.
5163
+ *
5164
+ * 0.55.14 lets a reset entry name the pass that wrote it (`pass`: `asked`, `spacing` or `ahead`,
5165
+ * `ResetTextPass`), which the host counts per reset (#16714). An entry carrying `pass`, read by a
5166
+ * host before 0.55.14, fails that host's parse and its reset writes the summary, as for any entry
5167
+ * it cannot use. A plugin writing `pass` declares ^0.55.14; no other plugin's range changes.
5168
+ *
5169
+ * 0.55.15 lets `sessions.run` and a workflow's `runAgent` continue a hidden session the same plugin
5170
+ * minted: the optional `continueSessionId` delivers the instructions as that session's next turn
5171
+ * and answers with that turn's outcome. A continuation may set no model, agent, tool roster,
5172
+ * completion, cwd or label. A `rejected` outcome may carry a `code` (`continue_not_owned`,
5173
+ * `continue_override`, `continue_busy`). Additive, but a host before 0.55.15 ignores the field and
5174
+ * mints a new session, so a plugin that continues declares ^0.55.15. The in-repo plugins move to
5175
+ * ^0.55.15 as the SDK's bump procedure says.
5152
5176
  */
5153
- export declare const KAY_PLUGIN_SDK_VERSION: "0.55.13";
5177
+ export declare const KAY_PLUGIN_SDK_VERSION: "0.55.15";
5154
5178
 
5155
5179
  export declare const KAY_PLUGIN_TARGET_NAMES: readonly ["kay.agent", "kay.app", "kay.ui"];
5156
5180
 
@@ -9101,6 +9125,7 @@ export declare const PluginAgentDefinitionPermissionRule: z.ZodObject<{
9101
9125
  ask: "ask";
9102
9126
  auto: "auto";
9103
9127
  }>>;
9128
+ declaredReadOnly: z.ZodOptional<z.ZodLiteral<true>>;
9104
9129
  }, z.core.$strict>;
9105
9130
 
9106
9131
  export declare type PluginAgentDefinitionPermissionRule = z.infer<typeof PluginAgentDefinitionPermissionRule>;
@@ -9897,6 +9922,7 @@ export declare const PluginCapabilityClaimInputV1: z.ZodCustom<{
9897
9922
  scheme?: string | undefined;
9898
9923
  resource?: string | undefined;
9899
9924
  mode?: "default" | "allow" | "ask" | "auto" | undefined;
9925
+ declaredReadOnly?: true | undefined;
9900
9926
  }[];
9901
9927
  fallback: {
9902
9928
  effect: "allow" | "deny" | "ask";
@@ -9905,6 +9931,7 @@ export declare const PluginCapabilityClaimInputV1: z.ZodCustom<{
9905
9931
  scheme?: string | undefined;
9906
9932
  resource?: string | undefined;
9907
9933
  mode?: "default" | "allow" | "ask" | "auto" | undefined;
9934
+ declaredReadOnly?: true | undefined;
9908
9935
  }[];
9909
9936
  };
9910
9937
  } | {
@@ -10205,6 +10232,7 @@ export declare const PluginCapabilityClaimInputV1: z.ZodCustom<{
10205
10232
  scheme?: string | undefined;
10206
10233
  resource?: string | undefined;
10207
10234
  mode?: "default" | "allow" | "ask" | "auto" | undefined;
10235
+ declaredReadOnly?: true | undefined;
10208
10236
  }[];
10209
10237
  fallback: {
10210
10238
  effect: "allow" | "deny" | "ask";
@@ -10213,6 +10241,7 @@ export declare const PluginCapabilityClaimInputV1: z.ZodCustom<{
10213
10241
  scheme?: string | undefined;
10214
10242
  resource?: string | undefined;
10215
10243
  mode?: "default" | "allow" | "ask" | "auto" | undefined;
10244
+ declaredReadOnly?: true | undefined;
10216
10245
  }[];
10217
10246
  };
10218
10247
  } | {
@@ -10535,6 +10564,7 @@ export declare const PluginCapabilityClaimV1: z.ZodDiscriminatedUnion<[z.ZodObje
10535
10564
  ask: "ask";
10536
10565
  auto: "auto";
10537
10566
  }>>;
10567
+ declaredReadOnly: z.ZodOptional<z.ZodLiteral<true>>;
10538
10568
  }, z.core.$strict>>;
10539
10569
  fallback: z.ZodArray<z.ZodObject<{
10540
10570
  effect: z.ZodEnum<{
@@ -10552,6 +10582,7 @@ export declare const PluginCapabilityClaimV1: z.ZodDiscriminatedUnion<[z.ZodObje
10552
10582
  ask: "ask";
10553
10583
  auto: "auto";
10554
10584
  }>>;
10585
+ declaredReadOnly: z.ZodOptional<z.ZodLiteral<true>>;
10555
10586
  }, z.core.$strict>>;
10556
10587
  }, z.core.$strict>;
10557
10588
  }, z.core.$strict>, z.ZodObject<{
@@ -10899,6 +10930,7 @@ export declare const PluginCapabilityDecisionV1: z.ZodDiscriminatedUnion<[z.ZodO
10899
10930
  ask: "ask";
10900
10931
  auto: "auto";
10901
10932
  }>>;
10933
+ declaredReadOnly: z.ZodOptional<z.ZodLiteral<true>>;
10902
10934
  }, z.core.$strict>>;
10903
10935
  fallback: z.ZodArray<z.ZodObject<{
10904
10936
  effect: z.ZodEnum<{
@@ -10916,6 +10948,7 @@ export declare const PluginCapabilityDecisionV1: z.ZodDiscriminatedUnion<[z.ZodO
10916
10948
  ask: "ask";
10917
10949
  auto: "auto";
10918
10950
  }>>;
10951
+ declaredReadOnly: z.ZodOptional<z.ZodLiteral<true>>;
10919
10952
  }, z.core.$strict>>;
10920
10953
  }, z.core.$strict>;
10921
10954
  }, z.core.$strict>, z.ZodObject<{
@@ -11262,6 +11295,7 @@ export declare const PluginCapabilityDecisionV1: z.ZodDiscriminatedUnion<[z.ZodO
11262
11295
  ask: "ask";
11263
11296
  auto: "auto";
11264
11297
  }>>;
11298
+ declaredReadOnly: z.ZodOptional<z.ZodLiteral<true>>;
11265
11299
  }, z.core.$strict>>;
11266
11300
  fallback: z.ZodArray<z.ZodObject<{
11267
11301
  effect: z.ZodEnum<{
@@ -11279,6 +11313,7 @@ export declare const PluginCapabilityDecisionV1: z.ZodDiscriminatedUnion<[z.ZodO
11279
11313
  ask: "ask";
11280
11314
  auto: "auto";
11281
11315
  }>>;
11316
+ declaredReadOnly: z.ZodOptional<z.ZodLiteral<true>>;
11282
11317
  }, z.core.$strict>>;
11283
11318
  }, z.core.$strict>;
11284
11319
  }, z.core.$strict>, z.ZodObject<{
@@ -11659,6 +11694,7 @@ export declare const PluginCapabilityRefusalV1: z.ZodObject<{
11659
11694
  ask: "ask";
11660
11695
  auto: "auto";
11661
11696
  }>>;
11697
+ declaredReadOnly: z.ZodOptional<z.ZodLiteral<true>>;
11662
11698
  }, z.core.$strict>>;
11663
11699
  fallback: z.ZodArray<z.ZodObject<{
11664
11700
  effect: z.ZodEnum<{
@@ -11676,6 +11712,7 @@ export declare const PluginCapabilityRefusalV1: z.ZodObject<{
11676
11712
  ask: "ask";
11677
11713
  auto: "auto";
11678
11714
  }>>;
11715
+ declaredReadOnly: z.ZodOptional<z.ZodLiteral<true>>;
11679
11716
  }, z.core.$strict>>;
11680
11717
  }, z.core.$strict>;
11681
11718
  }, z.core.$strict>, z.ZodObject<{
@@ -13500,10 +13537,29 @@ export declare const ResetTextEntry: z.ZodObject<{
13500
13537
  entryId: z.ZodString;
13501
13538
  }, z.core.$strict>;
13502
13539
  text: z.ZodString;
13540
+ pass: z.ZodOptional<z.ZodEnum<{
13541
+ asked: "asked";
13542
+ spacing: "spacing";
13543
+ ahead: "ahead";
13544
+ }>>;
13503
13545
  }, z.core.$strict>;
13504
13546
 
13505
13547
  export declare type ResetTextEntry = z.infer<typeof ResetTextEntry>;
13506
13548
 
13549
+ /**
13550
+ * Which pass wrote a reset text: one the agent asked for (`asked`), one on the regular spacing as the
13551
+ * conversation grows (`spacing`), or the one just ahead of the reset threshold (`ahead`). The host
13552
+ * counts which kind covered a reset, never reads it as a reason to use the text. Optional on the
13553
+ * entry (SDK 0.55.14): an entry written before names none.
13554
+ */
13555
+ export declare const ResetTextPass: z.ZodEnum<{
13556
+ asked: "asked";
13557
+ spacing: "spacing";
13558
+ ahead: "ahead";
13559
+ }>;
13560
+
13561
+ export declare type ResetTextPass = z.infer<typeof ResetTextPass>;
13562
+
13507
13563
  /**
13508
13564
  * Resolves the runtime selection key for a provider-shaped contribution - the
13509
13565
  * value an *adapter binding* names to make one implementation live.
package/dist/index.js CHANGED
@@ -260,8 +260,10 @@ var JsonSchema = z4.record(z4.string(), JsonValue);
260
260
  var KAY_PLUGIN_MANIFEST_SIZE_CAP_BYTES = 1024 * 1024;
261
261
  var KAY_PLUGIN_PROTOCOL_VERSION = "kay.plugin.v1";
262
262
  var KAY_PLUGIN_PROTOCOL_PACKAGE_NAME = "@bonsai/plugin-protocol";
263
- var KAY_PLUGIN_SDK_VERSION = "0.55.13";
263
+ var KAY_PLUGIN_SDK_VERSION = "0.55.15";
264
264
  var KAY_PLUGIN_COMPATIBLE_SDK_VERSIONS = [
265
+ "0.55.14",
266
+ "0.55.13",
265
267
  "0.55.12",
266
268
  "0.55.11",
267
269
  "0.55.10",
@@ -1644,7 +1646,15 @@ function createPermissionsSchemas(canonical) {
1644
1646
  /** Restrict to matching resources (a path glob, or a URI-shaped policy address). */
1645
1647
  resource: NonEmptyString3.optional(),
1646
1648
  /** Restrict the rule to one permission mode; omit to apply in all modes. */
1647
- mode: z10.enum(["default", "ask", "allow", "auto"]).optional()
1649
+ mode: z10.enum(["default", "ask", "allow", "auto"]).optional(),
1650
+ /**
1651
+ * Match only a call whose target declares itself read-only and whose tool's host accepted
1652
+ * that declaration; omit to ignore it. Today only the `mcp` tool sets it: for a tool its
1653
+ * server annotates `readOnlyHint: true` (and not `destructiveHint: true`), when that server
1654
+ * is connected and ships with a bundled Bonsai plugin. The call's `kind` is unchanged, so a
1655
+ * read-only agent pairs an allow carrying this field with a fallback deny on the same tool.
1656
+ */
1657
+ declaredReadOnly: z10.literal(true).optional()
1648
1658
  });
1649
1659
  function stripRetiredPermissionAsks(value) {
1650
1660
  if (typeof value !== "object" || value === null || Array.isArray(value)) {
@@ -1889,7 +1899,8 @@ var AGENT_PERMISSION_RULE_FIELDS = [
1889
1899
  "ruleKey",
1890
1900
  "scheme",
1891
1901
  "resource",
1892
- "mode"
1902
+ "mode",
1903
+ "declaredReadOnly"
1893
1904
  ];
1894
1905
  function createAuthoritySchemas(canonical) {
1895
1906
  const { ArtifactGenerationId: ArtifactGenerationId2, NonEmptyString: NonEmptyString3, UriScheme: UriScheme2, PluginId: PluginId2, LocalContributionId: LocalContributionId2 } = canonical ? canonicalCommonSchemas : common_exports;
@@ -5042,6 +5053,7 @@ var EntryAddress = z18.strictObject({
5042
5053
  sessionId: z18.string().min(1),
5043
5054
  entryId: z18.string().min(1)
5044
5055
  });
5056
+ var ResetTextPass = z18.enum(["asked", "spacing", "ahead"]);
5045
5057
  var ResetTextEntry = z18.strictObject({
5046
5058
  version: z18.literal(1),
5047
5059
  /**
@@ -5051,7 +5063,8 @@ var ResetTextEntry = z18.strictObject({
5051
5063
  */
5052
5064
  coveredThrough: EntryAddress,
5053
5065
  /** The working state as Markdown, without the harness ledger. */
5054
- text: z18.string().min(1).max(RESET_TEXT_MAX_CHARS)
5066
+ text: z18.string().min(1).max(RESET_TEXT_MAX_CHARS),
5067
+ pass: ResetTextPass.optional()
5055
5068
  });
5056
5069
  var ResetTextContribution = z18.strictObject({
5057
5070
  entry: z18.string().regex(PLUGIN_STATE_ENTRY_NAME_PATTERN)
@@ -8886,6 +8899,7 @@ export {
8886
8899
  RegistrableDomain,
8887
8900
  ResetTextContribution,
8888
8901
  ResetTextEntry,
8902
+ ResetTextPass,
8889
8903
  ResolvedAuthGrantRequest,
8890
8904
  ResolvedEndpointGrantRequest,
8891
8905
  ResolvedKayAgentArtifactUriModule,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yaklabs-ai/plugin-protocol",
3
- "version": "0.55.13",
3
+ "version": "0.55.15",
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",