@mastra/core 0.5.0-alpha.8 → 0.5.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 (91) hide show
  1. package/dist/agent/index.cjs +3 -2100
  2. package/dist/agent/index.d.cts +1 -1
  3. package/dist/agent/index.d.ts +1 -1
  4. package/dist/agent/index.js +1 -1
  5. package/dist/{base-CTdONy0_.d.cts → base-CIPKleAU.d.cts} +103 -70
  6. package/dist/{base-DIn_km7X.d.ts → base-C_Oq53qk.d.ts} +103 -70
  7. package/dist/base.cjs +5 -140
  8. package/dist/bundler/index.cjs +5 -160
  9. package/dist/chunk-2W2GYEYQ.cjs +25 -0
  10. package/dist/chunk-3ASEZT7U.cjs +1586 -0
  11. package/dist/chunk-43Y7WG5W.cjs +335 -0
  12. package/dist/{chunk-HBHPTMAC.js → chunk-4Y74D74B.js} +46 -6
  13. package/dist/chunk-ENT7U27Y.cjs +37 -0
  14. package/dist/chunk-F5UYWPV4.cjs +14 -0
  15. package/dist/chunk-FL3GQXQ2.cjs +218 -0
  16. package/dist/chunk-FRQFWZDN.cjs +2 -0
  17. package/dist/chunk-GXQRMKSN.cjs +367 -0
  18. package/dist/chunk-HJPMYDWO.cjs +37 -0
  19. package/dist/chunk-IIWRJFLQ.cjs +51 -0
  20. package/dist/chunk-KFQ7Z3PO.cjs +347 -0
  21. package/dist/{chunk-SWDQYPJS.js → chunk-KP5UAFLN.js} +3 -2
  22. package/dist/chunk-KPKFLQFR.cjs +12 -0
  23. package/dist/{chunk-RRJB4TCC.js → chunk-MLFXOST6.js} +1 -1
  24. package/dist/{chunk-KBSR2LLT.js → chunk-OD7ZMKHY.js} +176 -63
  25. package/dist/chunk-OTFLHXHZ.cjs +65 -0
  26. package/dist/chunk-RWTSGWWL.cjs +81 -0
  27. package/dist/chunk-ST5RMVLG.cjs +87 -0
  28. package/dist/chunk-SYQ7NK2E.cjs +24 -0
  29. package/dist/chunk-UZNQG7QO.cjs +1868 -0
  30. package/dist/chunk-V5ORZPFW.cjs +38 -0
  31. package/dist/chunk-VA4P7QJT.cjs +443 -0
  32. package/dist/chunk-WB2HREXE.cjs +166 -0
  33. package/dist/chunk-WOMOGDGR.cjs +691 -0
  34. package/dist/chunk-XB2TJ7LX.cjs +408 -0
  35. package/dist/{chunk-QABMKXI3.js → chunk-XF2FMJYK.js} +1 -1
  36. package/dist/chunk-XLSROQ26.cjs +91 -0
  37. package/dist/chunk-YK3XJ52U.cjs +192 -0
  38. package/dist/{chunk-SF5GHHOQ.js → chunk-YPD6BQIM.js} +121 -93
  39. package/dist/deployer/index.cjs +5 -167
  40. package/dist/eval/index.cjs +9 -105
  41. package/dist/eval/index.d.cts +1 -1
  42. package/dist/eval/index.d.ts +1 -1
  43. package/dist/hooks/index.cjs +14 -83
  44. package/dist/index.cjs +253 -7470
  45. package/dist/index.d.cts +4 -4
  46. package/dist/index.d.ts +4 -4
  47. package/dist/index.js +7 -7
  48. package/dist/integration/index.cjs +9 -108
  49. package/dist/integration/index.d.cts +1 -1
  50. package/dist/integration/index.d.ts +1 -1
  51. package/dist/llm/index.d.cts +1 -1
  52. package/dist/llm/index.d.ts +1 -1
  53. package/dist/logger/index.cjs +33 -161
  54. package/dist/mastra/index.cjs +3 -1755
  55. package/dist/mastra/index.d.cts +1 -1
  56. package/dist/mastra/index.d.ts +1 -1
  57. package/dist/mastra/index.js +1 -1
  58. package/dist/memory/index.cjs +4 -2050
  59. package/dist/memory/index.d.cts +1 -1
  60. package/dist/memory/index.d.ts +1 -1
  61. package/dist/memory/index.js +1 -1
  62. package/dist/relevance/index.cjs +10 -2161
  63. package/dist/relevance/index.d.cts +19 -2
  64. package/dist/relevance/index.d.ts +19 -2
  65. package/dist/relevance/index.js +1 -1
  66. package/dist/storage/index.cjs +29 -367
  67. package/dist/storage/index.d.cts +1 -1
  68. package/dist/storage/index.d.ts +1 -1
  69. package/dist/storage/libsql/index.cjs +9 -798
  70. package/dist/storage/libsql/index.d.cts +1 -1
  71. package/dist/storage/libsql/index.d.ts +1 -1
  72. package/dist/telemetry/index.cjs +21 -408
  73. package/dist/telemetry/index.d.cts +1 -1
  74. package/dist/telemetry/index.d.ts +1 -1
  75. package/dist/tools/index.cjs +11 -22
  76. package/dist/tools/index.d.cts +3 -3
  77. package/dist/tools/index.d.ts +3 -3
  78. package/dist/tts/index.cjs +3 -328
  79. package/dist/utils.cjs +41 -309
  80. package/dist/utils.d.cts +10 -4
  81. package/dist/utils.d.ts +10 -4
  82. package/dist/utils.js +1 -1
  83. package/dist/vector/filter/index.cjs +7 -189
  84. package/dist/vector/index.cjs +5 -172
  85. package/dist/vector/libsql/index.cjs +9 -1047
  86. package/dist/voice/index.cjs +8 -306
  87. package/dist/workflows/index.cjs +65 -1925
  88. package/dist/workflows/index.d.cts +4 -3
  89. package/dist/workflows/index.d.ts +4 -3
  90. package/dist/workflows/index.js +1 -1
  91. package/package.json +27 -27
