@lumerahq/cli 0.18.3 → 0.18.4
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/index.js
CHANGED
|
@@ -216,25 +216,25 @@ async function main() {
|
|
|
216
216
|
switch (command) {
|
|
217
217
|
// Resource commands
|
|
218
218
|
case "plan":
|
|
219
|
-
await import("./resources-
|
|
219
|
+
await import("./resources-CMY4IRUS.js").then((m) => m.plan(args.slice(1)));
|
|
220
220
|
break;
|
|
221
221
|
case "apply":
|
|
222
|
-
await import("./resources-
|
|
222
|
+
await import("./resources-CMY4IRUS.js").then((m) => m.apply(args.slice(1)));
|
|
223
223
|
break;
|
|
224
224
|
case "pull":
|
|
225
|
-
await import("./resources-
|
|
225
|
+
await import("./resources-CMY4IRUS.js").then((m) => m.pull(args.slice(1)));
|
|
226
226
|
break;
|
|
227
227
|
case "destroy":
|
|
228
|
-
await import("./resources-
|
|
228
|
+
await import("./resources-CMY4IRUS.js").then((m) => m.destroy(args.slice(1)));
|
|
229
229
|
break;
|
|
230
230
|
case "list":
|
|
231
|
-
await import("./resources-
|
|
231
|
+
await import("./resources-CMY4IRUS.js").then((m) => m.list(args.slice(1)));
|
|
232
232
|
break;
|
|
233
233
|
case "show":
|
|
234
|
-
await import("./resources-
|
|
234
|
+
await import("./resources-CMY4IRUS.js").then((m) => m.show(args.slice(1)));
|
|
235
235
|
break;
|
|
236
236
|
case "diff":
|
|
237
|
-
await import("./resources-
|
|
237
|
+
await import("./resources-CMY4IRUS.js").then((m) => m.diff(args.slice(1)));
|
|
238
238
|
break;
|
|
239
239
|
// Development
|
|
240
240
|
case "dev":
|
|
@@ -553,7 +553,10 @@ function loadLocalAutomations(platformDir, filterName, appName) {
|
|
|
553
553
|
errors.push(`${entry.name}: duplicate external_id "${config.external_id}" (also defined in ${existingByExtId.automation.name})`);
|
|
554
554
|
continue;
|
|
555
555
|
}
|
|
556
|
-
|
|
556
|
+
let code = readFileSync(mainPath, "utf-8");
|
|
557
|
+
if (appName) {
|
|
558
|
+
code = code.replaceAll("{{app}}", appName);
|
|
559
|
+
}
|
|
557
560
|
automations.push({ automation: config, code });
|
|
558
561
|
} catch (e) {
|
|
559
562
|
errors.push(`${entry.name}: failed to parse config.json - ${e}`);
|
|
@@ -1293,8 +1296,12 @@ function loadLocalAgents(platformDir, filterName, appName) {
|
|
|
1293
1296
|
errors.push(`${entry.name}: missing name in config.json`);
|
|
1294
1297
|
continue;
|
|
1295
1298
|
}
|
|
1296
|
-
|
|
1297
|
-
|
|
1299
|
+
let systemPrompt = readFileSync(promptPath, "utf-8");
|
|
1300
|
+
let policyScript = existsSync(policyPath) ? readFileSync(policyPath, "utf-8") : "";
|
|
1301
|
+
if (appName) {
|
|
1302
|
+
systemPrompt = systemPrompt.replaceAll("{{app}}", appName);
|
|
1303
|
+
policyScript = policyScript.replaceAll("{{app}}", appName);
|
|
1304
|
+
}
|
|
1298
1305
|
agents.push({ agent: config, systemPrompt, policyScript });
|
|
1299
1306
|
} catch (e) {
|
|
1300
1307
|
errors.push(`${entry.name}: failed to parse config.json - ${e}`);
|
|
@@ -1338,6 +1345,7 @@ async function planAgents(api, localAgents, projectId) {
|
|
|
1338
1345
|
if ((remote.model || "") !== (agent.model || "")) diffs.push("model");
|
|
1339
1346
|
if ((remote.policy_script || "").trim() !== (policyScript || "").trim()) diffs.push("policy_script");
|
|
1340
1347
|
if ((remote.policy_enabled || false) !== (agent.policy_enabled || false)) diffs.push("policy_enabled");
|
|
1348
|
+
if ((remote.policy_description || "") !== (agent.policy_description || "")) diffs.push("policy_description");
|
|
1341
1349
|
const localSkillIds = (agent.skills || []).map((s) => skillSlugToId.get(s) || s).sort();
|
|
1342
1350
|
const remoteSkillIds = [...remote.skill_ids || []].sort();
|
|
1343
1351
|
if (localSkillIds.join(",") !== remoteSkillIds.join(",")) {
|
|
@@ -1399,7 +1407,8 @@ async function applyAgents(api, localAgents, projectId) {
|
|
|
1399
1407
|
model: agent.model || "",
|
|
1400
1408
|
skill_ids: skillIds,
|
|
1401
1409
|
policy_script: policyScript || "",
|
|
1402
|
-
policy_enabled: agent.policy_enabled || false
|
|
1410
|
+
policy_enabled: agent.policy_enabled || false,
|
|
1411
|
+
policy_description: agent.policy_description || ""
|
|
1403
1412
|
};
|
|
1404
1413
|
try {
|
|
1405
1414
|
if (remote) {
|