@integrity-labs/agt-cli 0.20.5 → 0.20.6

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/bin/agt.js CHANGED
@@ -50,7 +50,7 @@ import {
50
50
  success,
51
51
  table,
52
52
  warn
53
- } from "../chunk-LE6K3LZ6.js";
53
+ } from "../chunk-SOYIZEZG.js";
54
54
 
55
55
  // src/bin/agt.ts
56
56
  import { join as join10 } from "path";
@@ -3734,7 +3734,7 @@ import { execFileSync, execSync } from "child_process";
3734
3734
  import { existsSync as existsSync5, realpathSync } from "fs";
3735
3735
  import chalk17 from "chalk";
3736
3736
  import ora15 from "ora";
3737
- var cliVersion = true ? "0.20.5" : "dev";
3737
+ var cliVersion = true ? "0.20.6" : "dev";
3738
3738
  async function fetchLatestVersion() {
3739
3739
  const host2 = getHost();
3740
3740
  if (!host2) return null;
@@ -4266,7 +4266,7 @@ function handleError(err) {
4266
4266
  }
4267
4267
 
4268
4268
  // src/bin/agt.ts
4269
- var cliVersion2 = true ? "0.20.5" : "dev";
4269
+ var cliVersion2 = true ? "0.20.6" : "dev";
4270
4270
  var program = new Command();
4271
4271
  program.name("agt").description("Augmented CLI \u2014 agent provisioning and management").version(cliVersion2).option("--json", "Emit machine-readable JSON output (suppress spinners and colors)").option("--skip-update-check", "Skip the automatic update check on startup");
4272
4272
  program.hook("preAction", (thisCommand) => {
@@ -9381,4 +9381,4 @@ export {
9381
9381
  managerInstallSystemUnitCommand,
9382
9382
  managerUninstallSystemUnitCommand
9383
9383
  };
9384
- //# sourceMappingURL=chunk-LE6K3LZ6.js.map
9384
+ //# sourceMappingURL=chunk-SOYIZEZG.js.map
@@ -22,7 +22,7 @@ import {
22
22
  resolveChannels,
23
23
  resolveDmTarget,
24
24
  wrapScheduledTaskPrompt
25
- } from "../chunk-LE6K3LZ6.js";
25
+ } from "../chunk-SOYIZEZG.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.6" : "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
  );