@anvia/core 1.11.1 → 1.12.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 (68) hide show
  1. package/README.md +36 -0
  2. package/dist/agent/agent.js +13 -13
  3. package/dist/agent/index.js +16 -16
  4. package/dist/agent/resolve-options.js +6 -6
  5. package/dist/agent/resolved-agent.js +14 -14
  6. package/dist/agent/team/agent-team.js +16 -16
  7. package/dist/agent/team/index.js +16 -16
  8. package/dist/agent/tool-catalog.js +6 -6
  9. package/dist/{chunk-PLJQ4274.js → chunk-4NGQXLJI.js} +3 -3
  10. package/dist/{chunk-WU4ODZKR.js → chunk-BFB7UCIR.js} +3 -3
  11. package/dist/{chunk-DRSKZVC6.js → chunk-BLCGXW53.js} +4 -4
  12. package/dist/{chunk-GNBPXJC6.js → chunk-EF26KTFU.js} +2 -2
  13. package/dist/{chunk-2K7NSWUC.js → chunk-ET5SCES6.js} +8 -8
  14. package/dist/{chunk-VUY2C2QD.js → chunk-GAF5XEDA.js} +2 -2
  15. package/dist/{chunk-7XDM7A3W.js → chunk-IAUCRAK7.js} +3 -3
  16. package/dist/chunk-IRXAEVEQ.js +105 -0
  17. package/dist/chunk-IRXAEVEQ.js.map +1 -0
  18. package/dist/{chunk-L2JI2GDH.js → chunk-IVXYLD2M.js} +2 -2
  19. package/dist/{chunk-GSMLYI4Z.js → chunk-KZYVFQYY.js} +3 -3
  20. package/dist/{chunk-GI6APIEU.js → chunk-R4AJ2EE3.js} +4 -4
  21. package/dist/{chunk-Y5FHUUNC.js → chunk-TYOIMXFR.js} +4 -4
  22. package/dist/{chunk-TXWNIEZU.js → chunk-USPZU7EM.js} +4 -4
  23. package/dist/{chunk-MNWULFRX.js → chunk-W2UT2YCM.js} +2 -2
  24. package/dist/{chunk-4IOC4SP6.js → chunk-X4XULHDO.js} +7 -7
  25. package/dist/decision/index.js +5 -5
  26. package/dist/embeddings/index.js +8 -8
  27. package/dist/evals/advanced-metrics.js +3 -3
  28. package/dist/evals/cli.js +4 -4
  29. package/dist/evals/index.js +34 -34
  30. package/dist/evals/metrics.js +4 -4
  31. package/dist/evals/runner.js +3 -3
  32. package/dist/index.d.ts +1 -1
  33. package/dist/index.js +38 -34
  34. package/dist/internal/agent-runtime/agent-run.js +10 -10
  35. package/dist/internal/agent-runtime/retrieval.js +4 -4
  36. package/dist/internal/agent-runtime/tool-execution.js +9 -9
  37. package/dist/internal/agent.js +14 -14
  38. package/dist/internal/team-runtime/run.js +15 -15
  39. package/dist/skills/index.js +9 -9
  40. package/dist/skills/load.js +8 -8
  41. package/dist/skills/tools.js +8 -8
  42. package/dist/think-tool-CTuagAtn.d.ts +44 -0
  43. package/dist/tool/dynamic-tools.js +5 -5
  44. package/dist/tool/index.d.ts +1 -1
  45. package/dist/tool/index.js +13 -9
  46. package/dist/tool/question-tool.js +5 -1
  47. package/dist/transcription/index.js +1 -1
  48. package/dist/vector-store/index.js +7 -7
  49. package/dist/vector-store/ingest.js +2 -2
  50. package/dist/vector-store/retrieve.js +1 -1
  51. package/package.json +1 -1
  52. package/dist/chunk-MNBKSRS5.js +0 -47
  53. package/dist/chunk-MNBKSRS5.js.map +0 -1
  54. package/dist/think-tool-DJbtUDZm.d.ts +0 -40
  55. /package/dist/{chunk-PLJQ4274.js.map → chunk-4NGQXLJI.js.map} +0 -0
  56. /package/dist/{chunk-WU4ODZKR.js.map → chunk-BFB7UCIR.js.map} +0 -0
  57. /package/dist/{chunk-DRSKZVC6.js.map → chunk-BLCGXW53.js.map} +0 -0
  58. /package/dist/{chunk-GNBPXJC6.js.map → chunk-EF26KTFU.js.map} +0 -0
  59. /package/dist/{chunk-2K7NSWUC.js.map → chunk-ET5SCES6.js.map} +0 -0
  60. /package/dist/{chunk-VUY2C2QD.js.map → chunk-GAF5XEDA.js.map} +0 -0
  61. /package/dist/{chunk-7XDM7A3W.js.map → chunk-IAUCRAK7.js.map} +0 -0
  62. /package/dist/{chunk-L2JI2GDH.js.map → chunk-IVXYLD2M.js.map} +0 -0
  63. /package/dist/{chunk-GSMLYI4Z.js.map → chunk-KZYVFQYY.js.map} +0 -0
  64. /package/dist/{chunk-GI6APIEU.js.map → chunk-R4AJ2EE3.js.map} +0 -0
  65. /package/dist/{chunk-Y5FHUUNC.js.map → chunk-TYOIMXFR.js.map} +0 -0
  66. /package/dist/{chunk-TXWNIEZU.js.map → chunk-USPZU7EM.js.map} +0 -0
  67. /package/dist/{chunk-MNWULFRX.js.map → chunk-W2UT2YCM.js.map} +0 -0
  68. /package/dist/{chunk-4IOC4SP6.js.map → chunk-X4XULHDO.js.map} +0 -0
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  Agent
3
- } from "./chunk-TXWNIEZU.js";
3
+ } from "./chunk-USPZU7EM.js";
4
4
  import {
5
5
  getAgentToolState
6
6
  } from "./chunk-A7BXVZXZ.js";
