@yaklabs-ai/plugin-protocol 0.55.10 → 0.55.11
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 +196 -2
- package/dist/index.js +105 -19
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -552,6 +552,9 @@ export declare const AppUriModuleContribution: z.ZodObject<{
|
|
|
552
552
|
|
|
553
553
|
export declare type AppUriModuleContribution = z.infer<typeof AppUriModuleContribution>;
|
|
554
554
|
|
|
555
|
+
/** The most chats one `outputs.folderMarks` request may name (SDK 0.55.11). */
|
|
556
|
+
export declare const ARTIFACT_OUTPUT_FOLDER_MARKS_MAX = 500;
|
|
557
|
+
|
|
555
558
|
export declare const ARTIFACT_OUTPUT_PAGE_MAX = 200;
|
|
556
559
|
|
|
557
560
|
export declare const ARTIFACT_PROVENANCE_VERSION: "kay.artifact-provenance.v1";
|
|
@@ -560,16 +563,116 @@ export declare const ArtifactGenerationId: z.core.$ZodBranded<z.ZodString, "Arti
|
|
|
560
563
|
|
|
561
564
|
export declare type ArtifactGenerationId = z.infer<typeof ArtifactGenerationId>;
|
|
562
565
|
|
|
566
|
+
/**
|
|
567
|
+
* A notice that output files changed. `{ uris }` names the files; since SDK 0.55.11 it may also
|
|
568
|
+
* carry `changes`, one per URI in `uris` and in the same order, saying what happened to each.
|
|
569
|
+
* `{ sessionId }` is the legacy chat-only notice from older adapters.
|
|
570
|
+
*/
|
|
563
571
|
export declare const ArtifactOutputChange: z.ZodUnion<readonly [z.ZodObject<{
|
|
564
572
|
uris: z.ZodArray<z.ZodString>;
|
|
573
|
+
changes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
574
|
+
uri: z.ZodString;
|
|
575
|
+
kind: z.ZodEnum<{
|
|
576
|
+
created: "created";
|
|
577
|
+
changed: "changed";
|
|
578
|
+
deleted: "deleted";
|
|
579
|
+
}>;
|
|
580
|
+
file: z.ZodOptional<z.ZodObject<{
|
|
581
|
+
sizeBytes: z.ZodNumber;
|
|
582
|
+
modifiedAtMs: z.ZodNumber;
|
|
583
|
+
title: z.ZodString;
|
|
584
|
+
mimeType: z.ZodOptional<z.ZodString>;
|
|
585
|
+
versionState: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
586
|
+
state: z.ZodLiteral<"draft">;
|
|
587
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
588
|
+
state: z.ZodEnum<{
|
|
589
|
+
clean: "clean";
|
|
590
|
+
edited: "edited";
|
|
591
|
+
}>;
|
|
592
|
+
committedVersion: z.ZodNumber;
|
|
593
|
+
}, z.core.$strict>], "state">>;
|
|
594
|
+
}, z.core.$strict>>;
|
|
595
|
+
metadataOnly: z.ZodOptional<z.ZodLiteral<true>>;
|
|
596
|
+
}, z.core.$strict>>>;
|
|
565
597
|
}, z.core.$strict>, z.ZodObject<{
|
|
566
598
|
sessionId: z.ZodString;
|
|
567
599
|
}, z.core.$strict>]>;
|
|
568
600
|
|
|
569
601
|
export declare type ArtifactOutputChange = z.infer<typeof ArtifactOutputChange>;
|
|
570
602
|
|
|
603
|
+
/**
|
|
604
|
+
* One file's change (SDK 0.55.11). `created` and `deleted` are exact. `changed` means the file
|
|
605
|
+
* exists and its facts are as given; the host says `created` only when it knows the file is new,
|
|
606
|
+
* so a consumer that has no record of a `changed` file treats it as added. `metadataOnly` marks a
|
|
607
|
+
* change of version state alone: the bytes did not change. A `deleted` change carries no facts;
|
|
608
|
+
* every other change does. There is no rename: a rename is a delete plus a create.
|
|
609
|
+
*/
|
|
610
|
+
export declare const ArtifactOutputFileChange: z.ZodObject<{
|
|
611
|
+
uri: z.ZodString;
|
|
612
|
+
kind: z.ZodEnum<{
|
|
613
|
+
created: "created";
|
|
614
|
+
changed: "changed";
|
|
615
|
+
deleted: "deleted";
|
|
616
|
+
}>;
|
|
617
|
+
file: z.ZodOptional<z.ZodObject<{
|
|
618
|
+
sizeBytes: z.ZodNumber;
|
|
619
|
+
modifiedAtMs: z.ZodNumber;
|
|
620
|
+
title: z.ZodString;
|
|
621
|
+
mimeType: z.ZodOptional<z.ZodString>;
|
|
622
|
+
versionState: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
623
|
+
state: z.ZodLiteral<"draft">;
|
|
624
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
625
|
+
state: z.ZodEnum<{
|
|
626
|
+
clean: "clean";
|
|
627
|
+
edited: "edited";
|
|
628
|
+
}>;
|
|
629
|
+
committedVersion: z.ZodNumber;
|
|
630
|
+
}, z.core.$strict>], "state">>;
|
|
631
|
+
}, z.core.$strict>>;
|
|
632
|
+
metadataOnly: z.ZodOptional<z.ZodLiteral<true>>;
|
|
633
|
+
}, z.core.$strict>;
|
|
634
|
+
|
|
635
|
+
export declare type ArtifactOutputFileChange = z.infer<typeof ArtifactOutputFileChange>;
|
|
636
|
+
|
|
637
|
+
/**
|
|
638
|
+
* What the host knows about one output file without reading its body (SDK 0.55.11): its size and
|
|
639
|
+
* modified time from one stat, its title (a Markdown file's first `# ` heading within its first
|
|
640
|
+
* 4 KB, else its name), its type from the name, and its committed-version state when the chat
|
|
641
|
+
* has a version history.
|
|
642
|
+
*/
|
|
643
|
+
export declare const ArtifactOutputFileFacts: z.ZodObject<{
|
|
644
|
+
sizeBytes: z.ZodNumber;
|
|
645
|
+
modifiedAtMs: z.ZodNumber;
|
|
646
|
+
title: z.ZodString;
|
|
647
|
+
mimeType: z.ZodOptional<z.ZodString>;
|
|
648
|
+
versionState: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
649
|
+
state: z.ZodLiteral<"draft">;
|
|
650
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
651
|
+
state: z.ZodEnum<{
|
|
652
|
+
clean: "clean";
|
|
653
|
+
edited: "edited";
|
|
654
|
+
}>;
|
|
655
|
+
committedVersion: z.ZodNumber;
|
|
656
|
+
}, z.core.$strict>], "state">>;
|
|
657
|
+
}, z.core.$strict>;
|
|
658
|
+
|
|
659
|
+
export declare type ArtifactOutputFileFacts = z.infer<typeof ArtifactOutputFileFacts>;
|
|
660
|
+
|
|
571
661
|
export declare const ArtifactOutputUri: z.ZodString;
|
|
572
662
|
|
|
663
|
+
/** A file's committed-version label, as the host's listing reports it. */
|
|
664
|
+
export declare const ArtifactOutputVersionState: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
665
|
+
state: z.ZodLiteral<"draft">;
|
|
666
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
667
|
+
state: z.ZodEnum<{
|
|
668
|
+
clean: "clean";
|
|
669
|
+
edited: "edited";
|
|
670
|
+
}>;
|
|
671
|
+
committedVersion: z.ZodNumber;
|
|
672
|
+
}, z.core.$strict>], "state">;
|
|
673
|
+
|
|
674
|
+
export declare type ArtifactOutputVersionState = z.infer<typeof ArtifactOutputVersionState>;
|
|
675
|
+
|
|
573
676
|
export declare const ArtifactProvenanceActor: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
574
677
|
kind: z.ZodLiteral<"session">;
|
|
575
678
|
sessionId: z.ZodString;
|
|
@@ -3021,6 +3124,7 @@ declare const canonicalContributionSchemas: {
|
|
|
3021
3124
|
localId: z.ZodString;
|
|
3022
3125
|
slot: z.ZodString;
|
|
3023
3126
|
title: z.ZodOptional<z.ZodString>;
|
|
3127
|
+
app: z.ZodOptional<z.ZodString>;
|
|
3024
3128
|
}, z.core.$strict>;
|
|
3025
3129
|
ReferenceOpenBehavior: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
3026
3130
|
kind: z.ZodLiteral<"working-document">;
|
|
@@ -3282,6 +3386,7 @@ declare const canonicalContributionSchemas: {
|
|
|
3282
3386
|
"artifacts.preview": "artifacts.preview";
|
|
3283
3387
|
"markdown.document-view": "markdown.document-view";
|
|
3284
3388
|
"references.open": "references.open";
|
|
3389
|
+
"files.choose-folder": "files.choose-folder";
|
|
3285
3390
|
"billing.read": "billing.read";
|
|
3286
3391
|
"account.read": "account.read";
|
|
3287
3392
|
"plugins.read": "plugins.read";
|
|
@@ -3320,6 +3425,7 @@ declare const canonicalContributionSchemas: {
|
|
|
3320
3425
|
"artifacts.preview": "artifacts.preview";
|
|
3321
3426
|
"markdown.document-view": "markdown.document-view";
|
|
3322
3427
|
"references.open": "references.open";
|
|
3428
|
+
"files.choose-folder": "files.choose-folder";
|
|
3323
3429
|
"billing.read": "billing.read";
|
|
3324
3430
|
"account.read": "account.read";
|
|
3325
3431
|
"plugins.read": "plugins.read";
|
|
@@ -3356,6 +3462,13 @@ declare const canonicalContributionSchemas: {
|
|
|
3356
3462
|
localId: z.ZodString;
|
|
3357
3463
|
}, z.core.$strict>]>;
|
|
3358
3464
|
where: z.ZodOptional<z.ZodString>;
|
|
3465
|
+
also: z.ZodOptional<z.ZodObject<{
|
|
3466
|
+
source: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
3467
|
+
pluginId: z.ZodString;
|
|
3468
|
+
localId: z.ZodString;
|
|
3469
|
+
}, z.core.$strict>]>;
|
|
3470
|
+
where: z.ZodOptional<z.ZodString>;
|
|
3471
|
+
}, z.core.$strict>>;
|
|
3359
3472
|
label: z.ZodObject<{
|
|
3360
3473
|
one: z.ZodOptional<z.ZodString>;
|
|
3361
3474
|
other: z.ZodString;
|
|
@@ -3426,6 +3539,7 @@ declare const canonicalContributionSchemas: {
|
|
|
3426
3539
|
"artifacts.preview": "artifacts.preview";
|
|
3427
3540
|
"markdown.document-view": "markdown.document-view";
|
|
3428
3541
|
"references.open": "references.open";
|
|
3542
|
+
"files.choose-folder": "files.choose-folder";
|
|
3429
3543
|
"billing.read": "billing.read";
|
|
3430
3544
|
"account.read": "account.read";
|
|
3431
3545
|
"plugins.read": "plugins.read";
|
|
@@ -3481,6 +3595,7 @@ declare const canonicalContributionSchemas: {
|
|
|
3481
3595
|
"artifacts.preview": "artifacts.preview";
|
|
3482
3596
|
"markdown.document-view": "markdown.document-view";
|
|
3483
3597
|
"references.open": "references.open";
|
|
3598
|
+
"files.choose-folder": "files.choose-folder";
|
|
3484
3599
|
"billing.read": "billing.read";
|
|
3485
3600
|
"account.read": "account.read";
|
|
3486
3601
|
"plugins.read": "plugins.read";
|
|
@@ -5004,8 +5119,17 @@ export declare const KAY_PLUGIN_PROTOCOL_VERSION: "kay.plugin.v1";
|
|
|
5004
5119
|
* compacts with). A plugin preparing a reset text reads them to spend nothing on a session whose
|
|
5005
5120
|
* reset would not read it (compaction plan, phase 2, #16713). Additive; a plugin reading them
|
|
5006
5121
|
* declares ^0.55.10.
|
|
5122
|
+
*
|
|
5123
|
+
* 0.55.11 widens `app.artifacts.outputs()` for the Files table (#15965). A `{ uris }` change may
|
|
5124
|
+
* carry `changes`: for each file, `created`, `changed` or `deleted`, with its size, modified
|
|
5125
|
+
* time, title, type and committed-version state (`ArtifactOutputFileFacts`). `enumerate` takes
|
|
5126
|
+
* `facts` and then returns the same facts per item (and an `excluded` count of names the output
|
|
5127
|
+
* identity cannot carry), the new optional `folderMarks()` answers each chat's outputs-folder
|
|
5128
|
+
* modified time, and the new optional `chatsWithOutputs()` lists every chat with an outputs folder
|
|
5129
|
+
* from one scan. The `{ uris }` and `{ sessionId }` shapes stay valid. Additive; a plugin reading
|
|
5130
|
+
* the new fields declares ^0.55.11.
|
|
5007
5131
|
*/
|
|
5008
|
-
export declare const KAY_PLUGIN_SDK_VERSION: "0.55.
|
|
5132
|
+
export declare const KAY_PLUGIN_SDK_VERSION: "0.55.11";
|
|
5009
5133
|
|
|
5010
5134
|
export declare const KAY_PLUGIN_TARGET_NAMES: readonly ["kay.agent", "kay.app", "kay.ui"];
|
|
5011
5135
|
|
|
@@ -6879,6 +7003,7 @@ export declare const KayPluginManifestV1: z.ZodObject<{
|
|
|
6879
7003
|
localId: z.ZodString;
|
|
6880
7004
|
slot: z.ZodString;
|
|
6881
7005
|
title: z.ZodOptional<z.ZodString>;
|
|
7006
|
+
app: z.ZodOptional<z.ZodString>;
|
|
6882
7007
|
}, z.core.$strict>>>;
|
|
6883
7008
|
referencePresentations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
6884
7009
|
localId: z.ZodString;
|
|
@@ -7037,6 +7162,7 @@ export declare const KayPluginManifestV1: z.ZodObject<{
|
|
|
7037
7162
|
"artifacts.preview": "artifacts.preview";
|
|
7038
7163
|
"markdown.document-view": "markdown.document-view";
|
|
7039
7164
|
"references.open": "references.open";
|
|
7165
|
+
"files.choose-folder": "files.choose-folder";
|
|
7040
7166
|
"billing.read": "billing.read";
|
|
7041
7167
|
"account.read": "account.read";
|
|
7042
7168
|
"plugins.read": "plugins.read";
|
|
@@ -7092,6 +7218,7 @@ export declare const KayPluginManifestV1: z.ZodObject<{
|
|
|
7092
7218
|
"artifacts.preview": "artifacts.preview";
|
|
7093
7219
|
"markdown.document-view": "markdown.document-view";
|
|
7094
7220
|
"references.open": "references.open";
|
|
7221
|
+
"files.choose-folder": "files.choose-folder";
|
|
7095
7222
|
"billing.read": "billing.read";
|
|
7096
7223
|
"account.read": "account.read";
|
|
7097
7224
|
"plugins.read": "plugins.read";
|
|
@@ -7129,6 +7256,13 @@ export declare const KayPluginManifestV1: z.ZodObject<{
|
|
|
7129
7256
|
localId: z.ZodString;
|
|
7130
7257
|
}, z.core.$strict>]>;
|
|
7131
7258
|
where: z.ZodOptional<z.ZodString>;
|
|
7259
|
+
also: z.ZodOptional<z.ZodObject<{
|
|
7260
|
+
source: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
7261
|
+
pluginId: z.ZodString;
|
|
7262
|
+
localId: z.ZodString;
|
|
7263
|
+
}, z.core.$strict>]>;
|
|
7264
|
+
where: z.ZodOptional<z.ZodString>;
|
|
7265
|
+
}, z.core.$strict>>;
|
|
7132
7266
|
label: z.ZodObject<{
|
|
7133
7267
|
one: z.ZodOptional<z.ZodString>;
|
|
7134
7268
|
other: z.ZodString;
|
|
@@ -8118,6 +8252,7 @@ export declare const KayUiAppHostCapability: z.ZodEnum<{
|
|
|
8118
8252
|
"artifacts.preview": "artifacts.preview";
|
|
8119
8253
|
"markdown.document-view": "markdown.document-view";
|
|
8120
8254
|
"references.open": "references.open";
|
|
8255
|
+
"files.choose-folder": "files.choose-folder";
|
|
8121
8256
|
"billing.read": "billing.read";
|
|
8122
8257
|
"account.read": "account.read";
|
|
8123
8258
|
"plugins.read": "plugins.read";
|
|
@@ -8253,6 +8388,7 @@ export declare const KayUiTargetManifest: z.ZodObject<{
|
|
|
8253
8388
|
localId: z.ZodString;
|
|
8254
8389
|
slot: z.ZodString;
|
|
8255
8390
|
title: z.ZodOptional<z.ZodString>;
|
|
8391
|
+
app: z.ZodOptional<z.ZodString>;
|
|
8256
8392
|
}, z.core.$strict>>>;
|
|
8257
8393
|
referencePresentations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
8258
8394
|
localId: z.ZodString;
|
|
@@ -8411,6 +8547,7 @@ export declare const KayUiTargetManifest: z.ZodObject<{
|
|
|
8411
8547
|
"artifacts.preview": "artifacts.preview";
|
|
8412
8548
|
"markdown.document-view": "markdown.document-view";
|
|
8413
8549
|
"references.open": "references.open";
|
|
8550
|
+
"files.choose-folder": "files.choose-folder";
|
|
8414
8551
|
"billing.read": "billing.read";
|
|
8415
8552
|
"account.read": "account.read";
|
|
8416
8553
|
"plugins.read": "plugins.read";
|
|
@@ -8466,6 +8603,7 @@ export declare const KayUiTargetManifest: z.ZodObject<{
|
|
|
8466
8603
|
"artifacts.preview": "artifacts.preview";
|
|
8467
8604
|
"markdown.document-view": "markdown.document-view";
|
|
8468
8605
|
"references.open": "references.open";
|
|
8606
|
+
"files.choose-folder": "files.choose-folder";
|
|
8469
8607
|
"billing.read": "billing.read";
|
|
8470
8608
|
"account.read": "account.read";
|
|
8471
8609
|
"plugins.read": "plugins.read";
|
|
@@ -8503,6 +8641,13 @@ export declare const KayUiTargetManifest: z.ZodObject<{
|
|
|
8503
8641
|
localId: z.ZodString;
|
|
8504
8642
|
}, z.core.$strict>]>;
|
|
8505
8643
|
where: z.ZodOptional<z.ZodString>;
|
|
8644
|
+
also: z.ZodOptional<z.ZodObject<{
|
|
8645
|
+
source: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
8646
|
+
pluginId: z.ZodString;
|
|
8647
|
+
localId: z.ZodString;
|
|
8648
|
+
}, z.core.$strict>]>;
|
|
8649
|
+
where: z.ZodOptional<z.ZodString>;
|
|
8650
|
+
}, z.core.$strict>>;
|
|
8506
8651
|
label: z.ZodObject<{
|
|
8507
8652
|
one: z.ZodOptional<z.ZodString>;
|
|
8508
8653
|
other: z.ZodString;
|
|
@@ -8835,7 +8980,7 @@ export declare function parseSemver(value: string): ParsedSemver | undefined;
|
|
|
8835
8980
|
export declare function parseWhere(source: string, keyTypes?: WhereKeyTypes): WhereParseResult;
|
|
8836
8981
|
|
|
8837
8982
|
/** Every capability slug {@link PluginCapabilityClaimV1} can express, for exhaustive table checks. */
|
|
8838
|
-
export declare const PLUGIN_CAPABILITY_SLUGS: readonly ["sessions.run", "network.connect", "web-session.request", "web-session.download", "process.spawn", "sessions.read", "signals.read", "uri.call", "endpoints.invoke", "skills.read", "skills.write", "skills.share", "plugins.set-enabled", "plugins.read", "sessions.assign-project", "artifacts.resolve-file", "process.run", "sessions.annotate", "sessions.compact", "sessions.state", "compaction.reset-text", "soul.write", "tools.describe", "workspace.command", "sessions.create", "sessions.update", "models.complete", "systemOne.use", "automations.write", "automations.run", "workflows.define", "workflows.signals", "session-events.subscribe", "agents.run", "dynamic-context.register", "app-data.register", "app-data.read", "knowledge-source.register", "artifacts.read", "session-artifacts.read", "session-artifacts.create", "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", "family-folder.root", "whiteboard.discover", "whiteboard.read", "whiteboard.create", "whiteboard.update", "whiteboard.remove", "model-selection.register", "system-prompt.register"];
|
|
8983
|
+
export declare const PLUGIN_CAPABILITY_SLUGS: readonly ["sessions.run", "network.connect", "web-session.request", "web-session.download", "process.spawn", "sessions.read", "signals.read", "uri.call", "endpoints.invoke", "skills.read", "skills.write", "skills.share", "plugins.set-enabled", "plugins.read", "sessions.assign-project", "artifacts.resolve-file", "process.run", "sessions.annotate", "sessions.compact", "sessions.state", "compaction.reset-text", "soul.write", "tools.describe", "workspace.command", "sessions.create", "sessions.update", "models.complete", "systemOne.use", "automations.write", "automations.run", "workflows.define", "workflows.signals", "session-events.subscribe", "agents.run", "dynamic-context.register", "app-data.register", "app-data.read", "knowledge-source.register", "artifacts.read", "session-artifacts.read", "session-artifacts.create", "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", "family-folder.root", "messages.send", "whiteboard.discover", "whiteboard.read", "whiteboard.create", "whiteboard.update", "whiteboard.remove", "model-selection.register", "system-prompt.register"];
|
|
8839
8984
|
|
|
8840
8985
|
/** Diagnostic messages carry plugin-controlled text (parse errors, module errors); bound it so a
|
|
8841
8986
|
* hostile or accidental multi-megabyte error can never blow up a log line or a render surface. */
|
|
@@ -9612,6 +9757,12 @@ export declare const PluginCapabilityClaimInputV1: z.ZodCustom<{
|
|
|
9612
9757
|
target: "kay.app";
|
|
9613
9758
|
slug: "workspace.command";
|
|
9614
9759
|
envelope: Record<string, never>;
|
|
9760
|
+
} | {
|
|
9761
|
+
target: "kay.app";
|
|
9762
|
+
slug: "messages.send";
|
|
9763
|
+
envelope: {
|
|
9764
|
+
provider: string;
|
|
9765
|
+
};
|
|
9615
9766
|
} | {
|
|
9616
9767
|
target: "kay.app";
|
|
9617
9768
|
slug: "sessions.create";
|
|
@@ -9914,6 +10065,12 @@ export declare const PluginCapabilityClaimInputV1: z.ZodCustom<{
|
|
|
9914
10065
|
target: "kay.app";
|
|
9915
10066
|
slug: "workspace.command";
|
|
9916
10067
|
envelope: Record<string, never>;
|
|
10068
|
+
} | {
|
|
10069
|
+
target: "kay.app";
|
|
10070
|
+
slug: "messages.send";
|
|
10071
|
+
envelope: {
|
|
10072
|
+
provider: string;
|
|
10073
|
+
};
|
|
9917
10074
|
} | {
|
|
9918
10075
|
target: "kay.app";
|
|
9919
10076
|
slug: "sessions.create";
|
|
@@ -10226,6 +10383,12 @@ export declare const PluginCapabilityClaimV1: z.ZodDiscriminatedUnion<[z.ZodObje
|
|
|
10226
10383
|
target: z.ZodLiteral<"kay.app">;
|
|
10227
10384
|
slug: z.ZodLiteral<"workspace.command">;
|
|
10228
10385
|
envelope: z.ZodObject<{}, z.core.$strict>;
|
|
10386
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
10387
|
+
target: z.ZodLiteral<"kay.app">;
|
|
10388
|
+
slug: z.ZodLiteral<"messages.send">;
|
|
10389
|
+
envelope: z.ZodObject<{
|
|
10390
|
+
provider: z.ZodString;
|
|
10391
|
+
}, z.core.$strict>;
|
|
10229
10392
|
}, z.core.$strict>, z.ZodObject<{
|
|
10230
10393
|
target: z.ZodLiteral<"kay.app">;
|
|
10231
10394
|
slug: z.ZodLiteral<"sessions.create">;
|
|
@@ -10584,6 +10747,12 @@ export declare const PluginCapabilityDecisionV1: z.ZodDiscriminatedUnion<[z.ZodO
|
|
|
10584
10747
|
target: z.ZodLiteral<"kay.app">;
|
|
10585
10748
|
slug: z.ZodLiteral<"workspace.command">;
|
|
10586
10749
|
envelope: z.ZodObject<{}, z.core.$strict>;
|
|
10750
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
10751
|
+
target: z.ZodLiteral<"kay.app">;
|
|
10752
|
+
slug: z.ZodLiteral<"messages.send">;
|
|
10753
|
+
envelope: z.ZodObject<{
|
|
10754
|
+
provider: z.ZodString;
|
|
10755
|
+
}, z.core.$strict>;
|
|
10587
10756
|
}, z.core.$strict>, z.ZodObject<{
|
|
10588
10757
|
target: z.ZodLiteral<"kay.app">;
|
|
10589
10758
|
slug: z.ZodLiteral<"sessions.create">;
|
|
@@ -10941,6 +11110,12 @@ export declare const PluginCapabilityDecisionV1: z.ZodDiscriminatedUnion<[z.ZodO
|
|
|
10941
11110
|
target: z.ZodLiteral<"kay.app">;
|
|
10942
11111
|
slug: z.ZodLiteral<"workspace.command">;
|
|
10943
11112
|
envelope: z.ZodObject<{}, z.core.$strict>;
|
|
11113
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
11114
|
+
target: z.ZodLiteral<"kay.app">;
|
|
11115
|
+
slug: z.ZodLiteral<"messages.send">;
|
|
11116
|
+
envelope: z.ZodObject<{
|
|
11117
|
+
provider: z.ZodString;
|
|
11118
|
+
}, z.core.$strict>;
|
|
10944
11119
|
}, z.core.$strict>, z.ZodObject<{
|
|
10945
11120
|
target: z.ZodLiteral<"kay.app">;
|
|
10946
11121
|
slug: z.ZodLiteral<"sessions.create">;
|
|
@@ -11332,6 +11507,12 @@ export declare const PluginCapabilityRefusalV1: z.ZodObject<{
|
|
|
11332
11507
|
target: z.ZodLiteral<"kay.app">;
|
|
11333
11508
|
slug: z.ZodLiteral<"workspace.command">;
|
|
11334
11509
|
envelope: z.ZodObject<{}, z.core.$strict>;
|
|
11510
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
11511
|
+
target: z.ZodLiteral<"kay.app">;
|
|
11512
|
+
slug: z.ZodLiteral<"messages.send">;
|
|
11513
|
+
envelope: z.ZodObject<{
|
|
11514
|
+
provider: z.ZodString;
|
|
11515
|
+
}, z.core.$strict>;
|
|
11335
11516
|
}, z.core.$strict>, z.ZodObject<{
|
|
11336
11517
|
target: z.ZodLiteral<"kay.app">;
|
|
11337
11518
|
slug: z.ZodLiteral<"sessions.create">;
|
|
@@ -13984,6 +14165,7 @@ export declare const ResolvedKayUiApp: z.ZodObject<{
|
|
|
13984
14165
|
"artifacts.preview": "artifacts.preview";
|
|
13985
14166
|
"markdown.document-view": "markdown.document-view";
|
|
13986
14167
|
"references.open": "references.open";
|
|
14168
|
+
"files.choose-folder": "files.choose-folder";
|
|
13987
14169
|
"billing.read": "billing.read";
|
|
13988
14170
|
"account.read": "account.read";
|
|
13989
14171
|
"plugins.read": "plugins.read";
|
|
@@ -15908,6 +16090,7 @@ export declare const ResolvedPluginContractV1: z.ZodObject<{
|
|
|
15908
16090
|
"artifacts.preview": "artifacts.preview";
|
|
15909
16091
|
"markdown.document-view": "markdown.document-view";
|
|
15910
16092
|
"references.open": "references.open";
|
|
16093
|
+
"files.choose-folder": "files.choose-folder";
|
|
15911
16094
|
"billing.read": "billing.read";
|
|
15912
16095
|
"account.read": "account.read";
|
|
15913
16096
|
"plugins.read": "plugins.read";
|
|
@@ -17814,6 +17997,7 @@ export declare const UiAppCapabilities: z.ZodObject<{
|
|
|
17814
17997
|
"artifacts.preview": "artifacts.preview";
|
|
17815
17998
|
"markdown.document-view": "markdown.document-view";
|
|
17816
17999
|
"references.open": "references.open";
|
|
18000
|
+
"files.choose-folder": "files.choose-folder";
|
|
17817
18001
|
"billing.read": "billing.read";
|
|
17818
18002
|
"account.read": "account.read";
|
|
17819
18003
|
"plugins.read": "plugins.read";
|
|
@@ -17879,6 +18063,7 @@ export declare const UiAppContribution: z.ZodObject<{
|
|
|
17879
18063
|
"artifacts.preview": "artifacts.preview";
|
|
17880
18064
|
"markdown.document-view": "markdown.document-view";
|
|
17881
18065
|
"references.open": "references.open";
|
|
18066
|
+
"files.choose-folder": "files.choose-folder";
|
|
17882
18067
|
"billing.read": "billing.read";
|
|
17883
18068
|
"account.read": "account.read";
|
|
17884
18069
|
"plugins.read": "plugins.read";
|
|
@@ -17934,6 +18119,7 @@ export declare const UiAppContribution: z.ZodObject<{
|
|
|
17934
18119
|
"artifacts.preview": "artifacts.preview";
|
|
17935
18120
|
"markdown.document-view": "markdown.document-view";
|
|
17936
18121
|
"references.open": "references.open";
|
|
18122
|
+
"files.choose-folder": "files.choose-folder";
|
|
17937
18123
|
"billing.read": "billing.read";
|
|
17938
18124
|
"account.read": "account.read";
|
|
17939
18125
|
"plugins.read": "plugins.read";
|
|
@@ -18046,6 +18232,13 @@ export declare const UiRailEntryContribution: z.ZodObject<{
|
|
|
18046
18232
|
localId: z.ZodString;
|
|
18047
18233
|
}, z.core.$strict>]>;
|
|
18048
18234
|
where: z.ZodOptional<z.ZodString>;
|
|
18235
|
+
also: z.ZodOptional<z.ZodObject<{
|
|
18236
|
+
source: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
18237
|
+
pluginId: z.ZodString;
|
|
18238
|
+
localId: z.ZodString;
|
|
18239
|
+
}, z.core.$strict>]>;
|
|
18240
|
+
where: z.ZodOptional<z.ZodString>;
|
|
18241
|
+
}, z.core.$strict>>;
|
|
18049
18242
|
label: z.ZodObject<{
|
|
18050
18243
|
one: z.ZodOptional<z.ZodString>;
|
|
18051
18244
|
other: z.ZodString;
|
|
@@ -18066,6 +18259,7 @@ export declare const UiSlotContribution: z.ZodObject<{
|
|
|
18066
18259
|
localId: z.ZodString;
|
|
18067
18260
|
slot: z.ZodString;
|
|
18068
18261
|
title: z.ZodOptional<z.ZodString>;
|
|
18262
|
+
app: z.ZodOptional<z.ZodString>;
|
|
18069
18263
|
}, z.core.$strict>;
|
|
18070
18264
|
|
|
18071
18265
|
export declare type UiSlotContribution = z.infer<typeof UiSlotContribution>;
|
package/dist/index.js
CHANGED
|
@@ -260,8 +260,9 @@ var JsonSchema = z4.record(z4.string(), JsonValue);
|
|
|
260
260
|
var KAY_PLUGIN_MANIFEST_SIZE_CAP_BYTES = 1024 * 1024;
|
|
261
261
|
var KAY_PLUGIN_PROTOCOL_VERSION = "kay.plugin.v1";
|
|
262
262
|
var KAY_PLUGIN_PROTOCOL_PACKAGE_NAME = "@bonsai/plugin-protocol";
|
|
263
|
-
var KAY_PLUGIN_SDK_VERSION = "0.55.
|
|
263
|
+
var KAY_PLUGIN_SDK_VERSION = "0.55.11";
|
|
264
264
|
var KAY_PLUGIN_COMPATIBLE_SDK_VERSIONS = [
|
|
265
|
+
"0.55.10",
|
|
265
266
|
"0.55.9",
|
|
266
267
|
"0.55.8",
|
|
267
268
|
"0.55.7",
|
|
@@ -1856,6 +1857,7 @@ var PLUGIN_CAPABILITY_SLUGS = [
|
|
|
1856
1857
|
"prompt.resident",
|
|
1857
1858
|
"skills.declared-source",
|
|
1858
1859
|
"family-folder.root",
|
|
1860
|
+
"messages.send",
|
|
1859
1861
|
"whiteboard.discover",
|
|
1860
1862
|
"whiteboard.read",
|
|
1861
1863
|
"whiteboard.create",
|
|
@@ -2109,6 +2111,14 @@ function createAuthoritySchemas(canonical) {
|
|
|
2109
2111
|
slug: z11.literal("workspace.command"),
|
|
2110
2112
|
envelope: z11.strictObject({})
|
|
2111
2113
|
}),
|
|
2114
|
+
z11.strictObject({
|
|
2115
|
+
// Prepare and send replies through one provider (`app.messages`). Preparing reads who a
|
|
2116
|
+
// message's reply goes to, so it needs this claim too; sending also needs the person's
|
|
2117
|
+
// command on the plugin's own page.
|
|
2118
|
+
target: z11.literal("kay.app"),
|
|
2119
|
+
slug: z11.literal("messages.send"),
|
|
2120
|
+
envelope: z11.strictObject({ provider: NonEmptyString3.max(100) })
|
|
2121
|
+
}),
|
|
2112
2122
|
z11.strictObject({
|
|
2113
2123
|
target: z11.literal("kay.app"),
|
|
2114
2124
|
slug: z11.literal("sessions.create"),
|
|
@@ -2431,6 +2441,8 @@ function sameClaim(a, b) {
|
|
|
2431
2441
|
return true;
|
|
2432
2442
|
case "uri.call":
|
|
2433
2443
|
return b.slug === "uri.call" && a.envelope.scheme === b.envelope.scheme && a.envelope.verb === b.envelope.verb;
|
|
2444
|
+
case "messages.send":
|
|
2445
|
+
return b.slug === "messages.send" && a.envelope.provider === b.envelope.provider;
|
|
2434
2446
|
case "endpoints.invoke":
|
|
2435
2447
|
return b.slug === "endpoints.invoke" && a.envelope.pluginId === b.envelope.pluginId && a.envelope.endpointId === b.envelope.endpointId;
|
|
2436
2448
|
case "network.connect":
|
|
@@ -2532,6 +2544,8 @@ function envelopePairs(a, b) {
|
|
|
2532
2544
|
[a.envelope.scheme, b.envelope.scheme],
|
|
2533
2545
|
[a.envelope.verb, b.envelope.verb]
|
|
2534
2546
|
] : [];
|
|
2547
|
+
case "messages.send":
|
|
2548
|
+
return b.slug === "messages.send" ? [[a.envelope.provider, b.envelope.provider]] : [];
|
|
2535
2549
|
case "endpoints.invoke":
|
|
2536
2550
|
return b.slug === "endpoints.invoke" ? [
|
|
2537
2551
|
[a.envelope.pluginId, b.envelope.pluginId],
|
|
@@ -4339,7 +4353,12 @@ function createContributionsSchemas(canonical) {
|
|
|
4339
4353
|
const UiSlotContribution2 = z14.strictObject({
|
|
4340
4354
|
localId: LocalContributionId2,
|
|
4341
4355
|
slot: NonEmptyString3,
|
|
4342
|
-
title: NonEmptyString3.optional()
|
|
4356
|
+
title: NonEmptyString3.optional(),
|
|
4357
|
+
/**
|
|
4358
|
+
* The `contextOnly` app in this plugin that fills the slot. Home reads `home.tasks` this way:
|
|
4359
|
+
* it mounts that app in each Home pane.
|
|
4360
|
+
*/
|
|
4361
|
+
app: LocalContributionId2.optional()
|
|
4343
4362
|
});
|
|
4344
4363
|
const NOT_LOCAL_APP_SCHEMES = /* @__PURE__ */ new Set([
|
|
4345
4364
|
"http",
|
|
@@ -4577,6 +4596,9 @@ function createContributionsSchemas(canonical) {
|
|
|
4577
4596
|
// Draws links the host resolves and opens (`BonsaiReferencePill`, `BonsaiReferenceRow`,
|
|
4578
4597
|
// `BonsaiReferenceMarkdown`). A person's click on one can open a session or another plugin's page.
|
|
4579
4598
|
"references.open",
|
|
4599
|
+
// Opens the system folder picker when the person acts (`useBonsaiFolderPicker`) and answers
|
|
4600
|
+
// the one folder they chose, or nothing when they cancel. It lists and reads nothing.
|
|
4601
|
+
"files.choose-folder",
|
|
4580
4602
|
// Server-rated organization billing, distinct from local/provider cost.
|
|
4581
4603
|
"billing.read",
|
|
4582
4604
|
"account.read",
|
|
@@ -4642,20 +4664,33 @@ function createContributionsSchemas(canonical) {
|
|
|
4642
4664
|
const UiRailBadge = z14.strictObject({
|
|
4643
4665
|
source: UiAppCapabilityReference2,
|
|
4644
4666
|
where: NonEmptyString3.optional(),
|
|
4667
|
+
/**
|
|
4668
|
+
* A second rows source the count adds, with its own `where`: for a page that tends two kinds
|
|
4669
|
+
* of thing kept by different plugins. The label's `${count}` is the sum.
|
|
4670
|
+
*/
|
|
4671
|
+
also: z14.strictObject({
|
|
4672
|
+
source: UiAppCapabilityReference2,
|
|
4673
|
+
where: NonEmptyString3.optional()
|
|
4674
|
+
}).optional(),
|
|
4645
4675
|
label: z14.strictObject({
|
|
4646
4676
|
one: NonEmptyString3.optional(),
|
|
4647
4677
|
other: NonEmptyString3
|
|
4648
4678
|
})
|
|
4649
4679
|
}).superRefine((badge, ctx) => {
|
|
4650
|
-
|
|
4651
|
-
|
|
4652
|
-
|
|
4653
|
-
|
|
4654
|
-
|
|
4655
|
-
|
|
4656
|
-
|
|
4657
|
-
|
|
4658
|
-
|
|
4680
|
+
for (const [path, where] of [
|
|
4681
|
+
[["where"], badge.where],
|
|
4682
|
+
[["also", "where"], badge.also?.where]
|
|
4683
|
+
]) {
|
|
4684
|
+
if (where === void 0)
|
|
4685
|
+
continue;
|
|
4686
|
+
const parsed = parseWhere(where);
|
|
4687
|
+
if (!parsed.ok) {
|
|
4688
|
+
ctx.addIssue({
|
|
4689
|
+
code: "custom",
|
|
4690
|
+
path: [...path],
|
|
4691
|
+
message: `rail badge has an invalid where: ${parsed.message}`
|
|
4692
|
+
});
|
|
4693
|
+
}
|
|
4659
4694
|
}
|
|
4660
4695
|
});
|
|
4661
4696
|
const UiRailEntryContribution2 = z14.strictObject({
|
|
@@ -5716,12 +5751,17 @@ function createManifestSchemas(canonical) {
|
|
|
5716
5751
|
index,
|
|
5717
5752
|
"badge"
|
|
5718
5753
|
];
|
|
5719
|
-
|
|
5720
|
-
|
|
5721
|
-
|
|
5722
|
-
|
|
5723
|
-
|
|
5724
|
-
|
|
5754
|
+
for (const [at, source] of [
|
|
5755
|
+
[["source"], entry.badge.source],
|
|
5756
|
+
[["also", "source"], entry.badge.also?.source]
|
|
5757
|
+
]) {
|
|
5758
|
+
if (typeof source === "string" && !declaredRowsStores.has(source)) {
|
|
5759
|
+
ctx.addIssue({
|
|
5760
|
+
code: "custom",
|
|
5761
|
+
path: [...path, ...at],
|
|
5762
|
+
message: `rail entry ${entry.id} counts ${source}, which is not one of this plugin's data sources with a rows store`
|
|
5763
|
+
});
|
|
5764
|
+
}
|
|
5725
5765
|
}
|
|
5726
5766
|
}
|
|
5727
5767
|
for (const source of declaredAppDataSources) {
|
|
@@ -5783,6 +5823,26 @@ function createManifestSchemas(canonical) {
|
|
|
5783
5823
|
});
|
|
5784
5824
|
}
|
|
5785
5825
|
}
|
|
5826
|
+
for (const [index, slot] of (manifest.targets?.kay?.ui?.contributes?.slots ?? []).entries()) {
|
|
5827
|
+
if (slot.app === void 0)
|
|
5828
|
+
continue;
|
|
5829
|
+
const app = manifest.targets?.kay?.ui?.contributes?.apps?.find((candidate) => candidate.localId === slot.app);
|
|
5830
|
+
if (app === void 0 || app.contextOnly !== true) {
|
|
5831
|
+
ctx.addIssue({
|
|
5832
|
+
code: "custom",
|
|
5833
|
+
path: [
|
|
5834
|
+
"targets",
|
|
5835
|
+
"kay",
|
|
5836
|
+
"ui",
|
|
5837
|
+
"contributes",
|
|
5838
|
+
"slots",
|
|
5839
|
+
index,
|
|
5840
|
+
"app"
|
|
5841
|
+
],
|
|
5842
|
+
message: app === void 0 ? `Slot ${slot.localId} names app ${slot.app}, which this plugin does not declare` : `Slot ${slot.localId} app ${app.localId} must be a contextOnly ui app`
|
|
5843
|
+
});
|
|
5844
|
+
}
|
|
5845
|
+
}
|
|
5786
5846
|
const notificationRuleIds = new Set(manifest.targets?.kay?.app?.contributes?.notificationRules?.map((rule) => rule.localId) ?? []);
|
|
5787
5847
|
const previewedRules = /* @__PURE__ */ new Set();
|
|
5788
5848
|
for (const [index, preview] of (manifest.targets?.kay?.ui?.contributes?.toastPreviews ?? []).entries()) {
|
|
@@ -8479,10 +8539,32 @@ function isCanonicalArtifactOutputUri(uri) {
|
|
|
8479
8539
|
return parseArtifactOutputUri(uri) !== void 0;
|
|
8480
8540
|
}
|
|
8481
8541
|
var ArtifactOutputUri = z27.string().refine(isCanonicalArtifactOutputUri, "Expected a canonical output://session/name URI");
|
|
8542
|
+
var ARTIFACT_OUTPUT_FOLDER_MARKS_MAX = 500;
|
|
8543
|
+
var ArtifactOutputVersionState = z27.discriminatedUnion("state", [
|
|
8544
|
+
z27.strictObject({ state: z27.literal("draft") }),
|
|
8545
|
+
z27.strictObject({
|
|
8546
|
+
state: z27.enum(["clean", "edited"]),
|
|
8547
|
+
committedVersion: z27.number().int().positive()
|
|
8548
|
+
})
|
|
8549
|
+
]);
|
|
8550
|
+
var ArtifactOutputFileFacts = z27.strictObject({
|
|
8551
|
+
sizeBytes: z27.number().finite().nonnegative(),
|
|
8552
|
+
modifiedAtMs: z27.number().finite().nonnegative(),
|
|
8553
|
+
title: z27.string().min(1).max(4096),
|
|
8554
|
+
mimeType: z27.string().min(1).max(255).optional(),
|
|
8555
|
+
versionState: ArtifactOutputVersionState.optional()
|
|
8556
|
+
});
|
|
8557
|
+
var ArtifactOutputFileChange = z27.strictObject({
|
|
8558
|
+
uri: ArtifactOutputUri,
|
|
8559
|
+
kind: z27.enum(["created", "changed", "deleted"]),
|
|
8560
|
+
file: ArtifactOutputFileFacts.optional(),
|
|
8561
|
+
metadataOnly: z27.literal(true).optional()
|
|
8562
|
+
}).refine((change) => change.kind === "deleted" === (change.file === void 0), "A deleted change carries no facts; every other change carries them.");
|
|
8482
8563
|
var ArtifactOutputChange = z27.union([
|
|
8483
8564
|
z27.strictObject({
|
|
8484
|
-
uris: z27.array(ArtifactOutputUri).min(1).max(ARTIFACT_OUTPUT_PAGE_MAX)
|
|
8485
|
-
|
|
8565
|
+
uris: z27.array(ArtifactOutputUri).min(1).max(ARTIFACT_OUTPUT_PAGE_MAX),
|
|
8566
|
+
changes: z27.array(ArtifactOutputFileChange).min(1).max(ARTIFACT_OUTPUT_PAGE_MAX).optional()
|
|
8567
|
+
}).refine((change) => change.changes === void 0 || change.changes.length === change.uris.length && change.changes.every((file, index) => file.uri === change.uris[index]), "Each change names the URI at the same position in uris."),
|
|
8486
8568
|
z27.strictObject({ sessionId: Segment })
|
|
8487
8569
|
]);
|
|
8488
8570
|
|
|
@@ -8584,6 +8666,7 @@ export {
|
|
|
8584
8666
|
AGENT_RUNTIME_SESSION_CREATOR_KINDS,
|
|
8585
8667
|
APPROVAL_ANSWERS,
|
|
8586
8668
|
APPROVAL_KINDS,
|
|
8669
|
+
ARTIFACT_OUTPUT_FOLDER_MARKS_MAX,
|
|
8587
8670
|
ARTIFACT_OUTPUT_PAGE_MAX,
|
|
8588
8671
|
ARTIFACT_PROVENANCE_VERSION,
|
|
8589
8672
|
AccessApprovalReview,
|
|
@@ -8602,7 +8685,10 @@ export {
|
|
|
8602
8685
|
ApprovalTypeContribution,
|
|
8603
8686
|
ArtifactGenerationId,
|
|
8604
8687
|
ArtifactOutputChange,
|
|
8688
|
+
ArtifactOutputFileChange,
|
|
8689
|
+
ArtifactOutputFileFacts,
|
|
8605
8690
|
ArtifactOutputUri,
|
|
8691
|
+
ArtifactOutputVersionState,
|
|
8606
8692
|
ArtifactProvenanceActor,
|
|
8607
8693
|
ArtifactProvenanceCaptureContextSchema,
|
|
8608
8694
|
ArtifactProvenanceCause,
|
package/package.json
CHANGED