@botonic/plugin-ai-agents 0.56.0-alpha.0 → 0.57.0-rslib-esm.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.
Files changed (161) hide show
  1. package/lib/esm/agents/base-agent.d.ts +4 -4
  2. package/lib/esm/agents/base-agent.js +47 -20
  3. package/lib/esm/agents/base-agent.js.map +1 -1
  4. package/lib/esm/agents/index.d.ts +2 -2
  5. package/lib/esm/agents/index.js +8 -7
  6. package/lib/esm/agents/index.js.map +1 -1
  7. package/lib/esm/agents/router-agent.d.ts +5 -5
  8. package/lib/esm/agents/router-agent.js +32 -15
  9. package/lib/esm/agents/router-agent.js.map +1 -1
  10. package/lib/esm/agents/specialist-agent.d.ts +5 -5
  11. package/lib/esm/agents/specialist-agent.js +65 -45
  12. package/lib/esm/agents/specialist-agent.js.map +1 -1
  13. package/lib/esm/bot-config-tools.d.ts +1 -1
  14. package/lib/esm/bot-config-tools.js +15 -13
  15. package/lib/esm/bot-config-tools.js.map +1 -1
  16. package/lib/esm/constants.js +18 -17
  17. package/lib/esm/constants.js.map +1 -1
  18. package/lib/esm/debug-logger.d.ts +1 -1
  19. package/lib/esm/debug-logger.js +14 -9
  20. package/lib/esm/debug-logger.js.map +1 -1
  21. package/lib/esm/guardrails/index.d.ts +1 -1
  22. package/lib/esm/guardrails/index.js +5 -4
  23. package/lib/esm/guardrails/index.js.map +1 -1
  24. package/lib/esm/guardrails/input.d.ts +2 -2
  25. package/lib/esm/guardrails/input.js +65 -42
  26. package/lib/esm/guardrails/input.js.map +1 -1
  27. package/lib/esm/index.d.ts +3 -3
  28. package/lib/esm/index.js +114 -74
  29. package/lib/esm/index.js.map +1 -1
  30. package/lib/esm/llm-config.d.ts +1 -1
  31. package/lib/esm/llm-config.js +81 -52
  32. package/lib/esm/llm-config.js.map +1 -1
  33. package/lib/esm/package.json +3 -0
  34. package/lib/esm/runners/base-runner.d.ts +3 -3
  35. package/lib/esm/runners/base-runner.js +81 -69
  36. package/lib/esm/runners/base-runner.js.map +1 -1
  37. package/lib/esm/runners/index.d.ts +2 -2
  38. package/lib/esm/runners/index.js +8 -7
  39. package/lib/esm/runners/index.js.map +1 -1
  40. package/lib/esm/runners/router-runner.d.ts +2 -2
  41. package/lib/esm/runners/router-runner.js +19 -14
  42. package/lib/esm/runners/router-runner.js.map +1 -1
  43. package/lib/esm/runners/specialist-runner.d.ts +1 -1
  44. package/lib/esm/runners/specialist-runner.js +8 -6
  45. package/lib/esm/runners/specialist-runner.js.map +1 -1
  46. package/lib/esm/services/hubtype-api-client.d.ts +2 -2
  47. package/lib/esm/services/hubtype-api-client.js +110 -95
  48. package/lib/esm/services/hubtype-api-client.js.map +1 -1
  49. package/lib/esm/services/types.d.ts +1 -1
  50. package/lib/esm/services/types.js +9 -9
  51. package/lib/esm/services/types.js.map +1 -1
  52. package/lib/esm/structured-output/bot-executor.js +20 -17
  53. package/lib/esm/structured-output/bot-executor.js.map +1 -1
  54. package/lib/esm/structured-output/carousel.js +25 -22
  55. package/lib/esm/structured-output/carousel.js.map +1 -1
  56. package/lib/esm/structured-output/exit.js +13 -10
  57. package/lib/esm/structured-output/exit.js.map +1 -1
  58. package/lib/esm/structured-output/index.d.ts +0 -10
  59. package/lib/esm/structured-output/index.js +39 -29
  60. package/lib/esm/structured-output/index.js.map +1 -1
  61. package/lib/esm/structured-output/text-with-buttons.js +24 -23
  62. package/lib/esm/structured-output/text-with-buttons.js.map +1 -1
  63. package/lib/esm/structured-output/text.js +16 -13
  64. package/lib/esm/structured-output/text.js.map +1 -1
  65. package/lib/esm/tools/index.d.ts +2 -2
  66. package/lib/esm/tools/index.js +7 -7
  67. package/lib/esm/tools/index.js.map +1 -1
  68. package/lib/esm/tools/retrieve-knowledge.d.ts +2 -2
  69. package/lib/esm/tools/retrieve-knowledge.js +38 -32
  70. package/lib/esm/tools/retrieve-knowledge.js.map +1 -1
  71. package/lib/esm/types.d.ts +3 -3
  72. package/lib/esm/types.js +4 -2
  73. package/lib/esm/types.js.map +1 -1
  74. package/package.json +8 -7
  75. package/src/structured-output/index.ts +0 -2
  76. package/src/types.ts +4 -4
  77. package/lib/cjs/agents/base-agent.d.ts +0 -28
  78. package/lib/cjs/agents/base-agent.js +0 -39
  79. package/lib/cjs/agents/base-agent.js.map +0 -1
  80. package/lib/cjs/agents/index.d.ts +0 -2
  81. package/lib/cjs/agents/index.js +0 -8
  82. package/lib/cjs/agents/index.js.map +0 -1
  83. package/lib/cjs/agents/router-agent.d.ts +0 -25
  84. package/lib/cjs/agents/router-agent.js +0 -33
  85. package/lib/cjs/agents/router-agent.js.map +0 -1
  86. package/lib/cjs/agents/specialist-agent.d.ts +0 -39
  87. package/lib/cjs/agents/specialist-agent.js +0 -108
  88. package/lib/cjs/agents/specialist-agent.js.map +0 -1
  89. package/lib/cjs/bot-config-tools.d.ts +0 -7
  90. package/lib/cjs/bot-config-tools.js +0 -18
  91. package/lib/cjs/bot-config-tools.js.map +0 -1
  92. package/lib/cjs/constants.d.ts +0 -21
  93. package/lib/cjs/constants.js +0 -25
  94. package/lib/cjs/constants.js.map +0 -1
  95. package/lib/cjs/debug-logger.d.ts +0 -33
  96. package/lib/cjs/debug-logger.js +0 -116
  97. package/lib/cjs/debug-logger.js.map +0 -1
  98. package/lib/cjs/guardrails/index.d.ts +0 -1
  99. package/lib/cjs/guardrails/index.js +0 -5
  100. package/lib/cjs/guardrails/index.js.map +0 -1
  101. package/lib/cjs/guardrails/input.d.ts +0 -10
  102. package/lib/cjs/guardrails/input.js +0 -96
  103. package/lib/cjs/guardrails/input.js.map +0 -1
  104. package/lib/cjs/index.d.ts +0 -22
  105. package/lib/cjs/index.js +0 -219
  106. package/lib/cjs/index.js.map +0 -1
  107. package/lib/cjs/llm-config.d.ts +0 -30
  108. package/lib/cjs/llm-config.js +0 -121
  109. package/lib/cjs/llm-config.js.map +0 -1
  110. package/lib/cjs/runners/base-runner.d.ts +0 -31
  111. package/lib/cjs/runners/base-runner.js +0 -189
  112. package/lib/cjs/runners/base-runner.js.map +0 -1
  113. package/lib/cjs/runners/index.d.ts +0 -2
  114. package/lib/cjs/runners/index.js +0 -8
  115. package/lib/cjs/runners/index.js.map +0 -1
  116. package/lib/cjs/runners/router-runner.d.ts +0 -8
  117. package/lib/cjs/runners/router-runner.js +0 -44
  118. package/lib/cjs/runners/router-runner.js.map +0 -1
  119. package/lib/cjs/runners/specialist-runner.d.ts +0 -4
  120. package/lib/cjs/runners/specialist-runner.js +0 -8
  121. package/lib/cjs/runners/specialist-runner.js.map +0 -1
  122. package/lib/cjs/services/hubtype-api-client.d.ts +0 -13
  123. package/lib/cjs/services/hubtype-api-client.js +0 -176
  124. package/lib/cjs/services/hubtype-api-client.js.map +0 -1
  125. package/lib/cjs/services/types.d.ts +0 -72
  126. package/lib/cjs/services/types.js +0 -13
  127. package/lib/cjs/services/types.js.map +0 -1
  128. package/lib/cjs/structured-output/bot-executor.d.ts +0 -13
  129. package/lib/cjs/structured-output/bot-executor.js +0 -18
  130. package/lib/cjs/structured-output/bot-executor.js.map +0 -1
  131. package/lib/cjs/structured-output/carousel.d.ts +0 -18
  132. package/lib/cjs/structured-output/carousel.js +0 -23
  133. package/lib/cjs/structured-output/carousel.js.map +0 -1
  134. package/lib/cjs/structured-output/exit.d.ts +0 -6
  135. package/lib/cjs/structured-output/exit.js +0 -11
  136. package/lib/cjs/structured-output/exit.js.map +0 -1
  137. package/lib/cjs/structured-output/index.d.ts +0 -108
  138. package/lib/cjs/structured-output/index.js +0 -45
  139. package/lib/cjs/structured-output/index.js.map +0 -1
  140. package/lib/cjs/structured-output/request-contact-info.d.ts +0 -9
  141. package/lib/cjs/structured-output/request-contact-info.js +0 -14
  142. package/lib/cjs/structured-output/request-contact-info.js.map +0 -1
  143. package/lib/cjs/structured-output/text-with-buttons.d.ts +0 -17
  144. package/lib/cjs/structured-output/text-with-buttons.js +0 -24
  145. package/lib/cjs/structured-output/text-with-buttons.js.map +0 -1
  146. package/lib/cjs/structured-output/text.d.ts +0 -9
  147. package/lib/cjs/structured-output/text.js +0 -14
  148. package/lib/cjs/structured-output/text.js.map +0 -1
  149. package/lib/cjs/tools/index.d.ts +0 -3
  150. package/lib/cjs/tools/index.js +0 -8
  151. package/lib/cjs/tools/index.js.map +0 -1
  152. package/lib/cjs/tools/retrieve-knowledge.d.ts +0 -6
  153. package/lib/cjs/tools/retrieve-knowledge.js +0 -34
  154. package/lib/cjs/tools/retrieve-knowledge.js.map +0 -1
  155. package/lib/cjs/types.d.ts +0 -53
  156. package/lib/cjs/types.js +0 -3
  157. package/lib/cjs/types.js.map +0 -1
  158. package/lib/esm/structured-output/request-contact-info.d.ts +0 -9
  159. package/lib/esm/structured-output/request-contact-info.js +0 -14
  160. package/lib/esm/structured-output/request-contact-info.js.map +0 -1
  161. package/src/structured-output/request-contact-info.ts +0 -18
