feat: migrate integrations from database to file-based architecture#911
Conversation
Split integration storage into file-based config (config.json + connector.ts) and a slim integrationCredentials DB table for encrypted secrets and runtime state. Adds unified loader, credential CRUD, file I/O actions, shared Zod schema, and updates all consumers (agent tools, workflow engine, frontend, OAuth flows, RLS) to work with the new dual-source model.
…ased integrations - Add organization membership checks to all public credential queries, mutations, and actions to prevent cross-org access - Add audit logging to credential update and delete mutations using existing AuditLogHelpers with sensitive field redaction - Add requiredScopes field to Convex operation validators to match Zod schema - Fix broken test mock in workflow_syntax_tool referencing old API path - Derive integration type from sqlConnectionConfig in agents/queries - Remove unreferenced listIntegrationsForAgent dead code
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
Add missing iconStorageId arg to saveCredentials action, fix type predicate narrowing for file-based integration merging, and remove unused IntegrationOperation/SqlOperation type exports.
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughThis pull request refactors the integration system from a database-only architecture to a hybrid file-based and credential-backed model. Integration definitions are now stored as Estimated code review effort🎯 4 (Complex) | ⏱️ ~75 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Summary
config.json+connector.ts) and a slimintegrationCredentialsDB table for encrypted secrets and runtime stateTest plan
Summary by CodeRabbit
Release Notes
New Features
Improvements