@integrity-labs/agt-cli 0.28.446 → 0.28.447
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 +4 -4
- package/dist/{chunk-O25GO4PT.js → chunk-FUFWZKTD.js} +3 -3
- package/dist/{chunk-QCEQRMBX.js → chunk-ZZX5YKRV.js} +84 -2
- package/dist/chunk-ZZX5YKRV.js.map +1 -0
- package/dist/{claude-pair-runtime-RREPXSJ6.js → claude-pair-runtime-QRPID3CT.js} +2 -2
- package/dist/lib/manager-worker.js +10 -10
- package/dist/{persistent-session-BE2VK74O.js → persistent-session-ZFYA3PVC.js} +2 -2
- package/dist/{responsiveness-probe-SSJ4ONTA.js → responsiveness-probe-AKOCOY53.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-QCEQRMBX.js.map +0 -1
- /package/dist/{chunk-O25GO4PT.js.map → chunk-FUFWZKTD.js.map} +0 -0
- /package/dist/{claude-pair-runtime-RREPXSJ6.js.map → claude-pair-runtime-QRPID3CT.js.map} +0 -0
- /package/dist/{persistent-session-BE2VK74O.js.map → persistent-session-ZFYA3PVC.js.map} +0 -0
- /package/dist/{responsiveness-probe-SSJ4ONTA.js.map → responsiveness-probe-AKOCOY53.js.map} +0 -0
package/dist/bin/agt.js
CHANGED
|
@@ -40,7 +40,7 @@ import {
|
|
|
40
40
|
success,
|
|
41
41
|
table,
|
|
42
42
|
warn
|
|
43
|
-
} from "../chunk-
|
|
43
|
+
} from "../chunk-FUFWZKTD.js";
|
|
44
44
|
import {
|
|
45
45
|
AnchorSessionClient,
|
|
46
46
|
CHANNEL_REGISTRY,
|
|
@@ -71,7 +71,7 @@ import {
|
|
|
71
71
|
requiredMcpWildcard,
|
|
72
72
|
resolveChannels,
|
|
73
73
|
serializeManifestForSlackCli
|
|
74
|
-
} from "../chunk-
|
|
74
|
+
} from "../chunk-ZZX5YKRV.js";
|
|
75
75
|
import "../chunk-XWVM4KPK.js";
|
|
76
76
|
|
|
77
77
|
// src/bin/agt.ts
|
|
@@ -4830,7 +4830,7 @@ import { execFileSync, execSync } from "child_process";
|
|
|
4830
4830
|
import { existsSync as existsSync10, realpathSync as realpathSync2 } from "fs";
|
|
4831
4831
|
import chalk18 from "chalk";
|
|
4832
4832
|
import ora16 from "ora";
|
|
4833
|
-
var cliVersion = true ? "0.28.
|
|
4833
|
+
var cliVersion = true ? "0.28.447" : "dev";
|
|
4834
4834
|
async function fetchLatestVersion() {
|
|
4835
4835
|
const host2 = getHost();
|
|
4836
4836
|
if (!host2) return null;
|
|
@@ -6002,7 +6002,7 @@ function handleError(err) {
|
|
|
6002
6002
|
}
|
|
6003
6003
|
|
|
6004
6004
|
// src/bin/agt.ts
|
|
6005
|
-
var cliVersion2 = true ? "0.28.
|
|
6005
|
+
var cliVersion2 = true ? "0.28.447" : "dev";
|
|
6006
6006
|
var program = new Command();
|
|
6007
6007
|
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");
|
|
6008
6008
|
program.hook("preAction", async (thisCommand, actionCommand) => {
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
resolveConnectivityProbe,
|
|
30
30
|
worseConnectivityOutcome,
|
|
31
31
|
wrapScheduledTaskPrompt
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-ZZX5YKRV.js";
|
|
33
33
|
import {
|
|
34
34
|
parsePsRows
|
|
35
35
|
} from "./chunk-XWVM4KPK.js";
|
|
@@ -4910,7 +4910,7 @@ function requireHost() {
|
|
|
4910
4910
|
}
|
|
4911
4911
|
|
|
4912
4912
|
// src/lib/api-client.ts
|
|
4913
|
-
var agtCliVersion = true ? "0.28.
|
|
4913
|
+
var agtCliVersion = true ? "0.28.447" : "dev";
|
|
4914
4914
|
var lastConfigHash = null;
|
|
4915
4915
|
function setConfigHash(hash) {
|
|
4916
4916
|
lastConfigHash = hash && hash.length > 0 ? hash : null;
|
|
@@ -7411,4 +7411,4 @@ export {
|
|
|
7411
7411
|
managerInstallSystemUnitCommand,
|
|
7412
7412
|
managerUninstallSystemUnitCommand
|
|
7413
7413
|
};
|
|
7414
|
-
//# sourceMappingURL=chunk-
|
|
7414
|
+
//# sourceMappingURL=chunk-FUFWZKTD.js.map
|
|
@@ -12728,7 +12728,59 @@ function isResumeModeDialogVisible(screen) {
|
|
|
12728
12728
|
function isSessionFeedbackDialogVisible(screen) {
|
|
12729
12729
|
return screen.includes("How is Claude doing this session") && screen.includes("0: Dismiss");
|
|
12730
12730
|
}
|
|
12731
|
+
var USAGE_LIMIT_SAFE_OPTION = "Stop and wait for limit to reset";
|
|
12732
|
+
var USAGE_LIMIT_BLOCK_LINES = 6;
|
|
12733
|
+
var BILLING_OPTIONS = ["Switch to usage credits", "Switch to Team plan"];
|
|
12734
|
+
function optionRowDigit(line2, label) {
|
|
12735
|
+
const m = line2.match(
|
|
12736
|
+
new RegExp(
|
|
12737
|
+
String.raw`^[^\S\n]*(?:❯[^\S\n]*)?(\d)\.[^\S\n]*` + label.replace(/[.*+?^${}()|[\]\\]/g, String.raw`\$&`)
|
|
12738
|
+
)
|
|
12739
|
+
);
|
|
12740
|
+
return m?.[1] ?? null;
|
|
12741
|
+
}
|
|
12742
|
+
function usageLimitModalBlock(screen) {
|
|
12743
|
+
const lines = screen.split("\n");
|
|
12744
|
+
let footer = -1;
|
|
12745
|
+
for (let i = lines.length - 1; i >= 0; i--) {
|
|
12746
|
+
if (lines[i].includes("Enter to confirm")) {
|
|
12747
|
+
footer = i;
|
|
12748
|
+
break;
|
|
12749
|
+
}
|
|
12750
|
+
}
|
|
12751
|
+
if (footer < 0) return null;
|
|
12752
|
+
const block = lines.slice(Math.max(0, footer - USAGE_LIMIT_BLOCK_LINES), footer);
|
|
12753
|
+
const hasBillingRow = block.some(
|
|
12754
|
+
(l) => BILLING_OPTIONS.some((label) => optionRowDigit(l, label) !== null)
|
|
12755
|
+
);
|
|
12756
|
+
return hasBillingRow ? block : null;
|
|
12757
|
+
}
|
|
12758
|
+
function isUsageLimitChoiceDialogVisible(screen) {
|
|
12759
|
+
return usageLimitModalBlock(screen) !== null;
|
|
12760
|
+
}
|
|
12761
|
+
function findUsageLimitSafeOptionKey(screen) {
|
|
12762
|
+
const block = usageLimitModalBlock(screen);
|
|
12763
|
+
if (!block) return null;
|
|
12764
|
+
for (const line2 of block) {
|
|
12765
|
+
const digit = optionRowDigit(line2, USAGE_LIMIT_SAFE_OPTION);
|
|
12766
|
+
if (digit !== null) return digit;
|
|
12767
|
+
}
|
|
12768
|
+
return null;
|
|
12769
|
+
}
|
|
12770
|
+
function isUnanswerableUsageLimitDialog(screen) {
|
|
12771
|
+
return isUsageLimitChoiceDialogVisible(screen) && findUsageLimitSafeOptionKey(screen) === null;
|
|
12772
|
+
}
|
|
12731
12773
|
function sweepDialogs(screen) {
|
|
12774
|
+
if (isUsageLimitChoiceDialogVisible(screen)) {
|
|
12775
|
+
const safeKey = findUsageLimitSafeOptionKey(screen);
|
|
12776
|
+
if (!safeKey) return null;
|
|
12777
|
+
return {
|
|
12778
|
+
kind: "usage-limit-choice",
|
|
12779
|
+
keys: [safeKey, "Enter"],
|
|
12780
|
+
interKeyDelayMs: 300,
|
|
12781
|
+
logMessage: `Auto-answered usage-limit choice dialog (picked '${USAGE_LIMIT_SAFE_OPTION}')`
|
|
12782
|
+
};
|
|
12783
|
+
}
|
|
12732
12784
|
if (screen.includes("Choose the text style") || screen.includes("Dark mode") && screen.includes("Light mode")) {
|
|
12733
12785
|
return {
|
|
12734
12786
|
kind: "theme-picker",
|
|
@@ -12824,6 +12876,13 @@ function decide(pane, prev, now, config = {}) {
|
|
|
12824
12876
|
if (dialogAction) {
|
|
12825
12877
|
return { fire: false, dialog: dialogAction, next: prev };
|
|
12826
12878
|
}
|
|
12879
|
+
if (isUnanswerableUsageLimitDialog(pane)) {
|
|
12880
|
+
return {
|
|
12881
|
+
fire: false,
|
|
12882
|
+
blockedDialog: "usage-limit-choice-unrecognised-options",
|
|
12883
|
+
next: prev
|
|
12884
|
+
};
|
|
12885
|
+
}
|
|
12827
12886
|
const inputText = extractInputBoxText(pane);
|
|
12828
12887
|
if (!inputText) {
|
|
12829
12888
|
return { fire: false, next: void 0 };
|
|
@@ -12905,7 +12964,12 @@ function checkOne(codeName, io, config, states) {
|
|
|
12905
12964
|
stuckThresholdMs: config.attachedStuckThresholdMs ?? ATTACHED_STUCK_THRESHOLD_MS
|
|
12906
12965
|
} : config;
|
|
12907
12966
|
const prev = states.get(codeName);
|
|
12908
|
-
const { fire, dialog, gaveUp, next } = decide(
|
|
12967
|
+
const { fire, dialog, gaveUp, blockedDialog, next } = decide(
|
|
12968
|
+
pane,
|
|
12969
|
+
prev,
|
|
12970
|
+
io.now(),
|
|
12971
|
+
effectiveConfig
|
|
12972
|
+
);
|
|
12909
12973
|
if (next === void 0) {
|
|
12910
12974
|
states.delete(codeName);
|
|
12911
12975
|
if (prev && prev.fires > 0) {
|
|
@@ -12923,6 +12987,12 @@ function checkOne(codeName, io, config, states) {
|
|
|
12923
12987
|
io.sendKeys(codeName, dialog.keys, dialog.interKeyDelayMs);
|
|
12924
12988
|
return;
|
|
12925
12989
|
}
|
|
12990
|
+
if (blockedDialog) {
|
|
12991
|
+
io.log(
|
|
12992
|
+
`[channel-input-watchdog] '${codeName}': BLOCKED DIALOG (${blockedDialog}) \u2014 refusing to send any key; needs a human to attach to the pane`
|
|
12993
|
+
);
|
|
12994
|
+
return;
|
|
12995
|
+
}
|
|
12926
12996
|
const text = extractInputBoxText(pane) ?? "";
|
|
12927
12997
|
const hash = next?.lastInputHash ?? simpleTextHash(text);
|
|
12928
12998
|
if (gaveUp) {
|
|
@@ -13685,6 +13755,12 @@ async function acceptDialogs(tmuxSession, codeName, log2, primaryModel = null, s
|
|
|
13685
13755
|
log2(`[persistent-session] ${dialogAction.logMessage} for '${codeName}'`);
|
|
13686
13756
|
continue;
|
|
13687
13757
|
}
|
|
13758
|
+
if (isUnanswerableUsageLimitDialog(screen)) {
|
|
13759
|
+
log2(
|
|
13760
|
+
`[persistent-session] BLOCKED DIALOG (usage-limit-choice-unrecognised-options) for '${codeName}' \u2014 refusing to send any key; needs a human to attach to the pane`
|
|
13761
|
+
);
|
|
13762
|
+
return;
|
|
13763
|
+
}
|
|
13688
13764
|
if (screen.includes("\u276F") && !screen.includes("Enter to confirm")) {
|
|
13689
13765
|
if (hasMcpChildren(tmuxSession)) {
|
|
13690
13766
|
log2(`[persistent-session] Session ready for '${codeName}' \u2014 MCP servers spawned`);
|
|
@@ -13799,6 +13875,12 @@ async function preSendPaneHygiene(tmuxSession, codeName, log2) {
|
|
|
13799
13875
|
await new Promise((r) => setTimeout(r, 300));
|
|
13800
13876
|
screen = paneCapture(tmuxSession) ?? "";
|
|
13801
13877
|
}
|
|
13878
|
+
if (isUnanswerableUsageLimitDialog(screen)) {
|
|
13879
|
+
log2(
|
|
13880
|
+
`[inject] BLOCKED DIALOG (usage-limit-choice-unrecognised-options) for '${codeName}' \u2014 skipping pane hygiene; needs a human to attach to the pane`
|
|
13881
|
+
);
|
|
13882
|
+
return;
|
|
13883
|
+
}
|
|
13802
13884
|
const orphan = extractInputBoxText(screen);
|
|
13803
13885
|
if (orphan) {
|
|
13804
13886
|
log2(
|
|
@@ -14313,4 +14395,4 @@ export {
|
|
|
14313
14395
|
stopAllSessionsAndWait,
|
|
14314
14396
|
getProjectDir
|
|
14315
14397
|
};
|
|
14316
|
-
//# sourceMappingURL=chunk-
|
|
14398
|
+
//# sourceMappingURL=chunk-ZZX5YKRV.js.map
|