claude-use 9.3.1 → 9.4.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
@@ -33224,7 +33224,7 @@ var init_package = __esm({
33224
33224
  "package.json"() {
33225
33225
  package_default = {
33226
33226
  name: "claude-use",
33227
- version: "9.3.1",
33227
+ version: "9.4.0",
33228
33228
  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.",
33229
33229
  license: "MIT",
33230
33230
  author: "Joseph Mearman <joseph@mearman.co.uk>",
@@ -34082,7 +34082,7 @@ function assessIdentity(member, nowMs) {
34082
34082
  const headroom = overage?.utilization === void 0 ? void 0 : Math.max(0, 1 - overage.utilization);
34083
34083
  return { candidate: { ...base, class: "pay-per-use", ...headroom === void 0 ? {} : { headroom }, reasons: [...plan.kind === "pay-per-use" ? planReasons : ["no plan windows reported, so usage bills as extra usage"], ...overageReasons] } };
34084
34084
  }
34085
- const basis = seven?.utilization !== void 0 ? { window: seven, windowMs: SEVEN_DAY_WINDOW_MS } : five?.utilization !== void 0 ? { window: five, windowMs: FIVE_HOUR_WINDOW_MS } : void 0;
34085
+ const basis = seven?.utilization !== void 0 ? { window: seven, windowMs: SEVEN_DAY_WINDOW_MS, name: "sevenDay" } : five?.utilization !== void 0 ? { window: five, windowMs: FIVE_HOUR_WINDOW_MS, name: "fiveHour" } : void 0;
34086
34086
  if (basis?.window.utilization === void 0) {
34087
34087
  return { candidate: { ...base, class: "unknown", reasons: ["quota windows reported no utilisation", ...windowReasons, ...planReasons] } };
34088
34088
  }
@@ -34096,7 +34096,7 @@ function assessIdentity(member, nowMs) {
34096
34096
  const sevenUntil = seven?.resetsAtMs === void 0 ? SEVEN_DAY_WINDOW_MS : Math.max(seven.resetsAtMs - nowMs, MS_PER_SECOND3);
34097
34097
  const sevenDayBurn = windowBurn(member.records, "sevenDay");
34098
34098
  return {
34099
- candidate: { ...base, class: "scored", score, reasons: [...windowReasons.map((reason, index) => index === windowReasons.length - 1 ? `${reason}${observedAgo}` : reason), ...planReasons] },
34099
+ candidate: { ...base, class: "scored", score, scoreWindow: basis.name, reasons: [...windowReasons.map((reason, index) => index === windowReasons.length - 1 ? `${reason}${observedAgo}` : reason), ...planReasons] },
34100
34100
  ...fiveRemaining === void 0 ? {} : { fiveHour: { remaining: fiveRemaining, untilResetMs: fiveUntil } },
34101
34101
  ...burn === void 0 ? {} : { burn },
34102
34102
  ...sevenRemaining === void 0 ? {} : { sevenDay: { remaining: sevenRemaining, untilResetMs: sevenUntil } },
@@ -102668,6 +102668,7 @@ function candidateView(candidate) {
102668
102668
  identity: candidate.identity,
102669
102669
  class: candidate.class,
102670
102670
  ...candidate.score === void 0 ? {} : { score: candidate.score },
102671
+ ...candidate.scoreWindow === void 0 ? {} : { scoreWindow: candidate.scoreWindow },
102671
102672
  feasible: candidate.feasible,
102672
102673
  ...candidate.blockedUntilMs === void 0 ? {} : { blockedUntil: new Date(candidate.blockedUntilMs).toISOString() },
102673
102674
  plan: candidate.plan,
@@ -108609,6 +108610,8 @@ var PoolPickCandidateViewSchema = external_exports.strictObject({
108609
108610
  class: external_exports.enum(["scored", "unknown", "pay-per-use", "ineligible"]),
108610
108611
  /** Plan-size-weighted remaining quota per hour until its reset; present for `scored` only. */
108611
108612
  score: external_exports.number().optional(),
108613
+ /** Which window's reset divides the score: the seven-day window, or the five-hour one when the member reports no seven-day utilisation; present with `score`. */
108614
+ scoreWindow: external_exports.enum(["sevenDay", "fiveHour"]).optional(),
108612
108615
  /** False when the five-hour window would run dry, at the observed pace, before it resets. */
108613
108616
  feasible: external_exports.boolean(),
108614
108617
  /** When an `ineligible` member can be used again, as an ISO instant. */
@@ -118520,7 +118523,7 @@ init_preflight();
118520
118523
  function formatPoolPick(report, nowMs) {
118521
118524
  const head = report.pick === void 0 ? `Pool ${report.pool}: every member is refused right now${report.earliestReturn === void 0 ? "" : `; ${report.earliestReturn.identity} returns at ${report.earliestReturn.at} (in ${formatAge(Date.parse(report.earliestReturn.at) - nowMs)})`}` : `Pool ${report.pool}: a launch from ${report.directory} would run as ${report.pick}`;
118522
118525
  const rows = report.candidates.map((candidate, index) => {
118523
- const score = candidate.score === void 0 ? "" : ` score ${candidate.score.toFixed(2)}`;
118526
+ const score = candidate.score === void 0 ? "" : ` score ${candidate.score.toFixed(2)}${candidate.scoreWindow === "fiveHour" ? " by 5h reset" : " by 7d reset"}`;
118524
118527
  const dry = candidate.feasible ? "" : " (5h would run dry)";
118525
118528
  return ` ${String(index + 1)}. ${candidate.identity} [${candidate.class}${score}]${dry}
118526
118529
  ${candidate.reasons.join("; ")}`;
package/dist/index.cjs CHANGED
@@ -2649,7 +2649,7 @@ var init_package = __esm({
2649
2649
  "package.json"() {
2650
2650
  package_default = {
2651
2651
  name: "claude-use",
2652
- version: "9.3.1",
2652
+ version: "9.4.0",
2653
2653
  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.",
2654
2654
  license: "MIT",
2655
2655
  author: "Joseph Mearman <joseph@mearman.co.uk>",
@@ -4645,7 +4645,7 @@ function assessIdentity(member, nowMs) {
4645
4645
  const headroom = overage?.utilization === void 0 ? void 0 : Math.max(0, 1 - overage.utilization);
4646
4646
  return { candidate: { ...base, class: "pay-per-use", ...headroom === void 0 ? {} : { headroom }, reasons: [...plan.kind === "pay-per-use" ? planReasons : ["no plan windows reported, so usage bills as extra usage"], ...overageReasons] } };
4647
4647
  }
4648
- const basis = seven?.utilization !== void 0 ? { window: seven, windowMs: SEVEN_DAY_WINDOW_MS } : five?.utilization !== void 0 ? { window: five, windowMs: FIVE_HOUR_WINDOW_MS } : void 0;
4648
+ const basis = seven?.utilization !== void 0 ? { window: seven, windowMs: SEVEN_DAY_WINDOW_MS, name: "sevenDay" } : five?.utilization !== void 0 ? { window: five, windowMs: FIVE_HOUR_WINDOW_MS, name: "fiveHour" } : void 0;
4649
4649
  if (basis?.window.utilization === void 0) {
4650
4650
  return { candidate: { ...base, class: "unknown", reasons: ["quota windows reported no utilisation", ...windowReasons, ...planReasons] } };
4651
4651
  }
@@ -4659,7 +4659,7 @@ function assessIdentity(member, nowMs) {
4659
4659
  const sevenUntil = seven?.resetsAtMs === void 0 ? SEVEN_DAY_WINDOW_MS : Math.max(seven.resetsAtMs - nowMs, MS_PER_SECOND4);
4660
4660
  const sevenDayBurn = windowBurn(member.records, "sevenDay");
4661
4661
  return {
4662
- candidate: { ...base, class: "scored", score, reasons: [...windowReasons.map((reason, index) => index === windowReasons.length - 1 ? `${reason}${observedAgo}` : reason), ...planReasons] },
4662
+ candidate: { ...base, class: "scored", score, scoreWindow: basis.name, reasons: [...windowReasons.map((reason, index) => index === windowReasons.length - 1 ? `${reason}${observedAgo}` : reason), ...planReasons] },
4663
4663
  ...fiveRemaining === void 0 ? {} : { fiveHour: { remaining: fiveRemaining, untilResetMs: fiveUntil } },
4664
4664
  ...burn === void 0 ? {} : { burn },
4665
4665
  ...sevenRemaining === void 0 ? {} : { sevenDay: { remaining: sevenRemaining, untilResetMs: sevenUntil } },
@@ -11082,6 +11082,7 @@ function candidateView(candidate) {
11082
11082
  identity: candidate.identity,
11083
11083
  class: candidate.class,
11084
11084
  ...candidate.score === void 0 ? {} : { score: candidate.score },
11085
+ ...candidate.scoreWindow === void 0 ? {} : { scoreWindow: candidate.scoreWindow },
11085
11086
  feasible: candidate.feasible,
11086
11087
  ...candidate.blockedUntilMs === void 0 ? {} : { blockedUntil: new Date(candidate.blockedUntilMs).toISOString() },
11087
11088
  plan: candidate.plan,
@@ -11853,6 +11854,8 @@ var PoolPickCandidateViewSchema = import_zod13.z.strictObject({
11853
11854
  class: import_zod13.z.enum(["scored", "unknown", "pay-per-use", "ineligible"]),
11854
11855
  /** Plan-size-weighted remaining quota per hour until its reset; present for `scored` only. */
11855
11856
  score: import_zod13.z.number().optional(),
11857
+ /** Which window's reset divides the score: the seven-day window, or the five-hour one when the member reports no seven-day utilisation; present with `score`. */
11858
+ scoreWindow: import_zod13.z.enum(["sevenDay", "fiveHour"]).optional(),
11856
11859
  /** False when the five-hour window would run dry, at the observed pace, before it resets. */
11857
11860
  feasible: import_zod13.z.boolean(),
11858
11861
  /** When an `ineligible` member can be used again, as an ISO instant. */
package/dist/index.mjs CHANGED
@@ -2625,7 +2625,7 @@ var init_package = __esm({
2625
2625
  "package.json"() {
2626
2626
  package_default = {
2627
2627
  name: "claude-use",
2628
- version: "9.3.1",
2628
+ version: "9.4.0",
2629
2629
  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.",
2630
2630
  license: "MIT",
2631
2631
  author: "Joseph Mearman <joseph@mearman.co.uk>",
@@ -4619,7 +4619,7 @@ function assessIdentity(member, nowMs) {
4619
4619
  const headroom = overage?.utilization === void 0 ? void 0 : Math.max(0, 1 - overage.utilization);
4620
4620
  return { candidate: { ...base, class: "pay-per-use", ...headroom === void 0 ? {} : { headroom }, reasons: [...plan.kind === "pay-per-use" ? planReasons : ["no plan windows reported, so usage bills as extra usage"], ...overageReasons] } };
4621
4621
  }
4622
- const basis = seven?.utilization !== void 0 ? { window: seven, windowMs: SEVEN_DAY_WINDOW_MS } : five?.utilization !== void 0 ? { window: five, windowMs: FIVE_HOUR_WINDOW_MS } : void 0;
4622
+ const basis = seven?.utilization !== void 0 ? { window: seven, windowMs: SEVEN_DAY_WINDOW_MS, name: "sevenDay" } : five?.utilization !== void 0 ? { window: five, windowMs: FIVE_HOUR_WINDOW_MS, name: "fiveHour" } : void 0;
4623
4623
  if (basis?.window.utilization === void 0) {
4624
4624
  return { candidate: { ...base, class: "unknown", reasons: ["quota windows reported no utilisation", ...windowReasons, ...planReasons] } };
4625
4625
  }
@@ -4633,7 +4633,7 @@ function assessIdentity(member, nowMs) {
4633
4633
  const sevenUntil = seven?.resetsAtMs === void 0 ? SEVEN_DAY_WINDOW_MS : Math.max(seven.resetsAtMs - nowMs, MS_PER_SECOND4);
4634
4634
  const sevenDayBurn = windowBurn(member.records, "sevenDay");
4635
4635
  return {
4636
- candidate: { ...base, class: "scored", score, reasons: [...windowReasons.map((reason, index) => index === windowReasons.length - 1 ? `${reason}${observedAgo}` : reason), ...planReasons] },
4636
+ candidate: { ...base, class: "scored", score, scoreWindow: basis.name, reasons: [...windowReasons.map((reason, index) => index === windowReasons.length - 1 ? `${reason}${observedAgo}` : reason), ...planReasons] },
4637
4637
  ...fiveRemaining === void 0 ? {} : { fiveHour: { remaining: fiveRemaining, untilResetMs: fiveUntil } },
4638
4638
  ...burn === void 0 ? {} : { burn },
4639
4639
  ...sevenRemaining === void 0 ? {} : { sevenDay: { remaining: sevenRemaining, untilResetMs: sevenUntil } },
@@ -10757,6 +10757,7 @@ function candidateView(candidate) {
10757
10757
  identity: candidate.identity,
10758
10758
  class: candidate.class,
10759
10759
  ...candidate.score === void 0 ? {} : { score: candidate.score },
10760
+ ...candidate.scoreWindow === void 0 ? {} : { scoreWindow: candidate.scoreWindow },
10760
10761
  feasible: candidate.feasible,
10761
10762
  ...candidate.blockedUntilMs === void 0 ? {} : { blockedUntil: new Date(candidate.blockedUntilMs).toISOString() },
10762
10763
  plan: candidate.plan,
@@ -11528,6 +11529,8 @@ var PoolPickCandidateViewSchema = z13.strictObject({
11528
11529
  class: z13.enum(["scored", "unknown", "pay-per-use", "ineligible"]),
11529
11530
  /** Plan-size-weighted remaining quota per hour until its reset; present for `scored` only. */
11530
11531
  score: z13.number().optional(),
11532
+ /** Which window's reset divides the score: the seven-day window, or the five-hour one when the member reports no seven-day utilisation; present with `score`. */
11533
+ scoreWindow: z13.enum(["sevenDay", "fiveHour"]).optional(),
11531
11534
  /** False when the five-hour window would run dry, at the observed pace, before it resets. */
11532
11535
  feasible: z13.boolean(),
11533
11536
  /** When an `ineligible` member can be used again, as an ISO instant. */
@@ -3741,6 +3741,10 @@ declare const CheckReportJsonSchema: z.ZodObject<{
3741
3741
  ineligible: "ineligible";
3742
3742
  }>;
3743
3743
  score: z.ZodOptional<z.ZodNumber>;
3744
+ scoreWindow: z.ZodOptional<z.ZodEnum<{
3745
+ fiveHour: "fiveHour";
3746
+ sevenDay: "sevenDay";
3747
+ }>>;
3744
3748
  feasible: z.ZodBoolean;
3745
3749
  blockedUntil: z.ZodOptional<z.ZodISODateTime>;
3746
3750
  plan: z.ZodUnion<readonly [z.ZodObject<{
@@ -4237,6 +4241,10 @@ declare const PoolPickReportSchema: z.ZodObject<{
4237
4241
  ineligible: "ineligible";
4238
4242
  }>;
4239
4243
  score: z.ZodOptional<z.ZodNumber>;
4244
+ scoreWindow: z.ZodOptional<z.ZodEnum<{
4245
+ fiveHour: "fiveHour";
4246
+ sevenDay: "sevenDay";
4247
+ }>>;
4240
4248
  feasible: z.ZodBoolean;
4241
4249
  blockedUntil: z.ZodOptional<z.ZodISODateTime>;
4242
4250
  plan: z.ZodUnion<readonly [z.ZodObject<{
@@ -5231,6 +5239,10 @@ declare function createControlApiRouter(deps: ControlApiDeps): {
5231
5239
  ineligible: "ineligible";
5232
5240
  }>;
5233
5241
  score: zod.ZodOptional<zod.ZodNumber>;
5242
+ scoreWindow: zod.ZodOptional<zod.ZodEnum<{
5243
+ fiveHour: "fiveHour";
5244
+ sevenDay: "sevenDay";
5245
+ }>>;
5234
5246
  feasible: zod.ZodBoolean;
5235
5247
  blockedUntil: zod.ZodOptional<zod.ZodISODateTime>;
5236
5248
  plan: zod.ZodUnion<readonly [zod.ZodObject<{
@@ -5552,6 +5564,10 @@ declare function createControlApiRouter(deps: ControlApiDeps): {
5552
5564
  ineligible: "ineligible";
5553
5565
  }>;
5554
5566
  score: zod.ZodOptional<zod.ZodNumber>;
5567
+ scoreWindow: zod.ZodOptional<zod.ZodEnum<{
5568
+ fiveHour: "fiveHour";
5569
+ sevenDay: "sevenDay";
5570
+ }>>;
5555
5571
  feasible: zod.ZodBoolean;
5556
5572
  blockedUntil: zod.ZodOptional<zod.ZodISODateTime>;
5557
5573
  plan: zod.ZodUnion<readonly [zod.ZodObject<{
@@ -5831,6 +5847,10 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
5831
5847
  ineligible: "ineligible";
5832
5848
  }>;
5833
5849
  score: zod.ZodOptional<zod.ZodNumber>;
5850
+ scoreWindow: zod.ZodOptional<zod.ZodEnum<{
5851
+ fiveHour: "fiveHour";
5852
+ sevenDay: "sevenDay";
5853
+ }>>;
5834
5854
  feasible: zod.ZodBoolean;
5835
5855
  blockedUntil: zod.ZodOptional<zod.ZodISODateTime>;
5836
5856
  plan: zod.ZodUnion<readonly [zod.ZodObject<{
@@ -6152,6 +6172,10 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
6152
6172
  ineligible: "ineligible";
6153
6173
  }>;
6154
6174
  score: zod.ZodOptional<zod.ZodNumber>;
6175
+ scoreWindow: zod.ZodOptional<zod.ZodEnum<{
6176
+ fiveHour: "fiveHour";
6177
+ sevenDay: "sevenDay";
6178
+ }>>;
6155
6179
  feasible: zod.ZodBoolean;
6156
6180
  blockedUntil: zod.ZodOptional<zod.ZodISODateTime>;
6157
6181
  plan: zod.ZodUnion<readonly [zod.ZodObject<{
@@ -7176,6 +7200,8 @@ interface Candidate {
7176
7200
  readonly class: CandidateClass;
7177
7201
  /** Plan-size-weighted remaining quota per hour until its reset: higher is more wasted if left unused. Present for `scored` only. */
7178
7202
  readonly score?: number;
7203
+ /** The window the score's hours-until-reset come from: the seven-day window, or the five-hour one when the member reports no seven-day utilisation. Present with `score`. */
7204
+ readonly scoreWindow?: "sevenDay" | "fiveHour";
7179
7205
  /** False when a quota window would run dry, at the observed pace, before it resets (the five-hour at its own or the rescaled shared pace, the seven-day at its own). A `scored` candidate that is not feasible ranks below every feasible one. */
7180
7206
  readonly feasible: boolean;
7181
7207
  /** The fraction of the extra-usage allowance still unspent, for a `pay-per-use` member whose only budget is that allowance (an Enterprise account). A member reporting none ranks as having all of it: no cap is known to bind. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-use",
3
- "version": "9.3.1",
3
+ "version": "9.4.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>",