@yaklabs-ai/plugin-protocol 0.13.9 → 0.14.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 +1 -1
- package/THIRD-PARTY-INVENTORY.json +1 -1
- package/dist/index.d.ts +478 -12
- package/dist/index.js +318 -36
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -133,9 +133,9 @@ export declare type AppEventSubscription = z.infer<typeof AppEventSubscription>;
|
|
|
133
133
|
* `kay.agent` registration seam only).
|
|
134
134
|
*/
|
|
135
135
|
export declare const AppUriModuleContribution: z.ZodObject<{
|
|
136
|
+
displayName: z.ZodOptional<z.ZodString>;
|
|
136
137
|
schemes: z.ZodArray<z.ZodString>;
|
|
137
138
|
localId: z.ZodString;
|
|
138
|
-
displayName: z.ZodOptional<z.ZodString>;
|
|
139
139
|
}, z.core.$strict>;
|
|
140
140
|
|
|
141
141
|
export declare type AppUriModuleContribution = z.infer<typeof AppUriModuleContribution>;
|
|
@@ -1249,6 +1249,28 @@ export declare const AuthAccountSelector: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1249
1249
|
|
|
1250
1250
|
export declare type AuthAccountSelector = z.infer<typeof AuthAccountSelector>;
|
|
1251
1251
|
|
|
1252
|
+
/**
|
|
1253
|
+
* The product a person connects a shared identity through (SDK 0.13.10): a capability front door. A
|
|
1254
|
+
* plugin that consumes another plugin's sign-in (Gmail consuming `google.account`) names the
|
|
1255
|
+
* `service_connect` id and label its product is offered under, and connecting it expands the shared
|
|
1256
|
+
* record with this grant's scopes instead of minting a credential of its own. The door owns no
|
|
1257
|
+
* credential, so it is display data; the shared identity it expands is `auth.shared-identity`'s.
|
|
1258
|
+
*/
|
|
1259
|
+
export declare const AuthGrantFrontDoor: z.ZodObject<{
|
|
1260
|
+
id: z.ZodString;
|
|
1261
|
+
displayName: z.ZodString;
|
|
1262
|
+
resourcePicker: z.ZodOptional<z.ZodObject<{
|
|
1263
|
+
effect: z.ZodEnum<{
|
|
1264
|
+
selection: "selection";
|
|
1265
|
+
"resource-grant": "resource-grant";
|
|
1266
|
+
}>;
|
|
1267
|
+
mimeTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1268
|
+
successNote: z.ZodOptional<z.ZodString>;
|
|
1269
|
+
}, z.core.$strict>>;
|
|
1270
|
+
}, z.core.$strict>;
|
|
1271
|
+
|
|
1272
|
+
export declare type AuthGrantFrontDoor = z.infer<typeof AuthGrantFrontDoor>;
|
|
1273
|
+
|
|
1252
1274
|
export declare const AuthGrantOperation: z.ZodEnum<{
|
|
1253
1275
|
status: "status";
|
|
1254
1276
|
connect: "connect";
|
|
@@ -1295,6 +1317,18 @@ export declare const AuthGrantRequest: z.ZodObject<{
|
|
|
1295
1317
|
kind: z.ZodLiteral<"record-id">;
|
|
1296
1318
|
recordId: z.ZodString;
|
|
1297
1319
|
}, z.core.$strict>], "kind">>>;
|
|
1320
|
+
frontDoor: z.ZodOptional<z.ZodObject<{
|
|
1321
|
+
id: z.ZodString;
|
|
1322
|
+
displayName: z.ZodString;
|
|
1323
|
+
resourcePicker: z.ZodOptional<z.ZodObject<{
|
|
1324
|
+
effect: z.ZodEnum<{
|
|
1325
|
+
selection: "selection";
|
|
1326
|
+
"resource-grant": "resource-grant";
|
|
1327
|
+
}>;
|
|
1328
|
+
mimeTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1329
|
+
successNote: z.ZodOptional<z.ZodString>;
|
|
1330
|
+
}, z.core.$strict>>;
|
|
1331
|
+
}, z.core.$strict>>;
|
|
1298
1332
|
}, z.core.$strict>;
|
|
1299
1333
|
|
|
1300
1334
|
export declare type AuthGrantRequest = z.infer<typeof AuthGrantRequest>;
|
|
@@ -1435,8 +1469,8 @@ export declare type CliBinaryName = z.infer<typeof CliBinaryName>;
|
|
|
1435
1469
|
* only `external-cli` schemes. `buildCliBindingRoster` throws on either violation.
|
|
1436
1470
|
* What the binding still contributes is the read/write split (already ungated —
|
|
1437
1471
|
* classifier rows compose off the ungated roster) and, via the `external-cli`
|
|
1438
|
-
* scheme's own `
|
|
1439
|
-
* decide whether to install the tool.
|
|
1472
|
+
* scheme's own connect facts (`cli.probe.args`, `cli.hints.install`), a reachability
|
|
1473
|
+
* probe the agent uses to decide whether to install the tool.
|
|
1440
1474
|
*
|
|
1441
1475
|
* Catalog membership is required for `vendored` and skipped for `path`; roster
|
|
1442
1476
|
* uniqueness across every binary/alias applies to both.
|
|
@@ -1846,6 +1880,8 @@ export declare type FileExtensionToken = z.infer<typeof FileExtensionToken>;
|
|
|
1846
1880
|
*/
|
|
1847
1881
|
export declare function finalizeArtifactProvenanceEnvelope(capture: ArtifactProvenanceCaptureContext, artifacts: readonly ArtifactProvenanceMutation[]): ArtifactProvenanceEnvelopeV1;
|
|
1848
1882
|
|
|
1883
|
+
export declare function findSkillSuggestionCitations(text: string, options?: SkillSuggestionEvidenceOptions): readonly SkillSuggestionCitation[];
|
|
1884
|
+
|
|
1849
1885
|
/**
|
|
1850
1886
|
* The Basic-auth USERNAME a git host expects beside an injected token
|
|
1851
1887
|
* (`x-access-token` for GitHub, `oauth2` for GitLab). The token is the password
|
|
@@ -2059,7 +2095,7 @@ export declare const KAY_EVENT_PUBLISHER_ID: "kay";
|
|
|
2059
2095
|
declare const KAY_PLUGIN_COMPATIBILITY_REFUSAL_CODES: readonly ["unsupported-protocol", "sdk-range-unsatisfied", "sdk-range-unsupported", "host-sdk-version-invalid"];
|
|
2060
2096
|
|
|
2061
2097
|
/** Released SDK contracts still implemented by the host, alongside its current SDK. */
|
|
2062
|
-
export declare const KAY_PLUGIN_COMPATIBLE_SDK_VERSIONS: readonly ["0.8.0", "0.8.1", "0.8.2", "0.8.3", "0.8.4", "0.8.5", "0.9.0", "0.9.1", "0.10.0", "0.11.0", "0.11.1", "0.12.0", "0.12.1", "0.12.2", "0.12.3", "0.12.4", "0.12.5", "0.13.0", "0.13.1", "0.13.2", "0.13.3", "0.13.4", "0.13.5", "0.13.6", "0.13.7", "0.13.8"];
|
|
2098
|
+
export declare const KAY_PLUGIN_COMPATIBLE_SDK_VERSIONS: readonly ["0.8.0", "0.8.1", "0.8.2", "0.8.3", "0.8.4", "0.8.5", "0.9.0", "0.9.1", "0.10.0", "0.11.0", "0.11.1", "0.12.0", "0.12.1", "0.12.2", "0.12.3", "0.12.4", "0.12.5", "0.13.0", "0.13.1", "0.13.2", "0.13.3", "0.13.4", "0.13.5", "0.13.6", "0.13.7", "0.13.8", "0.13.9", "0.13.10"];
|
|
2063
2099
|
|
|
2064
2100
|
/** The file whose presence makes a directory a plugin. A directory without one is not a plugin. */
|
|
2065
2101
|
export declare const KAY_PLUGIN_MANIFEST_FILENAME = "kay-plugin.json";
|
|
@@ -2365,8 +2401,26 @@ export declare const KAY_PLUGIN_PROTOCOL_VERSION: "kay.plugin.v1";
|
|
|
2365
2401
|
* code a `kay.ui` page also loads (`kay-agent` exports the same `z`). Additive: a plugin compiled
|
|
2366
2402
|
* against 0.13.8 never imports it. A plugin that imports it declares `^0.13.9`, so an older host
|
|
2367
2403
|
* refuses a directory or repository plugin at load instead of the import failing.
|
|
2404
|
+
*
|
|
2405
|
+
* 0.13.10 adds two optional manifest fields. An `external-cli` auth scheme's `cli` says how the host
|
|
2406
|
+
* connects it (the binary, its probe and sign-in argv, the hints, the install command), which the
|
|
2407
|
+
* host read from its own tables before. An auth grant's `frontDoor` names the product a person
|
|
2408
|
+
* connects a shared identity through (`gmail` over `google.account`), with an optional file picker.
|
|
2409
|
+
* Additive: a manifest without them parses unchanged. A plugin that declares one declares
|
|
2410
|
+
* `^0.13.10`, so an older host refuses it at load with that reason rather than a schema error.
|
|
2411
|
+
*
|
|
2412
|
+
* 0.14.0 removes `withJev`: `api.withJev` on `kay.agent`, `app.withJev` on `kay.app`, the
|
|
2413
|
+
* `@bonsai/plugin-sdk/jev` subpath and every `Jev*` type it exported. A plugin uses `api.systemOne`
|
|
2414
|
+
* / `app.systemOne` (`@bonsai/plugin-sdk/system-one`) instead. The `jev.use` capability claim is
|
|
2415
|
+
* renamed `systemOne.use`, and stored grants are rewritten to the new slug. The signals subpath
|
|
2416
|
+
* types its own surface now: observe options by `KayAppSignalObserveOptions`, state by
|
|
2417
|
+
* `KayAppSignalState`, and questions and answers by `DecideQuestions` and `DecideAnswer`. For the
|
|
2418
|
+
* api surface this is a clean break with no shim and deliberately NOT a load refusal, like 0.13.0:
|
|
2419
|
+
* every earlier release stays in the retention list, so a plugin compiled against 0.13.x that
|
|
2420
|
+
* reads `api.withJev` gets `undefined` at the call, and one that imports a value from
|
|
2421
|
+
* `@bonsai/plugin-sdk/jev` fails at load. No plugin used either.
|
|
2368
2422
|
*/
|
|
2369
|
-
export declare const KAY_PLUGIN_SDK_VERSION: "0.
|
|
2423
|
+
export declare const KAY_PLUGIN_SDK_VERSION: "0.14.0";
|
|
2370
2424
|
|
|
2371
2425
|
export declare const KAY_PLUGIN_TARGET_NAMES: readonly ["kay.agent", "kay.app", "kay.ui"];
|
|
2372
2426
|
|
|
@@ -2529,9 +2583,9 @@ export declare const KayAppTargetManifest: z.ZodObject<{
|
|
|
2529
2583
|
responseSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>;
|
|
2530
2584
|
}, z.core.$strict>>>;
|
|
2531
2585
|
uriModules: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2586
|
+
displayName: z.ZodOptional<z.ZodString>;
|
|
2532
2587
|
schemes: z.ZodArray<z.ZodString>;
|
|
2533
2588
|
localId: z.ZodString;
|
|
2534
|
-
displayName: z.ZodOptional<z.ZodString>;
|
|
2535
2589
|
}, z.core.$strict>>>;
|
|
2536
2590
|
dataSources: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2537
2591
|
localId: z.ZodString;
|
|
@@ -2911,9 +2965,9 @@ export declare const KayPluginManifestV1: z.ZodObject<{
|
|
|
2911
2965
|
responseSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>;
|
|
2912
2966
|
}, z.core.$strict>>>;
|
|
2913
2967
|
uriModules: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2968
|
+
displayName: z.ZodOptional<z.ZodString>;
|
|
2914
2969
|
schemes: z.ZodArray<z.ZodString>;
|
|
2915
2970
|
localId: z.ZodString;
|
|
2916
|
-
displayName: z.ZodOptional<z.ZodString>;
|
|
2917
2971
|
}, z.core.$strict>>>;
|
|
2918
2972
|
dataSources: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2919
2973
|
localId: z.ZodString;
|
|
@@ -3254,6 +3308,26 @@ export declare const KayPluginManifestV1: z.ZodObject<{
|
|
|
3254
3308
|
localId: z.ZodString;
|
|
3255
3309
|
kind: z.ZodLiteral<"external-cli">;
|
|
3256
3310
|
scopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
3311
|
+
cli: z.ZodOptional<z.ZodObject<{
|
|
3312
|
+
binary: z.ZodString;
|
|
3313
|
+
probe: z.ZodObject<{
|
|
3314
|
+
args: z.ZodArray<z.ZodString>;
|
|
3315
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
3316
|
+
signedOutMarker: z.ZodOptional<z.ZodString>;
|
|
3317
|
+
}, z.core.$strict>;
|
|
3318
|
+
login: z.ZodOptional<z.ZodObject<{
|
|
3319
|
+
args: z.ZodArray<z.ZodString>;
|
|
3320
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
3321
|
+
}, z.core.$strict>>;
|
|
3322
|
+
install: z.ZodOptional<z.ZodObject<{
|
|
3323
|
+
command: z.ZodString;
|
|
3324
|
+
args: z.ZodArray<z.ZodString>;
|
|
3325
|
+
}, z.core.$strict>>;
|
|
3326
|
+
hints: z.ZodObject<{
|
|
3327
|
+
install: z.ZodString;
|
|
3328
|
+
login: z.ZodString;
|
|
3329
|
+
}, z.core.$strict>;
|
|
3330
|
+
}, z.core.$strict>>;
|
|
3257
3331
|
displayName: z.ZodOptional<z.ZodString>;
|
|
3258
3332
|
agentHint: z.ZodOptional<z.ZodString>;
|
|
3259
3333
|
summary: z.ZodOptional<z.ZodString>;
|
|
@@ -3321,6 +3395,18 @@ export declare const KayPluginManifestV1: z.ZodObject<{
|
|
|
3321
3395
|
kind: z.ZodLiteral<"record-id">;
|
|
3322
3396
|
recordId: z.ZodString;
|
|
3323
3397
|
}, z.core.$strict>], "kind">>>;
|
|
3398
|
+
frontDoor: z.ZodOptional<z.ZodObject<{
|
|
3399
|
+
id: z.ZodString;
|
|
3400
|
+
displayName: z.ZodString;
|
|
3401
|
+
resourcePicker: z.ZodOptional<z.ZodObject<{
|
|
3402
|
+
effect: z.ZodEnum<{
|
|
3403
|
+
selection: "selection";
|
|
3404
|
+
"resource-grant": "resource-grant";
|
|
3405
|
+
}>;
|
|
3406
|
+
mimeTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
3407
|
+
successNote: z.ZodOptional<z.ZodString>;
|
|
3408
|
+
}, z.core.$strict>>;
|
|
3409
|
+
}, z.core.$strict>>;
|
|
3324
3410
|
}, z.core.$strict>>>;
|
|
3325
3411
|
storage: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
3326
3412
|
kind: z.ZodEnum<{
|
|
@@ -3403,6 +3489,18 @@ export declare const KayPluginManifestV1: z.ZodObject<{
|
|
|
3403
3489
|
kind: z.ZodLiteral<"record-id">;
|
|
3404
3490
|
recordId: z.ZodString;
|
|
3405
3491
|
}, z.core.$strict>], "kind">>>;
|
|
3492
|
+
frontDoor: z.ZodOptional<z.ZodObject<{
|
|
3493
|
+
id: z.ZodString;
|
|
3494
|
+
displayName: z.ZodString;
|
|
3495
|
+
resourcePicker: z.ZodOptional<z.ZodObject<{
|
|
3496
|
+
effect: z.ZodEnum<{
|
|
3497
|
+
selection: "selection";
|
|
3498
|
+
"resource-grant": "resource-grant";
|
|
3499
|
+
}>;
|
|
3500
|
+
mimeTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
3501
|
+
successNote: z.ZodOptional<z.ZodString>;
|
|
3502
|
+
}, z.core.$strict>>;
|
|
3503
|
+
}, z.core.$strict>>;
|
|
3406
3504
|
}, z.core.$strict>>>;
|
|
3407
3505
|
storage: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
3408
3506
|
kind: z.ZodEnum<{
|
|
@@ -3485,6 +3583,18 @@ export declare const KayPluginManifestV1: z.ZodObject<{
|
|
|
3485
3583
|
kind: z.ZodLiteral<"record-id">;
|
|
3486
3584
|
recordId: z.ZodString;
|
|
3487
3585
|
}, z.core.$strict>], "kind">>>;
|
|
3586
|
+
frontDoor: z.ZodOptional<z.ZodObject<{
|
|
3587
|
+
id: z.ZodString;
|
|
3588
|
+
displayName: z.ZodString;
|
|
3589
|
+
resourcePicker: z.ZodOptional<z.ZodObject<{
|
|
3590
|
+
effect: z.ZodEnum<{
|
|
3591
|
+
selection: "selection";
|
|
3592
|
+
"resource-grant": "resource-grant";
|
|
3593
|
+
}>;
|
|
3594
|
+
mimeTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
3595
|
+
successNote: z.ZodOptional<z.ZodString>;
|
|
3596
|
+
}, z.core.$strict>>;
|
|
3597
|
+
}, z.core.$strict>>;
|
|
3488
3598
|
}, z.core.$strict>>>;
|
|
3489
3599
|
storage: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
3490
3600
|
kind: z.ZodEnum<{
|
|
@@ -3965,7 +4075,7 @@ export declare function parseResolvedPluginContractV1(value: unknown): ResolvedP
|
|
|
3965
4075
|
export declare function parseSemver(value: string): ParsedSemver | undefined;
|
|
3966
4076
|
|
|
3967
4077
|
/** Every capability slug {@link PluginCapabilityClaimV1} can express, for exhaustive table checks. */
|
|
3968
|
-
export declare const PLUGIN_CAPABILITY_SLUGS: readonly ["sessions.run", "network.connect", "web-session.request", "web-session.download", "process.spawn", "corpus.read", "signals.read", "skills.read", "tools.describe", "workspace.command", "sessions.create", "sessions.update", "models.complete", "
|
|
4078
|
+
export declare const PLUGIN_CAPABILITY_SLUGS: readonly ["sessions.run", "network.connect", "web-session.request", "web-session.download", "process.spawn", "corpus.read", "signals.read", "skills.read", "tools.describe", "workspace.command", "sessions.create", "sessions.update", "models.complete", "systemOne.use", "automations.write", "automations.run", "workflows.define", "session-events.subscribe", "agents.run", "dynamic-context.register", "app-data.register", "account.assert", "account.update", "agents.permissions", "tool-interception.register", "interaction.surface", "config.declare-section", "auth.own-service", "auth.shared-identity", "cli.bind", "mcp.host-server", "prompt.resident", "skills.declared-source", "whiteboard.discover", "whiteboard.read", "whiteboard.create", "whiteboard.update", "whiteboard.remove"];
|
|
3969
4079
|
|
|
3970
4080
|
/** Diagnostic messages carry plugin-controlled text (parse errors, module errors); bound it so a
|
|
3971
4081
|
* hostile or accidental multi-megabyte error can never blow up a log line or a render surface. */
|
|
@@ -4095,6 +4205,26 @@ export declare const PluginAuthManifest: z.ZodObject<{
|
|
|
4095
4205
|
localId: z.ZodString;
|
|
4096
4206
|
kind: z.ZodLiteral<"external-cli">;
|
|
4097
4207
|
scopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
4208
|
+
cli: z.ZodOptional<z.ZodObject<{
|
|
4209
|
+
binary: z.ZodString;
|
|
4210
|
+
probe: z.ZodObject<{
|
|
4211
|
+
args: z.ZodArray<z.ZodString>;
|
|
4212
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
4213
|
+
signedOutMarker: z.ZodOptional<z.ZodString>;
|
|
4214
|
+
}, z.core.$strict>;
|
|
4215
|
+
login: z.ZodOptional<z.ZodObject<{
|
|
4216
|
+
args: z.ZodArray<z.ZodString>;
|
|
4217
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
4218
|
+
}, z.core.$strict>>;
|
|
4219
|
+
install: z.ZodOptional<z.ZodObject<{
|
|
4220
|
+
command: z.ZodString;
|
|
4221
|
+
args: z.ZodArray<z.ZodString>;
|
|
4222
|
+
}, z.core.$strict>>;
|
|
4223
|
+
hints: z.ZodObject<{
|
|
4224
|
+
install: z.ZodString;
|
|
4225
|
+
login: z.ZodString;
|
|
4226
|
+
}, z.core.$strict>;
|
|
4227
|
+
}, z.core.$strict>>;
|
|
4098
4228
|
displayName: z.ZodOptional<z.ZodString>;
|
|
4099
4229
|
agentHint: z.ZodOptional<z.ZodString>;
|
|
4100
4230
|
summary: z.ZodOptional<z.ZodString>;
|
|
@@ -4206,6 +4336,26 @@ export declare const PluginAuthScheme: z.ZodDiscriminatedUnion<[z.ZodDiscriminat
|
|
|
4206
4336
|
localId: z.ZodString;
|
|
4207
4337
|
kind: z.ZodLiteral<"external-cli">;
|
|
4208
4338
|
scopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
4339
|
+
cli: z.ZodOptional<z.ZodObject<{
|
|
4340
|
+
binary: z.ZodString;
|
|
4341
|
+
probe: z.ZodObject<{
|
|
4342
|
+
args: z.ZodArray<z.ZodString>;
|
|
4343
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
4344
|
+
signedOutMarker: z.ZodOptional<z.ZodString>;
|
|
4345
|
+
}, z.core.$strict>;
|
|
4346
|
+
login: z.ZodOptional<z.ZodObject<{
|
|
4347
|
+
args: z.ZodArray<z.ZodString>;
|
|
4348
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
4349
|
+
}, z.core.$strict>>;
|
|
4350
|
+
install: z.ZodOptional<z.ZodObject<{
|
|
4351
|
+
command: z.ZodString;
|
|
4352
|
+
args: z.ZodArray<z.ZodString>;
|
|
4353
|
+
}, z.core.$strict>>;
|
|
4354
|
+
hints: z.ZodObject<{
|
|
4355
|
+
install: z.ZodString;
|
|
4356
|
+
login: z.ZodString;
|
|
4357
|
+
}, z.core.$strict>;
|
|
4358
|
+
}, z.core.$strict>>;
|
|
4209
4359
|
displayName: z.ZodOptional<z.ZodString>;
|
|
4210
4360
|
agentHint: z.ZodOptional<z.ZodString>;
|
|
4211
4361
|
summary: z.ZodOptional<z.ZodString>;
|
|
@@ -4297,6 +4447,26 @@ export declare const PluginAuthService: z.ZodObject<{
|
|
|
4297
4447
|
localId: z.ZodString;
|
|
4298
4448
|
kind: z.ZodLiteral<"external-cli">;
|
|
4299
4449
|
scopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
4450
|
+
cli: z.ZodOptional<z.ZodObject<{
|
|
4451
|
+
binary: z.ZodString;
|
|
4452
|
+
probe: z.ZodObject<{
|
|
4453
|
+
args: z.ZodArray<z.ZodString>;
|
|
4454
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
4455
|
+
signedOutMarker: z.ZodOptional<z.ZodString>;
|
|
4456
|
+
}, z.core.$strict>;
|
|
4457
|
+
login: z.ZodOptional<z.ZodObject<{
|
|
4458
|
+
args: z.ZodArray<z.ZodString>;
|
|
4459
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
4460
|
+
}, z.core.$strict>>;
|
|
4461
|
+
install: z.ZodOptional<z.ZodObject<{
|
|
4462
|
+
command: z.ZodString;
|
|
4463
|
+
args: z.ZodArray<z.ZodString>;
|
|
4464
|
+
}, z.core.$strict>>;
|
|
4465
|
+
hints: z.ZodObject<{
|
|
4466
|
+
install: z.ZodString;
|
|
4467
|
+
login: z.ZodString;
|
|
4468
|
+
}, z.core.$strict>;
|
|
4469
|
+
}, z.core.$strict>>;
|
|
4300
4470
|
displayName: z.ZodOptional<z.ZodString>;
|
|
4301
4471
|
agentHint: z.ZodOptional<z.ZodString>;
|
|
4302
4472
|
summary: z.ZodOptional<z.ZodString>;
|
|
@@ -4422,7 +4592,7 @@ export declare const PluginCapabilityClaimV1: z.ZodDiscriminatedUnion<[z.ZodObje
|
|
|
4422
4592
|
envelope: z.ZodObject<{}, z.core.$strict>;
|
|
4423
4593
|
}, z.core.$strict>, z.ZodObject<{
|
|
4424
4594
|
target: z.ZodLiteral<"kay.app">;
|
|
4425
|
-
slug: z.ZodLiteral<"
|
|
4595
|
+
slug: z.ZodLiteral<"systemOne.use">;
|
|
4426
4596
|
envelope: z.ZodObject<{}, z.core.$strict>;
|
|
4427
4597
|
}, z.core.$strict>, z.ZodObject<{
|
|
4428
4598
|
target: z.ZodLiteral<"kay.app">;
|
|
@@ -4658,7 +4828,7 @@ export declare const PluginCapabilityDecisionV1: z.ZodDiscriminatedUnion<[z.ZodO
|
|
|
4658
4828
|
envelope: z.ZodObject<{}, z.core.$strict>;
|
|
4659
4829
|
}, z.core.$strict>, z.ZodObject<{
|
|
4660
4830
|
target: z.ZodLiteral<"kay.app">;
|
|
4661
|
-
slug: z.ZodLiteral<"
|
|
4831
|
+
slug: z.ZodLiteral<"systemOne.use">;
|
|
4662
4832
|
envelope: z.ZodObject<{}, z.core.$strict>;
|
|
4663
4833
|
}, z.core.$strict>, z.ZodObject<{
|
|
4664
4834
|
target: z.ZodLiteral<"kay.app">;
|
|
@@ -4889,7 +5059,7 @@ export declare const PluginCapabilityDecisionV1: z.ZodDiscriminatedUnion<[z.ZodO
|
|
|
4889
5059
|
envelope: z.ZodObject<{}, z.core.$strict>;
|
|
4890
5060
|
}, z.core.$strict>, z.ZodObject<{
|
|
4891
5061
|
target: z.ZodLiteral<"kay.app">;
|
|
4892
|
-
slug: z.ZodLiteral<"
|
|
5062
|
+
slug: z.ZodLiteral<"systemOne.use">;
|
|
4893
5063
|
envelope: z.ZodObject<{}, z.core.$strict>;
|
|
4894
5064
|
}, z.core.$strict>, z.ZodObject<{
|
|
4895
5065
|
target: z.ZodLiteral<"kay.app">;
|
|
@@ -5183,7 +5353,7 @@ export declare const PluginCapabilityRefusalV1: z.ZodObject<{
|
|
|
5183
5353
|
envelope: z.ZodObject<{}, z.core.$strict>;
|
|
5184
5354
|
}, z.core.$strict>, z.ZodObject<{
|
|
5185
5355
|
target: z.ZodLiteral<"kay.app">;
|
|
5186
|
-
slug: z.ZodLiteral<"
|
|
5356
|
+
slug: z.ZodLiteral<"systemOne.use">;
|
|
5187
5357
|
envelope: z.ZodObject<{}, z.core.$strict>;
|
|
5188
5358
|
}, z.core.$strict>, z.ZodObject<{
|
|
5189
5359
|
target: z.ZodLiteral<"kay.app">;
|
|
@@ -5453,6 +5623,39 @@ export declare const PluginEventDefinitionContribution: z.ZodObject<{
|
|
|
5453
5623
|
|
|
5454
5624
|
export declare type PluginEventDefinitionContribution = z.infer<typeof PluginEventDefinitionContribution>;
|
|
5455
5625
|
|
|
5626
|
+
/**
|
|
5627
|
+
* How the host connects an `external-cli` scheme (SDK 0.13.10). Bonsai reads it for its own plugins
|
|
5628
|
+
* only; any other plugin's is ignored, with a load diagnostic.
|
|
5629
|
+
*
|
|
5630
|
+
* Connecting runs `binary probe.args`, and a zero exit is the connection. A failed probe surfaces the
|
|
5631
|
+
* hints, and when `login` is declared and the failure carries `probe.signedOutMarker`, connect hands
|
|
5632
|
+
* the sign-in to the CLI itself (`binary login.args`, which opens the CLI's own browser flow) and
|
|
5633
|
+
* probes again. The credential stays in the CLI's own store; the host records only that the probe
|
|
5634
|
+
* passed. Each `timeoutMs` is a budget the host enforces and may clamp to a shorter one.
|
|
5635
|
+
*/
|
|
5636
|
+
export declare const PluginExternalCliConnect: z.ZodObject<{
|
|
5637
|
+
binary: z.ZodString;
|
|
5638
|
+
probe: z.ZodObject<{
|
|
5639
|
+
args: z.ZodArray<z.ZodString>;
|
|
5640
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
5641
|
+
signedOutMarker: z.ZodOptional<z.ZodString>;
|
|
5642
|
+
}, z.core.$strict>;
|
|
5643
|
+
login: z.ZodOptional<z.ZodObject<{
|
|
5644
|
+
args: z.ZodArray<z.ZodString>;
|
|
5645
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
5646
|
+
}, z.core.$strict>>;
|
|
5647
|
+
install: z.ZodOptional<z.ZodObject<{
|
|
5648
|
+
command: z.ZodString;
|
|
5649
|
+
args: z.ZodArray<z.ZodString>;
|
|
5650
|
+
}, z.core.$strict>>;
|
|
5651
|
+
hints: z.ZodObject<{
|
|
5652
|
+
install: z.ZodString;
|
|
5653
|
+
login: z.ZodString;
|
|
5654
|
+
}, z.core.$strict>;
|
|
5655
|
+
}, z.core.$strict>;
|
|
5656
|
+
|
|
5657
|
+
export declare type PluginExternalCliConnect = z.infer<typeof PluginExternalCliConnect>;
|
|
5658
|
+
|
|
5456
5659
|
/**
|
|
5457
5660
|
* How a plugin icon asks to be drawn.
|
|
5458
5661
|
*
|
|
@@ -5623,6 +5826,18 @@ export declare const PluginPermissionManifest: z.ZodObject<{
|
|
|
5623
5826
|
kind: z.ZodLiteral<"record-id">;
|
|
5624
5827
|
recordId: z.ZodString;
|
|
5625
5828
|
}, z.core.$strict>], "kind">>>;
|
|
5829
|
+
frontDoor: z.ZodOptional<z.ZodObject<{
|
|
5830
|
+
id: z.ZodString;
|
|
5831
|
+
displayName: z.ZodString;
|
|
5832
|
+
resourcePicker: z.ZodOptional<z.ZodObject<{
|
|
5833
|
+
effect: z.ZodEnum<{
|
|
5834
|
+
selection: "selection";
|
|
5835
|
+
"resource-grant": "resource-grant";
|
|
5836
|
+
}>;
|
|
5837
|
+
mimeTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
5838
|
+
successNote: z.ZodOptional<z.ZodString>;
|
|
5839
|
+
}, z.core.$strict>>;
|
|
5840
|
+
}, z.core.$strict>>;
|
|
5626
5841
|
}, z.core.$strict>>>;
|
|
5627
5842
|
storage: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
5628
5843
|
kind: z.ZodEnum<{
|
|
@@ -5705,6 +5920,18 @@ export declare const PluginPermissionManifest: z.ZodObject<{
|
|
|
5705
5920
|
kind: z.ZodLiteral<"record-id">;
|
|
5706
5921
|
recordId: z.ZodString;
|
|
5707
5922
|
}, z.core.$strict>], "kind">>>;
|
|
5923
|
+
frontDoor: z.ZodOptional<z.ZodObject<{
|
|
5924
|
+
id: z.ZodString;
|
|
5925
|
+
displayName: z.ZodString;
|
|
5926
|
+
resourcePicker: z.ZodOptional<z.ZodObject<{
|
|
5927
|
+
effect: z.ZodEnum<{
|
|
5928
|
+
selection: "selection";
|
|
5929
|
+
"resource-grant": "resource-grant";
|
|
5930
|
+
}>;
|
|
5931
|
+
mimeTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
5932
|
+
successNote: z.ZodOptional<z.ZodString>;
|
|
5933
|
+
}, z.core.$strict>>;
|
|
5934
|
+
}, z.core.$strict>>;
|
|
5708
5935
|
}, z.core.$strict>>>;
|
|
5709
5936
|
storage: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
5710
5937
|
kind: z.ZodEnum<{
|
|
@@ -5787,6 +6014,18 @@ export declare const PluginPermissionManifest: z.ZodObject<{
|
|
|
5787
6014
|
kind: z.ZodLiteral<"record-id">;
|
|
5788
6015
|
recordId: z.ZodString;
|
|
5789
6016
|
}, z.core.$strict>], "kind">>>;
|
|
6017
|
+
frontDoor: z.ZodOptional<z.ZodObject<{
|
|
6018
|
+
id: z.ZodString;
|
|
6019
|
+
displayName: z.ZodString;
|
|
6020
|
+
resourcePicker: z.ZodOptional<z.ZodObject<{
|
|
6021
|
+
effect: z.ZodEnum<{
|
|
6022
|
+
selection: "selection";
|
|
6023
|
+
"resource-grant": "resource-grant";
|
|
6024
|
+
}>;
|
|
6025
|
+
mimeTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
6026
|
+
successNote: z.ZodOptional<z.ZodString>;
|
|
6027
|
+
}, z.core.$strict>>;
|
|
6028
|
+
}, z.core.$strict>>;
|
|
5790
6029
|
}, z.core.$strict>>>;
|
|
5791
6030
|
storage: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
5792
6031
|
kind: z.ZodEnum<{
|
|
@@ -6165,6 +6404,15 @@ export declare const RegistrableDomain: z.ZodString;
|
|
|
6165
6404
|
|
|
6166
6405
|
export declare type RegistrableDomain = z.infer<typeof RegistrableDomain>;
|
|
6167
6406
|
|
|
6407
|
+
/**
|
|
6408
|
+
* Capability slugs renamed since release, old slug to new. A stored grant naming an old slug is
|
|
6409
|
+
* rewritten to the new one (a read folds it; the boot migration rewrites the stored row), never
|
|
6410
|
+
* ignored: unlike a retired slug it still confers the capability.
|
|
6411
|
+
*/
|
|
6412
|
+
export declare const RENAMED_PLUGIN_CAPABILITY_SLUGS: {
|
|
6413
|
+
readonly "jev.use": "systemOne.use";
|
|
6414
|
+
};
|
|
6415
|
+
|
|
6168
6416
|
/**
|
|
6169
6417
|
* Id namespaces a directory plugin may never claim. `herd.` is the kernel's first-party namespace
|
|
6170
6418
|
* (`HERD_RESERVED_ID_PREFIX`: the kernel's extension loader throws on it without a first-party
|
|
@@ -6218,6 +6466,18 @@ export declare const ResolvedAuthGrantRequest: z.ZodObject<{
|
|
|
6218
6466
|
description: z.ZodString;
|
|
6219
6467
|
documentationUrl: z.ZodOptional<z.ZodURL>;
|
|
6220
6468
|
}, z.core.$strict>>>;
|
|
6469
|
+
frontDoor: z.ZodOptional<z.ZodObject<{
|
|
6470
|
+
id: z.ZodString;
|
|
6471
|
+
displayName: z.ZodString;
|
|
6472
|
+
resourcePicker: z.ZodOptional<z.ZodObject<{
|
|
6473
|
+
effect: z.ZodEnum<{
|
|
6474
|
+
selection: "selection";
|
|
6475
|
+
"resource-grant": "resource-grant";
|
|
6476
|
+
}>;
|
|
6477
|
+
mimeTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
6478
|
+
successNote: z.ZodOptional<z.ZodString>;
|
|
6479
|
+
}, z.core.$strict>>;
|
|
6480
|
+
}, z.core.$strict>>;
|
|
6221
6481
|
service: z.ZodString;
|
|
6222
6482
|
schemes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
6223
6483
|
accountSelectors: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -6585,6 +6845,26 @@ export declare const ResolvedPluginAuthScheme: z.ZodDiscriminatedUnion<[z.ZodDis
|
|
|
6585
6845
|
globalId: z.ZodString;
|
|
6586
6846
|
kind: z.ZodLiteral<"external-cli">;
|
|
6587
6847
|
scopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
6848
|
+
cli: z.ZodOptional<z.ZodObject<{
|
|
6849
|
+
binary: z.ZodString;
|
|
6850
|
+
probe: z.ZodObject<{
|
|
6851
|
+
args: z.ZodArray<z.ZodString>;
|
|
6852
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
6853
|
+
signedOutMarker: z.ZodOptional<z.ZodString>;
|
|
6854
|
+
}, z.core.$strict>;
|
|
6855
|
+
login: z.ZodOptional<z.ZodObject<{
|
|
6856
|
+
args: z.ZodArray<z.ZodString>;
|
|
6857
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
6858
|
+
}, z.core.$strict>>;
|
|
6859
|
+
install: z.ZodOptional<z.ZodObject<{
|
|
6860
|
+
command: z.ZodString;
|
|
6861
|
+
args: z.ZodArray<z.ZodString>;
|
|
6862
|
+
}, z.core.$strict>>;
|
|
6863
|
+
hints: z.ZodObject<{
|
|
6864
|
+
install: z.ZodString;
|
|
6865
|
+
login: z.ZodString;
|
|
6866
|
+
}, z.core.$strict>;
|
|
6867
|
+
}, z.core.$strict>>;
|
|
6588
6868
|
displayName: z.ZodOptional<z.ZodString>;
|
|
6589
6869
|
agentHint: z.ZodOptional<z.ZodString>;
|
|
6590
6870
|
summary: z.ZodOptional<z.ZodString>;
|
|
@@ -6692,6 +6972,26 @@ export declare const ResolvedPluginAuthService: z.ZodObject<{
|
|
|
6692
6972
|
globalId: z.ZodString;
|
|
6693
6973
|
kind: z.ZodLiteral<"external-cli">;
|
|
6694
6974
|
scopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
6975
|
+
cli: z.ZodOptional<z.ZodObject<{
|
|
6976
|
+
binary: z.ZodString;
|
|
6977
|
+
probe: z.ZodObject<{
|
|
6978
|
+
args: z.ZodArray<z.ZodString>;
|
|
6979
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
6980
|
+
signedOutMarker: z.ZodOptional<z.ZodString>;
|
|
6981
|
+
}, z.core.$strict>;
|
|
6982
|
+
login: z.ZodOptional<z.ZodObject<{
|
|
6983
|
+
args: z.ZodArray<z.ZodString>;
|
|
6984
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
6985
|
+
}, z.core.$strict>>;
|
|
6986
|
+
install: z.ZodOptional<z.ZodObject<{
|
|
6987
|
+
command: z.ZodString;
|
|
6988
|
+
args: z.ZodArray<z.ZodString>;
|
|
6989
|
+
}, z.core.$strict>>;
|
|
6990
|
+
hints: z.ZodObject<{
|
|
6991
|
+
install: z.ZodString;
|
|
6992
|
+
login: z.ZodString;
|
|
6993
|
+
}, z.core.$strict>;
|
|
6994
|
+
}, z.core.$strict>>;
|
|
6695
6995
|
displayName: z.ZodOptional<z.ZodString>;
|
|
6696
6996
|
agentHint: z.ZodOptional<z.ZodString>;
|
|
6697
6997
|
summary: z.ZodOptional<z.ZodString>;
|
|
@@ -6861,6 +7161,26 @@ export declare const ResolvedPluginContractV1: z.ZodObject<{
|
|
|
6861
7161
|
globalId: z.ZodString;
|
|
6862
7162
|
kind: z.ZodLiteral<"external-cli">;
|
|
6863
7163
|
scopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
7164
|
+
cli: z.ZodOptional<z.ZodObject<{
|
|
7165
|
+
binary: z.ZodString;
|
|
7166
|
+
probe: z.ZodObject<{
|
|
7167
|
+
args: z.ZodArray<z.ZodString>;
|
|
7168
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
7169
|
+
signedOutMarker: z.ZodOptional<z.ZodString>;
|
|
7170
|
+
}, z.core.$strict>;
|
|
7171
|
+
login: z.ZodOptional<z.ZodObject<{
|
|
7172
|
+
args: z.ZodArray<z.ZodString>;
|
|
7173
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
7174
|
+
}, z.core.$strict>>;
|
|
7175
|
+
install: z.ZodOptional<z.ZodObject<{
|
|
7176
|
+
command: z.ZodString;
|
|
7177
|
+
args: z.ZodArray<z.ZodString>;
|
|
7178
|
+
}, z.core.$strict>>;
|
|
7179
|
+
hints: z.ZodObject<{
|
|
7180
|
+
install: z.ZodString;
|
|
7181
|
+
login: z.ZodString;
|
|
7182
|
+
}, z.core.$strict>;
|
|
7183
|
+
}, z.core.$strict>>;
|
|
6864
7184
|
displayName: z.ZodOptional<z.ZodString>;
|
|
6865
7185
|
agentHint: z.ZodOptional<z.ZodString>;
|
|
6866
7186
|
summary: z.ZodOptional<z.ZodString>;
|
|
@@ -6916,6 +7236,18 @@ export declare const ResolvedPluginContractV1: z.ZodObject<{
|
|
|
6916
7236
|
description: z.ZodString;
|
|
6917
7237
|
documentationUrl: z.ZodOptional<z.ZodURL>;
|
|
6918
7238
|
}, z.core.$strict>>>;
|
|
7239
|
+
frontDoor: z.ZodOptional<z.ZodObject<{
|
|
7240
|
+
id: z.ZodString;
|
|
7241
|
+
displayName: z.ZodString;
|
|
7242
|
+
resourcePicker: z.ZodOptional<z.ZodObject<{
|
|
7243
|
+
effect: z.ZodEnum<{
|
|
7244
|
+
selection: "selection";
|
|
7245
|
+
"resource-grant": "resource-grant";
|
|
7246
|
+
}>;
|
|
7247
|
+
mimeTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
7248
|
+
successNote: z.ZodOptional<z.ZodString>;
|
|
7249
|
+
}, z.core.$strict>>;
|
|
7250
|
+
}, z.core.$strict>>;
|
|
6919
7251
|
service: z.ZodString;
|
|
6920
7252
|
schemes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
6921
7253
|
accountSelectors: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -6998,6 +7330,18 @@ export declare const ResolvedPluginContractV1: z.ZodObject<{
|
|
|
6998
7330
|
description: z.ZodString;
|
|
6999
7331
|
documentationUrl: z.ZodOptional<z.ZodURL>;
|
|
7000
7332
|
}, z.core.$strict>>>;
|
|
7333
|
+
frontDoor: z.ZodOptional<z.ZodObject<{
|
|
7334
|
+
id: z.ZodString;
|
|
7335
|
+
displayName: z.ZodString;
|
|
7336
|
+
resourcePicker: z.ZodOptional<z.ZodObject<{
|
|
7337
|
+
effect: z.ZodEnum<{
|
|
7338
|
+
selection: "selection";
|
|
7339
|
+
"resource-grant": "resource-grant";
|
|
7340
|
+
}>;
|
|
7341
|
+
mimeTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
7342
|
+
successNote: z.ZodOptional<z.ZodString>;
|
|
7343
|
+
}, z.core.$strict>>;
|
|
7344
|
+
}, z.core.$strict>>;
|
|
7001
7345
|
service: z.ZodString;
|
|
7002
7346
|
schemes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
7003
7347
|
accountSelectors: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -7080,6 +7424,18 @@ export declare const ResolvedPluginContractV1: z.ZodObject<{
|
|
|
7080
7424
|
description: z.ZodString;
|
|
7081
7425
|
documentationUrl: z.ZodOptional<z.ZodURL>;
|
|
7082
7426
|
}, z.core.$strict>>>;
|
|
7427
|
+
frontDoor: z.ZodOptional<z.ZodObject<{
|
|
7428
|
+
id: z.ZodString;
|
|
7429
|
+
displayName: z.ZodString;
|
|
7430
|
+
resourcePicker: z.ZodOptional<z.ZodObject<{
|
|
7431
|
+
effect: z.ZodEnum<{
|
|
7432
|
+
selection: "selection";
|
|
7433
|
+
"resource-grant": "resource-grant";
|
|
7434
|
+
}>;
|
|
7435
|
+
mimeTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
7436
|
+
successNote: z.ZodOptional<z.ZodString>;
|
|
7437
|
+
}, z.core.$strict>>;
|
|
7438
|
+
}, z.core.$strict>>;
|
|
7083
7439
|
service: z.ZodString;
|
|
7084
7440
|
schemes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
7085
7441
|
accountSelectors: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -7401,6 +7757,18 @@ export declare const ResolvedPluginGrants: z.ZodObject<{
|
|
|
7401
7757
|
description: z.ZodString;
|
|
7402
7758
|
documentationUrl: z.ZodOptional<z.ZodURL>;
|
|
7403
7759
|
}, z.core.$strict>>>;
|
|
7760
|
+
frontDoor: z.ZodOptional<z.ZodObject<{
|
|
7761
|
+
id: z.ZodString;
|
|
7762
|
+
displayName: z.ZodString;
|
|
7763
|
+
resourcePicker: z.ZodOptional<z.ZodObject<{
|
|
7764
|
+
effect: z.ZodEnum<{
|
|
7765
|
+
selection: "selection";
|
|
7766
|
+
"resource-grant": "resource-grant";
|
|
7767
|
+
}>;
|
|
7768
|
+
mimeTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
7769
|
+
successNote: z.ZodOptional<z.ZodString>;
|
|
7770
|
+
}, z.core.$strict>>;
|
|
7771
|
+
}, z.core.$strict>>;
|
|
7404
7772
|
service: z.ZodString;
|
|
7405
7773
|
schemes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
7406
7774
|
accountSelectors: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -7483,6 +7851,18 @@ export declare const ResolvedPluginGrants: z.ZodObject<{
|
|
|
7483
7851
|
description: z.ZodString;
|
|
7484
7852
|
documentationUrl: z.ZodOptional<z.ZodURL>;
|
|
7485
7853
|
}, z.core.$strict>>>;
|
|
7854
|
+
frontDoor: z.ZodOptional<z.ZodObject<{
|
|
7855
|
+
id: z.ZodString;
|
|
7856
|
+
displayName: z.ZodString;
|
|
7857
|
+
resourcePicker: z.ZodOptional<z.ZodObject<{
|
|
7858
|
+
effect: z.ZodEnum<{
|
|
7859
|
+
selection: "selection";
|
|
7860
|
+
"resource-grant": "resource-grant";
|
|
7861
|
+
}>;
|
|
7862
|
+
mimeTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
7863
|
+
successNote: z.ZodOptional<z.ZodString>;
|
|
7864
|
+
}, z.core.$strict>>;
|
|
7865
|
+
}, z.core.$strict>>;
|
|
7486
7866
|
service: z.ZodString;
|
|
7487
7867
|
schemes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
7488
7868
|
accountSelectors: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -7565,6 +7945,18 @@ export declare const ResolvedPluginGrants: z.ZodObject<{
|
|
|
7565
7945
|
description: z.ZodString;
|
|
7566
7946
|
documentationUrl: z.ZodOptional<z.ZodURL>;
|
|
7567
7947
|
}, z.core.$strict>>>;
|
|
7948
|
+
frontDoor: z.ZodOptional<z.ZodObject<{
|
|
7949
|
+
id: z.ZodString;
|
|
7950
|
+
displayName: z.ZodString;
|
|
7951
|
+
resourcePicker: z.ZodOptional<z.ZodObject<{
|
|
7952
|
+
effect: z.ZodEnum<{
|
|
7953
|
+
selection: "selection";
|
|
7954
|
+
"resource-grant": "resource-grant";
|
|
7955
|
+
}>;
|
|
7956
|
+
mimeTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
7957
|
+
successNote: z.ZodOptional<z.ZodString>;
|
|
7958
|
+
}, z.core.$strict>>;
|
|
7959
|
+
}, z.core.$strict>>;
|
|
7568
7960
|
service: z.ZodString;
|
|
7569
7961
|
schemes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
7570
7962
|
accountSelectors: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -7754,6 +8146,18 @@ export declare const ResolvedTargetGrantSet: z.ZodObject<{
|
|
|
7754
8146
|
description: z.ZodString;
|
|
7755
8147
|
documentationUrl: z.ZodOptional<z.ZodURL>;
|
|
7756
8148
|
}, z.core.$strict>>>;
|
|
8149
|
+
frontDoor: z.ZodOptional<z.ZodObject<{
|
|
8150
|
+
id: z.ZodString;
|
|
8151
|
+
displayName: z.ZodString;
|
|
8152
|
+
resourcePicker: z.ZodOptional<z.ZodObject<{
|
|
8153
|
+
effect: z.ZodEnum<{
|
|
8154
|
+
selection: "selection";
|
|
8155
|
+
"resource-grant": "resource-grant";
|
|
8156
|
+
}>;
|
|
8157
|
+
mimeTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
8158
|
+
successNote: z.ZodOptional<z.ZodString>;
|
|
8159
|
+
}, z.core.$strict>>;
|
|
8160
|
+
}, z.core.$strict>>;
|
|
7757
8161
|
service: z.ZodString;
|
|
7758
8162
|
schemes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
7759
8163
|
accountSelectors: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -8396,6 +8800,44 @@ export declare const SkillContribution: z.ZodObject<{
|
|
|
8396
8800
|
|
|
8397
8801
|
export declare type SkillContribution = z.infer<typeof SkillContribution>;
|
|
8398
8802
|
|
|
8803
|
+
export declare interface SkillSuggestionCitation {
|
|
8804
|
+
readonly start: number;
|
|
8805
|
+
readonly end: number;
|
|
8806
|
+
readonly ref: SkillSuggestionEvidenceRef;
|
|
8807
|
+
}
|
|
8808
|
+
|
|
8809
|
+
export declare type SkillSuggestionEvidenceItem = SkillSuggestionEvidenceRef | {
|
|
8810
|
+
readonly kind: "text";
|
|
8811
|
+
readonly text: string;
|
|
8812
|
+
};
|
|
8813
|
+
|
|
8814
|
+
export declare function skillSuggestionEvidenceItems(evidence: unknown, options?: SkillSuggestionEvidenceOptions): readonly SkillSuggestionEvidenceItem[];
|
|
8815
|
+
|
|
8816
|
+
export declare function skillSuggestionEvidenceKey(item: SkillSuggestionEvidenceItem): string;
|
|
8817
|
+
|
|
8818
|
+
export declare interface SkillSuggestionEvidenceOptions {
|
|
8819
|
+
readonly sessionIds?: readonly string[];
|
|
8820
|
+
}
|
|
8821
|
+
|
|
8822
|
+
export declare type SkillSuggestionEvidenceRef = {
|
|
8823
|
+
readonly kind: "message";
|
|
8824
|
+
readonly sessionId: string;
|
|
8825
|
+
readonly entryId: string;
|
|
8826
|
+
readonly raw: string;
|
|
8827
|
+
} | {
|
|
8828
|
+
readonly kind: "session";
|
|
8829
|
+
readonly sessionId: string;
|
|
8830
|
+
readonly raw: string;
|
|
8831
|
+
} | {
|
|
8832
|
+
readonly kind: "friction";
|
|
8833
|
+
readonly reference: string;
|
|
8834
|
+
readonly raw: string;
|
|
8835
|
+
} | {
|
|
8836
|
+
readonly kind: "uri";
|
|
8837
|
+
readonly uri: string;
|
|
8838
|
+
readonly raw: string;
|
|
8839
|
+
};
|
|
8840
|
+
|
|
8399
8841
|
export declare const StorageGrantRequest: z.ZodObject<{
|
|
8400
8842
|
kind: z.ZodEnum<{
|
|
8401
8843
|
sqlite: "sqlite";
|
|
@@ -8463,6 +8905,18 @@ export declare const TargetPermissionSet: z.ZodPreprocess<z.ZodObject<{
|
|
|
8463
8905
|
kind: z.ZodLiteral<"record-id">;
|
|
8464
8906
|
recordId: z.ZodString;
|
|
8465
8907
|
}, z.core.$strict>], "kind">>>;
|
|
8908
|
+
frontDoor: z.ZodOptional<z.ZodObject<{
|
|
8909
|
+
id: z.ZodString;
|
|
8910
|
+
displayName: z.ZodString;
|
|
8911
|
+
resourcePicker: z.ZodOptional<z.ZodObject<{
|
|
8912
|
+
effect: z.ZodEnum<{
|
|
8913
|
+
selection: "selection";
|
|
8914
|
+
"resource-grant": "resource-grant";
|
|
8915
|
+
}>;
|
|
8916
|
+
mimeTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
8917
|
+
successNote: z.ZodOptional<z.ZodString>;
|
|
8918
|
+
}, z.core.$strict>>;
|
|
8919
|
+
}, z.core.$strict>>;
|
|
8466
8920
|
}, z.core.$strict>>>;
|
|
8467
8921
|
storage: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
8468
8922
|
kind: z.ZodEnum<{
|
|
@@ -8577,6 +9031,18 @@ export declare const TargetPermissionWiring: z.ZodObject<{
|
|
|
8577
9031
|
kind: z.ZodLiteral<"record-id">;
|
|
8578
9032
|
recordId: z.ZodString;
|
|
8579
9033
|
}, z.core.$strict>], "kind">>>;
|
|
9034
|
+
frontDoor: z.ZodOptional<z.ZodObject<{
|
|
9035
|
+
id: z.ZodString;
|
|
9036
|
+
displayName: z.ZodString;
|
|
9037
|
+
resourcePicker: z.ZodOptional<z.ZodObject<{
|
|
9038
|
+
effect: z.ZodEnum<{
|
|
9039
|
+
selection: "selection";
|
|
9040
|
+
"resource-grant": "resource-grant";
|
|
9041
|
+
}>;
|
|
9042
|
+
mimeTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
9043
|
+
successNote: z.ZodOptional<z.ZodString>;
|
|
9044
|
+
}, z.core.$strict>>;
|
|
9045
|
+
}, z.core.$strict>>;
|
|
8580
9046
|
}, z.core.$strict>>>;
|
|
8581
9047
|
storage: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
8582
9048
|
kind: z.ZodEnum<{
|
package/dist/index.js
CHANGED
|
@@ -136,7 +136,7 @@ var JsonSchema = z2.record(z2.string(), JsonValue);
|
|
|
136
136
|
// packages/plugin-protocol/dist/common.js
|
|
137
137
|
var KAY_PLUGIN_PROTOCOL_VERSION = "kay.plugin.v1";
|
|
138
138
|
var KAY_PLUGIN_PROTOCOL_PACKAGE_NAME = "@bonsai/plugin-protocol";
|
|
139
|
-
var KAY_PLUGIN_SDK_VERSION = "0.
|
|
139
|
+
var KAY_PLUGIN_SDK_VERSION = "0.14.0";
|
|
140
140
|
var KAY_PLUGIN_COMPATIBLE_SDK_VERSIONS = [
|
|
141
141
|
"0.8.0",
|
|
142
142
|
"0.8.1",
|
|
@@ -163,7 +163,9 @@ var KAY_PLUGIN_COMPATIBLE_SDK_VERSIONS = [
|
|
|
163
163
|
"0.13.5",
|
|
164
164
|
"0.13.6",
|
|
165
165
|
"0.13.7",
|
|
166
|
-
"0.13.8"
|
|
166
|
+
"0.13.8",
|
|
167
|
+
"0.13.9",
|
|
168
|
+
"0.13.10"
|
|
167
169
|
];
|
|
168
170
|
var KAY_PLUGIN_TARGET_NAMES = [
|
|
169
171
|
"kay.agent",
|
|
@@ -1093,6 +1095,31 @@ import { z as z8 } from "zod";
|
|
|
1093
1095
|
|
|
1094
1096
|
// packages/plugin-protocol/dist/permissions.js
|
|
1095
1097
|
import { z as z7 } from "zod";
|
|
1098
|
+
|
|
1099
|
+
// packages/plugin-protocol/dist/ids.js
|
|
1100
|
+
function resolvePluginNamespace(pluginId, namespace) {
|
|
1101
|
+
return namespace ?? pluginId;
|
|
1102
|
+
}
|
|
1103
|
+
function resolveGlobalContributionId(namespace, localId) {
|
|
1104
|
+
return `${namespace}.${localId}`;
|
|
1105
|
+
}
|
|
1106
|
+
function deriveDirectoryPluginToolName(namespace, localId) {
|
|
1107
|
+
return `${namespace.replaceAll(".", "_")}_${localId}`;
|
|
1108
|
+
}
|
|
1109
|
+
function resolvePluginEventType(namespace, localId) {
|
|
1110
|
+
return resolveGlobalContributionId(namespace, localId);
|
|
1111
|
+
}
|
|
1112
|
+
function isQualifiedAuthServiceRef(ref) {
|
|
1113
|
+
return ref.includes(".");
|
|
1114
|
+
}
|
|
1115
|
+
function isQualifiedAuthSchemeRef(ref) {
|
|
1116
|
+
return ref.includes(".");
|
|
1117
|
+
}
|
|
1118
|
+
function resolveAdapterId(globalId, declaredAdapterId) {
|
|
1119
|
+
return declaredAdapterId ?? globalId;
|
|
1120
|
+
}
|
|
1121
|
+
|
|
1122
|
+
// packages/plugin-protocol/dist/permissions.js
|
|
1096
1123
|
var AuthGrantOperation = z7.enum([
|
|
1097
1124
|
"status",
|
|
1098
1125
|
"connect",
|
|
@@ -1121,6 +1148,26 @@ var ScopeRequirement = z7.strictObject({
|
|
|
1121
1148
|
purpose: NonEmptyString,
|
|
1122
1149
|
alternatives: z7.array(ScopeAlternative).min(1)
|
|
1123
1150
|
});
|
|
1151
|
+
var AuthGrantFrontDoor = z7.strictObject({
|
|
1152
|
+
/**
|
|
1153
|
+
* The door id: the id `service_connect` takes (`gmail`). Never a registered auth service's id, and
|
|
1154
|
+
* not the grant's `service`, which names the shared sign-in the door expands.
|
|
1155
|
+
*/
|
|
1156
|
+
id: LocalContributionId,
|
|
1157
|
+
displayName: NonEmptyString.max(120),
|
|
1158
|
+
/**
|
|
1159
|
+
* A file picker the connect runs. `resource-grant`: the scope reaches only picked files, so a
|
|
1160
|
+
* first connect chains into a pick. `selection`: the scope already reaches every file of the
|
|
1161
|
+
* type, and the pick only records which ones the person meant.
|
|
1162
|
+
*/
|
|
1163
|
+
resourcePicker: z7.strictObject({
|
|
1164
|
+
effect: z7.enum(["selection", "resource-grant"]),
|
|
1165
|
+
/** The file types the picker offers. */
|
|
1166
|
+
mimeTypes: z7.array(NonEmptyString.max(255)).min(1).max(32).optional(),
|
|
1167
|
+
/** What the agent is told about the picked set once the pick lands. */
|
|
1168
|
+
successNote: NonEmptyString.max(2048).optional()
|
|
1169
|
+
}).optional()
|
|
1170
|
+
});
|
|
1124
1171
|
var AuthGrantRequestBase = z7.strictObject({
|
|
1125
1172
|
// A local (undotted) service must be declared in this same manifest; a
|
|
1126
1173
|
// qualified (dotted) service names another plugin's global id and is an
|
|
@@ -1145,9 +1192,17 @@ var AuthGrantRequestBase = z7.strictObject({
|
|
|
1145
1192
|
connectScopes: z7.array(NonEmptyString).min(1).optional(),
|
|
1146
1193
|
scopeRequirement: ScopeRequirement.optional(),
|
|
1147
1194
|
scopeDefinitions: z7.array(AuthScopeDefinition).min(1).optional(),
|
|
1148
|
-
accountSelectors: z7.array(AuthAccountSelector).min(1).optional()
|
|
1195
|
+
accountSelectors: z7.array(AuthAccountSelector).min(1).optional(),
|
|
1196
|
+
frontDoor: AuthGrantFrontDoor.optional()
|
|
1149
1197
|
});
|
|
1150
1198
|
function validateAuthGrantRequest(grant, ctx) {
|
|
1199
|
+
if (grant.frontDoor !== void 0 && !isQualifiedAuthServiceRef(grant.service)) {
|
|
1200
|
+
ctx.addIssue({
|
|
1201
|
+
code: "custom",
|
|
1202
|
+
path: ["frontDoor"],
|
|
1203
|
+
message: "frontDoor needs a shared service (a qualified ref such as google.account): a door expands another plugin's sign-in"
|
|
1204
|
+
});
|
|
1205
|
+
}
|
|
1151
1206
|
if (grant.allowedScopes !== void 0 && grant.requiredScopes !== void 0) {
|
|
1152
1207
|
ctx.addIssue({
|
|
1153
1208
|
code: "custom",
|
|
@@ -1590,16 +1645,16 @@ var PluginCapabilityClaimV1 = z8.discriminatedUnion("slug", [
|
|
|
1590
1645
|
envelope: z8.strictObject({})
|
|
1591
1646
|
}),
|
|
1592
1647
|
z8.strictObject({
|
|
1593
|
-
// Held to `kay.app`, the daemon-lifetime tier, even though the same
|
|
1648
|
+
// Held to `kay.app`, the daemon-lifetime tier, even though the same System One client is exposed on
|
|
1594
1649
|
// BOTH the `kay.app` and `kay.agent` plugin SDKs (and to host composition directly): a slug
|
|
1595
1650
|
// pins exactly one target (see this file's module doc), so one shared claim is simpler and
|
|
1596
1651
|
// more honest than a second, `kay.agent`-scoped sibling slug for the identical capability.
|
|
1597
|
-
// `kay.agent`'s `api.
|
|
1652
|
+
// `kay.agent`'s `api.systemOne` authorizes against this SAME claim through the calling
|
|
1598
1653
|
// plugin's own pinned authority, which already spans both targets for every other capability
|
|
1599
1654
|
// (`network.connect`/`tool-interception.register` are decided by the identical per-plugin
|
|
1600
|
-
// handle `kay.app`-target claims use).
|
|
1655
|
+
// handle `kay.app`-target claims use). `app.systemOne` authorizes against it the same way.
|
|
1601
1656
|
target: z8.literal("kay.app"),
|
|
1602
|
-
slug: z8.literal("
|
|
1657
|
+
slug: z8.literal("systemOne.use"),
|
|
1603
1658
|
envelope: z8.strictObject({})
|
|
1604
1659
|
}),
|
|
1605
1660
|
z8.strictObject({
|
|
@@ -1722,6 +1777,9 @@ var RETIRED_PLUGIN_CAPABILITY_SLUGS = [
|
|
|
1722
1777
|
"filesystem.read",
|
|
1723
1778
|
"filesystem.write"
|
|
1724
1779
|
];
|
|
1780
|
+
var RENAMED_PLUGIN_CAPABILITY_SLUGS = {
|
|
1781
|
+
"jev.use": "systemOne.use"
|
|
1782
|
+
};
|
|
1725
1783
|
var PLUGIN_CAPABILITY_SLUGS = [
|
|
1726
1784
|
"sessions.run",
|
|
1727
1785
|
"network.connect",
|
|
@@ -1736,7 +1794,7 @@ var PLUGIN_CAPABILITY_SLUGS = [
|
|
|
1736
1794
|
"sessions.create",
|
|
1737
1795
|
"sessions.update",
|
|
1738
1796
|
"models.complete",
|
|
1739
|
-
"
|
|
1797
|
+
"systemOne.use",
|
|
1740
1798
|
"automations.write",
|
|
1741
1799
|
"automations.run",
|
|
1742
1800
|
"workflows.define",
|
|
@@ -1844,7 +1902,7 @@ function sameClaim(a, b) {
|
|
|
1844
1902
|
case "tools.describe":
|
|
1845
1903
|
case "workspace.command":
|
|
1846
1904
|
case "models.complete":
|
|
1847
|
-
case "
|
|
1905
|
+
case "systemOne.use":
|
|
1848
1906
|
case "automations.write":
|
|
1849
1907
|
case "automations.run":
|
|
1850
1908
|
case "workflows.define":
|
|
@@ -1914,7 +1972,7 @@ function envelopePairs(a, b) {
|
|
|
1914
1972
|
case "tools.describe":
|
|
1915
1973
|
case "workspace.command":
|
|
1916
1974
|
case "models.complete":
|
|
1917
|
-
case "
|
|
1975
|
+
case "systemOne.use":
|
|
1918
1976
|
case "automations.write":
|
|
1919
1977
|
case "automations.run":
|
|
1920
1978
|
case "workflows.define":
|
|
@@ -2814,29 +2872,6 @@ function pluginIconShape(svg) {
|
|
|
2814
2872
|
return "mark";
|
|
2815
2873
|
}
|
|
2816
2874
|
|
|
2817
|
-
// packages/plugin-protocol/dist/ids.js
|
|
2818
|
-
function resolvePluginNamespace(pluginId, namespace) {
|
|
2819
|
-
return namespace ?? pluginId;
|
|
2820
|
-
}
|
|
2821
|
-
function resolveGlobalContributionId(namespace, localId) {
|
|
2822
|
-
return `${namespace}.${localId}`;
|
|
2823
|
-
}
|
|
2824
|
-
function deriveDirectoryPluginToolName(namespace, localId) {
|
|
2825
|
-
return `${namespace.replaceAll(".", "_")}_${localId}`;
|
|
2826
|
-
}
|
|
2827
|
-
function resolvePluginEventType(namespace, localId) {
|
|
2828
|
-
return resolveGlobalContributionId(namespace, localId);
|
|
2829
|
-
}
|
|
2830
|
-
function isQualifiedAuthServiceRef(ref) {
|
|
2831
|
-
return ref.includes(".");
|
|
2832
|
-
}
|
|
2833
|
-
function isQualifiedAuthSchemeRef(ref) {
|
|
2834
|
-
return ref.includes(".");
|
|
2835
|
-
}
|
|
2836
|
-
function resolveAdapterId(globalId, declaredAdapterId) {
|
|
2837
|
-
return declaredAdapterId ?? globalId;
|
|
2838
|
-
}
|
|
2839
|
-
|
|
2840
2875
|
// packages/plugin-protocol/dist/manifest.js
|
|
2841
2876
|
import { z as z10 } from "zod";
|
|
2842
2877
|
|
|
@@ -3117,11 +3152,60 @@ var PluginAuthSchemeDelegated = z10.strictObject({
|
|
|
3117
3152
|
kind: z10.literal("delegated"),
|
|
3118
3153
|
scopes: z10.array(NonEmptyString).optional()
|
|
3119
3154
|
});
|
|
3155
|
+
var ExternalCliArgument = z10.string().min(1).max(16384).refine((value) => ![...value].some(isUnsafeArgumentCharacter), {
|
|
3156
|
+
message: "an argument may hold tabs and line breaks, but no other control character, no invisible character and no bidirectional override"
|
|
3157
|
+
});
|
|
3158
|
+
function isUnsafeArgumentCharacter(character) {
|
|
3159
|
+
const code = character.codePointAt(0) ?? 0;
|
|
3160
|
+
return code <= 31 && code !== 9 && code !== 10 || code >= 127 && code <= 159 || code === 1564 || code >= 8203 && code <= 8207 || code === 8232 || code === 8233 || code >= 8234 && code <= 8238 || code >= 8288 && code <= 8297 || code === 65279;
|
|
3161
|
+
}
|
|
3162
|
+
var ExternalCliCommand = z10.string().max(128).regex(/^[A-Za-z0-9][A-Za-z0-9._+-]*$/, {
|
|
3163
|
+
message: "a command is an executable's basename (letters, digits, '.', '_', '+', '-'), never a path"
|
|
3164
|
+
});
|
|
3165
|
+
var ExternalCliHint = NonEmptyString.max(2048);
|
|
3166
|
+
var ExternalCliArguments = z10.array(ExternalCliArgument).max(64);
|
|
3167
|
+
var PluginExternalCliConnect = z10.strictObject({
|
|
3168
|
+
/** A basename the host finds on `PATH` (`osascript`, `wrangler`), never a path. */
|
|
3169
|
+
binary: ExternalCliCommand,
|
|
3170
|
+
probe: z10.strictObject({
|
|
3171
|
+
args: ExternalCliArguments.min(1),
|
|
3172
|
+
timeoutMs: z10.number().int().min(1).max(12e4).optional(),
|
|
3173
|
+
/**
|
|
3174
|
+
* The CLI's own signed-out marker: text a failed probe's output (stderr, else stdout) contains
|
|
3175
|
+
* when the CLI is signed out. A failure that carries it is a sign-in problem, and only such a
|
|
3176
|
+
* failure runs `login`; a failure without it (a timeout, a provider outage) is reported as
|
|
3177
|
+
* unavailable. Required when `login` is declared, so a timeout never starts a sign-in.
|
|
3178
|
+
*/
|
|
3179
|
+
signedOutMarker: ExternalCliArgument.refine((value) => value.trim() !== "", { message: "a signed-out marker needs text beyond whitespace" }).optional()
|
|
3180
|
+
}),
|
|
3181
|
+
/** The CLI's interactive sign-in. Absent: connect only probes and reports. */
|
|
3182
|
+
login: z10.strictObject({
|
|
3183
|
+
args: ExternalCliArguments.min(1),
|
|
3184
|
+
timeoutMs: z10.number().int().min(1).max(6e5).optional()
|
|
3185
|
+
}).optional(),
|
|
3186
|
+
/**
|
|
3187
|
+
* The command that installs `binary`, as an argv. Bonsai never runs it: a surface shows it, joined
|
|
3188
|
+
* for display, or hands it to an agent session that runs it behind the ordinary bash approval.
|
|
3189
|
+
* Absent for a binary the OS ships (`osascript`).
|
|
3190
|
+
*/
|
|
3191
|
+
install: z10.strictObject({ command: ExternalCliCommand, args: ExternalCliArguments }).optional(),
|
|
3192
|
+
/** Prose for a person: `install` when the binary is missing, `login` when the probe fails. */
|
|
3193
|
+
hints: z10.strictObject({ install: ExternalCliHint, login: ExternalCliHint })
|
|
3194
|
+
}).superRefine((cli, ctx) => {
|
|
3195
|
+
if (cli.login !== void 0 && cli.probe.signedOutMarker === void 0) {
|
|
3196
|
+
ctx.addIssue({
|
|
3197
|
+
code: "custom",
|
|
3198
|
+
path: ["probe", "signedOutMarker"],
|
|
3199
|
+
message: "a CLI connect that declares login needs probe.signedOutMarker, so only a signed-out probe runs login"
|
|
3200
|
+
});
|
|
3201
|
+
}
|
|
3202
|
+
});
|
|
3120
3203
|
var PluginAuthSchemeExternalCli = z10.strictObject({
|
|
3121
3204
|
...PluginAuthSchemeDescriptionFields,
|
|
3122
3205
|
localId: LocalContributionId,
|
|
3123
3206
|
kind: z10.literal("external-cli"),
|
|
3124
|
-
scopes: z10.array(NonEmptyString).optional()
|
|
3207
|
+
scopes: z10.array(NonEmptyString).optional(),
|
|
3208
|
+
cli: PluginExternalCliConnect.optional()
|
|
3125
3209
|
});
|
|
3126
3210
|
var PluginAuthScheme = z10.discriminatedUnion("kind", [
|
|
3127
3211
|
PluginAuthSchemeOAuth2,
|
|
@@ -3706,6 +3790,21 @@ var KayPluginManifestV1 = z10.strictObject({
|
|
|
3706
3790
|
message: `permission references unknown auth service ${grant.service}`
|
|
3707
3791
|
});
|
|
3708
3792
|
}
|
|
3793
|
+
if (grant.frontDoor !== void 0) {
|
|
3794
|
+
if (target !== "kay.agent") {
|
|
3795
|
+
ctx.addIssue({
|
|
3796
|
+
code: "custom",
|
|
3797
|
+
path: ["permissions", "byTarget", target, "auth"],
|
|
3798
|
+
message: "frontDoor is read only on a kay.agent auth grant"
|
|
3799
|
+
});
|
|
3800
|
+
} else if (manifest.namespace !== void 0 && grant.service.startsWith(`${manifest.namespace}.`) && authServices.has(grant.service.slice(manifest.namespace.length + 1))) {
|
|
3801
|
+
ctx.addIssue({
|
|
3802
|
+
code: "custom",
|
|
3803
|
+
path: ["permissions", "byTarget", target, "auth"],
|
|
3804
|
+
message: `frontDoor needs another plugin's sign-in; ${grant.service} is this plugin's own`
|
|
3805
|
+
});
|
|
3806
|
+
}
|
|
3807
|
+
}
|
|
3709
3808
|
if (!isQualifiedAuthServiceRef(grant.service)) {
|
|
3710
3809
|
const declaredSchemes = authSchemeIdsByService.get(grant.service);
|
|
3711
3810
|
for (const scheme of grant.schemes ?? []) {
|
|
@@ -4095,7 +4194,9 @@ var ResolvedPluginAuthSchemeExternalCli = z11.strictObject({
|
|
|
4095
4194
|
localId: LocalContributionId,
|
|
4096
4195
|
globalId: GlobalContributionId,
|
|
4097
4196
|
kind: z11.literal("external-cli"),
|
|
4098
|
-
scopes: z11.array(z11.string()).optional()
|
|
4197
|
+
scopes: z11.array(z11.string()).optional(),
|
|
4198
|
+
/** The manifest's connect facts, verbatim. */
|
|
4199
|
+
cli: PluginExternalCliConnect.optional()
|
|
4099
4200
|
});
|
|
4100
4201
|
var ResolvedPluginAuthScheme = z11.discriminatedUnion("kind", [
|
|
4101
4202
|
ResolvedPluginAuthSchemeOAuth2,
|
|
@@ -4396,7 +4497,8 @@ function resolveAuthServices(namespace, manifest) {
|
|
|
4396
4497
|
kind: scheme.kind,
|
|
4397
4498
|
...scopesField,
|
|
4398
4499
|
...descriptionFields,
|
|
4399
|
-
...provisioningField
|
|
4500
|
+
...provisioningField,
|
|
4501
|
+
...scheme.kind === "external-cli" && scheme.cli !== void 0 ? { cli: structuredClone(scheme.cli) } : {}
|
|
4400
4502
|
};
|
|
4401
4503
|
})
|
|
4402
4504
|
}));
|
|
@@ -4887,6 +4989,180 @@ var CorpusResourceInvocationQuery = z14.strictObject({
|
|
|
4887
4989
|
message: "since must precede until"
|
|
4888
4990
|
});
|
|
4889
4991
|
|
|
4992
|
+
// packages/plugin-protocol/dist/skill-suggestion-evidence.js
|
|
4993
|
+
var UUID = "[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}";
|
|
4994
|
+
var UUID_ID = new RegExp(`^${UUID}$`, "i");
|
|
4995
|
+
var ENTRY = "[a-z0-9_-]+";
|
|
4996
|
+
var ENTRY_ID = new RegExp(`^${ENTRY}$`, "i");
|
|
4997
|
+
var FRICTION_URI = /^friction:\/\/([a-z0-9]+(?:-[a-z0-9]+)*)$/;
|
|
4998
|
+
var normalizeId = (value) => UUID_ID.test(value) ? value.toLowerCase() : value;
|
|
4999
|
+
function sessionPattern(options) {
|
|
5000
|
+
const known = (options.sessionIds ?? []).filter((id) => ENTRY_ID.test(id) && !UUID_ID.test(id)).map((id) => id.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"));
|
|
5001
|
+
return `(?:${[UUID, ...new Set(known)].join("|")})`;
|
|
5002
|
+
}
|
|
5003
|
+
function sessionRef(sessionId, entryId, raw) {
|
|
5004
|
+
return entryId === void 0 ? { kind: "session", sessionId: normalizeId(sessionId), raw } : {
|
|
5005
|
+
kind: "message",
|
|
5006
|
+
sessionId: normalizeId(sessionId),
|
|
5007
|
+
entryId: normalizeId(entryId),
|
|
5008
|
+
raw
|
|
5009
|
+
};
|
|
5010
|
+
}
|
|
5011
|
+
function parseToken(raw, sessions) {
|
|
5012
|
+
if (/^sessions?:\/\//i.test(raw)) {
|
|
5013
|
+
const match = /^sessions?:\/\/([^/?#]+)([^?#]*)(?:\?([^#]*))?(?:#(.*))?$/i.exec(raw);
|
|
5014
|
+
if (match === null)
|
|
5015
|
+
return void 0;
|
|
5016
|
+
const sessionId = match[1].replace(/\.jsonl$/i, "");
|
|
5017
|
+
if (!new RegExp(`^${sessions}$`, "i").test(sessionId))
|
|
5018
|
+
return void 0;
|
|
5019
|
+
const path = match[2];
|
|
5020
|
+
if (path !== "" && path !== "/" && !new RegExp(`^/${ENTRY}$`, "i").test(path))
|
|
5021
|
+
return void 0;
|
|
5022
|
+
const query = new URLSearchParams(match[3]);
|
|
5023
|
+
const entryId = query.get("entry") ?? query.get("span") ?? query.get("from") ?? (path.length > 1 ? path.slice(1) : match[4]);
|
|
5024
|
+
if (entryId !== void 0 && !ENTRY_ID.test(entryId))
|
|
5025
|
+
return void 0;
|
|
5026
|
+
return sessionRef(sessionId, entryId, raw);
|
|
5027
|
+
}
|
|
5028
|
+
if (/^friction:\/\//i.test(raw)) {
|
|
5029
|
+
const reference = FRICTION_URI.exec(raw)?.[1];
|
|
5030
|
+
return reference === void 0 || reference === "summary" ? void 0 : { kind: "friction", reference, raw };
|
|
5031
|
+
}
|
|
5032
|
+
if (/^[a-z][a-z0-9+.-]*:\/\//i.test(raw)) {
|
|
5033
|
+
return { kind: "uri", uri: raw, raw };
|
|
5034
|
+
}
|
|
5035
|
+
const message = new RegExp(`^(${sessions})(?:\\.jsonl)?(?:[/#](${ENTRY})(?:#[0-9]+)?)?$`, "i").exec(raw);
|
|
5036
|
+
return message === null ? void 0 : sessionRef(message[1], message[2], raw);
|
|
5037
|
+
}
|
|
5038
|
+
function findSkillSuggestionCitations(text, options = {}) {
|
|
5039
|
+
const sessions = sessionPattern(options);
|
|
5040
|
+
const tokens = new RegExp(`(?<![\\w/.:#-])(?:[a-z][a-z0-9+.-]*://[^\\s<>\`"'|\\[\\]()]+|${sessions}(?:\\.jsonl)?(?:[/#]${ENTRY}(?:#[0-9]+)?)?(?![\\w/#-]))`, "gi");
|
|
5041
|
+
const citations = [];
|
|
5042
|
+
for (const match of text.matchAll(tokens)) {
|
|
5043
|
+
const raw = match[0].replace(/[.,;:!?]+$/u, "");
|
|
5044
|
+
if (new RegExp(`^${UUID}(?:#[0-9]+)?$`, "i").test(raw) && /\b(?:call|result)(?:\s*:\s*|\s+)$/i.test(text.slice(0, match.index)))
|
|
5045
|
+
continue;
|
|
5046
|
+
const ref = parseToken(raw, sessions);
|
|
5047
|
+
if (ref !== void 0)
|
|
5048
|
+
citations.push({
|
|
5049
|
+
start: match.index,
|
|
5050
|
+
end: match.index + raw.length,
|
|
5051
|
+
ref
|
|
5052
|
+
});
|
|
5053
|
+
}
|
|
5054
|
+
const sessionIds = new Set(citations.flatMap(({ ref }) => ref.kind === "message" || ref.kind === "session" && ref.raw.indexOf("://") >= 0 ? [ref.sessionId] : []));
|
|
5055
|
+
if (sessionIds.size === 1) {
|
|
5056
|
+
const sessionId = [...sessionIds][0];
|
|
5057
|
+
const relative = new RegExp(`\\b(?:call|result)(?:\\s*:\\s*|\\s+)((?:${UUID}|[0-9a-f]{8,32}|[0-9]+)|${ENTRY}(?=#[0-9]+))(?:#[0-9]+)?(?![\\w/#-])`, "gi");
|
|
5058
|
+
for (const match of text.matchAll(relative)) {
|
|
5059
|
+
const start = match.index;
|
|
5060
|
+
const end = start + match[0].length;
|
|
5061
|
+
if (citations.some((item) => start < item.end && end > item.start))
|
|
5062
|
+
continue;
|
|
5063
|
+
citations.push({
|
|
5064
|
+
start,
|
|
5065
|
+
end,
|
|
5066
|
+
ref: sessionRef(sessionId, match[1], match[0])
|
|
5067
|
+
});
|
|
5068
|
+
}
|
|
5069
|
+
}
|
|
5070
|
+
return citations.sort((a, b) => a.start - b.start);
|
|
5071
|
+
}
|
|
5072
|
+
function skillSuggestionEvidenceKey(item) {
|
|
5073
|
+
switch (item.kind) {
|
|
5074
|
+
case "message":
|
|
5075
|
+
return `message:${item.sessionId}/${item.entryId}`;
|
|
5076
|
+
case "session":
|
|
5077
|
+
return `session:${item.sessionId}`;
|
|
5078
|
+
case "friction":
|
|
5079
|
+
return `friction:${item.reference}`;
|
|
5080
|
+
case "uri":
|
|
5081
|
+
return `uri:${item.uri}`;
|
|
5082
|
+
case "text":
|
|
5083
|
+
return `text:${item.text.trim()}`;
|
|
5084
|
+
}
|
|
5085
|
+
}
|
|
5086
|
+
function skillSuggestionEvidenceItems(evidence, options = {}) {
|
|
5087
|
+
const items = [];
|
|
5088
|
+
const keys = /* @__PURE__ */ new Set();
|
|
5089
|
+
const visited = /* @__PURE__ */ new WeakSet();
|
|
5090
|
+
const add = (item) => {
|
|
5091
|
+
const key = skillSuggestionEvidenceKey(item);
|
|
5092
|
+
if (keys.has(key))
|
|
5093
|
+
return;
|
|
5094
|
+
keys.add(key);
|
|
5095
|
+
items.push(item);
|
|
5096
|
+
};
|
|
5097
|
+
const text = (value) => {
|
|
5098
|
+
const citations = findSkillSuggestionCitations(value, options);
|
|
5099
|
+
if (citations.length === 0) {
|
|
5100
|
+
if (value.trim() !== "")
|
|
5101
|
+
add({ kind: "text", text: value });
|
|
5102
|
+
return;
|
|
5103
|
+
}
|
|
5104
|
+
let cursor = 0;
|
|
5105
|
+
const rest = [];
|
|
5106
|
+
for (const citation of citations) {
|
|
5107
|
+
rest.push(value.slice(cursor, citation.start));
|
|
5108
|
+
cursor = citation.end;
|
|
5109
|
+
}
|
|
5110
|
+
rest.push(value.slice(cursor));
|
|
5111
|
+
const note = rest.join(" ").trim();
|
|
5112
|
+
if (citations.every(({ ref }) => ref.kind === "uri") && /[\p{L}\p{N}]/u.test(note)) {
|
|
5113
|
+
add({ kind: "text", text: value });
|
|
5114
|
+
return;
|
|
5115
|
+
}
|
|
5116
|
+
for (const citation of citations)
|
|
5117
|
+
add(citation.ref);
|
|
5118
|
+
if (/[\p{L}\p{N}]/u.test(note.replace(/\b(?:call|result|view|pointer|and)\b/gi, "")))
|
|
5119
|
+
add({ kind: "text", text: note.replace(/^[\s|,;`]+|[\s|,;`]+$/g, "") });
|
|
5120
|
+
};
|
|
5121
|
+
const visit = (value, depth) => {
|
|
5122
|
+
if (value === null || value === void 0)
|
|
5123
|
+
return;
|
|
5124
|
+
if (typeof value === "string")
|
|
5125
|
+
return text(value);
|
|
5126
|
+
if (typeof value === "number" || typeof value === "boolean" || typeof value === "bigint")
|
|
5127
|
+
return text(String(value));
|
|
5128
|
+
if (typeof value !== "object" || visited.has(value))
|
|
5129
|
+
return;
|
|
5130
|
+
visited.add(value);
|
|
5131
|
+
if (depth >= 32) {
|
|
5132
|
+
add({ kind: "text", text: "[evidence nested too deeply]" });
|
|
5133
|
+
return;
|
|
5134
|
+
}
|
|
5135
|
+
if (Array.isArray(value)) {
|
|
5136
|
+
for (const entry of value)
|
|
5137
|
+
visit(entry, depth + 1);
|
|
5138
|
+
return;
|
|
5139
|
+
}
|
|
5140
|
+
const object = value;
|
|
5141
|
+
const sessionId = object.sessionId;
|
|
5142
|
+
const entryId = object.entryId ?? object.messageId;
|
|
5143
|
+
if (typeof sessionId === "string" && ENTRY_ID.test(sessionId) && (entryId === void 0 || typeof entryId === "string" && ENTRY_ID.test(entryId))) {
|
|
5144
|
+
add(sessionRef(sessionId, entryId, `sessions://${sessionId}${entryId === void 0 ? "" : `/${entryId}`}`));
|
|
5145
|
+
return;
|
|
5146
|
+
}
|
|
5147
|
+
if (object.kind === "text" && typeof object.text === "string") {
|
|
5148
|
+
text(object.text);
|
|
5149
|
+
return;
|
|
5150
|
+
}
|
|
5151
|
+
if (object.kind === "friction" && typeof object.reference === "string") {
|
|
5152
|
+
text(`friction://${object.reference}`);
|
|
5153
|
+
return;
|
|
5154
|
+
}
|
|
5155
|
+
if (object.kind === "uri" && typeof object.uri === "string") {
|
|
5156
|
+
text(object.uri);
|
|
5157
|
+
return;
|
|
5158
|
+
}
|
|
5159
|
+
for (const entry of Object.values(object))
|
|
5160
|
+
visit(entry, depth + 1);
|
|
5161
|
+
};
|
|
5162
|
+
visit(evidence, 0);
|
|
5163
|
+
return items;
|
|
5164
|
+
}
|
|
5165
|
+
|
|
4890
5166
|
// packages/plugin-protocol/dist/ui-app-package.js
|
|
4891
5167
|
import { z as z15 } from "zod";
|
|
4892
5168
|
var KAY_UI_APP_PACKAGE_PROTOCOL = "kay.ui.app-package.v1";
|
|
@@ -5041,6 +5317,7 @@ export {
|
|
|
5041
5317
|
ArtifactProvenanceSource,
|
|
5042
5318
|
ArtifactUriModuleContribution,
|
|
5043
5319
|
AuthAccountSelector,
|
|
5320
|
+
AuthGrantFrontDoor,
|
|
5044
5321
|
AuthGrantOperation,
|
|
5045
5322
|
AuthGrantRequest,
|
|
5046
5323
|
AuthSchemeReference,
|
|
@@ -5130,6 +5407,7 @@ export {
|
|
|
5130
5407
|
PluginConfigSectionManifest,
|
|
5131
5408
|
PluginContributionKind,
|
|
5132
5409
|
PluginEventDefinitionContribution,
|
|
5410
|
+
PluginExternalCliConnect,
|
|
5133
5411
|
PluginId,
|
|
5134
5412
|
PluginNamespace,
|
|
5135
5413
|
PluginNotificationRuleContribution,
|
|
@@ -5144,6 +5422,7 @@ export {
|
|
|
5144
5422
|
PluginToolName,
|
|
5145
5423
|
PluginWebSessionDeclaration,
|
|
5146
5424
|
PluginWebSessionProbe,
|
|
5425
|
+
RENAMED_PLUGIN_CAPABILITY_SLUGS,
|
|
5147
5426
|
RESERVED_DIRECTORY_PLUGIN_ID_PREFIXES,
|
|
5148
5427
|
RETIRED_COMPATIBILITY_KEYS,
|
|
5149
5428
|
RETIRED_PERMISSION_ASK_KEYS,
|
|
@@ -5241,6 +5520,7 @@ export {
|
|
|
5241
5520
|
dedupeClaims,
|
|
5242
5521
|
deriveDirectoryPluginToolName,
|
|
5243
5522
|
finalizeArtifactProvenanceEnvelope,
|
|
5523
|
+
findSkillSuggestionCitations,
|
|
5244
5524
|
hasClaim,
|
|
5245
5525
|
hostWithinDomain,
|
|
5246
5526
|
isCompatible,
|
|
@@ -5277,6 +5557,8 @@ export {
|
|
|
5277
5557
|
satisfiesSemverRange,
|
|
5278
5558
|
sessionHealthEntrySchema,
|
|
5279
5559
|
sessionHealthPWellDecile,
|
|
5560
|
+
skillSuggestionEvidenceItems,
|
|
5561
|
+
skillSuggestionEvidenceKey,
|
|
5280
5562
|
turnMessageOrigin,
|
|
5281
5563
|
turnPacket,
|
|
5282
5564
|
urlHostWithinDomain,
|
package/package.json
CHANGED