@bitkyc08/opencodex 2.45.0 → 2.46.0-preview.20260907

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.
Files changed (52) hide show
  1. package/gui/dist/assets/{index-J96sug5C.css → index-BFgUC17B.css} +1 -1
  2. package/gui/dist/assets/{index-CCfD72yq.js → index-NcAVXkST.js} +19 -19
  3. package/gui/dist/index.html +2 -2
  4. package/gui/dist/provider-icons/raycast.svg +3 -0
  5. package/package.json +1 -1
  6. package/src/adapters/anthropic.ts +8 -3
  7. package/src/adapters/openai-responses.ts +7 -0
  8. package/src/bridge.ts +27 -7
  9. package/src/claude/inbound.ts +23 -5
  10. package/src/claude/outbound.ts +87 -19
  11. package/src/cli/capabilities.ts +4 -1
  12. package/src/cli/dispatch.ts +1 -1
  13. package/src/cli/doctor.ts +2 -2
  14. package/src/cli/export-command.ts +22 -10
  15. package/src/cli/help.ts +1 -1
  16. package/src/cli/index.ts +34 -7
  17. package/src/cli/integrations.ts +34 -1
  18. package/src/cli/provider.ts +27 -15
  19. package/src/cli/registry.ts +2 -2
  20. package/src/cli/version-skew.ts +36 -3
  21. package/src/clients/aside-profiles.ts +8 -7
  22. package/src/clients/config-export/contracts.ts +2 -1
  23. package/src/clients/config-export/raycast.ts +106 -0
  24. package/src/clients/config-export.ts +36 -0
  25. package/src/clients/model-presentation.ts +61 -0
  26. package/src/codex/catalog/sync.ts +44 -2
  27. package/src/codex/convergence.ts +7 -0
  28. package/src/generated/compatibility-version.json +59 -43
  29. package/src/generated/model-metadata.ts +1 -0
  30. package/src/images/loop.ts +10 -2
  31. package/src/integrations/catalog-refresh.ts +1 -1
  32. package/src/integrations/merge.ts +158 -25
  33. package/src/integrations/raycast-detect.ts +111 -0
  34. package/src/integrations/registry.ts +18 -0
  35. package/src/integrations/state.ts +82 -13
  36. package/src/integrations/writer.ts +46 -31
  37. package/src/lib/bounded-body.ts +22 -7
  38. package/src/oauth/anthropic-routing.ts +59 -14
  39. package/src/oauth/health.ts +3 -0
  40. package/src/providers/quota.ts +145 -9
  41. package/src/providers/registry.ts +31 -0
  42. package/src/responses/parser.ts +16 -3
  43. package/src/responses/reasoning-envelope.ts +3 -2
  44. package/src/server/grok-responses-control-frame.ts +43 -0
  45. package/src/server/management/config-routes.ts +6 -2
  46. package/src/server/management/integration-routes.ts +29 -2
  47. package/src/server/management/model-routes.ts +9 -1
  48. package/src/server/request-decompress.ts +34 -8
  49. package/src/server/responses/agent-task-recovery-cache.ts +43 -14
  50. package/src/server/responses/agent-task-recovery.ts +28 -16
  51. package/src/server/responses/core.ts +39 -6
  52. package/src/web-search/loop.ts +10 -2
@@ -10,7 +10,7 @@
10
10
  },
11
11
  {
12
12
  "path": "package.json",
13
- "sha256": "3bf62e3b02229bf4f2c8652b3d780693c0c9c8498d7ff72180cce2cf795b186e"
13
+ "sha256": "9912d795da9a0f1f0f1374d817e51d5c2e8c7023abc87052e150e9d3ef463d91"
14
14
  },
15
15
  {
16
16
  "path": "scripts/model-metadata.source.json",
@@ -42,7 +42,7 @@
42
42
  },
43
43
  {
44
44
  "path": "src/adapters/anthropic.ts",
45
- "sha256": "dfeaa31b5cdcbffeeff6b68ef0ebee8048606aa3cbf33870117a5052eff6c038"
45
+ "sha256": "bc0da6835048a5946eae21e87d2afe62edec9b6a78e697e0aace10c1b826c43d"
46
46
  },
47
47
  {
48
48
  "path": "src/adapters/azure.ts",
@@ -366,7 +366,7 @@
366
366
  },
367
367
  {
368
368
  "path": "src/adapters/openai-responses.ts",
369
- "sha256": "1324c424d410df423092f5c5dfebced671ca7a3d65d85ad35d08bcb8b2e2cd24"
369
+ "sha256": "db01d0ade13c4e241e4818091884f689d6dd85ab5d7656832265d6f04097ab55"
370
370
  },
371
371
  {
372
372
  "path": "src/adapters/opencode-go.ts",
@@ -414,7 +414,7 @@
414
414
  },
415
415
  {
416
416
  "path": "src/bridge.ts",
417
- "sha256": "393602b2369ad8ba366a05b5900885e049d4162e38960bc7291db03ee643f3ab"
417
+ "sha256": "c583fe5a240bb4d1f732ae00752e2b14773a306487000f909caabeec09a9d889"
418
418
  },
