hcom 0.6.1__tar.gz → 0.6.3__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.

Files changed (46) hide show
  1. {hcom-0.6.1/src/hcom.egg-info → hcom-0.6.3}/PKG-INFO +51 -39
  2. {hcom-0.6.1 → hcom-0.6.3}/README.md +50 -38
  3. {hcom-0.6.1 → hcom-0.6.3}/pyproject.toml +1 -1
  4. hcom-0.6.3/src/hcom/__init__.py +6 -0
  5. hcom-0.6.3/src/hcom/api.py +94 -0
  6. hcom-0.6.1/src/hcom/shared.py → hcom-0.6.3/src/hcom/claude_args.py +1 -271
  7. hcom-0.6.3/src/hcom/cli.py +445 -0
  8. hcom-0.6.3/src/hcom/commands/__init__.py +19 -0
  9. hcom-0.6.3/src/hcom/commands/admin.py +411 -0
  10. hcom-0.6.3/src/hcom/commands/lifecycle.py +479 -0
  11. hcom-0.6.3/src/hcom/commands/messaging.py +257 -0
  12. hcom-0.6.3/src/hcom/commands/utils.py +134 -0
  13. hcom-0.6.3/src/hcom/core/__init__.py +4 -0
  14. hcom-0.6.3/src/hcom/core/config.py +434 -0
  15. hcom-0.6.3/src/hcom/core/db.py +482 -0
  16. hcom-0.6.3/src/hcom/core/instances.py +519 -0
  17. hcom-0.6.3/src/hcom/core/messages.py +437 -0
  18. hcom-0.6.3/src/hcom/core/migration.py +38 -0
  19. hcom-0.6.3/src/hcom/core/paths.py +116 -0
  20. hcom-0.6.3/src/hcom/core/runtime.py +319 -0
  21. hcom-0.6.3/src/hcom/hooks/__init__.py +44 -0
  22. hcom-0.6.3/src/hcom/hooks/dispatcher.py +124 -0
  23. hcom-0.6.3/src/hcom/hooks/handlers.py +1131 -0
  24. hcom-0.6.3/src/hcom/hooks/settings.py +114 -0
  25. hcom-0.6.3/src/hcom/hooks/utils.py +274 -0
  26. hcom-0.6.3/src/hcom/shared.py +364 -0
  27. hcom-0.6.3/src/hcom/terminal.py +648 -0
  28. hcom-0.6.3/src/hcom/ui/__init__.py +106 -0
  29. hcom-0.6.3/src/hcom/ui/input.py +236 -0
  30. hcom-0.6.3/src/hcom/ui/launch.py +1056 -0
  31. hcom-0.6.3/src/hcom/ui/manage.py +531 -0
  32. hcom-0.6.3/src/hcom/ui/rendering.py +199 -0
  33. hcom-0.6.3/src/hcom/ui/tui.py +939 -0
  34. hcom-0.6.3/src/hcom/ui/types.py +92 -0
  35. {hcom-0.6.1 → hcom-0.6.3/src/hcom.egg-info}/PKG-INFO +51 -39
  36. hcom-0.6.3/src/hcom.egg-info/SOURCES.txt +40 -0
  37. hcom-0.6.1/src/hcom/__init__.py +0 -3
  38. hcom-0.6.1/src/hcom/cli.py +0 -4753
  39. hcom-0.6.1/src/hcom/ui.py +0 -2980
  40. hcom-0.6.1/src/hcom.egg-info/SOURCES.txt +0 -13
  41. {hcom-0.6.1 → hcom-0.6.3}/MANIFEST.in +0 -0
  42. {hcom-0.6.1 → hcom-0.6.3}/setup.cfg +0 -0
  43. {hcom-0.6.1 → hcom-0.6.3}/src/hcom/__main__.py +0 -0
  44. {hcom-0.6.1 → hcom-0.6.3}/src/hcom.egg-info/dependency_links.txt +0 -0
  45. {hcom-0.6.1 → hcom-0.6.3}/src/hcom.egg-info/entry_points.txt +0 -0
  46. {hcom-0.6.1 → hcom-0.6.3}/src/hcom.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hcom
3
- Version: 0.6.1
3
+ Version: 0.6.3
4
4
  Summary: Launch multiple Claude Code instances (terminal, headless, or subagents) that communicate together in real time via hooks.
5
5
  Author: aannoo
6
6
  License-Expression: MIT
@@ -41,40 +41,38 @@ Launch multiple Claude Code instances (terminal, headless, or subagents) that co
41
41
  uvx hcom 2
