@yaklabs-ai/plugin-sdk 0.14.0 → 0.14.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/kay-agent.d.ts +20 -4
- package/dist/kay-app.d.ts +29 -14
- 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.14.
|
|
16
|
+
"@bonsai/plugin-sdk": "npm:@yaklabs-ai/plugin-sdk@^0.14.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.14.
|
|
65
|
+
"compatibility": { "sdk": "^0.14.1" },
|
|
66
66
|
"targets": {
|
|
67
67
|
"kay": {
|
|
68
68
|
"agent": {
|
package/dist/kay-agent.d.ts
CHANGED
|
@@ -3254,6 +3254,7 @@ declare const KayPluginManifestV1: z.ZodObject<{
|
|
|
3254
3254
|
schemes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
3255
3255
|
operations: z.ZodArray<z.ZodEnum<{
|
|
3256
3256
|
status: "status";
|
|
3257
|
+
list: "list";
|
|
3257
3258
|
connect: "connect";
|
|
3258
3259
|
disconnect: "disconnect";
|
|
3259
3260
|
resolve: "resolve";
|
|
@@ -3348,6 +3349,7 @@ declare const KayPluginManifestV1: z.ZodObject<{
|
|
|
3348
3349
|
schemes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
3349
3350
|
operations: z.ZodArray<z.ZodEnum<{
|
|
3350
3351
|
status: "status";
|
|
3352
|
+
list: "list";
|
|
3351
3353
|
connect: "connect";
|
|
3352
3354
|
disconnect: "disconnect";
|
|
3353
3355
|
resolve: "resolve";
|
|
@@ -3442,6 +3444,7 @@ declare const KayPluginManifestV1: z.ZodObject<{
|
|
|
3442
3444
|
schemes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
3443
3445
|
operations: z.ZodArray<z.ZodEnum<{
|
|
3444
3446
|
status: "status";
|
|
3447
|
+
list: "list";
|
|
3445
3448
|
connect: "connect";
|
|
3446
3449
|
disconnect: "disconnect";
|
|
3447
3450
|
resolve: "resolve";
|
|
@@ -4277,9 +4280,10 @@ export declare interface OsascriptFailureAdvice {
|
|
|
4277
4280
|
}
|
|
4278
4281
|
|
|
4279
4282
|
/**
|
|
4280
|
-
* The activation options every osascript plugin's agent factory
|
|
4281
|
-
*
|
|
4282
|
-
*
|
|
4283
|
+
* The activation options every osascript plugin's agent factory accepted, so the daemon's
|
|
4284
|
+
* simulator roster set each the same way. Absent `simulator`, the plugin is exactly the shipped one.
|
|
4285
|
+
*
|
|
4286
|
+
* @deprecated See {@link OsascriptSimulatorOptions}.
|
|
4283
4287
|
*/
|
|
4284
4288
|
export declare interface OsascriptKayAgentOptions {
|
|
4285
4289
|
readonly simulator?: OsascriptSimulatorOptions;
|
|
@@ -4316,6 +4320,10 @@ export declare interface OsascriptRunner {
|
|
|
4316
4320
|
/**
|
|
4317
4321
|
* The runners a module's verbs use: the host's exactly when `simulator` is absent, or the
|
|
4318
4322
|
* simulator's in its place, per dispatch, after the host's connection gate.
|
|
4323
|
+
*
|
|
4324
|
+
* @deprecated A Bonsai daemon substitutes the runner itself, so a module uses
|
|
4325
|
+
* {@link requireExternalCli} and `ctx.auth?.externalCli` directly. Kept so a plugin built against
|
|
4326
|
+
* an earlier SDK keeps compiling.
|
|
4319
4327
|
*/
|
|
4320
4328
|
readonly dispatch: (simulator: OsascriptSimulatedRunner | undefined) => OsascriptDispatch;
|
|
4321
4329
|
/**
|
|
@@ -4361,7 +4369,11 @@ export declare interface OsascriptRunnerOptions {
|
|
|
4361
4369
|
readonly appNotRunning?: OsascriptFailureAdvice;
|
|
4362
4370
|
}
|
|
4363
4371
|
|
|
4364
|
-
/**
|
|
4372
|
+
/**
|
|
4373
|
+
* A simulated runner, as a module sees it: the runner one dispatch uses in the host's place. A
|
|
4374
|
+
* Bonsai daemon that simulates an osascript plugin hands `runnerFor(ctx)` to the module as
|
|
4375
|
+
* `ctx.auth.externalCli`; `@bonsai/uri-simulator-kit/osascript` builds one.
|
|
4376
|
+
*/
|
|
4365
4377
|
export declare interface OsascriptSimulatedRunner {
|
|
4366
4378
|
readonly runnerFor: (ctx: UriResolveContext) => UriExternalCliRunner;
|
|
4367
4379
|
}
|
|
@@ -4370,6 +4382,10 @@ export declare interface OsascriptSimulatedRunner {
|
|
|
4370
4382
|
* How a plugin is told to serve its module from its simulator instead of osascript: the one
|
|
4371
4383
|
* option shape every osascript plugin's agent factory accepts as `simulator`. Only the daemon's
|
|
4372
4384
|
* URI simulator roster sets it, for evals and dev; an ordinary install never does.
|
|
4385
|
+
*
|
|
4386
|
+
* @deprecated A Bonsai daemon now hands the module a simulated runner as `ctx.auth.externalCli`,
|
|
4387
|
+
* so a plugin needs no simulator option; no Bonsai plugin sets this. Kept so a plugin built against
|
|
4388
|
+
* an earlier SDK keeps compiling.
|
|
4373
4389
|
*/
|
|
4374
4390
|
export declare interface OsascriptSimulatorOptions {
|
|
4375
4391
|
/** The directory holding the simulator's world; the daemon's process config names it. */
|
package/dist/kay-app.d.ts
CHANGED
|
@@ -2093,6 +2093,23 @@ export declare interface KayAppAccountProfileUpdate {
|
|
|
2093
2093
|
readonly displayName: string;
|
|
2094
2094
|
}
|
|
2095
2095
|
|
|
2096
|
+
/** Owned services use local IDs; omitted scheme searches all admitted schemes. */
|
|
2097
|
+
export declare interface KayAppAccountRequest {
|
|
2098
|
+
readonly serviceId: string;
|
|
2099
|
+
readonly schemeId?: string;
|
|
2100
|
+
}
|
|
2101
|
+
|
|
2102
|
+
/** Stored account state, without resolving or refreshing its credential. */
|
|
2103
|
+
export declare interface KayAppAccountSummary {
|
|
2104
|
+
readonly accountId: string;
|
|
2105
|
+
/** Global scheme ID, matching a resolved credential's schemeId. */
|
|
2106
|
+
readonly schemeId: string;
|
|
2107
|
+
readonly label?: string;
|
|
2108
|
+
readonly scopes?: readonly string[];
|
|
2109
|
+
/** Last recorded health; unknown means no health observation was stored. */
|
|
2110
|
+
readonly status: "ok" | "needs_reauth" | "refresh_failed" | "revoked" | "unknown";
|
|
2111
|
+
}
|
|
2112
|
+
|
|
2096
2113
|
/**
|
|
2097
2114
|
* A plugin's `kay.app` activation — receives only the brokered {@link KayAppPluginApi}. Runs ONCE at
|
|
2098
2115
|
* host start, fully awaited before any session starts.
|
|
@@ -2343,22 +2360,20 @@ export declare interface KayAppAssistantMessageSessionEvent extends KayAppSessio
|
|
|
2343
2360
|
|
|
2344
2361
|
/** The brokered credential capability. Present only when granted. */
|
|
2345
2362
|
export declare interface KayAppAuth {
|
|
2363
|
+
/** Resolve a granted credential for a declared purpose. */
|
|
2364
|
+
resolve(request: KayAppResolveCredentialRequest): Promise<KayAppResolvedCredential>;
|
|
2346
2365
|
/**
|
|
2347
|
-
*
|
|
2348
|
-
*
|
|
2366
|
+
* Enumerate an owned service under an explicit list grant. Includes accounts needing repair.
|
|
2367
|
+
* Never resolves, decrypts secret material, refreshes, or calls a provider. Invalid or
|
|
2368
|
+
* unauthorized requests reject; an authorized service with no accounts returns an empty list.
|
|
2349
2369
|
*/
|
|
2350
|
-
|
|
2370
|
+
listAccounts(request: KayAppAccountRequest): Promise<readonly KayAppAccountSummary[]>;
|
|
2351
2371
|
/**
|
|
2352
|
-
*
|
|
2353
|
-
*
|
|
2354
|
-
*
|
|
2355
|
-
* Answers `false` rather than throwing when nothing is connected, and never returns material to
|
|
2356
|
-
* the caller. It does NOT yet answer without resolving: today it runs the full resolve internally
|
|
2357
|
-
* and discards the result, so it can decrypt a secret — and, for a refreshable scheme, take the
|
|
2358
|
-
* network — to produce a boolean. Do not read this as a cheap probe. Tracked in #1048; the fix is
|
|
2359
|
-
* a `list`-scoped grant plus `listAccounts`, which answers from record metadata alone.
|
|
2372
|
+
* Stored availability, not proof that a provider request will authenticate. False for no
|
|
2373
|
+
* matching account or only revoked/needs-reauth accounts. Accepts list permission or existing
|
|
2374
|
+
* resolve permission within its account bounds. Storage and authorization failures reject.
|
|
2360
2375
|
*/
|
|
2361
|
-
has(request:
|
|
2376
|
+
has(request: KayAppAccountRequest): Promise<boolean>;
|
|
2362
2377
|
}
|
|
2363
2378
|
|
|
2364
2379
|
/**
|
|
@@ -3887,7 +3902,7 @@ export declare interface KayAppPluginApi {
|
|
|
3887
3902
|
readonly permissions?: KayAppPermissions;
|
|
3888
3903
|
/**
|
|
3889
3904
|
* Credential resolution for an auth service this plugin declares. PRESENT ONLY for plugins whose
|
|
3890
|
-
* manifest wires `auth.operations
|
|
3905
|
+
* manifest wires `auth.operations` including `"list"` or `"resolve"` on this target (deny-by-default); `undefined`
|
|
3891
3906
|
* otherwise. Auth is manifest WIRING (the host binds the credential vault before any code runs),
|
|
3892
3907
|
* so its presence is declaration-driven, unlike the claim-checked capabilities above.
|
|
3893
3908
|
*/
|
|
@@ -4137,7 +4152,7 @@ export declare interface KayAppResolveCredentialRequest {
|
|
|
4137
4152
|
* ## Deny-by-default
|
|
4138
4153
|
*
|
|
4139
4154
|
* `KayAppPluginApi.auth` is **present only for plugins the host grants** (`auth.operations`
|
|
4140
|
-
* containing `"resolve"` in `permissions.byTarget["kay.app"]`, against a service the manifest
|
|
4155
|
+
* containing `"list"` or `"resolve"` in `permissions.byTarget["kay.app"]`, against a service the manifest
|
|
4141
4156
|
* declares) and `undefined` otherwise — an ungranted plugin cannot even reference the capability.
|
|
4142
4157
|
* This mirrors `KayAppPluginApi.corpus`, and it is the rule for every capability behind a grant:
|
|
4143
4158
|
* never hand a plugin an object whose grant is decorative.
|