@cortexkit/opencode-antigravity-auth 3.0.6 → 3.0.7
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 +620 -120
- package/dist/cli.js.map +4 -4
- package/dist/cli.meta.json +128 -44
- package/dist/index.js +1469 -675
- package/dist/index.js.map +4 -4
- package/dist/index.meta.json +154 -73
- package/dist/server.js +1075 -280
- package/dist/server.js.map +4 -4
- package/dist/server.meta.json +1 -1
- package/dist/src/common-auth-embedded/claustrum/consumer.d.ts +11 -1
- package/dist/src/common-auth-embedded/claustrum/consumer.js +38 -1
- package/dist/src/common-auth-embedded/claustrum/custody.d.ts +29 -0
- package/dist/src/common-auth-embedded/claustrum/custody.js +17 -0
- package/dist/src/common-auth-embedded/claustrum/index.d.ts +1 -1
- package/dist/src/common-auth-embedded/fs/refresh-file-lock.d.ts +8 -2
- package/dist/src/common-auth-embedded/fs/refresh-file-lock.js +6 -1
- package/dist/src/common-auth-embedded/pi-slot/lock.js +7 -3
- package/dist/src/common-auth-embedded/quota/format.d.ts +14 -3
- package/dist/src/common-auth-embedded/quota/format.js +135 -18
- package/dist/src/common-auth-embedded/quota/index.d.ts +1 -1
- package/dist/src/common-auth-embedded/quota/index.js +1 -1
- package/dist/src/common-auth-embedded/setup/command-error.d.ts +32 -0
- package/dist/src/common-auth-embedded/setup/command-error.js +79 -0
- package/dist/src/common-auth-embedded/setup/command-runner.js +118 -24
- package/dist/src/common-auth-embedded/setup/command.js +75 -19
- package/dist/src/common-auth-embedded/setup/enroll.js +17 -5
- package/dist/src/common-auth-embedded/setup/index.d.ts +2 -1
- package/dist/src/common-auth-embedded/setup/index.js +1 -0
- package/dist/src/common-auth-embedded/setup/register.js +8 -2
- package/dist/src/common-auth-embedded/setup/types.d.ts +14 -0
- package/dist/src/common-auth-embedded/source-output.json +92 -76
- package/dist/src/common-auth-embedded/store/pool.d.ts +1 -1
- package/dist/src/common-auth-embedded/store/pool.js +0 -1
- package/dist/src/common-auth-embedded/store/refresh-lock.d.ts +0 -1
- package/dist/src/common-auth-embedded/store/refresh-lock.js +0 -1
- package/dist/src/ga/server/index.d.ts.map +1 -1
- package/dist/src/ga/server/index.js +4 -2
- package/dist/src/ga/server/index.js.map +1 -1
- package/dist/src/ga/tui/host-ga.d.ts.map +1 -1
- package/dist/src/ga/tui/host-ga.js +37 -3
- package/dist/src/ga/tui/host-ga.js.map +1 -1
- package/dist/src/plugin/config/schema.d.ts.map +1 -1
- package/dist/src/plugin/config/schema.js +2 -1
- package/dist/src/plugin/config/schema.js.map +1 -1
- package/dist/src/plugin/ga-location-services.d.ts.map +1 -1
- package/dist/src/plugin/ga-location-services.js +4 -3
- package/dist/src/plugin/ga-location-services.js.map +1 -1
- package/dist/src/plugin/gemini-dump.d.ts.map +1 -1
- package/dist/src/plugin/gemini-dump.js +2 -5
- package/dist/src/plugin/gemini-dump.js.map +1 -1
- package/dist/src/plugin/index.d.ts.map +1 -1
- package/dist/src/plugin/index.js +3 -3
- package/dist/src/plugin/index.js.map +1 -1
- package/dist/src/plugin/logging-utils.d.ts.map +1 -1
- package/dist/src/plugin/logging-utils.js +2 -5
- package/dist/src/plugin/logging-utils.js.map +1 -1
- package/dist/src/plugin/request.d.ts +1 -2
- package/dist/src/plugin/request.d.ts.map +1 -1
- package/dist/src/plugin/request.js +8 -12
- package/dist/src/plugin/request.js.map +1 -1
- package/dist/src/plugin/shared/request-services.d.ts +8 -1
- package/dist/src/plugin/shared/request-services.d.ts.map +1 -1
- package/dist/src/plugin/shared/request-services.js +140 -58
- package/dist/src/plugin/shared/request-services.js.map +1 -1
- package/dist/src/plugin/shared/vault-request-credentials.d.ts +12 -3
- package/dist/src/plugin/shared/vault-request-credentials.d.ts.map +1 -1
- package/dist/src/plugin/shared/vault-request-credentials.js +3 -0
- package/dist/src/plugin/shared/vault-request-credentials.js.map +1 -1
- package/dist/src/plugin/vault-custody.d.ts +14 -1
- package/dist/src/plugin/vault-custody.d.ts.map +1 -1
- package/dist/src/plugin/vault-custody.js +57 -10
- package/dist/src/plugin/vault-custody.js.map +1 -1
- package/dist/src/sidebar-projection.d.ts +4 -0
- package/dist/src/sidebar-projection.d.ts.map +1 -1
- package/dist/src/sidebar-projection.js +6 -2
- package/dist/src/sidebar-projection.js.map +1 -1
- package/dist/src/tui/quota-layout.d.ts +94 -0
- package/dist/src/tui/quota-layout.d.ts.map +1 -0
- package/dist/src/tui/quota-layout.js +139 -0
- package/dist/src/tui/quota-layout.js.map +1 -0
- package/dist/src/tui/route-layout.d.ts +8 -0
- package/dist/src/tui/route-layout.d.ts.map +1 -0
- package/dist/src/tui/route-layout.js +36 -0
- package/dist/src/tui/route-layout.js.map +1 -0
- package/dist/src/tui.d.ts.map +1 -1
- package/dist/src/tui.js +26 -128
- package/dist/src/tui.js.map +1 -1
- package/dist/tui-build-map.json +42 -13
- package/dist/tui-ga-build-map.json +46 -17
- package/dist/types/src/common-auth-embedded/claustrum/consumer.d.ts +11 -1
- package/dist/types/src/common-auth-embedded/claustrum/custody.d.ts +29 -0
- package/dist/types/src/common-auth-embedded/claustrum/index.d.ts +1 -1
- package/dist/types/src/common-auth-embedded/fs/refresh-file-lock.d.ts +8 -2
- package/dist/types/src/common-auth-embedded/quota/format.d.ts +14 -3
- package/dist/types/src/common-auth-embedded/quota/index.d.ts +1 -1
- package/dist/types/src/common-auth-embedded/setup/command-error.d.ts +32 -0
- package/dist/types/src/common-auth-embedded/setup/index.d.ts +2 -1
- package/dist/types/src/common-auth-embedded/setup/types.d.ts +14 -0
- package/dist/types/src/common-auth-embedded/store/pool.d.ts +1 -1
- package/dist/types/src/common-auth-embedded/store/refresh-lock.d.ts +0 -1
- package/dist/types/src/ga/server/index.d.ts.map +1 -1
- package/dist/types/src/plugin/config/schema.d.ts.map +1 -1
- package/dist/types/src/plugin/ga-location-services.d.ts.map +1 -1
- package/dist/types/src/plugin/gemini-dump.d.ts.map +1 -1
- package/dist/types/src/plugin/index.d.ts.map +1 -1
- package/dist/types/src/plugin/logging-utils.d.ts.map +1 -1
- package/dist/types/src/plugin/request.d.ts +1 -2
- package/dist/types/src/plugin/request.d.ts.map +1 -1
- package/dist/types/src/plugin/shared/request-services.d.ts +8 -1
- package/dist/types/src/plugin/shared/request-services.d.ts.map +1 -1
- package/dist/types/src/plugin/shared/vault-request-credentials.d.ts +12 -3
- package/dist/types/src/plugin/shared/vault-request-credentials.d.ts.map +1 -1
- package/dist/types/src/plugin/vault-custody.d.ts +14 -1
- package/dist/types/src/plugin/vault-custody.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/common-auth-embedded/claustrum/consumer.d.ts +11 -1
- package/src/common-auth-embedded/claustrum/consumer.js +38 -1
- package/src/common-auth-embedded/claustrum/custody.d.ts +29 -0
- package/src/common-auth-embedded/claustrum/custody.js +17 -0
- package/src/common-auth-embedded/claustrum/index.d.ts +1 -1
- package/src/common-auth-embedded/fs/refresh-file-lock.d.ts +8 -2
- package/src/common-auth-embedded/fs/refresh-file-lock.js +6 -1
- package/src/common-auth-embedded/pi-slot/lock.js +7 -3
- package/src/common-auth-embedded/quota/format.d.ts +14 -3
- package/src/common-auth-embedded/quota/format.js +135 -18
- package/src/common-auth-embedded/quota/index.d.ts +1 -1
- package/src/common-auth-embedded/quota/index.js +1 -1
- package/src/common-auth-embedded/setup/command-error.d.ts +32 -0
- package/src/common-auth-embedded/setup/command-error.js +79 -0
- package/src/common-auth-embedded/setup/command-runner.js +118 -24
- package/src/common-auth-embedded/setup/command.js +75 -19
- package/src/common-auth-embedded/setup/enroll.js +17 -5
- package/src/common-auth-embedded/setup/index.d.ts +2 -1
- package/src/common-auth-embedded/setup/index.js +1 -0
- package/src/common-auth-embedded/setup/register.js +8 -2
- package/src/common-auth-embedded/setup/types.d.ts +14 -0
- package/src/common-auth-embedded/source-output.json +92 -76
- package/src/common-auth-embedded/store/pool.d.ts +1 -1
- package/src/common-auth-embedded/store/pool.js +0 -1
- package/src/common-auth-embedded/store/refresh-lock.d.ts +0 -1
- package/src/common-auth-embedded/store/refresh-lock.js +0 -1
- package/src/tui-compiled/common-auth-embedded/quota/format.js +135 -18
- package/src/tui-compiled/common-auth-embedded/quota/index.js +1 -1
- package/src/tui-compiled/tui/quota-layout.js +378 -0
- package/src/tui-compiled/tui/route-layout.js +30 -0
- package/src/tui-compiled/tui.js +145 -427
- package/src/tui-ga-compiled/host-ga.js +82 -52
- package/src/tui-ga-compiled/shared/6ca47cd4ec33fe72-route-layout.js +30 -0
- package/src/tui-ga-compiled/shared/8ae1927e5910ea81-sidebar-projection.js +2 -2
- package/src/tui-ga-compiled/shared/aef2402f8fc342f0-format.js +135 -18
- package/src/tui-ga-compiled/shared/bf17cbee28e58197-index.js +1 -1
- package/src/tui-ga-compiled/shared/dd4c9e1a907f8ef0-quota-layout.js +378 -0
- package/src/tui-ga-raw/host-ga.tsx +71 -30
- package/src/tui-ga-raw/shared/6ca47cd4ec33fe72-route-layout.js +30 -0
- package/src/tui-ga-raw/shared/8ae1927e5910ea81-sidebar-projection.js +2 -2
- package/src/tui-ga-raw/shared/aef2402f8fc342f0-format.js +135 -18
- package/src/tui-ga-raw/shared/bf17cbee28e58197-index.js +1 -1
- package/src/tui-ga-raw/shared/dd4c9e1a907f8ef0-quota-layout.tsx +391 -0
- package/src/tui-raw/common-auth-embedded/quota/format.js +135 -18
- package/src/tui-raw/common-auth-embedded/quota/index.js +1 -1
- package/src/tui-raw/tui/quota-layout.tsx +391 -0
- package/src/tui-raw/tui/route-layout.js +30 -0
- package/src/tui-raw/tui.tsx +50 -309
- package/src/tui.tsx +50 -309
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema": 1,
|
|
3
3
|
"package": "@cortexkit/common-auth",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.19.0",
|
|
5
5
|
"artifactStatus": "published",
|
|
6
6
|
"publicRoots": {
|
|
7
7
|
"./rpc": {
|
|
@@ -61,15 +61,15 @@
|
|
|
61
61
|
"import": "./dist/opencode2/index.js"
|
|
62
62
|
}
|
|
63
63
|
},
|
|
64
|
-
"input": "tools/common-auth-build/inputs/cortexkit-common-auth-0.
|
|
65
|
-
"tarballSha256": "
|
|
66
|
-
"sri": "sha512-
|
|
67
|
-
"canonicalFiles":
|
|
68
|
-
"canonicalBytes":
|
|
64
|
+
"input": "tools/common-auth-build/inputs/cortexkit-common-auth-0.19.0.tgz",
|
|
65
|
+
"tarballSha256": "dd32b53e849a7d98ed861a5f9d3d81645b31169350257ef1732f7827b8684885",
|
|
66
|
+
"sri": "sha512-p7oy26dBllFF6mkQinsyyqqFP8FKoyVvHyt/aQWEGTljn0AbVRj++Co5Mict4ffQUPrujlQwThilUoPn/AsB8Q==",
|
|
67
|
+
"canonicalFiles": 178,
|
|
68
|
+
"canonicalBytes": 962914,
|
|
69
69
|
"generator": {
|
|
70
70
|
"path": "packages/opencode/scripts/embed-common-auth.ts",
|
|
71
71
|
"version": 3,
|
|
72
|
-
"sha256": "
|
|
72
|
+
"sha256": "c701471b1c52e731528039f0ed121c9cfa4328f533fe9023c0a49eecca17ba2b"
|
|
73
73
|
},
|
|
74
74
|
"files": [
|
|
75
75
|
{
|
|
@@ -235,33 +235,33 @@
|
|
|
235
235
|
{
|
|
236
236
|
"source": "package/dist/claustrum/consumer.d.ts",
|
|
237
237
|
"output": "claustrum/consumer.d.ts",
|
|
238
|
-
"bytes":
|
|
239
|
-
"sourceSha256": "
|
|
240
|
-
"outputSha256": "
|
|
238
|
+
"bytes": 7516,
|
|
239
|
+
"sourceSha256": "5bd8eae33d4d0098376fe5b6d6d0171eb6041ba1d0ae9ef5da40e569a36897bd",
|
|
240
|
+
"outputSha256": "5bd8eae33d4d0098376fe5b6d6d0171eb6041ba1d0ae9ef5da40e569a36897bd",
|
|
241
241
|
"transform": "verbatim"
|
|
242
242
|
},
|
|
243
243
|
{
|
|
244
244
|
"source": "package/dist/claustrum/consumer.js",
|
|
245
245
|
"output": "claustrum/consumer.js",
|
|
246
|
-
"bytes":
|
|
247
|
-
"sourceSha256": "
|
|
248
|
-
"outputSha256": "
|
|
246
|
+
"bytes": 18272,
|
|
247
|
+
"sourceSha256": "82726ae5b1f14f5bb3a19d1e9a9d312dd8f8339f837f1efbecd65e8195f3c01c",
|
|
248
|
+
"outputSha256": "82726ae5b1f14f5bb3a19d1e9a9d312dd8f8339f837f1efbecd65e8195f3c01c",
|
|
249
249
|
"transform": "verbatim"
|
|
250
250
|
},
|
|
251
251
|
{
|
|
252
252
|
"source": "package/dist/claustrum/custody.d.ts",
|
|
253
253
|
"output": "claustrum/custody.d.ts",
|
|
254
|
-
"bytes":
|
|
255
|
-
"sourceSha256": "
|
|
256
|
-
"outputSha256": "
|
|
254
|
+
"bytes": 10126,
|
|
255
|
+
"sourceSha256": "053619f193ea68739125624cf1bcb078c78cb38e506c7009894d92c672f88b88",
|
|
256
|
+
"outputSha256": "053619f193ea68739125624cf1bcb078c78cb38e506c7009894d92c672f88b88",
|
|
257
257
|
"transform": "verbatim"
|
|
258
258
|
},
|
|
259
259
|
{
|
|
260
260
|
"source": "package/dist/claustrum/custody.js",
|
|
261
261
|
"output": "claustrum/custody.js",
|
|
262
|
-
"bytes":
|
|
263
|
-
"sourceSha256": "
|
|
264
|
-
"outputSha256": "
|
|
262
|
+
"bytes": 15835,
|
|
263
|
+
"sourceSha256": "ba5c42a9ad00f66b4e33ae8e810d1b0e8a57c433179dec7c939706c682e49a8f",
|
|
264
|
+
"outputSha256": "ba5c42a9ad00f66b4e33ae8e810d1b0e8a57c433179dec7c939706c682e49a8f",
|
|
265
265
|
"transform": "verbatim"
|
|
266
266
|
},
|
|
267
267
|
{
|
|
@@ -315,9 +315,9 @@
|
|
|
315
315
|
{
|
|
316
316
|
"source": "package/dist/claustrum/index.d.ts",
|
|
317
317
|
"output": "claustrum/index.d.ts",
|
|
318
|
-
"bytes":
|
|
319
|
-
"sourceSha256": "
|
|
320
|
-
"outputSha256": "
|
|
318
|
+
"bytes": 2939,
|
|
319
|
+
"sourceSha256": "cd2f374dec9e06a7962d2c262c08c965213610107ff1f4f972c2c76c35fe8254",
|
|
320
|
+
"outputSha256": "cd2f374dec9e06a7962d2c262c08c965213610107ff1f4f972c2c76c35fe8254",
|
|
321
321
|
"transform": "verbatim"
|
|
322
322
|
},
|
|
323
323
|
{
|
|
@@ -539,17 +539,17 @@
|
|
|
539
539
|
{
|
|
540
540
|
"source": "package/dist/fs/refresh-file-lock.d.ts",
|
|
541
541
|
"output": "fs/refresh-file-lock.d.ts",
|
|
542
|
-
"bytes":
|
|
543
|
-
"sourceSha256": "
|
|
544
|
-
"outputSha256": "
|
|
542
|
+
"bytes": 2125,
|
|
543
|
+
"sourceSha256": "ec643f4e081c108c1b42ceb17a83cf3e7e9997a4c75e1a61ffc33b5b44ccd414",
|
|
544
|
+
"outputSha256": "ec643f4e081c108c1b42ceb17a83cf3e7e9997a4c75e1a61ffc33b5b44ccd414",
|
|
545
545
|
"transform": "verbatim"
|
|
546
546
|
},
|
|
547
547
|
{
|
|
548
548
|
"source": "package/dist/fs/refresh-file-lock.js",
|
|
549
549
|
"output": "fs/refresh-file-lock.js",
|
|
550
|
-
"bytes":
|
|
551
|
-
"sourceSha256": "
|
|
552
|
-
"outputSha256": "
|
|
550
|
+
"bytes": 29704,
|
|
551
|
+
"sourceSha256": "5c52aad573e84e8065dcf06259ecf38345e8b5a2c401029a23d942f28c7a8521",
|
|
552
|
+
"outputSha256": "5c52aad573e84e8065dcf06259ecf38345e8b5a2c401029a23d942f28c7a8521",
|
|
553
553
|
"transform": "verbatim"
|
|
554
554
|
},
|
|
555
555
|
{
|
|
@@ -739,9 +739,9 @@
|
|
|
739
739
|
{
|
|
740
740
|
"source": "package/dist/pi-slot/lock.js",
|
|
741
741
|
"output": "pi-slot/lock.js",
|
|
742
|
-
"bytes":
|
|
743
|
-
"sourceSha256": "
|
|
744
|
-
"outputSha256": "
|
|
742
|
+
"bytes": 7385,
|
|
743
|
+
"sourceSha256": "68b0c7c764b88391e466f3b9fa172df176bf21529399606bf84475f3b920db8b",
|
|
744
|
+
"outputSha256": "68b0c7c764b88391e466f3b9fa172df176bf21529399606bf84475f3b920db8b",
|
|
745
745
|
"transform": "verbatim"
|
|
746
746
|
},
|
|
747
747
|
{
|
|
@@ -779,33 +779,33 @@
|
|
|
779
779
|
{
|
|
780
780
|
"source": "package/dist/quota/format.d.ts",
|
|
781
781
|
"output": "quota/format.d.ts",
|
|
782
|
-
"bytes":
|
|
783
|
-
"sourceSha256": "
|
|
784
|
-
"outputSha256": "
|
|
782
|
+
"bytes": 4260,
|
|
783
|
+
"sourceSha256": "f76541a2f0e1e04782ee8b61a3d0f6b3ba3c156bc0e57bfcbd427e00baf279b4",
|
|
784
|
+
"outputSha256": "f76541a2f0e1e04782ee8b61a3d0f6b3ba3c156bc0e57bfcbd427e00baf279b4",
|
|
785
785
|
"transform": "verbatim"
|
|
786
786
|
},
|
|
787
787
|
{
|
|
788
788
|
"source": "package/dist/quota/format.js",
|
|
789
789
|
"output": "quota/format.js",
|
|
790
|
-
"bytes":
|
|
791
|
-
"sourceSha256": "
|
|
792
|
-
"outputSha256": "
|
|
790
|
+
"bytes": 12897,
|
|
791
|
+
"sourceSha256": "69e546dbc935300ff3b01294479844177be3e288626e5edf0341e820a20c5580",
|
|
792
|
+
"outputSha256": "69e546dbc935300ff3b01294479844177be3e288626e5edf0341e820a20c5580",
|
|
793
793
|
"transform": "verbatim"
|
|
794
794
|
},
|
|
795
795
|
{
|
|
796
796
|
"source": "package/dist/quota/index.d.ts",
|
|
797
797
|
"output": "quota/index.d.ts",
|
|
798
|
-
"bytes":
|
|
799
|
-
"sourceSha256": "
|
|
800
|
-
"outputSha256": "
|
|
798
|
+
"bytes": 1047,
|
|
799
|
+
"sourceSha256": "1ed8a3feaf208860182d738c2ba732fbaa61b6613c1e0e14442418a76d743663",
|
|
800
|
+
"outputSha256": "1ed8a3feaf208860182d738c2ba732fbaa61b6613c1e0e14442418a76d743663",
|
|
801
801
|
"transform": "verbatim"
|
|
802
802
|
},
|
|
803
803
|
{
|
|
804
804
|
"source": "package/dist/quota/index.js",
|
|
805
805
|
"output": "quota/index.js",
|
|
806
|
-
"bytes":
|
|
807
|
-
"sourceSha256": "
|
|
808
|
-
"outputSha256": "
|
|
806
|
+
"bytes": 511,
|
|
807
|
+
"sourceSha256": "691e7db4bf6025770991f98adda82ca4cb9be45eeefa3709b114fb2decfdf66e",
|
|
808
|
+
"outputSha256": "691e7db4bf6025770991f98adda82ca4cb9be45eeefa3709b114fb2decfdf66e",
|
|
809
809
|
"transform": "verbatim"
|
|
810
810
|
},
|
|
811
811
|
{
|
|
@@ -1048,12 +1048,28 @@
|
|
|
1048
1048
|
"outputSha256": "7a7bb67f11f072e2fd655694445458295c5461579bc4e73b11559c9d18d3c93d",
|
|
1049
1049
|
"transform": "verbatim"
|
|
1050
1050
|
},
|
|
1051
|
+
{
|
|
1052
|
+
"source": "package/dist/setup/command-error.d.ts",
|
|
1053
|
+
"output": "setup/command-error.d.ts",
|
|
1054
|
+
"bytes": 1498,
|
|
1055
|
+
"sourceSha256": "fd447696460a03cb04842a5984e9801797c09e1789da1f006f7f8e0943bd7d60",
|
|
1056
|
+
"outputSha256": "fd447696460a03cb04842a5984e9801797c09e1789da1f006f7f8e0943bd7d60",
|
|
1057
|
+
"transform": "verbatim"
|
|
1058
|
+
},
|
|
1059
|
+
{
|
|
1060
|
+
"source": "package/dist/setup/command-error.js",
|
|
1061
|
+
"output": "setup/command-error.js",
|
|
1062
|
+
"bytes": 3307,
|
|
1063
|
+
"sourceSha256": "2ead4c487c2dfc6e25cdc56362650ed294d1422fe9b705fbcc842ad1aac0ab10",
|
|
1064
|
+
"outputSha256": "2ead4c487c2dfc6e25cdc56362650ed294d1422fe9b705fbcc842ad1aac0ab10",
|
|
1065
|
+
"transform": "verbatim"
|
|
1066
|
+
},
|
|
1051
1067
|
{
|
|
1052
1068
|
"source": "package/dist/setup/command-runner.js",
|
|
1053
1069
|
"output": "setup/command-runner.js",
|
|
1054
|
-
"bytes":
|
|
1055
|
-
"sourceSha256": "
|
|
1056
|
-
"outputSha256": "
|
|
1070
|
+
"bytes": 5843,
|
|
1071
|
+
"sourceSha256": "d7f745555acbdd67a63049efcdb59e3daed7c7f68302baa65403315a14e2da6b",
|
|
1072
|
+
"outputSha256": "d7f745555acbdd67a63049efcdb59e3daed7c7f68302baa65403315a14e2da6b",
|
|
1057
1073
|
"transform": "verbatim"
|
|
1058
1074
|
},
|
|
1059
1075
|
{
|
|
@@ -1067,9 +1083,9 @@
|
|
|
1067
1083
|
{
|
|
1068
1084
|
"source": "package/dist/setup/command.js",
|
|
1069
1085
|
"output": "setup/command.js",
|
|
1070
|
-
"bytes":
|
|
1071
|
-
"sourceSha256": "
|
|
1072
|
-
"outputSha256": "
|
|
1086
|
+
"bytes": 13180,
|
|
1087
|
+
"sourceSha256": "ed9ff680ea01e09b9d443018b1d4746cb2e54200970165d3ddd76104f631bf12",
|
|
1088
|
+
"outputSha256": "ed9ff680ea01e09b9d443018b1d4746cb2e54200970165d3ddd76104f631bf12",
|
|
1073
1089
|
"transform": "verbatim"
|
|
1074
1090
|
},
|
|
1075
1091
|
{
|
|
@@ -1099,25 +1115,25 @@
|
|
|
1099
1115
|
{
|
|
1100
1116
|
"source": "package/dist/setup/enroll.js",
|
|
1101
1117
|
"output": "setup/enroll.js",
|
|
1102
|
-
"bytes":
|
|
1103
|
-
"sourceSha256": "
|
|
1104
|
-
"outputSha256": "
|
|
1118
|
+
"bytes": 4022,
|
|
1119
|
+
"sourceSha256": "233b36d6422c93e7de0f7e73d1c09fdac54d8ae4090b15b91e1b99160e1ad0fa",
|
|
1120
|
+
"outputSha256": "233b36d6422c93e7de0f7e73d1c09fdac54d8ae4090b15b91e1b99160e1ad0fa",
|
|
1105
1121
|
"transform": "verbatim"
|
|
1106
1122
|
},
|
|
1107
1123
|
{
|
|
1108
1124
|
"source": "package/dist/setup/index.d.ts",
|
|
1109
1125
|
"output": "setup/index.d.ts",
|
|
1110
|
-
"bytes":
|
|
1111
|
-
"sourceSha256": "
|
|
1112
|
-
"outputSha256": "
|
|
1126
|
+
"bytes": 842,
|
|
1127
|
+
"sourceSha256": "43b22470cb458058db2bc628e6502f4cd55184deff519c86213dd8d0e3e0000e",
|
|
1128
|
+
"outputSha256": "43b22470cb458058db2bc628e6502f4cd55184deff519c86213dd8d0e3e0000e",
|
|
1113
1129
|
"transform": "verbatim"
|
|
1114
1130
|
},
|
|
1115
1131
|
{
|
|
1116
1132
|
"source": "package/dist/setup/index.js",
|
|
1117
1133
|
"output": "setup/index.js",
|
|
1118
|
-
"bytes":
|
|
1119
|
-
"sourceSha256": "
|
|
1120
|
-
"outputSha256": "
|
|
1134
|
+
"bytes": 517,
|
|
1135
|
+
"sourceSha256": "4b00ca576b580ce54b53c2ef6c2a03d1e00c3fde9d3174328cd7458edd38ec79",
|
|
1136
|
+
"outputSha256": "4b00ca576b580ce54b53c2ef6c2a03d1e00c3fde9d3174328cd7458edd38ec79",
|
|
1121
1137
|
"transform": "verbatim"
|
|
1122
1138
|
},
|
|
1123
1139
|
{
|
|
@@ -1163,17 +1179,17 @@
|
|
|
1163
1179
|
{
|
|
1164
1180
|
"source": "package/dist/setup/register.js",
|
|
1165
1181
|
"output": "setup/register.js",
|
|
1166
|
-
"bytes":
|
|
1167
|
-
"sourceSha256": "
|
|
1168
|
-
"outputSha256": "
|
|
1182
|
+
"bytes": 6178,
|
|
1183
|
+
"sourceSha256": "65171657a6b2b5788bc3dea16729a045b70c73b0f6d37ada0f1864c889450dfe",
|
|
1184
|
+
"outputSha256": "65171657a6b2b5788bc3dea16729a045b70c73b0f6d37ada0f1864c889450dfe",
|
|
1169
1185
|
"transform": "verbatim"
|
|
1170
1186
|
},
|
|
1171
1187
|
{
|
|
1172
1188
|
"source": "package/dist/setup/types.d.ts",
|
|
1173
1189
|
"output": "setup/types.d.ts",
|
|
1174
|
-
"bytes":
|
|
1175
|
-
"sourceSha256": "
|
|
1176
|
-
"outputSha256": "
|
|
1190
|
+
"bytes": 5535,
|
|
1191
|
+
"sourceSha256": "69f8ee1e9345d72dec1e04bb5ce9fa38e6cc77339f53ad042b625c636c415068",
|
|
1192
|
+
"outputSha256": "69f8ee1e9345d72dec1e04bb5ce9fa38e6cc77339f53ad042b625c636c415068",
|
|
1177
1193
|
"transform": "verbatim"
|
|
1178
1194
|
},
|
|
1179
1195
|
{
|
|
@@ -1275,17 +1291,17 @@
|
|
|
1275
1291
|
{
|
|
1276
1292
|
"source": "package/dist/store/pool.d.ts",
|
|
1277
1293
|
"output": "store/pool.d.ts",
|
|
1278
|
-
"bytes":
|
|
1279
|
-
"sourceSha256": "
|
|
1280
|
-
"outputSha256": "
|
|
1294
|
+
"bytes": 10785,
|
|
1295
|
+
"sourceSha256": "192ea359d2ce746b31693cf06795a281f2e06804c567975f127ea05fa6fb4aef",
|
|
1296
|
+
"outputSha256": "192ea359d2ce746b31693cf06795a281f2e06804c567975f127ea05fa6fb4aef",
|
|
1281
1297
|
"transform": "verbatim"
|
|
1282
1298
|
},
|
|
1283
1299
|
{
|
|
1284
1300
|
"source": "package/dist/store/pool.js",
|
|
1285
1301
|
"output": "store/pool.js",
|
|
1286
|
-
"bytes":
|
|
1287
|
-
"sourceSha256": "
|
|
1288
|
-
"outputSha256": "
|
|
1302
|
+
"bytes": 5671,
|
|
1303
|
+
"sourceSha256": "8dc0d27b37204c2c3229296e8efbbfac6bcb30538b39d8d95771267487a06292",
|
|
1304
|
+
"outputSha256": "8dc0d27b37204c2c3229296e8efbbfac6bcb30538b39d8d95771267487a06292",
|
|
1289
1305
|
"transform": "verbatim"
|
|
1290
1306
|
},
|
|
1291
1307
|
{
|
|
@@ -1339,17 +1355,17 @@
|
|
|
1339
1355
|
{
|
|
1340
1356
|
"source": "package/dist/store/refresh-lock.d.ts",
|
|
1341
1357
|
"output": "store/refresh-lock.d.ts",
|
|
1342
|
-
"bytes":
|
|
1343
|
-
"sourceSha256": "
|
|
1344
|
-
"outputSha256": "
|
|
1358
|
+
"bytes": 2419,
|
|
1359
|
+
"sourceSha256": "50401b2e9b69b73592e0a4391fc1992a380539360b7cabfe5fce6d35fb29c648",
|
|
1360
|
+
"outputSha256": "50401b2e9b69b73592e0a4391fc1992a380539360b7cabfe5fce6d35fb29c648",
|
|
1345
1361
|
"transform": "verbatim"
|
|
1346
1362
|
},
|
|
1347
1363
|
{
|
|
1348
1364
|
"source": "package/dist/store/refresh-lock.js",
|
|
1349
1365
|
"output": "store/refresh-lock.js",
|
|
1350
|
-
"bytes":
|
|
1351
|
-
"sourceSha256": "
|
|
1352
|
-
"outputSha256": "
|
|
1366
|
+
"bytes": 4655,
|
|
1367
|
+
"sourceSha256": "f2a316af681d1a14254873b9dc2d608a76919b7ba930636ee9f266c99195fb67",
|
|
1368
|
+
"outputSha256": "f2a316af681d1a14254873b9dc2d608a76919b7ba930636ee9f266c99195fb67",
|
|
1353
1369
|
"transform": "verbatim"
|
|
1354
1370
|
},
|
|
1355
1371
|
{
|
|
@@ -42,7 +42,7 @@ export interface OpenPoolStoreOptions {
|
|
|
42
42
|
requireCredentialStamps?: boolean;
|
|
43
43
|
/** Require an exact secret fingerprint for every roster-publication removal. */
|
|
44
44
|
requireRemovedFingerprint?: boolean;
|
|
45
|
-
/**
|
|
45
|
+
/** Logical clock for refresh stamps and `addedAt`; filesystem leases always use wall time. */
|
|
46
46
|
now?: () => number;
|
|
47
47
|
/**
|
|
48
48
|
* Ordered store-lock list held across every read-modify-write. Defaults to
|
|
@@ -57,7 +57,6 @@ export function openPoolStore(options) {
|
|
|
57
57
|
],
|
|
58
58
|
lockDefaults,
|
|
59
59
|
lockEnv: {
|
|
60
|
-
now: options.now ?? Date.now,
|
|
61
60
|
...(options.onLockEvent ? { onLockEvent: options.onLockEvent } : {}),
|
|
62
61
|
...(options.onLockStep ? { onLockStep: options.onLockStep } : {}),
|
|
63
62
|
...(options.onRenewalTimer
|
|
@@ -63,8 +63,12 @@ export function quotaWindowName(limit) {
|
|
|
63
63
|
function clampPercent(remaining) {
|
|
64
64
|
return Math.min(100, Math.max(0, remaining));
|
|
65
65
|
}
|
|
66
|
+
/** A remaining percentage as the whole number every form shows. */
|
|
67
|
+
function wholePercent(remaining) {
|
|
68
|
+
return Math.round(clampPercent(remaining));
|
|
69
|
+
}
|
|
66
70
|
function percentLeft(remaining) {
|
|
67
|
-
return `${
|
|
71
|
+
return `${wholePercent(remaining)}% left`;
|
|
68
72
|
}
|
|
69
73
|
function resetDetails(resetsAt, checkedAt, now) {
|
|
70
74
|
const at = resetsAt === undefined ? Number.NaN : Date.parse(resetsAt);
|
|
@@ -98,6 +102,16 @@ function displayOrder(left, right) {
|
|
|
98
102
|
* and the optional age keep the shared formatter's wording.
|
|
99
103
|
*/
|
|
100
104
|
export function quotaWindowParts(quota, options) {
|
|
105
|
+
const { windows, age } = scopedWindowParts(quota, options);
|
|
106
|
+
const parts = windows.map(({ part }) => part);
|
|
107
|
+
return age === undefined ? { windows: parts } : { windows: parts, age };
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* `quotaWindowParts` with each window's scope kept beside it. The narrow form
|
|
111
|
+
* needs the scope to name and pick model-scoped windows; the public parts do
|
|
112
|
+
* not carry it, so their shape stays as it was.
|
|
113
|
+
*/
|
|
114
|
+
function scopedWindowParts(quota, options) {
|
|
101
115
|
if (!quota)
|
|
102
116
|
return { windows: [] };
|
|
103
117
|
const { now } = options;
|
|
@@ -107,12 +121,15 @@ export function quotaWindowParts(quota, options) {
|
|
|
107
121
|
const windows = readings.map((limit) => {
|
|
108
122
|
const remainingPercent = clampPercent(limit.remainingPercent ?? 0);
|
|
109
123
|
return {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
124
|
+
scope: limit.scope,
|
|
125
|
+
part: {
|
|
126
|
+
kind: 'window',
|
|
127
|
+
name: quotaWindowName(limit),
|
|
128
|
+
figure: percentLeft(limit.remainingPercent ?? 0),
|
|
129
|
+
remainingPercent,
|
|
130
|
+
checkedAt: limit.checkedAt,
|
|
131
|
+
...resetDetails(limit.resetsAt, limit.checkedAt, now),
|
|
132
|
+
},
|
|
116
133
|
};
|
|
117
134
|
});
|
|
118
135
|
const budget = quota.budget;
|
|
@@ -124,32 +141,131 @@ export function quotaWindowParts(quota, options) {
|
|
|
124
141
|
? `credits ${percentLeft(remainingPercent)}`
|
|
125
142
|
: 'credits available';
|
|
126
143
|
windows.push({
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
144
|
+
scope: ALL_SCOPE,
|
|
145
|
+
spent: budget.reached,
|
|
146
|
+
part: {
|
|
147
|
+
kind: 'budget',
|
|
148
|
+
name: 'credits',
|
|
149
|
+
figure,
|
|
150
|
+
...(remainingPercent === undefined
|
|
151
|
+
? {}
|
|
152
|
+
: { remainingPercent: clampPercent(remainingPercent) }),
|
|
153
|
+
checkedAt: budget.checkedAt,
|
|
154
|
+
...resetDetails(budget.resetsAt, budget.checkedAt, now),
|
|
155
|
+
},
|
|
135
156
|
});
|
|
136
157
|
}
|
|
137
158
|
if (windows.length > 0) {
|
|
138
|
-
const age = now - Math.min(...windows.map((part) => part.checkedAt));
|
|
159
|
+
const age = now - Math.min(...windows.map(({ part }) => part.checkedAt));
|
|
139
160
|
if (age > (options.staleAfterMs ?? QUOTA_STALE_AFTER_MS)) {
|
|
140
161
|
return { windows, age: `checked ${shortSpan(age)} ago` };
|
|
141
162
|
}
|
|
142
163
|
}
|
|
143
164
|
return { windows };
|
|
144
165
|
}
|
|
166
|
+
/**
|
|
167
|
+
* Whether the reading is stale: true exactly when the compact and full forms
|
|
168
|
+
* would end with `checked … ago`. The narrow form leaves that age out to stay
|
|
169
|
+
* short, so a caller drawing a narrow line uses this to dim it instead.
|
|
170
|
+
*/
|
|
171
|
+
export function isQuotaStale(quota, options) {
|
|
172
|
+
return scopedWindowParts(quota, options).age !== undefined;
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* The model a scope names, as a display name: any namespace before a colon
|
|
176
|
+
* is dropped (`model:claude-opus-4` → `claude-opus-4`) and the first letter is
|
|
177
|
+
* capitalized (`fable` → `Fable`); the rest stays as written.
|
|
178
|
+
*/
|
|
179
|
+
function scopeDisplayName(scope) {
|
|
180
|
+
const model = scope.slice(scope.indexOf(':') + 1);
|
|
181
|
+
return model.charAt(0).toUpperCase() + model.slice(1);
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Short names for the model scopes in one row: the first two letters of each
|
|
185
|
+
* display name. Names that would read the same for different models are each
|
|
186
|
+
* extended one letter at a time until they differ (`Fable` and `Fabric` read
|
|
187
|
+
* `Fabl` and `Fabr`); a name that runs out of letters stays whole.
|
|
188
|
+
*/
|
|
189
|
+
function scopeAbbreviations(scopes) {
|
|
190
|
+
const names = [...new Set(scopes.map(scopeDisplayName))];
|
|
191
|
+
const lengths = new Map(names.map((name) => [name, 2]));
|
|
192
|
+
const short = (name) => name.slice(0, lengths.get(name));
|
|
193
|
+
for (;;) {
|
|
194
|
+
const byShort = new Map();
|
|
195
|
+
for (const name of names) {
|
|
196
|
+
byShort.set(short(name), [...(byShort.get(short(name)) ?? []), name]);
|
|
197
|
+
}
|
|
198
|
+
let extended = false;
|
|
199
|
+
for (const group of byShort.values()) {
|
|
200
|
+
if (group.length < 2)
|
|
201
|
+
continue;
|
|
202
|
+
for (const name of group) {
|
|
203
|
+
const length = lengths.get(name) ?? 2;
|
|
204
|
+
if (length < name.length) {
|
|
205
|
+
lengths.set(name, length + 1);
|
|
206
|
+
extended = true;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
if (!extended)
|
|
211
|
+
break;
|
|
212
|
+
}
|
|
213
|
+
return new Map(scopes.map((scope) => [scope, short(scopeDisplayName(scope))]));
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* The narrow form's pieces: every account-wide window as `5h 92%`, then at
|
|
217
|
+
* most one more item, with ` left` added once to the last piece. That item is
|
|
218
|
+
* the tightest (least remaining) of the model-scoped windows and the credit
|
|
219
|
+
* budget, so the line stays bounded whatever the account carries: a scoped
|
|
220
|
+
* window reads under its short model name (`Fa 98%`), the budget as `cr 75%`
|
|
221
|
+
* (`cr 0%` when spent). On a tie a scoped window wins over the budget, and
|
|
222
|
+
* among scoped windows the first in display order wins. The choice depends
|
|
223
|
+
* only on the reading, never on a width. A budget without a percentage cannot
|
|
224
|
+
* be chosen; when nothing at all is shown it keeps its compact wording
|
|
225
|
+
* (`credits available`). No age is added; `isQuotaStale` says whether the
|
|
226
|
+
* reading is stale. A window whose reset arrived after the reading keeps its
|
|
227
|
+
* figure, as in the other forms.
|
|
228
|
+
*/
|
|
229
|
+
function narrowTextParts(quota, options) {
|
|
230
|
+
const { windows } = scopedWindowParts(quota, options);
|
|
231
|
+
const general = windows.filter(({ part, scope }) => part.kind === 'window' && scope === ALL_SCOPE);
|
|
232
|
+
const scoped = windows.filter(({ part, scope }) => part.kind === 'window' && scope !== ALL_SCOPE);
|
|
233
|
+
const abbreviations = scopeAbbreviations(scoped.map(({ scope }) => scope));
|
|
234
|
+
// The items competing for the one slot after the account-wide windows, in
|
|
235
|
+
// tie-break order: scoped windows in display order, then the budget. A
|
|
236
|
+
// spent budget counts as 0% left; one without a percentage cannot compete.
|
|
237
|
+
const budget = windows.find(({ part }) => part.kind === 'budget');
|
|
238
|
+
const budgetLeft = budget?.spent ? 0 : budget?.part.remainingPercent;
|
|
239
|
+
const extras = [
|
|
240
|
+
...scoped.map(({ scope, part }) => ({
|
|
241
|
+
label: abbreviations.get(scope) ?? scope,
|
|
242
|
+
remaining: part.remainingPercent ?? 0,
|
|
243
|
+
})),
|
|
244
|
+
...(budgetLeft === undefined
|
|
245
|
+
? []
|
|
246
|
+
: [{ label: 'cr', remaining: budgetLeft }]),
|
|
247
|
+
];
|
|
248
|
+
// Strictly lower wins, so on a tie the earlier item keeps the slot.
|
|
249
|
+
const tightest = extras.reduce((best, item) => best === undefined || item.remaining < best.remaining ? item : best, undefined);
|
|
250
|
+
const pieces = general.map(({ part }) => `${part.name} ${wholePercent(part.remainingPercent ?? 0)}%`);
|
|
251
|
+
if (tightest) {
|
|
252
|
+
pieces.push(`${tightest.label} ${wholePercent(tightest.remaining)}%`);
|
|
253
|
+
}
|
|
254
|
+
if (pieces.length === 0)
|
|
255
|
+
return windows.map(({ part }) => part.figure);
|
|
256
|
+
return pieces.map((piece, index) => index === pieces.length - 1 ? `${piece} left` : piece);
|
|
257
|
+
}
|
|
145
258
|
/**
|
|
146
259
|
* The pieces of a quota text, in order: one per reported window
|
|
147
260
|
* (`5h 58% left, resets 2h`), then the credit budget when there is one, then
|
|
148
261
|
* `checked 3h ago` when the oldest piece shown is stale. Empty when nothing
|
|
149
262
|
* was reported; `formatQuota` turns that into a sentence. A caller printing
|
|
150
|
-
* one line per window (the terminal auth menu) uses these directly.
|
|
263
|
+
* one line per window (the terminal auth menu) uses these directly. In the
|
|
264
|
+
* narrow form the pieces are the narrow line's (`5h 92%`, `7d 66% left`).
|
|
151
265
|
*/
|
|
152
266
|
export function quotaTextParts(quota, options) {
|
|
267
|
+
if (options.form === 'narrow')
|
|
268
|
+
return narrowTextParts(quota, options);
|
|
153
269
|
const parts = quotaWindowParts(quota, options);
|
|
154
270
|
const full = (options.form ?? 'full') === 'full';
|
|
155
271
|
const text = parts.windows.map((part) => {
|
|
@@ -160,7 +276,8 @@ export function quotaTextParts(quota, options) {
|
|
|
160
276
|
}
|
|
161
277
|
/**
|
|
162
278
|
* A row's quota as one line: `5h 58% left · 7d 90% left` in the compact
|
|
163
|
-
* form, with `, resets 2h` after each window in the full form
|
|
279
|
+
* form, with `, resets 2h` after each window in the full form, and
|
|
280
|
+
* `5h 58% · 7d 90% left` in the narrow form. With nothing
|
|
164
281
|
* reported it is `NO_QUOTA_READING`, or `NO_LIMITS_REPORTED` when the
|
|
165
282
|
* provider answered without a limit for any window.
|
|
166
283
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { quotaCodec } from "./codec.js";
|
|
2
|
-
export { formatQuota, NO_LIMITS_REPORTED, NO_QUOTA_READING, QUOTA_STALE_AFTER_MS, quotaTextParts, quotaWindowName, quotaWindowParts, } from "./format.js";
|
|
2
|
+
export { formatQuota, isQuotaStale, NO_LIMITS_REPORTED, NO_QUOTA_READING, QUOTA_STALE_AFTER_MS, quotaTextParts, quotaWindowName, quotaWindowParts, } from "./format.js";
|
|
3
3
|
export { ALL_SCOPE, DEFAULT_REQUIRED_LABELS, decodeQuotaMap, emptyQuotaMap, isQuotaMap, } from "./map.js";
|
|
4
4
|
export { isQuotaObservation, mergeQuotaObservation, QuotaCodecError, } from "./merge.js";
|
|
5
5
|
export { budgetExhaustedResetAt, futureResetAt, projectQuota, readsExhausted, } from "./projection.js";
|