feat(ai): add autonomous runtime loop ledger
Some checks failed
CD Pipeline / workflow-shape (push) Successful in 0s
CD Pipeline / cancel-stale-cd (push) Has been skipped
CD Pipeline / tests (push) Failing after 2m44s
CD Pipeline / build-and-deploy (push) Has been skipped
CD Pipeline / post-deploy-checks (push) Has been skipped
Some checks failed
CD Pipeline / workflow-shape (push) Successful in 0s
CD Pipeline / cancel-stale-cd (push) Has been skipped
CD Pipeline / tests (push) Failing after 2m44s
CD Pipeline / build-and-deploy (push) Has been skipped
CD Pipeline / post-deploy-checks (push) Has been skipped
This commit is contained in:
@@ -855,38 +855,69 @@ function AutonomousRuntimeControlReadbackGrid({
|
||||
t: ReturnType<typeof useTranslations>
|
||||
}) {
|
||||
const rollups = control.rollups
|
||||
const loopLedger = control.runtime_receipt_readback?.autonomous_execution_loop_ledger
|
||||
const loopStages = loopLedger?.stages ?? []
|
||||
const missingStageCount = loopLedger?.missing_stage_ids.length ?? 0
|
||||
|
||||
return (
|
||||
<div style={{ display: 'grid', gridTemplateColumns: 'repeat(3, minmax(0, 1fr))', gap: 10 }} className="automation-inventory-current-autonomy-readback-grid">
|
||||
<GateMatrixRow
|
||||
label={t('globalControl.currentAutonomy.readback.marker')}
|
||||
value={control.program_status.deploy_readback_marker}
|
||||
detail={t('globalControl.currentAutonomy.readback.markerDetail', {
|
||||
task: control.program_status.current_task_id,
|
||||
status: control.program_status.status,
|
||||
})}
|
||||
tone="ok"
|
||||
/>
|
||||
<GateMatrixRow
|
||||
label={t('globalControl.currentAutonomy.readback.executor')}
|
||||
value={String(rollups.live_ansible_apply_executed_count ?? 0)}
|
||||
detail={t('globalControl.currentAutonomy.readback.executorDetail', {
|
||||
verifier: rollups.live_post_apply_verifier_count ?? 0,
|
||||
km: rollups.live_km_writeback_count ?? 0,
|
||||
telegram: rollups.live_telegram_receipt_count ?? 0,
|
||||
})}
|
||||
tone={(rollups.live_ansible_apply_executed_count ?? 0) > 0 ? 'ok' : 'warn'}
|
||||
/>
|
||||
<GateMatrixRow
|
||||
label={t('globalControl.currentAutonomy.readback.loop')}
|
||||
value={String(rollups.live_executor_latest_flow_closed_count ?? 0)}
|
||||
detail={t('globalControl.currentAutonomy.readback.loopDetail', {
|
||||
mcp: rollups.mcp_sensor_count ?? 0,
|
||||
rag: rollups.rag_context_query_count ?? 0,
|
||||
playbook: rollups.playbook_decision_class_count ?? 0,
|
||||
})}
|
||||
tone={(rollups.live_executor_latest_flow_closed_count ?? 0) > 0 ? 'ok' : 'warn'}
|
||||
/>
|
||||
<div style={{ display: 'flex', flexDirection: 'column', gap: 10, minWidth: 0 }}>
|
||||
<div style={{ display: 'grid', gridTemplateColumns: 'repeat(auto-fit, minmax(180px, 1fr))', gap: 10 }} className="automation-inventory-current-autonomy-readback-grid">
|
||||
<GateMatrixRow
|
||||
label={t('globalControl.currentAutonomy.readback.marker')}
|
||||
value={control.program_status.deploy_readback_marker}
|
||||
detail={t('globalControl.currentAutonomy.readback.markerDetail', {
|
||||
task: control.program_status.current_task_id,
|
||||
status: control.program_status.status,
|
||||
})}
|
||||
tone="ok"
|
||||
/>
|
||||
<GateMatrixRow
|
||||
label={t('globalControl.currentAutonomy.readback.executor')}
|
||||
value={String(rollups.live_ansible_apply_executed_count ?? 0)}
|
||||
detail={t('globalControl.currentAutonomy.readback.executorDetail', {
|
||||
verifier: rollups.live_post_apply_verifier_count ?? 0,
|
||||
km: rollups.live_km_writeback_count ?? 0,
|
||||
telegram: rollups.live_telegram_receipt_count ?? 0,
|
||||
})}
|
||||
tone={(rollups.live_ansible_apply_executed_count ?? 0) > 0 ? 'ok' : 'warn'}
|
||||
/>
|
||||
<GateMatrixRow
|
||||
label={t('globalControl.currentAutonomy.readback.loop')}
|
||||
value={String(rollups.live_executor_latest_flow_closed_count ?? 0)}
|
||||
detail={t('globalControl.currentAutonomy.readback.loopDetail', {
|
||||
mcp: rollups.mcp_sensor_count ?? 0,
|
||||
rag: rollups.rag_context_query_count ?? 0,
|
||||
playbook: rollups.playbook_decision_class_count ?? 0,
|
||||
})}
|
||||
tone={(rollups.live_executor_latest_flow_closed_count ?? 0) > 0 ? 'ok' : 'warn'}
|
||||
/>
|
||||
<GateMatrixRow
|
||||
label={t('globalControl.currentAutonomy.readback.ledger')}
|
||||
value={String(rollups.live_autonomous_execution_loop_closed_count ?? 0)}
|
||||
detail={t('globalControl.currentAutonomy.readback.ledgerDetail', {
|
||||
state: loopLedger?.execution_state ?? 'none',
|
||||
stages: loopStages.length,
|
||||
missing: missingStageCount,
|
||||
})}
|
||||
tone={(rollups.live_autonomous_execution_loop_closed_count ?? 0) > 0 ? 'ok' : missingStageCount > 0 ? 'warn' : 'neutral'}
|
||||
/>
|
||||
</div>
|
||||
{loopLedger ? (
|
||||
<div style={{ padding: 12, border: '0.5px solid #d8e8df', borderRadius: 7, background: '#fbfffd', display: 'flex', flexDirection: 'column', gap: 8, minWidth: 0 }}>
|
||||
<SmallLabel>{t('globalControl.currentAutonomy.readback.stageLedger')}</SmallLabel>
|
||||
<div style={{ display: 'grid', gridTemplateColumns: 'repeat(auto-fit, minmax(180px, 1fr))', gap: 8 }} className="automation-inventory-current-autonomy-stage-ledger">
|
||||
{loopStages.map(stage => (
|
||||
<GateMatrixRow
|
||||
key={stage.stage_id}
|
||||
label={stage.stage_id}
|
||||
value={stage.status}
|
||||
detail={stage.present ? stage.receipt_source : `${stage.receipt_source} · ${stage.next_action_if_missing ?? '--'}`}
|
||||
tone={stage.present ? 'ok' : stage.writes_runtime_state ? 'warn' : 'neutral'}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
) : null}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -2197,7 +2197,9 @@ export interface AiAgentAutonomousRuntimeControlSnapshot {
|
||||
runtime_write_receipt_type_count: number
|
||||
legacy_policy_overridden_count: number
|
||||
live_ansible_apply_executed_count?: number
|
||||
live_auto_repair_execution_receipt_count?: number
|
||||
live_executor_latest_flow_closed_count?: number
|
||||
live_autonomous_execution_loop_closed_count?: number
|
||||
live_km_writeback_count?: number
|
||||
live_post_apply_verifier_count?: number
|
||||
live_telegram_receipt_count?: number
|
||||
@@ -2206,6 +2208,43 @@ export interface AiAgentAutonomousRuntimeControlSnapshot {
|
||||
playbook_decision_class_count?: number
|
||||
deploy_control_classifier_example_count?: number
|
||||
}
|
||||
runtime_receipt_readback?: {
|
||||
schema_version: 'ai_agent_autonomous_runtime_receipt_readback_v1'
|
||||
db_read_status: string
|
||||
writes_on_read: boolean
|
||||
autonomous_execution_loop_ledger?: {
|
||||
schema_version: 'ai_agent_autonomous_execution_loop_ledger_v1'
|
||||
project_id: string
|
||||
operation_id: string | null
|
||||
root_candidate_op_id: string | null
|
||||
check_mode_op_id: string | null
|
||||
apply_op_id: string | null
|
||||
incident_id: string | null
|
||||
catalog_id: string | null
|
||||
playbook_path: string | null
|
||||
execution_state: string
|
||||
closed: boolean
|
||||
missing_stage_ids: string[]
|
||||
next_executor_action: string
|
||||
stages: Array<{
|
||||
stage_id: string
|
||||
receipt_source: string
|
||||
present: boolean
|
||||
status: string
|
||||
ref_id: string | null
|
||||
writes_runtime_state: boolean
|
||||
next_action_if_missing: string | null
|
||||
}>
|
||||
safety_contract: {
|
||||
writes_on_read: boolean
|
||||
backfill_may_write_auto_repair_verifier_km: boolean
|
||||
backfill_may_send_telegram: boolean
|
||||
live_apply_may_send_telegram_gateway_receipt: boolean
|
||||
reads_raw_sessions: boolean
|
||||
reads_secret_values: boolean
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export interface AiAgentAutomationInventorySnapshot {
|
||||
|
||||
Reference in New Issue
Block a user