@ethosagent/cli 0.3.4 → 0.3.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ethosagent/cli",
3
- "version": "0.3.4",
3
+ "version": "0.3.6",
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,23 @@
30
30
  "dist",
31
31
  "data",
32
32
  "web",
33
+ "templates",
34
+ "scripts/postinstall.mjs",
33
35
  "README.md",
34
36
  "LICENSE"
35
37
  ],
36
38
  "engines": {
37
39
  "node": ">=24"
38
40
  },
41
+ "os": [
42
+ "darwin",
43
+ "linux",
44
+ "win32"
45
+ ],
46
+ "cpu": [
47
+ "x64",
48
+ "arm64"
49
+ ],
39
50
  "dependencies": {
40
51
  "@anthropic-ai/sdk": "^0.96.0",
41
52
  "@hono/node-server": "^2.0.0",
@@ -55,23 +66,24 @@
55
66
  "ws": "^8.20.0",
56
67
  "yaml": "^2.7.1",
57
68
  "zod": "^4.3.6",
58
- "@ethosagent/core": "0.3.4",
59
- "@ethosagent/types": "0.3.4"
69
+ "@ethosagent/core": "0.3.6",
70
+ "@ethosagent/safety-redact": "0.0.0",
71
+ "@ethosagent/types": "0.3.6"
60
72
  },
61
73
  "devDependencies": {
62
- "@ethosagent/agent-mesh": "0.0.0",
63
74
  "@ethosagent/agent-bridge": "0.0.0",
64
- "@ethosagent/gateway": "0.0.0",
75
+ "@ethosagent/agent-mesh": "0.0.0",
65
76
  "@ethosagent/cron": "0.0.0",
77
+ "@ethosagent/logger": "0.0.0",
78
+ "@ethosagent/gateway": "0.0.0",
66
79
  "@ethosagent/observability-sqlite": "0.1.0",
67
80
  "@ethosagent/mcp-server": "0.0.0",
68
- "@ethosagent/logger": "0.0.0",
69
81
  "@ethosagent/request-dump": "0.0.0",
70
82
  "@ethosagent/personalities": "0.0.0",
71
83
  "@ethosagent/safety-channel": "0.0.0",
72
84
  "@ethosagent/safety-scanner": "0.0.0",
73
- "@ethosagent/skills": "0.0.0",
74
85
  "@ethosagent/skills-coding": "0.0.0",
86
+ "@ethosagent/skills": "0.0.0",
75
87
  "@ethosagent/storage-fs": "0.0.0",
76
88
  "@ethosagent/session-sqlite": "0.0.0",
77
89
  "@ethosagent/team-supervisor": "0.0.0",
@@ -87,12 +99,14 @@
87
99
  "imapflow": "^1.0.170",
88
100
  "mailparser": "^3.7.2",
89
101
  "nodemailer": "^6.10.1",
90
- "playwright": "^1.48.0"
102
+ "playwright": "^1.48.0",
103
+ "@ethosagent/secrets-aws": "0.0.0"
91
104
  },
92
105
  "scripts": {
93
106
  "copy-data": "rm -rf data && cp -R ../../extensions/personalities/data data",
94
107
  "copy-web": "pnpm --filter @ethosagent/web build && rm -rf web && cp -R ../web/dist web && find web -name '*.map' -delete",
95
108
  "prebuild": "pnpm copy-data && pnpm copy-web",
96
- "build": "tsup"
109
+ "build": "tsup",
110
+ "postinstall": "node scripts/postinstall.mjs"
97
111
  }
98
112
  }
@@ -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
+ }
@@ -0,0 +1,19 @@
1
+ [Unit]
2
+ Description=Ethos Gateway (Telegram + Slack + Discord + Email adapters)
3
+ After=network-online.target
4
+ Wants=network-online.target
5
+
6
+ [Service]
7
+ Type=simple
8
+ User={{ETHOS_USER}}
9
+ Environment=HOME={{ETHOS_HOME}}
10
+ Environment=ETHOS_MANAGED=1
11
+ EnvironmentFile=-{{ETHOS_HOME}}/.ethos/.env
12
+ ExecStart={{ETHOS_BINARY}} gateway start
13
+ Restart=on-failure
14
+ RestartSec=5
15
+ StandardOutput=journal
16
+ StandardError=journal
17
+
18
+ [Install]
19
+ WantedBy=multi-user.target
@@ -0,0 +1,19 @@
1
+ [Unit]
2
+ Description=Ethos All Services (gateway + web API)
3
+ After=network-online.target
4
+ Wants=network-online.target
5
+
6
+ [Service]
7
+ Type=simple
8
+ User={{ETHOS_USER}}
9
+ Environment=HOME={{ETHOS_HOME}}
10
+ Environment=ETHOS_MANAGED=1
11
+ EnvironmentFile=-{{ETHOS_HOME}}/.ethos/.env
12
+ ExecStart={{ETHOS_BINARY}} run-all
13
+ Restart=on-failure
14
+ RestartSec=5
15
+ StandardOutput=journal
16
+ StandardError=journal
17
+
18
+ [Install]
19
+ WantedBy=multi-user.target
@@ -0,0 +1,19 @@
1
+ [Unit]
2
+ Description=Ethos Web API + ACP Server
3
+ After=network-online.target
4
+ Wants=network-online.target
5
+
6
+ [Service]
7
+ Type=simple
8
+ User={{ETHOS_USER}}
9
+ Environment=HOME={{ETHOS_HOME}}
10
+ Environment=ETHOS_MANAGED=1
11
+ EnvironmentFile=-{{ETHOS_HOME}}/.ethos/.env
12
+ ExecStart={{ETHOS_BINARY}} serve --web-experimental
13
+ Restart=on-failure
14
+ RestartSec=5
15
+ StandardOutput=journal
16
+ StandardError=journal
17
+
18
+ [Install]
19
+ WantedBy=multi-user.target