@zq-silk/yui 2.20.0 → 2.22.0
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 +5 -0
- package/dist/cli/commandCatalog.js +88 -28
- package/dist/cli/dynamicCompletion.js +4 -1
- package/dist/cli/helpRenderer.js +12 -1
- package/dist/cli/interactionPolicy.js +2 -0
- package/dist/cli/invocationAuthority.js +2 -6
- package/dist/cli/invocationRouter.js +5 -5
- package/dist/cli/managedDiagnostics.js +24 -16
- package/dist/cli/roleWizard.js +5 -1
- package/dist/commands/durableJobCommands.js +2 -3
- package/dist/commands/globalRoleCommands.js +33 -8
- package/dist/commands/inboxCommands.js +39 -12
- package/dist/commands/operatorCommands.js +2 -5
- package/dist/commands/releaseCommands.js +16 -2
- package/dist/commands/roleConfiguration.js +25 -2
- package/dist/commands/sessionCommands.js +5 -2
- package/dist/commands/taskCommands.js +225 -99
- package/dist/commands/taskContextCommand.js +26 -4
- package/dist/commands/taskFactCommands.js +20 -7
- package/dist/commands/taskIntegrationCommands.js +3 -3
- package/dist/commands/taskRoleRuntimeStatus.js +15 -5
- package/dist/commands/taskUsageCommand.js +2 -6
- package/dist/commands/textInput.js +2 -2
- package/dist/context/contextFamilies.js +10 -0
- package/dist/context/currentSkills.js +6 -4
- package/dist/context/runContextPack.js +44 -5
- package/dist/context/runInputContract.js +1 -1
- package/dist/context/sessionBootstrapManifest.js +7 -5
- package/dist/context/sessionSkillNotice.js +53 -0
- package/dist/context/taskCatalog.js +4 -13
- package/dist/context/taskContext.js +135 -103
- package/dist/context/taskSearch.js +3 -7
- package/dist/controlPlaneCli.js +23 -25
- package/dist/controller/agentRuntimeObserver.js +57 -12
- package/dist/controller/clientRuntime.js +37 -8
- package/dist/controller/controller.js +3 -1
- package/dist/controller/diagnosticJournal.js +10 -2
- package/dist/controller/fileSchedulerStoreAdapter.js +72 -24
- package/dist/controller/jobClient.js +2 -2
- package/dist/controller/jobControl.js +2 -2
- package/dist/controller/jobDefinitionControl.js +5 -1
- package/dist/controller/messageHealth.js +4 -3
- package/dist/controller/providerRetryAdmission.js +15 -1
- package/dist/controller/providerRetryDelivery.js +18 -2
- package/dist/controller/runtime.js +15 -5
- package/dist/controller/runtimeEventInbox.js +107 -13
- package/dist/controller/runtimeEventProcessor.js +3 -3
- package/dist/controller/taskRunRecovery.js +153 -0
- package/dist/core/controllerClient.js +16 -2
- package/dist/core/controllerServer.js +14 -5
- package/dist/core/controllerTelemetry.js +51 -5
- package/dist/errors/cliFailure.js +14 -5
- package/dist/executor/agentAdapter.js +32 -4
- package/dist/executor/agentConfigurationFields.js +2 -0
- package/dist/executor/taskAgentCapabilities.js +2 -2
- package/dist/integration/gitIntegrationService.js +3 -2
- package/dist/integration/integrationSourceApplication.js +12 -1
- package/dist/interaction/notificationPresentation.js +11 -16
- package/dist/interaction/operatorPresentation.js +1 -1
- package/dist/message/messageContinuation.js +3 -1
- package/dist/output/boundedRead.js +36 -7
- package/dist/output/rolePresentation.js +3 -1
- package/dist/runtime/agentHost.js +12 -3
- package/dist/runtime/codexAppServerRuntime.js +110 -24
- package/dist/runtime/codexInteractiveHost.js +46 -0
- package/dist/runtime/providerRetry.js +5 -2
- package/dist/runtime/providerRuntimeIdentity.js +1 -1
- package/dist/runtime/structuredProviderHost.js +32 -34
- package/dist/scheduler/wakeupQueue.js +10 -4
- package/dist/storage/sqliteSchema.js +9 -0
- package/dist/storage/storageVersions.js +1 -1
- package/dist/task/taskAuthority.js +7 -3
- package/dist/tmux/tmuxManager.js +4 -2
- package/dist/web/webSettings.js +2 -0
- package/docs/authorization.md +18 -3
- package/docs/cli-information-contract.md +245 -6
- package/docs/cli-information-contract.zh-CN.md +107 -5
- package/docs/managed-turn-and-session-runtime.md +82 -21
- package/docs/managed-turn-and-session-runtime.zh-CN.md +56 -13
- package/docs/provider-retry.md +11 -0
- package/docs/release-workflow.md +62 -0
- package/docs/release-workflow.zh-CN.md +46 -0
- package/docs/roles-and-configuration.md +28 -0
- package/docs/roles-and-configuration.zh-CN.md +21 -0
- package/docs/storage-baseline.md +4 -1
- package/docs/storage-baseline.zh-CN.md +1 -1
- package/docs/task-delivery.md +7 -0
- package/docs/task-delivery.zh-CN.md +5 -0
- package/docs/task-discovery.md +5 -5
- package/docs/task-discovery.zh-CN.md +4 -4
- package/docs/testing/review-evaluation.md +7 -7
- package/docs/testing/review-evaluation.zh-CN.md +7 -7
- package/docs/testing/verification-levels.md +45 -2
- package/docs/testing/verification-levels.zh-CN.md +21 -2
- package/i18n/README.zh-CN.md +6 -0
- package/package.json +1 -1
- package/skills/yui-leader/SKILL.md +98 -189
- package/skills/yui-leader/VERSION +1 -1
- package/skills/yui-leader/references/artifacts.md +41 -0
- package/skills/yui-leader/references/assignment-execution.md +140 -0
- package/skills/yui-leader/references/completion.md +79 -0
- package/skills/yui-leader/references/delivery-scope.md +26 -0
- package/skills/yui-leader/references/execution.md +16 -487
- package/skills/yui-leader/references/implementation.md +81 -0
- package/skills/yui-leader/references/planning.md +7 -45
- package/skills/yui-leader/references/review.md +90 -0
- package/skills/yui-leader/references/task-progress.md +23 -0
- package/skills/yui-leader/references/work-allocation.md +118 -0
- package/skills/yui-operator/SKILL.md +77 -331
- package/skills/yui-operator/VERSION +1 -1
- package/skills/yui-operator/references/body-transport.md +62 -0
- package/skills/yui-operator/references/configuration.md +47 -0
- package/skills/yui-operator/references/lifecycle.md +41 -0
- package/skills/yui-operator/references/progress.md +39 -0
- package/skills/yui-operator/references/routing.md +57 -0
- package/skills/yui-operator/references/submission.md +56 -0
- package/skills/yui-operator/references/task-delivery.md +5 -2
- package/skills/yui-operator/references/web-lifecycle.md +19 -0
- package/skills/yui-operator/scripts/verify-submission.mjs +37 -0
- package/skills/yui-reviewer/SKILL.md +4 -2
- package/skills/yui-reviewer/VERSION +1 -1
- package/skills/yui-runtime/SKILL.md +177 -505
- package/skills/yui-runtime/VERSION +1 -1
- package/skills/yui-runtime/references/archive.md +51 -0
- package/skills/yui-runtime/references/command-discovery.md +41 -0
- package/skills/yui-runtime/references/completed-followup.md +65 -0
- package/skills/yui-runtime/references/context-ordering.md +3 -34
- package/skills/yui-runtime/references/context-reads.md +61 -0
- package/skills/yui-runtime/references/dispatched-run.md +61 -0
- package/skills/yui-runtime/references/execution-failure.md +105 -0
- package/skills/yui-runtime/references/global-context.md +18 -0
- package/skills/yui-runtime/references/global-input-controls.md +44 -0
- package/skills/yui-runtime/references/host-custody.md +30 -0
- package/skills/yui-runtime/references/inbox-recovery.md +77 -0
- package/skills/yui-runtime/references/incremental-context.md +40 -0
- package/skills/yui-runtime/references/publication.md +4 -104
- package/skills/yui-runtime/references/recovery.md +32 -192
- package/skills/yui-runtime/references/session-identity.md +18 -0
- package/skills/yui-runtime/references/session-replacement.md +45 -0
- package/skills/yui-runtime/references/uncertain-execution.md +29 -0
- package/skills/yui-worker/SKILL.md +7 -4
- package/skills/yui-worker/VERSION +1 -1
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Incremental context reads
|
|
2
|
+
|
|
3
|
+
Read before using Task event deltas or frozen Run deltas. This is not required
|
|
4
|
+
for a current read or merely because intent changed. For an apparent conflict,
|
|
5
|
+
read [Current intent](context-ordering.md); the delta itself never grants scope.
|
|
6
|
+
|
|
7
|
+
## Maintain a baseline and incremental history
|
|
8
|
+
|
|
9
|
+
For current Task facts, retain `coreCursor` from `task context <task>`.
|
|
10
|
+
`task context delta <task> --after <coreCursor>` returns **event history**, not
|
|
11
|
+
a replacement current view. Retain the same `--after` on every continuation;
|
|
12
|
+
use `--continuation` until `complete: true`, then advance to `throughCursor`.
|
|
13
|
+
The window's upper bound is fixed. Later arrivals belong to the next read.
|
|
14
|
+
|
|
15
|
+
Deduplicate by source Home + Task + event ID, and process numeric event order
|
|
16
|
+
within that stream. `createdAt` is occurrence/recording metadata, not a global
|
|
17
|
+
causal clock; native acceptance, delivery and acknowledgement are separate
|
|
18
|
+
facts. Never apply a late event's old payload over a newer current record.
|
|
19
|
+
Re-read affected current refs with their digest when making a decision.
|
|
20
|
+
An empty delta preserves the baseline; `stateChanged` can still require a
|
|
21
|
+
current read because not every shared fact is a Task event.
|
|
22
|
+
|
|
23
|
+
Cursors from another Home/Task, incompatible or invalid continuations, missing
|
|
24
|
+
baselines and source changes require a fresh bounded current read. Do not join
|
|
25
|
+
pages from different windows or versions. A failed original-detail digest
|
|
26
|
+
requires rediscovery; a content page must be reassembled only with its own
|
|
27
|
+
source digest. None of these reads consumes input or permits replay.
|
|
28
|
+
|
|
29
|
+
Frozen Run context is a different stream. Keep its exact Snapshot and
|
|
30
|
+
Assignment. `deltaRefs` is a launch hint, not a complete patch. The explicit
|
|
31
|
+
Run delta reports complete changed `refs` and `removedRefs` against its named
|
|
32
|
+
parent Snapshot, with large documents paginated. Apply removals only to that
|
|
33
|
+
frozen inventory; an empty delta is a no-op. Mutable Task facts and current
|
|
34
|
+
inbox clarifications must be refreshed separately within read scope; they
|
|
35
|
+
never expand the frozen Assignment or change a Review candidate.
|
|
36
|
+
|
|
37
|
+
Focused wakes use exact input refs, including delayed and same-timestamp
|
|
38
|
+
inputs. Timestamp-window discovery is under `--history` (or a historical wake
|
|
39
|
+
without refs), not new delivery authority. Original event and Message reads
|
|
40
|
+
remain available without rewriting or replaying them.
|
|
@@ -1,62 +1,9 @@
|
|
|
1
1
|
# Record external delivery
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
## Post-completion routing boundary
|
|
8
|
-
|
|
9
|
-
An explicit user request to continue implementation or delivery of the same
|
|
10
|
-
completed, unarchived result authorizes its necessary reopening within that
|
|
11
|
-
request's scope. The current matching Leader may call `task reopen <task>` for
|
|
12
|
-
its own Task and continue that request; an Operator handoff is not mandatory,
|
|
13
|
-
and neither Role needs the user to additionally say “reopen.” Read the original
|
|
14
|
-
completion, fixed heads/reports, Publication, new request and current authority
|
|
15
|
-
first. Inspect the reopen result and current Context before executing; delivery
|
|
16
|
-
still requires the current Session's delivery authority, legal workspace and an
|
|
17
|
-
enabled execution gate.
|
|
18
|
-
|
|
19
|
-
If the Leader already received the request, use its original durable input and
|
|
20
|
-
continue after reopening; do not resend it or create a self-wake. Preserve a
|
|
21
|
-
direct-conversation request and its boundaries in Task records when needed,
|
|
22
|
-
without impersonating user/Operator input. When the Operator or user is routing
|
|
23
|
-
new input, use the existing two operations:
|
|
24
|
-
|
|
25
|
-
```sh
|
|
26
|
-
yui task reopen <task>
|
|
27
|
-
yui operator submit "<new request, authority, boundaries and prior evidence>" \
|
|
28
|
-
--task <task> --intent develop --request-id <id>
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
Unaddressed `task message send` with the same intent/key options is an alternative
|
|
32
|
-
to the second command, not an additional send. Ordinary send/queue/submit still
|
|
33
|
-
refuses completed Tasks before saving new input; no intent implicitly changes
|
|
34
|
-
lifecycle and there is no auto-reopen option. `--to leader` instead requires an existing
|
|
35
|
-
WorkItem/ReviewRound Assignment.
|
|
36
|
-
|
|
37
|
-
Reopen returns the Task to active and clears its current completion fields;
|
|
38
|
-
original completion events, fixed commits/artifacts and Publication history stay
|
|
39
|
-
intact. The Leader must assess the new request and separately accept any new
|
|
40
|
-
result, not pretend old validation proves changed work. Reopen does not replay
|
|
41
|
-
historical Messages/Runs, change the Role's Agent/model/permissions, or lift an
|
|
42
|
-
independent execution stop. Queries, ordinary record/discussion input and Session
|
|
43
|
-
recovery do not authorize resumption. Cancelled intent needs explicit
|
|
44
|
-
user/Operator restoration authority and cannot be restored by the Leader;
|
|
45
|
-
archived Tasks cannot reopen. A stopped gate still needs
|
|
46
|
-
the separately authorized start/cleanup path.
|
|
47
|
-
|
|
48
|
-
These are two atomic operations, not one transaction. Read the reopen result and
|
|
49
|
-
the submission's saved/queued receipt separately. If the second step fails,
|
|
50
|
-
inspect current Task/Message facts and continue only the unapplied step within
|
|
51
|
-
unchanged authority. Keep the same submission key on a matching retry; unknown
|
|
52
|
-
native or external effects are never replay permission. Do not reopen again just
|
|
53
|
-
to retry input after another completion, cancellation or stop. A lifecycle-only
|
|
54
|
-
notification may precede the new Message: the Leader waits for the actual request,
|
|
55
|
-
without rerunning old work or immediately completing the reopened Task.
|
|
56
|
-
|
|
57
|
-
Publication recording, diff/adopt and verification remain separately authorized
|
|
58
|
-
atomic operations on completed, unarchived results. They need no reopening when
|
|
59
|
-
no further execution is requested, and never grant authority for code changes.
|
|
3
|
+
Read after an authorized PR/MR operation or before recording, verifying or
|
|
4
|
+
adopting its evidence. This does not authorize push, publish, merge, external
|
|
5
|
+
reads or archive. Reopening and archive have separate action-specific routes
|
|
6
|
+
in [yui-runtime](../SKILL.md).
|
|
60
7
|
|
|
61
8
|
## Record and verify the owning Task's publication
|
|
62
9
|
|
|
@@ -135,50 +82,3 @@ decision. Archived history is read-only to these adopt/verify operations.
|
|
|
135
82
|
|
|
136
83
|
Use `yui task remote-delivery <task>` to explain external delivery. Publication
|
|
137
84
|
is not Candidate acceptance, Review, Integration or Task completion.
|
|
138
|
-
|
|
139
|
-
## Archive separately
|
|
140
|
-
|
|
141
|
-
Completion does not authorize archive. A delivery Leader with original user
|
|
142
|
-
authorization may use [ordinary archive](../../yui-leader/references/authorization.md);
|
|
143
|
-
this grants no force or abandonment authority. Otherwise the Operator obtains authorization for
|
|
144
|
-
the exact Task, checks archive eligibility, then uses `--integrated` for verified
|
|
145
|
-
merged delivery or `--abandon` for deliberate non-delivery. General archive
|
|
146
|
-
approval never implies `--force` authority. Preserve the Task record.
|
|
147
|
-
|
|
148
|
-
Ordinary archive requires settled business, exact delivery (or authorized
|
|
149
|
-
abandonment), and proven stopped execution. It commits logical archive before
|
|
150
|
-
one foreground resource cleanup. Safe physical retention—dirty diagnostics,
|
|
151
|
-
missing-path recovery gaps, or remaining Git registrations—is not a reason to
|
|
152
|
-
force archive or rewrite old Integration outcomes. Terminal failed/superseded
|
|
153
|
-
Integration history stays readable; an active/conflicted attempt or unknown
|
|
154
|
-
execution still requires settlement.
|
|
155
|
-
|
|
156
|
-
With explicit force authorization for a completed or cancelled (retired) Task, use
|
|
157
|
-
`yui task archive <task> (--integrated|--abandon) --force`. Force commits the
|
|
158
|
-
archive and stops new Task scheduling before attempting safe foreground cleanup.
|
|
159
|
-
Missing/stale delivery evidence, unresolved execution and cleanup errors become
|
|
160
|
-
warnings with retained resource references; they do not block that commit.
|
|
161
|
-
Authority, lifecycle, identity and mandatory audit persistence still fail closed.
|
|
162
|
-
|
|
163
|
-
Force does not verify a merge, accept work, stop unknown execution, discard dirty
|
|
164
|
-
data or imply abandonment. Keep the requested disposition and original
|
|
165
|
-
Publication/completion evidence. Unverified local commits and resources that
|
|
166
|
-
cannot be safely released stay owned and traceable. Late runtime events remain
|
|
167
|
-
source evidence, not authority to resume or settle unknown input.
|
|
168
|
-
|
|
169
|
-
Read `task show <task> --json` for `data.archive.warnings`,
|
|
170
|
-
`data.archive.retainedResources` and `data.archive.cleanupEvents`. These bounded
|
|
171
|
-
views include counts and inspection actions; read the existing paginated
|
|
172
|
-
`task event list` and Task context resource inventory for omitted evidence.
|
|
173
|
-
A successful archive
|
|
174
|
-
exit means `archived=true`, not that cleanup fully succeeded. `cleanupFinished`
|
|
175
|
-
means the foreground pass finished, not that every resource was removed.
|
|
176
|
-
`allResourcesReleased` separately requires release evidence and no retained
|
|
177
|
-
resources. Historical warnings do not disappear after a successful later pass.
|
|
178
|
-
If cleanup was interrupted, the Task stays archived. Repeating archive only
|
|
179
|
-
reports current facts. After inspecting the exact retained owner/reason, use
|
|
180
|
-
`task archive-cleanup <task>` for one new bounded pass, or the reported
|
|
181
|
-
WorkItem/Review/Integration cleanup entry. Every pass rechecks current identity,
|
|
182
|
-
runtime and Git registration facts; it is not an atomic batch and does not
|
|
183
|
-
discard unknown material. Registry-only remnants require the existing resource
|
|
184
|
-
inspection route, not a global `worktree prune`. No background retry is implied.
|
|
@@ -1,194 +1,34 @@
|
|
|
1
1
|
# Runtime recovery
|
|
2
2
|
|
|
3
|
-
Read
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
currently, not copied into error history. A historical error without a recorded
|
|
36
|
-
configuration, or a changed Agent command/bindings, returns a diagnosis instead
|
|
37
|
-
of borrowing today's Role configuration. To inspect the desired next launch
|
|
38
|
-
explicitly, omit `--error`. Distinguish live enumeration, identity-matched cached
|
|
39
|
-
observations, declared static adapter inputs, and unavailable fields. Read field
|
|
40
|
-
reasons, warnings, observation/attempt times and the current query error: a live
|
|
41
|
-
query can contain static or unavailable fields, and a cache hit is not current
|
|
42
|
-
Provider confirmation. Do not treat an alias list as a complete Provider
|
|
43
|
-
whitelist or a static/custom choice as proven native support.
|
|
44
|
-
|
|
45
|
-
Reconcile the original user requirement with exact native IDs and alias
|
|
46
|
-
mappings. Correcting the name of the same authorized model is routine recovery;
|
|
47
|
-
selecting another model, account, permission or cost boundary is not. If there
|
|
48
|
-
is no proven equivalent, preserve the failure and report the missing choice.
|
|
49
|
-
Do not guess names, select a similarly named variant, or silently fall back.
|
|
50
|
-
|
|
51
|
-
After correcting only the intended configuration, choose the existing operation
|
|
52
|
-
that matches current facts. A rejected notification retains its input:
|
|
53
|
-
|
|
54
|
-
```sh
|
|
55
|
-
yui task wake show <task> <wake>
|
|
56
|
-
yui task wake retry <task> <wake> --reason "<correction and evidence>"
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
Retry does not replace a Session or change its immutable effective configuration.
|
|
60
|
-
If an existing Session must adopt changed settings, use the deliberate Session
|
|
61
|
-
replacement operation below; an assigned Run uses its own legal retry operation.
|
|
62
|
-
Accepted or uncertain input cannot be replayed through notification retry.
|
|
63
|
-
Configuration failure is not transient infrastructure recovery, and unchanged
|
|
64
|
-
configuration does not justify another attempt.
|
|
65
|
-
|
|
66
|
-
### Bounded infrastructure retry
|
|
67
|
-
|
|
68
|
-
The Controller, not the Agent, counts and schedules qualifying transient
|
|
69
|
-
Provider retries: at most five automatic executions after the initial failure,
|
|
70
|
-
within one ten-minute recovery window. Native acceptance, activity and partial
|
|
71
|
-
output do not reset that count. Unknown delivery remains fenced for exact
|
|
72
|
-
readback; it is never replayed.
|
|
73
|
-
|
|
74
|
-
Inspect the current projection in Context, or use
|
|
75
|
-
`task role session retry <task> <role> show`; Global Sessions use
|
|
76
|
-
`session retry <role> show`. While `waiting` or `in-flight`, do not dispatch a
|
|
77
|
-
duplicate. A readable failed Run remains immutable evidence while its recovery
|
|
78
|
-
successor handles the same responsibility and frozen Review boundary.
|
|
79
|
-
|
|
80
|
-
`cancel` withdraws pending automatic recovery; `disable` additionally disables
|
|
81
|
-
future automatic chains on that Provider binding. Neither stops an admitted
|
|
82
|
-
native Turn. `enable` permits future failures to qualify, without replaying
|
|
83
|
-
old failures. These controls require the existing user/supervisor authority.
|
|
84
|
-
|
|
85
|
-
`exhausted`, `cancelled` and `needs-attention` preserve the error, input and
|
|
86
|
-
work. Read their exact reason, then choose an authorized next action. Unsupported
|
|
87
|
-
Hosts/Adapters or unprovable Session/background state do not trigger automatic
|
|
88
|
-
replacement, cleanup, model switching or a new grant.
|
|
89
|
-
|
|
90
|
-
A failed AgentRun is immutable; retry creates a new attempt. Reuse a recoverable
|
|
91
|
-
Session when useful and load the new attempt's current context, not an old
|
|
92
|
-
Assignment from memory. A new Host process need not mean a new native Session.
|
|
93
|
-
Preserve frozen Review candidates and selected synthesis sources on retry.
|
|
94
|
-
An infrastructure failure is not a defect in the business result.
|
|
95
|
-
|
|
96
|
-
Native internal retries are not failed terminals: observe without submitting
|
|
97
|
-
another input. A missing automatic retry record is not evidence of exhausted
|
|
98
|
-
budget or a damaged Session. An explicit `task run retry <task>/<run>` can
|
|
99
|
-
continue from the current exact failed Turn even without an earlier automatic
|
|
100
|
-
chain. Codex `systemError` alone does not require replacement; the normal
|
|
101
|
-
submission path checks that the latest Turn is that failed Turn and background
|
|
102
|
-
execution is empty. Missing or changed proof is a refusal, not permission to
|
|
103
|
-
replay, change models or silently replace the Session.
|
|
104
|
-
|
|
105
|
-
## Replace a Session deliberately
|
|
106
|
-
|
|
107
|
-
An authorized Leader or Operator may request:
|
|
108
|
-
|
|
109
|
-
```sh
|
|
110
|
-
yui task role session new <task> <role> --reason "<reason>"
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
The old Run may still be active, the Session may already be released, or fresh
|
|
114
|
-
context may simply be preferable. Save necessary requirements, decisions,
|
|
115
|
-
progress and results first. Yui persists replacement intent, stops the exact
|
|
116
|
-
execution and retires its engineering attempts while retaining Task history and
|
|
117
|
-
workspaces. Do not manipulate Run status, delete context or change models to
|
|
118
|
-
make replacement legal.
|
|
119
|
-
|
|
120
|
-
When replacing yourself, end the native turn. The successor reads durable Task
|
|
121
|
-
context and fixed notification references, then chooses which still-valid
|
|
122
|
-
assignment to continue. Released Leaders retain scoped diagnostic reads but
|
|
123
|
-
cannot regain write authority.
|
|
124
|
-
|
|
125
|
-
Leader initialization is delivered separately from old inbox handling and
|
|
126
|
-
new queued business. A retained claim cannot block this lifecycle notification.
|
|
127
|
-
The current Leader reads `yui inbox list --view history --json`, then the exact originals and
|
|
128
|
-
prior effects. Claims survive unchanged; use `inbox ack` only after actual
|
|
129
|
-
handling, with the successor's own disposition. Do not claim an already-claimed
|
|
130
|
-
entry again. Repeated reconciliation or Controller restart does not settle
|
|
131
|
-
anything or repeatedly wake an idle handler.
|
|
132
|
-
|
|
133
|
-
A legally started GlobalRole successor with claims from a previous Session
|
|
134
|
-
receives one Session-pinned recovery Message in its existing inbox. It requests
|
|
135
|
-
the same inspection, not replay of those Messages. A stopped Global Session
|
|
136
|
-
is not started by this notice. Worker/Reviewer Assignment changes still require
|
|
137
|
-
the existing explicit handoff or retirement; no bulk transfer is implied.
|
|
138
|
-
|
|
139
|
-
Replacement waits for exact native/resource stop and writer release. Missing
|
|
140
|
-
proof requires repairing that observation or a genuinely missing user decision,
|
|
141
|
-
not a timeout, another name, force-ACK or record deletion. Uncertain old
|
|
142
|
-
notification submissions are released from scheduling without replay, retaining
|
|
143
|
-
their fixed wakes and `notification.resolved` evidence. They become explicitly
|
|
144
|
-
inspectable/settleable, not automatically accepted or resubmitted.
|
|
145
|
-
|
|
146
|
-
## Handle uncertainty and failed cleanup
|
|
147
|
-
|
|
148
|
-
Never replay a notification whose acceptance is unknown. After evidence
|
|
149
|
-
establishes shared-native quiescence, an authorized supervisor can use:
|
|
150
|
-
|
|
151
|
-
```sh
|
|
152
|
-
yui task wake resolve <task> <wake> --reason "<quiescence evidence>"
|
|
153
|
-
```
|
|
154
|
-
|
|
155
|
-
This releases only the claim, preserves the original unknown record, and lets
|
|
156
|
-
independent later inputs proceed. It neither asserts acceptance nor implements
|
|
157
|
-
the Message. Uncertain native activity still blocks conflicting execution;
|
|
158
|
-
unrelated authorized local work can continue.
|
|
159
|
-
|
|
160
|
-
If the Controller is unresponsive, an authorized Operator can use
|
|
161
|
-
`controller status` and explicit `controller restart` without a successful
|
|
162
|
-
preliminary RPC. Preserve the resource and restart authorization boundary.
|
|
163
|
-
If exact native stop or inspection fails, read the persisted diagnostic and
|
|
164
|
-
resolve that resource boundary; do not kill arbitrary processes, clear unknown
|
|
165
|
-
execution records, or modify managed refs, tmux Sessions or state files.
|
|
166
|
-
|
|
167
|
-
Compatible upgrades preserve logical Sessions. Build generations and historical
|
|
168
|
-
Skill packages are provenance, not continuation gates. Load current stable
|
|
169
|
-
Skills and current authority; never change a user's model, account, native
|
|
170
|
-
permissions or workspace to make an upgrade work.
|
|
171
|
-
|
|
172
|
-
Within Host control/event v1, status advertises `controlCapabilities` and the
|
|
173
|
-
loaded `hostImplementation`, independently of `endpointImplementation`. Missing
|
|
174
|
-
capabilities or `eventDelivery` are unreported, not healthy. A Controller must
|
|
175
|
-
not repeatedly send an unsupported `reconcile-turn`; the existing raw Inbox
|
|
176
|
-
still permits exact event consumption without executing the input again.
|
|
177
|
-
Current Hosts retain unpersisted original facts during a filesystem failure;
|
|
178
|
-
keep that process alive until persistence recovers. Those volatile bytes cannot
|
|
179
|
-
be recovered after process loss merely by restarting the Controller.
|
|
180
|
-
|
|
181
|
-
Program/storage upgrade success does not mean Host replacement succeeded.
|
|
182
|
-
Compatible live Hosts may continue, including busy ones. A new Host may resume
|
|
183
|
-
the same native Session only through the existing authorized lifecycle after
|
|
184
|
-
exact execution, background resources and writer release are proven. An idle
|
|
185
|
-
status, a stopped proxy or a missing control field is insufficient. Unknown
|
|
186
|
-
effects preserve the original Session, input and resources; do not force-kill,
|
|
187
|
-
replay, hot-replace loaded modules or silently create a new Session. Existing
|
|
188
|
-
explicit stop/replacement authority is separate from an ordinary upgrade.
|
|
189
|
-
Unsupported protocols require an explicit bounded recovery plan, not arbitrary
|
|
190
|
-
historical Host adoption. Storage migration remains independently fenced.
|
|
191
|
-
|
|
192
|
-
After repeated failure of the same bounded recovery, report the observed
|
|
193
|
-
cause, impact and smallest remaining options. Do not broaden cleanup or add
|
|
194
|
-
a private retry loop. A failed recovery does not erase the pending requirement.
|
|
3
|
+
Read before retry, Session replacement or intervention in failed/uncertain
|
|
4
|
+
execution. Workers and Reviewers report exact evidence; reading recovery
|
|
5
|
+
instructions grants no supervisor authority.
|
|
6
|
+
|
|
7
|
+
Preserve pending intent, original input, exact execution identity, workspace
|
|
8
|
+
progress and resource ownership. Never replay unknown native/external effects,
|
|
9
|
+
edit Run status or substitute a Session behind Yui. A timeout, quiet observation
|
|
10
|
+
or failed attempt proves neither stopped execution nor failed business
|
|
11
|
+
acceptance. Recovery grants no new Task, model, account or resource authority.
|
|
12
|
+
|
|
13
|
+
Read only the complete procedure for the action actually needed:
|
|
14
|
+
|
|
15
|
+
- **Failed native Turn/launch, configuration/model-name failure, Provider retry
|
|
16
|
+
or manual successor:** [Failed execution](execution-failure.md). Inspect the
|
|
17
|
+
exact failure and current retry projection before choosing an attempt; do not
|
|
18
|
+
duplicate Controller-owned recovery.
|
|
19
|
+
- **Deliberate authorized Session replacement:** [Session replacement](session-replacement.md).
|
|
20
|
+
Failure alone does not require replacement. Preserve successor context and
|
|
21
|
+
exact stop/writer proof; replacing yourself ends the native turn.
|
|
22
|
+
- **Unknown delivery, unavailable Controller or failed cleanup:**
|
|
23
|
+
[Execution uncertainty](uncertain-execution.md). Diagnostic access needs no
|
|
24
|
+
preliminary successful RPC; restart/cleanup still needs its existing authority.
|
|
25
|
+
- **Host protocol/custody or persistence failure, or Host replacement during
|
|
26
|
+
an upgrade:** [Host custody](host-custody.md). An ordinary Controller outage
|
|
27
|
+
alone does not trigger this procedure.
|
|
28
|
+
|
|
29
|
+
Several actions may apply: read each triggered procedure, not every branch.
|
|
30
|
+
Follow further links only at their stated action. For retained input claims,
|
|
31
|
+
failed ACK or Session-successor handling, also use
|
|
32
|
+
[Inbox recovery](inbox-recovery.md); recovery notices do not settle inputs.
|
|
33
|
+
After recovery inspect prior work and external receipts before continuing;
|
|
34
|
+
preserve unresolved facts rather than broadening cleanup or adding retry loops.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Desktop and managed Session identity
|
|
2
|
+
|
|
3
|
+
Desktop commands may carry only `CODEX_THREAD_ID`. The CLI resolves that native
|
|
4
|
+
identity against the selected Home's current and historical Session records before
|
|
5
|
+
routing operations. An unknown provider thread with no Yui-specific identity hints
|
|
6
|
+
is an ordinary public caller, like a user terminal; it needs no managed Manifest
|
|
7
|
+
to read public information or create a Draft Task. This does not start discussion
|
|
8
|
+
or development or grant internal managed capabilities. Public command availability
|
|
9
|
+
is not user authorization for a new effect.
|
|
10
|
+
Environment and Manifest values are location hints, not continuing grants.
|
|
11
|
+
Conflicting, partially specified, unregistered Yui identities and known historical
|
|
12
|
+
or revoked Sessions do not become public callers. An ID known only in another
|
|
13
|
+
Home cannot be recognized from the selected Home alone: keep the intended
|
|
14
|
+
Home/Manifest context rather than switching Homes or dropping hints.
|
|
15
|
+
`inbox list` reports the resolved managed identity. Do not add or clear
|
|
16
|
+
environment fields to repair a mismatch. Without a Manifest environment pointer,
|
|
17
|
+
`session skills` returns current Skill paths and the Session's captured profile.
|
|
18
|
+
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Deliberate Session replacement
|
|
2
|
+
|
|
3
|
+
Read before an authorized Session replacement, not merely because a Turn failed.
|
|
4
|
+
Apply the common boundaries in [Runtime recovery](recovery.md) first.
|
|
5
|
+
|
|
6
|
+
## Replace a Session deliberately
|
|
7
|
+
|
|
8
|
+
An authorized Leader or Operator may request:
|
|
9
|
+
|
|
10
|
+
```sh
|
|
11
|
+
yui task role session new <task> <role> --reason "<reason>"
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
The old Run may still be active, the Session may already be released, or fresh
|
|
15
|
+
context may simply be preferable. Save necessary requirements, decisions,
|
|
16
|
+
progress and results first. Yui persists replacement intent, stops the exact
|
|
17
|
+
execution and retires its engineering attempts while retaining Task history and
|
|
18
|
+
workspaces. Do not manipulate Run status, delete context or change models to
|
|
19
|
+
make replacement legal.
|
|
20
|
+
|
|
21
|
+
When replacing yourself, end the native turn. The successor reads durable Task
|
|
22
|
+
context and fixed notification references, then chooses which still-valid
|
|
23
|
+
assignment to continue. Released Leaders retain scoped diagnostic reads but
|
|
24
|
+
cannot regain write authority.
|
|
25
|
+
|
|
26
|
+
Leader initialization is delivered separately from old inbox handling and
|
|
27
|
+
new queued business. A retained claim cannot block this lifecycle notification.
|
|
28
|
+
The current Leader reads `yui inbox list --view history --json`, then the exact originals and
|
|
29
|
+
prior effects. Claims survive unchanged; use `inbox ack` only after actual
|
|
30
|
+
handling, with the successor's own disposition. Do not claim an already-claimed
|
|
31
|
+
entry again. Repeated reconciliation or Controller restart does not settle
|
|
32
|
+
anything or repeatedly wake an idle handler.
|
|
33
|
+
|
|
34
|
+
A legally started GlobalRole successor with claims from a previous Session
|
|
35
|
+
receives one Session-pinned recovery Message in its existing inbox. It requests
|
|
36
|
+
the same inspection, not replay of those Messages. A stopped Global Session
|
|
37
|
+
is not started by this notice. Worker/Reviewer Assignment changes still require
|
|
38
|
+
the existing explicit handoff or retirement; no bulk transfer is implied.
|
|
39
|
+
|
|
40
|
+
Replacement waits for exact native/resource stop and writer release. Missing
|
|
41
|
+
proof requires repairing that observation or a genuinely missing user decision,
|
|
42
|
+
not a timeout, another name, force-ACK or record deletion. Uncertain old
|
|
43
|
+
notification submissions are released from scheduling without replay, retaining
|
|
44
|
+
their fixed wakes and `notification.resolved` evidence. They become explicitly
|
|
45
|
+
inspectable/settleable, not automatically accepted or resubmitted.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Unknown execution and unavailable Controller
|
|
2
|
+
|
|
3
|
+
Read for unknown delivery, an unavailable Controller or failed exact cleanup.
|
|
4
|
+
Apply the common boundaries in [Runtime recovery](recovery.md) first.
|
|
5
|
+
|
|
6
|
+
## Handle uncertainty and failed cleanup
|
|
7
|
+
|
|
8
|
+
Never replay a notification whose acceptance is unknown. After evidence
|
|
9
|
+
establishes shared-native quiescence, an authorized supervisor can use:
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
yui task wake resolve <task> <wake> --reason "<quiescence evidence>"
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
This releases only the claim, preserves the original unknown record, and lets
|
|
16
|
+
independent later inputs proceed. It neither asserts acceptance nor implements
|
|
17
|
+
the Message. Uncertain native activity still blocks conflicting execution;
|
|
18
|
+
unrelated authorized local work can continue.
|
|
19
|
+
|
|
20
|
+
If the Controller is unresponsive, an authorized Operator can use
|
|
21
|
+
`controller status` and explicit `controller restart` without a successful
|
|
22
|
+
preliminary RPC. Preserve the resource and restart authorization boundary.
|
|
23
|
+
If exact native stop or inspection fails, read the persisted diagnostic and
|
|
24
|
+
resolve that resource boundary; do not kill arbitrary processes, clear unknown
|
|
25
|
+
execution records, or modify managed refs, tmux Sessions or state files.
|
|
26
|
+
|
|
27
|
+
After repeated failure of the same bounded recovery, report the observed
|
|
28
|
+
cause, impact and smallest remaining options. Do not broaden cleanup or add
|
|
29
|
+
a private retry loop. A failed recovery does not erase the pending requirement.
|
|
@@ -8,8 +8,10 @@ description: Complete a bounded Yui WorkItem AgentRun or native child assignment
|
|
|
8
8
|
Follow [yui-runtime](../yui-runtime/SKILL.md) first, including its per-turn
|
|
9
9
|
version/availability check and conditional full reload. For a managed AgentRun,
|
|
10
10
|
load its exact Context Pack and
|
|
11
|
-
use
|
|
12
|
-
|
|
11
|
+
use the returned WorkItem, workspace, writable Project IDs, and completion
|
|
12
|
+
actions as execution boundaries. Ordinary relevant evidence reads follow
|
|
13
|
+
Runtime's resource access rules; they never expand the Assignment.
|
|
14
|
+
The launch Envelope is a pointer, not an execution brief.
|
|
13
15
|
|
|
14
16
|
Complete the assigned WorkItem, or the bounded parent brief for a native child
|
|
15
17
|
without its own WorkItem. Do not create records merely to fit this Skill.
|
|
@@ -36,8 +38,9 @@ Report genuine scope conflicts to Leader; older stage-only wording is not a
|
|
|
36
38
|
new prohibition after a legally authorized handoff.
|
|
37
39
|
|
|
38
40
|
Leader clarification and continuation arrive as Messages in the exact bounded
|
|
39
|
-
Context Pack. Read those
|
|
40
|
-
|
|
41
|
+
Context Pack. Read those refs and relevant current originals without requiring
|
|
42
|
+
redispatch/status changes merely to answer a question. Reading another
|
|
43
|
+
Assignment's message does not adopt or acknowledge it.
|
|
41
44
|
Continuation preserves the original Assignment, effective permissions and
|
|
42
45
|
workspace, including unfinished files. If you need clarification, preserve
|
|
43
46
|
those files and report the question; a final question is not WorkItem completion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
4
|