@zq-silk/yui 0.15.11 → 0.15.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/ARCHITECTURE.md +8 -4
- package/ARCHITECTURE.zh-CN.md +5 -2
- package/README.md +13 -5
- package/dist/agentRun/agentRun.js +3 -0
- package/dist/cli/commandCatalog.js +38 -10
- package/dist/cli/interactionPolicy.js +4 -0
- package/dist/cli/managedDiagnostics.js +1 -1
- package/dist/cli.js +46 -15
- package/dist/commands/executionAuditCommands.js +10 -0
- package/dist/commands/globalRoleCommands.js +27 -2
- package/dist/commands/projectCommands.js +44 -15
- package/dist/commands/taskCommands.js +95 -33
- package/dist/commands/taskIntegrationCommands.js +3 -1
- package/dist/commands/taskOverviewCommand.js +4 -3
- package/dist/commands/taskPublicationAdoptCommand.js +127 -0
- package/dist/commands/taskPublicationCommands.js +11 -2
- package/dist/commands/taskPublicationVerifyCommand.js +23 -39
- package/dist/commands/taskRemoteDeliveryCommand.js +18 -7
- package/dist/context/runContextPack.js +3 -0
- package/dist/context/taskCatalog.js +187 -0
- package/dist/context/taskContext.js +17 -4
- package/dist/controller/controller.js +11 -2
- package/dist/controller/fileSchedulerStoreAdapter.js +80 -19
- package/dist/controller/globalInputDelivery.js +13 -0
- package/dist/controller/providerRetryAdmission.js +100 -0
- package/dist/controller/providerRetryDelivery.js +218 -0
- package/dist/controller/runtime.js +36 -1
- package/dist/integration/gitIntegrationService.js +19 -6
- package/dist/lifecycle/exactRunTerminalization.js +4 -1
- package/dist/message/globalProviderRetry.js +15 -0
- package/dist/observability/executionAudit.js +19 -0
- package/dist/repository/gitWorkspace.js +371 -105
- package/dist/repository/projectMaintenanceLock.js +75 -18
- package/dist/repository/taskWorkspaceCoordinator.js +71 -124
- package/dist/repository/taskWorkspacePreparer.js +86 -24
- package/dist/repository/workspaceCleanupInspection.js +187 -0
- package/dist/runtime/agentError.js +5 -3
- package/dist/runtime/agentHost.js +28 -11
- package/dist/runtime/builtinAgentErrorMappers.js +91 -0
- package/dist/runtime/codexAppServerRuntime.js +34 -3
- package/dist/runtime/providerControl.js +5 -1
- package/dist/runtime/providerRetry.js +198 -0
- package/dist/runtime/providerRuntimeIdentity.js +28 -2
- package/dist/runtime/sessionTokenMetrics.js +15 -5
- package/dist/runtime/structuredProviderHost.js +6 -2
- package/dist/runtime/taskUsageMetrics.js +275 -0
- package/dist/scheduler/activeRoleRunDelivery.js +12 -0
- package/dist/scheduler/leaderWakeupProcessor.js +5 -0
- package/dist/scheduler/taskExecutionProjection.js +26 -5
- package/dist/scheduler/taskObservabilityProjection.js +6 -44
- package/dist/storage/sqliteSchema.js +31 -0
- package/dist/storage/sqliteStore.js +17 -0
- package/dist/storage/storageVersions.js +1 -1
- package/dist/storage/storeRpc.js +1 -0
- package/dist/storage/taskCatalog.js +123 -0
- package/dist/storage/taskStore.js +2 -0
- package/dist/task/archiveDiagnostics.js +1 -0
- package/dist/task/archivePreflight.js +124 -0
- package/dist/task/publicationAdoption.js +56 -0
- package/dist/task/publicationReference.js +10 -0
- package/dist/task/remoteDelivery.js +31 -16
- package/dist/web/assets/client/app.js +92 -17
- package/dist/web/assets/client/components.js +55 -13
- package/dist/web/assets/client/i18n.js +72 -4
- package/dist/web/assets/client/taskSurface.js +2 -1
- package/dist/web/assets/client/view.js +35 -7
- package/dist/web/assets/shell.js +6 -0
- package/dist/web/assets/styles/layout.js +7 -0
- package/dist/web/webServer.js +14 -3
- package/dist/web/webSnapshot.js +12 -3
- package/dist/workspace/cleanupInspection.js +63 -0
- package/dist/workspace/workItemChangeSetManager.js +110 -50
- package/docs/agent-result-consumption.md +4 -0
- package/docs/agent-result-consumption.zh-CN.md +3 -0
- package/docs/agent-runtime-drivers.md +7 -0
- package/docs/agent-runtime-drivers.zh-CN.md +5 -0
- package/docs/architecture/README.md +2 -0
- package/docs/architecture/README.zh-CN.md +3 -1
- package/docs/architecture/capabilities-and-resources.md +30 -5
- package/docs/architecture/capabilities-and-resources.zh-CN.md +23 -3
- package/docs/managed-turn-and-session-runtime.md +47 -0
- package/docs/managed-turn-and-session-runtime.zh-CN.md +40 -0
- package/docs/observability/README.md +62 -0
- package/docs/observability/README.zh-CN.md +47 -0
- package/docs/project-refresh.md +77 -0
- package/docs/project-refresh.zh-CN.md +59 -0
- package/docs/provider-retry.md +70 -0
- package/docs/task-delivery.md +133 -13
- package/docs/task-delivery.zh-CN.md +99 -10
- package/docs/task-discovery.md +102 -0
- package/docs/task-discovery.zh-CN.md +86 -0
- package/docs/testing/verification-levels.md +16 -0
- package/docs/testing/verification-levels.zh-CN.md +13 -1
- package/i18n/README.zh-CN.md +13 -7
- package/package.json +1 -1
- package/skills/yui-leader/references/execution.md +3 -2
- package/skills/yui-operator/SKILL.md +13 -2
- package/skills/yui-reviewer/SKILL.md +4 -0
- package/skills/yui-runtime/SKILL.md +17 -2
- package/skills/yui-runtime/references/publication.md +26 -4
- package/skills/yui-runtime/references/recovery.md +24 -0
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
<p align="right"><strong>English</strong> | <a href="./task-discovery.zh-CN.md">简体中文</a></p>
|
|
2
|
+
|
|
3
|
+
# Bounded Task discovery
|
|
4
|
+
|
|
5
|
+
Agents discover candidates with `yui task list --view compact --json`, then
|
|
6
|
+
read the selected Task's Context and original Messages. The catalog is a
|
|
7
|
+
current read, not a summary database, a Context snapshot, an acknowledgement,
|
|
8
|
+
or an execution/acceptance decision.
|
|
9
|
+
|
|
10
|
+
The explicit compact view keeps `task list --json` and `--verbose` detailed
|
|
11
|
+
outputs unchanged for existing consumers. The built-in Operator uses compact;
|
|
12
|
+
internal interactive selectors retain their complete `{id,title,status}` array
|
|
13
|
+
and read only those columns. Web uses the same compact query at
|
|
14
|
+
`GET /api/dashboard?view=compact`; its existing dashboard and Task detail
|
|
15
|
+
endpoints retain execution, observability, usage and remote-delivery fields.
|
|
16
|
+
No storage schema or migration changes are required.
|
|
17
|
+
|
|
18
|
+
## Query and page contract
|
|
19
|
+
|
|
20
|
+
```sh
|
|
21
|
+
yui task list --view compact --project project-1 --status active --limit 20 --json
|
|
22
|
+
yui task list --view compact --attention openInputs --json
|
|
23
|
+
yui task list --view compact --search "candidate title" --json
|
|
24
|
+
yui task context task-1 --json
|
|
25
|
+
yui task context inspect task-1 --store task --ref task-1 --digest <digest> --json
|
|
26
|
+
yui task message show task-1/message-1 --json
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
`--project` accepts an exact Project ID. Search matches ID, title, tags and
|
|
30
|
+
Project name using SQLite substring comparison (ASCII case-insensitive;
|
|
31
|
+
non-ASCII characters compare literally). Default scope excludes archived
|
|
32
|
+
Tasks; `--all` or `--status archived` includes them. Counts declare that scope,
|
|
33
|
+
not an invisible global total. Status/search/Project/attention filters apply
|
|
34
|
+
to `total` and the returned Tasks, not the scope-wide attention summary.
|
|
35
|
+
|
|
36
|
+
The default limit is 20, maximum 100. Successful JSON responses, including the
|
|
37
|
+
CLI envelope, fit 32 KiB. UTF-8 summaries are at most 512 bytes; titles are
|
|
38
|
+
at most 256 bytes. Truncation is explicit. IDs, digests and cursors are never
|
|
39
|
+
truncated. Oversized mandatory metadata produces a bounded error, not a
|
|
40
|
+
non-progressing successful page. A missing Brief is reported as missing.
|
|
41
|
+
|
|
42
|
+
Order is ascending `(createdAt, id)` with SQLite binary ID ordering. Repeat
|
|
43
|
+
all filters and the limit with `--cursor <nextCursor>`. A null cursor ends the
|
|
44
|
+
page sequence; byte limits can end a page before its requested item limit.
|
|
45
|
+
The first page fixes the largest matching creation key. Newer creation keys
|
|
46
|
+
are excluded until refresh. Each later page reads current facts: lifecycle or
|
|
47
|
+
filter membership changes can affect the enumeration. This is not a frozen
|
|
48
|
+
snapshot, and unrelated runtime events do not invalidate a cursor.
|
|
49
|
+
|
|
50
|
+
Each Task and attention sample has a real Task Context ref
|
|
51
|
+
(`taskId, store, refId, revision, digest`). The digest covers the original
|
|
52
|
+
Task, not the clipped preview or Brief. Read Task Context for the current
|
|
53
|
+
Brief and use Context inspect for a digest-checked original. A changed digest
|
|
54
|
+
is rejected; a ref never grants authority or implies the requirement was read.
|
|
55
|
+
|
|
56
|
+
## Attention without full history
|
|
57
|
+
|
|
58
|
+
Every page, including a filtered empty page, reports the same authorized
|
|
59
|
+
catalog's current attention. Each category contains a record/signal count,
|
|
60
|
+
affected-Task count, up to four exact Task refs, omitted-Task-ref count, and a
|
|
61
|
+
filter for enumerating all affected Tasks:
|
|
62
|
+
|
|
63
|
+
Start that attention query without the previous status/search/Project filters
|
|
64
|
+
and retain its `all` flag. This preserves the declared catalog scope, including
|
|
65
|
+
archived Tasks when explicitly included.
|
|
66
|
+
|
|
67
|
+
| Category | Current stored facts |
|
|
68
|
+
| --- | --- |
|
|
69
|
+
| `openInputs` | Open InputRequests |
|
|
70
|
+
| `pendingOperations` | Queued/running durable Jobs |
|
|
71
|
+
| `unknownOperations` | Jobs with `unknown-needs-attention` |
|
|
72
|
+
| `executionSignals` | For active/draft Tasks: live Runs, open WorkItems or accepted WorkItems retaining a current replicated group, unresolved/failed Integrations, pending/running/failed Reviews, Leader failure, and pending/processing Leader mailbox |
|
|
73
|
+
|
|
74
|
+
`executionSignals` is deliberately conservative discovery, **not** the detailed
|
|
75
|
+
execution-status classifier. Healthy live work is included so runtime identity,
|
|
76
|
+
stall, failed-work and recovery attention cannot be hidden behind pagination
|
|
77
|
+
or require scanning every Task's historical events. Counts must not be read as
|
|
78
|
+
failure counts. Open the affected Task for its precise execution state and
|
|
79
|
+
source records; no report text is parsed into status. Web explicitly labels
|
|
80
|
+
these facts and offers category navigation. Selected detail survives paging,
|
|
81
|
+
filtering and refresh; only the detail read can establish absence.
|
|
82
|
+
|
|
83
|
+
Task Leader Sessions see only their own Task. Assignment-scoped Workers and
|
|
84
|
+
Reviewers use existing authorized Run Context instead of whole-Task discovery;
|
|
85
|
+
the catalog rejects their request before counting. Global non-Operator and
|
|
86
|
+
incomplete managed identities are rejected. Historical Leader diagnostic reads
|
|
87
|
+
retain their original Task scope. A cursor is scope/filter-bound continuation,
|
|
88
|
+
not a credential. Read operations do not consume messages, acknowledge jobs,
|
|
89
|
+
wake Roles or query providers.
|
|
90
|
+
|
|
91
|
+
## Cost boundary
|
|
92
|
+
|
|
93
|
+
SQLite queries existing catalog/status indexes and aggregates narrow facts
|
|
94
|
+
before selecting page rows. It does not decode all Task payloads, Runs,
|
|
95
|
+
Messages or Events into JavaScript, build all overviews and delete fields, or
|
|
96
|
+
construct per-Task Context. Only selected Tasks and bounded attention samples
|
|
97
|
+
are decoded and hashed for original refs.
|
|
98
|
+
|
|
99
|
+
Output and materialized rows are bounded. Database work still scales with
|
|
100
|
+
authorized Tasks and relevant index rows; search can inspect Task/Project JSON
|
|
101
|
+
inside SQLite. Exact refs still cost the selected original Task's payload size.
|
|
102
|
+
These are local cost boundaries, not constant-time or model-effect claims.
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
<p align="right"><a href="./task-discovery.md">English</a> | <strong>简体中文</strong></p>
|
|
2
|
+
|
|
3
|
+
# 有界任务发现
|
|
4
|
+
|
|
5
|
+
Agent 使用 `yui task list --view compact --json` 发现候选任务,再读取目标
|
|
6
|
+
Task Context 和原始 Message。目录是当前事实的只读视图,不是摘要数据库、
|
|
7
|
+
Context 快照、消息确认、执行判断或验收结论。
|
|
8
|
+
|
|
9
|
+
显式 compact 视图不改变既有 `task list --json`、`--verbose` 详细输出。
|
|
10
|
+
内建 Operator 采用 compact;交互选择器保持完整的 `{id,title,status}` 数组,
|
|
11
|
+
只读取这些窄字段。Web 通过 `GET /api/dashboard?view=compact` 使用同一查询;
|
|
12
|
+
原 dashboard 和 Task 详情接口保留执行、观测、用量和远端交付字段。
|
|
13
|
+
本功能不改变持久 schema,无需迁移。
|
|
14
|
+
|
|
15
|
+
## 查询和分页合同
|
|
16
|
+
|
|
17
|
+
```sh
|
|
18
|
+
yui task list --view compact --project project-1 --status active --limit 20 --json
|
|
19
|
+
yui task list --view compact --attention openInputs --json
|
|
20
|
+
yui task list --view compact --search "候选标题" --json
|
|
21
|
+
yui task context task-1 --json
|
|
22
|
+
yui task context inspect task-1 --store task --ref task-1 --digest <digest> --json
|
|
23
|
+
yui task message show task-1/message-1 --json
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
`--project` 接受精确 Project ID。搜索按 SQLite 子串匹配 ID、标题、标签和
|
|
27
|
+
Project 名称:ASCII 不区分大小写,非 ASCII 字符按字面比较。缺省范围排除
|
|
28
|
+
归档 Task;`--all` 或 `--status archived` 纳入归档。计数明确属于该范围,
|
|
29
|
+
不泄漏不可见的全局总数。状态、搜索、Project 和关注分类只筛选 `total`
|
|
30
|
+
及任务行,不缩小范围内的关注汇总。
|
|
31
|
+
|
|
32
|
+
缺省每页 20 项,最多 100 项。成功 JSON 响应连同 CLI envelope 不超过
|
|
33
|
+
32 KiB;摘要最多 512 UTF-8 字节,标题最多 256 字节,裁剪明确标记。
|
|
34
|
+
ID、digest 和 cursor 不裁剪。必要元数据过长时返回有界错误,不成功返回
|
|
35
|
+
无法前进的空页。Brief 缺失会明确显示。
|
|
36
|
+
|
|
37
|
+
顺序是 `(createdAt,id)` 升序,ID 按 SQLite binary 排序。后续请求带
|
|
38
|
+
`--cursor <nextCursor>`,并保留全部筛选参数和 limit。null cursor 表示结束;
|
|
39
|
+
字节预算可能使实际条数少于 limit。首页固定最大匹配创建键,较新创建键
|
|
40
|
+
留到刷新后读取。各页仍读取当前状态:生命周期和筛选成员变化可能影响枚举;
|
|
41
|
+
这不是冻结快照,不会因为无关运行时事件而作废游标。
|
|
42
|
+
|
|
43
|
+
每个任务和关注样本携带真实 Task Context ref:
|
|
44
|
+
`taskId,store,refId,revision,digest`。digest 覆盖原 Task,不是裁剪预览或
|
|
45
|
+
Brief。当前 Brief 通过 Task Context 读取;Context inspect 可校验 digest
|
|
46
|
+
后展开原文。digest 变化会拒绝旧引用;引用不赋予权限,也不表示需求已读。
|
|
47
|
+
|
|
48
|
+
## 不扫描全历史也不遗漏关注入口
|
|
49
|
+
|
|
50
|
+
每页(包括筛选后无匹配的空页)都返回同一授权目录范围的当前关注事实。
|
|
51
|
+
每类包括记录/信号数量、涉及 Task 数量、最多四个精确 Task ref、
|
|
52
|
+
省略的 Task ref 数量,以及枚举全部相关 Task 的筛选入口:
|
|
53
|
+
|
|
54
|
+
启动该关注查询时清除先前的状态、搜索、Project 筛选,并保留其 `all` 标记,
|
|
55
|
+
从而保持声明的目录范围,包括此前明确纳入的归档任务。
|
|
56
|
+
|
|
57
|
+
| 分类 | 当前存储事实 |
|
|
58
|
+
| --- | --- |
|
|
59
|
+
| `openInputs` | 未解决 InputRequest |
|
|
60
|
+
| `pendingOperations` | queued/running durable Job |
|
|
61
|
+
| `unknownOperations` | unknown-needs-attention Job |
|
|
62
|
+
| `executionSignals` | active/draft Task 中的活跃 Run、open WorkItem 或仍含当前复制执行组的 accepted WorkItem、未解决或失败 Integration、pending/running/failed Review、Leader failure、pending/processing Leader mailbox |
|
|
63
|
+
|
|
64
|
+
`executionSignals` 是保守的发现入口,**不是**详情的执行状态分类器。
|
|
65
|
+
健康的活跃工作也会被包括,从而不会因为分页而藏住运行身份、停滞、
|
|
66
|
+
工作失败或恢复相关的关注入口,也不必先扫描所有 Task 历史 Event。
|
|
67
|
+
这些计数不是失败计数;请打开任务读取精确执行状态和来源记录。
|
|
68
|
+
不解析报告正文推导状态。Web 明确标示这些事实并提供分类导航。
|
|
69
|
+
已选详情不因分页、筛选或刷新而丢失;只有详情读取可以确认目标不存在。
|
|
70
|
+
|
|
71
|
+
Task Leader Session 只能发现自己的 Task。Assignment-scoped Worker 和
|
|
72
|
+
Reviewer 使用既有授权 Run Context,目录会在计数前拒绝其全 Task 发现请求。
|
|
73
|
+
非 Operator 的 Global Session 和不完整的受管身份也会被拒绝。
|
|
74
|
+
历史 Leader 的诊断读取保持原 Task 范围。游标绑定范围及参数,不是凭证。
|
|
75
|
+
读取不会消费 Message、确认 Job、唤醒 Role 或查询外部 provider。
|
|
76
|
+
|
|
77
|
+
## 成本边界
|
|
78
|
+
|
|
79
|
+
SQLite 在现有目录及状态索引上聚合窄事实,再选取当前页。
|
|
80
|
+
不会在 JavaScript 中解码全部 Task 正文、Run、Message、Event,不会先
|
|
81
|
+
构造所有重型 Overview 再删字段,也不逐 Task 构造 Context。
|
|
82
|
+
仅当前页和有界关注样本会解码原 Task,并计算精确 ref。
|
|
83
|
+
|
|
84
|
+
输出和物化行有界;数据库工作量仍随授权 Task 和相关索引行增加,
|
|
85
|
+
搜索可能在 SQLite 内检查 Task/Project JSON。精确引用仍需承担选中
|
|
86
|
+
Task 原正文大小的成本。这些是本机成本边界,不是恒定时间或模型效果承诺。
|
|
@@ -61,6 +61,9 @@ regressions, and fast regressions do not establish real-model behavior.
|
|
|
61
61
|
16. explicit force archive commits before cleanup and preserves uncertain
|
|
62
62
|
delivery/runtime evidence; partial cleanup and late results remain traceable,
|
|
63
63
|
while archived runtime resources never become automatically safe to delete.
|
|
64
|
+
Archive preflight preserves durable records and the Git index, distinguishes
|
|
65
|
+
frozen-result differences, and cleanup rechecks moved heads, owner branches
|
|
66
|
+
and new dirt. Read-only Git status never executes configured clean filters.
|
|
64
67
|
17. Host facts reach the existing Inbox even when its compiled store cannot
|
|
65
68
|
read the Home; Controller-side fencing, ACK-loss replay, and legacy-Host
|
|
66
69
|
upgrade refusal preserve the original execution. A frozen independent v1
|
|
@@ -73,6 +76,16 @@ regressions, and fast regressions do not establish real-model behavior.
|
|
|
73
76
|
pre-fix released Hosts can be hot-patched.
|
|
74
77
|
Archive racing Host ingress retains the complete source envelope without
|
|
75
78
|
reopening the Task or settling original uncertain input.
|
|
79
|
+
18. Project maintenance waiters yield to the holder, use a shared 60-second
|
|
80
|
+
monotonic budget with independent 200–500ms jitter, and cancel on Controller
|
|
81
|
+
stop without losing activation intent. Disposable lock/SQLite/Git fixtures
|
|
82
|
+
cover exclusion, partial release and under-lock revalidation; injected time
|
|
83
|
+
checks the minute-long deadline without sleeping for a minute. Competing
|
|
84
|
+
activations each adopt their own workspace without replaying Git work.
|
|
85
|
+
19. Task usage distinguishes zero, partial and unknown across exact requests,
|
|
86
|
+
cumulative baselines, Session replacement and native child overlap. A small
|
|
87
|
+
event fixture checks direct Leader/parallel time semantics and the shared
|
|
88
|
+
CLI/Web/audit lifetime projection without collecting Provider data.
|
|
76
89
|
|
|
77
90
|
Keep the test phase seconds-scale; measure TypeScript build separately. Record
|
|
78
91
|
incremental runtime when adding a critical regression. The seven recovery boundary
|
|
@@ -83,6 +96,9 @@ The Integration continuation regressions use disposable Git repositories,
|
|
|
83
96
|
SQLite and fake Jobs, without a provider or shared Home. Their test bodies
|
|
84
97
|
take about 3 seconds on the development host; validation settlement adds
|
|
85
98
|
about 1.4 seconds to the initial 1.5-second coverage.
|
|
99
|
+
Archive preflight adds three small disposable Git/SQLite scenarios (about
|
|
100
|
+
one second of test bodies); broader owner/diagnostic combinations remain
|
|
101
|
+
temporary validation evidence, not a second permanent matrix.
|
|
86
102
|
|
|
87
103
|
## Skill and instruction changes
|
|
88
104
|
|
|
@@ -46,7 +46,9 @@ Yui 是一个单用户本地产品。永久验证保护关键的 happy path 和
|
|
|
46
46
|
15. 普通 Integration 冲突可直接继续;准确 Git 与 Job 证据恢复中断交付,
|
|
47
47
|
不重放已执行的步骤,也不把已发生的 CAS 与新的验证条件混为一谈。
|
|
48
48
|
16. 明确授权的 force archive 先提交归档,再独立记录清理;不确定输入与晚到
|
|
49
|
-
|
|
49
|
+
结果仍可追溯,归档不使保留资源自动变得可删除。归档预检不改变持久记录或
|
|
50
|
+
Git index,区分冻结结果差异;清理重查 HEAD、owner 分支和新增脏状态。
|
|
51
|
+
只读 Git 状态检查不执行配置的 clean filter。
|
|
50
52
|
17. 即使 Host 编译版本的存储代码无法读取 Home,事实仍先进入现有 Inbox;
|
|
51
53
|
Controller 侧归属校验、ACK 丢失重放和 legacy Host 升级拒绝保护原始执行。
|
|
52
54
|
独立冻结的 v1 协议生产者在真实 19→22 迁移前后保持同一进程,通过新 discovery
|
|
@@ -54,10 +56,20 @@ Yui 是一个单用户本地产品。永久验证保护关键的 happy path 和
|
|
|
54
56
|
在不向 Session 环境导出 Run ID 的前提下保留 scoped 启动证据。该 fixture 代表最低
|
|
55
57
|
支持的新线协议,不声称已发布的修复前 Host 可以原地热更新。
|
|
56
58
|
归档与 Host 消费交错时保留完整来源 envelope,不重新打开 Task 或结算原不确定输入。
|
|
59
|
+
18. Project 维护锁等待不阻塞持锁者,使用共享的 60 秒单调时钟预算与每次独立的
|
|
60
|
+
200–500ms 随机间隔;Controller 停止时取消等待,不丢失激活意图。
|
|
61
|
+
可丢弃锁、SQLite 和 Git fixture 覆盖排他、部分锁释放及取锁后重校验,
|
|
62
|
+
注入时钟验证一分钟截止逻辑,不实际等待一分钟;竞争激活各自采用工作区,
|
|
63
|
+
不重放 Git 操作。
|
|
64
|
+
19. Task 用量在精确请求、累计基线、Session 替换和原生子执行重叠下区分真实零、
|
|
65
|
+
部分与未知。小型事件 fixture 覆盖直接 Leader/并行耗时,以及 CLI/Web/audit
|
|
66
|
+
共享的全生命周期投影,不采集 Provider 数据。
|
|
57
67
|
|
|
58
68
|
把测试阶段保持在秒级;单独度量 TypeScript 构建。新增一个关键回归时记录其增量运行
|
|
59
69
|
时长。这七个恢复边界用例在开发主机上最初约增加 0.4 秒的测试体(独立运行约 0.6 秒,
|
|
60
70
|
含模块启动)。避免在永久套件中使用基于 sleep 的检查或强制的模型/daemon 启动。
|
|
71
|
+
归档预检新增三个可丢弃 Git/SQLite 场景,测试体约一秒;更广的 owner/诊断组合
|
|
72
|
+
保留为临时验证证据,不形成第二套永久矩阵。
|
|
61
73
|
|
|
62
74
|
## Skill 与指令变更
|
|
63
75
|
|
package/i18n/README.zh-CN.md
CHANGED
|
@@ -27,7 +27,7 @@ Yui 是面向编程 Agent 的本地控制面。你只需用自然语言把目标
|
|
|
27
27
|
- **自带 Agent** —— Codex CLI、Claude Code CLI 和 ACP 通过统一边界接入,
|
|
28
28
|
可替换而不丢失 Task。
|
|
29
29
|
- **本地优先、私有** —— 一切运行在你自己的机器上,面向单个受信任用户;
|
|
30
|
-
Web
|
|
30
|
+
Web 仅本地回环,包含只读视图和经认证的用户控制。
|
|
31
31
|
- **默认隔离** —— 仓库改动发生在受管 Git worktree 中,稳定 checkout 保持只读。
|
|
32
32
|
|
|
33
33
|
> **状态:** 尚未发布 1.0(0.15.x)。CLI 与配置在版本之间仍可能变化;每次升级
|
|
@@ -122,7 +122,10 @@ Agent 可以重新读取任务上下文,继续兼容的 Session,或在必要
|
|
|
122
122
|
进程失败不会抹掉任务,结果不确定的投递也不会被静默重复。
|
|
123
123
|
|
|
124
124
|
想直观看进展,可以在另一个终端运行 `yui web`。本地 Web 展示同一份任务与
|
|
125
|
-
|
|
125
|
+
待回答问题,也允许发送消息、回答问题,以及显式 queue、steer 或 interrupt Task 输入。
|
|
126
|
+
这些经认证的 Task 控制复用 CLI 的相同操作,不是另一套需要同步的任务系统。
|
|
127
|
+
详见 [Web 权限](../docs/architecture/capabilities-and-resources.zh-CN.md#cli-与-web)
|
|
128
|
+
和[输入时机](../docs/managed-turn-and-session-runtime.zh-CN.md#输入时机queuesteer-与-interrupt)。
|
|
126
129
|
|
|
127
130
|
## 架构
|
|
128
131
|
|
|
@@ -225,7 +228,7 @@ Yui 为你组织的东西 —— 是持久对象,而不是进程:
|
|
|
225
228
|
它负责搬运工作、记录事实——但从不判断回答好坏
|
|
226
229
|
|
|
227
230
|
Agent 在 Project 中工作:只读 checkout + 隔离 worktree。
|
|
228
|
-
Web
|
|
231
|
+
Web(yui web):本地回环视图 + 经认证的用户控制。
|
|
229
232
|
```
|
|
230
233
|
|
|
231
234
|
### 分层设计
|
|
@@ -234,7 +237,7 @@ Yui 为你组织的东西 —— 是持久对象,而不是进程:
|
|
|
234
237
|
|
|
235
238
|
```text
|
|
236
239
|
体验层 Experience — 你如何交互
|
|
237
|
-
CLI(Operator)· Web
|
|
240
|
+
CLI(Operator)· Web(本地回环、经认证)· 原生 Agent 会话
|
|
238
241
|
采集输入 · 展示事实 · 确认操作 · 调用能力
|
|
239
242
|
▼
|
|
240
243
|
决策层 Intelligence — 谁来决定
|
|
@@ -270,9 +273,12 @@ Yui 为你组织的东西 —— 是持久对象,而不是进程:
|
|
|
270
273
|
WorkItem open ─▶ accepted ─▶ retired
|
|
271
274
|
|
|
272
275
|
Draft 只保存规划;激活后才采用交付工作区。
|
|
273
|
-
|
|
276
|
+
普通归档需要工作已了结、worktree 干净,且不可重新打开。
|
|
274
277
|
```
|
|
275
278
|
|
|
279
|
+
明确授权的 force 归档可以保留未解决证据与不安全资源;它不证明交付,也不授权删除
|
|
280
|
+
这些资源。详见[归档合同](../docs/task-delivery.zh-CN.md#归档)。
|
|
281
|
+
|
|
276
282
|
## 设计原则
|
|
277
283
|
|
|
278
284
|
### Agent 做判断,Yui 保存工作事实
|
|
@@ -321,8 +327,8 @@ Yui 面向一个受信任本地用户,不是 OS 沙箱,也不是远程多用
|
|
|
321
327
|
|
|
322
328
|
## 深入了解
|
|
323
329
|
|
|
324
|
-
[总体架构](../ARCHITECTURE.md)介绍端到端设计,
|
|
325
|
-
[文档导航](../docs/architecture/README.md)提供配置、执行、交付、存储和插件的
|
|
330
|
+
[总体架构](../ARCHITECTURE.zh-CN.md)介绍端到端设计,
|
|
331
|
+
[文档导航](../docs/architecture/README.zh-CN.md)提供配置、执行、交付、存储和插件的
|
|
326
332
|
当前合同。想直接操作 CLI 时,使用 `yui --help` 查看命令。
|
|
327
333
|
|
|
328
334
|
Yui 默认将控制面数据保存在 `~/.yui`,通过 `YUI_HOME` 选择另一个实例。
|
package/package.json
CHANGED
|
@@ -327,8 +327,9 @@ reachable issues to the original execution owner. Fix a small Task-main issue
|
|
|
327
327
|
directly; create a Repair WorkItem only when the repair is itself a substantial
|
|
328
328
|
independently owned requirement.
|
|
329
329
|
|
|
330
|
-
A failed ReviewRound is an execution failure, not
|
|
331
|
-
|
|
330
|
+
A failed ReviewRound is an execution failure, not a repair wave. First read
|
|
331
|
+
its Provider retry projection: bounded infrastructure recovery may already own
|
|
332
|
+
the successor. Otherwise inspect its exact Round, AgentRun, candidate, Core failure, and
|
|
332
333
|
`task next-action` facts, then choose the smallest recovery that preserves the
|
|
333
334
|
frozen boundary. Do not invent a retry loop or silently replace the Reviewer
|
|
334
335
|
Session. For replicated execution, choose whether to retry a failed Producer,
|
|
@@ -38,11 +38,22 @@ Inspect current Projects, Tasks, and relevant Task context before routing:
|
|
|
38
38
|
|
|
39
39
|
```sh
|
|
40
40
|
yui project list
|
|
41
|
-
yui task list
|
|
42
|
-
yui task input list
|
|
41
|
+
yui task list --view compact --json
|
|
43
42
|
yui task context <candidate-task-id>
|
|
44
43
|
```
|
|
45
44
|
|
|
45
|
+
Use the bounded catalog for discovery, not the detailed legacy list or an
|
|
46
|
+
unconditional traversal of every page. Filter by Project/status/search when
|
|
47
|
+
useful; follow `nextCursor` with the same filters only when more candidates
|
|
48
|
+
are needed. Attention counts cover the authorized catalog before ordinary
|
|
49
|
+
filters and pagination. Follow a category's `--attention` query to enumerate
|
|
50
|
+
its affected Tasks, clearing ordinary filters and retaining its `all` flag.
|
|
51
|
+
`executionSignals` are conservative raw inspection
|
|
52
|
+
candidates (including live Runs and open work), not a computed failure or
|
|
53
|
+
execution status. Inspect the selected Task's Context and original Messages
|
|
54
|
+
before routing or deciding; a summary/ref is not the requirement or report.
|
|
55
|
+
The existing detailed list remains available to explicit legacy consumers.
|
|
56
|
+
|
|
46
57
|
Route new input to an existing Task when it advances, corrects, narrows, or
|
|
47
58
|
extends the same bounded outcome and shares final acceptance, delivery, or
|
|
48
59
|
rollback. Create a new Task only when the new outcome can succeed, fail,
|
|
@@ -60,6 +60,10 @@ binding fails before review begins:
|
|
|
60
60
|
explicitly so the Leader can judge what remains useful. Core records only
|
|
61
61
|
the execution boundary and never classifies the meaning of this prose.
|
|
62
62
|
|
|
63
|
+
If the current retry projection says infrastructure recovery is already
|
|
64
|
+
waiting or in flight, report that fact without recommending another dispatch.
|
|
65
|
+
Do not manage the retry yourself or reinterpret its preserved candidate.
|
|
66
|
+
|
|
63
67
|
The Review scope remains the current AgentRun's frozen candidate even if the Leader
|
|
64
68
|
handles new user input or advances Task main while this Review is running. Do
|
|
65
69
|
not switch to the newer head, cancel the current inspection, or claim the
|
|
@@ -92,8 +92,15 @@ the Operator has routed to its public/task-authorized context command; never
|
|
|
92
92
|
invent a Task AgentRun identity for a GlobalRole.
|
|
93
93
|
|
|
94
94
|
A GlobalRole's durable input uses the same three actions as a Task Role,
|
|
95
|
-
addressed by the Role's own name instead of a Task
|
|
96
|
-
|
|
95
|
+
addressed by the Role's own name instead of a Task. The local-user Web surface
|
|
96
|
+
exposes this contract. The current public CLI catalog does not register the
|
|
97
|
+
top-level `role` path, even though its handlers implement `yui role message
|
|
98
|
+
queue|steer` and `yui role interrupt`; CLI routing rejects these commands as
|
|
99
|
+
unknown. Report this availability gap when it prevents authorized work. Do not
|
|
100
|
+
invent another command, fabricate Task/Run ownership or borrow the browser's
|
|
101
|
+
user authority to bypass a managed Session boundary.
|
|
102
|
+
|
|
103
|
+
Queue and steer
|
|
97
104
|
save an owned Message; bare interrupt records a control request, not a new
|
|
98
105
|
Message. Each uses a stable request id and that Role's own Session; none fabricates a Task or
|
|
99
106
|
runId to reuse Task-scoped delivery. `queue` delivers at the Role's next legal
|
|
@@ -174,6 +181,14 @@ runtime identity and workspace progress; never edit Run status or substitute
|
|
|
174
181
|
a native Session behind Yui's back. A timeout is not proof of quiescence and
|
|
175
182
|
does not authorize replay of unknown input.
|
|
176
183
|
|
|
184
|
+
Qualifying transient Provider failures have bounded Controller-owned recovery.
|
|
185
|
+
Read the current `providerRetry`/`retry` projection before dispatching a manual
|
|
186
|
+
successor. `waiting` and `in-flight` mean infrastructure recovery is already
|
|
187
|
+
owned; do not add a private retry loop or resend the input. Only a proven native
|
|
188
|
+
success resets that chain, and it never accepts a WorkItem or completes a Task.
|
|
189
|
+
After recovery, inspect existing work and external receipts before continuing;
|
|
190
|
+
the system's recovery instruction supplies no new user authority.
|
|
191
|
+
|
|
177
192
|
After an authorized external PR/MR operation, use the shared
|
|
178
193
|
[publication recording contract](references/publication.md). Recording delivery
|
|
179
194
|
facts does not authorize the external operation, imply acceptance, or grant
|
|
@@ -13,6 +13,26 @@ deployment status. After merge, use `yui task publication verify` only when
|
|
|
13
13
|
current authorization covers that external provider read. Otherwise retain
|
|
14
14
|
reported evidence and state the verification gap.
|
|
15
15
|
|
|
16
|
+
Keep the completion head as the original acceptance evidence. If an authorized
|
|
17
|
+
post-completion integration produced a different publication candidate, record
|
|
18
|
+
its exact local commit, then read `task publication diff <task>/<publication>`.
|
|
19
|
+
Inspect the complete delta against the original acceptance, including removals,
|
|
20
|
+
conflict resolutions and additional changes. Only when that candidate still
|
|
21
|
+
satisfies the result and its relevant increments are accepted, record
|
|
22
|
+
`task publication adopt <task>/<publication> --reviewed-diff <sha256> --acceptance <text>`.
|
|
23
|
+
Explain the semantic judgment and verification/review evidence in the acceptance.
|
|
24
|
+
When an existing Task Integration produced that exact candidate, include
|
|
25
|
+
`--integration <id>` in diff and adopt to bind its committed evidence.
|
|
26
|
+
Ancestry or Integration success alone is not acceptance; do not reopen the Task,
|
|
27
|
+
rewrite completion, or mark a merge verified to bridge an evidence gap.
|
|
28
|
+
|
|
29
|
+
Adoption records a fixed decision, not remote verification or publication
|
|
30
|
+
authority. The verify operation observes the exact Publication candidate through
|
|
31
|
+
its provider and records contrary head/state facts as reported successors,
|
|
32
|
+
invalidating previous verification. Metadata and verification updates may retain
|
|
33
|
+
adoption while the candidate is unchanged; a changed candidate needs a new
|
|
34
|
+
decision. Archived history is read-only to these adopt/verify operations.
|
|
35
|
+
|
|
16
36
|
Use `yui task remote-delivery <task>` to explain external delivery. Publication
|
|
17
37
|
is not Candidate acceptance, Review, Integration or Task completion.
|
|
18
38
|
|
|
@@ -21,7 +41,7 @@ the exact Task, checks archive eligibility, then uses `--integrated` for verifie
|
|
|
21
41
|
merged delivery or `--abandon` for deliberate non-delivery. General archive
|
|
22
42
|
approval never implies `--force` authority. Preserve the Task record.
|
|
23
43
|
|
|
24
|
-
With explicit force authorization for a completed or retired Task, use
|
|
44
|
+
With explicit force authorization for a completed or cancelled (retired) Task, use
|
|
25
45
|
`yui task archive <task> (--integrated|--abandon) --force`. Force commits the
|
|
26
46
|
archive and stops new Task scheduling before attempting safe foreground cleanup.
|
|
27
47
|
Missing/stale delivery evidence, unresolved execution and cleanup errors become
|
|
@@ -34,9 +54,11 @@ Publication/completion evidence. Unverified local commits and resources that
|
|
|
34
54
|
cannot be safely released stay owned and traceable. Late runtime events remain
|
|
35
55
|
source evidence, not authority to resume or settle unknown input.
|
|
36
56
|
|
|
37
|
-
Read `task show <task> --json` for `archive.warnings`,
|
|
38
|
-
|
|
39
|
-
|
|
57
|
+
Read `task show <task> --json` for `data.archive.warnings`,
|
|
58
|
+
`data.archive.retainedResources` and `data.archive.cleanupEvents`;
|
|
59
|
+
`task context` also retains the original records/events. A successful archive
|
|
60
|
+
exit means `archived=true`, not that cleanup fully succeeded. `cleanupFinished`
|
|
61
|
+
means the foreground pass finished, not that every resource was removed.
|
|
40
62
|
If cleanup was interrupted, the Task stays archived. Repeating archive only
|
|
41
63
|
reports current facts; use explicit, exact-owner resource operations after
|
|
42
64
|
inspection instead of re-running broad cleanup. No background retry is implied.
|
|
@@ -12,6 +12,30 @@ affected WorkItem, ReviewRound or Integration. Use `task next-action` and
|
|
|
12
12
|
`execution audit` as decision support, not as an automatic plan.
|
|
13
13
|
Active or quiet observations are not a Task-wide lock or proof of failure.
|
|
14
14
|
|
|
15
|
+
### Bounded infrastructure retry
|
|
16
|
+
|
|
17
|
+
The Controller, not the Agent, counts and schedules qualifying transient
|
|
18
|
+
Provider retries: at most five automatic executions after the initial failure,
|
|
19
|
+
within one ten-minute recovery window. Native acceptance, activity and partial
|
|
20
|
+
output do not reset that count. Unknown delivery remains fenced for exact
|
|
21
|
+
readback; it is never replayed.
|
|
22
|
+
|
|
23
|
+
Inspect the current projection in Context, or use
|
|
24
|
+
`task role session retry <task> <role> show`; Global Sessions use
|
|
25
|
+
`session retry <role> show`. While `waiting` or `in-flight`, do not dispatch a
|
|
26
|
+
duplicate. A readable failed Run remains immutable evidence while its recovery
|
|
27
|
+
successor handles the same responsibility and frozen Review boundary.
|
|
28
|
+
|
|
29
|
+
`cancel` withdraws pending automatic recovery; `disable` additionally disables
|
|
30
|
+
future automatic chains on that Provider binding. Neither stops an admitted
|
|
31
|
+
native Turn. `enable` permits future failures to qualify, without replaying
|
|
32
|
+
old failures. These controls require the existing user/supervisor authority.
|
|
33
|
+
|
|
34
|
+
`exhausted`, `cancelled` and `needs-attention` preserve the error, input and
|
|
35
|
+
work. Read their exact reason, then choose an authorized next action. Unsupported
|
|
36
|
+
Hosts/Adapters or unprovable Session/background state do not trigger automatic
|
|
37
|
+
replacement, cleanup, model switching or a new grant.
|
|
38
|
+
|
|
15
39
|
A failed AgentRun is immutable; retry creates a new attempt. Reuse a recoverable
|
|
16
40
|
Session when useful and load the new attempt's current context, not an old
|
|
17
41
|
Assignment from memory. A new Host process need not mean a new native Session.
|