package/dist/index.d.cts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { M as Metric } from './types-CwTG2XyQ.cjs';
2
2
  export { a as MetricResult, T as TestInfo } from './types-CwTG2XyQ.cjs';
3
- import { T as ToolAction, A as Agent$1, h as AgentConfig, c as MastraStorage$1, b as MastraMemory$1, i as ToolExecutionContext, j as Step, W as Workflow$1, k as WorkflowOptions } from './base-CTdONy0_.cjs';
4
- export { a2 as ActionContext, a1 as BaseCondition, B as BaseStructuredOutputType, N as Config, o as CoreAssistantMessage, m as CoreMessage, n as CoreSystemMessage, C as CoreTool, q as CoreToolMessage, p as CoreUserMessage, z as DefaultLLMStreamObjectOptions, y as DefaultLLMStreamOptions, x as DefaultLLMTextObjectOptions, D as DefaultLLMTextOptions, ae as DependencyCheckOutput, s as EmbedManyResult, r as EmbedResult, E as EvalRow, ak as ExtractSchemaFromStep, an as ExtractSchemaType, al as ExtractStepResult, G as GenerateReturn, J as LLMInnerStreamOptions, K as LLMStreamObjectOptions, I as LLMStreamOptions, H as LLMTextObjectOptions, F as LLMTextOptions, L as LanguageModel, M as Mastra, Q as MemoryConfig, P as MessageResponse, f as MessageType, O as OutputType, ao as PathsToStringProps, ab as ResolverFunctionInput, ac as ResolverFunctionOutput, $ as RetryConfig, R as SharedMemoryConfig, X as StepAction, a5 as StepCondition, a6 as StepConfig, a4 as StepDef, U as StepExecutionContext, _ as StepGraph, aj as StepId, am as StepInputType, Z as StepNode, a7 as StepResult, Y as StepVariableType, S as StorageColumn, g as StorageGetMessagesArg, e as StorageThreadType, w as StreamReturn, v as StructuredOutput, u as StructuredOutputArrayItem, t as StructuredOutputType, ad as SubscriberFunctionOutput, a0 as VariableReference, V as VercelTool, a3 as WhenConditionReturnValue, ag as WorkflowActionParams, ah as WorkflowActions, af as WorkflowActors, a8 as WorkflowContext, aa as WorkflowEvent, a9 as WorkflowLogMessage, aq as WorkflowResumeResult, l as WorkflowRow, ap as WorkflowRunState, ai as WorkflowState, ar as createStep } from './base-CTdONy0_.cjs';
3
+ import { T as ToolAction, A as Agent$1, l as AgentConfig, f as MastraStorage$1, c as MastraMemory$1, m as ToolExecutionContext, S as Step, W as Workflow$1, n as WorkflowOptions } from './base-CIPKleAU.cjs';
4
+ export { a4 as ActionContext, a3 as BaseCondition, B as BaseStructuredOutputType, R as Config, r as CoreAssistantMessage, p as CoreMessage, q as CoreSystemMessage, C as CoreTool, t as CoreToolMessage, s as CoreUserMessage, I as DefaultLLMStreamObjectOptions, H as DefaultLLMStreamOptions, F as DefaultLLMTextObjectOptions, D as DefaultLLMTextOptions, ah as DependencyCheckOutput, v as EmbedManyResult, u as EmbedResult, E as EvalRow, ao as ExtractSchemaFromStep, ar as ExtractSchemaType, ap as ExtractStepResult, G as GenerateReturn, P as LLMInnerStreamOptions, Q as LLMStreamObjectOptions, N as LLMStreamOptions, K as LLMTextObjectOptions, J as LLMTextOptions, L as LanguageModel, M as Mastra, X as MemoryConfig, U as MessageResponse, j as MessageType, O as OutputType, as as PathsToStringProps, ae as ResolverFunctionInput, af as ResolverFunctionOutput, a1 as RetryConfig, Y as SharedMemoryConfig, Z as StepAction, a7 as StepCondition, a8 as StepConfig, a6 as StepDef, d as StepExecutionContext, a0 as StepGraph, an as StepId, aq as StepInputType, $ as StepNode, ai as StepResolverOutput, a9 as StepResult, _ as StepVariableType, aa as StepsRecord, h as StorageColumn, k as StorageGetMessagesArg, i as StorageThreadType, z as StreamReturn, y as StructuredOutput, x as StructuredOutputArrayItem, w as StructuredOutputType, ag as SubscriberFunctionOutput, a2 as VariableReference, V as VercelTool, a5 as WhenConditionReturnValue, ak as WorkflowActionParams, al as WorkflowActions, aj as WorkflowActors, e as WorkflowContext, ad as WorkflowEvent, ac as WorkflowLogMessage, au as WorkflowResumeResult, o as WorkflowRow, ab as WorkflowRunResult, at as WorkflowRunState, am as WorkflowState, av as createStep } from './base-CIPKleAU.cjs';
5
5
  import { M as MastraBase$1 } from './base-DboIg_Cd.cjs';
