pilot-workers 0.2.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 (81) hide show
  1. pilot_workers-0.2.0/LICENSE +21 -0
  2. pilot_workers-0.2.0/PKG-INFO +84 -0
  3. pilot_workers-0.2.0/README.md +69 -0
  4. pilot_workers-0.2.0/pyproject.toml +39 -0
  5. pilot_workers-0.2.0/setup.cfg +4 -0
  6. pilot_workers-0.2.0/src/pilot_workers/__init__.py +1 -0
  7. pilot_workers-0.2.0/src/pilot_workers/__main__.py +3 -0
  8. pilot_workers-0.2.0/src/pilot_workers/cli/__init__.py +0 -0
  9. pilot_workers-0.2.0/src/pilot_workers/cli/dispatch.py +577 -0
  10. pilot_workers-0.2.0/src/pilot_workers/cli/install.py +259 -0
  11. pilot_workers-0.2.0/src/pilot_workers/cli/main.py +115 -0
  12. pilot_workers-0.2.0/src/pilot_workers/cli/run.py +191 -0
  13. pilot_workers-0.2.0/src/pilot_workers/credentials.py +102 -0
  14. pilot_workers-0.2.0/src/pilot_workers/data/permissions/README.md +47 -0
  15. pilot_workers-0.2.0/src/pilot_workers/data/permissions/relaxed.yaml +10 -0
  16. pilot_workers-0.2.0/src/pilot_workers/data/permissions/strict.yaml +9 -0
  17. pilot_workers-0.2.0/src/pilot_workers/data/providers/README.md +24 -0
  18. pilot_workers-0.2.0/src/pilot_workers/data/providers/ds.yaml +11 -0
  19. pilot_workers-0.2.0/src/pilot_workers/data/providers/glm.yaml +11 -0
  20. pilot_workers-0.2.0/src/pilot_workers/data/providers/kimi-k3.yaml +11 -0
  21. pilot_workers-0.2.0/src/pilot_workers/data/templates/code.md +28 -0
  22. pilot_workers-0.2.0/src/pilot_workers/data/templates/explore.md +17 -0
  23. pilot_workers-0.2.0/src/pilot_workers/data/templates/review.md +18 -0
  24. pilot_workers-0.2.0/src/pilot_workers/data/templates/test.md +17 -0
  25. pilot_workers-0.2.0/src/pilot_workers/fmt_events.py +218 -0
  26. pilot_workers-0.2.0/src/pilot_workers/integrations/README.md +25 -0
  27. pilot_workers-0.2.0/src/pilot_workers/integrations/claude-host/agents/ds-coder.md +66 -0
  28. pilot_workers-0.2.0/src/pilot_workers/integrations/claude-host/agents/ds-explorer.md +56 -0
  29. pilot_workers-0.2.0/src/pilot_workers/integrations/claude-host/agents/ds-reviewer.md +50 -0
  30. pilot_workers-0.2.0/src/pilot_workers/integrations/claude-host/agents/ds-tester.md +46 -0
  31. pilot_workers-0.2.0/src/pilot_workers/integrations/claude-host/agents/glm-coder.md +66 -0
  32. pilot_workers-0.2.0/src/pilot_workers/integrations/claude-host/agents/glm-explorer.md +56 -0
  33. pilot_workers-0.2.0/src/pilot_workers/integrations/claude-host/agents/glm-reviewer.md +50 -0
  34. pilot_workers-0.2.0/src/pilot_workers/integrations/claude-host/agents/glm-tester.md +46 -0
  35. pilot_workers-0.2.0/src/pilot_workers/integrations/claude-host/agents/kimi-coder.md +66 -0
  36. pilot_workers-0.2.0/src/pilot_workers/integrations/claude-host/agents/kimi-explorer.md +56 -0
  37. pilot_workers-0.2.0/src/pilot_workers/integrations/claude-host/agents/kimi-reviewer.md +50 -0
  38. pilot_workers-0.2.0/src/pilot_workers/integrations/claude-host/agents/kimi-tester.md +50 -0
  39. pilot_workers-0.2.0/src/pilot_workers/integrations/claude-host/commands/glm/code.md +48 -0
  40. pilot_workers-0.2.0/src/pilot_workers/integrations/claude-host/commands/glm/explore.md +38 -0
  41. pilot_workers-0.2.0/src/pilot_workers/integrations/claude-host/commands/glm/review.md +38 -0
  42. pilot_workers-0.2.0/src/pilot_workers/integrations/claude-host/commands/glm/test.md +30 -0
  43. pilot_workers-0.2.0/src/pilot_workers/integrations/claude-host/commands/kimi/code.md +47 -0
  44. pilot_workers-0.2.0/src/pilot_workers/integrations/claude-host/commands/kimi/explore.md +38 -0
  45. pilot_workers-0.2.0/src/pilot_workers/integrations/claude-host/commands/kimi/review.md +38 -0
  46. pilot_workers-0.2.0/src/pilot_workers/integrations/claude-host/commands/kimi/test.md +32 -0
  47. pilot_workers-0.2.0/src/pilot_workers/integrations/codex-host/ds/SKILL.md +15 -0
  48. pilot_workers-0.2.0/src/pilot_workers/integrations/codex-host/ds/openai.yaml +4 -0
  49. pilot_workers-0.2.0/src/pilot_workers/integrations/codex-host/glm/SKILL.md +15 -0
  50. pilot_workers-0.2.0/src/pilot_workers/integrations/codex-host/glm/openai.yaml +4 -0
  51. pilot_workers-0.2.0/src/pilot_workers/integrations/codex-host/kimi/SKILL.md +15 -0
  52. pilot_workers-0.2.0/src/pilot_workers/integrations/codex-host/kimi/openai.yaml +4 -0
  53. pilot_workers-0.2.0/src/pilot_workers/maintain.py +170 -0
  54. pilot_workers-0.2.0/src/pilot_workers/policy.py +295 -0
  55. pilot_workers-0.2.0/src/pilot_workers/prompts/code.md +6 -0
  56. pilot_workers-0.2.0/src/pilot_workers/prompts/common.md +24 -0
  57. pilot_workers-0.2.0/src/pilot_workers/prompts/explore.md +7 -0
  58. pilot_workers-0.2.0/src/pilot_workers/prompts/review.md +5 -0
  59. pilot_workers-0.2.0/src/pilot_workers/prompts/test.md +6 -0
  60. pilot_workers-0.2.0/src/pilot_workers/providers.py +137 -0
  61. pilot_workers-0.2.0/src/pilot_workers/runners/__init__.py +28 -0
  62. pilot_workers-0.2.0/src/pilot_workers/runners/base.py +123 -0
  63. pilot_workers-0.2.0/src/pilot_workers/runners/opencode_runner.py +377 -0
  64. pilot_workers-0.2.0/src/pilot_workers/runtime.py +314 -0
  65. pilot_workers-0.2.0/src/pilot_workers/scripts/install_runtime.sh +51 -0
  66. pilot_workers-0.2.0/src/pilot_workers.egg-info/PKG-INFO +84 -0
  67. pilot_workers-0.2.0/src/pilot_workers.egg-info/SOURCES.txt +79 -0
  68. pilot_workers-0.2.0/src/pilot_workers.egg-info/dependency_links.txt +1 -0
  69. pilot_workers-0.2.0/src/pilot_workers.egg-info/entry_points.txt +2 -0
  70. pilot_workers-0.2.0/src/pilot_workers.egg-info/requires.txt +7 -0
  71. pilot_workers-0.2.0/src/pilot_workers.egg-info/top_level.txt +1 -0
  72. pilot_workers-0.2.0/tests/test_cli_main.py +85 -0
  73. pilot_workers-0.2.0/tests/test_credentials.py +33 -0
  74. pilot_workers-0.2.0/tests/test_dispatch.py +180 -0
  75. pilot_workers-0.2.0/tests/test_install.py +126 -0
  76. pilot_workers-0.2.0/tests/test_opencode_runner.py +106 -0
  77. pilot_workers-0.2.0/tests/test_policy.py +153 -0
  78. pilot_workers-0.2.0/tests/test_providers.py +120 -0
  79. pilot_workers-0.2.0/tests/test_render_unified.py +46 -0
  80. pilot_workers-0.2.0/tests/test_run_cli.py +86 -0
  81. pilot_workers-0.2.0/tests/test_runtime.py +45 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,84 @@
