@integrity-labs/agt-cli 0.28.757 → 0.28.759

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 (23) hide show
  1. package/dist/bin/agt.js +5 -5
  2. package/dist/{chunk-JB2LZVNB.js → chunk-4GGLPSVH.js} +2 -2
  3. package/dist/{chunk-45KFVLO4.js → chunk-SD2Y6ZOB.js} +71 -4
  4. package/dist/{chunk-45KFVLO4.js.map → chunk-SD2Y6ZOB.js.map} +1 -1
  5. package/dist/{chunk-43TIELP4.js → chunk-YAONHJW6.js} +4 -4
  6. package/dist/{claude-pair-runtime-MQMZT4AM.js → claude-pair-runtime-I6Q7M7KZ.js} +2 -2
  7. package/dist/lib/manager-worker.js +138 -28
  8. package/dist/lib/manager-worker.js.map +1 -1
  9. package/dist/mcp/direct-chat-channel.js +3 -0
  10. package/dist/mcp/index.js +3 -0
  11. package/dist/mcp/origami.js +3 -0
  12. package/dist/mcp/slack-channel.js +3 -0
  13. package/dist/mcp/telegram-channel.js +3 -0
  14. package/dist/{persistent-session-UVO7INXO.js → persistent-session-IUGL5OEF.js} +3 -3
  15. package/dist/{responsiveness-probe-3F3O7D7H.js → responsiveness-probe-N7QDT6AE.js} +3 -3
  16. package/dist/{session-auth-dead-Z6TCXJ4R.js → session-auth-dead-VE5NYGT7.js} +2 -2
  17. package/package.json +1 -1
  18. /package/dist/{chunk-JB2LZVNB.js.map → chunk-4GGLPSVH.js.map} +0 -0
  19. /package/dist/{chunk-43TIELP4.js.map → chunk-YAONHJW6.js.map} +0 -0
  20. /package/dist/{claude-pair-runtime-MQMZT4AM.js.map → claude-pair-runtime-I6Q7M7KZ.js.map} +0 -0
  21. /package/dist/{persistent-session-UVO7INXO.js.map → persistent-session-IUGL5OEF.js.map} +0 -0
  22. /package/dist/{responsiveness-probe-3F3O7D7H.js.map → responsiveness-probe-N7QDT6AE.js.map} +0 -0
  23. /package/dist/{session-auth-dead-Z6TCXJ4R.js.map → session-auth-dead-VE5NYGT7.js.map} +0 -0
package/dist/bin/agt.js CHANGED
@@ -41,12 +41,12 @@ import {
41
41
  success,
42
42
  table,
43
43
  warn
44
- } from "../chunk-43TIELP4.js";
44
+ } from "../chunk-YAONHJW6.js";
45
45
  import {
46
46
  getProjectDir,
47
47
  isSessionResumeDisabled,
48
48
  readDirectChatSessionState
49
- } from "../chunk-JB2LZVNB.js";
49
+ } from "../chunk-4GGLPSVH.js";
50
50
  import {
51
51
  AnchorSessionClient,
52
52
  CHANNEL_REGISTRY,
@@ -79,7 +79,7 @@ import {
79
79
  serializeManifestForSlackCli,
80
80
  sessionFileExists,
81
81
  sessionTranscriptDir
82
- } from "../chunk-45KFVLO4.js";
82
+ } from "../chunk-SD2Y6ZOB.js";
83
83
  import "../chunk-XWVM4KPK.js";
84
84
 
85
85
  // src/bin/agt.ts
@@ -5467,7 +5467,7 @@ import { execFileSync, execSync } from "child_process";
5467
5467
  import { existsSync as existsSync11, realpathSync as realpathSync2 } from "fs";
5468
5468
  import chalk18 from "chalk";
5469
5469
  import ora16 from "ora";
