From dbdcfb1a6c03dffc0a33257919f0b2543228c531 Mon Sep 17 00:00:00 2001 From: Codex Date: Thu, 25 Jun 2026 03:27:53 +0000 Subject: [PATCH] fix: summarize AgentRun trigger-current output --- scripts/src/agentrun.ts | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/scripts/src/agentrun.ts b/scripts/src/agentrun.ts index dbc4d2da..9ecf91ca 100644 --- a/scripts/src/agentrun.ts +++ b/scripts/src/agentrun.ts @@ -111,7 +111,11 @@ export async function runAgentRunCommand(config: UniDeskConfig | null, args: str if (action === "secret-sync") return await secretSync(config, parseSecretSyncOptions(actionArgs)); if (action === "restart") return await restartYamlLane(config, parseLaneConfirmOptions(actionArgs)); if (action === "expose") return await exposeAgentRun(config, parseConfirmOptions(actionArgs)); - if (action === "trigger-current") return await triggerCurrent(config, parseTriggerOptions(actionArgs)); + if (action === "trigger-current") { + const options = parseTriggerOptions(actionArgs); + const result = await triggerCurrent(config, options); + return options.full || options.raw || !isRecord(result.target) ? result : renderAgentRunControlPlaneActionSummary(result, "AGENTRUN TRIGGER CURRENT"); + } if (action === "refresh") { const options = parseRefreshOptions(actionArgs); const result = await refresh(config, options); @@ -1830,7 +1834,7 @@ function isRecord(value: unknown): value is Record { return typeof value === "object" && value !== null && !Array.isArray(value); } -interface TriggerOptions { +interface TriggerOptions extends DisclosureOptions { confirm: boolean; dryRun: boolean; node: string | null; @@ -2004,9 +2008,20 @@ function parseTriggerOptions(args: string[]): TriggerOptions { let node: string | null = null; let lane: string | null = null; let wait = false; + let full = false; + let raw = false; for (let index = 0; index < args.length; index += 1) { const arg = args[index]; if (arg === "--confirm" || arg === "--dry-run") continue; + if (arg === "--full") { + full = true; + continue; + } + if (arg === "--raw") { + raw = true; + full = true; + continue; + } if (arg === "--wait") { wait = true; continue; @@ -2027,7 +2042,7 @@ function parseTriggerOptions(args: string[]): TriggerOptions { } throw new Error(`unsupported trigger-current option: ${arg}`); } - return { ...base, node, lane, wait }; + return { ...base, node, lane, wait, full, raw }; } function parseSecretSyncOptions(args: string[]): SecretSyncOptions {