mirror of
https://github.com/openai/codex.git
synced 2026-11-28 15:33:11 +00:00
Add an API for reading installed app runtime state (#33843)
## What changed - Add `app/installed` to return each connector observed in the committed runtime tool snapshot, including its runtime name and effective `enabled` and `callable` state. - Support evaluating thread-specific configuration with `threadId` and refreshing the hosted connector tool snapshot with `forceRefresh`. - Preserve observed connector identities as disabled when global or workspace policy disables Apps, and retain the previous snapshot when a refresh fails. ## Testing - Cover cached and forced reads, policy and configuration filtering, thread-specific configuration, snapshot refresh failures, and protocol serialization. GitOrigin-RevId: f697b6fb501b7d329a169e947a1c1607806222fe
This commit is contained in:
1 parent
761d504c1a
commit
a238b753af
26 files changed
+1518
-2
No files matched your search
@@ -55,6 +55,14 @@ impl<'a> AppToolPolicyEvaluator<'a> {
|
||||
app_tool_policy_from_apps_config(self.apps_config.as_ref(), input, managed_approval)
|
||||
}
|
||||
|
||||
/// Returns the effective local and managed enablement for one connector.
|
||||
pub fn app_enabled(&self, connector_id: &str) -> bool {
|
||||
self.apps_config
|
||||
.as_ref()
|
||||
.map(|apps_config| app_is_enabled(apps_config, Some(connector_id)))
|
||||
.unwrap_or(true)
|
||||
}
|
||||
|
||||
fn from_parts(
|
||||
apps_config: Option<AppsConfigToml>,
|
||||
requirements_apps_config: Option<&'a AppsRequirementsToml>,
|
||||
|
||||
Reference in new issue
Block a user