@blockrun/clawrouter 0.12.313 → 0.12.315

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.js CHANGED
@@ -56,8 +56,8 @@ var init_snapshot_v1 = __esm({
56
56
  snapshot_v1_default = {
57
57
  catalog: {
58
58
  schema_version: 1,
59
- catalog_version: "2026.11.12.1",
60
- observed_at: "2026-10-20T18:13:39.000Z",
59
+ catalog_version: "2026.11.12.2",
60
+ observed_at: "2026-11-12T20:53:46.000Z",
61
61
  sources: {
62
62
  base: "https://blockrun.ai/api/v1/models?format=json",
63
63
  solana: "https://sol.blockrun.ai/api/v1/models?format=json"
@@ -67,7 +67,7 @@ var init_snapshot_v1 = __esm({
67
67
  id: "anthropic/claude-fable-5",
68
68
  name: "Claude Fable 5",
69
69
  provider: "anthropic",
70
- description: "Anthropic's most capable model \u2014 Mythos-class tier above Opus, for the most demanding reasoning and long-horizon agentic work. 1M context, 128K output, always-on thinking",
70
+ description: "Mythos-class tier above Opus, for the most demanding reasoning and long-horizon agentic work. 1M context, 128K output, always-on thinking",
71
71
  lifecycle: "active",
72
72
  declared_capabilities: [
73
73
  "chat",
@@ -165,6 +165,47 @@ var init_snapshot_v1 = __esm({
165
165
  }
166
166
  }
167
167
  },
168
+ {
169
+ id: "anthropic/claude-fable-5.2",
170
+ name: "Claude Fable 5.2",
171
+ provider: "anthropic",
172
+ description: "Anthropic's most capable model \u2014 successor to Fable 5.1 at a lower price, for the most demanding reasoning and long-horizon agentic work. 1M context, 128K output, always-on thinking. Anthropic retains requests to this model for 30 days.",
173
+ lifecycle: "active",
174
+ declared_capabilities: [
175
+ "chat",
176
+ "coding",
177
+ "reasoning",
178
+ "vision"
179
+ ],
180
+ aliases: [],
181
+ redirects: [],
182
+ networks: {
183
+ base: {
184
+ listed: true,
185
+ categories: [
186
+ "chat",
187
+ "coding",
188
+ "reasoning",
189
+ "vision"
190
+ ],
191
+ billing_mode: "paid",
192
+ pricing: {
193
+ input: 8,
194
+ output: 40,
195
+ cache_read: 0.2,
196
+ cache_write: 10
197
+ },
198
+ context_window: 1e6,
199
+ max_output: 128e3
200
+ },
201
+ solana: {
202
+ listed: false,
203
+ categories: [],
204
+ billing_mode: "unavailable",
205
+ pricing: {}
206
+ }
207
+ }
208
+ },
168
209
  {
169
210
  id: "anthropic/claude-haiku-4.5",
170
211
  name: "Claude Haiku 4.5",
@@ -217,7 +258,7 @@ var init_snapshot_v1 = __esm({
217
258
  id: "anthropic/claude-opus-4.5",
218
259
  name: "Claude Opus 4.5",
219
260
  provider: "anthropic",
220
- description: "Latest Anthropic flagship with enhanced reasoning and creativity",
261
+ description: "Claude Opus 4.5 \u2014 enhanced reasoning and creativity",
221
262
  lifecycle: "active",
222
263
  declared_capabilities: [
223
264
  "chat",
@@ -370,7 +411,7 @@ var init_snapshot_v1 = __esm({
370
411
  id: "anthropic/claude-opus-5",
371
412
  name: "Claude Opus 5",
372
413
  provider: "anthropic",
373
- description: "Newest Opus \u2014 step-change over Opus 4.8 for deep reasoning and agentic coding at the same price. 1M context, 128k output, adaptive thinking",
414
+ description: "Opus 5 \u2014 step-change over Opus 4.8 for deep reasoning and agentic coding at the same price. 1M context, 128k output, adaptive thinking",
374
415
  lifecycle: "active",
375
416
  declared_capabilities: [
376
417
  "chat",
@@ -523,7 +564,7 @@ var init_snapshot_v1 = __esm({
523
564
  id: "anthropic/claude-sonnet-4.6",
524
565
  name: "Claude Sonnet 4.6",
525
566
  provider: "anthropic",
526
- description: "Best balance of intelligence, speed, and cost",
567
+ description: "Sonnet 4.6 \u2014 a balance of intelligence, speed, and cost",
527
568
  lifecycle: "active",
528
569
  declared_capabilities: [
529
570
  "chat",
@@ -574,7 +615,7 @@ var init_snapshot_v1 = __esm({
574
615
  id: "anthropic/claude-sonnet-5",
575
616
  name: "Claude Sonnet 5",
576
617
  provider: "anthropic",
577
- description: "Newest Sonnet \u2014 near-Opus coding/agentic quality at Sonnet cost. 1M context, 128k output, adaptive thinking, vision",
618
+ description: "Sonnet 5 \u2014 near-Opus coding/agentic quality at Sonnet cost. 1M context, 128k output, adaptive thinking, vision",
578
619
  lifecycle: "active",
579
620
  declared_capabilities: [
580
621
  "chat",
@@ -677,7 +718,7 @@ var init_snapshot_v1 = __esm({
677
718
  name: "Sora 2",
678
719
  provider: "azure",
679
720
  description: "OpenAI Sora 2 via Azure AI Foundry \u2014 text-to-video AND image-to-video at 720p with synchronized audio. 4s default; 4, 8, or 12s. Portrait or landscape. Image-to-video takes a non-human reference image (human faces are rejected upstream \u2014 use Seedance + RealFace for real people). $0.10/sec.",
680
- lifecycle: "active",
721
+ lifecycle: "deprecated",
681
722
  declared_capabilities: [
682
723
  "video"
683
724
  ],
@@ -685,7 +726,7 @@ var init_snapshot_v1 = __esm({
685
726
  redirects: [],
686
727
  networks: {
687
728
  base: {
688
- listed: true,
729
+ listed: false,
689
730
  categories: [
690
731
  "video"
691
732
  ],
@@ -741,7 +782,7 @@ var init_snapshot_v1 = __esm({
741
782
  ],
742
783
  billing_mode: "per_character",
743
784
  pricing: {
744
- per_1k_chars: 0.3,
785
+ per_1k_chars: 0.315,
745
786
  max_input_chars: 3e3
746
787
  }
747
788
  }
@@ -780,7 +821,8 @@ var init_snapshot_v1 = __esm({
780
821
  ],
781
822
  billing_mode: "per_second",
782
823
  pricing: {
783
- per_second: 0.07,
824
+ per_second: 0.070783146,
825
+ per_call_surcharge: 0,
784
826
  default_duration_seconds: 5,
785
827
  max_duration_seconds: 12
786
828
  }
@@ -820,7 +862,8 @@ var init_snapshot_v1 = __esm({
820
862
  ],
821
863
  billing_mode: "per_second",
822
864
  pricing: {
823
- per_second: 0.227,
865
+ per_second: 0.22709592675,
866
+ per_call_surcharge: 0,
824
867
  default_duration_seconds: 5,
825
868
  max_duration_seconds: 15
826
869
  }
@@ -860,7 +903,8 @@ var init_snapshot_v1 = __esm({
860
903
  ],
861
904
  billing_mode: "per_second",
862
905
  pricing: {
863
- per_second: 0.165,
906
+ per_second: 0.165160674,
907
+ per_call_surcharge: 0,
864
908
  default_duration_seconds: 5,
865
909
  max_duration_seconds: 15
866
910
  }
@@ -900,7 +944,8 @@ var init_snapshot_v1 = __esm({
900
944
  ],
901
945
  billing_mode: "per_second",
902
946
  pricing: {
903
- per_second: 0.0797,
947
+ per_second: 0.07971075,
948
+ per_call_surcharge: 0,
904
949
  default_duration_seconds: 5,
905
950
  max_duration_seconds: 15
906
951
  }
@@ -911,7 +956,7 @@ var init_snapshot_v1 = __esm({
911
956
  id: "bytedance/seedance-2.5",
912
957
  name: "Seedance 2.5",
913
958
  provider: "bytedance",
914
- description: "ByteDance Seedance 2.5 \u2014 Long-form video up to 30s at 720p, with first/last-frame control and up to 30 reference images. For 1080p or 4K use Seedance 2.0 Pro.",
959
+ description: "ByteDance Seedance 2.5 \u2014 Long-form video up to 30s at 720p, with first/last-frame control, up to 30 reference images, and reference video/audio clips up to 30s each (billed per reference second). For 1080p or 4K use Seedance 2.0 Pro.",
915
960
  lifecycle: "active",
916
961
  declared_capabilities: [
917
962
  "video"
@@ -940,7 +985,8 @@ var init_snapshot_v1 = __esm({
940
985
  ],
941
986
  billing_mode: "per_second",
942
987
  pricing: {
943
- per_second: 0.315,
988
+ per_second: 0.31557485925,
989
+ per_call_surcharge: 0,
944
990
  default_duration_seconds: 5,
945
991
  max_duration_seconds: 30
946
992
  }
@@ -977,7 +1023,7 @@ var init_snapshot_v1 = __esm({
977
1023
  ],
978
1024
  billing_mode: "per_image",
979
1025
  pricing: {
980
- per_image: 0.045
1026
+ per_image: 0.04725
981
1027
  }
982
1028
  }
983
1029
  }
@@ -1033,7 +1079,8 @@ var init_snapshot_v1 = __esm({
1033
1079
  lifecycle: "active",
1034
1080
  declared_capabilities: [
1035
1081
  "chat",
1036
- "coding"
1082
+ "coding",
1083
+ "vision"
1037
1084
  ],
1038
1085
  aliases: [],
1039
1086
  redirects: [],
@@ -1042,7 +1089,8 @@ var init_snapshot_v1 = __esm({
1042
1089
  listed: true,
1043
1090
  categories: [
1044
1091
  "chat",
1045
- "coding"
1092
+ "coding",
1093
+ "vision"
1046
1094
  ],
1047
1095
  billing_mode: "paid",
1048
1096
  pricing: {
@@ -1057,12 +1105,17 @@ var init_snapshot_v1 = __esm({
1057
1105
  listed: true,
1058
1106
  categories: [
1059
1107
  "chat",
1060
- "coding"
1108
+ "coding",
1109
+ "vision"
1061
1110
  ],
1062
1111
  billing_mode: "paid",
1063
1112
  pricing: {
1064
1113
  input: 0.14,
1065
- output: 0.28
1114
+ output: 0.28,
1115
+ cache_read: 6e-3,
1116
+ cache_read_schemes: [
1117
+ "batch-settlement"
1118
+ ]
1066
1119
  },
1067
1120
  context_window: 1048576,
1068
1121
  max_output: 65536
@@ -1078,7 +1131,8 @@ var init_snapshot_v1 = __esm({
1078
1131
  declared_capabilities: [
1079
1132
  "chat",
1080
1133
  "coding",
1081
- "reasoning"
1134
+ "reasoning",
1135
+ "vision"
1082
1136
  ],
1083
1137
  aliases: [],
1084
1138
  redirects: [],
@@ -1088,7 +1142,8 @@ var init_snapshot_v1 = __esm({
1088
1142
  categories: [
1089
1143
  "chat",
1090
1144
  "coding",
1091
- "reasoning"
1145
+ "reasoning",
1146
+ "vision"
1092
1147
  ],
1093
1148
  billing_mode: "paid",
1094
1149
  pricing: {
@@ -1103,12 +1158,17 @@ var init_snapshot_v1 = __esm({
1103
1158
  listed: true,
1104
1159
  categories: [
1105
1160
  "coding",
1106
- "reasoning"
1161
+ "reasoning",
1162
+ "vision"
1107
1163
  ],
1108
1164
  billing_mode: "paid",
1109
1165
  pricing: {
1110
1166
  input: 0.14,
1111
- output: 0.28
1167
+ output: 0.28,
1168
+ cache_read: 6e-3,
1169
+ cache_read_schemes: [
1170
+ "batch-settlement"
1171
+ ]
1112
1172
  },
1113
1173
  context_window: 1048576,
1114
1174
  max_output: 65536
@@ -1155,7 +1215,11 @@ var init_snapshot_v1 = __esm({
1155
1215
  billing_mode: "paid",
1156
1216
  pricing: {
1157
1217
  input: 0.3,
1158
- output: 1.2
1218
+ output: 1.2,
1219
+ cache_read: 6e-3,
1220
+ cache_read_schemes: [
1221
+ "batch-settlement"
1222
+ ]
1159
1223
  },
1160
1224
  context_window: 1048576,
1161
1225
  max_output: 65536
@@ -1202,7 +1266,11 @@ var init_snapshot_v1 = __esm({
1202
1266
  billing_mode: "paid",
1203
1267
  pricing: {
1204
1268
  input: 1.32,
1205
- output: 3.96
1269
+ output: 3.96,
1270
+ cache_read: 0.044,
1271
+ cache_read_schemes: [
1272
+ "batch-settlement"
1273
+ ]
1206
1274
  },
1207
1275
  context_window: 1048576,
1208
1276
  max_output: 65536
@@ -1218,7 +1286,8 @@ var init_snapshot_v1 = __esm({
1218
1286
  declared_capabilities: [
1219
1287
  "chat",
1220
1288
  "coding",
1221
- "reasoning"
1289
+ "reasoning",
1290
+ "vision"
1222
1291
  ],
1223
1292
  aliases: [],
1224
1293
  redirects: [],
@@ -1228,7 +1297,8 @@ var init_snapshot_v1 = __esm({
1228
1297
  categories: [
1229
1298
  "chat",
1230
1299
  "coding",
1231
- "reasoning"
1300
+ "reasoning",
1301
+ "vision"
1232
1302
  ],
1233
1303
  billing_mode: "paid",
1234
1304
  pricing: {
@@ -1243,12 +1313,17 @@ var init_snapshot_v1 = __esm({
1243
1313
  listed: true,
1244
1314
  categories: [
1245
1315
  "chat",
1246
- "coding"
1316
+ "coding",
1317
+ "vision"
1247
1318
  ],
1248
1319
  billing_mode: "paid",
1249
1320
  pricing: {
1250
1321
  input: 0.14,
1251
- output: 0.28
1322
+ output: 0.28,
1323
+ cache_read: 6e-3,
1324
+ cache_read_schemes: [
1325
+ "batch-settlement"
1326
+ ]
1252
1327
  },
1253
1328
  context_window: 1048576,
1254
1329
  max_output: 65536
@@ -1289,7 +1364,7 @@ var init_snapshot_v1 = __esm({
1289
1364
  ],
1290
1365
  billing_mode: "per_character",
1291
1366
  pricing: {
1292
- per_1k_chars: 0.05,
1367
+ per_1k_chars: 0.0525,
1293
1368
  max_input_chars: 4e4
1294
1369
  }
1295
1370
  }
@@ -1329,7 +1404,7 @@ var init_snapshot_v1 = __esm({
1329
1404
  ],
1330
1405
  billing_mode: "per_character",
1331
1406
  pricing: {
1332
- per_1k_chars: 0.1,
1407
+ per_1k_chars: 0.105,
1333
1408
  max_input_chars: 1e4
1334
1409
  }
1335
1410
  }
@@ -1366,7 +1441,7 @@ var init_snapshot_v1 = __esm({
1366
1441
  ],
1367
1442
  billing_mode: "per_generation",
1368
1443
  pricing: {
1369
- per_generation: 0.05,
1444
+ per_generation: 0.0525,
1370
1445
  max_duration_seconds: 22
1371
1446
  }
1372
1447
  }
@@ -1406,7 +1481,7 @@ var init_snapshot_v1 = __esm({
1406
1481
  ],
1407
1482
  billing_mode: "per_character",
1408
1483
  pricing: {
1409
- per_1k_chars: 0.05,
1484
+ per_1k_chars: 0.0525,
1410
1485
  max_input_chars: 4e4
1411
1486
  }
1412
1487
  }
@@ -1446,7 +1521,7 @@ var init_snapshot_v1 = __esm({
1446
1521
  ],
1447
1522
  billing_mode: "per_character",
1448
1523
  pricing: {
1449
- per_1k_chars: 0.1,
1524
+ per_1k_chars: 0.105,
1450
1525
  max_input_chars: 5e3
1451
1526
  }
1452
1527
  }
@@ -1546,7 +1621,7 @@ var init_snapshot_v1 = __esm({
1546
1621
  id: "google/gemini-2.5-pro",
1547
1622
  name: "Gemini 2.5 Pro",
1548
1623
  provider: "google",
1549
- description: "State-of-the-art for reasoning, coding, and mathematics",
1624
+ description: "Gemini 2.5 Pro \u2014 strong reasoning, coding, and mathematics",
1550
1625
  lifecycle: "active",
1551
1626
  declared_capabilities: [
1552
1627
  "chat",
@@ -1706,7 +1781,7 @@ var init_snapshot_v1 = __esm({
1706
1781
  id: "google/gemini-3.1-pro",
1707
1782
  name: "Gemini 3.1 Pro",
1708
1783
  provider: "google",
1709
- description: "Latest Gemini with improved thinking, token efficiency, and agentic capabilities. Optimized for software engineering (requires new SDK)",
1784
+ description: "Gemini 3.1 Pro with improved thinking, token efficiency, and agentic capabilities. Optimized for software engineering (requires new SDK)",
1710
1785
  lifecycle: "active",
1711
1786
  declared_capabilities: [
1712
1787
  "chat",
@@ -1773,7 +1848,7 @@ var init_snapshot_v1 = __esm({
1773
1848
  id: "google/gemini-3.5-flash",
1774
1849
  name: "Gemini 3.5 Flash",
1775
1850
  provider: "google",
1776
- description: "Latest-generation Flash with built-in thinking mode \u2014 frontier-class quality at Flash speed",
1851
+ description: "Gemini 3.5 Flash with built-in thinking mode \u2014 frontier-class quality at Flash speed",
1777
1852
  lifecycle: "active",
1778
1853
  declared_capabilities: [
1779
1854
  "chat",
@@ -1867,7 +1942,7 @@ var init_snapshot_v1 = __esm({
1867
1942
  id: "google/gemini-3.6-flash",
1868
1943
  name: "Gemini 3.6 Flash",
1869
1944
  provider: "google",
1870
- description: "Newest-generation Flash with built-in thinking mode \u2014 frontier-class quality at Flash speed",
1945
+ description: "Gemini 3.6 Flash with built-in thinking mode \u2014 frontier-class quality at Flash speed",
1871
1946
  lifecycle: "active",
1872
1947
  declared_capabilities: [
1873
1948
  "chat",
@@ -1967,7 +2042,57 @@ var init_snapshot_v1 = __esm({
1967
2042
  id: "google/gemini-4-argon",
1968
2043
  name: "Gemini 4 Argon",
1969
2044
  provider: "google",
1970
- description: "Google's frontier reasoning model, built for long multi-step agent work, complex software engineering and deep math and science problems",
2045
+ description: "Google's efficient Gemini 4 model: Gemini 4 intelligence with faster responses and fewer tokens per turn than Carbon",
2046
+ lifecycle: "active",
2047
+ declared_capabilities: [
2048
+ "chat",
2049
+ "coding",
2050
+ "reasoning",
2051
+ "vision"
2052
+ ],
2053
+ aliases: [],
2054
+ redirects: [],
2055
+ networks: {
2056
+ base: {
2057
+ listed: true,
2058
+ categories: [
2059
+ "chat",
2060
+ "coding",
2061
+ "reasoning",
2062
+ "vision"
2063
+ ],
2064
+ billing_mode: "paid",
2065
+ pricing: {
2066
+ input: 2,
2067
+ output: 10,
2068
+ cache_read: 0.1
2069
+ },
2070
+ context_window: 1048576,
2071
+ max_output: 65536
2072
+ },
2073
+ solana: {
2074
+ listed: true,
2075
+ categories: [
2076
+ "chat",
2077
+ "coding",
2078
+ "reasoning",
2079
+ "vision"
2080
+ ],
2081
+ billing_mode: "paid",
2082
+ pricing: {
2083
+ input: 2,
2084
+ output: 10
2085
+ },
2086
+ context_window: 1048576,
2087
+ max_output: 65536
2088
+ }
2089
+ }
2090
+ },
2091
+ {
2092
+ id: "google/gemini-4-carbon",
2093
+ name: "Gemini 4 Carbon",
2094
+ provider: "google",
2095
+ description: "Google's most capable reasoning model, built for complex software engineering, deep math and science, and long autonomous agent work",
1971
2096
  lifecycle: "active",
1972
2097
  declared_capabilities: [
1973
2098
  "chat",
@@ -2043,7 +2168,7 @@ var init_snapshot_v1 = __esm({
2043
2168
  ],
2044
2169
  billing_mode: "per_image",
2045
2170
  pricing: {
2046
- per_image: 0.05
2171
+ per_image: 0.0525
2047
2172
  }
2048
2173
  }
2049
2174
  }
@@ -2078,7 +2203,7 @@ var init_snapshot_v1 = __esm({
2078
2203
  ],
2079
2204
  billing_mode: "per_image",
2080
2205
  pricing: {
2081
- per_image: 0.09
2206
+ per_image: 0.0945
2082
2207
  }
2083
2208
  }
2084
2209
  }
@@ -2113,16 +2238,94 @@ var init_snapshot_v1 = __esm({
2113
2238
  ],
2114
2239
  billing_mode: "per_image",
2115
2240
  pricing: {
2116
- per_image: 0.1
2241
+ per_image: 0.105
2117
2242
  }
2118
2243
  }
2119
2244
  }
2120
2245
  },
2246
+ {
2247
+ id: "meta/muse-spark-1.3",
2248
+ name: "Muse Spark 1.3",
2249
+ provider: "meta",
2250
+ description: "Meta's Muse Spark 1.3, Meta's current general model. 1M context, image + text input, tool calling, always reasons (reasoning_effort minimal to max).",
2251
+ lifecycle: "active",
2252
+ declared_capabilities: [
2253
+ "chat",
2254
+ "coding",
2255
+ "reasoning",
2256
+ "vision"
2257
+ ],
2258
+ aliases: [],
2259
+ redirects: [],
2260
+ networks: {
2261
+ base: {
2262
+ listed: false,
2263
+ categories: [],
2264
+ billing_mode: "unavailable",
2265
+ pricing: {}
2266
+ },
2267
+ solana: {
2268
+ listed: true,
2269
+ categories: [
2270
+ "chat",
2271
+ "coding",
2272
+ "reasoning",
2273
+ "vision"
2274
+ ],
2275
+ billing_mode: "paid",
2276
+ pricing: {
2277
+ input: 1.25,
2278
+ output: 4.25
2279
+ },
2280
+ context_window: 1048576,
2281
+ max_output: 131072
2282
+ }
2283
+ }
2284
+ },
2285
+ {
2286
+ id: "meta/muse-wonder-1.0",
2287
+ name: "Muse Wonder 1.0",
2288
+ provider: "meta",
2289
+ description: "Meta's Muse Wonder 1.0 (preview), Meta's frontier model for agents and coding. 1M context, image + text input, tool calling, always reasons (reasoning_effort minimal to max).",
2290
+ lifecycle: "active",
2291
+ declared_capabilities: [
2292
+ "chat",
2293
+ "coding",
2294
+ "reasoning",
2295
+ "vision"
2296
+ ],
2297
+ aliases: [],
2298
+ redirects: [],
2299
+ networks: {
2300
+ base: {
2301
+ listed: false,
2302
+ categories: [],
2303
+ billing_mode: "unavailable",
2304
+ pricing: {}
2305
+ },
2306
+ solana: {
2307
+ listed: true,
2308
+ categories: [
2309
+ "chat",
2310
+ "coding",
2311
+ "reasoning",
2312
+ "vision"
2313
+ ],
2314
+ billing_mode: "paid",
2315
+ pricing: {
2316
+ input: 4,
2317
+ output: 20
2318
+ },
2319
+ context_window: 1048576,
2320
+ max_output: 131072
2321
+ }
2322
+ }
2323
+ },
2121
2324
  {
2122
2325
  id: "minimax/minimax-m2.7",
2123
2326
  name: "MiniMax M2.7",
2124
2327
  provider: "minimax",
2125
- description: "MiniMax's flagship reasoning model with recursive self-improvement. Great value for complex tasks (~60 tps)",
2328
+ description: "MiniMax's M2.7 reasoning model with recursive self-improvement. Great value for complex tasks (~60 tps)",
2126
2329
  lifecycle: "active",
2127
2330
  declared_capabilities: [
2128
2331
  "chat",
@@ -2229,7 +2432,7 @@ var init_snapshot_v1 = __esm({
2229
2432
  ],
2230
2433
  billing_mode: "per_track",
2231
2434
  pricing: {
2232
- per_track: 0.1575,
2435
+ per_track: 0.199,
2233
2436
  transaction_fee: 1e-3
2234
2437
  }
2235
2438
  },
@@ -2240,7 +2443,7 @@ var init_snapshot_v1 = __esm({
2240
2443
  ],
2241
2444
  billing_mode: "per_track",
2242
2445
  pricing: {
2243
- per_track: 0.15
2446
+ per_track: 0.2
2244
2447
  }
2245
2448
  }
2246
2449
  }
@@ -2270,8 +2473,8 @@ var init_snapshot_v1 = __esm({
2270
2473
  ],
2271
2474
  billing_mode: "paid",
2272
2475
  pricing: {
2273
- input: 0.68,
2274
- output: 2.09
2476
+ input: 1.36,
2477
+ output: 4.18
2275
2478
  },
2276
2479
  context_window: 524288,
2277
2480
  max_output: 262144
@@ -2286,8 +2489,8 @@ var init_snapshot_v1 = __esm({
2286
2489
  ],
2287
2490
  billing_mode: "paid",
2288
2491
  pricing: {
2289
- input: 0.68,
2290
- output: 2.09
2492
+ input: 1.36,
2493
+ output: 4.18
2291
2494
  },
2292
2495
  context_window: 524288,
2293
2496
  max_output: 262144
@@ -2299,7 +2502,7 @@ var init_snapshot_v1 = __esm({
2299
2502
  name: "Kimi K3",
2300
2503
  provider: "moonshot",
2301
2504
  description: "Moonshot's flagship \u2014 a 2.8-trillion-parameter open MoE with 1M context, image + text input, returning reasoning_content. Live-verified 2026-07-17 (chat, tools, vision).",
2302
- lifecycle: "active",
2505
+ lifecycle: "deprecated",
2303
2506
  declared_capabilities: [
2304
2507
  "chat",
2305
2508
  "coding",
@@ -2310,7 +2513,7 @@ var init_snapshot_v1 = __esm({
2310
2513
  redirects: [],
2311
2514
  networks: {
2312
2515
  base: {
2313
- listed: true,
2516
+ listed: false,
2314
2517
  categories: [
2315
2518
  "chat",
2316
2519
  "coding",
@@ -2327,7 +2530,7 @@ var init_snapshot_v1 = __esm({
2327
2530
  max_output: 65536
2328
2531
  },
2329
2532
  solana: {
2330
- listed: true,
2533
+ listed: false,
2331
2534
  categories: [
2332
2535
  "chat",
2333
2536
  "coding",
@@ -2344,12 +2547,62 @@ var init_snapshot_v1 = __esm({
2344
2547
  }
2345
2548
  }
2346
2549
  },
2550
+ {
2551
+ id: "moonshot/kimi-k3.1-pro",
2552
+ name: "Kimi K3.1 Pro",
2553
+ provider: "moonshot",
2554
+ description: "Moonshot's flagship \u2014 post-trained successor to Kimi K3 for long-horizon coding and agents. 1M context, image + text input, returns reasoning_content.",
2555
+ lifecycle: "active",
2556
+ declared_capabilities: [
2557
+ "chat",
2558
+ "coding",
2559
+ "reasoning",
2560
+ "vision"
2561
+ ],
2562
+ aliases: [],
2563
+ redirects: [],
2564
+ networks: {
2565
+ base: {
2566
+ listed: true,
2567
+ categories: [
2568
+ "chat",
2569
+ "coding",
2570
+ "reasoning",
2571
+ "vision"
2572
+ ],
2573
+ billing_mode: "paid",
2574
+ pricing: {
2575
+ input: 2,
2576
+ output: 10,
2577
+ cache_read: 0.2
2578
+ },
2579
+ context_window: 1048576,
2580
+ max_output: 65536
2581
+ },
2582
+ solana: {
2583
+ listed: true,
2584
+ categories: [
2585
+ "chat",
2586
+ "coding",
2587
+ "reasoning",
2588
+ "vision"
2589
+ ],
2590
+ billing_mode: "paid",
2591
+ pricing: {
2592
+ input: 2,
2593
+ output: 10
2594
+ },
2595
+ context_window: 1048576,
2596
+ max_output: 65536
2597
+ }
2598
+ }
2599
+ },
2347
2600
  {
2348
2601
  id: "nvidia/llama-3.2-11b-vision",
2349
2602
  name: "Llama 3.2 11B Vision (Free)",
2350
2603
  provider: "nvidia",
2351
2604
  description: "Meta's Llama 3.2 11B Vision hosted free by NVIDIA. Accepts images; 128K context.",
2352
- lifecycle: "active",
2605
+ lifecycle: "deprecated",
2353
2606
  declared_capabilities: [
2354
2607
  "chat",
2355
2608
  "vision"
@@ -2358,7 +2611,7 @@ var init_snapshot_v1 = __esm({
2358
2611
  redirects: [],
2359
2612
  networks: {
2360
2613
  base: {
2361
- listed: true,
2614
+ listed: false,
2362
2615
  categories: [
2363
2616
  "chat",
2364
2617
  "vision"
@@ -2372,7 +2625,7 @@ var init_snapshot_v1 = __esm({
2372
2625
  max_output: 16384
2373
2626
  },
2374
2627
  solana: {
2375
- listed: true,
2628
+ listed: false,
2376
2629
  categories: [
2377
2630
  "chat",
2378
2631
  "vision"
@@ -2387,6 +2640,52 @@ var init_snapshot_v1 = __esm({
2387
2640
  }
2388
2641
  }
2389
2642
  },
2643
+ {
2644
+ id: "nvidia/minimax-m3.1-flash",
2645
+ name: "MiniMax M3.1 Flash (Free)",
2646
+ provider: "nvidia",
2647
+ description: "MiniMax's M3.1 Flash hosted free by NVIDIA. Reasons before it answers, calls tools, and takes a 1M context, usually in a few seconds.",
2648
+ lifecycle: "active",
2649
+ declared_capabilities: [
2650
+ "chat",
2651
+ "coding",
2652
+ "reasoning"
2653
+ ],
2654
+ aliases: [],
2655
+ redirects: [],
2656
+ networks: {
2657
+ base: {
2658
+ listed: false,
2659
+ categories: [
2660
+ "chat",
2661
+ "coding",
2662
+ "reasoning"
2663
+ ],
2664
+ billing_mode: "free",
2665
+ pricing: {
2666
+ input: 0,
2667
+ output: 0
2668
+ },
2669
+ context_window: 1048576,
2670
+ max_output: 16384
2671
+ },
2672
+ solana: {
2673
+ listed: true,
2674
+ categories: [
2675
+ "chat",
2676
+ "coding",
2677
+ "reasoning"
2678
+ ],
2679
+ billing_mode: "free",
2680
+ pricing: {
2681
+ input: 0,
2682
+ output: 0
2683
+ },
2684
+ context_window: 1048576,
2685
+ max_output: 16384
2686
+ }
2687
+ }
2688
+ },
2390
2689
  {
2391
2690
  id: "nvidia/muse-glimmer-30b",
2392
2691
  name: "Muse Glimmer 30B (Free)",
@@ -2402,7 +2701,7 @@ var init_snapshot_v1 = __esm({
2402
2701
  redirects: [],
2403
2702
  networks: {
2404
2703
  base: {
2405
- listed: true,
2704
+ listed: false,
2406
2705
  categories: [
2407
2706
  "chat",
2408
2707
  "coding",
@@ -2437,7 +2736,7 @@ var init_snapshot_v1 = __esm({
2437
2736
  id: "nvidia/nemotron-3-nano-omni-30b-a3b-reasoning",
2438
2737
  name: "Nemotron 3 Nano Omni (Free)",
2439
2738
  provider: "nvidia",
2440
- description: "NVIDIA's multimodal reasoning Nemotron Nano Omni, free. 31B / 3.2B active MoE. Accepts text, images, video, audio. ChartQA 90.3, DocVQA 95.6, MMMU 70.8 \u2014 the only vision-capable free model in our catalog",
2739
+ description: "NVIDIA's multimodal reasoning Nemotron Nano Omni, free. 31B / 3.2B active MoE. Accepts text, images, video, audio. ChartQA 90.3, DocVQA 95.6, MMMU 70.8 \u2014 the only free model in our catalog that takes video and audio as well as images",
2441
2740
  lifecycle: "active",
2442
2741
  declared_capabilities: [
2443
2742
  "chat",
@@ -2479,6 +2778,55 @@ var init_snapshot_v1 = __esm({
2479
2778
  }
2480
2779
  }
2481
2780
  },
2781
+ {
2782
+ id: "nvidia/nemotron-3-super-120b",
2783
+ name: "Nemotron 3.5 Super 120B (Free)",
2784
+ provider: "nvidia",
2785
+ description: "NVIDIA Nemotron 3.5 Super VL: MoE model (12B active params) with thinking mode. Reads images, fast and capable reasoning",
2786
+ lifecycle: "active",
2787
+ declared_capabilities: [
2788
+ "chat",
2789
+ "coding",
2790
+ "reasoning",
2791
+ "vision"
2792
+ ],
2793
+ aliases: [],
2794
+ redirects: [],
2795
+ networks: {
2796
+ base: {
2797
+ listed: true,
2798
+ categories: [
2799
+ "chat",
2800
+ "coding",
2801
+ "reasoning",
2802
+ "vision"
2803
+ ],
2804
+ billing_mode: "free",
2805
+ pricing: {
2806
+ input: 0,
2807
+ output: 0
2808
+ },
2809
+ context_window: 131072,
2810
+ max_output: 16384
2811
+ },
2812
+ solana: {
2813
+ listed: true,
2814
+ categories: [
2815
+ "chat",
2816
+ "coding",
2817
+ "reasoning",
2818
+ "vision"
2819
+ ],
2820
+ billing_mode: "free",
2821
+ pricing: {
2822
+ input: 0,
2823
+ output: 0
2824
+ },
2825
+ context_window: 131072,
2826
+ max_output: 16384
2827
+ }
2828
+ }
2829
+ },
2482
2830
  {
2483
2831
  id: "nvidia/nemotron-3-ultra-550b",
2484
2832
  name: "Nemotron 3 Ultra 550B (Free)",
@@ -2493,7 +2841,7 @@ var init_snapshot_v1 = __esm({
2493
2841
  redirects: [],
2494
2842
  networks: {
2495
2843
  base: {
2496
- listed: false,
2844
+ listed: true,
2497
2845
  categories: [
2498
2846
  "chat",
2499
2847
  "reasoning"
@@ -2522,6 +2870,52 @@ var init_snapshot_v1 = __esm({
2522
2870
  }
2523
2871
  }
2524
2872
  },
2873
+ {
2874
+ id: "nvidia/nemotron-3.5-bolt",
2875
+ name: "Nemotron 3.5 Bolt (Free)",
2876
+ provider: "nvidia",
2877
+ description: "NVIDIA's small, fast Nemotron 3.5 hosted free by NVIDIA. Answers in about a second, reads images and calls tools; no thinking pass. 131K context",
2878
+ lifecycle: "active",
2879
+ declared_capabilities: [
2880
+ "chat",
2881
+ "coding",
2882
+ "vision"
2883
+ ],
2884
+ aliases: [],
2885
+ redirects: [],
2886
+ networks: {
2887
+ base: {
2888
+ listed: true,
2889
+ categories: [
2890
+ "chat",
2891
+ "coding",
2892
+ "vision"
2893
+ ],
2894
+ billing_mode: "free",
2895
+ pricing: {
2896
+ input: 0,
2897
+ output: 0
2898
+ },
2899
+ context_window: 131072,
2900
+ max_output: 16384
2901
+ },
2902
+ solana: {
2903
+ listed: true,
2904
+ categories: [
2905
+ "chat",
2906
+ "coding",
2907
+ "vision"
2908
+ ],
2909
+ billing_mode: "free",
2910
+ pricing: {
2911
+ input: 0,
2912
+ output: 0
2913
+ },
2914
+ context_window: 131072,
2915
+ max_output: 16384
2916
+ }
2917
+ }
2918
+ },
2525
2919
  {
2526
2920
  id: "nvidia/nemotron-3.5-lightning",
2527
2921
  name: "Nemotron 3.5 Lightning (Free)",
@@ -2536,7 +2930,7 @@ var init_snapshot_v1 = __esm({
2536
2930
  redirects: [],
2537
2931
  networks: {
2538
2932
  base: {
2539
- listed: false,
2933
+ listed: true,
2540
2934
  categories: [
2541
2935
  "chat",
2542
2936
  "reasoning"
@@ -2707,7 +3101,7 @@ var init_snapshot_v1 = __esm({
2707
3101
  name: "GPT-4.1 Nano",
2708
3102
  provider: "openai",
2709
3103
  description: "Ultra-fast and cost-effective GPT-4.1",
2710
- lifecycle: "active",
3104
+ lifecycle: "deprecated",
2711
3105
  declared_capabilities: [
2712
3106
  "chat",
2713
3107
  "vision"
@@ -2716,7 +3110,7 @@ var init_snapshot_v1 = __esm({
2716
3110
  redirects: [],
2717
3111
  networks: {
2718
3112
  base: {
2719
- listed: true,
3113
+ listed: false,
2720
3114
  categories: [
2721
3115
  "chat"
2722
3116
  ],
@@ -2730,7 +3124,7 @@ var init_snapshot_v1 = __esm({
2730
3124
  max_output: 32768
2731
3125
  },
2732
3126
  solana: {
2733
- listed: true,
3127
+ listed: false,
2734
3128
  categories: [
2735
3129
  "chat",
2736
3130
  "vision"
@@ -3082,7 +3476,7 @@ var init_snapshot_v1 = __esm({
3082
3476
  id: "openai/gpt-5.4",
3083
3477
  name: "GPT-5.4",
3084
3478
  provider: "openai",
3085
- description: "Most capable and efficient frontier model with 1M context, native computer use, and thinking mode",
3479
+ description: "GPT-5.4 frontier model with 1M context, native computer use, and thinking mode",
3086
3480
  lifecycle: "active",
3087
3481
  declared_capabilities: [
3088
3482
  "chat",
@@ -3567,7 +3961,7 @@ var init_snapshot_v1 = __esm({
3567
3961
  id: "openai/gpt-5.6-sol",
3568
3962
  name: "GPT-5.6 Sol",
3569
3963
  provider: "openai",
3570
- description: "OpenAI flagship tier \u2014 deepest reasoning for complex coding, agentic workflows, and long-horizon problems. 1M context",
3964
+ description: "Top GPT-5.6 tier \u2014 deepest reasoning for complex coding, agentic workflows, and long-horizon problems. 1M context",
3571
3965
  lifecycle: "active",
3572
3966
  declared_capabilities: [
3573
3967
  "chat",
@@ -3977,6 +4371,52 @@ var init_snapshot_v1 = __esm({
3977
4371
  }
3978
4372
  }
3979
4373
  },
4374
+ {
4375
+ id: "openai/gpt-6-luna-decisions",
4376
+ name: "GPT-6 Luna Decisions",
4377
+ provider: "openai",
4378
+ description: "Typed judgments over text or images: predicate (yes/no with a probability), choice (one of your values, with per-value probabilities) or score (an ordered rubric). OpenAI Decisions-compatible \u2014 POST /v1/decisions, not /v1/chat/completions. Billed on input tokens only, plus the transaction fee per call; with an API key from https://user.blockrun.ai, https://api.blockrun.ai/v1/decisions bills them from credit.",
4379
+ lifecycle: "active",
4380
+ declared_capabilities: [
4381
+ "judgment"
4382
+ ],
4383
+ aliases: [],
4384
+ redirects: [],
4385
+ networks: {
4386
+ base: {
4387
+ listed: true,
4388
+ categories: [
4389
+ "judgment"
4390
+ ],
4391
+ billing_mode: "per_token",
4392
+ pricing: {
4393
+ input: 0.1,
4394
+ output: 0,
4395
+ transaction_fee: 1e-3,
4396
+ long_context: {
4397
+ threshold: 272e3,
4398
+ input: 0.2
4399
+ }
4400
+ }
4401
+ },
4402
+ solana: {
4403
+ listed: true,
4404
+ categories: [
4405
+ "judgment"
4406
+ ],
4407
+ billing_mode: "per_token",
4408
+ pricing: {
4409
+ input: 0.1,
4410
+ output: 0,
4411
+ long_context_threshold: 272e3,
4412
+ long_context_input: 0.2,
4413
+ per_call_fee_exact: 1e-3,
4414
+ per_call_fee_batch: 0,
4415
+ service_fee: 0
4416
+ }
4417
+ }
4418
+ }
4419
+ },
3980
4420
  {
3981
4421
  id: "openai/gpt-6-sol",
3982
4422
  name: "GPT-6 Sol",
@@ -4145,7 +4585,7 @@ var init_snapshot_v1 = __esm({
4145
4585
  ],
4146
4586
  billing_mode: "per_image",
4147
4587
  pricing: {
4148
- per_image: 0.02
4588
+ per_image: 0.021
4149
4589
  }
4150
4590
  }
4151
4591
  }
@@ -4180,7 +4620,7 @@ var init_snapshot_v1 = __esm({
4180
4620
  ],
4181
4621
  billing_mode: "per_image",
4182
4622
  pricing: {
4183
- per_image: 0.06
4623
+ per_image: 0.063
4184
4624
  }
4185
4625
  }
4186
4626
  }
@@ -4215,7 +4655,7 @@ var init_snapshot_v1 = __esm({
4215
4655
  ],
4216
4656
  billing_mode: "per_image",
4217
4657
  pricing: {
4218
- per_image: 0.28
4658
+ per_image: 0.294
4219
4659
  }
4220
4660
  }
4221
4661
  }
@@ -4250,7 +4690,7 @@ var init_snapshot_v1 = __esm({
4250
4690
  ],
4251
4691
  billing_mode: "per_image",
4252
4692
  pricing: {
4253
- per_image: 0.28
4693
+ per_image: 0.294
4254
4694
  }
4255
4695
  }
4256
4696
  }
@@ -4305,7 +4745,7 @@ var init_snapshot_v1 = __esm({
4305
4745
  id: "openai/o3",
4306
4746
  name: "o3",
4307
4747
  provider: "openai",
4308
- description: "Latest reasoning model with improved performance",
4748
+ description: "o-series reasoning model with improved performance",
4309
4749
  lifecycle: "active",
4310
4750
  declared_capabilities: [
4311
4751
  "chat",
@@ -4397,7 +4837,7 @@ var init_snapshot_v1 = __esm({
4397
4837
  id: "openai/o4-mini",
4398
4838
  name: "o4-mini",
4399
4839
  provider: "openai",
4400
- description: "Latest generation efficient reasoning model",
4840
+ description: "Efficient o4-generation reasoning model",
4401
4841
  lifecycle: "active",
4402
4842
  declared_capabilities: [
4403
4843
  "coding",
@@ -4587,7 +5027,7 @@ var init_snapshot_v1 = __esm({
4587
5027
  id: "qwen/qwen3.7-max",
4588
5028
  name: "Qwen3.7 Max",
4589
5029
  provider: "qwen",
4590
- description: "Alibaba's Qwen flagship \u2014 the Max tier. 1M context, strong reasoning, coding, and agentic tool use. Live-verified 2026-07-20.",
5030
+ description: "Alibaba's Qwen3.7 Max tier. 1M context, strong reasoning, coding, and agentic tool use. Live-verified 2026-07-20.",
4591
5031
  lifecycle: "active",
4592
5032
  declared_capabilities: [
4593
5033
  "chat",
@@ -4778,6 +5218,43 @@ var init_snapshot_v1 = __esm({
4778
5218
  }
4779
5219
  }
4780
5220
  },
5221
+ {
5222
+ id: "reflection/beam-1.0-501b-a23b",
5223
+ name: "Beam 1.0",
5224
+ provider: "reflection",
5225
+ description: "Reflection's Beam 1.0 \u2014 open-weight 501B MoE (23B active) reasoning model for coding and long-horizon agents. 1M context, tool calling, reasoning_effort low-max.",
5226
+ lifecycle: "active",
5227
+ declared_capabilities: [
5228
+ "chat",
5229
+ "coding",
5230
+ "reasoning"
5231
+ ],
5232
+ aliases: [],
5233
+ redirects: [],
5234
+ networks: {
5235
+ base: {
5236
+ listed: false,
5237
+ categories: [],
5238
+ billing_mode: "unavailable",
5239
+ pricing: {}
5240
+ },
5241
+ solana: {
5242
+ listed: true,
5243
+ categories: [
5244
+ "chat",
5245
+ "coding",
5246
+ "reasoning"
5247
+ ],
5248
+ billing_mode: "paid",
5249
+ pricing: {
5250
+ input: 0.25,
5251
+ output: 1
5252
+ },
5253
+ context_window: 1048576,
5254
+ max_output: 131072
5255
+ }
5256
+ }
5257
+ },
4781
5258
  {
4782
5259
  id: "tencent/hy4-preview",
4783
5260
  name: "Tencent Hy4 Preview",
@@ -4895,7 +5372,7 @@ var init_snapshot_v1 = __esm({
4895
5372
  id: "xai/grok-4.5",
4896
5373
  name: "Grok 4.5",
4897
5374
  provider: "xai",
4898
- description: "xAI's flagship Grok 4.5 \u2014 their most intelligent and fastest model. 500K context, vision-capable, chain-of-thought reasoning. Supports Live Search (+$0.30 per call)",
5375
+ description: "xAI's Grok 4.5 \u2014 500K context, vision-capable, chain-of-thought reasoning. Supports Live Search (+$0.30 per call)",
4899
5376
  lifecycle: "active",
4900
5377
  declared_capabilities: [
4901
5378
  "chat",
@@ -4965,7 +5442,7 @@ var init_snapshot_v1 = __esm({
4965
5442
  id: "xai/grok-4.6",
4966
5443
  name: "Grok 4.6",
4967
5444
  provider: "xai",
4968
- description: "xAI's flagship Grok 4.6 \u2014 500K context, chain-of-thought reasoning with selectable effort. Supports Live Search (+$0.30 per call)",
5445
+ description: "xAI's Grok 4.6 \u2014 500K context, chain-of-thought reasoning with selectable effort. Supports Live Search (+$0.30 per call)",
4969
5446
  lifecycle: "active",
4970
5447
  declared_capabilities: [
4971
5448
  "chat",
@@ -5192,7 +5669,7 @@ var init_snapshot_v1 = __esm({
5192
5669
  ],
5193
5670
  billing_mode: "per_image",
5194
5671
  pricing: {
5195
- per_image: 0.02
5672
+ per_image: 0.021
5196
5673
  }
5197
5674
  }
5198
5675
  }
@@ -5201,7 +5678,7 @@ var init_snapshot_v1 = __esm({
5201
5678
  id: "xai/grok-imagine-image-2.0",
5202
5679
  name: "Grok Imagine 2.0",
5203
5680
  provider: "xai",
5204
- description: "xAI's Grok Imagine 2.0 image generation. Sits between Grok Imagine and the Pro quality tier on price.",
5681
+ description: "xAI's Grok Imagine 2.0 image generation at low quality. Sits between Grok Imagine and Grok Imagine Pro on price.",
5205
5682
  lifecycle: "active",
5206
5683
  declared_capabilities: [
5207
5684
  "image"
@@ -5227,7 +5704,7 @@ var init_snapshot_v1 = __esm({
5227
5704
  ],
5228
5705
  billing_mode: "per_image",
5229
5706
  pricing: {
5230
- per_image: 0.04
5707
+ per_image: 0.042
5231
5708
  }
5232
5709
  }
5233
5710
  }
@@ -5236,7 +5713,7 @@ var init_snapshot_v1 = __esm({
5236
5713
  id: "xai/grok-imagine-image-pro",
5237
5714
  name: "Grok Imagine Pro",
5238
5715
  provider: "xai",
5239
- description: "xAI's premium Grok Imagine image generation (quality tier). Higher quality, 30 RPM.",
5716
+ description: "xAI's Grok Imagine 2.0 image generation at medium quality: finer detail than Grok Imagine 2.0. 30 RPM.",
5240
5717
  lifecycle: "active",
5241
5718
  declared_capabilities: [
5242
5719
  "image"
@@ -5251,7 +5728,7 @@ var init_snapshot_v1 = __esm({
5251
5728
  ],
5252
5729
  billing_mode: "per_image",
5253
5730
  pricing: {
5254
- per_image: 0.0525,
5731
+ per_image: 0.063,
5255
5732
  transaction_fee: 1e-3
5256
5733
  }
5257
5734
  },
@@ -5262,7 +5739,7 @@ var init_snapshot_v1 = __esm({
5262
5739
  ],
5263
5740
  billing_mode: "per_image",
5264
5741
  pricing: {
5265
- per_image: 0.05
5742
+ per_image: 0.063
5266
5743
  }
5267
5744
  }
5268
5745
  }
@@ -5271,7 +5748,7 @@ var init_snapshot_v1 = __esm({
5271
5748
  id: "xai/grok-imagine-video",
5272
5749
  name: "Grok Imagine Video",
5273
5750
  provider: "xai",
5274
- description: "xAI's Grok Imagine video generation. Text or image to video, configurable 1\u201315s clips. $0.05/sec at 480p (default), $0.07/sec at 720p \u2014 official per-second rates, plus a flat $0.001 per generation.",
5751
+ description: "xAI's Grok Imagine video generation. Text or image to video, configurable 1\u201315s clips. $0.05/sec at 480p (default), $0.07/sec at 720p \u2014 official per-second rates, plus $0.002 per input image and a flat $0.001 per generation.",
5275
5752
  lifecycle: "active",
5276
5753
  declared_capabilities: [
5277
5754
  "video"
@@ -5288,6 +5765,7 @@ var init_snapshot_v1 = __esm({
5288
5765
  pricing: {
5289
5766
  per_second: 0.05,
5290
5767
  per_call_surcharge: 1e-3,
5768
+ per_input_image: 2e-3,
5291
5769
  transaction_fee: 1e-3,
5292
5770
  default_duration_seconds: 8,
5293
5771
  max_duration_seconds: 15
@@ -5301,6 +5779,8 @@ var init_snapshot_v1 = __esm({
5301
5779
  billing_mode: "per_second",
5302
5780
  pricing: {
5303
5781
  per_second: 0.05,
5782
+ per_call_surcharge: 1e-3,
5783
+ per_input_image: 2e-3,
5304
5784
  default_duration_seconds: 8,
5305
5785
  max_duration_seconds: 15
5306
5786
  }
@@ -5311,7 +5791,7 @@ var init_snapshot_v1 = __esm({
5311
5791
  id: "xai/grok-imagine-video-1.5",
5312
5792
  name: "Grok Imagine Video 1.5",
5313
5793
  provider: "xai",
5314
- description: "xAI's flagship Grok Imagine Video 1.5 \u2014 text or image to video with native synced audio, 1\u201315s clips. $0.08/sec at 480p (default), $0.14/sec at 720p, $0.25/sec at 1080p \u2014 official per-second rates, plus a flat $0.001 per generation.",
5794
+ description: "xAI's flagship Grok Imagine Video 1.5 \u2014 text or image to video with native synced audio, 1\u201315s clips. $0.08/sec at 480p (default), $0.14/sec at 720p, $0.25/sec at 1080p \u2014 official per-second rates, plus $0.01 per input image and a flat $0.001 per generation. First-and-last-frame at 480p and 720p.",
5315
5795
  lifecycle: "active",
5316
5796
  declared_capabilities: [
5317
5797
  "video"
@@ -5328,6 +5808,7 @@ var init_snapshot_v1 = __esm({
5328
5808
  pricing: {
5329
5809
  per_second: 0.08,
5330
5810
  per_call_surcharge: 1e-3,
5811
+ per_input_image: 0.01,
5331
5812
  transaction_fee: 1e-3,
5332
5813
  default_duration_seconds: 8,
5333
5814
  max_duration_seconds: 15
@@ -5341,6 +5822,8 @@ var init_snapshot_v1 = __esm({
5341
5822
  billing_mode: "per_second",
5342
5823
  pricing: {
5343
5824
  per_second: 0.08,
5825
+ per_call_surcharge: 1e-3,
5826
+ per_input_image: 0.01,
5344
5827
  default_duration_seconds: 8,
5345
5828
  max_duration_seconds: 15
5346
5829
  }
@@ -5466,7 +5949,7 @@ var init_snapshot_v1 = __esm({
5466
5949
  ],
5467
5950
  billing_mode: "per_image",
5468
5951
  pricing: {
5469
- per_image: 0.015
5952
+ per_image: 0.01575
5470
5953
  }
5471
5954
  }
5472
5955
  }
@@ -5565,7 +6048,7 @@ var init_snapshot_v1 = __esm({
5565
6048
  id: "zai/glm-5.1",
5566
6049
  name: "GLM-5.1",
5567
6050
  provider: "zai",
5568
- description: "Z.AI flagship \u2014 #1 open source on SWE-Bench Pro, 8-hour autonomous execution. 200K context",
6051
+ description: "Z.AI's GLM-5.1 \u2014 #1 open source on SWE-Bench Pro, 8-hour autonomous execution. 200K context",
5569
6052
  lifecycle: "active",
5570
6053
  declared_capabilities: [
5571
6054
  "chat",
@@ -5756,8 +6239,8 @@ var init_snapshot_v1 = __esm({
5756
6239
  },
5757
6240
  picker_policy: {
5758
6241
  schema_version: 1,
5759
- policy_version: "2026.10.20.4",
5760
- catalog_version: "2026.11.12.1",
6242
+ policy_version: "2026.11.12.2",
6243
+ catalog_version: "2026.11.12.2",
5761
6244
  default_network: "solana",
5762
6245
  compatibility_shortcuts: {
5763
6246
  "opus-4.6": "anthropic/claude-opus-4.6",
@@ -5826,7 +6309,7 @@ var init_snapshot_v1 = __esm({
5826
6309
  "xiaomi/mimo-v2.5-pro",
5827
6310
  "minimax/minimax-m3",
5828
6311
  "minimax/minimax-m2.7",
5829
- "moonshot/kimi-k3",
6312
+ "moonshot/kimi-k3.1-pro",
5830
6313
  "qwen/qwen3.7-max",
5831
6314
  "qwen/qwen3.8-flash",
5832
6315
  "deepseek/deepseek-v4-flash-vision-exp",
@@ -5837,7 +6320,8 @@ var init_snapshot_v1 = __esm({
5837
6320
  "cohere/north-mini-code",
5838
6321
  "nvidia/nemotron-3-nano-omni-30b-a3b-reasoning",
5839
6322
  "nvidia/nemotron-3-ultra-550b",
5840
- "nvidia/llama-3.2-11b-vision"
6323
+ "nvidia/nemotron-3-super-120b",
6324
+ "nvidia/nemotron-3.5-bolt"
5841
6325
  ],
5842
6326
  groups: [
5843
6327
  {
@@ -5879,7 +6363,7 @@ var init_snapshot_v1 = __esm({
5879
6363
  "xiaomi/mimo-v2.5-pro",
5880
6364
  "minimax/minimax-m3",
5881
6365
  "minimax/minimax-m2.7",
5882
- "moonshot/kimi-k3",
6366
+ "moonshot/kimi-k3.1-pro",
5883
6367
  "qwen/qwen3.7-max",
5884
6368
  "qwen/qwen3.8-flash",
5885
6369
  "deepseek/deepseek-v4-flash-vision-exp",
@@ -5896,7 +6380,8 @@ var init_snapshot_v1 = __esm({
5896
6380
  "cohere/north-mini-code",
5897
6381
  "nvidia/nemotron-3-nano-omni-30b-a3b-reasoning",
5898
6382
  "nvidia/nemotron-3-ultra-550b",
5899
- "nvidia/llama-3.2-11b-vision"
6383
+ "nvidia/nemotron-3-super-120b",
6384
+ "nvidia/nemotron-3.5-bolt"
5900
6385
  ]
5901
6386
  }
5902
6387
  ],
@@ -5952,7 +6437,7 @@ var init_snapshot_v1 = __esm({
5952
6437
  "glm-5": "zai/glm-5",
5953
6438
  "glm-turbo": "zai/glm-5-turbo",
5954
6439
  glm5: "zai/glm-5.1",
5955
- kimi: "moonshot/kimi-k3",
6440
+ kimi: "moonshot/kimi-k3.1-pro",
5956
6441
  "br-sonnet": "anthropic/claude-sonnet-4.6",
5957
6442
  "sonnet-4": "anthropic/claude-sonnet-4.6",
5958
6443
  "sonnet-4-6": "anthropic/claude-sonnet-4.6",
@@ -6006,7 +6491,7 @@ var init_snapshot_v1 = __esm({
6006
6491
  "openai-codex/gpt-5.4-mini": "openai/gpt-5.4-mini",
6007
6492
  "gpt-5.4-mini": "openai/gpt-5.4-mini",
6008
6493
  "deepseek-chat": "deepseek/deepseek-chat",
6009
- "kimi-k3": "moonshot/kimi-k3",
6494
+ "kimi-k3": "moonshot/kimi-k3.1-pro",
6010
6495
  "qwen3.7-max": "qwen/qwen3.7-max",
6011
6496
  "qwen3.8-flash": "qwen/qwen3.8-flash",
6012
6497
  "qwen3-8-flash": "qwen/qwen3.8-flash",
@@ -6054,7 +6539,7 @@ var init_snapshot_v1 = __esm({
6054
6539
  "free/devstral-2-123b": "nvidia/nemotron-3.5-lightning",
6055
6540
  "mistral-free": "nvidia/nemotron-3.5-lightning",
6056
6541
  "glm-free": "nvidia/nemotron-3.5-lightning",
6057
- "llama-free": "nvidia/llama-3.2-11b-vision",
6542
+ "llama-free": "nvidia/nemotron-3-nano-omni-30b-a3b-reasoning",
6058
6543
  "qwen-coder-free": "nvidia/nemotron-3.5-lightning",
6059
6544
  "qwen-thinking": "nvidia/nemotron-3.5-lightning",
6060
6545
  "coder-free": "cohere/north-mini-code",
@@ -6074,7 +6559,7 @@ var init_snapshot_v1 = __esm({
6074
6559
  "nvidia/nemotron-3.5-lightning": "nvidia/nemotron-3.5-lightning",
6075
6560
  "nvidia/nemotron-3-nano-30b": "nvidia/nemotron-3-nano-omni-30b-a3b-reasoning",
6076
6561
  "nvidia/nemotron-3-ultra-550b": "nvidia/nemotron-3-ultra-550b",
6077
- "nvidia/llama-3.2-11b-vision": "nvidia/llama-3.2-11b-vision",
6562
+ "nvidia/llama-3.2-11b-vision": "nvidia/nemotron-3-nano-omni-30b-a3b-reasoning",
6078
6563
  "cohere/north-mini-code": "cohere/north-mini-code",
6079
6564
  "poolside/laguna-xs-2.1": "poolside/laguna-xs-2.1",
6080
6565
  lightning: "nvidia/nemotron-3.5-lightning",
@@ -6084,8 +6569,8 @@ var init_snapshot_v1 = __esm({
6084
6569
  "nemotron-nano-30b": "nvidia/nemotron-3-nano-omni-30b-a3b-reasoning",
6085
6570
  "ultra-550b": "nvidia/nemotron-3-ultra-550b",
6086
6571
  "nemotron-ultra-550b": "nvidia/nemotron-3-ultra-550b",
6087
- "llama-vision": "nvidia/llama-3.2-11b-vision",
6088
- "llama-3.2-vision": "nvidia/llama-3.2-11b-vision",
6572
+ "llama-vision": "nvidia/nemotron-3-nano-omni-30b-a3b-reasoning",
6573
+ "llama-3.2-vision": "nvidia/nemotron-3-nano-omni-30b-a3b-reasoning",
6089
6574
  "north-mini": "cohere/north-mini-code",
6090
6575
  "north-mini-code": "cohere/north-mini-code",
6091
6576
  laguna: "poolside/laguna-xs-2.1",
@@ -6105,7 +6590,7 @@ var init_snapshot_v1 = __esm({
6105
6590
  qwen: "qwen/qwen3.8-max",
6106
6591
  "free-code": "cohere/north-mini-code",
6107
6592
  "free-fast": "nvidia/nemotron-3.5-lightning",
6108
- "free-vision": "nvidia/llama-3.2-11b-vision",
6593
+ "free-vision": "nvidia/nemotron-3-nano-omni-30b-a3b-reasoning",
6109
6594
  "claude-sonnet-4.5": "anthropic/claude-sonnet-4.5",
6110
6595
  "gpt-5-mini": "openai/gpt-5-mini",
6111
6596
  "gemini-2.5-pro": "google/gemini-2.5-pro",
@@ -6130,7 +6615,7 @@ var init_snapshot_v1 = __esm({
6130
6615
  "gpt-6-luna": "openai/gpt-6-luna",
6131
6616
  "grok-4.6": "xai/grok-4.6",
6132
6617
  "claude-sonnet-4.6": "anthropic/claude-sonnet-4.6",
6133
- "llama-3.2-11b-vision": "nvidia/llama-3.2-11b-vision",
6618
+ "llama-3.2-11b-vision": "nvidia/nemotron-3-nano-omni-30b-a3b-reasoning",
6134
6619
  "hy4-preview": "tencent/hy4-preview",
6135
6620
  "gpt-4o-mini": "openai/gpt-4o-mini",
6136
6621
  "claude-opus-4.7": "anthropic/claude-opus-4.7",
@@ -6143,19 +6628,26 @@ var init_snapshot_v1 = __esm({
6143
6628
  "gemini-3-flash-preview": "google/gemini-3-flash-preview",
6144
6629
  "claude-fable-5.1": "anthropic/claude-fable-5.1",
6145
6630
  "gpt-6-astra": "openai/gpt-6-astra",
6146
- "gpt-4.1-nano": "openai/gpt-4.1-nano",
6631
+ "gpt-4.1-nano": "openai/gpt-5.4-nano",
6147
6632
  "gpt-5.3-codex": "openai/gpt-5.3-codex",
6148
6633
  "gpt-6.1-sol": "openai/gpt-6.1-sol",
6149
6634
  "mistral-large-4": "mistral/mistral-large-4",
6150
- "deepseek-v4.1-flash": "deepseek/deepseek-v4.1-flash"
6635
+ "deepseek-v4.1-flash": "deepseek/deepseek-v4.1-flash",
6636
+ "gemini-4-carbon": "google/gemini-4-carbon",
6637
+ "kimi-k3.1-pro": "moonshot/kimi-k3.1-pro",
6638
+ "kimi-k3.1": "moonshot/kimi-k3.1-pro",
6639
+ "nemotron-3.5-bolt": "nvidia/nemotron-3.5-bolt",
6640
+ "nemotron-bolt": "nvidia/nemotron-3.5-bolt",
6641
+ "nemotron-3-super": "nvidia/nemotron-3-super-120b",
6642
+ "minimax-m3.1-flash": "nvidia/minimax-m3.1-flash"
6151
6643
  }
6152
6644
  }
6153
6645
  }
6154
6646
  },
6155
6647
  router_policy: {
6156
6648
  schema_version: 1,
6157
- policy_version: "2026.09.29.1",
6158
- catalog_version: "2026.11.12.1",
6649
+ policy_version: "2026.11.12.2",
6650
+ catalog_version: "2026.11.12.2",
6159
6651
  default_network: "solana",
6160
6652
  status: "draft",
6161
6653
  description: "Prototype model-specific policy for Router Core. Do not consume in production until benchmark review is complete.",
@@ -6169,7 +6661,7 @@ var init_snapshot_v1 = __esm({
6169
6661
  medium: [
6170
6662
  "openai/gpt-5.6-luna",
6171
6663
  "google/gemini-3.6-flash",
6172
- "moonshot/kimi-k3",
6664
+ "moonshot/kimi-k3.1-pro",
6173
6665
  "qwen/qwen3.8-flash"
6174
6666
  ],
6175
6667
  complex: [
@@ -6188,7 +6680,7 @@ var init_snapshot_v1 = __esm({
6188
6680
  "openai/gpt-5.6-terra",
6189
6681
  "anthropic/claude-sonnet-5",
6190
6682
  "xai/grok-4.5",
6191
- "moonshot/kimi-k3"
6683
+ "moonshot/kimi-k3.1-pro"
6192
6684
  ]
6193
6685
  },
6194
6686
  free_candidate_sets: {
@@ -6202,7 +6694,6 @@ var init_snapshot_v1 = __esm({
6202
6694
  "nvidia/nemotron-3-ultra-550b"
6203
6695
  ],
6204
6696
  vision: [
6205
- "nvidia/llama-3.2-11b-vision",
6206
6697
  "nvidia/nemotron-3-nano-omni-30b-a3b-reasoning"
6207
6698
  ]
6208
6699
  },
@@ -6849,7 +7340,7 @@ var init_top_models = __esm({
6849
7340
  "poolside/laguna-s-2.1",
6850
7341
  "minimax/minimax-m3",
6851
7342
  "minimax/minimax-m2.7",
6852
- "moonshot/kimi-k3",
7343
+ "moonshot/kimi-k3.1-pro",
6853
7344
  "qwen/qwen3.7-max",
6854
7345
  "qwen/qwen3.8-max",
6855
7346
  "qwen/qwen3.8-flash",
@@ -7006,6 +7497,8 @@ var init_models = __esm({
7006
7497
  // accepts is safe to alias.
7007
7498
  "fable-5.1": "anthropic/claude-fable-5.1",
7008
7499
  "fable-5-1": "anthropic/claude-fable-5.1",
7500
+ "fable-5.2": "anthropic/claude-fable-5.2",
7501
+ "fable-5-2": "anthropic/claude-fable-5.2",
7009
7502
  "anthropic/claude-fable-5-1": "anthropic/claude-fable-5.1",
7010
7503
  // Opus 5 (2026-07-24) takes the bare `opus` alias: identical $5/$25 and the
7011
7504
  // same 1M/128K envelope as 4.8, so a wallet with a per-call cost cap sees no
@@ -7129,6 +7622,10 @@ var init_models = __esm({
7129
7622
  kimi: "moonshot/kimi-k2.7",
7130
7623
  moonshot: "moonshot/kimi-k2.7",
7131
7624
  "kimi-k3": "moonshot/kimi-k3",
7625
+ // K3.1 Pro superseded K3 on BlockRun 2026-10-25 (K3 hidden, still routable) and is
7626
+ // cheaper ($2/$10 vs $3/$15). Bare `kimi` stays on K2.7 for the reason above.
7627
+ "kimi-k3.1": "moonshot/kimi-k3.1-pro",
7628
+ "kimi-k3.1-pro": "moonshot/kimi-k3.1-pro",
7132
7629
  "kimi-k2": "moonshot/kimi-k2.7",
7133
7630
  "kimi-k2.7": "moonshot/kimi-k2.7",
7134
7631
  "kimi-k2.6": "moonshot/kimi-k2.6",
@@ -7419,6 +7916,7 @@ var init_models = __esm({
7419
7916
  "nvidia/nemotron-3.5-lightning": "free/nemotron-3.5-lightning",
7420
7917
  "nvidia/nemotron-3-nano-30b": "free/nemotron-3-nano-omni-30b-a3b-reasoning",
7421
7918
  "nvidia/nemotron-3-ultra-550b": "free/nemotron-3-ultra-550b",
7919
+ "nvidia/minimax-m3.1-flash": "free/minimax-m3.1-flash",
7422
7920
  "nvidia/llama-3.2-11b-vision": "free/llama-3.2-11b-vision",
7423
7921
  // The two non-NVIDIA free models keep the `free/` picker convention; their
7424
7922
  // real upstream ids are accepted as pins and rewritten in toUpstreamModelId
@@ -7434,6 +7932,7 @@ var init_models = __esm({
7434
7932
  "nemotron-nano-30b": "free/nemotron-3-nano-omni-30b-a3b-reasoning",
7435
7933
  "ultra-550b": "free/nemotron-3-ultra-550b",
7436
7934
  "nemotron-ultra-550b": "free/nemotron-3-ultra-550b",
7935
+ "minimax-m3.1-flash": "free/minimax-m3.1-flash",
7437
7936
  "llama-vision": "free/llama-3.2-11b-vision",
7438
7937
  "llama-3.2-vision": "free/llama-3.2-11b-vision",
7439
7938
  "north-mini": "free/north-mini-code",
@@ -8188,6 +8687,21 @@ var init_models = __esm({
8188
8687
  agentic: true,
8189
8688
  toolCalling: true
8190
8689
  },
8690
+ {
8691
+ // Successor to Fable 5.1 at a lower price; always-on thinking. Listed on
8692
+ // Base only (sol.blockrun.ai does not carry it as of 2026-11-12).
8693
+ id: "anthropic/claude-fable-5.2",
8694
+ name: "Claude Fable 5.2",
8695
+ version: "5.2",
8696
+ inputPrice: 8,
8697
+ outputPrice: 40,
8698
+ contextWindow: 1e6,
8699
+ maxOutput: 128e3,
8700
+ reasoning: true,
8701
+ vision: true,
8702
+ agentic: true,
8703
+ toolCalling: true
8704
+ },
8191
8705
  {
8192
8706
  id: "anthropic/claude-opus-5.5",
8193
8707
  name: "Claude Opus 5.5",
@@ -8259,6 +8773,20 @@ var init_models = __esm({
8259
8773
  vision: true,
8260
8774
  toolCalling: true
8261
8775
  },
8776
+ {
8777
+ // Gemini 4's top reasoning tier (blockrun added 2026-11-11). Same dated
8778
+ // ⏰ INTRO RATE as Argon above: 2/10 through 2026-11-30, 4/20 from 2026-12-01.
8779
+ id: "google/gemini-4-carbon",
8780
+ name: "Gemini 4 Carbon",
8781
+ version: "4",
8782
+ inputPrice: 2,
8783
+ outputPrice: 10,
8784
+ contextWindow: 1048576,
8785
+ maxOutput: 65536,
8786
+ reasoning: true,
8787
+ vision: true,
8788
+ toolCalling: true
8789
+ },
8262
8790
  {
8263
8791
  // Current-generation Flash. Live in the BlockRun catalog (chat, reasoning,
8264
8792
  // coding, vision; $0.75/$3.75) and pinned from the Hermes picker, so it
@@ -8449,6 +8977,22 @@ var init_models = __esm({
8449
8977
  agentic: true,
8450
8978
  toolCalling: true
8451
8979
  },
8980
+ // Kimi K3.1 Pro — post-trained successor to K3 for long-horizon coding and agents
8981
+ // (blockrun 2026-10-25, which hid K3). 1M context, image + text input, returns
8982
+ // reasoning_content. $2/$10 raw cost, cheaper than K3.
8983
+ {
8984
+ id: "moonshot/kimi-k3.1-pro",
8985
+ name: "Kimi K3.1 Pro",
8986
+ version: "k3.1-pro",
8987
+ inputPrice: 2,
8988
+ outputPrice: 10,
8989
+ contextWindow: 1048576,
8990
+ maxOutput: 65536,
8991
+ reasoning: true,
8992
+ vision: true,
8993
+ agentic: true,
8994
+ toolCalling: true
8995
+ },
8452
8996
  // Kimi K3 — Moonshot's flagship (blockrun added 2026-07-17, live-probed same day).
8453
8997
  // 2.8T-param open MoE, 1M context, image + text input, returns reasoning_content.
8454
8998
  // Priced at COGS + BlockRun's 5% margin: users pay ~$3.15/$15.75 per 1M; the fields
@@ -9168,6 +9712,20 @@ var init_models = __esm({
9168
9712
  maxOutput: 16384,
9169
9713
  reasoning: true
9170
9714
  },
9715
+ {
9716
+ // MiniMax M3.1 Flash, hosted free by NVIDIA (blockrun 2026-11-05). Pin-only:
9717
+ // off the picker and the FREE_MODELS cascade until it has its own probe record
9718
+ // here. The gateway health-gates it (it may answer `available: false`).
9719
+ id: "free/minimax-m3.1-flash",
9720
+ name: "[Free] MiniMax M3.1 Flash",
9721
+ version: "m3.1-flash",
9722
+ inputPrice: 0,
9723
+ outputPrice: 0,
9724
+ contextWindow: 1048576,
9725
+ maxOutput: 16384,
9726
+ reasoning: true,
9727
+ toolCalling: true
9728
+ },
9171
9729
  {
9172
9730
  // Meta Llama 3.2 11B Vision — restores a free Llama after nemotron-super-49b
9173
9731
  // (Llama-3.3-based) hit NVIDIA's 410 EOL. A 12-model sweep found exactly two
@@ -58557,7 +59115,7 @@ var init_chunk_XW2CWVLZ = __esm({
58557
59115
  }
58558
59116
  });
58559
59117
 
58560
- // node_modules/@x402/core/dist/esm/chunk-U5TAZTKB.mjs
59118
+ // node_modules/@x402/core/dist/esm/chunk-PVRH2E6N.mjs
58561
59119
  async function readLimitedText(response, limit) {
58562
59120
  if (!response.body) {
58563
59121
  return response.text();
@@ -58607,8 +59165,8 @@ function decodePaymentResponseHeader(paymentResponseHeader) {
58607
59165
  );
58608
59166
  }
58609
59167
  var MAX_CONTROL_PLANE_RESPONSE_BYTES, ResponseBodyTooLargeError2, verifyResponseSchema, settleResponseSchema, supportedKindSchema, supportedResponseSchema, x402HTTPClient, requireDecodedJsonObject;
58610
- var init_chunk_U5TAZTKB = __esm({
58611
- "node_modules/@x402/core/dist/esm/chunk-U5TAZTKB.mjs"() {
59168
+ var init_chunk_PVRH2E6N = __esm({
59169
+ "node_modules/@x402/core/dist/esm/chunk-PVRH2E6N.mjs"() {
58612
59170
  "use strict";
58613
59171
  init_chunk_Z7WXFCST();
58614
59172
  init_chunk_VE37GDG2();
@@ -58932,7 +59490,7 @@ var DEFAULT_MAX_AMOUNT_PER_PAYMENT, x402Client;
58932
59490
  var init_client = __esm({
58933
59491
  "node_modules/@x402/core/dist/esm/client/index.mjs"() {
58934
59492
  "use strict";
58935
- init_chunk_U5TAZTKB();
59493
+ init_chunk_PVRH2E6N();
58936
59494
  init_chunk_Z7WXFCST();
58937
59495
  init_chunk_VE37GDG2();
58938
59496
  init_chunk_MA7F3CLI();
@@ -59573,7 +60131,7 @@ var init_client = __esm({
59573
60131
  var init_http4 = __esm({
59574
60132
  "node_modules/@x402/core/dist/esm/http/index.mjs"() {
59575
60133
  "use strict";
59576
- init_chunk_U5TAZTKB();
60134
+ init_chunk_PVRH2E6N();
59577
60135
  init_chunk_Z7WXFCST();
59578
60136
  init_chunk_VE37GDG2();
59579
60137
  init_chunk_MA7F3CLI();
@@ -59926,53 +60484,60 @@ var init_spend_control = __esm({
59926
60484
  };
59927
60485
  FileSpendControlStorage = class {
59928
60486
  spendingFile;
59929
- constructor() {
59930
- this.spendingFile = path.join(WALLET_DIR, "spending.json");
60487
+ constructor(spendingFile) {
60488
+ this.spendingFile = spendingFile ?? path.join(WALLET_DIR, "spending.json");
59931
60489
  }
59932
60490
  load() {
60491
+ let raw;
59933
60492
  try {
59934
- if (fs.existsSync(this.spendingFile)) {
59935
- const data = JSON.parse(readTextFileSync(this.spendingFile));
59936
- const rawLimits = data.limits ?? {};
59937
- const rawHistory = data.history ?? [];
59938
- const limits = {};
59939
- for (const key3 of ["perRequest", "hourly", "daily", "session"]) {
59940
- const val = rawLimits[key3];
59941
- if (typeof val === "number" && val > 0 && Number.isFinite(val)) {
59942
- limits[key3] = val;
59943
- }
59944
- }
59945
- for (const key3 of POLICY_LISTS) {
59946
- if (!Object.prototype.hasOwnProperty.call(rawLimits, key3)) continue;
59947
- const val = rawLimits[key3];
59948
- if (!isValidPolicyValues(val)) {
59949
- throw new MalformedSpendPolicyError(key3);
59950
- }
59951
- if (val.length === 0) continue;
59952
- limits[key3] = normalizePolicyValues(key3, val);
59953
- }
59954
- const history = [];
59955
- if (Array.isArray(rawHistory)) {
59956
- for (const r2 of rawHistory) {
59957
- if (typeof r2?.timestamp === "number" && typeof r2?.amount === "number" && Number.isFinite(r2.timestamp) && Number.isFinite(r2.amount) && r2.amount >= 0) {
59958
- history.push({
59959
- timestamp: r2.timestamp,
59960
- amount: r2.amount,
59961
- model: typeof r2.model === "string" ? r2.model : void 0,
59962
- action: typeof r2.action === "string" ? r2.action : void 0
59963
- });
59964
- }
60493
+ raw = readTextFileSync(this.spendingFile);
60494
+ } catch (err) {
60495
+ const code = err?.code;
60496
+ if (code === "ENOENT" || code === "ENOTDIR") {
60497
+ return null;
60498
+ }
60499
+ throw new UnreadableSpendPolicyError(err);
60500
+ }
60501
+ try {
60502
+ const data = JSON.parse(raw);
60503
+ const rawLimits = data.limits ?? {};
60504
+ const rawHistory = data.history ?? [];
60505
+ const limits = {};
60506
+ for (const key3 of ["perRequest", "hourly", "daily", "session"]) {
60507
+ const val = rawLimits[key3];
60508
+ if (typeof val === "number" && val > 0 && Number.isFinite(val)) {
60509
+ limits[key3] = val;
60510
+ }
60511
+ }
60512
+ for (const key3 of POLICY_LISTS) {
60513
+ if (!Object.prototype.hasOwnProperty.call(rawLimits, key3)) continue;
60514
+ const val = rawLimits[key3];
60515
+ if (!isValidPolicyValues(val)) {
60516
+ throw new MalformedSpendPolicyError(key3);
60517
+ }
60518
+ if (val.length === 0) continue;
60519
+ limits[key3] = normalizePolicyValues(key3, val);
60520
+ }
60521
+ const history = [];
60522
+ if (Array.isArray(rawHistory)) {
60523
+ for (const r2 of rawHistory) {
60524
+ if (typeof r2?.timestamp === "number" && typeof r2?.amount === "number" && Number.isFinite(r2.timestamp) && Number.isFinite(r2.amount) && r2.amount >= 0) {
60525
+ history.push({
60526
+ timestamp: r2.timestamp,
60527
+ amount: r2.amount,
60528
+ model: typeof r2.model === "string" ? r2.model : void 0,
60529
+ action: typeof r2.action === "string" ? r2.action : void 0
60530
+ });
59965
60531
  }
59966
60532
  }
59967
- return { limits, history };
59968
60533
  }
60534
+ return { limits, history };
59969
60535
  } catch (err) {
59970
60536
  if (err instanceof MalformedSpendPolicyError) {
59971
60537
  throw err;
59972
60538
  }
59973
60539
  throw new UnreadableSpendPolicyError(err);
59974
60540
  }
59975
- return null;
59976
60541
  }
59977
60542
  save(data) {
59978
60543
  try {
@@ -60060,6 +60625,8 @@ var init_spend_control = __esm({
60060
60625
  diskLimits = {};
60061
60626
  /** Set when spending.json held an unusable policy list: refuse every payment. */
60062
60627
  policyFileBroken;
60628
+ /** Whether persisted history loaded successfully; when false, recovery from an initial failure restores history. */
60629
+ initialHistoryLoaded = false;
60063
60630
  storage;
60064
60631
  now;
60065
60632
  constructor(options) {
@@ -60125,7 +60692,7 @@ var init_spend_control = __esm({
60125
60692
  data = this.storage.load();
60126
60693
  } catch (err) {
60127
60694
  if (err instanceof UnreadableSpendPolicyError) {
60128
- console.error(`${err.message} \u2014 keeping the limits already in effect`);
60695
+ console.error(`${err.message}: keeping the limits already in effect`);
60129
60696
  return;
60130
60697
  }
60131
60698
  if (!(err instanceof MalformedSpendPolicyError)) throw err;
@@ -60133,6 +60700,13 @@ var init_spend_control = __esm({
60133
60700
  console.error(`[ClawRouter] ${err.message}`);
60134
60701
  return;
60135
60702
  }
60703
+ if (!this.initialHistoryLoaded) {
60704
+ if (data) {
60705
+ this.history = data.history;
60706
+ this.cleanup();
60707
+ }
60708
+ this.initialHistoryLoaded = true;
60709
+ }
60136
60710
  this.policyFileBroken = void 0;
60137
60711
  this.limits = data ? cloneLimits(data.limits) : {};
60138
60712
  this.diskLimits = cloneLimits(this.limits);
@@ -60460,19 +61034,15 @@ var init_spend_control = __esm({
60460
61034
  try {
60461
61035
  data = this.storage.load();
60462
61036
  } catch (err) {
60463
- if (err instanceof UnreadableSpendPolicyError) {
61037
+ if (err instanceof UnreadableSpendPolicyError || err instanceof MalformedSpendPolicyError) {
61038
+ this.policyFileBroken = err.message;
61039
+ console.error(`[ClawRouter] ${err.message}`);
60464
61040
  console.error(
60465
- `${err.message} \u2014 starting fresh (any configured spend policy is NOT in effect until this file is repaired)`
61041
+ "[ClawRouter] All paid requests will be refused until spending.json is repaired. Free models are unaffected."
60466
61042
  );
60467
61043
  return;
60468
61044
  }
60469
- if (!(err instanceof MalformedSpendPolicyError)) throw err;
60470
- this.policyFileBroken = err.message;
60471
- console.error(`[ClawRouter] ${err.message}`);
60472
- console.error(
60473
- "[ClawRouter] All paid requests will be refused until spending.json is repaired. Free models are unaffected."
60474
- );
60475
- return;
61045
+ throw err;
60476
61046
  }
60477
61047
  if (data) {
60478
61048
  this.limits = cloneLimits(data.limits);
@@ -60480,6 +61050,7 @@ var init_spend_control = __esm({
60480
61050
  this.history = data.history;
60481
61051
  this.cleanup();
60482
61052
  }
61053
+ this.initialHistoryLoaded = true;
60483
61054
  }
60484
61055
  };
60485
61056
  sharedControlHost = () => process;
@@ -60842,7 +61413,7 @@ var init_chunk_EKCH75YB = __esm({
60842
61413
  }
60843
61414
  });
60844
61415
 
60845
- // node_modules/@x402/evm/dist/esm/chunk-GPMYUGHX.mjs
61416
+ // node_modules/@x402/evm/dist/esm/chunk-5AIYL4HT.mjs
60846
61417
  function getEvmChainIdV1(network) {
60847
61418
  const chainId = EVM_NETWORK_CHAIN_ID_MAP[network];
60848
61419
  if (!chainId) {
@@ -60851,8 +61422,8 @@ function getEvmChainIdV1(network) {
60851
61422
  return chainId;
60852
61423
  }
60853
61424
  var EVM_NETWORK_CHAIN_ID_MAP, NETWORKS, authorizationTypes, permit2WitnessTypes, eip2612PermitTypes, eip2612NoncesAbi, erc20ApproveAbi, erc20AllowanceAbi, ERC20_APPROVE_GAS_LIMIT, DEFAULT_MAX_FEE_PER_GAS, DEFAULT_MAX_PRIORITY_FEE_PER_GAS, PERMIT2_ADDRESS, x402ExactPermit2ProxyAddress;
60854
- var init_chunk_GPMYUGHX = __esm({
60855
- "node_modules/@x402/evm/dist/esm/chunk-GPMYUGHX.mjs"() {
61425
+ var init_chunk_5AIYL4HT = __esm({
61426
+ "node_modules/@x402/evm/dist/esm/chunk-5AIYL4HT.mjs"() {
60856
61427
  "use strict";
60857
61428
  EVM_NETWORK_CHAIN_ID_MAP = {
60858
61429
  ethereum: 1,
@@ -60878,7 +61449,9 @@ var init_chunk_GPMYUGHX = __esm({
60878
61449
  stable: 988,
60879
61450
  "stable-testnet": 2201,
60880
61451
  celo: 42220,
60881
- flare: 14
61452
+ flare: 14,
61453
+ hemi: 43111,
61454
+ "hemi-testnet": 743111
60882
61455
  };
60883
61456
  NETWORKS = Object.keys(EVM_NETWORK_CHAIN_ID_MAP);
60884
61457
  authorizationTypes = {
@@ -60958,7 +61531,7 @@ var init_chunk_GPMYUGHX = __esm({
60958
61531
  }
60959
61532
  });
60960
61533
 
60961
- // node_modules/@x402/evm/dist/esm/chunk-DIAR36YQ.mjs
61534
+ // node_modules/@x402/evm/dist/esm/chunk-AB46Q4WU.mjs
60962
61535
  async function signEip2612Permit(signer, tokenAddress, tokenName, tokenVersion, chainId, deadline, permittedAmount) {
60963
61536
  const owner = signer.address;
60964
61537
  const spender = getAddress(PERMIT2_ADDRESS);
@@ -61189,11 +61762,11 @@ async function trySignErc20ApprovalExtension(signer, options, requirements, cont
61189
61762
  };
61190
61763
  }
61191
61764
  var EIP2612_GAS_SPONSORING_KEY, ERC20_APPROVAL_GAS_SPONSORING_KEY, ERC20_APPROVAL_GAS_SPONSORING_VERSION, rpcClientCache, warnedNetworks;
61192
- var init_chunk_DIAR36YQ = __esm({
61193
- "node_modules/@x402/evm/dist/esm/chunk-DIAR36YQ.mjs"() {
61765
+ var init_chunk_AB46Q4WU = __esm({
61766
+ "node_modules/@x402/evm/dist/esm/chunk-AB46Q4WU.mjs"() {
61194
61767
  "use strict";
61195
61768
  init_chunk_EKCH75YB();
61196
- init_chunk_GPMYUGHX();
61769
+ init_chunk_5AIYL4HT();
61197
61770
  init_esm3();
61198
61771
  init_esm3();
61199
61772
  init_esm3();
@@ -61206,7 +61779,7 @@ var init_chunk_DIAR36YQ = __esm({
61206
61779
  }
61207
61780
  });
61208
61781
 
61209
- // node_modules/@x402/evm/dist/esm/chunk-LQQ3M4DU.mjs
61782
+ // node_modules/@x402/evm/dist/esm/chunk-6XWQF37J.mjs
61210
61783
  function resolveNetworkKey(network) {
61211
61784
  if (network in DEFAULT_ASSETS) {
61212
61785
  return network;
@@ -61218,10 +61791,10 @@ function resolveNetworkKey(network) {
61218
61791
  return network;
61219
61792
  }
61220
61793
  var DEFAULT_ASSETS, findDefaultAsset;
61221
- var init_chunk_LQQ3M4DU = __esm({
61222
- "node_modules/@x402/evm/dist/esm/chunk-LQQ3M4DU.mjs"() {
61794
+ var init_chunk_6XWQF37J = __esm({
61795
+ "node_modules/@x402/evm/dist/esm/chunk-6XWQF37J.mjs"() {
61223
61796
  "use strict";
61224
- init_chunk_GPMYUGHX();
61797
+ init_chunk_5AIYL4HT();
61225
61798
  DEFAULT_ASSETS = {
61226
61799
  "eip155:8453": [
61227
61800
  {
@@ -61536,8 +62109,39 @@ var init_chunk_LQQ3M4DU = __esm({
61536
62109
  decimals: 6,
61537
62110
  symbol: "USDC"
61538
62111
  }
61539
- ]
62112
+ ],
61540
62113
  // Arc Testnet USDC (EIP-3009 supported)
62114
+ "eip155:4663": [
62115
+ {
62116
+ asset: "0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168",
62117
+ name: "Global Dollar",
62118
+ version: "1",
62119
+ decimals: 6,
62120
+ symbol: "USDG"
62121
+ }
62122
+ ],
62123
+ // Robinhood Chain mainnet USDG (EIP-3009 supported)
62124
+ "eip155:43111": [
62125
+ {
62126
+ asset: "0xad11a8BEb98bbf61dbb1aa0F6d6F2ECD87b35afA",
62127
+ name: "Bridged USDC (Stargate)",
62128
+ version: "2",
62129
+ decimals: 6,
62130
+ symbol: "USDC.e"
62131
+ }
62132
+ ],
62133
+ // Hemi mainnet USDC.e (EIP-3009 supported)
62134
+ "eip155:743111": [
62135
+ {
62136
+ asset: "0xD47971C7F5B1067d25cd45d30b2c9eb60de96443",
62137
+ name: "USDC.e",
62138
+ version: "1",
62139
+ decimals: 6,
62140
+ symbol: "USDC.e",
62141
+ assetTransferMethod: "permit2"
62142
+ }
62143
+ ]
62144
+ // Hemi testnet USDC.e (no EIP-3009, no EIP-2612)
61541
62145
  };
61542
62146
  findDefaultAsset = (asset, network) => {
61543
62147
  const key3 = resolveNetworkKey(network);
@@ -61551,19 +62155,19 @@ var init_chunk_LQQ3M4DU = __esm({
61551
62155
  }
61552
62156
  });
61553
62157
 
61554
- // node_modules/@x402/evm/dist/esm/chunk-7TZ3NXXP.mjs
62158
+ // node_modules/@x402/evm/dist/esm/chunk-X42JDBHW.mjs
61555
62159
  var ExactEvmSchemeV1;
61556
- var init_chunk_7TZ3NXXP = __esm({
61557
- "node_modules/@x402/evm/dist/esm/chunk-7TZ3NXXP.mjs"() {
62160
+ var init_chunk_X42JDBHW = __esm({
62161
+ "node_modules/@x402/evm/dist/esm/chunk-X42JDBHW.mjs"() {
61558
62162
  "use strict";
61559
62163
  init_chunk_EL2GVDVK();
61560
62164
  init_chunk_5JE2UIZP();
61561
62165
  init_chunk_VS3RYAYE();
61562
62166
  init_chunk_23QU4APL();
61563
- init_chunk_DIAR36YQ();
62167
+ init_chunk_AB46Q4WU();
61564
62168
  init_chunk_EKCH75YB();
61565
- init_chunk_LQQ3M4DU();
61566
- init_chunk_GPMYUGHX();
62169
+ init_chunk_6XWQF37J();
62170
+ init_chunk_5AIYL4HT();
61567
62171
  init_esm3();
61568
62172
  ExactEvmSchemeV1 = class {
61569
62173
  /**
@@ -61648,7 +62252,7 @@ var init_chunk_7TZ3NXXP = __esm({
61648
62252
  }
61649
62253
  });
61650
62254
 
61651
- // node_modules/@x402/evm/dist/esm/chunk-UNNRPMWF.mjs
62255
+ // node_modules/@x402/evm/dist/esm/chunk-QKR4OFMY.mjs
61652
62256
  async function createPermit2PayloadForProxy(proxyAddress, signer, x402Version2, paymentRequirements) {
61653
62257
  const now2 = Math.floor(Date.now() / 1e3);
61654
62258
  const nonce = createPermit2Nonce();
@@ -61699,19 +62303,19 @@ async function signPermit2Authorization(signer, permit2Authorization, requiremen
61699
62303
  }
61700
62304
  });
61701
62305
  }
61702
- var init_chunk_UNNRPMWF = __esm({
61703
- "node_modules/@x402/evm/dist/esm/chunk-UNNRPMWF.mjs"() {
62306
+ var init_chunk_QKR4OFMY = __esm({
62307
+ "node_modules/@x402/evm/dist/esm/chunk-QKR4OFMY.mjs"() {
61704
62308
  "use strict";
61705
62309
  init_chunk_VS3RYAYE();
61706
62310
  init_chunk_23QU4APL();
61707
- init_chunk_DIAR36YQ();
62311
+ init_chunk_AB46Q4WU();
61708
62312
  init_chunk_EKCH75YB();
61709
- init_chunk_GPMYUGHX();
62313
+ init_chunk_5AIYL4HT();
61710
62314
  init_esm3();
61711
62315
  }
61712
62316
  });
61713
62317
 
61714
- // node_modules/@x402/evm/dist/esm/chunk-WC3UEIYC.mjs
62318
+ // node_modules/@x402/evm/dist/esm/chunk-H3CLVT6Z.mjs
61715
62319
  async function createPermit2Payload(signer, x402Version2, paymentRequirements) {
61716
62320
  return createPermit2PayloadForProxy(
61717
62321
  x402ExactPermit2ProxyAddress,
@@ -61721,11 +62325,11 @@ async function createPermit2Payload(signer, x402Version2, paymentRequirements) {
61721
62325
  );
61722
62326
  }
61723
62327
  var MAX_UINT256;
61724
- var init_chunk_WC3UEIYC = __esm({
61725
- "node_modules/@x402/evm/dist/esm/chunk-WC3UEIYC.mjs"() {
62328
+ var init_chunk_H3CLVT6Z = __esm({
62329
+ "node_modules/@x402/evm/dist/esm/chunk-H3CLVT6Z.mjs"() {
61726
62330
  "use strict";
61727
- init_chunk_UNNRPMWF();
61728
- init_chunk_GPMYUGHX();
62331
+ init_chunk_QKR4OFMY();
62332
+ init_chunk_5AIYL4HT();
61729
62333
  MAX_UINT256 = BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");
61730
62334
  }
61731
62335
  });
@@ -61738,7 +62342,7 @@ var init_utils10 = __esm({
61738
62342
  }
61739
62343
  });
61740
62344
 
61741
- // node_modules/@x402/evm/dist/esm/chunk-CJ62XFQ3.mjs
62345
+ // node_modules/@x402/evm/dist/esm/chunk-374U7QOG.mjs
61742
62346
  async function createEIP3009Payload(signer, x402Version2, paymentRequirements) {
61743
62347
  const nonce = createNonce();
61744
62348
  const now2 = Math.floor(Date.now() / 1e3);
@@ -61814,15 +62418,15 @@ function registerExactEvmScheme(client, config2) {
61814
62418
  return client;
61815
62419
  }
61816
62420
  var ExactEvmScheme;
61817
- var init_chunk_CJ62XFQ3 = __esm({
61818
- "node_modules/@x402/evm/dist/esm/chunk-CJ62XFQ3.mjs"() {
62421
+ var init_chunk_374U7QOG = __esm({
62422
+ "node_modules/@x402/evm/dist/esm/chunk-374U7QOG.mjs"() {
61819
62423
  "use strict";
61820
- init_chunk_7TZ3NXXP();
61821
- init_chunk_WC3UEIYC();
61822
- init_chunk_DIAR36YQ();
62424
+ init_chunk_X42JDBHW();
62425
+ init_chunk_H3CLVT6Z();
62426
+ init_chunk_AB46Q4WU();
61823
62427
  init_chunk_EKCH75YB();
61824
- init_chunk_LQQ3M4DU();
61825
- init_chunk_GPMYUGHX();
62428
+ init_chunk_6XWQF37J();
62429
+ init_chunk_5AIYL4HT();
61826
62430
  init_esm3();
61827
62431
  init_utils10();
61828
62432
  ExactEvmScheme = class {
@@ -61902,29 +62506,29 @@ var init_chunk_DBYTBFOQ = __esm({
61902
62506
  var init_client2 = __esm({
61903
62507
  "node_modules/@x402/evm/dist/esm/exact/client/index.mjs"() {
61904
62508
  "use strict";
61905
- init_chunk_CJ62XFQ3();
61906
- init_chunk_7TZ3NXXP();
62509
+ init_chunk_374U7QOG();
62510
+ init_chunk_X42JDBHW();
61907
62511
  init_chunk_EL2GVDVK();
61908
62512
  init_chunk_5JE2UIZP();
61909
62513
  init_chunk_DBYTBFOQ();
61910
- init_chunk_WC3UEIYC();
61911
- init_chunk_UNNRPMWF();
62514
+ init_chunk_H3CLVT6Z();
62515
+ init_chunk_QKR4OFMY();
61912
62516
  init_chunk_VS3RYAYE();
61913
62517
  init_chunk_23QU4APL();
61914
- init_chunk_DIAR36YQ();
62518
+ init_chunk_AB46Q4WU();
61915
62519
  init_chunk_EKCH75YB();
61916
- init_chunk_LQQ3M4DU();
61917
- init_chunk_GPMYUGHX();
62520
+ init_chunk_6XWQF37J();
62521
+ init_chunk_5AIYL4HT();
61918
62522
  }
61919
62523
  });
61920
62524
 
61921
- // node_modules/@x402/evm/dist/esm/chunk-F43KMW3I.mjs
62525
+ // node_modules/@x402/evm/dist/esm/chunk-BBPWOJXX.mjs
61922
62526
  var SALT_BINDING_TYPEHASH, PAYMENT_INFO_TYPEHASH;
61923
- var init_chunk_F43KMW3I = __esm({
61924
- "node_modules/@x402/evm/dist/esm/chunk-F43KMW3I.mjs"() {
62527
+ var init_chunk_BBPWOJXX = __esm({
62528
+ "node_modules/@x402/evm/dist/esm/chunk-BBPWOJXX.mjs"() {
61925
62529
  "use strict";
61926
62530
  init_chunk_5JE2UIZP();
61927
- init_chunk_GPMYUGHX();
62531
+ init_chunk_5AIYL4HT();
61928
62532
  init_esm3();
61929
62533
  init_esm3();
61930
62534
  SALT_BINDING_TYPEHASH = keccak256(
@@ -61940,13 +62544,13 @@ var init_chunk_F43KMW3I = __esm({
61940
62544
  }
61941
62545
  });
61942
62546
 
61943
- // node_modules/@x402/evm/dist/esm/chunk-YNMENULP.mjs
61944
- var init_chunk_YNMENULP = __esm({
61945
- "node_modules/@x402/evm/dist/esm/chunk-YNMENULP.mjs"() {
62547
+ // node_modules/@x402/evm/dist/esm/chunk-QCE52OSD.mjs
62548
+ var init_chunk_QCE52OSD = __esm({
62549
+ "node_modules/@x402/evm/dist/esm/chunk-QCE52OSD.mjs"() {
61946
62550
  "use strict";
61947
- init_chunk_F43KMW3I();
62551
+ init_chunk_BBPWOJXX();
61948
62552
  init_chunk_EKCH75YB();
61949
- init_chunk_LQQ3M4DU();
62553
+ init_chunk_6XWQF37J();
61950
62554
  }
61951
62555
  });
61952
62556
 
@@ -61971,10 +62575,10 @@ var init_chunk_BOZHBVFZ = __esm({
61971
62575
  }
61972
62576
  });
61973
62577
 
61974
- // node_modules/@x402/evm/dist/esm/chunk-X3UZRZQA.mjs
62578
+ // node_modules/@x402/evm/dist/esm/chunk-7DJ4WEQ5.mjs
61975
62579
  var CHANNEL_CONFIG_TYPEHASH, UINT96_MASK;
61976
- var init_chunk_X3UZRZQA = __esm({
61977
- "node_modules/@x402/evm/dist/esm/chunk-X3UZRZQA.mjs"() {
62580
+ var init_chunk_7DJ4WEQ5 = __esm({
62581
+ "node_modules/@x402/evm/dist/esm/chunk-7DJ4WEQ5.mjs"() {
61978
62582
  "use strict";
61979
62583
  init_chunk_EKCH75YB();
61980
62584
  init_esm3();
@@ -61987,30 +62591,30 @@ var init_chunk_X3UZRZQA = __esm({
61987
62591
  }
61988
62592
  });
61989
62593
 
61990
- // node_modules/@x402/evm/dist/esm/chunk-AHBFVQIT.mjs
61991
- var init_chunk_AHBFVQIT = __esm({
61992
- "node_modules/@x402/evm/dist/esm/chunk-AHBFVQIT.mjs"() {
62594
+ // node_modules/@x402/evm/dist/esm/chunk-AEYKXGQA.mjs
62595
+ var init_chunk_AEYKXGQA = __esm({
62596
+ "node_modules/@x402/evm/dist/esm/chunk-AEYKXGQA.mjs"() {
61993
62597
  "use strict";
61994
62598
  init_chunk_W6ON4LG2();
61995
62599
  init_chunk_BOZHBVFZ();
61996
- init_chunk_X3UZRZQA();
62600
+ init_chunk_7DJ4WEQ5();
61997
62601
  init_chunk_DBYTBFOQ();
61998
- init_chunk_DIAR36YQ();
62602
+ init_chunk_AB46Q4WU();
61999
62603
  init_chunk_EKCH75YB();
62000
- init_chunk_LQQ3M4DU();
62001
- init_chunk_GPMYUGHX();
62604
+ init_chunk_6XWQF37J();
62605
+ init_chunk_5AIYL4HT();
62002
62606
  init_http4();
62003
62607
  init_http4();
62004
62608
  init_client();
62005
62609
  }
62006
62610
  });
62007
62611
 
62008
- // node_modules/@x402/evm/dist/esm/chunk-FLDL4TBT.mjs
62009
- var init_chunk_FLDL4TBT = __esm({
62010
- "node_modules/@x402/evm/dist/esm/chunk-FLDL4TBT.mjs"() {
62612
+ // node_modules/@x402/evm/dist/esm/chunk-SPPQBP6P.mjs
62613
+ var init_chunk_SPPQBP6P = __esm({
62614
+ "node_modules/@x402/evm/dist/esm/chunk-SPPQBP6P.mjs"() {
62011
62615
  "use strict";
62012
62616
  init_chunk_BOZHBVFZ();
62013
- init_chunk_X3UZRZQA();
62617
+ init_chunk_7DJ4WEQ5();
62014
62618
  }
62015
62619
  });
62016
62620
 
@@ -62024,14 +62628,14 @@ var init_chunk_VGMBXJLA = __esm({
62024
62628
  }
62025
62629
  });
62026
62630
 
62027
- // node_modules/@x402/evm/dist/esm/chunk-4TLGHSGS.mjs
62028
- var init_chunk_4TLGHSGS = __esm({
62029
- "node_modules/@x402/evm/dist/esm/chunk-4TLGHSGS.mjs"() {
62631
+ // node_modules/@x402/evm/dist/esm/chunk-3EVS7UJG.mjs
62632
+ var init_chunk_3EVS7UJG = __esm({
62633
+ "node_modules/@x402/evm/dist/esm/chunk-3EVS7UJG.mjs"() {
62030
62634
  "use strict";
62031
- init_chunk_DIAR36YQ();
62635
+ init_chunk_AB46Q4WU();
62032
62636
  init_chunk_EKCH75YB();
62033
- init_chunk_LQQ3M4DU();
62034
- init_chunk_GPMYUGHX();
62637
+ init_chunk_6XWQF37J();
62638
+ init_chunk_5AIYL4HT();
62035
62639
  }
62036
62640
  });
62037
62641
 
@@ -62062,29 +62666,29 @@ function toClientEvmSigner(signer, publicClient) {
62062
62666
  var init_esm5 = __esm({
62063
62667
  "node_modules/@x402/evm/dist/esm/index.mjs"() {
62064
62668
  "use strict";
62065
- init_chunk_YNMENULP();
62669
+ init_chunk_QCE52OSD();
62066
62670
  init_chunk_XE4FB4AB();
62067
- init_chunk_F43KMW3I();
62068
- init_chunk_AHBFVQIT();
62671
+ init_chunk_BBPWOJXX();
62672
+ init_chunk_AEYKXGQA();
62069
62673
  init_chunk_W6ON4LG2();
62070
- init_chunk_FLDL4TBT();
62674
+ init_chunk_SPPQBP6P();
62071
62675
  init_chunk_BOZHBVFZ();
62072
- init_chunk_X3UZRZQA();
62073
- init_chunk_CJ62XFQ3();
62676
+ init_chunk_7DJ4WEQ5();
62677
+ init_chunk_374U7QOG();
62074
62678
  init_chunk_VGMBXJLA();
62075
- init_chunk_7TZ3NXXP();
62679
+ init_chunk_X42JDBHW();
62076
62680
  init_chunk_EL2GVDVK();
62077
62681
  init_chunk_5JE2UIZP();
62078
62682
  init_chunk_DBYTBFOQ();
62079
- init_chunk_4TLGHSGS();
62080
- init_chunk_WC3UEIYC();
62081
- init_chunk_UNNRPMWF();
62683
+ init_chunk_3EVS7UJG();
62684
+ init_chunk_H3CLVT6Z();
62685
+ init_chunk_QKR4OFMY();
62082
62686
  init_chunk_VS3RYAYE();
62083
62687
  init_chunk_23QU4APL();
62084
- init_chunk_DIAR36YQ();
62688
+ init_chunk_AB46Q4WU();
62085
62689
  init_chunk_EKCH75YB();
62086
- init_chunk_LQQ3M4DU();
62087
- init_chunk_GPMYUGHX();
62690
+ init_chunk_6XWQF37J();
62691
+ init_chunk_5AIYL4HT();
62088
62692
  }
62089
62693
  });
62090
62694
 
@@ -90400,12 +91004,28 @@ var init_paths = __esm({
90400
91004
 
90401
91005
  // src/compression/layers/json-compact.ts
90402
91006
  function compactJson(jsonString) {
91007
+ if (typeof jsonString !== "string") return jsonString;
90403
91008
  try {
90404
- const parsed = JSON.parse(jsonString);
90405
- return JSON.stringify(parsed);
91009
+ JSON.parse(jsonString);
90406
91010
  } catch {
90407
91011
  return jsonString;
90408
91012
  }
91013
+ let out = "";
91014
+ let start = 0;
91015
+ let inString = false;
91016
+ for (let i = 0; i < jsonString.length; i++) {
91017
+ const ch = jsonString[i];
91018
+ if (inString) {
91019
+ if (ch === "\\") i++;
91020
+ else if (ch === '"') inString = false;
91021
+ } else if (ch === '"') {
91022
+ inString = true;
91023
+ } else if (ch === " " || ch === " " || ch === "\n" || ch === "\r") {
91024
+ out += jsonString.slice(start, i);
91025
+ start = i + 1;
91026
+ }
91027
+ }
91028
+ return out + jsonString.slice(start);
90409
91029
  }
90410
91030
  function looksLikeJson(str) {
90411
91031
  const trimmed = str.trim();
@@ -104105,7 +104725,7 @@ var init_src3 = __esm({
104105
104725
  }
104106
104726
  });
104107
104727
 
104108
- // node_modules/@x402/svm/dist/esm/chunk-TYATVISX.mjs
104728
+ // node_modules/@x402/svm/dist/esm/chunk-DAIKIZVB.mjs
104109
104729
  function normalizeNetwork(network) {
104110
104730
  if (network.includes(":")) {
104111
104731
  const supported = [SOLANA_MAINNET_CAIP2, SOLANA_DEVNET_CAIP2, SOLANA_TESTNET_CAIP2];
@@ -104342,8 +104962,8 @@ async function recordPendingOrTerminal(store, key3, signature3, payer, network,
104342
104962
  };
104343
104963
  }
104344
104964
  var TOKEN_PROGRAM_ADDRESS3, TOKEN_2022_PROGRAM_ADDRESS2, COMPUTE_BUDGET_PROGRAM_ADDRESS2, MEMO_PROGRAM_ADDRESS, LIGHTHOUSE_PROGRAM_ADDRESS, DEVNET_RPC_URL, TESTNET_RPC_URL, MAINNET_RPC_URL, DEVNET_WS_URL, TESTNET_WS_URL, MAINNET_WS_URL, DEFAULT_COMPUTE_UNIT_PRICE_MICROLAMPORTS, MAX_COMPUTE_UNIT_PRICE_MICROLAMPORTS, DEFAULT_COMPUTE_UNIT_LIMIT, DEFAULT_MAX_COMPUTE_UNITS, DEFAULT_MAX_REQUIRED_SIGNATURES, MAX_MEMO_BYTES, ACCEPTED_TRANSACTION_VERSIONS, ADVERTISED_TRANSACTION_VERSIONS, CLIENT_SUPPORTED_TRANSACTION_VERSIONS, SETTLEMENT_TTL_MS, SVM_ADDRESS_REGEX, SOLANA_MAINNET_CAIP2, SOLANA_DEVNET_CAIP2, SOLANA_TESTNET_CAIP2, V1_TO_V2_NETWORK_MAP, ErrInvalidPayloadTransaction, ErrUnsupportedTransactionVersion, ErrFeePayerTransferringFunds, ErrMemoMismatch, ErrMemoCount, ErrSmartWalletFeePayerNotIsolated, ErrSmartWalletMalformedComputeBudget, ErrSmartWalletMalformedComputeLimit, ErrSmartWalletMalformedComputePrice, ErrSmartWalletComputeUnitsTooHigh, ErrSmartWalletPriorityFeeTooHigh, ErrSmartWalletUnsupportedComputeBudget, ErrSmartWalletAltResolutionUnavailable, ErrSmartWalletAltResolutionFailed, ErrSmartWalletComputeBudgetViolation, ErrSmartWalletSimulationFailed, ErrSmartWalletCannotDeriveATA, ErrSmartWalletNoTransferInSimulation, ErrSmartWalletTransferMismatch, ErrSmartWalletMultipleMatchingTransfers, USDC_MAINNET_ADDRESS, USDC_DEVNET_ADDRESS, USDC_TESTNET_ADDRESS, DEFAULT_ASSETS2, getDefaultAsset2, findDefaultAsset2, BASIS_POINTS_DENOMINATOR, SLOT_COMMITMENT, TransactionOnchainFailureError;
104345
- var init_chunk_TYATVISX = __esm({
104346
- "node_modules/@x402/svm/dist/esm/chunk-TYATVISX.mjs"() {
104965
+ var init_chunk_DAIKIZVB = __esm({
104966
+ "node_modules/@x402/svm/dist/esm/chunk-DAIKIZVB.mjs"() {
104347
104967
  "use strict";
104348
104968
  init_sha2563();
104349
104969
  init_index_node39();
@@ -104563,7 +105183,7 @@ var init_src4 = __esm({
104563
105183
  }
104564
105184
  });
104565
105185
 
104566
- // node_modules/@x402/svm/dist/esm/chunk-A5U3JRDR.mjs
105186
+ // node_modules/@x402/svm/dist/esm/chunk-RZ6M7L3U.mjs
104567
105187
  function maxTransactionSize(version31) {
104568
105188
  return version31 === 1 ? V1_MAX_TRANSACTION_SIZE : V0_MAX_TRANSACTION_SIZE;
104569
105189
  }
@@ -104661,10 +105281,10 @@ function checkTransactionV1Budget(config2, programAddresses, limits) {
104661
105281
  return void 0;
104662
105282
  }
104663
105283
  var V0_MAX_TRANSACTION_SIZE, V1_MAX_TRANSACTION_SIZE, DEFAULT_LOADED_ACCOUNTS_DATA_SIZE_LIMIT;
104664
- var init_chunk_A5U3JRDR = __esm({
104665
- "node_modules/@x402/svm/dist/esm/chunk-A5U3JRDR.mjs"() {
105284
+ var init_chunk_RZ6M7L3U = __esm({
105285
+ "node_modules/@x402/svm/dist/esm/chunk-RZ6M7L3U.mjs"() {
104666
105286
  "use strict";
104667
- init_chunk_TYATVISX();
105287
+ init_chunk_DAIKIZVB();
104668
105288
  init_index_node39();
104669
105289
  init_src4();
104670
105290
  V0_MAX_TRANSACTION_SIZE = 1232;
@@ -104673,7 +105293,7 @@ var init_chunk_A5U3JRDR = __esm({
104673
105293
  }
104674
105294
  });
104675
105295
 
104676
- // node_modules/@x402/svm/dist/esm/chunk-BU4OMUDH.mjs
105296
+ // node_modules/@x402/svm/dist/esm/chunk-DP3B4MQJ.mjs
104677
105297
  function encodeVoucherMessageBytes(args) {
104678
105298
  const channelBytes = getBase58Encoder().encode(args.channelId);
104679
105299
  if (channelBytes.byteLength !== 32) {
@@ -105119,11 +105739,11 @@ function randomU64() {
105119
105739
  return new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength).getBigUint64(0, true);
105120
105740
  }
105121
105741
  var VOUCHER_MAGIC, PAYMENT_CHANNELS_PROGRAM_ADDRESS, ASSOCIATED_TOKEN_PROGRAM_ID, PAYMENT_CHANNELS_PROGRAM_ID, MAINNET_TREASURY_OWNER_BYTES, MAINNET_TREASURY_OWNER, DEVNET_TREASURY_OWNER, OPEN_DISCRIMINATOR, TOP_UP_DISCRIMINATOR, U64_MAX2, OPEN_MAX_COMPUTE_UNIT_LIMIT, OPEN_DEFAULT_COMPUTE_UNIT_LIMIT, RENT_SYSVAR, MAX_CHANNEL_PDA_CACHE_ENTRIES, channelPdaCache;
105122
- var init_chunk_BU4OMUDH = __esm({
105123
- "node_modules/@x402/svm/dist/esm/chunk-BU4OMUDH.mjs"() {
105742
+ var init_chunk_DP3B4MQJ = __esm({
105743
+ "node_modules/@x402/svm/dist/esm/chunk-DP3B4MQJ.mjs"() {
105124
105744
  "use strict";
105125
- init_chunk_A5U3JRDR();
105126
- init_chunk_TYATVISX();
105745
+ init_chunk_RZ6M7L3U();
105746
+ init_chunk_DAIKIZVB();
105127
105747
  init_index_node39();
105128
105748
  init_index_node39();
105129
105749
  init_index_node39();
@@ -105188,7 +105808,7 @@ var init_chunk_BU4OMUDH = __esm({
105188
105808
  }
105189
105809
  });
105190
105810
 
105191
- // node_modules/@x402/svm/dist/esm/chunk-3WM4BBCN.mjs
105811
+ // node_modules/@x402/svm/dist/esm/chunk-VITMNYMM.mjs
105192
105812
  function getRequestCloseInstructionDataEncoder() {
105193
105813
  return transformEncoder(getStructEncoder([["discriminator", getU8Encoder()]]), (value) => ({
105194
105814
  ...value,
@@ -105261,12 +105881,12 @@ function requestMemo(value) {
105261
105881
  );
105262
105882
  }
105263
105883
  var REQUEST_CLOSE_DISCRIMINATOR;
105264
- var init_chunk_3WM4BBCN = __esm({
105265
- "node_modules/@x402/svm/dist/esm/chunk-3WM4BBCN.mjs"() {
105884
+ var init_chunk_VITMNYMM = __esm({
105885
+ "node_modules/@x402/svm/dist/esm/chunk-VITMNYMM.mjs"() {
105266
105886
  "use strict";
105267
- init_chunk_BU4OMUDH();
105268
- init_chunk_A5U3JRDR();
105269
- init_chunk_TYATVISX();
105887
+ init_chunk_DP3B4MQJ();
105888
+ init_chunk_RZ6M7L3U();
105889
+ init_chunk_DAIKIZVB();
105270
105890
  init_index_node39();
105271
105891
  init_index_node39();
105272
105892
  init_index_node40();
@@ -105274,7 +105894,7 @@ var init_chunk_3WM4BBCN = __esm({
105274
105894
  }
105275
105895
  });
105276
105896
 
105277
- // node_modules/@x402/svm/dist/esm/chunk-CHLO3MPU.mjs
105897
+ // node_modules/@x402/svm/dist/esm/chunk-NUK2USQ3.mjs
105278
105898
  function getChannelDecoder() {
105279
105899
  return getStructDecoder([
105280
105900
  ["discriminator", getU8Decoder()],
@@ -105296,15 +105916,15 @@ function getChannelDecoder() {
105296
105916
  ["openSlot", getU64Decoder()]
105297
105917
  ]);
105298
105918
  }
105299
- var init_chunk_CHLO3MPU = __esm({
105300
- "node_modules/@x402/svm/dist/esm/chunk-CHLO3MPU.mjs"() {
105919
+ var init_chunk_NUK2USQ3 = __esm({
105920
+ "node_modules/@x402/svm/dist/esm/chunk-NUK2USQ3.mjs"() {
105301
105921
  "use strict";
105302
- init_chunk_BU4OMUDH();
105922
+ init_chunk_DP3B4MQJ();
105303
105923
  init_index_node39();
105304
105924
  }
105305
105925
  });
105306
105926
 
105307
- // node_modules/@x402/svm/dist/esm/chunk-PQ3QK4Z4.mjs
105927
+ // node_modules/@x402/svm/dist/esm/chunk-RMG2KWUT.mjs
105308
105928
  function channelAddressFilters(value, offset) {
105309
105929
  return [
105310
105930
  { dataSize: CHANNEL_ACCOUNT_SIZE },
@@ -105375,11 +105995,11 @@ async function validateDiscoveredAccount(pubkey, owner, base64Data, expectedProg
105375
105995
  return { channelId: pubkey, channel };
105376
105996
  }
105377
105997
  var CHANNEL_ACCOUNT_SIZE, CHANNEL_RENT_PAYER_OFFSET, CHANNEL_PAYER_OFFSET;
105378
- var init_chunk_PQ3QK4Z4 = __esm({
105379
- "node_modules/@x402/svm/dist/esm/chunk-PQ3QK4Z4.mjs"() {
105998
+ var init_chunk_RMG2KWUT = __esm({
105999
+ "node_modules/@x402/svm/dist/esm/chunk-RMG2KWUT.mjs"() {
105380
106000
  "use strict";
105381
- init_chunk_CHLO3MPU();
105382
- init_chunk_BU4OMUDH();
106001
+ init_chunk_NUK2USQ3();
106002
+ init_chunk_DP3B4MQJ();
105383
106003
  init_index_node39();
105384
106004
  CHANNEL_ACCOUNT_SIZE = 256n;
105385
106005
  CHANNEL_RENT_PAYER_OFFSET = 216n;
@@ -105387,7 +106007,7 @@ var init_chunk_PQ3QK4Z4 = __esm({
105387
106007
  }
105388
106008
  });
105389
106009
 
105390
- // node_modules/@x402/svm/dist/esm/chunk-GAYY7QRO.mjs
106010
+ // node_modules/@x402/svm/dist/esm/chunk-CJ2GGI22.mjs
105391
106011
  function isBatchVoucher(value) {
105392
106012
  if (!isRecord(value)) return false;
105393
106013
  return typeof value.channelId === "string" && typeof value.maxClaimableAmount === "string" && typeof value.expiresAt === "number" && typeof value.signature === "string";
@@ -105572,12 +106192,12 @@ function parseReceiverBindingMemo(memo2) {
105572
106192
  return isAddress2(authorizer) ? authorizer : void 0;
105573
106193
  }
105574
106194
  var BATCH_SETTLEMENT_SCHEME2, MIN_WITHDRAW_DELAY2, MAX_WITHDRAW_DELAY, FULL_SPLIT_BPS, CLIENT_VOUCHER_EXPIRES_AT, AUTHORIZATION_DOMAIN, CLOSE_DOMAIN, V1_MAX_CLAIM_CHANNELS, V1_MAX_SETTLE_CHANNELS, PREFIX, BatchError, isDecimal, isSafeUint, isOptional, isString, RECEIVER_BINDING_MEMO_PREFIX;
105575
- var init_chunk_GAYY7QRO = __esm({
105576
- "node_modules/@x402/svm/dist/esm/chunk-GAYY7QRO.mjs"() {
106195
+ var init_chunk_CJ2GGI22 = __esm({
106196
+ "node_modules/@x402/svm/dist/esm/chunk-CJ2GGI22.mjs"() {
105577
106197
  "use strict";
105578
- init_chunk_BU4OMUDH();
105579
- init_chunk_A5U3JRDR();
105580
- init_chunk_TYATVISX();
106198
+ init_chunk_DP3B4MQJ();
106199
+ init_chunk_RZ6M7L3U();
106200
+ init_chunk_DAIKIZVB();
105581
106201
  init_index_node39();
105582
106202
  init_index_node39();
105583
106203
  BATCH_SETTLEMENT_SCHEME2 = "batch-settlement";
@@ -105625,7 +106245,7 @@ var init_chunk_GAYY7QRO = __esm({
105625
106245
  }
105626
106246
  });
105627
106247
 
105628
- // node_modules/@x402/svm/dist/esm/chunk-5EQYNZXP.mjs
106248
+ // node_modules/@x402/svm/dist/esm/chunk-2RSZYSMO.mjs
105629
106249
  function parseTokenProgramHint(extra) {
105630
106250
  const hint = extra?.tokenProgram;
105631
106251
  if (hint === void 0 || hint === null || hint === "") {
@@ -105653,14 +106273,14 @@ function requireTokenProgramHint(extra, invalid) {
105653
106273
  if (hinted === void 0) throw new Error(invalid);
105654
106274
  return hinted;
105655
106275
  }
105656
- var init_chunk_5EQYNZXP = __esm({
105657
- "node_modules/@x402/svm/dist/esm/chunk-5EQYNZXP.mjs"() {
106276
+ var init_chunk_2RSZYSMO = __esm({
106277
+ "node_modules/@x402/svm/dist/esm/chunk-2RSZYSMO.mjs"() {
105658
106278
  "use strict";
105659
- init_chunk_TYATVISX();
106279
+ init_chunk_DAIKIZVB();
105660
106280
  }
105661
106281
  });
105662
106282
 
105663
- // node_modules/@x402/svm/dist/esm/chunk-Y7W3OBHW.mjs
106283
+ // node_modules/@x402/svm/dist/esm/chunk-HRH33QP2.mjs
105664
106284
  async function checkCorrectiveState(args) {
105665
106285
  const state = args.accept.extra?.channelState;
105666
106286
  if (!isBatchChannelState(state)) {
@@ -106101,15 +106721,15 @@ async function buildBatchRefundPayload(args) {
106101
106721
  });
106102
106722
  }
106103
106723
  var BatchChannelTracker, NoBatchChannelToRefundError, DEFAULT_SERVER_SIGNED_MAX_DEPOSIT, UntrustedOperatorError, ServerSignedTrustPolicy, DEFAULT_DEPOSIT_MULTIPLIER, MIN_DEPOSIT_MULTIPLIER, OPERATION_KEY_SEPARATOR, BatchSvmScheme;
106104
- var init_chunk_Y7W3OBHW = __esm({
106105
- "node_modules/@x402/svm/dist/esm/chunk-Y7W3OBHW.mjs"() {
106106
- "use strict";
106107
- init_chunk_3WM4BBCN();
106108
- init_chunk_PQ3QK4Z4();
106109
- init_chunk_GAYY7QRO();
106110
- init_chunk_5EQYNZXP();
106111
- init_chunk_BU4OMUDH();
106112
- init_chunk_TYATVISX();
106724
+ var init_chunk_HRH33QP2 = __esm({
106725
+ "node_modules/@x402/svm/dist/esm/chunk-HRH33QP2.mjs"() {
106726
+ "use strict";
106727
+ init_chunk_VITMNYMM();
106728
+ init_chunk_RMG2KWUT();
106729
+ init_chunk_CJ2GGI22();
106730
+ init_chunk_2RSZYSMO();
106731
+ init_chunk_DP3B4MQJ();
106732
+ init_chunk_DAIKIZVB();
106113
106733
  init_index_node39();
106114
106734
  init_http4();
106115
106735
  init_utils10();
@@ -107097,7 +107717,7 @@ var init_chunk_Y7W3OBHW = __esm({
107097
107717
  }
107098
107718
  });
107099
107719
 
107100
- // node_modules/@x402/svm/dist/esm/chunk-7IXSBHSJ.mjs
107720
+ // node_modules/@x402/svm/dist/esm/chunk-HQM7VUNZ.mjs
107101
107721
  function getChannelDistributionHash(splits) {
107102
107722
  const hasher = sha2568.create();
107103
107723
  const count = new Uint8Array(4);
@@ -107111,19 +107731,19 @@ function getChannelDistributionHash(splits) {
107111
107731
  }
107112
107732
  return hasher.digest();
107113
107733
  }
107114
- var init_chunk_7IXSBHSJ = __esm({
107115
- "node_modules/@x402/svm/dist/esm/chunk-7IXSBHSJ.mjs"() {
107734
+ var init_chunk_HQM7VUNZ = __esm({
107735
+ "node_modules/@x402/svm/dist/esm/chunk-HQM7VUNZ.mjs"() {
107116
107736
  "use strict";
107117
- init_chunk_CHLO3MPU();
107118
- init_chunk_BU4OMUDH();
107119
- init_chunk_A5U3JRDR();
107120
- init_chunk_TYATVISX();
107737
+ init_chunk_NUK2USQ3();
107738
+ init_chunk_DP3B4MQJ();
107739
+ init_chunk_RZ6M7L3U();
107740
+ init_chunk_DAIKIZVB();
107121
107741
  init_sha2563();
107122
107742
  init_index_node39();
107123
107743
  }
107124
107744
  });
107125
107745
 
107126
- // node_modules/@x402/svm/dist/esm/chunk-OT6AP35X.mjs
107746
+ // node_modules/@x402/svm/dist/esm/chunk-SINLL373.mjs
107127
107747
  function encodeCloseAuthorizationDigest(binding) {
107128
107748
  const base582 = getBase58Encoder();
107129
107749
  const network = new TextEncoder().encode(binding.network);
@@ -107194,11 +107814,11 @@ async function verifyCloseAuthorization(authorization, binding, receiverAuthoriz
107194
107814
  return false;
107195
107815
  }
107196
107816
  }
107197
- var init_chunk_OT6AP35X = __esm({
107198
- "node_modules/@x402/svm/dist/esm/chunk-OT6AP35X.mjs"() {
107817
+ var init_chunk_SINLL373 = __esm({
107818
+ "node_modules/@x402/svm/dist/esm/chunk-SINLL373.mjs"() {
107199
107819
  "use strict";
107200
- init_chunk_GAYY7QRO();
107201
- init_chunk_BU4OMUDH();
107820
+ init_chunk_CJ2GGI22();
107821
+ init_chunk_DP3B4MQJ();
107202
107822
  init_sha2563();
107203
107823
  init_index_node39();
107204
107824
  }
@@ -107231,14 +107851,14 @@ var init_chunk_WIPN332D = __esm({
107231
107851
  }
107232
107852
  });
107233
107853
 
107234
- // node_modules/@x402/svm/dist/esm/chunk-OJGL5KXB.mjs
107854
+ // node_modules/@x402/svm/dist/esm/chunk-2P7IHAQJ.mjs
107235
107855
  var ExactSvmScheme;
107236
- var init_chunk_OJGL5KXB = __esm({
107237
- "node_modules/@x402/svm/dist/esm/chunk-OJGL5KXB.mjs"() {
107856
+ var init_chunk_2P7IHAQJ = __esm({
107857
+ "node_modules/@x402/svm/dist/esm/chunk-2P7IHAQJ.mjs"() {
107238
107858
  "use strict";
107239
107859
  init_chunk_WIPN332D();
107240
- init_chunk_A5U3JRDR();
107241
- init_chunk_TYATVISX();
107860
+ init_chunk_RZ6M7L3U();
107861
+ init_chunk_DAIKIZVB();
107242
107862
  init_src2();
107243
107863
  init_src3();
107244
107864
  init_index_node39();
@@ -107352,7 +107972,7 @@ var init_chunk_OJGL5KXB = __esm({
107352
107972
  }
107353
107973
  });
107354
107974
 
107355
- // node_modules/@x402/svm/dist/esm/chunk-FHYNBUS4.mjs
107975
+ // node_modules/@x402/svm/dist/esm/chunk-7TSGYOB2.mjs
107356
107976
  function assertSmartWalletLimits(limits) {
107357
107977
  assertLimit("smartWalletMaxComputeUnits", limits?.maxComputeUnits, 1);
107358
107978
  assertLimit("smartWalletMaxPriorityFeeMicroLamports", limits?.maxPriorityFeeMicroLamports, 0);
@@ -107778,11 +108398,11 @@ async function verifyPostSettlement(signer, signature3, network, requirements, s
107778
108398
  return { verified: false, method: "unverified" };
107779
108399
  }
107780
108400
  var DEFAULT_SMART_WALLET_MAX_COMPUTE_UNITS, DEFAULT_SMART_WALLET_MAX_PRIORITY_FEE_MICROLAMPORTS, IX_SET_COMPUTE_UNIT_LIMIT, IX_SET_COMPUTE_UNIT_PRICE, IX_TOKEN_TRANSFER_CHECKED, TOKEN_PROGRAMS, SMART_WALLET_V1_BUDGET_REASONS;
107781
- var init_chunk_FHYNBUS4 = __esm({
107782
- "node_modules/@x402/svm/dist/esm/chunk-FHYNBUS4.mjs"() {
108401
+ var init_chunk_7TSGYOB2 = __esm({
108402
+ "node_modules/@x402/svm/dist/esm/chunk-7TSGYOB2.mjs"() {
107783
108403
  "use strict";
107784
- init_chunk_A5U3JRDR();
107785
- init_chunk_TYATVISX();
108404
+ init_chunk_RZ6M7L3U();
108405
+ init_chunk_DAIKIZVB();
107786
108406
  init_src4();
107787
108407
  init_src2();
107788
108408
  init_src3();
@@ -107808,12 +108428,12 @@ var init_chunk_FHYNBUS4 = __esm({
107808
108428
  }
107809
108429
  });
107810
108430
 
107811
- // node_modules/@x402/svm/dist/esm/chunk-BAY4U3CP.mjs
108431
+ // node_modules/@x402/svm/dist/esm/chunk-L56Y5KBE.mjs
107812
108432
  var SettlementCache;
107813
- var init_chunk_BAY4U3CP = __esm({
107814
- "node_modules/@x402/svm/dist/esm/chunk-BAY4U3CP.mjs"() {
108433
+ var init_chunk_L56Y5KBE = __esm({
108434
+ "node_modules/@x402/svm/dist/esm/chunk-L56Y5KBE.mjs"() {
107815
108435
  "use strict";
107816
- init_chunk_TYATVISX();
108436
+ init_chunk_DAIKIZVB();
107817
108437
  SettlementCache = class {
107818
108438
  constructor() {
107819
108439
  this.entries = /* @__PURE__ */ new Map();
@@ -107860,7 +108480,7 @@ var init_chunk_BAY4U3CP = __esm({
107860
108480
  }
107861
108481
  });
107862
108482
 
107863
- // node_modules/@x402/svm/dist/esm/chunk-HHRGQ6BR.mjs
108483
+ // node_modules/@x402/svm/dist/esm/chunk-NQRJ53N4.mjs
107864
108484
  function resolveUptoSvmPaymentChannelConfig(requirements) {
107865
108485
  const feePayer = requirements.extra?.feePayer;
107866
108486
  if (typeof feePayer !== "string" || feePayer.length === 0) {
@@ -107877,22 +108497,22 @@ function resolveUptoSvmPaymentChannelConfig(requirements) {
107877
108497
  const splits = [{ bps: BASIS_POINTS_DENOMINATOR, recipient: requirements.payTo }];
107878
108498
  return { feePayer, receiverAuthorizer, splits, withdrawDelay };
107879
108499
  }
107880
- var init_chunk_HHRGQ6BR = __esm({
107881
- "node_modules/@x402/svm/dist/esm/chunk-HHRGQ6BR.mjs"() {
108500
+ var init_chunk_NQRJ53N4 = __esm({
108501
+ "node_modules/@x402/svm/dist/esm/chunk-NQRJ53N4.mjs"() {
107882
108502
  "use strict";
107883
- init_chunk_TYATVISX();
108503
+ init_chunk_DAIKIZVB();
107884
108504
  }
107885
108505
  });
107886
108506
 
107887
- // node_modules/@x402/svm/dist/esm/chunk-XBZL4F4W.mjs
108507
+ // node_modules/@x402/svm/dist/esm/chunk-QPYYLXPW.mjs
107888
108508
  var UptoSvmScheme;
107889
- var init_chunk_XBZL4F4W = __esm({
107890
- "node_modules/@x402/svm/dist/esm/chunk-XBZL4F4W.mjs"() {
108509
+ var init_chunk_QPYYLXPW = __esm({
108510
+ "node_modules/@x402/svm/dist/esm/chunk-QPYYLXPW.mjs"() {
107891
108511
  "use strict";
107892
- init_chunk_HHRGQ6BR();
107893
- init_chunk_5EQYNZXP();
107894
- init_chunk_BU4OMUDH();
107895
- init_chunk_TYATVISX();
108512
+ init_chunk_NQRJ53N4();
108513
+ init_chunk_2RSZYSMO();
108514
+ init_chunk_DP3B4MQJ();
108515
+ init_chunk_DAIKIZVB();
107896
108516
  init_src3();
107897
108517
  init_src2();
107898
108518
  UptoSvmScheme = class {
@@ -108366,23 +108986,23 @@ var init_esm8 = __esm({
108366
108986
  "node_modules/@x402/svm/dist/esm/index.mjs"() {
108367
108987
  "use strict";
108368
108988
  init_chunk_NLVYNPNC();
108369
- init_chunk_Y7W3OBHW();
108370
- init_chunk_7IXSBHSJ();
108371
- init_chunk_3WM4BBCN();
108372
- init_chunk_PQ3QK4Z4();
108373
- init_chunk_OT6AP35X();
108374
- init_chunk_GAYY7QRO();
108375
- init_chunk_CHLO3MPU();
108376
- init_chunk_OJGL5KXB();
108989
+ init_chunk_HRH33QP2();
108990
+ init_chunk_HQM7VUNZ();
108991
+ init_chunk_VITMNYMM();
108992
+ init_chunk_RMG2KWUT();
108993
+ init_chunk_SINLL373();
108994
+ init_chunk_CJ2GGI22();
108995
+ init_chunk_NUK2USQ3();
108996
+ init_chunk_2P7IHAQJ();
108377
108997
  init_chunk_WIPN332D();
108378
- init_chunk_FHYNBUS4();
108379
- init_chunk_BAY4U3CP();
108380
- init_chunk_XBZL4F4W();
108381
- init_chunk_HHRGQ6BR();
108382
- init_chunk_5EQYNZXP();
108383
- init_chunk_BU4OMUDH();
108384
- init_chunk_A5U3JRDR();
108385
- init_chunk_TYATVISX();
108998
+ init_chunk_7TSGYOB2();
108999
+ init_chunk_L56Y5KBE();
109000
+ init_chunk_QPYYLXPW();
109001
+ init_chunk_NQRJ53N4();
109002
+ init_chunk_2RSZYSMO();
109003
+ init_chunk_DP3B4MQJ();
109004
+ init_chunk_RZ6M7L3U();
109005
+ init_chunk_DAIKIZVB();
108386
109006
  init_index_node39();
108387
109007
  }
108388
109008
  });
@@ -108409,15 +109029,15 @@ __export(client_exports2, {
108409
109029
  var init_client3 = __esm({
108410
109030
  "node_modules/@x402/svm/dist/esm/batch-settlement/client/index.mjs"() {
108411
109031
  "use strict";
108412
- init_chunk_Y7W3OBHW();
108413
- init_chunk_3WM4BBCN();
108414
- init_chunk_PQ3QK4Z4();
108415
- init_chunk_GAYY7QRO();
108416
- init_chunk_CHLO3MPU();
108417
- init_chunk_5EQYNZXP();
108418
- init_chunk_BU4OMUDH();
108419
- init_chunk_A5U3JRDR();
108420
- init_chunk_TYATVISX();
109032
+ init_chunk_HRH33QP2();
109033
+ init_chunk_VITMNYMM();
109034
+ init_chunk_RMG2KWUT();
109035
+ init_chunk_CJ2GGI22();
109036
+ init_chunk_NUK2USQ3();
109037
+ init_chunk_2RSZYSMO();
109038
+ init_chunk_DP3B4MQJ();
109039
+ init_chunk_RZ6M7L3U();
109040
+ init_chunk_DAIKIZVB();
108421
109041
  }
108422
109042
  });
108423
109043
 
@@ -155488,7 +156108,7 @@ function transform2(md, preset) {
155488
156108
  (seg) => seg.isFence ? transformFenceForPreset(seg, preset) : applyTextRulesPerPreset(seg.content, preset)
155489
156109
  ).join("");
155490
156110
  }
155491
- var SHARE_PRESETS, PH_BOLD, PH_LINK, PH_END, TABLE_BLOCK_REGEX, TELEGRAM_ESCAPE_CHARS;
156111
+ var SHARE_PRESETS, TELEGRAM_MAX_LEN, TELEGRAM_SUFFIX_RESERVE, TELEGRAM_CHUNK_CONTENT_LIMIT, PH_BOLD, PH_LINK, PH_END, TABLE_BLOCK_REGEX, TELEGRAM_ESCAPE_CHARS;
155492
156112
  var init_share_formatters = __esm({
155493
156113
  "src/share-formatters.ts"() {
155494
156114
  "use strict";
@@ -155500,6 +156120,9 @@ var init_share_formatters = __esm({
155500
156120
  "whatsapp",
155501
156121
  "plain"
155502
156122
  ];
156123
+ TELEGRAM_MAX_LEN = 4096;
156124
+ TELEGRAM_SUFFIX_RESERVE = 24;
156125
+ TELEGRAM_CHUNK_CONTENT_LIMIT = TELEGRAM_MAX_LEN - TELEGRAM_SUFFIX_RESERVE;
155503
156126
  PH_BOLD = "__CR_PH_BOLD_";
155504
156127
  PH_LINK = "__CR_PH_LINK_";
155505
156128
  PH_END = "__";
@@ -155665,14 +156288,14 @@ var init_chunk_WWACQNRQ = __esm({
155665
156288
  }
155666
156289
  });
155667
156290
 
155668
- // node_modules/@x402/svm/dist/esm/chunk-RERS6LWQ.mjs
156291
+ // node_modules/@x402/svm/dist/esm/chunk-PQ2KWLVO.mjs
155669
156292
  var ExactSvmSchemeV1;
155670
- var init_chunk_RERS6LWQ = __esm({
155671
- "node_modules/@x402/svm/dist/esm/chunk-RERS6LWQ.mjs"() {
156293
+ var init_chunk_PQ2KWLVO = __esm({
156294
+ "node_modules/@x402/svm/dist/esm/chunk-PQ2KWLVO.mjs"() {
155672
156295
  "use strict";
155673
156296
  init_chunk_WIPN332D();
155674
- init_chunk_A5U3JRDR();
155675
- init_chunk_TYATVISX();
156297
+ init_chunk_RZ6M7L3U();
156298
+ init_chunk_DAIKIZVB();
155676
156299
  init_src2();
155677
156300
  init_src3();
155678
156301
  init_index_node39();
@@ -155800,15 +156423,15 @@ var init_facilitator = __esm({
155800
156423
  }
155801
156424
  });
155802
156425
 
155803
- // node_modules/@x402/svm/dist/esm/chunk-CUM4W6LX.mjs
156426
+ // node_modules/@x402/svm/dist/esm/chunk-RCDWMK2L.mjs
155804
156427
  var addressEncoder, compiledMessageDecoder, compiledMessageDecoder2;
155805
- var init_chunk_CUM4W6LX = __esm({
155806
- "node_modules/@x402/svm/dist/esm/chunk-CUM4W6LX.mjs"() {
156428
+ var init_chunk_RCDWMK2L = __esm({
156429
+ "node_modules/@x402/svm/dist/esm/chunk-RCDWMK2L.mjs"() {
155807
156430
  "use strict";
155808
- init_chunk_FHYNBUS4();
155809
- init_chunk_BAY4U3CP();
155810
- init_chunk_A5U3JRDR();
155811
- init_chunk_TYATVISX();
156431
+ init_chunk_7TSGYOB2();
156432
+ init_chunk_L56Y5KBE();
156433
+ init_chunk_RZ6M7L3U();
156434
+ init_chunk_DAIKIZVB();
155812
156435
  init_index_node39();
155813
156436
  init_facilitator();
155814
156437
  init_index_node39();
@@ -155853,15 +156476,15 @@ function registerExactSvmScheme(client, config2) {
155853
156476
  var init_client4 = __esm({
155854
156477
  "node_modules/@x402/svm/dist/esm/exact/client/index.mjs"() {
155855
156478
  "use strict";
155856
- init_chunk_OJGL5KXB();
156479
+ init_chunk_2P7IHAQJ();
155857
156480
  init_chunk_WWACQNRQ();
155858
- init_chunk_RERS6LWQ();
156481
+ init_chunk_PQ2KWLVO();
155859
156482
  init_chunk_WIPN332D();
155860
- init_chunk_CUM4W6LX();
155861
- init_chunk_FHYNBUS4();
155862
- init_chunk_BAY4U3CP();
155863
- init_chunk_A5U3JRDR();
155864
- init_chunk_TYATVISX();
156483
+ init_chunk_RCDWMK2L();
156484
+ init_chunk_7TSGYOB2();
156485
+ init_chunk_L56Y5KBE();
156486
+ init_chunk_RZ6M7L3U();
156487
+ init_chunk_DAIKIZVB();
155865
156488
  init_utils10();
155866
156489
  }
155867
156490
  });
@@ -155876,13 +156499,13 @@ var init_v1 = __esm({
155876
156499
  "node_modules/@x402/svm/dist/esm/v1/index.mjs"() {
155877
156500
  "use strict";
155878
156501
  init_chunk_WWACQNRQ();
155879
- init_chunk_RERS6LWQ();
156502
+ init_chunk_PQ2KWLVO();
155880
156503
  init_chunk_WIPN332D();
155881
- init_chunk_CUM4W6LX();
155882
- init_chunk_FHYNBUS4();
155883
- init_chunk_BAY4U3CP();
155884
- init_chunk_A5U3JRDR();
155885
- init_chunk_TYATVISX();
156504
+ init_chunk_RCDWMK2L();
156505
+ init_chunk_7TSGYOB2();
156506
+ init_chunk_L56Y5KBE();
156507
+ init_chunk_RZ6M7L3U();
156508
+ init_chunk_DAIKIZVB();
155886
156509
  }
155887
156510
  });
155888
156511
 
@@ -155962,20 +156585,44 @@ function toUpstreamModelId(modelId) {
155962
156585
  function timeoutForModel(modelId, models) {
155963
156586
  return models.get(modelId)?.reasoning ? REASONING_MODEL_TIMEOUT_MS : PER_MODEL_TIMEOUT_MS;
155964
156587
  }
155965
- async function readBodyWithTimeout(body, timeoutMs = MODEL_BODY_READ_TIMEOUT_MS) {
156588
+ function isClientAbortError(err, res) {
156589
+ if (err instanceof ClientDisconnectedError) return true;
156590
+ if (!(err instanceof Error)) return false;
156591
+ const clientGone = res.destroyed && !res.writableEnded;
156592
+ return clientGone && (err.name === "AbortError" || err.message.includes("aborted"));
156593
+ }
156594
+ async function readBodyWithTimeout(body, timeoutMs = MODEL_BODY_READ_TIMEOUT_MS, signal, abortError = () => new ClientDisconnectedError()) {
155966
156595
  if (!body) return [];
156596
+ if (signal?.aborted) {
156597
+ await body.cancel().catch(() => {
156598
+ });
156599
+ throw abortError();
156600
+ }
155967
156601
  const reader = body.getReader();
155968
156602
  const chunks = [];
155969
156603
  let timer2;
156604
+ let abortHandler;
155970
156605
  try {
155971
156606
  while (true) {
156607
+ if (signal?.aborted) {
156608
+ throw abortError();
156609
+ }
156610
+ const abortPromise = signal ? new Promise((_, reject) => {
156611
+ abortHandler = () => reject(abortError());
156612
+ signal.addEventListener("abort", abortHandler, { once: true });
156613
+ }) : null;
155972
156614
  const result = await Promise.race([
155973
156615
  reader.read(),
155974
156616
  new Promise((_, reject) => {
155975
156617
  timer2 = setTimeout(() => reject(new Error("Body read timeout")), timeoutMs);
155976
- })
156618
+ }),
156619
+ ...abortPromise ? [abortPromise] : []
155977
156620
  ]);
155978
156621
  clearTimeout(timer2);
156622
+ if (signal && abortHandler) {
156623
+ signal.removeEventListener("abort", abortHandler);
156624
+ abortHandler = void 0;
156625
+ }
155979
156626
  if (result.done) break;
155980
156627
  chunks.push(result.value);
155981
156628
  }
@@ -155985,6 +156632,9 @@ async function readBodyWithTimeout(body, timeoutMs = MODEL_BODY_READ_TIMEOUT_MS)
155985
156632
  throw err;
155986
156633
  } finally {
155987
156634
  clearTimeout(timer2);
156635
+ if (signal && abortHandler) {
156636
+ signal.removeEventListener("abort", abortHandler);
156637
+ }
155988
156638
  reader.releaseLock();
155989
156639
  }
155990
156640
  return chunks;
@@ -156873,9 +157523,15 @@ async function proxyPaidApiRequest(req, res, apiBase, payFetch, getActualPayment
156873
157523
  headers["user-agent"] = USER_AGENT;
156874
157524
  console.log(`[ClawRouter] ${requestLabel} request: ${req.method} ${req.url}`);
156875
157525
  const clientAbort = new AbortController();
156876
- res.on("close", () => {
156877
- if (!res.writableEnded) clientAbort.abort();
156878
- });
157526
+ const onClientDisconnect = () => {
157527
+ if (!res.writableEnded && !clientAbort.signal.aborted) {
157528
+ clientAbort.abort();
157529
+ }
157530
+ };
157531
+ res.on("close", onClientDisconnect);
157532
+ if ((res.destroyed || req.socket?.destroyed) && !res.writableEnded) {
157533
+ onClientDisconnect();
157534
+ }
156879
157535
  publishDispatchCost(0);
156880
157536
  const upstream = await payFetch(upstreamUrl, {
156881
157537
  method: req.method ?? "POST",
@@ -156917,7 +157573,7 @@ async function proxyPaidApiRequest(req, res, apiBase, payFetch, getActualPayment
156917
157573
  res.end();
156918
157574
  }
156919
157575
  } else {
156920
- const chunks = upstream.body ? await readBodyWithTimeout(upstream.body, ERROR_BODY_READ_TIMEOUT_MS) : [];
157576
+ const chunks = upstream.body ? await readBodyWithTimeout(upstream.body, ERROR_BODY_READ_TIMEOUT_MS, clientAbort.signal) : [];
156921
157577
  res.writeHead(upstream.status, responseHeaders);
156922
157578
  for (const chunk of chunks) {
156923
157579
  safeWrite(res, Buffer.from(chunk));
@@ -158265,13 +158921,18 @@ async function startProxy(options) {
158265
158921
  );
158266
158922
  } catch (err) {
158267
158923
  if (refuseOverCostCap(res, err)) return;
158268
- const error62 = err instanceof Error ? err : new Error(String(err));
158269
- options.onError?.(error62);
158270
- if (!res.headersSent) {
158924
+ const clientGone = isClientAbortError(err, res);
158925
+ if (!clientGone) options.onError?.(err instanceof Error ? err : new Error(String(err)));
158926
+ if (clientGone) {
158927
+ if (!res.writableEnded) res.destroy();
158928
+ } else if (!res.headersSent) {
158271
158929
  res.writeHead(502, { "Content-Type": "application/json" });
158272
158930
  res.end(
158273
158931
  JSON.stringify({
158274
- error: { message: `Partner proxy error: ${error62.message}`, type: "partner_error" }
158932
+ error: {
158933
+ message: `Partner proxy error: ${err instanceof Error ? err.message : String(err)}`,
158934
+ type: "partner_error"
158935
+ }
158275
158936
  })
158276
158937
  );
158277
158938
  } else if (!res.writableEnded) {
@@ -158300,18 +158961,25 @@ async function startProxy(options) {
158300
158961
  );
158301
158962
  } catch (err) {
158302
158963
  if (refuseOverCostCap(res, err)) return;
158303
- const error62 = err instanceof Error ? err : new Error(String(err));
158304
- options.onError?.(error62);
158305
- if (!res.headersSent) {
158964
+ const clientGone = isClientAbortError(err, res);
158965
+ if (!clientGone) options.onError?.(err instanceof Error ? err : new Error(String(err)));
158966
+ if (clientGone) {
158967
+ if (!res.writableEnded) res.destroy();
158968
+ } else if (!res.headersSent) {
158306
158969
  res.writeHead(502, { "Content-Type": "application/json" });
158307
158970
  res.end(
158308
158971
  JSON.stringify({
158309
- error: { message: `Account API error: ${error62.message}`, type: "account_error" }
158972
+ error: {
158973
+ message: `Account API error: ${err instanceof Error ? err.message : String(err)}`,
158974
+ type: "account_error"
158975
+ }
158310
158976
  })
158311
158977
  );
158312
158978
  } else if (!res.writableEnded) {
158313
158979
  res.end();
158314
158980
  }
158981
+ } finally {
158982
+ paymentStore.getStore()?.sessionSpend?.release();
158315
158983
  }
158316
158984
  return;
158317
158985
  }
@@ -159844,6 +160512,7 @@ async function proxyRequest(req, res, apiBase, payFetch, options, routerOpts, de
159844
160512
  } else {
159845
160513
  clearInterval(heartbeatInterval);
159846
160514
  heartbeatInterval = void 0;
160515
+ onClientClose();
159847
160516
  }
159848
160517
  }, HEARTBEAT_INTERVAL_MS);
159849
160518
  }
@@ -159873,7 +160542,7 @@ async function proxyRequest(req, res, apiBase, payFetch, options, routerOpts, de
159873
160542
  const timeoutMs = options.requestTimeoutMs ?? DEFAULT_REQUEST_TIMEOUT_MS;
159874
160543
  const globalController = new AbortController();
159875
160544
  const timeoutId = setTimeout(() => globalController.abort(), timeoutMs);
159876
- const clientDisconnected = () => res.destroyed && !res.writableEnded;
160545
+ const clientDisconnected = () => (res.destroyed || req.socket?.destroyed === true) && !res.writableEnded;
159877
160546
  const abortError = () => clientDisconnected() ? new ClientDisconnectedError() : new Error(`Request timed out after ${timeoutMs}ms`);
159878
160547
  const onClientClose = () => {
159879
160548
  if (!res.writableEnded && !globalController.signal.aborted) {
@@ -159882,7 +160551,9 @@ async function proxyRequest(req, res, apiBase, payFetch, options, routerOpts, de
159882
160551
  }
159883
160552
  };
159884
160553
  res.on("close", onClientClose);
159885
- if (res.destroyed) onClientClose();
160554
+ if (clientDisconnected()) {
160555
+ onClientClose();
160556
+ }
159886
160557
  try {
159887
160558
  let modelsToTry;
159888
160559
  const excludeList = options.excludeModels ?? loadExcludeList();
@@ -160530,7 +161201,12 @@ data: [DONE]
160530
161201
  const responseChunks = [];
160531
161202
  if (headersSentEarly) {
160532
161203
  if (upstream.body) {
160533
- const chunks = await readBodyWithTimeout(upstream.body);
161204
+ const chunks = await readBodyWithTimeout(
161205
+ upstream.body,
161206
+ MODEL_BODY_READ_TIMEOUT_MS,
161207
+ globalController.signal,
161208
+ abortError
161209
+ );
160534
161210
  const jsonBody = Buffer.concat(chunks);
160535
161211
  const jsonStr = jsonBody.toString();
160536
161212
  try {
@@ -160661,7 +161337,9 @@ data: [DONE]
160661
161337
  responseChunks.push(Buffer.from(finishData));
160662
161338
  }
160663
161339
  }
160664
- } catch {
161340
+ } catch (err) {
161341
+ if (err instanceof ClientDisconnectedError) throw err;
161342
+ if (globalController.signal.aborted) throw abortError();
160665
161343
  const errPayload = JSON.stringify({
160666
161344
  error: {
160667
161345
  message: `Upstream response could not be parsed: ${jsonStr.slice(0, 200)}`,
@@ -160749,7 +161427,12 @@ data: [DONE]
160749
161427
  }
160750
161428
  const bodyParts = [];
160751
161429
  if (upstream.body) {
160752
- const chunks = await readBodyWithTimeout(upstream.body);
161430
+ const chunks = await readBodyWithTimeout(
161431
+ upstream.body,
161432
+ MODEL_BODY_READ_TIMEOUT_MS,
161433
+ globalController.signal,
161434
+ abortError
161435
+ );
160753
161436
  for (const chunk of chunks) {
160754
161437
  bodyParts.push(Buffer.from(chunk));
160755
161438
  }
@@ -163215,7 +163898,7 @@ var init_config2 = __esm({
163215
163898
  conditionalTokens: "0x69308FB512518e39F9b16112fA8d994F4e2Bf8bB",
163216
163899
  exchangeV2: "0xE111180000d2663C0091e4f400237545B87B996B",
163217
163900
  negRiskExchangeV2: "0xe2222d279d744050d28e00520010520000310F59",
163218
- exchangeV3: "0x9fE6e61422AdB6F610d8597F9684b16912D50C3D"
163901
+ exchangeV3: "0xe3333700cA9d93003F00f0F71f8515005F6c00Aa"
163219
163902
  };
163220
163903
  MATIC_CONTRACTS = {
163221
163904
  exchange: "0x4bFb41d5B3570DeFd03C39a9A4D8dE6Bd8B8982E",
@@ -178605,7 +179288,7 @@ var VERSION2;
178605
179288
  var init_data2 = __esm({
178606
179289
  "node_modules/axios/lib/env/data.js"() {
178607
179290
  "use strict";
178608
- VERSION2 = "1.21.0";
179291
+ VERSION2 = "1.21.1";
178609
179292
  }
178610
179293
  });
178611
179294
 
@@ -182361,8 +183044,11 @@ function throwIfCancellationRequested(config2) {
182361
183044
  throw new CanceledError_default(null, config2);
182362
183045
  }
182363
183046
  }
182364
- function elapsedSince(start) {
182365
- return Math.max(0, Date.now() - start);
183047
+ function resolveClock() {
183048
+ return typeof performance !== "undefined" && utils_default.isFunction(performance.now) ? () => performance.now() : Date.now;
183049
+ }
183050
+ function elapsedSince(now2, start) {
183051
+ return Math.max(0, Math.round(now2() - start));
182366
183052
  }
182367
183053
  function dispatchRequest(_config) {
182368
183054
  const config2 = utils_default.toSafeFlatObject(_config);
@@ -182373,11 +183059,12 @@ function dispatchRequest(_config) {
182373
183059
  config2.headers.setContentType("application/x-www-form-urlencoded", false);
182374
183060
  }
182375
183061
  const adapter2 = adapters_default.getAdapter(config2.adapter || defaults_default.adapter, config2);
182376
- const start = Date.now();
183062
+ const now2 = resolveClock();
183063
+ const start = now2();
182377
183064
  return adapter2(config2).then(
182378
183065
  function onAdapterResolution(response) {
182379
183066
  throwIfCancellationRequested(config2);
182380
- response.duration = elapsedSince(start);
183067
+ response.duration = elapsedSince(now2, start);
182381
183068
  config2.response = response;
182382
183069
  try {
182383
183070
  response.data = transformData.call(config2, config2.transformResponse, response);
@@ -182391,7 +183078,7 @@ function dispatchRequest(_config) {
182391
183078
  if (!isCancel(reason)) {
182392
183079
  throwIfCancellationRequested(config2);
182393
183080
  if (reason && reason.response) {
182394
- reason.response.duration = elapsedSince(start);
183081
+ reason.response.duration = elapsedSince(now2, start);
182395
183082
  config2.response = reason.response;
182396
183083
  try {
182397
183084
  reason.response.data = transformData.call(
@@ -304273,7 +304960,7 @@ var require_axios = __commonJS({
304273
304960
  function getEnv2(key3) {
304274
304961
  return process.env[key3.toLowerCase()] || process.env[key3.toUpperCase()] || "";
304275
304962
  }
304276
- var VERSION4 = "1.21.0";
304963
+ var VERSION4 = "1.21.1";
304277
304964
  function parseProtocol2(url4) {
304278
304965
  const match = /^([-+\w]{1,25}):(?:\/\/)?/.exec(url4);
304279
304966
  return match && match[1].toLowerCase() || "";
@@ -307481,8 +308168,11 @@ var require_axios = __commonJS({
307481
308168
  throw new CanceledError3(null, config2);
307482
308169
  }
307483
308170
  }
307484
- function elapsedSince2(start) {
307485
- return Math.max(0, Date.now() - start);
308171
+ function resolveClock2() {
308172
+ return typeof performance !== "undefined" && utils$1.isFunction(performance.now) ? () => performance.now() : Date.now;
308173
+ }
308174
+ function elapsedSince2(now2, start) {
308175
+ return Math.max(0, Math.round(now2() - start));
307486
308176
  }
307487
308177
  function dispatchRequest2(_config) {
307488
308178
  const config2 = utils$1.toSafeFlatObject(_config);
@@ -307493,10 +308183,11 @@ var require_axios = __commonJS({
307493
308183
  config2.headers.setContentType("application/x-www-form-urlencoded", false);
307494
308184
  }
307495
308185
  const adapter2 = adapters.getAdapter(config2.adapter || defaults2.adapter, config2);
307496
- const start = Date.now();
308186
+ const now2 = resolveClock2();
308187
+ const start = now2();
307497
308188
  return adapter2(config2).then(function onAdapterResolution(response) {
307498
308189
  throwIfCancellationRequested2(config2);
307499
- response.duration = elapsedSince2(start);
308190
+ response.duration = elapsedSince2(now2, start);
307500
308191
  config2.response = response;
307501
308192
  try {
307502
308193
  response.data = transformData2.call(config2, config2.transformResponse, response);
@@ -307509,7 +308200,7 @@ var require_axios = __commonJS({
307509
308200
  if (!isCancel3(reason)) {
307510
308201
  throwIfCancellationRequested2(config2);
307511
308202
  if (reason && reason.response) {
307512
- reason.response.duration = elapsedSince2(start);
308203
+ reason.response.duration = elapsedSince2(now2, start);
307513
308204
  config2.response = reason.response;
307514
308205
  try {
307515
308206
  reason.response.data = transformData2.call(config2, config2.transformResponse, reason.response);
@@ -316900,6 +317591,6 @@ js-sha3/src/sha3.js:
316900
317591
  *)
316901
317592
 
316902
317593
  axios/dist/node/axios.cjs:
316903
- (*! Axios v1.21.0 Copyright (c) 2026 Matt Zabriskie and contributors *)
317594
+ (*! Axios v1.21.1 Copyright (c) 2026 Matt Zabriskie and contributors *)
316904
317595
  */
316905
317596
  //# sourceMappingURL=cli.js.map