@cspeach/cli 1.1.37 → 1.1.39
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/dist/tools/sap-read.js +23 -2
- package/dist/tools/verify.js +24 -3
- package/package.json +2 -2
package/dist/tools/sap-read.js
CHANGED
|
@@ -394,8 +394,29 @@ registerTool({
|
|
|
394
394
|
handler: async (args, ctx) => {
|
|
395
395
|
// atcRun(type, name, variant?) — type first
|
|
396
396
|
// Review fix round 1, M-3: Esc / Ctrl+C stops a long ATC run.
|
|
397
|
-
const
|
|
398
|
-
|
|
397
|
+
const variant = args.variant ?? 'DEFAULT';
|
|
398
|
+
const result = await ctx.adt.atcRun(args.type, args.name, variant, ctx.signal ? { signal: ctx.signal } : {});
|
|
399
|
+
// Fable review 2026-10-15, I-1: a finished run whose worklist never named
|
|
400
|
+
// the object did not check it (the variant has no check for that type).
|
|
401
|
+
// Say so plainly; "0 findings" there is not a measurement. Every other
|
|
402
|
+
// result is the same JSON as before (the coverage key is not added).
|
|
403
|
+
const { coverage, ...shown } = result;
|
|
404
|
+
if (coverage === 'absent' && result.totalFindings === 0) {
|
|
405
|
+
const objectName = `${String(args.type).toUpperCase()} ${String(args.name).toUpperCase()}`;
|
|
406
|
+
return {
|
|
407
|
+
content: [
|
|
408
|
+
`ATC did not check ${objectName}.`,
|
|
409
|
+
'SAP finished the run, but its worklist never listed this object.',
|
|
410
|
+
'This is not a measurement. Do not report it as 0 findings or as clean.',
|
|
411
|
+
'Likely causes:',
|
|
412
|
+
`- the ${String(variant).toUpperCase()} check variant may have no check for this object type (seen on S4H for DDLS, DDLX, SRVD, DOMA);`,
|
|
413
|
+
'- the name may be wrong, or the object may not exist or not be active.',
|
|
414
|
+
'Use sap_search_object to confirm the object exists.',
|
|
415
|
+
`(ATC worklist ${result.worklistId || 'unknown'})`,
|
|
416
|
+
].join('\n'),
|
|
417
|
+
};
|
|
418
|
+
}
|
|
419
|
+
return { content: JSON.stringify(shown, null, 2) };
|
|
399
420
|
},
|
|
400
421
|
});
|
|
401
422
|
// -----------------------------------------------------------------------
|
package/dist/tools/verify.js
CHANGED
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
*/
|
|
13
13
|
import { recordSyntaxCheck } from './syntax-state.js';
|
|
14
14
|
import { toObjectUrl, xmlParser } from '@cspeach/sap-client';
|
|
15
|
+
import * as sapClient from '@cspeach/sap-client';
|
|
15
16
|
/** Line for display: the parsed line, else the `#start=L,C` fragment of the
|
|
16
17
|
* checkruns uri (sap-client <= 0.1.14 left line at 0 for checkruns). */
|
|
17
18
|
function lineOf(m) {
|
|
@@ -90,15 +91,35 @@ export function normaliseSyntaxResult(res) {
|
|
|
90
91
|
* TABL is NOT retried here (live-check finding 3, 2026-10-14): sap-client
|
|
91
92
|
* checks tables itself with an explicit chkrun:version ("inactive", then one
|
|
92
93
|
* "active" retry on notProcessed), so its "did not run" is already final.
|
|
93
|
-
*
|
|
94
|
+
* STRU is not retried either (FINDINGS item 20, proved live 2026-10-15), nor
|
|
95
|
+
* BDEF, DDLX, SRVD (fix/active-only-checks, proved live 2026-10-15).
|
|
96
|
+
*
|
|
97
|
+
* The list is sap-client's own export (VERSIONED_CHECK_TYPES), so the two
|
|
98
|
+
* cannot drift. An older sap-client without the export checks only TABL
|
|
99
|
+
* itself (0.1.22), so the fallback is TABL: the CLI then keeps retrying every
|
|
100
|
+
* other type, as before. Still retried here today: DTEL, SRVB, DOMA.
|
|
94
101
|
*/
|
|
95
|
-
|
|
102
|
+
export function versionedTypesFrom(mod) {
|
|
103
|
+
let list;
|
|
104
|
+
try {
|
|
105
|
+
list = mod['VERSIONED_CHECK_TYPES'];
|
|
106
|
+
}
|
|
107
|
+
catch {
|
|
108
|
+
list = undefined;
|
|
109
|
+
} // a test mock without the export throws
|
|
110
|
+
if (!Array.isArray(list) || !list.every((t) => typeof t === 'string'))
|
|
111
|
+
return new Set(['TABL']);
|
|
112
|
+
return new Set(list.map((t) => t.toUpperCase()));
|
|
113
|
+
}
|
|
114
|
+
export function sapClientVersionedTypes() {
|
|
115
|
+
return versionedTypesFrom(sapClient);
|
|
116
|
+
}
|
|
96
117
|
export async function checkSyntax(adt, type, name) {
|
|
97
118
|
try {
|
|
98
119
|
return await adt.syntaxCheck(type, name);
|
|
99
120
|
}
|
|
100
121
|
catch (err) {
|
|
101
|
-
if (
|
|
122
|
+
if (sapClientVersionedTypes().has(type.toUpperCase()))
|
|
102
123
|
throw err;
|
|
103
124
|
if (!/did not run \(status notProcessed\)/i.test(String(err?.message ?? err)))
|
|
104
125
|
throw err;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cspeach/cli",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.39",
|
|
4
4
|
"description": "CSPeach — AI-assisted ABAP development CLI. Direct SAP access, signed skills, safety gates.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"abap",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"@anthropic-ai/sdk": "^0.90.0",
|
|
55
55
|
"@azure/msal-node": "6.0.1",
|
|
56
56
|
"@cspeach/register-core": "0.4.0",
|
|
57
|
-
"@cspeach/sap-client": "0.1.
|
|
57
|
+
"@cspeach/sap-client": "0.1.24",
|
|
58
58
|
"@iarna/toml": "^2.2.5",
|
|
59
59
|
"@inkjs/ui": "^2.0.0",
|
|
60
60
|
"@inquirer/prompts": "^7.0.0",
|