feat: add parentAgentId to client types and session store

Add parentAgentId field to:
- Agent interface in session-store.ts
- AgentDirectoryEntry in agent-directory.ts
- getAgentDirectory() includes parentAgentId
- normalizeAgentSnapshot() maps from server payload

🤖 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:21:11 +00:00
co-authored by Claude Opus 4.5
parent dd697defbb
commit cb78f29b31
3 changed files with 4 additions and 0 deletions
@@ -139,6 +139,7 @@ function normalizeAgentSnapshot(snapshot: AgentSnapshotPayload, serverId: string
requiresAttention: snapshot.requiresAttention ?? false,
attentionReason: snapshot.attentionReason ?? null,
attentionTimestamp,
parentAgentId: snapshot.parentAgentId,
};
}
+2
View File
@@ -106,6 +106,7 @@ export interface Agent {
requiresAttention?: boolean;
attentionReason?: "finished" | "error" | "permission" | null;
attentionTimestamp?: Date | null;
parentAgentId?: string;
}
export interface Command {
@@ -831,6 +832,7 @@ export const useSessionStore = create<SessionStore>()(
requiresAttention: agent.requiresAttention ?? false,
attentionReason: agent.attentionReason ?? null,
attentionTimestamp: agent.attentionTimestamp ?? null,
parentAgentId: agent.parentAgentId,
});
}
return entries;
@@ -12,4 +12,5 @@ export interface AgentDirectoryEntry {
requiresAttention?: boolean;
attentionReason?: "finished" | "error" | "permission" | null;
attentionTimestamp?: Date | null;
parentAgentId?: string;
}