syllable-sdk 1.0.15 → 1.0.16-rc.2

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.
Files changed (49) hide show
  1. package/README.md +38 -38
  2. package/bin/mcp-server.js +223 -94
  3. package/bin/mcp-server.js.map +14 -13
  4. package/examples/package-lock.json +1 -1
  5. package/jsr.json +1 -1
  6. package/lib/config.d.ts +3 -3
  7. package/lib/config.js +3 -3
  8. package/lib/config.js.map +1 -1
  9. package/mcp-server/mcp-server.js +1 -1
  10. package/mcp-server/mcp-server.js.map +1 -1
  11. package/mcp-server/server.js +1 -1
  12. package/mcp-server/server.js.map +1 -1
  13. package/models/components/eventtaskevents.d.ts +4 -5
  14. package/models/components/eventtaskevents.d.ts.map +1 -1
  15. package/models/components/eventtaskevents.js +0 -5
  16. package/models/components/eventtaskevents.js.map +1 -1
  17. package/models/components/expressiontask.d.ts +1 -1
  18. package/models/components/expressiontaskevents.d.ts +5 -5
  19. package/models/components/expressiontaskevents.d.ts.map +1 -1
  20. package/models/components/expressiontaskevents.js +0 -4
  21. package/models/components/expressiontaskevents.js.map +1 -1
  22. package/models/components/getvalueaction.d.ts +154 -0
  23. package/models/components/getvalueaction.d.ts.map +1 -0
  24. package/models/components/getvalueaction.js +220 -0
  25. package/models/components/getvalueaction.js.map +1 -0
  26. package/models/components/index.d.ts +1 -0
  27. package/models/components/index.d.ts.map +1 -1
  28. package/models/components/index.js +1 -0
  29. package/models/components/index.js.map +1 -1
  30. package/models/components/stepeventactions.d.ts +45 -12
  31. package/models/components/stepeventactions.d.ts.map +1 -1
  32. package/models/components/stepeventactions.js +17 -8
  33. package/models/components/stepeventactions.js.map +1 -1
  34. package/models/components/toolparametertransform.d.ts +5 -5
  35. package/models/components/toolparametertransform.d.ts.map +1 -1
  36. package/models/components/toolparametertransform.js +6 -7
  37. package/models/components/toolparametertransform.js.map +1 -1
  38. package/openapi.json +175 -67
  39. package/package.json +1 -1
  40. package/src/lib/config.ts +3 -3
  41. package/src/mcp-server/mcp-server.ts +1 -1
  42. package/src/mcp-server/server.ts +1 -1
  43. package/src/models/components/eventtaskevents.ts +1 -16
  44. package/src/models/components/expressiontask.ts +1 -1
  45. package/src/models/components/expressiontaskevents.ts +3 -16
  46. package/src/models/components/getvalueaction.ts +458 -0
  47. package/src/models/components/index.ts +1 -0
  48. package/src/models/components/stepeventactions.ts +71 -21
  49. package/src/models/components/toolparametertransform.ts +13 -9
@@ -12,6 +12,12 @@ import {
12
12
  CallAction$Outbound,
13
13
  CallAction$outboundSchema,
14
14
  } from "./callaction.js";
