arc-1 1.1.2 → 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.
Files changed (357) hide show
  1. package/README.md +16 -6
  2. package/bin/start-cf.sh +32 -0
  3. package/dist/adt/atc-batch.d.ts +71 -0
  4. package/dist/adt/atc-batch.d.ts.map +1 -0
  5. package/dist/adt/atc-batch.js +182 -0
  6. package/dist/adt/atc-batch.js.map +1 -0
  7. package/dist/adt/atc.d.ts +34 -0
  8. package/dist/adt/atc.d.ts.map +1 -1
  9. package/dist/adt/atc.js +58 -12
  10. package/dist/adt/atc.js.map +1 -1
  11. package/dist/adt/aunit.d.ts.map +1 -1
  12. package/dist/adt/aunit.js +50 -7
  13. package/dist/adt/aunit.js.map +1 -1
  14. package/dist/adt/bounded-response.d.ts +12 -0
  15. package/dist/adt/bounded-response.d.ts.map +1 -0
  16. package/dist/adt/bounded-response.js +242 -0
  17. package/dist/adt/bounded-response.js.map +1 -0
  18. package/dist/adt/ci-quality-xml.d.ts +44 -0
  19. package/dist/adt/ci-quality-xml.d.ts.map +1 -0
  20. package/dist/adt/ci-quality-xml.js +98 -0
  21. package/dist/adt/ci-quality-xml.js.map +1 -0
  22. package/dist/adt/ci-quality.d.ts +64 -0
  23. package/dist/adt/ci-quality.d.ts.map +1 -0
  24. package/dist/adt/ci-quality.js +132 -0
  25. package/dist/adt/ci-quality.js.map +1 -0
  26. package/dist/adt/client.d.ts +55 -34
  27. package/dist/adt/client.d.ts.map +1 -1
  28. package/dist/adt/client.js +130 -169
  29. package/dist/adt/client.js.map +1 -1
  30. package/dist/adt/config.d.ts +6 -0
  31. package/dist/adt/config.d.ts.map +1 -1
  32. package/dist/adt/config.js +3 -0
  33. package/dist/adt/config.js.map +1 -1
  34. package/dist/adt/data-result-context.d.ts +46 -0
  35. package/dist/adt/data-result-context.d.ts.map +1 -0
  36. package/dist/adt/data-result-context.js +118 -0
  37. package/dist/adt/data-result-context.js.map +1 -0
  38. package/dist/adt/data-source-name.d.ts +60 -0
  39. package/dist/adt/data-source-name.d.ts.map +1 -0
  40. package/dist/adt/data-source-name.js +156 -0
  41. package/dist/adt/data-source-name.js.map +1 -0
  42. package/dist/adt/data-source-policy.d.ts +139 -0
  43. package/dist/adt/data-source-policy.d.ts.map +1 -0
  44. package/dist/adt/data-source-policy.js +759 -0
  45. package/dist/adt/data-source-policy.js.map +1 -0
  46. package/dist/adt/ddic-xml.d.ts +78 -4
  47. package/dist/adt/ddic-xml.d.ts.map +1 -1
  48. package/dist/adt/ddic-xml.js +647 -54
  49. package/dist/adt/ddic-xml.js.map +1 -1
  50. package/dist/adt/devtools.d.ts +1 -0
  51. package/dist/adt/devtools.d.ts.map +1 -1
  52. package/dist/adt/devtools.js +24 -4
  53. package/dist/adt/devtools.js.map +1 -1
  54. package/dist/adt/errors.d.ts +10 -0
  55. package/dist/adt/errors.d.ts.map +1 -1
  56. package/dist/adt/errors.js +17 -0
  57. package/dist/adt/errors.js.map +1 -1
  58. package/dist/adt/http-deadline.d.ts +10 -0
  59. package/dist/adt/http-deadline.d.ts.map +1 -1
  60. package/dist/adt/http-deadline.js +7 -0
  61. package/dist/adt/http-deadline.js.map +1 -1
  62. package/dist/adt/http.d.ts +6 -3
  63. package/dist/adt/http.d.ts.map +1 -1
  64. package/dist/adt/http.js +94 -55
  65. package/dist/adt/http.js.map +1 -1
  66. package/dist/adt/internal-data-operations.d.ts +56 -0
  67. package/dist/adt/internal-data-operations.d.ts.map +1 -0
  68. package/dist/adt/internal-data-operations.js +99 -0
  69. package/dist/adt/internal-data-operations.js.map +1 -0
  70. package/dist/adt/package-contents.d.ts +12 -0
  71. package/dist/adt/package-contents.d.ts.map +1 -0
  72. package/dist/adt/package-contents.js +19 -0
  73. package/dist/adt/package-contents.js.map +1 -0
  74. package/dist/adt/relation-objects.d.ts +385 -0
  75. package/dist/adt/relation-objects.d.ts.map +1 -0
  76. package/dist/adt/relation-objects.js +262 -0
  77. package/dist/adt/relation-objects.js.map +1 -0
  78. package/dist/adt/repository-relations.d.ts +41 -0
  79. package/dist/adt/repository-relations.d.ts.map +1 -0
  80. package/dist/adt/repository-relations.js +246 -0
  81. package/dist/adt/repository-relations.js.map +1 -0
  82. package/dist/adt/request-attempt-budget.d.ts +26 -0
  83. package/dist/adt/request-attempt-budget.d.ts.map +1 -0
  84. package/dist/adt/request-attempt-budget.js +63 -0
  85. package/dist/adt/request-attempt-budget.js.map +1 -0
  86. package/dist/adt/result-limits.d.ts +3 -0
  87. package/dist/adt/result-limits.d.ts.map +1 -0
  88. package/dist/adt/result-limits.js +7 -0
  89. package/dist/adt/result-limits.js.map +1 -0
  90. package/dist/adt/safety.d.ts +2 -0
  91. package/dist/adt/safety.d.ts.map +1 -1
  92. package/dist/adt/safety.js +6 -0
  93. package/dist/adt/safety.js.map +1 -1
  94. package/dist/adt/server-driven.d.ts +6 -1
  95. package/dist/adt/server-driven.d.ts.map +1 -1
  96. package/dist/adt/server-driven.js +24 -20
  97. package/dist/adt/server-driven.js.map +1 -1
  98. package/dist/adt/sql-source-analyzer.d.ts +12 -0
  99. package/dist/adt/sql-source-analyzer.d.ts.map +1 -0
  100. package/dist/adt/sql-source-analyzer.js +158 -0
  101. package/dist/adt/sql-source-analyzer.js.map +1 -0
  102. package/dist/adt/table-query.d.ts +43 -0
  103. package/dist/adt/table-query.d.ts.map +1 -0
  104. package/dist/adt/table-query.js +160 -0
  105. package/dist/adt/table-query.js.map +1 -0
  106. package/dist/adt/text-elements.d.ts +48 -0
  107. package/dist/adt/text-elements.d.ts.map +1 -0
  108. package/dist/adt/text-elements.js +116 -0
  109. package/dist/adt/text-elements.js.map +1 -0
  110. package/dist/adt/types.d.ts +16 -0
  111. package/dist/adt/types.d.ts.map +1 -1
  112. package/dist/adt/uiad.d.ts +19 -0
  113. package/dist/adt/uiad.d.ts.map +1 -0
  114. package/dist/adt/uiad.js +173 -0
  115. package/dist/adt/uiad.js.map +1 -0
  116. package/dist/adt/xml-parser.d.ts +12 -15
  117. package/dist/adt/xml-parser.d.ts.map +1 -1
  118. package/dist/adt/xml-parser.js +44 -12
  119. package/dist/adt/xml-parser.js.map +1 -1
  120. package/dist/authz/policy.d.ts.map +1 -1
  121. package/dist/authz/policy.js +4 -1
  122. package/dist/authz/policy.js.map +1 -1
  123. package/dist/cache/cache.d.ts +3 -23
  124. package/dist/cache/cache.d.ts.map +1 -1
  125. package/dist/cache/cache.js +2 -3
  126. package/dist/cache/cache.js.map +1 -1
  127. package/dist/cache/caching-layer.d.ts +6 -25
  128. package/dist/cache/caching-layer.d.ts.map +1 -1
  129. package/dist/cache/caching-layer.js +3 -45
  130. package/dist/cache/caching-layer.js.map +1 -1
  131. package/dist/cache/memory.d.ts +1 -4
  132. package/dist/cache/memory.d.ts.map +1 -1
  133. package/dist/cache/memory.js +1 -10
  134. package/dist/cache/memory.js.map +1 -1
  135. package/dist/cache/sqlite.d.ts +1 -3
  136. package/dist/cache/sqlite.d.ts.map +1 -1
  137. package/dist/cache/sqlite.js +2 -17
  138. package/dist/cache/sqlite.js.map +1 -1
  139. package/dist/cli-checks.d.ts +3 -0
  140. package/dist/cli-checks.d.ts.map +1 -1
  141. package/dist/cli-checks.js +16 -0
  142. package/dist/cli-checks.js.map +1 -1
  143. package/dist/cli.d.ts.map +1 -1
  144. package/dist/cli.js +7 -2
  145. package/dist/cli.js.map +1 -1
  146. package/dist/context/compressor.d.ts +2 -3
  147. package/dist/context/compressor.d.ts.map +1 -1
  148. package/dist/context/compressor.js +30 -49
  149. package/dist/context/compressor.js.map +1 -1
  150. package/dist/context/contract.d.ts +5 -0
  151. package/dist/context/contract.d.ts.map +1 -1
  152. package/dist/context/contract.js +2 -2
  153. package/dist/context/contract.js.map +1 -1
  154. package/dist/context/deps.d.ts +11 -0
  155. package/dist/context/deps.d.ts.map +1 -1
  156. package/dist/context/deps.js +2 -2
  157. package/dist/context/deps.js.map +1 -1
  158. package/dist/context/parse-cache.d.ts +23 -0
  159. package/dist/context/parse-cache.d.ts.map +1 -0
  160. package/dist/context/parse-cache.js +71 -0
  161. package/dist/context/parse-cache.js.map +1 -0
  162. package/dist/context/relation-walk.d.ts +48 -0
  163. package/dist/context/relation-walk.d.ts.map +1 -0
  164. package/dist/context/relation-walk.js +137 -0
  165. package/dist/context/relation-walk.js.map +1 -0
  166. package/dist/context/types.d.ts +4 -4
  167. package/dist/context/types.d.ts.map +1 -1
  168. package/dist/handlers/activate.d.ts +1 -1
  169. package/dist/handlers/activate.d.ts.map +1 -1
  170. package/dist/handlers/activate.js +33 -56
  171. package/dist/handlers/activate.js.map +1 -1
  172. package/dist/handlers/activation-results.d.ts +3 -0
  173. package/dist/handlers/activation-results.d.ts.map +1 -0
  174. package/dist/handlers/activation-results.js +8 -0
  175. package/dist/handlers/activation-results.js.map +1 -0
  176. package/dist/handlers/context.d.ts.map +1 -1
  177. package/dist/handlers/context.js +8 -32
  178. package/dist/handlers/context.js.map +1 -1
  179. package/dist/handlers/data-element-fields.d.ts +26 -0
  180. package/dist/handlers/data-element-fields.d.ts.map +1 -0
  181. package/dist/handlers/data-element-fields.js +27 -0
  182. package/dist/handlers/data-element-fields.js.map +1 -0
  183. package/dist/handlers/diagnose-ci.d.ts +9 -0
  184. package/dist/handlers/diagnose-ci.d.ts.map +1 -0
  185. package/dist/handlers/diagnose-ci.js +120 -0
  186. package/dist/handlers/diagnose-ci.js.map +1 -0
  187. package/dist/handlers/diagnose-fields.d.ts +51 -0
  188. package/dist/handlers/diagnose-fields.d.ts.map +1 -0
  189. package/dist/handlers/diagnose-fields.js +48 -0
  190. package/dist/handlers/diagnose-fields.js.map +1 -0
  191. package/dist/handlers/diagnose.d.ts +4 -1
  192. package/dist/handlers/diagnose.d.ts.map +1 -1
  193. package/dist/handlers/diagnose.js +41 -6
  194. package/dist/handlers/diagnose.js.map +1 -1
  195. package/dist/handlers/dispatch.d.ts +3 -1
  196. package/dist/handlers/dispatch.d.ts.map +1 -1
  197. package/dist/handlers/dispatch.js +96 -11
  198. package/dist/handlers/dispatch.js.map +1 -1
  199. package/dist/handlers/feature-cache.d.ts +4 -3
  200. package/dist/handlers/feature-cache.d.ts.map +1 -1
  201. package/dist/handlers/feature-cache.js +4 -3
  202. package/dist/handlers/feature-cache.js.map +1 -1
  203. package/dist/handlers/hyperfocused.js +1 -1
  204. package/dist/handlers/live-relations.d.ts +5 -0
  205. package/dist/handlers/live-relations.d.ts.map +1 -0
  206. package/dist/handlers/live-relations.js +89 -0
  207. package/dist/handlers/live-relations.js.map +1 -0
  208. package/dist/handlers/manage.d.ts.map +1 -1
  209. package/dist/handlers/manage.js +7 -4
  210. package/dist/handlers/manage.js.map +1 -1
  211. package/dist/handlers/navigate.d.ts +1 -1
  212. package/dist/handlers/navigate.d.ts.map +1 -1
  213. package/dist/handlers/navigate.js +33 -7
  214. package/dist/handlers/navigate.js.map +1 -1
  215. package/dist/handlers/object-types.d.ts +6 -4
  216. package/dist/handlers/object-types.d.ts.map +1 -1
  217. package/dist/handlers/object-types.js +45 -10
  218. package/dist/handlers/object-types.js.map +1 -1
  219. package/dist/handlers/query-errors.d.ts +9 -1
  220. package/dist/handlers/query-errors.d.ts.map +1 -1
  221. package/dist/handlers/query-errors.js +40 -28
  222. package/dist/handlers/query-errors.js.map +1 -1
  223. package/dist/handlers/query.d.ts +2 -2
  224. package/dist/handlers/query.d.ts.map +1 -1
  225. package/dist/handlers/query.js +15 -22
  226. package/dist/handlers/query.js.map +1 -1
  227. package/dist/handlers/read.d.ts +1 -1
  228. package/dist/handlers/read.d.ts.map +1 -1
  229. package/dist/handlers/read.js +112 -23
  230. package/dist/handlers/read.js.map +1 -1
  231. package/dist/handlers/relation-input.d.ts +42 -0
  232. package/dist/handlers/relation-input.d.ts.map +1 -0
  233. package/dist/handlers/relation-input.js +22 -0
  234. package/dist/handlers/relation-input.js.map +1 -0
  235. package/dist/handlers/relation-tool.d.ts +5 -0
  236. package/dist/handlers/relation-tool.d.ts.map +1 -0
  237. package/dist/handlers/relation-tool.js +36 -0
  238. package/dist/handlers/relation-tool.js.map +1 -0
  239. package/dist/handlers/schemas.d.ts +119 -62
  240. package/dist/handlers/schemas.d.ts.map +1 -1
  241. package/dist/handlers/schemas.js +150 -13
  242. package/dist/handlers/schemas.js.map +1 -1
  243. package/dist/handlers/search.d.ts +1 -1
  244. package/dist/handlers/search.d.ts.map +1 -1
  245. package/dist/handlers/search.js +43 -8
  246. package/dist/handlers/search.js.map +1 -1
  247. package/dist/handlers/tool-descriptions.d.ts.map +1 -1
  248. package/dist/handlers/tool-descriptions.js +12 -13
  249. package/dist/handlers/tool-descriptions.js.map +1 -1
  250. package/dist/handlers/tool-registry.d.ts +1 -0
  251. package/dist/handlers/tool-registry.d.ts.map +1 -1
  252. package/dist/handlers/tool-registry.js +4 -0
  253. package/dist/handlers/tool-registry.js.map +1 -1
  254. package/dist/handlers/tools.d.ts +2 -3
  255. package/dist/handlers/tools.d.ts.map +1 -1
  256. package/dist/handlers/tools.js +139 -84
  257. package/dist/handlers/tools.js.map +1 -1
  258. package/dist/handlers/where-used.d.ts +2 -0
  259. package/dist/handlers/where-used.d.ts.map +1 -1
  260. package/dist/handlers/where-used.js +23 -5
  261. package/dist/handlers/where-used.js.map +1 -1
  262. package/dist/handlers/write/batch-results.d.ts +28 -0
  263. package/dist/handlers/write/batch-results.d.ts.map +1 -0
  264. package/dist/handlers/write/batch-results.js +106 -0
  265. package/dist/handlers/write/batch-results.js.map +1 -0
  266. package/dist/handlers/write/create-transport.d.ts +7 -0
  267. package/dist/handlers/write/create-transport.d.ts.map +1 -0
  268. package/dist/handlers/write/create-transport.js +38 -0
  269. package/dist/handlers/write/create-transport.js.map +1 -0
  270. package/dist/handlers/write/create.d.ts.map +1 -1
  271. package/dist/handlers/write/create.js +276 -413
  272. package/dist/handlers/write/create.js.map +1 -1
  273. package/dist/handlers/write/uiad.d.ts +8 -0
  274. package/dist/handlers/write/uiad.d.ts.map +1 -0
  275. package/dist/handlers/write/uiad.js +115 -0
  276. package/dist/handlers/write/uiad.js.map +1 -0
  277. package/dist/handlers/write/update-delete.d.ts +6 -6
  278. package/dist/handlers/write/update-delete.d.ts.map +1 -1
  279. package/dist/handlers/write/update-delete.js +46 -15
  280. package/dist/handlers/write/update-delete.js.map +1 -1
  281. package/dist/handlers/write-helpers.d.ts +0 -6
  282. package/dist/handlers/write-helpers.d.ts.map +1 -1
  283. package/dist/handlers/write-helpers.js +88 -80
  284. package/dist/handlers/write-helpers.js.map +1 -1
  285. package/dist/handlers/write.d.ts.map +1 -1
  286. package/dist/handlers/write.js +5 -1
  287. package/dist/handlers/write.js.map +1 -1
  288. package/dist/public/index.d.ts +1 -1
  289. package/dist/public/index.d.ts.map +1 -1
  290. package/dist/public/index.js +1 -1
  291. package/dist/public/index.js.map +1 -1
  292. package/dist/public/ui/app.js +0 -2
  293. package/dist/server/audit.d.ts +42 -1
  294. package/dist/server/audit.d.ts.map +1 -1
  295. package/dist/server/audit.js.map +1 -1
  296. package/dist/server/config.d.ts +4 -0
  297. package/dist/server/config.d.ts.map +1 -1
  298. package/dist/server/config.js +67 -0
  299. package/dist/server/config.js.map +1 -1
  300. package/dist/server/context.d.ts +5 -0
  301. package/dist/server/context.d.ts.map +1 -1
  302. package/dist/server/context.js.map +1 -1
  303. package/dist/server/destination-registry.d.ts +10 -2
  304. package/dist/server/destination-registry.d.ts.map +1 -1
  305. package/dist/server/destination-registry.js +12 -3
  306. package/dist/server/destination-registry.js.map +1 -1
  307. package/dist/server/effective-policy-log.d.ts +2 -1
  308. package/dist/server/effective-policy-log.d.ts.map +1 -1
  309. package/dist/server/effective-policy-log.js +18 -2
  310. package/dist/server/effective-policy-log.js.map +1 -1
  311. package/dist/server/http.d.ts +1 -1
  312. package/dist/server/http.d.ts.map +1 -1
  313. package/dist/server/http.js +1 -0
  314. package/dist/server/http.js.map +1 -1
  315. package/dist/server/logger.d.ts.map +1 -1
  316. package/dist/server/logger.js +4 -1
  317. package/dist/server/logger.js.map +1 -1
  318. package/dist/server/multi-target-runtime.d.ts.map +1 -1
  319. package/dist/server/multi-target-runtime.js +7 -2
  320. package/dist/server/multi-target-runtime.js.map +1 -1
  321. package/dist/server/multi-target-tools.d.ts.map +1 -1
  322. package/dist/server/multi-target-tools.js +3 -1
  323. package/dist/server/multi-target-tools.js.map +1 -1
  324. package/dist/server/runtime-memory.d.ts +13 -0
  325. package/dist/server/runtime-memory.d.ts.map +1 -0
  326. package/dist/server/runtime-memory.js +42 -0
  327. package/dist/server/runtime-memory.js.map +1 -0
  328. package/dist/server/server-instructions.d.ts +2 -0
  329. package/dist/server/server-instructions.d.ts.map +1 -0
  330. package/dist/server/server-instructions.js +33 -0
  331. package/dist/server/server-instructions.js.map +1 -0
  332. package/dist/server/server.d.ts +3 -2
  333. package/dist/server/server.d.ts.map +1 -1
  334. package/dist/server/server.js +42 -78
  335. package/dist/server/server.js.map +1 -1
  336. package/dist/server/shutdown.d.ts +6 -0
  337. package/dist/server/shutdown.d.ts.map +1 -0
  338. package/dist/server/shutdown.js +52 -0
  339. package/dist/server/shutdown.js.map +1 -0
  340. package/dist/server/sinks/btp-auditlog.d.ts +10 -8
  341. package/dist/server/sinks/btp-auditlog.d.ts.map +1 -1
  342. package/dist/server/sinks/btp-auditlog.js +86 -68
  343. package/dist/server/sinks/btp-auditlog.js.map +1 -1
  344. package/dist/server/sinks/file.d.ts +1 -1
  345. package/dist/server/sinks/file.d.ts.map +1 -1
  346. package/dist/server/sinks/file.js +12 -21
  347. package/dist/server/sinks/file.js.map +1 -1
  348. package/dist/server/types.d.ts +8 -0
  349. package/dist/server/types.d.ts.map +1 -1
  350. package/dist/server/types.js +4 -0
  351. package/dist/server/types.js.map +1 -1
  352. package/dist/server/ui-state.d.ts.map +1 -1
  353. package/dist/server/ui-state.js +1 -0
  354. package/dist/server/ui-state.js.map +1 -1
  355. package/dist/server/ui.js +0 -2
  356. package/dist/server/ui.js.map +1 -1
  357. package/package.json +15 -13
