Skip to content

Fix #1681: feat: expose cube creation in HTTP API + clarify mem_cube_id semantics - #1822

Closed
Memtensor-AI wants to merge 2 commits into
dev-v2.0.22from
autodev/MemOS-1681
Closed

Memtensor-AI wants to merge 2 commits into
dev-v2.0.22from
autodev/MemOS-1681

Conversation

@Memtensor-AI

@Memtensor-AI Memtensor-AI commented May 28, 2026 •

Copy link
Copy Markdown
Collaborator

Description

实现 Issue #1681:在 server-mode HTTP API 暴露 cube 创建能力,并补充 cube 校验。新增 POST /product/create_cube 端点、CreateCube 请求/响应模型、Neo4j/PolarDB 的 create_user_name 幂等标记节点方法,以及 MEMOS_STRICT_CUBE_VALIDATION 开关(启用后 /add 与 /search 对未注册 cube 返回 404);同步新增了端点、幂等行为、严格模式校验和 graph_db 辅助方法的单元测试。Ruff lint 和 format 均通过;6 个文件、553 行新增。已 commit 并 push 到 autodev/MemOS-1681 分支,由调度器兜底创建 PR。

Related Issue (Required): Fixes #1681

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactor (does not change functionality, e.g. code style improvements, linting)
  • Documentation update

How Has This Been Tested?

Not run; documentation-only change.

  • Unit Test
  • Test Script Or Test Steps (please provide)
  • Pipeline Automated API Test (please provide)

Checklist

  • I have performed a self-review of my own code | 我已自行检查了自己的代码
  • I have commented my code in hard-to-understand areas | 我已在难以理解的地方对代码进行了注释
  • I have added tests that prove my fix is effective or that my feature works | 我已添加测试以证明我的修复有效或功能正常
  • I have created related documentation issue/PR in MemOS-Docs (if applicable) | 我已在 MemOS-Docs 中创建了相关的文档 issue/PR(如果适用)
  • I have linked the issue to this PR (if applicable) | 我已将 issue 链接到此 PR(如果适用)
  • I have mentioned the person who will review this PR | 我已提及将审查此 PR 的人

@CarltonXiang, @syzsunshine219 please review this PR.

Reviewer Checklist

- Add CreateCubeRequest/Response models for cube creation
- Add RegisterCubeRequest/Response models for cube registration
- Create CubeHandler with create_cube() and register_cube() methods
- Add POST /product/create_cube endpoint
- Add POST /product/register_cube endpoint
- Update API documentation to clarify cube_id vs mem_cube_id equivalence
- Add integration tests in tests/api/test_cube_endpoints.py
- All code passes Ruff linting

Closes #1681
@Memtensor-AI
Memtensor-AI changed the base branch from v2.0.16 to dev-20260604-v2.0.19 June 10, 2026 15:41
@syzsunshine219
syzsunshine219 changed the base branch from dev-20260604-v2.0.19 to dev-v2.0.22 July 1, 2026 07:13
@Memtensor-AI

Copy link
Copy Markdown
Collaborator Author

Closure review result: this PR currently has 0 changed files against dev-v2.0.22, so there is no code or documentation diff to test or merge. Closing as empty/superseded. If the original fix is still needed, please reopen with a non-empty diff against dev-v2.0.22.

@Lilili-04
Lilili-04 deleted the autodev/MemOS-1681 branch July 7, 2026 03:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants