feat: seal isolated worker recovery, parent integration and review console
This commit is contained in:
@@ -103,11 +103,13 @@ export function assertWorkerTool(store, session, tool, args) {
|
||||
if (!WORKER_TOOLS.has(tool)) throw workerConflict('受限子任务不开放这个工具:' + tool);
|
||||
if (tool === 'propose_file' || tool === 'propose_patch') assertWorkerWriteScope(store, session, args.path);
|
||||
}
|
||||
export function assertWorkersResolved(store, projectId) {
|
||||
export function assertWorkersResolved(store, projectId, { recoveryTaskId = null } = {}) {
|
||||
const group = [...(store.core.collaboration?.values() ?? [])].find(value => value.requiresVerification
|
||||
&& (value.projectId === projectId || value.children.some(child => child.projectId === projectId)));
|
||||
&& (value.projectId === projectId || value.children.some(child => child.projectId === projectId))
|
||||
&& !(recoveryTaskId && (value.projectId === projectId && value.taskId === recoveryTaskId
|
||||
|| value.children.some(child => child.projectId === projectId && child.taskId === recoveryTaskId))));
|
||||
const worker = workerForProject(store, projectId);
|
||||
if (group || worker?.requiresVerification) throw workerConflict('协作执行结果待核对,请返回父任务查看原输入和现场,不会自动重放。');
|
||||
if (group || worker?.requiresVerification && worker.taskId !== recoveryTaskId) throw workerConflict('协作执行结果待核对,请返回父任务查看原输入和现场,不会自动重放。');
|
||||
}
|
||||
export function workerUsage(store, worker) {
|
||||
const task = store.core.task.get(worker.taskId), runs = [...store.core.run.values()].filter(run => run.taskId === worker.taskId);
|
||||
|
||||
Reference in New Issue
Block a user