claude-code-pulsify 1.1.1 → 1.2.0

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/bin/install.js CHANGED
@@ -82,7 +82,17 @@ function install() {
82
82
  // 4. Patch settings.json
83
83
  const settings = readJSON(settingsPath)
84
84
 
85
- // statusLine
85
+ // statusLine — check for conflicts from other tools
86
+ const existingCmd = settings.statusLine?.command || ''
87
+ if (settings.statusLine && !existingCmd.includes('claude-code-pulsify')) {
88
+ if (!args.includes('--force')) {
89
+ console.warn(`\n ⚠ Existing statusLine detected:`)
90
+ console.warn(` ${existingCmd || JSON.stringify(settings.statusLine)}`)
91
+ console.warn(` This will be overwritten. Re-run with --force to confirm, or remove it manually.\n`)
92
+ process.exit(1)
93
+ }
94
+ console.log(` Overwriting existing statusLine (--force)`)
95
+ }
86
96
  settings.statusLine = {
87
97
  type: 'command',
88
98
  command: `node ${path.join(hooksTarget, 'statusline.js')}`,
@@ -17,11 +17,12 @@ const cacheDir = path.join(configDir, 'cache')
17
17
  const cachePath = path.join(cacheDir, 'claude-code-pulsify-update.json')
18
18
 
19
19
  async function main() {
20
- // Consume stdin (required by hook protocol)
20
+ // Consume stdin (required by hook protocol) with timeout guard
21
21
  let input = ''
22
- for await (const chunk of process.stdin) {
23
- input += chunk
24
- }
22
+ await Promise.race([
23
+ (async () => { for await (const chunk of process.stdin) input += chunk })(),
24
+ new Promise((resolve) => setTimeout(resolve, 5000)),
25
+ ])
25
26
 
26
27
  // Read installed version
27
28
  const versionFile = path.join(hooksDir, 'VERSION')
@@ -37,6 +38,7 @@ async function main() {
37
38
  const child = spawn(process.execPath, [workerPath], {
38
39
  detached: true,
39
40
  stdio: 'ignore',
41
+ windowsHide: true,
40
42
  env: {
41
43
  ...process.env,
42
44
  PULSIFY_CACHE_PATH: cachePath,
@@ -47,9 +47,10 @@ function writeState(sessionId, state) {
47
47
 
48
48
  async function main() {
49
49
  let input = ''
50
- for await (const chunk of process.stdin) {
51
- input += chunk
52
- }
50
+ await Promise.race([
51
+ (async () => { for await (const chunk of process.stdin) input += chunk })(),
52
+ new Promise((resolve) => setTimeout(resolve, 5000)),
53
+ ])
53
54
 
54
55
  let hookData
55
56
  try {
@@ -140,9 +140,10 @@ function formatTokenCount(input, output) {
140
140
 
141
141
  async function main() {
142
142
  let input = ''
143
- for await (const chunk of process.stdin) {
144
- input += chunk
145
- }
143
+ await Promise.race([
144
+ (async () => { for await (const chunk of process.stdin) input += chunk })(),
145
+ new Promise((resolve) => setTimeout(resolve, 5000)),
146
+ ])
146
147
 
147
148
  let data
148
149
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-code-pulsify",
3
- "version": "1.1.1",
3
+ "version": "1.2.0",
4
4
  "description": "Context-aware statusline and context monitor for Claude Code",
5
5
  "bin": {
6
6
  "claude-code-pulsify": "bin/install.js"