[codex-analytics] add queued submission metadata

This commit is contained in:
rhan-oai
2026-04-02 22:06:55 -07:00
parent 0e16d53fb7
commit 48a7e70eec
57 changed files with 447 additions and 7 deletions

View File

@@ -2473,6 +2473,13 @@
},
"type": "object"
},
"SubmissionType": {
"enum": [
"prompt",
"prompt_queued"
],
"type": "string"
},
"TextElement": {
"properties": {
"byteRange": {
@@ -3241,6 +3248,17 @@
],
"description": "Override the service tier for this turn and subsequent turns."
},
"submissionType": {
"anyOf": [
{
"$ref": "#/definitions/SubmissionType"
},
{
"type": "null"
}
],
"description": "Metadata describing how the prompt was submitted."
},
"summary": {
"anyOf": [
{

View File

@@ -12065,6 +12065,13 @@
}
]
},
"SubmissionType": {
"enum": [
"prompt",
"prompt_queued"
],
"type": "string"
},
"TerminalInteractionNotification": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
@@ -14616,6 +14623,17 @@
],
"description": "Override the service tier for this turn and subsequent turns."
},
"submissionType": {
"anyOf": [
{
"$ref": "#/definitions/v2/SubmissionType"
},
{
"type": "null"
}
],
"description": "Metadata describing how the prompt was submitted."
},
"summary": {
"anyOf": [
{

View File

@@ -9920,6 +9920,13 @@
}
]
},
"SubmissionType": {
"enum": [
"prompt",
"prompt_queued"
],
"type": "string"
},
"TerminalInteractionNotification": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
@@ -12471,6 +12478,17 @@
],
"description": "Override the service tier for this turn and subsequent turns."
},
"submissionType": {
"anyOf": [
{
"$ref": "#/definitions/SubmissionType"
},
{
"type": "null"
}
],
"description": "Metadata describing how the prompt was submitted."
},
"summary": {
"anyOf": [
{

View File

@@ -354,6 +354,13 @@
],
"type": "object"
},
"SubmissionType": {
"enum": [
"prompt",
"prompt_queued"
],
"type": "string"
},
"TextElement": {
"properties": {
"byteRange": {
@@ -595,6 +602,17 @@
],
"description": "Override the service tier for this turn and subsequent turns."
},
"submissionType": {
"anyOf": [
{
"$ref": "#/definitions/SubmissionType"
},
{
"type": "null"
}
],
"description": "Metadata describing how the prompt was submitted."
},
"summary": {
"anyOf": [
{

View File

@@ -0,0 +1,5 @@
// GENERATED CODE! DO NOT MODIFY BY HAND!
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
export type SubmissionType = "prompt" | "prompt_queued";

View File

@@ -64,6 +64,7 @@ export type { ServiceTier } from "./ServiceTier";
export type { SessionSource } from "./SessionSource";
export type { Settings } from "./Settings";
export type { SubAgentSource } from "./SubAgentSource";
export type { SubmissionType } from "./SubmissionType";
export type { ThreadId } from "./ThreadId";
export type { Tool } from "./Tool";
export type { Verbosity } from "./Verbosity";

View File

@@ -6,6 +6,7 @@ import type { Personality } from "../Personality";
import type { ReasoningEffort } from "../ReasoningEffort";
import type { ReasoningSummary } from "../ReasoningSummary";
import type { ServiceTier } from "../ServiceTier";
import type { SubmissionType } from "../SubmissionType";
import type { JsonValue } from "../serde_json/JsonValue";
import type { ApprovalsReviewer } from "./ApprovalsReviewer";
import type { AskForApproval } from "./AskForApproval";
@@ -45,6 +46,9 @@ personality?: Personality | null, /**
* this turn.
*/
outputSchema?: JsonValue | null, /**
* Metadata describing how the prompt was submitted.
*/
submissionType?: SubmissionType | null, /**
* EXPERIMENTAL - Set a pre-set collaboration mode.
* Takes precedence over model, reasoning_effort, and developer instructions if set.
*

View File

@@ -79,6 +79,7 @@ use codex_protocol::protocol::SkillMetadata as CoreSkillMetadata;
use codex_protocol::protocol::SkillScope as CoreSkillScope;
use codex_protocol::protocol::SkillToolDependency as CoreSkillToolDependency;
use codex_protocol::protocol::SubAgentSource as CoreSubAgentSource;
use codex_protocol::protocol::SubmissionType;
use codex_protocol::protocol::TokenUsage as CoreTokenUsage;
use codex_protocol::protocol::TokenUsageInfo as CoreTokenUsageInfo;
use codex_protocol::request_permissions::PermissionGrantScope as CorePermissionGrantScope;
@@ -3981,6 +3982,11 @@ pub struct TurnStartParams {
#[ts(optional = nullable)]
pub output_schema: Option<JsonValue>,
/// Metadata describing how the prompt was submitted.
#[serde(default, skip_serializing_if = "Option::is_none")]
#[ts(optional = nullable)]
pub submission_type: Option<SubmissionType>,
/// EXPERIMENTAL - Set a pre-set collaboration mode.
/// Takes precedence over model, reasoning_effort, and developer instructions if set.
///
@@ -8316,6 +8322,7 @@ mod tests {
service_tier: None,
effort: None,
summary: None,
submission_type: None,
output_schema: None,
collaboration_mode: None,
personality: None,