chore: 提交所有工作进度 — SaaS 后端增强、Admin UI、桌面端集成

包含大量 SaaS 平台改进、Admin 管理后台更新、桌面端集成完善、
文档同步、测试文件重构等内容。为 QA 测试准备干净工作树。
This commit is contained in:
iven
2026-03-29 10:46:26 +08:00
parent 9a5fad2b59
commit 5fdf96c3f5
268 changed files with 22011 additions and 3886 deletions

View File

@@ -464,7 +464,7 @@ export class KernelClient {
agentId?: string;
}
): Promise<{ runId: string }> {
const runId = `run_${Date.now()}`;
const runId = crypto.randomUUID();
const sessionId = opts?.sessionKey || runId;
const agentId = opts?.agentId || this.defaultAgentId;
@@ -1100,12 +1100,54 @@ export class KernelClient {
return () => {};
}
// === A2A (Agent-to-Agent) API ===
/**
* Verify audit log chain (GatewayClient compatibility)
* Note: Not implemented for internal kernel
* Send a direct A2A message from one agent to another
*/
async verifyAuditLogChain(): Promise<{ valid: boolean; chain_depth?: number; root_hash?: string; broken_at_index?: number }> {
return { valid: false, chain_depth: 0, root_hash: '' };
/**
* Send a direct A2A message from one agent to another
*/
async a2aSend(from: string, to: string, payload: unknown, messageType?: string): Promise<void> {
await invoke('agent_a2a_send', {
from,
to,
payload,
messageType: messageType || 'notification',
});
}
/**
* Broadcast a message from an agent to all other agents
*/
async a2aBroadcast(from: string, payload: unknown): Promise<void> {
await invoke('agent_a2a_broadcast', { from, payload });
}
/**
* Discover agents that have a specific capability
*/
async a2aDiscover(capability: string): Promise<Array<{
id: string;
name: string;
description: string;
capabilities: Array<{ name: string; description: string }>;
role: string;
priority: number;
}>> {
return await invoke('agent_a2a_discover', { capability });
}
/**
* Delegate a task to another agent and wait for response
*/
async a2aDelegateTask(from: string, to: string, task: string, timeoutMs?: number): Promise<unknown> {
return await invoke('agent_a2a_delegate_task', {
from,
to,
task,
timeoutMs: timeoutMs || 30000,
});
}
// === Internal ===