feat(fs): 新增 attrs 元信息接口#2906
Merged
Merged
Conversation
zhoujh01
approved these changes
Jul 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
新增
GET /api/v1/fs/attrs,用于读取文件或目录的逻辑扩展属性。当前返回:attrs.tags:显式检索标签,对外统一命名为tagsattrs.memory:memory 文件里的MEMORY_FIELDS元信息,并去掉正文content同时补齐 Python SDK、Go SDK、Rust CLI 和中英文文档。
Related Issue
N/A
Type of Change
Changes Made
/api/v1/fs/attrs,返回uri、context_type和attrs,其中attrs.tags来自向量记录里的search_tags,attrs.memory来自 memory 文件的MEMORY_FIELDS。openviking attrs get <uri> [key]和openviking attrs set-tags ...;旧的顶层openviking set-tags保留兼容但隐藏在 help 外。Testing
运行过:
pytest tests/server/test_filesystem_router.py -q pytest sdk/python/tests/test_async_client_behaviors.py -q cargo check -p ov_cli GOCACHE=/tmp/openviking-go-build go test ./...cargo fmt -p ov_cli -- --check未通过,失败点是仓库里已有的 ov_cli 无关格式化差异;本 PR 没有全量 rustfmt,避免扩大 diff。Checklist
Screenshots (if applicable)
N/A
Additional Notes
示例:
返回示例:
{ "uri": "viking://user/alice/memories/experiences/foo.md", "context_type": "memory", "attrs": { "memory": { "memory_type": "experiences", "name": "foo", "tags": ["ui"], "resource_refs": ["viking://resources/docs/api.md"] }, "tags": ["team=search"] } }