TencentDB-Agent-Memory icon indicating copy to clipboard operation
TencentDB-Agent-Memory copied to clipboard

[Feature] /seed接口导入的目录合并到/capture中,或者有额外的批量导入接口,能与/capture一起用

Open benyaxianyou opened this issue 5 months ago • 2 comments

Is this feature related to a problem? | 该功能需求是否与某个问题相关?请描述

我想使用批量导入时,会遇到/seed导入的目录时单独的,独立于/capture的,我有大量的对话需要导入,一条一条/capture导入就会比较麻烦,如果有批量导入功能会是很好的。

Describe the solution you'd like | 描述你期望的解决方案

希望增加批量导入功能,可以额外增加一个接口,保留/seed接口,也可以/seed接口增加一个参数,可以指定是独立目录还是与/seed共享目录,但是如果是共享目录,可能会涉及数据库连接关闭的问题。

Describe alternatives you've considered | 描述你考虑过的其他方案

No response

Additional context | 补充说明

No response

benyaxianyou avatar Jul 02 '26 02:07 benyaxianyou

I will work on a scoped PR for this: add a Gateway POST /capture/batch endpoint that accepts multiple existing /capture payloads and imports them through the live capture pipeline/data directory. I will keep /seed behavior unchanged and include focused validation tests for the batch request shape.

RerankerGuo avatar Jul 02 '26 02:07 RerankerGuo

Triage update: #363 is the canonical fix for this issue and has been approved.

Why #363:

  • adds POST /capture/batch as a live Gateway import endpoint
  • accepts multiple existing /capture payloads and seed-style sessions/conversations data
  • preserves /seed as an isolated import path instead of pointing it at the live data directory
  • handles historical imported data by disabling the live cold-start timestamp floor for batch import
  • includes Hermes client/docs updates and focused Gateway validation tests

Local verification:

  • COREPACK_ENABLE_AUTO_PIN=0 pnpm vitest run src/gateway/capture-batch.test.ts (12/12 passed)
  • COREPACK_ENABLE_AUTO_PIN=0 pnpm test (79/79 passed)
  • COREPACK_ENABLE_AUTO_PIN=0 pnpm build
  • git diff --check

Duplicate cleanup: #364 has been marked as superseded/re-scope by #363.

Note: local Node is v22.14.0, below the package engine >=22.16.0; commands completed successfully with the expected engine warning.

YOMXXX avatar Jul 09 '26 08:07 YOMXXX