5470
- var cliVersion = true ? "0.28.757" : "dev";
5470
+ var cliVersion = true ? "0.28.759" : "dev";
5471
5471
  async function fetchLatestVersion() {
5472
5472
  const host2 = getHost();
5473
5473
  if (!host2) return null;
@@ -6658,7 +6658,7 @@ function handleError(err) {
6658
6658
  }
6659
6659
 
6660
6660
  // src/bin/agt.ts
6661
- var cliVersion2 = true ? "0.28.757" : "dev";
6661
+ var cliVersion2 = true ? "0.28.759" : "dev";
6662
6662
  var program = new Command();
6663
6663
  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");
6664
6664
  program.hook("preAction", async (thisCommand, actionCommand) => {
@@ -18,7 +18,7 @@ import {
18
18
  rotateDailySession,
19
19
  sessionFileExists,
20
20
  todayLocalIso
21
- } from "./chunk-45KFVLO4.js";
21
+ } from "./chunk-SD2Y6ZOB.js";
22
22
  import {
23
23
  reapOrphanChannelMcps
24
24
  } from "./chunk-XWVM4KPK.js";
@@ -4934,4 +4934,4 @@ export {
4934
4934
  stopAllSessionsAndWait,
4935
4935
  getProjectDir
4936
4936
  };
4937
- //# sourceMappingURL=chunk-JB2LZVNB.js.map
4937
+ //# sourceMappingURL=chunk-4GGLPSVH.js.map
@@ -10040,15 +10040,69 @@ function assessAuthConfigLinkage(input) {
10040
10040
  // ../../packages/core/dist/integrations/composio-account-probe.js
10041
10041
  var PROBE_TIMEOUT_MS = 1e4;
10042
10042
  var COMPOSIO_API_BASE = "https://backend.composio.dev";
10043
+ var BODY_SNIPPET_MAX = 300;
10044
+ async function readErrorBodySnippet(res, apiKey) {
10045
+ let text;
10046
+ try {
10047
+ text = await res.text();
10048
+ } catch {
10049
+ return void 0;
10050
+ }
10051
+ const redacted = apiKey ? text.split(apiKey).join("\xABredacted\xBB") : text;
10052
+ const trimmed = redacted.trim();
10053
+ if (!trimmed)
10054
+ return void 0;
10055
+ return trimmed.length > BODY_SNIPPET_MAX ? `${trimmed.slice(0, BODY_SNIPPET_MAX)}\u2026` : trimmed;
10056
+ }
10057
+ var NULL_BODY_STATUSES = /* @__PURE__ */ new Set([101, 204, 205, 304]);
10058
+ var BODY_MAX_BYTES = 1024 * 1024;
10043
10059
  async function timedFetch(fetchImpl, url, init) {
10044
10060
  const controller = new AbortController();
10045
10061
  const timer = setTimeout(() => controller.abort(), PROBE_TIMEOUT_MS);
10046
10062
  try {
10047
- return await fetchImpl(url, { ...init, signal: controller.signal });
10063
+ const res = await fetchImpl(url, { ...init, signal: controller.signal });
10064
+ if (NULL_BODY_STATUSES.has(res.status))
10065
+ return res;
10066
+ const body = await readBoundedBody(res, controller);
10067
+ return new Response(body, {
10068
+ status: res.status,
10069
+ statusText: res.statusText,
10070
+ headers: res.headers
10071
+ });
10048
10072
  } finally {
10049
10073
  clearTimeout(timer);
10050
10074
  }
10051
10075
  }
10076
+ async function readBoundedBody(res, controller) {
10077
+ const stream = res.body;
10078
+ if (!stream)
10079
+ return await res.text();
10080
+ const reader = stream.getReader();
10081
+ const chunks = [];
10082
+ let total = 0;
10083
+ for (; ; ) {
10084
+ const { done, value } = await reader.read();
10085
+ if (done)
10086
+ break;
10087
+ if (!value)
10088
+ continue;
10089
+ total += value.byteLength;
10090
+ if (total > BODY_MAX_BYTES) {
10091
+ controller.abort();
10092
+ await reader.cancel().catch(() => {
10093
+ });
10094
+ throw new Error(`Composio response body exceeded ${BODY_MAX_BYTES} bytes`);
10095
+ }
10096
+ chunks.push(value);
10097
+ }
10098
+ const merged = new Uint8Array(total);
10099
+ let offset = 0;
10100
+ for (const chunk of chunks) {
10101
+ merged.set(chunk, offset);
10102
+ offset += chunk.byteLength;
10103
+ }
10104
+ return new TextDecoder().decode(merged);
10105
+ }
10052
10106
  async function probeComposioAccount(params, fetchImpl = fetch) {
10053
10107
  const { connectedAccountId, apiKey, expectedUserId } = params;
10054
10108
  const base = params.apiBase ?? COMPOSIO_API_BASE;
@@ -10082,6 +10136,19 @@ async function probeComposioAccount(params, fetchImpl = fetch) {
10082
10136
  details: { connectedAccountId, httpStatus: res.status }
10083
10137
  };
10084
10138
  }
10139
+ if (res.status === 401 || res.status === 403) {
10140
+ const body = await readErrorBodySnippet(res, apiKey);
10141
+ return {
10142
+ status: "unverified",
10143
+ cause: "access_restricted",
10144
+ message: `Composio refused our API key (HTTP ${res.status}) \u2014 access restriction on our side, not a problem with this account; do not reconnect` + (body ? `. Composio said: ${body}` : ""),
10145
+ details: {
10146
+ connectedAccountId,
10147
+ httpStatus: res.status,
10148
+ ...body ? { responseBody: body } : {}
10149
+ }
10150
+ };
10151
+ }
10085
10152
  return {
10086
10153
  status: "down",
10087
10154
  message: `Composio account ${connectedAccountId} not found (HTTP ${res.status}) \u2014 reconnect required`,
@@ -10525,13 +10592,13 @@ async function probeComposioMcpToolCall(config, fetchImpl = fetch) {
10525
10592
 
10526
10593
  // ../../packages/core/dist/integrations/connectivity-http-probes.js
10527
10594
  var PROBE_TIMEOUT_MS2 = 1e4;
10528
- var NULL_BODY_STATUSES = /* @__PURE__ */ new Set([101, 204, 205, 304]);
10595
+ var NULL_BODY_STATUSES2 = /* @__PURE__ */ new Set([101, 204, 205, 304]);
10529
10596
  async function timedFetch2(fetchImpl, url, init) {
10530
10597
  const controller = new AbortController();
10531
10598
  const timer = setTimeout(() => controller.abort(), PROBE_TIMEOUT_MS2);
10532
10599
  try {
10533
10600
  const res = await fetchImpl(url, { ...init, signal: controller.signal });
10534
- if (NULL_BODY_STATUSES.has(res.status))
10601
+ if (NULL_BODY_STATUSES2.has(res.status))
10535
10602
  return res;
10536
10603
  const body = await res.text();
10537
10604
  return new Response(body, {
@@ -13248,4 +13315,4 @@ export {
13248
13315
  peekCurrentSession,
13249
13316
  readDailySessionPin
13250
13317
  };
13251
- //# sourceMappingURL=chunk-45KFVLO4.js.map
13318
+ //# sourceMappingURL=chunk-SD2Y6ZOB.js.map