feat(agents): expose autonomous runtime control
Some checks failed
CD Pipeline / tests (push) Successful in 1m43s
CD Pipeline / post-deploy-checks (push) Has been cancelled
CD Pipeline / build-and-deploy (push) Has been cancelled
Code Review / ai-code-review (push) Has been cancelled
Ansible / Reboot Recovery Contract / validate (push) Has been cancelled

This commit is contained in:
Your Name
2026-06-27 19:31:02 +08:00
parent d359587316
commit ce0c7cbaf8
13 changed files with 1017 additions and 38 deletions

View File

@@ -843,6 +843,11 @@ export const apiClient = {
return handleResponse<AiAgentAutomationInventorySnapshot>(res)
},
async getAiAgentAutonomousRuntimeControl() {
const res = await fetch(`${API_BASE_URL}/agents/agent-autonomous-runtime-control`)
return handleResponse<AiAgentAutonomousRuntimeControlSnapshot>(res)
},
async getAiAgentAutomationBacklogSnapshot() {
const res = await fetch(`${API_BASE_URL}/agents/automation-backlog-snapshot`)
return handleResponse<AiAgentAutomationBacklogSnapshot>(res)
@@ -1848,6 +1853,91 @@ export interface AiTechnologyReportCadenceReadback {
// AI Agent Automation Inventory Snapshot
// =========================================================================
export interface AiAgentAutonomousRuntimeControlSnapshot {
schema_version: 'ai_agent_autonomous_runtime_control_v1'
generated_at: string
program_status: {
current_task_id: 'P2-416-D1N'
status: string
runtime_authority: 'current_owner_directive_controlled_ai_automation'
legacy_no_send_no_live_rules_overridden: true
implementation_completion_percent: number
status_note: string
}
current_policy: {
low_risk_controlled_apply_allowed: boolean
medium_risk_controlled_apply_allowed: boolean
high_risk_controlled_apply_allowed: boolean
critical_break_glass_required: boolean
owner_review_required_for_low_medium_high: boolean
direct_bot_api_allowed: boolean
telegram_gateway_required: boolean
post_apply_verifier_required: boolean
km_learning_writeback_required: boolean
}
runtime_switches: {
ansible_check_mode_worker_enabled: boolean
ansible_controlled_apply_enabled: boolean
ansible_controlled_apply_allowed_risk_levels: string[]
ansible_check_mode_interval_seconds: number
ansible_check_mode_batch_limit: number
ansible_check_mode_timeout_seconds: number
ansible_controlled_apply_timeout_seconds: number
}
agent_roles: Array<{
agent_id: string
role: string
current_job: string
}>
report_delivery: {
status: string
cadences: Array<{
cadence: 'daily' | 'weekly' | 'monthly'
display_name: string
schedule: string
worker: string
telegram_gateway_delivery_enabled: boolean
direct_bot_api_allowed: boolean
receipt_source: string
}>
}
controlled_executor: {
status: string
operation_receipts: Array<{
operation_type: string
owner_agent: string
purpose: string
writes_runtime_state: boolean
}>
required_flow: string[]
}
legacy_policy_overrides: Array<{
legacy_area: string
current_effect: string
new_behavior: string
}>
hard_blockers: string[]
visibility_contract: {
frontend_displays_runtime_truth: boolean
work_window_transcript_display_allowed: boolean
raw_prompt_display_allowed: boolean
private_reasoning_display_allowed: boolean
secret_value_display_allowed: boolean
raw_telegram_payload_display_allowed: boolean
lan_topology_redaction_required: boolean
}
rollups: {
automated_risk_tier_count: number
hard_blocker_count: number
report_cadence_enabled_count: number
telegram_gateway_delivery_enabled_count: number
direct_bot_api_allowed_count: number
controlled_executor_operation_receipt_count: number
runtime_write_receipt_type_count: number
legacy_policy_overridden_count: number
}
}
export interface AiAgentAutomationInventorySnapshot {
schema_version: 'ai_agent_automation_inventory_snapshot_v1'
generated_at: string