WIP fase 2b-3: rimozione sottosistemi solo-ChatGPT (plugin remoti, image gen, daybreak, cyber, attestation, cloud config, app/connettori) - test in corso

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
andrea.difonzo
2026-11-10 16:07:22 +01:00
parent 231e8cd136
commit 5afc7e9f7f
1223 changed files with 6225 additions and 113722 deletions

View File

@@ -15,6 +15,4 @@ workspace = true
[dependencies]
codex-utils-absolute-path = { workspace = true }
semver = { workspace = true }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
thiserror = { workspace = true }

View File

@@ -1,22 +1,12 @@
//! Read-only installed-version selection and persisted installation identity.
//! Read-only installed-version selection.
use codex_utils_absolute_path::AbsolutePathBuf;
use semver::Version;
use serde::Deserialize;
use serde::Serialize;
use std::cmp::Ordering;
use std::fs;
pub const DEFAULT_PLUGIN_VERSION: &str = "local";
pub const PLUGINS_CACHE_DIR: &str = "plugins/cache";
pub const REMOTE_PLUGIN_INSTALL_METADATA_FILE: &str = ".codex-remote-plugin-install.json";
pub const REMOTE_PLUGIN_INSTALL_METADATA_SCHEMA_VERSION: u8 = 1;
#[derive(Debug, Deserialize, Serialize)]
pub struct RemotePluginInstallMetadata {
pub schema_version: u8,
pub remote_plugin_id: String,
}
pub fn validate_plugin_version_segment(plugin_version: &str) -> Result<(), String> {
if plugin_version.is_empty() {
@@ -66,23 +56,3 @@ pub fn active_plugin_version(plugin_base_root: &AbsolutePathBuf) -> Option<Strin
discovered_versions.pop()
}
}
/// Validates persisted installation metadata and returns its normalized remote identity.
pub fn parse_remote_plugin_id(contents: &str) -> Result<String, String> {
let metadata: RemotePluginInstallMetadata = serde_json::from_str(contents)
.map_err(|err| format!("failed to parse remote plugin install metadata: {err}"))?;
if metadata.schema_version != REMOTE_PLUGIN_INSTALL_METADATA_SCHEMA_VERSION {
return Err(format!(
"unsupported remote plugin install metadata schema version: {}",
metadata.schema_version
));
}
let remote_plugin_id = metadata.remote_plugin_id.trim();
if remote_plugin_id.is_empty() {
return Err(
"invalid remote plugin install metadata: remote plugin id must not be blank"
.to_string(),
);
}
Ok(remote_plugin_id.to_string())
}