feat: Page Data dev loop, adm Code Run UI, and customer order demo
Add verify→Aider→OpenHands dev loop, memindadm config/history UI, and john4 customer-order Page Data demo with scenario + verification scripts. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -8,6 +8,7 @@ const POLICY_SOURCE_DEFAULT = 'default';
|
||||
|
||||
const DEFAULT_TASK_TYPES = Object.freeze([
|
||||
'page_data_dev',
|
||||
'page_data_dev_complex',
|
||||
'h5_chat_code_task',
|
||||
'page_edit_code_task',
|
||||
]);
|
||||
@@ -318,6 +319,39 @@ export function createAgentCodeRunAdminConfigService(pool, { env = process.env }
|
||||
updatedBy: state.updatedBy,
|
||||
};
|
||||
},
|
||||
|
||||
async listRecentPageDataDevRuns({ limit = 50 } = {}) {
|
||||
const pageDataTaskTypes = new Set(['page_data_dev', 'page_data_dev_complex']);
|
||||
const capped = Math.min(Math.max(Number(limit) || 50, 1), 200);
|
||||
const [rows] = await pool.query(
|
||||
`SELECT id, user_id, request_id, status, error_message, created_at, updated_at, user_message_json
|
||||
FROM h5_agent_runs
|
||||
ORDER BY updated_at DESC
|
||||
LIMIT ?`,
|
||||
[capped * 4],
|
||||
);
|
||||
const runs = [];
|
||||
for (const row of rows) {
|
||||
if (runs.length >= capped) break;
|
||||
const parsed = parseJsonLike(row.user_message_json, {});
|
||||
const metadata = parsed?.metadata ?? {};
|
||||
const runMetadata = metadata.memindRun ?? metadata.agentRun ?? {};
|
||||
const taskType = String(runMetadata.taskType ?? metadata.taskType ?? '').trim().toLowerCase();
|
||||
if (!pageDataTaskTypes.has(taskType)) continue;
|
||||
runs.push({
|
||||
id: row.id,
|
||||
userId: row.user_id,
|
||||
requestId: row.request_id,
|
||||
status: row.status,
|
||||
taskType,
|
||||
executor: String(runMetadata.executor ?? metadata.executor ?? '').trim() || null,
|
||||
errorMessage: row.error_message ?? null,
|
||||
createdAt: Number(row.created_at ?? 0) || null,
|
||||
updatedAt: Number(row.updated_at ?? 0) || null,
|
||||
});
|
||||
}
|
||||
return { runs, limit: capped };
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user