1
+ Metadata-Version: 2.4
2
+ Name: pilot-workers
3
+ Version: 0.2.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, 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
+ - **Observable**: `worker_runner.started` → heartbeats → `worker_runner.summary`. Human-readable live log at `latest.log` for `tail -f`.
27
+ - **Pluggable runners**: currently wraps [OpenCode](https://opencode.ai) via `@ai-sdk/openai-compatible`; the runner interface is designed for future alternatives (Aider, Continue, etc.).
28
+
29
+ ## Quick start
30
+
31
+ ```bash
32
+ # 1. Install the pinned OpenCode runtime
33
+ pilot-workers runtime install
34
+
35
+ # 2. Add a provider (YAML files in src/pilot_workers/data/providers/)
36
+ # GLM and Kimi are included; add your own by copying the template
37
+
38
+ # 3. Configure credentials (interactive, key never displayed)
39
+ python3 -m pilot_workers.credentials glm
40
+ python3 -m pilot_workers.credentials kimi-k3
41
+
42
+ # 4. Verify
43
+ python3 -m pilot_workers.cli.run --provider glm --mode explore --workdir . --task "hello" --dry-run
44
+
45
+ # 5. Run a real task
46
+ python3 -m pilot_workers.cli.run \
47
+ --provider glm --mode code \
48
+ --workdir /path/to/project \
49
+ --task-file /path/to/task.md
50
+ ```
51
+
52
+ ## Adding a new provider
53
+
54
+ Drop a YAML file in `data/providers/` (inside the package):
55
+
56
+ ```yaml
57
+ key: deepseek
58
+ provider_id: deepseek-worker
59
+ model_id: deepseek-coder-v3
60
+ base_url: https://api.deepseek.com/v1
61
+ display_name: DeepSeek Coder V3
62
+ context_tokens: 128000
63
+ output_tokens: 8192
64
+ ```
65
+
66
+ Then `python3 -m pilot_workers.credentials deepseek` and you're done.
67
+
68
+ ## Host integration
69
+
70
+ The **host** is whatever AI agent acts as the planner — Claude, Codex, Gemini, GLM itself, or anything that can write a task file and call the CLI.
71
+
72
+ `integrations/` has ready-made configs for current hosts:
73
+ - **`claude-host/`**: 12 agents + 8 slash commands (`/glm:code`, `/kimi:explore`, etc.)
74
+ - **`codex-host/`**: `$glm` / `$kimi` / `$ds` skill entry points
75
+
76
+ Adding a new host: create `integrations/<name>-host/`, put whatever config your host needs, point it at `python3 -m pilot_workers.cli.run`. See `integrations/README.md`.
77
+
78
+ ## Architecture
79
+
80
+ See [docs/architecture.md](docs/architecture.md) for the shared contract, security model, and verification checklist.
81
+
82
+ ## License
83
+
84
+ MIT
@@ -0,0 +1,69 @@
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, 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
+ - **Observable**: `worker_runner.started` → heartbeats → `worker_runner.summary`. Human-readable live log at `latest.log` for `tail -f`.
12
+ - **Pluggable runners**: currently wraps [OpenCode](https://opencode.ai) via `@ai-sdk/openai-compatible`; the runner interface is designed for future alternatives (Aider, Continue, etc.).
13
+
14
+ ## Quick start
15
+
16
+ ```bash
17
+ # 1. Install the pinned OpenCode runtime
18
+ pilot-workers runtime install
19
+
20
+ # 2. Add a provider (YAML files in src/pilot_workers/data/providers/)
21
+ # GLM and Kimi are included; add your own by copying the template
22
+
23
+ # 3. Configure credentials (interactive, key never displayed)
24
+ python3 -m pilot_workers.credentials glm
25
+ python3 -m pilot_workers.credentials kimi-k3
26
+
27
+ # 4. Verify
28
+ python3 -m pilot_workers.cli.run --provider glm --mode explore --workdir . --task "hello" --dry-run
29
+
30
+ # 5. Run a real task
31
+ python3 -m pilot_workers.cli.run \
32
+ --provider glm --mode code \
33
+ --workdir /path/to/project \
34
+ --task-file /path/to/task.md
35
+ ```
36
+
37
+ ## Adding a new provider
38
+
39
+ Drop a YAML file in `data/providers/` (inside the package):
40
+
41
+ ```yaml
42
+ key: deepseek
43
+ provider_id: deepseek-worker
44
+ model_id: deepseek-coder-v3
45
+ base_url: https://api.deepseek.com/v1
46
+ display_name: DeepSeek Coder V3
47
+ context_tokens: 128000
48
+ output_tokens: 8192
49
+ ```
50
+
51
+ Then `python3 -m pilot_workers.credentials deepseek` and you're done.
52
+
53
+ ## Host integration
54
+
55
+ The **host** is whatever AI agent acts as the planner — Claude, Codex, Gemini, GLM itself, or anything that can write a task file and call the CLI.
56
+
57
+ `integrations/` has ready-made configs for current hosts:
58
+ - **`claude-host/`**: 12 agents + 8 slash commands (`/glm:code`, `/kimi:explore`, etc.)
59
+ - **`codex-host/`**: `$glm` / `$kimi` / `$ds` skill entry points
60
+
61
+ Adding a new host: create `integrations/<name>-host/`, put whatever config your host needs, point it at `python3 -m pilot_workers.cli.run`. See `integrations/README.md`.
62
+
63
+ ## Architecture
64
+
65
+ See [docs/architecture.md](docs/architecture.md) for the shared contract, security model, and verification checklist.
66
+
67
+ ## License
68
+
69
+ MIT
@@ -0,0 +1,39 @@
1
+ [build-system]
2
+ requires = ["setuptools>=68.0"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "pilot-workers"
7
+ version = "0.2.0"
8
+ description = "Dispatch bounded tasks to isolated LLM workers (GLM, Kimi, and more)"
9
+ readme = "README.md"
10
+ license = "MIT"
11
+ requires-python = ">=3.11"
12
+ dependencies = []
13
+
14
+ [project.optional-dependencies]
15
+ yaml = ["pyyaml>=6.0"]
16
+ dev = ["pytest>=8.0", "pyyaml>=6.0"]
17
+
18
+ [project.scripts]
19
+ pilot-workers = "pilot_workers.cli.main:main"
20
+
21
+ [tool.setuptools.packages.find]
22
+ where = ["src"]
23
+
24
+ [tool.setuptools.package-data]
25
+ pilot_workers = [
26
+ "data/providers/*.yaml",
27
+ "data/providers/*.md",
28
+ "data/permissions/*.yaml",
29
+ "data/permissions/*.md",
30
+ "data/templates/*.md",
31
+ "prompts/*.md",
32
+ "integrations/**/*.md",
33
+ "integrations/**/*.yaml",
34
+ "scripts/*.sh",
35
+ ]
36
+
37
+ [tool.pytest.ini_options]
38
+ testpaths = ["tests"]
39
+ pythonpath = ["src"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1 @@
1
+ """pilot-workers: dispatch bounded tasks to isolated LLM workers."""
@@ -0,0 +1,3 @@
1
+ from pilot_workers.cli.main import main
2
+
3
+ raise SystemExit(main())
File without changes