@@ -6,9 +6,7 @@
6
6
  * - description: Rich LLM-friendly description
7
7
  * - inputSchema: JSON Schema for tool arguments
8
8
  *
9
- * The 12 intent-based design is ARC-1's key differentiator:
10
- * instead of 200+ individual tools (one per object type per operation),
11
- * we group by *intent* with a `type` parameter for routing.
9
+ * Group operations by intent, with a `type` parameter for object routing.
12
10
  * This keeps the LLM's tool selection simple and the context window small.
13
11
  *
14
12
  * Tool definitions adapt based on system type (BTP vs on-premise):
@@ -16,12 +14,19 @@
16
14
  * TEXT_ELEMENTS, VARIANTS), adjusts descriptions for restricted features
17
15
  * - On-premise: full tool set with all types and descriptions
18
16
  */
17
+ import { ATC_BATCH_MAX_OBJECTS, ATC_BATCH_NAME_MAX_LENGTH, ATC_BATCH_NAME_PATTERN, ATC_BATCH_TYPES, } from '../adt/atc-batch.js';
18
+ import { KTD_SHORT_TEXT_MAX_LENGTH } from '../adt/ddic-xml.js';
19
+ import { TEXT_ELEMENT_PARTS } from '../adt/text-elements.js';
19
20
  import { MAX_GREP_PATTERN_LENGTH } from '../context/grep.js';
