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.
- {hcom-0.6.1/src/hcom.egg-info → hcom-0.6.3}/PKG-INFO +51 -39
- {hcom-0.6.1 → hcom-0.6.3}/README.md +50 -38
- {hcom-0.6.1 → hcom-0.6.3}/pyproject.toml +1 -1
- hcom-0.6.3/src/hcom/__init__.py +6 -0
- hcom-0.6.3/src/hcom/api.py +94 -0
- hcom-0.6.1/src/hcom/shared.py → hcom-0.6.3/src/hcom/claude_args.py +1 -271
- hcom-0.6.3/src/hcom/cli.py +445 -0
- hcom-0.6.3/src/hcom/commands/__init__.py +19 -0
- hcom-0.6.3/src/hcom/commands/admin.py +411 -0
- hcom-0.6.3/src/hcom/commands/lifecycle.py +479 -0
- hcom-0.6.3/src/hcom/commands/messaging.py +257 -0
- hcom-0.6.3/src/hcom/commands/utils.py +134 -0
- hcom-0.6.3/src/hcom/core/__init__.py +4 -0
- hcom-0.6.3/src/hcom/core/config.py +434 -0
- hcom-0.6.3/src/hcom/core/db.py +482 -0
- hcom-0.6.3/src/hcom/core/instances.py +519 -0
- hcom-0.6.3/src/hcom/core/messages.py +437 -0
- hcom-0.6.3/src/hcom/core/migration.py +38 -0
- hcom-0.6.3/src/hcom/core/paths.py +116 -0
- hcom-0.6.3/src/hcom/core/runtime.py +319 -0
- hcom-0.6.3/src/hcom/hooks/__init__.py +44 -0
- hcom-0.6.3/src/hcom/hooks/dispatcher.py +124 -0
- hcom-0.6.3/src/hcom/hooks/handlers.py +1131 -0
- hcom-0.6.3/src/hcom/hooks/settings.py +114 -0
- hcom-0.6.3/src/hcom/hooks/utils.py +274 -0
- hcom-0.6.3/src/hcom/shared.py +364 -0
- hcom-0.6.3/src/hcom/terminal.py +648 -0
- hcom-0.6.3/src/hcom/ui/__init__.py +106 -0
- hcom-0.6.3/src/hcom/ui/input.py +236 -0
- hcom-0.6.3/src/hcom/ui/launch.py +1056 -0
- hcom-0.6.3/src/hcom/ui/manage.py +531 -0
- hcom-0.6.3/src/hcom/ui/rendering.py +199 -0
- hcom-0.6.3/src/hcom/ui/tui.py +939 -0
- hcom-0.6.3/src/hcom/ui/types.py +92 -0
- {hcom-0.6.1 → hcom-0.6.3/src/hcom.egg-info}/PKG-INFO +51 -39
- hcom-0.6.3/src/hcom.egg-info/SOURCES.txt +40 -0
- hcom-0.6.1/src/hcom/__init__.py +0 -3
- hcom-0.6.1/src/hcom/cli.py +0 -4753
- hcom-0.6.1/src/hcom/ui.py +0 -2980
- hcom-0.6.1/src/hcom.egg-info/SOURCES.txt +0 -13
- {hcom-0.6.1 → hcom-0.6.3}/MANIFEST.in +0 -0
- {hcom-0.6.1 → hcom-0.6.3}/setup.cfg +0 -0
- {hcom-0.6.1 → hcom-0.6.3}/src/hcom/__main__.py +0 -0
- {hcom-0.6.1 → hcom-0.6.3}/src/hcom.egg-info/dependency_links.txt +0 -0
- {hcom-0.6.1 → hcom-0.6.3}/src/hcom.egg-info/entry_points.txt +0 -0
- {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.
|
|
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
|
-
####
|
|
44
|
+
#### Run with installing
|
|
45
45
|
```bash
|
|
46
|
-
pip install hcom
|
|
47
|
-
```
|
|
46
|
+
pip install hcom
|
|
48
47
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
hcom
|
|
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
|
-
|
|
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` |
|
|
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
|
-
##
|
|
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
|
|
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
|
|
119
|
+
Usage: hcom # TUI dashboard
|
|
115
120
|
[ENV_VARS] hcom <COUNT> [claude <ARGS>...]
|
|
116
|
-
hcom watch [--
|
|
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
|
|
124
|
-
hcom 3 claude -p
|
|
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'
|
|
132
|
+
claude 'run hcom start' claude code with prompt also works
|
|
127
133
|
|
|
128
134
|
Commands:
|
|
129
|
-
watch
|
|
130
|
-
--
|
|
131
|
-
--
|
|
132
|
-
--
|
|
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"
|
|
135
|
-
send "@alias msg"
|
|
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
|
|
138
|
-
stop <alias>
|
|
139
|
-
stop all
|
|
149
|
+
stop Stop current instance (from inside Claude)
|
|
150
|
+
stop <alias> Stop specific instance
|
|
151
|
+
stop all Stop all instances
|
|
140
152
|
|
|
141
|
-
start
|
|
142
|
-
start <alias>
|
|
153
|
+
start Start current instance (from inside Claude)
|
|
154
|
+
start <alias> Start specific instance
|
|
143
155
|
|
|
144
|
-
reset
|
|
145
|
-
reset logs
|
|
146
|
-
reset hooks
|
|
147
|
-
reset config
|
|
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
|
|
151
|
-
HCOM_AGENT=type
|
|
152
|
-
HCOM_TERMINAL=mode
|
|
153
|
-
HCOM_HINTS=text
|
|
154
|
-
HCOM_TIMEOUT=secs
|
|
155
|
-
HCOM_SUBAGENT_TIMEOUT=secs
|
|
156
|
-
HCOM_CLAUDE_ARGS=args
|
|
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
|
-
####
|
|
17
|
+
#### Run with installing
|
|
18
18
|
```bash
|
|
19
|
-
pip install hcom
|
|
20
|
-
```
|
|
19
|
+
pip install hcom
|
|
21
20
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
hcom
|
|
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
|
-
|
|
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` |
|
|
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
|
-
##
|
|
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
|
|
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
|
|
92
|
+
Usage: hcom # TUI dashboard
|
|
88
93
|
[ENV_VARS] hcom <COUNT> [claude <ARGS>...]
|
|
89
|
-
hcom watch [--
|
|
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
|
|
97
|
-
hcom 3 claude -p
|
|
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'
|
|
105
|
+
claude 'run hcom start' claude code with prompt also works
|
|
100
106
|
|
|
101
107
|
Commands:
|
|
102
|
-
watch
|
|
103
|
-
--
|
|
104
|
-
--
|
|
105
|
-
--
|
|
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"
|
|
108
|
-
send "@alias msg"
|
|
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
|
|
111
|
-
stop <alias>
|
|
112
|
-
stop all
|
|
122
|
+
stop Stop current instance (from inside Claude)
|
|
123
|
+
stop <alias> Stop specific instance
|
|
124
|
+
stop all Stop all instances
|
|
113
125
|
|
|
114
|
-
start
|
|
115
|
-
start <alias>
|
|
126
|
+
start Start current instance (from inside Claude)
|
|
127
|
+
start <alias> Start specific instance
|
|
116
128
|
|
|
117
|
-
reset
|
|
118
|
-
reset logs
|
|
119
|
-
reset hooks
|
|
120
|
-
reset config
|
|
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
|
|
124
|
-
HCOM_AGENT=type
|
|
125
|
-
HCOM_TERMINAL=mode
|
|
126
|
-
HCOM_HINTS=text
|
|
127
|
-
HCOM_TIMEOUT=secs
|
|
128
|
-
HCOM_SUBAGENT_TIMEOUT=secs
|
|
129
|
-
HCOM_CLAUDE_ARGS=args
|
|
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,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
|
+
]
|