pilot-workers 0.5.1__tar.gz → 0.5.2__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 (93) hide show
  1. {pilot_workers-0.5.1/src/pilot_workers.egg-info → pilot_workers-0.5.2}/PKG-INFO +22 -17
  2. {pilot_workers-0.5.1 → pilot_workers-0.5.2}/README.md +21 -16
  3. {pilot_workers-0.5.1 → pilot_workers-0.5.2}/pyproject.toml +1 -1
  4. {pilot_workers-0.5.1 → pilot_workers-0.5.2}/src/pilot_workers/cli/dispatch.py +295 -60
  5. {pilot_workers-0.5.1 → pilot_workers-0.5.2}/src/pilot_workers/cli/fanout.py +98 -10
  6. pilot_workers-0.5.2/src/pilot_workers/cli/install.py +1488 -0
  7. {pilot_workers-0.5.1 → pilot_workers-0.5.2}/src/pilot_workers/cli/main.py +21 -12
  8. {pilot_workers-0.5.1 → pilot_workers-0.5.2}/src/pilot_workers/cli/run.py +54 -6
  9. {pilot_workers-0.5.1 → pilot_workers-0.5.2}/src/pilot_workers/cli/status.py +129 -21
  10. pilot_workers-0.5.2/src/pilot_workers/credentials.py +113 -0
  11. {pilot_workers-0.5.1 → pilot_workers-0.5.2}/src/pilot_workers/data/providers/README.md +5 -2
  12. pilot_workers-0.5.2/src/pilot_workers/data/templates/code.md +25 -0
  13. pilot_workers-0.5.2/src/pilot_workers/data/templates/explore.md +9 -0
  14. pilot_workers-0.5.2/src/pilot_workers/data/templates/review.md +17 -0
  15. pilot_workers-0.5.2/src/pilot_workers/data/templates/test.md +9 -0
  16. {pilot_workers-0.5.1 → pilot_workers-0.5.2}/src/pilot_workers/fmt_events.py +47 -17
  17. {pilot_workers-0.5.1 → pilot_workers-0.5.2}/src/pilot_workers/integrations/claude-host/skills/pilot-workers/SKILL.md +106 -48
  18. {pilot_workers-0.5.1 → pilot_workers-0.5.2}/src/pilot_workers/integrations/codex-host/skills/pilot-workers/SKILL.md +89 -41
  19. {pilot_workers-0.5.1 → pilot_workers-0.5.2}/src/pilot_workers/maintain.py +130 -20
  20. {pilot_workers-0.5.1 → pilot_workers-0.5.2}/src/pilot_workers/policy.py +142 -12
  21. {pilot_workers-0.5.1 → pilot_workers-0.5.2}/src/pilot_workers/prompts/common.md +23 -2
  22. pilot_workers-0.5.2/src/pilot_workers/prompts/review.md +108 -0
  23. {pilot_workers-0.5.1 → pilot_workers-0.5.2}/src/pilot_workers/providers.py +66 -9
  24. {pilot_workers-0.5.1 → pilot_workers-0.5.2}/src/pilot_workers/runners/base.py +68 -0
  25. {pilot_workers-0.5.1 → pilot_workers-0.5.2}/src/pilot_workers/runners/opencode_runner.py +152 -24
  26. {pilot_workers-0.5.1 → pilot_workers-0.5.2}/src/pilot_workers/runtime.py +322 -22
  27. pilot_workers-0.5.2/src/pilot_workers/taskguard.py +184 -0
  28. {pilot_workers-0.5.1 → pilot_workers-0.5.2/src/pilot_workers.egg-info}/PKG-INFO +22 -17
  29. {pilot_workers-0.5.1 → pilot_workers-0.5.2}/src/pilot_workers.egg-info/SOURCES.txt +16 -1
  30. pilot_workers-0.5.2/tests/test_child_env_hygiene.py +82 -0
  31. {pilot_workers-0.5.1 → pilot_workers-0.5.2}/tests/test_cli_main.py +37 -1
  32. {pilot_workers-0.5.1 → pilot_workers-0.5.2}/tests/test_dispatch.py +159 -4
  33. {pilot_workers-0.5.1 → pilot_workers-0.5.2}/tests/test_fanout.py +91 -1
  34. pilot_workers-0.5.2/tests/test_fmt_events.py +71 -0
  35. pilot_workers-0.5.2/tests/test_global_key.py +477 -0
  36. pilot_workers-0.5.2/tests/test_install.py +1143 -0
  37. {pilot_workers-0.5.1 → pilot_workers-0.5.2}/tests/test_integrations.py +12 -3
  38. pilot_workers-0.5.2/tests/test_isolation_guard.py +114 -0
  39. pilot_workers-0.5.2/tests/test_lock_takeover.py +148 -0
  40. pilot_workers-0.5.2/tests/test_maintain.py +897 -0
  41. pilot_workers-0.5.2/tests/test_manifest_locking.py +170 -0
  42. pilot_workers-0.5.2/tests/test_policy.py +657 -0
  43. pilot_workers-0.5.2/tests/test_preflight.py +267 -0
  44. {pilot_workers-0.5.1 → pilot_workers-0.5.2}/tests/test_providers.py +109 -0
  45. pilot_workers-0.5.2/tests/test_result_extract.py +420 -0
  46. pilot_workers-0.5.2/tests/test_runner_seams.py +209 -0
  47. {pilot_workers-0.5.1 → pilot_workers-0.5.2}/tests/test_sandbox.py +211 -0
  48. pilot_workers-0.5.2/tests/test_self_description.py +318 -0
  49. pilot_workers-0.5.2/tests/test_skill_generation.py +1179 -0
  50. {pilot_workers-0.5.1 → pilot_workers-0.5.2}/tests/test_status.py +3 -3
  51. pilot_workers-0.5.2/tests/test_status_config.py +276 -0
  52. pilot_workers-0.5.2/tests/test_task_guards.py +690 -0
  53. pilot_workers-0.5.2/tests/test_version_cache.py +364 -0
  54. pilot_workers-0.5.2/tests/test_worker_prompts.py +275 -0
  55. pilot_workers-0.5.1/src/pilot_workers/cli/install.py +0 -458
  56. pilot_workers-0.5.1/src/pilot_workers/credentials.py +0 -88
  57. pilot_workers-0.5.1/src/pilot_workers/data/templates/code.md +0 -28
  58. pilot_workers-0.5.1/src/pilot_workers/data/templates/explore.md +0 -17
  59. pilot_workers-0.5.1/src/pilot_workers/data/templates/review.md +0 -18
  60. pilot_workers-0.5.1/src/pilot_workers/data/templates/test.md +0 -17
  61. pilot_workers-0.5.1/src/pilot_workers/prompts/review.md +0 -17
  62. pilot_workers-0.5.1/tests/test_install.py +0 -420
  63. pilot_workers-0.5.1/tests/test_maintain.py +0 -277
  64. pilot_workers-0.5.1/tests/test_policy.py +0 -253
  65. pilot_workers-0.5.1/tests/test_result_extract.py +0 -163
  66. {pilot_workers-0.5.1 → pilot_workers-0.5.2}/LICENSE +0 -0
  67. {pilot_workers-0.5.1 → pilot_workers-0.5.2}/setup.cfg +0 -0
  68. {pilot_workers-0.5.1 → pilot_workers-0.5.2}/src/pilot_workers/__init__.py +0 -0
  69. {pilot_workers-0.5.1 → pilot_workers-0.5.2}/src/pilot_workers/__main__.py +0 -0
  70. {pilot_workers-0.5.1 → pilot_workers-0.5.2}/src/pilot_workers/cli/__init__.py +0 -0
  71. {pilot_workers-0.5.1 → pilot_workers-0.5.2}/src/pilot_workers/data/permissions/README.md +0 -0
  72. {pilot_workers-0.5.1 → pilot_workers-0.5.2}/src/pilot_workers/data/permissions/relaxed.yaml +0 -0
  73. {pilot_workers-0.5.1 → pilot_workers-0.5.2}/src/pilot_workers/data/permissions/strict.yaml +0 -0
  74. {pilot_workers-0.5.1 → pilot_workers-0.5.2}/src/pilot_workers/data/providers/ds.yaml +0 -0
  75. {pilot_workers-0.5.1 → pilot_workers-0.5.2}/src/pilot_workers/data/providers/glm.yaml +0 -0
  76. {pilot_workers-0.5.1 → pilot_workers-0.5.2}/src/pilot_workers/data/providers/kimi-k3.yaml +0 -0
  77. {pilot_workers-0.5.1 → pilot_workers-0.5.2}/src/pilot_workers/integrations/README.md +0 -0
  78. {pilot_workers-0.5.1 → pilot_workers-0.5.2}/src/pilot_workers/prompts/code.md +0 -0
  79. {pilot_workers-0.5.1 → pilot_workers-0.5.2}/src/pilot_workers/prompts/explore.md +0 -0
  80. {pilot_workers-0.5.1 → pilot_workers-0.5.2}/src/pilot_workers/prompts/test.md +0 -0
  81. {pilot_workers-0.5.1 → pilot_workers-0.5.2}/src/pilot_workers/runners/__init__.py +0 -0
  82. {pilot_workers-0.5.1 → pilot_workers-0.5.2}/src/pilot_workers/scripts/install_runtime.sh +0 -0
  83. {pilot_workers-0.5.1 → pilot_workers-0.5.2}/src/pilot_workers.egg-info/dependency_links.txt +0 -0
  84. {pilot_workers-0.5.1 → pilot_workers-0.5.2}/src/pilot_workers.egg-info/entry_points.txt +0 -0
  85. {pilot_workers-0.5.1 → pilot_workers-0.5.2}/src/pilot_workers.egg-info/requires.txt +0 -0
  86. {pilot_workers-0.5.1 → pilot_workers-0.5.2}/src/pilot_workers.egg-info/top_level.txt +0 -0
  87. {pilot_workers-0.5.1 → pilot_workers-0.5.2}/tests/test_credentials.py +0 -0
  88. {pilot_workers-0.5.1 → pilot_workers-0.5.2}/tests/test_fanout_watchdog.py +0 -0
  89. {pilot_workers-0.5.1 → pilot_workers-0.5.2}/tests/test_opencode_runner.py +0 -0
  90. {pilot_workers-0.5.1 → pilot_workers-0.5.2}/tests/test_render_unified.py +0 -0
  91. {pilot_workers-0.5.1 → pilot_workers-0.5.2}/tests/test_run_cli.py +0 -0
  92. {pilot_workers-0.5.1 → pilot_workers-0.5.2}/tests/test_runner_cache.py +0 -0
  93. {pilot_workers-0.5.1 → pilot_workers-0.5.2}/tests/test_runtime.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pilot-workers
