Skip to content

fix(Gemini companion): expand resolution to scan packages directory#86

Merged
slkiser merged 2 commits into
slkiser:mainfrom
anthonyhaussman:tone/fix/companion-plugin-resolution
May 12, 2026
Merged

fix(Gemini companion): expand resolution to scan packages directory#86
slkiser merged 2 commits into
slkiser:mainfrom
anthonyhaussman:tone/fix/companion-plugin-resolution

Conversation

@anthonyhaussman
Copy link
Copy Markdown
Contributor

@anthonyhaussman anthonyhaussman commented May 12, 2026

Summary

Update getCompanionResolvePaths to recursively scan the packages subdirectory for installed companion plugins.
This ensures that plugins installed via the package manager are correctly discovered and loaded during runtime resolution.

Current output:

> npx @slkiser/opencode-quota show
[Copilot] (personal)
Quota window                        19d
████████████████████░░░░░░░░░░░░░░░░░░░   52% left

Gemini CLI: Unavailable (not detected)

With local fix:

> node ./dist/bin/opencode-quota.js show           
[Copilot] (personal)
Quota window                        19d
████████████████████░░░░░░░░░░░░░░░░░░░   52% left

[Gemini CLI]
Quota window                         1h
███████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░   17% left
Quota window                        18h
███████████████████████████████████████   99% left
Quota window                           
███████████████████████████████████████  100% left

Test locally in OpenCode:

# Quota (/quota) 15:48 12/05/2026
→ [Copilot] (personal)
  Quota: 143/300     █████████░░░░░░░░░  52% left (resets in 19d)
→ [Gemini CLI]
  Gemini Pro:        ███░░░░░░░░░░░░░░░  17% left (resets in 1h)
  Gemini Flash:      ██████████████████  99% left (resets in 18h)
  Gemini Flash Lite: ██████████████████  100% left (resets in 24h)

# Quota Status (opencode-quota v3.8.2) (/quota_status) 15:49 12/05/2026
...
google_gemini_cli:
- auth_state: present
- auth_source: google
- account_count: 1
- valid_account_count: 1
- companion_package_state: present
- companion_package_path: /home/anthony/.cache/opencode/packages/opencode-gemini-auth@latest/node_modules/opencode-gemini-auth/dist/index.js
- live_probe: success
- live_entry_1: [Gemini CLI] percent_remaining=17 reset_at=2026-05-12T14:59:02Z
...

Linked Issue

#85

OpenCode Validation

  • Current production released OpenCode version tested: 1.14.48
  • Why this version is relevant to the fix: -

Quality Checklist

  • I ran npm run typecheck
  • I ran npm test
  • I ran npm run build
  • This is the smallest safe root-cause fix (no unnecessary hook/output mutation logic)
  • I preserved behavioral invariants and updated/added boundary tests as needed
  • I updated docs for user-facing workflow/command/config changes (README.md and CONTRIBUTING.md when applicable)
  • For new API-key/token providers, I started from contributing/provider-template/ or explained why the template does not apply
  • For provider setup/auth wording changes, I checked the relevant dummy .ts template in contributing/provider-template/ and verified README.md against src/lib/provider-metadata.ts (authentication/authFallbacks) and provider auth resolver/diagnostics behavior

Update getCompanionResolvePaths to recursively scan the packages
subdirectory for installed companion plugins. This ensures that
plugins installed via the package manager are correctly discovered
and loaded during runtime resolution.
@anthonyhaussman anthonyhaussman marked this pull request as ready for review May 12, 2026 13:44
@anthonyhaussman anthonyhaussman changed the title Tone/fix/companion plugin resolution fix(companion): expand resolution to scan packages directory May 12, 2026
@anthonyhaussman anthonyhaussman changed the title fix(companion): expand resolution to scan packages directory fix(Gemini companion): expand resolution to scan packages directory May 12, 2026
@slkiser slkiser merged commit 0d60230 into slkiser:main May 12, 2026
3 checks passed
@anthonyhaussman anthonyhaussman deleted the tone/fix/companion-plugin-resolution branch May 12, 2026 15:43
@anthonyhaussman anthonyhaussman restored the tone/fix/companion-plugin-resolution branch May 12, 2026 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants