@hashimkarim/usagestat-linux-arm64-gnu 2.3.2 → 2.4.1

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 (180) hide show
  1. package/LICENSE +2250 -758
  2. package/native-manifest.json +557 -191
  3. package/package.json +62 -1
  4. package/plugins/UPSTREAM-LICENSES.md +1 -1
  5. package/plugins/_provider-icons/NOTICE +36 -3
  6. package/plugins/_provider-icons/licenses/Win-CodexBar-MIT.txt +21 -0
  7. package/plugins/_provider-icons/licenses/crossusage-MIT.txt +22 -0
  8. package/plugins/_provider-icons/manifest.json +8409 -189
  9. package/plugins/_provider-icons/provenance.json +873 -0
  10. package/plugins/_provider-icons/source.json +2 -2
  11. package/plugins/abliteration/icon-color.svg +5 -0
  12. package/plugins/abliteration/icon.svg +4 -4
  13. package/plugins/abliteration/plugin.json +1 -1
  14. package/plugins/aerostack/icon-color.svg +1 -0
  15. package/plugins/aerostack/icon.svg +1 -1
  16. package/plugins/aerostack/plugin.json +1 -1
  17. package/plugins/aiand/icon-color.svg +6 -0
  18. package/plugins/aiand/icon.svg +3 -3
  19. package/plugins/aixy/icon-color.svg +1 -0
  20. package/plugins/aixy/icon.svg +1 -1
  21. package/plugins/aixy/plugin.json +1 -1
  22. package/plugins/amp/plugin.js +68 -6
  23. package/plugins/atlascloud/plugin.json +1 -1
  24. package/plugins/bifrost/icon-color.svg +3 -0
  25. package/plugins/bifrost/icon.svg +2 -2
  26. package/plugins/bifrost/plugin.json +1 -1
  27. package/plugins/chatbox/icon-color.svg +4 -0
  28. package/plugins/chatbox/icon.svg +3 -3
  29. package/plugins/chatbox/plugin.json +1 -1
  30. package/plugins/chutes/icon-color.svg +1 -0
  31. package/plugins/chutes/icon.svg +1 -7
  32. package/plugins/claude/plugin.js +33 -6
  33. package/plugins/claudeplatform/plugin.js +1 -1
  34. package/plugins/claudeplatform/plugin.json +2 -2
  35. package/plugins/clawrouter/icon-color.svg +7 -0
  36. package/plugins/clawrouter/icon.svg +6 -6
  37. package/plugins/clinepass/icon-color.svg +4 -0
  38. package/plugins/clinepass/icon.svg +3 -3
  39. package/plugins/codebuddy/icon-color.svg +1 -0
  40. package/plugins/codebuddy/icon.svg +1 -0
  41. package/plugins/coderabbit/icon-color.svg +3 -0
  42. package/plugins/coderabbit/icon.svg +3 -0
  43. package/plugins/codex/plugin.js +32 -5
  44. package/plugins/cosmic/icon-color.svg +1 -0
  45. package/plugins/cosmic/icon.svg +1 -1
  46. package/plugins/cosmic/plugin.json +1 -1
  47. package/plugins/deepgram/icon-color.svg +4 -0
  48. package/plugins/deepgram/icon.svg +4 -1
  49. package/plugins/devin/icon-color.svg +1 -0
  50. package/plugins/devin/icon.svg +1 -5
  51. package/plugins/devpass/icon-color.svg +3 -0
  52. package/plugins/devpass/icon.svg +2 -2
  53. package/plugins/devpass/plugin.json +1 -1
  54. package/plugins/exa/plugin.json +1 -1
  55. package/plugins/fal/plugin.json +1 -1
  56. package/plugins/flora/icon-color.svg +1 -0
  57. package/plugins/flora/icon.svg +1 -4
  58. package/plugins/flora/plugin.json +1 -1
  59. package/plugins/futureagi/icon-color.svg +24 -0
  60. package/plugins/futureagi/icon.svg +14 -14
  61. package/plugins/futureagi/plugin.json +1 -1
  62. package/plugins/gemini-apps/plugin.json +1 -1
  63. package/plugins/gitkraken/icon-color.svg +1 -0
  64. package/plugins/gitkraken/icon.svg +1 -2
  65. package/plugins/gitkraken/plugin.json +1 -1
  66. package/plugins/googledeveloper/plugin.json +1 -1
  67. package/plugins/grok/icon-color.svg +1 -1
  68. package/plugins/grok/icon.svg +1 -1
  69. package/plugins/grok/plugin.js +26 -2
  70. package/plugins/grok/plugin.json +2 -1
  71. package/plugins/helmcode/icon-color.svg +5 -0
  72. package/plugins/helmcode/icon.svg +2 -2
  73. package/plugins/helmcode/plugin.json +1 -1
  74. package/plugins/huggingface/plugin.json +1 -1
  75. package/plugins/hyper/icon-color.svg +3 -0
  76. package/plugins/hyper/icon.svg +3 -0
  77. package/plugins/hyper/plugin.json +1 -1
  78. package/plugins/ibmbob/icon-color.svg +23 -0
  79. package/plugins/ibmbob/icon.svg +13 -13
  80. package/plugins/langdock/icon-color.svg +4 -0
  81. package/plugins/langdock/icon.svg +3 -3
  82. package/plugins/langdock/plugin.json +1 -1
  83. package/plugins/linkup/icon-color.svg +10 -0
  84. package/plugins/linkup/icon.svg +3 -3
  85. package/plugins/linkup/plugin.json +1 -1
  86. package/plugins/litellm/icon-color.svg +16 -0
  87. package/plugins/litellm/icon.svg +13 -13
  88. package/plugins/lithosai/icon-color.svg +1 -0
  89. package/plugins/lithosai/icon.svg +1 -1
  90. package/plugins/lithosai/plugin.json +1 -1
  91. package/plugins/llmman/icon-color.svg +4 -0
  92. package/plugins/llmman/icon.svg +3 -3
  93. package/plugins/llmman/plugin.json +1 -1
  94. package/plugins/mimo/plugin.js +86 -0
  95. package/plugins/mimo/plugin.json +3 -1
  96. package/plugins/munito/icon-color.svg +7 -0
  97. package/plugins/munito/icon.svg +5 -5
  98. package/plugins/munito/plugin.json +1 -1
  99. package/plugins/muse/icon-color.svg +1 -0
  100. package/plugins/muse/icon.svg +1 -3
  101. package/plugins/muse/plugin.json +1 -1
  102. package/plugins/museai/icon-color.svg +3 -0
  103. package/plugins/museai/icon.svg +2 -2
  104. package/plugins/museai/plugin.js +1 -1
  105. package/plugins/museai/plugin.json +2 -2
  106. package/plugins/neuralwatt/icon-color.svg +3 -0
  107. package/plugins/neuralwatt/icon.svg +2 -2
  108. package/plugins/notion/icon-color.svg +1 -0
  109. package/plugins/notion/icon.svg +1 -1
  110. package/plugins/notion/plugin.js +98 -7
  111. package/plugins/nous/plugin.json +1 -1
  112. package/plugins/openai-api/plugin.js +18 -3
  113. package/plugins/opendesign/plugin.json +1 -1
  114. package/plugins/openrouter/icon-color.svg +1 -1
  115. package/plugins/parallel/icon-color.svg +11 -0
  116. package/plugins/parallel/icon.svg +9 -9
  117. package/plugins/parallel/plugin.json +1 -1
  118. package/plugins/pi/icon-color.svg +1 -0
  119. package/plugins/pi/icon.svg +1 -0
  120. package/plugins/poe/icon-color.svg +1 -0
  121. package/plugins/poe/icon.svg +1 -1
  122. package/plugins/qoder/icon-color.svg +1 -0
  123. package/plugins/qoder/icon.svg +1 -3
  124. package/plugins/qwencloud/plugin.json +1 -1
  125. package/plugins/raycast/icon-color.svg +3 -0
  126. package/plugins/raycast/icon.svg +2 -3
  127. package/plugins/raycast/plugin.json +1 -1
  128. package/plugins/replicate/plugin.json +1 -1
  129. package/plugins/sailresearch/icon-color.svg +4 -0
  130. package/plugins/sailresearch/icon.svg +3 -3
  131. package/plugins/sailresearch/plugin.json +1 -1
  132. package/plugins/sakana/icon-color.svg +1 -0
  133. package/plugins/sakana/icon.svg +1 -5
  134. package/plugins/siliconflow/plugin.json +1 -1
  135. package/plugins/sofya/icon-color.svg +3 -0
  136. package/plugins/sofya/icon.svg +2 -2
  137. package/plugins/sofya/plugin.json +1 -1
  138. package/plugins/soniox/icon-color.svg +3 -0
  139. package/plugins/soniox/icon.svg +1 -1
  140. package/plugins/soniox/plugin.json +1 -1
  141. package/plugins/sub2api/icon-color.svg +1 -0
  142. package/plugins/sub2api/icon.svg +1 -4
  143. package/plugins/t3chat/icon-color.svg +4 -27
  144. package/plugins/t3chat/icon.svg +4 -3
  145. package/plugins/tavily/icon-color.svg +1 -0
  146. package/plugins/tavily/icon.svg +1 -3
  147. package/plugins/tavily/plugin.json +1 -1
  148. package/plugins/tinyapi/icon-color.svg +4 -0
  149. package/plugins/tinyapi/icon.svg +3 -3
  150. package/plugins/tinyapi/plugin.json +1 -1
  151. package/plugins/traecn/plugin.json +1 -1
  152. package/plugins/tripo/icon-color.svg +1 -0
  153. package/plugins/tripo/icon.svg +1 -4
  154. package/plugins/tripo/plugin.json +1 -1
  155. package/plugins/trustedrouter/LICENSE +21 -0
  156. package/plugins/trustedrouter/icon.svg +7 -0
  157. package/plugins/trustedrouter/plugin.js +108 -0
  158. package/plugins/trustedrouter/plugin.json +24 -0
  159. package/plugins/typesafe/icon-color.svg +1 -0
  160. package/plugins/typesafe/icon.svg +1 -4
  161. package/plugins/typesafe/plugin.json +1 -1
  162. package/plugins/v0/plugin.json +1 -1
  163. package/plugins/vercel/plugin.json +2 -2
  164. package/plugins/wayfinder/icon-color.svg +5 -0
  165. package/plugins/wayfinder/icon.svg +4 -4
  166. package/plugins/workbuddy/icon-color.svg +1 -0
  167. package/plugins/workbuddy/icon.svg +1 -1
  168. package/plugins/workbuddy/plugin.json +1 -1
  169. package/plugins/xapi/icon-color.svg +1 -0
  170. package/plugins/xapi/icon.svg +1 -1
  171. package/plugins/xapi/plugin.json +1 -1
  172. package/plugins/xkiro/icon-color.svg +1 -0
  173. package/plugins/xkiro/icon.svg +1 -1
  174. package/plugins/xkiro/plugin.json +1 -1
  175. package/plugins/zed/icon-color.svg +3 -0
  176. package/plugins/zed/icon.svg +2 -3
  177. package/plugins/zoommate/icon-color.svg +1 -0
  178. package/plugins/zoommate/icon.svg +1 -1
  179. package/usagestat +0 -0
  180. package/usagestatd +0 -0
