feat: integrate Orven workspace and engineering repairs for 1.25.9
This commit is contained in:
@@ -370,6 +370,7 @@ return async (request, response) => {
|
||||
if (sessionMatch) {
|
||||
const id = sessionMatch[1], action = sessionMatch[2] ?? '';
|
||||
const session = store.session(id);
|
||||
if (method === 'POST' && action !== 'stop') await runtime.awaitFinalization(id);
|
||||
if (action === 'input-attachments') {
|
||||
if (method === 'GET') return json(response,runtime.inputAttachments().list(session));
|
||||
if (workerForProject(store,session.projectId)) throw workerConflict('截图附件请在父任务中添加。');
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { randomUUID, createHash } from 'node:crypto';
|
||||
|
||||
export const APP_VERSION = '1.25.8';
|
||||
export const APP_VERSION = '1.25.9';
|
||||
|
||||
export function executionEnvironment() {
|
||||
const windows = process.platform === 'win32';
|
||||
|
||||
@@ -158,6 +158,12 @@ export class Runtime {
|
||||
this.active = new Map(); this.waiters = new Map();
|
||||
}
|
||||
isActive(id) { return !!this.browsing?.isActive(id) || !!this.previews?.isActive(id) || !!this.environments?.isActive(id) || !!this.evaluations?.isActive(id) || this.active.has(id) || !!this.workers?.isActive(id) || !!this.controlledEngines?.isActive(id) || !!this.checks?.isActive(id) || !!this.deliveries?.isActive(id) || !!this.changeSets?.isActive(id) || !!this.workspaces?.isActive(id) || !!this.research?.isActive(id) || !!this.engines?.isActive(id) || !!this.browser?.isActive(id) || !!this.taskPlans?.isActive(id); }
|
||||
async awaitFinalization(id) {
|
||||
const run = this.active.get(id);
|
||||
// The tool loop has already ended. Let the original report finish under its
|
||||
// source lock before a newly requested mutation changes those inputs.
|
||||
if (run?.finalizing) await run.promise.catch(() => {});
|
||||
}
|
||||
hasActivity() { return (this.provider.hub?.catalog?.active.size ?? 0) > 0 || (this.provider.hub?.networkChecks?.active.size ?? 0) > 0 || (this.browsing?.active.size ?? 0) > 0 || (this.previews?.active.size ?? 0) > 0 || (this.environments?.active.size ?? 0) > 0 || (this.evaluations?.active.size ?? 0) > 0 || (this.provider.activeRequests ?? 0) > 0 || (this.provider.hub?.waiting ?? 0) > 0 || this.active.size > 0 || (this.workers?.active.size ?? 0) > 0 || (this.controlledEngines?.drivers.size ?? 0) > 0 || (this.mcp?.active.size ?? 0) > 0 || (this.checks?.active.size ?? 0) > 0 || (this.deliveries?.active.size ?? 0) > 0 || (this.changeSets?.projects.size ?? 0) > 0 || (this.workspaces?.projects.size ?? 0) > 0 || (this.workspaces?.pending.size ?? 0) > 0 || (this.research?.active.size ?? 0) > 0 || (this.engines?.active.size ?? 0) > 0 || (this.browser?.active.size ?? 0) > 0 || (this.taskPlans?.active.size ?? 0) > 0; }
|
||||
evaluationManager() { return this.evaluations ??= new EvaluationManager(this.store, this); }
|
||||
workerManager() { return this.workers ??= new WorkerManager(this.store, this); }
|
||||
@@ -314,6 +320,7 @@ export class Runtime {
|
||||
const deadline = scheduleDeadline(() => controller.abort(new BudgetExceeded('time_limit', '已到达本次运行的时间预算,执行记录已保存。')), record.budget.maxDurationMs);
|
||||
run.promise = this.run(session, config, run).finally(async () => {
|
||||
deadline?.();
|
||||
run.finalizing = true;
|
||||
try {
|
||||
const status = session.status;
|
||||
if (record.purpose === 'diagnostic') session.status = record.taskStatusBefore;
|
||||
|
||||
Reference in New Issue
Block a user