@@ -540,28 +540,31 @@ export function printCronShow(
540540 opts ?: { deliveryPreview ?: CronDeliveryPreview } ,
541541) {
542542 const preview = opts ?. deliveryPreview ?? { label : "-" , detail : "unavailable" } ;
543- runtime . log ( `id: ${ job . id } ` ) ;
544- runtime . log ( `declaration: ${ job . declarationKey ?? "-" } ` ) ;
545- runtime . log ( `name: ${ job . name } ` ) ;
546- runtime . log ( `display name: ${ job . displayName ?? "-" } ` ) ;
547- runtime . log ( `owner agent: ${ job . owner ?. agentId ?? "-" } ` ) ;
548- runtime . log ( `owner session: ${ job . owner ?. sessionKey ?? "-" } ` ) ;
543+ const showValue = ( value : unknown ) => sanitizeTerminalText ( stringifyCell ( value ) ) ;
544+ runtime . log ( `id: ${ showValue ( job . id ) } ` ) ;
545+ runtime . log ( `declaration: ${ showValue ( job . declarationKey ) } ` ) ;
546+ runtime . log ( `name: ${ showValue ( job . name ) } ` ) ;
547+ runtime . log ( `display name: ${ showValue ( job . displayName ) } ` ) ;
548+ runtime . log ( `owner agent: ${ showValue ( job . owner ?. agentId ) } ` ) ;
549+ runtime . log ( `owner session: ${ showValue ( job . owner ?. sessionKey ) } ` ) ;
549550 runtime . log ( `enabled: ${ job . enabled ? "yes" : "no" } ` ) ;
550- runtime . log ( `schedule: ${ formatSchedule ( job . schedule , job . trigger !== undefined ) } ` ) ;
551+ runtime . log ( `schedule: ${ showValue ( formatSchedule ( job . schedule , job . trigger !== undefined ) ) } ` ) ;
551552 runtime . log (
552553 `trigger: ${ job . trigger ? `once=${ job . trigger . once === true ? "yes" : "no" } ; evals=${ job . state . triggerEvalCount ?? 0 } ; last eval=${ formatRelative ( job . state . lastTriggerEvalAtMs , Date . now ( ) ) } ; last fire=${ formatRelative ( job . state . lastTriggerFireAtMs , Date . now ( ) ) } ` : "-" } ` ,
553554 ) ;
554- runtime . log ( `session: ${ job . sessionTarget ?? "-" } ` ) ;
555- runtime . log ( `agent: ${ job . agentId ?? "-" } ` ) ;
556- runtime . log ( `model: ${ job . payload . kind === "agentTurn" ? ( job . payload . model ?? "-" ) : "-" } ` ) ;
557- runtime . log ( `delivery: ${ preview . label } (${ preview . detail } )` ) ;
555+ runtime . log ( `session: ${ showValue ( job . sessionTarget ) } ` ) ;
556+ runtime . log ( `agent: ${ showValue ( job . agentId ) } ` ) ;
557+ runtime . log (
558+ `model: ${ showValue ( job . payload . kind === "agentTurn" ? job . payload . model : undefined ) } ` ,
559+ ) ;
560+ runtime . log ( `delivery: ${ showValue ( preview . label ) } (${ showValue ( preview . detail ) } )` ) ;
558561 runtime . log ( `next: ${ formatRelative ( job . state . nextRunAtMs , Date . now ( ) ) } ` ) ;
559562 runtime . log ( `last: ${ formatRelative ( job . state . lastRunAtMs , Date . now ( ) ) } ` ) ;
560- runtime . log ( `status: ${ formatCronStatusForDisplay ( job ) } ` ) ;
563+ runtime . log ( `status: ${ showValue ( formatCronStatusForDisplay ( job ) ) } ` ) ;
561564 // lastError is the run/schedule failure message; the diagnostic line below is
562565 // the run-diagnostics summary and can be empty when only lastError is set.
563- runtime . log ( `last error: ${ job . state . lastError ?? "-" } ` ) ;
564- runtime . log ( `last delivery: ${ job . state . lastDeliveryStatus ?? "-" } ` ) ;
565- runtime . log ( `last delivery error: ${ job . state . lastDeliveryError ?? "-" } ` ) ;
566- runtime . log ( `diagnostic: ${ job . state . lastDiagnosticSummary ?? "-" } ` ) ;
566+ runtime . log ( `last error: ${ showValue ( job . state . lastError ) } ` ) ;
567+ runtime . log ( `last delivery: ${ showValue ( job . state . lastDeliveryStatus ) } ` ) ;
568+ runtime . log ( `last delivery error: ${ showValue ( job . state . lastDeliveryError ) } ` ) ;
569+ runtime . log ( `diagnostic: ${ showValue ( job . state . lastDiagnosticSummary ) } ` ) ;
567570}
0 commit comments