abapgit-agent 1.5.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.
Files changed (117) hide show
  1. package/README.md +1 -0
  2. package/abap/guidelines/00_index.md +35 -0
  3. package/abap/guidelines/01_sql.md +72 -0
  4. package/abap/guidelines/02_exceptions.md +108 -0
  5. package/abap/guidelines/03_testing.md +252 -0
  6. package/abap/guidelines/04_cds.md +120 -0
  7. package/abap/guidelines/05_classes.md +50 -0
  8. package/abap/guidelines/06_objects.md +103 -0
  9. package/abap/guidelines/07_json.md +22 -0
  10. package/abap/guidelines/08_abapgit.md +193 -0
  11. package/bin/abapgit-agent +467 -30
  12. package/bin/abgagt +24 -0
  13. package/package.json +8 -2
  14. package/src/abap-client.js +65 -2
  15. package/src/agent.js +57 -3
  16. package/src/ref-search.js +989 -0
  17. package/.abapGitAgent.example +0 -11
  18. package/.github/workflows/release.yml +0 -60
  19. package/API.md +0 -710
  20. package/CLAUDE.md +0 -1058
  21. package/CLAUDE_MEM.md +0 -88
  22. package/ERROR_HANDLING.md +0 -30
  23. package/INSTALL.md +0 -155
  24. package/RELEASE_NOTES.md +0 -143
  25. package/abap/CLAUDE.md +0 -1010
  26. package/abap/copilot-instructions.md +0 -79
  27. package/abap/package.devc.xml +0 -10
  28. package/abap/zcl_abgagt_agent.clas.abap +0 -420
  29. package/abap/zcl_abgagt_agent.clas.xml +0 -15
  30. package/abap/zcl_abgagt_cmd_factory.clas.abap +0 -48
  31. package/abap/zcl_abgagt_cmd_factory.clas.xml +0 -15
  32. package/abap/zcl_abgagt_command_create.clas.abap +0 -95
  33. package/abap/zcl_abgagt_command_create.clas.xml +0 -15
  34. package/abap/zcl_abgagt_command_import.clas.abap +0 -138
  35. package/abap/zcl_abgagt_command_import.clas.xml +0 -15
  36. package/abap/zcl_abgagt_command_inspect.clas.abap +0 -456
  37. package/abap/zcl_abgagt_command_inspect.clas.testclasses.abap +0 -121
  38. package/abap/zcl_abgagt_command_inspect.clas.xml +0 -16
  39. package/abap/zcl_abgagt_command_preview.clas.abap +0 -386
  40. package/abap/zcl_abgagt_command_preview.clas.xml +0 -15
  41. package/abap/zcl_abgagt_command_pull.clas.abap +0 -80
  42. package/abap/zcl_abgagt_command_pull.clas.testclasses.abap +0 -87
  43. package/abap/zcl_abgagt_command_pull.clas.xml +0 -16
  44. package/abap/zcl_abgagt_command_tree.clas.abap +0 -237
  45. package/abap/zcl_abgagt_command_tree.clas.xml +0 -15
  46. package/abap/zcl_abgagt_command_unit.clas.abap +0 -297
  47. package/abap/zcl_abgagt_command_unit.clas.xml +0 -15
  48. package/abap/zcl_abgagt_command_view.clas.abap +0 -240
  49. package/abap/zcl_abgagt_command_view.clas.xml +0 -15
  50. package/abap/zcl_abgagt_resource_create.clas.abap +0 -71
  51. package/abap/zcl_abgagt_resource_create.clas.xml +0 -15
  52. package/abap/zcl_abgagt_resource_health.clas.abap +0 -25
  53. package/abap/zcl_abgagt_resource_health.clas.xml +0 -15
  54. package/abap/zcl_abgagt_resource_import.clas.abap +0 -66
  55. package/abap/zcl_abgagt_resource_import.clas.xml +0 -15
  56. package/abap/zcl_abgagt_resource_inspect.clas.abap +0 -63
  57. package/abap/zcl_abgagt_resource_inspect.clas.xml +0 -15
  58. package/abap/zcl_abgagt_resource_preview.clas.abap +0 -67
  59. package/abap/zcl_abgagt_resource_preview.clas.xml +0 -15
  60. package/abap/zcl_abgagt_resource_pull.clas.abap +0 -71
  61. package/abap/zcl_abgagt_resource_pull.clas.xml +0 -15
  62. package/abap/zcl_abgagt_resource_tree.clas.abap +0 -70
  63. package/abap/zcl_abgagt_resource_tree.clas.xml +0 -15
  64. package/abap/zcl_abgagt_resource_unit.clas.abap +0 -64
  65. package/abap/zcl_abgagt_resource_unit.clas.xml +0 -15
  66. package/abap/zcl_abgagt_resource_view.clas.abap +0 -68
  67. package/abap/zcl_abgagt_resource_view.clas.xml +0 -15
  68. package/abap/zcl_abgagt_rest_handler.clas.abap +0 -32
  69. package/abap/zcl_abgagt_rest_handler.clas.xml +0 -15
  70. package/abap/zcl_abgagt_util.clas.abap +0 -93
  71. package/abap/zcl_abgagt_util.clas.testclasses.abap +0 -84
  72. package/abap/zcl_abgagt_util.clas.xml +0 -16
  73. package/abap/zcl_abgagt_viewer_clas.clas.abap +0 -58
  74. package/abap/zcl_abgagt_viewer_clas.clas.xml +0 -15
  75. package/abap/zcl_abgagt_viewer_ddls.clas.abap +0 -83
  76. package/abap/zcl_abgagt_viewer_ddls.clas.xml +0 -15
  77. package/abap/zcl_abgagt_viewer_dtel.clas.abap +0 -98
  78. package/abap/zcl_abgagt_viewer_dtel.clas.xml +0 -15
  79. package/abap/zcl_abgagt_viewer_factory.clas.abap +0 -41
  80. package/abap/zcl_abgagt_viewer_factory.clas.xml +0 -15
  81. package/abap/zcl_abgagt_viewer_intf.clas.abap +0 -58
  82. package/abap/zcl_abgagt_viewer_intf.clas.xml +0 -15
  83. package/abap/zcl_abgagt_viewer_stru.clas.abap +0 -59
  84. package/abap/zcl_abgagt_viewer_stru.clas.xml +0 -15
  85. package/abap/zcl_abgagt_viewer_tabl.clas.abap +0 -59
  86. package/abap/zcl_abgagt_viewer_tabl.clas.xml +0 -15
  87. package/abap/zcl_abgagt_viewer_ttyp.clas.abap +0 -93
  88. package/abap/zcl_abgagt_viewer_ttyp.clas.xml +0 -15
  89. package/abap/zif_abgagt_agent.intf.abap +0 -53
  90. package/abap/zif_abgagt_agent.intf.xml +0 -15
  91. package/abap/zif_abgagt_cmd_factory.intf.abap +0 -7
  92. package/abap/zif_abgagt_cmd_factory.intf.xml +0 -15
  93. package/abap/zif_abgagt_command.intf.abap +0 -26
  94. package/abap/zif_abgagt_command.intf.xml +0 -15
  95. package/abap/zif_abgagt_util.intf.abap +0 -28
  96. package/abap/zif_abgagt_util.intf.xml +0 -15
  97. package/abap/zif_abgagt_viewer.intf.abap +0 -12
  98. package/abap/zif_abgagt_viewer.intf.xml +0 -15
  99. package/docs/commands.md +0 -142
  100. package/docs/create-command.md +0 -129
  101. package/docs/health-command.md +0 -89
  102. package/docs/import-command.md +0 -195
  103. package/docs/init-command.md +0 -189
  104. package/docs/inspect-command.md +0 -169
  105. package/docs/list-command.md +0 -289
  106. package/docs/preview-command.md +0 -528
  107. package/docs/pull-command.md +0 -202
  108. package/docs/status-command.md +0 -68
  109. package/docs/tree-command.md +0 -303
  110. package/docs/unit-command.md +0 -167
  111. package/docs/view-command.md +0 -501
  112. package/img/claude.png +0 -0
  113. package/scripts/claude-integration.js +0 -351
  114. package/scripts/release.js +0 -298
  115. package/scripts/release.sh +0 -60
  116. package/scripts/test-integration.js +0 -139
  117. package/scripts/unrelease.js +0 -277
