feat(neuralwatt): add Neuralwatt provider plugin#410
feat(neuralwatt): add Neuralwatt provider plugin#410hungps wants to merge 5 commits intorobinebers:mainfrom
Conversation
robinebers
left a comment
There was a problem hiding this comment.
Hey! This is Rob's AI reviewer. Thanks for the contribution.
Clean plugin overall. The structure, icon, API call, env allowlist, and tests look solid. Two things to fix before merge:
-
Fix number parsing —
readNumber()currently turnsnull,"", andfalseinto0. That can show fake “0 used” usage if Neuralwatt leaves a field out. Please only accept real numbers or non-empty numeric strings. -
Add the provider docs — new bundled providers should be added to
README.mdand have adocs/providers/neuralwatt.mdpage, matching the other providers.
Small extra: new plugins usually start at version 0.0.1, but this one starts at 0.0.2.
Everything else looks good.
886cc41 to
d6c0b57
Compare
|
@robinebers done and done! |
There was a problem hiding this comment.
Pull request overview
Adds a new Neuralwatt provider plugin to the OpenUsage plugin ecosystem, including sandbox env-var allowlisting so the plugin can authenticate via NEURALWATT_API_KEY, plus documentation and README discovery.
Changes:
- Added a new
plugins/neuralwattprovider plugin that callsGET https://api.neuralwatt.com/v1/quotaand renders subscription energy, balance credits, and an accounting method badge. - Added vitest coverage for key success/error cases for the new plugin.
- Allowlisted
NEURALWATT_API_KEYin the Tauri host API and added provider docs + README link.
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src-tauri/src/plugin_engine/host_api.rs | Allowlists NEURALWATT_API_KEY for plugin sandbox env access |
| plugins/neuralwatt/plugin.js | Implements Neuralwatt quota fetch + parsing into OpenUsage metric lines |
| plugins/neuralwatt/plugin.json | Declares plugin manifest (id/name/icon/line definitions) |
| plugins/neuralwatt/plugin.test.js | Adds automated tests for Neuralwatt plugin behavior |
| plugins/neuralwatt/icon.svg | Adds provider icon |
| docs/providers/neuralwatt.md | Adds provider documentation and expected mapping/errors |
| README.md | Links Neuralwatt provider docs from the provider list |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
792a051 to
ae724b8
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ae724b84f1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
f1961ee to
575ba66
Compare
|
@codex review again |
|
Codex Review: Didn't find any major issues. Another round soon, please! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 7 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…tion Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
plugin.json declared Method as a progress line with primaryOrder, but probe() emits it as ctx.line.badge(). This mismatch caused wrong UI skeleton rendering and incorrect tray primary-candidate ordering.
…with probe and docs
71712b7 to
fd78d3f
Compare
Description
Adds a new provider plugin for Neuralwatt, an energy-based AI inference provider. The plugin calls
GET /v1/quotausing aNEURALWATT_API_KEYbearer token and surfaces:Also adds
NEURALWATT_API_KEYto the host API env var allowlist so the plugin sandbox can read it.Related Issue
Fixes #409
Type of Change
Testing
bun run buildand it succeededbun run testand all tests passbun tauri devScreenshots
Checklist
mainbranchSummary by cubic
Adds a
neuralwattprovider plugin that callsGET https://api.neuralwatt.com/v1/quotausingNEURALWATT_API_KEYto show subscription energy, credits balance, and accounting method. Adds docs and allowlists the env var so the plugin can run.New Features
NEURALWATT_API_KEY.resetsAtandperiodDurationMs; only for Subscription.Bug Fixes
badgeinplugins/neuralwatt/plugin.jsonto matchprobe()and fix UI skeleton and tray ordering.probe()and docs.Written for commit fd78d3f. Summary will update on new commits.