feat: expose codex review sandbox search governance
This commit is contained in:
@@ -1418,6 +1418,45 @@ function normalizeDiscoveryExperimentalFeatureGovernanceSummary() {
|
||||
};
|
||||
}
|
||||
|
||||
function normalizeDiscoveryReviewGovernanceSummary() {
|
||||
const actions = [{ label: "启动审查", group: "review", reviewStart: true }];
|
||||
return {
|
||||
actionCount: actions.length,
|
||||
reviewStartAvailable: actions.some((action) => action.reviewStart === true),
|
||||
userInitiatedOnly: true,
|
||||
labels: actions.map((action) => action.label),
|
||||
};
|
||||
}
|
||||
|
||||
function normalizeDiscoveryWindowsSandboxGovernanceSummary() {
|
||||
const actions = [
|
||||
{ label: "准备检查", group: "read", readiness: true },
|
||||
{ label: "启动设置", group: "write", setupStart: true },
|
||||
{ label: "设置完成", group: "notify" },
|
||||
];
|
||||
return {
|
||||
actionCount: actions.length,
|
||||
setupActionCount: actions.filter((action) => action.group === "write").length,
|
||||
readinessAvailable: actions.some((action) => action.readiness === true),
|
||||
notificationAvailable: actions.some((action) => action.group === "notify"),
|
||||
userInitiatedOnly: true,
|
||||
labels: actions.map((action) => action.label),
|
||||
};
|
||||
}
|
||||
|
||||
function normalizeDiscoveryFuzzyFileSearchSummary() {
|
||||
const events = [
|
||||
{ label: "搜索更新", group: "event" },
|
||||
{ label: "搜索完成", group: "event", completed: true },
|
||||
];
|
||||
return {
|
||||
eventCount: events.length,
|
||||
completedEventAvailable: events.some((event) => event.completed === true),
|
||||
notificationOnly: true,
|
||||
labels: events.map((event) => event.label),
|
||||
};
|
||||
}
|
||||
|
||||
function normalizeDiscoveryPlugins(result) {
|
||||
return asArray(result?.marketplaces)
|
||||
.flatMap((marketplace) => asArray(marketplace?.plugins))
|
||||
@@ -1909,6 +1948,9 @@ export async function discoverCodexAppServerCapabilities(runnerConfig) {
|
||||
externalAgentGovernanceSummary: normalizeDiscoveryExternalAgentGovernanceSummary(),
|
||||
marketplaceGovernanceSummary: normalizeDiscoveryMarketplaceGovernanceSummary(),
|
||||
experimentalFeatureGovernanceSummary: normalizeDiscoveryExperimentalFeatureGovernanceSummary(),
|
||||
reviewGovernanceSummary: normalizeDiscoveryReviewGovernanceSummary(),
|
||||
windowsSandboxGovernanceSummary: normalizeDiscoveryWindowsSandboxGovernanceSummary(),
|
||||
fuzzyFileSearchSummary: normalizeDiscoveryFuzzyFileSearchSummary(),
|
||||
errors: [
|
||||
modelResult?.__bossError ? `model/list:${safeRuntimeDiagnosticText(modelResult.__bossError)}` : undefined,
|
||||
providerCapabilities?.__bossError
|
||||
|
||||
Reference in New Issue
Block a user