@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.
- package/native-manifest.json +1532 -134
- package/package.json +235 -2
- package/plugins/UPSTREAM-LICENSES.md +6 -2
- package/plugins/_provider-icons/LICENSE +21 -0
- package/plugins/_provider-icons/NOTICE +12 -0
- package/plugins/_provider-icons/licenses/CodexBar-MIT.txt +21 -0
- package/plugins/_provider-icons/licenses/LobeHub-MIT.txt +21 -0
- package/plugins/_provider-icons/licenses/UsageStat-Bar-MIT.txt +21 -0
- package/plugins/_provider-icons/manifest.json +1219 -0
- package/plugins/_provider-icons/provenance.json +269 -0
- package/plugins/_provider-icons/source.json +4 -0
- package/plugins/abacus-ai/icon-color.svg +18 -0
- package/plugins/abliteration/LICENSE +21 -0
- package/plugins/abliteration/icon.svg +5 -0
- package/plugins/abliteration/plugin.js +89 -0
- package/plugins/abliteration/plugin.json +24 -0
- package/plugins/aerostack/LICENSE +21 -0
- package/plugins/aerostack/icon.svg +1 -0
- package/plugins/aerostack/plugin.js +94 -0
- package/plugins/aerostack/plugin.json +24 -0
- package/plugins/aixy/LICENSE +21 -0
- package/plugins/aixy/icon.svg +1 -0
- package/plugins/aixy/plugin.js +266 -0
- package/plugins/aixy/plugin.json +32 -0
- package/plugins/antigravity/plugin.js +189 -65
- package/plugins/antigravity-cli/icon-color.svg +1 -0
- package/plugins/antigravity-cli/icon.svg +1 -3
- package/plugins/antigravity-cli/plugin.js +32 -20
- package/plugins/antigravity-ide/icon-color.svg +1 -0
- package/plugins/antigravity-ide/icon.svg +1 -3
- package/plugins/antigravity-ide/plugin.js +19 -7
- package/plugins/atlascloud/LICENSE +21 -0
- package/plugins/atlascloud/icon-color.svg +1 -0
- package/plugins/atlascloud/icon.svg +1 -0
- package/plugins/atlascloud/plugin.js +54 -0
- package/plugins/atlascloud/plugin.json +24 -0
- package/plugins/augment/icon-color.svg +14 -0
- package/plugins/bifrost/LICENSE +21 -0
- package/plugins/bifrost/icon.svg +3 -0
- package/plugins/bifrost/plugin.js +366 -0
- package/plugins/bifrost/plugin.json +31 -0
- package/plugins/chatbox/LICENSE +21 -0
- package/plugins/chatbox/icon.svg +4 -0
- package/plugins/chatbox/plugin.js +208 -0
- package/plugins/chatbox/plugin.json +24 -0
- package/plugins/claude/plugin.js +340 -153
- package/plugins/claude/plugin.json +1 -1
- package/plugins/claudeplatform/LICENSE +21 -0
- package/plugins/claudeplatform/icon.svg +3 -0
- package/plugins/claudeplatform/plugin.js +244 -0
- package/plugins/claudeplatform/plugin.json +25 -0
- package/plugins/clinepass/plugin.js +19 -3
- package/plugins/codebuff/icon-color.svg +92 -0
- package/plugins/coderabbit/plugin.js +25 -0
- package/plugins/coderabbit/plugin.json +12 -0
- package/plugins/codex/plugin.js +15 -8
- package/plugins/codex/plugin.json +11 -2
- package/plugins/command-code/icon-color.svg +3 -0
- package/plugins/command-code/plugin.js +7 -3
- package/plugins/copilot/icon.svg +1 -1
- package/plugins/copilot/plugin.json +1 -0
- package/plugins/cosmic/LICENSE +21 -0
- package/plugins/cosmic/icon.svg +1 -0
- package/plugins/cosmic/plugin.js +134 -0
- package/plugins/cosmic/plugin.json +32 -0
- package/plugins/crof/icon-color.svg +3 -0
- package/plugins/crofai/icon-color.svg +3 -0
- package/plugins/crofai/icon.svg +2 -15
- package/plugins/cursor/icon-color.svg +1 -0
- package/plugins/cursor/plugin.js +51 -14
- package/plugins/cursor-nightly/plugin.json +1 -1
- package/plugins/deepinfra/icon-color.svg +1 -0
- package/plugins/deepinfra/icon.svg +1 -4
- package/plugins/deepseek/plugin.js +150 -59
- package/plugins/deepseek/plugin.json +3 -1
- package/plugins/devin/plugin.js +3 -0
- package/plugins/devpass/LICENSE +21 -0
- package/plugins/devpass/icon.svg +3 -0
- package/plugins/devpass/plugin.js +120 -0
- package/plugins/devpass/plugin.json +24 -0
- package/plugins/elevenlabs/icon-color.svg +4 -0
- package/plugins/exa/LICENSE +21 -0
- package/plugins/exa/icon-color.svg +1 -0
- package/plugins/exa/icon.svg +1 -0
- package/plugins/exa/plugin.js +75 -0
- package/plugins/exa/plugin.json +32 -0
- package/plugins/factory/icon-color.svg +1 -0
- package/plugins/fal/LICENSE +21 -0
- package/plugins/fal/icon-color.svg +1 -0
- package/plugins/fal/icon.svg +1 -0
- package/plugins/fal/plugin.js +74 -0
- package/plugins/fal/plugin.json +24 -0
- package/plugins/fireworks-ai/icon-color.svg +1 -0
- package/plugins/fireworks-ai/icon.svg +1 -6
- package/plugins/flora/LICENSE +21 -0
- package/plugins/flora/icon.svg +4 -0
- package/plugins/flora/plugin.js +93 -0
- package/plugins/flora/plugin.json +32 -0
- package/plugins/futureagi/LICENSE +21 -0
- package/plugins/futureagi/icon.svg +24 -0
- package/plugins/futureagi/plugin.js +139 -0
- package/plugins/futureagi/plugin.json +32 -0
- package/plugins/gemini-apps/LICENSE +21 -0
- package/plugins/gemini-apps/icon-color.svg +1 -0
- package/plugins/gemini-apps/icon.svg +1 -0
- package/plugins/gemini-apps/plugin.js +141 -0
- package/plugins/gemini-apps/plugin.json +25 -0
- package/plugins/gitkraken/LICENSE +21 -0
- package/plugins/gitkraken/icon.svg +2 -0
- package/plugins/gitkraken/plugin.js +158 -0
- package/plugins/gitkraken/plugin.json +32 -0
- package/plugins/googledeveloper/LICENSE +21 -0
- package/plugins/googledeveloper/icon.svg +3 -0
- package/plugins/googledeveloper/plugin.js +204 -0
- package/plugins/googledeveloper/plugin.json +25 -0
- package/plugins/grok/icon-color.svg +1 -0
- package/plugins/groqcloud/icon-color.svg +1 -0
- package/plugins/helmcode/LICENSE +21 -0
- package/plugins/helmcode/icon.svg +5 -0
- package/plugins/helmcode/plugin.js +253 -0
- package/plugins/helmcode/plugin.json +32 -0
- package/plugins/huggingface/LICENSE +21 -0
- package/plugins/huggingface/icon-color.svg +1 -0
- package/plugins/huggingface/icon.svg +1 -0
- package/plugins/huggingface/plugin.js +298 -0
- package/plugins/huggingface/plugin.json +26 -0
- package/plugins/hyper/LICENSE +21 -0
- package/plugins/hyper/plugin.js +137 -0
- package/plugins/hyper/plugin.json +27 -0
- package/plugins/jetbrains-ai-assistant/LICENSE +22 -0
- package/plugins/jetbrains-ai-assistant/plugin.js +502 -16
- package/plugins/jetbrains-ai-assistant/plugin.json +27 -4
- package/plugins/kilo/icon-color.svg +1 -0
- package/plugins/kimi/plugin.js +54 -14
- package/plugins/kimi/plugin.json +46 -6
- package/plugins/langdock/LICENSE +21 -0
- package/plugins/langdock/icon.svg +4 -0
- package/plugins/langdock/plugin.js +106 -0
- package/plugins/langdock/plugin.json +25 -0
- package/plugins/linkup/LICENSE +21 -0
- package/plugins/linkup/icon.svg +10 -0
- package/plugins/linkup/plugin.js +46 -0
- package/plugins/linkup/plugin.json +24 -0
- package/plugins/litellm/plugin.js +54 -3
- package/plugins/lithosai/LICENSE +21 -0
- package/plugins/lithosai/icon.svg +1 -0
- package/plugins/lithosai/plugin.js +130 -0
- package/plugins/lithosai/plugin.json +26 -0
- package/plugins/llmman/LICENSE +21 -0
- package/plugins/llmman/icon.svg +4 -0
- package/plugins/llmman/plugin.js +138 -0
- package/plugins/llmman/plugin.json +31 -0
- package/plugins/longcat/icon-color.svg +1 -0
- package/plugins/longcat/icon.svg +1 -4
- package/plugins/manus/icon-color.svg +6 -0
- package/plugins/mimo/icon-color.svg +4 -0
- package/plugins/mimo/icon.svg +4 -1
- package/plugins/mistral/plugin.js +164 -27
- package/plugins/moonshot/icon-color.svg +1 -0
- package/plugins/munito/LICENSE +21 -0
- package/plugins/munito/icon.svg +7 -0
- package/plugins/munito/plugin.js +171 -0
- package/plugins/munito/plugin.json +24 -0
- package/plugins/muse/LICENSE +21 -0
- package/plugins/muse/icon.svg +3 -0
- package/plugins/muse/plugin.js +288 -0
- package/plugins/muse/plugin.json +34 -0
- package/plugins/museai/LICENSE +21 -0
- package/plugins/museai/icon.svg +3 -0
- package/plugins/museai/plugin.js +161 -0
- package/plugins/museai/plugin.json +26 -0
- package/plugins/nous/LICENSE +21 -0
- package/plugins/nous/icon-color.svg +1 -0
- package/plugins/nous/icon.svg +1 -0
- package/plugins/nous/plugin.js +129 -0
- package/plugins/nous/plugin.json +32 -0
- package/plugins/ollama/icon-color.svg +1 -0
- package/plugins/ollama/plugin.js +58 -0
- package/plugins/openai-api/icon-color.svg +1 -0
- package/plugins/opencode/icon-color.svg +1 -0
- package/plugins/opencode-go/icon-color.svg +1 -0
- package/plugins/opencode-go/plugin.js +104 -37
- package/plugins/opendesign/LICENSE +21 -0
- package/plugins/opendesign/icon.svg +4 -0
- package/plugins/opendesign/plugin.js +108 -0
- package/plugins/opendesign/plugin.json +25 -0
- package/plugins/openrouter/icon-color.svg +1 -0
- package/plugins/parallel/LICENSE +21 -0
- package/plugins/parallel/icon.svg +11 -0
- package/plugins/parallel/plugin.js +97 -0
- package/plugins/parallel/plugin.json +25 -0
- package/plugins/perplexity/LICENSE +22 -0
- package/plugins/perplexity/plugin.js +122 -0
- package/plugins/perplexity/plugin.json +36 -7
- package/plugins/pi/plugin.js +113 -0
- package/plugins/pi/plugin.json +11 -0
- package/plugins/qwencloud/LICENSE +21 -0
- package/plugins/qwencloud/icon-color.svg +1 -0
- package/plugins/qwencloud/icon.svg +1 -4
- package/plugins/qwencloud/plugin.js +197 -0
- package/plugins/qwencloud/plugin.json +17 -0
- package/plugins/raycast/LICENSE +21 -0
- package/plugins/raycast/icon.svg +4 -0
- package/plugins/raycast/plugin.js +179 -0
- package/plugins/raycast/plugin.json +32 -0
- package/plugins/replicate/LICENSE +21 -0
- package/plugins/replicate/icon-color.svg +1 -0
- package/plugins/replicate/icon.svg +1 -0
- package/plugins/replicate/plugin.js +170 -0
- package/plugins/replicate/plugin.json +25 -0
- package/plugins/sailresearch/LICENSE +21 -0
- package/plugins/sailresearch/icon.svg +4 -0
- package/plugins/sailresearch/plugin.js +104 -0
- package/plugins/sailresearch/plugin.json +24 -0
- package/plugins/siliconflow/LICENSE +21 -0
- package/plugins/siliconflow/icon.svg +3 -0
- package/plugins/siliconflow/plugin.js +87 -0
- package/plugins/siliconflow/plugin.json +32 -0
- package/plugins/sofya/LICENSE +21 -0
- package/plugins/sofya/icon.svg +3 -0
- package/plugins/sofya/plugin.js +86 -0
- package/plugins/sofya/plugin.json +24 -0
- package/plugins/soniox/LICENSE +21 -0
- package/plugins/soniox/icon.svg +3 -0
- package/plugins/soniox/plugin.js +103 -0
- package/plugins/soniox/plugin.json +24 -0
- package/plugins/synthetic/icon-color.svg +14 -0
- package/plugins/synthetic/plugin.js +12 -0
- package/plugins/synthetic/plugin.json +51 -9
- package/plugins/tavily/LICENSE +21 -0
- package/plugins/tavily/icon.svg +3 -0
- package/plugins/tavily/plugin.js +61 -0
- package/plugins/tavily/plugin.json +24 -0
- package/plugins/tinyapi/LICENSE +21 -0
- package/plugins/tinyapi/icon.svg +4 -0
- package/plugins/tinyapi/plugin.js +73 -0
- package/plugins/tinyapi/plugin.json +25 -0
- package/plugins/traecn/LICENSE +21 -0
- package/plugins/traecn/icon.svg +3 -0
- package/plugins/traecn/plugin.js +103 -0
- package/plugins/traecn/plugin.json +25 -0
- package/plugins/tripo/LICENSE +21 -0
- package/plugins/tripo/icon.svg +4 -0
- package/plugins/tripo/plugin.js +60 -0
- package/plugins/tripo/plugin.json +24 -0
- package/plugins/typesafe/LICENSE +21 -0
- package/plugins/typesafe/icon.svg +4 -0
- package/plugins/typesafe/plugin.js +181 -0
- package/plugins/typesafe/plugin.json +25 -0
- package/plugins/v0/LICENSE +21 -0
- package/plugins/v0/icon-color.svg +1 -0
- package/plugins/v0/icon.svg +1 -0
- package/plugins/v0/plugin.js +219 -0
- package/plugins/v0/plugin.json +32 -0
- package/plugins/venice/plugin.js +50 -1
- package/plugins/venice/plugin.json +2 -1
- package/plugins/vercel/LICENSE +21 -0
- package/plugins/vercel/icon-color.svg +1 -0
- package/plugins/vercel/icon.svg +1 -0
- package/plugins/vercel/plugin.js +202 -0
- package/plugins/vercel/plugin.json +54 -0
- package/plugins/windsurf/icon-color.svg +1 -0
- package/plugins/workbuddy/LICENSE +21 -0
- package/plugins/workbuddy/icon.svg +1 -0
- package/plugins/workbuddy/plugin.js +318 -0
- package/plugins/workbuddy/plugin.json +63 -0
- package/plugins/xai/icon-color.svg +1 -0
- package/plugins/xai/icon.svg +1 -7
- package/plugins/xai/plugin.js +9 -0
- package/plugins/xapi/LICENSE +21 -0
- package/plugins/xapi/icon.svg +1 -0
- package/plugins/xapi/plugin.js +90 -0
- package/plugins/xapi/plugin.json +25 -0
- package/plugins/xkiro/LICENSE +21 -0
- package/plugins/xkiro/icon.svg +1 -0
- package/plugins/xkiro/plugin.js +104 -0
- package/plugins/xkiro/plugin.json +24 -0
- package/plugins/zai/icon-color.svg +1 -0
- package/plugins/zai/plugin.js +5 -1
- package/plugins/zenmux/icon-color.svg +1 -0
- package/plugins/zenmux/icon.svg +1 -3
- package/usagestat +0 -0
- package/usagestatd +0 -0
- package/plugins/cursor-nightly/plugin.js +0 -1416
|
@@ -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>Qwen</title><path d="M12.604 1.34c.393.69.784 1.382 1.174 2.075a.18.18 0 00.157.091h5.552c.174 0 .322.11.446.327l1.454 2.57c.19.337.24.478.024.837-.26.43-.513.864-.76 1.3l-.367.658c-.106.196-.223.28-.04.512l2.652 4.637c.172.301.111.494-.043.77-.437.785-.882 1.564-1.335 2.34-.159.272-.352.375-.68.37-.777-.016-1.552-.01-2.327.016a.099.099 0 00-.081.05 575.097 575.097 0 01-2.705 4.74c-.169.293-.38.363-.725.364-.997.003-2.002.004-3.017.002a.537.537 0 01-.465-.271l-1.335-2.323a.09.09 0 00-.083-.049H4.982c-.285.03-.553-.001-.805-.092l-1.603-2.77a.543.543 0 01-.002-.54l1.207-2.12a.198.198 0 000-.197 550.951 550.951 0 01-1.875-3.272l-.79-1.395c-.16-.31-.173-.496.095-.965.465-.813.927-1.625 1.387-2.436.132-.234.304-.334.584-.335a338.3 338.3 0 012.589-.001.124.124 0 00.107-.063l2.806-4.895a.488.488 0 01.422-.246c.524-.001 1.053 0 1.583-.006L11.704 1c.341-.003.724.032.9.34zm-3.432.403a.06.06 0 00-.052.03L6.254 6.788a.157.157 0 01-.135.078H3.253c-.056 0-.07.025-.041.074l5.81 10.156c.025.042.013.062-.034.063l-2.795.015a.218.218 0 00-.2.116l-1.32 2.31c-.044.078-.021.118.068.118l5.716.008c.046 0 .08.02.104.061l1.403 2.454c.046.081.092.082.139 0l5.006-8.76.783-1.382a.055.055 0 01.096 0l1.424 2.53a.122.122 0 00.107.062l2.763-.02a.04.04 0 00.035-.02.041.041 0 000-.04l-2.9-5.086a.108.108 0 010-.113l.293-.507 1.12-1.977c.024-.041.012-.062-.035-.062H9.2c-.059 0-.073-.026-.043-.077l1.434-2.505a.107.107 0 000-.114L9.225 1.774a.06.06 0 00-.053-.031zm6.29 8.02c.046 0 .058.02.034.06l-.832 1.465-2.613 4.585a.056.056 0 01-.05.029.058.058 0 01-.05-.029L8.498 9.841c-.02-.034-.01-.052.028-.054l.216-.012 6.722-.012z" fill="url(#lobe-icons-qwen-_R_0_)" fill-rule="nonzero"></path><defs><linearGradient id="lobe-icons-qwen-_R_0_" x1="0%" x2="100%" y1="0%" y2="0%"><stop offset="0%" stop-color="#6336E7" stop-opacity=".84"></stop><stop offset="100%" stop-color="#6F69F7" stop-opacity=".84"></stop></linearGradient></defs></svg>
|
|
@@ -1,4 +1 @@
|
|
|
1
|
-
<svg
|
|
2
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M100 12L120.5 47.5H161.5L141 83L161.5 118.5H120.5L100 154L79.5 118.5H38.5L59 83L38.5 47.5H79.5L100 12ZM100 58L113 83L100 108L87 83L100 58Z" fill="#111111"/>
|
|
3
|
-
<path d="M100 158C100 158 138 162 138 176C138 184 128 188 100 188C72 188 62 184 62 176C62 162 100 158 100 158Z" fill="#111111"/>
|
|
4
|
-
</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>Qwen</title><path d="M12.604 1.34c.393.69.784 1.382 1.174 2.075a.18.18 0 00.157.091h5.552c.174 0 .322.11.446.327l1.454 2.57c.19.337.24.478.024.837-.26.43-.513.864-.76 1.3l-.367.658c-.106.196-.223.28-.04.512l2.652 4.637c.172.301.111.494-.043.77-.437.785-.882 1.564-1.335 2.34-.159.272-.352.375-.68.37-.777-.016-1.552-.01-2.327.016a.099.099 0 00-.081.05 575.097 575.097 0 01-2.705 4.74c-.169.293-.38.363-.725.364-.997.003-2.002.004-3.017.002a.537.537 0 01-.465-.271l-1.335-2.323a.09.09 0 00-.083-.049H4.982c-.285.03-.553-.001-.805-.092l-1.603-2.77a.543.543 0 01-.002-.54l1.207-2.12a.198.198 0 000-.197 550.951 550.951 0 01-1.875-3.272l-.79-1.395c-.16-.31-.173-.496.095-.965.465-.813.927-1.625 1.387-2.436.132-.234.304-.334.584-.335a338.3 338.3 0 012.589-.001.124.124 0 00.107-.063l2.806-4.895a.488.488 0 01.422-.246c.524-.001 1.053 0 1.583-.006L11.704 1c.341-.003.724.032.9.34zm-3.432.403a.06.06 0 00-.052.03L6.254 6.788a.157.157 0 01-.135.078H3.253c-.056 0-.07.025-.041.074l5.81 10.156c.025.042.013.062-.034.063l-2.795.015a.218.218 0 00-.2.116l-1.32 2.31c-.044.078-.021.118.068.118l5.716.008c.046 0 .08.02.104.061l1.403 2.454c.046.081.092.082.139 0l5.006-8.76.783-1.382a.055.055 0 01.096 0l1.424 2.53a.122.122 0 00.107.062l2.763-.02a.04.04 0 00.035-.02.041.041 0 000-.04l-2.9-5.086a.108.108 0 010-.113l.293-.507 1.12-1.977c.024-.041.012-.062-.035-.062H9.2c-.059 0-.073-.026-.043-.077l1.434-2.505a.107.107 0 000-.114L9.225 1.774a.06.06 0 00-.053-.031zm6.29 8.02c.046 0 .058.02.034.06l-.832 1.465-2.613 4.585a.056.056 0 01-.05.029.058.058 0 01-.05-.029L8.498 9.841c-.02-.034-.01-.052.028-.054l.216-.012 6.722-.012z"></path></svg>
|
|
@@ -1,3 +1,191 @@
|
|
|
1
|
+
// Generated by tools/vendor-codexbar-providers.cjs from individual.js and reviewed upstream; see LICENSE.
|
|
2
|
+
(function() { let team;
|
|
3
|
+
(function(defineProvider) {
|
|
4
|
+
// BEGIN UPSTREAM Sources/CodexBarCore/Resources/Plugins/qwencloud-team.js
|
|
5
|
+
function _nullishCoalesce(lhs, rhsFn) {
|
|
6
|
+
if (lhs != null) {
|
|
7
|
+
return lhs;
|
|
8
|
+
} else {
|
|
9
|
+
return rhsFn();
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
function _optionalChain(ops) {
|
|
13
|
+
let lastAccessLHS = undefined;
|
|
14
|
+
let value = ops[0];
|
|
15
|
+
let i = 1;
|
|
16
|
+
while (i < ops.length) {
|
|
17
|
+
const op = ops[i];
|
|
18
|
+
const fn = ops[i + 1];
|
|
19
|
+
i += 2;
|
|
20
|
+
if ((op === "optionalAccess" || op === "optionalCall") && value == null) {
|
|
21
|
+
return undefined;
|
|
22
|
+
}
|
|
23
|
+
if (op === "access" || op === "optionalAccess") {
|
|
24
|
+
lastAccessLHS = value;
|
|
25
|
+
value = fn(value);
|
|
26
|
+
} else if (op === "call" || op === "optionalCall") {
|
|
27
|
+
value = fn((...args) => value.call(lastAccessLHS, ...args));
|
|
28
|
+
lastAccessLHS = undefined;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return value;
|
|
32
|
+
}
|
|
33
|
+
defineProvider({
|
|
34
|
+
id: "qwencloud",
|
|
35
|
+
name: "Qwen Cloud",
|
|
36
|
+
endpoints: ["https://home.qwencloud.com"],
|
|
37
|
+
settings: [],
|
|
38
|
+
capabilities: ["browser-cookies", "http-status"],
|
|
39
|
+
cookieDomains: ["home.qwencloud.com"],
|
|
40
|
+
cookiePolicy: { selection: "request-url", cache: "nonpersistent" },
|
|
41
|
+
async fetchUsage(ctx) {
|
|
42
|
+
const base = "https://home.qwencloud.com";
|
|
43
|
+
const fail = (field) => {
|
|
44
|
+
throw ctx.fail.parseFailure(`Unsupported Qwen Cloud Team ${field}. Check Usage Dashboard.`);
|
|
45
|
+
};
|
|
46
|
+
const record = (value) =>
|
|
47
|
+
value !== null && typeof value === "object" && !Array.isArray(value) ? value : undefined;
|
|
48
|
+
const number = (value) => {
|
|
49
|
+
if (typeof value !== "number" && (typeof value !== "string" || !/^\d+(?:\.\d+)?$/.test(value)))
|
|
50
|
+
return fail("credit count");
|
|
51
|
+
const parsed = Number(value);
|
|
52
|
+
return Number.isFinite(parsed) && parsed >= 0 && parsed <= Number.MAX_SAFE_INTEGER
|
|
53
|
+
? parsed
|
|
54
|
+
: fail("credit count");
|
|
55
|
+
};
|
|
56
|
+
const json = (response) => {
|
|
57
|
+
if (response.status === 401 || response.status === 403)
|
|
58
|
+
throw ctx.fail.authenticationExpired("Qwen Cloud Team session expired. Sign in again.");
|
|
59
|
+
if (response.status === 429) throw ctx.fail.rateLimited("Qwen Cloud Team rate limit reached.");
|
|
60
|
+
if (response.status !== 200) throw ctx.fail.apiFailure(`Qwen Cloud Team returned HTTP ${response.status}.`);
|
|
61
|
+
let payload;
|
|
62
|
+
try {
|
|
63
|
+
payload = JSON.parse(response.bodyText);
|
|
64
|
+
} catch (error) {
|
|
65
|
+
void error;
|
|
66
|
+
return fail("response");
|
|
67
|
+
}
|
|
68
|
+
const root = _nullishCoalesce(record(payload), () => fail("response"));
|
|
69
|
+
if (
|
|
70
|
+
typeof root.code === "string" &&
|
|
71
|
+
["ConsoleNeedLogin", "BailianGateway.Login.NotLogined", "NO_LOGIN"].includes(root.code)
|
|
72
|
+
)
|
|
73
|
+
throw ctx.fail.authenticationExpired("Qwen Cloud Team login required.");
|
|
74
|
+
return root;
|
|
75
|
+
};
|
|
76
|
+
for await (const session of ctx.browser.sessions("home.qwencloud.com")) {
|
|
77
|
+
const options = {
|
|
78
|
+
cookieSession: session.id,
|
|
79
|
+
timeoutSeconds: 8,
|
|
80
|
+
headers: { Accept: "application/json", Referer: `${base}/analytics/token-plan/team` },
|
|
81
|
+
};
|
|
82
|
+
const info = json(await ctx.http.get(`${base}/tool/user/info.json`, options));
|
|
83
|
+
const token = _optionalChain([record, "call", (_) => _(info.data), "optionalAccess", (_2) => _2.secToken]);
|
|
84
|
+
if (typeof token !== "string" || !token.trim())
|
|
85
|
+
throw ctx.fail.authenticationExpired("Qwen Cloud Team login required.");
|
|
86
|
+
const rpc = async (product, action, params, region) => {
|
|
87
|
+
const form = {
|
|
88
|
+
product,
|
|
89
|
+
action,
|
|
90
|
+
sec_token: token,
|
|
91
|
+
region,
|
|
92
|
+
params: JSON.stringify(params),
|
|
93
|
+
};
|
|
94
|
+
if (action === "GetSeatSubscriptionSummary") form.language = "zh-CN";
|
|
95
|
+
const root = json(
|
|
96
|
+
await ctx.http.post(`${base}/data/api.json?product=${product}&action=${action}`, {
|
|
97
|
+
...options,
|
|
98
|
+
headers: { ...options.headers, Origin: base },
|
|
99
|
+
form,
|
|
100
|
+
}),
|
|
101
|
+
);
|
|
102
|
+
const result = record(root.data);
|
|
103
|
+
if (root.successResponse === false || _optionalChain([result, "optionalAccess", (_3) => _3.Success]) === false)
|
|
104
|
+
throw ctx.fail.apiFailure(`Qwen Cloud Team ${action} failed.`);
|
|
105
|
+
if ((root.successResponse !== true && root.code !== "200") || !result) return fail("gateway envelope");
|
|
106
|
+
return result;
|
|
107
|
+
};
|
|
108
|
+
// The console discovers this billing selector; it is not the login UID or a saved workspace ID.
|
|
109
|
+
const human = await rpc("ea-service", "LoadHumanInfo", {}, "ap-southeast-1");
|
|
110
|
+
const nbid = _optionalChain([
|
|
111
|
+
record,
|
|
112
|
+
"call",
|
|
113
|
+
(_4) =>
|
|
114
|
+
_4(_optionalChain([record, "call", (_5) => _5(human.Data), "optionalAccess", (_6) => _6.SellerInfoDto])),
|
|
115
|
+
"optionalAccess",
|
|
116
|
+
(_7) => _7.Nbid,
|
|
117
|
+
]);
|
|
118
|
+
const params = { productCode: "sfm_tokenplanteams_dp_intl" };
|
|
119
|
+
if (nbid !== undefined && nbid !== null && nbid !== "") {
|
|
120
|
+
if (typeof nbid !== "string" || !nbid.trim()) return fail("billing selector");
|
|
121
|
+
params.Nbid = nbid;
|
|
122
|
+
}
|
|
123
|
+
const summary = await rpc("BssOpenAPI-V3", "GetSeatSubscriptionSummary", params, "cn-hangzhou");
|
|
124
|
+
const data = _nullishCoalesce(record(summary.Data === null ? {} : summary.Data), () => fail("subscription"));
|
|
125
|
+
if (Object.keys(data).length === 0) return { empty: true };
|
|
126
|
+
const groups = data.SubscriptionGroupList;
|
|
127
|
+
if (!Array.isArray(groups)) return fail("subscription groups");
|
|
128
|
+
if (!groups.length) return { empty: true };
|
|
129
|
+
const start = number(data.StartTime);
|
|
130
|
+
const end = number(data.EndTime);
|
|
131
|
+
if (!Number.isSafeInteger(start) || !Number.isSafeInteger(end) || start <= 0 || end <= start)
|
|
132
|
+
return fail("subscription period");
|
|
133
|
+
const now = ctx.date.now().getTime();
|
|
134
|
+
if (now < start || now >= end) return { empty: true };
|
|
135
|
+
if (data.ProductCode !== "sfm_tokenplanteams_dp_intl") return fail("subscription product");
|
|
136
|
+
if (groups.length !== 1) return fail("multiple credit pools");
|
|
137
|
+
const group = _nullishCoalesce(record(groups[0]), () => fail("subscription group"));
|
|
138
|
+
if (!Array.isArray(group.EquityList)) return fail("credit equity");
|
|
139
|
+
const equities = group.EquityList.map(record).filter(
|
|
140
|
+
(equity) => _optionalChain([equity, "optionalAccess", (_8) => _8.EquityCode]) === "credit_value",
|
|
141
|
+
);
|
|
142
|
+
if (equities.length !== 1) return fail("credit equity");
|
|
143
|
+
const total = number(
|
|
144
|
+
_optionalChain([equities, "access", (_9) => _9[0], "optionalAccess", (_10) => _10.TotalValue]),
|
|
145
|
+
);
|
|
146
|
+
const remaining = number(
|
|
147
|
+
_optionalChain([equities, "access", (_11) => _11[0], "optionalAccess", (_12) => _12.SurplusValue]),
|
|
148
|
+
);
|
|
149
|
+
if (total <= 0 || remaining > total) return fail("credit count");
|
|
150
|
+
const used = total - remaining;
|
|
151
|
+
const format = (value) => ctx.format.number(value, { maximumFractionDigits: 2 });
|
|
152
|
+
const rows = [
|
|
153
|
+
{ label: "Credits", value: `${format(used)} / ${format(total)} credits used` },
|
|
154
|
+
{ label: "Remaining", value: `${format(remaining)} credits` },
|
|
155
|
+
];
|
|
156
|
+
const assigned = group.SubscriptionAssignedNumber;
|
|
157
|
+
const seats = group.SubscriptionTotalNumber;
|
|
158
|
+
if (
|
|
159
|
+
typeof assigned === "number" &&
|
|
160
|
+
typeof seats === "number" &&
|
|
161
|
+
Number.isSafeInteger(assigned) &&
|
|
162
|
+
Number.isSafeInteger(seats) &&
|
|
163
|
+
assigned >= 0 &&
|
|
164
|
+
seats >= assigned
|
|
165
|
+
)
|
|
166
|
+
rows.push({ label: "Seats", value: `${assigned} / ${seats}` });
|
|
167
|
+
let reset;
|
|
168
|
+
if (group.NextCycleFlushTime !== undefined && group.NextCycleFlushTime !== null) {
|
|
169
|
+
const millis = number(group.NextCycleFlushTime);
|
|
170
|
+
if (!Number.isSafeInteger(millis) || millis <= 0) return fail("cycle reset");
|
|
171
|
+
reset = ctx.date.unixMillis(millis);
|
|
172
|
+
}
|
|
173
|
+
const spec =
|
|
174
|
+
typeof group.SpecType === "string" && /^[a-z][a-z0-9_-]{0,39}$/.test(group.SpecType)
|
|
175
|
+
? `${group.SpecType[0].toUpperCase()}${group.SpecType.slice(1)} Team`
|
|
176
|
+
: "Team Token Plan";
|
|
177
|
+
return {
|
|
178
|
+
primary: { usedPercent: ctx.pct(used, total), resetsAt: reset, resetDescription: "Team" },
|
|
179
|
+
identity: { loginMethod: spec },
|
|
180
|
+
details: [{ title: "Team Token Plan", rows }],
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
throw ctx.fail.missingCredential("No Qwen Cloud Team session cookies available.");
|
|
184
|
+
},
|
|
185
|
+
});
|
|
186
|
+
|
|
187
|
+
// END UPSTREAM
|
|
188
|
+
})(definition => { team=globalThis.__usagestat_bundledProvider(definition,{labels:['Team credits','Additional','Additional'],autoMode:'web'}); });
|
|
1
189
|
(function () {
|
|
2
190
|
var GATEWAY_BASE_URL = "https://home.qwencloud.com";
|
|
3
191
|
var DATA_GATEWAY_BASE_URL = "https://cs-data.qwencloud.com";
|
|
@@ -52,6 +240,7 @@
|
|
|
52
240
|
}
|
|
53
241
|
|
|
54
242
|
function env(ctx, name) {
|
|
243
|
+
if (ctx.provider && ctx.provider.instanceId && ctx.provider.instanceId !== 'qwencloud') return null;
|
|
55
244
|
try {
|
|
56
245
|
return clean(ctx.host.env.get(name));
|
|
57
246
|
} catch (_) {
|
|
@@ -675,3 +864,11 @@
|
|
|
675
864
|
|
|
676
865
|
globalThis.__openusage_plugin = { id: "qwencloud", probe: probe };
|
|
677
866
|
})();
|
|
867
|
+
|
|
868
|
+
const individual=globalThis.__openusage_plugin;
|
|
869
|
+
globalThis.__usagestat_plugin = {id:"qwencloud",probe(ctx) {
|
|
870
|
+
const selected=ctx.provider?.settings?.teamTokenPlan;
|
|
871
|
+
if(selected!==undefined && typeof selected!=='boolean') throw new Error('teamTokenPlan must be a boolean.');
|
|
872
|
+
return (selected===true ? team : individual).probe(ctx);
|
|
873
|
+
}};
|
|
874
|
+
})();
|
|
@@ -25,5 +25,22 @@
|
|
|
25
25
|
"envVars": [
|
|
26
26
|
"QWEN_CLOUD_COOKIE",
|
|
27
27
|
"QWEN_CLOUD_COOKIE_HEADER"
|
|
28
|
+
],
|
|
29
|
+
"upstreamSources": [
|
|
30
|
+
{
|
|
31
|
+
"repository": "https://github.com/steipete/CodexBar",
|
|
32
|
+
"revision": "1f6da9bec44455288ddee5ef6f3617a803d8eb2a",
|
|
33
|
+
"path": "Sources/CodexBarCore/Resources/Plugins/qwencloud-team.js",
|
|
34
|
+
"sha256": "11a7e231c1705a83f29b4509102abaa656b9888f63cfc132de0a520d94ee9301",
|
|
35
|
+
"license": "MIT"
|
|
36
|
+
}
|
|
37
|
+
],
|
|
38
|
+
"setupFields": [
|
|
39
|
+
{
|
|
40
|
+
"key": "teamTokenPlan",
|
|
41
|
+
"title": "Team Token Plan",
|
|
42
|
+
"type": "boolean",
|
|
43
|
+
"description": "Read the Team subscription for this cookie; otherwise read the Individual subscription. No fallback between scopes."
|
|
44
|
+
}
|
|
28
45
|
]
|
|
29
46
|
}
|
|
@@ -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 viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<title>Raycast</title>
|
|
3
|
+
<path d="M6.004 15.492v2.504L0 11.992l1.258-1.249Zm2.504 2.504H6.004L12.008 24l1.253-1.253zm14.24-4.747L24 11.997 12.003 0 10.75 1.251 15.491 6h-2.865L9.317 2.692 8.065 3.944l2.06 2.06H8.691v9.31H18v-1.432l2.06 2.06 1.252-1.252-3.312-3.32V8.506ZM6.63 5.372 5.38 6.625l1.342 1.343 1.251-1.253Zm10.655 10.655-1.247 1.251 1.342 1.343 1.253-1.251zM3.944 8.059 2.692 9.31l3.312 3.314v-2.506zm9.936 9.937h-2.504l3.314 3.312 1.25-1.252z"/>
|
|
4
|
+
</svg>
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
// Generated by tools/vendor-codexbar-providers.cjs; see LICENSE.
|
|
2
|
+
globalThis.__usagestat_bundled_options = {"labels":["Credits","Plan","Additional"],"defaults":{},"autoMode":"web"};
|
|
3
|
+
(function(defineProvider) {
|
|
4
|
+
// BEGIN UPSTREAM Sources/CodexBarCore/Resources/Plugins/raycast.js
|
|
5
|
+
function _nullishCoalesce(lhs, rhsFn) {
|
|
6
|
+
if (lhs != null) {
|
|
7
|
+
return lhs;
|
|
8
|
+
} else {
|
|
9
|
+
return rhsFn();
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
defineProvider({
|
|
13
|
+
id: "raycast",
|
|
14
|
+
name: "Raycast",
|
|
15
|
+
endpoints: ["https://www.raycast.com"],
|
|
16
|
+
settings: [{ key: "webTimeoutSeconds", title: "Web timeout", type: "plain" }],
|
|
17
|
+
capabilities: ["browser-cookies", "http-status"],
|
|
18
|
+
cookieDomains: ["raycast.com", "www.raycast.com"],
|
|
19
|
+
async fetchUsage(ctx) {
|
|
20
|
+
const sessionCookie = (value) => {
|
|
21
|
+
const match = /(?:^|;\s*)__raycast_session=([^;]*)/.exec(value);
|
|
22
|
+
return !!match && match[1].trim().length > 0;
|
|
23
|
+
};
|
|
24
|
+
const missingSession = () => {
|
|
25
|
+
throw ctx.fail.missingCredential(
|
|
26
|
+
"No Raycast session cookies found. Sign in at www.raycast.com/settings or paste a Cookie header.",
|
|
27
|
+
);
|
|
28
|
+
};
|
|
29
|
+
const domain = "www.raycast.com";
|
|
30
|
+
const policy = ctx.browser.availability(domain);
|
|
31
|
+
if (policy === "off") throw ctx.fail.missingCredential("Raycast cookies are disabled.");
|
|
32
|
+
const timeoutRaw = Number(_nullishCoalesce(ctx.settings.get("webTimeoutSeconds"), () => "15"));
|
|
33
|
+
const timeoutSeconds = Number.isFinite(timeoutRaw) ? Math.min(30, Math.max(1, Math.round(timeoutRaw))) : 15;
|
|
34
|
+
let response;
|
|
35
|
+
let rejected = false;
|
|
36
|
+
for await (const session of ctx.browser.sessions(domain)) {
|
|
37
|
+
const cookie = _nullishCoalesce(session.header, () => "")
|
|
38
|
+
.split(";")
|
|
39
|
+
.map((part) => part.trim())
|
|
40
|
+
.filter((part) => /^(?:__raycast_session|csrf_token)=/.test(part))
|
|
41
|
+
.join("; ");
|
|
42
|
+
if (!sessionCookie(cookie)) {
|
|
43
|
+
ctx.browser.rejectCookie(domain, session);
|
|
44
|
+
if (policy === "manual") break;
|
|
45
|
+
continue;
|
|
46
|
+
}
|
|
47
|
+
const candidate = await ctx.http.get("https://www.raycast.com/frontend_api/current_user/ai_credits", {
|
|
48
|
+
timeoutSeconds,
|
|
49
|
+
headers: {
|
|
50
|
+
Cookie: cookie,
|
|
51
|
+
Accept: "application/json",
|
|
52
|
+
Origin: "https://www.raycast.com",
|
|
53
|
+
Referer: "https://www.raycast.com/settings",
|
|
54
|
+
"User-Agent":
|
|
55
|
+
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36",
|
|
56
|
+
},
|
|
57
|
+
});
|
|
58
|
+
if (candidate.status === 401) {
|
|
59
|
+
rejected = true;
|
|
60
|
+
ctx.browser.rejectCookie(domain, session);
|
|
61
|
+
if (policy === "manual") break;
|
|
62
|
+
continue;
|
|
63
|
+
}
|
|
64
|
+
response = candidate;
|
|
65
|
+
break;
|
|
66
|
+
}
|
|
67
|
+
if (!response) {
|
|
68
|
+
if (rejected)
|
|
69
|
+
throw ctx.fail.authenticationExpired(
|
|
70
|
+
"Raycast website session expired. Sign in at www.raycast.com/settings or paste a fresh Cookie header.",
|
|
71
|
+
);
|
|
72
|
+
return missingSession();
|
|
73
|
+
}
|
|
74
|
+
if (response.status === 403) {
|
|
75
|
+
throw ctx.fail.permissionDenied("Raycast denied access to AI credits for this account.");
|
|
76
|
+
}
|
|
77
|
+
if (response.status === 429) throw ctx.fail.rateLimited("Raycast credits requests are rate limited.");
|
|
78
|
+
if (response.status >= 500) {
|
|
79
|
+
throw ctx.fail.providerUnavailable(`Raycast credits API returned HTTP ${response.status}.`);
|
|
80
|
+
}
|
|
81
|
+
if (response.status !== 200) {
|
|
82
|
+
throw ctx.fail.apiFailure(`Raycast credits API returned HTTP ${response.status}.`);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
const fail = (field) => {
|
|
86
|
+
throw ctx.fail.parseFailure(`Invalid Raycast credits response: ${field}`);
|
|
87
|
+
};
|
|
88
|
+
const object = (value, field) => {
|
|
89
|
+
if (value === undefined || value === null) return {};
|
|
90
|
+
if (typeof value !== "object" || Array.isArray(value)) return fail(field);
|
|
91
|
+
return value;
|
|
92
|
+
};
|
|
93
|
+
const number = (value, field) => {
|
|
94
|
+
if (value === undefined || value === null) return undefined;
|
|
95
|
+
if (typeof value === "boolean") return fail(field);
|
|
96
|
+
if (typeof value === "number") {
|
|
97
|
+
return Number.isFinite(value) ? value : fail(field);
|
|
98
|
+
}
|
|
99
|
+
if (typeof value !== "string") return fail(field);
|
|
100
|
+
const trimmed = value.trim();
|
|
101
|
+
if (trimmed === "") return fail(field);
|
|
102
|
+
if (!/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?$/.test(trimmed)) return fail(field);
|
|
103
|
+
const parsed = Number(trimmed);
|
|
104
|
+
return Number.isFinite(parsed) ? parsed : fail(field);
|
|
105
|
+
};
|
|
106
|
+
const text = (value) => (typeof value === "string" ? value.trim() || undefined : undefined);
|
|
107
|
+
// No thousands grouping. The meter footnote is this text, and a grouped number would not match the source amount.
|
|
108
|
+
const amount = (value) => {
|
|
109
|
+
if (Number.isInteger(value)) return String(value);
|
|
110
|
+
let text = value.toFixed(2);
|
|
111
|
+
while (text.endsWith("0")) text = text.slice(0, -1);
|
|
112
|
+
if (text.endsWith(".")) text = text.slice(0, -1);
|
|
113
|
+
return text;
|
|
114
|
+
};
|
|
115
|
+
const planLabel = (tier) => {
|
|
116
|
+
switch (tier) {
|
|
117
|
+
case "pro":
|
|
118
|
+
return "Pro";
|
|
119
|
+
case "pro_plus":
|
|
120
|
+
return "Pro+";
|
|
121
|
+
case "max":
|
|
122
|
+
return "Max";
|
|
123
|
+
default:
|
|
124
|
+
return tier;
|
|
125
|
+
}
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
let decoded;
|
|
129
|
+
try {
|
|
130
|
+
decoded = JSON.parse(response.bodyText);
|
|
131
|
+
} catch (error) {
|
|
132
|
+
void error;
|
|
133
|
+
return fail("expected JSON");
|
|
134
|
+
}
|
|
135
|
+
const root = object(decoded, "expected an object");
|
|
136
|
+
const remaining = number(root.remaining_balance_credits, "remaining_balance_credits");
|
|
137
|
+
const total = number(root.total_balance_credits, "total_balance_credits");
|
|
138
|
+
if (remaining === undefined && total === undefined) return fail("no credit amounts");
|
|
139
|
+
if (remaining !== undefined && remaining < 0) return fail("remaining_balance_credits");
|
|
140
|
+
if (total !== undefined && total < 0) return fail("total_balance_credits");
|
|
141
|
+
|
|
142
|
+
let renewal;
|
|
143
|
+
if (root.next_credits_at !== undefined && root.next_credits_at !== null) {
|
|
144
|
+
if (typeof root.next_credits_at !== "string") return fail("next_credits_at");
|
|
145
|
+
try {
|
|
146
|
+
renewal = ctx.date.iso(root.next_credits_at);
|
|
147
|
+
} catch (error) {
|
|
148
|
+
void error;
|
|
149
|
+
return fail("next_credits_at");
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
const funding = object(root.funding_subscription, "funding_subscription");
|
|
153
|
+
const plan = planLabel(text(funding.tier));
|
|
154
|
+
const rows = [];
|
|
155
|
+
if (remaining !== undefined) rows.push({ label: "Left", value: amount(remaining) });
|
|
156
|
+
if (total !== undefined) rows.push({ label: "Total", value: amount(total) });
|
|
157
|
+
// A positive total is one Credits meter. The balance lives in resetDescription, which the shared
|
|
158
|
+
// card already prints under the bar. Left and Total rows stay only when that meter is absent,
|
|
159
|
+
// so a zero allowance still has something to show.
|
|
160
|
+
const meter = remaining !== undefined && total !== undefined && total > 0 ? { remaining, total } : undefined;
|
|
161
|
+
|
|
162
|
+
return {
|
|
163
|
+
primary: meter
|
|
164
|
+
? {
|
|
165
|
+
usedPercent: ctx.pct(Math.max(0, meter.total - meter.remaining), meter.total),
|
|
166
|
+
resetsAt: renewal,
|
|
167
|
+
resetDescription: `${amount(meter.remaining)} / ${amount(meter.total)} credits left`,
|
|
168
|
+
}
|
|
169
|
+
: undefined,
|
|
170
|
+
details: meter || !rows.length ? undefined : [{ title: "Credits", rows }],
|
|
171
|
+
subscriptionRenewsAt: meter ? undefined : renewal,
|
|
172
|
+
identity: plan ? { loginMethod: plan } : undefined,
|
|
173
|
+
dataConfidence: "exact",
|
|
174
|
+
};
|
|
175
|
+
},
|
|
176
|
+
});
|
|
177
|
+
|
|
178
|
+
// END UPSTREAM
|
|
179
|
+
})(globalThis.defineProvider);
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"id": "raycast",
|
|
4
|
+
"name": "Raycast",
|
|
5
|
+
"version": "0.1.0",
|
|
6
|
+
"entry": "plugin.js",
|
|
7
|
+
"enabledByDefault": false,
|
|
8
|
+
"supportedModes": [
|
|
9
|
+
"web"
|
|
10
|
+
],
|
|
11
|
+
"autoMode": "web",
|
|
12
|
+
"usageDashboardUrl": "https://www.raycast.com/settings",
|
|
13
|
+
"webUrl": "https://raycast.com",
|
|
14
|
+
"envVars": [
|
|
15
|
+
"RAYCAST_COOKIE"
|
|
16
|
+
],
|
|
17
|
+
"setupFields": [
|
|
18
|
+
{
|
|
19
|
+
"key": "webTimeoutSeconds",
|
|
20
|
+
"title": "Web timeout",
|
|
21
|
+
"type": "string",
|
|
22
|
+
"description": "Provider-specific account or source selection."
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
"upstream": {
|
|
26
|
+
"repository": "https://github.com/steipete/CodexBar",
|
|
27
|
+
"revision": "1f6da9bec44455288ddee5ef6f3617a803d8eb2a",
|
|
28
|
+
"path": "Sources/CodexBarCore/Resources/Plugins/raycast.js",
|
|
29
|
+
"sha256": "df8f6d185cb67fd9ec9b622d2321a6d4e5395576b9ab54b1725aac272c95ecb7",
|
|
30
|
+
"license": "MIT"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -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 @@
|
|
|
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>Replicate</title><path d="M22 10.552v2.26h-7.932V22H11.54V10.552H22zM22 2v2.264H4.528V22H2V2h20zm0 4.276V8.54H9.296V22H6.768V6.276H22z"></path></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>Replicate</title><path d="M22 10.552v2.26h-7.932V22H11.54V10.552H22zM22 2v2.264H4.528V22H2V2h20zm0 4.276V8.54H9.296V22H6.768V6.276H22z"></path></svg>
|