Skip to content

Commit ce447af

Browse files
MaojiaShengTRAE CLI
andcommitted
feat: support vector record IDs across filesystem APIs
- centralize deterministic vector record ID generation and migration handling - allow stat and read to resolve file IDs with actionable missing-index diagnostics - add selectable filesystem fields and script-friendly ls, tree, and glob output - preserve complete IDs in simple output and honor tree --simple without fields - restrict Python SDK ID passthrough to supported read-only endpoints - preserve explicit empty glob extra_fields for metadata responses - retain the dedicated Codex OAuth doctor diagnostic path - document the public API behavior and add CLI, SDK, storage, and server regressions Co-authored-by: TRAE CLI <traecli@bytedance.com>
1 parent e357af6 commit ce447af

35 files changed

Lines changed: 1227 additions & 184 deletions

crates/ov_cli/src/client.rs

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -584,8 +584,9 @@ impl HttpClient {
584584
abs_limit: i32,
585585
show_all_hidden: bool,
586586
node_limit: i32,
587+
extra_fields: &[String],
587588
) -> Result<serde_json::Value> {
588-
let params = vec![
589+
let mut params = vec![
589590
("uri".to_string(), uri.to_string()),
590591
("simple".to_string(), simple.to_string()),
591592
("recursive".to_string(), recursive.to_string()),
@@ -594,6 +595,9 @@ impl HttpClient {
594595
("show_all_hidden".to_string(), show_all_hidden.to_string()),
595596
("node_limit".to_string(), node_limit.to_string()),
596597
];
598+
for field in extra_fields {
599+
params.push(("extra_fields".to_string(), field.clone()));
600+
}
597601
self.get("/api/v1/fs/ls", &params).await
598602
}
599603

@@ -605,15 +609,19 @@ impl HttpClient {
605609
show_all_hidden: bool,
606610
node_limit: i32,
607611
level_limit: i32,
612+
extra_fields: &[String],
608613
) -> Result<serde_json::Value> {
609-
let params = vec![
614+
let mut params = vec![
610615
("uri".to_string(), uri.to_string()),
611616
("output".to_string(), output.to_string()),
612617
("abs_limit".to_string(), abs_limit.to_string()),
613618
("show_all_hidden".to_string(), show_all_hidden.to_string()),
614619
("node_limit".to_string(), node_limit.to_string()),
615620
("level_limit".to_string(), level_limit.to_string()),
616621
];
622+
for field in extra_fields {
623+
params.push(("extra_fields".to_string(), field.clone()));
624+
}
617625
self.get("/api/v1/fs/tree", &params).await
618626
}
619627

@@ -758,12 +766,16 @@ impl HttpClient {
758766
pattern: &str,
759767
uri: &str,
760768
node_limit: i32,
769+
extra_fields: Option<&[String]>,
761770
) -> Result<serde_json::Value> {
762-
let body = serde_json::json!({
771+
let mut body = serde_json::json!({
763772
"pattern": pattern,
764773
"uri": uri,
765774
"node_limit": node_limit,
766775
});
776+
if let Some(fields) = extra_fields {
777+
body["extra_fields"] = serde_json::json!(fields);
778+
}
767779
self.post("/api/v1/search/glob", &body).await
768780
}
769781

@@ -2246,7 +2258,7 @@ mod tests {
22462258
let client = HttpClient::new(base_url, None, None, None, None, 5.0, false, None);
22472259

22482260
client
2249-
.ls("viking://resources", false, false, "agent", 256, false, 1)
2261+
.ls("viking://resources", false, false, "agent", 256, false, 1, &[])
22502262
.await
22512263
.expect("ls request should succeed");
22522264

@@ -2372,7 +2384,7 @@ mod tests {
23722384
let client = HttpClient::new(base_url, None, None, None, None, 5.0, false, None);
23732385

23742386
client
2375-
.tree("viking://resources", "agent", 256, false, 1, 3)
2387+
.tree("viking://resources", "agent", 256, false, 1, 3, &[])
23762388
.await
23772389
.expect("tree request should succeed");
23782390

0 commit comments

Comments
 (0)