@@ -1 +0,0 @@
1
- {"version":3,"file":"request-contact-info.js","sourceRoot":"","sources":["../../../src/structured-output/request-contact-info.ts"],"names":[],"mappings":";;;AAAA,wCAGsB;AACtB,6BAAuB;AAIV,QAAA,wBAAwB,GAAG,OAAC;KACtC,MAAM,CAAC;IACN,IAAI,EAAE,OAAC,CAAC,OAAO,CAAC,wBAAiB,CAAC,kBAAkB,CAAC;IACrD,OAAO,EAAE,OAAC,CAAC,MAAM,CAAC;QAChB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,yBAAyB,CAAC;KACrD,CAAC;CACH,CAAC;KACD,QAAQ,CACP,mGAAmG,CACpG,CAAA"}
@@ -1,17 +0,0 @@
1
- import { OutputMessageType, type TextWithButtonsMessage } from '@botonic/core';
2
- import { z } from 'zod';
3
- export type { TextWithButtonsMessage };
4
- export declare const TextWithButtonsSchema: z.ZodObject<{
5
- type: z.ZodLiteral<OutputMessageType.TextWithButtons>;
6
- content: z.ZodObject<{
7
- text: z.ZodString;
8
- buttons: z.ZodArray<z.ZodObject<{
9
- text: z.ZodString;
10
- url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
11
- target: z.ZodOptional<z.ZodNullable<z.ZodDefault<z.ZodEnum<{
12
- _blank: "_blank";
13
- _self: "_self";
14
- }>>>>;
15
- }, z.core.$strip>>;
16
- }, z.core.$strip>;
17
- }, z.core.$strip>;
@@ -1,24 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TextWithButtonsSchema = void 0;
4
- const core_1 = require("@botonic/core");
5
- const zod_1 = require("zod");
6
- exports.TextWithButtonsSchema = zod_1.z
7
- .object({
8
- type: zod_1.z.literal(core_1.OutputMessageType.TextWithButtons),
9
- content: zod_1.z.object({
10
- text: zod_1.z.string(),
11
- buttons: zod_1.z.array(zod_1.z.object({
12
- text: zod_1.z.string(),
13
- url: zod_1.z.string().nullable().optional(),
14
- target: zod_1.z
15
- .enum(['_blank', '_self'])
16
- .default('_blank')
17
- .nullable()
18
- .optional()
19
- .describe('The target of the button when it has an url. If not provided, it will default to _blank.'),
20
- })),
21
- }),
22
- })
23
- .describe('A text message with buttons to allow the user to use quick replies');
24
- //# sourceMappingURL=text-with-buttons.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"text-with-buttons.js","sourceRoot":"","sources":["../../../src/structured-output/text-with-buttons.ts"],"names":[],"mappings":";;;AAAA,wCAA8E;AAC9E,6BAAuB;AAIV,QAAA,qBAAqB,GAAG,OAAC;KACnC,MAAM,CAAC;IACN,IAAI,EAAE,OAAC,CAAC,OAAO,CAAC,wBAAiB,CAAC,eAAe,CAAC;IAClD,OAAO,EAAE,OAAC,CAAC,MAAM,CAAC;QAChB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;QAChB,OAAO,EAAE,OAAC,CAAC,KAAK,CACd,OAAC,CAAC,MAAM,CAAC;YACP,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;YAChB,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;YACrC,MAAM,EAAE,OAAC;iBACN,IAAI,CAAC,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;iBACzB,OAAO,CAAC,QAAQ,CAAC;iBACjB,QAAQ,EAAE;iBACV,QAAQ,EAAE;iBACV,QAAQ,CACP,0FAA0F,CAC3F;SACJ,CAAC,CACH;KACF,CAAC;CACH,CAAC;KACD,QAAQ,CACP,oEAAoE,CACrE,CAAA"}
@@ -1,9 +0,0 @@
1
- import { OutputMessageType, type TextMessage } from '@botonic/core';
2
- import { z } from 'zod';
3
- export type { TextMessage };
4
- export declare const TextSchema: z.ZodObject<{
5
- type: z.ZodLiteral<OutputMessageType.Text>;
6
- content: z.ZodObject<{
7
- text: z.ZodString;
8
- }, z.core.$strip>;
9
- }, z.core.$strip>;
@@ -1,14 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TextSchema = void 0;
4
- const core_1 = require("@botonic/core");
5
- const zod_1 = require("zod");
6
- exports.TextSchema = zod_1.z
7
- .object({
8
- type: zod_1.z.literal(core_1.OutputMessageType.Text),
9
- content: zod_1.z.object({
10
- text: zod_1.z.string(),
11
- }),
12
- })
13
- .describe('A text message');
14
- //# sourceMappingURL=text.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"text.js","sourceRoot":"","sources":["../../../src/structured-output/text.ts"],"names":[],"mappings":";;;AAAA,wCAAmE;AACnE,6BAAuB;AAIV,QAAA,UAAU,GAAG,OAAC;KACxB,MAAM,CAAC;IACN,IAAI,EAAE,OAAC,CAAC,OAAO,CAAC,wBAAiB,CAAC,IAAI,CAAC;IACvC,OAAO,EAAE,OAAC,CAAC,MAAM,CAAC;QAChB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;KACjB,CAAC;CACH,CAAC;KACD,QAAQ,CAAC,gBAAgB,CAAC,CAAA"}
@@ -1,3 +0,0 @@
1
- import type { Tool } from '../types';
2
- export { createRetrieveKnowledge, RETRIEVE_KNOWLEDGE_TOOL_NAME, } from './retrieve-knowledge';
3
- export declare const mandatoryTools: Tool[];
@@ -1,8 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.mandatoryTools = exports.RETRIEVE_KNOWLEDGE_TOOL_NAME = exports.createRetrieveKnowledge = void 0;
4
- var retrieve_knowledge_1 = require("./retrieve-knowledge");
5
- Object.defineProperty(exports, "createRetrieveKnowledge", { enumerable: true, get: function () { return retrieve_knowledge_1.createRetrieveKnowledge; } });
6
- Object.defineProperty(exports, "RETRIEVE_KNOWLEDGE_TOOL_NAME", { enumerable: true, get: function () { return retrieve_knowledge_1.RETRIEVE_KNOWLEDGE_TOOL_NAME; } });
7
- exports.mandatoryTools = [];
8
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/index.ts"],"names":[],"mappings":";;;AAEA,2DAG6B;AAF3B,6HAAA,uBAAuB,OAAA;AACvB,kIAAA,4BAA4B,OAAA;AAGjB,QAAA,cAAc,GAAW,EAAE,CAAA"}
@@ -1,6 +0,0 @@
1
- import { z } from 'zod';
2
- import type { Context } from '../types';
3
- export declare const RETRIEVE_KNOWLEDGE_TOOL_NAME = "retrieve_knowledge";
4
- export declare const createRetrieveKnowledge: (sourceIds: string[]) => import("@openai/agents").FunctionTool<Context<import("@botonic/core").ResolvedPlugins, any>, z.ZodObject<{
5
- query: z.ZodString;
6
- }, z.core.$strip>, string>;
@@ -1,34 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createRetrieveKnowledge = exports.RETRIEVE_KNOWLEDGE_TOOL_NAME = void 0;
4
- const agents_1 = require("@openai/agents");
5
- const zod_1 = require("zod");
6
- const hubtype_api_client_1 = require("../services/hubtype-api-client");
7
- exports.RETRIEVE_KNOWLEDGE_TOOL_NAME = 'retrieve_knowledge';
8
- const createRetrieveKnowledge = (sourceIds) => (0, agents_1.tool)({
9
- name: exports.RETRIEVE_KNOWLEDGE_TOOL_NAME,
10
- description: 'Consult the knowledge base for information before answering. Use this tool to make sure the information you provide is faithful.',
11
- parameters: zod_1.z.object({
12
- query: zod_1.z.string().describe('The query to search the knowledge base for'),
13
- }),
14
- execute: async (input, runContext) => {
15
- const context = runContext?.context;
16
- const query = input.query;
17
- if (!context) {
18
- throw new Error('Context is required');
19
- }
20
- const client = new hubtype_api_client_1.HubtypeApiClient(context.authToken);
21
- const chunks = await client.retrieveSimilarChunks(query, sourceIds);
22
- const chunksIds = chunks.map(chunk => chunk.id);
23
- const chunkTexts = chunks.map(chunk => chunk.text);
24
- context.knowledgeUsed = {
25
- query,
26
- sourceIds,
27
- chunksIds,
28
- chunkTexts,
29
- };
30
- return chunkTexts;
31
- },
32
- });
33
- exports.createRetrieveKnowledge = createRetrieveKnowledge;
34
- //# sourceMappingURL=retrieve-knowledge.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"retrieve-knowledge.js","sourceRoot":"","sources":["../../../src/tools/retrieve-knowledge.ts"],"names":[],"mappings":";;;AAAA,2CAAsD;AACtD,6BAAuB;AAEvB,uEAAiE;AAGpD,QAAA,4BAA4B,GAAG,oBAAoB,CAAA;AAEzD,MAAM,uBAAuB,GAAG,CAAC,SAAmB,EAAE,EAAE,CAC7D,IAAA,aAAI,EAAC;IACH,IAAI,EAAE,oCAA4B;IAClC,WAAW,EACT,kIAAkI;IACpI,UAAU,EAAE,OAAC,CAAC,MAAM,CAAC;QACnB,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,4CAA4C,CAAC;KACzE,CAAC;IACF,OAAO,EAAE,KAAK,EACZ,KAAwB,EACxB,UAAgC,EACb,EAAE;QACrB,MAAM,OAAO,GAAG,UAAU,EAAE,OAAO,CAAA;QACnC,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAA;QACzB,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAA;QACxC,CAAC;QACD,MAAM,MAAM,GAAG,IAAI,qCAAgB,CAAC,OAAO,CAAC,SAAS,CAAC,CAAA;QACtD,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,qBAAqB,CAAC,KAAK,EAAE,SAAS,CAAC,CAAA;QACnE,MAAM,SAAS,GAAG,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAA;QAC/C,MAAM,UAAU,GAAG,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;QAElD,OAAO,CAAC,aAAa,GAAG;YACtB,KAAK;YACL,SAAS;YACT,SAAS;YACT,UAAU;SACX,CAAA;QAED,OAAO,UAAU,CAAA;IACnB,CAAC;CACF,CAAC,CAAA;AA/BS,QAAA,uBAAuB,2BA+BhC"}
@@ -1,53 +0,0 @@
1
- import { AgenticOutputMessage, AiAgentArgs, type BotContext, GuardrailRule, InferenceResponse, type ResolvedPlugins, RunResult } from '@botonic/core';
2
- import type { Agent, AgentInputItem, AgentOutputType, RunContext as OpenAIRunContext, Tool as OpenAITool } from '@openai/agents';
3
- import type { ZodType } from 'zod';
4
- import type { OutputSchema } from './structured-output';
5
- export interface Context<TPlugins extends ResolvedPlugins = ResolvedPlugins, TExtraData = any> {
6
- authToken: string;
7
- knowledgeUsed: {
8
- query: string;
9
- sourceIds: string[];
10
- chunksIds: string[];
11
- chunkTexts: string[];
12
- };
13
- request: BotContext<TPlugins, TExtraData>;
14
- }
15
- export type RunContext<TPlugins extends ResolvedPlugins = ResolvedPlugins, TExtraData = any> = OpenAIRunContext<Context<TPlugins, TExtraData>>;
16
- export interface CustomTool<TPlugins extends ResolvedPlugins = ResolvedPlugins, TExtraData = any> {
17
- name: string;
18
- description: string;
19
- schema: ZodType;
20
- func: (input?: any, runContext?: RunContext<TPlugins, TExtraData>) => Promise<any>;
21
- }
22
- export interface Chunk {
23
- id: string;
24
- text: string;
25
- }
26
- export type Tool<TPlugins extends ResolvedPlugins = ResolvedPlugins, TExtraData = any> = OpenAITool<Context<TPlugins, TExtraData>>;
27
- export type AIAgent<TPlugins extends ResolvedPlugins = ResolvedPlugins, TExtraData = any> = Agent<Context<TPlugins, TExtraData>, AgentOutputType<typeof OutputSchema>>;
28
- export interface MemoryOptions {
29
- maxMessages: number;
30
- includeToolCalls: boolean;
31
- maxFullToolResults: number;
32
- debugMode: boolean;
33
- }
34
- export interface PluginAiAgentOptions<TPlugins extends ResolvedPlugins = ResolvedPlugins, TExtraData = any> {
35
- authToken?: string;
36
- customTools?: CustomTool<TPlugins, TExtraData>[];
37
- maxRetries?: number;
38
- timeout?: number;
39
- memory?: Partial<MemoryOptions>;
40
- /** Enable debug logging for AI agent configuration and execution details. */
41
- enableDebug?: boolean;
42
- /** Key for the local storage to to get messages in local development mode */
43
- localStorageKey?: string;
44
- }
45
- export interface ResultRawResponse {
46
- usage: {
47
- inputTokens: number;
48
- outputTokens: number;
49
- };
50
- providerData?: Record<string, unknown>;
51
- }
52
- export type AgenticInputMessage = AgentInputItem;
53
- export { AgenticOutputMessage, AiAgentArgs, GuardrailRule, InferenceResponse, RunResult, };
package/lib/cjs/types.js DELETED
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":""}
@@ -1,9 +0,0 @@
1
- import { OutputMessageType, type RequestContactInfoMessage } from '@botonic/core';
2
- import { z } from 'zod';
3
- export type { RequestContactInfoMessage };
4
- export declare const RequestContactInfoSchema: z.ZodObject<{
5
- type: z.ZodLiteral<OutputMessageType.RequestContactInfo>;
6
- content: z.ZodObject<{
7
- text: z.ZodString;
8
- }, z.core.$strip>;
9
- }, z.core.$strip>;
@@ -1,14 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RequestContactInfoSchema = void 0;
4
- const core_1 = require("@botonic/core");
5
- const zod_1 = require("zod");
6
- exports.RequestContactInfoSchema = zod_1.z
7
- .object({
8
- type: zod_1.z.literal(core_1.OutputMessageType.RequestContactInfo),
9
- content: zod_1.z.object({
10
- text: zod_1.z.string().describe('The text of the message'),
11
- }),
12
- })
13
- .describe('A message to request phone number from the user. Use it only when asked explicitly in the prompt.');
14
- //# sourceMappingURL=request-contact-info.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"request-contact-info.js","sourceRoot":"","sources":["../../../src/structured-output/request-contact-info.ts"],"names":[],"mappings":";;;AAAA,wCAGsB;AACtB,6BAAuB;AAIV,QAAA,wBAAwB,GAAG,OAAC;KACtC,MAAM,CAAC;IACN,IAAI,EAAE,OAAC,CAAC,OAAO,CAAC,wBAAiB,CAAC,kBAAkB,CAAC;IACrD,OAAO,EAAE,OAAC,CAAC,MAAM,CAAC;QAChB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,yBAAyB,CAAC;KACrD,CAAC;CACH,CAAC;KACD,QAAQ,CACP,mGAAmG,CACpG,CAAA"}
@@ -1,18 +0,0 @@
1
- import {
2
- OutputMessageType,
3
- type RequestContactInfoMessage,
4
- } from '@botonic/core'
5
- import { z } from 'zod'
6
-
7
- export type { RequestContactInfoMessage }
8
-
9
- export const RequestContactInfoSchema = z
10
- .object({
11
- type: z.literal(OutputMessageType.RequestContactInfo),
12
- content: z.object({
13
- text: z.string().describe('The text of the message'),
14
- }),
15
- })
16
- .describe(
17
- 'A message to request phone number from the user. Use it only when asked explicitly in the prompt.'
18
- )