@bitkyc08/opencodex 2.49.0 → 2.50.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/AGENTS_INSTALL.md +9 -1
- package/README.md +3 -0
- package/gui/dist/assets/index-C39tnjXO.js +115 -0
- package/gui/dist/index.html +1 -1
- package/package.json +1 -1
- package/src/claude/inbound.ts +17 -5
- package/src/cli/account-api.ts +18 -3
- package/src/cli/account-auth.ts +8 -1
- package/src/cli/account-extended.ts +2 -1
- package/src/cli/account.ts +1 -0
- package/src/cli/capabilities.ts +15 -1
- package/src/cli/index.ts +5 -1
- package/src/cli/models-runtime.ts +8 -3
- package/src/cli/observe.ts +13 -3
- package/src/clients/config-export/zcode.ts +24 -0
- package/src/codex/account-runtime-state.ts +6 -1
- package/src/codex/account-store.ts +72 -9
- package/src/codex/account-usability.ts +3 -2
- package/src/codex/auth-api.ts +107 -23
- package/src/codex/auth-context.ts +21 -0
- package/src/codex/catalog/parsing.ts +23 -0
- package/src/codex/catalog/provider-fetch.ts +71 -2
- package/src/codex/catalog/sync.ts +14 -0
- package/src/codex/inject.ts +3 -2
- package/src/codex/quota-auto-refresh.ts +6 -1
- package/src/codex/quota.ts +54 -8
- package/src/combos/index.ts +2 -0
- package/src/combos/resolve.ts +52 -0
- package/src/config.ts +58 -0
- package/src/generated/compatibility-version.json +72 -60
- package/src/lib/errors.ts +8 -0
- package/src/lib/privacy.ts +25 -0
- package/src/oauth/health.ts +47 -12
- package/src/oauth/index.ts +46 -8
- package/src/oauth/token-guardian.ts +32 -6
- package/src/providers/google-ai-studio-model-discovery.ts +74 -0
- package/src/providers/opencode-zen-rate-limit.ts +75 -0
- package/src/providers/quota.ts +15 -0
- package/src/providers/registry.ts +1 -1
- package/src/server/auth-cors.ts +6 -0
- package/src/server/chat-completions.ts +4 -4
- package/src/server/chat-native.ts +10 -1
- package/src/server/claude-messages.ts +5 -5
- package/src/server/images.ts +2 -2
- package/src/server/index.ts +25 -2
- package/src/server/management/logs-usage-routes.ts +4 -1
- package/src/server/management/model-rows.ts +16 -1
- package/src/server/management/oauth-account-routes.ts +6 -2
- package/src/server/management/provider-routes.ts +9 -2
- package/src/server/management/request-history-routes.ts +4 -2
- package/src/server/management/route-registry.ts +5 -4
- package/src/server/management/shared.ts +66 -3
- package/src/server/management-api.ts +1 -1
- package/src/server/request-decompress.ts +91 -3
- package/src/server/request-log.ts +10 -0
- package/src/server/responses/codex-ws-wire.ts +1 -1
- package/src/server/responses/compact.ts +8 -2
- package/src/server/responses/context-overflow.ts +11 -0
- package/src/server/responses/core.ts +144 -38
- package/src/server/responses/policy-fallback.ts +6 -2
- package/src/server/search.ts +2 -2
- package/src/service.ts +92 -7
- package/src/types/accounts.ts +18 -0
- package/src/types/config.ts +36 -0
- package/src/types/provider.ts +56 -0
- package/src/types.ts +4 -0
- package/src/web-search/ollama-executor.ts +127 -0
- package/src/web-search/passthrough-bridge.ts +761 -0
- package/gui/dist/assets/index-BtyONQrZ.js +0 -115
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
},
|
|
11
11
|
{
|
|
12
12
|
"path": "package.json",
|
|
13
|
-
"sha256": "
|
|
13
|
+
"sha256": "821357da544264585c2f62c54fb60fadea04818ae5581041014af343736ecf8d"
|
|
14
14
|
},
|
|
15
15
|
{
|
|
16
16
|
"path": "scripts/model-metadata.source.json",
|
|
@@ -558,7 +558,7 @@
|
|
|
558
558
|
},
|
|
559
559
|
{
|
|
560
560
|
"path": "src/claude/inbound.ts",
|
|
561
|
-
"sha256": "
|
|
561
|
+
"sha256": "c1717eeef2fc0a20b36e5b12f5d32146067e43bd8795b3f78fe9e27985dd4617"
|
|
562
562
|
},
|
|
563
563
|
{
|
|
564
564
|
"path": "src/claude/model-info.ts",
|
|
@@ -578,11 +578,11 @@
|
|
|
578
578
|
},
|
|
579
579
|
{
|
|
580
580
|
"path": "src/cli/account-api.ts",
|
|
581
|
-
"sha256": "
|
|
581
|
+
"sha256": "7d3cbd39c4044cebe42153c9a094e401ec20937b49aa801e335f9de0597b25a3"
|
|
582
582
|
},
|
|
583
583
|
{
|
|
584
584
|
"path": "src/cli/account-auth.ts",
|
|
585
|
-
"sha256": "
|
|
585
|
+
"sha256": "0c001076b7f2fbb9617e14536c826fb0505a4bfc8eaf84ddd24b68edf70901a9"
|
|
586
586
|
},
|
|
587
587
|
{
|
|
588
588
|
"path": "src/cli/account-catalog-refresh.ts",
|
|
@@ -590,7 +590,7 @@
|
|
|
590
590
|
},
|
|
591
591
|
{
|
|
592
592
|
"path": "src/cli/account-extended.ts",
|
|
593
|
-
"sha256": "
|
|
593
|
+
"sha256": "c28be00939345f17711f12b04963dece4503be36a3020cd65fb021d4b41e98ab"
|
|
594
594
|
},
|
|
595
595
|
{
|
|
596
596
|
"path": "src/cli/account-main.ts",
|
|
@@ -598,7 +598,7 @@
|
|
|
598
598
|
},
|
|
599
599
|
{
|
|
600
600
|
"path": "src/cli/account.ts",
|
|
601
|
-
"sha256": "
|
|
601
|
+
"sha256": "03c2bce1515d967c1e72b487aba92fd927504412843f2f9cc33d5710d1168200"
|
|
602
602
|
},
|
|
603
603
|
{
|
|
604
604
|
"path": "src/cli/agent-driven.ts",
|
|
@@ -622,7 +622,7 @@
|
|
|
622
622
|
},
|
|
623
623
|
{
|
|
624
624
|
"path": "src/cli/capabilities.ts",
|
|
625
|
-
"sha256": "
|
|
625
|
+
"sha256": "c0fbd9cf3e0556ceee7d83298d3fd3873251a7079935f654154f9093f8cb487a"
|
|
626
626
|
},
|
|
627
627
|
{
|
|
628
628
|
"path": "src/cli/catalog-prewarm.ts",
|
|
@@ -706,7 +706,7 @@
|
|
|
706
706
|
},
|
|
707
707
|
{
|
|
708
708
|
"path": "src/cli/index.ts",
|
|
709
|
-
"sha256": "
|
|
709
|
+
"sha256": "4a74056517ee2b901e599f098d1e5a0109c81cf4d28dfb0284abd807a7e3c601"
|
|
710
710
|
},
|
|
711
711
|
{
|
|
712
712
|
"path": "src/cli/init.ts",
|
|
@@ -746,7 +746,7 @@
|
|
|
746
746
|
},
|
|
747
747
|
{
|
|
748
748
|
"path": "src/cli/models-runtime.ts",
|
|
749
|
-
"sha256": "
|
|
749
|
+
"sha256": "ec3a814a6ce176bf347c3d6ef869418bf04e9b450a54c932e2f94e0d573c4ffb"
|
|
750
750
|
},
|
|
751
751
|
{
|
|
752
752
|
"path": "src/cli/models.ts",
|
|
@@ -754,7 +754,7 @@
|
|
|
754
754
|
},
|
|
755
755
|
{
|
|
756
756
|
"path": "src/cli/observe.ts",
|
|
757
|
-
"sha256": "
|
|
757
|
+
"sha256": "7db16ad49b1992c5cfe8101438fefd007c87a9c4e9f99c31a4b860d8fa829875"
|
|
758
758
|
},
|
|
759
759
|
{
|
|
760
760
|
"path": "src/cli/opencode.ts",
|
|
@@ -918,7 +918,7 @@
|
|
|
918
918
|
},
|
|
919
919
|
{
|
|
920
920
|
"path": "src/clients/config-export/zcode.ts",
|
|
921
|
-
"sha256": "
|
|
921
|
+
"sha256": "256aa37df1a6a9b2e9cc7f3d619c0a444574e1c32689f16d8ae0cc962f6b4485"
|
|
922
922
|
},
|
|
923
923
|
{
|
|
924
924
|
"path": "src/clients/model-presentation.ts",
|
|
@@ -954,15 +954,15 @@
|
|
|
954
954
|
},
|
|
955
955
|
{
|
|
956
956
|
"path": "src/codex/account-runtime-state.ts",
|
|
957
|
-
"sha256": "
|
|
957
|
+
"sha256": "a230c3d8df1c937f1a91f7e88435e26c558c9d03f6d2737219d8ff6d3e2105e5"
|
|
958
958
|
},
|
|
959
959
|
{
|
|
960
960
|
"path": "src/codex/account-store.ts",
|
|
961
|
-
"sha256": "
|
|
961
|
+
"sha256": "e94ecaf554d2e16f2f65bfc0a3f6d0e2f63f6c8b51b87fe3803a76b64c2140f3"
|
|
962
962
|
},
|
|
963
963
|
{
|
|
964
964
|
"path": "src/codex/account-usability.ts",
|
|
965
|
-
"sha256": "
|
|
965
|
+
"sha256": "cb009ba8871728f785646f130e3b85ddef5492a64e8c464416713b4b9eb926d0"
|
|
966
966
|
},
|
|
967
967
|
{
|
|
968
968
|
"path": "src/codex/admission.ts",
|
|
@@ -982,7 +982,7 @@
|
|
|
982
982
|
},
|
|
983
983
|
{
|
|
984
984
|
"path": "src/codex/auth-api.ts",
|
|
985
|
-
"sha256": "
|
|
985
|
+
"sha256": "f78ee1f7404f8bd7c9b2a46d4db074f9120520f5eeac9c8486a4998de6e4b311"
|
|
986
986
|
},
|
|
987
987
|
{
|
|
988
988
|
"path": "src/codex/auth-collision.ts",
|
|
@@ -990,7 +990,7 @@
|
|
|
990
990
|
},
|
|
991
991
|
{
|
|
992
992
|
"path": "src/codex/auth-context.ts",
|
|
993
|
-
"sha256": "
|
|
993
|
+
"sha256": "5d70de8e56d850f66f0659dea39d6d7591a1ec83f1b4c9337edca3b49e11146d"
|
|
994
994
|
},
|
|
995
995
|
{
|
|
996
996
|
"path": "src/codex/autostart-health.ts",
|
|
@@ -1046,11 +1046,11 @@
|
|
|
1046
1046
|
},
|
|
1047
1047
|
{
|
|
1048
1048
|
"path": "src/codex/catalog/parsing.ts",
|
|
1049
|
-
"sha256": "
|
|
1049
|
+
"sha256": "f06a627708ab952feeaf550370b464449f7fbdaa61859a00c2260651b20a8c31"
|
|
1050
1050
|
},
|
|
1051
1051
|
{
|
|
1052
1052
|
"path": "src/codex/catalog/provider-fetch.ts",
|
|
1053
|
-
"sha256": "
|
|
1053
|
+
"sha256": "fb45f0fe5cf54f0e6c877d5c3b83aa90f1619f0f00f597f1cae72832a849cf2e"
|
|
1054
1054
|
},
|
|
1055
1055
|
{
|
|
1056
1056
|
"path": "src/codex/catalog/reserve.ts",
|
|
@@ -1058,7 +1058,7 @@
|
|
|
1058
1058
|
},
|
|
1059
1059
|
{
|
|
1060
1060
|
"path": "src/codex/catalog/sync.ts",
|
|
1061
|
-
"sha256": "
|
|
1061
|
+
"sha256": "37a66df518be45ae7b629fe0077d272eed33256543a7a4c9aedac797676ffbc3"
|
|
1062
1062
|
},
|
|
1063
1063
|
{
|
|
1064
1064
|
"path": "src/codex/cli-install-provenance.ts",
|
|
@@ -1154,7 +1154,7 @@
|
|
|
1154
1154
|
},
|
|
1155
1155
|
{
|
|
1156
1156
|
"path": "src/codex/inject.ts",
|
|
1157
|
-
"sha256": "
|
|
1157
|
+
"sha256": "f84dc232b611e1af2aff52aeb27047d91f7eb86373b7580d75b79a94f30c81cc"
|
|
1158
1158
|
},
|
|
1159
1159
|
{
|
|
1160
1160
|
"path": "src/codex/injected-marker.ts",
|
|
@@ -1378,7 +1378,7 @@
|
|
|
1378
1378
|
},
|
|
1379
1379
|
{
|
|
1380
1380
|
"path": "src/codex/quota-auto-refresh.ts",
|
|
1381
|
-
"sha256": "
|
|
1381
|
+
"sha256": "bcc3d61092f99bfd14d51c1ec6b310a5ea7334417be94dd205c74bec7ec23da4"
|
|
1382
1382
|
},
|
|
1383
1383
|
{
|
|
1384
1384
|
"path": "src/codex/quota-recovery-timing.ts",
|
|
@@ -1398,7 +1398,7 @@
|
|
|
1398
1398
|
},
|
|
1399
1399
|
{
|
|
1400
1400
|
"path": "src/codex/quota.ts",
|
|
1401
|
-
"sha256": "
|
|
1401
|
+
"sha256": "9dfe98b8992781c38260fdfa538e57c6c263e509856cb3f51a436950ec320f02"
|
|
1402
1402
|
},
|
|
1403
1403
|
{
|
|
1404
1404
|
"path": "src/codex/refresh.ts",
|
|
@@ -1478,7 +1478,7 @@
|
|
|
1478
1478
|
},
|
|
1479
1479
|
{
|
|
1480
1480
|
"path": "src/combos/index.ts",
|
|
1481
|
-
"sha256": "
|
|
1481
|
+
"sha256": "94317ebd008b0c7e42077ae3786e121b100ef31b718b1c2d8049e8d19ed9e8e8"
|
|
1482
1482
|
},
|
|
1483
1483
|
{
|
|
1484
1484
|
"path": "src/combos/request.ts",
|
|
@@ -1490,7 +1490,7 @@
|
|
|
1490
1490
|
},
|
|
1491
1491
|
{
|
|
1492
1492
|
"path": "src/combos/resolve.ts",
|
|
1493
|
-
"sha256": "
|
|
1493
|
+
"sha256": "43d75a46bf2dd2a366ea2cca28ada43dc38379f302be4f56f5e666e8a8b4ec72"
|
|
1494
1494
|
},
|
|
1495
1495
|
{
|
|
1496
1496
|
"path": "src/combos/types.ts",
|
|
@@ -1510,7 +1510,7 @@
|
|
|
1510
1510
|
},
|
|
1511
1511
|
{
|
|
1512
1512
|
"path": "src/config.ts",
|
|
1513
|
-
"sha256": "
|
|
1513
|
+
"sha256": "faa09b5e5f510a73d5b0c0f905134de44e744d55ed97c13e3115a5ec55679e02"
|
|
1514
1514
|
},
|
|
1515
1515
|
{
|
|
1516
1516
|
"path": "src/config/atomic-write.ts",
|
|
@@ -2282,7 +2282,7 @@
|
|
|
2282
2282
|
},
|
|
2283
2283
|
{
|
|
2284
2284
|
"path": "src/lib/errors.ts",
|
|
2285
|
-
"sha256": "
|
|
2285
|
+
"sha256": "747ec5cd5605aba968da6429eadb68460b3cb97ceebe8a788b5d07f84664d87a"
|
|
2286
2286
|
},
|
|
2287
2287
|
{
|
|
2288
2288
|
"path": "src/lib/eventstream-decoder.ts",
|
|
@@ -2366,7 +2366,7 @@
|
|
|
2366
2366
|
},
|
|
2367
2367
|
{
|
|
2368
2368
|
"path": "src/lib/privacy.ts",
|
|
2369
|
-
"sha256": "
|
|
2369
|
+
"sha256": "532cf8f9e52e8b25e3c4063ce1fe6d77c1e501900428d51a2e491f48fc8d0034"
|
|
2370
2370
|
},
|
|
2371
2371
|
{
|
|
2372
2372
|
"path": "src/lib/process-control.ts",
|
|
@@ -2578,11 +2578,11 @@
|
|
|
2578
2578
|
},
|
|
2579
2579
|
{
|
|
2580
2580
|
"path": "src/oauth/health.ts",
|
|
2581
|
-
"sha256": "
|
|
2581
|
+
"sha256": "2546c5f311b8b43a0fb45c4fe355c0dc6623d7f89b5cfab0382149c1fb61b5cb"
|
|
2582
2582
|
},
|
|
2583
2583
|
{
|
|
2584
2584
|
"path": "src/oauth/index.ts",
|
|
2585
|
-
"sha256": "
|
|
2585
|
+
"sha256": "89faf1fbeef4a91739c2d81668c539ea00385d7b098ccac5aef7e1e6ac9ea3f4"
|
|
2586
2586
|
},
|
|
2587
2587
|
{
|
|
2588
2588
|
"path": "src/oauth/key-providers.ts",
|
|
@@ -2642,7 +2642,7 @@
|
|
|
2642
2642
|
},
|
|
2643
2643
|
{
|
|
2644
2644
|
"path": "src/oauth/token-guardian.ts",
|
|
2645
|
-
"sha256": "
|
|
2645
|
+
"sha256": "903e5dad757dbe5bd13354e4d7b19a79faa9203095498e6c660b0436ea873271"
|
|
2646
2646
|
},
|
|
2647
2647
|
{
|
|
2648
2648
|
"path": "src/oauth/types.ts",
|
|
@@ -2736,6 +2736,10 @@
|
|
|
2736
2736
|
"path": "src/providers/github-copilot-transport.ts",
|
|
2737
2737
|
"sha256": "78c11415c8423eaf89a5a4e5fe8cf46b55a6c13078cd035ba9662369f895954c"
|
|
2738
2738
|
},
|
|
2739
|
+
{
|
|
2740
|
+
"path": "src/providers/google-ai-studio-model-discovery.ts",
|
|
2741
|
+
"sha256": "4ee16b9712a50ec868010265f234b4d23c5082d761aeddfc051273b4eb5d3ce1"
|
|
2742
|
+
},
|
|
2739
2743
|
{
|
|
2740
2744
|
"path": "src/providers/google-vertex-location.ts",
|
|
2741
2745
|
"sha256": "0e30a1dfd3dafa742f710c38d1c856d3f016c9b9ac15e748edb6965b93c59a5e"
|
|
@@ -2826,7 +2830,7 @@
|
|
|
2826
2830
|
},
|
|
2827
2831
|
{
|
|
2828
2832
|
"path": "src/providers/opencode-zen-rate-limit.ts",
|
|
2829
|
-
"sha256": "
|
|
2833
|
+
"sha256": "053dcfa187711c4574cfecaca05f3ee13806305a5b3ac245a74be1114c5d4507"
|
|
2830
2834
|
},
|
|
2831
2835
|
{
|
|
2832
2836
|
"path": "src/providers/openrouter-routing.ts",
|
|
@@ -2858,11 +2862,11 @@
|
|
|
2858
2862
|
},
|
|
2859
2863
|
{
|
|
2860
2864
|
"path": "src/providers/quota.ts",
|
|
2861
|
-
"sha256": "
|
|
2865
|
+
"sha256": "ecef71a71c015454d7f312f05554189de44f52186b4e44ffaf54f6819383a2ff"
|
|
2862
2866
|
},
|
|
2863
2867
|
{
|
|
2864
2868
|
"path": "src/providers/registry.ts",
|
|
2865
|
-
"sha256": "
|
|
2869
|
+
"sha256": "beb685c12ef97b4d5cb103110dcffe9c40d4cc04d5d63a1cb1be81116598818d"
|
|
2866
2870
|
},
|
|
2867
2871
|
{
|
|
2868
2872
|
"path": "src/providers/request-pacing.ts",
|
|
@@ -3142,7 +3146,7 @@
|
|
|
3142
3146
|
},
|
|
3143
3147
|
{
|
|
3144
3148
|
"path": "src/server/auth-cors.ts",
|
|
3145
|
-
"sha256": "
|
|
3149
|
+
"sha256": "e4d01945c08bfe8ddf055218d91a17bdd26d61fa9eaaf54ad2b6f00193c82a2b"
|
|
3146
3150
|
},
|
|
3147
3151
|
{
|
|
3148
3152
|
"path": "src/server/background-lifecycle.ts",
|
|
@@ -3154,7 +3158,7 @@
|
|
|
3154
3158
|
},
|
|
3155
3159
|
{
|
|
3156
3160
|
"path": "src/server/chat-completions.ts",
|
|
3157
|
-
"sha256": "
|
|
3161
|
+
"sha256": "178f4c7a88380167d9196a562841696fc5a320127821e51220ee497e7104e8ed"
|
|
3158
3162
|
},
|
|
3159
3163
|
{
|
|
3160
3164
|
"path": "src/server/chat-native-sse.ts",
|
|
@@ -3162,11 +3166,11 @@
|
|
|
3162
3166
|
},
|
|
3163
3167
|
{
|
|
3164
3168
|
"path": "src/server/chat-native.ts",
|
|
3165
|
-
"sha256": "
|
|
3169
|
+
"sha256": "f4a31b1f294c93b4ec52b5a7c0c3bd9e0bfe06bfe0ca03e0c6ae531712eda44e"
|
|
3166
3170
|
},
|
|
3167
3171
|
{
|
|
3168
3172
|
"path": "src/server/claude-messages.ts",
|
|
3169
|
-
"sha256": "
|
|
3173
|
+
"sha256": "af6dd0884240cd8edf329634a03afb267f4d7107d3428a1f05700f37f0491062"
|
|
3170
3174
|
},
|
|
3171
3175
|
{
|
|
3172
3176
|
"path": "src/server/direct-local-http.ts",
|
|
@@ -3210,11 +3214,11 @@
|
|
|
3210
3214
|
},
|
|
3211
3215
|
{
|
|
3212
3216
|
"path": "src/server/images.ts",
|
|
3213
|
-
"sha256": "
|
|
3217
|
+
"sha256": "da1cf0777f53d56c74d2d3e9586ed2e4f2acda609b7c3544990a9595b84ecacd"
|
|
3214
3218
|
},
|
|
3215
3219
|
{
|
|
3216
3220
|
"path": "src/server/index.ts",
|
|
3217
|
-
"sha256": "
|
|
3221
|
+
"sha256": "485181354cfaef0e86d2f28b2587458732898202180fc59b3fc1f3b58ac07554"
|
|
3218
3222
|
},
|
|
3219
3223
|
{
|
|
3220
3224
|
"path": "src/server/lifecycle.ts",
|
|
@@ -3234,7 +3238,7 @@
|
|
|
3234
3238
|
},
|
|
3235
3239
|
{
|
|
3236
3240
|
"path": "src/server/management-api.ts",
|
|
3237
|
-
"sha256": "
|
|
3241
|
+
"sha256": "d09313a12780ebaf2f23fa9c7a8b3dba3b3725bd5aba4971970860afb8fbbe21"
|
|
3238
3242
|
},
|
|
3239
3243
|
{
|
|
3240
3244
|
"path": "src/server/management-auth.ts",
|
|
@@ -3302,7 +3306,7 @@
|
|
|
3302
3306
|
},
|
|
3303
3307
|
{
|
|
3304
3308
|
"path": "src/server/management/logs-usage-routes.ts",
|
|
3305
|
-
"sha256": "
|
|
3309
|
+
"sha256": "ea333850428a1d55170bd10edbeda850ade63071ba90956402917a2cd8eb48bb"
|
|
3306
3310
|
},
|
|
3307
3311
|
{
|
|
3308
3312
|
"path": "src/server/management/model-routes.ts",
|
|
@@ -3310,7 +3314,7 @@
|
|
|
3310
3314
|
},
|
|
3311
3315
|
{
|
|
3312
3316
|
"path": "src/server/management/model-rows.ts",
|
|
3313
|
-
"sha256": "
|
|
3317
|
+
"sha256": "e4b54304d4488673b56b109b9ce7e09a6e9893801288c750f1efcc9b30f5c24f"
|
|
3314
3318
|
},
|
|
3315
3319
|
{
|
|
3316
3320
|
"path": "src/server/management/native-integration-routes.ts",
|
|
@@ -3318,7 +3322,7 @@
|
|
|
3318
3322
|
},
|
|
3319
3323
|
{
|
|
3320
3324
|
"path": "src/server/management/oauth-account-routes.ts",
|
|
3321
|
-
"sha256": "
|
|
3325
|
+
"sha256": "2e35a9bda8cdb6807f6a83d55ec701602c1482469ef86c6b709e9c4cf9bb65a2"
|
|
3322
3326
|
},
|
|
3323
3327
|
{
|
|
3324
3328
|
"path": "src/server/management/provider-capability-config.ts",
|
|
@@ -3326,7 +3330,7 @@
|
|
|
3326
3330
|
},
|
|
3327
3331
|
{
|
|
3328
3332
|
"path": "src/server/management/provider-routes.ts",
|
|
3329
|
-
"sha256": "
|
|
3333
|
+
"sha256": "8fee28f9ffab897af5352b1bcd4325d20f958aacc149ef6c47146c1a471dcbab"
|
|
3330
3334
|
},
|
|
3331
3335
|
{
|
|
3332
3336
|
"path": "src/server/management/quota-reset-routes.ts",
|
|
@@ -3334,11 +3338,11 @@
|
|
|
3334
3338
|
},
|
|
3335
3339
|
{
|
|
3336
3340
|
"path": "src/server/management/request-history-routes.ts",
|
|
3337
|
-
"sha256": "
|
|
3341
|
+
"sha256": "ad08207130fb23c0dfa30600bbfdd603c6b3a60d017a5b5cb8981dbfc77fd1af"
|
|
3338
3342
|
},
|
|
3339
3343
|
{
|
|
3340
3344
|
"path": "src/server/management/route-registry.ts",
|
|
3341
|
-
"sha256": "
|
|
3345
|
+
"sha256": "c45a547d396e70fa633831eb111ffb53140cea3a508e33219a647e93d1c99729"
|
|
3342
3346
|
},
|
|
3343
3347
|
{
|
|
3344
3348
|
"path": "src/server/management/routing-analytics-routes.ts",
|
|
@@ -3358,7 +3362,7 @@
|
|
|
3358
3362
|
},
|
|
3359
3363
|
{
|
|
3360
3364
|
"path": "src/server/management/shared.ts",
|
|
3361
|
-
"sha256": "
|
|
3365
|
+
"sha256": "0111e4205d35487c8f5ec18245cfc682bb9a0fe7f925ef7b462c6a142d82e52e"
|
|
3362
3366
|
},
|
|
3363
3367
|
{
|
|
3364
3368
|
"path": "src/server/management/sidebar-routes.ts",
|
|
@@ -3434,7 +3438,7 @@
|
|
|
3434
3438
|
},
|
|
3435
3439
|
{
|
|
3436
3440
|
"path": "src/server/request-decompress.ts",
|
|
3437
|
-
"sha256": "
|
|
3441
|
+
"sha256": "a631097fb0e50b92436e4117f6012aab020e35e31fcbe9fb744740d6a88fa6d2"
|
|
3438
3442
|
},
|
|
3439
3443
|
{
|
|
3440
3444
|
"path": "src/server/request-log-conversation.ts",
|
|
@@ -3446,7 +3450,7 @@
|
|
|
3446
3450
|
},
|
|
3447
3451
|
{
|
|
3448
3452
|
"path": "src/server/request-log.ts",
|
|
3449
|
-
"sha256": "
|
|
3453
|
+
"sha256": "544bf0412e35f14b0135db94c50f23fb46af5dbcbaa3ab5b98104609488c563d"
|
|
3450
3454
|
},
|
|
3451
3455
|
{
|
|
3452
3456
|
"path": "src/server/responses-custom-tool-repair.ts",
|
|
@@ -3542,7 +3546,7 @@
|
|
|
3542
3546
|
},
|
|
3543
3547
|
{
|
|
3544
3548
|
"path": "src/server/responses/codex-ws-wire.ts",
|
|
3545
|
-
"sha256": "
|
|
3549
|
+
"sha256": "cc67da58a6537d57735eff313fa2d0895e442cbff9d0d978ce38bd19c806c716"
|
|
3546
3550
|
},
|
|
3547
3551
|
{
|
|
3548
3552
|
"path": "src/server/responses/collaboration.ts",
|
|
@@ -3558,15 +3562,15 @@
|
|
|
3558
3562
|
},
|
|
3559
3563
|
{
|
|
3560
3564
|
"path": "src/server/responses/compact.ts",
|
|
3561
|
-
"sha256": "
|
|
3565
|
+
"sha256": "a3a401be4dc856910c883c7779d60fd76796288203c0ac46dd788a7755355c4b"
|
|
3562
3566
|
},
|
|
3563
3567
|
{
|
|
3564
3568
|
"path": "src/server/responses/context-overflow.ts",
|
|
3565
|
-
"sha256": "
|
|
3569
|
+
"sha256": "b04ec1c780f61c90b3e5cd38ee0497eb87090a83c84f245ac1bb54542088b775"
|
|
3566
3570
|
},
|
|
3567
3571
|
{
|
|
3568
3572
|
"path": "src/server/responses/core.ts",
|
|
3569
|
-
"sha256": "
|
|
3573
|
+
"sha256": "6144aded39c1fc073cac4ef670ec13f6077cfe60dbf6a9f22c90035546f28e46"
|
|
3570
3574
|
},
|
|
3571
3575
|
{
|
|
3572
3576
|
"path": "src/server/responses/empty-completion-guard.ts",
|
|
@@ -3598,7 +3602,7 @@
|
|
|
3598
3602
|
},
|
|
3599
3603
|
{
|
|
3600
3604
|
"path": "src/server/responses/policy-fallback.ts",
|
|
3601
|
-
"sha256": "
|
|
3605
|
+
"sha256": "ed880014626eed864489e29d03db4d1ffd7b6bb1f52a14613ac74b952f72571a"
|
|
3602
3606
|
},
|
|
3603
3607
|
{
|
|
3604
3608
|
"path": "src/server/responses/responses-field-backfill.ts",
|
|
@@ -3622,7 +3626,7 @@
|
|
|
3622
3626
|
},
|
|
3623
3627
|
{
|
|
3624
3628
|
"path": "src/server/search.ts",
|
|
3625
|
-
"sha256": "
|
|
3629
|
+
"sha256": "baac289b631692dbd829a50af80831d1d113d14d29f0961c1c4bb20e4f38f3d0"
|
|
3626
3630
|
},
|
|
3627
3631
|
{
|
|
3628
3632
|
"path": "src/server/sse-frame-buffer.ts",
|
|
@@ -3678,7 +3682,7 @@
|
|
|
3678
3682
|
},
|
|
3679
3683
|
{
|
|
3680
3684
|
"path": "src/service.ts",
|
|
3681
|
-
"sha256": "
|
|
3685
|
+
"sha256": "d90f9c15b37fa3f626f1c880a6785eeac76d4397cf4cd347c8262ea616979cd6"
|
|
3682
3686
|
},
|
|
3683
3687
|
{
|
|
3684
3688
|
"path": "src/sidecar/auth.ts",
|
|
@@ -3762,19 +3766,19 @@
|
|
|
3762
3766
|
},
|
|
3763
3767
|
{
|
|
3764
3768
|
"path": "src/types.ts",
|
|
3765
|
-
"sha256": "
|
|
3769
|
+
"sha256": "4a8c13fbedde0ec6b3e0e1fab7980f561c7b710cfbd4e96c026b94cbe5530d6f"
|
|
3766
3770
|
},
|
|
3767
3771
|
{
|
|
3768
3772
|
"path": "src/types/accounts.ts",
|
|
3769
|
-
"sha256": "
|
|
3773
|
+
"sha256": "16d3698f4dfcbbd87b5fc8656f1624d54cb88133e73dd1df99c43db01338dff3"
|
|
3770
3774
|
},
|
|
3771
3775
|
{
|
|
3772
3776
|
"path": "src/types/config.ts",
|
|
3773
|
-
"sha256": "
|
|
3777
|
+
"sha256": "39f899873043dab5819b4b4386551b13dd0ed7115ead693b85cad8e2abd38122"
|
|
3774
3778
|
},
|
|
3775
3779
|
{
|
|
3776
3780
|
"path": "src/types/provider.ts",
|
|
3777
|
-
"sha256": "
|
|
3781
|
+
"sha256": "b97e8bd5f3f82dae9cb246cc71772f61a6c5eb9644f2204da16e25ce7b0c19fb"
|
|
3778
3782
|
},
|
|
3779
3783
|
{
|
|
3780
3784
|
"path": "src/types/request.ts",
|
|
@@ -3984,10 +3988,18 @@
|
|
|
3984
3988
|
"path": "src/web-search/loop.ts",
|
|
3985
3989
|
"sha256": "0cf6ba9bb8c26d6e6c4763e348464754539532acb7c3ec0ceee993c859d2bea6"
|
|
3986
3990
|
},
|
|
3991
|
+
{
|
|
3992
|
+
"path": "src/web-search/ollama-executor.ts",
|
|
3993
|
+
"sha256": "d092ffeb34e29264da3c4c70561f4910bb895c4250df8d92cde2284fbdc2d649"
|
|
3994
|
+
},
|
|
3987
3995
|
{
|
|
3988
3996
|
"path": "src/web-search/parse.ts",
|
|
3989
3997
|
"sha256": "d2511ca70abfdee209323c577c26c987aff791a1bf54d6615fe35916f4c44eca"
|
|
3990
3998
|
},
|
|
3999
|
+
{
|
|
4000
|
+
"path": "src/web-search/passthrough-bridge.ts",
|
|
4001
|
+
"sha256": "3863f9d7b942aef4cf3cee7d81377121ac00bb9f68953f64ada524f32bf1ca0d"
|
|
4002
|
+
},
|
|
3991
4003
|
{
|
|
3992
4004
|
"path": "src/web-search/progress-stream.ts",
|
|
3993
4005
|
"sha256": "0b743935e725b7bdfaf285ba973bb3fcc0faaca6225c8ba3113ce504af328126"
|
package/src/lib/errors.ts
CHANGED
|
@@ -209,6 +209,14 @@ export function classifyError(status: number, type: string, message: string): Oc
|
|
|
209
209
|
if (type === "input_admission_refused") {
|
|
210
210
|
return { message, type: "invalid_request_error", code: "input_admission_refused" };
|
|
211
211
|
}
|
|
212
|
+
// A LOCAL inbound admission refusal (#3573) keeps its own code for the same reason as the
|
|
213
|
+
// preflight refusal above. #4112 gave the UPSTREAM 413 on this surface
|
|
214
|
+
// `context_length_exceeded`; without a distinct code here a client cannot tell a body the
|
|
215
|
+
// proxy never read from a turn the provider itself rejected, and only one of the two is
|
|
216
|
+
// fixed by raising `maxInboundBodyBytes`.
|
|
217
|
+
if (type === "inbound_body_too_large") {
|
|
218
|
+
return { message, type: "invalid_request_error", code: "inbound_body_too_large" };
|
|
219
|
+
}
|
|
212
220
|
if (
|
|
213
221
|
text.includes("context_length_exceeded") ||
|
|
214
222
|
text.includes("context window") ||
|
package/src/lib/privacy.ts
CHANGED
|
@@ -10,6 +10,31 @@ export function maskEmail(value: string | null | undefined): string | null {
|
|
|
10
10
|
return `${local[0]}***${local[local.length - 1]}@${domain}`;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
+
/**
|
|
14
|
+
* Whether stored account emails are masked in management and CLI projections (#3859).
|
|
15
|
+
*
|
|
16
|
+
* Fail closed on every ambiguity: a missing config, a missing `privacy` block, and a missing or
|
|
17
|
+
* malformed `maskEmails` all mask. Only the literal boolean `false` unmasks, so a hand-edited
|
|
18
|
+
* `"false"` string or a typo cannot silently disclose an address. Callers read this once at the
|
|
19
|
+
* request boundary and pass the answer down — the projection helpers take a boolean rather than
|
|
20
|
+
* a config so that `getLoginStatus` stays free of config I/O.
|
|
21
|
+
*/
|
|
22
|
+
export function emailMaskingEnabled(config: { privacy?: { maskEmails?: boolean } } | null | undefined): boolean {
|
|
23
|
+
return config?.privacy?.maskEmails !== false;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Project a stored account email for a surface outside the proxy (#3859).
|
|
28
|
+
*
|
|
29
|
+
* One redaction decision for every call site, rather than each one forking on the flag: an
|
|
30
|
+
* unmasked projection still normalises an empty or absent address to `null`, so a consumer's
|
|
31
|
+
* "is there an email" test cannot start answering differently just because masking is off.
|
|
32
|
+
*/
|
|
33
|
+
export function projectEmail(value: string | null | undefined, mask: boolean): string | null {
|
|
34
|
+
if (!mask) return value ? value : null;
|
|
35
|
+
return maskEmail(value);
|
|
36
|
+
}
|
|
37
|
+
|
|
13
38
|
export function maskAccountId(value: string | null | undefined): string | null {
|
|
14
39
|
if (!value) return null;
|
|
15
40
|
const id = value.trim();
|
package/src/oauth/health.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getCodexAccountHealthSnapshot, type CodexCooldownSource } from "../codex/routing";
|
|
2
2
|
import { getAnthropicAccountHealthSnapshot } from "./anthropic-routing";
|
|
3
3
|
import { isAccountNeedsReauth } from "../codex/account-runtime-state";
|
|
4
|
-
import { getCodexAccountCredential, listCodexAccountIds } from "../codex/account-store";
|
|
4
|
+
import { getCodexAccountCredential, listCodexAccountIds, readCodexAccountRecord } from "../codex/account-store";
|
|
5
5
|
import { MAIN_CODEX_ACCOUNT_ID } from "../codex/main-account";
|
|
6
6
|
import { readRuntimePort } from "../config/process-state";
|
|
7
7
|
import { LOCAL_MANAGEMENT_READ_PATHS } from "../lib/local-management-capability";
|
|
@@ -15,7 +15,7 @@ export type OAuthAccountHealth =
|
|
|
15
15
|
| { status: "healthy" }
|
|
16
16
|
| { status: "cooldown"; until: string; reason: "rate_limit" | "quota" }
|
|
17
17
|
| { status: "reauth_required"; reason: "unauthorized" | "forbidden" | "refresh_failed" }
|
|
18
|
-
| { status: "warning"; reason: "refresh_conflict" | "metadata_mismatch" | "stale_credentials" };
|
|
18
|
+
| { status: "warning"; reason: "refresh_conflict" | "metadata_mismatch" | "stale_credentials" | "validation_pending" };
|
|
19
19
|
|
|
20
20
|
export type OAuthHealthLabel =
|
|
21
21
|
| "Healthy"
|
|
@@ -24,7 +24,8 @@ export type OAuthHealthLabel =
|
|
|
24
24
|
| "Reauthentication required"
|
|
25
25
|
| "Refresh failed"
|
|
26
26
|
| "Metadata mismatch"
|
|
27
|
-
| "Credential conflict"
|
|
27
|
+
| "Credential conflict"
|
|
28
|
+
| "Validation pending";
|
|
28
29
|
|
|
29
30
|
/** Shared masked-id fallback when `maskAccountId` returns nullish. */
|
|
30
31
|
export const MASKED_ACCOUNT_FALLBACK = "account-…????";
|
|
@@ -88,6 +89,9 @@ export function projectOAuthAccountHealth(input: {
|
|
|
88
89
|
export const CODEX_REAUTH_ACTION = "reauthenticate via the dashboard Codex account pool";
|
|
89
90
|
|
|
90
91
|
function actionFor(provider: string, health: OAuthAccountHealth): string | undefined {
|
|
92
|
+
if (health.status === "warning" && health.reason === "validation_pending") {
|
|
93
|
+
return "wait for quota recovery, then click Refresh quotas in the dashboard Codex account pool to finish validation";
|
|
94
|
+
}
|
|
91
95
|
if (health.status === "reauth_required") {
|
|
92
96
|
if (provider === "codex") return CODEX_REAUTH_ACTION;
|
|
93
97
|
return `run \`ocx login ${provider}\``;
|
|
@@ -112,6 +116,8 @@ export function oauthHealthLabel(health: OAuthAccountHealth): OAuthHealthLabel {
|
|
|
112
116
|
return health.reason === "refresh_failed" ? "Refresh failed" : "Reauthentication required";
|
|
113
117
|
case "warning":
|
|
114
118
|
switch (health.reason) {
|
|
119
|
+
case "validation_pending":
|
|
120
|
+
return "Validation pending";
|
|
115
121
|
case "refresh_conflict":
|
|
116
122
|
return "Credential conflict";
|
|
117
123
|
case "metadata_mismatch":
|
|
@@ -198,11 +204,42 @@ export function projectCodexAccountHealth(input: {
|
|
|
198
204
|
needsReauth: boolean;
|
|
199
205
|
now?: number;
|
|
200
206
|
}): OAuthAccountHealth {
|
|
207
|
+
// One read serves every verdict below. Each lookup re-reads and re-hardens the whole store
|
|
208
|
+
// file, and the main account lives in the native Codex auth file rather than the pool store,
|
|
209
|
+
// so a lookup for it could only ever miss.
|
|
210
|
+
const stored = input.accountId !== MAIN_CODEX_ACCOUNT_ID ? readCodexAccountRecord(input.accountId) : null;
|
|
211
|
+
const record = stored?.deletedAt == null ? stored : null;
|
|
212
|
+
|
|
213
|
+
// A successful quota read is not evidence that model authorization recovered.
|
|
214
|
+
// Preserve this guidance until validation succeeds or reauthentication replaces it.
|
|
215
|
+
const validationAuthFailed = record !== null
|
|
216
|
+
&& record.codexValidationPending === true
|
|
217
|
+
&& record.lastCodexValidationStatus === "failed"
|
|
218
|
+
&& (record.lastCodexValidationError === "http_status:401" || record.lastCodexValidationError === "http_status:403");
|
|
219
|
+
|
|
220
|
+
// A persisted terminal verdict outranks the in-memory reauth flag rather than duplicating it:
|
|
221
|
+
// the flag lives in this process and a revoked grant does not. Without it, an account whose
|
|
222
|
+
// grant was revoked upstream keeps its login-time `lastCodexValidationStatus: "ok"` and every
|
|
223
|
+
// surface reports it healthy until someone tries to use it (#4120). Only a re-login clears the
|
|
224
|
+
// marker, so `reauth_required` is the accurate projection — and it is deliberately checked
|
|
225
|
+
// ahead of any cooldown, because telling an operator to wait out a rate limit on a credential
|
|
226
|
+
// that will never work again is a false promise.
|
|
227
|
+
const terminalGrantFailure = record !== null
|
|
228
|
+
&& record.lastCodexValidationTerminal === true
|
|
229
|
+
&& record.lastCodexValidationStatus === "failed";
|
|
230
|
+
|
|
231
|
+
const needsReauth = input.needsReauth || validationAuthFailed || terminalGrantFailure;
|
|
232
|
+
|
|
233
|
+
// Deferred validation is only worth reporting while the credential itself is still viable. A
|
|
234
|
+
// revoked grant needs a re-login, not a "Refresh quotas" click, so reauth is resolved first.
|
|
235
|
+
if (!needsReauth && record?.codexValidationPending) {
|
|
236
|
+
return { status: "warning", reason: "validation_pending" };
|
|
237
|
+
}
|
|
201
238
|
const now = input.now ?? Date.now();
|
|
202
239
|
const snap = getCodexAccountHealthSnapshot(input.accountId, now);
|
|
203
240
|
return projectOAuthAccountHealth({
|
|
204
|
-
needsReauth
|
|
205
|
-
reauthReason:
|
|
241
|
+
needsReauth,
|
|
242
|
+
reauthReason: needsReauth ? "refresh_failed" : undefined,
|
|
206
243
|
cooldownUntilMs: snap?.cooldownUntil,
|
|
207
244
|
cooldownReason: cooldownReasonFromSource(snap?.cooldownSource),
|
|
208
245
|
now,
|
|
@@ -272,13 +309,11 @@ function collectLocalCodexEntries(now: number): OAuthHealthEntry[] {
|
|
|
272
309
|
const hasPoolCredential = accountId !== MAIN_CODEX_ACCOUNT_ID && getCodexAccountCredential(accountId) !== null;
|
|
273
310
|
if (!hasPoolCredential && !needsReauth && !snap) continue;
|
|
274
311
|
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
now,
|
|
281
|
-
});
|
|
312
|
+
// Call the projector rather than inlining a second copy of it. This collector serves the CLI
|
|
313
|
+
// (`ocx status`, `ocx doctor`) while the dashboard DTO goes through projectCodexAccountHealth,
|
|
314
|
+
// and the duplicated body is exactly how the CLI would have kept reporting a revoked account
|
|
315
|
+
// as healthy after the dashboard stopped.
|
|
316
|
+
const health = projectCodexAccountHealth({ accountId, needsReauth, now });
|
|
282
317
|
pushEntry(entries, "codex", accountId, health);
|
|
283
318
|
}
|
|
284
319
|
return entries;
|