Skip to content

feat: formalize @libscope/lite as standalone published package #492

@RobertLD

Description

@RobertLD

Summary

Part of #488. Formalize the existing ./lite export as a standalone published npm package @libscope/lite. The code boundary already exists — this is primarily a packaging and publishing task.

Problem / Motivation

LibScopeLite is already isolated in src/lite/ with a clean export boundary and no imports from CLI, MCP, connectors, or servers. It's the ideal embeddable interface for apps and agents that want in-process semantic search. Currently it's only accessible as a sub-path export of the main libscope package, which means consumers still install the full package.

Proposed Solution

Move src/lite/ into packages/lite/ with its own package.json. The existing libscope/lite import path should continue to resolve via a re-export in the root package for backwards compatibility.

Acceptance Criteria

  • @libscope/lite is published as a standalone package and installable independently
  • import { LibScopeLite } from '@libscope/lite' works correctly
  • The existing import { LibScopeLite } from 'libscope/lite' import continues to resolve (backwards-compatible re-export)
  • @libscope/lite builds and tests pass independently, depending only on @libscope/core
  • Optional tree-sitter chunker (TreeSitterChunker) remains available as before, gated on peer deps

Out of Scope

  • Changes to the LibScopeLite API
  • Adding new functionality to the lite interface

Technical Notes

  • src/lite/ contains: index.ts (public API), core.ts (LibScopeLite class), normalize.ts, chunker-treesitter.ts
  • Depends on: @libscope/core (indexing, search, rag, bulk, ratings), @libscope/parsers (via normalize.ts)
  • Tree-sitter packages remain optional peer dependencies: tree-sitter, tree-sitter-javascript, tree-sitter-typescript, etc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestrefactorCode refactoring

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions