@cortexkit/opencode-antigravity-auth 3.1.7 → 3.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +182 -193
- package/dist/cli.js.map +4 -4
- package/dist/cli.meta.json +83 -54
- package/dist/index.js +6886 -6346
- package/dist/index.js.map +4 -4
- package/dist/index.meta.json +475 -387
- package/dist/server.js +3056 -2446
- package/dist/server.js.map +4 -4
- package/dist/server.meta.json +1 -1
- package/dist/src/common-auth-embedded/claustrum/availability.js +1 -1
- package/dist/src/common-auth-embedded/claustrum/custody.js +1 -1
- package/dist/src/common-auth-embedded/fs/private-files.js +14 -5
- package/dist/src/common-auth-embedded/opencode2/index.d.ts +1 -1
- package/dist/src/common-auth-embedded/opencode2/index.js +1 -1
- package/dist/src/common-auth-embedded/opencode2/install.d.ts +6 -1
- package/dist/src/common-auth-embedded/opencode2/install.js +14 -4
- package/dist/src/common-auth-embedded/opencode2/types.d.ts +10 -7
- package/dist/src/common-auth-embedded/pi-slot/index.d.ts +1 -1
- package/dist/src/common-auth-embedded/pi-slot/index.js +1 -1
- package/dist/src/common-auth-embedded/pi-slot/slot.d.ts +6 -9
- package/dist/src/common-auth-embedded/pi-slot/slot.js +42 -105
- package/dist/src/common-auth-embedded/routing-accessor/index.d.ts +66 -16
- package/dist/src/common-auth-embedded/routing-accessor/index.js +123 -17
- package/dist/src/common-auth-embedded/rpc/index.d.ts +1 -1
- package/dist/src/common-auth-embedded/rpc/index.js +1 -1
- package/dist/src/common-auth-embedded/rpc/port-file.d.ts +4 -0
- package/dist/src/common-auth-embedded/rpc/port-file.js +55 -49
- package/dist/src/common-auth-embedded/rpc/rpc-server.js +3 -2
- package/dist/src/common-auth-embedded/rpc/startup-sweep.js +32 -0
- package/dist/src/common-auth-embedded/source-output.json +77 -68
- package/dist/src/common-auth-embedded/store/mutate.js +34 -13
- package/dist/src/ga/server/index.d.ts +1 -1
- package/dist/src/ga/server/index.d.ts.map +1 -1
- package/dist/src/ga/server/index.js +58 -19
- package/dist/src/ga/server/index.js.map +1 -1
- package/dist/src/plugin/__fixtures__/verified-store.d.ts +1 -1
- package/dist/src/plugin/__fixtures__/verified-store.js +3 -3
- package/dist/src/plugin/auth-loader.d.ts.map +1 -1
- package/dist/src/plugin/auth-loader.js +102 -80
- package/dist/src/plugin/auth-loader.js.map +1 -1
- package/dist/src/plugin/fetch-interceptor.d.ts.map +1 -1
- package/dist/src/plugin/fetch-interceptor.js +27 -13
- package/dist/src/plugin/fetch-interceptor.js.map +1 -1
- package/dist/src/plugin/ga-location-services.d.ts.map +1 -1
- package/dist/src/plugin/ga-location-services.js +21 -11
- package/dist/src/plugin/ga-location-services.js.map +1 -1
- package/dist/src/plugin/index.d.ts.map +1 -1
- package/dist/src/plugin/index.js +13 -5
- package/dist/src/plugin/index.js.map +1 -1
- package/dist/src/plugin/request.d.ts.map +1 -1
- package/dist/src/plugin/request.js +2 -2
- package/dist/src/plugin/request.js.map +1 -1
- package/dist/src/plugin/shared/opencode-retry-hints.d.ts +2 -0
- package/dist/src/plugin/shared/opencode-retry-hints.d.ts.map +1 -0
- package/dist/src/plugin/shared/opencode-retry-hints.js +22 -0
- package/dist/src/plugin/shared/opencode-retry-hints.js.map +1 -0
- package/dist/src/plugin/shared/request-services.d.ts +2 -0
- package/dist/src/plugin/shared/request-services.d.ts.map +1 -1
- package/dist/src/plugin/shared/request-services.js +410 -112
- package/dist/src/plugin/shared/request-services.js.map +1 -1
- package/dist/src/plugin/shared/vault-routing-purpose.d.ts +6 -2
- package/dist/src/plugin/shared/vault-routing-purpose.d.ts.map +1 -1
- package/dist/src/plugin/shared/vault-routing-purpose.js +13 -7
- package/dist/src/plugin/shared/vault-routing-purpose.js.map +1 -1
- package/dist/src/plugin/shared/vault-routing.d.ts +8 -1
- package/dist/src/plugin/shared/vault-routing.d.ts.map +1 -1
- package/dist/src/plugin/shared/vault-routing.js +12 -4
- package/dist/src/plugin/shared/vault-routing.js.map +1 -1
- package/dist/src/plugin/storage.d.ts +1 -0
- package/dist/src/plugin/storage.d.ts.map +1 -1
- package/dist/src/plugin/storage.js +3 -3
- package/dist/src/plugin/storage.js.map +1 -1
- package/dist/src/plugin/vault-custody.d.ts +6 -13
- package/dist/src/plugin/vault-custody.d.ts.map +1 -1
- package/dist/src/plugin/vault-custody.js +19 -16
- package/dist/src/plugin/vault-custody.js.map +1 -1
- package/dist/src/runtime-layout.d.ts.map +1 -1
- package/dist/src/runtime-layout.js +5 -2
- package/dist/src/runtime-layout.js.map +1 -1
- package/dist/src/setup.d.ts.map +1 -1
- package/dist/src/setup.js +2 -7
- package/dist/src/setup.js.map +1 -1
- package/dist/tui-build-map.json +9 -9
- package/dist/tui-ga-build-map.json +1 -1
- package/dist/types/src/common-auth-embedded/opencode2/index.d.ts +1 -1
- package/dist/types/src/common-auth-embedded/opencode2/install.d.ts +6 -1
- package/dist/types/src/common-auth-embedded/opencode2/types.d.ts +10 -7
- package/dist/types/src/common-auth-embedded/routing-accessor/index.d.ts +66 -16
- package/dist/types/src/ga/server/index.d.ts +1 -1
- package/dist/types/src/ga/server/index.d.ts.map +1 -1
- package/dist/types/src/plugin/auth-loader.d.ts.map +1 -1
- package/dist/types/src/plugin/fetch-interceptor.d.ts.map +1 -1
- package/dist/types/src/plugin/ga-location-services.d.ts.map +1 -1
- package/dist/types/src/plugin/index.d.ts.map +1 -1
- package/dist/types/src/plugin/request.d.ts.map +1 -1
- package/dist/types/src/plugin/shared/opencode-retry-hints.d.ts +2 -0
- package/dist/types/src/plugin/shared/opencode-retry-hints.d.ts.map +1 -0
- package/dist/types/src/plugin/shared/request-services.d.ts +2 -0
- package/dist/types/src/plugin/shared/request-services.d.ts.map +1 -1
- package/dist/types/src/plugin/shared/vault-routing-purpose.d.ts +6 -2
- package/dist/types/src/plugin/shared/vault-routing-purpose.d.ts.map +1 -1
- package/dist/types/src/plugin/shared/vault-routing.d.ts +8 -1
- package/dist/types/src/plugin/shared/vault-routing.d.ts.map +1 -1
- package/dist/types/src/plugin/storage.d.ts +1 -0
- package/dist/types/src/plugin/storage.d.ts.map +1 -1
- package/dist/types/src/plugin/vault-custody.d.ts +6 -13
- package/dist/types/src/plugin/vault-custody.d.ts.map +1 -1
- package/dist/types/src/runtime-layout.d.ts.map +1 -1
- package/dist/types/src/setup.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/common-auth-embedded/claustrum/availability.js +1 -1
- package/src/common-auth-embedded/claustrum/custody.js +1 -1
- package/src/common-auth-embedded/fs/private-files.js +14 -5
- package/src/common-auth-embedded/opencode2/index.d.ts +1 -1
- package/src/common-auth-embedded/opencode2/index.js +1 -1
- package/src/common-auth-embedded/opencode2/install.d.ts +6 -1
- package/src/common-auth-embedded/opencode2/install.js +14 -4
- package/src/common-auth-embedded/opencode2/types.d.ts +10 -7
- package/src/common-auth-embedded/pi-slot/index.d.ts +1 -1
- package/src/common-auth-embedded/pi-slot/index.js +1 -1
- package/src/common-auth-embedded/pi-slot/slot.d.ts +6 -9
- package/src/common-auth-embedded/pi-slot/slot.js +42 -105
- package/src/common-auth-embedded/routing-accessor/index.d.ts +66 -16
- package/src/common-auth-embedded/routing-accessor/index.js +123 -17
- package/src/common-auth-embedded/rpc/index.d.ts +1 -1
- package/src/common-auth-embedded/rpc/index.js +1 -1
- package/src/common-auth-embedded/rpc/port-file.d.ts +4 -0
- package/src/common-auth-embedded/rpc/port-file.js +55 -49
- package/src/common-auth-embedded/rpc/rpc-server.js +3 -2
- package/src/common-auth-embedded/rpc/startup-sweep.js +32 -0
- package/src/common-auth-embedded/source-output.json +77 -68
- package/src/common-auth-embedded/store/mutate.js +34 -13
- package/src/tui-compiled/common-auth-embedded/fs/private-files.js +14 -5
- package/src/tui-compiled/common-auth-embedded/rpc/port-file.js +55 -49
- package/src/tui-raw/common-auth-embedded/fs/private-files.js +14 -5
- package/src/tui-raw/common-auth-embedded/rpc/port-file.js +55 -49
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema": 1,
|
|
3
3
|
"package": "@cortexkit/common-auth",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.55.0",
|
|
5
5
|
"artifactStatus": "published",
|
|
6
|
+
"archiveBytes": 502568,
|
|
6
7
|
"publicRoots": {
|
|
7
8
|
"./rpc": {
|
|
8
9
|
"types": "./dist/rpc/index.d.ts",
|
|
@@ -73,16 +74,16 @@
|
|
|
73
74
|
"import": "./src/quota-sidebar/index.tsx"
|
|
74
75
|
}
|
|
75
76
|
},
|
|
76
|
-
"input": "tools/common-auth-build/inputs/cortexkit-common-auth-0.
|
|
77
|
-
"tarballSha256": "
|
|
78
|
-
"sri": "sha512-
|
|
79
|
-
"shasum": "
|
|
80
|
-
"canonicalFiles":
|
|
81
|
-
"canonicalBytes":
|
|
77
|
+
"input": "tools/common-auth-build/inputs/cortexkit-common-auth-0.55.0.tgz",
|
|
78
|
+
"tarballSha256": "b629e10e9a39c5b1e6dc7576c2d5814a23a5bbb2dad8d6c1ccddb759c14d200c",
|
|
79
|
+
"sri": "sha512-EScwmEDdxSdW/z+6n1v630bsTdAUSQYBuG4l16yziRqptG4MhjCAoH6aNelSy/I3hIJ2j6bV3IcqteoGWBLpSg==",
|
|
80
|
+
"shasum": "8a5d3a07ec72662120305388d051c0bdcee416f4",
|
|
81
|
+
"canonicalFiles": 257,
|
|
82
|
+
"canonicalBytes": 1522655,
|
|
82
83
|
"generator": {
|
|
83
84
|
"path": "packages/opencode/scripts/embed-common-auth.ts",
|
|
84
85
|
"version": 4,
|
|
85
|
-
"sha256": "
|
|
86
|
+
"sha256": "d4f9c099ec2dd6a53cd0b7a35e5571be94e24176c7e01347e4ea20b92eed13fd"
|
|
86
87
|
},
|
|
87
88
|
"files": [
|
|
88
89
|
{
|
|
@@ -256,9 +257,9 @@
|
|
|
256
257
|
{
|
|
257
258
|
"source": "package/dist/claustrum/availability.js",
|
|
258
259
|
"output": "claustrum/availability.js",
|
|
259
|
-
"bytes":
|
|
260
|
-
"sourceSha256": "
|
|
261
|
-
"outputSha256": "
|
|
260
|
+
"bytes": 4613,
|
|
261
|
+
"sourceSha256": "848f2c5224a37b903b186cd5dd43710ad0d5cfe590600263b613b0ea22ff1585",
|
|
262
|
+
"outputSha256": "848f2c5224a37b903b186cd5dd43710ad0d5cfe590600263b613b0ea22ff1585",
|
|
262
263
|
"transform": "verbatim"
|
|
263
264
|
},
|
|
264
265
|
{
|
|
@@ -288,9 +289,9 @@
|
|
|
288
289
|
{
|
|
289
290
|
"source": "package/dist/claustrum/custody.js",
|
|
290
291
|
"output": "claustrum/custody.js",
|
|
291
|
-
"bytes":
|
|
292
|
-
"sourceSha256": "
|
|
293
|
-
"outputSha256": "
|
|
292
|
+
"bytes": 43686,
|
|
293
|
+
"sourceSha256": "174adfdaa909149453a34666fdf656aff90c7357e0000338c5a0a2a29d7c1e90",
|
|
294
|
+
"outputSha256": "174adfdaa909149453a34666fdf656aff90c7357e0000338c5a0a2a29d7c1e90",
|
|
294
295
|
"transform": "verbatim"
|
|
295
296
|
},
|
|
296
297
|
{
|
|
@@ -680,9 +681,9 @@
|
|
|
680
681
|
{
|
|
681
682
|
"source": "package/dist/fs/private-files.js",
|
|
682
683
|
"output": "fs/private-files.js",
|
|
683
|
-
"bytes":
|
|
684
|
-
"sourceSha256": "
|
|
685
|
-
"outputSha256": "
|
|
684
|
+
"bytes": 15526,
|
|
685
|
+
"sourceSha256": "8456644c921d76d1946c9c04a6784308dfbc4c22be19d88d5b15bf629d5f4226",
|
|
686
|
+
"outputSha256": "8456644c921d76d1946c9c04a6784308dfbc4c22be19d88d5b15bf629d5f4226",
|
|
686
687
|
"transform": "verbatim"
|
|
687
688
|
},
|
|
688
689
|
{
|
|
@@ -896,33 +897,33 @@
|
|
|
896
897
|
{
|
|
897
898
|
"source": "package/dist/opencode2/index.d.ts",
|
|
898
899
|
"output": "opencode2/index.d.ts",
|
|
899
|
-
"bytes":
|
|
900
|
-
"sourceSha256": "
|
|
901
|
-
"outputSha256": "
|
|
900
|
+
"bytes": 1325,
|
|
901
|
+
"sourceSha256": "03baf6a3ea7b26545ec20a03588ac7f30830c84e15f4bbde51d268218ff3e284",
|
|
902
|
+
"outputSha256": "03baf6a3ea7b26545ec20a03588ac7f30830c84e15f4bbde51d268218ff3e284",
|
|
902
903
|
"transform": "verbatim"
|
|
903
904
|
},
|
|
904
905
|
{
|
|
905
906
|
"source": "package/dist/opencode2/index.js",
|
|
906
907
|
"output": "opencode2/index.js",
|
|
907
|
-
"bytes":
|
|
908
|
-
"sourceSha256": "
|
|
909
|
-
"outputSha256": "
|
|
908
|
+
"bytes": 485,
|
|
909
|
+
"sourceSha256": "0a68a5e9af890954e96172fd475ea20e6e137ad20feb0c5ad014d4ea33dfd198",
|
|
910
|
+
"outputSha256": "0a68a5e9af890954e96172fd475ea20e6e137ad20feb0c5ad014d4ea33dfd198",
|
|
910
911
|
"transform": "verbatim"
|
|
911
912
|
},
|
|
912
913
|
{
|
|
913
914
|
"source": "package/dist/opencode2/install.d.ts",
|
|
914
915
|
"output": "opencode2/install.d.ts",
|
|
915
|
-
"bytes":
|
|
916
|
-
"sourceSha256": "
|
|
917
|
-
"outputSha256": "
|
|
916
|
+
"bytes": 4212,
|
|
917
|
+
"sourceSha256": "edb14a4f60ef24c85b5e4f41f94b66b5594f38628c65145841fa4bcf1bf319f6",
|
|
918
|
+
"outputSha256": "edb14a4f60ef24c85b5e4f41f94b66b5594f38628c65145841fa4bcf1bf319f6",
|
|
918
919
|
"transform": "verbatim"
|
|
919
920
|
},
|
|
920
921
|
{
|
|
921
922
|
"source": "package/dist/opencode2/install.js",
|
|
922
923
|
"output": "opencode2/install.js",
|
|
923
|
-
"bytes":
|
|
924
|
-
"sourceSha256": "
|
|
925
|
-
"outputSha256": "
|
|
924
|
+
"bytes": 65592,
|
|
925
|
+
"sourceSha256": "fc98e6bd26a6835d118666b1f27fc0598dbe9f929d793b2fe619d3be7375b988",
|
|
926
|
+
"outputSha256": "fc98e6bd26a6835d118666b1f27fc0598dbe9f929d793b2fe619d3be7375b988",
|
|
926
927
|
"transform": "verbatim"
|
|
927
928
|
},
|
|
928
929
|
{
|
|
@@ -960,25 +961,25 @@
|
|
|
960
961
|
{
|
|
961
962
|
"source": "package/dist/opencode2/types.d.ts",
|
|
962
963
|
"output": "opencode2/types.d.ts",
|
|
963
|
-
"bytes":
|
|
964
|
-
"sourceSha256": "
|
|
965
|
-
"outputSha256": "
|
|
964
|
+
"bytes": 32971,
|
|
965
|
+
"sourceSha256": "955be769b8aacbc13f51d16a94639658424b3e02e29c2a252b4b872bfde9096f",
|
|
966
|
+
"outputSha256": "955be769b8aacbc13f51d16a94639658424b3e02e29c2a252b4b872bfde9096f",
|
|
966
967
|
"transform": "verbatim"
|
|
967
968
|
},
|
|
968
969
|
{
|
|
969
970
|
"source": "package/dist/pi-slot/index.d.ts",
|
|
970
971
|
"output": "pi-slot/index.d.ts",
|
|
971
|
-
"bytes":
|
|
972
|
-
"sourceSha256": "
|
|
973
|
-
"outputSha256": "
|
|
972
|
+
"bytes": 253,
|
|
973
|
+
"sourceSha256": "d095c841ccfdf0d40665409a03c459e1143ba39d7dd9f9ad4ed424592ced3e26",
|
|
974
|
+
"outputSha256": "d095c841ccfdf0d40665409a03c459e1143ba39d7dd9f9ad4ed424592ced3e26",
|
|
974
975
|
"transform": "verbatim"
|
|
975
976
|
},
|
|
976
977
|
{
|
|
977
978
|
"source": "package/dist/pi-slot/index.js",
|
|
978
979
|
"output": "pi-slot/index.js",
|
|
979
|
-
"bytes":
|
|
980
|
-
"sourceSha256": "
|
|
981
|
-
"outputSha256": "
|
|
980
|
+
"bytes": 161,
|
|
981
|
+
"sourceSha256": "d12cf2c6d6ee31c089955de1ef7d6039afbe08e7792e1702fdf83cd10d8a084d",
|
|
982
|
+
"outputSha256": "d12cf2c6d6ee31c089955de1ef7d6039afbe08e7792e1702fdf83cd10d8a084d",
|
|
982
983
|
"transform": "verbatim"
|
|
983
984
|
},
|
|
984
985
|
{
|
|
@@ -992,17 +993,17 @@
|
|
|
992
993
|
{
|
|
993
994
|
"source": "package/dist/pi-slot/slot.d.ts",
|
|
994
995
|
"output": "pi-slot/slot.d.ts",
|
|
995
|
-
"bytes":
|
|
996
|
-
"sourceSha256": "
|
|
997
|
-
"outputSha256": "
|
|
996
|
+
"bytes": 2135,
|
|
997
|
+
"sourceSha256": "bf45905365a9f9eb6be3e54e845420a3b22de479c51fe1c5c8d5009468a2f9b3",
|
|
998
|
+
"outputSha256": "bf45905365a9f9eb6be3e54e845420a3b22de479c51fe1c5c8d5009468a2f9b3",
|
|
998
999
|
"transform": "verbatim"
|
|
999
1000
|
},
|
|
1000
1001
|
{
|
|
1001
1002
|
"source": "package/dist/pi-slot/slot.js",
|
|
1002
1003
|
"output": "pi-slot/slot.js",
|
|
1003
|
-
"bytes":
|
|
1004
|
-
"sourceSha256": "
|
|
1005
|
-
"outputSha256": "
|
|
1004
|
+
"bytes": 12323,
|
|
1005
|
+
"sourceSha256": "f7bf6aada7b772b3e7214a7fbe3d3bb993307905041b31ad712e608e4c3f3636",
|
|
1006
|
+
"outputSha256": "f7bf6aada7b772b3e7214a7fbe3d3bb993307905041b31ad712e608e4c3f3636",
|
|
1006
1007
|
"transform": "verbatim"
|
|
1007
1008
|
},
|
|
1008
1009
|
{
|
|
@@ -1224,17 +1225,17 @@
|
|
|
1224
1225
|
{
|
|
1225
1226
|
"source": "package/dist/rpc/index.d.ts",
|
|
1226
1227
|
"output": "rpc/index.d.ts",
|
|
1227
|
-
"bytes":
|
|
1228
|
-
"sourceSha256": "
|
|
1229
|
-
"outputSha256": "
|
|
1228
|
+
"bytes": 603,
|
|
1229
|
+
"sourceSha256": "30cd1c8dfe8f0fee79139e72c376a3e1da0d98284ce7549af5fc1e7a97b7f1df",
|
|
1230
|
+
"outputSha256": "30cd1c8dfe8f0fee79139e72c376a3e1da0d98284ce7549af5fc1e7a97b7f1df",
|
|
1230
1231
|
"transform": "verbatim"
|
|
1231
1232
|
},
|
|
1232
1233
|
{
|
|
1233
1234
|
"source": "package/dist/rpc/index.js",
|
|
1234
1235
|
"output": "rpc/index.js",
|
|
1235
|
-
"bytes":
|
|
1236
|
-
"sourceSha256": "
|
|
1237
|
-
"outputSha256": "
|
|
1236
|
+
"bytes": 308,
|
|
1237
|
+
"sourceSha256": "26d0da9478fb8e7f10939321515388cce283070ea9b1df3132c74350c7a2b435",
|
|
1238
|
+
"outputSha256": "26d0da9478fb8e7f10939321515388cce283070ea9b1df3132c74350c7a2b435",
|
|
1238
1239
|
"transform": "verbatim"
|
|
1239
1240
|
},
|
|
1240
1241
|
{
|
|
@@ -1256,17 +1257,17 @@
|
|
|
1256
1257
|
{
|
|
1257
1258
|
"source": "package/dist/rpc/port-file.d.ts",
|
|
1258
1259
|
"output": "rpc/port-file.d.ts",
|
|
1259
|
-
"bytes":
|
|
1260
|
-
"sourceSha256": "
|
|
1261
|
-
"outputSha256": "
|
|
1260
|
+
"bytes": 2293,
|
|
1261
|
+
"sourceSha256": "e4b3574f71fa5a497b1d806913d19811e0baa0cc107165b4b99533453396484d",
|
|
1262
|
+
"outputSha256": "e4b3574f71fa5a497b1d806913d19811e0baa0cc107165b4b99533453396484d",
|
|
1262
1263
|
"transform": "verbatim"
|
|
1263
1264
|
},
|
|
1264
1265
|
{
|
|
1265
1266
|
"source": "package/dist/rpc/port-file.js",
|
|
1266
1267
|
"output": "rpc/port-file.js",
|
|
1267
|
-
"bytes":
|
|
1268
|
-
"sourceSha256": "
|
|
1269
|
-
"outputSha256": "
|
|
1268
|
+
"bytes": 10758,
|
|
1269
|
+
"sourceSha256": "2c497513d8a3f185f17e55633b50883f633421cbe12305e0c46f86b6b820d9f2",
|
|
1270
|
+
"outputSha256": "2c497513d8a3f185f17e55633b50883f633421cbe12305e0c46f86b6b820d9f2",
|
|
1270
1271
|
"transform": "verbatim"
|
|
1271
1272
|
},
|
|
1272
1273
|
{
|
|
@@ -1296,9 +1297,9 @@
|
|
|
1296
1297
|
{
|
|
1297
1298
|
"source": "package/dist/rpc/rpc-server.js",
|
|
1298
1299
|
"output": "rpc/rpc-server.js",
|
|
1299
|
-
"bytes":
|
|
1300
|
-
"sourceSha256": "
|
|
1301
|
-
"outputSha256": "
|
|
1300
|
+
"bytes": 14282,
|
|
1301
|
+
"sourceSha256": "658fc7e48f327037bbb5e4e0b750417426865b06f08914cd2d775fe7f34bd8b7",
|
|
1302
|
+
"outputSha256": "658fc7e48f327037bbb5e4e0b750417426865b06f08914cd2d775fe7f34bd8b7",
|
|
1302
1303
|
"transform": "verbatim"
|
|
1303
1304
|
},
|
|
1304
1305
|
{
|
|
@@ -1317,6 +1318,14 @@
|
|
|
1317
1318
|
"outputSha256": "7a7bb67f11f072e2fd655694445458295c5461579bc4e73b11559c9d18d3c93d",
|
|
1318
1319
|
"transform": "verbatim"
|
|
1319
1320
|
},
|
|
1321
|
+
{
|
|
1322
|
+
"source": "package/dist/rpc/startup-sweep.js",
|
|
1323
|
+
"output": "rpc/startup-sweep.js",
|
|
1324
|
+
"bytes": 1356,
|
|
1325
|
+
"sourceSha256": "674fe3a16b48b3c184273d7bc55531b83e703b6aa32f2413aec98a50f0dd1e30",
|
|
1326
|
+
"outputSha256": "674fe3a16b48b3c184273d7bc55531b83e703b6aa32f2413aec98a50f0dd1e30",
|
|
1327
|
+
"transform": "verbatim"
|
|
1328
|
+
},
|
|
1320
1329
|
{
|
|
1321
1330
|
"source": "package/dist/settings/define.d.ts",
|
|
1322
1331
|
"output": "settings/define.d.ts",
|
|
@@ -1848,9 +1857,9 @@
|
|
|
1848
1857
|
{
|
|
1849
1858
|
"source": "package/dist/store/mutate.js",
|
|
1850
1859
|
"output": "store/mutate.js",
|
|
1851
|
-
"bytes":
|
|
1852
|
-
"sourceSha256": "
|
|
1853
|
-
"outputSha256": "
|
|
1860
|
+
"bytes": 21075,
|
|
1861
|
+
"sourceSha256": "e2b69c850dface416ff3ebc54e2f57fd5c36b5346055b90195493cada75b6901",
|
|
1862
|
+
"outputSha256": "e2b69c850dface416ff3ebc54e2f57fd5c36b5346055b90195493cada75b6901",
|
|
1854
1863
|
"transform": "verbatim"
|
|
1855
1864
|
},
|
|
1856
1865
|
{
|
|
@@ -2120,17 +2129,17 @@
|
|
|
2120
2129
|
{
|
|
2121
2130
|
"source": "package/dist/routing-accessor/index.d.ts",
|
|
2122
2131
|
"output": "routing-accessor/index.d.ts",
|
|
2123
|
-
"bytes":
|
|
2124
|
-
"sourceSha256": "
|
|
2125
|
-
"outputSha256": "
|
|
2132
|
+
"bytes": 10161,
|
|
2133
|
+
"sourceSha256": "9a53d387aea7a3423225372bd8a61000838e1c7bb5818c93a32455f2037c315f",
|
|
2134
|
+
"outputSha256": "9a53d387aea7a3423225372bd8a61000838e1c7bb5818c93a32455f2037c315f",
|
|
2126
2135
|
"transform": "verbatim"
|
|
2127
2136
|
},
|
|
2128
2137
|
{
|
|
2129
2138
|
"source": "package/dist/routing-accessor/index.js",
|
|
2130
2139
|
"output": "routing-accessor/index.js",
|
|
2131
|
-
"bytes":
|
|
2132
|
-
"sourceSha256": "
|
|
2133
|
-
"outputSha256": "
|
|
2140
|
+
"bytes": 22848,
|
|
2141
|
+
"sourceSha256": "13f13701391958c2e1f52d614a78da8d276594a90ee54b4f6af33bf81b4ca669",
|
|
2142
|
+
"outputSha256": "13f13701391958c2e1f52d614a78da8d276594a90ee54b4f6af33bf81b4ca669",
|
|
2134
2143
|
"transform": "verbatim"
|
|
2135
2144
|
}
|
|
2136
2145
|
],
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { setTimeout as
|
|
1
|
+
import { setTimeout as delay } from 'node:timers/promises';
|
|
2
2
|
import { AtomicSyncError, syncJsonFile, writeJsonAtomic, writeJsonAtomicTracked, } from '../fs/atomic-write.js';
|
|
3
|
-
import { readPrivateText, windowsPrivateFiles } from '../fs/private-files.js';
|
|
3
|
+
import { isWindowsSharingViolation, readPrivateText, windowsPrivateFiles, } from '../fs/private-files.js';
|
|
4
4
|
import { LockContentionError, LockOwnershipError } from '../fs/with-lock.js';
|
|
5
5
|
import { PoolOperationError, } from './errors.js';
|
|
6
6
|
import { callFailureHook } from './hooks.js';
|
|
@@ -8,14 +8,25 @@ import { LockStack, } from './refresh-lock.js';
|
|
|
8
8
|
import { assertNotReserved } from './reserved.js';
|
|
9
9
|
import { CREDENTIAL_STAMP_KEY, classifyConfig, classifyState, ensureEntries, entryIn, isRecord, LEGACY_STORE_VERSION, POOL_KEY, POOL_ROWS_KEY, POOL_SCHEMA_VERSION, retireEpochsIn, rosterOf, rosterRowIn, setEntryIn, } from './schema.js';
|
|
10
10
|
import { completeTornRows, loadRows } from './torn.js';
|
|
11
|
+
// About 1 s in total. A replace usually clears in milliseconds, but an
|
|
12
|
+
// OpenCode 2 turn ends if the first pool read of a request fails, and a
|
|
13
|
+
// scanner opening the new file can hold it longer.
|
|
14
|
+
const sharingRetryDelays = [5, 10, 20, 40, 80, 160, 320, 400];
|
|
11
15
|
async function readText(path) {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
for (let attempt = 0;; attempt++) {
|
|
17
|
+
try {
|
|
18
|
+
return await readPrivateText(path, windowsPrivateFiles);
|
|
19
|
+
}
|
|
20
|
+
catch (error) {
|
|
21
|
+
if (error.code === 'ENOENT')
|
|
22
|
+
return undefined;
|
|
23
|
+
const wait = sharingRetryDelays[attempt];
|
|
24
|
+
// An atomic replace can briefly block a Windows read. Permission
|
|
25
|
+
// refusals are not evidence of a replace and must still surface at once.
|
|
26
|
+
if (wait === undefined || !isWindowsSharingViolation(error))
|
|
27
|
+
throw error;
|
|
28
|
+
await delay(wait);
|
|
29
|
+
}
|
|
19
30
|
}
|
|
20
31
|
}
|
|
21
32
|
function parseFile(text) {
|
|
@@ -39,12 +50,22 @@ export async function readPoolConfig(path) {
|
|
|
39
50
|
*/
|
|
40
51
|
export async function readPool(ctx) {
|
|
41
52
|
for (let attempt = 0; attempt < 3; attempt++) {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
53
|
+
let configText;
|
|
54
|
+
let stateText;
|
|
55
|
+
let checkedConfigText;
|
|
56
|
+
try {
|
|
57
|
+
configText = await readText(ctx.configPath);
|
|
58
|
+
stateText = await readText(ctx.statePath);
|
|
59
|
+
checkedConfigText = await readText(ctx.configPath);
|
|
60
|
+
}
|
|
61
|
+
catch (error) {
|
|
62
|
+
if (isWindowsSharingViolation(error))
|
|
63
|
+
break;
|
|
64
|
+
throw error;
|
|
65
|
+
}
|
|
45
66
|
if (configText !== checkedConfigText) {
|
|
46
67
|
if (attempt < 2)
|
|
47
|
-
await
|
|
68
|
+
await delay(2 + Math.floor(Math.random() * 4));
|
|
48
69
|
continue;
|
|
49
70
|
}
|
|
50
71
|
const config = classifyConfig(parseFile(configText));
|
|
@@ -24,7 +24,9 @@ export function setPrivateFilesBackendForTest(api) {
|
|
|
24
24
|
/** The fixed `reason` of a refusal because the Windows native addon did not load. */
|
|
25
25
|
export const PRIVATE_FILES_UNAVAILABLE_REASON = 'native-addon-unavailable';
|
|
26
26
|
function privateFilesUnavailable(cause) {
|
|
27
|
-
return Object.assign(new Error('Windows private-files native addon
|
|
27
|
+
return Object.assign(new Error('Windows private-files native addon could not be loaded', {
|
|
28
|
+
cause,
|
|
29
|
+
}), {
|
|
28
30
|
code: 'ERR_PRIVATE_FILES_UNAVAILABLE',
|
|
29
31
|
reason: PRIVATE_FILES_UNAVAILABLE_REASON,
|
|
30
32
|
});
|
|
@@ -68,6 +70,10 @@ function loadBackend() {
|
|
|
68
70
|
});
|
|
69
71
|
return backend;
|
|
70
72
|
}
|
|
73
|
+
function isSharingIoError(detail) {
|
|
74
|
+
return (detail?.reason === 'io-error' &&
|
|
75
|
+
(detail.win32Code === 32 || detail.win32Code === 303));
|
|
76
|
+
}
|
|
71
77
|
export class PrivateFileError extends Error {
|
|
72
78
|
path;
|
|
73
79
|
stage;
|
|
@@ -83,8 +89,12 @@ export class PrivateFileError extends Error {
|
|
|
83
89
|
constructor(path, stage, cause) {
|
|
84
90
|
const detail = cause;
|
|
85
91
|
super(detail?.code === 'ERR_PRIVATE_FILES_UNAVAILABLE'
|
|
86
|
-
?
|
|
87
|
-
|
|
92
|
+
? // The reason stays on `.reason`: its word "unavailable" would make
|
|
93
|
+
// OpenCode 1 retry a plain error carrying this message.
|
|
94
|
+
`Private file refused at ${stage}: ${path}. The Windows native addon of @cortexkit/private-files could not be loaded, so owner-only access cannot be enforced and nothing was read or written. Reinstall the plugin so the private-files Windows prebuild for this architecture is present; Windows has no safe fallback to permission bits.`
|
|
95
|
+
: isSharingIoError(detail)
|
|
96
|
+
? `Private file busy at ${stage}: ${path}. Another process was replacing or deleting this file at the same moment (Windows error ${detail.win32Code}).`
|
|
97
|
+
: `Private file refused at ${stage}: ${path} (${detail?.reason ?? detail?.code ?? 'io-error'}). Keep this file in a folder that only you, the system or administrators can change, such as a folder in your home directory. If other users could read the file before, sign in again to replace the credentials it held. On Windows the file must also be on a local drive that keeps Windows file permissions, such as NTFS.`, { cause });
|
|
88
98
|
this.path = path;
|
|
89
99
|
this.stage = stage;
|
|
90
100
|
this.name = 'PrivateFileError';
|
|
@@ -97,8 +107,7 @@ export class PrivateFileError extends Error {
|
|
|
97
107
|
export function isWindowsSharingViolation(error) {
|
|
98
108
|
return (windowsPrivateFiles &&
|
|
99
109
|
error instanceof PrivateFileError &&
|
|
100
|
-
error
|
|
101
|
-
(error.win32Code === 32 || error.win32Code === 303));
|
|
110
|
+
isSharingIoError(error));
|
|
102
111
|
}
|
|
103
112
|
export async function privateOperation(path, stage, operation) {
|
|
104
113
|
try {
|
|
@@ -94,9 +94,8 @@ async function removeCorruptPortFile(portFile, log) {
|
|
|
94
94
|
export async function writePortFile(dir, entry, options = {}) {
|
|
95
95
|
// The directory can be removed by another project's sweep between our
|
|
96
96
|
// mkdir and the first open/rename, so the whole create-then-rename
|
|
97
|
-
// unit
|
|
98
|
-
//
|
|
99
|
-
// the second attempt — failing fast beats an unbounded loop.
|
|
97
|
+
// unit gets up to five attempts on ENOENT. Each retry recreates the
|
|
98
|
+
// directory after a short delay, but persistent removal still surfaces.
|
|
100
99
|
const writeOnce = async () => {
|
|
101
100
|
const target = join(dir, `port-${entry.pid}.json`);
|
|
102
101
|
if (windowsPrivateFiles) {
|
|
@@ -136,14 +135,15 @@ export async function writePortFile(dir, entry, options = {}) {
|
|
|
136
135
|
}
|
|
137
136
|
return target;
|
|
138
137
|
};
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
}
|
|
142
|
-
catch (error) {
|
|
143
|
-
if (error.code === 'ENOENT') {
|
|
138
|
+
for (let attempt = 1;; attempt += 1) {
|
|
139
|
+
try {
|
|
144
140
|
return await writeOnce();
|
|
145
141
|
}
|
|
146
|
-
|
|
142
|
+
catch (error) {
|
|
143
|
+
if (error.code !== 'ENOENT' || attempt === 5)
|
|
144
|
+
throw error;
|
|
145
|
+
await new Promise((resolve) => setTimeout(resolve, 25));
|
|
146
|
+
}
|
|
147
147
|
}
|
|
148
148
|
}
|
|
149
149
|
export async function sweepRpcState(root, activeDir, isManagedDir, log, options = {}) {
|
|
@@ -163,52 +163,58 @@ export async function sweepRpcState(root, activeDir, isManagedDir, log, options
|
|
|
163
163
|
continue;
|
|
164
164
|
}
|
|
165
165
|
const dir = join(root, projectDir.name);
|
|
166
|
-
|
|
166
|
+
if (!(await sweepRpcDirectory(dir, log, options, cutoff)))
|
|
167
|
+
continue;
|
|
168
|
+
if (resolve(dir) !== active)
|
|
169
|
+
await rmdir(dir).catch(() => { });
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
/** Internal folder cleanup shared by full and throttled startup sweeps. */
|
|
173
|
+
export async function sweepRpcDirectory(dir, log, options = {}, cutoff = staleBefore(options)) {
|
|
174
|
+
let names;
|
|
175
|
+
try {
|
|
176
|
+
names = await readdir(dir);
|
|
177
|
+
}
|
|
178
|
+
catch (error) {
|
|
179
|
+
if (error.code === 'ENOENT')
|
|
180
|
+
return false;
|
|
181
|
+
throw error;
|
|
182
|
+
}
|
|
183
|
+
for (const name of names) {
|
|
184
|
+
if (!name.startsWith('port-') || !name.endsWith('.json'))
|
|
185
|
+
continue;
|
|
186
|
+
const portFile = join(dir, name);
|
|
187
|
+
const info = await stat(portFile).catch(() => undefined);
|
|
188
|
+
let raw;
|
|
167
189
|
try {
|
|
168
|
-
|
|
190
|
+
raw = await readPrivateText(portFile);
|
|
169
191
|
}
|
|
170
192
|
catch (error) {
|
|
171
|
-
if (error.code
|
|
172
|
-
|
|
173
|
-
|
|
193
|
+
if (error instanceof PrivateFileError && error.code !== 'ENOENT')
|
|
194
|
+
throw error;
|
|
195
|
+
continue;
|
|
174
196
|
}
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
let raw;
|
|
181
|
-
try {
|
|
182
|
-
raw = await readPrivateText(portFile);
|
|
183
|
-
}
|
|
184
|
-
catch (error) {
|
|
185
|
-
if (error instanceof PrivateFileError && error.code !== 'ENOENT')
|
|
186
|
-
throw error;
|
|
187
|
-
continue;
|
|
188
|
-
}
|
|
189
|
-
if (raw === undefined)
|
|
190
|
-
continue;
|
|
191
|
-
let parsed;
|
|
192
|
-
try {
|
|
193
|
-
parsed = JSON.parse(raw);
|
|
194
|
-
}
|
|
195
|
-
catch {
|
|
196
|
-
await removeCorruptPortFile(portFile, log);
|
|
197
|
-
continue;
|
|
198
|
-
}
|
|
199
|
-
if (!isUsablePortFileEntry(parsed, name)) {
|
|
200
|
-
await removeCorruptPortFile(portFile, log);
|
|
201
|
-
continue;
|
|
202
|
-
}
|
|
203
|
-
const entry = parsed;
|
|
204
|
-
if (!pidAlive(entry.pid))
|
|
205
|
-
await unlink(portFile).catch(() => { });
|
|
206
|
-
else if (isStalePortFile(entry, info, cutoff))
|
|
207
|
-
await removeStalePortFile(portFile, raw, info, options.beforeRemove);
|
|
197
|
+
if (raw === undefined)
|
|
198
|
+
continue;
|
|
199
|
+
let parsed;
|
|
200
|
+
try {
|
|
201
|
+
parsed = JSON.parse(raw);
|
|
208
202
|
}
|
|
209
|
-
|
|
210
|
-
await
|
|
203
|
+
catch {
|
|
204
|
+
await removeCorruptPortFile(portFile, log);
|
|
205
|
+
continue;
|
|
206
|
+
}
|
|
207
|
+
if (!isUsablePortFileEntry(parsed, name)) {
|
|
208
|
+
await removeCorruptPortFile(portFile, log);
|
|
209
|
+
continue;
|
|
210
|
+
}
|
|
211
|
+
const entry = parsed;
|
|
212
|
+
if (!pidAlive(entry.pid))
|
|
213
|
+
await unlink(portFile).catch(() => { });
|
|
214
|
+
else if (isStalePortFile(entry, info, cutoff))
|
|
215
|
+
await removeStalePortFile(portFile, raw, info, options.beforeRemove);
|
|
211
216
|
}
|
|
217
|
+
return true;
|
|
212
218
|
}
|
|
213
219
|
/** Internal cache validation: probe only the selected file and its PID. */
|
|
214
220
|
export async function portFileIdentity(dir, entry, options = {}) {
|
|
@@ -24,7 +24,9 @@ export function setPrivateFilesBackendForTest(api) {
|
|
|
24
24
|
/** The fixed `reason` of a refusal because the Windows native addon did not load. */
|
|
25
25
|
export const PRIVATE_FILES_UNAVAILABLE_REASON = 'native-addon-unavailable';
|
|
26
26
|
function privateFilesUnavailable(cause) {
|
|
27
|
-
return Object.assign(new Error('Windows private-files native addon
|
|
27
|
+
return Object.assign(new Error('Windows private-files native addon could not be loaded', {
|
|
28
|
+
cause,
|
|
29
|
+
}), {
|
|
28
30
|
code: 'ERR_PRIVATE_FILES_UNAVAILABLE',
|
|
29
31
|
reason: PRIVATE_FILES_UNAVAILABLE_REASON,
|
|
30
32
|
});
|
|
@@ -68,6 +70,10 @@ function loadBackend() {
|
|
|
68
70
|
});
|
|
69
71
|
return backend;
|
|
70
72
|
}
|
|
73
|
+
function isSharingIoError(detail) {
|
|
74
|
+
return (detail?.reason === 'io-error' &&
|
|
75
|
+
(detail.win32Code === 32 || detail.win32Code === 303));
|
|
76
|
+
}
|
|
71
77
|
export class PrivateFileError extends Error {
|
|
72
78
|
path;
|
|
73
79
|
stage;
|
|
@@ -83,8 +89,12 @@ export class PrivateFileError extends Error {
|
|
|
83
89
|
constructor(path, stage, cause) {
|
|
84
90
|
const detail = cause;
|
|
85
91
|
super(detail?.code === 'ERR_PRIVATE_FILES_UNAVAILABLE'
|
|
86
|
-
?
|
|
87
|
-
|
|
92
|
+
? // The reason stays on `.reason`: its word "unavailable" would make
|
|
93
|
+
// OpenCode 1 retry a plain error carrying this message.
|
|
94
|
+
`Private file refused at ${stage}: ${path}. The Windows native addon of @cortexkit/private-files could not be loaded, so owner-only access cannot be enforced and nothing was read or written. Reinstall the plugin so the private-files Windows prebuild for this architecture is present; Windows has no safe fallback to permission bits.`
|
|
95
|
+
: isSharingIoError(detail)
|
|
96
|
+
? `Private file busy at ${stage}: ${path}. Another process was replacing or deleting this file at the same moment (Windows error ${detail.win32Code}).`
|
|
97
|
+
: `Private file refused at ${stage}: ${path} (${detail?.reason ?? detail?.code ?? 'io-error'}). Keep this file in a folder that only you, the system or administrators can change, such as a folder in your home directory. If other users could read the file before, sign in again to replace the credentials it held. On Windows the file must also be on a local drive that keeps Windows file permissions, such as NTFS.`, { cause });
|
|
88
98
|
this.path = path;
|
|
89
99
|
this.stage = stage;
|
|
90
100
|
this.name = 'PrivateFileError';
|
|
@@ -97,8 +107,7 @@ export class PrivateFileError extends Error {
|
|
|
97
107
|
export function isWindowsSharingViolation(error) {
|
|
98
108
|
return (windowsPrivateFiles &&
|
|
99
109
|
error instanceof PrivateFileError &&
|
|
100
|
-
error
|
|
101
|
-
(error.win32Code === 32 || error.win32Code === 303));
|
|
110
|
+
isSharingIoError(error));
|
|
102
111
|
}
|
|
103
112
|
export async function privateOperation(path, stage, operation) {
|
|
104
113
|
try {
|