metame-cli 1.4.26 → 1.4.28

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 CHANGED
@@ -20,19 +20,20 @@ MetaMe is an AI that lives on your machine — remembers how you think, stays on
20
20
 
21
21
  No cloud. Your machine, your data.
22
22
 
23
- **macOS / Linux / WSL terminal:**
23
+ **macOS / Linux:**
24
24
  ```bash
25
25
  curl -fsSL https://raw.githubusercontent.com/Yaron9/MetaMe/main/install.sh | bash
26
26
  ```
27
27
 
28
- **Windows PowerShell:**
28
+ **Windows:**
29
29
  ```powershell
30
30
  irm https://raw.githubusercontent.com/Yaron9/MetaMe/main/install.ps1 | iex
31
31
  ```
32
32
 
33
- **Already have Node.js ≥ 18:**
33
+ **Already have Node.js ≥ 18 (any platform):**
34
34
  ```bash
35
- npm install -g metame-cli && metame
35
+ npm install -g metame-cli
36
+ metame
36
37
  ```
37
38
 
38
39
  ---
@@ -198,20 +199,20 @@ Task fails → skill-scout finds a skill → installs → retries → succeeds
198
199
 
199
200
  ## Quick Start
200
201
 
201
- **macOS / Linux / WSL terminal:**
202
+ **macOS / Linux:**
202
203
  ```bash
203
204
  curl -fsSL https://raw.githubusercontent.com/Yaron9/MetaMe/main/install.sh | bash
204
205
  ```
205
206
 
206
- **Windows PowerShell:**
207
+ **Windows:**
207
208
  ```powershell
208
209
  irm https://raw.githubusercontent.com/Yaron9/MetaMe/main/install.ps1 | iex
209
210
  ```
210
- > The script detects your OS, installs Node.js (via Homebrew / nvm / apt), sets up WSL if needed, and mirrors proxy settings automatically.
211
211
 
212
- **Already have Node.js ≥ 18:**
212
+ **Already have Node.js ≥ 18 (any platform):**
213
213
  ```bash
214
- npm install -g metame-cli && metame
214
+ npm install -g metame-cli
215
+ metame
215
216
  ```
216
217
 
217
218
  **3 minutes to full setup:**
@@ -221,7 +222,7 @@ npm install -g metame-cli && metame
221
222
  | 1. Install & profile | `metame` | First run: cognitive interview → builds `~/.claude_profile.yaml` |
222
223
  | 2. Connect phone | Follow the setup wizard | Bot token + app credentials → `~/.metame/daemon.yaml` |
223
224
  | 3. Start daemon | `metame start` | Background daemon launches, bot goes online |
224
- | 4. Register with system | macOS: `metame daemon install-launchd` · WSL/Linux: see below | Always-on, crash recovery |
225
+ | 4. Register with system | macOS: `metame daemon install-launchd` · Linux: see below | Always-on, crash recovery |
225
226
 
226
227
  > **What does system registration mean?**
227
228
  > Once registered, MetaMe runs in the background automatically — screen locked, lid closed, woken from sleep — as long as the machine is on. Scheduled tasks fire on time. No terminal window needed.
package/index.js CHANGED
@@ -1,5 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
 
3
+ // Suppress Node.js experimental warnings (e.g. SQLite)
4
+ process.removeAllListeners('warning');
5
+
3
6
  const fs = require('fs');
4
7
  const path = require('path');
5
8
  const os = require('os');
@@ -1574,6 +1577,7 @@ WantedBy=default.target
1574
1577
  const bg = spawn(cmd, args, {
1575
1578
  detached: true,
1576
1579
  stdio: 'ignore',
1580
+ windowsHide: true,
1577
1581
  env: { ...process.env, HOME: HOME_DIR, METAME_ROOT: __dirname },
1578
1582
  });
1579
1583
  bg.unref();
