pilot-workers 0.2.0__tar.gz → 0.3.0__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 (88) hide show
  1. pilot_workers-0.3.0/PKG-INFO +128 -0
  2. pilot_workers-0.3.0/README.md +113 -0
  3. {pilot_workers-0.2.0 → pilot_workers-0.3.0}/pyproject.toml +1 -1
  4. pilot_workers-0.3.0/src/pilot_workers/cli/install.py +520 -0
  5. {pilot_workers-0.2.0 → pilot_workers-0.3.0}/src/pilot_workers/cli/main.py +19 -11
  6. pilot_workers-0.3.0/src/pilot_workers/cli/status.py +178 -0
  7. {pilot_workers-0.2.0 → pilot_workers-0.3.0}/src/pilot_workers/credentials.py +7 -21
  8. {pilot_workers-0.2.0 → pilot_workers-0.3.0}/src/pilot_workers/data/providers/kimi-k3.yaml +1 -0
  9. {pilot_workers-0.2.0 → pilot_workers-0.3.0}/src/pilot_workers/fmt_events.py +0 -1
  10. {pilot_workers-0.2.0 → pilot_workers-0.3.0}/src/pilot_workers/maintain.py +5 -2
  11. {pilot_workers-0.2.0 → pilot_workers-0.3.0}/src/pilot_workers/policy.py +2 -2
  12. {pilot_workers-0.2.0 → pilot_workers-0.3.0}/src/pilot_workers/providers.py +26 -3
  13. {pilot_workers-0.2.0 → pilot_workers-0.3.0}/src/pilot_workers/runners/__init__.py +1 -1
  14. {pilot_workers-0.2.0 → pilot_workers-0.3.0}/src/pilot_workers/runners/base.py +2 -2
  15. {pilot_workers-0.2.0 → pilot_workers-0.3.0}/src/pilot_workers/runners/opencode_runner.py +22 -37
  16. {pilot_workers-0.2.0 → pilot_workers-0.3.0}/src/pilot_workers/runtime.py +8 -6
  17. {pilot_workers-0.2.0 → pilot_workers-0.3.0}/src/pilot_workers/scripts/install_runtime.sh +1 -2
  18. pilot_workers-0.3.0/src/pilot_workers.egg-info/PKG-INFO +128 -0
  19. {pilot_workers-0.2.0 → pilot_workers-0.3.0}/src/pilot_workers.egg-info/SOURCES.txt +3 -1
  20. {pilot_workers-0.2.0 → pilot_workers-0.3.0}/tests/test_cli_main.py +22 -6
  21. {pilot_workers-0.2.0 → pilot_workers-0.3.0}/tests/test_dispatch.py +12 -0
  22. pilot_workers-0.3.0/tests/test_install.py +366 -0
  23. {pilot_workers-0.2.0 → pilot_workers-0.3.0}/tests/test_opencode_runner.py +1 -1
  24. {pilot_workers-0.2.0 → pilot_workers-0.3.0}/tests/test_providers.py +16 -0
  25. {pilot_workers-0.2.0 → pilot_workers-0.3.0}/tests/test_render_unified.py +27 -1
  26. {pilot_workers-0.2.0 → pilot_workers-0.3.0}/tests/test_runtime.py +22 -2
  27. pilot_workers-0.3.0/tests/test_status.py +123 -0
  28. pilot_workers-0.2.0/PKG-INFO +0 -84
  29. pilot_workers-0.2.0/README.md +0 -69
  30. pilot_workers-0.2.0/src/pilot_workers/cli/install.py +0 -259
  31. pilot_workers-0.2.0/src/pilot_workers.egg-info/PKG-INFO +0 -84
  32. pilot_workers-0.2.0/tests/test_install.py +0 -126
  33. {pilot_workers-0.2.0 → pilot_workers-0.3.0}/LICENSE +0 -0
  34. {pilot_workers-0.2.0 → pilot_workers-0.3.0}/setup.cfg +0 -0
  35. {pilot_workers-0.2.0 → pilot_workers-0.3.0}/src/pilot_workers/__init__.py +0 -0
  36. {pilot_workers-0.2.0 → pilot_workers-0.3.0}/src/pilot_workers/__main__.py +0 -0
  37. {pilot_workers-0.2.0 → pilot_workers-0.3.0}/src/pilot_workers/cli/__init__.py +0 -0
  38. {pilot_workers-0.2.0 → pilot_workers-0.3.0}/src/pilot_workers/cli/dispatch.py +0 -0
  39. {pilot_workers-0.2.0 → pilot_workers-0.3.0}/src/pilot_workers/cli/run.py +0 -0
  40. {pilot_workers-0.2.0 → pilot_workers-0.3.0}/src/pilot_workers/data/permissions/README.md +0 -0
  41. {pilot_workers-0.2.0 → pilot_workers-0.3.0}/src/pilot_workers/data/permissions/relaxed.yaml +0 -0
  42. {pilot_workers-0.2.0 → pilot_workers-0.3.0}/src/pilot_workers/data/permissions/strict.yaml +0 -0
  43. {pilot_workers-0.2.0 → pilot_workers-0.3.0}/src/pilot_workers/data/providers/README.md +0 -0
  44. {pilot_workers-0.2.0 → pilot_workers-0.3.0}/src/pilot_workers/data/providers/ds.yaml +0 -0
  45. {pilot_workers-0.2.0 → pilot_workers-0.3.0}/src/pilot_workers/data/providers/glm.yaml +0 -0
  46. {pilot_workers-0.2.0 → pilot_workers-0.3.0}/src/pilot_workers/data/templates/code.md +0 -0
  47. {pilot_workers-0.2.0 → pilot_workers-0.3.0}/src/pilot_workers/data/templates/explore.md +0 -0
  48. {pilot_workers-0.2.0 → pilot_workers-0.3.0}/src/pilot_workers/data/templates/review.md +0 -0
  49. {pilot_workers-0.2.0 → pilot_workers-0.3.0}/src/pilot_workers/data/templates/test.md +0 -0
  50. {pilot_workers-0.2.0 → pilot_workers-0.3.0}/src/pilot_workers/integrations/README.md +0 -0
  51. {pilot_workers-0.2.0 → pilot_workers-0.3.0}/src/pilot_workers/integrations/claude-host/agents/ds-coder.md +0 -0
  52. {pilot_workers-0.2.0 → pilot_workers-0.3.0}/src/pilot_workers/integrations/claude-host/agents/ds-explorer.md +0 -0
  53. {pilot_workers-0.2.0 → pilot_workers-0.3.0}/src/pilot_workers/integrations/claude-host/agents/ds-reviewer.md +0 -0
  54. {pilot_workers-0.2.0 → pilot_workers-0.3.0}/src/pilot_workers/integrations/claude-host/agents/ds-tester.md +0 -0
  55. {pilot_workers-0.2.0 → pilot_workers-0.3.0}/src/pilot_workers/integrations/claude-host/agents/glm-coder.md +0 -0
  56. {pilot_workers-0.2.0 → pilot_workers-0.3.0}/src/pilot_workers/integrations/claude-host/agents/glm-explorer.md +0 -0
  57. {pilot_workers-0.2.0 → pilot_workers-0.3.0}/src/pilot_workers/integrations/claude-host/agents/glm-reviewer.md +0 -0
  58. {pilot_workers-0.2.0 → pilot_workers-0.3.0}/src/pilot_workers/integrations/claude-host/agents/glm-tester.md +0 -0
  59. {pilot_workers-0.2.0 → pilot_workers-0.3.0}/src/pilot_workers/integrations/claude-host/agents/kimi-coder.md +0 -0
  60. {pilot_workers-0.2.0 → pilot_workers-0.3.0}/src/pilot_workers/integrations/claude-host/agents/kimi-explorer.md +0 -0
  61. {pilot_workers-0.2.0 → pilot_workers-0.3.0}/src/pilot_workers/integrations/claude-host/agents/kimi-reviewer.md +0 -0
  62. {pilot_workers-0.2.0 → pilot_workers-0.3.0}/src/pilot_workers/integrations/claude-host/agents/kimi-tester.md +0 -0
  63. {pilot_workers-0.2.0 → pilot_workers-0.3.0}/src/pilot_workers/integrations/claude-host/commands/glm/code.md +0 -0
  64. {pilot_workers-0.2.0 → pilot_workers-0.3.0}/src/pilot_workers/integrations/claude-host/commands/glm/explore.md +0 -0
  65. {pilot_workers-0.2.0 → pilot_workers-0.3.0}/src/pilot_workers/integrations/claude-host/commands/glm/review.md +0 -0
  66. {pilot_workers-0.2.0 → pilot_workers-0.3.0}/src/pilot_workers/integrations/claude-host/commands/glm/test.md +0 -0
  67. {pilot_workers-0.2.0 → pilot_workers-0.3.0}/src/pilot_workers/integrations/claude-host/commands/kimi/code.md +0 -0
  68. {pilot_workers-0.2.0 → pilot_workers-0.3.0}/src/pilot_workers/integrations/claude-host/commands/kimi/explore.md +0 -0
  69. {pilot_workers-0.2.0 → pilot_workers-0.3.0}/src/pilot_workers/integrations/claude-host/commands/kimi/review.md +0 -0
  70. {pilot_workers-0.2.0 → pilot_workers-0.3.0}/src/pilot_workers/integrations/claude-host/commands/kimi/test.md +0 -0
  71. {pilot_workers-0.2.0 → pilot_workers-0.3.0}/src/pilot_workers/integrations/codex-host/ds/SKILL.md +0 -0
  72. {pilot_workers-0.2.0 → pilot_workers-0.3.0}/src/pilot_workers/integrations/codex-host/ds/openai.yaml +0 -0
  73. {pilot_workers-0.2.0 → pilot_workers-0.3.0}/src/pilot_workers/integrations/codex-host/glm/SKILL.md +0 -0
  74. {pilot_workers-0.2.0 → pilot_workers-0.3.0}/src/pilot_workers/integrations/codex-host/glm/openai.yaml +0 -0
  75. {pilot_workers-0.2.0 → pilot_workers-0.3.0}/src/pilot_workers/integrations/codex-host/kimi/SKILL.md +0 -0
  76. {pilot_workers-0.2.0 → pilot_workers-0.3.0}/src/pilot_workers/integrations/codex-host/kimi/openai.yaml +0 -0
  77. {pilot_workers-0.2.0 → pilot_workers-0.3.0}/src/pilot_workers/prompts/code.md +0 -0
  78. {pilot_workers-0.2.0 → pilot_workers-0.3.0}/src/pilot_workers/prompts/common.md +0 -0
  79. {pilot_workers-0.2.0 → pilot_workers-0.3.0}/src/pilot_workers/prompts/explore.md +0 -0
  80. {pilot_workers-0.2.0 → pilot_workers-0.3.0}/src/pilot_workers/prompts/review.md +0 -0
  81. {pilot_workers-0.2.0 → pilot_workers-0.3.0}/src/pilot_workers/prompts/test.md +0 -0
  82. {pilot_workers-0.2.0 → pilot_workers-0.3.0}/src/pilot_workers.egg-info/dependency_links.txt +0 -0
  83. {pilot_workers-0.2.0 → pilot_workers-0.3.0}/src/pilot_workers.egg-info/entry_points.txt +0 -0
  84. {pilot_workers-0.2.0 → pilot_workers-0.3.0}/src/pilot_workers.egg-info/requires.txt +0 -0
  85. {pilot_workers-0.2.0 → pilot_workers-0.3.0}/src/pilot_workers.egg-info/top_level.txt +0 -0
  86. {pilot_workers-0.2.0 → pilot_workers-0.3.0}/tests/test_credentials.py +0 -0
  87. {pilot_workers-0.2.0 → pilot_workers-0.3.0}/tests/test_policy.py +0 -0
  88. {pilot_workers-0.2.0 → pilot_workers-0.3.0}/tests/test_run_cli.py +0 -0
