@defai.digital/automatosx 8.0.14 → 8.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/settings.local.json +5 -1
- package/CLAUDE.md +8 -8
- package/README.md +24 -44
- package/dist/parser/ParserRegistry.d.ts.map +1 -1
- package/dist/parser/ParserRegistry.js +0 -2
- package/dist/parser/ParserRegistry.js.map +1 -1
- package/package.json +9 -12
- package/src/parser/ParserRegistry.ts +0 -2
- package/pnpm-workspace.yaml +0 -2
- package/src/parser/SystemVerilogParserService.ts +0 -177
|
@@ -74,7 +74,11 @@
|
|
|
74
74
|
"Bash(do echo \"=== $pkg ===\")",
|
|
75
75
|
"Bash(done)",
|
|
76
76
|
"Bash(pnpm run build:cli:*)",
|
|
77
|
-
"Bash(npm publish:*)"
|
|
77
|
+
"Bash(npm publish:*)",
|
|
78
|
+
"WebSearch",
|
|
79
|
+
"Bash(npm uninstall:*)",
|
|
80
|
+
"Bash(npm link:*)",
|
|
81
|
+
"Bash(pnpm list:*)"
|
|
78
82
|
],
|
|
79
83
|
"deny": [],
|
|
80
84
|
"ask": []
|
package/CLAUDE.md
CHANGED
|
@@ -4,16 +4,16 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
|
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
# AutomatosX v8.0.
|
|
7
|
+
# AutomatosX v8.0.16 - Code Intelligence Platform
|
|
8
8
|
|
|
9
|
-
Production-ready code intelligence platform with AI agents, workflow orchestration, Tree-sitter parsing, SQLite FTS5 search, and
|
|
9
|
+
Production-ready code intelligence platform with AI agents, workflow orchestration, Tree-sitter parsing, SQLite FTS5 search, and 44 language support.
|
|
10
10
|
|
|
11
|
-
**Current Status**: v8.0.
|
|
11
|
+
**Current Status**: v8.0.16 - ✅ **PRODUCTION-READY**
|
|
12
12
|
|
|
13
13
|
**Completion**: 95% (all features implemented, 745+ tests passing)
|
|
14
14
|
|
|
15
15
|
**Key Features**:
|
|
16
|
-
- ✅ Code Intelligence (
|
|
16
|
+
- ✅ Code Intelligence (44 languages)
|
|
17
17
|
- ✅ AI Agent System (21 agents)
|
|
18
18
|
- ✅ Multi-Provider AI (Claude, Gemini, OpenAI)
|
|
19
19
|
- ✅ Interactive CLI (ChatGPT-style REPL)
|
|
@@ -129,7 +129,7 @@ pnpm run clean
|
|
|
129
129
|
|
|
130
130
|
**TypeScript Layer** (`src/`)
|
|
131
131
|
- CLI framework (Commander.js) with interactive mode
|
|
132
|
-
- Code intelligence with SQLite + Tree-sitter (
|
|
132
|
+
- Code intelligence with SQLite + Tree-sitter (44 languages)
|
|
133
133
|
- Service layer, file I/O, telemetry
|
|
134
134
|
- LSP server for editor integration
|
|
135
135
|
- Web UI with React + Redux + Material-UI
|
|
@@ -150,10 +150,10 @@ The system has eight major layers working together:
|
|
|
150
150
|
- Vector storage: `sqlite-vec` and `sqlite-vss` for semantic search with embeddings
|
|
151
151
|
|
|
152
152
|
**2. Parser Layer** (`src/parser/`)
|
|
153
|
-
- `ParserRegistry` - Factory for
|
|
153
|
+
- `ParserRegistry` - Factory for 44 language-specific parsers
|
|
154
154
|
- Each parser implements `LanguageParser` interface
|
|
155
155
|
- Output: `ParseResult` with symbols, calls, imports, and metadata
|
|
156
|
-
- Languages: TypeScript, JavaScript, Python, Go, Rust, Java, C++, C#, Haskell, OCaml, Elm, Elixir, Gleam, Swift, Kotlin, Dart, Ruby, PHP, Bash, Zsh, Lua, Perl, Groovy, C, Zig, CUDA, AssemblyScript, SQL, JSON, YAML, TOML, CSV, Markdown, XML, HCL (Terraform),
|
|
156
|
+
- Languages: TypeScript, JavaScript, Python, Go, Rust, Java, C++, C#, Haskell, OCaml, Elm, Elixir, Gleam, Swift, Kotlin, Dart, Ruby, PHP, Bash, Zsh, Lua, Perl, Groovy, C, Zig, CUDA, AssemblyScript, SQL, JSON, YAML, TOML, CSV, Markdown, XML, HCL (Terraform), Makefile, Puppet, Solidity, Verilog, Thrift, Julia, MATLAB, Regex, HTML
|
|
157
157
|
|
|
158
158
|
**3. Service Layer** (`src/services/`)
|
|
159
159
|
- `FileService` - High-level orchestration (indexing, search)
|
|
@@ -279,7 +279,7 @@ Tests use **Vitest** with `.test.ts` suffix (745+ tests, 100% passing):
|
|
|
279
279
|
- `src/database/dao/__tests__/` - DAO integration tests with in-memory SQLite
|
|
280
280
|
- `src/services/__tests__/` - Service unit tests
|
|
281
281
|
- **Iterate Mode**: `StrategySelector.test.ts` (24 tests), `FailureAnalyzer.test.ts` (34 tests), `SafetyEvaluator.test.ts` (24 tests), `IterateEngine.test.ts` (21 tests)
|
|
282
|
-
- `src/parser/__tests__/` - Parser tests with fixture files (
|
|
282
|
+
- `src/parser/__tests__/` - Parser tests with fixture files (44 languages)
|
|
283
283
|
- `src/cache/__tests__/` - Cache behavior tests
|
|
284
284
|
- `src/__tests__/runtime/` - Runtime integration tests
|
|
285
285
|
- `src/__tests__/rescript-core/` - ReScript bridge tests
|
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
[](https://www.microsoft.com/windows/)
|
|
9
9
|
[](./src)
|
|
10
10
|
[](./src)
|
|
11
|
-
[](./src/parser)
|
|
12
12
|
[](./src/agents)
|
|
13
13
|
[](LICENSE)
|
|
14
14
|
[](package.json)
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
**🎉 v8.0.10 - Ready for npm Publishing (No Warnings)**
|
|
17
17
|
|
|
18
18
|
AutomatosX is a comprehensive code intelligence platform with AI-powered workflow automation:
|
|
19
|
-
- **Code Intelligence** - Tree-sitter AST parsing with SQLite FTS5 search for
|
|
19
|
+
- **Code Intelligence** - Tree-sitter AST parsing with SQLite FTS5 search for 44 languages
|
|
20
20
|
- **AI Agent System** - 21 specialized agents for development tasks
|
|
21
21
|
- **Multi-Provider AI** - Claude, Gemini, and OpenAI with automatic fallback
|
|
22
22
|
- **Workflow Orchestration** - ReScript state machines for complex multi-step tasks
|
|
@@ -79,16 +79,16 @@ ax find "getUserById"
|
|
|
79
79
|
ax cli # Launch interactive mode
|
|
80
80
|
ax speckit spec "Build authentication API"
|
|
81
81
|
|
|
82
|
-
# Or use via
|
|
83
|
-
|
|
82
|
+
# Or use via npm script:
|
|
83
|
+
npm run cli -- find "getUserById"
|
|
84
84
|
|
|
85
85
|
# Run tests (745+ tests)
|
|
86
|
-
|
|
86
|
+
npm test
|
|
87
87
|
```
|
|
88
88
|
|
|
89
89
|
### Using the `ax` Command
|
|
90
90
|
|
|
91
|
-
After `
|
|
91
|
+
After `npm install` and `npm run build`, the `ax` binary is automatically linked globally via the `postinstall` script. This means you can use:
|
|
92
92
|
|
|
93
93
|
```bash
|
|
94
94
|
# These work anywhere on your system:
|
|
@@ -100,19 +100,18 @@ ax cli # Interactive ChatGPT-style mode
|
|
|
100
100
|
|
|
101
101
|
**To unlink** (if you want to remove the global `ax` command):
|
|
102
102
|
```bash
|
|
103
|
-
|
|
103
|
+
npm run unlink
|
|
104
104
|
# Or manually:
|
|
105
|
-
|
|
105
|
+
npm unlink -g @defai.digital/automatosx
|
|
106
106
|
```
|
|
107
107
|
|
|
108
|
-
|
|
108
|
+
## 📦 Installation
|
|
109
109
|
|
|
110
|
-
|
|
110
|
+
### For End Users (Recommended)
|
|
111
111
|
|
|
112
|
-
**
|
|
112
|
+
**Install globally with npm**:
|
|
113
113
|
|
|
114
114
|
```bash
|
|
115
|
-
# Install globally with npm (no pnpm needed)
|
|
116
115
|
npm install -g @defai.digital/automatosx
|
|
117
116
|
|
|
118
117
|
# Verify installation
|
|
@@ -123,7 +122,17 @@ ax find "getUserById"
|
|
|
123
122
|
ax cli # Launch interactive mode
|
|
124
123
|
```
|
|
125
124
|
|
|
126
|
-
|
|
125
|
+
### For Developers
|
|
126
|
+
|
|
127
|
+
**Clone and build from source**:
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
git clone https://github.com/defai-digital/automatosx.git
|
|
131
|
+
cd automatosx
|
|
132
|
+
npm install
|
|
133
|
+
npm run build
|
|
134
|
+
npm link
|
|
135
|
+
```
|
|
127
136
|
|
|
128
137
|
### ⚠️ Installation Warnings
|
|
129
138
|
|
|
@@ -141,35 +150,6 @@ WARN Issues with peer dependencies found
|
|
|
141
150
|
|
|
142
151
|
#### pnpm Build Scripts Warning (pnpm v10+ users)
|
|
143
152
|
|
|
144
|
-
If using pnpm v10+, you may see this security warning:
|
|
145
|
-
|
|
146
|
-
```
|
|
147
|
-
╭ Warning ───────────────────────────────────────────────────────────────╮
|
|
148
|
-
│ Ignored build scripts: tree-sitter, better-sqlite3, ... │
|
|
149
|
-
│ Run "pnpm config set enable-pre-post-scripts true" to enable scripts │
|
|
150
|
-
╰────────────────────────────────────────────────────────────────────────╯
|
|
151
|
-
```
|
|
152
|
-
|
|
153
|
-
**This is expected behavior.** pnpm v10+ blocks build scripts by default for security.
|
|
154
|
-
|
|
155
|
-
**Solutions:**
|
|
156
|
-
|
|
157
|
-
**Option 1: Use npm** (recommended for end users):
|
|
158
|
-
```bash
|
|
159
|
-
npm install -g @defai.digital/automatosx
|
|
160
|
-
```
|
|
161
|
-
|
|
162
|
-
**Option 2: Enable pnpm scripts** (for developers):
|
|
163
|
-
```bash
|
|
164
|
-
pnpm config set enable-pre-post-scripts true
|
|
165
|
-
# Then reinstall
|
|
166
|
-
pnpm install
|
|
167
|
-
```
|
|
168
|
-
|
|
169
|
-
Native modules (tree-sitter parsers) will build automatically after enabling scripts.
|
|
170
|
-
|
|
171
|
-
**To suppress all warnings**, copy `.npmrc.example` to `.npmrc`:
|
|
172
|
-
```bash
|
|
173
153
|
cp .npmrc.example .npmrc
|
|
174
154
|
```
|
|
175
155
|
|
|
@@ -182,7 +162,7 @@ See [CLAUDE.md](./CLAUDE.md) for detailed development guide.
|
|
|
182
162
|
## ✨ Core Features
|
|
183
163
|
|
|
184
164
|
### 1. Code Intelligence Engine
|
|
185
|
-
- 🔍 **Multi-language search** -
|
|
165
|
+
- 🔍 **Multi-language search** - 44 languages including TypeScript, Python, Go, Rust, Java, C++
|
|
186
166
|
- ⚡ **Lightning fast** - Query caching delivers 10-100x speedup (<1ms cached, <5ms uncached)
|
|
187
167
|
- 🎯 **Advanced filtering** - Filter by language, symbol kind, or file path
|
|
188
168
|
- 📊 **Smart indexing** - Batch operations process 2000+ files/sec
|
|
@@ -684,7 +664,7 @@ AutomatosX uses a multi-layer architecture:
|
|
|
684
664
|
```
|
|
685
665
|
|
|
686
666
|
**Key Components**:
|
|
687
|
-
- **Parser Layer**: Tree-sitter for AST parsing (
|
|
667
|
+
- **Parser Layer**: Tree-sitter for AST parsing (44 languages: TypeScript, Python, Go, Rust, Java, C++, and 38 more)
|
|
688
668
|
- **Database Layer**: SQLite with FTS5 for full-text search and BM25 ranking
|
|
689
669
|
- **Service Layer**: FileService orchestrates indexing and search
|
|
690
670
|
- **Query Router**: Intelligent query intent detection (symbol vs natural language)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ParserRegistry.d.ts","sourceRoot":"","sources":["../../src/parser/ParserRegistry.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"ParserRegistry.d.ts","sourceRoot":"","sources":["../../src/parser/ParserRegistry.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAoDlE;;GAEG;AACH,qBAAa,cAAc;IACzB,OAAO,CAAC,OAAO,CAA0C;IACzD,OAAO,CAAC,YAAY,CAA0C;;IAO9D;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAqG9B;;;;OAIG;IACH,cAAc,CAAC,MAAM,EAAE,cAAc,GAAG,IAAI;IAS5C;;;;;OAKG;IACH,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,cAAc,GAAG,SAAS;IAIvD;;;;;OAKG;IACH,oBAAoB,CAAC,SAAS,EAAE,MAAM,GAAG,cAAc,GAAG,SAAS;IAInE;;;;;OAKG;IACH,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,cAAc,GAAG,SAAS;IAK7D;;;;;;;OAOG;IACH,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,WAAW;IAWrD;;;;;OAKG;IACH,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO;IAKtC;;;;OAIG;IACH,qBAAqB,IAAI,MAAM,EAAE;IAIjC;;;;OAIG;IACH,sBAAsB,IAAI,MAAM,EAAE;IAIlC;;;;;OAKG;IACH,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;CAIzD;AAOD;;;;GAIG;AACH,wBAAgB,iBAAiB,IAAI,cAAc,CAKlD;AAED;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,IAAI,CAE1C"}
|
|
@@ -38,7 +38,6 @@ import { RegexParserService } from './RegexParserService.js';
|
|
|
38
38
|
import { CudaParserService } from './CudaParserService.js';
|
|
39
39
|
// FPGA and scientific computing parsers
|
|
40
40
|
import { VerilogParserService } from './VerilogParserService.js';
|
|
41
|
-
import { SystemVerilogParserService } from './SystemVerilogParserService.js';
|
|
42
41
|
import { JuliaParserService } from './JuliaParserService.js';
|
|
43
42
|
import { MatlabParserService } from './MatlabParserService.js';
|
|
44
43
|
// Major language parsers
|
|
@@ -125,7 +124,6 @@ export class ParserRegistry {
|
|
|
125
124
|
this.registerParser(new RegexParserService());
|
|
126
125
|
// FPGA/Hardware description
|
|
127
126
|
this.registerParser(new VerilogParserService());
|
|
128
|
-
this.registerParser(new SystemVerilogParserService());
|
|
129
127
|
// Scientific computing
|
|
130
128
|
this.registerParser(new JuliaParserService());
|
|
131
129
|
this.registerParser(new MatlabParserService());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ParserRegistry.js","sourceRoot":"","sources":["../../src/parser/ParserRegistry.ts"],"names":[],"mapp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AC,CAAC;YAC9B,MAAM,IAAI,KAAK,CAAC,4CAA4C,GAAG,EAAE,CAAC,CAAC;QACrE,CAAC;QAED,OAAO,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAC/B,CAAC;IAED;;;;;OAKG;IACH,WAAW,CAAC,QAAgB;QAC1B,MAAM,GAAG,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;QAC9B,OAAO,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACpC,CAAC;IAED;;;;OAIG;IACH,qBAAqB;QACnB,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC;IACzC,CAAC;IAED;;;;OAIG;IACH,sBAAsB;QACpB,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC,CAAC;IAC9C,CAAC;IAED;;;;;OAKG;IACH,kBAAkB,CAAC,QAAgB;QACjC,MAAM,MAAM,GAAG,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC;QAC9C,OAAO,MAAM,EAAE,QAAQ,CAAC;IAC1B,CAAC;CACF;AAED;;GAEG;AACH,IAAI,gBAAgB,GAA0B,IAAI,CAAC;AAEnD;;;;GAIG;AACH,MAAM,UAAU,iBAAiB;IAC/B,IAAI,CAAC,gBAAgB,EAAE,CAAC;QACtB,gBAAgB,GAAG,IAAI,cAAc,EAAE,CAAC;IAC1C,CAAC;IACD,OAAO,gBAAgB,CAAC;AAC1B,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,mBAAmB;IACjC,gBAAgB,GAAG,IAAI,CAAC;AAC1B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@defai.digital/automatosx",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.16",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"description": "Production-ready code intelligence platform with AI agents, workflow orchestration, interactive CLI, SpecKit generators, and autonomous retry system.
|
|
5
|
+
"description": "Production-ready code intelligence platform with AI agents, workflow orchestration, interactive CLI, SpecKit generators, and autonomous retry system. 44 languages, 21 AI agents, 745+ tests.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"author": "DEFAI Private Limited",
|
|
8
8
|
"homepage": "https://license.defai.digital/automatox",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"pnpm": {
|
|
75
75
|
"overrides": {
|
|
76
76
|
"node-gyp": "^10.3.1",
|
|
77
|
-
"tree-sitter": "
|
|
77
|
+
"tree-sitter": "0.22.4",
|
|
78
78
|
"glob": "^11.0.0",
|
|
79
79
|
"rimraf": "^6.0.0",
|
|
80
80
|
"npmlog": "^7.0.0",
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
"peerDependencyRules": {
|
|
85
85
|
"ignoreMissing": [],
|
|
86
86
|
"allowedVersions": {
|
|
87
|
-
"tree-sitter": "
|
|
87
|
+
"tree-sitter": "0.22.4"
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
90
|
},
|
|
@@ -131,15 +131,14 @@
|
|
|
131
131
|
"recharts": "^2.15.4",
|
|
132
132
|
"sqlite-vec": "^0.1.7-alpha.2",
|
|
133
133
|
"sqlite-vss": "^0.1.2",
|
|
134
|
-
"tree-sitter": "
|
|
135
|
-
"tree-sitter-bash": "^0.
|
|
136
|
-
"tree-sitter-c": "^0.
|
|
134
|
+
"tree-sitter": "0.22.4",
|
|
135
|
+
"tree-sitter-bash": "^0.23.3",
|
|
136
|
+
"tree-sitter-c": "^0.23.6",
|
|
137
137
|
"tree-sitter-c-sharp": "^0.21.3",
|
|
138
138
|
"tree-sitter-cpp": "^0.21.0",
|
|
139
139
|
"tree-sitter-csv": "^1.2.0",
|
|
140
140
|
"tree-sitter-cuda": "^0.21.1",
|
|
141
141
|
"tree-sitter-dart": "^1.0.0",
|
|
142
|
-
"tree-sitter-dockerfile": "^0.0.1-security",
|
|
143
142
|
"tree-sitter-elixir": "^0.3.4",
|
|
144
143
|
"tree-sitter-elm": "^4.5.0",
|
|
145
144
|
"tree-sitter-gleam": "^0.1.5",
|
|
@@ -156,17 +155,15 @@
|
|
|
156
155
|
"tree-sitter-markdown": "^0.7.1",
|
|
157
156
|
"tree-sitter-matlab": "^1.0.17",
|
|
158
157
|
"tree-sitter-objc": "^3.0.2",
|
|
159
|
-
"tree-sitter-ocaml": "^0.
|
|
158
|
+
"tree-sitter-ocaml": "^0.23.2",
|
|
160
159
|
"tree-sitter-php": "^0.23.9",
|
|
161
160
|
"tree-sitter-puppet": "^1.3.0",
|
|
162
161
|
"tree-sitter-python": "^0.21.0",
|
|
163
|
-
"tree-sitter-
|
|
164
|
-
"tree-sitter-regex": "^0.25.0",
|
|
162
|
+
"tree-sitter-regex": "^0.24.3",
|
|
165
163
|
"tree-sitter-ruby": "^0.21.0",
|
|
166
164
|
"tree-sitter-rust": "^0.21.0",
|
|
167
165
|
"tree-sitter-scala": "^0.24.0",
|
|
168
166
|
"tree-sitter-solidity": "^1.2.13",
|
|
169
|
-
"tree-sitter-systemverilog": "^0.3.1",
|
|
170
167
|
"tree-sitter-thrift": "^0.5.0",
|
|
171
168
|
"tree-sitter-toml": "^0.5.1",
|
|
172
169
|
"tree-sitter-typescript": "^0.23.2",
|
|
@@ -40,7 +40,6 @@ import { RegexParserService } from './RegexParserService.js';
|
|
|
40
40
|
import { CudaParserService } from './CudaParserService.js';
|
|
41
41
|
// FPGA and scientific computing parsers
|
|
42
42
|
import { VerilogParserService } from './VerilogParserService.js';
|
|
43
|
-
import { SystemVerilogParserService } from './SystemVerilogParserService.js';
|
|
44
43
|
import { JuliaParserService } from './JuliaParserService.js';
|
|
45
44
|
import { MatlabParserService } from './MatlabParserService.js';
|
|
46
45
|
// Major language parsers
|
|
@@ -152,7 +151,6 @@ export class ParserRegistry {
|
|
|
152
151
|
|
|
153
152
|
// FPGA/Hardware description
|
|
154
153
|
this.registerParser(new VerilogParserService());
|
|
155
|
-
this.registerParser(new SystemVerilogParserService());
|
|
156
154
|
|
|
157
155
|
// Scientific computing
|
|
158
156
|
this.registerParser(new JuliaParserService());
|
package/pnpm-workspace.yaml
DELETED
|
@@ -1,177 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* SystemVerilogParserService.ts
|
|
3
|
-
*
|
|
4
|
-
* SystemVerilog HDL parser using Tree-sitter
|
|
5
|
-
* Extracts symbols from SystemVerilog hardware description language source code
|
|
6
|
-
*
|
|
7
|
-
* SystemVerilog extends Verilog with OOP features, assertions, and testbench constructs.
|
|
8
|
-
* Used for FPGA, ASIC design, and verification.
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
import Parser from 'tree-sitter';
|
|
12
|
-
import SystemVerilog from 'tree-sitter-systemverilog';
|
|
13
|
-
import { BaseLanguageParser, Symbol, SymbolKind } from './LanguageParser.js';
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* SystemVerilogParserService - Extracts symbols from SystemVerilog code
|
|
17
|
-
*/
|
|
18
|
-
export class SystemVerilogParserService extends BaseLanguageParser {
|
|
19
|
-
readonly language = 'systemverilog';
|
|
20
|
-
readonly extensions = ['.sv', '.svh'];
|
|
21
|
-
|
|
22
|
-
constructor() {
|
|
23
|
-
super(SystemVerilog as Parser.Language);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Extract symbol from AST node
|
|
28
|
-
*/
|
|
29
|
-
protected extractSymbol(node: Parser.SyntaxNode): Symbol | null {
|
|
30
|
-
switch (node.type) {
|
|
31
|
-
case 'module_declaration':
|
|
32
|
-
return this.extractModule(node);
|
|
33
|
-
|
|
34
|
-
case 'class_declaration':
|
|
35
|
-
return this.extractClass(node);
|
|
36
|
-
|
|
37
|
-
case 'interface_declaration':
|
|
38
|
-
return this.extractInterface(node);
|
|
39
|
-
|
|
40
|
-
case 'package_declaration':
|
|
41
|
-
return this.extractPackage(node);
|
|
42
|
-
|
|
43
|
-
case 'task_declaration':
|
|
44
|
-
return this.extractTask(node);
|
|
45
|
-
|
|
46
|
-
case 'function_declaration':
|
|
47
|
-
return this.extractFunction(node);
|
|
48
|
-
|
|
49
|
-
case 'data_declaration':
|
|
50
|
-
case 'net_declaration':
|
|
51
|
-
return this.extractVariable(node);
|
|
52
|
-
|
|
53
|
-
case 'parameter_declaration':
|
|
54
|
-
case 'local_parameter_declaration':
|
|
55
|
-
return this.extractParameter(node);
|
|
56
|
-
|
|
57
|
-
case 'typedef_declaration':
|
|
58
|
-
return this.extractTypedef(node);
|
|
59
|
-
|
|
60
|
-
default:
|
|
61
|
-
return null;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* Extract module declaration
|
|
67
|
-
*/
|
|
68
|
-
private extractModule(node: Parser.SyntaxNode): Symbol | null {
|
|
69
|
-
const name = this.getFieldText(node, 'name') ||
|
|
70
|
-
node.descendantsOfType('simple_identifier')[0]?.text;
|
|
71
|
-
if (!name) return null;
|
|
72
|
-
|
|
73
|
-
return this.createSymbol(node, name, 'module');
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
* Extract class declaration
|
|
78
|
-
*/
|
|
79
|
-
private extractClass(node: Parser.SyntaxNode): Symbol | null {
|
|
80
|
-
const name = this.getFieldText(node, 'name') ||
|
|
81
|
-
node.descendantsOfType('class_identifier')[0]?.text ||
|
|
82
|
-
node.descendantsOfType('simple_identifier')[0]?.text;
|
|
83
|
-
if (!name) return null;
|
|
84
|
-
|
|
85
|
-
return this.createSymbol(node, name, 'class');
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
/**
|
|
89
|
-
* Extract interface declaration
|
|
90
|
-
*/
|
|
91
|
-
private extractInterface(node: Parser.SyntaxNode): Symbol | null {
|
|
92
|
-
const name = this.getFieldText(node, 'name') ||
|
|
93
|
-
node.descendantsOfType('interface_identifier')[0]?.text ||
|
|
94
|
-
node.descendantsOfType('simple_identifier')[0]?.text;
|
|
95
|
-
if (!name) return null;
|
|
96
|
-
|
|
97
|
-
return this.createSymbol(node, name, 'interface');
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
/**
|
|
101
|
-
* Extract package declaration
|
|
102
|
-
*/
|
|
103
|
-
private extractPackage(node: Parser.SyntaxNode): Symbol | null {
|
|
104
|
-
const name = this.getFieldText(node, 'name') ||
|
|
105
|
-
node.descendantsOfType('package_identifier')[0]?.text ||
|
|
106
|
-
node.descendantsOfType('simple_identifier')[0]?.text;
|
|
107
|
-
if (!name) return null;
|
|
108
|
-
|
|
109
|
-
return this.createSymbol(node, name, 'module');
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
/**
|
|
113
|
-
* Extract task declaration
|
|
114
|
-
*/
|
|
115
|
-
private extractTask(node: Parser.SyntaxNode): Symbol | null {
|
|
116
|
-
const name = this.getFieldText(node, 'name') ||
|
|
117
|
-
node.descendantsOfType('task_identifier')[0]?.text ||
|
|
118
|
-
node.descendantsOfType('simple_identifier')[0]?.text;
|
|
119
|
-
if (!name) return null;
|
|
120
|
-
|
|
121
|
-
return this.createSymbol(node, name, 'function');
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
/**
|
|
125
|
-
* Extract function declaration
|
|
126
|
-
*/
|
|
127
|
-
private extractFunction(node: Parser.SyntaxNode): Symbol | null {
|
|
128
|
-
const name = this.getFieldText(node, 'name') ||
|
|
129
|
-
node.descendantsOfType('function_identifier')[0]?.text ||
|
|
130
|
-
node.descendantsOfType('simple_identifier')[0]?.text;
|
|
131
|
-
if (!name) return null;
|
|
132
|
-
|
|
133
|
-
return this.createSymbol(node, name, 'function');
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
/**
|
|
137
|
-
* Extract variable declaration
|
|
138
|
-
*/
|
|
139
|
-
private extractVariable(node: Parser.SyntaxNode): Symbol | null {
|
|
140
|
-
const identifiers = node.descendantsOfType('simple_identifier');
|
|
141
|
-
if (identifiers.length === 0) return null;
|
|
142
|
-
|
|
143
|
-
const name = identifiers[0].text;
|
|
144
|
-
|
|
145
|
-
return this.createSymbol(node, name, 'variable');
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
/**
|
|
149
|
-
* Extract parameter declaration
|
|
150
|
-
*/
|
|
151
|
-
private extractParameter(node: Parser.SyntaxNode): Symbol | null {
|
|
152
|
-
const identifiers = node.descendantsOfType('simple_identifier');
|
|
153
|
-
if (identifiers.length === 0) return null;
|
|
154
|
-
|
|
155
|
-
const name = identifiers[0].text;
|
|
156
|
-
|
|
157
|
-
return this.createSymbol(node, name, 'constant');
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
/**
|
|
161
|
-
* Extract typedef declaration
|
|
162
|
-
*/
|
|
163
|
-
private extractTypedef(node: Parser.SyntaxNode): Symbol | null {
|
|
164
|
-
const identifiers = node.descendantsOfType('type_identifier');
|
|
165
|
-
if (identifiers.length === 0) {
|
|
166
|
-
// Fallback to simple_identifier
|
|
167
|
-
const simpleIds = node.descendantsOfType('simple_identifier');
|
|
168
|
-
if (simpleIds.length === 0) return null;
|
|
169
|
-
const name = simpleIds[simpleIds.length - 1].text; // Last identifier is usually the typedef name
|
|
170
|
-
return this.createSymbol(node, name, 'type');
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
const name = identifiers[0].text;
|
|
174
|
-
|
|
175
|
-
return this.createSymbol(node, name, 'type');
|
|
176
|
-
}
|
|
177
|
-
}
|