@integrity-labs/agt-cli 0.20.5 → 0.20.7

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.
@@ -22,7 +22,7 @@ import {
22
22
  resolveChannels,
23
23
  resolveDmTarget,
24
24
  wrapScheduledTaskPrompt
25
- } from "../chunk-LE6K3LZ6.js";
25
+ } from "../chunk-CDG7W2UD.js";
26
26
  import {
27
27
  findTaskByTemplate,
28
28
  getProjectDir,
@@ -2200,7 +2200,7 @@ function clearAgentCaches(agentId, codeName) {
2200
2200
  var cachedFrameworkVersion = null;
2201
2201
  var lastVersionCheckAt = 0;
2202
2202
  var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
2203
- var agtCliVersion = true ? "0.20.5" : "dev";
2203
+ var agtCliVersion = true ? "0.20.7" : "dev";
2204
2204
  function resolveBrewPath(execFileSync4) {
2205
2205
  try {
2206
2206
  const out = execFileSync4("which", ["brew"], { timeout: 5e3 }).toString().trim();
@@ -4311,20 +4311,22 @@ async function processAgent(agent, agentStates) {
4311
4311
  const agentFw = agentFrameworkCache.get(agent.code_name) ?? "openclaw";
4312
4312
  const sessionMode = refreshData.agent.session_mode ?? "oneshot";
4313
4313
  if (agentFw === "claude-code" && sessionMode === "persistent") {
4314
+ const wasSessionHealthy = isSessionHealthy(agent.code_name);
4314
4315
  let psResult;
4315
4316
  try {
4316
4317
  psResult = await ensurePersistentSession(agent, tasks, boardItems, refreshData);
4317
4318
  } catch (err) {
4318
- const msg = err.message;
4319
+ const msg = err instanceof Error ? err.message : String(err);
4319
4320
  log(`[persistent-session] EXCEPTION evaluating '${agent.code_name}': ${msg}`);
4320
4321
  psResult = {
4321
4322
  decision: "skipped-auth-resolve-failed",
4322
4323
  spawnAttempted: false,
4323
- sessionHealthyAfter: false,
4324
+ sessionHealthyAfter: wasSessionHealthy,
4324
4325
  detail: `exception: ${msg}`
4325
4326
  };
4326
4327
  }
4327
- const detailSuffix = psResult.detail ? ` detail="${psResult.detail}"` : "";
4328
+ const normalizedDetail = psResult.detail?.replace(/\s+/g, " ").trim();
4329
+ const detailSuffix = normalizedDetail ? ` detail=${JSON.stringify(normalizedDetail)}` : "";
4328
4330
  log(
4329
4331
  `[persistent-session-decision] agent=${agent.code_name} decision=${psResult.decision} spawn_attempted=${psResult.spawnAttempted} session_healthy_after=${psResult.sessionHealthyAfter}${detailSuffix}`
4330
4332
  );