@ekzs/cli 0.3.5 → 0.3.8
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/LICENSE +21 -0
- package/README.md +12 -12
- package/dist/commands/ask.d.ts.map +1 -1
- package/dist/commands/ask.js +12 -5
- package/dist/commands/local-agent.d.ts.map +1 -1
- package/dist/commands/local-agent.js +47 -3
- package/dist/lib/context.d.ts +12 -2
- package/dist/lib/context.d.ts.map +1 -1
- package/dist/lib/context.js +75 -23
- package/dist/lib/doctor-quiet.d.ts +3 -1
- package/dist/lib/doctor-quiet.d.ts.map +1 -1
- package/dist/lib/doctor-quiet.js +16 -2
- package/dist/lib/local-answer.d.ts +4 -0
- package/dist/lib/local-answer.d.ts.map +1 -0
- package/dist/lib/local-answer.js +26 -0
- package/dist/lib/providers/agent-runner.d.ts +1 -0
- package/dist/lib/providers/agent-runner.d.ts.map +1 -1
- package/dist/lib/providers/agent-runner.js +48 -22
- package/dist/lib/providers/catalog.d.ts +14 -0
- package/dist/lib/providers/catalog.d.ts.map +1 -1
- package/dist/lib/providers/catalog.js +125 -38
- package/dist/lib/providers/chat.d.ts.map +1 -1
- package/dist/lib/providers/chat.js +46 -31
- package/dist/lib/providers/cursor-runner.d.ts.map +1 -1
- package/dist/lib/providers/cursor-runner.js +16 -8
- package/dist/lib/providers/http.d.ts +6 -0
- package/dist/lib/providers/http.d.ts.map +1 -0
- package/dist/lib/providers/http.js +35 -0
- package/dist/lib/providers/ui.d.ts.map +1 -1
- package/dist/lib/providers/ui.js +4 -3
- package/dist/lib/skills.d.ts +3 -1
- package/dist/lib/skills.d.ts.map +1 -1
- package/dist/lib/skills.js +18 -8
- package/dist/lib/terminal-answer.d.ts +5 -0
- package/dist/lib/terminal-answer.d.ts.map +1 -0
- package/dist/lib/terminal-answer.js +55 -0
- package/package.json +2 -2
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { c } from "./theme.js";
|
|
2
|
+
const EMOJI_RE = /[\p{Extended_Pictographic}\uFE0F\u200D]/gu;
|
|
3
|
+
function stripEmoji(text) {
|
|
4
|
+
return text.replace(EMOJI_RE, "");
|
|
5
|
+
}
|
|
6
|
+
function bold(text) {
|
|
7
|
+
return process.stdout.isTTY ? `${c.bold}${text}${c.reset}` : text;
|
|
8
|
+
}
|
|
9
|
+
function heading(text) {
|
|
10
|
+
const clean = text.trim().replace(/[::]\s*$/, "");
|
|
11
|
+
return bold(clean);
|
|
12
|
+
}
|
|
13
|
+
export function formatTerminalDelta(text) {
|
|
14
|
+
return stripEmoji(text)
|
|
15
|
+
.replace(/\*\*/g, "")
|
|
16
|
+
.replace(/^#{1,6}\s+/gm, "")
|
|
17
|
+
.replace(/[ \t]+\n/g, "\n");
|
|
18
|
+
}
|
|
19
|
+
export function formatTerminalAnswer(text) {
|
|
20
|
+
return stripEmoji(text)
|
|
21
|
+
.replace(/\r\n/g, "\n")
|
|
22
|
+
.replace(/^#{1,6}\s*(.+)$/gm, (_match, title) => `${heading(title)}:`)
|
|
23
|
+
.replace(/\*\*([^*\n]+)\*\*/g, (_match, value) => bold(value))
|
|
24
|
+
.replace(/^\s*[-*]\s+/gm, "- ")
|
|
25
|
+
.replace(/[ \t]+\n/g, "\n")
|
|
26
|
+
.replace(/\n{3,}/g, "\n\n")
|
|
27
|
+
.trim();
|
|
28
|
+
}
|
|
29
|
+
export function terminalStyleInstruction(locale) {
|
|
30
|
+
if (locale === "zh") {
|
|
31
|
+
return [
|
|
32
|
+
"## 终端输出格式",
|
|
33
|
+
"不要使用 emoji。",
|
|
34
|
+
"不要使用 Markdown 粗体标记,例如 **text**。",
|
|
35
|
+
"标题请用简短纯文本,并以冒号结尾。",
|
|
36
|
+
"保持回答紧凑,优先使用短句和普通列表。",
|
|
37
|
+
].join("\n");
|
|
38
|
+
}
|
|
39
|
+
if (locale === "pt") {
|
|
40
|
+
return [
|
|
41
|
+
"## Formato para terminal",
|
|
42
|
+
"Não uses emojis.",
|
|
43
|
+
"Não uses marcadores Markdown de negrito como **texto**.",
|
|
44
|
+
"Usa títulos curtos em texto simples, terminados com dois-pontos.",
|
|
45
|
+
"Mantém a resposta compacta, com frases curtas e listas simples.",
|
|
46
|
+
].join("\n");
|
|
47
|
+
}
|
|
48
|
+
return [
|
|
49
|
+
"## Terminal output format",
|
|
50
|
+
"Do not use emoji.",
|
|
51
|
+
"Do not use Markdown bold markers like **text**.",
|
|
52
|
+
"Use short plain-text headings ending with a colon.",
|
|
53
|
+
"Keep the answer compact, with short sentences and simple lists.",
|
|
54
|
+
].join("\n");
|
|
55
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ekzs/cli",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.8",
|
|
4
4
|
"description": "CLI agent for e-Kwanza v2.4 — health checks, code scan, webhook tests, AI assistance",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
},
|
|
37
37
|
"keywords": ["ekwanza", "ekzs", "cli", "payments", "angola", "cursor", "agent"],
|
|
38
38
|
"author": "Alberto Moisés",
|
|
39
|
-
"license": "
|
|
39
|
+
"license": "MIT",
|
|
40
40
|
"repository": {
|
|
41
41
|
"type": "git",
|
|
42
42
|
"url": "git+https://github.com/Almpro3/ekz.git",
|