claude-use 11.67.1 → 11.67.3
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 +49 -26
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -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
|
@@ -37387,7 +37387,7 @@ var init_package = __esm({
|
|
|
37387
37387
|
"package.json"() {
|
|
37388
37388
|
package_default = {
|
|
37389
37389
|
name: "claude-use",
|
|
37390
|
-
version: "11.67.
|
|
37390
|
+
version: "11.67.3",
|
|
37391
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.",
|
|
37392
37392
|
license: "MIT",
|
|
37393
37393
|
author: "Joseph Mearman <joseph@mearman.co.uk>",
|
|
@@ -119461,11 +119461,16 @@ function createHeadroomKeeper(deps) {
|
|
|
119461
119461
|
ports.fs.removeRecursive(paths.headroomLockFile);
|
|
119462
119462
|
}
|
|
119463
119463
|
};
|
|
119464
|
-
const tick = () => {
|
|
119465
|
-
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;
|
|
119466
119471
|
const supervisorPid = state?.supervisorPid;
|
|
119467
|
-
const orphans =
|
|
119468
|
-
if (supervisorPid !== void 0 &&
|
|
119472
|
+
const orphans = sessions.filter((session) => isRunning(session.pid) && !isRunning(session.supervisorPid));
|
|
119473
|
+
if (supervisorPid !== void 0 && isRunning(supervisorPid)) {
|
|
119469
119474
|
lastAttemptAt = void 0;
|
|
119470
119475
|
releaseOwnLock();
|
|
119471
119476
|
for (const session of orphans) {
|
|
@@ -119484,7 +119489,7 @@ function createHeadroomKeeper(deps) {
|
|
|
119484
119489
|
}
|
|
119485
119490
|
releaseOwnLock();
|
|
119486
119491
|
lastAttemptAt = ports.now();
|
|
119487
|
-
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 } });
|
|
119488
119493
|
log(`front door: headroom supervisor is not running and ${String(orphans.length)} launcher(s) are registered against it (${start})`);
|
|
119489
119494
|
return { kind: "starting", start, waiting: orphans.length };
|
|
119490
119495
|
};
|
|
@@ -119560,8 +119565,8 @@ function unregisterSupervised(fs31, paths, pool, sessionId) {
|
|
|
119560
119565
|
fs31.removeRecursive(sessionFileOf(paths, pool, sessionId));
|
|
119561
119566
|
fs31.removeRecursive(sessionStatePath(paths, pool, sessionId));
|
|
119562
119567
|
}
|
|
119563
|
-
function
|
|
119564
|
-
const
|
|
119568
|
+
function listSupervised(fs31, paths, pool) {
|
|
119569
|
+
const listed = [];
|
|
119565
119570
|
for (const name of fs31.readdir(sessionsDirOf(paths, pool))) {
|
|
119566
119571
|
const file2 = import_node_path36.default.join(sessionsDirOf(paths, pool), name);
|
|
119567
119572
|
const raw = fs31.readFileUtf8(file2);
|
|
@@ -119575,8 +119580,19 @@ function liveSupervised(fs31, paths, pool, isRunning) {
|
|
|
119575
119580
|
fs31.removeRecursive(file2);
|
|
119576
119581
|
continue;
|
|
119577
119582
|
}
|
|
119578
|
-
if (parsed.success
|
|
119579
|
-
|
|
119583
|
+
if (parsed.success) {
|
|
119584
|
+
listed.push({ file: file2, session: parsed.data });
|
|
119585
|
+
} else {
|
|
119586
|
+
fs31.removeRecursive(file2);
|
|
119587
|
+
}
|
|
119588
|
+
}
|
|
119589
|
+
return listed;
|
|
119590
|
+
}
|
|
119591
|
+
function liveSupervised(fs31, paths, pool, isRunning) {
|
|
119592
|
+
const live = [];
|
|
119593
|
+
for (const { file: file2, session } of listSupervised(fs31, paths, pool)) {
|
|
119594
|
+
if (isRunning(session.pid)) {
|
|
119595
|
+
live.push(session);
|
|
119580
119596
|
} else {
|
|
119581
119597
|
fs31.removeRecursive(file2);
|
|
119582
119598
|
}
|
|
@@ -119626,15 +119642,17 @@ function readModelMove(fs31, paths, sessionId) {
|
|
|
119626
119642
|
function removeModelMove(fs31, paths, sessionId) {
|
|
119627
119643
|
fs31.removeRecursive(import_node_path36.default.join(paths.modelMovesDir, `${sessionId}.json`));
|
|
119628
119644
|
}
|
|
119629
|
-
function supervisedSessionOf(fs31, paths, sessionId,
|
|
119630
|
-
|
|
119631
|
-
|
|
119632
|
-
|
|
119633
|
-
if (
|
|
119634
|
-
return
|
|
119645
|
+
async function supervisedSessionOf(fs31, paths, sessionId, runningAmong) {
|
|
119646
|
+
const listed = fs31.readdir(paths.superviseDir).flatMap((pool) => listSupervised(fs31, paths, pool));
|
|
119647
|
+
const running = await runningAmong(listed.map(({ session }) => session.pid));
|
|
119648
|
+
const live = listed.filter(({ file: file2, session }) => {
|
|
119649
|
+
if (running.has(session.pid)) {
|
|
119650
|
+
return true;
|
|
119635
119651
|
}
|
|
119636
|
-
|
|
119637
|
-
|
|
119652
|
+
fs31.removeRecursive(file2);
|
|
119653
|
+
return false;
|
|
119654
|
+
});
|
|
119655
|
+
return live.find(({ session }) => session.sessionId === sessionId)?.session;
|
|
119638
119656
|
}
|
|
119639
119657
|
|
|
119640
119658
|
// src/selection/targetStore.ts
|
|
@@ -136098,7 +136116,7 @@ function createProviderRouteResolver(deps) {
|
|
|
136098
136116
|
const account = scan2.model === void 0 ? void 0 : resolveAccountTarget(scan2.model, deps.models?.(current.session));
|
|
136099
136117
|
if (account !== void 0) {
|
|
136100
136118
|
const sessionId = current.session.sessionId ?? "";
|
|
136101
|
-
const moved = sessionId !== "" && (deps.accountMoves?.(sessionId, account.identity, account.model) ?? false);
|
|
136119
|
+
const moved = sessionId !== "" && (await deps.accountMoves?.(sessionId, account.identity, account.model) ?? false);
|
|
136102
136120
|
return {
|
|
136103
136121
|
ok: false,
|
|
136104
136122
|
status: HTTP_STATUS.badRequest,
|
|
@@ -139643,8 +139661,8 @@ function realFrontDoorSupervisorPorts(paths, respawnGeneration, lifecycle, track
|
|
|
139643
139661
|
usageSnapshotOf: (identity) => identity === void 0 ? void 0 : routingSnapshots.get(identity) ?? readUsageSnapshot(realFarmFs, paths.usageSnapshotsDir, identity),
|
|
139644
139662
|
// An `acct:` model member is served by relaunch: the door leaves a move request for the session's supervisor (found across every pool's registry, since the door does not know which pool launched the session) and answers the request with what is happening. A session nothing supervises gets the message naming the command to run instead.
|
|
139645
139663
|
observations: (target) => observations.observation(target),
|
|
139646
|
-
accountMoves: (sessionId, to2, model) => {
|
|
139647
|
-
if (supervisedSessionOf(realFarmFs, paths, sessionId,
|
|
139664
|
+
accountMoves: async (sessionId, to2, model) => {
|
|
139665
|
+
if (await supervisedSessionOf(realFarmFs, paths, sessionId, realRunningAmong) === void 0) {
|
|
139648
139666
|
return false;
|
|
139649
139667
|
}
|
|
139650
139668
|
writeModelMove(realFarmFs, paths, { sessionId, to: to2, model, at: (/* @__PURE__ */ new Date()).toISOString() });
|
|
@@ -139682,15 +139700,20 @@ function realFrontDoorSupervisorPorts(paths, respawnGeneration, lifecycle, track
|
|
|
139682
139700
|
const headroomKeeper = createHeadroomKeeper({
|
|
139683
139701
|
paths,
|
|
139684
139702
|
ownPid: process.pid,
|
|
139685
|
-
ports: { fs: realFarmFs, now: () => Date.now(),
|
|
139703
|
+
ports: { fs: realFarmFs, now: () => Date.now(), runningAmong: realRunningAmong, spawnSupervisor: (layout) => spawnDetachedSupervisor(layout, "__headroom-supervisor", layout.headroomLogPath) },
|
|
139686
139704
|
log
|
|
139687
139705
|
});
|
|
139706
|
+
let headroomKeeperTicking = false;
|
|
139688
139707
|
const headroomKeeperTimer = setInterval(() => {
|
|
139689
|
-
|
|
139690
|
-
|
|
139691
|
-
} catch (error63) {
|
|
139692
|
-
log(`headroom keeper failed: ${error63 instanceof Error ? error63.message : String(error63)}`);
|
|
139708
|
+
if (headroomKeeperTicking) {
|
|
139709
|
+
return;
|
|
139693
139710
|
}
|
|
139711
|
+
headroomKeeperTicking = true;
|
|
139712
|
+
headroomKeeper.tick().catch((error63) => {
|
|
139713
|
+
log(`headroom keeper failed: ${error63 instanceof Error ? error63.message : String(error63)}`);
|
|
139714
|
+
}).finally(() => {
|
|
139715
|
+
headroomKeeperTicking = false;
|
|
139716
|
+
});
|
|
139694
139717
|
}, HEADROOM_POLL_MS);
|
|
139695
139718
|
headroomKeeperTimer.unref();
|
|
139696
139719
|
keeperTimers.push(headroomKeeperTimer);
|
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.3",
|
|
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>",
|
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.3",
|
|
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>",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-use",
|
|
3
|
-
"version": "11.67.
|
|
3
|
+
"version": "11.67.3",
|
|
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>",
|