6
6
  export { O as OtelConfig, S as SamplingStrategy, T as Telemetry } from './base-DboIg_Cd.cjs';
7
7
  import { R as RegisteredLogger, a as LogLevel, T as TransportMap, L as Logger } from './index-mKY1XrpK.cjs';
@@ -15,10 +15,10 @@ import { z } from 'zod';
15
15
  import { Tool as Tool$1 } from './tools/index.cjs';
16
16
  export { createTool } from './tools/index.cjs';
17
17
  import { MastraTTS as MastraTTS$1, TTSConfig } from './tts/index.cjs';
18
- export { TagMaskOptions, createMastraProxy, deepMerge, delay, isVercelTool, jsonSchemaPropertiesToTSTypes, jsonSchemaToModel, makeCoreTool, maskStreamTags, resolveSerializedZodOutput } from './utils.cjs';
18
+ export { TagMaskOptions, createMastraProxy, deepMerge, delay, ensureToolProperties, isVercelTool, jsonSchemaPropertiesToTSTypes, jsonSchemaToModel, makeCoreTool, maskStreamTags, resolveSerializedZodOutput } from './utils.cjs';
19
19
  import { MastraVector as MastraVector$1 } from './vector/index.cjs';
20
20
  export { CreateIndexArgs, CreateIndexParams, IndexStats, ParamsToArgs, QueryResult, QueryVectorArgs, QueryVectorParams, UpsertVectorArgs, UpsertVectorParams } from './vector/index.cjs';
21
- export { getActivePathsAndStatus, getResultActivePaths, getStepResult, getSuspendedPaths, isErrorEvent, isFinalState, isTransitionEvent, isVariableReference, mergeChildValue, recursivelyCheckForFinalState, updateStepInHierarchy } from './workflows/index.cjs';
21
+ export { getActivePathsAndStatus, getResultActivePaths, getStepResult, getSuspendedPaths, isErrorEvent, isFinalState, isLimboState, isTransitionEvent, isVariableReference, mergeChildValue, recursivelyCheckForFinalState, updateStepInHierarchy } from './workflows/index.cjs';
22
22
  export { AvailableHooks, executeHook, registerHook } from './hooks/index.cjs';
23
23
  export { Message as AiMessageType } from 'ai';
24
24
  import 'sift';
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { M as Metric } from './types-CwTG2XyQ.js';
2
2
  export { a as MetricResult, T as TestInfo } from './types-CwTG2XyQ.js';
