@yaklabs-ai/plugin-sdk 0.15.3 → 0.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -5
- package/THIRD-PARTY-INVENTORY.json +9 -9
- package/THIRD-PARTY-NOTICES.md +8 -8
- package/dist/agent-conversation.d.ts +1 -1
- package/dist/canonical-transcript.d.ts +133 -123
- package/dist/canonical-transcript.js +119 -44
- package/dist/disclosure.d.ts +1588 -744
- package/dist/disclosure.js +48 -59
- package/dist/kay-agent-testing.d.ts +2577 -590
- package/dist/kay-agent-testing.js +96 -3
- package/dist/kay-agent.d.ts +1791 -1710
- package/dist/kay-agent.js +310 -310
- package/dist/kay-app-session-summary.d.ts +999 -144
- package/dist/kay-app-session-summary.js +15 -15
- package/dist/kay-app.d.ts +3303 -837
- package/dist/kay-app.js +233 -6
- package/dist/phase-shift.d.ts +4 -4
- package/dist/system-one.d.ts +13 -0
- package/dist/time.d.ts +2 -4
- package/dist/transcript-review.d.ts +10 -0
- package/dist/transcript-review.js +104 -31
- package/dist/transcript.d.ts +8 -6
- package/dist/vendored-mcp.d.ts +434 -305
- package/dist/vendored-mcp.js +278 -101
- package/dist/whiteboard.d.ts +82 -0
- package/dist/whiteboard.js +174 -0
- package/package.json +5 -1
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
// packages/plugin-protocol/dist/whiteboard.js
|
|
2
|
+
import { z as z4 } from "zod";
|
|
3
|
+
|
|
4
|
+
// packages/plugin-protocol/dist/common.js
|
|
5
|
+
import { z as z3 } from "zod";
|
|
6
|
+
|
|
7
|
+
// packages/plugin-protocol/dist/schema-form.js
|
|
8
|
+
import { z } from "zod";
|
|
9
|
+
function pluginString(canonical) {
|
|
10
|
+
return canonical ? z.string().refine((value) => value === value.trim(), {
|
|
11
|
+
message: "Expected an unpadded string"
|
|
12
|
+
}) : z.string().trim();
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
// packages/plugin-protocol/dist/json.js
|
|
16
|
+
import { z as z2 } from "zod";
|
|
17
|
+
var JsonValue = z2.lazy(() => z2.union([
|
|
18
|
+
z2.string(),
|
|
19
|
+
z2.number(),
|
|
20
|
+
z2.boolean(),
|
|
21
|
+
z2.null(),
|
|
22
|
+
z2.array(JsonValue),
|
|
23
|
+
z2.record(z2.string(), JsonValue)
|
|
24
|
+
]));
|
|
25
|
+
var JsonObject = z2.record(z2.string(), JsonValue);
|
|
26
|
+
var JsonSchema = z2.record(z2.string(), JsonValue);
|
|
27
|
+
|
|
28
|
+
// packages/plugin-protocol/dist/common.js
|
|
29
|
+
var KAY_PLUGIN_PROTOCOL_VERSION = "kay.plugin.v1";
|
|
30
|
+
var KAY_PLUGIN_TARGET_NAMES = [
|
|
31
|
+
"kay.agent",
|
|
32
|
+
"kay.app",
|
|
33
|
+
"kay.ui"
|
|
34
|
+
];
|
|
35
|
+
var KayPluginProtocolVersion = z3.literal(KAY_PLUGIN_PROTOCOL_VERSION);
|
|
36
|
+
var PluginTargetName = z3.enum(KAY_PLUGIN_TARGET_NAMES);
|
|
37
|
+
var PLUGIN_ID_PATTERN = /^[a-z][a-z0-9-]*(?:\.[a-z][a-z0-9-]*)*$/;
|
|
38
|
+
var LOCAL_CONTRIBUTION_ID_PATTERN = /^[a-z][a-z0-9-]*$/;
|
|
39
|
+
var PLUGIN_TOOL_NAME_PATTERN = /^[a-z][a-z0-9_-]*$/;
|
|
40
|
+
var PACKAGE_ASSET_PATH_PATTERN = /^\.\/(?:[A-Za-z0-9._-]+\/)*[A-Za-z0-9._-]+$/;
|
|
41
|
+
var KAY_EVENT_PUBLISHER_ID = "kay";
|
|
42
|
+
var HOST_LABEL_PATTERN = /^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/;
|
|
43
|
+
var MAX_HOST_LENGTH = 253;
|
|
44
|
+
var MAX_HOST_LABEL_LENGTH = 63;
|
|
45
|
+
function createCommonSchemas(canonical) {
|
|
46
|
+
const NonEmptyString2 = pluginString(canonical).min(1);
|
|
47
|
+
const PluginId2 = pluginString(canonical).regex(PLUGIN_ID_PATTERN).refine((id) => id !== KAY_EVENT_PUBLISHER_ID, {
|
|
48
|
+
message: `'${KAY_EVENT_PUBLISHER_ID}' is reserved for Bonsai's own event publisher`
|
|
49
|
+
});
|
|
50
|
+
const PluginNamespace2 = PluginId2;
|
|
51
|
+
const LocalContributionId2 = pluginString(canonical).regex(LOCAL_CONTRIBUTION_ID_PATTERN);
|
|
52
|
+
const GlobalContributionId2 = pluginString(canonical).regex(PLUGIN_ID_PATTERN);
|
|
53
|
+
const PluginToolName2 = pluginString(canonical).regex(PLUGIN_TOOL_NAME_PATTERN);
|
|
54
|
+
const AuthServiceReference2 = GlobalContributionId2;
|
|
55
|
+
const AuthSchemeReference2 = GlobalContributionId2;
|
|
56
|
+
const AdapterSelectionKey2 = pluginString(canonical).regex(PLUGIN_ID_PATTERN);
|
|
57
|
+
const AdapterPlacement2 = z3.enum(["local-only", "anywhere"]);
|
|
58
|
+
const UriScheme2 = pluginString(canonical).regex(/^[a-z][a-z0-9+.-]*$/);
|
|
59
|
+
const MimeTypeString2 = pluginString(canonical).regex(/^[a-z0-9][a-z0-9!#$&^_.+-]*\/[a-z0-9][a-z0-9!#$&^_.+-]*$/);
|
|
60
|
+
const FileExtensionToken2 = pluginString(canonical).regex(/^[a-z0-9]+$/);
|
|
61
|
+
const CliBinaryName2 = NonEmptyString2.refine((value) => !value.includes("/"), {
|
|
62
|
+
message: "cli binding binary/alias must be a basename, not a path (no '/')"
|
|
63
|
+
});
|
|
64
|
+
const CliAuthEnvVarName2 = pluginString(canonical).regex(/^[A-Z][A-Z0-9_]*$/);
|
|
65
|
+
const PackageAssetPath2 = pluginString(canonical).regex(PACKAGE_ASSET_PATH_PATTERN).refine((value) => !value.split("/").includes(".."), {
|
|
66
|
+
message: "package asset path must not contain a '..' path segment"
|
|
67
|
+
});
|
|
68
|
+
const PluginSourceClass2 = z3.enum([
|
|
69
|
+
"bundled",
|
|
70
|
+
"org-shared",
|
|
71
|
+
"user-local",
|
|
72
|
+
"verified-marketplace",
|
|
73
|
+
"freeform"
|
|
74
|
+
]);
|
|
75
|
+
const ArtifactGenerationId2 = pluginString(canonical).min(1).brand();
|
|
76
|
+
const HttpsUrl2 = z3.url({ protocol: /^https$/ });
|
|
77
|
+
const RegistrableDomain2 = pluginString(canonical).regex(/^[a-z0-9-]+(?:\.[a-z0-9-]+)+$/);
|
|
78
|
+
const GitHostName2 = RegistrableDomain2.max(MAX_HOST_LENGTH).refine((host) => host.split(".").every((label) => label.length <= MAX_HOST_LABEL_LENGTH && HOST_LABEL_PATTERN.test(label)), {
|
|
79
|
+
message: "git host labels must be 1-63 characters and start and end with a letter or digit"
|
|
80
|
+
});
|
|
81
|
+
const GitBasicAuthUser2 = pluginString(canonical).min(1).max(128).regex(/^[A-Za-z0-9._~-]+$/);
|
|
82
|
+
const HttpStatusCode2 = z3.number().int().min(100).max(599);
|
|
83
|
+
const SignedInStatusCode2 = HttpStatusCode2.refine((status) => !(status < 200 || status >= 300 && status < 400), {
|
|
84
|
+
message: "signedInStatuses cannot include 1xx or 3xx: the probe follows redirects and never observes them as a final status"
|
|
85
|
+
});
|
|
86
|
+
const JsonPointer2 = pluginString(canonical).regex(/^(?:\/(?:[^/~]|~[01])*)*$/);
|
|
87
|
+
const TargetEntrypoint2 = z3.strictObject({
|
|
88
|
+
module: NonEmptyString2,
|
|
89
|
+
export: NonEmptyString2.optional()
|
|
90
|
+
});
|
|
91
|
+
return {
|
|
92
|
+
NonEmptyString: NonEmptyString2,
|
|
93
|
+
PluginId: PluginId2,
|
|
94
|
+
PluginNamespace: PluginNamespace2,
|
|
95
|
+
LocalContributionId: LocalContributionId2,
|
|
96
|
+
GlobalContributionId: GlobalContributionId2,
|
|
97
|
+
PluginToolName: PluginToolName2,
|
|
98
|
+
AuthServiceReference: AuthServiceReference2,
|
|
99
|
+
AuthSchemeReference: AuthSchemeReference2,
|
|
100
|
+
AdapterSelectionKey: AdapterSelectionKey2,
|
|
101
|
+
AdapterPlacement: AdapterPlacement2,
|
|
102
|
+
UriScheme: UriScheme2,
|
|
103
|
+
MimeTypeString: MimeTypeString2,
|
|
104
|
+
FileExtensionToken: FileExtensionToken2,
|
|
105
|
+
CliBinaryName: CliBinaryName2,
|
|
106
|
+
CliAuthEnvVarName: CliAuthEnvVarName2,
|
|
107
|
+
PackageAssetPath: PackageAssetPath2,
|
|
108
|
+
PluginSourceClass: PluginSourceClass2,
|
|
109
|
+
ArtifactGenerationId: ArtifactGenerationId2,
|
|
110
|
+
HttpsUrl: HttpsUrl2,
|
|
111
|
+
RegistrableDomain: RegistrableDomain2,
|
|
112
|
+
GitHostName: GitHostName2,
|
|
113
|
+
GitBasicAuthUser: GitBasicAuthUser2,
|
|
114
|
+
HttpStatusCode: HttpStatusCode2,
|
|
115
|
+
SignedInStatusCode: SignedInStatusCode2,
|
|
116
|
+
JsonPointer: JsonPointer2,
|
|
117
|
+
TargetEntrypoint: TargetEntrypoint2
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
var { NonEmptyString, PluginId, PluginNamespace, LocalContributionId, GlobalContributionId, PluginToolName, AuthServiceReference, AuthSchemeReference, AdapterSelectionKey, AdapterPlacement, UriScheme, MimeTypeString, FileExtensionToken, CliBinaryName, CliAuthEnvVarName, PackageAssetPath, PluginSourceClass, ArtifactGenerationId, HttpsUrl, RegistrableDomain, GitHostName, GitBasicAuthUser, HttpStatusCode, SignedInStatusCode, JsonPointer, TargetEntrypoint } = createCommonSchemas(false);
|
|
121
|
+
var canonicalCommonSchemas = createCommonSchemas(true);
|
|
122
|
+
|
|
123
|
+
// packages/plugin-protocol/dist/whiteboard.js
|
|
124
|
+
var WhiteboardValue = JsonValue;
|
|
125
|
+
var WhiteboardEntryEnvelope = z4.strictObject({
|
|
126
|
+
id: NonEmptyString,
|
|
127
|
+
typeId: GlobalContributionId,
|
|
128
|
+
schemaVersion: z4.number().int().positive(),
|
|
129
|
+
title: z4.string(),
|
|
130
|
+
authorSessionId: NonEmptyString.nullable()
|
|
131
|
+
});
|
|
132
|
+
var WhiteboardEntrySummary = z4.strictObject({
|
|
133
|
+
name: NonEmptyString,
|
|
134
|
+
entry: WhiteboardEntryEnvelope,
|
|
135
|
+
revision: NonEmptyString
|
|
136
|
+
});
|
|
137
|
+
var WhiteboardEntrySnapshot = WhiteboardEntrySummary.extend({
|
|
138
|
+
value: WhiteboardValue
|
|
139
|
+
});
|
|
140
|
+
var WhiteboardDiagnostic = z4.strictObject({
|
|
141
|
+
ruleId: NonEmptyString,
|
|
142
|
+
severity: z4.enum(["error", "warning"]),
|
|
143
|
+
message: NonEmptyString
|
|
144
|
+
});
|
|
145
|
+
var WhiteboardEntryInfo = z4.strictObject({
|
|
146
|
+
name: NonEmptyString,
|
|
147
|
+
revision: NonEmptyString,
|
|
148
|
+
entry: WhiteboardEntryEnvelope.optional(),
|
|
149
|
+
state: z4.enum(["available", "unavailable", "unsupported-version", "invalid"]),
|
|
150
|
+
mutable: z4.boolean(),
|
|
151
|
+
diagnostics: z4.array(z4.string())
|
|
152
|
+
});
|
|
153
|
+
var WhiteboardEntryInspection = WhiteboardEntryInfo.extend({
|
|
154
|
+
value: WhiteboardValue.optional(),
|
|
155
|
+
text: z4.string(),
|
|
156
|
+
truncated: z4.boolean()
|
|
157
|
+
});
|
|
158
|
+
var WhiteboardTypeInfo = z4.strictObject({
|
|
159
|
+
typeId: GlobalContributionId,
|
|
160
|
+
displayName: NonEmptyString,
|
|
161
|
+
schemaVersion: z4.number().int().positive(),
|
|
162
|
+
available: z4.boolean(),
|
|
163
|
+
/** A plugin-owned readonly presentation; absent types use the host fallback. */
|
|
164
|
+
presentation: z4.strictObject({
|
|
165
|
+
app: GlobalContributionId
|
|
166
|
+
}).optional()
|
|
167
|
+
});
|
|
168
|
+
export {
|
|
169
|
+
JsonValue,
|
|
170
|
+
WhiteboardEntryEnvelope,
|
|
171
|
+
WhiteboardEntryInfo,
|
|
172
|
+
WhiteboardEntryInspection,
|
|
173
|
+
WhiteboardTypeInfo
|
|
174
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yaklabs-ai/plugin-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.27.0",
|
|
4
4
|
"description": "The Kay plugin SDK — types and helpers for authoring a Kay directory plugin.",
|
|
5
5
|
"author": "YakLabs",
|
|
6
6
|
"type": "module",
|
|
@@ -57,6 +57,10 @@
|
|
|
57
57
|
"types": "./dist/app-data.d.ts",
|
|
58
58
|
"default": "./dist/app-data.js"
|
|
59
59
|
},
|
|
60
|
+
"./whiteboard": {
|
|
61
|
+
"types": "./dist/whiteboard.d.ts",
|
|
62
|
+
"default": "./dist/whiteboard.js"
|
|
63
|
+
},
|
|
60
64
|
"./transcript-review": {
|
|
61
65
|
"types": "./dist/transcript-review.d.ts",
|
|
62
66
|
"default": "./dist/transcript-review.js"
|