hcom 0.1.5__tar.gz → 0.1.6__tar.gz
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.
Potentially problematic release.
This version of hcom might be problematic. Click here for more details.
- {hcom-0.1.5/src/hcom.egg-info → hcom-0.1.6}/PKG-INFO +7 -7
- {hcom-0.1.5 → hcom-0.1.6}/README.md +5 -5
- {hcom-0.1.5 → hcom-0.1.6}/pyproject.toml +2 -2
- {hcom-0.1.5 → hcom-0.1.6}/src/hcom/__main__.py +27 -23
- {hcom-0.1.5 → hcom-0.1.6/src/hcom.egg-info}/PKG-INFO +7 -7
- {hcom-0.1.5 → hcom-0.1.6}/MANIFEST.in +0 -0
- {hcom-0.1.5 → hcom-0.1.6}/setup.cfg +0 -0
- {hcom-0.1.5 → hcom-0.1.6}/src/hcom/__init__.py +0 -0
- {hcom-0.1.5 → hcom-0.1.6}/src/hcom.egg-info/SOURCES.txt +0 -0
- {hcom-0.1.5 → hcom-0.1.6}/src/hcom.egg-info/dependency_links.txt +0 -0
- {hcom-0.1.5 → hcom-0.1.6}/src/hcom.egg-info/entry_points.txt +0 -0
- {hcom-0.1.5 → hcom-0.1.6}/src/hcom.egg-info/top_level.txt +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: hcom
|
|
3
|
-
Version: 0.1.
|
|
4
|
-
Summary: Lightweight CLI tool for real-time
|
|
3
|
+
Version: 0.1.6
|
|
4
|
+
Summary: Lightweight CLI tool for real-time communication between Claude Code subagents using hooks
|
|
5
5
|
Author-email: aannoo <your@email.com>
|
|
6
6
|
License: MIT
|
|
7
7
|
Project-URL: Homepage, https://github.com/aannoo/claude-hook-comms
|
|
@@ -26,9 +26,9 @@ Classifier: Topic :: Communications
|
|
|
26
26
|
Requires-Python: >=3.6
|
|
27
27
|
Description-Content-Type: text/markdown
|
|
28
28
|
|
|
29
|
-
# Claude
|
|
29
|
+
# hcom - Claude Hook Comms
|
|
30
30
|
|
|
31
|
-
Lightweight CLI tool for real-time communication between
|
|
31
|
+
Lightweight CLI tool for real-time communication between Claude Code [subagents](https://docs.anthropic.com/en/docs/claude-code/sub-agents) using [hooks](https://docs.anthropic.com/en/docs/claude-code/hooks).
|
|
32
32
|
|
|
33
33
|
## 🦆 What It Does
|
|
34
34
|
|
|
@@ -38,7 +38,7 @@ Creates a group chat where you and multiple interactive Claude Code subagents ca
|
|
|
38
38
|
|
|
39
39
|
## 🦷 Features
|
|
40
40
|
|
|
41
|
-
- **Multi-Terminal Launch** - Launch
|
|
41
|
+
- **Multi-Terminal Launch** - Launch Claude Code subagents in new terminals
|
|
42
42
|
- **Live Dashboard** - Real-time monitoring of all instances
|
|
43
43
|
- **Multi-Agent Communication** - Claude instances talk to each other across projects
|
|
44
44
|
- **@Mention Targeting** - Send messages to specific subagents or teams
|
|
@@ -202,11 +202,11 @@ hcom adds hooks to your project directory's `.claude/settings.local.json`:
|
|
|
202
202
|
- **Identity**: Each instance gets a unique name based on conversation UUID (e.g., "hovoa7")
|
|
203
203
|
- **Persistence**: Names persist across `--resume` maintaining conversation context
|
|
204
204
|
- **Status Detection**: Notification hook tracks permission requests and activity
|
|
205
|
-
- **Agents**: When you run `hcom open researcher`, it loads an interactive
|
|
205
|
+
- **Agents**: When you run `hcom open researcher`, it loads an interactive Claude session with a system prompt from `.claude/agents/researcher.md` (local) or `~/.claude/agents/researcher.md` (global). Agents can specify `model:` and `tools:` in YAML frontmatter
|
|
206
206
|
|
|
207
207
|
### Architecture
|
|
208
208
|
- **Single conversation** - All instances share one global conversation
|
|
209
|
-
- **Opt-in participation** - Only
|
|
209
|
+
- **Opt-in participation** - Only Claude Code instances launched with `hcom open` join the chat
|
|
210
210
|
- **@-mention filtering** - Target messages to specific instances or teams
|
|
211
211
|
|
|
212
212
|
### File Structure
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# Claude
|
|
1
|
+
# hcom - Claude Hook Comms
|
|
2
2
|
|
|
3
|
-
Lightweight CLI tool for real-time communication between
|
|
3
|
+
Lightweight CLI tool for real-time communication between Claude Code [subagents](https://docs.anthropic.com/en/docs/claude-code/sub-agents) using [hooks](https://docs.anthropic.com/en/docs/claude-code/hooks).
|
|
4
4
|
|
|
5
5
|
## 🦆 What It Does
|
|
6
6
|
|
|
@@ -10,7 +10,7 @@ Creates a group chat where you and multiple interactive Claude Code subagents ca
|
|
|
10
10
|
|
|
11
11
|
## 🦷 Features
|
|
12
12
|
|
|
13
|
-
- **Multi-Terminal Launch** - Launch
|
|
13
|
+
- **Multi-Terminal Launch** - Launch Claude Code subagents in new terminals
|
|
14
14
|
- **Live Dashboard** - Real-time monitoring of all instances
|
|
15
15
|
- **Multi-Agent Communication** - Claude instances talk to each other across projects
|
|
16
16
|
- **@Mention Targeting** - Send messages to specific subagents or teams
|
|
@@ -174,11 +174,11 @@ hcom adds hooks to your project directory's `.claude/settings.local.json`:
|
|
|
174
174
|
- **Identity**: Each instance gets a unique name based on conversation UUID (e.g., "hovoa7")
|
|
175
175
|
- **Persistence**: Names persist across `--resume` maintaining conversation context
|
|
176
176
|
- **Status Detection**: Notification hook tracks permission requests and activity
|
|
177
|
-
- **Agents**: When you run `hcom open researcher`, it loads an interactive
|
|
177
|
+
- **Agents**: When you run `hcom open researcher`, it loads an interactive Claude session with a system prompt from `.claude/agents/researcher.md` (local) or `~/.claude/agents/researcher.md` (global). Agents can specify `model:` and `tools:` in YAML frontmatter
|
|
178
178
|
|
|
179
179
|
### Architecture
|
|
180
180
|
- **Single conversation** - All instances share one global conversation
|
|
181
|
-
- **Opt-in participation** - Only
|
|
181
|
+
- **Opt-in participation** - Only Claude Code instances launched with `hcom open` join the chat
|
|
182
182
|
- **@-mention filtering** - Target messages to specific instances or teams
|
|
183
183
|
|
|
184
184
|
### File Structure
|
|
@@ -4,8 +4,8 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "hcom"
|
|
7
|
-
version = "0.1.
|
|
8
|
-
description = "Lightweight CLI tool for real-time
|
|
7
|
+
version = "0.1.6"
|
|
8
|
+
description = "Lightweight CLI tool for real-time communication between Claude Code subagents using hooks"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.6"
|
|
11
11
|
license = {text = "MIT"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env python3
|
|
2
2
|
"""
|
|
3
3
|
hcom - Claude Hook Comms
|
|
4
|
-
|
|
4
|
+
Lightweight CLI tool for real-time communication between Claude Code subagents using hooks
|
|
5
5
|
"""
|
|
6
6
|
|
|
7
7
|
import os
|
|
@@ -170,27 +170,22 @@ def get_config_value(key, default=None):
|
|
|
170
170
|
return config.get(key, default)
|
|
171
171
|
|
|
172
172
|
def get_hook_command():
|
|
173
|
-
"""
|
|
173
|
+
"""Get hook command with silent fallback
|
|
174
|
+
|
|
175
|
+
Uses ${HCOM:-true} for clean paths, conditional for paths with spaces.
|
|
176
|
+
Both approaches exit silently (code 0) when not launched via 'hcom open'.
|
|
177
|
+
"""
|
|
174
178
|
python_path = sys.executable
|
|
175
179
|
script_path = os.path.abspath(__file__)
|
|
176
180
|
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
for char in problematic_chars)
|
|
183
|
-
|
|
184
|
-
if has_problematic_chars:
|
|
185
|
-
# Use direct paths with proper escaping
|
|
186
|
-
# Escape backslashes first, then quotes
|
|
187
|
-
escaped_python = python_path.replace('\\', '\\\\').replace('"', '\\"')
|
|
188
|
-
escaped_script = script_path.replace('\\', '\\\\').replace('"', '\\"')
|
|
189
|
-
return f'"{escaped_python}" "{escaped_script}"', {}
|
|
181
|
+
if ' ' in python_path or ' ' in script_path:
|
|
182
|
+
# Paths with spaces: use conditional check
|
|
183
|
+
escaped_python = shlex.quote(python_path)
|
|
184
|
+
escaped_script = shlex.quote(script_path)
|
|
185
|
+
return f'[ "${{HCOM_ACTIVE}}" = "1" ] && {escaped_python} {escaped_script} || true', {}
|
|
190
186
|
else:
|
|
191
|
-
#
|
|
192
|
-
|
|
193
|
-
return '$HCOM', env_vars
|
|
187
|
+
# Clean paths: use environment variable
|
|
188
|
+
return '${HCOM:-true}', {}
|
|
194
189
|
|
|
195
190
|
def build_claude_env():
|
|
196
191
|
"""Build environment variables for Claude instances"""
|
|
@@ -206,9 +201,11 @@ def build_claude_env():
|
|
|
206
201
|
|
|
207
202
|
env.update(config.get('env_overrides', {}))
|
|
208
203
|
|
|
209
|
-
#
|
|
210
|
-
|
|
211
|
-
|
|
204
|
+
# Set HCOM only for clean paths (spaces handled differently)
|
|
205
|
+
python_path = sys.executable
|
|
206
|
+
script_path = os.path.abspath(__file__)
|
|
207
|
+
if ' ' not in python_path and ' ' not in script_path:
|
|
208
|
+
env['HCOM'] = f'{python_path} {script_path}'
|
|
212
209
|
|
|
213
210
|
return env
|
|
214
211
|
|
|
@@ -423,15 +420,22 @@ def _remove_hcom_hooks_from_settings(settings):
|
|
|
423
420
|
|
|
424
421
|
# Patterns to match any hcom hook command
|
|
425
422
|
# - $HCOM post/stop/notify
|
|
423
|
+
# - ${HCOM:-...} post/stop/notify
|
|
424
|
+
# - [ "${HCOM_ACTIVE}" = "1" ] && ... hcom.py ... || true
|
|
426
425
|
# - hcom post/stop/notify
|
|
426
|
+
# - uvx hcom post/stop/notify
|
|
427
427
|
# - /path/to/hcom.py post/stop/notify
|
|
428
|
+
# - sh -c "[ ... ] && ... hcom ..."
|
|
428
429
|
# - "/path with spaces/python" "/path with spaces/hcom.py" post/stop/notify
|
|
429
430
|
# - '/path/to/python' '/path/to/hcom.py' post/stop/notify
|
|
430
431
|
hcom_patterns = [
|
|
431
|
-
r'
|
|
432
|
+
r'\$\{?HCOM', # Environment variable (with or without braces)
|
|
433
|
+
r'\bHCOM_ACTIVE.*hcom\.py', # Conditional with HCOM_ACTIVE check
|
|
432
434
|
r'\bhcom\s+(post|stop|notify)\b', # Direct hcom command
|
|
435
|
+
r'\buvx\s+hcom\s+(post|stop|notify)\b', # uvx hcom command
|
|
433
436
|
r'hcom\.py["\']?\s+(post|stop|notify)\b', # hcom.py with optional quote
|
|
434
437
|
r'["\'][^"\']*hcom\.py["\']?\s+(post|stop|notify)\b', # Quoted path with hcom.py
|
|
438
|
+
r'sh\s+-c.*hcom', # Shell wrapper with hcom
|
|
435
439
|
]
|
|
436
440
|
compiled_patterns = [re.compile(pattern) for pattern in hcom_patterns]
|
|
437
441
|
|
|
@@ -713,7 +717,7 @@ def setup_hooks():
|
|
|
713
717
|
if hcom_send_permission not in settings['permissions']['allow']:
|
|
714
718
|
settings['permissions']['allow'].append(hcom_send_permission)
|
|
715
719
|
|
|
716
|
-
# Get the hook command
|
|
720
|
+
# Get the hook command template
|
|
717
721
|
hook_cmd_base, _ = get_hook_command()
|
|
718
722
|
|
|
719
723
|
# Add PostToolUse hook
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: hcom
|
|
3
|
-
Version: 0.1.
|
|
4
|
-
Summary: Lightweight CLI tool for real-time
|
|
3
|
+
Version: 0.1.6
|
|
4
|
+
Summary: Lightweight CLI tool for real-time communication between Claude Code subagents using hooks
|
|
5
5
|
Author-email: aannoo <your@email.com>
|
|
6
6
|
License: MIT
|
|
7
7
|
Project-URL: Homepage, https://github.com/aannoo/claude-hook-comms
|
|
@@ -26,9 +26,9 @@ Classifier: Topic :: Communications
|
|
|
26
26
|
Requires-Python: >=3.6
|
|
27
27
|
Description-Content-Type: text/markdown
|
|
28
28
|
|
|
29
|
-
# Claude
|
|
29
|
+
# hcom - Claude Hook Comms
|
|
30
30
|
|
|
31
|
-
Lightweight CLI tool for real-time communication between
|
|
31
|
+
Lightweight CLI tool for real-time communication between Claude Code [subagents](https://docs.anthropic.com/en/docs/claude-code/sub-agents) using [hooks](https://docs.anthropic.com/en/docs/claude-code/hooks).
|
|
32
32
|
|
|
33
33
|
## 🦆 What It Does
|
|
34
34
|
|
|
@@ -38,7 +38,7 @@ Creates a group chat where you and multiple interactive Claude Code subagents ca
|
|
|
38
38
|
|
|
39
39
|
## 🦷 Features
|
|
40
40
|
|
|
41
|
-
- **Multi-Terminal Launch** - Launch
|
|
41
|
+
- **Multi-Terminal Launch** - Launch Claude Code subagents in new terminals
|
|
42
42
|
- **Live Dashboard** - Real-time monitoring of all instances
|
|
43
43
|
- **Multi-Agent Communication** - Claude instances talk to each other across projects
|
|
44
44
|
- **@Mention Targeting** - Send messages to specific subagents or teams
|
|
@@ -202,11 +202,11 @@ hcom adds hooks to your project directory's `.claude/settings.local.json`:
|
|
|
202
202
|
- **Identity**: Each instance gets a unique name based on conversation UUID (e.g., "hovoa7")
|
|
203
203
|
- **Persistence**: Names persist across `--resume` maintaining conversation context
|
|
204
204
|
- **Status Detection**: Notification hook tracks permission requests and activity
|
|
205
|
-
- **Agents**: When you run `hcom open researcher`, it loads an interactive
|
|
205
|
+
- **Agents**: When you run `hcom open researcher`, it loads an interactive Claude session with a system prompt from `.claude/agents/researcher.md` (local) or `~/.claude/agents/researcher.md` (global). Agents can specify `model:` and `tools:` in YAML frontmatter
|
|
206
206
|
|
|
207
207
|
### Architecture
|
|
208
208
|
- **Single conversation** - All instances share one global conversation
|
|
209
|
-
- **Opt-in participation** - Only
|
|
209
|
+
- **Opt-in participation** - Only Claude Code instances launched with `hcom open` join the chat
|
|
210
210
|
- **@-mention filtering** - Target messages to specific instances or teams
|
|
211
211
|
|
|
212
212
|
### File Structure
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|