3
- import { T as ToolAction, A as Agent$1, h as AgentConfig, c as MastraStorage$1, b as MastraMemory$1, i as ToolExecutionContext, j as Step, W as Workflow$1, k as WorkflowOptions } from './base-DIn_km7X.js';
4
- export { a2 as ActionContext, a1 as BaseCondition, B as BaseStructuredOutputType, N as Config, o as CoreAssistantMessage, m as CoreMessage, n as CoreSystemMessage, C as CoreTool, q as CoreToolMessage, p as CoreUserMessage, z as DefaultLLMStreamObjectOptions, y as DefaultLLMStreamOptions, x as DefaultLLMTextObjectOptions, D as DefaultLLMTextOptions, ae as DependencyCheckOutput, s as EmbedManyResult, r as EmbedResult, E as EvalRow, ak as ExtractSchemaFromStep, an as ExtractSchemaType, al as ExtractStepResult, G as GenerateReturn, J as LLMInnerStreamOptions, K as LLMStreamObjectOptions, I as LLMStreamOptions, H as LLMTextObjectOptions, F as LLMTextOptions, L as LanguageModel, M as Mastra, Q as MemoryConfig, P as MessageResponse, f as MessageType, O as OutputType, ao as PathsToStringProps, ab as ResolverFunctionInput, ac as ResolverFunctionOutput, $ as RetryConfig, R as SharedMemoryConfig, X as StepAction, a5 as StepCondition, a6 as StepConfig, a4 as StepDef, U as StepExecutionContext, _ as StepGraph, aj as StepId, am as StepInputType, Z as StepNode, a7 as StepResult, Y as StepVariableType, S as StorageColumn, g as StorageGetMessagesArg, e as StorageThreadType, w as StreamReturn, v as StructuredOutput, u as StructuredOutputArrayItem, t as StructuredOutputType, ad as SubscriberFunctionOutput, a0 as VariableReference, V as VercelTool, a3 as WhenConditionReturnValue, ag as WorkflowActionParams, ah as WorkflowActions, af as WorkflowActors, a8 as WorkflowContext, aa as WorkflowEvent, a9 as WorkflowLogMessage, aq as WorkflowResumeResult, l as WorkflowRow, ap as WorkflowRunState, ai as WorkflowState, ar as createStep } from './base-DIn_km7X.js';
3
+ import { T as ToolAction, A as Agent$1, l as AgentConfig, f as MastraStorage$1, c as MastraMemory$1, m as ToolExecutionContext, S as Step, W as Workflow$1, n as WorkflowOptions } from './base-C_Oq53qk.js';
4
+ export { a4 as ActionContext, a3 as BaseCondition, B as BaseStructuredOutputType, R as Config, r as CoreAssistantMessage, p as CoreMessage, q as CoreSystemMessage, C as CoreTool, t as CoreToolMessage, s as CoreUserMessage, I as DefaultLLMStreamObjectOptions, H as DefaultLLMStreamOptions, F as DefaultLLMTextObjectOptions, D as DefaultLLMTextOptions, ah as DependencyCheckOutput, v as EmbedManyResult, u as EmbedResult, E as EvalRow, ao as ExtractSchemaFromStep, ar as ExtractSchemaType, ap as ExtractStepResult, G as GenerateReturn, P as LLMInnerStreamOptions, Q as LLMStreamObjectOptions, N as LLMStreamOptions, K as LLMTextObjectOptions, J as LLMTextOptions, L as LanguageModel, M as Mastra, X as MemoryConfig, U as MessageResponse, j as MessageType, O as OutputType, as as PathsToStringProps, ae as ResolverFunctionInput, af as ResolverFunctionOutput, a1 as RetryConfig, Y as SharedMemoryConfig, Z as StepAction, a7 as StepCondition, a8 as StepConfig, a6 as StepDef, d as StepExecutionContext, a0 as StepGraph, an as StepId, aq as StepInputType, $ as StepNode, ai as StepResolverOutput, a9 as StepResult, _ as StepVariableType, aa as StepsRecord, h as StorageColumn, k as StorageGetMessagesArg, i as StorageThreadType, z as StreamReturn, y as StructuredOutput, x as StructuredOutputArrayItem, w as StructuredOutputType, ag as SubscriberFunctionOutput, a2 as VariableReference, V as VercelTool, a5 as WhenConditionReturnValue, ak as WorkflowActionParams, al as WorkflowActions, aj as WorkflowActors, e as WorkflowContext, ad as WorkflowEvent, ac as WorkflowLogMessage, au as WorkflowResumeResult, o as WorkflowRow, ab as WorkflowRunResult, at as WorkflowRunState, am as WorkflowState, av as createStep } from './base-C_Oq53qk.js';
5
5
  import { M as MastraBase$1 } from './base-BZViaFTt.js';
6
6
  export { O as OtelConfig, S as SamplingStrategy, T as Telemetry } from './base-BZViaFTt.js';
7
7
  import { R as RegisteredLogger, a as LogLevel, T as TransportMap, L as Logger } from './index-mKY1XrpK.js';
@@ -15,10 +15,10 @@ import { z } from 'zod';
15
15
  import { Tool as Tool$1 } from './tools/index.js';
16
16
  export { createTool } from './tools/index.js';
17
17
  import { MastraTTS as MastraTTS$1, TTSConfig } from './tts/index.js';
18
- export { TagMaskOptions, createMastraProxy, deepMerge, delay, isVercelTool, jsonSchemaPropertiesToTSTypes, jsonSchemaToModel, makeCoreTool, maskStreamTags, resolveSerializedZodOutput } from './utils.js';
18
+ export { TagMaskOptions, createMastraProxy, deepMerge, delay, ensureToolProperties, isVercelTool, jsonSchemaPropertiesToTSTypes, jsonSchemaToModel, makeCoreTool, maskStreamTags, resolveSerializedZodOutput } from './utils.js';
19
19
  import { MastraVector as MastraVector$1 } from './vector/index.js';