@@ -1,4 +1,4 @@
1
1
  {
2
- "archive": "https://github.com/agenticdriver/provider-icons/releases/download/v0.1.0-alpha.1/agenticdriver-provider-icons-0.1.0-alpha.1.tgz",
3
- "sha256": "a98be910723f37595ba4755bc5d0a3fa00b7fa9436ae3fee5a55a305b4f2639a"
2
+ "archive": "https://github.com/agenticdriver/provider-icons/releases/download/v1.1.0/agenticdriver-provider-icons-1.1.0.tgz",
3
+ "sha256": "eb0d74cff56faaefe6675fca9c1e188ffa7cdb7b2c5c82aa74f9867cc895dbe4"
4
4
  }
@@ -0,0 +1,5 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="1000" height="1000" viewBox="0 0 1000 1000" fill="none">
2
+ <path d="M282.521 230H199V770.458H282.521V230Z" fill="currentColor" />
3
+ <path d="M801.487 230H712.348L501.571 740.998L489.954 770.458H577.195L788.58 261.434L801.487 230Z" fill="currentColor" />
4
+ <path d="M506.281 230H422.533L346.528 758.613L344.706 770.458H428.151L502.029 257.942L506.281 230Z" fill="currentColor" />
5
+ </svg>
@@ -1,5 +1,5 @@
1
- <svg width="1000" height="1000" viewBox="0 0 1000 1000" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <path d="M282.521 230H199V770.458H282.521V230Z" fill="#000000"/>
3
- <path d="M801.487 230H712.348L501.571 740.998L489.954 770.458H577.195L788.58 261.434L801.487 230Z" fill="#000000"/>
4
- <path d="M506.281 230H422.533L346.528 758.613L344.706 770.458H428.151L502.029 257.942L506.281 230Z" fill="#000000"/>
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="1000" height="1000" viewBox="0 0 1000 1000" fill="none">
2
+ <path d="M282.521 230H199V770.458H282.521V230Z" fill="currentColor" />
3
+ <path d="M801.487 230H712.348L501.571 740.998L489.954 770.458H577.195L788.58 261.434L801.487 230Z" fill="currentColor" />
4
+ <path d="M506.281 230H422.533L346.528 758.613L344.706 770.458H428.151L502.029 257.942L506.281 230Z" fill="currentColor" />
5
5
  </svg>
@@ -16,7 +16,7 @@
16
16
  "setupFields": [],
