@integrity-labs/agt-cli 0.28.825 → 0.28.827

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.
@@ -16,7 +16,7 @@ import {
16
16
  parseEnvIntegrations,
17
17
  shellQuote,
18
18
  summarizeUnanswerablePane
19
- } from "./chunk-2DT4VGWU.js";
19
+ } from "./chunk-6HTCP6D5.js";
20
20
  import {
21
21
  BIND_FAILURE_QUARANTINE_THRESHOLD,
22
22
  INTEGRATIONS_SECTION_END,
@@ -40,6 +40,7 @@ import {
40
40
  bestConnectivityEvidence,
41
41
  buildForwardHeaders,
42
42
  buildIntegrationsSection,
43
+ buildSlackThirdPartyBotsEnvValue,
43
44
  coerceEnvValue,
44
45
  formatLiteralSecretRejection,
45
46
  generateClaudeMd,
@@ -53,6 +54,8 @@ import {
53
54
  listFlagDefinitions,
54
55
  mcpWildcardsForServers,
55
56
  modelSlotsForFramework,
57
+ normaliseSlackPeerAgentMode,
58
+ normaliseSlackPeerGroupIds,
56
59
  normalizeFlagValue,
57
60
  parseSlackSocketState,
58
61
  probeComposioAccount,
@@ -71,7 +74,7 @@ import {
71
74
  sessionTranscriptDir,
72
75
  worseConnectivityOutcome,
73
76
  wrapScheduledTaskPrompt
74
- } from "./chunk-PVPLNARY.js";
77
+ } from "./chunk-GJY3KZG6.js";
75
78
  import {
76
79
  parsePsRows
77
80
  } from "./chunk-XWVM4KPK.js";
@@ -1613,31 +1616,6 @@ function assertValidCodeName(codeName) {
1613
1616
  throw new Error(`Invalid agent code_name: "${codeName}". Must be kebab-case.`);
1614
1617
  }
1615
1618
  }
1616
- function buildSlackThirdPartyBotsEnvValue(raw) {
1617
- if (!Array.isArray(raw) || raw.length === 0)
1618
- return void 0;
1619
- const entries = [];
1620
- for (const item of raw) {
1621
- if (!item || typeof item !== "object")
1622
- continue;
1623
- const rec = item;
1624
- const botUserId = typeof rec["bot_user_id"] === "string" ? rec["bot_user_id"].trim() : "";
1625
- if (!botUserId)
1626
- continue;
1627
- if (!Array.isArray(rec["channel_ids"]))
1628
- continue;
1629
- const channelIds = rec["channel_ids"].filter((c) => typeof c === "string" && c.trim() !== "").map((c) => c.trim());
1630
- const botId = typeof rec["bot_id"] === "string" && rec["bot_id"].trim() ? rec["bot_id"].trim() : void 0;
1631
- const label = typeof rec["label"] === "string" && rec["label"].trim() ? rec["label"].trim() : void 0;
1632
- entries.push({
1633
- bot_user_id: botUserId,
1634
- channel_ids: channelIds,
1635
- ...botId ? { bot_id: botId } : {},
1636
- ...label ? { label } : {}
1637
- });
1638
- }
1639
- return entries.length > 0 ? JSON.stringify(entries) : void 0;
1640
- }
1641
1619
  function assertSafeRelativePath(relativePath) {
1642
1620
  if (relativePath.includes("..") || relativePath.startsWith("/") || relativePath.includes("\0")) {
1643
1621
  throw new Error(`Unsafe relative path: ${relativePath}`);
@@ -5204,15 +5182,12 @@ ${sections}`
5204
5182
  };
5205
5183
  if (botToken) {
5206
5184
  const slackPeerEnv = {};
5207
- const rawSlackPeerAgentMode = config["peer_agent_mode"];
5208
- if (rawSlackPeerAgentMode === "listen" || rawSlackPeerAgentMode === "respond") {
5209
- slackPeerEnv.SLACK_PEER_AGENT_MODE = rawSlackPeerAgentMode;
5210
- }
5211
- const rawSlackPeerGroupIds = config["peer_group_ids"];
5212
- if (Array.isArray(rawSlackPeerGroupIds) && rawSlackPeerGroupIds.length > 0) {
5213
- const ids = rawSlackPeerGroupIds.map((v) => typeof v === "string" || typeof v === "number" ? String(v).trim() : "").filter((v) => v.length > 0);
5214
- if (ids.length > 0)
5215
- slackPeerEnv.SLACK_PEER_GROUP_IDS = ids.join(",");
5185
+ const slackPeerAgentMode = normaliseSlackPeerAgentMode(config["peer_agent_mode"]);
5186
+ if (slackPeerAgentMode)
5187
+ slackPeerEnv.SLACK_PEER_AGENT_MODE = slackPeerAgentMode;
5188
+ const slackPeerGroupIds = normaliseSlackPeerGroupIds(config["peer_group_ids"]);
5189
+ if (slackPeerGroupIds.length > 0) {
5190
+ slackPeerEnv.SLACK_PEER_GROUP_IDS = slackPeerGroupIds.join(",");
5216
5191
  }
5217
5192
  if (options?.slackPeers && options.slackPeers.length > 0) {
5218
5193
  slackPeerEnv.SLACK_PEERS = JSON.stringify(options.slackPeers.map((p) => ({
@@ -5412,16 +5387,12 @@ ${sections}`
5412
5387
  ...options?.agentId ? { AGT_AGENT_ID: options.agentId } : {}
5413
5388
  };
5414
5389
  const slackPeerEnv = {};
5415
- const rawSlackPeerAgentMode = config["peer_agent_mode"];
5416
- if (rawSlackPeerAgentMode === "listen" || rawSlackPeerAgentMode === "respond") {
5417
- slackPeerEnv.SLACK_PEER_AGENT_MODE = rawSlackPeerAgentMode;
5418
- }
5419
- const rawSlackPeerGroupIds = config["peer_group_ids"];
5420
- if (Array.isArray(rawSlackPeerGroupIds) && rawSlackPeerGroupIds.length > 0) {
5421
- const ids = rawSlackPeerGroupIds.map((v) => typeof v === "string" || typeof v === "number" ? String(v).trim() : "").filter((v) => v.length > 0);
5422
- if (ids.length > 0) {
5423
- slackPeerEnv.SLACK_PEER_GROUP_IDS = ids.join(",");
5424
- }
5390
+ const slackPeerAgentMode = normaliseSlackPeerAgentMode(config["peer_agent_mode"]);
5391
+ if (slackPeerAgentMode)
5392
+ slackPeerEnv.SLACK_PEER_AGENT_MODE = slackPeerAgentMode;
5393
+ const slackPeerGroupIds = normaliseSlackPeerGroupIds(config["peer_group_ids"]);
5394
+ if (slackPeerGroupIds.length > 0) {
5395
+ slackPeerEnv.SLACK_PEER_GROUP_IDS = slackPeerGroupIds.join(",");
5425
5396
  }
5426
5397
  if (options?.slackPeers && options.slackPeers.length > 0) {
5427
5398
  slackPeerEnv.SLACK_PEERS = JSON.stringify(options.slackPeers.map((p) => ({
@@ -6523,7 +6494,7 @@ function exchangeFailureKind(err) {
6523
6494
  }
6524
6495
 
6525
6496
  // src/lib/api-client.ts
6526
- var agtCliVersion = true ? "0.28.825" : "dev";
6497
+ var agtCliVersion = true ? "0.28.827" : "dev";
6527
6498
  var lastConfigHash = null;
6528
6499
  function setConfigHash(hash) {
6529
6500
  lastConfigHash = hash && hash.length > 0 ? hash : null;
@@ -10830,4 +10801,4 @@ export {
10830
10801
  managerInstallSystemUnitCommand,
10831
10802
  managerUninstallSystemUnitCommand
10832
10803
  };
10833
- //# sourceMappingURL=chunk-QICBWFRI.js.map
10804
+ //# sourceMappingURL=chunk-VOQ25S2E.js.map