abapgit-agent 1.1.6 → 1.3.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/.github/workflows/release.yml +3 -1
- package/API.md +261 -0
- package/CLAUDE.md +384 -0
- package/README.md +16 -2
- package/RELEASE_NOTES.md +93 -8
- package/abap/CLAUDE.md +282 -6
- package/abap/copilot-instructions.md +79 -0
- package/abap/zcl_abgagt_agent.clas.abap +2 -2
- package/abap/zcl_abgagt_cmd_factory.clas.abap +2 -0
- package/abap/zcl_abgagt_command_inspect.clas.abap +255 -36
- package/abap/zcl_abgagt_command_tree.clas.abap +237 -0
- package/abap/zcl_abgagt_command_tree.clas.xml +15 -0
- package/abap/zcl_abgagt_command_view.clas.abap +240 -0
- package/abap/zcl_abgagt_command_view.clas.xml +15 -0
- package/abap/zcl_abgagt_resource_tree.clas.abap +70 -0
- package/abap/zcl_abgagt_resource_tree.clas.xml +15 -0
- package/abap/zcl_abgagt_resource_view.clas.abap +68 -0
- package/abap/zcl_abgagt_resource_view.clas.xml +15 -0
- package/abap/zcl_abgagt_rest_handler.clas.abap +2 -0
- package/abap/zcl_abgagt_util.clas.abap +2 -2
- package/abap/zcl_abgagt_viewer_clas.clas.abap +58 -0
- package/abap/zcl_abgagt_viewer_clas.clas.xml +15 -0
- package/abap/zcl_abgagt_viewer_ddls.clas.abap +83 -0
- package/abap/zcl_abgagt_viewer_ddls.clas.xml +15 -0
- package/abap/zcl_abgagt_viewer_dtel.clas.abap +98 -0
- package/abap/zcl_abgagt_viewer_dtel.clas.xml +15 -0
- package/abap/zcl_abgagt_viewer_factory.clas.abap +41 -0
- package/abap/zcl_abgagt_viewer_factory.clas.xml +15 -0
- package/abap/zcl_abgagt_viewer_intf.clas.abap +58 -0
- package/abap/zcl_abgagt_viewer_intf.clas.xml +15 -0
- package/abap/zcl_abgagt_viewer_stru.clas.abap +59 -0
- package/abap/zcl_abgagt_viewer_stru.clas.xml +15 -0
- package/abap/zcl_abgagt_viewer_tabl.clas.abap +59 -0
- package/abap/zcl_abgagt_viewer_tabl.clas.xml +15 -0
- package/abap/zcl_abgagt_viewer_ttyp.clas.abap +93 -0
- package/abap/zcl_abgagt_viewer_ttyp.clas.xml +15 -0
- package/abap/zif_abgagt_command.intf.abap +3 -1
- package/abap/zif_abgagt_viewer.intf.abap +12 -0
- package/abap/zif_abgagt_viewer.intf.xml +15 -0
- package/bin/abapgit-agent +605 -38
- package/docs/commands.md +27 -8
- package/docs/tree-command.md +303 -0
- package/docs/view-command.md +501 -0
- package/package.json +1 -1
- package/src/abap-client.js +22 -0
- package/src/agent.js +27 -0
|
@@ -40,8 +40,10 @@ jobs:
|
|
|
40
40
|
id: release_notes
|
|
41
41
|
run: |
|
|
42
42
|
if [ -f "RELEASE_NOTES.md" ]; then
|
|
43
|
+
# Extract only the current release (first section until --- separator)
|
|
44
|
+
content=$(awk '/^---$/{exit}1' RELEASE_NOTES.md)
|
|
43
45
|
echo "CONTENT<<EOF" >> $GITHUB_OUTPUT
|
|
44
|
-
|
|
46
|
+
echo "$content" >> $GITHUB_OUTPUT
|
|
45
47
|
echo "EOF" >> $GITHUB_OUTPUT
|
|
46
48
|
else
|
|
47
49
|
echo "CONTENT=No release notes" >> $GITHUB_OUTPUT
|
package/API.md
CHANGED
|
@@ -10,6 +10,8 @@ The ABAP system exposes these endpoints via SICF handler: `sap/bc/z_abapgit_agen
|
|
|
10
10
|
| POST | `/pull` | Pull and activate repository |
|
|
11
11
|
| POST | `/inspect` | Inspect source file for issues |
|
|
12
12
|
| POST | `/unit` | Execute unit tests (AUnit) |
|
|
13
|
+
| POST | `/tree` | Display package hierarchy tree |
|
|
14
|
+
| POST | `/view` | View ABAP object definitions |
|
|
13
15
|
|
|
14
16
|
## GET /health
|
|
15
17
|
|
|
@@ -222,6 +224,223 @@ The endpoint parses file names to extract `obj_type` and `obj_name`, then runs A
|
|
|
222
224
|
}
|
|
223
225
|
```
|
|
224
226
|
|
|
227
|
+
## POST /tree
|
|
228
|
+
|
|
229
|
+
Display package hierarchy tree from ABAP system.
|
|
230
|
+
|
|
231
|
+
### Request Body
|
|
232
|
+
|
|
233
|
+
```json
|
|
234
|
+
{
|
|
235
|
+
"package": "$MY_PACKAGE",
|
|
236
|
+
"depth": 3,
|
|
237
|
+
"include_objects": true
|
|
238
|
+
}
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
| Field | Type | Description |
|
|
242
|
+
|-------|------|-------------|
|
|
243
|
+
| `package` | String | Package name (required) |
|
|
244
|
+
| `depth` | Integer | Maximum depth (default: 3, max: 10) |
|
|
245
|
+
| `include_objects` | Boolean | Include object counts by type |
|
|
246
|
+
|
|
247
|
+
### Response (success)
|
|
248
|
+
|
|
249
|
+
```json
|
|
250
|
+
{
|
|
251
|
+
"success": true,
|
|
252
|
+
"command": "TREE",
|
|
253
|
+
"package": "$MY_PACKAGE",
|
|
254
|
+
"message": "Tree retrieved successfully",
|
|
255
|
+
"parent_package": "$ZSAP_BASE",
|
|
256
|
+
"nodes": [
|
|
257
|
+
{
|
|
258
|
+
"package": "$MY_PACKAGE",
|
|
259
|
+
"parent": "",
|
|
260
|
+
"description": "$MY_PACKAGE",
|
|
261
|
+
"depth": 0,
|
|
262
|
+
"object_count": 10
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
"package": "$MY_SUBPACKAGE",
|
|
266
|
+
"parent": "$MY_PACKAGE",
|
|
267
|
+
"description": "$MY_SUBPACKAGE",
|
|
268
|
+
"depth": 1,
|
|
269
|
+
"object_count": 5
|
|
270
|
+
}
|
|
271
|
+
],
|
|
272
|
+
"total_packages": 2,
|
|
273
|
+
"total_objects": 15,
|
|
274
|
+
"objects": [
|
|
275
|
+
{ "object": "CLAS", "count": 8 },
|
|
276
|
+
{ "object": "INTF", "count": 2 },
|
|
277
|
+
{ "object": "TABL", "count": 5 }
|
|
278
|
+
],
|
|
279
|
+
"error": ""
|
|
280
|
+
}
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
### Response (error)
|
|
284
|
+
|
|
285
|
+
```json
|
|
286
|
+
{
|
|
287
|
+
"success": false,
|
|
288
|
+
"command": "TREE",
|
|
289
|
+
"package": "$NONEXISTENT",
|
|
290
|
+
"error": "Package $NONEXISTENT does not exist"
|
|
291
|
+
}
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
## POST /view
|
|
295
|
+
|
|
296
|
+
View ABAP object definitions directly from ABAP system.
|
|
297
|
+
|
|
298
|
+
### Request Body
|
|
299
|
+
|
|
300
|
+
```json
|
|
301
|
+
{
|
|
302
|
+
"objects": ["ZCL_MY_CLASS", "ZIF_MY_INTERFACE", "SFLIGHT"],
|
|
303
|
+
"type": "CLAS"
|
|
304
|
+
}
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
| Field | Type | Description |
|
|
308
|
+
|-------|------|-------------|
|
|
309
|
+
| `objects` | Array | List of object names (required) |
|
|
310
|
+
| `type` | String | Object type (CLAS, INTF, TABL, STRU, DTEL). Auto-detected if not specified |
|
|
311
|
+
|
|
312
|
+
### Supported Object Types
|
|
313
|
+
|
|
314
|
+
| Type | Description |
|
|
315
|
+
|------|-------------|
|
|
316
|
+
| CLAS | Global ABAP class |
|
|
317
|
+
| INTF | Global interface |
|
|
318
|
+
| TABL | Database table |
|
|
319
|
+
| STRU | Structure type |
|
|
320
|
+
| DTEL | Data element |
|
|
321
|
+
|
|
322
|
+
### Response (success - class/interface)
|
|
323
|
+
|
|
324
|
+
```json
|
|
325
|
+
{
|
|
326
|
+
"success": true,
|
|
327
|
+
"command": "VIEW",
|
|
328
|
+
"message": "Retrieved object(s)",
|
|
329
|
+
"objects": [
|
|
330
|
+
{
|
|
331
|
+
"name": "ZCL_MY_CLASS",
|
|
332
|
+
"type": "CLAS",
|
|
333
|
+
"type_text": "Class",
|
|
334
|
+
"description": "Class ZCL_MY_CLASS in $PACKAGE",
|
|
335
|
+
"source": "CLASS zcl_my_class DEFINITION PUBLIC.\n PUBLIC SECTION.\n ...",
|
|
336
|
+
"not_found": false,
|
|
337
|
+
"components": []
|
|
338
|
+
}
|
|
339
|
+
],
|
|
340
|
+
"summary": {
|
|
341
|
+
"total": 1,
|
|
342
|
+
"by_type": ["CLAS"]
|
|
343
|
+
},
|
|
344
|
+
"error": ""
|
|
345
|
+
}
|
|
346
|
+
```
|
|
347
|
+
|
|
348
|
+
### Response (success - table)
|
|
349
|
+
|
|
350
|
+
```json
|
|
351
|
+
{
|
|
352
|
+
"success": true,
|
|
353
|
+
"command": "VIEW",
|
|
354
|
+
"message": "Retrieved object(s)",
|
|
355
|
+
"objects": [
|
|
356
|
+
{
|
|
357
|
+
"name": "SFLIGHT",
|
|
358
|
+
"type": "TABL",
|
|
359
|
+
"type_text": "Table",
|
|
360
|
+
"description": "Table SFLIGHT in SAPBC_DATAMODEL",
|
|
361
|
+
"source": "",
|
|
362
|
+
"not_found": false,
|
|
363
|
+
"components": [
|
|
364
|
+
{
|
|
365
|
+
"field": "MANDT",
|
|
366
|
+
"key": true,
|
|
367
|
+
"type": "CLNT",
|
|
368
|
+
"length": 3,
|
|
369
|
+
"dataelement": "MANDT",
|
|
370
|
+
"description": "Client"
|
|
371
|
+
},
|
|
372
|
+
{
|
|
373
|
+
"field": "CARRID",
|
|
374
|
+
"key": true,
|
|
375
|
+
"type": "CHAR",
|
|
376
|
+
"length": 3,
|
|
377
|
+
"dataelement": "S_CARR_ID",
|
|
378
|
+
"description": "Airline Code"
|
|
379
|
+
}
|
|
380
|
+
]
|
|
381
|
+
}
|
|
382
|
+
],
|
|
383
|
+
"summary": {
|
|
384
|
+
"total": 1,
|
|
385
|
+
"by_type": ["TABL"]
|
|
386
|
+
},
|
|
387
|
+
"error": ""
|
|
388
|
+
}
|
|
389
|
+
```
|
|
390
|
+
|
|
391
|
+
### Response (success - data element)
|
|
392
|
+
|
|
393
|
+
```json
|
|
394
|
+
{
|
|
395
|
+
"success": true,
|
|
396
|
+
"command": "VIEW",
|
|
397
|
+
"message": "Retrieved object(s)",
|
|
398
|
+
"objects": [
|
|
399
|
+
{
|
|
400
|
+
"name": "S_CARR_ID",
|
|
401
|
+
"type": "DTEL",
|
|
402
|
+
"type_text": "Data Element",
|
|
403
|
+
"description": "Airline Code",
|
|
404
|
+
"domain": "S_CARR_ID",
|
|
405
|
+
"domain_type": "CHAR",
|
|
406
|
+
"domain_length": 3,
|
|
407
|
+
"domain_decimals": 0,
|
|
408
|
+
"not_found": false,
|
|
409
|
+
"components": []
|
|
410
|
+
}
|
|
411
|
+
],
|
|
412
|
+
"summary": {
|
|
413
|
+
"total": 1,
|
|
414
|
+
"by_type": ["DTEL"]
|
|
415
|
+
},
|
|
416
|
+
"error": ""
|
|
417
|
+
}
|
|
418
|
+
```
|
|
419
|
+
|
|
420
|
+
### Response (not found)
|
|
421
|
+
|
|
422
|
+
```json
|
|
423
|
+
{
|
|
424
|
+
"success": true,
|
|
425
|
+
"command": "VIEW",
|
|
426
|
+
"message": "Retrieved object(s)",
|
|
427
|
+
"objects": [
|
|
428
|
+
{
|
|
429
|
+
"name": "ZIF_NONEXISTENT",
|
|
430
|
+
"type": "",
|
|
431
|
+
"type_text": "Unknown",
|
|
432
|
+
"not_found": true,
|
|
433
|
+
"components": []
|
|
434
|
+
}
|
|
435
|
+
],
|
|
436
|
+
"summary": {
|
|
437
|
+
"total": 1,
|
|
438
|
+
"by_type": [""]
|
|
439
|
+
},
|
|
440
|
+
"error": ""
|
|
441
|
+
}
|
|
442
|
+
```
|
|
443
|
+
|
|
225
444
|
## Response Structure
|
|
226
445
|
|
|
227
446
|
### Pull Response Fields
|
|
@@ -261,6 +480,48 @@ The endpoint parses file names to extract `obj_type` and `obj_name`, then runs A
|
|
|
261
480
|
| `message` | String | Status message |
|
|
262
481
|
| `errors` | Array | Failed test details (empty if all tests pass) |
|
|
263
482
|
|
|
483
|
+
### Tree Response Fields
|
|
484
|
+
|
|
485
|
+
| Field | Type | Description |
|
|
486
|
+
|-------|------|-------------|
|
|
487
|
+
| `success` | Boolean | Whether the request succeeded |
|
|
488
|
+
| `command` | String | Command name ("TREE") |
|
|
489
|
+
| `package` | String | Root package name |
|
|
490
|
+
| `message` | String | Status message |
|
|
491
|
+
| `parent_package` | String | Parent package (empty if root) |
|
|
492
|
+
| `nodes` | Array | Flat list of all packages |
|
|
493
|
+
| `total_packages` | Integer | Total packages in tree |
|
|
494
|
+
| `total_objects` | Integer | Total objects in tree |
|
|
495
|
+
| `objects` | Array | Object counts by type |
|
|
496
|
+
| `error` | String | Error message (empty if success) |
|
|
497
|
+
|
|
498
|
+
### View Response Fields
|
|
499
|
+
|
|
500
|
+
| Field | Type | Description |
|
|
501
|
+
|-------|------|-------------|
|
|
502
|
+
| `success` | Boolean | Whether the request succeeded |
|
|
503
|
+
| `command` | String | Command name ("VIEW") |
|
|
504
|
+
| `message` | String | Status message |
|
|
505
|
+
| `objects` | Array | List of object information |
|
|
506
|
+
| `summary` | Object | Summary with total and by_type |
|
|
507
|
+
| `error` | String | Error message (empty if success) |
|
|
508
|
+
|
|
509
|
+
### Object Fields (for View)
|
|
510
|
+
|
|
511
|
+
| Field | Type | Description |
|
|
512
|
+
|-------|------|-------------|
|
|
513
|
+
| `name` | String | Object name |
|
|
514
|
+
| `type` | String | Object type (CLAS, INTF, TABL, STRU, DTEL) |
|
|
515
|
+
| `type_text` | String | Human-readable type |
|
|
516
|
+
| `description` | String | Object description |
|
|
517
|
+
| `source` | String | Source code (CLAS/INTF) |
|
|
518
|
+
| `domain` | String | Domain name (DTEL) |
|
|
519
|
+
| `domain_type` | String | Domain data type (DTEL) |
|
|
520
|
+
| `domain_length` | Integer | Domain length (DTEL) |
|
|
521
|
+
| `domain_decimals` | Integer | Domain decimals (DTEL) |
|
|
522
|
+
| `not_found` | Boolean | true if object does not exist |
|
|
523
|
+
| `components` | Array | Fields/components (TABL/STRU) |
|
|
524
|
+
|
|
264
525
|
### Error Item Fields
|
|
265
526
|
|
|
266
527
|
| Field | Type | Description |
|