feat(admin): add Memory V2 personal controls and Skill Runtime page
Wire admin UI and API routes to restored Memind personal memory and skill runtime modules, including candidate review and runtime status display. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -25,6 +25,7 @@ import type {
|
||||
LlmProviderKeyRow,
|
||||
PlanDefinition,
|
||||
PlanSyncResult,
|
||||
PersonalMemoryCandidateListResponse,
|
||||
PolicyDefinition,
|
||||
PolicyMap,
|
||||
PortalUser,
|
||||
@@ -32,6 +33,10 @@ import type {
|
||||
MemoryV2AdminConfig,
|
||||
MemoryV2AdminConfigResponse,
|
||||
MemoryV2ModelApiType,
|
||||
MemoryV2RuntimeStatusResponse,
|
||||
SkillRuntimeAdminConfig,
|
||||
SkillRuntimeAdminConfigResponse,
|
||||
SkillRuntimeCatalogItem,
|
||||
SkillDefinition,
|
||||
SkillMap,
|
||||
UsageRecord,
|
||||
@@ -327,6 +332,25 @@ export async function getMemoryV2AdminConfig(): Promise<MemoryV2AdminConfigRespo
|
||||
return portalFetch('/admin-api/memory-v2/config');
|
||||
}
|
||||
|
||||
export async function getMemoryV2RuntimeStatus(): Promise<MemoryV2RuntimeStatusResponse> {
|
||||
return portalFetch('/admin-api/memory-v2/status');
|
||||
}
|
||||
|
||||
export async function listPersonalMemoryCandidates(
|
||||
status = 'candidate',
|
||||
): Promise<PersonalMemoryCandidateListResponse> {
|
||||
return portalFetch(`/admin-api/memory-v2/candidates?status=${encodeURIComponent(status)}&limit=50`);
|
||||
}
|
||||
|
||||
export async function reviewPersonalMemoryCandidate(
|
||||
id: string,
|
||||
action: 'accept' | 'reject',
|
||||
): Promise<{ updated: boolean; status: string; reviewedAt: number }> {
|
||||
return portalFetch(`/admin-api/memory-v2/candidates/${encodeURIComponent(id)}/${action}`, {
|
||||
method: 'POST',
|
||||
});
|
||||
}
|
||||
|
||||
export async function updateMemoryV2AdminConfig(
|
||||
payload: Partial<MemoryV2AdminConfig>,
|
||||
): Promise<MemoryV2AdminConfigResponse> {
|
||||
@@ -336,6 +360,24 @@ export async function updateMemoryV2AdminConfig(
|
||||
});
|
||||
}
|
||||
|
||||
export async function getSkillRuntimeAdminConfig(): Promise<SkillRuntimeAdminConfigResponse> {
|
||||
return portalFetch('/admin-api/skill-runtime/config');
|
||||
}
|
||||
|
||||
export async function updateSkillRuntimeAdminConfig(
|
||||
config: SkillRuntimeAdminConfig,
|
||||
): Promise<SkillRuntimeAdminConfigResponse> {
|
||||
return portalFetch('/admin-api/skill-runtime/config', {
|
||||
method: 'PUT',
|
||||
body: JSON.stringify({ config }),
|
||||
});
|
||||
}
|
||||
|
||||
export async function listSkillRuntimeCatalog(): Promise<SkillRuntimeCatalogItem[]> {
|
||||
const result = await portalFetch<{ catalog: SkillRuntimeCatalogItem[] }>('/admin-api/skill-runtime/catalog');
|
||||
return result.catalog ?? [];
|
||||
}
|
||||
|
||||
export async function listMemoryV2ModelOptions(): Promise<{
|
||||
global: LlmGlobalSettings;
|
||||
keys: LlmProviderKeyRow[];
|
||||
|
||||
Reference in New Issue
Block a user