@yaklabs-ai/plugin-sdk 0.46.0 → 0.47.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 +1 -0
- package/dist/canonical-transcript.js +1 -0
- package/dist/disclosure.d.ts +4 -4
- package/dist/kay-agent-testing.d.ts +6 -12
- package/dist/kay-agent.d.ts +4 -4
- package/dist/kay-app.d.ts +251 -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.47.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.47.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.47.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`.
|
|
@@ -6902,6 +6902,7 @@ declare const toolCallFailureCauseSchema: z.ZodObject<{
|
|
|
6902
6902
|
errorName: z.ZodOptional<z.ZodString>;
|
|
6903
6903
|
errorCode: z.ZodOptional<z.ZodString>;
|
|
6904
6904
|
providerCode: z.ZodOptional<z.ZodString>;
|
|
6905
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
6905
6906
|
status: z.ZodOptional<z.ZodNumber>;
|
|
6906
6907
|
editIndex: z.ZodOptional<z.ZodNumber>;
|
|
6907
6908
|
occurrences: z.ZodOptional<z.ZodNumber>;
|
|
@@ -730,6 +730,7 @@ var toolCallFailureDetailsSchema = z5.strictObject({
|
|
|
730
730
|
errorName: z5.string().optional(),
|
|
731
731
|
errorCode: z5.string().optional(),
|
|
732
732
|
providerCode: z5.string().optional(),
|
|
733
|
+
provider: z5.string().optional(),
|
|
733
734
|
status: z5.number().int().min(100).max(599).optional(),
|
|
734
735
|
editIndex: count.optional(),
|
|
735
736
|
occurrences: count.optional(),
|
package/dist/disclosure.d.ts
CHANGED
|
@@ -2442,8 +2442,10 @@ 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.
|
|
2445
2447
|
*/
|
|
2446
|
-
declare const KAY_PLUGIN_SDK_VERSION: "0.
|
|
2448
|
+
declare const KAY_PLUGIN_SDK_VERSION: "0.47.0";
|
|
2447
2449
|
|
|
2448
2450
|
declare const KAY_PLUGIN_TARGET_NAMES: readonly ["kay.agent", "kay.app", "kay.ui"];
|
|
2449
2451
|
|
|
@@ -7819,6 +7821,7 @@ declare const toolCallFailureCauseSchema: z.ZodObject<{
|
|
|
7819
7821
|
errorName: z.ZodOptional<z.ZodString>;
|
|
7820
7822
|
errorCode: z.ZodOptional<z.ZodString>;
|
|
7821
7823
|
providerCode: z.ZodOptional<z.ZodString>;
|
|
7824
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
7822
7825
|
status: z.ZodOptional<z.ZodNumber>;
|
|
7823
7826
|
editIndex: z.ZodOptional<z.ZodNumber>;
|
|
7824
7827
|
occurrences: z.ZodOptional<z.ZodNumber>;
|
|
@@ -10533,9 +10536,6 @@ declare const WhiteboardTypeInfo: z.ZodObject<{
|
|
|
10533
10536
|
displayName: z.ZodString;
|
|
10534
10537
|
schemaVersion: z.ZodNumber;
|
|
10535
10538
|
available: z.ZodBoolean;
|
|
10536
|
-
presentation: z.ZodOptional<z.ZodObject<{
|
|
10537
|
-
app: z.ZodString;
|
|
10538
|
-
}, z.core.$strict>>;
|
|
10539
10539
|
}, z.core.$strict>;
|
|
10540
10540
|
|
|
10541
10541
|
declare type WhiteboardTypeInfo = Readonly<z.infer<typeof WhiteboardTypeInfo>>;
|
|
@@ -2496,8 +2496,10 @@ 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.
|
|
2499
2501
|
*/
|
|
2500
|
-
declare const KAY_PLUGIN_SDK_VERSION: "0.
|
|
2502
|
+
declare const KAY_PLUGIN_SDK_VERSION: "0.47.0";
|
|
2501
2503
|
|
|
2502
2504
|
declare const KAY_PLUGIN_TARGET_NAMES: readonly ["kay.agent", "kay.app", "kay.ui"];
|
|
2503
2505
|
|
|
@@ -4872,9 +4874,8 @@ declare const ResolvedPluginContractV1: z.ZodObject<{
|
|
|
4872
4874
|
storage: "storage";
|
|
4873
4875
|
uriModule: "uriModule";
|
|
4874
4876
|
authService: "authService";
|
|
4875
|
-
app: "app";
|
|
4876
4877
|
command: "command";
|
|
4877
|
-
|
|
4878
|
+
app: "app";
|
|
4878
4879
|
skill: "skill";
|
|
4879
4880
|
converter: "converter";
|
|
4880
4881
|
artifactUriModule: "artifactUriModule";
|
|
@@ -4897,11 +4898,9 @@ declare const ResolvedPluginContractV1: z.ZodObject<{
|
|
|
4897
4898
|
mcpServer: "mcpServer";
|
|
4898
4899
|
uiCommand: "uiCommand";
|
|
4899
4900
|
uiSlot: "uiSlot";
|
|
4900
|
-
settingsPanel: "settingsPanel";
|
|
4901
|
-
resultRenderer: "resultRenderer";
|
|
4902
4901
|
referencePresentation: "referencePresentation";
|
|
4903
|
-
view: "view";
|
|
4904
4902
|
theme: "theme";
|
|
4903
|
+
configSection: "configSection";
|
|
4905
4904
|
}>;
|
|
4906
4905
|
localId: z.ZodString;
|
|
4907
4906
|
globalId: z.ZodString;
|
|
@@ -5754,9 +5753,6 @@ declare const ResolvedPluginContractV1: z.ZodObject<{
|
|
|
5754
5753
|
bodyField: z.ZodString;
|
|
5755
5754
|
}, z.core.$strict>], "kind">;
|
|
5756
5755
|
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
5756
|
}, z.core.$strict>>>;
|
|
5761
5757
|
kayAppMcpServers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
5762
5758
|
name: z.ZodString;
|
|
@@ -8996,6 +8992,7 @@ declare const toolCallFailureCauseSchema: z.ZodObject<{
|
|
|
8996
8992
|
errorName: z.ZodOptional<z.ZodString>;
|
|
8997
8993
|
errorCode: z.ZodOptional<z.ZodString>;
|
|
8998
8994
|
providerCode: z.ZodOptional<z.ZodString>;
|
|
8995
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
8999
8996
|
status: z.ZodOptional<z.ZodNumber>;
|
|
9000
8997
|
editIndex: z.ZodOptional<z.ZodNumber>;
|
|
9001
8998
|
occurrences: z.ZodOptional<z.ZodNumber>;
|
|
@@ -11710,9 +11707,6 @@ declare const WhiteboardTypeInfo: z.ZodObject<{
|
|
|
11710
11707
|
displayName: z.ZodString;
|
|
11711
11708
|
schemaVersion: z.ZodNumber;
|
|
11712
11709
|
available: z.ZodBoolean;
|
|
11713
|
-
presentation: z.ZodOptional<z.ZodObject<{
|
|
11714
|
-
app: z.ZodString;
|
|
11715
|
-
}, z.core.$strict>>;
|
|
11716
11710
|
}, z.core.$strict>;
|
|
11717
11711
|
|
|
11718
11712
|
declare type WhiteboardTypeInfo = Readonly<z.infer<typeof WhiteboardTypeInfo>>;
|
package/dist/kay-agent.d.ts
CHANGED
|
@@ -2771,8 +2771,10 @@ 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.
|
|
2774
2776
|
*/
|
|
2775
|
-
declare const KAY_PLUGIN_SDK_VERSION: "0.
|
|
2777
|
+
declare const KAY_PLUGIN_SDK_VERSION: "0.47.0";
|
|
2776
2778
|
|
|
2777
2779
|
declare const KAY_PLUGIN_TARGET_NAMES: readonly ["kay.agent", "kay.app", "kay.ui"];
|
|
2778
2780
|
|
|
@@ -9049,6 +9051,7 @@ declare const toolCallFailureCauseSchema: z.ZodObject<{
|
|
|
9049
9051
|
errorName: z.ZodOptional<z.ZodString>;
|
|
9050
9052
|
errorCode: z.ZodOptional<z.ZodString>;
|
|
9051
9053
|
providerCode: z.ZodOptional<z.ZodString>;
|
|
9054
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
9052
9055
|
status: z.ZodOptional<z.ZodNumber>;
|
|
9053
9056
|
editIndex: z.ZodOptional<z.ZodNumber>;
|
|
9054
9057
|
occurrences: z.ZodOptional<z.ZodNumber>;
|
|
@@ -12058,9 +12061,6 @@ export declare const WhiteboardTypeInfo: z.ZodObject<{
|
|
|
12058
12061
|
displayName: z.ZodString;
|
|
12059
12062
|
schemaVersion: z.ZodNumber;
|
|
12060
12063
|
available: z.ZodBoolean;
|
|
12061
|
-
presentation: z.ZodOptional<z.ZodObject<{
|
|
12062
|
-
app: z.ZodString;
|
|
12063
|
-
}, z.core.$strict>>;
|
|
12064
12064
|
}, z.core.$strict>;
|
|
12065
12065
|
|
|
12066
12066
|
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,10 @@ 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.
|
|
2759
2883
|
*/
|
|
2760
|
-
declare const KAY_PLUGIN_SDK_VERSION: "0.
|
|
2884
|
+
declare const KAY_PLUGIN_SDK_VERSION: "0.47.0";
|
|
2761
2885
|
|
|
2762
2886
|
declare const KAY_PLUGIN_TARGET_NAMES: readonly ["kay.agent", "kay.app", "kay.ui"];
|
|
2763
2887
|
|
|
@@ -3983,17 +4107,38 @@ export declare interface KayAppBackgroundCredentialRequest {
|
|
|
3983
4107
|
readonly jobId: string;
|
|
3984
4108
|
}
|
|
3985
4109
|
|
|
4110
|
+
export declare interface KayAppCardFieldOptions {
|
|
4111
|
+
readonly label: string;
|
|
4112
|
+
readonly placeholder?: string;
|
|
4113
|
+
readonly required?: boolean;
|
|
4114
|
+
}
|
|
4115
|
+
|
|
3986
4116
|
/** The background operations of a manifest-declared plugin card. */
|
|
3987
4117
|
export declare interface KayAppCardImplementation<Input = unknown, Data = unknown, Values = unknown> {
|
|
3988
|
-
read(inputs: Input):
|
|
4118
|
+
read(inputs: Input): KayAppCardReadResult<Data> | Promise<KayAppCardReadResult<Data>>;
|
|
3989
4119
|
submit(request: {
|
|
3990
4120
|
readonly inputs: Input;
|
|
3991
4121
|
readonly values: Values;
|
|
3992
|
-
}):
|
|
4122
|
+
}): KayAppCardSubmitResult<Data> | Promise<KayAppCardSubmitResult<Data>>;
|
|
3993
4123
|
}
|
|
3994
4124
|
|
|
4125
|
+
export declare type KayAppCardLayout = Extract<PluginCardReadResult<never>, {
|
|
4126
|
+
presentation: "layout";
|
|
4127
|
+
}>["layout"];
|
|
4128
|
+
|
|
4129
|
+
export declare type KayAppCardReadResult<T> = PluginCardReadResult<T>;
|
|
4130
|
+
|
|
3995
4131
|
export declare type KayAppCardResult<T> = PluginCardResult<T>;
|
|
3996
4132
|
|
|
4133
|
+
export declare interface KayAppCardSelectOptions extends KayAppCardFieldOptions {
|
|
4134
|
+
readonly options: readonly {
|
|
4135
|
+
readonly value: string;
|
|
4136
|
+
readonly label: string;
|
|
4137
|
+
}[];
|
|
4138
|
+
}
|
|
4139
|
+
|
|
4140
|
+
export declare type KayAppCardSubmitResult<T> = PluginCardSubmitResult<T>;
|
|
4141
|
+
|
|
3997
4142
|
/**
|
|
3998
4143
|
* The `kay.app` system-prompt contract (`app.systemPrompt`): text a plugin adds to every chat's
|
|
3999
4144
|
* system prompt, rendered by the daemon from a few facts about the chat and reused across chats.
|
|
@@ -9061,6 +9206,8 @@ declare function ModuleDeferred<Declarations extends TProperties>(declarations:
|
|
|
9061
9206
|
|
|
9062
9207
|
declare function ModuleMapping(input: [unknown, unknown]): unknown;
|
|
9063
9208
|
|
|
9209
|
+
export declare function multiSelect(name: string, options: KayAppCardSelectOptions): KayAppCardLayout;
|
|
9210
|
+
|
|
9064
9211
|
/** A tool call that another tool made while it ran, for example from a codemode script. */
|
|
9065
9212
|
declare interface NestedToolCallRecord {
|
|
9066
9213
|
id: string;
|
|
@@ -9326,6 +9473,13 @@ declare const OptionalSemiColon: (input: string) => [unknown, string] | [];
|
|
|
9326
9473
|
|
|
9327
9474
|
declare function OptionalSemiColonMapping(input: [unknown] | []): unknown;
|
|
9328
9475
|
|
|
9476
|
+
/**
|
|
9477
|
+
* OR wrapper — at least one child condition must be true.
|
|
9478
|
+
*/
|
|
9479
|
+
declare type OrCondition = {
|
|
9480
|
+
$or: VisibilityCondition[];
|
|
9481
|
+
};
|
|
9482
|
+
|
|
9329
9483
|
declare const PackageAssetPath: z.ZodString;
|
|
9330
9484
|
|
|
9331
9485
|
declare type PackageAssetPath = z.infer<typeof PackageAssetPath>;
|
|
@@ -9828,6 +9982,12 @@ export declare const PluginAgentDefinitionPermissionRule: z.ZodObject<{
|
|
|
9828
9982
|
|
|
9829
9983
|
export declare type PluginAgentDefinitionPermissionRule = z.infer<typeof PluginAgentDefinitionPermissionRule>;
|
|
9830
9984
|
|
|
9985
|
+
declare type PluginCardReadResult<T> = PluginCardResult<T> | {
|
|
9986
|
+
readonly ok: true;
|
|
9987
|
+
readonly presentation: "layout";
|
|
9988
|
+
readonly layout: Spec;
|
|
9989
|
+
};
|
|
9990
|
+
|
|
9831
9991
|
declare type PluginCardResult<T> = {
|
|
9832
9992
|
readonly ok: true;
|
|
9833
9993
|
readonly data: T;
|
|
@@ -9837,6 +9997,14 @@ declare type PluginCardResult<T> = {
|
|
|
9837
9997
|
readonly message: string;
|
|
9838
9998
|
};
|
|
9839
9999
|
|
|
10000
|
+
declare type PluginCardSubmitResult<T> = {
|
|
10001
|
+
readonly ok: true;
|
|
10002
|
+
readonly data: T;
|
|
10003
|
+
readonly summary: string;
|
|
10004
|
+
} | Extract<PluginCardResult<T>, {
|
|
10005
|
+
readonly ok: false;
|
|
10006
|
+
}>;
|
|
10007
|
+
|
|
9840
10008
|
export declare const PluginEventEnvelope: z.ZodObject<{
|
|
9841
10009
|
id: z.ZodString;
|
|
9842
10010
|
localId: z.ZodString;
|
|
@@ -10450,6 +10618,8 @@ declare function ReturnType_2<Type extends TSchema>(type: Type, options?: TSchem
|
|
|
10450
10618
|
/** Creates a deferred ReturnType action. */
|
|
10451
10619
|
declare function ReturnTypeDeferred<Type extends TSchema>(type: Type, options?: TSchemaOptions): TReturnTypeDeferred<Type>;
|
|
10452
10620
|
|
|
10621
|
+
export declare function row(children: readonly KayAppCardLayout[]): KayAppCardLayout;
|
|
10622
|
+
|
|
10453
10623
|
/**
|
|
10454
10624
|
* The hidden message a continued run rides as its admission ticket (a mid-turn compaction
|
|
10455
10625
|
* resume, a run-recovery re-drive). The engine writes it; this package's placement rows keep it
|
|
@@ -11025,6 +11195,8 @@ declare const SdkSessionDoor: z.ZodEnum<{
|
|
|
11025
11195
|
|
|
11026
11196
|
declare type SdkSessionDoor = z.infer<typeof SdkSessionDoor>;
|
|
11027
11197
|
|
|
11198
|
+
export declare function select(name: string, options: KayAppCardSelectOptions): KayAppCardLayout;
|
|
11199
|
+
|
|
11028
11200
|
declare type SelectorDisposition = {
|
|
11029
11201
|
readonly kind: "deferred";
|
|
11030
11202
|
readonly window?: LineSelector;
|
|
@@ -11293,6 +11465,9 @@ declare const SignedInStatusCode: z.ZodNumber;
|
|
|
11293
11465
|
|
|
11294
11466
|
declare type SignedInStatusCode = z.infer<typeof SignedInStatusCode>;
|
|
11295
11467
|
|
|
11468
|
+
/** A single visibility condition (state, item, or index). */
|
|
11469
|
+
declare type SingleCondition = StateCondition | ItemCondition | IndexCondition;
|
|
11470
|
+
|
|
11296
11471
|
declare interface SourceInfo {
|
|
11297
11472
|
path: string;
|
|
11298
11473
|
source: string;
|
|
@@ -11315,6 +11490,33 @@ declare type SourceScope = "user" | "project" | "temporary";
|
|
|
11315
11490
|
/** Matches from Start and End capturing everything in-between. Start and End are consumed. */
|
|
11316
11491
|
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
11492
|
|
|
11493
|
+
/**
|
|
11494
|
+
* Flat UI tree structure (optimized for LLM generation)
|
|
11495
|
+
*/
|
|
11496
|
+
declare interface Spec {
|
|
11497
|
+
/** Root element key */
|
|
11498
|
+
root: string;
|
|
11499
|
+
/** Flat map of elements by key */
|
|
11500
|
+
elements: Record<string, UIElement>;
|
|
11501
|
+
/** Optional initial state to seed the state model.
|
|
11502
|
+
* Components using statePath will read from / write to this state. */
|
|
11503
|
+
state?: Record<string, unknown>;
|
|
11504
|
+
}
|
|
11505
|
+
|
|
11506
|
+
export declare function stack(children: readonly KayAppCardLayout[]): KayAppCardLayout;
|
|
11507
|
+
|
|
11508
|
+
/**
|
|
11509
|
+
* A single state-based condition.
|
|
11510
|
+
* Resolves `$state` to a value from the state model, then applies the operator.
|
|
11511
|
+
* Without an operator, checks truthiness.
|
|
11512
|
+
*
|
|
11513
|
+
* When `not` is `true`, the result of the entire condition is inverted.
|
|
11514
|
+
* For example `{ $state: "/count", gt: 5, not: true }` means "NOT greater than 5".
|
|
11515
|
+
*/
|
|
11516
|
+
declare type StateCondition = {
|
|
11517
|
+
$state: string;
|
|
11518
|
+
} & ComparisonOperators;
|
|
11519
|
+
|
|
11318
11520
|
/** Infers a static type from a TypeBox type. */
|
|
11319
11521
|
declare type Static<Type extends TSchema, Context extends TProperties = {}, Result extends unknown = StaticType<[], 'Encode', Context, {}, Type>> = Result;
|
|
11320
11522
|
|
|
@@ -11509,6 +11711,8 @@ declare type SubagentResultMessage = CustomMessage<SubagentResultDetails> & {
|
|
|
11509
11711
|
readonly display: boolean;
|
|
11510
11712
|
};
|
|
11511
11713
|
|
|
11714
|
+
export declare function submit(label: string): KayAppCardLayout;
|
|
11715
|
+
|
|
11512
11716
|
export declare interface SummarizeSessionInput {
|
|
11513
11717
|
readonly sessions: KayAppSessions;
|
|
11514
11718
|
readonly models: KayAppModels;
|
|
@@ -11520,6 +11724,8 @@ export declare interface SummarizeSessionInput {
|
|
|
11520
11724
|
|
|
11521
11725
|
declare const SUMMARY_VERSION: 4;
|
|
11522
11726
|
|
|
11727
|
+
export declare function switchField(name: string, options: KayAppCardFieldOptions): KayAppCardLayout;
|
|
11728
|
+
|
|
11523
11729
|
/** Creates a Symbol type. */
|
|
11524
11730
|
declare function Symbol_2(options?: TSchemaOptions): TSymbol;
|
|
11525
11731
|
|
|
@@ -12538,6 +12744,8 @@ declare type TExprTermTail<Input extends string> = ((Token.TConst<'&', Input> ex
|
|
|
12538
12744
|
|
|
12539
12745
|
declare type TExprTermTailMapping<Input extends [unknown, unknown, unknown] | []> = (Input);
|
|
12540
12746
|
|
|
12747
|
+
export declare function textArea(name: string, options: KayAppCardFieldOptions): KayAppCardLayout;
|
|
12748
|
+
|
|
12541
12749
|
declare interface TextContent {
|
|
12542
12750
|
type: "text";
|
|
12543
12751
|
text: string;
|
|
@@ -12686,6 +12894,8 @@ declare type TExtendsUnknown<Inferred extends TProperties, Left extends TUnknown
|
|
|
12686
12894
|
|
|
12687
12895
|
declare type TExtendsVoid<Inferred extends TProperties, Left extends TVoid, Right extends TSchema> = (Right extends TVoid ? ExtendsResult_2.TExtendsTrue<Inferred> : TExtendsRight<Inferred, Left, Right>);
|
|
12688
12896
|
|
|
12897
|
+
export declare function textField(name: string, options: KayAppCardFieldOptions): KayAppCardLayout;
|
|
12898
|
+
|
|
12689
12899
|
/** Applies an Extract action using the given types. */
|
|
12690
12900
|
declare type TExtract<Left extends TSchema, Right extends TSchema> = (TExtractAction<Left, Right>);
|
|
12691
12901
|
|
|
@@ -13913,6 +14123,7 @@ declare const toolCallFailureCauseSchema: z.ZodObject<{
|
|
|
13913
14123
|
errorName: z.ZodOptional<z.ZodString>;
|
|
13914
14124
|
errorCode: z.ZodOptional<z.ZodString>;
|
|
13915
14125
|
providerCode: z.ZodOptional<z.ZodString>;
|
|
14126
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
13916
14127
|
status: z.ZodOptional<z.ZodNumber>;
|
|
13917
14128
|
editIndex: z.ZodOptional<z.ZodNumber>;
|
|
13918
14129
|
occurrences: z.ZodOptional<z.ZodNumber>;
|
|
@@ -15520,6 +15731,33 @@ declare type UiActionMessage = CustomMessage<UiActionDetails> & {
|
|
|
15520
15731
|
readonly display: true;
|
|
15521
15732
|
};
|
|
15522
15733
|
|
|
15734
|
+
/**
|
|
15735
|
+
* Base UI element structure for v2
|
|
15736
|
+
*/
|
|
15737
|
+
declare interface UIElement<T extends string = string, P = Record<string, unknown>> {
|
|
15738
|
+
/** Component type from the catalog */
|
|
15739
|
+
type: T;
|
|
15740
|
+
/** Component props */
|
|
15741
|
+
props: P;
|
|
15742
|
+
/** Child element keys (flat structure) */
|
|
15743
|
+
children?: string[];
|
|
15744
|
+
/** Visibility condition */
|
|
15745
|
+
visible?: VisibilityCondition;
|
|
15746
|
+
/** Event bindings — maps event names to action bindings */
|
|
15747
|
+
on?: Record<string, ActionBinding | ActionBinding[]>;
|
|
15748
|
+
/** Repeat children once per item in a state array */
|
|
15749
|
+
repeat?: {
|
|
15750
|
+
statePath: string;
|
|
15751
|
+
key?: string;
|
|
15752
|
+
};
|
|
15753
|
+
/**
|
|
15754
|
+
* State watchers — maps JSON Pointer state paths to action bindings.
|
|
15755
|
+
* When the value at a watched path changes, the bound actions fire.
|
|
15756
|
+
* Useful for cascading dependencies (e.g. country → city option loading).
|
|
15757
|
+
*/
|
|
15758
|
+
watch?: Record<string, ActionBinding | ActionBinding[]>;
|
|
15759
|
+
}
|
|
15760
|
+
|
|
15523
15761
|
/** Applies a Uncapitalize action to the given type. */
|
|
15524
15762
|
declare function Uncapitalize_2<Type extends TSchema>(type: Type, options?: TSchemaOptions): TUncapitalize<Type>;
|
|
15525
15763
|
|
|
@@ -16845,6 +17083,16 @@ declare type VendoredMcpOutcome =
|
|
|
16845
17083
|
readonly serviceId?: string;
|
|
16846
17084
|
};
|
|
16847
17085
|
|
|
17086
|
+
/**
|
|
17087
|
+
* Visibility condition types.
|
|
17088
|
+
* - `boolean` — always/never
|
|
17089
|
+
* - `SingleCondition` — single condition (`$state`, `$item`, or `$index`)
|
|
17090
|
+
* - `SingleCondition[]` — implicit AND (all must be true)
|
|
17091
|
+
* - `AndCondition` — `{ $and: [...] }`, explicit AND (all must be true)
|
|
17092
|
+
* - `OrCondition` — `{ $or: [...] }`, at least one must be true
|
|
17093
|
+
*/
|
|
17094
|
+
declare type VisibilityCondition = boolean | SingleCondition | SingleCondition[] | AndCondition | OrCondition;
|
|
17095
|
+
|
|
16848
17096
|
/** Creates a Void type. */
|
|
16849
17097
|
declare function Void(options?: TSchemaOptions): TVoid;
|
|
16850
17098
|
|
|
@@ -16964,9 +17212,6 @@ export declare const WhiteboardTypeInfo: z.ZodObject<{
|
|
|
16964
17212
|
displayName: z.ZodString;
|
|
16965
17213
|
schemaVersion: z.ZodNumber;
|
|
16966
17214
|
available: z.ZodBoolean;
|
|
16967
|
-
presentation: z.ZodOptional<z.ZodObject<{
|
|
16968
|
-
app: z.ZodString;
|
|
16969
|
-
}, z.core.$strict>>;
|
|
16970
17215
|
}, z.core.$strict>;
|
|
16971
17216
|
|
|
16972
17217
|
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,
|