@yaklabs-ai/plugin-protocol 0.13.4 → 0.13.5
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 +202 -11
- package/dist/index.js +949 -712
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -263,6 +263,7 @@ export declare const ArtifactProvenanceCaptureContextSchema: z.ZodObject<{
|
|
|
263
263
|
"turn-settled": "turn-settled";
|
|
264
264
|
"phase-shift": "phase-shift";
|
|
265
265
|
"human-message": "human-message";
|
|
266
|
+
"assistant-message": "assistant-message";
|
|
266
267
|
"ui-action": "ui-action";
|
|
267
268
|
}>;
|
|
268
269
|
entryId: z.ZodString;
|
|
@@ -356,6 +357,7 @@ export declare const ArtifactProvenanceCaptureContextSchema: z.ZodObject<{
|
|
|
356
357
|
"turn-settled": "turn-settled";
|
|
357
358
|
"phase-shift": "phase-shift";
|
|
358
359
|
"human-message": "human-message";
|
|
360
|
+
"assistant-message": "assistant-message";
|
|
359
361
|
"ui-action": "ui-action";
|
|
360
362
|
}>;
|
|
361
363
|
entryId: z.ZodString;
|
|
@@ -453,6 +455,7 @@ export declare const ArtifactProvenanceCause: z.ZodDiscriminatedUnion<[z.ZodObje
|
|
|
453
455
|
"turn-settled": "turn-settled";
|
|
454
456
|
"phase-shift": "phase-shift";
|
|
455
457
|
"human-message": "human-message";
|
|
458
|
+
"assistant-message": "assistant-message";
|
|
456
459
|
"ui-action": "ui-action";
|
|
457
460
|
}>;
|
|
458
461
|
entryId: z.ZodString;
|
|
@@ -531,6 +534,7 @@ export declare const ArtifactProvenanceEnvelopeV1: z.ZodPipe<z.ZodUnknown, z.Zod
|
|
|
531
534
|
"turn-settled": "turn-settled";
|
|
532
535
|
"phase-shift": "phase-shift";
|
|
533
536
|
"human-message": "human-message";
|
|
537
|
+
"assistant-message": "assistant-message";
|
|
534
538
|
"ui-action": "ui-action";
|
|
535
539
|
}>;
|
|
536
540
|
entryId: z.ZodString;
|
|
@@ -623,6 +627,7 @@ export declare const ArtifactProvenanceEnvelopeV1: z.ZodPipe<z.ZodUnknown, z.Zod
|
|
|
623
627
|
"turn-settled": "turn-settled";
|
|
624
628
|
"phase-shift": "phase-shift";
|
|
625
629
|
"human-message": "human-message";
|
|
630
|
+
"assistant-message": "assistant-message";
|
|
626
631
|
"ui-action": "ui-action";
|
|
627
632
|
}>;
|
|
628
633
|
entryId: z.ZodString;
|
|
@@ -740,6 +745,7 @@ export declare const ArtifactProvenanceEnvelopeV1: z.ZodPipe<z.ZodUnknown, z.Zod
|
|
|
740
745
|
"turn-settled": "turn-settled";
|
|
741
746
|
"phase-shift": "phase-shift";
|
|
742
747
|
"human-message": "human-message";
|
|
748
|
+
"assistant-message": "assistant-message";
|
|
743
749
|
"ui-action": "ui-action";
|
|
744
750
|
}>;
|
|
745
751
|
entryId: z.ZodString;
|
|
@@ -912,6 +918,7 @@ export declare const ArtifactProvenanceMutation: z.ZodObject<{
|
|
|
912
918
|
"turn-settled": "turn-settled";
|
|
913
919
|
"phase-shift": "phase-shift";
|
|
914
920
|
"human-message": "human-message";
|
|
921
|
+
"assistant-message": "assistant-message";
|
|
915
922
|
"ui-action": "ui-action";
|
|
916
923
|
}>;
|
|
917
924
|
entryId: z.ZodString;
|
|
@@ -1008,6 +1015,7 @@ export declare const ArtifactProvenanceOperation: z.ZodObject<{
|
|
|
1008
1015
|
"turn-settled": "turn-settled";
|
|
1009
1016
|
"phase-shift": "phase-shift";
|
|
1010
1017
|
"human-message": "human-message";
|
|
1018
|
+
"assistant-message": "assistant-message";
|
|
1011
1019
|
"ui-action": "ui-action";
|
|
1012
1020
|
}>;
|
|
1013
1021
|
entryId: z.ZodString;
|
|
@@ -1149,6 +1157,7 @@ export declare const ArtifactProvenanceSession: z.ZodObject<{
|
|
|
1149
1157
|
"turn-settled": "turn-settled";
|
|
1150
1158
|
"phase-shift": "phase-shift";
|
|
1151
1159
|
"human-message": "human-message";
|
|
1160
|
+
"assistant-message": "assistant-message";
|
|
1152
1161
|
"ui-action": "ui-action";
|
|
1153
1162
|
}>;
|
|
1154
1163
|
entryId: z.ZodString;
|
|
@@ -1322,6 +1331,9 @@ export declare const AuthServiceReference: z.ZodString;
|
|
|
1322
1331
|
|
|
1323
1332
|
export declare type AuthServiceReference = z.infer<typeof AuthServiceReference>;
|
|
1324
1333
|
|
|
1334
|
+
/** Cap a plugin-controlled message at {@link PLUGIN_DIAGNOSTIC_MESSAGE_CAP} characters. */
|
|
1335
|
+
export declare function boundPluginDiagnosticMessage(message: string): string;
|
|
1336
|
+
|
|
1325
1337
|
/**
|
|
1326
1338
|
* {@link mintOperation} and {@link resolveSessionAncestry}, composed into one capture.
|
|
1327
1339
|
*
|
|
@@ -1368,7 +1380,7 @@ export declare function captureFailedContext(input: {
|
|
|
1368
1380
|
readonly detail: string;
|
|
1369
1381
|
}, clock?: CaptureClock): ArtifactProvenanceCaptureContext;
|
|
1370
1382
|
|
|
1371
|
-
export declare function checkKayPluginHostCompatibility(compatibility:
|
|
1383
|
+
export declare function checkKayPluginHostCompatibility(compatibility: DeclaredKayPluginCompatibility | undefined, host: KayPluginHostCompatibility): KayPluginCompatibilityReport;
|
|
1372
1384
|
|
|
1373
1385
|
/**
|
|
1374
1386
|
* The env var name a `cliBindings` contribution injects a resolved credential
|
|
@@ -1682,6 +1694,17 @@ export declare const CorpusResourceKind: z.ZodEnum<{
|
|
|
1682
1694
|
|
|
1683
1695
|
export declare type CorpusResourceKind = z.infer<typeof CorpusResourceKind>;
|
|
1684
1696
|
|
|
1697
|
+
/**
|
|
1698
|
+
* The `compatibility` block as the check reads it. Structural rather than the parsed
|
|
1699
|
+
* `PluginCompatibilityManifest`, so a host can judge the block of a manifest whose other fields
|
|
1700
|
+
* this build's strict schema would refuse (`judgeKayPluginDirectory` does, before the parse).
|
|
1701
|
+
*/
|
|
1702
|
+
export declare interface DeclaredKayPluginCompatibility {
|
|
1703
|
+
readonly supportedProtocols?: readonly string[] | undefined;
|
|
1704
|
+
readonly minKayVersion?: string | undefined;
|
|
1705
|
+
readonly sdk?: string | undefined;
|
|
1706
|
+
}
|
|
1707
|
+
|
|
1685
1708
|
/** Drop repeats under {@link sameClaim}, preserving first-seen order (a sort settles the rest). */
|
|
1686
1709
|
export declare function dedupeClaims(claims: readonly PluginCapabilityClaimV1[]): PluginCapabilityClaimV1[];
|
|
1687
1710
|
|
|
@@ -1952,6 +1975,26 @@ export declare type JsonValue = string | number | boolean | null | JsonValue[] |
|
|
|
1952
1975
|
|
|
1953
1976
|
export declare const JsonValue: z.ZodType<JsonValue>;
|
|
1954
1977
|
|
|
1978
|
+
/** Judge one plugin directory. Never throws for a bad plugin: every finding is a diagnostic. */
|
|
1979
|
+
export declare function judgeKayPluginDirectory(input: JudgeKayPluginDirectoryInput): Promise<KayPluginDirectoryVerdict>;
|
|
1980
|
+
|
|
1981
|
+
export declare interface JudgeKayPluginDirectoryInput {
|
|
1982
|
+
readonly tree: KayPluginTreeReader;
|
|
1983
|
+
/** The root the directory was found under, and the directory's name there: diagnostic provenance. */
|
|
1984
|
+
readonly root: string;
|
|
1985
|
+
readonly dir: string;
|
|
1986
|
+
/**
|
|
1987
|
+
* The host to judge `compatibility` against. `undefined` skips that step: a host that cannot
|
|
1988
|
+
* state its own version has no evidence a plugin is incompatible.
|
|
1989
|
+
*/
|
|
1990
|
+
readonly host: KayPluginHostCompatibility | undefined;
|
|
1991
|
+
/**
|
|
1992
|
+
* Set when the caller already knows this directory is a commit of a plugin, so a missing
|
|
1993
|
+
* manifest is a refusal naming that commit rather than "not a plugin".
|
|
1994
|
+
*/
|
|
1995
|
+
readonly revision?: string | undefined;
|
|
1996
|
+
}
|
|
1997
|
+
|
|
1955
1998
|
/** Maximum UTF-8 JSON size of one plugin app-data live change. */
|
|
1956
1999
|
export declare const KAY_APP_DATA_CHANGE_MAX_BYTES: number;
|
|
1957
2000
|
|
|
@@ -1973,7 +2016,13 @@ export declare const KAY_APP_DATA_SNAPSHOT_MAX_BYTES: number;
|
|
|
1973
2016
|
export declare const KAY_EVENT_PUBLISHER_ID: "kay";
|
|
1974
2017
|
|
|
1975
2018
|
/** Released SDK contracts still implemented by the host, alongside its current SDK. */
|
|
1976
|
-
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"];
|
|
2019
|
+
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"];
|
|
2020
|
+
|
|
2021
|
+
/** The file whose presence makes a directory a plugin. A directory without one is not a plugin. */
|
|
2022
|
+
export declare const KAY_PLUGIN_MANIFEST_FILENAME = "kay-plugin.json";
|
|
2023
|
+
|
|
2024
|
+
/** Manifest byte cap: a larger file is refused unread. */
|
|
2025
|
+
export declare const KAY_PLUGIN_MANIFEST_SIZE_CAP_BYTES: number;
|
|
1977
2026
|
|
|
1978
2027
|
export declare const KAY_PLUGIN_PROTOCOL_PACKAGE_NAME: "@bonsai/plugin-protocol";
|
|
1979
2028
|
|
|
@@ -2229,8 +2278,14 @@ export declare const KAY_PLUGIN_PROTOCOL_VERSION: "kay.plugin.v1";
|
|
|
2229
2278
|
* in one call, and such a plugin reads in bounded chunks (a file handle's `read`,
|
|
2230
2279
|
* `createReadStream`, `readLines`), which work on every 0.13 host. File calls sent to a host worker
|
|
2231
2280
|
* that fail are also logged to the daemon log as `runtime.user-files.*` events.
|
|
2281
|
+
*
|
|
2282
|
+
* 0.13.5 loads a `kay.agent` or `kay.app` entrypoint's default export when the manifest's
|
|
2283
|
+
* `entrypoint.export` names none, the way Pi writes extensions; a module with no default export
|
|
2284
|
+
* still loads from a named `activate`. No API changes. A plugin whose entrypoint has only a default
|
|
2285
|
+
* export declares `^0.13.5`, so an older host, which reads only `activate`, refuses it at load
|
|
2286
|
+
* instead of failing to find the export.
|
|
2232
2287
|
*/
|
|
2233
|
-
export declare const KAY_PLUGIN_SDK_VERSION: "0.13.
|
|
2288
|
+
export declare const KAY_PLUGIN_SDK_VERSION: "0.13.5";
|
|
2234
2289
|
|
|
2235
2290
|
export declare const KAY_PLUGIN_TARGET_NAMES: readonly ["kay.agent", "kay.app", "kay.ui"];
|
|
2236
2291
|
|
|
@@ -2354,6 +2409,7 @@ export declare const KayAgentTargetManifest: z.ZodObject<{
|
|
|
2354
2409
|
}, z.core.$strict>>>;
|
|
2355
2410
|
}, z.core.$strict>>;
|
|
2356
2411
|
primer: z.ZodOptional<z.ZodString>;
|
|
2412
|
+
onboarding: z.ZodOptional<z.ZodString>;
|
|
2357
2413
|
prompt: z.ZodOptional<z.ZodString>;
|
|
2358
2414
|
skillSources: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2359
2415
|
channel: z.ZodLiteral<"installer">;
|
|
@@ -2519,6 +2575,23 @@ export declare type KayAppTargetManifest = z.infer<typeof KayAppTargetManifest>;
|
|
|
2519
2575
|
|
|
2520
2576
|
declare type KayAppWhiteboardCapabilityOperation = Extract<WhiteboardCapabilityOperation, "discover" | "read">;
|
|
2521
2577
|
|
|
2578
|
+
/**
|
|
2579
|
+
* What is worth saying about a LOADING plugin's compatibility block (an undeclared SDK range, an
|
|
2580
|
+
* unmet `minKayVersion`), as `source-scan` diagnostics scoped to the root.
|
|
2581
|
+
*
|
|
2582
|
+
* Root-scoped on purpose: a diagnostic naming a `dir` renders as a plugin that failed to load,
|
|
2583
|
+
* and this plugin loaded. Without a `dir` the note rides its source's row as ordinary text.
|
|
2584
|
+
* Because nothing in it names the plugin's directory, a host that keeps only some of the plugins
|
|
2585
|
+
* it scanned must derive these for the plugins it keeps, after choosing them.
|
|
2586
|
+
*/
|
|
2587
|
+
export declare function kayPluginCompatibilityAdvisories(input: {
|
|
2588
|
+
readonly manifest: Pick<KayPluginManifestV1, "id" | "displayName" | "compatibility">;
|
|
2589
|
+
readonly host: KayPluginHostCompatibility;
|
|
2590
|
+
readonly root: string;
|
|
2591
|
+
/** A plugin that ships inside Bonsai; see `KayPluginHostCompatibility.bundled`. */
|
|
2592
|
+
readonly bundled?: boolean;
|
|
2593
|
+
}): readonly PluginLoadDiagnostic[];
|
|
2594
|
+
|
|
2522
2595
|
export declare type KayPluginCompatibilityAdvisoryCode = "sdk-range-undeclared" | "min-kay-version-unmet" | "min-kay-version-unparseable";
|
|
2523
2596
|
|
|
2524
2597
|
export declare interface KayPluginCompatibilityNote<TCode extends string> {
|
|
@@ -2545,6 +2618,25 @@ export declare class KayPluginContractResolutionError extends Error {
|
|
|
2545
2618
|
constructor(message: string);
|
|
2546
2619
|
}
|
|
2547
2620
|
|
|
2621
|
+
export declare type KayPluginDirectoryVerdict = {
|
|
2622
|
+
/** The plugin SDK version the compatibility step judged against; `undefined` when it was skipped. */
|
|
2623
|
+
readonly hostSdkVersion: string | undefined;
|
|
2624
|
+
} & ({
|
|
2625
|
+
readonly outcome: "not-a-plugin";
|
|
2626
|
+
} | {
|
|
2627
|
+
readonly outcome: "refused";
|
|
2628
|
+
readonly refusal: PluginLoadDiagnostic;
|
|
2629
|
+
/** Notes raised before the refusal; the author still meets them once it is fixed. */
|
|
2630
|
+
readonly warnings: readonly PluginLoadDiagnostic[];
|
|
2631
|
+
} | {
|
|
2632
|
+
readonly outcome: "loads";
|
|
2633
|
+
readonly manifest: KayPluginManifestV1;
|
|
2634
|
+
readonly contract: ResolvedPluginContractV1;
|
|
2635
|
+
readonly warnings: readonly PluginLoadDiagnostic[];
|
|
2636
|
+
/** See {@link kayPluginCompatibilityAdvisories}. */
|
|
2637
|
+
readonly advisories: readonly PluginLoadDiagnostic[];
|
|
2638
|
+
});
|
|
2639
|
+
|
|
2548
2640
|
/** The host facts a manifest's `compatibility` block is judged against. */
|
|
2549
2641
|
export declare interface KayPluginHostCompatibility {
|
|
2550
2642
|
/** The host's plugin protocol version, e.g. `KAY_PLUGIN_PROTOCOL_VERSION`. */
|
|
@@ -2568,6 +2660,9 @@ export declare interface KayPluginHostCompatibility {
|
|
|
2568
2660
|
readonly bundled?: boolean | undefined;
|
|
2569
2661
|
}
|
|
2570
2662
|
|
|
2663
|
+
/** The host facts of the build this package ships in, for a host whose app version is `appVersion`. */
|
|
2664
|
+
export declare function kayPluginHostCompatibility(appVersion: string): KayPluginHostCompatibility;
|
|
2665
|
+
|
|
2571
2666
|
export declare const KayPluginManifestV1: z.ZodObject<{
|
|
2572
2667
|
protocol: z.ZodLiteral<"kay.plugin.v1">;
|
|
2573
2668
|
id: z.ZodString;
|
|
@@ -2694,6 +2789,7 @@ export declare const KayPluginManifestV1: z.ZodObject<{
|
|
|
2694
2789
|
}, z.core.$strict>>>;
|
|
2695
2790
|
}, z.core.$strict>>;
|
|
2696
2791
|
primer: z.ZodOptional<z.ZodString>;
|
|
2792
|
+
onboarding: z.ZodOptional<z.ZodString>;
|
|
2697
2793
|
prompt: z.ZodOptional<z.ZodString>;
|
|
2698
2794
|
skillSources: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2699
2795
|
channel: z.ZodLiteral<"installer">;
|
|
@@ -2996,8 +3092,8 @@ export declare const KayPluginManifestV1: z.ZodObject<{
|
|
|
2996
3092
|
kind: z.ZodLiteral<"oauth2">;
|
|
2997
3093
|
exchange: z.ZodLiteral<"pkce">;
|
|
2998
3094
|
clientSuppliers: z.ZodArray<z.ZodEnum<{
|
|
2999
|
-
kay: "kay";
|
|
3000
3095
|
user: "user";
|
|
3096
|
+
kay: "kay";
|
|
3001
3097
|
}>>;
|
|
3002
3098
|
scopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
3003
3099
|
displayName: z.ZodOptional<z.ZodString>;
|
|
@@ -3366,6 +3462,31 @@ export declare const KayPluginProtocolVersion: z.ZodLiteral<"kay.plugin.v1">;
|
|
|
3366
3462
|
|
|
3367
3463
|
export declare type KayPluginProtocolVersion = z.infer<typeof KayPluginProtocolVersion>;
|
|
3368
3464
|
|
|
3465
|
+
/** What sits at a path in a plugin directory, without following a symlink at that path. */
|
|
3466
|
+
export declare interface KayPluginTreeEntry {
|
|
3467
|
+
readonly kind: "file" | "directory" | "other";
|
|
3468
|
+
readonly size: number;
|
|
3469
|
+
}
|
|
3470
|
+
|
|
3471
|
+
/**
|
|
3472
|
+
* Read access to one plugin directory. Every `path` is relative to the plugin directory: the
|
|
3473
|
+
* manifest's own filename, or a path as the manifest declares it.
|
|
3474
|
+
*/
|
|
3475
|
+
export declare interface KayPluginTreeReader {
|
|
3476
|
+
/** What is at `path`, or `undefined` when nothing is. Any other failure throws. */
|
|
3477
|
+
entry(path: string): Promise<KayPluginTreeEntry | undefined>;
|
|
3478
|
+
/** `path`'s contents as UTF-8. Throws when it cannot be read. */
|
|
3479
|
+
readText(path: string): Promise<string>;
|
|
3480
|
+
/** The plugin directory's real location (every symlink resolved), or `undefined` when unresolvable. */
|
|
3481
|
+
realDirectory(): Promise<string | undefined>;
|
|
3482
|
+
/**
|
|
3483
|
+
* Whether `path`, with every symlink followed, lands inside `realDirectory`. A path that does not
|
|
3484
|
+
* exist is judged by its nearest existing ancestor, so a missing `../x` is still outside. Never
|
|
3485
|
+
* throws: a path that cannot be resolved is outside.
|
|
3486
|
+
*/
|
|
3487
|
+
isInside(realDirectory: string, path: string): Promise<boolean>;
|
|
3488
|
+
}
|
|
3489
|
+
|
|
3369
3490
|
export declare const KayUiAppHostCapability: z.ZodEnum<{
|
|
3370
3491
|
"skills.read": "skills.read";
|
|
3371
3492
|
"automations.run": "automations.run";
|
|
@@ -3759,6 +3880,10 @@ export declare function parseSemver(value: string): ParsedSemver | undefined;
|
|
|
3759
3880
|
/** Every capability slug {@link PluginCapabilityClaimV1} can express, for exhaustive table checks. */
|
|
3760
3881
|
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", "jev.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", "whiteboard.discover", "whiteboard.read", "whiteboard.create", "whiteboard.update", "whiteboard.remove"];
|
|
3761
3882
|
|
|
3883
|
+
/** Diagnostic messages carry plugin-controlled text (parse errors, module errors); bound it so a
|
|
3884
|
+
* hostile or accidental multi-megabyte error can never blow up a log line or a render surface. */
|
|
3885
|
+
export declare const PLUGIN_DIAGNOSTIC_MESSAGE_CAP = 300;
|
|
3886
|
+
|
|
3762
3887
|
/** The root `<svg>` attribute a tile icon declares itself with. */
|
|
3763
3888
|
export declare const PLUGIN_ICON_SHAPE_ATTRIBUTE = "data-icon-shape";
|
|
3764
3889
|
|
|
@@ -3807,8 +3932,8 @@ export declare const PluginAuthManifest: z.ZodObject<{
|
|
|
3807
3932
|
kind: z.ZodLiteral<"oauth2">;
|
|
3808
3933
|
exchange: z.ZodLiteral<"pkce">;
|
|
3809
3934
|
clientSuppliers: z.ZodArray<z.ZodEnum<{
|
|
3810
|
-
kay: "kay";
|
|
3811
3935
|
user: "user";
|
|
3936
|
+
kay: "kay";
|
|
3812
3937
|
}>>;
|
|
3813
3938
|
scopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
3814
3939
|
displayName: z.ZodOptional<z.ZodString>;
|
|
@@ -3918,8 +4043,8 @@ export declare const PluginAuthScheme: z.ZodDiscriminatedUnion<[z.ZodDiscriminat
|
|
|
3918
4043
|
kind: z.ZodLiteral<"oauth2">;
|
|
3919
4044
|
exchange: z.ZodLiteral<"pkce">;
|
|
3920
4045
|
clientSuppliers: z.ZodArray<z.ZodEnum<{
|
|
3921
|
-
kay: "kay";
|
|
3922
4046
|
user: "user";
|
|
4047
|
+
kay: "kay";
|
|
3923
4048
|
}>>;
|
|
3924
4049
|
scopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
3925
4050
|
displayName: z.ZodOptional<z.ZodString>;
|
|
@@ -4009,8 +4134,8 @@ export declare const PluginAuthService: z.ZodObject<{
|
|
|
4009
4134
|
kind: z.ZodLiteral<"oauth2">;
|
|
4010
4135
|
exchange: z.ZodLiteral<"pkce">;
|
|
4011
4136
|
clientSuppliers: z.ZodArray<z.ZodEnum<{
|
|
4012
|
-
kay: "kay";
|
|
4013
4137
|
user: "user";
|
|
4138
|
+
kay: "kay";
|
|
4014
4139
|
}>>;
|
|
4015
4140
|
scopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
4016
4141
|
displayName: z.ZodOptional<z.ZodString>;
|
|
@@ -5169,6 +5294,61 @@ export declare const PluginId: z.ZodString;
|
|
|
5169
5294
|
|
|
5170
5295
|
export declare type PluginId = z.infer<typeof PluginId>;
|
|
5171
5296
|
|
|
5297
|
+
/**
|
|
5298
|
+
* Why a plugin, target, or contribution is not fully loaded. A closed discriminated union: adding a
|
|
5299
|
+
* failure mode means adding a `stage` member here, so no path can raise an unclassified diagnostic.
|
|
5300
|
+
* Stages run in order, earliest first: `source-scan`, `manifest-parse`, `contract-resolve`,
|
|
5301
|
+
* `target-load`, `cross-plugin`.
|
|
5302
|
+
*
|
|
5303
|
+
* Provenance is stage-dependent by construction. `source-scan`, `manifest-parse`, and
|
|
5304
|
+
* `contract-resolve` fire BEFORE a trustworthy plugin id exists, so they are located by
|
|
5305
|
+
* `{root, dir}` on disk (a `source-scan` failure of an unreadable ROOT has no `dir` yet). Once the
|
|
5306
|
+
* manifest's id is validated, `target-load` and `cross-plugin` carry the `pluginId` instead.
|
|
5307
|
+
*/
|
|
5308
|
+
export declare type PluginLoadDiagnostic = (PluginLoadDiagnosticMessage & {
|
|
5309
|
+
readonly stage: "source-scan";
|
|
5310
|
+
/** The scanned root. Always present — a scan failure is always attributable to its root. */
|
|
5311
|
+
readonly root: string;
|
|
5312
|
+
/** The offending immediate subdirectory, when the failure is dir-scoped (oversize, unreadable
|
|
5313
|
+
* dir); absent for root-scoped failures (unreadable root, scan timeout). */
|
|
5314
|
+
readonly dir?: string;
|
|
5315
|
+
}) | (PluginLoadDiagnosticMessage & {
|
|
5316
|
+
readonly stage: "manifest-parse";
|
|
5317
|
+
readonly root: string;
|
|
5318
|
+
readonly dir: string;
|
|
5319
|
+
}) | (PluginLoadDiagnosticMessage & {
|
|
5320
|
+
readonly stage: "contract-resolve";
|
|
5321
|
+
readonly root: string;
|
|
5322
|
+
readonly dir: string;
|
|
5323
|
+
}) | (PluginLoadDiagnosticMessage & {
|
|
5324
|
+
readonly stage: "target-load";
|
|
5325
|
+
readonly pluginId: string;
|
|
5326
|
+
/** Which target failed to load — the cell whose runtime status flips to `failed`. */
|
|
5327
|
+
readonly target: PluginTargetName;
|
|
5328
|
+
/**
|
|
5329
|
+
* Where the failing target came from, when the source knew it. The kay.agent/kay.app
|
|
5330
|
+
* preparation step has the registration in hand, so it can name both the plugin AND the
|
|
5331
|
+
* directory — which is what lets an item yield survive the registration being REPLACED by
|
|
5332
|
+
* this diagnostic (a first enable of a plugin that throws at import).
|
|
5333
|
+
*/
|
|
5334
|
+
readonly root?: string;
|
|
5335
|
+
readonly dir?: string;
|
|
5336
|
+
/** The unresolved SDK subpath, when the failure is a missing virtual-module subpath (contract
|
|
5337
|
+
* §"Module loading": name the subpath, never a bare `ERR_MODULE_NOT_FOUND`). */
|
|
5338
|
+
readonly subpath?: string;
|
|
5339
|
+
}) | (PluginLoadDiagnosticMessage & {
|
|
5340
|
+
readonly stage: "cross-plugin";
|
|
5341
|
+
readonly pluginId: string;
|
|
5342
|
+
});
|
|
5343
|
+
|
|
5344
|
+
/** The message payload every diagnostic carries regardless of stage. */
|
|
5345
|
+
declare interface PluginLoadDiagnosticMessage {
|
|
5346
|
+
/** A short, stable slug for the failure class (e.g. `"oversize-manifest"`, `"id-collision"`). */
|
|
5347
|
+
readonly code: string;
|
|
5348
|
+
/** Human-facing detail; length-bounded and escaped at its render surface, never trusted markup. */
|
|
5349
|
+
readonly message: string;
|
|
5350
|
+
}
|
|
5351
|
+
|
|
5172
5352
|
export declare const PluginNamespace: z.ZodString;
|
|
5173
5353
|
|
|
5174
5354
|
export declare type PluginNamespace = z.infer<typeof PluginNamespace>;
|
|
@@ -5211,8 +5391,8 @@ export declare type PluginNotificationRuleContribution = z.infer<typeof PluginNo
|
|
|
5211
5391
|
* literal values are re-declared here, not aliased; a herd↔protocol parity test pins them equal.
|
|
5212
5392
|
*/
|
|
5213
5393
|
export declare const PluginOAuthClientSupplier: z.ZodEnum<{
|
|
5214
|
-
kay: "kay";
|
|
5215
5394
|
user: "user";
|
|
5395
|
+
kay: "kay";
|
|
5216
5396
|
}>;
|
|
5217
5397
|
|
|
5218
5398
|
export declare type PluginOAuthClientSupplier = z.infer<typeof PluginOAuthClientSupplier>;
|
|
@@ -5799,6 +5979,15 @@ export declare const RegistrableDomain: z.ZodString;
|
|
|
5799
5979
|
|
|
5800
5980
|
export declare type RegistrableDomain = z.infer<typeof RegistrableDomain>;
|
|
5801
5981
|
|
|
5982
|
+
/**
|
|
5983
|
+
* Id namespaces a directory plugin may never claim. `herd.` is the kernel's first-party namespace
|
|
5984
|
+
* (`HERD_RESERVED_ID_PREFIX`: the kernel's extension loader throws on it without a first-party
|
|
5985
|
+
* opt-in) and `kay.` is the product's bundled and app-extension namespace. Refusing them here keeps
|
|
5986
|
+
* a reserved id from reaching either kernel throw, which would abort a whole extension batch and
|
|
5987
|
+
* drop every sibling plugin with it.
|
|
5988
|
+
*/
|
|
5989
|
+
export declare const RESERVED_DIRECTORY_PLUGIN_ID_PREFIXES: readonly ["herd.", "kay."];
|
|
5990
|
+
|
|
5802
5991
|
/**
|
|
5803
5992
|
* Resolves the runtime selection key for a provider-shaped contribution — the
|
|
5804
5993
|
* value an *adapter binding* names to make one implementation live.
|
|
@@ -6127,8 +6316,8 @@ export declare type ResolvedKayUiAppEndpointCapability = z.infer<typeof Resolved
|
|
|
6127
6316
|
export declare const ResolvedPluginAuthScheme: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
6128
6317
|
exchange: z.ZodLiteral<"pkce">;
|
|
6129
6318
|
clientSuppliers: z.ZodArray<z.ZodEnum<{
|
|
6130
|
-
kay: "kay";
|
|
6131
6319
|
user: "user";
|
|
6320
|
+
kay: "kay";
|
|
6132
6321
|
}>>;
|
|
6133
6322
|
localId: z.ZodString;
|
|
6134
6323
|
globalId: z.ZodString;
|
|
@@ -6234,8 +6423,8 @@ export declare const ResolvedPluginAuthService: z.ZodObject<{
|
|
|
6234
6423
|
schemes: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
6235
6424
|
exchange: z.ZodLiteral<"pkce">;
|
|
6236
6425
|
clientSuppliers: z.ZodArray<z.ZodEnum<{
|
|
6237
|
-
kay: "kay";
|
|
6238
6426
|
user: "user";
|
|
6427
|
+
kay: "kay";
|
|
6239
6428
|
}>>;
|
|
6240
6429
|
localId: z.ZodString;
|
|
6241
6430
|
globalId: z.ZodString;
|
|
@@ -6403,8 +6592,8 @@ export declare const ResolvedPluginContractV1: z.ZodObject<{
|
|
|
6403
6592
|
schemes: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
6404
6593
|
exchange: z.ZodLiteral<"pkce">;
|
|
6405
6594
|
clientSuppliers: z.ZodArray<z.ZodEnum<{
|
|
6406
|
-
kay: "kay";
|
|
6407
6595
|
user: "user";
|
|
6596
|
+
kay: "kay";
|
|
6408
6597
|
}>>;
|
|
6409
6598
|
localId: z.ZodString;
|
|
6410
6599
|
globalId: z.ZodString;
|
|
@@ -7713,6 +7902,7 @@ export declare const SessionCausedByEvent: z.ZodObject<{
|
|
|
7713
7902
|
"turn-settled": "turn-settled";
|
|
7714
7903
|
"phase-shift": "phase-shift";
|
|
7715
7904
|
"human-message": "human-message";
|
|
7905
|
+
"assistant-message": "assistant-message";
|
|
7716
7906
|
"ui-action": "ui-action";
|
|
7717
7907
|
}>;
|
|
7718
7908
|
entryId: z.ZodString;
|
|
@@ -7937,6 +8127,7 @@ export declare const SessionProvenanceRecord: z.ZodObject<{
|
|
|
7937
8127
|
"turn-settled": "turn-settled";
|
|
7938
8128
|
"phase-shift": "phase-shift";
|
|
7939
8129
|
"human-message": "human-message";
|
|
8130
|
+
"assistant-message": "assistant-message";
|
|
7940
8131
|
"ui-action": "ui-action";
|
|
7941
8132
|
}>;
|
|
7942
8133
|
entryId: z.ZodString;
|