aKode fase 2c: eliminato il codice di invio dati (crate analytics, otel-trace-websocket, sentry, esportatori OTLP); /feedback salva solo in locale; chiavi legacy [analytics]/[otel] accettate e ignorate; test di analytics/OTLP/upload rimossi
Some checks failed
blocking-ci / rust-ci (push) Has been cancelled
blocking-ci / sdk (push) Has been cancelled
blocking-ci / CI required (push) Has been cancelled
blocking-ci / Bazel (push) Has been cancelled
blocking-ci / Blob size policy (push) Has been cancelled
blocking-ci / cargo-deny (push) Has been cancelled
blocking-ci / Codespell (push) Has been cancelled
blocking-ci / repo-checks (push) Has been cancelled
postmerge-ci / rust-ci-full (push) Has been cancelled
postmerge-ci / v8-canary (push) Has been cancelled
postmerge-ci / Postmerge CI results (push) Has been cancelled

This commit is contained in:
Andrea
2026-11-09 18:45:41 +01:00
parent 981745ccc8
commit 60532b6337
509 changed files with 2043 additions and 46606 deletions

View File

@@ -1457,12 +1457,6 @@ client_request_definitions! {
response: v2::SendAddCreditsNudgeEmailResponse,
},
FeedbackUpload => "feedback/upload" {
params: v2::FeedbackUploadParams,
serialization: None,
response: v2::FeedbackUploadResponse,
},
FeedbackSave => "feedback/save" {
params: v2::FeedbackSaveParams,
serialization: None,

View File

@@ -163,15 +163,6 @@ pub struct ToolsV2 {
pub web_search: Option<WebSearchToolConfig>,
}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)]
#[serde(rename_all = "snake_case")]
#[ts(export_to = "v2/")]
pub struct AnalyticsConfig {
pub enabled: Option<bool>,
#[serde(default, flatten)]
pub additional: HashMap<String, JsonValue>,
}
#[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialEq, Eq, JsonSchema, TS)]
#[serde(rename_all = "snake_case")]
#[ts(export_to = "v2/")]
@@ -307,7 +298,6 @@ pub struct Config {
pub model_reasoning_summary: Option<ReasoningSummary>,
pub model_verbosity: Option<Verbosity>,
pub service_tier: Option<String>,
pub analytics: Option<AnalyticsConfig>,
#[experimental("config/read.apps")]
#[serde(default)]
pub apps: Option<AppsConfig>,
@@ -510,14 +500,6 @@ pub struct OtelRequirements {
pub tool_result: Option<OtelToolResultLogConfig>,
pub log_sse_deltas: Option<bool>,
pub log_user_prompt: Option<bool>,
pub log_agent_responses: Option<bool>,
pub log_guardian_assessments: Option<bool>,
pub environment: Option<String>,
pub exporter: Option<OtelExporter>,
pub trace_exporter: Option<OtelExporter>,
pub metrics_exporter: Option<OtelExporter>,
pub span_attributes: Option<HashMap<String, String>>,
pub tracestate: Option<BTreeMap<String, BTreeMap<String, String>>>,
}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS)]
@@ -527,48 +509,6 @@ pub struct OtelToolResultLogConfig {
pub max_bytes: usize,
}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS)]
#[serde(rename_all = "kebab-case")]
#[ts(export_to = "v2/", rename_all = "kebab-case")]
pub enum OtelExporter {
None,
Statsig,
OtlpHttp {
endpoint: String,
/// Header names are retained; values are redacted by the server.
#[schemars(with = "HashMap<String, String>")]
#[ts(as = "HashMap<String, String>")]
headers: HashMap<String, SerdeRedactedString>,
protocol: OtelHttpProtocol,
tls: Option<OtelTlsConfig>,
},
OtlpGrpc {
endpoint: String,
/// Header names are retained; values are redacted by the server.
#[schemars(with = "HashMap<String, String>")]
#[ts(as = "HashMap<String, String>")]
headers: HashMap<String, SerdeRedactedString>,
tls: Option<OtelTlsConfig>,
},
}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS)]
#[serde(rename_all = "kebab-case")]
#[ts(export_to = "v2/", rename_all = "kebab-case")]
pub enum OtelHttpProtocol {
Binary,
Json,
}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS)]
#[serde(rename_all = "kebab-case")]
#[ts(export_to = "v2/", rename_all = "kebab-case")]
pub struct OtelTlsConfig {
pub ca_certificate: Option<PathBuf>,
pub client_certificate: Option<PathBuf>,
pub client_private_key: Option<PathBuf>,
}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS)]
#[serde(rename_all = "camelCase")]
#[ts(export_to = "v2/")]
@@ -1013,7 +953,7 @@ pub struct ExternalAgentConfigImportParams {
/// Optional identifier for the product that initiated the import.
#[ts(optional = nullable)]
pub source: Option<String>,
/// Opaque provider identifier supplied by the caller for analytics attribution and import
/// Opaque provider identifier supplied by the caller for attribution and import
/// history display. This does not select the migration source.
#[ts(optional = nullable)]
pub provider_id: Option<String>,

View File

@@ -9,7 +9,8 @@ use std::path::PathBuf;
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)]
#[serde(rename_all = "camelCase")]
#[ts(export_to = "v2/")]
pub struct FeedbackUploadParams {
/// Report contents for `feedback/save`. Feedback is only ever saved locally.
pub struct FeedbackReportParams {
pub classification: String,
#[ts(optional = nullable)]
pub reason: Option<String>,
@@ -23,24 +24,12 @@ pub struct FeedbackUploadParams {
pub tags: Option<BTreeMap<String, String>>,
}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)]
#[serde(rename_all = "camelCase")]
#[ts(export_to = "v2/")]
pub struct FeedbackUploadResponse {
pub thread_id: String,
/// Whitespace-normalized SHA-256 of the session base instructions, matching the
/// uploaded `prompt_hash` tag. Does not include later developer messages.
/// Null when the reported rollout has no prompt metadata.
#[serde(default)]
pub prompt_hash: Option<String>,
}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)]
#[serde(rename_all = "camelCase")]
#[ts(export_to = "v2/")]
pub struct FeedbackSaveParams {
#[serde(flatten)]
pub feedback: FeedbackUploadParams,
pub feedback: FeedbackReportParams,
/// Absolute, previously unused ZIP path on the app-server host.
/// The caller owns this file, including after a disconnected RPC.
pub save_path: LegacyAppPathString,
@@ -52,6 +41,8 @@ pub struct FeedbackSaveParams {
pub struct FeedbackSaveResponse {
pub saved_path: LegacyAppPathString,
pub thread_id: String,
/// Same prompt hash as feedback/upload; null when prompt metadata is absent.
/// Whitespace-normalized SHA-256 of the session base instructions, matching the
/// saved `prompt_hash` tag. Does not include later developer messages.
/// Null when the reported rollout has no prompt metadata.
pub prompt_hash: Option<String>,
}

View File

@@ -2142,7 +2142,6 @@ fn config_granular_approval_policy_is_marked_experimental() {
model_reasoning_summary: None,
model_verbosity: None,
service_tier: None,
analytics: None,
apps: None,
browser_use: None,
computer_use: None,
@@ -2178,7 +2177,6 @@ fn config_approvals_reviewer_is_marked_experimental() {
model_reasoning_summary: None,
model_verbosity: None,
service_tier: None,
analytics: None,
apps: None,
browser_use: None,
computer_use: None,

View File

@@ -119,7 +119,7 @@ pub struct ThreadStartParams {
pub history_mode: Option<ThreadHistoryMode>,
#[ts(optional = nullable)]
pub session_start_source: Option<ThreadStartSource>,
/// Optional client-supplied analytics source classification for this thread.
/// Optional client-supplied source classification for this thread.
#[ts(optional = nullable)]
pub thread_source: Option<ThreadSource>,
/// Optional project identity for this new thread. Durable threads persist
@@ -629,7 +629,7 @@ pub struct ThreadForkParams {
#[experimental("thread/fork.attachToSource")]
#[serde(default, skip_serializing_if = "std::ops::Not::not")]
pub attach_to_source: bool,
/// Optional client-supplied analytics source classification for this forked thread.
/// Optional client-supplied source classification for this forked thread.
#[ts(optional = nullable)]
pub thread_source: Option<ThreadSource>,
/// When true, return only thread metadata and live fork state without

View File

@@ -274,7 +274,7 @@ pub struct Thread {
/// `None` means the capability is unavailable, such as for an unloaded stored thread.
#[experimental("thread.canAcceptDirectInput")]
pub can_accept_direct_input: Option<bool>,
/// Optional analytics source classification for this thread.
/// Optional source classification for this thread.
pub thread_source: Option<ThreadSource>,
/// Optional random unique nickname assigned to an AgentControl-spawned sub-agent.
pub agent_nickname: Option<String>,