arc-1 1.4.0 → 1.5.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 (235) hide show
  1. package/dist/adt/abapgit.d.ts.map +1 -1
  2. package/dist/adt/abapgit.js +64 -7
  3. package/dist/adt/abapgit.js.map +1 -1
  4. package/dist/adt/aunit.js +4 -4
  5. package/dist/adt/aunit.js.map +1 -1
  6. package/dist/adt/class-structure.d.ts +4 -2
  7. package/dist/adt/class-structure.d.ts.map +1 -1
  8. package/dist/adt/class-structure.js +18 -9
  9. package/dist/adt/class-structure.js.map +1 -1
  10. package/dist/adt/client.d.ts +18 -52
  11. package/dist/adt/client.d.ts.map +1 -1
  12. package/dist/adt/client.js +69 -92
  13. package/dist/adt/client.js.map +1 -1
  14. package/dist/adt/config.d.ts +5 -0
  15. package/dist/adt/config.d.ts.map +1 -1
  16. package/dist/adt/config.js.map +1 -1
  17. package/dist/adt/crud.d.ts +3 -3
  18. package/dist/adt/crud.d.ts.map +1 -1
  19. package/dist/adt/crud.js +21 -6
  20. package/dist/adt/crud.js.map +1 -1
  21. package/dist/adt/data-source-policy.d.ts +20 -8
  22. package/dist/adt/data-source-policy.d.ts.map +1 -1
  23. package/dist/adt/data-source-policy.js +55 -109
  24. package/dist/adt/data-source-policy.js.map +1 -1
  25. package/dist/adt/ddic-xml.d.ts +9 -0
  26. package/dist/adt/ddic-xml.d.ts.map +1 -1
  27. package/dist/adt/ddic-xml.js +17 -3
  28. package/dist/adt/ddic-xml.js.map +1 -1
  29. package/dist/adt/devtools.js +3 -3
  30. package/dist/adt/devtools.js.map +1 -1
  31. package/dist/adt/diagnostics.js +4 -4
  32. package/dist/adt/diagnostics.js.map +1 -1
  33. package/dist/adt/enhancements.d.ts +7 -0
  34. package/dist/adt/enhancements.d.ts.map +1 -0
  35. package/dist/adt/enhancements.js +89 -0
  36. package/dist/adt/enhancements.js.map +1 -0
  37. package/dist/adt/errors.d.ts +19 -10
  38. package/dist/adt/errors.d.ts.map +1 -1
  39. package/dist/adt/errors.js +73 -53
  40. package/dist/adt/errors.js.map +1 -1
  41. package/dist/adt/fm-signature.d.ts +1 -1
  42. package/dist/adt/fm-signature.d.ts.map +1 -1
  43. package/dist/adt/fm-signature.js +9 -1
  44. package/dist/adt/fm-signature.js.map +1 -1
  45. package/dist/adt/http.d.ts +7 -27
  46. package/dist/adt/http.d.ts.map +1 -1
  47. package/dist/adt/http.js +23 -28
  48. package/dist/adt/http.js.map +1 -1
  49. package/dist/adt/internal-data-operations.d.ts +3 -2
  50. package/dist/adt/internal-data-operations.d.ts.map +1 -1
  51. package/dist/adt/internal-data-operations.js +8 -1
  52. package/dist/adt/internal-data-operations.js.map +1 -1
  53. package/dist/adt/lock-object.d.ts +92 -0
  54. package/dist/adt/lock-object.d.ts.map +1 -0
  55. package/dist/adt/lock-object.js +195 -0
  56. package/dist/adt/lock-object.js.map +1 -0
  57. package/dist/adt/rap-generate.d.ts +5 -1
  58. package/dist/adt/rap-generate.d.ts.map +1 -1
  59. package/dist/adt/rap-generate.js +112 -100
  60. package/dist/adt/rap-generate.js.map +1 -1
  61. package/dist/adt/server-driven.d.ts +42 -10
  62. package/dist/adt/server-driven.d.ts.map +1 -1
  63. package/dist/adt/server-driven.js +98 -18
  64. package/dist/adt/server-driven.js.map +1 -1
  65. package/dist/adt/source-precondition.d.ts +3 -0
  66. package/dist/adt/source-precondition.d.ts.map +1 -0
  67. package/dist/adt/source-precondition.js +12 -0
  68. package/dist/adt/source-precondition.js.map +1 -0
  69. package/dist/adt/text-search.js +5 -5
  70. package/dist/adt/text-search.js.map +1 -1
  71. package/dist/adt/transport.js +3 -3
  72. package/dist/adt/transport.js.map +1 -1
  73. package/dist/adt/types.d.ts +19 -1
  74. package/dist/adt/types.d.ts.map +1 -1
  75. package/dist/adt/user-agent.d.ts +4 -0
  76. package/dist/adt/user-agent.d.ts.map +1 -0
  77. package/dist/adt/user-agent.js +11 -0
  78. package/dist/adt/user-agent.js.map +1 -0
  79. package/dist/adt/xml-entities.d.ts +3 -0
  80. package/dist/adt/xml-entities.d.ts.map +1 -0
  81. package/dist/adt/xml-entities.js +19 -0
  82. package/dist/adt/xml-entities.js.map +1 -0
  83. package/dist/adt/xml-parser.d.ts +7 -30
  84. package/dist/adt/xml-parser.d.ts.map +1 -1
  85. package/dist/adt/xml-parser.js +25 -54
  86. package/dist/adt/xml-parser.js.map +1 -1
  87. package/dist/authz/policy.d.ts.map +1 -1
  88. package/dist/authz/policy.js +2 -0
  89. package/dist/authz/policy.js.map +1 -1
  90. package/dist/cache/caching-layer.d.ts.map +1 -1
  91. package/dist/cache/caching-layer.js +5 -10
  92. package/dist/cache/caching-layer.js.map +1 -1
  93. package/dist/cli.js +1 -1
  94. package/dist/cli.js.map +1 -1
  95. package/dist/context/grep.d.ts +14 -0
  96. package/dist/context/grep.d.ts.map +1 -1
  97. package/dist/context/grep.js +49 -0
  98. package/dist/context/grep.js.map +1 -1
  99. package/dist/context/unit-surgery.d.ts +3 -1
  100. package/dist/context/unit-surgery.d.ts.map +1 -1
  101. package/dist/context/unit-surgery.js +52 -5
  102. package/dist/context/unit-surgery.js.map +1 -1
  103. package/dist/handlers/activate.d.ts.map +1 -1
  104. package/dist/handlers/activate.js +7 -20
  105. package/dist/handlers/activate.js.map +1 -1
  106. package/dist/handlers/diagnose.d.ts.map +1 -1
  107. package/dist/handlers/diagnose.js +8 -29
  108. package/dist/handlers/diagnose.js.map +1 -1
  109. package/dist/handlers/dispatch.d.ts.map +1 -1
  110. package/dist/handlers/dispatch.js +20 -4
  111. package/dist/handlers/dispatch.js.map +1 -1
  112. package/dist/handlers/editable-source.d.ts +6 -0
  113. package/dist/handlers/editable-source.d.ts.map +1 -0
  114. package/dist/handlers/editable-source.js +53 -0
  115. package/dist/handlers/editable-source.js.map +1 -0
  116. package/dist/handlers/feature-cache.d.ts +2 -0
  117. package/dist/handlers/feature-cache.d.ts.map +1 -1
  118. package/dist/handlers/feature-cache.js +8 -0
  119. package/dist/handlers/feature-cache.js.map +1 -1
  120. package/dist/handlers/hyperfocused.js +1 -1
  121. package/dist/handlers/hyperfocused.js.map +1 -1
  122. package/dist/handlers/lint.js +1 -1
  123. package/dist/handlers/lint.js.map +1 -1
  124. package/dist/handlers/object-types.d.ts +2 -3
  125. package/dist/handlers/object-types.d.ts.map +1 -1
  126. package/dist/handlers/object-types.js +13 -5
  127. package/dist/handlers/object-types.js.map +1 -1
  128. package/dist/handlers/read.d.ts.map +1 -1
  129. package/dist/handlers/read.js +38 -7
  130. package/dist/handlers/read.js.map +1 -1
  131. package/dist/handlers/schemas.d.ts +39 -0
  132. package/dist/handlers/schemas.d.ts.map +1 -1
  133. package/dist/handlers/schemas.js +50 -7
  134. package/dist/handlers/schemas.js.map +1 -1
  135. package/dist/handlers/syntax.d.ts +5 -0
  136. package/dist/handlers/syntax.d.ts.map +1 -0
  137. package/dist/handlers/syntax.js +35 -0
  138. package/dist/handlers/syntax.js.map +1 -0
  139. package/dist/handlers/tool-descriptions.d.ts.map +1 -1
  140. package/dist/handlers/tool-descriptions.js +7 -5
  141. package/dist/handlers/tool-descriptions.js.map +1 -1
  142. package/dist/handlers/tool-registry.d.ts +4 -4
  143. package/dist/handlers/tool-registry.d.ts.map +1 -1
  144. package/dist/handlers/tool-registry.js +4 -0
  145. package/dist/handlers/tool-registry.js.map +1 -1
  146. package/dist/handlers/tools.d.ts +1 -16
  147. package/dist/handlers/tools.d.ts.map +1 -1
  148. package/dist/handlers/tools.js +40 -51
  149. package/dist/handlers/tools.js.map +1 -1
  150. package/dist/handlers/transport.d.ts.map +1 -1
  151. package/dist/handlers/transport.js +17 -3
  152. package/dist/handlers/transport.js.map +1 -1
  153. package/dist/handlers/where-used.d.ts.map +1 -1
  154. package/dist/handlers/where-used.js +0 -5
  155. package/dist/handlers/where-used.js.map +1 -1
  156. package/dist/handlers/write/class-edit.d.ts +16 -0
  157. package/dist/handlers/write/class-edit.d.ts.map +1 -0
  158. package/dist/handlers/write/class-edit.js +55 -0
  159. package/dist/handlers/write/class-edit.js.map +1 -0
  160. package/dist/handlers/write/class-surgery.d.ts +2 -2
  161. package/dist/handlers/write/class-surgery.d.ts.map +1 -1
  162. package/dist/handlers/write/class-surgery.js +189 -220
  163. package/dist/handlers/write/class-surgery.js.map +1 -1
  164. package/dist/handlers/write/context.d.ts +1 -8
  165. package/dist/handlers/write/context.d.ts.map +1 -1
  166. package/dist/handlers/write/create.d.ts.map +1 -1
  167. package/dist/handlers/write/create.js +11 -4
  168. package/dist/handlers/write/create.js.map +1 -1
  169. package/dist/handlers/write/metadata-update.d.ts +4 -0
  170. package/dist/handlers/write/metadata-update.d.ts.map +1 -0
  171. package/dist/handlers/write/metadata-update.js +58 -0
  172. package/dist/handlers/write/metadata-update.js.map +1 -0
  173. package/dist/handlers/write/rap.d.ts.map +1 -1
  174. package/dist/handlers/write/rap.js +132 -155
  175. package/dist/handlers/write/rap.js.map +1 -1
  176. package/dist/handlers/write/unit-surgery.d.ts +2 -2
  177. package/dist/handlers/write/unit-surgery.d.ts.map +1 -1
  178. package/dist/handlers/write/unit-surgery.js +14 -8
  179. package/dist/handlers/write/unit-surgery.js.map +1 -1
  180. package/dist/handlers/write/update-delete.d.ts.map +1 -1
  181. package/dist/handlers/write/update-delete.js +34 -82
  182. package/dist/handlers/write/update-delete.js.map +1 -1
  183. package/dist/handlers/write-helpers.d.ts +3 -2
  184. package/dist/handlers/write-helpers.d.ts.map +1 -1
  185. package/dist/handlers/write-helpers.js +118 -15
  186. package/dist/handlers/write-helpers.js.map +1 -1
  187. package/dist/handlers/write.d.ts.map +1 -1
  188. package/dist/handlers/write.js +12 -27
  189. package/dist/handlers/write.js.map +1 -1
  190. package/dist/public/read-only-client.d.ts +6 -0
  191. package/dist/public/read-only-client.d.ts.map +1 -0
  192. package/dist/public/read-only-client.js +66 -0
  193. package/dist/public/read-only-client.js.map +1 -0
  194. package/dist/public/types.d.ts +2 -13
  195. package/dist/public/types.d.ts.map +1 -1
  196. package/dist/server/audit.d.ts +6 -1
  197. package/dist/server/audit.d.ts.map +1 -1
  198. package/dist/server/audit.js.map +1 -1
  199. package/dist/server/config.d.ts.map +1 -1
  200. package/dist/server/config.js +3 -0
  201. package/dist/server/config.js.map +1 -1
  202. package/dist/server/deny-actions.d.ts +2 -1
  203. package/dist/server/deny-actions.d.ts.map +1 -1
  204. package/dist/server/deny-actions.js +13 -2
  205. package/dist/server/deny-actions.js.map +1 -1
  206. package/dist/server/logger.d.ts +3 -3
  207. package/dist/server/logger.d.ts.map +1 -1
  208. package/dist/server/logger.js +7 -7
  209. package/dist/server/logger.js.map +1 -1
  210. package/dist/server/multi-target-basic-auth.d.ts.map +1 -1
  211. package/dist/server/multi-target-basic-auth.js +1 -0
  212. package/dist/server/multi-target-basic-auth.js.map +1 -1
  213. package/dist/server/multi-target-runtime.d.ts.map +1 -1
  214. package/dist/server/multi-target-runtime.js +1 -0
  215. package/dist/server/multi-target-runtime.js.map +1 -1
  216. package/dist/server/plugin-loader.d.ts.map +1 -1
  217. package/dist/server/plugin-loader.js +1 -3
  218. package/dist/server/plugin-loader.js.map +1 -1
  219. package/dist/server/safe-http-client.d.ts +6 -12
  220. package/dist/server/safe-http-client.d.ts.map +1 -1
  221. package/dist/server/safe-http-client.js +28 -63
  222. package/dist/server/safe-http-client.js.map +1 -1
  223. package/dist/server/server.d.ts +5 -4
  224. package/dist/server/server.d.ts.map +1 -1
  225. package/dist/server/server.js +30 -23
  226. package/dist/server/server.js.map +1 -1
  227. package/dist/server/types.d.ts +1 -0
  228. package/dist/server/types.d.ts.map +1 -1
  229. package/dist/server/types.js +2 -0
  230. package/dist/server/types.js.map +1 -1
  231. package/dist/version.d.ts +3 -0
  232. package/dist/version.d.ts.map +1 -0
  233. package/dist/version.js +3 -0
  234. package/dist/version.js.map +1 -0
  235. package/package.json +7 -7
