Remove app-server marketplace routes
This commit is contained in:
parent
0c92ac0abd
commit
d4980e0075
62 changed files with 1150 additions and 3605 deletions
|
|
@ -439,14 +439,6 @@ client_request_definitions! {
|
|||
params: v2::SkillsListParams,
|
||||
response: v2::SkillsListResponse,
|
||||
},
|
||||
MarketplaceAdd => "marketplace/add" {
|
||||
params: v2::MarketplaceAddParams,
|
||||
response: v2::MarketplaceAddResponse,
|
||||
},
|
||||
MarketplaceRemove => "marketplace/remove" {
|
||||
params: v2::MarketplaceRemoveParams,
|
||||
response: v2::MarketplaceRemoveResponse,
|
||||
},
|
||||
AppsList => "app/list" {
|
||||
params: v2::AppsListParams,
|
||||
response: v2::AppsListResponse,
|
||||
|
|
@ -3963,8 +3955,28 @@ mod tests {
|
|||
linked_subgoal_ids: vec!["phase6".to_string()],
|
||||
linked_graph_node_ids: vec!["job-surface".to_string()],
|
||||
instruction: "Summarize the bound specialist task.".to_string(),
|
||||
input_json: json!({"task": "smoke"}),
|
||||
output_schema_json: None,
|
||||
launch_document: v2::ThreadEpiphanyWorkerLaunchDocument::Role(
|
||||
v2::ThreadEpiphanyRoleWorkerLaunchDocument {
|
||||
thread_id: "thr_123".to_string(),
|
||||
role_id: "modeling".to_string(),
|
||||
state_revision: 2,
|
||||
objective: Some("Keep the map honest".to_string()),
|
||||
active_subgoal_id: Some("phase6".to_string()),
|
||||
active_subgoals: Vec::new(),
|
||||
active_graph_node_ids: vec!["job-surface".to_string()],
|
||||
investigation_checkpoint: None,
|
||||
scratch: None,
|
||||
invariants: Vec::new(),
|
||||
graphs: None,
|
||||
recent_evidence: Vec::new(),
|
||||
recent_observations: Vec::new(),
|
||||
graph_frontier: None,
|
||||
graph_checkpoint: None,
|
||||
planning: None,
|
||||
churn: None,
|
||||
},
|
||||
),
|
||||
output_contract_id: "epiphany.role_worker_result.v0".to_string(),
|
||||
max_runtime_seconds: Some(30),
|
||||
},
|
||||
};
|
||||
|
|
|
|||
|
|
@ -5782,41 +5782,6 @@ pub struct SkillsListResponse {
|
|||
pub data: Vec<SkillsListEntry>,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[ts(export_to = "v2/")]
|
||||
pub struct MarketplaceAddParams {
|
||||
pub source: String,
|
||||
#[ts(optional = nullable)]
|
||||
pub ref_name: Option<String>,
|
||||
#[ts(optional = nullable)]
|
||||
pub sparse_paths: Option<Vec<String>>,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[ts(export_to = "v2/")]
|
||||
pub struct MarketplaceAddResponse {
|
||||
pub marketplace_name: String,
|
||||
pub installed_root: AbsolutePathBuf,
|
||||
pub already_added: bool,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[ts(export_to = "v2/")]
|
||||
pub struct MarketplaceRemoveParams {
|
||||
pub marketplace_name: String,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[ts(export_to = "v2/")]
|
||||
pub struct MarketplaceRemoveResponse {
|
||||
pub marketplace_name: String,
|
||||
pub installed_root: Option<AbsolutePathBuf>,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[ts(export_to = "v2/")]
|
||||
|
|
@ -11423,37 +11388,6 @@ mod tests {
|
|||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn marketplace_add_params_serialization_uses_optional_ref_name_and_sparse_paths() {
|
||||
assert_eq!(
|
||||
serde_json::to_value(MarketplaceAddParams {
|
||||
source: "owner/repo".to_string(),
|
||||
ref_name: None,
|
||||
sparse_paths: None,
|
||||
})
|
||||
.unwrap(),
|
||||
json!({
|
||||
"source": "owner/repo",
|
||||
"refName": null,
|
||||
"sparsePaths": null,
|
||||
}),
|
||||
);
|
||||
|
||||
assert_eq!(
|
||||
serde_json::to_value(MarketplaceAddParams {
|
||||
source: "owner/repo".to_string(),
|
||||
ref_name: Some("main".to_string()),
|
||||
sparse_paths: Some(vec!["plugins/foo".to_string()]),
|
||||
})
|
||||
.unwrap(),
|
||||
json!({
|
||||
"source": "owner/repo",
|
||||
"refName": "main",
|
||||
"sparsePaths": ["plugins/foo"],
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn plugin_marketplace_entry_serializes_remote_only_path_as_null() {
|
||||
assert_eq!(
|
||||
|
|
@ -11666,40 +11600,6 @@ mod tests {
|
|||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn marketplace_remove_response_serializes_nullable_installed_root() {
|
||||
let installed_root = if cfg!(windows) {
|
||||
r"C:\marketplaces\debug"
|
||||
} else {
|
||||
"/tmp/marketplaces/debug"
|
||||
};
|
||||
let installed_root = AbsolutePathBuf::try_from(PathBuf::from(installed_root)).unwrap();
|
||||
let installed_root_json = installed_root.as_path().display().to_string();
|
||||
assert_eq!(
|
||||
serde_json::to_value(MarketplaceRemoveResponse {
|
||||
marketplace_name: "debug".to_string(),
|
||||
installed_root: Some(installed_root),
|
||||
})
|
||||
.unwrap(),
|
||||
json!({
|
||||
"marketplaceName": "debug",
|
||||
"installedRoot": installed_root_json,
|
||||
}),
|
||||
);
|
||||
|
||||
assert_eq!(
|
||||
serde_json::to_value(MarketplaceRemoveResponse {
|
||||
marketplace_name: "debug".to_string(),
|
||||
installed_root: None,
|
||||
})
|
||||
.unwrap(),
|
||||
json!({
|
||||
"marketplaceName": "debug",
|
||||
"installedRoot": null,
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn codex_error_info_serializes_http_status_code_in_camel_case() {
|
||||
let value = CodexErrorInfo::ResponseTooManyFailedAttempts {
|
||||
|
|
|
|||
Reference in a new issue