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:
@@ -324,3 +324,81 @@ export async function resumeWechatDigest(id: string) {
|
||||
method: 'POST',
|
||||
});
|
||||
}
|
||||
|
||||
// ─── Agent Code Run ───────────────────────────────────────────────────────────
|
||||
|
||||
export type AgentCodeRunConfigShape = {
|
||||
codeRun: {
|
||||
enabled: boolean;
|
||||
clientEnabled: boolean;
|
||||
generalAutodetect: boolean;
|
||||
requireValidation: boolean;
|
||||
userAllowlist: string[];
|
||||
taskTypeAllowlist: string[];
|
||||
};
|
||||
pageDataDev: {
|
||||
autodetect: boolean;
|
||||
};
|
||||
meta: {
|
||||
notes: string;
|
||||
};
|
||||
};
|
||||
|
||||
export type AgentCodeRunAdminConfig = {
|
||||
config: AgentCodeRunConfigShape;
|
||||
updatedAt: number | null;
|
||||
updatedBy: string | null;
|
||||
source: string;
|
||||
envOverrideActive: boolean;
|
||||
};
|
||||
|
||||
export type AgentCodeRunRuntimeState = {
|
||||
source: string;
|
||||
updatedAt: number | null;
|
||||
updatedBy: string | null;
|
||||
config: AgentCodeRunConfigShape;
|
||||
policy: {
|
||||
source: string;
|
||||
enabled: boolean;
|
||||
clientEnabled: boolean;
|
||||
generalAutodetect: boolean;
|
||||
requireValidation: boolean;
|
||||
pageDataDevAutodetect: boolean;
|
||||
userAllowlist: string[];
|
||||
taskTypeAllowlist: string[];
|
||||
};
|
||||
envOverrideActive: boolean;
|
||||
};
|
||||
|
||||
export async function fetchAgentCodeRunConfig() {
|
||||
return adminFetch<AgentCodeRunAdminConfig>('/admin-api/agent-code-run/config');
|
||||
}
|
||||
|
||||
export async function fetchAgentCodeRunRuntime() {
|
||||
return adminFetch<AgentCodeRunRuntimeState>('/admin-api/agent-code-run/runtime');
|
||||
}
|
||||
|
||||
export async function patchAgentCodeRunConfig(body: { config: AgentCodeRunConfigShape }) {
|
||||
return adminFetch<AgentCodeRunAdminConfig>('/admin-api/agent-code-run/config', {
|
||||
method: 'PATCH',
|
||||
body: JSON.stringify(body),
|
||||
});
|
||||
}
|
||||
|
||||
export type AgentCodeRunHistoryRow = {
|
||||
id: string;
|
||||
userId: string;
|
||||
requestId: string;
|
||||
status: string;
|
||||
taskType: string;
|
||||
executor: string | null;
|
||||
errorMessage: string | null;
|
||||
createdAt: number | null;
|
||||
updatedAt: number | null;
|
||||
};
|
||||
|
||||
export async function fetchAgentCodeRunHistory(limit = 50) {
|
||||
return adminFetch<{ runs: AgentCodeRunHistoryRow[]; limit: number }>(
|
||||
`/admin-api/agent-code-run/runs?limit=${limit}`,
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user