Summary
Part of #488. Update the root libscope package to function as a CLI meta-package that depends on all @libscope/* sub-packages, and move remaining orchestration code (src/LibScope.ts, file watcher, workspace utilities) here.
Problem / Motivation
Once the sub-packages are extracted, the root libscope package needs to be updated to depend on them rather than containing their code directly. It also remains the one justified "kitchen-sink" entry point — end users installing the CLI tool expect everything to work out of the box.
Proposed Solution
- Update root
package.json to depend on all @libscope/* packages
- Move
src/LibScope.ts (main orchestration class), src/core/watcher.ts, src/core/workspace.ts, and src/core/repo.ts into the CLI package (these are lifecycle/process-management concerns)
- Keep
src/cli/ here as the Commander.js entry point
- Ensure all existing CLI commands continue to work by importing from the appropriate sub-packages
Acceptance Criteria
Out of Scope
- Changes to CLI command behaviour or flags
- Changes to the
LibScope public API class interface
Technical Notes
- This is the last step — should be done after all sub-packages are extracted and publishing is set up
src/LibScope.ts currently imports directly from src/core/ — all those imports need to point to @libscope/core instead
- Lifecycle modules to keep here:
watcher.ts (chokidar), scheduler.ts (node-cron, moves from connectors or stays here), workspace.ts, repo.ts
Summary
Part of #488. Update the root
libscopepackage to function as a CLI meta-package that depends on all@libscope/*sub-packages, and move remaining orchestration code (src/LibScope.ts, file watcher, workspace utilities) here.Problem / Motivation
Once the sub-packages are extracted, the root
libscopepackage needs to be updated to depend on them rather than containing their code directly. It also remains the one justified "kitchen-sink" entry point — end users installing the CLI tool expect everything to work out of the box.Proposed Solution
package.jsonto depend on all@libscope/*packagessrc/LibScope.ts(main orchestration class),src/core/watcher.ts,src/core/workspace.ts, andsrc/core/repo.tsinto the CLI package (these are lifecycle/process-management concerns)src/cli/here as the Commander.js entry pointAcceptance Criteria
libscopepackage depends on all@libscope/*sub-packages in itspackage.jsonsrc/LibScope.tsis the orchestration entry point and imports from sub-packages (not from internalsrc/core/paths)npm install -g libscopeinstalls the CLI and all sub-packages correctlydist/cli/index.js,dist/mcp/server.js, anddist/core/index.jscontinue to exist at their current paths for backwards compatibilityOut of Scope
LibScopepublic API class interfaceTechnical Notes
src/LibScope.tscurrently imports directly fromsrc/core/— all those imports need to point to@libscope/coreinsteadwatcher.ts(chokidar),scheduler.ts(node-cron, moves from connectors or stays here),workspace.ts,repo.ts