fix(plugins): preserve nested provider subagent links (#4970)

* fix(plugins): preserve nested provider subagent links

The plugin adapter routed descendants to their managed root but discarded their direct parent when publishing descriptors. Preserve runtime-to-public child identities and forward optional spawning tool IDs.

* test(plugins): separate opening and live subagent scenarios

* test(server): retry terminal fixture directory cleanup

Match the daemon harness cleanup policy so transient Windows EBUSY locks do not fail terminal ownership tests after their assertions complete.
This commit is contained in:
Mohamed Boudra
2026-09-16 22:50:58 +02:00
committed by GitHub
parent 6ce6f4c961
commit a8a8da0472
4 changed files with 120 additions and 1 deletions
+4
View File
@@ -531,7 +531,10 @@ export type ProviderEvent =
type: "session.opened";
requestId?: string;
sessionId: string;
/** Direct parent in the provider session ID namespace. */
parentSessionId?: string;
/** ID of the spawning tool call in the direct parent's timeline. */
toolCallId?: string;
capabilities: readonly string[];
restoration: "core" | "parent";
persistence?: ProviderPersistence;
@@ -1278,6 +1281,7 @@ export const ProviderEventSchema: z.ZodType<ProviderEvent> = z.discriminatedUnio
requestId: idSchema.optional(),
sessionId: idSchema,
parentSessionId: idSchema.optional(),
toolCallId: idSchema.optional(),
capabilities: z.array(z.string()),
restoration: z.enum(["core", "parent"]),
persistence: persistenceSchema.optional(),