@mcp-abap-adt/core 6.5.0 → 6.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/README.md +8 -1
  3. package/dist/handlers/system/readonly/handleRuntimeRunClass.d.ts +111 -0
  4. package/dist/handlers/system/readonly/handleRuntimeRunClass.d.ts.map +1 -0
  5. package/dist/handlers/system/readonly/handleRuntimeRunClass.js +141 -0
  6. package/dist/handlers/system/readonly/handleRuntimeRunClass.js.map +1 -0
  7. package/dist/handlers/system/readonly/handleRuntimeRunClassWithProfiling.d.ts +22 -1
  8. package/dist/handlers/system/readonly/handleRuntimeRunClassWithProfiling.d.ts.map +1 -1
  9. package/dist/handlers/system/readonly/handleRuntimeRunClassWithProfiling.js +32 -1
  10. package/dist/handlers/system/readonly/handleRuntimeRunClassWithProfiling.js.map +1 -1
  11. package/dist/handlers/system/readonly/handleRuntimeRunProgram.d.ts +90 -0
  12. package/dist/handlers/system/readonly/handleRuntimeRunProgram.d.ts.map +1 -0
  13. package/dist/handlers/system/readonly/handleRuntimeRunProgram.js +109 -0
  14. package/dist/handlers/system/readonly/handleRuntimeRunProgram.js.map +1 -0
  15. package/dist/handlers/system/readonly/handleRuntimeRunProgramWithProfiling.d.ts +1 -1
  16. package/dist/handlers/system/readonly/handleRuntimeRunProgramWithProfiling.js +1 -1
  17. package/dist/handlers/system/readonly/handleRuntimeRunProgramWithProfiling.js.map +1 -1
  18. package/dist/handlers/system/readonly/handleSearchSource.d.ts +40 -0
  19. package/dist/handlers/system/readonly/handleSearchSource.d.ts.map +1 -0
  20. package/dist/handlers/system/readonly/handleSearchSource.js +127 -0
  21. package/dist/handlers/system/readonly/handleSearchSource.js.map +1 -0
  22. package/dist/lib/handlers/groups/SearchHandlersGroup.d.ts.map +1 -1
  23. package/dist/lib/handlers/groups/SearchHandlersGroup.js +5 -0
  24. package/dist/lib/handlers/groups/SearchHandlersGroup.js.map +1 -1
  25. package/dist/lib/handlers/groups/SystemHandlersGroup.d.ts.map +1 -1
  26. package/dist/lib/handlers/groups/SystemHandlersGroup.js +10 -0
  27. package/dist/lib/handlers/groups/SystemHandlersGroup.js.map +1 -1
  28. package/dist/lib/search-source/lineScanner.d.ts +17 -0
  29. package/dist/lib/search-source/lineScanner.d.ts.map +1 -0
  30. package/dist/lib/search-source/lineScanner.js +51 -0
  31. package/dist/lib/search-source/lineScanner.js.map +1 -0
  32. package/dist/lib/search-source/orchestrator.d.ts +51 -0
  33. package/dist/lib/search-source/orchestrator.d.ts.map +1 -0
  34. package/dist/lib/search-source/orchestrator.js +158 -0
  35. package/dist/lib/search-source/orchestrator.js.map +1 -0
  36. package/dist/lib/search-source/packageEnumerator.d.ts +25 -0
  37. package/dist/lib/search-source/packageEnumerator.d.ts.map +1 -0
  38. package/dist/lib/search-source/packageEnumerator.js +0 -0
  39. package/dist/lib/search-source/packageEnumerator.js.map +1 -0
  40. package/dist/lib/search-source/sourceReader.d.ts +25 -0
  41. package/dist/lib/search-source/sourceReader.d.ts.map +1 -0
  42. package/dist/lib/search-source/sourceReader.js +128 -0
  43. package/dist/lib/search-source/sourceReader.js.map +1 -0
  44. package/docs/user-guide/AVAILABLE_TOOLS.md +77 -5
  45. package/docs/user-guide/AVAILABLE_TOOLS_COMPACT.md +1 -1
  46. package/docs/user-guide/AVAILABLE_TOOLS_HIGH.md +1 -1
  47. package/docs/user-guide/AVAILABLE_TOOLS_LEGACY.md +21 -3
  48. package/docs/user-guide/AVAILABLE_TOOLS_LOW.md +1 -1
  49. package/docs/user-guide/AVAILABLE_TOOLS_READONLY.md +76 -4
  50. package/package.json +3 -3
