feat(ai): 新增 P2-407 報表 no-write 分析
Some checks failed
Code Review / ai-code-review (push) Successful in 14s
CD Pipeline / build-and-deploy (push) Has been cancelled
CD Pipeline / post-deploy-checks (push) Has been cancelled
CD Pipeline / tests (push) Has been cancelled
Ansible / Reboot Recovery Contract / validate (push) Has been cancelled

This commit is contained in:
Your Name
2026-06-18 15:18:06 +08:00
parent d4fc227ed9
commit 8548892f59
13 changed files with 1676 additions and 7 deletions

View File

@@ -344,6 +344,11 @@ export const apiClient = {
return handleResponse<AiAgentReceiptReadbackOwnerReviewSnapshot>(res)
},
async getAiAgentReportNoWriteAnalysisRuntime() {
const res = await fetch(`${API_BASE_URL}/agents/agent-report-no-write-analysis-runtime`)
return handleResponse<AiAgentReportNoWriteAnalysisRuntimeSnapshot>(res)
},
async getAiAgentProactiveOperationsContract() {
const res = await fetch(`${API_BASE_URL}/agents/agent-proactive-operations-contract`)
return handleResponse<AiAgentProactiveOperationsContractSnapshot>(res)
@@ -3054,6 +3059,180 @@ export interface AiAgentReportTruthActionabilityReviewSnapshot {
}
}
export interface AiAgentReportNoWriteAnalysisRuntimeSnapshot {
schema_version: 'ai_agent_report_no_write_analysis_runtime_v1'
generated_at: string
program_status: {
overall_completion_percent: number
current_priority: 'P0' | 'P1' | 'P2' | 'P3'
current_task_id: 'P2-407'
next_task_id: 'P2-408'
read_only_mode: true
runtime_authority: 'report_analysis_no_write_runtime_only_committed_snapshot'
status_note: string
}
source_refs: string[]
source_readbacks: Array<{
readback_id: string
source_schema_version: string
source_ref: string
endpoint: string
owner_agent: 'openclaw' | 'hermes' | 'nemotron'
status: string
key_readback: string
next_action: string
}>
analysis_truth: {
daily_weekly_monthly_reports_loaded: true
agent_workload_loaded: true
charts_loaded: true
receipt_owner_review_loaded: true
dependency_drift_loaded: true
report_truth_loaded: true
analysis_draft_snapshot_ready: true
ai_analysis_runtime_enabled: false
report_delivery_enabled: false
telegram_send_enabled: false
gateway_queue_write_enabled: false
bot_api_call_enabled: false
receipt_production_write_enabled: false
production_write_enabled: false
secret_read_enabled: false
paid_api_call_enabled: false
host_write_enabled: false
kubectl_action_enabled: false
live_ai_analysis_run_count_24h: number
live_report_delivery_count_24h: number
telegram_send_count_24h: number
gateway_queue_write_count_24h: number
bot_api_call_count_24h: number
receipt_production_write_count_24h: number
production_write_count_24h: number
truth_note: string
}
report_inputs: Array<{
report_id: 'daily' | 'weekly' | 'monthly'
display_name: string
owner_agent: 'openclaw' | 'hermes' | 'nemotron'
completion_percent: number
source_confidence: string
actionability_score: number
analysis_focus: string[]
blocked_runtime_action: string
}>
agent_analysis_passes: Array<{
agent_id: 'openclaw' | 'hermes' | 'nemotron'
display_name: string
role: string
reviewed_source_count: number
draft_finding_count: number
highest_risk_tier: 'low' | 'medium' | 'high' | 'critical'
live_runtime_write_allowed: false
summary: string
handoff_to: string
}>
draft_recommendations: Array<{
recommendation_id: string
display_name: string
owner_agent: 'openclaw' | 'hermes' | 'nemotron'
risk_tier: 'low' | 'medium' | 'high' | 'critical'
approval_required: boolean
actionability_score: number
problem: string
draft_solution: string
expected_signal: string
blocked_runtime_action: string
}>
draft_artifacts: Array<{
artifact_id: string
display_name: string
owner_agent: 'openclaw' | 'hermes' | 'nemotron'
status: 'committed_snapshot_ready' | 'draft_only' | 'owner_review_required' | 'blocked_by_runtime_gate'
writes_production: false
sends_telegram: false
contains_secret: false
evidence_ref: string
}>
owner_review_gates: Array<{
gate_id: string
display_name: string
owner_agent: 'openclaw' | 'hermes' | 'nemotron'
risk_tier: 'low' | 'medium' | 'high' | 'critical'
status: 'owner_review_required' | 'blocked_by_runtime_gate' | 'draft_ready'
required_fields: string[]
acceptance_checks: string[]
blocked_runtime_actions: string[]
}>
activation_boundaries: {
read_only_analysis_allowed: true
draft_snapshot_write_allowed: true
ai_analysis_runtime_enabled: false
report_delivery_enabled: false
telegram_send_enabled: false
gateway_queue_write_enabled: false
bot_api_call_enabled: false
receipt_production_write_enabled: false
production_write_enabled: false
secret_read_enabled: false
paid_api_call_enabled: false
host_write_enabled: false
kubectl_action_enabled: false
destructive_operation_enabled: false
openclaw_replacement_allowed: false
}
telegram_policy: {
canonical_room: 'AwoooI SRE 戰情室'
canonical_room_env: 'SRE_GROUP_CHAT_ID'
gateway_queue_write_allowed: false
direct_bot_api_allowed: false
telegram_send_allowed: false
receipt_write_allowed: false
policy_note: string
}
display_redaction_contract: {
redaction_required: true
raw_report_payload_display_allowed: false
private_reasoning_display_allowed: false
secret_value_display_allowed: false
work_window_transcript_display_allowed: false
allowed_display_fields: string[]
blocked_display_fields: string[]
}
rollups: {
source_readback_count: number
report_input_count: number
agent_analysis_pass_count: number
draft_recommendation_count: number
draft_artifact_count: number
owner_review_gate_count: number
approval_required_recommendation_count: number
approval_required_recommendation_ids: string[]
low_risk_recommendation_count: number
medium_risk_recommendation_count: number
high_risk_recommendation_count: number
critical_risk_recommendation_count: number
actionability_score_ready_count: number
blocked_runtime_action_count: number
live_report_delivery_count: number
live_ai_analysis_count: number
telegram_send_count: number
gateway_queue_write_count: number
bot_api_call_count: number
receipt_production_write_count: number
production_write_count: number
secret_read_count: number
paid_api_call_count: number
host_write_count: number
kubectl_action_count: number
}
next_actions: Array<{
task_id: string
priority: 'P0' | 'P1' | 'P2' | 'P3'
summary: string
gate: string
}>
}
export interface AiAgentReportAutomationReviewSnapshot {
schema_version: 'ai_agent_report_automation_review_v1'
generated_at: string