21
+ import * as DtelFields from './data-element-fields.js';
22
+ import { SAPDIAGNOSE_ADDITIONAL_INPUTS } from './diagnose-fields.js';
20
23
  import * as FuncProcessing from './function-processing.js';
21
24
  import { getHyperfocusedToolDefinition } from './hyperfocused.js';
22
25
  import { CLASS_WRITE_INCLUDES } from './object-types.js';
26
+ import { addLiveRelationsDefinition } from './relation-tool.js';
23
27
  import { SAPWRITE_DESC_BTP, SAPWRITE_DESC_ONPREM } from './tool-descriptions.js';
24
- import { isGitToolVisible, SAPCONTEXT_TYPES_BTP, SAPCONTEXT_TYPES_ONPREM, SAPREAD_TYPES_BTP, SAPREAD_TYPES_ONPREM, SAPWRITE_TYPES_BTP, SAPWRITE_TYPES_ONPREM, } from './tool-registry.js';
28
+ 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
+ import { BATCH_CREATE_MAX_OBJECTS } from './write/batch-results.js';
25
30
  /**
26
31
  * Read-only / destructive hints for the 12 standard tools. Clients use them to badge tools
27
32
  * and to decide auto-approval (read-only tools are safe to auto-run); they are also required
@@ -56,48 +61,46 @@ const TOOL_ANNOTATIONS = {
56
61
  function isBtpMode(config) {
57
62
  return config.systemType === 'btp';
58
63
  }
59
- const SAPREAD_DESC_ONPREM = 'Read SAP ABAP objects — exact raw source, a method body, grep output, inactive drafts, revision history, or metadata. For "what does this object do?", explanations, spec work, reviews, or pre-change orientation, prefer SAPContext first (intent-level context before raw source). ' +
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. ' +
60
65
  '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. ' +
61
- 'CLAS: to save tokens, prefer method="*" (all signatures), method="NAME" (one body, ~95% fewer tokens than the full class), or grep over reading the full source. Omit include for the full source, or include=definitions|implementations|macros|testclasses for a local section. Full per-type detail: docs_page SAPRead. ' +
62
- 'Optional grep: case-insensitive regex returning only matching source lines (+context, line numbers); for CLAS, matches are annotated with the owning class/method. ' +
63
- 'Optional version parameter (default "active"): "inactive" reads the user\'s draft, "auto" the developer view. Active reads note when an inactive draft exists.';
64
- const SAPREAD_DESC_BTP = 'Read SAP ABAP objects (BTP ABAP Environment) — exact raw source, a method body, grep output, inactive drafts, or metadata. For "what does this object do?", explanations, spec work, reviews, or pre-change orientation, prefer SAPContext first (intent-level context before raw source). ' +
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. ' +
65
70
  '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). ' +
66
- 'CLAS: to save tokens, prefer method="*" (all signatures), method="NAME" (one body, ~95% fewer tokens than the full class), or grep over reading the full source. Omit include for the full source, or include=definitions|implementations|macros|testclasses for a local section. Full per-type detail: docs_page SAPRead. ' +
67
- 'Optional grep: case-insensitive regex returning only matching source lines (+context, line numbers); for CLAS, matches are annotated with the owning class/method. ' +
68
- 'Optional version parameter (default "active"): "inactive" reads the user\'s draft, "auto" the developer view.';
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.';
69
74
  // ─── SAPContext Types ───────────────────────────────────────────────
70
75
  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' +
71
76
  "Decision rule — pick the action from the user's question:\n" +
72
77
  '- "What breaks if I change <CDS>?" / "Who consumes <I_*>?" / "Blast radius" → action="impact" (DDLS only).\n' +
73
78
  '- "Which includes/appends extend <TABL>?" → action="structure", type="TABL".\n' +
74
- '- "What does <object> do?" / "Explain" / "deps before editing" → action="deps" (default).\n' +
79
+ '- "What does <object> do?" / "Explain" / "deps before editing" → action="deps" (default); type+name required.\n' +
75
80
  '- "Find all callers of <object>" → action="usages" (live SAP where-used lookup).\n\n' +
76
81
  'impact (CDS blast-radius): upstream AST deps + downstream where-used, classified into RAP buckets (projectionViews, bdefs, serviceDefinitions, serviceBindings, accessControls, metadataExtensions, abapConsumers, documentation, tables, other) + sibling-consistency hints. Use this instead of text-scanning DDDDLSRC/ACMDCLSRC with SAPQuery (it filters the noise). Optional includeIndirect, siblingCheck, siblingMaxCandidates.\n' +
77
- 'deps (default): target KTD + the public API contracts of its dependencies (not full source) one compact response vs N SAPRead calls (7-30x fewer tokens); SAP standard objects filtered out. For CDS, includes dependency DDL/field catalogs for cl_cds_test_environment.\n' +
82
+ 'deps: target KTD when available + selected dependency contracts, derived from source (not SAP-native relationships or a complete inventory). Counts distinguish root candidates from recursive attempts. Standard helper names are filtered. For CDS, includes dependency DDL/field catalogs for cl_cds_test_environment.\n' +
78
83
  'structure (TABL only): the DDIC include/append tree.\n\n' +
79
- 'Use SAPContext BEFORE editing existing objects. For non-CDS reverse-lookup use SAPNavigate(references); for CDS prefer impact. Full detail: docs_page SAPContext.';
84
+ 'Non-CDS reverse-lookup: SAPNavigate(references); CDS: impact. Full detail: docs_page SAPContext.';
80
85
  const SAPCONTEXT_DESC_BTP = 'Primary tool for understanding ABAP/CDS objects before specs, reviews, explanations, or changes (BTP ABAP Environment) — use instead of SAPRead when the user asks what an object does. Returns intent first (object KTD when available) then compressed dependency contracts.\n\n' +
81
86
  "Decision rule — pick the action from the user's question:\n" +
82
87
  '- "What breaks if I change <CDS>?" / "Who consumes <I_*>?" / "Blast radius" → action="impact" (DDLS only).\n' +
83
88
  '- "Which includes/appends extend <TABL>?" → action="structure", type="TABL".\n' +
84
- '- "What does <object> do?" / "Explain" / "deps before editing" → action="deps" (default).\n\n' +
89
+ '- "What does <object> do?" / "Explain" / "deps before editing" → action="deps" (default); type+name required.\n\n' +
85
90
  '- "Find all callers of <object>" → action="usages" (live SAP where-used lookup).\n\n' +
86
91
  'impact (CDS blast-radius): upstream AST deps + downstream where-used classified into RAP buckets (projectionViews, bdefs, serviceDefinitions, serviceBindings, accessControls, metadataExtensions, abapConsumers, documentation, tables, other) + sibling-consistency hints; filters the noise that text-scanning with SAPQuery produces. Optional includeIndirect, siblingCheck, siblingMaxCandidates.\n' +
87
- 'deps (default): target KTD + the public API contracts of its dependencies (not full source). On BTP, released SAP objects (CL_ABAP_*/IF_ABAP_*) and custom Z/Y are included.\n' +
92
+ 'deps: target KTD when available + selected dependency contracts, derived from source (not SAP-native relationships or a complete inventory). Counts distinguish root candidates from recursive attempts. On BTP, CL_ABAP_*/IF_ABAP_* and custom Z/Y are included.\n' +
88
93
  'structure (TABL only): the DDIC include/append tree.\n\n' +
