@cspeach/cli 0.6.1 → 0.6.3
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 +116 -108
- package/dist/agent/anthropic-provider.js +2 -1
- package/dist/cli.js +2 -1
- package/dist/lib/version.js +16 -0
- package/dist/renderer/banners.js +2 -1
- package/dist/upgrade-check.js +2 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,108 +1,116 @@
|
|
|
1
|
-
# CSPeach
|
|
2
|
-
|
|
3
|
-
AI-assisted ABAP development CLI. 34 skills, direct SAP access, safety
|
|
4
|
-
gates the model cannot bypass.
|
|
5
|
-
|
|
6
|
-
## Install
|
|
7
|
-
|
|
8
|
-
```bash
|
|
9
|
-
npm install -g @cspeach/cli
|
|
10
|
-
```
|
|
11
|
-
|
|
12
|
-
Requires Node.js 20+. After install:
|
|
13
|
-
|
|
14
|
-
```bash
|
|
15
|
-
cspeach login # opens browser, authorizes this machine
|
|
16
|
-
cspeach config add-sap
|
|
17
|
-
cspeach # interactive REPL
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
## What it does
|
|
21
|
-
|
|
22
|
-
CSPeach runs an AI consultant against your own SAP. Pick a skill (or type a
|
|
23
|
-
prompt — the classifier picks one for you):
|
|
24
|
-
|
|
25
|
-
```text
|
|
26
|
-
/abap-spec-gap find missing questions before any code is written
|
|
27
|
-
/abap-design object list + dependency DAG
|
|
28
|
-
/abap-estimate component-level hours with optimistic / realistic /
|
|
29
|
-
pessimistic ranges
|
|
30
|
-
/abap-cca estate-wide custom-code analysis for S/4HANA
|
|
31
|
-
/abap-upgrade-scan baseline scan against the readiness variant
|
|
32
|
-
/abap-upgrade-fix interactive fix loop with per-object approval
|
|
33
|
-
/abap-incident short dump → fix → verify → handover
|
|
34
|
-
cspeach --help full skill list (34 total)
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
Every turn runs locally on your machine. SAP source and SAP data flow through
|
|
38
|
-
`api.cspeach.dev` to the LLM. The proxy logs request metadata (skill, model,
|
|
39
|
-
token counts, latency) for billing; the message body is forwarded to
|
|
40
|
-
Anthropic and not stored on the proxy. SAP credentials never leave your
|
|
41
|
-
machine.
|
|
42
|
-
|
|
43
|
-
## Safety
|
|
44
|
-
|
|
45
|
-
- **Snapshot gate** — every write auto-snapshots first
|
|
46
|
-
- **
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
-
|
|
100
|
-
-
|
|
101
|
-
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
laeeq.siddique@cremencing.com
|
|
1
|
+
# CSPeach
|
|
2
|
+
|
|
3
|
+
AI-assisted ABAP development CLI. 34 skills, direct SAP access, safety
|
|
4
|
+
gates the model cannot bypass.
|
|
5
|
+
|
|
6
|
+
## Install
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
npm install -g @cspeach/cli
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Requires Node.js 20+. After install:
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
cspeach login # opens browser, authorizes this machine
|
|
16
|
+
cspeach config add-sap
|
|
17
|
+
cspeach # interactive REPL
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## What it does
|
|
21
|
+
|
|
22
|
+
CSPeach runs an AI consultant against your own SAP. Pick a skill (or type a
|
|
23
|
+
prompt — the classifier picks one for you):
|
|
24
|
+
|
|
25
|
+
```text
|
|
26
|
+
/abap-spec-gap find missing questions before any code is written
|
|
27
|
+
/abap-design object list + dependency DAG
|
|
28
|
+
/abap-estimate component-level hours with optimistic / realistic /
|
|
29
|
+
pessimistic ranges
|
|
30
|
+
/abap-cca estate-wide custom-code analysis for S/4HANA
|
|
31
|
+
/abap-upgrade-scan baseline scan against the readiness variant
|
|
32
|
+
/abap-upgrade-fix interactive fix loop with per-object approval
|
|
33
|
+
/abap-incident short dump → fix → verify → handover
|
|
34
|
+
cspeach --help full skill list (34 total)
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Every turn runs locally on your machine. SAP source and SAP data flow through
|
|
38
|
+
`api.cspeach.dev` to the LLM. The proxy logs request metadata (skill, model,
|
|
39
|
+
token counts, latency) for billing; the message body is forwarded to
|
|
40
|
+
Anthropic and not stored on the proxy. SAP credentials never leave your
|
|
41
|
+
machine.
|
|
42
|
+
|
|
43
|
+
## Safety
|
|
44
|
+
|
|
45
|
+
- **Snapshot gate** — every SAP write auto-snapshots first
|
|
46
|
+
- **SAP approval gate** — SAP-write and transport tools (`sap_set_source`,
|
|
47
|
+
`sap_create_object`, `sap_delete_object`, `sap_update_method`,
|
|
48
|
+
`sap_activate`, `sap_transport_*`) require a single-use JWT bound to
|
|
49
|
+
(object, operation); the model sees a plan, you approve each change
|
|
50
|
+
- **Optional tools default OFF** — filesystem, shell, web, and subagent
|
|
51
|
+
tools are invisible to the model unless you set `CSPEACH_TOOL_<NAME>=on`
|
|
52
|
+
in the environment
|
|
53
|
+
- **Batch-write interrupt** — any second mutating call in a single turn
|
|
54
|
+
(Rule 8, any tool category) pauses for an explicit yes/no before it runs
|
|
55
|
+
- **Verify gate** — every SAP write is syntax-checked; activation blocked on
|
|
56
|
+
errors
|
|
57
|
+
- **Transport discipline** — all SAP writes land in your session transport;
|
|
58
|
+
`$TMP` is opt-in
|
|
59
|
+
|
|
60
|
+
Ten Forge Rules are non-negotiable. Full philosophy in the `CSPeach Principles`
|
|
61
|
+
preamble shown to the model every turn.
|
|
62
|
+
|
|
63
|
+
## Configuration
|
|
64
|
+
|
|
65
|
+
`~/.cspeach/config.toml` is created on first `cspeach config add-sap`:
|
|
66
|
+
|
|
67
|
+
```toml
|
|
68
|
+
proxy_url = "https://api.cspeach.dev"
|
|
69
|
+
default_model = "claude-opus-4-7"
|
|
70
|
+
|
|
71
|
+
[sap.S4H-DEV]
|
|
72
|
+
host = "sap-dev.company.com"
|
|
73
|
+
port = 44300
|
|
74
|
+
client = "100"
|
|
75
|
+
useSsl = true
|
|
76
|
+
username = "S.LAEEQ"
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
SAP passwords are stored in your OS keychain.
|
|
80
|
+
|
|
81
|
+
## Common commands
|
|
82
|
+
|
|
83
|
+
```text
|
|
84
|
+
cspeach login sign in to api.cspeach.dev
|
|
85
|
+
cspeach whoami show signed-in identity + plan/trial
|
|
86
|
+
cspeach logout clear local auth
|
|
87
|
+
cspeach config add-sap add a SAP system
|
|
88
|
+
cspeach doctor diagnose install + connectivity
|
|
89
|
+
cspeach --resume resume a prior session
|
|
90
|
+
cspeach --upgrade pull the latest CLI release
|
|
91
|
+
cspeach --version
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## Troubleshooting
|
|
95
|
+
|
|
96
|
+
If `cspeach doctor` fails:
|
|
97
|
+
|
|
98
|
+
- **`auth`** — run `cspeach login` again
|
|
99
|
+
- **`keychain`** — Windows Credential Manager / libsecret missing; CSPeach
|
|
100
|
+
falls back to per-session prompts, slower but functional
|
|
101
|
+
- **`sap`** — host unreachable; check VPN + the host/port in config
|
|
102
|
+
|
|
103
|
+
If the REPL hangs on first prompt, check `https://api.cspeach.dev/health`.
|
|
104
|
+
|
|
105
|
+
## Links
|
|
106
|
+
|
|
107
|
+
- **Landing**: https://cspeach.dev
|
|
108
|
+
- **Contact**: laeeq.siddique@cremencing.com
|
|
109
|
+
- **LinkedIn**: @laeeqsiddique
|
|
110
|
+
|
|
111
|
+
## License
|
|
112
|
+
|
|
113
|
+
Proprietary. Copyright (c) 2026 Cremencing Solutions. All rights reserved.
|
|
114
|
+
Free to use under your active [CSPeach plan](https://cspeach.dev); not free
|
|
115
|
+
to redistribute, fork, or sublicense. Commercial / OEM licensing:
|
|
116
|
+
laeeq.siddique@cremencing.com.
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
import Anthropic from '@anthropic-ai/sdk';
|
|
10
10
|
import { getDeviceFingerprint } from '../auth/device.js';
|
|
11
11
|
import { createManagedSkillSource } from '../skills/source-managed.js';
|
|
12
|
+
import { CLI_VERSION } from '../lib/version.js';
|
|
12
13
|
export function createManagedProvider(cfg, getBearer) {
|
|
13
14
|
const skillSource = createManagedSkillSource(cfg, getBearer);
|
|
14
15
|
return {
|
|
@@ -18,7 +19,7 @@ export function createManagedProvider(cfg, getBearer) {
|
|
|
18
19
|
async createStream(params, options = {}) {
|
|
19
20
|
const bearer = await getBearer();
|
|
20
21
|
const device = await getDeviceFingerprint();
|
|
21
|
-
const cliVersion =
|
|
22
|
+
const cliVersion = CLI_VERSION;
|
|
22
23
|
const sdk = new Anthropic({
|
|
23
24
|
apiKey: 'proxy-bearer-auth', // ignored by our proxy; SDK requires non-empty
|
|
24
25
|
baseURL: cfg.proxy_url.replace(/\/$/, '') + '/',
|
package/dist/cli.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import chalk from 'chalk';
|
|
2
|
+
import { CLI_VERSION } from './lib/version.js';
|
|
2
3
|
import { runAddSapWizard } from './sap/onboarding.js';
|
|
3
4
|
import { runGcOnStartup } from './session/gc.js';
|
|
4
5
|
import { checkForUpgrade } from './upgrade-check.js';
|
|
@@ -12,7 +13,7 @@ export async function main(argv) {
|
|
|
12
13
|
return 0;
|
|
13
14
|
}
|
|
14
15
|
if (args[0] === '--version') {
|
|
15
|
-
console.log(
|
|
16
|
+
console.log(CLI_VERSION);
|
|
16
17
|
return 0;
|
|
17
18
|
}
|
|
18
19
|
if (args[0] === '--upgrade') {
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI_VERSION — read once from the package.json at module load.
|
|
3
|
+
*
|
|
4
|
+
* Why not process.env.npm_package_version: that env var is only set when
|
|
5
|
+
* npm itself invokes a script (e.g. `npm run start`). When a user runs the
|
|
6
|
+
* installed `cspeach` binary directly, the env var is undefined and we'd
|
|
7
|
+
* fall back to a hardcoded literal — which silently rots on every release.
|
|
8
|
+
*/
|
|
9
|
+
import { readFileSync } from 'node:fs';
|
|
10
|
+
import { fileURLToPath } from 'node:url';
|
|
11
|
+
import { dirname, resolve } from 'node:path';
|
|
12
|
+
const here = dirname(fileURLToPath(import.meta.url));
|
|
13
|
+
// dist/lib/version.js → dist/lib/.. → dist → ../../package.json
|
|
14
|
+
const pkgPath = resolve(here, '../../package.json');
|
|
15
|
+
const pkg = JSON.parse(readFileSync(pkgPath, 'utf8'));
|
|
16
|
+
export const CLI_VERSION = pkg.version;
|
package/dist/renderer/banners.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import chalk from 'chalk';
|
|
2
|
+
import { CLI_VERSION } from '../lib/version.js';
|
|
2
3
|
/** CSPeach brand colour — used for the brand-name text in the startup line,
|
|
3
4
|
* the tool-dispatch bullet (⏺), and the result continuation glyph (⎿).
|
|
4
5
|
* Single source of truth so a future rebrand is one find-replace.
|
|
@@ -26,7 +27,7 @@ export const PEACH = '#FFCBA4';
|
|
|
26
27
|
* which is why the literal exists at all.
|
|
27
28
|
*/
|
|
28
29
|
export function printStartupBanner() {
|
|
29
|
-
const version =
|
|
30
|
+
const version = CLI_VERSION;
|
|
30
31
|
console.log('');
|
|
31
32
|
console.log(`🍑 ${chalk.hex(PEACH).bold('CSPeach')} ${chalk.white.bold('v' + version)}`);
|
|
32
33
|
console.log(` ${chalk.gray('ABAP + AI + safety gates')} ${chalk.dim('·')} ${chalk.gray('by Cremencing Solutions')}`);
|
package/dist/upgrade-check.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import chalk from 'chalk';
|
|
2
2
|
import { loadConfig } from './config/loader.js';
|
|
3
|
+
import { CLI_VERSION } from './lib/version.js';
|
|
3
4
|
function compareVersions(a, b) {
|
|
4
5
|
const pa = a.split('.').map(Number);
|
|
5
6
|
const pb = b.split('.').map(Number);
|
|
@@ -16,7 +17,7 @@ export async function checkForUpgrade() {
|
|
|
16
17
|
try {
|
|
17
18
|
const r = await fetch(`${cfg.proxy_url}/v1/skills/abap-radar`, { method: 'HEAD', signal: AbortSignal.timeout(3000) });
|
|
18
19
|
const minCli = r.headers.get('x-skill-min-cli-version');
|
|
19
|
-
const current =
|
|
20
|
+
const current = CLI_VERSION;
|
|
20
21
|
if (minCli && compareVersions(current, minCli) < 0) {
|
|
21
22
|
console.log(chalk.yellow.bold(`\n⚠ Your cspeach (${current}) is older than the minimum required (${minCli}).`));
|
|
22
23
|
console.log(chalk.yellow(` Run: cspeach --upgrade\n`));
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cspeach/cli",
|
|
3
|
-
"version": "0.6.
|
|
4
|
-
"description": "CSPeach — AI-assisted ABAP development CLI. Direct SAP access,
|
|
3
|
+
"version": "0.6.3",
|
|
4
|
+
"description": "CSPeach — AI-assisted ABAP development CLI. Direct SAP access, 34 skills, safety gates.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"abap",
|
|
7
7
|
"sap",
|