@hashimkarim/usagestat-darwin-arm64 2.0.0-alpha.3 → 2.3.2

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 (284) hide show
  1. package/native-manifest.json +1532 -134
  2. package/package.json +235 -2
  3. package/plugins/UPSTREAM-LICENSES.md +6 -2
  4. package/plugins/_provider-icons/LICENSE +21 -0
  5. package/plugins/_provider-icons/NOTICE +12 -0
  6. package/plugins/_provider-icons/licenses/CodexBar-MIT.txt +21 -0
  7. package/plugins/_provider-icons/licenses/LobeHub-MIT.txt +21 -0
  8. package/plugins/_provider-icons/licenses/UsageStat-Bar-MIT.txt +21 -0
  9. package/plugins/_provider-icons/manifest.json +1219 -0
  10. package/plugins/_provider-icons/provenance.json +269 -0
  11. package/plugins/_provider-icons/source.json +4 -0
  12. package/plugins/abacus-ai/icon-color.svg +18 -0
  13. package/plugins/abliteration/LICENSE +21 -0
  14. package/plugins/abliteration/icon.svg +5 -0
  15. package/plugins/abliteration/plugin.js +89 -0
  16. package/plugins/abliteration/plugin.json +24 -0
  17. package/plugins/aerostack/LICENSE +21 -0
  18. package/plugins/aerostack/icon.svg +1 -0
  19. package/plugins/aerostack/plugin.js +94 -0
  20. package/plugins/aerostack/plugin.json +24 -0
  21. package/plugins/aixy/LICENSE +21 -0
  22. package/plugins/aixy/icon.svg +1 -0
  23. package/plugins/aixy/plugin.js +266 -0
  24. package/plugins/aixy/plugin.json +32 -0
  25. package/plugins/antigravity/plugin.js +189 -65
  26. package/plugins/antigravity-cli/icon-color.svg +1 -0
  27. package/plugins/antigravity-cli/icon.svg +1 -3
  28. package/plugins/antigravity-cli/plugin.js +32 -20
  29. package/plugins/antigravity-ide/icon-color.svg +1 -0
  30. package/plugins/antigravity-ide/icon.svg +1 -3
  31. package/plugins/antigravity-ide/plugin.js +19 -7
  32. package/plugins/atlascloud/LICENSE +21 -0
  33. package/plugins/atlascloud/icon-color.svg +1 -0
  34. package/plugins/atlascloud/icon.svg +1 -0
  35. package/plugins/atlascloud/plugin.js +54 -0
  36. package/plugins/atlascloud/plugin.json +24 -0
  37. package/plugins/augment/icon-color.svg +14 -0
  38. package/plugins/bifrost/LICENSE +21 -0
  39. package/plugins/bifrost/icon.svg +3 -0
  40. package/plugins/bifrost/plugin.js +366 -0
  41. package/plugins/bifrost/plugin.json +31 -0
  42. package/plugins/chatbox/LICENSE +21 -0
  43. package/plugins/chatbox/icon.svg +4 -0
  44. package/plugins/chatbox/plugin.js +208 -0
  45. package/plugins/chatbox/plugin.json +24 -0
  46. package/plugins/claude/plugin.js +340 -153
  47. package/plugins/claude/plugin.json +1 -1
  48. package/plugins/claudeplatform/LICENSE +21 -0
  49. package/plugins/claudeplatform/icon.svg +3 -0
  50. package/plugins/claudeplatform/plugin.js +244 -0
  51. package/plugins/claudeplatform/plugin.json +25 -0
  52. package/plugins/clinepass/plugin.js +19 -3
  53. package/plugins/codebuff/icon-color.svg +92 -0
  54. package/plugins/coderabbit/plugin.js +25 -0
  55. package/plugins/coderabbit/plugin.json +12 -0
  56. package/plugins/codex/plugin.js +15 -8
  57. package/plugins/codex/plugin.json +11 -2
  58. package/plugins/command-code/icon-color.svg +3 -0
  59. package/plugins/command-code/plugin.js +7 -3
  60. package/plugins/copilot/icon.svg +1 -1
  61. package/plugins/copilot/plugin.json +1 -0
  62. package/plugins/cosmic/LICENSE +21 -0
  63. package/plugins/cosmic/icon.svg +1 -0
  64. package/plugins/cosmic/plugin.js +134 -0
  65. package/plugins/cosmic/plugin.json +32 -0
  66. package/plugins/crof/icon-color.svg +3 -0
  67. package/plugins/crofai/icon-color.svg +3 -0
  68. package/plugins/crofai/icon.svg +2 -15
  69. package/plugins/cursor/icon-color.svg +1 -0
  70. package/plugins/cursor/plugin.js +51 -14
  71. package/plugins/cursor-nightly/plugin.json +1 -1
  72. package/plugins/deepinfra/icon-color.svg +1 -0
  73. package/plugins/deepinfra/icon.svg +1 -4
  74. package/plugins/deepseek/plugin.js +150 -59
  75. package/plugins/deepseek/plugin.json +3 -1
  76. package/plugins/devin/plugin.js +3 -0
  77. package/plugins/devpass/LICENSE +21 -0
  78. package/plugins/devpass/icon.svg +3 -0
  79. package/plugins/devpass/plugin.js +120 -0
  80. package/plugins/devpass/plugin.json +24 -0
  81. package/plugins/elevenlabs/icon-color.svg +4 -0
  82. package/plugins/exa/LICENSE +21 -0
  83. package/plugins/exa/icon-color.svg +1 -0
  84. package/plugins/exa/icon.svg +1 -0
  85. package/plugins/exa/plugin.js +75 -0
  86. package/plugins/exa/plugin.json +32 -0
  87. package/plugins/factory/icon-color.svg +1 -0
  88. package/plugins/fal/LICENSE +21 -0
  89. package/plugins/fal/icon-color.svg +1 -0
  90. package/plugins/fal/icon.svg +1 -0
  91. package/plugins/fal/plugin.js +74 -0
  92. package/plugins/fal/plugin.json +24 -0
  93. package/plugins/fireworks-ai/icon-color.svg +1 -0
  94. package/plugins/fireworks-ai/icon.svg +1 -6
  95. package/plugins/flora/LICENSE +21 -0
  96. package/plugins/flora/icon.svg +4 -0
  97. package/plugins/flora/plugin.js +93 -0
  98. package/plugins/flora/plugin.json +32 -0
  99. package/plugins/futureagi/LICENSE +21 -0
  100. package/plugins/futureagi/icon.svg +24 -0
  101. package/plugins/futureagi/plugin.js +139 -0
  102. package/plugins/futureagi/plugin.json +32 -0
  103. package/plugins/gemini-apps/LICENSE +21 -0
  104. package/plugins/gemini-apps/icon-color.svg +1 -0
  105. package/plugins/gemini-apps/icon.svg +1 -0
  106. package/plugins/gemini-apps/plugin.js +141 -0
  107. package/plugins/gemini-apps/plugin.json +25 -0
  108. package/plugins/gitkraken/LICENSE +21 -0
  109. package/plugins/gitkraken/icon.svg +2 -0
  110. package/plugins/gitkraken/plugin.js +158 -0
  111. package/plugins/gitkraken/plugin.json +32 -0
  112. package/plugins/googledeveloper/LICENSE +21 -0
  113. package/plugins/googledeveloper/icon.svg +3 -0
  114. package/plugins/googledeveloper/plugin.js +204 -0
  115. package/plugins/googledeveloper/plugin.json +25 -0
  116. package/plugins/grok/icon-color.svg +1 -0
  117. package/plugins/groqcloud/icon-color.svg +1 -0
  118. package/plugins/helmcode/LICENSE +21 -0
  119. package/plugins/helmcode/icon.svg +5 -0
  120. package/plugins/helmcode/plugin.js +253 -0
  121. package/plugins/helmcode/plugin.json +32 -0
  122. package/plugins/huggingface/LICENSE +21 -0
  123. package/plugins/huggingface/icon-color.svg +1 -0
  124. package/plugins/huggingface/icon.svg +1 -0
  125. package/plugins/huggingface/plugin.js +298 -0
  126. package/plugins/huggingface/plugin.json +26 -0
  127. package/plugins/hyper/LICENSE +21 -0
  128. package/plugins/hyper/plugin.js +137 -0
  129. package/plugins/hyper/plugin.json +27 -0
  130. package/plugins/jetbrains-ai-assistant/LICENSE +22 -0
  131. package/plugins/jetbrains-ai-assistant/plugin.js +502 -16
  132. package/plugins/jetbrains-ai-assistant/plugin.json +27 -4
  133. package/plugins/kilo/icon-color.svg +1 -0
  134. package/plugins/kimi/plugin.js +54 -14
  135. package/plugins/kimi/plugin.json +46 -6
  136. package/plugins/langdock/LICENSE +21 -0
  137. package/plugins/langdock/icon.svg +4 -0
  138. package/plugins/langdock/plugin.js +106 -0
  139. package/plugins/langdock/plugin.json +25 -0
  140. package/plugins/linkup/LICENSE +21 -0
  141. package/plugins/linkup/icon.svg +10 -0
  142. package/plugins/linkup/plugin.js +46 -0
  143. package/plugins/linkup/plugin.json +24 -0
  144. package/plugins/litellm/plugin.js +54 -3
  145. package/plugins/lithosai/LICENSE +21 -0
  146. package/plugins/lithosai/icon.svg +1 -0
  147. package/plugins/lithosai/plugin.js +130 -0
  148. package/plugins/lithosai/plugin.json +26 -0
  149. package/plugins/llmman/LICENSE +21 -0
  150. package/plugins/llmman/icon.svg +4 -0
  151. package/plugins/llmman/plugin.js +138 -0
  152. package/plugins/llmman/plugin.json +31 -0
  153. package/plugins/longcat/icon-color.svg +1 -0
  154. package/plugins/longcat/icon.svg +1 -4
  155. package/plugins/manus/icon-color.svg +6 -0
  156. package/plugins/mimo/icon-color.svg +4 -0
  157. package/plugins/mimo/icon.svg +4 -1
  158. package/plugins/mistral/plugin.js +164 -27
  159. package/plugins/moonshot/icon-color.svg +1 -0
  160. package/plugins/munito/LICENSE +21 -0
  161. package/plugins/munito/icon.svg +7 -0
  162. package/plugins/munito/plugin.js +171 -0
  163. package/plugins/munito/plugin.json +24 -0
  164. package/plugins/muse/LICENSE +21 -0
  165. package/plugins/muse/icon.svg +3 -0
  166. package/plugins/muse/plugin.js +288 -0
  167. package/plugins/muse/plugin.json +34 -0
  168. package/plugins/museai/LICENSE +21 -0
  169. package/plugins/museai/icon.svg +3 -0
  170. package/plugins/museai/plugin.js +161 -0
  171. package/plugins/museai/plugin.json +26 -0
  172. package/plugins/nous/LICENSE +21 -0
  173. package/plugins/nous/icon-color.svg +1 -0
  174. package/plugins/nous/icon.svg +1 -0
  175. package/plugins/nous/plugin.js +129 -0
  176. package/plugins/nous/plugin.json +32 -0
  177. package/plugins/ollama/icon-color.svg +1 -0
  178. package/plugins/ollama/plugin.js +58 -0
  179. package/plugins/openai-api/icon-color.svg +1 -0
  180. package/plugins/opencode/icon-color.svg +1 -0
  181. package/plugins/opencode-go/icon-color.svg +1 -0
  182. package/plugins/opencode-go/plugin.js +104 -37
  183. package/plugins/opendesign/LICENSE +21 -0
  184. package/plugins/opendesign/icon.svg +4 -0
  185. package/plugins/opendesign/plugin.js +108 -0
  186. package/plugins/opendesign/plugin.json +25 -0
  187. package/plugins/openrouter/icon-color.svg +1 -0
  188. package/plugins/parallel/LICENSE +21 -0
  189. package/plugins/parallel/icon.svg +11 -0
  190. package/plugins/parallel/plugin.js +97 -0
  191. package/plugins/parallel/plugin.json +25 -0
  192. package/plugins/perplexity/LICENSE +22 -0
  193. package/plugins/perplexity/plugin.js +122 -0
  194. package/plugins/perplexity/plugin.json +36 -7
  195. package/plugins/pi/plugin.js +113 -0
  196. package/plugins/pi/plugin.json +11 -0
  197. package/plugins/qwencloud/LICENSE +21 -0
  198. package/plugins/qwencloud/icon-color.svg +1 -0
  199. package/plugins/qwencloud/icon.svg +1 -4
  200. package/plugins/qwencloud/plugin.js +197 -0
  201. package/plugins/qwencloud/plugin.json +17 -0
  202. package/plugins/raycast/LICENSE +21 -0
  203. package/plugins/raycast/icon.svg +4 -0
  204. package/plugins/raycast/plugin.js +179 -0
  205. package/plugins/raycast/plugin.json +32 -0
  206. package/plugins/replicate/LICENSE +21 -0
  207. package/plugins/replicate/icon-color.svg +1 -0
  208. package/plugins/replicate/icon.svg +1 -0
  209. package/plugins/replicate/plugin.js +170 -0
  210. package/plugins/replicate/plugin.json +25 -0
  211. package/plugins/sailresearch/LICENSE +21 -0
  212. package/plugins/sailresearch/icon.svg +4 -0
  213. package/plugins/sailresearch/plugin.js +104 -0
  214. package/plugins/sailresearch/plugin.json +24 -0
  215. package/plugins/siliconflow/LICENSE +21 -0
  216. package/plugins/siliconflow/icon.svg +3 -0
  217. package/plugins/siliconflow/plugin.js +87 -0
  218. package/plugins/siliconflow/plugin.json +32 -0
  219. package/plugins/sofya/LICENSE +21 -0
  220. package/plugins/sofya/icon.svg +3 -0
  221. package/plugins/sofya/plugin.js +86 -0
  222. package/plugins/sofya/plugin.json +24 -0
  223. package/plugins/soniox/LICENSE +21 -0
  224. package/plugins/soniox/icon.svg +3 -0
  225. package/plugins/soniox/plugin.js +103 -0
  226. package/plugins/soniox/plugin.json +24 -0
  227. package/plugins/synthetic/icon-color.svg +14 -0
  228. package/plugins/synthetic/plugin.js +12 -0
  229. package/plugins/synthetic/plugin.json +51 -9
  230. package/plugins/tavily/LICENSE +21 -0
  231. package/plugins/tavily/icon.svg +3 -0
  232. package/plugins/tavily/plugin.js +61 -0
  233. package/plugins/tavily/plugin.json +24 -0
  234. package/plugins/tinyapi/LICENSE +21 -0
  235. package/plugins/tinyapi/icon.svg +4 -0
  236. package/plugins/tinyapi/plugin.js +73 -0
  237. package/plugins/tinyapi/plugin.json +25 -0
  238. package/plugins/traecn/LICENSE +21 -0
  239. package/plugins/traecn/icon.svg +3 -0
  240. package/plugins/traecn/plugin.js +103 -0
  241. package/plugins/traecn/plugin.json +25 -0
  242. package/plugins/tripo/LICENSE +21 -0
  243. package/plugins/tripo/icon.svg +4 -0
  244. package/plugins/tripo/plugin.js +60 -0
  245. package/plugins/tripo/plugin.json +24 -0
  246. package/plugins/typesafe/LICENSE +21 -0
  247. package/plugins/typesafe/icon.svg +4 -0
  248. package/plugins/typesafe/plugin.js +181 -0
  249. package/plugins/typesafe/plugin.json +25 -0
  250. package/plugins/v0/LICENSE +21 -0
  251. package/plugins/v0/icon-color.svg +1 -0
  252. package/plugins/v0/icon.svg +1 -0
  253. package/plugins/v0/plugin.js +219 -0
  254. package/plugins/v0/plugin.json +32 -0
  255. package/plugins/venice/plugin.js +50 -1
  256. package/plugins/venice/plugin.json +2 -1
  257. package/plugins/vercel/LICENSE +21 -0
  258. package/plugins/vercel/icon-color.svg +1 -0
  259. package/plugins/vercel/icon.svg +1 -0
  260. package/plugins/vercel/plugin.js +202 -0
  261. package/plugins/vercel/plugin.json +54 -0
  262. package/plugins/windsurf/icon-color.svg +1 -0
  263. package/plugins/workbuddy/LICENSE +21 -0
  264. package/plugins/workbuddy/icon.svg +1 -0
  265. package/plugins/workbuddy/plugin.js +318 -0
  266. package/plugins/workbuddy/plugin.json +63 -0
  267. package/plugins/xai/icon-color.svg +1 -0
  268. package/plugins/xai/icon.svg +1 -7
  269. package/plugins/xai/plugin.js +9 -0
  270. package/plugins/xapi/LICENSE +21 -0
  271. package/plugins/xapi/icon.svg +1 -0
  272. package/plugins/xapi/plugin.js +90 -0
  273. package/plugins/xapi/plugin.json +25 -0
  274. package/plugins/xkiro/LICENSE +21 -0
  275. package/plugins/xkiro/icon.svg +1 -0
  276. package/plugins/xkiro/plugin.js +104 -0
  277. package/plugins/xkiro/plugin.json +24 -0
  278. package/plugins/zai/icon-color.svg +1 -0
  279. package/plugins/zai/plugin.js +5 -1
  280. package/plugins/zenmux/icon-color.svg +1 -0
  281. package/plugins/zenmux/icon.svg +1 -3
  282. package/usagestat +0 -0
  283. package/usagestatd +0 -0
  284. package/plugins/cursor-nightly/plugin.js +0 -1416
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="-4 -3 23 23" fill="currentColor">
2
+ <path d="m0 14.866 2.1606-3.5214c1.8927 1.2576 3.9669 1.8995 5.6694 1.8995 1.0025 0 1.4606-0.3036 1.4606-0.8847v-0.0607c0-0.6419-0.9161-0.9194-2.6532-1.4138-3.2582-0.8587-5.8509-1.9602-5.8509-5.2995v-0.06938c0-3.5214 2.8088-5.4903 6.6114-5.4903 2.4112 0 4.9089 0.70255 6.8016 1.9342l-1.9791 3.6775c-1.7112-0.95408-3.5693-1.5352-4.8744-1.5352-0.88152 0-1.3396 0.33827-1.3396 0.79796v0.06071c0 0.64184 0.94202 0.95409 2.6792 1.4745 3.2582 0.91939 5.8509 2.0556 5.8509 5.2735v0.0607c0 3.6515-2.7137 5.551-6.741 5.551-2.7656-0.0087-5.5052-0.798-7.7955-2.4546z"/>
3
+ </svg>
@@ -0,0 +1,103 @@
1
+ // Generated by tools/vendor-codexbar-providers.cjs; see LICENSE.
2
+ globalThis.__usagestat_bundled_options = {"labels":["Monthly budget","Additional","Additional"],"defaults":{},"autoMode":"api"};
3
+ (function(defineProvider) {
4
+ // BEGIN UPSTREAM Sources/CodexBarCore/Resources/Plugins/soniox.js
5
+ defineProvider({
6
+ id: "soniox",
7
+ name: "Soniox",
8
+ endpoints: ["https://api.soniox.com"],
9
+ auth: { type: "bearer", secret: "SONIOX_ORG_API_KEY" },
10
+ settings: [{ key: "SONIOX_ORG_API_KEY", title: "Organization API key", type: "secure" }],
11
+ async fetchUsage(ctx) {
12
+ const invalid = (field) => {
13
+ throw ctx.fail.parseFailure(
14
+ `Soniox returned invalid billing data: ${field}. Refresh to try again. If this persists, update CodexBar or report the issue.`,
15
+ );
16
+ };
17
+ const money = (value, field, signed = false) => {
18
+ if (typeof value !== "string" || !/^-?\d+(?:\.\d+)?$/.test(value.trim())) return invalid(field);
19
+ const amount = Number(value);
20
+ if (!Number.isFinite(amount) || (!signed && amount < 0)) return invalid(field);
21
+ return amount;
22
+ };
23
+ const get = async (path) => {
24
+ const response = await ctx.http.get(`https://api.soniox.com/v1/organization/${path}`);
25
+ if (response.status === 401) {
26
+ throw ctx.fail.authenticationExpired(
27
+ "Soniox rejected the organization API key. Check that it has not been revoked.",
28
+ );
29
+ }
30
+ if (response.status === 403) {
31
+ throw ctx.fail.permissionDenied(
32
+ "Soniox requires an organization API key with Balance and spend and Usage and limits access. Project API keys are not supported.",
33
+ );
34
+ }
35
+ if (response.status === 429) {
36
+ throw ctx.fail.rateLimited("Soniox rate limit reached (HTTP 429). Wait a moment, then refresh.");
37
+ }
38
+ if (response.status >= 500) {
39
+ throw ctx.fail.providerUnavailable(
40
+ `Soniox is temporarily unavailable (HTTP ${response.status}). Try again later or check https://status.soniox.com.`,
41
+ );
42
+ }
43
+ if (response.status !== 200) {
44
+ throw ctx.fail.apiFailure(
45
+ `Soniox billing request failed (HTTP ${response.status}). Refresh to try again. If this persists, update CodexBar or report the issue.`,
46
+ );
47
+ }
48
+ let data;
49
+ try {
50
+ data = JSON.parse(response.bodyText);
51
+ } catch (error) {
52
+ void error;
53
+ return invalid("invalid JSON");
54
+ }
55
+ if (!data || typeof data !== "object" || Array.isArray(data)) return invalid("expected an object");
56
+ return data;
57
+ };
58
+
59
+ const billing = await get("balance");
60
+ const available = money(billing.available_balance_usd, "available_balance_usd", true);
61
+ if (typeof billing.invoice_billing_enabled !== "boolean") return invalid("invoice_billing_enabled");
62
+ const monthly = await get("usage/monthly");
63
+ const used = money(monthly.usage_usd, "usage_usd");
64
+ const budget = money(monthly.monthly_budget_usd, "monthly_budget_usd");
65
+ if (typeof monthly.month !== "string" || !/^\d{4}-(0[1-9]|1[0-2])$/.test(monthly.month)) {
66
+ return invalid("month");
67
+ }
68
+ const resetsAt = new Date(`${monthly.month}-01T00:00:00Z`);
69
+ resetsAt.setUTCMonth(resetsAt.getUTCMonth() + 1);
70
+
71
+ return {
72
+ primary:
73
+ budget > 0
74
+ ? {
75
+ usedPercent: ctx.pct(used, budget),
76
+ resetsAt,
77
+ resetDescription: `${ctx.format.usd(used)} / ${ctx.format.usd(budget)}`,
78
+ }
79
+ : undefined,
80
+ cost: {
81
+ used,
82
+ limit: budget,
83
+ currency: "USD",
84
+ period: "This month",
85
+ resetsAt,
86
+ balance: billing.invoice_billing_enabled ? undefined : available,
87
+ },
88
+ details: [
89
+ {
90
+ title: "Billing",
91
+ rows: [
92
+ { label: billing.invoice_billing_enabled ? "Invoice billing" : "Prepaid", value: "USD" },
93
+ ...(budget === 0 ? [{ label: "Monthly budget", value: ctx.format.usd(budget) }] : []),
94
+ ],
95
+ },
96
+ ],
97
+ dataConfidence: "exact",
98
+ };
99
+ },
100
+ });
101
+
102
+ // END UPSTREAM
103
+ })(globalThis.defineProvider);
@@ -0,0 +1,24 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "id": "soniox",
4
+ "name": "Soniox",
5
+ "version": "0.1.0",
6
+ "entry": "plugin.js",
7
+ "enabledByDefault": false,
8
+ "supportedModes": [
9
+ "api"
10
+ ],
11
+ "autoMode": "api",
12
+ "usageDashboardUrl": "https://console.soniox.com",
13
+ "envVars": [
14
+ "SONIOX_ORG_API_KEY"
15
+ ],
16
+ "setupFields": [],
17
+ "upstream": {
18
+ "repository": "https://github.com/steipete/CodexBar",
19
+ "revision": "1f6da9bec44455288ddee5ef6f3617a803d8eb2a",
20
+ "path": "Sources/CodexBarCore/Resources/Plugins/soniox.js",
21
+ "sha256": "205af76549b697bc66a8d1a16008463310c2ee218e4d9c5f44edbb7b2ceed0b0",
22
+ "license": "MIT"
23
+ }
24
+ }
@@ -0,0 +1,14 @@
1
+ <svg width="100" height="100" viewBox="0 0 54 54" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M27.8517 26.3314C27.8439 26.1451 27.8371 25.9303 27.8337 25.692C27.8203 24.7571 27.8545 23.4581 28.0457 22.0052C28.4322 19.0688 29.4394 15.6521 31.8222 13.2693C34.205 10.8867 37.6212 9.87992 40.5575 9.49344C42.0107 9.30219 43.3101 9.26734 44.245 9.28076C44.4829 9.28417 44.6968 9.29231 44.883 9.30009C44.8908 9.48595 44.8975 9.69933 44.901 9.93676C44.9144 10.8716 44.8795 12.171 44.6883 13.6242C44.3018 16.5605 43.2958 19.9773 40.9131 22.3602C38.5303 24.743 35.1129 25.7495 32.1765 26.136C30.7234 26.3272 29.4246 26.3614 28.4897 26.348C28.2518 26.3446 28.0378 26.3392 27.8517 26.3314Z" stroke="currentColor" stroke-width="2.5"/>
3
+ <path d="M27.8916 27.1592C28.0179 27.0219 28.165 26.8653 28.3311 26.6943C28.9826 26.0238 29.9253 25.1295 31.0879 24.2373C33.4375 22.4342 36.5658 20.7305 39.9355 20.7305C43.3051 20.7306 46.4327 22.4343 48.7822 24.2373C49.945 25.1296 50.8885 26.0238 51.54 26.6943C51.7059 26.865 51.8514 27.022 51.9775 27.1592C51.8516 27.2961 51.7055 27.4518 51.54 27.6221C50.8885 28.2926 49.945 29.1868 48.7822 30.0791C46.4327 31.8821 43.3052 33.5868 39.9355 33.5869C36.5657 33.5869 33.4375 31.8822 31.0879 30.0791C29.9252 29.1868 28.9826 28.2926 28.3311 27.6221C28.1652 27.4514 28.0177 27.2963 27.8916 27.1592Z" stroke="currentColor" stroke-width="2.5"/>
4
+ <path d="M27.4459 27.6915C27.6323 27.6837 27.8471 27.677 28.0854 27.6736C29.0202 27.6602 30.3192 27.6943 31.7721 27.8856C34.7085 28.272 38.1253 29.2793 40.5081 31.6621C42.8906 34.0448 43.8974 37.4611 44.2839 40.3973C44.4752 41.8505 44.51 43.1499 44.4966 44.0848C44.4932 44.3228 44.485 44.5367 44.4773 44.7229C44.2914 44.7306 44.078 44.7374 43.8406 44.7408C42.9057 44.7542 41.6063 44.7194 40.1531 44.5281C37.2168 44.1417 33.8 43.1356 31.4172 40.753C29.0343 38.3701 28.0278 34.9528 27.6413 32.0163C27.4501 30.5633 27.4159 29.2644 27.4294 28.3296C27.4328 28.0916 27.4381 27.8777 27.4459 27.6915Z" stroke="currentColor" stroke-width="2.5"/>
5
+ <path d="M26.916 28.1289C27.0533 28.2552 27.2099 28.4023 27.3809 28.5684C28.0514 29.2199 28.9457 30.1626 29.8379 31.3252C31.641 33.6748 33.3447 36.8031 33.3447 40.1728C33.3446 43.5424 31.6409 46.67 29.8379 49.0195C28.9456 50.1823 28.0514 51.1258 27.3809 51.7773C27.2102 51.9432 27.0532 52.0887 26.916 52.2148C26.7791 52.0889 26.6234 51.9428 26.4531 51.7773C25.7826 51.1258 24.8884 50.1823 23.9961 49.0195C22.1931 46.67 20.4884 43.5426 20.4883 40.1728C20.4883 36.803 22.193 33.6748 23.9961 31.3252C24.8884 30.1625 25.7826 29.2199 26.4531 28.5684C26.6238 28.4025 26.7789 28.255 26.916 28.1289Z" stroke="currentColor" stroke-width="2.5"/>
6
+ <path d="M26.2147 27.691C26.2225 27.8774 26.2293 28.0922 26.2327 28.3305C26.2461 29.2653 26.2119 30.5643 26.0207 32.0172C25.6342 34.9536 24.627 38.3704 22.2442 40.7532C19.8614 43.1357 16.4452 44.1425 13.5089 44.529C12.0557 44.7203 10.7563 44.7551 9.82145 44.7417C9.58349 44.7383 9.36957 44.7301 9.1834 44.7224C9.17564 44.5365 9.16886 44.3231 9.16545 44.0857C9.15203 43.1508 9.18689 41.8514 9.37813 40.3982C9.76458 37.4619 10.7706 34.0451 13.1533 31.6623C15.5361 29.2795 18.9535 28.2729 21.8899 27.8865C23.343 27.6952 24.6419 27.6611 25.5767 27.6745C25.8146 27.6779 26.0286 27.6833 26.2147 27.691Z" stroke="currentColor" stroke-width="2.5"/>
7
+ <path d="M25.7021 27.1602C25.5759 27.2974 25.4288 27.4541 25.2627 27.625C24.6111 28.2955 23.6684 29.1899 22.5059 30.082C20.1562 31.8851 17.028 33.5889 13.6582 33.5889C10.2886 33.5887 7.16105 31.885 4.81153 30.082C3.64873 29.1897 2.70529 28.2955 2.05372 27.625C1.88786 27.4543 1.74236 27.2973 1.61622 27.1602C1.74215 27.0232 1.88824 26.8676 2.05372 26.6973C2.70527 26.0267 3.64874 25.1326 4.81153 24.2402C7.16108 22.4372 10.2885 20.7326 13.6582 20.7324C17.0281 20.7324 20.1562 22.4371 22.5059 24.2402C23.6686 25.1325 24.6112 26.0268 25.2627 26.6973C25.4285 26.8679 25.576 27.023 25.7021 27.1602Z" stroke="currentColor" stroke-width="2.5"/>
8
+ <path d="M25.7338 25.9813C25.5474 25.9891 25.3326 25.9959 25.0943 25.9993C24.1595 26.0127 22.8605 25.9785 21.4076 25.7873C18.4712 25.4008 15.0544 24.3936 12.6716 22.0108C10.2891 19.628 9.28226 16.2118 8.89579 13.2755C8.70453 11.8223 8.66969 10.5229 8.6831 9.58806C8.68652 9.35009 8.69466 9.13618 8.70244 8.95C8.8883 8.94224 9.10168 8.93546 9.33911 8.93205C10.274 8.91863 11.5734 8.95349 13.0266 9.14473C15.9629 9.53118 19.3797 10.5372 21.7625 12.9199C24.1454 15.3027 25.1519 18.7201 25.5383 21.6565C25.7296 23.1096 25.7638 24.4085 25.7503 25.3433C25.7469 25.5812 25.7415 25.7952 25.7338 25.9813Z" stroke="currentColor" stroke-width="2.5"/>
9
+ <path d="M26.9121 25.7031C26.7748 25.5769 26.6182 25.4298 26.4473 25.2637C25.7768 24.6121 24.8824 23.6694 23.9902 22.5068C22.1872 20.1572 20.4834 17.029 20.4834 13.6592C20.4835 10.2896 22.1873 7.16203 23.9902 4.8125C24.8826 3.6497 25.7767 2.70627 26.4473 2.05469C26.618 1.88883 26.775 1.74333 26.9121 1.61719C27.049 1.74312 27.2047 1.88921 27.375 2.05469C28.0455 2.70624 28.9397 3.64971 29.832 4.8125C31.6351 7.16206 33.3397 10.2895 33.3398 13.6592C33.3398 17.029 31.6351 20.1572 29.832 22.5068C28.9398 23.6695 28.0455 24.6121 27.375 25.2637C27.2043 25.4295 27.0492 25.577 26.9121 25.7031Z" stroke="currentColor" stroke-width="2.5"/>
10
+ <g transform="translate(21.7222 21.7222) scale(0.5555556)">
11
+ <path d="M8.56067 1.3799L10.4618 1.34671C10.5492 1.34522 10.6286 1.38935 10.6747 1.45923L10.7093 1.53774L11.045 2.92076C11.1559 3.37707 11.4798 3.75232 11.9152 3.92819C12.3419 4.10041 12.8251 4.0605 13.2183 3.82145L14.3036 3.16178C14.3771 3.11703 14.4662 3.1144 14.5407 3.14983L14.6099 3.19745L15.9965 4.57385C16.0577 4.63461 16.0825 4.72126 16.0659 4.80217L16.035 4.88085L15.4788 5.80573C15.2386 6.20505 15.1867 6.68631 15.3299 7.12299L15.4034 7.30728C15.5966 7.71593 15.9524 8.02086 16.3793 8.15073L16.5666 8.19532L17.4238 8.34639C17.5414 8.36729 17.628 8.46852 17.6302 8.58794L17.6642 10.533C17.6662 10.6479 17.5891 10.7499 17.478 10.7794L16.3785 11.0721C15.9508 11.1859 15.5956 11.4767 15.399 11.8666L15.3249 12.0398C15.1648 12.4858 15.2187 12.9804 15.4714 13.3812L16.0028 14.2246C16.0497 14.2991 16.0532 14.3908 16.0168 14.4666L15.9672 14.5358L14.5394 15.9448C14.4825 16.0008 14.4038 16.025 14.3277 16.0139L14.2531 15.9908L13.2136 15.4747C12.8594 15.2989 12.4528 15.2697 12.0801 15.388L11.9219 15.4474C11.5639 15.6067 11.2838 15.8977 11.1361 16.2562L11.0812 16.4134L10.7617 17.5217C10.7312 17.6271 10.6352 17.7006 10.5255 17.7026L8.58735 17.7364C8.46855 17.7385 8.36456 17.6565 8.33878 17.5405L8.08316 16.3817L8.03422 16.2078C7.91462 15.8694 7.67485 15.5859 7.36105 15.4118L7.19756 15.3345L7.04329 15.2815C6.73077 15.1941 6.39776 15.2128 6.0968 15.3342L5.94955 15.4032L4.77293 16.0371C4.6979 16.0774 4.60969 16.0756 4.53755 16.0373L4.47222 15.9877L3.13752 14.5596C3.0776 14.4954 3.05736 14.4064 3.07873 14.3252L3.11353 14.2484L3.7373 13.3331C3.98342 12.9717 4.04895 12.5208 3.923 12.109L3.85746 11.9353L3.78169 11.7911C3.61486 11.5129 3.35814 11.2998 3.05423 11.1865L2.89807 11.1374L1.49728 10.7907C1.38749 10.7635 1.30969 10.6659 1.30755 10.5528L1.27503 8.6898C1.27334 8.58474 1.33722 8.49154 1.43207 8.45363L1.47385 8.44118L2.69615 8.18641C3.14512 8.09283 3.52318 7.80066 3.72943 7.39873L3.80738 7.2196C3.94662 6.83155 3.92084 6.40585 3.73992 6.04091L3.6523 5.8891L3.04806 4.9581C2.98255 4.85725 2.99751 4.72403 3.08453 4.64101L4.58516 3.20932C4.67146 3.12699 4.80459 3.11666 4.90217 3.18523L5.71797 3.75897C6.12951 4.04818 6.65895 4.11193 7.1274 3.92874C7.53749 3.76829 7.85309 3.43752 7.99657 3.02769L8.04812 2.84707L8.32092 1.57747C8.34533 1.46387 8.44449 1.38193 8.56067 1.3799Z" fill="currentColor" stroke="currentColor" stroke-width="1.5"/>
12
+ <circle cx="9.46694" cy="9.5416" r="2.53895" transform="rotate(-1 9.46694 9.5416)" fill="currentColor" stroke="currentColor" stroke-width="1.5"/>
13
+ </g>
14
+ </svg>
@@ -207,6 +207,18 @@
207
207
 
