@integrity-labs/agt-cli 0.28.1093 → 0.28.1094
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 +5 -5
- package/dist/{chunk-WP6ISOPX.js → chunk-6VIH2UFL.js} +2 -2
- package/dist/{chunk-IT7TKE5O.js → chunk-JJYOF5KM.js} +4 -4
- package/dist/{chunk-EAXTNN24.js → chunk-KEMDLWTE.js} +62 -2
- package/dist/{chunk-EAXTNN24.js.map → chunk-KEMDLWTE.js.map} +1 -1
- package/dist/{claude-pair-runtime-M3HT7J7I.js → claude-pair-runtime-5ONG4ZYY.js} +2 -2
- package/dist/lib/manager-worker.js +16 -16
- package/dist/{persistent-session-J2DDILF2.js → persistent-session-FLPQZ35P.js} +3 -3
- package/dist/{responsiveness-probe-SC3343EW.js → responsiveness-probe-VIDFFFM4.js} +3 -3
- package/dist/{session-auth-dead-YRBWGK2V.js → session-auth-dead-PMMJ6RYS.js} +2 -2
- package/package.json +1 -1
- /package/dist/{chunk-WP6ISOPX.js.map → chunk-6VIH2UFL.js.map} +0 -0
- /package/dist/{chunk-IT7TKE5O.js.map → chunk-JJYOF5KM.js.map} +0 -0
- /package/dist/{claude-pair-runtime-M3HT7J7I.js.map → claude-pair-runtime-5ONG4ZYY.js.map} +0 -0
- /package/dist/{persistent-session-J2DDILF2.js.map → persistent-session-FLPQZ35P.js.map} +0 -0
- /package/dist/{responsiveness-probe-SC3343EW.js.map → responsiveness-probe-VIDFFFM4.js.map} +0 -0
- /package/dist/{session-auth-dead-YRBWGK2V.js.map → session-auth-dead-PMMJ6RYS.js.map} +0 -0
package/dist/bin/agt.js
CHANGED
|
@@ -40,12 +40,12 @@ import {
|
|
|
40
40
|
success,
|
|
41
41
|
table,
|
|
42
42
|
warn
|
|
43
|
-
} from "../chunk-
|
|
43
|
+
} from "../chunk-JJYOF5KM.js";
|
|
44
44
|
import {
|
|
45
45
|
getProjectDir,
|
|
46
46
|
isSessionResumeDisabled,
|
|
47
47
|
readDirectChatSessionState
|
|
48
|
-
} from "../chunk-
|
|
48
|
+
} from "../chunk-6VIH2UFL.js";
|
|
49
49
|
import {
|
|
50
50
|
AnchorSessionClient,
|
|
51
51
|
CHANNEL_REGISTRY,
|
|
@@ -79,7 +79,7 @@ import {
|
|
|
79
79
|
serializeManifestForSlackCli,
|
|
80
80
|
sessionFileExists,
|
|
81
81
|
sessionTranscriptDir
|
|
82
|
-
} from "../chunk-
|
|
82
|
+
} from "../chunk-KEMDLWTE.js";
|
|
83
83
|
import "../chunk-OCMJ5E6J.js";
|
|
84
84
|
import "../chunk-XWVM4KPK.js";
|
|
85
85
|
import "../chunk-EL5MWGGH.js";
|
|
@@ -5474,7 +5474,7 @@ import { execFileSync, execSync } from "child_process";
|
|
|
5474
5474
|
import { existsSync as existsSync11, realpathSync as realpathSync2 } from "fs";
|
|
5475
5475
|
import chalk18 from "chalk";
|
|
5476
5476
|
import ora16 from "ora";
|
|
5477
|
-
var cliVersion = true ? "0.28.
|
|
5477
|
+
var cliVersion = true ? "0.28.1094" : "dev";
|
|
5478
5478
|
async function fetchLatestVersion() {
|
|
5479
5479
|
const host2 = getHost();
|
|
5480
5480
|
if (!host2) return null;
|
|
@@ -6734,7 +6734,7 @@ function handleError(err) {
|
|
|
6734
6734
|
}
|
|
6735
6735
|
|
|
6736
6736
|
// src/bin/agt.ts
|
|
6737
|
-
var cliVersion2 = true ? "0.28.
|
|
6737
|
+
var cliVersion2 = true ? "0.28.1094" : "dev";
|
|
6738
6738
|
var program = new Command();
|
|
6739
6739
|
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");
|
|
6740
6740
|
program.hook("preAction", async (thisCommand, actionCommand) => {
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
rotateDailySession,
|
|
25
25
|
sessionFileExists,
|
|
26
26
|
todayLocalIso
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-KEMDLWTE.js";
|
|
28
28
|
import {
|
|
29
29
|
classifyUnanswerablePane,
|
|
30
30
|
findUsageLimitResetHint,
|
|
@@ -6113,4 +6113,4 @@ export {
|
|
|
6113
6113
|
stopAllSessionsAndWait,
|
|
6114
6114
|
getProjectDir
|
|
6115
6115
|
};
|
|
6116
|
-
//# sourceMappingURL=chunk-
|
|
6116
|
+
//# sourceMappingURL=chunk-6VIH2UFL.js.map
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
parseEnvFileEntries,
|
|
17
17
|
parseEnvIntegrations,
|
|
18
18
|
shellQuote
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-6VIH2UFL.js";
|
|
20
20
|
import {
|
|
21
21
|
BIND_FAILURE_QUARANTINE_THRESHOLD,
|
|
22
22
|
INTEGRATIONS_SECTION_END,
|
|
@@ -79,7 +79,7 @@ import {
|
|
|
79
79
|
sessionTranscriptDir,
|
|
80
80
|
worseConnectivityOutcome,
|
|
81
81
|
wrapScheduledTaskPrompt
|
|
82
|
-
} from "./chunk-
|
|
82
|
+
} from "./chunk-KEMDLWTE.js";
|
|
83
83
|
import {
|
|
84
84
|
classifyUnanswerablePane,
|
|
85
85
|
isConsumerTermsDialogVisible,
|
|
@@ -7122,7 +7122,7 @@ function exchangeFailureKind(err) {
|
|
|
7122
7122
|
}
|
|
7123
7123
|
|
|
7124
7124
|
// src/lib/api-client.ts
|
|
7125
|
-
var agtCliVersion = true ? "0.28.
|
|
7125
|
+
var agtCliVersion = true ? "0.28.1094" : "dev";
|
|
7126
7126
|
var lastConfigHash = null;
|
|
7127
7127
|
function setConfigHash(hash) {
|
|
7128
7128
|
lastConfigHash = hash && hash.length > 0 ? hash : null;
|
|
@@ -12095,4 +12095,4 @@ export {
|
|
|
12095
12095
|
managerInstallSystemUnitCommand,
|
|
12096
12096
|
managerUninstallSystemUnitCommand
|
|
12097
12097
|
};
|
|
12098
|
-
//# sourceMappingURL=chunk-
|
|
12098
|
+
//# sourceMappingURL=chunk-JJYOF5KM.js.map
|
|
@@ -11997,7 +11997,13 @@ var HTTP_PROBE_PROVIDERS = /* @__PURE__ */ new Set([
|
|
|
11997
11997
|
// CS-1863: Storrito, added with the integration. A deleted API credential
|
|
11998
11998
|
// answers with a redirect to the login page rather than a 401, so without a
|
|
11999
11999
|
// probe a dead token would surface only as failed story posts.
|
|
12000
|
-
"storrito"
|
|
12000
|
+
"storrito",
|
|
12001
|
+
// CS-1972: Botify, added with the integration. A Botify API token never
|
|
12002
|
+
// expires on its own - it dies when a user regenerates it or leaves - and the
|
|
12003
|
+
// integration is read-only, so without a probe a dead token would surface
|
|
12004
|
+
// only as failed queries. Routes to `probeBotify` against the install's
|
|
12005
|
+
// `GET /projects/{username}`.
|
|
12006
|
+
"botify"
|
|
12001
12007
|
// ENG-6100: GitHub is deliberately NOT here. This set drives the ASYNC
|
|
12002
12008
|
// connectivity monitor's routing, where github (source_type='native')
|
|
12003
12009
|
// stays host-side (cli_command — `gh`, the credential the agent actually
|
|
@@ -12571,10 +12577,64 @@ async function probeStorrito(creds, fetchImpl, config) {
|
|
|
12571
12577
|
return networkOutcome(err, String(token));
|
|
12572
12578
|
}
|
|
12573
12579
|
}
|
|
12580
|
+
var BOTIFY_SLUG_RE = /^[A-Za-z0-9][A-Za-z0-9._-]{0,99}$/;
|
|
12581
|
+
async function probeBotify(creds, fetchImpl, config) {
|
|
12582
|
+
const token = creds.api_key ?? creds.access_token;
|
|
12583
|
+
if (!token)
|
|
12584
|
+
return { status: "down", message: "No credential present" };
|
|
12585
|
+
const username = typeof config?.["username"] === "string" ? config["username"].trim() : "";
|
|
12586
|
+
if (!BOTIFY_SLUG_RE.test(username)) {
|
|
12587
|
+
return {
|
|
12588
|
+
status: "down",
|
|
12589
|
+
message: "Botify username is missing or invalid - set it on the install (the first part of app.botify.com/<username>/<project>)"
|
|
12590
|
+
};
|
|
12591
|
+
}
|
|
12592
|
+
try {
|
|
12593
|
+
const res = await timedFetch(fetchImpl, `https://api.botify.com/v1/projects/${encodeURIComponent(username)}?size=1`, { headers: { Authorization: `Token ${token}`, Accept: "application/json" } });
|
|
12594
|
+
if (res.status === 401) {
|
|
12595
|
+
return {
|
|
12596
|
+
status: "down",
|
|
12597
|
+
cause: "auth_rejected",
|
|
12598
|
+
message: "Botify rejected the token (401) - it was regenerated, mistyped or its user was removed"
|
|
12599
|
+
};
|
|
12600
|
+
}
|
|
12601
|
+
if (res.status === 403 || res.status === 404) {
|
|
12602
|
+
return {
|
|
12603
|
+
status: "degraded",
|
|
12604
|
+
cause: "auth_rejected",
|
|
12605
|
+
message: `Botify accepted the token but cannot show account "${username}" (${res.status}) - check the install's username and that the token's user can see that account`
|
|
12606
|
+
};
|
|
12607
|
+
}
|
|
12608
|
+
if (!res.ok) {
|
|
12609
|
+
const message = res.status === 429 ? rateLimitMessage("Botify", res.status) : `Botify API returned ${res.status}`;
|
|
12610
|
+
return { status: statusForHttp(res.status), cause: causeForHttp(res.status), message };
|
|
12611
|
+
}
|
|
12612
|
+
let body = null;
|
|
12613
|
+
try {
|
|
12614
|
+
body = await res.json();
|
|
12615
|
+
} catch {
|
|
12616
|
+
body = null;
|
|
12617
|
+
}
|
|
12618
|
+
if (!Array.isArray(body?.results)) {
|
|
12619
|
+
return { status: "down", message: "Botify returned 200 without a project list - not a Botify API response" };
|
|
12620
|
+
}
|
|
12621
|
+
if (body.results.length === 0) {
|
|
12622
|
+
return {
|
|
12623
|
+
status: "degraded",
|
|
12624
|
+
message: `Connected to Botify, but account "${username}" has no active project this token can see`
|
|
12625
|
+
};
|
|
12626
|
+
}
|
|
12627
|
+
return { status: "ok", message: `Connected to Botify (account ${username})` };
|
|
12628
|
+
} catch (err) {
|
|
12629
|
+
return networkOutcome(err, String(token));
|
|
12630
|
+
}
|
|
12631
|
+
}
|
|
12574
12632
|
async function probeHttpProvider(definitionId, credentials, fetchImpl = fetch, config) {
|
|
12575
12633
|
switch (definitionId) {
|
|
12576
12634
|
case "storrito":
|
|
12577
12635
|
return probeStorrito(credentials, fetchImpl, config);
|
|
12636
|
+
case "botify":
|
|
12637
|
+
return probeBotify(credentials, fetchImpl, config);
|
|
12578
12638
|
case "linear":
|
|
12579
12639
|
return probeLinear(credentials, fetchImpl);
|
|
12580
12640
|
case "buffer":
|
|
@@ -16385,4 +16445,4 @@ export {
|
|
|
16385
16445
|
peekCurrentSession,
|
|
16386
16446
|
readDailySessionPin
|
|
16387
16447
|
};
|
|
16388
|
-
//# sourceMappingURL=chunk-
|
|
16448
|
+
//# sourceMappingURL=chunk-KEMDLWTE.js.map
|