17
17
  "upstream": {
18
18
  "repository": "https://github.com/steipete/CodexBar",
19
- "revision": "1f6da9bec44455288ddee5ef6f3617a803d8eb2a",
19
+ "revision": "a26ca57b518667a659d69524c473af2735069612",
20
20
  "path": "Sources/CodexBarCore/Resources/Plugins/abliteration.js",
21
21
  "sha256": "16982dfb14ae7e1181c688f5084e6b17ea84f72a28c1a98623ebc03c1dff5516",
22
22
  "license": "MIT"
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill="currentColor" d="m12 2 10 18h-5l-5-9-5 9H2Z" /><path fill="currentColor" d="M9 19h6v3H9Z" /></svg>
@@ -1 +1 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="m12 2 10 18h-5l-5-9-5 9H2Z"/><path fill="currentColor" d="M9 19h6v3H9Z"/></svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill="currentColor" d="m12 2 10 18h-5l-5-9-5 9H2Z" /><path fill="currentColor" d="M9 19h6v3H9Z" /></svg>
@@ -16,7 +16,7 @@
16
16
  "setupFields": [],
17
17
  "upstream": {
18
18
  "repository": "https://github.com/steipete/CodexBar",
19
- "revision": "1f6da9bec44455288ddee5ef6f3617a803d8eb2a",
19
+ "revision": "a26ca57b518667a659d69524c473af2735069612",
20
20
  "path": "Sources/CodexBarCore/Resources/Plugins/aerostack.js",
21
21
  "sha256": "f0ead202fc5ee40481ea22122b7f4d9238013cbc68cb6b218592d6a64439a9f3",
22
22
  "license": "MIT"
@@ -0,0 +1,6 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
2
+ <g fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
3
+ <path d="M18.2 11.4c0 4.9-3.5 8.9-8.1 8.9a4.7 4.7 0 0 1-4.7-4.7c0-5.9 7.7-4.4 7.7-8.8a2.9 2.9 0 1 0-5.8 0c0 3.2 2.8 8.9 11.9 13" />
4
+ <path d="M16.5 11.4h3.2" />
5
+ </g>
6
+ </svg>
@@ -1,6 +1,6 @@
1
- <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
2
2
  <g fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
3
- <path d="M18.2 11.4c0 4.9-3.5 8.9-8.1 8.9a4.7 4.7 0 0 1-4.7-4.7c0-5.9 7.7-4.4 7.7-8.8a2.9 2.9 0 1 0-5.8 0c0 3.2 2.8 8.9 11.9 13"/>
4
- <path d="M16.5 11.4h3.2"/>
3
+ <path d="M18.2 11.4c0 4.9-3.5 8.9-8.1 8.9a4.7 4.7 0 0 1-4.7-4.7c0-5.9 7.7-4.4 7.7-8.8a2.9 2.9 0 1 0-5.8 0c0 3.2 2.8 8.9 11.9 13" />
4
+ <path d="M16.5 11.4h3.2" />
5
5
  </g>
6
6
  </svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="1024" height="1024" viewBox="0 0 64 64" role="img" aria-labelledby="title"><title id="title">Aixy</title><g transform="translate(32 32) scale(1.1) translate(-34.5 -30)"><path fill="#123650" fill-rule="evenodd" d="M18 47 30.6 16h4.6L48 47h-8.2l-2.6-7.2H27L24.2 47H18z M31.8 24.6l-2.7 8.2h6l-2.8-8.2h-.5z"/><circle cx="47" cy="17" r="4" fill="#ec744a"/></g></svg>
@@ -1 +1 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="1024" height="1024" viewBox="0 0 64 64" role="img" aria-labelledby="title"><title id="title">Aixy</title><g transform="translate(32 32) scale(1.1) translate(-34.5 -30)"><path fill="#123650" fill-rule="evenodd" d="M18 47 30.6 16h4.6L48 47h-8.2l-2.6-7.2H27L24.2 47H18z M31.8 24.6l-2.7 8.2h6l-2.8-8.2h-.5z"/><circle cx="47" cy="17" r="4" fill="#ec744a"/></g></svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><defs><filter id="inspiration-ink"><feColorMatrix values="-0.2126 -0.7152 -0.0722 0 1 -0.2126 -0.7152 -0.0722 0 1 -0.2126 -0.7152 -0.0722 0 1 0 0 0 1 0" /></filter><mask id="inspiration-mask" maskUnits="userSpaceOnUse" x="0" y="0" width="64" height="64" style="mask-type:luminance"><g filter="url(#inspiration-ink)"><svg width="64" height="64" viewBox="0 0 64 64" role="img" x="0" y="0"><title id="title">Aixy</title><g transform="translate(32 32) scale(1.1) translate(-34.5 -30)"><path fill="#123650" fill-rule="evenodd" d="M18 47 30.6 16h4.6L48 47h-8.2l-2.6-7.2H27L24.2 47H18z M31.8 24.6l-2.7 8.2h6l-2.8-8.2h-.5z" /><circle cx="47" cy="17" r="4" fill="#ec744a" /></g></svg></g></mask></defs><rect x="0" y="0" width="64" height="64" fill="currentColor" mask="url(#inspiration-mask)" /></svg>
@@ -24,7 +24,7 @@
24
24
  ],
25
25
  "upstream": {
26
26
  "repository": "https://github.com/steipete/CodexBar",
27
- "revision": "1f6da9bec44455288ddee5ef6f3617a803d8eb2a",
27
+ "revision": "a26ca57b518667a659d69524c473af2735069612",
28
28
  "path": "Sources/CodexBarCore/Resources/Plugins/aixy.js",
29
29
  "sha256": "975d98525503e286f9425c2a1d64fe00da8e2fdc0b00890e15c2cbcb9a37c125",
30
30
  "license": "MIT"
@@ -35,8 +35,9 @@
35
35
  return Number(s.replace(/,/g, ""))
36
36
  }
37
37
 
38
- function parseBalanceText(text) {
39
- if (!text || typeof text !== "string") return null
38
+ function parseBalanceText(rawText) {
39
+ if (!rawText || typeof rawText !== "string") return null
40
+ var text = rawText.replace(/\u001b\[[0-9;]*[A-Za-z]/g, "").replace(/\*\*/g, "")
40
41
 
41
42
  var result = {
42
43
  remaining: null,
@@ -45,6 +46,9 @@
45
46
  bonusPct: null,
46
47
  bonusDays: null,
47
48
  credits: null,
49
+ freeRemainingPct: null,
50
+ workspaces: [],
51
+ enterpriseWorkspaces: [],
48
52
  }
49
53
 
50
54
  var balanceMatch = text.match(/\$([0-9][0-9,]*(?:\.[0-9]+)?)\/\$([0-9][0-9,]*(?:\.[0-9]+)?) remaining/)
@@ -57,6 +61,12 @@
57
61
  }
58
62
  }
59
63
 
64
+ var percentMatch = text.match(/^\s*Amp Free:\s*([0-9][0-9,]*(?:\.[0-9]+)?)\s*%\s+remaining/im)
65
+ if (percentMatch) {
66
+ var pctRemaining = parseMoney(percentMatch[1])
67
+ if (Number.isFinite(pctRemaining)) result.freeRemainingPct = Math.max(0, Math.min(100, pctRemaining))
68
+ }
69
+
60
70
  var rateMatch = text.match(/replenishes \+\$([0-9][0-9,]*(?:\.[0-9]+)?)\/hour/)
61
71
  if (rateMatch) {
62
72
  var rate = parseMoney(rateMatch[1])
@@ -79,7 +89,26 @@
79
89
  if (Number.isFinite(credits)) result.credits = credits
80
90
  }
81
91
 
82
- if (result.total === null && result.credits === null) return null
92
+ var workspacePattern = /^\s*Workspace\s+(.+?):\s*\$?([0-9][0-9,]*(?:\.[0-9]+)?)\s+remaining/gim
93
+ var workspaceMatch
94
+ while ((workspaceMatch = workspacePattern.exec(text))) {
95
+ var workspaceRemaining = parseMoney(workspaceMatch[2])
96
+ var workspaceName = workspaceMatch[1].trim()
97
+ if (workspaceName && Number.isFinite(workspaceRemaining)) {
98
+ result.workspaces.push({ name: workspaceName, remaining: workspaceRemaining })
99
+ }
100
+ }
101
+
102
+ // Enterprise workspaces report who pays instead of a balance, so there is nothing to meter.
103
+ var enterprisePattern = /^\s*Workspace\s+(.+?):\s*usage\s+paid\s+by\s+your\s+enterprise\b/gim
104
+ var enterpriseMatch
105
+ while ((enterpriseMatch = enterprisePattern.exec(text))) {
106
+ var enterpriseName = enterpriseMatch[1].trim()
107
+ if (enterpriseName) result.enterpriseWorkspaces.push(enterpriseName)
108
+ }
109
+
110
+ if (result.total === null && result.credits === null && result.freeRemainingPct === null &&
111
+ !result.workspaces.length && !result.enterpriseWorkspaces.length) return null
83
112
 
84
113
  return result
85
114
  }
@@ -126,7 +155,17 @@
126
155
  throw "Could not parse usage data."
127
156
  }
128
157
  ctx.host.log.warn("no balance data found, assuming credits-only: " + json.result.displayText)
129
- balance = { remaining: null, total: null, hourlyRate: 0, bonusPct: null, bonusDays: null, credits: 0 }
158
+ balance = {
159
+ remaining: null,
160
+ total: null,
161
+ hourlyRate: 0,
162
+ bonusPct: null,
163
+ bonusDays: null,
164
+ credits: 0,
165
+ freeRemainingPct: null,
166
+ workspaces: [],
167
+ enterpriseWorkspaces: [],
168
+ }
130
169
  }
131
170
 
132
171
  var lines = []
@@ -159,15 +198,38 @@
159
198
  }
160
199
  }
161
200
 
162
- if (balance.credits !== null && balance.total === null) plan = "Credits"
201
+ if (balance.total === null && balance.freeRemainingPct !== null) {
202
+ lines.push(ctx.line.progress({
203
+ label: "Free",
204
+ used: 100 - balance.freeRemainingPct,
205
+ limit: 100,
206
+ format: { kind: "percent" },
207
+ periodDurationMs: 24 * 3600 * 1000,
208
+ }))
209
+ }
210
+
211
+ var hasFree = balance.total !== null || balance.freeRemainingPct !== null
212
+ if (!hasFree && balance.enterpriseWorkspaces.length) plan = "Enterprise"
213
+ else if (!hasFree && balance.credits !== null) plan = "Credits"
163
214
 
164
- if (balance.credits !== null && (balance.credits > 0 || balance.total === null)) {
215
+ if (balance.credits !== null && (balance.credits > 0 || !hasFree)) {
165
216
  lines.push(ctx.line.text({
166
217
  label: "Credits",
167
218
  value: "$" + balance.credits.toFixed(2),
168
219
  }))
169
220
  }
170
221
 
222
+ for (var i = 0; i < balance.workspaces.length; i++) {
223
+ lines.push(ctx.line.text({
224
+ label: "Workspace " + balance.workspaces[i].name,
225
+ value: "$" + balance.workspaces[i].remaining.toFixed(2),
226
+ }))
227
+ }
228
+
229
+ for (var j = 0; j < balance.enterpriseWorkspaces.length; j++) {
230
+ lines.push(ctx.line.text({ label: "Workspace " + balance.enterpriseWorkspaces[j], value: "Enterprise" }))
231
+ }
232
+
171
233
  return { plan: plan, lines: lines }
172
234
  }
