@integrity-labs/agt-cli 0.28.1189 → 0.28.1190
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 +6 -6
- package/dist/{chunk-BG7IPLTE.js → chunk-55M26Q4M.js} +2 -2
- package/dist/{chunk-M5QY6SXB.js → chunk-7GZKHF45.js} +9 -4
- package/dist/{chunk-M5QY6SXB.js.map → chunk-7GZKHF45.js.map} +1 -1
- package/dist/{chunk-CJ3KE25W.js → chunk-EFTLDAKN.js} +3 -3
- package/dist/{chunk-GYY5LC6U.js → chunk-KV6ZNGTG.js} +2 -2
- package/dist/{chunk-6C22ELAZ.js → chunk-NVLV6XHL.js} +54 -21
- package/dist/chunk-NVLV6XHL.js.map +1 -0
- package/dist/{claude-code-updater-CQ2SWFEJ.js → claude-code-updater-IU23JJZI.js} +3 -3
- package/dist/{claude-pair-runtime-N54HX4ZR.js → claude-pair-runtime-GMXVV5AJ.js} +3 -3
- package/dist/lib/manager-worker.js +28 -21
- package/dist/lib/manager-worker.js.map +1 -1
- package/dist/{persistent-session-NL7N3MA4.js → persistent-session-7PBVDLFI.js} +4 -4
- package/dist/{responsiveness-probe-BMLAPOIY.js → responsiveness-probe-RSH4EMQP.js} +4 -4
- package/dist/{session-auth-dead-PTHDHHK4.js → session-auth-dead-M2YABEQU.js} +3 -3
- package/package.json +1 -1
- package/dist/chunk-6C22ELAZ.js.map +0 -1
- /package/dist/{chunk-BG7IPLTE.js.map → chunk-55M26Q4M.js.map} +0 -0
- /package/dist/{chunk-CJ3KE25W.js.map → chunk-EFTLDAKN.js.map} +0 -0
- /package/dist/{chunk-GYY5LC6U.js.map → chunk-KV6ZNGTG.js.map} +0 -0
- /package/dist/{claude-code-updater-CQ2SWFEJ.js.map → claude-code-updater-IU23JJZI.js.map} +0 -0
- /package/dist/{claude-pair-runtime-N54HX4ZR.js.map → claude-pair-runtime-GMXVV5AJ.js.map} +0 -0
- /package/dist/{persistent-session-NL7N3MA4.js.map → persistent-session-7PBVDLFI.js.map} +0 -0
- /package/dist/{responsiveness-probe-BMLAPOIY.js.map → responsiveness-probe-RSH4EMQP.js.map} +0 -0
- /package/dist/{session-auth-dead-PTHDHHK4.js.map → session-auth-dead-M2YABEQU.js.map} +0 -0
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
rotateDailySession,
|
|
5
5
|
sessionFileExists,
|
|
6
6
|
todayLocalIso
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-KV6ZNGTG.js";
|
|
8
8
|
import {
|
|
9
9
|
classifyUnanswerablePane,
|
|
10
10
|
customApiKeyDialogKeys,
|
|
@@ -51,7 +51,7 @@ import {
|
|
|
51
51
|
remoteMcpConnectionEnvInfix,
|
|
52
52
|
remoteMcpConnectionLabel,
|
|
53
53
|
remoteMcpConnectionScopedEnvVar
|
|
54
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-7GZKHF45.js";
|
|
55
55
|
import {
|
|
56
56
|
CLAUDE_CONFIG_DIR_ENV,
|
|
57
57
|
approveApiKeyInClaudeConfig,
|
|
@@ -6173,4 +6173,4 @@ export {
|
|
|
6173
6173
|
stopAllSessionsAndWait,
|
|
6174
6174
|
getProjectDir
|
|
6175
6175
|
};
|
|
6176
|
-
//# sourceMappingURL=chunk-
|
|
6176
|
+
//# sourceMappingURL=chunk-EFTLDAKN.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
encodeClaudeProjectPath
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-7GZKHF45.js";
|
|
4
4
|
|
|
5
5
|
// src/lib/daily-session.ts
|
|
6
6
|
import { randomUUID } from "crypto";
|
|
@@ -240,4 +240,4 @@ export {
|
|
|
240
240
|
peekPreviousSession,
|
|
241
241
|
readDailySessionPin
|
|
242
242
|
};
|
|
243
|
-
//# sourceMappingURL=chunk-
|
|
243
|
+
//# sourceMappingURL=chunk-KV6ZNGTG.js.map
|
|
@@ -16,11 +16,11 @@ import {
|
|
|
16
16
|
parseEnvFileEntries,
|
|
17
17
|
parseEnvIntegrations,
|
|
18
18
|
shellQuote
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-EFTLDAKN.js";
|
|
20
20
|
import {
|
|
21
21
|
readDailySessionPin,
|
|
22
22
|
sessionTranscriptDir
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-KV6ZNGTG.js";
|
|
24
24
|
import {
|
|
25
25
|
classifyUnanswerablePane,
|
|
26
26
|
isConsumerTermsDialogVisible,
|
|
@@ -91,7 +91,7 @@ import {
|
|
|
91
91
|
scanConfigForLiteralSecrets,
|
|
92
92
|
worseConnectivityOutcome,
|
|
93
93
|
wrapScheduledTaskPrompt
|
|
94
|
-
} from "./chunk-
|
|
94
|
+
} from "./chunk-7GZKHF45.js";
|
|
95
95
|
import {
|
|
96
96
|
claudeJsonPathFor,
|
|
97
97
|
effectiveClaudeJsonPath,
|
|
@@ -8079,7 +8079,7 @@ function exchangeFailureKind(err) {
|
|
|
8079
8079
|
}
|
|
8080
8080
|
|
|
8081
8081
|
// src/lib/api-client.ts
|
|
8082
|
-
var agtCliVersion = true ? "0.28.
|
|
8082
|
+
var agtCliVersion = true ? "0.28.1190" : "dev";
|
|
8083
8083
|
var lastConfigHash = null;
|
|
8084
8084
|
function setConfigHash(hash) {
|
|
8085
8085
|
lastConfigHash = hash && hash.length > 0 ? hash : null;
|
|
@@ -10623,21 +10623,47 @@ import { delimiter as pathDelimiter, join as join8 } from "path";
|
|
|
10623
10623
|
import { existsSync as existsSync7, readFileSync as readFileSync8 } from "fs";
|
|
10624
10624
|
import { homedir as homedir6 } from "os";
|
|
10625
10625
|
|
|
10626
|
+
// src/lib/probe-message-redact.ts
|
|
10627
|
+
var MIN_SECRET_LENGTH = 8;
|
|
10628
|
+
function stringsIn(value) {
|
|
10629
|
+
if (typeof value === "string") return [value];
|
|
10630
|
+
if (value === null || typeof value !== "object") return [];
|
|
10631
|
+
return Object.values(value).flatMap(stringsIn);
|
|
10632
|
+
}
|
|
10633
|
+
function longestKnownValue(sources) {
|
|
10634
|
+
return sources.flatMap(stringsIn).filter((v) => v.length >= MIN_SECRET_LENGTH).reduce((longest, v) => Math.max(longest, v.length), 0);
|
|
10635
|
+
}
|
|
10636
|
+
function redactKnownValues(text, sources) {
|
|
10637
|
+
const values = sources.flatMap(stringsIn).filter((v) => v.length >= MIN_SECRET_LENGTH).sort((a, b) => b.length - a.length);
|
|
10638
|
+
return values.reduce((out, value) => out.split(value).join("[redacted]"), text);
|
|
10639
|
+
}
|
|
10640
|
+
|
|
10626
10641
|
// src/lib/mcp-stdio-probe.ts
|
|
10627
10642
|
import { spawn } from "child_process";
|
|
10628
10643
|
var DEFAULT_TIMEOUT_MS = 15e3;
|
|
10644
|
+
var STDERR_TAIL_MAX = 500;
|
|
10645
|
+
var STDERR_KEEP_MIN = 64 * 1024;
|
|
10646
|
+
var TOOL_ERROR_TEXT_MAX = 1e3;
|
|
10647
|
+
function toolErrorText(result, env) {
|
|
10648
|
+
const content = result?.content;
|
|
10649
|
+
if (!Array.isArray(content)) return void 0;
|
|
10650
|
+
const text = content.map((part) => part?.text).filter((t) => typeof t === "string").join(" ");
|
|
10651
|
+
return redactKnownValues(text, [env]).replace(/\s+/g, " ").trim().slice(0, TOOL_ERROR_TEXT_MAX) || void 0;
|
|
10652
|
+
}
|
|
10629
10653
|
async function probeMcpStdio(config) {
|
|
10630
10654
|
const timeoutMs = config.timeoutMs ?? DEFAULT_TIMEOUT_MS;
|
|
10655
|
+
const childEnv = { ...process.env, ...config.env ?? {} };
|
|
10631
10656
|
const child = spawn(config.command, config.args ?? [], {
|
|
10632
10657
|
// Faithful reproduction of the real spawn: the child inherits the manager's
|
|
10633
10658
|
// process env (PATH/HOME so `node`/`npx` resolve) with the entry's env
|
|
10634
10659
|
// overlaid, exactly as Claude Code spawns it.
|
|
10635
|
-
env:
|
|
10660
|
+
env: childEnv,
|
|
10636
10661
|
cwd: config.cwd,
|
|
10637
10662
|
stdio: ["pipe", "pipe", "pipe"]
|
|
10638
10663
|
});
|
|
10639
10664
|
let stdout = "";
|
|
10640
|
-
let
|
|
10665
|
+
let stderrBuffer = "";
|
|
10666
|
+
const stderrKeep = Math.max(STDERR_KEEP_MIN, 2 * longestKnownValue([childEnv]) + STDERR_TAIL_MAX);
|
|
10641
10667
|
const pending = /* @__PURE__ */ new Map();
|
|
10642
10668
|
return await new Promise((resolve) => {
|
|
10643
10669
|
let done = false;
|
|
@@ -10650,7 +10676,7 @@ async function probeMcpStdio(config) {
|
|
|
10650
10676
|
child.kill("SIGKILL");
|
|
10651
10677
|
} catch {
|
|
10652
10678
|
}
|
|
10653
|
-
resolve(outcome);
|
|
10679
|
+
resolve(outcome.message ? { ...outcome, message: redactKnownValues(outcome.message, [childEnv]) } : outcome);
|
|
10654
10680
|
};
|
|
10655
10681
|
const timer = setTimeout(() => {
|
|
10656
10682
|
finish({
|
|
@@ -10670,15 +10696,17 @@ async function probeMcpStdio(config) {
|
|
|
10670
10696
|
if (!done) {
|
|
10671
10697
|
finish({
|
|
10672
10698
|
status: "down",
|
|
10673
|
-
message: `MCP server exited (code ${code ?? "null"})${
|
|
10699
|
+
message: `MCP server exited (code ${code ?? "null"})${stderrBuffer ? `: ${redactKnownValues(stderrBuffer, [childEnv]).trim().slice(-200)}` : ""}`
|
|
10674
10700
|
});
|
|
10675
10701
|
}
|
|
10676
10702
|
});
|
|
10677
10703
|
child.stdin.on("error", () => {
|
|
10678
10704
|
});
|
|
10705
|
+
child.stderr.setEncoding("utf8");
|
|
10679
10706
|
child.stderr.on("data", (d) => {
|
|
10680
|
-
|
|
10707
|
+
stderrBuffer = (stderrBuffer + d).slice(-stderrKeep);
|
|
10681
10708
|
});
|
|
10709
|
+
child.stdout.setEncoding("utf8");
|
|
10682
10710
|
child.stdout.on("data", (d) => {
|
|
10683
10711
|
stdout += d.toString();
|
|
10684
10712
|
let nl;
|
|
@@ -10732,7 +10760,11 @@ async function probeMcpStdio(config) {
|
|
|
10732
10760
|
if (done) return;
|
|
10733
10761
|
if (call.error) return finish({ status: "down", message: `MCP tools/call ${testTool} error: ${call.error.message ?? "unknown"}` });
|
|
10734
10762
|
if (call.result?.isError === true) {
|
|
10735
|
-
|
|
10763
|
+
const reason = toolErrorText(call.result, childEnv);
|
|
10764
|
+
return finish({
|
|
10765
|
+
status: "down",
|
|
10766
|
+
message: `MCP tool ${testTool} returned an error result${reason ? `: ${reason}` : ""}`
|
|
10767
|
+
});
|
|
10736
10768
|
}
|
|
10737
10769
|
return finish({
|
|
10738
10770
|
status: "ok",
|
|
@@ -10990,13 +11022,13 @@ function didNotRunReasonFor(text, exitCode) {
|
|
|
10990
11022
|
}
|
|
10991
11023
|
var CREDENTIAL_SHAPED = /\b(gh[pousr]_[A-Za-z0-9]{16,}|github_pat_[A-Za-z0-9_]{20,}|xox[abprs]-[A-Za-z0-9-]{10,}|sk-[A-Za-z0-9]{20,}|eyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}|AKIA[0-9A-Z]{16})\b/g;
|
|
10992
11024
|
var MAX_MESSAGE_CHARS = 200;
|
|
10993
|
-
function redactAndBound(line) {
|
|
10994
|
-
const redacted = line.replace(CREDENTIAL_SHAPED, "<redacted>");
|
|
11025
|
+
function redactAndBound(line, childEnv) {
|
|
11026
|
+
const redacted = redactKnownValues(line, [childEnv]).replace(CREDENTIAL_SHAPED, "<redacted>");
|
|
10995
11027
|
return redacted.length > MAX_MESSAGE_CHARS ? `${redacted.slice(0, MAX_MESSAGE_CHARS - 1)}\u2026` : redacted;
|
|
10996
11028
|
}
|
|
10997
|
-
function firstMeaningfulLine(stderr, stdout, fallback) {
|
|
11029
|
+
function firstMeaningfulLine(stderr, stdout, fallback, childEnv) {
|
|
10998
11030
|
const line = firstReasonLine(stderr, "failure") ?? firstReasonLine(stdout, "failure") ?? firstReasonLine(fallback, "failure") ?? "";
|
|
10999
|
-
return redactAndBound(line);
|
|
11031
|
+
return redactAndBound(line, childEnv);
|
|
11000
11032
|
}
|
|
11001
11033
|
function firstReasonLine(v, lane = "ok") {
|
|
11002
11034
|
const contradicts = lane === "failure" ? GH_SUCCESS_MARKER : GH_FAILURE_MARKER;
|
|
@@ -11056,7 +11088,7 @@ function runCliProbe(binary, args, opts = {}) {
|
|
|
11056
11088
|
const firstLine = firstReasonLine(stdout, "ok");
|
|
11057
11089
|
resolve({
|
|
11058
11090
|
status: "ok",
|
|
11059
|
-
message: firstLine ? `${binary}: ${redactAndBound(firstLine)}` : `${binary}: ok`
|
|
11091
|
+
message: firstLine ? `${binary}: ${redactAndBound(firstLine, childEnv)}` : `${binary}: ok`
|
|
11060
11092
|
});
|
|
11061
11093
|
return;
|
|
11062
11094
|
}
|
|
@@ -11065,9 +11097,9 @@ function runCliProbe(binary, args, opts = {}) {
|
|
|
11065
11097
|
logSearchedPath(binary, childEnv, "ENOENT \u2014 no such binary anywhere on it");
|
|
11066
11098
|
resolve({
|
|
11067
11099
|
status: "unverified",
|
|
11068
|
-
// ENG-9173 vocabulary: say WHY in the field
|
|
11100
|
+
// ENG-9173 vocabulary: say WHY in the field code can branch on. The
|
|
11069
11101
|
// status alone cannot distinguish this from any other unverified
|
|
11070
|
-
// row, and the message below is
|
|
11102
|
+
// row, and the message below is for humans only.
|
|
11071
11103
|
cause: "not_run",
|
|
11072
11104
|
message: `${binary} not found on PATH \u2014 the probe could not run, so this is NOT a verdict about the integration. If the agent uses a per-agent binary (e.g. the .claude/agt-bin shim), the probe's PATH must include it.`
|
|
11073
11105
|
});
|
|
@@ -11094,7 +11126,7 @@ ${e.message}`;
|
|
|
11094
11126
|
// catches a shim which started and could not find the tool behind
|
|
11095
11127
|
// it, which is the shape that actually reaches production.
|
|
11096
11128
|
cause: "not_run",
|
|
11097
|
-
message: `${binary} probe did not run \u2014 ${didNotRun}. This is NOT a verdict about the integration: ${firstMeaningfulLine(stderr, stdout, e.message)}`
|
|
11129
|
+
message: `${binary} probe did not run \u2014 ${didNotRun}. This is NOT a verdict about the integration: ${firstMeaningfulLine(stderr, stdout, e.message, childEnv)}`
|
|
11098
11130
|
});
|
|
11099
11131
|
return;
|
|
11100
11132
|
}
|
|
@@ -11105,14 +11137,14 @@ ${e.message}`;
|
|
|
11105
11137
|
// ENG-10529: present only when the matched signature carries one.
|
|
11106
11138
|
// The broker entry deliberately carries none — see its comment.
|
|
11107
11139
|
...transient.cause ? { cause: transient.cause } : {},
|
|
11108
|
-
message: `${binary} probe inconclusive \u2014 ${transient.reason}: ${firstMeaningfulLine(stderr, stdout, e.message)}`
|
|
11140
|
+
message: `${binary} probe inconclusive \u2014 ${transient.reason}: ${firstMeaningfulLine(stderr, stdout, e.message, childEnv)}`
|
|
11109
11141
|
});
|
|
11110
11142
|
return;
|
|
11111
11143
|
}
|
|
11112
11144
|
resolve({
|
|
11113
11145
|
status: "down",
|
|
11114
11146
|
.../* @__PURE__ */ ((c) => c ? { cause: c } : {})(downCauseFor(diagnostic)),
|
|
11115
|
-
message: `${binary} exited non-zero: ${firstMeaningfulLine(stderr, stdout, e.message)}`
|
|
11147
|
+
message: `${binary} exited non-zero: ${firstMeaningfulLine(stderr, stdout, e.message, childEnv)}`
|
|
11116
11148
|
});
|
|
11117
11149
|
}
|
|
11118
11150
|
);
|
|
@@ -13579,6 +13611,7 @@ export {
|
|
|
13579
13611
|
givenUpMcpServerKeys,
|
|
13580
13612
|
describeBlockedPromptHold,
|
|
13581
13613
|
reapMissingMcpSessions,
|
|
13614
|
+
redactKnownValues,
|
|
13582
13615
|
markQuarantinedForProbe,
|
|
13583
13616
|
FIRST_CONNECT_WINDOW_MS,
|
|
13584
13617
|
isWithinReconnectQuiesceWindow,
|
|
@@ -13614,4 +13647,4 @@ export {
|
|
|
13614
13647
|
managerInstallSystemUnitCommand,
|
|
13615
13648
|
managerUninstallSystemUnitCommand
|
|
13616
13649
|
};
|
|
13617
|
-
//# sourceMappingURL=chunk-
|
|
13650
|
+
//# sourceMappingURL=chunk-NVLV6XHL.js.map
|