agent-shim 11.38.0 → 11.40.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/README.md +1 -0
- package/dist/cli.cjs +610 -291
- package/dist/index.cjs +25 -2
- package/dist/index.mjs +25 -2
- package/dist/types/index.d.ts +458 -454
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3106,7 +3106,7 @@ var init_package = __esm({
|
|
|
3106
3106
|
"package.json"() {
|
|
3107
3107
|
package_default = {
|
|
3108
3108
|
name: "agent-shim",
|
|
3109
|
-
version: "11.
|
|
3109
|
+
version: "11.40.0",
|
|
3110
3110
|
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.",
|
|
3111
3111
|
license: "MIT",
|
|
3112
3112
|
author: "Joseph Mearman <joseph@mearman.co.uk>",
|
|
@@ -6063,6 +6063,7 @@ function createUsageStore(deps) {
|
|
|
6063
6063
|
}
|
|
6064
6064
|
fs13.appendFilePrivate(import_node_path20.default.join(paths.usageLogDir, segmentName(day, deps.pid)), `${JSON.stringify(record)}
|
|
6065
6065
|
`);
|
|
6066
|
+
deps.onRecord?.(record);
|
|
6066
6067
|
if (record.identity !== void 0) {
|
|
6067
6068
|
rewriteSnapshot(record.identity, (current) => ({ ...current?.providers, [record.provider]: foldProviderState(current?.providers[record.provider], record) }));
|
|
6068
6069
|
}
|
|
@@ -6514,6 +6515,7 @@ function buildLayoutPaths(root) {
|
|
|
6514
6515
|
usageJobsFile: import_node_path23.default.join(root, "usage", "jobs.json"),
|
|
6515
6516
|
jobLogsDir: import_node_path23.default.join(root, "logs", "jobs"),
|
|
6516
6517
|
superviseDir: import_node_path23.default.join(root, "supervise"),
|
|
6518
|
+
modelMovesDir: import_node_path23.default.join(root, "model-moves"),
|
|
6517
6519
|
mcpPermissionsFile: import_node_path23.default.join(root, "mcp", "permissions.json")
|
|
6518
6520
|
};
|
|
6519
6521
|
}
|
|
@@ -8443,7 +8445,28 @@ function hasSettingsArgument(passthrough) {
|
|
|
8443
8445
|
return (end === -1 ? passthrough : passthrough.slice(0, end)).some((token) => token === "--settings" || token.startsWith("--settings="));
|
|
8444
8446
|
}
|
|
8445
8447
|
function withSupervision(passthrough, supervised) {
|
|
8446
|
-
|
|
8448
|
+
if (supervised.conversation === "as-given") {
|
|
8449
|
+
return passthrough;
|
|
8450
|
+
}
|
|
8451
|
+
const conversed = withConversation(passthrough, supervised.conversation, supervised.sessionId);
|
|
8452
|
+
if (supervised.model === void 0) {
|
|
8453
|
+
return conversed;
|
|
8454
|
+
}
|
|
8455
|
+
const end = conversed.indexOf(TERMINATOR2);
|
|
8456
|
+
const head = end === -1 ? conversed : conversed.slice(0, end);
|
|
8457
|
+
const tail = end === -1 ? [] : conversed.slice(end);
|
|
8458
|
+
const kept = [];
|
|
8459
|
+
for (let index = 0; index < head.length; index += 1) {
|
|
8460
|
+
const token = head[index];
|
|
8461
|
+
if (token === "--model") {
|
|
8462
|
+
index += 1;
|
|
8463
|
+
continue;
|
|
8464
|
+
}
|
|
8465
|
+
if (token !== void 0 && !token.startsWith("--model=")) {
|
|
8466
|
+
kept.push(token);
|
|
8467
|
+
}
|
|
8468
|
+
}
|
|
8469
|
+
return [...kept, "--model", supervised.model, ...tail];
|
|
8447
8470
|
}
|
|
8448
8471
|
function withLauncherSettings(passthrough, settings) {
|
|
8449
8472
|
if (settings === void 0) {
|
package/dist/index.mjs
CHANGED
|
@@ -3082,7 +3082,7 @@ var init_package = __esm({
|
|
|
3082
3082
|
"package.json"() {
|
|
3083
3083
|
package_default = {
|
|
3084
3084
|
name: "agent-shim",
|
|
3085
|
-
version: "11.
|
|
3085
|
+
version: "11.40.0",
|
|
3086
3086
|
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.",
|
|
3087
3087
|
license: "MIT",
|
|
3088
3088
|
author: "Joseph Mearman <joseph@mearman.co.uk>",
|
|
@@ -6038,6 +6038,7 @@ function createUsageStore(deps) {
|
|
|
6038
6038
|
}
|
|
6039
6039
|
fs13.appendFilePrivate(path20.join(paths.usageLogDir, segmentName(day, deps.pid)), `${JSON.stringify(record)}
|
|
6040
6040
|
`);
|
|
6041
|
+
deps.onRecord?.(record);
|
|
6041
6042
|
if (record.identity !== void 0) {
|
|
6042
6043
|
rewriteSnapshot(record.identity, (current) => ({ ...current?.providers, [record.provider]: foldProviderState(current?.providers[record.provider], record) }));
|
|
6043
6044
|
}
|
|
@@ -6491,6 +6492,7 @@ function buildLayoutPaths(root) {
|
|
|
6491
6492
|
usageJobsFile: path23.join(root, "usage", "jobs.json"),
|
|
6492
6493
|
jobLogsDir: path23.join(root, "logs", "jobs"),
|
|
6493
6494
|
superviseDir: path23.join(root, "supervise"),
|
|
6495
|
+
modelMovesDir: path23.join(root, "model-moves"),
|
|
6494
6496
|
mcpPermissionsFile: path23.join(root, "mcp", "permissions.json")
|
|
6495
6497
|
};
|
|
6496
6498
|
}
|
|
@@ -8415,7 +8417,28 @@ function hasSettingsArgument(passthrough) {
|
|
|
8415
8417
|
return (end === -1 ? passthrough : passthrough.slice(0, end)).some((token) => token === "--settings" || token.startsWith("--settings="));
|
|
8416
8418
|
}
|
|
8417
8419
|
function withSupervision(passthrough, supervised) {
|
|
8418
|
-
|
|
8420
|
+
if (supervised.conversation === "as-given") {
|
|
8421
|
+
return passthrough;
|
|
8422
|
+
}
|
|
8423
|
+
const conversed = withConversation(passthrough, supervised.conversation, supervised.sessionId);
|
|
8424
|
+
if (supervised.model === void 0) {
|
|
8425
|
+
return conversed;
|
|
8426
|
+
}
|
|
8427
|
+
const end = conversed.indexOf(TERMINATOR2);
|
|
8428
|
+
const head = end === -1 ? conversed : conversed.slice(0, end);
|
|
8429
|
+
const tail = end === -1 ? [] : conversed.slice(end);
|
|
8430
|
+
const kept = [];
|
|
8431
|
+
for (let index = 0; index < head.length; index += 1) {
|
|
8432
|
+
const token = head[index];
|
|
8433
|
+
if (token === "--model") {
|
|
8434
|
+
index += 1;
|
|
8435
|
+
continue;
|
|
8436
|
+
}
|
|
8437
|
+
if (token !== void 0 && !token.startsWith("--model=")) {
|
|
8438
|
+
kept.push(token);
|
|
8439
|
+
}
|
|
8440
|
+
}
|
|
8441
|
+
return [...kept, "--model", supervised.model, ...tail];
|
|
8419
8442
|
}
|
|
8420
8443
|
function withLauncherSettings(passthrough, settings) {
|
|
8421
8444
|
if (settings === void 0) {
|