20
20
  export { CreateIndexArgs, CreateIndexParams, IndexStats, ParamsToArgs, QueryResult, QueryVectorArgs, QueryVectorParams, UpsertVectorArgs, UpsertVectorParams } from './vector/index.js';
21
- export { getActivePathsAndStatus, getResultActivePaths, getStepResult, getSuspendedPaths, isErrorEvent, isFinalState, isTransitionEvent, isVariableReference, mergeChildValue, recursivelyCheckForFinalState, updateStepInHierarchy } from './workflows/index.js';
21
+ export { getActivePathsAndStatus, getResultActivePaths, getStepResult, getSuspendedPaths, isErrorEvent, isFinalState, isLimboState, isTransitionEvent, isVariableReference, mergeChildValue, recursivelyCheckForFinalState, updateStepInHierarchy } from './workflows/index.js';
22
22
  export { AvailableHooks, executeHook, registerHook } from './hooks/index.js';
23
23
  export { Message as AiMessageType } from 'ai';
24
24
  import 'sift';
package/dist/index.js CHANGED
@@ -1,15 +1,15 @@
1
1
  import { MastraTTS } from './chunk-CLJYFFOS.js';
2
- import { Workflow } from './chunk-KBSR2LLT.js';
3
- export { Step, WhenConditionReturnValue, createStep, getActivePathsAndStatus, getResultActivePaths, getStepResult, getSuspendedPaths, isErrorEvent, isFinalState, isTransitionEvent, isVariableReference, mergeChildValue, recursivelyCheckForFinalState, updateStepInHierarchy } from './chunk-KBSR2LLT.js';
2
+ import { Workflow } from './chunk-OD7ZMKHY.js';
3
+ export { Step, WhenConditionReturnValue, createStep, getActivePathsAndStatus, getResultActivePaths, getStepResult, getSuspendedPaths, isErrorEvent, isFinalState, isLimboState, isTransitionEvent, isVariableReference, mergeChildValue, recursivelyCheckForFinalState, updateStepInHierarchy } from './chunk-OD7ZMKHY.js';
4
4
  import { Integration, OpenAPIToolset } from './chunk-PNZK456O.js';
5
- export { Mastra } from './chunk-SF5GHHOQ.js';
6
- import { MastraMemory } from './chunk-RRJB4TCC.js';
5
+ export { Mastra } from './chunk-YPD6BQIM.js';
6
+ import { MastraMemory } from './chunk-MLFXOST6.js';
7
7
  import { MastraVector } from './chunk-QLYZGX5Z.js';
8
- export { CohereRelevanceScorer, MastraAgentRelevanceScorer, createSimilarityPrompt } from './chunk-QABMKXI3.js';
8
+ export { CohereRelevanceScorer, MastraAgentRelevanceScorer, createSimilarityPrompt } from './chunk-XF2FMJYK.js';
9
9
  import { MastraStorage } from './chunk-7TZAPEAT.js';
10
- import { Agent } from './chunk-SWDQYPJS.js';
10
+ import { Agent } from './chunk-KP5UAFLN.js';
11
11
  export { InstrumentClass, OTLPTraceExporter as OTLPStorageExporter, Telemetry, hasActiveTelemetry, withSpan } from './chunk-W5HVJX45.js';
12
- export { createMastraProxy, deepMerge, delay, isVercelTool, jsonSchemaPropertiesToTSTypes, jsonSchemaToModel, makeCoreTool, maskStreamTags, resolveSerializedZodOutput } from './chunk-HBHPTMAC.js';
12
+ export { createMastraProxy, deepMerge, delay, ensureToolProperties, isVercelTool, jsonSchemaPropertiesToTSTypes, jsonSchemaToModel, makeCoreTool, maskStreamTags, resolveSerializedZodOutput } from './chunk-4Y74D74B.js';
13
13
  import { Tool } from './chunk-ZINPRHAN.js';
14
14
  export { createTool } from './chunk-ZINPRHAN.js';
15
15
  import { MastraDeployer } from './chunk-6PNJOPFO.js';
@@ -1,113 +1,14 @@
1
1
  'use strict';
2
2
 
3
- var zod = require('zod');
3
+ var chunkXLSROQ26_cjs = require('../chunk-XLSROQ26.cjs');
4
4
 