15
+ import {
16
+ GetValueAction,
17
+ GetValueAction$inboundSchema,
18
+ GetValueAction$Outbound,
19
+ GetValueAction$outboundSchema,
20
+ } from "./getvalueaction.js";
15
21
  import {
16
22
  IncrementAction,
17
23
  IncrementAction$inboundSchema,
@@ -40,18 +46,23 @@ import {
40
46
  export type StepEventActionsStart =
41
47
  | CallAction
42
48
  | IncrementAction
43
- | SaveAction
44
49
  | SayAction
45
50
  | SetValueAction;
46
51
 
47
52
  export type Enter =
48
53
  | CallAction
54
+ | (GetValueAction & { action: "get" })
49
55
  | IncrementAction
50
- | SaveAction
56
+ | (GetValueAction & { action: "load" })
51
57
  | SayAction
52
58
  | SetValueAction;
53
59
 
54
- export type Presubmit = IncrementAction | SaveAction | SetValueAction;
60
+ export type Presubmit =
61
+ | (GetValueAction & { action: "get" })
62
+ | IncrementAction
63
+ | (GetValueAction & { action: "load" })
64
+ | SaveAction
65
+ | SetValueAction;
55
66
 
56
67
  export type StepEventActionsSubmit =
57
68
  | CallAction
@@ -68,9 +79,7 @@ export type StepEventActions = {
68
79
  * Actions to execute on the first input from the user.
69
80
  */
70
81
  start?:
71
- | Array<
72
- CallAction | IncrementAction | SaveAction | SayAction | SetValueAction
73
- >
82
+ | Array<CallAction | IncrementAction | SayAction | SetValueAction>
74
83
  | null
75
84
  | undefined;
76
85
  /**
@@ -78,7 +87,12 @@ export type StepEventActions = {
78
87
  */
79
88
  enter?:
80
89
  | Array<
81
- CallAction | IncrementAction | SaveAction | SayAction | SetValueAction
90
+ | CallAction
91
+ | (GetValueAction & { action: "get" })
92
+ | IncrementAction
93
+ | (GetValueAction & { action: "load" })
94
+ | SayAction
95
+ | SetValueAction
82
96
  >
83
97
  | null
84
98
  | undefined;
@@ -86,7 +100,13 @@ export type StepEventActions = {
86
100
  * 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
101
  */
88
102
  presubmit?:
89
- | Array<IncrementAction | SaveAction | SetValueAction>
103
+ | Array<
104
+ | (GetValueAction & { action: "get" })
105
+ | IncrementAction
106
+ | (GetValueAction & { action: "load" })
107
+ | SaveAction
108
+ | SetValueAction
109
+ >
90
110
  | null
91
111
  | undefined;
92
112
  /**
@@ -108,7 +128,6 @@ export const StepEventActionsStart$inboundSchema: z.ZodType<
108
128
  > = z.union([
109
129
  CallAction$inboundSchema,
110
130
  IncrementAction$inboundSchema,
111
- SaveAction$inboundSchema,
112
131
  SayAction$inboundSchema,
113
132
  SetValueAction$inboundSchema,
114
133
  ]);
@@ -116,7 +135,6 @@ export const StepEventActionsStart$inboundSchema: z.ZodType<
116
135
  export type StepEventActionsStart$Outbound =
117
136
  | CallAction$Outbound
118
137
  | IncrementAction$Outbound
119
- | SaveAction$Outbound
120
138
  | SayAction$Outbound
121
139
  | SetValueAction$Outbound;
122
140
 
@@ -128,7 +146,6 @@ export const StepEventActionsStart$outboundSchema: z.ZodType<
128
146
  > = z.union([
129
147
  CallAction$outboundSchema,
130
148
  IncrementAction$outboundSchema,
131
- SaveAction$outboundSchema,
132
149
  SayAction$outboundSchema,
133
150
  SetValueAction$outboundSchema,
134
151
  ]);
@@ -154,16 +171,18 @@ export function stepEventActionsStartFromJSON(
154
171
  export const Enter$inboundSchema: z.ZodType<Enter, z.ZodTypeDef, unknown> = z
155
172
  .union([
156
173
  CallAction$inboundSchema,
174
+ GetValueAction$inboundSchema.and(z.object({ action: z.literal("get") })),
157
175
  IncrementAction$inboundSchema,
158
- SaveAction$inboundSchema,
176
+ GetValueAction$inboundSchema.and(z.object({ action: z.literal("load") })),
159
177
  SayAction$inboundSchema,
160
178
  SetValueAction$inboundSchema,
161
179
  ]);
162
180
  /** @internal */
163
181
  export type Enter$Outbound =
164
182
  | CallAction$Outbound
183
+ | (GetValueAction$Outbound & { action: "get" })
165
184
  | IncrementAction$Outbound
166
- | SaveAction$Outbound
185
+ | (GetValueAction$Outbound & { action: "load" })
167
186
  | SayAction$Outbound
168
187
  | SetValueAction$Outbound;
169
188
 
@@ -174,8 +193,9 @@ export const Enter$outboundSchema: z.ZodType<
174
193
  Enter
175
194
  > = z.union([
176
195
  CallAction$outboundSchema,
196
+ GetValueAction$outboundSchema.and(z.object({ action: z.literal("get") })),
177
197
  IncrementAction$outboundSchema,
178
- SaveAction$outboundSchema,
198
+ GetValueAction$outboundSchema.and(z.object({ action: z.literal("load") })),
179
199
  SayAction$outboundSchema,
180
200
  SetValueAction$outboundSchema,
181
201
  ]);
@@ -199,13 +219,17 @@ export const Presubmit$inboundSchema: z.ZodType<
199
219
  z.ZodTypeDef,
200
220
  unknown
201
221
  > = z.union([
222
+ GetValueAction$inboundSchema.and(z.object({ action: z.literal("get") })),
202
223
  IncrementAction$inboundSchema,
224
+ GetValueAction$inboundSchema.and(z.object({ action: z.literal("load") })),
203
225
  SaveAction$inboundSchema,
204
226
  SetValueAction$inboundSchema,
205
227
  ]);
206
228
  /** @internal */
207
229
  export type Presubmit$Outbound =
230
+ | (GetValueAction$Outbound & { action: "get" })
208
231
  | IncrementAction$Outbound
232
+ | (GetValueAction$Outbound & { action: "load" })
209
233
  | SaveAction$Outbound
210
234
  | SetValueAction$Outbound;
211
235
 
@@ -215,7 +239,9 @@ export const Presubmit$outboundSchema: z.ZodType<
215
239
  z.ZodTypeDef,
216
240
  Presubmit
217
241
  > = z.union([
242
+ GetValueAction$outboundSchema.and(z.object({ action: z.literal("get") })),
218
243
  IncrementAction$outboundSchema,
244
+ GetValueAction$outboundSchema.and(z.object({ action: z.literal("load") })),
219
245
  SaveAction$outboundSchema,
220
246
  SetValueAction$outboundSchema,
221
247
  ]);
@@ -294,7 +320,6 @@ export const StepEventActions$inboundSchema: z.ZodType<
294
320
  z.union([
295
321
  CallAction$inboundSchema,
296
322
  IncrementAction$inboundSchema,
297
- SaveAction$inboundSchema,
298
323
  SayAction$inboundSchema,
299
324
  SetValueAction$inboundSchema,
300
325
  ]),
@@ -304,8 +329,13 @@ export const StepEventActions$inboundSchema: z.ZodType<
304
329
  z.array(
305
330
  z.union([
306
331
  CallAction$inboundSchema,
332
+ GetValueAction$inboundSchema.and(
333
+ z.object({ action: z.literal("get") }),
334
+ ),
307
335
  IncrementAction$inboundSchema,
308
- SaveAction$inboundSchema,
336
+ GetValueAction$inboundSchema.and(
337
+ z.object({ action: z.literal("load") }),
338
+ ),
309
339
  SayAction$inboundSchema,
310
340
  SetValueAction$inboundSchema,
311
341
  ]),
@@ -314,7 +344,13 @@ export const StepEventActions$inboundSchema: z.ZodType<
314
344
  presubmit: z.nullable(
315
345
  z.array(
316
346
  z.union([
347
+ GetValueAction$inboundSchema.and(
348
+ z.object({ action: z.literal("get") }),
349
+ ),
317
350
  IncrementAction$inboundSchema,
351
+ GetValueAction$inboundSchema.and(
352
+ z.object({ action: z.literal("load") }),
353
+ ),
318
354
  SaveAction$inboundSchema,
319
355
  SetValueAction$inboundSchema,
320
356
  ]),
@@ -338,7 +374,6 @@ export type StepEventActions$Outbound = {
338
374
  | Array<
339
375
  | CallAction$Outbound
340
376
  | IncrementAction$Outbound
341
- | SaveAction$Outbound
342
377
  | SayAction$Outbound
343
378
  | SetValueAction$Outbound
344
379
  >
@@ -347,8 +382,9 @@ export type StepEventActions$Outbound = {
347
382
  enter?:
348
383
  | Array<
349
384
  | CallAction$Outbound
385
+ | (GetValueAction$Outbound & { action: "get" })
350
386
  | IncrementAction$Outbound
351
- | SaveAction$Outbound
387
+ | (GetValueAction$Outbound & { action: "load" })
352
388
  | SayAction$Outbound
353
389
  | SetValueAction$Outbound
354
390
  >
@@ -356,7 +392,11 @@ export type StepEventActions$Outbound = {
356
392
  | undefined;
357
393
  presubmit?:
358
394
  | Array<
359
- IncrementAction$Outbound | SaveAction$Outbound | SetValueAction$Outbound
395
+ | (GetValueAction$Outbound & { action: "get" })
396
+ | IncrementAction$Outbound
397
+ | (GetValueAction$Outbound & { action: "load" })
398
+ | SaveAction$Outbound
399
+ | SetValueAction$Outbound
360
400
  >
361
401
  | null
362
402
  | undefined;
@@ -383,7 +423,6 @@ export const StepEventActions$outboundSchema: z.ZodType<
383
423
  z.union([
384
424
  CallAction$outboundSchema,
385
425
  IncrementAction$outboundSchema,
386
- SaveAction$outboundSchema,
387
426
  SayAction$outboundSchema,
388
427
  SetValueAction$outboundSchema,
389
428
  ]),
@@ -393,8 +432,13 @@ export const StepEventActions$outboundSchema: z.ZodType<
393
432
  z.array(
394
433
  z.union([
395
434
  CallAction$outboundSchema,
435
+ GetValueAction$outboundSchema.and(
436
+ z.object({ action: z.literal("get") }),
437
+ ),
396
438
  IncrementAction$outboundSchema,
397
- SaveAction$outboundSchema,
439
+ GetValueAction$outboundSchema.and(
440
+ z.object({ action: z.literal("load") }),
441
+ ),
398
442
  SayAction$outboundSchema,
399
443
  SetValueAction$outboundSchema,
400
444
  ]),
@@ -403,7 +447,13 @@ export const StepEventActions$outboundSchema: z.ZodType<
403
447
  presubmit: z.nullable(
404
448
  z.array(
405
449
  z.union([
450
+ GetValueAction$outboundSchema.and(
451
+ z.object({ action: z.literal("get") }),
452
+ ),
406
453
  IncrementAction$outboundSchema,
454
+ GetValueAction$outboundSchema.and(
455
+ z.object({ action: z.literal("load") }),
456
+ ),
407
457
  SaveAction$outboundSchema,
408
458
  SetValueAction$outboundSchema,
409
459
  ]),
@@ -17,7 +17,7 @@ import {
17
17
  /**
18
18
  * The action to perform on the tool parameter value: `default` means only set the value (using the `format` field) if the parameter doesn't exist or is empty, `override` means always set the value," and `remove` means "remove the parameter value."
19
19
  */
20
- export const Action = {
20
+ export const ToolParameterTransformAction = {
21
21
  Default: "default",
22
22
  Override: "override",
23
23
  Remove: "remove",
@@ -25,7 +25,9 @@ export const Action = {
25
25
  /**
26
26
  * The action to perform on the tool parameter value: `default` means only set the value (using the `format` field) if the parameter doesn't exist or is empty, `override` means always set the value," and `remove` means "remove the parameter value."
27
27
  */
28
- export type Action = ClosedEnum<typeof Action>;
28
+ export type ToolParameterTransformAction = ClosedEnum<
29
+ typeof ToolParameterTransformAction
30
+ >;
29
31
 
30
32
  /**
31
33
  * A transform to be applied to the value of a tool parameter.
@@ -40,7 +42,7 @@ export type ToolParameterTransform = {
40
42
  /**
41
43
  * The action to perform on the tool parameter value: `default` means only set the value (using the `format` field) if the parameter doesn't exist or is empty, `override` means always set the value," and `remove` means "remove the parameter value."
42
44
  */
43
- action?: Action | undefined;
45
+ action?: ToolParameterTransformAction | undefined;
44
46
  /**
45
47
  * Only apply the transform if the condition is met.
46
48
  */
@@ -56,11 +58,13 @@ export type ToolParameterTransform = {
56
58
  };
57
59
 
58
60
  /** @internal */
59
- export const Action$inboundSchema: z.ZodNativeEnum<typeof Action> = z
60
- .nativeEnum(Action);
61
+ export const ToolParameterTransformAction$inboundSchema: z.ZodNativeEnum<
62
+ typeof ToolParameterTransformAction
63
+ > = z.nativeEnum(ToolParameterTransformAction);
61
64
  /** @internal */
62
- export const Action$outboundSchema: z.ZodNativeEnum<typeof Action> =
63
- Action$inboundSchema;
65
+ export const ToolParameterTransformAction$outboundSchema: z.ZodNativeEnum<
66
+ typeof ToolParameterTransformAction
67
+ > = ToolParameterTransformAction$inboundSchema;
64
68
 
65
69
  /** @internal */
66
70
  export const ToolParameterTransform$inboundSchema: z.ZodType<
@@ -68,7 +72,7 @@ export const ToolParameterTransform$inboundSchema: z.ZodType<
68
72
  z.ZodTypeDef,
69
73
  unknown
70
74
  > = z.object({
71
- action: Action$inboundSchema.default("default"),
75
+ action: ToolParameterTransformAction$inboundSchema.default("default"),
72
76
  when: z.nullable(ToolParameterTransformCondition$inboundSchema).optional(),
73
77
  value: z.nullable(z.any()).optional(),
74
78
  format: z.nullable(z.string()).optional(),
@@ -87,7 +91,7 @@ export const ToolParameterTransform$outboundSchema: z.ZodType<
87
91
  z.ZodTypeDef,
88
92
  ToolParameterTransform
89
93
  > = z.object({
90
- action: Action$outboundSchema.default("default"),
94
+ action: ToolParameterTransformAction$outboundSchema.default("default"),
91
95
  when: z.nullable(ToolParameterTransformCondition$outboundSchema).optional(),
92
96
  value: z.nullable(z.any()).optional(),
93
97
  format: z.nullable(z.string()).optional(),