Skip to content

feat(grokbot): add the Grok Bot weekly quota provider - #109

Merged
bernardopg merged 5 commits into
mainfrom
feat/grokbot-provider
Nov 8, 2026
Merged

bernardopg merged 5 commits into
mainfrom
feat/grokbot-provider

Conversation

@bernardopg

Copy link
Copy Markdown
Owner

Stacked on #108. Merge the stack bottom-up with a merge commit; until #108 merges, this diff also shows its commits.

Summary

Split out of #101: keeps @DotRedstone's Grok Bot adapter commit, with one follow-up commit on top.

The new grokbot provider (alias grok-bot) reads the weekly Grok Bot Plan pool and its reset time from the signed-in Grok Bot desktop app (GetSandUsageStatus). When a request fails, it falls back to the app's own persisted reading. The original commit includes the logo, all five locales, readiness, the provider matrix, CI registration and tests/test-grokbot.sh.

fix(grokbot): handle keyring-backed sessions and document the adapter fixes:

  • Keyring-backed sessions. The adapter stripped three bytes and decrypted every token with the basic store's fixed key. On a desktop with a Secret Service, Electron keeps the key in the keyring (safeStorage v11). Decryption failed and the card asked to sign in again, while readiness reported Ready because a token was present. The adapter now reads the prefix first:
    • a v10 token is decrypted as before;
    • a v11 session is never sent anywhere: the card serves the app's own saved reading (which needs no token) when there is one, otherwise it says to start Grok Bot with --password-store=basic, and readiness reports the same;
    • a token that is not a safeStorage blob is neither decrypted nor ready.
  • Docs. GROKBOT_CONFIG_DIR and GROKBOT_API_URL are documented in configuration.md. The latter receives the session token, so the docs say so. Also new: a providers.md section (credentials, endpoint, offline behaviour, stability) and a troubleshooting entry.
  • CHANGELOG. Only the Grok Bot entry remains; the other bullets of feat(providers): add Grok Bot weekly quota adapter and fix bar/balance display #101 belong to their own PRs.

I have no Grok Bot install here, so the live endpoint is covered only by the offline fixtures. Those fixtures now also cover v11 with and without a saved reading, readiness for v11, and an unknown token format.

Related issues

Part of #101.

Type of change

  • New provider
  • Bug fix
  • Enhancement
  • Documentation / i18n
  • CI / tooling

Checklist

  • plugin.json .version and CHANGELOG.md are consistent (not release-bearing; ## Unreleased bullet)
  • New/changed provider scripts are executable and emit valid JSON
  • i18n/en.json keys have translations in every locale
  • Every commit is signed off (git commit -s) under the DCO
  • CI is green

Local gates: check-metadata, check-changelog, check-dco, bash -n, shellcheck -S warning, qmllint, actionlint, gitleaks, every tests/test-*.sh (including the native widget runtime on Wayland), and AIOC_COVERAGE_MIN=95 scripts/coverage.

@github-actions github-actions Bot added documentation Improvements or additions to documentation area:providers Provider adapters (providers/) area:i18n Translations (i18n/) area:assets Logos and static assets (assets/) area:qml QML UI code area:ci CI, workflows, tooling labels Nov 8, 2026
DotRedstone and others added 4 commits November 8, 2026 16:02
Add the grokbot (alias grok-bot) desktop provider reading weekly Grok Bot Plan usage and reset timestamps from the signed-in session via GetSandUsageStatus, with local persistence snapshot fallback when offline.

Signed-off-by: dotredstone <[email protected]>
The adapter stripped three bytes and decrypted every token with the
basic store's fixed key. A Grok Bot install on a desktop with a Secret
Service keeps its key in the keyring (safeStorage v11), so decryption
failed and the card asked the user to sign in again, while readiness
reported Ready because a token was present.

Read the safeStorage prefix first. A v10 token is decrypted as before;
a v11 session is never sent anywhere: the card serves the app's own
saved reading when there is one, otherwise it says to start Grok Bot
with --password-store=basic, and readiness reports the same. A token
that is not a safeStorage blob is neither decrypted nor ready.

Document GROKBOT_CONFIG_DIR and GROKBOT_API_URL, add a provider
section and a troubleshooting entry, and keep only the Grok Bot entry
in the CHANGELOG: the other bullets of the original change belong to
their own pull requests.

Signed-off-by: Bernardo Pinto Gomes <[email protected]>
@bernardopg
bernardopg force-pushed the feat/grokbot-provider branch from 87373fd to 654ac42 Compare November 8, 2026 19:03
@bernardopg
bernardopg merged commit 6caccd0 into main Nov 8, 2026
20 checks passed
@bernardopg
bernardopg deleted the feat/grokbot-provider branch November 8, 2026 19:33
gtheys pushed a commit to gtheys/AiOverviewControl that referenced this pull request Nov 12, 2026
Generated with scripts/render-contributors. The contributors API lists
alvorithm already but lags behind on DotRedstone, whose commits from
bernardopg#108 and bernardopg#109 resolve to the account; that login was passed as a
one-off pinned entry for this run. The grid is append-only, so later
renders keep both entries without a change to PINNED.

Signed-off-by: Bernardo Pinto Gomes <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:assets Logos and static assets (assets/) area:ci CI, workflows, tooling area:i18n Translations (i18n/) area:providers Provider adapters (providers/) area:qml QML UI code documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants