@wular/coder 0.1.19 → 0.1.20
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.
- package/.claude-plugin/marketplace.json +1 -1
- package/dist/cli.js +110 -107
- package/package.json +1 -1
- package/plugins/claude/.claude-plugin/plugin.json +2 -2
- package/plugins/claude/skills/handle/SKILL.md +5 -3
- package/plugins/codex/.codex-plugin/plugin.json +1 -1
- package/plugins/codex/skills/handle/SKILL.md +4 -8
- package/plugins/cursor/.cursor-plugin/plugin.json +8 -0
- package/plugins/cursor/skills/handle/SKILL.md +46 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "coder",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "Delegate coding tasks to a Coder subagent.
|
|
3
|
+
"version": "0.1.20",
|
|
4
|
+
"description": "Delegate coding tasks to a Coder subagent. Your main context stays clean.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "muzam1l"
|
|
7
7
|
}
|
|
@@ -16,7 +16,7 @@ If `coder` is not on PATH, install it yourself without asking (`npm install -g @
|
|
|
16
16
|
- Compose one self-contained task text (goal, relevant paths, constraints) and dispatch it. It backgrounds by default: the runtime does a startup check and prints a task id (or errors / hands off, see exit codes):
|
|
17
17
|
|
|
18
18
|
```bash
|
|
19
|
-
coder task run "<task text>"
|
|
19
|
+
coder task run --host claude "<task text>"
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
Fetch the answer with `coder task result <task-id> --wait` - it blocks until the task finishes, then prints only the final answer (keeps your context clean). Run it as a **background Bash call** so it does not block you and you are re-invoked on completion:
|
|
@@ -26,8 +26,10 @@ If `coder` is not on PATH, install it yourself without asking (`npm install -g @
|
|
|
26
26
|
```
|
|
27
27
|
|
|
28
28
|
Only use `--wait` when you can run it in a background shell like that; without one, poll `coder task result <task-id>` (no `--wait`) until it is done. Or skip the two steps and block on the run itself with `--wait` on `coder task run`.
|
|
29
|
+
|
|
29
30
|
- A `--wait` (on `run` or `result`) exits **4** when the task is waiting on a permission approval: relay the approval to the user, apply their decision with `coder approve <task-id> <approval-id> [--deny]`, then re-fetch with `coder task result <task-id> --wait`. (Unanswered approvals auto-deny after 120s and the task moves on.)
|
|
30
31
|
|
|
32
|
+
- Always pass `--host claude` to identify yourself.
|
|
31
33
|
- `coder task run` exits after its startup check. Exit 0: the task started - relay the task id and fetch its result (above), BUT if stdout is a `spawn-claude-subagent` payload (Claude is the configured engine), this is a clean delegation - spawn the subagent as below, do not treat it as a result. Exit 1: it failed to start - report it, do not retry or fall back yourself. Exit 3: Codex failed to start and handed off to Claude (see below).
|
|
32
34
|
- Engine, model, and effort come from config; add `--agent` / `--model` / `--effort` when the user asks or it is unambiguous from context (agents: `codex`, `claude`; codex models: `spark`, `luna`, `terra`, `sol`; claude models: `opus`, `sonnet`, `fable`; efforts: `low|medium|high`).
|
|
33
35
|
- `spark` is only for the very lightest tasks (formatting, renames, quick lookups) - very fast and very cheap. It runs on a separate quota, so reach for it when the others hit a usage limit; it may still run once they are exhausted.
|
|
@@ -55,5 +57,5 @@ Relay its output when it completes.
|
|
|
55
57
|
## Hard rules
|
|
56
58
|
|
|
57
59
|
- Forward task text verbatim in `steer` and fallback prompts - never rewrite or summarize what the user asked for.
|
|
58
|
-
-
|
|
59
|
-
-
|
|
60
|
+
- Tell every coder to never run git write operations (commit, checkout, stash, reset, rebase, merge, push, etc.) and to leave changes uncommitted - the Claude subagent prompt already prefixes this, and the runtime's approval policy enforces it for Codex.
|
|
61
|
+
- Pass the user's constraints (read-only, scoped paths) into each coder's task text, and honor them over your own preferences.
|
|
@@ -7,7 +7,7 @@ description: Use Coder for any coding, implementation, or investigation task - f
|
|
|
7
7
|
|
|
8
8
|
You dispatch coding tasks through the `coder` runtime instead of implementing them yourself. By default the runtime picks the engine from its configured chain; `--agent`/`--model`/`--effort` override it. You never spawn agents yourself in this host.
|
|
9
9
|
|
|
10
|
-
If `coder` is not on PATH, install it yourself without asking: `npm install -g @wular/coder`, then `coder host-setup --codex`. Only if that fails, show the user the error and those two commands.
|
|
10
|
+
If `coder` is not on PATH, install it yourself without asking: `npm install -g @wular/coder`, then `coder host-setup --codex`. Only if that fails, show the user the error and those two commands. The configured chain (`coder config`) decides which engine runs first and which is the fallback; set it with `coder config set chain <first>,<second>`. Each engine needs its own CLI; the claude engine needs the claude CLI installed - if it is not, ask the user before installing it (on yes: `npm install -g @anthropic-ai/claude-code`, then have them run `claude` once to log in).
|
|
11
11
|
|
|
12
12
|
When you run setup, also check codex is new enough for the default GPT-5.6 model, which needs codex `>= 0.144` (`codex --version`). If it is older, update it automatically without asking with `codex update` (codex's own updater; fall back to `npm install -g @openai/codex@latest` if it fails), then tell the user to restart their codex session so the update takes effect.
|
|
13
13
|
|
|
@@ -26,11 +26,7 @@ When you run setup, also check codex is new enough for the default GPT-5.6 model
|
|
|
26
26
|
|
|
27
27
|
- Always pass `--host codex` to identify yourself.
|
|
28
28
|
- `coder task run` exits after its startup check. Exit 0: the task started - fetch its result (above). Exit 1: it failed to start / the turn failed - report it, do not retry.
|
|
29
|
-
-
|
|
30
|
-
|
|
31
|
-
```bash
|
|
32
|
-
coder task run --host codex --agent claude "<same task text, verbatim>"
|
|
33
|
-
```
|
|
29
|
+
- When the first engine can't start (auth, quota, rate limit), the runtime automatically falls back to the next engine in the chain, runs the same task on it via CLI, and still exits 0 - so just fetch the result. If the failure mentions a usage-limit reset time, relay that to the user.
|
|
34
30
|
|
|
35
31
|
- Engine, model, and effort come from config; add `--agent` / `--model` / `--effort` when the user asks or it is unambiguous from context (agents: `codex`, `claude`; codex models: `spark`, `luna`, `terra`, `sol`; claude models: `opus`, `sonnet`, `fable`; efforts: `low|medium|high`).
|
|
36
32
|
- `spark` is only for the very lightest tasks (formatting, renames, quick lookups) - very fast and very cheap. It runs on a separate quota, so reach for it when the others hit a usage limit; it may still run once they are exhausted.
|
|
@@ -47,5 +43,5 @@ When you run setup, also check codex is new enough for the default GPT-5.6 model
|
|
|
47
43
|
## Hard rules
|
|
48
44
|
|
|
49
45
|
- Forward task text verbatim in `steer` and retries - never rewrite or summarize what the user asked for.
|
|
50
|
-
-
|
|
51
|
-
-
|
|
46
|
+
- Tell every coder, in its task text, to never run git write operations (commit, checkout, stash, reset, rebase, merge, push, etc.) and to leave changes uncommitted. The runtime's permission model also enforces this on the engines.
|
|
47
|
+
- Pass the user's constraints (read-only, scoped paths) into each coder's task text, and honor them over your own preferences.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: handle
|
|
3
|
+
description: Use Coder for any coding, implementation, or investigation task - features, fixes, refactors, debugging, tests, code questions. You orchestrate, never implement yourself; dispatch through the `coder` CLI, one coder per focused goal, fanning out many coders in parallel as the work needs.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Coder dispatch (Cursor host)
|
|
7
|
+
|
|
8
|
+
You dispatch coding tasks through the `coder` runtime instead of implementing them yourself. By default the runtime picks the engine from its configured chain; `--agent`/`--model`/`--effort` override it. You never spawn agents yourself; the runtime spawns and supervises them.
|
|
9
|
+
|
|
10
|
+
If `coder` is not on PATH, install it yourself without asking: `npm install -g @wular/coder`, then `coder host-setup --cursor`. Only if that fails, show the user the error and those two commands. The engines need their own CLIs: codex (`npm install -g @openai/codex`, then `codex login`) and claude (`npm install -g @anthropic-ai/claude-code`, then run `claude` once to log in) - ask the user before installing an engine CLI. The configured chain (`coder config`) decides which engine runs first and which is the fallback; set it with `coder config set chain <first>,<second>`.
|
|
11
|
+
|
|
12
|
+
When you run setup, also check codex is new enough for the default GPT-5.6 model, which needs codex `>= 0.144` (`codex --version`). If it is older, update it automatically without asking with `codex update` (codex's own updater; fall back to `npm install -g @openai/codex@latest` if it fails), then tell the user to restart their codex session so the update takes effect.
|
|
13
|
+
|
|
14
|
+
## Dispatching a task
|
|
15
|
+
|
|
16
|
+
- `coder` commands are safe to run in the terminal - the runtime is a supervisor: it spawns engines, keeps state in `~/.coder`, and enforces its own OS sandbox and approval policy on the task. If Cursor asks before running terminal commands, approve the `coder` calls (or allowlist the `coder` command).
|
|
17
|
+
- One coder per focused goal. When the work splits into independent parts, decompose it and dispatch each part as its own `coder task run` call - fan out a wide web of coders, not one giant dispatch. Give each coder a self-contained goal with all context - overview, file paths, constraints (read-only, git rules); use `steer` to continue a single coder's thread.
|
|
18
|
+
- Delegation is a hard gate for anything the engine can do itself: do not read source files, investigate, or write code first - no matter how simple the task. Fold into the task text whatever only you have - conversation context, results from tools the engine lacks. The coder worker runs with plugins disabled (no rules, skills, MCP, or connectors), so include any context only a rule or MCP tool of yours produced.
|
|
19
|
+
- Compose one self-contained task text (goal, relevant paths, constraints) and dispatch it. It backgrounds by default: the runtime does a startup check and prints a task id (or errors, see exit codes):
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
coder task run --host cursor "<task text>"
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Fetch the answer with `coder task result <task-id> --wait` - it blocks until the task finishes, then prints only the final result (keeps your context clean). Run it in a **background terminal** so it does not block you; if you can't, poll `coder task result <task-id>` (no `--wait`) until it is done. Or skip the two steps and block on the run itself with `--wait` on `coder task run`. A `--wait` exits **4** when the task is waiting on a permission approval: relay it to the user, apply their decision with `coder task approve <task-id> <approval-id> [--deny]`, then re-fetch with `coder task result <task-id> --wait` (unanswered approvals auto-deny after 120s and the task moves on).
|
|
26
|
+
|
|
27
|
+
- Always pass `--host cursor` to identify yourself.
|
|
28
|
+
- `coder task run` exits after its startup check. Exit 0: the task started - fetch its result (above). Exit 1: it failed to start / the turn failed - report it, do not retry.
|
|
29
|
+
- Codex startup failures (auth, quota, rate limit) fall back to the next engine in the chain automatically - the runtime reruns the same task on the claude engine via its CLI and still exits 0, so just fetch the result. If it mentions a usage-limit reset time, relay that to the user.
|
|
30
|
+
- Engine, model, and effort come from config; add `--agent` / `--model` / `--effort` when the user asks or it is unambiguous from context (agents: `codex`, `claude`; codex models: `spark`, `luna`, `terra`, `sol`; claude models: `opus`, `sonnet`, `fable`; efforts: `low|medium|high`).
|
|
31
|
+
- `spark` is only for the very lightest tasks (formatting, renames, quick lookups) - very fast and very cheap. It runs on a separate quota, so reach for it when the others hit a usage limit; it may still run once they are exhausted.
|
|
32
|
+
- Permissions default to auto mode. Pass `--permissions read-only` when the task is read-only; `--permissions workspace-write` to forbid any escalation beyond the project.
|
|
33
|
+
- A background dispatch prints a task id plus its result/steer/stop commands. Relay them and fetch the result (above) rather than polling.
|
|
34
|
+
|
|
35
|
+
## Controlling tasks
|
|
36
|
+
|
|
37
|
+
- Continue prior work ("keep going", "apply the top fix"): `coder task steer <task-id> "<follow-up>"`.
|
|
38
|
+
- Inspect: `coder task result <task-id>` (status + answer; add `--wait` to block until done) and `coder task list`. (`coder task stream <task-id>` streams the live progress log - to watch/debug in special cases, generally not for you to consume.)
|
|
39
|
+
- Interrupt: `coder task stop <task-id>`.
|
|
40
|
+
- If status shows `pendingApprovals`, surface them to the user; apply their decision with `coder task approve <task-id> <approval-id> [--deny]`.
|
|
41
|
+
|
|
42
|
+
## Hard rules
|
|
43
|
+
|
|
44
|
+
- Forward task text verbatim in `steer` and retries - never rewrite or summarize what the user asked for.
|
|
45
|
+
- Tell every coder, in its task text, to never run git write operations (commit, checkout, stash, reset, rebase, merge, push, etc.) and to leave changes uncommitted. The runtime's permission model also enforces this on the engines.
|
|
46
|
+
- Pass the user's constraints (read-only, scoped paths) into each coder's task text, and honor them over your own preferences.
|