@sowonai/crewx-sdk 0.8.0-rc.44 → 0.8.0-rc.46
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.
- package/dist/core/providers/provider-factory.js +2 -2
- package/dist/core/providers/provider-factory.js.map +1 -1
- package/package.json +1 -1
- package/dist/adapters/MastraToolAdapter.d.ts +0 -9
- package/dist/adapters/MastraToolAdapter.js +0 -66
- package/dist/adapters/MastraToolAdapter.js.map +0 -1
- package/dist/core/providers/MastraAPIProvider.d.ts +0 -31
- package/dist/core/providers/MastraAPIProvider.js +0 -365
- package/dist/core/providers/MastraAPIProvider.js.map +0 -1
- package/dist/tools/file-system.service.d.ts +0 -10
- package/dist/tools/file-system.service.js +0 -33
- package/dist/tools/file-system.service.js.map +0 -1
- package/dist/tools/find.tool.d.ts +0 -21
- package/dist/tools/find.tool.js +0 -139
- package/dist/tools/find.tool.js.map +0 -1
- package/dist/tools/glob.tool.d.ts +0 -24
- package/dist/tools/glob.tool.js +0 -153
- package/dist/tools/glob.tool.js.map +0 -1
- package/dist/tools/grep.tool.d.ts +0 -1
- package/dist/tools/grep.tool.js +0 -137
- package/dist/tools/grep.tool.js.map +0 -1
- package/dist/tools/index.d.ts +0 -12
- package/dist/tools/index.js +0 -40
- package/dist/tools/index.js.map +0 -1
- package/dist/tools/ls.tool.d.ts +0 -1
- package/dist/tools/ls.tool.js +0 -94
- package/dist/tools/ls.tool.js.map +0 -1
- package/dist/tools/read-file.tool.d.ts +0 -1
- package/dist/tools/read-file.tool.js +0 -69
- package/dist/tools/read-file.tool.js.map +0 -1
- package/dist/tools/replace.tool.d.ts +0 -1
- package/dist/tools/replace.tool.js +0 -68
- package/dist/tools/replace.tool.js.map +0 -1
- package/dist/tools/run-shell-command.tool.d.ts +0 -1
- package/dist/tools/run-shell-command.tool.js +0 -64
- package/dist/tools/run-shell-command.tool.js.map +0 -1
- package/dist/tools/tree.tool.d.ts +0 -1
- package/dist/tools/tree.tool.js +0 -109
- package/dist/tools/tree.tool.js.map +0 -1
- package/dist/tools/types.d.ts +0 -42
- package/dist/tools/types.js +0 -13
- package/dist/tools/types.js.map +0 -1
- package/dist/tools/utils/file-utils.d.ts +0 -5
- package/dist/tools/utils/file-utils.js +0 -221
- package/dist/tools/utils/file-utils.js.map +0 -1
- package/dist/tools/write-file.tool.d.ts +0 -1
- package/dist/tools/write-file.tool.js +0 -55
- package/dist/tools/write-file.tool.js.map +0 -1
|
@@ -6,7 +6,6 @@ const claude_provider_1 = require("./claude.provider");
|
|
|
6
6
|
const gemini_provider_1 = require("./gemini.provider");
|
|
7
7
|
const copilot_provider_1 = require("./copilot.provider");
|
|
8
8
|
const codex_provider_1 = require("./codex.provider");
|
|
9
|
-
const MastraAPIProvider_1 = require("./MastraAPIProvider");
|
|
10
9
|
const BUILTIN_PROVIDER_MAP = {
|
|
11
10
|
[ai_provider_interface_1.BuiltInProviders.CLAUDE]: () => new claude_provider_1.ClaudeProvider(),
|
|
12
11
|
[ai_provider_interface_1.BuiltInProviders.GEMINI]: () => new gemini_provider_1.GeminiProvider(),
|
|
@@ -45,7 +44,8 @@ function createAPIProvider(config) {
|
|
|
45
44
|
tools: config.tools,
|
|
46
45
|
mcp: config.mcp,
|
|
47
46
|
};
|
|
48
|
-
|
|
47
|
+
const { MastraAPIProvider } = require('./MastraAPIProvider');
|
|
48
|
+
return new MastraAPIProvider(apiConfig);
|
|
49
49
|
}
|
|
50
50
|
async function createProviderFromConfig(config) {
|
|
51
51
|
const key = `${config.namespace}/${config.id}`.toLowerCase();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider-factory.js","sourceRoot":"","sources":["../../../src/core/providers/provider-factory.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"provider-factory.js","sourceRoot":"","sources":["../../../src/core/providers/provider-factory.ts"],"names":[],"mappings":";;AA8EA,4DAwBC;AAtGD,mEAA4E;AAC5E,uDAAmD;AACnD,uDAAmD;AACnD,y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,EAAG,MAAc,CAAC,GAAG;QACxB,WAAW,EAAG,MAAc,CAAC,WAAW;QACxC,SAAS,EAAG,MAAc,CAAC,SAAS;QACpC,KAAK,EAAG,MAAc,CAAC,KAAK;QAC5B,GAAG,EAAG,MAAc,CAAC,GAAG;KACzB,CAAC;IAIF,MAAM,EAAE,iBAAiB,EAAE,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAAC;IAC7D,OAAO,IAAI,iBAAiB,CAAC,SAAS,CAAC,CAAC;AAC1C,CAAC;AASM,KAAK,UAAU,wBAAwB,CAAC,MAAsB;IACnE,MAAM,GAAG,GAAG,GAAG,MAAM,CAAC,SAAS,IAAI,MAAM,CAAC,EAAE,EAAE,CAAC,WAAW,EAAE,CAAC;IAG7D,IAAI,MAAM,CAAC,SAAS,KAAK,KAAK,EAAE,CAAC;QAC/B,OAAO,iBAAiB,CAAC,MAAM,CAAC,CAAC;IACnC,CAAC;IAGD,MAAM,OAAO,GAAG,oBAAoB,CAAC,GAAG,CAAC,CAAC;IAC1C,IAAI,OAAO,EAAE,CAAC;QACZ,OAAO,OAAO,EAAE,CAAC;IACnB,CAAC;IAED,IAAI,MAAM,CAAC,SAAS,KAAK,QAAQ,IAAI,MAAM,CAAC,SAAS,KAAK,QAAQ,EAAE,CAAC;QACnE,MAAM,IAAI,KAAK,CACb,qBAAqB,GAAG,0BAA0B;YAChD,sEAAsE,CACzE,CAAC;IACJ,CAAC;IAED,MAAM,IAAI,KAAK,CACb,qBAAqB,GAAG,2BAA2B,MAAM,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAClG,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { FrameworkToolDefinition, ToolExecutionContext } from '../types/api-provider.types';
|
|
2
|
-
export declare class MastraToolAdapter {
|
|
3
|
-
static convertTools(crewxTools: any[], _context: ToolExecutionContext): Record<string, any>;
|
|
4
|
-
static convertTool(crewxTool: FrameworkToolDefinition, context: ToolExecutionContext): any;
|
|
5
|
-
private static executeWithContext;
|
|
6
|
-
private static convertParameters;
|
|
7
|
-
static validateTool(tool: any): tool is FrameworkToolDefinition;
|
|
8
|
-
static createMinimalContext(agentId: string, provider: string, model: string): ToolExecutionContext;
|
|
9
|
-
}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MastraToolAdapter = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
class MastraToolAdapter {
|
|
6
|
-
static convertTools(crewxTools, _context) {
|
|
7
|
-
const mastraTools = {};
|
|
8
|
-
for (const tool of crewxTools) {
|
|
9
|
-
const toolId = tool.id || tool.name;
|
|
10
|
-
mastraTools[toolId] = tool;
|
|
11
|
-
}
|
|
12
|
-
return mastraTools;
|
|
13
|
-
}
|
|
14
|
-
static convertTool(crewxTool, context) {
|
|
15
|
-
return {
|
|
16
|
-
description: crewxTool.description,
|
|
17
|
-
parameters: this.convertParameters(crewxTool.parameters),
|
|
18
|
-
execute: async (args) => {
|
|
19
|
-
return this.executeWithContext(crewxTool, args, context);
|
|
20
|
-
},
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
static async executeWithContext(crewxTool, args, context) {
|
|
24
|
-
try {
|
|
25
|
-
const result = await crewxTool.execute(args, context);
|
|
26
|
-
return result;
|
|
27
|
-
}
|
|
28
|
-
catch (error) {
|
|
29
|
-
const errorMessage = error.message || 'Unknown error during tool execution';
|
|
30
|
-
const toolName = crewxTool.name;
|
|
31
|
-
throw new Error(`Tool '${toolName}' execution failed: ${errorMessage}`);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
static convertParameters(params) {
|
|
35
|
-
if (params && typeof params.parse === 'function') {
|
|
36
|
-
return params;
|
|
37
|
-
}
|
|
38
|
-
return zod_1.z.object({});
|
|
39
|
-
}
|
|
40
|
-
static validateTool(tool) {
|
|
41
|
-
if (!tool)
|
|
42
|
-
return false;
|
|
43
|
-
if (typeof tool.name !== 'string' || tool.name.length === 0)
|
|
44
|
-
return false;
|
|
45
|
-
if (typeof tool.description !== 'string')
|
|
46
|
-
return false;
|
|
47
|
-
if (typeof tool.execute !== 'function')
|
|
48
|
-
return false;
|
|
49
|
-
return true;
|
|
50
|
-
}
|
|
51
|
-
static createMinimalContext(agentId, provider, model) {
|
|
52
|
-
return {
|
|
53
|
-
agent: {
|
|
54
|
-
id: agentId,
|
|
55
|
-
provider,
|
|
56
|
-
model,
|
|
57
|
-
},
|
|
58
|
-
env: {},
|
|
59
|
-
vars: {},
|
|
60
|
-
mode: 'query',
|
|
61
|
-
platform: 'api',
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
exports.MastraToolAdapter = MastraToolAdapter;
|
|
66
|
-
//# sourceMappingURL=MastraToolAdapter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MastraToolAdapter.js","sourceRoot":"","sources":["../../src/adapters/MastraToolAdapter.ts"],"names":[],"mappings":";;;AAgBA,6BAAwB;AAuBxB,MAAa,iBAAiB;IAkB5B,MAAM,CAAC,YAAY,CACjB,UAAiB,EACjB,QAA8B;QAE9B,MAAM,WAAW,GAAwB,EAAE,CAAC;QAE5C,KAAK,MAAM,IAAI,IAAI,UAAU,EAAE,CAAC;YAG9B,MAAM,MAAM,GAAG,IAAI,CAAC,EAAE,IAAI,IAAI,CAAC,IAAI,CAAC;YACpC,WAAW,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;QAC7B,CAAC;QAED,OAAO,WAAW,CAAC;IACrB,CAAC;IA0BD,MAAM,CAAC,WAAW,CAChB,SAAkC,EAClC,OAA6B;QAE7B,OAAO;YACL,WAAW,EAAE,SAAS,CAAC,WAAW;YAClC,UAAU,EAAE,IAAI,CAAC,iBAAiB,CAAC,SAAS,CAAC,UAAU,CAAC;YACxD,OAAO,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M,CAAC,oBAAoB,CACzB,OAAe,EACf,QAAgB,EAChB,KAAa;QAEb,OAAO;YACL,KAAK,EAAE;gBACL,EAAE,EAAE,OAAO;gBACX,QAAQ;gBACR,KAAK;aACN;YACD,GAAG,EAAE,EAAE;YACP,IAAI,EAAE,EAAE;YACR,IAAI,EAAE,OAAO;YACb,QAAQ,EAAE,KAAK;SAChB,CAAC;IACJ,CAAC;CACF;AA1ND,8CA0NC"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import type { AIProvider, AIQueryOptions, AIResponse } from './ai-provider.interface';
|
|
2
|
-
import type { ProviderTaskLogHandler } from './base-ai.types';
|
|
3
|
-
import type { APIProviderConfig, ToolExecutionContext, ProviderExecutionMode } from '../../types/api-provider.types';
|
|
4
|
-
export declare class MastraAPIProvider implements AIProvider {
|
|
5
|
-
readonly name: string;
|
|
6
|
-
private config;
|
|
7
|
-
private toolContext?;
|
|
8
|
-
private filteredToolSets;
|
|
9
|
-
private readonly permissionsByMode;
|
|
10
|
-
private readonly defaultMode;
|
|
11
|
-
private readonly logConfig;
|
|
12
|
-
private taskLogHandler?;
|
|
13
|
-
constructor(config: APIProviderConfig, mode?: ProviderExecutionMode);
|
|
14
|
-
setTaskLogHandler(handler: ProviderTaskLogHandler): void;
|
|
15
|
-
private emitLog;
|
|
16
|
-
private createModel;
|
|
17
|
-
setTools(tools: any[], context: ToolExecutionContext): void;
|
|
18
|
-
private applyDefaultModeToContext;
|
|
19
|
-
private buildModeAwareToolSets;
|
|
20
|
-
private getToolIdentifier;
|
|
21
|
-
private createMastraToolsForMode;
|
|
22
|
-
query(prompt: string, options?: AIQueryOptions): Promise<AIResponse>;
|
|
23
|
-
execute(prompt: string, options?: AIQueryOptions): Promise<AIResponse>;
|
|
24
|
-
private runWithMode;
|
|
25
|
-
private extractToolName;
|
|
26
|
-
private extractToolArgs;
|
|
27
|
-
private extractToolResult;
|
|
28
|
-
private convertResponse;
|
|
29
|
-
isAvailable(): Promise<boolean>;
|
|
30
|
-
getToolPath(): Promise<string | null>;
|
|
31
|
-
}
|
|
@@ -1,365 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MastraAPIProvider = void 0;
|
|
4
|
-
const core_1 = require("@mastra/core");
|
|
5
|
-
const openai_1 = require("@ai-sdk/openai");
|
|
6
|
-
const anthropic_1 = require("@ai-sdk/anthropic");
|
|
7
|
-
const google_1 = require("@ai-sdk/google");
|
|
8
|
-
const ai_sdk_provider_1 = require("@openrouter/ai-sdk-provider");
|
|
9
|
-
const openai_compatible_1 = require("@ai-sdk/openai-compatible");
|
|
10
|
-
const api_provider_types_1 = require("../../types/api-provider.types");
|
|
11
|
-
const MastraToolAdapter_1 = require("../../adapters/MastraToolAdapter");
|
|
12
|
-
const api_provider_normalizer_1 = require("../../utils/api-provider-normalizer");
|
|
13
|
-
const log_config_1 = require("../../config/log.config");
|
|
14
|
-
class MastraAPIProvider {
|
|
15
|
-
constructor(config, mode = 'query') {
|
|
16
|
-
this.filteredToolSets = {};
|
|
17
|
-
const normalizedConfig = (0, api_provider_normalizer_1.normalizeAPIProviderConfig)(config);
|
|
18
|
-
this.config = normalizedConfig.config;
|
|
19
|
-
this.permissionsByMode = normalizedConfig.permissionsByMode;
|
|
20
|
-
this.defaultMode = mode;
|
|
21
|
-
this.name = this.config.provider;
|
|
22
|
-
this.logConfig = (0, log_config_1.getLogConfig)();
|
|
23
|
-
}
|
|
24
|
-
setTaskLogHandler(handler) {
|
|
25
|
-
this.taskLogHandler = handler;
|
|
26
|
-
}
|
|
27
|
-
emitLog(taskId, level, message) {
|
|
28
|
-
if (!this.taskLogHandler)
|
|
29
|
-
return;
|
|
30
|
-
this.taskLogHandler({
|
|
31
|
-
taskId,
|
|
32
|
-
timestamp: new Date().toISOString(),
|
|
33
|
-
level,
|
|
34
|
-
message,
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
createModel(config) {
|
|
38
|
-
const { provider, model, apiKey, url } = config;
|
|
39
|
-
switch (provider) {
|
|
40
|
-
case 'api/openai': {
|
|
41
|
-
if (url && url.includes('openrouter.ai')) {
|
|
42
|
-
console.log('[MastraAPIProvider] Detected OpenRouter, using @openrouter/ai-sdk-provider');
|
|
43
|
-
const openrouter = (0, ai_sdk_provider_1.createOpenRouter)({
|
|
44
|
-
apiKey: apiKey || '',
|
|
45
|
-
});
|
|
46
|
-
return openrouter(model);
|
|
47
|
-
}
|
|
48
|
-
if (apiKey && url) {
|
|
49
|
-
const customOpenAI = (0, openai_1.createOpenAI)({ apiKey, baseURL: url });
|
|
50
|
-
return customOpenAI(model);
|
|
51
|
-
}
|
|
52
|
-
else if (apiKey) {
|
|
53
|
-
const customOpenAI = (0, openai_1.createOpenAI)({ apiKey });
|
|
54
|
-
return customOpenAI(model);
|
|
55
|
-
}
|
|
56
|
-
return (0, openai_1.openai)(model);
|
|
57
|
-
}
|
|
58
|
-
case 'api/litellm':
|
|
59
|
-
case 'api/ollama':
|
|
60
|
-
case 'api/sowonai': {
|
|
61
|
-
let defaultURL = 'http://localhost:4000';
|
|
62
|
-
let defaultKey = 'dummy';
|
|
63
|
-
if (provider === 'api/ollama') {
|
|
64
|
-
defaultURL = 'http://localhost:11434/v1';
|
|
65
|
-
defaultKey = 'ollama';
|
|
66
|
-
}
|
|
67
|
-
else if (provider === 'api/sowonai') {
|
|
68
|
-
defaultURL = 'https://api.sowon.ai/v1';
|
|
69
|
-
}
|
|
70
|
-
const providerInstance = (0, openai_compatible_1.createOpenAICompatible)({
|
|
71
|
-
name: provider.replace('api/', ''),
|
|
72
|
-
baseURL: url || defaultURL,
|
|
73
|
-
apiKey: apiKey || defaultKey,
|
|
74
|
-
});
|
|
75
|
-
return providerInstance(model);
|
|
76
|
-
}
|
|
77
|
-
case 'api/anthropic': {
|
|
78
|
-
if (apiKey && url) {
|
|
79
|
-
const customAnthropic = (0, anthropic_1.createAnthropic)({ apiKey, baseURL: url });
|
|
80
|
-
return customAnthropic(model);
|
|
81
|
-
}
|
|
82
|
-
else if (apiKey) {
|
|
83
|
-
const customAnthropic = (0, anthropic_1.createAnthropic)({ apiKey });
|
|
84
|
-
return customAnthropic(model);
|
|
85
|
-
}
|
|
86
|
-
return (0, anthropic_1.anthropic)(model);
|
|
87
|
-
}
|
|
88
|
-
case 'api/bedrock': {
|
|
89
|
-
const customAnthropic = (0, anthropic_1.createAnthropic)({
|
|
90
|
-
apiKey: apiKey || '',
|
|
91
|
-
baseURL: url || 'https://bedrock-runtime.us-east-1.amazonaws.com',
|
|
92
|
-
});
|
|
93
|
-
return customAnthropic(model);
|
|
94
|
-
}
|
|
95
|
-
case 'api/google': {
|
|
96
|
-
if (apiKey) {
|
|
97
|
-
const customGoogle = (0, google_1.createGoogleGenerativeAI)({ apiKey });
|
|
98
|
-
return customGoogle(model);
|
|
99
|
-
}
|
|
100
|
-
return (0, google_1.google)(model);
|
|
101
|
-
}
|
|
102
|
-
default:
|
|
103
|
-
throw new Error(`Unsupported provider: ${provider}`);
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
setTools(tools, context) {
|
|
107
|
-
this.toolContext = this.applyDefaultModeToContext(context);
|
|
108
|
-
this.filteredToolSets = this.buildModeAwareToolSets(tools);
|
|
109
|
-
}
|
|
110
|
-
applyDefaultModeToContext(context) {
|
|
111
|
-
if (!context) {
|
|
112
|
-
return undefined;
|
|
113
|
-
}
|
|
114
|
-
if (context.mode) {
|
|
115
|
-
return context;
|
|
116
|
-
}
|
|
117
|
-
return { ...context, mode: this.defaultMode };
|
|
118
|
-
}
|
|
119
|
-
buildModeAwareToolSets(tools) {
|
|
120
|
-
const lookup = new Map();
|
|
121
|
-
for (const tool of tools) {
|
|
122
|
-
const identifier = this.getToolIdentifier(tool);
|
|
123
|
-
if (identifier) {
|
|
124
|
-
lookup.set(identifier, tool);
|
|
125
|
-
}
|
|
126
|
-
else {
|
|
127
|
-
console.warn('[MastraAPIProvider] Ignoring tool without name/id during registration');
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
const filtered = {};
|
|
131
|
-
for (const [mode, permissions] of Object.entries(this.permissionsByMode)) {
|
|
132
|
-
if (!permissions.tools.length) {
|
|
133
|
-
filtered[mode] = [];
|
|
134
|
-
continue;
|
|
135
|
-
}
|
|
136
|
-
filtered[mode] = permissions.tools
|
|
137
|
-
.map((toolName) => {
|
|
138
|
-
if (!lookup.has(toolName)) {
|
|
139
|
-
console.warn(`[MastraAPIProvider] Tool '${toolName}' referenced in ${mode} mode but not registered`);
|
|
140
|
-
}
|
|
141
|
-
return lookup.get(toolName);
|
|
142
|
-
})
|
|
143
|
-
.filter(Boolean);
|
|
144
|
-
}
|
|
145
|
-
return filtered;
|
|
146
|
-
}
|
|
147
|
-
getToolIdentifier(tool) {
|
|
148
|
-
if (tool && typeof tool.id === 'string') {
|
|
149
|
-
return tool.id;
|
|
150
|
-
}
|
|
151
|
-
if (tool && typeof tool.name === 'string') {
|
|
152
|
-
return tool.name;
|
|
153
|
-
}
|
|
154
|
-
return undefined;
|
|
155
|
-
}
|
|
156
|
-
createMastraToolsForMode(mode) {
|
|
157
|
-
if (!this.toolContext) {
|
|
158
|
-
return {};
|
|
159
|
-
}
|
|
160
|
-
const registeredTools = this.filteredToolSets[mode] ?? [];
|
|
161
|
-
if (registeredTools.length === 0) {
|
|
162
|
-
return {};
|
|
163
|
-
}
|
|
164
|
-
const contextWithMode = { ...this.toolContext, mode };
|
|
165
|
-
return MastraToolAdapter_1.MastraToolAdapter.convertTools(registeredTools, contextWithMode);
|
|
166
|
-
}
|
|
167
|
-
async query(prompt, options = {}) {
|
|
168
|
-
return this.runWithMode('query', prompt, options);
|
|
169
|
-
}
|
|
170
|
-
async execute(prompt, options = {}) {
|
|
171
|
-
return this.runWithMode('execute', prompt, options);
|
|
172
|
-
}
|
|
173
|
-
async runWithMode(mode, prompt, options) {
|
|
174
|
-
const taskId = options.taskId || `${this.name}_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`;
|
|
175
|
-
try {
|
|
176
|
-
const mastraTools = this.createMastraToolsForMode(mode);
|
|
177
|
-
const toolCount = Object.keys(mastraTools).length;
|
|
178
|
-
if (toolCount > 0) {
|
|
179
|
-
console.log(`[INFO] Registered ${toolCount} tools for ${mode} mode: ${Object.keys(mastraTools).join(', ')}`);
|
|
180
|
-
}
|
|
181
|
-
else {
|
|
182
|
-
console.log(`[INFO] No tools registered for ${mode} mode`);
|
|
183
|
-
}
|
|
184
|
-
const configToUse = options.model
|
|
185
|
-
? { ...this.config, model: options.model }
|
|
186
|
-
: this.config;
|
|
187
|
-
console.log(`[INFO] Using model: ${configToUse.model}`);
|
|
188
|
-
const modelInstance = this.createModel(configToUse);
|
|
189
|
-
const agent = new core_1.Agent({
|
|
190
|
-
name: this.config.provider,
|
|
191
|
-
model: modelInstance,
|
|
192
|
-
instructions: prompt,
|
|
193
|
-
tools: mastraTools,
|
|
194
|
-
});
|
|
195
|
-
const maxSteps = Math.min(this.config.maxSteps ?? api_provider_types_1.DEFAULT_MAX_STEPS, api_provider_types_1.MAX_STEPS_LIMIT);
|
|
196
|
-
const generateOptions = { maxSteps };
|
|
197
|
-
console.log(`[INFO] Sending request to AI model (maxSteps: ${maxSteps})...`);
|
|
198
|
-
const fullOutput = await agent.generate(prompt, generateOptions);
|
|
199
|
-
console.log(`[INFO] Received response from AI model`);
|
|
200
|
-
return this.convertResponse(fullOutput, taskId);
|
|
201
|
-
}
|
|
202
|
-
catch (error) {
|
|
203
|
-
return {
|
|
204
|
-
content: '',
|
|
205
|
-
provider: this.name,
|
|
206
|
-
command: `${this.name} ${mode}`,
|
|
207
|
-
success: false,
|
|
208
|
-
error: error.message || 'Unknown error',
|
|
209
|
-
taskId,
|
|
210
|
-
};
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
extractToolName(tc) {
|
|
214
|
-
return tc.payload?.toolName || tc.toolName || 'unknown';
|
|
215
|
-
}
|
|
216
|
-
extractToolArgs(tc) {
|
|
217
|
-
return tc.payload?.args || tc.args;
|
|
218
|
-
}
|
|
219
|
-
extractToolResult(tr) {
|
|
220
|
-
return tr?.payload?.result || tr?.result;
|
|
221
|
-
}
|
|
222
|
-
convertResponse(fullOutput, taskId) {
|
|
223
|
-
let content = fullOutput.text || '';
|
|
224
|
-
const response = {
|
|
225
|
-
content,
|
|
226
|
-
provider: this.name,
|
|
227
|
-
command: `${this.name} (Mastra)`,
|
|
228
|
-
success: true,
|
|
229
|
-
taskId,
|
|
230
|
-
model: this.config.model,
|
|
231
|
-
};
|
|
232
|
-
const allToolCalls = [];
|
|
233
|
-
const steps = fullOutput.steps || [];
|
|
234
|
-
for (const step of steps) {
|
|
235
|
-
const stepToolCalls = step.toolCalls || [];
|
|
236
|
-
const stepToolResults = step.toolResults || [];
|
|
237
|
-
for (let i = 0; i < stepToolCalls.length; i++) {
|
|
238
|
-
const tc = stepToolCalls[i];
|
|
239
|
-
const tr = stepToolResults[i];
|
|
240
|
-
const toolName = this.extractToolName(tc);
|
|
241
|
-
const toolArgs = this.extractToolArgs(tc);
|
|
242
|
-
const toolResultValue = this.extractToolResult(tr);
|
|
243
|
-
console.log(`[INFO] Tool called: ${toolName}`);
|
|
244
|
-
if (toolResultValue) {
|
|
245
|
-
const resultStr = typeof toolResultValue === 'string'
|
|
246
|
-
? toolResultValue
|
|
247
|
-
: JSON.stringify(toolResultValue);
|
|
248
|
-
const preview = resultStr.substring(0, this.logConfig.toolResultMaxLength);
|
|
249
|
-
console.log(`[INFO] Tool result preview: ${preview}${resultStr.length > this.logConfig.toolResultMaxLength ? '...' : ''}`);
|
|
250
|
-
}
|
|
251
|
-
allToolCalls.push({
|
|
252
|
-
toolName,
|
|
253
|
-
toolInput: toolArgs,
|
|
254
|
-
toolResult: toolResultValue,
|
|
255
|
-
});
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
if (allToolCalls.length === 0 && fullOutput.toolCalls?.length > 0) {
|
|
259
|
-
for (let i = 0; i < fullOutput.toolCalls.length; i++) {
|
|
260
|
-
const tc = fullOutput.toolCalls[i];
|
|
261
|
-
const tr = fullOutput.toolResults?.[i];
|
|
262
|
-
const toolName = this.extractToolName(tc);
|
|
263
|
-
const toolArgs = this.extractToolArgs(tc);
|
|
264
|
-
const toolResultValue = this.extractToolResult(tr);
|
|
265
|
-
console.log(`[INFO] Tool called: ${toolName}`);
|
|
266
|
-
allToolCalls.push({
|
|
267
|
-
toolName,
|
|
268
|
-
toolInput: toolArgs,
|
|
269
|
-
toolResult: toolResultValue,
|
|
270
|
-
});
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
for (let stepIdx = 0; stepIdx < steps.length; stepIdx++) {
|
|
274
|
-
const step = steps[stepIdx];
|
|
275
|
-
const stepToolCalls = step.toolCalls || [];
|
|
276
|
-
const stepToolResults = step.toolResults || [];
|
|
277
|
-
for (let i = 0; i < stepToolCalls.length; i++) {
|
|
278
|
-
const tc = stepToolCalls[i];
|
|
279
|
-
const tr = stepToolResults[i];
|
|
280
|
-
const toolName = this.extractToolName(tc);
|
|
281
|
-
const toolArgs = this.extractToolArgs(tc);
|
|
282
|
-
const toolResult = this.extractToolResult(tr);
|
|
283
|
-
const toolUseId = `toolu_api_${stepIdx}_${i}`;
|
|
284
|
-
this.emitLog(taskId, 'STDOUT', JSON.stringify({
|
|
285
|
-
type: 'assistant',
|
|
286
|
-
message: {
|
|
287
|
-
content: [{
|
|
288
|
-
type: 'tool_use',
|
|
289
|
-
id: toolUseId,
|
|
290
|
-
name: toolName,
|
|
291
|
-
input: toolArgs,
|
|
292
|
-
}],
|
|
293
|
-
},
|
|
294
|
-
}));
|
|
295
|
-
if (toolResult !== undefined) {
|
|
296
|
-
const output = typeof toolResult === 'string'
|
|
297
|
-
? toolResult
|
|
298
|
-
: JSON.stringify(toolResult);
|
|
299
|
-
this.emitLog(taskId, 'STDOUT', JSON.stringify({
|
|
300
|
-
type: 'user',
|
|
301
|
-
message: {
|
|
302
|
-
content: [{
|
|
303
|
-
type: 'tool_result',
|
|
304
|
-
tool_use_id: toolUseId,
|
|
305
|
-
output,
|
|
306
|
-
}],
|
|
307
|
-
},
|
|
308
|
-
}));
|
|
309
|
-
}
|
|
310
|
-
}
|
|
311
|
-
}
|
|
312
|
-
if (content) {
|
|
313
|
-
this.emitLog(taskId, 'STDOUT', JSON.stringify({
|
|
314
|
-
type: 'assistant',
|
|
315
|
-
message: {
|
|
316
|
-
content: [{ type: 'text', text: content }],
|
|
317
|
-
},
|
|
318
|
-
}));
|
|
319
|
-
}
|
|
320
|
-
if (allToolCalls.length > 0) {
|
|
321
|
-
console.log(`[INFO] Total tool calls across ${steps.length} step(s): ${allToolCalls.length}`);
|
|
322
|
-
response.toolCall = allToolCalls[0];
|
|
323
|
-
response.toolCalls = allToolCalls;
|
|
324
|
-
response.steps = steps.length;
|
|
325
|
-
if (!content && allToolCalls.length > 0) {
|
|
326
|
-
const lastCall = allToolCalls[allToolCalls.length - 1];
|
|
327
|
-
if (lastCall.toolResult) {
|
|
328
|
-
content = `Tool '${lastCall.toolName}' executed successfully:\n\n${lastCall.toolResult}`;
|
|
329
|
-
response.content = content;
|
|
330
|
-
}
|
|
331
|
-
}
|
|
332
|
-
}
|
|
333
|
-
return response;
|
|
334
|
-
}
|
|
335
|
-
async isAvailable() {
|
|
336
|
-
const { provider, apiKey } = this.config;
|
|
337
|
-
if (provider === 'api/ollama') {
|
|
338
|
-
return true;
|
|
339
|
-
}
|
|
340
|
-
if (apiKey) {
|
|
341
|
-
return true;
|
|
342
|
-
}
|
|
343
|
-
switch (provider) {
|
|
344
|
-
case 'api/openai':
|
|
345
|
-
return !!process.env.OPENAI_API_KEY;
|
|
346
|
-
case 'api/anthropic':
|
|
347
|
-
return !!process.env.ANTHROPIC_API_KEY;
|
|
348
|
-
case 'api/google':
|
|
349
|
-
return !!process.env.GOOGLE_API_KEY;
|
|
350
|
-
case 'api/bedrock':
|
|
351
|
-
return !!process.env.AWS_ACCESS_KEY_ID;
|
|
352
|
-
case 'api/litellm':
|
|
353
|
-
return !!process.env.LITELLM_API_KEY;
|
|
354
|
-
case 'api/sowonai':
|
|
355
|
-
return !!process.env.SOWONAI_API_KEY;
|
|
356
|
-
default:
|
|
357
|
-
return false;
|
|
358
|
-
}
|
|
359
|
-
}
|
|
360
|
-
async getToolPath() {
|
|
361
|
-
return null;
|
|
362
|
-
}
|
|
363
|
-
}
|
|
364
|
-
exports.MastraAPIProvider = MastraAPIProvider;
|
|
365
|
-
//# sourceMappingURL=MastraAPIProvider.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MastraAPIProvider.js","sourceRoot":"","sources":["../../../src/core/providers/MastraAPIProvider.ts"],"names":[],"mappings":";;;AAgBA,uCAAqC;AACrC,2CAAsD;AACtD,iDAA+D;AAC/D,2CAAkE;AAClE,iEAA+D;AAC/D,iEAAmE;AAQnE,uEAAoF;AACpF,wEAAqE;AACrE,iFAG6C;AAC7C,wDAAuE;AAoBvE,MAAa,iBAAiB;IAU5B,YAAY,MAAyB,EAAE,OAA8B,OAAO;QANpE,qBAAgB,GAA0B,EAAE,CAAC;QAOnD,MAAM,gBAAgB,GAAG,IAAA,oDAA0B,EAAC,MAAM,CAAC,CAAC;QAC5D,IAAI,CAAC,MAAM,GAAG,gBAAgB,CAAC,MAAM,CAAC;QACtC,IAAI,CAAC,iBAAiB,GAAG,gBAAgB,CAAC,iBAAiB,CAAC;QAC5D,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;QACxB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC;QACjC,IAAI,CAAC,SAAS,GAAG,IAAA,yBAAY,GAAE,CAAC;IAClC,CAAC;IAMD,iBAAiB,CAAC,OAA+B;QAC/C,IAAI,CAAC,cAAc,GAAG,OAAO,CAAC;IAChC,CAAC;IAEO,OAAO,CAAC,MAAc,EAAE,KAAwB,EAAE,OAAe;QACvE,IAAI,CAAC,IAAI,CAAC,cAAc;YAAE,OAAO;QACjC,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0 @@
|
|
|
1
|
-
import type { FileSystemService } from './types.js';
|
|
2
|
-
export declare class StandardFileSystemService implements FileSystemService {
|
|
3
|
-
readFile(path: string): Promise<Buffer>;
|
|
4
|
-
exists(path: string): Promise<boolean>;
|
|
5
|
-
stat(path: string): Promise<{
|
|
6
|
-
size: number;
|
|
7
|
-
isDirectory: boolean;
|
|
8
|
-
}>;
|
|
9
|
-
readdir(path: string): Promise<string[]>;
|
|
10
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.StandardFileSystemService = void 0;
|
|
7
|
-
const promises_1 = __importDefault(require("node:fs/promises"));
|
|
8
|
-
class StandardFileSystemService {
|
|
9
|
-
async readFile(path) {
|
|
10
|
-
return await promises_1.default.readFile(path);
|
|
11
|
-
}
|
|
12
|
-
async exists(path) {
|
|
13
|
-
try {
|
|
14
|
-
await promises_1.default.access(path);
|
|
15
|
-
return true;
|
|
16
|
-
}
|
|
17
|
-
catch {
|
|
18
|
-
return false;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
async stat(path) {
|
|
22
|
-
const stats = await promises_1.default.stat(path);
|
|
23
|
-
return {
|
|
24
|
-
size: stats.size,
|
|
25
|
-
isDirectory: stats.isDirectory(),
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
async readdir(path) {
|
|
29
|
-
return await promises_1.default.readdir(path);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
exports.StandardFileSystemService = StandardFileSystemService;
|
|
33
|
-
//# sourceMappingURL=file-system.service.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"file-system.service.js","sourceRoot":"","sources":["../../src/tools/file-system.service.ts"],"names":[],"mappings":";;;;;;AAIA,gEAAkC;AAMlC,MAAa,yBAAyB;IACpC,KAAK,CAAC,QAAQ,CAAC,IAAY;QACzB,OAAO,MAAM,kBAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IACjC,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,IAAY;QACvB,IAAI,CAAC;YACH,MAAM,kBAAE,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YACtB,OAAO,IAAI,CAAC;QACd,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,IAAY;QACrB,MAAM,KAAK,GAAG,MAAM,kBAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAClC,OAAO;YACL,IAAI,EAAE,KAAK,CAAC,IAAI;YAChB,WAAW,EAAE,KAAK,CAAC,WAAW,EAAE;SACjC,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,IAAY;QACxB,OAAO,MAAM,kBAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAChC,CAAC;CACF;AAzBD,8DAyBC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
export declare const findToolInputSchema: z.ZodObject<{
|
|
3
|
-
pattern: z.ZodString;
|
|
4
|
-
dir_path: z.ZodOptional<z.ZodString>;
|
|
5
|
-
case_sensitive: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
6
|
-
max_results: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
7
|
-
}, "strip", z.ZodTypeAny, {
|
|
8
|
-
pattern: string;
|
|
9
|
-
case_sensitive: boolean;
|
|
10
|
-
max_results: number;
|
|
11
|
-
dir_path?: string | undefined;
|
|
12
|
-
}, {
|
|
13
|
-
pattern: string;
|
|
14
|
-
dir_path?: string | undefined;
|
|
15
|
-
case_sensitive?: boolean | undefined;
|
|
16
|
-
max_results?: number | undefined;
|
|
17
|
-
}>;
|
|
18
|
-
export declare const findToolOutputSchema: z.ZodString;
|
|
19
|
-
export type FindToolInput = z.infer<typeof findToolInputSchema>;
|
|
20
|
-
export type FindToolOutput = z.infer<typeof findToolOutputSchema>;
|
|
21
|
-
export declare const findTool: any;
|