42
42
  ```
43
43
 
44
- #### Install
44
+ #### Run with installing
45
45
  ```bash
46
- pip install hcom # or: uv tool install hcom
47
- ```
46
+ pip install hcom
48
47
 
49
- #### Use
50
- ```bash
51
- hcom # UI - launch, monitor, message
52
- claude 'run hcom start' # activate hcom for any claude code
48
+ hcom # UI
49
+
50
+ claude 'run hcom start' # toggle hcom for any claude code
53
51
  ```
54
52
 
55
53
 
56
54
  ## What it does
57
55
 
58
- `hcom` adds hooks then launches terminals with Claude Code that remain active, waiting to respond to messages. Normal `claude` remains unaffected by hcom, but can opt-in/out with `hcom start`/`hcom stop`. Safely remove hcom hooks with `hcom reset`. Works on Mac, Linux, Windows, Android.
56
+ Adds hooks that enable instant messaging between claude code instances. Launch multiple terminals/headless/subagents that remain active, waiting to respond. Normal `claude` remains unaffected by hcom, but can opt-in (`hcom start`) or opt-out (`hcom stop`) at runtime. Safely remove hooks with `hcom reset`. Works on Mac, Linux, Windows, Android.
59
57
 
60
58
 
61
59
  ## Commands
62
60
 
63
61
  | Command | Description
64
62
  |---------|-------------|
65
- | `hcom` | Interactive dashboard |
63
+ | `hcom` | TUI dashboard |
66
64
  | `hcom <n>` | Launch `n` instances |
67
65
  | `hcom start` | Enable participation |
68
66
  | `hcom stop` | Disable participation |
69
67
 
70
68
 
71
- ## Examples
69
+ ## Features
72
70
 
73
71
  #### communicate with task tool subagents
74
72
  ```bash
75
73
  claude 'use 3x task tool with task: say hi in hcom chat'
76
74
  # Each subagent gets unique identity and can communicate with siblings
77
- # Parent resumes after Task completes with full conversation history
75
+ # Parent resumes with full conversation history
78
76
  ```
79
77
 
80
78
  #### persistent headless instances
@@ -104,6 +102,13 @@ claude # Normal Claude Code
104
102
  'run hcom stop' # Opt-out, continue as normal claude code
105
103
  ```
106
104
 
105
+ #### async push notifications from anywhere
106
+ ```bash
107
+ # Any process can message claude instances with custom identity
108
+ hcom send --from background-worker 'i finished, now you go do stuff'
109
+ ```
110
+
111
+
107
112
  ---
108
113
 
109
114
  <details>
@@ -111,49 +116,56 @@ claude # Normal Claude Code
111
116
 
112
117
 
