agent-shim 8.37.0 → 8.38.1

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
@@ -5423,7 +5423,7 @@ var import_undici = require("undici");
5423
5423
  // package.json
5424
5424
  var package_default = {
5425
5425
  name: "agent-shim",
5426
- version: "8.37.0",
5426
+ version: "8.38.1",
5427
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.",
5428
5428
  license: "MIT",
5429
5429
  author: "Joseph Mearman <joseph@mearman.co.uk>",
@@ -5472,6 +5472,7 @@ var package_default = {
5472
5472
  schema: "node scripts/gen-schema.mts"
5473
5473
  },
5474
5474
  dependencies: {
5475
+ "@anthropic-ai/claude-agent-sdk": "0.3.292",
5475
5476
  "@clack/prompts": "^1.8.0",
5476
5477
  "@orpc/client": "1.15.4",
5477
5478
  "@orpc/openapi": "1.15.4",
@@ -6337,8 +6338,9 @@ var ProviderQuotaSchema = import_zod6.z.strictObject({
6337
6338
  windows: import_zod6.z.array(ProviderQuotaWindowSchema)
6338
6339
  });
6339
6340
  var ProviderUsageStateSchema = import_zod6.z.strictObject({
6340
- lastRequestAt: InstantSchema,
6341
- 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(),
6342
6344
  lastModel: import_zod6.z.string().optional(),
6343
6345
  /** The latest rate-limit state, from the last response that carried any rate-limit header. */
6344
6346
  rateLimit: RateLimitStateSchema.optional(),
@@ -6596,7 +6598,7 @@ function limitBlockedUntil(state, nowMs) {
6596
6598
  if (state === void 0 || limit === void 0) {
6597
6599
  return void 0;
6598
6600
  }
6599
- if (Date.parse(state.lastRequestAt) > Date.parse(limit.observedAt)) {
6601
+ if (state.lastRequestAt !== void 0 && Date.parse(state.lastRequestAt) > Date.parse(limit.observedAt)) {
6600
6602
  return void 0;
6601
6603
  }
6602
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
@@ -5111,7 +5111,7 @@ import { Agent as Agent3, fetch as undiciFetch } from "undici";
5111
5111
  // package.json
5112
5112
  var package_default = {
5113
5113
  name: "agent-shim",
5114
- version: "8.37.0",
5114
+ version: "8.38.1",
5115
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.",
5116
5116
  license: "MIT",
5117
5117
  author: "Joseph Mearman <joseph@mearman.co.uk>",
@@ -5160,6 +5160,7 @@ var package_default = {
5160
5160
  schema: "node scripts/gen-schema.mts"
5161
5161
  },
5162
5162
  dependencies: {
5163
+ "@anthropic-ai/claude-agent-sdk": "0.3.292",
5163
5164
  "@clack/prompts": "^1.8.0",
5164
5165
  "@orpc/client": "1.15.4",
5165
5166
  "@orpc/openapi": "1.15.4",
@@ -6025,8 +6026,9 @@ var ProviderQuotaSchema = z6.strictObject({
6025
6026
  windows: z6.array(ProviderQuotaWindowSchema)
6026
6027
  });
6027
6028
  var ProviderUsageStateSchema = z6.strictObject({
6028
- lastRequestAt: InstantSchema,
6029
- 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(),
6030
6032
  lastModel: z6.string().optional(),
6031
6033
  /** The latest rate-limit state, from the last response that carried any rate-limit header. */
6032
6034
  rateLimit: RateLimitStateSchema.optional(),
@@ -6284,7 +6286,7 @@ function limitBlockedUntil(state, nowMs) {
6284
6286
  if (state === void 0 || limit === void 0) {
6285
6287
  return void 0;
6286
6288
  }
6287
- if (Date.parse(state.lastRequestAt) > Date.parse(limit.observedAt)) {
6289
+ if (state.lastRequestAt !== void 0 && Date.parse(state.lastRequestAt) > Date.parse(limit.observedAt)) {
6288
6290
  return void 0;
6289
6291
  }
6290
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);
@@ -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;
@@ -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;
@@ -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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-shim",
3
- "version": "8.37.0",
3
+ "version": "8.38.1",
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",