@integrity-labs/agt-cli 0.28.200 → 0.28.201

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
@@ -37,7 +37,7 @@ import {
37
37
  success,
38
38
  table,
39
39
  warn
40
- } from "../chunk-5I4F3LNL.js";
40
+ } from "../chunk-QV2GUGUS.js";
41
41
  import {
42
42
  CHANNEL_REGISTRY,
43
43
  DEFAULT_FRAMEWORK,
@@ -4749,7 +4749,7 @@ import { execFileSync, execSync } from "child_process";
4749
4749
  import { existsSync as existsSync10, realpathSync as realpathSync2 } from "fs";
4750
4750
  import chalk18 from "chalk";
4751
4751
  import ora16 from "ora";
4752
- var cliVersion = true ? "0.28.200" : "dev";
4752
+ var cliVersion = true ? "0.28.201" : "dev";
4753
4753
  async function fetchLatestVersion() {
4754
4754
  const host2 = getHost();
4755
4755
  if (!host2) return null;
@@ -5763,7 +5763,7 @@ function handleError(err) {
5763
5763
  }
5764
5764
 
5765
5765
  // src/bin/agt.ts
5766
- var cliVersion2 = true ? "0.28.200" : "dev";
5766
+ var cliVersion2 = true ? "0.28.201" : "dev";
5767
5767
  var program = new Command();
5768
5768
  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");
5769
5769
  program.hook("preAction", async (thisCommand, actionCommand) => {
@@ -5525,7 +5525,7 @@ function requireHost() {
5525
5525
  }
5526
5526
 
5527
5527
  // src/lib/api-client.ts
5528
- var agtCliVersion = true ? "0.28.200" : "dev";
5528
+ var agtCliVersion = true ? "0.28.201" : "dev";
5529
5529
  var lastConfigHash = null;
5530
5530
  function setConfigHash(hash) {
5531
5531
  lastConfigHash = hash && hash.length > 0 ? hash : null;
@@ -6829,4 +6829,4 @@ export {
6829
6829
  managerInstallSystemUnitCommand,
6830
6830
  managerUninstallSystemUnitCommand
6831
6831
  };
6832
- //# sourceMappingURL=chunk-5I4F3LNL.js.map
6832
+ //# sourceMappingURL=chunk-QV2GUGUS.js.map
@@ -27,7 +27,7 @@ import {
27
27
  requireHost,
28
28
  safeWriteJsonAtomic,
29
29
  setConfigHash
30
- } from "../chunk-5I4F3LNL.js";
30
+ } from "../chunk-QV2GUGUS.js";
31
31
  import {
32
32
  getProjectDir as getProjectDir2,
33
33
  getReadyTasks,
@@ -6681,7 +6681,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
6681
6681
  var lastVersionCheckAt = 0;
6682
6682
  var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
6683
6683
  var lastResponsivenessProbeAt = 0;
6684
- var agtCliVersion = true ? "0.28.200" : "dev";
6684
+ var agtCliVersion = true ? "0.28.201" : "dev";
6685
6685
  function resolveBrewPath(execFileSync4) {
6686
6686
  try {
6687
6687
  const out = execFileSync4("which", ["brew"], { timeout: 5e3 }).toString().trim();
@@ -7923,20 +7923,33 @@ async function pollCycle() {
7923
7923
  const data = await api.post("/host/agents", { host_id: hostId });
7924
7924
  const agents = data.agents ?? [];
7925
7925
  const restartAcks = /* @__PURE__ */ new Map();
7926
+ const restartClears = [];
7926
7927
  for (const agent of agents) {
7927
7928
  const requested = agent.restart_requested_at ?? null;
7928
7929
  if (!requested) continue;
7929
7930
  const prev = state6.agents.find((a) => a.agentId === agent.agent_id);
7930
7931
  const lastProcessed = prev?.lastRestartProcessedAt ?? null;
7931
- if (lastProcessed && Date.parse(lastProcessed) >= Date.parse(requested)) continue;
7932
- log(`[restart] Dashboard requested restart for '${agent.code_name}' at ${requested}`);
7933
- try {
7934
- const { execSync: es } = await import("child_process");
7935
- es(`tmux kill-session -t agt-${agent.code_name} 2>/dev/null`, { stdio: "ignore" });
7936
- } catch {
7932
+ const alreadyServiced = lastProcessed != null && Date.parse(lastProcessed) >= Date.parse(requested);
7933
+ if (!alreadyServiced) {
7934
+ log(`[restart] Dashboard requested restart for '${agent.code_name}' at ${requested}`);
7935
+ try {
7936
+ const { execSync: es } = await import("child_process");
7937
+ es(`tmux kill-session -t agt-${agent.code_name} 2>/dev/null`, { stdio: "ignore" });
7938
+ } catch {
7939
+ }
7940
+ stopPersistentSessionAndForgetMcpBaseline(agent.code_name);
7941
+ restartAcks.set(agent.agent_id, requested);
7937
7942
  }
7938
- stopPersistentSessionAndForgetMcpBaseline(agent.code_name);
7939
- restartAcks.set(agent.agent_id, requested);
7943
+ restartClears.push({ agentId: agent.agent_id, requestedAt: requested });
7944
+ }
7945
+ for (const clear of restartClears) {
7946
+ void api.post("/host/restart-ack", {
7947
+ host_id: hostId,
7948
+ agent_id: clear.agentId,
7949
+ restart_requested_at: clear.requestedAt
7950
+ }).catch(
7951
+ (err) => log(`[restart] clear failed for agent_id=${clear.agentId}: ${err.message}`)
7952
+ );
7940
7953
  }
7941
7954
  const frameworksThisCycle = new Set(agents.map((a) => a.framework).filter(Boolean));
7942
7955
  for (const fw of frameworksThisCycle) {