113
118
  ```bash
114
- Usage: hcom # UI
119
+ Usage: hcom # TUI dashboard
115
120
  [ENV_VARS] hcom <COUNT> [claude <ARGS>...]
116
- hcom watch [--logs|--status|--wait [SEC]]
121
+ hcom watch [--type TYPE] [--instance NAME] [--last N] [--wait SEC]
122
+ hcom list [--json] [--verbose]
117
123
  hcom send "message"
118
124
  hcom stop [alias|all]
119
125
  hcom start [alias]
120
126
  hcom reset [logs|hooks|config]
121
127
 
122
128
  Launch Examples:
123
- hcom 3 Open 3 terminals with claude connected to hcom
124
- hcom 3 claude -p + Headless
129
+ hcom 3 open 3 terminals with claude connected to hcom
130
+ hcom 3 claude -p + headless
125
131
  HCOM_TAG=api hcom 3 claude -p + @-mention group tag
126
- claude 'run hcom start' claude code with prompt will also work
132
+ claude 'run hcom start' claude code with prompt also works
127
133
 
128
134
  Commands:
129
- watch messaging/status/launch UI (same as hcom no args)
130
- --logs Print all messages
131
- --status Print instance status JSON
132
- --wait [SEC] Wait and notify for new message
135
+ watch Query recent events (JSON per line)
136
+ --type TYPE Filter by event type (message, status)
137
+ --instance ALIAS Filter by instance
138
+ --last N Limit to last N events (default: 20)
139
+ --wait SEC Block until a matching event arrives
140
+
141
+ list Show instance status/metadata
142
+ --json Emit JSON (one instance per line)
143
+ --verbose Include additional metadata
133
144
 
134
- send "msg" Send message to all instances
135
- send "@alias msg" Send to specific instance/group
145
+ send "msg" Send message to all instances
146
+ send "@alias msg" Send to specific instance/group
147
+ --from <name> Custom external identity
136
148
 
137
- stop Stop current instance (from inside Claude)
138
- stop <alias> Stop specific instance
139
- stop all Stop all instances
149
+ stop Stop current instance (from inside Claude)
150
+ stop <alias> Stop specific instance
151
+ stop all Stop all instances
140
152
 
141
- start Start current instance (from inside Claude)
142
- start <alias> Start specific instance
153
+ start Start current instance (from inside Claude)
154
+ start <alias> Start specific instance
143
155
 
144
- reset Stop all + archive logs + remove hooks + clear config
145
- reset logs Clear + archive conversation log
146
- reset hooks Safely remove hcom hooks from claude settings.json
147
- reset config Clear + backup config.env
156
+ reset Stop all + archive logs + remove hooks + clear config
157
+ reset logs Clear + archive conversation
158
+ reset hooks Safely remove hcom hooks from claude settings.json
159
+ reset config Clear + archive config.env
148
160
 
149
161
  Environment Variables:
150
- HCOM_TAG=name Group tag (creates name-* instances)
151
- HCOM_AGENT=type Agent type (comma-separated for multiple)
152
- HCOM_TERMINAL=mode Terminal: new|here|print|"custom {script}"
153
- HCOM_HINTS=text Text appended to all messages received by instance
154
- HCOM_TIMEOUT=secs Time until disconnected from hcom chat (default 1800s / 30mins)
155
- HCOM_SUBAGENT_TIMEOUT=secs Subagent idle timeout (default 30s)
156
- HCOM_CLAUDE_ARGS=args Claude CLI defaults (e.g., '-p --model opus "hello!"')
162
+ HCOM_TAG=name Group tag (creates name-* instances)
163
+ HCOM_AGENT=type Agent from .claude/agents/ (comma-separated for multiple)
164
+ HCOM_TERMINAL=mode Terminal: new|here|print|"custom {script}"
165
+ HCOM_HINTS=text Text appended to all messages received by instance
166
+ HCOM_TIMEOUT=secs Time until disconnected from hcom chat (default: 1800s / 30m)
167
+ HCOM_SUBAGENT_TIMEOUT=secs Subagent idle timeout (default: 30s)
168
+ HCOM_CLAUDE_ARGS=args Claude CLI defaults (e.g., '-p --model opus "hello!"')
157
169
 
158
170
  ANTHROPIC_MODEL=opus # Any env var passed through to Claude Code
159
171
 
@@ -14,40 +14,38 @@ Launch multiple Claude Code instances (terminal, headless, or subagents) that co
14
14
  uvx hcom 2
15
15
  ```
16
16
 
17
- #### Install
17
+ #### Run with installing
18
18
  ```bash
19
- pip install hcom # or: uv tool install hcom
20
- ```
19
+ pip install hcom
21
20
 
22
- #### Use
23
- ```bash
24
- hcom # UI - launch, monitor, message
25
- claude 'run hcom start' # activate hcom for any claude code
21
+ hcom # UI
22
+
23
+ claude 'run hcom start' # toggle hcom for any claude code
26
24
  ```
27
25
 
28
26
 
29
27
  ## What it does
30
28
 
31
- `hcom` adds hooks then launches terminals with Claude Code that remain active, waiting to respond to messages. Normal `claude` remains unaffected by hcom, but can opt-in/out with `hcom start`/`hcom stop`. Safely remove hcom hooks with `hcom reset`. Works on Mac, Linux, Windows, Android.
29
+ Adds hooks that enable instant messaging between claude code instances. Launch multiple terminals/headless/subagents that remain active, waiting to respond. Normal `claude` remains unaffected by hcom, but can opt-in (`hcom start`) or opt-out (`hcom stop`) at runtime. Safely remove hooks with `hcom reset`. Works on Mac, Linux, Windows, Android.
32
30
 
33
31
 
34
32
  ## Commands
35
33
 
36
34
  | Command | Description
37
35
  |---------|-------------|
38
- | `hcom` | Interactive dashboard |
36
+ | `hcom` | TUI dashboard |
39
37
  | `hcom <n>` | Launch `n` instances |
40
38
  | `hcom start` | Enable participation |
41
39
  | `hcom stop` | Disable participation |
42
40
 
43
41
 
44
- ## Examples
42
+ ## Features
45
43
 
46
44
  #### communicate with task tool subagents
