@bitkyc08/opencodex 2.74.0 → 2.75.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/gui/dist/assets/{App-KLz1TAXi.css → App-ia4U0ufY.css} +1 -1
- package/gui/dist/assets/{App-B00Yq11u.js → App-xm0zGNOe.js} +3 -3
- package/gui/dist/assets/{Tray-D3Ij1Cvf.js → Tray-CGAD2AGk.js} +1 -1
- package/gui/dist/assets/{index-BYQQfBGK.js → index-D_RGAT6Q.js} +2 -2
- package/gui/dist/assets/{quota-summary-yPtcEhGI.js → quota-summary-CUFq48t-.js} +1 -1
- package/gui/dist/index.html +1 -1
- package/package.json +1 -1
- package/src/adapters/devin/cloud-direct/chat.ts +38 -6
- package/src/adapters/devin/live-models.ts +28 -8
- package/src/adapters/devin.ts +1 -1
- package/src/claude/devin-output-order.ts +98 -0
- package/src/codex/auth-api/pool-quota-probe.ts +2 -1
- package/src/codex/catalog/retained-sync.ts +9 -0
- package/src/codex/inject/config-toml.ts +179 -248
- package/src/codex/inject/provider-table.ts +5 -2
- package/src/codex/inject/remove.ts +23 -8
- package/src/codex/injected-marker.ts +28 -23
- package/src/codex/quota-auto-refresh.ts +1 -1
- package/src/codex/quota.ts +12 -4
- package/src/codex/toml-source-lines.ts +93 -1
- package/src/config/live-reconcile.ts +18 -0
- package/src/config/rebase-provenance.ts +12 -0
- package/src/config.ts +4 -3
- package/src/generated/compatibility-version.json +50 -38
- package/src/images/loop.ts +2 -0
- package/src/integrations/cursor-local-installer.ts +29 -2
- package/src/lib/redact.ts +54 -8
- package/src/oauth/anthropic-account-refusal.ts +76 -0
- package/src/oauth/anthropic-routing.ts +38 -10
- package/src/providers/new-model-policy-runtime.ts +83 -0
- package/src/providers/new-model-policy.ts +25 -0
- package/src/providers/registry/entries-core.ts +3 -0
- package/src/providers/registry/model-seeds.ts +31 -2
- package/src/providers/xai-transport.ts +2 -2
- package/src/server/claude-messages.ts +33 -10
- package/src/server/management/agent-settings-routes.ts +3 -1
- package/src/server/management/model-rows.ts +34 -4
- package/src/server/management/shared.ts +18 -2
- package/src/server/responses/adapter-continuation.ts +13 -21
- package/src/server/responses/adapter-delivery.ts +2 -2
- package/src/server/responses/adapter-dispatch.ts +10 -21
- package/src/server/responses/compact.ts +3 -2
- package/src/server/responses/core-codex-account.ts +4 -2
- package/src/server/responses/passthrough-delivery.ts +2 -1
- package/src/server/responses/request-transport.ts +2 -0
- package/src/server/responses/run-turn-execution.ts +25 -5
- package/src/server/responses/sidecar-execution.ts +9 -14
- package/src/web-search/loop.ts +7 -2
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
},
|
|
11
11
|
{
|
|
12
12
|
"path": "package.json",
|
|
13
|
-
"sha256": "
|
|
13
|
+
"sha256": "408e1f2afa7ab9b5bd057e361a77ebd2f9f7ece46ca1227fe8a7e2ac3dc926e4"
|
|
14
14
|
},
|
|
15
15
|
{
|
|
16
16
|
"path": "scripts/model-metadata.source.json",
|
|
@@ -334,7 +334,7 @@
|
|
|
334
334
|
},
|
|
335
335
|
{
|
|
336
336
|
"path": "src/adapters/devin.ts",
|
|
337
|
-
"sha256": "
|
|
337
|
+
"sha256": "61e7d400ffee83439ecdefe29c79f55ecfcef01991ac2533bc721cc98547cf99"
|
|
338
338
|
},
|
|
339
339
|
{
|
|
340
340
|
"path": "src/adapters/devin/cloud-direct/auth.ts",
|
|
@@ -346,7 +346,7 @@
|
|
|
346
346
|
},
|
|
347
347
|
{
|
|
348
348
|
"path": "src/adapters/devin/cloud-direct/chat.ts",
|
|
349
|
-
"sha256": "
|
|
349
|
+
"sha256": "11b60243816b75fb53eb8024211fc29e00dc2a8042bf9c5edb8e1a9706bebfc2"
|
|
350
350
|
},
|
|
351
351
|
{
|
|
352
352
|
"path": "src/adapters/devin/cloud-direct/index.ts",
|
|
@@ -374,7 +374,7 @@
|
|
|
374
374
|
},
|
|
375
375
|
{
|
|
376
376
|
"path": "src/adapters/devin/live-models.ts",
|
|
377
|
-
"sha256": "
|
|
377
|
+
"sha256": "369a2ce283c471014e0df90cb19867ebf1b27ffbf12419dc7aa305035fcc50f6"
|
|
378
378
|
},
|
|
379
379
|
{
|
|
380
380
|
"path": "src/adapters/devin/reasoning-signature.ts",
|
|
@@ -864,6 +864,10 @@
|
|
|
864
864
|
"path": "src/claude/desktop-system-proxy.ts",
|
|
865
865
|
"sha256": "4c08bd2c7148e2c0492416ba29c6659651ccb7065aea6e73c2ccffd1a6b4e49d"
|
|
866
866
|
},
|
|
867
|
+
{
|
|
868
|
+
"path": "src/claude/devin-output-order.ts",
|
|
869
|
+
"sha256": "0893e7ca2a6b2d5ce9f5ea72506e3a0a49ed3ac5467f99e04e891623e8a8f392"
|
|
870
|
+
},
|
|
867
871
|
{
|
|
868
872
|
"path": "src/claude/first-party-settings.ts",
|
|
869
873
|
"sha256": "6bb66606a4a9ce1e9e7a4a716c08b604fa2bef80c070ec0594dc235ce4ce681e"
|
|
@@ -1562,7 +1566,7 @@
|
|
|
1562
1566
|
},
|
|
1563
1567
|
{
|
|
1564
1568
|
"path": "src/codex/auth-api/pool-quota-probe.ts",
|
|
1565
|
-
"sha256": "
|
|
1569
|
+
"sha256": "86e35f3ecad73382aa33c647aa3715fc359c2208911969f8b46fea2c2923bd9e"
|
|
1566
1570
|
},
|
|
1567
1571
|
{
|
|
1568
1572
|
"path": "src/codex/auth-api/reset-credit-service.ts",
|
|
@@ -1718,7 +1722,7 @@
|
|
|
1718
1722
|
},
|
|
1719
1723
|
{
|
|
1720
1724
|
"path": "src/codex/catalog/retained-sync.ts",
|
|
1721
|
-
"sha256": "
|
|
1725
|
+
"sha256": "1403869c54577977a497c4e35e9f1199a39c4d225ed20a9bfe8aee039197d55a"
|
|
1722
1726
|
},
|
|
1723
1727
|
{
|
|
1724
1728
|
"path": "src/codex/catalog/routed-gather.ts",
|
|
@@ -1898,7 +1902,7 @@
|
|
|
1898
1902
|
},
|
|
1899
1903
|
{
|
|
1900
1904
|
"path": "src/codex/inject/config-toml.ts",
|
|
1901
|
-
"sha256": "
|
|
1905
|
+
"sha256": "8624e47a2c37a7e5404381211ccd7a60298db8e97e801f50512a239c93f3c67b"
|
|
1902
1906
|
},
|
|
1903
1907
|
{
|
|
1904
1908
|
"path": "src/codex/inject/multi-agent-v2.ts",
|
|
@@ -1914,11 +1918,11 @@
|
|
|
1914
1918
|
},
|
|
1915
1919
|
{
|
|
1916
1920
|
"path": "src/codex/inject/provider-table.ts",
|
|
1917
|
-
"sha256": "
|
|
1921
|
+
"sha256": "7eb36e69e56372047b5ede03ec93ca1dc5dcb447bab3a7e1be652ebd1a07b636"
|
|
1918
1922
|
},
|
|
1919
1923
|
{
|
|
1920
1924
|
"path": "src/codex/inject/remove.ts",
|
|
1921
|
-
"sha256": "
|
|
1925
|
+
"sha256": "ba8283ce9a656d349aa684f490b382cdfb9033ccc7700fbbff5339df9b647b1c"
|
|
1922
1926
|
},
|
|
1923
1927
|
{
|
|
1924
1928
|
"path": "src/codex/inject/restore.ts",
|
|
@@ -1934,7 +1938,7 @@
|
|
|
1934
1938
|
},
|
|
1935
1939
|
{
|
|
1936
1940
|
"path": "src/codex/injected-marker.ts",
|
|
1937
|
-
"sha256": "
|
|
1941
|
+
"sha256": "399b7fe9a849642f4e7f1e5c4fb5eca43ac7afcc10b641043f3422c56733c4ab"
|
|
1938
1942
|
},
|
|
1939
1943
|
{
|
|
1940
1944
|
"path": "src/codex/integration-record.ts",
|
|
@@ -2202,7 +2206,7 @@
|
|
|
2202
2206
|
},
|
|
2203
2207
|
{
|
|
2204
2208
|
"path": "src/codex/quota-auto-refresh.ts",
|
|
2205
|
-
"sha256": "
|
|
2209
|
+
"sha256": "f377202f6b73113d076f4117a161deb60c19ee239c03809080d0d965b1b5ffad"
|
|
2206
2210
|
},
|
|
2207
2211
|
{
|
|
2208
2212
|
"path": "src/codex/quota-capacity.ts",
|
|
@@ -2238,7 +2242,7 @@
|
|
|
2238
2242
|
},
|
|
2239
2243
|
{
|
|
2240
2244
|
"path": "src/codex/quota.ts",
|
|
2241
|
-
"sha256": "
|
|
2245
|
+
"sha256": "dc07e2e53066528331af46ba3946552fff74abd1a339f3161499de0138db852e"
|
|
2242
2246
|
},
|
|
2243
2247
|
{
|
|
2244
2248
|
"path": "src/codex/refresh.ts",
|
|
@@ -2374,7 +2378,7 @@
|
|
|
2374
2378
|
},
|
|
2375
2379
|
{
|
|
2376
2380
|
"path": "src/codex/toml-source-lines.ts",
|
|
2377
|
-
"sha256": "
|
|
2381
|
+
"sha256": "aefc3a941f073ec41ddd56511b52339bcea281c1afb5cc9585be1a427ae1f9c8"
|
|
2378
2382
|
},
|
|
2379
2383
|
{
|
|
2380
2384
|
"path": "src/codex/transition-state.ts",
|
|
@@ -2454,7 +2458,7 @@
|
|
|
2454
2458
|
},
|
|
2455
2459
|
{
|
|
2456
2460
|
"path": "src/config.ts",
|
|
2457
|
-
"sha256": "
|
|
2461
|
+
"sha256": "2540d8851dbc204cc78fd570f73818bd6a4103a55441de1225730780b5c1fd87"
|
|
2458
2462
|
},
|
|
2459
2463
|
{
|
|
2460
2464
|
"path": "src/config/admitted-identity.ts",
|
|
@@ -2482,7 +2486,7 @@
|
|
|
2482
2486
|
},
|
|
2483
2487
|
{
|
|
2484
2488
|
"path": "src/config/live-reconcile.ts",
|
|
2485
|
-
"sha256": "
|
|
2489
|
+
"sha256": "05cd6efa7bd35ecc75e42078c21478b23e59ebc0e79204de2434258feb288f3b"
|
|
2486
2490
|
},
|
|
2487
2491
|
{
|
|
2488
2492
|
"path": "src/config/load-degrade.ts",
|
|
@@ -2554,7 +2558,7 @@
|
|
|
2554
2558
|
},
|
|
2555
2559
|
{
|
|
2556
2560
|
"path": "src/config/rebase-provenance.ts",
|
|
2557
|
-
"sha256": "
|
|
2561
|
+
"sha256": "badcb6dddc61f93ed4a9761d36f19aff92cc56e2ace5d272ad2984b4358e53cc"
|
|
2558
2562
|
},
|
|
2559
2563
|
{
|
|
2560
2564
|
"path": "src/config/salvage.ts",
|
|
@@ -2662,7 +2666,7 @@
|
|
|
2662
2666
|
},
|
|
2663
2667
|
{
|
|
2664
2668
|
"path": "src/images/loop.ts",
|
|
2665
|
-
"sha256": "
|
|
2669
|
+
"sha256": "3fbbc06d608fa2da7a29306d6c7da7797b4d9a412509540a81da322d830abf72"
|
|
2666
2670
|
},
|
|
2667
2671
|
{
|
|
2668
2672
|
"path": "src/images/plan.ts",
|
|
@@ -2730,7 +2734,7 @@
|
|
|
2730
2734
|
},
|
|
2731
2735
|
{
|
|
2732
2736
|
"path": "src/integrations/cursor-local-installer.ts",
|
|
2733
|
-
"sha256": "
|
|
2737
|
+
"sha256": "43da14dd298d6faf0e198ca0c183e77ec00a1d6ce70da947a67cd60ed465192b"
|
|
2734
2738
|
},
|
|
2735
2739
|
{
|
|
2736
2740
|
"path": "src/integrations/cursor-seen.ts",
|
|
@@ -3534,7 +3538,7 @@
|
|
|
3534
3538
|
},
|
|
3535
3539
|
{
|
|
3536
3540
|
"path": "src/lib/redact.ts",
|
|
3537
|
-
"sha256": "
|
|
3541
|
+
"sha256": "2e6579780aec91c3eb551ab0262c6448cf4979e958941fc893b93b2a50f287b5"
|
|
3538
3542
|
},
|
|
3539
3543
|
{
|
|
3540
3544
|
"path": "src/lib/request-execution-budget.ts",
|
|
@@ -3792,6 +3796,10 @@
|
|
|
3792
3796
|
"path": "src/oauth/account-quota-rank.ts",
|
|
3793
3797
|
"sha256": "dad7dc420e424ff63cad47bf5c142a12e8c45ec7021de99d2d9f01ddfa357c0c"
|
|
3794
3798
|
},
|
|
3799
|
+
{
|
|
3800
|
+
"path": "src/oauth/anthropic-account-refusal.ts",
|
|
3801
|
+
"sha256": "80aa11761049970cde3cd6e668e712ecb67a09b8ca712cf71894278a8c7533fc"
|
|
3802
|
+
},
|
|
3795
3803
|
{
|
|
3796
3804
|
"path": "src/oauth/anthropic-account-threshold.ts",
|
|
3797
3805
|
"sha256": "2bc5aed137e94b27a1463cc93c4642df72b0f2d968275dcc9fe568889dbca028"
|
|
@@ -3802,7 +3810,7 @@
|
|
|
3802
3810
|
},
|
|
3803
3811
|
{
|
|
3804
3812
|
"path": "src/oauth/anthropic-routing.ts",
|
|
3805
|
-
"sha256": "
|
|
3813
|
+
"sha256": "cb0bf7f08c5b49dea69b29bc6b066331b8846d290f51a035c6150e0de1a91ae7"
|
|
3806
3814
|
},
|
|
3807
3815
|
{
|
|
3808
3816
|
"path": "src/oauth/anthropic.ts",
|
|
@@ -4256,9 +4264,13 @@
|
|
|
4256
4264
|
"path": "src/providers/muse-subscription-usage.ts",
|
|
4257
4265
|
"sha256": "bd9f7bb833625a124e5d9828f8e8bf82badc9a316b2a6e34d5234b600f0ecdbe"
|
|
4258
4266
|
},
|
|
4267
|
+
{
|
|
4268
|
+
"path": "src/providers/new-model-policy-runtime.ts",
|
|
4269
|
+
"sha256": "c2e50d97236ffef238f81ec0e8b4e74ec3a17dfb033cd3c585117809b44fa146"
|
|
4270
|
+
},
|
|
4259
4271
|
{
|
|
4260
4272
|
"path": "src/providers/new-model-policy.ts",
|
|
4261
|
-
"sha256": "
|
|
4273
|
+
"sha256": "a58ec74435dcf59417109a25c6388e48b1c5111aa74000a2b42f813bb2df2c11"
|
|
4262
4274
|
},
|
|
4263
4275
|
{
|
|
4264
4276
|
"path": "src/providers/ollama-show.ts",
|
|
@@ -4366,7 +4378,7 @@
|
|
|
4366
4378
|
},
|
|
4367
4379
|
{
|
|
4368
4380
|
"path": "src/providers/registry/entries-core.ts",
|
|
4369
|
-
"sha256": "
|
|
4381
|
+
"sha256": "e171cb17b690b359cfd718e0cb64ea6d131e7a7da4ca0afdce6914293651b7eb"
|
|
4370
4382
|
},
|
|
4371
4383
|
{
|
|
4372
4384
|
"path": "src/providers/registry/entries-extended.ts",
|
|
@@ -4378,7 +4390,7 @@
|
|
|
4378
4390
|
},
|
|
4379
4391
|
{
|
|
4380
4392
|
"path": "src/providers/registry/model-seeds.ts",
|
|
4381
|
-
"sha256": "
|
|
4393
|
+
"sha256": "deacbedbf3f200d08cfa871b597c689b112bba1aebc8f54a2c20a435305e9248"
|
|
4382
4394
|
},
|
|
4383
4395
|
{
|
|
4384
4396
|
"path": "src/providers/registry/types.ts",
|
|
@@ -4438,7 +4450,7 @@
|
|
|
4438
4450
|
},
|
|
4439
4451
|
{
|
|
4440
4452
|
"path": "src/providers/xai-transport.ts",
|
|
4441
|
-
"sha256": "
|
|
4453
|
+
"sha256": "1ae46666416e0ca3162bfe04427c4c26a06cd38dd77b06fa15a9fb842098b231"
|
|
4442
4454
|
},
|
|
4443
4455
|
{
|
|
4444
4456
|
"path": "src/providers/zai-responses-migration.ts",
|
|
@@ -4950,7 +4962,7 @@
|
|
|
4950
4962
|
},
|
|
4951
4963
|
{
|
|
4952
4964
|
"path": "src/server/claude-messages.ts",
|
|
4953
|
-
"sha256": "
|
|
4965
|
+
"sha256": "96c6cc4de3130746d230feda91ade95b902fe8a65bdf2cbeecf43183dd9ee4e7"
|
|
4954
4966
|
},
|
|
4955
4967
|
{
|
|
4956
4968
|
"path": "src/server/context-history.ts",
|
|
@@ -5138,7 +5150,7 @@
|
|
|
5138
5150
|
},
|
|
5139
5151
|
{
|
|
5140
5152
|
"path": "src/server/management/agent-settings-routes.ts",
|
|
5141
|
-
"sha256": "
|
|
5153
|
+
"sha256": "4e6f962a8f843473343c676eee6083965fe7a79e6408ff1ae08f46f9e66e15e7"
|
|
5142
5154
|
},
|
|
5143
5155
|
{
|
|
5144
5156
|
"path": "src/server/management/anthropic-account-threshold.ts",
|
|
@@ -5234,7 +5246,7 @@
|
|
|
5234
5246
|
},
|
|
5235
5247
|
{
|
|
5236
5248
|
"path": "src/server/management/model-rows.ts",
|
|
5237
|
-
"sha256": "
|
|
5249
|
+
"sha256": "c8c7c99b4cc5587ae14ba0d051f2906879a79ab7ac2e5387ea5581bf06b4083a"
|
|
5238
5250
|
},
|
|
5239
5251
|
{
|
|
5240
5252
|
"path": "src/server/management/native-integration-routes.ts",
|
|
@@ -5302,7 +5314,7 @@
|
|
|
5302
5314
|
},
|
|
5303
5315
|
{
|
|
5304
5316
|
"path": "src/server/management/shared.ts",
|
|
5305
|
-
"sha256": "
|
|
5317
|
+
"sha256": "797ce8c65b067f241ead4402d1e2967bba991c745e09853b62a586c57fac6492"
|
|
5306
5318
|
},
|
|
5307
5319
|
{
|
|
5308
5320
|
"path": "src/server/management/sibling-guard.ts",
|
|
@@ -5498,15 +5510,15 @@
|
|
|
5498
5510
|
},
|
|
5499
5511
|
{
|
|
5500
5512
|
"path": "src/server/responses/adapter-continuation.ts",
|
|
5501
|
-
"sha256": "
|
|
5513
|
+
"sha256": "ecb3ca3fb55747289b64b11cddd22d061fd15270a119d2b160052978c16cab63"
|
|
5502
5514
|
},
|
|
5503
5515
|
{
|
|
5504
5516
|
"path": "src/server/responses/adapter-delivery.ts",
|
|
5505
|
-
"sha256": "
|
|
5517
|
+
"sha256": "ed70b7767028c18e6963343505659c3f4d17cb1c6736296f5698b1da2df9ef8c"
|
|
5506
5518
|
},
|
|
5507
5519
|
{
|
|
5508
5520
|
"path": "src/server/responses/adapter-dispatch.ts",
|
|
5509
|
-
"sha256": "
|
|
5521
|
+
"sha256": "9fa345fa8468a5461dea9d96e6ca767144d9edbb1e97c5e863fcae494219eb96"
|
|
5510
5522
|
},
|
|
5511
5523
|
{
|
|
5512
5524
|
"path": "src/server/responses/agent-task-recovery-cache.ts",
|
|
@@ -5570,7 +5582,7 @@
|
|
|
5570
5582
|
},
|
|
5571
5583
|
{
|
|
5572
5584
|
"path": "src/server/responses/compact.ts",
|
|
5573
|
-
"sha256": "
|
|
5585
|
+
"sha256": "6295be94e0e18090b5cb6e7b785cb523d6b95afc32b88bde1674dce7814847c9"
|
|
5574
5586
|
},
|
|
5575
5587
|
{
|
|
5576
5588
|
"path": "src/server/responses/compaction-recovery-policy.ts",
|
|
@@ -5598,7 +5610,7 @@
|
|
|
5598
5610
|
},
|
|
5599
5611
|
{
|
|
5600
5612
|
"path": "src/server/responses/core-codex-account.ts",
|
|
5601
|
-
"sha256": "
|
|
5613
|
+
"sha256": "4739da1b80564820492f5390d390150bd7a1dee8ffe0725c0c6664698ad678c7"
|
|
5602
5614
|
},
|
|
5603
5615
|
{
|
|
5604
5616
|
"path": "src/server/responses/core-combo-failure.ts",
|
|
@@ -5718,7 +5730,7 @@
|
|
|
5718
5730
|
},
|
|
5719
5731
|
{
|
|
5720
5732
|
"path": "src/server/responses/passthrough-delivery.ts",
|
|
5721
|
-
"sha256": "
|
|
5733
|
+
"sha256": "38827ee50e10130e9d661bd21df0a969634e7d5989aea1a259ffd1f6ae6e508c"
|
|
5722
5734
|
},
|
|
5723
5735
|
{
|
|
5724
5736
|
"path": "src/server/responses/passthrough-dispatch.ts",
|
|
@@ -5758,7 +5770,7 @@
|
|
|
5758
5770
|
},
|
|
5759
5771
|
{
|
|
5760
5772
|
"path": "src/server/responses/request-transport.ts",
|
|
5761
|
-
"sha256": "
|
|
5773
|
+
"sha256": "fda410751c027be01238c8b4f7cb42c518df6b15e7146074fbea410b20601fab"
|
|
5762
5774
|
},
|
|
5763
5775
|
{
|
|
5764
5776
|
"path": "src/server/responses/reset-replay.ts",
|
|
@@ -5774,7 +5786,7 @@
|
|
|
5774
5786
|
},
|
|
5775
5787
|
{
|
|
5776
5788
|
"path": "src/server/responses/run-turn-execution.ts",
|
|
5777
|
-
"sha256": "
|
|
5789
|
+
"sha256": "ce6d5e7795264e20d816dff04521a5c8a511b6fa04458f7a7cbb742c78e88165"
|
|
5778
5790
|
},
|
|
5779
5791
|
{
|
|
5780
5792
|
"path": "src/server/responses/shadow-target-availability.ts",
|
|
@@ -5782,7 +5794,7 @@
|
|
|
5782
5794
|
},
|
|
5783
5795
|
{
|
|
5784
5796
|
"path": "src/server/responses/sidecar-execution.ts",
|
|
5785
|
-
"sha256": "
|
|
5797
|
+
"sha256": "4aacc777a84aefdd55f058d0401fc7d210b48e19a71feb1fbfa7c5c72bc4e273"
|
|
5786
5798
|
},
|
|
5787
5799
|
{
|
|
5788
5800
|
"path": "src/server/responses/skills-snapshot.ts",
|
|
@@ -6494,7 +6506,7 @@
|
|
|
6494
6506
|
},
|
|
6495
6507
|
{
|
|
6496
6508
|
"path": "src/web-search/loop.ts",
|
|
6497
|
-
"sha256": "
|
|
6509
|
+
"sha256": "64731bb318e103a542568d2910ddd9621f9e4d318259167304f65d7107f69f93"
|
|
6498
6510
|
},
|
|
6499
6511
|
{
|
|
6500
6512
|
"path": "src/web-search/ollama-executor.ts",
|
package/src/images/loop.ts
CHANGED
|
@@ -335,6 +335,7 @@ export interface ImageBridgeDeps {
|
|
|
335
335
|
retryAfterHeader: string | null,
|
|
336
336
|
responseHeaders?: Headers,
|
|
337
337
|
retryParsed?: OcxParsedRequest,
|
|
338
|
+
// A 403 requires this complete response; status-only callbacks retain 429 semantics.
|
|
338
339
|
originalResponse?: Response,
|
|
339
340
|
) =>
|
|
340
341
|
| { adapter: ProviderAdapter; recoveryKind: AttemptRecoveryKind }
|
|
@@ -687,6 +688,7 @@ export async function runWithImageBridge(deps: ImageBridgeDeps): Promise<Respons
|
|
|
687
688
|
}
|
|
688
689
|
// 429 key-failover parity with web-search / normal routed path.
|
|
689
690
|
while ((prepared.response.status === 429
|
|
691
|
+
|| (prepared.response.status === 403 && deps.incomingMeta?.providerName === "anthropic")
|
|
690
692
|
|| (iterParsed._kiroAuthContext && (prepared.response.status === 400 || prepared.response.status === 403))) && deps.on429) {
|
|
691
693
|
const rotated = await deps.on429(prepared.response.headers.get("retry-after"), prepared.response.headers,
|
|
692
694
|
iterParsed, prepared.response);
|
|
@@ -17,6 +17,9 @@
|
|
|
17
17
|
const DEFAULT_UPDATE_HOST = "https://api2.cursor.sh";
|
|
18
18
|
|
|
19
19
|
const UPDATE_MANIFEST_TIMEOUT_MS = 4_000;
|
|
20
|
+
const UPDATE_MANIFEST_MAX_BYTES = 64 * 1024;
|
|
21
|
+
const UPDATE_MANIFEST_MAX_VERSION_LENGTH = 256;
|
|
22
|
+
const UPDATE_MANIFEST_MAX_URL_LENGTH = 4 * 1024;
|
|
20
23
|
const CACHE_TTL_OK_MS = 30 * 60_000;
|
|
21
24
|
const CACHE_TTL_FAILED_MS = 5 * 60_000;
|
|
22
25
|
|
|
@@ -63,7 +66,29 @@ export function realCursorLocalHintDeps(): CursorLocalHintDeps {
|
|
|
63
66
|
fetchJson: async (url, timeoutMs) => {
|
|
64
67
|
const response = await fetch(url, { signal: AbortSignal.timeout(timeoutMs) });
|
|
65
68
|
if (!response.ok) throw new Error(`HTTP ${response.status}`);
|
|
66
|
-
|
|
69
|
+
if (!response.body) throw new Error("Missing response body");
|
|
70
|
+
const reader = response.body.getReader();
|
|
71
|
+
const chunks: Uint8Array[] = [];
|
|
72
|
+
let size = 0;
|
|
73
|
+
while (true) {
|
|
74
|
+
const { done, value } = await reader.read();
|
|
75
|
+
if (done) break;
|
|
76
|
+
size += value.byteLength;
|
|
77
|
+
if (size > UPDATE_MANIFEST_MAX_BYTES) {
|
|
78
|
+
// Best-effort discard: awaiting cancel() could hang on a stalled source
|
|
79
|
+
// even though AbortSignal.timeout already bounds the request itself.
|
|
80
|
+
void reader.cancel().catch(() => {});
|
|
81
|
+
throw new Error("Update manifest exceeds byte limit");
|
|
82
|
+
}
|
|
83
|
+
chunks.push(value);
|
|
84
|
+
}
|
|
85
|
+
const body = new Uint8Array(size);
|
|
86
|
+
let offset = 0;
|
|
87
|
+
for (const chunk of chunks) {
|
|
88
|
+
body.set(chunk, offset);
|
|
89
|
+
offset += chunk.byteLength;
|
|
90
|
+
}
|
|
91
|
+
return JSON.parse(new TextDecoder().decode(body));
|
|
67
92
|
},
|
|
68
93
|
};
|
|
69
94
|
}
|
|
@@ -86,7 +111,8 @@ export function platformForHost(os: string, arch: string): CursorLocalPlatform |
|
|
|
86
111
|
function parseManifest(raw: unknown): { version: string; url: string } | null {
|
|
87
112
|
if (!raw || typeof raw !== "object") return null;
|
|
88
113
|
const record = raw as CursorLocalManifest;
|
|
89
|
-
if (typeof record.url !== "string" ||
|
|
114
|
+
if (typeof record.url !== "string" || record.url.length > UPDATE_MANIFEST_MAX_URL_LENGTH
|
|
115
|
+
|| !/^https:\/\/downloads\.cursor\.com\/local-mode\//.test(record.url)) {
|
|
90
116
|
return null;
|
|
91
117
|
}
|
|
92
118
|
// Windows and Linux manifests carry `version`/`productVersion`; the Darwin ones return only
|
|
@@ -94,6 +120,7 @@ function parseManifest(raw: unknown): { version: string; url: string } | null {
|
|
|
94
120
|
const candidate = typeof record.version === "string" ? record.version
|
|
95
121
|
: typeof record.productVersion === "string" ? record.productVersion
|
|
96
122
|
: typeof record.name === "string" ? record.name : "";
|
|
123
|
+
if (candidate.length > UPDATE_MANIFEST_MAX_VERSION_LENGTH) return null;
|
|
97
124
|
const version = candidate.trim();
|
|
98
125
|
if (version === "") return null;
|
|
99
126
|
// The Linux channel advertises the AppImage's zsync delta metadata (what the in-app updater
|
package/src/lib/redact.ts
CHANGED
|
@@ -100,13 +100,6 @@ const OTHER_FRAMED_CREDENTIALS: Array<[RegExp, string]> = [
|
|
|
100
100
|
),
|
|
101
101
|
"element",
|
|
102
102
|
],
|
|
103
|
-
[
|
|
104
|
-
new RegExp(
|
|
105
|
-
`(<[^\\S\\r\\n]*(?:[A-Za-z_][\\w.-]*:)?[A-Za-z_][\\w:.-]*)(?=[^>]*?(?<![\\w:.-])(?:name|key|id)[^\\S]*=[^\\S]*["']?(?:${CREDENTIAL_HEADER_LABEL})["']?(?=[\\s/>]))[\\s\\S]*`,
|
|
106
|
-
"gi",
|
|
107
|
-
),
|
|
108
|
-
"element",
|
|
109
|
-
],
|
|
110
103
|
// Multipart part: everything from a credential-named part header to the end
|
|
111
104
|
// of the input. Part-based, not line-based — a body can span lines and the
|
|
112
105
|
// blank line is often missing in a malformed echo.
|
|
@@ -136,7 +129,60 @@ const OTHER_FRAMED_CREDENTIALS: Array<[RegExp, string]> = [
|
|
|
136
129
|
function maskOtherFramings(value: string): string {
|
|
137
130
|
// Same union rule as the header pass: decoding may add coverage, never
|
|
138
131
|
// remove it.
|
|
139
|
-
|
|
132
|
+
const decoded = maskOtherFramingsOnce(value, true);
|
|
133
|
+
const decodedXml = maskXmlIdentifyingAttribute(decoded, true);
|
|
134
|
+
const plain = maskOtherFramingsOnce(decodedXml, false);
|
|
135
|
+
return maskXmlIdentifyingAttribute(plain, false);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
const XML_TAG_NAME = /<[^\S\r\n]*(?:[A-Za-z_][\w.-]*:)?[A-Za-z_][\w:.-]*/y;
|
|
139
|
+
const XML_CREDENTIAL_ATTRIBUTE = new RegExp(
|
|
140
|
+
`(?<![\\w:.-])(?:name|key|id)[^\\S]*=[^\\S]*["']?(?:${CREDENTIAL_HEADER_LABEL})["']?(?=[\\s/>])`,
|
|
141
|
+
"i",
|
|
142
|
+
);
|
|
143
|
+
|
|
144
|
+
/** Find a tag terminator without treating a quoted attribute's `>` as syntax. */
|
|
145
|
+
function findXmlTagClose(text: string, from: number): number {
|
|
146
|
+
let quote = "";
|
|
147
|
+
for (let index = from; index < text.length; index += 1) {
|
|
148
|
+
const character = text.charAt(index);
|
|
149
|
+
if (quote) {
|
|
150
|
+
if (character === quote) quote = "";
|
|
151
|
+
} else if (character === '"' || character === "'") {
|
|
152
|
+
quote = character;
|
|
153
|
+
} else if (character === ">") {
|
|
154
|
+
return index;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
return -1;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/** Scan each tag once; a suffix-searching lookahead here makes unterminated tags quadratic. */
|
|
161
|
+
function maskXmlIdentifyingAttribute(value: string, decodeEscapes: boolean): string {
|
|
162
|
+
const { folded, map } = foldForMatching(value, decodeEscapes);
|
|
163
|
+
let searchFrom = 0;
|
|
164
|
+
while (searchFrom < folded.length) {
|
|
165
|
+
const relativeStart = folded.indexOf("<", searchFrom);
|
|
166
|
+
if (relativeStart === -1) return value;
|
|
167
|
+
const tagStart = relativeStart;
|
|
168
|
+
XML_TAG_NAME.lastIndex = tagStart;
|
|
169
|
+
const tagName = XML_TAG_NAME.exec(folded);
|
|
170
|
+
if (!tagName) {
|
|
171
|
+
searchFrom = tagStart + 1;
|
|
172
|
+
continue;
|
|
173
|
+
}
|
|
174
|
+
const close = findXmlTagClose(folded, tagStart + tagName[0].length);
|
|
175
|
+
const tagEnd = close === -1 ? folded.length : close + 1;
|
|
176
|
+
const attributes = folded.slice(tagStart + tagName[0].length, tagEnd);
|
|
177
|
+
if (XML_CREDENTIAL_ATTRIBUTE.test(attributes)) {
|
|
178
|
+
const start = map[tagStart] ?? value.length;
|
|
179
|
+
const headEnd = map[tagStart + tagName[0].length] ?? value.length;
|
|
180
|
+
return value.slice(0, start) + value.slice(start, headEnd) + REDACTED_SECRET;
|
|
181
|
+
}
|
|
182
|
+
if (close === -1) return value;
|
|
183
|
+
searchFrom = tagEnd;
|
|
184
|
+
}
|
|
185
|
+
return value;
|
|
140
186
|
}
|
|
141
187
|
|
|
142
188
|
function maskOtherFramingsOnce(value: string, decodeEscapes: boolean): string {
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/** Narrow pre-output account recovery, fenced to the bearer that physically sent the turn. */
|
|
2
|
+
import { readBoundedResponseBody } from "../lib/bounded-body";
|
|
3
|
+
import { isNonReplayableResponse } from "../lib/upstream-retry";
|
|
4
|
+
import { credentialGeneration, getAccountCredentialWithStatus } from "./store";
|
|
5
|
+
import type { OAuthAccessSnapshot } from "./index";
|
|
6
|
+
import type { OcxConfig } from "../types";
|
|
7
|
+
import type { AnthropicRouteDecision } from "./anthropic-model-routes";
|
|
8
|
+
import { recordAnthropicAccountRefusal, rotateAnthropicAccountOnRefusal } from "./anthropic-routing";
|
|
9
|
+
|
|
10
|
+
const responseCredentials = new WeakMap<Response, Pick<OAuthAccessSnapshot, "accountId" | "generation">>();
|
|
11
|
+
const verdicts = new WeakMap<Response, Promise<boolean>>();
|
|
12
|
+
|
|
13
|
+
/** Called only when the outgoing headers prove ownership of the selected stored bearer. */
|
|
14
|
+
export function bindAnthropicRefusalCredential(response: Response, snapshot: OAuthAccessSnapshot): void {
|
|
15
|
+
responseCredentials.set(response, { accountId: snapshot.accountId, generation: snapshot.generation });
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
async function isAccountRefusal(response: Response, signal?: AbortSignal): Promise<boolean> {
|
|
19
|
+
try {
|
|
20
|
+
const body = await readBoundedResponseBody(response.clone(), { signal });
|
|
21
|
+
if (!body.displaySafe || body.truncated) return false;
|
|
22
|
+
const payload: unknown = JSON.parse(body.text);
|
|
23
|
+
if (!payload || typeof payload !== "object" || Array.isArray(payload) || !("error" in payload)) return false;
|
|
24
|
+
const error = payload.error;
|
|
25
|
+
if (!error || typeof error !== "object" || Array.isArray(error) || !("type" in error) || !("message" in error)
|
|
26
|
+
|| typeof error.message !== "string") return false;
|
|
27
|
+
// Whole-message patterns: request-policy/model/resource refusals and quoted diagnostics
|
|
28
|
+
// must not acquire account authority merely by containing entitlement keywords.
|
|
29
|
+
if ("code" in error && error.code != null
|
|
30
|
+
&& (typeof error.code !== "string" || !["subscription_required", "insufficient_quota", "permission_denied"].includes(error.code))) return false;
|
|
31
|
+
const message = error.message.trim();
|
|
32
|
+
if (error.type === "permission_error" && /^(?:Your account does not have access to Claude Code|Your (?:Claude )?subscription (?:has expired|is (?:expired|inactive))|Your account does not have an active subscription)[.!]?$/i.test(message)) return true;
|
|
33
|
+
return (error.type === "billing_error" || error.type === "permission_error")
|
|
34
|
+
&& /^Your credit balance is too low to access the Anthropic API\.(?: Please go to Plans & Billing to upgrade or purchase credits\.)?$/i.test(message);
|
|
35
|
+
} catch {
|
|
36
|
+
// Malformed, over-limit, interrupted and unreadable error bodies are never authority.
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export async function rotateAnthropicAccountOnResponse(
|
|
42
|
+
response: Response,
|
|
43
|
+
options: {
|
|
44
|
+
config: OcxConfig;
|
|
45
|
+
accountId: string;
|
|
46
|
+
sessionKey?: string | null;
|
|
47
|
+
decision?: AnthropicRouteDecision | null;
|
|
48
|
+
signal?: AbortSignal;
|
|
49
|
+
canRetry: boolean;
|
|
50
|
+
allowAccountRefusal?: boolean;
|
|
51
|
+
},
|
|
52
|
+
): Promise<string | null> {
|
|
53
|
+
if (options.signal?.aborted || isNonReplayableResponse(response)) return null;
|
|
54
|
+
if (response.status !== 429) {
|
|
55
|
+
if (response.status !== 403 || options.allowAccountRefusal === false) return null;
|
|
56
|
+
const sent = responseCredentials.get(response);
|
|
57
|
+
if (!sent || sent.accountId !== options.accountId) return null;
|
|
58
|
+
let verdict = verdicts.get(response);
|
|
59
|
+
if (!verdict) {
|
|
60
|
+
verdict = isAccountRefusal(response, options.signal);
|
|
61
|
+
verdicts.set(response, verdict);
|
|
62
|
+
}
|
|
63
|
+
if (!await verdict || options.signal?.aborted) return null;
|
|
64
|
+
// A late refusal must not cool a new credential stored while its body was being read.
|
|
65
|
+
const current = getAccountCredentialWithStatus("anthropic", sent.accountId);
|
|
66
|
+
if (!current || current.paused || current.needsReauth || credentialGeneration(current.credential) !== sent.generation) return null;
|
|
67
|
+
}
|
|
68
|
+
const status = response.status === 429 ? 429 : 403;
|
|
69
|
+
if (!options.canRetry) {
|
|
70
|
+
recordAnthropicAccountRefusal(options.config, options.accountId, status,
|
|
71
|
+
response.headers.get("retry-after"), Date.now(), response.headers);
|
|
72
|
+
return null;
|
|
73
|
+
}
|
|
74
|
+
return rotateAnthropicAccountOnRefusal(options.config, options.accountId, status,
|
|
75
|
+
response.headers.get("retry-after"), options.sessionKey, Date.now(), response.headers, options.decision);
|
|
76
|
+
}
|