419
419
  {
420
420
  "path": "src/chat/inbound.ts",
@@ -522,7 +522,7 @@
522
522
  },
523
523
  {
524
524
  "path": "src/claude/inbound.ts",
525
- "sha256": "122d14724bb106fe57ceea2fe29e47455b00628812b2c880bf79a538bbd4690c"
525
+ "sha256": "e0643ae16f2d7832fe72206e93da4435f3d81fa2dfad96284a45c99b7ecc7017"
526
526
  },
527
527
  {
528
528
  "path": "src/claude/model-info.ts",
@@ -530,7 +530,7 @@
530
530
  },
531
531
  {
532
532
  "path": "src/claude/outbound.ts",
533
- "sha256": "81e95583b79412ef5111d4f1eb1bef1e64c24a5b69e04011472c0552ee39b677"
533
+ "sha256": "964627d141b365cb0bba42a991cfd2c423420ec6df96ea2f3f8a99834ef4dbaf"
534
534
  },
535
535
  {
536
536
  "path": "src/cli.ts",
@@ -586,7 +586,7 @@
586
586
  },
587
587
  {
588
588
  "path": "src/cli/capabilities.ts",
589
- "sha256": "81726a7432f53219eb9789747966b2f6137592409a2d6dacf1ccb4bdfa49ca75"
589
+ "sha256": "96083709dc6a6af2db3245f798803ce8ded61db5a68c176294429d217b997921"
590
590
  },
591
591
  {
592
592
  "path": "src/cli/catalog-prewarm.ts",
@@ -638,11 +638,11 @@
638
638
  },
639
639
  {
640
640
  "path": "src/cli/dispatch.ts",
641
- "sha256": "3c001efbaeeb680ff4de97365bb7bb12a34adb1118dd7059f3147051b2b1ad1f"
641
+ "sha256": "29620e258d088486d5c1404b30cf7b6c46e9daa7a792a8896d18a2758e52cd44"
642
642
  },
643
643
  {
644
644
  "path": "src/cli/doctor.ts",
645
- "sha256": "0bee9780b50e737434dbb25028cab8c04f5b767c45915fe4b01a5aa0f5789a86"
645
+ "sha256": "172cd9206c049204f228daa10adea6d4e66001a363f6920b6c40a365767637cd"
646
646
  },
647
647
  {
648
648
  "path": "src/cli/effort.ts",
@@ -654,7 +654,7 @@
654
654
  },
655
655
  {
656
656
  "path": "src/cli/export-command.ts",
657
- "sha256": "083220ecfa3357e690abf6ad3024b621c40545ae2a642364e7b92b04763300ed"
657
+ "sha256": "0022d2900c3e6120070873a94d4ea794880b0a00d94e9072529e226936e59823"
658
658
  },
659
659
  {
660
660
  "path": "src/cli/gui-pair-client.ts",
@@ -666,11 +666,11 @@
666
666
  },
667
667
  {
668
668
  "path": "src/cli/help.ts",
669
- "sha256": "44f0999c368543270b6e01779912c5d8b8adda1f9bf52a0b4853d30951d83750"
669
+ "sha256": "fb600931833db20d6357e513e8ab4e52294e3c1d45b6ec5d39a48446acbcfc17"
670
670
  },
671
671
  {
672
672
  "path": "src/cli/index.ts",
673
- "sha256": "28f75e7e1b87e85cea387aad75c6f4cb39ff14547304cceedf2c6b13fa72a6e7"
673
+ "sha256": "5daf375e66c9911f9efda2e2799f5d1ec9a9d88af33290d434f3c0aa3c9901b4"
674
674
  },
675
675
  {
676
676
  "path": "src/cli/init.ts",
@@ -682,7 +682,7 @@
682
682
  },
683
683
  {
684
684
  "path": "src/cli/integrations.ts",
685
- "sha256": "b9c85b2e6c5431b0598780920ea048ddb4d3d80ba003bcd2244cb5268b61656a"
685
+ "sha256": "7350ab5254374b03168c9fdfc474b602a4ef8da5971ebd85ba1f2a381a620dfe"
686
686
  },
687
687
  {
688
688
  "path": "src/cli/interactive-confirm.ts",
@@ -730,7 +730,7 @@
730
730
  },
731
731
  {
732
732
  "path": "src/cli/provider.ts",
733
- "sha256": "64db1a7f36f0d977991a8abbbdcd27c07356b8a304fc4958029187f45245d5fe"
733
+ "sha256": "fd8e3e0d4cb1314df08a1011bc34535b477006a993937b6b72f4fbf4156cea8a"
734
734
  },
735
735
  {
736
736
  "path": "src/cli/ready.ts",
@@ -738,7 +738,7 @@
738
738
  },
739
739
  {
740
740
  "path": "src/cli/registry.ts",
741
- "sha256": "26ec4ad29287e14508c36756122241429eee7d77f9df64acb0129549e89489e7"
741
+ "sha256": "a415ed583ceab021ccfa6eeee1cf254533431559aa0c718dc2f0d24e9dd07589"
742
742
  },