173
235
 
@@ -16,7 +16,7 @@
16
16
  "setupFields": [],
17
17
  "upstream": {
18
18
  "repository": "https://github.com/steipete/CodexBar",
19
- "revision": "1f6da9bec44455288ddee5ef6f3617a803d8eb2a",
19
+ "revision": "a26ca57b518667a659d69524c473af2735069612",
20
20
  "path": "Sources/CodexBarCore/Resources/Plugins/atlascloud.js",
21
21
  "sha256": "852fb78abaf4fcdbbfbfeac0b60d6b82a9ca9b1d1d2f9014f6e5299b41ac47fa",
22
22
  "license": "MIT"
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 110 110" fill="currentColor">
2
+ <path transform="translate(11.13 0)" d="M65.8047 109.59H0V87.6719H65.8047V109.59ZM87.7393 87.6719H65.8047V65.7539H87.7393V87.6719ZM43.8701 65.7539H21.9355V43.8359H43.8701V65.7539ZM87.7393 43.8359H65.8047V21.918H87.7393V43.8359ZM65.8047 21.918H0V0H65.8047V21.918Z" fill="currentColor" />
3
+ </svg>
@@ -1,3 +1,3 @@
1
- <svg width="88" height="110" viewBox="0 0 88 110" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <path d="M65.8047 109.59H0V87.6719H65.8047V109.59ZM87.7393 87.6719H65.8047V65.7539H87.7393V87.6719ZM43.8701 65.7539H21.9355V43.8359H43.8701V65.7539ZM87.7393 43.8359H65.8047V21.918H87.7393V43.8359ZM65.8047 21.918H0V0H65.8047V21.918Z" fill="#33C19E"/>
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 110 110" fill="currentColor">
2
+ <path transform="translate(11.13 0)" d="M65.8047 109.59H0V87.6719H65.8047V109.59ZM87.7393 87.6719H65.8047V65.7539H87.7393V87.6719ZM43.8701 65.7539H21.9355V43.8359H43.8701V65.7539ZM87.7393 43.8359H65.8047V21.918H87.7393V43.8359ZM65.8047 21.918H0V0H65.8047V21.918Z" fill="currentColor" />
3
3
  </svg>
@@ -23,7 +23,7 @@
23
23
  ],
