claude-team-mcp 0.7.0__py3-none-any.whl → 0.8.2__py3-none-any.whl
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.
- claude_team/events.py +30 -6
- claude_team_mcp/cli_backends/__init__.py +4 -2
- claude_team_mcp/cli_backends/claude.py +45 -5
- claude_team_mcp/cli_backends/codex.py +44 -3
- claude_team_mcp/config.py +350 -0
- claude_team_mcp/config_cli.py +263 -0
- claude_team_mcp/issue_tracker/__init__.py +68 -3
- claude_team_mcp/server.py +69 -0
- claude_team_mcp/terminal_backends/__init__.py +21 -3
- claude_team_mcp/terminal_backends/tmux.py +59 -24
- claude_team_mcp/tools/discover_workers.py +1 -1
- claude_team_mcp/tools/spawn_workers.py +36 -14
- claude_team_mcp/worktree.py +16 -2
- {claude_team_mcp-0.7.0.dist-info → claude_team_mcp-0.8.2.dist-info}/METADATA +1 -1
- {claude_team_mcp-0.7.0.dist-info → claude_team_mcp-0.8.2.dist-info}/RECORD +17 -15
- {claude_team_mcp-0.7.0.dist-info → claude_team_mcp-0.8.2.dist-info}/WHEEL +0 -0
- {claude_team_mcp-0.7.0.dist-info → claude_team_mcp-0.8.2.dist-info}/entry_points.txt +0 -0
|
@@ -17,6 +17,7 @@ if TYPE_CHECKING:
|
|
|
17
17
|
from ..server import AppContext
|
|
18
18
|
|
|
19
19
|
from ..cli_backends import get_cli_backend
|
|
20
|
+
from ..config import ConfigError, default_config, load_config
|
|
20
21
|
from ..colors import generate_tab_color
|
|
21
22
|
from ..formatting import format_badge_text, format_session_title
|
|
22
23
|
from ..names import pick_names_for_count
|
|
@@ -58,7 +59,7 @@ def register_tools(mcp: FastMCP, ensure_connection) -> None:
|
|
|
58
59
|
async def spawn_workers(
|
|
59
60
|
ctx: Context[ServerSession, "AppContext"],
|
|
60
61
|
workers: list[WorkerConfig],
|
|
61
|
-
layout: Literal["auto", "new"] =
|
|
62
|
+
layout: Literal["auto", "new"] | None = None,
|
|
62
63
|
) -> dict:
|
|
63
64
|
"""
|
|
64
65
|
Spawn Claude Code worker sessions.
|
|
@@ -83,7 +84,7 @@ def register_tools(mcp: FastMCP, ensure_connection) -> None:
|
|
|
83
84
|
- 4 workers: quad layout (2x2 grid)
|
|
84
85
|
|
|
85
86
|
**tmux note:**
|
|
86
|
-
- Workers
|
|
87
|
+
- Workers get their own tmux window in a per-project claude-team session.
|
|
87
88
|
- layout is ignored for tmux.
|
|
88
89
|
|
|
89
90
|
**WorkerConfig fields:**
|
|
@@ -191,6 +192,18 @@ def register_tools(mcp: FastMCP, ensure_connection) -> None:
|
|
|
191
192
|
app_ctx = ctx.request_context.lifespan_context
|
|
192
193
|
registry = app_ctx.registry
|
|
193
194
|
|
|
195
|
+
# Load config and apply defaults
|
|
196
|
+
try:
|
|
197
|
+
config = load_config()
|
|
198
|
+
except ConfigError as exc:
|
|
199
|
+
logger.warning("Invalid config file; using defaults: %s", exc)
|
|
200
|
+
config = default_config()
|
|
201
|
+
defaults = config.defaults
|
|
202
|
+
|
|
203
|
+
# Resolve layout from config if not explicitly provided
|
|
204
|
+
if layout is None:
|
|
205
|
+
layout = defaults.layout
|
|
206
|
+
|
|
194
207
|
# Validate worker count
|
|
195
208
|
if not workers:
|
|
196
209
|
return error_response("At least one worker is required")
|
|
@@ -244,7 +257,10 @@ def register_tools(mcp: FastMCP, ensure_connection) -> None:
|
|
|
244
257
|
|
|
245
258
|
for i, (w, name) in enumerate(zip(workers, resolved_names)):
|
|
246
259
|
project_path = w["project_path"]
|
|
247
|
-
|
|
260
|
+
# Use config default when not explicitly set
|
|
261
|
+
use_worktree = w.get("use_worktree")
|
|
262
|
+
if use_worktree is None:
|
|
263
|
+
use_worktree = defaults.use_worktree
|
|
248
264
|
worktree_config = w.get("worktree")
|
|
249
265
|
worktree_explicitly_requested = worktree_config is not None
|
|
250
266
|
worktree_branch = None
|
|
@@ -324,6 +340,16 @@ def register_tools(mcp: FastMCP, ensure_connection) -> None:
|
|
|
324
340
|
# Pre-generate session IDs for Stop hook injection
|
|
325
341
|
session_ids = [str(uuid.uuid4())[:8] for _ in workers]
|
|
326
342
|
|
|
343
|
+
# Pre-calculate agent types for each worker (needed by profile customizations
|
|
344
|
+
# and agent startup)
|
|
345
|
+
agent_types: list[str] = []
|
|
346
|
+
for w in workers:
|
|
347
|
+
# Use config default when not explicitly set
|
|
348
|
+
agent_type = w.get("agent_type")
|
|
349
|
+
if agent_type is None:
|
|
350
|
+
agent_type = defaults.agent_type
|
|
351
|
+
agent_types.append(agent_type)
|
|
352
|
+
|
|
327
353
|
# Build profile customizations for each worker (iTerm-only)
|
|
328
354
|
profile_customizations: list[object | None] = [None] * worker_count
|
|
329
355
|
if isinstance(backend, ItermBackend):
|
|
@@ -335,7 +361,7 @@ def register_tools(mcp: FastMCP, ensure_connection) -> None:
|
|
|
335
361
|
|
|
336
362
|
bead = w.get("bead")
|
|
337
363
|
annotation = w.get("annotation")
|
|
338
|
-
agent_type =
|
|
364
|
+
agent_type = agent_types[i]
|
|
339
365
|
|
|
340
366
|
# Tab title
|
|
341
367
|
tab_title = format_session_title(
|
|
@@ -591,16 +617,8 @@ def register_tools(mcp: FastMCP, ensure_connection) -> None:
|
|
|
591
617
|
|
|
592
618
|
pane_sessions = [panes[name] for name in pane_names[:worker_count]]
|
|
593
619
|
|
|
594
|
-
# Pre-calculate agent types for each worker
|
|
595
|
-
import asyncio
|
|
596
|
-
|
|
597
|
-
agent_types: list[str] = []
|
|
598
|
-
|
|
599
|
-
for i, w in enumerate(workers):
|
|
600
|
-
agent_type = w.get("agent_type", "claude")
|
|
601
|
-
agent_types.append(agent_type)
|
|
602
|
-
|
|
603
620
|
# Start agent in all panes (both Claude and Codex)
|
|
621
|
+
import asyncio
|
|
604
622
|
async def start_agent_for_worker(index: int) -> None:
|
|
605
623
|
session = pane_sessions[index]
|
|
606
624
|
project_path = resolved_paths[index]
|
|
@@ -618,11 +636,15 @@ def register_tools(mcp: FastMCP, ensure_connection) -> None:
|
|
|
618
636
|
|
|
619
637
|
cli = get_cli_backend(agent_type)
|
|
620
638
|
stop_hook_marker_id = marker_id if agent_type == "claude" else None
|
|
639
|
+
# Use config default when not explicitly set
|
|
640
|
+
skip_permissions = worker_config.get("skip_permissions")
|
|
641
|
+
if skip_permissions is None:
|
|
642
|
+
skip_permissions = defaults.skip_permissions
|
|
621
643
|
await backend.start_agent_in_session(
|
|
622
644
|
handle=session,
|
|
623
645
|
cli=cli,
|
|
624
646
|
project_path=project_path,
|
|
625
|
-
dangerously_skip_permissions=
|
|
647
|
+
dangerously_skip_permissions=skip_permissions,
|
|
626
648
|
env=env,
|
|
627
649
|
stop_hook_marker_id=stop_hook_marker_id,
|
|
628
650
|
)
|
claude_team_mcp/worktree.py
CHANGED
|
@@ -64,6 +64,20 @@ def slugify(text: str) -> str:
|
|
|
64
64
|
return text
|
|
65
65
|
|
|
66
66
|
|
|
67
|
+
def short_slug(text: str, max_length: int = 30) -> str:
|
|
68
|
+
"""
|
|
69
|
+
Create a slug suitable for compact identifiers.
|
|
70
|
+
|
|
71
|
+
Truncates long slugs to keep branch and directory names short,
|
|
72
|
+
while preserving the leading portion of the slug.
|
|
73
|
+
"""
|
|
74
|
+
slug = slugify(text)
|
|
75
|
+
if len(slug) <= max_length:
|
|
76
|
+
return slug
|
|
77
|
+
return slug[:max_length].rstrip("-")
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
67
81
|
def ensure_gitignore_entry(repo_path: Path, entry: str) -> bool:
|
|
68
82
|
"""
|
|
69
83
|
Ensure an entry exists in the repository's .gitignore file.
|
|
@@ -319,7 +333,7 @@ def create_local_worktree(
|
|
|
319
333
|
if bead_id:
|
|
320
334
|
# Bead-based naming: {bead_id}-{annotation}
|
|
321
335
|
if annotation:
|
|
322
|
-
dir_name = f"{bead_id}-{
|
|
336
|
+
dir_name = f"{bead_id}-{short_slug(annotation)}"
|
|
323
337
|
else:
|
|
324
338
|
dir_name = bead_id
|
|
325
339
|
else:
|
|
@@ -327,7 +341,7 @@ def create_local_worktree(
|
|
|
327
341
|
short_uuid = uuid.uuid4().hex[:8]
|
|
328
342
|
name_slug = slugify(worker_name)
|
|
329
343
|
if annotation:
|
|
330
|
-
dir_name = f"{name_slug}-{short_uuid}-{
|
|
344
|
+
dir_name = f"{name_slug}-{short_uuid}-{short_slug(annotation)}"
|
|
331
345
|
else:
|
|
332
346
|
dir_name = f"{name_slug}-{short_uuid}"
|
|
333
347
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: claude-team-mcp
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.8.2
|
|
4
4
|
Summary: MCP server for managing multiple Claude Code sessions via iTerm2
|
|
5
5
|
Project-URL: Homepage, https://github.com/Martian-Engineering/claude-team
|
|
6
6
|
Project-URL: Repository, https://github.com/Martian-Engineering/claude-team
|
|
@@ -1,38 +1,40 @@
|
|
|
1
1
|
claude_team/__init__.py,sha256=vDgDXeillUkQr0QDv-wcscJIuSgA6lctbMQrWfxhGJ0,293
|
|
2
|
-
claude_team/events.py,sha256=
|
|
2
|
+
claude_team/events.py,sha256=u-IHZm35J6P_2040CvPQI1b32X79OvHwAlNp4-RJ3oY,15757
|
|
3
3
|
claude_team/idle_detection.py,sha256=x91HZdbp01gizTYMAY2SpMFnkJBMomgi8lSafFmRoao,5627
|
|
4
4
|
claude_team/poller.py,sha256=C4A6Rr_ABTC5suCGPuBhLn_-e_z5tSzSKwSYl-SERlk,8363
|
|
5
5
|
claude_team_mcp/__init__.py,sha256=HnGWRX1P2CxUafElaxq6zXvXznQeUF5XiQBqu9eJU0Q,481
|
|
6
6
|
claude_team_mcp/__main__.py,sha256=JOG9n8ZCjy3JN96T0n97Ro-ZWtOU-RTJks7ahz81NRM,134
|
|
7
7
|
claude_team_mcp/colors.py,sha256=f-PcPep9WkZ7zbt-IF0Ey4OXfZeiY-y2uXERFtiY8Pk,3270
|
|
8
|
+
claude_team_mcp/config.py,sha256=1-aJ6cYLQfEzu52CMFvUEVa3k9xOSFSAQHhQfAKB3M4,10099
|
|
9
|
+
claude_team_mcp/config_cli.py,sha256=2v2kXyK81p5CvBoclivSO9cmq2kQQt6H3PYOdirxwUA,8209
|
|
8
10
|
claude_team_mcp/formatting.py,sha256=tcBmKyaZm15nkeJfssuIMkoFQTlmwDllf7ulZvWkcv4,3831
|
|
9
11
|
claude_team_mcp/idle_detection.py,sha256=KRnhObbVM--S8HPowWq7UkjXxq5AMpGdVHY5UUv3Z0o,16331
|
|
10
12
|
claude_team_mcp/iterm_utils.py,sha256=Imp4yUwq06avwdEw3bOSaO168DpCUveazc71Q8AZOFw,37621
|
|
11
13
|
claude_team_mcp/names.py,sha256=qUJlO2WlFjxB4Q1vLLTcEjTvKA63fJ3i2QBz80ABgnQ,15978
|
|
12
14
|
claude_team_mcp/profile.py,sha256=yqytAE0dIe6NQ6FodldSepO-ZIeR7-C0UfK3FsO7Pn4,12326
|
|
13
15
|
claude_team_mcp/registry.py,sha256=LWOoXxZ2VUhY-qZbKM0riCGrDdC1EbIKrKNprafUZNY,14945
|
|
14
|
-
claude_team_mcp/server.py,sha256=
|
|
16
|
+
claude_team_mcp/server.py,sha256=Yblf5W2VpYcNitWN-iacF_zHcF35_7DZ-z-bg0MJtbQ,16363
|
|
15
17
|
claude_team_mcp/session_state.py,sha256=DFNPWog7yyc5yF1_lMhDMcBMpCRGi22YRI6IdoIEf0o,46814
|
|
16
18
|
claude_team_mcp/subprocess_cache.py,sha256=6Q1NIMn2X5_75S4s_a9iPBka-UCz6RW0EMxPSPEaLxo,3612
|
|
17
19
|
claude_team_mcp/worker_prompt.py,sha256=NvzUrR6Zqjp8HuL-xOeAncdvACHbyN7O0nISWyySHq4,15771
|
|
18
|
-
claude_team_mcp/worktree.py,sha256=
|
|
19
|
-
claude_team_mcp/cli_backends/__init__.py,sha256=
|
|
20
|
+
claude_team_mcp/worktree.py,sha256=q05yhIqlpsG9CW-QDRq5SyqC7T3iYYxjLDkUiGX2M-g,19102
|
|
21
|
+
claude_team_mcp/cli_backends/__init__.py,sha256=uPIiZ0nxzhtunMfdwfWoNmLIUb7YMaWzoaFaECChKFU,1128
|
|
20
22
|
claude_team_mcp/cli_backends/base.py,sha256=dArm2Yqjzs3smN0JpSGR79e9I_kQYJFgQ8gYpNrmS-o,3923
|
|
21
|
-
claude_team_mcp/cli_backends/claude.py,sha256=
|
|
22
|
-
claude_team_mcp/cli_backends/codex.py,sha256=
|
|
23
|
-
claude_team_mcp/issue_tracker/__init__.py,sha256=
|
|
23
|
+
claude_team_mcp/cli_backends/claude.py,sha256=r9CW-JHZ3nVEadjf6W0AQ2Ypt4wGCvqSKczl3cRu0MY,4312
|
|
24
|
+
claude_team_mcp/cli_backends/codex.py,sha256=bQvHZFfivF8Oe92gX_3qHDeaHfABDYTjqNg_6aSMido,4479
|
|
25
|
+
claude_team_mcp/issue_tracker/__init__.py,sha256=88wN3ZUUZcSh_lK2jncWH546dYXATY0FShRpAczjAQs,6101
|
|
24
26
|
claude_team_mcp/schemas/__init__.py,sha256=IingbdgdQx9C0ZLBOhZ-doqIJRbO7aeAQjuCHMuVA84,99
|
|
25
27
|
claude_team_mcp/schemas/codex.py,sha256=KwUkTmD70kQLZvzl366tHAsuwKbtsk86ySTOW6b9wDk,5949
|
|
26
|
-
claude_team_mcp/terminal_backends/__init__.py,sha256=
|
|
28
|
+
claude_team_mcp/terminal_backends/__init__.py,sha256=qH8JHQPiyisO1LPOLq6aHxGMJv_TU04uR_88k6CZw20,1351
|
|
27
29
|
claude_team_mcp/terminal_backends/base.py,sha256=9GrFDm-Jah8y6DALQrq8dei9UgWeZkWXYbbcrfkFAHA,3202
|
|
28
30
|
claude_team_mcp/terminal_backends/iterm.py,sha256=A5klhOpzDrZ-636aN1Hlnnfxk4OA-Rz_OuaQi1ABz0Y,9317
|
|
29
|
-
claude_team_mcp/terminal_backends/tmux.py,sha256=
|
|
31
|
+
claude_team_mcp/terminal_backends/tmux.py,sha256=blMb669GlGjxedOLLu35NmuZpsN74Z4bq1EmMGqO7G0,24512
|
|
30
32
|
claude_team_mcp/tools/__init__.py,sha256=YPKaGC81WDHouee6MQlVOhk2teI0adYvbo949LCCKd0,1593
|
|
31
33
|
claude_team_mcp/tools/adopt_worker.py,sha256=P4HlUaKqS5piOh-0Or27h935WRtkfEXtznCZ_cQF1j4,6897
|
|
32
34
|
claude_team_mcp/tools/annotate_worker.py,sha256=mBo4YMaaaNQxQBduYK1DPA-Ioift-ZQ9tYlBM6S15t8,1639
|
|
33
35
|
claude_team_mcp/tools/check_idle_workers.py,sha256=IjDNDeal9M7lTONWjKZrt8bXu7O277ossHz_2oyLRcY,3374
|
|
34
36
|
claude_team_mcp/tools/close_workers.py,sha256=MlxyEKkDBJEP3FXY8ESQ1x7cjulzJi-fVNCsC4Z2Aig,7878
|
|
35
|
-
claude_team_mcp/tools/discover_workers.py,sha256=
|
|
37
|
+
claude_team_mcp/tools/discover_workers.py,sha256=wR2wEPRG1jggYuWJhEqC1Sw5ZrOrm9gwgOxEY4HFTD8,11830
|
|
36
38
|
claude_team_mcp/tools/examine_worker.py,sha256=7Nd3EOdsGVDjMJ8ov9NhmcrjN8K9IE4i_noXHOP1uI8,1620
|
|
37
39
|
claude_team_mcp/tools/issue_tracker_help.py,sha256=KxgjFhXp3NCUDjqTl3UnIiFV-Y5DM80C1EoZXfA82QM,1668
|
|
38
40
|
claude_team_mcp/tools/list_workers.py,sha256=EqKXNsVH-eOmmE6YpVwgXacA7sf3nqarKETKDcdcomg,3710
|
|
@@ -40,13 +42,13 @@ claude_team_mcp/tools/list_worktrees.py,sha256=_EIwpwoCMLaQh4dHws-jO53MS-E-L7hC7
|
|
|
40
42
|
claude_team_mcp/tools/message_workers.py,sha256=pWZYcbDyezrNeWrkmFcLHROWtJqKmKaXgvd7aj8-h3Y,13260
|
|
41
43
|
claude_team_mcp/tools/poll_worker_changes.py,sha256=xR2yeSPnM7fjKxst-DFfF4sec6wBcy_Q-V-A8iTElYQ,7770
|
|
42
44
|
claude_team_mcp/tools/read_worker_logs.py,sha256=9gccM6MSaoxu97Xjsk7nUalLEU8XHV7r3SKggBRpNww,5913
|
|
43
|
-
claude_team_mcp/tools/spawn_workers.py,sha256=
|
|
45
|
+
claude_team_mcp/tools/spawn_workers.py,sha256=Md5EsEq5rhXx1WweabX8lPN-em2_s3h1C1xmYezrqS8,37723
|
|
44
46
|
claude_team_mcp/tools/wait_idle_workers.py,sha256=EAPBinBsrRtisADQJZQGPHR8CAIB6lYrXMe5DmeMciM,5279
|
|
45
47
|
claude_team_mcp/utils/__init__.py,sha256=Jyc-N1RXZnMdXLjSgRBB2ih04v-h0woUzZcVYYfc7wQ,647
|
|
46
48
|
claude_team_mcp/utils/constants.py,sha256=FGDHeo0reZ89365fuXJGIl2Y5MFQAoKfWtmYr7UQzhQ,5815
|
|
47
49
|
claude_team_mcp/utils/errors.py,sha256=kP0MPjLIpEOZkbGAzDxonMFERbsjwfID5VVY5qAR2II,2949
|
|
48
50
|
claude_team_mcp/utils/worktree_detection.py,sha256=oMGcb7p1jvr7qWs06sxUMTAV8jRialcVqziCTCdW7XU,3251
|
|
49
|
-
claude_team_mcp-0.
|
|
50
|
-
claude_team_mcp-0.
|
|
51
|
-
claude_team_mcp-0.
|
|
52
|
-
claude_team_mcp-0.
|
|
51
|
+
claude_team_mcp-0.8.2.dist-info/METADATA,sha256=xihVjYbyF9NHtVtpxFUc_UdbNnLsMIfbQuLKcetgeNo,16020
|
|
52
|
+
claude_team_mcp-0.8.2.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
53
|
+
claude_team_mcp-0.8.2.dist-info/entry_points.txt,sha256=cmk5dmK50RVquExT-k_J72akl3qKIerPpVqfit7kQtQ,53
|
|
54
|
+
claude_team_mcp-0.8.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|