7
7
  import {
8
8
  markResolvedAgentOptions
9
- } from "./chunk-MNWULFRX.js";
9
+ } from "./chunk-W2UT2YCM.js";
10
10
 
11
11
  // src/agent/resolved-agent.ts
12
12
  function createResolvedAgent(options) {
@@ -45,4 +45,4 @@ export {
45
45
  createResolvedAgent,
46
46
  getResolvedAgentOptions
47
47
  };
48
- //# sourceMappingURL=chunk-7XDM7A3W.js.map
48
+ //# sourceMappingURL=chunk-IAUCRAK7.js.map
@@ -0,0 +1,105 @@
1
+ import {
2
+ createTool
3
+ } from "./chunk-MEFGXAKJ.js";
4
+
5
+ // src/tool/question-tool.ts
6
+ import { z } from "zod";
7
+ var questionToolMarker = /* @__PURE__ */ Symbol("anvia.question-tool");
8
+ var DEFAULT_QUESTION_TOOL_NAME = "ask_user";
9
+ var DEFAULT_QUESTION_TOOL_DESCRIPTION = `Ask the user questions and wait for their answers before continuing.
10
+
11
+ Use this tool only when you cannot continue without the user's input:
12
+ - The request is ambiguous, and different readings would lead to clearly different results.
13
+ - A decision belongs to the user: a preference, a tradeoff, or something that is hard to undo.
14
+ - Information you need is missing and you cannot find it with your other tools or work it out from the conversation.
15
+
16
+ Do not use it:
17
+ - For facts you can look up with your other tools, or work out from the conversation.
18
+ - To ask permission for routine steps the user has already asked for.
19
+ - To check whether your answer or plan is good. Finish the work and let the user react.
20
+ - For choices with a sensible default. Pick it, and mention the choice in your reply.
21
+
22
+ How to ask:
23
+ - Put every question you need into one call instead of calling the tool repeatedly. Ask no more than 4 questions per call.
24
+ - Give each question a short, unique \`id\` in snake_case.
25
+ - Write \`text\` as one complete, self-contained question that ends with a question mark.
26
+ - When there is a known set of reasonable answers, give 2\u20134 \`choices\` with a short \`label\` and a stable \`value\`. Make the choices mutually exclusive. If you recommend one, list it first and add " (recommended)" to its label.
27
+ - Set \`allowCustom: true\` when the user might want an answer outside the list. Leave out \`choices\` for open-ended questions. Do not add an "Other" choice.
28
+
29
+ After you get the answers:
30
+ - Each answer has a \`questionId\` and a \`value\` (the chosen value or the user's free text).
31
+ - Follow the answers. Do not ask the same question again unless an answer is unclear or contradicts another one.`;
32
+ function createQuestionTool(options = {}) {
33
+ const tool = createTool({
34
+ name: options.name ?? DEFAULT_QUESTION_TOOL_NAME,
35
+ description: options.description ?? DEFAULT_QUESTION_TOOL_DESCRIPTION,
36
+ inputSchema: z.object({
37
+ questions: z.array(
38
+ z.object({
39
+ id: z.string().trim().min(1, "Question IDs must not be empty."),
40
+ text: z.string().trim().min(1, "Question text must not be empty."),
41
+ choices: z.array(
42
+ z.object({
43
+ label: z.string().trim().min(1, "Question choice labels must not be empty."),
44
+ value: z.string().trim().min(1, "Question choice values must not be empty.")
45
+ }).strict()
46
+ ).min(2, "Questions with choices must have at least 2 choices.").max(4, "Questions must have no more than 4 choices.").superRefine((choices, context) => {
47
+ const values = /* @__PURE__ */ new Set();
48
+ for (const [index, choice] of choices.entries()) {
49
+ if (values.has(choice.value)) {
50
+ context.addIssue({
51
+ code: "custom",
52
+ message: "Question choice values must be unique.",
53
+ path: [index, "value"]
54
+ });
55
+ }
56
+ values.add(choice.value);
57
+ }
58
+ }).optional(),
59
+ allowCustom: z.boolean().optional()
60
+ }).strict().superRefine((question, context) => {
61
+ if (question.choices === void 0 && question.allowCustom === false) {
62
+ context.addIssue({
63
+ code: "custom",
64
+ message: "A free-text question cannot disable custom answers.",
65
+ path: ["allowCustom"]
66
+ });
67
+ }
68
+ })
69
+ ).min(1, "Provide at least 1 question.").max(4, "Ask no more than 4 questions per call.").superRefine((questions, context) => {
70
+ const ids = /* @__PURE__ */ new Set();
71
+ for (const [index, question] of questions.entries()) {
72
+ if (ids.has(question.id)) {
73
+ context.addIssue({
74
+ code: "custom",
75
+ message: "Question IDs must be unique.",
76
+ path: [index, "id"]
77
+ });
78
+ }
79
+ ids.add(question.id);
80
+ }
81
+ })
82
+ }).strict(),
83
+ execute() {
84
+ throw new Error("Question tools can only be resolved through an Agent interaction.");
85
+ }
86
+ });
87
+ Object.defineProperty(tool, questionToolMarker, {
88
+ configurable: false,
89
+ enumerable: false,
90
+ value: true,
91
+ writable: false
92
+ });
93
+ return tool;
94
+ }
95
+ function isQuestionTool(tool) {
96
+ return typeof tool === "object" && tool !== null && questionToolMarker in tool;
97
+ }
98
+
99
+ export {
100
+ DEFAULT_QUESTION_TOOL_NAME,
101
+ DEFAULT_QUESTION_TOOL_DESCRIPTION,
102
+ createQuestionTool,
103
+ isQuestionTool
104
+ };
105
+ //# sourceMappingURL=chunk-IRXAEVEQ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/tool/question-tool.ts"],"sourcesContent":["import { z } from \"zod\";\nimport type { AgentQuestionAnswer, AgentQuestionPrompt } from \"../agent/interactions\";\nimport { createTool } from \"./create-tool\";\nimport type { Tool } from \"./tool\";\n\nconst questionToolMarker = Symbol(\"anvia.question-tool\");\n\nexport const DEFAULT_QUESTION_TOOL_NAME = \"ask_user\";\n\nexport const DEFAULT_QUESTION_TOOL_DESCRIPTION = `Ask the user questions and wait for their answers before continuing.\n\nUse this tool only when you cannot continue without the user's input:\n- The request is ambiguous, and different readings would lead to clearly different results.\n- A decision belongs to the user: a preference, a tradeoff, or something that is hard to undo.\n- Information you need is missing and you cannot find it with your other tools or work it out from the conversation.\n\nDo not use it:\n- For facts you can look up with your other tools, or work out from the conversation.\n- To ask permission for routine steps the user has already asked for.\n- To check whether your answer or plan is good. Finish the work and let the user react.\n- For choices with a sensible default. Pick it, and mention the choice in your reply.\n\nHow to ask:\n- Put every question you need into one call instead of calling the tool repeatedly. Ask no more than 4 questions per call.\n- Give each question a short, unique \\`id\\` in snake_case.\n- Write \\`text\\` as one complete, self-contained question that ends with a question mark.\n- When there is a known set of reasonable answers, give 2–4 \\`choices\\` with a short \\`label\\` and a stable \\`value\\`. Make the choices mutually exclusive. If you recommend one, list it first and add \" (recommended)\" to its label.\n- Set \\`allowCustom: true\\` when the user might want an answer outside the list. Leave out \\`choices\\` for open-ended questions. Do not add an \"Other\" choice.\n\nAfter you get the answers:\n- Each answer has a \\`questionId\\` and a \\`value\\` (the chosen value or the user's free text).\n- Follow the answers. Do not ask the same question again unless an answer is unclear or contradicts another one.`;\n\nexport type QuestionToolInput = {\n questions: readonly AgentQuestionPrompt[];\n};\n\nexport type QuestionToolOutput = {\n answers: readonly AgentQuestionAnswer[];\n};\n\nexport type CreateQuestionToolOptions = {\n /** Defaults when omitted. Supply a nonblank name; explicit strings are preserved. */\n name?: string;\n /** Defaults when omitted. Supply nonblank instructions; explicit strings are preserved. */\n description?: string;\n};\n\ntype MarkedQuestionTool = Tool<QuestionToolInput, QuestionToolOutput> & {\n readonly [questionToolMarker]: true;\n};\n\nexport function createQuestionTool(\n options: CreateQuestionToolOptions = {},\n): Tool<QuestionToolInput, QuestionToolOutput> {\n const tool = createTool({\n name: options.name ?? DEFAULT_QUESTION_TOOL_NAME,\n description: options.description ?? DEFAULT_QUESTION_TOOL_DESCRIPTION,\n inputSchema: z\n .object({\n questions: z\n .array(\n z\n .object({\n id: z.string().trim().min(1, \"Question IDs must not be empty.\"),\n text: z.string().trim().min(1, \"Question text must not be empty.\"),\n choices: z\n .array(\n z\n .object({\n label: z\n .string()\n .trim()\n .min(1, \"Question choice labels must not be empty.\"),\n value: z\n .string()\n .trim()\n .min(1, \"Question choice values must not be empty.\"),\n })\n .strict(),\n )\n .min(2, \"Questions with choices must have at least 2 choices.\")\n .max(4, \"Questions must have no more than 4 choices.\")\n .superRefine((choices, context) => {\n const values = new Set<string>();\n for (const [index, choice] of choices.entries()) {\n if (values.has(choice.value)) {\n context.addIssue({\n code: \"custom\",\n message: \"Question choice values must be unique.\",\n path: [index, \"value\"],\n });\n }\n values.add(choice.value);\n }\n })\n .optional(),\n allowCustom: z.boolean().optional(),\n })\n .strict()\n .superRefine((question, context) => {\n if (question.choices === undefined && question.allowCustom === false) {\n context.addIssue({\n code: \"custom\",\n message: \"A free-text question cannot disable custom answers.\",\n path: [\"allowCustom\"],\n });\n }\n }),\n )\n .min(1, \"Provide at least 1 question.\")\n .max(4, \"Ask no more than 4 questions per call.\")\n .superRefine((questions, context) => {\n const ids = new Set<string>();\n for (const [index, question] of questions.entries()) {\n if (ids.has(question.id)) {\n context.addIssue({\n code: \"custom\",\n message: \"Question IDs must be unique.\",\n path: [index, \"id\"],\n });\n }\n ids.add(question.id);\n }\n }),\n })\n .strict(),\n execute(): never {\n throw new Error(\"Question tools can only be resolved through an Agent interaction.\");\n },\n }) as unknown as MarkedQuestionTool;\n Object.defineProperty(tool, questionToolMarker, {\n configurable: false,\n enumerable: false,\n value: true,\n writable: false,\n });\n return tool;\n}\n\nexport function isQuestionTool(tool: unknown): tool is Tool<QuestionToolInput, QuestionToolOutput> {\n return typeof tool === \"object\" && tool !== null && questionToolMarker in tool;\n}\n"],"mappings":";;;;;AAAA,SAAS,SAAS;AAKlB,IAAM,qBAAqB,uBAAO,qBAAqB;AAEhD,IAAM,6BAA6B;AAEnC,IAAM,oCAAoC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA2C1C,SAAS,mBACd,UAAqC,CAAC,GACO;AAC7C,QAAM,OAAO,WAAW;AAAA,IACtB,MAAM,QAAQ,QAAQ;AAAA,IACtB,aAAa,QAAQ,eAAe;AAAA,IACpC,aAAa,EACV,OAAO;AAAA,MACN,WAAW,EACR;AAAA,QACC,EACG,OAAO;AAAA,UACN,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,GAAG,iCAAiC;AAAA,UAC9D,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,GAAG,kCAAkC;AAAA,UACjE,SAAS,EACN;AAAA,YACC,EACG,OAAO;AAAA,cACN,OAAO,EACJ,OAAO,EACP,KAAK,EACL,IAAI,GAAG,2CAA2C;AAAA,cACrD,OAAO,EACJ,OAAO,EACP,KAAK,EACL,IAAI,GAAG,2CAA2C;AAAA,YACvD,CAAC,EACA,OAAO;AAAA,UACZ,EACC,IAAI,GAAG,sDAAsD,EAC7D,IAAI,GAAG,6CAA6C,EACpD,YAAY,CAAC,SAAS,YAAY;AACjC,kBAAM,SAAS,oBAAI,IAAY;AAC/B,uBAAW,CAAC,OAAO,MAAM,KAAK,QAAQ,QAAQ,GAAG;AAC/C,kBAAI,OAAO,IAAI,OAAO,KAAK,GAAG;AAC5B,wBAAQ,SAAS;AAAA,kBACf,MAAM;AAAA,kBACN,SAAS;AAAA,kBACT,MAAM,CAAC,OAAO,OAAO;AAAA,gBACvB,CAAC;AAAA,cACH;AACA,qBAAO,IAAI,OAAO,KAAK;AAAA,YACzB;AAAA,UACF,CAAC,EACA,SAAS;AAAA,UACZ,aAAa,EAAE,QAAQ,EAAE,SAAS;AAAA,QACpC,CAAC,EACA,OAAO,EACP,YAAY,CAAC,UAAU,YAAY;AAClC,cAAI,SAAS,YAAY,UAAa,SAAS,gBAAgB,OAAO;AACpE,oBAAQ,SAAS;AAAA,cACf,MAAM;AAAA,cACN,SAAS;AAAA,cACT,MAAM,CAAC,aAAa;AAAA,YACtB,CAAC;AAAA,UACH;AAAA,QACF,CAAC;AAAA,MACL,EACC,IAAI,GAAG,8BAA8B,EACrC,IAAI,GAAG,wCAAwC,EAC/C,YAAY,CAAC,WAAW,YAAY;AACnC,cAAM,MAAM,oBAAI,IAAY;AAC5B,mBAAW,CAAC,OAAO,QAAQ,KAAK,UAAU,QAAQ,GAAG;AACnD,cAAI,IAAI,IAAI,SAAS,EAAE,GAAG;AACxB,oBAAQ,SAAS;AAAA,cACf,MAAM;AAAA,cACN,SAAS;AAAA,cACT,MAAM,CAAC,OAAO,IAAI;AAAA,YACpB,CAAC;AAAA,UACH;AACA,cAAI,IAAI,SAAS,EAAE;AAAA,QACrB;AAAA,MACF,CAAC;AAAA,IACL,CAAC,EACA,OAAO;AAAA,IACV,UAAiB;AACf,YAAM,IAAI,MAAM,mEAAmE;AAAA,IACrF;AAAA,EACF,CAAC;AACD,SAAO,eAAe,MAAM,oBAAoB;AAAA,IAC9C,cAAc;AAAA,IACd,YAAY;AAAA,IACZ,OAAO;AAAA,IACP,UAAU;AAAA,EACZ,CAAC;AACD,SAAO;AACT;AAEO,SAAS,eAAe,MAAoE;AACjG,SAAO,OAAO,SAAS,YAAY,SAAS,QAAQ,sBAAsB;AAC5E;","names":[]}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  isToolIndex
3
- } from "./chunk-VUY2C2QD.js";
3
+ } from "./chunk-GAF5XEDA.js";
4
4
  import {
5
5
  isMcpTool
6
6
  } from "./chunk-PLDJCCVL.js";
