lua-cli 3.2.0-alpha.1 → 3.2.0-alpha.2
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/utils/compile.js
CHANGED
|
@@ -239,7 +239,7 @@ export function extractSkillsMetadata(indexFile) {
|
|
|
239
239
|
let skillName = '';
|
|
240
240
|
let description = '';
|
|
241
241
|
let context = '';
|
|
242
|
-
let
|
|
242
|
+
let tools = [];
|
|
243
243
|
// Extract properties
|
|
244
244
|
configObj.getProperties().forEach((prop) => {
|
|
245
245
|
if (Node.isPropertyAssignment(prop)) {
|
|
@@ -257,7 +257,7 @@ export function extractSkillsMetadata(indexFile) {
|
|
|
257
257
|
else if (name === 'tools' && value && Node.isArrayLiteralExpression(value)) {
|
|
258
258
|
// Extract tools from constructor array
|
|
259
259
|
const toolsArray = value;
|
|
260
|
-
|
|
260
|
+
tools = toolsArray.getElements().map((element) => {
|
|
261
261
|
if (Node.isNewExpression(element)) {
|
|
262
262
|
return element.getExpression().getText();
|
|
263
263
|
}
|
|
@@ -271,7 +271,7 @@ export function extractSkillsMetadata(indexFile) {
|
|
|
271
271
|
name: skillName,
|
|
272
272
|
description,
|
|
273
273
|
context,
|
|
274
|
-
|
|
274
|
+
tools
|
|
275
275
|
});
|
|
276
276
|
}
|
|
277
277
|
}
|
package/dist/utils/deployment.js
CHANGED
|
@@ -64,11 +64,7 @@ export async function createLegacyDeploymentData(tools, luaDir, indexFile, agent
|
|
|
64
64
|
// Check if we have agent data (from LuaAgent approach)
|
|
65
65
|
if (agentData && agentData.skills && agentData.skills.length > 0) {
|
|
66
66
|
// Use skills from LuaAgent
|
|
67
|
-
|
|
68
|
-
skillsMetadata = agentData.skills.map((skill) => ({
|
|
69
|
-
...skill,
|
|
70
|
-
constructorTools: skill.tools || []
|
|
71
|
-
}));
|
|
67
|
+
skillsMetadata = agentData.skills;
|
|
72
68
|
}
|
|
73
69
|
else {
|
|
74
70
|
// Fall back to legacy approach - extract from index file
|
|
@@ -135,9 +131,9 @@ function buildSkillsArray(skillsMetadata, skillToTools, tools) {
|
|
|
135
131
|
return skillsMetadata.map(skillMeta => {
|
|
136
132
|
let skillTools = [];
|
|
137
133
|
// Strategy 1: Check for tools from constructor
|
|
138
|
-
if (skillMeta.
|
|
139
|
-
skillTools = tools.filter(tool => skillMeta.
|
|
140
|
-
skillMeta.
|
|
134
|
+
if (skillMeta.tools && skillMeta.tools.length > 0) {
|
|
135
|
+
skillTools = tools.filter(tool => skillMeta.tools.includes(tool.className) ||
|
|
136
|
+
skillMeta.tools.includes(tool.name));
|
|
141
137
|
}
|
|
142
138
|
else {
|
|
143
139
|
// Strategy 2: Match tools by variable name heuristic
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lua-cli",
|
|
3
|
-
"version": "3.2.0-alpha.
|
|
3
|
+
"version": "3.2.0-alpha.2",
|
|
4
4
|
"description": "Build, test, and deploy AI agents with custom tools, webhooks, and scheduled jobs. Features LuaAgent unified configuration, streaming chat, and batch deployment.",
|
|
5
5
|
"readmeFilename": "README.md",
|
|
6
6
|
"main": "dist/api-exports.js",
|