@yaklabs-ai/plugin-protocol 0.41.0 → 0.42.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/THIRD-PARTY-INVENTORY.json +1 -1
- package/dist/index.d.ts +183 -2
- package/dist/index.js +88 -22
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -48,6 +48,12 @@ export declare type AgentRuntimeSessionCreatorKind = (typeof AGENT_RUNTIME_SESSI
|
|
|
48
48
|
|
|
49
49
|
export declare const AgentToolContribution: z.ZodObject<{
|
|
50
50
|
parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<authoringCommonSchemas.JsonValue, unknown, z.core.$ZodTypeInternals<authoringCommonSchemas.JsonValue, unknown>>>>;
|
|
51
|
+
executionMode: z.ZodOptional<z.ZodEnum<{
|
|
52
|
+
sequential: "sequential";
|
|
53
|
+
parallel: "parallel";
|
|
54
|
+
}>>;
|
|
55
|
+
promptSnippet: z.ZodOptional<z.ZodString>;
|
|
56
|
+
promptGuidelines: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
51
57
|
authService: z.ZodOptional<z.ZodString>;
|
|
52
58
|
authScheme: z.ZodOptional<z.ZodString>;
|
|
53
59
|
permission: z.ZodOptional<z.ZodObject<{
|
|
@@ -58,6 +64,8 @@ export declare const AgentToolContribution: z.ZodObject<{
|
|
|
58
64
|
execute: "execute";
|
|
59
65
|
}>;
|
|
60
66
|
ruleKey: z.ZodOptional<z.ZodString>;
|
|
67
|
+
scheme: z.ZodOptional<z.ZodString>;
|
|
68
|
+
resourcePrefix: z.ZodOptional<z.ZodString>;
|
|
61
69
|
resourceArgs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
62
70
|
}, z.core.$strict>>;
|
|
63
71
|
localId: z.ZodString;
|
|
@@ -2041,10 +2049,18 @@ declare const canonicalContributionSchemas: {
|
|
|
2041
2049
|
execute: "execute";
|
|
2042
2050
|
}>;
|
|
2043
2051
|
ruleKey: z.ZodOptional<z.ZodString>;
|
|
2052
|
+
scheme: z.ZodOptional<z.ZodString>;
|
|
2053
|
+
resourcePrefix: z.ZodOptional<z.ZodString>;
|
|
2044
2054
|
resourceArgs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2045
2055
|
}, z.core.$strict>;
|
|
2046
2056
|
AgentToolContribution: z.ZodObject<{
|
|
2047
2057
|
parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<authoringCommonSchemas.JsonValue, unknown, z.core.$ZodTypeInternals<authoringCommonSchemas.JsonValue, unknown>>>>;
|
|
2058
|
+
executionMode: z.ZodOptional<z.ZodEnum<{
|
|
2059
|
+
sequential: "sequential";
|
|
2060
|
+
parallel: "parallel";
|
|
2061
|
+
}>>;
|
|
2062
|
+
promptSnippet: z.ZodOptional<z.ZodString>;
|
|
2063
|
+
promptGuidelines: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2048
2064
|
authService: z.ZodOptional<z.ZodString>;
|
|
2049
2065
|
authScheme: z.ZodOptional<z.ZodString>;
|
|
2050
2066
|
permission: z.ZodOptional<z.ZodObject<{
|
|
@@ -2055,6 +2071,8 @@ declare const canonicalContributionSchemas: {
|
|
|
2055
2071
|
execute: "execute";
|
|
2056
2072
|
}>;
|
|
2057
2073
|
ruleKey: z.ZodOptional<z.ZodString>;
|
|
2074
|
+
scheme: z.ZodOptional<z.ZodString>;
|
|
2075
|
+
resourcePrefix: z.ZodOptional<z.ZodString>;
|
|
2058
2076
|
resourceArgs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2059
2077
|
}, z.core.$strict>>;
|
|
2060
2078
|
localId: z.ZodString;
|
|
@@ -2515,6 +2533,12 @@ declare const canonicalContributionSchemas: {
|
|
|
2515
2533
|
displayName: z.ZodOptional<z.ZodString>;
|
|
2516
2534
|
requestSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<authoringCommonSchemas.JsonValue, unknown, z.core.$ZodTypeInternals<authoringCommonSchemas.JsonValue, unknown>>>>;
|
|
2517
2535
|
responseSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<authoringCommonSchemas.JsonValue, unknown, z.core.$ZodTypeInternals<authoringCommonSchemas.JsonValue, unknown>>>>;
|
|
2536
|
+
auth: z.ZodOptional<z.ZodObject<{
|
|
2537
|
+
service: z.ZodString;
|
|
2538
|
+
schemes: z.ZodArray<z.ZodString>;
|
|
2539
|
+
purpose: z.ZodString;
|
|
2540
|
+
}, z.core.$strict>>;
|
|
2541
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
2518
2542
|
}, z.core.$strict>;
|
|
2519
2543
|
WorkflowContribution: z.ZodObject<{
|
|
2520
2544
|
localId: z.ZodString;
|
|
@@ -2807,6 +2831,7 @@ declare const canonicalContributionSchemas: {
|
|
|
2807
2831
|
"artifacts.read": "artifacts.read";
|
|
2808
2832
|
"artifacts.preview": "artifacts.preview";
|
|
2809
2833
|
"markdown.document-view": "markdown.document-view";
|
|
2834
|
+
"references.open": "references.open";
|
|
2810
2835
|
"billing.read": "billing.read";
|
|
2811
2836
|
"automations.read": "automations.read";
|
|
2812
2837
|
"automations.run": "automations.run";
|
|
@@ -2823,6 +2848,7 @@ declare const canonicalContributionSchemas: {
|
|
|
2823
2848
|
"artifacts.read": "artifacts.read";
|
|
2824
2849
|
"artifacts.preview": "artifacts.preview";
|
|
2825
2850
|
"markdown.document-view": "markdown.document-view";
|
|
2851
|
+
"references.open": "references.open";
|
|
2826
2852
|
"billing.read": "billing.read";
|
|
2827
2853
|
"automations.read": "automations.read";
|
|
2828
2854
|
"automations.run": "automations.run";
|
|
@@ -2893,6 +2919,7 @@ declare const canonicalContributionSchemas: {
|
|
|
2893
2919
|
"artifacts.read": "artifacts.read";
|
|
2894
2920
|
"artifacts.preview": "artifacts.preview";
|
|
2895
2921
|
"markdown.document-view": "markdown.document-view";
|
|
2922
|
+
"references.open": "references.open";
|
|
2896
2923
|
"billing.read": "billing.read";
|
|
2897
2924
|
"automations.read": "automations.read";
|
|
2898
2925
|
"automations.run": "automations.run";
|
|
@@ -2927,6 +2954,7 @@ declare const canonicalContributionSchemas: {
|
|
|
2927
2954
|
"artifacts.read": "artifacts.read";
|
|
2928
2955
|
"artifacts.preview": "artifacts.preview";
|
|
2929
2956
|
"markdown.document-view": "markdown.document-view";
|
|
2957
|
+
"references.open": "references.open";
|
|
2930
2958
|
"billing.read": "billing.read";
|
|
2931
2959
|
"automations.read": "automations.read";
|
|
2932
2960
|
"automations.run": "automations.run";
|
|
@@ -3363,6 +3391,12 @@ export declare const EndpointContribution: z.ZodObject<{
|
|
|
3363
3391
|
displayName: z.ZodOptional<z.ZodString>;
|
|
3364
3392
|
requestSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<authoringCommonSchemas.JsonValue, unknown, z.core.$ZodTypeInternals<authoringCommonSchemas.JsonValue, unknown>>>>;
|
|
3365
3393
|
responseSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<authoringCommonSchemas.JsonValue, unknown, z.core.$ZodTypeInternals<authoringCommonSchemas.JsonValue, unknown>>>>;
|
|
3394
|
+
auth: z.ZodOptional<z.ZodObject<{
|
|
3395
|
+
service: z.ZodString;
|
|
3396
|
+
schemes: z.ZodArray<z.ZodString>;
|
|
3397
|
+
purpose: z.ZodString;
|
|
3398
|
+
}, z.core.$strict>>;
|
|
3399
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
3366
3400
|
}, z.core.$strict>;
|
|
3367
3401
|
|
|
3368
3402
|
export declare type EndpointContribution = z.infer<typeof EndpointContribution>;
|
|
@@ -4239,8 +4273,15 @@ export declare const KAY_PLUGIN_PROTOCOL_VERSION: "kay.plugin.v1";
|
|
|
4239
4273
|
*
|
|
4240
4274
|
* 0.41.0 adds app.mcp.callTool for background calls to a plugin's own manifest-declared MCP
|
|
4241
4275
|
* servers, using Bonsai's managed connection without a session or working directory (#16172).
|
|
4276
|
+
*
|
|
4277
|
+
* 0.42.0 hands background work the shared ResolvedCredential in auth.credential. Workflow
|
|
4278
|
+
* accounts carry auth resolution outcomes, and Poller callbacks receive only the credential.
|
|
4279
|
+
* Older SDK ranges are refused because their background success shape is no longer served.
|
|
4280
|
+
*
|
|
4281
|
+
* 0.42.1 adds current-session tool lifetimes and invocation-bound artifact reads/new outputs,
|
|
4282
|
+
* plus described-tool execution, guidance and permission resource metadata.
|
|
4242
4283
|
*/
|
|
4243
|
-
export declare const KAY_PLUGIN_SDK_VERSION: "0.
|
|
4284
|
+
export declare const KAY_PLUGIN_SDK_VERSION: "0.42.1";
|
|
4244
4285
|
|
|
4245
4286
|
export declare const KAY_PLUGIN_TARGET_NAMES: readonly ["kay.agent", "kay.app", "kay.ui"];
|
|
4246
4287
|
|
|
@@ -4266,6 +4307,12 @@ export declare const KayAgentTargetManifest: z.ZodObject<{
|
|
|
4266
4307
|
contributes: z.ZodOptional<z.ZodObject<{
|
|
4267
4308
|
tools: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
4268
4309
|
parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<authoringCommonSchemas.JsonValue, unknown, z.core.$ZodTypeInternals<authoringCommonSchemas.JsonValue, unknown>>>>;
|
|
4310
|
+
executionMode: z.ZodOptional<z.ZodEnum<{
|
|
4311
|
+
sequential: "sequential";
|
|
4312
|
+
parallel: "parallel";
|
|
4313
|
+
}>>;
|
|
4314
|
+
promptSnippet: z.ZodOptional<z.ZodString>;
|
|
4315
|
+
promptGuidelines: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
4269
4316
|
authService: z.ZodOptional<z.ZodString>;
|
|
4270
4317
|
authScheme: z.ZodOptional<z.ZodString>;
|
|
4271
4318
|
permission: z.ZodOptional<z.ZodObject<{
|
|
@@ -4276,6 +4323,8 @@ export declare const KayAgentTargetManifest: z.ZodObject<{
|
|
|
4276
4323
|
execute: "execute";
|
|
4277
4324
|
}>;
|
|
4278
4325
|
ruleKey: z.ZodOptional<z.ZodString>;
|
|
4326
|
+
scheme: z.ZodOptional<z.ZodString>;
|
|
4327
|
+
resourcePrefix: z.ZodOptional<z.ZodString>;
|
|
4279
4328
|
resourceArgs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
4280
4329
|
}, z.core.$strict>>;
|
|
4281
4330
|
localId: z.ZodString;
|
|
@@ -4580,6 +4629,12 @@ export declare const KayAppTargetManifest: z.ZodObject<{
|
|
|
4580
4629
|
displayName: z.ZodOptional<z.ZodString>;
|
|
4581
4630
|
requestSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<authoringCommonSchemas.JsonValue, unknown, z.core.$ZodTypeInternals<authoringCommonSchemas.JsonValue, unknown>>>>;
|
|
4582
4631
|
responseSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<authoringCommonSchemas.JsonValue, unknown, z.core.$ZodTypeInternals<authoringCommonSchemas.JsonValue, unknown>>>>;
|
|
4632
|
+
auth: z.ZodOptional<z.ZodObject<{
|
|
4633
|
+
service: z.ZodString;
|
|
4634
|
+
schemes: z.ZodArray<z.ZodString>;
|
|
4635
|
+
purpose: z.ZodString;
|
|
4636
|
+
}, z.core.$strict>>;
|
|
4637
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
4583
4638
|
}, z.core.$strict>>>;
|
|
4584
4639
|
uriModules: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
4585
4640
|
description: z.ZodExactOptional<z.ZodString>;
|
|
@@ -5041,6 +5096,12 @@ export declare const KayPluginManifestV1: z.ZodObject<{
|
|
|
5041
5096
|
contributes: z.ZodOptional<z.ZodObject<{
|
|
5042
5097
|
tools: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
5043
5098
|
parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<authoringCommonSchemas.JsonValue, unknown, z.core.$ZodTypeInternals<authoringCommonSchemas.JsonValue, unknown>>>>;
|
|
5099
|
+
executionMode: z.ZodOptional<z.ZodEnum<{
|
|
5100
|
+
sequential: "sequential";
|
|
5101
|
+
parallel: "parallel";
|
|
5102
|
+
}>>;
|
|
5103
|
+
promptSnippet: z.ZodOptional<z.ZodString>;
|
|
5104
|
+
promptGuidelines: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
5044
5105
|
authService: z.ZodOptional<z.ZodString>;
|
|
5045
5106
|
authScheme: z.ZodOptional<z.ZodString>;
|
|
5046
5107
|
permission: z.ZodOptional<z.ZodObject<{
|
|
@@ -5051,6 +5112,8 @@ export declare const KayPluginManifestV1: z.ZodObject<{
|
|
|
5051
5112
|
execute: "execute";
|
|
5052
5113
|
}>;
|
|
5053
5114
|
ruleKey: z.ZodOptional<z.ZodString>;
|
|
5115
|
+
scheme: z.ZodOptional<z.ZodString>;
|
|
5116
|
+
resourcePrefix: z.ZodOptional<z.ZodString>;
|
|
5054
5117
|
resourceArgs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
5055
5118
|
}, z.core.$strict>>;
|
|
5056
5119
|
localId: z.ZodString;
|
|
@@ -5352,6 +5415,12 @@ export declare const KayPluginManifestV1: z.ZodObject<{
|
|
|
5352
5415
|
displayName: z.ZodOptional<z.ZodString>;
|
|
5353
5416
|
requestSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<authoringCommonSchemas.JsonValue, unknown, z.core.$ZodTypeInternals<authoringCommonSchemas.JsonValue, unknown>>>>;
|
|
5354
5417
|
responseSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<authoringCommonSchemas.JsonValue, unknown, z.core.$ZodTypeInternals<authoringCommonSchemas.JsonValue, unknown>>>>;
|
|
5418
|
+
auth: z.ZodOptional<z.ZodObject<{
|
|
5419
|
+
service: z.ZodString;
|
|
5420
|
+
schemes: z.ZodArray<z.ZodString>;
|
|
5421
|
+
purpose: z.ZodString;
|
|
5422
|
+
}, z.core.$strict>>;
|
|
5423
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
5355
5424
|
}, z.core.$strict>>>;
|
|
5356
5425
|
uriModules: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
5357
5426
|
description: z.ZodExactOptional<z.ZodString>;
|
|
@@ -5840,6 +5909,7 @@ export declare const KayPluginManifestV1: z.ZodObject<{
|
|
|
5840
5909
|
"artifacts.read": "artifacts.read";
|
|
5841
5910
|
"artifacts.preview": "artifacts.preview";
|
|
5842
5911
|
"markdown.document-view": "markdown.document-view";
|
|
5912
|
+
"references.open": "references.open";
|
|
5843
5913
|
"billing.read": "billing.read";
|
|
5844
5914
|
"automations.read": "automations.read";
|
|
5845
5915
|
"automations.run": "automations.run";
|
|
@@ -5874,6 +5944,7 @@ export declare const KayPluginManifestV1: z.ZodObject<{
|
|
|
5874
5944
|
"artifacts.read": "artifacts.read";
|
|
5875
5945
|
"artifacts.preview": "artifacts.preview";
|
|
5876
5946
|
"markdown.document-view": "markdown.document-view";
|
|
5947
|
+
"references.open": "references.open";
|
|
5877
5948
|
"billing.read": "billing.read";
|
|
5878
5949
|
"automations.read": "automations.read";
|
|
5879
5950
|
"automations.run": "automations.run";
|
|
@@ -6742,6 +6813,7 @@ export declare const KayUiAppHostCapability: z.ZodEnum<{
|
|
|
6742
6813
|
"artifacts.read": "artifacts.read";
|
|
6743
6814
|
"artifacts.preview": "artifacts.preview";
|
|
6744
6815
|
"markdown.document-view": "markdown.document-view";
|
|
6816
|
+
"references.open": "references.open";
|
|
6745
6817
|
"billing.read": "billing.read";
|
|
6746
6818
|
"automations.read": "automations.read";
|
|
6747
6819
|
"automations.run": "automations.run";
|
|
@@ -6994,6 +7066,7 @@ export declare const KayUiTargetManifest: z.ZodObject<{
|
|
|
6994
7066
|
"artifacts.read": "artifacts.read";
|
|
6995
7067
|
"artifacts.preview": "artifacts.preview";
|
|
6996
7068
|
"markdown.document-view": "markdown.document-view";
|
|
7069
|
+
"references.open": "references.open";
|
|
6997
7070
|
"billing.read": "billing.read";
|
|
6998
7071
|
"automations.read": "automations.read";
|
|
6999
7072
|
"automations.run": "automations.run";
|
|
@@ -7028,6 +7101,7 @@ export declare const KayUiTargetManifest: z.ZodObject<{
|
|
|
7028
7101
|
"artifacts.read": "artifacts.read";
|
|
7029
7102
|
"artifacts.preview": "artifacts.preview";
|
|
7030
7103
|
"markdown.document-view": "markdown.document-view";
|
|
7104
|
+
"references.open": "references.open";
|
|
7031
7105
|
"billing.read": "billing.read";
|
|
7032
7106
|
"automations.read": "automations.read";
|
|
7033
7107
|
"automations.run": "automations.run";
|
|
@@ -7280,7 +7354,7 @@ export declare function parseSemver(value: string): ParsedSemver | undefined;
|
|
|
7280
7354
|
export declare function parseWhere(source: string, keyTypes?: WhereKeyTypes): WhereParseResult;
|
|
7281
7355
|
|
|
7282
7356
|
/** Every capability slug {@link PluginCapabilityClaimV1} can express, for exhaustive table checks. */
|
|
7283
|
-
export declare const PLUGIN_CAPABILITY_SLUGS: readonly ["sessions.run", "network.connect", "web-session.request", "web-session.download", "process.spawn", "sessions.read", "signals.read", "memory.read", "memory.write", "skills.read", "skills.write", "skills.share", "plugins.set-enabled", "sessions.annotate", "sessions.compact", "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", "knowledge-source.register", "artifacts.read", "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", "model-selection.register", "system-prompt.register"];
|
|
7357
|
+
export declare const PLUGIN_CAPABILITY_SLUGS: readonly ["sessions.run", "network.connect", "web-session.request", "web-session.download", "process.spawn", "sessions.read", "signals.read", "memory.read", "memory.write", "skills.read", "skills.write", "skills.share", "plugins.set-enabled", "sessions.annotate", "sessions.compact", "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", "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", "whiteboard.discover", "whiteboard.read", "whiteboard.create", "whiteboard.update", "whiteboard.remove", "model-selection.register", "system-prompt.register"];
|
|
7284
7358
|
|
|
7285
7359
|
/** Diagnostic messages carry plugin-controlled text (parse errors, module errors); bound it so a
|
|
7286
7360
|
* hostile or accidental multi-megabyte error can never blow up a log line or a render surface. */
|
|
@@ -7926,6 +8000,18 @@ export declare const PluginCapabilityClaimInputV1: z.ZodCustom<{
|
|
|
7926
8000
|
envelope: {
|
|
7927
8001
|
source: string;
|
|
7928
8002
|
};
|
|
8003
|
+
} | {
|
|
8004
|
+
target: "kay.agent";
|
|
8005
|
+
slug: "session-artifacts.read";
|
|
8006
|
+
envelope: {
|
|
8007
|
+
kind: "output" | "upload";
|
|
8008
|
+
};
|
|
8009
|
+
} | {
|
|
8010
|
+
target: "kay.agent";
|
|
8011
|
+
slug: "session-artifacts.create";
|
|
8012
|
+
envelope: {
|
|
8013
|
+
kind: "output";
|
|
8014
|
+
};
|
|
7929
8015
|
} | {
|
|
7930
8016
|
target: "kay.app";
|
|
7931
8017
|
slug: "artifacts.read";
|
|
@@ -8175,6 +8261,18 @@ export declare const PluginCapabilityClaimInputV1: z.ZodCustom<{
|
|
|
8175
8261
|
envelope: {
|
|
8176
8262
|
source: string;
|
|
8177
8263
|
};
|
|
8264
|
+
} | {
|
|
8265
|
+
target: "kay.agent";
|
|
8266
|
+
slug: "session-artifacts.read";
|
|
8267
|
+
envelope: {
|
|
8268
|
+
kind: "output" | "upload";
|
|
8269
|
+
};
|
|
8270
|
+
} | {
|
|
8271
|
+
target: "kay.agent";
|
|
8272
|
+
slug: "session-artifacts.create";
|
|
8273
|
+
envelope: {
|
|
8274
|
+
kind: "output";
|
|
8275
|
+
};
|
|
8178
8276
|
} | {
|
|
8179
8277
|
target: "kay.app";
|
|
8180
8278
|
slug: "artifacts.read";
|
|
@@ -8420,6 +8518,21 @@ export declare const PluginCapabilityClaimV1: z.ZodDiscriminatedUnion<[z.ZodObje
|
|
|
8420
8518
|
envelope: z.ZodObject<{
|
|
8421
8519
|
source: z.ZodString;
|
|
8422
8520
|
}, z.core.$strict>;
|
|
8521
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
8522
|
+
target: z.ZodLiteral<"kay.agent">;
|
|
8523
|
+
slug: z.ZodLiteral<"session-artifacts.read">;
|
|
8524
|
+
envelope: z.ZodObject<{
|
|
8525
|
+
kind: z.ZodEnum<{
|
|
8526
|
+
output: "output";
|
|
8527
|
+
upload: "upload";
|
|
8528
|
+
}>;
|
|
8529
|
+
}, z.core.$strict>;
|
|
8530
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
8531
|
+
target: z.ZodLiteral<"kay.agent">;
|
|
8532
|
+
slug: z.ZodLiteral<"session-artifacts.create">;
|
|
8533
|
+
envelope: z.ZodObject<{
|
|
8534
|
+
kind: z.ZodLiteral<"output">;
|
|
8535
|
+
}, z.core.$strict>;
|
|
8423
8536
|
}, z.core.$strict>, z.ZodObject<{
|
|
8424
8537
|
target: z.ZodLiteral<"kay.app">;
|
|
8425
8538
|
slug: z.ZodLiteral<"artifacts.read">;
|
|
@@ -8708,6 +8821,21 @@ export declare const PluginCapabilityDecisionV1: z.ZodDiscriminatedUnion<[z.ZodO
|
|
|
8708
8821
|
envelope: z.ZodObject<{
|
|
8709
8822
|
source: z.ZodString;
|
|
8710
8823
|
}, z.core.$strict>;
|
|
8824
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
8825
|
+
target: z.ZodLiteral<"kay.agent">;
|
|
8826
|
+
slug: z.ZodLiteral<"session-artifacts.read">;
|
|
8827
|
+
envelope: z.ZodObject<{
|
|
8828
|
+
kind: z.ZodEnum<{
|
|
8829
|
+
output: "output";
|
|
8830
|
+
upload: "upload";
|
|
8831
|
+
}>;
|
|
8832
|
+
}, z.core.$strict>;
|
|
8833
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
8834
|
+
target: z.ZodLiteral<"kay.agent">;
|
|
8835
|
+
slug: z.ZodLiteral<"session-artifacts.create">;
|
|
8836
|
+
envelope: z.ZodObject<{
|
|
8837
|
+
kind: z.ZodLiteral<"output">;
|
|
8838
|
+
}, z.core.$strict>;
|
|
8711
8839
|
}, z.core.$strict>, z.ZodObject<{
|
|
8712
8840
|
target: z.ZodLiteral<"kay.app">;
|
|
8713
8841
|
slug: z.ZodLiteral<"artifacts.read">;
|
|
@@ -8995,6 +9123,21 @@ export declare const PluginCapabilityDecisionV1: z.ZodDiscriminatedUnion<[z.ZodO
|
|
|
8995
9123
|
envelope: z.ZodObject<{
|
|
8996
9124
|
source: z.ZodString;
|
|
8997
9125
|
}, z.core.$strict>;
|
|
9126
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
9127
|
+
target: z.ZodLiteral<"kay.agent">;
|
|
9128
|
+
slug: z.ZodLiteral<"session-artifacts.read">;
|
|
9129
|
+
envelope: z.ZodObject<{
|
|
9130
|
+
kind: z.ZodEnum<{
|
|
9131
|
+
output: "output";
|
|
9132
|
+
upload: "upload";
|
|
9133
|
+
}>;
|
|
9134
|
+
}, z.core.$strict>;
|
|
9135
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
9136
|
+
target: z.ZodLiteral<"kay.agent">;
|
|
9137
|
+
slug: z.ZodLiteral<"session-artifacts.create">;
|
|
9138
|
+
envelope: z.ZodObject<{
|
|
9139
|
+
kind: z.ZodLiteral<"output">;
|
|
9140
|
+
}, z.core.$strict>;
|
|
8998
9141
|
}, z.core.$strict>, z.ZodObject<{
|
|
8999
9142
|
target: z.ZodLiteral<"kay.app">;
|
|
9000
9143
|
slug: z.ZodLiteral<"artifacts.read">;
|
|
@@ -9316,6 +9459,21 @@ export declare const PluginCapabilityRefusalV1: z.ZodObject<{
|
|
|
9316
9459
|
envelope: z.ZodObject<{
|
|
9317
9460
|
source: z.ZodString;
|
|
9318
9461
|
}, z.core.$strict>;
|
|
9462
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
9463
|
+
target: z.ZodLiteral<"kay.agent">;
|
|
9464
|
+
slug: z.ZodLiteral<"session-artifacts.read">;
|
|
9465
|
+
envelope: z.ZodObject<{
|
|
9466
|
+
kind: z.ZodEnum<{
|
|
9467
|
+
output: "output";
|
|
9468
|
+
upload: "upload";
|
|
9469
|
+
}>;
|
|
9470
|
+
}, z.core.$strict>;
|
|
9471
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
9472
|
+
target: z.ZodLiteral<"kay.agent">;
|
|
9473
|
+
slug: z.ZodLiteral<"session-artifacts.create">;
|
|
9474
|
+
envelope: z.ZodObject<{
|
|
9475
|
+
kind: z.ZodLiteral<"output">;
|
|
9476
|
+
}, z.core.$strict>;
|
|
9319
9477
|
}, z.core.$strict>, z.ZodObject<{
|
|
9320
9478
|
target: z.ZodLiteral<"kay.app">;
|
|
9321
9479
|
slug: z.ZodLiteral<"artifacts.read">;
|
|
@@ -10960,6 +11118,12 @@ export declare const ResolvedKayAgentTool: z.ZodObject<{
|
|
|
10960
11118
|
displayName: z.ZodOptional<z.ZodString>;
|
|
10961
11119
|
description: z.ZodOptional<z.ZodString>;
|
|
10962
11120
|
parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<authoringCommonSchemas.JsonValue, unknown, z.core.$ZodTypeInternals<authoringCommonSchemas.JsonValue, unknown>>>>;
|
|
11121
|
+
executionMode: z.ZodOptional<z.ZodEnum<{
|
|
11122
|
+
sequential: "sequential";
|
|
11123
|
+
parallel: "parallel";
|
|
11124
|
+
}>>;
|
|
11125
|
+
promptSnippet: z.ZodOptional<z.ZodString>;
|
|
11126
|
+
promptGuidelines: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
10963
11127
|
requiresAuth: z.ZodOptional<z.ZodObject<{
|
|
10964
11128
|
serviceId: z.ZodString;
|
|
10965
11129
|
schemeId: z.ZodOptional<z.ZodString>;
|
|
@@ -10972,6 +11136,8 @@ export declare const ResolvedKayAgentTool: z.ZodObject<{
|
|
|
10972
11136
|
execute: "execute";
|
|
10973
11137
|
}>;
|
|
10974
11138
|
ruleKey: z.ZodOptional<z.ZodString>;
|
|
11139
|
+
scheme: z.ZodOptional<z.ZodString>;
|
|
11140
|
+
resourcePrefix: z.ZodOptional<z.ZodString>;
|
|
10975
11141
|
resourceArgs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
10976
11142
|
}, z.core.$strict>>;
|
|
10977
11143
|
localId: z.ZodString;
|
|
@@ -11362,6 +11528,7 @@ export declare const ResolvedKayUiApp: z.ZodObject<{
|
|
|
11362
11528
|
"artifacts.read": "artifacts.read";
|
|
11363
11529
|
"artifacts.preview": "artifacts.preview";
|
|
11364
11530
|
"markdown.document-view": "markdown.document-view";
|
|
11531
|
+
"references.open": "references.open";
|
|
11365
11532
|
"billing.read": "billing.read";
|
|
11366
11533
|
"automations.read": "automations.read";
|
|
11367
11534
|
"automations.run": "automations.run";
|
|
@@ -12396,6 +12563,12 @@ export declare const ResolvedPluginContractV1: z.ZodObject<{
|
|
|
12396
12563
|
displayName: z.ZodOptional<z.ZodString>;
|
|
12397
12564
|
description: z.ZodOptional<z.ZodString>;
|
|
12398
12565
|
parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<authoringCommonSchemas.JsonValue, unknown, z.core.$ZodTypeInternals<authoringCommonSchemas.JsonValue, unknown>>>>;
|
|
12566
|
+
executionMode: z.ZodOptional<z.ZodEnum<{
|
|
12567
|
+
sequential: "sequential";
|
|
12568
|
+
parallel: "parallel";
|
|
12569
|
+
}>>;
|
|
12570
|
+
promptSnippet: z.ZodOptional<z.ZodString>;
|
|
12571
|
+
promptGuidelines: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
12399
12572
|
requiresAuth: z.ZodOptional<z.ZodObject<{
|
|
12400
12573
|
serviceId: z.ZodString;
|
|
12401
12574
|
schemeId: z.ZodOptional<z.ZodString>;
|
|
@@ -12408,6 +12581,8 @@ export declare const ResolvedPluginContractV1: z.ZodObject<{
|
|
|
12408
12581
|
execute: "execute";
|
|
12409
12582
|
}>;
|
|
12410
12583
|
ruleKey: z.ZodOptional<z.ZodString>;
|
|
12584
|
+
scheme: z.ZodOptional<z.ZodString>;
|
|
12585
|
+
resourcePrefix: z.ZodOptional<z.ZodString>;
|
|
12411
12586
|
resourceArgs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
12412
12587
|
}, z.core.$strict>>;
|
|
12413
12588
|
localId: z.ZodString;
|
|
@@ -12697,6 +12872,7 @@ export declare const ResolvedPluginContractV1: z.ZodObject<{
|
|
|
12697
12872
|
"artifacts.read": "artifacts.read";
|
|
12698
12873
|
"artifacts.preview": "artifacts.preview";
|
|
12699
12874
|
"markdown.document-view": "markdown.document-view";
|
|
12875
|
+
"references.open": "references.open";
|
|
12700
12876
|
"billing.read": "billing.read";
|
|
12701
12877
|
"automations.read": "automations.read";
|
|
12702
12878
|
"automations.run": "automations.run";
|
|
@@ -14243,6 +14419,8 @@ export declare const ToolPermission: z.ZodObject<{
|
|
|
14243
14419
|
execute: "execute";
|
|
14244
14420
|
}>;
|
|
14245
14421
|
ruleKey: z.ZodOptional<z.ZodString>;
|
|
14422
|
+
scheme: z.ZodOptional<z.ZodString>;
|
|
14423
|
+
resourcePrefix: z.ZodOptional<z.ZodString>;
|
|
14246
14424
|
resourceArgs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
14247
14425
|
}, z.core.$strict>;
|
|
14248
14426
|
|
|
@@ -14333,6 +14511,7 @@ export declare const UiAppCapabilities: z.ZodObject<{
|
|
|
14333
14511
|
"artifacts.read": "artifacts.read";
|
|
14334
14512
|
"artifacts.preview": "artifacts.preview";
|
|
14335
14513
|
"markdown.document-view": "markdown.document-view";
|
|
14514
|
+
"references.open": "references.open";
|
|
14336
14515
|
"billing.read": "billing.read";
|
|
14337
14516
|
"automations.read": "automations.read";
|
|
14338
14517
|
"automations.run": "automations.run";
|
|
@@ -14370,6 +14549,7 @@ export declare const UiAppContribution: z.ZodObject<{
|
|
|
14370
14549
|
"artifacts.read": "artifacts.read";
|
|
14371
14550
|
"artifacts.preview": "artifacts.preview";
|
|
14372
14551
|
"markdown.document-view": "markdown.document-view";
|
|
14552
|
+
"references.open": "references.open";
|
|
14373
14553
|
"billing.read": "billing.read";
|
|
14374
14554
|
"automations.read": "automations.read";
|
|
14375
14555
|
"automations.run": "automations.run";
|
|
@@ -14404,6 +14584,7 @@ export declare const UiAppContribution: z.ZodObject<{
|
|
|
14404
14584
|
"artifacts.read": "artifacts.read";
|
|
14405
14585
|
"artifacts.preview": "artifacts.preview";
|
|
14406
14586
|
"markdown.document-view": "markdown.document-view";
|
|
14587
|
+
"references.open": "references.open";
|
|
14407
14588
|
"billing.read": "billing.read";
|
|
14408
14589
|
"automations.read": "automations.read";
|
|
14409
14590
|
"automations.run": "automations.run";
|
package/dist/index.js
CHANGED
|
@@ -254,25 +254,8 @@ var JsonSchema = z4.record(z4.string(), JsonValue);
|
|
|
254
254
|
var KAY_PLUGIN_MANIFEST_SIZE_CAP_BYTES = 1024 * 1024;
|
|
255
255
|
var KAY_PLUGIN_PROTOCOL_VERSION = "kay.plugin.v1";
|
|
256
256
|
var KAY_PLUGIN_PROTOCOL_PACKAGE_NAME = "@bonsai/plugin-protocol";
|
|
257
|
-
var KAY_PLUGIN_SDK_VERSION = "0.
|
|
258
|
-
var KAY_PLUGIN_COMPATIBLE_SDK_VERSIONS = [
|
|
259
|
-
"0.26.3",
|
|
260
|
-
"0.27.1",
|
|
261
|
-
"0.28.0",
|
|
262
|
-
"0.29.0",
|
|
263
|
-
"0.30.0",
|
|
264
|
-
"0.31.0",
|
|
265
|
-
"0.32.0",
|
|
266
|
-
"0.33.0",
|
|
267
|
-
"0.34.0",
|
|
268
|
-
"0.35.0",
|
|
269
|
-
"0.36.0",
|
|
270
|
-
"0.37.0",
|
|
271
|
-
"0.37.1",
|
|
272
|
-
"0.38.0",
|
|
273
|
-
"0.39.0",
|
|
274
|
-
"0.40.0"
|
|
275
|
-
];
|
|
257
|
+
var KAY_PLUGIN_SDK_VERSION = "0.42.1";
|
|
258
|
+
var KAY_PLUGIN_COMPATIBLE_SDK_VERSIONS = [];
|
|
276
259
|
var KAY_PLUGIN_TARGET_NAMES = [
|
|
277
260
|
"kay.agent",
|
|
278
261
|
"kay.app",
|
|
@@ -1767,6 +1750,8 @@ var PLUGIN_CAPABILITY_SLUGS = [
|
|
|
1767
1750
|
"app-data.register",
|
|
1768
1751
|
"knowledge-source.register",
|
|
1769
1752
|
"artifacts.read",
|
|
1753
|
+
"session-artifacts.read",
|
|
1754
|
+
"session-artifacts.create",
|
|
1770
1755
|
"account.assert",
|
|
1771
1756
|
"account.update",
|
|
1772
1757
|
"agents.permissions",
|
|
@@ -2049,6 +2034,16 @@ function createAuthoritySchemas(canonical) {
|
|
|
2049
2034
|
/** The declared `contributes.dataSources` localId. */
|
|
2050
2035
|
envelope: z10.strictObject({ source: NonEmptyString3 })
|
|
2051
2036
|
}),
|
|
2037
|
+
z10.strictObject({
|
|
2038
|
+
target: z10.literal("kay.agent"),
|
|
2039
|
+
slug: z10.literal("session-artifacts.read"),
|
|
2040
|
+
envelope: z10.strictObject({ kind: z10.enum(["upload", "output"]) })
|
|
2041
|
+
}),
|
|
2042
|
+
z10.strictObject({
|
|
2043
|
+
target: z10.literal("kay.agent"),
|
|
2044
|
+
slug: z10.literal("session-artifacts.create"),
|
|
2045
|
+
envelope: z10.strictObject({ kind: z10.literal("output") })
|
|
2046
|
+
}),
|
|
2052
2047
|
z10.strictObject({
|
|
2053
2048
|
target: z10.literal("kay.app"),
|
|
2054
2049
|
slug: z10.literal("artifacts.read"),
|
|
@@ -2278,8 +2273,10 @@ function sameClaim(a, b) {
|
|
|
2278
2273
|
return b.slug === "interaction.surface" && a.envelope.surface === b.envelope.surface;
|
|
2279
2274
|
case "dynamic-context.register":
|
|
2280
2275
|
return b.slug === "dynamic-context.register" && a.envelope.contributor === b.envelope.contributor;
|
|
2276
|
+
case "session-artifacts.read":
|
|
2277
|
+
case "session-artifacts.create":
|
|
2281
2278
|
case "artifacts.read":
|
|
2282
|
-
return b.slug ===
|
|
2279
|
+
return b.slug === a.slug && a.envelope.kind === b.envelope.kind;
|
|
2283
2280
|
case "knowledge-source.register":
|
|
2284
2281
|
return b.slug === "knowledge-source.register" && a.envelope.source === b.envelope.source;
|
|
2285
2282
|
case "app-data.register":
|
|
@@ -2369,8 +2366,10 @@ function envelopePairs(a, b) {
|
|
|
2369
2366
|
return b.slug === "interaction.surface" ? [[a.envelope.surface, b.envelope.surface]] : [];
|
|
2370
2367
|
case "dynamic-context.register":
|
|
2371
2368
|
return b.slug === "dynamic-context.register" ? [[a.envelope.contributor, b.envelope.contributor]] : [];
|
|
2369
|
+
case "session-artifacts.read":
|
|
2370
|
+
case "session-artifacts.create":
|
|
2372
2371
|
case "artifacts.read":
|
|
2373
|
-
return b.slug ===
|
|
2372
|
+
return b.slug === a.slug ? [[a.envelope.kind, b.envelope.kind]] : [];
|
|
2374
2373
|
case "knowledge-source.register":
|
|
2375
2374
|
return b.slug === "knowledge-source.register" ? [[a.envelope.source, b.envelope.source]] : [];
|
|
2376
2375
|
case "app-data.register":
|
|
@@ -3244,12 +3243,17 @@ function createContributionsSchemas(canonical) {
|
|
|
3244
3243
|
const ToolPermission2 = z12.strictObject({
|
|
3245
3244
|
kind: z12.enum(["read", "mutate", "destructive", "execute"]),
|
|
3246
3245
|
ruleKey: NonEmptyString3.optional(),
|
|
3246
|
+
scheme: NonEmptyString3.optional(),
|
|
3247
|
+
resourcePrefix: z12.string().max(256).optional(),
|
|
3247
3248
|
// Arguments whose string values name the resources a call touches.
|
|
3248
3249
|
resourceArgs: z12.array(NonEmptyString3).min(1).optional()
|
|
3249
3250
|
});
|
|
3250
3251
|
const AgentToolContribution2 = z12.strictObject({
|
|
3251
3252
|
...ToolContribution2.shape,
|
|
3252
3253
|
parameters: JsonSchema.optional(),
|
|
3254
|
+
executionMode: z12.enum(["sequential", "parallel"]).optional(),
|
|
3255
|
+
promptSnippet: NonEmptyString3.optional(),
|
|
3256
|
+
promptGuidelines: z12.array(NonEmptyString3).optional(),
|
|
3253
3257
|
// A local ref names an auth service declared in this manifest; a dotted ref names another
|
|
3254
3258
|
// plugin's service, as `UriModuleContribution.authService` does.
|
|
3255
3259
|
authService: AuthServiceReference2.optional(),
|
|
@@ -3631,7 +3635,13 @@ function createContributionsSchemas(canonical) {
|
|
|
3631
3635
|
localId: LocalContributionId2,
|
|
3632
3636
|
displayName: OptionalDisplayName,
|
|
3633
3637
|
requestSchema: JsonSchema.optional(),
|
|
3634
|
-
responseSchema: JsonSchema.optional()
|
|
3638
|
+
responseSchema: JsonSchema.optional(),
|
|
3639
|
+
auth: z12.strictObject({
|
|
3640
|
+
service: AuthServiceReference2,
|
|
3641
|
+
schemes: z12.array(AuthSchemeReference2).min(1),
|
|
3642
|
+
purpose: NonEmptyString3
|
|
3643
|
+
}).optional(),
|
|
3644
|
+
timeoutMs: z12.number().int().positive().optional()
|
|
3635
3645
|
});
|
|
3636
3646
|
const WorkflowContribution2 = z12.strictObject({
|
|
3637
3647
|
localId: LocalContributionId2,
|
|
@@ -3954,6 +3964,9 @@ function createContributionsSchemas(canonical) {
|
|
|
3954
3964
|
// Draws Bonsai's markdown document view in the app's page (`BonsaiMarkdownDocumentView`).
|
|
3955
3965
|
// It reads and saves nothing: the app supplies the text and keeps the edits.
|
|
3956
3966
|
"markdown.document-view",
|
|
3967
|
+
// Draws links the host resolves and opens (`BonsaiReferencePill`, `BonsaiReferenceRow`,
|
|
3968
|
+
// `BonsaiReferenceMarkdown`). A person's click on one can open a session or another plugin's page.
|
|
3969
|
+
"references.open",
|
|
3957
3970
|
// Server-rated organization billing, distinct from local/provider cost.
|
|
3958
3971
|
"billing.read",
|
|
3959
3972
|
"automations.read",
|
|
@@ -5113,6 +5126,53 @@ function createManifestSchemas(canonical) {
|
|
|
5113
5126
|
});
|
|
5114
5127
|
}
|
|
5115
5128
|
}
|
|
5129
|
+
for (const [index, endpoint] of (manifest.targets?.kay?.app?.contributes?.endpoints ?? []).entries()) {
|
|
5130
|
+
const { auth } = endpoint;
|
|
5131
|
+
if (auth === void 0)
|
|
5132
|
+
continue;
|
|
5133
|
+
const path = [
|
|
5134
|
+
"targets",
|
|
5135
|
+
"kay",
|
|
5136
|
+
"app",
|
|
5137
|
+
"contributes",
|
|
5138
|
+
"endpoints",
|
|
5139
|
+
index,
|
|
5140
|
+
"auth"
|
|
5141
|
+
];
|
|
5142
|
+
const qualified = isQualifiedAuthServiceRef(auth.service);
|
|
5143
|
+
const service = manifest.auth?.services?.find((candidate) => candidate.localId === auth.service);
|
|
5144
|
+
if (!qualified && service === void 0) {
|
|
5145
|
+
ctx.addIssue({
|
|
5146
|
+
code: "custom",
|
|
5147
|
+
path: [...path, "service"],
|
|
5148
|
+
message: `endpoint ${endpoint.localId} references unknown auth service ${auth.service}`
|
|
5149
|
+
});
|
|
5150
|
+
}
|
|
5151
|
+
for (const [schemeIndex, scheme] of auth.schemes.entries()) {
|
|
5152
|
+
if (qualified ? namespaceOfQualifiedRef(scheme) !== namespaceOfQualifiedRef(auth.service) : authSchemeIdsByService.get(auth.service)?.has(scheme) !== true) {
|
|
5153
|
+
ctx.addIssue({
|
|
5154
|
+
code: "custom",
|
|
5155
|
+
path: [...path, "schemes", schemeIndex],
|
|
5156
|
+
message: `endpoint ${endpoint.localId} names auth scheme ${scheme}, which is not a scheme of its auth service`
|
|
5157
|
+
});
|
|
5158
|
+
}
|
|
5159
|
+
}
|
|
5160
|
+
if (service !== void 0 && !service.purposes.includes(auth.purpose)) {
|
|
5161
|
+
ctx.addIssue({
|
|
5162
|
+
code: "custom",
|
|
5163
|
+
path: [...path, "purpose"],
|
|
5164
|
+
message: `endpoint ${endpoint.localId} references undeclared auth purpose ${auth.purpose}`
|
|
5165
|
+
});
|
|
5166
|
+
}
|
|
5167
|
+
const granted = manifest.permissions?.byTarget["kay.app"]?.auth?.some((grant) => grant.service === auth.service && grant.operations.includes("resolve") && (grant.purposes === void 0 || grant.purposes.includes(auth.purpose)) && auth.schemes.every((scheme) => grant.schemes === void 0 || grant.schemes.some((grantedScheme) => grantedScheme === scheme || !qualified && `${manifest.namespace ?? manifest.id}.${grantedScheme}` === scheme || !qualified && grantedScheme === `${manifest.namespace ?? manifest.id}.${scheme}`)));
|
|
5168
|
+
if (granted !== true) {
|
|
5169
|
+
ctx.addIssue({
|
|
5170
|
+
code: "custom",
|
|
5171
|
+
path,
|
|
5172
|
+
message: `endpoint ${endpoint.localId} needs a kay.app auth resolve grant admitting its schemes and purpose`
|
|
5173
|
+
});
|
|
5174
|
+
}
|
|
5175
|
+
}
|
|
5116
5176
|
const syntheticContributionIds = collectSyntheticContributionIds(manifest);
|
|
5117
5177
|
for (const contribution of collectDeclaredContributionIds(manifest)) {
|
|
5118
5178
|
if (syntheticContributionIds.has(contribution.localId)) {
|
|
@@ -5765,6 +5825,9 @@ function createResolvedContractSchemas(canonical) {
|
|
|
5765
5825
|
displayName: NonEmptyString3.optional(),
|
|
5766
5826
|
description: NonEmptyString3.optional(),
|
|
5767
5827
|
parameters: JsonSchema.optional(),
|
|
5828
|
+
executionMode: z14.enum(["sequential", "parallel"]).optional(),
|
|
5829
|
+
promptSnippet: NonEmptyString3.optional(),
|
|
5830
|
+
promptGuidelines: z14.array(NonEmptyString3).optional(),
|
|
5768
5831
|
requiresAuth: z14.strictObject({
|
|
5769
5832
|
serviceId: GlobalContributionId2,
|
|
5770
5833
|
schemeId: GlobalContributionId2.optional()
|
|
@@ -6417,6 +6480,9 @@ function resolveKayPluginContractV1(manifest) {
|
|
|
6417
6480
|
...tool.displayName === void 0 ? {} : { displayName: tool.displayName },
|
|
6418
6481
|
...tool.description === void 0 ? {} : { description: tool.description },
|
|
6419
6482
|
...tool.parameters === void 0 ? {} : { parameters: tool.parameters },
|
|
6483
|
+
...tool.executionMode === void 0 ? {} : { executionMode: tool.executionMode },
|
|
6484
|
+
...tool.promptSnippet === void 0 ? {} : { promptSnippet: tool.promptSnippet },
|
|
6485
|
+
...tool.promptGuidelines === void 0 ? {} : { promptGuidelines: tool.promptGuidelines },
|
|
6420
6486
|
...tool.authService === void 0 ? {} : {
|
|
6421
6487
|
requiresAuth: {
|
|
6422
6488
|
serviceId: isQualifiedAuthServiceRef(tool.authService) ? tool.authService : resolveGlobalContributionId(namespace, tool.authService),
|
package/package.json
CHANGED