@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
package/plugins/zed/icon.svg
CHANGED
|
File without changes
|
package/plugins/zed/plugin.js
CHANGED
|
File without changes
|
package/plugins/zed/plugin.json
CHANGED
|
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>ZenMux</title><g transform="scale(0.15)"><path clip-rule="evenodd" d="M76.5655 12.5465C83.6841 12.273 98.0909 13.2144 109.616 23.5631C119.071 32.0522 122.328 47.7904 120.125 59.9938C118.105 71.1802 113.346 80.3327 115.21 88.8073C117.074 97.2819 121.818 101.46 125.854 103.215C129.752 104.909 133.52 104.401 132.803 107.621C132.085 110.841 127.21 112.028 123.65 112.028C121.698 112.028 115.795 111.519 113.176 109.824C110.081 107.821 109.391 106.026 108.213 104.583C108.013 104.338 107.66 104.509 107.707 104.821C108.244 108.371 109.724 114.394 112.125 118.13C114.068 121.152 114.871 123.356 119.322 127.085C123.774 130.813 125.853 134.203 121.525 136.604C117.68 138.736 109.322 134.373 104.407 128.977C99.9829 124.12 96.9028 118.129 95.6846 114.231C95.0335 112.147 94.3811 108.562 93.7296 105.63C93.644 105.244 93.116 105.306 93.1046 105.701C92.8883 113.164 91.7152 120.291 90.0001 127.932C88.7652 133.433 85.7626 140.135 83.0508 144.203C79.7442 149.163 74.8354 150.711 71.1866 149.355C68.2684 148.27 70.3392 144.582 71.1866 141.389C72.034 138.197 73.7294 131.519 74.8712 124.203C75.9046 117.581 76.1781 111.026 75.7178 104.815C75.6893 104.436 75.1073 104.378 74.9893 104.739C74.0382 107.652 72.2455 112.481 70.9376 115.418C68.2097 121.543 66.1909 124.231 60.5977 130.672C55.5676 136.464 41.1004 144.655 39.2422 136.604C38.7338 134.401 41.3978 133.436 43.8546 131.519C47.5476 128.638 50.6336 123.525 53.5596 117.282C56.1869 111.676 57.5223 106.253 57.7266 102.791C57.746 102.457 57.3268 102.331 57.1387 102.607C55.9225 104.391 54.1317 106.805 52.1592 108.807C48.8643 112.152 45.2098 115.595 40.9717 117.282C34.1576 119.994 27.2089 118.129 27.7169 113.215C28.1415 109.109 32.725 109.959 38.4307 103.734C44.0239 97.6323 45.8876 92.8857 46.2266 87.6315C46.4975 83.428 42.3854 73.4513 40.295 68.9879C36.9616 61.8693 34.4984 41.666 44.5323 28.6491C57.0743 12.3784 72.1582 12.7159 76.5655 12.5465ZM57.0001 40.9997C52.3335 40.9997 50.0002 44.5815 50.0001 48.9997C50.0001 53.4179 52.5927 56.9997 57.0001 56.9997C61.4074 56.9996 64.0001 53.4179 64.0001 48.9997C63.9999 44.5816 61.6666 40.9997 57.0001 40.9997ZM95.0001 40.9997C90.3335 40.9997 88.0002 44.5815 88.0001 48.9997C88.0001 53.4179 90.5927 56.9997 95.0001 56.9997C99.4074 56.9996 102 53.4179 102 48.9997C102 44.5816 99.6666 40.9997 95.0001 40.9997Z" fill-rule="evenodd"></path></g></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>ZenMux</title><g transform="scale(0.15)"><path clip-rule="evenodd" d="M76.5655 12.5465C83.6841 12.273 98.0909 13.2144 109.616 23.5631C119.071 32.0522 122.328 47.7904 120.125 59.9938C118.105 71.1802 113.346 80.3327 115.21 88.8073C117.074 97.2819 121.818 101.46 125.854 103.215C129.752 104.909 133.52 104.401 132.803 107.621C132.085 110.841 127.21 112.028 123.65 112.028C121.698 112.028 115.795 111.519 113.176 109.824C110.081 107.821 109.391 106.026 108.213 104.583C108.013 104.338 107.66 104.509 107.707 104.821C108.244 108.371 109.724 114.394 112.125 118.13C114.068 121.152 114.871 123.356 119.322 127.085C123.774 130.813 125.853 134.203 121.525 136.604C117.68 138.736 109.322 134.373 104.407 128.977C99.9829 124.12 96.9028 118.129 95.6846 114.231C95.0335 112.147 94.3811 108.562 93.7296 105.63C93.644 105.244 93.116 105.306 93.1046 105.701C92.8883 113.164 91.7152 120.291 90.0001 127.932C88.7652 133.433 85.7626 140.135 83.0508 144.203C79.7442 149.163 74.8354 150.711 71.1866 149.355C68.2684 148.27 70.3392 144.582 71.1866 141.389C72.034 138.197 73.7294 131.519 74.8712 124.203C75.9046 117.581 76.1781 111.026 75.7178 104.815C75.6893 104.436 75.1073 104.378 74.9893 104.739C74.0382 107.652 72.2455 112.481 70.9376 115.418C68.2097 121.543 66.1909 124.231 60.5977 130.672C55.5676 136.464 41.1004 144.655 39.2422 136.604C38.7338 134.401 41.3978 133.436 43.8546 131.519C47.5476 128.638 50.6336 123.525 53.5596 117.282C56.1869 111.676 57.5223 106.253 57.7266 102.791C57.746 102.457 57.3268 102.331 57.1387 102.607C55.9225 104.391 54.1317 106.805 52.1592 108.807C48.8643 112.152 45.2098 115.595 40.9717 117.282C34.1576 119.994 27.2089 118.129 27.7169 113.215C28.1415 109.109 32.725 109.959 38.4307 103.734C44.0239 97.6323 45.8876 92.8857 46.2266 87.6315C46.4975 83.428 42.3854 73.4513 40.295 68.9879C36.9616 61.8693 34.4984 41.666 44.5323 28.6491C57.0743 12.3784 72.1582 12.7159 76.5655 12.5465ZM57.0001 40.9997C52.3335 40.9997 50.0002 44.5815 50.0001 48.9997C50.0001 53.4179 52.5927 56.9997 57.0001 56.9997C61.4074 56.9996 64.0001 53.4179 64.0001 48.9997C63.9999 44.5816 61.6666 40.9997 57.0001 40.9997ZM95.0001 40.9997C90.3335 40.9997 88.0002 44.5815 88.0001 48.9997C88.0001 53.4179 90.5927 56.9997 95.0001 56.9997C99.4074 56.9996 102 53.4179 102 48.9997C102 44.5816 99.6666 40.9997 95.0001 40.9997Z" fill-rule="evenodd"></path></g></svg>
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
(function () {
|
|
2
|
+
var BASE = "https://zenmux.ai/api/v1/management";
|
|
3
|
+
|
|
4
|
+
function clean(value) {
|
|
5
|
+
return typeof value === "string" && value.trim() ? value.trim() : null;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
function env(ctx, name) {
|
|
9
|
+
try {
|
|
10
|
+
return clean(ctx.host.env.get(name));
|
|
11
|
+
} catch (_) {
|
|
12
|
+
return null;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function apiKey(ctx) {
|
|
17
|
+
return clean(ctx.provider && ctx.provider.apiKey) || env(ctx, "ZENMUX_MANAGEMENT_API_KEY") || env(ctx, "ZENMUX_API_KEY");
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function requestJson(ctx, path, key, timeoutMs) {
|
|
21
|
+
var result = ctx.util.requestJson({
|
|
22
|
+
method: "GET",
|
|
23
|
+
url: BASE + "/" + path,
|
|
24
|
+
headers: { Authorization: "Bearer " + key, Accept: "application/json" },
|
|
25
|
+
timeoutMs: timeoutMs || 15000,
|
|
26
|
+
});
|
|
27
|
+
if (ctx.util.isAuthStatus(result.resp.status)) throw "ZenMux Management API key invalid or expired.";
|
|
28
|
+
if (result.resp.status < 200 || result.resp.status >= 300) throw "ZenMux Management API returned HTTP " + result.resp.status + ".";
|
|
29
|
+
if (!result.json || typeof result.json !== "object") throw "Failed to parse ZenMux response.";
|
|
30
|
+
return result.json;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function iso(ctx, value) {
|
|
34
|
+
return value ? ctx.util.toIso(value) : null;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function title(value) {
|
|
38
|
+
var v = String(value || "").trim();
|
|
39
|
+
return v ? v.charAt(0).toUpperCase() + v.slice(1) : "";
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function amount(value) {
|
|
43
|
+
var n = number(value);
|
|
44
|
+
if (n === null) return null;
|
|
45
|
+
return Math.abs(n - Math.round(n)) < 0.001 ? String(Math.round(n)) : n.toFixed(2);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function number(raw) {
|
|
49
|
+
if ((typeof raw !== "number" && typeof raw !== "string") || String(raw).trim() === "") return null;
|
|
50
|
+
var n = Number(raw);
|
|
51
|
+
return Number.isFinite(n) ? n : null;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function quotaLine(ctx, label, quota, minutes) {
|
|
55
|
+
if (!quota) return null;
|
|
56
|
+
var percent = number(quota.usage_percentage);
|
|
57
|
+
if (percent === null || percent < 0) throw "Invalid ZenMux usage percentage.";
|
|
58
|
+
var opts = {
|
|
59
|
+
label: label,
|
|
60
|
+
used: Math.max(0, Math.min(100, percent * 100)),
|
|
61
|
+
limit: 100,
|
|
62
|
+
format: { kind: "percent" },
|
|
63
|
+
periodDurationMs: minutes * 60 * 1000,
|
|
64
|
+
};
|
|
65
|
+
if (amount(quota.used_flows) !== null && amount(quota.max_flows) !== null) opts.detail = amount(quota.used_flows) + " / " + amount(quota.max_flows) + " flows";
|
|
66
|
+
var reset = iso(ctx, quota.resets_at);
|
|
67
|
+
if (reset) opts.resetsAt = reset;
|
|
68
|
+
return ctx.line.progress(opts);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
function probe(ctx) {
|
|
72
|
+
var key = apiKey(ctx);
|
|
73
|
+
if (!key) throw "Missing ZenMux Management API key. Set ZENMUX_MANAGEMENT_API_KEY, ZENMUX_API_KEY, or provider apiKey.";
|
|
74
|
+
var sub = requestJson(ctx, "subscription/detail", key);
|
|
75
|
+
if (!sub.success || !sub.data) throw "ZenMux subscription response reported failure.";
|
|
76
|
+
var data = sub.data;
|
|
77
|
+
var plan = data.plan && title(data.plan.tier);
|
|
78
|
+
var status = title(data.account_status);
|
|
79
|
+
var planLabel = plan ? plan + " plan" : null;
|
|
80
|
+
if (status && status.toLowerCase() !== "healthy") planLabel = planLabel ? planLabel + " · " + status : status;
|
|
81
|
+
var metrics = [
|
|
82
|
+
quotaLine(ctx, "5-hour quota", data.quota_5_hour, 5 * 60),
|
|
83
|
+
quotaLine(ctx, "Weekly quota", data.quota_7_day, 7 * 24 * 60),
|
|
84
|
+
].filter(function (line) { return line !== null; });
|
|
85
|
+
var expiresAt = iso(ctx, data.plan && data.plan.expires_at);
|
|
86
|
+
if (expiresAt) metrics.push(ctx.line.text({ label: "Subscription expires", value: expiresAt }));
|
|
87
|
+
|
|
88
|
+
try {
|
|
89
|
+
var bal = requestJson(ctx, "payg/balance", key, 3000);
|
|
90
|
+
if (bal.success && bal.data && number(bal.data.total_credits) !== null && String(bal.data.currency || "").toUpperCase() === "USD") {
|
|
91
|
+
metrics.push(ctx.line.text({ label: "PAYG Balance", value: "$" + number(bal.data.total_credits).toFixed(2) }));
|
|
92
|
+
}
|
|
93
|
+
} catch (error) {
|
|
94
|
+
ctx.host.log.warn("ZenMux PAYG balance request failed: " + String(error));
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
if (!metrics.length) throw "ZenMux returned no measurable usage or balance.";
|
|
98
|
+
return { displayName: "ZenMux", source: "api", plan: planLabel, lines: metrics };
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
globalThis.__openusage_plugin = { id: "zenmux", probe: probe };
|
|
102
|
+
})();
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"id": "zenmux",
|
|
4
|
+
"name": "ZenMux",
|
|
5
|
+
"version": "0.1.0",
|
|
6
|
+
"entry": "plugin.js",
|
|
7
|
+
"enabledByDefault": false,
|
|
8
|
+
"supportedModes": [
|
|
9
|
+
"api"
|
|
10
|
+
],
|
|
11
|
+
"autoMode": "api",
|
|
12
|
+
"usageDashboardUrl": "https://zenmux.ai/platform/management",
|
|
13
|
+
"links": [
|
|
14
|
+
{
|
|
15
|
+
"label": "Dashboard",
|
|
16
|
+
"url": "https://zenmux.ai/platform/management"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"envVars": [
|
|
20
|
+
"ZENMUX_MANAGEMENT_API_KEY",
|
|
21
|
+
"ZENMUX_API_KEY"
|
|
22
|
+
]
|
|
23
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg width="64" height="64" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M7.4736 0.952515V8.10417H0.321045C0.321044 7.99446 0.376881 7.88475 0.488552 7.82536L3.16237 6.40332C4.27292 5.81268 5.18182 4.90389 5.77258 3.79341L7.19481 1.11999C7.25421 1.00834 7.3639 0.952515 7.4736 0.952515Z" fill="url(#IconAICompanionOnLightFillColor__paint0_radial_45419_301)"/><path d="M14.6262 8.10417L7.47363 8.10417L7.47363 0.952515C7.58333 0.952514 7.69303 1.00834 7.75243 1.11999L9.17466 3.79341C9.76542 4.90389 10.6743 5.81268 11.7849 6.40332L14.4587 7.82536C14.5704 7.88476 14.6262 7.99446 14.6262 8.10417Z" fill="url(#IconAICompanionOnLightFillColor__paint1_radial_45419_301)"/><path d="M7.47363 15.2559L7.47363 8.10428L14.6262 8.10428C14.6262 8.21399 14.5704 8.3237 14.4587 8.38309L11.7849 9.80514C10.6743 10.3958 9.76542 11.3046 9.17465 12.415L7.75242 15.0885C7.69303 15.2001 7.58333 15.2559 7.47363 15.2559Z" fill="url(#IconAICompanionOnLightFillColor__paint2_radial_45419_301)"/><path d="M0.321045 8.10428L7.47569 8.10428V15.258C7.36599 15.258 7.25629 15.2022 7.19689 15.0905L5.77394 12.4158C5.18318 11.3053 4.27428 10.3965 3.16373 9.80586L0.488552 8.38309C0.376881 8.3237 0.321046 8.21399 0.321045 8.10428Z" fill="url(#IconAICompanionOnLightFillColor__paint3_radial_45419_301)"/><path d="M7.47359 4.47397L7.47359 8.10428H3.84277L4.50905 7.74993C5.6196 7.15929 6.5285 6.2505 7.11926 5.14002L7.47359 4.47397Z" fill="url(#IconAICompanionOnLightFillColor__paint4_linear_45419_301)"/><path d="M11.1044 8.10428L10.4382 7.74993C9.32762 7.15929 8.41873 6.2505 7.82797 5.14002L7.47363 4.47397L7.47363 8.10428L11.1044 8.10428Z" fill="url(#IconAICompanionOnLightFillColor__paint5_linear_45419_301)"/><path d="M7.47363 11.7346L7.47363 8.10428L11.1045 8.10428L10.4382 8.45863C9.32762 9.04927 8.41873 9.95806 7.82796 11.0685L7.47363 11.7346Z" fill="url(#IconAICompanionOnLightFillColor__paint6_linear_45419_301)"/><path d="M3.84277 8.10428L7.47359 8.10428L7.47359 11.7346L7.11926 11.0685C6.52849 9.95806 5.6196 9.04927 4.50905 8.45863L3.84277 8.10428Z" fill="url(#IconAICompanionOnLightFillColor__paint7_linear_45419_301)"/><path d="M13.1579 0.100098V2.6312H10.6265C10.6265 2.59464 10.6451 2.55807 10.6823 2.53827L11.5561 2.07354C12.0003 1.83729 12.3639 1.47378 12.6002 1.02958L13.065 0.155922C13.0848 0.118706 13.1213 0.100098 13.1579 0.100098Z" fill="url(#IconAICompanionOnLightFillColor__paint8_radial_45419_301)"/><path d="M15.6894 2.63121L13.158 2.63121L13.158 0.100098C13.1945 0.100098 13.2311 0.118706 13.2509 0.155922L13.7157 1.02958C13.952 1.47378 14.3155 1.83729 14.7598 2.07354L15.6336 2.53827C15.6708 2.55807 15.6894 2.59464 15.6894 2.63121Z" fill="url(#IconAICompanionOnLightFillColor__paint9_radial_45419_301)"/><path d="M13.158 5.16233L13.158 2.63123L15.6894 2.63123C15.6894 2.6678 15.6708 2.70437 15.6336 2.72416L14.7598 3.18889C14.3155 3.42514 13.952 3.78866 13.7157 4.23285L13.2509 5.10651C13.2311 5.14373 13.1945 5.16233 13.158 5.16233Z" fill="url(#IconAICompanionOnLightFillColor__paint10_radial_45419_301)"/><path d="M10.6265 2.63123L13.1586 2.63123V5.16307C13.1221 5.16307 13.0855 5.14446 13.0657 5.10724L12.6007 4.2331C12.3644 3.78891 12.0008 3.42539 11.5566 3.18914L10.6823 2.72416C10.6451 2.70436 10.6265 2.66779 10.6265 2.63123Z" fill="url(#IconAICompanionOnLightFillColor__paint11_radial_45419_301)"/><path d="M13.1579 1.34995L13.0151 1.61843C12.8182 1.98859 12.5152 2.29152 12.145 2.4884L11.8765 2.63123L13.1579 2.63123L13.1579 1.34995Z" fill="url(#IconAICompanionOnLightFillColor__paint12_linear_45419_301)"/><path d="M14.4394 2.63123L14.1709 2.4884C13.8007 2.29152 13.4977 1.98859 13.3008 1.61843L13.158 1.34995L13.158 2.63123L14.4394 2.63123Z" fill="url(#IconAICompanionOnLightFillColor__paint13_linear_45419_301)"/><path d="M13.158 3.91251L13.158 2.63123L14.4394 2.63123L14.1709 2.77406C13.8007 2.97094 13.4977 3.27387 13.3008 3.64403L13.158 3.91251Z" fill="url(#IconAICompanionOnLightFillColor__paint14_linear_45419_301)"/><path d="M11.8765 2.63123L13.1579 2.63123L13.1579 3.91251L13.0151 3.64403C12.8182 3.27387 12.5152 2.97094 12.145 2.77406L11.8765 2.63123Z" fill="url(#IconAICompanionOnLightFillColor__paint15_linear_45419_301)"/><defs><radialGradient id="IconAICompanionOnLightFillColor__paint0_radial_45419_301" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(7.16086 4.56023) rotate(132.641) scale(4.8177 4.81775)"><stop offset="0.130911" stop-color="#222CEB"/><stop offset="0.651476" stop-color="#6499ED"/></radialGradient><radialGradient id="IconAICompanionOnLightFillColor__paint1_radial_45419_301" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(11.4871 2.68402) rotate(110.558) scale(5.78882 5.78936)"><stop offset="0.130911" stop-color="#222CEB"/><stop offset="0.651476" stop-color="#A7DFFF"/></radialGradient><radialGradient id="IconAICompanionOnLightFillColor__paint2_radial_45419_301" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(12.3732 9.04238) rotate(137.357) scale(8.07799 8.07791)"><stop offset="0.130911" stop-color="#222CEB"/><stop offset="0.651476" stop-color="#99D4FF"/></radialGradient><radialGradient id="IconAICompanionOnLightFillColor__paint3_radial_45419_301" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(6.4734 9.45971) rotate(135.582) scale(3.64985 3.64984)"><stop offset="0.130911" stop-color="#2C67FF"/><stop offset="0.651476" stop-color="#6CB0FF"/></radialGradient><linearGradient id="IconAICompanionOnLightFillColor__paint4_linear_45419_301" x1="6.59182" y1="4.47397" x2="5.65843" y2="8.10434" gradientUnits="userSpaceOnUse"><stop offset="0.13" stop-color="#9786FF"/><stop offset="0.736193" stop-color="#2244F4"/></linearGradient><linearGradient id="IconAICompanionOnLightFillColor__paint5_linear_45419_301" x1="8.35383" y1="5.51906" x2="8.90382" y2="7.27925" gradientUnits="userSpaceOnUse"><stop stop-color="#915DFF"/><stop offset="1" stop-color="#0F31E0"/></linearGradient><linearGradient id="IconAICompanionOnLightFillColor__paint6_linear_45419_301" x1="7.47363" y1="9.34896" x2="10.4992" y2="8.10398" gradientUnits="userSpaceOnUse"><stop offset="0.28" stop-color="#1939DF"/><stop offset="1" stop-color="#5570FF"/></linearGradient><linearGradient id="IconAICompanionOnLightFillColor__paint7_linear_45419_301" x1="5.2731" y1="10.9645" x2="7.19821" y2="8.59906" gradientUnits="userSpaceOnUse"><stop stop-color="#8793FF"/><stop offset="1" stop-color="#1235E8"/></linearGradient><radialGradient id="IconAICompanionOnLightFillColor__paint8_radial_45419_301" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(13.1579 1.16336) rotate(130.772) scale(1.93821 1.93823)"><stop stop-color="#134BDB"/><stop offset="0.651476" stop-color="#61A0FF"/></radialGradient><radialGradient id="IconAICompanionOnLightFillColor__paint9_radial_45419_301" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(14.8421 0.442305) rotate(114.186) scale(2.39953 2.39977)"><stop offset="0.130911" stop-color="#222CEB"/><stop offset="0.651476" stop-color="#99C0FF"/></radialGradient><radialGradient id="IconAICompanionOnLightFillColor__paint10_radial_45419_301" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(14.892 2.96324) rotate(137.357) scale(2.85897 2.85893)"><stop stop-color="#0C45D7"/><stop offset="0.651476" stop-color="#99D4FF"/></radialGradient><radialGradient id="IconAICompanionOnLightFillColor__paint11_radial_45419_301" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(12.8039 3.11094) rotate(135.583) scale(1.29175 1.29175)"><stop offset="0.130911" stop-color="#2C67FF"/><stop offset="0.651476" stop-color="#6CB0FF"/></radialGradient><linearGradient id="IconAICompanionOnLightFillColor__paint12_linear_45419_301" x1="12.8467" y1="1.34995" x2="12.5173" y2="2.63125" gradientUnits="userSpaceOnUse"><stop offset="0.13" stop-color="#BEE8FF"/><stop offset="0.736193" stop-color="#72D5FB"/></linearGradient><linearGradient id="IconAICompanionOnLightFillColor__paint13_linear_45419_301" x1="13.3685" y1="1.36843" x2="13.7894" y2="2.63162" gradientUnits="userSpaceOnUse"><stop stop-color="#59C8FB"/><stop offset="1" stop-color="#8CDEFB"/></linearGradient><linearGradient id="IconAICompanionOnLightFillColor__paint14_linear_45419_301" x1="13.158" y1="3.07052" x2="14.2258" y2="2.63112" gradientUnits="userSpaceOnUse"><stop offset="0.28" stop-color="#67D9FF"/><stop offset="1" stop-color="#A7E6FF"/></linearGradient><linearGradient id="IconAICompanionOnLightFillColor__paint15_linear_45419_301" x1="12.3813" y1="3.64072" x2="13.3157" y2="2.63144" gradientUnits="userSpaceOnUse"><stop offset="0.221428" stop-color="#FCFEFF"/><stop offset="0.895295" stop-color="#48D3FF"/></linearGradient></defs></svg>
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
(function () {
|
|
2
|
+
var API_HOSTS = ["ai.zoom.us", "zoommate.zoom.us"];
|
|
3
|
+
var STATUS_PATH = "/ai-computer/api/v1/credits/status";
|
|
4
|
+
var ORIGIN_REFERER = "https://zoommate.zoom.us";
|
|
5
|
+
var USER_AGENT = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36";
|
|
6
|
+
|
|
7
|
+
function trim(value) {
|
|
8
|
+
return typeof value === "string" && value.trim() ? value.trim() : null;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
function env(ctx, name) {
|
|
12
|
+
try {
|
|
13
|
+
return trim(ctx.host.env.get(name));
|
|
14
|
+
} catch (_) {
|
|
15
|
+
return null;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function setting(ctx, names) {
|
|
20
|
+
var settings = ctx.provider && ctx.provider.settings ? ctx.provider.settings : {};
|
|
21
|
+
for (var i = 0; i < names.length; i++) {
|
|
22
|
+
var value = trim(settings[names[i]]);
|
|
23
|
+
if (value) return value;
|
|
24
|
+
}
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function bearer(value) {
|
|
29
|
+
var raw = trim(value);
|
|
30
|
+
if (!raw) return null;
|
|
31
|
+
return raw.slice(0, 7).toLowerCase() === "bearer " ? raw : "Bearer " + raw;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function normalizeCookie(raw) {
|
|
35
|
+
var header = trim(raw);
|
|
36
|
+
if (!header) return null;
|
|
37
|
+
if (header.slice(0, 7).toLowerCase() === "cookie:") header = header.slice(7).trim();
|
|
38
|
+
return header.indexOf("=") >= 0 ? header : null;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function directInput(ctx) {
|
|
42
|
+
return trim(ctx.provider && ctx.provider.cookieHeader) ||
|
|
43
|
+
setting(ctx, ["curl", "curlCapture", "cookieHeader", "cookie", "bearerToken", "token"]) ||
|
|
44
|
+
env(ctx, "ZOOMMATE_BEARER_TOKEN") ||
|
|
45
|
+
env(ctx, "ZOOMMATE_COOKIE");
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function headerMapFromCurl(raw) {
|
|
49
|
+
var headers = {};
|
|
50
|
+
var re = /(?:-H|--header)\s+(['"])([\s\S]*?)\1/g;
|
|
51
|
+
var match;
|
|
52
|
+
while ((match = re.exec(raw))) {
|
|
53
|
+
var idx = match[2].indexOf(":");
|
|
54
|
+
if (idx < 0) continue;
|
|
55
|
+
var name = match[2].slice(0, idx).trim();
|
|
56
|
+
var value = match[2].slice(idx + 1).trim();
|
|
57
|
+
if (name && value) headers[name.toLowerCase()] = value;
|
|
58
|
+
}
|
|
59
|
+
return headers;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function urlFromCurl(raw) {
|
|
63
|
+
var match = /curl(?:\s+--location)?\s+(['"])(https:\/\/[^'"]+)\1/.exec(raw);
|
|
64
|
+
return match && match[2] ? match[2] : null;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
function hostFromStatusUrl(url) {
|
|
68
|
+
var match = /^https:\/\/(ai\.zoom\.us|zoommate\.zoom\.us)\/ai-computer\/api\/v1\/credits\/status$/.exec(url || "");
|
|
69
|
+
return match ? match[1] : null;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
function contextFromCurl(raw) {
|
|
73
|
+
if (!/^\s*curl\b/i.test(raw)) return null;
|
|
74
|
+
var url = urlFromCurl(raw);
|
|
75
|
+
var host = hostFromStatusUrl(url);
|
|
76
|
+
if (!host) return null;
|
|
77
|
+
var headers = headerMapFromCurl(raw);
|
|
78
|
+
var auth = bearer(headers.authorization);
|
|
79
|
+
if (!auth) return null;
|
|
80
|
+
var cookies = {};
|
|
81
|
+
if (headers.cookie) cookies[host] = headers.cookie;
|
|
82
|
+
return { authorization: auth, cookies: cookies, preferredHost: host, accountEmail: null };
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
function headersFor(host, authorization, cookie) {
|
|
86
|
+
var headers = {
|
|
87
|
+
Accept: "application/json, text/plain, */*",
|
|
88
|
+
"Accept-Language": "en-US,en;q=0.9",
|
|
89
|
+
"User-Agent": USER_AGENT,
|
|
90
|
+
"Sec-Fetch-Dest": "empty",
|
|
91
|
+
"Sec-Fetch-Mode": "cors",
|
|
92
|
+
"Sec-Fetch-Site": "same-site",
|
|
93
|
+
Authorization: authorization,
|
|
94
|
+
Origin: ORIGIN_REFERER,
|
|
95
|
+
Referer: ORIGIN_REFERER,
|
|
96
|
+
};
|
|
97
|
+
if (cookie) headers.Cookie = cookie;
|
|
98
|
+
return headers;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
function parseJsonResponse(ctx, resp, label) {
|
|
102
|
+
if (ctx.util.isAuthStatus(resp.status)) throw { auth: true, message: "ZoomMate login required." };
|
|
103
|
+
if (resp.status < 200 || resp.status >= 300) throw "ZoomMate " + label + " error: HTTP " + resp.status + ".";
|
|
104
|
+
var json = ctx.util.tryParseJson(resp.bodyText);
|
|
105
|
+
if (!json || typeof json !== "object") throw { parse: true, message: "ZoomMate " + label + " parse failed." };
|
|
106
|
+
return json;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
function mintBearerOnHost(ctx, cookie, host) {
|
|
110
|
+
var resp = ctx.util.request({
|
|
111
|
+
method: "GET",
|
|
112
|
+
url: "https://" + host + "/ai-computer/api/v1/login/?continue=https://zoommate.zoom.us/",
|
|
113
|
+
headers: {
|
|
114
|
+
Cookie: cookie,
|
|
115
|
+
Accept: "application/json, text/plain, */*",
|
|
116
|
+
"Accept-Language": "en-US,en;q=0.9",
|
|
117
|
+
"User-Agent": USER_AGENT,
|
|
118
|
+
Origin: ORIGIN_REFERER,
|
|
119
|
+
Referer: ORIGIN_REFERER,
|
|
120
|
+
"Sec-Fetch-Dest": "empty",
|
|
121
|
+
"Sec-Fetch-Mode": "cors",
|
|
122
|
+
"Sec-Fetch-Site": "same-site",
|
|
123
|
+
},
|
|
124
|
+
timeoutMs: 15000,
|
|
125
|
+
});
|
|
126
|
+
var json = parseJsonResponse(ctx, resp, "login bootstrap");
|
|
127
|
+
var nak = json.data && trim(json.data.nak);
|
|
128
|
+
if (!nak) throw { parse: true, message: "Missing nak in ZoomMate login bootstrap response." };
|
|
129
|
+
var email = json.data && json.data.user_profile && trim(json.data.user_profile.email);
|
|
130
|
+
var cookies = {};
|
|
131
|
+
cookies[host] = cookie;
|
|
132
|
+
return { authorization: bearer(nak), cookies: cookies, preferredHost: host, accountEmail: email };
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
function mintBearer(ctx, cookie) {
|
|
136
|
+
var last = null;
|
|
137
|
+
for (var i = 0; i < API_HOSTS.length; i++) {
|
|
138
|
+
try {
|
|
139
|
+
return mintBearerOnHost(ctx, cookie, API_HOSTS[i]);
|
|
140
|
+
} catch (error) {
|
|
141
|
+
if (error && (error.auth || error.parse)) throw error;
|
|
142
|
+
last = error;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
throw last || "No ZoomMate API host succeeded.";
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
function contextFromInput(ctx, raw) {
|
|
149
|
+
var curl = contextFromCurl(raw || "");
|
|
150
|
+
if (curl) return curl;
|
|
151
|
+
var envToken = env(ctx, "ZOOMMATE_BEARER_TOKEN");
|
|
152
|
+
var configuredToken = setting(ctx, ["bearerToken", "token"]);
|
|
153
|
+
var explicitBearer = bearer(configuredToken) || bearer(envToken);
|
|
154
|
+
if (explicitBearer && (raw === configuredToken || raw === envToken)) {
|
|
155
|
+
return { authorization: explicitBearer, cookies: {}, preferredHost: null, accountEmail: null };
|
|
156
|
+
}
|
|
157
|
+
if (raw && (/^bearer\s+\S+$/i.test(raw) || raw.indexOf("=") < 0 && raw.indexOf(" ") < 0)) {
|
|
158
|
+
return { authorization: bearer(raw), cookies: {}, preferredHost: null, accountEmail: null };
|
|
159
|
+
}
|
|
160
|
+
var cookie = normalizeCookie(raw);
|
|
161
|
+
if (!cookie) throw "Paste a ZoomMate cURL capture with Authorization: Bearer, set ZOOMMATE_BEARER_TOKEN, or set ZOOMMATE_COOKIE.";
|
|
162
|
+
return mintBearer(ctx, cookie);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
function hosts(preferred) {
|
|
166
|
+
if (preferred === "ai.zoom.us") return ["ai.zoom.us", "zoommate.zoom.us"];
|
|
167
|
+
if (preferred === "zoommate.zoom.us") return ["zoommate.zoom.us", "ai.zoom.us"];
|
|
168
|
+
return API_HOSTS;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
function cookieFor(context, host) {
|
|
172
|
+
if (!context.cookies) return null;
|
|
173
|
+
return context.cookies[host] || null;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
function fetchStatus(ctx, context) {
|
|
177
|
+
var order = hosts(context.preferredHost);
|
|
178
|
+
var last = null;
|
|
179
|
+
for (var i = 0; i < order.length; i++) {
|
|
180
|
+
var host = order[i];
|
|
181
|
+
try {
|
|
182
|
+
var resp = ctx.util.request({
|
|
183
|
+
method: "GET",
|
|
184
|
+
url: "https://" + host + STATUS_PATH,
|
|
185
|
+
headers: headersFor(host, context.authorization, cookieFor(context, host)),
|
|
186
|
+
timeoutMs: 15000,
|
|
187
|
+
});
|
|
188
|
+
return parseJsonResponse(ctx, resp, "API");
|
|
189
|
+
} catch (error) {
|
|
190
|
+
if (error && (error.auth || error.parse)) throw error;
|
|
191
|
+
last = error;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
throw last || "No ZoomMate API host succeeded.";
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
function dateFromMillis(ms) {
|
|
198
|
+
var n = Number(ms);
|
|
199
|
+
var date = new Date(n);
|
|
200
|
+
return Number.isFinite(n) && n > 0 && Number.isFinite(date.getTime()) ? date.toISOString() : null;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
function snapshot(ctx, envelope, email) {
|
|
204
|
+
var status = envelope && envelope.data && envelope.data.credit_status;
|
|
205
|
+
if (!status) throw "Missing credit_status object.";
|
|
206
|
+
var unlimited = status.is_unlimited === true;
|
|
207
|
+
if (unlimited) return { displayName: "ZoomMate", source: "web", lines: [ctx.line.badge({ label: "Credits", text: "Unlimited" })] };
|
|
208
|
+
var budget = status.budget_cap;
|
|
209
|
+
var used = status.used_credit;
|
|
210
|
+
if (typeof budget !== "number" || !Number.isFinite(budget) || budget <= 0 || typeof used !== "number" || !Number.isFinite(used) || used < 0) throw "ZoomMate returned invalid credit values.";
|
|
211
|
+
var percent = Math.max(0, Math.min(100, used / budget * 100));
|
|
212
|
+
var start = Number(status.cycle_start_date) || 0;
|
|
213
|
+
var end = Number(status.cycle_end_date) || 0;
|
|
214
|
+
var opts = {
|
|
215
|
+
label: "Credits",
|
|
216
|
+
used: percent,
|
|
217
|
+
limit: 100,
|
|
218
|
+
format: { kind: "percent" },
|
|
219
|
+
detail: unlimited ? "Unlimited credits" : "Credits",
|
|
220
|
+
};
|
|
221
|
+
if (!unlimited && budget > 0) {
|
|
222
|
+
var reset = dateFromMillis(end);
|
|
223
|
+
if (reset) opts.resetsAt = reset;
|
|
224
|
+
if (end > start) opts.periodDurationMs = Math.max(1, Math.round((end - start) / 60000)) * 60 * 1000;
|
|
225
|
+
}
|
|
226
|
+
var lines = [ctx.line.progress(opts)];
|
|
227
|
+
if (email) lines.push(ctx.line.text({ label: "Account", value: email }));
|
|
228
|
+
return { displayName: "ZoomMate", source: "web", plan: email ? "Cookie" : null, lines: lines };
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
function probe(ctx) {
|
|
232
|
+
var raw = directInput(ctx);
|
|
233
|
+
if (!raw) throw "ZoomMate session not configured. Paste cURL, set ZOOMMATE_BEARER_TOKEN, or set ZOOMMATE_COOKIE.";
|
|
234
|
+
var requestContext = contextFromInput(ctx, raw);
|
|
235
|
+
try {
|
|
236
|
+
return snapshot(ctx, fetchStatus(ctx, requestContext), requestContext.accountEmail);
|
|
237
|
+
} catch (error) {
|
|
238
|
+
if (error && error.message) throw error.message;
|
|
239
|
+
throw error;
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
globalThis.__openusage_plugin = { id: "zoommate", probe: probe };
|
|
244
|
+
})();
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"id": "zoommate",
|
|
4
|
+
"name": "ZoomMate",
|
|
5
|
+
"version": "0.1.0",
|
|
6
|
+
"entry": "plugin.js",
|
|
7
|
+
"enabledByDefault": false,
|
|
8
|
+
"supportedModes": [
|
|
9
|
+
"web"
|
|
10
|
+
],
|
|
11
|
+
"autoMode": "web",
|
|
12
|
+
"webUrl": "https://zoommate.zoom.us",
|
|
13
|
+
"usageDashboardUrl": "https://zoommate.zoom.us/#/?settings=credit-usage",
|
|
14
|
+
"statusPageUrl": "https://www.zoomstatus.com/",
|
|
15
|
+
"links": [
|
|
16
|
+
{
|
|
17
|
+
"label": "Dashboard",
|
|
18
|
+
"url": "https://zoommate.zoom.us/#/?settings=credit-usage"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"label": "Status",
|
|
22
|
+
"url": "https://www.zoomstatus.com/"
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
"envVars": [
|
|
26
|
+
"ZOOMMATE_BEARER_TOKEN",
|
|
27
|
+
"ZOOMMATE_COOKIE"
|
|
28
|
+
]
|
|
29
|
+
}
|
package/usagestat
CHANGED
|
Binary file
|
package/usagestatd
CHANGED
|
Binary file
|