@lumerahq/cli 0.19.18 → 0.19.19

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
@@ -219,25 +219,25 @@ async function main() {
219
219
  switch (command) {
220
220
  // Resource commands
221
221
  case "plan":
222
- await import("./resources-CVVG2XLD.js").then((m) => m.plan(args.slice(1)));
222
+ await import("./resources-FLFD64X2.js").then((m) => m.plan(args.slice(1)));
223
223
  break;
224
224
  case "apply":
225
- await import("./resources-CVVG2XLD.js").then((m) => m.apply(args.slice(1)));
225
+ await import("./resources-FLFD64X2.js").then((m) => m.apply(args.slice(1)));
226
226
  break;
227
227
  case "pull":
228
- await import("./resources-CVVG2XLD.js").then((m) => m.pull(args.slice(1)));
228
+ await import("./resources-FLFD64X2.js").then((m) => m.pull(args.slice(1)));
229
229
  break;
230
230
  case "destroy":
231
- await import("./resources-CVVG2XLD.js").then((m) => m.destroy(args.slice(1)));
231
+ await import("./resources-FLFD64X2.js").then((m) => m.destroy(args.slice(1)));
232
232
  break;
233
233
  case "list":
234
- await import("./resources-CVVG2XLD.js").then((m) => m.list(args.slice(1)));
234
+ await import("./resources-FLFD64X2.js").then((m) => m.list(args.slice(1)));
235
235
  break;
236
236
  case "show":
237
- await import("./resources-CVVG2XLD.js").then((m) => m.show(args.slice(1)));
237
+ await import("./resources-FLFD64X2.js").then((m) => m.show(args.slice(1)));
238
238
  break;
239
239
  case "diff":
240
- await import("./resources-CVVG2XLD.js").then((m) => m.diff(args.slice(1)));
240
+ await import("./resources-FLFD64X2.js").then((m) => m.diff(args.slice(1)));
241
241
  break;
242
242
  // Development
243
243
  case "dev":
@@ -805,6 +805,8 @@ function stripNamespacePrefix(name, appName) {
805
805
  }
806
806
  return name;
807
807
  }
808
+ var AGENT_IDLE_REAP_TIMEOUT_MIN_SECONDS = 10;
809
+ var AGENT_IDLE_REAP_TIMEOUT_MAX_SECONDS = 900;
808
810
  function buildCollectionIdMap(collections, appName) {
809
811
  const result = /* @__PURE__ */ new Map();
810
812
  const add = (key, id) => {
@@ -2222,6 +2224,13 @@ function loadLocalAgents(platformDir, filterName, appName) {
2222
2224
  errors.push(`${entry.name}: missing name in config.json`);
2223
2225
  continue;
2224
2226
  }
2227
+ if (config.idle_reap_timeout_seconds !== void 0) {
2228
+ const seconds = config.idle_reap_timeout_seconds;
2229
+ if (!Number.isInteger(seconds) || seconds !== 0 && (seconds < AGENT_IDLE_REAP_TIMEOUT_MIN_SECONDS || seconds > AGENT_IDLE_REAP_TIMEOUT_MAX_SECONDS)) {
2230
+ errors.push(`${entry.name}: idle_reap_timeout_seconds must be 0 or between ${AGENT_IDLE_REAP_TIMEOUT_MIN_SECONDS} and ${AGENT_IDLE_REAP_TIMEOUT_MAX_SECONDS}`);
2231
+ continue;
2232
+ }
2233
+ }
2225
2234
  let systemPrompt = readFileSync2(promptPath, "utf-8");
2226
2235
  let policyScript = existsSync2(policyPath) ? readFileSync2(policyPath, "utf-8") : "";
2227
2236
  if (appName) {
@@ -2291,6 +2300,7 @@ async function planAgents(api, localAgents, projectId) {
2291
2300
  if ((remote.description || "") !== (agent.description || "")) diffs.push("description");
2292
2301
  if ((remote.system_prompt || "").trim() !== systemPrompt.trim()) diffs.push("system_prompt");
2293
2302
  if ((remote.model || "") !== (agent.model || "")) diffs.push("model");
2303
+ if ((remote.idle_reap_timeout_seconds ?? 0) !== (agent.idle_reap_timeout_seconds ?? 0)) diffs.push("idle_reap_timeout_seconds");
2294
2304
  if ((remote.policy_script || "").trim() !== (policyScript || "").trim()) diffs.push("policy_script");
2295
2305
  if ((remote.policy_enabled || false) !== (agent.policy_enabled || false)) diffs.push("policy_enabled");
2296
2306
  if ((remote.policy_description || "") !== (agent.policy_description || "")) diffs.push("policy_description");
@@ -2383,6 +2393,7 @@ async function applyAgents(api, localAgents, projectId) {
2383
2393
  description: agent.description || "",
2384
2394
  system_prompt: systemPrompt,
2385
2395
  model: agent.model || "",
2396
+ idle_reap_timeout_seconds: agent.idle_reap_timeout_seconds ?? 0,
2386
2397
  skill_ids: skillIds,
2387
2398
  policy_script: policyScript || "",
2388
2399
  policy_enabled: agent.policy_enabled || false,
@@ -2440,6 +2451,7 @@ async function pullAgents(api, platformDir, filterName, projectId) {
2440
2451
  };
2441
2452
  if (agent.description) config.description = agent.description;
2442
2453
  if (agent.model) config.model = agent.model;
2454
+ if (agent.idle_reap_timeout_seconds) config.idle_reap_timeout_seconds = agent.idle_reap_timeout_seconds;
2443
2455
  if (skillSlugs.length > 0) config.skills = skillSlugs;
2444
2456
  if (agent.policy_enabled) config.policy_enabled = true;
2445
2457
  writeFileSync(join2(agentDir, "config.json"), JSON.stringify(config, null, 2) + "\n");
@@ -3684,11 +3696,13 @@ async function diff(args) {
3684
3696
  console.log(` description: ${pc2.red(remote.description || "(empty)")} \u2192 ${pc2.green(local.agent.description || "(empty)")}`);
3685
3697
  if ((remote.model || "") !== (local.agent.model || ""))
3686
3698
  console.log(` model: ${pc2.red(remote.model || "(default)")} \u2192 ${pc2.green(local.agent.model || "(default)")}`);
3699
+ if ((remote.idle_reap_timeout_seconds ?? 0) !== (local.agent.idle_reap_timeout_seconds ?? 0))
3700
+ console.log(` idle_reap_timeout_seconds: ${pc2.red(String(remote.idle_reap_timeout_seconds ?? 0))} \u2192 ${pc2.green(String(local.agent.idle_reap_timeout_seconds ?? 0))}`);
3687
3701
  if ((remote.policy_enabled || false) !== (local.agent.policy_enabled || false))
3688
3702
  console.log(` policy_enabled: ${pc2.red(String(remote.policy_enabled || false))} \u2192 ${pc2.green(String(local.agent.policy_enabled || false))}`);
3689
3703
  const promptChanged = (remote.system_prompt || "").trim() !== local.systemPrompt.trim();
3690
3704
  const policyChanged = (remote.policy_script || "").trim() !== (local.policyScript || "").trim();
3691
- if (!promptChanged && !policyChanged && remote.name === local.agent.name && (remote.description || "") === (local.agent.description || "") && (remote.model || "") === (local.agent.model || "") && (remote.policy_enabled || false) === (local.agent.policy_enabled || false)) {
3705
+ if (!promptChanged && !policyChanged && remote.name === local.agent.name && (remote.description || "") === (local.agent.description || "") && (remote.model || "") === (local.agent.model || "") && (remote.idle_reap_timeout_seconds ?? 0) === (local.agent.idle_reap_timeout_seconds ?? 0) && (remote.policy_enabled || false) === (local.agent.policy_enabled || false)) {
3692
3706
  console.log(pc2.green(` \u2713 No changes`));
3693
3707
  } else {
3694
3708
  if (promptChanged) renderFullDiff("system_prompt.md", remote.system_prompt || "", local.systemPrompt);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lumerahq/cli",
3
- "version": "0.19.18",
3
+ "version": "0.19.19",
4
4
  "description": "CLI for building and deploying Lumera apps",
5
5
  "type": "module",
6
6
  "engines": {