workstreams-cli 0.5.0__tar.gz → 0.5.1__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.
Files changed (29) hide show
  1. {workstreams_cli-0.5.0 → workstreams_cli-0.5.1}/PKG-INFO +64 -21
  2. {workstreams_cli-0.5.0 → workstreams_cli-0.5.1}/README.md +63 -20
  3. {workstreams_cli-0.5.0 → workstreams_cli-0.5.1}/pyproject.toml +1 -1
  4. {workstreams_cli-0.5.0 → workstreams_cli-0.5.1}/src/workstreams/__init__.py +1 -1
  5. {workstreams_cli-0.5.0 → workstreams_cli-0.5.1}/src/workstreams_cli.egg-info/PKG-INFO +64 -21
  6. {workstreams_cli-0.5.0 → workstreams_cli-0.5.1}/setup.cfg +0 -0
  7. {workstreams_cli-0.5.0 → workstreams_cli-0.5.1}/src/workstreams/cli.py +0 -0
  8. {workstreams_cli-0.5.0 → workstreams_cli-0.5.1}/src/workstreams/config.py +0 -0
  9. {workstreams_cli-0.5.0 → workstreams_cli-0.5.1}/src/workstreams/dashboard.py +0 -0
  10. {workstreams_cli-0.5.0 → workstreams_cli-0.5.1}/src/workstreams/event_log.py +0 -0
  11. {workstreams_cli-0.5.0 → workstreams_cli-0.5.1}/src/workstreams/manager.py +0 -0
  12. {workstreams_cli-0.5.0 → workstreams_cli-0.5.1}/src/workstreams/models.py +0 -0
  13. {workstreams_cli-0.5.0 → workstreams_cli-0.5.1}/src/workstreams/multiplexer/__init__.py +0 -0
  14. {workstreams_cli-0.5.0 → workstreams_cli-0.5.1}/src/workstreams/multiplexer/base.py +0 -0
  15. {workstreams_cli-0.5.0 → workstreams_cli-0.5.1}/src/workstreams/multiplexer/tmux.py +0 -0
  16. {workstreams_cli-0.5.0 → workstreams_cli-0.5.1}/src/workstreams/multiplexer/tmux_compatible.py +0 -0
  17. {workstreams_cli-0.5.0 → workstreams_cli-0.5.1}/src/workstreams/multiplexer/zellij.py +0 -0
  18. {workstreams_cli-0.5.0 → workstreams_cli-0.5.1}/src/workstreams/notifier.py +0 -0
  19. {workstreams_cli-0.5.0 → workstreams_cli-0.5.1}/src/workstreams/py.typed +0 -0
  20. {workstreams_cli-0.5.0 → workstreams_cli-0.5.1}/src/workstreams/subagent_client.py +0 -0
  21. {workstreams_cli-0.5.0 → workstreams_cli-0.5.1}/src/workstreams_cli.egg-info/SOURCES.txt +0 -0
  22. {workstreams_cli-0.5.0 → workstreams_cli-0.5.1}/src/workstreams_cli.egg-info/dependency_links.txt +0 -0
  23. {workstreams_cli-0.5.0 → workstreams_cli-0.5.1}/src/workstreams_cli.egg-info/entry_points.txt +0 -0
  24. {workstreams_cli-0.5.0 → workstreams_cli-0.5.1}/src/workstreams_cli.egg-info/requires.txt +0 -0
  25. {workstreams_cli-0.5.0 → workstreams_cli-0.5.1}/src/workstreams_cli.egg-info/top_level.txt +0 -0
  26. {workstreams_cli-0.5.0 → workstreams_cli-0.5.1}/tests/test_config.py +0 -0
  27. {workstreams_cli-0.5.0 → workstreams_cli-0.5.1}/tests/test_event_log.py +0 -0
  28. {workstreams_cli-0.5.0 → workstreams_cli-0.5.1}/tests/test_models.py +0 -0
  29. {workstreams_cli-0.5.0 → workstreams_cli-0.5.1}/tests/test_notifier.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: workstreams-cli
3
- Version: 0.5.0
3
+ Version: 0.5.1
4
4
  Summary: Visually dispatch coding-agent work to subagents in real terminal windows and monitor it in one dashboard - for any coding agent (Claude Code, Codex, OpenCode, Qwen Code, Hermes, Cline, and more).
5
5
  Author: Dream-Pixels-Forge
6
6
  License: MIT
