agent-shim 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/cli.cjs +42625 -16448
- package/dist/index.cjs +10 -4
- package/dist/index.mjs +10 -4
- package/dist/types/index.d.ts +12 -8
- package/package.json +2 -1
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: "agent-shim",
|
|
5422
|
-
version: "8.
|
|
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
|
-
|
|
6337
|
-
|
|
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: "agent-shim",
|
|
5110
|
-
version: "8.
|
|
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
|
-
|
|
6025
|
-
|
|
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);
|
package/dist/types/index.d.ts
CHANGED
|
@@ -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;
|
|
@@ -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": "agent-shim",
|
|
3
|
-
"version": "8.
|
|
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",
|