208
208
  json = unwrapQuotasJson(json);
209
209
 
210
+ var weekly = json.planWeeklyLimit
211
+ if (weekly && typeof weekly === "object") {
212
+ var remaining = toFiniteNumber(weekly.percentRemaining)
213
+ var used = toFiniteNumber(weekly.percentUsed)
214
+ if (used === null && remaining !== null) used = 100 - remaining
215
+ if (used === null || used < 0 || used > 100) throw "Synthetic weekly usage is invalid."
216
+ var line = {label:"Weekly plan limit",used,limit:100,format:{kind:"percent"},periodDurationMs:7*86400000}
217
+ var reset = ctx.util.toIso(weekly.resetsAt || weekly.renewsAt || weekly.resetAt)
218
+ if (reset) line.resetsAt = reset
219
+ return {lines:[ctx.line.progress(line)]}
220
+ }
221
+
210
222
  var rfl = pickRollingFiveHour(json);
211
223
  var wtl = pickWeeklyToken(json);
212
224
 
@@ -7,17 +7,59 @@
7
7
  "icon": "icon.svg",
8
8
  "brandColor": "#000000",
9
9
  "lines": [
10
- { "type": "progress", "label": "5h Rate Limit", "scope": "overview", "primaryOrder": 1 },
11
- { "type": "progress", "label": "Mana Bar", "scope": "overview" },
12
- { "type": "badge", "label": "Rate Limited", "scope": "overview" },
13
- { "type": "badge", "label": "Quotas", "scope": "overview" },
14
- { "type": "progress", "label": "Subscription", "scope": "overview", "primaryOrder": 2 },
15
- { "type": "progress", "label": "Free Tool Calls", "scope": "detail" },
16
- { "type": "progress", "label": "Search", "scope": "overview" }
10
+ {
11
+ "type": "progress",
12
+ "label": "Weekly plan limit",
13
+ "scope": "overview",
14
+ "primaryOrder": 0
15
+ },
16
+ {
17
+ "type": "progress",
18
+ "label": "5h Rate Limit",
19
+ "scope": "overview",
20
+ "primaryOrder": 1
21
+ },
22
+ {
23
+ "type": "progress",
24
+ "label": "Mana Bar",
25
+ "scope": "overview"
26
+ },
27
+ {
28
+ "type": "badge",
29
+ "label": "Rate Limited",
30
+ "scope": "overview"
31
+ },
32
+ {
33
+ "type": "badge",
34
+ "label": "Quotas",
35
+ "scope": "overview"
36
+ },
37
+ {
38
+ "type": "progress",
39
+ "label": "Subscription",
40
+ "scope": "overview",
41
+ "primaryOrder": 2
42
+ },
43
+ {
44
+ "type": "progress",
45
+ "label": "Free Tool Calls",
46
+ "scope": "detail"
47
+ },
48
+ {
49
+ "type": "progress",
50
+ "label": "Search",
51
+ "scope": "overview"
52
+ }
53
+ ],
54
+ "supportedModes": [
55
+ "api",
56
+ "local"
17
57
  ],