@@ -0,0 +1,35 @@
1
+ import { syntaxCheck } from '../adt/devtools.js';
2
+ import { normalizeObjectType, objectUrlForType } from './object-types.js';
3
+ import { textResult, toolJson } from './shared.js';
4
+ /** Shared wire and result contract for both syntax-check entry points. */
5
+ export async function handleSyntaxCheck(client, args) {
6
+ const type = normalizeObjectType(String(args.type ?? ''));
7
+ const name = String(args.name ?? '');
8
+ const objectUrl = objectUrlForType(type, name);
9
+ const version = args.version === 'inactive' ? 'inactive' : args.version === 'active' ? 'active' : undefined;
10
+ const content = typeof args.source === 'string' ? args.source : undefined;
11
+ const opts = {};
12
+ if (version)
13
+ opts.version = version;
14
+ if (content !== undefined)
15
+ opts.content = content;
16
+ const result = await syntaxCheck(client.http, client.safety, objectUrl, Object.keys(opts).length > 0 ? opts : undefined);
17
+ // Fail closed: SAP checked nothing (object does not exist yet) → never report "clean", or
18
+ // callers read hasErrors:false as "SAP will accept this source".
19
+ if (!result.checked) {
20
+ return textResult(toolJson({
21
+ ...result,
22
+ hasErrors: true,
23
+ messages: [
24
+ {
25
+ severity: 'error',
26
+ text: `Not checked — ${(result.statusText || 'SAP did not process this check').replace(/\.$/, '')}. The source was NOT validated; create the object first (SAPWrite action="create"), then re-run the syntax check.`,
27
+ line: 0,
28
+ column: 0,
29
+ },
30
+ ],
31
+ }));
32
+ }
33
+ return textResult(toolJson(result));
34
+ }
35
+ //# sourceMappingURL=syntax.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"syntax.js","sourceRoot":"","sources":["../../src/handlers/syntax.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC1E,OAAO,EAAmB,UAAU,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEpE,0EAA0E;AAC1E,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,MAAiB,EAAE,IAA6B;IACtF,MAAM,IAAI,GAAG,mBAAmB,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC;IAC1D,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F,CAAC,CACH,CAAC;IACJ,CAAC;IACD,OAAO,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;AACtC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"tool-descriptions.d.ts","sourceRoot":"","sources":["../../src/handlers/tool-descriptions.ts"],"names":[],"mappings":"AAAA,uGAAuG;AAwDvG,eAAO,MAAM,oBAAoB,QAAwE,CAAC;AAC1G,eAAO,MAAM,iBAAiB,QAAqE,CAAC"}
1
+ {"version":3,"file":"tool-descriptions.d.ts","sourceRoot":"","sources":["../../src/handlers/tool-descriptions.ts"],"names":[],"mappings":"AAAA,uGAAuG;AA0DvG,eAAO,MAAM,oBAAoB,QAAwE,CAAC;AAC1G,eAAO,MAAM,iBAAiB,QAAqE,CAAC"}
@@ -10,10 +10,11 @@
10
10
  const SAPWRITE_LEAD = 'Change ABAP objects in the SAP system: create, update, delete, and targeted source edits. Use it ' +