89
- 'Use SAPContext BEFORE editing existing objects; SAPRead afterwards for exact source. Full detail: docs_page SAPContext.';
94
+ 'Full detail: docs_page SAPContext.';
90
95
  // ─── SAPQuery ───────────────────────────────────────────────────────
91
- const SAPQUERY_DIALECT_GUIDE = 'ADT freestyle ABAP SQL: one read-only SELECT; use AS aliases, alias~field/alias~*, ASCENDING/DESCENDING, single-quoted inline literals (no @/:/? parameters), and maxRows (not TOP/LIMIT/OFFSET/FETCH). JOINs, GROUP BY, aggregates, UNION, and subqueries work; schema prefixes, CTEs, derived tables, window functions, FULL JOIN, INTERSECT/EXCEPT, comments, and semicolons do not. ARC-1 auto-chunks long literal IN-lists in plain projection SELECTs. ';
92
- const SAPQUERY_DESC_ONPREM = 'Execute ABAP SQL queries against SAP tables. Returns columns + rows. Good for reverse-engineering metadata tables (DD02L, DD03L, TADIR, TFDIR, SWOTLV). Unknown tables get name suggestions. ' +
96
+ const SAPQUERY_DIALECT_GUIDE = 'ADT freestyle ABAP SQL: one read-only SELECT. Use AS aliases, alias~field/alias~*, ASCENDING/DESCENDING, single-quoted literals (no @/:/? parameters), and maxRows (not TOP/LIMIT/OFFSET/FETCH). JOINs, GROUP BY, aggregates, UNION and subqueries work. CTEs, FULL JOIN, derived/window tables, INTERSECT/EXCEPT, comments, semicolons and schema prefixes do not. ARC-1 auto-chunks long literal IN-lists in plain projection SELECTs. ';
97
+ const SAPQUERY_DESC_ONPREM = 'Query SAP tables with ABAP SQL; returns columns + rows. For reverse-engineering metadata: DD02L, DD03L, TADIR, TFDIR, SWOTLV. Unknown tables get suggestions. ' +
93
98
  SAPQUERY_DIALECT_GUIDE +
