You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Update and adds a basic credential field for use in integrations like reddit
Changes 🏗️
Reddit
Drops the Username and Password for reddit from the .env
Updates Reddit block with modern provider and credential system
moves clientid and secret to reading from Settings().secrets rather than input on the block
moves user agent to Settings().config
SMTP
update the block to support user password and modern credentials
Add UserPasswordCredentials
Default API key expiry to None explicitly to help type cohesion
add UserPasswordCredentials with a weird form of bearer which we ideally remove because basic is a more appropriate name. This is dependent on Webhook _base allowing a subset of Credentials
Update Credentials and CredentialsType
Fix various OAuth2Credentials | APIKeyCredentials -> Credentials mismatches between base and derived classes
Replace router/@post(create_api_key_credentials) with create_credentials which now takes a credential and is discriminated by type provided by the credential
UI/Frontend
Updated various pages to have saved credential types, icons, and text for User Pass Credentials
Update credential input to have an input/modals/selects for user/pass combos
Update the types to support having user/pass credentials too (we should make this more centralized)
Update Credential Providres to support user_password
Update client.ts to support the new streamlined credential creation method and endpoint
DX
Sort the provider names again
TODO:
Reactivate Conditionally Disabling Reddit - [ ] Look into moving Webhooks base to allow subset of Credentials rather than requiring all webhooks to support the input of all valid Credentials types Out of scope
Figure out the singleCredential calculator in credentials-input.tsx so that it also respects User Pass credentials and isn't a logic mess
Checklist 📋
For code changes:
I have clearly listed my changes in the PR description
I have made a test plan
I have tested my changes according to the test plan:
...
Example test plan
Create from scratch and execute an agent with at least 3 blocks
Import an agent from file upload, and confirm it executes correctly
Upload agent to marketplace
Import an agent from marketplace and confirm it executes correctly
Edit an agent from monitor, and confirm it executes correctly
For configuration changes:
.env.example is updated or already compatible with my changes
docker-compose.yml is updated or already compatible with my changes
I have included a list of my configuration changes in the PR description (under Changes)
Examples of configuration changes
Changing ports
Adding new services that need to communicate with each other
Here are some key observations to aid the review process:
⏱️ Estimated effort to review: 4 🔵🔵🔵🔵⚪
🧪 PR contains tests
🔒 Security concerns
Password Storage: The implementation stores user passwords as part of credentials. Even though they are stored as SecretStr, ensure proper encryption at rest and in transit, and validate the security of the basic auth token generation in UserPasswordCredentials.bearer() method which exposes username:password in base64 encoding.
The Reddit client initialization uses settings.secrets directly without validation. Consider adding validation for required credentials and proper error handling if secrets are missing.
The createAPIKeyCredentials and createUserPasswordCredentials methods have duplicated code patterns. Consider refactoring to a generic createCredentials method.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Update and adds a basic credential field for use in integrations like reddit
Changes 🏗️
Reddit
Settings().secrets
rather than input on the blockSettings().config
SMTP
Add
UserPasswordCredentials
UserPasswordCredentials
with a weird form ofbearer
which we ideally remove becausebasic
is a more appropriate name. This is dependent onWebhook _base
allowing a subset ofCredentials
Credentials
andCredentialsType
OAuth2Credentials | APIKeyCredentials
->Credentials
mismatches between base and derived classesrouter/@post(create_api_key_credentials)
withcreate_credentials
which now takes a credential and is discriminated bytype
provided by the credentialUI/Frontend
client.ts
to support the new streamlined credential creation method and endpointDX
TODO:
- [ ] Look into moving Webhooks base to allow subset ofOut of scopeCredentials
rather than requiring all webhooks to support the input of all validCredentials
typessingleCredential
calculator incredentials-input.tsx
so that it also respects User Pass credentials and isn't a logic messChecklist 📋
For code changes:
Example test plan
For configuration changes:
.env.example
is updated or already compatible with my changesdocker-compose.yml
is updated or already compatible with my changesExamples of configuration changes