abapgit-agent 1.4.0 → 1.6.0
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 +2 -0
- package/abap/guidelines/00_index.md +35 -0
- package/abap/guidelines/01_sql.md +72 -0
- package/abap/guidelines/02_exceptions.md +108 -0
- package/abap/guidelines/03_testing.md +252 -0
- package/abap/guidelines/04_cds.md +120 -0
- package/abap/guidelines/05_classes.md +50 -0
- package/abap/guidelines/06_objects.md +103 -0
- package/abap/guidelines/07_json.md +22 -0
- package/abap/guidelines/08_abapgit.md +193 -0
- package/bin/abapgit-agent +597 -44
- package/bin/abgagt +24 -0
- package/package.json +11 -3
- package/src/abap-client.js +65 -2
- package/src/agent.js +58 -4
- package/src/config.js +9 -2
- package/src/ref-search.js +989 -0
- package/.abapGitAgent.example +0 -11
- package/.github/workflows/release.yml +0 -57
- package/API.md +0 -710
- package/CLAUDE.md +0 -1031
- package/CLAUDE_MEM.md +0 -88
- package/ERROR_HANDLING.md +0 -30
- package/INSTALL.md +0 -155
- package/RELEASE_NOTES.md +0 -143
- package/abap/CLAUDE.md +0 -898
- package/abap/copilot-instructions.md +0 -79
- package/abap/package.devc.xml +0 -10
- package/abap/zcl_abgagt_agent.clas.abap +0 -420
- package/abap/zcl_abgagt_agent.clas.xml +0 -15
- package/abap/zcl_abgagt_cmd_factory.clas.abap +0 -48
- package/abap/zcl_abgagt_cmd_factory.clas.xml +0 -15
- package/abap/zcl_abgagt_command_create.clas.abap +0 -95
- package/abap/zcl_abgagt_command_create.clas.xml +0 -15
- package/abap/zcl_abgagt_command_import.clas.abap +0 -138
- package/abap/zcl_abgagt_command_import.clas.xml +0 -15
- package/abap/zcl_abgagt_command_inspect.clas.abap +0 -411
- package/abap/zcl_abgagt_command_inspect.clas.testclasses.abap +0 -121
- package/abap/zcl_abgagt_command_inspect.clas.xml +0 -16
- package/abap/zcl_abgagt_command_preview.clas.abap +0 -386
- package/abap/zcl_abgagt_command_preview.clas.xml +0 -15
- package/abap/zcl_abgagt_command_pull.clas.abap +0 -80
- package/abap/zcl_abgagt_command_pull.clas.testclasses.abap +0 -87
- package/abap/zcl_abgagt_command_pull.clas.xml +0 -16
- package/abap/zcl_abgagt_command_tree.clas.abap +0 -237
- package/abap/zcl_abgagt_command_tree.clas.xml +0 -15
- package/abap/zcl_abgagt_command_unit.clas.abap +0 -297
- package/abap/zcl_abgagt_command_unit.clas.xml +0 -15
- package/abap/zcl_abgagt_command_view.clas.abap +0 -240
- package/abap/zcl_abgagt_command_view.clas.xml +0 -15
- package/abap/zcl_abgagt_resource_create.clas.abap +0 -71
- package/abap/zcl_abgagt_resource_create.clas.xml +0 -15
- package/abap/zcl_abgagt_resource_health.clas.abap +0 -25
- package/abap/zcl_abgagt_resource_health.clas.xml +0 -15
- package/abap/zcl_abgagt_resource_import.clas.abap +0 -66
- package/abap/zcl_abgagt_resource_import.clas.xml +0 -15
- package/abap/zcl_abgagt_resource_inspect.clas.abap +0 -62
- package/abap/zcl_abgagt_resource_inspect.clas.xml +0 -15
- package/abap/zcl_abgagt_resource_preview.clas.abap +0 -67
- package/abap/zcl_abgagt_resource_preview.clas.xml +0 -15
- package/abap/zcl_abgagt_resource_pull.clas.abap +0 -71
- package/abap/zcl_abgagt_resource_pull.clas.xml +0 -15
- package/abap/zcl_abgagt_resource_tree.clas.abap +0 -70
- package/abap/zcl_abgagt_resource_tree.clas.xml +0 -15
- package/abap/zcl_abgagt_resource_unit.clas.abap +0 -64
- package/abap/zcl_abgagt_resource_unit.clas.xml +0 -15
- package/abap/zcl_abgagt_resource_view.clas.abap +0 -68
- package/abap/zcl_abgagt_resource_view.clas.xml +0 -15
- package/abap/zcl_abgagt_rest_handler.clas.abap +0 -32
- package/abap/zcl_abgagt_rest_handler.clas.xml +0 -15
- package/abap/zcl_abgagt_util.clas.abap +0 -93
- package/abap/zcl_abgagt_util.clas.testclasses.abap +0 -84
- package/abap/zcl_abgagt_util.clas.xml +0 -16
- package/abap/zcl_abgagt_viewer_clas.clas.abap +0 -58
- package/abap/zcl_abgagt_viewer_clas.clas.xml +0 -15
- package/abap/zcl_abgagt_viewer_ddls.clas.abap +0 -83
- package/abap/zcl_abgagt_viewer_ddls.clas.xml +0 -15
- package/abap/zcl_abgagt_viewer_dtel.clas.abap +0 -98
- package/abap/zcl_abgagt_viewer_dtel.clas.xml +0 -15
- package/abap/zcl_abgagt_viewer_factory.clas.abap +0 -41
- package/abap/zcl_abgagt_viewer_factory.clas.xml +0 -15
- package/abap/zcl_abgagt_viewer_intf.clas.abap +0 -58
- package/abap/zcl_abgagt_viewer_intf.clas.xml +0 -15
- package/abap/zcl_abgagt_viewer_stru.clas.abap +0 -59
- package/abap/zcl_abgagt_viewer_stru.clas.xml +0 -15
- package/abap/zcl_abgagt_viewer_tabl.clas.abap +0 -59
- package/abap/zcl_abgagt_viewer_tabl.clas.xml +0 -15
- package/abap/zcl_abgagt_viewer_ttyp.clas.abap +0 -93
- package/abap/zcl_abgagt_viewer_ttyp.clas.xml +0 -15
- package/abap/zif_abgagt_agent.intf.abap +0 -53
- package/abap/zif_abgagt_agent.intf.xml +0 -15
- package/abap/zif_abgagt_cmd_factory.intf.abap +0 -7
- package/abap/zif_abgagt_cmd_factory.intf.xml +0 -15
- package/abap/zif_abgagt_command.intf.abap +0 -26
- package/abap/zif_abgagt_command.intf.xml +0 -15
- package/abap/zif_abgagt_util.intf.abap +0 -28
- package/abap/zif_abgagt_util.intf.xml +0 -15
- package/abap/zif_abgagt_viewer.intf.abap +0 -12
- package/abap/zif_abgagt_viewer.intf.xml +0 -15
- package/docs/commands.md +0 -142
- package/docs/create-command.md +0 -129
- package/docs/health-command.md +0 -89
- package/docs/import-command.md +0 -195
- package/docs/init-command.md +0 -189
- package/docs/inspect-command.md +0 -158
- package/docs/preview-command.md +0 -528
- package/docs/pull-command.md +0 -188
- package/docs/status-command.md +0 -68
- package/docs/tree-command.md +0 -303
- package/docs/unit-command.md +0 -167
- package/docs/view-command.md +0 -501
- package/img/claude.png +0 -0
- package/scripts/claude-integration.js +0 -351
- package/scripts/release.sh +0 -60
- package/scripts/test-integration.js +0 -139
package/docs/init-command.md
DELETED
|
@@ -1,189 +0,0 @@
|
|
|
1
|
-
# init Command
|
|
2
|
-
|
|
3
|
-
Initialize local configuration for an existing git repository.
|
|
4
|
-
|
|
5
|
-
## Command
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
abapgit-agent init --folder /src/ --package ZMY_PACKAGE
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
## Prerequisite
|
|
12
|
-
|
|
13
|
-
- Current folder is the root folder of a git repository
|
|
14
|
-
- Git remote is configured (`git remote -v` returns a URL)
|
|
15
|
-
|
|
16
|
-
## Parameters
|
|
17
|
-
|
|
18
|
-
| Parameter | Required | Default | Description |
|
|
19
|
-
|-----------|----------|---------|-------------|
|
|
20
|
-
| `--folder` | No | `/src/` | Subfolder path for ABAP source files |
|
|
21
|
-
| `--package` | Yes | - | Target ABAP package |
|
|
22
|
-
|
|
23
|
-
## Tasks
|
|
24
|
-
|
|
25
|
-
### 1. Detect Git Remote URL
|
|
26
|
-
|
|
27
|
-
```bash
|
|
28
|
-
git remote get-url origin
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
- Fail if no remote configured
|
|
32
|
-
|
|
33
|
-
### 2. Copy Configuration Template
|
|
34
|
-
|
|
35
|
-
```bash
|
|
36
|
-
cp .abapGitAgent.example .abapGitAgent
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
### 3. Update Configuration
|
|
40
|
-
|
|
41
|
-
Add to `.abapGitAgent`:
|
|
42
|
-
|
|
43
|
-
```json
|
|
44
|
-
{
|
|
45
|
-
"package": "ZMY_PACKAGE",
|
|
46
|
-
"folder": "/src/"
|
|
47
|
-
}
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
### 4. Create Folder
|
|
51
|
-
|
|
52
|
-
```bash
|
|
53
|
-
mkdir -p /src/
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
Add `.gitkeep` (optional):
|
|
57
|
-
|
|
58
|
-
```bash
|
|
59
|
-
touch /src/.gitkeep
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
### 5. Update .gitignore
|
|
63
|
-
|
|
64
|
-
Add sensitive files to `.gitignore`:
|
|
65
|
-
|
|
66
|
-
```
|
|
67
|
-
.abapGitAgent
|
|
68
|
-
.abapgit_agent_cookies.txt
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
### 6. Copy Documentation
|
|
72
|
-
|
|
73
|
-
```bash
|
|
74
|
-
cp /path/to/abapgit-agent/abap/CLAUDE.md .
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
## Output Files
|
|
78
|
-
|
|
79
|
-
| File | Description |
|
|
80
|
-
|------|-------------|
|
|
81
|
-
| `.abapGitAgent` | Configuration (user must edit host, user, password, gitUsername, gitPassword) |
|
|
82
|
-
| `.gitignore` | Updated with sensitive files |
|
|
83
|
-
| `CLAUDE.md` | ABAP coding guidelines |
|
|
84
|
-
| `/src/` | Folder for ABAP source files |
|
|
85
|
-
|
|
86
|
-
## .abapGitAgent Contents
|
|
87
|
-
|
|
88
|
-
After `init` command, `.abapGitAgent` contains:
|
|
89
|
-
|
|
90
|
-
```json
|
|
91
|
-
{
|
|
92
|
-
"host": "your-sap-system.com",
|
|
93
|
-
"sapport": 443,
|
|
94
|
-
"client": "100",
|
|
95
|
-
"user": "TECH_USER",
|
|
96
|
-
"password": "your-password",
|
|
97
|
-
"language": "EN",
|
|
98
|
-
"gitUsername": "github-username",
|
|
99
|
-
"gitPassword": "github-token",
|
|
100
|
-
"referenceFolder": "~/abap-reference",
|
|
101
|
-
"package": "ZMY_PACKAGE",
|
|
102
|
-
"folder": "/src/"
|
|
103
|
-
}
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
## GitHub Credentials
|
|
107
|
-
|
|
108
|
-
For the `import` command to work, you need to configure GitHub credentials:
|
|
109
|
-
|
|
110
|
-
1. Create a GitHub Personal Access Token (PAT):
|
|
111
|
-
- GitHub.com: https://github.com/settings/tokens
|
|
112
|
-
|
|
113
|
-
2. Add to `.abapGitAgent`:
|
|
114
|
-
|
|
115
|
-
```json
|
|
116
|
-
{
|
|
117
|
-
"gitUsername": "<your-github-username>",
|
|
118
|
-
"gitPassword": "ghp_your_token_here"
|
|
119
|
-
}
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
Or set environment variables:
|
|
123
|
-
|
|
124
|
-
```bash
|
|
125
|
-
export GIT_USERNAME="<your-github-username>"
|
|
126
|
-
export GIT_PASSWORD="ghp_your_token_here"
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
## Post-Init Steps
|
|
130
|
-
|
|
131
|
-
1. Edit `.abapGitAgent` with correct values:
|
|
132
|
-
- `host`: SAP system hostname
|
|
133
|
-
- `user`: SAP username
|
|
134
|
-
- `password`: SAP password
|
|
135
|
-
- `gitUsername`: GitHub username (for import command)
|
|
136
|
-
- `gitPassword`: GitHub PAT (for import command)
|
|
137
|
-
|
|
138
|
-
2. Run `abapgit-agent create` to create abapGit repo in ABAP
|
|
139
|
-
|
|
140
|
-
3. Run `abapgit-agent import` to import objects to git
|
|
141
|
-
|
|
142
|
-
## Full Workflow
|
|
143
|
-
|
|
144
|
-
```
|
|
145
|
-
1. abapgit-agent init --folder /src/ --package ZMY_PACKAGE
|
|
146
|
-
└─> Creates .abapGitAgent, CLAUDE.md, /src/, updates .gitignore
|
|
147
|
-
|
|
148
|
-
2. Edit .abapGitAgent (host, user, password, gitUsername, gitPassword)
|
|
149
|
-
|
|
150
|
-
3. abapgit-agent create
|
|
151
|
-
└─> Creates online repository in ABAP
|
|
152
|
-
|
|
153
|
-
4. abapgit-agent import
|
|
154
|
-
└─> Stages, commits, and pushes all objects from ZMY_PACKAGE
|
|
155
|
-
|
|
156
|
-
5. git pull
|
|
157
|
-
└─> Optionally pull to local folder
|
|
158
|
-
|
|
159
|
-
6. abapgit-agent pull
|
|
160
|
-
└─> Activate objects in ABAP
|
|
161
|
-
```
|
|
162
|
-
|
|
163
|
-
## Example
|
|
164
|
-
|
|
165
|
-
```bash
|
|
166
|
-
# Initialize
|
|
167
|
-
abapgit-agent init --folder /abap/ --package ZMYPROJECT
|
|
168
|
-
|
|
169
|
-
# Edit config
|
|
170
|
-
vim .abapGitAgent
|
|
171
|
-
|
|
172
|
-
# Create repo
|
|
173
|
-
abapgit-agent create
|
|
174
|
-
|
|
175
|
-
# Import objects to git
|
|
176
|
-
abapgit-agent import
|
|
177
|
-
|
|
178
|
-
# Pull to local folder
|
|
179
|
-
git pull origin main
|
|
180
|
-
|
|
181
|
-
# Activate in ABAP
|
|
182
|
-
abapgit-agent pull
|
|
183
|
-
```
|
|
184
|
-
|
|
185
|
-
## Related Commands
|
|
186
|
-
|
|
187
|
-
- [`create`](create-command.md) - Create online repository in ABAP
|
|
188
|
-
- [`import`](import-command.md) - Import objects from package to git
|
|
189
|
-
- [`pull`](pull-command.md) - Pull and activate objects in ABAP
|
package/docs/inspect-command.md
DELETED
|
@@ -1,158 +0,0 @@
|
|
|
1
|
-
# inspect Command Requirements
|
|
2
|
-
|
|
3
|
-
## Overview
|
|
4
|
-
|
|
5
|
-
Inspect ABAP source file(s) for syntax errors and issues.
|
|
6
|
-
|
|
7
|
-
## Command
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
# Inspect single file
|
|
11
|
-
abapgit-agent inspect --files zcl_my_class.clas.abap
|
|
12
|
-
|
|
13
|
-
# Inspect multiple files
|
|
14
|
-
abapgit-agent inspect --files zcl_my_class.clas.abap,zcl_other.clas.abap
|
|
15
|
-
|
|
16
|
-
# With path
|
|
17
|
-
abapgit-agent inspect --files abap/zcl_my_class.clas.abap
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
## Prerequisite
|
|
21
|
-
|
|
22
|
-
- `.abapGitAgent` exists with valid credentials
|
|
23
|
-
- Files must exist in the filesystem
|
|
24
|
-
|
|
25
|
-
## Parameters
|
|
26
|
-
|
|
27
|
-
| Parameter | Required | Description |
|
|
28
|
-
|-----------|----------|-------------|
|
|
29
|
-
| `--files` | Yes | Comma-separated list of files to inspect |
|
|
30
|
-
|
|
31
|
-
---
|
|
32
|
-
|
|
33
|
-
## Tasks
|
|
34
|
-
|
|
35
|
-
### 1. Validate Parameters
|
|
36
|
-
|
|
37
|
-
- `--files` must be specified
|
|
38
|
-
- Files must exist
|
|
39
|
-
|
|
40
|
-
### 2. Load Configuration
|
|
41
|
-
|
|
42
|
-
Read `.abapGitAgent` for credentials
|
|
43
|
-
|
|
44
|
-
### 3. Fetch CSRF Token
|
|
45
|
-
|
|
46
|
-
```bash
|
|
47
|
-
GET /health (with X-CSRF-Token: fetch)
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
### 4. Make Inspect Request
|
|
51
|
-
|
|
52
|
-
**Endpoint:** `POST /inspect`
|
|
53
|
-
|
|
54
|
-
**Request Body:**
|
|
55
|
-
```json
|
|
56
|
-
{
|
|
57
|
-
"files": ["ZCL_MY_CLASS.CLASS.ABAP"]
|
|
58
|
-
}
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
### 5. Display Results
|
|
62
|
-
|
|
63
|
-
---
|
|
64
|
-
|
|
65
|
-
## Output
|
|
66
|
-
|
|
67
|
-
### Success (No Errors)
|
|
68
|
-
|
|
69
|
-
```
|
|
70
|
-
Inspect for 1 file(s)
|
|
71
|
-
|
|
72
|
-
✅ zcl_my_class.clas.abap - Syntax check passed (0 errors)
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
### With Errors
|
|
76
|
-
|
|
77
|
-
```
|
|
78
|
-
Inspect for 1 file(s)
|
|
79
|
-
|
|
80
|
-
❌ Syntax check failed (2 error(s)):
|
|
81
|
-
|
|
82
|
-
Errors:
|
|
83
|
-
────────────────────────────────────────────────────────────
|
|
84
|
-
Line 15, Column 10:
|
|
85
|
-
"ZMYCLASS" is not a type
|
|
86
|
-
|
|
87
|
-
Line 20, Column 5:
|
|
88
|
-
Field "LV_VAR" is unknown
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
---
|
|
92
|
-
|
|
93
|
-
## Response Structure
|
|
94
|
-
|
|
95
|
-
```json
|
|
96
|
-
{
|
|
97
|
-
"success": "X",
|
|
98
|
-
"object_type": "CLAS",
|
|
99
|
-
"object_name": "ZCL_MY_CLASS",
|
|
100
|
-
"error_count": 2,
|
|
101
|
-
"errors": [
|
|
102
|
-
{
|
|
103
|
-
"line": "15",
|
|
104
|
-
"column": "10",
|
|
105
|
-
"text": "\"ZMYCLASS\" is not a type",
|
|
106
|
-
"word": "ZMYCLASS"
|
|
107
|
-
}
|
|
108
|
-
]
|
|
109
|
-
}
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
---
|
|
113
|
-
|
|
114
|
-
## Error Handling
|
|
115
|
-
|
|
116
|
-
| Error | Message |
|
|
117
|
-
|-------|---------|
|
|
118
|
-
| File not found | `File not found: <path>` |
|
|
119
|
-
| Invalid file format | `Invalid file format: <file>` |
|
|
120
|
-
| No --files specified | `Error: --files parameter required` |
|
|
121
|
-
|
|
122
|
-
---
|
|
123
|
-
|
|
124
|
-
## File Format
|
|
125
|
-
|
|
126
|
-
Same as pull command - files are parsed to extract object type and name:
|
|
127
|
-
|
|
128
|
-
| File | Object Type | Object Name |
|
|
129
|
-
|------|-------------|-------------|
|
|
130
|
-
| `zcl_my_class.clas.abap` | CLAS | ZCL_MY_CLASS |
|
|
131
|
-
| `zif_my_intf.intf.abap` | INTF | ZIF_MY_INTF |
|
|
132
|
-
|
|
133
|
-
---
|
|
134
|
-
|
|
135
|
-
## Example
|
|
136
|
-
|
|
137
|
-
```bash
|
|
138
|
-
# Syntax check
|
|
139
|
-
abapgit-agent inspect --files zcl_my_class.clas.abap
|
|
140
|
-
|
|
141
|
-
# Multiple files
|
|
142
|
-
abapgit-agent inspect --files abap/zcl_my_class.clas.abap,abap/zcl_other.clas.abap
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
## Use Case
|
|
146
|
-
|
|
147
|
-
Use `inspect` when:
|
|
148
|
-
- Pull shows "Error updating where-used list" (syntax error)
|
|
149
|
-
- You need detailed error messages with line numbers
|
|
150
|
-
- Debugging activation failures
|
|
151
|
-
|
|
152
|
-
```
|
|
153
|
-
abapgit-agent pull
|
|
154
|
-
❌ CLAS ZCL_MY_CLASS: Error updating where-used list
|
|
155
|
-
|
|
156
|
-
abapgit-agent inspect --files abap/zcl_my_class.clas.abap
|
|
157
|
-
❌ Line 15, Column 10: "ZMYCLASS" is not a type
|
|
158
|
-
```
|