@cspeach/cli 1.1.27 → 1.1.28
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/agent/loop.js +33 -4
- package/dist/agent/provider-shape.js +9 -2
- package/dist/agent/providers/ai-hub-provider.js +2 -2
- package/dist/agent/providers/byok-provider.js +2 -2
- package/dist/agent/providers/local-provider.js +4 -4
- package/dist/agent/system-prompt.js +34 -7
- package/dist/agent/tool-dispatch.js +20 -1
- package/dist/approvals/grant-claims.js +70 -0
- package/dist/approvals/jwt.js +21 -1
- package/dist/approvals/plan-grant.js +297 -0
- package/dist/commands/config-set.js +12 -0
- package/dist/commands/deploy-card.js +10 -5
- package/dist/commands/export-audit.js +1 -1
- package/dist/commands/plan-audit-evidence.js +47 -1
- package/dist/commands/plan-audit.js +23 -8
- package/dist/commands/plan-batch-audit.js +349 -0
- package/dist/commands/plan-boundary.js +88 -0
- package/dist/commands/plan-chain.js +409 -566
- package/dist/commands/plan-continue.js +21 -7
- package/dist/commands/plan-gate.js +28 -49
- package/dist/commands/plan-reground.js +174 -0
- package/dist/commands/plan-resume.js +227 -103
- package/dist/commands/plan-sap-pause.js +105 -0
- package/dist/commands/plan-startup.js +218 -0
- package/dist/config/loader.js +9 -0
- package/dist/doctor/checks/forge-rules.js +67 -85
- package/dist/doctor/run.js +4 -4
- package/dist/lane/app-chain.js +88 -9
- package/dist/one-shot.js +1 -0
- package/dist/projects/extract-plan.js +34 -1
- package/dist/projects/handover-md.js +1 -1
- package/dist/projects/plan-objects.js +75 -0
- package/dist/projects/plan-run.js +74 -18
- package/dist/projects/plan-schema.js +6 -0
- package/dist/projects/plan-sources.js +199 -0
- package/dist/projects/promote-command.js +1 -1
- package/dist/projects/save-command.js +11 -13
- package/dist/projects/saved-lines.js +36 -0
- package/dist/renderer/checklist-format.js +5 -5
- package/dist/renderer/machine-blocks.js +141 -0
- package/dist/renderer/tool-labels.js +3 -0
- package/dist/repl/plan-hop.js +22 -0
- package/dist/repl/rule8-detector.js +16 -1
- package/dist/repl.js +320 -55
- package/dist/router/router-core.js +2 -2
- package/dist/sap/reachability-state.js +25 -0
- package/dist/session/audit-export.js +10 -16
- package/dist/session/recap.js +16 -26
- package/dist/skills/bundled-skills.js +1 -1
- package/dist/tools/_filesystem-shared.js +37 -0
- package/dist/tools/approval.js +48 -2
- package/dist/tools/dispatch-skill.js +3 -2
- package/dist/tools/filesystem/file-read.js +5 -3
- package/dist/tools/filesystem/glob.js +27 -4
- package/dist/tools/fiori/tools.js +6 -0
- package/dist/tools/lane/app-lane-resolve.js +1 -1
- package/dist/tools/sap-read.js +37 -3
- package/dist/tools/sap-write.js +65 -0
- package/dist/tools/text-elements/pool.js +250 -0
- package/dist/tools/text-elements/tools.js +433 -0
- package/dist/tools/tool-loading.js +3 -0
- package/dist/tools/transport.js +26 -5
- package/dist/tools/write-mode.js +4 -3
- package/package.json +120 -121
- package/dist/projects/email-template.js +0 -56
package/package.json
CHANGED
|
@@ -1,121 +1,120 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@cspeach/cli",
|
|
3
|
-
"version": "1.1.
|
|
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
|
|
43
|
-
"
|
|
44
|
-
"bench:
|
|
45
|
-
"bench:
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
"@
|
|
56
|
-
"@cspeach/
|
|
57
|
-
"@
|
|
58
|
-
"@
|
|
59
|
-
"@
|
|
60
|
-
"@
|
|
61
|
-
"@
|
|
62
|
-
"@noble/
|
|
63
|
-
"@
|
|
64
|
-
"@sap-ux/
|
|
65
|
-
"@sap-ux/
|
|
66
|
-
"@sap-ux/
|
|
67
|
-
"@sap-ux/fiori-
|
|
68
|
-
"@sap-ux/
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"cli-
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
"ink": "^
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
"
|
|
83
|
-
"marked": "^
|
|
84
|
-
"
|
|
85
|
-
"mem-fs": "
|
|
86
|
-
"
|
|
87
|
-
"
|
|
88
|
-
"
|
|
89
|
-
"
|
|
90
|
-
"
|
|
91
|
-
"
|
|
92
|
-
"
|
|
93
|
-
"
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
"@
|
|
98
|
-
"@types/
|
|
99
|
-
"@types/
|
|
100
|
-
"@types/
|
|
101
|
-
"@types/
|
|
102
|
-
"@types/
|
|
103
|
-
"@types/
|
|
104
|
-
"@
|
|
105
|
-
"@ui5/
|
|
106
|
-
"
|
|
107
|
-
"
|
|
108
|
-
"
|
|
109
|
-
"
|
|
110
|
-
"
|
|
111
|
-
"
|
|
112
|
-
"
|
|
113
|
-
"
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@cspeach/cli",
|
|
3
|
+
"version": "1.1.28",
|
|
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 adt:smoke",
|
|
43
|
+
"bench:models": "tsx scripts/bench-models.ts",
|
|
44
|
+
"bench:audit": "tsx scripts/bench-audit-task.ts",
|
|
45
|
+
"bench:replay": "tsx bench/replay/run.ts",
|
|
46
|
+
"fiori": "tsx src/tools/fiori/bin.ts",
|
|
47
|
+
"prepare": "husky",
|
|
48
|
+
"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)} }\""
|
|
49
|
+
},
|
|
50
|
+
"engines": {
|
|
51
|
+
"node": ">=20.0.0"
|
|
52
|
+
},
|
|
53
|
+
"dependencies": {
|
|
54
|
+
"@anthropic-ai/sdk": "^0.90.0",
|
|
55
|
+
"@cspeach/register-core": "0.1.0",
|
|
56
|
+
"@cspeach/sap-client": "0.1.16",
|
|
57
|
+
"@iarna/toml": "^2.2.5",
|
|
58
|
+
"@inkjs/ui": "^2.0.0",
|
|
59
|
+
"@inquirer/prompts": "^7.0.0",
|
|
60
|
+
"@napi-rs/keyring": "2.1.0",
|
|
61
|
+
"@noble/ed25519": "2.1.0",
|
|
62
|
+
"@noble/hashes": "1.4.0",
|
|
63
|
+
"@sap-ux/annotation-converter": "0.10.21",
|
|
64
|
+
"@sap-ux/edmx-parser": "0.10.0",
|
|
65
|
+
"@sap-ux/fe-fpm-writer": "0.43.7",
|
|
66
|
+
"@sap-ux/fiori-elements-writer": "^3.0.39",
|
|
67
|
+
"@sap-ux/fiori-freestyle-writer": "3.0.12",
|
|
68
|
+
"@sap-ux/vocabularies-types": "0.15.0",
|
|
69
|
+
"adm-zip": "0.5.17",
|
|
70
|
+
"chalk": "^5.3.0",
|
|
71
|
+
"cli-highlight": "^2.1.11",
|
|
72
|
+
"cli-table3": "^0.6.5",
|
|
73
|
+
"clipboardy": "^5.3.1",
|
|
74
|
+
"cross-spawn": "^7.0.6",
|
|
75
|
+
"diff": "^9.0.0",
|
|
76
|
+
"ejs": "3.1.10",
|
|
77
|
+
"fuse.js": "^7.0.0",
|
|
78
|
+
"ink": "^5.0.0",
|
|
79
|
+
"ink-text-input": "^6.0.0",
|
|
80
|
+
"jose": "^5.9.0",
|
|
81
|
+
"mammoth": "^1.8.0",
|
|
82
|
+
"marked": "^11.2.0",
|
|
83
|
+
"marked-terminal": "^6.2.0",
|
|
84
|
+
"mem-fs": "2.1.0",
|
|
85
|
+
"mem-fs-editor": "9.4.0",
|
|
86
|
+
"node-machine-id": "^1.1.12",
|
|
87
|
+
"openai": "^6.49.0",
|
|
88
|
+
"puppeteer-core": "24.10.2",
|
|
89
|
+
"react": "^18.3.0",
|
|
90
|
+
"string-width": "^7.2.0",
|
|
91
|
+
"turndown": "^7.2.0",
|
|
92
|
+
"unpdf": "1.7.0",
|
|
93
|
+
"zod": "^3.23.0"
|
|
94
|
+
},
|
|
95
|
+
"devDependencies": {
|
|
96
|
+
"@sap-ux/ui5-middleware-fe-mockserver": "2.4.17",
|
|
97
|
+
"@types/adm-zip": "0.5.8",
|
|
98
|
+
"@types/cross-spawn": "^6.0.6",
|
|
99
|
+
"@types/diff": "^7.0.2",
|
|
100
|
+
"@types/ejs": "^3.1.5",
|
|
101
|
+
"@types/node": "^20.17.0",
|
|
102
|
+
"@types/react": "^18.3.0",
|
|
103
|
+
"@types/turndown": "^5.0.5",
|
|
104
|
+
"@ui5/builder": "4.3.2",
|
|
105
|
+
"@ui5/fs": "4.0.6",
|
|
106
|
+
"docx": "^9.0.2",
|
|
107
|
+
"husky": "^9.1.7",
|
|
108
|
+
"ink-testing-library": "^4.0.0",
|
|
109
|
+
"pdf-lib": "^1.17.1",
|
|
110
|
+
"strip-ansi": "6.0.1",
|
|
111
|
+
"tsx": "^4.19.0",
|
|
112
|
+
"typescript": "^5.7.0",
|
|
113
|
+
"vitest": "^2.1.0"
|
|
114
|
+
},
|
|
115
|
+
"pnpm": {
|
|
116
|
+
"onlyBuiltDependencies": [
|
|
117
|
+
"esbuild"
|
|
118
|
+
]
|
|
119
|
+
}
|
|
120
|
+
}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
const EDITOR_URL = process.env.CSPEACH_EDITOR_URL ?? 'https://cspeach.dev/edit';
|
|
2
|
-
const SUBJECT_BY_TYPE = {
|
|
3
|
-
'spec-gap': (t) => `Gap analysis — ${t}`,
|
|
4
|
-
'design': (t) => `Design — ${t}`,
|
|
5
|
-
'estimate': (t) => `Estimate — ${t}`,
|
|
6
|
-
'cca': (t) => `Custom code analysis — ${t}`,
|
|
7
|
-
'incident': (t) => `Incident report — ${t}`,
|
|
8
|
-
'upgrade-scan': (t) => `S/4HANA upgrade scan — ${t}`,
|
|
9
|
-
'upgrade-progress': (t) => `Upgrade remediation progress — ${t}`,
|
|
10
|
-
'upgrade-report': (t) => `Upgrade remediation report — ${t}`,
|
|
11
|
-
'cca-assessment': (t) => `Custom code assessment — ${t}`,
|
|
12
|
-
'modernize-result': (t) => `Modernization result — ${t}`,
|
|
13
|
-
'test-coverage': (t) => `Test coverage report — ${t}`,
|
|
14
|
-
'plan': (t) => `Project plan — ${t}`,
|
|
15
|
-
};
|
|
16
|
-
const BODY_BY_TYPE = {
|
|
17
|
-
'spec-gap': (a) => `Attached is the gap analysis for the ${a.title}.\n${a.itemCount} ${a.itemNoun} across business / data / authorisation / edge cases.`,
|
|
18
|
-
'design': (a) => `Attached is the architecture design for the ${a.title}.\n${a.itemCount} ${a.itemNoun} to review (keep / redesign / defer).`,
|
|
19
|
-
'estimate': (a) => `Attached is the effort estimate for the ${a.title}.\n${a.itemCount} ${a.itemNoun} to review (confirm / dispute / defer).`,
|
|
20
|
-
'cca': (a) => `Attached is the custom code analysis for the ${a.title}.\n${a.itemCount} ${a.itemNoun} classified.`,
|
|
21
|
-
'incident': (a) => `Attached is the incident report for the ${a.title}.`,
|
|
22
|
-
'upgrade-scan': (a) => `Attached is the S/4HANA upgrade scan baseline for ${a.title}.\n${a.itemCount} ${a.itemNoun} to remediate.`,
|
|
23
|
-
'upgrade-progress': (a) => `Attached is the upgrade remediation progress for ${a.title}.\n${a.itemCount} ${a.itemNoun} attempted.`,
|
|
24
|
-
'upgrade-report': (a) => `Attached is the upgrade remediation report for ${a.title}.\n${a.itemCount} ${a.itemNoun} listed (regressions to address before sign-off).`,
|
|
25
|
-
'cca-assessment': (a) => `Attached is the custom code assessment for ${a.title}.\n${a.itemCount} ${a.itemNoun} classified — review keep / fix / retire / redesign per object.`,
|
|
26
|
-
'modernize-result': (a) => `Attached is the modernization result for ${a.title}.\n${a.itemCount} ${a.itemNoun} attempted — review applied / skipped / failed per object before sign-off.`,
|
|
27
|
-
'test-coverage': (a) => `Attached is the test coverage report for ${a.title}.\n${a.itemCount} test ${a.itemNoun} generated — review the targets + method counts before merging.`,
|
|
28
|
-
'plan': (a) => `Attached is the project plan for ${a.title}.\n${a.itemCount} ${a.itemNoun} ordered bottom-up — each phase runs in its own session via /abap-plan --resume.`,
|
|
29
|
-
};
|
|
30
|
-
export function renderEmailTemplate(a) {
|
|
31
|
-
const subject = SUBJECT_BY_TYPE[a.artefactType](a.title);
|
|
32
|
-
const body = BODY_BY_TYPE[a.artefactType](a);
|
|
33
|
-
return [
|
|
34
|
-
'─────────────────────────────────────────────────────────────────',
|
|
35
|
-
'Suggested email — copy from below the line, edit, send',
|
|
36
|
-
'─────────────────────────────────────────────────────────────────',
|
|
37
|
-
`Subject: ${subject}`,
|
|
38
|
-
'',
|
|
39
|
-
'Hi,',
|
|
40
|
-
'',
|
|
41
|
-
body,
|
|
42
|
-
'',
|
|
43
|
-
'To review:',
|
|
44
|
-
` 1. Open ${EDITOR_URL}`,
|
|
45
|
-
` 2. Drag the attached ${a.filename} onto the page`,
|
|
46
|
-
' 3. Click each item, mark its status, add comments',
|
|
47
|
-
' 4. Click "Download updated file"',
|
|
48
|
-
' 5. Email me the downloaded file',
|
|
49
|
-
'',
|
|
50
|
-
'If your email blocks .json, rename it to .cspeach.json.txt before sending —',
|
|
51
|
-
'the editor accepts both.',
|
|
52
|
-
'',
|
|
53
|
-
'Thanks,',
|
|
54
|
-
a.author,
|
|
55
|
-
].join('\n');
|
|
56
|
-
}
|