Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions codex-rs/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 30 additions & 0 deletions codex-rs/app-server-protocol/schema/json/ClientRequest.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions codex-rs/app-server-protocol/schema/typescript/v2/index.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions codex-rs/app-server-protocol/src/protocol/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2522,6 +2522,7 @@ mod tests {
let thread_goal_set = ClientRequest::ThreadGoalSet {
request_id: request_id(),
params: v2::ThreadGoalSetParams {
origin: None,
thread_id: "goal-thread".to_string(),
objective: Some("ship it".to_string()),
status: None,
Expand Down Expand Up @@ -4440,6 +4441,7 @@ mod tests {
let set_request = ClientRequest::ThreadGoalSet {
request_id: RequestId::Integer(1),
params: v2::ThreadGoalSetParams {
origin: None,
thread_id: "thr_123".to_string(),
objective: Some("ship goal mode".to_string()),
status: Some(v2::ThreadGoalStatus::Active),
Expand All @@ -4455,6 +4457,7 @@ mod tests {
let clear_request = ClientRequest::ThreadGoalClear {
request_id: RequestId::Integer(3),
params: v2::ThreadGoalClearParams {
origin: None,
thread_id: "thr_123".to_string(),
},
};
Expand Down
16 changes: 16 additions & 0 deletions codex-rs/app-server-protocol/src/protocol/v2/thread.rs
Original file line number Diff line number Diff line change
Expand Up @@ -841,11 +841,24 @@ impl From<codex_protocol::protocol::ThreadGoal> for ThreadGoal {
}
}

/// Distinguishes explicit user actions from automatic goal lifecycle mutations.
#[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialEq, Eq, JsonSchema, TS)]
#[serde(rename_all = "camelCase")]
#[ts(rename_all = "camelCase")]
#[ts(export_to = "v2/")]
pub enum ThreadGoalMutationOrigin {
User,
Automatic,
}

#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Default, JsonSchema, TS)]
#[serde(rename_all = "camelCase")]
#[ts(export_to = "v2/")]
pub struct ThreadGoalSetParams {
pub thread_id: String,
/// Missing provenance does not supply user authorization.
#[ts(optional = nullable)]
pub origin: Option<ThreadGoalMutationOrigin>,
#[ts(optional = nullable)]
pub objective: Option<String>,
#[ts(optional = nullable)]
Expand Down Expand Up @@ -886,6 +899,9 @@ pub struct ThreadGoalGetResponse {
#[ts(export_to = "v2/")]
pub struct ThreadGoalClearParams {
pub thread_id: String,
/// Missing provenance does not supply user authorization.
#[ts(optional = nullable)]
pub origin: Option<ThreadGoalMutationOrigin>,
}

#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)]
Expand Down
Loading
Loading