743
743
  {
744
744
  "path": "src/cli/root.ts",
@@ -802,7 +802,7 @@
802
802
  },
803
803
  {
804
804
  "path": "src/cli/version-skew.ts",
805
- "sha256": "5c9cde92783d944bf918600dbb1892bf9ef1102c535a3cbcf25cfde1e5420db8"
805
+ "sha256": "eecb3bf064360b06810b6281e6c514a8e95d971a31d9022c66ef4b9720457c05"
806
806
  },
807
807
  {
808
808
  "path": "src/client/connect.ts",
@@ -842,11 +842,11 @@
842
842
  },
843
843
  {
844
844
  "path": "src/clients/aside-profiles.ts",
845
- "sha256": "210335d697e3c9b8f61e653fda0b3a188233a60b36c19be681ada6d3bc31db79"
845
+ "sha256": "a02f8f25268d3a2eddebd9cc70a9a021b225e0369b00efa073adb08b8090276b"
846
846
  },
847
847
  {
848
848
  "path": "src/clients/config-export.ts",
849
- "sha256": "7c86c748532abde556055ba6b6ae4e689eaa0fff4cf62bc30ed399a8eb5fb2c8"
849
+ "sha256": "674ecdb74d92da0ebf5f48f9106020e06f2e3f63eec14af783c9135dfb37e732"
850
850
  },
851
851
  {
852
852
  "path": "src/clients/config-export/constants.ts",
@@ -854,7 +854,7 @@
854
854
  },
855
855
  {
856
856
  "path": "src/clients/config-export/contracts.ts",
857
- "sha256": "2aebfb368220ca9ff1c7b6c24baedaa11db1ac562d565125f677a89a10c9e3ea"
857
+ "sha256": "0e4e71d6b4d38e3a16a81b77935403cff7dcb26027aee746bc3c138a1e6395eb"
858
858
  },
859
859
  {
860
860
  "path": "src/clients/config-export/dsh.ts",
@@ -876,10 +876,18 @@
876
876
  "path": "src/clients/config-export/omp.ts",
877
877
  "sha256": "a770072e1818ea4b6fe2358f65c83700a6a17506c14994242427d41046515bbb"
878
878
  },
879
+ {
880
+ "path": "src/clients/config-export/raycast.ts",
881
+ "sha256": "624cf5c2acf9e5ad9fb2da54e8a3b80a6ec3c2dfc0303c1724497788d51d222c"
882
+ },
879
883
  {
880
884
  "path": "src/clients/config-export/zcode.ts",
881
885
  "sha256": "c3547c36a1e04b66d88add299d5c8465599ea3b6fd6266b25cd3c00afb52d757"
882
886
  },
887
+ {
888
+ "path": "src/clients/model-presentation.ts",
889
+ "sha256": "ff7f94612422eb62be505324c4f3c40174e3de28c8644202094972addb5628cb"
890
+ },
883
891
  {
884
892
  "path": "src/codex/account-id.ts",
885
893
  "sha256": "beaa9a9fe8a2588cd1f98fc4c4d16b39b3f224dcced1b5e1c3dd10eb8fe5c8a3"
@@ -1014,7 +1022,7 @@
1014
1022
  },
1015
1023
  {
1016
1024
  "path": "src/codex/catalog/sync.ts",
1017
- "sha256": "e775d8715527a47175f45006f21cec4c03e71ab6224acc7841f62a236f7cdf4a"
1025
+ "sha256": "f436b8cd48e820a45bca2cbf550e0fab33aa22daeac6db318d88ebe3aacace3b"
1018
1026
  },
1019
1027
  {
1020
1028
  "path": "src/codex/cli-install-provenance.ts",
@@ -1030,7 +1038,7 @@
1030
1038
  },
1031
1039
  {
1032
1040
  "path": "src/codex/convergence.ts",
1033
- "sha256": "3f882ddb48a4d5a57e2697c0c116ebafc4b2ed309a899497471301a2fd378c0a"
1041
+ "sha256": "64323a64fc2ee76e6daf424f6b8632eadcf0097a4ebea9b3e3e206e9511901dc"
1034
1042
  },
1035
1043
  {
1036
1044
  "path": "src/codex/coordinator-doctor.ts",
@@ -1506,7 +1514,7 @@
1506
1514
  },
1507
1515
  {
1508
1516
  "path": "src/generated/model-metadata.ts",
1509
- "sha256": "95341e411a2f27613a48f9f8e6302b6f2aec4eb6a72f965b7332d6f4396b0d83"
1517
+ "sha256": "1d0baea1ede9e15a7d859109233ea2020eff5ac9770e97958d252e4a2d003e9e"
1510
1518
  },
1511
1519
  {
1512
1520
  "path": "src/github/star-state.ts",
@@ -1558,7 +1566,7 @@
1558
1566
  },
