syllable-sdk 0.0.9 → 0.1.0-alpha

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 (130) hide show
  1. package/README.md +4 -4
  2. package/docs/sdks/agents/README.md +1 -1
  3. package/docs/sdks/channels/README.md +1 -1
  4. package/docs/sdks/prompts/README.md +25 -5
  5. package/docs/sdks/tools/README.md +1 -1
  6. package/funcs/agentsDelete.d.ts +0 -3
  7. package/funcs/agentsDelete.d.ts.map +1 -1
  8. package/funcs/agentsDelete.js +0 -3
  9. package/funcs/agentsDelete.js.map +1 -1
  10. package/funcs/channelsDelete.d.ts +0 -3
  11. package/funcs/channelsDelete.d.ts.map +1 -1
  12. package/funcs/channelsDelete.js +0 -3
  13. package/funcs/channelsDelete.js.map +1 -1
  14. package/funcs/promptsDelete.d.ts +0 -3
  15. package/funcs/promptsDelete.d.ts.map +1 -1
  16. package/funcs/promptsDelete.js +0 -3
  17. package/funcs/promptsDelete.js.map +1 -1
  18. package/funcs/toolsList.d.ts +1 -1
  19. package/funcs/toolsList.d.ts.map +1 -1
  20. package/funcs/toolsList.js +1 -1
  21. package/funcs/toolsList.js.map +1 -1
  22. package/lib/config.d.ts +2 -2
  23. package/lib/config.js +2 -2
  24. package/lib/config.js.map +1 -1
  25. package/models/components/availabletarget.d.ts +2 -0
  26. package/models/components/availabletarget.d.ts.map +1 -1
  27. package/models/components/availabletarget.js +4 -0
  28. package/models/components/availabletarget.js.map +1 -1
  29. package/models/components/custommessagecreate.d.ts +2 -0
  30. package/models/components/custommessagecreate.d.ts.map +1 -1
  31. package/models/components/custommessagecreate.js +2 -0
  32. package/models/components/custommessagecreate.js.map +1 -1
  33. package/models/components/function.d.ts +6 -1
  34. package/models/components/function.d.ts.map +1 -1
  35. package/models/components/function.js.map +1 -1
  36. package/models/components/httpendpoint.d.ts +71 -2
  37. package/models/components/httpendpoint.d.ts.map +1 -1
  38. package/models/components/httpendpoint.js +52 -5
  39. package/models/components/httpendpoint.js.map +1 -1
  40. package/models/components/index.d.ts +1 -3
  41. package/models/components/index.d.ts.map +1 -1
  42. package/models/components/index.js +1 -3
  43. package/models/components/index.js.map +1 -1
  44. package/models/components/listresponsetool.d.ts +34 -0
  45. package/models/components/listresponsetool.d.ts.map +1 -0
  46. package/models/components/{listresponseschemasbubblegumv2toolstool.js → listresponsetool.js} +11 -11
  47. package/models/components/listresponsetool.js.map +1 -0
  48. package/models/components/llmconfig.d.ts +40 -6
  49. package/models/components/llmconfig.d.ts.map +1 -1
  50. package/models/components/llmconfig.js +28 -6
  51. package/models/components/llmconfig.js.map +1 -1
  52. package/models/components/prompt.d.ts +8 -5
  53. package/models/components/prompt.d.ts.map +1 -1
  54. package/models/components/prompt.js +2 -2
  55. package/models/components/prompt.js.map +1 -1
  56. package/models/components/promptcreate.d.ts +5 -5
  57. package/models/components/promptcreate.d.ts.map +1 -1
  58. package/models/components/promptcreate.js +2 -2
  59. package/models/components/promptcreate.js.map +1 -1
  60. package/models/components/schemasbubblegumv2toolstool.d.ts +5 -5
  61. package/models/components/schemasbubblegumv2toolstool.d.ts.map +1 -1
  62. package/models/components/schemasbubblegumv2toolstool.js +2 -2
  63. package/models/components/schemasbubblegumv2toolstool.js.map +1 -1
  64. package/models/components/schemascortexv1toolstool.d.ts +31 -2
  65. package/models/components/schemascortexv1toolstool.d.ts.map +1 -1
  66. package/models/components/schemascortexv1toolstool.js +24 -3
  67. package/models/components/schemascortexv1toolstool.js.map +1 -1
  68. package/models/components/tooldefinition.d.ts +176 -5
  69. package/models/components/tooldefinition.d.ts.map +1 -1
  70. package/models/components/tooldefinition.js +70 -6
  71. package/models/components/tooldefinition.js.map +1 -1
  72. package/models/components/toolparametertransform.d.ts +43 -2
  73. package/models/components/toolparametertransform.d.ts.map +1 -1
  74. package/models/components/toolparametertransform.js +27 -3
  75. package/models/components/toolparametertransform.js.map +1 -1
  76. package/models/components/toolparametertransformcondition.d.ts +28 -2
  77. package/models/components/toolparametertransformcondition.d.ts.map +1 -1
  78. package/models/components/toolparametertransformcondition.js +22 -3
  79. package/models/components/toolparametertransformcondition.js.map +1 -1
  80. package/package.json +1 -4
  81. package/sdk/agents.d.ts +0 -3
  82. package/sdk/agents.d.ts.map +1 -1
  83. package/sdk/agents.js +0 -3
  84. package/sdk/agents.js.map +1 -1
  85. package/sdk/channels.d.ts +0 -3
  86. package/sdk/channels.d.ts.map +1 -1
  87. package/sdk/channels.js +0 -3
  88. package/sdk/channels.js.map +1 -1
  89. package/sdk/prompts.d.ts +0 -3
  90. package/sdk/prompts.d.ts.map +1 -1
  91. package/sdk/prompts.js +0 -3
  92. package/sdk/prompts.js.map +1 -1
  93. package/sdk/tools.d.ts +1 -1
  94. package/sdk/tools.d.ts.map +1 -1
  95. package/src/funcs/agentsDelete.ts +0 -3
  96. package/src/funcs/channelsDelete.ts +0 -3
  97. package/src/funcs/promptsDelete.ts +0 -3
  98. package/src/funcs/toolsList.ts +3 -6
  99. package/src/lib/config.ts +2 -2
  100. package/src/models/components/availabletarget.ts +6 -0
  101. package/src/models/components/custommessagecreate.ts +4 -0
  102. package/src/models/components/function.ts +6 -1
  103. package/src/models/components/httpendpoint.ts +73 -6
  104. package/src/models/components/index.ts +1 -3
  105. package/src/models/components/{listresponseschemasbubblegumv2toolstool.ts → listresponsetool.ts} +14 -16
  106. package/src/models/components/llmconfig.ts +44 -14
  107. package/src/models/components/prompt.ts +10 -7
  108. package/src/models/components/promptcreate.ts +7 -7
  109. package/src/models/components/schemasbubblegumv2toolstool.ts +7 -7
  110. package/src/models/components/schemascortexv1toolstool.ts +39 -4
  111. package/src/models/components/tooldefinition.ts +218 -14
  112. package/src/models/components/toolparametertransform.ts +43 -4
  113. package/src/models/components/toolparametertransformcondition.ts +32 -4
  114. package/src/sdk/agents.ts +0 -3
  115. package/src/sdk/channels.ts +0 -3
  116. package/src/sdk/prompts.ts +0 -3
  117. package/src/sdk/tools.ts +1 -1
  118. package/models/components/defaults.d.ts +0 -58
  119. package/models/components/defaults.d.ts.map +0 -1
  120. package/models/components/defaults.js +0 -87
  121. package/models/components/defaults.js.map +0 -1
  122. package/models/components/listresponseschemasbubblegumv2toolstool.d.ts +0 -34
  123. package/models/components/listresponseschemasbubblegumv2toolstool.d.ts.map +0 -1
  124. package/models/components/listresponseschemasbubblegumv2toolstool.js.map +0 -1
  125. package/models/components/provider.d.ts +0 -34
  126. package/models/components/provider.d.ts.map +0 -1
  127. package/models/components/provider.js +0 -54
  128. package/models/components/provider.js.map +0 -1
  129. package/src/models/components/defaults.ts +0 -127
  130. package/src/models/components/provider.ts +0 -37
