@integrity-labs/agt-cli 0.28.617 → 0.28.619

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.
Files changed (25) hide show
  1. package/dist/bin/agt.js +5 -5
  2. package/dist/{chunk-TYVQNCBU.js → chunk-P6KFZVKA.js} +36 -1
  3. package/dist/chunk-P6KFZVKA.js.map +1 -0
  4. package/dist/{chunk-6SJJM4FT.js → chunk-RXC3MTSN.js} +5 -2
  5. package/dist/chunk-RXC3MTSN.js.map +1 -0
  6. package/dist/{chunk-NJHZL7CZ.js → chunk-WY7QPFBK.js} +57 -4
  7. package/dist/chunk-WY7QPFBK.js.map +1 -0
  8. package/dist/{claude-pair-runtime-QCL2TB6N.js → claude-pair-runtime-3356FFTC.js} +2 -2
  9. package/dist/lib/manager-worker.js +121 -19
  10. package/dist/lib/manager-worker.js.map +1 -1
  11. package/dist/mcp/direct-chat-channel.js +35 -0
  12. package/dist/mcp/origami.js +35 -0
  13. package/dist/mcp/slack-channel.js +65 -6
  14. package/dist/mcp/telegram-channel.js +35 -0
  15. package/dist/{persistent-session-GM3EH2ZU.js → persistent-session-AGPLISL3.js} +3 -3
  16. package/dist/{responsiveness-probe-VSSJC3MN.js → responsiveness-probe-ITYPPSHM.js} +3 -3
  17. package/dist/{session-auth-dead-KOKVXPPQ.js → session-auth-dead-Y6ABNWNM.js} +2 -2
  18. package/package.json +1 -1
  19. package/dist/chunk-6SJJM4FT.js.map +0 -1
  20. package/dist/chunk-NJHZL7CZ.js.map +0 -1
  21. package/dist/chunk-TYVQNCBU.js.map +0 -1
  22. /package/dist/{claude-pair-runtime-QCL2TB6N.js.map → claude-pair-runtime-3356FFTC.js.map} +0 -0
  23. /package/dist/{persistent-session-GM3EH2ZU.js.map → persistent-session-AGPLISL3.js.map} +0 -0
  24. /package/dist/{responsiveness-probe-VSSJC3MN.js.map → responsiveness-probe-ITYPPSHM.js.map} +0 -0
  25. /package/dist/{session-auth-dead-KOKVXPPQ.js.map → session-auth-dead-Y6ABNWNM.js.map} +0 -0
@@ -7,7 +7,7 @@ import {
7
7
  expandTemplateVars,
8
8
  isolationMode,
9
9
  parseEnvIntegrations
10
- } from "./chunk-6SJJM4FT.js";
10
+ } from "./chunk-RXC3MTSN.js";
11
11
  import {
12
12
  BIND_FAILURE_QUARANTINE_THRESHOLD,
13
13
  INTEGRATIONS_SECTION_END,
@@ -48,7 +48,7 @@ import {
48
48
  resolveConnectivityProbe,
49
49
  worseConnectivityOutcome,
50
50
  wrapScheduledTaskPrompt
51
- } from "./chunk-TYVQNCBU.js";
51
+ } from "./chunk-P6KFZVKA.js";
52
52
  import {
53
53
  parsePsRows
54
54
  } from "./chunk-XWVM4KPK.js";
@@ -1392,6 +1392,31 @@ function assertValidCodeName(codeName) {
1392
1392
  throw new Error(`Invalid agent code_name: "${codeName}". Must be kebab-case.`);
1393
1393
  }
1394
1394
  }
