Skip to content
Source
Sign inSign up
pingdotgg/t3code

feat(orchestration-v2): populate subagent observability from providers (2/5) #4629

Mergedshivamhwp(GitHub profile, opens in a new tab)merged 4 commits intosubagent-obs/01-contracts fromrefs/pull/4629/headmerged by shivamhwp(GitHub profile, opens in a new tab) View on GitHub

Showing 17 changed files with 34 additions and 6 deletions (loading 16).

x
0 of 17 viewed, 17 left
34 additions and 6 deletionsapps/server/src/orchestration-v2/Adapters/AcpAdapterV2.tsModified
View file
@@ -16,6 +16,7 @@
type OrchestrationV2ProviderTurn,
type OrchestrationV2RuntimeRequest,
type OrchestrationV2Subagent,
+ type OrchestrationV2SubagentActivation,
type OrchestrationV2TurnItem,
type OrchestrationV2UserInputQuestion,
type ProviderApprovalDecision,
@@ -70,6 +71,7 @@
makeSubagentConversationArtifacts,
subagentThreadTitle,
} from "../SubagentProjection.ts";
+import { defaultSubagentRole, subagentActivationId } from "../SubagentObservability.ts";
import {
ProviderAdapterEnsureThreadError,
ProviderAdapterForkThreadError,
@@ -2069,6 +2071,12 @@
const turnItemOrdinal =
existing?.turnItemOrdinal ?? (yield* resolveItemOrdinal(context, nativeTaskId));
const taskStatus = update.status;
+ const activationId = subagentActivationId(nodeId, 1);
+ const settled =
+ taskStatus === "completed" ||
+ taskStatus === "failed" ||
+ taskStatus === "cancelled" ||
+ taskStatus === "interrupted";
const task: OrchestrationV2Subagent = {
...(existing?.task ?? {