@yaklabs-ai/plugin-sdk 0.46.0 → 0.48.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 +2 -2
- package/THIRD-PARTY-INVENTORY.json +12 -1
- package/THIRD-PARTY-NOTICES.md +216 -1
- package/dist/canonical-transcript.d.ts +4 -0
- package/dist/canonical-transcript.js +4 -0
- package/dist/disclosure.d.ts +6 -4
- package/dist/kay-agent-testing.d.ts +9 -12
- package/dist/kay-agent.d.ts +6 -4
- package/dist/kay-app.d.ts +253 -6
- package/dist/kay-app.js +73 -5
- package/dist/whiteboard.d.ts +0 -3
- package/dist/whiteboard.js +1 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@ it under the name your plugin code actually imports:
|
|
|
13
13
|
```json
|
|
14
14
|
{
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@bonsai/plugin-sdk": "npm:@yaklabs-ai/plugin-sdk@^0.
|
|
16
|
+
"@bonsai/plugin-sdk": "npm:@yaklabs-ai/plugin-sdk@^0.48.0"
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
```
|
|
@@ -62,7 +62,7 @@ Every tool the entrypoint registers is declared in the manifest too:
|
|
|
62
62
|
"description": "Greets people by name.",
|
|
63
63
|
"version": "0.1.0",
|
|
64
64
|
"namespace": "widgets",
|
|
65
|
-
"compatibility": { "sdk": "^0.
|
|
65
|
+
"compatibility": { "sdk": "^0.48.0" },
|
|
66
66
|
"targets": {
|
|
67
67
|
"kay": {
|
|
68
68
|
"agent": {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"package": "@yaklabs-ai/plugin-sdk",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.48.0",
|
|
5
5
|
"target": "npm",
|
|
6
6
|
"firstPartyLicense": "MIT",
|
|
7
7
|
"bundled": [
|
|
@@ -34,6 +34,17 @@
|
|
|
34
34
|
"licenseSource": "https://github.com/sinclairzx81/typebox/blob/1.3.27/license",
|
|
35
35
|
"upstreamCommit": "ffe23ba614322bf0dcb846ceaf7c1bbc7ef0bba6",
|
|
36
36
|
"noticeFile": "THIRD-PARTY-NOTICES.md"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"name": "@json-render/core",
|
|
40
|
+
"version": "0.19.0",
|
|
41
|
+
"license": "Apache-2.0",
|
|
42
|
+
"copyright": "Copyright 2025 Vercel Inc.",
|
|
43
|
+
"source": "https://github.com/vercel-labs/json-render/tree/0bbe6ed6394b23b5aee25320d03c9b7ac717e5b7/packages/core",
|
|
44
|
+
"licenseSource": "https://github.com/vercel-labs/json-render/blob/0bbe6ed6394b23b5aee25320d03c9b7ac717e5b7/LICENSE",
|
|
45
|
+
"upstreamCommit": "0bbe6ed6394b23b5aee25320d03c9b7ac717e5b7",
|
|
46
|
+
"note": "Type declarations are flattened into this package; runtime code is not bundled.",
|
|
47
|
+
"noticeFile": "THIRD-PARTY-NOTICES.md"
|
|
37
48
|
}
|
|
38
49
|
],
|
|
39
50
|
"external": [
|
package/THIRD-PARTY-NOTICES.md
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
# Third-party notices
|
|
2
2
|
|
|
3
|
-
This package bundles
|
|
3
|
+
This package bundles 4 first-party-selected component(s). The notices below are reproduced verbatim from each component's upstream license source.
|
|
4
4
|
|
|
5
5
|
## @earendil-works/pi-ai@1.4.0
|
|
6
6
|
|
|
7
7
|
- Source: https://github.com/earendil-works/pi/tree/v1.4.0/packages/ai
|
|
8
|
+
- License: MIT
|
|
8
9
|
- License source: https://github.com/earendil-works/pi/blob/v1.4.0/LICENSE
|
|
9
10
|
- Upstream commit: 4a080252f06caf63a525d7873c5d94d3c23887e0
|
|
10
11
|
|
|
11
12
|
## @earendil-works/chord@1.4.0
|
|
12
13
|
|
|
13
14
|
- Source: https://github.com/earendil-works/pi/tree/v1.4.0/packages/chord
|
|
15
|
+
- License: MIT
|
|
14
16
|
- License source: https://github.com/earendil-works/pi/blob/v1.4.0/LICENSE
|
|
15
17
|
- Upstream commit: 4a080252f06caf63a525d7873c5d94d3c23887e0
|
|
16
18
|
|
|
@@ -41,6 +43,7 @@ SOFTWARE.
|
|
|
41
43
|
## typebox@1.3.27
|
|
42
44
|
|
|
43
45
|
- Source: https://github.com/sinclairzx81/typebox/tree/1.3.27
|
|
46
|
+
- License: MIT
|
|
44
47
|
- License source: https://github.com/sinclairzx81/typebox/blob/1.3.27/license
|
|
45
48
|
- Upstream commit: ffe23ba614322bf0dcb846ceaf7c1bbc7ef0bba6
|
|
46
49
|
|
|
@@ -70,4 +73,216 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
70
73
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
71
74
|
THE SOFTWARE.
|
|
72
75
|
|
|
76
|
+
## @json-render/core@0.19.0
|
|
77
|
+
|
|
78
|
+
- Source: https://github.com/vercel-labs/json-render/tree/0bbe6ed6394b23b5aee25320d03c9b7ac717e5b7/packages/core
|
|
79
|
+
- License: Apache-2.0
|
|
80
|
+
- License source: https://github.com/vercel-labs/json-render/blob/0bbe6ed6394b23b5aee25320d03c9b7ac717e5b7/LICENSE
|
|
81
|
+
- Upstream commit: 0bbe6ed6394b23b5aee25320d03c9b7ac717e5b7
|
|
82
|
+
- Integration: Type declarations are flattened into this package; runtime code is not bundled.
|
|
83
|
+
|
|
84
|
+
License text for the component(s) above, verbatim from the license source:
|
|
85
|
+
|
|
86
|
+
Apache License
|
|
87
|
+
Version 2.0, January 2004
|
|
88
|
+
http://www.apache.org/licenses/
|
|
89
|
+
|
|
90
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
91
|
+
|
|
92
|
+
1. Definitions.
|
|
93
|
+
|
|
94
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
95
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
96
|
+
|
|
97
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
98
|
+
the copyright owner that is granting the License.
|
|
99
|
+
|
|
100
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
101
|
+
other entities that control, are controlled by, or are under common
|
|
102
|
+
control with that entity. For the purposes of this definition,
|
|
103
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
104
|
+
direction or management of such entity, whether by contract or
|
|
105
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
106
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
107
|
+
|
|
108
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
109
|
+
exercising permissions granted by this License.
|
|
110
|
+
|
|
111
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
112
|
+
including but not limited to software source code, documentation
|
|
113
|
+
source, and configuration files.
|
|
114
|
+
|
|
115
|
+
"Object" form shall mean any form resulting from mechanical
|
|
116
|
+
transformation or translation of a Source form, including but
|
|
117
|
+
not limited to compiled object code, generated documentation,
|
|
118
|
+
and conversions to other media types.
|
|
119
|
+
|
|
120
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
121
|
+
Object form, made available under the License, as indicated by a
|
|
122
|
+
copyright notice that is included in or attached to the work
|
|
123
|
+
(an example is provided in the Appendix below).
|
|
124
|
+
|
|
125
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
126
|
+
form, that is based on (or derived from) the Work and for which the
|
|
127
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
128
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
129
|
+
of this License, Derivative Works shall not include works that remain
|
|
130
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
131
|
+
the Work and Derivative Works thereof.
|
|
132
|
+
|
|
133
|
+
"Contribution" shall mean any work of authorship, including
|
|
134
|
+
the original version of the Work and any modifications or additions
|
|
135
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
136
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
137
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
138
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
139
|
+
means any form of electronic, verbal, or written communication sent
|
|
140
|
+
to the Licensor or its representatives, including but not limited to
|
|
141
|
+
communication on electronic mailing lists, source code control systems,
|
|
142
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
143
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
144
|
+
excluding communication that is conspicuously marked or otherwise
|
|
145
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
146
|
+
|
|
147
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
148
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
149
|
+
subsequently incorporated within the Work.
|
|
150
|
+
|
|
151
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
152
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
153
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
154
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
155
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
156
|
+
Work and such Derivative Works in Source or Object form.
|
|
157
|
+
|
|
158
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
159
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
160
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
161
|
+
(except as stated in this section) patent license to make, have made,
|
|
162
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
163
|
+
where such license applies only to those patent claims licensable
|
|
164
|
+
by such Contributor that are necessarily infringed by their
|
|
165
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
166
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
167
|
+
institute patent litigation against any entity (including a
|
|
168
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
169
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
170
|
+
or contributory patent infringement, then any patent licenses
|
|
171
|
+
granted to You under this License for that Work shall terminate
|
|
172
|
+
as of the date such litigation is filed.
|
|
173
|
+
|
|
174
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
175
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
176
|
+
modifications, and in Source or Object form, provided that You
|
|
177
|
+
meet the following conditions:
|
|
178
|
+
|
|
179
|
+
(a) You must give any other recipients of the Work or
|
|
180
|
+
Derivative Works a copy of this License; and
|
|
181
|
+
|
|
182
|
+
(b) You must cause any modified files to carry prominent notices
|
|
183
|
+
stating that You changed the files; and
|
|
184
|
+
|
|
185
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
186
|
+
that You distribute, all copyright, patent, trademark, and
|
|
187
|
+
attribution notices from the Source form of the Work,
|
|
188
|
+
excluding those notices that do not pertain to any part of
|
|
189
|
+
the Derivative Works; and
|
|
190
|
+
|
|
191
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
192
|
+
distribution, then any Derivative Works that You distribute must
|
|
193
|
+
include a readable copy of the attribution notices contained
|
|
194
|
+
within such NOTICE file, excluding those notices that do not
|
|
195
|
+
pertain to any part of the Derivative Works, in at least one
|
|
196
|
+
of the following places: within a NOTICE text file distributed
|
|
197
|
+
as part of the Derivative Works; within the Source form or
|
|
198
|
+
documentation, if provided along with the Derivative Works; or,
|
|
199
|
+
within a display generated by the Derivative Works, if and
|
|
200
|
+
wherever such third-party notices normally appear. The contents
|
|
201
|
+
of the NOTICE file are for informational purposes only and
|
|
202
|
+
do not modify the License. You may add Your own attribution
|
|
203
|
+
notices within Derivative Works that You distribute, alongside
|
|
204
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
205
|
+
that such additional attribution notices cannot be construed
|
|
206
|
+
as modifying the License.
|
|
207
|
+
|
|
208
|
+
You may add Your own copyright statement to Your modifications and
|
|
209
|
+
may provide additional or different license terms and conditions
|
|
210
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
211
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
212
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
213
|
+
the conditions stated in this License.
|
|
214
|
+
|
|
215
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
216
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
217
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
218
|
+
this License, without any additional terms or conditions.
|
|
219
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
220
|
+
the terms of any separate license agreement you may have executed
|
|
221
|
+
with Licensor regarding such Contributions.
|
|
222
|
+
|
|
223
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
224
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
225
|
+
except as required for reasonable and customary use in describing the
|
|
226
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
227
|
+
|
|
228
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
229
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
230
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
231
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
232
|
+
implied, including, without limitation, any warranties or conditions
|
|
233
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
234
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
235
|
+
appropriateness of using or redistributing the Work and assume any
|
|
236
|
+
risks associated with Your exercise of permissions under this License.
|
|
237
|
+
|
|
238
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
239
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
240
|
+
unless required by applicable law (such as deliberate and grossly
|
|
241
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
242
|
+
liable to You for damages, including any direct, indirect, special,
|
|
243
|
+
incidental, or consequential damages of any character arising as a
|
|
244
|
+
result of this License or out of the use or inability to use the
|
|
245
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
246
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
247
|
+
other commercial damages or losses), even if such Contributor
|
|
248
|
+
has been advised of the possibility of such damages.
|
|
249
|
+
|
|
250
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
251
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
252
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
253
|
+
or other liability obligations and/or rights consistent with this
|
|
254
|
+
License. However, in accepting such obligations, You may act only
|
|
255
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
256
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
257
|
+
defend, and hold each Contributor harmless for any liability
|
|
258
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
259
|
+
of your accepting any such warranty or additional liability.
|
|
260
|
+
|
|
261
|
+
END OF TERMS AND CONDITIONS
|
|
262
|
+
|
|
263
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
264
|
+
|
|
265
|
+
To apply the Apache License to your work, attach the following
|
|
266
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
267
|
+
replaced with your own identifying information. (Don't include
|
|
268
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
269
|
+
comment syntax for the file format. We also recommend that a
|
|
270
|
+
file or class name and description of purpose be included on the
|
|
271
|
+
same "printed page" as the copyright notice for easier
|
|
272
|
+
identification within third-party archives.
|
|
273
|
+
|
|
274
|
+
Copyright 2025 Vercel Inc.
|
|
275
|
+
|
|
276
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
277
|
+
you may not use this file except in compliance with the License.
|
|
278
|
+
You may obtain a copy of the License at
|
|
279
|
+
|
|
280
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
281
|
+
|
|
282
|
+
Unless required by applicable law or agreed to in writing, software
|
|
283
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
284
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
285
|
+
See the License for the specific language governing permissions and
|
|
286
|
+
limitations under the License.
|
|
287
|
+
|
|
73
288
|
The package's own code is licensed under the MIT License in `LICENSE`.
|
|
@@ -2152,6 +2152,8 @@ declare interface InteractiveQueuedMessage {
|
|
|
2152
2152
|
readonly attachments?: AttachmentsDetails["refs"] | undefined;
|
|
2153
2153
|
readonly context?: readonly ManagedHumanQueueContextPart[] | undefined;
|
|
2154
2154
|
readonly resendError?: string | undefined;
|
|
2155
|
+
/** Why this message is waiting, when something is stopping its delivery. */
|
|
2156
|
+
readonly deliveryError?: string | undefined;
|
|
2155
2157
|
/**
|
|
2156
2158
|
* Managed-queue lifecycle, present only for items projected from a
|
|
2157
2159
|
* `managed_human_queue_update` snapshot: `queued` (live in a delivery queue) or `editing`
|
|
@@ -2656,6 +2658,7 @@ declare interface ManagedHumanQueueItemSnapshot {
|
|
|
2656
2658
|
readonly attachments?: AttachmentsDetails["refs"] | undefined;
|
|
2657
2659
|
readonly context?: readonly ManagedHumanQueueContextPart[] | undefined;
|
|
2658
2660
|
readonly resendError?: string | undefined;
|
|
2661
|
+
readonly deliveryError?: string | undefined;
|
|
2659
2662
|
}
|
|
2660
2663
|
|
|
2661
2664
|
/**
|
|
@@ -6902,6 +6905,7 @@ declare const toolCallFailureCauseSchema: z.ZodObject<{
|
|
|
6902
6905
|
errorName: z.ZodOptional<z.ZodString>;
|
|
6903
6906
|
errorCode: z.ZodOptional<z.ZodString>;
|
|
6904
6907
|
providerCode: z.ZodOptional<z.ZodString>;
|
|
6908
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
6905
6909
|
status: z.ZodOptional<z.ZodNumber>;
|
|
6906
6910
|
editIndex: z.ZodOptional<z.ZodNumber>;
|
|
6907
6911
|
occurrences: z.ZodOptional<z.ZodNumber>;
|
|
@@ -445,6 +445,7 @@ var HerdSessionProjection = z4.discriminatedUnion("type", [
|
|
|
445
445
|
attachments: z4.array(ManagedQueueAttachmentRef).optional(),
|
|
446
446
|
context: z4.array(ManagedQueueContextPart).optional(),
|
|
447
447
|
resendError: z4.string().optional(),
|
|
448
|
+
deliveryError: z4.string().optional(),
|
|
448
449
|
text: z4.string(),
|
|
449
450
|
channel: z4.enum(["follow_up", "steer"]),
|
|
450
451
|
status: z4.enum(["queued", "editing"])
|
|
@@ -730,6 +731,7 @@ var toolCallFailureDetailsSchema = z5.strictObject({
|
|
|
730
731
|
errorName: z5.string().optional(),
|
|
731
732
|
errorCode: z5.string().optional(),
|
|
732
733
|
providerCode: z5.string().optional(),
|
|
734
|
+
provider: z5.string().optional(),
|
|
733
735
|
status: z5.number().int().min(100).max(599).optional(),
|
|
734
736
|
editIndex: count.optional(),
|
|
735
737
|
occurrences: count.optional(),
|
|
@@ -1965,6 +1967,7 @@ function reduceManagedHumanQueueUpdate(state, event) {
|
|
|
1965
1967
|
});
|
|
1966
1968
|
const context = extractQueuedMessageContext(record);
|
|
1967
1969
|
const resendError = getString(record, "resendError");
|
|
1970
|
+
const deliveryError = getString(record, "deliveryError");
|
|
1968
1971
|
return [
|
|
1969
1972
|
{
|
|
1970
1973
|
id,
|
|
@@ -1975,6 +1978,7 @@ function reduceManagedHumanQueueUpdate(state, event) {
|
|
|
1975
1978
|
...attachments === void 0 || attachments.length === 0 ? {} : { attachments },
|
|
1976
1979
|
...context === void 0 ? {} : { context },
|
|
1977
1980
|
...resendError === void 0 ? {} : { resendError },
|
|
1981
|
+
...deliveryError === void 0 ? {} : { deliveryError },
|
|
1978
1982
|
...status === "queued" || status === "editing" ? { status } : {}
|
|
1979
1983
|
}
|
|
1980
1984
|
];
|
package/dist/disclosure.d.ts
CHANGED
|
@@ -2442,8 +2442,12 @@ declare const KAY_PLUGIN_PROTOCOL_VERSION: "kay.plugin.v1";
|
|
|
2442
2442
|
*
|
|
2443
2443
|
* 0.46.0 adds `@bonsai/plugin-sdk/artifact-provenance`, so a plugin shipped as files can finalize
|
|
2444
2444
|
* and read the provenance the host captured. Additive: a plugin that imports it declares ^0.46.0.
|
|
2445
|
+
*
|
|
2446
|
+
* 0.47.0 adds card layouts and builders; successful card submits now require a summary.
|
|
2447
|
+
*
|
|
2448
|
+
* 0.48.0 adds the models.complete UI capability.
|
|
2445
2449
|
*/
|
|
2446
|
-
declare const KAY_PLUGIN_SDK_VERSION: "0.
|
|
2450
|
+
declare const KAY_PLUGIN_SDK_VERSION: "0.48.0";
|
|
2447
2451
|
|
|
2448
2452
|
declare const KAY_PLUGIN_TARGET_NAMES: readonly ["kay.agent", "kay.app", "kay.ui"];
|
|
2449
2453
|
|
|
@@ -7819,6 +7823,7 @@ declare const toolCallFailureCauseSchema: z.ZodObject<{
|
|
|
7819
7823
|
errorName: z.ZodOptional<z.ZodString>;
|
|
7820
7824
|
errorCode: z.ZodOptional<z.ZodString>;
|
|
7821
7825
|
providerCode: z.ZodOptional<z.ZodString>;
|
|
7826
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
7822
7827
|
status: z.ZodOptional<z.ZodNumber>;
|
|
7823
7828
|
editIndex: z.ZodOptional<z.ZodNumber>;
|
|
7824
7829
|
occurrences: z.ZodOptional<z.ZodNumber>;
|
|
@@ -10533,9 +10538,6 @@ declare const WhiteboardTypeInfo: z.ZodObject<{
|
|
|
10533
10538
|
displayName: z.ZodString;
|
|
10534
10539
|
schemaVersion: z.ZodNumber;
|
|
10535
10540
|
available: z.ZodBoolean;
|
|
10536
|
-
presentation: z.ZodOptional<z.ZodObject<{
|
|
10537
|
-
app: z.ZodString;
|
|
10538
|
-
}, z.core.$strict>>;
|
|
10539
10541
|
}, z.core.$strict>;
|
|
10540
10542
|
|
|
10541
10543
|
declare type WhiteboardTypeInfo = Readonly<z.infer<typeof WhiteboardTypeInfo>>;
|
|
@@ -2496,8 +2496,12 @@ declare const KAY_PLUGIN_PROTOCOL_VERSION: "kay.plugin.v1";
|
|
|
2496
2496
|
*
|
|
2497
2497
|
* 0.46.0 adds `@bonsai/plugin-sdk/artifact-provenance`, so a plugin shipped as files can finalize
|
|
2498
2498
|
* and read the provenance the host captured. Additive: a plugin that imports it declares ^0.46.0.
|
|
2499
|
+
*
|
|
2500
|
+
* 0.47.0 adds card layouts and builders; successful card submits now require a summary.
|
|
2501
|
+
*
|
|
2502
|
+
* 0.48.0 adds the models.complete UI capability.
|
|
2499
2503
|
*/
|
|
2500
|
-
declare const KAY_PLUGIN_SDK_VERSION: "0.
|
|
2504
|
+
declare const KAY_PLUGIN_SDK_VERSION: "0.48.0";
|
|
2501
2505
|
|
|
2502
2506
|
declare const KAY_PLUGIN_TARGET_NAMES: readonly ["kay.agent", "kay.app", "kay.ui"];
|
|
2503
2507
|
|
|
@@ -4872,9 +4876,8 @@ declare const ResolvedPluginContractV1: z.ZodObject<{
|
|
|
4872
4876
|
storage: "storage";
|
|
4873
4877
|
uriModule: "uriModule";
|
|
4874
4878
|
authService: "authService";
|
|
4875
|
-
app: "app";
|
|
4876
4879
|
command: "command";
|
|
4877
|
-
|
|
4880
|
+
app: "app";
|
|
4878
4881
|
skill: "skill";
|
|
4879
4882
|
converter: "converter";
|
|
4880
4883
|
artifactUriModule: "artifactUriModule";
|
|
@@ -4897,11 +4900,9 @@ declare const ResolvedPluginContractV1: z.ZodObject<{
|
|
|
4897
4900
|
mcpServer: "mcpServer";
|
|
4898
4901
|
uiCommand: "uiCommand";
|
|
4899
4902
|
uiSlot: "uiSlot";
|
|
4900
|
-
settingsPanel: "settingsPanel";
|
|
4901
|
-
resultRenderer: "resultRenderer";
|
|
4902
4903
|
referencePresentation: "referencePresentation";
|
|
4903
|
-
view: "view";
|
|
4904
4904
|
theme: "theme";
|
|
4905
|
+
configSection: "configSection";
|
|
4905
4906
|
}>;
|
|
4906
4907
|
localId: z.ZodString;
|
|
4907
4908
|
globalId: z.ZodString;
|
|
@@ -5754,9 +5755,6 @@ declare const ResolvedPluginContractV1: z.ZodObject<{
|
|
|
5754
5755
|
bodyField: z.ZodString;
|
|
5755
5756
|
}, z.core.$strict>], "kind">;
|
|
5756
5757
|
valueSchema: z.ZodRecord<z.ZodString, z.ZodType<authoringCommonSchemas.JsonValue, unknown, z.core.$ZodTypeInternals<authoringCommonSchemas.JsonValue, unknown>>>;
|
|
5757
|
-
presentation: z.ZodOptional<z.ZodObject<{
|
|
5758
|
-
app: z.ZodString;
|
|
5759
|
-
}, z.core.$strict>>;
|
|
5760
5758
|
}, z.core.$strict>>>;
|
|
5761
5759
|
kayAppMcpServers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
5762
5760
|
name: z.ZodString;
|
|
@@ -5921,6 +5919,7 @@ declare const ResolvedPluginContractV1: z.ZodObject<{
|
|
|
5921
5919
|
host: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
5922
5920
|
"navigation.open-session": "navigation.open-session";
|
|
5923
5921
|
"sessions.create": "sessions.create";
|
|
5922
|
+
"models.complete": "models.complete";
|
|
5924
5923
|
"artifacts.read": "artifacts.read";
|
|
5925
5924
|
"artifacts.preview": "artifacts.preview";
|
|
5926
5925
|
"markdown.document-view": "markdown.document-view";
|
|
@@ -8996,6 +8995,7 @@ declare const toolCallFailureCauseSchema: z.ZodObject<{
|
|
|
8996
8995
|
errorName: z.ZodOptional<z.ZodString>;
|
|
8997
8996
|
errorCode: z.ZodOptional<z.ZodString>;
|
|
8998
8997
|
providerCode: z.ZodOptional<z.ZodString>;
|
|
8998
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
8999
8999
|
status: z.ZodOptional<z.ZodNumber>;
|
|
9000
9000
|
editIndex: z.ZodOptional<z.ZodNumber>;
|
|
9001
9001
|
occurrences: z.ZodOptional<z.ZodNumber>;
|
|
@@ -11710,9 +11710,6 @@ declare const WhiteboardTypeInfo: z.ZodObject<{
|
|
|
11710
11710
|
displayName: z.ZodString;
|
|
11711
11711
|
schemaVersion: z.ZodNumber;
|
|
11712
11712
|
available: z.ZodBoolean;
|
|
11713
|
-
presentation: z.ZodOptional<z.ZodObject<{
|
|
11714
|
-
app: z.ZodString;
|
|
11715
|
-
}, z.core.$strict>>;
|
|
11716
11713
|
}, z.core.$strict>;
|
|
11717
11714
|
|
|
11718
11715
|
declare type WhiteboardTypeInfo = Readonly<z.infer<typeof WhiteboardTypeInfo>>;
|
package/dist/kay-agent.d.ts
CHANGED
|
@@ -2771,8 +2771,12 @@ declare const KAY_PLUGIN_PROTOCOL_VERSION: "kay.plugin.v1";
|
|
|
2771
2771
|
*
|
|
2772
2772
|
* 0.46.0 adds `@bonsai/plugin-sdk/artifact-provenance`, so a plugin shipped as files can finalize
|
|
2773
2773
|
* and read the provenance the host captured. Additive: a plugin that imports it declares ^0.46.0.
|
|
2774
|
+
*
|
|
2775
|
+
* 0.47.0 adds card layouts and builders; successful card submits now require a summary.
|
|
2776
|
+
*
|
|
2777
|
+
* 0.48.0 adds the models.complete UI capability.
|
|
2774
2778
|
*/
|
|
2775
|
-
declare const KAY_PLUGIN_SDK_VERSION: "0.
|
|
2779
|
+
declare const KAY_PLUGIN_SDK_VERSION: "0.48.0";
|
|
2776
2780
|
|
|
2777
2781
|
declare const KAY_PLUGIN_TARGET_NAMES: readonly ["kay.agent", "kay.app", "kay.ui"];
|
|
2778
2782
|
|
|
@@ -9049,6 +9053,7 @@ declare const toolCallFailureCauseSchema: z.ZodObject<{
|
|
|
9049
9053
|
errorName: z.ZodOptional<z.ZodString>;
|
|
9050
9054
|
errorCode: z.ZodOptional<z.ZodString>;
|
|
9051
9055
|
providerCode: z.ZodOptional<z.ZodString>;
|
|
9056
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
9052
9057
|
status: z.ZodOptional<z.ZodNumber>;
|
|
9053
9058
|
editIndex: z.ZodOptional<z.ZodNumber>;
|
|
9054
9059
|
occurrences: z.ZodOptional<z.ZodNumber>;
|
|
@@ -12058,9 +12063,6 @@ export declare const WhiteboardTypeInfo: z.ZodObject<{
|
|
|
12058
12063
|
displayName: z.ZodString;
|
|
12059
12064
|
schemaVersion: z.ZodNumber;
|
|
12060
12065
|
available: z.ZodBoolean;
|
|
12061
|
-
presentation: z.ZodOptional<z.ZodObject<{
|
|
12062
|
-
app: z.ZodString;
|
|
12063
|
-
}, z.core.$strict>>;
|
|
12064
12066
|
}, z.core.$strict>;
|
|
12065
12067
|
|
|
12066
12068
|
export declare type WhiteboardTypeInfo = Readonly<z.infer<typeof WhiteboardTypeInfo>>;
|
package/dist/kay-app.d.ts
CHANGED
|
@@ -34,6 +34,60 @@ export declare interface AccessApprovalTypeDefinition {
|
|
|
34
34
|
}, ctx: AccessApprovalContext) => Promise<FinalizedAccessApproval>;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
+
/**
|
|
38
|
+
* Action binding — maps an event to an action invocation.
|
|
39
|
+
*
|
|
40
|
+
* Used inside the `on` field of a UIElement:
|
|
41
|
+
* ```json
|
|
42
|
+
* { "on": { "press": { "action": "setState", "params": { "statePath": "/x", "value": 1 } } } }
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
declare interface ActionBinding {
|
|
46
|
+
/** Action name (must be in catalog) */
|
|
47
|
+
action: string;
|
|
48
|
+
/** Parameters to pass to the action handler */
|
|
49
|
+
params?: Record<string, DynamicValue>;
|
|
50
|
+
/** Confirmation dialog before execution */
|
|
51
|
+
confirm?: ActionConfirm;
|
|
52
|
+
/** Handler after successful execution */
|
|
53
|
+
onSuccess?: ActionOnSuccess;
|
|
54
|
+
/** Handler after failed execution */
|
|
55
|
+
onError?: ActionOnError;
|
|
56
|
+
/** Whether to prevent default browser behavior (e.g. navigation on links) */
|
|
57
|
+
preventDefault?: boolean;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Confirmation dialog configuration
|
|
62
|
+
*/
|
|
63
|
+
declare interface ActionConfirm {
|
|
64
|
+
title: string;
|
|
65
|
+
message: string;
|
|
66
|
+
confirmLabel?: string;
|
|
67
|
+
cancelLabel?: string;
|
|
68
|
+
variant?: "default" | "danger";
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Action error handler
|
|
73
|
+
*/
|
|
74
|
+
declare type ActionOnError = {
|
|
75
|
+
set: Record<string, unknown>;
|
|
76
|
+
} | {
|
|
77
|
+
action: string;
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Action success handler
|
|
82
|
+
*/
|
|
83
|
+
declare type ActionOnSuccess = {
|
|
84
|
+
navigate: string;
|
|
85
|
+
} | {
|
|
86
|
+
set: Record<string, unknown>;
|
|
87
|
+
} | {
|
|
88
|
+
action: string;
|
|
89
|
+
};
|
|
90
|
+
|
|
37
91
|
declare const AdapterPlacement: z.ZodEnum<{
|
|
38
92
|
"local-only": "local-only";
|
|
39
93
|
anywhere: "anywhere";
|
|
@@ -107,6 +161,15 @@ export declare type AgentToolUpdateCallback<T = any> = (partialResult: AgentTool
|
|
|
107
161
|
|
|
108
162
|
declare const Alpha: TAlpha;
|
|
109
163
|
|
|
164
|
+
/**
|
|
165
|
+
* AND wrapper — all child conditions must be true.
|
|
166
|
+
* This is the explicit form of the implicit array AND (`SingleCondition[]`).
|
|
167
|
+
* Unlike the implicit form, `$and` supports nested `$or` and `$and` conditions.
|
|
168
|
+
*/
|
|
169
|
+
declare type AndCondition = {
|
|
170
|
+
$and: VisibilityCondition[];
|
|
171
|
+
};
|
|
172
|
+
|
|
110
173
|
/** Compatibility settings for Anthropic Messages-compatible APIs. */
|
|
111
174
|
declare interface AnthropicMessagesCompat extends Static<typeof AnthropicMessagesCompatSchema> {
|
|
112
175
|
}
|
|
@@ -581,6 +644,9 @@ declare function Capitalize_2<Type extends TSchema>(type: Type, options?: TSchem
|
|
|
581
644
|
/** Creates a deferred Capitalize action. */
|
|
582
645
|
declare function CapitalizeDeferred<Type extends TSchema>(type: Type, options?: TSchemaOptions): TCapitalizeDeferred<Type>;
|
|
583
646
|
|
|
647
|
+
/** Build a json-render card; state is shared by every child through JSON pointers. */
|
|
648
|
+
export declare function card(title: string, children: readonly KayAppCardLayout[], state?: Record<string, unknown>): KayAppCardLayout;
|
|
649
|
+
|
|
584
650
|
declare namespace Char {
|
|
585
651
|
export {
|
|
586
652
|
TAlpha,
|
|
@@ -676,6 +742,34 @@ declare const CompareResultLeftInside = 2;
|
|
|
676
742
|
|
|
677
743
|
declare const CompareResultRightInside = 3;
|
|
678
744
|
|
|
745
|
+
/**
|
|
746
|
+
* Shared comparison operators for visibility conditions.
|
|
747
|
+
*
|
|
748
|
+
* Use at most ONE comparison operator per condition. If multiple are
|
|
749
|
+
* provided, only the first matching one is evaluated (precedence:
|
|
750
|
+
* eq > neq > gt > gte > lt > lte). With no operator, truthiness is checked.
|
|
751
|
+
*
|
|
752
|
+
* `not` inverts the final result of whichever operator (or truthiness
|
|
753
|
+
* check) is used.
|
|
754
|
+
*/
|
|
755
|
+
declare type ComparisonOperators = {
|
|
756
|
+
eq?: unknown;
|
|
757
|
+
neq?: unknown;
|
|
758
|
+
gt?: number | {
|
|
759
|
+
$state: string;
|
|
760
|
+
};
|
|
761
|
+
gte?: number | {
|
|
762
|
+
$state: string;
|
|
763
|
+
};
|
|
764
|
+
lt?: number | {
|
|
765
|
+
$state: string;
|
|
766
|
+
};
|
|
767
|
+
lte?: number | {
|
|
768
|
+
$state: string;
|
|
769
|
+
};
|
|
770
|
+
not?: true;
|
|
771
|
+
};
|
|
772
|
+
|
|
679
773
|
declare const COMPOSER_REFERENCES_CUSTOM_TYPE = "composer_references";
|
|
680
774
|
|
|
681
775
|
declare interface ComposerReferencesDetails {
|
|
@@ -1193,6 +1287,16 @@ declare interface DynamicContextSection {
|
|
|
1193
1287
|
readonly items?: readonly DynamicContextItem[];
|
|
1194
1288
|
}
|
|
1195
1289
|
|
|
1290
|
+
/**
|
|
1291
|
+
* Dynamic value - can be a literal or a `{ $state }` reference to the state model.
|
|
1292
|
+
*
|
|
1293
|
+
* Used in action params and validation args where values can either be
|
|
1294
|
+
* hardcoded or resolved from state at runtime.
|
|
1295
|
+
*/
|
|
1296
|
+
declare type DynamicValue<T = unknown> = T | {
|
|
1297
|
+
$state: string;
|
|
1298
|
+
};
|
|
1299
|
+
|
|
1196
1300
|
declare const Element: (input: string) => [unknown, string] | [];
|
|
1197
1301
|
|
|
1198
1302
|
declare const ElementBase: (input: string) => [unknown, string] | [];
|
|
@@ -1715,6 +1819,14 @@ declare const IndexArray_0: (input: string, result?: unknown[]) => [unknown[], s
|
|
|
1715
1819
|
|
|
1716
1820
|
declare function IndexArrayMapping(input: ([unknown, unknown, unknown] | [unknown, unknown])[]): unknown;
|
|
1717
1821
|
|
|
1822
|
+
/**
|
|
1823
|
+
* A condition that resolves `$index` to the current repeat array index.
|
|
1824
|
+
* Only meaningful inside a `repeat` scope.
|
|
1825
|
+
*/
|
|
1826
|
+
declare type IndexCondition = {
|
|
1827
|
+
$index: true;
|
|
1828
|
+
} & ComparisonOperators;
|
|
1829
|
+
|
|
1718
1830
|
/** Creates a deferred Index action. */
|
|
1719
1831
|
declare function IndexDeferred<Type extends TSchema, Indexer extends TSchema>(type: Type, indexer: Indexer, options?: TSchemaOptions): TIndexDeferred<Type, Indexer>;
|
|
1720
1832
|
|
|
@@ -2005,6 +2117,16 @@ declare function IsUnsafe(value: unknown): value is TUnsafe;
|
|
|
2005
2117
|
/** Returns true if the given value is TVoid. */
|
|
2006
2118
|
declare function IsVoid(value: unknown): value is TVoid;
|
|
2007
2119
|
|
|
2120
|
+
/**
|
|
2121
|
+
* A condition that resolves `$item` to a field on the current repeat item.
|
|
2122
|
+
* Only meaningful inside a `repeat` scope.
|
|
2123
|
+
*
|
|
2124
|
+
* Use `""` to reference the whole item, or `"field"` for a specific field.
|
|
2125
|
+
*/
|
|
2126
|
+
declare type ItemCondition = {
|
|
2127
|
+
$item: string;
|
|
2128
|
+
} & ComparisonOperators;
|
|
2129
|
+
|
|
2008
2130
|
declare const JsonObject: z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
|
|
2009
2131
|
|
|
2010
2132
|
declare type JsonObject = z.infer<typeof JsonObject>;
|
|
@@ -2756,8 +2878,12 @@ declare const KAY_PLUGIN_PROTOCOL_VERSION: "kay.plugin.v1";
|
|
|
2756
2878
|
*
|
|
2757
2879
|
* 0.46.0 adds `@bonsai/plugin-sdk/artifact-provenance`, so a plugin shipped as files can finalize
|
|
2758
2880
|
* and read the provenance the host captured. Additive: a plugin that imports it declares ^0.46.0.
|
|
2881
|
+
*
|
|
2882
|
+
* 0.47.0 adds card layouts and builders; successful card submits now require a summary.
|
|
2883
|
+
*
|
|
2884
|
+
* 0.48.0 adds the models.complete UI capability.
|
|
2759
2885
|
*/
|
|
2760
|
-
declare const KAY_PLUGIN_SDK_VERSION: "0.
|
|
2886
|
+
declare const KAY_PLUGIN_SDK_VERSION: "0.48.0";
|
|
2761
2887
|
|
|
2762
2888
|
declare const KAY_PLUGIN_TARGET_NAMES: readonly ["kay.agent", "kay.app", "kay.ui"];
|
|
2763
2889
|
|
|
@@ -3983,17 +4109,38 @@ export declare interface KayAppBackgroundCredentialRequest {
|
|
|
3983
4109
|
readonly jobId: string;
|
|
3984
4110
|
}
|
|
3985
4111
|
|
|
4112
|
+
export declare interface KayAppCardFieldOptions {
|
|
4113
|
+
readonly label: string;
|
|
4114
|
+
readonly placeholder?: string;
|
|
4115
|
+
readonly required?: boolean;
|
|
4116
|
+
}
|
|
4117
|
+
|
|
3986
4118
|
/** The background operations of a manifest-declared plugin card. */
|
|
3987
4119
|
export declare interface KayAppCardImplementation<Input = unknown, Data = unknown, Values = unknown> {
|
|
3988
|
-
read(inputs: Input):
|
|
4120
|
+
read(inputs: Input): KayAppCardReadResult<Data> | Promise<KayAppCardReadResult<Data>>;
|
|
3989
4121
|
submit(request: {
|
|
3990
4122
|
readonly inputs: Input;
|
|
3991
4123
|
readonly values: Values;
|
|
3992
|
-
}):
|
|
4124
|
+
}): KayAppCardSubmitResult<Data> | Promise<KayAppCardSubmitResult<Data>>;
|
|
3993
4125
|
}
|
|
3994
4126
|
|
|
4127
|
+
export declare type KayAppCardLayout = Extract<PluginCardReadResult<never>, {
|
|
4128
|
+
presentation: "layout";
|
|
4129
|
+
}>["layout"];
|
|
4130
|
+
|
|
4131
|
+
export declare type KayAppCardReadResult<T> = PluginCardReadResult<T>;
|
|
4132
|
+
|
|
3995
4133
|
export declare type KayAppCardResult<T> = PluginCardResult<T>;
|
|
3996
4134
|
|
|
4135
|
+
export declare interface KayAppCardSelectOptions extends KayAppCardFieldOptions {
|
|
4136
|
+
readonly options: readonly {
|
|
4137
|
+
readonly value: string;
|
|
4138
|
+
readonly label: string;
|
|
4139
|
+
}[];
|
|
4140
|
+
}
|
|
4141
|
+
|
|
4142
|
+
export declare type KayAppCardSubmitResult<T> = PluginCardSubmitResult<T>;
|
|
4143
|
+
|
|
3997
4144
|
/**
|
|
3998
4145
|
* The `kay.app` system-prompt contract (`app.systemPrompt`): text a plugin adds to every chat's
|
|
3999
4146
|
* system prompt, rendered by the daemon from a few facts about the chat and reused across chats.
|
|
@@ -9061,6 +9208,8 @@ declare function ModuleDeferred<Declarations extends TProperties>(declarations:
|
|
|
9061
9208
|
|
|
9062
9209
|
declare function ModuleMapping(input: [unknown, unknown]): unknown;
|
|
9063
9210
|
|
|
9211
|
+
export declare function multiSelect(name: string, options: KayAppCardSelectOptions): KayAppCardLayout;
|
|
9212
|
+
|
|
9064
9213
|
/** A tool call that another tool made while it ran, for example from a codemode script. */
|
|
9065
9214
|
declare interface NestedToolCallRecord {
|
|
9066
9215
|
id: string;
|
|
@@ -9326,6 +9475,13 @@ declare const OptionalSemiColon: (input: string) => [unknown, string] | [];
|
|
|
9326
9475
|
|
|
9327
9476
|
declare function OptionalSemiColonMapping(input: [unknown] | []): unknown;
|
|
9328
9477
|
|
|
9478
|
+
/**
|
|
9479
|
+
* OR wrapper — at least one child condition must be true.
|
|
9480
|
+
*/
|
|
9481
|
+
declare type OrCondition = {
|
|
9482
|
+
$or: VisibilityCondition[];
|
|
9483
|
+
};
|
|
9484
|
+
|
|
9329
9485
|
declare const PackageAssetPath: z.ZodString;
|
|
9330
9486
|
|
|
9331
9487
|
declare type PackageAssetPath = z.infer<typeof PackageAssetPath>;
|
|
@@ -9828,6 +9984,12 @@ export declare const PluginAgentDefinitionPermissionRule: z.ZodObject<{
|
|
|
9828
9984
|
|
|
9829
9985
|
export declare type PluginAgentDefinitionPermissionRule = z.infer<typeof PluginAgentDefinitionPermissionRule>;
|
|
9830
9986
|
|
|
9987
|
+
declare type PluginCardReadResult<T> = PluginCardResult<T> | {
|
|
9988
|
+
readonly ok: true;
|
|
9989
|
+
readonly presentation: "layout";
|
|
9990
|
+
readonly layout: Spec;
|
|
9991
|
+
};
|
|
9992
|
+
|
|
9831
9993
|
declare type PluginCardResult<T> = {
|
|
9832
9994
|
readonly ok: true;
|
|
9833
9995
|
readonly data: T;
|
|
@@ -9837,6 +9999,14 @@ declare type PluginCardResult<T> = {
|
|
|
9837
9999
|
readonly message: string;
|
|
9838
10000
|
};
|
|
9839
10001
|
|
|
10002
|
+
declare type PluginCardSubmitResult<T> = {
|
|
10003
|
+
readonly ok: true;
|
|
10004
|
+
readonly data: T;
|
|
10005
|
+
readonly summary: string;
|
|
10006
|
+
} | Extract<PluginCardResult<T>, {
|
|
10007
|
+
readonly ok: false;
|
|
10008
|
+
}>;
|
|
10009
|
+
|
|
9840
10010
|
export declare const PluginEventEnvelope: z.ZodObject<{
|
|
9841
10011
|
id: z.ZodString;
|
|
9842
10012
|
localId: z.ZodString;
|
|
@@ -10450,6 +10620,8 @@ declare function ReturnType_2<Type extends TSchema>(type: Type, options?: TSchem
|
|
|
10450
10620
|
/** Creates a deferred ReturnType action. */
|
|
10451
10621
|
declare function ReturnTypeDeferred<Type extends TSchema>(type: Type, options?: TSchemaOptions): TReturnTypeDeferred<Type>;
|
|
10452
10622
|
|
|
10623
|
+
export declare function row(children: readonly KayAppCardLayout[]): KayAppCardLayout;
|
|
10624
|
+
|
|
10453
10625
|
/**
|
|
10454
10626
|
* The hidden message a continued run rides as its admission ticket (a mid-turn compaction
|
|
10455
10627
|
* resume, a run-recovery re-drive). The engine writes it; this package's placement rows keep it
|
|
@@ -11025,6 +11197,8 @@ declare const SdkSessionDoor: z.ZodEnum<{
|
|
|
11025
11197
|
|
|
11026
11198
|
declare type SdkSessionDoor = z.infer<typeof SdkSessionDoor>;
|
|
11027
11199
|
|
|
11200
|
+
export declare function select(name: string, options: KayAppCardSelectOptions): KayAppCardLayout;
|
|
11201
|
+
|
|
11028
11202
|
declare type SelectorDisposition = {
|
|
11029
11203
|
readonly kind: "deferred";
|
|
11030
11204
|
readonly window?: LineSelector;
|
|
@@ -11293,6 +11467,9 @@ declare const SignedInStatusCode: z.ZodNumber;
|
|
|
11293
11467
|
|
|
11294
11468
|
declare type SignedInStatusCode = z.infer<typeof SignedInStatusCode>;
|
|
11295
11469
|
|
|
11470
|
+
/** A single visibility condition (state, item, or index). */
|
|
11471
|
+
declare type SingleCondition = StateCondition | ItemCondition | IndexCondition;
|
|
11472
|
+
|
|
11296
11473
|
declare interface SourceInfo {
|
|
11297
11474
|
path: string;
|
|
11298
11475
|
source: string;
|
|
@@ -11315,6 +11492,33 @@ declare type SourceScope = "user" | "project" | "temporary";
|
|
|
11315
11492
|
/** Matches from Start and End capturing everything in-between. Start and End are consumed. */
|
|
11316
11493
|
declare function Span<Start extends string, End extends string, MultiLine extends boolean, Input extends string>(start: Start, end: End, multiLine: MultiLine, input: Input): TSpan<Start, End, MultiLine, Input>;
|
|
11317
11494
|
|
|
11495
|
+
/**
|
|
11496
|
+
* Flat UI tree structure (optimized for LLM generation)
|
|
11497
|
+
*/
|
|
11498
|
+
declare interface Spec {
|
|
11499
|
+
/** Root element key */
|
|
11500
|
+
root: string;
|
|
11501
|
+
/** Flat map of elements by key */
|
|
11502
|
+
elements: Record<string, UIElement>;
|
|
11503
|
+
/** Optional initial state to seed the state model.
|
|
11504
|
+
* Components using statePath will read from / write to this state. */
|
|
11505
|
+
state?: Record<string, unknown>;
|
|
11506
|
+
}
|
|
11507
|
+
|
|
11508
|
+
export declare function stack(children: readonly KayAppCardLayout[]): KayAppCardLayout;
|
|
11509
|
+
|
|
11510
|
+
/**
|
|
11511
|
+
* A single state-based condition.
|
|
11512
|
+
* Resolves `$state` to a value from the state model, then applies the operator.
|
|
11513
|
+
* Without an operator, checks truthiness.
|
|
11514
|
+
*
|
|
11515
|
+
* When `not` is `true`, the result of the entire condition is inverted.
|
|
11516
|
+
* For example `{ $state: "/count", gt: 5, not: true }` means "NOT greater than 5".
|
|
11517
|
+
*/
|
|
11518
|
+
declare type StateCondition = {
|
|
11519
|
+
$state: string;
|
|
11520
|
+
} & ComparisonOperators;
|
|
11521
|
+
|
|
11318
11522
|
/** Infers a static type from a TypeBox type. */
|
|
11319
11523
|
declare type Static<Type extends TSchema, Context extends TProperties = {}, Result extends unknown = StaticType<[], 'Encode', Context, {}, Type>> = Result;
|
|
11320
11524
|
|
|
@@ -11509,6 +11713,8 @@ declare type SubagentResultMessage = CustomMessage<SubagentResultDetails> & {
|
|
|
11509
11713
|
readonly display: boolean;
|
|
11510
11714
|
};
|
|
11511
11715
|
|
|
11716
|
+
export declare function submit(label: string): KayAppCardLayout;
|
|
11717
|
+
|
|
11512
11718
|
export declare interface SummarizeSessionInput {
|
|
11513
11719
|
readonly sessions: KayAppSessions;
|
|
11514
11720
|
readonly models: KayAppModels;
|
|
@@ -11520,6 +11726,8 @@ export declare interface SummarizeSessionInput {
|
|
|
11520
11726
|
|
|
11521
11727
|
declare const SUMMARY_VERSION: 4;
|
|
11522
11728
|
|
|
11729
|
+
export declare function switchField(name: string, options: KayAppCardFieldOptions): KayAppCardLayout;
|
|
11730
|
+
|
|
11523
11731
|
/** Creates a Symbol type. */
|
|
11524
11732
|
declare function Symbol_2(options?: TSchemaOptions): TSymbol;
|
|
11525
11733
|
|
|
@@ -12538,6 +12746,8 @@ declare type TExprTermTail<Input extends string> = ((Token.TConst<'&', Input> ex
|
|
|
12538
12746
|
|
|
12539
12747
|
declare type TExprTermTailMapping<Input extends [unknown, unknown, unknown] | []> = (Input);
|
|
12540
12748
|
|
|
12749
|
+
export declare function textArea(name: string, options: KayAppCardFieldOptions): KayAppCardLayout;
|
|
12750
|
+
|
|
12541
12751
|
declare interface TextContent {
|
|
12542
12752
|
type: "text";
|
|
12543
12753
|
text: string;
|
|
@@ -12686,6 +12896,8 @@ declare type TExtendsUnknown<Inferred extends TProperties, Left extends TUnknown
|
|
|
12686
12896
|
|
|
12687
12897
|
declare type TExtendsVoid<Inferred extends TProperties, Left extends TVoid, Right extends TSchema> = (Right extends TVoid ? ExtendsResult_2.TExtendsTrue<Inferred> : TExtendsRight<Inferred, Left, Right>);
|
|
12688
12898
|
|
|
12899
|
+
export declare function textField(name: string, options: KayAppCardFieldOptions): KayAppCardLayout;
|
|
12900
|
+
|
|
12689
12901
|
/** Applies an Extract action using the given types. */
|
|
12690
12902
|
declare type TExtract<Left extends TSchema, Right extends TSchema> = (TExtractAction<Left, Right>);
|
|
12691
12903
|
|
|
@@ -13913,6 +14125,7 @@ declare const toolCallFailureCauseSchema: z.ZodObject<{
|
|
|
13913
14125
|
errorName: z.ZodOptional<z.ZodString>;
|
|
13914
14126
|
errorCode: z.ZodOptional<z.ZodString>;
|
|
13915
14127
|
providerCode: z.ZodOptional<z.ZodString>;
|
|
14128
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
13916
14129
|
status: z.ZodOptional<z.ZodNumber>;
|
|
13917
14130
|
editIndex: z.ZodOptional<z.ZodNumber>;
|
|
13918
14131
|
occurrences: z.ZodOptional<z.ZodNumber>;
|
|
@@ -15520,6 +15733,33 @@ declare type UiActionMessage = CustomMessage<UiActionDetails> & {
|
|
|
15520
15733
|
readonly display: true;
|
|
15521
15734
|
};
|
|
15522
15735
|
|
|
15736
|
+
/**
|
|
15737
|
+
* Base UI element structure for v2
|
|
15738
|
+
*/
|
|
15739
|
+
declare interface UIElement<T extends string = string, P = Record<string, unknown>> {
|
|
15740
|
+
/** Component type from the catalog */
|
|
15741
|
+
type: T;
|
|
15742
|
+
/** Component props */
|
|
15743
|
+
props: P;
|
|
15744
|
+
/** Child element keys (flat structure) */
|
|
15745
|
+
children?: string[];
|
|
15746
|
+
/** Visibility condition */
|
|
15747
|
+
visible?: VisibilityCondition;
|
|
15748
|
+
/** Event bindings — maps event names to action bindings */
|
|
15749
|
+
on?: Record<string, ActionBinding | ActionBinding[]>;
|
|
15750
|
+
/** Repeat children once per item in a state array */
|
|
15751
|
+
repeat?: {
|
|
15752
|
+
statePath: string;
|
|
15753
|
+
key?: string;
|
|
15754
|
+
};
|
|
15755
|
+
/**
|
|
15756
|
+
* State watchers — maps JSON Pointer state paths to action bindings.
|
|
15757
|
+
* When the value at a watched path changes, the bound actions fire.
|
|
15758
|
+
* Useful for cascading dependencies (e.g. country → city option loading).
|
|
15759
|
+
*/
|
|
15760
|
+
watch?: Record<string, ActionBinding | ActionBinding[]>;
|
|
15761
|
+
}
|
|
15762
|
+
|
|
15523
15763
|
/** Applies a Uncapitalize action to the given type. */
|
|
15524
15764
|
declare function Uncapitalize_2<Type extends TSchema>(type: Type, options?: TSchemaOptions): TUncapitalize<Type>;
|
|
15525
15765
|
|
|
@@ -16845,6 +17085,16 @@ declare type VendoredMcpOutcome =
|
|
|
16845
17085
|
readonly serviceId?: string;
|
|
16846
17086
|
};
|
|
16847
17087
|
|
|
17088
|
+
/**
|
|
17089
|
+
* Visibility condition types.
|
|
17090
|
+
* - `boolean` — always/never
|
|
17091
|
+
* - `SingleCondition` — single condition (`$state`, `$item`, or `$index`)
|
|
17092
|
+
* - `SingleCondition[]` — implicit AND (all must be true)
|
|
17093
|
+
* - `AndCondition` — `{ $and: [...] }`, explicit AND (all must be true)
|
|
17094
|
+
* - `OrCondition` — `{ $or: [...] }`, at least one must be true
|
|
17095
|
+
*/
|
|
17096
|
+
declare type VisibilityCondition = boolean | SingleCondition | SingleCondition[] | AndCondition | OrCondition;
|
|
17097
|
+
|
|
16848
17098
|
/** Creates a Void type. */
|
|
16849
17099
|
declare function Void(options?: TSchemaOptions): TVoid;
|
|
16850
17100
|
|
|
@@ -16964,9 +17214,6 @@ export declare const WhiteboardTypeInfo: z.ZodObject<{
|
|
|
16964
17214
|
displayName: z.ZodString;
|
|
16965
17215
|
schemaVersion: z.ZodNumber;
|
|
16966
17216
|
available: z.ZodBoolean;
|
|
16967
|
-
presentation: z.ZodOptional<z.ZodObject<{
|
|
16968
|
-
app: z.ZodString;
|
|
16969
|
-
}, z.core.$strict>>;
|
|
16970
17217
|
}, z.core.$strict>;
|
|
16971
17218
|
|
|
16972
17219
|
export declare type WhiteboardTypeInfo = Readonly<z.infer<typeof WhiteboardTypeInfo>>;
|
package/dist/kay-app.js
CHANGED
|
@@ -70,6 +70,65 @@ var JsonValue = z.lazy(() => z.union([
|
|
|
70
70
|
var JsonObject = z.record(z.string(), JsonValue);
|
|
71
71
|
var JsonSchema = z.record(z.string(), JsonValue);
|
|
72
72
|
|
|
73
|
+
// packages/plugin-sdk/dist/kay-app/card-layout.js
|
|
74
|
+
function element(type, props) {
|
|
75
|
+
return { root: "root", elements: { root: { type, props } } };
|
|
76
|
+
}
|
|
77
|
+
function group(type, props, children) {
|
|
78
|
+
const layout = element(type, props);
|
|
79
|
+
layout.elements.root.children = children.map((child, index) => {
|
|
80
|
+
const prefix = `${index}-`;
|
|
81
|
+
for (const [key, value] of Object.entries(child.elements)) {
|
|
82
|
+
layout.elements[prefix + key] = {
|
|
83
|
+
...value,
|
|
84
|
+
...value.children ? { children: value.children.map((id) => prefix + id) } : {}
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
return prefix + child.root;
|
|
88
|
+
});
|
|
89
|
+
return layout;
|
|
90
|
+
}
|
|
91
|
+
function card(title, children, state) {
|
|
92
|
+
return { ...group("Card", { title }, children), ...state ? { state } : {} };
|
|
93
|
+
}
|
|
94
|
+
function row(children) {
|
|
95
|
+
return group("Row", {}, children);
|
|
96
|
+
}
|
|
97
|
+
function stack(children) {
|
|
98
|
+
return group("Stack", {}, children);
|
|
99
|
+
}
|
|
100
|
+
function field(type, name, options) {
|
|
101
|
+
const key = name.replaceAll("~", "~0").replaceAll("/", "~1");
|
|
102
|
+
return element(type, { ...options, value: { $bindState: `/form/${key}` } });
|
|
103
|
+
}
|
|
104
|
+
function textField(name, options) {
|
|
105
|
+
return field("Field", name, options);
|
|
106
|
+
}
|
|
107
|
+
function textArea(name, options) {
|
|
108
|
+
return field("TextArea", name, options);
|
|
109
|
+
}
|
|
110
|
+
function select(name, options) {
|
|
111
|
+
return field("Select", name, options);
|
|
112
|
+
}
|
|
113
|
+
function multiSelect(name, options) {
|
|
114
|
+
return field("MultiSelect", name, options);
|
|
115
|
+
}
|
|
116
|
+
function switchField(name, options) {
|
|
117
|
+
return field("Switch", name, options);
|
|
118
|
+
}
|
|
119
|
+
function submit(label) {
|
|
120
|
+
return {
|
|
121
|
+
root: "root",
|
|
122
|
+
elements: {
|
|
123
|
+
root: {
|
|
124
|
+
type: "Button",
|
|
125
|
+
props: { label },
|
|
126
|
+
on: { press: { action: "submit" } }
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
|
|
73
132
|
// packages/plugin-sdk/dist/signals.js
|
|
74
133
|
import { z as z2 } from "zod";
|
|
75
134
|
function createFallbackOnlySignals() {
|
|
@@ -125,8 +184,8 @@ var quoted = (value) => JSON.stringify(value.length > 40 ? `${value.slice(0, 40)
|
|
|
125
184
|
function grammarProblem(input) {
|
|
126
185
|
const shape = ObserveShape.safeParse(input);
|
|
127
186
|
if (!shape.success) {
|
|
128
|
-
const
|
|
129
|
-
return
|
|
187
|
+
const field2 = shape.error.issues[0]?.path.join(".") ?? "";
|
|
188
|
+
return field2 === "" ? "`observe` takes an object with `detector`, `source`, `state`, and `questions`." : `\`${field2}\` is missing or has the wrong type.`;
|
|
130
189
|
}
|
|
131
190
|
const { detector, source, questions, subject, after, reuse } = shape.data;
|
|
132
191
|
const { state } = input;
|
|
@@ -139,7 +198,7 @@ function grammarProblem(input) {
|
|
|
139
198
|
if (!fits(detector.version, VERSION)) {
|
|
140
199
|
return "`detector.version` must be at most 64 characters: letters and digits in parts joined by single `.`, `-`, or `_`.";
|
|
141
200
|
}
|
|
142
|
-
for (const [
|
|
201
|
+
for (const [field2, grammar, rule] of [
|
|
143
202
|
["sessionId", POINTER, POINTER_RULE],
|
|
144
203
|
["entryId", POINTER, POINTER_RULE],
|
|
145
204
|
["openerEntryId", POINTER, POINTER_RULE],
|
|
@@ -149,9 +208,9 @@ function grammarProblem(input) {
|
|
|
149
208
|
`1 to ${MAX_POINTER} characters with no control character`
|
|
150
209
|
]
|
|
151
210
|
]) {
|
|
152
|
-
const id = source[
|
|
211
|
+
const id = source[field2];
|
|
153
212
|
if (id !== void 0 && !(id.length <= MAX_POINTER && grammar.test(id))) {
|
|
154
|
-
return `\`source.${
|
|
213
|
+
return `\`source.${field2}\` must be ${rule}.`;
|
|
155
214
|
}
|
|
156
215
|
}
|
|
157
216
|
const occurredAtMs = source.occurredAtMs;
|
|
@@ -964,6 +1023,7 @@ export {
|
|
|
964
1023
|
UriProviderError,
|
|
965
1024
|
UriUnsupportedOperationError,
|
|
966
1025
|
UriValidationError,
|
|
1026
|
+
card,
|
|
967
1027
|
createConsoleKayPluginLog,
|
|
968
1028
|
createFallbackOnlySignals,
|
|
969
1029
|
createKayPluginLog,
|
|
@@ -976,12 +1036,20 @@ export {
|
|
|
976
1036
|
invalidObservation,
|
|
977
1037
|
isCredentialShapedText,
|
|
978
1038
|
isRetryable,
|
|
1039
|
+
multiSelect,
|
|
979
1040
|
parseLineSelector,
|
|
980
1041
|
parseStoredTranscriptKindFilter,
|
|
981
1042
|
pathToFileURL,
|
|
982
1043
|
payload,
|
|
983
1044
|
requireWriteContent,
|
|
1045
|
+
row,
|
|
1046
|
+
select,
|
|
1047
|
+
stack,
|
|
984
1048
|
storedTranscriptKindOf,
|
|
1049
|
+
submit,
|
|
1050
|
+
switchField,
|
|
1051
|
+
textArea,
|
|
1052
|
+
textField,
|
|
985
1053
|
transcriptMessageText,
|
|
986
1054
|
transcriptMessageTexts,
|
|
987
1055
|
transcriptRoleLabel,
|
package/dist/whiteboard.d.ts
CHANGED
|
@@ -72,9 +72,6 @@ export declare const WhiteboardTypeInfo: z.ZodObject<{
|
|
|
72
72
|
displayName: z.ZodString;
|
|
73
73
|
schemaVersion: z.ZodNumber;
|
|
74
74
|
available: z.ZodBoolean;
|
|
75
|
-
presentation: z.ZodOptional<z.ZodObject<{
|
|
76
|
-
app: z.ZodString;
|
|
77
|
-
}, z.core.$strict>>;
|
|
78
75
|
}, z.core.$strict>;
|
|
79
76
|
|
|
80
77
|
export declare type WhiteboardTypeInfo = Readonly<z.infer<typeof WhiteboardTypeInfo>>;
|
package/dist/whiteboard.js
CHANGED
|
@@ -160,11 +160,7 @@ var WhiteboardTypeInfo = z4.strictObject({
|
|
|
160
160
|
typeId: GlobalContributionId,
|
|
161
161
|
displayName: NonEmptyString,
|
|
162
162
|
schemaVersion: z4.number().int().positive(),
|
|
163
|
-
available: z4.boolean()
|
|
164
|
-
/** A plugin-owned readonly presentation; absent types use the host fallback. */
|
|
165
|
-
presentation: z4.strictObject({
|
|
166
|
-
app: GlobalContributionId
|
|
167
|
-
}).optional()
|
|
163
|
+
available: z4.boolean()
|
|
168
164
|
});
|
|
169
165
|
export {
|
|
170
166
|
JsonValue,
|