47
45
  ```bash
48
46
  claude 'use 3x task tool with task: say hi in hcom chat'
49
47
  # Each subagent gets unique identity and can communicate with siblings
50
- # Parent resumes after Task completes with full conversation history
48
+ # Parent resumes with full conversation history
51
49
  ```
52
50
 
53
51
  #### persistent headless instances
@@ -77,6 +75,13 @@ claude # Normal Claude Code
77
75
  'run hcom stop' # Opt-out, continue as normal claude code
78
76
  ```
79
77
 
78
+ #### async push notifications from anywhere
79
+ ```bash
80
+ # Any process can message claude instances with custom identity
81
+ hcom send --from background-worker 'i finished, now you go do stuff'
82
+ ```
83
+
84
+
80
85
  ---
81
86
 
82
87
  <details>
@@ -84,49 +89,56 @@ claude # Normal Claude Code
84
89
 
85
90
 
86
91
  ```bash
87
- Usage: hcom # UI
92
+ Usage: hcom # TUI dashboard
88
93
  [ENV_VARS] hcom <COUNT> [claude <ARGS>...]
89
- hcom watch [--logs|--status|--wait [SEC]]
94
+ hcom watch [--type TYPE] [--instance NAME] [--last N] [--wait SEC]
95
+ hcom list [--json] [--verbose]
90
96
  hcom send "message"
91
97
  hcom stop [alias|all]
92
98
  hcom start [alias]
93
99
  hcom reset [logs|hooks|config]
94
100
 
95
101
  Launch Examples:
96
- hcom 3 Open 3 terminals with claude connected to hcom
97
- hcom 3 claude -p + Headless
102
+ hcom 3 open 3 terminals with claude connected to hcom
103
+ hcom 3 claude -p + headless
98
104
  HCOM_TAG=api hcom 3 claude -p + @-mention group tag
99
- claude 'run hcom start' claude code with prompt will also work
105
+ claude 'run hcom start' claude code with prompt also works
100
106
 
101
107
  Commands:
102
- watch messaging/status/launch UI (same as hcom no args)
103
- --logs Print all messages
104
- --status Print instance status JSON
105
- --wait [SEC] Wait and notify for new message
108
+ watch Query recent events (JSON per line)
109
+ --type TYPE Filter by event type (message, status)
110
+ --instance ALIAS Filter by instance
111
+ --last N Limit to last N events (default: 20)
112
+ --wait SEC Block until a matching event arrives
113
+
114
+ list Show instance status/metadata
115
+ --json Emit JSON (one instance per line)
116
+ --verbose Include additional metadata
106
117
 
107
- send "msg" Send message to all instances
108
- send "@alias msg" Send to specific instance/group
118
+ send "msg" Send message to all instances
119
+ send "@alias msg" Send to specific instance/group
120
+ --from <name> Custom external identity
109
121
 
110
- stop Stop current instance (from inside Claude)
111
- stop <alias> Stop specific instance
112
- stop all Stop all instances
122
+ stop Stop current instance (from inside Claude)
123
+ stop <alias> Stop specific instance
124
+ stop all Stop all instances
113
125
 
114
- start Start current instance (from inside Claude)
115
- start <alias> Start specific instance
126
+ start Start current instance (from inside Claude)
127
+ start <alias> Start specific instance
116
128
 
117
- reset Stop all + archive logs + remove hooks + clear config
118
- reset logs Clear + archive conversation log
119
- reset hooks Safely remove hcom hooks from claude settings.json
120
- reset config Clear + backup config.env
129
+ reset Stop all + archive logs + remove hooks + clear config
130
+ reset logs Clear + archive conversation
131
+ reset hooks Safely remove hcom hooks from claude settings.json
132
+ reset config Clear + archive config.env
121
133
 
122
134
  Environment Variables:
123
- HCOM_TAG=name Group tag (creates name-* instances)
124
- HCOM_AGENT=type Agent type (comma-separated for multiple)
125
- HCOM_TERMINAL=mode Terminal: new|here|print|"custom {script}"
126
- HCOM_HINTS=text Text appended to all messages received by instance
127
- HCOM_TIMEOUT=secs Time until disconnected from hcom chat (default 1800s / 30mins)
128
- HCOM_SUBAGENT_TIMEOUT=secs Subagent idle timeout (default 30s)
129
- HCOM_CLAUDE_ARGS=args Claude CLI defaults (e.g., '-p --model opus "hello!"')
135
+ HCOM_TAG=name Group tag (creates name-* instances)
136
+ HCOM_AGENT=type Agent from .claude/agents/ (comma-separated for multiple)
137
+ HCOM_TERMINAL=mode Terminal: new|here|print|"custom {script}"
138
+ HCOM_HINTS=text Text appended to all messages received by instance
139
+ HCOM_TIMEOUT=secs Time until disconnected from hcom chat (default: 1800s / 30m)
140
+ HCOM_SUBAGENT_TIMEOUT=secs Subagent idle timeout (default: 30s)
141
+ HCOM_CLAUDE_ARGS=args Claude CLI defaults (e.g., '-p --model opus "hello!"')
130
142
 
