vipcare 0.3.22 → 0.3.23

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.
Files changed (2) hide show
  1. package/lib/synthesizer.js +14 -3
  2. package/package.json +1 -1
@@ -1,4 +1,7 @@
1
- import { execFileSync } from 'child_process';
1
+ import { execFileSync, spawnSync } from 'child_process';
2
+ import fs from 'fs';
3
+ import os from 'os';
4
+ import path from 'path';
2
5
  import { checkTool, loadConfig } from './config.js';
3
6
  import { PROFILE_SYSTEM_PROMPT, CHANGE_DETECTION_PROMPT } from './templates.js';
4
7
 
@@ -31,13 +34,21 @@ function copilotAvailable() {
31
34
  }
32
35
 
33
36
  function callClaudeCli(prompt, timeout = 120000) {
34
- const result = execFileSync('claude', ['--print', '-p', prompt], {
37
+ // Pipe prompt via stdin to avoid OS arg length limits on long prompts
38
+ const result = spawnSync('claude', ['--print'], {
39
+ input: prompt,
35
40
  encoding: 'utf-8',
36
41
  timeout,
37
42
  stdio: ['pipe', 'pipe', 'pipe'],
38
43
  maxBuffer: 1024 * 1024 * 10,
39
44
  });
40
- return result.trim();
45
+ if (result.error) {
46
+ throw new Error(result.error.message);
47
+ }
48
+ if (result.status !== 0) {
49
+ throw new Error(result.stderr?.trim() || 'Claude CLI failed');
50
+ }
51
+ return result.stdout.trim();
41
52
  }
42
53
 
43
54
  async function callAnthropicApi(prompt) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vipcare",
3
- "version": "0.3.22",
3
+ "version": "0.3.23",
4
4
  "description": "Auto-build VIP person profiles from Twitter/LinkedIn public data",
5
5
  "type": "module",
6
6
  "bin": {