94
- 'To find CDS consumers do NOT text-scan DDDDLSRC/ACMDCLSRC/DDLXSRC_SRC use SAPContext(action="impact", type="DDLS") (where-used index, filtered buckets).';
95
- const SAPQUERY_DESC_BTP = 'Execute ABAP SQL queries (BTP ABAP Environment). Returns structured data with column names and rows. ' +
99
+ 'For CDS consumers, do not scan DDDDLSRC/ACMDCLSRC/DDLXSRC_SRC; use SAPContext(action="impact", type="DDLS").';
100
+ const SAPQUERY_DESC_BTP = 'Query BTP ABAP Environment with ABAP SQL; returns columns + rows. ' +
96
101
  SAPQUERY_DIALECT_GUIDE +
97
- 'IMPORTANT: On BTP, only custom Z/Y tables and released CDS entities can be queried. ' +
98
- 'SAP standard tables (MARA, VBAK, DD02L, DD03L, TADIR, etc.) are blocked. ' +
99
- 'Use released CDS views instead: I_LANGUAGE, I_COUNTRY, I_CURRENCY, I_UnitOfMeasure, etc. ' +
100
- 'If a table is not found, similar table names will be suggested automatically.';
102
+ 'BTP permits custom Z/Y tables and released CDS entities; standard tables are blocked. ' +
103
+ 'Use released views such as I_LANGUAGE. Unknown tables get suggestions.';
101
104
  // ─── SAPSearch ──────────────────────────────────────────────────────
102
105
  const SAPSEARCH_DESC_ONPREM = 'Search for ABAP objects, exact object-directory entries, or source code. Modes:\n' +
103
106
  '1. Object search (default): name pattern with wildcards (*); returns type, name, package, description, ADT URI.\n' +
@@ -230,7 +233,8 @@ function buildSAPSearchTool(btp, textSearchAvailable) {
230
233
  };
231
234
  properties.objectType = {
232
235
  type: 'string',
233
- description: 'For source_code search: filter by object type (e.g., PROG, CLAS, FUNC). For tadir_lookup: single type filter; use objectTypes for multiple.',
236
+ maxLength: 64,
237
+ description: 'Object search: SAP-side type filter before the result limit (e.g., UIAC, CLAS, CLAS/OC). Source search: type filter (e.g., PROG, CLAS, FUNC). For tadir_lookup: single type filter; use objectTypes for multiple.',
234
238
  };
