workstate-bootstrap 0.5.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.
- workstate_bootstrap/__init__.py +6 -0
- workstate_bootstrap/__main__.py +5 -0
- workstate_bootstrap/cli.py +610 -0
- workstate_bootstrap/install.py +2057 -0
- workstate_bootstrap/mcp_sync.py +293 -0
- workstate_bootstrap/subcommands.py +1358 -0
- workstate_bootstrap-0.5.2.dist-info/METADATA +179 -0
- workstate_bootstrap-0.5.2.dist-info/RECORD +10 -0
- workstate_bootstrap-0.5.2.dist-info/WHEEL +4 -0
- workstate_bootstrap-0.5.2.dist-info/entry_points.txt +2 -0
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: workstate-bootstrap
|
|
3
|
+
Version: 0.5.2
|
|
4
|
+
Summary: Bootstrap CLI that hoists the shared workstate-system surface into consumer repos.
|
|
5
|
+
Project-URL: Homepage, https://github.com/darce/workstate
|
|
6
|
+
Project-URL: Source, https://github.com/darce/workstate/tree/main/packages/workstate-bootstrap
|
|
7
|
+
Project-URL: Documentation, https://github.com/darce/workstate/blob/main/docs/CONSUMER.md
|
|
8
|
+
Project-URL: Issues, https://github.com/darce/workstate/issues
|
|
9
|
+
Author: darce
|
|
10
|
+
License: Proprietary
|
|
11
|
+
Requires-Python: >=3.11
|
|
12
|
+
Requires-Dist: pyyaml>=6
|
|
13
|
+
Requires-Dist: tomlkit>=0.13
|
|
14
|
+
Requires-Dist: workstate-protocol<0.2.0,>=0.1.4
|
|
15
|
+
Provides-Extra: dev
|
|
16
|
+
Requires-Dist: mcp-workstate-handoff; (python_version >= '3.12') and extra == 'dev'
|
|
17
|
+
Requires-Dist: pytest>=8; extra == 'dev'
|
|
18
|
+
Description-Content-Type: text/markdown
|
|
19
|
+
|
|
20
|
+
# workstate-bootstrap
|
|
21
|
+
|
|
22
|
+
Pip-installable CLI that hoists the shared workstate-system surface
|
|
23
|
+
(typed protocol, two MCP servers, hooks, skills, generated agent
|
|
24
|
+
workflows) into consumer repositories. Lives inside
|
|
25
|
+
[`darce/workstate`](https://github.com/darce/workstate).
|
|
26
|
+
|
|
27
|
+
Consumers run `workstate-bootstrap install --target <path>` once; it
|
|
28
|
+
clones the monorepo, materializes the overlay, and registers both
|
|
29
|
+
managed MCP servers (`mcp-workstate-handoff`, `mcp-workstate-orchestrator`)
|
|
30
|
+
across `.mcp.json`, `.vscode/mcp.json`, and `.codex/config.toml`. No
|
|
31
|
+
hand-edits required.
|
|
32
|
+
|
|
33
|
+
## Install
|
|
34
|
+
|
|
35
|
+
### From PyPI (recommended)
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
uvx --from workstate-bootstrap workstate-bootstrap install --target /path/to/your/repo
|
|
39
|
+
# or, persistent:
|
|
40
|
+
uv tool install workstate-bootstrap
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### From the monorepo source tree (development)
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
cd packages/workstate-bootstrap
|
|
47
|
+
python -m pip install -e ".[dev]"
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### Direct from git (private-repo phase, before PyPI release)
|
|
51
|
+
|
|
52
|
+
One-shot (no install — fetches each invocation):
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
uvx --from "git+https://github.com/darce/workstate@workstate-bootstrap-v0.2.1#subdirectory=packages/workstate-bootstrap" \
|
|
56
|
+
workstate-bootstrap install \
|
|
57
|
+
--target /path/to/your/repo
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Persistent (recommended once you start running `status` / `doctor`
|
|
61
|
+
regularly — installs `workstate-bootstrap` onto `$PATH`):
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
uv tool install "git+https://github.com/darce/workstate@workstate-bootstrap-v0.2.1#subdirectory=packages/workstate-bootstrap"
|
|
65
|
+
# then:
|
|
66
|
+
workstate-bootstrap status --target /path/to/your/repo
|
|
67
|
+
workstate-bootstrap doctor --target /path/to/your/repo
|
|
68
|
+
# upgrade later:
|
|
69
|
+
uv tool upgrade workstate-bootstrap
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
> **Hardlink warning on first install?** If you see
|
|
73
|
+
> `Failed to hardlink files; falling back to full copy`, your `uv`
|
|
74
|
+
> cache and tool dir live on different filesystems. The install still
|
|
75
|
+
> succeeds; silence the warning with `export UV_LINK_MODE=copy` in
|
|
76
|
+
> your shell profile.
|
|
77
|
+
|
|
78
|
+
## Subcommands
|
|
79
|
+
|
|
80
|
+
```text
|
|
81
|
+
workstate-bootstrap install --target <path> [--remote-ref <tag>] [--mcp-servers <default|path>] [--no-mcp-servers]
|
|
82
|
+
workstate-bootstrap update --target <path> --remote-ref <tag>
|
|
83
|
+
workstate-bootstrap status --target <path>
|
|
84
|
+
workstate-bootstrap doctor --target <path> [--mcp-servers <default|path>]
|
|
85
|
+
workstate-bootstrap repair --target <path> [--force-dirty] [--mcp-servers <default|path>]
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
- `install`: Clone the monorepo, materialize SHARED + GENERATED
|
|
89
|
+
surfaces, write the three MCP-config files, run `init-state` to
|
|
90
|
+
provision `<target>/.task-state/handoff.db` (skipped under
|
|
91
|
+
`--no-mcp-servers`), set `core.hooksPath`, and write the overlay
|
|
92
|
+
manifest.
|
|
93
|
+
- `update`: Re-run install at a new `--remote-ref`; refresh GENERATED
|
|
94
|
+
surfaces and, optionally, configs.
|
|
95
|
+
- `status`: Print a summary of the installed overlay manifest. When
|
|
96
|
+
the install registered MCP servers, also reports the resolved
|
|
97
|
+
`state_dir` / `db_path` / `exports_dir` / `schema_version` via
|
|
98
|
+
`init-state --check`.
|
|
99
|
+
- `doctor`: Detect drift in SHARED, GENERATED, config, and
|
|
100
|
+
initialized-state surfaces. Flags missing `.task-state/handoff.db`
|
|
101
|
+
as `state_drift` only when the manifest recorded `.mcp.json`. Exit
|
|
102
|
+
`1` when drift exists.
|
|
103
|
+
- `repair`: Restore drifted surfaces flagged by `doctor`.
|
|
104
|
+
|
|
105
|
+
See [`docs/CONSUMER.md`](https://github.com/darce/workstate/blob/main/docs/CONSUMER.md)
|
|
106
|
+
for the consumer-facing walkthrough (upgrade, drift handling, skill
|
|
107
|
+
overrides, the `current_task_auto_regen` migration note).
|
|
108
|
+
|
|
109
|
+
## Surfaces written by `install`
|
|
110
|
+
|
|
111
|
+
The canonical source of truth for bootstrap-managed surfaces is the
|
|
112
|
+
installer implementation in
|
|
113
|
+
`src/workstate_bootstrap/install.py` (`SHARED_SURFACES` and
|
|
114
|
+
`GENERATED_SURFACES`). Keep this table aligned with those constants.
|
|
115
|
+
|
|
116
|
+
| Surface | Source | Layer |
|
|
117
|
+
| ------------------------------------ | ---------- | ----------- |
|
|
118
|
+
| `scripts/hooks/` | shared | symlink |
|
|
119
|
+
| `.github/hooks/` | shared | symlink |
|
|
120
|
+
| `docs/agentic/contracts/` | shared | symlink |
|
|
121
|
+
| `docs/agentic/rules/` | shared | symlink |
|
|
122
|
+
| `Makefile.d/` non-excluded children | shared | carved dir |
|
|
123
|
+
| `scripts/workstate/` non-excluded children | shared | carved dir |
|
|
124
|
+
| `.github/prompts/` | generated | real dir |
|
|
125
|
+
| `.agentic/generated/plugins/workstate-system/base/` | generated | real dir |
|
|
126
|
+
| `.agentic/generated/plugins/workstate-system/effective/` | generated | real dir |
|
|
127
|
+
| `.mcp.json` | generated | real file |
|
|
128
|
+
| `.vscode/mcp.json` | generated | real file |
|
|
129
|
+
| `.codex/config.toml` | generated | real file |
|
|
130
|
+
| `core.hooksPath` git config | generated | git config |
|
|
131
|
+
| `.task-state/handoff.db` | runtime | sqlite |
|
|
132
|
+
| `.task-state/exports/` | runtime | dir |
|
|
133
|
+
| `.agentic/remote/` | bootstrap | git clone |
|
|
134
|
+
| `.workstate-bootstrap.json` | bootstrap | manifest |
|
|
135
|
+
|
|
136
|
+
`.task-state/` is provisioned by the handoff server's `init-state`
|
|
137
|
+
subcommand at install time and is gitignored — each fresh checkout
|
|
138
|
+
regenerates it through `workstate-bootstrap install`.
|
|
139
|
+
|
|
140
|
+
## Defaults
|
|
141
|
+
|
|
142
|
+
- `--profile` defaults to `all`, which materializes the full surface
|
|
143
|
+
set: generated Copilot prompts, Claude/Codex plugin trees, shared
|
|
144
|
+
overlay surfaces, and the lifecycle hoist
|
|
145
|
+
(`Makefile.d/lifecycle.mk` plus the sentinel-bracketed `-include`
|
|
146
|
+
block in the consumer `Makefile`). Pass `--profile minimal` for a
|
|
147
|
+
clone-only install with no surfaces, or `--profile lifecycle` for
|
|
148
|
+
just the lifecycle runner and Makefile fragment. The active profile
|
|
149
|
+
is recorded in `.workstate-bootstrap.json` under `"profile"`.
|
|
150
|
+
- `--remote-url` defaults to `git@github.com:darce/workstate.git`.
|
|
151
|
+
- `--remote-ref` defaults to `main` (override with a release tag like `v0.1.0`).
|
|
152
|
+
- `--mcp-servers` defaults to the built-in managed map registering
|
|
153
|
+
`mcp-workstate-handoff` and `mcp-workstate-orchestrator` via `uvx` with
|
|
154
|
+
`--workspace-root . serve-stdio`, so Codex, VS Code, and Claude
|
|
155
|
+
clients start real MCP stdio servers from the generated config.
|
|
156
|
+
Pass a JSON file path to override; pass `--no-mcp-servers` to skip
|
|
157
|
+
the three config writers entirely.
|
|
158
|
+
- Plugin overrides are auto-discovered at
|
|
159
|
+
`workstate-overrides/workstate-system/` when that root contains an
|
|
160
|
+
`overrides.yaml` manifest. Use `--plugin-overrides <path>` on
|
|
161
|
+
`install`, `update`, `doctor`, or `repair` for a non-default root;
|
|
162
|
+
bootstrap records that path so later update/doctor/repair runs reuse
|
|
163
|
+
it. Override-aware installs generate effective plugin trees under
|
|
164
|
+
`.agentic/generated/plugins/workstate-system/effective/{claude,codex}`
|
|
165
|
+
and point marketplace pins at those generated trees.
|
|
166
|
+
- `install` and `update` preserve plugin override files by default.
|
|
167
|
+
`--reset-overrides` is the explicit destructive path; it removes only
|
|
168
|
+
the resolved override root, refuses dirty git worktrees unless
|
|
169
|
+
`--backup` is supplied, and archives backups under
|
|
170
|
+
`.agentic/override-backups/<timestamp>/` before removal.
|
|
171
|
+
|
|
172
|
+
## Development
|
|
173
|
+
|
|
174
|
+
Tests live under `tests/`. From the monorepo root:
|
|
175
|
+
|
|
176
|
+
```bash
|
|
177
|
+
cd packages/workstate-bootstrap
|
|
178
|
+
PYTHONPATH=.:src:../workstate-protocol/src pytest tests -q
|
|
179
|
+
```
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
workstate_bootstrap/__init__.py,sha256=9vqpnSnUGUp2oNbR9anRXDkls9RaPweTh1wCDfR1nYM,184
|
|
2
|
+
workstate_bootstrap/__main__.py,sha256=CcBfLrBHSgbnHsPRG2D26lyI7JNFiM0S0X9zgEJ_lIk,115
|
|
3
|
+
workstate_bootstrap/cli.py,sha256=j3-VKdXVz8hHjzzIMMHF7UuutKAIlgxAEeAjlY3Wi3I,21604
|
|
4
|
+
workstate_bootstrap/install.py,sha256=tED6kqshYlUVxitLufFDM05Hc9Q-LNRjAao8SQpwQ3U,78666
|
|
5
|
+
workstate_bootstrap/mcp_sync.py,sha256=YCFAUnDMFCf4WnO711uhjvGvN8xYa9kJBCgMJxm4ubQ,10154
|
|
6
|
+
workstate_bootstrap/subcommands.py,sha256=ruSXaPwfZlBLPI1rr-H3noCbiIecc4E9DDsmzED1OC0,48737
|
|
7
|
+
workstate_bootstrap-0.5.2.dist-info/METADATA,sha256=3vH3OYMZLuxzBJx7Pczmt-K29LrOTBOlfXZ6kL8XzK8,8080
|
|
8
|
+
workstate_bootstrap-0.5.2.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
|
|
9
|
+
workstate_bootstrap-0.5.2.dist-info/entry_points.txt,sha256=fy0phQVlduwJKn0pxDw_L8EGpKx7G20hA0kdcrOxLuI,69
|
|
10
|
+
workstate_bootstrap-0.5.2.dist-info/RECORD,,
|