@minded-ai/mindedjs 1.0.62-patch3 → 1.0.62-patch5
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/cli/index.js +44 -5
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/lambdaHandlerTemplate.ts +46 -0
- package/package.json +3 -2
- package/src/cli/index.ts +48 -6
package/dist/cli/index.js
CHANGED
|
@@ -37,8 +37,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
37
37
|
const fs = __importStar(require("fs"));
|
|
38
38
|
const path = __importStar(require("path"));
|
|
39
39
|
const logger_1 = require("../utils/logger");
|
|
40
|
+
const child_process_1 = require("child_process");
|
|
40
41
|
const ENV_FILE = '.env';
|
|
41
|
-
const MODULE_PATH_PLACEHOLDER = '{MODULE_PATH}';
|
|
42
42
|
function getEnvFilePath() {
|
|
43
43
|
return path.join(process.cwd(), ENV_FILE);
|
|
44
44
|
}
|
|
@@ -95,10 +95,30 @@ function generateLambdaHandler() {
|
|
|
95
95
|
// Remove .ts or .js extension if present and convert to relative path
|
|
96
96
|
const modulePath = agentPath.replace(/\.(ts|js)$/, '');
|
|
97
97
|
// Get the path to the template file
|
|
98
|
-
|
|
98
|
+
// Try multiple locations to support both development and npm package scenarios
|
|
99
|
+
const templatePaths = [
|
|
100
|
+
path.join(__dirname, 'lambdaHandlerTemplate.ts'), // For npm package
|
|
101
|
+
path.join(__dirname, '..', '..', 'src', 'cli', 'lambdaHandlerTemplate.ts'), // For development
|
|
102
|
+
];
|
|
103
|
+
let templateContent = null;
|
|
104
|
+
// Try each path until we find the template
|
|
105
|
+
for (const templatePath of templatePaths) {
|
|
106
|
+
try {
|
|
107
|
+
if (fs.existsSync(templatePath)) {
|
|
108
|
+
templateContent = fs.readFileSync(templatePath, 'utf8');
|
|
109
|
+
logger_1.logger.debug(`Found template at ${templatePath}`);
|
|
110
|
+
break;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
catch (error) {
|
|
114
|
+
// Continue to next path
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
if (!templateContent) {
|
|
118
|
+
logger_1.logger.error('Could not find Lambda handler template file');
|
|
119
|
+
process.exit(1);
|
|
120
|
+
}
|
|
99
121
|
try {
|
|
100
|
-
// Read the template file
|
|
101
|
-
let templateContent = fs.readFileSync(templatePath, 'utf8');
|
|
102
122
|
// Replace the placeholder with the actual module path
|
|
103
123
|
// Using a string literal here to make sure we match exactly what's in the template
|
|
104
124
|
templateContent = templateContent.replace(/const modulePath = '{MODULE_PATH}';/, `const modulePath = '${modulePath}';`);
|
|
@@ -106,6 +126,25 @@ function generateLambdaHandler() {
|
|
|
106
126
|
const outputPath = path.join(process.cwd(), 'index.ts');
|
|
107
127
|
fs.writeFileSync(outputPath, templateContent);
|
|
108
128
|
logger_1.logger.info(`Generated Lambda handler at ${outputPath}`);
|
|
129
|
+
// Also compile the TS file to JS and place it in dist/ directory
|
|
130
|
+
const distDir = path.join(process.cwd(), 'dist');
|
|
131
|
+
// Ensure dist directory exists
|
|
132
|
+
if (!fs.existsSync(distDir)) {
|
|
133
|
+
fs.mkdirSync(distDir, { recursive: true });
|
|
134
|
+
}
|
|
135
|
+
try {
|
|
136
|
+
// Compile just the index.ts file using tsc
|
|
137
|
+
logger_1.logger.info('Compiling index.ts to JavaScript...');
|
|
138
|
+
(0, child_process_1.execSync)(`npx tsc ${outputPath} --outDir ${distDir} --esModuleInterop --skipLibCheck`, {
|
|
139
|
+
cwd: process.cwd(),
|
|
140
|
+
stdio: 'pipe',
|
|
141
|
+
});
|
|
142
|
+
logger_1.logger.info(`Successfully compiled index.js to ${path.join(distDir, 'index.js')}`);
|
|
143
|
+
}
|
|
144
|
+
catch (compileError) {
|
|
145
|
+
logger_1.logger.error('Failed to compile index.ts:', compileError);
|
|
146
|
+
logger_1.logger.info('You will need to include index.ts in your TypeScript compilation');
|
|
147
|
+
}
|
|
109
148
|
}
|
|
110
149
|
catch (error) {
|
|
111
150
|
logger_1.logger.error('Failed to generate Lambda handler:', error);
|
|
@@ -127,7 +166,7 @@ function main() {
|
|
|
127
166
|
generateLambdaHandler();
|
|
128
167
|
}
|
|
129
168
|
else {
|
|
130
|
-
logger_1.logger.error('Unknown command. Available commands: token, generate-lambda-handler');
|
|
169
|
+
logger_1.logger.error('Unknown command. Available commands: token, generate-lambda-ts-handler');
|
|
131
170
|
process.exit(1);
|
|
132
171
|
}
|
|
133
172
|
}
|
package/dist/cli/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,uCAAyB;AACzB,2CAA6B;AAC7B,4CAAyC;AAEzC,MAAM,QAAQ,GAAG,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,uCAAyB;AACzB,2CAA6B;AAC7B,4CAAyC;AACzC,iDAAyC;AAEzC,MAAM,QAAQ,GAAG,MAAM,CAAC;AAExB,SAAS,cAAc;IACrB,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,QAAQ,CAAC,CAAC;AAC5C,CAAC;AAED,SAAS,QAAQ,CAAC,KAAa;IAC7B,MAAM,OAAO,GAAG,cAAc,EAAE,CAAC;IACjC,MAAM,SAAS,GAAG,2BAA2B,KAAK,EAAE,CAAC;IAErD,4BAA4B;IAC5B,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC;QAC5B,kCAAkC;QAClC,EAAE,CAAC,aAAa,CAAC,OAAO,EAAE,SAAS,GAAG,IAAI,CAAC,CAAC;QAC5C,eAAM,CAAC,IAAI,CAAC,WAAW,OAAO,kBAAkB,CAAC,CAAC;IACpD,CAAC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C,IAAI,CAAC,kEAAkE,CAAC,CAAC;QAClF,CAAC;IACH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,eAAM,CAAC,KAAK,CAAC,oCAAoC,EAAE,KAAK,CAAC,CAAC;QAC1D,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC;AAED,SAAS,IAAI;IACX,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACnC,MAAM,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;IAExB,IAAI,OAAO,KAAK,OAAO,EAAE,CAAC;QACxB,MAAM,KAAK,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QACtB,IAAI,CAAC,KAAK,EAAE,CAAC;YACX,eAAM,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAC;YACvC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;QACD,QAAQ,CAAC,KAAK,CAAC,CAAC;IAClB,CAAC;SAAM,IAAI,OAAO,KAAK,4BAA4B,EAAE,CAAC;QACpD,qBAAqB,EAAE,CAAC;IAC1B,CAAC;SAAM,CAAC;QACN,eAAM,CAAC,KAAK,CAAC,wEAAwE,CAAC,CAAC;QACvF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC;AAED,IAAI,EAAE,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
// This is the template for the Lambda handler
|
|
2
|
+
// The {MODULE_PATH} placeholder will be replaced with the actual path
|
|
3
|
+
|
|
4
|
+
import { APIGatewayProxyEvent, APIGatewayProxyResult, Context } from 'aws-lambda';
|
|
5
|
+
|
|
6
|
+
export const handler = async (event: APIGatewayProxyEvent, context: Context): Promise<APIGatewayProxyResult> => {
|
|
7
|
+
const modulePath = '{MODULE_PATH}'; // Agent path from minded.json
|
|
8
|
+
const resolvedPath = require.resolve(modulePath);
|
|
9
|
+
delete require.cache[resolvedPath];
|
|
10
|
+
const agent = require(modulePath).default;
|
|
11
|
+
const { agentFunctionName, agentFunctionBody } = event.body ? JSON.parse(event.body) : event;
|
|
12
|
+
|
|
13
|
+
if (!agent[agentFunctionName]) {
|
|
14
|
+
throw new Error('Unknown agentFunctionName: ' + agentFunctionName);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const response = await agent[agentFunctionName](agentFunctionBody);
|
|
18
|
+
|
|
19
|
+
// Safely stringify the response. If it fails (e.g., due to circular refs
|
|
20
|
+
// or non-serialisable class instances), fall back to null.
|
|
21
|
+
let responseBody = null;
|
|
22
|
+
try {
|
|
23
|
+
JSON.stringify(response);
|
|
24
|
+
responseBody = response;
|
|
25
|
+
} catch (_) {
|
|
26
|
+
// ignored - responseBody stays null
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
if (agentFunctionName === 'startVoiceSession') {
|
|
30
|
+
const wait = (ms: number) => new Promise((r) => setTimeout(r, ms));
|
|
31
|
+
while (context.getRemainingTimeInMillis() > 1000) {
|
|
32
|
+
console.log('Lambda remaining time in seconds: ', context.getRemainingTimeInMillis() / 1000);
|
|
33
|
+
await wait(1000); // sleep 1 s
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
return {
|
|
38
|
+
statusCode: 200,
|
|
39
|
+
headers: {
|
|
40
|
+
'Content-Type': 'application/json',
|
|
41
|
+
'Access-Control-Allow-Origin': '*',
|
|
42
|
+
'Access-Control-Allow-Credentials': true,
|
|
43
|
+
},
|
|
44
|
+
body: JSON.stringify(responseBody),
|
|
45
|
+
};
|
|
46
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@minded-ai/mindedjs",
|
|
3
|
-
"version": "1.0.62-
|
|
3
|
+
"version": "1.0.62-patch5",
|
|
4
4
|
"description": "MindedJS is a TypeScript library for building agents.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -12,7 +12,8 @@
|
|
|
12
12
|
"src"
|
|
13
13
|
],
|
|
14
14
|
"scripts": {
|
|
15
|
-
"build": "tsc",
|
|
15
|
+
"build": "tsc && npm run copy-templates",
|
|
16
|
+
"copy-templates": "cp -r src/cli/lambdaHandlerTemplate.ts dist/cli/",
|
|
16
17
|
"watch": "tsc -w",
|
|
17
18
|
"test": "NODE_ENV=test mocha --parallel --jobs auto --retries 1 -r ts-node/register -r ./test/setup.ts \"test/**/*.test.ts\"",
|
|
18
19
|
"testFile": "NODE_ENV=test mocha -r ts-node/register -r ./test/setup.ts",
|
package/src/cli/index.ts
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
import * as fs from 'fs';
|
|
4
4
|
import * as path from 'path';
|
|
5
5
|
import { logger } from '../utils/logger';
|
|
6
|
+
import { execSync } from 'child_process';
|
|
6
7
|
|
|
7
8
|
const ENV_FILE = '.env';
|
|
8
|
-
const MODULE_PATH_PLACEHOLDER = '{MODULE_PATH}';
|
|
9
9
|
|
|
10
10
|
function getEnvFilePath(): string {
|
|
11
11
|
return path.join(process.cwd(), ENV_FILE);
|
|
@@ -69,12 +69,33 @@ function generateLambdaHandler(): void {
|
|
|
69
69
|
const modulePath = agentPath.replace(/\.(ts|js)$/, '');
|
|
70
70
|
|
|
71
71
|
// Get the path to the template file
|
|
72
|
-
|
|
72
|
+
// Try multiple locations to support both development and npm package scenarios
|
|
73
|
+
const templatePaths = [
|
|
74
|
+
path.join(__dirname, 'lambdaHandlerTemplate.ts'), // For npm package
|
|
75
|
+
path.join(__dirname, '..', '..', 'src', 'cli', 'lambdaHandlerTemplate.ts'), // For development
|
|
76
|
+
];
|
|
77
|
+
|
|
78
|
+
let templateContent: string | null = null;
|
|
79
|
+
|
|
80
|
+
// Try each path until we find the template
|
|
81
|
+
for (const templatePath of templatePaths) {
|
|
82
|
+
try {
|
|
83
|
+
if (fs.existsSync(templatePath)) {
|
|
84
|
+
templateContent = fs.readFileSync(templatePath, 'utf8');
|
|
85
|
+
logger.debug(`Found template at ${templatePath}`);
|
|
86
|
+
break;
|
|
87
|
+
}
|
|
88
|
+
} catch (error) {
|
|
89
|
+
// Continue to next path
|
|
90
|
+
}
|
|
91
|
+
}
|
|
73
92
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
93
|
+
if (!templateContent) {
|
|
94
|
+
logger.error('Could not find Lambda handler template file');
|
|
95
|
+
process.exit(1);
|
|
96
|
+
}
|
|
77
97
|
|
|
98
|
+
try {
|
|
78
99
|
// Replace the placeholder with the actual module path
|
|
79
100
|
// Using a string literal here to make sure we match exactly what's in the template
|
|
80
101
|
templateContent = templateContent.replace(/const modulePath = '{MODULE_PATH}';/, `const modulePath = '${modulePath}';`);
|
|
@@ -83,6 +104,27 @@ function generateLambdaHandler(): void {
|
|
|
83
104
|
const outputPath = path.join(process.cwd(), 'index.ts');
|
|
84
105
|
fs.writeFileSync(outputPath, templateContent);
|
|
85
106
|
logger.info(`Generated Lambda handler at ${outputPath}`);
|
|
107
|
+
|
|
108
|
+
// Also compile the TS file to JS and place it in dist/ directory
|
|
109
|
+
const distDir = path.join(process.cwd(), 'dist');
|
|
110
|
+
|
|
111
|
+
// Ensure dist directory exists
|
|
112
|
+
if (!fs.existsSync(distDir)) {
|
|
113
|
+
fs.mkdirSync(distDir, { recursive: true });
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
try {
|
|
117
|
+
// Compile just the index.ts file using tsc
|
|
118
|
+
logger.info('Compiling index.ts to JavaScript...');
|
|
119
|
+
execSync(`npx tsc ${outputPath} --outDir ${distDir} --esModuleInterop --skipLibCheck`, {
|
|
120
|
+
cwd: process.cwd(),
|
|
121
|
+
stdio: 'pipe',
|
|
122
|
+
});
|
|
123
|
+
logger.info(`Successfully compiled index.js to ${path.join(distDir, 'index.js')}`);
|
|
124
|
+
} catch (compileError) {
|
|
125
|
+
logger.error('Failed to compile index.ts:', compileError);
|
|
126
|
+
logger.info('You will need to include index.ts in your TypeScript compilation');
|
|
127
|
+
}
|
|
86
128
|
} catch (error) {
|
|
87
129
|
logger.error('Failed to generate Lambda handler:', error);
|
|
88
130
|
process.exit(1);
|
|
@@ -103,7 +145,7 @@ function main() {
|
|
|
103
145
|
} else if (command === 'generate-lambda-ts-handler') {
|
|
104
146
|
generateLambdaHandler();
|
|
105
147
|
} else {
|
|
106
|
-
logger.error('Unknown command. Available commands: token, generate-lambda-handler');
|
|
148
|
+
logger.error('Unknown command. Available commands: token, generate-lambda-ts-handler');
|
|
107
149
|
process.exit(1);
|
|
108
150
|
}
|
|
109
151
|
}
|