@@ -68,6 +68,7 @@ Coding agents increasingly support "subagents" that run in the background of the
68
68
  - [CI/CD Integration](#cicd-integration)
69
69
  - [Troubleshooting](#troubleshooting)
70
70
  - [Best Practices](#best-practices)
71
+ - [Architecture](#architecture)
71
72
  - [Contributing & License](#contributing--license)
72
73
 
73
74
  ---
@@ -104,7 +105,7 @@ pip install -e ".[yaml,dev]" # dev extras add pytest
104
105
  Verify:
105
106
 
106
107
  ```bash
107
- workstreams --version # -> workstreams 0.5.0
108
+ workstreams --version # -> workstreams 0.5.1
108
109
  ```
109
110
 
110
111
  > **Note:** every command also accepts `--json` to emit machine-readable output (where supported), which coding agents can parse. All read-side commands work without a multiplexer installed; only `start`/`dispatch`/`work`/`attach` need one.
@@ -588,29 +589,71 @@ workstreams logs --workstream 1 --lines 50
588
589
 
589
590
  ---
590
591
 
591
- ## Repository Layout
592
+ ## Architecture
593
+
594
+ `workstreams` is a thin orchestration layer that sits between you, your git repo, a terminal multiplexer, and any coding agent binary. The core parts and how they fit together:
592
595
 
593
596
  ```
594
- workstreams-cli/
595
- ├── src/workstreams/
596
- │ ├── __init__.py # public API (models, manager, event fns, multiplexers)
597
- │ ├── cli.py # argparse CLI (entry: workstreams.cli:main)
598
- │ ├── config.py # YAML/JSON config load+save (with no-pyyaml fallback)
599
- │ ├── models.py # dataclasses: WorkstreamConfig, WorkstreamsConfig,
600
- │ │ # WorkstreamStatus, SubagentEvent
601
- │ ├── manager.py # WorkstreamsManager: init/start/dispatch/work/
602
- │ │ # sync/pr/merge/run/logs/events/notify
603
- │ ├── event_log.py # append-only JSONL event log (concurrent-safe)
604
- │ ├── notifier.py # desktop + file notifications
605
- │ ├── dashboard.py # live ANSI TUI monitor
606
- │ ├── subagent_client.py # subagent_* event emitters (Python API)
607
- │ └── multiplexer/ # tmux + zellij backends (MultiplexerBase)
608
- ├── skills/ # agent skill: SKILL.md, REFERENCE.md, EXAMPLES.md
609
- ├── scripts/ # standalone script variants + helpers
610
- ├── pyproject.toml # packaging (pip install workstreams-cli)
611
- └── .github/workflows/ # PyPI release on GitHub Release (OIDC)
597
+ you / your main terminal / a CI job / a cron
598
+ │ CLI (argparse)
599
+ ▼
600
+ ┌─────────────────────────────────────────────────────────┐
601
+ │ cli.py (entry: workstreams) │
602
+ └─────────────────────────────────────────────────────────┘
603
+ │ command routing │ config resolution (flag > yaml > env > default)
604
+ ▼ ▼
605
+ ┌──────────────────────┐ ┌──────────────────────┐
606
+ │ WorkstreamsManager │ │ config.py │
607
+ │ (manager.py) │◄──│ .workstreams.yaml / │
608
+ │ init·start·dispatch │ │ .json load+save, │
609
+ │ work·sync·pr·merge· │ │ no-pyyaml fallback │
610
+ │ run·logs·events │ └──────────────────────┘
611
+ └──────┬───────────────┘
612
+ │
613
+ ┌───┴──────────────────────────────────────────────┐
614
+ │ │
615
+ ▼ ▼
616
+ ┌────────────────────────────┐ ┌────────────────────────────┐
617
+ │ multiplexer/ (backends) │ │ event_log.py + │
618
+ │ tmux.py / zellij.py │ │ subagent_client.py │
619
+ │ MultiplexerBase: │ │ (Python API emitters) │
620
+ │ create_session, send_ │ │ │
621
+ │ command, list_sessions… │ │ NOTIFIER │
622
+ └─────────────┬──────────────┘ │ (notifier.py): desktop │
623
+ │ send-keys / tabs │ notify-send/osascript + │
624
+ ▼ │ notifications.jsonl │
625
+ visible terminal panes ◄──────────┤ │
626
+ (one per workstream lane) └────────────────────────────┘
627
+ │ each pane runs its own agent (claude, codex, …)
628
+ │ agent appends JSONL events back
629
+ ▼
630
+ ┌──────────────────────────────────────────────────────────────┐
631
+ │ ~/.workstreams/<project>/ │
632
+ │ events.jsonl shared, concurrent-safe event stream │
633
+ │ notifications.jsonl cross-terminal notification queue │
634
+ └──────────────────────────────────────────────────────────────┘
635
+ ▲
636
+ │ re-render every 2s (configurable)
637
+ ┌────────────────────────────┐
638
+ │ dashboard.py │
639
+ │ LiveDashboard: ANSI TUI │ ◄── the only read-side that polls events live
640
+ └────────────────────────────┘
641
+
642
+ models.py defines the dataclasses (WorkstreamConfig, WorkstreamsConfig,
643
+ WorkstreamStatus, SubagentEvent) shared across all of the above.
612
644
  ```
613
645
 
646
+ How a run flows end-to-end:
647
+
648
+ 1. **`init`** creates the lanes: for each workstream it adds a git worktree/branch (`ws/N`) plus a `worktrees/N/` directory, then writes `.workstreams.yaml` in the repo root.
649
+ 2. **`start`** asks the chosen multiplexer backend (tmux by default) to open a detached, auto-named session `workstreams-<project>`, one window/tab per lane, each holding a persistent shell.
650
+ 3. **`dispatch` / `work` / `run`** target a specific lane's pane (`<session>:<window-name>` for tmux windows, pane index for tiled) and send a command/prompt into it, emitting a `started` event to the shared log and firing a notification.
651
+ 4. **Any** process — the agent inside a pane, a CI job, a script, the main terminal — appends JSONL events (`started`, `progress`, `completed`, `failed`, `error`, `done`) to `events.jsonl` using `O_APPEND` plus a short lock that self-heals stale locks after 10s, so concurrent writers never corrupt the stream.
652
+ 5. **`monitor`** (the dashboard) and **`events`** read that stream back and re-render every 2s; `--wait` on `dispatch`/`work` blocks until a terminal event arrives (4h safety timeout).
653
+ 6. **`sync` / `pr` / `merge` / `workstream cleanup`** close the loop: rebase/merge the lane, push and open a PR via `gh`, merge it, and prune the finished worktree.
654
+
655
+ Read-side commands (`status`, `events`, `logs`, `monitor`) need no multiplexer; only `start`/`dispatch`/`work`/`attach` require one to be installed.
656
+
614
657
  ---
615
658
 
616
659
  ## Contributing & License
@@ -38,6 +38,7 @@ Coding agents increasingly support "subagents" that run in the background of the
38
38
  - [CI/CD Integration](#cicd-integration)
39
39
  - [Troubleshooting](#troubleshooting)
40
40
  - [Best Practices](#best-practices)
41
+ - [Architecture](#architecture)
41
42
  - [Contributing & License](#contributing--license)
42
43
 
43
44
  ---
@@ -74,7 +75,7 @@ pip install -e ".[yaml,dev]" # dev extras add pytest
74
75
  Verify:
75
76
 
76
77
  ```bash
77
- workstreams --version # -> workstreams 0.5.0
78
+ workstreams --version # -> workstreams 0.5.1
78
79
  ```
79
80
 
80
81
  > **Note:** every command also accepts `--json` to emit machine-readable output (where supported), which coding agents can parse. All read-side commands work without a multiplexer installed; only `start`/`dispatch`/`work`/`attach` need one.
@@ -558,29 +559,71 @@ workstreams logs --workstream 1 --lines 50
558
559
 
559
560
  ---
560
561
 
561
- ## Repository Layout
562
+ ## Architecture
563
+
564
+ `workstreams` is a thin orchestration layer that sits between you, your git repo, a terminal multiplexer, and any coding agent binary. The core parts and how they fit together:
562
565
 
563
566
  ```
564
- workstreams-cli/
565
- ├── src/workstreams/
566
- │ ├── __init__.py # public API (models, manager, event fns, multiplexers)
567
- │ ├── cli.py # argparse CLI (entry: workstreams.cli:main)
568
- │ ├── config.py # YAML/JSON config load+save (with no-pyyaml fallback)
569
- │ ├── models.py # dataclasses: WorkstreamConfig, WorkstreamsConfig,
570
- │ │ # WorkstreamStatus, SubagentEvent
571
- │ ├── manager.py # WorkstreamsManager: init/start/dispatch/work/
572
- │ │ # sync/pr/merge/run/logs/events/notify
573
- │ ├── event_log.py # append-only JSONL event log (concurrent-safe)
574
- │ ├── notifier.py # desktop + file notifications
575
- │ ├── dashboard.py # live ANSI TUI monitor
576
- │ ├── subagent_client.py # subagent_* event emitters (Python API)
577
- │ └── multiplexer/ # tmux + zellij backends (MultiplexerBase)
578
- ├── skills/ # agent skill: SKILL.md, REFERENCE.md, EXAMPLES.md
579
- ├── scripts/ # standalone script variants + helpers
580
- ├── pyproject.toml # packaging (pip install workstreams-cli)
581
- └── .github/workflows/ # PyPI release on GitHub Release (OIDC)
567
+ you / your main terminal / a CI job / a cron
568
+ │ CLI (argparse)
569
+ ▼
570
+ ┌─────────────────────────────────────────────────────────┐
571
+ │ cli.py (entry: workstreams) │
572
+ └─────────────────────────────────────────────────────────┘
573
+ │ command routing │ config resolution (flag > yaml > env > default)
574
+ ▼ ▼
575
+ ┌──────────────────────┐ ┌──────────────────────┐
576
+ │ WorkstreamsManager │ │ config.py │
577
+ │ (manager.py) │◄──│ .workstreams.yaml / │
578
+ │ init·start·dispatch │ │ .json load+save, │
579
+ │ work·sync·pr·merge· │ │ no-pyyaml fallback │
580
+ │ run·logs·events │ └──────────────────────┘
581
+ └──────┬───────────────┘
582
+ │
583
+ ┌───┴──────────────────────────────────────────────┐
584
+ │ │
585
+ ▼ ▼
586
+ ┌────────────────────────────┐ ┌────────────────────────────┐
587
+ │ multiplexer/ (backends) │ │ event_log.py + │
588
+ │ tmux.py / zellij.py │ │ subagent_client.py │
589
+ │ MultiplexerBase: │ │ (Python API emitters) │
590
+ │ create_session, send_ │ │ │
591
+ │ command, list_sessions… │ │ NOTIFIER │
592
+ └─────────────┬──────────────┘ │ (notifier.py): desktop │
593
+ │ send-keys / tabs │ notify-send/osascript + │
594
+ ▼ │ notifications.jsonl │
595
+ visible terminal panes ◄──────────┤ │
596
+ (one per workstream lane) └────────────────────────────┘
597
+ │ each pane runs its own agent (claude, codex, …)
598
+ │ agent appends JSONL events back
599
+ ▼
600
+ ┌──────────────────────────────────────────────────────────────┐
601
+ │ ~/.workstreams/<project>/ │
602
+ │ events.jsonl shared, concurrent-safe event stream │
603
+ │ notifications.jsonl cross-terminal notification queue │
604
+ └──────────────────────────────────────────────────────────────┘
605
+ ▲
606
+ │ re-render every 2s (configurable)
607
+ ┌────────────────────────────┐
608
+ │ dashboard.py │
609
+ │ LiveDashboard: ANSI TUI │ ◄── the only read-side that polls events live
610
+ └────────────────────────────┘
611
+
612
+ models.py defines the dataclasses (WorkstreamConfig, WorkstreamsConfig,
613
+ WorkstreamStatus, SubagentEvent) shared across all of the above.
582
614
  ```
583
615
 
616
+ How a run flows end-to-end:
617
+
618
+ 1. **`init`** creates the lanes: for each workstream it adds a git worktree/branch (`ws/N`) plus a `worktrees/N/` directory, then writes `.workstreams.yaml` in the repo root.
619
+ 2. **`start`** asks the chosen multiplexer backend (tmux by default) to open a detached, auto-named session `workstreams-<project>`, one window/tab per lane, each holding a persistent shell.
620
+ 3. **`dispatch` / `work` / `run`** target a specific lane's pane (`<session>:<window-name>` for tmux windows, pane index for tiled) and send a command/prompt into it, emitting a `started` event to the shared log and firing a notification.
621
+ 4. **Any** process — the agent inside a pane, a CI job, a script, the main terminal — appends JSONL events (`started`, `progress`, `completed`, `failed`, `error`, `done`) to `events.jsonl` using `O_APPEND` plus a short lock that self-heals stale locks after 10s, so concurrent writers never corrupt the stream.
622
+ 5. **`monitor`** (the dashboard) and **`events`** read that stream back and re-render every 2s; `--wait` on `dispatch`/`work` blocks until a terminal event arrives (4h safety timeout).
623
+ 6. **`sync` / `pr` / `merge` / `workstream cleanup`** close the loop: rebase/merge the lane, push and open a PR via `gh`, merge it, and prune the finished worktree.
624
+
625
+ Read-side commands (`status`, `events`, `logs`, `monitor`) need no multiplexer; only `start`/`dispatch`/`work`/`attach` require one to be installed.
626
+
584
627
  ---
585
628
 
586
629
  ## Contributing & License
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "workstreams-cli"
7
- version = "0.5.0"
7
+ version = "0.5.1"
8
8
  description = "Visually dispatch coding-agent work to subagents in real terminal windows and monitor it in one dashboard - for any coding agent (Claude Code, Codex, OpenCode, Qwen Code, Hermes, Cline, and more)."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.9"
@@ -34,7 +34,7 @@ from .subagent_client import (
34
34
  )
35
35
  from .multiplexer import MultiplexerBase, TmuxMultiplexer, ZellijMultiplexer, get_multiplexer
36
36
 
37
- __version__ = "0.5.0"
37
+ __version__ = "0.5.1"
38
38
 
39
39
  __all__ = [
40
40
  # models
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: workstreams-cli
3
- Version: 0.5.0
3
+ Version: 0.5.1
4
4
  Summary: Visually dispatch coding-agent work to subagents in real terminal windows and monitor it in one dashboard - for any coding agent (Claude Code, Codex, OpenCode, Qwen Code, Hermes, Cline, and more).
5
5
  Author: Dream-Pixels-Forge
6
6
  License: MIT
@@ -68,6 +68,7 @@ Coding agents increasingly support "subagents" that run in the background of the
68
68
  - [CI/CD Integration](#cicd-integration)
69
69
  - [Troubleshooting](#troubleshooting)
70
70
  - [Best Practices](#best-practices)
71
+ - [Architecture](#architecture)
71
72
  - [Contributing & License](#contributing--license)
72
73
 
73
74
  ---
@@ -104,7 +105,7 @@ pip install -e ".[yaml,dev]" # dev extras add pytest
104
105
  Verify:
105
106
 
106
107
  ```bash
107
- workstreams --version # -> workstreams 0.5.0
108
+ workstreams --version # -> workstreams 0.5.1
108
109
  ```
109
110
 
110
111
  > **Note:** every command also accepts `--json` to emit machine-readable output (where supported), which coding agents can parse. All read-side commands work without a multiplexer installed; only `start`/`dispatch`/`work`/`attach` need one.
@@ -588,29 +589,71 @@ workstreams logs --workstream 1 --lines 50
588
589
 
589
590
  ---
590
591
 
591
- ## Repository Layout
592
+ ## Architecture
593
+
594
+ `workstreams` is a thin orchestration layer that sits between you, your git repo, a terminal multiplexer, and any coding agent binary. The core parts and how they fit together:
592
595
 
593
596
  ```
594
- workstreams-cli/
595
- ├── src/workstreams/
596
- │ ├── __init__.py # public API (models, manager, event fns, multiplexers)
597
- │ ├── cli.py # argparse CLI (entry: workstreams.cli:main)
598
- │ ├── config.py # YAML/JSON config load+save (with no-pyyaml fallback)
599
- │ ├── models.py # dataclasses: WorkstreamConfig, WorkstreamsConfig,
600
- │ │ # WorkstreamStatus, SubagentEvent
601
- │ ├── manager.py # WorkstreamsManager: init/start/dispatch/work/
602
- │ │ # sync/pr/merge/run/logs/events/notify
603
- │ ├── event_log.py # append-only JSONL event log (concurrent-safe)
604
- │ ├── notifier.py # desktop + file notifications
605
- │ ├── dashboard.py # live ANSI TUI monitor
606
- │ ├── subagent_client.py # subagent_* event emitters (Python API)
607
- │ └── multiplexer/ # tmux + zellij backends (MultiplexerBase)
608
- ├── skills/ # agent skill: SKILL.md, REFERENCE.md, EXAMPLES.md
609
- ├── scripts/ # standalone script variants + helpers
610
- ├── pyproject.toml # packaging (pip install workstreams-cli)
611
- └── .github/workflows/ # PyPI release on GitHub Release (OIDC)
597
+ you / your main terminal / a CI job / a cron
598
+ │ CLI (argparse)
599
+ ▼
600
+ ┌─────────────────────────────────────────────────────────┐
601
+ │ cli.py (entry: workstreams) │
602
+ └─────────────────────────────────────────────────────────┘
603
+ │ command routing │ config resolution (flag > yaml > env > default)
604
+ ▼ ▼
605
+ ┌──────────────────────┐ ┌──────────────────────┐
606
+ │ WorkstreamsManager │ │ config.py │
607
+ │ (manager.py) │◄──│ .workstreams.yaml / │
608
+ │ init·start·dispatch │ │ .json load+save, │
609
+ │ work·sync·pr·merge· │ │ no-pyyaml fallback │
610
+ │ run·logs·events │ └──────────────────────┘
611
+ └──────┬───────────────┘
612
+ │
613
+ ┌───┴──────────────────────────────────────────────┐
614
+ │ │
615
+ ▼ ▼
616
+ ┌────────────────────────────┐ ┌────────────────────────────┐
617
+ │ multiplexer/ (backends) │ │ event_log.py + │
618
+ │ tmux.py / zellij.py │ │ subagent_client.py │
619
+ │ MultiplexerBase: │ │ (Python API emitters) │
620
+ │ create_session, send_ │ │ │
621
+ │ command, list_sessions… │ │ NOTIFIER │
622
+ └─────────────┬──────────────┘ │ (notifier.py): desktop │
623
+ │ send-keys / tabs │ notify-send/osascript + │
624
+ ▼ │ notifications.jsonl │
625
+ visible terminal panes ◄──────────┤ │
626
+ (one per workstream lane) └────────────────────────────┘
627
+ │ each pane runs its own agent (claude, codex, …)
628
+ │ agent appends JSONL events back
629
+ ▼
630
+ ┌──────────────────────────────────────────────────────────────┐
631
+ │ ~/.workstreams/<project>/ │
632
+ │ events.jsonl shared, concurrent-safe event stream │
633
+ │ notifications.jsonl cross-terminal notification queue │
634
+ └──────────────────────────────────────────────────────────────┘
635
+ ▲
636
+ │ re-render every 2s (configurable)
637
+ ┌────────────────────────────┐
638
+ │ dashboard.py │
639
+ │ LiveDashboard: ANSI TUI │ ◄── the only read-side that polls events live
640
+ └────────────────────────────┘
641
+
642
+ models.py defines the dataclasses (WorkstreamConfig, WorkstreamsConfig,
643
+ WorkstreamStatus, SubagentEvent) shared across all of the above.
612
644
  ```
613
645
 
646
+ How a run flows end-to-end:
647
+
648
+ 1. **`init`** creates the lanes: for each workstream it adds a git worktree/branch (`ws/N`) plus a `worktrees/N/` directory, then writes `.workstreams.yaml` in the repo root.
649
+ 2. **`start`** asks the chosen multiplexer backend (tmux by default) to open a detached, auto-named session `workstreams-<project>`, one window/tab per lane, each holding a persistent shell.
650
+ 3. **`dispatch` / `work` / `run`** target a specific lane's pane (`<session>:<window-name>` for tmux windows, pane index for tiled) and send a command/prompt into it, emitting a `started` event to the shared log and firing a notification.
651
+ 4. **Any** process — the agent inside a pane, a CI job, a script, the main terminal — appends JSONL events (`started`, `progress`, `completed`, `failed`, `error`, `done`) to `events.jsonl` using `O_APPEND` plus a short lock that self-heals stale locks after 10s, so concurrent writers never corrupt the stream.
652
+ 5. **`monitor`** (the dashboard) and **`events`** read that stream back and re-render every 2s; `--wait` on `dispatch`/`work` blocks until a terminal event arrives (4h safety timeout).
653
+ 6. **`sync` / `pr` / `merge` / `workstream cleanup`** close the loop: rebase/merge the lane, push and open a PR via `gh`, merge it, and prune the finished worktree.
654
+
655
+ Read-side commands (`status`, `events`, `logs`, `monitor`) need no multiplexer; only `start`/`dispatch`/`work`/`attach` require one to be installed.
656
+
614
657
  ---
615
658
 
616
659
  ## Contributing & License