11
11
  'when the request is to PERSIST a change — write, add, implement, refactor, or remove ABAP code ' +
12
12
  'or DDIC metadata. Reading is SAPRead; searching is SAPSearch; dependency analysis is SAPContext; ' +
13
- 'checking or formatting source without saving it is SAPLint or SAPDiagnose. ';
13
+ 'local lint/formatting is SAPLint; SAP syntax checks use SAPRead(type="SYNTAX"). ';
14
14
  const SAPWRITE_BODY_ONPREM =
15
15
  // The purpose and supported types already live in SAPWRITE_LEAD and the type property.
16
16
  'Handles lock/modify/unlock automatically. TTYP needs rowType + optional rowTypeKind. ' +
17
+ 'ENQU: SAPRead JSON in source; create needs primaryTable. Entries need explicit lockMode/parameterWanted; update refuses lockParameters=[]. Then SAPActivate. ' +
17
18
  'Type codes are auto-normalized and case-insensitive (e.g., "CLAS/OC" → "CLAS"). For delete, only type and name are required (plus optional transport). ' +
18
19
  'Source objects (PROG/CLAS/INTF/DDLS/DCLS/DDLX/BDEF/SRVD/TABL/INCL) write via /source/main. CLAS update: pass include=definitions|implementations|macros|testclasses to write a local include; omit for source/main. ' +
19
20
  'TABL create: "TABL"/"TABL/DT" → transparent table (16-char name); "TABL/DS" → structure (30-char, namespaces OK); update/delete/activate auto-discover the subtype. ' +
@@ -23,19 +24,20 @@ const SAPWRITE_BODY_ONPREM =
23
24
  'FUNC: needs "group"; pass structured `parameters` for the signature (read back via SAPRead includeSignature=true). ' +
24
25
  "INCL with group=: create/delete FUGR structural includes (name must start with L<GROUP>, e.g. LZFOOF01); SAP maintains the main program's INCLUDE line. " +
25
26
  'edit_method: replace one CLAS method body via source (95% fewer tokens than full-class). Local-class methods use the qualified specifier (e.g. "lhc_project~approve_project"); auto-routing: lhc_*/lcl_* → implementations, ltc_* → testclasses (override with include=); zif_*~* stays on /source/main. ' +
26
- 'edit_unit: replace one FORM/MODULE block in PROG/INCL using unit+source; group= supports FUGR includes. ' +
27
+ 'edit_unit/add_unit: replace/add one FORM/MODULE in PROG/INCL using unit+source; group= supports FUGR includes. ' +
27
28
  'batch_create: preflight all objects, then create+activate in dependency order; failures report per-object persistence. scaffold_rap_handlers / generate_behavior_implementation: derive RAP behavior-pool handlers from the BDEF (the latter auto-discovers the BDEF via rootEntityRef and activates by default). ' +
28
- 'Server-driven objects (discovery-gated): DESD/CSNM/EVTB/EVTO/COTA/UIAD take AFF JSON in "source"; DTSC/DSFD/DTDC/DRTY take DDL text — create/update/delete, then SAPActivate. ' +
29
+ 'Server-driven objects (discovery-gated): AFF JSON source (DTSC/DSFD/DTDC/DRTY: DDL); create/update/delete. APLO/UIAD save active; others need SAPActivate. SAJC/SAJT create require source.generalInformation.className/catalogName. ' +
29
30
  'edit_text_symbols: CLAS/PROG/FUGR textPart=symbols (default; one "@MaxLength:NN\\nNNN=text" per symbol, blank-line separated), selections ("PARAM=Label") or headings. CLAS: symbols only. Immediately active; needs ADT textelements. ' +
30
31
  'Full per-type field reference: docs_page SAPWrite. ';
31
- const SAPWRITE_BODY_BTP = 'Create or update ABAP source code and DDIC metadata (BTP ABAP Environment). Handles lock/modify/unlock automatically. Supports CLAS, INTF, DDLS, DCLS, DDLX, BDEF, SRVD, SRVB, SKTD/KTD, TABL, TABL/DT, TABL/DS, DOMA, DTEL, MSAG. ' +
32
+ const SAPWRITE_BODY_BTP = 'BTP ABAP Environment: handles lock/modify/unlock automatically. ' +
32
33
  'Must use ABAP Cloud language version (no classic statements); only Z*/Y* namespace. Type codes are auto-normalized (e.g. "CLAS/OC" → "CLAS"). For delete, only type and name are required (plus optional transport). ' +
33
34
  'Source objects (CLAS/INTF/DDLS/DCLS/DDLX/BDEF/SRVD/TABL) write via /source/main. CLAS update: pass include=definitions|implementations|macros|testclasses for a local include; omit for source/main. ' +
34
35
  'Metadata-XML writes (not /source/main): DOMA/DTEL (dataType, length, fixedValues, typeKind, labels, searchHelp; deactivateInputHistory=true disables input history); MSAG (messages array of {number, shortText}); SRVB (serviceDefinition, odataVersion V2/V4, optional category 0=UI/1=Web API). ' +
35
36
  'SKTD/KTD (Markdown docs on a KTD-capable object; KTD aliases SKTD): create needs refObjectType (e.g. "DDLS/DF"); "name" MUST equal the parent name; update takes Markdown in source; then SAPActivate(type="SKTD"). ' +
36
37
  'edit_method: replace one CLAS method body via source. Local-class methods use the qualified specifier (e.g. "lhc_project~approve_project"); auto-routing lhc_*/lcl_* → implementations, ltc_* → testclasses (override with include=). ' +
37
38
  'batch_create: preflight all objects, then create+activate in dependency order; failures report per-object persistence. scaffold_rap_handlers / generate_behavior_implementation: derive RAP behavior-pool handlers from the BDEF (the latter auto-discovers via rootEntityRef and activates by default). ' +
38
- 'Server-driven objects (discovery-gated): DESD/CSNM/EVTB/EVTO/COTA/UIAD take AFF JSON in "source"; DTSC/DSFD/DTDC/DRTY take DDL text — create/update/delete, then SAPActivate. ' +
39
+ 'ENQU: SAPRead JSON in source; create needs primaryTable. Entries need explicit lockMode/parameterWanted; update refuses lockParameters=[]. Then SAPActivate. ' +
40
+ 'Server-driven objects (discovery-gated): AFF JSON source (DTSC/DSFD/DTDC/DRTY: DDL); create/update/delete. APLO/UIAD save active; others need SAPActivate. SAJC/SAJT create require source.generalInformation.className/catalogName. ' +
39
41
  'Full per-type field reference: docs_page SAPWrite. ';
40
42
  // Appended to both SAPWrite descriptions (see the composition at the bottom). The schema lists every
41
43
  // optional field for every object type/action, but each call uses only a small subset — GPT/OpenAI
