Commit 457c3cc
feat(parity): 15 new MCP tools + CLI↔MCP e2e test harness
MCP parity (CLI↔MCP symmetry for PR 103's new commands):
- cts_update_transport, cts_reassign_transport, cts_search_transports
- stat_package, get_package
- lookup_user
- run_abap (creates temp class, POST /oo/classrun, deletes)
- get_domain, get_data_element, get_structure (+source)
- get_cds_ddl, get_cds_dcl (+source)
- import_object, import_package, import_transport (wrap adt-cli
ImportService; tmp dir in tests)
- create_object / delete_object extended with DOMA, DTEL, TABL, STRUCT,
DDLS, DCLS dispatch (DDIC/CDS creation via typed contracts, wrapper
keys match schema: domain / wbobj / blueSource / source).
- Mock routes (adt-fixtures) extended: object-root GET/POST/PUT/DELETE
for CLAS/INTF/PROG/FUGR, every DDIC/CDS path (including source.main),
oo/classrun POST, cts/transports?_action=FIND, useraction flows,
searchconfiguration/metadata.
adt-mcp/tests/integration.test.ts: 83/83 pass including smoke tests
for every new tool.
CLI↔MCP parity harness (packages/adt-cli/tests/e2e/):
- harness.ts: startAdtHarness() boots the shared mock server, builds
one AdtClient, wires both CLI (via __setTestAdtClient DI hook) and
an in-memory MCP server at the same mock port. Commander program is
built once per harness with exitOverride; runCliCommand captures
stdout/stderr/exit. callMcpTool invokes via @modelcontextprotocol/sdk
InMemoryTransport. assertParity runs both paths against the same
fixtures and invokes a supplied expect() callback.
- parity.cts.test.ts (10 tests): list/get/create/release/reassign/
delete/search/update transports.
- parity.objects.test.ts (16 tests): CRUD for class, program,
interface; package get/list/activate/delete/stat.
- parity.ddic-cds.test.ts (16 tests): domain, dataelement, table,
structure, DDL, DCL CRUD + source get.
- parity.misc.test.ts (24 tests): check (single + package), osql,
run_abap, user (current/exact/search), lock/unlock, source get/put,
info, discovery.
- smoke.test.ts (4 tests): harness self-test.
Totals: 70 parity tests, 68 pass, 2 it.todo (documented reasons:
cts tr set uses custom AdkContext bypassing global lockService;
check_syntax MCP tool lacks packageName param).
src/lib/utils/adt-client-v2.ts: adds __setTestAdtClient DI hook that
short-circuits getAdtClientV2() in tests (bypasses disk auth + ADK
init). Initialization is called once inside the harness.
bun.lock: regenerated.
Generated with [Devin](https://cli.devin.ai/docs)
Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>1 parent d25885b commit 457c3cc
28 files changed
Lines changed: 3620 additions & 4 deletions
File tree
- packages
- adt-cli
- src/lib/utils
- tests/e2e
- adt-mcp
- src/lib/tools
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
61 | 87 | | |
62 | 88 | | |
63 | 89 | | |
| |||
162 | 188 | | |
163 | 189 | | |
164 | 190 | | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
165 | 197 | | |
166 | 198 | | |
167 | 199 | | |
| |||
0 commit comments