1559
1567
  {
1560
1568
  "path": "src/images/loop.ts",
1561
- "sha256": "3c66e28fdb84237da3fc365c6ae341a73e573d8e9d952ac12cb28bad7c13327d"
1569
+ "sha256": "0d87006d01ca9ea7b606051a1d5c878c936a38acd1b078bb6c011c9aa93b7b83"
1562
1570
  },
1563
1571
  {
1564
1572
  "path": "src/images/plan.ts",
@@ -1598,7 +1606,7 @@
1598
1606
  },
1599
1607
  {
1600
1608
  "path": "src/integrations/catalog-refresh.ts",
1601
- "sha256": "b18d9b2f907d4d9d4f5e01a5d375a03147a56ca193fbf5eea639b3ef1b5f3468"
1609
+ "sha256": "bca9d33e50690ebb9f26e17857856fe40acf5b27fd2909b64d864f190bb472ed"
1602
1610
  },
1603
1611
  {
1604
1612
  "path": "src/integrations/config-io.ts",
@@ -1622,7 +1630,7 @@
1622
1630
  },
1623
1631
  {
1624
1632
  "path": "src/integrations/merge.ts",
1625
- "sha256": "517941efb221549a2b61f4ff3621d24de6eda8769a994049a7d9d83a77943944"
1633
+ "sha256": "3509078efcd76dbaae5bd74ed73317f69ada32a8cfd23633898946802a039564"
1626
1634
  },
1627
1635
  {
1628
1636
  "path": "src/integrations/mutation-flight.ts",
@@ -1648,9 +1656,13 @@
1648
1656
  "path": "src/integrations/ownership.ts",
1649
1657
  "sha256": "974d740dc6deab816726879b1d814a660769dce39b2d4856e41c4d0de05ca150"
1650
1658
  },
1659
+ {
1660
+ "path": "src/integrations/raycast-detect.ts",
1661
+ "sha256": "29f4702d711a7547c1d71eb60e8b80c9674ca023bf5a26513c4021cc0d626b2c"
1662
+ },
1651
1663
  {
1652
1664
  "path": "src/integrations/registry.ts",
1653
- "sha256": "09446d4c94c342d66133a23da03f64fad5bc60c33b97c764ae8e29d81d307534"
1665
+ "sha256": "b668ce30d0496bef3f4be15c35be830de3e3c21f7c440c0a6910bbefab0f06f5"
1654
1666
  },
1655
1667
  {
1656
1668
  "path": "src/integrations/serialize.ts",
@@ -1658,7 +1670,7 @@
1658
1670
  },
1659
1671
  {
1660
1672
  "path": "src/integrations/state.ts",
1661
- "sha256": "7068adf0930d95aa29f3e375e76b0b6c1cd1c5fc2296962b30557f5319e1f68d"
1673
+ "sha256": "9e3de25e823089c1affe558f5be31d7b91e14fe02ea2675638c80b1ff9f2e920"
1662
1674
  },
1663
1675
  {
1664
1676
  "path": "src/integrations/store.ts",
@@ -1670,7 +1682,7 @@
1670
1682
  },
1671
1683
  {
1672
1684
  "path": "src/integrations/writer.ts",
1673
- "sha256": "521e04d5ecd8f519f1e3fda0114fdab1361fe2b738267f0c4b852632ddb597a9"
1685
+ "sha256": "46c56802eee2da6cd55751cbfb358768871cdd3db697263dd3925434c44f90a7"
1674
1686
  },
1675
1687
  {
1676
1688
  "path": "src/lab/artifacts/sanitize.ts",
@@ -2174,7 +2186,7 @@
2174
2186
  },
2175
2187
  {
2176
2188
  "path": "src/lib/bounded-body.ts",
2177
- "sha256": "bc51e0746b3ae2b8c0f93c359d7d8bb3867a38fb09a95f8fd40a6f1d39bacbcb"
2189
+ "sha256": "8a271580ec37de198755769bcbda25a9beecf7ece6ba36bb08266fc78b950a04"
2178
2190
  },
2179
2191
  {
2180
2192
  "path": "src/lib/bounded-subprocess.ts",
@@ -2478,7 +2490,7 @@
2478
2490
  },
2479
2491
  {
2480
2492
  "path": "src/oauth/anthropic-routing.ts",
2481
- "sha256": "fbf61f5b118f1d90a1a59dbe8970d4f635dde2960e386d2237666a1aa907fe87"
2493
+ "sha256": "0cae1a382e319349d92d589be77528a123aca5d65274732eb3f4de2cd4b2c076"
2482
2494
  },
2483
2495
  {
2484
2496
  "path": "src/oauth/anthropic.ts",
@@ -2518,7 +2530,7 @@
2518
2530
  },
2519
2531
  {
2520
2532
  "path": "src/oauth/health.ts",
2521
- "sha256": "3d4b0bc190466042b70eb0021cdf2723ce604d96fbe57427b1add61b329b914f"
2533
+ "sha256": "2af2cae20f57f47f44f8ba8c3b692ca384fb9776f2ea53d69b1929bcdc04db59"
2522
2534
  },
2523
2535
  {
2524
2536
  "path": "src/oauth/index.ts",
@@ -2778,11 +2790,11 @@
2778
2790
  },
