@yaklabs-ai/plugin-sdk 0.54.0 → 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/dist/kay-app.js CHANGED
@@ -1,3 +1,20 @@
1
+ // packages/plugin-sdk/dist/workers.js
2
+ var PluginWorkerError = class extends Error {
3
+ code;
4
+ constructor(code, message = `Plugin worker request failed: ${code}`) {
5
+ super(message);
6
+ this.code = code;
7
+ this.name = "PluginWorkerError";
8
+ }
9
+ };
10
+ function createUnavailablePluginWorkers() {
11
+ return {
12
+ async run() {
13
+ throw new PluginWorkerError("spawn_failed", "Plugin workers are not available on this host.");
14
+ }
15
+ };
16
+ }
17
+
1
18
  // packages/herd-uri/dist/errors.js
2
19
  var UriError = class extends Error {
3
20
  };
@@ -353,6 +370,9 @@ var PLUGIN_SIGNAL_TITLE_MAX = 300;
353
370
  var PLUGIN_SIGNAL_SNIPPET_MAX = 500;
354
371
  var PLUGIN_SIGNAL_LABELS_MAX = 20;
355
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;
356
376
  var PLUGIN_SIGNAL_RELATED_KEYS = [
357
377
  "thread",
358
378
  "from",
@@ -1167,12 +1187,16 @@ export {
1167
1187
  KayAppWorkflowFailure,
1168
1188
  MAX_CHOICE_LABELS,
1169
1189
  PLUGIN_EVENT_REFUSED_ERROR_NAME,
1190
+ PLUGIN_SIGNAL_ATTACHMENTS_MAX,
1191
+ PLUGIN_SIGNAL_ATTACHMENT_NAME_MAX,
1192
+ PLUGIN_SIGNAL_ATTACHMENT_TYPE_MAX,
1170
1193
  PLUGIN_SIGNAL_KINDS,
1171
1194
  PLUGIN_SIGNAL_LABELS_MAX,
1172
1195
  PLUGIN_SIGNAL_LABEL_MAX,
1173
1196
  PLUGIN_SIGNAL_RELATED_KEYS,
1174
1197
  PLUGIN_SIGNAL_SNIPPET_MAX,
1175
1198
  PLUGIN_SIGNAL_TITLE_MAX,
1199
+ PluginWorkerError,
1176
1200
  ProjectDirectory,
1177
1201
  ProjectDirectoryRequest,
1178
1202
  ProjectDirectoryResponse,
@@ -1193,6 +1217,7 @@ export {
1193
1217
  createFallbackOnlySignals,
1194
1218
  createKayPluginLog,
1195
1219
  createUnavailablePluginEndpointCaller,
1220
+ createUnavailablePluginWorkers,
1196
1221
  createUnavailableSealing,
1197
1222
  createUnavailableSkills,
1198
1223
  createUnavailableTools,
@@ -0,0 +1,27 @@
1
+ /** A refusal handle for hosts that have not composed plugin worker execution. */
2
+ export declare function createUnavailablePluginWorkers(): KayPluginWorkers;
3
+
4
+ /** A declared module exports this function; input and output must be JSON values. */
5
+ export declare interface KayPluginWorkerModule {
6
+ run(input: unknown): unknown | Promise<unknown>;
7
+ }
8
+
9
+ /** Run only this plugin's declared modules in a fresh child owned by its hosting process. */
10
+ export declare interface KayPluginWorkers {
11
+ /** The host terminates the child on deadline, caller abort or plugin disposal. */
12
+ run<T = unknown>(workerId: string, input: unknown, options: {
13
+ readonly timeoutMs: number;
14
+ readonly signal?: AbortSignal;
15
+ }): Promise<T>;
16
+ }
17
+
18
+ /** A worker refusal or failure; the code is safe to record without its input or output. */
19
+ export declare class PluginWorkerError extends Error {
20
+ readonly code: PluginWorkerErrorCode;
21
+ constructor(code: PluginWorkerErrorCode, message?: string);
22
+ }
23
+
24
+ /** Stable, content-free failure classes for a plugin worker request. */
25
+ export declare type PluginWorkerErrorCode = "undeclared" | "invalid_module" | "invalid_input" | "input_too_large" | "output_too_large" | "timeout" | "aborted" | "spawn_failed" | "child_failed" | "invalid_output";
26
+
27
+ export { }
@@ -0,0 +1,20 @@
1
+ // packages/plugin-sdk/dist/workers.js
2
+ var PluginWorkerError = class extends Error {
3
+ code;
4
+ constructor(code, message = `Plugin worker request failed: ${code}`) {
5
+ super(message);
6
+ this.code = code;
7
+ this.name = "PluginWorkerError";
8
+ }
9
+ };
10
+ function createUnavailablePluginWorkers() {
11
+ return {
12
+ async run() {
13
+ throw new PluginWorkerError("spawn_failed", "Plugin workers are not available on this host.");
14
+ }
15
+ };
16
+ }
17
+ export {
18
+ PluginWorkerError,
19
+ createUnavailablePluginWorkers
20
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yaklabs-ai/plugin-sdk",
3
- "version": "0.54.0",
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",
@@ -25,6 +25,10 @@
25
25
  "types": "./dist/endpoints.d.ts",
26
26
  "default": "./dist/endpoints.js"
27
27
  },
28
+ "./workers": {
29
+ "types": "./dist/workers.d.ts",
30
+ "default": "./dist/workers.js"
31
+ },
28
32
  "./kay-app/session-summary": {
29
33
  "types": "./dist/kay-app-session-summary.d.ts",
30
34
  "default": "./dist/kay-app-session-summary.js"