@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.
Files changed (164) hide show
  1. package/dist/cli.js +620 -120
  2. package/dist/cli.js.map +4 -4
  3. package/dist/cli.meta.json +128 -44
  4. package/dist/index.js +1469 -675
  5. package/dist/index.js.map +4 -4
  6. package/dist/index.meta.json +154 -73
  7. package/dist/server.js +1075 -280
  8. package/dist/server.js.map +4 -4
  9. package/dist/server.meta.json +1 -1
  10. package/dist/src/common-auth-embedded/claustrum/consumer.d.ts +11 -1
  11. package/dist/src/common-auth-embedded/claustrum/consumer.js +38 -1
  12. package/dist/src/common-auth-embedded/claustrum/custody.d.ts +29 -0
  13. package/dist/src/common-auth-embedded/claustrum/custody.js +17 -0
  14. package/dist/src/common-auth-embedded/claustrum/index.d.ts +1 -1
  15. package/dist/src/common-auth-embedded/fs/refresh-file-lock.d.ts +8 -2
  16. package/dist/src/common-auth-embedded/fs/refresh-file-lock.js +6 -1
  17. package/dist/src/common-auth-embedded/pi-slot/lock.js +7 -3
  18. package/dist/src/common-auth-embedded/quota/format.d.ts +14 -3
  19. package/dist/src/common-auth-embedded/quota/format.js +135 -18
  20. package/dist/src/common-auth-embedded/quota/index.d.ts +1 -1
  21. package/dist/src/common-auth-embedded/quota/index.js +1 -1
  22. package/dist/src/common-auth-embedded/setup/command-error.d.ts +32 -0
  23. package/dist/src/common-auth-embedded/setup/command-error.js +79 -0
  24. package/dist/src/common-auth-embedded/setup/command-runner.js +118 -24
  25. package/dist/src/common-auth-embedded/setup/command.js +75 -19
  26. package/dist/src/common-auth-embedded/setup/enroll.js +17 -5
  27. package/dist/src/common-auth-embedded/setup/index.d.ts +2 -1
  28. package/dist/src/common-auth-embedded/setup/index.js +1 -0
  29. package/dist/src/common-auth-embedded/setup/register.js +8 -2
  30. package/dist/src/common-auth-embedded/setup/types.d.ts +14 -0
  31. package/dist/src/common-auth-embedded/source-output.json +92 -76
  32. package/dist/src/common-auth-embedded/store/pool.d.ts +1 -1
  33. package/dist/src/common-auth-embedded/store/pool.js +0 -1
  34. package/dist/src/common-auth-embedded/store/refresh-lock.d.ts +0 -1
  35. package/dist/src/common-auth-embedded/store/refresh-lock.js +0 -1
  36. package/dist/src/ga/server/index.d.ts.map +1 -1
  37. package/dist/src/ga/server/index.js +4 -2
  38. package/dist/src/ga/server/index.js.map +1 -1
  39. package/dist/src/ga/tui/host-ga.d.ts.map +1 -1
  40. package/dist/src/ga/tui/host-ga.js +37 -3
  41. package/dist/src/ga/tui/host-ga.js.map +1 -1
  42. package/dist/src/plugin/config/schema.d.ts.map +1 -1
  43. package/dist/src/plugin/config/schema.js +2 -1
  44. package/dist/src/plugin/config/schema.js.map +1 -1
  45. package/dist/src/plugin/ga-location-services.d.ts.map +1 -1
  46. package/dist/src/plugin/ga-location-services.js +4 -3
  47. package/dist/src/plugin/ga-location-services.js.map +1 -1
  48. package/dist/src/plugin/gemini-dump.d.ts.map +1 -1
  49. package/dist/src/plugin/gemini-dump.js +2 -5
  50. package/dist/src/plugin/gemini-dump.js.map +1 -1
  51. package/dist/src/plugin/index.d.ts.map +1 -1
  52. package/dist/src/plugin/index.js +3 -3
  53. package/dist/src/plugin/index.js.map +1 -1
  54. package/dist/src/plugin/logging-utils.d.ts.map +1 -1
  55. package/dist/src/plugin/logging-utils.js +2 -5
  56. package/dist/src/plugin/logging-utils.js.map +1 -1
  57. package/dist/src/plugin/request.d.ts +1 -2
  58. package/dist/src/plugin/request.d.ts.map +1 -1
  59. package/dist/src/plugin/request.js +8 -12
  60. package/dist/src/plugin/request.js.map +1 -1
  61. package/dist/src/plugin/shared/request-services.d.ts +8 -1
  62. package/dist/src/plugin/shared/request-services.d.ts.map +1 -1
  63. package/dist/src/plugin/shared/request-services.js +140 -58
  64. package/dist/src/plugin/shared/request-services.js.map +1 -1
  65. package/dist/src/plugin/shared/vault-request-credentials.d.ts +12 -3
  66. package/dist/src/plugin/shared/vault-request-credentials.d.ts.map +1 -1
  67. package/dist/src/plugin/shared/vault-request-credentials.js +3 -0
  68. package/dist/src/plugin/shared/vault-request-credentials.js.map +1 -1
  69. package/dist/src/plugin/vault-custody.d.ts +14 -1
  70. package/dist/src/plugin/vault-custody.d.ts.map +1 -1
  71. package/dist/src/plugin/vault-custody.js +57 -10
  72. package/dist/src/plugin/vault-custody.js.map +1 -1
  73. package/dist/src/sidebar-projection.d.ts +4 -0
  74. package/dist/src/sidebar-projection.d.ts.map +1 -1
  75. package/dist/src/sidebar-projection.js +6 -2
  76. package/dist/src/sidebar-projection.js.map +1 -1
  77. package/dist/src/tui/quota-layout.d.ts +94 -0
  78. package/dist/src/tui/quota-layout.d.ts.map +1 -0
  79. package/dist/src/tui/quota-layout.js +139 -0
  80. package/dist/src/tui/quota-layout.js.map +1 -0
  81. package/dist/src/tui/route-layout.d.ts +8 -0
  82. package/dist/src/tui/route-layout.d.ts.map +1 -0
  83. package/dist/src/tui/route-layout.js +36 -0
  84. package/dist/src/tui/route-layout.js.map +1 -0
  85. package/dist/src/tui.d.ts.map +1 -1
  86. package/dist/src/tui.js +26 -128
  87. package/dist/src/tui.js.map +1 -1
  88. package/dist/tui-build-map.json +42 -13
  89. package/dist/tui-ga-build-map.json +46 -17
  90. package/dist/types/src/common-auth-embedded/claustrum/consumer.d.ts +11 -1
  91. package/dist/types/src/common-auth-embedded/claustrum/custody.d.ts +29 -0
  92. package/dist/types/src/common-auth-embedded/claustrum/index.d.ts +1 -1
  93. package/dist/types/src/common-auth-embedded/fs/refresh-file-lock.d.ts +8 -2
  94. package/dist/types/src/common-auth-embedded/quota/format.d.ts +14 -3
  95. package/dist/types/src/common-auth-embedded/quota/index.d.ts +1 -1
  96. package/dist/types/src/common-auth-embedded/setup/command-error.d.ts +32 -0
  97. package/dist/types/src/common-auth-embedded/setup/index.d.ts +2 -1
  98. package/dist/types/src/common-auth-embedded/setup/types.d.ts +14 -0
  99. package/dist/types/src/common-auth-embedded/store/pool.d.ts +1 -1
  100. package/dist/types/src/common-auth-embedded/store/refresh-lock.d.ts +0 -1
  101. package/dist/types/src/ga/server/index.d.ts.map +1 -1
  102. package/dist/types/src/plugin/config/schema.d.ts.map +1 -1
  103. package/dist/types/src/plugin/ga-location-services.d.ts.map +1 -1
  104. package/dist/types/src/plugin/gemini-dump.d.ts.map +1 -1
  105. package/dist/types/src/plugin/index.d.ts.map +1 -1
  106. package/dist/types/src/plugin/logging-utils.d.ts.map +1 -1
  107. package/dist/types/src/plugin/request.d.ts +1 -2
  108. package/dist/types/src/plugin/request.d.ts.map +1 -1
  109. package/dist/types/src/plugin/shared/request-services.d.ts +8 -1
  110. package/dist/types/src/plugin/shared/request-services.d.ts.map +1 -1
  111. package/dist/types/src/plugin/shared/vault-request-credentials.d.ts +12 -3
  112. package/dist/types/src/plugin/shared/vault-request-credentials.d.ts.map +1 -1
  113. package/dist/types/src/plugin/vault-custody.d.ts +14 -1
  114. package/dist/types/src/plugin/vault-custody.d.ts.map +1 -1
  115. package/package.json +3 -3
  116. package/src/common-auth-embedded/claustrum/consumer.d.ts +11 -1
  117. package/src/common-auth-embedded/claustrum/consumer.js +38 -1
  118. package/src/common-auth-embedded/claustrum/custody.d.ts +29 -0
  119. package/src/common-auth-embedded/claustrum/custody.js +17 -0
  120. package/src/common-auth-embedded/claustrum/index.d.ts +1 -1
  121. package/src/common-auth-embedded/fs/refresh-file-lock.d.ts +8 -2
  122. package/src/common-auth-embedded/fs/refresh-file-lock.js +6 -1
  123. package/src/common-auth-embedded/pi-slot/lock.js +7 -3
  124. package/src/common-auth-embedded/quota/format.d.ts +14 -3
  125. package/src/common-auth-embedded/quota/format.js +135 -18
  126. package/src/common-auth-embedded/quota/index.d.ts +1 -1
  127. package/src/common-auth-embedded/quota/index.js +1 -1
  128. package/src/common-auth-embedded/setup/command-error.d.ts +32 -0
  129. package/src/common-auth-embedded/setup/command-error.js +79 -0
  130. package/src/common-auth-embedded/setup/command-runner.js +118 -24
  131. package/src/common-auth-embedded/setup/command.js +75 -19
  132. package/src/common-auth-embedded/setup/enroll.js +17 -5
  133. package/src/common-auth-embedded/setup/index.d.ts +2 -1
  134. package/src/common-auth-embedded/setup/index.js +1 -0
  135. package/src/common-auth-embedded/setup/register.js +8 -2
  136. package/src/common-auth-embedded/setup/types.d.ts +14 -0
  137. package/src/common-auth-embedded/source-output.json +92 -76
  138. package/src/common-auth-embedded/store/pool.d.ts +1 -1
  139. package/src/common-auth-embedded/store/pool.js +0 -1
  140. package/src/common-auth-embedded/store/refresh-lock.d.ts +0 -1
  141. package/src/common-auth-embedded/store/refresh-lock.js +0 -1
  142. package/src/tui-compiled/common-auth-embedded/quota/format.js +135 -18
  143. package/src/tui-compiled/common-auth-embedded/quota/index.js +1 -1
  144. package/src/tui-compiled/tui/quota-layout.js +378 -0
  145. package/src/tui-compiled/tui/route-layout.js +30 -0
  146. package/src/tui-compiled/tui.js +145 -427
  147. package/src/tui-ga-compiled/host-ga.js +82 -52
  148. package/src/tui-ga-compiled/shared/6ca47cd4ec33fe72-route-layout.js +30 -0
  149. package/src/tui-ga-compiled/shared/8ae1927e5910ea81-sidebar-projection.js +2 -2
  150. package/src/tui-ga-compiled/shared/aef2402f8fc342f0-format.js +135 -18
  151. package/src/tui-ga-compiled/shared/bf17cbee28e58197-index.js +1 -1
  152. package/src/tui-ga-compiled/shared/dd4c9e1a907f8ef0-quota-layout.js +378 -0
  153. package/src/tui-ga-raw/host-ga.tsx +71 -30
  154. package/src/tui-ga-raw/shared/6ca47cd4ec33fe72-route-layout.js +30 -0
  155. package/src/tui-ga-raw/shared/8ae1927e5910ea81-sidebar-projection.js +2 -2
  156. package/src/tui-ga-raw/shared/aef2402f8fc342f0-format.js +135 -18
  157. package/src/tui-ga-raw/shared/bf17cbee28e58197-index.js +1 -1
  158. package/src/tui-ga-raw/shared/dd4c9e1a907f8ef0-quota-layout.tsx +391 -0
  159. package/src/tui-raw/common-auth-embedded/quota/format.js +135 -18
  160. package/src/tui-raw/common-auth-embedded/quota/index.js +1 -1
  161. package/src/tui-raw/tui/quota-layout.tsx +391 -0
  162. package/src/tui-raw/tui/route-layout.js +30 -0
  163. package/src/tui-raw/tui.tsx +50 -309
  164. 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.17.2",
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.17.2.tgz",
65
- "tarballSha256": "c135db860069ed22694e98e54883992efd2bc3f7fe5cb489e6b22985dd631cca",
66
- "sri": "sha512-hPt8Zoxw5Sc+rE3Iq57QNAlXkTswviwtjOBsc5TrAZHyOBZ3SGixkvFN2oZH59MxB8b6X+eAfcvvQDDpV+JOHA==",
67
- "canonicalFiles": 176,
68
- "canonicalBytes": 938243,
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": "9a280484c51050f8f2c8a0d1c6687c9e28a8147c2575fa5f57024d9975802676"
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": 6872,
239
- "sourceSha256": "489bd5ab71fc4fdb614c000ff5fcdd1005e09a76454f8cf846db4433d0b6465e",
240
- "outputSha256": "489bd5ab71fc4fdb614c000ff5fcdd1005e09a76454f8cf846db4433d0b6465e",
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": 16397,
247
- "sourceSha256": "919f56b722f8b26ad691c3ca2b3d381b3e3d06cfbe6059e09db3311edb9c3f3d",
248
- "outputSha256": "919f56b722f8b26ad691c3ca2b3d381b3e3d06cfbe6059e09db3311edb9c3f3d",
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": 8811,
255
- "sourceSha256": "be2dab97c1ff8deb23972498e8ea23ffeaef15b92bdd156e2e1dd4d099376be3",
256
- "outputSha256": "be2dab97c1ff8deb23972498e8ea23ffeaef15b92bdd156e2e1dd4d099376be3",
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": 15071,
263
- "sourceSha256": "8dae16f4afc9f39855e84a340a224d77d663d42ce53a0b425d2427d0e2f0eff0",
264
- "outputSha256": "8dae16f4afc9f39855e84a340a224d77d663d42ce53a0b425d2427d0e2f0eff0",
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": 2895,
319
- "sourceSha256": "9cd0b310598af4b35b9b0753d6498154ad4c1f73d3f776543634f0885bc7d0f6",
320
- "outputSha256": "9cd0b310598af4b35b9b0753d6498154ad4c1f73d3f776543634f0885bc7d0f6",
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": 1765,
543
- "sourceSha256": "72996a1247d498a34ac157d23c34ef03bcbdb68c79e8751be4874885aed7e843",
544
- "outputSha256": "72996a1247d498a34ac157d23c34ef03bcbdb68c79e8751be4874885aed7e843",
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": 29402,
551
- "sourceSha256": "d162b8972a23ffec999a9c90ef6b63e28314c235a668bad378b7c8561efd3666",
552
- "outputSha256": "d162b8972a23ffec999a9c90ef6b63e28314c235a668bad378b7c8561efd3666",
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": 7109,
743
- "sourceSha256": "92ad2fbf7792624b8dae99d7239e1e6f0f7d7f6da10be8b1594500700c7c3077",
744
- "outputSha256": "92ad2fbf7792624b8dae99d7239e1e6f0f7d7f6da10be8b1594500700c7c3077",
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": 3538,
783
- "sourceSha256": "b690da79fd26e936bf7d2867f411cacd5f32a8daf254d15cfef3d95417428a4a",
784
- "outputSha256": "b690da79fd26e936bf7d2867f411cacd5f32a8daf254d15cfef3d95417428a4a",
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": 7317,
791
- "sourceSha256": "421d130c910eaaefa10dd190cc7c7b77df9c1291f6560f6e71f19c9b30ddd5ef",
792
- "outputSha256": "421d130c910eaaefa10dd190cc7c7b77df9c1291f6560f6e71f19c9b30ddd5ef",
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": 1033,
799
- "sourceSha256": "dc5906c78e391126596a6eea6c999f1cb861a6656386e2be53e1bf00b6b63451",
800
- "outputSha256": "dc5906c78e391126596a6eea6c999f1cb861a6656386e2be53e1bf00b6b63451",
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": 497,
807
- "sourceSha256": "50027508fb08fb11903fc2220b30b141f73118424e4ca0a0ecd231519b28985d",
808
- "outputSha256": "50027508fb08fb11903fc2220b30b141f73118424e4ca0a0ecd231519b28985d",
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": 2161,
1055
- "sourceSha256": "a462c083c5119d49fc2f940ec08d5f44a298653967f29bffac05e4355e6d53d3",
1056
- "outputSha256": "a462c083c5119d49fc2f940ec08d5f44a298653967f29bffac05e4355e6d53d3",
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": 10549,
1071
- "sourceSha256": "1f9acddbe1ae7f10e50cc2d72206bf4942e56f5bcd843ab0b1155dbd29beefd7",
1072
- "outputSha256": "1f9acddbe1ae7f10e50cc2d72206bf4942e56f5bcd843ab0b1155dbd29beefd7",
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": 3354,
1103
- "sourceSha256": "47cefe1d5cbe065de2258d089a70d6586ff6f4d4fc8d81072b8986133ee24049",
1104
- "outputSha256": "47cefe1d5cbe065de2258d089a70d6586ff6f4d4fc8d81072b8986133ee24049",
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": 724,
1111
- "sourceSha256": "ed6287c7d7c971d6f846aa2ffda9e0da20b6c6a312cbf0f2f038f3c1a7a4e74c",
1112
- "outputSha256": "ed6287c7d7c971d6f846aa2ffda9e0da20b6c6a312cbf0f2f038f3c1a7a4e74c",
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": 444,
1119
- "sourceSha256": "a8ae2a1e0612424a184cf81421453666516bab8ba43de009253a8cc15d2d6374",
1120
- "outputSha256": "a8ae2a1e0612424a184cf81421453666516bab8ba43de009253a8cc15d2d6374",
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": 5941,
1167
- "sourceSha256": "5c1f63ba2cf6ca315531398346470db78e9e999b27041816e919762d14cb225b",
1168
- "outputSha256": "5c1f63ba2cf6ca315531398346470db78e9e999b27041816e919762d14cb225b",
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": 4928,
1175
- "sourceSha256": "2d357d6345a94e7b75ef7af4e0c64f1145a87a67e7124ec0c22f5169c533f640",
1176
- "outputSha256": "2d357d6345a94e7b75ef7af4e0c64f1145a87a67e7124ec0c22f5169c533f640",
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": 10754,
1279
- "sourceSha256": "901b2881e94f067c6b454002f1e3922b75f248f2a25ef7548c399cafd9611159",
1280
- "outputSha256": "901b2881e94f067c6b454002f1e3922b75f248f2a25ef7548c399cafd9611159",
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": 5713,
1287
- "sourceSha256": "678cca0578ac32eb1d9e45408614c6a7b56a6dcb94672a961c8c13bca55171fd",
1288
- "outputSha256": "678cca0578ac32eb1d9e45408614c6a7b56a6dcb94672a961c8c13bca55171fd",
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": 2442,
1343
- "sourceSha256": "5b4230fad8b94abc23d9b4a9c72cf21d7c961ac6359561a4da28e1e807bcb0ca",
1344
- "outputSha256": "5b4230fad8b94abc23d9b4a9c72cf21d7c961ac6359561a4da28e1e807bcb0ca",
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": 4681,
1351
- "sourceSha256": "035a03e02a0690ec51d92df0b61e2ae6abb7b8d6a141112640f8d649eb583949",
1352
- "outputSha256": "035a03e02a0690ec51d92df0b61e2ae6abb7b8d6a141112640f8d649eb583949",
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
- /** Injected clock for leases, refresh stamps and `addedAt`. */
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
@@ -24,7 +24,6 @@ export type LockEvent = {
24
24
  path: string;
25
25
  };
26
26
  export interface LockEnvironment {
27
- now: () => number;
28
27
  onLockEvent?: (event: LockEvent) => void;
29
28
  onLockStep?: (lock: {
30
29
  name: string;
@@ -42,7 +42,6 @@ export async function acquirePoolLock(spec, defaults, env) {
42
42
  name: spec.name,
43
43
  path: spec.path,
44
44
  ttlMs: options.ttlMs,
45
- now: env.now,
46
45
  renew: options.renew,
47
46
  onContended: () => emit('contended'),
48
47
  ...(env.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 `${Math.round(clampPercent(remaining))}% left`;
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
- kind: 'window',
111
- name: quotaWindowName(limit),
112
- figure: percentLeft(limit.remainingPercent ?? 0),
113
- remainingPercent,
114
- checkedAt: limit.checkedAt,
115
- ...resetDetails(limit.resetsAt, limit.checkedAt, now),
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
- kind: 'budget',
128
- name: 'credits',
129
- figure,
130
- ...(remainingPercent === undefined
131
- ? {}
132
- : { remainingPercent: clampPercent(remainingPercent) }),
133
- checkedAt: budget.checkedAt,
134
- ...resetDetails(budget.resetsAt, budget.checkedAt, now),
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. With nothing
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";