@@ -165,4 +165,4 @@ function snapshotToolIndex(index) {
165
165
  export {
166
166
  prepareAgentTools
167
167
  };
168
- //# sourceMappingURL=chunk-L2JI2GDH.js.map
168
+ //# sourceMappingURL=chunk-IVXYLD2M.js.map
@@ -3,13 +3,13 @@ import {
3
3
  } from "./chunk-X6WS3XWL.js";
4
4
  import {
5
5
  TeamRun
6
- } from "./chunk-PLJQ4274.js";
6
+ } from "./chunk-4NGQXLJI.js";
7
7
  import {
8
8
  TeamStream
9
9
  } from "./chunk-3TAQXJBC.js";
10
10
  import {
11
11
  Agent
12
- } from "./chunk-TXWNIEZU.js";
12
+ } from "./chunk-USPZU7EM.js";
13
13
  import {
14
14
  assertPositiveSafeInteger
15
15
  } from "./chunk-NPJ2T3L5.js";
@@ -104,4 +104,4 @@ var AgentTeam = class {
104
104
  export {
105
105
  AgentTeam
106
106
  };
107
- //# sourceMappingURL=chunk-GSMLYI4Z.js.map
107
+ //# sourceMappingURL=chunk-KZYVFQYY.js.map
@@ -7,13 +7,13 @@ import {
7
7
  resolveActualText,
8
8
  resolveExpected
9
9
  } from "./chunk-ZPXOBQDS.js";
10
+ import {
11
+ EvalOutcome
12
+ } from "./chunk-EJR6VVB3.js";
10
13
  import {
11
14
  errorMessage,
12
15
  formatValue
13
16
  } from "./chunk-ZYXMWEL4.js";
14
- import {
15
- EvalOutcome
16
- } from "./chunk-EJR6VVB3.js";
17
17
  import {
18
18
  mapWithConcurrency
19
19
  } from "./chunk-4FIVU53H.js";
@@ -1113,4 +1113,4 @@ export {
1113
1113
  turnRelevancy,
1114
1114
  knowledgeRetention
1115
1115
  };
1116
- //# sourceMappingURL=chunk-GI6APIEU.js.map
1116
+ //# sourceMappingURL=chunk-R4AJ2EE3.js.map
@@ -1,12 +1,12 @@
1
+ import {
2
+ matchesVectorFilter
3
+ } from "./chunk-5WLIHNNJ.js";
1
4
  import {
2
5
  LshIndex
3
6
  } from "./chunk-ESOFEAYK.js";
4
7
  import {
5
8
  retrieveDocuments
6
9
  } from "./chunk-CB2L2NIQ.js";
7
- import {
8
- matchesVectorFilter
9
- } from "./chunk-5WLIHNNJ.js";
10
10
  import {
11
11
  cosineSimilarity
12
12
  } from "./chunk-7F53DOML.js";
@@ -233,4 +233,4 @@ export {
233
233
  InMemoryVectorStore,
234
234
  createVectorSearchTool
235
235
  };
236
- //# sourceMappingURL=chunk-Y5FHUUNC.js.map
236
+ //# sourceMappingURL=chunk-TYOIMXFR.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  AgentRun
3
- } from "./chunk-WU4ODZKR.js";
3
+ } from "./chunk-BFB7UCIR.js";
4
4
  import {
5
5
  normalizeMemoryScope
6
6
  } from "./chunk-LAIATEUB.js";