5
- // src/integration/integration.ts
6
- var Integration = class {
7
- name = "Integration";
8
- workflows;
9
- constructor() {
10
- this.workflows = {};
11
- }
12
- /**
13
- * Workflows
14
- */
15
- registerWorkflow(name, fn) {
16
- if (this.workflows[name]) {
17
- throw new Error(`Sync function "${name}" already registered`);
18
- }
19
- this.workflows[name] = fn;
20
- }
21
- getWorkflows({ serialized }) {
22
- if (serialized) {
23
- return Object.entries(this.workflows).reduce((acc, [k, v]) => {
24
- return {
25
- ...acc,
26
- [k]: {
27
- name: v.name
28
- }
29
- };
30
- }, {});
31
- }
32
- return this.workflows;
33
- }
34
- /**
35
- * TOOLS
36
- */
37
- getStaticTools(_params) {
38
- throw new Error("Method not implemented.");
39
- }
40
- async getTools(_params) {
41
- throw new Error("Method not implemented.");
42
- }
43
- async getApiClient() {
44
- throw new Error("Method not implemented");
45
- }
46
- };
47
5
 
48
- // src/tools/tool.ts
49
- var Tool = class {
50
- id;
51
- description;
52
- inputSchema;
53
- outputSchema;
54
- execute;
55
- mastra;
56
- constructor(opts) {
57
- this.id = opts.id;
58
- this.description = opts.description;
59
- this.inputSchema = opts.inputSchema;
60
- this.outputSchema = opts.outputSchema;
61
- this.execute = opts.execute;
62
- this.mastra = opts.mastra;
63
- }
64
- };
65
- function createTool(opts) {
66
- return new Tool(opts);
67
- }
68
6
 
69
- // src/integration/openapi-toolset.ts
70
- var OpenAPIToolset = class {
71
- authType = "API_KEY";
72
- constructor() {
73
- }
74
- get toolSchemas() {
75
- return {};
76
- }
77
- get toolDocumentations() {
78
- return {};
79
- }
80
- get baseClient() {
81
- return {};
82
- }
83
- async getApiClient() {
84
- throw new Error("API not implemented");
85
- }
86
- _generateIntegrationTools() {
87
- const { client, ...clientMethods } = this.baseClient;
88
- const schemas = this.toolSchemas;
89
- const documentations = this.toolDocumentations;
90
- const tools = Object.keys(clientMethods).reduce((acc, key) => {
91
- const comment = documentations[key]?.comment;
92
- const fallbackComment = `Execute ${key}`;
93
- const tool = createTool({
94
- id: key,
95
- inputSchema: schemas[key] || zod.z.object({}),
96
- description: comment || fallbackComment,
97
- // documentation: doc || fallbackComment,
98
- execute: async ({ context }) => {
99
- const client2 = await this.getApiClient();
100
- const value = client2[key];
101
- return value({
102
- ...context
103
- });
104
- }
105
- });
106
- return { ...acc, [key]: tool };
107
- }, {});
108
- return tools;
109
- }
110
- };
111
-
112
- exports.Integration = Integration;
113
- exports.OpenAPIToolset = OpenAPIToolset;
7
+ Object.defineProperty(exports, "Integration", {
8
+ enumerable: true,
9
+ get: function () { return chunkXLSROQ26_cjs.Integration; }
10
+ });
11
+ Object.defineProperty(exports, "OpenAPIToolset", {
12
+ enumerable: true,
13
+ get: function () { return chunkXLSROQ26_cjs.OpenAPIToolset; }
14
+ });
@@ -1,5 +1,5 @@
1
1
  import '../base-DboIg_Cd.cjs';
2
- import { W as Workflow, T as ToolAction } from '../base-CTdONy0_.cjs';
2
+ import { W as Workflow, T as ToolAction } from '../base-CIPKleAU.cjs';
3
3
  import '@opentelemetry/api';
4
4
  import '../index-mKY1XrpK.cjs';
5
5
  import 'stream';
@@ -1,5 +1,5 @@
1
1
  import '../base-BZViaFTt.js';
2
- import { W as Workflow, T as ToolAction } from '../base-DIn_km7X.js';
2
+ import { W as Workflow, T as ToolAction } from '../base-C_Oq53qk.js';
3
3
  import '@opentelemetry/api';
4
4
  import '../index-mKY1XrpK.js';
5
5
  import 'stream';
@@ -1,7 +1,7 @@
1
1
  import 'ai';
2
2
  import 'json-schema';
3
3
  import 'zod';
4
- export { B as BaseStructuredOutputType, o as CoreAssistantMessage, m as CoreMessage, n as CoreSystemMessage, q as CoreToolMessage, p as CoreUserMessage, z as DefaultLLMStreamObjectOptions, y as DefaultLLMStreamOptions, x as DefaultLLMTextObjectOptions, D as DefaultLLMTextOptions, s as EmbedManyResult, r as EmbedResult, G as GenerateReturn, J as LLMInnerStreamOptions, K as LLMStreamObjectOptions, I as LLMStreamOptions, H as LLMTextObjectOptions, F as LLMTextOptions, L as LanguageModel, O as OutputType, w as StreamReturn, v as StructuredOutput, u as StructuredOutputArrayItem, t as StructuredOutputType } from '../base-CTdONy0_.cjs';
4
+ export { B as BaseStructuredOutputType, r as CoreAssistantMessage, p as CoreMessage, q as CoreSystemMessage, t as CoreToolMessage, s as CoreUserMessage, I as DefaultLLMStreamObjectOptions, H as DefaultLLMStreamOptions, F as DefaultLLMTextObjectOptions, D as DefaultLLMTextOptions, v as EmbedManyResult, u as EmbedResult, G as GenerateReturn, P as LLMInnerStreamOptions, Q as LLMStreamObjectOptions, N as LLMStreamOptions, K as LLMTextObjectOptions, J as LLMTextOptions, L as LanguageModel, O as OutputType, z as StreamReturn, y as StructuredOutput, x as StructuredOutputArrayItem, w as StructuredOutputType } from '../base-CIPKleAU.cjs';
5
5
  import '../index-mKY1XrpK.cjs';
