-
Notifications
You must be signed in to change notification settings - Fork 0
feat: extract @libscope/connectors — third-party sync adapters #493
Copy link
Copy link
Open
Labels
Description
Summary
Part of #488. Extract src/connectors/ into a standalone @libscope/connectors package, and fix the inward coupling where src/core/scheduler.ts currently imports connector modules directly.
Problem / Motivation
Connector code (Notion, Slack, Confluence, OneNote, Obsidian) has no circular dependencies with core — but src/core/scheduler.ts imports connectors directly, creating an inward dep that prevents core from being independent. This coupling needs to be inverted before connectors can be a separate package.
Proposed Solution
- Move
src/connectors/intopackages/connectors/ - Move
src/core/scheduler.tsintopackages/connectors/(it's logically a connectors concern — scheduling syncs) - Update scheduler to accept connector functions as injected dependencies rather than importing them directly
@libscope/connectorsdepends on@libscope/corefor indexing;@libscope/corehas zero imports from connectors
Acceptance Criteria
-
@libscope/connectorsbuilds independently; zero imports from@libscope/connectorsexist in@libscope/core -
src/core/scheduler.tsis moved topackages/connectors/and no longer lives in the core package - The scheduler's connector dependencies are injected (passed in) rather than statically imported
- All connector sync functions (notion, slack, confluence, onenote, obsidian, docs) work correctly end-to-end
- Existing CLI connector commands (
libscope connect,libscope sync) pass integration tests
Out of Scope
- Adding new connectors
- Changing connector authentication flows
Technical Notes
- Connectors:
notion.ts,slack.ts,confluence.ts,onenote.ts,obsidian.ts,docs.ts - The only inward dep to fix is
src/core/scheduler.ts→ connectors. All other connector deps are outward (connectors → core/indexing) src/connectors/index.tscurrently exports connector config functions and some DB helpers — review what belongs in connectors vs core
Reactions are currently unavailable