delegation-layer 0.1.10 → 0.1.12
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/package.json
CHANGED
|
@@ -19,8 +19,11 @@ inspect, authenticate, or install a provider CLI directly.
|
|
|
19
19
|
3. Give every turn an absolute workspace, a separate state root, an explicit
|
|
20
20
|
permission mode, and a finite budget.
|
|
21
21
|
4. Use `--json` and save the returned `task_id`. Read `admission`, `liveness`,
|
|
22
|
-
`publication`, `status`, `outcome`, `continuation`,
|
|
23
|
-
fields.
|
|
22
|
+
`publication`, `status`, `outcome`, `continuation`, `task_record`, `failure`,
|
|
23
|
+
and `error` as separate fields.
|
|
24
|
+
Delegate owns the supervisor lifecycle. Never install, configure, start,
|
|
25
|
+
inspect, or repair Pueue, and never poll a task unless the response says its
|
|
26
|
+
`task_record` is `created`.
|
|
24
27
|
5. Observe with `status` and collect with `collect`. Collection may recover the
|
|
25
28
|
saved supervisor only to observe an already-requested budget stop; it never
|
|
26
29
|
launches a provider or retries a task.
|
|
@@ -156,11 +159,19 @@ omitted or `default` effort is omitted from native argv. For AGY read-only,
|
|
|
156
159
|
without a bypass. Authorized AGY workspace-write retains its existing native
|
|
157
160
|
bypass. Do not add these native flags yourself.
|
|
158
161
|
|
|
159
|
-
Save the exact `task_id` from the JSON response.
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
162
|
+
Save the exact `task_id` from the JSON response. The recovery steps below apply
|
|
163
|
+
to parsed dispatch responses. If the CLI rejects the command syntax before
|
|
164
|
+
dispatch (nonzero exit with a usage error and no JSON response), correct the
|
|
165
|
+
reported syntax and invoke it again; argument parsing fails before admission and
|
|
166
|
+
does not create a task record. For a parsed dispatch error, read its `failure`
|
|
167
|
+
and `task_record` fields. If `task_record` is
|
|
168
|
+
`not_created`, do not run `status`, `collect`, or `continue`; correct the request
|
|
169
|
+
only when `failure.next_action` is `correct_request`, otherwise report the
|
|
170
|
+
delegate failure and stop. If it is `created`, use `status` before taking any
|
|
171
|
+
other action. If it is `unknown`, stop and report the failure: with an
|
|
172
|
+
explicit task ID, absence can race another dispatch that is creating the same
|
|
173
|
+
ID. Never retry that ID, run Pueue commands, or silently try another provider
|
|
174
|
+
after a task may have been admitted.
|
|
164
175
|
|
|
165
176
|
### 5. Observe and collect
|
|
166
177
|
|
|
@@ -219,6 +230,13 @@ collect the successor by repeating step 5. If `resumable` is
|
|
|
219
230
|
false, report the reason and stop; a fresh dispatch would lose the original
|
|
220
231
|
conversation and is not an equivalent recovery.
|
|
221
232
|
|
|
233
|
+
If `continue` returns an error, use its `failure` and `task_record` fields just
|
|
234
|
+
as for dispatch: when the record is `created`, check the returned successor
|
|
235
|
+
`task_id` with `status`; when it is `not_created`, correct the request only if
|
|
236
|
+
`failure.next_action` is `correct_request`; and when it is `unknown`, stop and
|
|
237
|
+
report the failure. Do not repeat `continue` while successor creation is
|
|
238
|
+
unknown.
|
|
239
|
+
|
|
222
240
|
## JSON decisions
|
|
223
241
|
|
|
224
242
|
The capability projection uses the stable `runtime-capability-v1` contract.
|