@zq-silk/yui 0.15.12 → 0.16.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/ARCHITECTURE.md +3 -2
- package/ARCHITECTURE.zh-CN.md +3 -2
- package/dist/artifacts/artifactCommitLock.js +16 -55
- package/dist/artifacts/taskArtifactRepository.js +3 -3
- package/dist/cli/agentConfigurationPicker.js +1 -1
- package/dist/cli/commandCatalog.js +57 -41
- package/dist/cli/completion.js +18 -18
- package/dist/cli/completionWizard.js +1 -1
- package/dist/cli/dynamicCompletion.js +1 -1
- package/dist/cli/interactionPolicy.js +7 -3
- package/dist/cli/invocationAuthority.js +64 -0
- package/dist/cli/managedDiagnostics.js +1 -1
- package/dist/cli/parseRepeatable.js +35 -0
- package/dist/cli/updatePorts.js +26 -5
- package/dist/cli.js +1280 -1243
- package/dist/commands/agentCommands.js +4 -4
- package/dist/commands/capabilityCommands.js +1 -1
- package/dist/commands/configCommands.js +6 -57
- package/dist/commands/configOverview.js +2 -2
- package/dist/commands/durableJobCommands.js +12 -6
- package/dist/commands/globalRoleCommands.js +53 -29
- package/dist/commands/grantCommands.js +0 -3
- package/dist/commands/jobCommands.js +1 -4
- package/dist/commands/operatorCommands.js +3 -3
- package/dist/commands/projectCommands.js +1 -10
- package/dist/commands/resourcesCommands.js +10 -40
- package/dist/commands/roleConfiguration.js +2 -6
- package/dist/commands/taskActivationCommands.js +4 -8
- package/dist/commands/taskAgentCapabilities.js +9 -0
- package/dist/commands/taskCommandSupport.js +155 -0
- package/dist/commands/taskCommandTypes.js +1 -0
- package/dist/commands/taskCommands.js +271 -710
- package/dist/commands/taskCompletionGate.js +1 -1
- package/dist/commands/taskExecutionCommands.js +1 -1
- package/dist/commands/taskFactCommands.js +325 -0
- package/dist/commands/taskInputCommands.js +12 -42
- package/dist/commands/taskIntegrationCommands.js +17 -57
- package/dist/commands/taskNextActionCommand.js +7 -6
- package/dist/commands/taskPublicationAdoptCommand.js +3 -3
- package/dist/commands/taskPublicationCommands.js +1 -1
- package/dist/commands/taskPublicationVerifyCommand.js +1 -1
- package/dist/commands/taskRemoteDeliveryCommand.js +2 -94
- package/dist/commands/taskUpstreamCommands.js +19 -8
- package/dist/commands/workflowCommands.js +6 -1
- package/dist/completion/completionInstaller.js +26 -26
- package/dist/completion/completionState.js +26 -26
- package/dist/completion/fileCompletionManager.js +6 -11
- package/dist/config/configCatalog.js +0 -2
- package/dist/config/timeZone.js +14 -0
- package/dist/config/yuiConfig.js +0 -29
- package/dist/context/runContextPack.js +2 -3
- package/dist/context/taskCatalog.js +3 -5
- package/dist/context/taskContext.js +139 -151
- package/dist/context/wakeRunReferences.js +11 -0
- package/dist/controller/agentCapabilities.js +58 -0
- package/dist/controller/agentRuntimeObserver.js +6 -11
- package/dist/controller/clientRuntime.js +22 -14
- package/dist/controller/controller.js +9 -22
- package/dist/controller/fileSchedulerStoreAdapter.js +117 -212
- package/dist/controller/jobClient.js +4 -4
- package/dist/controller/jobControl.js +60 -25
- package/dist/controller/jobSupervisor.js +4 -4
- package/dist/controller/providerRetryDelivery.js +7 -7
- package/dist/controller/runtime.js +51 -44
- package/dist/controller/runtimeEventProcessor.js +0 -5
- package/dist/controller/sessionOwnerReconciliation.js +5 -0
- package/dist/controller/taskAgentError.js +35 -0
- package/dist/coordination/workMailboxQueue.js +2 -24
- package/dist/core/controllerClient.js +2 -2
- package/dist/core/fileLockOwner.js +74 -0
- package/dist/decision/decision.js +17 -0
- package/dist/doctor/doctor.js +18 -9
- package/dist/event/taskEvent.js +12 -0
- package/dist/execution/workItemExecutionProjection.js +2 -2
- package/dist/executor/agentCapabilityConfig.js +43 -0
- package/dist/executor/agentConfigurationCatalog.js +49 -11
- package/dist/executor/agentExecutor.js +5 -8
- package/dist/executor/fileRoleLaunchPlanner.js +11 -53
- package/dist/executor/taskAgentCapabilities.js +64 -0
- package/dist/integration/deliveryObligation.js +1 -69
- package/dist/integration/gitIntegrationService.js +60 -84
- package/dist/integration/integrationAttempt.js +3 -14
- package/dist/integration/integrationSourceApplication.js +4 -12
- package/dist/integration/manifestTags.js +2 -2
- package/dist/job/durableJob.js +4 -25
- package/dist/job/jobAssignmentScope.js +22 -0
- package/dist/job/jobOperation.js +16 -0
- package/dist/job/jobRunner.js +2 -1
- package/dist/job/stepDirectory.js +15 -0
- package/dist/kernel/builtinCapabilities.js +15 -11
- package/dist/kernel/kernelPorts.js +1 -17
- package/dist/lifecycle/exactRunTerminalization.js +1 -9
- package/dist/message/inputControlResolution.js +3 -4
- package/dist/message/message.js +17 -20
- package/dist/message/messageContinuation.js +1 -1
- package/dist/milestone/milestone.js +11 -0
- package/dist/observability/orchestrationMetrics.js +24 -1
- package/dist/observability/runtimeIdentity.js +1 -17
- package/dist/output/agentConfigurationPresentation.js +2 -0
- package/dist/output/timePresentation.js +1 -14
- package/dist/plugins/pluginService.js +12 -4
- package/dist/release/releaseWorkflowPorts.js +45 -96
- package/dist/release/runtimeRelease.js +9 -15
- package/dist/repository/projectMaintenanceLock.js +23 -64
- package/dist/repository/taskBaseFreshness.js +1 -1
- package/dist/repository/taskWorkspaceCoordinator.js +13 -22
- package/dist/repository/taskWorkspacePreparer.js +29 -25
- package/dist/repository/workspaceCleanupInspection.js +5 -5
- package/dist/resources/autoResourceGc.js +4 -77
- package/dist/resources/liveReferences.js +7 -54
- package/dist/resources/resourceDiscovery.js +5 -118
- package/dist/resources/resourceGc.js +233 -181
- package/dist/resources/resourceRegistrar.js +5 -4
- package/dist/resources/resourceRegistry.js +3 -37
- package/dist/resources/resourceRegistryStore.js +13 -36
- package/dist/resources/sqliteResourceRegistry.js +43 -26
- package/dist/review/deltaRecheck.js +1 -1
- package/dist/review/reviewAcceptance.js +1 -1
- package/dist/review/reviewDecision.js +1 -1
- package/dist/review/reviewRound.js +8 -7
- package/dist/review/taskFinalReviewContractResolution.js +1 -1
- package/dist/runtime/acpProtocol.js +4 -51
- package/dist/runtime/acpSession.js +10 -75
- package/dist/runtime/acpSessionConfiguration.js +1 -8
- package/dist/runtime/agentEndpoint.js +3 -2
- package/dist/runtime/agentFailureContext.js +43 -0
- package/dist/runtime/agentHost.js +15 -15
- package/dist/runtime/codexInteractiveHost.js +2 -2
- package/dist/runtime/index.js +0 -1
- package/dist/runtime/managedCaller.js +21 -1
- package/dist/runtime/providerErrors.js +38 -0
- package/dist/runtime/runtimeObservation.js +0 -5
- package/dist/runtime/runtimeSessionCandidate.js +2 -3
- package/dist/runtime/sessionOwnerIdentity.js +1 -1
- package/dist/runtime/structuredProviderHost.js +4 -41
- package/dist/runtime/tmuxAdapters.js +6 -8
- package/dist/scheduler/activeRoleRunDelivery.js +7 -7
- package/dist/scheduler/leaderWakeupProcessor.js +19 -6
- package/dist/scheduler/operatorEvent.js +12 -20
- package/dist/scheduler/operatorInputNotificationProcessor.js +1 -1
- package/dist/scheduler/ports.js +5 -8
- package/dist/scheduler/roleRunLiveness.js +4 -4
- package/dist/scheduler/roleRunStall.js +16 -23
- package/dist/scheduler/taskExecutionProjection.js +25 -33
- package/dist/scheduler/taskObservabilityProjection.js +0 -1
- package/dist/scheduler/taskWake.js +5 -10
- package/dist/scheduler/wakeReason.js +2 -0
- package/dist/scheduler/wakeupQueue.js +2 -4
- package/dist/setup/setupCommand.js +1 -1
- package/dist/storage/contextRecords.js +106 -0
- package/dist/storage/currentTaskStore.js +1 -1
- package/dist/storage/homeLayout.js +13 -17
- package/dist/storage/migrations/agentFailureContext.js +22 -0
- package/dist/storage/migrations/currentInputContract.js +86 -0
- package/dist/storage/migrations/currentRuntimeContract.js +228 -0
- package/dist/storage/migrations/historicalVerificationPlan.js +35 -0
- package/dist/storage/migrations/integrationContinuation.js +5 -4
- package/dist/storage/migrations/narrowAgentFailureContext.js +65 -0
- package/dist/storage/migrations/notificationOnlyWakes.js +74 -0
- package/dist/storage/migrations/verificationPlanV1.js +162 -0
- package/dist/storage/migrations/verificationPolicy.js +74 -0
- package/dist/storage/migrations/workItemHistory.js +46 -0
- package/dist/storage/persistenceWorker.js +12 -4
- package/dist/storage/recordValidation.js +87 -0
- package/dist/storage/sqliteSchema.js +142 -1
- package/dist/storage/sqliteStore.js +156 -162
- package/dist/storage/storageSchema.js +2 -14
- package/dist/storage/storageVersions.js +1 -1
- package/dist/storage/storeRpc.js +15 -7
- package/dist/storage/taskStore.js +3 -7
- package/dist/storage/upgrade/upgradeOrchestrator.js +25 -37
- package/dist/task/completionReadiness.js +5 -24
- package/dist/task/draftPlan.js +0 -53
- package/dist/task/nextAction.js +7 -13
- package/dist/task/remoteDeliveryService.js +89 -0
- package/dist/task/taskActivation.js +2 -25
- package/dist/task/taskActivationService.js +0 -2
- package/dist/task/taskRecordReference.js +0 -1
- package/dist/task/taskSubmission.js +3 -14
- package/dist/telemetry/sqliteTelemetryBatch.js +29 -0
- package/dist/telemetry/sqliteTelemetryStore.js +49 -49
- package/dist/telemetry/telemetryWiring.js +4 -3
- package/dist/tmux/tmuxManager.js +29 -20
- package/dist/verification/gateArtifact.js +15 -24
- package/dist/verification/gateArtifactStore.js +14 -7
- package/dist/verification/verificationGateService.js +29 -88
- package/dist/verification/verificationPlan.js +27 -72
- package/dist/web/assets/client/app.js +1 -1
- package/dist/web/assets/client/taskSurface.js +4 -4
- package/dist/web/webServer.js +4 -6
- package/dist/web/webSnapshot.js +3 -83
- package/dist/web/webTaskSurface.js +17 -46
- package/dist/workItem/workItem.js +1 -12
- package/docs/architecture/capabilities-and-resources.md +14 -2
- package/docs/architecture/capabilities-and-resources.zh-CN.md +11 -1
- package/docs/managed-turn-and-session-runtime.md +83 -10
- package/docs/managed-turn-and-session-runtime.zh-CN.md +65 -11
- package/docs/plugin-sdk.md +4 -2
- package/docs/provider-runtime.md +3 -1
- package/docs/provider-runtime.zh-CN.md +4 -2
- package/docs/release-workflow.md +190 -7
- package/docs/release-workflow.zh-CN.md +139 -5
- package/docs/roles-and-configuration.md +29 -0
- package/docs/roles-and-configuration.zh-CN.md +21 -0
- package/docs/sqlite-control-plane-design.md +16 -3
- package/docs/sqlite-control-plane-design.zh-CN.md +13 -2
- package/docs/task-dag-semantics.md +3 -3
- package/docs/task-dag-semantics.zh-CN.md +2 -2
- package/docs/task-delivery.md +91 -5
- package/docs/task-delivery.zh-CN.md +72 -4
- package/docs/task-discovery.md +10 -11
- package/docs/task-discovery.zh-CN.md +8 -9
- package/docs/testing/verification-levels.md +145 -9
- package/docs/testing/verification-levels.zh-CN.md +103 -8
- package/package.json +1 -1
- package/skills/yui-leader/SKILL.md +5 -0
- package/skills/yui-leader/references/integration.md +9 -5
- package/skills/yui-leader/references/planning.md +9 -3
- package/skills/yui-operator/SKILL.md +15 -10
- package/skills/yui-runtime/SKILL.md +6 -6
- package/skills/yui-runtime/references/recovery.md +47 -0
- package/dist/agent/agentRegistry.js +0 -10
- package/dist/agentRun/runIdentity.js +0 -22
- package/dist/commands/deliveryGuardPreflight.js +0 -30
- package/dist/commands/taskIntegrationQueueCommands.js +0 -226
- package/dist/commands/taskOverviewCommand.js +0 -377
- package/dist/completion/completionWizard.js +0 -125
- package/dist/context/dispatchContext.js +0 -110
- package/dist/context/wakeNotification.js +0 -144
- package/dist/integration/integrationCheckEvidenceReuse.js +0 -53
- package/dist/integration/integrationQueueEntry.js +0 -191
- package/dist/integration/integrationQueueService.js +0 -810
- package/dist/release/fakeReleasePorts.js +0 -55
- package/dist/runtime/sessionOwnerRegistry.js +0 -137
- package/dist/task/deliveryGuard.js +0 -226
- /package/dist/{commands/taskActor.js → task/taskAuthority.js} +0 -0
|
@@ -15,10 +15,143 @@ Agent 选择一个预先声明的计划,设施从持久状态驱动该计划
|
|
|
15
15
|
- **ReleaseWorkflow**(`release-workflow-N`)——计划及其进展:一个确切来源(仓库 +
|
|
16
16
|
钉住的 commit,可选一个 artifact)、一份不可变的有序步骤计划,以及每步一条持久记录。
|
|
17
17
|
|
|
18
|
-
引擎(`src/release/releaseWorkflowEngine.ts
|
|
18
|
+
引擎(`src/release/releaseWorkflowEngine.ts`)负责持久状态转换和工作流锁;`yui task workflow` 和
|
|
19
19
|
`yui task grant` 命令驱动它。每个外部系统都位于 `ReleaseWorkflowPorts`
|
|
20
|
-
(`src/release/releaseWorkflowPorts.ts
|
|
21
|
-
|
|
20
|
+
(`src/release/releaseWorkflowPorts.ts`)之后。可用临时 SQLite 和确定性的外部端口测试
|
|
21
|
+
恢复逻辑,无需真实 GitHub、npm、git、Controller 或模型效果。
|
|
22
|
+
|
|
23
|
+
## 1.0 前的契约清理
|
|
24
|
+
|
|
25
|
+
版本 `0.16.0` 先清退运行时兼容分支,尚未执行最终 1.0 基线切换,也不重置
|
|
26
|
+
存储编号。存储 `27→28` 只规范化可明确识别的单条 Role 调度去重键,旧迁移账本、
|
|
27
|
+
Message、Task 结果和不确定外部效果保持不变。普通打开要求存储 37;已有 Home 只通过
|
|
28
|
+
显式升级入口前进,不增加运行时双读。
|
|
29
|
+
|
|
30
|
+
这是一次 1.0 前的破坏性变更:
|
|
31
|
+
|
|
32
|
+
- `message send` 统一使用 `--intent`;CLI 与 capability API 不再接受 `--wake-policy`
|
|
33
|
+
或 `wakePolicy` 参数,Draft 编辑保留原提交意图。
|
|
34
|
+
- 内部命令集成实现 `notifyMailboxChanged`;Task-only 通知适配器及其调用已统一。
|
|
35
|
+
- ACP peer 必须回报 `configOptions`,不再走 `modes`/`set_mode` 路径。
|
|
36
|
+
- Release 恢复要求精确 Home 与安装 prefix。缺少固定目标的效果保持 unknown,
|
|
37
|
+
身份不完整的 handover lock 保持围栏。
|
|
38
|
+
- 开发 link/unlink 要求当前登记文件,不搜索或接管旧 NVM 登记,不重建孤立链接。
|
|
39
|
+
- GC 不再发现旧 deployment 布局或重建已删除 worktree;不受支持的 quarantine
|
|
40
|
+
证据保留,不会被当成当前 move 回执清除。
|
|
41
|
+
- `task activate` 只消费已有请求;没有请求就不采用资源。请求创建、延后准入和
|
|
42
|
+
原子工作区采用仍分开,并复用同一个现行执行边界。
|
|
43
|
+
- 删除 `task integration queue` 及其状态机。Agent 选择每个 WorkItem 结果的顺序与
|
|
44
|
+
策略,逐项调用原子 Integration;保留精确检查、目标 CAS 和完成义务。
|
|
45
|
+
|
|
46
|
+
存储 `28→29` 在删除活动队列表前,将每条旧 payload 原样保存在
|
|
47
|
+
`integration.queue-retired` Task 事件中,并保留原队列 ID。事件编号越过已有计数器
|
|
48
|
+
和历史最大 ID。此操作不验收交付、不生成 Integration、不重放工作;已有 Integration
|
|
49
|
+
与 Job 保持不变。通过 `task event list <task>` 和引用的 WorkItem/Integration
|
|
50
|
+
判断剩余工作;队列退役不代表未完成的 Integration 已结算。
|
|
51
|
+
|
|
52
|
+
存储 `29→30` 将 Run-linked wake 的完整原文移入 `wake.run-link-retired` Task 事件。
|
|
53
|
+
现有通知保留 ID、投递状态和引用,使用 wake schema 2;Run 终态不再消费通知。
|
|
54
|
+
引用待退役 wake 的活动 Run、受管重试或未决 claim 会同时阻止预检和迁移;
|
|
55
|
+
迁移不停止执行、不编造接受。Global Session 没有受控 binding 时统一显式保存
|
|
56
|
+
`providerBinding: null`。
|
|
57
|
+
|
|
58
|
+
存储 `30→31` 将 Review scope 统一为显式值:有效旧 WorkItem Review 的缺失/null
|
|
59
|
+
scope 转为 `work-item`,Task-final 候选证据和原迁移账本不变。新建和重试均显式写入 scope。
|
|
60
|
+
|
|
61
|
+
存储 `31→32` 从当前 WorkItem 移除 `historicalState`,移除前将完整原始 payload
|
|
62
|
+
原样保存在 `work-item.execution-state-retired` Task 事件。当前状态、工作范围、
|
|
63
|
+
Candidate 和执行组不变,不生成 Run 或验收。未知历史形态会报错,记录和迁移账本不前进。
|
|
64
|
+
|
|
65
|
+
存储 `32→33` 清退 Leader 过渡/预算配置以及 VerificationPlan 的模式。
|
|
66
|
+
活动计划显式补上 schema 版本,实际检查保持不变;已退役 Knowledge 原文保留。
|
|
67
|
+
Integration 显式补入 `rerunChecks: false`,缓存 Artifact 移除试运行复用计数。
|
|
68
|
+
原配置可从显式升级备份恢复。这是已确认的行为变更,不将三种旧模式声称为等价。
|
|
69
|
+
|
|
70
|
+
已接纳且仍为 `running/validating` 的计划验证会阻止预检和迁移,需先用旧版本完成
|
|
71
|
+
结算;不会把运行中的 Job 改标为新证据契约。该次切换使用 v3 验证摘要,使更早缓存不再被
|
|
72
|
+
自动复用,不重写历史 Job/Integration 结果或删除其日志。旧计划解析冻结在迁移
|
|
73
|
+
目录中,早期迁移保持原有语义。
|
|
74
|
+
|
|
75
|
+
现行干净候选证明采用 v5 L2-only 执行摘要。Job 和本地验证都在发布可复用成功前,
|
|
76
|
+
检查候选工作区的干净状态、分支和精确 HEAD;旧缓存身份不能绕过这一边界。
|
|
77
|
+
旧记录和日志保持可读,已接纳 Job 不会被改标为新摘要。应先按原契约结算旧尝试,
|
|
78
|
+
或明确放弃后再开始新操作。
|
|
79
|
+
|
|
80
|
+
L1 执行入口、选择器及当前计划/artifact 类型分支已移除。存储 `34→35` 将
|
|
81
|
+
原始 Project 计划、L1 artifact 与日志保存在 `storage_migration_archive`,
|
|
82
|
+
当前计划改为不含 L1 的 schema 2。存档只是原始审计数据,不是执行 reader 或缓存。
|
|
83
|
+
已结算的旧 ChangeSet-source Integration 转为完整 payload 的 Task 事件;
|
|
84
|
+
仍有工作区、未结算 Job 或 adoption 引用时阻止退休。旧迁移账本不变。
|
|
85
|
+
|
|
86
|
+
Session 归属统一使用 SQLite。旧 `launch-env` owner 行或 `runtime/session-owners`
|
|
87
|
+
中的文件会阻止切换:先使用旧版本检查并释放精确资源,再明确将旧文件归档到
|
|
88
|
+
活动 Home 之外。迁移不杀进程、不推断归属、不修复损坏数据,也不重写不可变 Manifest。
|
|
89
|
+
|
|
90
|
+
存储 `35→36` 保留历史 Agent 错误,并将缺失的失败配置明确标为不可用。
|
|
91
|
+
存储 `36→37` 将已记录的失败上下文缩小为原生元数据查询所需输入,原始快照和
|
|
92
|
+
空的可选身份占位值保存在迁移审计中。当前错误读取不依赖执行快照协议,也不
|
|
93
|
+
重建缺失历史。配置拒绝保留原始输入但不自动重试;有权限的 Agent 可查询该次
|
|
94
|
+
失败的模型能力、修正原本要求的配置,再显式重试被拒绝的通知。
|
|
95
|
+
|
|
96
|
+
不再支持 `task turn` 和 `yui-dev` 补全身份。上线前应替换仍依赖 `task turn`
|
|
97
|
+
Manifest 的 Session;明确卸载/归档旧 `yui-dev` 补全块后,再安装现行 `yui` 补全。
|
|
98
|
+
存储迁移不会修改用户 shell 文件。Host 控制/事件兼容与 updater 交接安全检查保持不变。
|
|
99
|
+
|
|
100
|
+
存储 `33→34` 从当前记录移除 Message `wakePolicy` 与激活 `origin`,原始表达
|
|
101
|
+
保存在审计事件。旧的仅记录消息转换为 `intent: record`,其他缺少意图的
|
|
102
|
+
user/operator 消息转换为 `discuss`;运行时不再解释缺失的持久化意图。
|
|
103
|
+
编辑仅记录内容不会唤醒 Leader。完成检查读取实际待投递消息引用,也涵盖显式交接
|
|
104
|
+
此前仅保存的内容。
|
|
105
|
+
|
|
106
|
+
Draft 编辑同时保护请求身份:已经绑定 submission、queue/steer 或交接请求的消息
|
|
107
|
+
不能原地改正文,需新建消息并使用新请求 ID;相同正文更新为无操作。未绑定请求
|
|
108
|
+
身份的讨论编辑仍遵守 pending/failed 激活状态,develop 编辑不启动规划或创建/
|
|
109
|
+
重试激活。这是操作边界修复,不改变存储格式,也不猜测修复过去已被编辑的原文。
|
|
110
|
+
|
|
111
|
+
Draft 中缺少 origin 且仍 pending 的旧 immediate 激活请求会阻止预检和迁移,即使 Task
|
|
112
|
+
已停止执行。必须先用旧版本显式激活或取消;升级不替用户做这个决定。当前已接纳
|
|
113
|
+
请求不再经过第二次来源门槛,但取消、planning 延后、执行状态与精确 Session 权限
|
|
114
|
+
仍需检查。旧来源及 settled 请求历史保留在 `task.activation-origin-retired` 事件。
|
|
115
|
+
|
|
116
|
+
新 `job start` 必须带 `--request-id`;RPC 必须提供 `requestId`,capability
|
|
117
|
+
入口使用 invocation 身份。不再从命令内容隐式生成请求,也不再构造匿名 Job。
|
|
118
|
+
已有 Job 的操作证据和按 ID 读取保持不变;相同请求重试防重、不同输入冲突,
|
|
119
|
+
Integration 在 Session 替换后仍找回原 Job。新 request ID 表示明确的新操作,
|
|
120
|
+
不是对旧未知结果的自动重放。
|
|
121
|
+
|
|
122
|
+
Scheduler 核心读取和持久化操作成为必需接口,缺少 Session/Event 读取不再被当作
|
|
123
|
+
空证据,也不能跳过错误持久化。执行及 Web 投影直接读取当前 Store;
|
|
124
|
+
消息入队必须读取 Task 生命周期。精确投递结算仍独立,不增加会丢失迟到证据的归档门槛。
|
|
125
|
+
Observer、配置、Knowledge 与工作区清理所需 Store 读取也成为必需接口;
|
|
126
|
+
测试替身实现现行合同,不再令生产代码降级。
|
|
127
|
+
|
|
128
|
+
Task 列表及 `/api/dashboard` 只保留有界目录;调用方去掉 `--view compact`,
|
|
129
|
+
详情使用单 Task 读取。Scheduler 目录索引是必需接口,不再兼容缺失时的全量扫描。
|
|
130
|
+
额外 `schema.json`/`state.json` 不覆盖 SQLite 版本,也不用于开发 Home reset;
|
|
131
|
+
升级保留无关文件。非空 Home 缺少数据库时仍拒绝初始化。
|
|
132
|
+
不认识的 writer lease 明确诊断,不接管、不删除。
|
|
133
|
+
|
|
134
|
+
`controller status` 固定输出身份信息,存储矛盾仍返回非零健康退出码;
|
|
135
|
+
`YUI_STATUS_IDENTITY` 不再选择另一套契约。升级侧直接复用资源采集器读取生命周期,
|
|
136
|
+
无需让旧 Home 先通过当前 schema 的健康校验。
|
|
137
|
+
|
|
138
|
+
现行边界进一步收敛:
|
|
139
|
+
|
|
140
|
+
- Project/Artifact 文件锁及 handover lock 要求精确进程代际证据。owner 缺失、
|
|
141
|
+
格式不完整或 OS 身份不可读时保持围栏;仅凭年龄不能证明创建者退出,不再用
|
|
142
|
+
PID-only 存活判断代替身份确认。
|
|
143
|
+
- PR head 查询只调用 `gh pr list --head ... --state open`。仅有效空数组证明不存在;
|
|
144
|
+
传输失败、身份格式错误和多个匹配都不允许继续创建。
|
|
145
|
+
- 已有 Git 操作缺少原 Integration 进度回执时不再被接管。保留文件并明确诊断;
|
|
146
|
+
有精确回执的正常冲突/Job 续作仍受支持。
|
|
147
|
+
|
|
148
|
+
发布前应先收敛旧执行,对不受支持的锁、链接和隔离资源做显式清理。归属与处置尚未
|
|
149
|
+
确定时保留原记录,运行时不替 Agent 选择恢复方案。
|
|
150
|
+
|
|
151
|
+
后续基线切换必须先验证到目标格式的桥接或导出,再用一个干净基线替换旧初始化和迁移链,
|
|
152
|
+
之后才能删除基线之前的迁移及历史夹具。存储基线只重置一次,不在发布 `1.0.0` 时再次
|
|
153
|
+
重置。未知版本拒绝、精确进程/Host 身份检查与持久审计证据仍应保留。版本 tag、真实
|
|
154
|
+
Home 迁移和发布效果需要各自的发布授权。
|
|
22
155
|
|
|
23
156
|
## 授权模型
|
|
24
157
|
|
|
@@ -165,8 +298,9 @@ kind、可选 params,以及一个可选的不可逆级别(`none` | `reversib
|
|
|
165
298
|
|
|
166
299
|
该键被传给该步骤的每一次 `executeStep` 调用,包括在一次确认为 absent 的超时之后的
|
|
167
300
|
重试。端口合同要求 `executeStep` 在同一键下是幂等的:一次重试尝试不得产生第二次
|
|
168
|
-
|
|
169
|
-
|
|
301
|
+
副作用。引擎不会盲目为 `unknown` 步骤调用 `executeStep`,而是先按记录的身份查询。
|
|
302
|
+
核心测试用真实 SQLite 和确定性端口检查不确定效果查询、已确认步骤复用和 grant 次数耗尽。
|
|
303
|
+
这证明这些引擎边界,不代表真实外部服务或所有发布适配器的幂等性已被验证。
|
|
170
304
|
|
|
171
305
|
## Operator 指南
|
|
172
306
|
|
|
@@ -93,10 +93,20 @@ services. Isolating `YUI_HOME` or replacing a Session does not require a fresh
|
|
|
93
93
|
native account directory. Managed Task execution uses Claude's non-interactive
|
|
94
94
|
stream-json path with the same native configuration ownership.
|
|
95
95
|
|
|
96
|
+
Model catalogs are native observations, not a universal Provider whitelist.
|
|
97
|
+
Yui displays the selectable ID/alias and its reported resolved model. An explicit
|
|
98
|
+
custom ID is passed unchanged when the native model field allows custom values;
|
|
99
|
+
this does not prove that the Provider will accept it. Known model-specific effort
|
|
100
|
+
limits are still validated. Configuration rejection reports the observed model
|
|
101
|
+
options and how to inspect the full catalog; an unavailable catalog is not
|
|
102
|
+
replaced by a fabricated list.
|
|
103
|
+
|
|
96
104
|
## Commands
|
|
97
105
|
|
|
98
106
|
```sh
|
|
99
107
|
yui config agent capabilities <agent-id>
|
|
108
|
+
yui task role capabilities <task> <role> --refresh
|
|
109
|
+
yui task role capabilities <task> <role> --error <error-event-id> --refresh
|
|
100
110
|
yui config role show <global-role>
|
|
101
111
|
yui config profile show <profile>
|
|
102
112
|
yui task role add <task> <role> --profile <profile>
|
|
@@ -107,6 +117,25 @@ yui task role session inspect <task> <role>
|
|
|
107
117
|
yui task role session new <task> <role> --reason "<why a fresh Session is useful>"
|
|
108
118
|
```
|
|
109
119
|
|
|
120
|
+
The global query uses the calling process's default native context. Task-scoped
|
|
121
|
+
queries use the Controller's native account environment and the selected Role
|
|
122
|
+
configuration; they never forward the caller's credentials to another Provider.
|
|
123
|
+
Omitting `--error` selects the current desired Role. With `--error`, the recorded
|
|
124
|
+
failed request supplies model, workspace and profile/settings options even after
|
|
125
|
+
the Role changes. A changed configured Agent command/environment binding or an
|
|
126
|
+
unrecorded historical context produces a diagnosis, not a default substitution.
|
|
127
|
+
Task-scoped metadata queries require a running Controller and do not start one.
|
|
128
|
+
|
|
129
|
+
`--refresh` explicitly re-probes metadata. A failed probe may show a clearly
|
|
130
|
+
marked cached catalog, not claim it is current. Native files and credentials
|
|
131
|
+
are read currently; their secret contents are never snapshotted in error history.
|
|
132
|
+
The lookup reports metadata only, without running a model to test a candidate ID.
|
|
133
|
+
|
|
134
|
+
Completed in-memory catalogs have a bounded least-recently-used cache. Concurrent
|
|
135
|
+
requests for the same scope share the active probe, including refresh requests;
|
|
136
|
+
once it settles, an explicit refresh probes again. Retained results are labelled
|
|
137
|
+
as cached rather than as a new live response. No cleanup timer or worker is added.
|
|
138
|
+
|
|
110
139
|
On Role creation, explicit Agent settings require `--agent`. On update, omitted
|
|
111
140
|
`--agent` targets the active binding; a named binding is updated without being
|
|
112
141
|
activated. `task role bind` changes selection. A live Session requires the
|
|
@@ -75,10 +75,17 @@ Claude 自身加载原生设置,并按其生效配置在 API key、既有 help
|
|
|
75
75
|
服务。隔离 `YUI_HOME` 或替换 Session 都不要求一个全新的原生账号目录。受管的 Task
|
|
76
76
|
执行使用 Claude 的非交互 stream-json 路径,并沿用同样的原生配置归属。
|
|
77
77
|
|
|
78
|
+
模型目录是原生观测结果,不是整个 Provider 的模型白名单。Yui 显示可选择的 ID/别名
|
|
79
|
+
及原生报告的实际模型映射。原生模型字段允许自定义值时,显式模型 ID 会原样透传;
|
|
80
|
+
这不代表 Provider 已接受该模型。已知模型的 effort 限制仍会校验。配置校验拒绝会显示
|
|
81
|
+
已观测到的模型选项和完整目录查询方式;目录不可用时,不编造“合法模型列表”。
|
|
82
|
+
|
|
78
83
|
## 命令
|
|
79
84
|
|
|
80
85
|
```sh
|
|
81
86
|
yui config agent capabilities <agent-id>
|
|
87
|
+
yui task role capabilities <task> <role> --refresh
|
|
88
|
+
yui task role capabilities <task> <role> --error <error-event-id> --refresh
|
|
82
89
|
yui config role show <global-role>
|
|
83
90
|
yui config profile show <profile>
|
|
84
91
|
yui task role add <task> <role> --profile <profile>
|
|
@@ -89,6 +96,20 @@ yui task role session inspect <task> <role>
|
|
|
89
96
|
yui task role session new <task> <role> --reason "<why a fresh Session is useful>"
|
|
90
97
|
```
|
|
91
98
|
|
|
99
|
+
全局查询使用调用进程的默认原生环境;Task 查询使用 Controller 的原生账户环境及
|
|
100
|
+
所选 Role 配置,不把调用方的凭据转交给其他 Provider。省略 `--error` 查看当前期望
|
|
101
|
+
配置;指定错误记录时,使用失败时保存的模型、工作区、profile/settings 选项,不受
|
|
102
|
+
之后的 Role 修改影响。若配置的 Agent 命令/环境绑定已变化,或历史错误未记录配置,
|
|
103
|
+
返回明确诊断,不替换成默认配置。Task 查询要求 Controller 已运行,不自动启动它。
|
|
104
|
+
|
|
105
|
+
`--refresh` 显式重新查询元数据;查询失败后返回缓存时会标明缓存来源,不冒充当前
|
|
106
|
+
结果。原生文件及凭据仍按当前值读取,秘密内容不会复制进错误历史。这里只查询
|
|
107
|
+
元数据,不通过真实模型调用来试验候选名称。
|
|
108
|
+
|
|
109
|
+
已完成目录使用有容量上限的近期使用缓存;相同上下文的并发请求(包括刷新)共享
|
|
110
|
+
正在进行的查询,结束后显式刷新才重新查询。缓存命中标为缓存,不冒充新的实时响应。
|
|
111
|
+
这不增加清理定时器或后台 worker。
|
|
112
|
+
|
|
92
113
|
创建 Role 时,显式的 Agent 设置需要 `--agent`。更新时,省略 `--agent` 针对活动
|
|
93
114
|
绑定;一个具名绑定会被更新但不被激活。`task role bind` 更改选择。在更改期望设置
|
|
94
115
|
之前,活动 Session 需要该命令的显式确认。
|
|
@@ -34,6 +34,19 @@ model. A newer, below-minimum, incomplete, or malformed Home fails closed.
|
|
|
34
34
|
There is no runtime normalization, repair worker, file-Store fallback, dual
|
|
35
35
|
read/write path, or second migration authority.
|
|
36
36
|
|
|
37
|
+
Typed domain payloads use one current validator registry on writes, ordinary
|
|
38
|
+
reads, bounded Context pages and full-Home diagnostics. Direct and worker-backed
|
|
39
|
+
Stores do not have different validation strength. Invalid records are rejected
|
|
40
|
+
without advancing the revision; an invalid stored record remains available for
|
|
41
|
+
explicit diagnosis, never normalized into a valid-looking replacement.
|
|
42
|
+
|
|
43
|
+
Storage 35 also has a migration-only `storage_migration_archive` table:
|
|
44
|
+
`migration_version / family / record_key / payload / content`. It retains exact
|
|
45
|
+
retired Project/gate payloads and binary logs without interpreting them in the
|
|
46
|
+
current model. It is not scheduling state, a second cache or a runtime fallback.
|
|
47
|
+
Task-scoped historical Integration retirement uses ordinary Task Events.
|
|
48
|
+
Backups retain both current records and this audit archive.
|
|
49
|
+
|
|
37
50
|
## Write and concurrency contract
|
|
38
51
|
|
|
39
52
|
- Each mutation is one SQLite transaction.
|
|
@@ -69,8 +82,8 @@ Every persistent schema or payload change appends one immutable, contiguous
|
|
|
69
82
|
storage migration. The CLI publishes both `storageVersion` and
|
|
70
83
|
`minimumStorageVersion`; every valid Home in that inclusive range can upgrade
|
|
71
84
|
directly to the current version without installing intermediate releases.
|
|
72
|
-
The current
|
|
73
|
-
|
|
85
|
+
The current version and migration floor are declared only in
|
|
86
|
+
`src/storage/storageVersions.ts` and exposed by CLI identity. Homes below that
|
|
74
87
|
floor are not migration inputs and remain untouched.
|
|
75
88
|
The target binary's `upgrade --update-preflight` and `--update-apply` result
|
|
76
89
|
shapes and parent-owned handover-lock proof remain backward compatible with
|
|
@@ -123,7 +136,7 @@ unifying the root does not weaken control-data or cross-owner isolation.
|
|
|
123
136
|
**not** a second authority for internal managed paths, and is intentionally not
|
|
124
137
|
an input to `homeLayout.ts`. A Yui-auto-created Global Role that carries no
|
|
125
138
|
user-chosen cwd no longer falls back to it (or to `process.cwd()`): `yui setup`'s
|
|
126
|
-
built-in Operator/Leader and `yui role add` without `--workspace` now default to
|
|
139
|
+
built-in Operator/Leader and `yui config role add` without `--workspace` now default to
|
|
127
140
|
the Home-internal `managedGlobalRoleWorkspace(home)` (`<home>/workspaces/global`),
|
|
128
141
|
and `setup` no longer fabricates an external Home-sibling `workspace/` — a
|
|
129
142
|
`default-workspace` is persisted only if the user configured one. A user who
|
|
@@ -28,6 +28,17 @@ Yui 只有一个权威产品 Store:WAL 模式下的 `YUI_HOME/yui.db`。`schem
|
|
|
28
28
|
不完整的或损坏的 Home 一律 fail closed。不存在运行时归一化、修复 worker、
|
|
29
29
|
文件 Store 回退、双读写路径或第二套迁移权威。
|
|
30
30
|
|
|
31
|
+
类型化领域记录在写入、普通读取、有界 Context 分页和全 Home 检查时,共用一份
|
|
32
|
+
现行校验注册表。直接 Store 与 worker-backed Store 不存在不同强度的校验。
|
|
33
|
+
无效写入不会推进 revision;已存在的无效记录只会报错并保留供明确诊断,
|
|
34
|
+
不会被自动规范化成看似有效的替代记录。
|
|
35
|
+
|
|
36
|
+
存储 35 新增仅由迁移写入的 `storage_migration_archive`:
|
|
37
|
+
`migration_version / family / record_key / payload / content`。它保留退休的
|
|
38
|
+
Project/gate 原始 payload 和二进制日志,不在当前模型中解释这些历史格式,
|
|
39
|
+
也不是调度状态、第二份缓存或运行时回退。Task 内的历史 Integration 使用普通
|
|
40
|
+
Task 事件保存。数据库备份同时保留当前记录与这份审计存档。
|
|
41
|
+
|
|
31
42
|
## 写入与并发合同
|
|
32
43
|
|
|
33
44
|
- 每次修改是一个 SQLite 事务。
|
|
@@ -54,8 +65,8 @@ WorkItem 与 Task 的验收权威仍归 Leader。
|
|
|
54
65
|
|
|
55
66
|
每次持久 schema 或负载变更都追加一条不可变、连续的存储迁移。CLI 同时发布
|
|
56
67
|
`storageVersion` 与 `minimumStorageVersion`;处在该闭区间内的每个有效 Home 都能
|
|
57
|
-
|
|
58
|
-
`src/storage/storageVersions.ts`
|
|
68
|
+
直接升级到当前版本,无需安装中间发行版。当前版本及最低支持版本统一由
|
|
69
|
+
`src/storage/storageVersions.ts` 声明,并由 CLI 身份读取暴露。
|
|
59
70
|
低于该下限的 Home 不是迁移输入,保持原样不动。目标二进制的
|
|
60
71
|
`upgrade --update-preflight` 与 `--update-apply` 结果形态,以及由父进程持有的
|
|
61
72
|
交接锁证明,对从存储版本 1 起发布的每个 updater 都保持向后兼容,因此一个旧的
|
|
@@ -61,10 +61,10 @@ it does not accept a WorkItem or rewrite dependencies.
|
|
|
61
61
|
Direct and replicated execution share one Leader acceptance boundary. A
|
|
62
62
|
replicated Producer does not form a Candidate; only the explicitly synthesized
|
|
63
63
|
main Run result enters the candidate path. Delivery the Leader manages directly
|
|
64
|
-
must also satisfy the applicable Candidate
|
|
64
|
+
must also satisfy the applicable Candidate and Integration boundaries.
|
|
65
65
|
|
|
66
|
-
An isolated code result
|
|
67
|
-
compare-and-swap after its checks; an
|
|
66
|
+
An isolated code result freezes per-Project Candidate commits and integrates via
|
|
67
|
+
compare-and-swap after its checks; an unsnapshotted, unintegrated or stale latest
|
|
68
68
|
result cannot satisfy delivery. Review is checked against the applicable rule and
|
|
69
69
|
the Task contract. A Task main the Leader delivers itself needs a clean,
|
|
70
70
|
committed, exact snapshot.
|
|
@@ -45,9 +45,9 @@ InputRequest 表示待决问题;回答不自动接受 WorkItem 或改写依赖
|
|
|
45
45
|
|
|
46
46
|
Direct 和 replicated 共享一个 Leader 接受边界。Replicated Producer 不形成
|
|
47
47
|
Candidate;只有显式综合的 main Run 结果进入候选路径。Leader 直接管理的
|
|
48
|
-
交付也必须满足适用的 Candidate
|
|
48
|
+
交付也必须满足适用的 Candidate 和 Integration 边界。
|
|
49
49
|
|
|
50
|
-
隔离代码结果按 Project
|
|
50
|
+
隔离代码结果按 Project 冻结 Candidate 提交,检查后 CAS 集成;缺少快照、未集成
|
|
51
51
|
或失效的最新结果不能满足交付。Review 依适用规则和 Task 合同检查。
|
|
52
52
|
Leader 自己交付的 Task main 需要干净、已提交的精确快照。
|
|
53
53
|
|
package/docs/task-delivery.md
CHANGED
|
@@ -8,6 +8,10 @@ Task lifecycle is `draft / active / completed / cancelled / archived`. A Draft
|
|
|
8
8
|
stores intent, Project bindings, planning discussion and mutable requirements.
|
|
9
9
|
It does not adopt a writable delivery workspace at creation.
|
|
10
10
|
|
|
11
|
+
Activation requires a durable request with an explicit environment plan:
|
|
12
|
+
use `task activation request <task> --request-id <id> --environment <plan>`.
|
|
13
|
+
The Controller adopts eligible requests; `task activate <task>` may consume an
|
|
14
|
+
existing request in the foreground but never creates implicit activation intent.
|
|
11
15
|
Activation validates current Roles, dependencies, Project scope and resources,
|
|
12
16
|
prepares physical workspaces, and adopts status/ownership atomically. Failed
|
|
13
17
|
preparation leaves the Task Draft with a failed request and a diagnosis delivered
|
|
@@ -22,6 +26,11 @@ Leader owns bounded work directly or assigns substantial independent WorkItems.
|
|
|
22
26
|
Direct execution has no Group. Replication is explicitly requested for independent
|
|
23
27
|
attempts at the same frozen Assignment, followed by Leader-selected synthesis.
|
|
24
28
|
|
|
29
|
+
Scope overlap is a read-only advisory in `task next-action`, not a text-matching
|
|
30
|
+
creation gate. The Leader inspects original requirements and decides whether
|
|
31
|
+
work is independent. Request identity, permissions, dependencies, workspace
|
|
32
|
+
isolation and acceptance checks remain enforced independently.
|
|
33
|
+
|
|
25
34
|
## Managed workspaces
|
|
26
35
|
|
|
27
36
|
Stable Project checkouts are read-only references. Task main is a logical
|
|
@@ -47,20 +56,82 @@ managed workspace remains the Git/control ownership record.
|
|
|
47
56
|
## Candidate, Review and Integration
|
|
48
57
|
|
|
49
58
|
Provider terminal saves the exact original Run result. It does not accept the
|
|
50
|
-
WorkItem. The Leader evaluates the result and
|
|
51
|
-
ChangeSets
|
|
59
|
+
WorkItem. The Leader evaluates the result and its immutable per-Project Git
|
|
60
|
+
snapshot. Optional ChangeSets supply diff evidence. The governing Candidate supplies provenance for
|
|
52
61
|
Review and Integration; Producers do not independently enter either path.
|
|
53
62
|
|
|
54
|
-
|
|
63
|
+
The Agent chooses the order and strategy, then starts one Integration from an
|
|
64
|
+
exact WorkItem Candidate. There is no separate ChangeSet integration queue.
|
|
65
|
+
Integration applies the fixed source commits in a candidate worktree, runs configured
|
|
55
66
|
checks, then advances the target only if its head still matches. Conflict,
|
|
56
67
|
failed checks, target movement or rejection retain evidence and never advance
|
|
57
68
|
the target. The Agent chooses retry or manual resolution within the retained
|
|
58
69
|
workspace.
|
|
59
70
|
|
|
71
|
+
An existing merge/rebase/cherry-pick without the attempt's own progress receipt
|
|
72
|
+
is not adopted from Git markers. Preserve the scene and choose explicit recovery;
|
|
73
|
+
normal continuation uses the original receipt and never replays a completed step.
|
|
74
|
+
|
|
60
75
|
When checks are a DurableJob, the Integration retains that exact jobId while
|
|
61
76
|
running. Once the Job settles, `task integration continue <task>/<integration>`
|
|
62
|
-
consumes its result and performs the guarded finalization.
|
|
63
|
-
|
|
77
|
+
consumes its result and performs the guarded finalization. Existing unsettled
|
|
78
|
+
Integrations, including conflicts, remain completion blockers independently of
|
|
79
|
+
how the Agent ordered them.
|
|
80
|
+
|
|
81
|
+
### Verification reuse and explicit reruns
|
|
82
|
+
|
|
83
|
+
A configured VerificationPlan reuses only complete, successful, log-verified
|
|
84
|
+
evidence for the exact Project, commit, plan, toolchain and target/base boundary.
|
|
85
|
+
A plan with no reusable evidence executes normally. Plans require
|
|
86
|
+
`schemaVersion: 2` and contain no `l1` or `record/reuse/enforce` mode.
|
|
87
|
+
Storage 34→35 preserves the original Project declarations, L1 artifacts and
|
|
88
|
+
binary logs in migration audit storage, outside current execution and cache
|
|
89
|
+
lookup. Historical `historical-change-sets` Integrations must be settled and
|
|
90
|
+
free of execution/delivery references before their exact payloads become
|
|
91
|
+
`integration.source-retired` Task Events. Their IDs are never reused.
|
|
92
|
+
|
|
93
|
+
Request fresh checks when creating an operation:
|
|
94
|
+
|
|
95
|
+
```sh
|
|
96
|
+
yui task integration start <task> --work-item <id> --strategy ff --rerun-checks
|
|
97
|
+
yui task upstream integrate <task> --project <project> --rerun-checks
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
The flag is immutable intent on that Integration, not a global configuration
|
|
101
|
+
switch. `continue` consumes the same admitted Job; it cannot turn into a rerun.
|
|
102
|
+
Create a new attempt for another execution, and settle any equivalent unfinished
|
|
103
|
+
verification first. Rerun affects only cache reuse, never permissions, Job
|
|
104
|
+
identity, workspace checks or the final target CAS.
|
|
105
|
+
Explicit `--check` commands also request fresh execution. With a plan configured,
|
|
106
|
+
they run after its checks; they are neither ignored nor rejected by text matching.
|
|
107
|
+
Unstructured checks do not search historical Jobs for a substitute result.
|
|
108
|
+
|
|
109
|
+
Fresh execution withdraws the old success before starting. Failure is recorded
|
|
110
|
+
as failure; interruption, missing logs or a mutated candidate leave no reusable
|
|
111
|
+
success. Both Job and local execution verify the exact clean candidate before
|
|
112
|
+
publishing successful proof. The v5 L2-only execution digest excludes older proof without
|
|
113
|
+
deleting its history. A stale
|
|
114
|
+
cache consumer cannot restore an older result. Release lookup considers the
|
|
115
|
+
newest recorded matching proof rather than searching past a failure for an
|
|
116
|
+
older green result. The cache represents current reusable evidence, not Task
|
|
117
|
+
execution history; original Job and Integration records remain separate.
|
|
118
|
+
|
|
119
|
+
The public upstream CLI uses the same Controller Job port as other Integration
|
|
120
|
+
commands. `--latest` may return independent pending Jobs for several Projects;
|
|
121
|
+
continue each returned Integration ID rather than issuing another upstream
|
|
122
|
+
request to poll it.
|
|
123
|
+
|
|
124
|
+
Job admission, management and pre-spawn checks bind a non-Leader to its current
|
|
125
|
+
Assignment, exact WorkItem workspace and writable Project scope. The existing
|
|
126
|
+
Job owner contract does not represent Review/replica workspaces, so those
|
|
127
|
+
requests fail explicitly rather than falling back to Task main. Leader/Operator
|
|
128
|
+
supervision and settlement of already-running Jobs remain separate.
|
|
129
|
+
|
|
130
|
+
The identity covers declared inputs, not every external service or untracked
|
|
131
|
+
environment condition. Use explicit reruns for changing external inputs,
|
|
132
|
+
flakiness investigation or a user-requested new check. A plan does not authorize
|
|
133
|
+
real-model/paid/shared-resource validation. Reuse never substitutes for Review,
|
|
134
|
+
acceptance or publication authority.
|
|
64
135
|
|
|
65
136
|
Review follows the applicable Candidate rule or Task-final contract and frozen
|
|
66
137
|
heads. The exact main Reviewer Run holds the report; successful execution is
|
|
@@ -190,6 +261,21 @@ operations for safe cleanup; no background retry or broader deletion authority
|
|
|
190
261
|
is implied. Both archive paths preserve Task history and recovery information.
|
|
191
262
|
Archived Tasks cannot reopen.
|
|
192
263
|
|
|
264
|
+
Resource GC is a separate, opt-in quarantine path. A runtime subtree moves once:
|
|
265
|
+
the parent receipt owns recovery of its contents, and redundant child registry
|
|
266
|
+
entries are removed in the same registry transaction. Independently owned Git
|
|
267
|
+
worktrees or retained descendants prevent moving their enclosing directory.
|
|
268
|
+
Task records and results are never removed by this consolidation.
|
|
269
|
+
Session process custody comes from SQLite `session_owners`, with live PID and
|
|
270
|
+
start-identity checks. The retired JSON owner directory is not a parallel source.
|
|
271
|
+
|
|
272
|
+
The plan is not cleanup authority. Apply and purge re-read Task status, managed
|
|
273
|
+
workspaces, active Runs and unsettled Jobs under the existing SQLite writer
|
|
274
|
+
fence, which spans the bounded physical mutation and registry update. A reopened
|
|
275
|
+
Task or new durable owner prevents quarantine/deletion; uncertainty retains the
|
|
276
|
+
resource with a diagnosis. Reopened quarantined resources can be restored.
|
|
277
|
+
This adds neither a retry worker nor another persistent ownership protocol.
|
|
278
|
+
|
|
193
279
|
`yui task archive-preflight <task> (--integrated|--abandon) [--force] [--json]`
|
|
194
280
|
reads current admission, delivery and exact-owner cleanup checks in one report.
|
|
195
281
|
It is available before and after archive, including to the Task's authorized
|
|
@@ -7,6 +7,10 @@
|
|
|
7
7
|
Task 生命周期是 `draft / active / completed / cancelled / archived`。Draft 保存
|
|
8
8
|
意图、Project 绑定、规划讨论和可变需求。它在创建时不采用可写的交付工作区。
|
|
9
9
|
|
|
10
|
+
激活要求先保存带明确环境计划的请求:
|
|
11
|
+
`task activation request <task> --request-id <id> --environment <plan>`。
|
|
12
|
+
Controller 采用符合条件的请求;`task activate <task>` 可以在前台消费已有请求,
|
|
13
|
+
但不会隐式创建激活意图。
|
|
10
14
|
激活会校验当前 Role、依赖、Project 范围和资源,准备物理工作区,并原子地采用
|
|
11
15
|
状态/所有权。准备失败会让 Task 停在 Draft,附带一个失败请求和投递给 Leader 的
|
|
12
16
|
诊断。延迟激活保留确切意图并等待原生静止,无论它是在规划 Run 中还是在后续讨论中
|
|
@@ -18,6 +22,10 @@ Task type 描述被请求的结果,而不是强制的执行者。Leader 直接
|
|
|
18
22
|
有独立价值的 WorkItem。直接执行没有 Group。复制是为了在同一个冻结 Assignment 上
|
|
19
23
|
进行独立尝试而被显式请求的,随后由 Leader 选择综合。
|
|
20
24
|
|
|
25
|
+
工作范围重叠只在 `task next-action` 中作为只读建议,不再按文本匹配拦截创建。
|
|
26
|
+
Leader 读取原始需求并判断是否属于独立工作。请求身份、权限、依赖、工作区隔离和
|
|
27
|
+
验收校验仍独立强制执行。
|
|
28
|
+
|
|
21
29
|
## 受管工作区
|
|
22
30
|
|
|
23
31
|
稳定的 Project checkout 是只读参考。Task main 是一个逻辑上的多 Project 根,带有
|
|
@@ -37,17 +45,65 @@ Task 仓库所有。对单个 Project,Agent 的正常 cwd 是其受管 Git 根
|
|
|
37
45
|
|
|
38
46
|
## Candidate、Review 与 Integration
|
|
39
47
|
|
|
40
|
-
Provider 终态保存确切的原始 Run 结果。它不验收 WorkItem。Leader
|
|
41
|
-
|
|
48
|
+
Provider 终态保存确切的原始 Run 结果。它不验收 WorkItem。Leader 评估结果及其不可变的
|
|
49
|
+
按 Project 划分的 Git 快照。ChangeSet 是可选的差异证据;治理 Candidate 为 Review 和
|
|
42
50
|
Integration 提供来源;Producer 不独立进入这两条路径中的任何一条。
|
|
43
51
|
|
|
44
|
-
|
|
52
|
+
Agent 选择结果顺序与策略,再从精确 WorkItem Candidate 发起一次 Integration,
|
|
53
|
+
不再维护单独的 ChangeSet 集成队列。
|
|
54
|
+
Integration 在候选 worktree 中套用固定来源提交,运行已配置的检查,然后只有在
|
|
45
55
|
目标 head 仍匹配时才推进目标。冲突、检查失败、目标移动或拒绝都保留证据,绝不推进
|
|
46
56
|
目标。Agent 在保留的工作区内选择重试或手动解决。
|
|
47
57
|
|
|
58
|
+
已有 merge/rebase/cherry-pick 若缺少原尝试的进度回执,不根据 Git 标记接管。
|
|
59
|
+
保留现场并选择显式恢复;正常续作使用原回执,不重放已完成步骤。
|
|
60
|
+
|
|
48
61
|
当检查是一个 DurableJob 时,Integration 在运行期间保留那个确切的 jobId。Job 结算
|
|
49
62
|
后,`task integration continue <task>/<integration>` 消费其结果并执行带守卫的收尾。
|
|
50
|
-
|
|
63
|
+
未结算的 Integration(包括冲突)仍阻止完成,不依赖 Agent 采用了什么执行顺序。
|
|
64
|
+
|
|
65
|
+
### 验证复用与显式重跑
|
|
66
|
+
|
|
67
|
+
配置了 VerificationPlan 的项目,默认只复用完整成功、日志可校验,且 Project、
|
|
68
|
+
提交、计划、工具链、目标 ref/基线都精确匹配的证据。存储 `34→35` 将原始 Project
|
|
69
|
+
计划、L1 artifact 和二进制日志保存在迁移审计存档,不再进入当前执行与缓存读取。
|
|
70
|
+
`historical-change-sets` Integration 必须先结算且不存在执行/交付引用,才能将
|
|
71
|
+
完整 payload 转为 `integration.source-retired` Task 事件;旧 ID 不会复用。
|
|
72
|
+
无匹配证据时正常执行。
|
|
73
|
+
计划必须提供 `schemaVersion: 2`,不再包含 `l1` 或 `record/reuse/enforce` 模式。
|
|
74
|
+
|
|
75
|
+
新建操作时显式要求重跑:
|
|
76
|
+
|
|
77
|
+
```sh
|
|
78
|
+
yui task integration start <task> --work-item <id> --strategy ff --rerun-checks
|
|
79
|
+
yui task upstream integrate <task> --project <project> --rerun-checks
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
该选项是本次 Integration 的不可变意图,不是全局配置开关。`continue` 只消费原先
|
|
83
|
+
接纳的 Job,不会变成重跑。再次执行需创建新尝试,并先结算等价的未完成验证。
|
|
84
|
+
重跑只跳过缓存,不绕过权限、Job 身份、工作区检查或最终目标 CAS。
|
|
85
|
+
显式 `--check` 同样要求实际执行。配置了计划时,它们在计划检查后执行,
|
|
86
|
+
不会被忽略,也不会因命令文本相同而被拒绝。
|
|
87
|
+
非结构化检查不再搜索历史 Job 来替代本次执行。
|
|
88
|
+
|
|
89
|
+
新执行开始前撤下旧成功。失败如实记录;中断、缺失日志或候选被改写时,
|
|
90
|
+
不会保留可复用成功。Job 和本地执行在发布成功证据前,共同检查候选的精确提交、
|
|
91
|
+
分支和干净状态。v5 L2-only 执行摘要隔离旧证据,不删除原有历史。
|
|
92
|
+
过期的缓存使用者不能恢复旧结果。发布查询查看最新匹配证据,不跳过失败去找旧绿灯。
|
|
93
|
+
缓存只表示当前可复用证据,不充当 Task 执行历史;原 Job 和 Integration 记录独立保留。
|
|
94
|
+
|
|
95
|
+
公开 upstream CLI 与其他 Integration 命令共用 Controller Job 入口。
|
|
96
|
+
`--latest` 可以返回多个 Project 各自待处理的 Job;应继续返回的每个 Integration ID,
|
|
97
|
+
而不是重新发起 upstream 请求来轮询进度。
|
|
98
|
+
|
|
99
|
+
Job 的准入、管理操作及启动前检查把非 Leader 限定到当前 Assignment、
|
|
100
|
+
精确 WorkItem 工作区和可写 Project。现有 Job owner 不能表达 Review/replica
|
|
101
|
+
工作区时会明确拒绝,不退回 Task 主工作区。Leader/Operator 管理与已运行 Job 的
|
|
102
|
+
结果结算保持独立。
|
|
103
|
+
|
|
104
|
+
这些身份只覆盖已声明输入,不是所有外部服务和未跟踪环境的完整指纹。
|
|
105
|
+
外部条件变化、排查偶发失败或用户要求再次检查时,应显式重跑。
|
|
106
|
+
计划不赋予真实模型、付费或共享资源测试授权;复用也不替代 Review、验收或发布权限。
|
|
51
107
|
|
|
52
108
|
Review 遵循适用的 Candidate 规则或 Task-final 合同以及冻结的 head。确切的 main
|
|
53
109
|
Reviewer Run 持有报告;执行成功不等于语义通过。验收归 Leader。即使默认审查策略
|
|
@@ -146,6 +202,18 @@ Force 不验证合并、不验收工作、不证明物理静止、不丢弃脏
|
|
|
146
202
|
检查后通过显式的精确 owner 资源操作进行安全清理;不隐含后台重试或更广泛的删除
|
|
147
203
|
权限。两条归档路径都保留 Task 历史与恢复信息。已归档的 Task 不能重开。
|
|
148
204
|
|
|
205
|
+
资源 GC 是独立、显式启用的隔离路径。同一 runtime 子树只移动一次,由父目录
|
|
206
|
+
回执负责恢复完整内容;重复的子目录 registry 记录在同一事务内移除。
|
|
207
|
+
独立 Git worktree 或仍需保留的子资源会阻止移动其父目录,不删除 Task 记录或成果。
|
|
208
|
+
Session 进程归属只读取 SQLite `session_owners`,并校验存活 PID 和启动身份;
|
|
209
|
+
旧 JSON owner 目录不再作为并行来源。
|
|
210
|
+
|
|
211
|
+
清理计划不是执行授权。Apply 与 purge 在现有 SQLite 写锁内重读 Task 状态、
|
|
212
|
+
受管工作区、active Run 和未结算 Job,并保持写锁直到有界文件操作与 registry
|
|
213
|
+
更新完成。Task 重新打开或新增持久所有者会阻止隔离、删除;无法证明安全时
|
|
214
|
+
保留资源并给出原因。已经隔离、随后重新打开的资源可以恢复。
|
|
215
|
+
不增加后台重试 worker 或第二套持久所有权协议。
|
|
216
|
+
|
|
149
217
|
`yui task archive-preflight <task> (--integrated|--abandon) [--force] [--json]`
|
|
150
218
|
一次读取归档条件、交付覆盖与各精确 owner 的清理检查。归档前后都可用,获授权的
|
|
151
219
|
Task Leader reader 也可读取。这里的 `--force` 仅选择要检查的行为,不会归档、
|
package/docs/task-discovery.md
CHANGED
|
@@ -2,25 +2,24 @@
|
|
|
2
2
|
|
|
3
3
|
# Bounded Task discovery
|
|
4
4
|
|
|
5
|
-
Agents discover candidates with `yui task list --
|
|
5
|
+
Agents discover candidates with `yui task list --json`, then
|
|
6
6
|
read the selected Task's Context and original Messages. The catalog is a
|
|
7
7
|
current read, not a summary database, a Context snapshot, an acknowledgement,
|
|
8
8
|
or an execution/acceptance decision.
|
|
9
9
|
|
|
10
|
-
The
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
No storage schema or migration changes are required.
|
|
10
|
+
The catalog is the only list contract; there is no `--view` selector or
|
|
11
|
+
`--verbose` full-history list. Internal interactive selectors retain their
|
|
12
|
+
complete `{id,title,status}` array and read only those columns. Web uses the
|
|
13
|
+
same query at `GET /api/dashboard`. The per-Task detail endpoint retains
|
|
14
|
+
execution, observability, usage and remote-delivery fields. Discovery itself
|
|
15
|
+
does not change persistent records.
|
|
17
16
|
|
|
18
17
|
## Query and page contract
|
|
19
18
|
|
|
20
19
|
```sh
|
|
21
|
-
yui task list --
|
|
22
|
-
yui task list --
|
|
23
|
-
yui task list --
|
|
20
|
+
yui task list --project project-1 --status active --limit 20 --json
|
|
21
|
+
yui task list --attention openInputs --json
|
|
22
|
+
yui task list --search "candidate title" --json
|
|
24
23
|
yui task context task-1 --json
|
|
25
24
|
yui task context inspect task-1 --store task --ref task-1 --digest <digest> --json
|
|
26
25
|
yui task message show task-1/message-1 --json
|