package/CHANGELOG.md CHANGED
@@ -2,6 +2,40 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [6.7.0] - 2026-05-14
6
+
7
+ ### Added
8
+ - `SearchSource` (onprem + legacy) — source-text search across ABAP repository objects without invoking `SUBMIT AFX_CODE_SCANNER`. Scans programs (`PROG/P`), function groups (`FUGR/F`, including FMs and FUGR/PU/PD/PT/PY auto-includes), and classes (`CLAS/OC`, main include only in v1). Supports AND-query, up to three exclusion substrings, per-object hit cap, comment-line skip, subpackage recursion, object-name glob filter, bounded parallelism (default 8, max 16), and a deterministic `truncated` signal (`by_object_cap` / `by_max_objects`). Cloud is explicitly out of scope (no indexed source-search endpoint; see fr0ster/mcp-abap-adt-clients#36). Closes #79.
9
+
10
+ ### Notes
11
+ - Comments are **searched by default**. Set `exclude_comments=true` to drop col-1 `*` and full-line `"` comment lines (AFX-strict semantics; whitespace-prefixed `*` is not a comment in ABAP and is never skipped).
12
+ - The `version` parameter affects PROG and CLAS main include reads only — FUGR subincludes are always read against the active version because the include endpoint exposes no version selector.
13
+ - Class subincludes (CCDEF / CCMAC / CCAU / CCIMP / CCPUBLIC) are not yet enumerable through the MCP surface and are out of scope for v1; tracked as a follow-up.
14
+
15
+ ## [6.6.0] - 2026-05-14
16
+
17
+ ### Added
18
+ - `RuntimeRunClass` (onprem + cloud) — execute an ABAP class implementing `if_oo_adt_classrun` and return its stdout text. Optional `profile=true` runs through the profiler and additionally surfaces `profile.profiler_id` / `profile.trace_id` (same retry tunables as the previous tool).
19
+ - `RuntimeRunProgram` (onprem only) — execute an ABAP report and return its stdout text. Optional `profile=true` starts a profiler trace; trace must be located afterwards via `RuntimeListProfilerTraceFiles` (program execution is fire-and-forget).
20
+
21
+ ### Deprecated
22
+ - `RuntimeRunClassWithProfiling` and `RuntimeRunProgramWithProfiling` are now marked deprecated in their tool descriptions. They remain functional. Prefer the unified `RuntimeRunClass` / `RuntimeRunProgram` with `profile=true`. Scheduled for removal in a future major release.
23
+
24
+ ## [6.5.3] - 2026-05-13
25
+
26
+ ### Added
27
+ - `RuntimeRunClassWithProfiling` now accepts optional `max_trace_attempts`, `trace_retry_delay_ms`, and `trace_lookup_uris` so callers can tune trace-resolution polling. Defaults remain 5 attempts × 2000 ms; raise on slow systems (e.g. SAP trial cloud) where the trace file is written with extra delay. Closes #82.
28
+
29
+ ## [6.5.2] - 2026-05-13
30
+
31
+ ### Fixed
32
+ - Bump `@mcp-abap-adt/adt-clients` to `^5.4.2` and `@mcp-abap-adt/connection` to `^1.8.1` to pick up the stale-CSRF 401 recovery fix (fr0ster/mcp-abap-connection#7, originally reported as #78). On on-prem SAP with basic auth, a cached-but-stale CSRF token caused POST/PUT/DELETE to fail permanently with `401 + login HTML`; the connection layer now detects this case, clears the token/cookies, and retries.
33
+
34
+ ## [6.5.1] - 2026-04-24
35
+
36
+ ### Documentation
37
+ - README: mention optional `readOnlyDedupStrategy` in the `EmbeddableMcpServer` example and link to the dedup strategies section in `HANDLERS_MANAGEMENT.md`.
38
+
5
39
  ## [6.5.0] - 2026-04-24
6
40
 
7
41
  ### Added
package/README.md CHANGED
@@ -86,16 +86,23 @@ mcp-abap-adt --transport=sse # SSE mode
86
86
  ### 2. Embeddable Server (For Integration)
87
87
  Embed MCP server into existing applications (e.g., SAP CAP/CDS, Express):
88
88
  ```typescript
89
- import { EmbeddableMcpServer } from '@mcp-abap-adt/core/server';
89
+ import {
90
+ EmbeddableMcpServer,
91
+ ReadVsGetDedupStrategy, // optional: hide Read<X> when Get<X> also exposed
92
+ } from '@mcp-abap-adt/core/server';
90
93
 
91
94
  const server = new EmbeddableMcpServer({
92
95
  connection, // Your AbapConnection instance
93
96
  logger, // Optional logger
94
97
  exposition: ['readonly', 'high'], // Handler groups to expose
98
+ // Optional; default: no dedup — existing consumers see no change.
99
+ readOnlyDedupStrategy: new ReadVsGetDedupStrategy(),
95
100
  });
96
101
  await server.connect(transport);
97
102
  ```
98
103
 
104
+ See [Handlers Management → EmbeddableMcpServer dedup strategies](docs/user-guide/HANDLERS_MANAGEMENT.md#embeddablemcpserver-dedup-strategies) for opt-in dedup of readonly tools against high/low/compact, including how to plug a custom `IReadOnlyDedupStrategy` for role-based rules.
105
+
99
106
  ## Quick Start
100
107
 
101
108
  1. **Install server**: See [Installation Guide](docs/installation/INSTALLATION.md)
@@ -0,0 +1,111 @@
1
+ import type { HandlerContext } from '../../../lib/handlers/interfaces';
2
+ export declare const TOOL_DEFINITION: {
3
+ readonly name: "RuntimeRunClass";
4
+ readonly available_in: readonly ["onprem", "cloud"];
5
+ readonly description: "[runtime] Execute an ABAP class implementing if_oo_adt_classrun and return its output. Set profile=true to also capture a profiler trace (returns profilerId/traceId alongside output).";
6
+ readonly inputSchema: {
7
+ readonly type: "object";
8
+ readonly properties: {
9
+ readonly class_name: {
10
+ readonly type: "string";
11
+ readonly description: "ABAP class name to execute.";
12
+ };
13
+ readonly profile: {
14
+ readonly type: "boolean";
15
+ readonly description: "When true, run with the profiler and resolve the resulting traceId. Default false.";
16
+ };
17
+ readonly description: {
18
+ readonly type: "string";
19
+ readonly description: "Profiler trace description (only used when profile=true).";
20
+ };
21
+ readonly all_procedural_units: {
22
+ readonly type: "boolean";
23
+ };
24
+ readonly all_misc_abap_statements: {
25
+ readonly type: "boolean";
26
+ };
27
+ readonly all_internal_table_events: {
28
+ readonly type: "boolean";
29
+ };
30
+ readonly all_dynpro_events: {
31
+ readonly type: "boolean";
32
+ };
33
+ readonly aggregate: {
34
+ readonly type: "boolean";
35
+ };
36
+ readonly explicit_on_off: {
37
+ readonly type: "boolean";
38
+ };
39
+ readonly with_rfc_tracing: {
40
+ readonly type: "boolean";
41
+ };
42
+ readonly all_system_kernel_events: {
43
+ readonly type: "boolean";
44
+ };
45
+ readonly sql_trace: {
46
+ readonly type: "boolean";
47
+ };
48
+ readonly all_db_events: {
49
+ readonly type: "boolean";
50
+ };
51
+ readonly max_size_for_trace_file: {
52
+ readonly type: "number";
53
+ };
54
+ readonly amdp_trace: {
55
+ readonly type: "boolean";
56
+ };
57
+ readonly max_time_for_tracing: {
58
+ readonly type: "number";
59
+ };
60
+ readonly max_trace_attempts: {
61
+ readonly type: "integer";
62
+ readonly minimum: 1;
63
+ readonly description: "Max polling attempts to resolve traceId after execution (default 5). Only used when profile=true.";
64
+ };
65
+ readonly trace_retry_delay_ms: {
66
+ readonly type: "integer";
67
+ readonly minimum: 0;
68
+ readonly description: "Delay in ms between trace polling attempts (default 2000). Only used when profile=true.";
69
+ };
70
+ readonly trace_lookup_uris: {
71
+ readonly type: "array";
72
+ readonly items: {
73
+ readonly type: "string";
74
+ readonly minLength: 1;
75
+ };
76
+ readonly description: "Additional URIs to consult when resolving the trace (advanced, profile=true).";
77
+ };
78
+ };
79
+ readonly required: readonly ["class_name"];
80
+ };
81
+ };
82
+ interface RuntimeRunClassArgs {
83
+ class_name: string;
84
+ profile?: boolean;
85
+ description?: string;
86
+ all_procedural_units?: boolean;
87
+ all_misc_abap_statements?: boolean;
88
+ all_internal_table_events?: boolean;
89
+ all_dynpro_events?: boolean;
90
+ aggregate?: boolean;
91
+ explicit_on_off?: boolean;
92
+ with_rfc_tracing?: boolean;
93
+ all_system_kernel_events?: boolean;
94
+ sql_trace?: boolean;
95
+ all_db_events?: boolean;
96
+ max_size_for_trace_file?: number;
97
+ amdp_trace?: boolean;
98
+ max_time_for_tracing?: number;
99
+ max_trace_attempts?: number;
100
+ trace_retry_delay_ms?: number;
101
+ trace_lookup_uris?: string[];
102
+ }
103
+ export declare function handleRuntimeRunClass(context: HandlerContext, args: RuntimeRunClassArgs): Promise<{
104
+ isError: boolean;
105
+ content: {
106
+ type: string;
107
+ text: any;
108
+ }[];
109
+ }>;
110
+ export {};
111
+ //# sourceMappingURL=handleRuntimeRunClass.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handleRuntimeRunClass.d.ts","sourceRoot":"","sources":["../../../../src/handlers/system/readonly/handleRuntimeRunClass.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAGvE,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwDlB,CAAC;AAEX,UAAU,mBAAmB;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;CAC9B;AAED,wBAAsB,qBAAqB,CACzC,OAAO,EAAE,cAAc,EACvB,IAAI,EAAE,mBAAmB;;;;;;GAwG1B"}
@@ -0,0 +1,141 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TOOL_DEFINITION = void 0;
4
+ exports.handleRuntimeRunClass = handleRuntimeRunClass;
5
+ const adt_clients_1 = require("@mcp-abap-adt/adt-clients");
6
+ const utils_1 = require("../../../lib/utils");
7
+ exports.TOOL_DEFINITION = {
8
+ name: 'RuntimeRunClass',
9
+ available_in: ['onprem', 'cloud'],
10
+ description: '[runtime] Execute an ABAP class implementing if_oo_adt_classrun and return its output. Set profile=true to also capture a profiler trace (returns profilerId/traceId alongside output).',
11
+ inputSchema: {
12
+ type: 'object',
13
+ properties: {
14
+ class_name: {
15
+ type: 'string',
16
+ description: 'ABAP class name to execute.',
17
+ },
18
+ profile: {
19
+ type: 'boolean',
20
+ description: 'When true, run with the profiler and resolve the resulting traceId. Default false.',
21
+ },
22
+ description: {
23
+ type: 'string',
24
+ description: 'Profiler trace description (only used when profile=true).',
25
+ },
26
+ all_procedural_units: { type: 'boolean' },
27
+ all_misc_abap_statements: { type: 'boolean' },
28
+ all_internal_table_events: { type: 'boolean' },
29
+ all_dynpro_events: { type: 'boolean' },
30
+ aggregate: { type: 'boolean' },
31
+ explicit_on_off: { type: 'boolean' },
32
+ with_rfc_tracing: { type: 'boolean' },
33
+ all_system_kernel_events: { type: 'boolean' },
34
+ sql_trace: { type: 'boolean' },
35
+ all_db_events: { type: 'boolean' },
36
+ max_size_for_trace_file: { type: 'number' },
37
+ amdp_trace: { type: 'boolean' },
38
+ max_time_for_tracing: { type: 'number' },
39
+ max_trace_attempts: {
40
+ type: 'integer',
41
+ minimum: 1,
42
+ description: 'Max polling attempts to resolve traceId after execution (default 5). Only used when profile=true.',
43
+ },
44
+ trace_retry_delay_ms: {
45
+ type: 'integer',
46
+ minimum: 0,
47
+ description: 'Delay in ms between trace polling attempts (default 2000). Only used when profile=true.',
48
+ },
49
+ trace_lookup_uris: {
50
+ type: 'array',
51
+ items: { type: 'string', minLength: 1 },
52
+ description: 'Additional URIs to consult when resolving the trace (advanced, profile=true).',
53
+ },
54
+ },
55
+ required: ['class_name'],
56
+ },
57
+ };
58
+ async function handleRuntimeRunClass(context, args) {
59
+ const { connection, logger } = context;
60
+ try {
61
+ if (!args?.class_name) {
62
+ throw new Error('Parameter "class_name" is required');
63
+ }
64
+ const className = args.class_name.trim().toUpperCase();
65
+ const executor = new adt_clients_1.AdtExecutor(connection, logger);
66
+ const classExecutor = executor.getClassExecutor();
67
+ if (!args.profile) {
68
+ const response = await classExecutor.run({ className });
69
+ return (0, utils_1.return_response)({
70
+ data: JSON.stringify({
71
+ success: true,
72
+ class_name: className,
73
+ output: typeof response.data === 'string' ? response.data : '',
74
+ run_status: response.status,
75
+ }, null, 2),
76
+ status: response.status,
77
+ statusText: response.statusText,
78
+ headers: response.headers,
79
+ config: response.config,
80
+ });
81
+ }
82
+ const maxTraceAttempts = typeof args.max_trace_attempts === 'number' &&
83
+ Number.isFinite(args.max_trace_attempts) &&
84
+ args.max_trace_attempts >= 1
85
+ ? Math.trunc(args.max_trace_attempts)
86
+ : undefined;
87
+ const traceRetryDelayMs = typeof args.trace_retry_delay_ms === 'number' &&
88
+ Number.isFinite(args.trace_retry_delay_ms) &&
89
+ args.trace_retry_delay_ms >= 0
90
+ ? Math.trunc(args.trace_retry_delay_ms)
91
+ : undefined;
92
+ const traceLookupUris = Array.isArray(args.trace_lookup_uris)
93
+ ? args.trace_lookup_uris.filter((uri) => typeof uri === 'string' && uri.length > 0)
94
+ : undefined;
95
+ const result = await classExecutor.runWithProfiling({ className }, {
96
+ maxTraceAttempts,
97
+ traceRetryDelayMs,
98
+ traceLookupUris,
99
+ profilerParameters: {
100
+ description: args.description,
101
+ allProceduralUnits: args.all_procedural_units,
102
+ allMiscAbapStatements: args.all_misc_abap_statements,
103
+ allInternalTableEvents: args.all_internal_table_events,
104
+ allDynproEvents: args.all_dynpro_events,
105
+ aggregate: args.aggregate,
106
+ explicitOnOff: args.explicit_on_off,
107
+ withRfcTracing: args.with_rfc_tracing,
108
+ allSystemKernelEvents: args.all_system_kernel_events,
109
+ sqlTrace: args.sql_trace,
110
+ allDbEvents: args.all_db_events,
111
+ maxSizeForTraceFile: args.max_size_for_trace_file,
112
+ amdpTrace: args.amdp_trace,
113
+ maxTimeForTracing: args.max_time_for_tracing,
114
+ },
115
+ });
116
+ return (0, utils_1.return_response)({
117
+ data: JSON.stringify({
118
+ success: true,
119
+ class_name: className,
120
+ output: typeof result.response?.data === 'string'
121
+ ? result.response.data
122
+ : '',
123
+ run_status: result.response?.status,
124
+ profile: {
125
+ profiler_id: result.profilerId,
126
+ trace_id: result.traceId,
127
+ trace_requests_status: result.traceRequestsResponse?.status,
128
+ },
129
+ }, null, 2),
130
+ status: result.response?.status,
131
+ statusText: result.response?.statusText,
132
+ headers: result.response?.headers,
133
+ config: result.response?.config,
134
+ });
135
+ }
136
+ catch (error) {
137
+ logger?.error('Error running class:', error);
138
+ return (0, utils_1.return_error)(error);
139
+ }
140
+ }
141
+ //# sourceMappingURL=handleRuntimeRunClass.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handleRuntimeRunClass.js","sourceRoot":"","sources":["../../../../src/handlers/system/readonly/handleRuntimeRunClass.ts"],"names":[],"mappings":";;;AAoFA,sDA0GC;AA9LD,2DAAwD;AAExD,8CAAmE;AAEtD,QAAA,eAAe,GAAG;IAC7B,IAAI,EAAE,iBAAiB;IACvB,YAAY,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAU;IAC1C,WAAW,EACT,yLAAyL;IAC3L,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,UAAU,EAAE;gBACV,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,6BAA6B;aAC3C;YACD,OAAO,EAAE;gBACP,IAAI,EAAE,SAAS;gBACf,WAAW,EACT,oFAAoF;aACvF;YACD,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,WAAW,EACT,2DAA2D;aAC9D;YACD,oBAAoB,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;YACzC,wBAAwB,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;YAC7C,yBAAyB,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;YAC9C,iBAAiB,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;YACtC,SAAS,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;YAC9B,eAAe,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;YACpC,gBAAgB,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;YACrC,wBAAwB,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;YAC7C,SAAS,EAAE,EA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AqB,EAAE,MAAM;iBAC5D;aACF,EACD,IAAI,EACJ,CAAC,CACF;YACD,MAAM,EAAE,MAAM,CAAC,QAAQ,EAAE,MAAM;YAC/B,UAAU,EAAE,MAAM,CAAC,QAAQ,EAAE,UAAU;YACvC,OAAO,EAAE,MAAM,CAAC,QAAQ,EAAE,OAAO;YACjC,MAAM,EAAE,MAAM,CAAC,QAAQ,EAAE,MAAM;SAChC,CAAC,CAAC;IACL,CAAC;IAAC,OAAO,KAAU,EAAE,CAAC;QACpB,MAAM,EAAE,KAAK,CAAC,sBAAsB,EAAE,KAAK,CAAC,CAAC;QAC7C,OAAO,IAAA,oBAAY,EAAC,KAAK,CAAC,CAAC;IAC7B,CAAC;AACH,CAAC"}
@@ -2,7 +2,7 @@ import type { HandlerContext } from '../../../lib/handlers/interfaces';
2
2
  export declare const TOOL_DEFINITION: {
3
3
  readonly name: "RuntimeRunClassWithProfiling";
4
4
  readonly available_in: readonly ["onprem", "cloud"];
5
- readonly description: "[runtime] Execute ABAP class with profiler enabled and return created profilerId + traceId.";
5
+ readonly description: "[runtime][deprecated] Execute ABAP class with profiler enabled and return created profilerId + traceId. Prefer RuntimeRunClass with profile=true; this tool is kept for backward compatibility and will be removed in a future major release.";
6
6
  readonly inputSchema: {
7
7
  readonly type: "object";
8
8
  readonly properties: {
@@ -53,6 +53,24 @@ export declare const TOOL_DEFINITION: {
53
53
  readonly max_time_for_tracing: {
54
54
  readonly type: "number";
55
55
  };
56
+ readonly max_trace_attempts: {
57
+ readonly type: "integer";
58
+ readonly minimum: 1;
59
+ readonly description: "Max polling attempts to resolve traceId after execution (default 5). Increase for slow systems (e.g. SAP trial cloud).";
60
+ };
61
+ readonly trace_retry_delay_ms: {
62
+ readonly type: "integer";
63
+ readonly minimum: 0;
64
+ readonly description: "Delay in ms between trace polling attempts (default 2000).";
65
+ };
66
+ readonly trace_lookup_uris: {
67
+ readonly type: "array";
68
+ readonly items: {
69
+ readonly type: "string";
70
+ readonly minLength: 1;
71
+ };
72
+ readonly description: "Additional URIs to consult when resolving the trace (advanced).";
73
+ };
56
74
  };
57
75
  readonly required: readonly ["class_name"];
58
76
  };
@@ -73,6 +91,9 @@ interface RuntimeRunClassWithProfilingArgs {
73
91
  max_size_for_trace_file?: number;
74
92
  amdp_trace?: boolean;
75
93
  max_time_for_tracing?: number;
94
+ max_trace_attempts?: number;
95
+ trace_retry_delay_ms?: number;
96
+ trace_lookup_uris?: string[];
76
97
  }
77
98
  export declare function handleRuntimeRunClassWithProfiling(context: HandlerContext, args: RuntimeRunClassWithProfilingArgs): Promise<{
78
99
  isError: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"handleRuntimeRunClassWithProfiling.d.ts","sourceRoot":"","sources":["../../../../src/handlers/system/readonly/handleRuntimeRunClassWithProfiling.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAGvE,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgClB,CAAC;AAEX,UAAU,gCAAgC;IACxC,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,wBAAsB,kCAAkC,CACtD,OAAO,EAAE,cAAc,EACvB,IAAI,EAAE,gCAAgC;;;;;;GAyDvC"}
1
+ {"version":3,"file":"handleRuntimeRunClassWithProfiling.d.ts","sourceRoot":"","sources":["../../../../src/handlers/system/readonly/handleRuntimeRunClassWithProfiling.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAGvE,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkDlB,CAAC;AAEX,UAAU,gCAAgC;IACxC,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;CAC9B;AAED,wBAAsB,kCAAkC,CACtD,OAAO,EAAE,cAAc,EACvB,IAAI,EAAE,gCAAgC;;;;;;GA8EvC"}
@@ -7,7 +7,7 @@ const utils_1 = require("../../../lib/utils");
7
7
  exports.TOOL_DEFINITION = {
8
8
  name: 'RuntimeRunClassWithProfiling',
9
9
  available_in: ['onprem', 'cloud'],
10
- description: '[runtime] Execute ABAP class with profiler enabled and return created profilerId + traceId.',
10
+ description: '[runtime][deprecated] Execute ABAP class with profiler enabled and return created profilerId + traceId. Prefer RuntimeRunClass with profile=true; this tool is kept for backward compatibility and will be removed in a future major release.',
11
11
  inputSchema: {
12
12
  type: 'object',
13
13
  properties: {
@@ -32,6 +32,21 @@ exports.TOOL_DEFINITION = {
32
32
  max_size_for_trace_file: { type: 'number' },
33
33
  amdp_trace: { type: 'boolean' },
34
34
  max_time_for_tracing: { type: 'number' },
35
+ max_trace_attempts: {
36
+ type: 'integer',
37
+ minimum: 1,
38
+ description: 'Max polling attempts to resolve traceId after execution (default 5). Increase for slow systems (e.g. SAP trial cloud).',
39
+ },
40
+ trace_retry_delay_ms: {
41
+ type: 'integer',
42
+ minimum: 0,
43
+ description: 'Delay in ms between trace polling attempts (default 2000).',
44
+ },
45
+ trace_lookup_uris: {
46
+ type: 'array',
47
+ items: { type: 'string', minLength: 1 },
48
+ description: 'Additional URIs to consult when resolving the trace (advanced).',
49
+ },
35
50
  },
36
51
  required: ['class_name'],
37
52
  },
@@ -45,7 +60,23 @@ async function handleRuntimeRunClassWithProfiling(context, args) {
45
60
  const className = args.class_name.trim().toUpperCase();
46
61
  const executor = new adt_clients_1.AdtExecutor(connection, logger);
47
62
  const classExecutor = executor.getClassExecutor();
63
+ const maxTraceAttempts = typeof args.max_trace_attempts === 'number' &&
64
+ Number.isFinite(args.max_trace_attempts) &&
65
+ args.max_trace_attempts >= 1
66
+ ? Math.trunc(args.max_trace_attempts)
67
+ : undefined;
68
+ const traceRetryDelayMs = typeof args.trace_retry_delay_ms === 'number' &&
69
+ Number.isFinite(args.trace_retry_delay_ms) &&
70
+ args.trace_retry_delay_ms >= 0
71
+ ? Math.trunc(args.trace_retry_delay_ms)
72
+ : undefined;
73
+ const traceLookupUris = Array.isArray(args.trace_lookup_uris)
74
+ ? args.trace_lookup_uris.filter((uri) => typeof uri === 'string' && uri.length > 0)
75
+ : undefined;
48
76
  const result = await classExecutor.runWithProfiling({ className }, {
77
+ maxTraceAttempts,
78
+ traceRetryDelayMs,
79
+ traceLookupUris,
49
80
  profilerParameters: {
50
81
  description: args.description,
51
82
  allProceduralUnits: args.all_procedural_units,
@@ -1 +1 @@
1
- {"version":3,"file":"handleRuntimeRunClassWithProfiling.js","sourceRoot":"","sources":["../../../../src/handlers/system/readonly/handleRuntimeRunClassWithProfiling.ts"],"names":[],"mappings":";;;AAwDA,gFA2DC;AAnHD,2DAAwD;AAExD,8CAAmE;AAEtD,QAAA,eAAe,GAAG;IAC7B,IAAI,EAAE,8BAA8B;IACpC,YAAY,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAU;IAC1C,WAAW,EACT,6FAA6F;IAC/F,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,UAAU,EAAE;gBACV,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,6BAA6B;aAC3C;YACD,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,6BAA6B;aAC3C;YACD,oBAAoB,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;YACzC,wBAAwB,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;YAC7C,yBAAyB,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;YAC9C,iBAAiB,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;YACtC,SAAS,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;YAC9B,eAAe,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;YACpC,gBAAgB,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;YACrC,wBAAwB,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;YAC7C,SAAS,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;YAC9B,aA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IAAI,CAAC,aAAa;gBAC/B,mBAAmB,EAAE,IAAI,CAAC,uBAAuB;gBACjD,SAAS,EAAE,IAAI,CAAC,UAAU;gBAC1B,iBAAiB,EAAE,IAAI,CAAC,oBAAoB;aAC7C;SACF,CACF,CAAC;QAEF,OAAO,IAAA,uBAAe,EAAC;YACrB,IAAI,EAAE,IAAI,CAAC,SAAS,CAClB;gBACE,OAAO,EAAE,IAAI;gBACb,UAAU,EAAE,SAAS;gBACrB,WAAW,EAAE,MAAM,CAAC,UAAU;gBAC9B,QAAQ,EAAE,MAAM,CAAC,OAAO;gBACxB,UAAU,EAAE,MAAM,CAAC,QAAQ,EAAE,MAAM;gBACnC,qBAAqB,EAAE,MAAM,CAAC,qBAAqB,EAAE,MAAM;aAC5D,EACD,IAAI,EACJ,CAAC,CACF;YACD,MAAM,EAAE,MAAM,CAAC,QAAQ,EAAE,MAAM;YAC/B,UAAU,EAAE,MAAM,CAAC,QAAQ,EAAE,UAAU;YACvC,OAAO,EAAE,MAAM,CAAC,QAAQ,EAAE,OAAO;YACjC,MAAM,EAAE,MAAM,CAAC,QAAQ,EAAE,MAAM;SAChC,CAAC,CAAC;IACL,CAAC;IAAC,OAAO,KAAU,EAAE,CAAC;QACpB,MAAM,EAAE,KAAK,CAAC,qCAAqC,EAAE,KAAK,CAAC,CAAC;QAC5D,OAAO,IAAA,oBAAY,EAAC,KAAK,CAAC,CAAC;IAC7B,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"handleRuntimeRunClassWithProfiling.js","sourceRoot":"","sources":["../../../../src/handlers/system/readonly/handleRuntimeRunClassWithProfiling.ts"],"names":[],"mappings":";;;AA6EA,gFAgFC;AA7JD,2DAAwD;AAExD,8CAAmE;AAEtD,QAAA,eAAe,GAAG;IAC7B,IAAI,EAAE,8BAA8B;IACpC,YAAY,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAU;IAC1C,WAAW,EACT,+OAA+O;IACjP,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ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ACjC,MAAM,EAAE,MAAM,CAAC,QAAQ,EAAE,MAAM;SAChC,CAAC,CAAC;IACL,CAAC;IAAC,OAAO,KAAU,EAAE,CAAC;QACpB,MAAM,EAAE,KAAK,CAAC,qCAAqC,EAAE,KAAK,CAAC,CAAC;QAC5D,OAAO,IAAA,oBAAY,EAAC,KAAK,CAAC,CAAC;IAC7B,CAAC;AACH,CAAC"}
@@ -0,0 +1,90 @@
1
+ import type { HandlerContext } from '../../../lib/handlers/interfaces';
2
+ export declare const TOOL_DEFINITION: {
3
+ readonly name: "RuntimeRunProgram";
4
+ readonly available_in: readonly ["onprem"];
5
+ readonly description: "[runtime] Execute an ABAP program (report) and return its output. Set profile=true to also start a profiler trace; use RuntimeListProfilerTraceFiles afterwards to locate the trace (program execution is fire-and-forget, so traceId is not returned synchronously).";
6
+ readonly inputSchema: {
7
+ readonly type: "object";
8
+ readonly properties: {
9
+ readonly program_name: {
10
+ readonly type: "string";
11
+ readonly description: "ABAP program name to execute.";
12
+ };
13
+ readonly profile: {
14
+ readonly type: "boolean";
15
+ readonly description: "When true, run with the profiler. Default false. Trace must be located afterwards via RuntimeListProfilerTraceFiles — program execution does not return traceId synchronously.";
16
+ };
17
+ readonly description: {
18
+ readonly type: "string";
19
+ readonly description: "Profiler trace description (only used when profile=true).";
20
+ };
21
+ readonly all_procedural_units: {
22
+ readonly type: "boolean";
23
+ };
24
+ readonly all_misc_abap_statements: {
25
+ readonly type: "boolean";
26
+ };
27
+ readonly all_internal_table_events: {
28
+ readonly type: "boolean";
29
+ };
30
+ readonly all_dynpro_events: {
31
+ readonly type: "boolean";
32
+ };
33
+ readonly aggregate: {
34
+ readonly type: "boolean";
35
+ };
36
+ readonly explicit_on_off: {
37
+ readonly type: "boolean";
38
+ };
39
+ readonly with_rfc_tracing: {
40
+ readonly type: "boolean";
41
+ };
42
+ readonly all_system_kernel_events: {
43
+ readonly type: "boolean";
44
+ };
45
+ readonly sql_trace: {
46
+ readonly type: "boolean";
47
+ };
48
+ readonly all_db_events: {
49
+ readonly type: "boolean";
50
+ };
51
+ readonly max_size_for_trace_file: {
52
+ readonly type: "number";
53
+ };
54
+ readonly amdp_trace: {
55
+ readonly type: "boolean";
56
+ };
57
+ readonly max_time_for_tracing: {
58
+ readonly type: "number";
59
+ };
60
+ };
61
+ readonly required: readonly ["program_name"];
62
+ };
63
+ };
64
+ interface RuntimeRunProgramArgs {
65
+ program_name: string;
66
+ profile?: boolean;
67
+ description?: string;
68
+ all_procedural_units?: boolean;
69
+ all_misc_abap_statements?: boolean;
70
+ all_internal_table_events?: boolean;
71
+ all_dynpro_events?: boolean;
72
+ aggregate?: boolean;
73
+ explicit_on_off?: boolean;
74
+ with_rfc_tracing?: boolean;
75
+ all_system_kernel_events?: boolean;
76
+ sql_trace?: boolean;
77
+ all_db_events?: boolean;
78
+ max_size_for_trace_file?: number;
79
+ amdp_trace?: boolean;
80
+ max_time_for_tracing?: number;
81
+ }
82
+ export declare function handleRuntimeRunProgram(context: HandlerContext, args: RuntimeRunProgramArgs): Promise<{
83
+ isError: boolean;
84
+ content: {
85
+ type: string;
86
+ text: any;
87
+ }[];
88
+ }>;
89
+ export {};
90
+ //# sourceMappingURL=handleRuntimeRunProgram.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handleRuntimeRunProgram.d.ts","sourceRoot":"","sources":["../../../../src/handlers/system/readonly/handleRuntimeRunProgram.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAGvE,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsClB,CAAC;AAEX,UAAU,qBAAqB;IAC7B,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,wBAAsB,uBAAuB,CAC3C,OAAO,EAAE,cAAc,EACvB,IAAI,EAAE,qBAAqB;;;;;;GAkF5B"}