Expand description
§Service Layer Types - Abstraction Glue for Thread
This module provides language-agnostic types that abstract over ast-grep functionality while preserving all its powerful capabilities. The service layer acts as glue between file-level ast-grep operations and codebase-level graph intelligence.
§Core Philosophy
- Preserve Power: All ast-grep capabilities (Matcher, Replacer, Position) remain accessible
- Bridge Levels: Connect file-level AST operations to codebase-level relational intelligence
- Enable Execution: Abstract over different execution environments (rayon, cloud workers)
- Commercial Ready: Clear boundaries for commercial extensions
§Key Types
ParsedDocument- Wraps ast-grep Root while enabling cross-file intelligenceCodeMatch- Extends NodeMatch with codebase-level contextExecutionScope- Defines execution boundaries (file, module, codebase)AnalysisContext- Carries execution and analysis context across service boundaries
Structs§
- Analysis
Context - Execution context that carries state across service boundaries
- Call
Info - Information about a function call
- Code
Match - A pattern match that extends ast-grep NodeMatch with codebase-level context.
- Cross
File Relationship - Cross-file relationships for graph intelligence
- Document
Metadata - Metadata about a parsed document for codebase-level analysis
- Execution
Config - Configuration for execution environments
- Export
Info - Information about an export
- Import
Info - Information about an import
- Match
Context - Context for pattern matches
- Node
- Node
Match - Parsed
Document - A parsed document that wraps ast-grep Root with additional codebase-level metadata.
- Pinned
Node Data - Position
- Range
- Range representing a span of text in source code
- Root
- Support
Lang Err - Symbol
Info - Information about a symbol definition
- Type
Info - Information about type usage
Enums§
- Analysis
Depth - Depth of analysis to perform
- Execution
Scope - Execution scope for analysis operations
- Execution
Strategy - Execution strategy for different environments
- Export
Kind - Import
Kind - Relationship
Kind - Support
Lang - Symbol
Kind - Type
Kind - Visibility