@@ -1757,6 +1761,7 @@ if (isSync) {
1757
1761
  if (daemonCfg.dangerously_skip_permissions) resumeArgs.push('--dangerously-skip-permissions');
1758
1762
  const syncChild = spawn('claude', resumeArgs, {
1759
1763
  stdio: 'inherit',
1764
+ shell: process.platform === 'win32',
1760
1765
  env: { ...process.env, ...providerEnv, METAME_ACTIVE_SESSION: 'true' }
1761
1766
  });
1762
1767
  syncChild.on('error', () => {
@@ -1832,6 +1837,7 @@ try {
1832
1837
  // Spawn the official claude tool with our marker + provider env
1833
1838
  const child = spawn('claude', launchArgs, {
1834
1839
  stdio: 'inherit',
1840
+ shell: process.platform === 'win32',
1835
1841
  env: { ...process.env, ...activeProviderEnv, METAME_ACTIVE_SESSION: 'true' }
1836
1842
  });
1837
1843
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "metame-cli",
3
- "version": "1.4.26",
3
+ "version": "1.4.28",
4
4
  "description": "The Cognitive Profile Layer for Claude Code. Knows how you think, not just what you said.",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -746,7 +746,7 @@ function createAdminCommandHandler(deps) {
746
746
  }
747
747
 
748
748
  try {
749
- execSync('which claude', { encoding: 'utf8' });
749
+ execSync(process.platform === 'win32' ? 'where claude' : 'which claude', { encoding: 'utf8' });
750
750
  checks.push('✅ Claude CLI');
751
751
  } catch {
752
752
  checks.push('❌ Claude CLI 未找到');
@@ -242,6 +242,7 @@ Reply with ONLY the name, nothing else. Examples: 插件开发, API重构, Bug
242
242
  const child = spawn(CLAUDE_BIN, args, {
243
243
  cwd,
244
244
  stdio: ['pipe', 'pipe', 'pipe'],
245
+ shell: process.platform === 'win32',
245
246
  env: {
246
247
  ...process.env,
247
248
  ...getActiveProviderEnv(),
@@ -320,7 +321,8 @@ Reply with ONLY the name, nothing else. Examples: 插件开发, API重构, Bug
320
321
  const child = spawn(CLAUDE_BIN, streamArgs, {
321
322
  cwd,
322
323
  stdio: ['pipe', 'pipe', 'pipe'],
323
- detached: true, // Create new process group so killing -pid kills all sub-agents too
324
+ shell: process.platform === 'win32',
325
+ detached: process.platform !== 'win32', // process groups are POSIX-only
324
326
  env: {
325
327
  ...process.env,
326
328
  ...getActiveProviderEnv(),
@@ -403,7 +403,8 @@ function createTaskScheduler(deps) {
403
403
  const child = spawn(CLAUDE_BIN, asyncArgs, {
404
404
  cwd: cwd || undefined,
405
405
  stdio: ['pipe', 'pipe', 'pipe'],
406
- detached: true, // own process group — kills sub-agents on timeout too
406
+ shell: process.platform === 'win32',
407
+ detached: process.platform !== 'win32', // process groups are POSIX-only
407
408
  env: asyncEnv,
408
409
  });
409
410
 
package/scripts/daemon.js CHANGED
@@ -13,6 +13,9 @@
13
13
 
14
14
  'use strict';
15
15
 
16
+ // Suppress Node.js experimental warnings (e.g. SQLite)
17
+ process.removeAllListeners('warning');
18
+
16
19
  const fs = require('fs');
17
20
  const path = require('path');
18
21
  const os = require('os');
@@ -37,7 +40,10 @@ const CLAUDE_BIN = (() => {
37
40
  '/usr/local/bin/claude',
38
41
  '/opt/homebrew/bin/claude',
39
42
  ];
40
- try { return execSync('which claude 2>/dev/null', { encoding: 'utf8' }).trim(); } catch {}
43
+ try {
44
+ const cmd = process.platform === 'win32' ? 'where claude' : 'which claude 2>/dev/null';
45
+ return execSync(cmd, { encoding: 'utf8' }).trim().split('\n')[0];
46
+ } catch {}
41
47
  for (const p of candidates) { if (fs.existsSync(p)) return p; }
42
48
  return 'claude'; // fallback: hope it's in PATH
43
49
  })();