@yaklabs-ai/plugin-sdk 0.54.1 → 0.54.2

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.54.1"
16
+ "@bonsai/plugin-sdk": "npm:@yaklabs-ai/plugin-sdk@^0.54.2"
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.54.1" },
65
+ "compatibility": { "sdk": "^0.54.2" },
66
66
  "targets": {
67
67
  "kay": {
68
68
  "agent": {
@@ -153,7 +153,7 @@ naming both versions, instead of loading it and finding no `activate`.
153
153
  | `@bonsai/plugin-sdk/system-one` | The types and error class for `api.systemOne` / `app.systemOne`, from 0.13.8 |
154
154
  | `@bonsai/plugin-sdk/zod` | `z` (the host's in the daemon), on an entry with no other import, from 0.13.9 |
155
155
 
156
- A plugin that imports these subpaths declares the current supported SDK range (`^0.54.1`).
156
+ A plugin that imports these subpaths declares the current supported SDK range (`^0.54.2`).
157
157
  The rows record when each subpath appeared, not retained runtime compatibility. `vendored-mcp` builds the plugin's URI module (its link cards and help); hosting the
158
158
  vendor's MCP server itself is a separate host decision: Bonsai hosts it once a person approves
159
159
  the plugin's `mcp.host-server` grant for that server's name and URL. A server that needs an OAuth
@@ -161,7 +161,7 @@ sign-in names one of the plugin's auth services in `authService`; that service m
161
161
  one `delegated` scheme, which Bonsai uses to sign the person in to the server. Bonsai declares that
162
162
  scheme at runtime; the plugin's code must not declare it again. From 0.16.2 a plugin's code can also
163
163
  call the server's tools through `api.vendoredMcp.port(<server>)`, typed by this subpath's
164
- `VendoredMcpPort` and `VendoredMcpOutcome` (declare `^0.54.1`).
164
+ `VendoredMcpPort` and `VendoredMcpOutcome` (declare `^0.54.2`).
165
165
 
166
166
  From 0.13.10 the manifest schema carries two facts Bonsai reads for its own plugins only; another
167
167
  plugin's are ignored, with a load diagnostic. An `external-cli` auth scheme's `cli` says how Bonsai
@@ -243,7 +243,7 @@ Provider schemas remain authoritative; declaring a dependency grants no authorit
243
243
  through `app.uri`, parse returned Markdown in the consuming plugin, and retain the read's
244
244
  revision (or `contentDigest` from `/uri`) for edits. The old `memory.read` and `memory.write`
245
245
  grants do not authorize the replacement scheme-and-verb calls. Contracts before 0.49.0 are
246
- refused; migrate and declare `^0.54.1`. The current host also serves the 0.49.0 resource contract.
246
+ refused; migrate and declare `^0.54.2`. The current host also serves the 0.49.0 resource contract.
247
247
 
248
248
  ## What this package is, and is not, at runtime
249
249
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "package": "@yaklabs-ai/plugin-sdk",
4
- "version": "0.54.1",
4
+ "version": "0.54.2",
5
5
  "target": "npm",
6
6
  "firstPartyLicense": "MIT",
7
7
  "bundled": [
@@ -3873,14 +3873,20 @@ declare interface RunFailureObservedSessionEvent {
3873
3873
  readonly failure?: RunFailureOccurrence;
3874
3874
  }
3875
3875
 
3876
- declare type RunFailureOccurrence = FailureOccurrence<RunFailureCause>;
3876
+ /**
3877
+ * One run failure record. `Code` and `Domain` default to `string`, as every
3878
+ * reader takes them; a producer passes `RunFailureCode` and
3879
+ * `RunFailureDomain` on the record it makes, so an undeclared code fails to
3880
+ * compile.
3881
+ */
3882
+ declare type RunFailureOccurrence<Code extends string = string, Domain extends string = string> = FailureOccurrence<RunFailureCause, Code, Domain>;
3877
3883
 
3878
3884
  declare type RunFailureReason = (typeof RUN_FAILURE_REASONS)[number];
3879
3885
 
3880
3886
  declare type RunFailureRecord = z.infer<typeof runFailureRecordSchema>;
3881
3887
 
3882
3888
  declare const runFailureRecordSchema: z.ZodObject<{
3883
- failure: z.ZodType<RunFailureOccurrence, unknown, z.core.$ZodTypeInternals<RunFailureOccurrence, unknown>>;
3889
+ failure: z.ZodType<RunFailureOccurrence<string, string>, unknown, z.core.$ZodTypeInternals<RunFailureOccurrence<string, string>, unknown>>;
3884
3890
  errorText: z.ZodString;
3885
3891
  }, z.core.$strict>;
3886
3892
 
@@ -3898,8 +3904,8 @@ declare const runRecoveryOutcomeSchema: z.ZodObject<{
3898
3904
  id: z.ZodString;
3899
3905
  }, z.core.$strict>;
3900
3906
  action: z.ZodEnum<{
3901
- compact: "compact";
3902
3907
  retry: "retry";
3908
+ compact: "compact";
3903
3909
  switch_model: "switch_model";
3904
3910
  switch_account: "switch_account";
3905
3911
  }>;
@@ -221,6 +221,26 @@ var coverageSchema = z2.strictObject({
221
221
  knownOmittedCount: z2.number().int().nonnegative().optional()
222
222
  }).refine((value) => value.status !== "complete" || !value.knownOmittedCount);
223
223
 
224
+ // packages/herd-transcript/dist/is-object.js
225
+ function isObject(value) {
226
+ return typeof value === "object" && value !== null && !Array.isArray(value);
227
+ }
228
+
229
+ // packages/herd-transcript/dist/subscription-failure.js
230
+ var SUBSCRIPTION_FAILURE_KEYS = [
231
+ "subscription.expired",
232
+ "subscription.access-denied",
233
+ "subscription.client-refused",
234
+ "subscription.scope-refused",
235
+ "subscription.renewal-failed",
236
+ "subscription.unreachable",
237
+ "subscription.incomplete",
238
+ "subscription.temporary",
239
+ // Picked by a screen that knows a renewal failed but holds no record.
240
+ "subscription.no-record",
241
+ "subscription.unclassified"
242
+ ];
243
+
224
244
  // packages/herd-transcript/dist/run-failure.js
225
245
  var RUN_FAILURE_DIAGNOSTIC_TYPE = "herd.run.failure";
226
246
  var RUN_FAILURE_CUSTOM_TYPE = "run_failure";
@@ -243,8 +263,27 @@ var runFailureCauseSchema = z3.strictObject({
243
263
  authSource: z3.enum(["oauth", "api-key"]).optional(),
244
264
  credentialRef: z3.string().optional()
245
265
  });
266
+ var RUN_FAILURE_DOMAINS = ["model", "runtime"];
267
+ var RUN_FAILURE_ORGANIZATION_CODES = [
268
+ "model.organization_unavailable.changed",
269
+ "model.organization_unavailable.unreachable",
270
+ "model.organization_unavailable.connecting",
271
+ "model.organization_unavailable.not_ready"
272
+ ];
273
+ var RUN_FAILURE_SIGN_IN_REASONS = [
274
+ "auth",
275
+ "network",
276
+ "server_error"
277
+ ];
278
+ var RUN_FAILURE_CODES = [
279
+ ...RUN_FAILURE_REASONS.map((reason) => `model.${reason}`),
280
+ "runtime.interrupted",
281
+ "runtime.final_output_missing",
282
+ ...RUN_FAILURE_ORGANIZATION_CODES,
283
+ ...RUN_FAILURE_SIGN_IN_REASONS.flatMap((reason) => SUBSCRIPTION_FAILURE_KEYS.map((key) => `model.${reason}.${key}`))
284
+ ];
246
285
  var runFailureSchema = failureSchema(runFailureCauseSchema).extend({
247
- domain: z3.enum(["model", "runtime"])
286
+ domain: z3.enum(RUN_FAILURE_DOMAINS)
248
287
  });
249
288
  var runFailureRecordSchema = z3.strictObject({
250
289
  failure: runFailureSchema.refine((failure) => readFailure(runFailureSchema, failure).status === "valid", "invalid or oversized model failure occurrence"),
@@ -631,13 +670,6 @@ function parsePresentationAnchor(value) {
631
670
 
632
671
  // packages/herd-transcript/dist/tool-call-failure.js
633
672
  import { z as z5 } from "zod";
634
-
635
- // packages/herd-transcript/dist/is-object.js
636
- function isObject(value) {
637
- return typeof value === "object" && value !== null && !Array.isArray(value);
638
- }
639
-
640
- // packages/herd-transcript/dist/tool-call-failure.js
641
673
  var TOOL_CALL_FAILURE_DETAILS_KEY = "toolCallFailure";
642
674
  var TOOL_CALL_FAILURE_DOMAIN = "tool-call";
643
675
  var TOOL_CALL_FAILURE_CATEGORIES = [
@@ -2668,8 +2668,13 @@ declare const KAY_PLUGIN_PROTOCOL_VERSION: "kay.plugin.v1";
2668
2668
  *
2669
2669
  * 0.54.1 adds manifest-declared plugin workers on both backend targets and exposes the canonical
2670
2670
  * transcript placement and answer-stretch rules through the SDK.
2671
+ *
2672
+ * 0.54.2 lets a signal list the files that came with it (epic #15668). `PluginSignal` gains an
2673
+ * optional `attachments`: each file's name, media type, size and the address its bytes are read
2674
+ * from, never the bytes. Gmail lists a mail's attachments there, so Flows can file them. Additive:
2675
+ * a plugin that publishes attachments declares ^0.54.2.
2671
2676
  */
2672
- declare const KAY_PLUGIN_SDK_VERSION: "0.54.1";
2677
+ declare const KAY_PLUGIN_SDK_VERSION: "0.54.2";
2673
2678
 
2674
2679
  declare const KAY_PLUGIN_TARGET_NAMES: readonly ["kay.agent", "kay.app", "kay.ui"];
2675
2680
 
@@ -2722,8 +2722,13 @@ declare const KAY_PLUGIN_PROTOCOL_VERSION: "kay.plugin.v1";
2722
2722
  *
2723
2723
  * 0.54.1 adds manifest-declared plugin workers on both backend targets and exposes the canonical
2724
2724
  * transcript placement and answer-stretch rules through the SDK.
2725
+ *
2726
+ * 0.54.2 lets a signal list the files that came with it (epic #15668). `PluginSignal` gains an
2727
+ * optional `attachments`: each file's name, media type, size and the address its bytes are read
2728
+ * from, never the bytes. Gmail lists a mail's attachments there, so Flows can file them. Additive:
2729
+ * a plugin that publishes attachments declares ^0.54.2.
2725
2730
  */
2726
- declare const KAY_PLUGIN_SDK_VERSION: "0.54.1";
2731
+ declare const KAY_PLUGIN_SDK_VERSION: "0.54.2";
2727
2732
 
2728
2733
  declare const KAY_PLUGIN_TARGET_NAMES: readonly ["kay.agent", "kay.app", "kay.ui"];
2729
2734
 
@@ -5150,6 +5155,7 @@ declare const ResolvedPluginContractV1: z.ZodObject<{
5150
5155
  eventSubscription: "eventSubscription";
5151
5156
  appDataSource: "appDataSource";
5152
5157
  whiteboardType: "whiteboardType";
5158
+ workingDocumentProvider: "workingDocumentProvider";
5153
5159
  approvalType: "approvalType";
5154
5160
  workflow: "workflow";
5155
5161
  contextContributor: "contextContributor";
@@ -6209,6 +6215,24 @@ declare const ResolvedPluginContractV1: z.ZodObject<{
6209
6215
  handover: z.ZodOptional<z.ZodLiteral<true>>;
6210
6216
  globalId: z.ZodString;
6211
6217
  }, z.core.$strict>>>;
6218
+ kayAppWorkingDocumentProviders: z.ZodOptional<z.ZodArray<z.ZodObject<{
6219
+ localId: z.ZodString;
6220
+ globalId: z.ZodString;
6221
+ displayName: z.ZodString;
6222
+ schemes: z.ZodArray<z.ZodString>;
6223
+ hosts: z.ZodArray<z.ZodString>;
6224
+ authServiceId: z.ZodOptional<z.ZodString>;
6225
+ authSchemeId: z.ZodOptional<z.ZodString>;
6226
+ scopeRequirement: z.ZodOptional<z.ZodObject<{
6227
+ purpose: z.ZodString;
6228
+ alternatives: z.ZodArray<z.ZodObject<{
6229
+ allOf: z.ZodArray<z.ZodObject<{
6230
+ scope: z.ZodString;
6231
+ reason: z.ZodExactOptional<z.ZodString>;
6232
+ }, z.core.$strict>>;
6233
+ }, z.core.$strict>>;
6234
+ }, z.core.$strict>>;
6235
+ }, z.core.$strict>>>;
6212
6236
  kayAppMcpServers: z.ZodOptional<z.ZodArray<z.ZodObject<{
6213
6237
  name: z.ZodString;
6214
6238
  pluginId: z.ZodString;
@@ -3076,8 +3076,13 @@ declare const KAY_PLUGIN_PROTOCOL_VERSION: "kay.plugin.v1";
3076
3076
  *
3077
3077
  * 0.54.1 adds manifest-declared plugin workers on both backend targets and exposes the canonical
3078
3078
  * transcript placement and answer-stretch rules through the SDK.
3079
+ *
3080
+ * 0.54.2 lets a signal list the files that came with it (epic #15668). `PluginSignal` gains an
3081
+ * optional `attachments`: each file's name, media type, size and the address its bytes are read
3082
+ * from, never the bytes. Gmail lists a mail's attachments there, so Flows can file them. Additive:
3083
+ * a plugin that publishes attachments declares ^0.54.2.
3079
3084
  */
3080
- declare const KAY_PLUGIN_SDK_VERSION: "0.54.1";
3085
+ declare const KAY_PLUGIN_SDK_VERSION: "0.54.2";
3081
3086
 
3082
3087
  declare const KAY_PLUGIN_TARGET_NAMES: readonly ["kay.agent", "kay.app", "kay.ui"];
3083
3088
 
@@ -3404,14 +3404,20 @@ declare const runFailureCauseSchema: z.ZodObject<{
3404
3404
  credentialRef: z.ZodOptional<z.ZodString>;
3405
3405
  }, z.core.$strict>;
3406
3406
 
3407
- declare type RunFailureOccurrence = FailureOccurrence<RunFailureCause>;
3407
+ /**
3408
+ * One run failure record. `Code` and `Domain` default to `string`, as every
3409
+ * reader takes them; a producer passes `RunFailureCode` and
3410
+ * `RunFailureDomain` on the record it makes, so an undeclared code fails to
3411
+ * compile.
3412
+ */
3413
+ declare type RunFailureOccurrence<Code extends string = string, Domain extends string = string> = FailureOccurrence<RunFailureCause, Code, Domain>;
3408
3414
 
3409
3415
  declare type RunFailureReason = (typeof RUN_FAILURE_REASONS)[number];
3410
3416
 
3411
3417
  declare type RunFailureRecord = z.infer<typeof runFailureRecordSchema>;
3412
3418
 
3413
3419
  declare const runFailureRecordSchema: z.ZodObject<{
3414
- failure: z.ZodType<RunFailureOccurrence, unknown, z.core.$ZodTypeInternals<RunFailureOccurrence, unknown>>;
3420
+ failure: z.ZodType<RunFailureOccurrence<string, string>, unknown, z.core.$ZodTypeInternals<RunFailureOccurrence<string, string>, unknown>>;
3415
3421
  errorText: z.ZodString;
3416
3422
  }, z.core.$strict>;
3417
3423
 
package/dist/kay-app.d.ts CHANGED
@@ -324,7 +324,7 @@ declare const AgentRuntimeAutomationRunDetail: z.ZodObject<{
324
324
  retryable: z.ZodBoolean;
325
325
  retryAfterMs: z.ZodOptional<z.ZodNumber>;
326
326
  }, z.core.$strict>>;
327
- failure: z.ZodOptional<z.ZodType<RunFailureOccurrence, unknown, z.core.$ZodTypeInternals<RunFailureOccurrence, unknown>>>;
327
+ failure: z.ZodOptional<z.ZodType<RunFailureOccurrence<string, string>, unknown, z.core.$ZodTypeInternals<RunFailureOccurrence<string, string>, unknown>>>;
328
328
  sessionId: z.ZodOptional<z.ZodString>;
329
329
  retryAtMs: z.ZodOptional<z.ZodNumber>;
330
330
  tries: z.ZodOptional<z.ZodNumber>;
@@ -4304,8 +4304,13 @@ declare const KAY_PLUGIN_PROTOCOL_VERSION: "kay.plugin.v1";
4304
4304
  *
4305
4305
  * 0.54.1 adds manifest-declared plugin workers on both backend targets and exposes the canonical
4306
4306
  * transcript placement and answer-stretch rules through the SDK.
4307
+ *
4308
+ * 0.54.2 lets a signal list the files that came with it (epic #15668). `PluginSignal` gains an
4309
+ * optional `attachments`: each file's name, media type, size and the address its bytes are read
4310
+ * from, never the bytes. Gmail lists a mail's attachments there, so Flows can file them. Additive:
4311
+ * a plugin that publishes attachments declares ^0.54.2.
4307
4312
  */
4308
- declare const KAY_PLUGIN_SDK_VERSION: "0.54.1";
4313
+ declare const KAY_PLUGIN_SDK_VERSION: "0.54.2";
4309
4314
 
4310
4315
  declare const KAY_PLUGIN_TARGET_NAMES: readonly ["kay.agent", "kay.app", "kay.ui"];
4311
4316
 
@@ -6604,6 +6609,11 @@ export declare interface KayAppPluginApi {
6604
6609
  readonly resourcePicks?: {
6605
6610
  registerCompletion(moduleId: string, handler: PluginResourcePickHandler): void;
6606
6611
  };
6612
+ /**
6613
+ * Working-document providers. Present when the manifest declares `workingDocumentProviders`;
6614
+ * each registration must name one of them.
6615
+ */
6616
+ readonly workingDocuments?: KayAppWorkingDocuments;
6607
6617
  readonly mcp: KayAppMcp;
6608
6618
  /** This plugin's canonical id (already validated by the host registry). */
6609
6619
  readonly id: string;
@@ -9882,6 +9892,73 @@ export declare type KayAppWorkflowTimeTrigger = Extract<KayAppAutomationConditio
9882
9892
  */
9883
9893
  export declare type KayAppWorkflowTrigger = KayAppWorkflowTimeTrigger | KayAppAutomationPluginEventCondition | KayAppWorkflowSignalsTrigger;
9884
9894
 
9895
+ /** One binary asset pulled with a document (an image, an embed). */
9896
+ export declare interface KayAppWorkingDocumentAsset {
9897
+ /** A file-safe suggested name; the daemon dedupes it. */
9898
+ readonly suggestedName: string;
9899
+ readonly bytes: Uint8Array;
9900
+ readonly mime: string;
9901
+ /** Where it was downloaded from, so a push can put the upstream URL back. */
9902
+ readonly sourceUrl?: string;
9903
+ }
9904
+
9905
+ /**
9906
+ * What one working-document call receives. The daemon owns the local copy, the base text and the
9907
+ * revision guard; a provider only talks to its document source. `auth` is the token the daemon
9908
+ * resolved from the provider's declared `authService`, absent for a provider that declares none.
9909
+ */
9910
+ export declare interface KayAppWorkingDocumentContext {
9911
+ /** The source the person named, as the daemon parsed it: a web link or a URI. */
9912
+ readonly sourceUrl: string;
9913
+ readonly auth?: {
9914
+ readonly accessToken: string;
9915
+ readonly accountId?: string;
9916
+ };
9917
+ readonly signal: AbortSignal;
9918
+ }
9919
+
9920
+ /**
9921
+ * A document source's code, registered for a `workingDocumentProviders` entry the manifest
9922
+ * declares. Which URLs it serves, its display name and its sign-in are manifest data.
9923
+ */
9924
+ export declare interface KayAppWorkingDocumentProvider {
9925
+ pull(ctx: KayAppWorkingDocumentContext): Promise<KayAppWorkingDocumentPull>;
9926
+ push(ctx: KayAppWorkingDocumentContext, input: KayAppWorkingDocumentPushInput): Promise<KayAppWorkingDocumentPushResult>;
9927
+ /** The live upstream revision, which the daemon compares before a push. */
9928
+ checkRevision(ctx: KayAppWorkingDocumentContext): Promise<string>;
9929
+ }
9930
+
9931
+ /** What a pull returns: the document as Markdown, its title, its upstream revision and assets. */
9932
+ export declare interface KayAppWorkingDocumentPull {
9933
+ readonly markdown: string;
9934
+ readonly title: string;
9935
+ readonly revision: string;
9936
+ readonly assets: readonly KayAppWorkingDocumentAsset[];
9937
+ /** Notes for the person who pulled it (blocks that did not convert, rewrites). */
9938
+ readonly notes: readonly string[];
9939
+ }
9940
+
9941
+ /** What a push receives: the text the copy was pulled at and the edited text to write upstream. */
9942
+ export declare interface KayAppWorkingDocumentPushInput {
9943
+ readonly baseText: string;
9944
+ readonly nextText: string;
9945
+ /** The person forced past a changed upstream: overwrite the whole body. */
9946
+ readonly force?: boolean;
9947
+ /** A snippet naming the block to scroll to afterwards; return `anchor` if you can resolve it. */
9948
+ readonly anchorHint?: string;
9949
+ }
9950
+
9951
+ export declare interface KayAppWorkingDocumentPushResult {
9952
+ readonly revision: string;
9953
+ readonly warnings: readonly string[];
9954
+ readonly anchor?: string;
9955
+ }
9956
+
9957
+ export declare interface KayAppWorkingDocuments {
9958
+ /** Register the code for the declared provider `localId`, once, during activation. */
9959
+ registerProvider(localId: string, provider: KayAppWorkingDocumentProvider): void;
9960
+ }
9961
+
9885
9962
  /**
9886
9963
  * Read/arrange access to the live desktop workspace (tabs, panes, the shell chrome). Always
9887
9964
  * present. `snapshot` is ungated; `execute` is checked per call against the `workspace.command`
@@ -11363,6 +11440,15 @@ declare function PickDeferred<Type extends TSchema, Indexer extends TSchema>(typ
11363
11440
  */
11364
11441
  export declare const PLUGIN_EVENT_REFUSED_ERROR_NAME = "PluginEventRefusedError";
11365
11442
 
11443
+ /** An attachment's file name, at most this many characters. */
11444
+ export declare const PLUGIN_SIGNAL_ATTACHMENT_NAME_MAX = 255;
11445
+
11446
+ /** An attachment's media type (`application/pdf`), at most this many characters. */
11447
+ export declare const PLUGIN_SIGNAL_ATTACHMENT_TYPE_MAX = 127;
11448
+
11449
+ /** At most this many entries in a signal's `attachments`; a source lists the first ones. */
11450
+ export declare const PLUGIN_SIGNAL_ATTACHMENTS_MAX = 10;
11451
+
11366
11452
  /** The `kind` values of `PluginSignal` v1. `status` is system state that clears itself. */
11367
11453
  export declare const PLUGIN_SIGNAL_KINDS: readonly ["message", "request", "mention", "invite", "status"];
11368
11454
 
@@ -11561,6 +11647,12 @@ export declare const PluginSignal: z.ZodObject<{
11561
11647
  open: "open";
11562
11648
  resolved: "resolved";
11563
11649
  }>>;
11650
+ attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
11651
+ name: z.ZodString;
11652
+ type: z.ZodString;
11653
+ size: z.ZodNumber;
11654
+ uri: z.ZodString;
11655
+ }, z.core.$strict>>>;
11564
11656
  }, z.core.$strict>;
11565
11657
 
11566
11658
  export declare type PluginSignal = z.infer<typeof PluginSignal>;
@@ -11599,6 +11691,12 @@ export declare const PluginSignalPublish: z.ZodObject<{
11599
11691
  open: "open";
11600
11692
  resolved: "resolved";
11601
11693
  }>>;
11694
+ attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
11695
+ name: z.ZodString;
11696
+ type: z.ZodString;
11697
+ size: z.ZodNumber;
11698
+ uri: z.ZodString;
11699
+ }, z.core.$strict>>>;
11602
11700
  }, z.core.$strict>;
11603
11701
  related: z.ZodObject<{
11604
11702
  thread: z.ZodString;
@@ -12270,14 +12368,20 @@ declare const runFailureCauseSchema: z.ZodObject<{
12270
12368
  credentialRef: z.ZodOptional<z.ZodString>;
12271
12369
  }, z.core.$strict>;
12272
12370
 
12273
- declare type RunFailureOccurrence = FailureOccurrence<RunFailureCause>;
12371
+ /**
12372
+ * One run failure record. `Code` and `Domain` default to `string`, as every
12373
+ * reader takes them; a producer passes `RunFailureCode` and
12374
+ * `RunFailureDomain` on the record it makes, so an undeclared code fails to
12375
+ * compile.
12376
+ */
12377
+ declare type RunFailureOccurrence<Code extends string = string, Domain extends string = string> = FailureOccurrence<RunFailureCause, Code, Domain>;
12274
12378
 
12275
12379
  declare type RunFailureReason = (typeof RUN_FAILURE_REASONS)[number];
12276
12380
 
12277
12381
  declare type RunFailureRecord = z.infer<typeof runFailureRecordSchema>;
12278
12382
 
12279
12383
  declare const runFailureRecordSchema: z.ZodObject<{
12280
- failure: z.ZodType<RunFailureOccurrence, unknown, z.core.$ZodTypeInternals<RunFailureOccurrence, unknown>>;
12384
+ failure: z.ZodType<RunFailureOccurrence<string, string>, unknown, z.core.$ZodTypeInternals<RunFailureOccurrence<string, string>, unknown>>;
12281
12385
  errorText: z.ZodString;
12282
12386
  }, z.core.$strict>;
12283
12387
 
package/dist/kay-app.js CHANGED
@@ -370,6 +370,9 @@ var PLUGIN_SIGNAL_TITLE_MAX = 300;
370
370
  var PLUGIN_SIGNAL_SNIPPET_MAX = 500;
371
371
  var PLUGIN_SIGNAL_LABELS_MAX = 20;
372
372
  var PLUGIN_SIGNAL_LABEL_MAX = 64;
373
+ var PLUGIN_SIGNAL_ATTACHMENTS_MAX = 10;
374
+ var PLUGIN_SIGNAL_ATTACHMENT_NAME_MAX = 255;
375
+ var PLUGIN_SIGNAL_ATTACHMENT_TYPE_MAX = 127;
373
376
  var PLUGIN_SIGNAL_RELATED_KEYS = [
374
377
  "thread",
375
378
  "from",
@@ -1184,6 +1187,9 @@ export {
1184
1187
  KayAppWorkflowFailure,
1185
1188
  MAX_CHOICE_LABELS,
1186
1189
  PLUGIN_EVENT_REFUSED_ERROR_NAME,
1190
+ PLUGIN_SIGNAL_ATTACHMENTS_MAX,
1191
+ PLUGIN_SIGNAL_ATTACHMENT_NAME_MAX,
1192
+ PLUGIN_SIGNAL_ATTACHMENT_TYPE_MAX,
1187
1193
  PLUGIN_SIGNAL_KINDS,
1188
1194
  PLUGIN_SIGNAL_LABELS_MAX,
1189
1195
  PLUGIN_SIGNAL_LABEL_MAX,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yaklabs-ai/plugin-sdk",
3
- "version": "0.54.1",
3
+ "version": "0.54.2",
4
4
  "description": "The Kay plugin SDK — types and helpers for authoring a Kay directory plugin.",
5
5
  "author": "YakLabs",
6
6
  "type": "module",