chore: 提交所有工作进度 — SaaS 后端增强、Admin UI、桌面端集成
包含大量 SaaS 平台改进、Admin 管理后台更新、桌面端集成完善、 文档同步、测试文件重构等内容。为 QA 测试准备干净工作树。
This commit is contained in:
@@ -14,6 +14,8 @@
|
||||
* Reference: ZCLAW_AGENT_INTELLIGENCE_EVOLUTION.md §6.4.3
|
||||
*/
|
||||
|
||||
import { generateRandomString } from './crypto-utils';
|
||||
|
||||
// === Types ===
|
||||
|
||||
export type AutonomyLevel = 'supervised' | 'assisted' | 'autonomous';
|
||||
@@ -278,7 +280,7 @@ export class AutonomyManager {
|
||||
* Returns approval ID that can be used to approve/reject.
|
||||
*/
|
||||
requestApproval(decision: AutonomyDecision): string {
|
||||
const approvalId = `approval_${Date.now()}_${Math.random().toString(36).slice(2, 8)}`;
|
||||
const approvalId = `approval_${Date.now()}_${generateRandomString(6)}`;
|
||||
this.pendingApprovals.set(approvalId, decision);
|
||||
|
||||
// Store in localStorage for persistence
|
||||
@@ -349,7 +351,7 @@ export class AutonomyManager {
|
||||
|
||||
private logDecision(decision: AutonomyDecision, context: Record<string, unknown>): void {
|
||||
const entry: AuditLogEntry = {
|
||||
id: `audit_${Date.now()}_${Math.random().toString(36).slice(2, 8)}`,
|
||||
id: `audit_${Date.now()}_${generateRandomString(6)}`,
|
||||
action: decision.action,
|
||||
decision,
|
||||
context,
|
||||
|
||||
Reference in New Issue
Block a user