Self-evolving Context Database for AI Agents. Unify Agent Memory, Knowledge RAG and Skills.
Python agent-contextagent-memoryagent-pluginsagentic-ragcontext-databasedsh-pluginknowledge-basememorymemory-managementself-evolvingvector-database
refactor: remove resource relation edges (#3956)
zgydc39985ad135
diff --git a/.github/workflows/api_test.yml b/.github/workflows/api_test.ymlindex aa0a99e13..4a2606161 100644--- a/.github/workflows/api_test.yml+++ b/.github/workflows/api_test.yml@@ -554,7 +554,6 @@ jobs:test_cli_resources.py \test_cli_search.py \test_cli_sessions.py \- test_cli_relations.py \test_cli_system.py \test_cli_skills.py \test_cli_observer.py \diff --git a/bot/vikingbot/openviking_mount/ov_server.py b/bot/vikingbot/openviking_mount/ov_server.pyindex 3a836f08c..7a04ffb93 100644--- a/bot/vikingbot/openviking_mount/ov_server.py+++ b/bot/vikingbot/openviking_mount/ov_server.py@@ -240,7 +240,6 @@ class VikingClient:def _matched_context_to_dict(self, matched_context: Any) -> Dict[str, Any]:"""将 MatchedContext 对象或 dict 结果转换为字典。"""if isinstance(matched_context, dict):- relations = matched_context.get("relations", [])return {"uri": str(matched_context.get("uri", "") or ""),"context_type": str(@@ -252,9 +251,6 @@ class VikingClient:"category": str(matched_context.get("category", "") or ""),"score": matched_context.get("score", 0.0),"match_reason": str(matched_context.get("match_reason", "") or ""),- "relations": [self._relation_to_dict(r) for r in relations if r is not None]- if isinstance(relations, list)- else [],}return {"uri": getattr(matched_context, "uri", ""),@@ -265,18 +261,6 @@ class VikingClient:"category": getattr(matched_context, "category", ""),"score": getattr(matched_context, "score", 0.0),"match_reason": getattr(matched_context, "match_reason", ""),- "relations": [- self._relation_to_dict(r) for r in getattr(matched_context, "relations", [])- ],- }-- def _relation_to_dict(self, relation: Any) -> Dict[str, Any]:- """将 Relation 对象转换为字典"""- return {- "from_uri": getattr(relation, "from_uri", ""),- "to_uri": getattr(relation, "to_uri", ""),- "relation_type": getattr(relation, "relation_type", ""),- "reason": getattr(relation, "reason", ""),}def _matched_context_group_to_dicts(self, result: Any, group_name: str) -> List[Dict[str, Any]]:diff --git a/crates/ov_cli/README.md b/crates/ov_cli/README.mdindex 773c686d8..189c044ed 100644--- a/crates/ov_cli/README.md+++ b/crates/ov_cli/README.md@@ -211,11 +211,8 @@ ov session commit s1 --no-event-tags- `snapshot log` - Walk snapshot history.- `snapshot ignore-get` / `snapshot ignore-set` / `snapshot ignore-delete` - Manage account `.ovgitignore`.-### Relations And Privacy+### Privacy-- `relations` - List resource relations. Experimental.-- `link` - Create relation links. Experimental.-- `unlink` - Remove a relation link. Experimental.- `privacy` - Manage privacy configuration categories, targets, versions, and active config.### Admindiff --git a/crates/ov_cli/README_CN.md b/crates/ov_cli/README_CN.mdindex 925644910..1313c8f50 100644--- a/crates/ov_cli/README_CN.md+++ b/crates/ov_cli/README_CN.md@@ -211,11 +211,8 @@ ov session commit s1 --no-event-tags- `snapshot log` - 查看快照历史。- `snapshot ignore-get` / `snapshot ignore-set` / `snapshot ignore-delete` - 管理 account `.ovgitignore`。-### 关系与隐私+### 隐私-- `relations` - 列出资源关系,实验特性。-- `link` - 创建关系链接,实验特性。-- `unlink` - 删除关系链接,实验特性。- `privacy` - 管理隐私配置分类、目标、版本和 active 配置。### 管理员命令diff --git a/crates/ov_cli/src/client.rs b/crates/ov_cli/src/client.rsindex 0319e0cb4..1bf30f49d 100644--- a/crates/ov_cli/src/client.rs+++ b/crates/ov_cli/src/client.rs@@ -1234,35 +1234,6 @@ impl HttpClient {self.get("/api/v1/tasks", ¶ms).await}- // ============ Relation Methods ============-- pub async fn relations(&self, uri: &str) -> Result<serde_json::Value> {- let params = vec![("uri".to_string(), uri.to_string())];- self.get("/api/v1/relations", ¶ms).await- }-- pub async fn link(- &self,- from_uri: &str,- to_uris: &[String],- reason: &str,- ) -> Result<serde_json::Value> {- let body = serde_json::json!({- "from_uri": from_uri,- "to_uris": to_uris,- "reason": reason,- });- self.post("/api/v1/relations/link", &body).await- }-- pub async fn unlink(&self, from_uri: &str, to_uri: &str) -> Result<serde_json::Value> {- let body = serde_json::json!({- "from_uri": from_uri,- "to_uri": to_uri,- });- self.delete_with_body("/api/v1/relations/link", &body).await- }-// ============ Pack Methods ============async fn download_pack(diff --git a/crates/ov_cli/src/commands/mod.rs b/crates/ov_cli/src/commands/mod.rsindex c729a25b9..0a5b999bb 100644--- a/crates/ov_cli/src/commands/mod.rs+++ b/crates/ov_cli/src/commands/mod.rs@@ -7,7 +7,6 @@ pub mod filesystem;pub mod observer;pub mod pack;pub mod privacy;-pub mod relations;pub(crate) mod render_utils;pub mod resources;pub mod search;diff --git a/crates/ov_cli/src/commands/relations.rs b/crates/ov_cli/src/commands/relations.rsdeleted file mode 100644index f0b943e0f..000000000--- a/crates/ov_cli/src/commands/relations.rs+++ /dev/null@@ -1,57 +0,0 @@-use crate::client::HttpClient;-use crate::error::Result;-use crate::output::{OutputFormat, output_success};--pub async fn list_relations(- client: &HttpClient,- uri: &str,- format: OutputFormat,- compact: bool,-) -> Result<()> {- let result = client.relations(uri).await?;- output_success(&result, format, compact);- Ok(())-}--pub async fn link(- client: &HttpClient,- from_uri: &str,- to_uris: &Vec<String>,- reason: &str,- format: OutputFormat,- compact: bool,-) -> Result<()> {- let result = client.link(from_uri, to_uris, reason).await?;- // If the server returns null/empty, show a confirmation summary- if result.is_null() {- let summary = serde_json::json!({- "from": from_uri,- "to": to_uris,- "reason": reason,- });- output_success(&summary, format, compact);- } else {- output_success(&result, format, compact);- }- Ok(())-}--pub async fn unlink(- client: &HttpClient,- from_uri: &str,- to_uri: &str,- format: OutputFormat,- compact: bool,-) -> Result<()> {- let result = client.unlink(from_uri, to_uri).await?;- if result.is_null() {- let summary = serde_json::json!({- "from": from_uri,- "to": to_uri,- });- output_success(&summary, format, compact);- } else {- output_success(&result, format, compact);- }- Ok(())-}diff --git a/crates/ov_cli/src/error_ui.rs b/crates/ov_cli/src/error_ui.rsindex 94227a427..7b8cc6327 100644--- a/crates/ov_cli/src/error_ui.rs+++ b/crates/ov_cli/src/error_ui.rs@@ -556,9 +556,6 @@ fn is_contextual_top_level_command(command: &str) -> bool {| "grep"| "glob"| "add-memory"- | "relations"- | "link"- | "unlink"| "export"| "backup"| "import"diff --git a/crates/ov_cli/src/handlers.rs b/crates/ov_cli/src/handlers.rsindex 38d676d67..784808d94 100644--- a/crates/ov_cli/src/handlers.rs+++ b/crates/ov_cli/src/handlers.rs@@ -341,34 +341,6 @@ pub async fn handle_add_skill(.await}-pub async fn handle_relations(uri: String, ctx: CliContext) -> Result<()> {- let client = ctx.get_client();- commands::relations::list_relations(&client, &uri, ctx.output_format, ctx.compact).await-}--pub async fn handle_link(- from_uri: String,- to_uris: Vec<String>,- reason: String,- ctx: CliContext,-) -> Result<()> {- let client = ctx.get_client();- commands::relations::link(- &client,- &from_uri,- &to_uris,- &reason,- ctx.output_format,- ctx.compact,- )- .await-}--pub async fn handle_unlink(from_uri: String, to_uri: String, ctx: CliContext) -> Result<()> {- let client = ctx.get_client();- commands::relations::unlink(&client, &from_uri, &to_uri, ctx.output_format, ctx.compact).await-}-pub async fn handle_export(uri: String,to: String,diff --git a/crates/ov_cli/src/help_ui.rs b/crates/ov_cli/src/help_ui.rsindex e56b2e31c..9cfc316c4 100644--- a/crates/ov_cli/src/help_ui.rs+++ b/crates/ov_cli/src/help_ui.rs@@ -93,9 +93,6 @@ const INTERACTIVE_ADMIN: &[HelpCommand] = help_commands!["admin","system","reindex",- "relations",- "link",- "unlink"];const HELP_SECTIONS: &[HelpSection] = &[@@ -322,10 +319,6 @@ const COMMAND_HELP_SPECS: &[CommandHelpSpec] = &[label: "ov read <uri>",description: "Read the resource content.",},- HelpItem {- label: "ov relations <uri>",- description: "Inspect related resources.",- },],},CommandHelpSpec {@@ -736,48 +729,6 @@ const COMMAND_HELP_SPECS: &[CommandHelpSpec] = &[description: "Show exact arguments for a privacy operation.",}],},- CommandHelpSpec {- path: &["relations"],- purpose: "List relation links for one resource. Experimental.",- examples: &[HelpItem {- label: "ov relations viking://projects/acme/spec.md",- description: "Inspect linked resources.",- }],- next_steps: &[- HelpItem {- label: "ov link <from-uri> <to-uri>",- description: "Create a relation.",- },- HelpItem {- label: "ov unlink <from-uri> <to-uri>",- description: "Remove a relation.",- },- ],- },- CommandHelpSpec {- path: &["link"],- purpose: "Create one or more relation links between resources. Experimental.",- examples: &[HelpItem {- label: "ov link viking://a.md viking://b.md --reason \"related design\"",- description: "Link two resources with a reason.",- }],- next_steps: &[HelpItem {- label: "ov relations <from-uri>",- description: "Confirm the relation.",- }],- },- CommandHelpSpec {- path: &["unlink"],- purpose: "Remove one relation link between resources. Experimental.",- examples: &[HelpItem {- label: "ov unlink viking://a.md viking://b.md",- description: "Remove a relation.",- }],- next_steps: &[HelpItem {- label: "ov relations <from-uri>",- description: "Confirm the relation is gone.",- }],- },CommandHelpSpec {path: &["export"],purpose: "Export context from a URI as an .ovpack file.",@@ -2362,9 +2313,6 @@ fn localized_command_description<'a>("glob" => "Glob 路径搜索","overview" => "生成资源概览","abstract" => "生成资源摘要",- "relations" => "列出资源关系",- "link" => "创建关系链接",- "unlink" => "删除关系链接","config" => "添加、编辑、删除或切换配置","config show" => "显示当前配置","config validate" => "验证当前配置",diff --git a/crates/ov_cli/src/main.rs b/crates/ov_cli/src/main.rsindex 457e3bbbe..52bb5f9b5 100644--- a/crates/ov_cli/src/main.rs+++ b/crates/ov_cli/src/main.rs@@ -912,38 +912,6 @@ enum Commands {#[command(subcommand)]action: PrivacyCommands,},- /// [Experimental][Data] List relations of a resource- Relations {- /// Viking URI- #[arg(value_name = "uri")]- uri: String,- },- /// [Experimental][Data] Create relation links from one URI to one or more targets- Link {- /// Source URI- #[arg(value_name = "from-uri")]- from_uri: String,- /// One or more target URIs- #[arg(value_name = "to-uri")]- to_uris: Vec<String>,- /// Reason for linking- #[arg(- long,- default_value = "",- value_name = "text",- help_heading = "Common options"- )]- reason: String,- },- /// [Experimental][Data] Remove a relation link- Unlink {- /// Source URI- #[arg(value_name = "from-uri")]- from_uri: String,- /// Target URI to unlink- #[arg(value_name = "to-uri")]- to_uri: String,- },/// [Data] Export context as .ovpackExport {/// Source URI@@ -2481,9 +2449,6 @@ fn is_top_level_server_command(command: &str) -> bool {| "grep"| "glob"| "add-memory"- | "relations"- | "link"- | "unlink"| "export"| "backup"| "import"@@ -3263,15 +3228,6 @@ async fn main() {.await}},- Commands::Relations { uri } => handlers::handle_relations(uri, ctx).await,- Commands::Link {- from_uri,- to_uris,- reason,- } => handlers::handle_link(from_uri, to_uris, reason, ctx).await,- Commands::Unlink { from_uri, to_uri } => {- handlers::handle_unlink(from_uri, to_uri, ctx).await- }Commands::Export {uri,to,@@ -4106,9 +4062,6 @@ mod tests {"grep","glob","add-memory",- "relations",- "link",- "unlink","export","backup","import",diff --git a/crates/ov_cli/test_ov.sh b/crates/ov_cli/test_ov.shindex e398bb64d..1b2dc7054 100755--- a/crates/ov_cli/test_ov.sh+++ b/crates/ov_cli/test_ov.sh@@ -279,43 +279,6 @@ elseecho ""fi-# ============================================================================-# SCENARIO 7: Relations-# Description: Test relation management (link, unlink, relations)-# ============================================================================-print_test "Scenario 7: Relations"-echo "Description: Test relation management"-echo ""--if [ -n "$README_URI" ]; then- echo "7.1. Create relation link..."- if $OV_BIN link "$README_URI" "viking://resources/test" --reason "test relation"; then- print_success "Relation link created"- else- print_error "Relation link creation failed"- fi- echo ""-- echo "7.2. List relations..."- if $OV_BIN relations "$README_URI"; then- print_success "Relations listed"- else- print_error "Relations listing failed"- fi- echo ""-- echo "7.3. Unlink relation..."- if $OV_BIN unlink "$README_URI" "viking://resources/test"; then- print_success "Relation unlinked"- else- print_error "Relation unlink failed"- fi- echo ""-else- print_error "Skipping relation operations - no resource URI available"- echo ""-fi-# ============================================================================# SCENARIO 8: Pack Operations (Export/Import)# Description: Test export and import of .ovpack filesdiff --git a/crates/ragfs/src/git/enumerate.rs b/crates/ragfs/src/git/enumerate.rsindex cd2a77c73..ff31968fe 100644--- a/crates/ragfs/src/git/enumerate.rs+++ b/crates/ragfs/src/git/enumerate.rs@@ -11,7 +11,7 @@//! | Any segment equals `.path.ovlock` OR starts with `.path.ovlock` | Runtime lock |//! | File extension is `.faiss` or `.index`, OR path contains an `embedding_cache/` segment | Vector index — derived data |//!-//! L0/L1 derived files (`.abstract.md`, `.overview.md`, `.relations.json`)+//! L0/L1 derived files (`.abstract.md`, `.overview.md`)//! are intentionally KEPT — design §4.2 says they belong in snapshots.use crate::core::internal_names::{is_hidden_runtime_lock_name, PATH_LOCK_FILE};@@ -290,7 +290,6 @@ mod tests {("/local/acct/resources/x.md", false),("/local/acct/resources/x.md.abstract.md", false),("/local/acct/resources/x.md.overview.md", false),- ("/local/acct/resources/x.md.relations.json", false),],);let fs: Arc<dyn FileSystem> = Arc::new(mock);@@ -302,7 +301,6 @@ mod tests {"resources/x.md".to_string(),"resources/x.md.abstract.md".to_string(),"resources/x.md.overview.md".to_string(),- "resources/x.md.relations.json".to_string(),];expected.sort();@@ -405,7 +403,6 @@ mod tests {assert!(!prune_path("agent/skills/b.py"));assert!(!prune_path("resources/x.md.abstract.md"));assert!(!prune_path("resources/x.md.overview.md"));- assert!(!prune_path("resources/x.md.relations.json"));// "_systemfoo" is NOT "_system", must survive.assert!(!prune_path("_systemfoo/x"));// Per "any segment starting with .path.ovlock", ".path.ovlocking"diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.tsindex 994d1b947..ab1bc1e60 100644--- a/docs/.vitepress/config.ts+++ b/docs/.vitepress/config.ts@@ -209,11 +209,8 @@ const apiReferenceSidebar = {]},{- text: 'Retrieval & Relations',- items: [- ['06-retrieval.md', 'Retrieval'],- ['13-relations.md', 'Relations']- ]+ text: 'Retrieval',+ items: [['06-retrieval.md', 'Retrieval']]},{text: 'Data Lifecycle',@@ -269,11 +266,8 @@ const apiReferenceSidebar = {]},{- text: '检索与关系',- items: [- ['06-retrieval.md', '检索'],- ['13-relations.md', '关系']- ]+ text: '检索',+ items: [['06-retrieval.md', '检索']]},{text: '数据生命周期',diff --git a/docs/design/git-version-control-design.md b/docs/design/git-version-control-design.mdindex efe3aa230..e1c21e503 100644--- a/docs/design/git-version-control-design.md+++ b/docs/design/git-version-control-design.md@@ -169,7 +169,7 @@ sequenceDiagram| 向量缓存目录 | 任意非叶段等于 `embedding_cache` | embedding 缓存为派生数据 || 向量索引文件 | 叶子文件以 `.faiss` 或 `.index` 结尾 | 纯计算产物,体积大且可重建 |-L0/L1 派生文件(`.abstract.md`、`.overview.md`、`.relations.json`)未命中任一剪枝规则,**会**纳入主线 commit。restore 时随源文件一起回滚,无需重新生成;Python 层在 `restore` 完成后按 `(written_paths, deleted_paths)` 精确触发 L0/L1/DETAIL 向量异步重建(`.relations.json` 不触发向量任务)。+L0/L1 派生文件(`.abstract.md`、`.overview.md`)未命中任一剪枝规则,**会**纳入主线 commit。restore 时随源文件一起回滚,无需重新生成;Python 层在 `restore` 完成后按 `(written_paths, deleted_paths)` 精确触发 L0/L1/DETAIL 向量异步重建。此外,版本管理支持账号级 `.ovgitignore` 控制文件,物理路径为 `/local/{account_id}/.ovgitignore`,Git tree path 为 `.ovgitignore`。该文件使用账号根相对的 glob 子集规则,在 `commit` 枚举当前 VFS 文件和扫描上一版 tree 时共同生效;匹配的文件不会进入新的 snapshot commit,即使它们曾存在于历史 commit 中。`.ovgitignore` 文件自身始终进入版本管理,规则无法把它排除。@@ -707,7 +707,7 @@ pub async fn restore(&self, req: RestoreRequest) -> Result<RestoreResponse> {>> - **空目录清理(步骤 6b)**:删除完文件后会沿祖先链 rmdir 至 `project_dir` 或第一个非空目录,避免 VFS 残留空目录。> - **幂等删除**:`vfs.rm` 返回 NotFound 视为成功,使 restore 可以在已被并发清理的路径上继续推进。-> - **written\_paths / deleted\_paths**:`Applied` 响应除了 `written/deleted` 计数外,还返回**全量受影响路径(已加 project\_dir 前缀)**;Python 层按 marker / 源文件 / `.relations.json` 分类,精确触发 L0/L1/DETAIL 向量更新,不再依赖广义的 `_trigger_vector_rebuild(paths)`。+> - **written\_paths / deleted\_paths**:`Applied` 响应除了 `written/deleted` 计数外,还返回**全量受影响路径(已加 project\_dir 前缀)**;Python 层按 marker / 源文件分类,精确触发 L0/L1/DETAIL 向量更新,不再依赖广义的 `_trigger_vector_rebuild(paths)`。> - **没有 commit\_index 刷新**:对应 §8.1 的 Fast Path 1 未实现,restore 末尾也无须刷新 index。> - **回写并发度**:当前硬编码 `buffer_unordered(32)`,尚未提供配置项。>@@ -1216,7 +1216,7 @@ current=commit_a]### Python 侧-- **VikingFS.commit / restore / show / log 已实现**(`openviking/storage/viking_fs.py`),`_uri_to_tree_path` / `_tree_path_to_uri` / `_classify_restore_path` / `_schedule_vector_rebuild` / `_run_vector_rebuild` 均已实现,精确按 marker / source-file / `.relations.json` 调度 `ReindexExecutor`。+- **VikingFS.commit / restore / show / log 已实现**(`openviking/storage/viking_fs.py`),`_uri_to_tree_path` / `_tree_path_to_uri` / `_classify_restore_path` / `_schedule_vector_rebuild` / `_run_vector_rebuild` 均已实现,精确按 marker / source-file 调度 `ReindexExecutor`。- **VikingFS.\_trigger\_vector\_rebuild(account, paths)(早期设计)** 已被更精确的 `_schedule_vector_rebuild(written, deleted)` 替代,**不会**再实现旧 API。***@@ -1258,7 +1258,7 @@ current=commit_a]| CAS | Compare-And-Swap,本文特指 ref 更新时"仅当当前值 = 期望值才写入" || Root Tree | commit 对象指向的最顶层 tree 对象,代表整个仓库快照 || Tree Editor | `gix_object::tree::Editor`,gitoxide 提供的内存中 tree 构建器,支持 upsert/remove/write |-| 派生文件 | `.abstract.md` / `.overview.md` / `.relations.json`,由 OpenViking 模型异步生成的 L0/L1 摘要文件,已纳入 Git 版本管理 |+| 派生文件 | `.abstract.md` / `.overview.md`,由 OpenViking 模型异步生成的 L0/L1 摘要文件,已纳入 Git 版本管理 |## 20.2 参考资料diff --git a/docs/design/memory-link-design.md b/docs/design/memory-link-design.mdindex cfdd59891..afd5febcd 100644--- a/docs/design/memory-link-design.md+++ b/docs/design/memory-link-design.md@@ -15,8 +15,8 @@ Memory Link 是在现有记忆体系(profile/preferences/entities/events 等**设计原则:**- 记忆类型扩展链接能力 — 扩展现有 MemoryTypeSchema,所有记忆文件自带链接能力- 存储载体:VikingFS 文件,与现有记忆体系一致-- 链接存储在 `.relations.json` 目录级 sidecar 文件中,content 保持纯净,检索时按需渲染-- 不拘泥于现有 MemoryField 体系,以实现好功能为主+- 链接存储在记忆文件的 `MEMORY_FIELDS` 元数据中,content 保持纯净,检索时按需渲染+- Memory Link 是 memory 内部 links/backlinks 机制,不依赖已废弃的 resource relation 边## 2. 竞品实现分析@@ -1352,74 +1352,73 @@ class PageIdMap:#### 3.2.3 存储方式-content 保持纯净,不插入 Markdown 链接。链接存储在 `.relations.json` 目录级 sidecar 文件中,复用并扩展现有 VikingFS relation 基础设施。+content 保持纯净,不插入 Markdown 链接。链接存储在每个记忆文件尾部的 `MEMORY_FIELDS` 元数据中,复用现有 memory file serialize/deserialize 流程。-#### 为什么选择 .relations.json 而非 MEMORY_FIELDS+#### Memory Link 与 resource relation 的边界-| 维度 | .relations.json | MEMORY_FIELDS |-|------|----------------|---------------|-| 向下兼容 | 兼容老格式(读取时自动适配),无需数据迁移 | 不兼容,需迁移老 `.relations.json` |-| PPR 遍历 | 按目录读一个文件拿到全量 links,I/O 小 | 逐文件读 MEMORY_FIELDS 解析 links,I/O 大 |-| 写入独立性 | 写 link 不修改记忆文件,不触发内容重写和重新向量化 | 写 link 需改两端文件的 MEMORY_FIELDS |-| 现有基础设施 | 复用 link/unlink/加密/ovpack 导入导出/HTTP API | 需新建或大幅改造 serialize/deserialize |-| 改动范围 | 中(viking_fs 扩展字段 + 上层适配) | 大(content.py + memory_updater + viking_fs + 迁移) |+Memory Link 只属于 memory 子系统,用于在记忆文件之间维护 `links` / `backlinks`:++- 写入入口:`ExtractLoop` 解析 LLM 输出的 links,`MemoryUpdater` 将其分发到 from/to 两端记忆文件+- 存储位置:记忆文件自身的 `MEMORY_FIELDS.links` 和 `MEMORY_FIELDS.backlinks`+- 读取用途:memory 检索、PPR 图增强、graph view、整理任务上下文+- 不依赖已废弃的 resource relation API,也不通过独立 relation sidecar 存取++因此,本次删除 resource relation 边,不应删除 memory 内部 links/backlinks。两者只是都表达“关系”,但数据入口、存储位置和消费链路不同。#### 存储结构-链接存储在 `from_uri` 所在目录的 `.relations.json` 中。现有 `RelationEntry` 扩展为 `StoredLink`,新增 `from_uri`/`to_uri`/`direction`/`link_type`/`weight`/`t_field`/`t_line_ranges`/`match_text`/`description` 字段:+链接存储在 endpoint 记忆文件的 `MEMORY_FIELDS` 中。`StoredLink` 包含 `from_uri`/`to_uri`/`link_type`/`weight`/`t_field`/`t_line_ranges`/`match_text`/`description` 字段:```json-[- {- "id": "link_1",- "from_uri": "viking://user/caroline/memories/preferences/Python_code_style.md",- "to_uri": "viking://user/caroline/memories/profile.md",- "direction": "links",- "link_type": "belongs_to",- "weight": 0.9,- "t_field": "content",- "t_line_ranges": "3-5",- "match_text": "User",- "description": "该偏好属于 Caroline",- "created_at": "2026-04-27T10:00:00.000Z"- },- {- "id": "link_2",- "from_uri": "viking://user/caroline/memories/events/2026/04/27/code_review.md",- "to_uri": "viking://user/caroline/memories/preferences/Python_code_style.md",- "direction": "backlinks",- "link_type": "related_to",- "weight": 0.7,- "t_field": "content",- "t_line_ranges": "1-2",- "match_text": "Python code style",- "description": "事件中讨论的代码风格与该偏好相关",- "created_at": "2026-04-27T10:00:00.000Z"- }-]+{+ "version": 3,+ "links": [+ {+ "id": "link_1",+ "from_uri": "viking://user/caroline/memories/preferences/Python_code_style.md",+ "to_uri": "viking://user/caroline/memories/profile.md",+ "link_type": "belongs_to",+ "weight": 0.9,+ "t_field": "content",+ "t_line_ranges": "3-5",+ "match_text": "User",+ "description": "该偏好属于 Caroline",+ "created_at": "2026-04-27T10:00:00.000Z"+ }+ ],+ "backlinks": [+ {+ "id": "link_2",+ "from_uri": "viking://user/caroline/memories/events/2026/04/27/code_review.md",+ "to_uri": "viking://user/caroline/memories/preferences/Python_code_style.md",+ "link_type": "related_to",+ "weight": 0.7,+ "t_field": "content",+ "t_line_ranges": "1-2",+ "match_text": "Python code style",+ "description": "事件中讨论的代码风格与该偏好相关",+ "created_at": "2026-04-27T10:00:00.000Z"+ }+ ]+}```-- `direction`: `"links"` = 当前文件引用别人(正链,渲染时替换 `match_text`);`"backlinks"` = 别人引用当前文件(反链,不渲染,只用于 PPR 遍历和整理主题发现)-- 同一条链接写入两端文件各自所在目录的 `.relations.json`:from 端写 `direction="links"`,to 端写 `direction="backlinks"`+- from 端记忆文件写入 `MEMORY_FIELDS.links`,表示当前文件引用别人,渲染时可替换 `match_text`+- to 端记忆文件写入 `MEMORY_FIELDS.backlinks`,表示别人引用当前文件,不渲染,只用于 PPR 遍历和整理主题发现- 两侧 `StoredLink` 记录内容完全相同(`link_type` 不翻转)#### 向下兼容-同一个 `.relations.json` 文件内新老格式共存,读取时按字段判断:--- entry 有 `uris` 字段 → 老格式 `RelationEntry`,每个 uri 展开为一条 `StoredLink`,新字段走默认值(`direction="links"`, `link_type="related_to"`, `weight=1.0`),`reason` → `description`-- entry 有 `to_uri` 字段 → 新格式 `StoredLink`,完整解析--写入只产新格式,老 entry 随文件自然更新逐步迁移。+`MEMORY_FIELDS` 是当前 memory file 的正式元数据载体。memory link 写入只产生 `links` / `backlinks` 字段,不兼容或迁移已废弃的 resource relation 产物。#### 与 StoredWikiLink 的关系-3.1 节的 `StoredWikiLink` 是 LLM 输出后 page_id→URI 转换后的逻辑模型,字段与 `StoredLink` 一致。写入 `.relations.json` 时额外携带 `id`/`from_uri`/`direction`/`created_at`。+3.1 节的 `StoredWikiLink` 是 LLM 输出后 page_id→URI 转换后的逻辑模型,字段与 `StoredLink` 一致。写入 `MEMORY_FIELDS` 时额外携带 `id`/`from_uri`/`created_at`。#### 查询接口-- `get_file_links(uri, direction)` — 获取某文件的所有 links/backlinks,在文件所在目录的 `.relations.json` 中按 `from_uri` + `direction` 过滤-- `relations(uri)` — 返回目录级关联列表(向后兼容,返回值扩展 `link_type`/`weight` 等字段)+- `MemoryFileUtils.parse()` / memory 读取工具 — 从记忆文件尾部 `MEMORY_FIELDS` 解析 links/backlinks+- graph / PPR / context provider — 按 memory URI 读取 endpoint 文件的 links/backlinks 后参与图增强或上下文构建#### 3.2.4 检索时按需渲染@@ -1449,11 +1448,11 @@ content 原文不修改,链接渲染延迟到检索阶段,根据 `match_text- 写入幂等——content 是 LLM 原始输出不被修改- 链接可更新——target_uri 变化只改 links 元数据,content 不用动(GBrain 的 stale-link reconciliation 修复内容修改引起的链接失效,但 slug rename 场景未完全解决)- match_text 可修正——外部 Bot T+1 整理发现 match_text 不准确,直接改 links-- 链接更新无需重算 embedding——links 存在 `.relations.json` 中,不参与向量化,更新链接不触发重新 embedding+- 链接更新无需重算 embedding——links 存在 `MEMORY_FIELDS` 中,不参与可见 content 向量化,更新链接不触发重新 embedding#### 3.2.5 Links Merge 策略-`links` 和 `backlinks` 的合并逻辑在 `utils/links_merge.py` 中独立实现,供 `link()` 调用。两个方向使用相同的合并规则。+`links` 和 `backlinks` 的合并逻辑在 `memory/merge_op/link_merge.py` 中独立实现。两个方向使用相同的合并规则。**合并规则:**- 按 `from_uri` + `to_uri` + `t_field` + `t_line_ranges` 组合去重(同一对文件同一字段不同行号范围视为不同链接)@@ -1475,15 +1474,15 @@ content 原文不修改,链接渲染延迟到检索阶段,根据 `match_text3. 在新文件内容中定位该段落的新行号- 先用字符串精确查找(str.find())- 找不到 → 调 LLM 语义匹配重新定位- - 还是找不到 → 删除该链接(从两端 .relations.json 同时清除)- 4. 双向一致性:修正/删除操作同时作用于两端 .relations.json(从 links 删除 = 从对端 backlinks 删除)+ - 还是找不到 → 删除该链接(从两端 `MEMORY_FIELDS` 同时清除)+ 4. 双向一致性:修正/删除操作同时作用于两端 `MEMORY_FIELDS`(从 links 删除 = 从对端 backlinks 删除)```**查找规则:**- 对 `t_line_ranges` 中的每个连续段落(如 "3-5,8-10" 有两个段落),独立查找- 段落文本 trim 后在新文件中 `str.find()`,匹配第一次出现- 多个段落都找到则合并为新 ranges(如 "4-6,9-11"),任一找不到则走 LLM 语义匹配-- LLM 语义匹配仍找不到 → 从两端 `.relations.json` 删除该链接+- LLM 语义匹配仍找不到 → 从两端 `MEMORY_FIELDS` 删除该链接#### 3.2.7 链接类型与使用@@ -1599,14 +1598,14 @@ resolve_operations():f page_id → PageIdMap.get_uri() 或 ResolvedOperations[idx].uri → f_urit page_id → 同上 → t_urit_field + t_line_ranges → 从目标文件计算实际行号范围和字符数- 将链接分发到 .relations.json(写入 from 端和 to 端各自目录):- - from 文件所在目录 → link(direction="links")- - to 文件所在目录 → link(direction="backlinks")+ 将链接分发到 endpoint 记忆文件的 MEMORY_FIELDS:+ - from 文件 → MEMORY_FIELDS.links+ - to 文件 → MEMORY_FIELDS.backlinks↓MemoryUpdater.apply_operations():- ├─ _apply_upsert(): 写入记忆文件(content 纯净,links/backlinks 在 .relations.json 中)- │ - from 文件所在目录的 .relations.json 包含以该文件为 from 的链接- │ - to 文件所在目录的 .relations.json 包含以该文件为 to 的反向链接+ ├─ _apply_upsert(): 写入记忆文件(content 纯净,links/backlinks 在 MEMORY_FIELDS 中)+ │ - from 文件的 MEMORY_FIELDS.links 包含以该文件为 from 的链接+ │ - to 文件的 MEMORY_FIELDS.backlinks 包含以该文件为 to 的反向链接├─ t_line_ranges 行号修正(3.6 节,精确匹配 + LLM 语义匹配)└─ 链接双向一致性保证```@@ -1624,8 +1623,8 @@ MemoryUpdater.apply_operations():**死链不可能存在**:page_id 只在 ExtractLoop 上下文中产生,对应文件一定存在(已有文件已读入,新建文件即将写入)。**一趟写入策略:**-- `resolve_operations()` 阶段将链接分发:from 端链接写入 from 文件所在目录的 `.relations.json`(`direction="links"`),to 端反向链接写入 to 文件所在目录的 `.relations.json`(`direction="backlinks"`)-- `viking_fs.link()` 内部通过 `utils/links_merge.py` 与已有链接合并+- `resolve_operations()` 阶段将链接分发:from 端链接写入 from 文件的 `MEMORY_FIELDS.links`,to 端反向链接写入 to 文件的 `MEMORY_FIELDS.backlinks`+- `MemoryUpdater` 内部通过 `memory/merge_op/link_merge.py` 与已有链接合并- 无需写入后额外 read → merge → write,一趟完成#### 3.4.2 外部 Bot T+1 触发整理@@ -1698,7 +1697,7 @@ fields:- conflict:检测有 CONTRADICTS 链接的文件对2. 读取每组文件的内容- - VikingFS.read_file() 读每个 URI 的内容 + get_file_links() 读 links+ - VikingFS.read_file() 读每个 URI 的内容,并从 `MEMORY_FIELDS` 解析 links/backlinks- 从 links 过滤组内链接3. 读已有同类 report@@ -1812,7 +1811,7 @@ Phase 4: 返回| min_link_weight | 0.3 | 传播时跳过低权重边 || min_ppr_score | 0.05 | 补充文件的最低分数阈值 |-**计算成本:** 纯数值计算,不需要 LLM 或 embed。假设 top-K=10,每文件平均 5 条 links,一跳扩展最多 50 个文件。瓶颈仅在文件 I/O(读 `.relations.json` 中的 links),计算本身毫秒级。+**计算成本:** 纯数值计算,不需要 LLM 或 embed。假设 top-K=10,每文件平均 5 条 links,一跳扩展最多 50 个文件。瓶颈仅在文件 I/O(读取 endpoint 记忆文件的 `MEMORY_FIELDS` links/backlinks),计算本身毫秒级。##### 3.5.1.1 在线检索增强@@ -1884,15 +1883,13 @@ PPR 传播(多种子叠加,按 3.2.7.4 配置表):| 模块 | 改动 ||------|------|| `dataclass.py` | `MemoryTypeSchema` 新增 `link_enabled`;新增 `WikiLink`, `StoredWikiLink`, `LinkType` 模型 |-| `viking_fs.py` | `RelationEntry` → `StoredLink`(扩展字段);`link()` 新签名;`unlink()` 扩展;新增 `get_file_links()`;`_read_relation_table()` 兼容老格式 || `schema_model_generator.py` | `create_flat_data_model()` 中 link_enabled 时自动注入 `page_id` 字段 |-| `memory_updater.py` | `apply_operations()` 中链接分发(from→links, to→backlinks 写入 `.relations.json`)+ 行号修正 |+| `memory_updater.py` | `apply_operations()` 中链接分发(from→links, to→backlinks 写入 `MEMORY_FIELDS`)+ 行号修正 || `memory_type_registry.py` | `_parse_memory_type()` 解析 `link_enabled` 字段;支持 `dream_tasks` 配置 |+| `resource_memory_link_service.py` | 基于资源引用维护 memory links/backlinks || `tools.py` | 搜索 API 新增 PPR 后处理层(6.1.1);prefetch 扩展 PPR(6.1.2) || `session/compressor_v3.py` | 通过共享 `MemoryUpdater` 应用并持久化 memory links || `session/session.py` | `_run_memory_extraction()` 使用新 `link()` 签名 |-| `server/routers/relations.py` | `LinkRequest` 扩展 `direction`/`link_type`/`weight` 等字段 |-| `sdk/python/openviking_sdk/client.py` | `link()` 方法签名扩展 || YAML templates | 新增 `report` + `report_candidate` memory_type 定义 + `dream_tasks` 配置;现有模板默认 link_enabled=true || 新增模块 | `memory/dream_context_provider.py` — 整理上下文提供者;`utils/links_merge.py` — links/backlinks 合并逻辑;`retrieve/ppr.py` — PPR 算法 |diff --git a/docs/en/about/03-roadmap.md b/docs/en/about/03-roadmap.mdindex 09733bd52..1f7f6931c 100644--- a/docs/en/about/03-roadmap.md+++ b/docs/en/about/03-roadmap.md@@ -15,7 +15,6 @@ This document outlines the development roadmap for OpenViking.- Text resource management (Markdown, HTML, PDF)- Automatic L0/L1 generation- Semantic search with vector indexing-- Resource relations and linking- Content write API- Agent namespace managementdiff --git a/docs/en/agent-integrations/16-capability-reference.md b/docs/en/agent-integrations/16-capability-reference.mdindex 9ef2103dd..3abbaf2ca 100644--- a/docs/en/agent-integrations/16-capability-reference.md+++ b/docs/en/agent-integrations/16-capability-reference.md@@ -93,7 +93,7 @@ These tools are defined on the server side, and future updates will be centrally| 4 | `list` | List a directory (function name `ls`, explicitly registered as `list`) | `recursive=False` (`:423`) || 5 | `tree` | Recursive directory tree | `level_limit=3, node_limit=1000, include_abstract=False` (`:449`) || 6 | `remember` | Write long-term memory | Internally creates a one-shot session (`mcp-store-<uuid12>`) and immediately calls `commit_async` (`:504-523`). This is the only commit entry point on the MCP surface, as there is no explicit commit tool. |-| 7 | `write` | Write a `viking://` file | `mode=replace\|append\|create`; `replace` falls back to `create` if not found. New files must use an extension from the allowlist: `.md .txt .json .yaml .yml .toml .py .js .ts`. Writable domains are limited to `resources/user/agent`; directories like `skills/`, `peers/`, `privacy/`, and `sessions/` under the user root are read-only. Derived files (`.abstract.md` / `.overview.md` / `.relations.json`) cannot be written directly (`:529`; `content_write.py:60-81`) |+| 7 | `write` | Write a `viking://` file | `mode=replace\|append\|create`; `replace` falls back to `create` if not found. New files must use an extension from the allowlist: `.md .txt .json .yaml .yml .toml .py .js .ts`. Writable domains are limited to `resources/user/agent`; directories like `skills/`, `peers/`, `privacy/`, and `sessions/` under the user root are read-only. Existing `.abstract.md` / `.overview.md` sidecars may be body-updated, but public APIs cannot create them (`:529`; `content_write.py:60-81`) || 8 | `edit` | Exact string replacement | Supplying an empty `old_string`, finding zero matches, or finding multiple matches without `replace_all` will raise an error and leave the file content unchanged (`:569`) || 9 | `add_resource` | Resource ingestion (remote URL / signed upload of a local file / Connector) | `watch_interval` is defined in minutes (0 disables watching). The local-path branch generates a signed upload URL (default TTL of 600s), and ingestion triggers automatically post-upload without requiring a subsequent API call (`:723-947`) || 10 | `list_watches` | List watch subscriptions; not yet supported on the commercial edition | Returns an error string if the scheduler is not running (`:958`) |@@ -300,7 +300,7 @@ On the server side, `session_id` handling diverges into two distinct execution p### 3.2.6 Injection backflow protection-To prevent injected content from being captured a second time, the injection process wraps the content in deterministic tags (like `<openviking-context>`), which the capture mechanism then mechanically strips. Specifically, `capture-utils`' `sanitizeCapturedText` function removes injection blocks, digest blocks, metadata fences, and timestamp prefixes.+To prevent injected content from being captured a second time, the injection process wraps the content in deterministic tags (like `<openviking-context>`), which the capture mechanism then mechanically strips. Specifically, `capture-utils`' `sanitizeCapturedText` function removes injection blocks, digest blocks, metadata fences, and timestamp prefixes.**Per-harness specifics:**- **trae / zcode**: Utilize their own cleaning functions (zcode's strips three distinct types of injection blocks).@@ -428,7 +428,7 @@ Legend: **C** = commits; **C\*** = commits, with a precondition (see notes); **### 3.5.1 Write boundary-There are three primary guards on MCP `write` and REST `content/write` (`content_write.py`). First, the writable domain is strictly limited to `viking://resources`, `viking://user`, and `viking://agent`. Second, file extensions for new files must match the whitelist (`.md`, `.txt`, `.json`, `.yaml`, `.yml`, `.toml`, `.py`, `.js`, `.ts`). Third, the four managed subtrees (`skills/`, `peers/`, `privacy/`, `sessions/`) under the user root are designated as read-only (`_USER_MANAGED_SUBTREES`). Additionally, derived files (such as `.abstract.md`, `.overview.md`, and `.relations.json`) cannot be written to directly.+There are three primary guards on MCP `write` and REST `content/write` (`content_write.py`). First, the writable domain is strictly limited to `viking://resources`, `viking://user`, and `viking://agent`. Second, file extensions for new files must match the whitelist (`.md`, `.txt`, `.json`, `.yaml`, `.yml`, `.toml`, `.py`, `.js`, `.ts`). Third, the four managed subtrees (`skills/`, `peers/`, `privacy/`, `sessions/`) under the user root are designated as read-only (`_USER_MANAGED_SUBTREES`). Existing `.abstract.md` and `.overview.md` sidecars can be body-updated, but public write APIs cannot create them.### 3.5.2 Delete boundary@@ -610,7 +610,7 @@ Doc-comment prefixes like `[Data]`, `[Interactive]`, `[Admin]`, or `[Experimenta**Import/export & snapshots**: `export` / `backup` / `import` / `restore` (.ovpack formats) | `snapshot commit/restore/show/log/diff/ignore-*` (workspace snapshots; rollbacks are achieved by committing forward)-**Privacy/relations**: `privacy categories/list/get/versions/version/activate/upsert` (offers `--key-<name>` syntactic sugar) | `relations`/`link`/`unlink` (experimental)+**Privacy**: `privacy categories/list/get/versions/version/activate/upsert` (offers `--key-<name>` syntactic sugar)**Status/observability**: `health` (exits with 0 even when healthy=false) | `status` (table mode always exits with 0) | `observer {queue,vikingdb,models,retrieval,filesystem,system}` | `wait` | `task status/cancel/list` | `task watch {ls,show,rm,pause,resume,update,trigger}` | `version` (probes the server utilizing its own 3-second timeout)diff --git a/docs/en/api/01-overview.md b/docs/en/api/01-overview.mdindex f2f95f049..938b268b3 100644--- a/docs/en/api/01-overview.md+++ b/docs/en/api/01-overview.md@@ -416,7 +416,7 @@ This catalog follows the routes actually mounted by the server. Each group headi| GET | `/api/v1/agent-evolution/experiences/trajectories` | List trajectories that consumed an Experience || GET | `/api/v1/agent-evolution/experiences/outcomes` | Aggregate outcomes of trajectories that consumed an Experience |-### [Retrieval](06-retrieval.md) and [Relations](13-relations.md)+### [Retrieval](06-retrieval.md)| Method | Path | Description ||--------|------|-------------|@@ -424,10 +424,6 @@ This catalog follows the routes actually mounted by the server. Each group headi| POST | `/api/v1/search/search` | Context-aware search; `mode="context"` returns assembled, injection-ready context || POST | `/api/v1/search/grep` | Content pattern search || POST | `/api/v1/search/glob` | File pattern matching |-| GET | `/api/v1/relations` | Get resource relations |-| POST | `/api/v1/relations/link` | Create a resource link |-| DELETE | `/api/v1/relations/link` | Delete a resource link |-| POST | `/api/v1/relations/build_graph` | Build a relation graph |### [Watches](15-watches.md), [Snapshots](11-snapshot.md), and [OVPack](14-ovpack.md)@@ -524,7 +520,7 @@ The sidebar is organized by responsibility rather than historical file size:| Group | What to look for ||-------|------------------|| Core Data | Resources, content, filesystem, skills, sessions, and memory |-| Retrieval & Relations | Semantic retrieval, code retrieval, and resource relations |+| Retrieval | Semantic retrieval and code retrieval || Data Lifecycle | Watches, snapshots, and OVPack || Operations & Observability | System, tasks, Observer, and Metrics || Identity & Governance | Administration and privacy configuration |diff --git a/docs/en/api/03-filesystem.md b/docs/en/api/03-filesystem.mdindex d972e6985..a1a66eade 100644--- a/docs/en/api/03-filesystem.md+++ b/docs/en/api/03-filesystem.md@@ -663,8 +663,6 @@ openviking mv viking://resources/old-name/ viking://resources/new-name/<a id="grep"></a><a id="glob"></a>-<a id="link"></a><a id="relations"></a><a id="unlink"></a>-<a id="export_ovpack"></a><a id="import_ovpack"></a><a id="backup_ovpack"></a><a id="restore_ovpack"></a>## Related Documentationdiff --git a/docs/en/api/05-sessions.md b/docs/en/api/05-sessions.mdindex 4f2b1b853..07b9e7512 100644--- a/docs/en/api/05-sessions.md+++ b/docs/en/api/05-sessions.md@@ -1381,7 +1381,7 @@ Commit a session. Message archiving (Phase 1) completes immediately. Summary gen**Two-Phase Commit Flow:**- **Phase 1 (Synchronous)**: Snapshot current messages, clear live session, create archive directory, write original messages-- **Phase 2 (Asynchronous)**: Generate summaries (L0/L1), extract long-term memories, update relations and active_count+- **Phase 2 (Asynchronous)**: Generate summaries (L0/L1), extract long-term memories, and update active_count**Notes:**- Rapid consecutive commits on the same session are accepted; each request gets its own `task_id`.@@ -1568,7 +1568,6 @@ viking://user/{user_id}/sessions/{session_id}/| +-- {tool_id}/| +-- tool.json+-- .meta.json # Metadata-+-- .relations.json # Related contexts+-- history/ # Archived history+-- archive_001/| +-- messages.jsonl # Written in Phase 1diff --git a/docs/en/api/06-retrieval.md b/docs/en/api/06-retrieval.mdindex 0c1a23729..690d5ba2e 100644--- a/docs/en/api/06-retrieval.md+++ b/docs/en/api/06-retrieval.md@@ -103,7 +103,6 @@ class MatchedContext:category: str # Categoryscore: float # Relevance score (0-1)match_reason: str # Why this matched- relations: List[RelatedContext] # Related contexts```#### 3. Usage Examples@@ -336,7 +335,6 @@ openviking find "red poster style" --image ./poster.png --uri "viking://resource"score": 0.12808319406977778,"category": "","match_reason": "",- "relations": [],"abstract": "This document is an API documentation reading plan that outlines the structure of subsequent API reference materials organized by functional module. Main sections or topics covered include resource management API, search API, file system operations, ses...","overview": null},@@ -347,7 +345,6 @@ openviking find "red poster style" --image ./poster.png --uri "viking://resource"score": 0.12054087276495282,"category": "","match_reason": "",- "relations": [],"abstract": "This directory contains structured API reference documentation for the OpenViking platform, compiling detailed HTTP endpoint specifications for core and extended platform capabilities. It covers functional modules including system health checks, semanti...","overview": null}@@ -563,7 +560,6 @@ openviking search "similar poster" --image ./poster.png --uri "viking://resource"score": 0.95,"category": "","match_reason": "Context-aware match: OAuth login best practices",- "relations": [],"abstract": "OAuth 2.0 best practices for login pages...","overview": "This guide covers OAuth 2.0 best practices including secure token handling, redirect URI validation, and state parameter usage..."}@@ -1053,35 +1049,6 @@ curl -X GET "http://localhost:1933/api/v1/content/read?uri=viking://resources/do-H "X-API-Key: your-key"```-### Get Related Resources--**Python SDK**--```python-import openviking as ov--client = ov.SyncHTTPClient(url="http://localhost:1933", api_key="your-key")-client.initialize()--results = client.find("OAuth implementation")--for ctx in results.resources:- print(f"Found: {ctx.uri}")-- # Get related resources- relations = client.relations(ctx.uri)- for rel in relations:- print(f" Related: {rel['uri']} - {rel['reason']}")-```--**HTTP API**--```bash-# Get relations for resource-curl -X GET "http://localhost:1933/api/v1/relations?uri=viking://resources/docs/auth" \- -H "X-API-Key: your-key"-```-## Best Practices### Use Specific Queriesdiff --git a/docs/en/api/12-content.md b/docs/en/api/12-content.mdindex a6f8bddc7..747ebc57b 100644--- a/docs/en/api/12-content.md+++ b/docs/en/api/12-content.md@@ -226,7 +226,7 @@ Update an existing file, or create a new one when `mode="create"`, and automatic- `replace` and `append` require the file to exist; `create` targets a new file and returns `409 Conflict` when the path already exists. Directories are always rejected.- `create` only accepts text-writable extensions: `.md`, `.txt`, `.json`, `.yaml`, `.yml`, `.toml`, `.py`, `.js`, `.ts`. Parent directories are created automatically.-- `.relations.json` cannot be written directly. Existing `.abstract.md` and `.overview.md` bodies may be updated, but public APIs cannot create them. A body-only request preserves stored OKF metadata; a full-OKF request must match the stored metadata. Unknown metadata fields are silently dropped. A sidecar body write rebuilds only the directory's existing L0/L1 vectors and does not regenerate semantics.+- Existing `.abstract.md` and `.overview.md` bodies may be updated, but public APIs cannot create them. A body-only request preserves stored OKF metadata; a full-OKF request must match the stored metadata. Unknown metadata fields are silently dropped. A sidecar body write rebuilds only the directory's existing L0/L1 vectors and does not regenerate semantics.- File content is updated before the API returns. `wait` only controls whether the call waits for semantic/vector refresh to finish.- The public API no longer accepts `regenerate_semantics` or `revectorize`; write always refreshes related semantics and vectors.diff --git a/docs/en/api/13-relations.md b/docs/en/api/13-relations.mddeleted file mode 100644index 41a961313..000000000--- a/docs/en/api/13-relations.md+++ /dev/null@@ -1,282 +0,0 @@-# Relations--The Relations API creates, reads, and removes explicit links between Viking URIs.--## API Reference--### link()--Create relations between resources.--**Parameters**--| Parameter | Type | Required | Default | Description |-|-----------|------|----------|---------|-------------|-| from_uri | str | Yes | - | Source URI |-| to_uris | str or List[str] | Yes | - | Target URI(s) |-| reason | str | No | "" | Reason for the link |---**Python SDK**--```python-# Single link-client.link(- "viking://resources/docs/auth/",- "viking://resources/docs/security/",- reason="Security best practices for authentication"-)--# Multiple links-client.link(- "viking://resources/docs/api/",- [- "viking://resources/docs/auth/",- "viking://resources/docs/errors/"- ],- reason="Related documentation"-)-```--**TypeScript SDK**--```typescript-await client.link(- "viking://resources/docs/api/",- [- "viking://resources/docs/auth/",- "viking://resources/docs/errors/",- ],- "Related documentation",-);-```--**HTTP API**--```-POST /api/v1/relations/link-```--```bash-# Single link-curl -X POST http://localhost:1933/api/v1/relations/link \- -H "Content-Type: application/json" \- -H "X-API-Key: your-key" \- -d '{- "from_uri": "viking://resources/docs/auth/",- "to_uris": "viking://resources/docs/security/",- "reason": "Security best practices for authentication"- }'--# Multiple links-curl -X POST http://localhost:1933/api/v1/relations/link \- -H "Content-Type: application/json" \- -H "X-API-Key: your-key" \- -d '{- "from_uri": "viking://resources/docs/api/",- "to_uris": ["viking://resources/docs/auth/", "viking://resources/docs/errors/"],- "reason": "Related documentation"- }'-```--**CLI**--```bash-openviking link viking://resources/docs/auth/ viking://resources/docs/security/ --reason "Security best practices"-```---**Response**--```json-{- "status": "ok",- "result": {- "from": "viking://resources/docs/auth/",- "to": "viking://resources/docs/security/"- },- "time": 0.1-}-```-------### relations()--Get relations for a resource.--**Parameters**--| Parameter | Type | Required | Default | Description |-|-----------|------|----------|---------|-------------|-| uri | str | Yes | - | Viking URI |---**Python SDK**--```python-relations = client.relations("viking://resources/docs/auth/")-for rel in relations:- print(f"Related: {rel['uri']}")- print(f" Reason: {rel['reason']}")-```--**TypeScript SDK**--```typescript-const relations = await client.relations("viking://resources/docs/auth/");-console.log(relations);-```--**HTTP API**--```-GET /api/v1/relations?uri={uri}-```--```bash-curl -X GET "http://localhost:1933/api/v1/relations?uri=viking://resources/docs/auth/" \- -H "X-API-Key: your-key"-```--**CLI**--```bash-openviking relations viking://resources/docs/auth/-```---**Response**--```json-{- "status": "ok",- "result": [- {"uri": "viking://resources/docs/security/", "reason": "Security best practices"},- {"uri": "viking://resources/docs/errors/", "reason": "Error handling"}- ],- "time": 0.1-}-```-------### unlink()--Remove a relation.--**Parameters**--| Parameter | Type | Required | Default | Description |-|-----------|------|----------|---------|-------------|-| from_uri | str | Yes | - | Source URI |-| to_uri | str | Yes | - | Target URI to unlink |---**Python SDK**--```python-client.unlink(- "viking://resources/docs/auth/",- "viking://resources/docs/security/"-)-```--**TypeScript SDK**--```typescript-await client.unlink(- "viking://resources/docs/auth/",- "viking://resources/docs/security/",-);-```--**HTTP API**--```-DELETE /api/v1/relations/link-```--```bash-curl -X DELETE http://localhost:1933/api/v1/relations/link \- -H "Content-Type: application/json" \- -H "X-API-Key: your-key" \- -d '{- "from_uri": "viking://resources/docs/auth/",- "to_uri": "viking://resources/docs/security/"- }'-```--**CLI**--```bash-openviking unlink viking://resources/docs/auth/ viking://resources/docs/security/-```---**Response**--```json-{- "status": "ok",- "result": {- "from": "viking://resources/docs/auth/",- "to": "viking://resources/docs/security/"- },- "time": 0.1-}-```-------### build_graph()--Generate a self-contained HTML relation graph from multiple memory roots and write it to a Viking URI.--| Parameter | Type | Required | Description |-|-----------|------|----------|-------------|-| `space_uris` | string[] | Yes | Memory roots to merge |-| `output_uri` | string | Yes | Viking URI of the output HTML file |--**HTTP API**--```http-POST /api/v1/relations/build_graph-Content-Type: application/json-```--```bash-curl -X POST http://localhost:1933/api/v1/relations/build_graph \- -H "Content-Type: application/json" \- -H "X-API-Key: your-key" \- -d '{- "space_uris":[- "viking://user/default/memories",- "viking://user/default/peers/project-a/memories"- ],- "output_uri":"viking://user/default/memories/.graph.html"- }'-```--**Response**--```json-{- "status": "ok",- "result": {- "graph_uri": "viking://user/default/memories/.graph.html"- }-}-```--`graph_uri` is the URI of the generated self-contained HTML file. Read it through the content or filesystem API.--This endpoint does not currently have a public SDK or CLI wrapper, so this section shows only the HTTP tab.-------## Related Documentation--- [Retrieval](06-retrieval.md) - retrieve and use related content-- [File System](03-filesystem.md) - manage relation targets-- [Memory](16-memory.md) - memory namespaces and typesdiff --git a/docs/en/api/20-webdav.md b/docs/en/api/20-webdav.mdindex 7c34986ea..901c7605c 100644--- a/docs/en/api/20-webdav.md+++ b/docs/en/api/20-webdav.md@@ -17,7 +17,7 @@ Phase 1 intentionally keeps the scope narrow:- Resources only. Memories, skills, sessions, and other namespaces are not exposed.- Text-first writes. `PUT` currently accepts UTF-8 text content only.- WebDAV subset only. `OPTIONS`, `PROPFIND`, `GET`, `HEAD`, `PUT`, `DELETE`, `MKCOL`, and `MOVE` are supported.-- Semantic sidecars and internal system files stay internal. Derived or internal files such as `.abstract.md`, `.overview.md`, `.relations.json`, `.path.ovlock`, `.redirect.json`, and `.sync_log.json` are hidden from listings and cannot be accessed directly through WebDAV.+- Semantic sidecars and internal system files stay internal. Derived or internal files such as `.abstract.md`, `.overview.md`, `.path.ovlock`, `.redirect.json`, and `.sync_log.json` are hidden from listings and cannot be accessed directly through WebDAV.Behavior notes:diff --git a/docs/en/concepts/01-architecture.md b/docs/en/concepts/01-architecture.mdindex 03e4aac29..209e952ca 100644--- a/docs/en/concepts/01-architecture.md+++ b/docs/en/concepts/01-architecture.md@@ -54,7 +54,7 @@ OpenViking is a context database designed for AI Agents, unifying all context ty| Module | Responsibility | Key Capabilities ||--------|----------------|------------------|| **Client** | Unified entry | Provides all operation interfaces, delegates to Service layer |-| **Service** | Business logic | FSService, SearchService, SessionService, ResourceService, RelationService, PackService, DebugService |+| **Service** | Business logic | FSService, SearchService, SessionService, ResourceService, PackService, DebugService || **Retrieve** | Context retrieval | Intent analysis (IntentAnalyzer), hierarchical retrieval (HierarchicalRetriever), Rerank || **Session** | Session management | Message recording, usage tracking, session compression, memory commit || **Parse** | Context extraction | Document parsing (PDF/MD/HTML), tree building (TreeBuilder), async semantic generation |@@ -71,7 +71,6 @@ The Service layer decouples business logic from the transport layer, enabling re| **SearchService** | Semantic search | search, find || **SessionService** | Session management | session, sessions, commit, delete || **ResourceService** | Resource import | add_resource, add_skill, wait_processed |-| **RelationService** | Relation management | relations, link, unlink || **PackService** | Import/export and backup/restore | export_ovpack, import_ovpack, backup_ovpack, restore_ovpack || **DebugService** | Debug service | observer (ObserverService) |@@ -81,7 +80,7 @@ OpenViking uses a dual-layer storage architecture separating content from index| Layer | Responsibility | Content ||-------|----------------|---------|-| **AGFS** | Content storage | L0/L1/L2 full content, multimedia files, relations |+| **AGFS** | Content storage | L0/L1/L2 full content, multimedia files || **Vector Index** | Index storage | URIs, vectors, metadata (no file content) |## Data Flow Overviewdiff --git a/docs/en/concepts/03-context-layers.md b/docs/en/concepts/03-context-layers.mdindex 0140e2588..99c603d9c 100644--- a/docs/en/concepts/03-context-layers.md+++ b/docs/en/concepts/03-context-layers.md@@ -68,10 +68,9 @@ A semantically processed directory commonly looks like this:viking://resources/docs/auth/├── .abstract.md # L0, hidden directory sidecar├── .overview.md # L1, hidden directory sidecar-├── .relations.json # Relation data-├── oauth.md # L2-├── jwt.md # L2-└── api-keys.md # L2+├── oauth.md # L2, full content+├── jwt.md # L2, full content+└── api-keys.md # L2, full content```Normal `ls` hides `.abstract.md` and `.overview.md`. The two files are not guaranteed to coexist, so callers should not assume every directory always has both sidecars.diff --git a/docs/en/concepts/04-viking-uri.md b/docs/en/concepts/04-viking-uri.mdindex 28d841969..c1e05b610 100644--- a/docs/en/concepts/04-viking-uri.md+++ b/docs/en/concepts/04-viking-uri.md@@ -333,7 +333,7 @@ Each directory may contain special files:|------|---------|| `.abstract.md` | L0 abstract (~100 tokens) || `.overview.md` | L1 overview (~2k tokens) |-| `.relations.json` | Related resources |+| `` | Related resources || `.meta.json` | Metadata |## Best Practicesdiff --git a/docs/en/concepts/05-storage.md b/docs/en/concepts/05-storage.mdindex 421002cab..39805cf5d 100644--- a/docs/en/concepts/05-storage.md+++ b/docs/en/concepts/05-storage.md@@ -8,7 +8,6 @@ OpenViking uses a dual-layer storage architecture that separates content storage┌─────────────────────────────────────────┐│ VikingFS (URI Abstraction) ││ URI Mapping · Hierarchical Access │-│ · Relation Management │└────────────────┬────────────────────────┘┌────────┴────────┐│ │@@ -23,7 +22,7 @@ OpenViking uses a dual-layer storage architecture that separates content storage| Layer | Responsibility | Content ||-------|----------------|---------|-| **AGFS** | Content storage | L0/L1/L2 full content, multimedia files, relations |+| **AGFS** | Content storage | L0/L1/L2 full content, multimedia files || **Vector Index** | Index storage | URIs, vectors, metadata (no file content) |### Design Benefits@@ -57,25 +56,8 @@ viking://user/skills → /local/{account_id}/user/{user_id}/skills| `mv(old, new)` | Move/rename (syncs vector URI update) || `abstract(uri)` | Read L0 abstract || `overview(uri)` | Read L1 overview |-| `relations(uri)` | Get relation list || `find(query, uri)` | Semantic search |-### Relation Management--VikingFS manages resource relations through `.relations.json`:--```python-# Create relation-viking_fs.link(- from_uri="viking://resources/docs/auth",- uris=["viking://resources/docs/security"],- reason="Related security docs"-)--# Get relations-relations = viking_fs.relations("viking://resources/docs/auth")-```-## AGFS Backend StorageAGFS provides POSIX-style file operations with multiple backend support.@@ -107,7 +89,6 @@ Each context directory follows a unified structure:viking://resources/docs/auth/├── .abstract.md # L0 abstract├── .overview.md # L1 overview-├── .relations.json # Relations table└── *.md # L2 detailed content```diff --git a/docs/en/concepts/07-retrieval.md b/docs/en/concepts/07-retrieval.mdindex 8edd4d747..6464c1b89 100644--- a/docs/en/concepts/07-retrieval.md+++ b/docs/en/concepts/07-retrieval.md@@ -127,7 +127,6 @@ while dir_queue:| `retrieval.score_propagation_alpha` | 1.0 | Child-score weight in the propagation blend; `1.0` uses only the child's own score and ignores the parent score || `MAX_CONVERGENCE_ROUNDS` | 3 | Convergence detection rounds || `GLOBAL_SEARCH_TOPK` | 10 | Global search candidates |-| `MAX_RELATIONS` | 5 | Max relations per resource |## Rerank Strategy@@ -171,7 +170,6 @@ class MatchedContext:is_leaf: bool # Whether fileabstract: str # L0 abstractscore: float # Final score- relations: List[RelatedContext] # Related contexts```### FindResultdiff --git a/docs/en/concepts/09-transaction.md b/docs/en/concepts/09-transaction.mdindex 8d53f380d..450114160 100644--- a/docs/en/concepts/09-transaction.md+++ b/docs/en/concepts/09-transaction.md@@ -219,8 +219,7 @@ Phase 2 — Memory extraction + write (persistent `session_commit` queue):1. Persist archive metadata and enqueue `SessionCommitMsg`2. Extract memories from archived messages (LLM)3. Write current message state- 4. Write relations- 5. Directly enqueue SemanticQueue+ 4. Directly enqueue SemanticQueue```**Crash recovery analysis**:diff --git a/docs/en/guides/07-operation-telemetry.md b/docs/en/guides/07-operation-telemetry.mdindex 43d54ee96..c2d0665e7 100644--- a/docs/en/guides/07-operation-telemetry.md+++ b/docs/en/guides/07-operation-telemetry.md@@ -282,7 +282,6 @@ This group appears on memory-extraction flows such as `session.commit`.| `summary.memory.extract.stages.create_memory_ms` | Time spent creating new memories || `summary.memory.extract.stages.merge_existing_ms` | Time spent merging into existing memories || `summary.memory.extract.stages.delete_existing_ms` | Time spent deleting older memories |-| `summary.memory.extract.stages.create_relations_ms` | Time spent creating used-URI relations || `summary.memory.extract.stages.flush_semantic_ms` | Time spent flushing semantic queue work |### `summary.search`diff --git a/docs/en/guides/08-encryption.md b/docs/en/guides/08-encryption.mdindex d566096e2..1263b601f 100644--- a/docs/en/guides/08-encryption.md+++ b/docs/en/guides/08-encryption.md@@ -412,7 +412,7 @@ ov backup ./backups/before-encryption.ovpackov restore ./backups/before-encryption.ovpack --on-conflict fail```-4. Verify resource, user, session, and index data before switching traffic. OVPack excludes runtime/internal state such as queues, uploads, locks, watches, and relation files; recreate or validate those separately.+4. Verify resource, user, session, and index data before switching traffic. OVPack excludes runtime/internal state such as queues, uploads, locks, and watches; recreate or validate those separately.See [OVPack Import and Export](09-ovpack.md#full-backup-and-restore) for supported scopes and restore options.diff --git a/docs/zh/agent-integrations/16-capability-reference.md b/docs/zh/agent-integrations/16-capability-reference.mdindex 6b57de5a9..8632b0c21 100644--- a/docs/zh/agent-integrations/16-capability-reference.md+++ b/docs/zh/agent-integrations/16-capability-reference.md@@ -94,7 +94,7 @@ per-harness 章节(档案卡)只写差异;所有共享事实均在本章| 4 | `list` | 列目录(函数名 `ls`,注册名显式改写为 `list`) | `recursive=False`(`:423`) || 5 | `tree` | 递归目录树 | `level_limit=3, node_limit=1000, include_abstract=False`(`:449`) || 6 | `remember` | 写长期记忆 | 内部建一次性会话 `mcp-store-<uuid12>` 并立即 `commit_async`(`:504-523`)——这是 MCP 面唯一的 commit 入口;MCP 没有显式 commit 工具 |-| 7 | `write` | 写 `viking://` 文件 | `mode=replace\|append\|create`,replace 遇 NotFound 自动降级 create;新建文件扩展名白名单 `.md .txt .json .yaml .yml .toml .py .js .ts`;可写域 `resources/user/agent`;用户根下 `skills/ peers/ privacy/ sessions/` 只读;派生文件 `.abstract.md/.overview.md/.relations.json` 不可直写(`:529`;`content_write.py:60-81`) |+| 7 | `write` | 写 `viking://` 文件 | `mode=replace\|append\|create`,replace 遇 NotFound 自动降级 create;新建文件扩展名白名单 `.md .txt .json .yaml .yml .toml .py .js .ts`;可写域 `resources/user/agent`;用户根下 `skills/ peers/ privacy/ sessions/` 只读;已存在的 `.abstract.md/.overview.md` sidecar 可改正文,但公共 API 不能创建(`:529`;`content_write.py:60-81`) || 8 | `edit` | 精确字符串替换 | `old_string` 空/0 命中/多命中且非 replace_all 均报错,且文件内容不变(`:569`) || 9 | `add_resource` | 资源摄取(远程 URL / 本地文件签名上传 / Connector) | `watch_interval` 单位为分钟(0=不 watch);本地路径分支返回签名上传 URL(TTL 默认 600s),上传后自动入库,无需二次调用(`:723-947`) || 10 | `list_watches` | 列 watch 订阅,商业版尚未支持 | scheduler 未运行时返回错误串(`:958`) |@@ -408,7 +408,7 @@ JS 系 harness 的召回逻辑均由 `recall-core.mjs` 中的三级降级链处### 3.5.1 写入边界-MCP `write` / REST `content/write` 的三道 guard(`content_write.py`):可写域限 `viking://resources|user|agent`;新建文件扩展名需符合白名单 `.md .txt .json .yaml .yml .toml .py .js .ts`;用户根下 `skills/ peers/ privacy/ sessions/` 四个托管子树只读(`_USER_MANAGED_SUBTREES`);派生文件 `.abstract.md/.overview.md/.relations.json` 不可直写。+MCP `write` / REST `content/write` 的三道 guard(`content_write.py`):可写域限 `viking://resources|user|agent`;新建文件扩展名需符合白名单 `.md .txt .json .yaml .yml .toml .py .js .ts`;用户根下 `skills/ peers/ privacy/ sessions/` 四个托管子树只读(`_USER_MANAGED_SUBTREES`)。已存在的 `.abstract.md/.overview.md` sidecar 可以改正文,但公共写入 API 不能创建它们。### 3.5.2 删除边界@@ -593,7 +593,7 @@ MCP `write` / REST `content/write` 的三道 guard(`content_write.py`):可**导入导出/快照**:`export`/`backup`/`import`/`restore`(.ovpack)|`snapshot commit/restore/show/log/diff/ignore-*`(工作区快照,前向 commit 回滚)-**隐私/关系**:`privacy categories/list/get/versions/version/activate/upsert`(`--key-<name>` 语法糖)|`relations`/`link`/`unlink`(实验性)+**隐私**:`privacy categories/list/get/versions/version/activate/upsert`(`--key-<name>` 语法糖)**状态/可观测**:`health`(healthy=false 时仍退 0)|`status`(表格模式始终退 0)|`observer {queue,vikingdb,models,retrieval,filesystem,system}`|`wait`|`task status/cancel/list`|`task watch {ls,show,rm,pause,resume,update,trigger}`|`version`(独立 3s 超时探服务端)diff --git a/docs/zh/api/01-overview.md b/docs/zh/api/01-overview.mdindex 7bb23870a..97be70b22 100644--- a/docs/zh/api/01-overview.md+++ b/docs/zh/api/01-overview.md@@ -411,7 +411,7 @@ JSON 输出 - 错误:| GET | `/api/v1/agent-evolution/experiences/trajectories` | 分页查询应用过指定 Experience 的 Trajectory || GET | `/api/v1/agent-evolution/experiences/outcomes` | 聚合应用过指定 Experience 的 Trajectory 结果分布 |-### [检索](06-retrieval.md)与[关系](13-relations.md)+### [检索](06-retrieval.md)| 方法 | 路径 | 说明 ||------|------|------|@@ -419,10 +419,6 @@ JSON 输出 - 错误:| POST | `/api/v1/search/search` | 上下文感知搜索;`mode="context"` 返回可注入的组装上下文 || POST | `/api/v1/search/grep` | 内容模式搜索 || POST | `/api/v1/search/glob` | 文件模式匹配 |-| GET | `/api/v1/relations` | 获取资源关系 |-| POST | `/api/v1/relations/link` | 创建资源链接 |-| DELETE | `/api/v1/relations/link` | 删除资源链接 |-| POST | `/api/v1/relations/build_graph` | 构建关系图 |### [Watch](15-watches.md)、[快照](11-snapshot.md)与 [OVPack](14-ovpack.md)@@ -519,7 +515,7 @@ JSON 输出 - 错误:| 分组 | 适合查找的内容 ||------|----------------|| 核心数据 | 资源、内容、文件系统、技能、会话、记忆 |-| 检索与关系 | 语义检索、代码检索、资源关系 |+| 检索 | 语义检索、代码检索 || 数据生命周期 | Watch、快照、OVPack || 运维与观测 | 系统、任务、Observer、Metrics || 身份与治理 | 管理员、隐私配置 |diff --git a/docs/zh/api/03-filesystem.md b/docs/zh/api/03-filesystem.mdindex eca71f0db..5ea4b62c4 100644--- a/docs/zh/api/03-filesystem.md+++ b/docs/zh/api/03-filesystem.md@@ -664,8 +664,6 @@ openviking mv viking://resources/old-name/ viking://resources/new-name/<a id="grep"></a><a id="glob"></a>-<a id="link"></a><a id="relations"></a><a id="unlink"></a>-<a id="export_ovpack"></a><a id="import_ovpack"></a><a id="backup_ovpack"></a><a id="restore_ovpack"></a>## 相关文档diff --git a/docs/zh/api/05-sessions.md b/docs/zh/api/05-sessions.mdindex 9ceef9439..f90e9fab8 100644--- a/docs/zh/api/05-sessions.md+++ b/docs/zh/api/05-sessions.md@@ -1536,7 +1536,6 @@ viking://user/{user_id}/sessions/{session_id}/├── .abstract.md # L0:会话概览├── .overview.md # L1:关键决策├── .meta.json # 元数据-├── .relations.json # 关联上下文├── messages.jsonl # 当前消息├── tools/ # 工具执行记录│ └── {tool_id}/diff --git a/docs/zh/api/06-retrieval.md b/docs/zh/api/06-retrieval.mdindex af0aa28eb..d983a102f 100644--- a/docs/zh/api/06-retrieval.md+++ b/docs/zh/api/06-retrieval.md@@ -104,7 +104,6 @@ class MatchedContext:category: str # 分类score: float # 相关性分数 (0-1)match_reason: str # 匹配原因- relations: List[RelatedContext] # 关联上下文```#### 3. 使用示例@@ -337,7 +336,6 @@ openviking find "红色海报风格" --image ./poster.png --uri "viking://resour"score": 0.12808319406977778,"category": "","match_reason": "",- "relations": [],"abstract": "This document is an API documentation reading plan that outlines the structure of subsequent API reference materials organized by functional module. Main sections or topics covered include resource management API, search API, file system operations, ses...","overview": null},@@ -348,7 +346,6 @@ openviking find "红色海报风格" --image ./poster.png --uri "viking://resour"score": 0.12054087276495282,"category": "","match_reason": "",- "relations": [],"abstract": "This directory contains structured API reference documentation for the OpenViking platform, compiling detailed HTTP endpoint specifications for core and extended platform capabilities. It covers functional modules including system health checks, semanti...","overview": null}@@ -565,7 +562,6 @@ openviking search "similar poster" --image ./poster.png --uri "viking://resource"score": 0.95,"category": "","match_reason": "Context-aware match: OAuth login best practices",- "relations": [],"abstract": "OAuth 2.0 best practices for login pages...","overview": "This guide covers OAuth 2.0 best practices including secure token handling, redirect URI validation, and state parameter usage..."}@@ -1054,35 +1050,6 @@ curl -X GET "http://localhost:1933/api/v1/content/read?uri=viking://resources/do-H "X-API-Key: your-key"```-### 获取关联资源--**Python SDK**--```python-import openviking as ov--client = ov.SyncHTTPClient(url="http://localhost:1933", api_key="your-key")-client.initialize()--results = client.find("OAuth implementation")--for ctx in results.resources:- print(f"Found: {ctx.uri}")-- # 获取关联资源- relations = client.relations(ctx.uri)- for rel in relations:- print(f" Related: {rel['uri']} - {rel['reason']}")-```--**HTTP API**--```bash-# 获取资源的关联关系-curl -X GET "http://localhost:1933/api/v1/relations?uri=viking://resources/docs/auth" \- -H "X-API-Key: your-key"-```-## 最佳实践### 使用具体的查询diff --git a/docs/zh/api/12-content.md b/docs/zh/api/12-content.mdindex a3fa24529..517494354 100644--- a/docs/zh/api/12-content.md+++ b/docs/zh/api/12-content.md@@ -226,7 +226,7 @@ openviking read viking://resources/docs/api.md- `replace` 和 `append` 要求文件已存在;`create` 仅用于创建新文件,目标路径已存在时返回 `409 Conflict`。目录始终会被拒绝。- `create` 只允许以下文本类扩展名:`.md`、`.txt`、`.json`、`.yaml`、`.yml`、`.toml`、`.py`、`.js`、`.ts`。父目录会自动创建。-- `.relations.json` 不允许直接写入。已存在的 `.abstract.md` / `.overview.md` 可以修改正文,但不能通过公共 API 创建;只提交正文时会保留现有 OKF metadata,提交完整 OKF 时 metadata 必须与存量值一致。未知 metadata 字段会静默丢弃。sidecar 正文写入只重建该目录实际存在的 L0/L1 向量,不触发语义重新生成。+- 已存在的 `.abstract.md` / `.overview.md` 可以修改正文,但不能通过公共 API 创建;只提交正文时会保留现有 OKF metadata,提交完整 OKF 时 metadata 必须与存量值一致。未知 metadata 字段会静默丢弃。sidecar 正文写入只重建该目录实际存在的 L0/L1 向量,不触发语义重新生成。- 文件内容会在 API 返回前完成更新;`wait` 只控制是否等待语义/向量刷新完成。- 公共 API 已不再接受 `regenerate_semantics` 或 `revectorize`;写入后一定会自动刷新相关语义与向量。diff --git a/docs/zh/api/13-relations.md b/docs/zh/api/13-relations.mddeleted file mode 100644index 6ae56f5ad..000000000--- a/docs/zh/api/13-relations.md+++ /dev/null@@ -1,282 +0,0 @@-# 关系--关系 API 用于创建、读取和删除 Viking URI 之间的显式关联。--## API 参考--### link()--创建资源之间的关联。--**参数**--| 参数 | 类型 | 必填 | 默认值 | 说明 |-|------|------|------|--------|------|-| from_uri | str | 是 | - | 源 URI |-| to_uris | str 或 List[str] | 是 | - | 目标 URI |-| reason | str | 否 | "" | 关联原因 |---**Python SDK**--```python-# 单个关联-client.link(- "viking://resources/docs/auth/",- "viking://resources/docs/security/",- reason="Security best practices for authentication"-)--# 多个关联-client.link(- "viking://resources/docs/api/",- [- "viking://resources/docs/auth/",- "viking://resources/docs/errors/"- ],- reason="Related documentation"-)-```--**TypeScript SDK**--```typescript-await client.link(- "viking://resources/docs/api/",- [- "viking://resources/docs/auth/",- "viking://resources/docs/errors/",- ],- "Related documentation",-);-```--**HTTP API**--```-POST /api/v1/relations/link-```--```bash-# 单个关联-curl -X POST http://localhost:1933/api/v1/relations/link \- -H "Content-Type: application/json" \- -H "X-API-Key: your-key" \- -d '{- "from_uri": "viking://resources/docs/auth/",- "to_uris": "viking://resources/docs/security/",- "reason": "Security best practices for authentication"- }'--# 多个关联-curl -X POST http://localhost:1933/api/v1/relations/link \- -H "Content-Type: application/json" \- -H "X-API-Key: your-key" \- -d '{- "from_uri": "viking://resources/docs/api/",- "to_uris": ["viking://resources/docs/auth/", "viking://resources/docs/errors/"],- "reason": "Related documentation"- }'-```--**CLI**--```bash-openviking link viking://resources/docs/auth/ viking://resources/docs/security/ --reason "Security best practices"-```---**响应**--```json-{- "status": "ok",- "result": {- "from": "viking://resources/docs/auth/",- "to": "viking://resources/docs/security/"- },- "time": 0.1-}-```-------### relations()--获取资源的关联关系。--**参数**--| 参数 | 类型 | 必填 | 默认值 | 说明 |-|------|------|------|--------|------|-| uri | str | 是 | - | Viking URI |---**Python SDK**--```python-relations = client.relations("viking://resources/docs/auth/")-for rel in relations:- print(f"Related: {rel['uri']}")- print(f" Reason: {rel['reason']}")-```--**TypeScript SDK**--```typescript-const relations = await client.relations("viking://resources/docs/auth/");-console.log(relations);-```--**HTTP API**--```-GET /api/v1/relations?uri={uri}-```--```bash-curl -X GET "http://localhost:1933/api/v1/relations?uri=viking://resources/docs/auth/" \- -H "X-API-Key: your-key"-```--**CLI**--```bash-openviking relations viking://resources/docs/auth/-```---**响应**--```json-{- "status": "ok",- "result": [- {"uri": "viking://resources/docs/security/", "reason": "Security best practices"},- {"uri": "viking://resources/docs/errors/", "reason": "Error handling"}- ],- "time": 0.1-}-```-------### unlink()--移除关联关系。--**参数**--| 参数 | 类型 | 必填 | 默认值 | 说明 |-|------|------|------|--------|------|-| from_uri | str | 是 | - | 源 URI |-| to_uri | str | 是 | - | 要取消关联的目标 URI |---**Python SDK**--```python-client.unlink(- "viking://resources/docs/auth/",- "viking://resources/docs/security/"-)-```--**TypeScript SDK**--```typescript-await client.unlink(- "viking://resources/docs/auth/",- "viking://resources/docs/security/",-);-```--**HTTP API**--```-DELETE /api/v1/relations/link-```--```bash-curl -X DELETE http://localhost:1933/api/v1/relations/link \- -H "Content-Type: application/json" \- -H "X-API-Key: your-key" \- -d '{- "from_uri": "viking://resources/docs/auth/",- "to_uri": "viking://resources/docs/security/"- }'-```--**CLI**--```bash-openviking unlink viking://resources/docs/auth/ viking://resources/docs/security/-```---**响应**--```json-{- "status": "ok",- "result": {- "from": "viking://resources/docs/auth/",- "to": "viking://resources/docs/security/"- },- "time": 0.1-}-```-------### build_graph()--从多个记忆根目录生成一个自包含的 HTML 关系图,并把结果写入指定 Viking URI。--| 参数 | 类型 | 必填 | 说明 |-|------|------|------|------|-| `space_uris` | string[] | 是 | 要合并的记忆根目录 |-| `output_uri` | string | 是 | 输出 HTML 文件的 Viking URI |--**HTTP API**--```http-POST /api/v1/relations/build_graph-Content-Type: application/json-```--```bash-curl -X POST http://localhost:1933/api/v1/relations/build_graph \- -H "Content-Type: application/json" \- -H "X-API-Key: your-key" \- -d '{- "space_uris":[- "viking://user/default/memories",- "viking://user/default/peers/project-a/memories"- ],- "output_uri":"viking://user/default/memories/.graph.html"- }'-```--**响应**--```json-{- "status": "ok",- "result": {- "graph_uri": "viking://user/default/memories/.graph.html"- }-}-```--`graph_uri` 是已写入的自包含 HTML 文件 URI,可通过内容或文件系统 API 读取。--该端点当前没有公共 SDK 或 CLI 封装,因此本节只展示 HTTP Tab。-------## 相关文档--- [检索](06-retrieval.md) - 检索并使用关联内容-- [文件系统](03-filesystem.md) - 管理关联目标-- [记忆](16-memory.md) - 记忆命名空间和类型diff --git a/docs/zh/api/20-webdav.md b/docs/zh/api/20-webdav.mdindex 32e2fe835..44df8f59d 100644--- a/docs/zh/api/20-webdav.md+++ b/docs/zh/api/20-webdav.md@@ -17,7 +17,7 @@ Phase 1 有意把范围控制得比较小:- 仅开放 `resources` 命名空间,不暴露 memories、skills、sessions 等其他空间。- 以文本写入为主,当前 `PUT` 只接受 UTF-8 文本内容。- 只实现一小部分 WebDAV 方法:`OPTIONS`、`PROPFIND`、`GET`、`HEAD`、`PUT`、`DELETE`、`MKCOL`、`MOVE`。-- 语义侧边文件和系统内部文件保持内部可见。`.abstract.md`、`.overview.md`、`.relations.json`、`.path.ovlock`、`.redirect.json`、`.sync_log.json` 这些派生或内部文件不会出现在 WebDAV 列表中,也不能被直接访问。+- 语义侧边文件和系统内部文件保持内部可见。`.abstract.md`、`.overview.md`、`.path.ovlock`、`.redirect.json`、`.sync_log.json` 这些派生或内部文件不会出现在 WebDAV 列表中,也不能被直接访问。行为说明:diff --git a/docs/zh/concepts/01-architecture.md b/docs/zh/concepts/01-architecture.mdindex 6ee69a9ed..2f2b9feb0 100644--- a/docs/zh/concepts/01-architecture.md+++ b/docs/zh/concepts/01-architecture.md@@ -53,7 +53,7 @@ OpenViking 是为 AI Agent 设计的上下文数据库,将所有上下文(Me| 模块 | 职责 | 关键能力 ||------|------|---------|| **Client** | 统一入口 | 提供所有操作接口,委托给 Service 层 |-| **Service** | 业务逻辑 | FSService、SearchService、SessionService、ResourceService、RelationService、PackService、DebugService |+| **Service** | 业务逻辑 | FSService、SearchService、SessionService、ResourceService、PackService、DebugService || **Retrieve** | 上下文检索 | 意图分析(IntentAnalyzer)、层级检索(HierarchicalRetriever)、Rerank 精排 || **Session** | 会话管理 | 消息记录、使用追踪、会话压缩、记忆提交 || **Parse** | 上下文提取 | 文档解析(PDF/MD/HTML)、树构建(TreeBuilder)、异步语义生成 |@@ -70,7 +70,6 @@ Service 层将业务逻辑与传输层解耦,便于 HTTP Server 和 CLI 复用| **SearchService** | 语义搜索 | search, find || **SessionService** | 会话管理 | session, sessions, commit, delete || **ResourceService** | 资源导入 | add_resource, add_skill, wait_processed |-| **RelationService** | 关联管理 | relations, link, unlink || **PackService** | 导入导出、备份恢复 | export_ovpack, import_ovpack, backup_ovpack, restore_ovpack || **DebugService** | 调试服务 | observer (ObserverService) |diff --git a/docs/zh/concepts/03-context-layers.md b/docs/zh/concepts/03-context-layers.mdindex 06a5aefa4..1b7d518cf 100644--- a/docs/zh/concepts/03-context-layers.md+++ b/docs/zh/concepts/03-context-layers.md@@ -68,10 +68,9 @@ content = client.read("viking://resources/docs/auth/oauth.md")viking://resources/docs/auth/├── .abstract.md # L0,隐藏的目录级 sidecar├── .overview.md # L1,隐藏的目录级 sidecar-├── .relations.json # 关系数据-├── oauth.md # L2-├── jwt.md # L2-└── api-keys.md # L2+├── oauth.md # L2,完整内容+├── jwt.md # L2,完整内容+└── api-keys.md # L2,完整内容```普通 `ls` 默认隐藏 `.abstract.md` 和 `.overview.md`。它们不一定同时存在;不要依赖“每个目录始终具有两个 sidecar”的假设。diff --git a/docs/zh/concepts/04-viking-uri.md b/docs/zh/concepts/04-viking-uri.mdindex 715e9bb44..704bd99ac 100644--- a/docs/zh/concepts/04-viking-uri.md+++ b/docs/zh/concepts/04-viking-uri.md@@ -323,7 +323,7 @@ overview = await client.overview("viking://resources/docs/")|------|------|| `.abstract.md` | L0 摘要(~100 tokens) || `.overview.md` | L1 概览(~2k tokens) |-| `.relations.json` | 相关资源 |+| `` | 相关资源 || `.meta.json` | 元数据 |## 最佳实践diff --git a/docs/zh/concepts/05-storage.md b/docs/zh/concepts/05-storage.mdindex 5af13966b..8dcf96e24 100644--- a/docs/zh/concepts/05-storage.md+++ b/docs/zh/concepts/05-storage.md@@ -7,7 +7,7 @@ OpenViking 采用双层存储架构,分离内容存储和索引存储。```┌─────────────────────────────────────────┐│ VikingFS (URI 抽象层) │-│ URI 映射 · 层级访问 · 关联管理 │+│ URI 映射 · 层级访问 │└────────────────┬────────────────────────┘┌────────┴────────┐│ │@@ -21,7 +21,7 @@ OpenViking 采用双层存储架构,分离内容存储和索引存储。| 存储层 | 职责 | 存储内容 ||--------|------|----------|-| **AGFS** | 内容存储 | L0/L1/L2 完整内容、多媒体文件、关联关系 |+| **AGFS** | 内容存储 | L0/L1/L2 完整内容、多媒体文件 || **向量库** | 索引存储 | URI、向量、元数据(不存文件内容) |### 设计优势@@ -55,25 +55,8 @@ viking://user/skills → /local/{account_id}/user/{user_id}/skills| `mv(old, new)` | 移动/重命名(同步更新向量 URI) || `abstract(uri)` | 读取 L0 摘要 || `overview(uri)` | 读取 L1 概览 |-| `relations(uri)` | 获取关联列表 || `find(query, uri)` | 语义搜索 |-### 关联管理--VikingFS 通过 `.relations.json` 管理资源间的关联:--```python-# 创建关联-viking_fs.link(- from_uri="viking://resources/docs/auth",- uris=["viking://resources/docs/security"],- reason="相关安全文档"-)--# 获取关联-relations = viking_fs.relations("viking://resources/docs/auth")-```-## AGFS 底层存储AGFS 提供 POSIX 风格的文件操作,支持多种后端。@@ -105,7 +88,6 @@ AGFS 提供 POSIX 风格的文件操作,支持多种后端。viking://resources/docs/auth/├── .abstract.md # L0 摘要├── .overview.md # L1 概览-├── .relations.json # 关联└── *.md # L2 详细内容```diff --git a/docs/zh/concepts/07-retrieval.md b/docs/zh/concepts/07-retrieval.mdindex c85c89ff7..d33b4745c 100644--- a/docs/zh/concepts/07-retrieval.md+++ b/docs/zh/concepts/07-retrieval.md@@ -127,7 +127,6 @@ while dir_queue:| `retrieval.score_propagation_alpha` | 1.0 | 分数传播混合中子节点自身分数的权重;`1.0` 表示仅使用子节点自身分数,忽略父节点分数 || `MAX_CONVERGENCE_ROUNDS` | 3 | 收敛检测轮数 || `GLOBAL_SEARCH_TOPK` | 10 | 全局搜索候选数 |-| `MAX_RELATIONS` | 5 | 每资源最大关联数 |## Rerank 策略@@ -171,7 +170,6 @@ class MatchedContext:is_leaf: bool # 是否文件abstract: str # L0 摘要score: float # 最终分数- relations: List[RelatedContext] # 关联上下文```### FindResultdiff --git a/docs/zh/concepts/09-transaction.md b/docs/zh/concepts/09-transaction.mdindex 547044a56..15e4d5b12 100644--- a/docs/zh/concepts/09-transaction.md+++ b/docs/zh/concepts/09-transaction.md@@ -213,8 +213,7 @@ Phase 2 — 记忆提取 + 写入(持久化 `session_commit` 队列):1. 持久化 archive 元数据并 enqueue `SessionCommitMsg`2. 从归档消息提取 memories(LLM)3. 写当前消息状态- 4. 写 relations- 5. 直接 enqueue SemanticQueue+ 4. 直接 enqueue SemanticQueue```**崩溃恢复分析**:diff --git a/docs/zh/guides/07-operation-telemetry.md b/docs/zh/guides/07-operation-telemetry.mdindex 1666bb0ef..7cae5e465 100644--- a/docs/zh/guides/07-operation-telemetry.md+++ b/docs/zh/guides/07-operation-telemetry.md@@ -276,7 +276,6 @@ admission,所以其 `gpu_gate_queue` 为零;worker 侧等待仍计入 `batch| `summary.memory.extract.stages.create_memory_ms` | 创建新 memory 的耗时 || `summary.memory.extract.stages.merge_existing_ms` | 合并到已有 memory 的耗时 || `summary.memory.extract.stages.delete_existing_ms` | 删除旧 memory 的耗时 |-| `summary.memory.extract.stages.create_relations_ms` | 创建 used-uri relations 的耗时 || `summary.memory.extract.stages.flush_semantic_ms` | flush semantic queue 的耗时 |### `summary.search`diff --git a/examples/claude-code-memory-plugin/skills/ov-experience-memory/SKILL.md b/examples/claude-code-memory-plugin/skills/ov-experience-memory/SKILL.mdindex 787891d4c..9472bff01 100644--- a/examples/claude-code-memory-plugin/skills/ov-experience-memory/SKILL.md+++ b/examples/claude-code-memory-plugin/skills/ov-experience-memory/SKILL.md@@ -62,8 +62,7 @@ context or deeper intent analysis is useful.do not broaden the search to unrelated memory directories.5. Select only the one to three Experience files likely to change execution.Require an exact file URI without a query or fragment. Ignore directories,- unrelated memory types, and sidecars such as `.abstract.md`, `.overview.md`,- and `.relations.json`.+ unrelated memory types, and sidecars such as `.abstract.md` and `.overview.md`.6. Read every selected canonical `viking://.../memories/experiences/...` URIwith the runtime's OpenViking read tool. Search abstracts help selection butare not a substitute for reading the Experience body.diff --git a/examples/codex-memory-plugin/skills/ov-experience-memory/SKILL.md b/examples/codex-memory-plugin/skills/ov-experience-memory/SKILL.mdindex 787891d4c..9472bff01 100644--- a/examples/codex-memory-plugin/skills/ov-experience-memory/SKILL.md+++ b/examples/codex-memory-plugin/skills/ov-experience-memory/SKILL.md@@ -62,8 +62,7 @@ context or deeper intent analysis is useful.do not broaden the search to unrelated memory directories.5. Select only the one to three Experience files likely to change execution.Require an exact file URI without a query or fragment. Ignore directories,- unrelated memory types, and sidecars such as `.abstract.md`, `.overview.md`,- and `.relations.json`.+ unrelated memory types, and sidecars such as `.abstract.md` and `.overview.md`.6. Read every selected canonical `viking://.../memories/experiences/...` URIwith the runtime's OpenViking read tool. Search abstracts help selection butare not a substitute for reading the Experience body.diff --git a/examples/openclaw-plugin/docs/oc-resource-skill-import-design.md b/examples/openclaw-plugin/docs/oc-resource-skill-import-design.mdindex deec1d50f..36578462a 100644--- a/examples/openclaw-plugin/docs/oc-resource-skill-import-design.md+++ b/examples/openclaw-plugin/docs/oc-resource-skill-import-design.md@@ -371,10 +371,6 @@ v1 建议保持简洁:score: number;category: string;match_reason: string;- relations: Array<{- uri: string;- abstract: string;- }>;abstract: string;overview?: string | null;}@@ -429,7 +425,6 @@ Skillsscore: 0.82,category: "",match_reason: "...",- relations: [],abstract: "OpenViking installation guide and setup commands...",overview: "..."}@@ -442,7 +437,6 @@ Skillsscore: 0.69,category: "",match_reason: "...",- relations: [],abstract: "Install and operate OpenViking memory integration...",overview: "..."}diff --git a/examples/openclaw-plugin/docs/openviking-openclaw-plugin-guide.md b/examples/openclaw-plugin/docs/openviking-openclaw-plugin-guide.mdindex ad75c3b0f..8ee126179 100644--- a/examples/openclaw-plugin/docs/openviking-openclaw-plugin-guide.md+++ b/examples/openclaw-plugin/docs/openviking-openclaw-plugin-guide.md@@ -260,7 +260,7 @@ transformContext auto recall 流程:| API | 官方用途 | 当前插件映射 | 关键参数 / 返回 || --- | --- | --- | --- |-| `POST /api/v1/search/find` | 快速语义检索,不依赖 session context | 自动召回、`memory_recall`、`ov_search`、`memory_forget` | body: `query`、`target_uri`、`limit`、`score_threshold`;返回 `memories[]`、`resources[]`、`skills[]`,每项含 `uri`、`level`、`abstract`、`score`、`category`、`relations`:`client.ts:428` |+| `POST /api/v1/search/find` | 快速语义检索,不依赖 session context | 自动召回、`memory_recall`、`ov_search`、`memory_forget` | body: `query`、`target_uri`、`limit`、`score_threshold`;返回 `memories[]`、`resources[]`、`skills[]`,每项含 `uri`、`level`、`abstract`、`score`、`category`:`client.ts:428` || `POST /api/v1/search/search` | 带 session context 和 intent analysis 的检索 | 暂未使用 | body 可带 `session_id`;返回 `query_plan` / `query_results`。当前插件为了稳定和低延迟统一用 `find()`,session context 由插件自己组装 || `POST /api/v1/search/grep` | 正则/关键词内容搜索 | `ov_archive_search` | body: `uri`、`pattern`、`case_insensitive`、`node_limit`;插件限定在 `viking://session/{id}/history` 内搜 archive:`client.ts:897` || `POST /api/v1/search/glob` | glob 文件匹配 | 暂未封装 | body: `pattern`、`uri`、`node_limit`;适合按 `**/*.md`、`src/**/*.ts` 找资源路径 |@@ -273,14 +273,11 @@ transformContext auto recall 流程:| `GET /api/v1/fs/tree?uri=...` | 递归树 | 暂未封装 | 支持 `level_limit`、`node_limit`,返回 flat array + `rel_path` || `GET /api/v1/fs/stat?uri=...` | 查元信息/是否存在 | 暂未封装 | 返回 `name`、`size`、`mode`、`isDir`、`uri`、`mtime`、`ctime` || `POST /api/v1/fs/mkdir` | 创建目录 | 暂未封装 | body: `uri`,父目录自动创建 |-| `POST /api/v1/fs/mv` | 移动/重命名 | 暂未封装 | body: `from_uri`、`to_uri`,会保留元数据和 relations |+| `POST /api/v1/fs/mv` | 移动/重命名 | 暂未封装 | body: `from_uri`、`to_uri`,会保留元数据 || `DELETE /api/v1/fs?uri=...&recursive=...` | 删除资源/目录 | `memory_forget`、`deleteUri` | 插件默认 `recursive=false`,用于删除具体 memory URI:`client.ts:934` || `GET /api/v1/content/abstract?uri=...` | 读取 L0 abstract | 暂未封装 | 约 100 token 摘要,适合快速判断目录/文件主题 || `GET /api/v1/content/overview?uri=...` | 读取 L1 overview | 暂未封装 | 目录级结构化概览,适合介于 abstract 和 full content 之间的排查 || `GET /api/v1/content/read?uri=...&offset=...&limit=...` | 读取 L2 full content | 自动召回读取 level=2 命中内容、`ov_read` | `ov_read` 暴露 `uri` 参数,未暴露 `offset/limit`:`client.ts:470` |-| `GET /api/v1/relations?uri=...` | 查看资源关系 | 暂未封装 | 返回 `from_uri`、`to_uri`、`reason`、`created_at` |-| `POST /api/v1/relations/link` | 创建有向关系 | 暂未封装 | body: `from_uri`、`to_uri`/`uris`、`reason` |-| `POST /api/v1/relations/unlink` | 删除有向关系 | 暂未封装 | body: `from_uri`、`to_uri`;幂等 |#### 6.2.4 Resources / Skills Importdiff --git a/examples/openclaw-plugin/skills/ov-experience-memory/SKILL.md b/examples/openclaw-plugin/skills/ov-experience-memory/SKILL.mdindex 787891d4c..9472bff01 100644--- a/examples/openclaw-plugin/skills/ov-experience-memory/SKILL.md+++ b/examples/openclaw-plugin/skills/ov-experience-memory/SKILL.md@@ -62,8 +62,7 @@ context or deeper intent analysis is useful.do not broaden the search to unrelated memory directories.5. Select only the one to three Experience files likely to change execution.Require an exact file URI without a query or fragment. Ignore directories,- unrelated memory types, and sidecars such as `.abstract.md`, `.overview.md`,- and `.relations.json`.+ unrelated memory types, and sidecars such as `.abstract.md` and `.overview.md`.6. Read every selected canonical `viking://.../memories/experiences/...` URIwith the runtime's OpenViking read tool. Search abstracts help selection butare not a substitute for reading the Experience body.diff --git a/examples/openclaw-plugin/tests/ut/tools.test.ts b/examples/openclaw-plugin/tests/ut/tools.test.tsindex c9789e249..31d4f99b5 100644--- a/examples/openclaw-plugin/tests/ut/tools.test.ts+++ b/examples/openclaw-plugin/tests/ut/tools.test.ts@@ -909,7 +909,6 @@ describe("Tool: ov_search (behavioral)", () => {score: 0.82,category: "",match_reason: "",- relations: [],abstract: "OpenViking install guide",overview: null,},@@ -929,7 +928,6 @@ describe("Tool: ov_search (behavioral)", () => {score: 0.7,category: "",match_reason: "",- relations: [],abstract: "Install OpenViking memory integration",overview: null,},@@ -984,7 +982,6 @@ describe("Tool: ov_search (behavioral)", () => {score: 0.82,category: "",match_reason: "",- relations: [],abstract: "OpenViking install guide",overview: null,},@@ -1021,7 +1018,6 @@ describe("Tool: ov_search (behavioral)", () => {score: 0.91,category: "preferences",match_reason: "",- relations: [],abstract: "User prefers dark theme",overview: null,},@@ -1204,7 +1200,6 @@ describe("Tool: ov_search (behavioral)", () => {score: 0.92,category: "",match_reason: "",- relations: [],abstract: "OpenCompass evaluation details",overview: null,},@@ -1245,7 +1240,6 @@ describe("Tool: ov_search (behavioral)", () => {score: 0.88,category: "",match_reason: "",- relations: [],abstract: "Runtime default search result",overview: null,},diff --git a/examples/skills/ov-experience-memory/SKILL.md b/examples/skills/ov-experience-memory/SKILL.mdindex 787891d4c..9472bff01 100644--- a/examples/skills/ov-experience-memory/SKILL.md+++ b/examples/skills/ov-experience-memory/SKILL.md@@ -62,8 +62,7 @@ context or deeper intent analysis is useful.do not broaden the search to unrelated memory directories.5. Select only the one to three Experience files likely to change execution.Require an exact file URI without a query or fragment. Ignore directories,- unrelated memory types, and sidecars such as `.abstract.md`, `.overview.md`,- and `.relations.json`.+ unrelated memory types, and sidecars such as `.abstract.md` and `.overview.md`.6. Read every selected canonical `viking://.../memories/experiences/...` URIwith the runtime's OpenViking read tool. Search abstracts help selection butare not a substitute for reading the Experience body.diff --git a/examples/skills/ov-resources/SKILL.md b/examples/skills/ov-resources/SKILL.mdindex 8791487b1..d6d09dd1c 100644--- a/examples/skills/ov-resources/SKILL.md+++ b/examples/skills/ov-resources/SKILL.md@@ -19,14 +19,13 @@ Guide an agent to correctly invoke resource and filesystem commands without gues- User explicitly requests resource operations: `ov add-resource`, `ov task watch`, `ov export`, `ov import`, `ov backup`, `ov restore`.- User asks to browse, read, write, create, move, or delete files under `viking://resources/`.- User asks to search for context: `ov find`, `ov search`, `ov grep`, `ov glob`.-- User asks to create or manage relations between resources (`ov link`, `ov relations`, `ov unlink`).- Agent needs to list, inspect, or search the resource tree to find context.## Inputs| Name | Required | Description ||---|---|---|-| `subcommand` | yes | Resource command: `add-resource`, `task watch`, `export`, `import`, `backup`, `restore`, filesystem command: `ls`, `tree`, `read`, `write`, `mkdir`, `rm`, `mv`, `grep`, `glob`, `link`, `relations`, `unlink`, or search command: `find`, `search` |+| `subcommand` | yes | Resource command: `add-resource`, `task watch`, `export`, `import`, `backup`, `restore`, filesystem command: `ls`, `tree`, `read`, `write`, `mkdir`, `rm`, `mv`, `grep`, `glob`, or search command: `find`, `search` || `target` | conditional | File path, URL, Viking URI, or query string || `flags` | no | Command-specific flags like `--wait`, `--to`, `--parent`, `--recursive`, `--watch-interval` |@@ -66,7 +65,7 @@ Guide an agent to correctly invoke resource and filesystem commands without gues## Runtime Resources- `docs/add-resource.md` — detailed resource ingestion docs, source types, and async processing.-- `docs/filesystem.md` — filesystem operations reference (ls, tree, read, write, mkdir, rm, mv, grep, glob, link, relations, unlink).+- `docs/filesystem.md` — filesystem operations reference (ls, tree, read, write, mkdir, rm, mv, grep, glob).- `docs/search.md` — semantic search (`ov find`, `ov search`) and search combination strategies.- `docs/watch-management.md` — watch task lifecycle (create, pause, resume, trigger, update, remove).- `docs/ovpack.md` — ovpack export/import/backup/restore reference.diff --git a/examples/skills/ov-resources/docs/filesystem.md b/examples/skills/ov-resources/docs/filesystem.mdindex 9007f128a..72e3161a6 100644--- a/examples/skills/ov-resources/docs/filesystem.md+++ b/examples/skills/ov-resources/docs/filesystem.md@@ -81,7 +81,7 @@ Modes:`--wait` blocks until semantic/vector refresh completes. Parent directories are auto-created for `create`.-Derived semantic files cannot be written directly: `.abstract.md`, `.overview.md`, `.relations.json`.+Derived semantic files cannot be written directly: `.abstract.md`, `.overview.md`.### `ov mkdir` — Create a directory@@ -133,30 +133,6 @@ ov glob "**/*.py" --uri viking://resources/Parameters: `pattern` (required), `--uri`, `--node-limit`.-## Relation Operations--### `ov link` — Create relations--```bash-# Single link-ov link viking://resources/docs/auth/ viking://resources/docs/security/ \- --reason "Security best practices"--# Multiple links (via API/SDK)-```--### `ov relations` — List relations--```bash-ov relations viking://resources/docs/auth/-```--### `ov unlink` — Remove a relation--```bash-ov unlink viking://resources/docs/auth/ viking://resources/docs/security/-```-## WebDAVOpenViking exposes a minimal WebDAV adapter at `/webdav/resources`:diff --git a/examples/skills/ov-resources/docs/search.md b/examples/skills/ov-resources/docs/search.mdindex 1671f3cd8..f8ab44737 100644--- a/examples/skills/ov-resources/docs/search.md+++ b/examples/skills/ov-resources/docs/search.md@@ -84,8 +84,7 @@ Results are grouped by `context_type`:"score": 0.95,"abstract": "OAuth 2.0 best practices...","overview": "This guide covers...",- "match_reason": "Context-aware match: OAuth login best practices",- "relations": []+ "match_reason": "Context-aware match: OAuth login best practices"}],"skills": [],diff --git a/examples/skills/ov-resources/examples/commands.md b/examples/skills/ov-resources/examples/commands.mdindex 4c3a71589..0fe931efe 100644--- a/examples/skills/ov-resources/examples/commands.md+++ b/examples/skills/ov-resources/examples/commands.md@@ -178,17 +178,3 @@ ov find "authentication" --uri "viking://resources/project-A"ov overview viking://resources/project-A/backendov read viking://resources/project-A/backend/auth.md```--## Relations--```bash-# Link resources-ov link viking://resources/docs/auth/ viking://resources/docs/security/ \- --reason "Security best practices"--# List relations-ov relations viking://resources/docs/auth/--# Unlink-ov unlink viking://resources/docs/auth/ viking://resources/docs/security/-```diff --git a/integrations/langchain/src/langchain_openviking/client.py b/integrations/langchain/src/langchain_openviking/client.pyindex 6ee714f6c..ce3e09760 100644--- a/integrations/langchain/src/langchain_openviking/client.py+++ b/integrations/langchain/src/langchain_openviking/client.py@@ -32,7 +32,6 @@ _RETRYABLE_READ_METHODS = {"ls","overview","read",- "relations","search","session_exists","stat",diff --git a/openviking/eval/datasets/local_doc_example_glm5.jsonl b/openviking/eval/datasets/local_doc_example_glm5.jsonlindex 3e1eb897b..e0dfb3185 100644--- a/openviking/eval/datasets/local_doc_example_glm5.jsonl+++ b/openviking/eval/datasets/local_doc_example_glm5.jsonl@@ -1,18 +1,18 @@{"question": "OpenViking 的核心定位是什么?与传统向量数据库(如 Milvus、Pinecone)有何本质区别?", "files": ["OpenViking/README.md", "OpenViking/docs/en/concepts/01-architecture.md"], "answer": "OpenViking 是一个专门为 AI Agent 设计的开源上下文数据库(Context Database)。与传统向量数据库的本质区别在于:\n\n1. **设计范式不同**:OpenViking 采用\"文件系统范式\"统一管理记忆、资源和技能,而传统向量数据库仅提供扁平的向量存储。\n\n2. **解决的问题不同**:OpenViking 解决 Agent 开发中的五大挑战:上下文碎片化、上下文需求激增、检索效果差、上下文不可观察、记忆迭代受限。传统向量数据库主要解决向量检索问题。\n\n3. **功能特性不同**:\n - 分层上下文加载(L0/L1/L2三层结构)显著降低 Token 消耗\n - 目录递归检索结合目录定位与语义搜索\n - 可视化检索轨迹,支持调试\n - 自动会话管理,实现上下文自我迭代\n\n4. **架构层次**:OpenViking 包含 Client、Service、Retrieve、Session、Parse、Compressor、Storage 等多层架构,而传统向量数据库主要是存储和检索层。"}{"question": "分层记忆设计(L0 抽象层、L1 概述层、L2 内容层)的设计初衷是什么?三层之间如何保持语义一致性?", "files": ["OpenViking/docs/en/concepts/03-context-layers.md"], "answer": "分层记忆设计的初衷是平衡检索效率与内容完整性。\n\n**三层结构说明**:\n- **L0(Abstract)**:最简洁的内容表示,约100 tokens,用于向量检索和快速过滤,存储在 `.abstract.md` 文件中。\n- **L1(Overview)**:约2k tokens的综合摘要,包含导航指引,用于重排序和理解访问方式,存储在 `.overview.md` 文件中。\n- **L2(Detail)**:完整原始内容,无 token 限制,仅在确认需要时加载。\n\n**语义一致性保证**:\n1. **生成机制**:SemanticProcessor 采用自底向上的方式遍历目录,为每个节点生成 L0/L1,确保层级间的语义关联。\n2. **统一来源**:所有层级都源自同一份原始内容,L0 是 L1 的精炼,L1 是 L2 的结构化摘要。\n3. **渐进式加载**:检索时先通过 L0 定位,再通过 L1 确认相关性,最后按需加载 L2,保证语义传递。\n\n**API 支持**:\n```python\nabstract = client.abstract(\"viking://resources/docs/auth\") # L0\noverview = client.overview(\"viking://resources/docs/auth\") # L1\ncontent = client.read(\"viking://resources/docs/auth/oauth.md\") # L2\n```"}{"question": "OpenViking 的内置记忆类型如何划分?在实际应用中如何自动提取?", "files": ["OpenViking/docs/en/concepts/02-context-types.md", "OpenViking/openviking/session/compressor_v2.py"], "answer": "OpenViking 的记忆类型由 MemoryType Schema 定义,并可通过自定义模板扩展或覆盖。当前内置类型按用途可理解为三组:\n\n**用户与环境理解**:\n- **profile**:用户基本信息,存储在 `user/memories/profile.md`\n- **preferences**:用户偏好,存储在 `user/memories/preferences/`\n- **entities**:人物、项目、组织等实体知识,存储在 `user/memories/entities/`\n- **events**:决策、里程碑等事件记录,存储在 `user/memories/events/`\n\n**助手身份与连续性**:\n- **identity**:助手身份与自我介绍,存储在 `user/memories/identity.md`\n- **soul**:助手原则、边界、风格和连续性,存储在 `user/memories/soul.md`\n\n**任务执行与学习**:\n- **cases**:可训练、可评估的任务案例\n- **trajectories**:可复用的任务执行轨迹\n- **experiences**:从执行结果提炼的可复用经验\n- **tools**:工具使用经验与最佳实践\n- **skills**:技能执行经验与工作流策略\n\n这些类型默认存储在 `user/memories/` 的对应文件或子目录中;短路径会按当前身份解析到 `viking://user/{user_id}/...`,支持的类型也可按记忆策略写入相关 Peer 空间。\n\n**自动提取机制**:\n1. 提交 Session 后格式化会话消息\n2. 根据当前记忆策略选择已启用的 MemoryType Schema\n3. 调用 LLM 生成结构化 memory operations\n4. 按各 Schema 的目录、文件名和合并规则写入并建立索引"}-{"question": "OpenViking 如何支持多 Agent 协作场景?不同 Agent 之间的记忆如何隔离与共享?", "files": ["OpenViking/docs/en/concepts/02-context-types.md", "OpenViking/docs/en/concepts/01-architecture.md"], "answer": "OpenViking 通过 URI 命名空间和作用域设计支持多 Agent 协作。\n\n**记忆隔离机制**:\n1. **URI 命名空间**:\n - `viking://user/memories/` - 用户级记忆\n - `viking://user/{user_id}/peers/{peer_id}/memories/` - Peer 级记忆\n - `viking://resources/` - 共享资源\n - `viking://user/skills/` - User 技能\n\n2. **作用域划分**:\n - **User Scope**:用户相关的 profile、preferences、entities、events\n - **Peer/Execution Scope**:Agent 学习到的 trajectories、experiences\n - **Resources Scope**:共享的知识库\n\n**记忆共享机制**:\n1. **资源层共享**:所有 Agent 可以访问 `viking://resources/` 下的共享知识库。\n2. **用户记忆共享**:同一用户的不同 Agent 可以共享 `viking://user/memories/` 下的用户偏好和实体记忆。\n3. **关系管理**:通过 `.relations.json` 建立资源间的关联关系,支持跨 Agent 的上下文关联。\n\n**实际应用**:\n```python\n# Agent A 添加资源\nclient.add_resource(\"./docs/api.pdf\", to=\"viking://resources/api\")\n\n# Agent B 可以检索到\nresults = client.find(\"API usage\", target_uri=\"viking://resources/\")\n```"}+{"question": "OpenViking 如何支持多 Agent 协作场景?不同 Agent 之间的记忆如何隔离与共享?", "files": ["OpenViking/docs/en/concepts/02-context-types.md", "OpenViking/docs/en/concepts/01-architecture.md"], "answer": "OpenViking 通过 URI 命名空间和作用域设计支持多 Agent 协作。\n\n**记忆隔离机制**:\n1. **URI 命名空间**:\n - `viking://user/memories/` - 用户级记忆\n - `viking://user/{user_id}/peers/{peer_id}/memories/` - Peer 级记忆\n - `viking://resources/` - 共享资源\n - `viking://user/skills/` - User 技能\n\n2. **作用域划分**:\n - **User Scope**:用户相关的 profile、preferences、entities、events\n - **Peer/Execution Scope**:Agent 学习到的 trajectories、experiences\n - **Resources Scope**:共享的知识库\n\n**记忆共享机制**:\n1. **资源层共享**:所有 Agent 可以访问 `viking://resources/` 下的共享知识库。\n2. **用户记忆共享**:同一用户的不同 Agent 可以共享 `viking://user/memories/` 下的用户偏好和实体记忆。\n3. **关系管理**:\n\n**实际应用**:\n```python\n# Agent A 添加资源\nclient.add_resource(\"./docs/api.pdf\", to=\"viking://resources/api\")\n\n# Agent B 可以检索到\nresults = client.find(\"API usage\", target_uri=\"viking://resources/\")\n```"}{"question": "会话的生命周期是如何管理的?commit_session 后记忆如何被持久化和索引?", "files": ["OpenViking/docs/en/concepts/08-session.md"], "answer": "会话生命周期遵循:创建 → 交互 → 提交 的模式。\n\n**生命周期管理**:\n1. **创建**:`session = client.session(session_id=\"chat_001\")`\n2. **交互**:\n - `session.add_message(role, parts)` - 添加消息\n - `session.used(contexts, skill)` - 记录使用的上下文/技能\n3. **提交**:`session.commit()` - 归档并提取记忆\n\n**commit 后的持久化流程**:\n1. **归档流程**:\n - 增加 compression_index\n - 复制当前消息到归档目录\n - 生成结构化摘要(LLM)\n - 清空当前消息列表\n\n2. **记忆提取**:\n - SessionCompressorV2 从消息中提取和更新记忆\n - 生成 L0(abstract)和 L1(overview)\n - 写入对应的 VikingFS 目录\n\n3. **索引构建**:\n - 对新生成的记忆内容进行向量化\n - 写入 Vector Index 支持语义检索\n\n**消息结构**:\n- Message:id、role、parts、created_at\n- Part 类型:TextPart、ContextPart、ToolPart\n\n**返回结果**:\n```python\n{\n \"status\": \"committed\",\n \"memories_extracted\": 5,\n \"active_count_updated\": 2,\n \"archived\": True\n}\n```"}-{"question": "技能系统的设计理念是什么?与传统的 Function Calling 或 Tool Use 有何不同?", "files": ["OpenViking/docs/en/api/04-skills.md", "OpenViking/docs/en/concepts/02-context-types.md"], "answer": "技能系统的设计理念是将 Agent 可调用的能力统一管理,与 Function Calling 的区别在于存储和检索方式。\n\n**设计理念**:\n1. **统一存储**:技能作为上下文的一种类型,与记忆、资源采用相同的存储范式。\n2. **分层描述**:技能同样有 L0(简短描述)、L1(详细概述)、L2(完整定义)三层结构。\n3. **语义检索**:支持通过自然语言描述检索相关技能。\n\n**与传统 Function Calling 的区别**:\n| 维度 | OpenViking Skills | Function Calling |\n|------|-------------------|-----------------|\n| 存储方式 | 文件系统 + 向量索引 | 代码定义 |\n| 检索方式 | 语义检索 + 目录定位 | 精确匹配 |\n| 描述层次 | L0/L1/L2 三层 | 单层描述 |\n| 上下文关联 | 支持关系管理 | 无 |\n\n**存储位置**:\n```\nviking://user/skills/{skill-name}/\n├── .abstract.md # L0: 简短描述\n├── SKILL.md # L1: 详细概述\n└── scripts # L2: 完整定义\n```\n\n**支持的数据格式**:\n1. Dict(Skill 格式)\n2. Dict(MCP Tool 格式)- 自动检测并转换\n3. String(SKILL.md 内容)\n4. Path(文件或目录)"}-{"question": "OpenViking 适合哪些具体的应用场景?例如:长期记忆助手、知识库问答、代码助手等场景的适配性如何?", "files": ["OpenViking/README.md", "OpenViking/docs/en/concepts/01-architecture.md"], "answer": "OpenViking 专为 AI Agent 设计,适合需要长期上下文管理的场景。\n\n**核心应用场景**:\n\n1. **长期记忆助手**:\n - 自动从会话中提取用户偏好、实体记忆\n - 支持跨会话的记忆累积和检索\n - 适配性:★★★★★(核心场景)\n\n2. **知识库问答**:\n - 支持 PDF、Markdown、HTML 等多种文档格式\n - 分层检索提高效率和准确性\n - 适配性:★★★★★(核心场景)\n\n3. **代码助手**:\n - 支持代码仓库解析(Git/Zip)\n - 自动过滤非代码目录(.git、node_modules)\n - 语义检索代码片段\n - 适配性:★★★★☆(支持代码解析)\n\n4. **多模态助手**:\n - 支持图片、视频、音频处理\n - VLM 描述和向量化\n - 适配性:★★★★☆(需要 VLM 支持)\n\n5. **企业知识管理**:\n - 统一管理文档、代码、技能\n - 支持关系管理和关联检索\n - 适配性:★★★★★(核心场景)\n\n**场景适配关键能力**:\n- 分层上下文加载:降低 Token 成本\n- 目录递归检索:提高检索精度\n- 可视化检索轨迹:便于调试优化\n- 自动会话管理:实现记忆迭代"}+{"question": "技能系统的设计理念是什么?与传统的 Function Calling 或 Tool Use 有何不同?", "files": ["OpenViking/docs/en/api/04-skills.md", "OpenViking/docs/en/concepts/02-context-types.md"], "answer": "技能系统的设计理念是将 Agent 可调用的能力统一管理,与 Function Calling 的区别在于存储和检索方式。\n\n**设计理念**:\n1. **统一存储**:技能作为上下文的一种类型,与记忆、资源采用相同的存储范式。\n2. **分层描述**:技能同样有 L0(简短描述)、L1(详细概述)、L2(完整定义)三层结构。\n3. **语义检索**:支持通过自然语言描述检索相关技能。\n\n**与传统 Function Calling 的区别**:\n| 维度 | OpenViking Skills | Function Calling |\n|------|-------------------|-----------------|\n| 存储方式 | 文件系统 + 向量索引 | 代码定义 |\n| 检索方式 | 语义检索 + 目录定位 | 精确匹配 |\n| 描述层次 | L0/L1/L2 三层 | 单层描述 |\n| 上下文关联 | 支持统一的上下文管理 | 无 |\n\n**存储位置**:\n```\nviking://user/skills/{skill-name}/\n├── .abstract.md # L0: 简短描述\n├── SKILL.md # L1: 详细概述\n└── scripts # L2: 完整定义\n```\n\n**支持的数据格式**:\n1. Dict(Skill 格式)\n2. Dict(MCP Tool 格式)- 自动检测并转换\n3. String(SKILL.md 内容)\n4. Path(文件或目录)"}+{"question": "OpenViking 适合哪些具体的应用场景?例如:长期记忆助手、知识库问答、代码助手等场景的适配性如何?", "files": ["OpenViking/README.md", "OpenViking/docs/en/concepts/01-architecture.md"], "answer": "OpenViking 专为 AI Agent 设计,适合需要长期上下文管理的场景。\n\n**核心应用场景**:\n\n1. **长期记忆助手**:\n - 自动从会话中提取用户偏好、实体记忆\n - 支持跨会话的记忆累积和检索\n - 适配性:★★★★★(核心场景)\n\n2. **知识库问答**:\n - 支持 PDF、Markdown、HTML 等多种文档格式\n - 分层检索提高效率和准确性\n - 适配性:★★★★★(核心场景)\n\n3. **代码助手**:\n - 支持代码仓库解析(Git/Zip)\n - 自动过滤非代码目录(.git、node_modules)\n - 语义检索代码片段\n - 适配性:★★★★☆(支持代码解析)\n\n4. **多模态助手**:\n - 支持图片、视频、音频处理\n - VLM 描述和向量化\n - 适配性:★★★★☆(需要 VLM 支持)\n\n5. **企业知识管理**:\n - 统一管理文档、代码、技能\n - 支持分层检索和上下文组织\n - 适配性:★★★★★(核心场景)\n\n**场景适配关键能力**:\n- 分层上下文加载:降低 Token 成本\n- 目录递归检索:提高检索精度\n- 可视化检索轨迹:便于调试优化\n- 自动会话管理:实现记忆迭代"}{"question": "如何评估 OpenViking 的检索质量?是否有内置的评测机制或指标?", "files": ["OpenViking/openviking/eval/__init__.py:1-25", "OpenViking/examples/eval/rag_eval.py"], "answer": "OpenViking 提供了 eval 评估模块,支持 RAGAS 等主流评测工具集成。\n\n**内置评测机制**:\n\n1. **eval 模块组成**:\n - `EvalSample`:评估样本数据结构\n - `EvalDataset`:评估数据集\n - `RagasEvaluator`:RAGAS 评测适配器\n - `RAGQueryPipeline`:RAG 查询流水线\n\n2. **支持的评测指标**(通过 RAGAS):\n - **faithfulness**:答案忠实度\n - **answer_relevance**:答案相关性\n - **context_precision**:上下文精确度\n - **context_recall**:上下文召回率\n\n3. **评测流程**:\n```python\n# 准备评估样本\nsamples = [EvalSample(\n query=\"问题\",\n context=[\"检索到的上下文\"],\n response=\"生成的答案\",\n ground_truth=\"标准答案\"\n)]\n\n# 运行评测\nevaluator = RagasEvaluator()\nsummary = await evaluator.evaluate_dataset(dataset)\n```\n\n4. **CLI 评测工具**:\n```bash\nuv run rag_eval.py \\\n --docs_dir ./docs \\\n --question_file ./questions.json \\\n --output ./results.json\n```\n\n**评测报告输出**:\n- 平均分数(mean_scores)\n- 每个样本的详细分数\n- JSON 格式结果保存"}-{"question": "OpenViking 与主流 RAG 框架(LlamaIndex、LangChain)的集成方式是什么?是否可以无缝替换其向量存储组件?", "files": ["OpenViking/docs/en/concepts/05-storage.md", "OpenViking/docs/en/api/06-retrieval.md"], "answer": "OpenViking 采用独立的存储架构,通过 API 接口与 RAG 框架集成。\n\n**存储架构**:\nOpenViking 使用双层存储架构,分离内容存储与索引存储:\n- **AGFS**:内容存储层,存储 L0/L1/L2 全部内容、多媒体文件、关系\n- **Vector Index**:索引存储层,存储 URI、向量、元数据(不含文件内容)\n\n**与 RAG 框架的集成方式**:\n\n1. **API 层集成**:\n - 提供 `find()` 和 `search()` API\n - `find()`:基础向量相似度搜索\n - `search()`:复杂检索(意图分析、会话上下文、查询扩展)\n\n2. **检索结果结构**:\n```python\nclass FindResult:\n memories: List[MatchedContext] # 记忆上下文\n resources: List[MatchedContext] # 资源上下文\n skills: List[MatchedContext] # 技能上下文\n```\n\n3. **替换向量存储的可行性**:\n - 可以通过 HTTP API 与 LlamaIndex/LangChain 集成\n - 但 OpenViking 提供的是完整的上下文管理方案,不仅仅是向量存储\n - 建议作为独立的上下文管理层使用\n\n**HTTP API 支持**:\n```bash\nPOST /api/v1/search/find\n{\n \"query\": \"how to authenticate users\",\n \"limit\": 10\n}\n```"}+{"question": "OpenViking 与主流 RAG 框架(LlamaIndex、LangChain)的集成方式是什么?是否可以无缝替换其向量存储组件?", "files": ["OpenViking/docs/en/concepts/05-storage.md", "OpenViking/docs/en/api/06-retrieval.md"], "answer": "OpenViking 采用独立的存储架构,通过 API 接口与 RAG 框架集成。\n\n**存储架构**:\nOpenViking 使用双层存储架构,分离内容存储与索引存储:\n- **AGFS**:内容存储层,存储 L0/L1/L2 全部内容、多媒体文件\n- **Vector Index**:索引存储层,存储 URI、向量、元数据(不含文件内容)\n\n**与 RAG 框架的集成方式**:\n\n1. **API 层集成**:\n - 提供 `find()` 和 `search()` API\n - `find()`:基础向量相似度搜索\n - `search()`:复杂检索(意图分析、会话上下文、查询扩展)\n\n2. **检索结果结构**:\n```python\nclass FindResult:\n memories: List[MatchedContext] # 记忆上下文\n resources: List[MatchedContext] # 资源上下文\n skills: List[MatchedContext] # 技能上下文\n```\n\n3. **替换向量存储的可行性**:\n - 可以通过 HTTP API 与 LlamaIndex/LangChain 集成\n - 但 OpenViking 提供的是完整的上下文管理方案,不仅仅是向量存储\n - 建议作为独立的上下文管理层使用\n\n**HTTP API 支持**:\n```bash\nPOST /api/v1/search/find\n{\n \"query\": \"how to authenticate users\",\n \"limit\": 10\n}\n```"}{"question": "在生产环境中,OpenViking 的性能瓶颈可能出现在哪些环节?如何进行容量规划和性能调优?", "files": ["OpenViking/docs/en/concepts/05-storage.md", "OpenViking/openviking/storage/viking_vector_index_backend.py"], "answer": "OpenViking 的性能瓶颈主要出现在语义处理、向量检索和存储层。\n\n**潜在性能瓶颈**:\n\n1. **语义处理队列**:\n - L0/L1 生成依赖 LLM 调用\n - 大量资源添加时队列积压\n - 调优:增加并发处理数、使用更快的 VLM\n\n2. **向量检索**:\n - 大规模数据集的相似度计算\n - 调优:使用 VikingDB 后端、调整索引参数\n\n3. **存储层**:\n - AGFS 后端选择(local/s3/memory)\n - 向量索引存储(本地持久化/HTTP 服务/Volcengine VikingDB)\n\n**容量规划建议**:\n\n1. **存储后端选择**:\n - 本地开发:`backend: \"local\"`\n - 生产环境:`backend: \"s3\"` 或 `backend: \"volcengine\"`\n\n2. **向量索引配置**:\n```json\n{\n \"storage\": {\n \"vectordb\": {\n \"backend\": \"volcengine\",\n \"dimension\": 1024\n }\n }\n}\n```\n\n3. **性能调优参数**:\n - `batch_size`:嵌入请求批量大小\n - `limit`:检索结果数量限制\n - `score_threshold`:相关性分数阈值\n\n4. **监控指标**:\n - 语义处理队列长度\n - 向量检索延迟\n - 存储层 I/O 性能"}-{"question": "VikingFS 与 AGFS 的关系是什么?为什么需要两层文件系统抽象?", "files": ["OpenViking/docs/en/concepts/05-storage.md"], "answer": "VikingFS 是 AGFS 之上的 URI 抽象层,两者构成双层存储架构。\n\n**关系说明**:\n\n```\n┌─────────────────────────────────────────┐\n│ VikingFS (URI Abstraction) │\n│ URI Mapping · Hierarchical Access │\n│ · Relation Management │\n└────────────────┬────────────────────────┘\n ┌────────┴────────┐\n │ │\n┌───────▼────────┐ ┌─────▼───────────┐\n│ Vector Index │ │ AGFS │\n│ (Semantic │ │ (Content │\n│ Search) │ │ Storage) │\n└────────────────┘ └─────────────────┘\n```\n\n**职责划分**:\n\n| 层级 | 职责 | 内容 |\n|------|------|------|\n| **VikingFS** | URI 抽象层 | URI 映射、层级访问、关系管理 |\n| **AGFS** | 内容存储层 | L0/L1/L2 全部内容、多媒体文件 |\n| **Vector Index** | 索引存储层 | URI、向量、元数据 |\n\n**为什么需要两层抽象**:\n\n1. **职责分离**:\n - VikingFS 处理 URI 到物理路径的映射\n - AGFS 处理实际的文件读写操作\n\n2. **后端灵活性**:\n - AGFS 支持多种后端:localfs、s3fs、memory\n - VikingFS 屏蔽底层存储差异\n\n3. **URI 映射示例**:\n```\nviking://resources/docs/auth → /local/resources/docs/auth\nviking://user/memories → /local/user/memories\n```\n\n4. **设计优势**:\n - 清晰职责:向量索引负责检索,AGFS 负责存储\n - 内存优化:向量索引不存储文件内容\n - 独立扩展:向量索引和 AGFS 可独立扩展"}+{"question": "VikingFS 与 AGFS 的关系是什么?为什么需要两层文件系统抽象?", "files": ["OpenViking/docs/en/concepts/05-storage.md"], "answer": "VikingFS 是 AGFS 之上的 URI 抽象层,两者构成双层存储架构。\n\n**关系说明**:\n\n```\n┌─────────────────────────────────────────┐\n│ VikingFS (URI Abstraction) │\n│ URI Mapping · Hierarchical Access │\n│ URI Mapping · Hierarchical Access │\n└────────────────┬────────────────────────┘\n ┌────────┴────────┐\n │ │\n┌───────▼────────┐ ┌─────▼───────────┐\n│ Vector Index │ │ AGFS │\n│ (Semantic │ │ (Content │\n│ Search) │ │ Storage) │\n└────────────────┘ └─────────────────┘\n```\n\n**职责划分**:\n\n| 层级 | 职责 | 内容 |\n|------|------|------|\n| **VikingFS** | URI 抽象层 | URI 映射、层级访问 |\n| **AGFS** | 内容存储层 | L0/L1/L2 全部内容、多媒体文件 |\n| **Vector Index** | 索引存储层 | URI、向量、元数据 |\n\n**为什么需要两层抽象**:\n\n1. **职责分离**:\n - VikingFS 处理 URI 到物理路径的映射\n - AGFS 处理实际的文件读写操作\n\n2. **后端灵活性**:\n - AGFS 支持多种后端:localfs、s3fs、memory\n - VikingFS 屏蔽底层存储差异\n\n3. **URI 映射示例**:\n```\nviking://resources/docs/auth → /local/resources/docs/auth\nviking://user/memories → /local/user/memories\n```\n\n4. **设计优势**:\n - 清晰职责:向量索引负责检索,AGFS 负责存储\n - 内存优化:向量索引不存储文件内容\n - 独立扩展:向量索引和 AGFS 可独立扩展"}{"question": "`client.add_resource` 支持哪些输入格式?如何处理本地目录的递归添加和子目录过滤?", "files": ["OpenViking/docs/en/api/02-resources.md", "OpenViking/openviking/parse/directory_scan.py:1-80"], "answer": "`add_resource` 支持多种输入格式,目录处理通过 directory_scan 模块实现。\n\n**支持的输入格式**:\n\n| 格式 | 扩展名 | 处理方式 |\n|------|--------|----------|\n| PDF | `.pdf` | 文本和图片提取 |\n| Markdown | `.md` | 原生支持 |\n| HTML | `.html`, `.htm` | 清理文本提取 |\n| 纯文本 | `.txt` | 直接导入 |\n| JSON/YAML | `.json`, `.yaml` | 结构化解析 |\n| 代码 | `.py`, `.js`, `.go` 等 | 语法感知解析 |\n| 图片 | `.png`, `.jpg` 等 | VLM 描述 |\n| 视频/音频 | `.mp4`, `.mp3` 等 | 转录 |\n\n**目录递归添加流程**:\n\n1. **DirectoryScan 预扫描**:\n - 遍历目录树\n - 分类文件为 processable / unsupported\n - 跳过:点文件、符号链接、空文件\n\n2. **目录过滤机制**:\n```python\ndef _should_skip_directory(dir_path, root, ignore_dirs):\n # 跳过:点目录、符号链接、IGNORE_DIRS\n```\n\n3. **内置忽略目录**:\n - `.git`、`node_modules`、`__pycache__` 等\n - 通过 `IGNORE_DIRS` 常量定义\n\n4. **API 参数**:\n```python\nclient.add_resource(\n \"./documents\", # 本地目录路径\n to=\"viking://resources/docs\", # 目标 URI\n reason=\"文档说明\", # 添加原因\n wait=True, # 等待处理完成\n timeout=300 # 超时时间\n)\n```\n\n**处理流水线**:\nInput → Parser → TreeBuilder → AGFS → SemanticQueue → Vector Index"}{"question": "向量索引是如何构建和维护的?增量更新时如何避免全量重建?", "files": ["OpenViking/openviking/storage/viking_vector_index_backend.py", "OpenViking/docs/en/concepts/05-storage.md"], "answer": "向量索引通过 VikingVectorIndexBackend 实现,支持增量更新。\n\n**索引构建流程**:\n\n1. **初始化配置**:\n```python\nconfig = VectorDBBackendConfig(\n backend=\"local\", # local/http/volcengine\n path=\"./data/vectordb\",\n dimension=1024,\n distance_metric=\"cosine\"\n)\nbackend = VikingVectorIndexBackend(config=config)\n```\n\n2. **支持的后端模式**:\n - **local**:本地持久化存储\n - **http**:远程 HTTP 服务\n - **volcengine**:火山引擎 VikingDB\n\n3. **索引特性**:\n - 使用 BruteForce 索引进行向量相似度搜索\n - 支持标量过滤和多操作符\n - 每个集合自动管理索引\n\n**增量更新机制**:\n\n1. **URI 级别操作**:\n - VikingFS 的 `rm()`、`mv()` 操作同步更新向量索引\n - 新增内容自动触发向量化并写入索引\n\n2. **避免全量重建**:\n - 通过 URI 唯一标识每个向量条目\n - 更新时只删除旧向量、插入新向量\n - 不影响其他条目的索引\n\n3. **双层存储优势**:\n - 向量索引只存储 URI 引用和元数据\n - 内容变更不影响索引结构\n - 独立扩展存储和索引层\n\n**核心 API**:\n- `upsert()`:插入或更新向量\n- `delete()`:删除向量\n- `search()`:向量相似度搜索"}{"question": "配置文件 `ov.conf` 的必填项有哪些?如何配置不同的 VLM 后端(OpenAI、Volcengine 等)?", "files": ["OpenViking/docs/en/guides/01-configuration.md:1-150"], "answer": "配置文件 `ov.conf` 包含 embedding、vlm、rerank、storage 等配置项。\n\n**必填配置项**:\n\n```json\n{\n \"embedding\": {\n \"dense\": {\n \"provider\": \"volcengine\", // 必填:volcengine/openai/vikingdb\n \"api_key\": \"your-api-key\", // 必填\n \"model\": \"doubao-embedding-vision-251215\",\n \"dimension\": 1024\n }\n },\n \"vlm\": {\n \"provider\": \"volcengine\", // 必填\n \"api_key\": \"your-api-key\", // 必填\n \"model\": \"doubao-seed-2-0-pro-260215\"\n }\n}\n```\n\n**VLM 后端配置**:\n\n1. **Volcengine(豆包模型)**:\n```json\n{\n \"vlm\": {\n \"api_base\": \"https://ark.cn-beijing.volces.com/api/v3\",\n \"api_key\": \"your-volcengine-api-key\",\n \"provider\": \"volcengine\",\n \"model\": \"doubao-seed-2-0-pro-260215\"\n }\n}\n```\n\n2. **OpenAI**:\n```json\n{\n \"vlm\": {\n \"api_base\": \"https://api.openai.com/v1\",\n \"api_key\": \"your-openai-api-key\",\n \"provider\": \"openai\",\n \"model\": \"gpt-4-vision-preview\"\n }\n}\n```\n\n**Embedding 配置**:\n\n| 参数 | 说明 |\n|------|------|\n| `provider` | volcengine/openai/vikingdb |\n| `api_key` | API 密钥 |\n| `model` | 模型名称 |\n| `dimension` | 向量维度 |\n| `input` | 输入类型:text/multimodal |\n\n**可选配置**:\n- `rerank`:重排序模型配置\n- `storage`:存储后端配置"}-{"question": "`HierarchicalRetriever` 的检索流程是怎样的?如何实现从 L0 到 L2 的层级穿透检索?", "files": ["OpenViking/openviking/retrieve/hierarchical_retriever.py"], "answer": "HierarchicalRetriever 实现目录递归检索和层级穿透。\n\n**检索流程**:\n\n1. **初始化**:\n```python\nclass HierarchicalRetriever:\n MAX_CONVERGENCE_ROUNDS = 3 # 收敛轮次\n MAX_RELATIONS = 5 # 最大关联数\n SCORE_PROPAGATION_ALPHA = 0.5 # 分数传播系数\n DIRECTORY_DOMINANCE_RATIO = 1.2 # 目录分数阈值\n GLOBAL_SEARCH_TOPK = 3 # 全局检索数量\n```\n\n2. **检索模式**:\n - **THINKING**:深度思考模式\n - **QUICK**:快速检索模式\n\n3. **核心方法**:\n```python\nasync def retrieve(\n self,\n query: TypedQuery,\n limit: int = 5,\n mode: RetrieverMode = RetrieverMode.THINKING,\n score_threshold: Optional[float] = None,\n metadata_filter: Optional[Dict[str, Any]] = None,\n) -> QueryResult:\n```\n\n**层级穿透机制**:\n\n1. **L0 检索**:\n - 向量相似度搜索 `.abstract.md` 内容\n - 快速过滤不相关内容\n\n2. **L1 确认**:\n - 读取 `.overview.md` 进行重排序\n - 确认内容相关性\n\n3. **L2 加载**:\n - 按需读取完整内容\n - 仅在确认需要时加载\n\n**关键特性**:\n- 分数传播:目录分数向子节点传播\n- 目录优势:目录分数需超过最大子节点分数\n- 关联检索:自动检索关联上下文"}+{"question": "`HierarchicalRetriever` 的检索流程是怎样的?如何实现从 L0 到 L2 的层级穿透检索?", "files": ["OpenViking/openviking/retrieve/hierarchical_retriever.py"], "answer": "HierarchicalRetriever 实现目录递归检索和层级穿透。\n\n**检索流程**:\n\n1. **初始化**:\n```python\nclass HierarchicalRetriever:\n MAX_CONVERGENCE_ROUNDS = 3 # 收敛轮次\n SCORE_PROPAGATION_ALPHA = 0.5 # 分数传播系数\n DIRECTORY_DOMINANCE_RATIO = 1.2 # 目录分数阈值\n GLOBAL_SEARCH_TOPK = 3 # 全局检索数量\n```\n\n2. **检索模式**:\n - **THINKING**:深度思考模式\n - **QUICK**:快速检索模式\n\n3. **核心方法**:\n```python\nasync def retrieve(\n self,\n query: TypedQuery,\n limit: int = 5,\n mode: RetrieverMode = RetrieverMode.THINKING,\n score_threshold: Optional[float] = None,\n metadata_filter: Optional[Dict[str, Any]] = None,\n) -> QueryResult:\n```\n\n**层级穿透机制**:\n\n1. **L0 检索**:\n - 向量相似度搜索 `.abstract.md` 内容\n - 快速过滤不相关内容\n\n2. **L1 确认**:\n - 读取 `.overview.md` 进行重排序\n - 确认内容相关性\n\n3. **L2 加载**:\n - 按需读取完整内容\n - 仅在确认需要时加载\n\n**关键特性**:\n- 分数传播:目录分数向子节点传播\n- 目录优势:目录分数需超过最大子节点分数"}{"question": "语义处理队列的工作机制是什么?如何监控和调试异步处理状态?", "files": ["OpenViking/docs/en/concepts/01-architecture.md", "OpenViking/openviking/service/resource_service.py:1-80"], "answer": "语义处理队列通过 SemanticQueue 异步生成 L0/L1 内容。\n\n**工作机制**:\n\n1. **处理流水线**:\n```\nInput → Parser → TreeBuilder → AGFS → SemanticQueue → Vector Index\n```\n\n2. **队列处理**:\n - TreeBuilder 将文件移动到 AGFS 后入队\n - SemanticQueue 异步处理队列项\n - 自底向上生成 L0/L1\n\n3. **异步处理优势**:\n - 不阻塞资源添加操作\n - 支持大规模文档处理\n - LLM 调用并行化\n\n**监控和调试**:\n\n1. **等待处理完成**:\n```python\nresult = client.add_resource(\"./docs\", wait=False)\nclient.wait_processed() # 等待队列处理完成\n```\n\n2. **超时控制**:\n```python\nresult = client.add_resource(\n \"./docs\",\n wait=True,\n timeout=300 # 超时时间(秒)\n)\n```\n\n3. **DebugService**:\n - 提供 ObserverService 用于调试\n - 可视化检索轨迹\n\n4. **日志监控**:\n - 通过 logger 获取处理状态\n - 监控队列长度和处理延迟\n\n**Service 层支持**:\n- ResourceService 管理 add_resource 操作\n- wait_processed() 方法等待语义处理完成"}{"question": "如何通过代码动态创建和管理 Session?Session 与 Memory 的关系是什么?", "files": ["OpenViking/docs/en/concepts/08-session.md", "OpenViking/openviking/session/compressor_v2.py"], "answer": "Session 通过 client API 动态创建,commit 后自动提取 Memory。\n\n**Session 创建和管理**:\n\n1. **创建 Session**:\n```python\n# 创建新会话\nsession = client.session(session_id=\"chat_001\")\n\n# 或使用 create_session\nresult = client.create_session()\n```\n\n2. **添加消息**:\n```python\nsession.add_message(\n \"user\",\n [TextPart(\"How to configure embedding?\")]\n)\n\nsession.add_message(\n \"assistant\",\n [\n TextPart(\"Here's how...\"),\n ContextPart(uri=\"viking://user/memories/profile.md\"),\n ]\n)\n```\n\n3. **记录使用**:\n```python\nsession.used(contexts=[\"viking://user/memories/profile.md\"])\nsession.used(skill={\n \"uri\": \"viking://user/skills/code-search\",\n \"input\": \"search config\",\n \"output\": \"found 3 files\",\n \"success\": True\n})\n```\n\n4. **提交会话**:\n```python\nresult = session.commit()\n# {\"status\": \"committed\", \"memories_extracted\": 5}\n```\n\n**Session 与 Memory 的关系**:\n\n1. **Memory 来源**:\n - Memory 从 Session 消息中提取\n - SessionCompressorV2 在 commit 时触发\n\n2. **提取流程**:\n - 格式化会话消息\n - 根据当前记忆策略调用 LLM 提取已启用的记忆类型\n - 写入当前用户或相关 Peer 的记忆目录并索引\n\n3. **内置记忆类型与默认位置**:\n - profile → `user/memories/profile.md`\n - preferences → `user/memories/preferences/`\n - entities → `user/memories/entities/`\n - events → `user/memories/events/`\n - identity → `user/memories/identity.md`\n - soul → `user/memories/soul.md`\n - cases → `user/memories/cases/`\n - trajectories → `user/memories/trajectories/`\n - experiences → `user/memories/experiences/`\n - tools → `user/memories/tools/`\n - skills → `user/memories/skills/`\n\n这些 `user/...` 短路径会按当前身份解析为 `viking://user/{user_id}/...`,应用也可以通过自定义模板扩展或调整记忆类型。"}{"question": "OpenViking Server 模式与本地模式的区别是什么?如何选择部署方式?", "files": ["OpenViking/openviking/server/bootstrap.py:1-61", "OpenViking/docs/en/concepts/01-architecture.md"], "answer": "Server 模式提供 HTTP API,本地模式直接嵌入应用。\n\n**模式对比**:\n\n| 维度 | 本地模式 | Server 模式 |\n|------|----------|-------------|\n| 访问方式 | Python SDK | HTTP API |\n| 部署复杂度 | 简单 | 需启动服务 |\n| 多客户端 | 不支持 | 支持 |\n| 资源共享 | 单进程 | 多进程共享 |\n| 适用场景 | 单机应用 | 生产环境 |\n\n**Server 模式启动**:\n\n1. **命令行启动**:\n```bash\nopenviking-server --host 0.0.0.0 --port 1933 --config ./ov.conf\n```\n\n2. **参数说明**:\n- `--host`:绑定地址\n- `--port`:端口号\n- `--config`:配置文件路径\n\n3. **HTTP API 示例**:\n```bash\ncurl -X POST http://localhost:1933/api/v1/resources \\\n -H \"Content-Type: application/json\" \\\n -H \"X-API-Key: your-key\" \\\n -d '{\"path\": \"./documents/guide.md\"}'\n```\n\n**部署方式选择**:\n\n1. **选择本地模式**:\n - 单机应用开发\n - 快速原型验证\n - 无需多客户端访问\n\n2. **选择 Server 模式**:\n - 生产环境部署\n - 多客户端/多服务访问\n - 需要集中式上下文管理\n - 微服务架构集成\n\n**Service 层复用**:\n两种模式共享 Service 层逻辑,支持 HTTP Server 和 CLI 复用。"}diff --git a/openviking/eval/recorder/wrapper.py b/openviking/eval/recorder/wrapper.pyindex db4eb84ae..f94d6d1ce 100644--- a/openviking/eval/recorder/wrapper.py+++ b/openviking/eval/recorder/wrapper.py@@ -118,9 +118,6 @@ class RecordingVikingFS:"tree","abstract","overview",- "relations",- "link",- "unlink","write_file","read_file","read_file_bytes",@@ -129,8 +126,6 @@ class RecordingVikingFS:"move_file","delete_temp","write_context",- "get_relations",- "get_relations_with_content","find","search",):diff --git a/openviking/retrieve/__init__.py b/openviking/retrieve/__init__.pyindex 39f532b30..fd7817ab5 100644--- a/openviking/retrieve/__init__.py+++ b/openviking/retrieve/__init__.py@@ -14,7 +14,6 @@ from openviking_cli.retrieve.types import (MatchedContext,QueryPlan,QueryResult,- RelatedContext,TypedQuery,)@@ -23,7 +22,6 @@ __all__ = ["ContextType","TypedQuery","QueryPlan",- "RelatedContext","MatchedContext","QueryResult","FindResult",diff --git a/openviking/retrieve/hierarchical_retriever.py b/openviking/retrieve/hierarchical_retriever.pyindex c2a7990ce..33bf7077b 100644--- a/openviking/retrieve/hierarchical_retriever.py+++ b/openviking/retrieve/hierarchical_retriever.py@@ -53,7 +53,6 @@ class HierarchicalRetriever:"""Hierarchical retriever with dense and sparse vector support."""MAX_CONVERGENCE_ROUNDS = 3 # Stop after multiple rounds with unchanged topk- MAX_RELATIONS = 5 # Maximum relations per resourceDIRECTORY_DOMINANCE_RATIO = 1.2 # Directory score must exceed max child scoreGLOBAL_SEARCH_TOPK = 10 # Global retrieval count (more candidates = better rerank precision)MAX_PARALLEL_CHILD_SEARCHES = 4 # Limit per-request fan-out against remote vector stores@@ -576,8 +575,6 @@ class HierarchicalRetriever:"""results = []for c in candidates:- relations = []-# Fix: clamp inf/nan scores from vector search (#inf-score)semantic_score = self._finite_score(c.get("_final_score", c.get("_score", 0.0)))@@ -624,7 +621,6 @@ class HierarchicalRetriever:abstract=abstract,category=c.get("category", ""),score=final_score,- relations=relations,search_tags=list(c.get("search_tags") or []),))diff --git a/openviking/server/app.py b/openviking/server/app.pyindex 94dd5aaaa..21078aef7 100644--- a/openviking/server/app.py+++ b/openviking/server/app.py@@ -42,7 +42,6 @@ from openviking.server.routers import (openviking_assets_router,pack_router,privacy_configs_router,- relations_router,resources_router,search_router,sessions_router,@@ -595,7 +594,6 @@ def create_app(app.include_router(content_router)app.include_router(console_router)app.include_router(search_router)- app.include_router(relations_router)app.include_router(privacy_configs_router)app.include_router(skills_router)app.include_router(sessions_router)diff --git a/openviking/server/routers/__init__.py b/openviking/server/routers/__init__.pyindex 27c68ac95..dd280a3f3 100644--- a/openviking/server/routers/__init__.py+++ b/openviking/server/routers/__init__.py@@ -14,7 +14,6 @@ from openviking.server.routers.observer import router as observer_routerfrom openviking.server.routers.openviking_assets import router as openviking_assets_routerfrom openviking.server.routers.pack import router as pack_routerfrom openviking.server.routers.privacy_configs import router as privacy_configs_router-from openviking.server.routers.relations import router as relations_routerfrom openviking.server.routers.resources import router as resources_routerfrom openviking.server.routers.search import router as search_routerfrom openviking.server.routers.sessions import router as sessions_router@@ -37,7 +36,6 @@ __all__ = ["content_router","console_router","search_router",- "relations_router","sessions_router","skills_router","snapshot_router",diff --git a/openviking/server/routers/relations.py b/openviking/server/routers/relations.pydeleted file mode 100644index b1ad890ac..000000000--- a/openviking/server/routers/relations.py+++ /dev/null@@ -1,100 +0,0 @@-# Copyright (c) 2026 Beijing Volcano Engine Technology Co., Ltd.-# SPDX-License-Identifier: AGPL-3.0-"""Relations endpoints for OpenViking HTTP Server."""--from typing import List, Union--from fastapi import APIRouter, Depends, Query-from pydantic import BaseModel--from openviking.core.path_variables import resolve_path_variables-from openviking.server.auth import get_request_context-from openviking.server.dependencies import get_service-from openviking.server.identity import RequestContext-from openviking.server.models import Response---def _resolve_uri_or_uris(uri: Union[str, List[str]]) -> Union[str, List[str]]:- """Resolve path variables in a single URI or list of URIs."""- if isinstance(uri, list):- return [resolve_path_variables(u) for u in uri]- return resolve_path_variables(uri)---router = APIRouter(prefix="/api/v1/relations", tags=["relations"])---class LinkRequest(BaseModel):- """Request model for link."""-- from_uri: str- to_uris: Union[str, List[str]]- reason: str = ""---class UnlinkRequest(BaseModel):- """Request model for unlink."""-- from_uri: str- to_uri: str---async def relations(- uri: str = Query(..., description="Viking URI"),- _ctx: RequestContext = Depends(get_request_context),-):- """Get relations for a resource."""- service = get_service()- uri = resolve_path_variables(uri)- result = await service.relations.relations(uri, ctx=_ctx)- return Response(status="ok", result=result)--[email protected]("/link")-async def link(- request: LinkRequest,- _ctx: RequestContext = Depends(get_request_context),-):- """Create link between resources."""- service = get_service()- from_uri = resolve_path_variables(request.from_uri)- to_uris = _resolve_uri_or_uris(request.to_uris)- await service.relations.link(from_uri, to_uris, ctx=_ctx, reason=request.reason)- return Response(status="ok", result={"from": from_uri, "to": to_uris})--[email protected]("/link")-async def unlink(- request: UnlinkRequest,- _ctx: RequestContext = Depends(get_request_context),-):- """Remove link between resources."""- service = get_service()- from_uri = resolve_path_variables(request.from_uri)- to_uri = resolve_path_variables(request.to_uri)- await service.relations.unlink(from_uri, to_uri, ctx=_ctx)- return Response(status="ok", result={"from": from_uri, "to": to_uri})---class BuildGraphRequest(BaseModel):- """Request model for build_graph."""-- space_uris: List[str]- output_uri: str--[email protected]("/build_graph")-async def build_graph(- request: BuildGraphRequest,- _ctx: RequestContext = Depends(get_request_context),-):- """Generate a self-contained HTML graph from multiple memory roots into one output file."""- from openviking.session.memory.graph_view import MemoryGraph-- service = get_service()- space_uris = [resolve_path_variables(uri) for uri in request.space_uris]- output_uri = resolve_path_variables(request.output_uri)- graph = MemoryGraph(viking_fs=service.viking_fs)- graph_path = await graph.build_graph(space_uris, output_uri, ctx=_ctx)- return Response(status="ok", result={"graph_uri": graph_path})diff --git a/openviking/service/__init__.py b/openviking/service/__init__.pyindex d7dbeb019..ce3e6bced 100644--- a/openviking/service/__init__.py+++ b/openviking/service/__init__.py@@ -15,7 +15,6 @@ if TYPE_CHECKING:from openviking.service.debug_service import ComponentStatus, DebugService, SystemStatusfrom openviking.service.fs_service import FSServicefrom openviking.service.pack_service import PackService- from openviking.service.relation_service import RelationServicefrom openviking.service.resource_service import ResourceServicefrom openviking.service.search_service import SearchServicefrom openviking.service.session_service import SessionService@@ -27,7 +26,6 @@ _EXPORTS = {"SystemStatus": ("openviking.service.debug_service", "SystemStatus"),"FSService": ("openviking.service.fs_service", "FSService"),"PackService": ("openviking.service.pack_service", "PackService"),- "RelationService": ("openviking.service.relation_service", "RelationService"),"ResourceService": ("openviking.service.resource_service", "ResourceService"),"SearchService": ("openviking.service.search_service", "SearchService"),"SessionService": ("openviking.service.session_service", "SessionService"),@@ -55,7 +53,6 @@ __all__ = ["DebugService","SystemStatus","FSService",- "RelationService","PackService","SearchService","ResourceService",diff --git a/openviking/service/core.py b/openviking/service/core.pyindex 3b8a9994b..0912a5ba9 100644--- a/openviking/service/core.py+++ b/openviking/service/core.py@@ -21,7 +21,6 @@ from openviking.service.debug_service import DebugServicefrom openviking.service.fs_service import FSServicefrom openviking.service.mineru_preflight import wait_for_mineru_readyfrom openviking.service.pack_service import PackService-from openviking.service.relation_service import RelationServicefrom openviking.service.resource_memory_link_service import ResourceMemoryLinkServicefrom openviking.service.resource_service import ResourceServicefrom openviking.service.search_service import SearchService@@ -105,7 +104,6 @@ class OpenVikingService:self._fs_service = FSService(uri_mutation_coordinator=self._uri_mutation_coordinator,)- self._relation_service = RelationService()self._pack_service = PackService()self._search_service = SearchService()self._resource_memory_link_service = ResourceMemoryLinkService()@@ -255,11 +253,6 @@ class OpenVikingService:"""Get FSService instance."""return self._fs_service- @property- def relations(self) -> RelationService:- """Get RelationService instance."""- return self._relation_service-@propertydef pack(self) -> PackService:"""Get PackService instance."""@@ -408,7 +401,6 @@ class OpenVikingService:watch_scheduler=self._watch_scheduler,uri_mutation_coordinator=self._uri_mutation_coordinator,)- self._relation_service.set_viking_fs(self._viking_fs)self._pack_service.set_dependencies(viking_fs=self._viking_fs,vector_store=self._vikingdb_manager,diff --git a/openviking/service/relation_service.py b/openviking/service/relation_service.pydeleted file mode 100644index 5e8b132b1..000000000--- a/openviking/service/relation_service.py+++ /dev/null@@ -1,74 +0,0 @@-# Copyright (c) 2026 Beijing Volcano Engine Technology Co., Ltd.-# SPDX-License-Identifier: AGPL-3.0-"""-Relation Service for OpenViking.--Provides relation management operations: relations, link, unlink.-"""--from typing import Any, Dict, List, Optional, Union--from openviking.core.uri_validation import validate_viking_uri-from openviking.server.identity import RequestContext-from openviking.storage.viking_fs import VikingFS-from openviking_cli.exceptions import NotInitializedError-from openviking_cli.utils import get_logger--logger = get_logger(__name__)---class RelationService:- """Relation management service."""-- def __init__(self, viking_fs: Optional[VikingFS] = None):- self._viking_fs = viking_fs-- def set_viking_fs(self, viking_fs: VikingFS) -> None:- """Set VikingFS instance (for deferred initialization)."""- self._viking_fs = viking_fs-- def _ensure_initialized(self) -> VikingFS:- """Ensure VikingFS is initialized."""- if not self._viking_fs:- raise NotInitializedError("VikingFS")- return self._viking_fs-- async def relations(self, uri: str, ctx: RequestContext) -> List[Dict[str, Any]]:- """Get relations (returns [{"uri": "...", "reason": "..."}, ...])."""- viking_fs = self._ensure_initialized()- uri = validate_viking_uri(uri)- return await viking_fs.relations(uri, ctx=ctx)-- async def link(- self,- from_uri: str,- uris: Union[str, List[str]],- ctx: RequestContext,- reason: str = "",- ) -> None:- """Create link (single or multiple).-- Args:- from_uri: Source URI- uris: Target URI or list of URIs- reason: Reason for linking- """- viking_fs = self._ensure_initialized()- from_uri = validate_viking_uri(from_uri, field_name="from_uri")- if isinstance(uris, list):- uris = [validate_viking_uri(uri, field_name="to_uris") for uri in uris]- else:- uris = validate_viking_uri(uris, field_name="to_uris")- await viking_fs.link(from_uri, uris, reason, ctx=ctx)-- async def unlink(self, from_uri: str, uri: str, ctx: RequestContext) -> None:- """Remove link (remove specified URI from uris).-- Args:- from_uri: Source URI- uri: Target URI to remove- """- viking_fs = self._ensure_initialized()- from_uri = validate_viking_uri(from_uri, field_name="from_uri")- uri = validate_viking_uri(uri, field_name="to_uri")- await viking_fs.unlink(from_uri, uri, ctx=ctx)diff --git a/openviking/session/session.py b/openviking/session/session.pyindex f395da841..ba1ca7bb5 100644--- a/openviking/session/session.py+++ b/openviking/session/session.py@@ -2356,7 +2356,7 @@ class Session:record_auto_commit_success: bool = False,event_search_tags: Optional[List[str]] = None,) -> None:- """Phase 2: Extract memories, write relations, enqueue — runs in background."""+ """Phase 2: Extract memories and enqueue semantic work in the background."""from openviking.service.task_tracker import get_task_trackerfrom openviking.telemetry import OperationTelemetry, bind_telemetryfrom openviking.telemetry.registry import register_telemetry, unregister_telemetry@@ -2686,16 +2686,6 @@ class Session:else:await _run_archive_summary()- # Write relations (using snapshot, not self._usage_records)- if self._viking_fs:- for usage in usage_records:- try:- await self._viking_fs.link(- self._session_uri, usage.uri, ctx=self.ctx- )- except Exception as e:- logger.warning(f"Failed to create relation to {usage.uri}: {e}")-# Update active_count (using snapshot, not self._usage_records)if self._vikingdb_manager:uris = [u.uri for u in usage_records if u.uri]diff --git a/openviking/storage/viking_fs/__init__.py b/openviking/storage/viking_fs/__init__.pyindex d543ac689..3062c56b3 100644--- a/openviking/storage/viking_fs/__init__.py+++ b/openviking/storage/viking_fs/__init__.py@@ -7,7 +7,6 @@ Encapsulates the AGFS binding client, providing file operation interface based oResponsibilities:- URI conversion (viking:// <-> /local/)- L0/L1 reading (.abstract.md, .overview.md)-- Relation management (.relations.json)- Semantic search (vector retrieval + rerank)- Vector sync (sync vector store on rm/mv)@@ -78,7 +77,6 @@ from openviking.storage.viking_fs._base import (SNAPSHOT_DIFF_MAX_LINES,SNAPSHOT_DIFF_MAX_OUTPUT_BYTES,SNAPSHOT_DIFF_TIMEOUT_MS,- RelationEntry,_ABSTRACT_WORKER_COUNT,_DEFAULT_GREP_FILE_CONCURRENCY,_T,@@ -121,7 +119,7 @@ class VikingFS(APIs are divided into two categories:- RAGFS basic commands (direct forwarding): read, ls, write, mkdir, rm, mv, grep, stat- - VikingFS specific capabilities: abstract, overview, find, search, relations, link, unlink+ - VikingFS specific capabilities: abstract, overview, find, searchUses Rust binding mode: Use RAGFSBindingClient to directly use RAGFS implementation"""@@ -196,7 +194,6 @@ __all__ = ["SNAPSHOT_DIFF_MAX_LINES","SNAPSHOT_DIFF_MAX_OUTPUT_BYTES","SNAPSHOT_DIFF_TIMEOUT_MS",- "RelationEntry","SyncDiff","VikingFS","enable_viking_fs_recorder",diff --git a/openviking/storage/viking_fs/_base.py b/openviking/storage/viking_fs/_base.pyindex bde4fdf8e..084f4b0bd 100644--- a/openviking/storage/viking_fs/_base.py+++ b/openviking/storage/viking_fs/_base.py@@ -1,12 +1,10 @@# Copyright (c) 2026 Beijing Volcano Engine Technology Co., Ltd.# SPDX-License-Identifier: AGPL-3.0-"""Shared constants, helpers, dataclasses, and singleton management for VikingFS."""+"""Shared constants, helpers, and singleton management for VikingFS."""import os-from dataclasses import dataclass, field-from typing import TYPE_CHECKING, Any, Dict, List, Optional, TypeVar+from typing import TYPE_CHECKING, Any, Optional, TypeVar-from openviking.utils.time_utils import get_current_timestampfrom openviking_cli.exceptions import (InvalidArgumentError,ResourceExhaustedError,@@ -138,31 +136,6 @@ _ABSTRACT_WORKER_COUNT = _get_abstract_worker_count()_DEFAULT_GREP_FILE_CONCURRENCY = 32-# ========== Dataclass ==========---@dataclass-class RelationEntry:- """Relation table entry."""-- id: str- uris: List[str]- reason: str = ""- created_at: str = field(default_factory=get_current_timestamp)-- def to_dict(self) -> Dict[str, Any]:- return {- "id": self.id,- "uris": self.uris,- "reason": self.reason,- "created_at": self.created_at,- }-- @staticmethod- def from_dict(data: Dict[str, Any]) -> "RelationEntry":- return RelationEntry(**data)--# ========== Singleton Pattern ==========_instance: Optional["Any"] = Nonediff --git a/openviking/storage/viking_fs/_semantic.py b/openviking/storage/viking_fs/_semantic.pyindex 6502181c7..f89cf0300 100644--- a/openviking/storage/viking_fs/_semantic.py+++ b/openviking/storage/viking_fs/_semantic.py@@ -1,9 +1,8 @@# Copyright (c) 2026 Beijing Volcano Engine Technology Co., Ltd.# SPDX-License-Identifier: AGPL-3.0-"""Semantic retrieval and relation management mixin for VikingFS."""+"""Semantic retrieval mixin for VikingFS."""import asyncio-import jsonfrom typing import Any, Dict, List, Optional, Unionfrom openviking.core.context import ContextLevel@@ -12,7 +11,6 @@ from openviking.server.error_mapping import is_not_found_error, map_exceptionfrom openviking.server.identity import RequestContextfrom openviking.storage.semantic_sidecar import body_for_preview, render_semantic_sidecarfrom openviking.storage.viking_fs._base import (- RelationEntry,_ensure_non_empty_search_query,logger,)@@ -22,7 +20,7 @@ from openviking_cli.exceptions import NotFoundErrorclass _SemanticMixin:- """Abstract/overview/relations/find/search/link (semantic retrieval layer)."""+ """Abstract/overview/find/search semantic retrieval layer."""# ========== VikingFS Specific Capabilities ==========@@ -182,24 +180,6 @@ class _SemanticMixin:return body_for_preview(self._decode_bytes(content_bytes))- async def relations(- self,- uri: str,- ctx: Optional[RequestContext] = None,- ) -> List[Dict[str, Any]]:- """Get relation list.-- Returns: [{"uri": "...", "reason": "..."}, ...]- """- self._ensure_access(uri, ctx)- entries = await self.get_relation_table(uri, ctx=ctx)- result = []- for entry in entries:- for u in entry.uris:- if self._is_accessible(u, self._ctx_or_default(ctx)):- result.append({"uri": u, "reason": entry.reason})- return result-async def find(self,query: str,@@ -443,164 +423,6 @@ class _SemanticMixin:telemetry.set("vector.returned", find_result.total)return find_result- # ========== Relation Management ==========-- async def link(- self,- from_uri: str,- uris: Union[str, List[str]],- reason: str = "",- ctx: Optional[RequestContext] = None,- ) -> None:- """Create relation (maintained in .relations.json)."""- if isinstance(uris, str):- uris = [uris]- self._ensure_mutable_access(from_uri, ctx)- for uri in uris:- self._ensure_access(uri, ctx)-- from_path = self._uri_to_path(from_uri, ctx=ctx)-- entries = await self._read_relation_table(from_path, ctx=ctx)- existing_ids = {e.id for e in entries}-- link_id = next(f"link_{i}" for i in range(1, 10000) if f"link_{i}" not in existing_ids)-- entries.append(RelationEntry(id=link_id, uris=uris, reason=reason))-- await self._write_relation_table(from_path, entries, ctx=ctx)- logger.debug(f"[VikingFS] Created link: {from_uri} -> {uris}")-- async def unlink(- self,- from_uri: str,- uri: str,- ctx: Optional[RequestContext] = None,- ) -> None:- """Delete relation."""- self._ensure_mutable_access(from_uri, ctx)- self._ensure_access(uri, ctx)- from_path = self._uri_to_path(from_uri, ctx=ctx)-- try:- entries = await self._read_relation_table(from_path, ctx=ctx)-- entry_to_modify = None- for entry in entries:- if uri in entry.uris:- entry_to_modify = entry- break-- if not entry_to_modify:- logger.debug(f"[VikingFS] URI not found in relations: {uri}")- return-- entry_to_modify.uris.remove(uri)-- if not entry_to_modify.uris:- entries.remove(entry_to_modify)- logger.debug(f"[VikingFS] Removed empty entry: {entry_to_modify.id}")-- await self._write_relation_table(from_path, entries, ctx=ctx)- logger.debug(f"[VikingFS] Removed link: {from_uri} -> {uri}")-- except Exception as e:- logger.error(f"[VikingFS] Failed to unlink {from_uri} -> {uri}: {e}")- raise IOError(f"Failed to unlink: {e}")-- async def get_relation_table(- self, uri: str, ctx: Optional[RequestContext] = None- ) -> List[RelationEntry]:- """Get relation table."""- self._ensure_access(uri, ctx)- path = self._uri_to_path(uri, ctx=ctx)- return await self._read_relation_table(path, ctx=ctx)-- # ========== Relation Table Internal Methods ==========-- async def _read_relation_table(- self, dir_path: str, ctx: Optional[RequestContext] = None- ) -> List[RelationEntry]:- """Read .relations.json."""- table_path = f"{dir_path}/.relations.json"- try:- content = self._handle_agfs_read(await self._async_agfs.read(table_path))- data = json.loads(content.decode("utf-8"))- except FileNotFoundError:- return []- except Exception:- # logger.warning(f"[VikingFS] Failed to read relation table {table_path}: {e}")- return []-- entries = []- # Compatible with old format (nested) and new format (flat)- if isinstance(data, list):- # New format: flat list- for entry_data in data:- entries.append(RelationEntry.from_dict(entry_data))- elif isinstance(data, dict):- # Old format: nested {namespace: {user: [entries]}}- for _namespace, user_dict in data.items():- for _user, entry_list in user_dict.items():- for entry_data in entry_list:- entries.append(RelationEntry.from_dict(entry_data))- return entries-- async def _write_relation_table(- self, dir_path: str, entries: List[RelationEntry], ctx: Optional[RequestContext] = None- ) -> None:- """Write .relations.json."""- # Use flat list format- data = [entry.to_dict() for entry in entries]-- content = json.dumps(data, ensure_ascii=False, indent=2)- table_path = f"{dir_path}/.relations.json"- if isinstance(content, str):- content = content.encode("utf-8")-- await self._async_agfs.write(table_path, content)-- async def get_relations(self, uri: str, ctx: Optional[RequestContext] = None) -> List[str]:- """Get all related URIs (backward compatible)."""- entries = await self.get_relation_table(uri, ctx=ctx)- real_ctx = self._ctx_or_default(ctx)- all_uris = []- for entry in entries:- for related in entry.uris:- if self._is_accessible(related, real_ctx):- all_uris.append(related)- return all_uris-- async def get_relations_with_content(- self,- uri: str,- include_l0: bool = True,- include_l1: bool = False,- ctx: Optional[RequestContext] = None,- ) -> List[Dict[str, Any]]:- """Get related URIs and their content (backward compatible)."""- relation_uris = await self.get_relations(uri, ctx=ctx)- if not relation_uris:- return []-- results = []- abstracts = {}- overviews = {}- if include_l0:- abstracts = await self.read_batch(relation_uris, level="l0", ctx=ctx)- if include_l1:- overviews = await self.read_batch(relation_uris, level="l1", ctx=ctx)-- for rel_uri in relation_uris:- info = {"uri": rel_uri}- if include_l0:- info["abstract"] = abstracts.get(rel_uri, "")- if include_l1:- info["overview"] = overviews.get(rel_uri, "")- results.append(info)-- return results-async def write_context(self,uri: str,diff --git a/openviking/telemetry/operation.py b/openviking/telemetry/operation.pyindex a55242234..c574e48e2 100644--- a/openviking/telemetry/operation.py+++ b/openviking/telemetry/operation.py@@ -80,7 +80,6 @@ class TelemetrySummaryBuilder:"create_memory_ms": "memory.extract.stage.create_memory.duration_ms","merge_existing_ms": "memory.extract.stage.merge_existing.duration_ms","delete_existing_ms": "memory.extract.stage.delete_existing.duration_ms",- "create_relations_ms": "memory.extract.stage.create_relations.duration_ms","flush_semantic_ms": "memory.extract.stage.flush_semantic.duration_ms",}_RESOURCE_FLAG_KEYS = {diff --git a/openviking_cli/retrieve/__init__.py b/openviking_cli/retrieve/__init__.pyindex 923d3c50b..211a0ad33 100644--- a/openviking_cli/retrieve/__init__.py+++ b/openviking_cli/retrieve/__init__.py@@ -4,7 +4,6 @@ from openviking_cli.retrieve.types import (MatchedContext,QueryPlan,QueryResult,- RelatedContext,TypedQuery,)@@ -13,7 +12,6 @@ __all__ = ["ContextType","TypedQuery","QueryPlan",- "RelatedContext","MatchedContext","QueryResult","FindResult",diff --git a/openviking_cli/retrieve/types.py b/openviking_cli/retrieve/types.pyindex d9e03c92c..2cf2e6f0b 100644--- a/openviking_cli/retrieve/types.py+++ b/openviking_cli/retrieve/types.py@@ -271,14 +271,6 @@ class QueryPlan:reasoning: str-@dataclass-class RelatedContext:- """Related context with summary."""-- uri: str- abstract: str--@dataclassclass MatchedContext:"""Matched context from retrieval."""@@ -292,7 +284,6 @@ class MatchedContext:score: float = 0.0match_reason: str = ""- relations: List[RelatedContext] = field(default_factory=list)search_tags: List[str] = field(default_factory=list)@@ -430,10 +421,6 @@ class FindResult:category=d.get("category", ""),score=d.get("score", 0.0),match_reason=d.get("match_reason", ""),- relations=[- RelatedContext(uri=r.get("uri", ""), abstract=r.get("abstract", ""))- for r in d.get("relations", [])- ],search_tags=list(d.get("tags") or d.get("search_tags") or []),)diff --git a/sdk/go/README.md b/sdk/go/README.mdindex 9d51f642c..c8fa8b5df 100644--- a/sdk/go/README.md+++ b/sdk/go/README.md@@ -144,7 +144,6 @@ Implemented:| Watch management | `ListWatches`, `GetWatch`, `UpdateWatch`, `DeleteWatch`, `TriggerWatch` || Filesystem and content | `List`, `Tree`, `Stat`, `Attrs`, `Mkdir`, `Remove`, `Move`, `Read`, `Abstract`, `Overview`, `Write`, `SetTags`, `Reindex` || Retrieval | `Find`, `Search`, `Grep`, `Glob` |-| Relations | `Relations`, `Link`, `Unlink` || Sessions and tasks | `CreateSession`, `ListSessions`, `GetSession`, `UpdateSessionConfig`, `SessionExists`, `GetSessionContext`, `GetSessionArchive`, `DeleteSession`, `AddMessage`, `BatchAddMessages`, `CommitSession`, `GetTask`, `ListTasks` || Packs | `ExportOVPack`, `BackupOVPack`, `ImportOVPack`, `RestoreOVPack` || System and observer | `Health`, `CheckConsistency`, `GetStatus`, `IsHealthy`, `QueueStatus`, `VikingDBStatus`, `ModelsStatus` |diff --git a/sdk/go/README_CN.md b/sdk/go/README_CN.mdindex e510e0d36..7b6a4b228 100644--- a/sdk/go/README_CN.md+++ b/sdk/go/README_CN.md@@ -70,7 +70,6 @@ _, _, _ = imageResults, storedImageResults, similarPosters| Watch 管理 | `ListWatches`, `GetWatch`, `UpdateWatch`, `DeleteWatch`, `TriggerWatch` || 文件系统和内容 | `List`, `Tree`, `Stat`, `Attrs`, `Mkdir`, `Remove`, `Move`, `Read`, `Abstract`, `Overview`, `Write`, `SetTags`, `Reindex` || 检索 | `Find`, `Search`, `Grep`, `Glob` |-| 关系 | `Relations`, `Link`, `Unlink` || 会话和任务 | `CreateSession`, `ListSessions`, `GetSession`, `UpdateSessionConfig`, `SessionExists`, `GetSessionContext`, `GetSessionArchive`, `DeleteSession`, `AddMessage`, `BatchAddMessages`, `CommitSession`, `GetTask`, `ListTasks` || OVPack | `ExportOVPack`, `BackupOVPack`, `ImportOVPack`, `RestoreOVPack` || 系统和 observer | `Health`, `CheckConsistency`, `GetStatus`, `IsHealthy`, `QueueStatus`, `VikingDBStatus`, `ModelsStatus` |diff --git a/sdk/go/client_test.go b/sdk/go/client_test.goindex ff981c192..c64256eb8 100644--- a/sdk/go/client_test.go+++ b/sdk/go/client_test.go@@ -510,46 +510,6 @@ func TestSearchSendsImageURI(t *testing.T) {}}-func TestRelationRequests(t *testing.T) {- client, closeServer := testClient(t, http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {- switch r.Method + " " + r.URL.Path {- case "GET /api/v1/relations":- if got := r.URL.Query().Get("uri"); got != "viking://resources/from" {- t.Fatalf("uri = %q", got)- }- writeOK(t, w, []map[string]any{{"uri": "viking://resources/to"}})- case "POST /api/v1/relations/link":- body := readJSONBody(t, r)- targets, ok := body["to_uris"].([]any)- if body["from_uri"] != "viking://resources/from" || body["reason"] != "related" ||- !ok || len(targets) != 1 || targets[0] != "viking://resources/to" {- t.Fatalf("link body = %#v", body)- }- writeOK(t, w, map[string]any{"linked": true})- case "DELETE /api/v1/relations/link":- body := readJSONBody(t, r)- if body["from_uri"] != "viking://resources/from" || body["to_uri"] != "viking://resources/to" {- t.Fatalf("unlink body = %#v", body)- }- writeOK(t, w, map[string]any{"unlinked": true})- default:- t.Fatalf("unexpected request %s %s", r.Method, r.URL.Path)- }- }))- defer closeServer()-- relations, err := client.Relations(context.Background(), "resources/from")- if err != nil || len(relations) != 1 {- t.Fatalf("relations = %#v, err = %v", relations, err)- }- if err := client.Link(context.Background(), "resources/from", []string{"resources/to"}, "related"); err != nil {- t.Fatal(err)- }- if err := client.Unlink(context.Background(), "resources/from", "resources/to"); err != nil {- t.Fatal(err)- }-}-func TestErrorEnvelopePreservesCodeDetailsAndStatus(t *testing.T) {client, closeServer := testClient(t, http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {writeAPIError(t, w, http.StatusNotFound, "NOT_FOUND", map[string]any{"resource": "viking://resources/missing"})diff --git a/sdk/go/relations.go b/sdk/go/relations.godeleted file mode 100644index c062df5ca..000000000--- a/sdk/go/relations.go+++ /dev/null@@ -1,34 +0,0 @@-package openviking--import (- "context"- "net/http"- "net/url"-)--// Relations returns the relations associated with a resource.-func (c *Client) Relations(ctx context.Context, uri string) ([]map[string]any, error) {- query := url.Values{"uri": []string{NormalizeURI(uri)}}- var result []map[string]any- err := c.doJSON(ctx, http.MethodGet, "/api/v1/relations", query, nil, &result)- return result, err-}--// Link creates relations from one resource to a string or []string target.-func (c *Client) Link(ctx context.Context, fromURI string, toURIs any, reason string) error {- payload := map[string]any{- "from_uri": NormalizeURI(fromURI),- "to_uris": normalizeTarget(toURIs),- "reason": reason,- }- return c.doJSON(ctx, http.MethodPost, "/api/v1/relations/link", nil, payload, nil)-}--// Unlink removes a resource relation.-func (c *Client) Unlink(ctx context.Context, fromURI, toURI string) error {- payload := map[string]any{- "from_uri": NormalizeURI(fromURI),- "to_uri": NormalizeURI(toURI),- }- return c.doJSON(ctx, http.MethodDelete, "/api/v1/relations/link", nil, payload, nil)-}diff --git a/sdk/go/types.go b/sdk/go/types.goindex f7581c846..4a88cab94 100644--- a/sdk/go/types.go+++ b/sdk/go/types.go@@ -340,16 +340,6 @@ type MatchedContext struct {Category string `json:"category,omitempty"`Score float64 `json:"score,omitempty"`MatchReason string `json:"match_reason,omitempty"`- Relations []RelatedContext `json:"relations,omitempty"`-}--// RelatedContext is a related context reference attached to a retrieval hit.-type RelatedContext struct {- URI string `json:"uri,omitempty"`- Reason string `json:"reason,omitempty"`- Score float64 `json:"score,omitempty"`- Relation string `json:"relation,omitempty"`- RelationID string `json:"relation_id,omitempty"`}// QueryPlan describes search query expansion details when the server returns them.diff --git a/sdk/python/openviking_sdk/client.py b/sdk/python/openviking_sdk/client.pyindex f045bd68e..3f1dd6956 100644--- a/sdk/python/openviking_sdk/client.py+++ b/sdk/python/openviking_sdk/client.py@@ -1338,39 +1338,6 @@ class AsyncHTTPClient:)return self._handle_response(response)- async def relations(self, uri: str) -> List[Any]:- response = await self._request(- "GET", "/api/v1/relations", params={"uri": VikingURI.normalize(uri)}- )- return self._handle_response(response)-- async def link(self, from_uri: str, to_uris: Union[str, List[str]], reason: str = "") -> None:- if isinstance(to_uris, str):- to_uris = VikingURI.normalize(to_uris)- else:- to_uris = [VikingURI.normalize(u) for u in to_uris]- response = await self._request(- "POST",- "/api/v1/relations/link",- json={- "from_uri": VikingURI.normalize(from_uri),- "to_uris": to_uris,- "reason": reason,- },- )- self._handle_response(response)-- async def unlink(self, from_uri: str, to_uri: str) -> None:- response = await self._request(- "DELETE",- "/api/v1/relations/link",- json={- "from_uri": VikingURI.normalize(from_uri),- "to_uri": VikingURI.normalize(to_uri),- },- )- self._handle_response(response)-async def create_session(self,session_id: Optional[str] = None,@@ -2395,15 +2362,6 @@ class SyncHTTPClient:) -> Dict[str, Any]:return run_async(self._async_client.glob(pattern, uri=uri, node_limit=node_limit))- def relations(self, uri: str) -> List[Any]:- return run_async(self._async_client.relations(uri))-- def link(self, from_uri: str, to_uris: Union[str, List[str]], reason: str = "") -> None:- run_async(self._async_client.link(from_uri, to_uris, reason=reason))-- def unlink(self, from_uri: str, to_uri: str) -> None:- run_async(self._async_client.unlink(from_uri, to_uri))-def create_session(self,session_id: Optional[str] = None,diff --git a/sdk/python/tests/test_async_client_behaviors.py b/sdk/python/tests/test_async_client_behaviors.pyindex bd34b1553..f17e34957 100644--- a/sdk/python/tests/test_async_client_behaviors.py+++ b/sdk/python/tests/test_async_client_behaviors.py@@ -1004,25 +1004,6 @@ async def test_batch_write_http_timeout_outlives_server_wait_timeout():assert request_timeout.connect == 180.0-async def test_link_normalizes_single_and_multiple_target_uris():- client = AsyncHTTPClient(url="http://localhost:1933")- fake_http = SimpleNamespace(post=AsyncMock(return_value=object()))- client._http = fake_http- client._handle_response = lambda _response: None-- await client.link("/resources/from", ["/resources/a", "viking://resources/b"], reason="demo")-- fake_http.post.assert_awaited_once_with(- "/api/v1/relations/link",- json={- "from_uri": "viking://resources/from",- "to_uris": ["viking://resources/a", "viking://resources/b"],- "reason": "demo",- },- )--@pytest.mark.asyncioasync def test_watch_routes_support_uri_lookup_and_normalization():client = AsyncHTTPClient(url="http://localhost:1933")diff --git a/sdk/typescript/README.md b/sdk/typescript/README.mdindex cdc4e45d9..49dc0d139 100644--- a/sdk/typescript/README.md+++ b/sdk/typescript/README.md@@ -20,7 +20,7 @@ const results = await client.search("deployment guide", {});```-The client follows the same HTTP API, identity headers, response envelope and error codes as `openviking-sdk` for Python and the Go SDK. It supports resources and skills, filesystem/content operations, relations, retrieval, sessions, OVPack files, snapshots, tasks, watches, observer status and tenant administration.+The client follows the same HTTP API, identity headers, response envelope and error codes as `openviking-sdk` for Python and the Go SDK. It supports resources and skills, filesystem/content operations, retrieval, sessions, OVPack files, snapshots, tasks, watches, observer status and tenant administration.Existing local file paths are uploaded automatically, and local directories are zipped before upload. Other strings are sent to the server as URLs or server-side paths.diff --git a/sdk/typescript/src/client.ts b/sdk/typescript/src/client.tsindex 35e48c5c3..e441d6f3c 100644--- a/sdk/typescript/src/client.ts+++ b/sdk/typescript/src/client.ts@@ -384,38 +384,6 @@ export class OpenVikingClient {body: { pattern, uri: normalizeURI(uri), node_limit: nodeLimit },});}- /** Return relations associated with a resource. */- relations(uri: string): Promise<unknown[]> {- return this.request("GET", "/api/v1/relations", {- query: { uri: normalizeURI(uri) },- });- }- /** Create one or more resource relations. */- async link(- fromUri: string,- toUris: string | string[],- reason = "",- ): Promise<void> {- await this.request("POST", "/api/v1/relations/link", {- body: {- from_uri: normalizeURI(fromUri),- to_uris: Array.isArray(toUris)- ? toUris.map(normalizeURI)- : normalizeURI(toUris),- reason,- },- });- }- /** Remove a resource relation. */- async unlink(fromUri: string, toUri: string): Promise<void> {- await this.request("DELETE", "/api/v1/relations/link", {- body: {- from_uri: normalizeURI(fromUri),- to_uri: normalizeURI(toUri),- },- });- }-/** List directory contents. */list(uri: string, options: ListOptions = {}): Promise<unknown[]> {return this.request("GET", "/api/v1/fs/ls", {diff --git a/sdk/typescript/tests/client.test.ts b/sdk/typescript/tests/client.test.tsindex af38042e8..bcbc408f7 100644--- a/sdk/typescript/tests/client.test.ts+++ b/sdk/typescript/tests/client.test.ts@@ -734,12 +734,9 @@ describe("OpenVikingClient", () => {}});- it("maps relation and snapshot APIs to the Python contracts", async () => {+ it("maps snapshot and health APIs to the Python contracts", async () => {const fetcher = vi.fn<typeof fetch>()- .mockResolvedValueOnce(ok([]))- .mockResolvedValueOnce(ok({}))- .mockResolvedValueOnce(ok({})).mockResolvedValueOnce(ok({ oid: "commit" })).mockResolvedValueOnce(ok({ is_healthy: true }));const client = new OpenVikingClient({@@ -747,20 +744,10 @@ describe("OpenVikingClient", () => {fetch: fetcher,});- await client.relations("resources/a");- await client.link("resources/a", ["resources/b"]);- await client.unlink("resources/a", "resources/b");await client.gitCommit({ message: "snapshot" });await expect(client.isHealthy()).resolves.toBe(true);- expect(String(fetcher.mock.calls[0]![0])).toContain(- "uri=viking%3A%2F%2Fresources%2Fa",- );- expect(JSON.parse(String(fetcher.mock.calls[1]![1]?.body))).toMatchObject({- from_uri: "viking://resources/a",- to_uris: ["viking://resources/b"],- });- expect(JSON.parse(String(fetcher.mock.calls[3]![1]?.body))).toEqual({+ expect(JSON.parse(String(fetcher.mock.calls[0]![1]?.body))).toEqual({message: "snapshot",branch: "main",});diff --git a/sdk/typescript/tests/node-consumer/index.ts b/sdk/typescript/tests/node-consumer/index.tsindex acdef1158..dc49721dc 100644--- a/sdk/typescript/tests/node-consumer/index.ts+++ b/sdk/typescript/tests/node-consumer/index.ts@@ -19,4 +19,3 @@ client.importOVPack("./docs.ovpack", "viking://resources", {// @ts-expect-error OVPack conflict policies are restricted by the server.client.restoreOVPack("./docs.ovpack", { onConflict: "replace" });client.gitCommit({ message: "snapshot", branch: "main" });-client.relations("viking://resources/docs");diff --git a/tests/README.md b/tests/README.mdindex f05522ec2..4c8f431e3 100644--- a/tests/README.md+++ b/tests/README.md@@ -134,7 +134,6 @@ Tests for the OpenViking HTTP server API and AsyncHTTPClient SDK.| `test_api_content.py` | Content endpoints | `read`, `abstract`, `overview` || `test_api_search.py` | Search endpoints | `find` with target_uri/score_threshold, `search` with session, `grep` case-insensitive, `glob` || `test_api_sessions.py` | Session endpoints | Create, list, get, delete session; add messages; compress; extract |-| `test_api_relations.py` | Relations endpoints | Get relations, link single/multiple targets, unlink || `test_api_observer.py` | Observer endpoints | Queue, VikingDB, VLM, system observer status || `test_error_scenarios.py` | Error handling | Invalid JSON, missing fields, not found, wrong content type, invalid URI format || `test_http_client_sdk.py` | AsyncHTTPClient SDK E2E | Health, add resource, wait, ls, mkdir, tree, session lifecycle, find, full workflow (real HTTP server) |diff --git a/tests/agfs/test_viking_fs_git.py b/tests/agfs/test_viking_fs_git.pyindex 0985e904e..5896be325 100644--- a/tests/agfs/test_viking_fs_git.py+++ b/tests/agfs/test_viking_fs_git.py@@ -573,7 +573,7 @@ def test_classify_restore_path(vfs):ContextLevel.OVERVIEW,)- # .relations.json has no vector side-effect+ # .relations.json is an obsolete sidecar with no vector side-effect.assert vfs._classify_restore_path("resources/proj/.relations.json", deleted=False) is Noneassert vfs._classify_restore_path("resources/proj/.relations.json", deleted=True) is Nonediff --git a/tests/api_test/api/client.py b/tests/api_test/api/client.pyindex 5b5b92241..29aca7e38 100644--- a/tests/api_test/api/client.py+++ b/tests/api_test/api/client.py@@ -476,24 +476,6 @@ class OpenVikingAPIClient:url = self._build_url(self.server_url, endpoint)return self.session.post(url, json={"from_uri": from_uri, "to_uri": to_uri})- def link(self, from_uri: str, to_uris: Any, reason: str = "") -> requests.Response:- endpoint = "/api/v1/relations/link"- url = self._build_url(self.server_url, endpoint)- return self.session.post(- url, json={"from_uri": from_uri, "to_uris": to_uris, "reason": reason}- )-- def relations(self, uri: str) -> requests.Response:- endpoint = "/api/v1/relations"- params = {"uri": uri}- url = self._build_url(self.server_url, endpoint, params)- return self.session.get(url)-- def unlink(self, from_uri: str, to_uri: str) -> requests.Response:- endpoint = "/api/v1/relations/link"- url = self._build_url(self.server_url, endpoint)- return self.session.delete(url, json={"from_uri": from_uri, "to_uri": to_uri})-def session_used(self,session_id: str,diff --git a/tests/api_test/conftest.py b/tests/api_test/conftest.pyindex b804c983f..0bec69289 100644--- a/tests/api_test/conftest.py+++ b/tests/api_test/conftest.py@@ -19,7 +19,6 @@ TEST_CASE_DESCRIPTIONS = {"test_fs_tree.py::TestFsTree::test_fs_tree": "获取目录树结构","test_get_abstract.py::TestGetAbstract::test_get_abstract": "获取内容摘要","test_get_overview.py::TestGetOverview::test_get_overview": "获取内容概览",- "test_link_relations.py::TestLinkRelations::test_link_relations_unlink": "管理内容关联关系","test_add_message.py::TestAddMessage::test_add_message": "向会话添加消息","test_create_session.py::TestCreateSession::test_create_session": "创建会话","test_delete_session.py::TestDeleteSession::test_delete_session": "删除会话",@@ -51,7 +50,6 @@ TEST_CASE_DESCRIPTIONS = {"test_delete_sync.py::TestDeleteSync::test_resource_deletion_index_sync": "资源删除索引同步","test_pack_consistency.py::TestPackConsistency::test_pack_export_import_consistency": "批量导入导出一致性","test_intent_extended_search.py::TestIntentExtendedSearch::test_intent_extended_search": "意图扩展搜索",- "test_relation_link.py::TestRelationLink::test_relation_link": "关系链接验证","test_watch_update.py::TestWatchUpdate::test_watch_update": "定时监听更新","test_session_commit.py::TestSessionCommit::test_session_persistence_and_commit": "对话持久化与Commit","test_long_context_recall.py::TestLongContextRecall::test_long_context_recall": "长程上下文召回",@@ -118,7 +116,6 @@ TEST_CASE_APIS = {"test_fs_tree.py::TestFsTree::test_fs_tree": "/api/v1/fs/tree","test_get_abstract.py::TestGetAbstract::test_get_abstract": "/api/v1/fs/abstract","test_get_overview.py::TestGetOverview::test_get_overview": "/api/v1/fs/overview",- "test_link_relations.py::TestLinkRelations::test_link_relations_unlink": "/api/v1/fs/relations","test_add_message.py::TestAddMessage::test_add_message": "/api/v1/sessions/messages","test_create_session.py::TestCreateSession::test_create_session": "/api/v1/sessions","test_delete_session.py::TestDeleteSession::test_delete_session": "/api/v1/sessions",@@ -150,7 +147,6 @@ TEST_CASE_APIS = {"test_delete_sync.py::TestDeleteSync::test_resource_deletion_index_sync": "/api/v1/resources,/api/v1/fs/rm,/api/v1/search/find","test_pack_consistency.py::TestPackConsistency::test_pack_export_import_consistency": "/api/v1/resources/pack/export,/api/v1/resources/pack/import","test_intent_extended_search.py::TestIntentExtendedSearch::test_intent_extended_search": "/api/v1/sessions,/api/v1/search",- "test_relation_link.py::TestRelationLink::test_relation_link": "/api/v1/fs/relations/link,/api/v1/search/find","test_watch_update.py::TestWatchUpdate::test_watch_update": "/api/v1/resources,/api/v1/system/wait,/api/v1/search","test_session_commit.py::TestSessionCommit::test_session_persistence_and_commit": "/api/v1/sessions,/api/v1/sessions/messages,/api/v1/sessions/commit","test_long_context_recall.py::TestLongContextRecall::test_long_context_recall": "/api/v1/sessions/messages,/api/v1/sessions/commit,/api/v1/search",diff --git a/tests/api_test/filesystem/test_link_relations.py b/tests/api_test/filesystem/test_link_relations.pydeleted file mode 100644index b7e3bd92a..000000000--- a/tests/api_test/filesystem/test_link_relations.py+++ /dev/null@@ -1,63 +0,0 @@-import json---class TestLinkRelations:- def test_link_relations_unlink(self, api_client):- try:- response = api_client.fs_ls("viking://")- print(f"\nList root directory API status code: {response.status_code}")- assert response.status_code == 200, (- f"Failed to list root directory: {response.status_code}"- )-- data = response.json()- assert data.get("status") == "ok", f"Expected status 'ok', got {data.get('status')}"- assert data.get("error") is None, f"Expected error to be null, got {data.get('error')}"-- result = data.get("result", [])- assert len(result) >= 2, (- f"Not enough files in root directory to test link/relations/unlink, found {len(result)} files"- )-- file1 = result[0].get("uri")- file2 = result[1].get("uri")-- assert file1 is not None, "First file URI should not be None"- assert file2 is not None, "Second file URI should not be None"-- response = api_client.link(file1, [file2], "Test link")- print(f"\nLink API status code: {response.status_code}")- data = response.json()- print("\n" + "=" * 80)- print("Link API Response:")- print("=" * 80)- print(json.dumps(data, indent=2, ensure_ascii=False))- print("=" * 80 + "\n")- assert data.get("status") == "ok", f"Expected status 'ok', got {data.get('status')}"- assert data.get("error") is None, f"Expected error to be null, got {data.get('error')}"-- response = api_client.relations(file1)- print(f"\nRelations API status code: {response.status_code}")- data = response.json()- print("\n" + "=" * 80)- print("Relations API Response:")- print("=" * 80)- print(json.dumps(data, indent=2, ensure_ascii=False))- print("=" * 80 + "\n")- assert data.get("status") == "ok", f"Expected status 'ok', got {data.get('status')}"- assert data.get("error") is None, f"Expected error to be null, got {data.get('error')}"-- response = api_client.unlink(file1, file2)- print(f"\nUnlink API status code: {response.status_code}")- data = response.json()- print("\n" + "=" * 80)- print("Unlink API Response:")- print("=" * 80)- print(json.dumps(data, indent=2, ensure_ascii=False))- print("=" * 80 + "\n")- assert data.get("status") == "ok", f"Expected status 'ok', got {data.get('status')}"- assert data.get("error") is None, f"Expected error to be null, got {data.get('error')}"-- except Exception as e:- print(f"Error: {e}")- raisediff --git a/tests/api_test/scenarios/resources_retrieval/test_relation_link.py b/tests/api_test/scenarios/resources_retrieval/test_relation_link.pydeleted file mode 100644index 8913bf7d5..000000000--- a/tests/api_test/scenarios/resources_retrieval/test_relation_link.py+++ /dev/null@@ -1,100 +0,0 @@-import os-import shutil-import uuid--from conftest import create_test_file---class TestRelationLink:- """TC-R07 关系链接验证-- 根据API文档:- - link(): POST /api/v1/relations/link- - 用于建立资源之间的关系- - 参数:from_uri, to_uris, reason- """-- def test_relation_link(self, api_client):- """关系链接验证:添加资源A和B -> link(A, B) -> 验证关系建立"""- random_id = str(uuid.uuid4())[:8]-- # 1. 创建两个临时测试文件- test_file_a, temp_dir_a = create_test_file(- content=f"资源A {random_id}\n这是资源A的内容。\n包含关键词:testA、资源、链接。"- )- test_file_b, temp_dir_b = create_test_file(- content=f"资源B {random_id}\n这是资源B的内容。\n包含关键词:testB、资源、链接。\n与资源A相关。"- )-- try:- # 2. 添加资源A- response = api_client.add_resource(path=test_file_a, wait=True)- assert response.status_code == 200- add_data_a = response.json()- assert add_data_a.get("status") == "ok"- uri_a = add_data_a.get("result", {}).get("root_uri")- assert uri_a is not None- print(f"资源A添加成功: {uri_a}")-- # 3. 添加资源B- response = api_client.add_resource(path=test_file_b, wait=True)- assert response.status_code == 200- add_data_b = response.json()- assert add_data_b.get("status") == "ok"- uri_b = add_data_b.get("result", {}).get("root_uri")- assert uri_b is not None- print(f"资源B添加成功: {uri_b}")-- # 4. 等待处理完成- response = api_client.wait_processed()- assert response.status_code == 200-- # 5. 建立关系链接 A -> B- response = api_client.link(- from_uri=uri_a, to_uris=[uri_b], reason=f"测试关系链接 {random_id}"- )-- # 验证link API调用成功- if response.status_code == 200:- link_data = response.json()- assert link_data.get("status") == "ok"- print(f"关系链接建立成功: {uri_a} -> {uri_b}")- else:- print(f"关系链接API返回: {response.status_code}")-- # 6. 验证搜索功能正常- response = api_client.search("testA")- assert response.status_code == 200-- search_data = response.json()- assert search_data.get("status") == "ok"- assert "result" in search_data-- search_result = search_data["result"]-- # 7. 验证搜索结果结构- assert (- "memories" in search_result- or "resources" in search_result- or "results" in search_result- )-- # 8. 验证资源A能被搜索到- for field in ["resources", "memories", "results"]:- if field in search_result:- items = search_result[field]- for item in items:- if "uri" in item and uri_a in item["uri"]:- # 验证关系是否被正确返回- if "relations" in item:- relations = item["relations"]- print(f"资源A的关系: {relations}")- break-- print("✓ 关系链接测试通过")- finally:- # 清理临时文件- if os.path.exists(temp_dir_a):- shutil.rmtree(temp_dir_a)- if os.path.exists(temp_dir_b):- shutil.rmtree(temp_dir_b)diff --git a/tests/cli/test_cli_relations.py b/tests/cli/test_cli_relations.pydeleted file mode 100644index 71c510438..000000000--- a/tests/cli/test_cli_relations.py+++ /dev/null@@ -1,53 +0,0 @@-# Copyright (c) 2026 Beijing Volcano Engine Technology Co., Ltd.-# SPDX-License-Identifier: AGPL-3.0-"""CLI relations operation tests (relations, link, unlink)."""--import os-import tempfile-import uuid--import pytest-from conftest import ov, ov_add_resource, ov_rm--pytestmark = pytest.mark.cli_remote---class TestRelations:- def test_relations(self, test_pack_uri):- r = ov(["relations", test_pack_uri, "-o", "json"])- assert r["exit_code"] == 0, (- f"ov relations should exit 0, got {r['exit_code']}: {r['stderr'][:300]}"- )- data = r["json"]- assert data.get("ok") is True, f"Expected ok=true, got {data.get('ok')}"- assert "result" in data, "'result' field should exist"---class TestLinkUnlink:- def test_link_and_unlink(self, test_dir_uri, test_pack_uri):- second_pack_uri = f"{test_dir_uri}/link_{uuid.uuid4().hex[:6]}"- with tempfile.NamedTemporaryFile(suffix=".txt", delete=False, mode="w") as f:- f.write("# Link Target\n\nThis is a link target file.")- temp_path = f.name- try:- ov_add_resource(temp_path, second_pack_uri)- finally:- os.unlink(temp_path)-- link_r = ov(- ["link", test_pack_uri, second_pack_uri, "--reason", "CLI test link", "-o", "json"]- )- assert link_r["exit_code"] == 0, (- f"ov link should exit 0, got {link_r['exit_code']}: {link_r['stderr'][:300]}"- )- link_data = link_r["json"]- assert link_data.get("ok") is True, f"Expected ok=true, got {link_data.get('ok')}"-- unlink_r = ov(["unlink", test_pack_uri, second_pack_uri, "-o", "json"])- assert unlink_r["exit_code"] == 0, (- f"ov unlink should exit 0, got {unlink_r['exit_code']}: {unlink_r['stderr'][:300]}"- )- unlink_data = unlink_r["json"]- assert unlink_data.get("ok") is True, f"Expected ok=true, got {unlink_data.get('ok')}"-- ov_rm(second_pack_uri)diff --git a/tests/integration/test_encryption_integration.py b/tests/integration/test_encryption_integration.pyindex 11cc4c71e..3b0ce7f07 100644--- a/tests/integration/test_encryption_integration.py+++ b/tests/integration/test_encryption_integration.py@@ -261,9 +261,6 @@ class TestVikingFSEncryptionWithAccounts:if entry["isDir"]:await _check_recursive(entry_uri)else:- # Skip .relations.json files- if ".relations.json" in entry.get("name", ""):- continuetry:self._assert_uri_encrypted(svc, ctx, test_data_dir, entry_uri)if print_paths:@@ -529,7 +526,7 @@ This is a test skill for verifying encryption functionality."""Complete encryption workflow test, implemented according to user plan:- Prerequisites: Create random account, user- - Execute tests: resource, skill, memory, session, relation operations+ - Execute tests: resource, skill, memory, and session operations- Post operations: Cleanup"""data = openviking_service_with_encryption@@ -949,58 +946,32 @@ This is a test skill for verifying encryption functionality.assert test_message in reloaded_session2.messages[0].contentprint(" ✓ read operation returns unencrypted message")- # ========== 5. Relation operations ==========+ # ========== 5. Additional resource operations ==========print("\n" + "=" * 80)- print("Execute tests: 5. Relation operations")+ print("Execute tests: 5. Additional resource operations")print("=" * 80)print("[5.1] Create two resource files directly using VikingFS")- # Create relation_test directory- relation_test_dir_uri = "viking://resources/relation_test"- await svc.viking_fs.mkdir(relation_test_dir_uri, ctx=ctx)+ # Create additional_resource_test directory+ resource_test_dir_uri = "viking://resources/additional_resource_test"+ await svc.viking_fs.mkdir(resource_test_dir_uri, ctx=ctx)# Create resource A directory and file- dir_a_uri = "viking://resources/relation_test/resource_a"+ dir_a_uri = "viking://resources/additional_resource_test/resource_a"await svc.viking_fs.mkdir(dir_a_uri, ctx=ctx)- resource_a_content = "This is resource A content for testing relation functionality."+ resource_a_content = "This is resource A content for testing encrypted resource writes."resource_a_file_uri = f"{dir_a_uri}/resource_a.txt"await svc.viking_fs.write_file(resource_a_file_uri, resource_a_content, ctx=ctx)print(f" ✓ Resource A created: {dir_a_uri}")# Create resource B directory and file- dir_b_uri = "viking://resources/relation_test/resource_b"+ dir_b_uri = "viking://resources/additional_resource_test/resource_b"await svc.viking_fs.mkdir(dir_b_uri, ctx=ctx)- resource_b_content = "This is resource B content for testing relation functionality."+ resource_b_content = "This is resource B content for testing encrypted resource writes."resource_b_file_uri = f"{dir_b_uri}/resource_b.txt"await svc.viking_fs.write_file(resource_b_file_uri, resource_b_content, ctx=ctx)print(f" ✓ Resource B created: {dir_b_uri}")- # 5.2 Create relation and check relation.json encryption- print("[5.2] Create relation A -> B")- test_reason = "Resource A and resource B are related test resources"- await svc.relations.link(from_uri=dir_a_uri, uris=dir_b_uri, ctx=ctx, reason=test_reason)- print(f" ✓ Relation created: {dir_a_uri} -> {dir_b_uri}")-- # Verify relation created successfully- relations = await svc.relations.relations(dir_a_uri, ctx=ctx)- assert len(relations) == 1- assert relations[0]["uri"] == dir_b_uri- print(" ✓ Relation created successfully")-- # Check relation file encryption- print("[5.2] Check relation.json file encryption")- try:- relation_file_uri = f"{dir_a_uri}/.relations.json"- raw_content = self._backend_file_bytes(- svc, ctx, data["test_data_dir"], relation_file_uri- )- assert raw_content.startswith(b"OVE1"), (- f"relation.json not encrypted: {relation_file_uri}"- )- print(f" ✓ [ENCRYPTED] {relation_file_uri}")- except Exception as e:- print(f" [WARNING] Error checking relation.json: {e}")-# ========== Post operations ==========print("\n" + "=" * 80)print("Post operations: Clean up test account")@@ -1264,8 +1235,6 @@ This is a file in subdir2.if entry["isDir"]:await check_encrypted_files(entry_uri)else:- if ".relations.json" in entry_name:- continuetry:raw_content = self._backend_file_bytes(svc, ctx, data["test_data_dir"], entry_uridiff --git a/tests/retrieve/test_hierarchical_retriever_rerank.py b/tests/retrieve/test_hierarchical_retriever_rerank.pyindex 288b5e139..43b5326a1 100644--- a/tests/retrieve/test_hierarchical_retriever_rerank.py+++ b/tests/retrieve/test_hierarchical_retriever_rerank.py@@ -625,22 +625,6 @@ async def test_retrieval_hotness_alpha_blends_when_configured(monkeypatch):assert result[0].score == pytest.approx(0.9)-async def test_convert_to_matched_contexts_returns_empty_relations():- retriever = HierarchicalRetriever(- storage=DummyStorage(),- embedder=None,- rerank_config=None,- )-- result = await retriever._convert_to_matched_contexts(- [_result("viking://resources/file-a", 1.0, abstract="child A")],- ctx=_ctx(),- )-- assert result[0].relations == []--@pytest.mark.asyncioasync def test_convert_to_matched_contexts_propagates_search_tags():retriever = HierarchicalRetriever(diff --git a/tests/retrieve/test_provenance.py b/tests/retrieve/test_provenance.pyindex 778159e29..6de1a3a02 100644--- a/tests/retrieve/test_provenance.py+++ b/tests/retrieve/test_provenance.py@@ -125,7 +125,7 @@ class TestMatchedContextSearchTags:)result = FindResult(memories=[], resources=[ctx], skills=[])item = result.to_dict()["resources"][0]- for dropped in ("category", "match_reason", "relations", "overview"):+ for dropped in ("category", "match_reason", "overview"):assert dropped not in itemdef test_context_to_dict_keeps_useful_fields(self):diff --git a/tests/server/test_api_content_write.py b/tests/server/test_api_content_write.pyindex 363b426ea..4e2bda395 100644--- a/tests/server/test_api_content_write.py+++ b/tests/server/test_api_content_write.py@@ -39,14 +39,21 @@ async def test_write_rejects_directory_uri(client_with_resource):assert body["error"]["code"] == "INVALID_ARGUMENT"-async def test_write_rejects_derived_file_uri(client_with_resource):+async def test_write_allows_existing_semantic_sidecar_but_rejects_relations(client_with_resource):client, uri = client_with_resource- resp = await client.post(++ overview_resp = await client.post("/api/v1/content/write",json={"uri": f"{uri}/.overview.md", "content": "new content"},)- assert resp.status_code == 400- body = resp.json()+ assert overview_resp.status_code == 200++ relations_resp = await client.post(+ "/api/v1/content/write",+ json={"uri": f"{uri}/.relations.json", "content": "new content"},+ )+ assert relations_resp.status_code == 400+ body = relations_resp.json()assert body["status"] == "error"assert body["error"]["code"] == "INVALID_ARGUMENT"diff --git a/tests/server/test_api_relations.py b/tests/server/test_api_relations.pydeleted file mode 100644index 106f9bd91..000000000--- a/tests/server/test_api_relations.py+++ /dev/null@@ -1,94 +0,0 @@-# Copyright (c) 2026 Beijing Volcano Engine Technology Co., Ltd.-# SPDX-License-Identifier: AGPL-3.0--"""Tests for relations endpoints: get relations, link, unlink."""---async def test_get_relations_empty(client_with_resource):- client, uri = client_with_resource- resp = await client.get("/api/v1/relations", params={"uri": uri})- assert resp.status_code == 200- body = resp.json()- assert body["status"] == "ok"- assert isinstance(body["result"], list)---async def test_link_and_get_relations(client_with_resource, upload_temp_dir):- client, uri = client_with_resource- # Create a second resource to link to- from tests.server.conftest import SAMPLE_MD_CONTENT-- f2 = upload_temp_dir / "link_target.md"- f2.write_text(SAMPLE_MD_CONTENT)- add_resp = await client.post(- "/api/v1/resources",- json={"temp_file_id": f2.name, "reason": "link target", "wait": True},- )- target_uri = add_resp.json()["result"]["root_uri"]-- # Create link- resp = await client.post(- "/api/v1/relations/link",- json={- "from_uri": uri,- "to_uris": target_uri,- "reason": "test link",- },- )- assert resp.status_code == 200- assert resp.json()["status"] == "ok"-- # Verify link exists- resp = await client.get("/api/v1/relations", params={"uri": uri})- assert resp.status_code == 200- body = resp.json()- assert body["status"] == "ok"- assert len(body["result"]) > 0---async def test_unlink(client_with_resource, upload_temp_dir):- client, uri = client_with_resource- from tests.server.conftest import SAMPLE_MD_CONTENT-- f2 = upload_temp_dir / "unlink_target.md"- f2.write_text(SAMPLE_MD_CONTENT)- add_resp = await client.post(- "/api/v1/resources",- json={"temp_file_id": f2.name, "reason": "unlink target", "wait": True},- )- target_uri = add_resp.json()["result"]["root_uri"]-- # Link then unlink- await client.post(- "/api/v1/relations/link",- json={"from_uri": uri, "to_uris": target_uri, "reason": "temp"},- )- resp = await client.request(- "DELETE",- "/api/v1/relations/link",- json={"from_uri": uri, "to_uri": target_uri},- )- assert resp.status_code == 200- assert resp.json()["status"] == "ok"---async def test_link_multiple_targets(client_with_resource, upload_temp_dir):- client, uri = client_with_resource- from tests.server.conftest import SAMPLE_MD_CONTENT-- targets = []- for i in range(2):- f = upload_temp_dir / f"multi_target_{i}.md"- f.write_text(SAMPLE_MD_CONTENT)- add_resp = await client.post(- "/api/v1/resources",- json={"temp_file_id": f.name, "reason": "multi", "wait": True},- )- targets.append(add_resp.json()["result"]["root_uri"])-- resp = await client.post(- "/api/v1/relations/link",- json={"from_uri": uri, "to_uris": targets, "reason": "multi link"},- )- assert resp.status_code == 200- assert resp.json()["status"] == "ok"diff --git a/tests/server/test_content_write_service.py b/tests/server/test_content_write_service.pyindex dfdad1d0a..19f8c842f 100644--- a/tests/server/test_content_write_service.py+++ b/tests/server/test_content_write_service.py@@ -10,6 +10,7 @@ import pytestfrom openviking.server.identity import RequestContext, Rolefrom openviking.session.memory.dataclass import MemoryFilefrom openviking.session.memory.utils import MemoryFileUtils+from openviking.session.memory.utils.content_visibility import visible_contentfrom openviking.storage.content_write import ContentWriteCoordinatorfrom openviking.storage.errors import LockAcquisitionError, ResourceBusyErrorfrom openviking_cli.exceptions import (@@ -17,6 +18,7 @@ from openviking_cli.exceptions import (DeadlineExceededError,InvalidArgumentError,NotFoundError,+ PermissionDeniedError,)from openviking_cli.session.user_id import UserIdentifier@@ -42,7 +44,8 @@ async def test_write_updates_memory_file_and_parent_overview(service):assert result["vector_status"] == "complete"assert result["overview_status"] == "complete"assert result["queue_status"]["Embedding"]["processed"] >= 1- assert await service.viking_fs.read_file(memory_uri, ctx=ctx) == "Updated preference"+ stored = await service.viking_fs.read_file(memory_uri, ctx=ctx)+ assert visible_content(stored, uri=memory_uri) == "Updated preference"assert await service.viking_fs.read_file(f"{memory_dir}/.overview.md", ctx=ctx)with pytest.raises(NotFoundError):await service.viking_fs.read_file(f"{memory_dir}/.abstract.md", ctx=ctx)@@ -61,7 +64,7 @@ async def test_write_denies_foreign_user_memory_space(service):role=Role.USER,)- with pytest.raises(NotFoundError):+ with pytest.raises(PermissionDeniedError):await service.fs.write(memory_uri,content="Intruder update",@@ -229,11 +232,14 @@ async def test_memory_write_linkifies_resource_uri_marker_with_readable_anchor(sstored = await service.viking_fs.read_file(memory_uri, ctx=ctx)mf = MemoryFileUtils.read(stored, uri=memory_uri)- assert mf.content == f"2026-06-12,[用户保存了粉丝创作的越前龙马动漫插画资源]({resource_uri})。"+ assert (+ mf.content+ == f"[2026-06-12,用户保存了粉丝创作的越前龙马动漫插画资源,资源URI为]({resource_uri})。"+ )refs = mf.extra_fields["resource_refs"]assert refs[0]["resource_uri"] == resource_uriassert refs[0]["source"] == "content.write"- assert refs[0]["match_text"] == "用户保存了粉丝创作的越前龙马动漫插画资源"+ assert refs[0]["match_text"] == "2026-06-12,用户保存了粉丝创作的越前龙马动漫插画资源,资源URI为"assert mf.links == []@@ -270,7 +276,7 @@ async def test_memory_create_refreshes_nested_schema_overview(service):overview = await service.viking_fs.read_file(f"{memory_dir}/.overview.md", ctx=ctx)assert result["root_uri"] == memory_dir- assert "[不二周助-link-test](./不二周助-link-test.md)" in overview+ assert "[不二周助-link-test.md](./不二周助-link-test.md)" in overview@pytest.mark.asyncio@@ -285,23 +291,24 @@ async def test_memory_rm_refreshes_nested_schema_overview(service):content="用户保存了一张不二周助的照片",ctx=ctx,mode="create",+ wait=True,)await service.fs.write(kept_uri,content="用户保存了一张越前龙马的照片",ctx=ctx,mode="create",+ wait=True,)before = await service.viking_fs.read_file(f"{memory_dir}/.overview.md", ctx=ctx)- assert "[不二周助-delete-test](./不二周助-delete-test.md)" in before- assert "[越前龙马-keep-test](./越前龙马-keep-test.md)" in before+ assert "[不二周助-delete-test.md](./不二周助-delete-test.md)" in before- await service.fs.rm(deleted_uri, ctx=ctx)+ await service.fs.rm(deleted_uri, ctx=ctx, wait=True)after = await service.viking_fs.read_file(f"{memory_dir}/.overview.md", ctx=ctx)assert "不二周助-delete-test" not in after- assert "[越前龙马-keep-test](./越前龙马-keep-test.md)" in after+ assert "[越前龙马-keep-test.md](./越前龙马-keep-test.md)" in afterclass _FakePathLock:@@ -1457,7 +1464,7 @@ async def test_set_tags_recursive_directory_all_missing_vector_records_returns_z)assert result["success_count"] == 0- assert result["skipped_count"] == 3+ assert result["skipped_count"] == 2assert result["failed_count"] == 0assert result["updated_uris"] == []assert result["tags_updated"] is False@@ -1522,7 +1529,7 @@ async def test_set_tags_single_uri_missing_vector_record_returns_zero_counts(monasync def update_search_tags(self, uri: str, tags, *, mode: str, ctx=None):del ctxself.update_calls.append((uri, list(tags), mode))- return False+ return []fake_store = _FakeVectorStore()fake_vfs.vector_store = fake_store@@ -1556,7 +1563,7 @@ async def test_set_tags_does_not_return_write_queue_fields(monkeypatch):assert uri == file_uriassert list(tags) == ["env=prod"]assert mode == "replace"- return True+ return [{"uri": uri}]fake_vfs.vector_store = _FakeVectorStore()diff --git a/tests/server/test_mcp_endpoint.py b/tests/server/test_mcp_endpoint.pyindex ba0c15d58..e9282b775 100644--- a/tests/server/test_mcp_endpoint.py+++ b/tests/server/test_mcp_endpoint.py@@ -1135,6 +1135,8 @@ async def test_write_create_rejects_disallowed_extension(service):async def test_write_rejects_derived_semantic_file(service):with pytest.raises(InvalidArgumentError):await write(uri="viking://resources/test_write_derived/.abstract.md", content="x")+ with pytest.raises(InvalidArgumentError):+ await write(uri="viking://resources/test_write_derived/.relations.json", content="x")async def test_write_read_tool_roundtrip(service):diff --git a/tests/telemetry/test_execution.py b/tests/telemetry/test_execution.pyindex 7abe2077c..863c38dc9 100644--- a/tests/telemetry/test_execution.py+++ b/tests/telemetry/test_execution.py@@ -29,7 +29,6 @@ def test_operation_telemetry_summary_includes_memory_extract_breakdown():telemetry.set("memory.extract.stage.create_memory.duration_ms", 56.1)telemetry.set("memory.extract.stage.merge_existing.duration_ms", 22.7)telemetry.set("memory.extract.stage.delete_existing.duration_ms", 0.0)- telemetry.set("memory.extract.stage.create_relations.duration_ms", 18.2)telemetry.set("memory.extract.stage.flush_semantic.duration_ms", 9.0)summary = telemetry.finish().summary@@ -57,7 +56,6 @@ def test_operation_telemetry_summary_includes_memory_extract_breakdown():"dedup_ms": 215.6,"create_memory_ms": 56.1,"merge_existing_ms": 22.7,- "create_relations_ms": 18.2,"flush_semantic_ms": 9.0,},}diff --git a/web-studio/src/gen/ov-client/index.ts b/web-studio/src/gen/ov-client/index.tsindex d0e7faafd..df74cbf18 100644--- a/web-studio/src/gen/ov-client/index.ts+++ b/web-studio/src/gen/ov-client/index.ts@@ -1,4 +1,4 @@// This file is auto-generated by @hey-api/openapi-ts-export { deleteAdminAccountByAccountId, deleteAdminAccountIdUserByUserId, deleteFs, deleteRelationsLink, deleteSessionBySessionId, deleteWebdavResourceByResourcePath, deleteWebdavResources, getAdminAccountIdUsers, getAdminAccounts, getBotV1Health, getConsoleAudit, getConsoleContextCommits, getConsoleDashboardSummary, getConsoleTokens, getContentAbstract, getContentDownload, getContentOverview, getContentRead, getDebugHealth, getDebugVectorCount, getDebugVectorScroll, getFsLs, getFsStat, getFsTree, getHealth, getMetrics, getObserverFilesystem, getObserverLock, getObserverModels, getObserverQueue, getObserverRetrieval, getObserverSystem, getObserverVikingdb, getPrivacyConfigs, getPrivacyConfigsByCategory, getPrivacyConfigsByCategoryAndTargetKey, getPrivacyConfigsVersionByCategoryAndTargetKeyAndVersion, getPrivacyConfigsVersionsByCategoryAndTargetKey, getReady, getRelations, getSessionBySessionId, getSessionIdArchiveByArchiveId, getSessionIdContext, getSessions, getStatsMemories, getStatsSessionBySessionId, getSystemStatus, getTaskByTaskId, getTasks, getWebdavResourceByResourcePath, getWebdavResources, headWebdavResourceByResourcePath, headWebdavResources, type Options, optionsWebdavResourceByResourcePath, optionsWebdavResources, postAdminAccountIdUserIdKey, postAdminAccountIdUsers, postAdminAccounts, postBotV1Chat, postBotV1ChatStream, postBotV1Feedback, postContentReindex, postContentWrite, postFsMkdir, postFsMv, postPackBackup, postPackExport, postPackImport, postPackRestore, postPrivacyConfigsActivateByCategoryAndTargetKey, postPrivacyConfigsByCategoryAndTargetKey, postRelationsLink, postResources, postResourcesTempUpload, postSearchFind, postSearchGlob, postSearchGrep, postSearchSearch, postSessionIdCommit, postSessionIdExtract, postSessionIdMessages, postSessionIdUsed, postSessions, postSkills, postSystemConsistency, postSystemWait, putAdminAccountIdUserIdRole, putWebdavResourceByResourcePath, putWebdavResources } from './sdk.gen';-export type { ActivatePrivacyConfigVersionRequest, AddMessageRequest, AddResourceRequest, AddSkillRequest, BackupRequest, BodyTempUploadApiV1ResourcesTempUploadPost, ClientOptions, CommitRequest, ConsistencyRequest, CreateAccountRequest, CreateSessionRequest, DeleteAdminAccountByAccountIdData, DeleteAdminAccountByAccountIdError, DeleteAdminAccountByAccountIdErrors, DeleteAdminAccountByAccountIdResponses, DeleteAdminAccountIdUserByUserIdData, DeleteAdminAccountIdUserByUserIdError, DeleteAdminAccountIdUserByUserIdErrors, DeleteAdminAccountIdUserByUserIdResponses, DeleteFsData, DeleteFsError, DeleteFsErrors, DeleteFsResponses, DeleteRelationsLinkData, DeleteRelationsLinkError, DeleteRelationsLinkErrors, DeleteRelationsLinkResponses, DeleteSessionBySessionIdData, DeleteSessionBySessionIdError, DeleteSessionBySessionIdErrors, DeleteSessionBySessionIdResponses, DeleteWebdavResourceByResourcePathData, DeleteWebdavResourceByResourcePathError, DeleteWebdavResourceByResourcePathErrors, DeleteWebdavResourceByResourcePathResponses, DeleteWebdavResourcesData, DeleteWebdavResourcesError, DeleteWebdavResourcesErrors, DeleteWebdavResourcesResponses, ExportRequest, FindRequests, GetAdminAccountIdUsersData, GetAdminAccountIdUsersError, GetAdminAccountIdUsersErrors, GetAdminAccountIdUsersResponses, GetAdminAccountsData, GetAdminAccountsError, GetAdminAccountsErrors, GetAdminAccountsResponses, GetBotV1HealthData, GetBotV1HealthResponses, GetConsoleAuditData, GetConsoleAuditError, GetConsoleAuditErrors, GetConsoleAuditResponses, GetConsoleContextCommitsData, GetConsoleContextCommitsError, GetConsoleContextCommitsErrors, GetConsoleContextCommitsResponses, GetConsoleDashboardSummaryData, GetConsoleDashboardSummaryError, GetConsoleDashboardSummaryErrors, GetConsoleDashboardSummaryResponses, GetConsoleTokensData, GetConsoleTokensError, GetConsoleTokensErrors, GetConsoleTokensResponses, GetContentAbstractData, GetContentAbstractError, GetContentAbstractErrors, GetContentAbstractResponses, GetContentDownloadData, GetContentDownloadError, GetContentDownloadErrors, GetContentDownloadResponses, GetContentOverviewData, GetContentOverviewError, GetContentOverviewErrors, GetContentOverviewResponses, GetContentReadData, GetContentReadError, GetContentReadErrors, GetContentReadResponses, GetDebugHealthData, GetDebugHealthError, GetDebugHealthErrors, GetDebugHealthResponses, GetDebugVectorCountData, GetDebugVectorCountError, GetDebugVectorCountErrors, GetDebugVectorCountResponses, GetDebugVectorScrollData, GetDebugVectorScrollError, GetDebugVectorScrollErrors, GetDebugVectorScrollResponses, GetFsLsData, GetFsLsError, GetFsLsErrors, GetFsLsResponses, GetFsStatData, GetFsStatError, GetFsStatErrors, GetFsStatResponses, GetFsTreeData, GetFsTreeError, GetFsTreeErrors, GetFsTreeResponses, GetHealthData, GetHealthResponses, GetMetricsData, GetMetricsResponses, GetObserverFilesystemData, GetObserverFilesystemError, GetObserverFilesystemErrors, GetObserverFilesystemResponses, GetObserverLockData, GetObserverLockError, GetObserverLockErrors, GetObserverLockResponses, GetObserverModelsData, GetObserverModelsError, GetObserverModelsErrors, GetObserverModelsResponses, GetObserverQueueData, GetObserverQueueError, GetObserverQueueErrors, GetObserverQueueResponses, GetObserverRetrievalData, GetObserverRetrievalError, GetObserverRetrievalErrors, GetObserverRetrievalResponses, GetObserverSystemData, GetObserverSystemError, GetObserverSystemErrors, GetObserverSystemResponses, GetObserverVikingdbData, GetObserverVikingdbError, GetObserverVikingdbErrors, GetObserverVikingdbResponses, GetPrivacyConfigsByCategoryAndTargetKeyData, GetPrivacyConfigsByCategoryAndTargetKeyError, GetPrivacyConfigsByCategoryAndTargetKeyErrors, GetPrivacyConfigsByCategoryAndTargetKeyResponses, GetPrivacyConfigsByCategoryData, GetPrivacyConfigsByCategoryError, GetPrivacyConfigsByCategoryErrors, GetPrivacyConfigsByCategoryResponses, GetPrivacyConfigsData, GetPrivacyConfigsError, GetPrivacyConfigsErrors, GetPrivacyConfigsResponses, GetPrivacyConfigsVersionByCategoryAndTargetKeyAndVersionData, GetPrivacyConfigsVersionByCategoryAndTargetKeyAndVersionError, GetPrivacyConfigsVersionByCategoryAndTargetKeyAndVersionErrors, GetPrivacyConfigsVersionByCategoryAndTargetKeyAndVersionResponses, GetPrivacyConfigsVersionsByCategoryAndTargetKeyData, GetPrivacyConfigsVersionsByCategoryAndTargetKeyError, GetPrivacyConfigsVersionsByCategoryAndTargetKeyErrors, GetPrivacyConfigsVersionsByCategoryAndTargetKeyResponses, GetReadyData, GetReadyResponses, GetRelationsData, GetRelationsError, GetRelationsErrors, GetRelationsResponses, GetSessionBySessionIdData, GetSessionBySessionIdError, GetSessionBySessionIdErrors, GetSessionBySessionIdResponses, GetSessionIdArchiveByArchiveIdData, GetSessionIdArchiveByArchiveIdError, GetSessionIdArchiveByArchiveIdErrors, GetSessionIdArchiveByArchiveIdResponses, GetSessionIdContextData, GetSessionIdContextError, GetSessionIdContextErrors, GetSessionIdContextResponses, GetSessionsData, GetSessionsError, GetSessionsErrors, GetSessionsResponses, GetStatsMemoriesData, GetStatsMemoriesError, GetStatsMemoriesErrors, GetStatsMemoriesResponses, GetStatsSessionBySessionIdData, GetStatsSessionBySessionIdError, GetStatsSessionBySessionIdErrors, GetStatsSessionBySessionIdResponses, GetSystemStatusData, GetSystemStatusError, GetSystemStatusErrors, GetSystemStatusResponses, GetTaskByTaskIdData, GetTaskByTaskIdError, GetTaskByTaskIdErrors, GetTaskByTaskIdResponses, GetTasksData, GetTasksError, GetTasksErrors, GetTasksResponses, GetWebdavResourceByResourcePathData, GetWebdavResourceByResourcePathError, GetWebdavResourceByResourcePathErrors, GetWebdavResourceByResourcePathResponses, GetWebdavResourcesData, GetWebdavResourcesError, GetWebdavResourcesErrors, GetWebdavResourcesResponses, GlobRequest, GrepRequest, HeadWebdavResourceByResourcePathData, HeadWebdavResourceByResourcePathError, HeadWebdavResourceByResourcePathErrors, HeadWebdavResourceByResourcePathResponses, HeadWebdavResourcesData, HeadWebdavResourcesError, HeadWebdavResourcesErrors, HeadWebdavResourcesResponses, HttpValidationError, ImportRequest, LinkRequest, MkdirRequest, MvRequest, OptionsWebdavResourceByResourcePathData, OptionsWebdavResourceByResourcePathError, OptionsWebdavResourceByResourcePathErrors, OptionsWebdavResourceByResourcePathResponses, OptionsWebdavResourcesData, OptionsWebdavResourcesError, OptionsWebdavResourcesErrors, OptionsWebdavResourcesResponses, PostAdminAccountIdUserIdKeyData, PostAdminAccountIdUserIdKeyError, PostAdminAccountIdUserIdKeyErrors, PostAdminAccountIdUserIdKeyResponses, PostAdminAccountIdUsersData, PostAdminAccountIdUsersError, PostAdminAccountIdUsersErrors, PostAdminAccountIdUsersResponses, PostAdminAccountsData, PostAdminAccountsError, PostAdminAccountsErrors, PostAdminAccountsResponses, PostBotV1ChatData, PostBotV1ChatError, PostBotV1ChatErrors, PostBotV1ChatResponses, PostBotV1ChatStreamData, PostBotV1ChatStreamError, PostBotV1ChatStreamErrors, PostBotV1ChatStreamResponses, PostBotV1FeedbackData, PostBotV1FeedbackError, PostBotV1FeedbackErrors, PostBotV1FeedbackResponses, PostContentReindexData, PostContentReindexError, PostContentReindexErrors, PostContentReindexResponses, PostContentWriteData, PostContentWriteError, PostContentWriteErrors, PostContentWriteResponses, PostFsMkdirData, PostFsMkdirError, PostFsMkdirErrors, PostFsMkdirResponses, PostFsMvData, PostFsMvError, PostFsMvErrors, PostFsMvResponses, PostPackBackupData, PostPackBackupError, PostPackBackupErrors, PostPackBackupResponses, PostPackExportData, PostPackExportError, PostPackExportErrors, PostPackExportResponses, PostPackImportData, PostPackImportError, PostPackImportErrors, PostPackImportResponses, PostPackRestoreData, PostPackRestoreError, PostPackRestoreErrors, PostPackRestoreResponses, PostPrivacyConfigsActivateByCategoryAndTargetKeyData, PostPrivacyConfigsActivateByCategoryAndTargetKeyError, PostPrivacyConfigsActivateByCategoryAndTargetKeyErrors, PostPrivacyConfigsActivateByCategoryAndTargetKeyResponses, PostPrivacyConfigsByCategoryAndTargetKeyData, PostPrivacyConfigsByCategoryAndTargetKeyError, PostPrivacyConfigsByCategoryAndTargetKeyErrors, PostPrivacyConfigsByCategoryAndTargetKeyResponses, PostRelationsLinkData, PostRelationsLinkError, PostRelationsLinkErrors, PostRelationsLinkResponses, PostResourcesData, PostResourcesError, PostResourcesErrors, PostResourcesResponses, PostResourcesTempUploadData, PostResourcesTempUploadError, PostResourcesTempUploadErrors, PostResourcesTempUploadResponses, PostSearchFindData, PostSearchFindError, PostSearchFindErrors, PostSearchFindResponses, PostSearchGlobData, PostSearchGlobError, PostSearchGlobErrors, PostSearchGlobResponses, PostSearchGrepData, PostSearchGrepError, PostSearchGrepErrors, PostSearchGrepResponses, PostSearchSearchData, PostSearchSearchError, PostSearchSearchErrors, PostSearchSearchResponses, PostSessionIdCommitData, PostSessionIdCommitError, PostSessionIdCommitErrors, PostSessionIdCommitResponses, PostSessionIdExtractData, PostSessionIdExtractError, PostSessionIdExtractErrors, PostSessionIdExtractResponses, PostSessionIdMessagesData, PostSessionIdMessagesError, PostSessionIdMessagesErrors, PostSessionIdMessagesResponses, PostSessionIdUsedData, PostSessionIdUsedError, PostSessionIdUsedErrors, PostSessionIdUsedResponses, PostSessionsData, PostSessionsError, PostSessionsErrors, PostSessionsResponses, PostSkillsData, PostSkillsError, PostSkillsErrors, PostSkillsResponses, PostSystemConsistencyData, PostSystemConsistencyError, PostSystemConsistencyErrors, PostSystemConsistencyResponses, PostSystemWaitData, PostSystemWaitError, PostSystemWaitErrors, PostSystemWaitResponses, PutAdminAccountIdUserIdRoleData, PutAdminAccountIdUserIdRoleError, PutAdminAccountIdUserIdRoleErrors, PutAdminAccountIdUserIdRoleResponses, PutWebdavResourceByResourcePathData, PutWebdavResourceByResourcePathError, PutWebdavResourceByResourcePathErrors, PutWebdavResourceByResourcePathResponses, PutWebdavResourcesData, PutWebdavResourcesError, PutWebdavResourcesErrors, PutWebdavResourcesResponses, RegisterUserRequest, ReindexRequest, RestoreRequest, SearchRequest, SetRoleRequest, UnlinkRequest, UpsertPrivacyConfigRequest, UsedRequest, ValidationError, WaitRequest, WriteContentRequest } from './types.gen';+export { deleteAdminAccountByAccountId, deleteAdminAccountIdUserByUserId, deleteFs, deleteSessionBySessionId, deleteWebdavResourceByResourcePath, deleteWebdavResources, getAdminAccountIdUsers, getAdminAccounts, getBotV1Health, getConsoleAudit, getConsoleContextCommits, getConsoleDashboardSummary, getConsoleTokens, getContentAbstract, getContentDownload, getContentOverview, getContentRead, getDebugHealth, getDebugVectorCount, getDebugVectorScroll, getFsLs, getFsStat, getFsTree, getHealth, getMetrics, getObserverFilesystem, getObserverLock, getObserverModels, getObserverQueue, getObserverRetrieval, getObserverSystem, getObserverVikingdb, getPrivacyConfigs, getPrivacyConfigsByCategory, getPrivacyConfigsByCategoryAndTargetKey, getPrivacyConfigsVersionByCategoryAndTargetKeyAndVersion, getPrivacyConfigsVersionsByCategoryAndTargetKey, getReady, getSessionBySessionId, getSessionIdArchiveByArchiveId, getSessionIdContext, getSessions, getStatsMemories, getStatsSessionBySessionId, getSystemStatus, getTaskByTaskId, getTasks, getWebdavResourceByResourcePath, getWebdavResources, headWebdavResourceByResourcePath, headWebdavResources, type Options, optionsWebdavResourceByResourcePath, optionsWebdavResources, postAdminAccountIdUserIdKey, postAdminAccountIdUsers, postAdminAccounts, postBotV1Chat, postBotV1ChatStream, postBotV1Feedback, postContentReindex, postContentWrite, postFsMkdir, postFsMv, postPackBackup, postPackExport, postPackImport, postPackRestore, postPrivacyConfigsActivateByCategoryAndTargetKey, postPrivacyConfigsByCategoryAndTargetKey, postResources, postResourcesTempUpload, postSearchFind, postSearchGlob, postSearchGrep, postSearchSearch, postSessionIdCommit, postSessionIdExtract, postSessionIdMessages, postSessionIdUsed, postSessions, postSkills, postSystemConsistency, postSystemWait, putAdminAccountIdUserIdRole, putWebdavResourceByResourcePath, putWebdavResources } from './sdk.gen';+export type { ActivatePrivacyConfigVersionRequest, AddMessageRequest, AddResourceRequest, AddSkillRequest, BackupRequest, BodyTempUploadApiV1ResourcesTempUploadPost, ClientOptions, CommitRequest, ConsistencyRequest, CreateAccountRequest, CreateSessionRequest, DeleteAdminAccountByAccountIdData, DeleteAdminAccountByAccountIdError, DeleteAdminAccountByAccountIdErrors, DeleteAdminAccountByAccountIdResponses, DeleteAdminAccountIdUserByUserIdData, DeleteAdminAccountIdUserByUserIdError, DeleteAdminAccountIdUserByUserIdErrors, DeleteAdminAccountIdUserByUserIdResponses, DeleteFsData, DeleteFsError, DeleteFsErrors, DeleteFsResponses, DeleteSessionBySessionIdData, DeleteSessionBySessionIdError, DeleteSessionBySessionIdErrors, DeleteSessionBySessionIdResponses, DeleteWebdavResourceByResourcePathData, DeleteWebdavResourceByResourcePathError, DeleteWebdavResourceByResourcePathErrors, DeleteWebdavResourceByResourcePathResponses, DeleteWebdavResourcesData, DeleteWebdavResourcesError, DeleteWebdavResourcesErrors, DeleteWebdavResourcesResponses, ExportRequest, FindRequests, GetAdminAccountIdUsersData, GetAdminAccountIdUsersError, GetAdminAccountIdUsersErrors, GetAdminAccountIdUsersResponses, GetAdminAccountsData, GetAdminAccountsError, GetAdminAccountsErrors, GetAdminAccountsResponses, GetBotV1HealthData, GetBotV1HealthResponses, GetConsoleAuditData, GetConsoleAuditError, GetConsoleAuditErrors, GetConsoleAuditResponses, GetConsoleContextCommitsData, GetConsoleContextCommitsError, GetConsoleContextCommitsErrors, GetConsoleContextCommitsResponses, GetConsoleDashboardSummaryData, GetConsoleDashboardSummaryError, GetConsoleDashboardSummaryErrors, GetConsoleDashboardSummaryResponses, GetConsoleTokensData, GetConsoleTokensError, GetConsoleTokensErrors, GetConsoleTokensResponses, GetContentAbstractData, GetContentAbstractError, GetContentAbstractErrors, GetContentAbstractResponses, GetContentDownloadData, GetContentDownloadError, GetContentDownloadErrors, GetContentDownloadResponses, GetContentOverviewData, GetContentOverviewError, GetContentOverviewErrors, GetContentOverviewResponses, GetContentReadData, GetContentReadError, GetContentReadErrors, GetContentReadResponses, GetDebugHealthData, GetDebugHealthError, GetDebugHealthErrors, GetDebugHealthResponses, GetDebugVectorCountData, GetDebugVectorCountError, GetDebugVectorCountErrors, GetDebugVectorCountResponses, GetDebugVectorScrollData, GetDebugVectorScrollError, GetDebugVectorScrollErrors, GetDebugVectorScrollResponses, GetFsLsData, GetFsLsError, GetFsLsErrors, GetFsLsResponses, GetFsStatData, GetFsStatError, GetFsStatErrors, GetFsStatResponses, GetFsTreeData, GetFsTreeError, GetFsTreeErrors, GetFsTreeResponses, GetHealthData, GetHealthResponses, GetMetricsData, GetMetricsResponses, GetObserverFilesystemData, GetObserverFilesystemError, GetObserverFilesystemErrors, GetObserverFilesystemResponses, GetObserverLockData, GetObserverLockError, GetObserverLockErrors, GetObserverLockResponses, GetObserverModelsData, GetObserverModelsError, GetObserverModelsErrors, GetObserverModelsResponses, GetObserverQueueData, GetObserverQueueError, GetObserverQueueErrors, GetObserverQueueResponses, GetObserverRetrievalData, GetObserverRetrievalError, GetObserverRetrievalErrors, GetObserverRetrievalResponses, GetObserverSystemData, GetObserverSystemError, GetObserverSystemErrors, GetObserverSystemResponses, GetObserverVikingdbData, GetObserverVikingdbError, GetObserverVikingdbErrors, GetObserverVikingdbResponses, GetPrivacyConfigsByCategoryAndTargetKeyData, GetPrivacyConfigsByCategoryAndTargetKeyError, GetPrivacyConfigsByCategoryAndTargetKeyErrors, GetPrivacyConfigsByCategoryAndTargetKeyResponses, GetPrivacyConfigsByCategoryData, GetPrivacyConfigsByCategoryError, GetPrivacyConfigsByCategoryErrors, GetPrivacyConfigsByCategoryResponses, GetPrivacyConfigsData, GetPrivacyConfigsError, GetPrivacyConfigsErrors, GetPrivacyConfigsResponses, GetPrivacyConfigsVersionByCategoryAndTargetKeyAndVersionData, GetPrivacyConfigsVersionByCategoryAndTargetKeyAndVersionError, GetPrivacyConfigsVersionByCategoryAndTargetKeyAndVersionErrors, GetPrivacyConfigsVersionByCategoryAndTargetKeyAndVersionResponses, GetPrivacyConfigsVersionsByCategoryAndTargetKeyData, GetPrivacyConfigsVersionsByCategoryAndTargetKeyError, GetPrivacyConfigsVersionsByCategoryAndTargetKeyErrors, GetPrivacyConfigsVersionsByCategoryAndTargetKeyResponses, GetReadyData, GetReadyResponses, GetSessionBySessionIdData, GetSessionBySessionIdError, GetSessionBySessionIdErrors, GetSessionBySessionIdResponses, GetSessionIdArchiveByArchiveIdData, GetSessionIdArchiveByArchiveIdError, GetSessionIdArchiveByArchiveIdErrors, GetSessionIdArchiveByArchiveIdResponses, GetSessionIdContextData, GetSessionIdContextError, GetSessionIdContextErrors, GetSessionIdContextResponses, GetSessionsData, GetSessionsError, GetSessionsErrors, GetSessionsResponses, GetStatsMemoriesData, GetStatsMemoriesError, GetStatsMemoriesErrors, GetStatsMemoriesResponses, GetStatsSessionBySessionIdData, GetStatsSessionBySessionIdError, GetStatsSessionBySessionIdErrors, GetStatsSessionBySessionIdResponses, GetSystemStatusData, GetSystemStatusError, GetSystemStatusErrors, GetSystemStatusResponses, GetTaskByTaskIdData, GetTaskByTaskIdError, GetTaskByTaskIdErrors, GetTaskByTaskIdResponses, GetTasksData, GetTasksError, GetTasksErrors, GetTasksResponses, GetWebdavResourceByResourcePathData, GetWebdavResourceByResourcePathError, GetWebdavResourceByResourcePathErrors, GetWebdavResourceByResourcePathResponses, GetWebdavResourcesData, GetWebdavResourcesError, GetWebdavResourcesErrors, GetWebdavResourcesResponses, GlobRequest, GrepRequest, HeadWebdavResourceByResourcePathData, HeadWebdavResourceByResourcePathError, HeadWebdavResourceByResourcePathErrors, HeadWebdavResourceByResourcePathResponses, HeadWebdavResourcesData, HeadWebdavResourcesError, HeadWebdavResourcesErrors, HeadWebdavResourcesResponses, HttpValidationError, ImportRequest, MkdirRequest, MvRequest, OptionsWebdavResourceByResourcePathData, OptionsWebdavResourceByResourcePathError, OptionsWebdavResourceByResourcePathErrors, OptionsWebdavResourceByResourcePathResponses, OptionsWebdavResourcesData, OptionsWebdavResourcesError, OptionsWebdavResourcesErrors, OptionsWebdavResourcesResponses, PostAdminAccountIdUserIdKeyData, PostAdminAccountIdUserIdKeyError, PostAdminAccountIdUserIdKeyErrors, PostAdminAccountIdUserIdKeyResponses, PostAdminAccountIdUsersData, PostAdminAccountIdUsersError, PostAdminAccountIdUsersErrors, PostAdminAccountIdUsersResponses, PostAdminAccountsData, PostAdminAccountsError, PostAdminAccountsErrors, PostAdminAccountsResponses, PostBotV1ChatData, PostBotV1ChatError, PostBotV1ChatErrors, PostBotV1ChatResponses, PostBotV1ChatStreamData, PostBotV1ChatStreamError, PostBotV1ChatStreamErrors, PostBotV1ChatStreamResponses, PostBotV1FeedbackData, PostBotV1FeedbackError, PostBotV1FeedbackErrors, PostBotV1FeedbackResponses, PostContentReindexData, PostContentReindexError, PostContentReindexErrors, PostContentReindexResponses, PostContentWriteData, PostContentWriteError, PostContentWriteErrors, PostContentWriteResponses, PostFsMkdirData, PostFsMkdirError, PostFsMkdirErrors, PostFsMkdirResponses, PostFsMvData, PostFsMvError, PostFsMvErrors, PostFsMvResponses, PostPackBackupData, PostPackBackupError, PostPackBackupErrors, PostPackBackupResponses, PostPackExportData, PostPackExportError, PostPackExportErrors, PostPackExportResponses, PostPackImportData, PostPackImportError, PostPackImportErrors, PostPackImportResponses, PostPackRestoreData, PostPackRestoreError, PostPackRestoreErrors, PostPackRestoreResponses, PostPrivacyConfigsActivateByCategoryAndTargetKeyData, PostPrivacyConfigsActivateByCategoryAndTargetKeyError, PostPrivacyConfigsActivateByCategoryAndTargetKeyErrors, PostPrivacyConfigsActivateByCategoryAndTargetKeyResponses, PostPrivacyConfigsByCategoryAndTargetKeyData, PostPrivacyConfigsByCategoryAndTargetKeyError, PostPrivacyConfigsByCategoryAndTargetKeyErrors, PostPrivacyConfigsByCategoryAndTargetKeyResponses, PostResourcesData, PostResourcesError, PostResourcesErrors, PostResourcesResponses, PostResourcesTempUploadData, PostResourcesTempUploadError, PostResourcesTempUploadErrors, PostResourcesTempUploadResponses, PostSearchFindData, PostSearchFindError, PostSearchFindErrors, PostSearchFindResponses, PostSearchGlobData, PostSearchGlobError, PostSearchGlobErrors, PostSearchGlobResponses, PostSearchGrepData, PostSearchGrepError, PostSearchGrepErrors, PostSearchGrepResponses, PostSearchSearchData, PostSearchSearchError, PostSearchSearchErrors, PostSearchSearchResponses, PostSessionIdCommitData, PostSessionIdCommitError, PostSessionIdCommitErrors, PostSessionIdCommitResponses, PostSessionIdExtractData, PostSessionIdExtractError, PostSessionIdExtractErrors, PostSessionIdExtractResponses, PostSessionIdMessagesData, PostSessionIdMessagesError, PostSessionIdMessagesErrors, PostSessionIdMessagesResponses, PostSessionIdUsedData, PostSessionIdUsedError, PostSessionIdUsedErrors, PostSessionIdUsedResponses, PostSessionsData, PostSessionsError, PostSessionsErrors, PostSessionsResponses, PostSkillsData, PostSkillsError, PostSkillsErrors, PostSkillsResponses, PostSystemConsistencyData, PostSystemConsistencyError, PostSystemConsistencyErrors, PostSystemConsistencyResponses, PostSystemWaitData, PostSystemWaitError, PostSystemWaitErrors, PostSystemWaitResponses, PutAdminAccountIdUserIdRoleData, PutAdminAccountIdUserIdRoleError, PutAdminAccountIdUserIdRoleErrors, PutAdminAccountIdUserIdRoleResponses, PutWebdavResourceByResourcePathData, PutWebdavResourceByResourcePathError, PutWebdavResourceByResourcePathErrors, PutWebdavResourceByResourcePathResponses, PutWebdavResourcesData, PutWebdavResourcesError, PutWebdavResourcesErrors, PutWebdavResourcesResponses, RegisterUserRequest, ReindexRequest, RestoreRequest, SearchRequest, SetRoleRequest, UpsertPrivacyConfigRequest, UsedRequest, ValidationError, WaitRequest, WriteContentRequest } from './types.gen';diff --git a/web-studio/src/gen/ov-client/sdk.gen.ts b/web-studio/src/gen/ov-client/sdk.gen.tsindex 8fd54b3c5..c76211b6c 100644--- a/web-studio/src/gen/ov-client/sdk.gen.ts+++ b/web-studio/src/gen/ov-client/sdk.gen.ts@@ -2,7 +2,7 @@import { type Client, formDataBodySerializer, type Options as Options2, type TDataShape } from './client';import { client } from './client.gen';-import type { DeleteAdminAccountByAccountIdData, DeleteAdminAccountByAccountIdErrors, DeleteAdminAccountByAccountIdResponses, DeleteAdminAccountIdUserByUserIdData, DeleteAdminAccountIdUserByUserIdErrors, DeleteAdminAccountIdUserByUserIdResponses, DeleteFsData, DeleteFsErrors, DeleteFsResponses, DeleteRelationsLinkData, DeleteRelationsLinkErrors, DeleteRelationsLinkResponses, DeleteSessionBySessionIdData, DeleteSessionBySessionIdErrors, DeleteSessionBySessionIdResponses, DeleteWebdavResourceByResourcePathData, DeleteWebdavResourceByResourcePathErrors, DeleteWebdavResourceByResourcePathResponses, DeleteWebdavResourcesData, DeleteWebdavResourcesErrors, DeleteWebdavResourcesResponsess, GetAdminAccountIdUsersData, GetAdminAccountIdUsersErrors, GetAdminAccountIdUsersResponses, GetAdminAccountsData, GetAdminAccountsErrors, GetAdminAccountsResponses, GetBotV1HealthData, GetBotV1HealthResponses, GetConsoleAuditData, GetConsoleAuditErrors, GetConsoleAuditResponses, GetConsoleContextCommitsData, GetConsoleContextCommitsErrors, GetConsoleContextCommitsResponses, GetConsoleDashboardSummaryData, GetConsoleDashboardSummaryErrors, GetConsoleDashboardSummaryResponses, GetConsoleTokensData, GetConsoleTokensErrors, GetConsoleTokensResponses, GetContentAbstractData, GetContentAbstractErrors, GetContentAbstractResponses, GetContentDownloadData, GetContentDownloadErrors, GetContentDownloadResponses, GetContentOverviewData, GetContentOverviewErrors, GetContentOverviewResponses, GetContentReadData, GetContentReadErrors, GetContentReadResponses, GetDebugHealthData, GetDebugHealthErrors, GetDebugHealthResponses, GetDebugVectorCountData, GetDebugVectorCountErrors, GetDebugVectorCountResponses, GetDebugVectorScrollData, GetDebugVectorScrollErrors, GetDebugVectorScrollResponses, GetFsLsData, GetFsLsErrors, GetFsLsResponses, GetFsStatData, GetFsStatErrors, GetFsStatResponses, GetFsTreeData, GetFsTreeErrors, GetFsTreeResponses, GetHealthData, GetHealthResponses, GetMetricsData, GetMetricsResponses, GetObserverFilesystemData, GetObserverFilesystemErrors, GetObserverFilesystemResponses, GetObserverLockData, GetObserverLockErrors, GetObserverLockResponses, GetObserverModelsData, GetObserverModelsErrors, GetObserverModelsResponses, GetObserverQueueData, GetObserverQueueErrors, GetObserverQueueResponses, GetObserverRetrievalData, GetObserverRetrievalErrors, GetObserverRetrievalResponses, GetObserverSystemData, GetObserverSystemErrors, GetObserverSystemResponses, GetObserverVikingdbData, GetObserverVikingdbErrors, GetObserverVikingdbResponses, GetPrivacyConfigsByCategoryAndTargetKeyData, GetPrivacyConfigsByCategoryAndTargetKeyErrors, GetPrivacyConfigsByCategoryAndTargetKeyResponses, GetPrivacyConfigsByCategoryData, GetPrivacyConfigsByCategoryErrors, GetPrivacyConfigsByCategoryResponses, GetPrivacyConfigsData, GetPrivacyConfigsErrors, GetPrivacyConfigsResponses, GetPrivacyConfigsVersionByCategoryAndTargetKeyAndVersionData, GetPrivacyConfigsVersionByCategoryAndTargetKeyAndVersionErrors, GetPrivacyConfigsVersionByCategoryAndTargetKeyAndVersionResponses, GetPrivacyConfigsVersionsByCategoryAndTargetKeyData, GetPrivacyConfigsVersionsByCategoryAndTargetKeyErrors, GetPrivacyConfigsVersionsByCategoryAndTargetKeyResponses, GetReadyData, GetReadyResponses, GetRelationsData, GetRelationsErrors, GetRelationsResponses, GetSessionBySessionIdData, GetSessionBySessionIdErrors, GetSessionBySessionIdResponses, GetSessionIdArchiveByArchiveIdData, GetSessionIdArchiveByArchiveIdErrors, GetSessionIdArchiveByArchiveIdResponses, GetSessionIdContextData, GetSessionIdContextErrors, GetSessionIdContextResponses, GetSessionsData, GetSessionsErrors, GetSessionsResponses, GetStatsMemoriesData, GetStatsMemoriesErrors, GetStatsMemoriesResponses, GetStatsSessionBySessionIdData, GetStatsSessionBySessionIdErrors, GetStatsSessionBySessionIdResponses, GetSystemStatusData, GetSystemStatusErrors, GetSystemStatusResponses, GetTaskByTaskIdData, GetTaskByTaskIdErrors, GetTaskByTaskIdResponses, GetTasksData, GetTasksErrors, GetTasksResponses, GetWebdavResourceByResourcePathData, GetWebdavResourceByResourcePathErrors, GetWebdavResourceByResourcePathResponses, GetWebdavResourcesData, GetWebdavResourcesErrors, GetWebdavResourcesResponses, HeadWebdavResourceByResourcePathData, HeadWebdavResourceByResourcePathErrors, HeadWebdavResourceByResourcePathResponses, HeadWebdavResourcesData, HeadWebdavResourcesErrors, HeadWebdavResourcesResponses, OptionsWebdavResourceByResourcePathData, OptionsWebdavResourceByResourcePathErrors, OptionsWebdavResourceByResourcePathResponses, OptionsWebdavResourcesData, OptionsWebdavResourcesErrors, OptionsWebdavResourcesResponses, PostAdminAccountIdUserIdKeyData, PostAdminAccountIdUserIdKeyErrors, PostAdminAccountIdUserIdKeyResponses, PostAdminAccountIdUsersData, PostAdminAccountIdUsersErrors, PostAdminAccountIdUsersResponses, PostAdminAccountsData, PostAdminAccountsErrors, PostAdminAccountsResponses, PostBotV1ChatData, PostBotV1ChatErrors, PostBotV1ChatResponses, PostBotV1ChatStreamData, PostBotV1ChatStreamErrors, PostBotV1ChatStreamResponses, PostBotV1FeedbackData, PostBotV1FeedbackErrors, PostBotV1FeedbackResponses, PostContentReindexData, PostContentReindexErrors, PostContentReindexResponses, PostContentWriteData, PostContentWriteErrors, PostContentWriteResponses, PostFsMkdirData, PostFsMkdirErrors, PostFsMkdirResponses, PostFsMvData, PostFsMvErrors, PostFsMvResponses, PostPackBackupData, PostPackBackupErrors, PostPackBackupResponses, PostPackExportData, PostPackExportErrors, PostPackExportResponses, PostPackImportData, PostPackImportErrors, PostPackImportResponses, PostPackRestoreData, PostPackRestoreErrors, PostPackRestoreResponses, PostPrivacyConfigsActivateByCategoryAndTargetKeyData, PostPrivacyConfigsActivateByCategoryAndTargetKeyErrors, PostPrivacyConfigsActivateByCategoryAndTargetKeyResponses, PostPrivacyConfigsByCategoryAndTargetKeyData, PostPrivacyConfigsByCategoryAndTargetKeyErrors, PostPrivacyConfigsByCategoryAndTargetKeyResponses, PostRelationsLinkData, PostRelationsLinkErrors, PostRelationsLinkResponses, PostResourcesData, PostResourcesErrors, PostResourcesResponses, PostResourcesTempUploadData, PostResourcesTempUploadErrors, PostResourcesTempUploadResponses, PostSearchFindData, PostSearchFindErrors, PostSearchFindResponses, PostSearchGlobData, PostSearchGlobErrors, PostSearchGlobResponses, PostSearchGrepData, PostSearchGrepErrors, PostSearchGrepResponses, PostSearchSearchData, PostSearchSearchErrors, PostSearchSearchResponses, PostSessionIdCommitData, PostSessionIdCommitErrors, PostSessionIdCommitResponses, PostSessionIdExtractData, PostSessionIdExtractErrors, PostSessionIdExtractResponses, PostSessionIdMessagesData, PostSessionIdMessagesErrors, PostSessionIdMessagesResponses, PostSessionIdUsedData, PostSessionIdUsedErrors, PostSessionIdUsedResponses, PostSessionsData, PostSessionsErrors, PostSessionsResponses, PostSkillsData, PostSkillsErrors, PostSkillsResponses, PostSystemConsistencyData, PostSystemConsistencyErrors, PostSystemConsistencyResponses, PostSystemWaitData, PostSystemWaitErrors, PostSystemWaitResponses, PutAdminAccountIdUserIdRoleData, PutAdminAccountIdUserIdRoleErrors, PutAdminAccountIdUserIdRoleResponses, PutWebdavResourceByResourcePathData, PutWebdavResourceByResourcePathErrors, PutWebdavResourceByResourcePathResponses, PutWebdavResourcesData, PutWebdavResourcesErrors, PutWebdavResourcesResponses } from './types.gen';+import type { DeleteAdminAccountByAccountIdData, DeleteAdminAccountByAccountIdErrors, DeleteAdminAccountByAccountIdResponses, DeleteAdminAccountIdUserByUserIdData, DeleteAdminAccountIdUserByUserIdErrors, DeleteAdminAccountIdUserByUserIdResponses, DeleteFsData, DeleteFsErrors, DeleteFsResponses, DeleteSessionBySessionIdData, DeleteSessionBySessionIdErrors, DeleteSessionBySessionIdResponses, DeleteWebdavResourceByResourcePathData, DeleteWebdavResourceByResourcePathErrors, DeleteWebdavResourceByResourcePathResponses, DeleteWebdavResourcesData, DeleteWebdavResourcesErrors, DeleteWebdavResourcesResponsess, GetAdminAccountIdUsersData, GetAdminAccountIdUsersErrors, GetAdminAccountIdUsersResponses, GetAdminAccountsData, GetAdminAccountsErrors, GetAdminAccountsResponses, GetBotV1HealthData, GetBotV1HealthResponses, GetConsoleAuditData, GetConsoleAuditErrors, GetConsoleAuditResponses, GetConsoleContextCommitsData, GetConsoleContextCommitsErrors, GetConsoleContextCommitsResponses, GetConsoleDashboardSummaryData, GetConsoleDashboardSummaryErrors, GetConsoleDashboardSummaryResponses, GetConsoleTokensData, GetConsoleTokensErrors, GetConsoleTokensResponses, GetContentAbstractData, GetContentAbstractErrors, GetContentAbstractResponses, GetContentDownloadData, GetContentDownloadErrors, GetContentDownloadResponses, GetContentOverviewData, GetContentOverviewErrors, GetContentOverviewResponses, GetContentReadData, GetContentReadErrors, GetContentReadResponses, GetDebugHealthData, GetDebugHealthErrors, GetDebugHealthResponses, GetDebugVectorCountData, GetDebugVectorCountErrors, GetDebugVectorCountResponses, GetDebugVectorScrollData, GetDebugVectorScrollErrors, GetDebugVectorScrollResponses, GetFsLsData, GetFsLsErrors, GetFsLsResponses, GetFsStatData, GetFsStatErrors, GetFsStatResponses, GetFsTreeData, GetFsTreeErrors, GetFsTreeResponses, GetHealthData, GetHealthResponses, GetMetricsData, GetMetricsResponses, GetObserverFilesystemData, GetObserverFilesystemErrors, GetObserverFilesystemResponses, GetObserverLockData, GetObserverLockErrors, GetObserverLockResponses, GetObserverModelsData, GetObserverModelsErrors, GetObserverModelsResponses, GetObserverQueueData, GetObserverQueueErrors, GetObserverQueueResponses, GetObserverRetrievalData, GetObserverRetrievalErrors, GetObserverRetrievalResponses, GetObserverSystemData, GetObserverSystemErrors, GetObserverSystemResponses, GetObserverVikingdbData, GetObserverVikingdbErrors, GetObserverVikingdbResponses, GetPrivacyConfigsByCategoryAndTargetKeyData, GetPrivacyConfigsByCategoryAndTargetKeyErrors, GetPrivacyConfigsByCategoryAndTargetKeyResponses, GetPrivacyConfigsByCategoryData, GetPrivacyConfigsByCategoryErrors, GetPrivacyConfigsByCategoryResponses, GetPrivacyConfigsData, GetPrivacyConfigsErrors, GetPrivacyConfigsResponses, GetPrivacyConfigsVersionByCategoryAndTargetKeyAndVersionData, GetPrivacyConfigsVersionByCategoryAndTargetKeyAndVersionErrors, GetPrivacyConfigsVersionByCategoryAndTargetKeyAndVersionResponses, GetPrivacyConfigsVersionsByCategoryAndTargetKeyData, GetPrivacyConfigsVersionsByCategoryAndTargetKeyErrors, GetPrivacyConfigsVersionsByCategoryAndTargetKeyResponses, GetReadyData, GetReadyResponses, GetSessionBySessionIdData, GetSessionBySessionIdErrors, GetSessionBySessionIdResponses, GetSessionIdArchiveByArchiveIdData, GetSessionIdArchiveByArchiveIdErrors, GetSessionIdArchiveByArchiveIdResponses, GetSessionIdContextData, GetSessionIdContextErrors, GetSessionIdContextResponses, GetSessionsData, GetSessionsErrors, GetSessionsResponses, GetStatsMemoriesData, GetStatsMemoriesErrors, GetStatsMemoriesResponses, GetStatsSessionBySessionIdData, GetStatsSessionBySessionIdErrors, GetStatsSessionBySessionIdResponses, GetSystemStatusData, GetSystemStatusErrors, GetSystemStatusResponses, GetTaskByTaskIdData, GetTaskByTaskIdErrors, GetTaskByTaskIdResponses, GetTasksData, GetTasksErrors, GetTasksResponses, GetWebdavResourceByResourcePathData, GetWebdavResourceByResourcePathErrors, GetWebdavResourceByResourcePathResponses, GetWebdavResourcesData, GetWebdavResourcesErrors, GetWebdavResourcesResponses, HeadWebdavResourceByResourcePathData, HeadWebdavResourceByResourcePathErrors, HeadWebdavResourceByResourcePathResponses, HeadWebdavResourcesData, HeadWebdavResourcesErrors, HeadWebdavResourcesResponses, OptionsWebdavResourceByResourcePathData, OptionsWebdavResourceByResourcePathErrors, OptionsWebdavResourceByResourcePathResponses, OptionsWebdavResourcesData, OptionsWebdavResourcesErrors, OptionsWebdavResourcesResponses, PostAdminAccountIdUserIdKeyData, PostAdminAccountIdUserIdKeyErrors, PostAdminAccountIdUserIdKeyResponses, PostAdminAccountIdUsersData, PostAdminAccountIdUsersErrors, PostAdminAccountIdUsersResponses, PostAdminAccountsData, PostAdminAccountsErrors, PostAdminAccountsResponses, PostBotV1ChatData, PostBotV1ChatErrors, PostBotV1ChatResponses, PostBotV1ChatStreamData, PostBotV1ChatStreamErrors, PostBotV1ChatStreamResponses, PostBotV1FeedbackData, PostBotV1FeedbackErrors, PostBotV1FeedbackResponses, PostContentReindexData, PostContentReindexErrors, PostContentReindexResponses, PostContentWriteData, PostContentWriteErrors, PostContentWriteResponses, PostFsMkdirData, PostFsMkdirErrors, PostFsMkdirResponses, PostFsMvData, PostFsMvErrors, PostFsMvResponses, PostPackBackupData, PostPackBackupErrors, PostPackBackupResponses, PostPackExportData, PostPackExportErrors, PostPackExportResponses, PostPackImportData, PostPackImportErrors, PostPackImportResponses, PostPackRestoreData, PostPackRestoreErrors, PostPackRestoreResponses, PostPrivacyConfigsActivateByCategoryAndTargetKeyData, PostPrivacyConfigsActivateByCategoryAndTargetKeyErrors, PostPrivacyConfigsActivateByCategoryAndTargetKeyResponses, PostPrivacyConfigsByCategoryAndTargetKeyData, PostPrivacyConfigsByCategoryAndTargetKeyErrors, PostPrivacyConfigsByCategoryAndTargetKeyResponses, PostResourcesData, PostResourcesErrors, PostResourcesResponses, PostResourcesTempUploadData, PostResourcesTempUploadErrors, PostResourcesTempUploadResponses, PostSearchFindData, PostSearchFindErrors, PostSearchFindResponses, PostSearchGlobData, PostSearchGlobErrors, PostSearchGlobResponses, PostSearchGrepData, PostSearchGrepErrors, PostSearchGrepResponses, PostSearchSearchData, PostSearchSearchErrors, PostSearchSearchResponses, PostSessionIdCommitData, PostSessionIdCommitErrors, PostSessionIdCommitResponses, PostSessionIdExtractData, PostSessionIdExtractErrors, PostSessionIdExtractResponses, PostSessionIdMessagesData, PostSessionIdMessagesErrors, PostSessionIdMessagesResponses, PostSessionIdUsedData, PostSessionIdUsedErrors, PostSessionIdUsedResponses, PostSessionsData, PostSessionsErrors, PostSessionsResponses, PostSkillsData, PostSkillsErrors, PostSkillsResponses, PostSystemConsistencyData, PostSystemConsistencyErrors, PostSystemConsistencyResponses, PostSystemWaitData, PostSystemWaitErrors, PostSystemWaitResponses, PutAdminAccountIdUserIdRoleData, PutAdminAccountIdUserIdRoleErrors, PutAdminAccountIdUserIdRoleResponses, PutWebdavResourceByResourcePathData, PutWebdavResourceByResourcePathErrors, PutWebdavResourceByResourcePathResponses, PutWebdavResourcesData, PutWebdavResourcesErrors, PutWebdavResourcesResponses } from './types.gen';export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown> = Options2<TData, ThrowOnError, TResponse> & {/**@@ -486,47 +486,6 @@ export const postSearchGlob = <ThrowOnError extends boolean = false>(options: Op}});-/**- * Relations- *- * Get relations for a resource.- */-export const getRelations = <ThrowOnError extends boolean = false>(options: Options<GetRelationsData, ThrowOnError>) => (options.client ?? client).get<GetRelationsResponses, GetRelationsErrors, ThrowOnError>({- responseType: 'json',- url: '/api/v1/relations',- ...options-});--/**- * Unlink- *- * Remove link between resources.- */-export const deleteRelationsLink = <ThrowOnError extends boolean = false>(options: Options<DeleteRelationsLinkData, ThrowOnError>) => (options.client ?? client).delete<DeleteRelationsLinkResponses, DeleteRelationsLinkErrors, ThrowOnError>({- responseType: 'json',- url: '/api/v1/relations/link',- ...options,- headers: {- 'Content-Type': 'application/json',- ...options.headers- }-});--/**- * Link- *- * Create link between resources.- */-export const postRelationsLink = <ThrowOnError extends boolean = false>(options: Options<PostRelationsLinkData, ThrowOnError>) => (options.client ?? client).post<PostRelationsLinkResponses, PostRelationsLinkErrors, ThrowOnError>({- responseType: 'json',- url: '/api/v1/relations/link',- ...options,- headers: {- 'Content-Type': 'application/json',- ...options.headers- }-});-/*** List Privacy Categories*/diff --git a/web-studio/src/gen/ov-client/types.gen.ts b/web-studio/src/gen/ov-client/types.gen.tsindex f044706ac..9ba2f11d3 100644--- a/web-studio/src/gen/ov-client/types.gen.ts+++ b/web-studio/src/gen/ov-client/types.gen.ts@@ -516,26 +516,6 @@ export type ImportRequest = {vector_mode?: 'auto' | 'recompute' | 'require' | null;};-/**- * LinkRequest- *- * Request model for link.- */-export type LinkRequest = {- /**- * From Uri- */- from_uri: string;- /**- * To Uris- */- to_uris: string | Array<string>;- /**- * Reason- */- reason?: string;-};-/*** MkdirRequest*@@ -702,22 +682,6 @@ export type SetRoleRequest = {role: string;};-/**- * UnlinkRequest- *- * Request model for unlink.- */-export type UnlinkRequest = {- /**- * From Uri- */- from_uri: string;- /**- * To Uri- */- to_uri: string;-};-/*** UpsertPrivacyConfigRequest*/@@ -2565,136 +2529,6 @@ export type PostSearchGlobResponses = {200: unknown;};-export type GetRelationsData = {- body?: never;- headers?: {- /**- * X-Api-Key- */- 'x-api-key'?: string | null;- /**- * Authorization- */- authorization?: string | null;- /**- * X-Openviking-Account- */- 'X-OpenViking-Account'?: string | null;- /**- * X-Openviking-User- */- 'X-OpenViking-User'?: string | null;- };- path?: never;- query: {- /**- * Uri- *- * Viking URI- */- uri: string;- };- url: '/api/v1/relations';-};--export type GetRelationsErrors = {- /**- * Validation Error- */- 422: HttpValidationError;-};--export type GetRelationsError = GetRelationsErrors[keyof GetRelationsErrors];--export type GetRelationsResponses = {- /**- * Successful Response- */- 200: unknown;-};--export type DeleteRelationsLinkData = {- body: UnlinkRequest;- headers?: {- /**- * X-Api-Key- */- 'x-api-key'?: string | null;- /**- * Authorization- */- authorization?: string | null;- /**- * X-Openviking-Account- */- 'X-OpenViking-Account'?: string | null;- /**- * X-Openviking-User- */- 'X-OpenViking-User'?: string | null;- };- path?: never;- query?: never;- url: '/api/v1/relations/link';-};--export type DeleteRelationsLinkErrors = {- /**- * Validation Error- */- 422: HttpValidationError;-};--export type DeleteRelationsLinkError = DeleteRelationsLinkErrors[keyof DeleteRelationsLinkErrors];--export type DeleteRelationsLinkResponses = {- /**- * Successful Response- */- 200: unknown;-};--export type PostRelationsLinkData = {- body: LinkRequest;- headers?: {- /**- * X-Api-Key- */- 'x-api-key'?: string | null;- /**- * Authorization- */- authorization?: string | null;- /**- * X-Openviking-Account- */- 'X-OpenViking-Account'?: string | null;- /**- * X-Openviking-User- */- 'X-OpenViking-User'?: string | null;- };- path?: never;- query?: never;- url: '/api/v1/relations/link';-};--export type PostRelationsLinkErrors = {- /**- * Validation Error- */- 422: HttpValidationError;-};--export type PostRelationsLinkError = PostRelationsLinkErrors[keyof PostRelationsLinkErrors];--export type PostRelationsLinkResponses = {- /**- * Successful Response- */- 200: unknown;-};-export type GetPrivacyConfigsData = {body?: never;headers?: {diff --git a/web-studio/src/lib/retrieval.ts b/web-studio/src/lib/retrieval.tsindex ab9db8822..f8b774d5c 100644--- a/web-studio/src/lib/retrieval.ts+++ b/web-studio/src/lib/retrieval.ts@@ -19,7 +19,6 @@ export interface FindResultItem {overview?: string | nullcategory: stringmatch_reason: string- relations: Array<{ uri: string; abstract: string }>result_kind?: 'semantic' | 'grep' | 'glob'line?: number}@@ -120,20 +119,6 @@ function normalizeFindItems(match_reason:typeof item.match_reason === 'string' ? item.match_reason : '',overview: typeof item.overview === 'string' ? item.overview : null,- relations: Array.isArray(item.relations)- ? item.relations- .filter(- (relation): relation is Record<string, unknown> =>- relation !== null &&- typeof relation === 'object' &&- !Array.isArray(relation),- )- .map((relation) => ({- abstract:- typeof relation.abstract === 'string' ? relation.abstract : '',- uri: typeof relation.uri === 'string' ? relation.uri : '',- }))- : [],score: typeof item.score === 'number' ? item.score : 0,uri: typeof item.uri === 'string' ? item.uri : '',}))@@ -309,7 +294,6 @@ function patternResultItem(level: 2,line: options.line,match_reason: '',- relations: [],result_kind: kind,score: 0,uri,diff --git a/web-studio/src/routes/retrieval/-components/retrieval-results.test.tsx b/web-studio/src/routes/retrieval/-components/retrieval-results.test.tsxindex 23b1f7284..dc637807d 100644--- a/web-studio/src/routes/retrieval/-components/retrieval-results.test.tsx+++ b/web-studio/src/routes/retrieval/-components/retrieval-results.test.tsx@@ -30,7 +30,6 @@ describe('RetrievalResults', () => {context_type: 'resource',level: 2,match_reason: '',- relations: [],score: 0.8,uri: 'viking://resources/result.md',},diff --git a/web-studio/types/ov-server/api/v1/search.ts b/web-studio/types/ov-server/api/v1/search.tsindex 486518257..b8e7fc47d 100644--- a/web-studio/types/ov-server/api/v1/search.ts+++ b/web-studio/types/ov-server/api/v1/search.ts@@ -2,11 +2,6 @@ import type { JsonObject } from '../../common'export type FindContextType = 'memory' | 'resource' | 'skill'-export type SearchRelation = {- abstract: string- uri: string-}-export type SearchHit = {abstract?: stringcategory?: string@@ -14,7 +9,6 @@ export type SearchHit = {level?: numbermatch_reason?: stringoverview?: string | null- relations?: SearchRelation[]score?: numberuri?: string}