2779
2791
  {
2780
2792
  "path": "src/providers/quota.ts",
2781
- "sha256": "d7e0f344e54af750358f2a92b3af9f278e8d88e11c5d695311e7527c55c239af"
2793
+ "sha256": "0cc9b4797d1379a2f359f3798da1488fd9ef2f0100ce31cf51b421c20619d9d7"
2782
2794
  },
2783
2795
  {
2784
2796
  "path": "src/providers/registry.ts",
2785
- "sha256": "fdc9f2e605de777863f7372eedd8b401db80c4a6bb0032feddfa8a7f66c3cad7"
2797
+ "sha256": "495de5c9ae08da4e3a545924b913ee3cfac71196b776aa45c795a5f743319a66"
2786
2798
  },
2787
2799
  {
2788
2800
  "path": "src/providers/request-pacing.ts",
@@ -2898,7 +2910,7 @@
2898
2910
  },
2899
2911
  {
2900
2912
  "path": "src/responses/parser.ts",
2901
- "sha256": "1c263b6b86a839bf8e75d00f6ab5210c96d47a8750e81e03a7fff4e7a346d66b"
2913
+ "sha256": "f6d3f2447c94680c246ed7dcda910eb69e5cd5eb8ba27f90e3af723d6eebae4b"
2902
2914
  },
2903
2915
  {
2904
2916
  "path": "src/responses/provider-continuation.ts",
@@ -2910,7 +2922,7 @@
2910
2922
  },
2911
2923
  {
2912
2924
  "path": "src/responses/reasoning-envelope.ts",
2913
- "sha256": "1f06da19739c3fd946e54b81e7c5d87d1677d4335fec35b1e7264662a5725d10"
2925
+ "sha256": "c8092798153ba1a5708c401c63116e58959502b6b7afc93cb8cf3027c4e971a3"
2914
2926
  },
2915
2927
  {
2916
2928
  "path": "src/responses/reasoning-replay-cache.ts",
@@ -3108,6 +3120,10 @@
3108
3120
  "path": "src/server/github-copilot-responses-repair.ts",
3109
3121
  "sha256": "7cff66ca0b8e1b4ff64e29c3b353d876d053a9612a0c357ea5af9603c8400629"
3110
3122
  },
3123
+ {
3124
+ "path": "src/server/grok-responses-control-frame.ts",
3125
+ "sha256": "65c809ec37742b3a35d7d18a6f98cf802f414a8485755f1140673fc8a9e21f7a"
3126
+ },
3111
3127
  {
3112
3128
  "path": "src/server/grok-responses-snapshot-repair.ts",
3113
3129
  "sha256": "d5a84a2fb2b8707a30fb5cde48342968af2a0898a5e92cd843faa53e0cb73ef6"
@@ -3194,7 +3210,7 @@
3194
3210
  },
3195
3211
  {
3196
3212
  "path": "src/server/management/config-routes.ts",
3197
- "sha256": "ea2861451b393aeb027c525585b46a0e2e0e071c09894106c4fc1e1560e88231"
3213
+ "sha256": "de6d1222039b7689be80f120846f0da0c8de27a8f872f472fad59180f14408b6"
3198
3214
  },
3199
3215
  {
3200
3216
  "path": "src/server/management/context.ts",
@@ -3206,7 +3222,7 @@
3206
3222
  },
3207
3223
  {
3208
3224
  "path": "src/server/management/integration-routes.ts",
3209
- "sha256": "9455ba483dfc83bf3fc7b359a5543875f98c0440b433dfabd3539e2cbe77f433"
3225
+ "sha256": "206da4ffcb06f4ad5b4fa47d767d03d148b513b3ec0c6ff4fe2fcbb3b6ea6971"
3210
3226
  },
3211
3227
  {
3212
3228
  "path": "src/server/management/lab-automation-routes.ts",
@@ -3222,7 +3238,7 @@
3222
3238
  },
3223
3239
  {
3224
3240
  "path": "src/server/management/model-routes.ts",
3225
- "sha256": "1a74253441dffbc9464c0b7aade7b81dadaba301ea9c7361c4d2b6cdf5907afd"
3241
+ "sha256": "7f31dd0c54945e4f69dbae871d7feb9f0165846993421d7d071b5d4b78c29f9b"
3226
3242
  },
3227
3243
  {
3228
3244
  "path": "src/server/management/model-rows.ts",
@@ -3350,7 +3366,7 @@
3350
3366
  },
3351
3367
  {
3352
3368
  "path": "src/server/request-decompress.ts",
3353
- "sha256": "239636dd0e8bbac8b9351643bd6f6223509085f17c88d547c52e3d438de503bd"
3369
+ "sha256": "6068cb4b96389407e2c2c8cc37e769d8164541e8455663b0d256b593736cb204"
3354
3370
  },
3355
3371
  {
3356
3372
  "path": "src/server/request-log-conversation.ts",
@@ -3422,11 +3438,11 @@
3422
3438
  },
