claude-use 11.67.0 → 11.67.2
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/README.md +1 -1
- package/dist/cli.cjs +54 -16
- package/dist/index.cjs +10 -2
- package/dist/index.mjs +10 -2
- package/dist/types/index.d.ts +11 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -266,7 +266,7 @@ pnpm schema # regenerate schema/*.schema.json from src/config/schema.ts; CI
|
|
|
266
266
|
|
|
267
267
|
Run a single test file directly with `pnpm exec vitest run <path>`. Tests never touch a real identity: `vitest.config.ts` sets `AGENT_SHIM_HOME` to a throwaway directory, and a setup file refuses to run at all if that variable is unset or resolves to the real `~/.agent-shim`.
|
|
268
268
|
|
|
269
|
-
Commits are gated by Husky hooks: `commit-msg` enforces conventional-commit format, `pre-commit` runs `eslint --fix` on staged files and rejects merge/squash commits and mass deletions on `main`, and `pre-push` runs the full
|
|
269
|
+
Commits are gated by Husky hooks: `commit-msg` enforces conventional-commit format, `pre-commit` runs `eslint --fix` on staged files and rejects merge/squash commits and mass deletions on `main`, and `pre-push` runs typecheck, the schema drift check, knip and the tests related to what the push changes (CI runs the full suite) and also rejects a push that would delete more than 100 files on the remote.
|
|
270
270
|
|
|
271
271
|
A fresh clone needs one extra step before committing anything, since git stores filter definitions in `.git/config` rather than in the repository:
|
|
272
272
|
|
package/dist/cli.cjs
CHANGED
|
@@ -29675,6 +29675,9 @@ async function runSupervisor(initialConfig, ports, options = {}) {
|
|
|
29675
29675
|
return HEADROOM_SUPERVISOR_STILL_RUNNING;
|
|
29676
29676
|
}
|
|
29677
29677
|
ticks += 1;
|
|
29678
|
+
if (ports.rotateDaemonLog({ maxBytes: HEADROOM_LOG_MAX_BYTES, keptGenerations: HEADROOM_LOG_KEPT_GENERATIONS })) {
|
|
29679
|
+
ports.log(`agent-shim headroom supervisor: rotated the daemon log past ${String(HEADROOM_LOG_MAX_BYTES)} bytes, keeping ${String(HEADROOM_LOG_KEPT_GENERATIONS)} earlier file(s)`);
|
|
29680
|
+
}
|
|
29678
29681
|
config2 = ports.readConfig();
|
|
29679
29682
|
const settingsHash = hashSettings(config2.settings);
|
|
29680
29683
|
const inputs = currentHeadroomAllowlistInputs(fs31, paths, ports.frontDoorLiveness);
|
|
@@ -29825,7 +29828,7 @@ function lastLines(output2) {
|
|
|
29825
29828
|
const lines = redactText(output2).split("\n").map((line) => line.trim()).filter((line) => line !== "").map((line) => line.length > DAEMON_EXIT_LOG_LINE_CHARS ? `${line.slice(0, DAEMON_EXIT_LOG_LINE_CHARS)}...` : line);
|
|
29826
29829
|
return lines.length === 0 ? "(the daemon wrote nothing)" : lines.slice(-DAEMON_EXIT_LOG_LINES).join(" | ");
|
|
29827
29830
|
}
|
|
29828
|
-
var import_node_path9, HEADROOM_BACKOFF_BASE_MS, HEADROOM_BACKOFF_CAP_MS, HEADROOM_START_RETRY_BUDGET, HEADROOM_READY_TIMEOUT_MS, DAEMON_EXIT_LOG_LINES, DAEMON_EXIT_LOG_LINE_CHARS, DAEMON_LOG_TAIL_BYTES, HEADROOM_POLL_MS, MS_PER_MINUTE, STOP_POLL_MS, TERM_GRACE_MS, KILL_GRACE_MS, HEADROOM_SUPERVISOR_STILL_RUNNING;
|
|
29831
|
+
var import_node_path9, HEADROOM_BACKOFF_BASE_MS, HEADROOM_BACKOFF_CAP_MS, HEADROOM_START_RETRY_BUDGET, HEADROOM_READY_TIMEOUT_MS, DAEMON_EXIT_LOG_LINES, DAEMON_EXIT_LOG_LINE_CHARS, DAEMON_LOG_TAIL_BYTES, BYTES_PER_KIB, BYTES_PER_MIB, HEADROOM_LOG_MAX_MIB, HEADROOM_LOG_MAX_BYTES, HEADROOM_LOG_KEPT_GENERATIONS, HEADROOM_POLL_MS, MS_PER_MINUTE, STOP_POLL_MS, TERM_GRACE_MS, KILL_GRACE_MS, HEADROOM_SUPERVISOR_STILL_RUNNING;
|
|
29829
29832
|
var init_supervisor = __esm({
|
|
29830
29833
|
"src/headroom/supervisor.ts"() {
|
|
29831
29834
|
"use strict";
|
|
@@ -29845,6 +29848,11 @@ var init_supervisor = __esm({
|
|
|
29845
29848
|
DAEMON_EXIT_LOG_LINES = 6;
|
|
29846
29849
|
DAEMON_EXIT_LOG_LINE_CHARS = 400;
|
|
29847
29850
|
DAEMON_LOG_TAIL_BYTES = 8192;
|
|
29851
|
+
BYTES_PER_KIB = 1024;
|
|
29852
|
+
BYTES_PER_MIB = BYTES_PER_KIB * BYTES_PER_KIB;
|
|
29853
|
+
HEADROOM_LOG_MAX_MIB = 64;
|
|
29854
|
+
HEADROOM_LOG_MAX_BYTES = HEADROOM_LOG_MAX_MIB * BYTES_PER_MIB;
|
|
29855
|
+
HEADROOM_LOG_KEPT_GENERATIONS = 2;
|
|
29848
29856
|
HEADROOM_POLL_MS = 1e3;
|
|
29849
29857
|
MS_PER_MINUTE = 6e4;
|
|
29850
29858
|
STOP_POLL_MS = 100;
|
|
@@ -37379,7 +37387,7 @@ var init_package = __esm({
|
|
|
37379
37387
|
"package.json"() {
|
|
37380
37388
|
package_default = {
|
|
37381
37389
|
name: "claude-use",
|
|
37382
|
-
version: "11.67.
|
|
37390
|
+
version: "11.67.2",
|
|
37383
37391
|
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.",
|
|
37384
37392
|
license: "MIT",
|
|
37385
37393
|
author: "Joseph Mearman <joseph@mearman.co.uk>",
|
|
@@ -119453,11 +119461,16 @@ function createHeadroomKeeper(deps) {
|
|
|
119453
119461
|
ports.fs.removeRecursive(paths.headroomLockFile);
|
|
119454
119462
|
}
|
|
119455
119463
|
};
|
|
119456
|
-
const tick = () => {
|
|
119457
|
-
const
|
|
119464
|
+
const tick = async () => {
|
|
119465
|
+
const stateFiles = { stateFile: paths.headroomStateFile, legacyStateFile: paths.headroomLegacyStateFile };
|
|
119466
|
+
const sessions = listSessions(ports.fs, paths.headroomSessionsDir);
|
|
119467
|
+
const asked = new Set([readHeadroomState(ports.fs, stateFiles.stateFile)?.supervisorPid, readHeadroomState(ports.fs, stateFiles.legacyStateFile)?.supervisorPid, readStartLock(ports.fs, paths.headroomLockFile)?.pid, ...sessions.flatMap((session) => [session.pid, session.supervisorPid])].filter((pid) => pid !== void 0));
|
|
119468
|
+
const running = await ports.runningAmong([...asked]);
|
|
119469
|
+
const isRunning = (pid) => !asked.has(pid) || running.has(pid);
|
|
119470
|
+
const state = resolveServingHeadroomState(ports.fs, stateFiles, isRunning)?.state;
|
|
119458
119471
|
const supervisorPid = state?.supervisorPid;
|
|
119459
|
-
const orphans =
|
|
119460
|
-
if (supervisorPid !== void 0 &&
|
|
119472
|
+
const orphans = sessions.filter((session) => isRunning(session.pid) && !isRunning(session.supervisorPid));
|
|
119473
|
+
if (supervisorPid !== void 0 && isRunning(supervisorPid)) {
|
|
119461
119474
|
lastAttemptAt = void 0;
|
|
119462
119475
|
releaseOwnLock();
|
|
119463
119476
|
for (const session of orphans) {
|
|
@@ -119476,7 +119489,7 @@ function createHeadroomKeeper(deps) {
|
|
|
119476
119489
|
}
|
|
119477
119490
|
releaseOwnLock();
|
|
119478
119491
|
lastAttemptAt = ports.now();
|
|
119479
|
-
const start = startSupervisorUnderLock({ paths, holderPid: deps.ownPid, ports });
|
|
119492
|
+
const start = startSupervisorUnderLock({ paths, holderPid: deps.ownPid, ports: { fs: ports.fs, now: ports.now, isRunning, spawnSupervisor: ports.spawnSupervisor } });
|
|
119480
119493
|
log(`front door: headroom supervisor is not running and ${String(orphans.length)} launcher(s) are registered against it (${start})`);
|
|
119481
119494
|
return { kind: "starting", start, waiting: orphans.length };
|
|
119482
119495
|
};
|
|
@@ -134063,9 +134076,9 @@ async function headroomReady(deps, signal) {
|
|
|
134063
134076
|
}
|
|
134064
134077
|
var HOP_RESET_RETRIES = 1;
|
|
134065
134078
|
var HOP_RESET_CODES = /* @__PURE__ */ new Set(["ECONNRESET", "EPIPE"]);
|
|
134066
|
-
var
|
|
134079
|
+
var BYTES_PER_MIB2 = 1048576;
|
|
134067
134080
|
var MESSAGES_API_LIMIT_MIB = 32;
|
|
134068
|
-
var MAX_BODY_BYTES = MESSAGES_API_LIMIT_MIB *
|
|
134081
|
+
var MAX_BODY_BYTES = MESSAGES_API_LIMIT_MIB * BYTES_PER_MIB2;
|
|
134069
134082
|
async function collectBody(body) {
|
|
134070
134083
|
return await new Promise((resolve3) => {
|
|
134071
134084
|
const chunks = [];
|
|
@@ -135754,9 +135767,9 @@ var import_node_stream3 = require("node:stream");
|
|
|
135754
135767
|
|
|
135755
135768
|
// src/frontdoor/requestScan.ts
|
|
135756
135769
|
var import_node_stream2 = require("node:stream");
|
|
135757
|
-
var
|
|
135770
|
+
var BYTES_PER_KIB2 = 1024;
|
|
135758
135771
|
var SCAN_KIB = 64;
|
|
135759
|
-
var REQUEST_SCAN_CAP_BYTES = SCAN_KIB *
|
|
135772
|
+
var REQUEST_SCAN_CAP_BYTES = SCAN_KIB * BYTES_PER_KIB2;
|
|
135760
135773
|
async function scanRequestHead(request7, wholeBody = false) {
|
|
135761
135774
|
const body = request7.body;
|
|
135762
135775
|
const head = [];
|
|
@@ -139674,15 +139687,20 @@ function realFrontDoorSupervisorPorts(paths, respawnGeneration, lifecycle, track
|
|
|
139674
139687
|
const headroomKeeper = createHeadroomKeeper({
|
|
139675
139688
|
paths,
|
|
139676
139689
|
ownPid: process.pid,
|
|
139677
|
-
ports: { fs: realFarmFs, now: () => Date.now(),
|
|
139690
|
+
ports: { fs: realFarmFs, now: () => Date.now(), runningAmong: realRunningAmong, spawnSupervisor: (layout) => spawnDetachedSupervisor(layout, "__headroom-supervisor", layout.headroomLogPath) },
|
|
139678
139691
|
log
|
|
139679
139692
|
});
|
|
139693
|
+
let headroomKeeperTicking = false;
|
|
139680
139694
|
const headroomKeeperTimer = setInterval(() => {
|
|
139681
|
-
|
|
139682
|
-
|
|
139683
|
-
} catch (error63) {
|
|
139684
|
-
log(`headroom keeper failed: ${error63 instanceof Error ? error63.message : String(error63)}`);
|
|
139695
|
+
if (headroomKeeperTicking) {
|
|
139696
|
+
return;
|
|
139685
139697
|
}
|
|
139698
|
+
headroomKeeperTicking = true;
|
|
139699
|
+
headroomKeeper.tick().catch((error63) => {
|
|
139700
|
+
log(`headroom keeper failed: ${error63 instanceof Error ? error63.message : String(error63)}`);
|
|
139701
|
+
}).finally(() => {
|
|
139702
|
+
headroomKeeperTicking = false;
|
|
139703
|
+
});
|
|
139686
139704
|
}, HEADROOM_POLL_MS);
|
|
139687
139705
|
headroomKeeperTimer.unref();
|
|
139688
139706
|
keeperTimers.push(headroomKeeperTimer);
|
|
@@ -154848,6 +154866,25 @@ var import_node_path65 = __toESM(require("node:path"), 1);
|
|
|
154848
154866
|
var import_node_child_process10 = require("node:child_process");
|
|
154849
154867
|
init_commandDeps();
|
|
154850
154868
|
init_configProfilesStore();
|
|
154869
|
+
|
|
154870
|
+
// src/logRotation.ts
|
|
154871
|
+
function rotateLogIfOver(fs31, logPath, limits) {
|
|
154872
|
+
if ((fs31.lstat(logPath)?.sizeBytes ?? 0) <= limits.maxBytes) {
|
|
154873
|
+
return false;
|
|
154874
|
+
}
|
|
154875
|
+
const generation = (index) => `${logPath}.${String(index)}`;
|
|
154876
|
+
fs31.removeRecursive(generation(limits.keptGenerations));
|
|
154877
|
+
for (let index = limits.keptGenerations - 1; index >= 1; index -= 1) {
|
|
154878
|
+
if (fs31.lstat(generation(index)) !== void 0) {
|
|
154879
|
+
fs31.rename(generation(index), generation(index + 1));
|
|
154880
|
+
}
|
|
154881
|
+
}
|
|
154882
|
+
fs31.copyRecursive(logPath, generation(1));
|
|
154883
|
+
fs31.writeFileUtf8(logPath, "");
|
|
154884
|
+
return true;
|
|
154885
|
+
}
|
|
154886
|
+
|
|
154887
|
+
// src/headroom/commands.ts
|
|
154851
154888
|
init_realFrontDoorPort();
|
|
154852
154889
|
init_trust();
|
|
154853
154890
|
|
|
@@ -155064,6 +155101,7 @@ function realSupervisorPorts(paths) {
|
|
|
155064
155101
|
daemonCommandLine: realProcessCommandLine,
|
|
155065
155102
|
daemonLogSize: () => realFileSize(paths.headroomLogPath),
|
|
155066
155103
|
readDaemonLogTail: (fromByte, maxBytes) => realReadFileTail(paths.headroomLogPath, fromByte, maxBytes),
|
|
155104
|
+
rotateDaemonLog: (limits) => rotateLogIfOver(realFarmFs, paths.headroomLogPath, limits),
|
|
155067
155105
|
socketTrust: realHeadroomSocketTrust,
|
|
155068
155106
|
readConfig: () => resolveSupervisorConfig(readGlobalConfig(paths)?.headroom ?? {}),
|
|
155069
155107
|
spawnHeadroom: (socketPath, allowlistFile, settings2) => {
|
package/dist/index.cjs
CHANGED
|
@@ -4762,7 +4762,7 @@ var init_package = __esm({
|
|
|
4762
4762
|
"package.json"() {
|
|
4763
4763
|
package_default = {
|
|
4764
4764
|
name: "claude-use",
|
|
4765
|
-
version: "11.67.
|
|
4765
|
+
version: "11.67.2",
|
|
4766
4766
|
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.",
|
|
4767
4767
|
license: "MIT",
|
|
4768
4768
|
author: "Joseph Mearman <joseph@mearman.co.uk>",
|
|
@@ -5773,6 +5773,9 @@ async function runSupervisor(initialConfig, ports, options = {}) {
|
|
|
5773
5773
|
return HEADROOM_SUPERVISOR_STILL_RUNNING;
|
|
5774
5774
|
}
|
|
5775
5775
|
ticks += 1;
|
|
5776
|
+
if (ports.rotateDaemonLog({ maxBytes: HEADROOM_LOG_MAX_BYTES, keptGenerations: HEADROOM_LOG_KEPT_GENERATIONS })) {
|
|
5777
|
+
ports.log(`agent-shim headroom supervisor: rotated the daemon log past ${String(HEADROOM_LOG_MAX_BYTES)} bytes, keeping ${String(HEADROOM_LOG_KEPT_GENERATIONS)} earlier file(s)`);
|
|
5778
|
+
}
|
|
5776
5779
|
config = ports.readConfig();
|
|
5777
5780
|
const settingsHash = hashSettings(config.settings);
|
|
5778
5781
|
const inputs = currentHeadroomAllowlistInputs(fs14, paths, ports.frontDoorLiveness);
|
|
@@ -5923,7 +5926,7 @@ function lastLines(output) {
|
|
|
5923
5926
|
const lines = redactText(output).split("\n").map((line) => line.trim()).filter((line) => line !== "").map((line) => line.length > DAEMON_EXIT_LOG_LINE_CHARS ? `${line.slice(0, DAEMON_EXIT_LOG_LINE_CHARS)}...` : line);
|
|
5924
5927
|
return lines.length === 0 ? "(the daemon wrote nothing)" : lines.slice(-DAEMON_EXIT_LOG_LINES).join(" | ");
|
|
5925
5928
|
}
|
|
5926
|
-
var import_node_path14, HEADROOM_BACKOFF_BASE_MS, HEADROOM_BACKOFF_CAP_MS, HEADROOM_START_RETRY_BUDGET, HEADROOM_READY_TIMEOUT_MS, DAEMON_EXIT_LOG_LINES, DAEMON_EXIT_LOG_LINE_CHARS, DAEMON_LOG_TAIL_BYTES, HEADROOM_POLL_MS, MS_PER_MINUTE2, HEADROOM_SUPERVISOR_STILL_RUNNING;
|
|
5929
|
+
var import_node_path14, HEADROOM_BACKOFF_BASE_MS, HEADROOM_BACKOFF_CAP_MS, HEADROOM_START_RETRY_BUDGET, HEADROOM_READY_TIMEOUT_MS, DAEMON_EXIT_LOG_LINES, DAEMON_EXIT_LOG_LINE_CHARS, DAEMON_LOG_TAIL_BYTES, BYTES_PER_KIB, BYTES_PER_MIB, HEADROOM_LOG_MAX_MIB, HEADROOM_LOG_MAX_BYTES, HEADROOM_LOG_KEPT_GENERATIONS, HEADROOM_POLL_MS, MS_PER_MINUTE2, HEADROOM_SUPERVISOR_STILL_RUNNING;
|
|
5927
5930
|
var init_supervisor2 = __esm({
|
|
5928
5931
|
"src/headroom/supervisor.ts"() {
|
|
5929
5932
|
"use strict";
|
|
@@ -5943,6 +5946,11 @@ var init_supervisor2 = __esm({
|
|
|
5943
5946
|
DAEMON_EXIT_LOG_LINES = 6;
|
|
5944
5947
|
DAEMON_EXIT_LOG_LINE_CHARS = 400;
|
|
5945
5948
|
DAEMON_LOG_TAIL_BYTES = 8192;
|
|
5949
|
+
BYTES_PER_KIB = 1024;
|
|
5950
|
+
BYTES_PER_MIB = BYTES_PER_KIB * BYTES_PER_KIB;
|
|
5951
|
+
HEADROOM_LOG_MAX_MIB = 64;
|
|
5952
|
+
HEADROOM_LOG_MAX_BYTES = HEADROOM_LOG_MAX_MIB * BYTES_PER_MIB;
|
|
5953
|
+
HEADROOM_LOG_KEPT_GENERATIONS = 2;
|
|
5946
5954
|
HEADROOM_POLL_MS = 1e3;
|
|
5947
5955
|
MS_PER_MINUTE2 = 6e4;
|
|
5948
5956
|
HEADROOM_SUPERVISOR_STILL_RUNNING = -1;
|
package/dist/index.mjs
CHANGED
|
@@ -4738,7 +4738,7 @@ var init_package = __esm({
|
|
|
4738
4738
|
"package.json"() {
|
|
4739
4739
|
package_default = {
|
|
4740
4740
|
name: "claude-use",
|
|
4741
|
-
version: "11.67.
|
|
4741
|
+
version: "11.67.2",
|
|
4742
4742
|
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.",
|
|
4743
4743
|
license: "MIT",
|
|
4744
4744
|
author: "Joseph Mearman <joseph@mearman.co.uk>",
|
|
@@ -5750,6 +5750,9 @@ async function runSupervisor(initialConfig, ports, options = {}) {
|
|
|
5750
5750
|
return HEADROOM_SUPERVISOR_STILL_RUNNING;
|
|
5751
5751
|
}
|
|
5752
5752
|
ticks += 1;
|
|
5753
|
+
if (ports.rotateDaemonLog({ maxBytes: HEADROOM_LOG_MAX_BYTES, keptGenerations: HEADROOM_LOG_KEPT_GENERATIONS })) {
|
|
5754
|
+
ports.log(`agent-shim headroom supervisor: rotated the daemon log past ${String(HEADROOM_LOG_MAX_BYTES)} bytes, keeping ${String(HEADROOM_LOG_KEPT_GENERATIONS)} earlier file(s)`);
|
|
5755
|
+
}
|
|
5753
5756
|
config = ports.readConfig();
|
|
5754
5757
|
const settingsHash = hashSettings(config.settings);
|
|
5755
5758
|
const inputs = currentHeadroomAllowlistInputs(fs14, paths, ports.frontDoorLiveness);
|
|
@@ -5900,7 +5903,7 @@ function lastLines(output) {
|
|
|
5900
5903
|
const lines = redactText(output).split("\n").map((line) => line.trim()).filter((line) => line !== "").map((line) => line.length > DAEMON_EXIT_LOG_LINE_CHARS ? `${line.slice(0, DAEMON_EXIT_LOG_LINE_CHARS)}...` : line);
|
|
5901
5904
|
return lines.length === 0 ? "(the daemon wrote nothing)" : lines.slice(-DAEMON_EXIT_LOG_LINES).join(" | ");
|
|
5902
5905
|
}
|
|
5903
|
-
var HEADROOM_BACKOFF_BASE_MS, HEADROOM_BACKOFF_CAP_MS, HEADROOM_START_RETRY_BUDGET, HEADROOM_READY_TIMEOUT_MS, DAEMON_EXIT_LOG_LINES, DAEMON_EXIT_LOG_LINE_CHARS, DAEMON_LOG_TAIL_BYTES, HEADROOM_POLL_MS, MS_PER_MINUTE2, HEADROOM_SUPERVISOR_STILL_RUNNING;
|
|
5906
|
+
var HEADROOM_BACKOFF_BASE_MS, HEADROOM_BACKOFF_CAP_MS, HEADROOM_START_RETRY_BUDGET, HEADROOM_READY_TIMEOUT_MS, DAEMON_EXIT_LOG_LINES, DAEMON_EXIT_LOG_LINE_CHARS, DAEMON_LOG_TAIL_BYTES, BYTES_PER_KIB, BYTES_PER_MIB, HEADROOM_LOG_MAX_MIB, HEADROOM_LOG_MAX_BYTES, HEADROOM_LOG_KEPT_GENERATIONS, HEADROOM_POLL_MS, MS_PER_MINUTE2, HEADROOM_SUPERVISOR_STILL_RUNNING;
|
|
5904
5907
|
var init_supervisor2 = __esm({
|
|
5905
5908
|
"src/headroom/supervisor.ts"() {
|
|
5906
5909
|
"use strict";
|
|
@@ -5919,6 +5922,11 @@ var init_supervisor2 = __esm({
|
|
|
5919
5922
|
DAEMON_EXIT_LOG_LINES = 6;
|
|
5920
5923
|
DAEMON_EXIT_LOG_LINE_CHARS = 400;
|
|
5921
5924
|
DAEMON_LOG_TAIL_BYTES = 8192;
|
|
5925
|
+
BYTES_PER_KIB = 1024;
|
|
5926
|
+
BYTES_PER_MIB = BYTES_PER_KIB * BYTES_PER_KIB;
|
|
5927
|
+
HEADROOM_LOG_MAX_MIB = 64;
|
|
5928
|
+
HEADROOM_LOG_MAX_BYTES = HEADROOM_LOG_MAX_MIB * BYTES_PER_MIB;
|
|
5929
|
+
HEADROOM_LOG_KEPT_GENERATIONS = 2;
|
|
5922
5930
|
HEADROOM_POLL_MS = 1e3;
|
|
5923
5931
|
MS_PER_MINUTE2 = 6e4;
|
|
5924
5932
|
HEADROOM_SUPERVISOR_STILL_RUNNING = -1;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -8895,6 +8895,14 @@ interface FileAllowlistDrift {
|
|
|
8895
8895
|
readonly hashLags: boolean;
|
|
8896
8896
|
}
|
|
8897
8897
|
|
|
8898
|
+
/** When a log is rotated and how much of its history is kept. */
|
|
8899
|
+
interface LogRotationLimits {
|
|
8900
|
+
/** The size in bytes above which the live file is rotated. */
|
|
8901
|
+
readonly maxBytes: number;
|
|
8902
|
+
/** How many rotated files are kept beside the live one, at least one: `<log>.1` is the newest and `<log>.<keptGenerations>` the oldest, and the file shifted past it is deleted. */
|
|
8903
|
+
readonly keptGenerations: number;
|
|
8904
|
+
}
|
|
8905
|
+
|
|
8898
8906
|
/** The token-saving settings of the `headroom` config block, without its install and lifecycle fields (`source`, `idleShutdownMinutes`). */
|
|
8899
8907
|
type HeadroomSettings = Pick<HeadroomGlobalConfig, "mode" | "targetRatio" | "ccr" | "rolloutChannel" | "interceptToolResults" | "readMaturation">;
|
|
8900
8908
|
|
|
@@ -8929,8 +8937,10 @@ interface SupervisorPorts {
|
|
|
8929
8937
|
readonly frontDoorLiveness: (pids: readonly number[]) => FrontDoorLiveness;
|
|
8930
8938
|
/** The daemon log's size in bytes (0 before it exists): where the next start attempt's own output will begin. */
|
|
8931
8939
|
readonly daemonLogSize: () => number;
|
|
8932
|
-
/** The daemon log from byte `fromByte` to its end, at most its last `maxBytes`, read without loading the whole file
|
|
8940
|
+
/** The daemon log from byte `fromByte` to its end, at most its last `maxBytes`, read without loading the whole file. */
|
|
8933
8941
|
readonly readDaemonLogTail: (fromByte: number, maxBytes: number) => string;
|
|
8942
|
+
/** Rotates the daemon log when it is over `limits.maxBytes` (see `rotateLogIfOver`), returning whether it did. Every offset `daemonLogSize` returned earlier is invalid afterwards, so the supervisor calls it only at the top of a tick, before it takes the offset of any start attempt. */
|
|
8943
|
+
readonly rotateDaemonLog: (limits: LogRotationLimits) => boolean;
|
|
8934
8944
|
/** The command line of a running process as `ps` reports it, or undefined when it cannot be read: how a recorded orphan daemon is confirmed to be one before it is signalled (see `daemonIdentity`). */
|
|
8935
8945
|
readonly daemonCommandLine: (pid: number) => string | undefined;
|
|
8936
8946
|
/** The platform facts and owner-only checks the daemon's socket directory is prepared and verified with (see `prepareHeadroomSocket`). */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-use",
|
|
3
|
-
"version": "11.67.
|
|
3
|
+
"version": "11.67.2",
|
|
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>",
|