## Implemented: Trello Authentication & Connection Plugin
### Changes
- **TrelloClient** class in `src/trello_plugin/client.py` — REST API wrapper for Trello
- **3 tools** in `src/trello_plugin/tools.py`:
- `trello_verify_credentials` — verify API key/token against Trello API
- `trello_list_boards` — list accessible boards
- `trello_disconnect` — clear in-memory credentials
- **18 tests** in `tests/test_auth.py` covering all success and error paths
- **Spec document** in `docs/backend/trello-auth-spec.md`
- **pyproject.toml** for package setup with dev dependencies
### Configuration
Users set `TRELLO_API_KEY` and `TRELLO_TOKEN` environment variables. No interactive UI needed — credentials are read from env at runtime.
### Acceptance Criteria Covered
- ✅ 1.1: Provide Trello API Key and Token (env vars)
- ✅ 1.2: Verify credentials with Trello API
- ✅ 1.3: List accessible Trello boards
- ✅ 1.4: Disconnect from Trello (clear credentials)
Closes #1
Add TrelloClient for Trello REST API interaction with env-var-based
credential management (TRELLO_API_KEY, TRELLO_TOKEN).
Implements:
- trello_verify_credentials — verify API key/token against Trello API
- trello_list_boards — list accessible Trello boards
- trello_disconnect — clear in-memory credentials
Includes full test suite (18 tests), spec document, and plugin metadata.
Issue: #1
Reid's Review — PR #5 on HermesFactory/trello-plugin
Verdict:🔴 Changes Required
🔴 Blocking Issues
These MUST be resolved before this PR can be merged.
[File: src/trello_plugin/client.py | Line ~25]missing type hints on class attribute
The TrelloClient class defines api_key, token, and _session attributes implicitly in __init__. These should be declared at the class level with type annotations for proper static analysis.
[File: src/trello_plugin/client.py | Line ~92]missing type guard for Any return
The _get method returns dict[str, Any] but the response has two different shapes: error vs success. Consider using TypedDict or a discriminated union to distinguish these.
[File: tests/test_auth.py | Line ~59]unused import pattern
The clear_env fixture manually manipulates os.environ instead of using monkeypatch which is pytest-recommended. Either use monkeypatch or remove the misleading comment.
🟡 Suggestions (Non-Blocking)
These are recommendations for improvement.
[File: src/trello_plugin/tools.py] The trello_disconnect message says "Reconnect by calling trello_verify_credentials after setting TRELLO_API_KEY and TRELLO_TOKEN" but the client auto-reconnects on next tool call if env vars are set. Consider aligning messaging.
[File: src/trello_plugin/client.py] Consider adding a docstring to the module-level constant TRELLO_API_BASE.
1.1 Hermes Agent User can provide Trello API Key and Token
1.2 Hermes Agent can verify Trello credentials
1.3 Hermes Agent can list accessible Trello boards
1.4 Hermes Agent can disconnect from Trello
## Reid's Review — PR #5 on HermesFactory/trello-plugin
**Verdict:** 🔴 Changes Required
---
### 🔴 Blocking Issues
> These MUST be resolved before this PR can be merged.
- **[File: src/trello_plugin/client.py | Line ~25]** `missing type hints on class attribute`
The `TrelloClient` class defines `api_key`, `token`, and `_session` attributes implicitly in `__init__`. These should be declared at the class level with type annotations for proper static analysis.
- **[File: src/trello_plugin/client.py | Line ~92]** `missing type guard for Any return`
The `_get` method returns `dict[str, Any]` but the response has two different shapes: error vs success. Consider using `TypedDict` or a discriminated union to distinguish these.
- **[File: tests/test_auth.py | Line ~59]** `unused import pattern`
The `clear_env` fixture manually manipulates `os.environ` instead of using `monkeypatch` which is pytest-recommended. Either use `monkeypatch` or remove the misleading comment.
---
### 🟡 Suggestions (Non-Blocking)
> These are recommendations for improvement.
- **[File: src/trello_plugin/tools.py]** The `trello_disconnect` message says "Reconnect by calling trello_verify_credentials after setting TRELLO_API_KEY and TRELLO_TOKEN" but the client auto-reconnects on next tool call if env vars are set. Consider aligning messaging.
- **[File: src/trello_plugin/client.py]** Consider adding a docstring to the module-level constant `TRELLO_API_BASE`.
---
### 📋 AC Coverage
> Based on linked issue #1
- [x] **1.1** Hermes Agent User can provide Trello API Key and Token
- [x] **1.2** Hermes Agent can verify Trello credentials
- [x] **1.3** Hermes Agent can list accessible Trello boards
- [x] **1.4** Hermes Agent can disconnect from Trello
1.1 Hermes Agent User can provide Trello API Key and Token — Users set env vars, plugin reads them at runtime
1.2 Hermes Agent can verify Trello credentials — trello_verify_credentials tool calls /members/me endpoint with clear success/failure feedback
1.3 Hermes Agent can list accessible Trello boards — trello_list_boards tool fetches and returns board list with id, name, url, closed, starred fields
1.4 Hermes Agent can disconnect from Trello — trello_disconnect clears in-memory client credentials; documented that token revocation requires Trello account settings
🔍 Code Quality Notes
The previously identified blocking issues have been resolved:
✅ Class-level type hints now declared (api_key: str, token: str, _session: requests.Session)
✅ TypedDict response contracts (SuccessResponse, ErrorResponse) with TypeGuard helper _is_success() used correctly
✅ Test fixtures use monkeypatch properly instead of manual os.environ manipulation
All methods have comprehensive docstrings and proper error handling. No further blocking issues found.
## Reid's Review — PR #5 on HermesFactory/trello-plugin
**Verdict:** ✅ Approved — Blocking issues resolved
---
### 📋 AC Coverage
> Based on linked issue #1
- [x] **1.1** Hermes Agent User can provide Trello API Key and Token — Users set env vars, plugin reads them at runtime
- [x] **1.2** Hermes Agent can verify Trello credentials — `trello_verify_credentials` tool calls `/members/me` endpoint with clear success/failure feedback
- [x] **1.3** Hermes Agent can list accessible Trello boards — `trello_list_boards` tool fetches and returns board list with id, name, url, closed, starred fields
- [x] **1.4** Hermes Agent can disconnect from Trello — `trello_disconnect` clears in-memory client credentials; documented that token revocation requires Trello account settings
---
### 🔍 Code Quality Notes
The previously identified blocking issues have been resolved:
- ✅ Class-level type hints now declared (`api_key: str`, `token: str`, `_session: requests.Session`)
- ✅ TypedDict response contracts (`SuccessResponse`, `ErrorResponse`) with `TypeGuard` helper `_is_success()` used correctly
- ✅ Test fixtures use `monkeypatch` properly instead of manual os.environ manipulation
All methods have comprehensive docstrings and proper error handling. No further blocking issues found.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Implemented: Trello Authentication & Connection Plugin
Changes
src/trello_plugin/client.py— REST API wrapper for Trellosrc/trello_plugin/tools.py:trello_verify_credentials— verify API key/token against Trello APItrello_list_boards— list accessible boardstrello_disconnect— clear in-memory credentialstests/test_auth.pycovering all success and error pathsdocs/backend/trello-auth-spec.mdConfiguration
Users set
TRELLO_API_KEYandTRELLO_TOKENenvironment variables. No interactive UI needed — credentials are read from env at runtime.Acceptance Criteria Covered
Closes #1
Reid's Review — PR #5 on HermesFactory/trello-plugin
Verdict: 🔴 Changes Required
🔴 Blocking Issues
[File: src/trello_plugin/client.py | Line ~25]
missing type hints on class attributeThe
TrelloClientclass definesapi_key,token, and_sessionattributes implicitly in__init__. These should be declared at the class level with type annotations for proper static analysis.[File: src/trello_plugin/client.py | Line ~92]
missing type guard for Any returnThe
_getmethod returnsdict[str, Any]but the response has two different shapes: error vs success. Consider usingTypedDictor a discriminated union to distinguish these.[File: tests/test_auth.py | Line ~59]
unused import patternThe
clear_envfixture manually manipulatesos.environinstead of usingmonkeypatchwhich is pytest-recommended. Either usemonkeypatchor remove the misleading comment.🟡 Suggestions (Non-Blocking)
[File: src/trello_plugin/tools.py] The
trello_disconnectmessage says "Reconnect by calling trello_verify_credentials after setting TRELLO_API_KEY and TRELLO_TOKEN" but the client auto-reconnects on next tool call if env vars are set. Consider aligning messaging.[File: src/trello_plugin/client.py] Consider adding a docstring to the module-level constant
TRELLO_API_BASE.📋 AC Coverage
Reid's Review — PR #5 on HermesFactory/trello-plugin
Verdict: ✅ Approved — Blocking issues resolved
📋 AC Coverage
trello_verify_credentialstool calls/members/meendpoint with clear success/failure feedbacktrello_list_boardstool fetches and returns board list with id, name, url, closed, starred fieldstrello_disconnectclears in-memory client credentials; documented that token revocation requires Trello account settings🔍 Code Quality Notes
The previously identified blocking issues have been resolved:
api_key: str,token: str,_session: requests.Session)SuccessResponse,ErrorResponse) withTypeGuardhelper_is_success()used correctlymonkeypatchproperly instead of manual os.environ manipulationAll methods have comprehensive docstrings and proper error handling. No further blocking issues found.