@@ -12,7 +12,7 @@ import {
12
12
  } from "./chunk-NPJ2T3L5.js";
13
13
  import {
14
14
  prepareAgentTools
15
- } from "./chunk-L2JI2GDH.js";
15
+ } from "./chunk-IVXYLD2M.js";
16
16
  import {
17
17
  getRegisteredAgentTool,
18
18
  registerAgentToolState
@@ -22,7 +22,7 @@ import {
22
22
  } from "./chunk-GLMYZ6OA.js";
23
23
  import {
24
24
  resolveAgentOptions
25
- } from "./chunk-MNWULFRX.js";
25
+ } from "./chunk-W2UT2YCM.js";
26
26
  import {
27
27
  cloneFrozenPlainData,
28
28
  snapshotAgentContext,
@@ -155,4 +155,4 @@ var Agent = class {
155
155
  export {
156
156
  Agent
157
157
  };
158
- //# sourceMappingURL=chunk-TXWNIEZU.js.map
158
+ //# sourceMappingURL=chunk-USPZU7EM.js.map
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-6BTJC3ES.js";
7
7
  import {
8
8
  isToolIndex
9
- } from "./chunk-VUY2C2QD.js";
9
+ } from "./chunk-GAF5XEDA.js";
10
10
  import {
11
11
  isMcpTool
12
12
  } from "./chunk-PLDJCCVL.js";
@@ -109,4 +109,4 @@ export {
109
109
  resolveAgentOptions,
110
110
  markResolvedAgentOptions
111
111
  };
112
- //# sourceMappingURL=chunk-MNWULFRX.js.map
112
+ //# sourceMappingURL=chunk-W2UT2YCM.js.map
@@ -1,12 +1,6 @@
1
1
  import {
2
2
  defaultEvalTraceSelector
3
3
  } from "./chunk-PHLGGRHC.js";
4
- import {
5
- errorMessage
6
- } from "./chunk-ZYXMWEL4.js";
7
- import {
8
- EvalOutcome
9
- } from "./chunk-EJR6VVB3.js";
10
4
  import {
11
5
  EvalAbortError,
12
6
  EvalTimeoutError,
@@ -14,6 +8,12 @@ import {
14
8
  createConcurrencyLimiter,
15
9
  createEvalCaseSignal
16
10
  } from "./chunk-4OSA3MMA.js";
11
+ import {
12
+ EvalOutcome
13
+ } from "./chunk-EJR6VVB3.js";
14
+ import {
15
+ errorMessage
16
+ } from "./chunk-ZYXMWEL4.js";
17
17
  import {
18
18
  Usage
19
19
  } from "./chunk-HJ6KTQTZ.js";
@@ -660,4 +660,4 @@ export {
660
660
  EvalFailFastError,
661
661
  runEvalSuite
662
662
  };
663
- //# sourceMappingURL=chunk-4IOC4SP6.js.map
663
+ //# sourceMappingURL=chunk-X4XULHDO.js.map
@@ -1,16 +1,16 @@
1
1
  import "../chunk-IPNY5MMY.js";
2
+ import {
3
+ decide,
4
+ decideBatch
5
+ } from "../chunk-WGUE44ZD.js";
2
6
  import {
3
7
  check,
4
8
  choice,
5
9
  multiLabel,
6
10
  score
7
11
  } from "../chunk-PFSWAJTY.js";
8
- import "../chunk-F2UVTXNE.js";
9
- import {
10
- decide,
11
- decideBatch
12
- } from "../chunk-WGUE44ZD.js";
13
12
  import "../chunk-BH7RLRLQ.js";
13
+ import "../chunk-F2UVTXNE.js";
14
14
  import "../chunk-547CQSO2.js";
15
15
  import {
16
16
  DecisionCapabilityError,
@@ -1,12 +1,4 @@
1
1
  import "../chunk-ERN7P6Q4.js";
2
- import {
3
- embedDocuments,
4
- embedSparseQuery,
5
- embedSparseTexts,
6
- embedText,
7
- embedTexts
8
- } from "../chunk-YCTXTOOQ.js";
9
- import "../chunk-DU4WA6LQ.js";
10
2
  import {
11
3
  angularDistance,
12
4
  chebyshevDistance,
@@ -15,6 +7,14 @@ import {
15
7
  euclideanDistance,
16
8
  manhattanDistance
17
9
  } from "../chunk-7F53DOML.js";
10
+ import {
11
+ embedDocuments,
12
+ embedSparseQuery,
13
+ embedSparseTexts,
14
+ embedText,
15
+ embedTexts
16
+ } from "../chunk-YCTXTOOQ.js";
17
+ import "../chunk-DU4WA6LQ.js";
18
18
  import "../chunk-4FIVU53H.js";
19
19
  import "../chunk-POXHJF3H.js";
20
20
  import "../chunk-USRKPEQN.js";
@@ -9,13 +9,13 @@ import {
9
9
  promptAlignment,
10
10
  summarization,
11
11
  turnRelevancy
12
- } from "../chunk-GI6APIEU.js";
12
+ } from "../chunk-R4AJ2EE3.js";
13
13
  import "../chunk-V5KBSXAJ.js";
14
14
  import "../chunk-ZPXOBQDS.js";
15
+ import "../chunk-EJR6VVB3.js";
16
+ import "../chunk-ZYXMWEL4.js";
15
17
  import "../chunk-3P3YVJ7V.js";
16
18
  import "../chunk-VCOGUS3Q.js";
17
- import "../chunk-ZYXMWEL4.js";
18
- import "../chunk-EJR6VVB3.js";
19
19
  import "../chunk-TP3MCUXS.js";
20
20
  import "../chunk-6RQYWZI3.js";
21
21
  import "../chunk-NF6WBPFG.js";
package/dist/evals/cli.js CHANGED
@@ -7,12 +7,12 @@ import {
7
7
  formatEvalResult,
8
8
  printEvalResult,
9
9
  runEvalCli
10
- } from "../chunk-GNBPXJC6.js";
11
- import "../chunk-4IOC4SP6.js";
10
+ } from "../chunk-EF26KTFU.js";
11
+ import "../chunk-X4XULHDO.js";
12
12
  import "../chunk-PHLGGRHC.js";
13
- import "../chunk-ZYXMWEL4.js";
14
- import "../chunk-EJR6VVB3.js";
15
13
  import "../chunk-4OSA3MMA.js";
14
+ import "../chunk-EJR6VVB3.js";
15
+ import "../chunk-ZYXMWEL4.js";
16
16
  import "../chunk-TP3MCUXS.js";
17
17
  import "../chunk-6RQYWZI3.js";
18
18
  import "../chunk-NF6WBPFG.js";
@@ -3,6 +3,34 @@ import {
3
3
  defineEvalCases,
4
4
  defineEvalSuite
5
5
  } from "../chunk-CX7ZVTO5.js";
6
+ import {
7
+ AgentEvalSuspensionError,
8
+ agentEvalTarget
9
+ } from "../chunk-W6V63YPY.js";
10
+ import {
11
+ EvalAssertionError,
12
+ assertEvalOutcomes,
13
+ assertEvalTotals,
14
+ defineEvalExpectations,
15
+ evalExitCode,
16
+ formatEvalResult,
17
+ printEvalResult,
18
+ runEvalCli
19
+ } from "../chunk-EF26KTFU.js";
20
+ import {
21
+ EvalFailFastError,
22
+ EvalReporterDispatchError,
23
+ runEvalSuite
24
+ } from "../chunk-X4XULHDO.js";
25
+ import {
26
+ defaultEvalTraceSelector,
27
+ projectEvalOutcome,
28
+ resolveEvalTraceRef
29
+ } from "../chunk-PHLGGRHC.js";
30
+ import {
31
+ EvalAbortError,
32
+ EvalTimeoutError
33
+ } from "../chunk-4OSA3MMA.js";
6
34
  import {
7
35
  defineMetric
8
36
  } from "../chunk-F2OKLHGB.js";
@@ -19,7 +47,7 @@ import {
19
47
  notContains,
20
48
  requiredFields,
21
49
  semanticSimilarity
22
- } from "../chunk-2K7NSWUC.js";
50
+ } from "../chunk-ET5SCES6.js";
23
51
  import {
24
52
  abstention,
25
53
  answerRelevancy,
@@ -31,53 +59,25 @@ import {
31
59
  promptAlignment,
32
60
  summarization,
33
61
  turnRelevancy
34
- } from "../chunk-GI6APIEU.js";
62
+ } from "../chunk-R4AJ2EE3.js";
35
63
  import "../chunk-V5KBSXAJ.js";
36
64
  import {
37
65
  selectEvalCaseIds,
38
66
  selectPromptOutput
39
67
  } from "../chunk-ZPXOBQDS.js";
40
- import "../chunk-3P3YVJ7V.js";
41
- import "../chunk-VCOGUS3Q.js";
42
- import {
43
- AgentEvalSuspensionError,
44
- agentEvalTarget
45
- } from "../chunk-W6V63YPY.js";
46
- import {
47
- EvalAssertionError,
48
- assertEvalOutcomes,
49
- assertEvalTotals,
50
- defineEvalExpectations,
51
- evalExitCode,
52
- formatEvalResult,
53
- printEvalResult,
54
- runEvalCli
55
- } from "../chunk-GNBPXJC6.js";
56
- import {
57
- EvalFailFastError,
58
- EvalReporterDispatchError,
59
- runEvalSuite
60
- } from "../chunk-4IOC4SP6.js";
61
- import {
62
- defaultEvalTraceSelector,
63
- projectEvalOutcome,
64
- resolveEvalTraceRef
65
- } from "../chunk-PHLGGRHC.js";
66
- import "../chunk-ZYXMWEL4.js";
67
68
  import {
68
69
  EvalOutcome
69
70
  } from "../chunk-EJR6VVB3.js";
70
- import {
71
- EvalAbortError,
72
- EvalTimeoutError
73
- } from "../chunk-4OSA3MMA.js";
71
+ import "../chunk-ZYXMWEL4.js";
72
+ import "../chunk-3P3YVJ7V.js";
73
+ import "../chunk-VCOGUS3Q.js";
74
74
  import "../chunk-TP3MCUXS.js";
75
75
  import "../chunk-6RQYWZI3.js";
76
76
  import "../chunk-NF6WBPFG.js";
77
77
  import "../chunk-ERN7P6Q4.js";
78
+ import "../chunk-7F53DOML.js";
78
79
  import "../chunk-YCTXTOOQ.js";
79
80
  import "../chunk-DU4WA6LQ.js";
80
- import "../chunk-7F53DOML.js";
81
81
  import "../chunk-4FIVU53H.js";
82
82
  import "../chunk-LGPXCJJO.js";
83
83
  import "../chunk-57AUTEQ6.js";
@@ -11,19 +11,19 @@ import {
11
11
  notContains,
12
12
  requiredFields,
13
13
  semanticSimilarity
14
- } from "../chunk-2K7NSWUC.js";
14
+ } from "../chunk-ET5SCES6.js";
15
15
  import "../chunk-ZPXOBQDS.js";