3
- Version: 0.5.1
3
+ Version: 0.5.2
4
4
  Summary: Dispatch bounded tasks to isolated LLM workers (GLM, Kimi, and more)
5
5
  License-Expression: MIT
6
6
  Requires-Python: >=3.11
@@ -26,7 +26,7 @@ Dispatch bounded tasks to isolated LLM workers. Your main AI agent (Claude, Code
26
26
  - **Pluggable runners**: the runner adapter layer (`Runner` ABC) abstracts engine-specific details. Currently ships with OpenCode; designed for future alternatives.
27
27
  - **Observable**: two-line JSON contract (`started` + structured `verdict` carrying `parse_state`, a per-mode `result`, and `final_text_path`) for AI planners; human-readable `latest.log` for `tail -f`.
28
28
  - **Per-run sandboxes**: every dispatch runs inside its own isolated XDG tree (`providers/<key>/runs/<run_id>/`) with a zero-copy symlink to the canonical credential and a shared per-provider cache; resume (`--session` + `--run-id`) reuses the original sandbox.
29
- - **Host-level playbook**: one `pilot-workers` playbook skill per host (Claude Code or Codex). `install claude` / `install codex` deploys the same engine-neutral playbook regardless of which providers you've configured.
29
+ - **Host-level playbook**: one `pilot-workers` playbook skill per host (Claude Code or Codex). A host's skill exists only where at least one provider is configured for it, and its worker table is generated from that host's own configuration — a host never learns about a provider you did not give it.
30
30
 
31
31
  ## Install
32
32
 
@@ -40,14 +40,16 @@ pip install pilot-workers
40
40
  # 1. Install the worker runtime
41
41
  pilot-workers install runner opencode
42
42
 
43
- # 2. Configure credentials (interactive, key never displayed)
44
- pilot-workers credentials glm
45
- pilot-workers credentials kimi-k3
46
- pilot-workers credentials ds
43
+ # 2. Make a provider available to a host, and set its API key while you are
44
+ # there (interactive, key never displayed). The key belongs to the PROVIDER,
45
+ # so it is configured once and every host uses it.
46
+ pilot-workers install glm on claude --global-key
47
+ pilot-workers install kimi-k3 on claude for code --global-key # ...and route code -> kimi-k3
48
+ pilot-workers install ds on codex for explore --global-key
47
49
 
48
- # 3. Deploy the playbook skill to your host
49
- pilot-workers install claude # Claude Code: pilot-workers playbook skill
50
- pilot-workers install codex # Codex: same playbook skill
50
+ # 3. (optional) Refresh a host's deployed skill in place
51
+ pilot-workers install claude # idempotent sync; deploys nothing if no provider is configured
52
+ pilot-workers install codex
51
53
  pilot-workers install all # both hosts
52
54
 
53
55
  # 4. Check everything is ready
@@ -72,16 +74,19 @@ pilot-workers <subcommand> [args]
72
74
  dispatch Deterministic wrapper around run (two-line JSON: started + verdict).
73
75
  fanout Dispatch several jobs concurrently; stdout = one JSON array of verdicts.
74
76
  template Print the task template for a mode (code|explore|test|review).
75
- install Install host playbook skill or runner.
76
- install <host|all>
77
+ install Configure a worker for a host, or deploy/refresh a host's skill.
78
+ install <provider> on <host> [for <mode>] [--global-key]
79
+ install <host|all> [--target <dir>]
77
80
  install runner <name>
78
- uninstall Remove host playbook skill or runner.
81
+ uninstall Remove a worker from a host, an assignment, a key, or a whole host.
82
+ uninstall <provider> on <host>
83
+ uninstall for <mode> on <host>
84
+ uninstall key <provider>
79
85
  uninstall <host|all>
80
86
  uninstall runner <name>
81
87
  status Show provider credentials, host installs, and runner state.
82
88
  status [--json]
83
89
  status <host>
84
- credentials Configure isolated worker credentials.
85
90
  maintain Worker log, run-sandbox, and worktree lifecycle tools.
86
91
  maintain logs --older-than-days N
87
92
  maintain runs --older-than-days N [--keep M]
@@ -108,9 +113,9 @@ output_tokens: 8192
108
113
  # notes: ... # optional, surfaced by `pilot-workers status`
109
114
  ```
110
115
 
111
- Then `pilot-workers credentials my-model` and `pilot-workers install claude` (or `codex`) to deploy/refresh the host playbook skill.
116
+ Then `pilot-workers install my-model on claude --global-key` (or `codex`) to set its API key and deploy/refresh that host's playbook skill.
112
117
 
113
- Reserved keys (cannot be used as provider key): `runner`, `all`, `on`, `claude`, `codex`.
118
+ Reserved keys (cannot be used as provider key): `runner`, `all`, `on`, `for`, `key`, `claude`, `codex`.
114
119
 
115
120
  ## Host integration
116
121
 
@@ -119,7 +124,7 @@ The **host** is whatever AI agent acts as the planner. Each host ships ONE `pilo
119
124
  - **`claude-host/skills/pilot-workers/`**: playbook skill for Claude Code (installed to `~/.claude/skills/pilot-workers/`)
120
125
  - **`codex-host/skills/pilot-workers/`**: the same playbook skill for Codex (installed to `$CODEX_HOME/skills/pilot-workers/`)
121
126
 
122
- `pilot-workers install <host>` copies the skill into the host's skill directory; it carries no engine-specific knowledge and is the same regardless of which providers you've configured. (The v0.4.0 12-agents + 8-commands matrix is gone.)
127
+ `pilot-workers install <provider> on <host>` copies the skill into the host's skill directory and regenerates its worker table from that host's configuration; the doctrine itself carries no engine-specific knowledge. Removing the last provider deletes the skill, so a host with nothing configured has none and the planner does the work itself. (The v0.4.0 12-agents + 8-commands matrix is gone.)
123
128
 
124
129
  Adding a new host: create `integrations/<name>-host/skills/pilot-workers/`, put whatever config your host needs, point it at `pilot-workers dispatch`. See `integrations/README.md`.
125
130
 
@@ -131,7 +136,7 @@ See [CLAUDE.md](CLAUDE.md) for the current architecture, module reference, and c
131
136
 
132
137
  ```bash
133
138
  python3 -m venv .venv && .venv/bin/pip install -e ".[dev]"
134
- .venv/bin/pytest # 297 tests, all offline
139
+ .venv/bin/pytest # the whole suite, offline
135
140
  ```
136
141
 
137
142
  ## License
@@ -11,7 +11,7 @@ Dispatch bounded tasks to isolated LLM workers. Your main AI agent (Claude, Code
11
11
  - **Pluggable runners**: the runner adapter layer (`Runner` ABC) abstracts engine-specific details. Currently ships with OpenCode; designed for future alternatives.
12
12
  - **Observable**: two-line JSON contract (`started` + structured `verdict` carrying `parse_state`, a per-mode `result`, and `final_text_path`) for AI planners; human-readable `latest.log` for `tail -f`.
13
13
  - **Per-run sandboxes**: every dispatch runs inside its own isolated XDG tree (`providers/<key>/runs/<run_id>/`) with a zero-copy symlink to the canonical credential and a shared per-provider cache; resume (`--session` + `--run-id`) reuses the original sandbox.
14
- - **Host-level playbook**: one `pilot-workers` playbook skill per host (Claude Code or Codex). `install claude` / `install codex` deploys the same engine-neutral playbook regardless of which providers you've configured.
14
+ - **Host-level playbook**: one `pilot-workers` playbook skill per host (Claude Code or Codex). A host's skill exists only where at least one provider is configured for it, and its worker table is generated from that host's own configuration — a host never learns about a provider you did not give it.
15
15
 
16
16
  ## Install
17
17
 
@@ -25,14 +25,16 @@ pip install pilot-workers
25
25
  # 1. Install the worker runtime
26
26
  pilot-workers install runner opencode
27
27
 
28
- # 2. Configure credentials (interactive, key never displayed)
29
- pilot-workers credentials glm
30
- pilot-workers credentials kimi-k3
31
- pilot-workers credentials ds
28
+ # 2. Make a provider available to a host, and set its API key while you are
29
+ # there (interactive, key never displayed). The key belongs to the PROVIDER,
30
+ # so it is configured once and every host uses it.
31
+ pilot-workers install glm on claude --global-key
32
+ pilot-workers install kimi-k3 on claude for code --global-key # ...and route code -> kimi-k3
33
+ pilot-workers install ds on codex for explore --global-key
32
34
 
33
- # 3. Deploy the playbook skill to your host
34
- pilot-workers install claude # Claude Code: pilot-workers playbook skill
35
- pilot-workers install codex # Codex: same playbook skill
35
+ # 3. (optional) Refresh a host's deployed skill in place
36
+ pilot-workers install claude # idempotent sync; deploys nothing if no provider is configured
37
+ pilot-workers install codex
36
38
  pilot-workers install all # both hosts
37
39
 
38
40
  # 4. Check everything is ready
@@ -57,16 +59,19 @@ pilot-workers <subcommand> [args]
57
59
  dispatch Deterministic wrapper around run (two-line JSON: started + verdict).
58
60
  fanout Dispatch several jobs concurrently; stdout = one JSON array of verdicts.
59
61
  template Print the task template for a mode (code|explore|test|review).
60
- install Install host playbook skill or runner.
61
- install <host|all>
62
+ install Configure a worker for a host, or deploy/refresh a host's skill.
63
+ install <provider> on <host> [for <mode>] [--global-key]
64
+ install <host|all> [--target <dir>]
62
65
  install runner <name>
63
- uninstall Remove host playbook skill or runner.
66
+ uninstall Remove a worker from a host, an assignment, a key, or a whole host.
67
+ uninstall <provider> on <host>
68
+ uninstall for <mode> on <host>
69
+ uninstall key <provider>
64
70
  uninstall <host|all>
65
71
  uninstall runner <name>
66
72
  status Show provider credentials, host installs, and runner state.
67
73
  status [--json]
68
74
  status <host>
69
- credentials Configure isolated worker credentials.
70
75
  maintain Worker log, run-sandbox, and worktree lifecycle tools.
71
76
  maintain logs --older-than-days N
72
77
  maintain runs --older-than-days N [--keep M]
@@ -93,9 +98,9 @@ output_tokens: 8192
93
98
  # notes: ... # optional, surfaced by `pilot-workers status`
94
99
  ```
95
100
 
96
- Then `pilot-workers credentials my-model` and `pilot-workers install claude` (or `codex`) to deploy/refresh the host playbook skill.
101
+ Then `pilot-workers install my-model on claude --global-key` (or `codex`) to set its API key and deploy/refresh that host's playbook skill.
97
102
 
98
- Reserved keys (cannot be used as provider key): `runner`, `all`, `on`, `claude`, `codex`.
103
+ Reserved keys (cannot be used as provider key): `runner`, `all`, `on`, `for`, `key`, `claude`, `codex`.
99
104
 
100
105
  ## Host integration
101
106
 
@@ -104,7 +109,7 @@ The **host** is whatever AI agent acts as the planner. Each host ships ONE `pilo
104
109
  - **`claude-host/skills/pilot-workers/`**: playbook skill for Claude Code (installed to `~/.claude/skills/pilot-workers/`)
105
110
  - **`codex-host/skills/pilot-workers/`**: the same playbook skill for Codex (installed to `$CODEX_HOME/skills/pilot-workers/`)
106
111
 
107
- `pilot-workers install <host>` copies the skill into the host's skill directory; it carries no engine-specific knowledge and is the same regardless of which providers you've configured. (The v0.4.0 12-agents + 8-commands matrix is gone.)
112
+ `pilot-workers install <provider> on <host>` copies the skill into the host's skill directory and regenerates its worker table from that host's configuration; the doctrine itself carries no engine-specific knowledge. Removing the last provider deletes the skill, so a host with nothing configured has none and the planner does the work itself. (The v0.4.0 12-agents + 8-commands matrix is gone.)
108
113
 
109
114
  Adding a new host: create `integrations/<name>-host/skills/pilot-workers/`, put whatever config your host needs, point it at `pilot-workers dispatch`. See `integrations/README.md`.
110
115
 
@@ -116,7 +121,7 @@ See [CLAUDE.md](CLAUDE.md) for the current architecture, module reference, and c
116
121
 
117
122
  ```bash
118
123
  python3 -m venv .venv && .venv/bin/pip install -e ".[dev]"
119
- .venv/bin/pytest # 297 tests, all offline
124
+ .venv/bin/pytest # the whole suite, offline
120
125
  ```
121
126
 
122
127
  ## License
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "pilot-workers"
7
- version = "0.5.1"
7
+ version = "0.5.2"
8
8
  description = "Dispatch bounded tasks to isolated LLM workers (GLM, Kimi, and more)"
9
9
  readme = "README.md"
10
10
  license = "MIT"