delegation-layer 0.1.17 → 0.1.19
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/README.md +23 -0
- package/package.json +1 -1
- package/plugins/delegation-layer/.claude-plugin/plugin.json +2 -2
- package/plugins/delegation-layer/.codex-plugin/plugin.json +4 -4
- package/plugins/delegation-layer/skills/agent-integration/SKILL.md +133 -163
- package/plugins/delegation-layer/skills/agent-integration/evals/routing.json +203 -0
- package/plugins/delegation-layer/skills/agent-integration/references/ccr.md +33 -0
- package/plugins/delegation-layer/skills/agent-integration/references/command-reference.md +51 -3
- package/plugins/delegation-layer/skills/agent-integration/references/continuation.md +4 -1
- package/plugins/delegation-layer/skills/agent-integration/references/result-handling.md +14 -7
- package/skills/agent-integration/SKILL.md +133 -163
- package/skills/agent-integration/evals/routing.json +203 -0
- package/skills/agent-integration/references/ccr.md +33 -0
- package/skills/agent-integration/references/command-reference.md +51 -3
- package/skills/agent-integration/references/continuation.md +4 -1
- package/skills/agent-integration/references/result-handling.md +14 -7
|
@@ -28,11 +28,11 @@ Dispatch flags:
|
|
|
28
28
|
- `--permission read-only|workspace-write`: read-only investigation or authorized unattended write execution, including commands (not independent containment);
|
|
29
29
|
- `--budget DURATION`: finite turn budget;
|
|
30
30
|
- `--auto`: let the CLI select a ready provider;
|
|
31
|
-
- `--provider ID`:
|
|
32
|
-
- `--model MODEL` and `--effort VALUE`:
|
|
31
|
+
- `--provider ID`: preserve the caller’s named harness or provider, resolved through the catalog;
|
|
32
|
+
- `--model MODEL` and `--effort VALUE`: provider-advertised choices (CCR requires a model alias);
|
|
33
33
|
Codex maps effort to TOML `model_reasoning_effort`, while Claude and AGY
|
|
34
34
|
pass native effort flags; Pi maps effort to `--thinking`; OpenCode maps it to
|
|
35
|
-
`--variant`; `default` is omitted;
|
|
35
|
+
`--variant`; CCR forwards effort to Claude and uses `--model` as a CCR alias; `default` is omitted;
|
|
36
36
|
- `--native-timeout DURATION`: optional provider-native timeout where advertised.
|
|
37
37
|
|
|
38
38
|
Model discovery uses the same `--provider ID` profiles and accepts an optional
|
|
@@ -48,3 +48,51 @@ Continuation flags:
|
|
|
48
48
|
- `--task TASK`: predecessor task ID;
|
|
49
49
|
- `--brief FILE`: optional new follow-up instruction;
|
|
50
50
|
- `--budget DURATION`, `--model MODEL`, and `--effort VALUE`: optional overrides.
|
|
51
|
+
|
|
52
|
+
## Choosing models and effort
|
|
53
|
+
|
|
54
|
+
If the caller needs an explicit model or effort, use the implemented native
|
|
55
|
+
discovery command for that provider:
|
|
56
|
+
|
|
57
|
+
```sh
|
|
58
|
+
delegate models --provider PROVIDER_ID --cwd ABSOLUTE_WORKSPACE --json
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Omit `--cwd` to use the current directory. Run discovery only when the caller
|
|
62
|
+
needs a non-default choice; provider defaults are valid. The command uses the
|
|
63
|
+
state-rooted supervisor and a bounded `model-discovery-v1` five-minute native
|
|
64
|
+
inspection to allow first-run provider model/cache initialization. It creates
|
|
65
|
+
inspection evidence without admitting a provider task, and may contact the
|
|
66
|
+
provider CLI. It is advisory and never an admission allowlist. Do not reject a
|
|
67
|
+
requested value merely because discovery did not list it, and do not infer
|
|
68
|
+
per-model effort support from the harness-wide list. If a selected model has
|
|
69
|
+
`efforts: null` or `efforts: []`, omit `--effort` unless the caller explicitly
|
|
70
|
+
requested it; do not invent model aliases or combine options by guessing.
|
|
71
|
+
|
|
72
|
+
The response includes `schema_version`, `command: "models"`, `provider`,
|
|
73
|
+
`observed_at`, `status`, `reason_code`, `complete`, `source`, nullable
|
|
74
|
+
`efforts`, and model rows with exact `id` values plus optional `name`, nullable
|
|
75
|
+
`efforts`, and optional `default_effort`. `complete` describes model
|
|
76
|
+
enumeration, not effort metadata. `null` means effort metadata is unknown;
|
|
77
|
+
`[]` means the provider explicitly reported no choices. Discovery exits `0`
|
|
78
|
+
for `available` or `partial`, `2` for `blocked` or `unavailable`, and `1` for
|
|
79
|
+
`failed`. Preserve a blocked or unavailable discovery result as unresolved;
|
|
80
|
+
defaults remain allowed.
|
|
81
|
+
|
|
82
|
+
## Checking readiness
|
|
83
|
+
|
|
84
|
+
Use `preflight` when the caller asks about static readiness, rather than as a
|
|
85
|
+
required step before every dispatch:
|
|
86
|
+
|
|
87
|
+
```sh
|
|
88
|
+
delegate preflight --provider PROVIDER_ID --cwd ABSOLUTE_WORKSPACE \
|
|
89
|
+
--permission REQUESTED_MODE --json
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Use `read-only` for investigation or `workspace-write` for authorized edits.
|
|
93
|
+
Supply any required provider options, including `--model ALIAS` for `ccr:print`.
|
|
94
|
+
Preflight does not create a task, start the supervisor, or launch a provider.
|
|
95
|
+
Its result is not proof of live authentication or successful execution. Report
|
|
96
|
+
`blocked` or `unsupported` results; a readiness request does not authorize
|
|
97
|
+
provider configuration changes. Honor `failure.next_action` without probing
|
|
98
|
+
provider CLIs yourself.
|
|
@@ -30,7 +30,10 @@ indefinitely for a publication that the interrupted turn cannot complete.
|
|
|
30
30
|
|
|
31
31
|
The follow-up brief is optional. If it is omitted, Delegation Layer reuses the
|
|
32
32
|
validated predecessor brief. A successful continuation returns a new task ID
|
|
33
|
-
and links it to the predecessor. Observe and collect the new ID separately.
|
|
33
|
+
and links it to the predecessor. Observe and collect the new ID separately. Always retain the original state
|
|
34
|
+
root, even if a returned command hint omits it. Permission is inherited; do not
|
|
35
|
+
add `--permission` to `continue`. Apply the dispatch `task_record` error rules
|
|
36
|
+
in [result handling](result-handling.md) before retrying or observing.
|
|
34
37
|
|
|
35
38
|
`mode` describes the provider contract:
|
|
36
39
|
|
|
@@ -4,10 +4,12 @@ Use the response fields independently. A successful control command is not
|
|
|
4
4
|
the same as a successful provider result.
|
|
5
5
|
|
|
6
6
|
1. Save `task_id` immediately after dispatch or continue.
|
|
7
|
-
2.
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
report
|
|
7
|
+
2. For a dispatch or continue error, inspect `task_record` first. When it is
|
|
8
|
+
`created`, observe the returned ID with `status`. When it is `not_created`,
|
|
9
|
+
do not poll; correct the request only if `failure.next_action` is
|
|
10
|
+
`correct_request`, otherwise report and stop. When it is `unknown`, stop and
|
|
11
|
+
report without polling or retrying. Status and collect can report
|
|
12
|
+
`admission: "unknown"` alongside valid terminal evidence for an existing task.
|
|
11
13
|
3. If `status` is `timed_out`, follow the continuation procedure before treating
|
|
12
14
|
pending publication as a reason to wait. `continuation.resumable: true`
|
|
13
15
|
permits a linked successor even when no outcome has been published.
|
|
@@ -19,9 +21,8 @@ the same as a successful provider result.
|
|
|
19
21
|
observe the same task again with a finite watch interval.
|
|
20
22
|
7. If authentication is `blocked`, preserve that neutral state and tell the
|
|
21
23
|
caller what prerequisite is unavailable without inventing a login command.
|
|
22
|
-
8.
|
|
23
|
-
|
|
24
|
-
uncertain task by guessing.
|
|
24
|
+
8. Never relaunch an uncertain task by guessing. Observe only a task whose
|
|
25
|
+
record is known to exist; the `task_record` decision above takes precedence.
|
|
25
26
|
|
|
26
27
|
For `delegate models`, validate the complete JSON envelope before using any
|
|
27
28
|
fact. Treat `available` and `partial` with exit `0` as observations, preserve
|
|
@@ -35,3 +36,9 @@ model is not an execution guarantee.
|
|
|
35
36
|
Exit codes are bounded control signals: `0` is a completed command, `1` is an
|
|
36
37
|
operational error, `2` is an invalid or unsupported request, `3` is a pending
|
|
37
38
|
collection watch, and `4` is a validated rejected outcome.
|
|
39
|
+
|
|
40
|
+
Catalog facts (`verification: "catalog"`) are not runtime proof. Preflight
|
|
41
|
+
checks static readiness; runtime verification requires the supervised probe.
|
|
42
|
+
Versions and help are observations, not semantic-version allowlists.
|
|
43
|
+
Authentication is a separate live gate (`not_run`, `passed`, or `blocked`).
|
|
44
|
+
Report a blocked prerequisite without inventing a login command or retrying.
|