@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,57 @@
|
|
|
1
|
+
# Select the owning outcome
|
|
2
|
+
|
|
3
|
+
Read when Task identity is missing or ambiguous, creating a new Task, or deciding
|
|
4
|
+
whether a changed requirement belongs to an existing outcome. An exact known Task
|
|
5
|
+
uses its current context directly, not a catalog search.
|
|
6
|
+
|
|
7
|
+
When input names a Task (including an exact Task notice), start with its current
|
|
8
|
+
Context and referenced originals; do not rediscover it through Project/Task
|
|
9
|
+
catalogs. Otherwise use `yui task list --json` with Project/status/search
|
|
10
|
+
filters to locate the bounded outcome, and `yui project list` only when Project
|
|
11
|
+
identity is needed. Read `yui task context <candidate-task-id>` before routing.
|
|
12
|
+
|
|
13
|
+
Task listing is bounded: follow `nextCursor` with the same filters only when
|
|
14
|
+
more candidates are needed, never traverse all pages by default.
|
|
15
|
+
Attention counts cover the authorized catalog before ordinary
|
|
16
|
+
filters and pagination. Follow a category's `--attention` query to enumerate
|
|
17
|
+
its affected Tasks, clearing ordinary filters and retaining its `all` flag.
|
|
18
|
+
`executionSignals` are conservative raw inspection
|
|
19
|
+
candidates (including live Runs and open work), not a computed failure or
|
|
20
|
+
execution status. Inspect the selected Task's Context and original Messages
|
|
21
|
+
before routing or deciding; a summary/ref is not the requirement or report.
|
|
22
|
+
|
|
23
|
+
Route new input to an existing Task when it advances, corrects, narrows, or
|
|
24
|
+
extends the same bounded outcome and shares final acceptance, delivery, or
|
|
25
|
+
rollback. Development, local completion, PR/MR submission, merge and ordinary
|
|
26
|
+
follow-up fixes are not inherently separate outcomes. Keep their original
|
|
27
|
+
authorization, acceptance and Publication traceable in the owning Task.
|
|
28
|
+
|
|
29
|
+
Create a new Task for a genuinely independent outcome that can be accepted,
|
|
30
|
+
delivered and rolled back separately, or when the user explicitly asks for a new
|
|
31
|
+
Task. State the substantive new outcome or explicit instruction in its routed
|
|
32
|
+
context. An old Task being completed, needing revalidation, sharing files or
|
|
33
|
+
needing a PR is not that reason. A blocked continuation is a boundary to report,
|
|
34
|
+
not evidence that the result has become independent.
|
|
35
|
+
|
|
36
|
+
Repository, file overlap, technical layer, request size, and Task type do not
|
|
37
|
+
determine Task identity. They also do not determine WorkItem count. Let
|
|
38
|
+
isolated workspaces and Integration handle independent Git changes.
|
|
39
|
+
|
|
40
|
+
Keep the Task title concise and put detailed intent, constraints, and evidence
|
|
41
|
+
in its description or routed Message.
|
|
42
|
+
|
|
43
|
+
Resolve all known Projects before repository-backed execution. A stable Project
|
|
44
|
+
checkout is read-only reference state, not the Task base authority. Yui records
|
|
45
|
+
the Task's remote baseline when creating its managed workspace; do not route
|
|
46
|
+
work by copying or modifying the stable checkout.
|
|
47
|
+
|
|
48
|
+
When the user changes an existing requirement, submit the semantic delta and
|
|
49
|
+
its reason to the same Task. Let the Leader reassess the current design and
|
|
50
|
+
retire or replace only work invalidated by that change. Do not rewrite history,
|
|
51
|
+
restart unaffected work, or create a new Task merely because the implementation
|
|
52
|
+
approach changed.
|
|
53
|
+
|
|
54
|
+
Do not create WorkItems at routing time. The Leader decides execution topology
|
|
55
|
+
from current ownership and acceptance boundaries. A WorkItem is justified only
|
|
56
|
+
for a substantial independently useful requirement, not for investigation,
|
|
57
|
+
phases, files, tests, reviews, findings, or small repairs.
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Submit intent without starting unrequested work
|
|
2
|
+
|
|
3
|
+
Read before creating/submitting a Task request or requesting Draft activation.
|
|
4
|
+
A routing operation is not implementation or resumption by the Task Leader.
|
|
5
|
+
|
|
6
|
+
Treat Task creation and Task submission as separate user-authorized actions.
|
|
7
|
+
When the user asks only to add, create, register, or record a Task, create the
|
|
8
|
+
Draft and write all known requirements into its metadata, then stop. Do not
|
|
9
|
+
submit a `discuss` or `develop` Message, request activation, start a Leader
|
|
10
|
+
Session, or create execution resources. A detailed or immediately actionable
|
|
11
|
+
requirement, or the user's desire for its eventual completion, is not permission
|
|
12
|
+
to start it. Report that the Task is a Draft and has not started, and explain
|
|
13
|
+
that the user can explicitly ask to discuss/plan it or to develop/implement it.
|
|
14
|
+
|
|
15
|
+
Start the corresponding route only when the user's current request contains
|
|
16
|
+
that additional intent: discussion or planning authorizes `discuss`;
|
|
17
|
+
development, implementation, fixing, continuing execution, or immediate
|
|
18
|
+
progress authorizes `develop` or the applicable lifecycle continuation. Do not
|
|
19
|
+
weaken explicit intent merely because the request also says “create a Task.”
|
|
20
|
+
The examples below are separate operations, never an automatic
|
|
21
|
+
create/submit/activate sequence.
|
|
22
|
+
|
|
23
|
+
Discussion does not authorize delivery; follow the Leader's
|
|
24
|
+
[planning and activation boundary](../../yui-leader/references/planning.md) before
|
|
25
|
+
activation. Simple queries and record-only input need no reopening. An authorized
|
|
26
|
+
same-result follow-up or explicitly identified unfulfilled commitment can require
|
|
27
|
+
tracked diagnosis, evidence handoff, coordination or delivery after reopening;
|
|
28
|
+
diagnosis remains read-only unless changes are requested. First read
|
|
29
|
+
[same-Task delivery](task-delivery.md), not Draft activation.
|
|
30
|
+
|
|
31
|
+
```sh
|
|
32
|
+
yui operator submit "<related request and delta>" --task <task-id> --intent discuss
|
|
33
|
+
yui task create "<independent outcome>" \
|
|
34
|
+
--project <project> --base <project>=<ref>
|
|
35
|
+
yui operator submit "<request and routing context>" --task <new-task-id> --intent develop
|
|
36
|
+
yui task activation request <new-task-id> --request-id <id> --environment <plan>
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Inspect an existing request before creating another. `task activate <task-id>`
|
|
40
|
+
can adopt an eligible request in the foreground; it never activates a Draft
|
|
41
|
+
without a recorded request and environment plan.
|
|
42
|
+
|
|
43
|
+
After the user has authorized a submission, choose its intent explicitly; it is
|
|
44
|
+
never inferred by the CLI from the message text. `discuss` (the CLI default when
|
|
45
|
+
`operator submit` is already being invoked) routes the Draft to planning;
|
|
46
|
+
`record` saves the message without waking the Leader; `develop` asks an unplanned
|
|
47
|
+
Draft to activate now, and reports the exact next step when it cannot (already
|
|
48
|
+
planned → request activation explicitly; execution stopped → start it first).
|
|
49
|
+
The CLI default is not permission for the Operator to invoke submission after a
|
|
50
|
+
creation-only request. Pass `--request-id <key>` to make a submission idempotent:
|
|
51
|
+
retrying the same key returns the original message and routing instead of
|
|
52
|
+
creating a duplicate, and the same key with different text is refused as a
|
|
53
|
+
conflict.
|
|
54
|
+
|
|
55
|
+
For quote-sensitive text, nested JSON or long bodies, read
|
|
56
|
+
[Safe body transport](body-transport.md) before constructing the submission.
|
|
@@ -37,7 +37,7 @@ Separate lifecycle, execution gate and Session authority:
|
|
|
37
37
|
- A completed, unarchived Task has separate local acceptance and remote delivery
|
|
38
38
|
facts. An explicit user request to continue the same result authorizes the
|
|
39
39
|
necessary `task reopen` before submitting that bounded request. Follow the
|
|
40
|
-
[authorized two-step path](../../yui-runtime/references/
|
|
40
|
+
[authorized two-step path](../../yui-runtime/references/completed-followup.md);
|
|
41
41
|
do not require a second mechanical “reopen” confirmation.
|
|
42
42
|
The current matching Leader may perform that reopen itself and continue
|
|
43
43
|
an already-received request; it need not send the work back to Operator.
|
|
@@ -50,7 +50,10 @@ Use the existing reopen and submission operations, not an invented auto-reopen
|
|
|
50
50
|
option or a new delivery Task. Reopening and saving input have separate receipts;
|
|
51
51
|
inspect current state after a failure and retain the original request identity.
|
|
52
52
|
Only a real missing authority, resource or unresolved execution boundary calls
|
|
53
|
-
for escalation.
|
|
53
|
+
for escalation. Simple queries and ordinary reads stay completed. Tracked
|
|
54
|
+
same-result diagnosis, evidence handoff or necessary coordination can instead
|
|
55
|
+
follow the shared post-completion boundary; diagnosis remains read-only.
|
|
56
|
+
Do not implicitly restore cancelled intent,
|
|
54
57
|
use archived workspaces, restart a separate execution stop, or claim rejected
|
|
55
58
|
input was saved.
|
|
56
59
|
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Web lifecycle
|
|
2
|
+
|
|
3
|
+
For user-requested Web lifecycle operations, use `yui web`, `yui web --status`
|
|
4
|
+
and `yui web --stop` with the current Operator identity and intended Home.
|
|
5
|
+
Operator starts return a Controller-owned receipt without holding this turn
|
|
6
|
+
open. Non-loopback binding requires `--auth-file <absolute-path>` containing
|
|
7
|
+
an owner-only (0600) regular file with a unique 32–128 character printable ASCII
|
|
8
|
+
password; browser username is `yui`. There is no default password.
|
|
9
|
+
Honor the user's exact network exposure and credential scope. Never clear
|
|
10
|
+
managed identity, impersonate a browser user, launch a bypass server or restart
|
|
11
|
+
the Controller merely to open Web. Report actual access URLs and failures,
|
|
12
|
+
never a wildcard address or an old snapshot as a working link. Explain that
|
|
13
|
+
HTTP is unencrypted, and keep credentials out of messages, logs and URLs.
|
|
14
|
+
Lifecycle authority does not authenticate visitors. On unknown startup outcome,
|
|
15
|
+
inspect status before retrying; a running listener is not proof of remote reachability.
|
|
16
|
+
Stopping Web closes browser connections without stopping Agents. Password
|
|
17
|
+
rotation requires explicit stop/start; changing the file alone does not revoke
|
|
18
|
+
the running credential. Controller recovery does not automatically reopen Web.
|
|
19
|
+
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// Local, read-only transport comparison. This does not establish source
|
|
2
|
+
// semantics, authority, downstream completion or permission to acknowledge.
|
|
3
|
+
import { readFileSync } from "node:fs";
|
|
4
|
+
import { createHash } from "node:crypto";
|
|
5
|
+
|
|
6
|
+
try {
|
|
7
|
+
const args = process.argv.slice(2);
|
|
8
|
+
const [receiptFile, payloadFile, taskId, intent, submissionKey] = args;
|
|
9
|
+
if (args.length !== 5 || args.some(arg => !arg)
|
|
10
|
+
|| !["record", "discuss", "develop"].includes(intent)) {
|
|
11
|
+
throw new Error("Usage: node verify-submission.mjs <receipt.json> <payload> <task-id> <record|discuss|develop> <request-id>");
|
|
12
|
+
}
|
|
13
|
+
const receiptText = readFileSync(receiptFile, "utf8");
|
|
14
|
+
let receipt;
|
|
15
|
+
try {
|
|
16
|
+
receipt = JSON.parse(receiptText);
|
|
17
|
+
} catch {
|
|
18
|
+
throw new Error("Invalid JSON receipt; retain the original file for inspection.");
|
|
19
|
+
}
|
|
20
|
+
const message = receipt?.data?.message;
|
|
21
|
+
if (receipt?.ok !== true || receipt.data?.taskId !== taskId
|
|
22
|
+
|| message?.taskId !== taskId || message?.intent !== intent
|
|
23
|
+
|| message?.submissionKey !== submissionKey
|
|
24
|
+
|| typeof message?.id !== "string" || !message.id) {
|
|
25
|
+
throw new Error("Saved submission identity or intent mismatch; retain evidence and inspect, do not resubmit.");
|
|
26
|
+
}
|
|
27
|
+
const payload = readFileSync(payloadFile);
|
|
28
|
+
const bodySha256 = createHash("sha256").update(payload).digest("hex");
|
|
29
|
+
if (message.bodyBytes !== payload.length || message.bodySha256 !== bodySha256) {
|
|
30
|
+
throw new Error("Saved body checksum missing or mismatched; retain evidence and inspect the exact saved Message, do not resubmit.");
|
|
31
|
+
}
|
|
32
|
+
console.log(JSON.stringify({ ok: true, taskId, messageId: message.id,
|
|
33
|
+
intent, submissionKey, bodyBytes: payload.length, bodySha256 }));
|
|
34
|
+
} catch (error) {
|
|
35
|
+
console.error(JSON.stringify({ ok: false, message: error instanceof Error ? error.message : String(error) }));
|
|
36
|
+
process.exitCode = 1;
|
|
37
|
+
}
|
|
@@ -32,8 +32,10 @@ frozen Project commits, and assigned workspace. Inspect those exact commits.
|
|
|
32
32
|
For a Run-backed Candidate, read its frozen `source-run` reference whose
|
|
33
33
|
`evidenceOf` names that Candidate, including every content page of the original
|
|
34
34
|
report. A summary or a newer Run is not a replacement. Missing historical
|
|
35
|
-
evidence is a bounded infrastructure diagnosis, not permission to
|
|
36
|
-
|
|
35
|
+
evidence is a bounded infrastructure diagnosis, not permission to replace the
|
|
36
|
+
frozen source with a newer report. Relevant ordinary reads follow Runtime's
|
|
37
|
+
resource access rules, but cannot reconstruct missing frozen evidence or widen
|
|
38
|
+
this Review. Do not require the Leader to manually copy an accessible report.
|
|
37
39
|
The current mutable Task-main checkout is context only and must never replace,
|
|
38
40
|
widen, or silently update the assigned Review scope.
|
|
39
41
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
6
|