@integrity-labs/agt-cli 0.21.3 → 0.21.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.
@@ -22,7 +22,7 @@ import {
22
22
  resolveChannels,
23
23
  resolveDmTarget,
24
24
  wrapScheduledTaskPrompt
25
- } from "../chunk-O52NTHB2.js";
25
+ } from "../chunk-3H3ADCO6.js";
26
26
  import {
27
27
  findTaskByTemplate,
28
28
  getProjectDir,
@@ -50,7 +50,7 @@ import {
50
50
  startPersistentSession,
51
51
  stopAllSessionsAndWait,
52
52
  stopPersistentSession
53
- } from "../chunk-UYSBSXV6.js";
53
+ } from "../chunk-E4XLJCJT.js";
54
54
 
55
55
  // src/lib/manager-worker.ts
56
56
  import { createHash as createHash2 } from "crypto";
@@ -2398,7 +2398,7 @@ function clearAgentCaches(agentId, codeName) {
2398
2398
  var cachedFrameworkVersion = null;
2399
2399
  var lastVersionCheckAt = 0;
2400
2400
  var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
2401
- var agtCliVersion = true ? "0.21.3" : "dev";
2401
+ var agtCliVersion = true ? "0.21.6" : "dev";
2402
2402
  function resolveBrewPath(execFileSync4) {
2403
2403
  try {
2404
2404
  const out = execFileSync4("which", ["brew"], { timeout: 5e3 }).toString().trim();
@@ -3355,7 +3355,7 @@ async function pollCycle() {
3355
3355
  }
3356
3356
  try {
3357
3357
  const { detectHostSecurity } = await import("../host-security-6PDFG7F5.js");
3358
- const { collectDiagnostics } = await import("../persistent-session-7Y2QY3QP.js");
3358
+ const { collectDiagnostics } = await import("../persistent-session-53VP7AB7.js");
3359
3359
  const diagCodeNames = [...persistentSessionAgents];
3360
3360
  const agentDiagnostics = diagCodeNames.length > 0 ? collectDiagnostics(diagCodeNames) : void 0;
3361
3361
  let tailscaleHostname;
@@ -4006,7 +4006,11 @@ async function processAgent(agent, agentStates) {
4006
4006
  if (next === "off" || next === "cross_team_only" || next === "all") return next;
4007
4007
  return teamSettings?.["telegram_peer_disabled"] === true ? "all" : "off";
4008
4008
  })();
4009
- const teamSettingsForHash = channelId === "telegram" || channelId === "slack" ? { peer_disabled: peerDisabledMode } : null;
4009
+ const agentTimezone = (() => {
4010
+ const tz = teamSettings?.["timezone"];
4011
+ return typeof tz === "string" && tz.trim() !== "" ? tz.trim() : void 0;
4012
+ })();
4013
+ const teamSettingsForHash = channelId === "telegram" || channelId === "slack" || channelId === "direct-chat" ? { peer_disabled: peerDisabledMode, timezone: agentTimezone ?? null } : null;
4010
4014
  const crossTeamData = refreshData;
4011
4015
  const refreshHasCrossTeamFields = channelId === "telegram" ? Array.isArray(crossTeamData.team_peer_bot_ids) : channelId === "slack" ? Array.isArray(crossTeamData.team_peer_slack_user_ids) : false;
4012
4016
  const gateContext = refreshHasCrossTeamFields ? {
@@ -4017,7 +4021,7 @@ async function processAgent(agent, agentStates) {
4017
4021
  } : void 0;
4018
4022
  const peersForHash = channelId === "telegram" ? extractCharterTelegramPeers(refreshData.charter?.raw_content ?? "", gateContext) : channelId === "slack" ? extractCharterSlackPeers(refreshData.charter?.raw_content ?? "", gateContext) : null;
4019
4023
  const sessionModeForHash = refreshData.agent.session_mode;
4020
- const CHANNEL_WRITE_VERSION = 4;
4024
+ const CHANNEL_WRITE_VERSION = 5;
4021
4025
  const configHash = createHash2("sha256").update(
4022
4026
  canonicalJson({
4023
4027
  writeVersion: CHANNEL_WRITE_VERSION,
@@ -4060,7 +4064,8 @@ async function processAgent(agent, agentStates) {
4060
4064
  telegramPeerDisabled,
4061
4065
  peerDisabled,
4062
4066
  telegramPeers,
4063
- slackPeers
4067
+ slackPeers,
4068
+ agentTimezone
4064
4069
  }
4065
4070
  );
4066
4071
  knownChannelConfigHashes.set(cacheKey, configHash);
@@ -4122,6 +4127,11 @@ async function processAgent(agent, agentStates) {
4122
4127
  } catch {
4123
4128
  }
4124
4129
  const localDirectChatChannel = join4(homedir3(), ".augmented", "_mcp", "direct-chat-channel.js");
4130
+ const directChatTeamSettings = refreshData.team?.settings;
4131
+ const directChatTz = (() => {
4132
+ const tz = directChatTeamSettings?.["timezone"];
4133
+ return typeof tz === "string" && tz.trim() !== "" ? tz.trim() : void 0;
4134
+ })();
4125
4135
  if (existsSync3(localDirectChatChannel) && !mcpConfig.mcpServers["direct-chat"]) {
4126
4136
  mcpConfig.mcpServers["direct-chat"] = {
4127
4137
  command: "node",
@@ -4129,7 +4139,8 @@ async function processAgent(agent, agentStates) {
4129
4139
  env: {
4130
4140
  AGT_HOST: requireHost(),
4131
4141
  AGT_API_KEY: getApiKey() ?? "",
4132
- AGT_AGENT_ID: agent.agent_id
4142
+ AGT_AGENT_ID: agent.agent_id,
4143
+ ...directChatTz ? { TZ: directChatTz } : {}
4133
4144
  }
4134
4145
  };
4135
4146
  const serialized = JSON.stringify(mcpConfig, null, 2);
@@ -5391,6 +5402,11 @@ async function ensurePersistentSession(agent, tasks, boardItems, refreshData) {
5391
5402
  const projectDir = getProjectDir2(codeName);
5392
5403
  const mcpConfigPath = join4(projectDir, ".mcp.json");
5393
5404
  const claudeMdPath = join4(projectDir, "CLAUDE.md");
5405
+ const teamSettingsForTz = refreshData.team?.settings;
5406
+ const agentTimezone = (() => {
5407
+ const tz = teamSettingsForTz?.["timezone"];
5408
+ return typeof tz === "string" && tz.trim() !== "" ? tz.trim() : void 0;
5409
+ })();
5394
5410
  const channelConfigs = refreshData.channel_configs;
5395
5411
  const channels = [];
5396
5412
  const devChannels = [];
@@ -5472,7 +5488,7 @@ async function ensurePersistentSession(agent, tasks, boardItems, refreshData) {
5472
5488
  persistentSessionAgents.delete(codeName);
5473
5489
  restartTrigger = "auth-tuple";
5474
5490
  }
5475
- if (isStaleForToday(codeName) && isSessionHealthy(codeName)) {
5491
+ if (isStaleForToday(codeName, /* @__PURE__ */ new Date(), agentTimezone) && isSessionHealthy(codeName)) {
5476
5492
  const current = peekCurrentSession(codeName);
5477
5493
  if (current) {
5478
5494
  const idle = isAgentIdle(projectDir, current.sessionId);
@@ -5530,6 +5546,7 @@ ${truncateForLog(ctx.tail)}` : `; pane_tail_hash=sha256:${createHash2("sha256").
5530
5546
  claudeAuthMode,
5531
5547
  anthropicApiKey,
5532
5548
  runId: sessionRunResult.run_id,
5549
+ agentTimezone,
5533
5550
  log
5534
5551
  });
5535
5552
  persistentSessionAgents.add(codeName);
@@ -6878,7 +6895,7 @@ async function processClaudePairSessions(agents) {
6878
6895
  killPairSession,
6879
6896
  pairTmuxSession,
6880
6897
  finalizeClaudePairOnboarding
6881
- } = await import("../claude-pair-runtime-ABVKSL5L.js");
6898
+ } = await import("../claude-pair-runtime-LXGQZBLL.js");
6882
6899
  for (const pairId of pendingResp.cancelled_pair_ids ?? []) {
6883
6900
  log(`[claude-pair] sweeping orphan tmux session for pair ${pairId.slice(0, 8)}`);
6884
6901
  const killed = await killPairSession(pairTmuxSession(pairId));