16
+ import "../chunk-EJR6VVB3.js";
17
+ import "../chunk-ZYXMWEL4.js";
16
18
  import "../chunk-3P3YVJ7V.js";
17
19
  import "../chunk-VCOGUS3Q.js";
18
- import "../chunk-ZYXMWEL4.js";
19
- import "../chunk-EJR6VVB3.js";
20
20
  import "../chunk-TP3MCUXS.js";
21
21
  import "../chunk-6RQYWZI3.js";
22
22
  import "../chunk-NF6WBPFG.js";
23
23
  import "../chunk-ERN7P6Q4.js";
24
+ import "../chunk-7F53DOML.js";
24
25
  import "../chunk-YCTXTOOQ.js";
25
26
  import "../chunk-DU4WA6LQ.js";
26
- import "../chunk-7F53DOML.js";
27
27
  import "../chunk-4FIVU53H.js";
28
28
  import "../chunk-LGPXCJJO.js";
29
29
  import "../chunk-57AUTEQ6.js";
@@ -2,11 +2,11 @@ import {
2
2
  EvalFailFastError,
3
3
  EvalReporterDispatchError,
4
4
  runEvalSuite
5
- } from "../chunk-4IOC4SP6.js";
5
+ } from "../chunk-X4XULHDO.js";
6
6
  import "../chunk-PHLGGRHC.js";