235
239
  properties.source = {
236
240
  type: 'string',
@@ -352,9 +356,11 @@ export function getToolDefinitions(config, textSearchAvailable, resolvedFeatures
352
356
  },
353
357
  include: {
354
358
  type: 'string',
355
- description: 'For CLAS: DO NOT use this to read the main class — omit include entirely to get the full class source (CLASS DEFINITION + CLASS IMPLEMENTATION). This parameter reads class-LOCAL auxiliary files only: definitions (local type definitions, NOT the main class definition), implementations (local helper class implementations), macros, testclasses (ABAP Unit). Comma-separated. ' +
359
+ description: 'CLAS: omit include or use main for the global declaration + implementation; definitions/implementations select local helper classes, macros/testclasses their own sections. Explicit include wins over method auto-routing. ' +
356
360
  'For DDLS: use include="elements" for the CDS field catalog (key fields, aliases, associations, expression types) instead of raw DDL. ' +
357
- 'For VERSIONS (CLAS): include selects the class include history to query (main, definitions, implementations, macros, testclasses). BSP: case-sensitive path; name may also be APP/path.',
361
+ 'For VERSIONS (CLAS): include selects the class include history to query (main, definitions, implementations, macros, testclasses). BSP: case-sensitive path; name may also be APP/path.' +
362
+ // TEXT_ELEMENTS does not exist on BTP — keep the BTP surface byte-identical.
363
+ (btp ? '' : ' TEXT_ELEMENTS: symbols|selections|headings; omit for pool (CLAS: symbols).'),
358
364
  },
359
365
  group: {
360
366
  type: 'string',
@@ -362,8 +368,7 @@ export function getToolDefinitions(config, textSearchAvailable, resolvedFeatures
362
368
  },
363
369
  method: {
364
370
  type: 'string',
365
- description: 'For CLAS: method name to read a single method implementation (e.g., "get_name", "zif_order~process"). ' +
366
- 'Use "*" to list all methods with signatures and visibility. ' +
371
+ description: 'For CLAS: read a method (e.g., "get_name", "zif_order~process", "lhc_travel~accept") or use "*" to list methods. Without include=, lhc_*/lcl_* use implementations, ltc_* uses testclasses, and others use MAIN; explicit include= wins. ' +
367
372
  (btp ? '' : 'For SOBJ: BOR method name to read. If omitted, returns the full BOR method catalog. ') +
368
373
  'Not used with other types.',
369
374
  },
@@ -387,12 +392,12 @@ export function getToolDefinitions(config, textSearchAvailable, resolvedFeatures
387
392
  format: {
388
393
  type: 'string',
389
394
  enum: ['text', 'structured'],
390
- description: 'Output format. For action="diff", "structured" returns JSON {hasDifferences, identical, added, removed, diff, version labels}; default remains the human-readable patch. For ordinary reads, "text" (default) is raw source; "structured" (CLAS only) returns JSON metadata + EVERY class include a superset of "text", so it always costs MORE (measured +10% to +1685%). Use only to split test from production code; otherwise method="*" / method="name" / grep=.',
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.',
391
396
  },
392
397
  version: {
393
398
  type: 'string',
394
399
  enum: ['active', 'inactive', 'auto'],
395
- description: 'Source version to read. "active" (default) returns the last activated version. "inactive" returns the user\'s unactivated draft or active if no draft exists. "auto" returns the draft if one exists, else active.',
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.',
396
401
  },
397
402
  includeSignature: {
398
403
  type: 'boolean',
@@ -404,11 +409,11 @@ export function getToolDefinitions(config, textSearchAvailable, resolvedFeatures
404
409
  },
405
410
  maxRows: {
406
411
  type: 'number',
407
- description: 'Row cap (default 100). On 758, TABLE_CONTENTS returns N+1; use TABLE_QUERY or cap client-side.',
412
+ description: 'Row cap for TABLE_CONTENTS/TABLE_QUERY (default 100, max 10,000; byte limit may apply sooner). On 758, TABLE_CONTENTS returns N+1; use TABLE_QUERY for exact caps.',
408
413
  },
409
414
  maxResults: {
410
415
  type: 'number',
411
- description: 'For DEVC: max number of objects to list (default 200, clamped to [1, 1000]). Larger packages may be silently truncated by SAP at this limit; raise it if needed.',
416
+ description: 'DEVC object limit (default 200, clamped to [1, 1000]). Listing metadata reports the effective limit and possible truncation. Total and full repository completeness remain unknown.',
412
417
  },
413
418
  sqlFilter: {
414
419
  type: 'string',
@@ -416,7 +421,8 @@ export function getToolDefinitions(config, textSearchAvailable, resolvedFeatures
416
421
  },
417
422
  objectType: {
418
423
  type: 'string',
419
- 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.',
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.' +
425
+ (btp ? '' : ' TEXT_ELEMENTS: PROG (default), CLAS or FUGR.'),
420
426
  },
421
427
  versionUri: {
422
428
  type: 'string',
@@ -499,14 +505,14 @@ export function getToolDefinitions(config, textSearchAvailable, resolvedFeatures
499
505
  'scaffold_rap_handlers / generate_behavior_implementation: derive behavior-pool handlers from a BDEF (the latter is the equivalent of Eclipse\'s "Generate Behavior Implementation").' +
500
506
  (btp
501
507
  ? ''
502
- : " edit_text_symbols: write a global class's text symbols (immediately active, no SAPActivate)."),
508
+ : ' edit_text_symbols: replace a CLAS/PROG/FUGR textpool part; read first, retain other entries. source="" clears it.'),
503
509
  },
504
510
  type: {
505
511
  type: 'string',
506
512
  enum: btp ? SAPWRITE_TYPES_BTP : SAPWRITE_TYPES_ONPREM,
507
513
  description: btp
508
- ? '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/UIAD take AFF JSON in "source"; DTSC/DSFD/DTDC take DDL text — create/update/delete, then SAPActivate.'
509
- : '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 take DDL text — create/update/delete, then SAPActivate. UIAD is read-only outside ABAP Cloud.',
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 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 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.',
510
516
  },
511
517
  name: {
512
518
  type: 'string',
@@ -517,14 +523,23 @@ export function getToolDefinitions(config, textSearchAvailable, resolvedFeatures
517
523
  source: {
518
524
  type: 'string',
519
525
  description: btp
520
- ? '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`).'
521
- : '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`).',
526
+ ? '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.',
522
528
  },
523
529
  include: {
524
530
  type: 'string',
525
531
  enum: CLASS_WRITE_INCLUDES,
526
532
  description: 'CLAS-ONLY. Do NOT send unless type=CLAS AND action is update / edit_method / edit_class_definition. OMIT it entirely for every other type and for delete / batch_create / add_method / edit_method_signature / delete_method / change_method_visibility (those use /source/main). Targets a class-local include: definitions (CCDEF), implementations (CCIMP), macros, testclasses. edit_method auto-detects it from the method specifier (lhc_*/lcl_* → implementations, ltc_* → testclasses), so you rarely pass it; use include=testclasses to create a new local test class. Whole-include writes auto-create a missing include and produce an inactive draft (read with SAPRead version="inactive" before activation).',
527
533
  },
534
+ ...(btp
535
+ ? {}
536
+ : {
537
+ textPart: {
538
+ type: 'string',
539
+ enum: TEXT_ELEMENT_PARTS,
540
+ description: 'edit_text_symbols: symbols (default), selections (selection-screen labels), headings. CLAS: symbols only.',
541
+ },
542
+ }),
528
543
  method: {
529
544
  type: 'string',
530
545
  description: 'edit_method/edit_method_signature/delete_method/change_method_visibility: the method NAME (e.g. "get_name", "zif_order~process", "lhc_project~approve_project"). add_method: the full METHODS clause as ABAP source. Local-class methods auto-route by prefix (lhc_*/lcl_* → implementations, ltc_* → testclasses); use the qualified <localclass>~<method> form when a bare name is ambiguous.',
@@ -568,7 +583,7 @@ export function getToolDefinitions(config, textSearchAvailable, resolvedFeatures
568
583
  },
569
584
  dryRun: {
570
585
  type: 'boolean',
571
- description: 'For generate_behavior_implementation: when true, runs discovery + cross-validation + scaffold planning and returns the report without writing or activating. Use this to preview what would change.',
586
+ description: 'For generate_behavior_implementation: when true, runs discovery + cross-validation + scaffold planning and returns the report without writing or activating. Use this to preview what would change. SKTD/KTD update: reports which nodes would change, writing nothing.',
572
587
  },
573
588
  description: {
574
589
  type: 'string',
@@ -628,6 +643,7 @@ export function getToolDefinitions(config, textSearchAvailable, resolvedFeatures
628
643
  mediumLabel: { type: 'string', description: 'DTEL: medium field label' },
629
644
  longLabel: { type: 'string', description: 'DTEL: long field label' },
630
645
  headingLabel: { type: 'string', description: 'DTEL: heading field label' },
646
+ ...DtelFields.DATA_ELEMENT_TOOL_PROPERTIES,
631
647
  searchHelp: { type: 'string', description: 'DTEL: search help name' },
632
648
  searchHelpParameter: { type: 'string', description: 'DTEL: search help parameter' },
633
649
  setGetParameter: { type: 'string', description: 'DTEL: SET/GET parameter ID' },
@@ -714,8 +730,21 @@ export function getToolDefinitions(config, textSearchAvailable, resolvedFeatures
714
730
  type: 'string',
715
731
  description: 'SKTD/KTD create: description of the parent object (shown in Eclipse tooltips).',
716
732
  },
733
+ shortTexts: {
734
+ type: 'array',
735
+ description: `SKTD/KTD create/update: node = any name or id the SAPRead node index lists; text max ${KTD_SHORT_TEXT_MAX_LENGTH} UTF-16 units after whitespace normalization; empty clears; source optional.`,
736
+ items: {
737
+ type: 'object',
738
+ properties: {
739
+ node: { type: 'string', minLength: 1 },
740
+ text: { type: 'string' },
741
+ },
742
+ required: ['node', 'text'],
743
+ },
744
+ },
717
745
  objects: {
718
746
  type: 'array',
747
+ maxItems: BATCH_CREATE_MAX_OBJECTS,
719
748
  items: {
720
749
  type: 'object',
721
750
  properties: {
@@ -763,6 +792,7 @@ export function getToolDefinitions(config, textSearchAvailable, resolvedFeatures
763
792
  mediumLabel: { type: 'string' },
764
793
  longLabel: { type: 'string' },
765
794
  headingLabel: { type: 'string' },
795
+ ...DtelFields.DATA_ELEMENT_TOOL_PROPERTIES,
766
796
  searchHelp: { type: 'string' },
767
797
  searchHelpParameter: { type: 'string' },
768
798
  setGetParameter: { type: 'string' },
@@ -845,8 +875,8 @@ export function getToolDefinitions(config, textSearchAvailable, resolvedFeatures
845
875
  tools.push({
846
876
  name: 'SAPNavigate',
847
877
  description: btp
848
- ? 'Navigate code (BTP ABAP Environment): definitions, references (where-used), completion, class hierarchy. references uses the scope-based Where-Used API (line numbers, snippets, package); optional objectType filters by ADT slash type (e.g. CLAS/OC). type+name auto-normalized. Scope = released SAP + custom Z/Y. For CDS (DDLS), prefer SAPContext(action="impact") the same where-used pre-classified into RAP buckets.'
849
- : 'Navigate code: definitions, references (where-used), completion, class hierarchy. references uses the scope-based Where-Used API (line numbers, snippets, package); optional objectType filters by ADT slash type (e.g. CLAS/OC, PROG/P); pass type+name instead of uri. hierarchy returns superclass + interfaces + direct subclasses. For CDS (DDLS), prefer SAPContext(action="impact") the same where-used pre-classified into RAP buckets, answering "what breaks if I change this view".',
878
+ ? 'Navigate code (BTP ABAP Environment): definitions, references, completion, hierarchy. references: scope-based where-used with lines/snippets/package; objectType filters results (e.g. CLAS/OC); type+name replaces uri. Scope = released SAP + custom Z/Y. hierarchy queries SEOMETAREL: requires data/SQL opt-in + matching scope; otherwise inspect class MAIN with SAPRead. CDS (DDLS) impact: SAPContext(action="impact") classifies where-used into RAP buckets.'
879
+ : 'Navigate code: definitions, references, completion, hierarchy. references: scope-based where-used with lines/snippets/package; objectType filters results (e.g. CLAS/OC, PROG/P); type+name replaces uri. hierarchy queries SEOMETAREL for superclass/interfaces/direct subclasses: requires data/SQL opt-in + matching scope; otherwise inspect class MAIN with SAPRead. CDS (DDLS) impact: SAPContext(action="impact") classifies where-used into RAP buckets.',
850
880
  inputSchema: {
851
881
  type: 'object',
852
882
  properties: {
@@ -861,12 +891,12 @@ export function getToolDefinitions(config, textSearchAvailable, resolvedFeatures
861
891
  },
862
892
  type: {
863
893
  type: 'string',
864
- description: 'Object type (PROG, CLAS, INTF, FUNC, etc.) alternative to uri for references.',
894
+ description: 'Root object type, paired with name instead of uri (e.g. type="INTF"). Not the result-type filter.',
865
895
  },
866
896
  name: { type: 'string', description: 'Object name — alternative to uri for references.' },
867
897
  objectType: {
868
898
  type: 'string',
869
- description: 'references: keep only results of this ADT type, slash format (CLAS/OC, PROG/P, FUGR/FF). A bare prefix ("CLAS") matches every subtype.',
899
+ description: 'references RESULT filter, not the root type: CLAS/OC, PROG/P, FUGR/FF. Omit for all consumer types. A bare prefix ("CLAS") matches every subtype.',
870
900
  },
871
901
  maxResults: {
872
902
  type: 'number',
@@ -879,6 +909,8 @@ export function getToolDefinitions(config, textSearchAvailable, resolvedFeatures
879
909
  required: ['action'],
880
910
  },
881
911
  });
912
+ const navigation = tools.find((tool) => tool.name === 'SAPNavigate');
913
+ addLiveRelationsDefinition(navigation, config, options.discoveryMap ?? resolvedFeatures?.discoveryMap);
882
914
  // SAPQuery — only registered when free SQL is allowed
883
915
  if (config.allowFreeSQL) {
884
916
  tools.push({
@@ -888,7 +920,10 @@ export function getToolDefinitions(config, textSearchAvailable, resolvedFeatures
888
920
  type: 'object',
889
921
  properties: {
890
922
  sql: { type: 'string', description: 'ABAP SQL SELECT statement' },
891
- maxRows: { type: 'number', description: 'Maximum rows (default 100)' },
923
+ maxRows: {
924
+ type: 'number',
925
+ description: 'Rows (default 100, max 10,000; byte limit may apply sooner).',
926
+ },
892
927
  },
893
928
  required: ['sql'],
894
929
  },
@@ -934,16 +969,18 @@ export function getToolDefinitions(config, textSearchAvailable, resolvedFeatures
934
969
  },
935
970
  }, {
936
971
  name: 'SAPDiagnose',
937
- description: 'Run diagnostics on ABAP objects and analyze runtime errors. Actions:\n' +
972
+ description: 'ABAP diagnostics and runtime analysis. Actions:\n' +
938
973
  '- "syntax": syntax-check (name+type; optional version; optional source = pre-write dry-run, nothing written).\n' +
939
974
  '- "unittest": harmless ABAP Unit for CLAS/PROG/FUGR or DEVC (exact; includeSubpackages recurses).\n' +
940
- '- "atc": run ATC checks (name+type; omit variant to bind the system default; unknown variant = error). "atc_variants": list variants + that default (variant = name filter; read-only).\n' +
975
+ '- "unittest_ci": harmless package tests with source reconciliation; empty/incomplete runs fail.\n' +
976
+ '- "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
+ '- "atc_ci": package ATC CI; requires available API and verified selection.\n' +
941
978
  '- "cds_testcases": SAP-suggested ABAP Unit test cases for a CDS entity (name; read-only; SAP_BASIS 8.16+).\n' +
942
979
  '- "object_state": compare active vs inactive source versions (name+type; CLAS compares all includes). Returns ETags/hashes/divergence flags.\n' +
943
- '- "quickfix": get quick-fix proposals at a position (name+type+source+line; optional column, sourceUri).\n' +
944
- '- "apply_quickfix": apply one proposal, return text deltas, no write (name+type+source+line+proposalUri+proposalUserContent; pass proposalUserContent through exactly).\n' +
980
+ '- "quickfix": proposals at name+type+source+line (optional column/sourceUri).\n' +
981
+ '- "apply_quickfix": return proposal text deltas without writing; needs quickfix inputs + proposalUri/proposalUserContent.\n' +
945
982
  '- "dumps": list/read ST22 short dumps (no id = list; id = read; includeFullText, sections).\n' +
946
- '- "traces": list/analyze profiler traces (id+analysis: hitlist=hot spots, statements=call tree, dbAccesses=DB stats).\n' +
983
+ '- "traces": list profiler traces; id+analysis analyzes one.\n' +
947
984
  '- "trace_start": arm a profiler trace for the NEXT matching execution, then reproduce and read via "traces" (write scope; defaults: next HTTP request, SQL on).\n' +
948
985
  '- "trace_requests": list armed trace requests. "trace_cancel": cancel one by id (write scope).\n' +
949
986
  '- "system_messages": list SM02 messages. "gateway_errors": list /IWFND/ERROR_LOG (on-prem; detailUrl or id+errorType for detail).\n' +
@@ -960,7 +997,9 @@ export function getToolDefinitions(config, textSearchAvailable, resolvedFeatures
960
997
  enum: [
961
998
  'syntax',
962
999
  'unittest',
1000
+ 'unittest_ci',
963
1001
  'atc',
1002
+ 'atc_ci',
964
1003
  'atc_variants',
965
1004
  'cds_testcases',
966
1005
  'dumps',
@@ -983,36 +1022,56 @@ export function getToolDefinitions(config, textSearchAvailable, resolvedFeatures
983
1022
  },
984
1023
  name: {
985
1024
  type: 'string',
986
- description: 'Object name (for syntax/unittest/atc/object_state); the CDS entity / DDLS source name for cds_testcases and cds_sql',
1025
+ description: 'syntax/unittest/atc/object_state object name; cds_testcases/cds_sql CDS entity or DDLS name.',
987
1026
  },
988
1027
  url: {
989
1028
  type: 'string',
990
- description: 'For odata_perf: the host-relative OData path to probe, from the Fiori app\'s Network tab (e.g. "/sap/opu/odata4/sap/.../Entity?$filter=…"). Must be a path on the connected system — absolute URLs are rejected.',
1029
+ description: 'odata_perf: host-relative OData path from the app network request (e.g. /sap/opu/odata4/sap/.../Entity?$filter=…). Absolute URLs rejected.',
991
1030
  },
992
1031
  type: {
993
1032
  type: 'string',
994
1033
  description: 'Object type; unittest accepts CLAS, PROG, FUGR, or DEVC.',
995
1034
  },
1035
+ objects: {
1036
+ type: 'array',
1037
+ minItems: 1,
1038
+ maxItems: ATC_BATCH_MAX_OBJECTS,
1039
+ description: 'ATC only, instead of name/type/url. One batch + at most one verification. Returns coverage; unreported objects stay incomplete. No packages.',
1040
+ items: {
1041
+ type: 'object',
1042
+ required: ['type', 'name'],
1043
+ additionalProperties: false,
1044
+ properties: {
1045
+ type: { type: 'string', enum: btp ? ATC_BATCH_TYPES_BTP : [...ATC_BATCH_TYPES] },
1046
+ name: {
1047
+ type: 'string',
1048
+ minLength: 1,
1049
+ maxLength: ATC_BATCH_NAME_MAX_LENGTH,
1050
+ pattern: ATC_BATCH_NAME_PATTERN,
1051
+ },
1052
+ },
1053
+ },
1054
+ },
996
1055
  source: {
997
1056
  type: 'string',
998
1057
  description: 'Current source code (required for quickfix/apply_quickfix).',
999
1058
  },
1000
1059
  sourceUri: {
1001
1060
  type: 'string',
1002
- description: 'Exact ADT source URI for quickfix/apply_quickfix. Defaults to the type/name main source; use this for class includes such as /includes/definitions.',
1061
+ description: 'quickfix/apply_quickfix source URI; default type/name main source. Set for includes, e.g. /includes/definitions.',
1003
1062
  },
1004
1063
  line: {
1005
1064
  type: 'number',
1006
- description: 'Source line number for quickfix evaluation (required for quickfix/apply_quickfix).',
1065
+ description: 'Required quickfix/apply_quickfix source line.',
1007
1066
  },
1008
1067
  column: {
1009
1068
  type: 'number',
1010
- description: 'Source column number for quickfix evaluation (default 0 for quickfix actions).',
1069
+ description: 'Quickfix source column (default 0).',
1011
1070
  },
1012
1071
  version: {
1013
1072
  type: 'string',
1014
1073
  enum: ['active', 'inactive'],
1015
- description: 'Source version for syntax check (default "active"). Use "inactive" to validate pending changes.',
1074
+ description: 'syntax source version (default active); inactive checks pending changes.',
1016
1075
  },
1017
1076
  proposalUri: {
1018
1077
  type: 'string',
@@ -1024,7 +1083,7 @@ export function getToolDefinitions(config, textSearchAvailable, resolvedFeatures
1024
1083
  },
1025
1084
  proposalAffectedObjects: {
1026
1085
  type: 'array',
1027
- description: 'Optional affectedObjects array from quickfix action. Include content for each affected source unit when applying multi-object quickfixes.',
1086
+ description: 'quickfix affectedObjects; provide current content for each source unit when applying multi-object fixes.',
1028
1087
  items: {
1029
1088
  type: 'object',
1030
1089
  required: ['uri'],
@@ -1037,41 +1096,40 @@ export function getToolDefinitions(config, textSearchAvailable, resolvedFeatures
1037
1096
  },
1038
1097
  },
1039
1098
  },
1040
- variant: { type: 'string', description: 'atc: check variant; atc_variants: name filter (*=all)' },
1041
1099
  id: {
1042
1100
  type: 'string',
1043
1101
  description: 'Dump or trace ID (for dumps/traces actions); also the trace-request id to cancel (for trace_cancel). Omit to list, provide to get details.',
1044
1102
  },
1045
1103
  detailUrl: {
1046
1104
  type: 'string',
1047
- description: 'Canonical host-relative /sap/bc/adt/gw/errorlog/... path for detail mode; absolute URLs are rejected.',
1105
+ description: 'Detail path: canonical /sap/bc/adt/gw/errorlog/...; no absolute URLs.',
1048
1106
  },
1049
1107
  errorType: {
1050
1108
  type: 'string',
1051
- description: 'Gateway error type for gateway_errors detail by id (for example "Frontend Error"). Required when using id without detailUrl.',
1109
+ description: 'gateway_errors: required with id instead of detailUrl, e.g. "Frontend Error".',
1052
1110
  },
1053
1111
  user: { type: 'string', description: 'SAP-user filter for dumps, feeds, or authorization_trace.' },
1054
1112
  authObject: { type: 'string', description: 'Authorization object filter, e.g. S_TCODE.' },
1055
1113
  from: {
1056
1114
  type: 'string',
1057
- description: 'Optional lower time boundary for feed-based diagnostics actions (system_messages/gateway_errors).',
1115
+ description: 'system_messages/gateway_errors lower time bound.',
1058
1116
  },
1059
1117
  to: {
1060
1118
  type: 'string',
1061
- description: 'Optional upper time boundary for feed-based diagnostics actions (system_messages/gateway_errors).',
1119
+ description: 'system_messages/gateway_errors upper time bound.',
1062
1120
  },
1063
1121
  maxResults: {
1064
1122
  type: 'number',
1065
- description: 'Maximum results for dumps/system_messages/gateway_errors (default 50) or authorization_trace (default 100); bounded to a safe cap.',
1123
+ description: 'Result limit: dumps/system_messages/gateway_errors default 50; authorization_trace 100. Capped.',
1066
1124
  },
1067
1125
  sections: {
1068
1126
  type: 'array',
1069
1127
  items: { type: 'string' },
1070
- description: 'Dump chapter IDs to include for dumps detail mode (for example ["kap0","kap3","kap8"]). Omit to use focused defaults.',
1128
+ description: 'dumps detail chapter IDs, e.g. ["kap0","kap3","kap8"]; omit for focused defaults.',
1071
1129
  },
1072
1130
  includeFullText: {
1073
1131
  type: 'boolean',
1074
- description: 'For dumps detail mode only: include full formattedText blob. Default false to reduce token usage.',
1132
+ description: 'dumps detail: include full formattedText (default false).',
1075
1133
  },
1076
1134
  coverage: {
1077
1135
  type: 'boolean',
@@ -1083,57 +1141,54 @@ export function getToolDefinitions(config, textSearchAvailable, resolvedFeatures
1083
1141
  enum: ['legacy', 'structured', 'junit'],
1084
1142
  description: 'unittest: legacy|structured|junit; atc: legacy|structured; other actions reject it.',
1085
1143
  },
1086
- timeoutSeconds: {
1087
- type: 'number',
1088
- description: 'unittest/atc timeout: 1-3600s; default 300.',
1089
- },
1090
1144
  sqlOn: {
1091
1145
  type: 'boolean',
1092
- description: 'For action="set_sql_trace_state": true to arm the ST05 SQL trace, false to disarm. Combine with user to filter the trace to one SAP user.',
1146
+ description: 'set_sql_trace_state: true arms ST05 SQL trace, false disarms; user filters the SAP user.',
1093
1147
  },
1094
1148
  onlyFailures: {
1095
1149
  type: 'boolean',
1096
- description: 'For authorization_trace: return only denied checks (RC<>0), similar to the SU53 failure view.',
1150
+ description: 'authorization_trace: only denied checks (RC<>0), like SU53.',
1097
1151
  },
1098
1152
  analysis: {
1099
1153
  type: 'string',
1100
1154
  enum: ['hitlist', 'statements', 'dbAccesses'],
1101
- description: 'Trace analysis type (for traces action with id). hitlist = execution hot spots, statements = call tree, dbAccesses = database access stats.',
1155
+ description: 'traces with id: hitlist=hot spots, statements=call tree, dbAccesses=DB access stats.',
1102
1156
  },
1103
1157
  traceUser: {
1104
1158
  type: 'string',
1105
- description: 'For trace_start/trace_requests: the SAP user whose matching execution is traced/listed. Defaults to the connected user.',
1159
+ description: 'trace_start/trace_requests SAP user (default connected user).',
1106
1160
  },
1107
1161
  processType: {
1108
1162
  type: 'string',
1109
1163
  enum: ['any', 'http', 'dialog', 'batch', 'rfc'],
1110
- description: 'For trace_start: the kind of work process to capture. Default "http" (OData/Gateway). dialog = SAP GUI transaction, batch = background job, rfc = RFC call.',
1164
+ description: 'trace_start work process (default http/OData): dialog=SAP GUI, batch=background job, rfc=RFC.',
1111
1165
  },
1112
1166
  objectType: {
1113
1167
  type: 'string',
1114
1168
  enum: ['any', 'url', 'transaction', 'report', 'functionModule'],
1115
- description: 'For trace_start: what to match within the process. Defaults to the valid type for the process type (http→url, dialog→transaction, batch→report, rfc→functionModule).',
1169
+ description: 'trace_start match type; defaults: http→url, dialog→transaction, batch→report, rfc→functionModule.',
1116
1170
  },
1117
1171
  maxExecutions: {
1118
1172
  type: 'number',
1119
- description: 'For trace_start: how many matching executions to capture before the request is consumed (default 1).',
1173
+ description: 'trace_start executions to capture (default 1).',
1120
1174
  },
1121
1175
  expiresHours: {
1122
1176
  type: 'number',
1123
- description: 'For trace_start: hours until the armed request auto-expires (default 24).',
1177
+ description: 'trace_start expiry in hours (default 24).',
1124
1178
  },
1125
1179
  sqlTrace: {
1126
1180
  type: 'boolean',
1127
- description: 'For trace_start: capture SQL/DB accesses (default true required for analysis="dbAccesses").',
1181
+ description: 'trace_start SQL capture (default true; required for analysis="dbAccesses").',
1128
1182
  },
1129
1183
  aggregate: {
1130
1184
  type: 'boolean',
1131
- description: 'For trace_start: aggregate the trace (default true).',
1185
+ description: 'trace_start aggregation (default true).',
1132
1186
  },
1133
1187
  description: {
1134
1188
  type: 'string',
1135
- description: 'For trace_start: optional label for the trace request.',
1189
+ description: 'trace_start label.',
1136
1190
  },
1191
+ ...SAPDIAGNOSE_ADDITIONAL_INPUTS,
1137
1192
  },
1138
1193
  required: ['action'],
1139
1194
  },
@@ -1150,14 +1205,14 @@ export function getToolDefinitions(config, textSearchAvailable, resolvedFeatures
1150
1205
  enum: ['impact', 'deps', 'usages', 'structure'],
1151
1206
  description: 'Action:\n' +
1152
1207
  '"impact" = CDS blast-radius analysis (DDLS only). USE THIS for any question like "what breaks if I change <view>", "who consumes <I_*>", "impact analysis on <CDS>", "downstream of <view>". Returns upstream AST dependencies + downstream where-used classified into RAP buckets (projectionViews, bdefs, serviceDefinitions, serviceBindings, accessControls, metadataExtensions, abapConsumers, documentation, tables, other), plus additive sibling-consistency diagnostics (consistencyHints + siblingExtensionAnalysis) when related DDLS siblings show asymmetric DDLX coverage. ALWAYS prefer over SAPQuery against DDDDLSRC/ACMDCLSRC/DDLXSRC_SRC/SRVDSRC_SRC (those text-scans produce noise this classifier filters out). Non-DDLS input returns a guardrail error.\n' +
1153
- '"deps" (default, can be omitted) = object understanding / forward dependency context "what does <object> do?" or "what does <object> depend on?". Returns the object KTD when available plus public API contracts of dependencies.\n' +
1208
+ '"deps" (default) = source-derived dependency contracts plus KTD when available. Requires type+name, even with source. Not a complete inventory; read source for behavior.\n' +
1154
1209
  '"usages" = live SAP where-used lookup. Provide "type" when known; without it, the name must resolve uniquely. Prefer "impact" for CDS.\n' +
1155
1210
  '"structure" = TABL includes/appends.',
1156
1211
  },
1157
1212
  type: {
1158
1213
  type: 'string',
1159
1214
  enum: btp ? SAPCONTEXT_TYPES_BTP : SAPCONTEXT_TYPES_ONPREM,
1160
- description: 'Object type. Optional for action="impact" (defaults to DDLS) or action="usages"; required otherwise.',
1215
+ description: 'Root type. deps requires type+name, even with source. Optional for action="impact" (defaults to DDLS) or usages (unique name lookup); structure requires TABL.',
1161
1216
  },
1162
1217
  name: {
1163
1218
  type: 'string',