fix: allow null parentAgentId in agent schemas and projections
This commit is contained in:
@@ -84,7 +84,7 @@ export function toAgentPayload(
|
||||
pendingPermissions: sanitizePendingPermissions(agent.pendingPermissions),
|
||||
persistence: sanitizePersistenceHandle(agent.persistence),
|
||||
title: options?.title ?? null,
|
||||
parentAgentId: agent.parentAgentId,
|
||||
parentAgentId: agent.parentAgentId ?? null,
|
||||
};
|
||||
|
||||
const usage = sanitizeUsage(agent.lastUsage);
|
||||
|
||||
@@ -251,7 +251,7 @@ export const AgentSnapshotPayloadSchema = z.object({
|
||||
requiresAttention: z.boolean().optional(),
|
||||
attentionReason: z.enum(["finished", "error", "permission"]).nullable().optional(),
|
||||
attentionTimestamp: z.string().nullable().optional(),
|
||||
parentAgentId: z.string().optional(),
|
||||
parentAgentId: z.string().nullable().optional(),
|
||||
});
|
||||
|
||||
export type AgentSnapshotPayload = z.infer<typeof AgentSnapshotPayloadSchema>;
|
||||
|
||||
Reference in New Issue
Block a user