feat(telegram): consume alert registry in ai loop context
Some checks failed
CD Pipeline / workflow-shape (push) Successful in 0s
CD Pipeline / cancel-stale-cd (push) Has been skipped
CD Pipeline / tests (push) Successful in 56s
CD Pipeline / post-deploy-checks (push) Has been cancelled
CD Pipeline / build-and-deploy (push) Has been cancelled

This commit is contained in:
Your Name
2026-07-02 20:34:31 +08:00
parent 0e7b7b704a
commit 3c620ef028
10 changed files with 600 additions and 19 deletions

View File

@@ -238,6 +238,11 @@ type LogConsumerReadbackPayload = {
mcp_context_receipt_write_count?: number | null;
verifier_context_receipt_write_count?: number | null;
ai_agent_context_receipt_write_count?: number | null;
telegram_alert_learning_context_readback_ready?: boolean | null;
telegram_alert_learning_context_receipt_count?: number | null;
telegram_alert_learning_ai_agent_context_receipt_count?: number | null;
telegram_alert_learning_ready_target_count?: number | null;
telegram_alert_learning_target_count?: number | null;
} | null;
operation_boundaries?: {
runtime_target_write_performed?: boolean | null;
@@ -803,6 +808,28 @@ export function AutonomousRuntimeReceiptPanel({
? "neutral" as Tone
: runtimeTargetWritePerformed ? "ok" as Tone : "neutral" as Tone,
},
{
key: "telegramContext",
label: t("writeback.telegramContext"),
value: readbackRatio(
consumerRollups.telegram_alert_learning_ai_agent_context_receipt_count,
consumerRollups.telegram_alert_learning_context_receipt_count,
hasConsumerReadback
),
detail: t("writeback.telegramContextDetail", {
targets: readbackRatio(
consumerRollups.telegram_alert_learning_ready_target_count,
consumerRollups.telegram_alert_learning_target_count,
hasConsumerReadback
),
}),
icon: Rocket,
tone: !hasConsumerReadback
? "neutral" as Tone
: consumerRollups.telegram_alert_learning_context_readback_ready === true
? "ok" as Tone
: "warn" as Tone,
},
{
key: "blockers",
label: t("writeback.blockers"),