@@ -0,0 +1,128 @@
1
+ Metadata-Version: 2.4
2
+ Name: pilot-workers
3
+ Version: 0.3.0
4
+ Summary: Dispatch bounded tasks to isolated LLM workers (GLM, Kimi, and more)
5
+ License-Expression: MIT
6
+ Requires-Python: >=3.11
7
+ Description-Content-Type: text/markdown
8
+ License-File: LICENSE
9
+ Provides-Extra: yaml
10
+ Requires-Dist: pyyaml>=6.0; extra == "yaml"
11
+ Provides-Extra: dev
12
+ Requires-Dist: pytest>=8.0; extra == "dev"
13
+ Requires-Dist: pyyaml>=6.0; extra == "dev"
14
+ Dynamic: license-file
15
+
16
+ # pilot-workers
17
+
18
+ Dispatch bounded tasks to isolated LLM workers. Your main AI agent (Claude, Codex, or any planner) stays in control of requirements, planning, and verification — the worker only executes what it's told.
19
+
20
+ ## What it does
21
+
22
+ - **Provider isolation**: each model (GLM, Kimi, DeepSeek, or your own) gets its own credentials, XDG directories, logs, and session storage. No cross-contamination.
23
+ - **Fixed routing**: provider, model, and endpoint are locked per YAML config. Tasks cannot override them.
24
+ - **Security by default**: API keys never appear in CLI args, environment variables, task contracts, or logs. Output is auto-redacted.
25
+ - **Five modes**: `code` (edit), `explore` (read-only), `test` (run tests), `review` (read-only audit), `resume` (continue a prior code session).
26
+ - **Pluggable runners**: the runner adapter layer (`Runner` ABC) abstracts engine-specific details. Currently ships with OpenCode; designed for future alternatives.
27
+ - **Observable**: two-line JSON contract (`started` + `verdict`) for AI planners; human-readable `latest.log` for `tail -f`.
28
+ - **Per-provider installs**: `install glm on claude` deploys only GLM's integration to Claude Code. Mix and match providers × hosts.
29
+
30
+ ## Install
31
+
32
+ ```bash
33
+ pip install pilot-workers
34
+ ```
35
+
36
+ ## Quick start
37
+
38
+ ```bash
39
+ # 1. Install the worker runtime
40
+ pilot-workers install runner opencode
41
+
42
+ # 2. Configure credentials (interactive, key never displayed)
43
+ pilot-workers credentials glm
44
+ pilot-workers credentials kimi-k3
45
+ pilot-workers credentials ds
46
+
47
+ # 3. Deploy integrations to your host
48
+ pilot-workers install all on claude # Claude Code: 12 agents + 8 slash commands
49
+ pilot-workers install all on codex # Codex: $glm / $kimi / $ds skills
50
+ pilot-workers install glm on claude # or just one provider on one host
51
+
52
+ # 4. Check everything is ready
53
+ pilot-workers status
54
+
55
+ # 5. Verify with a dry-run
56
+ pilot-workers run --provider glm --mode explore --workdir . --task "hello" --dry-run
57
+
58
+ # 6. Run a real task
59
+ pilot-workers template code > /tmp/task.md # generate a structured task template
60
+ # fill in the template, then:
61
+ pilot-workers dispatch --provider glm --mode code --workdir /path/to/project --task-file /tmp/task.md
62
+ # dispatch stdout = exactly two JSON lines: worker_runner.started + worker_runner.verdict
63
+ ```
64
+
65
+ ## CLI reference
66
+
67
+ ```
68
+ pilot-workers <subcommand> [args]
69
+
70
+ run Dispatch a task (streaming output).
71
+ dispatch Deterministic wrapper around run (two-line JSON: started + verdict).
72
+ template Print the task template for a mode (code|explore|test|review).
73
+ install Install integrations or runner.
74
+ install <provider|all> on <host|all>
75
+ install runner <name>
76
+ uninstall Remove integrations or runner.
77
+ uninstall <provider|all> on <host|all>
78
+ uninstall runner <name>
79
+ status Show provider credentials, host installs, and runner state.
80
+ status [--json]
81
+ status <provider> on <host>
82
+ credentials Configure isolated worker credentials.
83
+ maintain Worker log and worktree lifecycle tools.
84
+ ```
85
+
86
+ ## Adding a new provider
87
+
88
+ Drop a YAML file in `data/providers/` (inside the package):
89
+
90
+ ```yaml
91
+ key: my-model
92
+ provider_id: my-worker
93
+ model_id: my-model-v1
94
+ base_url: https://api.example.com/v1
95
+ display_name: My Model Worker
96
+ context_tokens: 128000
97
+ output_tokens: 8192
98
+ # runner: opencode # optional, default opencode
99
+ # permissions: relaxed # optional, reference a permission profile
100
+ # asset_prefix: my-model # optional, default = key; used for integration file naming
101
+ ```
102
+
103
+ Then `pilot-workers credentials my-model` and `pilot-workers install my-model on claude`.
104
+
105
+ Reserved keys (cannot be used as provider key): `runner`, `all`, `on`, `claude`, `codex`.
106
+
107
+ ## Host integration
108
+
109
+ The **host** is whatever AI agent acts as the planner. `integrations/` has ready-made configs:
110
+ - **`claude-host/`**: 12 agents (glm/kimi/ds × coder/explorer/reviewer/tester) + 8 slash commands
111
+ - **`codex-host/`**: `$glm` / `$kimi` / `$ds` skill entry points
112
+
113
+ Adding a new host: create `integrations/<name>-host/`, put whatever config your host needs, point it at `pilot-workers dispatch`. See `integrations/README.md`.
114
+
115
+ ## Architecture
116
+
117
+ See [CLAUDE.md](CLAUDE.md) for the current architecture, module reference, and conventions. See [docs/architecture.md](docs/architecture.md) for the detailed contract and security model.
118
+
119
+ ## Development
120
+
121
+ ```bash
122
+ python3 -m venv .venv && .venv/bin/pip install -e ".[dev]"
123
+ .venv/bin/pytest # 130 tests, all offline
124
+ ```
125
+
126
+ ## License
127
+
128
+ MIT
@@ -0,0 +1,113 @@
1
+ # pilot-workers
2
+
3
+ Dispatch bounded tasks to isolated LLM workers. Your main AI agent (Claude, Codex, or any planner) stays in control of requirements, planning, and verification — the worker only executes what it's told.
4
+
5
+ ## What it does
6
+
7
+ - **Provider isolation**: each model (GLM, Kimi, DeepSeek, or your own) gets its own credentials, XDG directories, logs, and session storage. No cross-contamination.
8
+ - **Fixed routing**: provider, model, and endpoint are locked per YAML config. Tasks cannot override them.
9
+ - **Security by default**: API keys never appear in CLI args, environment variables, task contracts, or logs. Output is auto-redacted.
10
+ - **Five modes**: `code` (edit), `explore` (read-only), `test` (run tests), `review` (read-only audit), `resume` (continue a prior code session).
11
+ - **Pluggable runners**: the runner adapter layer (`Runner` ABC) abstracts engine-specific details. Currently ships with OpenCode; designed for future alternatives.
12
+ - **Observable**: two-line JSON contract (`started` + `verdict`) for AI planners; human-readable `latest.log` for `tail -f`.
13
+ - **Per-provider installs**: `install glm on claude` deploys only GLM's integration to Claude Code. Mix and match providers × hosts.
14
+
15
+ ## Install
16
+
17
+ ```bash
18
+ pip install pilot-workers
19
+ ```
20
+
21
+ ## Quick start
22
+
23
+ ```bash
24
+ # 1. Install the worker runtime
25
+ pilot-workers install runner opencode
26
+
27
+ # 2. Configure credentials (interactive, key never displayed)
28
+ pilot-workers credentials glm
29
+ pilot-workers credentials kimi-k3
30
+ pilot-workers credentials ds
31
+
32
+ # 3. Deploy integrations to your host
33
+ pilot-workers install all on claude # Claude Code: 12 agents + 8 slash commands
34
+ pilot-workers install all on codex # Codex: $glm / $kimi / $ds skills
35
+ pilot-workers install glm on claude # or just one provider on one host
36
+
37
+ # 4. Check everything is ready
38
+ pilot-workers status
39
+
40
+ # 5. Verify with a dry-run
41
+ pilot-workers run --provider glm --mode explore --workdir . --task "hello" --dry-run
42
+
43
+ # 6. Run a real task
44
+ pilot-workers template code > /tmp/task.md # generate a structured task template
45
+ # fill in the template, then:
46
+ pilot-workers dispatch --provider glm --mode code --workdir /path/to/project --task-file /tmp/task.md
47
+ # dispatch stdout = exactly two JSON lines: worker_runner.started + worker_runner.verdict
48
+ ```
49
+
50
+ ## CLI reference
51
+
52
+ ```
53
+ pilot-workers <subcommand> [args]
54
+
55
+ run Dispatch a task (streaming output).
56
+ dispatch Deterministic wrapper around run (two-line JSON: started + verdict).
57
+ template Print the task template for a mode (code|explore|test|review).
58
+ install Install integrations or runner.
59
+ install <provider|all> on <host|all>
60
+ install runner <name>
61
+ uninstall Remove integrations or runner.
62
+ uninstall <provider|all> on <host|all>
63
+ uninstall runner <name>
64
+ status Show provider credentials, host installs, and runner state.
65
+ status [--json]
66
+ status <provider> on <host>
67
+ credentials Configure isolated worker credentials.
68
+ maintain Worker log and worktree lifecycle tools.
69
+ ```
70
+
71
+ ## Adding a new provider
72
+
73
+ Drop a YAML file in `data/providers/` (inside the package):
74
+
75
+ ```yaml
76
+ key: my-model
77
+ provider_id: my-worker
78
+ model_id: my-model-v1
79
+ base_url: https://api.example.com/v1
80
+ display_name: My Model Worker
81
+ context_tokens: 128000
82
+ output_tokens: 8192
83
+ # runner: opencode # optional, default opencode
84
+ # permissions: relaxed # optional, reference a permission profile
85
+ # asset_prefix: my-model # optional, default = key; used for integration file naming
86
+ ```
87
+
88
+ Then `pilot-workers credentials my-model` and `pilot-workers install my-model on claude`.
89
+
90
+ Reserved keys (cannot be used as provider key): `runner`, `all`, `on`, `claude`, `codex`.
91
+
92
+ ## Host integration
93
+
94
+ The **host** is whatever AI agent acts as the planner. `integrations/` has ready-made configs:
95
+ - **`claude-host/`**: 12 agents (glm/kimi/ds × coder/explorer/reviewer/tester) + 8 slash commands
96
+ - **`codex-host/`**: `$glm` / `$kimi` / `$ds` skill entry points
97
+
98
+ Adding a new host: create `integrations/<name>-host/`, put whatever config your host needs, point it at `pilot-workers dispatch`. See `integrations/README.md`.
99
+
100
+ ## Architecture
101
+
102
+ See [CLAUDE.md](CLAUDE.md) for the current architecture, module reference, and conventions. See [docs/architecture.md](docs/architecture.md) for the detailed contract and security model.
103
+
104
+ ## Development
105
+
106
+ ```bash
107
+ python3 -m venv .venv && .venv/bin/pip install -e ".[dev]"
108
+ .venv/bin/pytest # 130 tests, all offline
109
+ ```
110
+
111
+ ## License
112
+
113
+ MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "pilot-workers"
7
- version = "0.2.0"
7
+ version = "0.3.0"
8
8
  description = "Dispatch bounded tasks to isolated LLM workers (GLM, Kimi, and more)"
9
9
  readme = "README.md"
10
10
  license = "MIT"