mirror of
https://github.com/openai/codex.git
synced 2026-11-13 14:46:14 +00:00
Expose plugin installation timestamps in app-server summaries (#35859)
## What changed - Add nullable `installedAt` metadata to `PluginSummary` and its generated schemas, expressed as a Unix timestamp in seconds. - Preserve the backend installation time for remote plugins across plugin list, installed, read, and share-list responses. Return `null` when the timestamp is unavailable, including for local or uninstalled plugins and older backend responses. ## Testing - Cover timestamp conversion in the remote plugin list integration test and the field's serialization and backward-compatible default in protocol tests. GitOrigin-RevId: 8a1640320adb298874e1074e9891d1017ad06937
This commit is contained in:
1 parent
b9b7c21821
commit
28f3f1f9ef
19 files changed
+103
-2
No files matched your search
@@ -648,6 +648,10 @@ pub struct PluginSummary {
|
||||
pub share_context: Option<PluginShareContext>,
|
||||
pub source: PluginSource,
|
||||
pub installed: bool,
|
||||
/// Unix timestamp in seconds when the remote plugin was installed, when available.
|
||||
#[serde(default)]
|
||||
#[ts(type = "number | null")]
|
||||
pub installed_at: Option<i64>,
|
||||
pub enabled: bool,
|
||||
pub install_policy: PluginInstallPolicy,
|
||||
pub install_policy_source: Option<PluginInstallPolicySource>,
|
||||
|
||||
@@ -4009,6 +4009,7 @@ fn plugin_share_list_response_serializes_share_items() {
|
||||
share_context: None,
|
||||
source: PluginSource::Remote,
|
||||
installed: false,
|
||||
installed_at: None,
|
||||
enabled: false,
|
||||
install_policy: PluginInstallPolicy::Available,
|
||||
install_policy_source: Some(PluginInstallPolicySource::WorkspaceSetting),
|
||||
@@ -4035,6 +4036,7 @@ fn plugin_share_list_response_serializes_share_items() {
|
||||
"shareContext": null,
|
||||
"source": { "type": "remote" },
|
||||
"installed": false,
|
||||
"installedAt": null,
|
||||
"enabled": false,
|
||||
"installPolicy": "AVAILABLE",
|
||||
"installPolicySource": "WORKSPACE_SETTING",
|
||||
@@ -4067,6 +4069,7 @@ fn plugin_summary_defaults_missing_availability_to_available() {
|
||||
.unwrap();
|
||||
|
||||
assert_eq!(summary.availability, PluginAvailability::Available);
|
||||
assert_eq!(summary.installed_at, None);
|
||||
assert_eq!(summary.local_version, None);
|
||||
assert_eq!(summary.share_context, None);
|
||||
assert_eq!(summary.must_show_installation_interstitial, None);
|
||||
@@ -4085,6 +4088,7 @@ fn plugin_summary_round_trips_plan_eligibility_metadata() {
|
||||
"shareContext": null,
|
||||
"source": { "type": "remote" },
|
||||
"installed": false,
|
||||
"installedAt": null,
|
||||
"enabled": false,
|
||||
"installPolicy": "NOT_AVAILABLE",
|
||||
"installPolicySource": null,
|
||||
|
||||
Reference in new issue
Block a user