fix: add parentAgentId to stored agent record schema

- Added `parentAgentId` field to `STORED_AGENT_SCHEMA` in agent-registry.ts
- Updated `toStoredAgentRecord()` in agent-projections.ts to include parentAgentId
- This ensures parentAgentId is persisted to agents.json for parent/child hierarchy

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Mohamed Boudra
2025-12-21 17:47:31 +00:00
co-authored by Claude Opus 4.5
parent 2d147f9a93
commit 2e8444eaac
3 changed files with 4 additions and 1 deletions
@@ -52,6 +52,7 @@ export function toStoredAgentRecord(
attentionTimestamp: agent.attention.requiresAttention
? agent.attention.attentionTimestamp.toISOString()
: null,
parentAgentId: agent.parentAgentId ?? null,
} satisfies StoredAgentRecord;
}
@@ -53,6 +53,7 @@ const STORED_AGENT_SCHEMA = z.object({
requiresAttention: z.boolean().optional(),
attentionReason: z.enum(["finished", "error", "permission"]).nullable().optional(),
attentionTimestamp: z.string().nullable().optional(),
parentAgentId: z.string().nullable().optional(),
});
export type SerializableAgentConfig = Pick<