@@ -1 +1 @@
1
- {"version":3,"file":"tool-descriptions.js","sourceRoot":"","sources":["../../src/handlers/tool-descriptions.ts"],"names":[],"mappings":"AAAA,uGAAuG;AAEvG;;;;;;;GAOG;AACH,MAAM,aAAa,GACjB,mGAAmG;IACnG,iGAAiG;IACjG,mGAAmG;IACnG,6EAA6E,CAAC;AAEhF,MAAM,oBAAoB;AACxB,uFAAuF;AACvF,uFAAuF;IACvF,yJAAyJ;IACzJ,sNAAsN;IACtN,sKAAsK;IACtK,oVAAoV;IACpV,2OAA2O;IAC3O,0GAA0G;IAC1G,qHAAqH;IACrH,0JAA0J;IAC1J,2SAA2S;IAC3S,0GAA0G;IAC1G,oTAAoT;IACpT,gLAAgL;IAChL,yOAAyO;IACzO,qDAAqD,CAAC;AAExD,MAAM,iBAAiB,GACrB,qOAAqO;IACrO,uNAAuN;IACvN,uMAAuM;IACvM,qSAAqS;IACrS,sNAAsN;IACtN,wOAAwO;IACxO,2SAA2S;IAC3S,gLAAgL;IAChL,qDAAqD,CAAC;AAExD,qGAAqG;AACrG,mGAAmG;AACnG,iGAAiG;AACjG,4FAA4F;AAC5F,mGAAmG;AACnG,MAAM,8BAA8B,GAClC,iGAAiG;IACjG,4GAA4G,CAAC;AAE/G,oGAAoG;AACpG,gEAAgE;AAChE,MAAM,CAAC,MAAM,oBAAoB,GAAG,aAAa,GAAG,oBAAoB,GAAG,8BAA8B,CAAC;AAC1G,MAAM,CAAC,MAAM,iBAAiB,GAAG,aAAa,GAAG,iBAAiB,GAAG,8BAA8B,CAAC"}
1
+ {"version":3,"file":"tool-descriptions.js","sourceRoot":"","sources":["../../src/handlers/tool-descriptions.ts"],"names":[],"mappings":"AAAA,uGAAuG;AAEvG;;;;;;;GAOG;AACH,MAAM,aAAa,GACjB,mGAAmG;IACnG,iGAAiG;IACjG,mGAAmG;IACnG,kFAAkF,CAAC;AAErF,MAAM,oBAAoB;AACxB,uFAAuF;AACvF,uFAAuF;IACvF,+JAA+J;IAC/J,yJAAyJ;IACzJ,sNAAsN;IACtN,sKAAsK;IACtK,oVAAoV;IACpV,2OAA2O;IAC3O,0GAA0G;IAC1G,qHAAqH;IACrH,0JAA0J;IAC1J,2SAA2S;IAC3S,iHAAiH;IACjH,oTAAoT;IACpT,uOAAuO;IACvO,yOAAyO;IACzO,qDAAqD,CAAC;AAExD,MAAM,iBAAiB,GACrB,kEAAkE;IAClE,uNAAuN;IACvN,uMAAuM;IACvM,qSAAqS;IACrS,sNAAsN;IACtN,wOAAwO;IACxO,2SAA2S;IAC3S,+JAA+J;IAC/J,uOAAuO;IACvO,qDAAqD,CAAC;AAExD,qGAAqG;AACrG,mGAAmG;AACnG,iGAAiG;AACjG,4FAA4F;AAC5F,mGAAmG;AACnG,MAAM,8BAA8B,GAClC,iGAAiG;IACjG,4GAA4G,CAAC;AAE/G,oGAAoG;AACpG,gEAAgE;AAChE,MAAM,CAAC,MAAM,oBAAoB,GAAG,aAAa,GAAG,oBAAoB,GAAG,8BAA8B,CAAC;AAC1G,MAAM,CAAC,MAAM,iBAAiB,GAAG,aAAa,GAAG,iBAAiB,GAAG,8BAA8B,CAAC"}
@@ -29,14 +29,14 @@
29
29
  import type { ResolvedFeatures } from '../adt/types.js';
30
30
  import type { ServerConfig } from '../server/types.js';
31
31
  /** All SAPRead object types available on on-premise (the superset). */
32
- export declare const SAPREAD_TYPES_ONPREM: ("API_STATE" | "AUTH" | "BDEF" | "BSP" | "BSP_DEPLOY" | "CLAS" | "COMPONENTS" | "COTA" | "CSNM" | "DCLS" | "DDLS" | "DDLX" | "DESD" | "DEVC" | "DOMA" | "DRTY" | "DSFD" | "DTDC" | "DTEL" | "DTSC" | "ENHO" | "EVTB" | "EVTO" | "FEATURE_TOGGLE" | "FTG2" | "FUGR" | "FUNC" | "INACTIVE_OBJECTS" | "INCL" | "INTF" | "KTD" | "MESSAGES" | "MSAG" | "PROG" | "SKTD" | "SOBJ" | "SRVB" | "SRVD" | "SYSTEM" | "TABL" | "TABLE_CONTENTS" | "TABLE_QUERY" | "TEXT_ELEMENTS" | "TRAN" | "TTYP" | "UIAD" | "VARIANTS" | "VERSIONS" | "VERSION_SOURCE" | "VIEW")[];
32
+ export declare const SAPREAD_TYPES_ONPREM: ("API_STATE" | "APLO" | "AUTH" | "BDEF" | "BSP" | "BSP_DEPLOY" | "CLAS" | "COMPONENTS" | "COTA" | "CSNM" | "DCLS" | "DDLS" | "DDLX" | "DESD" | "DEVC" | "DOMA" | "DRTY" | "DSFD" | "DTDC" | "DTEL" | "DTSC" | "ENHO" | "ENQU" | "EVTB" | "EVTO" | "FEATURE_TOGGLE" | "FTG2" | "FUGR" | "FUNC" | "INACTIVE_OBJECTS" | "INCL" | "INTF" | "KTD" | "MESSAGES" | "MSAG" | "PROG" | "SAJC" | "SAJT" | "SKTD" | "SOBJ" | "SRVB" | "SRVD" | "SYNTAX" | "SYSTEM" | "TABL" | "TABLE_CONTENTS" | "TABLE_QUERY" | "TEXT_ELEMENTS" | "TRAN" | "TTYP" | "UIAD" | "VARIANTS" | "VERSIONS" | "VERSION_SOURCE" | "VIEW")[];
33
33
  /** SAPRead types available on BTP ABAP Environment (the `btp: true` rows). */
34
- export declare const SAPREAD_TYPES_BTP: ("API_STATE" | "BDEF" | "BSP" | "BSP_DEPLOY" | "CLAS" | "COMPONENTS" | "COTA" | "CSNM" | "DCLS" | "DDLS" | "DDLX" | "DESD" | "DEVC" | "DOMA" | "DRTY" | "DSFD" | "DTDC" | "DTEL" | "DTSC" | "EVTB" | "EVTO" | "FUGR" | "FUNC" | "INACTIVE_OBJECTS" | "INTF" | "KTD" | "MESSAGES" | "MSAG" | "SKTD" | "SRVB" | "SRVD" | "SYSTEM" | "TABL" | "TABLE_CONTENTS" | "TABLE_QUERY" | "UIAD")[];
34
+ export declare const SAPREAD_TYPES_BTP: ("API_STATE" | "APLO" | "BDEF" | "BSP" | "BSP_DEPLOY" | "CLAS" | "COMPONENTS" | "COTA" | "CSNM" | "DCLS" | "DDLS" | "DDLX" | "DESD" | "DEVC" | "DOMA" | "DRTY" | "DSFD" | "DTDC" | "DTEL" | "DTSC" | "ENQU" | "EVTB" | "EVTO" | "FUGR" | "FUNC" | "INACTIVE_OBJECTS" | "INTF" | "KTD" | "MESSAGES" | "MSAG" | "SAJC" | "SAJT" | "SKTD" | "SRVB" | "SRVD" | "SYNTAX" | "SYSTEM" | "TABL" | "TABLE_CONTENTS" | "TABLE_QUERY" | "UIAD")[];
35
35
  export declare const ATC_BATCH_TYPES_BTP: ("BDEF" | "CLAS" | "DCLS" | "DDLS" | "DDLX" | "DOMA" | "DTEL" | "FUGR" | "INTF" | "PROG" | "SRVB" | "SRVD" | "TABL")[];
36
36
  /** All SAPWrite object types available on on-premise (the superset). */
37
- export declare const SAPWRITE_TYPES_ONPREM: ("BDEF" | "CLAS" | "COTA" | "CSNM" | "DCLS" | "DDLS" | "DDLX" | "DESD" | "DOMA" | "DRTY" | "DSFD" | "DTDC" | "DTEL" | "DTSC" | "EVTB" | "EVTO" | "FUGR" | "FUNC" | "INCL" | "INTF" | "KTD" | "MSAG" | "PROG" | "SKTD" | "SRVB" | "SRVD" | "TABL" | "TABL/DS" | "TABL/DT" | "TTYP" | "UIAD")[];
37
+ export declare const SAPWRITE_TYPES_ONPREM: ("APLO" | "BDEF" | "CLAS" | "COTA" | "CSNM" | "DCLS" | "DDLS" | "DDLX" | "DESD" | "DOMA" | "DRTY" | "DSFD" | "DTDC" | "DTEL" | "DTSC" | "ENQU" | "EVTB" | "EVTO" | "FUGR" | "FUNC" | "INCL" | "INTF" | "KTD" | "MSAG" | "PROG" | "SAJC" | "SAJT" | "SKTD" | "SRVB" | "SRVD" | "TABL" | "TABL/DS" | "TABL/DT" | "TTYP" | "UIAD")[];
38
38
  /** SAPWrite types available on BTP ABAP Environment (the `btp: true` rows). */
39
- export declare const SAPWRITE_TYPES_BTP: ("BDEF" | "CLAS" | "COTA" | "CSNM" | "DCLS" | "DDLS" | "DDLX" | "DESD" | "DOMA" | "DRTY" | "DSFD" | "DTDC" | "DTEL" | "DTSC" | "EVTB" | "EVTO" | "INTF" | "KTD" | "MSAG" | "SKTD" | "SRVB" | "SRVD" | "TABL" | "TABL/DS" | "TABL/DT" | "UIAD")[];
39
+ export declare const SAPWRITE_TYPES_BTP: ("APLO" | "BDEF" | "CLAS" | "COTA" | "CSNM" | "DCLS" | "DDLS" | "DDLX" | "DESD" | "DOMA" | "DRTY" | "DSFD" | "DTDC" | "DTEL" | "DTSC" | "ENQU" | "EVTB" | "EVTO" | "INTF" | "KTD" | "MSAG" | "SAJC" | "SAJT" | "SKTD" | "SRVB" | "SRVD" | "TABL" | "TABL/DS" | "TABL/DT" | "UIAD")[];
40
40
  /** SAPContext types on on-premise. */
