feat: expose codex app-server protocol drift summary

This commit is contained in:
AI Bot
2026-06-04 14:43:27 +08:00
parent 5bf2216cb0
commit 0eaf78c3c2
8 changed files with 122 additions and 47 deletions

View File

@@ -127,6 +127,7 @@ export function buildDeviceWorkspaceDetailCards(workspace: DeviceWorkspaceView)
const codexThreadCollaborationSummary = objectFromMetadata(
codexAppServerMetadata.threadCollaborationSummary,
);
const codexProtocolDriftSummary = objectFromMetadata(codexAppServerMetadata.protocolDriftSummary);
const codexPluginGovernanceSummary = objectFromMetadata(codexAppServerMetadata.pluginGovernanceSummary);
const codexAccountGovernanceSummary = objectFromMetadata(codexAppServerMetadata.accountGovernanceSummary);
const codexConfigGovernanceSummary = objectFromMetadata(codexAppServerMetadata.configGovernanceSummary);
@@ -221,6 +222,15 @@ export function buildDeviceWorkspaceDetailCards(workspace: DeviceWorkspaceView)
} · ${numberFromMetadata(codexThreadCollaborationSummary.collaborationModeCount)} 种模式 · ${
codexThreadCollaborationSummary.directThreadChatSupported === true ? "原生私聊" : "非原生私聊"
}`,
codexProtocolDrift: `协议漂移:${
textFromMetadata(codexProtocolDriftSummary.driftLevel) === "compatible" ? "兼容" : "告警"
} · 失败探针 ${numberFromMetadata(codexProtocolDriftSummary.failedProbeCount)} 个 · 文档跟进 ${numberFromMetadata(
codexProtocolDriftSummary.docFollowupCount,
)} 项 · ${
String(codexProtocolDriftSummary.fallbackStrategy || "").includes("Boss Broker")
? "Boss Broker 兜底"
: "无兜底策略"
}`,
codexPluginGovernance: `插件治理:${numberFromMetadata(
codexPluginGovernanceSummary.actionCount,
)} 项 · 安装/卸载 ${numberFromMetadata(codexPluginGovernanceSummary.lifecycleActionCount)} 项 · 共享 ${numberFromMetadata(
@@ -971,6 +981,9 @@ export function DeviceEditorCard({
<div className="rounded-2xl bg-[#F7F8FA] px-3 py-2">
{detailCards.capabilities.items.codexThreadCollaboration}
</div>
<div className="rounded-2xl bg-[#F7F8FA] px-3 py-2">
{detailCards.capabilities.items.codexProtocolDrift}
</div>
<div className="rounded-2xl bg-[#F7F8FA] px-3 py-2">
{detailCards.capabilities.items.codexPluginGovernance}
</div>