This commit is contained in:
radek-paclt 2026-01-30 16:10:34 +07:00 committed by GitHub
commit 5ce60d2d54
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 11 additions and 0 deletions

View File

@ -10,6 +10,10 @@ export type CronEvent = {
error?: string;
summary?: string;
nextRunAtMs?: number;
/** Delivery channel from the job payload (for agentTurn jobs). */
channel?: string;
/** Delivery target from the job payload (for agentTurn jobs). */
to?: string;
};
export type Logger = {

View File

@ -103,6 +103,9 @@ export async function executeJob(
runAtMs: startedAt,
durationMs: job.state.lastDurationMs,
nextRunAtMs: job.state.nextRunAtMs,
// Include delivery target from payload for agentTurn jobs
channel: job.payload.kind === "agentTurn" ? job.payload.channel : undefined,
to: job.payload.kind === "agentTurn" ? job.payload.to : undefined,
});
if (shouldDelete && state.store) {

View File

@ -240,6 +240,10 @@ export const CronRunLogEntrySchema = Type.Object(
runAtMs: Type.Optional(Type.Integer({ minimum: 0 })),
durationMs: Type.Optional(Type.Integer({ minimum: 0 })),
nextRunAtMs: Type.Optional(Type.Integer({ minimum: 0 })),
/** Delivery channel from the job payload (for agentTurn jobs). */
channel: Type.Optional(Type.String()),
/** Delivery target from the job payload (for agentTurn jobs). */
to: Type.Optional(Type.String()),
},
{ additionalProperties: false },
);