@yaklabs-ai/plugin-sdk 0.54.0 → 0.54.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 +16 -5
- package/THIRD-PARTY-INVENTORY.json +1 -1
- package/dist/canonical-transcript.d.ts +66 -0
- package/dist/canonical-transcript.js +567 -3
- package/dist/disclosure.d.ts +329 -110
- package/dist/disclosure.js +1 -0
- package/dist/kay-agent-testing.d.ts +334 -111
- package/dist/kay-agent-testing.js +1 -0
- package/dist/kay-agent.d.ts +389 -87
- package/dist/kay-agent.js +19 -0
- package/dist/kay-app-session-summary.d.ts +267 -128
- package/dist/kay-app.d.ts +1527 -212
- package/dist/kay-app.js +19 -0
- package/dist/workers.d.ts +27 -0
- package/dist/workers.js +20 -0
- package/package.json +5 -1
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
|
};
|
|
@@ -1173,6 +1190,7 @@ export {
|
|
|
1173
1190
|
PLUGIN_SIGNAL_RELATED_KEYS,
|
|
1174
1191
|
PLUGIN_SIGNAL_SNIPPET_MAX,
|
|
1175
1192
|
PLUGIN_SIGNAL_TITLE_MAX,
|
|
1193
|
+
PluginWorkerError,
|
|
1176
1194
|
ProjectDirectory,
|
|
1177
1195
|
ProjectDirectoryRequest,
|
|
1178
1196
|
ProjectDirectoryResponse,
|
|
@@ -1193,6 +1211,7 @@ export {
|
|
|
1193
1211
|
createFallbackOnlySignals,
|
|
1194
1212
|
createKayPluginLog,
|
|
1195
1213
|
createUnavailablePluginEndpointCaller,
|
|
1214
|
+
createUnavailablePluginWorkers,
|
|
1196
1215
|
createUnavailableSealing,
|
|
1197
1216
|
createUnavailableSkills,
|
|
1198
1217
|
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 { }
|
package/dist/workers.js
ADDED
|
@@ -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.
|
|
3
|
+
"version": "0.54.1",
|
|
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"
|