@yaklabs-ai/plugin-sdk 0.15.0 → 0.15.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 +2 -2
- package/THIRD-PARTY-INVENTORY.json +1 -1
- package/dist/disclosure.d.ts +18 -0
- package/dist/kay-agent-testing.d.ts +18 -0
- package/dist/kay-agent.d.ts +18 -0
- package/dist/kay-app-session-summary.d.ts +1 -0
- package/dist/kay-app.d.ts +49 -3
- package/dist/kay-app.js +1 -0
- package/package.json +1 -1
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.15.
|
|
16
|
+
"@bonsai/plugin-sdk": "npm:@yaklabs-ai/plugin-sdk@^0.15.1"
|
|
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.15.
|
|
65
|
+
"compatibility": { "sdk": "^0.15.1" },
|
|
66
66
|
"targets": {
|
|
67
67
|
"kay": {
|
|
68
68
|
"agent": {
|
package/dist/disclosure.d.ts
CHANGED
|
@@ -7077,6 +7077,14 @@ declare type ToolParametersWire = unknown;
|
|
|
7077
7077
|
* declares {@link ToolPermissionHint.quiet} and keeps its honest `kind`.
|
|
7078
7078
|
*/
|
|
7079
7079
|
declare interface ToolPermissionHint {
|
|
7080
|
+
/**
|
|
7081
|
+
* Names this exact call for the approval card, from its validated input: a title and optional
|
|
7082
|
+
* labelled facts. Render-only: never matched against a rule, never one-tap approval grounds.
|
|
7083
|
+
* The tool says what its input claims, so the gate shows it as the tool's claim, not as the
|
|
7084
|
+
* daemon's attestation. The host admits only display-safe text; a throw, a blank title or an
|
|
7085
|
+
* unsafe string costs the description and the call is asked about as before.
|
|
7086
|
+
*/
|
|
7087
|
+
readonly describePreview?: (input: Record<string, unknown>) => ToolPreviewDescription | undefined;
|
|
7080
7088
|
readonly kind?: ToolActionKind;
|
|
7081
7089
|
readonly scheme?: string;
|
|
7082
7090
|
readonly ruleKey?: string;
|
|
@@ -7203,6 +7211,16 @@ declare interface ToolPermissionHint {
|
|
|
7203
7211
|
readonly defaultPermission?: "allow" | "ask" | "never";
|
|
7204
7212
|
}
|
|
7205
7213
|
|
|
7214
|
+
/** What {@link ToolPermissionHint.describePreview} answers. */
|
|
7215
|
+
declare interface ToolPreviewDescription {
|
|
7216
|
+
readonly title: string;
|
|
7217
|
+
readonly description?: string;
|
|
7218
|
+
readonly fields?: readonly {
|
|
7219
|
+
readonly label: string;
|
|
7220
|
+
readonly value: string;
|
|
7221
|
+
}[];
|
|
7222
|
+
}
|
|
7223
|
+
|
|
7206
7224
|
/** Controls whether a tool is expected to complete inline or via background adoption. */
|
|
7207
7225
|
declare type ToolRunPolicy = "inline" | "background";
|
|
7208
7226
|
|
|
@@ -7000,6 +7000,14 @@ declare type ToolParametersWire = unknown;
|
|
|
7000
7000
|
* declares {@link ToolPermissionHint.quiet} and keeps its honest `kind`.
|
|
7001
7001
|
*/
|
|
7002
7002
|
declare interface ToolPermissionHint {
|
|
7003
|
+
/**
|
|
7004
|
+
* Names this exact call for the approval card, from its validated input: a title and optional
|
|
7005
|
+
* labelled facts. Render-only: never matched against a rule, never one-tap approval grounds.
|
|
7006
|
+
* The tool says what its input claims, so the gate shows it as the tool's claim, not as the
|
|
7007
|
+
* daemon's attestation. The host admits only display-safe text; a throw, a blank title or an
|
|
7008
|
+
* unsafe string costs the description and the call is asked about as before.
|
|
7009
|
+
*/
|
|
7010
|
+
readonly describePreview?: (input: Record<string, unknown>) => ToolPreviewDescription | undefined;
|
|
7003
7011
|
readonly kind?: ToolActionKind;
|
|
7004
7012
|
readonly scheme?: string;
|
|
7005
7013
|
readonly ruleKey?: string;
|
|
@@ -7126,6 +7134,16 @@ declare interface ToolPermissionHint {
|
|
|
7126
7134
|
readonly defaultPermission?: "allow" | "ask" | "never";
|
|
7127
7135
|
}
|
|
7128
7136
|
|
|
7137
|
+
/** What {@link ToolPermissionHint.describePreview} answers. */
|
|
7138
|
+
declare interface ToolPreviewDescription {
|
|
7139
|
+
readonly title: string;
|
|
7140
|
+
readonly description?: string;
|
|
7141
|
+
readonly fields?: readonly {
|
|
7142
|
+
readonly label: string;
|
|
7143
|
+
readonly value: string;
|
|
7144
|
+
}[];
|
|
7145
|
+
}
|
|
7146
|
+
|
|
7129
7147
|
/** Controls whether a tool is expected to complete inline or via background adoption. */
|
|
7130
7148
|
declare type ToolRunPolicy = "inline" | "background";
|
|
7131
7149
|
|
package/dist/kay-agent.d.ts
CHANGED
|
@@ -9053,6 +9053,14 @@ export declare type ToolParametersWire = unknown;
|
|
|
9053
9053
|
* declares {@link ToolPermissionHint.quiet} and keeps its honest `kind`.
|
|
9054
9054
|
*/
|
|
9055
9055
|
declare interface ToolPermissionHint {
|
|
9056
|
+
/**
|
|
9057
|
+
* Names this exact call for the approval card, from its validated input: a title and optional
|
|
9058
|
+
* labelled facts. Render-only: never matched against a rule, never one-tap approval grounds.
|
|
9059
|
+
* The tool says what its input claims, so the gate shows it as the tool's claim, not as the
|
|
9060
|
+
* daemon's attestation. The host admits only display-safe text; a throw, a blank title or an
|
|
9061
|
+
* unsafe string costs the description and the call is asked about as before.
|
|
9062
|
+
*/
|
|
9063
|
+
readonly describePreview?: (input: Record<string, unknown>) => ToolPreviewDescription | undefined;
|
|
9056
9064
|
readonly kind?: ToolActionKind;
|
|
9057
9065
|
readonly scheme?: string;
|
|
9058
9066
|
readonly ruleKey?: string;
|
|
@@ -9179,6 +9187,16 @@ declare interface ToolPermissionHint {
|
|
|
9179
9187
|
readonly defaultPermission?: "allow" | "ask" | "never";
|
|
9180
9188
|
}
|
|
9181
9189
|
|
|
9190
|
+
/** What {@link ToolPermissionHint.describePreview} answers. */
|
|
9191
|
+
declare interface ToolPreviewDescription {
|
|
9192
|
+
readonly title: string;
|
|
9193
|
+
readonly description?: string;
|
|
9194
|
+
readonly fields?: readonly {
|
|
9195
|
+
readonly label: string;
|
|
9196
|
+
readonly value: string;
|
|
9197
|
+
}[];
|
|
9198
|
+
}
|
|
9199
|
+
|
|
9182
9200
|
/** Controls whether a tool is expected to complete inline or via background adoption. */
|
|
9183
9201
|
export declare type ToolRunPolicy = "inline" | "background";
|
|
9184
9202
|
|
package/dist/kay-app.d.ts
CHANGED
|
@@ -1850,7 +1850,7 @@ declare type JsonValue_4 = null | boolean | number | string | readonly JsonValue
|
|
|
1850
1850
|
* the union and not to this list, so the next kind cannot repeat that bug
|
|
1851
1851
|
* quietly.
|
|
1852
1852
|
*/
|
|
1853
|
-
export declare const KAY_APP_AUTOMATION_CONDITION_KINDS: readonly ["time", "uri-change", "occurrence", "delayed-occurrence"];
|
|
1853
|
+
export declare const KAY_APP_AUTOMATION_CONDITION_KINDS: readonly ["time", "uri-change", "plugin-event", "occurrence", "delayed-occurrence"];
|
|
1854
1854
|
|
|
1855
1855
|
/** Maximum UTF-8 JSON size of one plugin app-data live change. */
|
|
1856
1856
|
export declare const KAY_APP_DATA_CHANGE_MAX_BYTES: number;
|
|
@@ -2473,7 +2473,7 @@ export declare interface KayAppAutomationBinding {
|
|
|
2473
2473
|
readonly scriptLastError?: string;
|
|
2474
2474
|
}
|
|
2475
2475
|
|
|
2476
|
-
export declare type KayAppAutomationCondition = Extract<KayAppAutomationConditionInput, {
|
|
2476
|
+
export declare type KayAppAutomationCondition = KayAppAutomationPluginEventCondition | Extract<KayAppAutomationConditionInput, {
|
|
2477
2477
|
readonly kind: "time";
|
|
2478
2478
|
}> | KayAppAutomationUriChangeCondition | {
|
|
2479
2479
|
readonly kind: "occurrence";
|
|
@@ -2495,7 +2495,7 @@ export declare type KayAppAutomationCondition = Extract<KayAppAutomationConditio
|
|
|
2495
2495
|
readonly guard?: "session-idle";
|
|
2496
2496
|
};
|
|
2497
2497
|
|
|
2498
|
-
export declare type KayAppAutomationConditionInput = {
|
|
2498
|
+
export declare type KayAppAutomationConditionInput = KayAppAutomationPluginEventCondition | {
|
|
2499
2499
|
readonly kind: "time";
|
|
2500
2500
|
readonly schedule: {
|
|
2501
2501
|
readonly kind: "every";
|
|
@@ -2607,6 +2607,22 @@ export declare interface KayAppAutomationExternalResourceItem {
|
|
|
2607
2607
|
export declare type KayAppAutomationFactSource = "run-settled" | "tool-used" | "tool-failed";
|
|
2608
2608
|
|
|
2609
2609
|
export declare type KayAppAutomationMatch = {
|
|
2610
|
+
readonly kind: "plugin-event";
|
|
2611
|
+
readonly event: {
|
|
2612
|
+
readonly id: string;
|
|
2613
|
+
readonly type: string;
|
|
2614
|
+
readonly version: number;
|
|
2615
|
+
readonly uri: string;
|
|
2616
|
+
readonly occurredAt: string;
|
|
2617
|
+
readonly publishedAt: string;
|
|
2618
|
+
readonly source: {
|
|
2619
|
+
readonly layer: "runtime";
|
|
2620
|
+
readonly pluginId: string;
|
|
2621
|
+
readonly poller?: string | undefined;
|
|
2622
|
+
readonly runId?: string | undefined;
|
|
2623
|
+
};
|
|
2624
|
+
};
|
|
2625
|
+
} | {
|
|
2610
2626
|
readonly kind: "time";
|
|
2611
2627
|
readonly scheduledAtMs: number;
|
|
2612
2628
|
} | {
|
|
@@ -2648,6 +2664,16 @@ export declare type KayAppAutomationMatch = {
|
|
|
2648
2664
|
readonly requestedBy?: "user" | "agent" | undefined;
|
|
2649
2665
|
};
|
|
2650
2666
|
|
|
2667
|
+
/** Match any listed type; filters use strict equality or scalar-list containment. */
|
|
2668
|
+
export declare interface KayAppAutomationPluginEventCondition {
|
|
2669
|
+
readonly kind: "plugin-event";
|
|
2670
|
+
readonly events: readonly string[];
|
|
2671
|
+
readonly where?: readonly {
|
|
2672
|
+
readonly path: string;
|
|
2673
|
+
readonly equals: string | number | boolean;
|
|
2674
|
+
}[];
|
|
2675
|
+
}
|
|
2676
|
+
|
|
2651
2677
|
/**
|
|
2652
2678
|
* One URI a run produced: every URI its successful `write` and `edit` calls
|
|
2653
2679
|
* changed, every URI a tool declared it created or updated, and every row
|
|
@@ -8260,6 +8286,7 @@ declare const SessionCreator: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
8260
8286
|
cron: "cron";
|
|
8261
8287
|
occurrence: "occurrence";
|
|
8262
8288
|
"uri-change": "uri-change";
|
|
8289
|
+
"plugin-event": "plugin-event";
|
|
8263
8290
|
manual: "manual";
|
|
8264
8291
|
}>;
|
|
8265
8292
|
}, z.core.$strict>, z.ZodObject<{
|
|
@@ -8351,6 +8378,7 @@ declare const SessionProvenanceRecord: z.ZodObject<{
|
|
|
8351
8378
|
cron: "cron";
|
|
8352
8379
|
occurrence: "occurrence";
|
|
8353
8380
|
"uri-change": "uri-change";
|
|
8381
|
+
"plugin-event": "plugin-event";
|
|
8354
8382
|
manual: "manual";
|
|
8355
8383
|
}>;
|
|
8356
8384
|
}, z.core.$strict>, z.ZodObject<{
|
|
@@ -11201,6 +11229,14 @@ export declare type ToolParametersWire = unknown;
|
|
|
11201
11229
|
* declares {@link ToolPermissionHint.quiet} and keeps its honest `kind`.
|
|
11202
11230
|
*/
|
|
11203
11231
|
export declare interface ToolPermissionHint {
|
|
11232
|
+
/**
|
|
11233
|
+
* Names this exact call for the approval card, from its validated input: a title and optional
|
|
11234
|
+
* labelled facts. Render-only: never matched against a rule, never one-tap approval grounds.
|
|
11235
|
+
* The tool says what its input claims, so the gate shows it as the tool's claim, not as the
|
|
11236
|
+
* daemon's attestation. The host admits only display-safe text; a throw, a blank title or an
|
|
11237
|
+
* unsafe string costs the description and the call is asked about as before.
|
|
11238
|
+
*/
|
|
11239
|
+
readonly describePreview?: (input: Record<string, unknown>) => ToolPreviewDescription | undefined;
|
|
11204
11240
|
readonly kind?: ToolActionKind;
|
|
11205
11241
|
readonly scheme?: string;
|
|
11206
11242
|
readonly ruleKey?: string;
|
|
@@ -11327,6 +11363,16 @@ export declare interface ToolPermissionHint {
|
|
|
11327
11363
|
readonly defaultPermission?: "allow" | "ask" | "never";
|
|
11328
11364
|
}
|
|
11329
11365
|
|
|
11366
|
+
/** What {@link ToolPermissionHint.describePreview} answers. */
|
|
11367
|
+
declare interface ToolPreviewDescription {
|
|
11368
|
+
readonly title: string;
|
|
11369
|
+
readonly description?: string;
|
|
11370
|
+
readonly fields?: readonly {
|
|
11371
|
+
readonly label: string;
|
|
11372
|
+
readonly value: string;
|
|
11373
|
+
}[];
|
|
11374
|
+
}
|
|
11375
|
+
|
|
11330
11376
|
declare interface ToolReference {
|
|
11331
11377
|
name: string;
|
|
11332
11378
|
}
|
package/dist/kay-app.js
CHANGED