@yaklabs-ai/plugin-sdk 0.50.0 → 0.52.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 +5 -5
- package/THIRD-PARTY-INVENTORY.json +1 -1
- package/dist/disclosure.d.ts +3 -1
- package/dist/kay-agent-testing.d.ts +99 -17
- package/dist/kay-agent.d.ts +32 -2
- package/dist/kay-app.d.ts +81 -4
- package/dist/kay-app.js +63 -20
- 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.
|
|
16
|
+
"@bonsai/plugin-sdk": "npm:@yaklabs-ai/plugin-sdk@^0.52.0"
|
|
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.
|
|
65
|
+
"compatibility": { "sdk": "^0.52.0" },
|
|
66
66
|
"targets": {
|
|
67
67
|
"kay": {
|
|
68
68
|
"agent": {
|
|
@@ -151,7 +151,7 @@ naming both versions, instead of loading it and finding no `activate`.
|
|
|
151
151
|
| `@bonsai/plugin-sdk/system-one` | The types and error class for `api.systemOne` / `app.systemOne`, from 0.13.8 |
|
|
152
152
|
| `@bonsai/plugin-sdk/zod` | `z` (the host's in the daemon), on an entry with no other import, from 0.13.9 |
|
|
153
153
|
|
|
154
|
-
A plugin that imports these subpaths declares the current supported SDK range (`^0.
|
|
154
|
+
A plugin that imports these subpaths declares the current supported SDK range (`^0.52.0`).
|
|
155
155
|
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
|
|
156
156
|
vendor's MCP server itself is a separate host decision: Bonsai hosts it once a person approves
|
|
157
157
|
the plugin's `mcp.host-server` grant for that server's name and URL. A server that needs an OAuth
|
|
@@ -159,7 +159,7 @@ sign-in names one of the plugin's auth services in `authService`; that service m
|
|
|
159
159
|
one `delegated` scheme, which Bonsai uses to sign the person in to the server. Bonsai declares that
|
|
160
160
|
scheme at runtime; the plugin's code must not declare it again. From 0.16.2 a plugin's code can also
|
|
161
161
|
call the server's tools through `api.vendoredMcp.port(<server>)`, typed by this subpath's
|
|
162
|
-
`VendoredMcpPort` and `VendoredMcpOutcome` (declare `^0.
|
|
162
|
+
`VendoredMcpPort` and `VendoredMcpOutcome` (declare `^0.52.0`).
|
|
163
163
|
|
|
164
164
|
From 0.13.10 the manifest schema carries two facts Bonsai reads for its own plugins only; another
|
|
165
165
|
plugin's are ignored, with a load diagnostic. An `external-cli` auth scheme's `cli` says how Bonsai
|
|
@@ -241,7 +241,7 @@ Provider schemas remain authoritative; declaring a dependency grants no authorit
|
|
|
241
241
|
through `app.uri`, parse returned Markdown in the consuming plugin, and retain the read's
|
|
242
242
|
revision (or `contentDigest` from `/uri`) for edits. The old `memory.read` and `memory.write`
|
|
243
243
|
grants do not authorize the replacement scheme-and-verb calls. Contracts before 0.49.0 are
|
|
244
|
-
refused; migrate and declare `^0.
|
|
244
|
+
refused; migrate and declare `^0.52.0`. The current host also serves the 0.49.0 resource contract.
|
|
245
245
|
|
|
246
246
|
## What this package is, and is not, at runtime
|
|
247
247
|
|
package/dist/disclosure.d.ts
CHANGED
|
@@ -2456,8 +2456,10 @@ declare const KAY_PLUGIN_PROTOCOL_VERSION: "kay.plugin.v1";
|
|
|
2456
2456
|
*
|
|
2457
2457
|
* 0.50.0 adds explicit cross-plugin endpoint calls on both backend targets. The URI-only 0.49.0
|
|
2458
2458
|
* contract remains served.
|
|
2459
|
+
*
|
|
2460
|
+
* 0.51.0 adds flag-dependent title, icon and panel presence on rail entries.
|
|
2459
2461
|
*/
|
|
2460
|
-
declare const KAY_PLUGIN_SDK_VERSION: "0.
|
|
2462
|
+
declare const KAY_PLUGIN_SDK_VERSION: "0.52.0";
|
|
2461
2463
|
|
|
2462
2464
|
declare const KAY_PLUGIN_TARGET_NAMES: readonly ["kay.agent", "kay.app", "kay.ui"];
|
|
2463
2465
|
|
|
@@ -2510,8 +2510,10 @@ declare const KAY_PLUGIN_PROTOCOL_VERSION: "kay.plugin.v1";
|
|
|
2510
2510
|
*
|
|
2511
2511
|
* 0.50.0 adds explicit cross-plugin endpoint calls on both backend targets. The URI-only 0.49.0
|
|
2512
2512
|
* contract remains served.
|
|
2513
|
+
*
|
|
2514
|
+
* 0.51.0 adds flag-dependent title, icon and panel presence on rail entries.
|
|
2513
2515
|
*/
|
|
2514
|
-
declare const KAY_PLUGIN_SDK_VERSION: "0.
|
|
2516
|
+
declare const KAY_PLUGIN_SDK_VERSION: "0.52.0";
|
|
2515
2517
|
|
|
2516
2518
|
declare const KAY_PLUGIN_TARGET_NAMES: readonly ["kay.agent", "kay.app", "kay.ui"];
|
|
2517
2519
|
|
|
@@ -4935,6 +4937,20 @@ declare const ResolvedPluginContractV1: z.ZodObject<{
|
|
|
4935
4937
|
}, z.core.$strict>>;
|
|
4936
4938
|
consumesAuthServices: z.ZodArray<z.ZodString>;
|
|
4937
4939
|
explicitDependencies: z.ZodArray<z.ZodString>;
|
|
4940
|
+
dataDirSharedWith: z.ZodOptional<z.ZodString>;
|
|
4941
|
+
workloadPurposes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
4942
|
+
purpose: z.ZodString;
|
|
4943
|
+
workloadClass: z.ZodEnum<{
|
|
4944
|
+
dreaming: "dreaming";
|
|
4945
|
+
hindsight: "hindsight";
|
|
4946
|
+
}>;
|
|
4947
|
+
}, z.core.$strict>>>;
|
|
4948
|
+
shellCommands: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
4949
|
+
name: z.ZodString;
|
|
4950
|
+
aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
4951
|
+
usage: z.ZodString;
|
|
4952
|
+
endpointId: z.ZodString;
|
|
4953
|
+
}, z.core.$strict>>>;
|
|
4938
4954
|
authServices: z.ZodArray<z.ZodObject<{
|
|
4939
4955
|
localId: z.ZodString;
|
|
4940
4956
|
globalId: z.ZodString;
|
|
@@ -4942,6 +4958,30 @@ declare const ResolvedPluginContractV1: z.ZodObject<{
|
|
|
4942
4958
|
summary: z.ZodOptional<z.ZodString>;
|
|
4943
4959
|
schemes: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
4944
4960
|
exchange: z.ZodLiteral<"pkce">;
|
|
4961
|
+
byoocProfile: z.ZodOptional<z.ZodObject<{
|
|
4962
|
+
displayName: z.ZodString;
|
|
4963
|
+
fields: z.ZodArray<z.ZodObject<{
|
|
4964
|
+
id: z.ZodString;
|
|
4965
|
+
label: z.ZodString;
|
|
4966
|
+
optional: z.ZodOptional<z.ZodBoolean>;
|
|
4967
|
+
validation: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
4968
|
+
kind: z.ZodLiteral<"uuid">;
|
|
4969
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
4970
|
+
kind: z.ZodLiteral<"suffix">;
|
|
4971
|
+
value: z.ZodString;
|
|
4972
|
+
}, z.core.$strict>], "kind">>;
|
|
4973
|
+
failureMessage: z.ZodOptional<z.ZodString>;
|
|
4974
|
+
}, z.core.$strict>>;
|
|
4975
|
+
setup: z.ZodObject<{
|
|
4976
|
+
steps: z.ZodArray<z.ZodString>;
|
|
4977
|
+
notes: z.ZodArray<z.ZodString>;
|
|
4978
|
+
url: z.ZodURL;
|
|
4979
|
+
}, z.core.$strict>;
|
|
4980
|
+
endpointTemplates: z.ZodOptional<z.ZodObject<{
|
|
4981
|
+
authorizationUrl: z.ZodString;
|
|
4982
|
+
tokenUrl: z.ZodString;
|
|
4983
|
+
}, z.core.$strict>>;
|
|
4984
|
+
}, z.core.$strict>>;
|
|
4945
4985
|
clientSuppliers: z.ZodArray<z.ZodEnum<{
|
|
4946
4986
|
user: "user";
|
|
4947
4987
|
kay: "kay";
|
|
@@ -5140,6 +5180,19 @@ declare const ResolvedPluginContractV1: z.ZodObject<{
|
|
|
5140
5180
|
}>;
|
|
5141
5181
|
mimeTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
5142
5182
|
successNote: z.ZodOptional<z.ZodString>;
|
|
5183
|
+
round: z.ZodOptional<z.ZodObject<{
|
|
5184
|
+
scopes: z.ZodArray<z.ZodString>;
|
|
5185
|
+
extraAuthorizeParams: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
5186
|
+
redirectParam: z.ZodString;
|
|
5187
|
+
requiresGrantedScope: z.ZodString;
|
|
5188
|
+
supersededByScopes: z.ZodArray<z.ZodString>;
|
|
5189
|
+
purpose: z.ZodString;
|
|
5190
|
+
displayNoun: z.ZodString;
|
|
5191
|
+
}, z.core.$strict>>;
|
|
5192
|
+
completion: z.ZodOptional<z.ZodObject<{
|
|
5193
|
+
pluginId: z.ZodString;
|
|
5194
|
+
moduleId: z.ZodString;
|
|
5195
|
+
}, z.core.$strict>>;
|
|
5143
5196
|
}, z.core.$strict>>;
|
|
5144
5197
|
}, z.core.$strict>>;
|
|
5145
5198
|
service: z.ZodString;
|
|
@@ -5160,9 +5213,9 @@ declare const ResolvedPluginContractV1: z.ZodObject<{
|
|
|
5160
5213
|
dataDir: "dataDir";
|
|
5161
5214
|
}>;
|
|
5162
5215
|
operations: z.ZodArray<z.ZodEnum<{
|
|
5163
|
-
open: "open";
|
|
5164
5216
|
read: "read";
|
|
5165
5217
|
write: "write";
|
|
5218
|
+
open: "open";
|
|
5166
5219
|
}>>;
|
|
5167
5220
|
}, z.core.$strict>>>;
|
|
5168
5221
|
events: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -5174,8 +5227,8 @@ declare const ResolvedPluginContractV1: z.ZodObject<{
|
|
|
5174
5227
|
}, z.core.$strict>>>;
|
|
5175
5228
|
endpoints: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
5176
5229
|
operations: z.ZodArray<z.ZodEnum<{
|
|
5177
|
-
register: "register";
|
|
5178
5230
|
invoke: "invoke";
|
|
5231
|
+
register: "register";
|
|
5179
5232
|
}>>;
|
|
5180
5233
|
endpoint: z.ZodString;
|
|
5181
5234
|
}, z.core.$strict>>>;
|
|
@@ -5235,6 +5288,19 @@ declare const ResolvedPluginContractV1: z.ZodObject<{
|
|
|
5235
5288
|
}>;
|
|
5236
5289
|
mimeTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
5237
5290
|
successNote: z.ZodOptional<z.ZodString>;
|
|
5291
|
+
round: z.ZodOptional<z.ZodObject<{
|
|
5292
|
+
scopes: z.ZodArray<z.ZodString>;
|
|
5293
|
+
extraAuthorizeParams: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
5294
|
+
redirectParam: z.ZodString;
|
|
5295
|
+
requiresGrantedScope: z.ZodString;
|
|
5296
|
+
supersededByScopes: z.ZodArray<z.ZodString>;
|
|
5297
|
+
purpose: z.ZodString;
|
|
5298
|
+
displayNoun: z.ZodString;
|
|
5299
|
+
}, z.core.$strict>>;
|
|
5300
|
+
completion: z.ZodOptional<z.ZodObject<{
|
|
5301
|
+
pluginId: z.ZodString;
|
|
5302
|
+
moduleId: z.ZodString;
|
|
5303
|
+
}, z.core.$strict>>;
|
|
5238
5304
|
}, z.core.$strict>>;
|
|
5239
5305
|
}, z.core.$strict>>;
|
|
5240
5306
|
service: z.ZodString;
|
|
@@ -5255,9 +5321,9 @@ declare const ResolvedPluginContractV1: z.ZodObject<{
|
|
|
5255
5321
|
dataDir: "dataDir";
|
|
5256
5322
|
}>;
|
|
5257
5323
|
operations: z.ZodArray<z.ZodEnum<{
|
|
5258
|
-
open: "open";
|
|
5259
5324
|
read: "read";
|
|
5260
5325
|
write: "write";
|
|
5326
|
+
open: "open";
|
|
5261
5327
|
}>>;
|
|
5262
5328
|
}, z.core.$strict>>>;
|
|
5263
5329
|
events: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -5269,8 +5335,8 @@ declare const ResolvedPluginContractV1: z.ZodObject<{
|
|
|
5269
5335
|
}, z.core.$strict>>>;
|
|
5270
5336
|
endpoints: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
5271
5337
|
operations: z.ZodArray<z.ZodEnum<{
|
|
5272
|
-
register: "register";
|
|
5273
5338
|
invoke: "invoke";
|
|
5339
|
+
register: "register";
|
|
5274
5340
|
}>>;
|
|
5275
5341
|
endpoint: z.ZodString;
|
|
5276
5342
|
}, z.core.$strict>>>;
|
|
@@ -5330,6 +5396,19 @@ declare const ResolvedPluginContractV1: z.ZodObject<{
|
|
|
5330
5396
|
}>;
|
|
5331
5397
|
mimeTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
5332
5398
|
successNote: z.ZodOptional<z.ZodString>;
|
|
5399
|
+
round: z.ZodOptional<z.ZodObject<{
|
|
5400
|
+
scopes: z.ZodArray<z.ZodString>;
|
|
5401
|
+
extraAuthorizeParams: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
5402
|
+
redirectParam: z.ZodString;
|
|
5403
|
+
requiresGrantedScope: z.ZodString;
|
|
5404
|
+
supersededByScopes: z.ZodArray<z.ZodString>;
|
|
5405
|
+
purpose: z.ZodString;
|
|
5406
|
+
displayNoun: z.ZodString;
|
|
5407
|
+
}, z.core.$strict>>;
|
|
5408
|
+
completion: z.ZodOptional<z.ZodObject<{
|
|
5409
|
+
pluginId: z.ZodString;
|
|
5410
|
+
moduleId: z.ZodString;
|
|
5411
|
+
}, z.core.$strict>>;
|
|
5333
5412
|
}, z.core.$strict>>;
|
|
5334
5413
|
}, z.core.$strict>>;
|
|
5335
5414
|
service: z.ZodString;
|
|
@@ -5350,9 +5429,9 @@ declare const ResolvedPluginContractV1: z.ZodObject<{
|
|
|
5350
5429
|
dataDir: "dataDir";
|
|
5351
5430
|
}>;
|
|
5352
5431
|
operations: z.ZodArray<z.ZodEnum<{
|
|
5353
|
-
open: "open";
|
|
5354
5432
|
read: "read";
|
|
5355
5433
|
write: "write";
|
|
5434
|
+
open: "open";
|
|
5356
5435
|
}>>;
|
|
5357
5436
|
}, z.core.$strict>>>;
|
|
5358
5437
|
events: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -5364,8 +5443,8 @@ declare const ResolvedPluginContractV1: z.ZodObject<{
|
|
|
5364
5443
|
}, z.core.$strict>>>;
|
|
5365
5444
|
endpoints: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
5366
5445
|
operations: z.ZodArray<z.ZodEnum<{
|
|
5367
|
-
register: "register";
|
|
5368
5446
|
invoke: "invoke";
|
|
5447
|
+
register: "register";
|
|
5369
5448
|
}>>;
|
|
5370
5449
|
endpoint: z.ZodString;
|
|
5371
5450
|
}, z.core.$strict>>>;
|
|
@@ -5390,6 +5469,8 @@ declare const ResolvedPluginContractV1: z.ZodObject<{
|
|
|
5390
5469
|
}, z.core.$strict>;
|
|
5391
5470
|
}, z.core.$strict>>;
|
|
5392
5471
|
kayAgentUriModules: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
5472
|
+
revisionBacked: z.ZodOptional<z.ZodLiteral<true>>;
|
|
5473
|
+
mailCalibrationSource: z.ZodOptional<z.ZodLiteral<true>>;
|
|
5393
5474
|
screenActions: z.ZodExactOptional<z.ZodObject<{
|
|
5394
5475
|
scheme: z.ZodString;
|
|
5395
5476
|
hosts: z.ZodArray<z.ZodString>;
|
|
@@ -5449,8 +5530,8 @@ declare const ResolvedPluginContractV1: z.ZodObject<{
|
|
|
5449
5530
|
description: z.ZodString;
|
|
5450
5531
|
operations: z.ZodExactOptional<z.ZodArray<z.ZodEnum<{
|
|
5451
5532
|
search: "search";
|
|
5452
|
-
list: "list";
|
|
5453
5533
|
read: "read";
|
|
5534
|
+
list: "list";
|
|
5454
5535
|
write: "write";
|
|
5455
5536
|
edit: "edit";
|
|
5456
5537
|
delete: "delete";
|
|
@@ -5458,8 +5539,8 @@ declare const ResolvedPluginContractV1: z.ZodObject<{
|
|
|
5458
5539
|
}>>>;
|
|
5459
5540
|
operationDocs: z.ZodExactOptional<z.ZodRecord<z.ZodEnum<{
|
|
5460
5541
|
search: "search";
|
|
5461
|
-
list: "list";
|
|
5462
5542
|
read: "read";
|
|
5543
|
+
list: "list";
|
|
5463
5544
|
write: "write";
|
|
5464
5545
|
edit: "edit";
|
|
5465
5546
|
delete: "delete";
|
|
@@ -5467,8 +5548,8 @@ declare const ResolvedPluginContractV1: z.ZodObject<{
|
|
|
5467
5548
|
}> & z.core.$partial, z.ZodString>>;
|
|
5468
5549
|
operationDefaults: z.ZodExactOptional<z.ZodRecord<z.ZodEnum<{
|
|
5469
5550
|
search: "search";
|
|
5470
|
-
list: "list";
|
|
5471
5551
|
read: "read";
|
|
5552
|
+
list: "list";
|
|
5472
5553
|
write: "write";
|
|
5473
5554
|
edit: "edit";
|
|
5474
5555
|
delete: "delete";
|
|
@@ -5531,8 +5612,8 @@ declare const ResolvedPluginContractV1: z.ZodObject<{
|
|
|
5531
5612
|
action: z.ZodString;
|
|
5532
5613
|
operations: z.ZodExactOptional<z.ZodArray<z.ZodEnum<{
|
|
5533
5614
|
search: "search";
|
|
5534
|
-
list: "list";
|
|
5535
5615
|
read: "read";
|
|
5616
|
+
list: "list";
|
|
5536
5617
|
write: "write";
|
|
5537
5618
|
edit: "edit";
|
|
5538
5619
|
delete: "delete";
|
|
@@ -5544,8 +5625,8 @@ declare const ResolvedPluginContractV1: z.ZodObject<{
|
|
|
5544
5625
|
public: z.ZodLiteral<true>;
|
|
5545
5626
|
operations: z.ZodExactOptional<z.ZodArray<z.ZodEnum<{
|
|
5546
5627
|
search: "search";
|
|
5547
|
-
list: "list";
|
|
5548
5628
|
read: "read";
|
|
5629
|
+
list: "list";
|
|
5549
5630
|
write: "write";
|
|
5550
5631
|
edit: "edit";
|
|
5551
5632
|
delete: "delete";
|
|
@@ -5667,9 +5748,9 @@ declare const ResolvedPluginContractV1: z.ZodObject<{
|
|
|
5667
5748
|
}, z.core.$strict>>>;
|
|
5668
5749
|
kayAppTools: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
5669
5750
|
description: z.ZodOptional<z.ZodString>;
|
|
5670
|
-
localId: z.ZodString;
|
|
5671
|
-
displayName: z.ZodOptional<z.ZodString>;
|
|
5672
5751
|
toolName: z.ZodString;
|
|
5752
|
+
displayName: z.ZodOptional<z.ZodString>;
|
|
5753
|
+
localId: z.ZodString;
|
|
5673
5754
|
parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<authoringCommonSchemas.JsonValue, unknown, z.core.$ZodTypeInternals<authoringCommonSchemas.JsonValue, unknown>>>>;
|
|
5674
5755
|
executionMode: z.ZodOptional<z.ZodEnum<{
|
|
5675
5756
|
sequential: "sequential";
|
|
@@ -5715,9 +5796,6 @@ declare const ResolvedPluginContractV1: z.ZodObject<{
|
|
|
5715
5796
|
}, z.core.$strict>>>;
|
|
5716
5797
|
kayAppApprovalTypes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
5717
5798
|
kind: z.ZodLiteral<"message">;
|
|
5718
|
-
localId: z.ZodString;
|
|
5719
|
-
provider: z.ZodString;
|
|
5720
|
-
unknownMessage: z.ZodString;
|
|
5721
5799
|
fields: z.ZodObject<{
|
|
5722
5800
|
body: z.ZodObject<{
|
|
5723
5801
|
key: z.ZodString;
|
|
@@ -5728,6 +5806,9 @@ declare const ResolvedPluginContractV1: z.ZodObject<{
|
|
|
5728
5806
|
max: z.ZodNumber;
|
|
5729
5807
|
}, z.core.$strict>>;
|
|
5730
5808
|
}, z.core.$strict>;
|
|
5809
|
+
localId: z.ZodString;
|
|
5810
|
+
provider: z.ZodString;
|
|
5811
|
+
unknownMessage: z.ZodString;
|
|
5731
5812
|
presentation: z.ZodObject<{
|
|
5732
5813
|
showAccount: z.ZodBoolean;
|
|
5733
5814
|
recipient: z.ZodEnum<{
|
|
@@ -6045,6 +6126,7 @@ declare const ResolvedPluginContractV1: z.ZodObject<{
|
|
|
6045
6126
|
"automations.read": "automations.read";
|
|
6046
6127
|
"automations.run": "automations.run";
|
|
6047
6128
|
"shared-artifacts.read": "shared-artifacts.read";
|
|
6129
|
+
"projects.manage": "projects.manage";
|
|
6048
6130
|
"workspace.place-pane": "workspace.place-pane";
|
|
6049
6131
|
"workspace.pane-header": "workspace.pane-header";
|
|
6050
6132
|
"workspace.arrange": "workspace.arrange";
|
package/dist/kay-agent.d.ts
CHANGED
|
@@ -2789,8 +2789,10 @@ declare const KAY_PLUGIN_PROTOCOL_VERSION: "kay.plugin.v1";
|
|
|
2789
2789
|
*
|
|
2790
2790
|
* 0.50.0 adds explicit cross-plugin endpoint calls on both backend targets. The URI-only 0.49.0
|
|
2791
2791
|
* contract remains served.
|
|
2792
|
+
*
|
|
2793
|
+
* 0.51.0 adds flag-dependent title, icon and panel presence on rail entries.
|
|
2792
2794
|
*/
|
|
2793
|
-
declare const KAY_PLUGIN_SDK_VERSION: "0.
|
|
2795
|
+
declare const KAY_PLUGIN_SDK_VERSION: "0.52.0";
|
|
2794
2796
|
|
|
2795
2797
|
declare const KAY_PLUGIN_TARGET_NAMES: readonly ["kay.agent", "kay.app", "kay.ui"];
|
|
2796
2798
|
|
|
@@ -5090,8 +5092,8 @@ declare const PluginCapabilityRefusalV1: z.ZodObject<{
|
|
|
5090
5092
|
scheme: z.ZodString;
|
|
5091
5093
|
verb: z.ZodEnum<{
|
|
5092
5094
|
search: "search";
|
|
5093
|
-
list: "list";
|
|
5094
5095
|
read: "read";
|
|
5096
|
+
list: "list";
|
|
5095
5097
|
write: "write";
|
|
5096
5098
|
edit: "edit";
|
|
5097
5099
|
delete: "delete";
|
|
@@ -5507,6 +5509,34 @@ declare const PluginNamespace: z.ZodString;
|
|
|
5507
5509
|
|
|
5508
5510
|
declare type PluginNamespace = z.infer<typeof PluginNamespace>;
|
|
5509
5511
|
|
|
5512
|
+
export declare interface PluginResourcePickCompletion {
|
|
5513
|
+
readonly serviceId: string;
|
|
5514
|
+
readonly schemeId: string;
|
|
5515
|
+
readonly accountId: string;
|
|
5516
|
+
readonly capabilityServiceId?: string;
|
|
5517
|
+
readonly identityEmail?: string;
|
|
5518
|
+
readonly pickedResourceIds: readonly string[];
|
|
5519
|
+
readonly accessToken: string;
|
|
5520
|
+
readonly accountAccessToken: string;
|
|
5521
|
+
readonly traceId: string;
|
|
5522
|
+
}
|
|
5523
|
+
|
|
5524
|
+
export declare type PluginResourcePickHandler = (completion: PluginResourcePickCompletion) => Promise<PluginResourcePickResult>;
|
|
5525
|
+
|
|
5526
|
+
export declare type PluginResourcePickResult = {
|
|
5527
|
+
readonly ok: true;
|
|
5528
|
+
readonly recorded: number;
|
|
5529
|
+
readonly resources: readonly {
|
|
5530
|
+
readonly id: string;
|
|
5531
|
+
readonly uri: string;
|
|
5532
|
+
readonly title?: string;
|
|
5533
|
+
readonly mimeType?: string;
|
|
5534
|
+
}[];
|
|
5535
|
+
} | {
|
|
5536
|
+
readonly ok: false;
|
|
5537
|
+
readonly reason: string;
|
|
5538
|
+
};
|
|
5539
|
+
|
|
5510
5540
|
/** What one connection flow unlocks and when an agent should choose it; grants no authority. */
|
|
5511
5541
|
export declare type PluginSchemeAgentHint = string;
|
|
5512
5542
|
|
package/dist/kay-app.d.ts
CHANGED
|
@@ -2905,8 +2905,10 @@ declare const KAY_PLUGIN_PROTOCOL_VERSION: "kay.plugin.v1";
|
|
|
2905
2905
|
*
|
|
2906
2906
|
* 0.50.0 adds explicit cross-plugin endpoint calls on both backend targets. The URI-only 0.49.0
|
|
2907
2907
|
* contract remains served.
|
|
2908
|
+
*
|
|
2909
|
+
* 0.51.0 adds flag-dependent title, icon and panel presence on rail entries.
|
|
2908
2910
|
*/
|
|
2909
|
-
declare const KAY_PLUGIN_SDK_VERSION: "0.
|
|
2911
|
+
declare const KAY_PLUGIN_SDK_VERSION: "0.52.0";
|
|
2910
2912
|
|
|
2911
2913
|
declare const KAY_PLUGIN_TARGET_NAMES: readonly ["kay.agent", "kay.app", "kay.ui"];
|
|
2912
2914
|
|
|
@@ -3228,6 +3230,8 @@ export declare type KayAppActivate = (app: KayAppPluginApi) => void | Promise<vo
|
|
|
3228
3230
|
*/
|
|
3229
3231
|
export declare interface KayAppAgentDefinition {
|
|
3230
3232
|
readonly name: string;
|
|
3233
|
+
readonly promptLayout?: "no-tool-judgment" | "outcome-handler";
|
|
3234
|
+
readonly idleReplies?: readonly string[];
|
|
3231
3235
|
readonly description?: string;
|
|
3232
3236
|
readonly icon?: string;
|
|
3233
3237
|
/** Defaults to `hidden` when absent - see {@link KayAppAgentDefinitionVisibility}. */
|
|
@@ -5266,6 +5270,9 @@ export declare interface KayAppPhaseShiftSessionEvent extends KayAppSessionEvent
|
|
|
5266
5270
|
* physical sandbox against ambient Node imports.
|
|
5267
5271
|
*/
|
|
5268
5272
|
export declare interface KayAppPluginApi {
|
|
5273
|
+
readonly resourcePicks?: {
|
|
5274
|
+
registerCompletion(moduleId: string, handler: PluginResourcePickHandler): void;
|
|
5275
|
+
};
|
|
5269
5276
|
readonly mcp: KayAppMcp;
|
|
5270
5277
|
/** This plugin's canonical id (already validated by the host registry). */
|
|
5271
5278
|
readonly id: string;
|
|
@@ -7658,6 +7665,7 @@ export declare interface KayAppSystemPrompt {
|
|
|
7658
7665
|
}
|
|
7659
7666
|
|
|
7660
7667
|
export declare interface KayAppSystemPromptFragment {
|
|
7668
|
+
readonly analyticsFamily?: string;
|
|
7661
7669
|
/**
|
|
7662
7670
|
* The facts the text varies by. Chats with the same values share one rendered text, so the
|
|
7663
7671
|
* text must depend on nothing else about the chat.
|
|
@@ -10063,6 +10071,34 @@ export declare interface PluginProductEventSend {
|
|
|
10063
10071
|
readonly subjectUri?: string;
|
|
10064
10072
|
}
|
|
10065
10073
|
|
|
10074
|
+
declare interface PluginResourcePickCompletion {
|
|
10075
|
+
readonly serviceId: string;
|
|
10076
|
+
readonly schemeId: string;
|
|
10077
|
+
readonly accountId: string;
|
|
10078
|
+
readonly capabilityServiceId?: string;
|
|
10079
|
+
readonly identityEmail?: string;
|
|
10080
|
+
readonly pickedResourceIds: readonly string[];
|
|
10081
|
+
readonly accessToken: string;
|
|
10082
|
+
readonly accountAccessToken: string;
|
|
10083
|
+
readonly traceId: string;
|
|
10084
|
+
}
|
|
10085
|
+
|
|
10086
|
+
declare type PluginResourcePickHandler = (completion: PluginResourcePickCompletion) => Promise<PluginResourcePickResult>;
|
|
10087
|
+
|
|
10088
|
+
declare type PluginResourcePickResult = {
|
|
10089
|
+
readonly ok: true;
|
|
10090
|
+
readonly recorded: number;
|
|
10091
|
+
readonly resources: readonly {
|
|
10092
|
+
readonly id: string;
|
|
10093
|
+
readonly uri: string;
|
|
10094
|
+
readonly title?: string;
|
|
10095
|
+
readonly mimeType?: string;
|
|
10096
|
+
}[];
|
|
10097
|
+
} | {
|
|
10098
|
+
readonly ok: false;
|
|
10099
|
+
readonly reason: string;
|
|
10100
|
+
};
|
|
10101
|
+
|
|
10066
10102
|
export declare const PluginSignal: z.ZodObject<{
|
|
10067
10103
|
kind: z.ZodEnum<{
|
|
10068
10104
|
message: "message";
|
|
@@ -10559,9 +10595,6 @@ export declare interface ResolvedCredential {
|
|
|
10559
10595
|
|
|
10560
10596
|
declare const ResolvedKayAppApprovalType: z.ZodObject<{
|
|
10561
10597
|
kind: z.ZodLiteral<"message">;
|
|
10562
|
-
localId: z.ZodString;
|
|
10563
|
-
provider: z.ZodString;
|
|
10564
|
-
unknownMessage: z.ZodString;
|
|
10565
10598
|
fields: z.ZodObject<{
|
|
10566
10599
|
body: z.ZodObject<{
|
|
10567
10600
|
key: z.ZodString;
|
|
@@ -10572,6 +10605,9 @@ declare const ResolvedKayAppApprovalType: z.ZodObject<{
|
|
|
10572
10605
|
max: z.ZodNumber;
|
|
10573
10606
|
}, z.core.$strict>>;
|
|
10574
10607
|
}, z.core.$strict>;
|
|
10608
|
+
localId: z.ZodString;
|
|
10609
|
+
provider: z.ZodString;
|
|
10610
|
+
unknownMessage: z.ZodString;
|
|
10575
10611
|
presentation: z.ZodObject<{
|
|
10576
10612
|
showAccount: z.ZodBoolean;
|
|
10577
10613
|
recipient: z.ZodEnum<{
|
|
@@ -11485,6 +11521,47 @@ declare const SessionRelationship: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
11485
11521
|
|
|
11486
11522
|
declare type SessionRelationship = z.infer<typeof SessionRelationship>;
|
|
11487
11523
|
|
|
11524
|
+
export declare const ShellCommandOutcome: z.ZodObject<{
|
|
11525
|
+
exitCode: z.ZodNumber;
|
|
11526
|
+
envelope: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
|
|
11527
|
+
result: z.ZodOptional<z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
|
|
11528
|
+
}, z.core.$strict>;
|
|
11529
|
+
|
|
11530
|
+
export declare type ShellCommandOutcome = z.infer<typeof ShellCommandOutcome>;
|
|
11531
|
+
|
|
11532
|
+
export declare const ShellCommandRequest: z.ZodObject<{
|
|
11533
|
+
argv: z.ZodArray<z.ZodString>;
|
|
11534
|
+
cwd: z.ZodString;
|
|
11535
|
+
outcomes: z.ZodArray<z.ZodObject<{
|
|
11536
|
+
exitCode: z.ZodNumber;
|
|
11537
|
+
envelope: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
|
|
11538
|
+
result: z.ZodOptional<z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
|
|
11539
|
+
}, z.core.$strict>>;
|
|
11540
|
+
}, z.core.$strict>;
|
|
11541
|
+
|
|
11542
|
+
export declare type ShellCommandRequest = z.infer<typeof ShellCommandRequest>;
|
|
11543
|
+
|
|
11544
|
+
export declare const ShellCommandStep: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
11545
|
+
kind: z.ZodLiteral<"invoke">;
|
|
11546
|
+
toolName: z.ZodEnum<{
|
|
11547
|
+
search: "search";
|
|
11548
|
+
read: "read";
|
|
11549
|
+
list: "list";
|
|
11550
|
+
write: "write";
|
|
11551
|
+
edit: "edit";
|
|
11552
|
+
delete: "delete";
|
|
11553
|
+
help: "help";
|
|
11554
|
+
}>;
|
|
11555
|
+
input: z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
|
|
11556
|
+
flags: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
11557
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
11558
|
+
kind: z.ZodLiteral<"finish">;
|
|
11559
|
+
exitCode: z.ZodNumber;
|
|
11560
|
+
stdout: z.ZodString;
|
|
11561
|
+
}, z.core.$strict>], "kind">;
|
|
11562
|
+
|
|
11563
|
+
export declare type ShellCommandStep = z.infer<typeof ShellCommandStep>;
|
|
11564
|
+
|
|
11488
11565
|
/**
|
|
11489
11566
|
* The largest epoch-millisecond time a `Date` can hold (about the year 275,760). A time outside
|
|
11490
11567
|
* 0 to this bound has no date to show, so neither `observe` nor a read window accepts one.
|
package/dist/kay-app.js
CHANGED
|
@@ -387,6 +387,46 @@ var JsonValue = z5.lazy(() => z5.union([
|
|
|
387
387
|
var JsonObject = z5.record(z5.string(), JsonValue);
|
|
388
388
|
var JsonSchema = z5.record(z5.string(), JsonValue);
|
|
389
389
|
|
|
390
|
+
// packages/plugin-protocol/dist/shell-commands.js
|
|
391
|
+
import { z as z6 } from "zod";
|
|
392
|
+
var PluginShellCommand = z6.strictObject({
|
|
393
|
+
name: z6.string().regex(/^[a-z][a-z0-9-]*$/),
|
|
394
|
+
aliases: z6.array(z6.string().regex(/^[a-z][a-z0-9-]*$/)).optional(),
|
|
395
|
+
endpoint: z6.string().min(1),
|
|
396
|
+
usage: z6.string().min(1)
|
|
397
|
+
});
|
|
398
|
+
var ShellCommandOutcome = z6.strictObject({
|
|
399
|
+
exitCode: z6.number().int(),
|
|
400
|
+
envelope: JsonValue,
|
|
401
|
+
result: JsonValue.optional()
|
|
402
|
+
});
|
|
403
|
+
var ShellCommandRequest = z6.strictObject({
|
|
404
|
+
argv: z6.array(z6.string()),
|
|
405
|
+
cwd: z6.string(),
|
|
406
|
+
outcomes: z6.array(ShellCommandOutcome).max(3)
|
|
407
|
+
});
|
|
408
|
+
var ShellCommandStep = z6.discriminatedUnion("kind", [
|
|
409
|
+
z6.strictObject({
|
|
410
|
+
kind: z6.literal("invoke"),
|
|
411
|
+
toolName: z6.enum([
|
|
412
|
+
"read",
|
|
413
|
+
"list",
|
|
414
|
+
"search",
|
|
415
|
+
"write",
|
|
416
|
+
"edit",
|
|
417
|
+
"delete",
|
|
418
|
+
"help"
|
|
419
|
+
]),
|
|
420
|
+
input: z6.record(z6.string(), JsonValue),
|
|
421
|
+
flags: z6.record(z6.string(), z6.string())
|
|
422
|
+
}),
|
|
423
|
+
z6.strictObject({
|
|
424
|
+
kind: z6.literal("finish"),
|
|
425
|
+
exitCode: z6.number().int(),
|
|
426
|
+
stdout: z6.string()
|
|
427
|
+
})
|
|
428
|
+
]);
|
|
429
|
+
|
|
390
430
|
// packages/plugin-sdk/dist/kay-app/card-layout.js
|
|
391
431
|
function element(type, props) {
|
|
392
432
|
return { root: "root", elements: { root: { type, props } } };
|
|
@@ -447,7 +487,7 @@ function submit(label) {
|
|
|
447
487
|
}
|
|
448
488
|
|
|
449
489
|
// packages/plugin-sdk/dist/signals.js
|
|
450
|
-
import { z as
|
|
490
|
+
import { z as z7 } from "zod";
|
|
451
491
|
function createFallbackOnlySignals() {
|
|
452
492
|
const noStore = { status: "unavailable", reason: "no-store" };
|
|
453
493
|
return {
|
|
@@ -477,23 +517,23 @@ var POINTER = /^[^\s\p{C}/?#]+$/u;
|
|
|
477
517
|
var LABEL = /^[^\s,@\p{C}]+(?: [^\s,@\p{C}]+)*$/u;
|
|
478
518
|
var RUN_ID = /^\P{Cc}+$/u;
|
|
479
519
|
var POINTER_RULE = `1 to ${MAX_POINTER} characters with no whitespace, \`/\`, \`?\`, \`#\`, or control or invisible character`;
|
|
480
|
-
var ObserveShape =
|
|
481
|
-
detector:
|
|
482
|
-
subject:
|
|
483
|
-
after:
|
|
484
|
-
reuse:
|
|
485
|
-
source:
|
|
486
|
-
sessionId:
|
|
487
|
-
entryId:
|
|
488
|
-
openerEntryId:
|
|
489
|
-
runId:
|
|
490
|
-
occurredAtMs:
|
|
520
|
+
var ObserveShape = z7.looseObject({
|
|
521
|
+
detector: z7.looseObject({ id: z7.string(), version: z7.string() }),
|
|
522
|
+
subject: z7.looseObject({ kind: z7.string(), key: z7.string().optional() }).optional(),
|
|
523
|
+
after: z7.looseObject({ observationId: z7.unknown() }).optional(),
|
|
524
|
+
reuse: z7.looseObject({ maxAgeMs: z7.unknown() }).optional(),
|
|
525
|
+
source: z7.looseObject({
|
|
526
|
+
sessionId: z7.string(),
|
|
527
|
+
entryId: z7.string(),
|
|
528
|
+
openerEntryId: z7.string().optional(),
|
|
529
|
+
runId: z7.string().optional(),
|
|
530
|
+
occurredAtMs: z7.unknown().optional()
|
|
491
531
|
}),
|
|
492
|
-
questions:
|
|
532
|
+
questions: z7.record(z7.string(), z7.unknown())
|
|
493
533
|
});
|
|
494
|
-
var ChoiceQuestion =
|
|
495
|
-
type:
|
|
496
|
-
criteria:
|
|
534
|
+
var ChoiceQuestion = z7.looseObject({
|
|
535
|
+
type: z7.literal("choice"),
|
|
536
|
+
criteria: z7.record(z7.string(), z7.unknown())
|
|
497
537
|
});
|
|
498
538
|
var fits = (value, grammar) => value.length <= MAX_NAME && grammar.test(value);
|
|
499
539
|
var isWhole = (value, min) => typeof value === "number" && Number.isSafeInteger(value) && value >= min && value <= SIGNAL_TIME_MAX_MS;
|
|
@@ -573,10 +613,10 @@ function grammarProblem(input) {
|
|
|
573
613
|
}
|
|
574
614
|
return void 0;
|
|
575
615
|
}
|
|
576
|
-
var EchoText =
|
|
577
|
-
var Echo =
|
|
578
|
-
detector:
|
|
579
|
-
source:
|
|
616
|
+
var EchoText = z7.string().catch("");
|
|
617
|
+
var Echo = z7.object({
|
|
618
|
+
detector: z7.object({ id: EchoText, version: EchoText }).catch({ id: "", version: "" }),
|
|
619
|
+
source: z7.object({ sessionId: EchoText, entryId: EchoText }).catch({ sessionId: "", entryId: "" })
|
|
580
620
|
}).catch({
|
|
581
621
|
detector: { id: "", version: "" },
|
|
582
622
|
source: { sessionId: "", entryId: "" }
|
|
@@ -1103,6 +1143,9 @@ export {
|
|
|
1103
1143
|
SIGNAL_TIME_MAX_MS,
|
|
1104
1144
|
STORED_TRANSCRIPT_MESSAGE_FILTER,
|
|
1105
1145
|
STORED_TRANSCRIPT_MESSAGE_KINDS,
|
|
1146
|
+
ShellCommandOutcome,
|
|
1147
|
+
ShellCommandRequest,
|
|
1148
|
+
ShellCommandStep,
|
|
1106
1149
|
UriConflictError,
|
|
1107
1150
|
UriNotFoundError,
|
|
1108
1151
|
UriProviderError,
|