@ch4p/cli 0.1.3 → 0.1.4
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-6WIHK7NM.js +767 -0
- package/dist/agent-ANIZYPPF.js +767 -0
- package/dist/agent-HSAJ5EBN.js +761 -0
- package/dist/audit-HLOQBMBT.js +12 -0
- package/dist/audit-UIGPH3FK.js +12 -0
- package/dist/canvas-3VTC4XPV.js +313 -0
- package/dist/canvas-4FMNW6FZ.js +313 -0
- package/dist/canvas-XQHVCY27.js +313 -0
- package/dist/chunk-3XAW4XHG.js +185 -0
- package/dist/chunk-4IRZQCRN.js +1832 -0
- package/dist/chunk-AORLXQHZ.js +304 -0
- package/dist/chunk-BMEBRUYL.js +6995 -0
- package/dist/chunk-IN2I6XRM.js +185 -0
- package/dist/chunk-TB4IZ7F7.js +301 -0
- package/dist/chunk-U7S375OS.js +1841 -0
- package/dist/dist-37TB6EWP.js +25 -0
- package/dist/dist-CIJPZC2B.js +25 -0
- package/dist/doctor-5M3ZB435.js +274 -0
- package/dist/doctor-IQ3MWQSN.js +274 -0
- package/dist/gateway-DV5OL45G.js +2164 -0
- package/dist/gateway-LUCG72YX.js +2129 -0
- package/dist/gateway-O3QNSZKF.js +2123 -0
- package/dist/gateway-OJW7RY3H.js +2094 -0
- package/dist/gateway-PBLJEK5I.js +2165 -0
- package/dist/gateway-PHPRQTZP.js +2165 -0
- package/dist/gateway-YKKJ4DZE.js +2115 -0
- package/dist/gateway-Z65DCM2Q.js +2097 -0
- package/dist/gateway-ZSXTAYPF.js +2157 -0
- package/dist/identity-RHQFPSDS.js +215 -0
- package/dist/identity-VGDDAKBY.js +215 -0
- package/dist/index.js +12 -12
- package/dist/install-6LV7B2SV.js +378 -0
- package/dist/install-NAUPXVCI.js +378 -0
- package/dist/message-TGAPVVI4.js +189 -0
- package/dist/message-YQGIARNE.js +189 -0
- package/dist/onboard-CN56V5P6.js +849 -0
- package/dist/onboard-LJFC6HXD.js +849 -0
- package/dist/pairing-ARWQYATE.js +147 -0
- package/dist/pairing-PXCJMCT2.js +147 -0
- package/dist/skills-4EELFYO2.js +138 -0
- package/dist/skills-KXRTDSF2.js +138 -0
- package/dist/status-2ZJPK3VL.js +94 -0
- package/dist/status-W2OXOSH4.js +94 -0
- package/package.json +24 -24
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getCh4pDir,
|
|
3
|
+
getConfigPath,
|
|
4
|
+
loadConfig
|
|
5
|
+
} from "./chunk-AORLXQHZ.js";
|
|
6
|
+
import {
|
|
7
|
+
BOLD,
|
|
8
|
+
DIM,
|
|
9
|
+
GREEN,
|
|
10
|
+
RED,
|
|
11
|
+
RESET,
|
|
12
|
+
TEAL,
|
|
13
|
+
YELLOW,
|
|
14
|
+
separator
|
|
15
|
+
} from "./chunk-NMGPBPNU.js";
|
|
16
|
+
|
|
17
|
+
// src/commands/status.ts
|
|
18
|
+
import { existsSync } from "fs";
|
|
19
|
+
async function status() {
|
|
20
|
+
console.log(`
|
|
21
|
+
${TEAL}${BOLD}ch4p Status${RESET}`);
|
|
22
|
+
console.log(separator());
|
|
23
|
+
console.log("");
|
|
24
|
+
console.log(` ${BOLD}Version${RESET} 0.1.0`);
|
|
25
|
+
const configPath = getConfigPath();
|
|
26
|
+
const configExists = existsSync(configPath);
|
|
27
|
+
console.log(
|
|
28
|
+
` ${BOLD}Config${RESET} ${configExists ? `${GREEN}${configPath}${RESET}` : `${YELLOW}Not found${RESET} (run ch4p onboard)`}`
|
|
29
|
+
);
|
|
30
|
+
const ch4pDir = getCh4pDir();
|
|
31
|
+
console.log(
|
|
32
|
+
` ${BOLD}Data dir${RESET} ${existsSync(ch4pDir) ? ch4pDir : `${YELLOW}Not created${RESET}`}`
|
|
33
|
+
);
|
|
34
|
+
if (!configExists) {
|
|
35
|
+
console.log(`
|
|
36
|
+
${YELLOW}No configuration found.${RESET}`);
|
|
37
|
+
console.log(` ${DIM}Run ${TEAL}ch4p onboard${DIM} to set up ch4p.${RESET}
|
|
38
|
+
`);
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
try {
|
|
42
|
+
const config = loadConfig();
|
|
43
|
+
console.log(` ${BOLD}Provider${RESET} ${config.agent.provider}`);
|
|
44
|
+
console.log(` ${BOLD}Model${RESET} ${config.agent.model}`);
|
|
45
|
+
console.log(` ${BOLD}Engine${RESET} ${config.engines.default}`);
|
|
46
|
+
const autonomyColors = {
|
|
47
|
+
readonly: GREEN,
|
|
48
|
+
supervised: YELLOW,
|
|
49
|
+
full: RED
|
|
50
|
+
};
|
|
51
|
+
const autonomyColor = autonomyColors[config.autonomy.level] ?? DIM;
|
|
52
|
+
console.log(` ${BOLD}Autonomy${RESET} ${autonomyColor}${config.autonomy.level}${RESET}`);
|
|
53
|
+
console.log(` ${BOLD}Memory${RESET} ${config.memory.backend} (auto-save: ${config.memory.autoSave ? "on" : "off"})`);
|
|
54
|
+
console.log(
|
|
55
|
+
` ${BOLD}Gateway${RESET} port ${config.gateway.port} (pairing: ${config.gateway.requirePairing ? `${GREEN}required${RESET}` : `${YELLOW}disabled${RESET}`})`
|
|
56
|
+
);
|
|
57
|
+
const channelNames = Object.keys(config.channels);
|
|
58
|
+
console.log(
|
|
59
|
+
` ${BOLD}Channels${RESET} ${channelNames.length > 0 ? channelNames.join(", ") : `${DIM}none configured${RESET}`}`
|
|
60
|
+
);
|
|
61
|
+
console.log(
|
|
62
|
+
` ${BOLD}Tunnel${RESET} ${config.tunnel.provider === "none" ? `${DIM}disabled${RESET}` : config.tunnel.provider}`
|
|
63
|
+
);
|
|
64
|
+
const observers = config.observability.observers;
|
|
65
|
+
console.log(
|
|
66
|
+
` ${BOLD}Observers${RESET} ${observers.length > 0 ? observers.join(", ") : `${DIM}none${RESET}`}`
|
|
67
|
+
);
|
|
68
|
+
console.log(
|
|
69
|
+
` ${BOLD}Secrets${RESET} ${config.secrets.encrypt ? `${GREEN}encrypted${RESET}` : `${YELLOW}plaintext${RESET}`}`
|
|
70
|
+
);
|
|
71
|
+
const hasAnthropicKey = checkApiKey(config, "anthropic");
|
|
72
|
+
const hasOpenaiKey = checkApiKey(config, "openai");
|
|
73
|
+
const keyStatus = [];
|
|
74
|
+
if (hasAnthropicKey) keyStatus.push(`${GREEN}Anthropic${RESET}`);
|
|
75
|
+
if (hasOpenaiKey) keyStatus.push(`${GREEN}OpenAI${RESET}`);
|
|
76
|
+
console.log(
|
|
77
|
+
` ${BOLD}API Keys${RESET} ${keyStatus.length > 0 ? keyStatus.join(", ") : `${YELLOW}none configured${RESET}`}`
|
|
78
|
+
);
|
|
79
|
+
} catch (err) {
|
|
80
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
81
|
+
console.error(`
|
|
82
|
+
${RED}Error loading config:${RESET} ${message}`);
|
|
83
|
+
process.exitCode = 1;
|
|
84
|
+
}
|
|
85
|
+
console.log("");
|
|
86
|
+
}
|
|
87
|
+
function checkApiKey(config, provider) {
|
|
88
|
+
const providerConfig = config.providers[provider];
|
|
89
|
+
const key = providerConfig?.["apiKey"];
|
|
90
|
+
return typeof key === "string" && key.length > 0 && !key.includes("${");
|
|
91
|
+
}
|
|
92
|
+
export {
|
|
93
|
+
status
|
|
94
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ch4p/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "Personal AI assistant platform — security-first, multi-channel, programmable",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -44,12 +44,6 @@
|
|
|
44
44
|
"multi-channel",
|
|
45
45
|
"security"
|
|
46
46
|
],
|
|
47
|
-
"scripts": {
|
|
48
|
-
"build": "tsup",
|
|
49
|
-
"build:bundle": "bun run build.ts",
|
|
50
|
-
"dev": "tsup src/index.ts --format esm --dts --watch",
|
|
51
|
-
"clean": "rm -rf dist dist-bundle"
|
|
52
|
-
},
|
|
53
47
|
"dependencies": {
|
|
54
48
|
"better-sqlite3": "^11.0.0",
|
|
55
49
|
"ws": "^8.0.0",
|
|
@@ -59,21 +53,27 @@
|
|
|
59
53
|
"playwright-core": "^1.50.0"
|
|
60
54
|
},
|
|
61
55
|
"devDependencies": {
|
|
62
|
-
"@ch4p/
|
|
63
|
-
"@ch4p/
|
|
64
|
-
"@ch4p/
|
|
65
|
-
"@ch4p/
|
|
66
|
-
"@ch4p/
|
|
67
|
-
"@ch4p/memory": "
|
|
68
|
-
"@ch4p/tools": "
|
|
69
|
-
"@ch4p/observability": "
|
|
70
|
-
"@ch4p/
|
|
71
|
-
"@ch4p/
|
|
72
|
-
"@ch4p/supervisor": "
|
|
73
|
-
"@ch4p/
|
|
74
|
-
"@ch4p/tunnels": "
|
|
75
|
-
"@ch4p/voice": "
|
|
76
|
-
"@ch4p/
|
|
77
|
-
"@ch4p/plugin-x402": "
|
|
56
|
+
"@ch4p/channels": "0.1.4",
|
|
57
|
+
"@ch4p/core": "0.1.4",
|
|
58
|
+
"@ch4p/security": "0.1.4",
|
|
59
|
+
"@ch4p/providers": "0.1.4",
|
|
60
|
+
"@ch4p/agent": "0.1.4",
|
|
61
|
+
"@ch4p/memory": "0.1.4",
|
|
62
|
+
"@ch4p/tools": "0.1.4",
|
|
63
|
+
"@ch4p/observability": "0.1.4",
|
|
64
|
+
"@ch4p/gateway": "0.1.4",
|
|
65
|
+
"@ch4p/engines": "0.1.4",
|
|
66
|
+
"@ch4p/supervisor": "0.1.4",
|
|
67
|
+
"@ch4p/canvas": "0.1.4",
|
|
68
|
+
"@ch4p/tunnels": "0.1.4",
|
|
69
|
+
"@ch4p/voice": "0.1.4",
|
|
70
|
+
"@ch4p/skills": "0.1.4",
|
|
71
|
+
"@ch4p/plugin-x402": "0.1.4"
|
|
72
|
+
},
|
|
73
|
+
"scripts": {
|
|
74
|
+
"build": "tsup",
|
|
75
|
+
"build:bundle": "bun run build.ts",
|
|
76
|
+
"dev": "tsup src/index.ts --format esm --dts --watch",
|
|
77
|
+
"clean": "rm -rf dist dist-bundle"
|
|
78
78
|
}
|
|
79
|
-
}
|
|
79
|
+
}
|