-
Notifications
You must be signed in to change notification settings - Fork 13.5k
[core] Allow Sites terms disclosure under never policy #28098
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -615,17 +615,6 @@ async fn maybe_request_codex_apps_auth_elicitation( | |
| return result; | ||
| } | ||
|
|
||
| match turn_context.approval_policy.value() { | ||
| AskForApproval::Never => return result, | ||
| AskForApproval::Granular(granular_config) if !granular_config.allows_mcp_elicitations() => { | ||
| return result; | ||
| } | ||
| AskForApproval::OnFailure | ||
| | AskForApproval::OnRequest | ||
| | AskForApproval::UnlessTrusted | ||
| | AskForApproval::Granular(_) => {} | ||
| } | ||
|
|
||
| let connector_id = metadata.and_then(|metadata| metadata.connector_id.as_deref()); | ||
| let connector_name = metadata.and_then(|metadata| metadata.connector_name.as_deref()); | ||
| let install_url = connector_id.map(|connector_id| { | ||
|
|
@@ -640,6 +629,20 @@ async fn maybe_request_codex_apps_auth_elicitation( | |
| return result; | ||
| }; | ||
|
|
||
| match turn_context.approval_policy.value() { | ||
| AskForApproval::Never if !plan.auth_failure.is_sites_publication_terms_disclosure() => { | ||
| return result; | ||
| } | ||
| AskForApproval::Granular(granular_config) if !granular_config.allows_mcp_elicitations() => { | ||
| return result; | ||
| } | ||
| AskForApproval::Never | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
For app-server clients with Useful? React with 👍 / 👎. |
||
| | AskForApproval::OnFailure | ||
| | AskForApproval::OnRequest | ||
| | AskForApproval::UnlessTrusted | ||
| | AskForApproval::Granular(_) => {} | ||
| } | ||
|
|
||
| let request_id = rmcp::model::RequestId::String(plan.elicitation.elicitation_id.clone().into()); | ||
| let params = McpServerElicitationRequestParams { | ||
| thread_id: sess.thread_id.to_string(), | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the TUI path, this new Sites case only changes the elicitation message, but
AppLinkView::from_codex_apps_auth_url_partsstill classifies every Codex Apps auth failure asAuthand hardcodes sign-in instructions/actions (app_link_view.rsshows “Sign in…” plus “Open sign-in URL” / “I already signed in”). When Sites publication terms are required underNever, users are prompted with a sign-in flow rather than terms-review copy, so add a terms-specific kind/metadata or route it through the external-action UI.Useful? React with 👍 / 👎.