@hashimkarim/usagestat-linux-x64-gnu 2.0.0-alpha.1 → 2.0.0-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +0 -0
- package/native-manifest.json +1088 -134
- package/package.json +160 -1
- package/plugins/UPSTREAM-LICENSES.md +113 -0
- 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/abacus-ai/icon.svg +0 -0
- package/plugins/abacus-ai/plugin.js +0 -0
- package/plugins/abacus-ai/plugin.json +0 -0
- package/plugins/aiand/icon.svg +6 -0
- package/plugins/aiand/plugin.js +108 -0
- package/plugins/aiand/plugin.json +22 -0
- package/plugins/aixy/LICENSE +21 -0
- package/plugins/aixy/plugin.js +261 -0
- package/plugins/aixy/plugin.json +24 -0
- package/plugins/alibaba/icon-color.svg +0 -0
- package/plugins/alibaba/icon.svg +0 -0
- package/plugins/alibaba/plugin.js +0 -0
- package/plugins/alibaba/plugin.json +0 -0
- package/plugins/alibaba-token-plan/icon-color.svg +0 -0
- package/plugins/alibaba-token-plan/icon.svg +0 -0
- package/plugins/alibaba-token-plan/plugin.js +0 -0
- package/plugins/alibaba-token-plan/plugin.json +0 -0
- package/plugins/amp/icon-color.svg +0 -0
- package/plugins/amp/icon-conflict.svg +0 -0
- package/plugins/amp/icon.svg +0 -0
- package/plugins/amp/plugin.js +0 -0
- package/plugins/amp/plugin.json +0 -0
- package/plugins/antigravity/icon-color.svg +0 -0
- package/plugins/antigravity/icon-conflict.svg +0 -0
- package/plugins/antigravity/icon.svg +0 -0
- package/plugins/antigravity/plugin.js +136 -46
- package/plugins/antigravity/plugin.json +0 -0
- package/plugins/antigravity-cli/icon-color.svg +1 -0
- package/plugins/antigravity-cli/icon.svg +1 -3
- package/plugins/antigravity-cli/plugin.js +11 -15
- package/plugins/antigravity-cli/plugin.json +0 -0
- package/plugins/antigravity-ide/icon-color.svg +1 -0
- package/plugins/antigravity-ide/icon.svg +1 -3
- package/plugins/antigravity-ide/plugin.js +0 -0
- package/plugins/antigravity-ide/plugin.json +0 -0
- 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 +49 -0
- package/plugins/atlascloud/plugin.json +23 -0
- package/plugins/augment/icon-color.svg +14 -0
- package/plugins/augment/icon.svg +0 -0
- package/plugins/augment/plugin.js +0 -0
- package/plugins/augment/plugin.json +0 -0
- package/plugins/aws-bedrock/icon-color.svg +0 -0
- package/plugins/aws-bedrock/icon.svg +0 -0
- package/plugins/aws-bedrock/plugin.js +0 -0
- package/plugins/aws-bedrock/plugin.json +0 -0
- package/plugins/azure-openai/icon-color.svg +0 -0
- package/plugins/azure-openai/icon.svg +0 -0
- package/plugins/azure-openai/plugin.js +0 -0
- package/plugins/azure-openai/plugin.json +0 -0
- package/plugins/bifrost/LICENSE +21 -0
- package/plugins/bifrost/plugin.js +361 -0
- package/plugins/bifrost/plugin.json +23 -0
- package/plugins/chutes/icon.svg +0 -0
- package/plugins/chutes/plugin.js +0 -0
- package/plugins/chutes/plugin.json +0 -0
- package/plugins/claude/icon-color.svg +0 -0
- package/plugins/claude/icon.svg +0 -0
- package/plugins/claude/plugin.js +358 -161
- package/plugins/claude/plugin.json +1 -1
- package/plugins/clawrouter/icon.svg +7 -0
- package/plugins/clawrouter/plugin.js +45 -0
- package/plugins/clawrouter/plugin.json +22 -0
- package/plugins/clinepass/icon.svg +4 -0
- package/plugins/clinepass/plugin.js +87 -0
- package/plugins/clinepass/plugin.json +23 -0
- package/plugins/codebuddy/plugin.js +331 -0
- package/plugins/codebuddy/plugin.json +30 -0
- package/plugins/codebuff/icon-color.svg +92 -0
- package/plugins/codebuff/icon.svg +0 -0
- package/plugins/codebuff/plugin.js +0 -0
- package/plugins/codebuff/plugin.json +0 -0
- package/plugins/coderabbit/plugin.js +25 -0
- package/plugins/coderabbit/plugin.json +12 -0
- package/plugins/codex/icon-color.svg +0 -0
- package/plugins/codex/icon.svg +0 -0
- package/plugins/codex/plugin.js +8 -2
- package/plugins/codex/plugin.json +0 -0
- package/plugins/command-code/icon-color.svg +3 -0
- package/plugins/command-code/icon.svg +0 -0
- package/plugins/command-code/plugin.js +14 -3
- package/plugins/command-code/plugin.json +0 -0
- package/plugins/copilot/icon-color.svg +0 -0
- package/plugins/copilot/icon.svg +1 -1
- package/plugins/copilot/plugin.js +61 -9
- package/plugins/copilot/plugin.json +4 -1
- package/plugins/crof/icon-color.svg +3 -0
- package/plugins/crof/icon.svg +0 -0
- package/plugins/crof/plugin.js +0 -0
- package/plugins/crof/plugin.json +0 -0
- package/plugins/crofai/icon-color.svg +3 -0
- package/plugins/crofai/icon.svg +2 -15
- package/plugins/crofai/plugin.js +0 -0
- package/plugins/crofai/plugin.json +0 -0
- package/plugins/cursor/icon-color.svg +1 -0
- package/plugins/cursor/icon-conflict.svg +0 -0
- package/plugins/cursor/icon.svg +0 -0
- package/plugins/cursor/plugin.js +46 -9
- package/plugins/cursor/plugin.json +3 -2
- package/plugins/cursor-nightly/icon.png +0 -0
- package/plugins/cursor-nightly/plugin.js +45 -8
- package/plugins/cursor-nightly/plugin.json +3 -2
- package/plugins/deepgram/icon.svg +0 -0
- package/plugins/deepgram/plugin.js +0 -0
- package/plugins/deepgram/plugin.json +0 -0
- package/plugins/deepinfra/icon-color.svg +1 -0
- package/plugins/deepinfra/icon.svg +1 -0
- package/plugins/deepinfra/plugin.js +97 -0
- package/plugins/deepinfra/plugin.json +28 -0
- package/plugins/deepseek/icon-color.svg +0 -0
- package/plugins/deepseek/icon.svg +0 -0
- package/plugins/deepseek/plugin.js +150 -59
- package/plugins/deepseek/plugin.json +3 -1
- package/plugins/devin/icon.svg +0 -0
- package/plugins/devin/plugin.js +114 -0
- package/plugins/devin/plugin.json +2 -1
- package/plugins/devpass/LICENSE +21 -0
- package/plugins/devpass/plugin.js +115 -0
- package/plugins/devpass/plugin.json +23 -0
- package/plugins/doubao/icon-color.svg +0 -0
- package/plugins/doubao/icon.svg +0 -0
- package/plugins/doubao/plugin.js +0 -0
- package/plugins/doubao/plugin.json +0 -0
- package/plugins/droid/icon.svg +0 -0
- package/plugins/droid/plugin.json +2 -1
- package/plugins/elevenlabs/icon-color.svg +4 -0
- package/plugins/elevenlabs/icon.svg +0 -0
- package/plugins/elevenlabs/plugin.js +17 -2
- package/plugins/elevenlabs/plugin.json +0 -0
- package/plugins/factory/icon-color.svg +1 -0
- package/plugins/factory/icon-conflict.svg +0 -0
- package/plugins/factory/icon.svg +0 -0
- package/plugins/factory/plugin.js +38 -14
- package/plugins/factory/plugin.json +2 -1
- package/plugins/fireworks-ai/icon-color.svg +1 -0
- package/plugins/fireworks-ai/icon.svg +1 -6
- package/plugins/fireworks-ai/plugin.js +0 -0
- package/plugins/fireworks-ai/plugin.json +0 -0
- package/plugins/gemini/icon-color.svg +0 -0
- package/plugins/gemini/icon.svg +0 -0
- package/plugins/gemini/plugin.js +0 -0
- package/plugins/gemini/plugin.json +0 -0
- package/plugins/gemini-apps/LICENSE +22 -0
- package/plugins/gemini-apps/icon-color.svg +1 -0
- package/plugins/gemini-apps/icon.svg +1 -0
- package/plugins/gemini-apps/plugin.js +470 -0
- package/plugins/gemini-apps/plugin.json +19 -0
- package/plugins/gitkraken/LICENSE +21 -0
- package/plugins/gitkraken/plugin.js +153 -0
- package/plugins/gitkraken/plugin.json +24 -0
- package/plugins/grok/icon-color.svg +1 -0
- package/plugins/grok/icon.svg +0 -0
- package/plugins/grok/plugin.js +30 -5
- package/plugins/grok/plugin.json +3 -1
- package/plugins/groqcloud/icon-color.svg +1 -0
- package/plugins/groqcloud/icon.svg +0 -0
- package/plugins/groqcloud/plugin.js +0 -0
- package/plugins/groqcloud/plugin.json +0 -0
- package/plugins/helmcode/LICENSE +21 -0
- package/plugins/helmcode/plugin.js +188 -0
- package/plugins/helmcode/plugin.json +24 -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 +293 -0
- package/plugins/huggingface/plugin.json +25 -0
- package/plugins/hyper/LICENSE +21 -0
- package/plugins/hyper/plugin.js +131 -0
- package/plugins/hyper/plugin.json +26 -0
- package/plugins/ibmbob/icon.svg +23 -0
- package/plugins/ibmbob/plugin.js +61 -0
- package/plugins/ibmbob/plugin.json +22 -0
- package/plugins/jetbrains-ai-assistant/icon-color.svg +0 -0
- package/plugins/jetbrains-ai-assistant/icon-conflict.svg +0 -0
- package/plugins/jetbrains-ai-assistant/icon.svg +0 -0
- package/plugins/jetbrains-ai-assistant/plugin.js +0 -0
- package/plugins/jetbrains-ai-assistant/plugin.json +0 -0
- package/plugins/kilo/icon-color.svg +1 -0
- package/plugins/kilo/icon.svg +0 -0
- package/plugins/kilo/plugin.js +0 -0
- package/plugins/kilo/plugin.json +0 -0
- package/plugins/kimi/icon-color.svg +0 -0
- package/plugins/kimi/icon-conflict.svg +0 -0
- package/plugins/kimi/icon.svg +0 -0
- package/plugins/kimi/plugin.js +122 -141
- package/plugins/kimi/plugin.json +5 -2
- package/plugins/kimi-k2/icon-color.svg +0 -0
- package/plugins/kimi-k2/icon.svg +0 -0
- package/plugins/kimi-k2/plugin.js +0 -0
- package/plugins/kimi-k2/plugin.json +0 -0
- package/plugins/kiro/icon-color.svg +0 -0
- package/plugins/kiro/icon-conflict.svg +0 -0
- package/plugins/kiro/icon.svg +0 -0
- package/plugins/kiro/plugin.js +49 -10
- package/plugins/kiro/plugin.json +3 -1
- package/plugins/litellm/icon.svg +0 -0
- package/plugins/litellm/plugin.js +54 -3
- package/plugins/litellm/plugin.json +0 -0
- package/plugins/llm-proxy/icon.svg +0 -0
- package/plugins/llm-proxy/plugin.js +0 -0
- package/plugins/llm-proxy/plugin.json +0 -0
- package/plugins/llmman/LICENSE +21 -0
- package/plugins/llmman/plugin.js +133 -0
- package/plugins/llmman/plugin.json +23 -0
- package/plugins/longcat/icon-color.svg +1 -0
- package/plugins/longcat/icon.svg +1 -0
- package/plugins/longcat/plugin.js +182 -0
- package/plugins/longcat/plugin.json +23 -0
- package/plugins/manus/icon-color.svg +6 -0
- package/plugins/manus/icon.svg +0 -0
- package/plugins/manus/plugin.js +0 -0
- package/plugins/manus/plugin.json +0 -0
- package/plugins/mimo/icon-color.svg +4 -0
- package/plugins/mimo/icon.svg +4 -1
- package/plugins/mimo/plugin.js +0 -0
- package/plugins/mimo/plugin.json +0 -0
- package/plugins/minimax/icon-color.svg +0 -0
- package/plugins/minimax/icon-conflict.svg +0 -0
- package/plugins/minimax/icon.svg +0 -0
- package/plugins/minimax/plugin.js +25 -31
- package/plugins/minimax/plugin.json +0 -0
- package/plugins/mistral/icon-color.svg +0 -0
- package/plugins/mistral/icon.svg +0 -0
- package/plugins/mistral/plugin.js +110 -5
- package/plugins/mistral/plugin.json +0 -0
- package/plugins/moonshot/icon-color.svg +1 -0
- package/plugins/moonshot/icon.svg +0 -0
- package/plugins/moonshot/plugin.js +8 -6
- package/plugins/moonshot/plugin.json +0 -0
- package/plugins/muse/LICENSE +21 -0
- package/plugins/muse/plugin.js +319 -0
- package/plugins/muse/plugin.json +26 -0
- package/plugins/nanogpt/icon-color.svg +0 -0
- package/plugins/nanogpt/icon.svg +0 -0
- package/plugins/nanogpt/plugin.js +0 -0
- package/plugins/nanogpt/plugin.json +0 -0
- package/plugins/neuralwatt/icon.svg +0 -0
- package/plugins/neuralwatt/plugin.js +0 -0
- package/plugins/neuralwatt/plugin.json +0 -0
- package/plugins/notion/icon.svg +1 -0
- package/plugins/notion/plugin.js +282 -0
- package/plugins/notion/plugin.json +29 -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 +124 -0
- package/plugins/nous/plugin.json +24 -0
- package/plugins/ollama/icon-color.svg +1 -0
- package/plugins/ollama/icon.svg +0 -0
- package/plugins/ollama/plugin.js +257 -56
- package/plugins/ollama/plugin.json +6 -3
- package/plugins/openai-api/icon-color.svg +1 -0
- package/plugins/openai-api/icon.svg +0 -0
- package/plugins/openai-api/plugin.js +0 -0
- package/plugins/openai-api/plugin.json +0 -0
- package/plugins/opencode/icon-color.svg +1 -0
- package/plugins/opencode/icon.svg +0 -0
- package/plugins/opencode/plugin.js +0 -0
- package/plugins/opencode/plugin.json +0 -0
- package/plugins/opencode-go/icon-color.svg +1 -0
- package/plugins/opencode-go/icon-conflict.svg +0 -0
- package/plugins/opencode-go/icon.svg +0 -0
- package/plugins/opencode-go/plugin.js +103 -17
- package/plugins/opencode-go/plugin.json +5 -2
- package/plugins/openrouter/icon-color.svg +1 -0
- package/plugins/openrouter/icon.svg +0 -0
- package/plugins/openrouter/plugin.js +371 -114
- package/plugins/openrouter/plugin.json +6 -0
- package/plugins/perplexity/icon-color.svg +0 -0
- package/plugins/perplexity/icon-conflict.svg +0 -0
- package/plugins/perplexity/icon.svg +0 -0
- package/plugins/perplexity/plugin.js +0 -0
- package/plugins/perplexity/plugin.json +0 -0
- package/plugins/pi/plugin.js +113 -0
- package/plugins/pi/plugin.json +11 -0
- package/plugins/poe/icon.svg +0 -0
- package/plugins/poe/plugin.js +24 -18
- package/plugins/poe/plugin.json +2 -0
- package/plugins/qoder/icon.svg +3 -0
- package/plugins/qoder/plugin.js +227 -0
- package/plugins/qoder/plugin.json +23 -0
- package/plugins/qwencloud/icon-color.svg +1 -0
- package/plugins/qwencloud/icon.svg +1 -0
- package/plugins/qwencloud/plugin.js +677 -0
- package/plugins/qwencloud/plugin.json +29 -0
- package/plugins/raycast/LICENSE +21 -0
- package/plugins/raycast/plugin.js +174 -0
- package/plugins/raycast/plugin.json +24 -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 +165 -0
- package/plugins/replicate/plugin.json +24 -0
- package/plugins/sakana/icon.svg +5 -0
- package/plugins/sakana/plugin.js +156 -0
- package/plugins/sakana/plugin.json +23 -0
- package/plugins/stepfun/icon-color.svg +0 -0
- package/plugins/stepfun/icon.svg +0 -0
- package/plugins/stepfun/plugin.js +0 -0
- package/plugins/stepfun/plugin.json +0 -0
- package/plugins/sub2api/icon.svg +4 -0
- package/plugins/sub2api/plugin.js +191 -0
- package/plugins/sub2api/plugin.json +16 -0
- package/plugins/synthetic/icon-color.svg +14 -0
- package/plugins/synthetic/icon-conflict.svg +0 -0
- package/plugins/synthetic/icon.svg +0 -0
- package/plugins/synthetic/plugin.js +0 -0
- package/plugins/synthetic/plugin.json +0 -0
- package/plugins/t3chat/icon-color.svg +0 -0
- package/plugins/t3chat/icon.svg +0 -0
- package/plugins/t3chat/plugin.js +0 -0
- package/plugins/t3chat/plugin.json +0 -0
- package/plugins/typesafe/LICENSE +21 -0
- package/plugins/typesafe/plugin.js +225 -0
- package/plugins/typesafe/plugin.json +24 -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 +214 -0
- package/plugins/v0/plugin.json +24 -0
- package/plugins/venice/icon-color.svg +0 -0
- package/plugins/venice/icon.svg +0 -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 +55 -0
- package/plugins/vercel/plugin.json +23 -0
- package/plugins/vertex-ai/icon-color.svg +0 -0
- package/plugins/vertex-ai/icon.svg +0 -0
- package/plugins/vertex-ai/plugin.js +0 -0
- package/plugins/vertex-ai/plugin.json +0 -0
- package/plugins/warp/icon-color.svg +0 -0
- package/plugins/warp/icon.svg +0 -0
- package/plugins/warp/plugin.js +0 -0
- package/plugins/warp/plugin.json +0 -0
- package/plugins/wayfinder/icon.svg +5 -0
- package/plugins/wayfinder/plugin.js +47 -0
- package/plugins/wayfinder/plugin.json +16 -0
- package/plugins/windsurf/icon-color.svg +1 -0
- package/plugins/windsurf/icon-conflict.svg +0 -0
- package/plugins/windsurf/icon.svg +0 -0
- package/plugins/windsurf/plugin.js +0 -0
- package/plugins/windsurf/plugin.json +0 -0
- package/plugins/xai/icon-color.svg +1 -0
- package/plugins/xai/icon.svg +1 -0
- package/plugins/xai/plugin.js +162 -0
- package/plugins/xai/plugin.json +28 -0
- package/plugins/xkiro/LICENSE +21 -0
- package/plugins/xkiro/plugin.js +99 -0
- package/plugins/xkiro/plugin.json +23 -0
- package/plugins/zai/icon-color.svg +1 -0
- package/plugins/zai/icon-conflict.svg +0 -0
- package/plugins/zai/icon.svg +0 -0
- package/plugins/zai/plugin.js +111 -161
- package/plugins/zai/plugin.json +4 -1
- package/plugins/zed/icon.svg +0 -0
- package/plugins/zed/plugin.js +0 -0
- package/plugins/zed/plugin.json +0 -0
- package/plugins/zenmux/icon-color.svg +1 -0
- package/plugins/zenmux/icon.svg +1 -0
- package/plugins/zenmux/plugin.js +102 -0
- package/plugins/zenmux/plugin.json +23 -0
- package/plugins/zoommate/icon.svg +1 -0
- package/plugins/zoommate/plugin.js +244 -0
- package/plugins/zoommate/plugin.json +29 -0
- package/usagestat +0 -0
- package/usagestatd +0 -0
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
// Generated by tools/vendor-codexbar-providers.cjs; see LICENSE.
|
|
2
|
+
globalThis.__usagestat_bundled_options = {"labels":["Billing","Rate limit","Additional"],"defaults":{},"autoMode":"api"};
|
|
3
|
+
function _nullishCoalesce(lhs, rhsFn) {
|
|
4
|
+
if (lhs != null) {
|
|
5
|
+
return lhs;
|
|
6
|
+
} else {
|
|
7
|
+
return rhsFn();
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
function _optionalChain(ops) {
|
|
11
|
+
let lastAccessLHS = undefined;
|
|
12
|
+
let value = ops[0];
|
|
13
|
+
let i = 1;
|
|
14
|
+
while (i < ops.length) {
|
|
15
|
+
const op = ops[i];
|
|
16
|
+
const fn = ops[i + 1];
|
|
17
|
+
i += 2;
|
|
18
|
+
if ((op === "optionalAccess" || op === "optionalCall") && value == null) {
|
|
19
|
+
return undefined;
|
|
20
|
+
}
|
|
21
|
+
if (op === "access" || op === "optionalAccess") {
|
|
22
|
+
lastAccessLHS = value;
|
|
23
|
+
value = fn(value);
|
|
24
|
+
} else if (op === "call" || op === "optionalCall") {
|
|
25
|
+
value = fn((...args) => value.call(lastAccessLHS, ...args));
|
|
26
|
+
lastAccessLHS = undefined;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
return value;
|
|
30
|
+
}
|
|
31
|
+
const V0_API_BASE = "https://api.v0.dev/v1";
|
|
32
|
+
|
|
33
|
+
defineProvider({
|
|
34
|
+
id: "v0",
|
|
35
|
+
name: "v0",
|
|
36
|
+
endpoints: ["https://api.v0.dev"],
|
|
37
|
+
auth: { type: "bearer", secret: "V0_API_KEY" },
|
|
38
|
+
settings: [
|
|
39
|
+
{
|
|
40
|
+
key: "V0_API_KEY",
|
|
41
|
+
title: "API key",
|
|
42
|
+
subtitle: "A v0 Platform API key.",
|
|
43
|
+
type: "secure",
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
key: "V0_SCOPE",
|
|
47
|
+
title: "Scope",
|
|
48
|
+
subtitle: "Optional project ID or slug.",
|
|
49
|
+
type: "plain",
|
|
50
|
+
},
|
|
51
|
+
],
|
|
52
|
+
capabilities: ["http-status"],
|
|
53
|
+
|
|
54
|
+
async fetchUsage(ctx) {
|
|
55
|
+
const scope = _optionalChain([
|
|
56
|
+
ctx,
|
|
57
|
+
"access",
|
|
58
|
+
(_) => _.settings,
|
|
59
|
+
"access",
|
|
60
|
+
(_2) => _2.get,
|
|
61
|
+
"call",
|
|
62
|
+
(_3) => _3("V0_SCOPE"),
|
|
63
|
+
"optionalAccess",
|
|
64
|
+
(_4) => _4.trim,
|
|
65
|
+
"call",
|
|
66
|
+
(_5) => _5(),
|
|
67
|
+
]);
|
|
68
|
+
const query = scope ? `?scope=${encodeURIComponent(scope)}` : "";
|
|
69
|
+
|
|
70
|
+
function apiError(response) {
|
|
71
|
+
if (response.status === 401) throw ctx.fail.authenticationExpired("v0 API key was rejected.");
|
|
72
|
+
if (response.status === 403) throw ctx.fail.permissionDenied("v0 denied access to this scope.");
|
|
73
|
+
if (response.status === 429) {
|
|
74
|
+
const delay = Number(_nullishCoalesce(response.headers["retry-after"], () => 1));
|
|
75
|
+
throw ctx.fail.rateLimited("v0 API rate limit reached.", {
|
|
76
|
+
retryAfterSeconds: Number.isFinite(delay) && delay >= 0 ? Math.min(delay, 10) : 1,
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
if (response.status >= 500) throw ctx.fail.providerUnavailable(`v0 API returned HTTP ${response.status}.`);
|
|
80
|
+
throw ctx.fail.apiFailure(`v0 API returned HTTP ${response.status}.`);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
function fail(field) {
|
|
84
|
+
throw ctx.fail.parseFailure(`Could not parse v0 usage: ${field}`);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
async function getJSON(path) {
|
|
88
|
+
const response = await ctx.http.get(`${V0_API_BASE}${path}${query}`);
|
|
89
|
+
if (response.status !== 200) apiError(response);
|
|
90
|
+
try {
|
|
91
|
+
return JSON.parse(response.bodyText);
|
|
92
|
+
} catch (error) {
|
|
93
|
+
void error;
|
|
94
|
+
return fail(`${path} returned invalid JSON`);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
function object(value, field) {
|
|
99
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) return fail(field);
|
|
100
|
+
return value;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
function number(value, field) {
|
|
104
|
+
if (typeof value !== "number" || !Number.isFinite(value)) return fail(field);
|
|
105
|
+
return value;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
function text(value, field) {
|
|
109
|
+
if (value === undefined || value === null) return undefined;
|
|
110
|
+
if (typeof value !== "string") return fail(field);
|
|
111
|
+
return value.trim() || undefined;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
function reset(value, field) {
|
|
115
|
+
if (value === undefined || value === null) return undefined;
|
|
116
|
+
const timestamp = number(value, field);
|
|
117
|
+
if (timestamp <= 0) return undefined;
|
|
118
|
+
return timestamp >= 1000000000000 ? ctx.date.unixMillis(timestamp) : ctx.date.unixSeconds(timestamp);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
function optionalNumber(value, field) {
|
|
122
|
+
if (value === undefined || value === null) return undefined;
|
|
123
|
+
return number(value, field);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
function quota(value, field) {
|
|
127
|
+
const payload = object(value, field);
|
|
128
|
+
const limit = number(payload.limit, `${field}.limit`);
|
|
129
|
+
const remaining = optionalNumber(payload.remaining, `${field}.remaining`);
|
|
130
|
+
if (limit < 0) return fail(`${field}.limit must not be negative`);
|
|
131
|
+
return {
|
|
132
|
+
usedPercent: remaining === undefined ? undefined : ctx.pct(Math.max(0, limit - remaining), limit),
|
|
133
|
+
resetsAt: reset(payload.reset, `${field}.reset`),
|
|
134
|
+
remaining,
|
|
135
|
+
limit,
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
function tokenBilling(value, field) {
|
|
140
|
+
const payload = object(value, field);
|
|
141
|
+
const balance = object(payload.balance, `${field}.balance`);
|
|
142
|
+
const total = number(balance.total, `${field}.balance.total`);
|
|
143
|
+
const remaining = number(balance.remaining, `${field}.balance.remaining`);
|
|
144
|
+
const billingCycle = object(payload.billingCycle, `${field}.billingCycle`);
|
|
145
|
+
const onDemand =
|
|
146
|
+
payload.onDemand === undefined || payload.onDemand === null
|
|
147
|
+
? undefined
|
|
148
|
+
: object(payload.onDemand, `${field}.onDemand`);
|
|
149
|
+
if (total < 0) return fail(`${field}.balance.total must not be negative`);
|
|
150
|
+
return {
|
|
151
|
+
usedPercent: ctx.pct(Math.max(0, total - remaining), total),
|
|
152
|
+
resetsAt: reset(billingCycle.end, `${field}.billingCycle.end`),
|
|
153
|
+
remaining,
|
|
154
|
+
limit: total,
|
|
155
|
+
onDemandBalance: onDemand === undefined ? undefined : number(onDemand.balance, `${field}.onDemand.balance`),
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
const billing = object(await getJSON("/user/billing"), "billing response");
|
|
160
|
+
const billingType = text(billing.billingType, "billingType");
|
|
161
|
+
if (billingType !== "token" && billingType !== "legacy") return fail("billingType");
|
|
162
|
+
const tokenBillingData = billingType === "token" ? tokenBilling(billing.data, "billing.data") : undefined;
|
|
163
|
+
const billingData = _nullishCoalesce(tokenBillingData, () => quota(billing.data, "billing.data"));
|
|
164
|
+
|
|
165
|
+
const rateLimit = quota(await getJSON("/rate-limits"), "rate limit response");
|
|
166
|
+
const rateRemaining = rateLimit.remaining;
|
|
167
|
+
|
|
168
|
+
const billingRemaining = billingData.remaining;
|
|
169
|
+
const rows = [
|
|
170
|
+
{
|
|
171
|
+
label: "Billing remaining",
|
|
172
|
+
value:
|
|
173
|
+
billingRemaining === undefined
|
|
174
|
+
? "Unavailable"
|
|
175
|
+
: ctx.format.number(billingRemaining, { maximumFractionDigits: 2 }),
|
|
176
|
+
secondaryValue: `${billingRemaining === undefined ? "limit" : "of"} ${ctx.format.number(billingData.limit, { maximumFractionDigits: 2 })}`,
|
|
177
|
+
},
|
|
178
|
+
];
|
|
179
|
+
if (_optionalChain([tokenBillingData, "optionalAccess", (_6) => _6.onDemandBalance]) !== undefined) {
|
|
180
|
+
rows.push({
|
|
181
|
+
label: "On-demand balance",
|
|
182
|
+
value: ctx.format.number(tokenBillingData.onDemandBalance, { maximumFractionDigits: 2 }),
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
rows.push({
|
|
186
|
+
label: "Rate-limit remaining",
|
|
187
|
+
value:
|
|
188
|
+
rateRemaining === undefined ? "Unavailable" : ctx.format.number(rateRemaining, { maximumFractionDigits: 2 }),
|
|
189
|
+
secondaryValue:
|
|
190
|
+
rateRemaining === undefined
|
|
191
|
+
? `limit ${ctx.format.number(rateLimit.limit, { maximumFractionDigits: 2 })}`
|
|
192
|
+
: `of ${ctx.format.number(rateLimit.limit, { maximumFractionDigits: 2 })}`,
|
|
193
|
+
});
|
|
194
|
+
if (billingType) rows.push({ label: "Billing type", value: billingType });
|
|
195
|
+
if (scope) rows.push({ label: "Scope", value: scope.slice(0, 120) });
|
|
196
|
+
|
|
197
|
+
return {
|
|
198
|
+
primary:
|
|
199
|
+
billingData.usedPercent === undefined
|
|
200
|
+
? null
|
|
201
|
+
: { usedPercent: billingData.usedPercent, resetsAt: billingData.resetsAt },
|
|
202
|
+
secondary:
|
|
203
|
+
rateRemaining === undefined
|
|
204
|
+
? null
|
|
205
|
+
: {
|
|
206
|
+
usedPercent: ctx.pct(Math.max(0, rateLimit.limit - rateRemaining), rateLimit.limit),
|
|
207
|
+
resetsAt: rateLimit.resetsAt,
|
|
208
|
+
},
|
|
209
|
+
details: [{ title: "v0 API", rows }],
|
|
210
|
+
identity: { loginMethod: "API key" },
|
|
211
|
+
dataConfidence: "exact",
|
|
212
|
+
};
|
|
213
|
+
},
|
|
214
|
+
});
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"id": "v0",
|
|
4
|
+
"name": "v0",
|
|
5
|
+
"version": "0.1.0",
|
|
6
|
+
"entry": "plugin.js",
|
|
7
|
+
"enabledByDefault": false,
|
|
8
|
+
"supportedModes": [
|
|
9
|
+
"api"
|
|
10
|
+
],
|
|
11
|
+
"autoMode": "api",
|
|
12
|
+
"usageDashboardUrl": "https://v0.app/settings/billing",
|
|
13
|
+
"envVars": [
|
|
14
|
+
"V0_API_KEY",
|
|
15
|
+
"V0_SCOPE"
|
|
16
|
+
],
|
|
17
|
+
"upstream": {
|
|
18
|
+
"repository": "https://github.com/steipete/CodexBar",
|
|
19
|
+
"revision": "78ba5a1e65e6859da59a21b799df95ab91bc0b89",
|
|
20
|
+
"path": "Sources/CodexBarCore/Resources/Plugins/v0.js",
|
|
21
|
+
"sha256": "5f54a9329dca35d59d76e427c34d4d9db8d3400d0b38c5fcee8899928a900019",
|
|
22
|
+
"license": "MIT"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
File without changes
|
package/plugins/venice/icon.svg
CHANGED
|
File without changes
|
package/plugins/venice/plugin.js
CHANGED
|
@@ -2,12 +2,15 @@
|
|
|
2
2
|
var API_URL = "https://api.venice.ai/api/v1/billing/balance";
|
|
3
3
|
|
|
4
4
|
function loadApiKey(ctx) {
|
|
5
|
+
if (Object.prototype.hasOwnProperty.call(ctx.provider || {}, 'apiKey')) return ctx.provider.apiKey;
|
|
6
|
+
if (ctx.provider && ctx.provider.instanceId && ctx.provider.instanceId !== 'venice') return null;
|
|
5
7
|
var v = ctx.host.env.get("VENICE_API_KEY");
|
|
6
8
|
if (typeof v === "string" && v.trim()) return v.trim();
|
|
7
9
|
return null;
|
|
8
10
|
}
|
|
9
11
|
|
|
10
12
|
function probe(ctx) {
|
|
13
|
+
if (ctx.sourceMode === 'web') return webUsage(ctx);
|
|
11
14
|
var apiKey = loadApiKey(ctx);
|
|
12
15
|
if (!apiKey) {
|
|
13
16
|
throw "Venice API key not found. Set VENICE_API_KEY.";
|
|
@@ -62,7 +65,53 @@
|
|
|
62
65
|
lines.push(ctx.line.badge({ label: "Balance", text: "No Venice API balance", color: "#a3a3a3" }));
|
|
63
66
|
}
|
|
64
67
|
|
|
65
|
-
return { lines: lines };
|
|
68
|
+
return { source: 'api', lines: lines };
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
function webUsage(ctx) {
|
|
72
|
+
var provider = ctx.provider || {};
|
|
73
|
+
if (provider.settings && provider.settings.cookies === 'off') throw new Error('Venice web cookies are disabled.');
|
|
74
|
+
var raw = Object.prototype.hasOwnProperty.call(provider, 'cookieHeader') ? provider.cookieHeader :
|
|
75
|
+
provider.instanceId && provider.instanceId !== 'venice' ? '' : ctx.host.env.get('VENICE_COOKIE');
|
|
76
|
+
var cookies = {};
|
|
77
|
+
String(raw || '').replace(/^Cookie:\s*/i, '').split(';').forEach(function(pair) {
|
|
78
|
+
var at = pair.indexOf('='); if (at > 0) cookies[pair.slice(0,at).trim()] = pair.slice(at+1).trim();
|
|
79
|
+
});
|
|
80
|
+
var legacy = '__venice-auth.session-token';
|
|
81
|
+
var token = cookies[legacy];
|
|
82
|
+
var chunks = Object.keys(cookies).filter(function(key){return /^__venice-auth\.session-token\.\d+$/.test(key);});
|
|
83
|
+
if (!token && chunks.length && chunks.every(function(_,i){return cookies[legacy+'.'+i];}))
|
|
84
|
+
token = chunks.map(function(_,i){return cookies[legacy+'.'+i];}).join('');
|
|
85
|
+
var headers = {Accept:'application/json'};
|
|
86
|
+
if (token) headers.Cookie = legacy+'='+token;
|
|
87
|
+
else {
|
|
88
|
+
token = cookies.__session || cookies[Object.keys(cookies).sort().find(function(key){return /^__session_.+/.test(key);})];
|
|
89
|
+
if (!token) throw new Error('Import a fresh Venice session cookie.');
|
|
90
|
+
headers.Authorization = 'Bearer '+token;
|
|
91
|
+
}
|
|
92
|
+
var resp = ctx.host.http.request({method:'GET',url:'https://outerface.venice.ai/api/user/session',headers:headers,timeoutMs:15000});
|
|
93
|
+
if (resp.status === 401 || resp.status === 403) throw new Error('Venice session expired. Reopen venice.ai and import fresh cookies.');
|
|
94
|
+
if (resp.status < 200 || resp.status >= 300) throw new Error('Venice session request failed (HTTP '+resp.status+').');
|
|
95
|
+
var payload = ctx.util.tryParseJson(resp.bodyText);
|
|
96
|
+
var claims = payload && ctx.jwt.decodePayload(payload.token);
|
|
97
|
+
function amount(value) { if (typeof value !== 'number' && typeof value !== 'string' || value === '') return null; var n=Number(value); return Number.isFinite(n)&&n>=0?n:null; }
|
|
98
|
+
var expiry = claims && amount(claims.exp);
|
|
99
|
+
if (!claims || expiry === null || expiry < 1e9 || expiry > 4e9 || expiry*1000 < Date.parse(ctx.nowIso)-60000)
|
|
100
|
+
throw new Error('Venice session expired. Import fresh cookies.');
|
|
101
|
+
if (['anonymous','anon','guest','unauthenticated','logged_out'].includes(String(claims.userType).toLowerCase())) throw new Error('Sign in to Venice.');
|
|
102
|
+
var usage = claims.bundledCreditsUsage || {};
|
|
103
|
+
var used = amount(usage.usedThisCycle), refill = amount(usage.monthlyRefillCredits);
|
|
104
|
+
if (used === null || !(refill > 0)) throw new Error('Venice subscription credits unavailable.');
|
|
105
|
+
var lines = [];
|
|
106
|
+
var available = amount(usage.availableCredits);
|
|
107
|
+
if (available === null) available = amount(claims.bundledCredits);
|
|
108
|
+
[['Subscription credits available',available],['Total credits available',amount(claims.veniceCredits)],['Bank cap',amount(usage.tierCap)]]
|
|
109
|
+
.forEach(function(pair){if(pair[1] !== null) lines.push(ctx.line.text({label:pair[0],value:String(pair[1])}));});
|
|
110
|
+
lines.push(ctx.line.text({label:'Used this cycle',value:String(used),subtitle:'Monthly refill: '+refill}));
|
|
111
|
+
var next = amount(usage.nextRefillAt);
|
|
112
|
+
if (next >= 1e12 && next <= 4e12) lines.push(ctx.line.text({label:'Next refill',value:new Date(next).toISOString()}));
|
|
113
|
+
// A refill is not a spending cap. Banked credits must never appear exhausted.
|
|
114
|
+
return {source:'web',lines:lines};
|
|
66
115
|
}
|
|
67
116
|
|
|
68
117
|
globalThis.__openusage_plugin = { id: "venice", probe: probe };
|
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
"links": [
|
|
9
9
|
{ "label": "API Keys", "url": "https://venice.ai/settings/api" }
|
|
10
10
|
],
|
|
11
|
-
"supportedModes": ["api"],
|
|
11
|
+
"supportedModes": ["api", "web"],
|
|
12
|
+
"webUrl": "https://venice.ai",
|
|
12
13
|
"autoMode": "api",
|
|
13
14
|
"lines": [
|
|
14
15
|
{ "type": "text", "label": "Balance", "scope": "overview" }
|
|
@@ -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>Vercel</title><path d="M12 0l12 20.785H0L12 0z"></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>Vercel</title><path d="M12 0l12 20.785H0L12 0z"></path></svg>
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
// Generated by tools/vendor-codexbar-providers.cjs; see LICENSE.
|
|
2
|
+
globalThis.__usagestat_bundled_options = {"labels":["Balance","Balance","Additional"],"defaults":{},"autoMode":"api"};
|
|
3
|
+
defineProvider({
|
|
4
|
+
id: "vercel",
|
|
5
|
+
name: "Vercel AI Gateway",
|
|
6
|
+
endpoints: ["https://ai-gateway.vercel.sh"],
|
|
7
|
+
auth: { type: "bearer", secret: "AI_GATEWAY_API_KEY" },
|
|
8
|
+
settings: [{ key: "AI_GATEWAY_API_KEY", title: "AI Gateway API key", type: "secure" }],
|
|
9
|
+
capabilities: ["http-status"],
|
|
10
|
+
async fetchUsage(ctx) {
|
|
11
|
+
const response = await ctx.http.get("https://ai-gateway.vercel.sh/v1/credits");
|
|
12
|
+
const message = `Vercel AI Gateway returned HTTP ${response.status}.`;
|
|
13
|
+
if (response.status === 401) throw ctx.fail.authenticationExpired(message);
|
|
14
|
+
if (response.status === 403) throw ctx.fail.permissionDenied(message);
|
|
15
|
+
if (response.status === 429) {
|
|
16
|
+
const delay = Number(response.headers["retry-after"] ?? 1);
|
|
17
|
+
throw ctx.fail.rateLimited(message, {
|
|
18
|
+
retryAfterSeconds: Number.isFinite(delay) && delay >= 0 ? Math.min(delay, 10) : 1,
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
if (response.status >= 500) throw ctx.fail.providerUnavailable(message);
|
|
22
|
+
if (response.status !== 200) throw ctx.fail.apiFailure(message);
|
|
23
|
+
function fail() {
|
|
24
|
+
throw ctx.fail.parseFailure("Vercel AI Gateway returned an unrecognized credit balance.");
|
|
25
|
+
}
|
|
26
|
+
let data;
|
|
27
|
+
try {
|
|
28
|
+
data = JSON.parse(response.bodyText);
|
|
29
|
+
} catch {
|
|
30
|
+
return fail();
|
|
31
|
+
}
|
|
32
|
+
function money(value) {
|
|
33
|
+
if (typeof value !== "string" || !/^-?\d+(?:\.\d+)?$/.test(value)) return fail();
|
|
34
|
+
const amount = Number(value);
|
|
35
|
+
if (!Number.isFinite(amount)) return fail();
|
|
36
|
+
return amount;
|
|
37
|
+
}
|
|
38
|
+
const balance = money(data?.balance);
|
|
39
|
+
const spent = money(data?.total_used);
|
|
40
|
+
if (spent < 0) return fail();
|
|
41
|
+
return {
|
|
42
|
+
details: [
|
|
43
|
+
{
|
|
44
|
+
title: "Team credits",
|
|
45
|
+
rows: [
|
|
46
|
+
{ label: "Available balance", value: ctx.format.usd(balance) },
|
|
47
|
+
{ label: "Lifetime spend", value: ctx.format.usd(spent) },
|
|
48
|
+
],
|
|
49
|
+
},
|
|
50
|
+
],
|
|
51
|
+
identity: { loginMethod: "API" },
|
|
52
|
+
dataConfidence: "exact",
|
|
53
|
+
};
|
|
54
|
+
},
|
|
55
|
+
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"id": "vercel",
|
|
4
|
+
"name": "Vercel AI Gateway",
|
|
5
|
+
"version": "0.1.0",
|
|
6
|
+
"entry": "plugin.js",
|
|
7
|
+
"enabledByDefault": false,
|
|
8
|
+
"supportedModes": [
|
|
9
|
+
"api"
|
|
10
|
+
],
|
|
11
|
+
"autoMode": "api",
|
|
12
|
+
"usageDashboardUrl": "https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai-gateway",
|
|
13
|
+
"envVars": [
|
|
14
|
+
"AI_GATEWAY_API_KEY"
|
|
15
|
+
],
|
|
16
|
+
"upstream": {
|
|
17
|
+
"repository": "https://github.com/steipete/CodexBar",
|
|
18
|
+
"revision": "78ba5a1e65e6859da59a21b799df95ab91bc0b89",
|
|
19
|
+
"path": "Sources/CodexBarCore/Resources/Plugins/vercel.js",
|
|
20
|
+
"sha256": "27b39f42709e93a2cfbf850171f198069553c99967f9b7ba6d16614862cb084a",
|
|
21
|
+
"license": "MIT"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/plugins/warp/icon.svg
CHANGED
|
File without changes
|
package/plugins/warp/plugin.js
CHANGED
|
File without changes
|
package/plugins/warp/plugin.json
CHANGED
|
File without changes
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
(function () {
|
|
2
|
+
function clean(value) { return typeof value === "string" && value.trim() ? value.trim() : null }
|
|
3
|
+
function number(value) {
|
|
4
|
+
if (typeof value !== "number" || !Number.isFinite(value) || value < 0) throw "Invalid Wayfinder usage response."
|
|
5
|
+
return value
|
|
6
|
+
}
|
|
7
|
+
function probe(ctx) {
|
|
8
|
+
const settings = ctx.provider && ctx.provider.settings || {}
|
|
9
|
+
const base = ctx.host.http.validateBaseUrl(clean(settings.baseUrl) || clean(ctx.host.env.get("WAYFINDER_GATEWAY_URL")) || "http://127.0.0.1:8088", true)
|
|
10
|
+
function get(path, json) {
|
|
11
|
+
const resp = ctx.host.http.request({ method: "GET", url: base + path, timeoutMs: 5000 })
|
|
12
|
+
if (resp.status < 200 || resp.status >= 300) throw "Wayfinder gateway returned HTTP " + resp.status + "."
|
|
13
|
+
if (!json) return resp.bodyText
|
|
14
|
+
const data = ctx.util.tryParseJson(resp.bodyText)
|
|
15
|
+
if (!data || typeof data !== "object") throw "Invalid Wayfinder response."
|
|
16
|
+
return data
|
|
17
|
+
}
|
|
18
|
+
const health = get("/healthz", true)
|
|
19
|
+
const models = get("/router/models", true)
|
|
20
|
+
const savings = get("/v1/savings?period=30d", true)
|
|
21
|
+
if (typeof health.status !== "string" || !Array.isArray(models.models) || typeof savings.priced !== "boolean") throw "Incomplete Wayfinder response."
|
|
22
|
+
const lines = [
|
|
23
|
+
ctx.line.badge({ label: "Gateway", text: health.offline ? "Offline mode" : models.dry_run ? "Dry run" : health.status }),
|
|
24
|
+
ctx.line.text({ label: "Models", value: String(models.models.length) }),
|
|
25
|
+
ctx.line.text({ label: "Requests", value: String(number(savings.requests)), subtitle: "Last 30 days" }),
|
|
26
|
+
ctx.line.text({ label: "Tokens", value: String(number(savings.tokens)) }),
|
|
27
|
+
]
|
|
28
|
+
if (number(savings.saved) > 0) {
|
|
29
|
+
lines.push(ctx.line.text({ label: "Saved", value: (savings.priced ? "$" + savings.saved.toFixed(4) + "; " : "") +
|
|
30
|
+
number(savings.saved_pct).toFixed(1) + "%", subtitle: "Compared with highest-cost route" }))
|
|
31
|
+
}
|
|
32
|
+
const routes = Object.keys(savings.by_route || {}).map((name) => ({
|
|
33
|
+
label: name, value: number(savings.by_route[name].requests),
|
|
34
|
+
})).sort((a, b) => b.value - a.value)
|
|
35
|
+
if (routes.length) lines.push(ctx.line.barChart({ label: "Routed requests", points: routes.slice(0, 20) }))
|
|
36
|
+
try {
|
|
37
|
+
const metrics = get("/metrics", false)
|
|
38
|
+
const sum = metrics.match(/^wayfinder_router_decision_latency_seconds_sum\s+([0-9.eE+-]+)(?:\s|$)/m)
|
|
39
|
+
const count = metrics.match(/^wayfinder_router_decision_latency_seconds_count\s+([0-9.eE+-]+)(?:\s|$)/m)
|
|
40
|
+
if (sum && count && number(Number(count[1])) > 0) {
|
|
41
|
+
lines.push(ctx.line.text({ label: "Avg decision", value: (number(Number(sum[1])) / Number(count[1]) * 1000).toFixed(1) + " ms" }))
|
|
42
|
+
}
|
|
43
|
+
} catch (_) { ctx.host.log.warn("Wayfinder latency unavailable") }
|
|
44
|
+
return { displayName: "Wayfinder", source: "local", lines }
|
|
45
|
+
}
|
|
46
|
+
globalThis.__openusage_plugin = { id: "wayfinder", probe }
|
|
47
|
+
})()
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"id": "wayfinder",
|
|
4
|
+
"name": "Wayfinder",
|
|
5
|
+
"version": "0.1.0",
|
|
6
|
+
"entry": "plugin.js",
|
|
7
|
+
"enabledByDefault": false,
|
|
8
|
+
"envVars": [
|
|
9
|
+
"WAYFINDER_GATEWAY_URL"
|
|
10
|
+
],
|
|
11
|
+
"supportedModes": [
|
|
12
|
+
"local"
|
|
13
|
+
],
|
|
14
|
+
"autoMode": "local",
|
|
15
|
+
"usageDashboardUrl": "http://127.0.0.1:8088/router"
|
|
16
|
+
}
|
|
@@ -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>Windsurf</title><path clip-rule="evenodd" d="M23.78 5.004h-.228a2.187 2.187 0 00-2.18 2.196v4.912c0 .98-.804 1.775-1.76 1.775a1.818 1.818 0 01-1.472-.773L13.168 5.95a2.197 2.197 0 00-1.81-.95c-1.134 0-2.154.972-2.154 2.173v4.94c0 .98-.797 1.775-1.76 1.775-.57 0-1.136-.289-1.472-.773L.408 5.098C.282 4.918 0 5.007 0 5.228v4.284c0 .216.066.426.188.604l5.475 7.889c.324.466.8.812 1.351.938 1.377.316 2.645-.754 2.645-2.117V11.89c0-.98.787-1.775 1.76-1.775h.002c.586 0 1.135.288 1.472.773l4.972 7.163a2.15 2.15 0 001.81.95c1.158 0 2.151-.973 2.151-2.173v-4.939c0-.98.787-1.775 1.76-1.775h.194c.122 0 .22-.1.22-.222V5.225a.221.221 0 00-.22-.222z"></path></svg>
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -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>Grok</title><path d="M6.469 8.776L16.512 23h-4.464L2.005 8.776H6.47zm-.004 7.9l2.233 3.164L6.467 23H2l4.465-6.324zM22 2.582V23h-3.659V7.764L22 2.582zM22 1l-9.952 14.095-2.233-3.163L17.533 1H22z"></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>Grok</title><path d="M6.469 8.776L16.512 23h-4.464L2.005 8.776H6.47zm-.004 7.9l2.233 3.164L6.467 23H2l4.465-6.324zM22 2.582V23h-3.659V7.764L22 2.582zM22 1l-9.952 14.095-2.233-3.163L17.533 1H22z"></path></svg>
|