syllable-sdk 1.0.14-rc.1 → 1.0.14-rc.3
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/bin/mcp-server.js +295 -269
- package/bin/mcp-server.js.map +26 -26
- package/examples/package-lock.json +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/lib/encodings.d.ts +1 -0
- package/lib/encodings.d.ts.map +1 -1
- package/lib/encodings.js +9 -0
- package/lib/encodings.js.map +1 -1
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/server.js +1 -1
- package/models/components/callaction.d.ts +7 -19
- package/models/components/callaction.d.ts.map +1 -1
- package/models/components/callaction.js +8 -8
- package/models/components/callaction.js.map +1 -1
- package/models/components/celexpression.d.ts +1 -1
- package/models/components/celexpression.d.ts.map +1 -1
- package/models/components/celexpression.js +2 -2
- package/models/components/celexpression.js.map +1 -1
- package/models/components/conditionaltext.d.ts +6 -18
- package/models/components/conditionaltext.d.ts.map +1 -1
- package/models/components/conditionaltext.js +6 -6
- package/models/components/conditionaltext.js.map +1 -1
- package/models/components/conditionalvalue.d.ts +12 -36
- package/models/components/conditionalvalue.d.ts.map +1 -1
- package/models/components/conditionalvalue.js +12 -12
- package/models/components/conditionalvalue.js.map +1 -1
- package/models/components/context.d.ts +8 -104
- package/models/components/context.d.ts.map +1 -1
- package/models/components/context.js +48 -48
- package/models/components/context.js.map +1 -1
- package/models/components/eventtask.d.ts +1 -1
- package/models/components/eventtask.d.ts.map +1 -1
- package/models/components/eventtask.js +2 -2
- package/models/components/eventtask.js.map +1 -1
- package/models/components/eventtaskevents.d.ts +4 -44
- package/models/components/eventtaskevents.d.ts.map +1 -1
- package/models/components/eventtaskevents.js +20 -20
- package/models/components/eventtaskevents.js.map +1 -1
- package/models/components/expressiontask.d.ts +7 -19
- package/models/components/expressiontask.d.ts.map +1 -1
- package/models/components/expressiontask.js +8 -8
- package/models/components/expressiontask.js.map +1 -1
- package/models/components/expressiontaskevents.d.ts +8 -88
- package/models/components/expressiontaskevents.d.ts.map +1 -1
- package/models/components/expressiontaskevents.js +40 -40
- package/models/components/expressiontaskevents.js.map +1 -1
- package/models/components/incrementaction.d.ts +7 -19
- package/models/components/incrementaction.d.ts.map +1 -1
- package/models/components/incrementaction.js +8 -8
- package/models/components/incrementaction.js.map +1 -1
- package/models/components/loadtoolfromfiletask.d.ts +1 -1
- package/models/components/loadtoolfromfiletask.d.ts.map +1 -1
- package/models/components/loadtoolfromfiletask.js +2 -2
- package/models/components/loadtoolfromfiletask.js.map +1 -1
- package/models/components/nextstep.d.ts +6 -18
- package/models/components/nextstep.d.ts.map +1 -1
- package/models/components/nextstep.js +6 -6
- package/models/components/nextstep.js.map +1 -1
- package/models/components/saveaction.d.ts +7 -19
- package/models/components/saveaction.d.ts.map +1 -1
- package/models/components/saveaction.js +8 -8
- package/models/components/saveaction.js.map +1 -1
- package/models/components/sayaction.d.ts +7 -19
- package/models/components/sayaction.d.ts.map +1 -1
- package/models/components/sayaction.js +8 -8
- package/models/components/sayaction.js.map +1 -1
- package/models/components/setvalueaction.d.ts +13 -37
- package/models/components/setvalueaction.d.ts.map +1 -1
- package/models/components/setvalueaction.js +14 -14
- package/models/components/setvalueaction.js.map +1 -1
- package/models/components/step.d.ts +1 -1
- package/models/components/stepeventactions.d.ts +27 -133
- package/models/components/stepeventactions.d.ts.map +1 -1
- package/models/components/stepeventactions.js +91 -61
- package/models/components/stepeventactions.js.map +1 -1
- package/models/components/stepstask.d.ts +1 -1
- package/models/components/stepstask.d.ts.map +1 -1
- package/models/components/stepstask.js +2 -2
- package/models/components/stepstask.js.map +1 -1
- package/models/components/toolparametertransformcondition.d.ts +1 -1
- package/models/components/toolparametertransformcondition.d.ts.map +1 -1
- package/models/components/toolparametertransformcondition.js +2 -2
- package/models/components/toolparametertransformcondition.js.map +1 -1
- package/models/components/variable.d.ts +6 -18
- package/models/components/variable.d.ts.map +1 -1
- package/models/components/variable.js +6 -6
- package/models/components/variable.js.map +1 -1
- package/openapi.json +67 -34
- package/package.json +1 -1
- package/src/lib/config.ts +3 -3
- package/src/lib/encodings.ts +13 -0
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/models/components/callaction.ts +15 -15
- package/src/models/components/celexpression.ts +3 -3
- package/src/models/components/conditionaltext.ts +12 -12
- package/src/models/components/conditionalvalue.ts +24 -24
- package/src/models/components/context.ts +87 -149
- package/src/models/components/eventtask.ts +3 -3
- package/src/models/components/eventtaskevents.ts +36 -48
- package/src/models/components/expressiontask.ts +15 -15
- package/src/models/components/expressiontaskevents.ts +72 -96
- package/src/models/components/incrementaction.ts +15 -15
- package/src/models/components/loadtoolfromfiletask.ts +3 -3
- package/src/models/components/nextstep.ts +12 -12
- package/src/models/components/saveaction.ts +15 -15
- package/src/models/components/sayaction.ts +15 -15
- package/src/models/components/setvalueaction.ts +27 -27
- package/src/models/components/step.ts +1 -1
- package/src/models/components/stepeventactions.ts +182 -145
- package/src/models/components/stepstask.ts +3 -3
- package/src/models/components/toolparametertransformcondition.ts +3 -3
- package/src/models/components/variable.ts +12 -12
- package/src/types/unrecognized.ts +9 -1
- package/tsconfig.json +1 -2
- package/types/unrecognized.d.ts +7 -1
- package/types/unrecognized.d.ts.map +1 -1
- package/types/unrecognized.js +9 -1
- package/types/unrecognized.js.map +1 -1
|
@@ -38,28 +38,30 @@ import {
|
|
|
38
38
|
} from "./setvalueaction.js";
|
|
39
39
|
|
|
40
40
|
export type StepEventActionsStart =
|
|
41
|
-
|
|
|
42
|
-
|
|
|
43
|
-
|
|
|
44
|
-
|
|
|
45
|
-
|
|
|
41
|
+
| CallAction
|
|
42
|
+
| IncrementAction
|
|
43
|
+
| SaveAction
|
|
44
|
+
| SayAction
|
|
45
|
+
| SetValueAction;
|
|
46
46
|
|
|
47
47
|
export type Enter =
|
|
48
|
-
|
|
|
49
|
-
|
|
|
50
|
-
|
|
|
51
|
-
|
|
|
52
|
-
|
|
|
48
|
+
| CallAction
|
|
49
|
+
| IncrementAction
|
|
50
|
+
| SaveAction
|
|
51
|
+
| SayAction
|
|
52
|
+
| SetValueAction;
|
|
53
|
+
|
|
54
|
+
export type Presubmit = IncrementAction | SaveAction | SetValueAction;
|
|
53
55
|
|
|
54
56
|
export type StepEventActionsSubmit =
|
|
55
|
-
|
|
|
56
|
-
|
|
|
57
|
-
|
|
|
58
|
-
|
|
|
59
|
-
|
|
|
57
|
+
| CallAction
|
|
58
|
+
| IncrementAction
|
|
59
|
+
| SaveAction
|
|
60
|
+
| SayAction
|
|
61
|
+
| SetValueAction;
|
|
60
62
|
|
|
61
63
|
/**
|
|
62
|
-
* Actions to perform when events occur (enter, submit).
|
|
64
|
+
* Actions to perform when events occur (enter, presubmit, submit).
|
|
63
65
|
*/
|
|
64
66
|
export type StepEventActions = {
|
|
65
67
|
/**
|
|
@@ -67,11 +69,7 @@ export type StepEventActions = {
|
|
|
67
69
|
*/
|
|
68
70
|
start?:
|
|
69
71
|
| Array<
|
|
70
|
-
|
|
|
71
|
-
| (IncrementAction & { action: "inc" })
|
|
72
|
-
| (SayAction & { action: "say" })
|
|
73
|
-
| (SetValueAction & { action: "set" })
|
|
74
|
-
| (SaveAction & { action: "save" })
|
|
72
|
+
CallAction | IncrementAction | SaveAction | SayAction | SetValueAction
|
|
75
73
|
>
|
|
76
74
|
| null
|
|
77
75
|
| undefined;
|
|
@@ -80,24 +78,23 @@ export type StepEventActions = {
|
|
|
80
78
|
*/
|
|
81
79
|
enter?:
|
|
82
80
|
| Array<
|
|
83
|
-
|
|
|
84
|
-
| (IncrementAction & { action: "inc" })
|
|
85
|
-
| (SayAction & { action: "say" })
|
|
86
|
-
| (SetValueAction & { action: "set" })
|
|
87
|
-
| (SaveAction & { action: "save" })
|
|
81
|
+
CallAction | IncrementAction | SaveAction | SayAction | SetValueAction
|
|
88
82
|
>
|
|
89
83
|
| null
|
|
90
84
|
| undefined;
|
|
85
|
+
/**
|
|
86
|
+
* Actions to execute before validation (data-mutation only: set, inc, save). Use this to set default values for required fields that would otherwise fail validation.
|
|
87
|
+
*/
|
|
88
|
+
presubmit?:
|
|
89
|
+
| Array<IncrementAction | SaveAction | SetValueAction>
|
|
90
|
+
| null
|
|
91
|
+
| undefined;
|
|
91
92
|
/**
|
|
92
93
|
* Actions to execute when the tool/step is submitted by the LLM.
|
|
93
94
|
*/
|
|
94
95
|
submit?:
|
|
95
96
|
| Array<
|
|
96
|
-
|
|
|
97
|
-
| (IncrementAction & { action: "inc" })
|
|
98
|
-
| (SayAction & { action: "say" })
|
|
99
|
-
| (SetValueAction & { action: "set" })
|
|
100
|
-
| (SaveAction & { action: "save" })
|
|
97
|
+
CallAction | IncrementAction | SaveAction | SayAction | SetValueAction
|
|
101
98
|
>
|
|
102
99
|
| null
|
|
103
100
|
| undefined;
|
|
@@ -109,19 +106,19 @@ export const StepEventActionsStart$inboundSchema: z.ZodType<
|
|
|
109
106
|
z.ZodTypeDef,
|
|
110
107
|
unknown
|
|
111
108
|
> = z.union([
|
|
112
|
-
CallAction$inboundSchema
|
|
113
|
-
IncrementAction$inboundSchema
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
109
|
+
CallAction$inboundSchema,
|
|
110
|
+
IncrementAction$inboundSchema,
|
|
111
|
+
SaveAction$inboundSchema,
|
|
112
|
+
SayAction$inboundSchema,
|
|
113
|
+
SetValueAction$inboundSchema,
|
|
117
114
|
]);
|
|
118
115
|
/** @internal */
|
|
119
116
|
export type StepEventActionsStart$Outbound =
|
|
120
|
-
|
|
|
121
|
-
|
|
|
122
|
-
|
|
|
123
|
-
|
|
|
124
|
-
|
|
|
117
|
+
| CallAction$Outbound
|
|
118
|
+
| IncrementAction$Outbound
|
|
119
|
+
| SaveAction$Outbound
|
|
120
|
+
| SayAction$Outbound
|
|
121
|
+
| SetValueAction$Outbound;
|
|
125
122
|
|
|
126
123
|
/** @internal */
|
|
127
124
|
export const StepEventActionsStart$outboundSchema: z.ZodType<
|
|
@@ -129,11 +126,11 @@ export const StepEventActionsStart$outboundSchema: z.ZodType<
|
|
|
129
126
|
z.ZodTypeDef,
|
|
130
127
|
StepEventActionsStart
|
|
131
128
|
> = z.union([
|
|
132
|
-
CallAction$outboundSchema
|
|
133
|
-
IncrementAction$outboundSchema
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
129
|
+
CallAction$outboundSchema,
|
|
130
|
+
IncrementAction$outboundSchema,
|
|
131
|
+
SaveAction$outboundSchema,
|
|
132
|
+
SayAction$outboundSchema,
|
|
133
|
+
SetValueAction$outboundSchema,
|
|
137
134
|
]);
|
|
138
135
|
|
|
139
136
|
export function stepEventActionsStartToJSON(
|
|
@@ -156,19 +153,19 @@ export function stepEventActionsStartFromJSON(
|
|
|
156
153
|
/** @internal */
|
|
157
154
|
export const Enter$inboundSchema: z.ZodType<Enter, z.ZodTypeDef, unknown> = z
|
|
158
155
|
.union([
|
|
159
|
-
CallAction$inboundSchema
|
|
160
|
-
IncrementAction$inboundSchema
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
156
|
+
CallAction$inboundSchema,
|
|
157
|
+
IncrementAction$inboundSchema,
|
|
158
|
+
SaveAction$inboundSchema,
|
|
159
|
+
SayAction$inboundSchema,
|
|
160
|
+
SetValueAction$inboundSchema,
|
|
164
161
|
]);
|
|
165
162
|
/** @internal */
|
|
166
163
|
export type Enter$Outbound =
|
|
167
|
-
|
|
|
168
|
-
|
|
|
169
|
-
|
|
|
170
|
-
|
|
|
171
|
-
|
|
|
164
|
+
| CallAction$Outbound
|
|
165
|
+
| IncrementAction$Outbound
|
|
166
|
+
| SaveAction$Outbound
|
|
167
|
+
| SayAction$Outbound
|
|
168
|
+
| SetValueAction$Outbound;
|
|
172
169
|
|
|
173
170
|
/** @internal */
|
|
174
171
|
export const Enter$outboundSchema: z.ZodType<
|
|
@@ -176,11 +173,11 @@ export const Enter$outboundSchema: z.ZodType<
|
|
|
176
173
|
z.ZodTypeDef,
|
|
177
174
|
Enter
|
|
178
175
|
> = z.union([
|
|
179
|
-
CallAction$outboundSchema
|
|
180
|
-
IncrementAction$outboundSchema
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
176
|
+
CallAction$outboundSchema,
|
|
177
|
+
IncrementAction$outboundSchema,
|
|
178
|
+
SaveAction$outboundSchema,
|
|
179
|
+
SayAction$outboundSchema,
|
|
180
|
+
SetValueAction$outboundSchema,
|
|
184
181
|
]);
|
|
185
182
|
|
|
186
183
|
export function enterToJSON(enter: Enter): string {
|
|
@@ -196,25 +193,65 @@ export function enterFromJSON(
|
|
|
196
193
|
);
|
|
197
194
|
}
|
|
198
195
|
|
|
196
|
+
/** @internal */
|
|
197
|
+
export const Presubmit$inboundSchema: z.ZodType<
|
|
198
|
+
Presubmit,
|
|
199
|
+
z.ZodTypeDef,
|
|
200
|
+
unknown
|
|
201
|
+
> = z.union([
|
|
202
|
+
IncrementAction$inboundSchema,
|
|
203
|
+
SaveAction$inboundSchema,
|
|
204
|
+
SetValueAction$inboundSchema,
|
|
205
|
+
]);
|
|
206
|
+
/** @internal */
|
|
207
|
+
export type Presubmit$Outbound =
|
|
208
|
+
| IncrementAction$Outbound
|
|
209
|
+
| SaveAction$Outbound
|
|
210
|
+
| SetValueAction$Outbound;
|
|
211
|
+
|
|
212
|
+
/** @internal */
|
|
213
|
+
export const Presubmit$outboundSchema: z.ZodType<
|
|
214
|
+
Presubmit$Outbound,
|
|
215
|
+
z.ZodTypeDef,
|
|
216
|
+
Presubmit
|
|
217
|
+
> = z.union([
|
|
218
|
+
IncrementAction$outboundSchema,
|
|
219
|
+
SaveAction$outboundSchema,
|
|
220
|
+
SetValueAction$outboundSchema,
|
|
221
|
+
]);
|
|
222
|
+
|
|
223
|
+
export function presubmitToJSON(presubmit: Presubmit): string {
|
|
224
|
+
return JSON.stringify(Presubmit$outboundSchema.parse(presubmit));
|
|
225
|
+
}
|
|
226
|
+
export function presubmitFromJSON(
|
|
227
|
+
jsonString: string,
|
|
228
|
+
): SafeParseResult<Presubmit, SDKValidationError> {
|
|
229
|
+
return safeParse(
|
|
230
|
+
jsonString,
|
|
231
|
+
(x) => Presubmit$inboundSchema.parse(JSON.parse(x)),
|
|
232
|
+
`Failed to parse 'Presubmit' from JSON`,
|
|
233
|
+
);
|
|
234
|
+
}
|
|
235
|
+
|
|
199
236
|
/** @internal */
|
|
200
237
|
export const StepEventActionsSubmit$inboundSchema: z.ZodType<
|
|
201
238
|
StepEventActionsSubmit,
|
|
202
239
|
z.ZodTypeDef,
|
|
203
240
|
unknown
|
|
204
241
|
> = z.union([
|
|
205
|
-
CallAction$inboundSchema
|
|
206
|
-
IncrementAction$inboundSchema
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
242
|
+
CallAction$inboundSchema,
|
|
243
|
+
IncrementAction$inboundSchema,
|
|
244
|
+
SaveAction$inboundSchema,
|
|
245
|
+
SayAction$inboundSchema,
|
|
246
|
+
SetValueAction$inboundSchema,
|
|
210
247
|
]);
|
|
211
248
|
/** @internal */
|
|
212
249
|
export type StepEventActionsSubmit$Outbound =
|
|
213
|
-
|
|
|
214
|
-
|
|
|
215
|
-
|
|
|
216
|
-
|
|
|
217
|
-
|
|
|
250
|
+
| CallAction$Outbound
|
|
251
|
+
| IncrementAction$Outbound
|
|
252
|
+
| SaveAction$Outbound
|
|
253
|
+
| SayAction$Outbound
|
|
254
|
+
| SetValueAction$Outbound;
|
|
218
255
|
|
|
219
256
|
/** @internal */
|
|
220
257
|
export const StepEventActionsSubmit$outboundSchema: z.ZodType<
|
|
@@ -222,11 +259,11 @@ export const StepEventActionsSubmit$outboundSchema: z.ZodType<
|
|
|
222
259
|
z.ZodTypeDef,
|
|
223
260
|
StepEventActionsSubmit
|
|
224
261
|
> = z.union([
|
|
225
|
-
CallAction$outboundSchema
|
|
226
|
-
IncrementAction$outboundSchema
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
262
|
+
CallAction$outboundSchema,
|
|
263
|
+
IncrementAction$outboundSchema,
|
|
264
|
+
SaveAction$outboundSchema,
|
|
265
|
+
SayAction$outboundSchema,
|
|
266
|
+
SetValueAction$outboundSchema,
|
|
230
267
|
]);
|
|
231
268
|
|
|
232
269
|
export function stepEventActionsSubmitToJSON(
|
|
@@ -255,45 +292,42 @@ export const StepEventActions$inboundSchema: z.ZodType<
|
|
|
255
292
|
start: z.nullable(
|
|
256
293
|
z.array(
|
|
257
294
|
z.union([
|
|
258
|
-
CallAction$inboundSchema
|
|
259
|
-
IncrementAction$inboundSchema
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
SetValueAction$inboundSchema.and(
|
|
264
|
-
z.object({ action: z.literal("set") }),
|
|
265
|
-
),
|
|
266
|
-
SaveAction$inboundSchema.and(z.object({ action: z.literal("save") })),
|
|
295
|
+
CallAction$inboundSchema,
|
|
296
|
+
IncrementAction$inboundSchema,
|
|
297
|
+
SaveAction$inboundSchema,
|
|
298
|
+
SayAction$inboundSchema,
|
|
299
|
+
SetValueAction$inboundSchema,
|
|
267
300
|
]),
|
|
268
301
|
),
|
|
269
302
|
).optional(),
|
|
270
303
|
enter: z.nullable(
|
|
271
304
|
z.array(
|
|
272
305
|
z.union([
|
|
273
|
-
CallAction$inboundSchema
|
|
274
|
-
IncrementAction$inboundSchema
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
306
|
+
CallAction$inboundSchema,
|
|
307
|
+
IncrementAction$inboundSchema,
|
|
308
|
+
SaveAction$inboundSchema,
|
|
309
|
+
SayAction$inboundSchema,
|
|
310
|
+
SetValueAction$inboundSchema,
|
|
311
|
+
]),
|
|
312
|
+
),
|
|
313
|
+
).optional(),
|
|
314
|
+
presubmit: z.nullable(
|
|
315
|
+
z.array(
|
|
316
|
+
z.union([
|
|
317
|
+
IncrementAction$inboundSchema,
|
|
318
|
+
SaveAction$inboundSchema,
|
|
319
|
+
SetValueAction$inboundSchema,
|
|
282
320
|
]),
|
|
283
321
|
),
|
|
284
322
|
).optional(),
|
|
285
323
|
submit: z.nullable(
|
|
286
324
|
z.array(
|
|
287
325
|
z.union([
|
|
288
|
-
CallAction$inboundSchema
|
|
289
|
-
IncrementAction$inboundSchema
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
SetValueAction$inboundSchema.and(
|
|
294
|
-
z.object({ action: z.literal("set") }),
|
|
295
|
-
),
|
|
296
|
-
SaveAction$inboundSchema.and(z.object({ action: z.literal("save") })),
|
|
326
|
+
CallAction$inboundSchema,
|
|
327
|
+
IncrementAction$inboundSchema,
|
|
328
|
+
SaveAction$inboundSchema,
|
|
329
|
+
SayAction$inboundSchema,
|
|
330
|
+
SetValueAction$inboundSchema,
|
|
297
331
|
]),
|
|
298
332
|
),
|
|
299
333
|
).optional(),
|
|
@@ -302,31 +336,37 @@ export const StepEventActions$inboundSchema: z.ZodType<
|
|
|
302
336
|
export type StepEventActions$Outbound = {
|
|
303
337
|
start?:
|
|
304
338
|
| Array<
|
|
305
|
-
|
|
|
306
|
-
|
|
|
307
|
-
|
|
|
308
|
-
|
|
|
309
|
-
|
|
|
339
|
+
| CallAction$Outbound
|
|
340
|
+
| IncrementAction$Outbound
|
|
341
|
+
| SaveAction$Outbound
|
|
342
|
+
| SayAction$Outbound
|
|
343
|
+
| SetValueAction$Outbound
|
|
310
344
|
>
|
|
311
345
|
| null
|
|
312
346
|
| undefined;
|
|
313
347
|
enter?:
|
|
314
348
|
| Array<
|
|
315
|
-
|
|
|
316
|
-
|
|
|
317
|
-
|
|
|
318
|
-
|
|
|
319
|
-
|
|
|
349
|
+
| CallAction$Outbound
|
|
350
|
+
| IncrementAction$Outbound
|
|
351
|
+
| SaveAction$Outbound
|
|
352
|
+
| SayAction$Outbound
|
|
353
|
+
| SetValueAction$Outbound
|
|
354
|
+
>
|
|
355
|
+
| null
|
|
356
|
+
| undefined;
|
|
357
|
+
presubmit?:
|
|
358
|
+
| Array<
|
|
359
|
+
IncrementAction$Outbound | SaveAction$Outbound | SetValueAction$Outbound
|
|
320
360
|
>
|
|
321
361
|
| null
|
|
322
362
|
| undefined;
|
|
323
363
|
submit?:
|
|
324
364
|
| Array<
|
|
325
|
-
|
|
|
326
|
-
|
|
|
327
|
-
|
|
|
328
|
-
|
|
|
329
|
-
|
|
|
365
|
+
| CallAction$Outbound
|
|
366
|
+
| IncrementAction$Outbound
|
|
367
|
+
| SaveAction$Outbound
|
|
368
|
+
| SayAction$Outbound
|
|
369
|
+
| SetValueAction$Outbound
|
|
330
370
|
>
|
|
331
371
|
| null
|
|
332
372
|
| undefined;
|
|
@@ -341,45 +381,42 @@ export const StepEventActions$outboundSchema: z.ZodType<
|
|
|
341
381
|
start: z.nullable(
|
|
342
382
|
z.array(
|
|
343
383
|
z.union([
|
|
344
|
-
CallAction$outboundSchema
|
|
345
|
-
IncrementAction$outboundSchema
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
SetValueAction$outboundSchema.and(
|
|
350
|
-
z.object({ action: z.literal("set") }),
|
|
351
|
-
),
|
|
352
|
-
SaveAction$outboundSchema.and(z.object({ action: z.literal("save") })),
|
|
384
|
+
CallAction$outboundSchema,
|
|
385
|
+
IncrementAction$outboundSchema,
|
|
386
|
+
SaveAction$outboundSchema,
|
|
387
|
+
SayAction$outboundSchema,
|
|
388
|
+
SetValueAction$outboundSchema,
|
|
353
389
|
]),
|
|
354
390
|
),
|
|
355
391
|
).optional(),
|
|
356
392
|
enter: z.nullable(
|
|
357
393
|
z.array(
|
|
358
394
|
z.union([
|
|
359
|
-
CallAction$outboundSchema
|
|
360
|
-
IncrementAction$outboundSchema
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
395
|
+
CallAction$outboundSchema,
|
|
396
|
+
IncrementAction$outboundSchema,
|
|
397
|
+
SaveAction$outboundSchema,
|
|
398
|
+
SayAction$outboundSchema,
|
|
399
|
+
SetValueAction$outboundSchema,
|
|
400
|
+
]),
|
|
401
|
+
),
|
|
402
|
+
).optional(),
|
|
403
|
+
presubmit: z.nullable(
|
|
404
|
+
z.array(
|
|
405
|
+
z.union([
|
|
406
|
+
IncrementAction$outboundSchema,
|
|
407
|
+
SaveAction$outboundSchema,
|
|
408
|
+
SetValueAction$outboundSchema,
|
|
368
409
|
]),
|
|
369
410
|
),
|
|
370
411
|
).optional(),
|
|
371
412
|
submit: z.nullable(
|
|
372
413
|
z.array(
|
|
373
414
|
z.union([
|
|
374
|
-
CallAction$outboundSchema
|
|
375
|
-
IncrementAction$outboundSchema
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
SetValueAction$outboundSchema.and(
|
|
380
|
-
z.object({ action: z.literal("set") }),
|
|
381
|
-
),
|
|
382
|
-
SaveAction$outboundSchema.and(z.object({ action: z.literal("save") })),
|
|
415
|
+
CallAction$outboundSchema,
|
|
416
|
+
IncrementAction$outboundSchema,
|
|
417
|
+
SaveAction$outboundSchema,
|
|
418
|
+
SayAction$outboundSchema,
|
|
419
|
+
SetValueAction$outboundSchema,
|
|
383
420
|
]),
|
|
384
421
|
),
|
|
385
422
|
).optional(),
|
|
@@ -40,7 +40,7 @@ export type StepsTask = {
|
|
|
40
40
|
variables?: Array<Variable> | null | undefined;
|
|
41
41
|
metadata?: ContextTaskMetadata | null | undefined;
|
|
42
42
|
tool?: ContextToolInfo | null | undefined;
|
|
43
|
-
type
|
|
43
|
+
type: "steps";
|
|
44
44
|
version?: "v1alpha" | undefined;
|
|
45
45
|
steps?: Array<Step> | undefined;
|
|
46
46
|
};
|
|
@@ -56,7 +56,7 @@ export const StepsTask$inboundSchema: z.ZodType<
|
|
|
56
56
|
variables: z.nullable(z.array(Variable$inboundSchema)).optional(),
|
|
57
57
|
metadata: z.nullable(ContextTaskMetadata$inboundSchema).optional(),
|
|
58
58
|
tool: z.nullable(ContextToolInfo$inboundSchema).optional(),
|
|
59
|
-
type: z.literal("steps")
|
|
59
|
+
type: z.literal("steps"),
|
|
60
60
|
version: z.literal("v1alpha").default("v1alpha"),
|
|
61
61
|
steps: z.array(Step$inboundSchema).optional(),
|
|
62
62
|
});
|
|
@@ -83,7 +83,7 @@ export const StepsTask$outboundSchema: z.ZodType<
|
|
|
83
83
|
variables: z.nullable(z.array(Variable$outboundSchema)).optional(),
|
|
84
84
|
metadata: z.nullable(ContextTaskMetadata$outboundSchema).optional(),
|
|
85
85
|
tool: z.nullable(ContextToolInfo$outboundSchema).optional(),
|
|
86
|
-
type: z.literal("steps")
|
|
86
|
+
type: z.literal("steps"),
|
|
87
87
|
version: z.literal("v1alpha").default("v1alpha" as const),
|
|
88
88
|
steps: z.array(Step$outboundSchema).optional(),
|
|
89
89
|
});
|
|
@@ -33,13 +33,13 @@ export const ToolParameterTransformCondition$inboundSchema: z.ZodType<
|
|
|
33
33
|
> = z.object({
|
|
34
34
|
key: z.string(),
|
|
35
35
|
value: z.string(),
|
|
36
|
-
operator: z.nullable(z.literal("eq")
|
|
36
|
+
operator: z.nullable(z.literal("eq")).optional(),
|
|
37
37
|
});
|
|
38
38
|
/** @internal */
|
|
39
39
|
export type ToolParameterTransformCondition$Outbound = {
|
|
40
40
|
key: string;
|
|
41
41
|
value: string;
|
|
42
|
-
operator
|
|
42
|
+
operator?: "eq" | null | undefined;
|
|
43
43
|
};
|
|
44
44
|
|
|
45
45
|
/** @internal */
|
|
@@ -50,7 +50,7 @@ export const ToolParameterTransformCondition$outboundSchema: z.ZodType<
|
|
|
50
50
|
> = z.object({
|
|
51
51
|
key: z.string(),
|
|
52
52
|
value: z.string(),
|
|
53
|
-
operator: z.nullable(z.literal("eq")),
|
|
53
|
+
operator: z.nullable(z.literal("eq")).optional(),
|
|
54
54
|
});
|
|
55
55
|
|
|
56
56
|
export function toolParameterTransformConditionToJSON(
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
} from "./jmespathexpression.js";
|
|
29
29
|
|
|
30
30
|
export type One =
|
|
31
|
-
|
|
|
31
|
+
| CelExpression
|
|
32
32
|
| (JMESPathExpression & { type: "jmespath" })
|
|
33
33
|
| (JMESPathExpression & { type: "jp" });
|
|
34
34
|
|
|
@@ -37,7 +37,7 @@ export type One =
|
|
|
37
37
|
*/
|
|
38
38
|
export type VariableValueFrom =
|
|
39
39
|
| CaseExpression
|
|
40
|
-
|
|
|
40
|
+
| CelExpression
|
|
41
41
|
| (JMESPathExpression & { type: "jmespath" })
|
|
42
42
|
| (JMESPathExpression & { type: "jp" })
|
|
43
43
|
| string;
|
|
@@ -63,7 +63,7 @@ export type Variable = {
|
|
|
63
63
|
*/
|
|
64
64
|
valueFrom?:
|
|
65
65
|
| CaseExpression
|
|
66
|
-
|
|
|
66
|
+
| CelExpression
|
|
67
67
|
| (JMESPathExpression & { type: "jmespath" })
|
|
68
68
|
| (JMESPathExpression & { type: "jp" })
|
|
69
69
|
| string
|
|
@@ -85,7 +85,7 @@ export type Variable = {
|
|
|
85
85
|
/** @internal */
|
|
86
86
|
export const One$inboundSchema: z.ZodType<One, z.ZodTypeDef, unknown> = z.union(
|
|
87
87
|
[
|
|
88
|
-
CelExpression$inboundSchema
|
|
88
|
+
CelExpression$inboundSchema,
|
|
89
89
|
JMESPathExpression$inboundSchema.and(
|
|
90
90
|
z.object({ type: z.literal("jmespath") }),
|
|
91
91
|
),
|
|
@@ -94,14 +94,14 @@ export const One$inboundSchema: z.ZodType<One, z.ZodTypeDef, unknown> = z.union(
|
|
|
94
94
|
);
|
|
95
95
|
/** @internal */
|
|
96
96
|
export type One$Outbound =
|
|
97
|
-
|
|
|
97
|
+
| CelExpression$Outbound
|
|
98
98
|
| (JMESPathExpression$Outbound & { type: "jmespath" })
|
|
99
99
|
| (JMESPathExpression$Outbound & { type: "jp" });
|
|
100
100
|
|
|
101
101
|
/** @internal */
|
|
102
102
|
export const One$outboundSchema: z.ZodType<One$Outbound, z.ZodTypeDef, One> = z
|
|
103
103
|
.union([
|
|
104
|
-
CelExpression$outboundSchema
|
|
104
|
+
CelExpression$outboundSchema,
|
|
105
105
|
JMESPathExpression$outboundSchema.and(
|
|
106
106
|
z.object({ type: z.literal("jmespath") }),
|
|
107
107
|
),
|
|
@@ -129,7 +129,7 @@ export const VariableValueFrom$inboundSchema: z.ZodType<
|
|
|
129
129
|
> = z.union([
|
|
130
130
|
CaseExpression$inboundSchema,
|
|
131
131
|
z.union([
|
|
132
|
-
CelExpression$inboundSchema
|
|
132
|
+
CelExpression$inboundSchema,
|
|
133
133
|
JMESPathExpression$inboundSchema.and(
|
|
134
134
|
z.object({ type: z.literal("jmespath") }),
|
|
135
135
|
),
|
|
@@ -140,7 +140,7 @@ export const VariableValueFrom$inboundSchema: z.ZodType<
|
|
|
140
140
|
/** @internal */
|
|
141
141
|
export type VariableValueFrom$Outbound =
|
|
142
142
|
| CaseExpression$Outbound
|
|
143
|
-
|
|
|
143
|
+
| CelExpression$Outbound
|
|
144
144
|
| (JMESPathExpression$Outbound & { type: "jmespath" })
|
|
145
145
|
| (JMESPathExpression$Outbound & { type: "jp" })
|
|
146
146
|
| string;
|
|
@@ -153,7 +153,7 @@ export const VariableValueFrom$outboundSchema: z.ZodType<
|
|
|
153
153
|
> = z.union([
|
|
154
154
|
CaseExpression$outboundSchema,
|
|
155
155
|
z.union([
|
|
156
|
-
CelExpression$outboundSchema
|
|
156
|
+
CelExpression$outboundSchema,
|
|
157
157
|
JMESPathExpression$outboundSchema.and(
|
|
158
158
|
z.object({ type: z.literal("jmespath") }),
|
|
159
159
|
),
|
|
@@ -197,7 +197,7 @@ export const Variable$inboundSchema: z.ZodType<
|
|
|
197
197
|
z.union([
|
|
198
198
|
CaseExpression$inboundSchema,
|
|
199
199
|
z.union([
|
|
200
|
-
CelExpression$inboundSchema
|
|
200
|
+
CelExpression$inboundSchema,
|
|
201
201
|
JMESPathExpression$inboundSchema.and(
|
|
202
202
|
z.object({ type: z.literal("jmespath") }),
|
|
203
203
|
),
|
|
@@ -226,7 +226,7 @@ export type Variable$Outbound = {
|
|
|
226
226
|
value?: any | null | undefined;
|
|
227
227
|
value_from?:
|
|
228
228
|
| CaseExpression$Outbound
|
|
229
|
-
|
|
|
229
|
+
| CelExpression$Outbound
|
|
230
230
|
| (JMESPathExpression$Outbound & { type: "jmespath" })
|
|
231
231
|
| (JMESPathExpression$Outbound & { type: "jp" })
|
|
232
232
|
| string
|
|
@@ -253,7 +253,7 @@ export const Variable$outboundSchema: z.ZodType<
|
|
|
253
253
|
z.union([
|
|
254
254
|
CaseExpression$outboundSchema,
|
|
255
255
|
z.union([
|
|
256
|
-
CelExpression$outboundSchema
|
|
256
|
+
CelExpression$outboundSchema,
|
|
257
257
|
JMESPathExpression$outboundSchema.and(
|
|
258
258
|
z.object({ type: z.literal("jmespath") }),
|
|
259
259
|
),
|
|
@@ -16,8 +16,16 @@ export function startCountingUnrecognized() {
|
|
|
16
16
|
refCount++;
|
|
17
17
|
const start = globalCount;
|
|
18
18
|
return {
|
|
19
|
-
|
|
19
|
+
/**
|
|
20
|
+
* Ends counting and returns the delta.
|
|
21
|
+
* @param delta - If provided, only this amount is added to the parent counter
|
|
22
|
+
* (used for nested unions where we only want to record the winning option's count).
|
|
23
|
+
* If not provided, records all counts since start().
|
|
24
|
+
*/
|
|
25
|
+
end: (delta?: number) => {
|
|
20
26
|
const count = globalCount - start;
|
|
27
|
+
// Reset globalCount back to start, then add only the specified delta
|
|
28
|
+
globalCount = start + (delta ?? count);
|
|
21
29
|
if (--refCount === 0) globalCount = 0;
|
|
22
30
|
return count;
|
|
23
31
|
},
|
package/tsconfig.json
CHANGED
package/types/unrecognized.d.ts
CHANGED
|
@@ -4,7 +4,13 @@ export type Unrecognized<T> = T & {
|
|
|
4
4
|
};
|
|
5
5
|
declare function unrecognized<T>(value: T): Unrecognized<T>;
|
|
6
6
|
export declare function startCountingUnrecognized(): {
|
|
7
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Ends counting and returns the delta.
|
|
9
|
+
* @param delta - If provided, only this amount is added to the parent counter
|
|
10
|
+
* (used for nested unions where we only want to record the winning option's count).
|
|
11
|
+
* If not provided, records all counts since start().
|
|
12
|
+
*/
|
|
13
|
+
end: (delta?: number) => number;
|
|
8
14
|
};
|
|
9
15
|
export { unrecognized };
|
|
10
16
|
//# sourceMappingURL=unrecognized.d.ts.map
|