@bitkyc08/opencodex 2.37.0 → 2.38.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/ocx.mjs +69 -10
- package/gui/dist/assets/{index-CowztZdo.js → index-C14iCj_Q.js} +13 -13
- package/gui/dist/assets/index-D7PIz7_g.css +1 -0
- package/gui/dist/index.html +2 -2
- package/gui/dist/provider-icons/aside.svg +3 -0
- package/gui/dist/provider-icons/deepseek-harness.svg +3 -0
- package/gui/dist/provider-icons/oh-my-pi.svg +11 -0
- package/gui/dist/provider-icons/openclaw.svg +54 -0
- package/gui/dist/provider-icons/prime-agent.svg +21 -0
- package/gui/dist/provider-icons/zcode.svg +219 -0
- package/package.json +1 -1
- package/src/adapters/cursor/protobuf-request.ts +4 -1
- package/src/adapters/cursor/tool-definitions.ts +36 -4
- package/src/cli/capabilities.ts +14 -0
- package/src/cli/codex-cli-update.ts +96 -0
- package/src/cli/codex-shim-autorestore.ts +3 -0
- package/src/cli/export-command.ts +18 -17
- package/src/cli/help.ts +2 -2
- package/src/cli/index.ts +3 -2
- package/src/cli/launcher-context.ts +53 -2
- package/src/cli/opencode.ts +126 -33
- package/src/cli/registry.ts +16 -10
- package/src/cli/system-command.ts +6 -1
- package/src/clients/config-export.ts +293 -28
- package/src/codex/account-store.ts +10 -4
- package/src/codex/autostart-health.ts +3 -3
- package/src/codex/catalog/provider-fetch.ts +20 -1
- package/src/codex/catalog/sync.ts +4 -3
- package/src/codex/cli-install-provenance.ts +795 -0
- package/src/codex/convergence.ts +4 -3
- package/src/codex/credential-mutation-epoch.ts +11 -0
- package/src/codex/main-account.ts +2 -0
- package/src/codex/model-entitlements.ts +430 -27
- package/src/codex/native-profile-manager.ts +4 -0
- package/src/codex/reset-credit-operation-ledger.ts +1411 -0
- package/src/codex/reset-credit-recovery.ts +20 -2
- package/src/codex/shim.ts +204 -18
- package/src/codex/user-identity.ts +2 -1
- package/src/config/paths.ts +18 -3
- package/src/config.ts +23 -0
- package/src/generated/compatibility-version.json +81 -45
- package/src/integrations/registry.ts +112 -0
- package/src/integrations/state.ts +67 -5
- package/src/integrations/writer.ts +25 -9
- package/src/lib/bounded-subprocess.ts +36 -0
- package/src/lib/strict-semver.ts +47 -0
- package/src/lib/windows-elevation.ts +32 -1
- package/src/lib/windows-secret-acl.ts +47 -25
- package/src/lib/windows-service-mutation-lock.ts +133 -0
- package/src/lib/windows-user-principal.ts +15 -17
- package/src/responses/spill-store.ts +334 -29
- package/src/responses/state.ts +488 -7
- package/src/server/index.ts +4 -3
- package/src/server/lifecycle.ts +5 -1
- package/src/server/management/model-rows.ts +11 -2
- package/src/server/management/provider-routes.ts +4 -0
- package/src/server/management/system-restart.ts +5 -5
- package/src/server/management-api.ts +7 -2
- package/src/server/startup-action-control.ts +3 -2
- package/src/service.ts +594 -33
- package/src/sidecar/candidates.ts +1 -1
- package/src/update/codex-cli-update-launch-policy.d.mts +18 -0
- package/src/update/codex-cli-update-launch-policy.mjs +30 -0
- package/src/update/index.ts +3 -2
- package/src/update/job.ts +10 -11
- package/gui/dist/assets/index-jqE_VOKI.css +0 -1
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
},
|
|
11
11
|
{
|
|
12
12
|
"path": "package.json",
|
|
13
|
-
"sha256": "
|
|
13
|
+
"sha256": "2f4952bf558b8eb933baf016cdf0f17b492df49c6d28977dbc132511e0e87039"
|
|
14
14
|
},
|
|
15
15
|
{
|
|
16
16
|
"path": "scripts/model-metadata.source.json",
|
|
@@ -190,7 +190,7 @@
|
|
|
190
190
|
},
|
|
191
191
|
{
|
|
192
192
|
"path": "src/adapters/cursor/protobuf-request.ts",
|
|
193
|
-
"sha256": "
|
|
193
|
+
"sha256": "ce38936510a5999b47b207e540a434929b1fe18e4d255d9e25c788ec73846ab0"
|
|
194
194
|
},
|
|
195
195
|
{
|
|
196
196
|
"path": "src/adapters/cursor/request-builder.ts",
|
|
@@ -202,7 +202,7 @@
|
|
|
202
202
|
},
|
|
203
203
|
{
|
|
204
204
|
"path": "src/adapters/cursor/tool-definitions.ts",
|
|
205
|
-
"sha256": "
|
|
205
|
+
"sha256": "06c1230fa2417f2c2a2b595042ca6a272cef3a005ca8d44e3e734b4329cf4f42"
|
|
206
206
|
},
|
|
207
207
|
{
|
|
208
208
|
"path": "src/adapters/cursor/tool-result-normalize.ts",
|
|
@@ -502,7 +502,7 @@
|
|
|
502
502
|
},
|
|
503
503
|
{
|
|
504
504
|
"path": "src/cli/capabilities.ts",
|
|
505
|
-
"sha256": "
|
|
505
|
+
"sha256": "56e4e4a20bec90c6acadb60e479221e55ca0816e74df1f12a76a49acdbecd201"
|
|
506
506
|
},
|
|
507
507
|
{
|
|
508
508
|
"path": "src/cli/catalog-prewarm.ts",
|
|
@@ -520,13 +520,17 @@
|
|
|
520
520
|
"path": "src/cli/claude.ts",
|
|
521
521
|
"sha256": "c39d97f543ff6aa40ae70610e5446761232575c6ce334adec9f94a41658f992d"
|
|
522
522
|
},
|
|
523
|
+
{
|
|
524
|
+
"path": "src/cli/codex-cli-update.ts",
|
|
525
|
+
"sha256": "124ceb293db0bb6b011490f61303d8c001f54e9b7ff8afa809ab953decb870b6"
|
|
526
|
+
},
|
|
523
527
|
{
|
|
524
528
|
"path": "src/cli/codex-log-guard-doctor.ts",
|
|
525
529
|
"sha256": "e6a62a5c9cbf65e900ec3523598a225f5ccd1238abb8da9cae232d60da6fdabf"
|
|
526
530
|
},
|
|
527
531
|
{
|
|
528
532
|
"path": "src/cli/codex-shim-autorestore.ts",
|
|
529
|
-
"sha256": "
|
|
533
|
+
"sha256": "cac51c864181d9e652a014041aa1cc3f82cad1a2b528b28461aa01213f109cba"
|
|
530
534
|
},
|
|
531
535
|
{
|
|
532
536
|
"path": "src/cli/codex-shim-readiness.ts",
|
|
@@ -558,15 +562,15 @@
|
|
|
558
562
|
},
|
|
559
563
|
{
|
|
560
564
|
"path": "src/cli/export-command.ts",
|
|
561
|
-
"sha256": "
|
|
565
|
+
"sha256": "02c6a0a3a89f6759adb6d920efbd731db244855420b789c9b32603cb8286cdf1"
|
|
562
566
|
},
|
|
563
567
|
{
|
|
564
568
|
"path": "src/cli/help.ts",
|
|
565
|
-
"sha256": "
|
|
569
|
+
"sha256": "17377f29265e32da27df8955d27cb262bff37e492c55f23b2edc745049e99b5a"
|
|
566
570
|
},
|
|
567
571
|
{
|
|
568
572
|
"path": "src/cli/index.ts",
|
|
569
|
-
"sha256": "
|
|
573
|
+
"sha256": "882ed1ad0bc92b1d3a031cc0904d3e3a2c77c7e683e5cf83b0cdd260a5c20870"
|
|
570
574
|
},
|
|
571
575
|
{
|
|
572
576
|
"path": "src/cli/init.ts",
|
|
@@ -590,7 +594,7 @@
|
|
|
590
594
|
},
|
|
591
595
|
{
|
|
592
596
|
"path": "src/cli/launcher-context.ts",
|
|
593
|
-
"sha256": "
|
|
597
|
+
"sha256": "eb9a6a4e04a57a3de2efee6f654138f62882b61932e5a454e300108d7a9655a6"
|
|
594
598
|
},
|
|
595
599
|
{
|
|
596
600
|
"path": "src/cli/minimax.ts",
|
|
@@ -610,7 +614,7 @@
|
|
|
610
614
|
},
|
|
611
615
|
{
|
|
612
616
|
"path": "src/cli/opencode.ts",
|
|
613
|
-
"sha256": "
|
|
617
|
+
"sha256": "ea17d1ef158abaad78691fdabec69cfa6607db4172847398677cd35cb2a57169"
|
|
614
618
|
},
|
|
615
619
|
{
|
|
616
620
|
"path": "src/cli/provider-runtime.ts",
|
|
@@ -626,7 +630,7 @@
|
|
|
626
630
|
},
|
|
627
631
|
{
|
|
628
632
|
"path": "src/cli/registry.ts",
|
|
629
|
-
"sha256": "
|
|
633
|
+
"sha256": "c6bb08a9729f39e00e32d4cdb156b3011b015dedfa04f48d760495cccf6ff4d1"
|
|
630
634
|
},
|
|
631
635
|
{
|
|
632
636
|
"path": "src/cli/root.ts",
|
|
@@ -658,7 +662,7 @@
|
|
|
658
662
|
},
|
|
659
663
|
{
|
|
660
664
|
"path": "src/cli/system-command.ts",
|
|
661
|
-
"sha256": "
|
|
665
|
+
"sha256": "c288c99fd05610654710545b4433190d5cc4347edda49e6a727503376137b0e0"
|
|
662
666
|
},
|
|
663
667
|
{
|
|
664
668
|
"path": "src/cli/system-restart-client.ts",
|
|
@@ -682,7 +686,7 @@
|
|
|
682
686
|
},
|
|
683
687
|
{
|
|
684
688
|
"path": "src/clients/config-export.ts",
|
|
685
|
-
"sha256": "
|
|
689
|
+
"sha256": "2562f1ca4a9a046ecd110b6a4c61be3c5af26ebe9d73441785c97dd4f95e7a8f"
|
|
686
690
|
},
|
|
687
691
|
{
|
|
688
692
|
"path": "src/codex/account-id.ts",
|
|
@@ -718,7 +722,7 @@
|
|
|
718
722
|
},
|
|
719
723
|
{
|
|
720
724
|
"path": "src/codex/account-store.ts",
|
|
721
|
-
"sha256": "
|
|
725
|
+
"sha256": "db95c62d3f9edb4013e7c3f13e56680c494063182a8747781ef315e4d531ba98"
|
|
722
726
|
},
|
|
723
727
|
{
|
|
724
728
|
"path": "src/codex/account-usability.ts",
|
|
@@ -754,7 +758,7 @@
|
|
|
754
758
|
},
|
|
755
759
|
{
|
|
756
760
|
"path": "src/codex/autostart-health.ts",
|
|
757
|
-
"sha256": "
|
|
761
|
+
"sha256": "89a5e5d1bfb7397f2951d023af7298e2faa2e8aeddcebbd0c346ba278aed904a"
|
|
758
762
|
},
|
|
759
763
|
{
|
|
760
764
|
"path": "src/codex/catalog-admission.ts",
|
|
@@ -810,11 +814,15 @@
|
|
|
810
814
|
},
|
|
811
815
|
{
|
|
812
816
|
"path": "src/codex/catalog/provider-fetch.ts",
|
|
813
|
-
"sha256": "
|
|
817
|
+
"sha256": "05bbedcadd91339176745ba89d6ecb1a9b0813844f8f7361ab427d14b53e84ae"
|
|
814
818
|
},
|
|
815
819
|
{
|
|
816
820
|
"path": "src/codex/catalog/sync.ts",
|
|
817
|
-
"sha256": "
|
|
821
|
+
"sha256": "b998796087e8dacefbd748667ff07ef1da72c31828b4fd9f33c773c8addeb5f5"
|
|
822
|
+
},
|
|
823
|
+
{
|
|
824
|
+
"path": "src/codex/cli-install-provenance.ts",
|
|
825
|
+
"sha256": "de2f9e8ef6910ac6863b50ac3b863dcb94ce727904461f20642ea6bf408bbd33"
|
|
818
826
|
},
|
|
819
827
|
{
|
|
820
828
|
"path": "src/codex/codex-write-lock.ts",
|
|
@@ -826,12 +834,16 @@
|
|
|
826
834
|
},
|
|
827
835
|
{
|
|
828
836
|
"path": "src/codex/convergence.ts",
|
|
829
|
-
"sha256": "
|
|
837
|
+
"sha256": "45acdd4b2c339e9b1e6d2d471be24a91bd727bfebb90b56dfa31445932ba937e"
|
|
830
838
|
},
|
|
831
839
|
{
|
|
832
840
|
"path": "src/codex/coordinator-doctor.ts",
|
|
833
841
|
"sha256": "8b96fccfcebec924abf6b1c03bb8ef17f6e89469fb6f556c1f0d517654eaf941"
|
|
834
842
|
},
|
|
843
|
+
{
|
|
844
|
+
"path": "src/codex/credential-mutation-epoch.ts",
|
|
845
|
+
"sha256": "fa23b49b0c53eceee61f0bcc5d74685aa5052031cc40e2c0cdab6b72bd478b51"
|
|
846
|
+
},
|
|
835
847
|
{
|
|
836
848
|
"path": "src/codex/custom-model-catalog-migration.ts",
|
|
837
849
|
"sha256": "eb6c1420bc61b27c67772255a20192cb94605c988f6b597608e69b6346464c77"
|
|
@@ -958,7 +970,7 @@
|
|
|
958
970
|
},
|
|
959
971
|
{
|
|
960
972
|
"path": "src/codex/main-account.ts",
|
|
961
|
-
"sha256": "
|
|
973
|
+
"sha256": "147e04ad9456c41c34b0b4fa2f50de42a4342e3e38496d35dd8ee3b43de3a38b"
|
|
962
974
|
},
|
|
963
975
|
{
|
|
964
976
|
"path": "src/codex/management-convergence.ts",
|
|
@@ -970,7 +982,7 @@
|
|
|
970
982
|
},
|
|
971
983
|
{
|
|
972
984
|
"path": "src/codex/model-entitlements.ts",
|
|
973
|
-
"sha256": "
|
|
985
|
+
"sha256": "a799b9cce143af58129ee79013aee4f7599d1d7a9dc7a59b80ed376f8b379310"
|
|
974
986
|
},
|
|
975
987
|
{
|
|
976
988
|
"path": "src/codex/native-main-admission.ts",
|
|
@@ -998,7 +1010,7 @@
|
|
|
998
1010
|
},
|
|
999
1011
|
{
|
|
1000
1012
|
"path": "src/codex/native-profile-manager.ts",
|
|
1001
|
-
"sha256": "
|
|
1013
|
+
"sha256": "5fe33a50c243b01400cbdba6d320e7bc87f123c96aa7096f36fe5a2d8a203e53"
|
|
1002
1014
|
},
|
|
1003
1015
|
{
|
|
1004
1016
|
"path": "src/codex/native-profile-processes.ts",
|
|
@@ -1080,9 +1092,13 @@
|
|
|
1080
1092
|
"path": "src/codex/refresh.ts",
|
|
1081
1093
|
"sha256": "648be78879375346ac2bf134f29a7523a8a436026d862bfaef0482d3840d8daa"
|
|
1082
1094
|
},
|
|
1095
|
+
{
|
|
1096
|
+
"path": "src/codex/reset-credit-operation-ledger.ts",
|
|
1097
|
+
"sha256": "045f3a1c2d124ea93673ab4c19f29204fec556ce12771754645c0a1afb1bfc91"
|
|
1098
|
+
},
|
|
1083
1099
|
{
|
|
1084
1100
|
"path": "src/codex/reset-credit-recovery.ts",
|
|
1085
|
-
"sha256": "
|
|
1101
|
+
"sha256": "0978c72f8f254cfcaf61637d139b25e1c23c879d86258816dedcb467116e87de"
|
|
1086
1102
|
},
|
|
1087
1103
|
{
|
|
1088
1104
|
"path": "src/codex/routing.ts",
|
|
@@ -1094,7 +1110,7 @@
|
|
|
1094
1110
|
},
|
|
1095
1111
|
{
|
|
1096
1112
|
"path": "src/codex/shim.ts",
|
|
1097
|
-
"sha256": "
|
|
1113
|
+
"sha256": "e8fac3195d09e3d92caa8f3643a6155d0b6f2d833992d097f22b6859148631e5"
|
|
1098
1114
|
},
|
|
1099
1115
|
{
|
|
1100
1116
|
"path": "src/codex/subagent-defaults.ts",
|
|
@@ -1118,7 +1134,7 @@
|
|
|
1118
1134
|
},
|
|
1119
1135
|
{
|
|
1120
1136
|
"path": "src/codex/user-identity.ts",
|
|
1121
|
-
"sha256": "
|
|
1137
|
+
"sha256": "139c28e3f638dfbe1363aa0c86a629357a1a4dc7ed4d40ab035f38067175d6d8"
|
|
1122
1138
|
},
|
|
1123
1139
|
{
|
|
1124
1140
|
"path": "src/codex/warmup.ts",
|
|
@@ -1170,7 +1186,7 @@
|
|
|
1170
1186
|
},
|
|
1171
1187
|
{
|
|
1172
1188
|
"path": "src/config.ts",
|
|
1173
|
-
"sha256": "
|
|
1189
|
+
"sha256": "9bba128978659e2cf26b15422b7db57c15edb56e846d4b04b50f20c322033c0c"
|
|
1174
1190
|
},
|
|
1175
1191
|
{
|
|
1176
1192
|
"path": "src/config/atomic-write.ts",
|
|
@@ -1178,7 +1194,7 @@
|
|
|
1178
1194
|
},
|
|
1179
1195
|
{
|
|
1180
1196
|
"path": "src/config/paths.ts",
|
|
1181
|
-
"sha256": "
|
|
1197
|
+
"sha256": "61f45ac80e0b176b870dd660867f6f5799e61b55ae2fdfce5691bbb9e66e6049"
|
|
1182
1198
|
},
|
|
1183
1199
|
{
|
|
1184
1200
|
"path": "src/config/process-state.ts",
|
|
@@ -1314,7 +1330,7 @@
|
|
|
1314
1330
|
},
|
|
1315
1331
|
{
|
|
1316
1332
|
"path": "src/integrations/registry.ts",
|
|
1317
|
-
"sha256": "
|
|
1333
|
+
"sha256": "09446d4c94c342d66133a23da03f64fad5bc60c33b97c764ae8e29d81d307534"
|
|
1318
1334
|
},
|
|
1319
1335
|
{
|
|
1320
1336
|
"path": "src/integrations/serialize.ts",
|
|
@@ -1322,7 +1338,7 @@
|
|
|
1322
1338
|
},
|
|
1323
1339
|
{
|
|
1324
1340
|
"path": "src/integrations/state.ts",
|
|
1325
|
-
"sha256": "
|
|
1341
|
+
"sha256": "b6f44aeb35606aadfc73b7c688bc75db4f34504238081b75cb94637a73f43b89"
|
|
1326
1342
|
},
|
|
1327
1343
|
{
|
|
1328
1344
|
"path": "src/integrations/store.ts",
|
|
@@ -1334,7 +1350,7 @@
|
|
|
1334
1350
|
},
|
|
1335
1351
|
{
|
|
1336
1352
|
"path": "src/integrations/writer.ts",
|
|
1337
|
-
"sha256": "
|
|
1353
|
+
"sha256": "e69674605c41714a634903e464769df4ceb3a1a220351f4b01048df909124265"
|
|
1338
1354
|
},
|
|
1339
1355
|
{
|
|
1340
1356
|
"path": "src/lab/artifacts/sanitize.ts",
|
|
@@ -1836,6 +1852,10 @@
|
|
|
1836
1852
|
"path": "src/lib/bounded-body.ts",
|
|
1837
1853
|
"sha256": "3ae1a26d2bfa6dc6b06ec536b81e46278bbde99f4038c70e38c60bd9bc9a63be"
|
|
1838
1854
|
},
|
|
1855
|
+
{
|
|
1856
|
+
"path": "src/lib/bounded-subprocess.ts",
|
|
1857
|
+
"sha256": "d4c3c7a3d5658670390fc615b9c8cf681fea720154a339a05bbca26f11420bcc"
|
|
1858
|
+
},
|
|
1839
1859
|
{
|
|
1840
1860
|
"path": "src/lib/bun-binary-validator.d.mts",
|
|
1841
1861
|
"sha256": "dec6eb67be41660293d373603ba2c886a3d6411213d42dca3c36a17aaa3a59e5"
|
|
@@ -2016,6 +2036,10 @@
|
|
|
2016
2036
|
"path": "src/lib/state-store-sweeper.ts",
|
|
2017
2037
|
"sha256": "f90bf9131614a1df77b52c99791b5f9dcab49f458fadc162825cc73489a0eb0e"
|
|
2018
2038
|
},
|
|
2039
|
+
{
|
|
2040
|
+
"path": "src/lib/strict-semver.ts",
|
|
2041
|
+
"sha256": "d4d81713842d7baa62e9971fa81b81e3b97ec724ff521a6b8dce814ab0dff395"
|
|
2042
|
+
},
|
|
2019
2043
|
{
|
|
2020
2044
|
"path": "src/lib/system-restart-contract.ts",
|
|
2021
2045
|
"sha256": "5bd6d639da7571788922bfa90757bd0edf82f3bfaa5f347c927bb8d0978d10e4"
|
|
@@ -2062,11 +2086,15 @@
|
|
|
2062
2086
|
},
|
|
2063
2087
|
{
|
|
2064
2088
|
"path": "src/lib/windows-elevation.ts",
|
|
2065
|
-
"sha256": "
|
|
2089
|
+
"sha256": "3dec32d9b73ca730d5b8e0cd118bb109c0d32c8e796f99d9ec887bb9962a4906"
|
|
2066
2090
|
},
|
|
2067
2091
|
{
|
|
2068
2092
|
"path": "src/lib/windows-secret-acl.ts",
|
|
2069
|
-
"sha256": "
|
|
2093
|
+
"sha256": "1ebb5a92b28a0ea6b4d019f823a4646393d5da05fe6331bc1ad5b95a7c1c147c"
|
|
2094
|
+
},
|
|
2095
|
+
{
|
|
2096
|
+
"path": "src/lib/windows-service-mutation-lock.ts",
|
|
2097
|
+
"sha256": "00ab6da61fcbcc680baf221aa82ba9f40711978a93dd0a47c2ef1220bef7e4da"
|
|
2070
2098
|
},
|
|
2071
2099
|
{
|
|
2072
2100
|
"path": "src/lib/windows-service-wrappers.ts",
|
|
@@ -2078,7 +2106,7 @@
|
|
|
2078
2106
|
},
|
|
2079
2107
|
{
|
|
2080
2108
|
"path": "src/lib/windows-user-principal.ts",
|
|
2081
|
-
"sha256": "
|
|
2109
|
+
"sha256": "6e933ba48d8df8924b608c647a5787ed9f7f5b0f8bf6494c8521ce37bd61b975"
|
|
2082
2110
|
},
|
|
2083
2111
|
{
|
|
2084
2112
|
"path": "src/lib/winsw.ts",
|
|
@@ -2458,11 +2486,11 @@
|
|
|
2458
2486
|
},
|
|
2459
2487
|
{
|
|
2460
2488
|
"path": "src/responses/spill-store.ts",
|
|
2461
|
-
"sha256": "
|
|
2489
|
+
"sha256": "c68cde506896938c7e39b35ddd6b0192837880d77d83647dd00c7d9bd436311f"
|
|
2462
2490
|
},
|
|
2463
2491
|
{
|
|
2464
2492
|
"path": "src/responses/state.ts",
|
|
2465
|
-
"sha256": "
|
|
2493
|
+
"sha256": "e96d4d3cdfa96981b0d8becb09b652eae369264f572d152aa80100a0e6d28cf8"
|
|
2466
2494
|
},
|
|
2467
2495
|
{
|
|
2468
2496
|
"path": "src/responses/thought-signature-replay.ts",
|
|
@@ -2642,11 +2670,11 @@
|
|
|
2642
2670
|
},
|
|
2643
2671
|
{
|
|
2644
2672
|
"path": "src/server/index.ts",
|
|
2645
|
-
"sha256": "
|
|
2673
|
+
"sha256": "56f5e88b792ea4ec97e0ee31c790263fd0868b194d5e73b19fca1f1144435992"
|
|
2646
2674
|
},
|
|
2647
2675
|
{
|
|
2648
2676
|
"path": "src/server/lifecycle.ts",
|
|
2649
|
-
"sha256": "
|
|
2677
|
+
"sha256": "2d91d67e9dd1412dad89a88b3670587ccd31f42a6ad564cd13f88e1ef2509095"
|
|
2650
2678
|
},
|
|
2651
2679
|
{
|
|
2652
2680
|
"path": "src/server/live.ts",
|
|
@@ -2662,7 +2690,7 @@
|
|
|
2662
2690
|
},
|
|
2663
2691
|
{
|
|
2664
2692
|
"path": "src/server/management-api.ts",
|
|
2665
|
-
"sha256": "
|
|
2693
|
+
"sha256": "414af95a8be79d00c6f0aeb1c0a75d70a25161ff5176e1cefbc79160b016aec0"
|
|
2666
2694
|
},
|
|
2667
2695
|
{
|
|
2668
2696
|
"path": "src/server/management-auth.ts",
|
|
@@ -2722,7 +2750,7 @@
|
|
|
2722
2750
|
},
|
|
2723
2751
|
{
|
|
2724
2752
|
"path": "src/server/management/model-rows.ts",
|
|
2725
|
-
"sha256": "
|
|
2753
|
+
"sha256": "fb3dc00b5838aaa3830cdeec1ea948ebe5caf7e132d020fbd82f52c299bbaf01"
|
|
2726
2754
|
},
|
|
2727
2755
|
{
|
|
2728
2756
|
"path": "src/server/management/native-integration-routes.ts",
|
|
@@ -2738,7 +2766,7 @@
|
|
|
2738
2766
|
},
|
|
2739
2767
|
{
|
|
2740
2768
|
"path": "src/server/management/provider-routes.ts",
|
|
2741
|
-
"sha256": "
|
|
2769
|
+
"sha256": "da8ccf2e7d7f1fccea87e83553bc2ed075b8e33f811d965da483e57afd4f2377"
|
|
2742
2770
|
},
|
|
2743
2771
|
{
|
|
2744
2772
|
"path": "src/server/management/request-history-routes.ts",
|
|
@@ -2778,7 +2806,7 @@
|
|
|
2778
2806
|
},
|
|
2779
2807
|
{
|
|
2780
2808
|
"path": "src/server/management/system-restart.ts",
|
|
2781
|
-
"sha256": "
|
|
2809
|
+
"sha256": "d550ce46371882aab29866246b121e5b2c65ce31765889b32c67e5295101ebfc"
|
|
2782
2810
|
},
|
|
2783
2811
|
{
|
|
2784
2812
|
"path": "src/server/management/system-routes.ts",
|
|
@@ -2970,7 +2998,7 @@
|
|
|
2970
2998
|
},
|
|
2971
2999
|
{
|
|
2972
3000
|
"path": "src/server/startup-action-control.ts",
|
|
2973
|
-
"sha256": "
|
|
3001
|
+
"sha256": "171d2d5200c31b226ac74c45920b89fb64800da3c98887872a1001aa88a11f63"
|
|
2974
3002
|
},
|
|
2975
3003
|
{
|
|
2976
3004
|
"path": "src/server/startup-health-cache.ts",
|
|
@@ -2998,7 +3026,7 @@
|
|
|
2998
3026
|
},
|
|
2999
3027
|
{
|
|
3000
3028
|
"path": "src/service.ts",
|
|
3001
|
-
"sha256": "
|
|
3029
|
+
"sha256": "c8db18110d1c0e8ce06e7f4d568352508553ae4d5b2d9604d4f0054e0774457a"
|
|
3002
3030
|
},
|
|
3003
3031
|
{
|
|
3004
3032
|
"path": "src/sidecar/auth.ts",
|
|
@@ -3006,7 +3034,7 @@
|
|
|
3006
3034
|
},
|
|
3007
3035
|
{
|
|
3008
3036
|
"path": "src/sidecar/candidates.ts",
|
|
3009
|
-
"sha256": "
|
|
3037
|
+
"sha256": "9248b5d5b213d15de616cf4546dbe4af12b7925f7ef260253c6367acc303ad8e"
|
|
3010
3038
|
},
|
|
3011
3039
|
{
|
|
3012
3040
|
"path": "src/stall-timeout.ts",
|
|
@@ -3112,13 +3140,21 @@
|
|
|
3112
3140
|
"path": "src/update/badge.ts",
|
|
3113
3141
|
"sha256": "18e94f01758fe874c6aeed02c65b7368d730db8ade3ca7bbcc7b10d627658aa7"
|
|
3114
3142
|
},
|
|
3143
|
+
{
|
|
3144
|
+
"path": "src/update/codex-cli-update-launch-policy.d.mts",
|
|
3145
|
+
"sha256": "78a67e9e83690ce53b696264c7e8fa5efb6f8245d0db2cdf1cdf7a74b0e05ccd"
|
|
3146
|
+
},
|
|
3147
|
+
{
|
|
3148
|
+
"path": "src/update/codex-cli-update-launch-policy.mjs",
|
|
3149
|
+
"sha256": "58fa63c59c80361771080b49815e5d3fb37e35cd6616c60408d472b4ff691354"
|
|
3150
|
+
},
|
|
3115
3151
|
{
|
|
3116
3152
|
"path": "src/update/index.ts",
|
|
3117
|
-
"sha256": "
|
|
3153
|
+
"sha256": "f7ffb1f406760a2490b7f9f6c4373357bb455d6348d5b105a4462ffde0b7d44d"
|
|
3118
3154
|
},
|
|
3119
3155
|
{
|
|
3120
3156
|
"path": "src/update/job.ts",
|
|
3121
|
-
"sha256": "
|
|
3157
|
+
"sha256": "ea7ad47a06ad0e7be6f3924908e11872d35df0aecd5eaf17c4d3cf3ad31e3d9d"
|
|
3122
3158
|
},
|
|
3123
3159
|
{
|
|
3124
3160
|
"path": "src/update/notify.ts",
|
|
@@ -11,7 +11,11 @@
|
|
|
11
11
|
import { homedir } from "node:os";
|
|
12
12
|
import { join } from "node:path";
|
|
13
13
|
import {
|
|
14
|
+
ClientPathError,
|
|
14
15
|
EXPORT_CLIENTS,
|
|
16
|
+
asideAccountDir,
|
|
17
|
+
asideConfigPath,
|
|
18
|
+
asideHomeDir,
|
|
15
19
|
dshConfigPath,
|
|
16
20
|
dshHomeDir,
|
|
17
21
|
gajaeConfigPath,
|
|
@@ -52,6 +56,86 @@ export interface IntegrationClientSpec {
|
|
|
52
56
|
sourcePreservingYaml?: { path: readonly string[] };
|
|
53
57
|
/** Coordinate the complete mutation through a sibling config lock. */
|
|
54
58
|
writerLock?: { suffix: ".lock" };
|
|
59
|
+
/**
|
|
60
|
+
* Derive the config path AND the detect directory from one resolution, for a
|
|
61
|
+
* client whose paths depend on mutable state rather than only env and home.
|
|
62
|
+
*
|
|
63
|
+
* Only Aside needs this. Its two paths both come from the account id in
|
|
64
|
+
* `accounts.json`, so calling `configPath` and `detectDir` in sequence can
|
|
65
|
+
* straddle an account switch and check one account's install while writing
|
|
66
|
+
* another's catalog. Reading the id once and deriving both paths from it
|
|
67
|
+
* removes the window instead of narrowing it.
|
|
68
|
+
*/
|
|
69
|
+
resolvePaths?: (env?: NodeJS.ProcessEnv, home?: string) => { configPath: string; detectDir: string };
|
|
70
|
+
/**
|
|
71
|
+
* Where the client's config WOULD live, for a client whose real path cannot
|
|
72
|
+
* be resolved yet.
|
|
73
|
+
*
|
|
74
|
+
* Only a client with `resolvePaths` needs this, and only because that
|
|
75
|
+
* resolution can legitimately fail on a machine where the client has never
|
|
76
|
+
* run. Aside's account id comes from a manifest the app writes at first
|
|
77
|
+
* launch, so a never-signed-in install has no account directory and no id --
|
|
78
|
+
* which is "not installed", not "we cannot verify this file".
|
|
79
|
+
*
|
|
80
|
+
* The value is a location to SHOW, never a location to write: it names the
|
|
81
|
+
* account root without an account, so it cannot be mistaken for a real
|
|
82
|
+
* catalog. `resolveIntegrationPaths` still throws for callers that mutate.
|
|
83
|
+
*/
|
|
84
|
+
unresolvedPathHint?: (env?: NodeJS.ProcessEnv, home?: string) => string;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* The one place that turns a client id into the pair of paths an operation uses.
|
|
89
|
+
*
|
|
90
|
+
* A caller that resolves `configPath` and `detectDir` separately is correct for
|
|
91
|
+
* every client whose paths are a pure function of env and home, and wrong for
|
|
92
|
+
* one that reads mutable state. Routing both through here lets such a client fix
|
|
93
|
+
* that for itself without every call site learning why.
|
|
94
|
+
*/
|
|
95
|
+
export function resolveIntegrationPaths(
|
|
96
|
+
clientId: IntegrationClientId,
|
|
97
|
+
env: NodeJS.ProcessEnv = process.env,
|
|
98
|
+
home: string = homedir(),
|
|
99
|
+
): { configPath: string; detectDir: string } {
|
|
100
|
+
const spec = INTEGRATION_CLIENTS[clientId];
|
|
101
|
+
if (spec.resolvePaths) return spec.resolvePaths(env, home);
|
|
102
|
+
return { configPath: spec.configPath(env, home), detectDir: spec.detectDir(env, home) };
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* The location to name when resolution refused, or `""` when there is none.
|
|
107
|
+
*
|
|
108
|
+
* A read-only surface reporting "unresolvable" with an empty path told the user
|
|
109
|
+
* nothing they could act on, and for Aside it also reported the wrong thing: an
|
|
110
|
+
* absent account manifest is the ordinary state of an installed-but-never-run
|
|
111
|
+
* Aside, and the honest answer there is that it is not signed in.
|
|
112
|
+
*
|
|
113
|
+
* `""` is a sentinel, not a path: it is what `readIntegrationState` reads to
|
|
114
|
+
* decide between not-installed and cannot-verify. A config path is never
|
|
115
|
+
* legitimately empty, and a hint is always an absolute `join` result, so the two
|
|
116
|
+
* cannot be confused.
|
|
117
|
+
*/
|
|
118
|
+
export function unresolvedPathHintFor(
|
|
119
|
+
clientId: IntegrationClientId,
|
|
120
|
+
env: NodeJS.ProcessEnv = process.env,
|
|
121
|
+
home: string = homedir(),
|
|
122
|
+
): string {
|
|
123
|
+
const spec = INTEGRATION_CLIENTS[clientId];
|
|
124
|
+
if (!spec.unresolvedPathHint) return "";
|
|
125
|
+
try {
|
|
126
|
+
return spec.unresolvedPathHint(env, home);
|
|
127
|
+
} catch (error) {
|
|
128
|
+
/*
|
|
129
|
+
* Only a path refusal is absorbed. An unqualified catch here would also
|
|
130
|
+
* swallow a TypeError from a future implementor's typo, an
|
|
131
|
+
* ERR_INVALID_ARG_TYPE out of `join`, or an EACCES from a resolver that
|
|
132
|
+
* touches the filesystem -- turning a programming error into a silently
|
|
133
|
+
* degraded badge. `readIntegrationState` narrows the same way at its own
|
|
134
|
+
* catch, and this is the matching half.
|
|
135
|
+
*/
|
|
136
|
+
if (!(error instanceof ClientPathError)) throw error;
|
|
137
|
+
return "";
|
|
138
|
+
}
|
|
55
139
|
}
|
|
56
140
|
|
|
57
141
|
/**
|
|
@@ -149,6 +233,34 @@ export const INTEGRATION_CLIENTS: Record<IntegrationClientId, IntegrationClientS
|
|
|
149
233
|
// is set. Same choice as OMP, whose detect signal is `ompAgentDir`.
|
|
150
234
|
detectDir: (env = process.env, home = homedir()) => primeAgentDir(env, home),
|
|
151
235
|
},
|
|
236
|
+
aside: {
|
|
237
|
+
id: "aside",
|
|
238
|
+
configPath: (env = process.env, home = homedir()) => asideConfigPath(env, home),
|
|
239
|
+
/*
|
|
240
|
+
* The ACCOUNT directory, not `~/.aside`. Aside's CLI creates `~/.aside/cli`
|
|
241
|
+
* for its own update check before any account exists, so the outer directory
|
|
242
|
+
* is present on a machine that never signed in, and writing a catalog for an
|
|
243
|
+
* account that does not exist is worse than reporting absent.
|
|
244
|
+
*/
|
|
245
|
+
detectDir: (env = process.env, home = homedir()) => asideAccountDir(env, home),
|
|
246
|
+
/*
|
|
247
|
+
* Both paths from ONE account read. The two resolvers above each consult
|
|
248
|
+
* the account manifest, so a switch landing between them would let an
|
|
249
|
+
* operation verify one account's install and then write another's catalog.
|
|
250
|
+
*/
|
|
251
|
+
resolvePaths: (env = process.env, home = homedir()) => {
|
|
252
|
+
const detectDir = asideAccountDir(env, home);
|
|
253
|
+
return { configPath: join(detectDir, "models.json"), detectDir };
|
|
254
|
+
},
|
|
255
|
+
/*
|
|
256
|
+
* The account ROOT, with no account under it. Aside writes `accounts.json`
|
|
257
|
+
* at first launch, so its absence is the ordinary state of an Aside that has
|
|
258
|
+
* been installed and never signed into -- and a page that answered "cannot
|
|
259
|
+
* verify" with an empty path for that case named nothing the user could go
|
|
260
|
+
* look at.
|
|
261
|
+
*/
|
|
262
|
+
unresolvedPathHint: (env = process.env, home = homedir()) => join(asideHomeDir(env, home), "u"),
|
|
263
|
+
},
|
|
152
264
|
};
|
|
153
265
|
|
|
154
266
|
export const INTEGRATION_CLIENT_IDS: readonly IntegrationClientId[] =
|
|
@@ -19,7 +19,12 @@ import {
|
|
|
19
19
|
semanticProtectedContributionFingerprint,
|
|
20
20
|
validRefreshablePaths,
|
|
21
21
|
} from "./ownership-policy";
|
|
22
|
-
import {
|
|
22
|
+
import {
|
|
23
|
+
INTEGRATION_CLIENTS,
|
|
24
|
+
resolveIntegrationPaths,
|
|
25
|
+
unresolvedPathHintFor,
|
|
26
|
+
type IntegrationClientId,
|
|
27
|
+
} from "./registry";
|
|
23
28
|
import { createIntegrationStateStore, type IntegrationStateStore } from "./store";
|
|
24
29
|
|
|
25
30
|
export type IntegrationState = "absent" | "current" | "stale" | "conflict" | "unsafe";
|
|
@@ -238,6 +243,42 @@ export function classifyIntegration(input: {
|
|
|
238
243
|
return { state: "unsafe", reason: "blocked-container" };
|
|
239
244
|
}
|
|
240
245
|
if (!hasOurFragments(input.parsed, input.contribution)) return { state: "absent" };
|
|
246
|
+
|
|
247
|
+
/*
|
|
248
|
+
* Fragments the desired contribution carries beyond the paths this record names. Both
|
|
249
|
+
* states appear whenever a client gains a second owned block:
|
|
250
|
+
*
|
|
251
|
+
* - occupied by a value we did not write -> refuse. A refresh merges the WHOLE
|
|
252
|
+
* contribution, so without this check applying would replace a block the user wrote
|
|
253
|
+
* themselves and report success.
|
|
254
|
+
* - empty -> our own block is missing, because the record predates it. Report drift so
|
|
255
|
+
* a refresh adds it. Without this the file reads `current` forever and the second
|
|
256
|
+
* block never arrives, which is exactly what an older installation hits on upgrade.
|
|
257
|
+
*
|
|
258
|
+
* A byte-identical value is ours in substance: adopt it instead of dead-ending a
|
|
259
|
+
* hand-merged config on a conflict the user can only resolve by deleting our own block.
|
|
260
|
+
*/
|
|
261
|
+
const recordedPaths = new Set((input.record?.fragmentPaths ?? []).map(path => path.join("\u0000")));
|
|
262
|
+
let addedPathMissing = false;
|
|
263
|
+
for (const fragment of input.contribution.fragments) {
|
|
264
|
+
if (recordedPaths.has(fragment.path.join("\u0000"))) continue;
|
|
265
|
+
const observed = readPath(input.parsed, fragment.path);
|
|
266
|
+
if (observed === undefined) {
|
|
267
|
+
addedPathMissing = true;
|
|
268
|
+
continue;
|
|
269
|
+
}
|
|
270
|
+
const one = (value: unknown): string => fingerprint(canonicalContribution({
|
|
271
|
+
clientId: (input.clientId ?? input.record?.clientId) as IntegrationClientId,
|
|
272
|
+
fragments: [{ path: fragment.path, value }],
|
|
273
|
+
}));
|
|
274
|
+
if (one(observed) !== one(fragment.value)) return { state: "conflict", reason: "unowned-key" };
|
|
275
|
+
}
|
|
276
|
+
/*
|
|
277
|
+
* No record: whatever occupies our paths is not ours to touch. A byte-identical value
|
|
278
|
+
* would be ours in substance, but `stale` without a record is not actionable — the writer
|
|
279
|
+
* reads `createdContainers` off the record to decide what it may prune, so adopting a
|
|
280
|
+
* hand-merged block needs an apply path that creates one first. Refuse, exactly as before.
|
|
281
|
+
*/
|
|
241
282
|
if (!input.record) return { state: "conflict", reason: "unowned-key" };
|
|
242
283
|
/*
|
|
243
284
|
* A record proves ownership of ONE file. Change HOME, XDG_CONFIG_HOME,
|
|
@@ -286,6 +327,12 @@ export function classifyIntegration(input: {
|
|
|
286
327
|
}
|
|
287
328
|
return { state: "stale" };
|
|
288
329
|
}
|
|
330
|
+
/*
|
|
331
|
+
* Checked after everything else that could refuse: an owned fragment that no longer
|
|
332
|
+
* matches, or a sibling edit in a format that cannot be rewritten safely, still wins.
|
|
333
|
+
* What is left is a block we own on paper and are merely missing on disk.
|
|
334
|
+
*/
|
|
335
|
+
if (addedPathMissing) return { state: "stale" };
|
|
289
336
|
const desiredFingerprint = typeof input.record.semanticBlockFingerprint === "string"
|
|
290
337
|
? fingerprint(semanticContribution(input.contribution))
|
|
291
338
|
: fingerprint(canonicalContribution(input.contribution));
|
|
@@ -382,15 +429,30 @@ export function readIntegrationState(input: IntegrationStateInput): IntegrationS
|
|
|
382
429
|
let configPath: string;
|
|
383
430
|
let installed: boolean;
|
|
384
431
|
try {
|
|
385
|
-
|
|
386
|
-
|
|
432
|
+
// One resolution for both, so a client whose paths come from mutable state
|
|
433
|
+
// cannot report one account's install beside another account's config path.
|
|
434
|
+
const paths = resolveIntegrationPaths(input.clientId, input.env, input.home);
|
|
435
|
+
configPath = paths.configPath;
|
|
436
|
+
installed = io.statKind(paths.detectDir) === "dir";
|
|
387
437
|
} catch (error) {
|
|
388
438
|
if (!(error instanceof ClientPathError)) throw error;
|
|
439
|
+
/*
|
|
440
|
+
* Two different situations reach here and they are not the same answer.
|
|
441
|
+
*
|
|
442
|
+
* A relative `OPENCLAW_CONFIG_PATH` is a misconfiguration: there is nothing
|
|
443
|
+
* to name, and "cannot verify" is correct. Aside's absent account manifest
|
|
444
|
+
* is the ORDINARY state of an Aside that has been installed and never
|
|
445
|
+
* signed into, and answering that with a red danger badge and an empty path
|
|
446
|
+
* told the user their config was suspect when in fact there is no account
|
|
447
|
+
* yet. A client that can name where its config would go gets `installed:
|
|
448
|
+
* false` and that location, which reads as "not installed" in the UI.
|
|
449
|
+
*/
|
|
450
|
+
const hint = unresolvedPathHintFor(input.clientId, input.env, input.home);
|
|
389
451
|
return {
|
|
390
452
|
clientId: input.clientId,
|
|
391
|
-
state: "unsafe",
|
|
453
|
+
state: hint ? "absent" : "unsafe",
|
|
392
454
|
installed: false,
|
|
393
|
-
configPath:
|
|
455
|
+
configPath: hint,
|
|
394
456
|
reason: "unresolvable-path",
|
|
395
457
|
...retention,
|
|
396
458
|
};
|