Merge branch 'rhan/oob-turn-metadata' into rhan/oob-turn-steer

This commit is contained in:
rhan-oai
2026-04-01 13:47:13 -07:00
committed by GitHub
8 changed files with 104 additions and 11 deletions
@@ -3367,6 +3367,19 @@
},
"TurnCompletedNotification": {
"properties": {
"completedAt": {
"description": "Unix timestamp (in seconds) when the turn completed.",
"format": "int64",
"type": "integer"
},
"durationMs": {
"description": "Duration between turn start and completion in milliseconds, if known.",
"format": "int64",
"type": [
"integer",
"null"
]
},
"threadId": {
"type": "string"
},
@@ -3375,6 +3388,7 @@
}
},
"required": [
"completedAt",
"threadId",
"turn"
],
@@ -3481,6 +3495,11 @@
},
"TurnStartedNotification": {
"properties": {
"createdAt": {
"description": "Unix timestamp (in seconds) when the turn started.",
"format": "int64",
"type": "integer"
},
"threadId": {
"type": "string"
},
@@ -3489,6 +3508,7 @@
}
},
"required": [
"createdAt",
"threadId",
"turn"
],
@@ -14174,6 +14174,19 @@
"TurnCompletedNotification": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"completedAt": {
"description": "Unix timestamp (in seconds) when the turn completed.",
"format": "int64",
"type": "integer"
},
"durationMs": {
"description": "Duration between turn start and completion in milliseconds, if known.",
"format": "int64",
"type": [
"integer",
"null"
]
},
"threadId": {
"type": "string"
},
@@ -14182,6 +14195,7 @@
}
},
"required": [
"completedAt",
"threadId",
"turn"
],
@@ -14450,6 +14464,11 @@
"TurnStartedNotification": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"createdAt": {
"description": "Unix timestamp (in seconds) when the turn started.",
"format": "int64",
"type": "integer"
},
"threadId": {
"type": "string"
},
@@ -14458,6 +14477,7 @@
}
},
"required": [
"createdAt",
"threadId",
"turn"
],
@@ -12020,6 +12020,19 @@
"TurnCompletedNotification": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"completedAt": {
"description": "Unix timestamp (in seconds) when the turn completed.",
"format": "int64",
"type": "integer"
},
"durationMs": {
"description": "Duration between turn start and completion in milliseconds, if known.",
"format": "int64",
"type": [
"integer",
"null"
]
},
"threadId": {
"type": "string"
},
@@ -12028,6 +12041,7 @@
}
},
"required": [
"completedAt",
"threadId",
"turn"
],
@@ -12296,6 +12310,11 @@
"TurnStartedNotification": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"createdAt": {
"description": "Unix timestamp (in seconds) when the turn started.",
"format": "int64",
"type": "integer"
},
"threadId": {
"type": "string"
},
@@ -12304,6 +12323,7 @@
}
},
"required": [
"createdAt",
"threadId",
"turn"
],
@@ -1559,6 +1559,19 @@
}
},
"properties": {
"completedAt": {
"description": "Unix timestamp (in seconds) when the turn completed.",
"format": "int64",
"type": "integer"
},
"durationMs": {
"description": "Duration between turn start and completion in milliseconds, if known.",
"format": "int64",
"type": [
"integer",
"null"
]
},
"threadId": {
"type": "string"
},
@@ -1567,6 +1580,7 @@
}
},
"required": [
"completedAt",
"threadId",
"turn"
],
@@ -1559,6 +1559,11 @@
}
},
"properties": {
"createdAt": {
"description": "Unix timestamp (in seconds) when the turn started.",
"format": "int64",
"type": "integer"
},
"threadId": {
"type": "string"
},
@@ -1567,6 +1572,7 @@
}
},
"required": [
"createdAt",
"threadId",
"turn"
],
@@ -3,4 +3,12 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { Turn } from "./Turn";
export type TurnCompletedNotification = { threadId: string, turn: Turn, };
export type TurnCompletedNotification = { threadId: string, turn: Turn,
/**
* Unix timestamp (in seconds) when the turn completed.
*/
completedAt: number,
/**
* Duration between turn start and completion in milliseconds, if known.
*/
durationMs: number | null, };
@@ -3,4 +3,8 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { Turn } from "./Turn";
export type TurnStartedNotification = { threadId: string, turn: Turn, };
export type TurnStartedNotification = { threadId: string, turn: Turn,
/**
* Unix timestamp (in seconds) when the turn started.
*/
createdAt: number, };
+10 -9
View File
@@ -56,6 +56,15 @@ use async_channel::Receiver;
use async_channel::Sender;
use chrono::Local;
use chrono::Utc;
use codex_analytics::AnalyticsEventsClient;
use codex_analytics::AppInvocation;
use codex_analytics::CodexTurnSteerEvent;
use codex_analytics::InvocationType;
use codex_analytics::TrackEventsContext;
use codex_analytics::TurnResolvedConfigFact;
use codex_analytics::TurnSteerRejectionReason;
use codex_analytics::TurnSteerResult;
use codex_analytics::build_track_events_context;
use codex_app_server_protocol::McpServerElicitationRequest;
use codex_app_server_protocol::McpServerElicitationRequestParams;
use codex_exec_server::Environment;
@@ -367,15 +376,6 @@ use crate::turn_timing::record_turn_ttft_metric;
use crate::unified_exec::UnifiedExecProcessManager;
use crate::util::backoff;
use crate::windows_sandbox::WindowsSandboxLevelExt;
use codex_analytics::AnalyticsEventsClient;
use codex_analytics::AppInvocation;
use codex_analytics::CodexTurnSteerEvent;
use codex_analytics::InvocationType;
use codex_analytics::TrackEventsContext;
use codex_analytics::TurnResolvedConfigFact;
use codex_analytics::TurnSteerRejectionReason;
use codex_analytics::TurnSteerResult;
use codex_analytics::build_track_events_context;
use codex_async_utils::OrCancelExt;
use codex_git_utils::get_git_repo_root;
use codex_otel::SessionTelemetry;
@@ -6319,6 +6319,7 @@ pub(crate) async fn run_turn(
}
}
}
last_agent_message
}