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/ into packages/connectors/
- Move
src/core/scheduler.ts into packages/connectors/ (it's logically a connectors concern — scheduling syncs)
- Update scheduler to accept connector functions as injected dependencies rather than importing them directly
@libscope/connectors depends on @libscope/core for indexing; @libscope/core has zero imports from connectors
Acceptance Criteria
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.ts currently exports connector config functions and some DB helpers — review what belongs in connectors vs core
Summary
Part of #488. Extract
src/connectors/into a standalone@libscope/connectorspackage, and fix the inward coupling wheresrc/core/scheduler.tscurrently imports connector modules directly.Problem / Motivation
Connector code (Notion, Slack, Confluence, OneNote, Obsidian) has no circular dependencies with core — but
src/core/scheduler.tsimports 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
src/connectors/intopackages/connectors/src/core/scheduler.tsintopackages/connectors/(it's logically a connectors concern — scheduling syncs)@libscope/connectorsdepends on@libscope/corefor indexing;@libscope/corehas zero imports from connectorsAcceptance Criteria
@libscope/connectorsbuilds independently; zero imports from@libscope/connectorsexist in@libscope/coresrc/core/scheduler.tsis moved topackages/connectors/and no longer lives in the core packagelibscope connect,libscope sync) pass integration testsOut of Scope
Technical Notes
notion.ts,slack.ts,confluence.ts,onenote.ts,obsidian.ts,docs.tssrc/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