@@ -1,5 +1,16 @@
1
1
  import * as z from "zod";
2
+ import { ClosedEnum } from "../../types/enums.js";
2
3
  import { FunctionT, FunctionT$Outbound } from "./function.js";
4
+ /**
5
+ * Always `function`.
6
+ */
7
+ export declare const SchemasCortexV1ToolsToolType: {
8
+ readonly Function: "function";
9
+ };
10
+ /**
11
+ * Always `function`.
12
+ */
13
+ export type SchemasCortexV1ToolsToolType = ClosedEnum<typeof SchemasCortexV1ToolsToolType>;
3
14
  /**
4
15
  * A tool definition to be used by the OpenAI API.
5
16
  */
@@ -7,17 +18,35 @@ export type SchemasCortexV1ToolsTool = {
7
18
  /**
8
19
  * Always `function`.
9
20
  */
10
- type?: string | null | undefined;
21
+ type?: "function" | undefined;
11
22
  /**
12
23
  * The tool definition including the JSON Schema of its parameters.
13
24
  */
14
25
  function: FunctionT;
15
26
  };
16
27
  /** @internal */
28
+ export declare const SchemasCortexV1ToolsToolType$inboundSchema: z.ZodNativeEnum<typeof SchemasCortexV1ToolsToolType>;
29
+ /** @internal */
30
+ export declare const SchemasCortexV1ToolsToolType$outboundSchema: z.ZodNativeEnum<typeof SchemasCortexV1ToolsToolType>;
31
+ /**
32
+ * @internal
33
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
34
+ */
35
+ export declare namespace SchemasCortexV1ToolsToolType$ {
36
+ /** @deprecated use `SchemasCortexV1ToolsToolType$inboundSchema` instead. */
37
+ const inboundSchema: z.ZodNativeEnum<{
38
+ readonly Function: "function";
39
+ }>;
40
+ /** @deprecated use `SchemasCortexV1ToolsToolType$outboundSchema` instead. */
41
+ const outboundSchema: z.ZodNativeEnum<{
42
+ readonly Function: "function";
43
+ }>;
44
+ }
45
+ /** @internal */
17
46
  export declare const SchemasCortexV1ToolsTool$inboundSchema: z.ZodType<SchemasCortexV1ToolsTool, z.ZodTypeDef, unknown>;
18
47
  /** @internal */
19
48
  export type SchemasCortexV1ToolsTool$Outbound = {
20
- type?: string | null | undefined;
49
+ type: "function";
21
50
  function: FunctionT$Outbound;
22
51
  };
23
52
  /** @internal */
