@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.
- package/LICENSE +2250 -758
- package/native-manifest.json +557 -191
- package/package.json +62 -1
- package/plugins/UPSTREAM-LICENSES.md +1 -1
- package/plugins/_provider-icons/NOTICE +36 -3
- package/plugins/_provider-icons/licenses/Win-CodexBar-MIT.txt +21 -0
- package/plugins/_provider-icons/licenses/crossusage-MIT.txt +22 -0
- package/plugins/_provider-icons/manifest.json +8409 -189
- package/plugins/_provider-icons/provenance.json +873 -0
- package/plugins/_provider-icons/source.json +2 -2
- package/plugins/abliteration/icon-color.svg +5 -0
- package/plugins/abliteration/icon.svg +4 -4
- package/plugins/abliteration/plugin.json +1 -1
- package/plugins/aerostack/icon-color.svg +1 -0
- package/plugins/aerostack/icon.svg +1 -1
- package/plugins/aerostack/plugin.json +1 -1
- package/plugins/aiand/icon-color.svg +6 -0
- package/plugins/aiand/icon.svg +3 -3
- package/plugins/aixy/icon-color.svg +1 -0
- package/plugins/aixy/icon.svg +1 -1
- package/plugins/aixy/plugin.json +1 -1
- package/plugins/amp/plugin.js +68 -6
- package/plugins/atlascloud/plugin.json +1 -1
- package/plugins/bifrost/icon-color.svg +3 -0
- package/plugins/bifrost/icon.svg +2 -2
- package/plugins/bifrost/plugin.json +1 -1
- package/plugins/chatbox/icon-color.svg +4 -0
- package/plugins/chatbox/icon.svg +3 -3
- package/plugins/chatbox/plugin.json +1 -1
- package/plugins/chutes/icon-color.svg +1 -0
- package/plugins/chutes/icon.svg +1 -7
- package/plugins/claude/plugin.js +33 -6
- package/plugins/claudeplatform/plugin.js +1 -1
- package/plugins/claudeplatform/plugin.json +2 -2
- package/plugins/clawrouter/icon-color.svg +7 -0
- package/plugins/clawrouter/icon.svg +6 -6
- package/plugins/clinepass/icon-color.svg +4 -0
- package/plugins/clinepass/icon.svg +3 -3
- package/plugins/codebuddy/icon-color.svg +1 -0
- package/plugins/codebuddy/icon.svg +1 -0
- package/plugins/coderabbit/icon-color.svg +3 -0
- package/plugins/coderabbit/icon.svg +3 -0
- package/plugins/codex/plugin.js +32 -5
- package/plugins/cosmic/icon-color.svg +1 -0
- package/plugins/cosmic/icon.svg +1 -1
- package/plugins/cosmic/plugin.json +1 -1
- package/plugins/deepgram/icon-color.svg +4 -0
- package/plugins/deepgram/icon.svg +4 -1
- package/plugins/devin/icon-color.svg +1 -0
- package/plugins/devin/icon.svg +1 -5
- package/plugins/devpass/icon-color.svg +3 -0
- package/plugins/devpass/icon.svg +2 -2
- package/plugins/devpass/plugin.json +1 -1
- package/plugins/exa/plugin.json +1 -1
- package/plugins/fal/plugin.json +1 -1
- package/plugins/flora/icon-color.svg +1 -0
- package/plugins/flora/icon.svg +1 -4
- package/plugins/flora/plugin.json +1 -1
- package/plugins/futureagi/icon-color.svg +24 -0
- package/plugins/futureagi/icon.svg +14 -14
- package/plugins/futureagi/plugin.json +1 -1
- package/plugins/gemini-apps/plugin.json +1 -1
- package/plugins/gitkraken/icon-color.svg +1 -0
- package/plugins/gitkraken/icon.svg +1 -2
- package/plugins/gitkraken/plugin.json +1 -1
- package/plugins/googledeveloper/plugin.json +1 -1
- package/plugins/grok/icon-color.svg +1 -1
- package/plugins/grok/icon.svg +1 -1
- package/plugins/grok/plugin.js +26 -2
- package/plugins/grok/plugin.json +2 -1
- package/plugins/helmcode/icon-color.svg +5 -0
- package/plugins/helmcode/icon.svg +2 -2
- package/plugins/helmcode/plugin.json +1 -1
- package/plugins/huggingface/plugin.json +1 -1
- package/plugins/hyper/icon-color.svg +3 -0
- package/plugins/hyper/icon.svg +3 -0
- package/plugins/hyper/plugin.json +1 -1
- package/plugins/ibmbob/icon-color.svg +23 -0
- package/plugins/ibmbob/icon.svg +13 -13
- package/plugins/langdock/icon-color.svg +4 -0
- package/plugins/langdock/icon.svg +3 -3
- package/plugins/langdock/plugin.json +1 -1
- package/plugins/linkup/icon-color.svg +10 -0
- package/plugins/linkup/icon.svg +3 -3
- package/plugins/linkup/plugin.json +1 -1
- package/plugins/litellm/icon-color.svg +16 -0
- package/plugins/litellm/icon.svg +13 -13
- package/plugins/lithosai/icon-color.svg +1 -0
- package/plugins/lithosai/icon.svg +1 -1
- package/plugins/lithosai/plugin.json +1 -1
- package/plugins/llmman/icon-color.svg +4 -0
- package/plugins/llmman/icon.svg +3 -3
- package/plugins/llmman/plugin.json +1 -1
- package/plugins/mimo/plugin.js +86 -0
- package/plugins/mimo/plugin.json +3 -1
- package/plugins/munito/icon-color.svg +7 -0
- package/plugins/munito/icon.svg +5 -5
- package/plugins/munito/plugin.json +1 -1
- package/plugins/muse/icon-color.svg +1 -0
- package/plugins/muse/icon.svg +1 -3
- package/plugins/muse/plugin.json +1 -1
- package/plugins/museai/icon-color.svg +3 -0
- package/plugins/museai/icon.svg +2 -2
- package/plugins/museai/plugin.js +1 -1
- package/plugins/museai/plugin.json +2 -2
- package/plugins/neuralwatt/icon-color.svg +3 -0
- package/plugins/neuralwatt/icon.svg +2 -2
- package/plugins/notion/icon-color.svg +1 -0
- package/plugins/notion/icon.svg +1 -1
- package/plugins/notion/plugin.js +98 -7
- package/plugins/nous/plugin.json +1 -1
- package/plugins/openai-api/plugin.js +18 -3
- package/plugins/opendesign/plugin.json +1 -1
- package/plugins/openrouter/icon-color.svg +1 -1
- package/plugins/parallel/icon-color.svg +11 -0
- package/plugins/parallel/icon.svg +9 -9
- package/plugins/parallel/plugin.json +1 -1
- package/plugins/pi/icon-color.svg +1 -0
- package/plugins/pi/icon.svg +1 -0
- package/plugins/poe/icon-color.svg +1 -0
- package/plugins/poe/icon.svg +1 -1
- package/plugins/qoder/icon-color.svg +1 -0
- package/plugins/qoder/icon.svg +1 -3
- package/plugins/qwencloud/plugin.json +1 -1
- package/plugins/raycast/icon-color.svg +3 -0
- package/plugins/raycast/icon.svg +2 -3
- package/plugins/raycast/plugin.json +1 -1
- package/plugins/replicate/plugin.json +1 -1
- package/plugins/sailresearch/icon-color.svg +4 -0
- package/plugins/sailresearch/icon.svg +3 -3
- package/plugins/sailresearch/plugin.json +1 -1
- package/plugins/sakana/icon-color.svg +1 -0
- package/plugins/sakana/icon.svg +1 -5
- package/plugins/siliconflow/plugin.json +1 -1
- package/plugins/sofya/icon-color.svg +3 -0
- package/plugins/sofya/icon.svg +2 -2
- package/plugins/sofya/plugin.json +1 -1
- package/plugins/soniox/icon-color.svg +3 -0
- package/plugins/soniox/icon.svg +1 -1
- package/plugins/soniox/plugin.json +1 -1
- package/plugins/sub2api/icon-color.svg +1 -0
- package/plugins/sub2api/icon.svg +1 -4
- package/plugins/t3chat/icon-color.svg +4 -27
- package/plugins/t3chat/icon.svg +4 -3
- package/plugins/tavily/icon-color.svg +1 -0
- package/plugins/tavily/icon.svg +1 -3
- package/plugins/tavily/plugin.json +1 -1
- package/plugins/tinyapi/icon-color.svg +4 -0
- package/plugins/tinyapi/icon.svg +3 -3
- package/plugins/tinyapi/plugin.json +1 -1
- package/plugins/traecn/plugin.json +1 -1
- package/plugins/tripo/icon-color.svg +1 -0
- package/plugins/tripo/icon.svg +1 -4
- package/plugins/tripo/plugin.json +1 -1
- package/plugins/trustedrouter/LICENSE +21 -0
- package/plugins/trustedrouter/icon.svg +7 -0
- package/plugins/trustedrouter/plugin.js +108 -0
- package/plugins/trustedrouter/plugin.json +24 -0
- package/plugins/typesafe/icon-color.svg +1 -0
- package/plugins/typesafe/icon.svg +1 -4
- package/plugins/typesafe/plugin.json +1 -1
- package/plugins/v0/plugin.json +1 -1
- package/plugins/vercel/plugin.json +2 -2
- package/plugins/wayfinder/icon-color.svg +5 -0
- package/plugins/wayfinder/icon.svg +4 -4
- package/plugins/workbuddy/icon-color.svg +1 -0
- package/plugins/workbuddy/icon.svg +1 -1
- package/plugins/workbuddy/plugin.json +1 -1
- package/plugins/xapi/icon-color.svg +1 -0
- package/plugins/xapi/icon.svg +1 -1
- package/plugins/xapi/plugin.json +1 -1
- package/plugins/xkiro/icon-color.svg +1 -0
- package/plugins/xkiro/icon.svg +1 -1
- package/plugins/xkiro/plugin.json +1 -1
- package/plugins/zed/icon-color.svg +3 -0
- package/plugins/zed/icon.svg +2 -3
- package/plugins/zoommate/icon-color.svg +1 -0
- package/plugins/zoommate/icon.svg +1 -1
- package/usagestat +0 -0
- package/usagestatd +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
{
|
|
2
|
-
"archive": "https://github.com/agenticdriver/provider-icons/releases/download/
|
|
3
|
-
"sha256": "
|
|
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"
|
|
2
|
-
<path d="M282.521 230H199V770.458H282.521V230Z" fill="
|
|
3
|
-
<path d="M801.487 230H712.348L501.571 740.998L489.954 770.458H577.195L788.58 261.434L801.487 230Z" fill="
|
|
4
|
-
<path d="M506.281 230H422.533L346.528 758.613L344.706 770.458H428.151L502.029 257.942L506.281 230Z" fill="
|
|
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": "
|
|
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": "
|
|
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>
|
package/plugins/aiand/icon.svg
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
<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>
|
package/plugins/aixy/icon.svg
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="
|
|
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>
|
package/plugins/aixy/plugin.json
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
],
|
|
25
25
|
"upstream": {
|
|
26
26
|
"repository": "https://github.com/steipete/CodexBar",
|
|
27
|
-
"revision": "
|
|
27
|
+
"revision": "a26ca57b518667a659d69524c473af2735069612",
|
|
28
28
|
"path": "Sources/CodexBarCore/Resources/Plugins/aixy.js",
|
|
29
29
|
"sha256": "975d98525503e286f9425c2a1d64fe00da8e2fdc0b00890e15c2cbcb9a37c125",
|
|
30
30
|
"license": "MIT"
|
package/plugins/amp/plugin.js
CHANGED
|
@@ -35,8 +35,9 @@
|
|
|
35
35
|
return Number(s.replace(/,/g, ""))
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
function parseBalanceText(
|
|
39
|
-
if (!
|
|
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
|
-
|
|
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 = {
|
|
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.
|
|
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 ||
|
|
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": "
|
|
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>
|
package/plugins/bifrost/icon.svg
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
<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="
|
|
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": "
|
|
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>
|
package/plugins/chatbox/icon.svg
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<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="
|
|
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="
|
|
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": "
|
|
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>
|
package/plugins/chutes/icon.svg
CHANGED
|
@@ -1,7 +1 @@
|
|
|
1
|
-
<svg viewBox="0 0
|
|
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>
|
package/plugins/claude/plugin.js
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
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": "
|
|
20
|
+
"revision": "a26ca57b518667a659d69524c473af2735069612",
|
|
21
21
|
"path": "Sources/CodexBarCore/Resources/Plugins/claudeplatform.js",
|
|
22
|
-
"sha256": "
|
|
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"
|
|
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
|
-
|
|
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>
|
package/plugins/codex/plugin.js
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
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>
|
package/plugins/cosmic/icon.svg
CHANGED
|
@@ -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": "
|
|
27
|
+
"revision": "a26ca57b518667a659d69524c473af2735069612",
|
|
28
28
|
"path": "Sources/CodexBarCore/Resources/Plugins/cosmic.js",
|
|
29
29
|
"sha256": "eb869360f719b3b3b96311617c173e624efa05b91c0f7d31ce985f0a3a77d7a6",
|
|
30
30
|
"license": "MIT"
|