Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🔐 feat: Implement Allowed Action Domains #4964

Merged
merged 4 commits into from
Dec 12, 2024

Conversation

danny-avila
Copy link
Owner

Summary

Relevant Docs PR: LibreChat-AI/librechat.ai#182

I added support for allowed action domains, refactored domain checking functions, fixed typedef naming issues, updated the data provider version to 0.7.62, and improved typing in RequestExecutor.

  • Implemented allowed action domains feature by adding isActionDomainAllowed and isEmailDomainAllowed functions in api/server/services/domains.js.
  • Updated middleware checkDomainAllowed and services AuthService to use isEmailDomainAllowed instead of isDomainAllowed, ensuring consistent domain validation.
  • Modified ActionService, ToolService, and related routes to check if action domains are allowed before processing actions.
  • Added comprehensive tests for domain validation in domains.spec.js and updated existing tests accordingly.
  • Removed isDomainAllowed.js and its tests, consolidating domain checks into domains.js.
  • Fixed typedef naming by renaming TAgentsEndpoint to TAssistantEndpoint in api/typedefs.js for consistency.
  • Updated librechat-data-provider package version to 0.7.62 in packages/data-provider/package.json.
  • Improved typing in RequestExecutor class in packages/data-provider/src/actions.ts.

Change Type

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

Checklist

  • My code adheres to this project's style guidelines
  • I have performed a self-review of my own code
  • I have commented in any complex areas of my code
  • I have made pertinent documentation changes
  • My changes do not introduce new warnings
  • I have written tests demonstrating that my changes are effective or that my feature works
  • Local unit tests pass with my changes
  • Any changes dependent on mine have been merged and published in downstream modules.
  • A pull request for updating the documentation has been submitted.

@danny-avila danny-avila changed the title 🔐 feat: Implement Allowed Action Domains and Fix Typedefs 🔐 feat: Implement Allowed Action Domains Dec 12, 2024
@danny-avila danny-avila merged commit 69bd8e3 into main Dec 12, 2024
4 checks passed
@danny-avila danny-avila deleted the feat/actions-allowed-domains branch December 12, 2024 17:52
Tsounguinzo pushed a commit to Tsounguinzo/LibreChat that referenced this pull request Dec 14, 2024
* chore: RequestExecutor typing

* feat: allowed action domains

* fix: rename TAgentsEndpoint to TAssistantEndpoint in typedefs

* chore: update librechat-data-provider version to 0.7.62
owengo pushed a commit to openwengo/LibreChat that referenced this pull request Dec 20, 2024
* chore: RequestExecutor typing

* feat: allowed action domains

* fix: rename TAgentsEndpoint to TAssistantEndpoint in typedefs

* chore: update librechat-data-provider version to 0.7.62
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.

1 participant