delegation-layer 0.1.25 → 0.1.27

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 CHANGED
@@ -164,7 +164,10 @@ Dispatching a task requires:
164
164
 
165
165
  The release contains the supervisor client and daemon and starts a private
166
166
  instance under the state root, recovering it when a control command finds it
167
- stopped. An explicit `--pueue-config` or
167
+ stopped. A reachable compatible daemon is adopted across CLI upgrades without
168
+ stopping it or rewriting its launch record. An explicit supervisor repair
169
+ command is available for a real logical/configuration migration; it preserves
170
+ active work and the legacy journal. An explicit `--pueue-config` or
168
171
  `DELEGATE_PUEUE_CONFIG` can still select an existing compatible supervisor for
169
172
  advanced integrations. Node.js 18 or newer is needed only for the npm-based
170
173
  installers; it is not a runtime requirement for the released Go CLI. Provider
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "delegation-layer",
3
- "version": "0.1.25",
3
+ "version": "0.1.27",
4
4
  "description": "Multi-provider AI agent delegation CLI and Agent Skill for running bounded coding tasks across provider CLIs.",
5
5
  "keywords": [
6
6
  "ai-agents",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "delegation-layer",
3
3
  "displayName": "Delegation Layer",
4
- "version": "0.1.25",
4
+ "version": "0.1.27",
5
5
  "description": "Consult external AI harnesses and CCR-configured models for reviews, research, implementation, and debate through the resumable Delegate CLI.",
6
6
  "author": {
7
7
  "name": "Hesham Karam",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "delegation-layer",
3
- "version": "0.1.25",
3
+ "version": "0.1.27",
4
4
  "description": "Consult external AI harnesses and CCR-configured models for reviews, research, implementation, and debate through the resumable Delegate CLI.",
5
5
  "author": {
6
6
  "name": "Hesham Karam",
@@ -34,14 +34,27 @@ Do not inspect, authenticate, install, or repair provider CLIs to bypass a
34
34
  Delegate blocker.
35
35
 
36
36
  A reported blocker is a valid final response to a delegation request. It does
37
- not turn that request into an environment-repair task. When a response says
38
- `failure.next_action: "stop_and_report"`, that attempt is finished. Include its
39
- failure in your final response without opening a clarification dialog to choose
40
- a fallback. For `task_record: not_created`, identify the requested destination
41
- and include the saved JSON failure response verbatim. A `task_id` can be returned
42
- even when no task record was created. Do not infer that an unavailable provider
43
- is uninstalled or unauthenticated. Do not append inferred state paths or
44
- provider-setup diagnoses, run diagnostic commands, retry it, or use another integration.
37
+ not turn that request into an environment-repair task. The one lifecycle
38
+ exception is `failure.code: "supervisor_upgrade_required"` with
39
+ `next_action: "run_supervisor_migrate"`: run Delegate's own
40
+ `supervisor migrate` command once with the exact same state root, then retry the
41
+ exact original admission command once only when migration succeeds. Preserve
42
+ its argv and intent: `dispatch` remains `dispatch`, and `continue` remains
43
+ `continue`. The migration response field `next_action: "retry_dispatch"` is a
44
+ protocol name for this command-neutral retry; it never authorizes replacing a
45
+ failed `continue` with a fresh dispatch. This is internal Delegate recovery,
46
+ not Pueue administration. Never run `pueue`, `pueued`, socket inspection,
47
+ process searches, root deletion, or a provider CLI during recovery. Executable
48
+ path or hash drift alone is handled by normal adoption and does not require
49
+ this command.
50
+ When a response says `failure.next_action: "stop_and_report"`, that attempt is
51
+ finished. Include its failure in your final response without opening a
52
+ clarification dialog to choose a fallback. For `task_record: not_created`,
53
+ identify the requested destination and include the saved JSON failure response
54
+ verbatim. A `task_id` can be returned even when no task record was created. Do
55
+ not infer that an unavailable provider is uninstalled or unauthenticated. Do
56
+ not append inferred state paths or provider-setup diagnoses, run diagnostic
57
+ commands, or use another integration.
45
58
  Troubleshooting requires a separate user request. Other independently requested
46
59
  tasks may proceed; the failed attempt must remain reported as failed or blocked.
47
60
 
@@ -77,12 +90,16 @@ tasks may proceed; the failed attempt must remain reported as failed or blocked.
77
90
  foreground until all requested tasks reach a terminal result or an explicit
78
91
  blocker. Do not end a headless turn promising a background notification.
79
92
  Pending publication (exit 3) means keep waiting, not success. When the JSON
93
+ reports `pending.kind: "lifetime-finalization"`, the resident guardian still
94
+ owns cleanup; keep observing that same task without supervisor repair,
95
+ process commands, redispatch, or provider fallback. When the JSON
80
96
  includes an outstanding `interaction.pending_requests` batch, follow
81
97
  [active-task interaction](references/interaction.md) before waiting again. Only detach
82
98
  when the user explicitly requests it, retaining the exact task IDs.
83
- Collection may recover the
84
- saved supervisor only to observe an already-requested budget stop; it never
85
- launches a provider or retries a task.
99
+ Collection may reconcile the saved Pueue binding and recover the guardian
100
+ lifetime only for an already-requested stop. A queue-row end alone cannot
101
+ publish terminal facts; collection never launches a provider or retries a
102
+ task.
86
103
  6. If `failure.next_action` is `recheck`, follow
87
104
  [offline recovery](references/result-handling.md#offline-recovery) once for
88
105
  that task. Rechecking saved evidence does not run the provider again.
@@ -149,7 +166,8 @@ normal task. For an explicitly requested readiness check, see
149
166
  The catalog and `capabilities` response expose supported permission modes,
150
167
  request options, continuation, native interaction, and the read-only mechanism. A read-only
151
168
  capability with `containment: "provider-owned"` selects the provider's native
152
- behavior but is not an independent delegate-owned sandbox. Static discovery
169
+ behavior but is not an independent delegate-owned sandbox. This is separate
170
+ from guardian-owned process-lifetime containment. Static discovery
153
171
  does not prove authentication or live acceptance; use the dispatch or live
154
172
  acceptance result for that evidence.
155
173
 
@@ -267,6 +285,7 @@ for **each attempt**, including requests issued together:
267
285
  | Response | Next action |
268
286
  |---|---|
269
287
  | Usage error, no JSON response | Correct the reported syntax using Delegate help or `providers --json`, then invoke that request again. Parsing failed before admission. |
288
+ | `task_record: not_created`, `failure.code: supervisor_upgrade_required`, and `failure.next_action: run_supervisor_migrate` | Run `delegate --root "<the exact absolute state root used by the failed command>" supervisor migrate --json` once. Retry the exact original admission argv once only after `supervisor_control.state: migrated` and `supervisor_control.next_action: retry_dispatch`; otherwise stop and report the migration response. Preserve an explicit custom root exactly. A failed `continue` must be retried as the same `continue`; never replace it with a fresh `dispatch` or a direct provider call. |
270
289
  | `task_record: not_created` and `failure.next_action: correct_request` | Correct that request and retry it. |
271
290
  | `task_record: not_created` with any other next action | Report that attempt's failure and stop it. Do not diagnose provider setup or substitute an integration. |
272
291
  | `task_record: created` | Use `status` before taking any other action. Do not dispatch again. |
@@ -27,6 +27,11 @@
27
27
  "prompt": "The result says status timed_out and continuation.resumable is true.",
28
28
  "expected": ["delegate continue --task", "new task id", "collect successor", "no fresh unrelated dispatch"]
29
29
  },
30
+ {
31
+ "name": "continue-supervisor-migration",
32
+ "prompt": "An exact-session delegate continue command returned task_record not_created with failure.code supervisor_upgrade_required and failure.next_action run_supervisor_migrate. Migration then returned supervisor_control.state migrated and supervisor_control.next_action retry_dispatch.",
33
+ "expected": ["run same-root supervisor migrate exactly once", "retry the argv-equivalent continue exactly once", "one linked successor", "zero fresh dispatch commands", "zero direct provider calls"]
34
+ },
30
35
  {
31
36
  "name": "blocked-auth",
32
37
  "prompt": "Capability output says live_acceptance.status is blocked.",
@@ -21,6 +21,12 @@ All paths passed to `--root`, `--cwd`, and `--brief` must be absolute. Add
21
21
  | `delegate logs TASK --json` | Return validated output descriptors | No |
22
22
  | `delegate cancel TASK --json` | Record one explicit stop request | Stops, does not relaunch |
23
23
 
24
+ `delegate supervisor migrate --json` is the single command-neutral recovery
25
+ step for a `supervisor_upgrade_required` admission response. Run it once with
26
+ the failed command's exact root. A successful response names its next action
27
+ `retry_dispatch`, but the original command and argv remain authoritative:
28
+ retry `dispatch` as `dispatch` or `continue` as `continue`, exactly once.
29
+
24
30
  The bundled supervisor is managed by the released CLI under the state root.
25
31
  Collection remains observational. Provider authentication remains the
26
32
  provider’s own responsibility and is never performed by this skill.
@@ -105,7 +111,8 @@ delegate preflight --provider PROVIDER_ID --cwd ABSOLUTE_WORKSPACE \
105
111
  ```
106
112
 
107
113
  Use `read-only` for investigation or `workspace-write` for authorized edits.
108
- Supply any required provider options, including `--model ALIAS` for `ccr:print`.
114
+ Supply any required provider options, including `--model ALIAS` for `ccr:print`
115
+ and `--review-target TARGET` for `codex:review`.
109
116
  Preflight does not create a task, start the supervisor, or launch a provider.
110
117
  Its result is not proof of live authentication or successful execution. Report
111
118
  `blocked` or `unsupported` results; a readiness request does not authorize
@@ -32,8 +32,13 @@ 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
33
  and links it to the predecessor. Observe and collect the new ID separately. Always retain the original state
34
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.
35
+ add `--permission` to `continue`. If this exact `continue` returns the
36
+ migration-required `not_created` response, run the same-root supervisor
37
+ migration once and then repeat that argv-equivalent `continue` once after the
38
+ successful migration response. The response field is named `retry_dispatch`,
39
+ but it does not authorize a fresh dispatch. Apply the remaining `task_record`
40
+ error rules in [result handling](result-handling.md) before retrying or
41
+ observing.
37
42
 
38
43
  `mode` describes the provider contract:
39
44
 
@@ -44,6 +49,7 @@ in [result handling](result-handling.md) before retrying or observing.
44
49
 
45
50
  Do not use a guessed session ID, a provider-specific resume command, or a new
46
51
  independent dispatch to recover a timeout. The CLI accepts either a validated
47
- terminal outcome or durable supervisor-ended budget-stop evidence for the
52
+ terminal outcome or a durable Pueue-ended observation backed by a guardian
53
+ lifetime-termination record with independently proven empty scope for the
48
54
  session handoff; without one of those proofs it refuses continuation. Inspect
49
55
  the predecessor again rather than bypassing that boundary.
@@ -5,11 +5,20 @@ the same as a successful provider result.
5
5
 
6
6
  1. Save `task_id` immediately after dispatch or continue.
7
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.
8
+ `created`, observe the returned ID with `status`. Before applying the generic
9
+ `not_created` stop rule, handle the sole migration exception: when
10
+ `failure.code` is `supervisor_upgrade_required` and `failure.next_action` is
11
+ `run_supervisor_migrate`, run `supervisor migrate` once with the same root.
12
+ Only after it reports `supervisor_control.state: "migrated"` and
13
+ `supervisor_control.next_action: "retry_dispatch"`, retry the exact original
14
+ admission argv once. The retry is command-neutral: `dispatch` remains
15
+ `dispatch`, and `continue` remains `continue`; never create a fresh dispatch
16
+ or call a provider directly to replace a failed continuation. For every
17
+ other `not_created` response, do not poll; correct the request only if
18
+ `failure.next_action` is `correct_request`, otherwise report and stop. When
19
+ `task_record` is `unknown`, stop and report without polling or retrying.
20
+ Status and collect can report `admission: "unknown"` alongside valid terminal
21
+ evidence for an existing task.
13
22
  3. If `status` is `timed_out`, follow the continuation procedure before treating
14
23
  pending publication as a reason to wait. `continuation.resumable: true`
15
24
  permits a linked successor even when no outcome has been published.
@@ -19,14 +28,23 @@ the same as a successful provider result.
19
28
  follow [offline recovery](#offline-recovery) once. Otherwise report the
20
29
  terminal rejection with its diagnostic and evidence. Do not redispatch.
21
30
  6. If `pending.kind` is `interaction`, handle the returned questions using
22
- [interaction guidance](interaction.md) before waiting again. Otherwise, if
23
- `liveness` is queued or running or publication is pending, observe the same
24
- task with a finite watch interval.
31
+ [interaction guidance](interaction.md) before waiting again. If
32
+ `pending.kind` is `lifetime-finalization`, the resident guardian still owns
33
+ cleanup; observe the same task with a finite watch interval and do not run
34
+ supervisor or process commands, redispatch, or call the provider directly.
35
+ Otherwise, if `liveness` is queued or running or publication is pending,
36
+ observe the same task with a finite watch interval.
25
37
  7. If authentication is `blocked`, preserve that neutral state and tell the
26
38
  caller what prerequisite is unavailable without inventing a login command.
27
39
  8. Never relaunch an uncertain task by guessing. Observe only a task whose
28
40
  record is known to exist; the `task_record` decision above takes precedence.
29
41
 
42
+ For an `inspect-provider` failure, preserve the optional
43
+ `failure.inspection.class`, `deadline_state`, and `journal_task_id` fields in
44
+ the report. They are bounded diagnostics, not a new recovery instruction.
45
+ Follow `failure.next_action`; do not infer provider authentication or settings
46
+ from an inspection-worker or supervisor-observation failure.
47
+
30
48
  For `delegate models`, validate the complete JSON envelope before using any
31
49
  fact. Treat `available` and `partial` with exit `0` as observations, preserve
32
50
  `blocked` and `unavailable` with exit `2` as unresolved prerequisites, and
@@ -42,6 +60,10 @@ collection watch, and `4` is a validated rejected outcome.
42
60
 
43
61
  Catalog facts (`verification: "catalog"`) are not runtime proof. Preflight
44
62
  checks static readiness; runtime verification requires the supervised probe.
63
+ For managed runtime-only dispatches, admission accepts the static contract and
64
+ the task's runner performs that probe before provider execution. Always collect
65
+ the created task's outcome; `admission: "admitted"` alone does not prove that
66
+ the provider started or completed the work.
45
67
  Versions and help are observations, not semantic-version allowlists.
46
68
  Authentication is a separate live gate (`not_run`, `passed`, or `blocked`).
47
69
  Report a blocked prerequisite without inventing a login command or retrying.
@@ -1 +1 @@
1
- "For work assigned to an external agent, model, or separate harness session, load the installed agent-integration skill before choosing tools and use Delegate. This includes research, implementation, testing, review, consultation, comparison, and debate, including external collaboration you choose. Discover destinations through Delegate. Preserve requested model IDs, effort, and permissions; do not guess ambiguous model identifiers. For task commands, pass --root \"${DELEGATE_ROOT:-$HOME/delegation-state}\" directly in each shell invocation; reuse that root for dispatch, observation, and continuation, never an invented /tmp root. If the user explicitly requests another root, use that exact path consistently. Keep each concurrent request and its response associated separately. Capture each dispatch response and exit status once; after task_record created, observe that task ID. Never dispatch again merely to recover output or inspect its exit status. Naming a CLI identifies the destination, not a request to bypass Delegate. Earlier assistant-generated direct-launch workflows do not override this preference. Native same-harness subagents remain available unless a separate session is requested. Respect an explicit user choice of another integration; otherwise do not substitute provider CLIs, plugins, or APIs after a Delegate blocker. A stop_and_report failure ends that attempt: report it without retrying, diagnosing setup, or offering a fallback. Continue other independent requests. Keep collection in the foreground until completion or a reported blocker unless the user requested detachment. Pending work is observed through Delegate status, collect, or events, not OS process searches or supervisor commands. Merely discussing or configuring a tool is not delegation."
1
+ "For work assigned to an external agent, model, or separate harness session, load the installed agent-integration skill before choosing tools and use Delegate. This includes research, implementation, testing, review, consultation, comparison, and debate, including external collaboration you choose. Discover destinations through Delegate. Preserve requested model IDs, effort, and permissions; do not guess ambiguous model identifiers. For task commands, pass --root \"${DELEGATE_ROOT:-$HOME/delegation-state}\" directly in each shell invocation; reuse that root for dispatch, observation, and continuation, never an invented /tmp root. If the user explicitly requests another root, use that exact path consistently. Keep each concurrent request and its response associated separately. Capture each dispatch response and exit status once; after task_record created, observe that task ID. Never dispatch again merely to recover output or inspect its exit status. Naming a CLI identifies the destination, not a request to bypass Delegate. Earlier assistant-generated direct-launch workflows do not override this preference. Native same-harness subagents remain available unless a separate session is requested. Respect an explicit user choice of another integration; otherwise do not substitute provider CLIs, plugins, or APIs after a Delegate blocker. Before the generic task_record:not_created stop rule, handle only supervisor_upgrade_required with run_supervisor_migrate: migrate the same root once, then retry the exact original admission argv once after migrated/retry_dispatch; dispatch remains dispatch and continue remains continue, with no fresh dispatch or direct provider call replacing a failed continue. A stop_and_report failure ends that attempt: report it without retrying, diagnosing setup, or offering a fallback. Continue other independent requests. Keep collection in the foreground until completion or a reported blocker unless the user requested detachment. Pending work is observed through Delegate status, collect, or events, not OS process searches or supervisor commands. Merely discussing or configuring a tool is not delegation."
@@ -34,14 +34,27 @@ Do not inspect, authenticate, install, or repair provider CLIs to bypass a
34
34
  Delegate blocker.
35
35
 
36
36
  A reported blocker is a valid final response to a delegation request. It does
37
- not turn that request into an environment-repair task. When a response says
38
- `failure.next_action: "stop_and_report"`, that attempt is finished. Include its
39
- failure in your final response without opening a clarification dialog to choose
40
- a fallback. For `task_record: not_created`, identify the requested destination
41
- and include the saved JSON failure response verbatim. A `task_id` can be returned
42
- even when no task record was created. Do not infer that an unavailable provider
43
- is uninstalled or unauthenticated. Do not append inferred state paths or
44
- provider-setup diagnoses, run diagnostic commands, retry it, or use another integration.
37
+ not turn that request into an environment-repair task. The one lifecycle
38
+ exception is `failure.code: "supervisor_upgrade_required"` with
39
+ `next_action: "run_supervisor_migrate"`: run Delegate's own
40
+ `supervisor migrate` command once with the exact same state root, then retry the
41
+ exact original admission command once only when migration succeeds. Preserve
42
+ its argv and intent: `dispatch` remains `dispatch`, and `continue` remains
43
+ `continue`. The migration response field `next_action: "retry_dispatch"` is a
44
+ protocol name for this command-neutral retry; it never authorizes replacing a
45
+ failed `continue` with a fresh dispatch. This is internal Delegate recovery,
46
+ not Pueue administration. Never run `pueue`, `pueued`, socket inspection,
47
+ process searches, root deletion, or a provider CLI during recovery. Executable
48
+ path or hash drift alone is handled by normal adoption and does not require
49
+ this command.
50
+ When a response says `failure.next_action: "stop_and_report"`, that attempt is
51
+ finished. Include its failure in your final response without opening a
52
+ clarification dialog to choose a fallback. For `task_record: not_created`,
53
+ identify the requested destination and include the saved JSON failure response
54
+ verbatim. A `task_id` can be returned even when no task record was created. Do
55
+ not infer that an unavailable provider is uninstalled or unauthenticated. Do
56
+ not append inferred state paths or provider-setup diagnoses, run diagnostic
57
+ commands, or use another integration.
45
58
  Troubleshooting requires a separate user request. Other independently requested
46
59
  tasks may proceed; the failed attempt must remain reported as failed or blocked.
47
60
 
@@ -77,12 +90,16 @@ tasks may proceed; the failed attempt must remain reported as failed or blocked.
77
90
  foreground until all requested tasks reach a terminal result or an explicit
78
91
  blocker. Do not end a headless turn promising a background notification.
79
92
  Pending publication (exit 3) means keep waiting, not success. When the JSON
93
+ reports `pending.kind: "lifetime-finalization"`, the resident guardian still
94
+ owns cleanup; keep observing that same task without supervisor repair,
95
+ process commands, redispatch, or provider fallback. When the JSON
80
96
  includes an outstanding `interaction.pending_requests` batch, follow
81
97
  [active-task interaction](references/interaction.md) before waiting again. Only detach
82
98
  when the user explicitly requests it, retaining the exact task IDs.
83
- Collection may recover the
84
- saved supervisor only to observe an already-requested budget stop; it never
85
- launches a provider or retries a task.
99
+ Collection may reconcile the saved Pueue binding and recover the guardian
100
+ lifetime only for an already-requested stop. A queue-row end alone cannot
101
+ publish terminal facts; collection never launches a provider or retries a
102
+ task.
86
103
  6. If `failure.next_action` is `recheck`, follow
87
104
  [offline recovery](references/result-handling.md#offline-recovery) once for
88
105
  that task. Rechecking saved evidence does not run the provider again.
@@ -149,7 +166,8 @@ normal task. For an explicitly requested readiness check, see
149
166
  The catalog and `capabilities` response expose supported permission modes,
150
167
  request options, continuation, native interaction, and the read-only mechanism. A read-only
151
168
  capability with `containment: "provider-owned"` selects the provider's native
152
- behavior but is not an independent delegate-owned sandbox. Static discovery
169
+ behavior but is not an independent delegate-owned sandbox. This is separate
170
+ from guardian-owned process-lifetime containment. Static discovery
153
171
  does not prove authentication or live acceptance; use the dispatch or live
154
172
  acceptance result for that evidence.
155
173
 
@@ -267,6 +285,7 @@ for **each attempt**, including requests issued together:
267
285
  | Response | Next action |
268
286
  |---|---|
269
287
  | Usage error, no JSON response | Correct the reported syntax using Delegate help or `providers --json`, then invoke that request again. Parsing failed before admission. |
288
+ | `task_record: not_created`, `failure.code: supervisor_upgrade_required`, and `failure.next_action: run_supervisor_migrate` | Run `delegate --root "<the exact absolute state root used by the failed command>" supervisor migrate --json` once. Retry the exact original admission argv once only after `supervisor_control.state: migrated` and `supervisor_control.next_action: retry_dispatch`; otherwise stop and report the migration response. Preserve an explicit custom root exactly. A failed `continue` must be retried as the same `continue`; never replace it with a fresh `dispatch` or a direct provider call. |
270
289
  | `task_record: not_created` and `failure.next_action: correct_request` | Correct that request and retry it. |
271
290
  | `task_record: not_created` with any other next action | Report that attempt's failure and stop it. Do not diagnose provider setup or substitute an integration. |
272
291
  | `task_record: created` | Use `status` before taking any other action. Do not dispatch again. |
@@ -27,6 +27,11 @@
27
27
  "prompt": "The result says status timed_out and continuation.resumable is true.",
28
28
  "expected": ["delegate continue --task", "new task id", "collect successor", "no fresh unrelated dispatch"]
29
29
  },
30
+ {
31
+ "name": "continue-supervisor-migration",
32
+ "prompt": "An exact-session delegate continue command returned task_record not_created with failure.code supervisor_upgrade_required and failure.next_action run_supervisor_migrate. Migration then returned supervisor_control.state migrated and supervisor_control.next_action retry_dispatch.",
33
+ "expected": ["run same-root supervisor migrate exactly once", "retry the argv-equivalent continue exactly once", "one linked successor", "zero fresh dispatch commands", "zero direct provider calls"]
34
+ },
30
35
  {
31
36
  "name": "blocked-auth",
32
37
  "prompt": "Capability output says live_acceptance.status is blocked.",
@@ -21,6 +21,12 @@ All paths passed to `--root`, `--cwd`, and `--brief` must be absolute. Add
21
21
  | `delegate logs TASK --json` | Return validated output descriptors | No |
22
22
  | `delegate cancel TASK --json` | Record one explicit stop request | Stops, does not relaunch |
23
23
 
24
+ `delegate supervisor migrate --json` is the single command-neutral recovery
25
+ step for a `supervisor_upgrade_required` admission response. Run it once with
26
+ the failed command's exact root. A successful response names its next action
27
+ `retry_dispatch`, but the original command and argv remain authoritative:
28
+ retry `dispatch` as `dispatch` or `continue` as `continue`, exactly once.
29
+
24
30
  The bundled supervisor is managed by the released CLI under the state root.
25
31
  Collection remains observational. Provider authentication remains the
26
32
  provider’s own responsibility and is never performed by this skill.
@@ -105,7 +111,8 @@ delegate preflight --provider PROVIDER_ID --cwd ABSOLUTE_WORKSPACE \
105
111
  ```
106
112
 
107
113
  Use `read-only` for investigation or `workspace-write` for authorized edits.
108
- Supply any required provider options, including `--model ALIAS` for `ccr:print`.
114
+ Supply any required provider options, including `--model ALIAS` for `ccr:print`
115
+ and `--review-target TARGET` for `codex:review`.
109
116
  Preflight does not create a task, start the supervisor, or launch a provider.
110
117
  Its result is not proof of live authentication or successful execution. Report
111
118
  `blocked` or `unsupported` results; a readiness request does not authorize
@@ -32,8 +32,13 @@ 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
33
  and links it to the predecessor. Observe and collect the new ID separately. Always retain the original state
34
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.
35
+ add `--permission` to `continue`. If this exact `continue` returns the
36
+ migration-required `not_created` response, run the same-root supervisor
37
+ migration once and then repeat that argv-equivalent `continue` once after the
38
+ successful migration response. The response field is named `retry_dispatch`,
39
+ but it does not authorize a fresh dispatch. Apply the remaining `task_record`
40
+ error rules in [result handling](result-handling.md) before retrying or
41
+ observing.
37
42
 
38
43
  `mode` describes the provider contract:
39
44
 
@@ -44,6 +49,7 @@ in [result handling](result-handling.md) before retrying or observing.
44
49
 
45
50
  Do not use a guessed session ID, a provider-specific resume command, or a new
46
51
  independent dispatch to recover a timeout. The CLI accepts either a validated
47
- terminal outcome or durable supervisor-ended budget-stop evidence for the
52
+ terminal outcome or a durable Pueue-ended observation backed by a guardian
53
+ lifetime-termination record with independently proven empty scope for the
48
54
  session handoff; without one of those proofs it refuses continuation. Inspect
49
55
  the predecessor again rather than bypassing that boundary.
@@ -5,11 +5,20 @@ the same as a successful provider result.
5
5
 
6
6
  1. Save `task_id` immediately after dispatch or continue.
7
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.
8
+ `created`, observe the returned ID with `status`. Before applying the generic
9
+ `not_created` stop rule, handle the sole migration exception: when
10
+ `failure.code` is `supervisor_upgrade_required` and `failure.next_action` is
11
+ `run_supervisor_migrate`, run `supervisor migrate` once with the same root.
12
+ Only after it reports `supervisor_control.state: "migrated"` and
13
+ `supervisor_control.next_action: "retry_dispatch"`, retry the exact original
14
+ admission argv once. The retry is command-neutral: `dispatch` remains
15
+ `dispatch`, and `continue` remains `continue`; never create a fresh dispatch
16
+ or call a provider directly to replace a failed continuation. For every
17
+ other `not_created` response, do not poll; correct the request only if
18
+ `failure.next_action` is `correct_request`, otherwise report and stop. When
19
+ `task_record` is `unknown`, stop and report without polling or retrying.
20
+ Status and collect can report `admission: "unknown"` alongside valid terminal
21
+ evidence for an existing task.
13
22
  3. If `status` is `timed_out`, follow the continuation procedure before treating
14
23
  pending publication as a reason to wait. `continuation.resumable: true`
15
24
  permits a linked successor even when no outcome has been published.
@@ -19,14 +28,23 @@ the same as a successful provider result.
19
28
  follow [offline recovery](#offline-recovery) once. Otherwise report the
20
29
  terminal rejection with its diagnostic and evidence. Do not redispatch.
21
30
  6. If `pending.kind` is `interaction`, handle the returned questions using
22
- [interaction guidance](interaction.md) before waiting again. Otherwise, if
23
- `liveness` is queued or running or publication is pending, observe the same
24
- task with a finite watch interval.
31
+ [interaction guidance](interaction.md) before waiting again. If
32
+ `pending.kind` is `lifetime-finalization`, the resident guardian still owns
33
+ cleanup; observe the same task with a finite watch interval and do not run
34
+ supervisor or process commands, redispatch, or call the provider directly.
35
+ Otherwise, if `liveness` is queued or running or publication is pending,
36
+ observe the same task with a finite watch interval.
25
37
  7. If authentication is `blocked`, preserve that neutral state and tell the
26
38
  caller what prerequisite is unavailable without inventing a login command.
27
39
  8. Never relaunch an uncertain task by guessing. Observe only a task whose
28
40
  record is known to exist; the `task_record` decision above takes precedence.
29
41
 
42
+ For an `inspect-provider` failure, preserve the optional
43
+ `failure.inspection.class`, `deadline_state`, and `journal_task_id` fields in
44
+ the report. They are bounded diagnostics, not a new recovery instruction.
45
+ Follow `failure.next_action`; do not infer provider authentication or settings
46
+ from an inspection-worker or supervisor-observation failure.
47
+
30
48
  For `delegate models`, validate the complete JSON envelope before using any
31
49
  fact. Treat `available` and `partial` with exit `0` as observations, preserve
32
50
  `blocked` and `unavailable` with exit `2` as unresolved prerequisites, and
@@ -42,6 +60,10 @@ collection watch, and `4` is a validated rejected outcome.
42
60
 
43
61
  Catalog facts (`verification: "catalog"`) are not runtime proof. Preflight
44
62
  checks static readiness; runtime verification requires the supervised probe.
63
+ For managed runtime-only dispatches, admission accepts the static contract and
64
+ the task's runner performs that probe before provider execution. Always collect
65
+ the created task's outcome; `admission: "admitted"` alone does not prove that
66
+ the provider started or completed the work.
45
67
  Versions and help are observations, not semantic-version allowlists.
46
68
  Authentication is a separate live gate (`not_run`, `passed`, or `blocked`).
47
69
  Report a blocked prerequisite without inventing a login command or retrying.
@@ -1 +1 @@
1
- "For work assigned to an external agent, model, or separate harness session, load the installed agent-integration skill before choosing tools and use Delegate. This includes research, implementation, testing, review, consultation, comparison, and debate, including external collaboration you choose. Discover destinations through Delegate. Preserve requested model IDs, effort, and permissions; do not guess ambiguous model identifiers. For task commands, pass --root \"${DELEGATE_ROOT:-$HOME/delegation-state}\" directly in each shell invocation; reuse that root for dispatch, observation, and continuation, never an invented /tmp root. If the user explicitly requests another root, use that exact path consistently. Keep each concurrent request and its response associated separately. Capture each dispatch response and exit status once; after task_record created, observe that task ID. Never dispatch again merely to recover output or inspect its exit status. Naming a CLI identifies the destination, not a request to bypass Delegate. Earlier assistant-generated direct-launch workflows do not override this preference. Native same-harness subagents remain available unless a separate session is requested. Respect an explicit user choice of another integration; otherwise do not substitute provider CLIs, plugins, or APIs after a Delegate blocker. A stop_and_report failure ends that attempt: report it without retrying, diagnosing setup, or offering a fallback. Continue other independent requests. Keep collection in the foreground until completion or a reported blocker unless the user requested detachment. Pending work is observed through Delegate status, collect, or events, not OS process searches or supervisor commands. Merely discussing or configuring a tool is not delegation."
1
+ "For work assigned to an external agent, model, or separate harness session, load the installed agent-integration skill before choosing tools and use Delegate. This includes research, implementation, testing, review, consultation, comparison, and debate, including external collaboration you choose. Discover destinations through Delegate. Preserve requested model IDs, effort, and permissions; do not guess ambiguous model identifiers. For task commands, pass --root \"${DELEGATE_ROOT:-$HOME/delegation-state}\" directly in each shell invocation; reuse that root for dispatch, observation, and continuation, never an invented /tmp root. If the user explicitly requests another root, use that exact path consistently. Keep each concurrent request and its response associated separately. Capture each dispatch response and exit status once; after task_record created, observe that task ID. Never dispatch again merely to recover output or inspect its exit status. Naming a CLI identifies the destination, not a request to bypass Delegate. Earlier assistant-generated direct-launch workflows do not override this preference. Native same-harness subagents remain available unless a separate session is requested. Respect an explicit user choice of another integration; otherwise do not substitute provider CLIs, plugins, or APIs after a Delegate blocker. Before the generic task_record:not_created stop rule, handle only supervisor_upgrade_required with run_supervisor_migrate: migrate the same root once, then retry the exact original admission argv once after migrated/retry_dispatch; dispatch remains dispatch and continue remains continue, with no fresh dispatch or direct provider call replacing a failed continue. A stop_and_report failure ends that attempt: report it without retrying, diagnosing setup, or offering a fallback. Continue other independent requests. Keep collection in the foreground until completion or a reported blocker unless the user requested detachment. Pending work is observed through Delegate status, collect, or events, not OS process searches or supervisor commands. Merely discussing or configuring a tool is not delegation."