1395
+ function buildSlackThirdPartyBotsEnvValue(raw) {
1396
+ if (!Array.isArray(raw) || raw.length === 0)
1397
+ return void 0;
1398
+ const entries = [];
1399
+ for (const item of raw) {
1400
+ if (!item || typeof item !== "object")
1401
+ continue;
1402
+ const rec = item;
1403
+ const botUserId = typeof rec["bot_user_id"] === "string" ? rec["bot_user_id"].trim() : "";
1404
+ if (!botUserId)
1405
+ continue;
1406
+ if (!Array.isArray(rec["channel_ids"]))
1407
+ continue;
1408
+ const channelIds = rec["channel_ids"].filter((c) => typeof c === "string" && c.trim() !== "").map((c) => c.trim());
1409
+ const botId = typeof rec["bot_id"] === "string" && rec["bot_id"].trim() ? rec["bot_id"].trim() : void 0;
1410
+ const label = typeof rec["label"] === "string" && rec["label"].trim() ? rec["label"].trim() : void 0;
1411
+ entries.push({
1412
+ bot_user_id: botUserId,
1413
+ channel_ids: channelIds,
1414
+ ...botId ? { bot_id: botId } : {},
1415
+ ...label ? { label } : {}
1416
+ });
1417
+ }
1418
+ return entries.length > 0 ? JSON.stringify(entries) : void 0;
1419
+ }
1395
1420
  function assertSafeRelativePath(relativePath) {
1396
1421
  if (relativePath.includes("..") || relativePath.startsWith("/") || relativePath.includes("\0")) {
1397
1422
  throw new Error(`Unsafe relative path: ${relativePath}`);
@@ -4744,6 +4769,11 @@ ${sections}`
4744
4769
  slackPeerEnv.SLACK_PEERS_GATE = JSON.stringify(Object.fromEntries(gateEntries));
4745
4770
  }
4746
4771
  }
4772
+ {
4773
+ const thirdPartyBots = buildSlackThirdPartyBotsEnvValue(config["third_party_bots"]);
4774
+ if (thirdPartyBots)
4775
+ slackPeerEnv.SLACK_THIRD_PARTY_BOTS = thirdPartyBots;
4776
+ }
4747
4777
  if (options?.slackTeamPeerUserIds && options.slackTeamPeerUserIds.length > 0) {
4748
4778
  slackPeerEnv.SLACK_TEAM_PEER_USER_IDS = options.slackTeamPeerUserIds.join(",");
4749
4779
  }
@@ -4948,6 +4978,11 @@ ${sections}`
4948
4978
  slackPeerEnv.SLACK_PEERS_GATE = JSON.stringify(Object.fromEntries(gateEntries));
4949
4979
  }
4950
4980
  }
4981
+ {
4982
+ const thirdPartyBots = buildSlackThirdPartyBotsEnvValue(config["third_party_bots"]);
4983
+ if (thirdPartyBots)
4984
+ slackPeerEnv.SLACK_THIRD_PARTY_BOTS = thirdPartyBots;
4985
+ }
4951
4986
  if (options?.slackTeamPeerUserIds && options.slackTeamPeerUserIds.length > 0) {
4952
4987
  slackPeerEnv.SLACK_TEAM_PEER_USER_IDS = options.slackTeamPeerUserIds.join(",");
4953
4988
  }
@@ -6030,7 +6065,7 @@ function exchangeFailureKind(err) {
6030
6065
  }
6031
6066
 
6032
6067
  // src/lib/api-client.ts
6033
- var agtCliVersion = true ? "0.28.617" : "dev";
6068
+ var agtCliVersion = true ? "0.28.619" : "dev";
6034
6069
  var lastConfigHash = null;
6035
6070
  function setConfigHash(hash) {
6036
6071
  lastConfigHash = hash && hash.length > 0 ? hash : null;
@@ -6172,6 +6207,23 @@ async function attemptExchange(rawKey, retried) {
6172
6207
  supabaseAnonKey: data.supabase_anon_key
6173
6208
  };
6174
6209
  }
6210
+ async function mintAgentKey(rawHostKey, agentId) {
6211
+ const res = await fetch(`${requireHost()}/host/agent-key`, {
6212
+ method: "POST",
6213
+ headers: { "Content-Type": "application/json" },
6214
+ body: JSON.stringify({ host_key: rawHostKey, agent_id: agentId })
6215
+ });
6216
+ if (!res.ok) {
6217
+ const body = await res.json().catch(() => ({}));
6218
+ const errorMsg = String(body["error"] ?? res.statusText);
6219
+ throw new Error(`Per-agent key mint failed (${res.status}) for agent=${agentId}: ${errorMsg}`);
6220
+ }
6221
+ const data = await res.json();
6222
+ if (!data.agent_key) {
6223
+ throw new Error(`Per-agent key mint returned no key for agent=${agentId}`);
6224
+ }
6225
+ return data.agent_key;
6226
+ }
6175
6227
  async function resolveAuth() {
6176
6228
  const apiKey = getApiKey();
6177
6229
  if (!apiKey) {
@@ -9449,6 +9501,7 @@ export {
9449
9501
  setConfigHash,
9450
9502
  getCachedClaudeAuthMode,
9451
9503
  exchangeApiKey,
9504
+ mintAgentKey,
9452
9505
  ApiError,
9453
9506
  api,
9454
9507
  getHostId,
@@ -9505,4 +9558,4 @@ export {
9505
9558
  managerInstallSystemUnitCommand,
9506
9559
  managerUninstallSystemUnitCommand
9507
9560
  };
9508
- //# sourceMappingURL=chunk-NJHZL7CZ.js.map
9561
+ //# sourceMappingURL=chunk-WY7QPFBK.js.map