@cspeach/cli 1.1.25 → 1.1.27

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 (55) hide show
  1. package/dist/agent/loop.js +28 -9
  2. package/dist/agent/tool-dispatch.js +6 -0
  3. package/dist/auth/auth-file.js +173 -12
  4. package/dist/classifier/client.js +55 -30
  5. package/dist/cli.js +11 -0
  6. package/dist/commands/config-set.js +13 -0
  7. package/dist/commands/config-show.js +5 -1
  8. package/dist/commands/cost.js +24 -22
  9. package/dist/commands/deploy-card.js +135 -0
  10. package/dist/commands/login.js +31 -13
  11. package/dist/commands/plan-chain.js +31 -0
  12. package/dist/commands/plan-continue.js +1 -0
  13. package/dist/commands/plan-resume.js +49 -2
  14. package/dist/commands/whoami.js +1 -1
  15. package/dist/cost/cost-log.js +76 -4
  16. package/dist/cost/credits-wire.js +9 -0
  17. package/dist/cost/credits.js +24 -6
  18. package/dist/cost/router-spend.js +24 -0
  19. package/dist/cost/session-cost.js +16 -2
  20. package/dist/doctor/checks/skill.js +60 -11
  21. package/dist/doctor/run.js +0 -2
  22. package/dist/lane/app-chain.js +28 -0
  23. package/dist/models/server-config.js +21 -1
  24. package/dist/one-shot.js +12 -2
  25. package/dist/projects/extract-design.js +4 -3
  26. package/dist/projects/extract-estimate.js +4 -3
  27. package/dist/projects/extract-spec-gap.js +28 -5
  28. package/dist/projects/plan-lane.js +47 -0
  29. package/dist/projects/plan-run.js +8 -0
  30. package/dist/projects/plan-schema.js +2 -0
  31. package/dist/projects/save-command.js +7 -3
  32. package/dist/projects/title-heading.js +36 -0
  33. package/dist/renderer/footer-line.js +10 -4
  34. package/dist/renderer/status-footer.js +5 -4
  35. package/dist/renderer/thinking-heartbeat.js +2 -1
  36. package/dist/renderer/tool-labels.js +2 -1
  37. package/dist/repl.js +41 -8
  38. package/dist/router/byok-classifier.js +159 -0
  39. package/dist/router/classifier.js +130 -6
  40. package/dist/router/router-core.js +307 -0
  41. package/dist/router/router-prompt.js +121 -0
  42. package/dist/router/routing-failure.js +65 -3
  43. package/dist/sap/unreachable.js +4 -1
  44. package/dist/skills/bundled-skills.js +45 -45
  45. package/dist/tools/fiori/deploy/existing-bsp.js +67 -0
  46. package/dist/tools/fiori/deploy/run.js +608 -0
  47. package/dist/tools/fiori/deploy/scope.js +8 -0
  48. package/dist/tools/fiori/deploy/yaml-read.js +236 -0
  49. package/dist/tools/fiori/deploy-config.js +24 -6
  50. package/dist/tools/fiori/tools.js +117 -5
  51. package/dist/tools/local-build.js +3 -0
  52. package/dist/tools/subagent/read_agent.js +4 -2
  53. package/dist/tools/tool-loading.js +1 -1
  54. package/package.json +121 -121
  55. package/dist/doctor/checks/zcspeach.js +0 -96
