arc-1 1.2.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -5
- package/dist/adt/atc-batch.d.ts +71 -0
- package/dist/adt/atc-batch.d.ts.map +1 -0
- package/dist/adt/atc-batch.js +182 -0
- package/dist/adt/atc-batch.js.map +1 -0
- package/dist/adt/atc.d.ts +34 -0
- package/dist/adt/atc.d.ts.map +1 -1
- package/dist/adt/atc.js +58 -12
- package/dist/adt/atc.js.map +1 -1
- package/dist/adt/aunit.d.ts.map +1 -1
- package/dist/adt/aunit.js +50 -7
- package/dist/adt/aunit.js.map +1 -1
- package/dist/adt/bounded-response.d.ts +4 -1
- package/dist/adt/bounded-response.d.ts.map +1 -1
- package/dist/adt/bounded-response.js +33 -7
- package/dist/adt/bounded-response.js.map +1 -1
- package/dist/adt/ci-quality-xml.d.ts +44 -0
- package/dist/adt/ci-quality-xml.d.ts.map +1 -0
- package/dist/adt/ci-quality-xml.js +98 -0
- package/dist/adt/ci-quality-xml.js.map +1 -0
- package/dist/adt/ci-quality.d.ts +64 -0
- package/dist/adt/ci-quality.d.ts.map +1 -0
- package/dist/adt/ci-quality.js +132 -0
- package/dist/adt/ci-quality.js.map +1 -0
- package/dist/adt/client.d.ts +20 -16
- package/dist/adt/client.d.ts.map +1 -1
- package/dist/adt/client.js +35 -70
- package/dist/adt/client.js.map +1 -1
- package/dist/adt/data-source-policy.d.ts +6 -15
- package/dist/adt/data-source-policy.d.ts.map +1 -1
- package/dist/adt/data-source-policy.js +18 -11
- package/dist/adt/data-source-policy.js.map +1 -1
- package/dist/adt/ddic-xml.d.ts +78 -4
- package/dist/adt/ddic-xml.d.ts.map +1 -1
- package/dist/adt/ddic-xml.js +647 -54
- package/dist/adt/ddic-xml.js.map +1 -1
- package/dist/adt/devtools.d.ts +1 -0
- package/dist/adt/devtools.d.ts.map +1 -1
- package/dist/adt/devtools.js +24 -4
- package/dist/adt/devtools.js.map +1 -1
- package/dist/adt/http-deadline.d.ts +5 -0
- package/dist/adt/http-deadline.d.ts.map +1 -1
- package/dist/adt/http-deadline.js +2 -2
- package/dist/adt/http-deadline.js.map +1 -1
- package/dist/adt/http.d.ts +6 -3
- package/dist/adt/http.d.ts.map +1 -1
- package/dist/adt/http.js +57 -15
- package/dist/adt/http.js.map +1 -1
- package/dist/adt/internal-data-operations.d.ts +9 -4
- package/dist/adt/internal-data-operations.d.ts.map +1 -1
- package/dist/adt/internal-data-operations.js +11 -7
- package/dist/adt/internal-data-operations.js.map +1 -1
- package/dist/adt/package-contents.d.ts +12 -0
- package/dist/adt/package-contents.d.ts.map +1 -0
- package/dist/adt/package-contents.js +19 -0
- package/dist/adt/package-contents.js.map +1 -0
- package/dist/adt/relation-objects.d.ts +385 -0
- package/dist/adt/relation-objects.d.ts.map +1 -0
- package/dist/adt/relation-objects.js +262 -0
- package/dist/adt/relation-objects.js.map +1 -0
- package/dist/adt/repository-relations.d.ts +41 -0
- package/dist/adt/repository-relations.d.ts.map +1 -0
- package/dist/adt/repository-relations.js +246 -0
- package/dist/adt/repository-relations.js.map +1 -0
- package/dist/adt/request-attempt-budget.d.ts +26 -0
- package/dist/adt/request-attempt-budget.d.ts.map +1 -0
- package/dist/adt/request-attempt-budget.js +63 -0
- package/dist/adt/request-attempt-budget.js.map +1 -0
- package/dist/adt/result-limits.d.ts +3 -0
- package/dist/adt/result-limits.d.ts.map +1 -0
- package/dist/adt/result-limits.js +7 -0
- package/dist/adt/result-limits.js.map +1 -0
- package/dist/adt/server-driven.d.ts +6 -1
- package/dist/adt/server-driven.d.ts.map +1 -1
- package/dist/adt/server-driven.js +24 -20
- package/dist/adt/server-driven.js.map +1 -1
- package/dist/adt/table-query.d.ts +2 -0
- package/dist/adt/table-query.d.ts.map +1 -1
- package/dist/adt/table-query.js +61 -0
- package/dist/adt/table-query.js.map +1 -1
- package/dist/adt/text-elements.d.ts +48 -0
- package/dist/adt/text-elements.d.ts.map +1 -0
- package/dist/adt/text-elements.js +116 -0
- package/dist/adt/text-elements.js.map +1 -0
- package/dist/adt/types.d.ts +16 -0
- package/dist/adt/types.d.ts.map +1 -1
- package/dist/adt/uiad.d.ts +19 -0
- package/dist/adt/uiad.d.ts.map +1 -0
- package/dist/adt/uiad.js +173 -0
- package/dist/adt/uiad.js.map +1 -0
- package/dist/adt/xml-parser.d.ts +2 -0
- package/dist/adt/xml-parser.d.ts.map +1 -1
- package/dist/adt/xml-parser.js +20 -1
- package/dist/adt/xml-parser.js.map +1 -1
- package/dist/authz/policy.d.ts.map +1 -1
- package/dist/authz/policy.js +4 -1
- package/dist/authz/policy.js.map +1 -1
- package/dist/cache/cache.d.ts +3 -23
- package/dist/cache/cache.d.ts.map +1 -1
- package/dist/cache/cache.js +2 -3
- package/dist/cache/cache.js.map +1 -1
- package/dist/cache/caching-layer.d.ts +6 -25
- package/dist/cache/caching-layer.d.ts.map +1 -1
- package/dist/cache/caching-layer.js +3 -45
- package/dist/cache/caching-layer.js.map +1 -1
- package/dist/cache/memory.d.ts +1 -4
- package/dist/cache/memory.d.ts.map +1 -1
- package/dist/cache/memory.js +1 -10
- package/dist/cache/memory.js.map +1 -1
- package/dist/cache/sqlite.d.ts +1 -3
- package/dist/cache/sqlite.d.ts.map +1 -1
- package/dist/cache/sqlite.js +2 -17
- package/dist/cache/sqlite.js.map +1 -1
- package/dist/cli-checks.d.ts +3 -0
- package/dist/cli-checks.d.ts.map +1 -1
- package/dist/cli-checks.js +16 -0
- package/dist/cli-checks.js.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +5 -2
- package/dist/cli.js.map +1 -1
- package/dist/context/compressor.d.ts +2 -3
- package/dist/context/compressor.d.ts.map +1 -1
- package/dist/context/compressor.js +30 -49
- package/dist/context/compressor.js.map +1 -1
- package/dist/context/contract.d.ts +5 -0
- package/dist/context/contract.d.ts.map +1 -1
- package/dist/context/contract.js +2 -2
- package/dist/context/contract.js.map +1 -1
- package/dist/context/deps.d.ts +11 -0
- package/dist/context/deps.d.ts.map +1 -1
- package/dist/context/deps.js +2 -2
- package/dist/context/deps.js.map +1 -1
- package/dist/context/parse-cache.d.ts +23 -0
- package/dist/context/parse-cache.d.ts.map +1 -0
- package/dist/context/parse-cache.js +71 -0
- package/dist/context/parse-cache.js.map +1 -0
- package/dist/context/relation-walk.d.ts +48 -0
- package/dist/context/relation-walk.d.ts.map +1 -0
- package/dist/context/relation-walk.js +137 -0
- package/dist/context/relation-walk.js.map +1 -0
- package/dist/context/types.d.ts +4 -4
- package/dist/context/types.d.ts.map +1 -1
- package/dist/handlers/activate.d.ts +1 -1
- package/dist/handlers/activate.d.ts.map +1 -1
- package/dist/handlers/activate.js +33 -56
- package/dist/handlers/activate.js.map +1 -1
- package/dist/handlers/activation-results.d.ts +3 -0
- package/dist/handlers/activation-results.d.ts.map +1 -0
- package/dist/handlers/activation-results.js +8 -0
- package/dist/handlers/activation-results.js.map +1 -0
- package/dist/handlers/context.d.ts.map +1 -1
- package/dist/handlers/context.js +8 -32
- package/dist/handlers/context.js.map +1 -1
- package/dist/handlers/data-element-fields.d.ts +26 -0
- package/dist/handlers/data-element-fields.d.ts.map +1 -0
- package/dist/handlers/data-element-fields.js +27 -0
- package/dist/handlers/data-element-fields.js.map +1 -0
- package/dist/handlers/diagnose-ci.d.ts +9 -0
- package/dist/handlers/diagnose-ci.d.ts.map +1 -0
- package/dist/handlers/diagnose-ci.js +120 -0
- package/dist/handlers/diagnose-ci.js.map +1 -0
- package/dist/handlers/diagnose-fields.d.ts +51 -0
- package/dist/handlers/diagnose-fields.d.ts.map +1 -0
- package/dist/handlers/diagnose-fields.js +48 -0
- package/dist/handlers/diagnose-fields.js.map +1 -0
- package/dist/handlers/diagnose.d.ts +4 -1
- package/dist/handlers/diagnose.d.ts.map +1 -1
- package/dist/handlers/diagnose.js +28 -6
- package/dist/handlers/diagnose.js.map +1 -1
- package/dist/handlers/dispatch.d.ts.map +1 -1
- package/dist/handlers/dispatch.js +22 -5
- package/dist/handlers/dispatch.js.map +1 -1
- package/dist/handlers/feature-cache.d.ts +4 -3
- package/dist/handlers/feature-cache.d.ts.map +1 -1
- package/dist/handlers/feature-cache.js +4 -3
- package/dist/handlers/feature-cache.js.map +1 -1
- package/dist/handlers/hyperfocused.js +1 -1
- package/dist/handlers/live-relations.d.ts +5 -0
- package/dist/handlers/live-relations.d.ts.map +1 -0
- package/dist/handlers/live-relations.js +89 -0
- package/dist/handlers/live-relations.js.map +1 -0
- package/dist/handlers/manage.d.ts.map +1 -1
- package/dist/handlers/manage.js +7 -4
- package/dist/handlers/manage.js.map +1 -1
- package/dist/handlers/navigate.d.ts +1 -1
- package/dist/handlers/navigate.d.ts.map +1 -1
- package/dist/handlers/navigate.js +11 -5
- package/dist/handlers/navigate.js.map +1 -1
- package/dist/handlers/object-types.d.ts +2 -0
- package/dist/handlers/object-types.d.ts.map +1 -1
- package/dist/handlers/object-types.js +41 -6
- package/dist/handlers/object-types.js.map +1 -1
- package/dist/handlers/query-errors.d.ts +9 -1
- package/dist/handlers/query-errors.d.ts.map +1 -1
- package/dist/handlers/query-errors.js +40 -28
- package/dist/handlers/query-errors.js.map +1 -1
- package/dist/handlers/query.d.ts +1 -1
- package/dist/handlers/query.d.ts.map +1 -1
- package/dist/handlers/query.js +2 -2
- package/dist/handlers/query.js.map +1 -1
- package/dist/handlers/read.d.ts +1 -1
- package/dist/handlers/read.d.ts.map +1 -1
- package/dist/handlers/read.js +48 -15
- package/dist/handlers/read.js.map +1 -1
- package/dist/handlers/relation-input.d.ts +42 -0
- package/dist/handlers/relation-input.d.ts.map +1 -0
- package/dist/handlers/relation-input.js +22 -0
- package/dist/handlers/relation-input.js.map +1 -0
- package/dist/handlers/relation-tool.d.ts +5 -0
- package/dist/handlers/relation-tool.d.ts.map +1 -0
- package/dist/handlers/relation-tool.js +36 -0
- package/dist/handlers/relation-tool.js.map +1 -0
- package/dist/handlers/schemas.d.ts +119 -62
- package/dist/handlers/schemas.d.ts.map +1 -1
- package/dist/handlers/schemas.js +150 -13
- package/dist/handlers/schemas.js.map +1 -1
- package/dist/handlers/search.d.ts +1 -1
- package/dist/handlers/search.d.ts.map +1 -1
- package/dist/handlers/search.js +18 -5
- package/dist/handlers/search.js.map +1 -1
- package/dist/handlers/tool-descriptions.d.ts.map +1 -1
- package/dist/handlers/tool-descriptions.js +12 -13
- package/dist/handlers/tool-descriptions.js.map +1 -1
- package/dist/handlers/tool-registry.d.ts +1 -0
- package/dist/handlers/tool-registry.d.ts.map +1 -1
- package/dist/handlers/tool-registry.js +4 -0
- package/dist/handlers/tool-registry.js.map +1 -1
- package/dist/handlers/tools.d.ts +2 -3
- package/dist/handlers/tools.d.ts.map +1 -1
- package/dist/handlers/tools.js +127 -72
- package/dist/handlers/tools.js.map +1 -1
- package/dist/handlers/write/batch-results.d.ts +28 -0
- package/dist/handlers/write/batch-results.d.ts.map +1 -0
- package/dist/handlers/write/batch-results.js +106 -0
- package/dist/handlers/write/batch-results.js.map +1 -0
- package/dist/handlers/write/create-transport.d.ts +7 -0
- package/dist/handlers/write/create-transport.d.ts.map +1 -0
- package/dist/handlers/write/create-transport.js +38 -0
- package/dist/handlers/write/create-transport.js.map +1 -0
- package/dist/handlers/write/create.d.ts.map +1 -1
- package/dist/handlers/write/create.js +276 -413
- package/dist/handlers/write/create.js.map +1 -1
- package/dist/handlers/write/uiad.d.ts +8 -0
- package/dist/handlers/write/uiad.d.ts.map +1 -0
- package/dist/handlers/write/uiad.js +115 -0
- package/dist/handlers/write/uiad.js.map +1 -0
- package/dist/handlers/write/update-delete.d.ts +6 -6
- package/dist/handlers/write/update-delete.d.ts.map +1 -1
- package/dist/handlers/write/update-delete.js +46 -15
- package/dist/handlers/write/update-delete.js.map +1 -1
- package/dist/handlers/write-helpers.d.ts +0 -6
- package/dist/handlers/write-helpers.d.ts.map +1 -1
- package/dist/handlers/write-helpers.js +88 -80
- package/dist/handlers/write-helpers.js.map +1 -1
- package/dist/handlers/write.d.ts.map +1 -1
- package/dist/handlers/write.js +5 -1
- package/dist/handlers/write.js.map +1 -1
- package/dist/public/ui/app.js +0 -2
- package/dist/server/audit.d.ts +1 -1
- package/dist/server/audit.d.ts.map +1 -1
- package/dist/server/http.d.ts +1 -1
- package/dist/server/http.d.ts.map +1 -1
- package/dist/server/http.js +1 -0
- package/dist/server/http.js.map +1 -1
- package/dist/server/logger.d.ts.map +1 -1
- package/dist/server/logger.js +4 -1
- package/dist/server/logger.js.map +1 -1
- package/dist/server/multi-target-tools.d.ts.map +1 -1
- package/dist/server/multi-target-tools.js +3 -1
- package/dist/server/multi-target-tools.js.map +1 -1
- package/dist/server/server-instructions.d.ts.map +1 -1
- package/dist/server/server-instructions.js +11 -5
- package/dist/server/server-instructions.js.map +1 -1
- package/dist/server/server.d.ts +1 -1
- package/dist/server/server.d.ts.map +1 -1
- package/dist/server/server.js +18 -44
- package/dist/server/server.js.map +1 -1
- package/dist/server/shutdown.d.ts +6 -0
- package/dist/server/shutdown.d.ts.map +1 -0
- package/dist/server/shutdown.js +52 -0
- package/dist/server/shutdown.js.map +1 -0
- package/dist/server/sinks/btp-auditlog.d.ts +10 -8
- package/dist/server/sinks/btp-auditlog.d.ts.map +1 -1
- package/dist/server/sinks/btp-auditlog.js +76 -68
- package/dist/server/sinks/btp-auditlog.js.map +1 -1
- package/dist/server/sinks/file.d.ts +1 -1
- package/dist/server/sinks/file.d.ts.map +1 -1
- package/dist/server/sinks/file.js +12 -21
- package/dist/server/sinks/file.js.map +1 -1
- package/dist/server/ui.js +0 -2
- package/dist/server/ui.js.map +1 -1
- package/package.json +15 -13
package/dist/handlers/tools.js
CHANGED
|
@@ -6,9 +6,7 @@
|
|
|
6
6
|
* - description: Rich LLM-friendly description
|
|
7
7
|
* - inputSchema: JSON Schema for tool arguments
|
|
8
8
|
*
|
|
9
|
-
*
|
|
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,37 +61,37 @@ const TOOL_ANNOTATIONS = {
|
|
|
56
61
|
function isBtpMode(config) {
|
|
57
62
|
return config.systemType === 'btp';
|
|
58
63
|
}
|
|
59
|
-
const SAPREAD_DESC_ONPREM = 'Read SAP ABAP
|
|
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:
|
|
62
|
-
'
|
|
63
|
-
'Optional version parameter
|
|
64
|
-
const SAPREAD_DESC_BTP = 'Read SAP ABAP
|
|
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:
|
|
67
|
-
'
|
|
68
|
-
'Optional version parameter
|
|
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
|
|
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
|
-
'
|
|
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
|
|
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
|
-
'
|
|
94
|
+
'Full detail: docs_page SAPContext.';
|
|
90
95
|
// ─── SAPQuery ───────────────────────────────────────────────────────
|
|
91
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. ';
|
|
92
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. ' +
|
|
@@ -228,7 +233,8 @@ function buildSAPSearchTool(btp, textSearchAvailable) {
|
|
|
228
233
|
};
|
|
229
234
|
properties.objectType = {
|
|
230
235
|
type: 'string',
|
|
231
|
-
|
|
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.',
|
|
232
238
|
};
|
|
233
239
|
properties.source = {
|
|
234
240
|
type: 'string',
|
|
@@ -350,9 +356,11 @@ export function getToolDefinitions(config, textSearchAvailable, resolvedFeatures
|
|
|
350
356
|
},
|
|
351
357
|
include: {
|
|
352
358
|
type: 'string',
|
|
353
|
-
description: '
|
|
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. ' +
|
|
354
360
|
'For DDLS: use include="elements" for the CDS field catalog (key fields, aliases, associations, expression types) instead of raw DDL. ' +
|
|
355
|
-
'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).'),
|
|
356
364
|
},
|
|
357
365
|
group: {
|
|
358
366
|
type: 'string',
|
|
@@ -384,12 +392,12 @@ export function getToolDefinitions(config, textSearchAvailable, resolvedFeatures
|
|
|
384
392
|
format: {
|
|
385
393
|
type: 'string',
|
|
386
394
|
enum: ['text', 'structured'],
|
|
387
|
-
description: '
|
|
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.',
|
|
388
396
|
},
|
|
389
397
|
version: {
|
|
390
398
|
type: 'string',
|
|
391
399
|
enum: ['active', 'inactive', 'auto'],
|
|
392
|
-
description: '
|
|
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.',
|
|
393
401
|
},
|
|
394
402
|
includeSignature: {
|
|
395
403
|
type: 'boolean',
|
|
@@ -405,7 +413,7 @@ export function getToolDefinitions(config, textSearchAvailable, resolvedFeatures
|
|
|
405
413
|
},
|
|
406
414
|
maxResults: {
|
|
407
415
|
type: 'number',
|
|
408
|
-
description: '
|
|
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.',
|
|
409
417
|
},
|
|
410
418
|
sqlFilter: {
|
|
411
419
|
type: 'string',
|
|
@@ -413,7 +421,8 @@ export function getToolDefinitions(config, textSearchAvailable, resolvedFeatures
|
|
|
413
421
|
},
|
|
414
422
|
objectType: {
|
|
415
423
|
type: 'string',
|
|
416
|
-
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.'),
|
|
417
426
|
},
|
|
418
427
|
versionUri: {
|
|
419
428
|
type: 'string',
|
|
@@ -496,14 +505,14 @@ export function getToolDefinitions(config, textSearchAvailable, resolvedFeatures
|
|
|
496
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").' +
|
|
497
506
|
(btp
|
|
498
507
|
? ''
|
|
499
|
-
:
|
|
508
|
+
: ' edit_text_symbols: replace a CLAS/PROG/FUGR textpool part; read first, retain other entries. source="" clears it.'),
|
|
500
509
|
},
|
|
501
510
|
type: {
|
|
502
511
|
type: 'string',
|
|
503
512
|
enum: btp ? SAPWRITE_TYPES_BTP : SAPWRITE_TYPES_ONPREM,
|
|
504
513
|
description: btp
|
|
505
|
-
? '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
|
|
506
|
-
: '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
|
|
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.',
|
|
507
516
|
},
|
|
508
517
|
name: {
|
|
509
518
|
type: 'string',
|
|
@@ -514,14 +523,23 @@ export function getToolDefinitions(config, textSearchAvailable, resolvedFeatures
|
|
|
514
523
|
source: {
|
|
515
524
|
type: 'string',
|
|
516
525
|
description: btp
|
|
517
|
-
? '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`).'
|
|
518
|
-
: '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.',
|
|
519
528
|
},
|
|
520
529
|
include: {
|
|
521
530
|
type: 'string',
|
|
522
531
|
enum: CLASS_WRITE_INCLUDES,
|
|
523
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).',
|
|
524
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
|
+
}),
|
|
525
543
|
method: {
|
|
526
544
|
type: 'string',
|
|
527
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.',
|
|
@@ -565,7 +583,7 @@ export function getToolDefinitions(config, textSearchAvailable, resolvedFeatures
|
|
|
565
583
|
},
|
|
566
584
|
dryRun: {
|
|
567
585
|
type: 'boolean',
|
|
568
|
-
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.',
|
|
569
587
|
},
|
|
570
588
|
description: {
|
|
571
589
|
type: 'string',
|
|
@@ -625,6 +643,7 @@ export function getToolDefinitions(config, textSearchAvailable, resolvedFeatures
|
|
|
625
643
|
mediumLabel: { type: 'string', description: 'DTEL: medium field label' },
|
|
626
644
|
longLabel: { type: 'string', description: 'DTEL: long field label' },
|
|
627
645
|
headingLabel: { type: 'string', description: 'DTEL: heading field label' },
|
|
646
|
+
...DtelFields.DATA_ELEMENT_TOOL_PROPERTIES,
|
|
628
647
|
searchHelp: { type: 'string', description: 'DTEL: search help name' },
|
|
629
648
|
searchHelpParameter: { type: 'string', description: 'DTEL: search help parameter' },
|
|
630
649
|
setGetParameter: { type: 'string', description: 'DTEL: SET/GET parameter ID' },
|
|
@@ -711,8 +730,21 @@ export function getToolDefinitions(config, textSearchAvailable, resolvedFeatures
|
|
|
711
730
|
type: 'string',
|
|
712
731
|
description: 'SKTD/KTD create: description of the parent object (shown in Eclipse tooltips).',
|
|
713
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
|
+
},
|
|
714
745
|
objects: {
|
|
715
746
|
type: 'array',
|
|
747
|
+
maxItems: BATCH_CREATE_MAX_OBJECTS,
|
|
716
748
|
items: {
|
|
717
749
|
type: 'object',
|
|
718
750
|
properties: {
|
|
@@ -760,6 +792,7 @@ export function getToolDefinitions(config, textSearchAvailable, resolvedFeatures
|
|
|
760
792
|
mediumLabel: { type: 'string' },
|
|
761
793
|
longLabel: { type: 'string' },
|
|
762
794
|
headingLabel: { type: 'string' },
|
|
795
|
+
...DtelFields.DATA_ELEMENT_TOOL_PROPERTIES,
|
|
763
796
|
searchHelp: { type: 'string' },
|
|
764
797
|
searchHelpParameter: { type: 'string' },
|
|
765
798
|
setGetParameter: { type: 'string' },
|
|
@@ -842,8 +875,8 @@ export function getToolDefinitions(config, textSearchAvailable, resolvedFeatures
|
|
|
842
875
|
tools.push({
|
|
843
876
|
name: 'SAPNavigate',
|
|
844
877
|
description: btp
|
|
845
|
-
? 'Navigate code (BTP ABAP Environment): definitions, references
|
|
846
|
-
: 'Navigate code: definitions, references
|
|
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.',
|
|
847
880
|
inputSchema: {
|
|
848
881
|
type: 'object',
|
|
849
882
|
properties: {
|
|
@@ -858,12 +891,12 @@ export function getToolDefinitions(config, textSearchAvailable, resolvedFeatures
|
|
|
858
891
|
},
|
|
859
892
|
type: {
|
|
860
893
|
type: 'string',
|
|
861
|
-
description: '
|
|
894
|
+
description: 'Root object type, paired with name instead of uri (e.g. type="INTF"). Not the result-type filter.',
|
|
862
895
|
},
|
|
863
896
|
name: { type: 'string', description: 'Object name — alternative to uri for references.' },
|
|
864
897
|
objectType: {
|
|
865
898
|
type: 'string',
|
|
866
|
-
description: 'references
|
|
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.',
|
|
867
900
|
},
|
|
868
901
|
maxResults: {
|
|
869
902
|
type: 'number',
|
|
@@ -876,6 +909,8 @@ export function getToolDefinitions(config, textSearchAvailable, resolvedFeatures
|
|
|
876
909
|
required: ['action'],
|
|
877
910
|
},
|
|
878
911
|
});
|
|
912
|
+
const navigation = tools.find((tool) => tool.name === 'SAPNavigate');
|
|
913
|
+
addLiveRelationsDefinition(navigation, config, options.discoveryMap ?? resolvedFeatures?.discoveryMap);
|
|
879
914
|
// SAPQuery — only registered when free SQL is allowed
|
|
880
915
|
if (config.allowFreeSQL) {
|
|
881
916
|
tools.push({
|
|
@@ -934,16 +969,18 @@ export function getToolDefinitions(config, textSearchAvailable, resolvedFeatures
|
|
|
934
969
|
},
|
|
935
970
|
}, {
|
|
936
971
|
name: 'SAPDiagnose',
|
|
937
|
-
description: '
|
|
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
|
-
'- "
|
|
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":
|
|
944
|
-
'- "apply_quickfix":
|
|
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
|
|
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: '
|
|
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: '
|
|
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: '
|
|
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: '
|
|
1065
|
+
description: 'Required quickfix/apply_quickfix source line.',
|
|
1007
1066
|
},
|
|
1008
1067
|
column: {
|
|
1009
1068
|
type: 'number',
|
|
1010
|
-
description: '
|
|
1069
|
+
description: 'Quickfix source column (default 0).',
|
|
1011
1070
|
},
|
|
1012
1071
|
version: {
|
|
1013
1072
|
type: 'string',
|
|
1014
1073
|
enum: ['active', 'inactive'],
|
|
1015
|
-
description: '
|
|
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: '
|
|
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: '
|
|
1105
|
+
description: 'Detail path: canonical /sap/bc/adt/gw/errorlog/...; no absolute URLs.',
|
|
1048
1106
|
},
|
|
1049
1107
|
errorType: {
|
|
1050
1108
|
type: 'string',
|
|
1051
|
-
description: '
|
|
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: '
|
|
1115
|
+
description: 'system_messages/gateway_errors lower time bound.',
|
|
1058
1116
|
},
|
|
1059
1117
|
to: {
|
|
1060
1118
|
type: 'string',
|
|
1061
|
-
description: '
|
|
1119
|
+
description: 'system_messages/gateway_errors upper time bound.',
|
|
1062
1120
|
},
|
|
1063
1121
|
maxResults: {
|
|
1064
1122
|
type: 'number',
|
|
1065
|
-
description: '
|
|
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: '
|
|
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: '
|
|
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: '
|
|
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: '
|
|
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: '
|
|
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: '
|
|
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: '
|
|
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: '
|
|
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: '
|
|
1173
|
+
description: 'trace_start executions to capture (default 1).',
|
|
1120
1174
|
},
|
|
1121
1175
|
expiresHours: {
|
|
1122
1176
|
type: 'number',
|
|
1123
|
-
description: '
|
|
1177
|
+
description: 'trace_start expiry in hours (default 24).',
|
|
1124
1178
|
},
|
|
1125
1179
|
sqlTrace: {
|
|
1126
1180
|
type: 'boolean',
|
|
1127
|
-
description: '
|
|
1181
|
+
description: 'trace_start SQL capture (default true; required for analysis="dbAccesses").',
|
|
1128
1182
|
},
|
|
1129
1183
|
aggregate: {
|
|
1130
1184
|
type: 'boolean',
|
|
1131
|
-
description: '
|
|
1185
|
+
description: 'trace_start aggregation (default true).',
|
|
1132
1186
|
},
|
|
1133
1187
|
description: {
|
|
1134
1188
|
type: 'string',
|
|
1135
|
-
description: '
|
|
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
|
|
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: '
|
|
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',
|