@integrity-labs/agt-cli 0.19.7 → 0.19.9

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-IJZ2IDTV.js";
25
+ } from "../chunk-GLZKMKZM.js";
26
26
  import {
27
27
  findTaskByTemplate,
28
28
  getProjectDir,
@@ -1630,7 +1630,7 @@ function clearAgentCaches(agentId, codeName) {
1630
1630
  var cachedFrameworkVersion = null;
1631
1631
  var lastVersionCheckAt = 0;
1632
1632
  var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
1633
- var agtCliVersion = true ? "0.19.7" : "dev";
1633
+ var agtCliVersion = true ? "0.19.9" : "dev";
1634
1634
  function resolveBrewPath(execFileSync2) {
1635
1635
  try {
1636
1636
  const out = execFileSync2("which", ["brew"], { timeout: 5e3 }).toString().trim();
package/mcp/index.js CHANGED
@@ -21125,10 +21125,10 @@ async function getToken() {
21125
21125
  }
21126
21126
  return AGT_TOKEN;
21127
21127
  }
21128
- async function apiPost(path, body, retried = false) {
21129
- const controller = new AbortController();
21130
- const timeout = setTimeout(() => controller.abort(), 15e3);
21128
+ async function apiPost(path, body, retried = false, timeoutMs = 15e3) {
21131
21129
  const token = await getToken();
21130
+ const controller = new AbortController();
21131
+ const timeout = setTimeout(() => controller.abort(), timeoutMs);
21132
21132
  try {
21133
21133
  const res = await fetch(`${AGT_HOST}${path}`, {
21134
21134
  method: "POST",
@@ -21142,7 +21142,7 @@ async function apiPost(path, body, retried = false) {
21142
21142
  if (res.status === 401 && AGT_API_KEY && !retried) {
21143
21143
  clearTimeout(timeout);
21144
21144
  tokenExpiresAt = 0;
21145
- return apiPost(path, body, true);
21145
+ return apiPost(path, body, true, timeoutMs);
21146
21146
  }
21147
21147
  if (!res.ok) {
21148
21148
  const text = await res.text().catch(() => res.statusText);
@@ -21151,7 +21151,7 @@ async function apiPost(path, body, retried = false) {
21151
21151
  return await res.json();
21152
21152
  } catch (err) {
21153
21153
  if (err instanceof DOMException && err.name === "AbortError") {
21154
- throw new Error(`API ${path} timed out after 15s`);
21154
+ throw new Error(`API ${path} timed out after ${timeoutMs}ms`);
21155
21155
  }
21156
21156
  throw err;
21157
21157
  } finally {
@@ -22222,16 +22222,22 @@ async function discoverApiTools() {
22222
22222
  return [];
22223
22223
  }
22224
22224
  }
22225
+ var FORWARD_TOOL_CALL_TIMEOUT_MS = 35e3;
22225
22226
  async function forwardToolCall(toolName, args) {
22226
22227
  if (!AGT_AGENT_ID) {
22227
22228
  throw new Error("Cannot forward tool call: AGT_AGENT_ID is not set");
22228
22229
  }
22229
- return apiPost("/host/mcp/tools/call", {
22230
- agent_id: AGT_AGENT_ID,
22231
- name: toolName,
22232
- arguments: args,
22233
- run_id: AGT_RUN_ID ?? null
22234
- });
22230
+ return apiPost(
22231
+ "/host/mcp/tools/call",
22232
+ {
22233
+ agent_id: AGT_AGENT_ID,
22234
+ name: toolName,
22235
+ arguments: args,
22236
+ run_id: AGT_RUN_ID ?? null
22237
+ },
22238
+ false,
22239
+ FORWARD_TOOL_CALL_TIMEOUT_MS
22240
+ );
22235
22241
  }
22236
22242
  async function registerForwardedApiTools() {
22237
22243
  const apiTools = await discoverApiTools();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@integrity-labs/agt-cli",
3
- "version": "0.19.7",
3
+ "version": "0.19.9",
4
4
  "description": "Augmented Team CLI — agent provisioning and management",
5
5
  "type": "module",
6
6
  "engines": {