41
41
  export declare const SAPCONTEXT_TYPES_ONPREM: ("CLAS" | "DDLS" | "FUNC" | "INTF" | "PROG" | "TABL")[];
42
42
  /** SAPContext types on BTP. */
@@ -1 +1 @@
1
- {"version":3,"file":"tool-registry.d.ts","sourceRoot":"","sources":["../../src/handlers/tool-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAIH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAkFvD,uEAAuE;AACvE,eAAO,MAAM,oBAAoB,4hBAAsB,CAAC;AACxD,8EAA8E;AAC9E,eAAO,MAAM,iBAAiB,yXAAmB,CAAC;AAIlD,eAAO,MAAM,mBAAmB,wHAE/B,CAAC;AAiCF,wEAAwE;AACxE,eAAO,MAAM,qBAAqB,+RAAuB,CAAC;AAC1D,+EAA+E;AAC/E,eAAO,MAAM,kBAAkB,kPAAoB,CAAC;AAapD,sC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gB,CAC9B,MAAM,EAAE,IAAI,CAAC,YAAY,EAAE,gBAAgB,GAAG,aAAa,CAAC,EAC5D,gBAAgB,EAAE,IAAI,CAAC,gBAAgB,EAAE,MAAM,GAAG,SAAS,CAAC,GAAG,SAAS,GACvE,OAAO,CAKT;AAID,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC;AAChE,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC;AAClE,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,CAAC,CAAC"}
@@ -73,6 +73,8 @@ const SAPREAD_TYPE_TABLE = [
73
73
  { type: 'DTEL', btp: true },
74
74
  { type: 'TRAN', btp: false },
75
75
  { type: 'TTYP', btp: false },
76
+ // DDIC lock objects: one XML metadata document, returned as JSON. Live-verified on-prem 8.16 + BTP trial.
77
+ { type: 'ENQU', btp: true },
76
78
  { type: 'TABLE_CONTENTS', btp: true },
77
79
  { type: 'TABLE_QUERY', btp: true },
78
80
  { type: 'DEVC', btp: true },
@@ -90,6 +92,7 @@ const SAPREAD_TYPE_TABLE = [
90
92
  { type: 'BSP_DEPLOY', btp: true },
91
93
  { type: 'API_STATE', btp: true },
92
94
  { type: 'INACTIVE_OBJECTS', btp: true },
95
+ { type: 'SYNTAX', btp: true },
93
96
  { type: 'AUTH', btp: false },
94
97
  // FTG2 is an ARC-1-private invented identifier (see docs/research/abap-types/types/ftg2.md).
95
98
  // FEATURE_TOGGLE is the new canonical name; FTG2 stays as deprecated alias for one minor.
@@ -137,6 +140,7 @@ const SAPWRITE_TYPE_TABLE = [
137
140
  { type: 'DTEL', btp: true },
138
141
  { type: 'MSAG', btp: true },
139
142
  { type: 'TTYP', btp: false },
143
+ { type: 'ENQU', btp: true },
140
144
  // Server-driven objects (8.16+) — write via the generic blue:blueSource + AFF JSON engine.
141
145
  // Rows derive from SDO_TYPES exactly like the SAPRead table above.
142
146
  ...SDO_TYPES.map((t) => ({ type: t, btp: true })),
@@ -1 +1 @@
1
- {"version":3,"file":"tool-registry.js","sourceRoot":"","sources":["../../src/handlers/tool-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAIpD;;;;;;;;;GASG;AACH,SAAS,gBAAgB,CACvB,KAAmB;IAEnB,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;IAC/B,KAAK,MAAM,GAAG,IAAI,KAAK,EAAE,CAAC;QACxB,IAAI,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC;YAAE,MAAM,IAAI,KAAK,CAAC,sCAAsC,GAAG,CAAC,IAAI,qBAAqB,CAAC,CAAC;QAC7G,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACrB,CAAC;IACD,OAAO;QACL,MAAM,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;QAChC,GAAG,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAkC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;KACnF,CAAC;AACJ,CAAC;AAED,uEAAuE;AAEvE,MAAM,kBAAkB,GAAG;IACzB,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE;IAC5B,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE;IAC3B,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE;IAC3B,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAA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MAAM,CAAC;AAC9D,+BAA+B;AAC/B,MAAM,CAAC,MAAM,oBAAoB,GAAG,eAAe,CAAC,GAAG,CAAC;AAExD,uEAAuE;AAEvE;;;;;;;;;;GAUG;AACH,MAAM,UAAU,gBAAgB,CAC9B,MAA4D,EAC5D,gBAAwE;IAExE,IAAI,gBAAgB,KAAK,SAAS,EAAE,CAAC;QACnC,OAAO,MAAM,CAAC,cAAc,KAAK,KAAK,IAAI,MAAM,CAAC,WAAW,KAAK,KAAK,CAAC;IACzE,CAAC;IACD,OAAO,CAAC,CAAC,CAAC,gBAAgB,CAAC,IAAI,EAAE,SAAS,IAAI,gBAAgB,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;AACrF,CAAC"}
@@ -1,19 +1,4 @@
1
- /**
2
- * Tool definitions for ARC-1's 12 intent-based MCP tools.
3
- *
4
- * Each tool has:
5
- * - name: The MCP tool name (SAPRead, SAPWrite, etc.)
6
- * - description: Rich LLM-friendly description
7
- * - inputSchema: JSON Schema for tool arguments
8
- *
9
- * Group operations by intent, with a `type` parameter for object routing.
10
- * This keeps the LLM's tool selection simple and the context window small.
11
- *
12
- * Tool definitions adapt based on system type (BTP vs on-premise):
13
- * - BTP ABAP Environment: removes unavailable types (PROG, INCL, VIEW,
14
- * TEXT_ELEMENTS, VARIANTS), adjusts descriptions for restricted features
15
- * - On-premise: full tool set with all types and descriptions
16
- */
1
+ /** Intent-based tool schemas; BTP omits classic object types and adjusts descriptions. */
17
2
  import type { ResolvedFeatures } from '../adt/types.js';
18
3
  import type { ServerConfig } from '../server/types.js';
19
4
  /** MCP tool behavior annotations (a subset of the spec; all optional, all advisory hints). */
@@ -1 +1 @@
1
- {"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/handlers/tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAUH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAExD,OAAO,KAAK,EAAE,YAAY,EAAE,M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AAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrC,WAAW,CAAC,EAAE,eAAe,CAAC;CAC/B;AAED,MAAM,WAAW,qBAAqB;IACpC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,YAAY,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;CAC9C;AA6UD,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,YAAY,EACpB,mBAAmB,CAAC,EAAE,OAAO,EAC7B,gBAAgB,CAAC,EAAE,gBAAgB,EACnC,OAAO,GAAE,qBAA0B,GAClC,cAAc,EAAE,CAw2ClB"}
@@ -1,19 +1,4 @@
1
- /**
2
- * Tool definitions for ARC-1's 12 intent-based MCP tools.
3
- *
4
- * Each tool has:
5
- * - name: The MCP tool name (SAPRead, SAPWrite, etc.)
6
- * - description: Rich LLM-friendly description
7
- * - inputSchema: JSON Schema for tool arguments
8
- *
9
- * Group operations by intent, with a `type` parameter for object routing.
10
- * This keeps the LLM's tool selection simple and the context window small.
11
- *
12
- * Tool definitions adapt based on system type (BTP vs on-premise):
13
- * - BTP ABAP Environment: removes unavailable types (PROG, INCL, VIEW,
14
- * TEXT_ELEMENTS, VARIANTS), adjusts descriptions for restricted features
15
- * - On-premise: full tool set with all types and descriptions
16
- */
1
+ /** Intent-based tool schemas; BTP omits classic object types and adjusts descriptions. */
17
2
  import { ATC_BATCH_MAX_OBJECTS, ATC_BATCH_NAME_MAX_LENGTH, ATC_BATCH_NAME_PATTERN, ATC_BATCH_TYPES, } from '../adt/atc-batch.js';
18
3
  import { KTD_SHORT_TEXT_MAX_LENGTH } from '../adt/ddic-xml.js';
19
4
  import { TEXT_ELEMENT_PARTS } from '../adt/text-elements.js';
@@ -28,16 +13,11 @@ import { SAPWRITE_DESC_BTP, SAPWRITE_DESC_ONPREM } from './tool-descriptions.js'
28
13
  import { ATC_BATCH_TYPES_BTP, isGitToolVisible, SAPCONTEXT_TYPES_BTP, SAPCONTEXT_TYPES_ONPREM, SAPREAD_TYPES_BTP, SAPREAD_TYPES_ONPREM, SAPWRITE_TYPES_BTP, SAPWRITE_TYPES_ONPREM, } from './tool-registry.js';
29
14
  import { BATCH_CREATE_MAX_OBJECTS } from './write/batch-results.js';
30
15
  /**
31
- * Read-only / destructive hints for the 12 standard tools. Clients use them to badge tools
32
- * and to decide auto-approval (read-only tools are safe to auto-run); they are also required
33
- * for the Claude Desktop Extensions Directory. Hyperfocused mode's universal tool is left
34
- * unannotated because it can both read and write.
16
+ * Read-only / destructive hints for standard tools, required by the Claude Desktop Extensions Directory.
17
+ * Hyperfocused mode stays unannotated because it can both read and write.
35
18
  *
36
- * These MUST agree with ACTION_POLICY (src/authz/policy.ts): a tool is read-only iff none of
37
- * its actions mutate (opType ∉ MUTATING_OPS), and destructive iff it has a delete action.
38
- * tool-annotations.test.ts derives the expected values from ACTION_POLICY and fails on drift —
39
- * e.g. SAPLint is NOT read-only because action=set_formatter_settings PUTs ADT settings, and
40
- * SAPWrite/SAPTransport/SAPGit are destructive because they can delete/unlink/overwrite objects.
19
+ * Keep hints consistent with ACTION_POLICY; tool-annotations.test.ts derives expected values.
20
+ * SAPLint mutates formatter settings; SAPWrite/SAPTransport/SAPGit can delete or unlink objects.
41
21
  */
42
22
  const TOOL_ANNOTATIONS = {
43
23
  // Read-only: every action is non-mutating.
@@ -61,16 +41,14 @@ const TOOL_ANNOTATIONS = {
61
41
  function isBtpMode(config) {
62
42
  return config.systemType === 'btp';
63
43
  }
64
- const SAPREAD_DESC_ONPREM = 'Read SAP ABAP source or metadata. For purpose, explanations, specs, reviews or pre-change context, prefer SAPContext first. DDIC metadata: omit format (default text); structured is CLAS-only for ordinary reads. ' +
44
+ const SAPREAD_DESC_ONPREM = 'Read SAP ABAP source, metadata or syntax-check results. For purpose, explanations, specs, reviews or pre-change context, prefer SAPContext first. DDIC metadata: omit format (default text); structured is CLAS-only for ordinary reads. ' +
65
45
  'Types: PROG, CLAS, INTF, FUNC, FUGR (expand_includes=true for all include sources), INCL, DDLS, DCLS, DDLX, BDEF, SRVD, SRVB, SKTD/KTD (KTD aliases SKTD), TABL (covers both transparent tables AND DDIC structures — no separate STRU type), TTYP, VIEW, DOMA, DTEL, TRAN, TABLE_CONTENTS (single-column filter), TABLE_QUERY (multi-column WHERE via the freestyle endpoint; gated by allowDataPreview; CDS views need SAP_BASIS 752+), DEVC, SOBJ (BOR — method param reads one method), SYSTEM, COMPONENTS, MSAG, TEXT_ELEMENTS, VARIANTS, BSP, BSP_DEPLOY, API_STATE (contract states C0-C4; objectType for non-class), INACTIVE_OBJECTS (no name; pending-activation list), AUTH, FEATURE_TOGGLE, ENHO, VERSIONS, VERSION_SOURCE. AUTH/FEATURE_TOGGLE/ENHO/VERSIONS/VERSION_SOURCE are on-prem only. ' +
66
- 'CLAS: method="*" for signatures, method="NAME" for one body, or grep. Global class declaration/implementation: MAIN (omit include). definitions/implementations contain local helpers. Details: docs_page SAPRead. ' +
67
- 'grep: case-insensitive regex; returns matching lines, context and line numbers, with owning class/method for CLAS. ' +
68
- 'Optional version parameter: source types default active; "inactive" requests the draft (SAP may return active if none); "auto" uses the developer view. DTEL omitted/auto uses its developer view; explicit values pass through. Active source reads note when a draft exists.';
69
- const SAPREAD_DESC_BTP = 'Read SAP ABAP source or metadata (BTP ABAP Environment). For purpose, explanations, specs, reviews or pre-change context, prefer SAPContext first. DDIC metadata: omit format (default text); structured is CLAS-only for ordinary reads. ' +
46
+ 'SYNTAX: read-only SAP check (objectType+name, optional source for unsaved text). CLAS: method="*" for signatures, method="NAME" for one body, or grep. Global class declaration/implementation: MAIN (omit include). definitions/implementations contain local helpers. ' +
47
+ 'grep: case-insensitive regex; returns matching lines, context and line numbers, with owning class/method for CLAS.';
48
+ const SAPREAD_DESC_BTP = 'Read SAP ABAP source, metadata or syntax-check results (BTP ABAP Environment). For purpose, explanations, specs, reviews or pre-change context, prefer SAPContext first. DDIC metadata: omit format (default text); structured is CLAS-only for ordinary reads. ' +
70
49
  'Types: CLAS, INTF, FUNC (released/custom only), FUGR (released/custom only), DDLS (primary data model on BTP), DCLS, DDLX, BDEF, SRVD, SRVB, SKTD/KTD (KTD aliases SKTD), TABL (custom tables AND structures — no separate STRU type), DOMA, DTEL, TABLE_CONTENTS (custom tables + released CDS only; standard tables blocked), TABLE_QUERY (multi-column WHERE on custom tables + released CDS; needs SAP_BASIS 752+), DEVC, SYSTEM, COMPONENTS, MSAG (custom only), BSP, BSP_DEPLOY, API_STATE (contract states C0-C4; objectType for non-class), INACTIVE_OBJECTS (no name; pending-activation list). PROG/INCL/VIEW/TRAN/TEXT_ELEMENTS/VARIANTS and VERSIONS/VERSION_SOURCE are not available on BTP (use CLAS with IF_OO_ADT_CLASSRUN for console apps, DDLS for data models). ' +
71
- 'CLAS: method="*" for signatures, method="NAME" for one body, or grep. Global class declaration/implementation: MAIN (omit include). definitions/implementations contain local helpers. Details: docs_page SAPRead. ' +
72
- 'grep: case-insensitive regex; returns matching lines, context and line numbers, with owning class/method for CLAS. ' +
73
- 'Optional version parameter: source types default active; "inactive" requests the draft (SAP may return active if none); "auto" uses the developer view. DTEL omitted/auto uses its developer view; explicit values pass through.';
50
+ 'SYNTAX: read-only SAP check (objectType+name, optional source for unsaved text). CLAS: method="*" for signatures, method="NAME" for one body, or grep. Global class declaration/implementation: MAIN (omit include). definitions/implementations contain local helpers. ' +
51
+ 'grep: case-insensitive regex; returns matching lines, context and line numbers, with owning class/method for CLAS.';
74
52
  // ─── SAPContext Types ───────────────────────────────────────────────
75
53
  const SAPCONTEXT_DESC_ONPREM = 'Primary tool for understanding ABAP/CDS objects before specs, reviews, explanations, or changes — use instead of SAPRead when the user asks what an object does. Returns intent first (the object KTD when available) then compressed dependency contracts. Use SAPRead after SAPContext for exact source/method bodies/grep/drafts.\n\n' +
76
54
  "Decision rule — pick the action from the user's question:\n" +
@@ -328,9 +306,8 @@ export function getToolDefinitions(config, textSearchAvailable, resolvedFeatures
328
306
  type: {
329
307
  type: 'string',
330
308
  enum: btp ? SAPREAD_TYPES_BTP : SAPREAD_TYPES_ONPREM,
331
- description: btp
332
- ? 'Object type to read (BTP): CLAS, INTF, FUNC, FUGR, DDLS, DCLS, DDLX, BDEF, SRVD, SRVB, SKTD or KTD (Knowledge Transfer Documents), TABL (transparent tables and DDIC structures), DOMA, DTEL, MSAG, TABLE_CONTENTS, TABLE_QUERY, DEVC, SYSTEM, COMPONENTS, BSP, BSP_DEPLOY, API_STATE, INACTIVE_OBJECTS. Server-driven objects (discovery-gated; XML metadata; source is AFF JSON, or DDL text for DTSC/DSFD/DTDC/DRTY): DESD (Logical External Schema), EVTB (RAP Event Binding), EVTO (RAP Event Object), DTSC (Static Cache), CSNM (CSN Model), COTA (Communication Target), DSFD (Scalar Function Def), DTDC (Dynamic Cache), UIAD (Launchpad App Descriptor Item), DRTY (CDS Type). Deprecated alias: MESSAGES (use MSAG).'
333
- : 'Object type to read (on-prem): PROG, CLAS, INTF, FUNC, FUGR, INCL, DDLS, DCLS, DDLX, BDEF, SRVD, SRVB, SKTD or KTD (Knowledge Transfer Documents), TABL (transparent tables and DDIC structures), TTYP, VIEW, DOMA, DTEL, MSAG, TRAN, TABLE_CONTENTS, TABLE_QUERY, DEVC, SOBJ, SYSTEM, COMPONENTS, TEXT_ELEMENTS, VARIANTS, BSP, BSP_DEPLOY, API_STATE, INACTIVE_OBJECTS, AUTH, FEATURE_TOGGLE, ENHO, VERSIONS, VERSION_SOURCE. Server-driven objects (discovery-gated; XML metadata; source is AFF JSON, or DDL text for DTSC/DSFD/DTDC/DRTY): DESD (Logical External Schema), EVTB (RAP Event Binding), EVTO (RAP Event Object), DTSC (Static Cache), CSNM (CSN Model), COTA (Communication Target), DSFD (Scalar Function Def), DTDC (Dynamic Cache), UIAD (Launchpad App Descriptor Item), DRTY (CDS Type). Deprecated aliases: MESSAGES (use MSAG), FTG2 (use FEATURE_TOGGLE).',
309
+ description: 'Object or metadata type. TABL includes DDIC structures; KTD aliases SKTD (Knowledge Transfer Documents). SYNTAX checks objectType+name. Server-driven objects use discovery-gated XML metadata and AFF JSON source (DTSC/DSFD/DTDC/DRTY use DDL text). DESD logical external schema; EVTB event binding; EVTO event object; CSNM CSN model; COTA communication target; DTSC static cache; DTDC dynamic cache; DSFD scalar function; UIAD launchpad descriptor; DRTY CDS type; APLO log object; SAJC/SAJT job catalog/template. Deprecated: MESSAGES→MSAG.' +
310
+ (btp ? ' ENQU lock object as JSON.' : ' FTG2→FEATURE_TOGGLE. ENQU lock object as JSON.'),
334
311
  },
335
312
  name: { type: 'string', description: 'Object name (e.g., ZTEST_PROGRAM, ZCL_ORDER, MARA)' },
336
313
  action: {
@@ -391,13 +368,13 @@ export function getToolDefinitions(config, textSearchAvailable, resolvedFeatures
391
368
  }),
392
369
  format: {
393
370
  type: 'string',
394
- enum: ['text', 'structured'],
395
- description: 'Default "text" (TABL/TTYP/DTEL/DOMA/INTF metadata included). DEVC: array in first text block + listing metadata in second; "structured" returns {objects, listing}. CLAS "structured": metadata + all includes; prefer method/grep for targeted reads. action="diff": "structured" returns JSON {hasDifferences, identical, added, removed, diff, version labels}; default is a patch.',
371
+ enum: ['text', 'structured', 'editable'],
372
+ description: 'Default text. editable: fresh {source, sourceHash} for guarded SAPWrite; omit version/method/grep, select CLAS include. structured: CLAS metadata+includes, DEVC {objects,listing}, or action=diff JSON. DEVC text returns the array then listing metadata; diff text returns a patch.',
396
373
  },
397
374
  version: {
398
375
  type: 'string',
399
376
  enum: ['active', 'inactive', 'auto'],
400
- description: 'Version to read. Source: "active" (default); "inactive" requests the draft (SAP may return active if none); "auto" uses the developer view. DTEL: omitted/"auto" uses its developer view; explicit values pass through.',
377
+ description: 'Source defaults active; inactive requests a draft (SAP may return active if none); auto selects developer view. DTEL/ENQU/server-driven types default to developer view. Server-driven types return an error if SAP cannot confirm an explicit version (e.g. no draft).',
401
378
  },
402
379
  includeSignature: {
403
380
  type: 'boolean',
@@ -421,9 +398,13 @@ export function getToolDefinitions(config, textSearchAvailable, resolvedFeatures
421
398
  },
422
399
  objectType: {
423
400
  type: 'string',
424
- description: 'For API_STATE and VERSIONS: SAP object type (CLAS, INTF, PROG, FUNC, INCL, DDLS, DCLS, BDEF, SRVD, etc.). For API_STATE: auto-detected from name if omitted. For VERSIONS: required to pick the correct revisions endpoint (e.g., "FUNC" + group for function modules); inferred from CL_/IF_/CX_ name prefixes when possible, defaults to PROG.' +
401
+ description: 'SYNTAX: required repository type (e.g. CLAS, PROG, DDLS). API_STATE: inferred if omitted. VERSIONS: type selects the endpoint (FUNC needs group); inferred from CL_/IF_/CX_, else PROG.' +
425
402
  (btp ? '' : ' TEXT_ELEMENTS: PROG (default), CLAS or FUGR.'),
426
403
  },
404
+ source: {
405
+ type: 'string',
406
+ description: 'SYNTAX only: proposed source to check without saving. Omit to check stored version (default active; inactive checks draft). Object must exist; version=auto is unsupported.',
407
+ },
427
408
  versionUri: {
428
409
  type: 'string',
429
410
  description: 'VERSION_SOURCE: canonical source/revision URI from VERSIONS .revisions[].uri; rejects unrelated ADT endpoints, absolute URLs, traversal, queries, and fragments.',
@@ -478,7 +459,7 @@ export function getToolDefinitions(config, textSearchAvailable, resolvedFeatures
478
459
  'update',
479
460
  'delete',
480
461
  'edit_method',
481
- ...(btp ? [] : ['edit_unit']),
462
+ ...(btp ? [] : ['edit_unit', 'add_unit']),
482
463
  'edit_class_definition',
483
464
  'add_method',
484
465
  'edit_method_signature',
@@ -495,7 +476,7 @@ export function getToolDefinitions(config, textSearchAvailable, resolvedFeatures
495
476
  // especially the destructive and refusing ones, whose behaviour is not guessable.
496
477
  description: 'Write action. create/update/delete: whole-object writes (update replaces /source/main, or one class-local include when include= is set). ' +
497
478
  'edit_method: replace a single method body — the token-cheap path for class edits. ' +
498
- (btp ? '' : 'edit_unit: replace one FORM or MODULE block inside a PROG/INCL. ') +
479
+ (btp ? '' : 'edit_unit replaces a FORM/MODULE in PROG/INCL; add_unit appends one at EOF. ') +
499
480
  'batch_create: create and activate many objects in one call; order is preserved, so list dependencies first. ' +
500
481
  'Class surgery (CLAS, all on /source/main unless noted): edit_class_definition replaces the global DEFINITION block — or a class-local include when include= is set — and refuses a diff that would leave the class non-activatable; ' +
501
482
  'add_method inserts a METHODS clause plus an empty IMPL stub (abstract=true skips the stub); ' +
@@ -511,20 +492,24 @@ export function getToolDefinitions(config, textSearchAvailable, resolvedFeatures
511
492
  type: 'string',
512
493
  enum: btp ? SAPWRITE_TYPES_BTP : SAPWRITE_TYPES_ONPREM,
513
494
  description: btp
514
- ? 'Object type (for create/update/delete/edit_method/edit_class_definition/add_method/edit_method_signature/delete_method/change_method_visibility). Supported on BTP: CLAS, INTF, DDLS, DCLS, DDLX, BDEF, SRVD, SRVB, SKTD or KTD (Knowledge Transfer Documents), TABL, TABL/DT, TABL/DS, DOMA, DTEL, MSAG. Class-section surgery actions require type=CLAS. Server-driven objects (discovery-gated): DESD/CSNM/EVTB/EVTO/COTA take AFF JSON in "source"; DTSC/DSFD/DTDC/DRTY take DDL text — create/update/delete, then SAPActivate. UIAD: checks AFF JSON; create honors header.abapLanguageVersion. Manual cloudDevelopment items are editable; generated items may be read-only.'
515
- : 'Object type (for create/update/delete/edit_method/edit_unit/edit_class_definition/add_method/edit_method_signature/delete_method/change_method_visibility). Supported on-prem: PROG, CLAS, INTF, FUNC, FUGR, INCL, DDLS, DCLS, DDLX, BDEF, SRVD, SRVB, SKTD or KTD (Knowledge Transfer Documents), TABL, TABL/DT, TABL/DS, DOMA, DTEL, MSAG. Class-section surgery actions require CLAS. Server-driven objects (discovery-gated): DESD/CSNM/EVTB/EVTO/COTA take AFF JSON in "source"; DTSC/DSFD/DTDC/DRTY take DDL text — create/update/delete, then SAPActivate. UIAD: validates AFF JSON and saves active; create honors header.abapLanguageVersion. Manual cloudDevelopment items are editable; generated items can be read-only.',
495
+ ? 'Object type (for create/update/delete/edit_method/edit_class_definition/add_method/edit_method_signature/delete_method/change_method_visibility). Supported on BTP: CLAS, INTF, DDLS, DCLS, DDLX, BDEF, SRVD, SRVB, SKTD or KTD (Knowledge Transfer Documents), TABL, TABL/DT, TABL/DS, DOMA, DTEL, MSAG. Class-section surgery actions require type=CLAS. UIAD: checks AFF JSON; create honors header.abapLanguageVersion. Manual cloudDevelopment items are editable; generated items may be read-only.'
496
+ : 'Object type (for create/update/delete/edit_method/edit_unit/add_unit/edit_class_definition/add_method/edit_method_signature/delete_method/change_method_visibility). Supported on-prem: PROG, CLAS, INTF, FUNC, FUGR, INCL, DDLS, DCLS, DDLX, BDEF, SRVD, SRVB, SKTD or KTD (Knowledge Transfer Documents), TABL, TABL/DT, TABL/DS, DOMA, DTEL, MSAG. Class-section surgery actions require CLAS. UIAD: validates AFF JSON and saves active; create honors header.abapLanguageVersion. Manual cloudDevelopment items are editable; generated items can be read-only.',
516
497
  },
517
498
  name: {
518
499
  type: 'string',
519
500
  description: btp
520
501
  ? 'Object name (for create/update/delete/edit_method/edit_class_definition/add_method/edit_method_signature/delete_method/change_method_visibility).'
521
- : 'Object name (for create/update/delete/edit_method/edit_unit/edit_class_definition/add_method/edit_method_signature/delete_method/change_method_visibility).',
502
+ : 'Object name (for create/update/delete/edit_method/edit_unit/add_unit/edit_class_definition/add_method/edit_method_signature/delete_method/change_method_visibility).',
503
+ },
504
+ expectedSourceHash: {
505
+ type: 'string',
506
+ description: 'SHA-256 from SAPRead(format=editable). Refuses changed source under the lock. Text-source update and class/procedural surgery only; whole addressed source/include, not just the edited unit. Omitted/blank: no cross-call protection.',
522
507
  },
523
508
  source: {
524
509
  type: 'string',
525
510
  description: btp
526
511
  ? 'ABAP source. create/update: full body. DDLS: type=DDLS; Cloud permits eligible `extend view entity`, not legacy `extend view`. edit_method: body. edit_class_definition without include=: only global CLASS…DEFINITION…ENDCLASS block (no IMPLEMENTATION); with include=: full replacement include. edit_method_signature: only new METHODS clause. Not used by add_method/delete_method/change_method_visibility (use `method`/`visibility`). SKTD/KTD: one "## <node>" section per node (any name or id the SAPRead node index lists); update MERGES, so unaddressed nodes keep their text; an unmatched node-shaped heading aborts it.'
527
- : 'Source. create/update: full body. DDLS: type=DDLS for `extend view`/`extend view entity`; legacy needs a Standard ABAP package. edit_method: body. edit_unit: complete FORM/MODULE. edit_class_definition without include=: only global CLASS…DEFINITION…ENDCLASS block (no IMPLEMENTATION); with include=: full replacement include. edit_method_signature: only METHODS clause. Not used by add_method/delete_method/change_method_visibility (use `method`/`visibility`). SKTD/KTD: one "## <node>" section per node (any name or id the SAPRead node index lists); update MERGES, so unaddressed nodes keep their text; an unmatched node-shaped heading aborts it.',
512
+ : 'Source. create/update: full body. DDLS: type=DDLS for `extend view`/`extend view entity`; legacy needs a Standard ABAP package. edit_method: body. edit_unit/add_unit: complete FORM/MODULE. edit_class_definition without include=: only global CLASS…DEFINITION…ENDCLASS block (no IMPLEMENTATION); with include=: full replacement include. edit_method_signature: only METHODS clause. Not used by add_method/delete_method/change_method_visibility (use `method`/`visibility`). SKTD/KTD: one "## <node>" section per node (any name or id the SAPRead node index lists); update MERGES, so unaddressed nodes keep their text; an unmatched node-shaped heading aborts it.',
528
513
  },
529
514
  include: {
530
515
  type: 'string',
@@ -549,7 +534,7 @@ export function getToolDefinitions(config, textSearchAvailable, resolvedFeatures
549
534
  : {
550
535
  unit: {
551
536
  type: 'string',
552
- description: 'edit_unit FORM/MODULE name in a PROG or INCL (case-insensitive).',
537
+ description: 'edit_unit/add_unit: existing/new FORM or MODULE name (case-insensitive).',
553
538
  },
554
539
  }),
555
540
  visibility: {
@@ -599,7 +584,7 @@ export function getToolDefinitions(config, textSearchAvailable, resolvedFeatures
599
584
  },
600
585
  group: {
601
586
  type: 'string',
602
- description: 'For FUNC: parent function-group name. Required for FUNC create (the FUGR must already exist — create it first via SAPWrite type=FUGR). Auto-resolved via search for FUNC update/delete if omitted.',
587
+ description: 'FUNC: existing FUGR; required for create, otherwise resolved. INCL: group for L<group>…; omit for standalone.',
603
588
  },
604
589
  ...(btp ? {} : FuncProcessing.FUNCTION_PROCESSING_TOOL_PROPERTIES),
605
590
  dataType: { type: 'string', description: 'DOMA/DTEL: ABAP data type (e.g., CHAR, NUMC, DEC)' },
@@ -937,7 +922,7 @@ export function getToolDefinitions(config, textSearchAvailable, resolvedFeatures
937
922
  '- "list_rules": list rules + current config (no source).\n' +
938
923
  '- "format": pretty-print via SAP\'s ADT formatter (needs source).\n' +
939
924
  '- "get_formatter_settings" / "set_formatter_settings": read/update the system\'s global PrettyPrinter (indentation bool, style keywordUpper|keywordLower|keywordAuto|none; set is blocked read-only).\n' +
940
- 'lint/lint_and_fix/list_rules run locally; format/*_formatter_settings call SAP. For ATC/syntax/unit tests use SAPDiagnose.',
925
+ 'lint/lint_and_fix/list_rules run locally; format/*_formatter_settings call SAP. Syntax: SAPRead(type="SYNTAX"); ATC/unit tests: SAPDiagnose.',
941
926
  inputSchema: {
942
927
  type: 'object',
943
928
  properties: {
@@ -970,13 +955,13 @@ export function getToolDefinitions(config, textSearchAvailable, resolvedFeatures
970
955
  }, {
971
956
  name: 'SAPDiagnose',
972
957
  description: 'ABAP diagnostics and runtime analysis. Actions:\n' +
973
- '- "syntax": syntax-check (name+type; optional version; optional source = pre-write dry-run, nothing written).\n' +
958
+ '- "syntax": compatibility check; when available prefer SAPRead(type="SYNTAX", objectType, name, version?, source?).\n' +
974
959
  '- "unittest": harmless ABAP Unit for CLAS/PROG/FUGR or DEVC (exact; includeSubpackages recurses).\n' +
975
960
  '- "unittest_ci": harmless package tests with source reconciliation; empty/incomplete runs fail.\n' +
976
961
  '- "atc": run ATC checks (name+type or objects [{type,name}], max 20; omit variant to bind the system default; unknown variant = error). "atc_variants": list variants + that default (variant = name filter; read-only).\n' +
977
962
  '- "atc_ci": package ATC CI; requires available API and verified selection.\n' +
978
963
  '- "cds_testcases": SAP-suggested ABAP Unit test cases for a CDS entity (name; read-only; SAP_BASIS 8.16+).\n' +
979
- '- "object_state": compare active vs inactive source versions (name+type; CLAS compares all includes). Returns ETags/hashes/divergence flags.\n' +
964
+ '- "object_state": active/inactive ETags, hashes and divergence (name+type; CLAS: all includes). Server-driven types unsupported.\n' +
980
965
  '- "quickfix": proposals at name+type+source+line (optional column/sourceUri).\n' +
981
966
  '- "apply_quickfix": return proposal text deltas without writing; needs quickfix inputs + proposalUri/proposalUserContent.\n' +
982
967
  '- "dumps": list/read ST22 short dumps (no id = list, newest first, user/from/to/maxResults; id = read; includeFullText, sections).\n' +
@@ -1448,6 +1433,10 @@ export function getToolDefinitions(config, textSearchAvailable, resolvedFeatures
1448
1433
  enum: ['create', 'modify'],
1449
1434
  description: 'Check mode: create (default) or modify.',
1450
1435
  },
1436
+ group: {
1437
+ type: 'string',
1438
+ description: 'check/history: parent group for INCL L<group>… or a new FUNC; existing FUNC auto-resolves.',
1439
+ },
1451
1440
  pgmid: {
1452
1441
  type: 'string',
1453
1442
  description: 'Program ID for remove_object: "R3TR" (whole object) or "LIMU" (sub-object). Required — object type alone does not determine pgmid.',