Skip to content

Commit 577abcf

Browse files
committed
[codex-analytics] add protocol-native turn timestamps
1 parent 4fd5c35 commit 577abcf

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+1098
-35
lines changed

codex-rs/app-server-client/src/lib.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1060,6 +1060,9 @@ mod tests {
10601060
items: Vec::new(),
10611061
status: codex_app_server_protocol::TurnStatus::Completed,
10621062
error: None,
1063+
created_at: None,
1064+
completed_at: Some(0),
1065+
duration_ms: None,
10631066
},
10641067
})
10651068
}
@@ -1834,6 +1837,9 @@ mod tests {
18341837
items: Vec::new(),
18351838
status: codex_app_server_protocol::TurnStatus::Completed,
18361839
error: None,
1840+
created_at: None,
1841+
completed_at: Some(0),
1842+
duration_ms: None,
18371843
},
18381844
}
18391845
)

codex-rs/app-server-protocol/schema/json/ServerNotification.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3532,6 +3532,30 @@
35323532
},
35333533
"Turn": {
35343534
"properties": {
3535+
"completedAt": {
3536+
"description": "Unix timestamp (in seconds) when the turn completed.",
3537+
"format": "int64",
3538+
"type": [
3539+
"integer",
3540+
"null"
3541+
]
3542+
},
3543+
"createdAt": {
3544+
"description": "Unix timestamp (in seconds) when the turn started.",
3545+
"format": "int64",
3546+
"type": [
3547+
"integer",
3548+
"null"
3549+
]
3550+
},
3551+
"durationMs": {
3552+
"description": "Duration between turn start and completion in milliseconds, if known.",
3553+
"format": "int64",
3554+
"type": [
3555+
"integer",
3556+
"null"
3557+
]
3558+
},
35353559
"error": {
35363560
"anyOf": [
35373561
{

codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.schemas.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14329,6 +14329,30 @@
1432914329
},
1433014330
"Turn": {
1433114331
"properties": {
14332+
"completedAt": {
14333+
"description": "Unix timestamp (in seconds) when the turn completed.",
14334+
"format": "int64",
14335+
"type": [
14336+
"integer",
14337+
"null"
14338+
]
14339+
},
14340+
"createdAt": {
14341+
"description": "Unix timestamp (in seconds) when the turn started.",
14342+
"format": "int64",
14343+
"type": [
14344+
"integer",
14345+
"null"
14346+
]
14347+
},
14348+
"durationMs": {
14349+
"description": "Duration between turn start and completion in milliseconds, if known.",
14350+
"format": "int64",
14351+
"type": [
14352+
"integer",
14353+
"null"
14354+
]
14355+
},
1433214356
"error": {
1433314357
"anyOf": [
1433414358
{

codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.v2.schemas.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12184,6 +12184,30 @@
1218412184
},
1218512185
"Turn": {
1218612186
"properties": {
12187+
"completedAt": {
12188+
"description": "Unix timestamp (in seconds) when the turn completed.",
12189+
"format": "int64",
12190+
"type": [
12191+
"integer",
12192+
"null"
12193+
]
12194+
},
12195+
"createdAt": {
12196+
"description": "Unix timestamp (in seconds) when the turn started.",
12197+
"format": "int64",
12198+
"type": [
12199+
"integer",
12200+
"null"
12201+
]
12202+
},
12203+
"durationMs": {
12204+
"description": "Duration between turn start and completion in milliseconds, if known.",
12205+
"format": "int64",
12206+
"type": [
12207+
"integer",
12208+
"null"
12209+
]
12210+
},
1218712211
"error": {
1218812212
"anyOf": [
1218912213
{

codex-rs/app-server-protocol/schema/json/v2/ReviewStartResponse.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1267,6 +1267,30 @@
12671267
},
12681268
"Turn": {
12691269
"properties": {
1270+
"completedAt": {
1271+
"description": "Unix timestamp (in seconds) when the turn completed.",
1272+
"format": "int64",
1273+
"type": [
1274+
"integer",
1275+
"null"
1276+
]
1277+
},
1278+
"createdAt": {
1279+
"description": "Unix timestamp (in seconds) when the turn started.",
1280+
"format": "int64",
1281+
"type": [
1282+
"integer",
1283+
"null"
1284+
]
1285+
},
1286+
"durationMs": {
1287+
"description": "Duration between turn start and completion in milliseconds, if known.",
1288+
"format": "int64",
1289+
"type": [
1290+
"integer",
1291+
"null"
1292+
]
1293+
},
12701294
"error": {
12711295
"anyOf": [
12721296
{

codex-rs/app-server-protocol/schema/json/v2/ThreadForkResponse.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1856,6 +1856,30 @@
18561856
},
18571857
"Turn": {
18581858
"properties": {
1859+
"completedAt": {
1860+
"description": "Unix timestamp (in seconds) when the turn completed.",
1861+
"format": "int64",
1862+
"type": [
1863+
"integer",
1864+
"null"
1865+
]
1866+
},
1867+
"createdAt": {
1868+
"description": "Unix timestamp (in seconds) when the turn started.",
1869+
"format": "int64",
1870+
"type": [
1871+
"integer",
1872+
"null"
1873+
]
1874+
},
1875+
"durationMs": {
1876+
"description": "Duration between turn start and completion in milliseconds, if known.",
1877+
"format": "int64",
1878+
"type": [
1879+
"integer",
1880+
"null"
1881+
]
1882+
},
18591883
"error": {
18601884
"anyOf": [
18611885
{

codex-rs/app-server-protocol/schema/json/v2/ThreadListResponse.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1614,6 +1614,30 @@
16141614
},
16151615
"Turn": {
16161616
"properties": {
1617+
"completedAt": {
1618+
"description": "Unix timestamp (in seconds) when the turn completed.",
1619+
"format": "int64",
1620+
"type": [
1621+
"integer",
1622+
"null"
1623+
]
1624+
},
1625+
"createdAt": {
1626+
"description": "Unix timestamp (in seconds) when the turn started.",
1627+
"format": "int64",
1628+
"type": [
1629+
"integer",
1630+
"null"
1631+
]
1632+
},
1633+
"durationMs": {
1634+
"description": "Duration between turn start and completion in milliseconds, if known.",
1635+
"format": "int64",
1636+
"type": [
1637+
"integer",
1638+
"null"
1639+
]
1640+
},
16171641
"error": {
16181642
"anyOf": [
16191643
{

codex-rs/app-server-protocol/schema/json/v2/ThreadMetadataUpdateResponse.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1614,6 +1614,30 @@
16141614
},
16151615
"Turn": {
16161616
"properties": {
1617+
"completedAt": {
1618+
"description": "Unix timestamp (in seconds) when the turn completed.",
1619+
"format": "int64",
1620+
"type": [
1621+
"integer",
1622+
"null"
1623+
]
1624+
},
1625+
"createdAt": {
1626+
"description": "Unix timestamp (in seconds) when the turn started.",
1627+
"format": "int64",
1628+
"type": [
1629+
"integer",
1630+
"null"
1631+
]
1632+
},
1633+
"durationMs": {
1634+
"description": "Duration between turn start and completion in milliseconds, if known.",
1635+
"format": "int64",
1636+
"type": [
1637+
"integer",
1638+
"null"
1639+
]
1640+
},
16171641
"error": {
16181642
"anyOf": [
16191643
{

codex-rs/app-server-protocol/schema/json/v2/ThreadReadResponse.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1614,6 +1614,30 @@
16141614
},
16151615
"Turn": {
16161616
"properties": {
1617+
"completedAt": {
1618+
"description": "Unix timestamp (in seconds) when the turn completed.",
1619+
"format": "int64",
1620+
"type": [
1621+
"integer",
1622+
"null"
1623+
]
1624+
},
1625+
"createdAt": {
1626+
"description": "Unix timestamp (in seconds) when the turn started.",
1627+
"format": "int64",
1628+
"type": [
1629+
"integer",
1630+
"null"
1631+
]
1632+
},
1633+
"durationMs": {
1634+
"description": "Duration between turn start and completion in milliseconds, if known.",
1635+
"format": "int64",
1636+
"type": [
1637+
"integer",
1638+
"null"
1639+
]
1640+
},
16171641
"error": {
16181642
"anyOf": [
16191643
{

codex-rs/app-server-protocol/schema/json/v2/ThreadResumeResponse.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1856,6 +1856,30 @@
18561856
},
18571857
"Turn": {
18581858
"properties": {
1859+
"completedAt": {
1860+
"description": "Unix timestamp (in seconds) when the turn completed.",
1861+
"format": "int64",
1862+
"type": [
1863+
"integer",
1864+
"null"
1865+
]
1866+
},
1867+
"createdAt": {
1868+
"description": "Unix timestamp (in seconds) when the turn started.",
1869+
"format": "int64",
1870+
"type": [
1871+
"integer",
1872+
"null"
1873+
]
1874+
},
1875+
"durationMs": {
1876+
"description": "Duration between turn start and completion in milliseconds, if known.",
1877+
"format": "int64",
1878+
"type": [
1879+
"integer",
1880+
"null"
1881+
]
1882+
},
18591883
"error": {
18601884
"anyOf": [
18611885
{

0 commit comments

Comments
 (0)