24
24
  "upstream": {
25
25
  "repository": "https://github.com/steipete/CodexBar",
26
- "revision": "1f6da9bec44455288ddee5ef6f3617a803d8eb2a",
26
+ "revision": "a26ca57b518667a659d69524c473af2735069612",
27
27
  "path": "Sources/CodexBarCore/Resources/Plugins/bifrost.js",
28
28
  "sha256": "b7576d59ccd077c812118cf09d282042589a80df470c621e414583050f03aa07",
29
29
  "license": "MIT"
@@ -0,0 +1,4 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
2
+ <path d="M17.0674 3.26367L17.0674 2.26367H17.0674V3.26367ZM17.0674 18.0566V19.0566H17.0674L17.0674 18.0566ZM7.66211 18.0566V17.0566C7.42949 17.0566 7.20415 17.1377 7.02487 17.286L7.66211 18.0566ZM4.41895 20.7383H3.41895C3.41895 21.1256 3.64261 21.4781 3.99306 21.6431C4.3435 21.808 4.75768 21.7558 5.05618 21.509L4.41895 20.7383ZM4.41895 17.165H5.41895C5.41895 16.8637 5.28308 16.5785 5.04912 16.3886L4.41895 17.165ZM6.93359 3.26367V2.26367H6.93357L6.93359 3.26367ZM17.0674 3.26367L17.0674 4.26367C18.721 4.26372 20.0615 5.6042 20.0615 7.25781H21.0615H22.0615C22.0615 4.49957 19.8256 2.26375 17.0674 2.26367L17.0674 3.26367ZM21.0615 7.25781H20.0615V14.0625H21.0615H22.0615V7.25781H21.0615ZM21.0615 14.0625H20.0615C20.0615 15.7161 18.721 17.0566 17.0674 17.0566L17.0674 18.0566L17.0674 19.0566C19.8256 19.0566 22.0615 16.8207 22.0615 14.0625H21.0615ZM17.0674 18.0566V17.0566H7.66211V18.0566V19.0566H17.0674V18.0566ZM7.66211 18.0566L7.02487 17.286L3.78171 19.9676L4.41895 20.7383L5.05618 21.509L8.29934 18.8273L7.66211 18.0566ZM4.41895 20.7383H5.41895V17.165H4.41895H3.41895V20.7383H4.41895ZM4.41895 17.165L5.04912 16.3886C4.37038 15.8377 3.93945 15.0007 3.93945 14.0625H2.93945H1.93945C1.93945 15.6296 2.66288 17.0277 3.78877 17.9415L4.41895 17.165ZM2.93945 14.0625H3.93945V7.25781H2.93945H1.93945V14.0625H2.93945ZM2.93945 7.25781H3.93945C3.93945 5.6042 5.27994 4.26372 6.93362 4.26367L6.93359 3.26367L6.93357 2.26367C4.17542 2.26375 1.93945 4.49957 1.93945 7.25781H2.93945ZM6.93359 3.26367V4.26367H17.0674V3.26367V2.26367H6.93359V3.26367Z" fill="currentColor" />
3
+ <path d="M9.13379 9.29883C9.83353 9.29883 10.4014 9.86667 10.4014 10.5664C10.4012 11.266 9.83346 11.833 9.13379 11.833C8.43421 11.8329 7.86731 11.266 7.86719 10.5664C7.86719 9.86673 8.43414 9.29893 9.13379 9.29883ZM14.8662 9.29883C15.566 9.29883 16.1338 9.86667 16.1338 10.5664C16.1337 11.266 15.5659 11.833 14.8662 11.833C14.1666 11.8329 13.5997 11.266 13.5996 10.5664C13.5996 9.86673 14.1666 9.29893 14.8662 9.29883Z" fill="currentColor" />
4
+ </svg>
@@ -1,4 +1,4 @@
1
- <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <path d="M17.0674 3.26367L17.0674 2.26367H17.0674V3.26367ZM17.0674 18.0566V19.0566H17.0674L17.0674 18.0566ZM7.66211 18.0566V17.0566C7.42949 17.0566 7.20415 17.1377 7.02487 17.286L7.66211 18.0566ZM4.41895 20.7383H3.41895C3.41895 21.1256 3.64261 21.4781 3.99306 21.6431C4.3435 21.808 4.75768 21.7558 5.05618 21.509L4.41895 20.7383ZM4.41895 17.165H5.41895C5.41895 16.8637 5.28308 16.5785 5.04912 16.3886L4.41895 17.165ZM6.93359 3.26367V2.26367H6.93357L6.93359 3.26367ZM17.0674 3.26367L17.0674 4.26367C18.721 4.26372 20.0615 5.6042 20.0615 7.25781H21.0615H22.0615C22.0615 4.49957 19.8256 2.26375 17.0674 2.26367L17.0674 3.26367ZM21.0615 7.25781H20.0615V14.0625H21.0615H22.0615V7.25781H21.0615ZM21.0615 14.0625H20.0615C20.0615 15.7161 18.721 17.0566 17.0674 17.0566L17.0674 18.0566L17.0674 19.0566C19.8256 19.0566 22.0615 16.8207 22.0615 14.0625H21.0615ZM17.0674 18.0566V17.0566H7.66211V18.0566V19.0566H17.0674V18.0566ZM7.66211 18.0566L7.02487 17.286L3.78171 19.9676L4.41895 20.7383L5.05618 21.509L8.29934 18.8273L7.66211 18.0566ZM4.41895 20.7383H5.41895V17.165H4.41895H3.41895V20.7383H4.41895ZM4.41895 17.165L5.04912 16.3886C4.37038 15.8377 3.93945 15.0007 3.93945 14.0625H2.93945H1.93945C1.93945 15.6296 2.66288 17.0277 3.78877 17.9415L4.41895 17.165ZM2.93945 14.0625H3.93945V7.25781H2.93945H1.93945V14.0625H2.93945ZM2.93945 7.25781H3.93945C3.93945 5.6042 5.27994 4.26372 6.93362 4.26367L6.93359 3.26367L6.93357 2.26367C4.17542 2.26375 1.93945 4.49957 1.93945 7.25781H2.93945ZM6.93359 3.26367V4.26367H17.0674V3.26367V2.26367H6.93359V3.26367Z" fill="#000000"/>
3
- <path d="M9.13379 9.29883C9.83353 9.29883 10.4014 9.86667 10.4014 10.5664C10.4012 11.266 9.83346 11.833 9.13379 11.833C8.43421 11.8329 7.86731 11.266 7.86719 10.5664C7.86719 9.86673 8.43414 9.29893 9.13379 9.29883ZM14.8662 9.29883C15.566 9.29883 16.1338 9.86667 16.1338 10.5664C16.1337 11.266 15.5659 11.833 14.8662 11.833C14.1666 11.8329 13.5997 11.266 13.5996 10.5664C13.5996 9.86673 14.1666 9.29893 14.8662 9.29883Z" fill="#000000"/>
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
2
+ <path d="M17.0674 3.26367L17.0674 2.26367H17.0674V3.26367ZM17.0674 18.0566V19.0566H17.0674L17.0674 18.0566ZM7.66211 18.0566V17.0566C7.42949 17.0566 7.20415 17.1377 7.02487 17.286L7.66211 18.0566ZM4.41895 20.7383H3.41895C3.41895 21.1256 3.64261 21.4781 3.99306 21.6431C4.3435 21.808 4.75768 21.7558 5.05618 21.509L4.41895 20.7383ZM4.41895 17.165H5.41895C5.41895 16.8637 5.28308 16.5785 5.04912 16.3886L4.41895 17.165ZM6.93359 3.26367V2.26367H6.93357L6.93359 3.26367ZM17.0674 3.26367L17.0674 4.26367C18.721 4.26372 20.0615 5.6042 20.0615 7.25781H21.0615H22.0615C22.0615 4.49957 19.8256 2.26375 17.0674 2.26367L17.0674 3.26367ZM21.0615 7.25781H20.0615V14.0625H21.0615H22.0615V7.25781H21.0615ZM21.0615 14.0625H20.0615C20.0615 15.7161 18.721 17.0566 17.0674 17.0566L17.0674 18.0566L17.0674 19.0566C19.8256 19.0566 22.0615 16.8207 22.0615 14.0625H21.0615ZM17.0674 18.0566V17.0566H7.66211V18.0566V19.0566H17.0674V18.0566ZM7.66211 18.0566L7.02487 17.286L3.78171 19.9676L4.41895 20.7383L5.05618 21.509L8.29934 18.8273L7.66211 18.0566ZM4.41895 20.7383H5.41895V17.165H4.41895H3.41895V20.7383H4.41895ZM4.41895 17.165L5.04912 16.3886C4.37038 15.8377 3.93945 15.0007 3.93945 14.0625H2.93945H1.93945C1.93945 15.6296 2.66288 17.0277 3.78877 17.9415L4.41895 17.165ZM2.93945 14.0625H3.93945V7.25781H2.93945H1.93945V14.0625H2.93945ZM2.93945 7.25781H3.93945C3.93945 5.6042 5.27994 4.26372 6.93362 4.26367L6.93359 3.26367L6.93357 2.26367C4.17542 2.26375 1.93945 4.49957 1.93945 7.25781H2.93945ZM6.93359 3.26367V4.26367H17.0674V3.26367V2.26367H6.93359V3.26367Z" fill="currentColor" />
3
+ <path d="M9.13379 9.29883C9.83353 9.29883 10.4014 9.86667 10.4014 10.5664C10.4012 11.266 9.83346 11.833 9.13379 11.833C8.43421 11.8329 7.86731 11.266 7.86719 10.5664C7.86719 9.86673 8.43414 9.29893 9.13379 9.29883ZM14.8662 9.29883C15.566 9.29883 16.1338 9.86667 16.1338 10.5664C16.1337 11.266 15.5659 11.833 14.8662 11.833C14.1666 11.8329 13.5997 11.266 13.5996 10.5664C13.5996 9.86673 14.1666 9.29893 14.8662 9.29883Z" fill="currentColor" />
4
4
  </svg>
@@ -16,7 +16,7 @@
16
16
  "setupFields": [],
17
17
  "upstream": {
18
18
  "repository": "https://github.com/steipete/CodexBar",
19
- "revision": "1f6da9bec44455288ddee5ef6f3617a803d8eb2a",
19
+ "revision": "a26ca57b518667a659d69524c473af2735069612",
20
20
  "path": "Sources/CodexBarCore/Resources/Plugins/chatbox.js",
21
21
  "sha256": "cf0ae84410aa3794635c0df1edf4936ae514a070968a189dc6ef613c5445f957",
22
22
  "license": "MIT"
@@ -0,0 +1 @@
1
+ <svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Chutes</title><path clip-rule="evenodd" d="M14.713 19.436c-0.342 0.558-1.067 0.663-1.534 0.22l-2.079-1.964c-0.468-0.442-0.461-1.224 0.015-1.656l2.095-1.902c2.329-2.115 5.397-2.939 8.318-2.235l1.576 0.38c0.056 0.013 0.109 0.042 0.152 0.083 0.228 0.216 0.1 0.619-0.203 0.642l-0.034 0.002c-2.884 0.216-5.529 1.9-7.157 4.556z"></path><path clip-rule="evenodd" d="M5.921 18.235c-0.435 0.482-1.169 0.438-1.55-0.094L0.212 12.343c-0.38-0.529-0.233-1.294 0.31-1.622l8.293-4.996c2.644-1.593 5.791-1.762 8.53-0.458l6.016 2.866c0.093 0.044 0.174 0.112 0.237 0.2 0.331 0.461-0.024 1.121-0.563 1.046l-3.584-0.491c-2.861-0.392-5.742 0.712-7.793 2.986z"></path></svg>
@@ -1,7 +1 @@
1
- <svg viewBox="0 0 32 32" fill="#3184FF" xmlns="http://www.w3.org/2000/svg">
2
- <title>Chutes</title>
3
- <path d="M16 3c-6.1 0-11 4.9-11 11h5c0-3.3 2.7-6 6-6s6 2.7 6 6h5c0-6.1-4.9-11-11-11Z"/>
4
- <path d="M11 14h10l-5 8-5-8Z"/>
5
- <path d="M15 21h2v5h-2v-5Z"/>
6
- <path d="M11 26h10v3H11v-3Z"/>
7
- </svg>
1
+ <svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Chutes</title><path clip-rule="evenodd" d="M14.713 19.436c-0.342 0.558-1.067 0.663-1.534 0.22l-2.079-1.964c-0.468-0.442-0.461-1.224 0.015-1.656l2.095-1.902c2.329-2.115 5.397-2.939 8.318-2.235l1.576 0.38c0.056 0.013 0.109 0.042 0.152 0.083 0.228 0.216 0.1 0.619-0.203 0.642l-0.034 0.002c-2.884 0.216-5.529 1.9-7.157 4.556z"></path><path clip-rule="evenodd" d="M5.921 18.235c-0.435 0.482-1.169 0.438-1.55-0.094L0.212 12.343c-0.38-0.529-0.233-1.294 0.31-1.622l8.293-4.996c2.644-1.593 5.791-1.762 8.53-0.458l6.016 2.866c0.093 0.044 0.174 0.112 0.237 0.2 0.331 0.461-0.024 1.121-0.563 1.046l-3.584-0.491c-2.861-0.392-5.742 0.712-7.793 2.986z"></path></svg>
@@ -683,8 +683,28 @@
683
683
  return mins + "m"
684
684
  }
685
685
 
686
+ function hasLocalUsage(ctx) {
687
+ return !!(ctx.host.localUsage && typeof ctx.host.localUsage.daily === "function")
688
+ }
689
+
690
+ // The host summarizes local logs in the background. Reading its result keeps
691
+ // a quota probe from scanning every transcript again through ccusage. Returns
692
+ // null only when the host cannot cover this log root, so ccusage still can.
693
+ function queryLocalUsage(ctx, sinceStr, homePath) {
694
+ if (!hasLocalUsage(ctx)) return null
695
+ const opts = { since: sinceStr }
696
+ if (homePath) opts.homePath = homePath
697
+ const result = ctx.host.localUsage.daily(opts)
698
+ if (result && result.status === "ok" && result.data && Array.isArray(result.data.daily)) {
699
+ return { status: "ok", data: result.data, native: true }
700
+ }
701
+ if (result && result.status === "not_covered") return null
702
+ // Still warming up: show no local totals this round rather than start a scan.
703
+ return { status: (result && result.status) || "unavailable", data: null }
704
+ }
705
+
686
706
  function queryTokenUsage(ctx, homePath) {
687
- if (!ctx.host.ccusage || typeof ctx.host.ccusage.query !== "function") {
707
+ if (!hasLocalUsage(ctx) && (!ctx.host.ccusage || typeof ctx.host.ccusage.query !== "function")) {
688
708
  return { status: "unavailable", data: null }
689
709
  }
690
710
 
@@ -701,6 +721,9 @@
701
721
  queryOpts.homePath = homePath
702
722
  }
703
723
 
724
+ const local = queryLocalUsage(ctx, sinceStr, homePath)
725
+ if (local) return local
726
+
704
727
  const result = ctx.host.ccusage.query(queryOpts)
705
728
  if (!result || typeof result !== "object" || typeof result.status !== "string") {
706
729
  return { status: "runner_failed", data: null }
@@ -1036,7 +1059,8 @@
1036
1059
  function costAndTokensLabel(data, opts) {
1037
1060
  const includeZeroTokens = !!(opts && opts.includeZeroTokens)
1038
1061
  const parts = []
1039
- if (data.costUSD != null) parts.push("$" + data.costUSD.toFixed(2))
1062
+ // A partly priced day shows its known cost as a lower bound.
1063
+ if (data.costUSD != null) parts.push("$" + data.costUSD.toFixed(2) + (data.costKnown === false ? "+" : ""))
1040
1064
  if (data.tokens > 0 || (includeZeroTokens && data.tokens === 0)) {
1041
1065
  parts.push(fmtTokens(data.tokens) + " tokens")
1042
1066
  }
@@ -1069,7 +1093,7 @@
1069
1093
  label: usageDayLabel(day.date),
1070
1094
  value: hasCost ? cost : tokens,
1071
1095
  valueLabel: hasCost
1072
- ? "$" + cost.toFixed(2) + " · " + fmtTokens(tokens) + " tokens"
1096
+ ? "$" + cost.toFixed(2) + (day.costKnown === false ? "+" : "") + " · " + fmtTokens(tokens) + " tokens"
1073
1097
  : fmtTokens(tokens) + " tokens",
1074
1098
  })
1075
1099
  }
@@ -1111,7 +1135,7 @@
1111
1135
  lines.push(ctx.line.text({
1112
1136
  label: label,
1113
1137
  value: costAndTokensLabel(
1114
- { tokens: tokens, costUSD: cost === null ? 0 : cost },
1138
+ { tokens: tokens, costUSD: cost === null ? 0 : cost, costKnown: dayEntry && dayEntry.costKnown },
1115
1139
  { includeZeroTokens: true }
1116
1140
  )
1117
1141
  }))
@@ -1125,7 +1149,7 @@
1125
1149
  }
