@compilr-dev/agents-coding 1.0.0 → 1.0.1
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/README.md +139 -0
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
# @compilr-dev/agents-coding
|
|
2
|
+
|
|
3
|
+
Multi-language coding tools for AI agents - umbrella package with auto-detection.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
This is the **umbrella package** that provides a unified interface for all coding tools across multiple programming languages. It automatically detects the language from file extensions and routes to the appropriate parser.
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install @compilr-dev/agents-coding @compilr-dev/agents
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
This single install gives you:
|
|
16
|
+
- **Core Tools** - Git operations, project detection, smart runners, code search
|
|
17
|
+
- **TypeScript/JavaScript** - AST-based analysis via TypeScript compiler
|
|
18
|
+
- **Python** - AST-based analysis via Tree-sitter
|
|
19
|
+
- **Go** - AST-based analysis via Tree-sitter
|
|
20
|
+
|
|
21
|
+
## Quick Start
|
|
22
|
+
|
|
23
|
+
```typescript
|
|
24
|
+
import { Agent } from '@compilr-dev/agents';
|
|
25
|
+
import {
|
|
26
|
+
// Core tools (language-agnostic)
|
|
27
|
+
gitStatusTool,
|
|
28
|
+
gitDiffTool,
|
|
29
|
+
detectProjectTool,
|
|
30
|
+
runTestsTool,
|
|
31
|
+
|
|
32
|
+
// Unified tools with auto-detection
|
|
33
|
+
getFileStructureTool,
|
|
34
|
+
} from '@compilr-dev/agents-coding';
|
|
35
|
+
|
|
36
|
+
const agent = new Agent({
|
|
37
|
+
provider: yourProvider,
|
|
38
|
+
tools: [gitStatusTool, detectProjectTool, getFileStructureTool],
|
|
39
|
+
});
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Package Structure
|
|
43
|
+
|
|
44
|
+
| Package | Description |
|
|
45
|
+
|---------|-------------|
|
|
46
|
+
| `@compilr-dev/agents-coding` | This umbrella (re-exports everything) |
|
|
47
|
+
| `@compilr-dev/agents-coding-core` | Language-agnostic tools (git, runners, search) |
|
|
48
|
+
| `@compilr-dev/agents-coding-ts` | TypeScript/JavaScript analysis |
|
|
49
|
+
| `@compilr-dev/agents-coding-python` | Python analysis |
|
|
50
|
+
| `@compilr-dev/agents-coding-go` | Go analysis |
|
|
51
|
+
|
|
52
|
+
## Language Auto-Detection
|
|
53
|
+
|
|
54
|
+
The umbrella provides unified tools that automatically detect the language:
|
|
55
|
+
|
|
56
|
+
```typescript
|
|
57
|
+
import { detectLanguage, getFileStructureTool } from '@compilr-dev/agents-coding';
|
|
58
|
+
|
|
59
|
+
// Detect language from file path
|
|
60
|
+
detectLanguage('src/app.ts'); // 'typescript'
|
|
61
|
+
detectLanguage('main.py'); // 'python'
|
|
62
|
+
detectLanguage('cmd/server.go'); // 'go'
|
|
63
|
+
|
|
64
|
+
// Unified tool routes to correct parser
|
|
65
|
+
const result = await getFileStructureTool.execute({ path: 'src/app.ts' });
|
|
66
|
+
// Uses TypeScript parser automatically
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Direct Language Access
|
|
70
|
+
|
|
71
|
+
Access language-specific tools directly when needed:
|
|
72
|
+
|
|
73
|
+
```typescript
|
|
74
|
+
import {
|
|
75
|
+
ts, // TypeScript tools
|
|
76
|
+
python, // Python tools
|
|
77
|
+
go, // Go tools
|
|
78
|
+
} from '@compilr-dev/agents-coding';
|
|
79
|
+
|
|
80
|
+
// Use language-specific tools directly
|
|
81
|
+
const tsResult = await ts.getFileStructureTool.execute({ path: 'app.ts' });
|
|
82
|
+
const pyResult = await python.getFileStructureTool.execute({ path: 'main.py' });
|
|
83
|
+
const goResult = await go.getFileStructureTool.execute({ path: 'main.go' });
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## Core Tools
|
|
87
|
+
|
|
88
|
+
All language-agnostic tools from `@compilr-dev/agents-coding-core`:
|
|
89
|
+
|
|
90
|
+
### Git Tools
|
|
91
|
+
- `gitStatusTool` - Parsed git status
|
|
92
|
+
- `gitDiffTool` - Structured diffs
|
|
93
|
+
- `gitLogTool` - Commit history
|
|
94
|
+
- `gitCommitTool` - Safe commit workflow
|
|
95
|
+
- `gitBranchTool` - Branch management
|
|
96
|
+
- `gitStashTool` - Stash operations
|
|
97
|
+
|
|
98
|
+
### Project Detection
|
|
99
|
+
- `detectProjectTool` - Detect project type, framework, tooling
|
|
100
|
+
- `findProjectRootTool` - Find project root directory
|
|
101
|
+
|
|
102
|
+
### Smart Runners
|
|
103
|
+
- `runTestsTool` - Auto-detect and run tests
|
|
104
|
+
- `runLintTool` - Auto-detect and run linter
|
|
105
|
+
- `runBuildTool` - Auto-detect and run build
|
|
106
|
+
- `runFormatTool` - Auto-detect and run formatter
|
|
107
|
+
|
|
108
|
+
### Code Search
|
|
109
|
+
- `findDefinitionTool` - Find symbol definitions
|
|
110
|
+
- `findReferencesTool` - Find symbol usages
|
|
111
|
+
- `findTodosTool` - Find TODO/FIXME comments
|
|
112
|
+
|
|
113
|
+
## Skills
|
|
114
|
+
|
|
115
|
+
```typescript
|
|
116
|
+
import { codingSkills } from '@compilr-dev/agents-coding';
|
|
117
|
+
|
|
118
|
+
// Available skills:
|
|
119
|
+
// - git-workflow
|
|
120
|
+
// - test-driven
|
|
121
|
+
// - code-navigation
|
|
122
|
+
// - pr-workflow
|
|
123
|
+
// - project-onboarding
|
|
124
|
+
// - code-optimization
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
## Requirements
|
|
128
|
+
|
|
129
|
+
- **Node.js** 18 or higher
|
|
130
|
+
- **@compilr-dev/agents** peer dependency
|
|
131
|
+
|
|
132
|
+
## Related Packages
|
|
133
|
+
|
|
134
|
+
- [@compilr-dev/agents](https://www.npmjs.com/package/@compilr-dev/agents) - Core agent library
|
|
135
|
+
- [@compilr-dev/cli](https://www.npmjs.com/package/@compilr-dev/cli) - AI-powered CLI assistant
|
|
136
|
+
|
|
137
|
+
## License
|
|
138
|
+
|
|
139
|
+
MIT
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@compilr-dev/agents-coding",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Multi-language coding tools for AI agents - umbrella package with auto-detection for TypeScript, Python, Go, and more",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|