claude-use 8.36.0 → 8.38.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/index.cjs CHANGED
@@ -1031,6 +1031,10 @@ function resolversOf(context) {
1031
1031
  ...pool?.lastPickHoursAgo === void 0 ? {} : { "session.lastPickHoursAgo": pool.lastPickHoursAgo },
1032
1032
  ...context.request?.model === void 0 ? {} : { "request.model": context.request.model },
1033
1033
  ...context.request?.hasImage === void 0 ? {} : { "request.hasImage": context.request.hasImage },
1034
+ ...context.request?.toolsPresent === void 0 ? {} : { "request.toolsPresent": context.request.toolsPresent },
1035
+ ...context.request?.thinking === void 0 ? {} : { "request.thinking": context.request.thinking },
1036
+ ...context.request?.maxTokens === void 0 ? {} : { "request.maxTokens": context.request.maxTokens },
1037
+ ...context.request?.isCountTokens === void 0 ? {} : { "request.isCountTokens": context.request.isCountTokens },
1034
1038
  ...context.providerQuota === void 0 ? {} : Object.fromEntries(
1035
1039
  Object.entries(context.providerQuota).flatMap(
1036
1040
  ([name, windows]) => [
@@ -5419,7 +5423,7 @@ var import_undici = require("undici");
5419
5423
  // package.json
5420
5424
  var package_default = {
5421
5425
  name: "claude-use",
5422
- version: "8.36.0",
5426
+ version: "8.38.0",
5423
5427
  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.",
5424
5428
  license: "MIT",
5425
5429
  author: "Joseph Mearman <joseph@mearman.co.uk>",
@@ -5468,6 +5472,7 @@ var package_default = {
5468
5472
  schema: "node scripts/gen-schema.mts"
5469
5473
  },
5470
5474
  dependencies: {
5475
+ "@anthropic-ai/claude-agent-sdk": "0.3.292",
5471
5476
  "@clack/prompts": "^1.8.0",
5472
5477
  "@orpc/client": "1.15.4",
5473
5478
  "@orpc/openapi": "1.15.4",
@@ -6333,8 +6338,9 @@ var ProviderQuotaSchema = import_zod6.z.strictObject({
6333
6338
  windows: import_zod6.z.array(ProviderQuotaWindowSchema)
6334
6339
  });
6335
6340
  var ProviderUsageStateSchema = import_zod6.z.strictObject({
6336
- lastRequestAt: InstantSchema,
6337
- lastStatus: import_zod6.z.number().int(),
6341
+ /** When the provider last served a request for the identity through the front door. Absent while the state holds only a rate-limit state fetched from the provider's usage endpoint, for an identity that has made no request. */
6342
+ lastRequestAt: InstantSchema.optional(),
6343
+ lastStatus: import_zod6.z.number().int().optional(),
6338
6344
  lastModel: import_zod6.z.string().optional(),
6339
6345
  /** The latest rate-limit state, from the last response that carried any rate-limit header. */
6340
6346
  rateLimit: RateLimitStateSchema.optional(),
@@ -6592,7 +6598,7 @@ function limitBlockedUntil(state, nowMs) {
6592
6598
  if (state === void 0 || limit === void 0) {
6593
6599
  return void 0;
6594
6600
  }
6595
- if (Date.parse(state.lastRequestAt) > Date.parse(limit.observedAt)) {
6601
+ if (state.lastRequestAt !== void 0 && Date.parse(state.lastRequestAt) > Date.parse(limit.observedAt)) {
6596
6602
  return void 0;
6597
6603
  }
6598
6604
  const until = limit.resetAt === void 0 ? limit.retryAfterSeconds === void 0 ? void 0 : Date.parse(limit.observedAt) + limit.retryAfterSeconds * MS_PER_SECOND4 : Date.parse(limit.resetAt);
package/dist/index.mjs CHANGED
@@ -719,6 +719,10 @@ function resolversOf(context) {
719
719
  ...pool?.lastPickHoursAgo === void 0 ? {} : { "session.lastPickHoursAgo": pool.lastPickHoursAgo },
720
720
  ...context.request?.model === void 0 ? {} : { "request.model": context.request.model },
721
721
  ...context.request?.hasImage === void 0 ? {} : { "request.hasImage": context.request.hasImage },
722
+ ...context.request?.toolsPresent === void 0 ? {} : { "request.toolsPresent": context.request.toolsPresent },
723
+ ...context.request?.thinking === void 0 ? {} : { "request.thinking": context.request.thinking },
724
+ ...context.request?.maxTokens === void 0 ? {} : { "request.maxTokens": context.request.maxTokens },
725
+ ...context.request?.isCountTokens === void 0 ? {} : { "request.isCountTokens": context.request.isCountTokens },
722
726
  ...context.providerQuota === void 0 ? {} : Object.fromEntries(
723
727
  Object.entries(context.providerQuota).flatMap(
724
728
  ([name, windows]) => [
@@ -5107,7 +5111,7 @@ import { Agent as Agent3, fetch as undiciFetch } from "undici";
5107
5111
  // package.json
5108
5112
  var package_default = {
5109
5113
  name: "claude-use",
5110
- version: "8.36.0",
5114
+ version: "8.38.0",
5111
5115
  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.",
5112
5116
  license: "MIT",
5113
5117
  author: "Joseph Mearman <joseph@mearman.co.uk>",
@@ -5156,6 +5160,7 @@ var package_default = {
5156
5160
  schema: "node scripts/gen-schema.mts"
5157
5161
  },
5158
5162
  dependencies: {
5163
+ "@anthropic-ai/claude-agent-sdk": "0.3.292",
5159
5164
  "@clack/prompts": "^1.8.0",
5160
5165
  "@orpc/client": "1.15.4",
5161
5166
  "@orpc/openapi": "1.15.4",
@@ -6021,8 +6026,9 @@ var ProviderQuotaSchema = z6.strictObject({
6021
6026
  windows: z6.array(ProviderQuotaWindowSchema)
6022
6027
  });
6023
6028
  var ProviderUsageStateSchema = z6.strictObject({
6024
- lastRequestAt: InstantSchema,
6025
- lastStatus: z6.number().int(),
6029
+ /** When the provider last served a request for the identity through the front door. Absent while the state holds only a rate-limit state fetched from the provider's usage endpoint, for an identity that has made no request. */
6030
+ lastRequestAt: InstantSchema.optional(),
6031
+ lastStatus: z6.number().int().optional(),
6026
6032
  lastModel: z6.string().optional(),
6027
6033
  /** The latest rate-limit state, from the last response that carried any rate-limit header. */
6028
6034
  rateLimit: RateLimitStateSchema.optional(),
@@ -6280,7 +6286,7 @@ function limitBlockedUntil(state, nowMs) {
6280
6286
  if (state === void 0 || limit === void 0) {
6281
6287
  return void 0;
6282
6288
  }
6283
- if (Date.parse(state.lastRequestAt) > Date.parse(limit.observedAt)) {
6289
+ if (state.lastRequestAt !== void 0 && Date.parse(state.lastRequestAt) > Date.parse(limit.observedAt)) {
6284
6290
  return void 0;
6285
6291
  }
6286
6292
  const until = limit.resetAt === void 0 ? limit.retryAfterSeconds === void 0 ? void 0 : Date.parse(limit.observedAt) + limit.retryAfterSeconds * MS_PER_SECOND4 : Date.parse(limit.resetAt);
@@ -1326,8 +1326,8 @@ declare const HeadroomGlobalConfigSchema: z.ZodObject<{
1326
1326
  source: z.ZodOptional<z.ZodString>;
1327
1327
  idleShutdownMinutes: z.ZodOptional<z.ZodNumber>;
1328
1328
  mode: z.ZodOptional<z.ZodEnum<{
1329
- token: "token";
1330
1329
  cache: "cache";
1330
+ token: "token";
1331
1331
  }>>;
1332
1332
  targetRatio: z.ZodOptional<z.ZodNumber>;
1333
1333
  ccr: z.ZodOptional<z.ZodEnum<{
@@ -1454,8 +1454,8 @@ declare const GlobalConfigSchema: z.ZodObject<{
1454
1454
  source: z.ZodOptional<z.ZodString>;
1455
1455
  idleShutdownMinutes: z.ZodOptional<z.ZodNumber>;
1456
1456
  mode: z.ZodOptional<z.ZodEnum<{
1457
- token: "token";
1458
1457
  cache: "cache";
1458
+ token: "token";
1459
1459
  }>>;
1460
1460
  targetRatio: z.ZodOptional<z.ZodNumber>;
1461
1461
  ccr: z.ZodOptional<z.ZodEnum<{
@@ -4648,8 +4648,8 @@ declare const UsageSnapshotSchema: z.ZodObject<{
4648
4648
  accountCreatedAt: z.ZodOptional<z.ZodString>;
4649
4649
  }, z.core.$strict>>;
4650
4650
  providers: z.ZodRecord<z.ZodString, z.ZodObject<{
4651
- lastRequestAt: z.ZodISODateTime;
4652
- lastStatus: z.ZodNumber;
4651
+ lastRequestAt: z.ZodOptional<z.ZodISODateTime>;
4652
+ lastStatus: z.ZodOptional<z.ZodNumber>;
4653
4653
  lastModel: z.ZodOptional<z.ZodString>;
4654
4654
  rateLimit: z.ZodOptional<z.ZodObject<{
4655
4655
  observedAt: z.ZodISODateTime;
@@ -4975,8 +4975,8 @@ declare function createControlApiRouter(deps: ControlApiDeps): {
4975
4975
  accountCreatedAt: zod.ZodOptional<zod.ZodString>;
4976
4976
  }, zod_v4_core.$strict>>;
4977
4977
  providers: zod.ZodRecord<zod.ZodString, zod.ZodObject<{
4978
- lastRequestAt: zod.ZodISODateTime;
4979
- lastStatus: zod.ZodNumber;
4978
+ lastRequestAt: zod.ZodOptional<zod.ZodISODateTime>;
4979
+ lastStatus: zod.ZodOptional<zod.ZodNumber>;
4980
4980
  lastModel: zod.ZodOptional<zod.ZodString>;
4981
4981
  rateLimit: zod.ZodOptional<zod.ZodObject<{
4982
4982
  observedAt: zod.ZodISODateTime;
@@ -5454,12 +5454,12 @@ declare function createControlApiRouter(deps: ControlApiDeps): {
5454
5454
  identity: "identity";
5455
5455
  provider: "provider";
5456
5456
  pool: "pool";
5457
+ keychain: "keychain";
5457
5458
  "ambient-credential": "ambient-credential";
5458
5459
  "binary-discovery": "binary-discovery";
5459
5460
  "claude-shim": "claude-shim";
5460
5461
  "path-resolution": "path-resolution";
5461
5462
  "legacy-name": "legacy-name";
5462
- keychain: "keychain";
5463
5463
  "directory-rules": "directory-rules";
5464
5464
  "categories-local": "categories-local";
5465
5465
  "active-identity": "active-identity";
@@ -5556,8 +5556,8 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
5556
5556
  accountCreatedAt: zod.ZodOptional<zod.ZodString>;
5557
5557
  }, zod_v4_core.$strict>>;
5558
5558
  providers: zod.ZodRecord<zod.ZodString, zod.ZodObject<{
5559
- lastRequestAt: zod.ZodISODateTime;
5560
- lastStatus: zod.ZodNumber;
5559
+ lastRequestAt: zod.ZodOptional<zod.ZodISODateTime>;
5560
+ lastStatus: zod.ZodOptional<zod.ZodNumber>;
5561
5561
  lastModel: zod.ZodOptional<zod.ZodString>;
5562
5562
  rateLimit: zod.ZodOptional<zod.ZodObject<{
5563
5563
  observedAt: zod.ZodISODateTime;
@@ -6035,12 +6035,12 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
6035
6035
  identity: "identity";
6036
6036
  provider: "provider";
6037
6037
  pool: "pool";
6038
+ keychain: "keychain";
6038
6039
  "ambient-credential": "ambient-credential";
6039
6040
  "binary-discovery": "binary-discovery";
6040
6041
  "claude-shim": "claude-shim";
6041
6042
  "path-resolution": "path-resolution";
6042
6043
  "legacy-name": "legacy-name";
6043
- keychain: "keychain";
6044
6044
  "directory-rules": "directory-rules";
6045
6045
  "categories-local": "categories-local";
6046
6046
  "active-identity": "active-identity";
@@ -6325,8 +6325,8 @@ declare const UsageListOutputSchema: z.ZodObject<{
6325
6325
  accountCreatedAt: z.ZodOptional<z.ZodString>;
6326
6326
  }, z.core.$strict>>;
6327
6327
  providers: z.ZodRecord<z.ZodString, z.ZodObject<{
6328
- lastRequestAt: z.ZodISODateTime;
6329
- lastStatus: z.ZodNumber;
6328
+ lastRequestAt: z.ZodOptional<z.ZodISODateTime>;
6329
+ lastStatus: z.ZodOptional<z.ZodNumber>;
6330
6330
  lastModel: z.ZodOptional<z.ZodString>;
6331
6331
  rateLimit: z.ZodOptional<z.ZodObject<{
6332
6332
  observedAt: z.ZodISODateTime;
@@ -6525,12 +6525,12 @@ declare const DoctorFindingSchema: z.ZodObject<{
6525
6525
  identity: "identity";
6526
6526
  provider: "provider";
6527
6527
  pool: "pool";
6528
+ keychain: "keychain";
6528
6529
  "ambient-credential": "ambient-credential";
6529
6530
  "binary-discovery": "binary-discovery";
6530
6531
  "claude-shim": "claude-shim";
6531
6532
  "path-resolution": "path-resolution";
6532
6533
  "legacy-name": "legacy-name";
6533
- keychain: "keychain";
6534
6534
  "directory-rules": "directory-rules";
6535
6535
  "categories-local": "categories-local";
6536
6536
  "active-identity": "active-identity";
@@ -6554,12 +6554,12 @@ declare const DoctorRunOutputSchema: z.ZodObject<{
6554
6554
  identity: "identity";
6555
6555
  provider: "provider";
6556
6556
  pool: "pool";
6557
+ keychain: "keychain";
6557
6558
  "ambient-credential": "ambient-credential";
6558
6559
  "binary-discovery": "binary-discovery";
6559
6560
  "claude-shim": "claude-shim";
6560
6561
  "path-resolution": "path-resolution";
6561
6562
  "legacy-name": "legacy-name";
6562
- keychain: "keychain";
6563
6563
  "directory-rules": "directory-rules";
6564
6564
  "categories-local": "categories-local";
6565
6565
  "active-identity": "active-identity";
@@ -7115,6 +7115,10 @@ interface ConditionContext {
7115
7115
  readonly request?: {
7116
7116
  readonly model?: string;
7117
7117
  readonly hasImage?: boolean;
7118
+ readonly toolsPresent?: boolean;
7119
+ readonly thinking?: boolean;
7120
+ readonly maxTokens?: number;
7121
+ readonly isCountTokens?: boolean;
7118
7122
  };
7119
7123
  /** Per-provider quota facts for request routing, keyed by provider name, from the session identity's usage snapshot: a route condition names a target's windows (`provider.<name>.fiveHour.utilization` and kin) to skip one that is exhausted or nearly spent. The windows are the same shape the pool facts read. */
7120
7124
  readonly providerQuota?: Readonly<Record<string, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-use",
3
- "version": "8.36.0",
3
+ "version": "8.38.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>",
@@ -49,6 +49,7 @@
49
49
  "schema": "node scripts/gen-schema.mts"
50
50
  },
51
51
  "dependencies": {
52
+ "@anthropic-ai/claude-agent-sdk": "0.3.292",
52
53
  "@clack/prompts": "^1.8.0",
53
54
  "@orpc/client": "1.15.4",
54
55
  "@orpc/openapi": "1.15.4",