18
- "supportedModes": ["api", "local"],
19
58
  "autoMode": "local",
20
59
  "links": [
21
- { "label": "Dashboard", "url": "https://synthetic.new/billing" }
60
+ {
61
+ "label": "Dashboard",
62
+ "url": "https://synthetic.new/billing"
63
+ }
22
64
  ]
23
65
  }
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Peter Steinberger
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,3 @@
1
+ <svg width="55" height="55" viewBox="0 0 55 55" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M38.8088 0C44.4762 0 47.3101 9.1895e-05 49.4748 1.10306C51.3788 2.07326 52.927 3.62135 53.8971 5.52544C55.0001 7.69013 55 10.524 55 16.1914V38.8088C55 44.4761 55.0001 47.3099 53.8971 49.4746C52.927 51.3786 51.3788 52.9267 49.4748 53.8969C47.3101 54.9999 44.4762 55 38.8088 55H16.1914C10.5239 55 7.69014 54.9999 5.52544 53.8969C3.62133 52.9267 2.07325 51.3787 1.10306 49.4746C0.000109958 47.3099 0 44.4762 0 38.8088V16.1912C0 10.5238 0.000107614 7.69012 1.10306 5.52544C2.07325 3.62133 3.62133 2.07326 5.52544 1.10306C7.69014 8.88436e-05 10.5239 0 16.1914 0H38.8088ZM23.3863 30.405C23.0885 30.405 22.7934 30.4638 22.5183 30.5782C22.2433 30.6926 21.9933 30.8603 21.7827 31.0716L17.4534 35.4188L16.3029 34.2638C15.4573 33.415 14.0099 33.8346 13.7471 35.0064L12.1073 42.3023C12.0498 42.5532 12.0568 42.8148 12.128 43.0621C12.199 43.3085 12.3313 43.5327 12.5123 43.7136L12.5108 43.7159C12.6915 43.8987 12.9155 44.0321 13.1619 44.1037C13.4083 44.1752 13.6688 44.1824 13.9188 44.1246L21.1862 42.4776C22.3527 42.2137 22.7715 40.7614 21.9259 39.9124L20.7754 38.7574L25.1056 34.411C25.5306 33.9842 25.7695 33.4049 25.7695 32.8013C25.7695 32.1977 25.5306 31.6185 25.1056 31.1916L25.0476 31.1334L25.0497 31.1319L24.9896 31.0716C24.7791 30.8603 24.529 30.6926 24.254 30.5782C23.979 30.4638 23.684 30.4051 23.3863 30.405ZM39.0054 27.6663C37.9941 27.0245 36.6768 27.7546 36.6766 28.9556V30.5884H27.3981C27.7081 31.1832 27.8847 31.8596 27.8847 32.5774C27.8846 33.6152 27.5181 34.5672 26.908 35.3099L36.6758 35.3096L36.6752 36.9424C36.6753 38.1434 37.9941 38.8736 39.0054 38.2319L45.3045 34.2387C45.7757 33.9384 46.0114 33.443 46.0115 32.948C46.0109 32.4536 45.7752 31.9592 45.303 31.6601L39.0054 27.6663ZM23.6104 10.2206C23.3539 10.2194 23.101 10.2839 22.8763 10.4081C22.6514 10.5325 22.4614 10.7132 22.3253 10.9318L18.3472 17.2549H18.3458C17.7067 18.2701 18.4346 19.5933 19.6307 19.5936H21.2578V28.9869C21.9327 28.5406 22.7403 28.2801 23.609 28.2801C24.4781 28.2801 25.2864 28.5407 25.9615 28.9875V19.5936H27.5884C28.7849 19.5936 29.5112 18.2702 28.8728 17.2541L24.8939 10.9318C24.5951 10.4584 24.1029 10.2212 23.6104 10.2206Z" fill="#1F1E1E"/>
3
+ </svg>
@@ -0,0 +1,61 @@
1
+ // Generated by tools/vendor-codexbar-providers.cjs; see LICENSE.
2
+ globalThis.__usagestat_bundled_options = {"labels":["Account plan","API key","Additional"],"defaults":{},"autoMode":"api"};
3
+ (function(defineProvider) {
4
+ // BEGIN UPSTREAM Sources/CodexBarCore/Resources/Plugins/tavily.js
5
+ defineProvider({
6
+ id: "tavily",
7
+ name: "Tavily",
8
+ endpoints: ["https://api.tavily.com"],
9
+ auth: { type: "bearer", secret: "TAVILY_API_KEY" },
10
+ settings: [{ key: "TAVILY_API_KEY", title: "Tavily API key", type: "secure" }],
11
+ capabilities: ["http-status"],
12
+ async fetchUsage(ctx) {
13
+ const response = await ctx.http.get("https://api.tavily.com/usage");
14
+ const message = `Tavily returned HTTP ${response.status}.`;
15
+ if (response.status === 401) throw ctx.fail.authenticationExpired(message);
16
+ if (response.status === 403) throw ctx.fail.permissionDenied(message);
17
+ // The usage endpoint allows only ten requests per ten minutes; do not replay a throttled request.
18
+ if (response.status === 429) throw ctx.fail.rateLimited(message);
19
+ if (response.status >= 500) throw ctx.fail.providerUnavailable(message);
20
+ if (response.status !== 200) throw ctx.fail.apiFailure(message);
21
+ const fail = () => {
22
+ throw ctx.fail.parseFailure("Tavily returned an unrecognized credit usage response.");
23
+ };
24
+ const record = (value) => value !== null && typeof value === "object" && !Array.isArray(value);
25
+ const count = (value) => (Number.isSafeInteger(value) && value >= 0 ? value : fail());
26
+ let data;
27
+ try {
28
+ data = JSON.parse(response.bodyText);
29
+ } catch {
30
+ return fail();
31
+ }
32
+ if (!record(data) || !record(data.account) || !record(data.key)) return fail();
33
+ const { account, key } = data;
34
+ const format = (value) => `${ctx.format.number(count(value))} credits`;
35
+ const rows = (usage, cap, unlimited = false) =>
36
+ [
37
+ { label: "Used", value: format(usage) },
38
+ { label: "Limit", value: cap === null ? (unlimited ? "Unlimited" : null) : format(cap) },
39
+ { label: "Remaining", value: cap === null ? null : format(Math.max(0, cap - usage)) },
40
+ ].filter((row) => row.value !== null);
41
+ const details = [
42
+ { title: "Account plan", rows: rows(account.plan_usage, count(account.plan_limit)) },
43
+ { title: "API key", rows: rows(key.usage, key.limit, true) },
44
+ ];
45
+ if (account.paygo_usage !== undefined || account.paygo_limit !== undefined) {
46
+ details.push({ title: "Pay as you go", rows: rows(account.paygo_usage, account.paygo_limit) });
47
+ }
48
+ const plan = account.current_plan;
49
+ if (plan !== undefined && (typeof plan !== "string" || !plan.trim() || plan.length > 120)) return fail();
50
+ return {
51
+ primary: account.plan_limit > 0 ? { usedPercent: ctx.pct(account.plan_usage, account.plan_limit) } : undefined,
52
+ secondary: key.limit > 0 ? { usedPercent: ctx.pct(key.usage, key.limit) } : undefined,
53
+ details,
54
+ identity: { loginMethod: plan === undefined ? "API key" : plan.trim() },
55
+ dataConfidence: "exact",
56
+ };
57
+ },
58
+ });
59
+
60
+ // END UPSTREAM
61
+ })(globalThis.defineProvider);
@@ -0,0 +1,24 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "id": "tavily",
4
+ "name": "Tavily",
5
+ "version": "0.1.0",
6
+ "entry": "plugin.js",
7
+ "enabledByDefault": false,
8
+ "supportedModes": [
9
+ "api"
10
+ ],
11
+ "autoMode": "api",
12
+ "usageDashboardUrl": "https://app.tavily.com",
13
+ "envVars": [
14
+ "TAVILY_API_KEY"
15
+ ],
16
+ "setupFields": [],
17
+ "upstream": {
18
+ "repository": "https://github.com/steipete/CodexBar",
19
+ "revision": "1f6da9bec44455288ddee5ef6f3617a803d8eb2a",
20
+ "path": "Sources/CodexBarCore/Resources/Plugins/tavily.js",
21
+ "sha256": "2859e56104c9e73d2650b87e034c5f2955c09ea7507e128a22e1ab42b5ae35a0",
22
+ "license": "MIT"
23
+ }
24
+ }
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Peter Steinberger
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,4 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 106 81" aria-label="TinyApi">
2
+ <path fill="currentColor" transform="translate(-9.626586 49.746547)" d="M 77.953125 -23.203125 L 87.640625 -15.109375 L 59.203125 18.90625 C 57.003906 21.539062 54.429688 23.601562 51.484375 25.09375 C 48.546875 26.582031 45.460938 27.46875 42.234375 27.75 C 39.015625 28.03125 35.835938 27.707031 32.703125 26.78125 C 29.578125 25.863281 26.691406 24.300781 24.046875 22.09375 L 22.75 21.015625 C 20.101562 18.796875 18.035156 16.21875 16.546875 13.28125 C 15.066406 10.351562 14.179688 7.273438 13.890625 4.046875 C 13.609375 0.828125 13.941406 -2.351562 14.890625 -5.5 C 15.835938 -8.65625 17.410156 -11.550781 19.609375 -14.1875 L 48.046875 -48.203125 L 57.78125 -40.0625 L 29.34375 -6.046875 C 27.894531 -4.316406 26.988281 -2.367188 26.625 -0.203125 C 26.257812 1.953125 26.441406 4.046875 27.171875 6.078125 C 27.898438 8.117188 29.128906 9.863281 30.859375 11.3125 L 32.15625 12.390625 C 33.894531 13.835938 35.828125 14.738281 37.953125 15.09375 C 40.085938 15.457031 42.1875 15.265625 44.25 14.515625 C 46.3125 13.773438 48.066406 12.539062 49.515625 10.8125 Z M 77.953125 -23.203125"/>
3
+ <path fill="currentColor" transform="translate(115.142795 30.459118)" d="M -77.953125 23.203125 L -87.640625 15.109375 L -59.203125 -18.90625 C -57.003906 -21.539062 -54.429688 -23.601562 -51.484375 -25.09375 C -48.546875 -26.582031 -45.460938 -27.46875 -42.234375 -27.75 C -39.015625 -28.03125 -35.835938 -27.707031 -32.703125 -26.78125 C -29.578125 -25.863281 -26.691406 -24.300781 -24.046875 -22.09375 L -22.75 -21.015625 C -20.101562 -18.796875 -18.035156 -16.21875 -16.546875 -13.28125 C -15.066406 -10.351562 -14.179688 -7.273438 -13.890625 -4.046875 C -13.609375 -0.828125 -13.941406 2.351562 -14.890625 5.5 C -15.835938 8.65625 -17.410156 11.550781 -19.609375 14.1875 L -48.046875 48.203125 L -57.78125 40.0625 L -29.34375 6.046875 C -27.894531 4.316406 -26.988281 2.367188 -26.625 0.203125 C -26.257812 -1.953125 -26.441406 -4.046875 -27.171875 -6.078125 C -27.898438 -8.117188 -29.128906 -9.863281 -30.859375 -11.3125 L -32.15625 -12.390625 C -33.894531 -13.835938 -35.828125 -14.738281 -37.953125 -15.09375 C -40.085938 -15.457031 -42.1875 -15.265625 -44.25 -14.515625 C -46.3125 -13.773438 -48.066406 -12.539062 -49.515625 -10.8125 Z M -77.953125 23.203125"/>
4
+ </svg>
@@ -0,0 +1,73 @@
1
+ // Generated by tools/vendor-codexbar-providers.cjs; see LICENSE.
2
+ globalThis.__usagestat_bundled_options = {"labels":["Credits","Additional","Additional"],"defaults":{},"autoMode":"web"};
3
+ (function(defineProvider) {
4
+ // BEGIN UPSTREAM Sources/CodexBarCore/Resources/Plugins/tinyapi.js
5
+ defineProvider({
6
+ id: "tinyapi",
7
+ name: "TinyApi",
8
+ endpoints: ["https://tinyapi.rest"],
9
+ settings: [],
10
+ capabilities: ["browser-cookies", "http-status"],
11
+ cookieDomains: ["tinyapi.rest"],
12
+ async fetchUsage(ctx) {
13
+ const domain = "tinyapi.rest";
14
+ const policy = ctx.browser.availability(domain);
15
+ if (policy === "off") throw ctx.fail.missingCredential("TinyApi cookies are disabled.");
16
+ let response;
17
+ let rejected = false;
18
+ for await (const session of ctx.browser.sessions(domain)) {
19
+ const candidate = await ctx.http.get(`https://${domain}/api/user/credits`, {
20
+ headers: { Cookie: session.header },
21
+ timeoutSeconds: 15,
22
+ });
23
+ if (candidate.status === 401 || candidate.status === 403) {
24
+ rejected = true;
25
+ ctx.browser.rejectCookie(domain, session);
26
+ if (policy === "manual") break;
27
+ continue;
28
+ }
29
+ response = candidate;
30
+ break;
31
+ }
32
+ if (!response) {
33
+ throw rejected
34
+ ? ctx.fail.authenticationExpired("TinyApi session expired. Sign in again or paste a fresh Cookie header.")
35
+ : ctx.fail.missingCredential(
36
+ `Sign in to tinyapi.rest. Supported browsers: ${ctx.browser.supportedBrowsers}. Or set a manual Cookie header.`,
37
+ );
38
+ }
39
+ if (response.status === 429) throw ctx.fail.rateLimited("TinyApi credits requests are rate limited.");
40
+ if (response.status >= 500)
41
+ throw ctx.fail.providerUnavailable(`TinyApi credits service returned HTTP ${response.status}.`);
42
+ if (response.status !== 200) throw ctx.fail.apiFailure(`TinyApi credits request returned HTTP ${response.status}.`);
43
+ let payload;
44
+ try {
45
+ payload = JSON.parse(response.bodyText);
46
+ } catch {
47
+ throw ctx.fail.parseFailure("TinyApi credits response is not valid JSON.");
48
+ }
49
+ const balance = payload?.data?.totalAvailable;
50
+ if (payload?.success !== true || typeof balance !== "number" || !Number.isFinite(balance) || balance < 0) {
51
+ throw ctx.fail.parseFailure("TinyApi credits response is missing a valid available balance.");
52
+ }
53
+ return {
54
+ details: [
55
+ {
56
+ title: "Credits",
57
+ rows: [
58
+ {
59
+ label: "Available credits",
60
+ value: `${ctx.format.number(balance, { maximumFractionDigits: 2 })} credits`,
61
+ usageValue: balance,
62
+ },
63
+ ],
64
+ },
65
+ ],
66
+ identity: { loginMethod: "Browser session" },
67
+ dataConfidence: "exact",
68
+ };
69
+ },
70
+ });
71
+
72
+ // END UPSTREAM
73
+ })(globalThis.defineProvider);
@@ -0,0 +1,25 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "id": "tinyapi",
4
+ "name": "TinyApi",
5
+ "version": "0.1.0",
6
+ "entry": "plugin.js",
7
+ "enabledByDefault": false,
8
+ "supportedModes": [
9
+ "web"
10
+ ],
11
+ "autoMode": "web",
12
+ "usageDashboardUrl": "https://tinyapi.rest",
13
+ "webUrl": "https://tinyapi.rest",
14
+ "envVars": [
15
+ "TINYAPI_COOKIE"
16
+ ],
17
+ "setupFields": [],
18
+ "upstream": {
19
+ "repository": "https://github.com/steipete/CodexBar",
20
+ "revision": "1f6da9bec44455288ddee5ef6f3617a803d8eb2a",
21
+ "path": "Sources/CodexBarCore/Resources/Plugins/tinyapi.js",
22
+ "sha256": "14f874b433198e9bfb9f1d689a0822f35ac8d97945cab015c039f836eed4ef17",
23
+ "license": "MIT"
24
+ }
25
+ }
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Peter Steinberger
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,3 @@
1
+ <svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill="currentColor">
2
+ <path fill-rule="evenodd" d="M24 20.541H3.428v-3.426H0V3.4h24V20.54zM3.428 17.115h17.144V6.827H3.428v10.288zm8.573-5.196l-2.425 2.424-2.424-2.424 2.424-2.424 2.425 2.424zm6.857-.001l-2.424 2.423-2.425-2.423 2.425-2.425 2.424 2.425z"/>
3
+ </svg>
@@ -0,0 +1,103 @@
1
+ // Generated by tools/vendor-codexbar-providers.cjs; see LICENSE.
2
+ globalThis.__usagestat_bundled_options = {"labels":["Credits","Additional","Additional"],"defaults":{},"autoMode":"web"};
3
+ (function(defineProvider) {
4
+ // BEGIN UPSTREAM Sources/CodexBarCore/Resources/Plugins/traecn.js
5
+ defineProvider({
6
+ id: "traecn",
7
+ name: "Trae CN",
8
+ endpoints: ["https://api.trae.cn"],
9
+ settings: [],
10
+ capabilities: ["browser-cookies", "http-status"],
11
+ // Include parent-domain sessions shared by the dashboard and API.
12
+ cookieDomains: ["trae.cn", "api.trae.cn"],
13
+ async fetchUsage(ctx) {
14
+ const domain = ctx.browser.availability("api.trae.cn") === "manual" ? "api.trae.cn" : "trae.cn";
15
+ const signIn = "Sign in to Trae CN at trae.cn, then refresh CodexBar.";
16
+ const malformed = () => {
17
+ throw ctx.fail.parseFailure("Trae CN usage response format changed.");
18
+ };
19
+ const finite = (value) => typeof value === "number" && Number.isFinite(value) && value >= 0;
20
+ const rejected = (response) =>
21
+ response.status === 401 || response.status === 403 || (response.status >= 300 && response.status < 400);
22
+ const read = (response) => {
23
+ const message = "Trae CN request failed. Try refreshing later.";
24
+ if (response.status === 429) throw ctx.fail.rateLimited(message);
25
+ if (response.status === 408 || response.status >= 500) throw ctx.fail.providerUnavailable(message);
26
+ if (response.status !== 200) throw ctx.fail.apiFailure(message);
27
+ try {
28
+ return JSON.parse(response.bodyText);
29
+ } catch {
30
+ return malformed();
31
+ }
32
+ };
33
+ if (ctx.browser.availability(domain) === "off") throw ctx.fail.missingCredential(signIn);
34
+ let sessionRejected = false;
35
+ for await (const session of ctx.browser.sessions(domain)) {
36
+ const headers = { Cookie: session.header ?? "", Origin: "https://www.trae.cn", Referer: "https://www.trae.cn/" };
37
+ const tokenResponse = await ctx.http.post("https://api.trae.cn/cloudide/api/v3/common/GetUserToken", {
38
+ headers,
39
+ body: {},
40
+ timeoutSeconds: 15,
41
+ });
42
+ if (rejected(tokenResponse)) {
43
+ sessionRejected = true;
44
+ ctx.browser.rejectCookie(domain, session);
45
+ continue;
46
+ }
47
+ const tokenPayload = read(tokenResponse);
48
+ const token = tokenPayload?.Result?.Token;
49
+ if (typeof token !== "string" || !token.trim()) return malformed();
50
+ // The exchanged token lives only for this refresh, and only goes back to the declared API origin.
51
+ const usageResponse = await ctx.http.post("https://api.trae.cn/trae/api/v2/pay/user_current_entitlement_list", {
52
+ headers: { ...headers, Authorization: `Cloud-IDE-JWT ${token}` },
53
+ body: { require_usage: true, full_data: true },
54
+ timeoutSeconds: 15,
55
+ });
56
+ if (rejected(usageResponse)) {
57
+ sessionRejected = true;
58
+ ctx.browser.rejectCookie(domain, session);
59
+ continue;
60
+ }
61
+ const payload = read(usageResponse);
62
+ const { total_amount: total, consumed_amount: used } = payload?.usage_summary ?? {};
63
+ if (payload?.code === 1001) {
64
+ sessionRejected = true;
65
+ ctx.browser.rejectCookie(domain, session);
66
+ continue;
67
+ }
68
+ if (payload?.is_credits_billing !== true || !finite(total) || !finite(used)) return malformed();
69
+ const packs = Array.isArray(payload.user_entitlement_pack_list) ? payload.user_entitlement_pack_list : [];
70
+ const subscription = packs.find(
71
+ (pack) => pack && pack.group_type === 0 && (pack.status === undefined || pack.status === 1),
72
+ );
73
+ const plan = typeof subscription?.display_desc === "string" ? subscription.display_desc.trim() : undefined;
74
+ const remaining = Math.max(0, total - used);
75
+ const hasFraction = [used, total, remaining].some((value) => !Number.isInteger(value));
76
+ const number = (value) =>
77
+ ctx.format.number(value, {
78
+ minimumFractionDigits: hasFraction ? 2 : 0,
79
+ maximumFractionDigits: 2,
80
+ });
81
+ // Pack expiry and billing timestamps do not establish an aggregate reset or subscription renewal.
82
+ return {
83
+ primary: total > 0 ? { usedPercent: Math.min(100, (used / total) * 100) } : undefined,
84
+ identity: plan ? { loginMethod: plan } : undefined,
85
+ details: [
86
+ {
87
+ title: "Credits",
88
+ rows: [
89
+ { label: "Used", value: number(used) },
90
+ { label: "Total", value: number(total) },
91
+ { label: "Remaining", value: number(remaining) },
92
+ ],
93
+ },
94
+ ],
95
+ dataConfidence: "exact",
96
+ };
97
+ }
98
+ throw sessionRejected ? ctx.fail.authenticationExpired(signIn) : ctx.fail.missingCredential(signIn);
99
+ },
100
+ });
101
+
102
+ // END UPSTREAM
103
+ })(globalThis.defineProvider);