arc-1 0.9.25 → 1.0.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 +29 -12
- package/dist/adt/abapgit.d.ts +19 -6
- package/dist/adt/abapgit.d.ts.map +1 -1
- package/dist/adt/abapgit.js +141 -36
- package/dist/adt/abapgit.js.map +1 -1
- package/dist/adt/authorization-trace.d.ts +23 -0
- package/dist/adt/authorization-trace.d.ts.map +1 -0
- package/dist/adt/authorization-trace.js +196 -0
- package/dist/adt/authorization-trace.js.map +1 -0
- package/dist/adt/client.d.ts +21 -8
- package/dist/adt/client.d.ts.map +1 -1
- package/dist/adt/client.js +47 -7
- package/dist/adt/client.js.map +1 -1
- package/dist/adt/config.d.ts +15 -0
- package/dist/adt/config.d.ts.map +1 -1
- package/dist/adt/config.js.map +1 -1
- package/dist/adt/crud.d.ts +7 -2
- package/dist/adt/crud.d.ts.map +1 -1
- package/dist/adt/crud.js +12 -4
- package/dist/adt/crud.js.map +1 -1
- package/dist/adt/ddic-xml.d.ts +27 -17
- package/dist/adt/ddic-xml.d.ts.map +1 -1
- package/dist/adt/ddic-xml.js +45 -34
- package/dist/adt/ddic-xml.js.map +1 -1
- package/dist/adt/devtools.d.ts +13 -0
- package/dist/adt/devtools.d.ts.map +1 -1
- package/dist/adt/devtools.js +120 -50
- package/dist/adt/devtools.js.map +1 -1
- package/dist/adt/diagnostics.d.ts +1 -1
- package/dist/adt/diagnostics.d.ts.map +1 -1
- package/dist/adt/diagnostics.js +1 -0
- package/dist/adt/diagnostics.js.map +1 -1
- package/dist/adt/errors.d.ts +8 -8
- package/dist/adt/errors.d.ts.map +1 -1
- package/dist/adt/errors.js +30 -11
- package/dist/adt/errors.js.map +1 -1
- package/dist/adt/http.d.ts +17 -1
- package/dist/adt/http.d.ts.map +1 -1
- package/dist/adt/http.js +102 -19
- package/dist/adt/http.js.map +1 -1
- package/dist/adt/oauth.d.ts +2 -2
- package/dist/adt/oauth.d.ts.map +1 -1
- package/dist/adt/oauth.js +5 -3
- package/dist/adt/oauth.js.map +1 -1
- package/dist/adt/package-hierarchy.d.ts.map +1 -1
- package/dist/adt/package-hierarchy.js.map +1 -1
- package/dist/adt/rap-generate.js.map +1 -1
- package/dist/adt/rap-handlers.js.map +1 -1
- package/dist/adt/rap-preflight.js.map +1 -1
- package/dist/adt/safety.d.ts +13 -13
- package/dist/adt/safety.d.ts.map +1 -1
- package/dist/adt/semaphore.d.ts.map +1 -1
- package/dist/adt/server-driven.d.ts +154 -34
- package/dist/adt/server-driven.d.ts.map +1 -1
- package/dist/adt/server-driven.js +178 -53
- package/dist/adt/server-driven.js.map +1 -1
- package/dist/adt/structure-hierarchy.js.map +1 -1
- package/dist/adt/transport.d.ts +6 -6
- package/dist/adt/transport.d.ts.map +1 -1
- package/dist/adt/transport.js +23 -34
- package/dist/adt/transport.js.map +1 -1
- package/dist/adt/types.d.ts +94 -6
- package/dist/adt/types.d.ts.map +1 -1
- package/dist/adt/version-diff.js.map +1 -1
- package/dist/adt/xml-parser.d.ts +52 -12
- package/dist/adt/xml-parser.d.ts.map +1 -1
- package/dist/adt/xml-parser.js +120 -10
- package/dist/adt/xml-parser.js.map +1 -1
- package/dist/aff/validator.js.map +1 -1
- package/dist/authz/policy.d.ts +8 -0
- package/dist/authz/policy.d.ts.map +1 -1
- package/dist/authz/policy.js +24 -0
- package/dist/authz/policy.js.map +1 -1
- package/dist/cache/cache.d.ts +4 -36
- package/dist/cache/cache.d.ts.map +1 -1
- package/dist/cache/cache.js +4 -5
- package/dist/cache/cache.js.map +1 -1
- package/dist/cache/caching-layer.d.ts +6 -22
- package/dist/cache/caching-layer.d.ts.map +1 -1
- package/dist/cache/caching-layer.js +5 -29
- package/dist/cache/caching-layer.js.map +1 -1
- package/dist/cache/inactive-list-cache.d.ts.map +1 -1
- package/dist/cache/memory.d.ts +2 -13
- package/dist/cache/memory.d.ts.map +1 -1
- package/dist/cache/memory.js +1 -70
- package/dist/cache/memory.js.map +1 -1
- package/dist/cache/sqlite.d.ts +3 -10
- package/dist/cache/sqlite.d.ts.map +1 -1
- package/dist/cache/sqlite.js +9 -85
- package/dist/cache/sqlite.js.map +1 -1
- package/dist/cli.js +6 -3
- package/dist/cli.js.map +1 -1
- package/dist/context/compressor.js.map +1 -1
- package/dist/context/grep.js.map +1 -1
- package/dist/context/unit-surgery.d.ts +28 -0
- package/dist/context/unit-surgery.d.ts.map +1 -0
- package/dist/context/unit-surgery.js +150 -0
- package/dist/context/unit-surgery.js.map +1 -0
- package/dist/extract-sap-cookies.js.map +1 -1
- package/dist/handlers/activate.d.ts.map +1 -1
- package/dist/handlers/activate.js +44 -6
- package/dist/handlers/activate.js.map +1 -1
- package/dist/handlers/context.d.ts +1 -1
- package/dist/handlers/context.d.ts.map +1 -1
- package/dist/handlers/context.js +98 -28
- package/dist/handlers/context.js.map +1 -1
- package/dist/handlers/diagnose.d.ts.map +1 -1
- package/dist/handlers/diagnose.js +74 -31
- package/dist/handlers/diagnose.js.map +1 -1
- package/dist/handlers/dispatch.d.ts +12 -1
- package/dist/handlers/dispatch.d.ts.map +1 -1
- package/dist/handlers/dispatch.js +160 -25
- package/dist/handlers/dispatch.js.map +1 -1
- package/dist/handlers/feature-cache.d.ts +27 -14
- package/dist/handlers/feature-cache.d.ts.map +1 -1
- package/dist/handlers/feature-cache.js +63 -25
- package/dist/handlers/feature-cache.js.map +1 -1
- package/dist/handlers/function-processing.d.ts +61 -0
- package/dist/handlers/function-processing.d.ts.map +1 -0
- package/dist/handlers/function-processing.js +45 -0
- package/dist/handlers/function-processing.js.map +1 -0
- package/dist/handlers/git.d.ts.map +1 -1
- package/dist/handlers/git.js +44 -19
- package/dist/handlers/git.js.map +1 -1
- package/dist/handlers/hyperfocused.d.ts.map +1 -1
- package/dist/handlers/hyperfocused.js +2 -3
- package/dist/handlers/hyperfocused.js.map +1 -1
- package/dist/handlers/lint.d.ts.map +1 -1
- package/dist/handlers/lint.js +7 -7
- package/dist/handlers/lint.js.map +1 -1
- package/dist/handlers/manage.d.ts.map +1 -1
- package/dist/handlers/manage.js +47 -28
- package/dist/handlers/manage.js.map +1 -1
- package/dist/handlers/navigate.d.ts.map +1 -1
- package/dist/handlers/navigate.js +27 -90
- 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 +10 -0
- package/dist/handlers/object-types.js.map +1 -1
- package/dist/handlers/query-errors.d.ts +11 -0
- package/dist/handlers/query-errors.d.ts.map +1 -0
- package/dist/handlers/query-errors.js +216 -0
- package/dist/handlers/query-errors.js.map +1 -0
- package/dist/handlers/query.d.ts.map +1 -1
- package/dist/handlers/query.js +62 -67
- package/dist/handlers/query.js.map +1 -1
- package/dist/handlers/read.d.ts.map +1 -1
- package/dist/handlers/read.js +64 -41
- package/dist/handlers/read.js.map +1 -1
- package/dist/handlers/schemas.d.ts +285 -234
- package/dist/handlers/schemas.d.ts.map +1 -1
- package/dist/handlers/schemas.js +126 -32
- package/dist/handlers/schemas.js.map +1 -1
- package/dist/handlers/search.d.ts.map +1 -1
- package/dist/handlers/search.js +8 -7
- package/dist/handlers/search.js.map +1 -1
- package/dist/handlers/shared.d.ts +13 -0
- package/dist/handlers/shared.d.ts.map +1 -1
- package/dist/handlers/shared.js +15 -0
- package/dist/handlers/shared.js.map +1 -1
- package/dist/handlers/tool-descriptions.d.ts +4 -0
- package/dist/handlers/tool-descriptions.d.ts.map +1 -0
- package/dist/handlers/tool-descriptions.js +52 -0
- package/dist/handlers/tool-descriptions.js.map +1 -0
- package/dist/handlers/tool-registry.d.ts +20 -6
- package/dist/handlers/tool-registry.d.ts.map +1 -1
- package/dist/handlers/tool-registry.js +18 -0
- package/dist/handlers/tool-registry.js.map +1 -1
- package/dist/handlers/tools.d.ts.map +1 -1
- package/dist/handlers/tools.js +124 -92
- package/dist/handlers/tools.js.map +1 -1
- package/dist/handlers/transport.d.ts +1 -1
- package/dist/handlers/transport.d.ts.map +1 -1
- package/dist/handlers/transport.js +37 -10
- package/dist/handlers/transport.js.map +1 -1
- package/dist/handlers/where-used.d.ts +25 -0
- package/dist/handlers/where-used.d.ts.map +1 -0
- package/dist/handlers/where-used.js +94 -0
- package/dist/handlers/where-used.js.map +1 -0
- package/dist/handlers/write/class-surgery.d.ts.map +1 -1
- package/dist/handlers/write/class-surgery.js +11 -12
- package/dist/handlers/write/class-surgery.js.map +1 -1
- package/dist/handlers/write/create.d.ts.map +1 -1
- package/dist/handlers/write/create.js +194 -84
- package/dist/handlers/write/create.js.map +1 -1
- package/dist/handlers/write/rap.d.ts.map +1 -1
- package/dist/handlers/write/rap.js +9 -9
- package/dist/handlers/write/rap.js.map +1 -1
- package/dist/handlers/write/unit-surgery.d.ts +5 -0
- package/dist/handlers/write/unit-surgery.d.ts.map +1 -0
- package/dist/handlers/write/unit-surgery.js +47 -0
- package/dist/handlers/write/unit-surgery.js.map +1 -0
- package/dist/handlers/write/update-delete.js +8 -8
- package/dist/handlers/write/update-delete.js.map +1 -1
- package/dist/handlers/write-helpers.d.ts +7 -4
- package/dist/handlers/write-helpers.d.ts.map +1 -1
- package/dist/handlers/write-helpers.js +118 -63
- package/dist/handlers/write-helpers.js.map +1 -1
- package/dist/handlers/write.d.ts.map +1 -1
- package/dist/handlers/write.js +35 -13
- package/dist/handlers/write.js.map +1 -1
- package/dist/lint/config-builder.js.map +1 -1
- package/dist/lint/lint.d.ts.map +1 -1
- package/dist/lint/lint.js +4 -2
- package/dist/lint/lint.js.map +1 -1
- package/dist/probe/catalog.js +1 -1
- package/dist/probe/catalog.js.map +1 -1
- package/dist/public/testing.js.map +1 -1
- package/dist/public/ui/app.js +1 -14
- package/dist/registry/tool-registry.d.ts.map +1 -1
- package/dist/server/audit.d.ts +27 -15
- package/dist/server/audit.d.ts.map +1 -1
- package/dist/server/audit.js.map +1 -1
- package/dist/server/auth-rate-limit.d.ts +18 -9
- package/dist/server/auth-rate-limit.d.ts.map +1 -1
- package/dist/server/auth-rate-limit.js +31 -6
- package/dist/server/auth-rate-limit.js.map +1 -1
- package/dist/server/auth-summary.d.ts +4 -0
- package/dist/server/auth-summary.d.ts.map +1 -0
- package/dist/server/auth-summary.js +67 -0
- package/dist/server/auth-summary.js.map +1 -0
- package/dist/server/config.d.ts.map +1 -1
- package/dist/server/config.js +110 -7
- package/dist/server/config.js.map +1 -1
- package/dist/server/context.d.ts +12 -0
- package/dist/server/context.d.ts.map +1 -1
- package/dist/server/context.js.map +1 -1
- package/dist/server/destination-discovery.d.ts +36 -0
- package/dist/server/destination-discovery.d.ts.map +1 -0
- package/dist/server/destination-discovery.js +130 -0
- package/dist/server/destination-discovery.js.map +1 -0
- package/dist/server/destination-registry.d.ts +111 -0
- package/dist/server/destination-registry.d.ts.map +1 -0
- package/dist/server/destination-registry.js +449 -0
- package/dist/server/destination-registry.js.map +1 -0
- package/dist/server/http.d.ts +43 -1
- package/dist/server/http.d.ts.map +1 -1
- package/dist/server/http.js +283 -73
- package/dist/server/http.js.map +1 -1
- package/dist/server/logger.d.ts.map +1 -1
- package/dist/server/logger.js +58 -13
- package/dist/server/logger.js.map +1 -1
- package/dist/server/mcp-rate-limit.d.ts +6 -4
- package/dist/server/mcp-rate-limit.d.ts.map +1 -1
- package/dist/server/mcp-rate-limit.js +6 -4
- package/dist/server/mcp-rate-limit.js.map +1 -1
- package/dist/server/multi-target-basic-auth.d.ts +49 -0
- package/dist/server/multi-target-basic-auth.d.ts.map +1 -0
- package/dist/server/multi-target-basic-auth.js +246 -0
- package/dist/server/multi-target-basic-auth.js.map +1 -0
- package/dist/server/multi-target-catalog.d.ts +33 -0
- package/dist/server/multi-target-catalog.d.ts.map +1 -0
- package/dist/server/multi-target-catalog.js +130 -0
- package/dist/server/multi-target-catalog.js.map +1 -0
- package/dist/server/multi-target-destination-config.d.ts +12 -0
- package/dist/server/multi-target-destination-config.d.ts.map +1 -0
- package/dist/server/multi-target-destination-config.js +37 -0
- package/dist/server/multi-target-destination-config.js.map +1 -0
- package/dist/server/multi-target-destination-runtime.d.ts +20 -0
- package/dist/server/multi-target-destination-runtime.d.ts.map +1 -0
- package/dist/server/multi-target-destination-runtime.js +191 -0
- package/dist/server/multi-target-destination-runtime.js.map +1 -0
- package/dist/server/multi-target-feature-state.d.ts +6 -0
- package/dist/server/multi-target-feature-state.d.ts.map +1 -0
- package/dist/server/multi-target-feature-state.js +41 -0
- package/dist/server/multi-target-feature-state.js.map +1 -0
- package/dist/server/multi-target-identity.d.ts +10 -0
- package/dist/server/multi-target-identity.d.ts.map +1 -0
- package/dist/server/multi-target-identity.js +18 -0
- package/dist/server/multi-target-identity.js.map +1 -0
- package/dist/server/multi-target-runtime.d.ts +27 -0
- package/dist/server/multi-target-runtime.d.ts.map +1 -0
- package/dist/server/multi-target-runtime.js +110 -0
- package/dist/server/multi-target-runtime.js.map +1 -0
- package/dist/server/multi-target-server.d.ts +53 -0
- package/dist/server/multi-target-server.d.ts.map +1 -0
- package/dist/server/multi-target-server.js +434 -0
- package/dist/server/multi-target-server.js.map +1 -0
- package/dist/server/multi-target-shared-auth-state.d.ts +82 -0
- package/dist/server/multi-target-shared-auth-state.d.ts.map +1 -0
- package/dist/server/multi-target-shared-auth-state.js +226 -0
- package/dist/server/multi-target-shared-auth-state.js.map +1 -0
- package/dist/server/multi-target-tools.d.ts +20 -0
- package/dist/server/multi-target-tools.d.ts.map +1 -0
- package/dist/server/multi-target-tools.js +191 -0
- package/dist/server/multi-target-tools.js.map +1 -0
- package/dist/server/oauth-session-recovery.d.ts +22 -0
- package/dist/server/oauth-session-recovery.d.ts.map +1 -0
- package/dist/server/oauth-session-recovery.js +69 -0
- package/dist/server/oauth-session-recovery.js.map +1 -0
- package/dist/server/server.d.ts +47 -25
- package/dist/server/server.d.ts.map +1 -1
- package/dist/server/server.js +490 -301
- package/dist/server/server.js.map +1 -1
- package/dist/server/sinks/btp-auditlog.d.ts.map +1 -1
- package/dist/server/sinks/btp-auditlog.js +83 -11
- package/dist/server/sinks/btp-auditlog.js.map +1 -1
- package/dist/server/sinks/file.d.ts.map +1 -1
- package/dist/server/sinks/file.js.map +1 -1
- package/dist/server/sinks/stderr.d.ts.map +1 -1
- package/dist/server/sinks/stderr.js.map +1 -1
- package/dist/server/tool-auth.d.ts +10 -0
- package/dist/server/tool-auth.d.ts.map +1 -0
- package/dist/server/tool-auth.js +75 -0
- package/dist/server/tool-auth.js.map +1 -0
- package/dist/server/trace-context.d.ts +51 -0
- package/dist/server/trace-context.d.ts.map +1 -0
- package/dist/server/trace-context.js +100 -0
- package/dist/server/trace-context.js.map +1 -0
- package/dist/server/types.d.ts +28 -7
- package/dist/server/types.d.ts.map +1 -1
- package/dist/server/types.js +5 -2
- package/dist/server/types.js.map +1 -1
- package/dist/server/ui-log-buffer.d.ts.map +1 -1
- package/dist/server/ui-log-buffer.js.map +1 -1
- package/dist/server/ui-state.d.ts +0 -2
- package/dist/server/ui-state.d.ts.map +1 -1
- package/dist/server/ui-state.js +2 -6
- package/dist/server/ui-state.js.map +1 -1
- package/dist/server/ui.d.ts.map +1 -1
- package/dist/server/ui.js +8 -9
- package/dist/server/ui.js.map +1 -1
- package/package.json +21 -18
- package/dist/cache/warmup.d.ts +0 -41
- package/dist/cache/warmup.d.ts.map +0 -1
- package/dist/cache/warmup.js +0 -337
- package/dist/cache/warmup.js.map +0 -1
- package/dist/server/elicit.d.ts +0 -43
- package/dist/server/elicit.d.ts.map +0 -1
- package/dist/server/elicit.js +0 -183
- package/dist/server/elicit.js.map +0 -1
package/dist/handlers/tools.js
CHANGED
|
@@ -17,9 +17,11 @@
|
|
|
17
17
|
* - On-premise: full tool set with all types and descriptions
|
|
18
18
|
*/
|
|
19
19
|
import { MAX_GREP_PATTERN_LENGTH } from '../context/grep.js';
|
|
20
|
+
import * as FuncProcessing from './function-processing.js';
|
|
20
21
|
import { getHyperfocusedToolDefinition } from './hyperfocused.js';
|
|
21
22
|
import { CLASS_WRITE_INCLUDES } from './object-types.js';
|
|
22
|
-
import {
|
|
23
|
+
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';
|
|
23
25
|
/**
|
|
24
26
|
* Read-only / destructive hints for the 12 standard tools. Clients use them to badge tools
|
|
25
27
|
* and to decide auto-approval (read-only tools are safe to auto-run); they are also required
|
|
@@ -54,11 +56,8 @@ const TOOL_ANNOTATIONS = {
|
|
|
54
56
|
function isBtpMode(config) {
|
|
55
57
|
return config.systemType === 'btp';
|
|
56
58
|
}
|
|
57
|
-
// ─── SAPRead Types ──────────────────────────────────────────────────
|
|
58
|
-
/** All SAPRead types available on on-premise */
|
|
59
|
-
/** SAPRead types available on BTP ABAP Environment (no PROG, INCL, VIEW, TEXT_ELEMENTS, VARIANTS) */
|
|
60
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). ' +
|
|
61
|
-
'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), 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. ' +
|
|
60
|
+
'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. ' +
|
|
62
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. ' +
|
|
63
62
|
'Optional grep: case-insensitive regex returning only matching source lines (+context, line numbers); for CLAS, matches are annotated with the owning class/method. ' +
|
|
64
63
|
'Optional version parameter (default "active"): "inactive" reads the user\'s draft, "auto" the developer view. Active reads note when an inactive draft exists.';
|
|
@@ -67,45 +66,13 @@ const SAPREAD_DESC_BTP = 'Read SAP ABAP objects (BTP ABAP Environment) — exact
|
|
|
67
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. ' +
|
|
68
67
|
'Optional grep: case-insensitive regex returning only matching source lines (+context, line numbers); for CLAS, matches are annotated with the owning class/method. ' +
|
|
69
68
|
'Optional version parameter (default "active"): "inactive" reads the user\'s draft, "auto" the developer view.';
|
|
70
|
-
// ─── SAPWrite Types ─────────────────────────────────────────────────
|
|
71
|
-
const SAPWRITE_DESC_ONPREM = 'Create or update ABAP source code and DDIC metadata. Handles lock/modify/unlock automatically. Supports PROG, CLAS, INTF, FUNC, FUGR, INCL, DDLS, DCLS, DDLX, BDEF, SRVD, SRVB, SKTD/KTD, TABL, TABL/DT, TABL/DS, DOMA, DTEL, MSAG. ' +
|
|
72
|
-
'Type codes are auto-normalized and case-insensitive (e.g., "CLAS/OC" → "CLAS"). For delete, only type and name are required (plus optional transport). ' +
|
|
73
|
-
'Source objects (PROG/CLAS/INTF/DDLS/DCLS/DDLX/BDEF/SRVD/TABL/INCL) write via /source/main. CLAS update: pass include=definitions|implementations|macros|testclasses to write a local include; omit for source/main. ' +
|
|
74
|
-
'TABL create: "TABL"/"TABL/DT" → transparent table (16-char name); "TABL/DS" → structure (30-char, namespaces OK); update/delete/activate auto-discover the subtype. ' +
|
|
75
|
-
'Metadata-XML writes (not /source/main): DOMA/DTEL (dataType, length, fixedValues, typeKind, labels, searchHelp); MSAG (messages array of {number, shortText}); SRVB (serviceDefinition, odataVersion V2/V4, optional category 0=UI/1=Web API; bindingType like "ODataV4-UI" auto-normalized). ' +
|
|
76
|
-
'SKTD/KTD (Markdown docs on a KTD-capable object; KTD aliases SKTD): create needs refObjectType (parent type+subtype, e.g. "DDLS/DF"); "name" MUST equal the parent name; update takes Markdown in source; then SAPActivate(type="SKTD"). ' +
|
|
77
|
-
'FUNC: require "group" (parent FUGR must exist — create it first); pass structured `parameters` for the signature (read back via SAPRead includeSignature=true). ' +
|
|
78
|
-
'edit_method: replace one CLAS method body via source (95% fewer tokens than full-class). Local-class methods use the qualified specifier (e.g. "lhc_project~approve_project"); auto-routing: lhc_*/lcl_* → implementations, ltc_* → testclasses (override with include=); zif_*~* stays on /source/main. ' +
|
|
79
|
-
'batch_create: create+activate multiple objects in dependency order via the "objects" array (RAP stacks TABL→DDLS→DCLS→BDEF→SRVD). scaffold_rap_handlers / generate_behavior_implementation: derive RAP behavior-pool handlers from the BDEF (the latter auto-discovers the BDEF via rootEntityRef and activates by default). ' +
|
|
80
|
-
'Server-driven objects (SAP_BASIS 8.16+, discovery-gated): DESD, DTSC, CSNM, EVTB, EVTO, COTA — create/update/delete with AFF JSON in "source", then SAPActivate; pre-8.16 returns a clean "requires 8.16+" error. ' +
|
|
81
|
-
'edit_text_symbols (type=CLAS): write a global class\'s text symbols. Pass the body in "source" as per-symbol "@MaxLength:NN\\n{NNN}={text}\\n" (blank-line separated); immediately active, no SAPActivate. Read it back via SAPRead(type=CLAS, include=text_symbols). Requires the ADT textelements service (absent on NW 7.50). ' +
|
|
82
|
-
'Full per-type field reference: docs_page SAPWrite. ';
|
|
83
|
-
const SAPWRITE_DESC_BTP = 'Create or update ABAP source code and DDIC metadata (BTP ABAP Environment). Handles lock/modify/unlock automatically. Supports CLAS, INTF, DDLS, DCLS, DDLX, BDEF, SRVD, SRVB, SKTD/KTD, TABL, TABL/DT, TABL/DS, DOMA, DTEL, MSAG. ' +
|
|
84
|
-
'Must use ABAP Cloud language version (no classic statements); only Z*/Y* namespace. Type codes are auto-normalized (e.g. "CLAS/OC" → "CLAS"). For delete, only type and name are required (plus optional transport). ' +
|
|
85
|
-
'Source objects (CLAS/INTF/DDLS/DCLS/DDLX/BDEF/SRVD/TABL) write via /source/main. CLAS update: pass include=definitions|implementations|macros|testclasses for a local include; omit for source/main. ' +
|
|
86
|
-
'Metadata-XML writes (not /source/main): DOMA/DTEL (dataType, length, fixedValues, typeKind, labels, searchHelp); MSAG (messages array of {number, shortText}); SRVB (serviceDefinition, odataVersion V2/V4, optional category 0=UI/1=Web API). ' +
|
|
87
|
-
'SKTD/KTD (Markdown docs on a KTD-capable object; KTD aliases SKTD): create needs refObjectType (e.g. "DDLS/DF"); "name" MUST equal the parent name; update takes Markdown in source; then SAPActivate(type="SKTD"). ' +
|
|
88
|
-
'edit_method: replace one CLAS method body via source. Local-class methods use the qualified specifier (e.g. "lhc_project~approve_project"); auto-routing lhc_*/lcl_* → implementations, ltc_* → testclasses (override with include=). ' +
|
|
89
|
-
'batch_create: create+activate multiple objects in dependency order (RAP stacks TABL→DDLS→DCLS→BDEF→SRVD). scaffold_rap_handlers / generate_behavior_implementation: derive RAP behavior-pool handlers from the BDEF (the latter auto-discovers via rootEntityRef and activates by default). ' +
|
|
90
|
-
'Server-driven objects (8.16+, discovery-gated): DESD, DTSC, CSNM, EVTB, EVTO, COTA — create/update/delete with AFF JSON in "source", then SAPActivate; pre-8.16 returns a clean "requires 8.16+" error. ' +
|
|
91
|
-
'Full per-type field reference: docs_page SAPWrite. ';
|
|
92
|
-
// Prepended to both SAPWrite descriptions. The schema lists every optional field for every
|
|
93
|
-
// object type/action, but each call uses only a small subset — GPT/OpenAI callers tend to
|
|
94
|
-
// fill the rest with empty/null/placeholder values. This steers the model to a minimal first
|
|
95
|
-
// payload (issue #360 follow-up; the server also strips the noise at runtime as a backstop).
|
|
96
|
-
const SAPWRITE_MINIMAL_PAYLOAD_GUIDE = 'MINIMAL PAYLOAD — send ONLY the fields your action+type needs; do NOT add unrelated optional fields. ' +
|
|
97
|
-
'Sending empty strings, null, or placeholder values for fields that do not apply to your object type ' +
|
|
98
|
-
'(e.g. typeKind/odataVersion/length/signExists on a CDS or class write) just adds noise — omit them entirely. ' +
|
|
99
|
-
'Typical field sets: a source object (CLAS, INTF, DDLS, DCLS, DDLX, BDEF, SRVD, TABL — plus PROG, INCL, FUNC on-prem) needs only {action, type, name, source}; ' +
|
|
100
|
-
"delete needs only {action, type, name}; DOMA/DTEL/MSAG/SRVB need {action, type, name} plus that type's own DDIC fields; FUNC also needs group. " +
|
|
101
|
-
'Do NOT send `include` unless type=CLAS, and do NOT send DDIC/metadata fields (dataType, length, decimals, signExists, lowercase, typeKind, domainName, odataVersion, category, version, labels, …) on a source-object or delete call. ';
|
|
102
69
|
// ─── SAPContext Types ───────────────────────────────────────────────
|
|
103
70
|
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' +
|
|
104
71
|
"Decision rule — pick the action from the user's question:\n" +
|
|
105
72
|
'- "What breaks if I change <CDS>?" / "Who consumes <I_*>?" / "Blast radius" → action="impact" (DDLS only).\n' +
|
|
106
73
|
'- "Which includes/appends extend <TABL>?" → action="structure", type="TABL".\n' +
|
|
107
74
|
'- "What does <object> do?" / "Explain" / "deps before editing" → action="deps" (default).\n' +
|
|
108
|
-
'- "Find all callers of <object>"
|
|
75
|
+
'- "Find all callers of <object>" → action="usages" (live SAP where-used lookup).\n\n' +
|
|
109
76
|
'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' +
|
|
110
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' +
|
|
111
78
|
'structure (TABL only): the DDIC include/append tree.\n\n' +
|
|
@@ -115,15 +82,18 @@ const SAPCONTEXT_DESC_BTP = 'Primary tool for understanding ABAP/CDS objects bef
|
|
|
115
82
|
'- "What breaks if I change <CDS>?" / "Who consumes <I_*>?" / "Blast radius" → action="impact" (DDLS only).\n' +
|
|
116
83
|
'- "Which includes/appends extend <TABL>?" → action="structure", type="TABL".\n' +
|
|
117
84
|
'- "What does <object> do?" / "Explain" / "deps before editing" → action="deps" (default).\n\n' +
|
|
85
|
+
'- "Find all callers of <object>" → action="usages" (live SAP where-used lookup).\n\n' +
|
|
118
86
|
'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' +
|
|
119
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' +
|
|
120
88
|
'structure (TABL only): the DDIC include/append tree.\n\n' +
|
|
121
89
|
'Use SAPContext BEFORE editing existing objects; SAPRead afterwards for exact source. Full detail: docs_page SAPContext.';
|
|
122
90
|
// ─── 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. ';
|
|
123
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. ' +
|
|
124
|
-
|
|
93
|
+
SAPQUERY_DIALECT_GUIDE +
|
|
125
94
|
'To find CDS consumers do NOT text-scan DDDDLSRC/ACMDCLSRC/DDLXSRC_SRC — use SAPContext(action="impact", type="DDLS") (where-used index, filtered buckets).';
|
|
126
95
|
const SAPQUERY_DESC_BTP = 'Execute ABAP SQL queries (BTP ABAP Environment). Returns structured data with column names and rows. ' +
|
|
96
|
+
SAPQUERY_DIALECT_GUIDE +
|
|
127
97
|
'IMPORTANT: On BTP, only custom Z/Y tables and released CDS entities can be queried. ' +
|
|
128
98
|
'SAP standard tables (MARA, VBAK, DD02L, DD03L, TADIR, etc.) are blocked. ' +
|
|
129
99
|
'Use released CDS views instead: I_LANGUAGE, I_COUNTRY, I_CURRENCY, I_UnitOfMeasure, etc. ' +
|
|
@@ -156,7 +126,7 @@ const SAPMANAGE_DESC_ONPREM = 'Probe and report SAP system capabilities. Use BEF
|
|
|
156
126
|
'Actions:\n' +
|
|
157
127
|
'- "features": cached feature status (fast, no round-trip; id, available, mode, probedAt). "probe": re-probe now (feature probes + auth + discovery refresh). "cache_stats": object cache health.\n' +
|
|
158
128
|
'- "create_package" / "delete_package" / "change_package": DEVC lifecycle via ADT packages API.\n' +
|
|
159
|
-
'- FLP read: flp_list_catalogs, flp_list_groups, flp_list_tiles (catalogId). FLP write: flp_create_catalog, flp_create_group, flp_create_tile, flp_add_tile_to_group, flp_delete_catalog.\n' +
|
|
129
|
+
'- FLP read: flp_list_catalogs, flp_list_groups, flp_list_tiles (catalogId). FLP write: flp_create_catalog, flp_create_group, flp_create_tile, flp_add_tile_to_group, flp_delete_catalog. Classic designer tile/target-mapping model, deprecated since S/4HANA 2023; Work Zone exposure v2 needs LADIs (SAPRead type=UIAD).\n' +
|
|
160
130
|
'- "set_api_state": release/revoke an object\'s API release contract (objectUri, or name+objectType; apiState defaults RELEASED, contract defaults C1 — C0 for SRVD, C3 for classic views). Write counterpart of SAPRead(type="API_STATE").\n\n' +
|
|
161
131
|
'Returns features + systemType ("onprem"/"btp"); "available: false" means do NOT attempt dependent operations.';
|
|
162
132
|
const SAPMANAGE_DESC_BTP = 'Probe and report SAP system capabilities (BTP ABAP Environment). ' +
|
|
@@ -164,10 +134,10 @@ const SAPMANAGE_DESC_BTP = 'Probe and report SAP system capabilities (BTP ABAP E
|
|
|
164
134
|
'Actions:\n' +
|
|
165
135
|
'- "features": Get cached feature status from last probe.\n' +
|
|
166
136
|
'- "probe": Re-probe the SAP system now (feature probes + discovery refresh).\n' +
|
|
167
|
-
'- "cache_stats": Show object cache health
|
|
137
|
+
'- "cache_stats": Show request-driven object cache health.\n' +
|
|
168
138
|
'- "create_package": Create a package (DEVC) via ADT packages API.\n' +
|
|
169
139
|
'- "delete_package": Delete an existing package.\n' +
|
|
170
|
-
'- FLP actions: flp_list_catalogs, flp_list_groups, flp_list_tiles, flp_create_catalog, flp_create_group, flp_create_tile, flp_add_tile_to_group, flp_delete_catalog.\n' +
|
|
140
|
+
'- FLP actions: flp_list_catalogs, flp_list_groups, flp_list_tiles, flp_create_catalog, flp_create_group, flp_create_tile, flp_add_tile_to_group, flp_delete_catalog. Classic designer model, deprecated since S/4HANA 2023 (successor: SAPRead type=UIAD).\n' +
|
|
171
141
|
'- "set_api_state": Release (or revoke) an object\'s API release contract for ABAP Cloud / Clean Core ' +
|
|
172
142
|
'(requires "objectUri", or "name" + "objectType"; "apiState" defaults to RELEASED, "contract" defaults to C1 — pass C0 for SRVD, C3 for classic views). The write counterpart of SAPRead(type="API_STATE").\n\n' +
|
|
173
143
|
'Returns JSON with features and systemType="btp". On BTP, RAP/CDS and transports are always available. ' +
|
|
@@ -336,11 +306,18 @@ function makeOptionalPropertiesNullable(node) {
|
|
|
336
306
|
return result;
|
|
337
307
|
}
|
|
338
308
|
// ─── Main Tool Definitions ──────────────────────────────────────────
|
|
309
|
+
/** Advertise the strictness the runtime enforces — the Zod schemas are `.strict()`, and JSON Schema means
|
|
310
|
+
* the opposite when absent. Every return path goes through here. TOP-LEVEL ONLY: nested `objects[]`
|
|
311
|
+
* items stay lenient, matching `.strict()`, which does not cascade (batch_create; #360). */
|
|
312
|
+
function withStrictSchemas(tools) {
|
|
313
|
+
for (const tool of tools)
|
|
314
|
+
tool.inputSchema.additionalProperties = false;
|
|
315
|
+
return tools;
|
|
316
|
+
}
|
|
339
317
|
export function getToolDefinitions(config, textSearchAvailable, resolvedFeatures, options = {}) {
|
|
340
|
-
// Hyperfocused mode: single universal SAP tool (~200 tokens)
|
|
341
|
-
if (config.toolMode === 'hyperfocused')
|
|
342
|
-
return [getHyperfocusedToolDefinition(config, resolvedFeatures)];
|
|
343
|
-
}
|
|
318
|
+
// Hyperfocused mode: single universal SAP tool (~200 tokens).
|
|
319
|
+
if (config.toolMode === 'hyperfocused')
|
|
320
|
+
return withStrictSchemas([getHyperfocusedToolDefinition(config, resolvedFeatures)]);
|
|
344
321
|
const btp = isBtpMode(config);
|
|
345
322
|
const tools = [
|
|
346
323
|
{
|
|
@@ -353,8 +330,8 @@ export function getToolDefinitions(config, textSearchAvailable, resolvedFeatures
|
|
|
353
330
|
type: 'string',
|
|
354
331
|
enum: btp ? SAPREAD_TYPES_BTP : SAPREAD_TYPES_ONPREM,
|
|
355
332
|
description: btp
|
|
356
|
-
? 'Object type to read (BTP): CLAS, INTF, FUNC, FUGR, DDLS, DCLS, DDLX, BDEF, SRVD, SRVB, SKTD or KTD (Knowledge Transfer Documents), TABL (transparent tables and DDIC structures), DOMA, DTEL, MSAG, TABLE_CONTENTS, TABLE_QUERY, DEVC, SYSTEM, COMPONENTS, BSP, BSP_DEPLOY, API_STATE, INACTIVE_OBJECTS. Server-driven objects (
|
|
357
|
-
: 'Object type to read (on-prem): PROG, CLAS, INTF, FUNC, FUGR, INCL, DDLS, DCLS, DDLX, BDEF, SRVD, SRVB, SKTD or KTD (Knowledge Transfer Documents), TABL (transparent tables and DDIC structures), VIEW, DOMA, DTEL, MSAG, TRAN, TABLE_CONTENTS, TABLE_QUERY, DEVC, SOBJ, SYSTEM, COMPONENTS, TEXT_ELEMENTS, VARIANTS, BSP, BSP_DEPLOY, API_STATE, INACTIVE_OBJECTS, AUTH, FEATURE_TOGGLE, ENHO, VERSIONS, VERSION_SOURCE. Server-driven objects (
|
|
333
|
+
? 'Object type to read (BTP): CLAS, INTF, FUNC, FUGR, DDLS, DCLS, DDLX, BDEF, SRVD, SRVB, SKTD or KTD (Knowledge Transfer Documents), TABL (transparent tables and DDIC structures), DOMA, DTEL, MSAG, TABLE_CONTENTS, TABLE_QUERY, DEVC, SYSTEM, COMPONENTS, BSP, BSP_DEPLOY, API_STATE, INACTIVE_OBJECTS. Server-driven objects (discovery-gated; XML metadata; source is AFF JSON, or DDL text for DTSC/DSFD/DTDC): DESD (Logical External Schema), EVTB (RAP Event Binding), EVTO (RAP Event Object), DTSC (Static Cache), CSNM (CSN Model), COTA (Communication Target), DSFD (Scalar Function Def), DTDC (Dynamic Cache), UIAD (Launchpad App Descriptor Item). Deprecated alias: MESSAGES (use MSAG).'
|
|
334
|
+
: 'Object type to read (on-prem): PROG, CLAS, INTF, FUNC, FUGR, INCL, DDLS, DCLS, DDLX, BDEF, SRVD, SRVB, SKTD or KTD (Knowledge Transfer Documents), TABL (transparent tables and DDIC structures), TTYP, VIEW, DOMA, DTEL, MSAG, TRAN, TABLE_CONTENTS, TABLE_QUERY, DEVC, SOBJ, SYSTEM, COMPONENTS, TEXT_ELEMENTS, VARIANTS, BSP, BSP_DEPLOY, API_STATE, INACTIVE_OBJECTS, AUTH, FEATURE_TOGGLE, ENHO, VERSIONS, VERSION_SOURCE. Server-driven objects (discovery-gated; XML metadata; source is AFF JSON, or DDL text for DTSC/DSFD/DTDC): DESD (Logical External Schema), EVTB (RAP Event Binding), EVTO (RAP Event Object), DTSC (Static Cache), CSNM (CSN Model), COTA (Communication Target), DSFD (Scalar Function Def), DTDC (Dynamic Cache), UIAD (Launchpad App Descriptor Item). Deprecated aliases: MESSAGES (use MSAG), FTG2 (use FEATURE_TOGGLE).',
|
|
358
335
|
},
|
|
359
336
|
name: { type: 'string', description: 'Object name (e.g., ZTEST_PROGRAM, ZCL_ORDER, MARA)' },
|
|
360
337
|
action: {
|
|
@@ -380,8 +357,8 @@ export function getToolDefinitions(config, textSearchAvailable, resolvedFeatures
|
|
|
380
357
|
},
|
|
381
358
|
include: {
|
|
382
359
|
type: 'string',
|
|
383
|
-
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.
|
|
384
|
-
'For DDLS: use include="elements"
|
|
360
|
+
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. ' +
|
|
361
|
+
'For DDLS: use include="elements" for the CDS field catalog (key fields, aliases, associations, expression types) instead of raw DDL. ' +
|
|
385
362
|
'For VERSIONS (CLAS): include selects the class include history to query (main, definitions, implementations, macros, testclasses).',
|
|
386
363
|
},
|
|
387
364
|
group: {
|
|
@@ -415,7 +392,7 @@ export function getToolDefinitions(config, textSearchAvailable, resolvedFeatures
|
|
|
415
392
|
format: {
|
|
416
393
|
type: 'string',
|
|
417
394
|
enum: ['text', 'structured'],
|
|
418
|
-
description: 'Output format. "text" (default): raw source
|
|
395
|
+
description: 'Output format. "text" (default): raw source. "structured" (CLAS only): JSON metadata + EVERY class include (main, testclasses, definitions, implementations, macros) — 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=.',
|
|
419
396
|
},
|
|
420
397
|
version: {
|
|
421
398
|
type: 'string',
|
|
@@ -424,7 +401,7 @@ export function getToolDefinitions(config, textSearchAvailable, resolvedFeatures
|
|
|
424
401
|
},
|
|
425
402
|
includeSignature: {
|
|
426
403
|
type: 'boolean',
|
|
427
|
-
description: 'For FUNC type only. When true, response is JSON: {source, signature: {importing[], exporting[], changing[], tables[], exceptions[], raising[]}} — each parameter parsed into {kind, name, type, byValue?, default?, optional?}. Default false (returns plain source body).
|
|
404
|
+
description: 'For FUNC type only. When true, response is JSON: {source, signature: {importing[], exporting[], changing[], tables[], exceptions[], raising[]}, processingType?, updateTaskKind?} — each parameter parsed into {kind, name, type, byValue?, default?, optional?}; processingType reports rfc/update/normal. Default false (returns plain source body).',
|
|
428
405
|
},
|
|
429
406
|
force_refresh: {
|
|
430
407
|
type: 'boolean',
|
|
@@ -479,7 +456,7 @@ export function getToolDefinitions(config, textSearchAvailable, resolvedFeatures
|
|
|
479
456
|
];
|
|
480
457
|
// Write tools — only registered when writes are enabled
|
|
481
458
|
if (config.allowWrites) {
|
|
482
|
-
let sapWriteDesc =
|
|
459
|
+
let sapWriteDesc = btp ? SAPWRITE_DESC_BTP : SAPWRITE_DESC_ONPREM;
|
|
483
460
|
// Append package restriction info so the LLM knows its boundaries
|
|
484
461
|
if (config.allowedPackages.length > 0) {
|
|
485
462
|
const pkgList = config.allowedPackages.join(', ');
|
|
@@ -500,6 +477,7 @@ export function getToolDefinitions(config, textSearchAvailable, resolvedFeatures
|
|
|
500
477
|
'update',
|
|
501
478
|
'delete',
|
|
502
479
|
'edit_method',
|
|
480
|
+
...(btp ? [] : ['edit_unit']),
|
|
503
481
|
'edit_class_definition',
|
|
504
482
|
'add_method',
|
|
505
483
|
'edit_method_signature',
|
|
@@ -512,22 +490,40 @@ export function getToolDefinitions(config, textSearchAvailable, resolvedFeatures
|
|
|
512
490
|
// of the BTP action enum so the zod↔json-schema parity check stays green.
|
|
513
491
|
...(btp ? [] : ['edit_text_symbols']),
|
|
514
492
|
],
|
|
515
|
-
|
|
493
|
+
// This is where an LLM decides WHICH action to use, so every action gets a line —
|
|
494
|
+
// especially the destructive and refusing ones, whose behaviour is not guessable.
|
|
495
|
+
description: 'Write action. create/update/delete: whole-object writes (update replaces /source/main, or one class-local include when include= is set). ' +
|
|
496
|
+
'edit_method: replace a single method body — the token-cheap path for class edits. ' +
|
|
497
|
+
(btp ? '' : 'edit_unit: replace one FORM or MODULE block inside a PROG/INCL. ') +
|
|
498
|
+
'batch_create: create and activate many objects in one call; order is preserved, so list dependencies first. ' +
|
|
499
|
+
'Class surgery (CLAS, all on /source/main unless noted): edit_class_definition replaces the global DEFINITION block — or a class-local include when include= is set — and refuses a diff that would leave the class non-activatable; ' +
|
|
500
|
+
'add_method inserts a METHODS clause plus an empty IMPL stub (abstract=true skips the stub); ' +
|
|
501
|
+
'edit_method_signature rewrites one METHODS clause and leaves the body alone; ' +
|
|
502
|
+
'change_method_visibility moves a method to another section and preserves its body; ' +
|
|
503
|
+
'delete_method is destructive — it discards the body, so to re-section a method use change_method_visibility, never delete+add. ' +
|
|
504
|
+
'scaffold_rap_handlers / generate_behavior_implementation: derive behavior-pool handlers from a BDEF (the latter is the equivalent of Eclipse\'s "Generate Behavior Implementation").' +
|
|
505
|
+
(btp
|
|
506
|
+
? ''
|
|
507
|
+
: " edit_text_symbols: write a global class's text symbols (immediately active, no SAPActivate)."),
|
|
516
508
|
},
|
|
517
509
|
type: {
|
|
518
510
|
type: 'string',
|
|
519
511
|
enum: btp ? SAPWRITE_TYPES_BTP : SAPWRITE_TYPES_ONPREM,
|
|
520
512
|
description: btp
|
|
521
|
-
? '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 (
|
|
522
|
-
: 'Object type (for create/update/delete/edit_method/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
|
|
513
|
+
? '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.'
|
|
514
|
+
: '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.',
|
|
523
515
|
},
|
|
524
516
|
name: {
|
|
525
517
|
type: 'string',
|
|
526
|
-
description:
|
|
518
|
+
description: btp
|
|
519
|
+
? 'Object name (for create/update/delete/edit_method/edit_class_definition/add_method/edit_method_signature/delete_method/change_method_visibility).'
|
|
520
|
+
: 'Object name (for create/update/delete/edit_method/edit_unit/edit_class_definition/add_method/edit_method_signature/delete_method/change_method_visibility).',
|
|
527
521
|
},
|
|
528
522
|
source: {
|
|
529
523
|
type: 'string',
|
|
530
|
-
description:
|
|
524
|
+
description: btp
|
|
525
|
+
? '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`).'
|
|
526
|
+
: '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`).',
|
|
531
527
|
},
|
|
532
528
|
include: {
|
|
533
529
|
type: 'string',
|
|
@@ -538,6 +534,14 @@ export function getToolDefinitions(config, textSearchAvailable, resolvedFeatures
|
|
|
538
534
|
type: 'string',
|
|
539
535
|
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.',
|
|
540
536
|
},
|
|
537
|
+
...(btp
|
|
538
|
+
? {}
|
|
539
|
+
: {
|
|
540
|
+
unit: {
|
|
541
|
+
type: 'string',
|
|
542
|
+
description: 'edit_unit FORM/MODULE name in a PROG or INCL (case-insensitive).',
|
|
543
|
+
},
|
|
544
|
+
}),
|
|
541
545
|
visibility: {
|
|
542
546
|
type: 'string',
|
|
543
547
|
enum: ['public', 'protected', 'private'],
|
|
@@ -587,6 +591,7 @@ export function getToolDefinitions(config, textSearchAvailable, resolvedFeatures
|
|
|
587
591
|
type: 'string',
|
|
588
592
|
description: 'For FUNC: parent function-group name. Required for FUNC create (the FUGR must already exist — create it first via SAPWrite type=FUGR). Auto-resolved via search for FUNC update/delete if omitted.',
|
|
589
593
|
},
|
|
594
|
+
...(btp ? {} : FuncProcessing.FUNCTION_PROCESSING_TOOL_PROPERTIES),
|
|
590
595
|
dataType: { type: 'string', description: 'DOMA/DTEL: ABAP data type (e.g., CHAR, NUMC, DEC)' },
|
|
591
596
|
rowType: {
|
|
592
597
|
type: 'string',
|
|
@@ -735,6 +740,7 @@ export function getToolDefinitions(config, textSearchAvailable, resolvedFeatures
|
|
|
735
740
|
type: 'string',
|
|
736
741
|
description: 'Object-specific transport request. Overrides top-level transport for this item.',
|
|
737
742
|
},
|
|
743
|
+
...(btp ? {} : FuncProcessing.FUNCTION_MODULE_BATCH_TOOL_PROPERTIES),
|
|
738
744
|
// DDIC metadata fields (DOMA/DTEL/TTYP/MSAG/SRVB) mirror the top-level SAPWrite
|
|
739
745
|
// params 1:1 — descriptions omitted here to keep the tools/list payload small (#520).
|
|
740
746
|
dataType: { type: 'string' },
|
|
@@ -810,6 +816,10 @@ export function getToolDefinitions(config, textSearchAvailable, resolvedFeatures
|
|
|
810
816
|
},
|
|
811
817
|
name: { type: 'string', description: 'Object name (for single activation or publish/unpublish)' },
|
|
812
818
|
type: { type: 'string', description: 'Object type (PROG, CLAS, DDLS, DDLX, BDEF, SRVD, SRVB, etc.)' },
|
|
819
|
+
group: {
|
|
820
|
+
type: 'string',
|
|
821
|
+
description: 'Parent FUGR for FUNC or structural INCL.',
|
|
822
|
+
},
|
|
813
823
|
version: { type: 'string', description: 'Service version for publish/unpublish (default: "0001")' },
|
|
814
824
|
service_type: {
|
|
815
825
|
type: 'string',
|
|
@@ -827,10 +837,11 @@ export function getToolDefinitions(config, textSearchAvailable, resolvedFeatures
|
|
|
827
837
|
properties: {
|
|
828
838
|
type: { type: 'string', description: 'Object type' },
|
|
829
839
|
name: { type: 'string', description: 'Object name' },
|
|
840
|
+
group: { type: 'string' },
|
|
830
841
|
},
|
|
831
842
|
required: ['type', 'name'],
|
|
832
843
|
},
|
|
833
|
-
description: 'Batch
|
|
844
|
+
description: 'Batch items; use for 2+ objects.',
|
|
834
845
|
},
|
|
835
846
|
},
|
|
836
847
|
},
|
|
@@ -860,7 +871,11 @@ export function getToolDefinitions(config, textSearchAvailable, resolvedFeatures
|
|
|
860
871
|
name: { type: 'string', description: 'Object name — alternative to uri for references.' },
|
|
861
872
|
objectType: {
|
|
862
873
|
type: 'string',
|
|
863
|
-
description: '
|
|
874
|
+
description: 'references: keep only results of this ADT type, slash format (CLAS/OC, PROG/P, FUGR/FF). A bare prefix ("CLAS") matches every subtype.',
|
|
875
|
+
},
|
|
876
|
+
maxResults: {
|
|
877
|
+
type: 'number',
|
|
878
|
+
description: 'references: max entries (default 100, max 1000). "total" counts every match of the filter.',
|
|
864
879
|
},
|
|
865
880
|
line: { type: 'number', description: 'Line number (1-based)' },
|
|
866
881
|
column: { type: 'number', description: 'Column number (1-based)' },
|
|
@@ -927,18 +942,19 @@ export function getToolDefinitions(config, textSearchAvailable, resolvedFeatures
|
|
|
927
942
|
description: 'Run diagnostics on ABAP objects and analyze runtime errors. Actions:\n' +
|
|
928
943
|
'- "syntax": syntax-check (name+type; optional version; optional source = pre-write dry-run, nothing written).\n' +
|
|
929
944
|
'- "unittest": run ABAP Unit tests (name+type).\n' +
|
|
930
|
-
'- "atc": run ATC checks (name+type; optional variant).\n' +
|
|
945
|
+
'- "atc": run ATC checks (name+type; optional variant). "atc_variants": list variants + the system default (variant = name filter; read-only).\n' +
|
|
931
946
|
'- "cds_testcases": SAP-suggested ABAP Unit test cases for a CDS entity (name; read-only; SAP_BASIS 8.16+).\n' +
|
|
932
|
-
'- "object_state": compare active
|
|
947
|
+
'- "object_state": compare active vs inactive source versions (name+type; CLAS compares all includes). Returns ETags/hashes/divergence flags.\n' +
|
|
933
948
|
'- "quickfix": get quick-fix proposals at a position (name+type+source+line; optional column, sourceUri).\n' +
|
|
934
|
-
'- "apply_quickfix": apply one proposal, return text deltas, no write (name+type+source+line+proposalUri+proposalUserContent; pass proposalUserContent through exactly
|
|
949
|
+
'- "apply_quickfix": apply one proposal, return text deltas, no write (name+type+source+line+proposalUri+proposalUserContent; pass proposalUserContent through exactly).\n' +
|
|
935
950
|
'- "dumps": list/read ST22 short dumps (no id = list; id = read; includeFullText, sections).\n' +
|
|
936
951
|
'- "traces": list/analyze profiler traces (id+analysis: hitlist=hot spots, statements=call tree, dbAccesses=DB stats).\n' +
|
|
937
|
-
'- "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
|
|
952
|
+
'- "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' +
|
|
938
953
|
'- "trace_requests": list armed trace requests. "trace_cancel": cancel one by id (write scope).\n' +
|
|
939
954
|
'- "system_messages": list SM02 messages. "gateway_errors": list /IWFND/ERROR_LOG (on-prem; detailUrl or id+errorType for detail).\n' +
|
|
940
|
-
'- "odata_perf": diagnose why an OData call is slow (url = host-relative path
|
|
941
|
-
'- "
|
|
955
|
+
'- "odata_perf": diagnose why an OData call is slow (url = host-relative path); returns the sap-statistics timing split (DB/ABAP/framework/auth). Read-only; needs allowDataPreview.\n' +
|
|
956
|
+
'- "authorization_trace": read the on-prem STUSERTRACE auth trace (SUAUTHVALTRC); needs SAP_ALLOW_DATA_PREVIEW.\n' +
|
|
957
|
+
'- "cds_sql": show the native SQL a CDS view compiles to (name; read-only).\n' +
|
|
942
958
|
'- "sql_trace_state" / "set_sql_trace_state" (sqlOn; needs SAP_ALLOW_WRITES) / "sql_trace_directory": ST05 SQL-trace control.\n' +
|
|
943
959
|
'Quickfix workflow: syntax/ATC → quickfix → apply_quickfix → write via SAPWrite. Full action reference: docs_page SAPDiagnose.',
|
|
944
960
|
inputSchema: {
|
|
@@ -950,6 +966,7 @@ export function getToolDefinitions(config, textSearchAvailable, resolvedFeatures
|
|
|
950
966
|
'syntax',
|
|
951
967
|
'unittest',
|
|
952
968
|
'atc',
|
|
969
|
+
'atc_variants',
|
|
953
970
|
'cds_testcases',
|
|
954
971
|
'dumps',
|
|
955
972
|
'traces',
|
|
@@ -966,6 +983,7 @@ export function getToolDefinitions(config, textSearchAvailable, resolvedFeatures
|
|
|
966
983
|
'sql_trace_state',
|
|
967
984
|
'set_sql_trace_state',
|
|
968
985
|
'sql_trace_directory',
|
|
986
|
+
'authorization_trace',
|
|
969
987
|
],
|
|
970
988
|
description: 'Diagnostic action',
|
|
971
989
|
},
|
|
@@ -1025,7 +1043,7 @@ export function getToolDefinitions(config, textSearchAvailable, resolvedFeatures
|
|
|
1025
1043
|
},
|
|
1026
1044
|
},
|
|
1027
1045
|
},
|
|
1028
|
-
variant: { type: 'string', description: '
|
|
1046
|
+
variant: { type: 'string', description: 'atc: check variant; atc_variants: name filter (*=all)' },
|
|
1029
1047
|
id: {
|
|
1030
1048
|
type: 'string',
|
|
1031
1049
|
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.',
|
|
@@ -1038,7 +1056,8 @@ export function getToolDefinitions(config, textSearchAvailable, resolvedFeatures
|
|
|
1038
1056
|
type: 'string',
|
|
1039
1057
|
description: 'Gateway error type for gateway_errors detail by id (for example "Frontend Error"). Required when using id without detailUrl.',
|
|
1040
1058
|
},
|
|
1041
|
-
user: { type: 'string', description: '
|
|
1059
|
+
user: { type: 'string', description: 'SAP-user filter for dumps, feeds, or authorization_trace.' },
|
|
1060
|
+
authObject: { type: 'string', description: 'Authorization object filter, e.g. S_TCODE.' },
|
|
1042
1061
|
from: {
|
|
1043
1062
|
type: 'string',
|
|
1044
1063
|
description: 'Optional lower time boundary for feed-based diagnostics actions (system_messages/gateway_errors).',
|
|
@@ -1049,7 +1068,7 @@ export function getToolDefinitions(config, textSearchAvailable, resolvedFeatures
|
|
|
1049
1068
|
},
|
|
1050
1069
|
maxResults: {
|
|
1051
1070
|
type: 'number',
|
|
1052
|
-
description: 'Maximum results
|
|
1071
|
+
description: 'Maximum results for dumps/system_messages/gateway_errors (default 50) or authorization_trace (default 100); bounded to a safe cap.',
|
|
1053
1072
|
},
|
|
1054
1073
|
sections: {
|
|
1055
1074
|
type: 'array',
|
|
@@ -1068,6 +1087,10 @@ export function getToolDefinitions(config, textSearchAvailable, resolvedFeatures
|
|
|
1068
1087
|
type: 'boolean',
|
|
1069
1088
|
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.',
|
|
1070
1089
|
},
|
|
1090
|
+
onlyFailures: {
|
|
1091
|
+
type: 'boolean',
|
|
1092
|
+
description: 'For authorization_trace: return only denied checks (RC<>0), similar to the SU53 failure view.',
|
|
1093
|
+
},
|
|
1071
1094
|
analysis: {
|
|
1072
1095
|
type: 'string',
|
|
1073
1096
|
enum: ['hitlist', 'statements', 'dbAccesses'],
|
|
@@ -1124,13 +1147,13 @@ export function getToolDefinitions(config, textSearchAvailable, resolvedFeatures
|
|
|
1124
1147
|
description: 'Action:\n' +
|
|
1125
1148
|
'"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' +
|
|
1126
1149
|
'"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' +
|
|
1127
|
-
'"usages" =
|
|
1150
|
+
'"usages" = live SAP where-used lookup. Provide "type" when known; without it, the name must resolve uniquely. Prefer "impact" for CDS.\n' +
|
|
1128
1151
|
'"structure" = TABL includes/appends.',
|
|
1129
1152
|
},
|
|
1130
1153
|
type: {
|
|
1131
1154
|
type: 'string',
|
|
1132
1155
|
enum: btp ? SAPCONTEXT_TYPES_BTP : SAPCONTEXT_TYPES_ONPREM,
|
|
1133
|
-
description: 'Object type. Optional for action="impact" (defaults to DDLS); required otherwise.',
|
|
1156
|
+
description: 'Object type. Optional for action="impact" (defaults to DDLS) or action="usages"; required otherwise.',
|
|
1134
1157
|
},
|
|
1135
1158
|
name: {
|
|
1136
1159
|
type: 'string',
|
|
@@ -1149,9 +1172,13 @@ export function getToolDefinitions(config, textSearchAvailable, resolvedFeatures
|
|
|
1149
1172
|
description: 'Required for FUNC type. The function group containing the function module.',
|
|
1150
1173
|
},
|
|
1151
1174
|
}),
|
|
1175
|
+
maxResults: {
|
|
1176
|
+
type: 'number',
|
|
1177
|
+
description: 'usages: max entries (default 100); impact: max per downstream bucket (default 50). Max 1000. "usageCount"/"summary" stay true totals, not page sizes.',
|
|
1178
|
+
},
|
|
1152
1179
|
maxDeps: {
|
|
1153
1180
|
type: 'number',
|
|
1154
|
-
description: '
|
|
1181
|
+
description: 'Max dependencies to resolve (default 20). Lower = faster + fewer tokens.',
|
|
1155
1182
|
},
|
|
1156
1183
|
depth: {
|
|
1157
1184
|
type: 'number',
|
|
@@ -1160,19 +1187,19 @@ export function getToolDefinitions(config, textSearchAvailable, resolvedFeatures
|
|
|
1160
1187
|
},
|
|
1161
1188
|
includeIndirect: {
|
|
1162
1189
|
type: 'boolean',
|
|
1163
|
-
description: '
|
|
1190
|
+
description: 'impact: Include indirect (transitive) downstream where-used entries. Default false.',
|
|
1164
1191
|
},
|
|
1165
1192
|
siblingCheck: {
|
|
1166
1193
|
type: 'boolean',
|
|
1167
|
-
description: '
|
|
1194
|
+
description: 'impact: Enable sibling metadata-extension consistency analysis. Default true.',
|
|
1168
1195
|
},
|
|
1169
1196
|
siblingMaxCandidates: {
|
|
1170
1197
|
type: 'number',
|
|
1171
|
-
description: '
|
|
1198
|
+
description: 'impact: Maximum sibling DDLS candidates to compare. Default 4; hard cap 10.',
|
|
1172
1199
|
},
|
|
1173
1200
|
includeKtd: {
|
|
1174
1201
|
type: 'boolean',
|
|
1175
|
-
description: '
|
|
1202
|
+
description: 'deps: When true/default, prepend the object Knowledge Transfer Document (KTD/SKTD) when one exists. Set false to skip the KTD lookup.',
|
|
1176
1203
|
},
|
|
1177
1204
|
},
|
|
1178
1205
|
required: ['name'],
|
|
@@ -1212,7 +1239,7 @@ export function getToolDefinitions(config, textSearchAvailable, resolvedFeatures
|
|
|
1212
1239
|
},
|
|
1213
1240
|
responsible: {
|
|
1214
1241
|
type: 'string',
|
|
1215
|
-
description: '
|
|
1242
|
+
description: 'Person-responsible: an existing ABAP user (XUBNAME, max 12 chars); an email is rejected. Defaults to the connection user; pass explicitly under principal propagation. BTP: auto-resolved from prior creates.',
|
|
1216
1243
|
},
|
|
1217
1244
|
transportLayer: {
|
|
1218
1245
|
type: 'string',
|
|
@@ -1326,8 +1353,8 @@ export function getToolDefinitions(config, textSearchAvailable, resolvedFeatures
|
|
|
1326
1353
|
'release_recursive: release all unreleased tasks first, then the transport itself. ' +
|
|
1327
1354
|
'check: check if a transport is needed for a package/object (requires type, name, package). ' +
|
|
1328
1355
|
'history: list transports referencing an object (reverse lookup; requires type, name; works without SAP_ALLOW_TRANSPORT_WRITES). ' +
|
|
1329
|
-
"layers: list the transport layers this system offers (name + description + resolved target where any) — the valid values for create's transportLayer. Use this to discover a real value instead of guessing; works without SAP_ALLOW_TRANSPORT_WRITES.
|
|
1330
|
-
"targets: list the valid transport targets (Transportziel / TR_TARGET) this system offers — the valid values for create's target. Use this to discover a real target (e.g. before create with target=).
|
|
1356
|
+
"layers: list the transport layers this system offers (name + description + resolved target where any) — the valid values for create's transportLayer. Use this to discover a real value instead of guessing; works without SAP_ALLOW_TRANSPORT_WRITES. " +
|
|
1357
|
+
"targets: list the valid transport targets (Transportziel / TR_TARGET) this system offers — the valid values for create's target. Use this to discover a real target (e.g. before create with target=). Read-only. Both report unavailability at runtime on releases that lack the value-help endpoint.",
|
|
1331
1358
|
},
|
|
1332
1359
|
id: {
|
|
1333
1360
|
type: 'string',
|
|
@@ -1374,15 +1401,20 @@ export function getToolDefinitions(config, textSearchAvailable, resolvedFeatures
|
|
|
1374
1401
|
},
|
|
1375
1402
|
summary: {
|
|
1376
1403
|
type: 'boolean',
|
|
1377
|
-
description: 'For list only.
|
|
1404
|
+
description: 'For list only. DEFAULT true: headers-only — drops each transport\'s (and task\'s) object lists, keeping id/description/owner/status/target + objectCount; use action="get" for one in full. Pass false for full object lists (~5x larger).',
|
|
1405
|
+
},
|
|
1406
|
+
maxResults: {
|
|
1407
|
+
type: 'number',
|
|
1408
|
+
description: 'list: max transports (default 50, max 1000). "total" always reports the full backlog.',
|
|
1378
1409
|
},
|
|
1379
1410
|
},
|
|
1380
1411
|
required: ['action'],
|
|
1381
1412
|
},
|
|
1382
1413
|
});
|
|
1383
1414
|
}
|
|
1384
|
-
// SAPGit — registered
|
|
1385
|
-
|
|
1415
|
+
// SAPGit — registered when a gCTS/abapGit backend is available, or not yet probed (see
|
|
1416
|
+
// isGitToolVisible: unknown must stay visible or the tool is lost for the whole session).
|
|
1417
|
+
if (isGitToolVisible(config, resolvedFeatures)) {
|
|
1386
1418
|
const sapGitActions = config.allowWrites && config.allowGitWrites
|
|
1387
1419
|
? [...SAPGIT_ACTIONS_READ, ...SAPGIT_ACTIONS_WRITE]
|
|
1388
1420
|
: SAPGIT_ACTIONS_READ;
|
|
@@ -1395,13 +1427,13 @@ export function getToolDefinitions(config, textSearchAvailable, resolvedFeatures
|
|
|
1395
1427
|
action: {
|
|
1396
1428
|
type: 'string',
|
|
1397
1429
|
enum: sapGitActions,
|
|
1398
|
-
description: 'Git action.
|
|
1399
|
-
'
|
|
1430
|
+
description: 'Git action. The writes (clone, pull, push, commit, stage, switch_branch, create_branch, unlink) ' +
|
|
1431
|
+
'need SAP_ALLOW_WRITES=true and SAP_ALLOW_GIT_WRITES=true; the rest are reads.',
|
|
1400
1432
|
},
|
|
1401
1433
|
backend: {
|
|
1402
1434
|
type: 'string',
|
|
1403
1435
|
enum: ['gcts', 'abapgit'],
|
|
1404
|
-
description: '
|
|
1436
|
+
description: 'Backend override; omit to auto-select (gCTS preferred).',
|
|
1405
1437
|
},
|
|
1406
1438
|
repoId: {
|
|
1407
1439
|
type: 'string',
|
|
@@ -1429,15 +1461,15 @@ export function getToolDefinitions(config, textSearchAvailable, resolvedFeatures
|
|
|
1429
1461
|
},
|
|
1430
1462
|
message: {
|
|
1431
1463
|
type: 'string',
|
|
1432
|
-
description: 'Commit message for gCTS commit.',
|
|
1464
|
+
description: 'Commit message (required for gCTS commit and abapGit push).',
|
|
1433
1465
|
},
|
|
1434
1466
|
description: {
|
|
1435
1467
|
type: 'string',
|
|
1436
|
-
description: '
|
|
1468
|
+
description: 'Commit description (gCTS).',
|
|
1437
1469
|
},
|
|
1438
1470
|
objects: {
|
|
1439
1471
|
type: 'array',
|
|
1440
|
-
description: '
|
|
1472
|
+
description: 'Object list for commit/push. For abapGit push it selects the changed objects to commit.',
|
|
1441
1473
|
items: {
|
|
1442
1474
|
type: 'object',
|
|
1443
1475
|
properties: {
|
|
@@ -1453,15 +1485,15 @@ export function getToolDefinitions(config, textSearchAvailable, resolvedFeatures
|
|
|
1453
1485
|
},
|
|
1454
1486
|
user: {
|
|
1455
1487
|
type: 'string',
|
|
1456
|
-
description: '
|
|
1488
|
+
description: 'Remote repository username.',
|
|
1457
1489
|
},
|
|
1458
1490
|
password: {
|
|
1459
1491
|
type: 'string',
|
|
1460
|
-
description: '
|
|
1492
|
+
description: 'Remote repository password/token secret.',
|
|
1461
1493
|
},
|
|
1462
1494
|
token: {
|
|
1463
1495
|
type: 'string',
|
|
1464
|
-
description: '
|
|
1496
|
+
description: 'Remote repository access token. abapGit sends it as basic auth user "x-access-token".',
|
|
1465
1497
|
},
|
|
1466
1498
|
limit: {
|
|
1467
1499
|
type: 'number',
|
|
@@ -1478,6 +1510,6 @@ export function getToolDefinitions(config, textSearchAvailable, resolvedFeatures
|
|
|
1478
1510
|
if (annotations)
|
|
1479
1511
|
tool.annotations = { ...annotations };
|
|
1480
1512
|
}
|
|
1481
|
-
return tools;
|
|
1513
|
+
return withStrictSchemas(tools);
|
|
1482
1514
|
}
|
|
1483
1515
|
//# sourceMappingURL=tools.js.map
|