Use thread configuration for app/read (#37891)

## What changed

- Add an optional `threadId` parameter to `app/read`.
- When provided, load the thread's effective configuration before applying app feature gating, workspace policy, and plugin attribution.
- Share the thread-aware configuration loader with `app/list`.

## Testing

- Add coverage showing that `app/read` honors a thread-level connector feature override.

GitOrigin-RevId: 161e910a2d7435ecf4acd0ba9f5f5069d1631f12
This commit is contained in:
Matthew Zeng authored and copyberry committed 2026-08-10 22:39:29 +00:00
1 parent 9742cc8ed5
commit 7f928f6ddc
15 files changed
+138 -23

No files matched your search

@@ -3433,6 +3433,7 @@ mod tests {
request_id: RequestId::Integer(9),
params: v2::AppsReadParams {
app_ids: vec!["app-a".to_string(), "app-b".to_string()],
thread_id: None,
include_tools: true,
},
};
@@ -3440,7 +3441,11 @@ mod tests {
json!({
"method": "app/read",
"id": 9,
"params": { "appIds": ["app-a", "app-b"], "includeTools": true }
"params": {
"appIds": ["app-a", "app-b"],
"threadId": null,
"includeTools": true
}
}),
serde_json::to_value(&request)?,
);
@@ -177,6 +177,9 @@ pub struct AppsReadParams {
/// App ids to read. The server accepts at most 100 ids and deduplicates repeated ids while
/// preserving their first-request order.
pub app_ids: Vec<String>,
/// Optional loaded thread id used to evaluate effective app configuration.
#[ts(optional = nullable)]
pub thread_id: Option<String>,
/// When true, include display-only public tool summaries in the returned metadata.
#[serde(default, skip_serializing_if = "std::ops::Not::not")]
pub include_tools: bool,