mcp-workstate-orchestrator 0.4.7__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.
- mcp_workstate_orchestrator-0.4.7/PKG-INFO +117 -0
- mcp_workstate_orchestrator-0.4.7/README.md +95 -0
- mcp_workstate_orchestrator-0.4.7/pyproject.toml +157 -0
- mcp_workstate_orchestrator-0.4.7/setup.cfg +4 -0
- mcp_workstate_orchestrator-0.4.7/src/mcp_workstate_orchestrator.egg-info/PKG-INFO +117 -0
- mcp_workstate_orchestrator-0.4.7/src/mcp_workstate_orchestrator.egg-info/SOURCES.txt +101 -0
- mcp_workstate_orchestrator-0.4.7/src/mcp_workstate_orchestrator.egg-info/dependency_links.txt +1 -0
- mcp_workstate_orchestrator-0.4.7/src/mcp_workstate_orchestrator.egg-info/entry_points.txt +2 -0
- mcp_workstate_orchestrator-0.4.7/src/mcp_workstate_orchestrator.egg-info/requires.txt +13 -0
- mcp_workstate_orchestrator-0.4.7/src/mcp_workstate_orchestrator.egg-info/top_level.txt +2 -0
- mcp_workstate_orchestrator-0.4.7/src/workstate_orchestrator_mcp/__init__.py +1 -0
- mcp_workstate_orchestrator-0.4.7/src/workstate_orchestrator_mcp/__main__.py +4 -0
- mcp_workstate_orchestrator-0.4.7/src/workstate_orchestrator_mcp/_assets/__init__.py +48 -0
- mcp_workstate_orchestrator-0.4.7/src/workstate_orchestrator_mcp/_assets/rules/branch-review-guide.md +581 -0
- mcp_workstate_orchestrator-0.4.7/src/workstate_orchestrator_mcp/_assets/rules/branch-review-php.md +81 -0
- mcp_workstate_orchestrator-0.4.7/src/workstate_orchestrator_mcp/_assets/rules/branch-review-python.md +116 -0
- mcp_workstate_orchestrator-0.4.7/src/workstate_orchestrator_mcp/_assets/rules/branch-review-typescript.md +76 -0
- mcp_workstate_orchestrator-0.4.7/src/workstate_orchestrator_mcp/_assets/rules/contract-change-checklist.md +76 -0
- mcp_workstate_orchestrator-0.4.7/src/workstate_orchestrator_mcp/_assets/rules/planning-review-guide.md +222 -0
- mcp_workstate_orchestrator-0.4.7/src/workstate_orchestrator_mcp/_assets/scripts/worktree-lane +779 -0
- mcp_workstate_orchestrator-0.4.7/src/workstate_orchestrator_mcp/_assets/templates/WORKTREE_LANE_BRIEF.template.md +42 -0
- mcp_workstate_orchestrator-0.4.7/src/workstate_orchestrator_mcp/_assets/templates/WORKTREE_LANE_REPORT.template.md +33 -0
- mcp_workstate_orchestrator-0.4.7/src/workstate_orchestrator_mcp/api.py +1417 -0
- mcp_workstate_orchestrator-0.4.7/src/workstate_orchestrator_mcp/cli.py +373 -0
- mcp_workstate_orchestrator-0.4.7/src/workstate_orchestrator_mcp/lanes.py +1998 -0
- mcp_workstate_orchestrator-0.4.7/src/workstate_orchestrator_mcp/orchestration/__init__.py +4 -0
- mcp_workstate_orchestrator-0.4.7/src/workstate_orchestrator_mcp/orchestration/_env.py +277 -0
- mcp_workstate_orchestrator-0.4.7/src/workstate_orchestrator_mcp/orchestration/ace_metrics.py +1600 -0
- mcp_workstate_orchestrator-0.4.7/src/workstate_orchestrator_mcp/orchestration/adapters/claude_code.py +242 -0
- mcp_workstate_orchestrator-0.4.7/src/workstate_orchestrator_mcp/orchestration/adapters/codex_cli.py +280 -0
- mcp_workstate_orchestrator-0.4.7/src/workstate_orchestrator_mcp/orchestration/adapters/codex_subagent.py +161 -0
- mcp_workstate_orchestrator-0.4.7/src/workstate_orchestrator_mcp/orchestration/adapters/local_model.py +167 -0
- mcp_workstate_orchestrator-0.4.7/src/workstate_orchestrator_mcp/orchestration/adapters/structured_turn.py +136 -0
- mcp_workstate_orchestrator-0.4.7/src/workstate_orchestrator_mcp/orchestration/backend_adapter.py +120 -0
- mcp_workstate_orchestrator-0.4.7/src/workstate_orchestrator_mcp/orchestration/backend_registry.py +219 -0
- mcp_workstate_orchestrator-0.4.7/src/workstate_orchestrator_mcp/orchestration/bootstrap_lane.py +172 -0
- mcp_workstate_orchestrator-0.4.7/src/workstate_orchestrator_mcp/orchestration/daemon_startup.py +55 -0
- mcp_workstate_orchestrator-0.4.7/src/workstate_orchestrator_mcp/orchestration/dashboard_extension.py +95 -0
- mcp_workstate_orchestrator-0.4.7/src/workstate_orchestrator_mcp/orchestration/dashboard_live.py +386 -0
- mcp_workstate_orchestrator-0.4.7/src/workstate_orchestrator_mcp/orchestration/dashboard_tui.py +350 -0
- mcp_workstate_orchestrator-0.4.7/src/workstate_orchestrator_mcp/orchestration/generate_agent_config.py +66 -0
- mcp_workstate_orchestrator-0.4.7/src/workstate_orchestrator_mcp/orchestration/generate_lane_manifest.py +146 -0
- mcp_workstate_orchestrator-0.4.7/src/workstate_orchestrator_mcp/orchestration/handoff_guidance_summary.py +107 -0
- mcp_workstate_orchestrator-0.4.7/src/workstate_orchestrator_mcp/orchestration/handoff_integrity_guard.py +394 -0
- mcp_workstate_orchestrator-0.4.7/src/workstate_orchestrator_mcp/orchestration/handoff_read_shapes.py +124 -0
- mcp_workstate_orchestrator-0.4.7/src/workstate_orchestrator_mcp/orchestration/lane_config.py +332 -0
- mcp_workstate_orchestrator-0.4.7/src/workstate_orchestrator_mcp/orchestration/lane_exec.py +682 -0
- mcp_workstate_orchestrator-0.4.7/src/workstate_orchestrator_mcp/orchestration/lane_manifest.py +560 -0
- mcp_workstate_orchestrator-0.4.7/src/workstate_orchestrator_mcp/orchestration/lane_prompt.py +1138 -0
- mcp_workstate_orchestrator-0.4.7/src/workstate_orchestrator_mcp/orchestration/lane_result.py +273 -0
- mcp_workstate_orchestrator-0.4.7/src/workstate_orchestrator_mcp/orchestration/orchestrator_daemon.py +1412 -0
- mcp_workstate_orchestrator-0.4.7/src/workstate_orchestrator_mcp/orchestration/orchestrator_guidance.py +562 -0
- mcp_workstate_orchestrator-0.4.7/src/workstate_orchestrator_mcp/orchestration/orchestrator_guidance_policy.py +43 -0
- mcp_workstate_orchestrator-0.4.7/src/workstate_orchestrator_mcp/orchestration/orchestrator_helpers.py +74 -0
- mcp_workstate_orchestrator-0.4.7/src/workstate_orchestrator_mcp/orchestration/orchestrator_lanes.py +371 -0
- mcp_workstate_orchestrator-0.4.7/src/workstate_orchestrator_mcp/orchestration/review_dispatch.py +359 -0
- mcp_workstate_orchestrator-0.4.7/src/workstate_orchestrator_mcp/orchestration/review_ready.py +291 -0
- mcp_workstate_orchestrator-0.4.7/src/workstate_orchestrator_mcp/orchestration/review_runner.py +684 -0
- mcp_workstate_orchestrator-0.4.7/src/workstate_orchestrator_mcp/orchestration/slice_review_packet.py +362 -0
- mcp_workstate_orchestrator-0.4.7/src/workstate_orchestrator_mcp/orchestration/task_plan_parser.py +150 -0
- mcp_workstate_orchestrator-0.4.7/src/workstate_orchestrator_mcp/orchestration/worker_daemon.py +1908 -0
- mcp_workstate_orchestrator-0.4.7/src/workstate_orchestrator_mcp/orchestration/worker_daemon_ctl.py +500 -0
- mcp_workstate_orchestrator-0.4.7/src/workstate_orchestrator_mcp_launcher.py +4 -0
- mcp_workstate_orchestrator-0.4.7/tests/test_ace_metrics.py +1340 -0
- mcp_workstate_orchestrator-0.4.7/tests/test_ace_reflect.py +64 -0
- mcp_workstate_orchestrator-0.4.7/tests/test_backend_registry.py +252 -0
- mcp_workstate_orchestrator-0.4.7/tests/test_bootstrap_lane.py +236 -0
- mcp_workstate_orchestrator-0.4.7/tests/test_codex_subagent.py +40 -0
- mcp_workstate_orchestrator-0.4.7/tests/test_cross_vendor_subagent_equivalence.py +241 -0
- mcp_workstate_orchestrator-0.4.7/tests/test_daemon_startup_warning.py +154 -0
- mcp_workstate_orchestrator-0.4.7/tests/test_execution_adapters.py +107 -0
- mcp_workstate_orchestrator-0.4.7/tests/test_generate_agent_config.py +60 -0
- mcp_workstate_orchestrator-0.4.7/tests/test_generate_lane_manifest.py +150 -0
- mcp_workstate_orchestrator-0.4.7/tests/test_handoff_integrity_guard.py +34 -0
- mcp_workstate_orchestrator-0.4.7/tests/test_hardening.py +1758 -0
- mcp_workstate_orchestrator-0.4.7/tests/test_lane_config.py +147 -0
- mcp_workstate_orchestrator-0.4.7/tests/test_lane_exec.py +444 -0
- mcp_workstate_orchestrator-0.4.7/tests/test_lane_manifest.py +402 -0
- mcp_workstate_orchestrator-0.4.7/tests/test_lane_prompt.py +627 -0
- mcp_workstate_orchestrator-0.4.7/tests/test_lane_prompt_artifacts.py +386 -0
- mcp_workstate_orchestrator-0.4.7/tests/test_lane_result.py +107 -0
- mcp_workstate_orchestrator-0.4.7/tests/test_lanes_and_handoff_state.py +1898 -0
- mcp_workstate_orchestrator-0.4.7/tests/test_local_model.py +25 -0
- mcp_workstate_orchestrator-0.4.7/tests/test_orchestrator_build.py +209 -0
- mcp_workstate_orchestrator-0.4.7/tests/test_orchestrator_daemon.py +2473 -0
- mcp_workstate_orchestrator-0.4.7/tests/test_orchestrator_guidance.py +148 -0
- mcp_workstate_orchestrator-0.4.7/tests/test_orchestrator_lanes.py +114 -0
- mcp_workstate_orchestrator-0.4.7/tests/test_orchestrator_tools.py +1000 -0
- mcp_workstate_orchestrator-0.4.7/tests/test_package_metadata.py +34 -0
- mcp_workstate_orchestrator-0.4.7/tests/test_plan_cursor_gate.py +147 -0
- mcp_workstate_orchestrator-0.4.7/tests/test_protocol_contract.py +98 -0
- mcp_workstate_orchestrator-0.4.7/tests/test_review_dispatch.py +126 -0
- mcp_workstate_orchestrator-0.4.7/tests/test_review_fix_cycle.py +100 -0
- mcp_workstate_orchestrator-0.4.7/tests/test_review_mode.py +142 -0
- mcp_workstate_orchestrator-0.4.7/tests/test_review_ready.py +292 -0
- mcp_workstate_orchestrator-0.4.7/tests/test_review_runner.py +715 -0
- mcp_workstate_orchestrator-0.4.7/tests/test_review_schema.py +41 -0
- mcp_workstate_orchestrator-0.4.7/tests/test_smoke_apps_lane.py +449 -0
- mcp_workstate_orchestrator-0.4.7/tests/test_task_plan_parser.py +116 -0
- mcp_workstate_orchestrator-0.4.7/tests/test_worker_daemon.py +1080 -0
- mcp_workstate_orchestrator-0.4.7/tests/test_worker_daemon_ctl.py +294 -0
- mcp_workstate_orchestrator-0.4.7/tests/test_workstate_lane_id_propagation.py +174 -0
- mcp_workstate_orchestrator-0.4.7/tests/test_worktree_lane.py +218 -0
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: mcp-workstate-orchestrator
|
|
3
|
+
Version: 0.4.7
|
|
4
|
+
Summary: MCP server for orchestration, lane management, worker daemons, and turn metrics.
|
|
5
|
+
Project-URL: Homepage, https://github.com/darce/workstate
|
|
6
|
+
Project-URL: Source, https://github.com/darce/workstate/tree/main/packages/mcp-workstate-orchestrator
|
|
7
|
+
Project-URL: Changelog, https://github.com/darce/workstate/blob/main/packages/mcp-workstate-orchestrator/CHANGELOG.md
|
|
8
|
+
Project-URL: Issues, https://github.com/darce/workstate/issues
|
|
9
|
+
Requires-Python: >=3.12
|
|
10
|
+
Description-Content-Type: text/markdown
|
|
11
|
+
Requires-Dist: fastmcp
|
|
12
|
+
Requires-Dist: mcp-workstate-handoff<0.12.0,>=0.11.4
|
|
13
|
+
Requires-Dist: workstate-protocol<0.2.0,>=0.1.4
|
|
14
|
+
Provides-Extra: test
|
|
15
|
+
Requires-Dist: hypothesis>=6.0.0; extra == "test"
|
|
16
|
+
Requires-Dist: pytest>=8.0.0; extra == "test"
|
|
17
|
+
Provides-Extra: dev
|
|
18
|
+
Requires-Dist: hypothesis>=6.0.0; extra == "dev"
|
|
19
|
+
Requires-Dist: pytest>=8.0.0; extra == "dev"
|
|
20
|
+
Requires-Dist: ruff<1.0.0,>=0.11.0; extra == "dev"
|
|
21
|
+
Requires-Dist: mypy<2.0.0,>=1.13.0; extra == "dev"
|
|
22
|
+
|
|
23
|
+
# Workstate Orchestrator MCP
|
|
24
|
+
|
|
25
|
+
MCP server for orchestration, lane management, worker daemons, review dispatch, and ACE metrics.
|
|
26
|
+
|
|
27
|
+
## Installation
|
|
28
|
+
|
|
29
|
+
### From PyPI (recommended)
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
pip install mcp-workstate-orchestrator
|
|
33
|
+
# or, as an isolated tool:
|
|
34
|
+
uv tool install mcp-workstate-orchestrator
|
|
35
|
+
# or, ad-hoc without installing:
|
|
36
|
+
uvx mcp-workstate-orchestrator --help
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
`mcp-workstate-orchestrator` declares `mcp-workstate-handoff>=0.5.0,<0.6.0` as a
|
|
40
|
+
required dependency; pip resolves it from PyPI automatically.
|
|
41
|
+
`workstate-codex-bridge` remains optional unless you want the local
|
|
42
|
+
bridge backend.
|
|
43
|
+
|
|
44
|
+
### From the monorepo source tree (development)
|
|
45
|
+
|
|
46
|
+
From this package root inside `workstate`:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
cd packages/mcp-workstate-orchestrator
|
|
50
|
+
python -m pip install -e ".[dev]"
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
When developing both MCP servers in lockstep, install the sibling
|
|
54
|
+
handoff package as an editable first so the orchestrator picks it up:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
pip install -e ../mcp-workstate-handoff
|
|
58
|
+
pip install -e ".[dev]"
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Development
|
|
62
|
+
|
|
63
|
+
Run package-local commands from the package root:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
make lint-orchestrator
|
|
67
|
+
make fix-lint-orchestrator
|
|
68
|
+
make format-orchestrator
|
|
69
|
+
make mypy-orchestrator
|
|
70
|
+
make test-orchestrator
|
|
71
|
+
make check-orchestrator
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
The package Makefile keeps `workstate-codex-bridge` as an optional sibling source path for local bridge-backend development, but it expects `mcp-workstate-handoff` to be installed as a normal package dependency.
|
|
75
|
+
|
|
76
|
+
Direct commands also work:
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
PYTHONPATH=src python -m ruff check src tests
|
|
80
|
+
PYTHONPATH=src python -m mypy src
|
|
81
|
+
PYTHONPATH=src python -m pytest tests -q
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## Token-Efficient Usage
|
|
85
|
+
|
|
86
|
+
For bounded reads and compact caller patterns, follow the shared guide in [`packages/mcp-workstate-handoff/docs/guides/token-efficient-usage.md`](../mcp-workstate-handoff/docs/guides/token-efficient-usage.md). The orchestrator package reuses that guidance instead of maintaining a separate copy of the same parameter semantics.
|
|
87
|
+
|
|
88
|
+
## Runtime Notes
|
|
89
|
+
|
|
90
|
+
This package orchestrates work against a target workspace. The workspace you point it at still needs the expected task state and orchestration inputs, such as:
|
|
91
|
+
|
|
92
|
+
- `.task-state/`
|
|
93
|
+
- lane manifests
|
|
94
|
+
- task plans or other orchestration docs the lane logic references
|
|
95
|
+
|
|
96
|
+
Those assets belong to the workspace being orchestrated, not to the package checkout itself.
|
|
97
|
+
|
|
98
|
+
## Backends
|
|
99
|
+
|
|
100
|
+
The orchestration layer supports multiple execution backends, including:
|
|
101
|
+
|
|
102
|
+
- `codex-cli`
|
|
103
|
+
- `codex-subagent`
|
|
104
|
+
- `claude-code`
|
|
105
|
+
- `local-model-openai`
|
|
106
|
+
|
|
107
|
+
Some backends are optional and require host-specific tooling to be installed separately.
|
|
108
|
+
|
|
109
|
+
## Source Checkout Usage
|
|
110
|
+
|
|
111
|
+
For local source execution without installation:
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
PYTHONPATH=src python -m workstate_orchestrator_mcp --help
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
If you are testing against a sibling `workstate-codex-bridge` checkout instead of an installed bridge dependency, extend `PYTHONPATH` with that sibling `src` directory as needed.
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# Workstate Orchestrator MCP
|
|
2
|
+
|
|
3
|
+
MCP server for orchestration, lane management, worker daemons, review dispatch, and ACE metrics.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
### From PyPI (recommended)
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
pip install mcp-workstate-orchestrator
|
|
11
|
+
# or, as an isolated tool:
|
|
12
|
+
uv tool install mcp-workstate-orchestrator
|
|
13
|
+
# or, ad-hoc without installing:
|
|
14
|
+
uvx mcp-workstate-orchestrator --help
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
`mcp-workstate-orchestrator` declares `mcp-workstate-handoff>=0.5.0,<0.6.0` as a
|
|
18
|
+
required dependency; pip resolves it from PyPI automatically.
|
|
19
|
+
`workstate-codex-bridge` remains optional unless you want the local
|
|
20
|
+
bridge backend.
|
|
21
|
+
|
|
22
|
+
### From the monorepo source tree (development)
|
|
23
|
+
|
|
24
|
+
From this package root inside `workstate`:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
cd packages/mcp-workstate-orchestrator
|
|
28
|
+
python -m pip install -e ".[dev]"
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
When developing both MCP servers in lockstep, install the sibling
|
|
32
|
+
handoff package as an editable first so the orchestrator picks it up:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
pip install -e ../mcp-workstate-handoff
|
|
36
|
+
pip install -e ".[dev]"
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Development
|
|
40
|
+
|
|
41
|
+
Run package-local commands from the package root:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
make lint-orchestrator
|
|
45
|
+
make fix-lint-orchestrator
|
|
46
|
+
make format-orchestrator
|
|
47
|
+
make mypy-orchestrator
|
|
48
|
+
make test-orchestrator
|
|
49
|
+
make check-orchestrator
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
The package Makefile keeps `workstate-codex-bridge` as an optional sibling source path for local bridge-backend development, but it expects `mcp-workstate-handoff` to be installed as a normal package dependency.
|
|
53
|
+
|
|
54
|
+
Direct commands also work:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
PYTHONPATH=src python -m ruff check src tests
|
|
58
|
+
PYTHONPATH=src python -m mypy src
|
|
59
|
+
PYTHONPATH=src python -m pytest tests -q
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Token-Efficient Usage
|
|
63
|
+
|
|
64
|
+
For bounded reads and compact caller patterns, follow the shared guide in [`packages/mcp-workstate-handoff/docs/guides/token-efficient-usage.md`](../mcp-workstate-handoff/docs/guides/token-efficient-usage.md). The orchestrator package reuses that guidance instead of maintaining a separate copy of the same parameter semantics.
|
|
65
|
+
|
|
66
|
+
## Runtime Notes
|
|
67
|
+
|
|
68
|
+
This package orchestrates work against a target workspace. The workspace you point it at still needs the expected task state and orchestration inputs, such as:
|
|
69
|
+
|
|
70
|
+
- `.task-state/`
|
|
71
|
+
- lane manifests
|
|
72
|
+
- task plans or other orchestration docs the lane logic references
|
|
73
|
+
|
|
74
|
+
Those assets belong to the workspace being orchestrated, not to the package checkout itself.
|
|
75
|
+
|
|
76
|
+
## Backends
|
|
77
|
+
|
|
78
|
+
The orchestration layer supports multiple execution backends, including:
|
|
79
|
+
|
|
80
|
+
- `codex-cli`
|
|
81
|
+
- `codex-subagent`
|
|
82
|
+
- `claude-code`
|
|
83
|
+
- `local-model-openai`
|
|
84
|
+
|
|
85
|
+
Some backends are optional and require host-specific tooling to be installed separately.
|
|
86
|
+
|
|
87
|
+
## Source Checkout Usage
|
|
88
|
+
|
|
89
|
+
For local source execution without installation:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
PYTHONPATH=src python -m workstate_orchestrator_mcp --help
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
If you are testing against a sibling `workstate-codex-bridge` checkout instead of an installed bridge dependency, extend `PYTHONPATH` with that sibling `src` directory as needed.
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=69"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "mcp-workstate-orchestrator"
|
|
7
|
+
version = "0.4.7"
|
|
8
|
+
description = "MCP server for orchestration, lane management, worker daemons, and turn metrics."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.12"
|
|
11
|
+
dependencies = [
|
|
12
|
+
"fastmcp",
|
|
13
|
+
"mcp-workstate-handoff>=0.11.4,<0.12.0",
|
|
14
|
+
"workstate-protocol>=0.1.4,<0.2.0",
|
|
15
|
+
]
|
|
16
|
+
|
|
17
|
+
[project.scripts]
|
|
18
|
+
mcp-workstate-orchestrator = "workstate_orchestrator_mcp.cli:main"
|
|
19
|
+
|
|
20
|
+
[project.urls]
|
|
21
|
+
Homepage = "https://github.com/darce/workstate"
|
|
22
|
+
Source = "https://github.com/darce/workstate/tree/main/packages/mcp-workstate-orchestrator"
|
|
23
|
+
Changelog = "https://github.com/darce/workstate/blob/main/packages/mcp-workstate-orchestrator/CHANGELOG.md"
|
|
24
|
+
Issues = "https://github.com/darce/workstate/issues"
|
|
25
|
+
|
|
26
|
+
[project.optional-dependencies]
|
|
27
|
+
test = [
|
|
28
|
+
"hypothesis>=6.0.0",
|
|
29
|
+
"pytest>=8.0.0",
|
|
30
|
+
]
|
|
31
|
+
dev = [
|
|
32
|
+
"hypothesis>=6.0.0",
|
|
33
|
+
"pytest>=8.0.0",
|
|
34
|
+
"ruff>=0.11.0,<1.0.0",
|
|
35
|
+
"mypy>=1.13.0,<2.0.0",
|
|
36
|
+
]
|
|
37
|
+
|
|
38
|
+
[tool.setuptools]
|
|
39
|
+
package-dir = {"" = "src"}
|
|
40
|
+
py-modules = ["workstate_orchestrator_mcp_launcher"]
|
|
41
|
+
include-package-data = true
|
|
42
|
+
|
|
43
|
+
[tool.setuptools.packages.find]
|
|
44
|
+
where = ["src"]
|
|
45
|
+
|
|
46
|
+
[tool.setuptools.package-data]
|
|
47
|
+
"workstate_orchestrator_mcp._assets" = [
|
|
48
|
+
"scripts/*",
|
|
49
|
+
"rules/*.md",
|
|
50
|
+
"templates/*.md",
|
|
51
|
+
]
|
|
52
|
+
|
|
53
|
+
[tool.ruff]
|
|
54
|
+
line-length = 120
|
|
55
|
+
target-version = "py311"
|
|
56
|
+
exclude = [
|
|
57
|
+
"build",
|
|
58
|
+
"src/*.egg-info",
|
|
59
|
+
]
|
|
60
|
+
|
|
61
|
+
[tool.ruff.lint]
|
|
62
|
+
select = [
|
|
63
|
+
"E",
|
|
64
|
+
"W",
|
|
65
|
+
"F",
|
|
66
|
+
"I",
|
|
67
|
+
]
|
|
68
|
+
ignore = [
|
|
69
|
+
"WORKSTATE-REF-501",
|
|
70
|
+
]
|
|
71
|
+
|
|
72
|
+
[tool.ruff.lint.per-file-ignores]
|
|
73
|
+
"__init__.py" = ["F401"]
|
|
74
|
+
"src/workstate_orchestrator_mcp/api.py" = ["F401"]
|
|
75
|
+
"src/workstate_orchestrator_mcp/orchestration/*.py" = ["WORKSTATE-REF-402"]
|
|
76
|
+
"tests/**/*.py" = ["WORKSTATE-REF-402", "F401", "F811"]
|
|
77
|
+
|
|
78
|
+
[tool.ruff.format]
|
|
79
|
+
quote-style = "double"
|
|
80
|
+
indent-style = "space"
|
|
81
|
+
|
|
82
|
+
[tool.mypy]
|
|
83
|
+
python_version = "3.11"
|
|
84
|
+
files = ["src"]
|
|
85
|
+
exclude = ["build/"]
|
|
86
|
+
warn_return_any = true
|
|
87
|
+
warn_unused_configs = true
|
|
88
|
+
check_untyped_defs = true
|
|
89
|
+
warn_redundant_casts = true
|
|
90
|
+
warn_unused_ignores = true
|
|
91
|
+
warn_no_return = true
|
|
92
|
+
warn_unreachable = true
|
|
93
|
+
strict_equality = true
|
|
94
|
+
no_implicit_optional = true
|
|
95
|
+
disallow_untyped_defs = false
|
|
96
|
+
|
|
97
|
+
[[tool.mypy.overrides]]
|
|
98
|
+
module = [
|
|
99
|
+
"fastmcp",
|
|
100
|
+
"fastmcp.*",
|
|
101
|
+
"textual",
|
|
102
|
+
"textual.*",
|
|
103
|
+
]
|
|
104
|
+
ignore_missing_imports = true
|
|
105
|
+
|
|
106
|
+
[[tool.mypy.overrides]]
|
|
107
|
+
module = [
|
|
108
|
+
"_env",
|
|
109
|
+
"backend_adapter",
|
|
110
|
+
"backend_registry",
|
|
111
|
+
"bootstrap_lane",
|
|
112
|
+
"dashboard_live",
|
|
113
|
+
"lane_exec",
|
|
114
|
+
"lane_manifest",
|
|
115
|
+
"orchestrator_guidance",
|
|
116
|
+
"orchestrator_guidance_policy",
|
|
117
|
+
"orchestrator_helpers",
|
|
118
|
+
"orchestrator_lanes",
|
|
119
|
+
"review_runner",
|
|
120
|
+
"task_plan_parser",
|
|
121
|
+
]
|
|
122
|
+
ignore_missing_imports = true
|
|
123
|
+
|
|
124
|
+
[[tool.mypy.overrides]]
|
|
125
|
+
module = [
|
|
126
|
+
"workstate_orchestrator_mcp.api",
|
|
127
|
+
"workstate_orchestrator_mcp.orchestration.ace_metrics",
|
|
128
|
+
"workstate_orchestrator_mcp.orchestration.adapters.codex_cli",
|
|
129
|
+
"workstate_orchestrator_mcp.orchestration.backend_registry",
|
|
130
|
+
"workstate_orchestrator_mcp.orchestration.bootstrap_lane",
|
|
131
|
+
"workstate_orchestrator_mcp.orchestration.lane_exec",
|
|
132
|
+
"workstate_orchestrator_mcp.orchestration.lane_prompt",
|
|
133
|
+
"workstate_orchestrator_mcp.orchestration.lane_result",
|
|
134
|
+
"workstate_orchestrator_mcp.orchestration.orchestrator_daemon",
|
|
135
|
+
"workstate_orchestrator_mcp.orchestration.orchestrator_guidance",
|
|
136
|
+
"workstate_orchestrator_mcp.orchestration.review_runner",
|
|
137
|
+
"workstate_orchestrator_mcp.orchestration.worker_daemon",
|
|
138
|
+
]
|
|
139
|
+
ignore_errors = true
|
|
140
|
+
|
|
141
|
+
[[tool.mypy.overrides]]
|
|
142
|
+
module = ["tests.*"]
|
|
143
|
+
disallow_untyped_defs = false
|
|
144
|
+
disable_error_code = ["method-assign", "arg-type"]
|
|
145
|
+
|
|
146
|
+
[tool.pytest.ini_options]
|
|
147
|
+
testpaths = ["tests"]
|
|
148
|
+
norecursedirs = [
|
|
149
|
+
".pytest_cache",
|
|
150
|
+
"build",
|
|
151
|
+
"src/*.egg-info",
|
|
152
|
+
]
|
|
153
|
+
|
|
154
|
+
[tool.hoisted]
|
|
155
|
+
repository = "darce/workstate"
|
|
156
|
+
install_url = "git+https://github.com/darce/workstate.git@mcp-workstate-orchestrator-v{version}#subdirectory=packages/mcp-workstate-orchestrator"
|
|
157
|
+
changelog = "CHANGELOG.md"
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: mcp-workstate-orchestrator
|
|
3
|
+
Version: 0.4.7
|
|
4
|
+
Summary: MCP server for orchestration, lane management, worker daemons, and turn metrics.
|
|
5
|
+
Project-URL: Homepage, https://github.com/darce/workstate
|
|
6
|
+
Project-URL: Source, https://github.com/darce/workstate/tree/main/packages/mcp-workstate-orchestrator
|
|
7
|
+
Project-URL: Changelog, https://github.com/darce/workstate/blob/main/packages/mcp-workstate-orchestrator/CHANGELOG.md
|
|
8
|
+
Project-URL: Issues, https://github.com/darce/workstate/issues
|
|
9
|
+
Requires-Python: >=3.12
|
|
10
|
+
Description-Content-Type: text/markdown
|
|
11
|
+
Requires-Dist: fastmcp
|
|
12
|
+
Requires-Dist: mcp-workstate-handoff<0.12.0,>=0.11.4
|
|
13
|
+
Requires-Dist: workstate-protocol<0.2.0,>=0.1.4
|
|
14
|
+
Provides-Extra: test
|
|
15
|
+
Requires-Dist: hypothesis>=6.0.0; extra == "test"
|
|
16
|
+
Requires-Dist: pytest>=8.0.0; extra == "test"
|
|
17
|
+
Provides-Extra: dev
|
|
18
|
+
Requires-Dist: hypothesis>=6.0.0; extra == "dev"
|
|
19
|
+
Requires-Dist: pytest>=8.0.0; extra == "dev"
|
|
20
|
+
Requires-Dist: ruff<1.0.0,>=0.11.0; extra == "dev"
|
|
21
|
+
Requires-Dist: mypy<2.0.0,>=1.13.0; extra == "dev"
|
|
22
|
+
|
|
23
|
+
# Workstate Orchestrator MCP
|
|
24
|
+
|
|
25
|
+
MCP server for orchestration, lane management, worker daemons, review dispatch, and ACE metrics.
|
|
26
|
+
|
|
27
|
+
## Installation
|
|
28
|
+
|
|
29
|
+
### From PyPI (recommended)
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
pip install mcp-workstate-orchestrator
|
|
33
|
+
# or, as an isolated tool:
|
|
34
|
+
uv tool install mcp-workstate-orchestrator
|
|
35
|
+
# or, ad-hoc without installing:
|
|
36
|
+
uvx mcp-workstate-orchestrator --help
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
`mcp-workstate-orchestrator` declares `mcp-workstate-handoff>=0.5.0,<0.6.0` as a
|
|
40
|
+
required dependency; pip resolves it from PyPI automatically.
|
|
41
|
+
`workstate-codex-bridge` remains optional unless you want the local
|
|
42
|
+
bridge backend.
|
|
43
|
+
|
|
44
|
+
### From the monorepo source tree (development)
|
|
45
|
+
|
|
46
|
+
From this package root inside `workstate`:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
cd packages/mcp-workstate-orchestrator
|
|
50
|
+
python -m pip install -e ".[dev]"
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
When developing both MCP servers in lockstep, install the sibling
|
|
54
|
+
handoff package as an editable first so the orchestrator picks it up:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
pip install -e ../mcp-workstate-handoff
|
|
58
|
+
pip install -e ".[dev]"
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Development
|
|
62
|
+
|
|
63
|
+
Run package-local commands from the package root:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
make lint-orchestrator
|
|
67
|
+
make fix-lint-orchestrator
|
|
68
|
+
make format-orchestrator
|
|
69
|
+
make mypy-orchestrator
|
|
70
|
+
make test-orchestrator
|
|
71
|
+
make check-orchestrator
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
The package Makefile keeps `workstate-codex-bridge` as an optional sibling source path for local bridge-backend development, but it expects `mcp-workstate-handoff` to be installed as a normal package dependency.
|
|
75
|
+
|
|
76
|
+
Direct commands also work:
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
PYTHONPATH=src python -m ruff check src tests
|
|
80
|
+
PYTHONPATH=src python -m mypy src
|
|
81
|
+
PYTHONPATH=src python -m pytest tests -q
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## Token-Efficient Usage
|
|
85
|
+
|
|
86
|
+
For bounded reads and compact caller patterns, follow the shared guide in [`packages/mcp-workstate-handoff/docs/guides/token-efficient-usage.md`](../mcp-workstate-handoff/docs/guides/token-efficient-usage.md). The orchestrator package reuses that guidance instead of maintaining a separate copy of the same parameter semantics.
|
|
87
|
+
|
|
88
|
+
## Runtime Notes
|
|
89
|
+
|
|
90
|
+
This package orchestrates work against a target workspace. The workspace you point it at still needs the expected task state and orchestration inputs, such as:
|
|
91
|
+
|
|
92
|
+
- `.task-state/`
|
|
93
|
+
- lane manifests
|
|
94
|
+
- task plans or other orchestration docs the lane logic references
|
|
95
|
+
|
|
96
|
+
Those assets belong to the workspace being orchestrated, not to the package checkout itself.
|
|
97
|
+
|
|
98
|
+
## Backends
|
|
99
|
+
|
|
100
|
+
The orchestration layer supports multiple execution backends, including:
|
|
101
|
+
|
|
102
|
+
- `codex-cli`
|
|
103
|
+
- `codex-subagent`
|
|
104
|
+
- `claude-code`
|
|
105
|
+
- `local-model-openai`
|
|
106
|
+
|
|
107
|
+
Some backends are optional and require host-specific tooling to be installed separately.
|
|
108
|
+
|
|
109
|
+
## Source Checkout Usage
|
|
110
|
+
|
|
111
|
+
For local source execution without installation:
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
PYTHONPATH=src python -m workstate_orchestrator_mcp --help
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
If you are testing against a sibling `workstate-codex-bridge` checkout instead of an installed bridge dependency, extend `PYTHONPATH` with that sibling `src` directory as needed.
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
README.md
|
|
2
|
+
pyproject.toml
|
|
3
|
+
src/workstate_orchestrator_mcp_launcher.py
|
|
4
|
+
src/mcp_workstate_orchestrator.egg-info/PKG-INFO
|
|
5
|
+
src/mcp_workstate_orchestrator.egg-info/SOURCES.txt
|
|
6
|
+
src/mcp_workstate_orchestrator.egg-info/dependency_links.txt
|
|
7
|
+
src/mcp_workstate_orchestrator.egg-info/entry_points.txt
|
|
8
|
+
src/mcp_workstate_orchestrator.egg-info/requires.txt
|
|
9
|
+
src/mcp_workstate_orchestrator.egg-info/top_level.txt
|
|
10
|
+
src/workstate_orchestrator_mcp/__init__.py
|
|
11
|
+
src/workstate_orchestrator_mcp/__main__.py
|
|
12
|
+
src/workstate_orchestrator_mcp/api.py
|
|
13
|
+
src/workstate_orchestrator_mcp/cli.py
|
|
14
|
+
src/workstate_orchestrator_mcp/lanes.py
|
|
15
|
+
src/workstate_orchestrator_mcp/_assets/__init__.py
|
|
16
|
+
src/workstate_orchestrator_mcp/_assets/rules/branch-review-guide.md
|
|
17
|
+
src/workstate_orchestrator_mcp/_assets/rules/branch-review-php.md
|
|
18
|
+
src/workstate_orchestrator_mcp/_assets/rules/branch-review-python.md
|
|
19
|
+
src/workstate_orchestrator_mcp/_assets/rules/branch-review-typescript.md
|
|
20
|
+
src/workstate_orchestrator_mcp/_assets/rules/contract-change-checklist.md
|
|
21
|
+
src/workstate_orchestrator_mcp/_assets/rules/planning-review-guide.md
|
|
22
|
+
src/workstate_orchestrator_mcp/_assets/scripts/worktree-lane
|
|
23
|
+
src/workstate_orchestrator_mcp/_assets/templates/WORKTREE_LANE_BRIEF.template.md
|
|
24
|
+
src/workstate_orchestrator_mcp/_assets/templates/WORKTREE_LANE_REPORT.template.md
|
|
25
|
+
src/workstate_orchestrator_mcp/orchestration/__init__.py
|
|
26
|
+
src/workstate_orchestrator_mcp/orchestration/_env.py
|
|
27
|
+
src/workstate_orchestrator_mcp/orchestration/ace_metrics.py
|
|
28
|
+
src/workstate_orchestrator_mcp/orchestration/backend_adapter.py
|
|
29
|
+
src/workstate_orchestrator_mcp/orchestration/backend_registry.py
|
|
30
|
+
src/workstate_orchestrator_mcp/orchestration/bootstrap_lane.py
|
|
31
|
+
src/workstate_orchestrator_mcp/orchestration/daemon_startup.py
|
|
32
|
+
src/workstate_orchestrator_mcp/orchestration/dashboard_extension.py
|
|
33
|
+
src/workstate_orchestrator_mcp/orchestration/dashboard_live.py
|
|
34
|
+
src/workstate_orchestrator_mcp/orchestration/dashboard_tui.py
|
|
35
|
+
src/workstate_orchestrator_mcp/orchestration/generate_agent_config.py
|
|
36
|
+
src/workstate_orchestrator_mcp/orchestration/generate_lane_manifest.py
|
|
37
|
+
src/workstate_orchestrator_mcp/orchestration/handoff_guidance_summary.py
|
|
38
|
+
src/workstate_orchestrator_mcp/orchestration/handoff_integrity_guard.py
|
|
39
|
+
src/workstate_orchestrator_mcp/orchestration/handoff_read_shapes.py
|
|
40
|
+
src/workstate_orchestrator_mcp/orchestration/lane_config.py
|
|
41
|
+
src/workstate_orchestrator_mcp/orchestration/lane_exec.py
|
|
42
|
+
src/workstate_orchestrator_mcp/orchestration/lane_manifest.py
|
|
43
|
+
src/workstate_orchestrator_mcp/orchestration/lane_prompt.py
|
|
44
|
+
src/workstate_orchestrator_mcp/orchestration/lane_result.py
|
|
45
|
+
src/workstate_orchestrator_mcp/orchestration/orchestrator_daemon.py
|
|
46
|
+
src/workstate_orchestrator_mcp/orchestration/orchestrator_guidance.py
|
|
47
|
+
src/workstate_orchestrator_mcp/orchestration/orchestrator_guidance_policy.py
|
|
48
|
+
src/workstate_orchestrator_mcp/orchestration/orchestrator_helpers.py
|
|
49
|
+
src/workstate_orchestrator_mcp/orchestration/orchestrator_lanes.py
|
|
50
|
+
src/workstate_orchestrator_mcp/orchestration/review_dispatch.py
|
|
51
|
+
src/workstate_orchestrator_mcp/orchestration/review_ready.py
|
|
52
|
+
src/workstate_orchestrator_mcp/orchestration/review_runner.py
|
|
53
|
+
src/workstate_orchestrator_mcp/orchestration/slice_review_packet.py
|
|
54
|
+
src/workstate_orchestrator_mcp/orchestration/task_plan_parser.py
|
|
55
|
+
src/workstate_orchestrator_mcp/orchestration/worker_daemon.py
|
|
56
|
+
src/workstate_orchestrator_mcp/orchestration/worker_daemon_ctl.py
|
|
57
|
+
src/workstate_orchestrator_mcp/orchestration/adapters/claude_code.py
|
|
58
|
+
src/workstate_orchestrator_mcp/orchestration/adapters/codex_cli.py
|
|
59
|
+
src/workstate_orchestrator_mcp/orchestration/adapters/codex_subagent.py
|
|
60
|
+
src/workstate_orchestrator_mcp/orchestration/adapters/local_model.py
|
|
61
|
+
src/workstate_orchestrator_mcp/orchestration/adapters/structured_turn.py
|
|
62
|
+
tests/test_ace_metrics.py
|
|
63
|
+
tests/test_ace_reflect.py
|
|
64
|
+
tests/test_backend_registry.py
|
|
65
|
+
tests/test_bootstrap_lane.py
|
|
66
|
+
tests/test_codex_subagent.py
|
|
67
|
+
tests/test_cross_vendor_subagent_equivalence.py
|
|
68
|
+
tests/test_daemon_startup_warning.py
|
|
69
|
+
tests/test_execution_adapters.py
|
|
70
|
+
tests/test_generate_agent_config.py
|
|
71
|
+
tests/test_generate_lane_manifest.py
|
|
72
|
+
tests/test_handoff_integrity_guard.py
|
|
73
|
+
tests/test_hardening.py
|
|
74
|
+
tests/test_lane_config.py
|
|
75
|
+
tests/test_lane_exec.py
|
|
76
|
+
tests/test_lane_manifest.py
|
|
77
|
+
tests/test_lane_prompt.py
|
|
78
|
+
tests/test_lane_prompt_artifacts.py
|
|
79
|
+
tests/test_lane_result.py
|
|
80
|
+
tests/test_lanes_and_handoff_state.py
|
|
81
|
+
tests/test_local_model.py
|
|
82
|
+
tests/test_orchestrator_build.py
|
|
83
|
+
tests/test_orchestrator_daemon.py
|
|
84
|
+
tests/test_orchestrator_guidance.py
|
|
85
|
+
tests/test_orchestrator_lanes.py
|
|
86
|
+
tests/test_orchestrator_tools.py
|
|
87
|
+
tests/test_package_metadata.py
|
|
88
|
+
tests/test_plan_cursor_gate.py
|
|
89
|
+
tests/test_protocol_contract.py
|
|
90
|
+
tests/test_review_dispatch.py
|
|
91
|
+
tests/test_review_fix_cycle.py
|
|
92
|
+
tests/test_review_mode.py
|
|
93
|
+
tests/test_review_ready.py
|
|
94
|
+
tests/test_review_runner.py
|
|
95
|
+
tests/test_review_schema.py
|
|
96
|
+
tests/test_smoke_apps_lane.py
|
|
97
|
+
tests/test_task_plan_parser.py
|
|
98
|
+
tests/test_worker_daemon.py
|
|
99
|
+
tests/test_worker_daemon_ctl.py
|
|
100
|
+
tests/test_workstate_lane_id_propagation.py
|
|
101
|
+
tests/test_worktree_lane.py
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Workstate Orchestrator MCP — orchestration, lane management, and worker daemon tools."""
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"""Bundled runtime assets shipped with the orchestrator package.
|
|
2
|
+
|
|
3
|
+
These resources (lane management scripts, review prompt guides, the
|
|
4
|
+
contract-change checklist) used to be looked up at consumer-repo paths
|
|
5
|
+
such as ``<orchestrator_root>/scripts/worktree-lane`` or
|
|
6
|
+
``<orchestrator_root>/docs/agentic/rules/branch-review-guide.md``.
|
|
7
|
+
That coupling forced every consumer repo to vendor the package's own
|
|
8
|
+
files, which drifted across consumers and broke installs that did not
|
|
9
|
+
ship the orchestrator from a sibling source checkout.
|
|
10
|
+
|
|
11
|
+
The fix: the orchestrator now owns these files inside its own package
|
|
12
|
+
tree and resolves them via ``importlib.resources``. Consumers may still
|
|
13
|
+
override the rules directory or the script path explicitly, but the
|
|
14
|
+
default lookup never leaves the package.
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
from __future__ import annotations
|
|
18
|
+
|
|
19
|
+
from importlib import resources
|
|
20
|
+
from importlib.resources.abc import Traversable
|
|
21
|
+
from pathlib import Path
|
|
22
|
+
|
|
23
|
+
_PACKAGE = "workstate_orchestrator_mcp._assets"
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
def assets_root() -> Traversable:
|
|
27
|
+
"""Return the package-local ``_assets`` Traversable."""
|
|
28
|
+
return resources.files(_PACKAGE)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def bundled_script_path(name: str) -> Path:
|
|
32
|
+
"""Resolve a bundled executable script to a real filesystem path.
|
|
33
|
+
|
|
34
|
+
The orchestrator shells out to these scripts (``worktree-lane``), so a
|
|
35
|
+
Traversable is not enough — subprocess needs an on-disk path. Package
|
|
36
|
+
data files always live on disk for ``setuptools`` installs, but we go
|
|
37
|
+
through ``as_file`` so it works under future zip-imports too.
|
|
38
|
+
"""
|
|
39
|
+
traversable = assets_root() / "scripts" / name
|
|
40
|
+
with resources.as_file(traversable) as fs_path:
|
|
41
|
+
return Path(fs_path)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def bundled_rules_dir() -> Path:
|
|
45
|
+
"""Resolve the bundled review-rules directory to a filesystem path."""
|
|
46
|
+
traversable = assets_root() / "rules"
|
|
47
|
+
with resources.as_file(traversable) as fs_path:
|
|
48
|
+
return Path(fs_path)
|