package/CLAUDE_MEM.md DELETED
@@ -1,88 +0,0 @@
1
- # claude-mem for ABAP Knowledge Management
2
-
3
- claude-mem is a Claude Code plugin that stores memories across sessions. Use it to retain ABAP knowledge learned from the reference repositories.
4
-
5
- ## Setup
6
-
7
- 1. Install the plugin:
8
- ```bash
9
- /plugin marketplace add thedotmack/claude-mem
10
- /plugin install claude-mem
11
- ```
12
-
13
- ## Quick Start: Explore All Reference Docs at Once
14
-
15
- Use `claude-mem:make-plan` to bulk explore the abap-reference folder and save all knowledge:
16
-
17
- 1. In Claude Code, invoke the skill:
18
- ```
19
- /claude-mem:make-plan
20
- ```
21
-
22
- 2. Provide instructions to explore all reference repos:
23
- ```
24
- Explore the abap-reference folder at /Users/i045696/Documents/code/abap-reference
25
-
26
- It contains:
27
- - abapGit: ABAP file format patterns for abapGit deployment
28
- - styleguides: Clean ABAP coding standards
29
- - abap-cheat-sheets: Code snippets and examples
30
-
31
- Save all ABAP patterns and conventions to claude-mem memory:
32
- - ABAP class file format (ZCL_*.clas.abap, XML metadata)
33
- - Clean ABAP naming conventions
34
- - Authorization check patterns
35
- - Dynamic method calls
36
- - Syntax check via Code Inspector
37
-
38
- Focus on copy-ready patterns and code examples.
39
- ```
40
-
41
- 3. The subagent will:
42
- - Explore each repository
43
- - Extract patterns and examples
44
- - **Automatically save memories** to claude-mem
45
- - Create a plan document for reference
46
-
47
- ## Manual Knowledge Saving
48
-
49
- When you discover specific ABAP patterns, save them:
50
-
51
- ```
52
- /claude-mem:do
53
- ```
54
-
55
- This launches a subagent to implement your task and **automatically save memories**.
56
-
57
- ## Retrieving Knowledge
58
-
59
- When you need to recall previously learned ABAP patterns:
60
-
61
- ```
62
- /claude-mem:mem-search
63
- ```
64
-
65
- Then search for topics like:
66
- - "ABAP class structure"
67
- - "Clean ABAP naming"
68
- - "Authorization check"
69
- - "Dynamic method call"
70
- - "abapGit syntax check"
71
-
72
- ## Key Memory Topics
73
-
74
- | Topic | What to Save |
75
- |-------|-------------|
76
- | abapGit format | `ZCL_*.clas.abap`, XML metadata pattern |
77
- | Clean ABAP | Naming conventions, patterns, anti-patterns |
78
- | Authorization | `AUTHORITY-CHECK` syntax, activity values |
79
- | Dynamic calls | `CALL METHOD (class)=>(method)` |
80
- | Syntax check | `zcl_abapgit_code_inspector=>run()` |
81
-
82
- ## Workflow
83
-
84
- 1. **First time**: Use `claude-mem:make-plan` to explore and save all reference docs
85
- 2. **During work**: Use `claude-mem:do` to save new discoveries
86
- 3. **When needed**: Use `claude-mem:mem-search` to recall patterns
87
-
88
- claude-mem persists across sessions - your learned knowledge is saved.
package/ERROR_HANDLING.md DELETED
@@ -1,30 +0,0 @@
1
- # Error Handling
2
-
3
- ## Error Types
4
-
5
- | Error Type | Response | Handling |
6
- |------------|----------|----------|
7
- | Syntax Error | `success=""`, `error_detail` contains object names | Claude fixes and repulls |
8
- | Activation Error | `success=""`, `error_detail` contains inactive objects | Check TADIR for details |
9
- | Network Timeout | HTTP timeout | Retry request |
10
- | Repository Not Found | `success=""`, message="Repository not found" | Verify URL |
11
-
12
- ## Troubleshooting
13
-
14
- ### REST API not accessible
15
-
16
- 1. Check SICF activation: `sap/bc/z_abapgit_agent`
17
- 2. Verify handler class: `ZCL_ABAPGIT_AGENT_HANDLER`
18
- 3. Check authorization
19
-
20
- ### Agent cannot connect to ABAP
21
-
22
- 1. Verify REST API URL in .abapGitAgent
23
- 2. Check credentials in .abapGitAgent
24
- 3. Test REST API directly with curl
25
-
26
- ### Activation errors not shown
27
-
28
- 1. Check TADIR for inactive objects in the package
29
- 2. Verify abapGit settings for activation
30
- 3. Check SE80 for object activation status
package/INSTALL.md DELETED
@@ -1,155 +0,0 @@
1
- # Installation & Setup
2
-
3
- ## Architecture
4
-
5
- ```
6
- Claude (VS Code) → CLI Tool → ABAP System (REST/HTTP)
7
-
8
- Result + Error Feedback
9
- ```
10
-
11
- ## Components
12
-
13
- ### ABAP Side - REST Implementation
14
-
15
- The ABAP backend consists of:
16
- - **Main agent** - Core logic for pull, inspect, unit operations
17
- - **REST handler** - Routes HTTP requests to appropriate resources
18
- - **Resource handlers** - Individual endpoints (/pull, /inspect, /unit, /tree, /view, /preview, /health)
19
-
20
- Deploy all ABAP objects using abapGit from the `/abap` folder.
21
-
22
- ### CLI Tool (Node.js)
23
- - REST client for ABAP communication
24
- - Configuration management (reads from cwd/.abapGitAgent)
25
- - Auto-detects git remote URL and branch from current directory
26
- - Cookie-based session management
27
-
28
- ## Why REST API?
29
-
30
- The REST API approach provides several advantages:
31
- - **No OData/Gateway needed** - Simpler setup
32
- - **Standard HTTP** - Easy to debug and test
33
- - **No SEGW required** - Direct ICF handler
34
- - **No native dependencies** - Works on any OS
35
-
36
- ## ABAP System Setup
37
-
38
- ### Prerequisites
39
-
40
- The developer version of abapGit is required to deploy the REST handler. Follow the [abapGit developer version installation guide](https://docs.abapgit.org/user-guide/getting-started/install.html#install-developer-version).
41
-
42
- ### Deploy ABAP Objects
43
-
44
- Deploy ABAP objects using abapGit:
45
-
46
- 1. Use abapGit to deploy the ABAP objects in `/abap` folder
47
- 2. Create SICF handler:
48
- - Run transaction `SICF`
49
- - Navigate to: `sap/bc/z_abapgit_agent`
50
- - Create if doesn't exist:
51
- - Right-click on `sap/bc` → **Create Element**
52
- - **Service Name**: `Z_ABAPGIT_AGENT`
53
- - **Handler Class**: `ZCL_ABGAGT_REST_HANDLER`
54
- - Activate the service
55
-
56
- ## CLI Installation
57
-
58
- ```bash
59
- # Option A: Install globally for system-level integration
60
- sudo npm install -g abapgit-agent
61
-
62
- # Option B: For local development, use npm link instead
63
- cd abapgit-agent
64
- sudo npm link
65
- ```
66
-
67
- ## Configuration
68
-
69
- Copy `.abapGitAgent.example` to `.abapGitAgent` in your repository root:
70
-
71
- ```bash
72
- cp .abapGitAgent.example .abapGitAgent
73
- ```
74
-
75
- ### Configuration Options
76
-
77
- **File-based** (.abapGitAgent):
78
- ```json
79
- {
80
- "host": "your-sap-system.com",
81
- "sapport": 443,
82
- "client": "100",
83
- "user": "TECH_USER",
84
- "password": "your-password",
85
- "language": "EN",
86
- "gitUsername": "github-username",
87
- "gitPassword": "github-token"
88
- }
89
- ```
90
-
91
- **Environment variables**:
92
- - `ABAP_HOST`, `ABAP_PORT`, `ABAP_CLIENT`, `ABAP_USER`, `ABAP_PASSWORD`
93
-
94
- ## System-Level Integration
95
-
96
- This package supports **system-level integration**, meaning any ABAP git repository can use it without cloning this repository:
97
-
98
- 1. **Install globally**: `sudo npm install -g abapgit-agent`
99
- 2. **Configure**: Add `.abapGitAgent` to your ABAP repo
100
- 3. **Use**: Run `abapgit-agent` from your repo directory
101
-
102
- ## Creating New ABAP Projects
103
-
104
- ### 1. Create Project Structure
105
-
106
- ```bash
107
- # Create new ABAP repository
108
- mkdir my-abap-repo
109
- cd my-abap-repo
110
-
111
- # Copy CLAUDE.md (tells Claude how to work with ABAP)
112
- cp /path/to/abapgit-agent/abap/CLAUDE.md .
113
-
114
- # Initialize git
115
- git init
116
- ```
117
-
118
- ### 2. Add ABAP Objects
119
-
120
- Copy your ABAP objects to the repo:
121
-
122
- ```bash
123
- # Copy individual objects
124
- cp /path/to/abapgit-agent/abap/zcl_*.abap ./
125
- ```
126
-
127
- ### 3. Configure and Push
128
-
129
- ```bash
130
- # Create .abapGitAgent config
131
- cp .abapGitAgent.example .abapGitAgent
132
- # Edit .abapGitAgent with your SAP system details
133
-
134
- # Initial commit
135
- git add .
136
- git commit -m "Initial ABAP project"
137
-
138
- # Add remote and push
139
- git remote add origin https://github.com/user/my-abap-repo.git
140
- git push -u origin main
141
- ```
142
-
143
- ### 4. Deploy to SAP
144
-
145
- Use abapGit in your SAP system to pull the repository.
146
-
147
- ## Claude Code Integration
148
-
149
- Claude Code automatically reads `CLAUDE.md` in your project root for context:
150
-
151
- 1. **No local syntax validation** - Claude knows ABAP needs SAP system
152
- 2. **Use `abapgit-agent pull`** - For validation after code generation
153
- 3. **Reference local docs** - See CLAUDE_MEM.md for knowledge management
154
-
155
- See `abap/CLAUDE.md` for detailed ABAP project guidelines.
package/RELEASE_NOTES.md DELETED
@@ -1,143 +0,0 @@
1
- # Release Notes
2
-
3
- ## v1.4.0
4
-
5
- ### New Features
6
-
7
- #### preview Command
8
- Preview data from ABAP tables or CDS views directly from the ABAP system:
9
-
10
- ```bash
11
- # Preview table data (auto-detect type)
12
- abapgit-agent preview --objects SFLIGHT
13
-
14
- # Preview CDS view data
15
- abapgit-agent preview --objects ZC_MY_CDS_VIEW --type DDLS
16
-
17
- # Preview with row limit
18
- abapgit-agent preview --objects SFLIGHT --limit 20
19
-
20
- # Preview with WHERE clause filter
21
- abapgit-agent preview --objects SFLIGHT --where "CARRID = 'AA'"
22
-
23
- # Preview specific columns only
24
- abapgit-agent preview --objects SFLIGHT --columns CARRID,CONNID,PRICE
25
-
26
- # Vertical format (for wide tables)
27
- abapgit-agent preview --objects SFLIGHT --vertical
28
-
29
- # Compact mode (truncated values)
30
- abapgit-agent preview --objects SFLIGHT --compact
31
-
32
- # JSON output
33
- abapgit-agent preview --objects SFLIGHT --json
34
- ```
35
-
36
- ### Documentation
37
-
38
- - Added comprehensive docs/preview-command.md
39
- - Updated API.md with /preview endpoint
40
- - Updated IMPLEMENTATION_PLAN.md with tree, view, preview commands
41
- - Simplified INSTALL.md ABAP components section
42
- - Updated README.md with preview command examples
43
- - Improved CLAUDE.md files with best practices
44
-
45
- ---
46
-
47
- ## v1.3.0
48
-
49
- ### New Features
50
-
51
- - **view Command**: Now supports TTYP (Table Type) and DDLS (CDS View)
52
-
53
- ### Bug Fixes
54
-
55
- - Fixed CDS view source display in view command
56
- - Fixed interface exception handling
57
-
58
- ---
59
-
60
- ## v1.2.0
61
-
62
- ### New Features
63
-
64
- #### tree Command
65
- Display package hierarchy tree from ABAP system:
66
- ```bash
67
- # Basic usage
68
- abapgit-agent tree --package $MY_PACKAGE
69
-
70
- # With object counts
71
- abapgit-agent tree --package $MY_PACKAGE --include-objects
72
-
73
- # Limit depth
74
- abapgit-agent tree --package $MY_PACKAGE --depth 2
75
-
76
- # JSON output for scripting
77
- abapgit-agent tree --package $MY_PACKAGE --json
78
- ```
79
-
80
- #### view Command
81
- View ABAP object definitions directly from ABAP system without pulling from git:
82
-
83
- ```bash
84
- # View class definition
85
- abapgit-agent view --objects ZCL_MY_CLASS
86
-
87
- # View interface
88
- abapgit-agent view --objects ZIF_MY_INTERFACE
89
-
90
- # View table structure
91
- abapgit-agent view --objects SFLIGHT --type TABL
92
-
93
- # View data element
94
- abapgit-agent view --objects S_CARR_ID --type DTEL
95
-
96
- # View multiple objects
97
- abapgit-agent view --objects ZCL_CLASS1,ZIF_INTERFACE1,ZMY_TABLE
98
-
99
- # Auto-detect type from TADIR
100
- abapgit-agent view --objects SFLIGHT
101
-
102
- # JSON output for scripting
103
- abapgit-agent view --objects ZCL_MY_CLASS --json
104
- ```
105
-
106
- **Supported Object Types:**
107
- - CLAS - Global ABAP class
108
- - INTF - Global interface
109
- - TABL - Database table
110
- - STRU - Structure type
111
- - DTEL - Data element
112
-
113
- ### Improvements
114
-
115
- - **Auto-detection**: view command now queries TADIR to automatically detect object types (no need to specify `--type` for most objects)
116
- - **Lowercase support**: Object names and types are case-insensitive
117
- - **Error handling**: Non-existent objects now display clear error messages
118
- - **Cleaner output**: Removed AI metadata block from tree command output
119
-
120
- ### Bug Fixes
121
-
122
- - Fixed non-existent object detection in view command
123
- - Fixed source code display for class/interface definitions
124
- - Fixed table and structure field display formatting
125
- - Fixed data element output with domain information
126
-
127
- ### Documentation
128
-
129
- - Added comprehensive docs/tree-command.md
130
- - Added comprehensive docs/view-command.md
131
- - Updated README.md with tree and view command examples
132
- - Updated CLAUDE.md with view command usage for exploring ABAP objects
133
-
134
- ---
135
-
136
- ## v1.1.6
137
-
138
- - Added `create` command to create online repository in ABAP system
139
- - Added `import` command to import objects from ABAP package to git
140
- - Added unit tests for create and import commands
141
- - Added GitHub Actions workflow for automated npm releases
142
- - Improved .gitignore handling in init command
143
- - Updated commands documentation