delegate-agent-cli 0.12.0__tar.gz → 0.13.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.
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/CHANGELOG.md +17 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/PKG-INFO +16 -6
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/README.md +15 -5
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/config.example.json +7 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/docs/agent-setup.md +29 -2
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/docs/cli-reference.md +71 -8
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/docs/configuration.md +52 -2
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/docs/development.md +5 -2
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/docs/publishing-checklist.md +1 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/docs/security-model.md +16 -5
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/docs/troubleshooting.md +38 -6
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/docs/worktrees.md +2 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/pyproject.toml +1 -1
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/src/delegate_agent/__init__.py +1 -1
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/src/delegate_agent/argv_builders.py +29 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/src/delegate_agent/argv_utils.py +1 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/src/delegate_agent/bundled_models.py +6 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/src/delegate_agent/cli.py +1 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/src/delegate_agent/cli_parser.py +31 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/src/delegate_agent/command_help.py +56 -5
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/src/delegate_agent/config.py +121 -16
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/src/delegate_agent/constants.py +6 -4
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/src/delegate_agent/describe_payload.py +111 -8
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/src/delegate_agent/harness_events.py +136 -1
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/src/delegate_agent/model_discovery.py +65 -2
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/src/delegate_agent/reasoning.py +63 -1
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/src/delegate_agent/redaction.py +2 -1
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/src/delegate_agent/request_build.py +196 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/src/delegate_agent/request_models.py +3 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/src/delegate_agent/run_registry.py +3 -1
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/src/delegate_agent/workflows/runtime.py +1 -1
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/src/delegate_agent_cli.egg-info/PKG-INFO +16 -6
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/tests/test_capability_commands.py +54 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/tests/test_command_help.py +1 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/tests/test_delegate_help_cli.py +15 -3
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/tests/test_delegate_parser.py +44 -1
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/tests/test_delegate_validation.py +1 -1
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/tests/test_engine_argv.py +330 -1
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/tests/test_harness_events.py +178 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/tests/test_model_discovery.py +106 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/tests/test_model_selection_wave1a.py +85 -2
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/tests/test_model_selection_wave1b.py +2 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/tests/test_reasoning_capabilities.py +61 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/tests/test_run_registry.py +25 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/tests/test_runner_capture.py +50 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/tests/test_slash_passthrough.py +1 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/tests/test_utility_modules.py +7 -2
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/tests/test_workflow_commands.py +98 -1
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/CONTRIBUTING.md +0 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/LICENSE +0 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/MANIFEST.in +0 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/SECURITY.md +0 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/bin/delegate-profile-shim +0 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/bin/delegate.py +0 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/docs/assets/delegate-agent-header.png +0 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/docs/live-runtime.md +0 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/examples/task.claude.json +0 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/examples/task.codex.json +0 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/examples/task.cursor.json +0 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/examples/task.droid.json +0 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/examples/task.grok.json +0 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/examples/task.judge.json +0 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/setup.cfg +0 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/src/delegate_agent/archived_logs.py +0 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/src/delegate_agent/capability_commands.py +0 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/src/delegate_agent/command_errors.py +0 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/src/delegate_agent/config_commands.py +0 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/src/delegate_agent/errors.py +0 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/src/delegate_agent/git_utils.py +0 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/src/delegate_agent/inspection_commands.py +0 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/src/delegate_agent/isolation.py +0 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/src/delegate_agent/json_types.py +0 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/src/delegate_agent/log_output.py +0 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/src/delegate_agent/private_io.py +0 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/src/delegate_agent/profile_commands.py +0 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/src/delegate_agent/profile_guard.py +0 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/src/delegate_agent/profiles.py +0 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/src/delegate_agent/prompt_instructions.py +0 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/src/delegate_agent/prompt_transport.py +0 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/src/delegate_agent/rendering.py +0 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/src/delegate_agent/retention.py +0 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/src/delegate_agent/run_metadata.py +0 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/src/delegate_agent/run_output_commands.py +0 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/src/delegate_agent/run_status.py +0 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/src/delegate_agent/runner.py +0 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/src/delegate_agent/safe_workspace.py +0 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/src/delegate_agent/snapshot_view.py +0 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/src/delegate_agent/wait_cancel_commands.py +0 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/src/delegate_agent/workflows/__init__.py +0 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/src/delegate_agent/workflows/commands.py +0 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/src/delegate_agent/workflows/registry.py +0 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/src/delegate_agent/workflows/schema.py +0 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/src/delegate_agent/workflows/script.py +0 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/src/delegate_agent/worktree_commands.py +0 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/src/delegate_agent/worktree_execution.py +0 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/src/delegate_agent/worktree_gc.py +0 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/src/delegate_agent/worktree_mgmt.py +0 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/src/delegate_agent/worktree_records.py +0 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/src/delegate_agent/worktree_remove.py +0 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/src/delegate_agent/worktree_summary.py +0 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/src/delegate_agent/wsl.py +0 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/src/delegate_agent_cli.egg-info/SOURCES.txt +0 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/src/delegate_agent_cli.egg-info/dependency_links.txt +0 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/src/delegate_agent_cli.egg-info/entry_points.txt +0 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/src/delegate_agent_cli.egg-info/requires.txt +0 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/src/delegate_agent_cli.egg-info/top_level.txt +0 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/tests/test_config_commands.py +0 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/tests/test_delegate_isolation.py +0 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/tests/test_end_to_end_tracking.py +0 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/tests/test_execution_argv_and_prompt.py +0 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/tests/test_execution_dry_run.py +0 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/tests/test_execution_worktree_failure_cleanup.py +0 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/tests/test_execution_worktree_preflight.py +0 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/tests/test_execution_worktree_run.py +0 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/tests/test_inspection_commands.py +0 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/tests/test_kimi_commands.py +0 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/tests/test_packaging.py +0 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/tests/test_profiles.py +0 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/tests/test_retention.py +0 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/tests/test_safe_workspace_isolation.py +0 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/tests/test_snapshot_redaction.py +0 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/tests/test_snapshot_rendering.py +0 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/tests/test_snapshot_run_output.py +0 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/tests/test_snapshot_view.py +0 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/tests/test_wait_cancel_commands.py +0 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/tests/test_wave4_launch_features.py +0 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/tests/test_worktree_list_show.py +0 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/tests/test_worktree_prune_gc.py +0 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/tests/test_worktree_remove.py +0 -0
- {delegate_agent_cli-0.12.0 → delegate_agent_cli-0.13.0}/tests/test_wsl_guardrails.py +0 -0
|
@@ -5,6 +5,21 @@ All notable changes to this project are documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.13.0] - 2026-07-09
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- Added `opencode` as a first-class engine across `safe`, `work`, `call`, and
|
|
13
|
+
workflow runs. OpenCode drives any provider/model in the models.dev catalog
|
|
14
|
+
(75+ providers, plus custom/local providers) through one harness. Safe mode
|
|
15
|
+
and `call --read-only` enforce a deny-all-but-read permission lockdown via
|
|
16
|
+
`OPENCODE_CONFIG_CONTENT` (merges last, beating hostile repo config; verified
|
|
17
|
+
live against v1.17.17 including a git-worktree write-barrier test). Live
|
|
18
|
+
model discovery via `opencode models`, string or `{"model", "variant"}`
|
|
19
|
+
object aliases that can pin a reasoning variant, `--reasoning-effort` mapped
|
|
20
|
+
to OpenCode `--variant`, and per-run `--agent` selection with
|
|
21
|
+
`opencode.defaultAgent` fallback.
|
|
22
|
+
|
|
8
23
|
## [0.12.0] - 2026-07-09
|
|
9
24
|
|
|
10
25
|
Three features in one train: Delegate Workflows (multi-agent orchestration with durable resume), per-run model selection + discovery across all seven engines, and the Devin engine. Model selection was built as the inaugural Delegate Workflows dogfood: three implementation waves plus a twelve-round two-lane adversarial review loop driven through `workflow run --resume`.
|
|
@@ -277,6 +292,8 @@ Usage-audit fix wave: 82 sessions and 1,241 delegate invocations from one week o
|
|
|
277
292
|
|
|
278
293
|
- Releases before 0.1.3 predate this changelog.
|
|
279
294
|
|
|
295
|
+
[0.13.0]: https://github.com/treygoff24/delegate-agent/compare/v0.12.0...v0.13.0
|
|
296
|
+
[0.12.0]: https://github.com/treygoff24/delegate-agent/compare/v0.11.0...v0.12.0
|
|
280
297
|
[0.11.0]: https://github.com/treygoff24/delegate-agent/compare/v0.10.0...v0.11.0
|
|
281
298
|
[0.10.0]: https://github.com/treygoff24/delegate-agent/compare/v0.9.0...v0.10.0
|
|
282
299
|
[0.9.0]: https://github.com/treygoff24/delegate-agent/compare/v0.8.1...v0.9.0
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: delegate-agent-cli
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.13.0
|
|
4
4
|
Summary: A tiny CLI for delegating bounded agent tasks to Cursor, Droid, OpenAI Codex, Claude Code, Grok Build, or Kimi Code runtimes.
|
|
5
5
|
Author: Trey Goff
|
|
6
6
|
License-Expression: MIT
|
|
@@ -37,7 +37,7 @@ Dynamic: license-file
|
|
|
37
37
|
|
|
38
38
|
# Delegate Agent
|
|
39
39
|
|
|
40
|
-
Delegate Agent is a small CLI for handing a bounded task to another coding-agent runtime. It normalizes common calls to Cursor Agent, Factory Droid, OpenAI Codex, Claude Code, Grok Build, Devin, and Kimi Code so humans or other agents can launch review, investigation, and implementation jobs without remembering each tool's flags.
|
|
40
|
+
Delegate Agent is a small CLI for handing a bounded task to another coding-agent runtime. It normalizes common calls to Cursor Agent, Factory Droid, OpenAI Codex, Claude Code, Grok Build, Devin, OpenCode, and Kimi Code so humans or other agents can launch review, investigation, and implementation jobs without remembering each tool's flags.
|
|
41
41
|
|
|
42
42
|
Use it when you want a predictable wrapper around prompts like:
|
|
43
43
|
|
|
@@ -47,7 +47,7 @@ Use it when you want a predictable wrapper around prompts like:
|
|
|
47
47
|
|
|
48
48
|
Delegate does **not** commit, push, merge, deploy, publish, or run a background service. It builds the child command, adds safety framing, launches the selected runtime, and records local run metadata for later inspection.
|
|
49
49
|
|
|
50
|
-
Prompt handling is provider-specific: Codex and
|
|
50
|
+
Prompt handling is provider-specific: Codex, Claude, and OpenCode prompts are delivered to the child
|
|
51
51
|
runtime over stdin; Droid, Grok, and Devin prompts are delivered through private
|
|
52
52
|
temporary prompt files; Cursor Agent and Kimi Code currently
|
|
53
53
|
require prompt argv. Delegate redacts Cursor and Kimi prompt argv in dry-run
|
|
@@ -98,11 +98,16 @@ command -v codex # OpenAI Codex CLI, used by delegate codex ...
|
|
|
98
98
|
command -v claude # Claude Code CLI, used by delegate claude ...
|
|
99
99
|
command -v grok # xAI Grok Build CLI, used by delegate grok ...
|
|
100
100
|
command -v devin # Cognition Devin CLI, used by delegate devin ...
|
|
101
|
+
command -v opencode # OpenCode CLI, used by delegate opencode ...
|
|
101
102
|
command -v kimi # Kimi Code CLI, used by delegate kimi ...
|
|
102
103
|
```
|
|
103
104
|
|
|
104
105
|
Runtime authentication is owned by each child CLI. Delegate cannot log in for you. Dry-runs and CI tests do not require the real child binaries.
|
|
105
106
|
|
|
107
|
+
Install OpenCode from [opencode.ai](https://opencode.ai). Its curl installer
|
|
108
|
+
normally writes the binary to `~/.opencode/bin`, which may not be on `PATH`.
|
|
109
|
+
Extend `PATH` or set `opencode.binary` to the absolute binary path.
|
|
110
|
+
|
|
106
111
|
Initialize a starter config and replace placeholder Droid model IDs before real Droid runs:
|
|
107
112
|
|
|
108
113
|
```bash
|
|
@@ -125,6 +130,7 @@ delegate --json describe
|
|
|
125
130
|
delegate --json models
|
|
126
131
|
delegate --json models codex # per-engine advisory catalog
|
|
127
132
|
delegate --json models cursor --live # merge live harness probe when supported
|
|
133
|
+
delegate --json models opencode --live # query every model visible to OpenCode
|
|
128
134
|
delegate --json capabilities
|
|
129
135
|
```
|
|
130
136
|
|
|
@@ -148,6 +154,7 @@ Preview the command without launching a child runtime:
|
|
|
148
154
|
```bash
|
|
149
155
|
delegate --json dry-run codex safe "Review this repository. Do not edit files."
|
|
150
156
|
delegate --json dry-run claude safe "Review this repository. Do not edit files."
|
|
157
|
+
delegate --json dry-run opencode safe "Review this repository. Do not edit files."
|
|
151
158
|
```
|
|
152
159
|
|
|
153
160
|
Run a read-only review in an isolated throwaway workspace:
|
|
@@ -157,6 +164,7 @@ delegate codex safe "Review this repository for correctness risks. Do not edit f
|
|
|
157
164
|
delegate claude safe "Review this repository for correctness risks. Do not edit files."
|
|
158
165
|
delegate grok safe "Review this repository for correctness risks. Do not edit files."
|
|
159
166
|
delegate devin safe "Review this repository for correctness risks. Do not edit files."
|
|
167
|
+
delegate opencode safe "Review this repository for correctness risks. Do not edit files."
|
|
160
168
|
delegate cursor safe "Review the current diff for regressions. Do not edit files."
|
|
161
169
|
delegate kimi safe "Review this repository for regressions. Do not edit files."
|
|
162
170
|
```
|
|
@@ -174,6 +182,7 @@ Run an edit-capable task in a workspace you trust:
|
|
|
174
182
|
delegate cursor work "Fix the parser bug. Run python3 -m unittest tests.test_delegate_parser. Report changed files."
|
|
175
183
|
delegate claude work "Implement the scoped change and run the named check. Report changed files."
|
|
176
184
|
delegate devin work "Implement the scoped change and run the named check. Report changed files."
|
|
185
|
+
delegate opencode work "Implement the scoped change and run the named check. Report changed files."
|
|
177
186
|
delegate kimi work "Implement the scoped change and run the named check. Report changed files."
|
|
178
187
|
```
|
|
179
188
|
|
|
@@ -227,7 +236,7 @@ python3 bin/delegate.py workflow approve wf_0123abcdef45
|
|
|
227
236
|
See [Delegate Workflows](docs/delegate-workflows.md) for the DSL, safety
|
|
228
237
|
limits, config, and gate semantics.
|
|
229
238
|
|
|
230
|
-
Reasoning effort is provider-aware. Unsupported combinations fail before launch. It changes only the requested model thinking depth/cost/latency; it does not change safe/work/call mode, sandboxing, approvals, or edit capability. Codex/Droid validate effort against model capability metadata, Cursor maps effort to configured model selection, Claude maps to Claude Code `--effort`,
|
|
239
|
+
Reasoning effort is provider-aware. Unsupported combinations fail before launch. It changes only the requested model thinking depth/cost/latency; it does not change safe/work/call mode, sandboxing, approvals, or edit capability. Codex/Droid validate effort against model capability metadata, Cursor maps effort to configured model selection, Claude maps to Claude Code `--effort`, Grok maps to Grok `--effort` (`low`, `medium`, `high`, `xhigh`, `max`), and OpenCode passes it through as `--variant`. Devin and Kimi do not expose a Delegate reasoning-effort flag. Explicit Codex effort can target the harness default model even when `codex.defaultModel` is unset:
|
|
231
240
|
|
|
232
241
|
```bash
|
|
233
242
|
delegate --json dry-run codex safe --reasoning-effort high "Review this repository. Do not edit files."
|
|
@@ -291,9 +300,10 @@ Delegate separates three ideas:
|
|
|
291
300
|
|
|
292
301
|
Defaults are intentionally conservative for review paths:
|
|
293
302
|
|
|
294
|
-
- `delegate cursor safe`, `delegate codex safe`, `delegate claude safe`, `delegate grok safe`, `delegate devin safe`, `delegate droid ALIAS safe`, and `delegate kimi safe` run in an isolated throwaway workspace. Safe mode reviews your **current working tree** — uncommitted tracked edits and untracked, non-ignored files are mirrored into an isolated throwaway copy (only gitignored paths are excluded), so you can review local changes without committing first or pasting a diff.
|
|
303
|
+
- `delegate cursor safe`, `delegate codex safe`, `delegate claude safe`, `delegate grok safe`, `delegate devin safe`, `delegate opencode safe`, `delegate droid ALIAS safe`, and `delegate kimi safe` run in an isolated throwaway workspace. Safe mode reviews your **current working tree** — uncommitted tracked edits and untracked, non-ignored files are mirrored into an isolated throwaway copy (only gitignored paths are excluded), so you can review local changes without committing first or pasting a diff.
|
|
295
304
|
- Grok safe mode uses Delegate isolated copy plus Grok read-only sandbox/permission controls (`--sandbox read-only`, `--permission-mode dontAsk` by default). It does not use Grok `plan` mode. Prompts are delivered via Grok `--prompt-file` from a Delegate temp file.
|
|
296
305
|
- Devin safe mode uses Delegate isolated copy plus a Delegate-generated `--agent-config` deny-list for edit/write/exec and `mcp__*`, with Devin `--permission-mode auto`. Work mode uses Devin `--permission-mode dangerous` because Devin print mode rejects unapproved edit/exec tools.
|
|
306
|
+
- OpenCode safe mode uses Delegate's isolated copy plus an `OPENCODE_CONFIG_CONTENT` permission lockdown that allows only read, glob, and grep operations. OpenCode merges this override last, so repository configuration cannot restore write-capable tools. `opencode call --read-only` uses the same lockdown; plain `call` does not.
|
|
297
307
|
- Claude safe mode invokes `claude -p` with prompt text on stdin, `--permission-mode plan`, `--strict-mcp-config`, Read/Grep/Glob plus selected read-only Bash tools, and `--no-session-persistence` by default. Delegate does not currently prove that Claude Code hooks, plugins, user settings, or other non-MCP customization surfaces are disabled.
|
|
298
308
|
- `work` mode can edit. By default it runs in the real workspace for backward compatibility.
|
|
299
309
|
|
|
@@ -320,7 +330,7 @@ To carry uncommitted local work into the worktree instead of stashing it, add
|
|
|
320
330
|
the worktree through the same snapshot primitives as safe mode, and tears the
|
|
321
331
|
worktree down before launching the child if that sync fails.
|
|
322
332
|
|
|
323
|
-
Safe isolation and `--include-dirty` recreate an untracked symlink only when it is relative, resolves inside the source workspace, and its target is not gitignored; any symlink that fails those checks — an absolute target, an escape out of the tree, or a target that is itself a gitignored secret — is replaced with an inert placeholder file, failing closed on any ambiguity. Delegate reports a warning listing the symlink paths it blocked. In Git repositories with no commits yet, Cursor/Codex/Claude/Droid/Grok/Devin/Kimi safe isolation falls back to a directory copy because Git cannot create a detached worktree from an unborn `HEAD`.
|
|
333
|
+
Safe isolation and `--include-dirty` recreate an untracked symlink only when it is relative, resolves inside the source workspace, and its target is not gitignored; any symlink that fails those checks — an absolute target, an escape out of the tree, or a target that is itself a gitignored secret — is replaced with an inert placeholder file, failing closed on any ambiguity. Delegate reports a warning listing the symlink paths it blocked. In Git repositories with no commits yet, Cursor/Codex/Claude/Droid/Grok/Devin/OpenCode/Kimi safe isolation falls back to a directory copy because Git cannot create a detached worktree from an unborn `HEAD`.
|
|
324
334
|
|
|
325
335
|
Snapshots and `run-output` redact common credential shapes by default, including authorization headers, bearer/basic tokens, JWT-like strings, and common `token=` / `api_key=` / `password=` values. Use `--no-redact` only when exact output is necessary and safe to display.
|
|
326
336
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# Delegate Agent
|
|
6
6
|
|
|
7
|
-
Delegate Agent is a small CLI for handing a bounded task to another coding-agent runtime. It normalizes common calls to Cursor Agent, Factory Droid, OpenAI Codex, Claude Code, Grok Build, Devin, and Kimi Code so humans or other agents can launch review, investigation, and implementation jobs without remembering each tool's flags.
|
|
7
|
+
Delegate Agent is a small CLI for handing a bounded task to another coding-agent runtime. It normalizes common calls to Cursor Agent, Factory Droid, OpenAI Codex, Claude Code, Grok Build, Devin, OpenCode, and Kimi Code so humans or other agents can launch review, investigation, and implementation jobs without remembering each tool's flags.
|
|
8
8
|
|
|
9
9
|
Use it when you want a predictable wrapper around prompts like:
|
|
10
10
|
|
|
@@ -14,7 +14,7 @@ Use it when you want a predictable wrapper around prompts like:
|
|
|
14
14
|
|
|
15
15
|
Delegate does **not** commit, push, merge, deploy, publish, or run a background service. It builds the child command, adds safety framing, launches the selected runtime, and records local run metadata for later inspection.
|
|
16
16
|
|
|
17
|
-
Prompt handling is provider-specific: Codex and
|
|
17
|
+
Prompt handling is provider-specific: Codex, Claude, and OpenCode prompts are delivered to the child
|
|
18
18
|
runtime over stdin; Droid, Grok, and Devin prompts are delivered through private
|
|
19
19
|
temporary prompt files; Cursor Agent and Kimi Code currently
|
|
20
20
|
require prompt argv. Delegate redacts Cursor and Kimi prompt argv in dry-run
|
|
@@ -65,11 +65,16 @@ command -v codex # OpenAI Codex CLI, used by delegate codex ...
|
|
|
65
65
|
command -v claude # Claude Code CLI, used by delegate claude ...
|
|
66
66
|
command -v grok # xAI Grok Build CLI, used by delegate grok ...
|
|
67
67
|
command -v devin # Cognition Devin CLI, used by delegate devin ...
|
|
68
|
+
command -v opencode # OpenCode CLI, used by delegate opencode ...
|
|
68
69
|
command -v kimi # Kimi Code CLI, used by delegate kimi ...
|
|
69
70
|
```
|
|
70
71
|
|
|
71
72
|
Runtime authentication is owned by each child CLI. Delegate cannot log in for you. Dry-runs and CI tests do not require the real child binaries.
|
|
72
73
|
|
|
74
|
+
Install OpenCode from [opencode.ai](https://opencode.ai). Its curl installer
|
|
75
|
+
normally writes the binary to `~/.opencode/bin`, which may not be on `PATH`.
|
|
76
|
+
Extend `PATH` or set `opencode.binary` to the absolute binary path.
|
|
77
|
+
|
|
73
78
|
Initialize a starter config and replace placeholder Droid model IDs before real Droid runs:
|
|
74
79
|
|
|
75
80
|
```bash
|
|
@@ -92,6 +97,7 @@ delegate --json describe
|
|
|
92
97
|
delegate --json models
|
|
93
98
|
delegate --json models codex # per-engine advisory catalog
|
|
94
99
|
delegate --json models cursor --live # merge live harness probe when supported
|
|
100
|
+
delegate --json models opencode --live # query every model visible to OpenCode
|
|
95
101
|
delegate --json capabilities
|
|
96
102
|
```
|
|
97
103
|
|
|
@@ -115,6 +121,7 @@ Preview the command without launching a child runtime:
|
|
|
115
121
|
```bash
|
|
116
122
|
delegate --json dry-run codex safe "Review this repository. Do not edit files."
|
|
117
123
|
delegate --json dry-run claude safe "Review this repository. Do not edit files."
|
|
124
|
+
delegate --json dry-run opencode safe "Review this repository. Do not edit files."
|
|
118
125
|
```
|
|
119
126
|
|
|
120
127
|
Run a read-only review in an isolated throwaway workspace:
|
|
@@ -124,6 +131,7 @@ delegate codex safe "Review this repository for correctness risks. Do not edit f
|
|
|
124
131
|
delegate claude safe "Review this repository for correctness risks. Do not edit files."
|
|
125
132
|
delegate grok safe "Review this repository for correctness risks. Do not edit files."
|
|
126
133
|
delegate devin safe "Review this repository for correctness risks. Do not edit files."
|
|
134
|
+
delegate opencode safe "Review this repository for correctness risks. Do not edit files."
|
|
127
135
|
delegate cursor safe "Review the current diff for regressions. Do not edit files."
|
|
128
136
|
delegate kimi safe "Review this repository for regressions. Do not edit files."
|
|
129
137
|
```
|
|
@@ -141,6 +149,7 @@ Run an edit-capable task in a workspace you trust:
|
|
|
141
149
|
delegate cursor work "Fix the parser bug. Run python3 -m unittest tests.test_delegate_parser. Report changed files."
|
|
142
150
|
delegate claude work "Implement the scoped change and run the named check. Report changed files."
|
|
143
151
|
delegate devin work "Implement the scoped change and run the named check. Report changed files."
|
|
152
|
+
delegate opencode work "Implement the scoped change and run the named check. Report changed files."
|
|
144
153
|
delegate kimi work "Implement the scoped change and run the named check. Report changed files."
|
|
145
154
|
```
|
|
146
155
|
|
|
@@ -194,7 +203,7 @@ python3 bin/delegate.py workflow approve wf_0123abcdef45
|
|
|
194
203
|
See [Delegate Workflows](docs/delegate-workflows.md) for the DSL, safety
|
|
195
204
|
limits, config, and gate semantics.
|
|
196
205
|
|
|
197
|
-
Reasoning effort is provider-aware. Unsupported combinations fail before launch. It changes only the requested model thinking depth/cost/latency; it does not change safe/work/call mode, sandboxing, approvals, or edit capability. Codex/Droid validate effort against model capability metadata, Cursor maps effort to configured model selection, Claude maps to Claude Code `--effort`,
|
|
206
|
+
Reasoning effort is provider-aware. Unsupported combinations fail before launch. It changes only the requested model thinking depth/cost/latency; it does not change safe/work/call mode, sandboxing, approvals, or edit capability. Codex/Droid validate effort against model capability metadata, Cursor maps effort to configured model selection, Claude maps to Claude Code `--effort`, Grok maps to Grok `--effort` (`low`, `medium`, `high`, `xhigh`, `max`), and OpenCode passes it through as `--variant`. Devin and Kimi do not expose a Delegate reasoning-effort flag. Explicit Codex effort can target the harness default model even when `codex.defaultModel` is unset:
|
|
198
207
|
|
|
199
208
|
```bash
|
|
200
209
|
delegate --json dry-run codex safe --reasoning-effort high "Review this repository. Do not edit files."
|
|
@@ -258,9 +267,10 @@ Delegate separates three ideas:
|
|
|
258
267
|
|
|
259
268
|
Defaults are intentionally conservative for review paths:
|
|
260
269
|
|
|
261
|
-
- `delegate cursor safe`, `delegate codex safe`, `delegate claude safe`, `delegate grok safe`, `delegate devin safe`, `delegate droid ALIAS safe`, and `delegate kimi safe` run in an isolated throwaway workspace. Safe mode reviews your **current working tree** — uncommitted tracked edits and untracked, non-ignored files are mirrored into an isolated throwaway copy (only gitignored paths are excluded), so you can review local changes without committing first or pasting a diff.
|
|
270
|
+
- `delegate cursor safe`, `delegate codex safe`, `delegate claude safe`, `delegate grok safe`, `delegate devin safe`, `delegate opencode safe`, `delegate droid ALIAS safe`, and `delegate kimi safe` run in an isolated throwaway workspace. Safe mode reviews your **current working tree** — uncommitted tracked edits and untracked, non-ignored files are mirrored into an isolated throwaway copy (only gitignored paths are excluded), so you can review local changes without committing first or pasting a diff.
|
|
262
271
|
- Grok safe mode uses Delegate isolated copy plus Grok read-only sandbox/permission controls (`--sandbox read-only`, `--permission-mode dontAsk` by default). It does not use Grok `plan` mode. Prompts are delivered via Grok `--prompt-file` from a Delegate temp file.
|
|
263
272
|
- Devin safe mode uses Delegate isolated copy plus a Delegate-generated `--agent-config` deny-list for edit/write/exec and `mcp__*`, with Devin `--permission-mode auto`. Work mode uses Devin `--permission-mode dangerous` because Devin print mode rejects unapproved edit/exec tools.
|
|
273
|
+
- OpenCode safe mode uses Delegate's isolated copy plus an `OPENCODE_CONFIG_CONTENT` permission lockdown that allows only read, glob, and grep operations. OpenCode merges this override last, so repository configuration cannot restore write-capable tools. `opencode call --read-only` uses the same lockdown; plain `call` does not.
|
|
264
274
|
- Claude safe mode invokes `claude -p` with prompt text on stdin, `--permission-mode plan`, `--strict-mcp-config`, Read/Grep/Glob plus selected read-only Bash tools, and `--no-session-persistence` by default. Delegate does not currently prove that Claude Code hooks, plugins, user settings, or other non-MCP customization surfaces are disabled.
|
|
265
275
|
- `work` mode can edit. By default it runs in the real workspace for backward compatibility.
|
|
266
276
|
|
|
@@ -287,7 +297,7 @@ To carry uncommitted local work into the worktree instead of stashing it, add
|
|
|
287
297
|
the worktree through the same snapshot primitives as safe mode, and tears the
|
|
288
298
|
worktree down before launching the child if that sync fails.
|
|
289
299
|
|
|
290
|
-
Safe isolation and `--include-dirty` recreate an untracked symlink only when it is relative, resolves inside the source workspace, and its target is not gitignored; any symlink that fails those checks — an absolute target, an escape out of the tree, or a target that is itself a gitignored secret — is replaced with an inert placeholder file, failing closed on any ambiguity. Delegate reports a warning listing the symlink paths it blocked. In Git repositories with no commits yet, Cursor/Codex/Claude/Droid/Grok/Devin/Kimi safe isolation falls back to a directory copy because Git cannot create a detached worktree from an unborn `HEAD`.
|
|
300
|
+
Safe isolation and `--include-dirty` recreate an untracked symlink only when it is relative, resolves inside the source workspace, and its target is not gitignored; any symlink that fails those checks — an absolute target, an escape out of the tree, or a target that is itself a gitignored secret — is replaced with an inert placeholder file, failing closed on any ambiguity. Delegate reports a warning listing the symlink paths it blocked. In Git repositories with no commits yet, Cursor/Codex/Claude/Droid/Grok/Devin/OpenCode/Kimi safe isolation falls back to a directory copy because Git cannot create a detached worktree from an unborn `HEAD`.
|
|
291
301
|
|
|
292
302
|
Snapshots and `run-output` redact common credential shapes by default, including authorization headers, bearer/basic tokens, JWT-like strings, and common `token=` / `api_key=` / `password=` values. Use `--no-redact` only when exact output is necessary and safe to display.
|
|
293
303
|
|
|
@@ -86,6 +86,13 @@
|
|
|
86
86
|
"defaultModel": "swe-1.7",
|
|
87
87
|
"defaultReasoningEffort": null
|
|
88
88
|
},
|
|
89
|
+
"opencode": {
|
|
90
|
+
"binary": "opencode",
|
|
91
|
+
"defaultModel": null,
|
|
92
|
+
"defaultReasoningEffort": null,
|
|
93
|
+
"defaultAgent": null,
|
|
94
|
+
"models": {}
|
|
95
|
+
},
|
|
89
96
|
"kimi": {
|
|
90
97
|
"binary": "kimi",
|
|
91
98
|
"defaultModel": "kimi-code/kimi-for-coding",
|
|
@@ -36,6 +36,8 @@ This guide covers both human setup and non-interactive setup for agents or CI jo
|
|
|
36
36
|
command -v codex || echo "Codex CLI missing"
|
|
37
37
|
command -v claude || echo "Claude Code CLI missing"
|
|
38
38
|
command -v grok || echo "Grok Build CLI missing"
|
|
39
|
+
command -v devin || echo "Devin CLI missing"
|
|
40
|
+
command -v opencode || echo "OpenCode CLI missing"
|
|
39
41
|
command -v kimi || echo "Kimi Code CLI missing"
|
|
40
42
|
```
|
|
41
43
|
|
|
@@ -94,12 +96,33 @@ When running on Windows through WSL, treat Delegate as a Linux CLI:
|
|
|
94
96
|
delegate --json dry-run claude safe --reasoning-effort high "Review only. Do not edit files."
|
|
95
97
|
delegate --json dry-run grok safe "Review only. Do not edit files."
|
|
96
98
|
delegate --json dry-run grok safe --reasoning-effort high "Review only. Do not edit files."
|
|
99
|
+
delegate --json dry-run devin safe "Review only. Do not edit files."
|
|
100
|
+
delegate --json dry-run opencode safe "Review only. Do not edit files."
|
|
101
|
+
delegate --json dry-run opencode safe --reasoning-effort high "Review only. Do not edit files."
|
|
97
102
|
delegate --json dry-run cursor safe "Review only. Do not edit files."
|
|
98
103
|
delegate --json dry-run droid reviewer safe "Review only. Do not edit files."
|
|
99
104
|
delegate --json dry-run kimi safe "Review only. Do not edit files."
|
|
100
105
|
```
|
|
101
106
|
|
|
102
|
-
The Codex, Claude, Grok, Cursor, and Kimi dry-runs succeed with the unedited example config when no reasoning effort is requested. Explicit Codex reasoning-effort dry-runs can target the harness default model when no default model is configured. Claude and Grok reasoning effort map to native `--effort` flags. The Droid dry-run validates the alias, so it returns `unconfigured_model` until you replace the `reviewer` placeholder in `config.json` with a real model ID.
|
|
107
|
+
The Codex, Claude, Grok, Devin, OpenCode, Cursor, and Kimi dry-runs succeed with the unedited example config when no reasoning effort is requested. Explicit Codex reasoning-effort dry-runs can target the harness default model when no default model is configured. Claude and Grok reasoning effort map to native `--effort` flags; OpenCode reasoning effort maps to `--variant` without model validation. The Droid dry-run validates the alias, so it returns `unconfigured_model` until you replace the `reviewer` placeholder in `config.json` with a real model ID.
|
|
108
|
+
|
|
109
|
+
### OpenCode
|
|
110
|
+
|
|
111
|
+
Install OpenCode with the curl installer from [opencode.ai](https://opencode.ai).
|
|
112
|
+
The installer normally writes the binary to `~/.opencode/bin`, which is often
|
|
113
|
+
not on `PATH` in non-interactive shells. Add that directory to `PATH`, or set an
|
|
114
|
+
absolute path in Delegate config:
|
|
115
|
+
|
|
116
|
+
```json
|
|
117
|
+
{
|
|
118
|
+
"opencode": {
|
|
119
|
+
"binary": "/home/<user>/.opencode/bin/opencode"
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
Run `opencode auth login` before the first real launch. Delegate uses OpenCode's
|
|
125
|
+
existing global authentication state and does not manage login itself.
|
|
103
126
|
|
|
104
127
|
## Non-interactive agent setup
|
|
105
128
|
|
|
@@ -141,6 +164,8 @@ For an orchestrating agent, script, or CI job:
|
|
|
141
164
|
command -v codex >/dev/null || exit 3
|
|
142
165
|
command -v claude >/dev/null || exit 3
|
|
143
166
|
command -v grok >/dev/null || exit 3
|
|
167
|
+
command -v devin >/dev/null || exit 3
|
|
168
|
+
command -v opencode >/dev/null || exit 3
|
|
144
169
|
command -v kimi >/dev/null || exit 3
|
|
145
170
|
```
|
|
146
171
|
|
|
@@ -166,7 +191,9 @@ For an orchestrating agent, script, or CI job:
|
|
|
166
191
|
|
|
167
192
|
## CI expectations
|
|
168
193
|
|
|
169
|
-
The required test suite does not need real Cursor, Droid, Codex, Claude,
|
|
194
|
+
The required test suite does not need real Cursor, Droid, Codex, Claude, Grok,
|
|
195
|
+
Devin, OpenCode, or Kimi binaries. Tests use dry-run paths and fake binaries
|
|
196
|
+
where needed:
|
|
170
197
|
|
|
171
198
|
```bash
|
|
172
199
|
python3 -m compileall -q src tests bin
|
|
@@ -40,13 +40,17 @@ delegate grok safe [--model <alias-or-model>] [--reasoning-effort LEVEL] [--prog
|
|
|
40
40
|
delegate grok work [--model <alias-or-model>] [--reasoning-effort LEVEL] [--progress] [--forbid-commit] [--prompt-file PATH] [prompt...]
|
|
41
41
|
delegate grok call [--read-only] [--model <alias-or-model>] [--reasoning-effort LEVEL] [--prompt-file PATH] [prompt...]
|
|
42
42
|
|
|
43
|
+
delegate opencode safe [--model <alias-or-model>] [--reasoning-effort LEVEL] [--agent NAME] [--progress] [--forbid-commit] [--prompt-file PATH] [prompt...]
|
|
44
|
+
delegate opencode work [--model <alias-or-model>] [--reasoning-effort LEVEL] [--agent NAME] [--progress] [--forbid-commit] [--prompt-file PATH] [prompt...]
|
|
45
|
+
delegate opencode call [--read-only] [--model <alias-or-model>] [--reasoning-effort LEVEL] [--agent NAME] [--prompt-file PATH] [prompt...]
|
|
46
|
+
|
|
43
47
|
delegate kimi safe [--model <alias-or-model>] [--reasoning-effort LEVEL] [--progress] [--forbid-commit] [--prompt-file PATH] [prompt...]
|
|
44
48
|
delegate kimi work [--model <alias-or-model>] [--reasoning-effort LEVEL] [--progress] [--forbid-commit] [--prompt-file PATH] [prompt...]
|
|
45
49
|
delegate kimi call [--read-only] [--model <alias-or-model>] [--reasoning-effort LEVEL] [--prompt-file PATH] [prompt...]
|
|
46
50
|
```
|
|
47
51
|
|
|
48
52
|
Prompt sources are direct arguments, `--prompt-file`, or Delegate stdin. Raw C0 control characters other than newline, carriage return, and tab are stripped before launch; a prompt that becomes empty fails fast. After
|
|
49
|
-
Delegate resolves the prompt, Codex and
|
|
53
|
+
Delegate resolves the prompt, Codex, Claude, and OpenCode prompts are passed to the child runtime over
|
|
50
54
|
stdin. Droid and Grok prompts are written to a private temporary prompt file and passed
|
|
51
55
|
with Droid's documented `--file` option or Grok's `--prompt-file`. Cursor Agent currently only exposes
|
|
52
56
|
positional prompt input, and Kimi Code prompt mode currently uses `--prompt`,
|
|
@@ -68,10 +72,10 @@ matches an alias key; otherwise it is passed through verbatim as a raw model ID
|
|
|
68
72
|
`MODEL_ALIAS` (alias-only/strict); give either the positional or `--model`, not
|
|
69
73
|
both. With neither, Droid uses `droid.defaultModel` when set. Discover aliases
|
|
70
74
|
and advisory catalogs with `delegate models`, `delegate models <engine>`, and
|
|
71
|
-
`delegate models <engine> --live` (live probes for cursor/droid/devin; other
|
|
75
|
+
`delegate models <engine> --live` (live probes for cursor/droid/devin/opencode; other
|
|
72
76
|
engines report live unsupported).
|
|
73
77
|
|
|
74
|
-
`--reasoning-effort LEVEL` is optional and parsed only before prompt text begins.
|
|
78
|
+
`--reasoning-effort LEVEL` is optional and parsed only before prompt text begins. Engines with capability metadata reject unsupported model/effort pairs before launch with `unsupported_reasoning_effort`. It affects only model reasoning depth, cost, or latency; it does not change `safe`/`work`/`call` permissions, sandboxing, approvals, network policy, or edit capability. Cursor effort is model-selection based and requires `cursor.reasoningEffortModels`; an explicit `--model` wins over effort→model routing. Droid emits `--reasoning-effort LEVEL`; Codex emits a `model_reasoning_effort` config override for the resolved model, or for the Codex harness default model when no `codex.defaultModel` is configured and the request was explicit; Claude emits Claude Code `--effort LEVEL`; Grok emits Grok `--effort LEVEL` (`low`, `medium`, `high`, `xhigh`, `max`); OpenCode emits `--variant LEVEL` without validating it against the selected model. Kimi does not support reasoning effort in v1.
|
|
75
79
|
|
|
76
80
|
`--progress` enables parent progress heartbeats on stderr for tracked foreground
|
|
77
81
|
runs. `--no-progress` disables them even when `progress.enabled` is true in
|
|
@@ -140,7 +144,7 @@ delegate [--json] [--isolation auto|none|worktree] codex {safe,work,call} [--mod
|
|
|
140
144
|
- Prompt text is delivered on stdin to `codex exec`; dry-run argv and tracked run manifests do not contain the prompt.
|
|
141
145
|
- Model selection uses `--model` (alias from `codex.models` or a raw model ID), the run-input JSON `model`, or `codex.defaultModel`.
|
|
142
146
|
- `--reasoning-effort` maps to a Codex `model_reasoning_effort` config override after the model is resolved.
|
|
143
|
-
- `--output-schema FILE` is **codex-only**.
|
|
147
|
+
- `--output-schema FILE` is **codex-only**. Every other engine rejects it. `FILE` is a path to a JSON Schema that OpenAI enforces on Codex's final message, for machine-parseable output in fan-outs and JSON run input. Relative paths resolve against the process launch cwd, the same rule as `--prompt-file`. When set, Delegate suppresses the completion-report prompt injection for that run so the schema owns the whole final message. Missing or unreadable files fail fast before launch.
|
|
144
148
|
|
|
145
149
|
Examples:
|
|
146
150
|
|
|
@@ -202,6 +206,65 @@ delegate grok call "Summarize this context in three bullets."
|
|
|
202
206
|
delegate --isolation worktree grok work "Implement the feature in a persistent worktree."
|
|
203
207
|
```
|
|
204
208
|
|
|
209
|
+
### `delegate opencode`
|
|
210
|
+
|
|
211
|
+
Wraps OpenCode's non-interactive `run` command.
|
|
212
|
+
|
|
213
|
+
```bash
|
|
214
|
+
delegate [--json] [--isolation auto|none|worktree] opencode {safe,work} [--model <alias-or-model>] [--reasoning-effort LEVEL] [--agent NAME] [--progress] [--forbid-commit] [--prompt-file PATH] [prompt...]
|
|
215
|
+
delegate [--json] opencode call [--read-only] [--model <alias-or-model>] [--reasoning-effort LEVEL] [--agent NAME] [--prompt-file PATH] [prompt...]
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
- Safe mode reviews the current working tree in an isolated throwaway copy. It
|
|
219
|
+
injects an `OPENCODE_CONFIG_CONTENT` permission lockdown that allows only
|
|
220
|
+
read, glob, and grep operations; OpenCode merges the override last, so a
|
|
221
|
+
repository config cannot restore write-capable tools. `call --read-only`
|
|
222
|
+
uses the same lockdown. Plain `call` has no permission lockdown.
|
|
223
|
+
- Prompt text is delivered on stdin. The child argv starts with `opencode run
|
|
224
|
+
--format json --print-logs --dir <workspace>`; work mode adds `--auto`, while
|
|
225
|
+
safe and call modes do not.
|
|
226
|
+
- Model selection uses `--model`, the run-input JSON `model`, or
|
|
227
|
+
`opencode.defaultModel`. IDs use OpenCode's `provider/model` form and pass
|
|
228
|
+
through verbatim. An `opencode.models` alias may be a model string or an
|
|
229
|
+
object that pins both model and variant:
|
|
230
|
+
|
|
231
|
+
```json
|
|
232
|
+
{
|
|
233
|
+
"opencode": {
|
|
234
|
+
"models": {
|
|
235
|
+
"sonnet": "anthropic/claude-sonnet-4-5",
|
|
236
|
+
"sonnet-high": {
|
|
237
|
+
"model": "anthropic/claude-sonnet-4-5",
|
|
238
|
+
"variant": "high"
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
- `--reasoning-effort LEVEL` maps directly to OpenCode `--variant LEVEL` and
|
|
246
|
+
overrides an alias-pinned variant. OpenCode silently ignores bogus variant
|
|
247
|
+
names, so a typo can have no effect.
|
|
248
|
+
- `--agent NAME` selects an OpenCode agent for one run. With no flag,
|
|
249
|
+
`opencode.defaultAgent` is used when configured.
|
|
250
|
+
- `delegate models opencode --live` runs `opencode --pure models`. Live discovery has
|
|
251
|
+
returned 452+ models and includes any provider in OpenCode's models.dev
|
|
252
|
+
catalog, plus configured custom or local providers.
|
|
253
|
+
- OpenCode is available to workflow `agent()` calls and
|
|
254
|
+
`workflows.engineCaps` like other engines.
|
|
255
|
+
- OpenCode currently buffers stdout until completion, so progress can remain
|
|
256
|
+
silent even though `--print-logs` stderr is visible. Sessions accumulate in
|
|
257
|
+
the user's global OpenCode state. Call mode has no Delegate timeout.
|
|
258
|
+
|
|
259
|
+
Examples:
|
|
260
|
+
|
|
261
|
+
```bash
|
|
262
|
+
delegate opencode safe "Review this repo for regressions; report file/line/severity."
|
|
263
|
+
delegate opencode work --agent build "Implement the scoped task; report changed files and tests."
|
|
264
|
+
delegate opencode call --read-only --model anthropic/claude-sonnet-4-5 --prompt-file rubric.md
|
|
265
|
+
delegate --isolation worktree opencode work "Implement the feature in a persistent worktree."
|
|
266
|
+
```
|
|
267
|
+
|
|
205
268
|
### `delegate kimi`
|
|
206
269
|
|
|
207
270
|
Usage:
|
|
@@ -375,7 +438,7 @@ Typical dry-run JSON fields:
|
|
|
375
438
|
|
|
376
439
|
When a profile is active, dry-run and completion payloads add `authProfile` (the resolved profile name) and, when a Codex fallback profile is configured, `fallbackProfile`. Dry-run also adds `profileEnv` (the injected env map, with values redacted). These keys are omitted when no profile is active.
|
|
377
440
|
|
|
378
|
-
For Cursor, Claude, Grok, Droid, and Kimi safe mode, an explicit `--isolation none`
|
|
441
|
+
For Cursor, Claude, Grok, Devin, OpenCode, Droid, and Kimi safe mode, an explicit `--isolation none`
|
|
379
442
|
is normalized to `auto` with a warning because those safe contracts depend on
|
|
380
443
|
the temporary workspace/config boundary. Codex safe can use `none` because Codex
|
|
381
444
|
still runs with its read-only sandbox.
|
|
@@ -458,11 +521,11 @@ Supported input keys:
|
|
|
458
521
|
}
|
|
459
522
|
```
|
|
460
523
|
|
|
461
|
-
- `engine`: `cursor`, `droid`, `codex`, `claude`, `grok`, `devin`, or `kimi`.
|
|
524
|
+
- `engine`: `cursor`, `droid`, `codex`, `claude`, `grok`, `devin`, `opencode`, or `kimi`.
|
|
462
525
|
- `mode`: `safe`, `work`, or `call`.
|
|
463
526
|
- `model`: optional alias-or-id for every engine. Resolved against `<engine>.models` when it matches an alias; otherwise passed through as a raw model ID. For Droid, a positional alias remains alias-only/strict; JSON/`--model` is alias-or-id. Cursor honors an explicit model even when it differs from `cursor.defaultModel`.
|
|
464
527
|
- `cwd`: optional workspace path. Git directories resolve to the repo root. Omit it for `mode: "call"`, which always uses an empty temporary cwd.
|
|
465
|
-
- `isolation`: optional `auto`, `none`, or `worktree`. `null` is invalid. `mode: "call"` rejects isolation. For Cursor, Claude, Grok, Droid, and Kimi safe mode, `none` is normalized to `auto` with a warning.
|
|
528
|
+
- `isolation`: optional `auto`, `none`, or `worktree`. `null` is invalid. `mode: "call"` rejects isolation. For Cursor, Claude, Grok, Devin, OpenCode, Droid, and Kimi safe mode, `none` is normalized to `auto` with a warning.
|
|
466
529
|
- `reasoningEffort`: optional non-empty effort string. It overrides provider `defaultReasoningEffort` for that JSON run.
|
|
467
530
|
- `progress`: optional boolean. `true` enables parent progress heartbeats on stderr; `false` disables them even when `progress.enabled` is true in config. When omitted, config `progress.enabled` applies (default `false`). `mode: "call"` rejects progress.
|
|
468
531
|
- `forbidCommit`: optional boolean. `true` requires `mode: "work"` with persistent worktree isolation and fails the run if the child creates commits. `mode: "call"` rejects commit policy.
|
|
@@ -490,7 +553,7 @@ delegate --json capabilities refresh
|
|
|
490
553
|
delegate agent-help
|
|
491
554
|
```
|
|
492
555
|
|
|
493
|
-
`describe` reports version, engines, modes, supported isolation values, prompt transforms, effective policy, top-level profile config metadata, and representative argv shapes. It also includes a `commands` catalog derived from the help registry; each full entry includes stable `name`/`command`, usage, arguments, options, and launchOptions fields. Full `describe` is a strict superset of `describe --summary`, so fields present in summary keep the same names in the full payload. `models` reports configured Cursor, Droid, Codex, Claude, Grok, Devin, and Kimi model settings, including non-empty `<engine>.models` alias maps. `models <engine>` returns an advisory per-engine catalog (bundled + config); `--live` merges a harness probe for cursor, droid, and
|
|
556
|
+
`describe` reports version, engines, modes, supported isolation values, prompt transforms, effective policy, top-level profile config metadata, and representative argv shapes. It also includes a `commands` catalog derived from the help registry; each full entry includes stable `name`/`command`, usage, arguments, options, and launchOptions fields. Full `describe` is a strict superset of `describe --summary`, so fields present in summary keep the same names in the full payload. `models` reports configured Cursor, Droid, Codex, Claude, Grok, Devin, OpenCode, and Kimi model settings, including non-empty `<engine>.models` alias maps. `models <engine>` returns an advisory per-engine catalog (bundled + config); `--live` merges a harness probe for cursor, droid, devin, and opencode when available. Discovery output applies best-effort credential scrubbing, so secret-shaped values (including model IDs or paths that resemble credentials) are redacted; copy exact values from your config file rather than from scrubbed output. Agents should start with `--summary` for a compact inventory, then use raw output only when needed.
|
|
494
557
|
|
|
495
558
|
Both `describe` and `models` include provenance fields useful for detecting installed-runtime drift:
|
|
496
559
|
|
|
@@ -109,6 +109,18 @@ layers. This is read-only observability; inspecting it does not modify
|
|
|
109
109
|
"disableWebSearch": true,
|
|
110
110
|
"noSubagents": false
|
|
111
111
|
},
|
|
112
|
+
"devin": {
|
|
113
|
+
"binary": "devin",
|
|
114
|
+
"defaultModel": "swe-1.7",
|
|
115
|
+
"defaultReasoningEffort": null
|
|
116
|
+
},
|
|
117
|
+
"opencode": {
|
|
118
|
+
"binary": "opencode",
|
|
119
|
+
"defaultModel": null,
|
|
120
|
+
"defaultReasoningEffort": null,
|
|
121
|
+
"defaultAgent": null,
|
|
122
|
+
"models": {}
|
|
123
|
+
},
|
|
112
124
|
"kimi": {
|
|
113
125
|
"binary": "kimi",
|
|
114
126
|
"defaultModel": "kimi-code/kimi-for-coding",
|
|
@@ -370,6 +382,44 @@ Controls local run recording.
|
|
|
370
382
|
- `defaultReasoningEffort`: not supported in v1; must be `null`.
|
|
371
383
|
- Discover live Devin model IDs with `delegate models devin --live`.
|
|
372
384
|
|
|
385
|
+
### `opencode`
|
|
386
|
+
|
|
387
|
+
```json
|
|
388
|
+
{
|
|
389
|
+
"opencode": {
|
|
390
|
+
"binary": "opencode",
|
|
391
|
+
"defaultModel": null,
|
|
392
|
+
"defaultReasoningEffort": null,
|
|
393
|
+
"defaultAgent": null,
|
|
394
|
+
"models": {
|
|
395
|
+
"fast": "replace-with-provider/model-id",
|
|
396
|
+
"reviewer": {
|
|
397
|
+
"model": "replace-with-provider/model-id",
|
|
398
|
+
"variant": "high"
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
```
|
|
404
|
+
|
|
405
|
+
- `binary`: path to the OpenCode executable. The curl installer normally writes
|
|
406
|
+
it under `~/.opencode/bin`, so an absolute path is useful when that directory
|
|
407
|
+
is not on `PATH`.
|
|
408
|
+
- `defaultModel`: optional OpenCode `provider/model` ID. `null` lets OpenCode use
|
|
409
|
+
its configured default.
|
|
410
|
+
- `defaultReasoningEffort`: optional OpenCode variant. Delegate emits it as
|
|
411
|
+
`--variant` without model validation; OpenCode silently ignores bogus variants.
|
|
412
|
+
- `defaultAgent`: optional OpenCode agent name used when a run does not pass
|
|
413
|
+
`--agent`.
|
|
414
|
+
- `models`: optional map of local aliases. A value may be a model string or an
|
|
415
|
+
object with `model` and `variant`, which pins that variant to the alias.
|
|
416
|
+
- Delegate rejects OpenCode model, variant, agent, and alias values that start
|
|
417
|
+
with `-` in config and per-run input.
|
|
418
|
+
|
|
419
|
+
`delegate models opencode --live` shells out to `opencode --pure models`. Live
|
|
420
|
+
discovery returns more than 450 `provider/model` IDs and includes any models.dev
|
|
421
|
+
provider, including configured custom or local providers.
|
|
422
|
+
|
|
373
423
|
### `reasoning`
|
|
374
424
|
|
|
375
425
|
```json
|
|
@@ -436,7 +486,7 @@ Supported boolean policy keys: `networkAccess`, `webSearch`, `bypassApprovalsAnd
|
|
|
436
486
|
```
|
|
437
487
|
|
|
438
488
|
Allowed values are `auto`, `none`, and `worktree`. For Cursor, Claude, Grok,
|
|
439
|
-
Droid, and Kimi safe mode, an effective value of `none` is normalized to `auto`
|
|
489
|
+
Devin, OpenCode, Droid, and Kimi safe mode, an effective value of `none` is normalized to `auto`
|
|
440
490
|
because those safe contracts depend on Delegate's temporary workspace/config
|
|
441
491
|
boundary. Explicit per-run CLI/JSON `none` requests also emit a warning; a
|
|
442
492
|
config default is normalized without a separate per-run warning. Codex safe can
|
|
@@ -444,7 +494,7 @@ use `none` because the Codex read-only sandbox remains active.
|
|
|
444
494
|
|
|
445
495
|
Embedded defaults:
|
|
446
496
|
|
|
447
|
-
- `safe`: `auto`. Cursor, Claude, Grok, Droid, Codex, and Kimi safe use temporary workspace isolation by default.
|
|
497
|
+
- `safe`: `auto`. Cursor, Claude, Grok, Devin, OpenCode, Droid, Codex, and Kimi safe use temporary workspace isolation by default.
|
|
448
498
|
- `work`: `none`. Work mode runs in the real workspace unless you opt into worktree isolation.
|
|
449
499
|
|
|
450
500
|
### `worktrees`
|
|
@@ -35,7 +35,9 @@ HOME="$clean_home" DELEGATE_CONFIG="$PWD/config.example.json" python3 bin/delega
|
|
|
35
35
|
HOME="$clean_home" DELEGATE_CONFIG="$PWD/config.example.json" python3 bin/delegate.py --json models
|
|
36
36
|
```
|
|
37
37
|
|
|
38
|
-
Droid real runs require non-placeholder model IDs.
|
|
38
|
+
Droid real runs require non-placeholder model IDs. Dry-runs for Cursor, Droid,
|
|
39
|
+
Codex, Claude, Grok, Devin, OpenCode, and Kimi do not require child binaries.
|
|
40
|
+
OpenCode execution tests use fixtures under `tests/fixtures/opencode/`.
|
|
39
41
|
|
|
40
42
|
## Persistent worktree development
|
|
41
43
|
|
|
@@ -59,4 +61,5 @@ git diff --check
|
|
|
59
61
|
python3 -m unittest discover -s tests
|
|
60
62
|
```
|
|
61
63
|
|
|
62
|
-
Required CI does not need real Cursor, Droid, Codex, Claude,
|
|
64
|
+
Required CI does not need real Cursor, Droid, Codex, Claude, Grok, Devin,
|
|
65
|
+
OpenCode, or Kimi binaries.
|
|
@@ -52,6 +52,7 @@ PyPI packaging is validated and live: `delegate-agent-cli` published 2026-07-06
|
|
|
52
52
|
delegate --json dry-run codex safe "Review only."
|
|
53
53
|
delegate --json dry-run claude safe "Review only."
|
|
54
54
|
delegate --json dry-run grok safe "Review only."
|
|
55
|
+
delegate --json dry-run opencode safe "Review only."
|
|
55
56
|
delegate --json dry-run kimi safe "Review only."
|
|
56
57
|
```
|
|
57
58
|
|