{"_id":"@abstractframework/monitor-gpu","_rev":"7-1db3667201b22ce7d73d09100799fb13","name":"@abstractframework/monitor-gpu","dist-tags":{"latest":"0.1.9"},"versions":{"0.1.0":{"name":"@abstractframework/monitor-gpu","version":"0.1.0","keywords":["abstractframework","gpu","monitoring","widget","histogram"],"author":{"name":"Laurent-Philippe Albou"},"license":"MIT","_id":"@abstractframework/monitor-gpu@0.1.0","maintainers":[{"name":"lpalbou","email":"lpalbou@gmail.com"}],"homepage":"https://github.com/lpalbou/AbstractUIC#readme","bugs":{"url":"https://github.com/lpalbou/AbstractUIC/issues"},"dist":{"shasum":"eafd274a7a36a94ae4438031f22b796da5633c09","tarball":"https://registry.npmjs.org/@abstractframework/monitor-gpu/-/monitor-gpu-0.1.0.tgz","fileCount":7,"integrity":"sha512-4WIsVS2TI75LnHrc/6xLg4uCG3vUGP1Zrffb5NxhALVwWz/H98kAOUbQk1G4akbvm+D8QE45AC9XnTdynoYrCw==","signatures":[{"sig":"MEUCIQC7xqLES3uJ97P+S+oUPxYvbCwAkSU+uA6DwtTb50ylXgIgMBHde0U+bPYZzoYXUw0eLfKZOkIXMN3MNpYB5BA4MyE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":23041},"main":"./src/index.js","type":"module","types":"./src/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./src/index.d.ts","default":"./src/index.js"}},"gitHead":"57486fdba1fbce7e3e9075908073031c70eb83ae","scripts":{"test":"node --test"},"_npmUser":{"name":"lpalbou","email":"lpalbou@gmail.com"},"repository":{"url":"git+https://github.com/lpalbou/AbstractUIC.git","type":"git","directory":"monitor-gpu"},"_npmVersion":"10.9.2","description":"Lightweight GPU utilization histogram widget for AbstractFramework clients (polls AbstractGateway host metrics with Bearer auth).","directories":{},"sideEffects":false,"_nodeVersion":"23.11.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/monitor-gpu_0.1.0_1770194395374_0.7629634496344828","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@abstractframework/monitor-gpu","version":"0.1.2","keywords":["abstractframework","gpu","monitoring","widget","histogram"],"author":{"name":"Laurent-Philippe Albou"},"license":"MIT","_id":"@abstractframework/monitor-gpu@0.1.2","maintainers":[{"name":"lpalbou","email":"lpalbou@gmail.com"}],"homepage":"https://github.com/lpalbou/AbstractUIC#readme","bugs":{"url":"https://github.com/lpalbou/AbstractUIC/issues"},"dist":{"shasum":"72020bd8c1bb88d261c212d4423a991973a2d89a","tarball":"https://registry.npmjs.org/@abstractframework/monitor-gpu/-/monitor-gpu-0.1.2.tgz","fileCount":7,"integrity":"sha512-Q0xwmHCY3WCiSZPf4Yd84DgAzVIwYNYJrRKs65zRjPqufBKHaPT/kOgcC0fptZsEVI4bh9YRTWjDUMcKnpZ6uA==","signatures":[{"sig":"MEUCIQClt+Th1+hIKBWUHmuAnZA826OfaqwGoci/WwL98TuadAIgKpvWYEPc0vU3T4iCPQfAyrjMSl1ca1GtBoF0xjYYF6Q=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":23110},"main":"./src/index.js","type":"module","types":"./src/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./src/index.d.ts","default":"./src/index.js"}},"gitHead":"3da7f7f10639dd53f4b7d6e72748f9432c0d8860","scripts":{"test":"node --test"},"_npmUser":{"name":"lpalbou","email":"lpalbou@gmail.com"},"repository":{"url":"git+https://github.com/lpalbou/AbstractUIC.git","type":"git","directory":"monitor-gpu"},"_npmVersion":"10.9.2","description":"Lightweight GPU utilization histogram widget for AbstractFramework clients (polls AbstractGateway host metrics with Bearer auth).","directories":{},"sideEffects":false,"_nodeVersion":"23.11.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/monitor-gpu_0.1.2_1770278720688_0.3241078730760387","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@abstractframework/monitor-gpu","version":"0.1.3","keywords":["abstractframework","gpu","monitoring","widget","histogram"],"author":{"name":"Laurent-Philippe Albou"},"license":"MIT","_id":"@abstractframework/monitor-gpu@0.1.3","maintainers":[{"name":"lpalbou","email":"lpalbou@gmail.com"}],"homepage":"https://github.com/lpalbou/AbstractUIC#readme","bugs":{"url":"https://github.com/lpalbou/AbstractUIC/issues"},"dist":{"shasum":"3c39326a392d440f42af1a6672bc8635a17c9c60","tarball":"https://registry.npmjs.org/@abstractframework/monitor-gpu/-/monitor-gpu-0.1.3.tgz","fileCount":7,"integrity":"sha512-H0C8dEeGFEDxrl5ZfyBtGsRrPxDaENkfWSAR2fqB1dPOlEsIkFz0MmHOYhdJdBK+n+GeWPJTn7KpnVqn08qYrQ==","signatures":[{"sig":"MEYCIQCXMaildOoj5Mi5yfugh4kj/91vqOXVTYbhDDamIu8fMgIhAK+4vl38hK0FsmhzX//+oJZetYgZ2kkCYnbnrUbJOAzC","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":23110},"main":"./src/index.js","type":"module","types":"./src/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./src/index.d.ts","default":"./src/index.js"}},"gitHead":"3da7f7f10639dd53f4b7d6e72748f9432c0d8860","scripts":{"test":"node --test"},"_npmUser":{"name":"lpalbou","email":"lpalbou@gmail.com"},"repository":{"url":"git+https://github.com/lpalbou/AbstractUIC.git","type":"git","directory":"monitor-gpu"},"_npmVersion":"10.9.2","description":"Lightweight GPU utilization histogram widget for AbstractFramework clients (polls AbstractGateway host metrics with Bearer auth).","directories":{},"sideEffects":false,"_nodeVersion":"23.11.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/monitor-gpu_0.1.3_1770287261966_0.3100889960119537","host":"s3://npm-registry-packages-npm-production"}},"0.1.6":{"name":"@abstractframework/monitor-gpu","version":"0.1.6","keywords":["abstractframework","gpu","monitoring","widget","histogram"],"author":{"name":"Laurent-Philippe Albou"},"license":"MIT","_id":"@abstractframework/monitor-gpu@0.1.6","maintainers":[{"name":"lpalbou","email":"lpalbou@gmail.com"}],"homepage":"https://github.com/lpalbou/AbstractUIC#readme","bugs":{"url":"https://github.com/lpalbou/AbstractUIC/issues"},"dist":{"shasum":"8c5dac829700e58dd505a1ee212bd0932631d21a","tarball":"https://registry.npmjs.org/@abstractframework/monitor-gpu/-/monitor-gpu-0.1.6.tgz","fileCount":7,"integrity":"sha512-GZTQbXBdy+UCyLxXmD0xqsAPZe3y+tyrzxJ2DWrHvItjER+BQA0m7n6hv8060GS6j767Ql9Jc7Xmf9Cow0Q7ug==","signatures":[{"sig":"MEYCIQDYkJSpT+6H7x0VQdVHjELS2Argoic8qldgAjgRM7y5VgIhAM8BOCDueWq4O0jZx/GA6sH9abPSjkD/sDH5cyzx6QdJ","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@abstractframework%2fmonitor-gpu@0.1.6","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":23139},"main":"./src/index.js","type":"module","types":"./src/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./src/index.d.ts","default":"./src/index.js"}},"gitHead":"20c88108affd1995ae900ceb92eb993d91b73e43","scripts":{"test":"node --test"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:b9a60ce1-1b38-406d-9eb0-85b2100b2af2"}},"repository":{"url":"git+https://github.com/lpalbou/AbstractUIC.git","type":"git","directory":"monitor-gpu"},"_npmVersion":"11.12.1","description":"Lightweight GPU utilization histogram widget for AbstractFramework clients (polls AbstractGateway host metrics with Bearer auth).","directories":{},"sideEffects":false,"_nodeVersion":"24.15.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/monitor-gpu_0.1.6_1779780290752_0.16011686416785365","host":"s3://npm-registry-packages-npm-production"}},"0.1.7":{"name":"@abstractframework/monitor-gpu","version":"0.1.7","keywords":["abstractframework","gpu","monitoring","widget","histogram"],"author":{"name":"Laurent-Philippe Albou"},"license":"MIT","_id":"@abstractframework/monitor-gpu@0.1.7","maintainers":[{"name":"lpalbou","email":"lpalbou@gmail.com"}],"homepage":"https://github.com/lpalbou/AbstractUIC#readme","bugs":{"url":"https://github.com/lpalbou/AbstractUIC/issues"},"dist":{"shasum":"c5911a96e460c3a4d83e9661d30497c83b277cdf","tarball":"https://registry.npmjs.org/@abstractframework/monitor-gpu/-/monitor-gpu-0.1.7.tgz","fileCount":7,"integrity":"sha512-4lc9e5lgVdtR3VZKKkA0OcvmHDbcfRYacITt62DjaP36usAr3598NyN95p9oynUGxEAPodjscea5r+XdGTkKFA==","signatures":[{"sig":"MEUCIQCkx3E0Qmkbotp9aSz7lViyZ1VZRQ1ijvJtPRQI/IAQOgIgYEr9Oq55eL4lt8G9ldnS2lNP7nUU4kb5lYNLb5qkUKI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@abstractframework%2fmonitor-gpu@0.1.7","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":23139},"main":"./src/index.js","type":"module","types":"./src/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./src/index.d.ts","default":"./src/index.js"}},"gitHead":"230de255d635a1cac3fabd0abd07d341b22c4f2f","scripts":{"test":"node --test"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:b9a60ce1-1b38-406d-9eb0-85b2100b2af2"}},"repository":{"url":"git+https://github.com/lpalbou/AbstractUIC.git","type":"git","directory":"monitor-gpu"},"_npmVersion":"11.13.0","description":"Lightweight GPU utilization histogram widget for AbstractFramework clients (polls AbstractGateway host metrics with Bearer auth).","directories":{},"sideEffects":false,"_nodeVersion":"24.16.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/monitor-gpu_0.1.7_1780213959330_0.8611731285149264","host":"s3://npm-registry-packages-npm-production"}},"0.1.8":{"name":"@abstractframework/monitor-gpu","version":"0.1.8","keywords":["abstractframework","gpu","monitoring","widget","histogram"],"author":{"name":"Laurent-Philippe Albou"},"license":"MIT","_id":"@abstractframework/monitor-gpu@0.1.8","maintainers":[{"name":"lpalbou","email":"lpalbou@gmail.com"}],"homepage":"https://github.com/lpalbou/AbstractUIC#readme","bugs":{"url":"https://github.com/lpalbou/AbstractUIC/issues"},"dist":{"shasum":"306b5918c574b91856a9e26c5535c1510794cb48","tarball":"https://registry.npmjs.org/@abstractframework/monitor-gpu/-/monitor-gpu-0.1.8.tgz","fileCount":7,"integrity":"sha512-bcalElVJsBgOp8D8r7ta+NGIkddKe61GKeqtgMxYE0WOU13q7poEmo3BDPcTaL/mdepYdsNPX0fZ8EgQfU244g==","signatures":[{"sig":"MEYCIQDXD1zWhLhnHBDf8Ukv4E30Ab7MzICZKXMk5hGdfLUiZgIhAIcPxOSMugYW+bUOfRnK/sYvU3NFa1PCvP50GC7gPLWs","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@abstractframework%2fmonitor-gpu@0.1.8","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":23139},"main":"./src/index.js","type":"module","types":"./src/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./src/index.d.ts","default":"./src/index.js"}},"gitHead":"5f37c4960d2953d163651430ddb77090761f06aa","scripts":{"test":"node --test"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:b9a60ce1-1b38-406d-9eb0-85b2100b2af2"}},"repository":{"url":"git+https://github.com/lpalbou/AbstractUIC.git","type":"git","directory":"monitor-gpu"},"_npmVersion":"11.13.0","description":"Lightweight GPU utilization histogram widget for AbstractFramework clients (polls AbstractGateway host metrics with Bearer auth).","directories":{},"sideEffects":false,"_nodeVersion":"24.16.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/monitor-gpu_0.1.8_1781459596858_0.1896077320175933","host":"s3://npm-registry-packages-npm-production"}},"0.1.9":{"name":"@abstractframework/monitor-gpu","version":"0.1.9","description":"Lightweight GPU utilization histogram widget for AbstractFramework clients (polls AbstractGateway host metrics with Bearer auth).","type":"module","author":{"name":"Laurent-Philippe Albou"},"license":"MIT","keywords":["abstractframework","gpu","monitoring","widget","histogram"],"repository":{"type":"git","url":"git+https://github.com/lpalbou/AbstractUIC.git","directory":"monitor-gpu"},"homepage":"https://github.com/lpalbou/AbstractUIC#readme","publishConfig":{"access":"public"},"main":"./src/index.js","types":"./src/index.d.ts","exports":{".":{"types":"./src/index.d.ts","default":"./src/index.js"}},"scripts":{"test":"node --test"},"engines":{"node":">=18.0.0"},"sideEffects":false,"gitHead":"be9c6fc98da6894df366c55340b1d17680e05825","_id":"@abstractframework/monitor-gpu@0.1.9","bugs":{"url":"https://github.com/lpalbou/AbstractUIC/issues"},"_nodeVersion":"24.19.0","_npmVersion":"11.17.0","dist":{"integrity":"sha512-LsrlQ1YR8e4sT74Ttif9zD/H62cA9e9AvZnB58wsTabkCNtqLhDywmCvqznBHehH2W2nhcnxnhm07lRF8YqY4g==","shasum":"2033d72e86d23f07a205a935cf410f5739c518f3","tarball":"https://registry.npmjs.org/@abstractframework/monitor-gpu/-/monitor-gpu-0.1.9.tgz","fileCount":7,"unpackedSize":24399,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@abstractframework%2fmonitor-gpu@0.1.9","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIHofqfFRcI6dQpoKjYDNPuwUps96UWBcNiBhUcOKCPPTAiEAg/zC6gaxWZa9VERvXNyCTF0ZetGptJeml8Zcez7Ve7s="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:b9a60ce1-1b38-406d-9eb0-85b2100b2af2"}},"directories":{},"maintainers":[{"name":"lpalbou","email":"lpalbou@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/monitor-gpu_0.1.9_1787986436319_0.5752018598289959"},"_hasShrinkwrap":false}},"time":{"created":"2026-02-04T08:39:55.288Z","modified":"2026-08-29T06:53:56.767Z","0.1.0":"2026-02-04T08:39:55.503Z","0.1.2":"2026-02-05T08:05:20.835Z","0.1.3":"2026-02-05T10:27:42.124Z","0.1.6":"2026-05-26T07:24:50.893Z","0.1.7":"2026-05-31T07:52:39.460Z","0.1.8":"2026-06-14T17:53:17.000Z","0.1.9":"2026-08-29T06:53:56.455Z"},"bugs":{"url":"https://github.com/lpalbou/AbstractUIC/issues"},"author":{"name":"Laurent-Philippe Albou"},"license":"MIT","homepage":"https://github.com/lpalbou/AbstractUIC#readme","keywords":["abstractframework","gpu","monitoring","widget","histogram"],"repository":{"type":"git","url":"git+https://github.com/lpalbou/AbstractUIC.git","directory":"monitor-gpu"},"description":"Lightweight GPU utilization histogram widget for AbstractFramework clients (polls AbstractGateway host metrics with Bearer auth).","maintainers":[{"name":"lpalbou","email":"lpalbou@gmail.com"}],"readme":"# @abstractframework/monitor-gpu\n\nSmall, dependency-free GPU utilization widget that renders a mini histogram and polls a secured backend endpoint.\n\nIn AbstractFramework deployments, the default backend endpoint is AbstractGateway:\n- `GET /api/gateway/host/metrics/gpu`\n- Auth: `Authorization: Bearer <token>`\n\n## Install\n\n- Workspace: add a dependency on `@abstractframework/monitor-gpu`\n- npm: `npm i @abstractframework/monitor-gpu`\n\n## Usage (Custom Element)\n\n```js\nimport { registerMonitorGpuWidget } from \"@abstractframework/monitor-gpu\";\n\nregisterMonitorGpuWidget(); // defines <monitor-gpu>\n\nconst el = document.createElement(\"monitor-gpu\");\nel.baseUrl = \"http://localhost:8080\"; // optional (defaults to same-origin)\nel.token = \"your-gateway-token\"; // or el.getToken = async () => ...\nel.tickMs = 1500;\nel.historySize = 20;\nel.mode = \"full\"; // \"full\" | \"icon\"\ndocument.body.appendChild(el);\n```\n\nYou can also set the non-secret options via attributes:\n\n```html\n<monitor-gpu base-url=\"http://localhost:8080\" tick-ms=\"1500\" history-size=\"20\" mode=\"icon\"></monitor-gpu>\n```\n\n## Usage (Imperative helper)\n\n```js\nimport { createMonitorGpuWidget } from \"@abstractframework/monitor-gpu\";\n\nconst widget = createMonitorGpuWidget(document.querySelector(\"#gpu\"), {\n  baseUrl: \"http://localhost:8080\",\n  token: \"your-gateway-token\",\n  tickMs: 1500,\n  historySize: 20,\n});\n\n// later\nwidget.destroy();\n```\n\n## Backend contract (AbstractGateway)\n\nThe widget treats the GPU metrics payload as “supported” unless `supported === false` and extracts utilization via `extractUtilizationGpuPct(payload)`:\n\n- `payload.utilization_gpu_pct` (number) **or**\n- `payload.gpus[][].utilization_gpu_pct` (numbers; averaged)\n\nMinimal examples:\n\n```json\n{ \"supported\": true, \"utilization_gpu_pct\": 23.0 }\n```\n\n```json\n{ \"supported\": true, \"gpus\": [{ \"utilization_gpu_pct\": 10.0 }, { \"utilization_gpu_pct\": 36.0 }] }\n```\n\nIf `supported=false`, the widget shows `N/A`.\n\n## Security notes\n- Do not pass tokens in URLs.\n- Prefer HTTPS in production.\n- For cross-origin usage, configure your backend CORS policy to allow your UI origin and keep the endpoint protected (Bearer token or equivalent).\n\n## Tests\n\n```bash\ncd monitor-gpu\nnpm test\n```\n\n## Related docs\n\n- Getting started: [`docs/getting-started.md`](../docs/getting-started.md)\n- API reference: [`docs/api.md`](../docs/api.md)\n- Architecture: [`docs/architecture.md`](../docs/architecture.md)\n","readmeFilename":"README.md"}