package/package.json CHANGED
@@ -1,121 +1,121 @@
1
- {
2
- "name": "@cspeach/cli",
3
- "version": "1.1.25",
4
- "description": "CSPeach — AI-assisted ABAP development CLI. Direct SAP access, 34 skills, safety gates.",
5
- "keywords": [
6
- "abap",
7
- "sap",
8
- "ai",
9
- "cli",
10
- "ai-assisted-development",
11
- "s4hana",
12
- "abap-development",
13
- "claude",
14
- "anthropic"
15
- ],
16
- "homepage": "https://cspeach.dev",
17
- "bugs": {
18
- "email": "laeeq.siddique@cremencing.com"
19
- },
20
- "author": "Laeeq Siddique (Cremencing Solutions)",
21
- "license": "SEE LICENSE IN LICENSE",
22
- "private": false,
23
- "publishConfig": {
24
- "access": "public"
25
- },
26
- "type": "module",
27
- "bin": {
28
- "cspeach": "dist/index.js"
29
- },
30
- "scripts": {
31
- "dev": "tsx src/index.ts",
32
- "prebuild": "tsx scripts/prebuild.ts",
33
- "build": "tsc && node scripts/make-bin-executable.js",
34
- "install:global": "tsx scripts/install-global.ts",
35
- "pretest": "tsx scripts/sync-signing-key.ts || node -e \"console.warn('WARN: sync-signing-key skipped — using stub')\"",
36
- "start": "node dist/index.js",
37
- "typecheck": "tsc --noEmit",
38
- "test": "vitest run",
39
- "test:watch": "vitest",
40
- "test:smoke-e2e": "vitest run --config vitest.smoke-e2e.config.ts",
41
- "adt:smoke": "tsx scripts/adt-smoke.ts",
42
- "smoke:all": "pnpm zcspeach:smoke && pnpm adt:smoke",
43
- "zcspeach:smoke": "tsx scripts/zcspeach-smoke.ts",
44
- "bench:models": "tsx scripts/bench-models.ts",
45
- "bench:audit": "tsx scripts/bench-audit-task.ts",
46
- "bench:replay": "tsx bench/replay/run.ts",
47
- "fiori": "tsx src/tools/fiori/bin.ts",
48
- "prepare": "husky",
49
- "prepublishOnly": "node -e \"const deps=require('./package.json').dependencies||{}; for (const n of ['@cspeach/sap-client','@cspeach/register-core']) { const d=deps[n]||''; if(d.startsWith('file:')||d.startsWith('link:')){console.error('publish blocked: '+n+' is a local link ('+d+') — point it at the published version before npm publish'); process.exit(1)} }\""
50
- },
51
- "engines": {
52
- "node": ">=20.0.0"
53
- },
54
- "dependencies": {
55
- "@anthropic-ai/sdk": "^0.90.0",
56
- "@cspeach/register-core": "0.1.0",
57
- "@cspeach/sap-client": "0.1.15",
58
- "@iarna/toml": "^2.2.5",
59
- "@inkjs/ui": "^2.0.0",
60
- "@inquirer/prompts": "^7.0.0",
61
- "@napi-rs/keyring": "2.1.0",
62
- "@noble/ed25519": "2.1.0",
63
- "@noble/hashes": "1.4.0",
64
- "@sap-ux/annotation-converter": "0.10.21",
65
- "@sap-ux/edmx-parser": "0.10.0",
66
- "@sap-ux/fe-fpm-writer": "0.43.7",
67
- "@sap-ux/fiori-elements-writer": "^3.0.39",
68
- "@sap-ux/fiori-freestyle-writer": "3.0.12",
69
- "@sap-ux/vocabularies-types": "0.15.0",
70
- "adm-zip": "0.5.17",
71
- "chalk": "^5.3.0",
72
- "cli-highlight": "^2.1.11",
73
- "cli-table3": "^0.6.5",
74
- "clipboardy": "^5.3.1",
75
- "cross-spawn": "^7.0.6",
76
- "diff": "^9.0.0",
77
- "ejs": "3.1.10",
78
- "fuse.js": "^7.0.0",
79
- "ink": "^5.0.0",
80
- "ink-text-input": "^6.0.0",
81
- "jose": "^5.9.0",
82
- "mammoth": "^1.8.0",
83
- "marked": "^11.2.0",
84
- "marked-terminal": "^6.2.0",
85
- "mem-fs": "2.1.0",
86
- "mem-fs-editor": "9.4.0",
87
- "node-machine-id": "^1.1.12",
88
- "openai": "^6.49.0",
89
- "puppeteer-core": "24.10.2",
90
- "react": "^18.3.0",
91
- "string-width": "^7.2.0",
92
- "turndown": "^7.2.0",
93
- "unpdf": "1.7.0",
94
- "zod": "^3.23.0"
95
- },
96
- "devDependencies": {
97
- "@sap-ux/ui5-middleware-fe-mockserver": "2.4.17",
98
- "@types/adm-zip": "0.5.8",
99
- "@types/cross-spawn": "^6.0.6",
100
- "@types/diff": "^7.0.2",
101
- "@types/ejs": "^3.1.5",
102
- "@types/node": "^20.17.0",
103
- "@types/react": "^18.3.0",
104
- "@types/turndown": "^5.0.5",
105
- "@ui5/builder": "4.3.2",
106
- "@ui5/fs": "4.0.6",
107
- "docx": "^9.0.2",
108
- "husky": "^9.1.7",
109
- "ink-testing-library": "^4.0.0",
110
- "pdf-lib": "^1.17.1",
111
- "strip-ansi": "6.0.1",
112
- "tsx": "^4.19.0",
113
- "typescript": "^5.7.0",
114
- "vitest": "^2.1.0"
115
- },
116
- "pnpm": {
117
- "onlyBuiltDependencies": [
118
- "esbuild"
119
- ]
120
- }
121
- }
1
+ {
2
+ "name": "@cspeach/cli",
3
+ "version": "1.1.27",
4
+ "description": "CSPeach — AI-assisted ABAP development CLI. Direct SAP access, 34 skills, safety gates.",
5
+ "keywords": [
6
+ "abap",
7
+ "sap",
8
+ "ai",
9
+ "cli",
10
+ "ai-assisted-development",
11
+ "s4hana",
12
+ "abap-development",
13
+ "claude",
14
+ "anthropic"
15
+ ],
16
+ "homepage": "https://cspeach.dev",
17
+ "bugs": {
18
+ "email": "laeeq.siddique@cremencing.com"
19
+ },
20
+ "author": "Laeeq Siddique (Cremencing Solutions)",
21
+ "license": "SEE LICENSE IN LICENSE",
22
+ "private": false,
23
+ "publishConfig": {
24
+ "access": "public"
25
+ },
26
+ "type": "module",
27
+ "bin": {
28
+ "cspeach": "dist/index.js"
29
+ },
30
+ "scripts": {
31
+ "dev": "tsx src/index.ts",
32
+ "prebuild": "tsx scripts/prebuild.ts",
33
+ "build": "tsc && node scripts/make-bin-executable.js",
34
+ "install:global": "tsx scripts/install-global.ts",
35
+ "pretest": "tsx scripts/sync-signing-key.ts || node -e \"console.warn('WARN: sync-signing-key skipped — using stub')\"",
36
+ "start": "node dist/index.js",
37
+ "typecheck": "tsc --noEmit",
38
+ "test": "vitest run",
39
+ "test:watch": "vitest",
40
+ "test:smoke-e2e": "vitest run --config vitest.smoke-e2e.config.ts",
41
+ "adt:smoke": "tsx scripts/adt-smoke.ts",
42
+ "smoke:all": "pnpm zcspeach:smoke && pnpm adt:smoke",
43
+ "zcspeach:smoke": "tsx scripts/zcspeach-smoke.ts",
44
+ "bench:models": "tsx scripts/bench-models.ts",
45
+ "bench:audit": "tsx scripts/bench-audit-task.ts",
46
+ "bench:replay": "tsx bench/replay/run.ts",
47
+ "fiori": "tsx src/tools/fiori/bin.ts",
48
+ "prepare": "husky",
49
+ "prepublishOnly": "node -e \"const deps=require('./package.json').dependencies||{}; for (const n of ['@cspeach/sap-client','@cspeach/register-core']) { const d=deps[n]||''; if(d.startsWith('file:')||d.startsWith('link:')){console.error('publish blocked: '+n+' is a local link ('+d+') — point it at the published version before npm publish'); process.exit(1)} }\""
50
+ },
51
+ "engines": {
52
+ "node": ">=20.0.0"
53
+ },
54
+ "dependencies": {
55
+ "@anthropic-ai/sdk": "^0.90.0",
56
+ "@cspeach/register-core": "0.1.0",
57
+ "@cspeach/sap-client": "0.1.15",
58
+ "@iarna/toml": "^2.2.5",
59
+ "@inkjs/ui": "^2.0.0",
60
+ "@inquirer/prompts": "^7.0.0",
61
+ "@napi-rs/keyring": "2.1.0",
62
+ "@noble/ed25519": "2.1.0",
63
+ "@noble/hashes": "1.4.0",
64
+ "@sap-ux/annotation-converter": "0.10.21",
65
+ "@sap-ux/edmx-parser": "0.10.0",
66
+ "@sap-ux/fe-fpm-writer": "0.43.7",
67
+ "@sap-ux/fiori-elements-writer": "^3.0.39",
68
+ "@sap-ux/fiori-freestyle-writer": "3.0.12",
69
+ "@sap-ux/vocabularies-types": "0.15.0",
70
+ "adm-zip": "0.5.17",
71
+ "chalk": "^5.3.0",
72
+ "cli-highlight": "^2.1.11",
73
+ "cli-table3": "^0.6.5",
74
+ "clipboardy": "^5.3.1",
75
+ "cross-spawn": "^7.0.6",
76
+ "diff": "^9.0.0",
77
+ "ejs": "3.1.10",
78
+ "fuse.js": "^7.0.0",
79
+ "ink": "^5.0.0",
80
+ "ink-text-input": "^6.0.0",
81
+ "jose": "^5.9.0",
82
+ "mammoth": "^1.8.0",
83
+ "marked": "^11.2.0",
84
+ "marked-terminal": "^6.2.0",
85
+ "mem-fs": "2.1.0",
86
+ "mem-fs-editor": "9.4.0",
87
+ "node-machine-id": "^1.1.12",
88
+ "openai": "^6.49.0",
89
+ "puppeteer-core": "24.10.2",
90
+ "react": "^18.3.0",
91
+ "string-width": "^7.2.0",
92
+ "turndown": "^7.2.0",
93
+ "unpdf": "1.7.0",
94
+ "zod": "^3.23.0"
95
+ },
96
+ "devDependencies": {
97
+ "@sap-ux/ui5-middleware-fe-mockserver": "2.4.17",
98
+ "@types/adm-zip": "0.5.8",
99
+ "@types/cross-spawn": "^6.0.6",
100
+ "@types/diff": "^7.0.2",
101
+ "@types/ejs": "^3.1.5",
102
+ "@types/node": "^20.17.0",
103
+ "@types/react": "^18.3.0",
104
+ "@types/turndown": "^5.0.5",
105
+ "@ui5/builder": "4.3.2",
106
+ "@ui5/fs": "4.0.6",
107
+ "docx": "^9.0.2",
108
+ "husky": "^9.1.7",
109
+ "ink-testing-library": "^4.0.0",
110
+ "pdf-lib": "^1.17.1",
111
+ "strip-ansi": "6.0.1",
112
+ "tsx": "^4.19.0",
113
+ "typescript": "^5.7.0",
114
+ "vitest": "^2.1.0"
115
+ },
116
+ "pnpm": {
117
+ "onlyBuiltDependencies": [
118
+ "esbuild"
119
+ ]
120
+ }
121
+ }
@@ -1,96 +0,0 @@
1
- import keychain from '../../auth/keychain.js';
2
- import { readFile } from 'node:fs/promises';
3
- import { loadConfig, resolveSapTls } from '../../config/loader.js';
4
- import { probeGet } from './_http-probe.js';
5
- import { sapChecksSkipped, standaloneSkip } from './_standalone-skip.js';
6
- const SAP_SERVICE = 'cspeach-sap';
7
- export async function checkZcspeach() {
8
- const cfg = await loadConfig();
9
- // Standalone mode ONLY — an opted-in paste-mode user has nothing to probe.
10
- // Everything below (including the no-alias failure) is unchanged.
11
- if (sapChecksSkipped(cfg))
12
- return standaloneSkip('zcspeach');
13
- const systems = Object.entries(cfg.sap);
14
- if (systems.length === 0) {
15
- return {
16
- name: 'zcspeach',
17
- ok: false,
18
- message: 'no SAP systems configured',
19
- hint: 'Run: cspeach config add-sap',
20
- };
21
- }
22
- const results = [];
23
- let anyFailed = false;
24
- for (const [alias, sys] of systems) {
25
- const protocol = sys.useSsl ? 'https' : 'http';
26
- const url = `${protocol}://${sys.host}:${sys.port}/sap/bc/zcspeach/discovery`;
27
- let pwd = null;
28
- try {
29
- pwd = await keychain.getPassword(SAP_SERVICE, alias);
30
- }
31
- catch {
32
- // keychain unavailable — fall through, will be skipped below
33
- }
34
- if (!pwd) {
35
- results.push(`${alias}: skipped (no password in keychain)`);
36
- continue;
37
- }
38
- // TLS posture (2026-06-14): verification ON by default; resolveSapTls maps
39
- // the per-alias config (ca_cert_path / insecure_skip_tls_verify, legacy
40
- // sslVerify:false fallback). See checks/_http-probe.ts.
41
- const tls = resolveSapTls(sys);
42
- let ca;
43
- if (tls.mode === 'ca-trusted' && tls.caCertPath) {
44
- try {
45
- ca = await readFile(tls.caCertPath);
46
- }
47
- catch (e) {
48
- results.push(`${alias}: CA unreadable at ${tls.caCertPath} (${e.message})`);
49
- anyFailed = true;
50
- continue;
51
- }
52
- }
53
- const r = await probeGet(url, {
54
- rejectUnauthorized: tls.mode !== 'insecure',
55
- ca,
56
- auth: `${sys.username}:${pwd}`,
57
- accept: 'application/json',
58
- timeoutMs: 5000,
59
- });
60
- if (r.error) {
61
- results.push(`${alias}: ${r.error}`);
62
- anyFailed = true;
63
- continue;
64
- }
65
- if (r.status < 200 || r.status >= 300) {
66
- results.push(`${alias}: HTTP ${r.status} from /zcspeach/discovery`);
67
- anyFailed = true;
68
- continue;
69
- }
70
- let body;
71
- try {
72
- body = JSON.parse(r.body);
73
- }
74
- catch {
75
- results.push(`${alias}: invalid JSON from /zcspeach/discovery`);
76
- anyFailed = true;
77
- continue;
78
- }
79
- if (body.status !== 'ok') {
80
- results.push(`${alias}: discovery returned status=${body.status ?? '<missing>'}`);
81
- anyFailed = true;
82
- continue;
83
- }
84
- const ver = body.data?.version ?? '<missing>';
85
- const ops = body.data?.operations?.length ?? 0;
86
- results.push(`${alias}: v${ver}, ${ops} ops`);
87
- }
88
- return {
89
- name: 'zcspeach',
90
- ok: !anyFailed,
91
- message: results.join('; '),
92
- hint: anyFailed
93
- ? 'SICF node /sap/bc/zcspeach must be active; ensure SAP_BASIS supports the framework'
94
- : undefined,
95
- };
96
- }