7
- import "../chunk-ZYXMWEL4.js";
8
- import "../chunk-EJR6VVB3.js";
9
7
  import "../chunk-4OSA3MMA.js";
8
+ import "../chunk-EJR6VVB3.js";
9
+ import "../chunk-ZYXMWEL4.js";
10
10
  import "../chunk-TP3MCUXS.js";
11
11
  import "../chunk-6RQYWZI3.js";
12
12
  import "../chunk-NF6WBPFG.js";
package/dist/index.d.ts CHANGED
@@ -14,7 +14,7 @@ export { Z as ZodSchema } from './zod-schema-C7F4clpm.js';
14
14
  export { loadSkills, skill } from './skills/index.js';
15
15
  export { S as SkillValidationError } from './types-CIG2loIE.js';
16
16
  export { GenerateSpeechOptions, SpeechGenerationModel, SpeechGenerationRequest, SpeechGenerationResult, generateSpeech } from './speech-generation/index.js';
17
- export { C as CreateToolOptions, c as createQuestionTool, a as createThinkTool, b as createTool } from './think-tool-DJbtUDZm.js';
17
+ export { C as CreateToolOptions, D as DEFAULT_QUESTION_TOOL_DESCRIPTION, a as DEFAULT_QUESTION_TOOL_NAME, c as createQuestionTool, b as createThinkTool, d as createTool } from './think-tool-CTuagAtn.js';
18
18
  export { A as AnyTool, T as Tool, a as ToolApprovalContext, b as ToolApprovalRequirement, c as ToolCallContext, d as ToolCallStreamEvent, e as ToolRequiresApproval } from './tool-W1cAPuRF.js';
19
19
  export { TranscribeOptions, TranscriptionAudio, TranscriptionModel, TranscriptionRequest, TranscriptionResult, transcribe } from './transcription/index.js';
20
20
  export { CheckAnswer, CheckQuestion, ChoiceAnswer, ChoiceQuestion, DecideBatchOptions, DecideOptions, DecisionAnswerFor, DecisionAnswers, DecisionBatchItem, DecisionBatchResult, DecisionCapabilities, DecisionCapabilityError, DecisionModel, DecisionOptions, DecisionProviderOutputError, DecisionQuestion, DecisionQuestionType, DecisionQuestions, DecisionRawResponseOf, DecisionRefusalError, DecisionRequest, DecisionResult, DecisionRubric, MultiLabelAnswer, MultiLabelQuestion, ScoreAnswer, ScoreQuestion, check, choice, decide, decideBatch, multiLabel, score } from './decision/index.js';