Commit Graph
8 Commits
Author SHA1 Message Date
MaojiaShengandopenviking ce998873f9 lisence: change the main lisence to AGPL-3.0 (#1085)
* lisence: change the main lisence from Apache-2.0 to AGPL-v3

* lisence: change the main lisence from Apache-2.0 to AGPL-v3

* lisence: change the main lisence from Apache-2.0 to AGPL-v3

---------

Co-authored-by: openviking <openviking@example.com>
2026-03-30 14:37:42 +08:00
dr3243636-opsandClaude Opus 4.6 cd4bf44368 feat(tasks): add async task tracking API for background operations (#476)
* feat(tasks): add async task tracking API for background operations

Follow-up to #472. When `wait=false`, background commit failures were
silently lost — callers had no way to know if memory extraction succeeded.

This adds a lightweight in-memory TaskTracker that returns a `task_id`
on async commit, which callers can poll via new `/tasks` endpoints to
check completion status, results, or errors.

Key changes:
- New TaskTracker singleton with TTL-based cleanup (24h completed, 7d failed)
- New API: GET /api/v1/tasks/{task_id} and GET /api/v1/tasks (with filters)
- Atomic duplicate commit detection (eliminates race condition)
- Error message sanitization (keys/tokens redacted)
- Defensive copies on all public reads (thread safety)
- 35 tests (26 unit + 9 integration), all existing tests pass

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: resolve CI lint failures (ruff format + unused imports)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 09:31:04 +08:00
Qin HaojieandClaude Opus 4.6 8274cc31ef fix: 修复单测以适配 vectordb 接口重构,统一测试数据路径 (#333)
- 修复 filesystem stat 错误匹配,增加 "not found" 判断
- 为 AddResourceRequest 添加 model_validator 校验 path 参数
- 处理 queue manager 未初始化时 ObserverService 的异常
- 简化 vectordb record ID 生成逻辑,移除 owner_space
- 捕获 HTTP client close 时的 RuntimeError
- 统一测试数据路径至 test_data/ 目录
- 更新测试用例使用 get_context_by_uri() 等新接口
- 移除测试 mock 对 VikingDBInterface 的依赖

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 19:40:12 +08:00
kkkwjxandqin-ctx 37b5d0d359 Multi tenant (#283)
* test: add multi-tenant isolation unit coverage

* feat: implement phase2 multi-tenant context isolation

* feat: multi tenant

* fix: resolve multi-tenant merge conflicts

* feat: multi tenant

* fix: enforce tenant isolation for session get

* tos config

---------

Co-authored-by: qin-ctx <qinhaojie.exe@bytedance.com>
2026-02-25 18:25:36 +08:00
qin-ctx 002e14087f refactor(client): 拆分 HTTP 客户端,分离嵌入模式与 HTTP 模式 (#141)
* refactor(client): 拆分 HTTP 客户端,分离嵌入模式与 HTTP 模式

- 将 HTTPClient 重命名为 AsyncHTTPClient,新增 SyncHTTPClient 同步封装
- AsyncOpenViking/SyncOpenViking 仅保留嵌入模式,HTTP 模式使用独立的 AsyncHTTPClient/SyncHTTPClient
- HTTP 客户端支持从 ovcli.conf 自动加载 url/api_key
- 移除客户端构造函数中的 user 参数,统一使用默认用户
- 简化 CLIContext,直接使用 SyncHTTPClient
- 简化 VikingFS._uri_to_path 实现
- 更新文档、示例和测试适配新 API

* fix queue
2026-02-12 12:25:54 +08:00
qin-ctx 6d55bf4aa1 feat: 新增 Bash CLI 基础框架与完整命令实现 (T3 + T5) (#132)
* feat: 新增 Typer CLI 并统一配置加载机制

引入基于 Typer 的完整 CLI 模块 (openviking/cli),支持 resources、
sessions、search、filesystem、content、relations、pack、debug、
observer、system 等子命令。

新增统一配置加载器 (config_loader),采用三级解析链(显式路径 →
环境变量 → ~/.openviking/),同时服务于 server (ov.conf) 和
CLI (ovcli.conf)。

精简 AsyncOpenViking / SyncOpenViking 客户端,移除 service 模式
(vectordb_url / agfs_url) 和环境变量回退逻辑,仅保留 embedded
和 HTTP 两种模式。

同步更新中英文文档、示例和测试。

* fix: remove user  when create session

* fix: tests

* fix: tests
2026-02-11 15:53:10 +08:00
kkkwjx a30cb2e7b9 Lint code (#25)
* feat: pre-commit-config

* style: ruff code
2026-02-02 18:56:15 +08:00
qin-ctx f98dc0ed1c first commit 2026-01-29 20:29:19 +08:00