agent-shim 7.2.0 → 7.3.0
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/cli.cjs
CHANGED
|
@@ -61051,7 +61051,7 @@ function resolveLaunchIdentity(paths, cwd) {
|
|
|
61051
61051
|
// package.json
|
|
61052
61052
|
var package_default = {
|
|
61053
61053
|
name: "agent-shim",
|
|
61054
|
-
version: "7.
|
|
61054
|
+
version: "7.3.0",
|
|
61055
61055
|
description: "A profile manager and launcher for Claude Code that lets one person run multiple logins from one machine while controlling what gets shared between them.",
|
|
61056
61056
|
license: "MIT",
|
|
61057
61057
|
author: "Joseph Mearman <joseph@mearman.co.uk>",
|
|
@@ -64432,6 +64432,10 @@ function redactBody(chunk) {
|
|
|
64432
64432
|
return redactText(text2);
|
|
64433
64433
|
}
|
|
64434
64434
|
}
|
|
64435
|
+
var CAPTURE_ENV = "AGENT_SHIM_FRONTDOOR_CAPTURE";
|
|
64436
|
+
function captureFromEnv(env, logsDir) {
|
|
64437
|
+
return env[CAPTURE_ENV] === "1" ? createFileCapture(path28.join(logsDir, "frontdoor-capture.jsonl")) : void 0;
|
|
64438
|
+
}
|
|
64435
64439
|
function createFileCapture(file2, now = () => /* @__PURE__ */ new Date()) {
|
|
64436
64440
|
fs11.mkdirSync(path28.dirname(file2), { recursive: true });
|
|
64437
64441
|
let nextId = 0;
|
|
@@ -66957,7 +66961,7 @@ function realFrontDoorSupervisorPorts(paths) {
|
|
|
66957
66961
|
},
|
|
66958
66962
|
startConnectListener: async (preferredPort) => {
|
|
66959
66963
|
const leafFor = createLeafCache(loadCa(), () => /* @__PURE__ */ new Date());
|
|
66960
|
-
const capture = process.env
|
|
66964
|
+
const capture = captureFromEnv(process.env, paths.logsDir);
|
|
66961
66965
|
if (capture !== void 0) {
|
|
66962
66966
|
log(`capture enabled, recording CONNECT targets and piped exchanges to ${import_node_path29.default.join(paths.logsDir, "frontdoor-capture.jsonl")}`);
|
|
66963
66967
|
}
|
|
@@ -38,6 +38,10 @@ export declare function redactHeaders(headers: Readonly<IncomingHttpHeaders>): I
|
|
|
38
38
|
* Redacts one body excerpt for the capture file. A body that parses as JSON is redacted structurally (key-named credentials go even when their shape matches no pattern); anything else gets the substring patterns, which still catch the bearer and JWT forms an OAuth refresh or a Remote Control frame carries. Invalid UTF-8 decodes with replacement characters, which is fine: the excerpt exists to be read, not to be re-encoded.
|
|
39
39
|
*/
|
|
40
40
|
export declare function redactBody(chunk: Readonly<Buffer>): string;
|
|
41
|
+
/**
|
|
42
|
+
* The capture the door runs with, or undefined when the environment did not ask for one. Anything but `1` means off, the same exact-value vocabulary the other `AGENT_SHIM_*` diagnostics use, so a stray value never silently records traffic.
|
|
43
|
+
*/
|
|
44
|
+
export declare function captureFromEnv(env: NodeJS.ProcessEnv, logsDir: string): ConnectCapture | undefined;
|
|
41
45
|
/**
|
|
42
46
|
* Builds the file-backed capture: one JSON object per line, appended to `file` (conventionally `logs/frontdoor-capture.jsonl`), never read back by the door itself. The directory is created up front rather than per record, so a capture started against a fresh state root cannot race its own first append.
|
|
43
47
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-shim",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.3.0",
|
|
4
4
|
"description": "A profile manager and launcher for Claude Code that lets one person run multiple logins from one machine while controlling what gets shared between them.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Joseph Mearman <joseph@mearman.co.uk>",
|