fix(production-readiness): 3-batch production readiness cleanup — 12 tasks
Some checks failed
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Rust Check (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled

Batch 1 — User-facing fixes:
- B1-1: Pipeline verified end-to-end (14 Rust commands, 8 frontend invoke, fully connected)
- B1-2: MessageSearch restored to ChatArea with search button in DeerFlow header
- B1-3: Viking cleanup — removed 5 orphan invokes (no Rust impl), added addWithMetadata + storeWithSummaries methods + summary generation UI
- B1-4: api-fallbacks transparency — added _isFallback markers + console.warn to all 6 fallback functions

Batch 2 — System health:
- B2-1: Document drift calibration — TRUTH.md/README.md numbers verified and updated
- B2-2: @reserved annotations on 15 SaaS handler functions with no frontend callers
- B2-3: Scheduled Task Admin V2 — new service + page + route + sidebar navigation
- B2-4: TRUTH.md Pipeline/Viking/ScheduledTask records corrected

Batch 3 — Long-term quality:
- B3-1: hand_run_status/hand_run_list verified as fully implemented (not stubs)
- B3-2: Identity snapshot rollback UI added to RightPanel
- B3-3: P2 code quality — 4 fixes (TODO comments, fire-and-forget notes, design notes, table name validation), 2 verified N/A, 1 upstream
- B3-4: Config PATCH→PUT alignment (admin-v2 config.ts matched to SaaS backend)
This commit is contained in:
iven
2026-04-03 21:34:56 +08:00
parent 305984c982
commit 2ceeeaba3d
17 changed files with 1157 additions and 81 deletions

View File

@@ -65,13 +65,15 @@ export async function addVikingResource(
}
/**
* Add a resource with inline content
* Add a resource with metadata (keywords + importance)
*/
export async function addVikingResourceInline(
export async function addVikingResourceWithMetadata(
uri: string,
content: string
content: string,
keywords: string[],
importance?: number
): Promise<VikingAddResult> {
return invoke<VikingAddResult>('viking_add_inline', { uri, content });
return invoke<VikingAddResult>('viking_add_with_metadata', { uri, content, keywords, importance });
}
/**
@@ -136,41 +138,16 @@ export async function getVikingTree(
return invoke<Record<string, unknown>>('viking_tree', { path, depth });
}
// === Server Functions ===
export interface VikingServerStatus {
running: boolean;
port?: number;
pid?: number;
error?: string;
}
// === Summary Generation Functions ===
/**
* Get Viking server status
* Store a resource and auto-generate L0/L1 summaries via configured LLM driver
*/
export async function getVikingServerStatus(): Promise<VikingServerStatus> {
return invoke<VikingServerStatus>('viking_server_status');
}
/**
* Start Viking server
*/
export async function startVikingServer(): Promise<void> {
return invoke<void>('viking_server_start');
}
/**
* Stop Viking server
*/
export async function stopVikingServer(): Promise<void> {
return invoke<void>('viking_server_stop');
}
/**
* Restart Viking server
*/
export async function restartVikingServer(): Promise<void> {
return invoke<void>('viking_server_restart');
export async function storeWithSummaries(
uri: string,
content: string
): Promise<VikingAddResult> {
return invoke<VikingAddResult>('viking_store_with_summaries', { uri, content });
}
// === Memory Extraction Functions ===