3423
3439
  {
3424
3440
  "path": "src/server/responses/agent-task-recovery-cache.ts",
3425
- "sha256": "355cd82be77db1d588f433c7337d04961f58f45048b98832b0db0b1d917d48b3"
3441
+ "sha256": "73944718c95c4f770c5dadfb7f99066ad5993c9bc9edd107c8e3e3d103dded1d"
3426
3442
  },
3427
3443
  {
3428
3444
  "path": "src/server/responses/agent-task-recovery.ts",
3429
- "sha256": "6041f65c4af7b9e42d041153da1a55a90cd4c7f62a6a48de1c5856761525b2e9"
3445
+ "sha256": "281ea00aa47e4a980a5bdf80856b1a69788db4ade9ffbcd7485daf211759cc27"
3430
3446
  },
3431
3447
  {
3432
3448
  "path": "src/server/responses/codex-auth-error.ts",
@@ -3478,7 +3494,7 @@
3478
3494
  },
3479
3495
  {
3480
3496
  "path": "src/server/responses/core.ts",
3481
- "sha256": "820be393b77d862ce99ae06ccb2b4f6ae5afb086f617e06f0453fed04941ceae"
3497
+ "sha256": "65b01832c0164ea6cb4391f5015b977b985966718f0267cbb5c6bd90196c63e6"
3482
3498
  },
3483
3499
  {
3484
3500
  "path": "src/server/responses/empty-completion-guard.ts",
@@ -3890,7 +3906,7 @@
3890
3906
  },
3891
3907
  {
3892
3908
  "path": "src/web-search/loop.ts",
3893
- "sha256": "8de82a4764dee1208a9cb01bf3e1ee962f4f1d8b19ac6513d14a15b4faefb532"
3909
+ "sha256": "74b3aaa6dacbf7a1e6f3c6bfa858c44bf98c2da84b9c36d60058777af2302bbb"
3894
3910
  },
