@integrity-labs/agt-cli 0.28.169 → 0.28.170

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.
@@ -23,7 +23,7 @@ import {
23
23
  resolveConnectivityProbe,
24
24
  worseConnectivityOutcome,
25
25
  wrapScheduledTaskPrompt
26
- } from "./chunk-UOL4Z6CG.js";
26
+ } from "./chunk-VZP5CIVP.js";
27
27
 
28
28
  // ../../packages/core/dist/integrations/registry.js
29
29
  var INTEGRATION_REGISTRY = [
@@ -7959,7 +7959,7 @@ function requireHost() {
7959
7959
  }
7960
7960
 
7961
7961
  // src/lib/api-client.ts
7962
- var agtCliVersion = true ? "0.28.169" : "dev";
7962
+ var agtCliVersion = true ? "0.28.170" : "dev";
7963
7963
  var lastConfigHash = null;
7964
7964
  function setConfigHash(hash) {
7965
7965
  lastConfigHash = hash && hash.length > 0 ? hash : null;
@@ -9264,4 +9264,4 @@ export {
9264
9264
  managerInstallSystemUnitCommand,
9265
9265
  managerUninstallSystemUnitCommand
9266
9266
  };
9267
- //# sourceMappingURL=chunk-3DFA7PRA.js.map
9267
+ //# sourceMappingURL=chunk-ZLEYBDHR.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-KRYOZ7JM.js");
103
+ const { resolveClaudeBinary } = await import("./persistent-session-2QNOLKCT.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-2FELNLHJ.js.map
376
+ //# sourceMappingURL=claude-pair-runtime-SEFGHAXC.js.map
@@ -28,7 +28,7 @@ import {
28
28
  requireHost,
29
29
  safeWriteJsonAtomic,
30
30
  setConfigHash
31
- } from "../chunk-3DFA7PRA.js";
31
+ } from "../chunk-ZLEYBDHR.js";
32
32
  import {
33
33
  getProjectDir as getProjectDir2,
34
34
  getReadyTasks,
@@ -70,7 +70,7 @@ import {
70
70
  takeZombieDetection,
71
71
  transcriptActivityAgeSeconds,
72
72
  writeEgressAllowlist
73
- } from "../chunk-VTRZ643P.js";
73
+ } from "../chunk-25T4GQTU.js";
74
74
  import {
75
75
  CONVERSATION_FAILURE_CATEGORIES,
76
76
  DEFAULT_FRAMEWORK,
@@ -111,7 +111,7 @@ import {
111
111
  resolveChannels,
112
112
  resolveDmTarget,
113
113
  sumTranscriptUsageInWindow
114
- } from "../chunk-UOL4Z6CG.js";
114
+ } from "../chunk-VZP5CIVP.js";
115
115
  import {
116
116
  parsePsRows,
117
117
  reapOrphanChannelMcps
@@ -6878,7 +6878,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
6878
6878
  var lastVersionCheckAt = 0;
6879
6879
  var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
6880
6880
  var lastResponsivenessProbeAt = 0;
6881
- var agtCliVersion = true ? "0.28.169" : "dev";
6881
+ var agtCliVersion = true ? "0.28.170" : "dev";
6882
6882
  function resolveBrewPath(execFileSync4) {
6883
6883
  try {
6884
6884
  const out = execFileSync4("which", ["brew"], { timeout: 5e3 }).toString().trim();
@@ -8011,7 +8011,7 @@ async function pollCycle() {
8011
8011
  }
8012
8012
  try {
8013
8013
  const { detectHostSecurity } = await import("../host-security-6PDFG7F5.js");
8014
- const { collectDiagnostics } = await import("../persistent-session-KRYOZ7JM.js");
8014
+ const { collectDiagnostics } = await import("../persistent-session-2QNOLKCT.js");
8015
8015
  const diagCodeNames = [...agentState.persistentSessionAgents];
8016
8016
  const agentDiagnostics = diagCodeNames.length > 0 ? collectDiagnostics(diagCodeNames) : void 0;
8017
8017
  let tailscaleHostname;
@@ -8159,7 +8159,7 @@ async function pollCycle() {
8159
8159
  const {
8160
8160
  collectResponsivenessProbes,
8161
8161
  getResponsivenessIntervalMs
8162
- } = await import("../responsiveness-probe-GVDKYPLT.js");
8162
+ } = await import("../responsiveness-probe-4JPUYWPB.js");
8163
8163
  const probeIntervalMs = getResponsivenessIntervalMs();
8164
8164
  if (now - lastResponsivenessProbeAt > probeIntervalMs) {
8165
8165
  const probeCodeNames = [...agentState.persistentSessionAgents];
@@ -8191,7 +8191,7 @@ async function pollCycle() {
8191
8191
  collectResponsivenessProbes,
8192
8192
  livePendingInboundOldestAgeSeconds,
8193
8193
  parkPendingInbound
8194
- } = await import("../responsiveness-probe-GVDKYPLT.js");
8194
+ } = await import("../responsiveness-probe-4JPUYWPB.js");
8195
8195
  const { getProjectDir: wedgeProjectDir } = await import("../claude-scheduler-FATCLHDM.js");
8196
8196
  const wedgeNow = /* @__PURE__ */ new Date();
8197
8197
  const liveAgents = agentState.persistentSessionAgents;
@@ -9547,15 +9547,18 @@ async function processAgent(agent, agentStates) {
9547
9547
  const integrationId = integration.id;
9548
9548
  if (!integrationId) continue;
9549
9549
  const refreshResult = await api.post(
9550
- `/integrations/oauth/${integrationId}/refresh`,
9551
- {}
9550
+ `/host/agent-integrations/${integrationId}/credential`,
9551
+ { agent_id: agent.agent_id }
9552
9552
  );
9553
- if (refreshResult.ok) {
9554
- integration.credentials.token_expires_at = refreshResult.expires_at;
9555
- if (refreshResult.access_token) {
9556
- integration.credentials.access_token = refreshResult.access_token;
9553
+ if (refreshResult.access_token) {
9554
+ const rotated = refreshResult.access_token !== integration.credentials.access_token || refreshResult.expires_at != null && refreshResult.expires_at !== integration.credentials.token_expires_at;
9555
+ if (refreshResult.expires_at) {
9556
+ integration.credentials.token_expires_at = refreshResult.expires_at;
9557
+ }
9558
+ integration.credentials.access_token = refreshResult.access_token;
9559
+ if (rotated) {
9560
+ log(`OAuth token refreshed for '${agent.code_name}/${integration.definition_id}'`);
9557
9561
  }
9558
- log(`OAuth token refreshed for '${agent.code_name}/${integration.definition_id}'`);
9559
9562
  if (frameworkAdapter.writeTokenFile) {
9560
9563
  frameworkAdapter.writeTokenFile(agent.code_name, integrations);
9561
9564
  }
@@ -11692,7 +11695,7 @@ async function processClaudePairSessions(agents) {
11692
11695
  killPairSession,
11693
11696
  pairTmuxSession,
11694
11697
  finalizeClaudePairOnboarding
11695
- } = await import("../claude-pair-runtime-2FELNLHJ.js");
11698
+ } = await import("../claude-pair-runtime-SEFGHAXC.js");
11696
11699
  for (const pairId of pendingResp.cancelled_pair_ids ?? []) {
11697
11700
  log(`[claude-pair] sweeping orphan tmux session for pair ${pairId.slice(0, 8)}`);
11698
11701
  const killed = await killPairSession(pairTmuxSession(pairId));