@ethosagent/cli 0.3.4 → 0.3.5
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 +26 -0
- package/dist/index.js +5482 -404
- package/package.json +22 -11
- package/scripts/postinstall.mjs +65 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ethosagent/cli",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.5",
|
|
4
4
|
"description": "Ethos — TypeScript AI agent framework where personality is architecture. Curated toolsets, first-person identities, scoped memory.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agent",
|
|
@@ -30,12 +30,22 @@
|
|
|
30
30
|
"dist",
|
|
31
31
|
"data",
|
|
32
32
|
"web",
|
|
33
|
+
"scripts/postinstall.mjs",
|
|
33
34
|
"README.md",
|
|
34
35
|
"LICENSE"
|
|
35
36
|
],
|
|
36
37
|
"engines": {
|
|
37
38
|
"node": ">=24"
|
|
38
39
|
},
|
|
40
|
+
"os": [
|
|
41
|
+
"darwin",
|
|
42
|
+
"linux",
|
|
43
|
+
"win32"
|
|
44
|
+
],
|
|
45
|
+
"cpu": [
|
|
46
|
+
"x64",
|
|
47
|
+
"arm64"
|
|
48
|
+
],
|
|
39
49
|
"dependencies": {
|
|
40
50
|
"@anthropic-ai/sdk": "^0.96.0",
|
|
41
51
|
"@hono/node-server": "^2.0.0",
|
|
@@ -55,29 +65,29 @@
|
|
|
55
65
|
"ws": "^8.20.0",
|
|
56
66
|
"yaml": "^2.7.1",
|
|
57
67
|
"zod": "^4.3.6",
|
|
58
|
-
"@ethosagent/
|
|
59
|
-
"@ethosagent/
|
|
68
|
+
"@ethosagent/types": "0.3.5",
|
|
69
|
+
"@ethosagent/core": "0.3.5"
|
|
60
70
|
},
|
|
61
71
|
"devDependencies": {
|
|
62
|
-
"@ethosagent/agent-mesh": "0.0.0",
|
|
63
72
|
"@ethosagent/agent-bridge": "0.0.0",
|
|
64
|
-
"@ethosagent/
|
|
73
|
+
"@ethosagent/agent-mesh": "0.0.0",
|
|
65
74
|
"@ethosagent/cron": "0.0.0",
|
|
66
|
-
"@ethosagent/observability-sqlite": "0.1.0",
|
|
67
|
-
"@ethosagent/mcp-server": "0.0.0",
|
|
68
75
|
"@ethosagent/logger": "0.0.0",
|
|
76
|
+
"@ethosagent/mcp-server": "0.0.0",
|
|
77
|
+
"@ethosagent/gateway": "0.0.0",
|
|
78
|
+
"@ethosagent/observability-sqlite": "0.1.0",
|
|
69
79
|
"@ethosagent/request-dump": "0.0.0",
|
|
70
80
|
"@ethosagent/personalities": "0.0.0",
|
|
71
81
|
"@ethosagent/safety-channel": "0.0.0",
|
|
72
|
-
"@ethosagent/safety-scanner": "0.0.0",
|
|
73
|
-
"@ethosagent/skills": "0.0.0",
|
|
74
82
|
"@ethosagent/skills-coding": "0.0.0",
|
|
75
83
|
"@ethosagent/storage-fs": "0.0.0",
|
|
76
84
|
"@ethosagent/session-sqlite": "0.0.0",
|
|
77
85
|
"@ethosagent/team-supervisor": "0.0.0",
|
|
86
|
+
"@ethosagent/skills": "0.0.0",
|
|
78
87
|
"@ethosagent/tools-process": "0.0.0",
|
|
79
88
|
"@ethosagent/web-api": "0.0.0",
|
|
80
|
-
"@ethosagent/wiring": "0.0.0"
|
|
89
|
+
"@ethosagent/wiring": "0.0.0",
|
|
90
|
+
"@ethosagent/safety-scanner": "0.0.0"
|
|
81
91
|
},
|
|
82
92
|
"optionalDependencies": {
|
|
83
93
|
"@xenova/transformers": "^2.17.2",
|
|
@@ -93,6 +103,7 @@
|
|
|
93
103
|
"copy-data": "rm -rf data && cp -R ../../extensions/personalities/data data",
|
|
94
104
|
"copy-web": "pnpm --filter @ethosagent/web build && rm -rf web && cp -R ../web/dist web && find web -name '*.map' -delete",
|
|
95
105
|
"prebuild": "pnpm copy-data && pnpm copy-web",
|
|
96
|
-
"build": "tsup"
|
|
106
|
+
"build": "tsup",
|
|
107
|
+
"postinstall": "node scripts/postinstall.mjs"
|
|
97
108
|
}
|
|
98
109
|
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
//
|
|
3
|
+
// Welcome banner printed after `npm install -g @ethosagent/cli` (or a local
|
|
4
|
+
// install). Runs ONLY when:
|
|
5
|
+
// - The install is global OR the consumer's INIT_CWD points to a project
|
|
6
|
+
// that explicitly depends on @ethosagent/cli (i.e. someone deliberately
|
|
7
|
+
// installed us — not a CI transitive resolution).
|
|
8
|
+
// - stderr is a TTY (no banner in CI / Docker / pipes / log files).
|
|
9
|
+
// - INIT_CWD points away from our own workspace (avoid printing during
|
|
10
|
+
// monorepo dev `pnpm install`).
|
|
11
|
+
//
|
|
12
|
+
// Stays in pure ESM with no third-party imports so it runs without any
|
|
13
|
+
// dependency resolution — the postinstall script must work on a fresh
|
|
14
|
+
// install where node_modules may still be settling.
|
|
15
|
+
//
|
|
16
|
+
// Failure mode: any error here is swallowed. A banner crash must not break
|
|
17
|
+
// the install.
|
|
18
|
+
|
|
19
|
+
import { readFileSync } from 'node:fs';
|
|
20
|
+
import { dirname, resolve } from 'node:path';
|
|
21
|
+
import { fileURLToPath } from 'node:url';
|
|
22
|
+
|
|
23
|
+
try {
|
|
24
|
+
// Bail in non-interactive environments. The npm install completion message
|
|
25
|
+
// is already noise enough in CI logs.
|
|
26
|
+
if (!process.stderr.isTTY) process.exit(0);
|
|
27
|
+
|
|
28
|
+
// Bail when running inside the source repo's own install pass —
|
|
29
|
+
// INIT_CWD is set by npm/pnpm to the directory the user ran the command
|
|
30
|
+
// from. If that's our own monorepo, the maintainer is dogfooding, not
|
|
31
|
+
// experiencing the install for the first time.
|
|
32
|
+
const initCwd = process.env.INIT_CWD ?? process.cwd();
|
|
33
|
+
const pkgDir = `${dirname(fileURLToPath(import.meta.url))}/..`;
|
|
34
|
+
if (resolve(initCwd) === resolve(pkgDir, '..', '..')) process.exit(0);
|
|
35
|
+
|
|
36
|
+
const pkg = JSON.parse(readFileSync(resolve(pkgDir, 'package.json'), 'utf-8'));
|
|
37
|
+
const version = pkg.version ?? 'dev';
|
|
38
|
+
|
|
39
|
+
const c = {
|
|
40
|
+
reset: '\x1b[0m',
|
|
41
|
+
dim: '\x1b[2m',
|
|
42
|
+
bold: '\x1b[1m',
|
|
43
|
+
cyan: '\x1b[36m',
|
|
44
|
+
green: '\x1b[32m',
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
const lines = [
|
|
48
|
+
'',
|
|
49
|
+
`${c.green}✓${c.reset} ${c.bold}Ethos${c.reset} ${c.dim}v${version}${c.reset} installed`,
|
|
50
|
+
'',
|
|
51
|
+
`${c.bold}Next steps${c.reset}`,
|
|
52
|
+
` ${c.cyan}ethos setup${c.reset} ${c.dim}configure provider + first personality${c.reset}`,
|
|
53
|
+
` ${c.cyan}ethos chat${c.reset} ${c.dim}start an interactive session${c.reset}`,
|
|
54
|
+
` ${c.cyan}ethos --help${c.reset} ${c.dim}see all commands${c.reset}`,
|
|
55
|
+
'',
|
|
56
|
+
`${c.dim}Docs:${c.reset} ${c.cyan}https://ethosagent.ai${c.reset}`,
|
|
57
|
+
`${c.dim}For a leaner install (no platform adapters):${c.reset}`,
|
|
58
|
+
` ${c.cyan}npm i -g @ethosagent/cli --omit=optional${c.reset}`,
|
|
59
|
+
'',
|
|
60
|
+
];
|
|
61
|
+
|
|
62
|
+
for (const line of lines) process.stderr.write(`${line}\n`);
|
|
63
|
+
} catch {
|
|
64
|
+
// Best-effort. Never break the install.
|
|
65
|
+
}
|