@@ -1 +1 @@
1
- {"version":3,"file":"schemascortexv1toolstool.d.ts","sourceRoot":"","sources":["../../src/models/components/schemascortexv1toolstool.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EACL,SAAS,EAET,kBAAkB,EAEnB,MAAM,eAAe,CAAC;AAEvB;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG;IACrC;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACjC;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,sCAAsC,EAAE,CAAC,CAAC,OAAO,CAC5D,wBAAwB,EACxB,CAAC,CAAC,UAAU,EACZ,OAAO,CAIP,CAAC;AAEH,gBAAgB;AAChB,MAAM,MAAM,iCAAiC,GAAG;IAC9C,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACjC,QAAQ,EAAE,kBAAkB,CAAC;CAC9B,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,uCAAuC,EAAE,CAAC,CAAC,OAAO,CAC7D,iCAAiC,EACjC,CAAC,CAAC,UAAU,EACZ,wBAAwB,CAIxB,CAAC;AAEH;;;GAGG;AACH,yBAAiB,yBAAyB,CAAC;IACzC,wEAAwE;IACjE,MAAM,aAAa,4DAAyC,CAAC;IACpE,yEAAyE;IAClE,MAAM,cAAc,sFAA0C,CAAC;IACtE,mEAAmE;IACnE,KAAY,QAAQ,GAAG,iCAAiC,CAAC;CAC1D"}
1
+ {"version":3,"file":"schemascortexv1toolstool.d.ts","sourceRoot":"","sources":["../../src/models/components/schemascortexv1toolstool.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EACL,SAAS,EAET,kBAAkB,EAEnB,MAAM,eAAe,CAAC;AAEvB;;GAEG;AACH,eAAO,MAAM,4BAA4B;;CAE/B,CAAC;AACX;;GAEG;AACH,MAAM,MAAM,4BAA4B,GAAG,UAAU,CACnD,OAAO,4BAA4B,CACpC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG;IACrC;;OAEG;IACH,IAAI,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IAC9B;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,0CAA0C,EAAE,CAAC,CAAC,aAAa,CACtE,OAAO,4BAA4B,CACS,CAAC;AAE/C,gBAAgB;AAChB,eAAO,MAAM,2CAA2C,EAAE,CAAC,CAAC,aAAa,CACvE,OAAO,4BAA4B,CACS,CAAC;AAE/C;;;GAGG;AACH,yBAAiB,6BAA6B,CAAC;IAC7C,4EAA4E;IACrE,MAAM,aAAa;;MAA6C,CAAC;IACxE,6EAA6E;IACtE,MAAM,cAAc;;MAA8C,CAAC;CAC3E;AAED,gBAAgB;AAChB,eAAO,MAAM,sCAAsC,EAAE,CAAC,CAAC,OAAO,CAC5D,wBAAwB,EACxB,CAAC,CAAC,UAAU,EACZ,OAAO,CAIP,CAAC;AAEH,gBAAgB;AAChB,MAAM,MAAM,iCAAiC,GAAG;IAC9C,IAAI,EAAE,UAAU,CAAC;IACjB,QAAQ,EAAE,kBAAkB,CAAC;CAC9B,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,uCAAuC,EAAE,CAAC,CAAC,OAAO,CAC7D,iCAAiC,EACjC,CAAC,CAAC,UAAU,EACZ,wBAAwB,CAIxB,CAAC;AAEH;;;GAGG;AACH,yBAAiB,yBAAyB,CAAC;IACzC,wEAAwE;IACjE,MAAM,aAAa,4DAAyC,CAAC;IACpE,yEAAyE;IAClE,MAAM,cAAc,sFAA0C,CAAC;IACtE,mEAAmE;IACnE,KAAY,QAAQ,GAAG,iCAAiC,CAAC;CAC1D"}
@@ -26,17 +26,38 @@ var __importStar = (this && this.__importStar) || function (mod) {
26
26
  return result;
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.SchemasCortexV1ToolsTool$ = exports.SchemasCortexV1ToolsTool$outboundSchema = exports.SchemasCortexV1ToolsTool$inboundSchema = void 0;
29
+ exports.SchemasCortexV1ToolsTool$ = exports.SchemasCortexV1ToolsTool$outboundSchema = exports.SchemasCortexV1ToolsTool$inboundSchema = exports.SchemasCortexV1ToolsToolType$ = exports.SchemasCortexV1ToolsToolType$outboundSchema = exports.SchemasCortexV1ToolsToolType$inboundSchema = exports.SchemasCortexV1ToolsToolType = void 0;
30
30
  const z = __importStar(require("zod"));
31
31
  const function_js_1 = require("./function.js");
32
+ /**
33
+ * Always `function`.
34
+ */
35
+ exports.SchemasCortexV1ToolsToolType = {
36
+ Function: "function",
37
+ };
38
+ /** @internal */
39
+ exports.SchemasCortexV1ToolsToolType$inboundSchema = z.nativeEnum(exports.SchemasCortexV1ToolsToolType);
40
+ /** @internal */
41
+ exports.SchemasCortexV1ToolsToolType$outboundSchema = exports.SchemasCortexV1ToolsToolType$inboundSchema;
42
+ /**
43
+ * @internal
44
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
45
+ */
46
+ var SchemasCortexV1ToolsToolType$;
47
+ (function (SchemasCortexV1ToolsToolType$) {
48
+ /** @deprecated use `SchemasCortexV1ToolsToolType$inboundSchema` instead. */
49
+ SchemasCortexV1ToolsToolType$.inboundSchema = exports.SchemasCortexV1ToolsToolType$inboundSchema;
50
+ /** @deprecated use `SchemasCortexV1ToolsToolType$outboundSchema` instead. */
51
+ SchemasCortexV1ToolsToolType$.outboundSchema = exports.SchemasCortexV1ToolsToolType$outboundSchema;
52
+ })(SchemasCortexV1ToolsToolType$ || (exports.SchemasCortexV1ToolsToolType$ = SchemasCortexV1ToolsToolType$ = {}));
32
53
  /** @internal */
33
54
  exports.SchemasCortexV1ToolsTool$inboundSchema = z.object({
34
- type: z.nullable(z.string()).optional(),
55
+ type: z.literal("function").default("function"),
35
56
  function: function_js_1.FunctionT$inboundSchema,
36
57
  });
37
58
  /** @internal */
38
59
  exports.SchemasCortexV1ToolsTool$outboundSchema = z.object({
39
- type: z.nullable(z.string()).optional(),
60
+ type: z.literal("function").default("function"),
40
61
  function: function_js_1.FunctionT$outboundSchema,
41
62
  });
42
63
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"schemascortexv1toolstool.js","sourceRoot":"","sources":["../../src/models/components/schemascortexv1toolstool.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,uCAAyB;AACzB,+CAKuB;AAgBvB,gBAAgB;AACH,QAAA,sCAAsC,GAI/C,CAAC,CAAC,MAAM,CAAC;IACX,IAAI,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IACvC,QAAQ,EAAE,qCAAuB;CAClC,CAAC,CAAC;AAQH,gBAAgB;AACH,QAAA,uCAAuC,GAIhD,CAAC,CAAC,MAAM,CAAC;IACX,IAAI,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IACvC,QAAQ,EAAE,sCAAwB;CACnC,CAAC,CAAC;AAEH;;;GAGG;AACH,IAAiB,yBAAyB,CAOzC;AAPD,WAAiB,yBAAyB;IACxC,wEAAwE;IAC3D,uCAAa,GAAG,8CAAsC,CAAC;IACpE,yEAAyE;IAC5D,wCAAc,GAAG,+CAAuC,CAAC;AAGxE,CAAC,EAPgB,yBAAyB,yCAAzB,yBAAyB,QAOzC"}
1
+ {"version":3,"file":"schemascortexv1toolstool.js","sourceRoot":"","sources":["../../src/models/components/schemascortexv1toolstool.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,uCAAyB;AAEzB,+CAKuB;AAEvB;;GAEG;AACU,QAAA,4BAA4B,GAAG;IAC1C,QAAQ,EAAE,UAAU;CACZ,CAAC;AAsBX,gBAAgB;AACH,QAAA,0CAA0C,GAEnD,CAAC,CAAC,UAAU,CAAC,oCAA4B,CAAC,CAAC;AAE/C,gBAAgB;AACH,QAAA,2CAA2C,GAEpD,kDAA0C,CAAC;AAE/C;;;GAGG;AACH,IAAiB,6BAA6B,CAK7C;AALD,WAAiB,6BAA6B;IAC5C,4EAA4E;IAC/D,2CAAa,GAAG,kDAA0C,CAAC;IACxE,6EAA6E;IAChE,4CAAc,GAAG,mDAA2C,CAAC;AAC5E,CAAC,EALgB,6BAA6B,6CAA7B,6BAA6B,QAK7C;AAED,gBAAgB;AACH,QAAA,sCAAsC,GAI/C,CAAC,CAAC,MAAM,CAAC;IACX,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC;IAC/C,QAAQ,EAAE,qCAAuB;CAClC,CAAC,CAAC;AAQH,gBAAgB;AACH,QAAA,uCAAuC,GAIhD,CAAC,CAAC,MAAM,CAAC;IACX,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC;IAC/C,QAAQ,EAAE,sCAAwB;CACnC,CAAC,CAAC;AAEH;;;GAGG;AACH,IAAiB,yBAAyB,CAOzC;AAPD,WAAiB,yBAAyB;IACxC,wEAAwE;IAC3D,uCAAa,GAAG,8CAAsC,CAAC;IACpE,yEAAyE;IAC5D,wCAAc,GAAG,+CAAuC,CAAC;AAGxE,CAAC,EAPgB,yBAAyB,yCAAzB,yBAAyB,QAOzC"}
@@ -1,22 +1,191 @@
1
1
  import * as z from "zod";
2
- import { Defaults, Defaults$Outbound } from "./defaults.js";
2
+ import { ClosedEnum } from "../../types/enums.js";
3
3
  import { HttpEndpoint, HttpEndpoint$Outbound } from "./httpendpoint.js";
4
4
  import { SchemasCortexV1ToolsTool, SchemasCortexV1ToolsTool$Outbound } from "./schemascortexv1toolstool.js";
5
+ import { ToolParameterDefault, ToolParameterDefault$Outbound } from "./toolparameterdefault.js";
6
+ export declare const Type: {
7
+ readonly Action: "action";
8
+ readonly Endpoint: "endpoint";
9
+ readonly Context: "context";
10
+ };
11
+ export type Type = ClosedEnum<typeof Type>;
12
+ export type One = {};
13
+ /**
14
+ * The default values for the parameters of the function/tool call.
15
+ */
16
+ export type Defaults = One | {
17
+ [k: string]: ToolParameterDefault;
18
+ };
5
19
  export type Result = {};
6
20
  /**
7
- * A tool that can be called from GPT during the conversation. The tool can result in one of the following actions depending on the `type` field: - `action`: An `ActionRequest` to return to Bubblegum in `GetResponseResponse`. - `endpoint`: An HTTP API call to an external tool. Requires the `endpoint` field to be set too. - `context`: Sets context variables based on the tool arguments, e.g. to change the session language. Only `language` and `say` context vars are currently supported, but this will be made more generic. For example, to change the current session language: ``` { "type": "context", "tool": { "function": { "name": "set_language", "parameters": { "language": { "type": "string", "description": "The ISO 639 language code to set for the session e.g. 'en-US'." }, "message": { "type": "string", "description": "Inform the caller we're now speaking in the new language." } } } } } ``` If `defaults` is provided, it will be used as the default values for the parameters of the tool call, if GPT doesn't provide them: ``` "defaults": { "hospital": "Queens Hospital" } ``` Some special "transform" handling is supported if the value is a dict with a single `transform` key. The parameter value will be transformed by the given `action` before being used as the default value: Removing an unwanted parameter: ``` "defaults": { "hospital": { "transform": { "action": "remove" } } } ``` Add custom parameters from other parameters using Python's `format`: ``` "defaults": { "hello": { "transform": { "format": "Hello, {name}!" } } } Modify a value conditionally, e.g. change a `city` parameter with value "Bronx" to "The Bronx": ``` { "defaults": { "city": { "transform": { "when": {"operator": "eq", "key": "city", "value": "Bronx"}, "action": "override", "format": "The {city}" } } } } ```
21
+ * A tool that can be called from GPT during the conversation.
22
+ *
23
+ * @remarks
24
+ *
25
+ * The tool can result in one of the following actions depending on the `type` field:
26
+ * - `action`:
27
+ * An `ActionRequest` to return to Bubblegum in `GetResponseResponse`.
28
+ * - `endpoint`:
29
+ * An HTTP API call to an external tool. Requires the `endpoint` field to be set too.
30
+ * - `context`:
31
+ * Sets context variables based on the tool arguments, e.g. to change the session language. Only
32
+ * `language` and `say` context vars are currently supported, but this will be made more generic.
33
+ *
34
+ * For example, to change the current session language:
35
+ * ```
36
+ * {
37
+ * "type": "context",
38
+ * "tool": {
39
+ * "function": {
40
+ * "name": "set_language",
41
+ * "parameters": {
42
+ * "language": {
43
+ * "type": "string",
44
+ * "description": "The ISO 639 language code to set for the session e.g. 'en-US'."
45
+ * },
46
+ * "message": {
47
+ * "type": "string",
48
+ * "description": "Inform the caller we're now speaking in the new language."
49
+ * }
50
+ * }
51
+ * }
52
+ * }
53
+ * }
54
+ * ```
55
+ *
56
+ * If `defaults` is provided, it will be used as the default values for the parameters of the
57
+ * tool call, if GPT doesn't provide them:
58
+ * ```
59
+ * "defaults": {
60
+ * "hospital": "Queens Hospital"
61
+ * }
62
+ * ```
63
+ *
64
+ * Some special "transform" handling is supported if the value is a dict with a single `transform`
65
+ * key. The parameter value will be transformed by the given `action` before being used as the
66
+ * default value:
67
+ *
68
+ * Removing an unwanted parameter:
69
+ * ```
70
+ * "defaults": {
71
+ * "hospital": {
72
+ * "transform": {
73
+ * "action": "remove"
74
+ * }
75
+ * }
76
+ * }
77
+ * ```
78
+ *
79
+ * Add custom parameters from other parameters using Python's `format`:
80
+ * ```
81
+ * "defaults": {
82
+ * "hello": {
83
+ * "transform": {
84
+ * "format": "Hello, {name}!"
85
+ * }
86
+ * }
87
+ * }
88
+ *
89
+ * Modify a value conditionally, e.g. change a `city` parameter with value "Bronx" to "The Bronx":
90
+ * ```
91
+ * {
92
+ * "defaults": {
93
+ * "city": {
94
+ * "transform": {
95
+ * "when": {"operator": "eq", "key": "city", "value": "Bronx"},
96
+ * "action": "override",
97
+ * "format": "The {city}"
98
+ * }
99
+ * }
100
+ * }
101
+ * }
102
+ * ```
8
103
  */
9
104
  export type ToolDefinition = {
10
- type?: string | null | undefined;
105
+ /**
106
+ * The action to take when GPT calls the tool.
107
+ */
108
+ type?: Type | null | undefined;
11
109
  /**
12
110
  * The tool definition to be used by the OpenAI API.
13
111
  */
14
112
  tool: SchemasCortexV1ToolsTool;
113
+ /**
114
+ * The configuration for an HTTP API call.
115
+ */
15
116
  endpoint?: HttpEndpoint | null | undefined;
16
- defaults?: Defaults | null | undefined;
117
+ /**
118
+ * The default values for the parameters of the function/tool call.
119
+ */
120
+ defaults?: One | {
121
+ [k: string]: ToolParameterDefault;
122
+ } | null | undefined;
123
+ /**
124
+ * The optional result of the tool call. Only used for `context` tools.
125
+ */
17
126
  result?: Result | null | undefined;
18
127
  };
19
128
  /** @internal */
129
+ export declare const Type$inboundSchema: z.ZodNativeEnum<typeof Type>;
130
+ /** @internal */
131
+ export declare const Type$outboundSchema: z.ZodNativeEnum<typeof Type>;
132
+ /**
133
+ * @internal
134
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
135
+ */
136
+ export declare namespace Type$ {
137
+ /** @deprecated use `Type$inboundSchema` instead. */
138
+ const inboundSchema: z.ZodNativeEnum<{
139
+ readonly Action: "action";
140
+ readonly Endpoint: "endpoint";
141
+ readonly Context: "context";
142
+ }>;
143
+ /** @deprecated use `Type$outboundSchema` instead. */
144
+ const outboundSchema: z.ZodNativeEnum<{
145
+ readonly Action: "action";
146
+ readonly Endpoint: "endpoint";
147
+ readonly Context: "context";
148
+ }>;
149
+ }
150
+ /** @internal */
151
+ export declare const One$inboundSchema: z.ZodType<One, z.ZodTypeDef, unknown>;
152
+ /** @internal */
153
+ export type One$Outbound = {};
154
+ /** @internal */
155
+ export declare const One$outboundSchema: z.ZodType<One$Outbound, z.ZodTypeDef, One>;
156
+ /**
157
+ * @internal
158
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
159
+ */
160
+ export declare namespace One$ {
161
+ /** @deprecated use `One$inboundSchema` instead. */
162
+ const inboundSchema: z.ZodType<One, z.ZodTypeDef, unknown>;
163
+ /** @deprecated use `One$outboundSchema` instead. */
164
+ const outboundSchema: z.ZodType<One$Outbound, z.ZodTypeDef, One>;
165
+ /** @deprecated use `One$Outbound` instead. */
166
+ type Outbound = One$Outbound;
167
+ }
168
+ /** @internal */
169
+ export declare const Defaults$inboundSchema: z.ZodType<Defaults, z.ZodTypeDef, unknown>;
170
+ /** @internal */
171
+ export type Defaults$Outbound = One$Outbound | {
172
+ [k: string]: ToolParameterDefault$Outbound;
173
+ };
174
+ /** @internal */
175
+ export declare const Defaults$outboundSchema: z.ZodType<Defaults$Outbound, z.ZodTypeDef, Defaults>;
176
+ /**
177
+ * @internal
178
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
179
+ */
180
+ export declare namespace Defaults$ {
181
+ /** @deprecated use `Defaults$inboundSchema` instead. */
182
+ const inboundSchema: z.ZodType<Defaults, z.ZodTypeDef, unknown>;
183
+ /** @deprecated use `Defaults$outboundSchema` instead. */
184
+ const outboundSchema: z.ZodType<Defaults$Outbound, z.ZodTypeDef, Defaults>;
185
+ /** @deprecated use `Defaults$Outbound` instead. */
186
+ type Outbound = Defaults$Outbound;
187
+ }
188
+ /** @internal */
20
189
  export declare const Result$inboundSchema: z.ZodType<Result, z.ZodTypeDef, unknown>;
21
190
  /** @internal */
22
191
  export type Result$Outbound = {};
@@ -41,7 +210,9 @@ export type ToolDefinition$Outbound = {
41
210
  type?: string | null | undefined;
42
211
  tool: SchemasCortexV1ToolsTool$Outbound;
43
212
  endpoint?: HttpEndpoint$Outbound | null | undefined;
44
- defaults?: Defaults$Outbound | null | undefined;
213
+ defaults?: One$Outbound | {
214
+ [k: string]: ToolParameterDefault$Outbound;
215
+ } | null | undefined;
45
216
  result?: Result$Outbound | null | undefined;
46
217
  };
47
218
  /** @internal */
@@ -1 +1 @@
1
- {"version":3,"file":"tooldefinition.d.ts","sourceRoot":"","sources":["../../src/models/components/tooldefinition.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EACL,QAAQ,EAER,iBAAiB,EAElB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,YAAY,EAEZ,qBAAqB,EAEtB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,wBAAwB,EAExB,iCAAiC,EAElC,MAAM,+BAA+B,CAAC;AAEvC,MAAM,MAAM,MAAM,GAAG,EAAE,CAAC;AAExB;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACjC;;OAEG;IACH,IAAI,EAAE,wBAAwB,CAAC;IAC/B,QAAQ,CAAC,EAAE,YAAY,GAAG,IAAI,GAAG,SAAS,CAAC;IAC3C,QAAQ,CAAC,EAAE,QAAQ,GAAG,IAAI,GAAG,SAAS,CAAC;IACvC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CACpC,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,oBAAoB,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,UAAU,EAAE,OAAO,CAC7D,CAAC;AAEd,gBAAgB;AAChB,MAAM,MAAM,eAAe,GAAG,EAAE,CAAC;AAEjC,gBAAgB;AAChB,eAAO,MAAM,qBAAqB,EAAE,CAAC,CAAC,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M,aAAa,kDAA+B,CAAC;IAC1D,+DAA+D;IACxD,MAAM,cAAc,kEAAgC,CAAC;IAC5D,yDAAyD;IACzD,KAAY,QAAQ,GAAG,uBAAuB,CAAC;CAChD"}
@@ -26,11 +26,69 @@ var __importStar = (this && this.__importStar) || function (mod) {
26
26
  return result;
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.ToolDefinition$ = exports.ToolDefinition$outboundSchema = exports.ToolDefinition$inboundSchema = exports.Result$ = exports.Result$outboundSchema = exports.Result$inboundSchema = void 0;
29
+ exports.ToolDefinition$ = exports.ToolDefinition$outboundSchema = exports.ToolDefinition$inboundSchema = exports.Result$ = exports.Result$outboundSchema = exports.Result$inboundSchema = exports.Defaults$ = exports.Defaults$outboundSchema = exports.Defaults$inboundSchema = exports.One$ = exports.One$outboundSchema = exports.One$inboundSchema = exports.Type$ = exports.Type$outboundSchema = exports.Type$inboundSchema = exports.Type = void 0;
30
30
  const z = __importStar(require("zod"));
31
- const defaults_js_1 = require("./defaults.js");
32
31
  const httpendpoint_js_1 = require("./httpendpoint.js");
33
32
  const schemascortexv1toolstool_js_1 = require("./schemascortexv1toolstool.js");
33
+ const toolparameterdefault_js_1 = require("./toolparameterdefault.js");
34
+ exports.Type = {
35
+ Action: "action",
36
+ Endpoint: "endpoint",
37
+ Context: "context",
38
+ };
39
+ /** @internal */
40
+ exports.Type$inboundSchema = z.nativeEnum(exports.Type);
41
+ /** @internal */
42
+ exports.Type$outboundSchema = exports.Type$inboundSchema;
43
+ /**
44
+ * @internal
45
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
46
+ */
47
+ var Type$;
48
+ (function (Type$) {
49
+ /** @deprecated use `Type$inboundSchema` instead. */
50
+ Type$.inboundSchema = exports.Type$inboundSchema;
51
+ /** @deprecated use `Type$outboundSchema` instead. */
52
+ Type$.outboundSchema = exports.Type$outboundSchema;
53
+ })(Type$ || (exports.Type$ = Type$ = {}));
54
+ /** @internal */
55
+ exports.One$inboundSchema = z
56
+ .object({});
57
+ /** @internal */
58
+ exports.One$outboundSchema = z
59
+ .object({});
60
+ /**
61
+ * @internal
62
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
63
+ */
64
+ var One$;
65
+ (function (One$) {
66
+ /** @deprecated use `One$inboundSchema` instead. */
67
+ One$.inboundSchema = exports.One$inboundSchema;
68
+ /** @deprecated use `One$outboundSchema` instead. */
69
+ One$.outboundSchema = exports.One$outboundSchema;
70
+ })(One$ || (exports.One$ = One$ = {}));
71
+ /** @internal */
72
+ exports.Defaults$inboundSchema = z.union([
73
+ z.lazy(() => exports.One$inboundSchema),
74
+ z.record(toolparameterdefault_js_1.ToolParameterDefault$inboundSchema),
75
+ ]);
76
+ /** @internal */
77
+ exports.Defaults$outboundSchema = z.union([
78
+ z.lazy(() => exports.One$outboundSchema),
79
+ z.record(toolparameterdefault_js_1.ToolParameterDefault$outboundSchema),
80
+ ]);
81
+ /**
82
+ * @internal
83
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
84
+ */
85
+ var Defaults$;
86
+ (function (Defaults$) {
87
+ /** @deprecated use `Defaults$inboundSchema` instead. */
88
+ Defaults$.inboundSchema = exports.Defaults$inboundSchema;
89
+ /** @deprecated use `Defaults$outboundSchema` instead. */
90
+ Defaults$.outboundSchema = exports.Defaults$outboundSchema;
91
+ })(Defaults$ || (exports.Defaults$ = Defaults$ = {}));
34
92
  /** @internal */
35
93
  exports.Result$inboundSchema = z
36
94
  .object({});
@@ -49,18 +107,24 @@ var Result$;
49
107
  })(Result$ || (exports.Result$ = Result$ = {}));
50
108
  /** @internal */
51
109
  exports.ToolDefinition$inboundSchema = z.object({
52
- type: z.nullable(z.string()).optional(),
110
+ type: z.nullable(exports.Type$inboundSchema).optional(),
53
111
  tool: schemascortexv1toolstool_js_1.SchemasCortexV1ToolsTool$inboundSchema,
54
112
  endpoint: z.nullable(httpendpoint_js_1.HttpEndpoint$inboundSchema).optional(),
55
- defaults: z.nullable(defaults_js_1.Defaults$inboundSchema).optional(),
113
+ defaults: z.nullable(z.union([
114
+ z.lazy(() => exports.One$inboundSchema),
115
+ z.record(toolparameterdefault_js_1.ToolParameterDefault$inboundSchema),
116
+ ])).optional(),
56
117
  result: z.nullable(z.lazy(() => exports.Result$inboundSchema)).optional(),
57
118
  });
58
119
  /** @internal */
59
120
  exports.ToolDefinition$outboundSchema = z.object({
60
- type: z.nullable(z.string()).optional(),
121
+ type: z.nullable(exports.Type$outboundSchema).optional(),
61
122
  tool: schemascortexv1toolstool_js_1.SchemasCortexV1ToolsTool$outboundSchema,
62
123
  endpoint: z.nullable(httpendpoint_js_1.HttpEndpoint$outboundSchema).optional(),
63
- defaults: z.nullable(defaults_js_1.Defaults$outboundSchema).optional(),
124
+ defaults: z.nullable(z.union([
125
+ z.lazy(() => exports.One$outboundSchema),
126
+ z.record(toolparameterdefault_js_1.ToolParameterDefault$outboundSchema),
127
+ ])).optional(),
64
128
  result: z.nullable(z.lazy(() => exports.Result$outboundSchema)).optional(),
65
129
  });
66
130
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"tooldefinition.js","sourceRoot":"","sources":["../../src/models/components/tooldefinition.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,uCAAyB;AACzB,+CAKuB;AACvB,uDAK2B;AAC3B,+EAKuC;AAkBvC,gBAAgB;AACH,QAAA,oBAAoB,GAA6C,CAAC;KAC5E,MAAM,CAAC,EAAE,CAAC,CAAC;AAKd,gBAAgB;AACH,QAAA,qBAAqB,GAI9B,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAEjB;;;GAGG;AACH,IAAiB,OAAO,CAOvB;AAPD,WAAiB,OAAO;IACtB,sDAAsD;IACzC,qBAAa,GAAG,4BAAoB,CAAC;IAClD,uDAAuD;IAC1C,sBAAc,GAAG,6BAAqB,CAAC;AAGtD,CAAC,EAPgB,OAAO,uBAAP,OAA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CAAC,CAAC,CAAC,QAAQ,EAAE;CAClE,CAAC,CAAC;AAeH,gBAAgB;AACH,QAAA,6BAA6B,GAItC,CAAC,CAAC,MAAM,CAAC;IACX,IAAI,EAAE,CAAC,CAAC,QAAQ,CAAC,2BAAmB,CAAC,CAAC,QAAQ,EAAE;IAChD,IAAI,EAAE,qEAAuC;IAC7C,QAAQ,EAAE,CAAC,CAAC,QAAQ,CAAC,6CAA2B,CAAC,CAAC,QAAQ,EAAE;IAC5D,QAAQ,EAAE,CAAC,CAAC,QAAQ,CAClB,CAAC,CAAC,KAAK,CAAC;QACN,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,0BAAkB,CAAC;QAChC,CAAC,CAAC,MAAM,CAAC,6DAAmC,CAAC;KAC9C,CAAC,CACH,CAAC,QAAQ,EAAE;IACZ,MAAM,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,6BAAqB,CAAC,CAAC,CAAC,QAAQ,EAAE;CACnE,CAAC,CAAC;AAEH;;;GAGG;AACH,IAAiB,eAAe,CAO/B;AAPD,WAAiB,eAAe;IAC9B,8DAA8D;IACjD,6BAAa,GAAG,oCAA4B,CAAC;IAC1D,+DAA+D;IAClD,8BAAc,GAAG,qCAA6B,CAAC;AAG9D,CAAC,EAPgB,eAAe,+BAAf,eAAe,QAO/B"}
@@ -1,22 +1,63 @@
1
1
  import * as z from "zod";
2
+ import { ClosedEnum } from "../../types/enums.js";
2
3
  import { ToolParameterTransformCondition, ToolParameterTransformCondition$Outbound } from "./toolparametertransformcondition.js";
4
+ /**
5
+ * The action to perform on the 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.
6
+ */
7
+ export declare const Action: {
8
+ readonly Default: "default";
9
+ readonly Override: "override";
10
+ readonly Remove: "remove";
11
+ };
12
+ /**
13
+ * The action to perform on the 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.
14
+ */
15
+ export type Action = ClosedEnum<typeof Action>;
3
16
  /**
4
17
  * A transform to be applied to the value of a parameter.
5
18
  */
6
19
  export type ToolParameterTransform = {
20
+ /**
21
+ * Only apply the transform if the condition is met.
22
+ */
7
23
  when?: ToolParameterTransformCondition | null | undefined;
8
24
  /**
9
25
  * The action to perform on the 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.
10
26
  */
11
- action?: string | null | undefined;
27
+ action?: Action | undefined;
28
+ /**
29
+ * The string value to use for the parameter. The value will be evaluated with the Python `str.format` method, for example, `Hello, {name}!`
30
+ */
12
31
  format?: string | null | undefined;
13
32
  };
14
33
  /** @internal */
34
+ export declare const Action$inboundSchema: z.ZodNativeEnum<typeof Action>;
35
+ /** @internal */
36
+ export declare const Action$outboundSchema: z.ZodNativeEnum<typeof Action>;
37
+ /**
38
+ * @internal
39
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
40
+ */
41
+ export declare namespace Action$ {
42
+ /** @deprecated use `Action$inboundSchema` instead. */
43
+ const inboundSchema: z.ZodNativeEnum<{
44
+ readonly Default: "default";
45
+ readonly Override: "override";
46
+ readonly Remove: "remove";
47
+ }>;
48
+ /** @deprecated use `Action$outboundSchema` instead. */
49
+ const outboundSchema: z.ZodNativeEnum<{
50
+ readonly Default: "default";
51
+ readonly Override: "override";
52
+ readonly Remove: "remove";
53
+ }>;
54
+ }
55
+ /** @internal */
15
56
  export declare const ToolParameterTransform$inboundSchema: z.ZodType<ToolParameterTransform, z.ZodTypeDef, unknown>;
16
57
  /** @internal */
17
58
  export type ToolParameterTransform$Outbound = {
18
59
  when?: ToolParameterTransformCondition$Outbound | null | undefined;
19
- action?: string | null | undefined;
60
+ action: string;
20
61
  format?: string | null | undefined;
21
62
  };
22
63
  /** @internal */
@@ -1 +1 @@
1
- {"version":3,"file":"toolparametertransform.d.ts","sourceRoot":"","sources":["../../src/models/components/toolparametertransform.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EACL,+BAA+B,EAE/B,wCAAwC,EAEzC,MAAM,sCAAsC,CAAC;AAE9C;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACnC,IAAI,CAAC,EAAE,+BAA+B,GAAG,IAAI,GAAG,SAAS,CAAC;IAC1D;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACnC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CACpC,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,oCAAoC,EAAE,CAAC,CAAC,OAAO,CAC1D,sBAAsB,EACtB,CAAC,CAAC,UAAU,EACZ,OAAO,CAKP,CAAC;AAEH,gBAAgB;AAChB,MAAM,MAAM,+BAA+B,GAAG;IAC5C,IAAI,CAAC,EAAE,wCAAwC,GAAG,IAAI,GAAG,SAAS,CAAC;IACnE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACnC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CACpC,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,qCAAqC,EAAE,CAAC,CAAC,OAAO,CAC3D,+BAA+B,EAC/B,CAAC,CAAC,UAAU,EACZ,sBAAsB,CAKtB,CAAC;AAEH;;;GAGG;AACH,yBAAiB,uBAAuB,CAAC;IACvC,sEAAsE;IAC/D,MAAM,aAAa,0DAAuC,CAAC;IAClE,uEAAuE;IAChE,MAAM,cAAc,kFAAwC,CAAC;IACpE,iEAAiE;IACjE,KAAY,QAAQ,GAAG,+BAA+B,CAAC;CACxD"}
1
+ {"version":3,"file":"toolparametertransform.d.ts","sourceRoot":"","sources":["../../src/models/components/toolparametertransform.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;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AqC,EAAE,CAAC,CAAC,OAAO,CAC3D,+BAA+B,EAC/B,CAAC,CAAC,UAAU,EACZ,sBAAsB,CAKtB,CAAC;AAEH;;;GAGG;AACH,yBAAiB,uBAAuB,CAAC;IACvC,sEAAsE;IAC/D,MAAM,aAAa,0DAAuC,CAAC;IAClE,uEAAuE;IAChE,MAAM,cAAc,kFAAwC,CAAC;IACpE,iEAAiE;IACjE,KAAY,QAAQ,GAAG,+BAA+B,CAAC;CACxD"}
@@ -26,19 +26,43 @@ var __importStar = (this && this.__importStar) || function (mod) {
26
26
  return result;
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.ToolParameterTransform$ = exports.ToolParameterTransform$outboundSchema = exports.ToolParameterTransform$inboundSchema = void 0;
29
+ exports.ToolParameterTransform$ = exports.ToolParameterTransform$outboundSchema = exports.ToolParameterTransform$inboundSchema = exports.Action$ = exports.Action$outboundSchema = exports.Action$inboundSchema = exports.Action = void 0;
30
30
  const z = __importStar(require("zod"));
31
31
  const toolparametertransformcondition_js_1 = require("./toolparametertransformcondition.js");
32
+ /**
33
+ * The action to perform on the 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.
34
+ */
35
+ exports.Action = {
36
+ Default: "default",
37
+ Override: "override",
38
+ Remove: "remove",
39
+ };
40
+ /** @internal */
41
+ exports.Action$inboundSchema = z
42
+ .nativeEnum(exports.Action);
43
+ /** @internal */
44
+ exports.Action$outboundSchema = exports.Action$inboundSchema;
45
+ /**
46
+ * @internal
47
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
48
+ */
49
+ var Action$;
50
+ (function (Action$) {
51
+ /** @deprecated use `Action$inboundSchema` instead. */
52
+ Action$.inboundSchema = exports.Action$inboundSchema;
53
+ /** @deprecated use `Action$outboundSchema` instead. */
54
+ Action$.outboundSchema = exports.Action$outboundSchema;
55
+ })(Action$ || (exports.Action$ = Action$ = {}));
32
56
  /** @internal */
33
57
  exports.ToolParameterTransform$inboundSchema = z.object({
34
58
  when: z.nullable(toolparametertransformcondition_js_1.ToolParameterTransformCondition$inboundSchema).optional(),
35
- action: z.nullable(z.string()).optional(),
59
+ action: exports.Action$inboundSchema.default("default"),
36
60
  format: z.nullable(z.string()).optional(),
37
61
  });
38
62
  /** @internal */
39
63
  exports.ToolParameterTransform$outboundSchema = z.object({
40
64
  when: z.nullable(toolparametertransformcondition_js_1.ToolParameterTransformCondition$outboundSchema).optional(),
41
- action: z.nullable(z.string()).optional(),
65
+ action: exports.Action$outboundSchema.default("default"),
42
66
  format: z.nullable(z.string()).optional(),
43
67
  });
44
68
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"toolparametertransform.js","sourceRoot":"","sources":["../../src/models/components/toolparametertransform.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,uCAAyB;AACzB,6FAK8C;AAc9C,gBAAgB;AACH,QAAA,oCAAoC,GAI7C,CAAC,CAAC,MAAM,CAAC;IACX,IAAI,EAAE,CAAC,CAAC,QAAQ,CAAC,kFAA6C,CAAC,CAAC,QAAQ,EAAE;IAC1E,MAAM,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IACzC,MAAM,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;CAC1C,CAAC,CAAC;AASH,gBAAgB;AACH,QAAA,qCAAqC,GAI9C,CAAC,CAAC,MAAM,CAAC;IACX,IAAI,EAAE,CAAC,CAAC,QAAQ,CAAC,mFAA8C,CAAC,CAAC,QAAQ,EAAE;IAC3E,MAAM,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IACzC,MAAM,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;CAC1C,CAAC,CAAC;AAEH;;;GAGG;AACH,IAAiB,uBAAuB,CAOvC;AAPD,WAAiB,uBAAuB;IACtC,sEAAsE;IACzD,qCAAa,GAAG,4CAAoC,CAAC;IAClE,uEAAuE;IAC1D,sCAAc,GAAG,6CAAqC,CAAC;AAGtE,CAAC,EAPgB,uBAAuB,uCAAvB,uBAAuB,QAOvC"}
1
+ {"version":3,"file":"toolparametertransform.js","sourceRoot":"","sources":["../../src/models/components/toolparametertransform.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,uCAAyB;AAEzB,6FAK8C;AAE9C;;GAEG;AACU,QAAA,MAAM,GAAG;IACpB,OAAO,EAAE,SAAS;IAClB,QAAQ,EAAE,UAAU;IACpB,MAAM,EAAE,QAAQ;CACR,CAAC;AAwBX,gBAAgB;AACH,QAAA,oBAAoB,GAAmC,CAAC;KAClE,UAAU,CAAC,cAAM,CAAC,CAAC;AAEtB,gBAAgB;AACH,QAAA,qBAAqB,GAChC,4BAAoB,CAAC;AAEvB;;;GAGG;AACH,IAAiB,OAAO,CAKvB;AALD,WAAiB,OAAO;IACtB,sDAAsD;IACzC,qBAAa,GAAG,4BAAoB,CAAC;IAClD,uDAAuD;IAC1C,sBAAc,GAAG,6BAAqB,CAAC;AACtD,CAAC,EALgB,OAAO,uBAAP,OAAO,QAKvB;AAED,gBAAgB;AACH,QAAA,oCAAoC,GAI7C,CAAC,CAAC,MAAM,CAAC;IACX,IAAI,EAAE,CAAC,CAAC,QAAQ,CAAC,kFAA6C,CAAC,CAAC,QAAQ,EAAE;IAC1E,MAAM,EAAE,4BAAoB,CAAC,OAAO,CAAC,SAAS,CAAC;IAC/C,MAAM,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;CAC1C,CAAC,CAAC;AASH,gBAAgB;AACH,QAAA,qCAAqC,GAI9C,CAAC,CAAC,MAAM,CAAC;IACX,IAAI,EAAE,CAAC,CAAC,QAAQ,CAAC,mFAA8C,CAAC,CAAC,QAAQ,EAAE;IAC3E,MAAM,EAAE,6BAAqB,CAAC,OAAO,CAAC,SAAS,CAAC;IAChD,MAAM,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;CAC1C,CAAC,CAAC;AAEH;;;GAGG;AACH,IAAiB,uBAAuB,CAOvC;AAPD,WAAiB,uBAAuB;IACtC,sEAAsE;IACzD,qCAAa,GAAG,4CAAoC,CAAC;IAClE,uEAAuE;IAC1D,sCAAc,GAAG,6CAAqC,CAAC;AAGtE,CAAC,EAPgB,uBAAuB,uCAAvB,uBAAuB,QAOvC"}
@@ -1,4 +1,9 @@
1
1
  import * as z from "zod";
2
+ import { ClosedEnum } from "../../types/enums.js";
3
+ export declare const Operator: {
4
+ readonly Eq: "eq";
5
+ };
6
+ export type Operator = ClosedEnum<typeof Operator>;
2
7
  /**
3
8
  * A condition to be met for a transform to be applied to the value of a parameter.
4
9
  */
@@ -11,15 +16,36 @@ export type ToolParameterTransformCondition = {
11
16
  * The value to check against the parameter.
12
17
  */
13
18
  value: string;
14
- operator?: string | null | undefined;
19
+ /**
20
+ * The operator to use for the comparison.
21
+ */
22
+ operator?: "eq" | null | undefined;
15
23
  };
16
24
  /** @internal */
25
+ export declare const Operator$inboundSchema: z.ZodNativeEnum<typeof Operator>;
26
+ /** @internal */
27
+ export declare const Operator$outboundSchema: z.ZodNativeEnum<typeof Operator>;
28
+ /**
29
+ * @internal
30
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
31
+ */
32
+ export declare namespace Operator$ {
33
+ /** @deprecated use `Operator$inboundSchema` instead. */
34
+ const inboundSchema: z.ZodNativeEnum<{
35
+ readonly Eq: "eq";
36
+ }>;
37
+ /** @deprecated use `Operator$outboundSchema` instead. */
38
+ const outboundSchema: z.ZodNativeEnum<{
39
+ readonly Eq: "eq";
40
+ }>;
41
+ }
42
+ /** @internal */
17
43
  export declare const ToolParameterTransformCondition$inboundSchema: z.ZodType<ToolParameterTransformCondition, z.ZodTypeDef, unknown>;
18
44
  /** @internal */
19
45
  export type ToolParameterTransformCondition$Outbound = {
20
46
  key: string;
21
47
  value: string;
22
- operator?: string | null | undefined;
48
+ operator: "eq" | null;
23
49
  };
24
50
  /** @internal */
25
51
  export declare const ToolParameterTransformCondition$outboundSchema: z.ZodType<ToolParameterTransformCondition$Outbound, z.ZodTypeDef, ToolParameterTransformCondition>;
@@ -1 +1 @@
1
- {"version":3,"file":"toolparametertransformcondition.d.ts","sourceRoot":"","sources":["../../src/models/components/toolparametertransformcondition.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB;;GAEG;AACH,MAAM,MAAM,+BAA+B,GAAG;IAC5C;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CACtC,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,6CAA6C,EAAE,CAAC,CAAC,OAAO,CACnE,+BAA+B,EAC/B,CAAC,CAAC,UAAU,EACZ,OAAO,CAKP,CAAC;AAEH,gBAAgB;AAChB,MAAM,MAAM,wCAAwC,GAAG;IACrD,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CACtC,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,8CAA8C,EAAE,CAAC,CAAC,OAAO,CACpE,wCAAwC,EACxC,CAAC,CAAC,UAAU,EACZ,+BAA+B,CAK/B,CAAC;AAEH;;;GAGG;AACH,yBAAiB,gCAAgC,CAAC;IAChD,+EAA+E;IACxE,MAAM,aAAa,mEAAgD,CAAC;IAC3E,gFAAgF;IACzE,MAAM,cAAc,oGAAiD,CAAC;IAC7E,0EAA0E;IAC1E,KAAY,QAAQ,GAAG,wCAAwC,CAAC;CACjE"}
1
+ {"version":3,"file":"toolparametertransformcondition.d.ts","sourceRoot":"","sources":["../../src/models/components/toolparametertransformcondition.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD,eAAO,MAAM,QAAQ;;CAEX,CAAC;AACX,MAAM,MAAM,QAAQ,GAAG,UAAU,CAAC,OAAO,QAAQ,CAAC,CAAC;AAEnD;;GAEG;AACH,MAAM,MAAM,+BAA+B,GAAG;IAC5C;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,QAAQ,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;CACpC,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,sBAAsB,EAAE,CAAC,CAAC,aAAa,CAAC,OAAO,QAAQ,CAC7C,CAAC;AAExB,gBAAgB;AAChB,eAAO,MAAM,uBAAuB,EAAE,CAAC,CAAC,aAAa,CAAC,OAAO,QAAQ,CAC7C,CAAC;AAEzB;;;GAGG;AACH,yBAAiB,SAAS,CAAC;IACzB,wDAAwD;IACjD,MAAM,aAAa;;MAAyB,CAAC;IACpD,yDAAyD;IAClD,MAAM,cAAc;;MAA0B,CAAC;CACvD;AAED,gBAAgB;AAChB,eAAO,MAAM,6CAA6C,EAAE,CAAC,CAAC,OAAO,CACnE,+BAA+B,EAC/B,CAAC,CAAC,UAAU,EACZ,OAAO,CAKP,CAAC;AAEH,gBAAgB;AAChB,MAAM,MAAM,wCAAwC,GAAG;IACrD,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,IAAI,GAAG,IAAI,CAAC;CACv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