6
6
  import '../base-DboIg_Cd.cjs';
7
7
  import '@opentelemetry/api';
@@ -1,7 +1,7 @@
1
1
  import 'ai';
2
2
  import 'json-schema';
3
3
  import 'zod';
4
- export { B as BaseStructuredOutputType, o as CoreAssistantMessage, m as CoreMessage, n as CoreSystemMessage, q as CoreToolMessage, p as CoreUserMessage, z as DefaultLLMStreamObjectOptions, y as DefaultLLMStreamOptions, x as DefaultLLMTextObjectOptions, D as DefaultLLMTextOptions, s as EmbedManyResult, r as EmbedResult, G as GenerateReturn, J as LLMInnerStreamOptions, K as LLMStreamObjectOptions, I as LLMStreamOptions, H as LLMTextObjectOptions, F as LLMTextOptions, L as LanguageModel, O as OutputType, w as StreamReturn, v as StructuredOutput, u as StructuredOutputArrayItem, t as StructuredOutputType } from '../base-DIn_km7X.js';
4
+ export { B as BaseStructuredOutputType, r as CoreAssistantMessage, p as CoreMessage, q as CoreSystemMessage, t as CoreToolMessage, s as CoreUserMessage, I as DefaultLLMStreamObjectOptions, H as DefaultLLMStreamOptions, F as DefaultLLMTextObjectOptions, D as DefaultLLMTextOptions, v as EmbedManyResult, u as EmbedResult, G as GenerateReturn, P as LLMInnerStreamOptions, Q as LLMStreamObjectOptions, N as LLMStreamOptions, K as LLMTextObjectOptions, J as LLMTextOptions, L as LanguageModel, O as OutputType, z as StreamReturn, y as StructuredOutput, x as StructuredOutputArrayItem, w as StructuredOutputType } from '../base-C_Oq53qk.js';
5
5
  import '../index-mKY1XrpK.js';
6
6
  import '../base-BZViaFTt.js';
7
7
  import '@opentelemetry/api';
@@ -1,166 +1,38 @@
1
1
  'use strict';
2
2
 
3
- var stream = require('stream');
4
- var pino = require('pino');
5
- var pretty = require('pino-pretty');
3
+ var chunkWB2HREXE_cjs = require('../chunk-WB2HREXE.cjs');
6
4
 
7
- function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
8
5
 
9
- var pino__default = /*#__PURE__*/_interopDefault(pino);
10
- var pretty__default = /*#__PURE__*/_interopDefault(pretty);
11
6
 
