@yaklabs-ai/plugin-protocol 0.9.1 → 0.11.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
@@ -11,7 +11,7 @@ flow.
11
11
  ```json
12
12
  {
13
13
  "dependencies": {
14
- "@kay/plugin-protocol": "npm:@yaklabs-ai/plugin-protocol@^0.9.1"
14
+ "@kay/plugin-protocol": "npm:@yaklabs-ai/plugin-protocol@^0.11.0"
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.9.1",
4
+ "version": "0.11.0",
5
5
  "target": "npm",
6
6
  "firstPartyLicense": "MIT",
7
7
  "bundled": [],
package/dist/index.d.ts CHANGED
@@ -1935,7 +1935,7 @@ export declare const KAY_APP_DATA_SNAPSHOT_MAX_BYTES: number;
1935
1935
  export declare const KAY_EVENT_PUBLISHER_ID: "kay";
1936
1936
 
1937
1937
  /** Released SDK contracts still implemented by the host, alongside its current SDK. */
1938
- 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"];
1938
+ 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"];
1939
1939
 
1940
1940
  export declare const KAY_PLUGIN_PROTOCOL_PACKAGE_NAME: "@kay/plugin-protocol";
1941
1941
 
@@ -2039,8 +2039,38 @@ export declare const KAY_PLUGIN_PROTOCOL_VERSION: "kay.plugin.v1";
2039
2039
  * EXISTING apis; the type contract does not change. It still takes the patch
2040
2040
  * slot: nothing a `^0.8.1`/`^0.8.3` plugin already compiles against changes
2041
2041
  * shape, and the fix is which bytes reach npm, not what the contract promises.
2042
+ *
2043
+ * 0.9.0 adds timer_cancelled and requires workflow descriptions and summary
2044
+ * returns. This is an authoring-type break only: the host retains the 0.8
2045
+ * runtime contracts.
2046
+ *
2047
+ * 0.9.1 adds bounded corpus invocation reads (`app.corpus.listResourceInvocations`).
2048
+ * Existing received APIs are unchanged, so this is additive only.
2049
+ *
2050
+ * 0.10.0 removes the `spawn-session` variant from `KayAppAutomationEffectInput`
2051
+ * (and its daemon-facing mirror, `KayAutomationEffectInput`): an agent or
2052
+ * plugin can no longer create a spawn-session automation binding (owner
2053
+ * ruling, 2026-09-28) — durable recurring agent work is a plugin workflow
2054
+ * (`app.workflows.define` + `ctx.runAgent`) or a direct `session/run`. A
2055
+ * binding created before this version, or by daemon-internal code, still
2056
+ * stores and reads the effect fine (`KayAppAutomationEffect` keeps it); only
2057
+ * the create-time input type is narrower. Mostly an authoring-type break —
2058
+ * 0.9.0 and 0.9.1 stay in the runtime-contract retention list below, so a
2059
+ * plugin still running bytecode compiled against either keeps loading and
2060
+ * working — except for the one call this ruling actually closes:
2061
+ * `app.automations.create` with a `spawn-session` effect now throws
2062
+ * explicitly at the call site instead of being accepted, for any plugin
2063
+ * regardless of its declared SDK range.
2064
+ *
2065
+ * 0.11.0 adds `producedResources` to `KayAppAutomationRunDetail` (every URI a
2066
+ * run wrote, edited or declared, as one list deduplicated by URI) and the
2067
+ * `produced-resource-unnamed` member to `KayAppProvenanceGapCode`. An
2068
+ * authoring-type break only: code that builds a run detail must supply the
2069
+ * new list, and an exhaustive switch over gap codes must handle the new one.
2070
+ * 0.10.0 stays in the runtime-contract retention list below, because a plugin
2071
+ * compiled against it reads the same run detail and simply ignores the list.
2042
2072
  */
2043
- export declare const KAY_PLUGIN_SDK_VERSION: "0.9.1";
2073
+ export declare const KAY_PLUGIN_SDK_VERSION: "0.11.0";
2044
2074
 
2045
2075
  export declare const KAY_PLUGIN_TARGET_NAMES: readonly ["kay.agent", "kay.app", "kay.ui"];
2046
2076
 
@@ -3562,6 +3592,9 @@ export declare function parseSemver(value: string): ParsedSemver | undefined;
3562
3592
  /** Every capability slug {@link PluginCapabilityClaimV1} can express, for exhaustive table checks. */
3563
3593
  export declare const PLUGIN_CAPABILITY_SLUGS: readonly ["sessions.run", "network.connect", "web-session.request", "web-session.download", "filesystem.read", "filesystem.write", "process.spawn", "corpus.read", "signals.read", "workspace.command", "sessions.create", "sessions.update", "models.complete", "jev.use", "automations.write", "automations.run", "workflows.define", "session-events.subscribe", "agents.run", "dynamic-context.register", "app-data.register", "account.assert", "account.update", "agents.permissions", "tool-interception.register", "config.declare-section", "auth.own-service", "auth.shared-identity", "cli.bind", "whiteboard.discover", "whiteboard.read", "whiteboard.create", "whiteboard.update", "whiteboard.remove"];
3564
3594
 
3595
+ /** The root `<svg>` attribute a tile icon declares itself with. */
3596
+ export declare const PLUGIN_ICON_SHAPE_ATTRIBUTE = "data-icon-shape";
3597
+
3565
3598
  /** Rule-body keys the host stamps, so a manifest's `rule` may not carry them. */
3566
3599
  export declare const PLUGIN_NOTIFICATION_RULE_HOST_KEYS: readonly ["id", "match", "sender"];
3567
3600
 
@@ -3592,6 +3625,7 @@ export declare const PluginAgentDefinitionPermissionRule: z.ZodObject<{
3592
3625
  default: "default";
3593
3626
  allow: "allow";
3594
3627
  ask: "ask";
3628
+ auto: "auto";
3595
3629
  }>>;
3596
3630
  }, z.core.$strict>;
3597
3631
 
@@ -4071,6 +4105,7 @@ export declare const PluginCapabilityClaimV1: z.ZodDiscriminatedUnion<[z.ZodObje
4071
4105
  default: "default";
4072
4106
  allow: "allow";
4073
4107
  ask: "ask";
4108
+ auto: "auto";
4074
4109
  }>>;
4075
4110
  }, z.core.$strict>>;
4076
4111
  fallback: z.ZodArray<z.ZodObject<{
@@ -4087,6 +4122,7 @@ export declare const PluginCapabilityClaimV1: z.ZodDiscriminatedUnion<[z.ZodObje
4087
4122
  default: "default";
4088
4123
  allow: "allow";
4089
4124
  ask: "ask";
4125
+ auto: "auto";
4090
4126
  }>>;
4091
4127
  }, z.core.$strict>>;
4092
4128
  }, z.core.$strict>;
@@ -4276,6 +4312,7 @@ export declare const PluginCapabilityDecisionV1: z.ZodDiscriminatedUnion<[z.ZodO
4276
4312
  default: "default";
4277
4313
  allow: "allow";
4278
4314
  ask: "ask";
4315
+ auto: "auto";
4279
4316
  }>>;
4280
4317
  }, z.core.$strict>>;
4281
4318
  fallback: z.ZodArray<z.ZodObject<{
@@ -4292,6 +4329,7 @@ export declare const PluginCapabilityDecisionV1: z.ZodDiscriminatedUnion<[z.ZodO
4292
4329
  default: "default";
4293
4330
  allow: "allow";
4294
4331
  ask: "ask";
4332
+ auto: "auto";
4295
4333
  }>>;
4296
4334
  }, z.core.$strict>>;
4297
4335
  }, z.core.$strict>;
@@ -4476,6 +4514,7 @@ export declare const PluginCapabilityDecisionV1: z.ZodDiscriminatedUnion<[z.ZodO
4476
4514
  default: "default";
4477
4515
  allow: "allow";
4478
4516
  ask: "ask";
4517
+ auto: "auto";
4479
4518
  }>>;
4480
4519
  }, z.core.$strict>>;
4481
4520
  fallback: z.ZodArray<z.ZodObject<{
@@ -4492,6 +4531,7 @@ export declare const PluginCapabilityDecisionV1: z.ZodDiscriminatedUnion<[z.ZodO
4492
4531
  default: "default";
4493
4532
  allow: "allow";
4494
4533
  ask: "ask";
4534
+ auto: "auto";
4495
4535
  }>>;
4496
4536
  }, z.core.$strict>>;
4497
4537
  }, z.core.$strict>;
@@ -4739,6 +4779,7 @@ export declare const PluginCapabilityRefusalV1: z.ZodObject<{
4739
4779
  default: "default";
4740
4780
  allow: "allow";
4741
4781
  ask: "ask";
4782
+ auto: "auto";
4742
4783
  }>>;
4743
4784
  }, z.core.$strict>>;
4744
4785
  fallback: z.ZodArray<z.ZodObject<{
@@ -4755,6 +4796,7 @@ export declare const PluginCapabilityRefusalV1: z.ZodObject<{
4755
4796
  default: "default";
4756
4797
  allow: "allow";
4757
4798
  ask: "ask";
4799
+ auto: "auto";
4758
4800
  }>>;
4759
4801
  }, z.core.$strict>>;
4760
4802
  }, z.core.$strict>;
@@ -4912,6 +4954,29 @@ export declare const PluginEventDefinitionContribution: z.ZodObject<{
4912
4954
 
4913
4955
  export declare type PluginEventDefinitionContribution = z.infer<typeof PluginEventDefinitionContribution>;
4914
4956
 
4957
+ /**
4958
+ * How a plugin icon asks to be drawn.
4959
+ *
4960
+ * - `"mark"` (the default): a logo or glyph on a transparent field. The host frames it, inset
4961
+ * on a white tile, so marks of every shape and color read at one size.
4962
+ * - `"tile"`: a tile icon, artwork that is already a complete tile (its own background, edge to
4963
+ * edge). The host draws it full-bleed in its tile's shape, with no white field, border, or
4964
+ * inset.
4965
+ *
4966
+ * The icon declares this itself with `data-icon-shape="tile"` on its root `<svg>` element, so
4967
+ * any plugin (first- or third-party) opts in the same way and a host keeps no list of which
4968
+ * plugins do. It lives in the markup, not the manifest: the manifest is a strict schema, and a
4969
+ * new field there would make every older host reject the plugin.
4970
+ */
4971
+ export declare type PluginIconShape = "mark" | "tile";
4972
+
4973
+ /**
4974
+ * Read a plugin icon's declared {@link PluginIconShape}. Only the ROOT element's attribute
4975
+ * counts (a nested `<svg>`, a comment, or text never turns a mark into a tile); anything
4976
+ * undeclared or unparseable is a `"mark"`.
4977
+ */
4978
+ export declare function pluginIconShape(svg: string): PluginIconShape;
4979
+
4915
4980
  export declare const PluginId: z.ZodString;
4916
4981
 
4917
4982
  export declare type PluginId = z.infer<typeof PluginId>;
@@ -7777,6 +7842,9 @@ export declare const StorageGrantRequest: z.ZodObject<{
7777
7842
 
7778
7843
  export declare type StorageGrantRequest = z.infer<typeof StorageGrantRequest>;
7779
7844
 
7845
+ /** Markup that opens an SVG document: the prolog, then the root `<svg` start tag. */
7846
+ export declare const SVG_DOCUMENT_START: RegExp;
7847
+
7780
7848
  export declare const TargetEntrypoint: z.ZodObject<{
7781
7849
  module: z.ZodString;
7782
7850
  export: z.ZodOptional<z.ZodString>;
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.9.1";
118
+ var KAY_PLUGIN_SDK_VERSION = "0.11.0";
119
119
  var KAY_PLUGIN_COMPATIBLE_SDK_VERSIONS = [
120
120
  "0.8.0",
121
121
  "0.8.1",
@@ -123,7 +123,9 @@ var KAY_PLUGIN_COMPATIBLE_SDK_VERSIONS = [
123
123
  "0.8.3",
124
124
  "0.8.4",
125
125
  "0.8.5",
126
- "0.9.0"
126
+ "0.9.0",
127
+ "0.9.1",
128
+ "0.10.0"
127
129
  ];
128
130
  var KAY_PLUGIN_TARGET_NAMES = [
129
131
  "kay.agent",
@@ -1291,7 +1293,7 @@ var PluginAgentDefinitionPermissionRule = z5.strictObject({
1291
1293
  /** Restrict to matching resources (a path glob, or a URI-shaped policy address). */
1292
1294
  resource: NonEmptyString.optional(),
1293
1295
  /** Restrict the rule to one permission mode; omit to apply in all modes. */
1294
- mode: z5.enum(["default", "ask", "allow"]).optional()
1296
+ mode: z5.enum(["default", "ask", "allow", "auto"]).optional()
1295
1297
  });
1296
1298
  var RETIRED_PERMISSION_ASK_KEYS = [
1297
1299
  "network",
@@ -2667,6 +2669,24 @@ var PluginContributionKind = z7.enum([
2667
2669
  "configSection"
2668
2670
  ]);
2669
2671
 
2672
+ // packages/plugin-protocol/dist/icon-shape.js
2673
+ var SVG_PROLOG = String.raw`^\s*(?:<\?xml[^>]*>\s*)?(?:<!--[\s\S]*?-->\s*)*(?:<!DOCTYPE[^>]*>\s*)?`;
2674
+ var SVG_DOCUMENT_START = new RegExp(`${SVG_PROLOG}<svg[\\s>]`, "iu");
2675
+ var SVG_ROOT_START_TAG = new RegExp(`${SVG_PROLOG}<svg((?:\\s+[^\\s=>/]+(?:\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s"'>]+))?)*)\\s*/?>`, "iu");
2676
+ var ATTRIBUTE = /([^\s=>/]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'>]+)))?/gu;
2677
+ var PLUGIN_ICON_SHAPE_ATTRIBUTE = "data-icon-shape";
2678
+ function pluginIconShape(svg) {
2679
+ const attributes = SVG_ROOT_START_TAG.exec(svg)?.[1];
2680
+ if (attributes === void 0)
2681
+ return "mark";
2682
+ for (const [, name, double, single, bare] of attributes.matchAll(ATTRIBUTE)) {
2683
+ if (name === PLUGIN_ICON_SHAPE_ATTRIBUTE) {
2684
+ return (double ?? single ?? bare) === "tile" ? "tile" : "mark";
2685
+ }
2686
+ }
2687
+ return "mark";
2688
+ }
2689
+
2670
2690
  // packages/plugin-protocol/dist/ids.js
2671
2691
  function resolvePluginNamespace(pluginId, namespace) {
2672
2692
  return namespace ?? pluginId;
@@ -3033,10 +3053,20 @@ var KayPluginManifestV1 = z8.strictObject({
3033
3053
  */
3034
3054
  description: NonEmptyString,
3035
3055
  // Display icons resolved relative to the package root and traversal-guarded
3036
- // by `PackageAssetPath`. `iconDark` is an optional dark-appearance variant;
3037
- // when absent the host falls back to `icon`. This is a *raster/asset* icon —
3038
- // distinct from the *symbolic* `UiCommandContribution.icon` (an icon-set
3039
- // name), see LEXICON `icon`.
3056
+ // by `PackageAssetPath`. This is a *raster/asset* icon — distinct from the
3057
+ // *symbolic* `UiCommandContribution.icon` (an icon-set name), see LEXICON
3058
+ // `icon`. By default the host treats the SVG as a mark and frames it, inset
3059
+ // on a white tile. An SVG whose artwork is already a complete tile (its own
3060
+ // background, edge to edge) says so with `data-icon-shape="tile"` on its
3061
+ // root `<svg>` element, and the host then draws it full-bleed in its tile
3062
+ // shape (LEXICON `tile icon`; `pluginIconShape` in `./icon-shape.ts`). The
3063
+ // signal lives in the asset, not here, so older hosts keep parsing the
3064
+ // manifest.
3065
+ //
3066
+ // `iconDark` is accepted and containment-checked, but no host reads or
3067
+ // renders it today. The supported dark variant lives inside `icon` itself:
3068
+ // an internal `@media (prefers-color-scheme: dark)` rule, which follows the
3069
+ // app theme (docs/directory-plugins.md).
3040
3070
  icon: PackageAssetPath.optional(),
3041
3071
  iconDark: PackageAssetPath.optional(),
3042
3072
  namespace: PluginNamespace.optional(),
@@ -4685,6 +4715,7 @@ export {
4685
4715
  MimeTypeString,
4686
4716
  NonEmptyString,
4687
4717
  PLUGIN_CAPABILITY_SLUGS,
4718
+ PLUGIN_ICON_SHAPE_ATTRIBUTE,
4688
4719
  PLUGIN_NOTIFICATION_RULE_HOST_KEYS,
4689
4720
  PackageAssetPath,
4690
4721
  PluginAgentDefinitionPermissionRule,
@@ -4756,6 +4787,7 @@ export {
4756
4787
  SESSION_HEALTH_CUSTOM_TYPE,
4757
4788
  SESSION_HEALTH_ENTRY_NAME,
4758
4789
  SESSION_HEALTH_EXTENSION_ID,
4790
+ SVG_DOCUMENT_START,
4759
4791
  ScopeAlternative,
4760
4792
  ScopeNeed,
4761
4793
  ScopeRequirement,
@@ -4824,6 +4856,7 @@ export {
4824
4856
  parseKayUiBundleIndexV1,
4825
4857
  parseResolvedPluginContractV1,
4826
4858
  parseSemver,
4859
+ pluginIconShape,
4827
4860
  precedingPersonMessages,
4828
4861
  refineWebSessionScopeConfined,
4829
4862
  resolveAdapterId,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yaklabs-ai/plugin-protocol",
3
- "version": "0.9.1",
3
+ "version": "0.11.0",
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",