3895
3911
  {
3896
3912
  "path": "src/web-search/parse.ts",
@@ -31,6 +31,7 @@ const PROVIDER_ALIASES: Record<string, string> = {
31
31
  "moonshot": "moonshot",
32
32
  "zhipu-bigmodel": "zai",
33
33
  "zhipu-bigmodel-coding": "zai",
34
+ "zhipu-bigmodel-responses": "zai",
34
35
  "minimax": "minimax",
35
36
  "minimax-cn": "minimax"
36
37
  } as const;
@@ -263,8 +263,16 @@ export interface ImageBridgeDeps {
263
263
  * Optional 429 failover for the routed (non-xAI) model. Return a rebuilt adapter for the
264
264
  * rotated credential, or null when the pool is exhausted. Async hooks support OAuth refresh;
265
265
  * existing synchronous key-pool hooks remain valid.
266
+ *
267
+ * `responseHeaders` carries the whole refusal, not just Retry-After, because an Anthropic
268
+ * 429 states the window's reset epoch even when it omits Retry-After -- and a rotation that
269
+ * cannot see it cools the drained account for the short default instead of until the window
270
+ * actually reopens. Optional so existing callers keep compiling.
266
271
  */
267
- on429?: (retryAfterHeader: string | null) => ProviderAdapter | null | Promise<ProviderAdapter | null>;
272
+ on429?: (
273
+ retryAfterHeader: string | null,
274
+ responseHeaders?: Headers,
275
+ ) => ProviderAdapter | null | Promise<ProviderAdapter | null>;
268
276
  /** Opt-in same-target 429 policy (key-auth providers). When present, 429 replays on the SAME key before on429 rotation. */
269
277
  retryOn429Policy?: Required<RateLimitRetryPolicy> | null;
270
278
  /** Called when the bridged Responses stream completes (parity with runTurn / routed paths). */
@@ -579,7 +587,7 @@ export async function runWithImageBridge(deps: ImageBridgeDeps): Promise<Respons
579
587
  }
580
588
  // 429 key-failover parity with web-search / normal routed path.
581
589
  while (prepared.response.status === 429 && deps.on429) {
582
- const rotated = await deps.on429(prepared.response.headers.get("retry-after"));
590
+ const rotated = await deps.on429(prepared.response.headers.get("retry-after"), prepared.response.headers);
583
591
  if (!rotated) break;
584
592
  try { void prepared.response.body?.cancel().catch(() => {}); } catch { /* already closed */ }
585
593
  adapter = rotated;
@@ -10,7 +10,7 @@ import {
10
10
  /** Refresh only previously connected clients; a refused file never blocks its peers. */
11
11
  export async function refreshOwnedCatalogIntegrations(
12
12
  input: Omit<OwnedIntegrationRefreshInput, "clientId">,
13
- clientIds: readonly IntegrationClientId[] = ["pi", "aside"],
13
+ clientIds: readonly IntegrationClientId[] = ["pi", "aside", "raycast"],
14
14
  ): Promise<OwnedIntegrationRefreshOutcome[]> {
15
15
  let models: Promise<readonly ExportModel[]> | undefined;
16
16
  const loadModels = () => models ??= Promise.resolve().then(() =>
@@ -20,18 +20,103 @@ function clone<T>(value: T): T {
20
20
  return value === undefined ? value : (JSON.parse(JSON.stringify(value)) as T);
21
21
  }
22
22
 
23
- /** Write `value` at `path`, creating intermediate objects. Returns a new document. */
23
+ /**
24
+ * `[field=value]` addresses the ONE element of a sequence whose `field` equals
25
+ * `value`. Raycast keeps its providers as a YAML list, so the element is the
26
+ * smallest thing we can own there; an index would move under us the moment
27
+ * the user reordered their own entries. Any other segment is a plain key.
28
+ */
29
+ const ARRAY_SELECTOR = /^\[([A-Za-z_][A-Za-z0-9_]*)=([^\]]+)\]$/u;
30
+
31
+ export type PathSegment =
32
+ | { kind: "key"; key: string }
33
+ | { kind: "select"; field: string; value: string };
34
+
35
+ export function parseSegment(raw: string): PathSegment {
36
+ const match = ARRAY_SELECTOR.exec(raw);
37
+ if (!match) return { kind: "key", key: raw };
38
+ return { kind: "select", field: match[1]!, value: match[2]! };
39
+ }
40
+
41
+ /**
42
+ * Thrown when a selector matches more than one element. Picking either one
43
+ * would silently rewrite an entry the user may have written; the writer maps
44
+ * this to an `unsafe` refusal instead.
45
+ */
46
+ export class AmbiguousSelectorError extends Error {
47
+ constructor(field: string, value: string) {
48
+ super(`more than one entry has ${field}=${value}`);
49
+ this.name = "AmbiguousSelectorError";
50
+ }
51
+ }
52
+
53
+ /** The index of the element a selector names, -1 when none matches. */
54
+ export function selectIndex(items: readonly unknown[], field: string, value: string): number {
55
+ const matches: number[] = [];
56
+ items.forEach((item, index) => {
57
+ if (isPlainRecord(item) && item[field] === value) matches.push(index);
58
+ });
59
+ if (matches.length > 1) throw new AmbiguousSelectorError(field, value);
60
+ return matches[0] ?? -1;
61
+ }
62
+
63
+ function assertNever(segment: never): never {
64
+ throw new Error(`unknown path segment ${JSON.stringify(segment)}`);
65
+ }
66
+
67
+ /**
68
+ * Write `value` at `path`, creating intermediate containers. Returns a new document.
69
+ *
70
+ * A `key` segment descends through a record, creating `{}` where the slot is
71
+ * absent or holds something else. A `select` segment descends through an
72
+ * array the same way, creating `[]`; a missing element is pushed, a matching
73
+ * one is replaced in place so the user's ordering survives.
74
+ */
24
75
  export function setPath(doc: unknown, path: readonly string[], value: unknown): unknown {
25
76
  if (path.length === 0) throw new Error("setPath needs a non-empty path");
26
- const root: Record<string, unknown> = isPlainRecord(doc) ? clone(doc) : {};
27
- let cursor = root;
28
- for (const key of path.slice(0, -1)) {
29
- const next = cursor[key];
30
- if (!isPlainRecord(next)) cursor[key] = {};
31
- cursor = cursor[key] as Record<string, unknown>;
77
+ /*
78
+ * `parent[slot]` is the position the segment just consumed addresses. The
79
+ * root sits in a one-key holder so the first segment needs no special case:
80
+ * a non-record document is replaced by `{}` exactly as before.
81
+ */
82
+ const holder: Record<string, unknown> = { root: isPlainRecord(doc) ? clone(doc) : {} };
83
+ let parent: Record<string, unknown> | unknown[] = holder;
84
+ let slot: string | number = "root";
85
+ const read = (): unknown => (Array.isArray(parent) ? parent[slot as number] : parent[slot as string]);
86
+ const write = (next: unknown): void => {
87
+ if (Array.isArray(parent)) parent[slot as number] = next;
88
+ else parent[slot as string] = next;
89
+ };
90
+ for (const raw of path) {
91
+ const segment = parseSegment(raw);
92
+ switch (segment.kind) {
93
+ case "key": {
94
+ if (!isPlainRecord(read())) write({});
95
+ parent = read() as Record<string, unknown>;
96
+ slot = segment.key;
97
+ break;
98
+ }
99
+ case "select": {
100
+ if (!Array.isArray(read())) write([]);
101
+ const items = read() as unknown[];
102
+ const found = selectIndex(items, segment.field, segment.value);
103
+ parent = items;
104
+ if (found >= 0) {
105
+ slot = found;
106
+ } else {
107
+ // Seed the element so the selector stays true for whatever a deeper
108
+ // segment writes into it; a last-position select replaces it whole.
109
+ slot = items.length;
110
+ items.push({ [segment.field]: segment.value });
111
+ }
112
+ break;
113
+ }
114
+ default:
115
+ return assertNever(segment);
116
+ }
32
117
  }
33
- cursor[path[path.length - 1]!] = clone(value);
34
- return root;
118
+ write(clone(value));
119
+ return holder.root;
35
120
  }
36
121
 
37
122
  /**
@@ -54,27 +139,53 @@ export function deletePath(
54
139
  ): { doc: unknown; removed: boolean } {
55
140
  if (!isPlainRecord(doc) || path.length === 0) return { doc, removed: false };
56
141
  const root = clone(doc) as Record<string, unknown>;
57
- const chain: Record<string, unknown>[] = [root];
58
- let cursor: Record<string, unknown> = root;
59
- for (const key of path.slice(0, -1)) {
60
- const next = cursor[key];
61
- if (!isPlainRecord(next)) return { doc: root, removed: false };
62
- cursor = next;
63
- chain.push(cursor);
142
+ // `chain[i]` is the container segment `i` is resolved against; `slots[i]` is
143
+ // the key or index it resolved to, so the prune walk can delete by position.
144
+ const chain: (Record<string, unknown> | unknown[])[] = [root];
145
+ const slots: (string | number)[] = [];
146
+ for (let depth = 0; depth < path.length; depth += 1) {
147
+ const container = chain[depth]!;
148
+ const segment = parseSegment(path[depth]!);
149
+ switch (segment.kind) {
150
+ case "key": {
151
+ if (Array.isArray(container) || !(segment.key in container)) return { doc: root, removed: false };
152
+ slots.push(segment.key);
153
+ chain.push(container[segment.key] as Record<string, unknown> | unknown[]);
154
+ break;
155
+ }
156
+ case "select": {
157
+ if (!Array.isArray(container)) return { doc: root, removed: false };
158
+ const found = selectIndex(container, segment.field, segment.value);
159
+ if (found < 0) return { doc: root, removed: false };
160
+ slots.push(found);
161
+ chain.push(container[found] as Record<string, unknown> | unknown[]);
162
+ break;
163
+ }
164
+ default:
165
+ return assertNever(segment);
166
+ }
167
+ // Only the leaf may be a scalar; walking into one means the path is absent.
168
+ if (depth < path.length - 1) {
169
+ const next = chain[depth + 1];
170
+ if (!isPlainRecord(next) && !Array.isArray(next)) return { doc: root, removed: false };
171
+ }
64
172
  }
65
- const leaf = path[path.length - 1]!;
66
- if (!(leaf in cursor)) return { doc: root, removed: false };
67
- delete cursor[leaf];
173
+ const remove = (container: Record<string, unknown> | unknown[], slot: string | number): void => {
174
+ if (Array.isArray(container)) container.splice(slot as number, 1);
175
+ else delete container[slot as string];
176
+ };
177
+ remove(chain[path.length - 1]!, slots[path.length - 1]!);
68
178
  /*
69
179
  * Walk back up, pruning only containers this deletion emptied AND that we
70
180
  * created. The root is never pruned.
71
181
  */
72
- for (let index = chain.length - 1; index >= 1; index -= 1) {
182
+ for (let index = path.length - 1; index >= 1; index -= 1) {
73
183
  const container = chain[index]!;
74
- if (Object.keys(container).length > 0) break;
184
+ const empty = Array.isArray(container) ? container.length === 0 : Object.keys(container).length === 0;
185
+ if (!empty) break;
75
186
  const containerPath = path.slice(0, index).join("\u0000");
76
187
  if (!createdContainers.has(containerPath)) break;
77
- delete chain[index - 1]![path[index - 1]!];
188
+ remove(chain[index - 1]!, slots[index - 1]!);
78
189
  }
79
190
  return { doc: root, removed: true };
80
191
  }
@@ -121,9 +232,31 @@ export function createdContainerPaths(
121
232
  for (const fragment of contribution.fragments) {
122
233
  let cursor: unknown = doc;
123
234
  for (let depth = 0; depth < fragment.path.length - 1; depth += 1) {
124
- const key = fragment.path[depth]!;
125
- const next = isPlainRecord(cursor) ? cursor[key] : undefined;
126
- if (!isPlainRecord(next)) {
235
+ const segment = parseSegment(fragment.path[depth]!);
236
+ let next: unknown;
237
+ switch (segment.kind) {
238
+ case "key": {
239
+ /*
240
+ * The container this key must hold is whatever the NEXT segment
241
+ * descends into: an array when that is a selector, a record
242
+ * otherwise. Either one is ours to create when absent.
243
+ */
244
+ const nextSegment = parseSegment(fragment.path[depth + 1]!);
245
+ next = isPlainRecord(cursor) ? cursor[segment.key] : undefined;
246
+ if (nextSegment.kind === "select" ? !Array.isArray(next) : !isPlainRecord(next)) next = undefined;
247
+ break;
248
+ }
249
+ case "select": {
250
+ // A selector that matches nothing means setPath will push the element.
251
+ next = Array.isArray(cursor)
252
+ ? cursor[selectIndex(cursor, segment.field, segment.value)]
253
+ : undefined;
254
+ break;
255
+ }
256
+ default:
257
+ return assertNever(segment);
258
+ }
259
+ if (next === undefined) {
127
260
  created.add(fragment.path.slice(0, depth + 1).join("\u0000"));
128
261
  cursor = undefined;
129
262
  continue;