@integrity-labs/agt-cli 0.24.9 → 0.25.0

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
@@ -26,7 +26,7 @@ import {
26
26
  success,
27
27
  table,
28
28
  warn
29
- } from "../chunk-67PAZ3I4.js";
29
+ } from "../chunk-5PS4FY7I.js";
30
30
  import {
31
31
  CHANNEL_REGISTRY,
32
32
  DEPLOYMENT_TEMPLATES,
@@ -52,7 +52,7 @@ import {
52
52
  renderTemplate,
53
53
  resolveChannels,
54
54
  serializeManifestForSlackCli
55
- } from "../chunk-354Z63L7.js";
55
+ } from "../chunk-7DRLULIO.js";
56
56
 
57
57
  // src/bin/agt.ts
58
58
  import { join as join10 } from "path";
@@ -3736,7 +3736,7 @@ import { execFileSync, execSync } from "child_process";
3736
3736
  import { existsSync as existsSync5, realpathSync } from "fs";
3737
3737
  import chalk17 from "chalk";
3738
3738
  import ora15 from "ora";
3739
- var cliVersion = true ? "0.24.9" : "dev";
3739
+ var cliVersion = true ? "0.25.0" : "dev";
3740
3740
  async function fetchLatestVersion() {
3741
3741
  const host2 = getHost();
3742
3742
  if (!host2) return null;
@@ -4268,7 +4268,7 @@ function handleError(err) {
4268
4268
  }
4269
4269
 
4270
4270
  // src/bin/agt.ts
4271
- var cliVersion2 = true ? "0.24.9" : "dev";
4271
+ var cliVersion2 = true ? "0.25.0" : "dev";
4272
4272
  var program = new Command();
4273
4273
  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");
4274
4274
  program.hook("preAction", (thisCommand) => {
@@ -8,7 +8,7 @@ import {
8
8
  parseDeliveryTarget,
9
9
  registerFramework,
10
10
  wrapScheduledTaskPrompt
11
- } from "./chunk-354Z63L7.js";
11
+ } from "./chunk-7DRLULIO.js";
12
12
 
13
13
  // ../../packages/core/dist/integrations/registry.js
14
14
  var INTEGRATION_REGISTRY = [
@@ -6710,4 +6710,4 @@ export {
6710
6710
  managerInstallSystemUnitCommand,
6711
6711
  managerUninstallSystemUnitCommand
6712
6712
  };
6713
- //# sourceMappingURL=chunk-67PAZ3I4.js.map
6713
+ //# sourceMappingURL=chunk-5PS4FY7I.js.map
@@ -3398,4 +3398,4 @@ export {
3398
3398
  KANBAN_LOOP_COMMAND,
3399
3399
  KANBAN_CHECK_COMMAND
3400
3400
  };
3401
- //# sourceMappingURL=chunk-354Z63L7.js.map
3401
+ //# sourceMappingURL=chunk-7DRLULIO.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  KANBAN_LOOP_COMMAND
3
- } from "./chunk-354Z63L7.js";
3
+ } from "./chunk-7DRLULIO.js";
4
4
 
5
5
  // src/lib/persistent-session.ts
6
6
  import { spawn, execSync, execFileSync as execFileSync2 } from "child_process";
@@ -1169,4 +1169,4 @@ export {
1169
1169
  stopAllSessionsAndWait,
1170
1170
  getProjectDir
1171
1171
  };
1172
- //# sourceMappingURL=chunk-S262PDVS.js.map
1172
+ //# sourceMappingURL=chunk-IEVHEZV4.js.map
@@ -100,7 +100,7 @@ async function spawnPairSession(session) {
100
100
  return { ok: true };
101
101
  } catch {
102
102
  }
103
- const { resolveClaudeBinary } = await import("./persistent-session-OYO4DTPL.js");
103
+ const { resolveClaudeBinary } = await import("./persistent-session-3SNFKR2Q.js");
104
104
  const claudeBin = resolveClaudeBinary();
105
105
  const pairEnv = {
106
106
  ...process.env,
@@ -373,4 +373,4 @@ export {
373
373
  startClaudePair,
374
374
  submitClaudePairCode
375
375
  };
376
- //# sourceMappingURL=claude-pair-runtime-6IB35CES.js.map
376
+ //# sourceMappingURL=claude-pair-runtime-SENCKRI4.js.map
@@ -13,7 +13,7 @@ import {
13
13
  provisionOrientHook,
14
14
  provisionStopHook,
15
15
  requireHost
16
- } from "../chunk-67PAZ3I4.js";
16
+ } from "../chunk-5PS4FY7I.js";
17
17
  import {
18
18
  findTaskByTemplate,
19
19
  getProjectDir as getProjectDir2,
@@ -50,7 +50,7 @@ import {
50
50
  stopAllSessionsAndWait,
51
51
  stopPersistentSession,
52
52
  takeZombieDetection
53
- } from "../chunk-S262PDVS.js";
53
+ } from "../chunk-IEVHEZV4.js";
54
54
  import {
55
55
  KANBAN_CHECK_COMMAND,
56
56
  appendDmFooter,
@@ -71,7 +71,7 @@ import {
71
71
  resolveChannels,
72
72
  resolveDmTarget,
73
73
  wrapScheduledTaskPrompt
74
- } from "../chunk-354Z63L7.js";
74
+ } from "../chunk-7DRLULIO.js";
75
75
 
76
76
  // src/lib/manager-worker.ts
77
77
  import { createHash as createHash3 } from "crypto";
@@ -2414,6 +2414,16 @@ function stopRealtimeIntegrationContext() {
2414
2414
  function isRealtimeConnected() {
2415
2415
  return connected;
2416
2416
  }
2417
+ function isRealtimeSocketConnected() {
2418
+ try {
2419
+ return client?.realtime?.isConnected() ?? false;
2420
+ } catch {
2421
+ return false;
2422
+ }
2423
+ }
2424
+ function shouldForcePollFallback(channelConnected, socketConnected) {
2425
+ return channelConnected && !socketConnected;
2426
+ }
2417
2427
  function stopRealtimeChat() {
2418
2428
  if (tearingDown) return;
2419
2429
  tearingDown = true;
@@ -2842,7 +2852,7 @@ var cachedFrameworkVersion = null;
2842
2852
  var lastVersionCheckAt = 0;
2843
2853
  var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
2844
2854
  var lastResponsivenessProbeAt = 0;
2845
- var agtCliVersion = true ? "0.24.9" : "dev";
2855
+ var agtCliVersion = true ? "0.25.0" : "dev";
2846
2856
  function resolveBrewPath(execFileSync4) {
2847
2857
  try {
2848
2858
  const out = execFileSync4("which", ["brew"], { timeout: 5e3 }).toString().trim();
@@ -3801,7 +3811,7 @@ async function pollCycle() {
3801
3811
  }
3802
3812
  try {
3803
3813
  const { detectHostSecurity } = await import("../host-security-6PDFG7F5.js");
3804
- const { collectDiagnostics } = await import("../persistent-session-OYO4DTPL.js");
3814
+ const { collectDiagnostics } = await import("../persistent-session-3SNFKR2Q.js");
3805
3815
  const diagCodeNames = [...persistentSessionAgents];
3806
3816
  const agentDiagnostics = diagCodeNames.length > 0 ? collectDiagnostics(diagCodeNames) : void 0;
3807
3817
  let tailscaleHostname;
@@ -3843,7 +3853,14 @@ async function pollCycle() {
3843
3853
  agent_diagnostics: agentDiagnostics,
3844
3854
  hostname: tailscaleHostname,
3845
3855
  os_username: osUsername,
3846
- claude_auth: claudeAuth ?? void 0
3856
+ claude_auth: claudeAuth ?? void 0,
3857
+ // ENG-5614: inbound-loop liveness. The actual phoenix socket state
3858
+ // behind the direct-chat Realtime subscription. When this is false
3859
+ // but the manager keeps heartbeating, inbound is being served by the
3860
+ // polling fallback (healRealtimeSocketDivergence forces it). Surfaced
3861
+ // so a sustained socket-down window is observable rather than hidden
3862
+ // behind a fresh heartbeat.
3863
+ realtime_socket_connected: isRealtimeSocketConnected()
3847
3864
  });
3848
3865
  } catch (err) {
3849
3866
  log(`Heartbeat failed: ${err.message}`);
@@ -3852,7 +3869,7 @@ async function pollCycle() {
3852
3869
  const {
3853
3870
  collectResponsivenessProbes,
3854
3871
  getResponsivenessIntervalMs
3855
- } = await import("../responsiveness-probe-SSFKGL7Q.js");
3872
+ } = await import("../responsiveness-probe-UBNJFMAU.js");
3856
3873
  const probeIntervalMs = getResponsivenessIntervalMs();
3857
3874
  if (now - lastResponsivenessProbeAt > probeIntervalMs) {
3858
3875
  const probeCodeNames = [...persistentSessionAgents];
@@ -4066,6 +4083,7 @@ async function pollCycle() {
4066
4083
  log(`Cron health monitor error: ${err.message}`);
4067
4084
  });
4068
4085
  }
4086
+ healRealtimeSocketDivergence();
4069
4087
  if (!isRealtimeConnected()) {
4070
4088
  pollDirectChatMessages(agentStates).catch((err) => {
4071
4089
  log(`Direct chat poll error: ${err.message}`);
@@ -6470,6 +6488,18 @@ var subscribedIntegrationContextAgentIds = /* @__PURE__ */ new Set();
6470
6488
  var realtimeAssignStarted = false;
6471
6489
  var realtimeConfigStarted = false;
6472
6490
  var realtimeSubscribedAgentIds = /* @__PURE__ */ new Set();
6491
+ function healRealtimeSocketDivergence() {
6492
+ if (!shouldForcePollFallback(isRealtimeConnected(), isRealtimeSocketConnected())) return false;
6493
+ log("[realtime] Socket divergence \u2014 channel flag connected but socket dead; forcing poll fallback + reconnect");
6494
+ stopRealtimeChat();
6495
+ realtimeStarted = false;
6496
+ realtimeDriftStarted = false;
6497
+ realtimeAssignStarted = false;
6498
+ realtimeConfigStarted = false;
6499
+ realtimeKanbanStarted = false;
6500
+ subscribedIntegrationContextAgentIds = /* @__PURE__ */ new Set();
6501
+ return true;
6502
+ }
6473
6503
  function ensureRealtimeStarted(agentStates) {
6474
6504
  const currentActiveIds = new Set(
6475
6505
  agentStates.filter((a) => a.status === "active").map((a) => a.agentId)
@@ -7812,7 +7842,7 @@ async function processClaudePairSessions(agents) {
7812
7842
  killPairSession,
7813
7843
  pairTmuxSession,
7814
7844
  finalizeClaudePairOnboarding
7815
- } = await import("../claude-pair-runtime-6IB35CES.js");
7845
+ } = await import("../claude-pair-runtime-SENCKRI4.js");
7816
7846
  for (const pairId of pendingResp.cancelled_pair_ids ?? []) {
7817
7847
  log(`[claude-pair] sweeping orphan tmux session for pair ${pairId.slice(0, 8)}`);
7818
7848
  const killed = await killPairSession(pairTmuxSession(pairId));