131
143
  ANTHROPIC_MODEL=opus # Any env var passed through to Claude Code
132
144
 
@@ -37,7 +37,7 @@ Issues = "https://github.com/aannoo/claude-hook-comms/issues"
37
37
  Documentation = "https://github.com/aannoo/claude-hook-comms#readme"
38
38
 
39
39
  [tool.setuptools]
40
- packages = ["hcom"]
40
+ packages = ["hcom", "hcom.core", "hcom.hooks", "hcom.commands", "hcom.ui"]
41
41
 
42
42
  [tool.setuptools.package-dir]
43
43
  "" = "src"
@@ -0,0 +1,6 @@
1
+ from .shared import __version__
2
+ from .api import *
3
+ from .api import __all__ as _api_all
4
+
5
+ # Public API: version + all api.py exports (see api.py for details)
6
+ __all__ = ['__version__'] + _api_all
@@ -0,0 +1,94 @@
1
+ """Public API for TUI and external tools
2
+
3
+ Simple re-export module providing consistent import point.
4
+ Not a service layer - just consolidates public surface.
5
+
6
+ CLI and internal code can import from specific modules.
7
+ TUI and plugins should import from api.py for stability.
8
+ """
9
+ from __future__ import annotations
10
+
11
+ # Core utilities
12
+ from .core.config import (
13
+ get_config,
14
+ reload_config,
15
+ HcomConfig,
16
+ HcomConfigError,
17
+ ConfigSnapshot,
18
+ load_config_snapshot,
19
+ save_config_snapshot,
20
+ save_config,
21
+ dict_to_hcom_config,
22
+ )
23
+ from .core.paths import hcom_path, ensure_hcom_directories
24
+ from .core.instances import (
25
+ get_instance_status,
26
+ set_status,
27
+ load_instance_position,
28
+ update_instance_position,
29
+ )
30
+ from .core.messages import (
31
+ send_message,
32
+ get_unread_messages,
33
+ get_read_receipts,
34
+ )
35
+
36
+ # Commands (for TUI to call directly)
37
+ from .commands.admin import (
38
+ cmd_reset,
39
+ cmd_watch,
40
+ should_show_in_watch,
41
+ )
42
+ from .commands.lifecycle import (
43
+ cmd_launch,
44
+ cmd_start,
45
+ cmd_stop,
46
+ )
47
+ from .commands.messaging import cmd_send
48
+
49
+ # Terminal utilities
50
+ from .terminal import list_available_agents
51
+
52
+ # Shared utilities and constants
53
+ from .shared import (
54
+ ClaudeArgsSpec,
55
+ resolve_claude_args,
56
+ )
57
+
58
+ __all__ = [
59
+ # Config
60
+ 'get_config',
61
+ 'reload_config',
62
+ 'HcomConfig',
63
+ 'HcomConfigError',
64
+ 'ConfigSnapshot',
65
+ 'load_config_snapshot',
66
+ 'save_config_snapshot',
67
+ 'save_config',
68
+ 'dict_to_hcom_config',
69
+ # Paths
70
+ 'hcom_path',
71
+ 'ensure_hcom_directories',
72
+ # Instances
73
+ 'get_instance_status',
74
+ 'set_status',
75
+ 'load_instance_position',
76
+ 'update_instance_position',
77
+ # Messages
78
+ 'send_message',
79
+ 'get_unread_messages',
80
+ 'get_read_receipts',
81
+ # Commands
82
+ 'cmd_launch',
83
+ 'cmd_start',
84
+ 'cmd_stop',
85
+ 'cmd_send',
86
+ 'cmd_reset',
87
+ 'cmd_watch',
88
+ 'should_show_in_watch',
89
+ # Terminal
90
+ 'list_available_agents',
91
+ # Shared
92
+ 'ClaudeArgsSpec',
93
+ 'resolve_claude_args',
94
+ ]