@integrity-labs/agt-cli 0.19.7 → 0.19.8
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.
package/dist/bin/agt.js
CHANGED
|
@@ -50,7 +50,7 @@ import {
|
|
|
50
50
|
success,
|
|
51
51
|
table,
|
|
52
52
|
warn
|
|
53
|
-
} from "../chunk-
|
|
53
|
+
} from "../chunk-E4TNET3D.js";
|
|
54
54
|
|
|
55
55
|
// src/bin/agt.ts
|
|
56
56
|
import { join as join10 } from "path";
|
|
@@ -3734,7 +3734,7 @@ import { execFileSync, execSync } from "child_process";
|
|
|
3734
3734
|
import { existsSync as existsSync5, realpathSync } from "fs";
|
|
3735
3735
|
import chalk17 from "chalk";
|
|
3736
3736
|
import ora15 from "ora";
|
|
3737
|
-
var cliVersion = true ? "0.19.
|
|
3737
|
+
var cliVersion = true ? "0.19.8" : "dev";
|
|
3738
3738
|
async function fetchLatestVersion() {
|
|
3739
3739
|
const host2 = getHost();
|
|
3740
3740
|
if (!host2) return null;
|
|
@@ -4192,7 +4192,7 @@ function handleError(err) {
|
|
|
4192
4192
|
}
|
|
4193
4193
|
|
|
4194
4194
|
// src/bin/agt.ts
|
|
4195
|
-
var cliVersion2 = true ? "0.19.
|
|
4195
|
+
var cliVersion2 = true ? "0.19.8" : "dev";
|
|
4196
4196
|
var program = new Command();
|
|
4197
4197
|
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");
|
|
4198
4198
|
program.hook("preAction", (thisCommand) => {
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
resolveChannels,
|
|
23
23
|
resolveDmTarget,
|
|
24
24
|
wrapScheduledTaskPrompt
|
|
25
|
-
} from "../chunk-
|
|
25
|
+
} from "../chunk-E4TNET3D.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.
|
|
1633
|
+
var agtCliVersion = true ? "0.19.8" : "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
|
|
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(
|
|
22230
|
-
|
|
22231
|
-
|
|
22232
|
-
|
|
22233
|
-
|
|
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
|
File without changes
|