fix: 修复 Secret 同步成功返回

This commit is contained in:
Codex
2026-07-12 18:08:35 +02:00
parent 5c6bc728cb
commit 0a0b7a919e
2 changed files with 21 additions and 8 deletions
+10 -8
View File
@@ -288,14 +288,7 @@ export async function secretSync(config: UniDeskConfig, options: SecretSyncOptio
configPath,
target: compactAgentRunLaneStatusTarget(spec),
filter: options.secretIds.length === 0 ? null : { secretIds: options.secretIds, selected: sources.map((source) => source.id) },
plan: {
secretCount: plan.length,
items: plan,
providerSecretWriteSkippedCount: providerValues.length,
providerSecretClassification: "exact-target-ref",
writableNonProviderSecretCount: syncValues.length,
valuesPrinted: false,
},
plan: confirmedSecretSyncPlan(plan, syncValues.length),
result: payload,
capture: compactCapture(result, { full: result.exitCode !== 0, stdoutTailChars: 3000, stderrTailChars: 3000 }),
next: {
@@ -305,6 +298,15 @@ export async function secretSync(config: UniDeskConfig, options: SecretSyncOptio
};
}
export function confirmedSecretSyncPlan(items: readonly Record<string, unknown>[], writableSecretCount: number): Record<string, unknown> {
return {
secretCount: items.length,
items,
writableSecretCount,
valuesPrinted: false,
};
}
export async function exposeAgentRun(_config: UniDeskConfig, options: ConfirmOptions): Promise<Record<string, unknown>> {
const clientConfig = readAgentRunClientConfig();
const exposure = clientConfig.publicExposure;