1126
1150
 
1127
1151
  function summarizeUsageDaily(daily) {
1128
- const summary = { tokens: 0, costUSD: 0, hasCost: false }
1152
+ const summary = { tokens: 0, costUSD: 0, hasCost: false, costKnown: true }
1129
1153
  const selectedDaily = (daily || []).slice(-30)
1130
1154
  for (let i = 0; i < selectedDaily.length; i++) {
1131
1155
  const day = selectedDaily[i]
@@ -1136,6 +1160,7 @@
1136
1160
  summary.costUSD += dayCost
1137
1161
  summary.hasCost = true
1138
1162
  }
1163
+ if (day && day.costKnown === false) summary.costKnown = false
1139
1164
  }
1140
1165
  return summary
1141
1166
  }
@@ -1171,6 +1196,7 @@
1171
1196
  value: costAndTokensLabel({
1172
1197
  tokens: summary.tokens,
1173
1198
  costUSD: summary.hasCost ? summary.costUSD : null,
1199
+ costKnown: summary.costKnown,
1174
1200
  }, { includeZeroTokens: true })
1175
1201
  }))
1176
1202
  }
@@ -1914,7 +1940,8 @@
1914
1940
  if (usageResult.status === "ok") {
1915
1941
  const usage = usageResult.data
1916
1942
  appendUsageDailyLines(lines, ctx, usage.daily, "Estimated from local Claude logs at API rates.")
1917
- persistUsageDaily(ctx, usage.daily, "Claude")
1943
+ // The host already saves its own summary as higher-priority history.
1944
+ if (!usageResult.native) persistUsageDaily(ctx, usage.daily, "Claude")
1918
1945
  }
