Releases: Jaylor-Wang/dsh-tool-ast-grep
Releases · Jaylor-Wang/dsh-tool-ast-grep
Release list
v0.1.1 - AST Structural Search & Outline for DeepSeek Harness
English
Overview
dsh-tool-ast-grep is an AST-based structural code search and outline inspection plugin for DeepSeek Harness (DSH), powered by the high-performance Rust tool ast-grep.
Key Features & Capabilities
ast_search(Structural Code Search):- Code search using AST patterns and meta-variables (
$NAME,$$$). - Robust multi-line matching independent of formatting and whitespace.
- Node kind filtering (
class_declaration,function_declaration,interface_declaration, etc.). - Configurable strictness modes (
smart,relaxed,ast,cst) and glob filtering.
- Code search using AST patterns and meta-variables (
ast_outline(Ultra-Compact Outline Extraction):- Extracts structural outlines (functions, classes, interfaces, types, exports) from source files.
- Saves 80%–95% context tokens compared to reading entire source files.
- Depth-controlled inspection (top-level vs. nested methods).
- Multi-Language Support:
- TypeScript (
ts,tsx), JavaScript (js,jsx), Python (py), Rust (rs), Go (go), Java (java), C/C++ (c,cpp,h,hpp).
- TypeScript (
- Robust Cross-Platform Execution:
- Direct process invocation via structured arguments — completely immune to Windows shell argument escaping and quoting bugs.
Installation
- npm Package:
dsh-tool-ast-grep - Install:
dsh plugin --profile web add dsh-tool-ast-grep # or npm install dsh-tool-ast-grep
中文
概述
dsh-tool-ast-grep 是专为 DeepSeek Harness (DSH) 打造的语法级 AST 代码检索与大纲提取插件,基于 Rust 高性能语法解析引擎 ast-grep 驱动。
核心特性
ast_search(AST 结构化语法检索):- 支持 AST 模式语法与元变量(如
$NAME匹配单节点,$$$匹配任意多节点/参数列表)。 - 语法无关排版:不论单行书写、换行还是空格差异,均能精准命中。
- 支持语法节点类型(Kind)检索(如
class_declaration、interface_declaration、method_definition)。 - 支持严格度模式(
smart,relaxed,ast,cst)及 Glob 路径过滤。
- 支持 AST 模式语法与元变量(如
ast_outline(极速代码大纲提取):- 一键提取源码文件的结构化大纲(顶层函数、类、接口、类型别名、导出语句)。
- 相比读取全量文件内容,可大幅节省 80%–95% 的上下文 Token 消耗。
- 支持大纲深度控制(仅顶层定义 vs 展开类内部方法与构造函数)。
- 广泛的语言支持:
- 原生支持 TypeScript/TSX、JavaScript/JSX、Python、Rust、Go、Java、C/C++ 等主流编程语言。
- 采用 Node.js 原生参数列表调用,彻底规避 Windows Shell 下特殊字符与引号转义失效问题。
安装方式
- npm 地址:
dsh-tool-ast-grep - 安装命令:
dsh plugin --profile web add dsh-tool-ast-grep # 或 npm install dsh-tool-ast-grep
v0.1.0 - Initial AST Structural Search & Outline Release
English
Overview
dsh-tool-ast-grep is an AST-based structural code search and outline inspection plugin for DeepSeek Harness (DSH), powered by the high-performance Rust tool ast-grep.
Key Features & Capabilities
ast_search(Structural Code Search):- Multi-line structural pattern search using AST patterns and meta-variables (
$NAME,$$$). - Robust multi-line matching independent of formatting and whitespace.
- Node kind filtering (
class_declaration,function_declaration,interface_declaration, etc.). - Configurable strictness modes (
smart,relaxed,ast,cst) and glob filtering.
- Multi-line structural pattern search using AST patterns and meta-variables (
ast_outline(Ultra-Compact Outline Extraction):- Extracts structural outlines (functions, classes, interfaces, types, exports) from source files.
- Saves 80%–95% context tokens compared to reading entire source files.
- Depth-controlled inspection (top-level vs. nested methods).
- Multi-Language Support:
- TypeScript (
ts,tsx), JavaScript (js,jsx), Python (py), Rust (rs), Go (go), Java (java), C/C++ (c,cpp,h,hpp).
- TypeScript (
- Robust Cross-Platform Execution:
- Direct process invocation via structured arguments — completely immune to Windows shell argument escaping and quoting bugs.
Installation
- npm Package:
dsh-tool-ast-grep@0.1.0 - Install:
dsh plugin --profile web add dsh-tool-ast-grep # or npm install dsh-tool-ast-grep@0.1.0
中文
概述
dsh-tool-ast-grep 是专为 DeepSeek Harness (DSH) 打造的语法级 AST 代码检索与大纲提取插件,基于 Rust 高性能语法解析引擎 ast-grep 驱动。
核心特性
ast_search(AST 结构化语法检索):- 支持 AST 模式语法与元变量(如
$NAME匹配单节点,$$$匹配任意多节点/参数列表)。 - 语法无关排版:不论单行书写、换行还是空格差异,均能精准命中。
- 支持语法节点类型(Kind)检索(如
class_declaration、interface_declaration、method_definition)。 - 支持严格度模式(
smart,relaxed,ast,cst)及 Glob 路径过滤。
- 支持 AST 模式语法与元变量(如
ast_outline(极速代码大纲提取):- 一键提取源码文件的结构化大纲(顶层函数、类、接口、类型别名、导出语句)。
- 相比读取全量文件内容,可大幅节省 80%–95% 的上下文 Token 消耗。
- 支持大纲深度控制(仅顶层定义 vs 展开类内部方法与构造函数)。
- 广泛的语言支持:
- 原生支持 TypeScript/TSX、JavaScript/JSX、Python、Rust、Go、Java、C/C++ 等主流编程语言。
- 采用 Node.js 原生参数列表调用,彻底规避 Windows Shell 下特殊字符与引号转义失效问题。
安装方式
- npm 地址:
dsh-tool-ast-grep@0.1.0 - 安装命令:
dsh plugin --profile web add dsh-tool-ast-grep # 或 npm install dsh-tool-ast-grep@0.1.0