12
- // src/logger/index.ts
13
- var RegisteredLogger = {
14
- AGENT: "AGENT",
15
- WORKFLOW: "WORKFLOW",
16
- LLM: "LLM",
17
- TTS: "TTS",
18
- VOICE: "VOICE",
19
- VECTOR: "VECTOR",
20
- BUNDLER: "BUNDLER",
21
- DEPLOYER: "DEPLOYER",
22
- MEMORY: "MEMORY",
23
- STORAGE: "STORAGE",
24
- EMBEDDINGS: "EMBEDDINGS"
25
- };
26
- var LogLevel = {
27
- DEBUG: "debug",
28
- INFO: "info",
29
- WARN: "warn",
30
- ERROR: "error",
31
- NONE: "silent"
32
- };
33
- var LoggerTransport = class extends stream.Transform {
34
- constructor(opts = {}) {
35
- super({ ...opts, objectMode: true });
36
- }
37
- async getLogsByRunId(_args) {
38
- return [];
39
- }
40
- async getLogs() {
41
- return [];
42
- }
43
- };
44
- var Logger = class {
45
- logger;
46
- transports;
47
- constructor(options = {}) {
48
- this.transports = options.transports || {};
49
- const transportsAry = Object.entries(this.transports);
50
- this.logger = pino__default.default(
51
- {
52
- name: options.name || "app",
53
- level: options.level || LogLevel.INFO,
54
- formatters: {
55
- level: (label) => {
56
- return {
57
- level: label
58
- };
59
- }
60
- }
61
- },
62
- options.overrideDefaultTransports ? options?.transports?.default : transportsAry.length === 0 ? pretty__default.default({
63
- colorize: true,
64
- levelFirst: true,
65
- ignore: "pid,hostname",
66
- colorizeObjects: true,
67
- translateTime: "SYS:standard",
68
- singleLine: false
69
- }) : pino__default.default.multistream([
70
- ...transportsAry.map(([_, transport]) => ({
71
- stream: transport,
72
- level: options.level || LogLevel.INFO
73
- })),
74
- {
75
- stream: pretty__default.default({
76
- colorize: true,
77
- levelFirst: true,
78
- ignore: "pid,hostname",
79
- colorizeObjects: true,
80
- translateTime: "SYS:standard",
81
- singleLine: false
82
- }),
83
- level: options.level || LogLevel.INFO
84
- }
85
- ])
86
- );
87
- }
88
- debug(message, args = {}) {
89
- this.logger.debug(args, message);
90
- }
91
- info(message, args = {}) {
92
- this.logger.info(args, message);
93
- }
94
- warn(message, args = {}) {
95
- this.logger.warn(args, message);
96
- }
97
- error(message, args = {}) {
98
- this.logger.error(args, message);
99
- }
100
- // Stream creation for process output handling
101
- createStream() {
102
- return new stream.Transform({
103
- transform: (chunk, _encoding, callback) => {
104
- const line = chunk.toString().trim();
105
- if (line) {
106
- this.info(line);
107
- }
108
- callback(null, chunk);
109
- }
110
- });
111
- }
112
- async getLogs(transportId) {
113
- if (!transportId || !this.transports[transportId]) {
114
- return [];
115
- }
116
- return this.transports[transportId].getLogs();
117
- }
118
- async getLogsByRunId({ runId, transportId }) {
119
- return this.transports[transportId]?.getLogsByRunId({ runId });
120
- }
121
- };
122
- function createLogger(options) {
123
- return new Logger(options);
124
- }
125
- var MultiLogger = class {
126
- loggers;
127
- constructor(loggers) {
128
- this.loggers = loggers;
129
- }
130
- debug(message, ...args) {
131
- this.loggers.forEach((logger) => logger.debug(message, ...args));
132
- }
133
- info(message, ...args) {
134
- this.loggers.forEach((logger) => logger.info(message, ...args));
135
- }
136
- warn(message, ...args) {
137
- this.loggers.forEach((logger) => logger.warn(message, ...args));
138
- }
139
- error(message, ...args) {
140
- this.loggers.forEach((logger) => logger.error(message, ...args));
141
- }
142
- };
143
- function combineLoggers(loggers) {
144
- return new MultiLogger(loggers);
145
- }
146
- var noopLogger = {
147
- debug: () => {
148
- },
149
- info: () => {
150
- },
151
- warn: () => {
152
- },
153
- error: () => {
154
- },
155
- cleanup: async () => {
156
- }
157
- };
158
-
159
- exports.LogLevel = LogLevel;
160
- exports.Logger = Logger;
161
- exports.LoggerTransport = LoggerTransport;
162
- exports.MultiLogger = MultiLogger;
163
- exports.RegisteredLogger = RegisteredLogger;
164
- exports.combineLoggers = combineLoggers;
165
- exports.createLogger = createLogger;
166
- exports.noopLogger = noopLogger;
7
+ Object.defineProperty(exports, "LogLevel", {
8
+ enumerable: true,
9
+ get: function () { return chunkWB2HREXE_cjs.LogLevel; }
10
+ });
11
+ Object.defineProperty(exports, "Logger", {
12
+ enumerable: true,
13
+ get: function () { return chunkWB2HREXE_cjs.Logger; }
14
+ });
15
+ Object.defineProperty(exports, "LoggerTransport", {
16
+ enumerable: true,
17
+ get: function () { return chunkWB2HREXE_cjs.LoggerTransport; }
18
+ });
19
+ Object.defineProperty(exports, "MultiLogger", {
20
+ enumerable: true,
21
+ get: function () { return chunkWB2HREXE_cjs.MultiLogger; }
22
+ });
23
+ Object.defineProperty(exports, "RegisteredLogger", {
24
+ enumerable: true,
25
+ get: function () { return chunkWB2HREXE_cjs.RegisteredLogger; }
26
+ });
27
+ Object.defineProperty(exports, "combineLoggers", {
28
+ enumerable: true,
29
+ get: function () { return chunkWB2HREXE_cjs.combineLoggers; }
30
+ });
31
+ Object.defineProperty(exports, "createLogger", {
32
+ enumerable: true,
33
+ get: function () { return chunkWB2HREXE_cjs.createLogger; }
34
+ });
35
+ Object.defineProperty(exports, "noopLogger", {
36
+ enumerable: true,
37
+ get: function () { return chunkWB2HREXE_cjs.noopLogger; }
38
+ });