1919
1946
  } catch (e) {
1920
1947
  ctx.host.log.warn("local Claude token usage failed: " + String(e))
@@ -191,7 +191,7 @@ defineProvider({
191
191
  if (otherGrants.length > 0) {
192
192
  details.push({
193
193
  title: "Other credit grants",
194
- rows: otherGrants.map((grant) => ({
194
+ rows: otherGrants.slice(0, 24).map((grant) => ({
195
195
  label: grant.label,
196
196
  value: amounts(grant),
197
197
  secondaryValue: grant.expiresAt ? expiry(grant.expiresAt) : null,
@@ -17,9 +17,9 @@
17
17
  "setupFields": [],
18
18
  "upstream": {
19
19
  "repository": "https://github.com/steipete/CodexBar",
20
- "revision": "1f6da9bec44455288ddee5ef6f3617a803d8eb2a",
20
+ "revision": "a26ca57b518667a659d69524c473af2735069612",
21
21
  "path": "Sources/CodexBarCore/Resources/Plugins/claudeplatform.js",
22
- "sha256": "d3c61855621fd4e5b5b753bdd223524e0ee7f4b55cfd63f24f23516ac33027e8",
22
+ "sha256": "6fba05d8c9a20ee30b52337715c29daef19794e2b1b01ddd4031bfd599bd6057",
23
23
  "license": "MIT"
24
24
  }
25
25
  }
@@ -0,0 +1,7 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round">
2
+ <circle cx="8" cy="7" r="3" fill="currentColor" stroke="none" />
3
+ <circle cx="24" cy="8" r="3" fill="currentColor" stroke="none" />
4
+ <circle cx="24" cy="24" r="3" fill="currentColor" stroke="none" />
5
+ <path d="M8 10v6c0 4.4 3.6 8 8 8h5" />
6
+ <path d="M11 8h10" />
7
+ </svg>
@@ -1,7 +1,7 @@
1
- <svg viewBox="0 0 32 32" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg">
2
- <circle cx="8" cy="7" r="3" fill="currentColor" stroke="none"/>
3
- <circle cx="24" cy="8" r="3" fill="currentColor" stroke="none"/>
4
- <circle cx="24" cy="24" r="3" fill="currentColor" stroke="none"/>
5
- <path d="M8 10v6c0 4.4 3.6 8 8 8h5"/>
6
- <path d="M11 8h10"/>
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round">
2
+ <circle cx="8" cy="7" r="3" fill="currentColor" stroke="none" />
3
+ <circle cx="24" cy="8" r="3" fill="currentColor" stroke="none" />
4
+ <circle cx="24" cy="24" r="3" fill="currentColor" stroke="none" />
5
+ <path d="M8 10v6c0 4.4 3.6 8 8 8h5" />
6
+ <path d="M11 8h10" />
7
7
  </svg>
@@ -0,0 +1,4 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 466.73 487.04" fill="currentColor">
2
+
3
+ <path d="M463.6,275.08l-29.26-58.75v-33.83c0-56.08-45.01-101.5-100.53-101.5h-50.01c3.62-7.43,5.61-15.79,5.61-24.61,0-31.17-25.08-56.39-56.07-56.39s-56.07,25.22-56.07,56.39c0,8.82,1.99,17.17,5.61,24.61h-50.01c-55.51,0-100.52,45.42-100.52,101.5v33.83l-29.87,58.59c-3.01,5.9-3.01,12.92,0,18.81l29.87,57.93v33.83c0,56.08,45.01,101.5,100.52,101.5h200.95c55.51,0,100.53-45.42,100.53-101.5v-33.83l29.21-58.13c2.9-5.79,2.9-12.61.05-18.46ZM202.75,322.96c0,25.48-20.54,46.14-45.88,46.14s-45.88-20.66-45.88-46.14v-82.02c0-25.48,20.54-46.14,45.88-46.14s45.88,20.66,45.88,46.14v82.02ZM350.58,322.96c0,25.48-20.54,46.14-45.88,46.14s-45.88-20.66-45.88-46.14v-82.02c0-25.48,20.54-46.14,45.88-46.14s45.88,20.66,45.88,46.14v82.02Z" />
4
+ </svg>
@@ -1,4 +1,4 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 466.73 487.04">
2
- <!-- Official Cline bot icon: https://cline.bot/brand -->
3
- <path d="M463.6,275.08l-29.26-58.75v-33.83c0-56.08-45.01-101.5-100.53-101.5h-50.01c3.62-7.43,5.61-15.79,5.61-24.61,0-31.17-25.08-56.39-56.07-56.39s-56.07,25.22-56.07,56.39c0,8.82,1.99,17.17,5.61,24.61h-50.01c-55.51,0-100.52,45.42-100.52,101.5v33.83l-29.87,58.59c-3.01,5.9-3.01,12.92,0,18.81l29.87,57.93v33.83c0,56.08,45.01,101.5,100.52,101.5h200.95c55.51,0,100.53-45.42,100.53-101.5v-33.83l29.21-58.13c2.9-5.79,2.9-12.61.05-18.46ZM202.75,322.96c0,25.48-20.54,46.14-45.88,46.14s-45.88-20.66-45.88-46.14v-82.02c0-25.48,20.54-46.14,45.88-46.14s45.88,20.66,45.88,46.14v82.02ZM350.58,322.96c0,25.48-20.54,46.14-45.88,46.14s-45.88-20.66-45.88-46.14v-82.02c0-25.48,20.54-46.14,45.88-46.14s45.88,20.66,45.88,46.14v82.02Z"/>
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 466.73 487.04" fill="currentColor">
2
+
3
+ <path d="M463.6,275.08l-29.26-58.75v-33.83c0-56.08-45.01-101.5-100.53-101.5h-50.01c3.62-7.43,5.61-15.79,5.61-24.61,0-31.17-25.08-56.39-56.07-56.39s-56.07,25.22-56.07,56.39c0,8.82,1.99,17.17,5.61,24.61h-50.01c-55.51,0-100.52,45.42-100.52,101.5v33.83l-29.87,58.59c-3.01,5.9-3.01,12.92,0,18.81l29.87,57.93v33.83c0,56.08,45.01,101.5,100.52,101.5h200.95c55.51,0,100.53-45.42,100.53-101.5v-33.83l29.21-58.13c2.9-5.79,2.9-12.61.05-18.46ZM202.75,322.96c0,25.48-20.54,46.14-45.88,46.14s-45.88-20.66-45.88-46.14v-82.02c0-25.48,20.54-46.14,45.88-46.14s45.88,20.66,45.88,46.14v82.02ZM350.58,322.96c0,25.48-20.54,46.14-45.88,46.14s-45.88-20.66-45.88-46.14v-82.02c0-25.48,20.54-46.14,45.88-46.14s45.88,20.66,45.88,46.14v82.02Z" />
4
4
  </svg>
@@ -0,0 +1 @@
1
+ <svg height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>CodeBuddy</title><path d="M18.821 0H5.18A5.179 5.179 0 000 5.179V18.82A5.179 5.179 0 005.179 24H18.82A5.179 5.179 0 0024 18.821V5.18A5.179 5.179 0 0018.821 0z" fill="url(#lobe-icons-code-buddy-_R_0_)"></path><path d="M18.777 1.647c.28-.02.536.114.972.51 1.018.926 2.437 2.828 3.318 4.452l.34.631.482.24.11.06v3.638a5.206 5.206 0 00-5.32-1.23c-.491.166-1.021.471-2.08 1.082l-6.09 3.516c-1.057.61-1.586.916-1.975 1.259a5.208 5.208 0 00-1.493 5.572c.165.49.471 1.02 1.082 2.08l.315.543h-3.26c-.685 0-1.34-.135-1.939-.377-.169-.956-.009-1.789.469-2.335.158-.18.164-.189.13-.493a11.846 11.846 0 01-.057-1.711l.02-.444-.667-1.18C2.1 15.622 1.445 14.078 1.192 12.9c-.133-.647-.125-.934.04-1.146.1-.128.427-.261.822-.334.994-.175 3.162-.017 5.575.41l.25.043.551-.487c.915-.81 1.522-1.264 2.641-1.962 1.167-.73 2.484-1.331 3.967-1.807l.476-.152.261-.688c.937-2.471 1.896-4.293 2.58-4.9.235-.21.25-.22.422-.23z" fill="#fff"></path><path d="M12.139 18.2a1.203 1.203 0 011.642.44l1.296 2.243a1.204 1.204 0 01-2.083 1.203l-1.296-2.243a1.203 1.203 0 01.44-1.644zM18.629 14.452a1.203 1.203 0 011.642.44l1.295 2.244a1.203 1.203 0 11-2.083 1.203l-1.295-2.243a1.203 1.203 0 01.44-1.644z" fill="#fff"></path><defs><radialGradient cx="0" cy="0" gradientTransform="matrix(-9.00009 -16 16 -9.00009 21 24.5)" gradientUnits="userSpaceOnUse" id="lobe-icons-code-buddy-_R_0_" r="1"><stop stop-color="#2EA99D"></stop><stop offset="1" stop-color="#6C4DFF"></stop></radialGradient></defs></svg>
@@ -0,0 +1 @@
1
+ <svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>CodeBuddy</title><path d="M18.777 1.647c.28-.02.536.114.972.51 1.018.926 2.437 2.828 3.318 4.452l.34.631.482.24.11.06v3.638a5.206 5.206 0 00-5.32-1.23c-.491.166-1.021.471-2.08 1.082l-6.09 3.516c-1.057.61-1.586.916-1.975 1.259a5.208 5.208 0 00-1.493 5.572c.165.49.471 1.02 1.082 2.08l.315.543h-3.26c-.685 0-1.34-.135-1.939-.377-.169-.956-.009-1.789.469-2.335.158-.18.164-.189.13-.493a11.846 11.846 0 01-.057-1.711l.02-.444-.667-1.18C2.1 15.622 1.445 14.078 1.192 12.9c-.133-.647-.125-.934.04-1.146.1-.128.427-.261.822-.334.994-.175 3.162-.017 5.575.41l.25.043.551-.487c.915-.81 1.522-1.264 2.641-1.962 1.167-.73 2.484-1.331 3.967-1.807l.476-.152.261-.688c.937-2.471 1.896-4.293 2.58-4.9.235-.21.25-.22.422-.23z"></path><path d="M12.139 18.2a1.203 1.203 0 011.642.44l1.296 2.243a1.204 1.204 0 01-2.083 1.203l-1.296-2.243a1.203 1.203 0 01.44-1.644zM18.629 14.452a1.203 1.203 0 011.642.44l1.295 2.244a1.203 1.203 0 11-2.083 1.203l-1.295-2.243a1.203 1.203 0 01.44-1.644z"></path></svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 24 24" fill="none">
2
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M12 2C10.6 2 9.5 3.1 9.5 4.5V8.1C8.7 8.5 8 9.1 7.4 9.8L4.6 6.2C3.7 5.1 2.1 4.9 1 5.8C-0.1 6.7 -0.3 8.3 0.6 9.4L3.7 13.3C3.2 14.5 3 15.7 3 17C3 20.9 6.1 24 10 24H14C17.9 24 21 20.9 21 17C21 15.7 20.8 14.5 20.3 13.3L23.4 9.4C24.3 8.3 24.1 6.7 23 5.8C21.9 4.9 20.3 5.1 19.4 6.2L16.6 9.8C16 9.1 15.3 8.5 14.5 8.1V4.5C14.5 3.1 13.4 2 12 2ZM11.5 5C11.5 4.7 11.7 4.5 12 4.5C12.3 4.5 12.5 4.7 12.5 5V8H11.5V5ZM8 14C8.6 14 9 14.4 9 15C9 15.6 8.6 16 8 16C7.4 16 7 15.6 7 15C7 14.4 7.4 14 8 14ZM16 14C16.6 14 17 14.4 17 15C17 15.6 16.6 16 16 16C15.4 16 15 15.6 15 15C15 14.4 15.4 14 16 14ZM12 17.5C10.9 17.5 10 18.4 10 19.5H14C14 18.4 13.1 17.5 12 17.5Z" fill="currentColor" />
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 24 24" fill="none">
2
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M12 2C10.6 2 9.5 3.1 9.5 4.5V8.1C8.7 8.5 8 9.1 7.4 9.8L4.6 6.2C3.7 5.1 2.1 4.9 1 5.8C-0.1 6.7 -0.3 8.3 0.6 9.4L3.7 13.3C3.2 14.5 3 15.7 3 17C3 20.9 6.1 24 10 24H14C17.9 24 21 20.9 21 17C21 15.7 20.8 14.5 20.3 13.3L23.4 9.4C24.3 8.3 24.1 6.7 23 5.8C21.9 4.9 20.3 5.1 19.4 6.2L16.6 9.8C16 9.1 15.3 8.5 14.5 8.1V4.5C14.5 3.1 13.4 2 12 2ZM11.5 5C11.5 4.7 11.7 4.5 12 4.5C12.3 4.5 12.5 4.7 12.5 5V8H11.5V5ZM8 14C8.6 14 9 14.4 9 15C9 15.6 8.6 16 8 16C7.4 16 7 15.6 7 15C7 14.4 7.4 14 8 14ZM16 14C16.6 14 17 14.4 17 15C17 15.6 16.6 16 16 16C15.4 16 15 15.6 15 15C15 14.4 15.4 14 16 14ZM12 17.5C10.9 17.5 10 18.4 10 19.5H14C14 18.4 13.1 17.5 12 17.5Z" fill="currentColor" />
3
+ </svg>
@@ -402,8 +402,28 @@
402
402
  var PERIOD_SESSION_MS = 5 * 60 * 60 * 1000 // 5 hours
403
403
  var PERIOD_WEEKLY_MS = 7 * 24 * 60 * 60 * 1000 // 7 days
404
404
 
405
+ function hasLocalUsage(ctx) {
406
+ return !!(ctx.host.localUsage && typeof ctx.host.localUsage.daily === "function")
407
+ }
408
+
409
+ // The host summarizes local logs in the background. Reading its result keeps
410
+ // a quota probe from scanning every transcript again through ccusage. Returns
411
+ // null only when the host cannot cover this log root, so ccusage still can.
412
+ function queryLocalUsage(ctx, sinceStr, homePath) {
413
+ if (!hasLocalUsage(ctx)) return null
414
+ const opts = { since: sinceStr }
415
+ if (homePath) opts.homePath = homePath
416
+ const result = ctx.host.localUsage.daily(opts)
417
+ if (result && result.status === "ok" && result.data && Array.isArray(result.data.daily)) {
418
+ return { status: "ok", data: result.data, native: true }
419
+ }
420
+ if (result && result.status === "not_covered") return null
421
+ // Still warming up: show no local totals this round rather than start a scan.
422
+ return { status: (result && result.status) || "unavailable", data: null }
423
+ }
424
+
405
425
  function queryTokenUsage(ctx) {
406
- if (!ctx.host.ccusage || typeof ctx.host.ccusage.query !== "function") {
426
+ if (!hasLocalUsage(ctx) && (!ctx.host.ccusage || typeof ctx.host.ccusage.query !== "function")) {
407
427
  return { status: "no_runner", data: null }
408
428
  }
409
429
 
@@ -420,6 +440,9 @@
420
440
  queryOpts.homePath = codexHome
421
441
  }
422
442
 
443
+ const local = queryLocalUsage(ctx, sinceStr, codexHome)
444
+ if (local) return local
445
+
423
446
  const result = ctx.host.ccusage.query(queryOpts)
424
447
  if (!result || typeof result !== "object" || typeof result.status !== "string") {
425
448
  return { status: "runner_failed", data: null }
@@ -505,7 +528,8 @@
505
528
  function costAndTokensLabel(data, opts) {
506
529
  const includeZeroTokens = !!(opts && opts.includeZeroTokens)
507
530
  const parts = []
508
- if (data.costUSD != null) parts.push("$" + data.costUSD.toFixed(2))
531
+ // A partly priced day shows its known cost as a lower bound.
532
+ if (data.costUSD != null) parts.push("$" + data.costUSD.toFixed(2) + (data.costKnown === false ? "+" : ""))
509
533
  if (data.tokens > 0 || (includeZeroTokens && data.tokens === 0)) {
510
534
  parts.push(fmtTokens(data.tokens) + " tokens")
511
535
  }
@@ -647,7 +671,7 @@
647
671
  if (tokens > 0) {
648
672
  lines.push(ctx.line.text({
649
673
  label: label,
650
- value: costAndTokensLabel({ tokens: tokens, costUSD: cost })
674
+ value: costAndTokensLabel({ tokens: tokens, costUSD: cost, costKnown: dayEntry.costKnown })
651
675
  }))
652
676
  return
653
677
  }
@@ -935,6 +959,7 @@
935
959
  let totalTokens = 0
936
960
  let totalCostNanos = 0
937
961
  let hasCost = false
962
+ let costKnown = true
938
963
  for (let i = 0; i < tokenUsage.daily.length; i++) {
939
964
  const day = tokenUsage.daily[i]
940
965
  const dayTokens = Number(day.totalTokens)
@@ -947,17 +972,19 @@
947
972
  totalCostNanos += Math.round(dayCost * 1e9)
948
973
  hasCost = true
949
974
  }
975
+ if (day.costKnown === false) costKnown = false
950
976
  }
951
977
 
952
978
  if (totalTokens > 0) {
953
979
  lines.push(ctx.line.text({
954
980
  label: "Last 30 Days",
955
- value: costAndTokensLabel({ tokens: totalTokens, costUSD: hasCost ? totalCostNanos / 1e9 : null })
981
+ value: costAndTokensLabel({ tokens: totalTokens, costUSD: hasCost ? totalCostNanos / 1e9 : null, costKnown: costKnown })
956
982
  }))
957
983
  }
958
984
 
959
985
  pushUsageChartLine(lines, ctx, tokenUsage.daily)
960
- persistUsageDaily(ctx, tokenUsage.daily, "Codex")
986
+ // The host already saves its own summary as higher-priority history.
987
+ if (!tokenUsageResult.native) persistUsageDaily(ctx, tokenUsage.daily, "Codex")
961
988
  }
962
989
  } catch (e) {
963
990
  ctx.host.log.warn("local Codex token usage failed: " + String(e))
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill="currentColor" d="M16 4a9 9 0 1 0 0 16l-2-3a5.5 5.5 0 1 1 0-10Z" /><path fill="currentColor" d="m19 3 1.2 3.8L24 8l-3.8 1.2L19 13l-1.2-3.8L14 8l3.8-1.2Z" /></svg>
@@ -1 +1 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M16 4a9 9 0 1 0 0 16l-2-3a5.5 5.5 0 1 1 0-10Z"/><path fill="currentColor" d="m19 3 1.2 3.8L24 8l-3.8 1.2L19 13l-1.2-3.8L14 8l3.8-1.2Z"/></svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill="currentColor" d="M16 4a9 9 0 1 0 0 16l-2-3a5.5 5.5 0 1 1 0-10Z" /><path fill="currentColor" d="m19 3 1.2 3.8L24 8l-3.8 1.2L19 13l-1.2-3.8L14 8l3.8-1.2Z" /></svg>
@@ -24,7 +24,7 @@
24
24
  ],
25
25
  "upstream": {
26
26
  "repository": "https://github.com/steipete/CodexBar",
27
- "revision": "1f6da9bec44455288ddee5ef6f3617a803d8eb2a",
27
+ "revision": "a26ca57b518667a659d69524c473af2735069612",
28
28
  "path": "Sources/CodexBarCore/Resources/Plugins/cosmic.js",
29
29
  "sha256": "eb869360f719b3b3b96311617c173e624efa05b91c0f7d31ce985f0a3a77d7a6",
30
30
  "license": "MIT"
@@ -0,0 +1,4 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" fill="currentColor">
2
+ <path d="M6 9h3v14H6V9Zm6-4h3v22h-3V5Zm6 7h3v8h-3v-8Zm6-3h3v14h-3V9Z" />
3
+ <path d="M4 26h24v2H4v-2Z" opacity=".35" />
4
+ </svg>