-
Notifications
You must be signed in to change notification settings - Fork 0
feat: update libscope CLI as monorepo meta-package #497
Copy link
Copy link
Open
Labels
Description
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.jsonto depend on all@libscope/*packages - Move
src/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) - 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
- Root
libscopepackage depends on all@libscope/*sub-packages in itspackage.json - All 30+ CLI commands pass integration tests after the migration
-
src/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 correctly -
dist/cli/index.js,dist/mcp/server.js, anddist/core/index.jscontinue to exist at their current paths for backwards compatibility
Out of Scope
- Changes to CLI command behaviour or flags
- Changes to the
LibScopepublic 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.tscurrently imports directly fromsrc/core/— all those imports need to point to@libscope/coreinstead- Lifecycle modules to keep here:
watcher.ts(chokidar),scheduler.ts(node-cron, moves from connectors or stays here),workspace.ts,repo.ts
Reactions are currently unavailable